From 3579cc0f8106ccefc0f168ba488a83e3f85c62ae Mon Sep 17 00:00:00 2001 From: kotijekriv Date: Tue, 10 Nov 2026 07:06:50 +0100 Subject: [PATCH] fix(ui): drawHeaderTextBanner and its callers build against main again Ghidra sync 6c1e0bdae declares drawHeaderTextBanner's textGroupIndex as eTextSections (the header line from #384). Main's definition still takes an int, and 15 of its callers pass a bare number, so these 16 files don't compile on d5d965db8 (C2511 for the definition, C2664 for each caller). These are #384's versions of the 16 files, unchanged (from 126230386, db68fc56d and 85b9d2940): the definition takes eTextSections, each caller names its text group with the banner's text above the call, and the own header is included first. #384 then merges cleanly on top of this. Co-Authored-By: Claude Opus 5.5 --- .../MenuModalRenderFunction_CreateOrTriggerInvasion.cpp | 7 +++++-- .../MenuModalRenderFunction_DisableTroops.cpp | 7 +++++-- .../MenuModalRenderFunction_DisableWeapon.cpp | 7 +++++-- .../MenuModalRenderFunction_EnterTitleOnGameStart.cpp | 7 +++++-- .../MenuModalRenderFunction_GameplayOptions.cpp | 7 +++++-- .../MenuModalRenderFunction_NetworkOptions.cpp | 7 +++++-- .../MenuModalRenderFunction_OnlineQuitGame.cpp | 7 +++++-- .../OptionsMenu/MenuModalRenderFunction_OptionsMenu.cpp | 7 +++++-- .../MenuModalRenderFunction_SkirmishConnectionOptions.cpp | 7 +++++-- .../MenuModalRenderFunction_SkirmishPlayOptions.cpp | 7 +++++-- .../SoundOptions/MenuModalRenderFunction_SoundOptions.cpp | 7 +++++-- .../StartGoods/MenuModalRenderFunction_StartGoods.cpp | 7 +++++-- .../MenuModalRenderFunction_TraderSettings.cpp | 7 +++++-- .../TriggerEvent/MenuModalRenderFunction_TriggerEvent.cpp | 7 +++++-- ...enuModalRenderFunction_UnusedSiegeAttackingForceUnk.cpp | 7 +++++-- .../UI/Rendering/PencilRenderCore/drawHeaderTextBanner.cpp | 4 ++-- 16 files changed, 77 insertions(+), 32 deletions(-) diff --git a/src/OpenSHC/UI/MenuModals/CreateOrTriggerInvasion/MenuModalRenderFunction_CreateOrTriggerInvasion.cpp b/src/OpenSHC/UI/MenuModals/CreateOrTriggerInvasion/MenuModalRenderFunction_CreateOrTriggerInvasion.cpp index 615e9f6e78..e10989d136 100644 --- a/src/OpenSHC/UI/MenuModals/CreateOrTriggerInvasion/MenuModalRenderFunction_CreateOrTriggerInvasion.cpp +++ b/src/OpenSHC/UI/MenuModals/CreateOrTriggerInvasion/MenuModalRenderFunction_CreateOrTriggerInvasion.cpp @@ -1,5 +1,7 @@ -#include "OpenSHC/UI/MenuModals/CreateOrTriggerInvasion.func.hpp" +#include "../CreateOrTriggerInvasion.func.hpp" + #include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" #include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" @@ -11,8 +13,9 @@ namespace UI { // FUNCTION: STRONGHOLDCRUSADER 0x004AB540 void MenuModalRenderFunction_CreateOrTriggerInvasion(int x, int y, int width, int height) { + // "Invasion" MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawHeaderTextBanner, - DAT_PencilRenderCore::ptr)(199, 0x2e, x, y, width, height); + DAT_PencilRenderCore::ptr)(OpenSHC::DE::SHCDE::TEXT_SCENARIO, 46, x, y, width, height); } } diff --git a/src/OpenSHC/UI/MenuModals/DisableTroops/MenuModalRenderFunction_DisableTroops.cpp b/src/OpenSHC/UI/MenuModals/DisableTroops/MenuModalRenderFunction_DisableTroops.cpp index 343c0bbc36..65f99551f8 100644 --- a/src/OpenSHC/UI/MenuModals/DisableTroops/MenuModalRenderFunction_DisableTroops.cpp +++ b/src/OpenSHC/UI/MenuModals/DisableTroops/MenuModalRenderFunction_DisableTroops.cpp @@ -1,5 +1,7 @@ -#include "OpenSHC/UI/MenuModals/DisableTroops.func.hpp" +#include "../DisableTroops.func.hpp" + #include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" #include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" @@ -11,8 +13,9 @@ namespace UI { // FUNCTION: STRONGHOLDCRUSADER 0x004ABCB0 void MenuModalRenderFunction_DisableTroops(int x, int y, int width, int height) { + // "Troops" MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawHeaderTextBanner, - DAT_PencilRenderCore::ptr)(199, 0xbc, x, y, width, height); + DAT_PencilRenderCore::ptr)(OpenSHC::DE::SHCDE::TEXT_SCENARIO, 188, x, y, width, height); } } diff --git a/src/OpenSHC/UI/MenuModals/DisableWeapon/MenuModalRenderFunction_DisableWeapon.cpp b/src/OpenSHC/UI/MenuModals/DisableWeapon/MenuModalRenderFunction_DisableWeapon.cpp index d497fc976c..b209139dc8 100644 --- a/src/OpenSHC/UI/MenuModals/DisableWeapon/MenuModalRenderFunction_DisableWeapon.cpp +++ b/src/OpenSHC/UI/MenuModals/DisableWeapon/MenuModalRenderFunction_DisableWeapon.cpp @@ -1,5 +1,7 @@ -#include "OpenSHC/UI/MenuModals/DisableWeapon.func.hpp" +#include "../DisableWeapon.func.hpp" + #include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" #include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" @@ -11,8 +13,9 @@ namespace UI { // FUNCTION: STRONGHOLDCRUSADER 0x004ABCE0 void MenuModalRenderFunction_DisableWeapon(int x, int y, int width, int height) { + // "Weapons" MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawHeaderTextBanner, - DAT_PencilRenderCore::ptr)(199, 0xbd, x, y, width, height); + DAT_PencilRenderCore::ptr)(OpenSHC::DE::SHCDE::TEXT_SCENARIO, 189, x, y, width, height); } } diff --git a/src/OpenSHC/UI/MenuModals/EnterTitleOnGameStart/MenuModalRenderFunction_EnterTitleOnGameStart.cpp b/src/OpenSHC/UI/MenuModals/EnterTitleOnGameStart/MenuModalRenderFunction_EnterTitleOnGameStart.cpp index 8d5e6c26e9..b35f615523 100644 --- a/src/OpenSHC/UI/MenuModals/EnterTitleOnGameStart/MenuModalRenderFunction_EnterTitleOnGameStart.cpp +++ b/src/OpenSHC/UI/MenuModals/EnterTitleOnGameStart/MenuModalRenderFunction_EnterTitleOnGameStart.cpp @@ -1,5 +1,7 @@ -#include "OpenSHC/UI/MenuModals/EnterTitleOnGameStart.func.hpp" +#include "../EnterTitleOnGameStart.func.hpp" + #include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" #include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" @@ -11,8 +13,9 @@ namespace UI { // FUNCTION: STRONGHOLDCRUSADER 0x00491BF0 void MenuModalRenderFunction_EnterTitleOnGameStart(int x, int y, int width, int height) { + // "Enter Your Title" MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawHeaderTextBanner, - DAT_PencilRenderCore::ptr)(5, 6, x, y, width, height); + DAT_PencilRenderCore::ptr)(OpenSHC::DE::SHCDE::TEXT_MAINOPTIONS, 6, x, y, width, height); } } diff --git a/src/OpenSHC/UI/MenuModals/GameplayOptions/MenuModalRenderFunction_GameplayOptions.cpp b/src/OpenSHC/UI/MenuModals/GameplayOptions/MenuModalRenderFunction_GameplayOptions.cpp index 061906c477..f631628a0e 100644 --- a/src/OpenSHC/UI/MenuModals/GameplayOptions/MenuModalRenderFunction_GameplayOptions.cpp +++ b/src/OpenSHC/UI/MenuModals/GameplayOptions/MenuModalRenderFunction_GameplayOptions.cpp @@ -1,5 +1,7 @@ -#include "OpenSHC/UI/MenuModals/GameplayOptions.func.hpp" +#include "../GameplayOptions.func.hpp" + #include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" #include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" @@ -11,8 +13,9 @@ namespace UI { // FUNCTION: STRONGHOLDCRUSADER 0x00491E80 void MenuModalRenderFunction_GameplayOptions(int x, int y, int width, int height) { + // "Game Play Options" MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawHeaderTextBanner, - DAT_PencilRenderCore::ptr)(0x4a, 0x19, x, y, width, height); + DAT_PencilRenderCore::ptr)(OpenSHC::DE::SHCDE::TEXT_GAME_OPTIONS, 25, x, y, width, height); } } diff --git a/src/OpenSHC/UI/MenuModals/NetworkOptions/MenuModalRenderFunction_NetworkOptions.cpp b/src/OpenSHC/UI/MenuModals/NetworkOptions/MenuModalRenderFunction_NetworkOptions.cpp index d234390ae2..b0ac831483 100644 --- a/src/OpenSHC/UI/MenuModals/NetworkOptions/MenuModalRenderFunction_NetworkOptions.cpp +++ b/src/OpenSHC/UI/MenuModals/NetworkOptions/MenuModalRenderFunction_NetworkOptions.cpp @@ -1,5 +1,7 @@ -#include "OpenSHC/UI/MenuModals/NetworkOptions.func.hpp" +#include "../NetworkOptions.func.hpp" + #include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" #include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" @@ -11,8 +13,9 @@ namespace UI { // FUNCTION: STRONGHOLDCRUSADER 0x00492A60 void MenuModalRenderFunction_NetworkOptions(int x, int y, int width, int height) { + // "Network Options" MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawHeaderTextBanner, - DAT_PencilRenderCore::ptr)(0x4a, 6, x, y, width, height); + DAT_PencilRenderCore::ptr)(OpenSHC::DE::SHCDE::TEXT_GAME_OPTIONS, 6, x, y, width, height); } } diff --git a/src/OpenSHC/UI/MenuModals/OnlineQuitGame/MenuModalRenderFunction_OnlineQuitGame.cpp b/src/OpenSHC/UI/MenuModals/OnlineQuitGame/MenuModalRenderFunction_OnlineQuitGame.cpp index fbba87f66f..356dea2e0e 100644 --- a/src/OpenSHC/UI/MenuModals/OnlineQuitGame/MenuModalRenderFunction_OnlineQuitGame.cpp +++ b/src/OpenSHC/UI/MenuModals/OnlineQuitGame/MenuModalRenderFunction_OnlineQuitGame.cpp @@ -1,5 +1,7 @@ -#include "OpenSHC/UI/MenuModals/OnlineQuitGame.func.hpp" +#include "../OnlineQuitGame.func.hpp" + #include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" #include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" @@ -11,8 +13,9 @@ namespace UI { // FUNCTION: STRONGHOLDCRUSADER 0x004937B0 void MenuModalRenderFunction_OnlineQuitGame(int x, int y, int width, int height) { + // "Quit Mission" MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawHeaderTextBanner, - DAT_PencilRenderCore::ptr)(0x4a, 7, x, y, width, height); + DAT_PencilRenderCore::ptr)(OpenSHC::DE::SHCDE::TEXT_GAME_OPTIONS, 7, x, y, width, height); } } diff --git a/src/OpenSHC/UI/MenuModals/OptionsMenu/MenuModalRenderFunction_OptionsMenu.cpp b/src/OpenSHC/UI/MenuModals/OptionsMenu/MenuModalRenderFunction_OptionsMenu.cpp index cae175e53f..68441feaff 100644 --- a/src/OpenSHC/UI/MenuModals/OptionsMenu/MenuModalRenderFunction_OptionsMenu.cpp +++ b/src/OpenSHC/UI/MenuModals/OptionsMenu/MenuModalRenderFunction_OptionsMenu.cpp @@ -1,5 +1,7 @@ -#include "OpenSHC/UI/MenuModals/OptionsMenu.func.hpp" +#include "../OptionsMenu.func.hpp" + #include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" #include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" @@ -11,8 +13,9 @@ namespace UI { // FUNCTION: STRONGHOLDCRUSADER 0x00491810 void MenuModalRenderFunction_OptionsMenu(int x, int y, int width, int height) { + // "Game Options" MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawHeaderTextBanner, - DAT_PencilRenderCore::ptr)(0x4a, 1, x, y, width, height); + DAT_PencilRenderCore::ptr)(OpenSHC::DE::SHCDE::TEXT_GAME_OPTIONS, 1, x, y, width, height); } } diff --git a/src/OpenSHC/UI/MenuModals/SkirmishConnectionOptions/MenuModalRenderFunction_SkirmishConnectionOptions.cpp b/src/OpenSHC/UI/MenuModals/SkirmishConnectionOptions/MenuModalRenderFunction_SkirmishConnectionOptions.cpp index bd1fc7a9b9..60bee8a80f 100644 --- a/src/OpenSHC/UI/MenuModals/SkirmishConnectionOptions/MenuModalRenderFunction_SkirmishConnectionOptions.cpp +++ b/src/OpenSHC/UI/MenuModals/SkirmishConnectionOptions/MenuModalRenderFunction_SkirmishConnectionOptions.cpp @@ -1,5 +1,7 @@ -#include "OpenSHC/UI/MenuModals/SkirmishConnectionOptions.func.hpp" +#include "../SkirmishConnectionOptions.func.hpp" + #include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" #include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" @@ -11,8 +13,9 @@ namespace UI { // FUNCTION: STRONGHOLDCRUSADER 0x004ABE50 void MenuModalRenderFunction_SkirmishConnectionOptions(int x, int y, int width, int height) { + // "Connection options" MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawHeaderTextBanner, - DAT_PencilRenderCore::ptr)(0x4f, 0x5d, x, y, width, height); + DAT_PencilRenderCore::ptr)(OpenSHC::DE::SHCDE::TEXT_XPLAY_WAITING_ROOM, 93, x, y, width, height); } } diff --git a/src/OpenSHC/UI/MenuModals/SkirmishPlayOptions/MenuModalRenderFunction_SkirmishPlayOptions.cpp b/src/OpenSHC/UI/MenuModals/SkirmishPlayOptions/MenuModalRenderFunction_SkirmishPlayOptions.cpp index 4829b68b79..901ee078b1 100644 --- a/src/OpenSHC/UI/MenuModals/SkirmishPlayOptions/MenuModalRenderFunction_SkirmishPlayOptions.cpp +++ b/src/OpenSHC/UI/MenuModals/SkirmishPlayOptions/MenuModalRenderFunction_SkirmishPlayOptions.cpp @@ -1,5 +1,7 @@ -#include "OpenSHC/UI/MenuModals/SkirmishPlayOptions.func.hpp" +#include "../SkirmishPlayOptions.func.hpp" + #include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" #include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" @@ -11,8 +13,9 @@ namespace UI { // FUNCTION: STRONGHOLDCRUSADER 0x004ABE80 void MenuModalRenderFunction_SkirmishPlayOptions(int x, int y, int width, int height) { + // "Play Options" MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawHeaderTextBanner, - DAT_PencilRenderCore::ptr)(0x4f, 0x67, x, y, width, height); + DAT_PencilRenderCore::ptr)(OpenSHC::DE::SHCDE::TEXT_XPLAY_WAITING_ROOM, 103, x, y, width, height); } } diff --git a/src/OpenSHC/UI/MenuModals/SoundOptions/MenuModalRenderFunction_SoundOptions.cpp b/src/OpenSHC/UI/MenuModals/SoundOptions/MenuModalRenderFunction_SoundOptions.cpp index 9c86cf5092..a72f79f6fa 100644 --- a/src/OpenSHC/UI/MenuModals/SoundOptions/MenuModalRenderFunction_SoundOptions.cpp +++ b/src/OpenSHC/UI/MenuModals/SoundOptions/MenuModalRenderFunction_SoundOptions.cpp @@ -1,5 +1,7 @@ -#include "OpenSHC/UI/MenuModals/SoundOptions.func.hpp" +#include "../SoundOptions.func.hpp" + #include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" #include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" @@ -11,8 +13,9 @@ namespace UI { // FUNCTION: STRONGHOLDCRUSADER 0x00492660 void MenuModalRenderFunction_SoundOptions(int x, int y, int width, int height) { + // "Sound Options" MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawHeaderTextBanner, - DAT_PencilRenderCore::ptr)(0x4a, 5, x, y, width, height); + DAT_PencilRenderCore::ptr)(OpenSHC::DE::SHCDE::TEXT_GAME_OPTIONS, 5, x, y, width, height); } } diff --git a/src/OpenSHC/UI/MenuModals/StartGoods/MenuModalRenderFunction_StartGoods.cpp b/src/OpenSHC/UI/MenuModals/StartGoods/MenuModalRenderFunction_StartGoods.cpp index b9fe397dcd..a53526d45b 100644 --- a/src/OpenSHC/UI/MenuModals/StartGoods/MenuModalRenderFunction_StartGoods.cpp +++ b/src/OpenSHC/UI/MenuModals/StartGoods/MenuModalRenderFunction_StartGoods.cpp @@ -1,5 +1,7 @@ -#include "OpenSHC/UI/MenuModals/StartGoods.func.hpp" +#include "../StartGoods.func.hpp" + #include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" #include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" @@ -11,8 +13,9 @@ namespace UI { // FUNCTION: STRONGHOLDCRUSADER 0x004AB4E0 void MenuModalRenderFunction_StartGoods(int x, int y, int width, int height) { + // "Start Goods" MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawHeaderTextBanner, - DAT_PencilRenderCore::ptr)(199, 0x29, x, y, width, height); + DAT_PencilRenderCore::ptr)(OpenSHC::DE::SHCDE::TEXT_SCENARIO, 41, x, y, width, height); } } diff --git a/src/OpenSHC/UI/MenuModals/TraderSettings/MenuModalRenderFunction_TraderSettings.cpp b/src/OpenSHC/UI/MenuModals/TraderSettings/MenuModalRenderFunction_TraderSettings.cpp index c881d36bff..753295be99 100644 --- a/src/OpenSHC/UI/MenuModals/TraderSettings/MenuModalRenderFunction_TraderSettings.cpp +++ b/src/OpenSHC/UI/MenuModals/TraderSettings/MenuModalRenderFunction_TraderSettings.cpp @@ -1,5 +1,7 @@ -#include "OpenSHC/UI/MenuModals/TraderSettings.func.hpp" +#include "../TraderSettings.func.hpp" + #include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" #include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" @@ -11,8 +13,9 @@ namespace UI { // FUNCTION: STRONGHOLDCRUSADER 0x004AB4B0 void MenuModalRenderFunction_TraderSettings(int x, int y, int width, int height) { + // "Trader" MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawHeaderTextBanner, - DAT_PencilRenderCore::ptr)(199, 0x26, x, y, width, height); + DAT_PencilRenderCore::ptr)(OpenSHC::DE::SHCDE::TEXT_SCENARIO, 38, x, y, width, height); } } diff --git a/src/OpenSHC/UI/MenuModals/TriggerEvent/MenuModalRenderFunction_TriggerEvent.cpp b/src/OpenSHC/UI/MenuModals/TriggerEvent/MenuModalRenderFunction_TriggerEvent.cpp index f41936dada..836a0993f4 100644 --- a/src/OpenSHC/UI/MenuModals/TriggerEvent/MenuModalRenderFunction_TriggerEvent.cpp +++ b/src/OpenSHC/UI/MenuModals/TriggerEvent/MenuModalRenderFunction_TriggerEvent.cpp @@ -1,5 +1,7 @@ -#include "OpenSHC/UI/MenuModals/TriggerEvent.func.hpp" +#include "../TriggerEvent.func.hpp" + #include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" #include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" @@ -11,8 +13,9 @@ namespace UI { // FUNCTION: STRONGHOLDCRUSADER 0x004AC250 void MenuModalRenderFunction_TriggerEvent(int x, int y, int width, int height) { + // "Events" MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawHeaderTextBanner, - DAT_PencilRenderCore::ptr)(199, 0x17, x, y, width, height); + DAT_PencilRenderCore::ptr)(OpenSHC::DE::SHCDE::TEXT_SCENARIO, 23, x, y, width, height); } } diff --git a/src/OpenSHC/UI/MenuModals/UnusedSiegeAttackingForceUnk/MenuModalRenderFunction_UnusedSiegeAttackingForceUnk.cpp b/src/OpenSHC/UI/MenuModals/UnusedSiegeAttackingForceUnk/MenuModalRenderFunction_UnusedSiegeAttackingForceUnk.cpp index 5d2f141cbb..ca04bc963e 100644 --- a/src/OpenSHC/UI/MenuModals/UnusedSiegeAttackingForceUnk/MenuModalRenderFunction_UnusedSiegeAttackingForceUnk.cpp +++ b/src/OpenSHC/UI/MenuModals/UnusedSiegeAttackingForceUnk/MenuModalRenderFunction_UnusedSiegeAttackingForceUnk.cpp @@ -1,5 +1,7 @@ -#include "OpenSHC/UI/MenuModals/UnusedSiegeAttackingForceUnk.func.hpp" +#include "../UnusedSiegeAttackingForceUnk.func.hpp" + #include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp" +#include "OpenSHC/DE/SHCDE/eTextSections.hpp" #include "OpenSHC/Globals/DAT_PencilRenderCore.hpp" @@ -11,8 +13,9 @@ namespace UI { // FUNCTION: STRONGHOLDCRUSADER 0x004AB510 void MenuModalRenderFunction_UnusedSiegeAttackingForceUnk(int x, int y, int width, int height) { + // "Attacking Force" MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawHeaderTextBanner, - DAT_PencilRenderCore::ptr)(199, 0xa4, x, y, width, height); + DAT_PencilRenderCore::ptr)(OpenSHC::DE::SHCDE::TEXT_SCENARIO, 164, x, y, width, height); } } diff --git a/src/OpenSHC/UI/Rendering/PencilRenderCore/drawHeaderTextBanner.cpp b/src/OpenSHC/UI/Rendering/PencilRenderCore/drawHeaderTextBanner.cpp index e53326dd71..70c0c26a53 100644 --- a/src/OpenSHC/UI/Rendering/PencilRenderCore/drawHeaderTextBanner.cpp +++ b/src/OpenSHC/UI/Rendering/PencilRenderCore/drawHeaderTextBanner.cpp @@ -30,7 +30,7 @@ namespace UI { // FUNCTION: STRONGHOLDCRUSADER 0x00475CC0 void PencilRenderCore::drawHeaderTextBanner( - int textGroupIndex, int textNumInGroup, int xPos, int yPos, int width, int height) + eTextSections textGroupIndex, int textNumInGroup, int xPos, int yPos, int width, int height) { // drawHeaderBanner's banner, with a text centred on it // The banner is one tile inside the box at the top and on both sides; width becomes the banner's own. @@ -76,7 +76,7 @@ namespace UI { yPos + 9, OpenSHC::IO::Graphics::GID_INTERFACE_ICONS_3, BANNER_CAP_MASK, 0); MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::renderTextToScreen, DAT_TextManagerObject::ptr)( MACRO_CALL_MEMBER(OpenSHC::Text::TextManager_Func::getTextStringInGroupAtOffset, - DAT_TextManagerObject::ptr)((OpenSHC::DE::SHCDE::eTextSections)textGroupIndex, textNumInGroup), + DAT_TextManagerObject::ptr)(textGroupIndex, textNumInGroup), width / 2 + left, yPos + 14, OpenSHC::Text::TTA_CENTER, OpenSHC::Rendering::Colors::COL_C2F0EB, BANNER_TEXT_FONT_SIZE, FALSE, 0); }