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/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..bbb72a1557 --- /dev/null +++ b/src/OpenSHC/UI/Rendering/PencilRenderCore/drawTableCellBackground.cpp @@ -0,0 +1,98 @@ +#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); + } + // 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..1ec40f00e9 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 | 78.7% | Register mismatch: durationSum stays in a register where the original keeps elementState 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