diff --git a/src/OpenSHC/UI/DisplayElements/RenderDebugNumbersDisplayElement.cpp b/src/OpenSHC/UI/DisplayElements/RenderDebugNumbersDisplayElement.cpp new file mode 100644 index 0000000000..26d02e6aac --- /dev/null +++ b/src/OpenSHC/UI/DisplayElements/RenderDebugNumbersDisplayElement.cpp @@ -0,0 +1,92 @@ +#include "../DisplayElements.func.hpp" + +#include "OpenSHC/Text/TextManager.func.hpp" +#include "OpenSHC/Rendering/Colors/ColorsEnum.hpp" +#include "OpenSHC/Text/TextAlignment.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) + { + // Declared first, ahead of the two buffer writes (declared at the wrap test, the sums take other registers). + int durationSum = 0; + int tickRateSum = 0; + dword const lastGameTickRate = DAT_GameCore::instance.gameTicksThisLoop; + dword const lastGameLoopDuration = DAT_GameLoopStopwatch::instance.duration_0x0; + DAT_GameLoopDurationBuffer::instance[INT_GameLoopTimeDataIndex::instance] = lastGameLoopDuration; + DAT_TickRateBuffer::instance[INT_GameLoopTimeDataIndex::instance] = lastGameTickRate; + ++INT_GameLoopTimeDataIndex::instance; + if (INT_GameLoopTimeDataIndex::instance == 100) { + INT_GameLoopTimeDataIndex::instance = 0; + } + for (int i = 0; i < countof(DAT_GameLoopDurationBuffer::instance); ++i) { + durationSum += DAT_GameLoopDurationBuffer::instance[i]; + tickRateSum += DAT_TickRateBuffer::instance[i]; + } + int averageDuration = durationSum / 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); + } + // The maximum is never used, but the original computes it. A pointer walk five entries at a time, as in the + // original (a plain loop over the entries loses the match) + int maxDuration = -1; + for (int* entry = DAT_GameLoopDurationBuffer::instance; entry < DAT_GameLoopDurationBuffer::instance + 100; + entry += 5) { + if (entry[0] > maxDuration) { + maxDuration = entry[0]; + } + if (entry[1] > maxDuration) { + maxDuration = entry[1]; + } + if (entry[2] > maxDuration) { + maxDuration = entry[2]; + } + if (entry[3] > maxDuration) { + maxDuration = entry[3]; + } + if (entry[4] > maxDuration) { + maxDuration = entry[4]; + } + } + if ((int)elementState != -1000) { + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderNumber2, DAT_TextManagerObject::ptr)( + averageDuration, posX + 48, posY, OpenSHC::Text::TTA_LEFT, OpenSHC::Rendering::Colors::COL_0080FF, 0, + 17, FALSE, 0); + } + if (averageDuration == 0) { + averageDuration = 1; + } + if ((int)elementState != -1000) { + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderNumber2, DAT_TextManagerObject::ptr)( + 1000 / averageDuration, posX + 48, posY + 20, OpenSHC::Text::TTA_LEFT, + OpenSHC::Rendering::Colors::COL_0080FF, 0, 17, FALSE, 0); + } + DAT_CurrentFramerate::instance = 1000 / averageDuration; + if (tickRateSum == 0) { + tickRateSum = 1; + } + int durationPerTick = durationSum / tickRateSum; + if (durationPerTick == 0) { + durationPerTick = 1; + } + if ((int)elementState != -1000) { + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderNumber2, DAT_TextManagerObject::ptr)( + 1000 / durationPerTick, posX + 48, posY + 40, OpenSHC::Text::TTA_LEFT, + OpenSHC::Rendering::Colors::COL_0080FF, 0, 17, FALSE, 0); + } + } + +} +} 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/Rendering/PencilRenderCore/drawTableCellBackground.cpp b/src/OpenSHC/UI/Rendering/PencilRenderCore/drawTableCellBackground.cpp new file mode 100644 index 0000000000..649fc21c95 --- /dev/null +++ b/src/OpenSHC/UI/Rendering/PencilRenderCore/drawTableCellBackground.cpp @@ -0,0 +1,96 @@ +#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. + int const TABLE_CELL_LEFT_PICTURE = 73; + int const TABLE_CELL_MIDDLE_PICTURE = 74; + int const TABLE_CELL_RIGHT_PICTURE = 75; + int const TABLE_CELL_LEFT_MASK = 76; + int const TABLE_CELL_MIDDLE_MASK = 77; + int const TABLE_CELL_STRIPE_PICTURES = 69; + int const 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); + } + // the right piece is written in this arm and once more behind the other one (written once behind both, + // the second arm's three scratch registers come out rotated) + 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); + } + return; + } 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..e649d78ec3 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 | 95.2% | One instruction: the original reads the stripe index as a sign-extended byte (movsx edi, byte ptr [esp + 0x10]) SHC_3BB0A8C1_0x004694A0 | 0.0% | Pending @@ -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 | 80.6% | the sum loop's registers: the original adds into esi with the sums in ecx and edx, so the duration stays in edi (ours: edi, edx and esi, ecx); the maximum's loop counts down in edi SHC_3BB0A8C1_0x004AFA50 | 100.0% | Reimplemented @@ -25935,7 +25935,7 @@ 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