Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#include "../MissingResourceState.func.hpp"

#include "OpenSHC/Text/FontSizeClass.func.hpp"
#include "OpenSHC/Text/TextManager.func.hpp"

#include "OpenSHC/Globals/DAT_GameCore.hpp"
#include "OpenSHC/Globals/DAT_TextManagerObject.hpp"

namespace OpenSHC {
namespace Audio {

// FUNCTION: STRONGHOLDCRUSADER 0x004761E0
void MissingResourceState::renderResourceMissingText(int posX, int posY, dword textGroup, dword unusedUnk)
{
if (DAT_GameCore::instance.activeMenuTab.tabType == UI::Enums::BASMTT_SIEGETENT_SIEGETOWER
|| DAT_GameCore::instance.activeMenuTab.tabType == UI::Enums::BASMTT_SIEGETENT_SHIELD) {
MACRO_CALL_MEMBER(Text::TextManager_Func::renderInGameTextWithShadow, DAT_TextManagerObject::ptr)(
MACRO_CALL_MEMBER(Text::TextManager_Func::getTextStringInGroupAtOffset, DAT_TextManagerObject::ptr)(
DE::SHCDE::TEXT_FEEDBACK, textGroup),
posX, posY + 148, Text::TTA_LEFT, 0x00c2f0eb, 0, 17, FALSE, 0);
return;
}

if (DAT_GameCore::instance.currentMenuViewType == UI::Enums::MVT_BUILDING_AND_STATUS_MENU) {
if (DAT_GameCore::instance.activeMenuTab.tabType == UI::Enums::BASMTT_BARRACKS_OR_MPMENU_MODEM) {
posY -= 20;
} else if (DAT_GameCore::instance.activeMenuTab.tabType == UI::Enums::BASMTT_MERCENARYPOST) {
posY -= 20;
} else {
posY -= 10;
}
}

int const iVar2 = MACRO_CALL_MEMBER(
Text::FontSizeClass_Func::renderMultilineTextUnk, &DAT_TextManagerObject::instance.fontSizeClassArray[17])(
MACRO_CALL_MEMBER(Text::TextManager_Func::getTextStringInGroupAtOffset, DAT_TextManagerObject::ptr)(
DE::SHCDE::TEXT_FEEDBACK, textGroup),
0, 0, 520, 0, 0, 1);

MACRO_CALL_MEMBER(Text::TextManager_Func::renderMultilineText6Unk, DAT_TextManagerObject::ptr)(
MACRO_CALL_MEMBER(Text::TextManager_Func::getTextStringInGroupAtOffset, DAT_TextManagerObject::ptr)(
DE::SHCDE::TEXT_FEEDBACK, textGroup),
posX, (posY - iVar2) + 32, 520, 0x00c2f0eb, 0, 17, 0);
return;
}

}
}
2 changes: 1 addition & 1 deletion status/addresses-SHC-3BB0A8C1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10788,7 +10788,7 @@ SHC_3BB0A8C1_0x00475E90 | 0.0% | Pending
SHC_3BB0A8C1_0x00475F40 | 0.0% | Pending
SHC_3BB0A8C1_0x00476020 | 0.0% | Pending
SHC_3BB0A8C1_0x00476110 | 0.0% | Pending
SHC_3BB0A8C1_0x004761E0 | 0.0% | Pending
SHC_3BB0A8C1_0x004761E0 | 100.0% | Reimplemented
SHC_3BB0A8C1_0x004762C0 | 0.0% | Pending
SHC_3BB0A8C1_0x004762F0 | 0.0% | Pending
SHC_3BB0A8C1_0x00476650 | 0.0% | Pending
Expand Down