Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
8ed8576
reimplement: SHC_3BB0A8C1_0x00433030 100.0% Reimplemented
gynt Nov 9, 2026
f2fe699
reimplement: SHC_3BB0A8C1_0x00431A90 100.0% Reimplemented
gynt Nov 9, 2026
2f3ee0d
reimplement: SHC_3BB0A8C1_0x004DD0C0 100.0% Reimplemented
gynt Nov 9, 2026
37185af
reimplement: SHC_3BB0A8C1_0x004262B0 100.0% Reimplemented
gynt Nov 9, 2026
873aa7b
reimplement: SHC_3BB0A8C1_0x004E1F50 100.0% Reimplemented
gynt Nov 9, 2026
2203241
reimplement: SHC_3BB0A8C1_0x004D91D0 100.0% Reimplemented
gynt Nov 9, 2026
b7c4069
reimplement: SHC_3BB0A8C1_0x004DF2E0 100.0% Reimplemented
gynt Nov 9, 2026
2139f97
reimplement: SHC_3BB0A8C1_0x00425FF0 100.0% Reimplemented
gynt Nov 9, 2026
6fa6b17
reimplement: SHC_3BB0A8C1_0x00425EA0 100.0% Reimplemented
gynt Nov 9, 2026
e2e3e49
reimplement: SHC_3BB0A8C1_0x004406F0 100.0% Reimplemented
gynt Nov 9, 2026
0a9124f
reimplement: SHC_3BB0A8C1_0x004DB5C0 100.0% Reimplemented
gynt Nov 9, 2026
1324571
reimplement: SHC_3BB0A8C1_0x00425F60 100.0% Reimplemented
gynt Nov 9, 2026
6762fdf
reimplement: SHC_3BB0A8C1_0x004DD750 100.0% Reimplemented
gynt Nov 9, 2026
16cf013
reimplement: SHC_3BB0A8C1_0x004276F0 100.0% Reimplemented
gynt Nov 9, 2026
d2b2e93
reimplement: SHC_3BB0A8C1_0x00430100 100.0% Reimplemented
gynt Nov 9, 2026
bbc7f65
reimplement: SHC_3BB0A8C1_0x004DBAF0 100.0% Reimplemented
gynt Nov 9, 2026
4af1fea
reimplement: SHC_3BB0A8C1_0x00425580 100.0% Reimplemented
gynt Nov 9, 2026
54a16c9
reimplement: SHC_3BB0A8C1_0x00425500 100.0% Reimplemented
gynt Nov 9, 2026
020903e
reimplement: SHC_3BB0A8C1_0x00426830 100.0% Reimplemented
gynt Nov 9, 2026
36a242a
reimplement: SHC_3BB0A8C1_0x00424720 100.0% Reimplemented
gynt Nov 9, 2026
a7c8be2
reimplement: SHC_3BB0A8C1_0x00424AD0 100.0% Reimplemented
gynt Nov 9, 2026
f2e2391
reimplement: SHC_3BB0A8C1_0x00424A50 100.0% Reimplemented
gynt Nov 9, 2026
81e9716
reimplement: SHC_3BB0A8C1_0x00427320 100.0% Reimplemented
gynt Nov 9, 2026
92007ce
reimplement: SHC_3BB0A8C1_0x00424CD0 100.0% Reimplemented
gynt Nov 9, 2026
66e3f8c
reimplement: SHC_3BB0A8C1_0x00424C40 100.0% Reimplemented
gynt Nov 9, 2026
b95520c
reimplement: SHC_3BB0A8C1_0x004313C0 100.0% Reimplemented
gynt Nov 9, 2026
ea96c7c
reimplement: SHC_3BB0A8C1_0x004268C0 100.0% Reimplemented
gynt Nov 9, 2026
b846739
reimplement: SHC_3BB0A8C1_0x00427110 100.0% Reimplemented
gynt Nov 9, 2026
8d7c267
reimplement: SHC_3BB0A8C1_0x004DD300 100.0% Reimplemented
gynt Nov 9, 2026
da55761
reimplement: SHC_3BB0A8C1_0x0042BBF0 100.0% Reimplemented
gynt Nov 9, 2026
94c6b24
reimplement: SHC_3BB0A8C1_0x0042BB90 100.0% Reimplemented
gynt Nov 9, 2026
e2fad7e
reimplement: SHC_3BB0A8C1_0x00448D40 100.0% Reimplemented
gynt Nov 9, 2026
0a8f40d
reimplement: SHC_3BB0A8C1_0x004E1E30 100.0% Reimplemented
gynt Nov 9, 2026
e6330e4
reimplement: SHC_3BB0A8C1_0x0042C090 100.0% Reimplemented
gynt Nov 9, 2026
4d91d82
reimplement: SHC_3BB0A8C1_0x004272C0 100.0% Reimplemented
gynt Nov 9, 2026
3dd1338
reimplement: SHC_3BB0A8C1_0x00427240 100.0% Reimplemented
gynt Nov 9, 2026
b5ba399
reimplement: SHC_3BB0A8C1_0x004409C0 100.0% Reimplemented
gynt Nov 9, 2026
78482a2
reimplement: SHC_3BB0A8C1_0x00430690 100.0% Reimplemented
gynt Nov 9, 2026
4b5ab8f
reimplement: SHC_3BB0A8C1_0x00426570 100.0% Reimplemented
gynt Nov 9, 2026
9c46aed
reimplement: SHC_3BB0A8C1_0x00425A40 100.0% Reimplemented
gynt Nov 9, 2026
ab148de
reimplement: SHC_3BB0A8C1_0x004259D0 100.0% Reimplemented
gynt Nov 9, 2026
f9dfbd2
reimplement: SHC_3BB0A8C1_0x00426C50 100.0% Reimplemented
gynt Nov 9, 2026
9498372
reimplement: SHC_3BB0A8C1_0x004E1AA0 100.0% Reimplemented
gynt Nov 9, 2026
00bea6d
reimplement: SHC_3BB0A8C1_0x004E1A50 100.0% Reimplemented
gynt Nov 9, 2026
4496c1f
reimplement: SHC_3BB0A8C1_0x0042DD00 100.0% Reimplemented
gynt Nov 9, 2026
faed421
reimplement: SHC_3BB0A8C1_0x0042DCB0 100.0% Reimplemented
gynt Nov 9, 2026
edf29ef
reimplement: SHC_3BB0A8C1_0x0042B960 100.0% Reimplemented
gynt Nov 9, 2026
3425504
MenuViews backlog: main's names for three fields gynt's branch called…
kotijekriv Nov 9, 2026
454e556
MenuViews backlog: the style fixer's pass
kotijekriv Nov 9, 2026
374504a
MenuView_SelectCrusade_DoEveryFrame: style pass on gynt's version
kotijekriv Nov 9, 2026
8d9e7b3
MenuViews backlog: string pointers from string-literals.hpp in place …
kotijekriv Nov 9, 2026
11859ee
MenuViews backlog: no trailing returns, text comments as // lines
kotijekriv Nov 9, 2026
eaddcc9
MenuViews backlog: loops for the repeated stores, named locals in thr…
kotijekriv Nov 9, 2026
a543741
MenuViews backlog: names for decompiler locals in ten files, signed v…
kotijekriv Nov 9, 2026
eb52adb
header: BuildMenuTabType gets BMTT_UNKNOWN_62
kotijekriv Nov 9, 2026
07a1c3a
header: TextArrayIndexType gets TAIT_UNKNOWN_4
kotijekriv Nov 9, 2026
7fe4cf7
MenuViews backlog: the review's points
kotijekriv Nov 9, 2026
a017c00
Merge main (d5d965db8) into reimpl/UI-gynt-backlog-MenuViews
kotijekriv Nov 9, 2026
b2f3e34
UI-gynt-backlog-MenuViews: main's names after its Ghidra sync (TAIT_U…
kotijekriv Nov 9, 2026
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,98 @@
#include "../BuildMenu.func.hpp"

#include "OpenSHC/UI/DisplayElements.func.hpp"
#include "OpenSHC/UI/MenuHandlerState.func.hpp"
#include "OpenSHC/UI/MinimapViewState.func.hpp"
#include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp"
#include "OpenSHC/UI/Rendering/TextureRenderCore.func.hpp"
#include "OpenSHC/DE/SHCDE/eGM.hpp"
#include "OpenSHC/IO/Graphics/GmID.hpp"
#include "OpenSHC/Rendering/Enums/RenderTarget.hpp"
#include "OpenSHC/Rendering/ScreenResolutionEnum.hpp"
#include "OpenSHC/UI/Enums/BuildMenuTabType.hpp"
#include "OpenSHC/UI/Enums/DisplayElementID.hpp"

#include "OpenSHC/Globals/COL_MAGENTA.hpp"
#include "OpenSHC/Globals/DAT_GameCore.hpp"
#include "OpenSHC/Globals/DAT_GameState.hpp"
#include "OpenSHC/Globals/DAT_GameSynchronyState.hpp"
#include "OpenSHC/Globals/DAT_MenuHandlerState.hpp"
#include "OpenSHC/Globals/DAT_MinimapViewState.hpp"
#include "OpenSHC/Globals/DAT_PencilRenderCore.hpp"
#include "OpenSHC/Globals/DAT_TextureRenderCoreObject.hpp"
#include "OpenSHC/Globals/DAT_WindowAndDirectDraw.hpp"

namespace OpenSHC {
namespace UI {
namespace MenuViews {

// FUNCTION: STRONGHOLDCRUSADER 0x00433030
void BuildMenu::MenuView_BuildMenu_DoEveryFrame()
{
if (DAT_GameCore::instance.activeMenuTab.buildMenuTab != OpenSHC::UI::Enums::BMTT_MENU_HIDDEN
&& DAT_GameCore::instance.activeMenuTab.buildMenuTab != OpenSHC::UI::Enums::BMTT_UNKNOWN_62) {
if (DAT_MinimapViewState::instance.field_0xc == 0) {
DAT_WindowAndDirectDraw::instance.unk_resetViewportRelated = 2;
}
if (DAT_MenuHandlerState::instance.isBuildMenuTransitioning_0x18) {
MACRO_CALL_MEMBER(OpenSHC::UI::MenuHandlerState_Func::computeBuildMenuTransitionShift,
DAT_MenuHandlerState::ptr)();
}
if (DAT_WindowAndDirectDraw::instance.unk_resetViewportRelated == 2) {
DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue
= OpenSHC::Rendering::Enums::RT_SCREEN_MENU;
if (DAT_WindowAndDirectDraw::instance.currentGameResolution == OpenSHC::Rendering::SRE_640x480) {
MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGM,
DAT_TextureRenderCoreObject::ptr)(OpenSHC::DE::SHCDE::GM_INTERFACE_PANELS, 2,
DAT_MenuHandlerState::instance.x, DAT_MenuHandlerState::instance.y + 472);
} else {
MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::PencilRenderCore_Func::drawColorBox,
DAT_PencilRenderCore::ptr)(DAT_MenuHandlerState::instance.x,
DAT_MenuHandlerState::instance.y + 406, DAT_MenuHandlerState::instance.x + 799,
DAT_MenuHandlerState::instance.y + 471, COL_MAGENTA::instance.shortValue);
if (DAT_GameCore::instance.activeMenuTab.buildMenuTab == OpenSHC::UI::Enums::BMTT_SOLDIERS) {
MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGM,
DAT_TextureRenderCoreObject::ptr)(OpenSHC::DE::SHCDE::GM_INTERFACE_PANELS, 5,
DAT_MenuHandlerState::instance.x, DAT_MenuHandlerState::instance.y + 445);
} else {
MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::renderGM,
DAT_TextureRenderCoreObject::ptr)(OpenSHC::DE::SHCDE::GM_INTERFACE_PANELS, 1,
DAT_MenuHandlerState::instance.x, DAT_MenuHandlerState::instance.y + 450);
MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::setRenderingRect,
DAT_TextureRenderCoreObject::ptr)(DAT_MenuHandlerState::instance.x + 17,
DAT_MenuHandlerState::instance.y + 473, DAT_MenuHandlerState::instance.x + 513,
DAT_MenuHandlerState::instance.y + 576);
MACRO_CALL_MEMBER(OpenSHC::UI::Rendering::TextureRenderCore_Func::drawTgxGmOnFlaggedSurface,
DAT_TextureRenderCoreObject::ptr)(OpenSHC::IO::Graphics::GID_INTERFACE_BUTTONS, 7,
DAT_MenuHandlerState::instance.x
- DAT_MenuHandlerState::instance.buildMenuBackgroundLeftShift_0x24 + 17,
DAT_MenuHandlerState::instance.y + 473);
MACRO_CALL_MEMBER(
OpenSHC::UI::Rendering::TextureRenderCore_Func::setRenderingRectToGameResolution,
DAT_TextureRenderCoreObject::ptr)();
}
}
DAT_TextureRenderCoreObject::instance.drawBufferChoiceValue
= OpenSHC::Rendering::Enums::RT_MAP_GAME;
}
DAT_MinimapViewState::instance.needsRedraw = TRUE;
if (!DAT_GameCore::instance.isBinkVideoPlaying) {
MACRO_CALL_MEMBER(
OpenSHC::UI::MinimapViewState_Func::renderMinimapMain, DAT_MinimapViewState::ptr)();
}
}
if (DAT_GameCore::instance.isVictoryOrDefeatUnk != 0) {
DAT_GameCore::instance.isVictoryOrDefeatUnk = 0;
DAT_GameState::instance.mapAndTime.gameOver = TRUE;
DAT_GameState::instance.mapAndTime.gameOverTime = timeGetTime() - 6000;
DAT_GameState::instance.mapAndTime.playerIsAlive[DAT_GameSynchronyState::instance.currentPlayerSlotID]
= 1;
DAT_GameCore::instance.skipStoreSKMasters = 1;
MACRO_CALL(OpenSHC::UI::DisplayElements_Func::CheckDisplayElementByIDAndSetForUnlimitedDisplay)(
OpenSHC::UI::Enums::DEID_WIN_DEFEAT_WINDOW, 1);
}
}

}
}
}
70 changes: 70 additions & 0 deletions src/OpenSHC/UI/MenuViews/BuildMenu/MenuView_BuildMenu_Prepare.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#include "../BuildMenu.func.hpp"

#include "OpenSHC/Map/MapPropertiesState.func.hpp"
#include "OpenSHC/Text/UserTextHandler.func.hpp"
#include "OpenSHC/UI/DisplayElements.func.hpp"
#include "OpenSHC/Game/GameMode.hpp"
#include "OpenSHC/Text/TextArrayIndexType.hpp"
#include "OpenSHC/UI/Enums/BuildingsAndStatusMenuTabType.hpp"
#include "OpenSHC/UI/Enums/DisplayElementID.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_MouseState.hpp"
#include "OpenSHC/Globals/DAT_TileMapState.hpp"
#include "OpenSHC/Globals/DAT_UnitsState.hpp"
#include "OpenSHC/Globals/DAT_UserTextHandlerState.hpp"
#include "OpenSHC/Globals/DAT_WindowAndDirectDraw.hpp"
#include "OpenSHC/Globals/INT_00b960f0.hpp"

namespace OpenSHC {
namespace UI {
namespace MenuViews {

// FUNCTION: STRONGHOLDCRUSADER 0x00431A90
void BuildMenu::MenuView_BuildMenu_Prepare()
{
MACRO_CALL_MEMBER(OpenSHC::Text::UserTextHandler_Func::resetToTextIndex, DAT_UserTextHandlerState::ptr)(
OpenSHC::Text::TAIT_UNKNOWN);
if (DAT_GameCore::instance.activeMenuTab.tabType != OpenSHC::UI::Enums::BASMTT_SIEGETENT_BATTERINGRAM
&& DAT_GameCore::instance.activeMenuTab.tabType != OpenSHC::UI::Enums::BASMTT_SIEGETENT_SHIELD
&& DAT_GameCore::instance.menuTabToSwitchTo.tabType != OpenSHC::UI::Enums::BASMTT_SIEGETENT_BATTERINGRAM
&& DAT_GameCore::instance.menuTabToSwitchTo.tabType != OpenSHC::UI::Enums::BASMTT_SIEGETENT_SHIELD) {
DAT_TileMapState::instance.shiftRelated0or3 = 0;
DAT_UnitsState::instance.unitCountOfSelection[DAT_GameSynchronyState::instance.currentPlayerSlotID] = 0;
}
MACRO_CALL(OpenSHC::UI::DisplayElements_Func::CheckDisplayElementByIDAndSetForUnlimitedDisplay)(
OpenSHC::UI::Enums::DEID_KEEP_AND_GRANERY_PLACEMENT_INFO, 0);
DAT_WindowAndDirectDraw::instance.pendingMenuRedraw = TRUE;
if (MACRO_CALL_MEMBER(OpenSHC::Map::MapPropertiesState_Func::getEventIDForTimeUntilDefeatEventType,
DAT_MapPropertiesState::ptr)()
>= 0) {
MACRO_CALL(OpenSHC::UI::DisplayElements_Func::CheckDisplayElementByIDAndSetForUnlimitedDisplay)(
OpenSHC::UI::Enums::DEID_TIME_UNTIL_DEFEAT, 1);
}
if (DAT_GameSynchronyState::instance.currentGameMode != OpenSHC::Game::GM_SOLITARY) {
if (DAT_GameCore::instance.mapU4Int0 != 0) {
MACRO_CALL(OpenSHC::UI::DisplayElements_Func::CheckDisplayElementByIDAndSetForUnlimitedDisplay)(
OpenSHC::UI::Enums::DEID_UNKNOWN_25, 1);
}
// the original tests the game mode again after each call
if (DAT_GameSynchronyState::instance.currentGameMode != OpenSHC::Game::GM_SOLITARY) {
MACRO_CALL(OpenSHC::UI::DisplayElements_Func::CheckDisplayElementByIDAndSetForUnlimitedDisplay)(
OpenSHC::UI::Enums::DEID_PLAYER_INFO_ON_HOVER, 1);
if (DAT_GameSynchronyState::instance.currentGameMode != OpenSHC::Game::GM_SOLITARY
&& DAT_GameSynchronyState::instance.currentGameMode != OpenSHC::Game::GM_SKIRMISH_SINGLE_PLAYER
&& DAT_GameState::instance.mapAndTime.skirmishNoRushTicks != 0) {
MACRO_CALL(OpenSHC::UI::DisplayElements_Func::CheckDisplayElementByIDAndSetForUnlimitedDisplay)(
OpenSHC::UI::Enums::DEID_NO_RUSH, 1);
}
}
}
DAT_MouseState::instance.waitCursorToggle = 0;
INT_00b960f0::instance = 0;
}

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include "../CampaignUnk.func.hpp"

#include "OpenSHC/UI/Helpers.func.hpp"
#include "OpenSHC/UI/Rendering.func.hpp"

#include "OpenSHC/Globals/COL_BLACK.hpp"
#include "OpenSHC/Globals/DAT_MenuHandlerState.hpp"
#include "OpenSHC/Globals/DAT_WindowAndDirectDraw.hpp"

namespace OpenSHC {
namespace UI {
namespace MenuViews {

// FUNCTION: STRONGHOLDCRUSADER 0x004DD0C0
void CampaignUnk::MenuView_CampaignUnk_DoInitial()
{
int const borderHeight = DAT_WindowAndDirectDraw::instance.mainMenuBorderHeight;
int const borderWidth = DAT_WindowAndDirectDraw::instance.mainMenuBorderWidth;
Menu* const menu = DAT_MenuHandlerState::instance.currentMenu;
menu->xPosition = borderWidth;
menu->yPosition = borderHeight;
DAT_MenuHandlerState::instance.x = borderWidth;
DAT_MenuHandlerState::instance.y = borderHeight;
MACRO_CALL(UI::Helpers_Func::ColorEntireScreen)(COL_BLACK::instance.shortValue);
MACRO_CALL(UI::Rendering_Func::DrawOuterMenuBorder)();
}

}
}
}
45 changes: 45 additions & 0 deletions src/OpenSHC/UI/MenuViews/Credits/MenuView_Credits_DoInitial.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#include "../Credits.func.hpp"

#include "OpenSHC/UI/Rendering.func.hpp"
#include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp"
#include "OpenSHC/UI/Rendering/TextureRenderCore.func.hpp"

#include "OpenSHC/Globals/COL_BLACK.hpp"
#include "OpenSHC/Globals/DAT_MenuHandlerState.hpp"
#include "OpenSHC/Globals/DAT_PencilRenderCore.hpp"
#include "OpenSHC/Globals/DAT_TextEditorState.hpp"
#include "OpenSHC/Globals/DAT_TextureRenderCoreObject.hpp"
#include "OpenSHC/Globals/DAT_WindowAndDirectDraw.hpp"

namespace OpenSHC {
namespace UI {
namespace MenuViews {

// FUNCTION: STRONGHOLDCRUSADER 0x004262B0
void Credits::MenuView_Credits_DoInitial()
{
MACRO_CALL_MEMBER(UI::Rendering::PencilRenderCore_Func::drawColorBox, DAT_PencilRenderCore::ptr)(0, 0,
DAT_WindowAndDirectDraw::instance.resolutionX, DAT_WindowAndDirectDraw::instance.resolutionY,
COL_BLACK::instance.shortValue);
MACRO_CALL(UI::Rendering_Func::DrawOuterMenuBorder)();
MACRO_CALL_MEMBER(
UI::Rendering::TextureRenderCore_Func::drawGfxOnFlaggedSurface, DAT_TextureRenderCoreObject::ptr)(0,
(DAT_WindowAndDirectDraw::instance.resolutionX
- DAT_TextureRenderCoreObject::instance.loadedGfxArray[0].width)
/ 2,
(DAT_WindowAndDirectDraw::instance.resolutionY
- DAT_TextureRenderCoreObject::instance.loadedGfxArray[0].height)
/ 2);
int const borderHeight = DAT_WindowAndDirectDraw::instance.mainMenuBorderHeight;
int const borderWidth = DAT_WindowAndDirectDraw::instance.mainMenuBorderWidth;
Menu* const menu = DAT_MenuHandlerState::instance.currentMenu;
menu->xPosition = borderWidth;
menu->yPosition = borderHeight;
DAT_MenuHandlerState::instance.x = borderWidth;
DAT_MenuHandlerState::instance.y = borderHeight;
DAT_TextEditorState::instance.pendingCreditsFadeBorder = TRUE;
}

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include "../CrusadeEndscreen.func.hpp"

#include "OpenSHC/Audio/MSS/SoundSystem.func.hpp"
#include "OpenSHC/Rendering.func.hpp"
#include "OpenSHC/UI/Helpers.func.hpp"
#include "OpenSHC/DE/SHCDE/eMusicIDs.hpp"

#include "OpenSHC/Globals/DAT_SoundSystemState.hpp"
#include "OpenSHC/Globals/DAT_UnknownBinkIndex.hpp"
#include "OpenSHC/Globals/INT_00ed27b8.hpp"

namespace OpenSHC {
namespace UI {
namespace MenuViews {

// FUNCTION: STRONGHOLDCRUSADER 0x004E1F50
void CrusadeEndscreen::MenuView_CrusadeEndscreen_DoEveryFrame()
{
if (MACRO_CALL(UI::Helpers_Func::TicksSinceCounterStart)()) {
MACRO_CALL(Rendering_Func::ProcessCreditsScriptCommands)();
if (DAT_UnknownBinkIndex::instance >= 59 && !INT_00ed27b8::instance) {
MACRO_CALL_MEMBER(Audio::MSS::SoundSystem_Func::setSomeSoundTime, DAT_SoundSystemState::ptr)();
MACRO_CALL_MEMBER(Audio::MSS::SoundSystem_Func::setupVolumeAndSoundID, DAT_SoundSystemState::ptr)(
DE::SHCDE::MUSIC_GERMAN_EGG);
INT_00ed27b8::instance = TRUE;
}
MACRO_CALL(Rendering_Func::RenderActiveCreditsElements)();
}
}

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#include "../CrusadeEndscreen.func.hpp"

#include "OpenSHC/UI/Rendering.func.hpp"
#include "OpenSHC/UI/Rendering/PencilRenderCore.func.hpp"

#include "OpenSHC/Globals/COL_BLACK.hpp"
#include "OpenSHC/Globals/DAT_MenuHandlerState.hpp"
#include "OpenSHC/Globals/DAT_PencilRenderCore.hpp"
#include "OpenSHC/Globals/DAT_WindowAndDirectDraw.hpp"
#include "OpenSHC/Globals/INT_00ed27b8.hpp"

namespace OpenSHC {
namespace UI {
namespace MenuViews {

// FUNCTION: STRONGHOLDCRUSADER 0x004D91D0
void CrusadeEndscreen::MenuView_CrusadeEndscreen_DoInitial()
{
MACRO_CALL_MEMBER(UI::Rendering::PencilRenderCore_Func::drawColorBox, DAT_PencilRenderCore::ptr)(0, 0,
DAT_WindowAndDirectDraw::instance.resolutionX, DAT_WindowAndDirectDraw::instance.resolutionY,
COL_BLACK::instance.shortValue);
MACRO_CALL(UI::Rendering_Func::DrawOuterMenuBorder)();
int const borderHeight = DAT_WindowAndDirectDraw::instance.mainMenuBorderHeight;
int const borderWidth = DAT_WindowAndDirectDraw::instance.mainMenuBorderWidth;
Menu* const menu = DAT_MenuHandlerState::instance.currentMenu;
menu->xPosition = borderWidth;
menu->yPosition = borderHeight;
DAT_MenuHandlerState::instance.x = borderWidth;
DAT_MenuHandlerState::instance.y = borderHeight;
INT_00ed27b8::instance = FALSE;
}

}
}
}
Loading
Loading