Skip to content

Commit 6d3dbbb

Browse files
committed
Start matching CInGuiGuiManager and CMFGame
1 parent e29d67c commit 6d3dbbb

10 files changed

Lines changed: 267 additions & 15 deletions

File tree

config/GM8E01_00/symbols.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ OnMessage__13CMFGameLoaderFRC20CArchitectureMessageR18CArchitectureQueue = .text
563563
MakeLoadDependancyList__13CMFGameLoaderFv = .text:0x80023EE4; // type:function size:0x1A8 scope:global
564564
__dt__13CMFGameLoaderFv = .text:0x8002408C; // type:function size:0x108 scope:global
565565
__ct__13CMFGameLoaderFv = .text:0x80024194; // type:function size:0x1F8 scope:global
566-
IsCameraActiveFlow__7CMFGameFv = .text:0x8002438C; // type:function size:0x24 scope:global
566+
IsCameraActiveFlow__7CMFGameCFv = .text:0x8002438C; // type:function size:0x24 scope:global
567567
PlayerDied__7CMFGameFv = .text:0x800243B0; // type:function size:0x1C scope:global
568568
UnpauseGame__7CMFGameFv = .text:0x800243CC; // type:function size:0x48 scope:global
569569
EnterMessageScreen__7CMFGameFf = .text:0x80024414; // type:function size:0x3C scope:global
@@ -573,11 +573,11 @@ PauseGame__7CMFGameFv = .text:0x800244C8; // type:function size:0x3C scope:globa
573573
EnterMapScreen__7CMFGameFv = .text:0x80024504; // type:function size:0x60 scope:global
574574
Draw__7CMFGameCFv = .text:0x80024564; // type:function size:0x138 scope:global
575575
OnMessage__7CMFGameFRC20CArchitectureMessageR18CArchitectureQueue = .text:0x8002469C; // type:function size:0x6D8 scope:global
576-
Touch__7CMFGameFv = .text:0x80024D74; // type:function size:0xF4 scope:global
576+
Touch__7CMFGameCFv = .text:0x80024D74; // type:function size:0xF4 scope:global
577577
__dt__7CMFGameFv = .text:0x80024E68; // type:function size:0xD4 scope:global
578578
__ct__7CMFGameFQ24rstl25ncrc_ptr<13CStateManager>Q24rstl29ncrc_ptr<17CInGameGuiManager>R18CArchitectureQueue = .text:0x80024F3C; // type:function size:0xE8 scope:global
579-
fn_80025024 = .text:0x80025024; // type:function size:0x5C
580-
fn_80025080 = .text:0x80025080; // type:function size:0x5C
579+
ReleaseData__Q24rstl27rc_ptr<17CInGameGuiManager>Fv = .text:0x80025024; // type:function size:0x5C
580+
ReleaseData__Q24rstl23rc_ptr<13CStateManager>Fv = .text:0x80025080; // type:function size:0x5C
581581
__nw__27TOneStatic<13CStateManager>FUlPCcPCc = .text:0x800250DC; // type:function size:0x30 scope:global
582582
GetAllocSpace__27TOneStatic<13CStateManager>Fv = .text:0x8002510C; // type:function size:0xC scope:global
583583
ReferenceCount__27TOneStatic<13CStateManager>Fv = .text:0x80025118; // type:function size:0x24 scope:global
@@ -1049,7 +1049,7 @@ SetupParticleHook__13CStateManagerCFRC6CActor = .text:0x80045088; // type:functi
10491049
MurderScriptInstanceNames__13CStateManagerFv = .text:0x800450BC; // type:function size:0x128 scope:global
10501050
HashInstanceName__13CStateManagerFR12CInputStream = .text:0x800451E4; // type:function size:0x94 scope:global
10511051
SetActorAreaId__13CStateManagerFR6CActor7TAreaId = .text:0x80045278; // type:function size:0x10C scope:global
1052-
TouchPlayerActor__13CStateManagerFv = .text:0x80045384; // type:function size:0x54 scope:global
1052+
TouchPlayerActor__13CStateManagerCFv = .text:0x80045384; // type:function size:0x54 scope:global
10531053
TouchSky__13CStateManagerCFv = .text:0x800453D8; // type:function size:0x24 scope:global
10541054
DrawSpaceWarp__13CStateManagerCFRC9CVector3ff = .text:0x800453FC; // type:function size:0xAC scope:global
10551055
DrawReflection__13CStateManagerFRC9CVector3f = .text:0x800454A8; // type:function size:0x220 scope:global
@@ -6422,7 +6422,7 @@ EnsureStates__17CInGameGuiManagerFR13CStateManager = .text:0x8010740C; // type:f
64226422
DoStateTransition__17CInGameGuiManagerFR13CStateManager = .text:0x8010747C; // type:function size:0x1C4 scope:global
64236423
BeginStateTransition__17CInGameGuiManagerF15EInGameGuiStateRC13CStateManager = .text:0x80107640; // type:function size:0x1AC scope:global
64246424
GetIsGameDraw__17CInGameGuiManagerCFv = .text:0x801077EC; // type:function size:0x10 scope:global
6425-
ShowPauseGameHudMessage__17CInGameGuiManagerFRC13CStateManagerUi = .text:0x801077FC; // type:function size:0x2C scope:global
6425+
ShowPauseGameHudMessage__17CInGameGuiManagerFRC13CStateManagerUif = .text:0x801077FC; // type:function size:0x2C scope:global
64266426
PauseGame__17CInGameGuiManagerFRC13CStateManager15EInGameGuiState = .text:0x80107828; // type:function size:0x74 scope:global
64276427
ProcessControllerInput__17CInGameGuiManagerFRC13CStateManagerRC11CFinalInputR18CArchitectureQueue = .text:0x8010789C; // type:function size:0x1BC scope:global
64286428
RefreshHudOptions__17CInGameGuiManagerFv = .text:0x80107A58; // type:function size:0x24 scope:global
@@ -18029,7 +18029,7 @@ jumptable_803D9944 = .data:0x803D9944; // type:object size:0x44 scope:local
1802918029
lbl_803D9988 = .data:0x803D9988; // type:object size:0x10 data:4byte
1803018030
lbl_803D9998 = .data:0x803D9998; // type:object size:0x1C
1803118031
jumptable_803D99B4 = .data:0x803D99B4; // type:object size:0x20 scope:local
18032-
lbl_803D99D4 = .data:0x803D99D4; // type:object size:0x1C
18032+
__vt__7CMFGame = .data:0x803D99D4; // type:object size:0x1C
1803318033
lbl_803D99F0 = .data:0x803D99F0; // type:object size:0x1C
1803418034
__vt__40TObjOwnerDerivedFromIObj<12CStringTable> = .data:0x803D9A0C; // type:object size:0xC scope:global
1803518035
lbl_803D9A18 = .data:0x803D9A18; // type:object size:0x1C

config/GM8E01_01/symbols.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ OnMessage__13CMFGameLoaderFRC20CArchitectureMessageR18CArchitectureQueue = .text
563563
MakeLoadDependancyList__13CMFGameLoaderFv = .text:0x80023F60; // type:function size:0x1A8 scope:global
564564
__dt__13CMFGameLoaderFv = .text:0x80024108; // type:function size:0x108 scope:global
565565
__ct__13CMFGameLoaderFv = .text:0x80024210; // type:function size:0x1F8 scope:global
566-
IsCameraActiveFlow__7CMFGameFv = .text:0x80024408; // type:function size:0x24 scope:global
566+
IsCameraActiveFlow__7CMFGameCFv = .text:0x80024408; // type:function size:0x24 scope:global
567567
PlayerDied__7CMFGameFv = .text:0x8002442C; // type:function size:0x1C scope:global
568568
UnpauseGame__7CMFGameFv = .text:0x80024448; // type:function size:0x48 scope:global
569569
EnterMessageScreen__7CMFGameFf = .text:0x80024490; // type:function size:0x3C scope:global
@@ -573,11 +573,11 @@ PauseGame__7CMFGameFv = .text:0x80024544; // type:function size:0x3C scope:globa
573573
EnterMapScreen__7CMFGameFv = .text:0x80024580; // type:function size:0x60 scope:global
574574
Draw__7CMFGameCFv = .text:0x800245E0; // type:function size:0x138 scope:global
575575
OnMessage__7CMFGameFRC20CArchitectureMessageR18CArchitectureQueue = .text:0x80024718; // type:function size:0x6D8 scope:global
576-
Touch__7CMFGameFv = .text:0x80024DF0; // type:function size:0xF4 scope:global
576+
Touch__7CMFGameCFv = .text:0x80024DF0; // type:function size:0xF4 scope:global
577577
__dt__7CMFGameFv = .text:0x80024EE4; // type:function size:0xD4 scope:global
578578
__ct__7CMFGameFQ24rstl25ncrc_ptr<13CStateManager>Q24rstl29ncrc_ptr<17CInGameGuiManager>R18CArchitectureQueue = .text:0x80024FB8; // type:function size:0xE8 scope:global
579-
fn_80025024 = .text:0x800250A0; // type:function size:0x5C scope:global
580-
fn_80025080 = .text:0x800250FC; // type:function size:0x5C scope:global
579+
ReleaseData__Q24rstl27rc_ptr<17CInGameGuiManager>Fv = .text:0x800250A0; // type:function size:0x5C scope:global
580+
ReleaseData__Q24rstl23rc_ptr<13CStateManager>Fv = .text:0x800250FC; // type:function size:0x5C scope:global
581581
__nw__27TOneStatic<13CStateManager>FUlPCcPCc = .text:0x80025158; // type:function size:0x30 scope:global
582582
GetAllocSpace__27TOneStatic<13CStateManager>Fv = .text:0x80025188; // type:function size:0xC scope:global
583583
ReferenceCount__27TOneStatic<13CStateManager>Fv = .text:0x80025194; // type:function size:0x24 scope:global
@@ -1049,7 +1049,7 @@ SetupParticleHook__13CStateManagerCFRC6CActor = .text:0x80045104; // type:functi
10491049
MurderScriptInstanceNames__13CStateManagerFv = .text:0x80045138; // type:function size:0x128 scope:global
10501050
HashInstanceName__13CStateManagerFR12CInputStream = .text:0x80045260; // type:function size:0x94 scope:global
10511051
SetActorAreaId__13CStateManagerFR6CActor7TAreaId = .text:0x800452F4; // type:function size:0x10C scope:global
1052-
TouchPlayerActor__13CStateManagerFv = .text:0x80045400; // type:function size:0x54 scope:global
1052+
TouchPlayerActor__13CStateManagerCFv = .text:0x80045400; // type:function size:0x54 scope:global
10531053
TouchSky__13CStateManagerCFv = .text:0x80045454; // type:function size:0x24 scope:global
10541054
DrawSpaceWarp__13CStateManagerCFRC9CVector3ff = .text:0x80045478; // type:function size:0xAC scope:global
10551055
DrawReflection__13CStateManagerFRC9CVector3f = .text:0x80045524; // type:function size:0x220 scope:global
@@ -6422,7 +6422,7 @@ EnsureStates__17CInGameGuiManagerFR13CStateManager = .text:0x80107488; // type:f
64226422
DoStateTransition__17CInGameGuiManagerFR13CStateManager = .text:0x801074F8; // type:function size:0x1C4 scope:global
64236423
BeginStateTransition__17CInGameGuiManagerF15EInGameGuiStateRC13CStateManager = .text:0x801076BC; // type:function size:0x1AC scope:global
64246424
GetIsGameDraw__17CInGameGuiManagerCFv = .text:0x80107868; // type:function size:0x10 scope:global
6425-
ShowPauseGameHudMessage__17CInGameGuiManagerFRC13CStateManagerUi = .text:0x80107878; // type:function size:0x2C scope:global
6425+
ShowPauseGameHudMessage__17CInGameGuiManagerFRC13CStateManagerUif = .text:0x80107878; // type:function size:0x2C scope:global
64266426
PauseGame__17CInGameGuiManagerFRC13CStateManager15EInGameGuiState = .text:0x801078A4; // type:function size:0x74 scope:global
64276427
ProcessControllerInput__17CInGameGuiManagerFRC13CStateManagerRC11CFinalInputR18CArchitectureQueue = .text:0x80107918; // type:function size:0x1BC scope:global
64286428
RefreshHudOptions__17CInGameGuiManagerFv = .text:0x80107AD4; // type:function size:0x24 scope:global
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#ifndef _CINGUIGUIMANAGER
2+
#define _CINGUIGUIMANAGER
3+
4+
enum EInGameGuiState {
5+
kIGGS_Zero,
6+
kIGGS_InGame,
7+
kIGGS_MapScreen,
8+
kIGGS_PauseGame,
9+
kIGGS_PauseLogBook,
10+
kIGGS_PauseSaveGame,
11+
kIGGS_PauseHUDMessage,
12+
};
13+
14+
class CInGameGuiManager {
15+
public:
16+
CInGameGuiManager();
17+
~CInGameGuiManager();
18+
19+
bool GetIsGameDraw() const;
20+
21+
void PreDraw(CStateManager& mgr, bool isCameraActive);
22+
void Draw(const CStateManager& mgr) const;
23+
void PauseGame(const CStateManager& mgr, EInGameGuiState state);
24+
void ShowPauseGameHudMessage(const CStateManager& mgr, CAssetId message, float time);
25+
26+
private:
27+
char data[0x1fc];
28+
};
29+
#endif

include/MetroidPrime/CMFGame.hpp

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#ifndef _CMFGAME_HPP
2+
#define _CMFGAME_HPP
3+
4+
#include "Kyoto/TOneStatic.hpp"
5+
#include "MetroidPrime/CMainFlow.hpp"
6+
#include "MetroidPrime/TGameTypes.hpp"
7+
#include "rstl/rc_ptr.hpp"
8+
#include "rstl/single_ptr.hpp"
9+
10+
class CInGameGuiManager;
11+
class CStateManager;
12+
13+
enum EGameFlowState {
14+
kGFS_InGame = 0,
15+
kGFS_Paused,
16+
kGFS_PlayerDied,
17+
kGFS_CinematicSkip,
18+
};
19+
20+
class CGameProfiler {
21+
public:
22+
CGameProfiler();
23+
~CGameProfiler() {};
24+
};
25+
26+
class CMFGame : public CIOWin {
27+
public:
28+
CMFGame(rstl::ncrc_ptr< CStateManager > stateManager,
29+
rstl::ncrc_ptr< CInGameGuiManager > guiManager, CArchitectureQueue& architectureQueue);
30+
~CMFGame() override;
31+
32+
void Touch() const;
33+
EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&) override;
34+
void Draw() const;
35+
36+
void EnterMapScreen();
37+
void PauseGame();
38+
void EnterLogBook();
39+
void SaveGame();
40+
void EnterMessageScreen(float time);
41+
void UnpauseGame();
42+
void PlayerDied();
43+
44+
bool IsCameraActiveFlow() const;
45+
46+
private:
47+
rstl::ncrc_ptr< CStateManager > mStateManager;
48+
rstl::ncrc_ptr< CInGameGuiManager > mGuiManager;
49+
EGameFlowState mFlowState;
50+
float mCineSkipTime;
51+
rstl::single_ptr< CGameProfiler > x24; // Appears to be unused?
52+
TUniqueId mSkippedCineCam;
53+
bool mInitialized : 1;
54+
bool mPlayerAlive : 1;
55+
};
56+
57+
class CMFGameLoader : public CIOWin {
58+
public:
59+
CMFGameLoader();
60+
~CMFGameLoader() override;
61+
};
62+
#endif

include/MetroidPrime/CMain.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ class CMain {
8787
x160_26_screenFading = v;
8888
}
8989

90+
void SetGameFlowBuilt(const bool built) { x160_25_mfGameBuilt = built; }
91+
void SetScreenFading(const bool fading) { x160_26_screenFading = fading; }
92+
void SetGameFrameDrawn(const bool drawn) { x161_24_gameFrameDrawn = drawn; }
93+
9094
void SetX30(bool v) { x160_30_ = v; }
9195

9296
static void EnsureWorldPaksReady();

include/MetroidPrime/CStateManager.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ class CStateManager : public TOneStatic< CStateManager > {
119119
const rstl::ncrc_ptr< CWorldLayerState >&);
120120
~CStateManager();
121121

122+
void PreRender();
122123
bool RenderLast(const TUniqueId&);
123124
void ResetEscapeSequenceTimer(float);
124125
void SendScriptMsg(TUniqueId uid, TEditorId target, EScriptObjectMessage msg,
@@ -285,6 +286,9 @@ class CStateManager : public TOneStatic< CStateManager > {
285286
const SOnScreenTex& GetPendingScreenTex() const { return xef4_pendingScreenTex; }
286287
float IntegrateVisorFog(float f) const;
287288

289+
void TouchSky() const;
290+
void TouchPlayerActor() const;
291+
288292
void QuitGame() { xf94_25_quitGame = true; }
289293
bool GetWantsToQuit() const { return xf94_25_quitGame; }
290294
void SetCinematicSkipObject(TUniqueId id) { xf38_skipCineSpecialFunc = id; }
@@ -297,6 +301,8 @@ class CStateManager : public TOneStatic< CStateManager > {
297301
uint GetInputFrameIdx() const { return x8d4_inputFrameIdx; }
298302
CMapWorldInfo* MapWorldInfo() const { return x8c0_mapWorldInfo.GetPtr(); }
299303

304+
CAssetId GetPauseHUDMessage() const { return xf08_pauseHudMessage; }
305+
300306
void AddActiveFlickerBat(const TUniqueId& uid) { xf3c_activeFlickerBats.push_back(uid); }
301307
void RemoveActiveFlickerBat(const TUniqueId& uid) { xf3c_activeFlickerBats.remove(uid); }
302308

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#ifndef _DEFAULTWORLD
2+
#define _DEFAULTWORLD
3+
4+
static const SObjectTag skDefaultWorld('MLVL', 0x158EFE17);
5+
6+
#endif

include/rstl/single_ptr.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ single_ptr< T >& single_ptr< T >::reset(T* ptr) {
5252
return *this = ptr;
5353
}
5454

55-
typedef single_ptr< int > unk_singleptr;
55+
typedef single_ptr< char > unk_singleptr;
5656
CHECK_SIZEOF(unk_singleptr, 0x4);
5757
} // namespace rstl
5858

src/MetroidPrime/CFrontEndUI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
#include "Kyoto/Basics/RAssertDolphin.hpp"
33
#include "Kyoto/SObjectTag.hpp"
44
#include "MetroidPrime/SFX/FrontEnd.h"
5+
#include "MetroidPrime/DefaultWorld.hpp"
56

67
struct FEMovie {
78
const char* path;
89
bool loop;
910
};
1011

11-
static const SObjectTag skDefaultWorld('MLVL', 0x158EFE17);
1212
static const FEMovie FEMovies[] = {
1313
{"Video/00_first_start.thp", false},
1414
{"Video/01_startloop.thp", true},

0 commit comments

Comments
 (0)