diff --git a/src/OpenSHC/UI/MenuItems/HistoricCampaignSelect/MenuItemActionHandler_HistoricCampaignSelect_Main.cpp b/src/OpenSHC/UI/MenuItems/HistoricCampaignSelect/MenuItemActionHandler_HistoricCampaignSelect_Main.cpp new file mode 100644 index 0000000000..1b9f332126 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/HistoricCampaignSelect/MenuItemActionHandler_HistoricCampaignSelect_Main.cpp @@ -0,0 +1,74 @@ +#include "../HistoricCampaignSelect.func.hpp" + +#include "OpenSHC/Game/GameCore.func.hpp" +#include "OpenSHC/UI/Enums/MenuViewType.hpp" + +#include "OpenSHC/Globals/DAT_BlendingDefinedData.hpp" +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_GameState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x00425720 + void HistoricCampaignSelect::MenuItemActionHandler_HistoricCampaignSelect_Main(int button, ...) + { + switch (button) { + case 1: + DAT_GameState::instance.mapAndTime.difficulty = DAT_GameCore::instance.missionDifficulty; + DAT_GameCore::instance.gameSuspended = 0; + DAT_GameCore::instance.missionNumber1to20 = 1; + DAT_GameCore::instance.historicCampaignNumber = 1; + MACRO_CALL_MEMBER(Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + UI::Enums::MVT_HISTORIC_MISSION_SELECT, 0); + for (int i = 0; i < countof(DAT_BlendingDefinedData::instance.PlayerSlotUnitColor); ++i) { + DAT_BlendingDefinedData::instance.PlayerSlotUnitColor[i] + = DAT_BlendingDefinedData::instance.DefaultPlayerSlotUnitColor[i]; + } + return; + case 2: + DAT_GameState::instance.mapAndTime.difficulty = DAT_GameCore::instance.missionDifficulty; + DAT_GameCore::instance.gameSuspended = 0; + DAT_GameCore::instance.missionNumber1to20 = 6; + DAT_GameCore::instance.historicCampaignNumber = 2; + MACRO_CALL_MEMBER(Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + UI::Enums::MVT_HISTORIC_MISSION_SELECT, 0); + for (int i = 0; i < countof(DAT_BlendingDefinedData::instance.PlayerSlotUnitColor); ++i) { + DAT_BlendingDefinedData::instance.PlayerSlotUnitColor[i] + = DAT_BlendingDefinedData::instance.DefaultPlayerSlotUnitColor[i]; + } + return; + case 3: + DAT_GameCore::instance.gameSuspended = 0; + DAT_GameState::instance.mapAndTime.difficulty = DAT_GameCore::instance.missionDifficulty; + DAT_GameCore::instance.missionNumber1to20 = 11; + DAT_GameCore::instance.historicCampaignNumber = 3; + MACRO_CALL_MEMBER(Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + UI::Enums::MVT_HISTORIC_MISSION_SELECT, 0); + for (int i = 0; i < countof(DAT_BlendingDefinedData::instance.PlayerSlotUnitColor); ++i) { + DAT_BlendingDefinedData::instance.PlayerSlotUnitColor[i] + = DAT_BlendingDefinedData::instance.DefaultPlayerSlotUnitColor[i]; + } + return; + case 4: + DAT_GameCore::instance.gameSuspended = 0; + DAT_GameState::instance.mapAndTime.difficulty = DAT_GameCore::instance.missionDifficulty; + DAT_GameCore::instance.missionNumber1to20 = 16; + DAT_GameCore::instance.historicCampaignNumber = 4; + MACRO_CALL_MEMBER(Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + UI::Enums::MVT_HISTORIC_MISSION_SELECT, 0); + for (int i = 0; i < countof(DAT_BlendingDefinedData::instance.PlayerSlotUnitColor); ++i) { + DAT_BlendingDefinedData::instance.PlayerSlotUnitColor[i] + = DAT_BlendingDefinedData::instance.DefaultPlayerSlotUnitColor[i]; + } + return; + case 5: + MACRO_CALL_MEMBER(Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + UI::Enums::MVT_MAIN_MENU, 0); + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/HistoricMissionSelect/MenuItemActionHandler_HistoricMissionSelect_General.cpp b/src/OpenSHC/UI/MenuItems/HistoricMissionSelect/MenuItemActionHandler_HistoricMissionSelect_General.cpp new file mode 100644 index 0000000000..34b34f7a2c --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/HistoricMissionSelect/MenuItemActionHandler_HistoricMissionSelect_General.cpp @@ -0,0 +1,65 @@ +#include "../HistoricMissionSelect.func.hpp" + +#include "OpenSHC/Game/GameCore.func.hpp" +#include "OpenSHC/Game/GameMode2.hpp" +#include "OpenSHC/UI/Enums/MenuModalType.hpp" +#include "OpenSHC/UI/Enums/MenuViewType.hpp" + +#include "OpenSHC/Globals/BOOL_CurrentMenuClickState.hpp" +#include "OpenSHC/Globals/DAT_00b96100.hpp" +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_GameState.hpp" +#include "OpenSHC/Globals/DAT_MenuModalComposition1.hpp" +#include "OpenSHC/Globals/DAT_MenuTextInputState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x00426B80 + void HistoricMissionSelect::MenuItemActionHandler_HistoricMissionSelect_General(int button, ...) + { + if (DAT_MenuTextInputState::instance.currentModalDialog == OpenSHC::UI::Enums::MMT_NO_MENU + && DAT_MenuModalComposition1::instance.activeModalDialogID == OpenSHC::UI::Enums::MMT_NONE) { + // a sparse switch; the original lays its arms out default, 20, 18, 13 + switch (button) { + default: { + BOOL_CurrentMenuClickState::instance = FALSE; + DAT_GameCore::instance.missionNumber1to20 = DAT_00b96100::instance - button - 1; + DWORD const clickTime = timeGetTime(); + if (DAT_GameCore::instance.missionNumber1to20 + != DAT_MenuTextInputState::instance.lastClickedListIndex + || (int)(clickTime - DAT_MenuTextInputState::instance.lastListClickTime) >= 500) { + DAT_MenuTextInputState::instance.lastClickedListIndex + = DAT_GameCore::instance.missionNumber1to20; + DAT_MenuTextInputState::instance.lastListClickTime = clickTime; + return; + } + // the original shares this tail with case 13; writing it out twice adds 9 instructions + goto startMission; + } + case 20: + ++DAT_GameState::instance.mapAndTime.difficulty; + // >= 4, not > 3 (> 3: quick_diff 0.9111 -> 0.8667) + if (DAT_GameState::instance.mapAndTime.difficulty >= 4) { + DAT_GameState::instance.mapAndTime.difficulty = 0; + } + return; + case 18: + MACRO_CALL_MEMBER(OpenSHC::Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + OpenSHC::UI::Enums::MVT_HISTORIC_CAMPAIGN_SELECT, 0); + return; + case 13: + startMission: + --DAT_GameCore::instance.missionNumber1to20; + DAT_GameCore::instance.gameMode_2 = OpenSHC::Game::GM_CAMPAIGN_MISSION; + DAT_GameCore::instance.field_0x74 = 1; + MACRO_CALL_MEMBER(OpenSHC::Game::GameCore_Func::incrementMissionProgress, DAT_GameCore::ptr)(); + return; + } + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/IdentityOptions/MenuItemActionHandler_IdentityOptions_Confirm.cpp b/src/OpenSHC/UI/MenuItems/IdentityOptions/MenuItemActionHandler_IdentityOptions_Confirm.cpp new file mode 100644 index 0000000000..d913992e7a --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/IdentityOptions/MenuItemActionHandler_IdentityOptions_Confirm.cpp @@ -0,0 +1,36 @@ +#include "../IdentityOptions.func.hpp" + +#include "OpenSHC/Synchrony/GameSynchronyState.func.hpp" +#include "OpenSHC/Text/UserTextHandler.func.hpp" +#include "OpenSHC/UI/MenuTextInputState.func.hpp" +#include "OpenSHC/Commands/GameCommandType.hpp" +#include "OpenSHC/Game/GameMode.hpp" +#include "OpenSHC/Text/TextArrayIndexType.hpp" + +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" +#include "OpenSHC/Globals/DAT_MenuTextInputState.hpp" +#include "OpenSHC/Globals/DAT_UserTextHandlerState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x00493D30 + void IdentityOptions::MenuItemActionHandler_IdentityOptions_Confirm(int button, ...) + { + if (button == 17) { + DAT_UserTextHandlerState::instance.allowUserTextInput = 0; + MACRO_CALL_MEMBER(Text::UserTextHandler_Func::resetToTextIndex, DAT_UserTextHandlerState::ptr)( + Text::TAIT_NINE__FILTER_B); + DAT_UserTextHandlerState::instance.allowUserTextInput = 1; + MACRO_CALL_MEMBER(UI::MenuTextInputState_Func::popModalDialog, DAT_MenuTextInputState::ptr)(); + if (DAT_GameSynchronyState::instance.currentGameMode != Game::GM_SOLITARY) { + MACRO_CALL_MEMBER(Synchrony::GameSynchronyState_Func::queueCommand, DAT_GameSynchronyState::ptr)( + Commands::GCT_UNKNOWN_96); + } + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/IdentityOptions/MenuItemActionHandler_IdentityOptions_LordIcons.cpp b/src/OpenSHC/UI/MenuItems/IdentityOptions/MenuItemActionHandler_IdentityOptions_LordIcons.cpp new file mode 100644 index 0000000000..ec3b4a06d4 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/IdentityOptions/MenuItemActionHandler_IdentityOptions_LordIcons.cpp @@ -0,0 +1,37 @@ +#include "../IdentityOptions.func.hpp" + +#include "OpenSHC/Globals/DAT_GameCore.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x00491CE0 + void IdentityOptions::MenuItemActionHandler_IdentityOptions_LordIcons(int button, ...) + { + if (button == 21) { + DAT_GameCore::instance.selectedLordTypeUnk = 0; + if (DAT_GameCore::instance.lordIconUnk < 20) { + DAT_GameCore::instance.lordIconUnk = 2; + } + } else if (button == 22) { + DAT_GameCore::instance.selectedLordTypeUnk = 1; + if (DAT_GameCore::instance.lordIconUnk < 20) { + DAT_GameCore::instance.lordIconUnk = 3; + } + } else if (button == 40) { + --DAT_GameCore::instance.lordIconUnk; + if (DAT_GameCore::instance.lordIconUnk < 2) { + DAT_GameCore::instance.lordIconUnk = 21; + } + } else if (button == 41) { + ++DAT_GameCore::instance.lordIconUnk; + if (DAT_GameCore::instance.lordIconUnk > 21) { + DAT_GameCore::instance.lordIconUnk = 2; + } + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/InGameMenu/MenuItemActionHandler_InGameMenu_MapEventIconUnk.cpp b/src/OpenSHC/UI/MenuItems/InGameMenu/MenuItemActionHandler_InGameMenu_MapEventIconUnk.cpp new file mode 100644 index 0000000000..59a43def4f --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/InGameMenu/MenuItemActionHandler_InGameMenu_MapEventIconUnk.cpp @@ -0,0 +1,31 @@ +#include "../InGameMenu.func.hpp" + +#include "OpenSHC/Rendering/ViewportRenderState.func.hpp" + +#include "OpenSHC/Globals/DAT_MinimapViewState.hpp" +#include "OpenSHC/Globals/DAT_ViewportRenderState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004B6530 + void InGameMenu::MenuItemActionHandler_InGameMenu_MapEventIconUnk(int unused, ...) + { + MACRO_CALL_MEMBER( + OpenSHC::Rendering::ViewportRenderState_Func::focusOnCoordinate, DAT_ViewportRenderState::ptr)( + DAT_MinimapViewState::instance.spawnMomentX[0], DAT_MinimapViewState::instance.spawnMomentY[0]); + for (int eventIndex = 1; eventIndex < DAT_MinimapViewState::instance.spawnMomentCount; ++eventIndex) { + DAT_MinimapViewState::instance.spawnMomentX[eventIndex - 1] + = DAT_MinimapViewState::instance.spawnMomentX[eventIndex]; + DAT_MinimapViewState::instance.spawnMomentY[eventIndex - 1] + = DAT_MinimapViewState::instance.spawnMomentY[eventIndex]; + DAT_MinimapViewState::instance.spawnMoment[eventIndex - 1] + = DAT_MinimapViewState::instance.spawnMoment[eventIndex]; + } + --DAT_MinimapViewState::instance.spawnMomentCount; + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/InGameMenu/MenuItemRenderFunction_InGameMenu_BikMessagePlayerShield.cpp b/src/OpenSHC/UI/MenuItems/InGameMenu/MenuItemRenderFunction_InGameMenu_BikMessagePlayerShield.cpp new file mode 100644 index 0000000000..51ae2b7268 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/InGameMenu/MenuItemRenderFunction_InGameMenu_BikMessagePlayerShield.cpp @@ -0,0 +1,34 @@ +#include "../InGameMenu.func.hpp" + +#include "OpenSHC/UI/Rendering/TextureRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eGM.hpp" +#include "OpenSHC/Rendering/Enums/RenderTarget.hpp" + +#include "OpenSHC/Globals/DAT_ButtonX.hpp" +#include "OpenSHC/Globals/DAT_ButtonY.hpp" +#include "OpenSHC/Globals/DAT_TextureRenderCoreObject.hpp" +#include "OpenSHC/Globals/DAT_VideoBikQueue.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004B65F0 + void InGameMenu::MenuItemRenderFunction_InGameMenu_BikMessagePlayerShield(int unused, ...) + { + if (DAT_VideoBikQueue::instance.mbr_0x928) { + dword shieldIndex = DAT_VideoBikQueue::instance.mbr_0x928; + if ((int)DAT_VideoBikQueue::instance.mbr_0x928 < 0) { + shieldIndex = -DAT_VideoBikQueue::instance.mbr_0x928; + } + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_SCREEN_MENU; + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGM, + DAT_TextureRenderCoreObject::ptr)(OpenSHC::DE::SHCDE::GM_INTERFACE_ICONS2, shieldIndex + 469, + DAT_ButtonX::instance, DAT_ButtonY::instance); + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_MAP_GAME; + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/InGameMenu/MenuItemRenderFunction_InGameMenu_KeepEnclosedSymbol.cpp b/src/OpenSHC/UI/MenuItems/InGameMenu/MenuItemRenderFunction_InGameMenu_KeepEnclosedSymbol.cpp new file mode 100644 index 0000000000..46f662bdaa --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/InGameMenu/MenuItemRenderFunction_InGameMenu_KeepEnclosedSymbol.cpp @@ -0,0 +1,39 @@ +#include "../InGameMenu.func.hpp" + +#include "OpenSHC/Game/GameStateStructures.func.hpp" +#include "OpenSHC/UI/MenuItems/General.func.hpp" +#include "OpenSHC/WindowsHelper/Enums/BOOLEnum.hpp" + +#include "OpenSHC/Globals/DAT_ButtonUnknownZero.hpp" +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_GameState.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" +#include "OpenSHC/Globals/DAT_MiniMapDefinedData.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + using OpenSHC::WindowsHelper::Enums::BOOLEnum; + + // FUNCTION: STRONGHOLDCRUSADER 0x004B65A0 + void InGameMenu::MenuItemRenderFunction_InGameMenu_KeepEnclosedSymbol(int unused, ...) + { + BOOLEnum const keepEnclosed = MACRO_CALL_MEMBER(OpenSHC::Game::GameStateStructures_Func::checkKeepEnclosed, + DAT_GameState::ptr)(DAT_GameSynchronyState::instance.currentPlayerSlotID); + if (keepEnclosed != DAT_MiniMapDefinedData::instance.cachedKeepEnclosed) { + DAT_GameCore::instance.countdown = 2; + } + DAT_MiniMapDefinedData::instance.cachedKeepEnclosed = keepEnclosed; + if (!keepEnclosed) { + DAT_ButtonUnknownZero::instance = TRUE; + return; + } + DAT_ButtonUnknownZero::instance = FALSE; + MACRO_CALL(OpenSHC::UI::MenuItems::General_Func:: + MenuItemRenderFunction_General_RenderCurrentButtonWithPossibleAlphaTexOnScreenMenuSurface)(); + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/LoadMap/MenuItemActionHandler_LoadMap_TableContent.cpp b/src/OpenSHC/UI/MenuItems/LoadMap/MenuItemActionHandler_LoadMap_TableContent.cpp new file mode 100644 index 0000000000..b771c9e46d --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/LoadMap/MenuItemActionHandler_LoadMap_TableContent.cpp @@ -0,0 +1,32 @@ +#include "../LoadMap.func.hpp" + +#include "OpenSHC/UI/MenuItems/SaveLoadMap.func.hpp" + +#include "OpenSHC/Globals/DAT_MenuTextInputState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004948C0 + void LoadMap::MenuItemActionHandler_LoadMap_TableContent(int row, ...) + { + DWORD const clickTime = timeGetTime(); + if (DAT_MenuTextInputState::instance.menuLoadGameRelativeSelectionOffset + row + < DAT_MenuTextInputState::instance.fileListEntryCount) { + DAT_MenuTextInputState::instance.menuLoadGameRelativeSelectionIndex = row; + if (DAT_MenuTextInputState::instance.menuLoadGameRelativeSelectionOffset + row + == DAT_MenuTextInputState::instance.lastClickedListIndex + && (int)(clickTime - DAT_MenuTextInputState::instance.lastListClickTime) < 500) { + MACRO_CALL(OpenSHC::UI::MenuItems::SaveLoadMap_Func::MenuItemActionHandler_SaveLoadMap_Buttons)(2); + } + DAT_MenuTextInputState::instance.lastClickedListIndex + = DAT_MenuTextInputState::instance.menuLoadGameRelativeSelectionIndex + + DAT_MenuTextInputState::instance.menuLoadGameRelativeSelectionOffset; + DAT_MenuTextInputState::instance.lastListClickTime = clickTime; + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/LobbyMenu/MenuItemActionHandler_LobbyMenu_MapDescScrollbar.cpp b/src/OpenSHC/UI/MenuItems/LobbyMenu/MenuItemActionHandler_LobbyMenu_MapDescScrollbar.cpp new file mode 100644 index 0000000000..7614ce4b83 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/LobbyMenu/MenuItemActionHandler_LobbyMenu_MapDescScrollbar.cpp @@ -0,0 +1,52 @@ +#include "../LobbyMenu.func.hpp" + +#include "OpenSHC/UI/Enums/MenuModalType.hpp" + +#include "OpenSHC/Globals/DAT_00b960dc.hpp" +#include "OpenSHC/Globals/DAT_00b960f4.hpp" +#include "OpenSHC/Globals/DAT_MenuModalComposition1.hpp" +#include "OpenSHC/Globals/INT_00b95b74.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x00428980 + void LobbyMenu::MenuItemActionHandler_LobbyMenu_MapDescScrollbar( + int descBoxIndexUnk, int scrollbarEvent, int* minValue, int* maxValue, int* currentValue) + { + if (DAT_00b960dc::instance + || DAT_MenuModalComposition1::instance.activeModalDialogID == UI::Enums::MMT_ROUNDTABLE + || DAT_MenuModalComposition1::instance.activeModalDialogID == UI::Enums::MMT_BASIC_AI_LORD_SELECT + || DAT_MenuModalComposition1::instance.activeModalDialogID == UI::Enums::MMT_EXTENDED_AI_LORD_SELECT) { + return; + } + int visibleHeight = 0; + if (descBoxIndexUnk == 0) { + visibleHeight = 204; + } else if (descBoxIndexUnk == 1) { + visibleHeight = 110; + } + switch (scrollbarEvent) { + case 1: + *minValue = -19; + *maxValue = INT_00b95b74::instance - visibleHeight; + *currentValue = 0; + return; + case 2: + case 3: + DAT_00b960f4::instance = *currentValue; + return; + case 4: + *minValue = -19; + *maxValue = INT_00b95b74::instance - visibleHeight; + *currentValue = DAT_00b960f4::instance; + return; + case 7: + *currentValue = visibleHeight - 14; + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/LobbyMenu/MenuItemActionHandler_LobbyMenu_MapSelectTable.cpp b/src/OpenSHC/UI/MenuItems/LobbyMenu/MenuItemActionHandler_LobbyMenu_MapSelectTable.cpp new file mode 100644 index 0000000000..9e8affbd60 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/LobbyMenu/MenuItemActionHandler_LobbyMenu_MapSelectTable.cpp @@ -0,0 +1,42 @@ +#include "../LobbyMenu.func.hpp" + +#include "OpenSHC/Synchrony/GameSynchronyState.func.hpp" +#include "OpenSHC/Commands/GameCommandType.hpp" +#include "OpenSHC/UI/Enums/MenuModalType.hpp" + +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" +#include "OpenSHC/Globals/DAT_MenuModalComposition1.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x0042B470 + void LobbyMenu::MenuItemActionHandler_LobbyMenu_MapSelectTable(int row, ...) + { + if (DAT_MenuModalComposition1::instance.activeModalDialogID == OpenSHC::UI::Enums::MMT_ROUNDTABLE) { + return; + } + if (DAT_MenuModalComposition1::instance.activeModalDialogID + == OpenSHC::UI::Enums::MMT_BASIC_AI_LORD_SELECT) { + return; + } + if (DAT_MenuModalComposition1::instance.activeModalDialogID + == OpenSHC::UI::Enums::MMT_EXTENDED_AI_LORD_SELECT) { + return; + } + if (!DAT_GameSynchronyState::instance.isHost) { + return; + } + if (DAT_GameSynchronyState::instance.DAT_MapSelectionScrollOffset + row + >= DAT_GameSynchronyState::instance.DAT_MapSelectionTotalNumber) { + return; + } + DAT_GameSynchronyState::instance.DAT_MapSelectionRelativeSelected = row; + MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::queueCommand, DAT_GameSynchronyState::ptr)( + OpenSHC::Commands::GCT_CHANGE_MAP_SELECTION); + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/LobbyMenu/MenuItemRenderFunction_LobbyMenu_MapDescScrollbar.cpp b/src/OpenSHC/UI/MenuItems/LobbyMenu/MenuItemRenderFunction_LobbyMenu_MapDescScrollbar.cpp new file mode 100644 index 0000000000..b432de5f46 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/LobbyMenu/MenuItemRenderFunction_LobbyMenu_MapDescScrollbar.cpp @@ -0,0 +1,42 @@ +#include "../LobbyMenu.func.hpp" + +#include "OpenSHC/UI/Helpers.func.hpp" +#include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/Rendering/Enums/RenderTarget.hpp" +#include "OpenSHC/UI/Enums/MenuModalType.hpp" +#include "OpenSHC/WindowsHelper/Enums/BOOLEnum.hpp" + +#include "OpenSHC/Globals/DAT_ButtonBackgroundBlendStrength.hpp" +#include "OpenSHC/Globals/DAT_ButtonH.hpp" +#include "OpenSHC/Globals/DAT_ButtonX.hpp" +#include "OpenSHC/Globals/DAT_ButtonY.hpp" +#include "OpenSHC/Globals/DAT_MenuModalComposition1.hpp" +#include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" +#include "OpenSHC/Globals/DAT_TextureRenderCoreObject.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + using WindowsHelper::Enums::BOOLEnum; + + // FUNCTION: STRONGHOLDCRUSADER 0x00428A60 + void LobbyMenu::MenuItemRenderFunction_LobbyMenu_MapDescScrollbar( + int unused, int thumbYPos, int sliderValue, int thumbHeight, BOOLEnum isDragged) + { + if (DAT_MenuModalComposition1::instance.activeModalDialogID != UI::Enums::MMT_ROUNDTABLE + && DAT_MenuModalComposition1::instance.activeModalDialogID != UI::Enums::MMT_BASIC_AI_LORD_SELECT + && DAT_MenuModalComposition1::instance.activeModalDialogID != UI::Enums::MMT_EXTENDED_AI_LORD_SELECT) { + if (MACRO_CALL(UI::Helpers_Func::AModalDialogIsActiveButIsNotQuitting)()) { + return; + } + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_SCREEN_MENU; + MACRO_CALL_MEMBER(UI::Rendering::PencilRenderCore_Func::drawScrollbar, DAT_PencilRenderCore::ptr)( + DAT_ButtonX::instance, DAT_ButtonY::instance, DAT_ButtonH::instance, thumbYPos, isDragged, + thumbHeight, DAT_ButtonBackgroundBlendStrength::instance); + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/MapEditorProperties/MenuItemActionHandler_MapEditorProperties_MapDescriptionBox.cpp b/src/OpenSHC/UI/MenuItems/MapEditorProperties/MenuItemActionHandler_MapEditorProperties_MapDescriptionBox.cpp new file mode 100644 index 0000000000..07afff3462 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/MapEditorProperties/MenuItemActionHandler_MapEditorProperties_MapDescriptionBox.cpp @@ -0,0 +1,45 @@ +#include "../MapEditorProperties.func.hpp" + +#include "OpenSHC/OS.func.hpp" +#include "OpenSHC/Text/TextEditorState.func.hpp" +#include "OpenSHC/Text/UserTextHandler.func.hpp" +#include "OpenSHC/Text/TextArrayIndexType.hpp" +#include "OpenSHC/UI/Enums/MenuModalType.hpp" + +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_MenuModalComposition1.hpp" +#include "OpenSHC/Globals/DAT_MenuTextInputState.hpp" +#include "OpenSHC/Globals/DAT_TextEditorState.hpp" +#include "OpenSHC/Globals/DAT_UserTextHandlerState.hpp" +#include "OpenSHC/Globals/INT_00b95f68.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x0042EDF0 + void MapEditorProperties::MenuItemActionHandler_MapEditorProperties_MapDescriptionBox() + { + if (!DAT_GameCore::instance.U2_mapType_singleOrMulti || !DAT_GameCore::instance.mapLoadedForEditor + || DAT_MenuTextInputState::instance.currentModalDialog != UI::Enums::MMT_NO_MENU + || DAT_MenuModalComposition1::instance.activeModalDialogID != UI::Enums::MMT_NONE) { + return; + } + INT_00b95f68::instance = TRUE; + if (DAT_GameCore::instance.showTextMessageInsteadOfEdit) { + return; + } + MACRO_CALL_MEMBER(Text::UserTextHandler_Func::resetToTextIndex, DAT_UserTextHandlerState::ptr)( + Text::TAIT_NINE__FILTER_B); + DAT_TextEditorState::instance.customTextMaxLength = 1000; + MACRO_CALL_MEMBER(Text::TextEditorState_Func::openMapDescriptionEditorDialog, DAT_TextEditorState::ptr)(0); + MACRO_CALL_MEMBER(Text::TextEditorState_Func::setCustomHelpText, DAT_TextEditorState::ptr)( + DAT_GameCore::instance.temporaryTextBufferOfSize1000, 999); + MACRO_CALL(OS_Func::_memset)(DAT_GameCore::instance.temporaryTextBufferOfSize1000, 0, + sizeof(DAT_GameCore::instance.temporaryTextBufferOfSize1000)); + DAT_GameCore::instance.descriptionUseStringTable = FALSE; + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/MapEditorProperties/MenuItemRenderFunction_MapEditorProperties_MapDescriptionScrollbar.cpp b/src/OpenSHC/UI/MenuItems/MapEditorProperties/MenuItemRenderFunction_MapEditorProperties_MapDescriptionScrollbar.cpp new file mode 100644 index 0000000000..83d6fe5d7b --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/MapEditorProperties/MenuItemRenderFunction_MapEditorProperties_MapDescriptionScrollbar.cpp @@ -0,0 +1,37 @@ +#include "../MapEditorProperties.func.hpp" + +#include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/Rendering/Enums/RenderTarget.hpp" +#include "OpenSHC/UI/Enums/MenuModalType.hpp" + +#include "OpenSHC/Globals/DAT_ButtonH.hpp" +#include "OpenSHC/Globals/DAT_ButtonX.hpp" +#include "OpenSHC/Globals/DAT_ButtonY.hpp" +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_MenuModalComposition1.hpp" +#include "OpenSHC/Globals/DAT_MenuTextInputState.hpp" +#include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" +#include "OpenSHC/Globals/DAT_TextureRenderCoreObject.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x0042EF80 + void MapEditorProperties::MenuItemRenderFunction_MapEditorProperties_MapDescriptionScrollbar( + int unused, int thumbYPos, int sliderValue, int thumbHeight, BOOLEnum isDragged) + { + if (DAT_GameCore::instance.U2_mapType_singleOrMulti + && DAT_MenuTextInputState::instance.currentModalDialog == OpenSHC::UI::Enums::MMT_NO_MENU + && DAT_MenuModalComposition1::instance.activeModalDialogID == OpenSHC::UI::Enums::MMT_NONE) { + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_SCREEN_MENU; + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawScrollbar, + DAT_PencilRenderCore::ptr)(DAT_ButtonX::instance, DAT_ButtonY::instance, DAT_ButtonH::instance, + thumbYPos, isDragged, thumbHeight, 0); + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_MAP_GAME; + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/NewInvasion/MenuItemActionHandler_NewInvasion_RepeatSlider.cpp b/src/OpenSHC/UI/MenuItems/NewInvasion/MenuItemActionHandler_NewInvasion_RepeatSlider.cpp new file mode 100644 index 0000000000..f11d78abd9 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/NewInvasion/MenuItemActionHandler_NewInvasion_RepeatSlider.cpp @@ -0,0 +1,36 @@ +#include "../NewInvasion.func.hpp" + +#include "OpenSHC/Globals/DAT_MapPropertiesState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004B94A0 + void NewInvasion::MenuItemActionHandler_NewInvasion_RepeatSlider( + int unused, int scrollbarEvent, int* minValue, int* maxValue, int* currentValue) + { + switch (scrollbarEvent) { + case 1: + *minValue = 0; + *maxValue = 120; + *currentValue + = DAT_MapPropertiesState::instance.scenarioEvents[DAT_MapPropertiesState::instance.currentEventID] + .data.invasion.repeatMonths; + return; + case 2: + case 3: + DAT_MapPropertiesState::instance.scenarioEvents[DAT_MapPropertiesState::instance.currentEventID] + .data.invasion.repeatMonths = *currentValue; + return; + case 4: + *currentValue + = DAT_MapPropertiesState::instance.scenarioEvents[DAT_MapPropertiesState::instance.currentEventID] + .data.invasion.repeatMonths; + *maxValue = 120; + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/NewMapMaptype/MenuItemActionHandler_NewMapMaptype_Buttons.cpp b/src/OpenSHC/UI/MenuItems/NewMapMaptype/MenuItemActionHandler_NewMapMaptype_Buttons.cpp new file mode 100644 index 0000000000..a30c20c1bb --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/NewMapMaptype/MenuItemActionHandler_NewMapMaptype_Buttons.cpp @@ -0,0 +1,55 @@ +#include "../NewMapMaptype.func.hpp" + +#include "OpenSHC/Game/GameCore.func.hpp" +#include "OpenSHC/UI/Helpers.func.hpp" +#include "OpenSHC/Map/MapType2.hpp" +#include "OpenSHC/UI/Enums/MenuModalType.hpp" +#include "OpenSHC/UI/Enums/MenuViewType.hpp" + +#include "OpenSHC/Globals/DAT_BlendingDefinedData.hpp" +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_MapPropertiesState.hpp" +#include "OpenSHC/Globals/DAT_MenuModalComposition1.hpp" +#include "OpenSHC/Globals/DAT_MenuTextInputState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x0042F2B0 + void NewMapMaptype::MenuItemActionHandler_NewMapMaptype_Buttons(int button, ...) + { + if (DAT_MenuTextInputState::instance.currentModalDialog == UI::Enums::MMT_NO_MENU + && DAT_MenuModalComposition1::instance.activeModalDialogID == UI::Enums::MMT_NONE) { + switch (button) { + case 1: + DAT_MapPropertiesState::instance.SEC_U3_MapType2_1 = Map::MT_JUST_BUILD; + MACRO_CALL_MEMBER(Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + UI::Enums::MVT_NEW_MAP_MAPSIZE, 0); + return; + case 2: + DAT_MapPropertiesState::instance.SEC_U3_MapType2_1 = Map::MT_INVASION; + MACRO_CALL_MEMBER(Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + UI::Enums::MVT_NEW_MAP_MAPSIZE, 0); + return; + case 3: + MACRO_CALL(UI::Helpers_Func::InitializeBasicMap)(); + DAT_GameCore::instance.U2_mapType_singleOrMulti = 1; + MACRO_CALL_MEMBER(Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + UI::Enums::MVT_NEW_MAP_MAPSIZE, 0); + for (int playerSlot = 0; + playerSlot < countof(DAT_BlendingDefinedData::instance.PlayerSlotUnitColor); ++playerSlot) { + DAT_BlendingDefinedData::instance.PlayerSlotUnitColor[playerSlot] + = DAT_BlendingDefinedData::instance.DefaultPlayerSlotUnitColor[playerSlot]; + } + return; + case 7: + MACRO_CALL_MEMBER(Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + UI::Enums::MVT_CUSTOM_SCENARIOS, 0); + } + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/OptionsMenu/MenuItemActionHandler_OptionsMenu_SubOptionsButtons.cpp b/src/OpenSHC/UI/MenuItems/OptionsMenu/MenuItemActionHandler_OptionsMenu_SubOptionsButtons.cpp new file mode 100644 index 0000000000..578efa6682 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/OptionsMenu/MenuItemActionHandler_OptionsMenu_SubOptionsButtons.cpp @@ -0,0 +1,75 @@ +#include "../OptionsMenu.func.hpp" + +#include "OpenSHC/Text/UserTextHandler.func.hpp" +#include "OpenSHC/UI/MenuTextInputState.func.hpp" +#include "OpenSHC/Text/TextArrayIndexType.hpp" +#include "OpenSHC/UI/Enums/MenuModalType.hpp" + +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_MenuTextInputState.hpp" +#include "OpenSHC/Globals/DAT_MouseState.hpp" +#include "OpenSHC/Globals/DAT_ScrollingHandler.hpp" +#include "OpenSHC/Globals/DAT_SoundSystemState.hpp" +#include "OpenSHC/Globals/DAT_UserTextHandlerState.hpp" +#include "OpenSHC/Globals/DAT_ViewportRenderState.hpp" +#include "OpenSHC/Globals/DAT_WindowAndDirectDraw.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x00493BD0 + void OptionsMenu::MenuItemActionHandler_OptionsMenu_SubOptionsButtons(int button, ...) + { + switch (button) { + case 25: + DAT_MenuTextInputState::instance.pendingGameSpeedLevel = DAT_GameCore::instance.gameSpeedLevel; + DAT_MenuTextInputState::instance.pendingSettingBubbleHelp = DAT_GameCore::instance.settingBubbleHelp; + DAT_MenuTextInputState::instance.pendingUnusedOption1 = DAT_GameCore::instance.unusedOption1; + MACRO_CALL_MEMBER(OpenSHC::UI::MenuTextInputState_Func::activateModalDialogAndClearText, + DAT_MenuTextInputState::ptr)(OpenSHC::UI::Enums::MMT_GAMEPLAY_OPTIONS); + return; + case 4: + DAT_MenuTextInputState::instance.menuCurrentlySelectedResolution + = DAT_WindowAndDirectDraw::instance.currentGameResolution; + DAT_MenuTextInputState::instance.unknownZoomRelatedFlag01 + = DAT_ViewportRenderState::instance.viewportState.isZoomedOutUnk; + DAT_MenuTextInputState::instance.menuScrollSpeedSetting + = DAT_ScrollingHandler::instance.scrollSpeedSetting_0x38; + MACRO_CALL_MEMBER(OpenSHC::UI::MenuTextInputState_Func::activateModalDialogAndClearText, + DAT_MenuTextInputState::ptr)(OpenSHC::UI::Enums::MMT_VIDEO_OPTIONS); + DAT_MenuTextInputState::instance.menuCursorType = DAT_MouseState::instance.cursorType; + return; + case 5: + DAT_MenuTextInputState::instance.DAT_GenieVoiceActiveMenuVar = DAT_GameCore::instance.genieVoiceActive; + DAT_MenuTextInputState::instance.DAT_SoundActiveMenuVar + = DAT_SoundSystemState::instance.soundActiveUnk_0x0; + DAT_MenuTextInputState::instance.pendingStreamVolume0 = DAT_SoundSystemState::instance.streamVolume[0]; + DAT_MenuTextInputState::instance.pendingStreamVolume1 = DAT_SoundSystemState::instance.streamVolume[1]; + DAT_MenuTextInputState::instance.pendingStreamVolume3 = DAT_SoundSystemState::instance.streamVolume[3]; + MACRO_CALL_MEMBER(OpenSHC::UI::MenuTextInputState_Func::activateModalDialogAndClearText, + DAT_MenuTextInputState::ptr)(OpenSHC::UI::Enums::MMT_SOUND_OPTIONS); + return; + case 45: + DAT_UserTextHandlerState::instance.allowUserTextInput = 0; + MACRO_CALL_MEMBER(OpenSHC::Text::UserTextHandler_Func::resetToTextIndex, DAT_UserTextHandlerState::ptr)( + OpenSHC::Text::TAIT_ZERO); + MACRO_CALL_MEMBER( + OpenSHC::Text::UserTextHandler_Func::moveCursorToEnd, DAT_UserTextHandlerState::ptr)(); + DAT_UserTextHandlerState::instance.allowUserTextInput = 1; + MACRO_CALL_MEMBER(OpenSHC::UI::MenuTextInputState_Func::activateModalDialogAndClearText, + DAT_MenuTextInputState::ptr)(OpenSHC::UI::Enums::MMT_IDENTITY_OPTIONS); + return; + case 6: + MACRO_CALL_MEMBER(OpenSHC::UI::MenuTextInputState_Func::activateModalDialogAndClearText, + DAT_MenuTextInputState::ptr)(OpenSHC::UI::Enums::MMT_NETWORK_OPTIONS); + return; + case 17: + MACRO_CALL_MEMBER(OpenSHC::UI::MenuTextInputState_Func::popModalDialog, DAT_MenuTextInputState::ptr)(); + return; + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/OverlaySlider/MenuItemActionHandler_OverlaySlider_Deselect.cpp b/src/OpenSHC/UI/MenuItems/OverlaySlider/MenuItemActionHandler_OverlaySlider_Deselect.cpp new file mode 100644 index 0000000000..22a51456f0 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/OverlaySlider/MenuItemActionHandler_OverlaySlider_Deselect.cpp @@ -0,0 +1,44 @@ +#include "../OverlaySlider.func.hpp" + +#include "OpenSHC/UI/MenuModalComposition.func.hpp" +#include "OpenSHC/UI/Enums/MenuModalType.hpp" + +#include "OpenSHC/Globals/DAT_MenuModalComposition2.hpp" +#include "OpenSHC/Globals/DAT_MouseState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004B0F70 + void OverlaySlider::MenuItemActionHandler_OverlaySlider_Deselect(int unused, ...) + { + if (DAT_MouseState::instance.rightClickStart) { + MACRO_CALL_MEMBER(OpenSHC::UI::MenuModalComposition_Func::activateModalDialog, + DAT_MenuModalComposition2::ptr)(OpenSHC::UI::Enums::MMT_NONE, FALSE); + if (DAT_MenuModalComposition2::instance.sliderCallbackFunction != NULL) { + DAT_MenuModalComposition2::instance.sliderCallbackFunction(); + DAT_MenuModalComposition2::instance.minus1 = -1; + } + } + if (DAT_MouseState::instance.leftClickStart) { + if (DAT_MouseState::instance.screenSpaceX >= DAT_MenuModalComposition2::instance.modalMenu.x + && DAT_MouseState::instance.screenSpaceX < DAT_MenuModalComposition2::instance.modalMenu.width + + DAT_MenuModalComposition2::instance.modalMenu.x + && DAT_MouseState::instance.screenSpaceY >= DAT_MenuModalComposition2::instance.modalMenu.y + && DAT_MouseState::instance.screenSpaceY < DAT_MenuModalComposition2::instance.modalMenu.height + + DAT_MenuModalComposition2::instance.modalMenu.y) { + return; + } + MACRO_CALL_MEMBER(OpenSHC::UI::MenuModalComposition_Func::activateModalDialog, + DAT_MenuModalComposition2::ptr)(OpenSHC::UI::Enums::MMT_NONE, FALSE); + if (DAT_MenuModalComposition2::instance.sliderCallbackFunction != NULL) { + DAT_MenuModalComposition2::instance.sliderCallbackFunction(); + DAT_MenuModalComposition2::instance.minus1 = -1; + } + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/RankingGames/MenuItemRenderFunction_RankingGames_Scrollbar.cpp b/src/OpenSHC/UI/MenuItems/RankingGames/MenuItemRenderFunction_RankingGames_Scrollbar.cpp new file mode 100644 index 0000000000..cf0d95b736 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/RankingGames/MenuItemRenderFunction_RankingGames_Scrollbar.cpp @@ -0,0 +1,38 @@ +#include "../RankingGames.func.hpp" + +#include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/Rendering/Enums/RenderTarget.hpp" + +#include "OpenSHC/Globals/COL_BLACK.hpp" +#include "OpenSHC/Globals/COL_VERY_SOFT_YELLOW.hpp" +#include "OpenSHC/Globals/DAT_ButtonH.hpp" +#include "OpenSHC/Globals/DAT_ButtonUnknownZero.hpp" +#include "OpenSHC/Globals/DAT_ButtonX.hpp" +#include "OpenSHC/Globals/DAT_ButtonY.hpp" +#include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" +#include "OpenSHC/Globals/DAT_TextureRenderCoreObject.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004D9C10 + void RankingGames::MenuItemRenderFunction_RankingGames_Scrollbar( + int unused, int thumbYPos, int sliderValue, int thumbHeight, BOOLEnum isDragged) + { + DAT_ButtonUnknownZero::instance = FALSE; + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_SCREEN_MENU; + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawColorBox, DAT_PencilRenderCore::ptr)( + DAT_ButtonX::instance, DAT_ButtonY::instance, DAT_ButtonX::instance + 19, + DAT_ButtonY::instance + DAT_ButtonH::instance - 1, COL_BLACK::instance.shortValue); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawScrollbar, DAT_PencilRenderCore::ptr)( + DAT_ButtonX::instance, DAT_ButtonY::instance, DAT_ButtonH::instance, thumbYPos, isDragged, thumbHeight, + 0); + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawBorderBox, DAT_PencilRenderCore::ptr)( + DAT_ButtonX::instance - 1, DAT_ButtonY::instance - 1, DAT_ButtonX::instance + 20, + DAT_ButtonY::instance + DAT_ButtonH::instance, COL_VERY_SOFT_YELLOW::instance.shortValue); + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/SaveLoadMap/MenuItemActionHandler_SaveLoadMap_Scrollbar.cpp b/src/OpenSHC/UI/MenuItems/SaveLoadMap/MenuItemActionHandler_SaveLoadMap_Scrollbar.cpp new file mode 100644 index 0000000000..06174f5814 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/SaveLoadMap/MenuItemActionHandler_SaveLoadMap_Scrollbar.cpp @@ -0,0 +1,53 @@ +#include "../SaveLoadMap.func.hpp" + +#include "OpenSHC/Globals/DAT_MenuTextInputState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x00492BA0 + void SaveLoadMap::MenuItemActionHandler_SaveLoadMap_Scrollbar( + int unused, int scrollbarEvent, int* minValue, int* maxValue, int* currentValue) + { + switch (scrollbarEvent) { + case 1: + *minValue = 0; + *maxValue = DAT_MenuTextInputState::instance.fileListEntryCount + - DAT_MenuTextInputState::instance.fileListVisibleRowCount; + *currentValue = DAT_MenuTextInputState::instance.menuLoadGameRelativeSelectionOffset; + return; + case 2: + case 3: + DAT_MenuTextInputState::instance.menuLoadGameRelativeSelectionOffset = *currentValue; + return; + case 4: + *currentValue = DAT_MenuTextInputState::instance.menuLoadGameRelativeSelectionOffset; + return; + case 7: + *currentValue = DAT_MenuTextInputState::instance.fileListVisibleRowCount - 1; + return; + case 5: + // Stores and returns here rather than through the shared store below, as the original does. + if (DAT_MenuTextInputState::instance.menuLoadGameRelativeSelectionOffset > 0) { + --DAT_MenuTextInputState::instance.menuLoadGameRelativeSelectionOffset; + *currentValue = DAT_MenuTextInputState::instance.menuLoadGameRelativeSelectionOffset; + return; + } + break; + case 6: + if (DAT_MenuTextInputState::instance.menuLoadGameRelativeSelectionOffset + < DAT_MenuTextInputState::instance.fileListEntryCount + - DAT_MenuTextInputState::instance.fileListVisibleRowCount) { + ++DAT_MenuTextInputState::instance.menuLoadGameRelativeSelectionOffset; + } + break; + default: + return; + } + *currentValue = DAT_MenuTextInputState::instance.menuLoadGameRelativeSelectionOffset; + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/SaveMap/MenuItemActionHandler_SaveMap_TableContent.cpp b/src/OpenSHC/UI/MenuItems/SaveMap/MenuItemActionHandler_SaveMap_TableContent.cpp new file mode 100644 index 0000000000..9f0e74d275 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/SaveMap/MenuItemActionHandler_SaveMap_TableContent.cpp @@ -0,0 +1,32 @@ +#include "../SaveMap.func.hpp" + +#include "OpenSHC/IO/ResourceManager.func.hpp" +#include "OpenSHC/Text/UserTextHandler.func.hpp" + +#include "OpenSHC/Globals/DAT_MenuTextInputState.hpp" +#include "OpenSHC/Globals/DAT_ResourceManager.hpp" +#include "OpenSHC/Globals/DAT_UserTextHandlerState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004932A0 + void SaveMap::MenuItemActionHandler_SaveMap_TableContent(int row, ...) + { + if (DAT_MenuTextInputState::instance.menuLoadGameRelativeSelectionOffset + row + < DAT_MenuTextInputState::instance.fileListEntryCount) { + DAT_MenuTextInputState::instance.menuLoadGameRelativeSelectionIndex = row; + char* const mapName + = MACRO_CALL_MEMBER(OpenSHC::IO::ResourceManager_Func::mapNames_getLoadedMapNameForIndex, + DAT_ResourceManager::ptr)(DAT_MenuTextInputState::instance + .DAT_ArrayOfMapIndices[DAT_MenuTextInputState::instance.menuLoadGameRelativeSelectionOffset + + row]); + MACRO_CALL_MEMBER( + OpenSHC::Text::UserTextHandler_Func::copyIntoTextArray, DAT_UserTextHandlerState::ptr)(mapName); + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/SinglePlayerMapChoice/MenuItemRenderFunction_SingleplayerMapChoice_Scrollbar.cpp b/src/OpenSHC/UI/MenuItems/SinglePlayerMapChoice/MenuItemRenderFunction_SingleplayerMapChoice_Scrollbar.cpp new file mode 100644 index 0000000000..b39a62402b --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/SinglePlayerMapChoice/MenuItemRenderFunction_SingleplayerMapChoice_Scrollbar.cpp @@ -0,0 +1,30 @@ +#include "../SinglePlayerMapChoice.func.hpp" + +#include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/Rendering/Enums/RenderTarget.hpp" + +#include "OpenSHC/Globals/DAT_ButtonBackgroundBlendStrength.hpp" +#include "OpenSHC/Globals/DAT_ButtonH.hpp" +#include "OpenSHC/Globals/DAT_ButtonX.hpp" +#include "OpenSHC/Globals/DAT_ButtonY.hpp" +#include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" +#include "OpenSHC/Globals/DAT_TextureRenderCoreObject.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x0042DC60 + void SinglePlayerMapChoice::MenuItemRenderFunction_SingleplayerMapChoice_Scrollbar( + int unused, int thumbYPos, int sliderValue, int thumbHeight, BOOLEnum isDragged) + { + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_SCREEN_MENU; + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawScrollbar, DAT_PencilRenderCore::ptr)( + DAT_ButtonX::instance, DAT_ButtonY::instance, DAT_ButtonH::instance, thumbYPos, isDragged, thumbHeight, + DAT_ButtonBackgroundBlendStrength::instance); + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_MAP_GAME; + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/TacticalPowerBar/MenuItemActionHandler_TacticalPowerBar_Main.cpp b/src/OpenSHC/UI/MenuItems/TacticalPowerBar/MenuItemActionHandler_TacticalPowerBar_Main.cpp new file mode 100644 index 0000000000..891197e6ba --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/TacticalPowerBar/MenuItemActionHandler_TacticalPowerBar_Main.cpp @@ -0,0 +1,79 @@ +#include "../TacticalPowerBar.func.hpp" + +#include "OpenSHC/Audio/SFX/SFXState.func.hpp" +#include "OpenSHC/Input/MouseState.func.hpp" +#include "OpenSHC/Synchrony/GameSynchronyState.func.hpp" +#include "OpenSHC/Audio/SFX/SoundEffectID.hpp" +#include "OpenSHC/Commands/GameCommandType.hpp" +#include "OpenSHC/Game/GameMode.hpp" + +#include "OpenSHC/Globals/DAT_GameState.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" +#include "OpenSHC/Globals/DAT_MissionDefinedData.hpp" +#include "OpenSHC/Globals/DAT_MouseState.hpp" +#include "OpenSHC/Globals/DAT_SFXState.hpp" +#include "OpenSHC/Globals/DAT_TacticalPowersHelpTextDisplayBool.hpp" +#include "OpenSHC/Globals/DAT_TileMapState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004DA050 + void TacticalPowerBar::MenuItemActionHandler_TacticalPowerBar_Main(int tacticalPower, ...) + { + if (DAT_GameSynchronyState::instance.currentGameMode != OpenSHC::Game::GM_SOLITARY + && DAT_GameSynchronyState::instance.currentGameMode != OpenSHC::Game::GM_SKIRMISH_SINGLE_PLAYER + && DAT_GameState::instance.mapAndTime.skirmishNoRushTicks != 0) { + return; + } + int const barLevel + = DAT_GameState::instance.playerDataArray[DAT_GameSynchronyState::instance.currentPlayerSlotID] + .tacticalPowersBarLevel; + MACRO_CALL_MEMBER(OpenSHC::Input::MouseState_Func::resetMouseState2, DAT_MouseState::ptr)(); + if (barLevel < (tacticalPower + 1) * 636 + || DAT_GameState::instance.playerDataArray[DAT_GameSynchronyState::instance.currentPlayerSlotID] + .lordKilledByPlayerID + != 0) { + return; + } + if (DAT_TacticalPowersHelpTextDisplayBool::instance) { + DAT_MissionDefinedData::instance.field39_0x1370 = 0; + DAT_TacticalPowersHelpTextDisplayBool::instance = false; + } + if (tacticalPower == 5) { + DAT_GameSynchronyState::instance.DAT_GameCommandParam2 + = DAT_GameSynchronyState::instance.currentPlayerSlotID; + DAT_GameSynchronyState::instance.DAT_GameCommandParam0 = 5; + DAT_GameSynchronyState::instance.DAT_GameCommandParam1 = 0; + MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::queueCommand, + DAT_GameSynchronyState::ptr)(OpenSHC::Commands::GCT_ACTIVATE_TACTICAL_POWERS); + MACRO_CALL_MEMBER(OpenSHC::Audio::SFX::SFXState_Func::setUpSFXToPlayUnk, DAT_SFXState::ptr)( + OpenSHC::Audio::SFX::SEID_UNKNOWN_0x100); + return; + } + DAT_TileMapState::instance.activeTacticalPower = tacticalPower; + DAT_TileMapState::instance.shiftRelated0or3 = 5; + switch (tacticalPower) { + case 2: + case 3: + case 4: + case 6: + case 13: + case 16: + MACRO_CALL_MEMBER(OpenSHC::Audio::SFX::SFXState_Func::setUpSFXToPlayUnk, DAT_SFXState::ptr)( + OpenSHC::Audio::SFX::SEID_UNKNOWN_0x104); + return; + case 1: + MACRO_CALL_MEMBER(OpenSHC::Audio::SFX::SFXState_Func::setUpSFXToPlayUnk, DAT_SFXState::ptr)( + OpenSHC::Audio::SFX::SEID_CHAPEL_BELL); + return; + case 7: + MACRO_CALL_MEMBER(OpenSHC::Audio::SFX::SFXState_Func::setUpSFXToPlayUnk, DAT_SFXState::ptr)( + OpenSHC::Audio::SFX::SEID_UNKNOWN_0x105); + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/Unknown27CampaignUnk/MenuItemActionHandler_Unknown27CampaignUnk_Main.cpp b/src/OpenSHC/UI/MenuItems/Unknown27CampaignUnk/MenuItemActionHandler_Unknown27CampaignUnk_Main.cpp new file mode 100644 index 0000000000..61613634e7 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/Unknown27CampaignUnk/MenuItemActionHandler_Unknown27CampaignUnk_Main.cpp @@ -0,0 +1,33 @@ +#include "../Unknown27CampaignUnk.func.hpp" + +#include "OpenSHC/Game/GameCore.func.hpp" +#include "OpenSHC/UI/Enums/MenuModalType.hpp" +#include "OpenSHC/UI/Enums/MenuViewType.hpp" + +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_MenuModalComposition1.hpp" +#include "OpenSHC/Globals/DAT_MenuTextInputState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004D6F20 + void Unknown27CampaignUnk::MenuItemActionHandler_Unknown27CampaignUnk_Main(int button, ...) + { + if (DAT_MenuTextInputState::instance.currentModalDialog == OpenSHC::UI::Enums::MMT_NO_MENU + && DAT_MenuModalComposition1::instance.activeModalDialogID == OpenSHC::UI::Enums::MMT_NONE + && button == 10) { + if (DAT_GameCore::instance.missionNumber1to20 == 1) { + MACRO_CALL_MEMBER(OpenSHC::Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + OpenSHC::UI::Enums::MVT_SCENARIO_DESCRIPTION, 0); + return; + } + MACRO_CALL_MEMBER(OpenSHC::Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + OpenSHC::UI::Enums::MVT_UNKNOWN_26_CAMPAIGN_RELATEDUnk, 0); + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/Unused/MenuItemActionHandler_UnusedChooseMessageBox_Unknown.cpp b/src/OpenSHC/UI/MenuItems/Unused/MenuItemActionHandler_UnusedChooseMessageBox_Unknown.cpp new file mode 100644 index 0000000000..38cc2c81b2 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/Unused/MenuItemActionHandler_UnusedChooseMessageBox_Unknown.cpp @@ -0,0 +1,25 @@ +#include "../Unused.func.hpp" + +#include "OpenSHC/Globals/DAT_MapPropertiesState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004BF720 + void Unused::MenuItemActionHandler_UnusedChooseMessageBox_Unknown(int row, ...) + { + DWORD const currentTime = timeGetTime(); + int const absoluteIndex = DAT_MapPropertiesState::instance.offset + row; + if (absoluteIndex < (int)DAT_MapPropertiesState::instance.total) { + DAT_MapPropertiesState::instance.indexStored = row; + DAT_MapPropertiesState::instance.value + = DAT_MapPropertiesState::instance.unknownArray_01[absoluteIndex]; + DAT_MapPropertiesState::instance.selectedAbsoluteIndex = absoluteIndex; + DAT_MapPropertiesState::instance.selectionTime = currentTime; + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/Unused/MenuItemActionHandler_UnusedCreateMessageEvent_Unknown.cpp b/src/OpenSHC/UI/MenuItems/Unused/MenuItemActionHandler_UnusedCreateMessageEvent_Unknown.cpp new file mode 100644 index 0000000000..0bd0cf8b6f --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/Unused/MenuItemActionHandler_UnusedCreateMessageEvent_Unknown.cpp @@ -0,0 +1,32 @@ +#include "../Unused.func.hpp" + +#include "OpenSHC/Globals/DAT_MapPropertiesState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004BA560 + void Unused::MenuItemActionHandler_UnusedCreateMessageEvent_Unknown(int index, ...) + { + if (DAT_MapPropertiesState::instance.offset + index >= (int)DAT_MapPropertiesState::instance.total) { + return; + } + DAT_MapPropertiesState::instance.indexStored = index; + if (index == -1) { + return; + } + DAT_MapPropertiesState::instance.value + = DAT_MapPropertiesState::instance.unknownArray_01[DAT_MapPropertiesState::instance.offset + index]; + if (!DAT_MapPropertiesState::instance.flag) { + DAT_MapPropertiesState::instance.scenarioEvents[DAT_MapPropertiesState::instance.currentEventID] + .data.scenario.actionData = DAT_MapPropertiesState::instance.value; + return; + } + DAT_MapPropertiesState::instance.scenarioEvents[DAT_MapPropertiesState::instance.currentEventID] + .data.message.messageID = DAT_MapPropertiesState::instance.value; + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/Unused/MenuItemActionHandler_UnusedEconomicGametypeSelect_Main.cpp b/src/OpenSHC/UI/MenuItems/Unused/MenuItemActionHandler_UnusedEconomicGametypeSelect_Main.cpp new file mode 100644 index 0000000000..f5b815727b --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/Unused/MenuItemActionHandler_UnusedEconomicGametypeSelect_Main.cpp @@ -0,0 +1,82 @@ +#include "../Unused.func.hpp" + +#include "OpenSHC/Game/GameCore.func.hpp" +#include "OpenSHC/Game/GameStateStructures.func.hpp" +#include "OpenSHC/Game/GameMode2.hpp" +#include "OpenSHC/UI/Enums/MenuViewType.hpp" + +#include "OpenSHC/Globals/DAT_BlendingDefinedData.hpp" +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_GameState.hpp" +#include "OpenSHC/Globals/DAT_MapMissionType.hpp" +#include "OpenSHC/Globals/INT_00b95b64.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x00425C20 + void Unused::MenuItemActionHandler_UnusedEconomicGametypeSelect_Main(int button, ...) + { + switch (button) { + case 1: + DAT_GameCore::instance.gameSuspended = 0; + DAT_GameState::instance.mapAndTime.difficulty = DAT_GameCore::instance.missionDifficulty2; + MACRO_CALL_MEMBER(Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + UI::Enums::MVT_UNUSED_ECONOMIC_MISSION_SELECTUnk, 0); + for (int i = 0; i < countof(DAT_BlendingDefinedData::instance.PlayerSlotUnitColor); ++i) { + DAT_BlendingDefinedData::instance.PlayerSlotUnitColor[i] + = DAT_BlendingDefinedData::instance.DefaultPlayerSlotUnitColor[i]; + } + return; + case 2: + DAT_GameCore::instance.missionNumber1to20 = 0; + DAT_GameCore::instance.gameMode_2 = Game::GM_BUILDERUnk; + DAT_GameCore::instance.xbowProducible_logic = 1; + DAT_GameCore::instance.pikeProducible_logic = 1; + DAT_GameCore::instance.swordProducible_logic = 1; + DAT_GameCore::instance.bowProducible_logic = 1; + DAT_GameCore::instance.spearProducible_logic = 1; + DAT_GameCore::instance.maceProducible_logic = 1; + MACRO_CALL_MEMBER(Game::GameStateStructures_Func::resetTeams, DAT_GameState::ptr)(); + DAT_GameState::instance.mapAndTime.difficulty = DAT_GameCore::instance.missionDifficulty_1; + DAT_MapMissionType::instance = 1; + INT_00b95b64::instance = 1; + DAT_GameCore::instance.standaloneFilename[0] = '\0'; + MACRO_CALL_MEMBER(Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + UI::Enums::MVT_SINGLEPLAYER_MAP_CHOICE, 0); + for (int i = 0; i < countof(DAT_BlendingDefinedData::instance.PlayerSlotUnitColor); ++i) { + DAT_BlendingDefinedData::instance.PlayerSlotUnitColor[i] + = DAT_BlendingDefinedData::instance.DefaultPlayerSlotUnitColor[i]; + } + return; + case 3: + DAT_GameCore::instance.missionNumber1to20 = 0; + DAT_GameCore::instance.gameMode_2 = Game::GM_BUILDERUnk; + DAT_GameCore::instance.xbowProducible_logic = 1; + DAT_GameCore::instance.pikeProducible_logic = 1; + DAT_GameCore::instance.swordProducible_logic = 1; + DAT_GameCore::instance.bowProducible_logic = 1; + DAT_GameCore::instance.spearProducible_logic = 1; + DAT_GameCore::instance.maceProducible_logic = 1; + MACRO_CALL_MEMBER(Game::GameStateStructures_Func::resetTeams, DAT_GameState::ptr)(); + DAT_MapMissionType::instance = 0; + INT_00b95b64::instance = 1; + DAT_GameCore::instance.standaloneFilename[0] = '\0'; + DAT_GameState::instance.mapAndTime.difficulty = DAT_GameCore::instance.missionDifficulty_0; + MACRO_CALL_MEMBER(Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + UI::Enums::MVT_SINGLEPLAYER_MAP_CHOICE, 0); + for (int i = 0; i < countof(DAT_BlendingDefinedData::instance.PlayerSlotUnitColor); ++i) { + DAT_BlendingDefinedData::instance.PlayerSlotUnitColor[i] + = DAT_BlendingDefinedData::instance.DefaultPlayerSlotUnitColor[i]; + } + return; + case 5: + MACRO_CALL_MEMBER(Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + UI::Enums::MVT_MAIN_MENU, 0); + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/Unused/MenuItemActionHandler_UnusedEconomicMissionSelect_General.cpp b/src/OpenSHC/UI/MenuItems/Unused/MenuItemActionHandler_UnusedEconomicMissionSelect_General.cpp new file mode 100644 index 0000000000..4a7c6fc452 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/Unused/MenuItemActionHandler_UnusedEconomicMissionSelect_General.cpp @@ -0,0 +1,64 @@ +#include "../Unused.func.hpp" + +#include "OpenSHC/Game/GameCore.func.hpp" +#include "OpenSHC/Game/GameMode2.hpp" +#include "OpenSHC/UI/Enums/MenuModalType.hpp" +#include "OpenSHC/UI/Enums/MenuViewType.hpp" + +#include "OpenSHC/Globals/BOOL_CurrentMenuClickState.hpp" +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_GameState.hpp" +#include "OpenSHC/Globals/DAT_MenuModalComposition1.hpp" +#include "OpenSHC/Globals/DAT_MenuTextInputState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x00426ED0 + void Unused::MenuItemActionHandler_UnusedEconomicMissionSelect_General(int button, ...) + { + if (DAT_MenuTextInputState::instance.currentModalDialog == OpenSHC::UI::Enums::MMT_NO_MENU + && DAT_MenuModalComposition1::instance.activeModalDialogID == OpenSHC::UI::Enums::MMT_NONE) { + // a sparse switch; the original lays its arms out default, 20, 18, 13 + switch (button) { + default: { + BOOL_CurrentMenuClickState::instance = FALSE; + DAT_GameCore::instance.missionNumber1to20 = -button; + DWORD const clickTime = timeGetTime(); + if (DAT_GameCore::instance.missionNumber1to20 + != DAT_MenuTextInputState::instance.lastClickedListIndex + || (int)(clickTime - DAT_MenuTextInputState::instance.lastListClickTime) >= 500) { + DAT_MenuTextInputState::instance.lastClickedListIndex + = DAT_GameCore::instance.missionNumber1to20; + DAT_MenuTextInputState::instance.lastListClickTime = clickTime; + return; + } + // the original shares this tail with case 13; writing it out twice adds 7 instructions + goto startSelectedMission; + } + case 20: + ++DAT_GameState::instance.mapAndTime.difficulty; + // >= 4, not > 3 (> 3: quick_diff 0.9111 -> 0.8667) + if (DAT_GameState::instance.mapAndTime.difficulty >= 4) { + DAT_GameState::instance.mapAndTime.difficulty = 0; + } + return; + case 18: + MACRO_CALL_MEMBER(OpenSHC::Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + OpenSHC::UI::Enums::MVT_MAIN_MENU, 0); + return; + case 13: + startSelectedMission: + --DAT_GameCore::instance.missionNumber1to20; + DAT_GameCore::instance.gameMode_2 = OpenSHC::Game::GM_ECONOMIC_CAMPAIGN_SH1; + DAT_GameCore::instance.field_0x74 = 1; + MACRO_CALL_MEMBER(OpenSHC::Game::GameCore_Func::incrementMission, DAT_GameCore::ptr)(); + return; + } + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/Unused/MenuItemActionHandler_UnusedSomeMissionStartUnk_General.cpp b/src/OpenSHC/UI/MenuItems/Unused/MenuItemActionHandler_UnusedSomeMissionStartUnk_General.cpp new file mode 100644 index 0000000000..1b36f3e65e --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/Unused/MenuItemActionHandler_UnusedSomeMissionStartUnk_General.cpp @@ -0,0 +1,52 @@ +#include "../Unused.func.hpp" + +#include "OpenSHC/Game/GameCore.func.hpp" +#include "OpenSHC/Map/MapPropertiesState.func.hpp" +#include "OpenSHC/Synchrony/GameSynchronyState.func.hpp" +#include "OpenSHC/UI/MenuTextInputState.func.hpp" +#include "OpenSHC/Commands/GameCommandType.hpp" +#include "OpenSHC/UI/Enums/BuildMenuTabType.hpp" +#include "OpenSHC/UI/Enums/MenuModalType.hpp" +#include "OpenSHC/UI/Enums/MenuViewType.hpp" + +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" +#include "OpenSHC/Globals/DAT_MapPropertiesState.hpp" +#include "OpenSHC/Globals/DAT_MenuModalComposition1.hpp" +#include "OpenSHC/Globals/DAT_MenuTextInputState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x00427080 + void Unused::MenuItemActionHandler_UnusedSomeMissionStartUnk_General(int button, ...) + { + if (DAT_MenuTextInputState::instance.currentModalDialog == OpenSHC::UI::Enums::MMT_NO_MENU + && DAT_MenuModalComposition1::instance.activeModalDialogID == OpenSHC::UI::Enums::MMT_NONE) { + // a sparse switch; the original lays out the case 14 arm first + switch (button) { + case 14: + MACRO_CALL_MEMBER(OpenSHC::Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + OpenSHC::UI::Enums::MVT_MAIN_MENU, 0); + break; + case 13: + DAT_GameCore::instance.buildmenuMenuTabToSwitchTo.buildMenuTab = OpenSHC::UI::Enums::BMTT_CASTLE; + MACRO_CALL_MEMBER(OpenSHC::Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + OpenSHC::UI::Enums::MVT_BUILD_MENU, 0); + DAT_GameCore::instance.section1066 = 1; + DAT_GameCore::instance.landscapingmenuMenuTabToSwitchTo.buildMenuTab = 231; + MACRO_CALL_MEMBER(OpenSHC::Map::MapPropertiesState_Func::loadMissionMapAndSetLord, + DAT_MapPropertiesState::ptr)(DAT_GameCore::instance.missionNumber1to20); + MACRO_CALL_MEMBER( + OpenSHC::UI::MenuTextInputState_Func::clearModalDialog2to6, DAT_MenuTextInputState::ptr)(); + MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::queueCommand, + DAT_GameSynchronyState::ptr)(OpenSHC::Commands::GCT_ASK_FOR_SLOT_ASSIGNMENT); + break; + } + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/Unused/MenuItemActionHandler_UnusedWinCondition_DeselectUnk.cpp b/src/OpenSHC/UI/MenuItems/Unused/MenuItemActionHandler_UnusedWinCondition_DeselectUnk.cpp new file mode 100644 index 0000000000..6bb27a06c8 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/Unused/MenuItemActionHandler_UnusedWinCondition_DeselectUnk.cpp @@ -0,0 +1,45 @@ +#include "../Unused.func.hpp" + +#include "OpenSHC/UI/MenuModalComposition.func.hpp" +#include "OpenSHC/UI/Enums/MenuModalType.hpp" + +#include "OpenSHC/Globals/DAT_MenuModalComposition1.hpp" +#include "OpenSHC/Globals/DAT_MenuModalComposition2.hpp" +#include "OpenSHC/Globals/DAT_MouseState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004B1000 + void Unused::MenuItemActionHandler_UnusedWinCondition_DeselectUnk(int unused, ...) + { + if (DAT_MouseState::instance.rightClickStart) { + MACRO_CALL_MEMBER(OpenSHC::UI::MenuModalComposition_Func::activateModalDialog, + DAT_MenuModalComposition1::ptr)(OpenSHC::UI::Enums::MMT_NONE, FALSE); + if (DAT_MenuModalComposition1::instance.sliderCallbackFunction != NULL) { + DAT_MenuModalComposition1::instance.sliderCallbackFunction(); + DAT_MenuModalComposition1::instance.minus1 = -1; + } + } + if (DAT_MouseState::instance.leftClickStart) { + if (DAT_MouseState::instance.screenSpaceX >= DAT_MenuModalComposition2::instance.modalMenu.x + && DAT_MouseState::instance.screenSpaceX < DAT_MenuModalComposition2::instance.modalMenu.width + + DAT_MenuModalComposition2::instance.modalMenu.x + && DAT_MouseState::instance.screenSpaceY >= DAT_MenuModalComposition2::instance.modalMenu.y + && DAT_MouseState::instance.screenSpaceY < DAT_MenuModalComposition2::instance.modalMenu.height + + DAT_MenuModalComposition2::instance.modalMenu.y) { + return; + } + MACRO_CALL_MEMBER(OpenSHC::UI::MenuModalComposition_Func::activateModalDialog, + DAT_MenuModalComposition1::ptr)(OpenSHC::UI::Enums::MMT_NONE, FALSE); + if (DAT_MenuModalComposition1::instance.sliderCallbackFunction != NULL) { + DAT_MenuModalComposition1::instance.sliderCallbackFunction(); + DAT_MenuModalComposition1::instance.minus1 = -1; + } + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/Unused/MenuItemRenderFunction_UnusedOldTitleMenu_ContinueButton.cpp b/src/OpenSHC/UI/MenuItems/Unused/MenuItemRenderFunction_UnusedOldTitleMenu_ContinueButton.cpp new file mode 100644 index 0000000000..ce7dd8e20e --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/Unused/MenuItemRenderFunction_UnusedOldTitleMenu_ContinueButton.cpp @@ -0,0 +1,46 @@ +#include "../Unused.func.hpp" + +#include "OpenSHC/Text/TextManager.func.hpp" +#include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/Rendering/Colors/ColorsEnum.hpp" +#include "OpenSHC/Text/TextAlignment.hpp" +#include "OpenSHC/string-literals.hpp" + +#include "OpenSHC/Globals/COL_BLACK.hpp" +#include "OpenSHC/Globals/COL_WHITE.hpp" +#include "OpenSHC/Globals/DAT_ButtonCurrentlyInteracting.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_PencilRenderCore.hpp" +#include "OpenSHC/Globals/DAT_TextManagerObject.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + using OpenSHC::Text::TextAlignment; + + // FUNCTION: STRONGHOLDCRUSADER 0x0042DEB0 + void Unused::MenuItemRenderFunction_UnusedOldTitleMenu_ContinueButton(int unused, ...) + { + if (DAT_ButtonCurrentlyInteracting::instance) { + DAT_TextManagerObject::instance.textColor = OpenSHC::Rendering::Colors::COL_0000FF; + DAT_PencilRenderCore::instance.otherColorUnk_0x0 = COL_BLACK::instance.shortValue; + } else { + DAT_TextManagerObject::instance.textColor = OpenSHC::Rendering::Colors::COL_000000; + DAT_PencilRenderCore::instance.otherColorUnk_0x0 = COL_WHITE::instance.shortValue; + } + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawColorBox, DAT_PencilRenderCore::ptr)( + DAT_ButtonX::instance, DAT_ButtonY::instance, DAT_ButtonW::instance + DAT_ButtonX::instance, + DAT_ButtonY::instance + DAT_ButtonH::instance, DAT_PencilRenderCore::instance.otherColorUnk_0x0); + // "Continue" + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderTextToScreen, DAT_TextManagerObject::ptr)( + s_Continue_005a22d8, DAT_ButtonX::instance, DAT_ButtonY::instance + 6, + (TextAlignment)DAT_ButtonW::instance, DAT_TextManagerObject::instance.textColor, 17, FALSE, 0); + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/Unused/MenuItemRenderFunction_UnusedOldTitleMenu_TestMapButton.cpp b/src/OpenSHC/UI/MenuItems/Unused/MenuItemRenderFunction_UnusedOldTitleMenu_TestMapButton.cpp new file mode 100644 index 0000000000..ab943a68a5 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/Unused/MenuItemRenderFunction_UnusedOldTitleMenu_TestMapButton.cpp @@ -0,0 +1,46 @@ +#include "../Unused.func.hpp" + +#include "OpenSHC/Text/TextManager.func.hpp" +#include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/Rendering/Colors/ColorsEnum.hpp" +#include "OpenSHC/Text/TextAlignment.hpp" +#include "OpenSHC/string-literals.hpp" + +#include "OpenSHC/Globals/COL_BLACK.hpp" +#include "OpenSHC/Globals/COL_WHITE.hpp" +#include "OpenSHC/Globals/DAT_ButtonCurrentlyInteracting.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_PencilRenderCore.hpp" +#include "OpenSHC/Globals/DAT_TextManagerObject.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + using OpenSHC::Text::TextAlignment; + + // FUNCTION: STRONGHOLDCRUSADER 0x0042DF40 + void Unused::MenuItemRenderFunction_UnusedOldTitleMenu_TestMapButton(int unused, ...) + { + if (DAT_ButtonCurrentlyInteracting::instance) { + DAT_TextManagerObject::instance.textColor = OpenSHC::Rendering::Colors::COL_0000FF; + DAT_PencilRenderCore::instance.otherColorUnk_0x0 = COL_BLACK::instance.shortValue; + } else { + DAT_TextManagerObject::instance.textColor = OpenSHC::Rendering::Colors::COL_000000; + DAT_PencilRenderCore::instance.otherColorUnk_0x0 = COL_WHITE::instance.shortValue; + } + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawColorBox, DAT_PencilRenderCore::ptr)( + DAT_ButtonX::instance, DAT_ButtonY::instance, DAT_ButtonW::instance + DAT_ButtonX::instance, + DAT_ButtonY::instance + DAT_ButtonH::instance, DAT_PencilRenderCore::instance.otherColorUnk_0x0); + // "Test map" + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderTextToScreen, DAT_TextManagerObject::ptr)( + s_Test_map_005a22e4, DAT_ButtonX::instance, DAT_ButtonY::instance + 6, + (TextAlignment)DAT_ButtonW::instance, DAT_TextManagerObject::instance.textColor, 17, FALSE, 0); + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/WaitingForHost/MenuItemActionHandler_WaitingForHost_Button.cpp b/src/OpenSHC/UI/MenuItems/WaitingForHost/MenuItemActionHandler_WaitingForHost_Button.cpp new file mode 100644 index 0000000000..ac88b496e0 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/WaitingForHost/MenuItemActionHandler_WaitingForHost_Button.cpp @@ -0,0 +1,34 @@ +#include "../WaitingForHost.func.hpp" + +#include "OpenSHC/Game/GameCore.func.hpp" +#include "OpenSHC/Input/MouseState.func.hpp" +#include "OpenSHC/Synchrony/GameSynchronyState.func.hpp" +#include "OpenSHC/UI/MenuModalComposition.func.hpp" +#include "OpenSHC/UI/Enums/MenuModalType.hpp" +#include "OpenSHC/UI/Enums/MenuViewType.hpp" + +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" +#include "OpenSHC/Globals/DAT_MenuModalComposition1.hpp" +#include "OpenSHC/Globals/DAT_MouseState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x0047E3E0 + void WaitingForHost::MenuItemActionHandler_WaitingForHost_Button(int button, ...) + { + if (button == 3) { + MACRO_CALL_MEMBER(Synchrony::GameSynchronyState_Func::disconnectDPlay, DAT_GameSynchronyState::ptr)(); + MACRO_CALL_MEMBER(UI::MenuModalComposition_Func::activateModalDialog, DAT_MenuModalComposition1::ptr)( + UI::Enums::MMT_NONE, FALSE); + MACRO_CALL_MEMBER(Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + UI::Enums::MVT_MAIN_MENU, 0); + MACRO_CALL_MEMBER(Input::MouseState_Func::resetMouseState2, DAT_MouseState::ptr)(); + } + } + + } +} +} diff --git a/status/addresses-SHC-3BB0A8C1.txt b/status/addresses-SHC-3BB0A8C1.txt index ed989c9a21..bf68f2b2b6 100644 --- a/status/addresses-SHC-3BB0A8C1.txt +++ b/status/addresses-SHC-3BB0A8C1.txt @@ -6713,7 +6713,7 @@ SHC_3BB0A8C1_0x00425580 | 0.0% | Pending SHC_3BB0A8C1_0x004255D0 | 0.0% | Pending -SHC_3BB0A8C1_0x00425720 | 0.0% | Pending +SHC_3BB0A8C1_0x00425720 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004259BC | 0.0% | Pending @@ -6739,7 +6739,7 @@ SHC_3BB0A8C1_0x00425C0C | 0.0% | Pending SHC_3BB0A8C1_0x00425C10 | 0.0% | Pending -SHC_3BB0A8C1_0x00425C20 | 0.0% | Pending +SHC_3BB0A8C1_0x00425C20 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00425E84 | 0.0% | Pending @@ -6783,7 +6783,7 @@ SHC_3BB0A8C1_0x004268C0 | 0.0% | Pending SHC_3BB0A8C1_0x004269E0 | 0.0% | Pending -SHC_3BB0A8C1_0x00426B80 | 0.0% | Pending +SHC_3BB0A8C1_0x00426B80 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00426C50 | 0.0% | Pending @@ -6791,13 +6791,13 @@ SHC_3BB0A8C1_0x00426CA0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00426D30 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x00426ED0 | 0.0% | Pending +SHC_3BB0A8C1_0x00426ED0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00426F80 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00426FB0 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x00427080 | 0.0% | Pending +SHC_3BB0A8C1_0x00427080 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00427110 | 0.0% | Pending @@ -6871,7 +6871,7 @@ SHC_3BB0A8C1_0x004285C0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004285F0 | 0.0% | Pending -SHC_3BB0A8C1_0x00428980 | 0.0% | Pending +SHC_3BB0A8C1_0x00428980 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00428A38 | 0.0% | Pending @@ -6887,7 +6887,7 @@ SHC_3BB0A8C1_0x00428A4C | 0.0% | Pending SHC_3BB0A8C1_0x00428A50 | 0.0% | Pending -SHC_3BB0A8C1_0x00428A60 | 0.0% | Pending +SHC_3BB0A8C1_0x00428A60 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00428AC0 | 0.0% | Pending @@ -7417,7 +7417,7 @@ SHC_3BB0A8C1_0x0042B45F | 0.0% | Pending SHC_3BB0A8C1_0x0042B460 | 0.0% | Pending -SHC_3BB0A8C1_0x0042B470 | 0.0% | Pending +SHC_3BB0A8C1_0x0042B470 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0042B4C0 | 0.0% | Pending @@ -8253,7 +8253,7 @@ SHC_3BB0A8C1_0x0042D9A0 | 100.0% | Reimplemented, Security Cookie mismatches SHC_3BB0A8C1_0x0042DBB0 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x0042DC60 | 0.0% | Pending +SHC_3BB0A8C1_0x0042DC60 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0042DCB0 | 0.0% | Pending @@ -8261,9 +8261,9 @@ SHC_3BB0A8C1_0x0042DD00 | 0.0% | Pending SHC_3BB0A8C1_0x0042DE20 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x0042DEB0 | 0.0% | Pending +SHC_3BB0A8C1_0x0042DEB0 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x0042DF40 | 0.0% | Pending +SHC_3BB0A8C1_0x0042DF40 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0042DFD0 | 100.0% | Reimplemented @@ -8699,7 +8699,7 @@ SHC_3BB0A8C1_0x0042EA59 | 0.0% | Pending SHC_3BB0A8C1_0x0042EBC0 | 0.0% | Pending -SHC_3BB0A8C1_0x0042EDF0 | 0.0% | Pending +SHC_3BB0A8C1_0x0042EDF0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0042EE80 | 100.0% | Reimplemented @@ -8717,7 +8717,7 @@ SHC_3BB0A8C1_0x0042EF74 | 0.0% | Pending SHC_3BB0A8C1_0x0042EF78 | 0.0% | Pending -SHC_3BB0A8C1_0x0042EF80 | 0.0% | Pending +SHC_3BB0A8C1_0x0042EF80 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0042EFE0 | 100.0% | Reimplemented @@ -8725,7 +8725,7 @@ SHC_3BB0A8C1_0x0042F010 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0042F140 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x0042F2B0 | 0.0% | Pending +SHC_3BB0A8C1_0x0042F2B0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0042F3A8 | 0.0% | Pending @@ -22363,7 +22363,7 @@ SHC_3BB0A8C1_0x0047E240 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0047E3A0 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x0047E3E0 | 0.0% | Pending +SHC_3BB0A8C1_0x0047E3E0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0047E420 | 100.0% | Reimplemented @@ -23427,7 +23427,7 @@ SHC_3BB0A8C1_0x00491C20 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00491C50 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x00491CE0 | 0.0% | Pending +SHC_3BB0A8C1_0x00491CE0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00491D70 | 100.0% | Reimplemented @@ -23505,7 +23505,7 @@ SHC_3BB0A8C1_0x00492A60 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00492A90 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x00492BA0 | 0.0% | Pending +SHC_3BB0A8C1_0x00492BA0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00492C44 | 0.0% | Pending @@ -23551,7 +23551,7 @@ SHC_3BB0A8C1_0x00493050 | 100.0% | Reimplemented, Security Cookie mismatches SHC_3BB0A8C1_0x004931A0 | 0.0% | Pending -SHC_3BB0A8C1_0x004932A0 | 0.0% | Pending +SHC_3BB0A8C1_0x004932A0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004932E0 | 100.0% | Reimplemented @@ -23651,7 +23651,7 @@ SHC_3BB0A8C1_0x00493980 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00493AC0 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x00493BD0 | 0.0% | Pending +SHC_3BB0A8C1_0x00493BD0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00493CE8 | 0.0% | Pending @@ -23751,7 +23751,7 @@ SHC_3BB0A8C1_0x00493D2C | 0.0% | Pending SHC_3BB0A8C1_0x00493D2D | 0.0% | Pending -SHC_3BB0A8C1_0x00493D30 | 0.0% | Pending +SHC_3BB0A8C1_0x00493D30 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00493D80 | 100.0% | Reimplemented @@ -24109,7 +24109,7 @@ SHC_3BB0A8C1_0x004948BE | 0.0% | Pending SHC_3BB0A8C1_0x004948BF | 0.0% | Pending -SHC_3BB0A8C1_0x004948C0 | 0.0% | Pending +SHC_3BB0A8C1_0x004948C0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00494920 | 100.0% | Reimplemented @@ -25963,9 +25963,9 @@ SHC_3BB0A8C1_0x004B0F64 | 0.0% | Pending SHC_3BB0A8C1_0x004B0F68 | 0.0% | Pending -SHC_3BB0A8C1_0x004B0F70 | 0.0% | Pending +SHC_3BB0A8C1_0x004B0F70 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x004B1000 | 0.0% | Pending +SHC_3BB0A8C1_0x004B1000 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004B1090 | 100.0% | Reimplemented @@ -26907,13 +26907,13 @@ SHC_3BB0A8C1_0x004B64D0 | 0.0% | Pending SHC_3BB0A8C1_0x004B6500 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x004B6530 | 0.0% | Pending +SHC_3BB0A8C1_0x004B6530 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004B6560 | 0.0% | Pending -SHC_3BB0A8C1_0x004B65A0 | 0.0% | Pending +SHC_3BB0A8C1_0x004B65A0 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x004B65F0 | 0.0% | Pending +SHC_3BB0A8C1_0x004B65F0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004B6640 | 100.0% | Reimplemented @@ -27627,7 +27627,7 @@ SHC_3BB0A8C1_0x004B9498 | 0.0% | Pending SHC_3BB0A8C1_0x004B949C | 0.0% | Pending -SHC_3BB0A8C1_0x004B94A0 | 0.0% | Pending +SHC_3BB0A8C1_0x004B94A0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004B951C | 0.0% | Pending @@ -29079,7 +29079,7 @@ SHC_3BB0A8C1_0x004BA558 | 0.0% | Pending SHC_3BB0A8C1_0x004BA559 | 0.0% | Pending -SHC_3BB0A8C1_0x004BA560 | 0.0% | Pending +SHC_3BB0A8C1_0x004BA560 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004BA5C0 | 0.0% | Pending @@ -30723,7 +30723,7 @@ SHC_3BB0A8C1_0x004BF711 | 0.0% | Pending SHC_3BB0A8C1_0x004BF712 | 0.0% | Pending -SHC_3BB0A8C1_0x004BF720 | 0.0% | Pending +SHC_3BB0A8C1_0x004BF720 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004BF760 | 100.0% | Reimplemented, only the atol call target differs @@ -35835,7 +35835,7 @@ SHC_3BB0A8C1_0x004D6D20 | 0.0% | Pending SHC_3BB0A8C1_0x004D6EF0 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x004D6F20 | 0.0% | Pending +SHC_3BB0A8C1_0x004D6F20 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004D6F60 | 0.0% | Pending @@ -36049,7 +36049,7 @@ SHC_3BB0A8C1_0x004D9C04 | 0.0% | Pending SHC_3BB0A8C1_0x004D9C08 | 0.0% | Pending -SHC_3BB0A8C1_0x004D9C10 | 0.0% | Pending +SHC_3BB0A8C1_0x004D9C10 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004D9CC0 | 0.0% | Pending @@ -36081,7 +36081,7 @@ SHC_3BB0A8C1_0x004DA044 | 0.0% | Pending SHC_3BB0A8C1_0x004DA048 | 0.0% | Pending -SHC_3BB0A8C1_0x004DA050 | 0.0% | Pending +SHC_3BB0A8C1_0x004DA050 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004DA160 | 0.0% | Pending