Skip to content

Commit

Permalink
Match all RKSceneManager + some RKSystem functions
Browse files Browse the repository at this point in the history
  • Loading branch information
narahiero authored and riidefi committed Aug 23, 2023
1 parent cba2771 commit 038119e
Show file tree
Hide file tree
Showing 8 changed files with 282 additions and 175 deletions.
6 changes: 4 additions & 2 deletions pack/dol_objects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ out/dol/text_800072c0_80007f50.o
out/dol/rodata_80244ec0_80245010.o
out/SystemResource.o
out/dol/text_80007f7c_80008e84.o
out/dol/rodata_802450b0_80248010.o
out/dol/data_80258580_802733f0.o
out/dol/rodata_802450b0_80245938.o
out/dol/data_80258580_80270c68.o
out/dol/bss_802a4080_802a6968.o
out/dol/sdata_80384c00_80384c38.o
out/dol/sbss_80385fc0_803860a8.o
out/dol/sdata2_80386fa0_80386ff8.o
out/RKSystem.o
out/dol/text_80009bc0_8000c948.o
out/ansi_files.o
out/dol/rodata_80245a18_80248010.o
out/dol/data_80270c94_802733f0.o
out/dol/sdata2_80387000_80387030.o
out/ansi_fp.o
out/dol/text_8000e418_8000ef04.o
Expand Down
4 changes: 3 additions & 1 deletion pack/dol_slices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ source/game/host_system/SystemResource.cpp:
source/game/host_system/RKSystem.cpp:
text: [0x80008e84, 0x80009bc0]
# ctors: [0x80244de4, 0x80244de8]
rodata: [0x80245938, 0x80245a18]
# data: [0x80270bf0, 0x80270c94]
# bss: [0x802a4080, 0x802a4100]
data: [0x80270c68, 0x80270c94]
# bss: [0x802a4080, 0x802a4160]
# sbss: [0x80385fc8, 0x80385fcc]
sdata2: [0x80386ff8, 0x80387000]

Expand Down
46 changes: 23 additions & 23 deletions pack/symbols.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,30 +260,30 @@ global:
0x80008e7c: 'onExit__Q23EGG6ThreadFv'
0x80008e80: 'onEnter__Q23EGG6ThreadFv'
0x80008e84: 'getStaticInstance__Q26System8RKSystemFv'
0x80008e90: 'WPADAllocator'
0x80008eb0: 'WPADFree'
0x80008e90: 'WPADAllocator__6SystemFUl'
0x80008eb0: 'WPADFree__6SystemFPv'
0x80008ef0: 'main__Q26System8RKSystemFiPPc'
0x80008fac: 'RKSystem_getSysHeap'
0x80008fb4: 'TSystem_initialize'
0x80009190: 'unk_80009190'
0x80008fac: 'getSysHeap__Q26System8RKSystemFv'
0x80008fb4: 'initialize__Q23EGG10BaseSystemFv'
0x80009190: 'initRenderMode__Q23EGG10BaseSystemFv'
0x80009194: 'initialize__Q26System8RKSystemFv'
0x8000951c: 'RKSystem_run'
0x8000951c: 'run__Q26System8RKSystemFv'
0x80009818: 'getDisplay__Q23EGG10BaseSystemFv'
0x80009820: 'unk_80009820'
0x80009824: 'unk_80009824'
0x80009828: 'RKSystem_getSceneManager'
0x80009830: 'RKSystem_getPerformanceView'
0x80009844: 'RkSceneManager_changeSceneWithCreator'
0x8000984c: 'RKSceneManager_calcCurrentFader'
0x80009984: 'RkSceneManager_calc'
0x80009988: 'RkSceneManager_draw'
0x8000998c: 'unk_8000998c'
0x8000999c: 'unk_8000999c'
0x80009820: 'onBeginFrame__Q23EGG10BaseSystemFv'
0x80009824: 'onEndFrame__Q23EGG10BaseSystemFv'
0x80009828: 'getSceneManager__Q23EGG10BaseSystemFv'
0x80009830: 'getPerformanceView__Q23EGG10BaseSystemFv'
0x80009844: 'changeSceneWithCreatorAfterFadeOut__Q26System14RKSceneManagerFiPQ23EGG12SceneCreator'
0x8000984c: 'calcCurrentFader__Q26System14RKSceneManagerFv'
0x80009984: 'calc__Q26System14RKSceneManagerFv'
0x80009988: 'draw__Q26System14RKSceneManagerFv'
0x8000998c: 'doDrawFader__Q26System14RKSceneManagerFv'
0x8000999c: 'doCalcFader__Q26System14RKSceneManagerFv'
0x800099ac: 'getVideo__Q23EGG10BaseSystemFv'
0x800099b4: 'getSysHeap__Q23EGG10BaseSystemFv'
0x800099bc: 'getXfbManager__Q23EGG10BaseSystemFv'
0x800099c4: 'RKSystem_getAudioManager'
0x800099cc: 'unk_800099cc'
0x800099c4: 'getAudioManager__Q23EGG10BaseSystemFv'
0x800099cc: '__sinit__RKSystem_cpp'
0x80009b40: '__dt__Q23EGG8Vector3fFv'
0x80009b80: '__dt__Q23EGG8Vector2fFv'
0x80009bc0: 'HeapCollection_setGroupIdAll'
Expand Down Expand Up @@ -9378,8 +9378,8 @@ global:
0x802424c8: 'decomp__Q23EGG14LZStreamDecompFPCvUl'
0x802424f4: 'getHeaderSize__Q23EGG14LZStreamDecompFv'
0x802424fc: 'getUncompressedSize__Q23EGG14LZStreamDecompFPCv'
0x80242504: 'ConfigurationData_initMemory'
0x8024269c: 'ConfigurationData_run'
0x80242504: 'initMemory__Q23EGG10BaseSystemFv'
0x8024269c: 'run__Q23EGG10BaseSystemFv'
0x802428e8: 'create__Q23EGG10TaskThreadFiiUlPQ23EGG4Heap'
0x80242b94: '__ct__Q33EGG10TaskThread4TJobFv'
0x80242ba8: 'destroy__Q23EGG10TaskThreadFv'
Expand Down Expand Up @@ -9852,8 +9852,8 @@ global:
0x80270bac: 'lbl_80270bac'
0x80270bc0: 'lbl_80270bc0'
0x80270bd8: 'lbl_80270bd8'
0x80270bf0: 'lbl_80270bf0'
0x80270c2c: 'lbl_80270c2c'
0x80270bf0: '__vt__Q26System8RKSystem'
0x80270c2c: '__vt__Q23EGG10BaseSystem'
0x80270c68: '__vt__Q26System14RKSceneManager'
0x80270c98: 'lbl_80270c98'
0x80270cb8: 'lbl_80270cb8'
Expand Down Expand Up @@ -11401,7 +11401,7 @@ global:
0x802a3fc0: '__vt__Q23EGG6Thread'
0x802a3fd8: '__vt__Q23EGG8UnitHeap'
0x802a4008: 'lbl_802a4008'
0x802A4080: 'sInstance__Q26System8RKSystem'
0x802a4080: 'sInstance__Q26System8RKSystem'
0x802a4100: 'lbl_802a4100'
0x802a4118: 'lbl_802a4118'
0x802a4130: 'lbl_802a4130'
Expand Down
6 changes: 6 additions & 0 deletions source/egg/core/eggSceneManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ class SceneManager {

inline int getCurrentSceneID() const { return mCurrentSceneID; }

inline Scene* getParentScene() const { return pParent; }

inline ColorFader* getCurrentFader() const { return mCurrentFader; }

static inline EGG::Heap* getHeapForCreateScene_Mem1() {
return sHeapMem1_ForCreateScene;
}
Expand All @@ -266,6 +270,8 @@ class SceneManager {
mTransitionStatus = type;
}

inline eAfterFadeType getAfterFadeType() { return mTransitionStatus; }

inline void setCreator(SceneCreator* creator) { mSceneCreator = creator; }

inline void setNextSceneID(int ID) { mNextSceneID = ID; }
Expand Down
43 changes: 34 additions & 9 deletions source/egg/core/eggSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include <decomp.h>

#include <egg/core/eggProcessMeter.hpp>


struct GXRenderModeObj;

Expand All @@ -28,28 +30,51 @@ class BaseSystem {
public:
static BaseSystem* sSystem;

public:
inline BaseSystem()
: mSysHeapSize(0x177000), mGraphicsFifoSize(0x80000),
mRenderMode(nullptr) {}

//! @brief [vt+0x08] Return a pointer to the video manager.
//!
virtual Video* getVideo();
virtual Video* getVideo();// { return mVideo; }

//! @brief [vt+0x0c] Return a pointer to the system heap.
//!
virtual Heap* getSysHeap();
virtual Heap* getSysHeap();// { return mSysHeap; }

//! @brief [vt+0x10] Return a pointer to the display manager.
//!
virtual Display* getDisplay();
virtual Display* getDisplay() { return mDisplay; }

//! @brief [vt+0x14] Return a pointer to the Xfb manager.
//!
virtual XfbManager* getXfbManager();
virtual XfbManager* getXfbManager();// { return mXfbMgr; }

//! @brief [vt+0x18] Return a pointer to the performance view.
//!
virtual PerformanceView* getPerformanceView() {
return static_cast<PerformanceView*>(mProcessMeter);
}

//! @brief [vt+0x1c] Return a pointer to the scene manager.
//!
virtual SceneManager* getSceneManager() { return mSceneMgr; }

//! @brief [vt+0x20] Return a pointer to the audio manager.
//!
virtual AudioManager* getAudioManager();// { return mAudioMgr; }

virtual PerformanceView* getPerformanceView(); // [vt+0x18]
virtual SceneManager* getSceneManager(); // [vt+0x1c]
virtual AudioManager* getAudioManager(); // [vt+0x20]
//! @brief [vt+0x24] Called by `run` at the beginning of every frame right
//! after calling `beginFrame` on the display.
//!
virtual void onBeginFrame() {}

//! @brief [vt+0x24] Called by `run` at the end of every frame right after
//! calling `endFrame` on the display.
//!
virtual void onEndFrame() {}

virtual void onBeginFrame(); // [vt+0x24]
virtual void onEndFrame(); // [vt+0x28]
virtual void initRenderMode(); // [vt+0x2c]
virtual void initMemory(); // [vt+0x30]

Expand Down
Loading

0 comments on commit 038119e

Please sign in to comment.