diff --git a/src/OpenSHC/UI/MenuItems/BuildMenu/MenuItemActionHandler_BuildMenu_CurrentlySelectedTroops.cpp b/src/OpenSHC/UI/MenuItems/BuildMenu/MenuItemActionHandler_BuildMenu_CurrentlySelectedTroops.cpp new file mode 100644 index 0000000000..064459c841 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/BuildMenu/MenuItemActionHandler_BuildMenu_CurrentlySelectedTroops.cpp @@ -0,0 +1,42 @@ +#include "../BuildMenu.func.hpp" + +#include "OpenSHC/Map/Units/UnitsState.func.hpp" +#include "OpenSHC/Map/Units/UnitTypeInt.hpp" + +#include "OpenSHC/Globals/DAT_RenderingDefinedData.hpp" +#include "OpenSHC/Globals/DAT_UnitsState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + using OpenSHC::Map::Units::UnitTypeInt; + + // FUNCTION: STRONGHOLDCRUSADER 0x004393C0 + void BuildMenu::MenuItemActionHandler_BuildMenu_CurrentlySelectedTroops(int slotID, ...) + { + DAT_UnitsState::instance.unitControlsRelated = 1; + // 20 selection slots: slotID 0-19 keeps only a slot's unit type selected, 20-39 drops it + if (slotID < 20) { + UnitTypeInt const unitType + = DAT_RenderingDefinedData::instance + .SelectionSlotUnitTypes[DAT_UnitsState::instance.selectionSlots[slotID]]; + MACRO_CALL_MEMBER(OpenSHC::Map::Units::UnitsState_Func::queueClickNavigateMenuOrEscape, + DAT_UnitsState::ptr)(unitType); + MACRO_CALL_MEMBER(OpenSHC::Map::Units::UnitsState_Func::filterUnitSelectionForUnitType, + DAT_UnitsState::ptr)(unitType); + MACRO_CALL_MEMBER(OpenSHC::Map::Units::UnitsState_Func::recountUnitsInSelection, DAT_UnitsState::ptr)(); + return; + } + UnitTypeInt const unitType + = DAT_RenderingDefinedData::instance + .SelectionSlotUnitTypes[DAT_UnitsState::instance.selectionSlots[slotID - 20]]; + MACRO_CALL_MEMBER(OpenSHC::Map::Units::UnitsState_Func::queueUnitTypeCommand, DAT_UnitsState::ptr)( + unitType); + MACRO_CALL_MEMBER(OpenSHC::Map::Units::UnitsState_Func::filterUnitSelectionExcludeUnitType, + DAT_UnitsState::ptr)(unitType); + MACRO_CALL_MEMBER(OpenSHC::Map::Units::UnitsState_Func::recountUnitsInSelection, DAT_UnitsState::ptr)(); + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/BuildMenu/MenuItemRenderFunction_BuildMenu_MiniMapInteraction.cpp b/src/OpenSHC/UI/MenuItems/BuildMenu/MenuItemRenderFunction_BuildMenu_MiniMapInteraction.cpp new file mode 100644 index 0000000000..c9c70c1217 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/BuildMenu/MenuItemRenderFunction_BuildMenu_MiniMapInteraction.cpp @@ -0,0 +1,30 @@ +#include "../BuildMenu.func.hpp" + +#include "OpenSHC/UI/Enums/BuildMenuTabType.hpp" +#include "OpenSHC/UI/Enums/MenuViewType.hpp" + +#include "OpenSHC/Globals/DAT_ButtonCurrentlyInteracting.hpp" +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_MinimapViewState.hpp" +#include "OpenSHC/Globals/DAT_TileMapState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x00434300 + void BuildMenu::MenuItemRenderFunction_BuildMenu_MiniMapInteraction(int unused, ...) + { + if (DAT_ButtonCurrentlyInteracting::instance + && DAT_GameCore::instance.currentMenuViewType == OpenSHC::UI::Enums::MVT_BUILD_MENU + && (DAT_GameCore::instance.activeMenuTab.buildMenuTab == OpenSHC::UI::Enums::BMTT_SOLDIERS + || DAT_TileMapState::instance.shiftRelated0or3 == 1)) { + DAT_MinimapViewState::instance.minimapClickEnabled = TRUE; + return; + } + DAT_MinimapViewState::instance.minimapClickEnabled = FALSE; + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_ChangeRations.cpp b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_ChangeRations.cpp new file mode 100644 index 0000000000..657ed62e7b --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_ChangeRations.cpp @@ -0,0 +1,41 @@ +#include "../BuildingAndStatusMenu.func.hpp" + +#include "OpenSHC/Game.func.hpp" +#include "OpenSHC/Synchrony/GameSynchronyState.func.hpp" +#include "OpenSHC/UI/Helpers.func.hpp" +#include "OpenSHC/Commands/GameCommandType.hpp" +#include "OpenSHC/Game/GameMode2.hpp" +#include "OpenSHC/Map/Buildings/BuildingType.hpp" + +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_GameState.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + using OpenSHC::Map::Buildings::BuildingType; + + // FUNCTION: STRONGHOLDCRUSADER 0x00465820 + void BuildingAndStatusMenu::MenuItemActionHandler_BuildingAndStatusMenu_ChangeRations(int rations, ...) + { + if (DAT_GameCore::instance.gameMode_2 == OpenSHC::Game::GM_CRUSADER_TUTORIAL) { + if (!MACRO_CALL(OpenSHC::Game_Func::Tutorial_IsActionAllowed)(3, rations)) { + MACRO_CALL(OpenSHC::UI::Helpers_Func::SetTutorialHintActiveWithTimestamp)(); + return; + } + MACRO_CALL(OpenSHC::UI::Helpers_Func::SetTutorialBuildingActionState)(12, (BuildingType)rations); + } + DAT_GameSynchronyState::instance.DAT_GameCommandParam0 = rations; + MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::queueCommand, DAT_GameSynchronyState::ptr)( + OpenSHC::Commands::GCT_CHANGE_RATIONS); + DAT_GameState::instance.playerDataArray[DAT_GameSynchronyState::instance.currentPlayerSlotID] + .rationsSetting3 = rations; + DAT_GameState::instance.playerDataArray[DAT_GameSynchronyState::instance.currentPlayerSlotID] + .timeTaxesOrRationsChange = timeGetTime(); + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_DrawbridgeOpenClose.cpp b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_DrawbridgeOpenClose.cpp new file mode 100644 index 0000000000..6b5455604e --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_DrawbridgeOpenClose.cpp @@ -0,0 +1,31 @@ +#include "../BuildingAndStatusMenu.func.hpp" + +#include "OpenSHC/Synchrony/GameSynchronyState.func.hpp" +#include "OpenSHC/Commands/GameCommandType.hpp" + +#include "OpenSHC/Globals/DAT_BuildingsState.hpp" +#include "OpenSHC/Globals/DAT_GameState.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x00465360 + void BuildingAndStatusMenu::MenuItemActionHandler_BuildingAndStatusMenu_DrawbridgeOpenClose( + int openOrClose, ...) + { + DAT_GameSynchronyState::instance.DAT_GameCommandParam0 + = DAT_BuildingsState::instance.menuSelectedBuildingID; + DAT_GameSynchronyState::instance.DAT_GameCommandParam1 = openOrClose; + DAT_GameSynchronyState::instance.DAT_GameCommandParam2 + = DAT_BuildingsState::instance.buildings[DAT_BuildingsState::instance.menuSelectedBuildingID].uid; + MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::queueCommand, DAT_GameSynchronyState::ptr)( + OpenSHC::Commands::GCT_UNKNOWN_37); + DAT_GameState::instance.playerDataArray[DAT_GameSynchronyState::instance.currentPlayerSlotID] + .gateOpenOrCloseClick = openOrClose; + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_GatehouseOpenClose.cpp b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_GatehouseOpenClose.cpp new file mode 100644 index 0000000000..36ab8b8fc4 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_GatehouseOpenClose.cpp @@ -0,0 +1,41 @@ +#include "../BuildingAndStatusMenu.func.hpp" + +#include "OpenSHC/Audio/SFX/SFXState.func.hpp" +#include "OpenSHC/Synchrony/GameSynchronyState.func.hpp" +#include "OpenSHC/Audio/SFX/SoundEffectID.hpp" +#include "OpenSHC/Commands/GameCommandType.hpp" + +#include "OpenSHC/Globals/DAT_BuildingsState.hpp" +#include "OpenSHC/Globals/DAT_GameState.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" +#include "OpenSHC/Globals/DAT_SFXState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x00465480 + void BuildingAndStatusMenu::MenuItemActionHandler_BuildingAndStatusMenu_GatehouseOpenClose(int openOrClose, ...) + { + DAT_GameSynchronyState::instance.DAT_GameCommandParam0 + = DAT_BuildingsState::instance.menuSelectedBuildingID; + DAT_GameSynchronyState::instance.DAT_GameCommandParam1 = openOrClose; + DAT_GameSynchronyState::instance.DAT_GameCommandParam2 + = DAT_BuildingsState::instance.buildings[DAT_BuildingsState::instance.menuSelectedBuildingID].uid; + MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::queueCommand, DAT_GameSynchronyState::ptr)( + OpenSHC::Commands::GCT_OPEN_OR_CLOSE_GATE); + DAT_GameState::instance.playerDataArray[DAT_GameSynchronyState::instance.currentPlayerSlotID] + .openOrCloseGateClick = openOrClose; + if (openOrClose == 10) { + MACRO_CALL_MEMBER(OpenSHC::Audio::SFX::SFXState_Func::setUpSFXToPlayUnk, DAT_SFXState::ptr)( + OpenSHC::Audio::SFX::SEID_UNKNOWN_0x8C); + } + if (openOrClose == 11) { + MACRO_CALL_MEMBER(OpenSHC::Audio::SFX::SFXState_Func::setUpSFXToPlayUnk, DAT_SFXState::ptr)( + OpenSHC::Audio::SFX::SEID_UNKNOWN_0x8E); + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_OutpostSliderDelay.cpp b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_OutpostSliderDelay.cpp new file mode 100644 index 0000000000..cab48dc4e8 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_OutpostSliderDelay.cpp @@ -0,0 +1,61 @@ +#include "../BuildingAndStatusMenu.func.hpp" + +#include "OpenSHC/Globals/DAT_BuildingsState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x00466810 + void BuildingAndStatusMenu::MenuItemActionHandler_BuildingAndStatusMenu_OutpostSliderDelay( + int unused, int scrollbarEvent, int* minValue, int* maxValue, int* currentValue) + { + int const buildingID = DAT_BuildingsState::instance.menuSelectedBuildingID; + switch (scrollbarEvent) { + case 1: + *minValue = 0; + *maxValue = 24000; + *currentValue = DAT_BuildingsState::instance.buildings[buildingID].outpostRelatedUnk3; + return; + case 2: + case 3: + DAT_BuildingsState::instance.buildings[DAT_BuildingsState::instance.menuSelectedBuildingID] + .outpostRelatedUnk3 = (short)*currentValue; + return; + case 4: + *currentValue + = DAT_BuildingsState::instance.buildings[DAT_BuildingsState::instance.menuSelectedBuildingID] + .outpostRelatedUnk3; + return; + case 5: { + // through a pointer, as the original does (direct field writes: quick_diff 0.8723 -> 0.4719) + short const delay + = DAT_BuildingsState::instance.buildings[DAT_BuildingsState::instance.menuSelectedBuildingID] + .outpostRelatedUnk3; + short* const delayField + = &DAT_BuildingsState::instance.buildings[DAT_BuildingsState::instance.menuSelectedBuildingID] + .outpostRelatedUnk3; + if (delay > 0) { + *delayField = delay - 1; + } + *currentValue = *delayField; + return; + } + case 6: { + short const delay + = DAT_BuildingsState::instance.buildings[DAT_BuildingsState::instance.menuSelectedBuildingID] + .outpostRelatedUnk3; + short* const delayField + = &DAT_BuildingsState::instance.buildings[DAT_BuildingsState::instance.menuSelectedBuildingID] + .outpostRelatedUnk3; + if (delay < 24000) { + *delayField = delay + 1; + } + *currentValue = *delayField; + } + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_OutpostSliderSize.cpp b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_OutpostSliderSize.cpp new file mode 100644 index 0000000000..467e4accd7 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_OutpostSliderSize.cpp @@ -0,0 +1,61 @@ +#include "../BuildingAndStatusMenu.func.hpp" + +#include "OpenSHC/Globals/DAT_BuildingsState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x00466730 + void BuildingAndStatusMenu::MenuItemActionHandler_BuildingAndStatusMenu_OutpostSliderSize( + int unused, int scrollbarEvent, int* minValue, int* maxValue, int* currentValue) + { + int const buildingID = DAT_BuildingsState::instance.menuSelectedBuildingID; + switch (scrollbarEvent) { + case 1: + *minValue = 0; + *maxValue = 5; + *currentValue = DAT_BuildingsState::instance.buildings[buildingID].outpostRelatedUnk2; + return; + case 2: + case 3: + DAT_BuildingsState::instance.buildings[DAT_BuildingsState::instance.menuSelectedBuildingID] + .outpostRelatedUnk2 = (short)*currentValue; + return; + case 4: + *currentValue + = DAT_BuildingsState::instance.buildings[DAT_BuildingsState::instance.menuSelectedBuildingID] + .outpostRelatedUnk2; + return; + case 5: { + // through a pointer, as the original does (direct field writes: quick_diff 0.8723 -> 0.4719) + short const size + = DAT_BuildingsState::instance.buildings[DAT_BuildingsState::instance.menuSelectedBuildingID] + .outpostRelatedUnk2; + short* const sizeField + = &DAT_BuildingsState::instance.buildings[DAT_BuildingsState::instance.menuSelectedBuildingID] + .outpostRelatedUnk2; + if (size > 0) { + *sizeField = size - 1; + } + *currentValue = *sizeField; + return; + } + case 6: { + short const size + = DAT_BuildingsState::instance.buildings[DAT_BuildingsState::instance.menuSelectedBuildingID] + .outpostRelatedUnk2; + short* const sizeField + = &DAT_BuildingsState::instance.buildings[DAT_BuildingsState::instance.menuSelectedBuildingID] + .outpostRelatedUnk2; + if (size < 5) { + *sizeField = size + 1; + } + *currentValue = *sizeField; + } + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_SelectBuySellGoods.cpp b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_SelectBuySellGoods.cpp new file mode 100644 index 0000000000..92ede2eaaa --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_SelectBuySellGoods.cpp @@ -0,0 +1,32 @@ +#include "../BuildingAndStatusMenu.func.hpp" + +#include "OpenSHC/Game/GameCore.func.hpp" +#include "OpenSHC/Game/GameStateStructures.func.hpp" +#include "OpenSHC/UI/Enums/BuildingsAndStatusMenuTabType.hpp" +#include "OpenSHC/UI/Enums/MenuViewType.hpp" + +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_GameState.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004659E0 + void BuildingAndStatusMenu::MenuItemActionHandler_BuildingAndStatusMenu_SelectBuySellGoods( + int resourceType, ...) + { + if (MACRO_CALL_MEMBER(Game::GameStateStructures_Func::isResourceTypeTradeable, DAT_GameState::ptr)( + (Game::Resources::ResourceType)resourceType)) { + DAT_GameState::instance.playerDataArray[DAT_GameSynchronyState::instance.currentPlayerSlotID] + .marketSelectedResourceType = resourceType; + DAT_GameCore::instance.buildingandstatusmenuMenuTabToSwitchTo = UI::Enums::BASMTT_MARKETPLACE_TRADE; + MACRO_CALL_MEMBER(Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + UI::Enums::MVT_BUILDING_AND_STATUS_MENU, 0); + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_StatusMenuButtons.cpp b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_StatusMenuButtons.cpp new file mode 100644 index 0000000000..94d5d4dc42 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_StatusMenuButtons.cpp @@ -0,0 +1,38 @@ +#include "../BuildingAndStatusMenu.func.hpp" + +#include "OpenSHC/Game/GameCore.func.hpp" +#include "OpenSHC/UI/Helpers.func.hpp" +#include "OpenSHC/Game/GameMode2.hpp" +#include "OpenSHC/Map/Buildings/BuildingType.hpp" +#include "OpenSHC/UI/Enums/BuildingsAndStatusMenuTabType.hpp" +#include "OpenSHC/UI/Enums/MenuViewType.hpp" + +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/INT_00b96120.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + using Map::Buildings::BuildingType; + + // FUNCTION: STRONGHOLDCRUSADER 0x0043E490 + void BuildingAndStatusMenu::MenuItemActionHandler_BuildingAndStatusMenu_StatusMenuButtons(int tabType, ...) + { + if (tabType == UI::Enums::BASMTT_STATUS_OVERVIEW + && DAT_GameCore::instance.buildingandstatusmenuMenuTabToSwitchTo == UI::Enums::BASMTT_STATUS_FOOD + && INT_00b96120::instance == UI::Enums::BASMTT_GRANARY_OR_MPMENU_TCPIP) { + tabType = UI::Enums::BASMTT_GRANARY_OR_MPMENU_TCPIP; + } + DAT_GameCore::instance.buildingandstatusmenuMenuTabToSwitchTo = tabType; + MACRO_CALL_MEMBER(Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + UI::Enums::MVT_BUILDING_AND_STATUS_MENU, 0); + if (DAT_GameCore::instance.gameMode_2 == Game::GM_CRUSADER_TUTORIAL + && tabType != UI::Enums::BASMTT_STATUS_OVERVIEW) { + MACRO_CALL(UI::Helpers_Func::SetTutorialBuildingActionState)(15, (BuildingType)tabType); + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_TaxSlider.cpp b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_TaxSlider.cpp new file mode 100644 index 0000000000..b363edb87d --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_TaxSlider.cpp @@ -0,0 +1,56 @@ +#include "../BuildingAndStatusMenu.func.hpp" + +#include "OpenSHC/Globals/DAT_GameState.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x00465560 + void BuildingAndStatusMenu::MenuItemActionHandler_BuildingAndStatusMenu_TaxSlider( + int unused, int scrollbarEvent, int* minValue, int* maxValue, int* currentValue) + { + switch (scrollbarEvent) { + case 1: + *minValue = 0; + *maxValue = 11; + // falls through: the first event also reads the current value + case 4: + *currentValue + = DAT_GameState::instance.playerDataArray[DAT_GameSynchronyState::instance.currentPlayerSlotID] + .taxesSliderUI; + return; + case 2: + case 3: + DAT_GameState::instance.playerDataArray[DAT_GameSynchronyState::instance.currentPlayerSlotID] + .taxesSliderUI = *currentValue; + return; + case 5: + if (DAT_GameState::instance.playerDataArray[DAT_GameSynchronyState::instance.currentPlayerSlotID] + .taxesSliderUI + > 0) { + --DAT_GameState::instance.playerDataArray[DAT_GameSynchronyState::instance.currentPlayerSlotID] + .taxesSliderUI; + } + *currentValue + = DAT_GameState::instance.playerDataArray[DAT_GameSynchronyState::instance.currentPlayerSlotID] + .taxesSliderUI; + return; + case 6: + if (DAT_GameState::instance.playerDataArray[DAT_GameSynchronyState::instance.currentPlayerSlotID] + .taxesSliderUI + < 11) { + ++DAT_GameState::instance.playerDataArray[DAT_GameSynchronyState::instance.currentPlayerSlotID] + .taxesSliderUI; + } + *currentValue + = DAT_GameState::instance.playerDataArray[DAT_GameSynchronyState::instance.currentPlayerSlotID] + .taxesSliderUI; + return; + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_WorkshopWeaponSelection.cpp b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_WorkshopWeaponSelection.cpp new file mode 100644 index 0000000000..c630c6c570 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemActionHandler_BuildingAndStatusMenu_WorkshopWeaponSelection.cpp @@ -0,0 +1,60 @@ +#include "../BuildingAndStatusMenu.func.hpp" + +#include "OpenSHC/Synchrony/GameSynchronyState.func.hpp" +#include "OpenSHC/Commands/GameCommandType.hpp" +#include "OpenSHC/Game/Resources/ResourceType.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" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + using OpenSHC::Game::Resources::ResourceType; + + // FUNCTION: STRONGHOLDCRUSADER 0x00465200 + void BuildingAndStatusMenu::MenuItemActionHandler_BuildingAndStatusMenu_WorkshopWeaponSelection( + ResourceType weapon, ...) + { + if (weapon == OpenSHC::Game::Resources::RT_CROSSBOW) { + if (DAT_GameCore::instance.xbowProducible_logic == 0) { + return; + } + } else if (weapon == OpenSHC::Game::Resources::RT_BOW) { + if (DAT_GameCore::instance.bowProducible_logic == 0) { + return; + } + } else if (weapon == OpenSHC::Game::Resources::RT_PIKE) { + if (DAT_GameCore::instance.pikeProducible_logic == 0) { + return; + } + } else if (weapon == OpenSHC::Game::Resources::RT_SPEAR) { + if (DAT_GameCore::instance.spearProducible_logic == 0) { + return; + } + } else if (weapon == OpenSHC::Game::Resources::RT_SWORD) { + if (DAT_GameCore::instance.swordProducible_logic == 0) { + return; + } + } else if (weapon == OpenSHC::Game::Resources::RT_MACE) { + if (DAT_GameCore::instance.maceProducible_logic == 0) { + return; + } + } + DAT_GameSynchronyState::instance.DAT_GameCommandParam0 + = DAT_BuildingsState::instance.menuSelectedBuildingID; + DAT_GameSynchronyState::instance.DAT_GameCommandParam1 = weapon; + DAT_GameSynchronyState::instance.DAT_GameCommandParam2 + = DAT_BuildingsState::instance.buildings[DAT_BuildingsState::instance.menuSelectedBuildingID].uid; + MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::queueCommand, DAT_GameSynchronyState::ptr)( + OpenSHC::Commands::GCT_UNKNOWN_33); + DAT_GameState::instance.playerDataArray[DAT_GameSynchronyState::instance.currentPlayerSlotID].weaponRelated + = weapon; + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemRenderFunction_BuildingAndStatusMenu_ArmyStatusReturn.cpp b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemRenderFunction_BuildingAndStatusMenu_ArmyStatusReturn.cpp new file mode 100644 index 0000000000..8e74641b38 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemRenderFunction_BuildingAndStatusMenu_ArmyStatusReturn.cpp @@ -0,0 +1,50 @@ +#include "../BuildingAndStatusMenu.func.hpp" + +#include "OpenSHC/Game/GameStateStructures.func.hpp" +#include "OpenSHC/Map/Units/UnitsState.func.hpp" +#include "OpenSHC/UI/DisplayElements.func.hpp" +#include "OpenSHC/UI/MenuItems/General.func.hpp" +#include "OpenSHC/Game/GameMode2.hpp" +#include "OpenSHC/Map/MapType2.hpp" +#include "OpenSHC/UI/Enums/DisplayElementID.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_MapPropertiesState.hpp" +#include "OpenSHC/Globals/DAT_UnitsState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x0043FCB0 + void BuildingAndStatusMenu::MenuItemRenderFunction_BuildingAndStatusMenu_ArmyStatusReturn(int unused, ...) + { + if ((((DAT_GameCore::instance.gameMode_2 == OpenSHC::Game::GM_BUILDERUnk + || DAT_GameCore::instance.gameMode_2 == OpenSHC::Game::GM_CRUSADER_TUTORIAL) + && DAT_GameSynchronyState::instance.currentPlayerSlotID == 2) + || (DAT_GameSynchronyState::instance.currentPlayerSlotID == 1 + && MACRO_CALL_MEMBER( + OpenSHC::Game::GameStateStructures_Func::singlePlayerHasKeepAndGranaryCheck, + DAT_GameState::ptr)() + == 0 + && MACRO_CALL_MEMBER(OpenSHC::Map::Units::UnitsState_Func::getArmySize, DAT_UnitsState::ptr)( + DAT_GameSynchronyState::instance.currentPlayerSlotID) + != 0) + || (DAT_GameCore::instance.gameMode_2 == OpenSHC::Game::GM_BUILDERUnk + && DAT_MapPropertiesState::instance.SEC_U3_MapType2_1 == OpenSHC::Map::MT_SIEGE)) + && !MACRO_CALL(OpenSHC::UI::DisplayElements_Func::GetIfDisplayElementStateNotZero)( + OpenSHC::UI::Enums::DEID_KEEP_AND_GRANERY_PLACEMENT_INFO)) { + 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/BuildingAndStatusMenu/MenuItemRenderFunction_BuildingAndStatusMenu_DisableFoodType.cpp b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemRenderFunction_BuildingAndStatusMenu_DisableFoodType.cpp new file mode 100644 index 0000000000..efab58fa7e --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemRenderFunction_BuildingAndStatusMenu_DisableFoodType.cpp @@ -0,0 +1,46 @@ +#include "../BuildingAndStatusMenu.func.hpp" + +#include "OpenSHC/UI/MenuItems/General.func.hpp" +#include "OpenSHC/UI/Rendering/TextureRenderCore.func.hpp" +#include "OpenSHC/Game/GameMode.hpp" +#include "OpenSHC/IO/Graphics/GmID.hpp" +#include "OpenSHC/Rendering/Enums/RenderTarget.hpp" + +#include "OpenSHC/Globals/DAT_ButtonCurrentlyInteracting.hpp" +#include "OpenSHC/Globals/DAT_ButtonX.hpp" +#include "OpenSHC/Globals/DAT_ButtonY.hpp" +#include "OpenSHC/Globals/DAT_GameState.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" +#include "OpenSHC/Globals/DAT_TextureRenderCoreObject.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x0043FBF0 + void BuildingAndStatusMenu::MenuItemRenderFunction_BuildingAndStatusMenu_DisableFoodType(int foodType, ...) + { + if (DAT_GameSynchronyState::instance.currentGameMode != OpenSHC::Game::GM_SOLITARY) { + DAT_ButtonCurrentlyInteracting::instance = FALSE; + } + MACRO_CALL(OpenSHC::UI::MenuItems::General_Func:: + MenuItemRenderFunction_General_RenderCurrentButtonWithPossibleAlphaTexOnScreenMenuSurface)(); + if (DAT_GameState::instance.playerDataArray[DAT_GameSynchronyState::instance.currentPlayerSlotID] + .isFoodTypeBanned[foodType]) { + int iconOffsetX = 8; + int iconOffsetY = 2; + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_SCREEN_MENU; + if (foodType == 1) { + iconOffsetX = 4; + iconOffsetY = 0; + } + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGMWithBlending, + DAT_TextureRenderCoreObject::ptr)(OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_2, 45, + DAT_ButtonX::instance - 4 + iconOffsetX, DAT_ButtonY::instance - 45 + iconOffsetY, 6); + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_MAP_GAME; + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemRenderFunction_BuildingAndStatusMenu_HorizontalSlider.cpp b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemRenderFunction_BuildingAndStatusMenu_HorizontalSlider.cpp new file mode 100644 index 0000000000..35c3ab81f5 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemRenderFunction_BuildingAndStatusMenu_HorizontalSlider.cpp @@ -0,0 +1,37 @@ +#include "../BuildingAndStatusMenu.func.hpp" + +#include "OpenSHC/UI/Rendering/TextureRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eGM.hpp" +#include "OpenSHC/Rendering/Enums/RenderTarget.hpp" +#include "OpenSHC/WindowsHelper/Enums/BOOLEnum.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 MenuItems { + + using OpenSHC::WindowsHelper::Enums::BOOLEnum; + + // FUNCTION: STRONGHOLDCRUSADER 0x00465630 + void BuildingAndStatusMenu::MenuItemRenderFunction_BuildingAndStatusMenu_HorizontalSlider( + int unused, int thumbXPos, int sliderValue, int thumbWidth, BOOLEnum isDragged) + { + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_SCREEN_MENU; + for (int trackOffset = 0; trackOffset < DAT_ButtonW::instance; trackOffset += 26) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGM, + DAT_TextureRenderCoreObject::ptr)(OpenSHC::DE::SHCDE::GM_INTERFACE_ICONS2, 281, + DAT_ButtonX::instance + trackOffset, DAT_ButtonY::instance); + } + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGM, + DAT_TextureRenderCoreObject::ptr)(OpenSHC::DE::SHCDE::GM_INTERFACE_ICONS2, 280, + DAT_ButtonX::instance + thumbXPos, DAT_ButtonY::instance - 5); + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_MAP_GAME; + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemRenderFunction_BuildingAndStatusMenu_StatusMainMenuButtons.cpp b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemRenderFunction_BuildingAndStatusMenu_StatusMainMenuButtons.cpp new file mode 100644 index 0000000000..35e5ce42ee --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemRenderFunction_BuildingAndStatusMenu_StatusMainMenuButtons.cpp @@ -0,0 +1,39 @@ +#include "../BuildingAndStatusMenu.func.hpp" + +#include "OpenSHC/Text/TextManager.func.hpp" +#include "OpenSHC/UI/MenuItems/General.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" +#include "OpenSHC/Rendering/Colors/ColorsEnum.hpp" +#include "OpenSHC/Text/TextAlignment.hpp" +#include "OpenSHC/UI/Enums/BuildingsAndStatusMenuTabType.hpp" +#include "OpenSHC/UI/Enums/MenuModalType.hpp" + +#include "OpenSHC/Globals/DAT_ButtonW.hpp" +#include "OpenSHC/Globals/DAT_ButtonX.hpp" +#include "OpenSHC/Globals/DAT_ButtonY.hpp" +#include "OpenSHC/Globals/DAT_MenuTextInputState.hpp" +#include "OpenSHC/Globals/DAT_TextManagerObject.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x0043E4E0 + void BuildingAndStatusMenu::MenuItemRenderFunction_BuildingAndStatusMenu_StatusMainMenuButtons(int tabType, ...) + { + if (DAT_MenuTextInputState::instance.currentModalDialog == OpenSHC::UI::Enums::MMT_NO_MENU) { + MACRO_CALL(OpenSHC::UI::MenuItems::General_Func:: + MenuItemRenderFunction_General_RenderCurrentButtonWithPossibleAlphaTexOnScreenMenuSurface)(); + int const textX = DAT_ButtonW::instance / 2 + DAT_ButtonX::instance; + int const textY = DAT_ButtonY::instance + 10; + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderTextToScreen, DAT_TextManagerObject::ptr)( + MACRO_CALL_MEMBER( + OpenSHC::Text::TextManager_Func::getTextStringInGroupAtOffset, DAT_TextManagerObject::ptr)( + OpenSHC::DE::SHCDE::TEXT_REPORT_BUTTONS, tabType - UI::Enums::BASMTT_STATUS_OVERVIEW), + textX, textY, OpenSHC::Text::TTA_CENTER, OpenSHC::Rendering::Colors::COL_000000, 19, FALSE, 0); + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemRenderFunction_BuildingAndStatusMenu_TaxArrowButtons.cpp b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemRenderFunction_BuildingAndStatusMenu_TaxArrowButtons.cpp new file mode 100644 index 0000000000..d6cf391fd2 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/BuildingAndStatusMenu/MenuItemRenderFunction_BuildingAndStatusMenu_TaxArrowButtons.cpp @@ -0,0 +1,35 @@ +#include "../BuildingAndStatusMenu.func.hpp" + +#include "OpenSHC/Text/TextManager.func.hpp" +#include "OpenSHC/UI/MenuItems/General.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" +#include "OpenSHC/Rendering/Colors/ColorsEnum.hpp" +#include "OpenSHC/Text/TextAlignment.hpp" + +#include "OpenSHC/Globals/DAT_ButtonW.hpp" +#include "OpenSHC/Globals/DAT_ButtonX.hpp" +#include "OpenSHC/Globals/DAT_ButtonY.hpp" +#include "OpenSHC/Globals/DAT_TextManagerObject.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004657B0 + void BuildingAndStatusMenu::MenuItemRenderFunction_BuildingAndStatusMenu_TaxArrowButtons(int action, ...) + { + MACRO_CALL(OpenSHC::UI::MenuItems::General_Func:: + MenuItemRenderFunction_General_RenderCurrentButtonWithPossibleAlphaTexOnScreenMenuSurface)(); + if (action >= 0) { + int const textY = DAT_ButtonY::instance + 4; + int const textX = DAT_ButtonW::instance / 2 + DAT_ButtonX::instance; + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderTextToScreen, DAT_TextManagerObject::ptr)( + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::getTextStringInGroupAtOffset, + DAT_TextManagerObject::ptr)(OpenSHC::DE::SHCDE::TEXT_IN_KEEP, action), + textX, textY, OpenSHC::Text::TTA_CENTER, OpenSHC::Rendering::Colors::COL_000000, 17, FALSE, 0); + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/Chat/MenuItemRenderFunction_Chat_TauntButtons.cpp b/src/OpenSHC/UI/MenuItems/Chat/MenuItemRenderFunction_Chat_TauntButtons.cpp new file mode 100644 index 0000000000..0485901fc9 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/Chat/MenuItemRenderFunction_Chat_TauntButtons.cpp @@ -0,0 +1,41 @@ +#include "../Chat.func.hpp" + +#include "OpenSHC/Text/TextManager.func.hpp" +#include "OpenSHC/UI/Rendering/AlphaAndButtonSurface.func.hpp" +#include "OpenSHC/Rendering/Colors/ColorsEnum.hpp" +#include "OpenSHC/Rendering/Enums/RenderTarget.hpp" +#include "OpenSHC/Text/TextAlignment.hpp" + +#include "OpenSHC/Globals/AlphaAndButtonSurfaceObj.hpp" +#include "OpenSHC/Globals/DAT_ButtonCurrentlyInteracting.hpp" +#include "OpenSHC/Globals/DAT_ButtonX.hpp" +#include "OpenSHC/Globals/DAT_ButtonY.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" +#include "OpenSHC/Globals/DAT_TextManagerObject.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x0047FFE0 + void Chat::MenuItemRenderFunction_Chat_TauntButtons(int taunt, ...) + { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::AlphaAndButtonSurface_Func::renderBasicButton, + AlphaAndButtonSurfaceObj::ptr)(0, OpenSHC::Rendering::Enums::RT_CONTEXT_BASED); + if (taunt < 10) { + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderNumberToScreen2, DAT_TextManagerObject::ptr)( + taunt, DAT_ButtonX::instance + 12, DAT_ButtonY::instance + 9, OpenSHC::Text::TTA_LEFT, + OpenSHC::Rendering::Colors::COL_CCFAFF, 19, FALSE, 0); + } else { + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderNumberToScreen2, DAT_TextManagerObject::ptr)( + taunt, DAT_ButtonX::instance + 9, DAT_ButtonY::instance + 9, OpenSHC::Text::TTA_LEFT, + OpenSHC::Rendering::Colors::COL_CCFAFF, 19, FALSE, 0); + } + if (DAT_ButtonCurrentlyInteracting::instance) { + DAT_GameSynchronyState::instance.DAT_InsultTextIndex = taunt; + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/ChooseNetworkServiceProvider/MenuItemActionHandler_ChooseNetworkServiceProvider_ModemScrollbarUnk.cpp b/src/OpenSHC/UI/MenuItems/ChooseNetworkServiceProvider/MenuItemActionHandler_ChooseNetworkServiceProvider_ModemScrollbarUnk.cpp new file mode 100644 index 0000000000..adc421c0bb --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/ChooseNetworkServiceProvider/MenuItemActionHandler_ChooseNetworkServiceProvider_ModemScrollbarUnk.cpp @@ -0,0 +1,32 @@ +#include "../ChooseNetworkServiceProvider.func.hpp" + +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x0047D070 + void ChooseNetworkServiceProvider::MenuItemActionHandler_ChooseNetworkServiceProvider_ModemScrollbarUnk( + int unused, int scrollbarEvent, int* minValue, int* maxValue, int* currentValue) + { + // four modems fit in the list + switch (scrollbarEvent) { + case 1: + *minValue = 0; + *maxValue = DAT_GameSynchronyState::instance.modemScrollbarCount - 4; + *currentValue = DAT_GameSynchronyState::instance.modemScrollBarOffset; + return; + case 2: + case 3: + DAT_GameSynchronyState::instance.modemScrollBarOffset = *currentValue; + return; + case 4: + *currentValue = DAT_GameSynchronyState::instance.modemScrollBarOffset; + *maxValue = DAT_GameSynchronyState::instance.modemScrollbarCount - 4; + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/ChooseNetworkServiceProvider/MenuItemActionHandler_ChooseNetworkServiceProvider_ProviderScrollbarUnk.cpp b/src/OpenSHC/UI/MenuItems/ChooseNetworkServiceProvider/MenuItemActionHandler_ChooseNetworkServiceProvider_ProviderScrollbarUnk.cpp new file mode 100644 index 0000000000..dbf56cda75 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/ChooseNetworkServiceProvider/MenuItemActionHandler_ChooseNetworkServiceProvider_ProviderScrollbarUnk.cpp @@ -0,0 +1,49 @@ +#include "../ChooseNetworkServiceProvider.func.hpp" + +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x0047CA80 + void ChooseNetworkServiceProvider::MenuItemActionHandler_ChooseNetworkServiceProvider_ProviderScrollbarUnk( + int unused, int scrollbarEvent, int* minValue, int* maxValue, int* currentValue) + { + // four providers fit in the list + switch (scrollbarEvent) { + case 1: + *minValue = 0; + *maxValue = DAT_GameSynchronyState::instance.scrollBarItemCount - 4; + *currentValue = DAT_GameSynchronyState::instance.scrollBarItemOffset; + return; + case 2: + case 3: + DAT_GameSynchronyState::instance.scrollBarItemOffset = *currentValue; + return; + case 4: + *currentValue = DAT_GameSynchronyState::instance.scrollBarItemOffset; + return; + case 5: + // Stores and returns here rather than through the shared store below, as the original does. + if (DAT_GameSynchronyState::instance.scrollBarItemOffset > 0) { + --DAT_GameSynchronyState::instance.scrollBarItemOffset; + *currentValue = DAT_GameSynchronyState::instance.scrollBarItemOffset; + return; + } + break; + case 6: + if (DAT_GameSynchronyState::instance.scrollBarItemOffset + < DAT_GameSynchronyState::instance.scrollBarItemCount - 4) { + ++DAT_GameSynchronyState::instance.scrollBarItemOffset; + } + break; + default: + return; + } + *currentValue = DAT_GameSynchronyState::instance.scrollBarItemOffset; + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/ChooseNetworkServiceProvider/MenuItemActionHandler_ChooseNetworkServiceProvider_ProviderTableRows.cpp b/src/OpenSHC/UI/MenuItems/ChooseNetworkServiceProvider/MenuItemActionHandler_ChooseNetworkServiceProvider_ProviderTableRows.cpp new file mode 100644 index 0000000000..0a0bbbf228 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/ChooseNetworkServiceProvider/MenuItemActionHandler_ChooseNetworkServiceProvider_ProviderTableRows.cpp @@ -0,0 +1,42 @@ +#include "../ChooseNetworkServiceProvider.func.hpp" + +#include "OpenSHC/Synchrony/GameSynchronyState.func.hpp" +#include "OpenSHC/Text/UserTextHandler.func.hpp" +#include "OpenSHC/Text/TextArrayIndexType.hpp" +#include "OpenSHC/UI/Enums/BuildingsAndStatusMenuTabType.hpp" + +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" +#include "OpenSHC/Globals/DAT_UserTextHandlerState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x00487200 + void ChooseNetworkServiceProvider::MenuItemActionHandler_ChooseNetworkServiceProvider_ProviderTableRows( + int row, ...) + { + if (DAT_GameSynchronyState::instance.scrollBarItemOffset + row + >= DAT_GameSynchronyState::instance.scrollBarItemCount) { + return; + } + DAT_GameSynchronyState::instance.selectedProviderIndex = row; + MACRO_CALL_MEMBER(OpenSHC::Synchrony::GameSynchronyState_Func::setMenuTypeBasedOnDirectPlayGUID, + DAT_GameSynchronyState::ptr)(); + // a sparse switch; the TCPIP arm comes first in the original's layout + switch (DAT_GameCore::instance.activeMenuTab.tabType) { + case OpenSHC::UI::Enums::BASMTT_GRANARY_OR_MPMENU_TCPIP: + MACRO_CALL_MEMBER(OpenSHC::Text::UserTextHandler_Func::resetToTextIndex, DAT_UserTextHandlerState::ptr)( + OpenSHC::Text::TAIT_FIVE__NUMERIC_DOT); + break; + case OpenSHC::UI::Enums::BASMTT_BARRACKS_OR_MPMENU_MODEM: + MACRO_CALL_MEMBER(OpenSHC::Text::UserTextHandler_Func::resetToTextIndex, DAT_UserTextHandlerState::ptr)( + OpenSHC::Text::TAIT_SEVEN__NUMERIC_ONLY); + break; + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/ChooseNetworkServiceProvider/MenuItemRenderFunction_ChooseNetworkServiceProvider_ModemTableRows.cpp b/src/OpenSHC/UI/MenuItems/ChooseNetworkServiceProvider/MenuItemRenderFunction_ChooseNetworkServiceProvider_ModemTableRows.cpp new file mode 100644 index 0000000000..057b35f9b8 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/ChooseNetworkServiceProvider/MenuItemRenderFunction_ChooseNetworkServiceProvider_ModemTableRows.cpp @@ -0,0 +1,49 @@ +#include "../ChooseNetworkServiceProvider.func.hpp" + +#include "OpenSHC/Text/TextManager.func.hpp" +#include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/Rendering/Colors/ColorsEnum.hpp" +#include "OpenSHC/Rendering/Enums/RenderTarget.hpp" +#include "OpenSHC/Text/TextAlignment.hpp" + +#include "OpenSHC/Globals/DAT_ButtonCurrentlyInteracting.hpp" +#include "OpenSHC/Globals/DAT_ButtonX.hpp" +#include "OpenSHC/Globals/DAT_ButtonY.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" +#include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" +#include "OpenSHC/Globals/DAT_TextManagerObject.hpp" +#include "OpenSHC/Globals/DAT_TextureRenderCoreObject.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x0047D100 + void ChooseNetworkServiceProvider::MenuItemRenderFunction_ChooseNetworkServiceProvider_ModemTableRows( + int row, ...) + { + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_SCREEN_MENU; + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawTableCellBackground, + DAT_PencilRenderCore::ptr)(row == DAT_GameSynchronyState::instance.modemScrollbarIndex, row, 0); + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_MAP_GAME; + if (DAT_GameSynchronyState::instance.modemScrollBarOffset + row + >= DAT_GameSynchronyState::instance.modemScrollbarCount) { + return; + } + // set in both branches: a preset colour overridden in one costs two instructions + uint color; + if (row == DAT_GameSynchronyState::instance.modemScrollbarIndex + || DAT_ButtonCurrentlyInteracting::instance) { + color = OpenSHC::Rendering::Colors::COL_CCFAFF; + } else { + color = OpenSHC::Rendering::Colors::COL_C2F0EB; + } + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderTextToScreen, DAT_TextManagerObject::ptr)( + DAT_GameSynchronyState::instance + .stringPointerArray[DAT_GameSynchronyState::instance.modemScrollBarOffset + row], + DAT_ButtonX::instance + 8, DAT_ButtonY::instance + 4, OpenSHC::Text::TTA_LEFT, color, 18, FALSE, 0); + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/CrusadeEndscreen/MenuItemActionHandler_CrusadeEndscreen_Main.cpp b/src/OpenSHC/UI/MenuItems/CrusadeEndscreen/MenuItemActionHandler_CrusadeEndscreen_Main.cpp new file mode 100644 index 0000000000..8ac0d3f38c --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/CrusadeEndscreen/MenuItemActionHandler_CrusadeEndscreen_Main.cpp @@ -0,0 +1,36 @@ +#include "../CrusadeEndscreen.func.hpp" + +#include "OpenSHC/UI/MenuItems/SelectCrusade.func.hpp" +#include "OpenSHC/Game/TrailType.hpp" +#include "OpenSHC/Game/TrailTypeInt.hpp" + +#include "OpenSHC/Globals/DAT_GameCore.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + using Game::TrailTypeInt; + + // FUNCTION: STRONGHOLDCRUSADER 0x004D9230 + void CrusadeEndscreen::MenuItemActionHandler_CrusadeEndscreen_Main(int button, ...) + { + if (button != 10) { + return; + } + + TrailTypeInt const trailType = DAT_GameCore::instance.currentTrailType; + if (trailType == Game::TT_EXTREME) { + MACRO_CALL(UI::MenuItems::SelectCrusade_Func::MenuItemActionHandler_SelectCrusade_Main)(4); + return; + } + if (trailType == Game::TT_WARCHEST) { + MACRO_CALL(UI::MenuItems::SelectCrusade_Func::MenuItemActionHandler_SelectCrusade_Main)(3); + return; + } + MACRO_CALL(UI::MenuItems::SelectCrusade_Func::MenuItemActionHandler_SelectCrusade_Main)(1); + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/CustomScenarios/MenuItemActionHandler_CustomScenarios_Main.cpp b/src/OpenSHC/UI/MenuItems/CustomScenarios/MenuItemActionHandler_CustomScenarios_Main.cpp new file mode 100644 index 0000000000..9b7af20b23 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/CustomScenarios/MenuItemActionHandler_CustomScenarios_Main.cpp @@ -0,0 +1,82 @@ +#include "../CustomScenarios.func.hpp" + +#include "OpenSHC/Game/GameCore.func.hpp" +#include "OpenSHC/Game/GameStateStructures.func.hpp" +#include "OpenSHC/UI/Helpers.func.hpp" +#include "OpenSHC/UI/MenuTextInputState.func.hpp" +#include "OpenSHC/Game/GameMode2.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_GameState.hpp" +#include "OpenSHC/Globals/DAT_MapMissionType.hpp" +#include "OpenSHC/Globals/DAT_MenuTextInputState.hpp" +#include "OpenSHC/Globals/INT_00b95b64.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x00440770 + void CustomScenarios::MenuItemActionHandler_CustomScenarios_Main(int button, ...) + { + switch (button) { + case 1: + DAT_MenuTextInputState::instance.dialogResult = 0; + DAT_MenuTextInputState::instance.field_0x9c = 1; + MACRO_CALL_MEMBER(UI::MenuTextInputState_Func::activateLoadOrSaveMapUI, DAT_MenuTextInputState::ptr)( + UI::Enums::MMT_LOAD_MAP); + return; + case 2: + MACRO_CALL(UI::Helpers_Func::InitializeBasicMap)(); + DAT_GameCore::instance.U2_mapType_singleOrMulti = 0; + MACRO_CALL_MEMBER(Game::GameCore_Func::switchToMenuView, DAT_GameCore::ptr)( + UI::Enums::MVT_NEW_MAP_MAPTYPE, 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: + 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 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.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 = 3; + INT_00b95b64::instance = 1; + DAT_GameCore::instance.standaloneFilename[0] = '\0'; + DAT_GameState::instance.mapAndTime.difficulty = DAT_GameCore::instance.missionDifficulty_3; + DAT_GameCore::instance.menuTabToSwitchTo.tabType = 1; + 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/DisableWeapon/MenuItemActionHandler_DisableWeapon_Main.cpp b/src/OpenSHC/UI/MenuItems/DisableWeapon/MenuItemActionHandler_DisableWeapon_Main.cpp new file mode 100644 index 0000000000..1c8a724115 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/DisableWeapon/MenuItemActionHandler_DisableWeapon_Main.cpp @@ -0,0 +1,42 @@ +#include "../DisableWeapon.func.hpp" + +#include "OpenSHC/UI/MenuModalComposition.func.hpp" +#include "OpenSHC/UI/Enums/MenuModalType.hpp" + +#include "OpenSHC/Globals/DAT_MapPropertiesState.hpp" +#include "OpenSHC/Globals/DAT_MenuModalComposition1.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004BB740 + void DisableWeapon::MenuItemActionHandler_DisableWeapon_Main(int button, ...) + { + if (button == 0) { + DAT_MapPropertiesState::instance.SEC_XbowProducible_save ^= 1; + } + if (button == 1) { + DAT_MapPropertiesState::instance.SEC_PikeProducible_save ^= 1; + } + if (button == 2) { + DAT_MapPropertiesState::instance.SEC_SwordProducible_save ^= 1; + } + if (button == 3) { + DAT_MapPropertiesState::instance.SEC_BowProducible_save ^= 1; + } + if (button == 4) { + DAT_MapPropertiesState::instance.SEC_SpearProducible_save ^= 1; + } + if (button == 5) { + DAT_MapPropertiesState::instance.SEC_MaceProducible_save ^= 1; + } + if (button == -3) { + MACRO_CALL_MEMBER(UI::MenuModalComposition_Func::activateModalDialog, DAT_MenuModalComposition1::ptr)( + UI::Enums::MMT_BUILDING_AVAILABILITY, FALSE); + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/EditScenario/MenuItemActionHandler_EditScenario_DateYearBox.cpp b/src/OpenSHC/UI/MenuItems/EditScenario/MenuItemActionHandler_EditScenario_DateYearBox.cpp new file mode 100644 index 0000000000..bf1d5e2cd3 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/EditScenario/MenuItemActionHandler_EditScenario_DateYearBox.cpp @@ -0,0 +1,58 @@ +#include "../EditScenario.func.hpp" + +#include "OpenSHC/Text/UserTextHandler.func.hpp" +#include "OpenSHC/Text/TextArrayIndexType.hpp" + +#include "OpenSHC/Globals/DAT_UserTextHandlerState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004B8990 + void EditScenario::MenuItemActionHandler_EditScenario_DateYearBox(int box, ...) + { + switch (box) { + case 0: + if (DAT_UserTextHandlerState::instance.textArrayIndex != Text::TAIT_UNKNOWN_15) { + MACRO_CALL_MEMBER(Text::UserTextHandler_Func::resetToTextIndex, DAT_UserTextHandlerState::ptr)( + Text::TAIT_UNKNOWN_15); + } + break; + case 1: + if (DAT_UserTextHandlerState::instance.textArrayIndex != Text::TAIT_UNKNOWN_10) { + MACRO_CALL_MEMBER(Text::UserTextHandler_Func::resetToTextIndex, DAT_UserTextHandlerState::ptr)( + Text::TAIT_UNKNOWN_10); + } + break; + case 2: + if (DAT_UserTextHandlerState::instance.textArrayIndex != Text::TAIT_UNKNOWN_11) { + MACRO_CALL_MEMBER(Text::UserTextHandler_Func::resetToTextIndex, DAT_UserTextHandlerState::ptr)( + Text::TAIT_UNKNOWN_11); + } + break; + case 3: + case 4: + case 7: + if (DAT_UserTextHandlerState::instance.textArrayIndex != Text::TAIT_UNKNOWN_12) { + MACRO_CALL_MEMBER(Text::UserTextHandler_Func::resetToTextIndex, DAT_UserTextHandlerState::ptr)( + Text::TAIT_UNKNOWN_12); + } + break; + case 5: + if (DAT_UserTextHandlerState::instance.textArrayIndex != Text::TAIT_UNKNOWN_13) { + MACRO_CALL_MEMBER(Text::UserTextHandler_Func::resetToTextIndex, DAT_UserTextHandlerState::ptr)( + Text::TAIT_UNKNOWN_13); + } + break; + case 6: + if (DAT_UserTextHandlerState::instance.textArrayIndex != Text::TAIT_UNKNOWN_14) { + MACRO_CALL_MEMBER(Text::UserTextHandler_Func::resetToTextIndex, DAT_UserTextHandlerState::ptr)( + Text::TAIT_UNKNOWN_14); + } + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/EditScenario/MenuItemActionHandler_EditScenario_Scrollbar.cpp b/src/OpenSHC/UI/MenuItems/EditScenario/MenuItemActionHandler_EditScenario_Scrollbar.cpp new file mode 100644 index 0000000000..5d29ea8a4a --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/EditScenario/MenuItemActionHandler_EditScenario_Scrollbar.cpp @@ -0,0 +1,53 @@ +#include "../EditScenario.func.hpp" + +#include "OpenSHC/Globals/DAT_MapPropertiesState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004B8A50 + void EditScenario::MenuItemActionHandler_EditScenario_Scrollbar( + int unused, int scrollbarEvent, int* minValue, int* maxValue, int* currentValue) + { + // twenty events fit in the list + switch (scrollbarEvent) { + case 1: + *minValue = 0; + *maxValue = DAT_MapPropertiesState::instance.eventsCount - 20; + *currentValue = 0; + return; + case 2: + case 3: + if (*currentValue < 0) { + *currentValue = 0; + } + DAT_MapPropertiesState::instance.eventListScrollOffset = *currentValue; + return; + case 4: + *currentValue = DAT_MapPropertiesState::instance.eventListScrollOffset; + *maxValue = DAT_MapPropertiesState::instance.eventsCount - 20; + return; + case 5: + // Stores and returns here rather than through the shared store below, as the original does. + if (DAT_MapPropertiesState::instance.eventListScrollOffset > 0) { + --DAT_MapPropertiesState::instance.eventListScrollOffset; + *currentValue = DAT_MapPropertiesState::instance.eventListScrollOffset; + return; + } + break; + case 6: + if (DAT_MapPropertiesState::instance.eventListScrollOffset + < DAT_MapPropertiesState::instance.eventsCount - 20) { + ++DAT_MapPropertiesState::instance.eventListScrollOffset; + } + break; + default: + return; + } + *currentValue = DAT_MapPropertiesState::instance.eventListScrollOffset; + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/FindingNetworkSessions/MenuItemRenderFunction_FindingNetworkSessions_TableRows.cpp b/src/OpenSHC/UI/MenuItems/FindingNetworkSessions/MenuItemRenderFunction_FindingNetworkSessions_TableRows.cpp new file mode 100644 index 0000000000..888d0a7935 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/FindingNetworkSessions/MenuItemRenderFunction_FindingNetworkSessions_TableRows.cpp @@ -0,0 +1,47 @@ +#include "../FindingNetworkSessions.func.hpp" + +#include "OpenSHC/Text/TextManager.func.hpp" +#include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/Rendering/Colors/ColorsEnum.hpp" +#include "OpenSHC/Rendering/Enums/RenderTarget.hpp" +#include "OpenSHC/Text/TextAlignment.hpp" + +#include "OpenSHC/Globals/DAT_ButtonCurrentlyInteracting.hpp" +#include "OpenSHC/Globals/DAT_ButtonX.hpp" +#include "OpenSHC/Globals/DAT_ButtonY.hpp" +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" +#include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" +#include "OpenSHC/Globals/DAT_TextManagerObject.hpp" +#include "OpenSHC/Globals/DAT_TextureRenderCoreObject.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x0047D410 + void FindingNetworkSessions::MenuItemRenderFunction_FindingNetworkSessions_TableRows(int row, ...) + { + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_SCREEN_MENU; + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawTableCellBackground, + DAT_PencilRenderCore::ptr)(row == DAT_GameSynchronyState::instance.scrollBarIndex, row, 0); + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_MAP_GAME; + if (DAT_GameSynchronyState::instance.scrollBarItemOffset + row + >= DAT_GameSynchronyState::instance.DPLAY_SessionsCount) { + return; + } + // set in both branches: a preset colour overridden in one costs two instructions + uint color; + if (row == DAT_GameSynchronyState::instance.scrollBarIndex || DAT_ButtonCurrentlyInteracting::instance) { + color = OpenSHC::Rendering::Colors::COL_CCFAFF; + } else { + color = OpenSHC::Rendering::Colors::COL_C2F0EB; + } + MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderWideText, DAT_TextManagerObject::ptr)( + DAT_GameSynchronyState::instance + .DPLAY_SessionNames[DAT_GameSynchronyState::instance.scrollBarItemOffset + row], + DAT_ButtonX::instance + 8, DAT_ButtonY::instance + 4, OpenSHC::Text::TTA_LEFT, color, 18, FALSE, 0); + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/GameplayOptions/MenuItemActionHandler_GameplayOptions_SpeedSlider.cpp b/src/OpenSHC/UI/MenuItems/GameplayOptions/MenuItemActionHandler_GameplayOptions_SpeedSlider.cpp new file mode 100644 index 0000000000..d81527648d --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/GameplayOptions/MenuItemActionHandler_GameplayOptions_SpeedSlider.cpp @@ -0,0 +1,45 @@ +#include "../GameplayOptions.func.hpp" + +#include "OpenSHC/Game/GameMode.hpp" + +#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp" +#include "OpenSHC/Globals/DAT_MenuTextInputState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x00491FD0 + void GameplayOptions::MenuItemActionHandler_GameplayOptions_SpeedSlider( + int unused, int scrollbarEvent, int* minValue, int* maxValue, int* currentValue) + { + if (DAT_GameSynchronyState::instance.currentGameMode != OpenSHC::Game::GM_SOLITARY + && DAT_GameSynchronyState::instance.currentGameMode != OpenSHC::Game::GM_SKIRMISH_SINGLE_PLAYER) { + *minValue = 20; + *maxValue = 90; + *currentValue = DAT_GameSynchronyState::instance.skirmishGameSpeedLevel; + return; + } + switch (scrollbarEvent) { + case 1: + *minValue = 20; + *maxValue = 90; + *currentValue = DAT_MenuTextInputState::instance.pendingGameSpeedLevel; + return; + case 2: + case 3: + DAT_MenuTextInputState::instance.pendingGameSpeedLevel = *currentValue; + return; + case 5: + --*currentValue; + DAT_MenuTextInputState::instance.pendingGameSpeedLevel = *currentValue; + return; + case 6: + ++*currentValue; + DAT_MenuTextInputState::instance.pendingGameSpeedLevel = *currentValue; + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/General/MenuItemActionHandler_General_MessageScrollbar.cpp b/src/OpenSHC/UI/MenuItems/General/MenuItemActionHandler_General_MessageScrollbar.cpp new file mode 100644 index 0000000000..ddcd363968 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/General/MenuItemActionHandler_General_MessageScrollbar.cpp @@ -0,0 +1,49 @@ +#include "../General.func.hpp" + +#include "OpenSHC/Globals/DAT_MapPropertiesState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004BAD70 + void General::MenuItemActionHandler_General_MessageScrollbar( + int unused, int scrollbarEvent, int* minValue, int* maxValue, int* currentValue) + { + switch (scrollbarEvent) { + case 1: + *minValue = 0; + *maxValue = DAT_MapPropertiesState::instance.total - DAT_MapPropertiesState::instance.visibleRowCount; + *currentValue = 0; + return; + case 2: + case 3: + DAT_MapPropertiesState::instance.offset = *currentValue; + return; + case 4: + *currentValue = DAT_MapPropertiesState::instance.offset; + *maxValue = DAT_MapPropertiesState::instance.total - DAT_MapPropertiesState::instance.visibleRowCount; + return; + case 5: + // Stores and returns here rather than through the shared store below, as the original does. + if (DAT_MapPropertiesState::instance.offset > 0) { + --DAT_MapPropertiesState::instance.offset; + *currentValue = DAT_MapPropertiesState::instance.offset; + return; + } + break; + case 6: + if (DAT_MapPropertiesState::instance.offset + < (int)DAT_MapPropertiesState::instance.total - DAT_MapPropertiesState::instance.visibleRowCount) { + ++DAT_MapPropertiesState::instance.offset; + } + break; + default: + return; + } + *currentValue = DAT_MapPropertiesState::instance.offset; + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/General/MenuItemActionHandler_General_TextInputDisplay.cpp b/src/OpenSHC/UI/MenuItems/General/MenuItemActionHandler_General_TextInputDisplay.cpp new file mode 100644 index 0000000000..ff41a7d99b --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/General/MenuItemActionHandler_General_TextInputDisplay.cpp @@ -0,0 +1,47 @@ +#include "../General.func.hpp" + +#include "OpenSHC/Text/UserTextHandler.func.hpp" +#include "OpenSHC/Text/TextArrayIndexType.hpp" + +#include "OpenSHC/Globals/DAT_GameCore.hpp" +#include "OpenSHC/Globals/DAT_UserTextHandlerState.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x0047CC10 + void General::MenuItemActionHandler_General_TextInputDisplay(int field, ...) + { + switch (field) { + case 0: + if (DAT_UserTextHandlerState::instance.textArrayIndex != Text::TAIT_FIVE__NUMERIC_DOT) { + MACRO_CALL_MEMBER(Text::UserTextHandler_Func::resetToTextIndex, DAT_UserTextHandlerState::ptr)( + Text::TAIT_FIVE__NUMERIC_DOT); + } + break; + case 1: + if (DAT_UserTextHandlerState::instance.textArrayIndex != Text::TAIT_SIX__NUMERIC_ONLY) { + MACRO_CALL_MEMBER(Text::UserTextHandler_Func::resetToTextIndex, DAT_UserTextHandlerState::ptr)( + Text::TAIT_SIX__NUMERIC_ONLY); + } + break; + case 2: + if (DAT_UserTextHandlerState::instance.textArrayIndex != Text::TAIT_SEVEN__NUMERIC_ONLY) { + MACRO_CALL_MEMBER(Text::UserTextHandler_Func::resetToTextIndex, DAT_UserTextHandlerState::ptr)( + Text::TAIT_SEVEN__NUMERIC_ONLY); + } + break; + case 3: + // != TRUE: the original compares with 1 + if (DAT_GameCore::instance.isNameEntryActive != TRUE + && DAT_UserTextHandlerState::instance.textArrayIndex != Text::TAIT_ZERO) { + MACRO_CALL_MEMBER(Text::UserTextHandler_Func::resetToTextIndex, DAT_UserTextHandlerState::ptr)( + Text::TAIT_ZERO); + } + } + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/General/MenuItemRenderFunction_General_MessageScrollbarUpDown.cpp b/src/OpenSHC/UI/MenuItems/General/MenuItemRenderFunction_General_MessageScrollbarUpDown.cpp new file mode 100644 index 0000000000..75c322e699 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/General/MenuItemRenderFunction_General_MessageScrollbarUpDown.cpp @@ -0,0 +1,30 @@ +#include "../General.func.hpp" + +#include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/Rendering/Enums/RenderTarget.hpp" + +#include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" +#include "OpenSHC/Globals/DAT_TextureRenderCoreObject.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004BAE80 + void General::MenuItemRenderFunction_General_MessageScrollbarUpDown(int button, ...) + { + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_SCREEN_MENU; + if (button == -1) { + MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::renderUpDownButtonUnk, + DAT_PencilRenderCore::ptr)(0, 0); + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_MAP_GAME; + return; + } + MACRO_CALL_MEMBER( + OpenSHC::UI::Rendering::PencilRenderCore_Func::renderUpDownButtonUnk, DAT_PencilRenderCore::ptr)(1, 0); + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_MAP_GAME; + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/General/MenuItemRenderFunction_General_Scrollbar.cpp b/src/OpenSHC/UI/MenuItems/General/MenuItemRenderFunction_General_Scrollbar.cpp new file mode 100644 index 0000000000..94ab4bf5c3 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/General/MenuItemRenderFunction_General_Scrollbar.cpp @@ -0,0 +1,29 @@ +#include "../General.func.hpp" + +#include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/Rendering/Enums/RenderTarget.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 0x004BAE30 + void General::MenuItemRenderFunction_General_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, + 0); + DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue = OpenSHC::Rendering::Enums::RT_MAP_GAME; + } + + } +} +} diff --git a/src/OpenSHC/UI/MenuItems/GreatestLord/MenuItemActionHandler_GreatestLord_Main.cpp b/src/OpenSHC/UI/MenuItems/GreatestLord/MenuItemActionHandler_GreatestLord_Main.cpp new file mode 100644 index 0000000000..3266404b46 --- /dev/null +++ b/src/OpenSHC/UI/MenuItems/GreatestLord/MenuItemActionHandler_GreatestLord_Main.cpp @@ -0,0 +1,33 @@ +#include "../GreatestLord.func.hpp" + +#include "OpenSHC/UI/MenuModalComposition.func.hpp" +#include "OpenSHC/UI/Enums/MenuModalType.hpp" + +#include "OpenSHC/Globals/DAT_GreatestLordDefinedData.hpp" +#include "OpenSHC/Globals/DAT_MenuModalComposition1.hpp" + +namespace OpenSHC { +namespace UI { + namespace MenuItems { + + // FUNCTION: STRONGHOLDCRUSADER 0x004B1990 + void GreatestLord::MenuItemActionHandler_GreatestLord_Main(int button, ...) + { + if (button == 1 || button == 100) { + MACRO_CALL_MEMBER(UI::MenuModalComposition_Func::activateModalDialog, DAT_MenuModalComposition1::ptr)( + UI::Enums::MMT_NONE, FALSE); + } + if (button == 10) { + DAT_GreatestLordDefinedData::instance.tableSortBy = -1; + } + if (button == 11) { + DAT_GreatestLordDefinedData::instance.tableSortBy = 1; + } + if (button == 12) { + DAT_GreatestLordDefinedData::instance.tableSortBy = 0; + } + } + + } +} +} diff --git a/status/addresses-SHC-3BB0A8C1.txt b/status/addresses-SHC-3BB0A8C1.txt index ed989c9a21..39df0dbf03 100644 --- a/status/addresses-SHC-3BB0A8C1.txt +++ b/status/addresses-SHC-3BB0A8C1.txt @@ -11141,7 +11141,7 @@ SHC_3BB0A8C1_0x00434260 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00434270 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x00434300 | 0.0% | Pending +SHC_3BB0A8C1_0x00434300 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00434340 | 100.0% | Reimplemented @@ -13359,7 +13359,7 @@ SHC_3BB0A8C1_0x00439380 | 0.0% | Pending SHC_3BB0A8C1_0x00439390 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x004393C0 | 0.0% | Pending +SHC_3BB0A8C1_0x004393C0 | 100.0% | Reimplemented, only the first of the two recountUnitsInSelection tail call targets differs, while its resolver is off SHC_3BB0A8C1_0x00439440 | 100.0% | Reimplemented @@ -13583,9 +13583,9 @@ SHC_3BB0A8C1_0x0043E280 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0043E350 | 100.0% | Reimplemented, identical code; only the /GS cookie symbols differ (CRT) -SHC_3BB0A8C1_0x0043E490 | 0.0% | Pending +SHC_3BB0A8C1_0x0043E490 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x0043E4E0 | 0.0% | Pending +SHC_3BB0A8C1_0x0043E4E0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0043E540 | 100.0% | Reimplemented @@ -13609,13 +13609,13 @@ SHC_3BB0A8C1_0x0043FAC0 | 0.0% | Pending SHC_3BB0A8C1_0x0043FBB0 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x0043FBF0 | 0.0% | Pending +SHC_3BB0A8C1_0x0043FBF0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0043FC80 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0043FCA0 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x0043FCB0 | 0.0% | Pending +SHC_3BB0A8C1_0x0043FCB0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0043FD30 | 100.0% | Reimplemented @@ -13647,7 +13647,7 @@ SHC_3BB0A8C1_0x00440600 | 0.0% | Pending SHC_3BB0A8C1_0x004406F0 | 0.0% | Pending -SHC_3BB0A8C1_0x00440770 | 0.0% | Pending +SHC_3BB0A8C1_0x00440770 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004409A4 | 0.0% | Pending @@ -19867,23 +19867,23 @@ SHC_3BB0A8C1_0x004650F0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00465110 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x00465200 | 0.0% | Pending +SHC_3BB0A8C1_0x00465200 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004652A0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004652D0 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x00465360 | 0.0% | Pending +SHC_3BB0A8C1_0x00465360 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004653B0 | 0.0% | Pending SHC_3BB0A8C1_0x004653F0 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x00465480 | 0.0% | Pending +SHC_3BB0A8C1_0x00465480 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004654F0 | 0.0% | Pending -SHC_3BB0A8C1_0x00465560 | 0.0% | Pending +SHC_3BB0A8C1_0x00465560 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00465610 | 0.0% | Pending @@ -19897,17 +19897,17 @@ SHC_3BB0A8C1_0x00465620 | 0.0% | Pending SHC_3BB0A8C1_0x00465624 | 0.0% | Pending -SHC_3BB0A8C1_0x00465630 | 0.0% | Pending +SHC_3BB0A8C1_0x00465630 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004656A0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00465700 | 0.0% | Pending -SHC_3BB0A8C1_0x004657B0 | 0.0% | Pending +SHC_3BB0A8C1_0x004657B0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00465800 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x00465820 | 0.0% | Pending +SHC_3BB0A8C1_0x00465820 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00465890 | 100.0% | Reimplemented @@ -19917,7 +19917,7 @@ SHC_3BB0A8C1_0x00465920 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00465950 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x004659E0 | 0.0% | Pending +SHC_3BB0A8C1_0x004659E0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00465A20 | 100.0% | Reimplemented @@ -19947,7 +19947,7 @@ SHC_3BB0A8C1_0x00466620 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00466710 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x00466730 | 0.0% | Pending +SHC_3BB0A8C1_0x00466730 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004667F0 | 0.0% | Pending @@ -19961,7 +19961,7 @@ SHC_3BB0A8C1_0x00466800 | 0.0% | Pending SHC_3BB0A8C1_0x00466804 | 0.0% | Pending -SHC_3BB0A8C1_0x00466810 | 0.0% | Pending +SHC_3BB0A8C1_0x00466810 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004668D0 | 0.0% | Pending @@ -22255,7 +22255,7 @@ SHC_3BB0A8C1_0x0047C670 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0047C860 | 0.0% | Pending -SHC_3BB0A8C1_0x0047CA80 | 0.0% | Pending +SHC_3BB0A8C1_0x0047CA80 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0047CB0C | 0.0% | Pending @@ -22271,7 +22271,7 @@ SHC_3BB0A8C1_0x0047CB20 | 0.0% | Pending SHC_3BB0A8C1_0x0047CB30 | 100.0% | Reimplemented, Security Cookie mismatches -SHC_3BB0A8C1_0x0047CC10 | 0.0% | Pending +SHC_3BB0A8C1_0x0047CC10 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0047CC84 | 0.0% | Pending @@ -22297,7 +22297,7 @@ SHC_3BB0A8C1_0x0047CEE0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0047CF50 | 100.0% | Reimplemented, Security Cookie mismatches -SHC_3BB0A8C1_0x0047D070 | 0.0% | Pending +SHC_3BB0A8C1_0x0047D070 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0047D0D0 | 0.0% | Pending @@ -22309,7 +22309,7 @@ SHC_3BB0A8C1_0x0047D0DC | 0.0% | Pending SHC_3BB0A8C1_0x0047D0E0 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x0047D100 | 0.0% | Pending +SHC_3BB0A8C1_0x0047D100 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0047D190 | 0.0% | Pending @@ -22329,7 +22329,7 @@ SHC_3BB0A8C1_0x0047D3E0 | 0.0% | Pending SHC_3BB0A8C1_0x0047D3F0 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x0047D410 | 0.0% | Pending +SHC_3BB0A8C1_0x0047D410 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0047D4A0 | 100.0% | Reimplemented @@ -22413,7 +22413,7 @@ SHC_3BB0A8C1_0x0047FEA0 | 0.0% | Pending SHC_3BB0A8C1_0x0047FFA0 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x0047FFE0 | 0.0% | Pending +SHC_3BB0A8C1_0x0047FFE0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00480050 | 100.0% | Reimplemented @@ -23055,7 +23055,7 @@ SHC_3BB0A8C1_0x00487090 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004870B0 | 100.0% | Reimplemented, requires SHC_3BB0A8C1_0x00487090 to be active -SHC_3BB0A8C1_0x00487200 | 0.0% | Pending +SHC_3BB0A8C1_0x00487200 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00487250 | 100.0% | Reimplemented @@ -23435,7 +23435,7 @@ SHC_3BB0A8C1_0x00491E80 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00491EB0 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x00491FD0 | 0.0% | Pending +SHC_3BB0A8C1_0x00491FD0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0049205C | 0.0% | Pending @@ -25985,7 +25985,7 @@ SHC_3BB0A8C1_0x004B18D0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004B1900 | 0.0% | Pending -SHC_3BB0A8C1_0x004B1990 | 0.0% | Pending +SHC_3BB0A8C1_0x004B1990 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004B19E0 | 0.0% | Pending @@ -27487,7 +27487,7 @@ SHC_3BB0A8C1_0x004B8987 | 0.0% | Pending SHC_3BB0A8C1_0x004B8988 | 0.0% | Pending -SHC_3BB0A8C1_0x004B8990 | 0.0% | Pending +SHC_3BB0A8C1_0x004B8990 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004B8A28 | 0.0% | Pending @@ -27505,7 +27505,7 @@ SHC_3BB0A8C1_0x004B8A40 | 0.0% | Pending SHC_3BB0A8C1_0x004B8A44 | 0.0% | Pending -SHC_3BB0A8C1_0x004B8A50 | 0.0% | Pending +SHC_3BB0A8C1_0x004B8A50 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004B8AF8 | 0.0% | Pending @@ -29097,7 +29097,7 @@ SHC_3BB0A8C1_0x004BAC20 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004BAC90 | 0.0% | Pending -SHC_3BB0A8C1_0x004BAD70 | 0.0% | Pending +SHC_3BB0A8C1_0x004BAD70 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004BAE18 | 0.0% | Pending @@ -29111,9 +29111,9 @@ SHC_3BB0A8C1_0x004BAE28 | 0.0% | Pending SHC_3BB0A8C1_0x004BAE2C | 0.0% | Pending -SHC_3BB0A8C1_0x004BAE30 | 0.0% | Pending +SHC_3BB0A8C1_0x004BAE30 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x004BAE80 | 0.0% | Pending +SHC_3BB0A8C1_0x004BAE80 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004BAEC0 | 0.0% | Pending @@ -29295,7 +29295,7 @@ SHC_3BB0A8C1_0x004BB650 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004BB680 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x004BB740 | 0.0% | Pending +SHC_3BB0A8C1_0x004BB740 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004BB7B0 | 100.0% | Reimplemented @@ -36017,7 +36017,7 @@ SHC_3BB0A8C1_0x004D8EC0 | 0.0% | Pending SHC_3BB0A8C1_0x004D91D0 | 0.0% | Pending -SHC_3BB0A8C1_0x004D9230 | 0.0% | Pending +SHC_3BB0A8C1_0x004D9230 | 100.0% | Reimplemented SHC_3BB0A8C1_0x004D9270 | 100.0% | Reimplemented