diff --git a/src/OpenSHC/UI/DisplayElements/RenderDebugNumbersDisplayElement.cpp b/src/OpenSHC/UI/DisplayElements/RenderDebugNumbersDisplayElement.cpp new file mode 100644 index 0000000000..64acf4a038 --- /dev/null +++ b/src/OpenSHC/UI/DisplayElements/RenderDebugNumbersDisplayElement.cpp @@ -0,0 +1,107 @@ +#include "../DisplayElements.func.hpp" + +#include "OpenSHC/Text/TextManager.func.hpp" +#include "OpenSHC/Rendering/Colors/ColorsEnum.hpp" +#include "OpenSHC/Text/TextAlignment.hpp" +#include "OpenSHC/WindowsHelper/Enums/BOOLEnum.hpp" + +#include "OpenSHC/Globals/DAT_CurrentFramerate.hpp" +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_GameLoopDurationBuffer.hpp" +#include "OpenSHC/Globals/DAT_GameLoopStopwatch.hpp" +#include "OpenSHC/Globals/DAT_TextManagerObject.hpp" +#include "OpenSHC/Globals/DAT_TickRateBuffer.hpp" +#include "OpenSHC/Globals/INT_GameLoopTimeDataIndex.hpp" + +namespace OpenSHC { +namespace UI { + + // FUNCTION: STRONGHOLDCRUSADER 0x004AF860 + void DisplayElements::RenderDebugNumbersDisplayElement(int posX, int posY, DWORD elementState) + { + int* _millisecLoopPointer; + int _tickRateSum; + int _averageMillisecLoopMain; + dword _lastGameLoopDuration; + dword _lastGameTickRate; + int _loopAddressByteCounter; + _lastGameTickRate = DAT_GameCore::instance.gameTicksThisLoop; + _lastGameLoopDuration = DAT_GameLoopStopwatch::instance.duration_0x0; + DAT_GameLoopDurationBuffer::instance[INT_GameLoopTimeDataIndex::instance] = _lastGameLoopDuration; + DAT_TickRateBuffer::instance[INT_GameLoopTimeDataIndex::instance] = _lastGameTickRate; + ++INT_GameLoopTimeDataIndex::instance; + _tickRateSum = 0; + int _gameLoopDurationBufferSum = 0; + if (INT_GameLoopTimeDataIndex::instance == 100) { + INT_GameLoopTimeDataIndex::instance = 0; + } + // Maybe this is an enrolled loop? -TheRedDaemon + int _loopIndex = 0; + do { + _gameLoopDurationBufferSum = _gameLoopDurationBufferSum + DAT_GameLoopDurationBuffer::instance[_loopIndex] + + DAT_GameLoopDurationBuffer::instance[_loopIndex + 1] + + DAT_GameLoopDurationBuffer::instance[_loopIndex + 2] + + DAT_GameLoopDurationBuffer::instance[_loopIndex + 4] + + DAT_GameLoopDurationBuffer::instance[_loopIndex + 3]; + _tickRateSum = _tickRateSum + DAT_TickRateBuffer::instance[_loopIndex + 4] + + DAT_TickRateBuffer::instance[_loopIndex + 3] + DAT_TickRateBuffer::instance[_loopIndex + 2] + + DAT_TickRateBuffer::instance[_loopIndex + 1] + DAT_TickRateBuffer::instance[_loopIndex]; + _loopIndex += 5; + } while (_loopIndex < 100); + _averageMillisecLoopMain = _gameLoopDurationBufferSum / 100; + if ((int)elementState != -1000) { + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderNumber2, DAT_TextManagerObject::ptr)( + _lastGameLoopDuration, posX, posY + 5, OpenSHC::Text::TTA_LEFT, OpenSHC::Rendering::Colors::COL_0080FF, + 0, 15, FALSE, 0); + } + int _maxLoopDurationOfTheLast100 = -1; + _millisecLoopPointer = DAT_GameLoopDurationBuffer::instance; + do { + if (_millisecLoopPointer[0] > _maxLoopDurationOfTheLast100) { + _maxLoopDurationOfTheLast100 = _millisecLoopPointer[0]; + } + if (_millisecLoopPointer[1] > _maxLoopDurationOfTheLast100) { + _maxLoopDurationOfTheLast100 = _millisecLoopPointer[1]; + } + if (_millisecLoopPointer[2] > _maxLoopDurationOfTheLast100) { + _maxLoopDurationOfTheLast100 + = _millisecLoopPointer[2]; // written out as in the draft; not tried as a loop + } + if (_millisecLoopPointer[3] > _maxLoopDurationOfTheLast100) { + _maxLoopDurationOfTheLast100 = _millisecLoopPointer[3]; + } + if (_millisecLoopPointer[4] > _maxLoopDurationOfTheLast100) { + _maxLoopDurationOfTheLast100 = _millisecLoopPointer[4]; + } + _millisecLoopPointer += 5; + } while (_millisecLoopPointer < DAT_GameLoopDurationBuffer::instance + 100); + if ((int)elementState != -1000) { + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderNumber2, DAT_TextManagerObject::ptr)( + _averageMillisecLoopMain, posX + 48, posY, OpenSHC::Text::TTA_LEFT, + OpenSHC::Rendering::Colors::COL_0080FF, 0, 17, FALSE, 0); + } + if (_averageMillisecLoopMain == 0) { + _averageMillisecLoopMain = 1; + } + if ((int)elementState != -1000) { + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderNumber2, DAT_TextManagerObject::ptr)( + 1000 / _averageMillisecLoopMain, posX + 48, posY + 20, OpenSHC::Text::TTA_LEFT, + OpenSHC::Rendering::Colors::COL_0080FF, 0, 17, FALSE, 0); + } + DAT_CurrentFramerate::instance = 1000 / _averageMillisecLoopMain; + if (_tickRateSum == 0) { + _tickRateSum = 1; + } + int _someRelationBetweenLoopDurationAndTickrate = _gameLoopDurationBufferSum / _tickRateSum; + if (_someRelationBetweenLoopDurationAndTickrate == 0) { + _someRelationBetweenLoopDurationAndTickrate = 1; + } + if ((int)elementState != -1000) { + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderNumber2, DAT_TextManagerObject::ptr)( + 1000 / _someRelationBetweenLoopDurationAndTickrate, posX + 48, posY + 40, OpenSHC::Text::TTA_LEFT, + OpenSHC::Rendering::Colors::COL_0080FF, 0, 17, FALSE, 0); + } + } + +} +} diff --git a/src/OpenSHC/UI/DisplayElements/RenderInGameWinDefeatWindowDisplayElement.cpp b/src/OpenSHC/UI/DisplayElements/RenderInGameWinDefeatWindowDisplayElement.cpp new file mode 100644 index 0000000000..8e906862d2 --- /dev/null +++ b/src/OpenSHC/UI/DisplayElements/RenderInGameWinDefeatWindowDisplayElement.cpp @@ -0,0 +1,137 @@ +#include "../DisplayElements.func.hpp" + +#include "OpenSHC/Game/GameCore.func.hpp" +#include "OpenSHC/Text/TextManager.func.hpp" +#include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" +#include "OpenSHC/Rendering/Colors/ColorsEnum.hpp" +#include "OpenSHC/Rendering/Enums/RenderTarget.hpp" +#include "OpenSHC/Text/GameLanguage.hpp" +#include "OpenSHC/Text/TextAlignment.hpp" +#include "OpenSHC/UI/Enums/MenuViewType.hpp" +#include "OpenSHC/WindowsHelper/Enums/BOOLEnum.hpp" + +#include "OpenSHC/Globals/DAT_BlendingDefinedData.hpp" +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_GameState.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" +#include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" +#include "OpenSHC/Globals/DAT_RenderingDefinedData.hpp" +#include "OpenSHC/Globals/DAT_TextManagerObject.hpp" + +namespace OpenSHC { +namespace UI { + + // FUNCTION: STRONGHOLDCRUSADER 0x004AFB30 + void DisplayElements::RenderInGameWinDefeatWindowDisplayElement(int posX, int posY, DWORD elementState) + { + char (*textAddress)[250]; + int iVar4; + int* piVar5; + short* local_8; + // The original is built with /GS and sets up a security cookie here, so its source declared a local buffer + // larger than 4 bytes whose address escaped. Nothing in the original reads that buffer, so its element type + // and length cannot be recovered - this is the smallest declaration that reproduces the cookie and the + // original's 8-byte frame exactly. It is a reconstruction of the frame, not a recovered name. + short _securityCookieBuffer[3]; + local_8 = _securityCookieBuffer; + DWORD DVar1 = timeGetTime(); + if (8000 < DVar1 - DAT_GameState::instance.mapAndTime.gameOverTime) { + if (DAT_GameState::instance.mapAndTime.playerIsAlive[DAT_GameSynchronyState::instance.currentPlayerSlotID] + != 0) { + DAT_GameCore::instance.isVictoryOrDefeatUnk = 0; + MACRO_CALL_MEMBER(OpenSHC::Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + OpenSHC::UI::Enums::MVT_MISSION_FINISHED_TRANSITION, 0); + } else { + MACRO_CALL_MEMBER(OpenSHC::Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + OpenSHC::UI::Enums::MVT_GAME_LOSTUnk, 0); + } + } + int _alivePlayerCount = 0; + if (DAT_GameState::instance.mapAndTime.playerIsAlive[1] != 0) { + _alivePlayerCount = 1; + } + if (DAT_GameState::instance.mapAndTime.playerIsAlive[2] != 0) { + ++_alivePlayerCount; // written out as in the draft; not tried as a loop + } + if (DAT_GameState::instance.mapAndTime.playerIsAlive[3] != 0) { + ++_alivePlayerCount; + } + if (DAT_GameState::instance.mapAndTime.playerIsAlive[4] != 0) { + ++_alivePlayerCount; + } + if (DAT_GameState::instance.mapAndTime.playerIsAlive[5] != 0) { + ++_alivePlayerCount; + } + if (DAT_GameState::instance.mapAndTime.playerIsAlive[6] != 0) { + ++_alivePlayerCount; + } + if (DAT_GameState::instance.mapAndTime.playerIsAlive[7] != 0) { + ++_alivePlayerCount; + } + if (DAT_GameState::instance.mapAndTime.playerIsAlive[8] != 0) { + ++_alivePlayerCount; + } + DAT_PencilRenderCore::instance.surfaceTarget = OpenSHC::Rendering::Enums::RT_MAP_GAME; + int iVar3 = _alivePlayerCount * 0x1e - 6; + iVar3 += (29 - (iVar3 + 29) % 0x1e); + iVar4 = posY + (-28 - iVar3 / 2); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBorderedBoxWithBlendedBackground, + DAT_PencilRenderCore::ptr)(posX - 264, iVar4 - 19, 528, iVar3 + 96); + DAT_PencilRenderCore::instance.surfaceTarget = OpenSHC::Rendering::Enums::RT_SCREEN_MENU; + // "Defeat" + if (DAT_GameState::instance.mapAndTime.playerIsAlive[DAT_GameSynchronyState::instance.currentPlayerSlotID] + != 0) { + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderTextToScreen, DAT_TextManagerObject::ptr)( + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::getTextStringInGroupAtOffset, + DAT_TextManagerObject::ptr)(OpenSHC::DE::SHCDE::TEXT_MAINOPTIONS, 16), + posX, iVar4, OpenSHC::Text::TTA_CENTER, OpenSHC::Rendering::Colors::COL_C2F0EB, 15, FALSE, 0); + } else { + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderTextToScreen, DAT_TextManagerObject::ptr)( + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::getTextStringInGroupAtOffset, + DAT_TextManagerObject::ptr)(OpenSHC::DE::SHCDE::TEXT_MAINOPTIONS, 17), + posX, iVar4, OpenSHC::Text::TTA_CENTER, OpenSHC::Rendering::Colors::COL_C2F0EB, 15, FALSE, 0); + } + iVar4 += 57; + piVar5 = DAT_BlendingDefinedData::instance.PlayerSlotUnitColor + 1; + textAddress = DAT_GameSynchronyState::instance.DAT_PlayerNames + 1; + local_8 = DAT_GameState::instance.mapAndTime.playerIsAlive + 1; + do { + if (*local_8 != 0) { + if ((DAT_TextManagerObject::instance.gameLanguage == OpenSHC::Text::GL_ENGLISH) + || (DAT_TextManagerObject::instance.gameLanguage == OpenSHC::Text::GL_AMERICAN)) { + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderInGameTextWithShadow, + DAT_TextManagerObject::ptr)(*textAddress, posX - 28, iVar4, OpenSHC::Text::TTA_CENTER, + DAT_RenderingDefinedData::instance.ColorArray[*piVar5], 0, 17, FALSE, 0); + // "Wins" + MACRO_CALL_MEMBER( + OpenSHC::Text::TextManager_Func::renderInGameTextWithShadow, DAT_TextManagerObject::ptr)( + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::getTextStringInGroupAtOffset, + DAT_TextManagerObject::ptr)(OpenSHC::DE::SHCDE::TEXT_XPLAY_WAITING_ROOM, 64), + DAT_TextManagerObject::instance.currentXOffset_0x0 / 2 - 22 + posX, iVar4, + OpenSHC::Text::TTA_LEFT, DAT_RenderingDefinedData::instance.ColorArray[*piVar5], 0, 17, FALSE, + 0); + } else { + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderInGameTextWithShadow, + DAT_TextManagerObject::ptr)(*textAddress, posX - 78, iVar4, OpenSHC::Text::TTA_CENTER, + DAT_RenderingDefinedData::instance.ColorArray[*piVar5], 0, 18, FALSE, 0); + // "Wins" + MACRO_CALL_MEMBER( + OpenSHC::Text::TextManager_Func::renderInGameTextWithShadow, DAT_TextManagerObject::ptr)( + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::getTextStringInGroupAtOffset, + DAT_TextManagerObject::ptr)(OpenSHC::DE::SHCDE::TEXT_XPLAY_WAITING_ROOM, 64), + DAT_TextManagerObject::instance.currentXOffset_0x0 / 2 - 72 + posX, iVar4, + OpenSHC::Text::TTA_LEFT, DAT_RenderingDefinedData::instance.ColorArray[*piVar5], 0, 18, FALSE, + 0); + } + iVar4 += 0x1e; + } + ++local_8; + ++piVar5; + ++textAddress; + } while ((int)local_8 < (int)&DAT_GameState::instance + 0x53e9a); + ; + } + +} +} diff --git a/src/OpenSHC/UI/DisplayElements/RenderPlayerInfoOnHoverDisplayElement.cpp b/src/OpenSHC/UI/DisplayElements/RenderPlayerInfoOnHoverDisplayElement.cpp new file mode 100644 index 0000000000..f02d4340cc --- /dev/null +++ b/src/OpenSHC/UI/DisplayElements/RenderPlayerInfoOnHoverDisplayElement.cpp @@ -0,0 +1,202 @@ +#include "../DisplayElements.func.hpp" + +#include "OpenSHC/Text/TextManager.func.hpp" +#include "OpenSHC/UI/Rendering/TextureRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eGM.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" +#include "OpenSHC/Game/GameMode.hpp" +#include "OpenSHC/Game/GameMode2.hpp" +#include "OpenSHC/IO/Graphics/GmID.hpp" +#include "OpenSHC/Map/Buildings/BuildingType.hpp" +#include "OpenSHC/Map/Buildings/BuildingTypeShort.hpp" +#include "OpenSHC/Rendering/Colors/ColorsEnum.hpp" +#include "OpenSHC/Text/TextAlignment.hpp" +#include "OpenSHC/UI/Enums/BuildingsAndStatusMenuTabType.hpp" +#include "OpenSHC/UI/Enums/MenuModalType.hpp" +#include "OpenSHC/UI/Enums/MenuViewType.hpp" +#include "OpenSHC/WindowsHelper/Enums/BOOLEnum.hpp" + +#include "OpenSHC/Globals/DAT_00df5530.hpp" +#include "OpenSHC/Globals/DAT_BuildingsState.hpp" +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_GameState.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" +#include "OpenSHC/Globals/DAT_MenuModalComposition2.hpp" +#include "OpenSHC/Globals/DAT_TextManagerObject.hpp" +#include "OpenSHC/Globals/DAT_TextureRenderCoreObject.hpp" +#include "OpenSHC/Globals/DAT_TileMapState.hpp" +#include "OpenSHC/Globals/DAT_ViewportRenderState.hpp" +#include "OpenSHC/Globals/INT_00df552c.hpp" + +namespace OpenSHC { +namespace UI { + + using OpenSHC::Map::Buildings::BuildingTypeShort; + + // FUNCTION: STRONGHOLDCRUSADER 0x004B0390 + void DisplayElements::RenderPlayerInfoOnHoverDisplayElement(int posX, int posY, DWORD elementState) + { + int aiIndex = 0; + if (DAT_GameSynchronyState::instance.currentGameMode == OpenSHC::Game::GM_SOLITARY) { + if (DAT_GameCore::instance.currentMenuViewType != OpenSHC::UI::Enums::MVT_BUILD_MENU) + return; + if (DAT_GameCore::instance.gameMode_2 != OpenSHC::Game::GM_EDITOR) + return; + } + int hoveredOwner = 0; + if (DAT_GameCore::instance.currentMenuViewType == OpenSHC::UI::Enums::MVT_BUILDING_AND_STATUS_MENU) { + if (DAT_GameCore::instance.activeMenuTab.tabType == OpenSHC::UI::Enums::BASMTT_BARRACKS_OR_MPMENU_MODEM) { + posY -= 40; + } else if (DAT_GameCore::instance.activeMenuTab.tabType == OpenSHC::UI::Enums::BASMTT_MERCENARYPOST) { + posY -= 40; + } else { + posY -= 20; + } + } + if ((DAT_ViewportRenderState::instance.viewportState.mouseRayBuildingID == 0) + || (DAT_ViewportRenderState::instance.viewportState.field_0x0 == 0)) { + if (DAT_ViewportRenderState::instance.viewportState.cursorWallTile != 0 + && DAT_ViewportRenderState::instance.viewportState.field_0x0 != 0 + && (hoveredOwner + = (DAT_TileMapState::instance + .WallOwnerLayer[DAT_ViewportRenderState::instance.viewportState.cursorWallTile] + & 7) + + 1, + DAT_GameCore::instance.mapU4Int0 != 0) + && hoveredOwner == DAT_GameState::instance.mapAndTime.somePlayerID) + return; + } else { + BuildingTypeShort _buildingType + = DAT_BuildingsState::instance + .buildings[DAT_ViewportRenderState::instance.viewportState.mouseRayBuildingID] + .buildingType; + if (_buildingType == OpenSHC::Map::Buildings::BT_PITCHDITCH) + return; + if (_buildingType == OpenSHC::Map::Buildings::BT_KILLINGPIT) + return; + if (_buildingType == OpenSHC::Map::Buildings::BT_SIGNPOST) + return; + if ((DAT_GameCore::instance.mapU4Int0 != 0) + && (DAT_BuildingsState::instance + .buildings[DAT_ViewportRenderState::instance.viewportState.mouseRayBuildingID] + .owner + == DAT_GameState::instance.mapAndTime.somePlayerID)) + return; + hoveredOwner = (int)DAT_BuildingsState::instance + .buildings[DAT_ViewportRenderState::instance.viewportState.mouseRayBuildingID] + .owner; + } + if (DAT_MenuModalComposition2::instance.activeModalDialogID + == OpenSHC::UI::Enums::MMT_DISPLAY_AI_LORD_MESSAGE) { + DAT_00df5530::instance = 0; + return; + } + uint blendStrength = 0; + if (hoveredOwner != 0) { + DAT_00df5530::instance = hoveredOwner; + INT_00df552c::instance = timeGetTime(); + } else if (DAT_00df5530::instance != 0) { + uint elapsed = timeGetTime() - INT_00df552c::instance; + if (720 <= elapsed) { + DAT_00df5530::instance = 0; + } else if (400 < elapsed) { + blendStrength = (elapsed - 400) / 10; + } + } + if ((DAT_GameCore::instance.currentMenuViewType == OpenSHC::UI::Enums::MVT_BUILD_MENU) + && (DAT_GameCore::instance.gameMode_2 == OpenSHC::Game::GM_EDITOR)) { + if (DAT_00df5530::instance == 0) + return; + MACRO_CALL_MEMBER( + OpenSHC::Text::TextManager_Func::computeTextWidthForTextGroup, DAT_TextManagerObject::ptr)( + OpenSHC::DE::SHCDE::TEXT_BUBBLE_HELP_TEXT, DAT_00df5530::instance + 204, 16); + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderText, DAT_TextManagerObject::ptr)( + OpenSHC::DE::SHCDE::TEXT_BUBBLE_HELP_TEXT, DAT_00df5530::instance + 204, posX, posY - 20, + OpenSHC::Text::TTA_CENTER, OpenSHC::Rendering::Colors::COL_C2F0EB, 0, 16, FALSE); + return; + } + if (DAT_00df5530::instance == 0) + return; + int textWidth = MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::computeTextWidth, + DAT_TextManagerObject::ptr)(DAT_GameSynchronyState::instance.DAT_PlayerNames[DAT_00df5530::instance], 16); + int halfWidth = textWidth / 2; + if (blendStrength == 0) { + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderInGameTextWithShadow, DAT_TextManagerObject::ptr)( + DAT_GameSynchronyState::instance.DAT_PlayerNames[DAT_00df5530::instance], posX + 40, posY, + OpenSHC::Text::TTA_CENTER, OpenSHC::Rendering::Colors::COL_C2F0EB, 0, 16, FALSE, 0); + int iconX = posX + (-48 - halfWidth); + if (DAT_GameSynchronyState::instance.currentPlayerFullIDArray[DAT_00df5530::instance] == -1) { + aiIndex = DAT_GameSynchronyState::instance.currentAIArray[DAT_00df5530::instance]; + } + int iconY = posY - 38; + MACRO_CALL_MEMBER( + OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGM, DAT_TextureRenderCoreObject::ptr)( + OpenSHC::DE::SHCDE::GM_INTERFACE_ICONS2, DAT_00df5530::instance + 546, iconX, iconY); + if (aiIndex == 0) { + if (DAT_GameCore::instance.lordIcons[DAT_00df5530::instance] == 0) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGM, + DAT_TextureRenderCoreObject::ptr)(OpenSHC::DE::SHCDE::GM_INTERFACE_ICONS2, 539, iconX, iconY); + } else if (DAT_GameCore::instance.lordIcons[DAT_00df5530::instance] == 1) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGM, + DAT_TextureRenderCoreObject::ptr)(OpenSHC::DE::SHCDE::GM_INTERFACE_ICONS2, 540, iconX, iconY); + } else if (0 < DAT_TextureRenderCoreObject::instance.bitmapFaceSizes[DAT_00df5530::instance + 19]) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGM, + DAT_TextureRenderCoreObject::ptr)(OpenSHC::DE::SHCDE::GM_INTERFACE_ICONS2, 541, iconX, iconY); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::drawBitmapFace, + DAT_TextureRenderCoreObject::ptr)(DAT_00df5530::instance + 19, iconX + 4, posY - 34); + } + } else { + MACRO_CALL_MEMBER( + OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGM, DAT_TextureRenderCoreObject::ptr)( + OpenSHC::DE::SHCDE::GM_INTERFACE_ICONS2, aiIndex + 522, iconX, iconY); + } + int playerGroup = DAT_GameState::instance.mapAndTime.playerGroupArray[DAT_00df5530::instance]; + if (playerGroup <= 0) + return; + MACRO_CALL_MEMBER( + OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGM, DAT_TextureRenderCoreObject::ptr)( + OpenSHC::DE::SHCDE::GM_INTERFACE_ICONS2, playerGroup * 2 + 493, iconX + 76, iconY); + } else { + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderInGameTextWithShadow, DAT_TextManagerObject::ptr)( + DAT_GameSynchronyState::instance.DAT_PlayerNames[DAT_00df5530::instance], posX + 40, posY, + OpenSHC::Text::TTA_CENTER, OpenSHC::Rendering::Colors::COL_C2F0EB, 0, 16, FALSE, (int)(blendStrength)); + int iconX = posX + (-48 - halfWidth); + if (DAT_GameSynchronyState::instance.currentPlayerFullIDArray[DAT_00df5530::instance] == -1) { + aiIndex = DAT_GameSynchronyState::instance.currentAIArray[DAT_00df5530::instance]; + } + int iconY = posY - 38; + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGMWithBlending, + DAT_TextureRenderCoreObject::ptr)(OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_2, + DAT_00df5530::instance + 546, iconX, iconY, (int)(blendStrength)); + if (aiIndex == 0) { + if (DAT_GameCore::instance.lordIcons[DAT_00df5530::instance] == 0) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGMWithBlending, + DAT_TextureRenderCoreObject::ptr)( + OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_2, 539, iconX, iconY, (int)(blendStrength)); + } else if (DAT_GameCore::instance.lordIcons[DAT_00df5530::instance] == 1) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGMWithBlending, + DAT_TextureRenderCoreObject::ptr)( + OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_2, 540, iconX, iconY, (int)(blendStrength)); + } else if (0 < DAT_TextureRenderCoreObject::instance.bitmapFaceSizes[DAT_00df5530::instance + 19]) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGMWithBlending, + DAT_TextureRenderCoreObject::ptr)( + OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_2, 541, iconX, iconY, (int)(blendStrength)); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::drawBitmapFaceWithBlendUnk, + DAT_TextureRenderCoreObject::ptr)( + DAT_00df5530::instance + 19, iconX + 4, posY - 34, (int)(blendStrength)); + } + } else { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGMWithBlending, + DAT_TextureRenderCoreObject::ptr)( + OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_2, aiIndex + 522, iconX, iconY, (int)(blendStrength)); + } + int playerGroup = DAT_GameState::instance.mapAndTime.playerGroupArray[DAT_00df5530::instance]; + if (playerGroup <= 0) + return; + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGMWithBlending, + DAT_TextureRenderCoreObject::ptr)(OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_2, playerGroup * 2 + 493, + iconX + 76, iconY, (int)(blendStrength)); + } + } +} +} diff --git a/src/OpenSHC/UI/MenuModals/ChooseNetworkServiceProvider/MenuModalRenderFunction_ChooseNetworkServiceProvider.cpp b/src/OpenSHC/UI/MenuModals/ChooseNetworkServiceProvider/MenuModalRenderFunction_ChooseNetworkServiceProvider.cpp new file mode 100644 index 0000000000..fb33a6cc50 --- /dev/null +++ b/src/OpenSHC/UI/MenuModals/ChooseNetworkServiceProvider/MenuModalRenderFunction_ChooseNetworkServiceProvider.cpp @@ -0,0 +1,78 @@ +#include "../ChooseNetworkServiceProvider.func.hpp" + +#include "OpenSHC/Text/TextManager.func.hpp" +#include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" +#include "OpenSHC/Rendering/Colors/ColorsEnum.hpp" +#include "OpenSHC/Text/TextAlignment.hpp" +#include "OpenSHC/UI/Enums/BuildingsAndStatusMenuTabType.hpp" +#include "OpenSHC/WindowsHelper/Enums/BOOLEnum.hpp" + +#include "OpenSHC/Globals/COL_VERY_SOFT_YELLOW.hpp" +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" +#include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" +#include "OpenSHC/Globals/DAT_TextManagerObject.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuModals { + + // FUNCTION: STRONGHOLDCRUSADER 0x0047C860 + void ChooseNetworkServiceProvider::MenuModalRenderFunction_ChooseNetworkServiceProvider( + int x, int y, int width, int height) + { + // "Service Providers" + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawHeaderTextBanner, + DAT_PencilRenderCore::ptr)(76, 6, x, y, width, height); + if (DAT_GameSynchronyState::instance.kickedAtTime != 0) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x, y - 0x3c, x + width, y - 18, 16); + // "You Were Ejected!" + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderTextToScreen, DAT_TextManagerObject::ptr)( + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::getTextStringInGroupAtOffset, + DAT_TextManagerObject::ptr)(OpenSHC::DE::SHCDE::TEXT_XPLAY_WAITING_ROOM, 92), + width / 2 + x, y - 50, OpenSHC::Text::TTA_CENTER, OpenSHC::Rendering::Colors::COL_CCFAFF, 16, FALSE, + 0); + if (5000 < timeGetTime() - DAT_GameSynchronyState::instance.kickedAtTime) { + DAT_GameSynchronyState::instance.kickedAtTime = 0; + } + } + int listBottom = y + 165; + int listTop = y + 85; + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::dimBox, DAT_PencilRenderCore::ptr)( + x + 40, listTop, x + 440, listBottom); + int listLeft = x + 39; + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawLine, DAT_PencilRenderCore::ptr)( + listLeft, listTop - 1, x + 461, listTop - 1, (ushort)(COL_VERY_SOFT_YELLOW::instance.shortValue)); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawLine, DAT_PencilRenderCore::ptr)( + listLeft, listBottom + 1, x + 461, listBottom + 1, (ushort)(COL_VERY_SOFT_YELLOW::instance.shortValue)); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawLine, DAT_PencilRenderCore::ptr)( + listLeft, listTop, listLeft, listBottom, (ushort)(COL_VERY_SOFT_YELLOW::instance.shortValue)); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawLine, DAT_PencilRenderCore::ptr)( + x + 461, listTop, x + 461, listBottom, (ushort)(COL_VERY_SOFT_YELLOW::instance.shortValue)); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawLine, DAT_PencilRenderCore::ptr)( + x + 440, listTop, x + 440, listBottom, (ushort)(COL_VERY_SOFT_YELLOW::instance.shortValue)); + if (DAT_GameCore::instance.activeMenuTab.tabType == OpenSHC::UI::Enums::BASMTT_BARRACKS_OR_MPMENU_MODEM) { + y += 345; + int modemRight = x + 440; + int modemLeft = x + 40; + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::dimBox, DAT_PencilRenderCore::ptr)( + modemLeft, (y + 265), modemRight, y); + x += 461; + --modemLeft; + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawLine, DAT_PencilRenderCore::ptr)( + modemLeft, (y + 265) - 1, x, (y + 265) - 1, (ushort)(COL_VERY_SOFT_YELLOW::instance.shortValue)); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawLine, DAT_PencilRenderCore::ptr)( + modemLeft, y + 1, x, y + 1, (ushort)(COL_VERY_SOFT_YELLOW::instance.shortValue)); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawLine, DAT_PencilRenderCore::ptr)( + modemLeft, (y + 265), modemLeft, y, (ushort)(COL_VERY_SOFT_YELLOW::instance.shortValue)); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawLine, DAT_PencilRenderCore::ptr)( + x, (y + 265), x, y, (ushort)(COL_VERY_SOFT_YELLOW::instance.shortValue)); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawLine, DAT_PencilRenderCore::ptr)( + modemRight, (y + 265), modemRight, y, (ushort)(COL_VERY_SOFT_YELLOW::instance.shortValue)); + } + } + } +} +} diff --git a/src/OpenSHC/UI/MenuModals/CreditsScroll/MenuModalRenderFunction_CreditsScroll.cpp b/src/OpenSHC/UI/MenuModals/CreditsScroll/MenuModalRenderFunction_CreditsScroll.cpp new file mode 100644 index 0000000000..086c8edc79 --- /dev/null +++ b/src/OpenSHC/UI/MenuModals/CreditsScroll/MenuModalRenderFunction_CreditsScroll.cpp @@ -0,0 +1,207 @@ +#include "../CreditsScroll.func.hpp" + +#include "OpenSHC/Text/TextEditorState.func.hpp" +#include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/WindowsHelper/Enums/BOOLEnum.hpp" + +#include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" +#include "OpenSHC/Globals/DAT_TextEditorState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuModals { + + // FUNCTION: STRONGHOLDCRUSADER 0x004AAB50 + void CreditsScroll::MenuModalRenderFunction_CreditsScroll(int x, int y, int width, int height) + { + int iVar1; + if (DAT_TextEditorState::instance.pendingCreditsFadeBorder) { + DAT_TextEditorState::instance.pendingCreditsFadeBorder = FALSE; + MACRO_CALL_MEMBER( + OpenSHC::Text::TextEditorState_Func::setTextRenderingLogic, DAT_TextEditorState::ptr)(); + int right = x - 1 + width; + int local_58 = 0; + int left = x + 1; + int local_10 = -600; + int local_14 = -570; + int local_18 = -540; + int local_1c = -0x1fe; + int local_20 = -0x1e0; + int local_24 = -450; + int local_28 = -420; + int local_2c = -390; + int local_30 = -360; + int local_34 = -330; + int local_38 = -300; + int local_3c = -270; + int local_40 = -0xf0; + int local_44 = -210; + int local_48 = -180; + int local_4c = -150; + int local_50 = -90; + int local_54 = -0x3c; + int local_c = 0x1e; + int fadeCol3 = -0x78; + int iVar2 = y; + do { + iVar1 = iVar2 + 3; + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x, iVar2, x, iVar1, 32 - local_c / 20); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(left, iVar2, left, iVar1, local_54 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 2, iVar2, x + 2, iVar1, local_50 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 3, iVar2, x + 3, iVar1, fadeCol3 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 4, iVar2, x + 4, iVar1, local_4c / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 5, iVar2, x + 5, iVar1, local_48 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 6, iVar2, x + 6, iVar1, local_44 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 7, iVar2, x + 7, iVar1, local_40 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 8, iVar2, x + 8, iVar1, local_3c / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 9, iVar2, x + 9, iVar1, local_38 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 10, iVar2, x + 10, iVar1, local_34 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 11, iVar2, x + 11, iVar1, local_30 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 12, iVar2, x + 12, iVar1, local_2c / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 13, iVar2, x + 13, iVar1, local_28 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 14, iVar2, x + 14, iVar1, local_24 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 0xf, iVar2, x + 0xf, iVar1, local_20 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 16, iVar2, x + 16, iVar1, local_1c / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 17, iVar2, x + 17, iVar1, local_18 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 18, iVar2, x + 18, iVar1, local_14 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 19, iVar2, x + 19, iVar1, local_10 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 20, iVar2, right, iVar1, local_58 + 2); + local_50 += 3; + fadeCol3 += 4; + local_4c += 5; + local_48 += 6; + local_44 += 7; + local_40 += 8; + local_3c += 9; + local_38 += 10; + local_34 += 11; + local_30 += 12; + local_2c += 13; + local_28 += 14; + local_24 += 0xf; + local_20 += 16; + local_1c += 17; + local_18 += 18; + local_14 += 19; + local_10 += 20; + ++local_58; + --local_c; + local_54 += 2; + iVar2 += 4; + } while (local_54 < 0); + local_58 = 0; + local_50 = -600; + local_4c = -570; + local_48 = -540; + local_44 = -0x1fe; + local_40 = -0x1e0; + local_3c = -450; + local_38 = -420; + local_34 = -390; + local_30 = -360; + local_2c = -330; + local_28 = -300; + local_24 = -270; + local_20 = -0xf0; + local_1c = -210; + local_18 = -180; + local_14 = -150; + local_54 = -0x78; + local_10 = -90; + local_c = -0x3c; + int local_8 = 0x1e; + iVar2 = y + height; + do { + iVar1 = iVar2 + 3; + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x, iVar2, x, iVar1, 32 - local_8 / 20); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(left, iVar2, left, iVar1, local_c / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 2, iVar2, x + 2, iVar1, local_10 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 3, iVar2, x + 3, iVar1, local_54 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 4, iVar2, x + 4, iVar1, local_14 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 5, iVar2, x + 5, iVar1, local_18 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 6, iVar2, x + 6, iVar1, local_1c / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 7, iVar2, x + 7, iVar1, local_20 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 8, iVar2, x + 8, iVar1, local_24 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 9, iVar2, x + 9, iVar1, local_28 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 10, iVar2, x + 10, iVar1, local_2c / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 11, iVar2, x + 11, iVar1, local_30 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 12, iVar2, x + 12, iVar1, local_34 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 13, iVar2, x + 13, iVar1, local_38 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 14, iVar2, x + 14, iVar1, local_3c / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 0xf, iVar2, x + 0xf, iVar1, local_40 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 16, iVar2, x + 16, iVar1, local_44 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 17, iVar2, x + 17, iVar1, local_48 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 18, iVar2, x + 18, iVar1, local_4c / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 19, iVar2, x + 19, iVar1, local_50 / 20 + 32); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBlendedBlackBox, + DAT_PencilRenderCore::ptr)(x + 20, iVar2, right, iVar1, local_58 + 2); + local_10 += 3; + local_14 += 5; + local_18 += 6; + local_1c += 7; + local_20 += 8; + local_24 += 9; + local_28 += 10; + local_2c += 11; + local_30 += 12; + local_34 += 13; + local_38 += 14; + local_3c += 0xf; + local_40 += 16; + local_44 += 17; + local_48 += 18; + local_4c += 19; + local_50 += 20; + local_54 += 4; + ++local_58; + --local_8; + local_c += 2; + iVar2 -= 4; + } while (local_c < 0); + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuModals/FindingNetworkSessions/MenuModalRenderFunction_FindingNetworkSessions.cpp b/src/OpenSHC/UI/MenuModals/FindingNetworkSessions/MenuModalRenderFunction_FindingNetworkSessions.cpp new file mode 100644 index 0000000000..8b4945263b --- /dev/null +++ b/src/OpenSHC/UI/MenuModals/FindingNetworkSessions/MenuModalRenderFunction_FindingNetworkSessions.cpp @@ -0,0 +1,63 @@ +#include "../FindingNetworkSessions.func.hpp" + +#include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/UI/Rendering/TextureRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eGM.hpp" +#include "OpenSHC/Rendering/Enums/RenderTarget.hpp" + +#include "OpenSHC/Globals/COL_VERY_SOFT_YELLOW.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" +#include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" +#include "OpenSHC/Globals/DAT_ProtocolDefinedData.hpp" +#include "OpenSHC/Globals/DAT_TextureRenderCoreObject.hpp" +#include "OpenSHC/Globals/UI_NetworkSessionsShadeLogic.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuModals { + + // FUNCTION: STRONGHOLDCRUSADER 0x0047D190 + void FindingNetworkSessions::MenuModalRenderFunction_FindingNetworkSessions(int x, int y, int width, int height) + { + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_SCREEN_MENU; + // "Finding Sessions" + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawHeaderTextBanner, + DAT_PencilRenderCore::ptr)(76, 11, x, y, width, height); + int const top = y + 85; + int const bottom = y + 285; + int const right = x + 460; + // The session list: a dimmed box with a frame, a header row and a scrollbar column + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::dimBox, DAT_PencilRenderCore::ptr)( + x + 40, top, right - 20, bottom); + int const outerRight = right + 1; + int const outerLeft = x + 39; + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawLine, DAT_PencilRenderCore::ptr)( + outerLeft, top - 1, outerRight, top - 1, COL_VERY_SOFT_YELLOW::instance.shortValue); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawLine, DAT_PencilRenderCore::ptr)( + outerLeft, bottom + 1, outerRight, bottom + 1, COL_VERY_SOFT_YELLOW::instance.shortValue); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawLine, DAT_PencilRenderCore::ptr)( + right - 20, top + 20, outerRight, top + 20, COL_VERY_SOFT_YELLOW::instance.shortValue); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawLine, DAT_PencilRenderCore::ptr)( + outerLeft, top, outerLeft, bottom, COL_VERY_SOFT_YELLOW::instance.shortValue); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawLine, DAT_PencilRenderCore::ptr)( + outerRight, top, outerRight, bottom, COL_VERY_SOFT_YELLOW::instance.shortValue); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawLine, DAT_PencilRenderCore::ptr)( + right - 20, top, right - 20, bottom, COL_VERY_SOFT_YELLOW::instance.shortValue); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawLine, DAT_PencilRenderCore::ptr)( + right - 19, bottom - 20, right, bottom - 20, COL_VERY_SOFT_YELLOW::instance.shortValue); + // The searching animation, a frame every second call + int const shadeTick = UI_NetworkSessionsShadeLogic::instance + 1; + UI_NetworkSessionsShadeLogic::instance = shadeTick; + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGM, + DAT_TextureRenderCoreObject::ptr)(OpenSHC::DE::SHCDE::GM_INTERFACE_ICONS2, + DAT_ProtocolDefinedData::instance.field_0x474[shadeTick / 2 % 32] + 398, width / 2 - 14 + x, y + 312); + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_MAP_GAME; + if (DAT_GameSynchronyState::instance.scrollBarIndex == -1 + && DAT_GameSynchronyState::instance.DPLAY_SessionsCount != 0) { + DAT_GameSynchronyState::instance.scrollBarIndex = 0; + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuModals/ProgressBarBox/MenuModalRenderFunction_ProgressBarBox.cpp b/src/OpenSHC/UI/MenuModals/ProgressBarBox/MenuModalRenderFunction_ProgressBarBox.cpp new file mode 100644 index 0000000000..f83f19281e --- /dev/null +++ b/src/OpenSHC/UI/MenuModals/ProgressBarBox/MenuModalRenderFunction_ProgressBarBox.cpp @@ -0,0 +1,66 @@ +#include "../ProgressBarBox.func.hpp" + +#include "OpenSHC/Text/TextManager.func.hpp" +#include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" +#include "OpenSHC/Game/GameMode.hpp" +#include "OpenSHC/Rendering/Colors/ColorsEnum.hpp" +#include "OpenSHC/Text/GameLanguage.hpp" +#include "OpenSHC/Text/TextAlignment.hpp" +#include "OpenSHC/WindowsHelper/Enums/BOOLEnum.hpp" + +#include "OpenSHC/Globals/COL_VERY_SOFT_YELLOW.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" +#include "OpenSHC/Globals/DAT_MenuTextInputState.hpp" +#include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" +#include "OpenSHC/Globals/DAT_TextManagerObject.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuModals { + + // FUNCTION: STRONGHOLDCRUSADER 0x00493560 + void ProgressBarBox::MenuModalRenderFunction_ProgressBarBox(int x, int y, int width, int height) + { + if (DAT_TextManagerObject::instance.gameLanguage == OpenSHC::Text::GL_ENGLISH + || DAT_TextManagerObject::instance.gameLanguage == OpenSHC::Text::GL_AMERICAN) { + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderTextToScreen, DAT_TextManagerObject::ptr)( + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::getTextStringInGroupAtOffset, + DAT_TextManagerObject::ptr)(OpenSHC::DE::SHCDE::TEXT_GAME_OPTIONS, + (int)(DAT_MenuTextInputState::instance.DAT_MenuOptionsActionParameter)), + width / 2 + x, y + 25, OpenSHC::Text::TTA_CENTER, OpenSHC::Rendering::Colors::COL_C2F0EB, 16, FALSE, + 0); + } else { + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderTextToScreen, DAT_TextManagerObject::ptr)( + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::getTextStringInGroupAtOffset, + DAT_TextManagerObject::ptr)(OpenSHC::DE::SHCDE::TEXT_GAME_OPTIONS, + (int)(DAT_MenuTextInputState::instance.DAT_MenuOptionsActionParameter)), + width / 2 + x, y + 25, OpenSHC::Text::TTA_CENTER, OpenSHC::Rendering::Colors::COL_C2F0EB, 18, FALSE, + 0); + } + if (DAT_GameSynchronyState::instance.currentGameMode != OpenSHC::Game::GM_SOLITARY + && DAT_GameSynchronyState::instance.currentGameMode != OpenSHC::Game::GM_SKIRMISH_SINGLE_PLAYER + && DAT_GameSynchronyState::instance.saveRelated != 0) { + int barInset = (width - 300) / 2; + int barY = y + 65; + int barBottom = y + 80; + height = barInset + x; + MACRO_CALL_MEMBER( + OpenSHC::UI::Rendering::PencilRenderCore_Func::drawColorBox, DAT_PencilRenderCore::ptr)(height, + barY, (x - barInset) + width, barBottom, (ushort)(COL_VERY_SOFT_YELLOW::instance.shortValue)); + DAT_MenuTextInputState::instance.progressBarY = barY; + DAT_MenuTextInputState::instance.progressBarX = height; + } else { + int barInset = (width - 300) / 2; + int barY = y + 65; + int barBottom = y + 80; + height = barInset + x; + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::dimBox, DAT_PencilRenderCore::ptr)( + height, barY, (x - barInset) + width, barBottom); + DAT_MenuTextInputState::instance.progressBarY = barY; + DAT_MenuTextInputState::instance.progressBarX = height; + } + } + } +} +} diff --git a/src/OpenSHC/UI/MenuModals/Roundtable/MenuModalRenderFunction_Roundtable.cpp b/src/OpenSHC/UI/MenuModals/Roundtable/MenuModalRenderFunction_Roundtable.cpp new file mode 100644 index 0000000000..45dd14b449 --- /dev/null +++ b/src/OpenSHC/UI/MenuModals/Roundtable/MenuModalRenderFunction_Roundtable.cpp @@ -0,0 +1,83 @@ +#include "../Roundtable.func.hpp" + +#include "OpenSHC/UI/BottomLeftTextDisplayState.func.hpp" +#include "OpenSHC/UI/MenuModalComposition.func.hpp" +#include "OpenSHC/UI/Rendering/TextureRenderCore.func.hpp" +#include "OpenSHC/UI/Enums/MenuModalType.hpp" +#include "OpenSHC/WindowsHelper/Enums/BOOLEnum.hpp" + +#include "OpenSHC/Globals/DAT_00df4288.hpp" +#include "OpenSHC/Globals/DAT_BottomLeftTextDisplayState.hpp" +#include "OpenSHC/Globals/DAT_ButtonH.hpp" +#include "OpenSHC/Globals/DAT_ButtonW.hpp" +#include "OpenSHC/Globals/DAT_ButtonX.hpp" +#include "OpenSHC/Globals/DAT_ButtonY.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" +#include "OpenSHC/Globals/DAT_MenuModalComposition1.hpp" +#include "OpenSHC/Globals/DAT_MouseState.hpp" +#include "OpenSHC/Globals/DAT_TextureRenderCoreObject.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuModals { + + // FUNCTION: STRONGHOLDCRUSADER 0x004B1AC0 + void Roundtable::MenuModalRenderFunction_Roundtable(int x, int y, int width, int height) + { + if (DAT_MouseState::instance.rightClickStart != 0) { + MACRO_CALL_MEMBER(OpenSHC::UI::MenuModalComposition_Func::activateModalDialog, + DAT_MenuModalComposition1::ptr)(OpenSHC::UI::Enums::MMT_NONE, FALSE); + } + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderLoadedGfx, + DAT_TextureRenderCoreObject::ptr)(2, x + 8, y + 8); + // Each seat's shield position at the table, clockwise from the top left + int seatPositions[8][2] = { + { 12, 12 }, + { 216, 12 }, + { 398, 12 }, + { 397, 103 }, + { 398, 193 }, + { 216, 192 }, + { 12, 193 }, + { 12, 103 }, + }; + // Players sit in their groups' order; each new group switches between the plain and the tinted shields + int tint = 1; + int group = 0; + for (int seat = 1; seat < countof(DAT_GameSynchronyState::instance.DAT_RoundTableOrderArray); ++seat) { + int const player = DAT_GameSynchronyState::instance.DAT_RoundTableOrderArray[seat]; + if (player < 1 || DAT_GameSynchronyState::instance.DAT_PlayerGroupArray[player] < 1) { + break; + } + if (DAT_GameSynchronyState::instance.DAT_PlayerGroupArray[player] > group) { + ++group; + ++tint; + if (tint > 1) { + tint = 0; + } + } + if (tint == 0) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGfxTgxWithBlending, + DAT_TextureRenderCoreObject::ptr)( + seat + 2, seatPositions[seat - 1][0] + group, seatPositions[seat - 1][1] + y, 16); + } else { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGfxTgxWithBlending, + DAT_TextureRenderCoreObject::ptr)( + seat + 2 + tint * 8, seatPositions[seat - 1][0] + group, seatPositions[seat - 1][1] + y, 20); + } + } + DAT_ButtonY::instance = y + 380; + DAT_ButtonX::instance = x + 24; + DAT_ButtonW::instance = 380; + DAT_ButtonH::instance = 40; + if (DAT_00df4288::instance != 0) { + MACRO_CALL_MEMBER( + OpenSHC::UI::BottomLeftTextDisplayState_Func::renderCurrentlyDisplayedTextConstructionCost, + DAT_BottomLeftTextDisplayState::ptr)(0); + DAT_00df4288::instance = 0; + } + } + + } +} +} diff --git a/src/OpenSHC/UI/Rendering/PencilRenderCore/drawTableCellBackground.cpp b/src/OpenSHC/UI/Rendering/PencilRenderCore/drawTableCellBackground.cpp new file mode 100644 index 0000000000..de6c9462ed --- /dev/null +++ b/src/OpenSHC/UI/Rendering/PencilRenderCore/drawTableCellBackground.cpp @@ -0,0 +1,89 @@ +#include "../PencilRenderCore.func.hpp" + +#include "OpenSHC/UI/Rendering/TextureRenderCore.func.hpp" +#include "OpenSHC/IO/Graphics/GmID.hpp" +#include "OpenSHC/WindowsHelper/Enums/BOOLEnum.hpp" + +#include "OpenSHC/Globals/DAT_ButtonCurrentlyInteracting.hpp" +#include "OpenSHC/Globals/DAT_ButtonW.hpp" +#include "OpenSHC/Globals/DAT_ButtonX.hpp" +#include "OpenSHC/Globals/DAT_ButtonY.hpp" +#include "OpenSHC/Globals/DAT_TextureRenderCoreObject.hpp" + +namespace OpenSHC { +namespace UI { + namespace Rendering { + + using OpenSHC::WindowsHelper::Enums::BOOLEnum; + + // Pictures in GID_INTERFACE_ICONS_3, 20 pixels wide: a highlighted cell's ends and middles (the right end + // uses the middle's mask), or a run of stripe 69 or 71 by the row; each picture is followed by its mask. + enum { + TABLE_CELL_LEFT_PICTURE = 73, + TABLE_CELL_MIDDLE_PICTURE = 74, + TABLE_CELL_RIGHT_PICTURE = 75, + TABLE_CELL_LEFT_MASK = 76, + TABLE_CELL_MIDDLE_MASK = 77, + TABLE_CELL_STRIPE_PICTURES = 69, + TABLE_CELL_PIECE_WIDTH = 20 + }; + + // FUNCTION: STRONGHOLDCRUSADER 0x004692E0 + void PencilRenderCore::drawTableCellBackground(BOOLEnum isSelected, int indexToGetStripes, int blendStrength) + { + int x = DAT_ButtonX::instance; + int const stripePicture = (indexToGetStripes & 1) * 2 | TABLE_CELL_STRIPE_PICTURES; + if (isSelected) { + if (DAT_ButtonW::instance > TABLE_CELL_PIECE_WIDTH) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGMWithAlphaMask, + DAT_TextureRenderCoreObject::ptr)(OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_3, + TABLE_CELL_LEFT_PICTURE, x, DAT_ButtonY::instance, OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_3, + TABLE_CELL_LEFT_MASK, blendStrength); + x += TABLE_CELL_PIECE_WIDTH; + } else { + ++DAT_ButtonW::instance; + } + for (; x < DAT_ButtonW::instance + DAT_ButtonX::instance - TABLE_CELL_PIECE_WIDTH; + x += TABLE_CELL_PIECE_WIDTH) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGMWithAlphaMask, + DAT_TextureRenderCoreObject::ptr)(OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_3, + TABLE_CELL_MIDDLE_PICTURE, x, DAT_ButtonY::instance, + OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_3, TABLE_CELL_MIDDLE_MASK, blendStrength); + } + } else if (DAT_ButtonCurrentlyInteracting::instance) { + if (DAT_ButtonW::instance > TABLE_CELL_PIECE_WIDTH) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGMWithAlphaMask, + DAT_TextureRenderCoreObject::ptr)(OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_3, + TABLE_CELL_LEFT_PICTURE, x, DAT_ButtonY::instance, OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_3, + TABLE_CELL_LEFT_MASK, blendStrength); + x += TABLE_CELL_PIECE_WIDTH; + } else { + ++DAT_ButtonW::instance; + } + for (; x < DAT_ButtonW::instance + DAT_ButtonX::instance - TABLE_CELL_PIECE_WIDTH; + x += TABLE_CELL_PIECE_WIDTH) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGMWithAlphaMask, + DAT_TextureRenderCoreObject::ptr)(OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_3, + TABLE_CELL_MIDDLE_PICTURE, x, DAT_ButtonY::instance, + OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_3, TABLE_CELL_MIDDLE_MASK, blendStrength); + } + } else { + for (; x < DAT_ButtonW::instance + DAT_ButtonX::instance; x += TABLE_CELL_PIECE_WIDTH) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGMWithAlphaMask, + DAT_TextureRenderCoreObject::ptr)(OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_3, stripePicture, + x, DAT_ButtonY::instance, OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_3, stripePicture + 1, + blendStrength); + } + return; + } + if (DAT_ButtonW::instance > TABLE_CELL_PIECE_WIDTH + 1) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGMWithAlphaMask, + DAT_TextureRenderCoreObject::ptr)(OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_3, + TABLE_CELL_RIGHT_PICTURE, x, DAT_ButtonY::instance, OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_3, + TABLE_CELL_MIDDLE_MASK, blendStrength); + } + } + + } +} +} diff --git a/status/addresses-SHC-3BB0A8C1.txt b/status/addresses-SHC-3BB0A8C1.txt index 6e036f9340..3794ff977a 100644 --- a/status/addresses-SHC-3BB0A8C1.txt +++ b/status/addresses-SHC-3BB0A8C1.txt @@ -20117,7 +20117,7 @@ SHC_3BB0A8C1_0x004690E0 | 0.0% | Pending SHC_3BB0A8C1_0x00469290 | 0.0% | Pending -SHC_3BB0A8C1_0x004692E0 | 0.0% | Pending +SHC_3BB0A8C1_0x004692E0 | 89.7% | Asm differs: the stripe index is read as a dword where the original sign-extends its low byte, and the second branch keeps other registers SHC_3BB0A8C1_0x004694A0 | 0.0% | Pending @@ -22253,7 +22253,7 @@ SHC_3BB0A8C1_0x0047C5D0 | 0.0% | Pending SHC_3BB0A8C1_0x0047C670 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x0047C860 | 0.0% | Pending +SHC_3BB0A8C1_0x0047C860 | 65.3% | Asm differs SHC_3BB0A8C1_0x0047CA80 | 0.0% | Pending @@ -22311,7 +22311,7 @@ SHC_3BB0A8C1_0x0047D0E0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0047D100 | 0.0% | Pending -SHC_3BB0A8C1_0x0047D190 | 0.0% | Pending +SHC_3BB0A8C1_0x0047D190 | 66.9% | Register mismatch: the original keeps the right column in ebp and reloads x SHC_3BB0A8C1_0x0047D330 | 100.0% | Reimplemented @@ -23623,7 +23623,7 @@ SHC_3BB0A8C1_0x004934E5 | 0.0% | Pending SHC_3BB0A8C1_0x004934F0 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x00493560 | 0.0% | Pending +SHC_3BB0A8C1_0x00493560 | 96.3% | Only the spill slot of the bar's x differs (the original uses y's home) SHC_3BB0A8C1_0x00493690 | 0.0% | Pending @@ -25537,7 +25537,7 @@ SHC_3BB0A8C1_0x004AAB20 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004AAB40 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x004AAB50 | 0.0% | Pending +SHC_3BB0A8C1_0x004AAB50 | 41.0% | Asm differs SHC_3BB0A8C1_0x004AB440 | 100.0% | Reimplemented @@ -25921,7 +25921,7 @@ SHC_3BB0A8C1_0x004AF820 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004AF840 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x004AF860 | 0.0% | Pending +SHC_3BB0A8C1_0x004AF860 | 78.7% | Register mismatch: durationSum stays in a register where the original keeps elementState SHC_3BB0A8C1_0x004AFA50 | 100.0% | Reimplemented @@ -25929,13 +25929,13 @@ SHC_3BB0A8C1_0x004AFA80 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004AFB00 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x004AFB30 | 0.0% | Pending +SHC_3BB0A8C1_0x004AFB30 | 82.0% | Asm differs SHC_3BB0A8C1_0x004AFDA0 | 0.0% | Pending SHC_3BB0A8C1_0x004AFE10 | 0.0% | Pending -SHC_3BB0A8C1_0x004B0390 | 0.0% | Pending +SHC_3BB0A8C1_0x004B0390 | 62.0% | Asm differs SHC_3BB0A8C1_0x004B07C0 | 0.0% | Pending @@ -25989,7 +25989,7 @@ SHC_3BB0A8C1_0x004B1990 | 0.0% | Pending SHC_3BB0A8C1_0x004B19E0 | 0.0% | Pending -SHC_3BB0A8C1_0x004B1AC0 | 0.0% | Pending +SHC_3BB0A8C1_0x004B1AC0 | 76.1% | Register mismatch: the original keeps y in ebp and the group counter in y's home SHC_3BB0A8C1_0x004B1C30 | 0.0% | Pending