From ee58068ebb8477e6eb9e9bd214f76603d047d154 Mon Sep 17 00:00:00 2001 From: ThePlayerRolo Date: Sat, 29 Aug 2026 18:37:36 -0400 Subject: [PATCH 1/2] RPSysQueuedScene & RP_80186E40 --- config/RSPE01_01/symbols.txt | 16 ++++++------ configure.py | 4 +-- include/Pack/RPSystem.h | 1 + include/Pack/RPSystem/RPSysQueuedScene.h | 31 ++++++++++++++++++++++++ src/Pack/RPSystem/RPSysQueuedScene.cpp | 21 ++++++++++++++++ src/Pack/RPSystem/RP_80186E40.cpp | 5 ++++ 6 files changed, 68 insertions(+), 10 deletions(-) create mode 100644 include/Pack/RPSystem/RPSysQueuedScene.h create mode 100644 src/Pack/RPSystem/RPSysQueuedScene.cpp create mode 100644 src/Pack/RPSystem/RP_80186E40.cpp diff --git a/config/RSPE01_01/symbols.txt b/config/RSPE01_01/symbols.txt index 46acac44..077df10f 100644 --- a/config/RSPE01_01/symbols.txt +++ b/config/RSPE01_01/symbols.txt @@ -7001,8 +7001,8 @@ isTaskAsyncFinish__10RPSysSceneCFv = .text:0x80186CFC; // type:function size:0x2 setTaskAsync__10RPSysSceneFv = .text:0x80186D1C; // type:function size:0x10 loadUpdate__10RPSysSceneFv = .text:0x80186D2C; // type:function size:0x4 drawTimeStamp__10RPSysSceneFQ34nw4r2ut5Color = .text:0x80186D30; // type:function size:0x110 -fn_80186E40 = .text:0x80186E40; // type:function size:0x58 -fn_80186E98 = .text:0x80186E98; // type:function size:0x1C +__sinit_\RP_80186E40_cpp = .text:0x80186E40; // type:function size:0x58 scope:local +__arraydtor$25785 = .text:0x80186E98; // type:function size:0x1C scope:local LoadFromDVD__20RPSysResourceManagerFPCcPQ23EGG4HeapQ33EGG9DvdRipper15EAllocDirectionPl = .text:0x80186EB4; // type:function size:0xEC LoadCompressed__20RPSysResourceManagerFPCcPQ23EGG4Heap = .text:0x80186FA0; // type:function size:0x254 LoadStaticLocalArchive__20RPSysResourceManagerFPCc = .text:0x801871F4; // type:function size:0x9C @@ -7022,9 +7022,9 @@ LoadGameLocalArchive__20RPSysResourceManagerFlPQ23EGG4Heap = .text:0x80187964; / LoadGameCommonArchive__20RPSysResourceManagerFlPQ23EGG4Heap = .text:0x80187A0C; // type:function size:0x9C __dt__20RPSysResourceManagerFv = .text:0x80187AA8; // type:function size:0x40 CreateInstance__20RPSysResourceManagerFv = .text:0x80187AE8; // type:function size:0x6C -fn_80187B54 = .text:0x80187B54; // type:function size:0x40 -fn_80187B94 = .text:0x80187B94; // type:function size:0xC -fn_80187BA0 = .text:0x80187BA0; // type:function size:0x70 +__dt__16RPSysQueuedSceneFv = .text:0x80187B54; // type:function size:0x40 +reset__16RPSysQueuedSceneFv = .text:0x80187B94; // type:function size:0xC +CreateInstance__16RPSysQueuedSceneFPQ23EGG4Heap = .text:0x80187BA0; // type:function size:0x70 fn_80187C10 = .text:0x80187C10; // type:function size:0x7C postUpdate__17RPSysCommonObjectFv = .text:0x80187C8C; // type:function size:0x88 preUpdate__17RPSysCommonObjectFv = .text:0x80187D14; // type:function size:0x64 @@ -18570,7 +18570,7 @@ __vt__18RPSysStringTagParm = .data:0x803B9828; // type:object size:0x14 scope:gl __vt__12RPSysTagParm = .data:0x803B983C; // type:object size:0x14 scope:global STATIC_DIR_NAMES__20RPSysResourceManager = .data:0x803B9850; // type:object size:0x10 scope:global __vt__20RPSysResourceManager = .data:0x803B9860; // type:object size:0x10 scope:global -__vt__16RPSysQueuedScene = .data:0x803B9870; // type:object size:0x10 scope:global +__vt__16RPSysQueuedScene = .data:0x803B9870; // type:object size:0xC scope:global __vt__17RPSysCommonObject = .data:0x803B9880; // type:object size:0x14 scope:global __vt__11RPGrpScreen = .data:0x803B9894; // type:object size:0x14 scope:global LANGUAGE_ENG__14RPSysDvdStatus = .data:0x803B98A8; // type:object size:0x10 @@ -19860,7 +19860,7 @@ sAlarmSoundOff__Q210homebutton10Controller = .bss:0x804A3C78; // type:object siz sThis__Q210homebutton10Controller = .bss:0x804A3D38; // type:object size:0x10 spInstance__Q210homebutton9RemoteSpk = .bss:0x804A3D48; // type:object size:0x4 data:4byte lbl_804A3D50 = .bss:0x804A3D50; // type:object size:0x50 data:4byte -lbl_804A3DA0 = .bss:0x804A3DA0; // type:object size:0x10 +@25786 = .bss:0x804A3DA0; // type:object size:0xC scope:local lbl_804A3DB0 = .bss:0x804A3DB0; // type:object size:0x30 sTextBuffer__15RPSysLytTextBox = .bss:0x804A3DE0; // type:object size:0x400 lbl_804A41E0 = .bss:0x804A41E0; // type:object size:0x30 @@ -21865,7 +21865,7 @@ spInstance__13RPSysSceneMgr = .sbss:0x804BF4D8; // type:object size:0x8 data:4by spInstance__17RPSysProjectLocal = .sbss:0x804BF4E0; // type:object size:0x4 data:4byte spInstance__15RPSysGameConfig = .sbss:0x804BF4E8; // type:object size:0x4 data:4byte spInstance__20RPSysResourceManager = .sbss:0x804BF4F0; // type:object size:0x8 data:4byte -lbl_804BF4F8 = .sbss:0x804BF4F8; // type:object size:0x8 data:4byte +spInstance__16RPSysQueuedScene = .sbss:0x804BF4F8; // type:object size:0x4 data:4byte spInstance__14RPSysDvdStatus = .sbss:0x804BF500; // type:object size:0x4 data:4byte spInstance__16RPSysSaveDataMgr = .sbss:0x804BF508; // type:object size:0x8 data:4byte spInstance__16RPSysFontManager = .sbss:0x804BF510; // type:object size:0x8 data:4byte diff --git a/configure.py b/configure.py index 11afe8bc..9aa24937 100755 --- a/configure.py +++ b/configure.py @@ -1213,9 +1213,9 @@ def MatchingFor(*versions): Object(Matching, "Pack/RPSystem/RPSysGameConfig.cpp"), Object(NonMatching, "Pack/RPSystem/RPSysTagParms.cpp"), Object(NonMatching, "Pack/RPSystem/RPSysLoadScene.cpp"), - Object(NonMatching, "Pack/RPSystem/RP_80186E40.cpp"), + Object(Matching, "Pack/RPSystem/RP_80186E40.cpp"), Object(NonMatching, "Pack/RPSystem/RPSysResourceManager.cpp"), - Object(NonMatching, "Pack/RPSystem/RPSysQueuedScene.cpp"), + Object(Matching, "Pack/RPSystem/RPSysQueuedScene.cpp"), Object(NonMatching, "Pack/RPSystem/RPSysCommonObject.cpp"), Object(Matching, "Pack/RPSystem/RPSysDvdStatus.cpp"), Object(NonMatching, "Pack/RPSystem/RPSysSaveDataMgr.cpp"), diff --git a/include/Pack/RPSystem.h b/include/Pack/RPSystem.h index d46be688..1398cecc 100644 --- a/include/Pack/RPSystem.h +++ b/include/Pack/RPSystem.h @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/include/Pack/RPSystem/RPSysQueuedScene.h b/include/Pack/RPSystem/RPSysQueuedScene.h new file mode 100644 index 00000000..60e3215c --- /dev/null +++ b/include/Pack/RPSystem/RPSysQueuedScene.h @@ -0,0 +1,31 @@ +#ifndef RP_SYSTEM_QUEUED_SCENE_H +#define RP_SYSTEM_QUEUED_SCENE_H +#include + +#include + +//! @addtogroup rp_system +//! @{ + +/** + * @brief Pack Project Queued Scene + */ +class RPSysQueuedScene { + RP_SINGLETON_DECL_EX(RPSysQueuedScene); + + /** + * @brief Resets the queued scene's ID + */ + void reset(); + + inline s32 getSceneID() { + return mSceneID; + } +private: + //! Queued Scene ID + s32 mSceneID; // at 0x8 +}; + +//! @} + +#endif diff --git a/src/Pack/RPSystem/RPSysQueuedScene.cpp b/src/Pack/RPSystem/RPSysQueuedScene.cpp new file mode 100644 index 00000000..c5fdd853 --- /dev/null +++ b/src/Pack/RPSystem/RPSysQueuedScene.cpp @@ -0,0 +1,21 @@ +#include + +RP_SINGLETON_IMPL_EX(RPSysQueuedScene) + +/** + * @brief Constructor + * + * @param pHeap Parent heap + */ +RPSysQueuedScene::RPSysQueuedScene(EGG::Heap* pHeap) : mpParentHeap(pHeap) { + reset(); +} + +void RPSysQueuedScene::reset() { + mSceneID = -1; +} + +/** + * @brief Destructor + */ +RPSysQueuedScene::~RPSysQueuedScene() { } diff --git a/src/Pack/RPSystem/RP_80186E40.cpp b/src/Pack/RPSystem/RP_80186E40.cpp new file mode 100644 index 00000000..9c3ad3a3 --- /dev/null +++ b/src/Pack/RPSystem/RP_80186E40.cpp @@ -0,0 +1,5 @@ +#include + +// TODO(ThePlayerRolo) Check if this is used in other Revolution Pack Games since Wii Sports doesn't use it. +// There is a possibility this is in another TU as well. +EGG::Vector3f lbl_804A3DB0[4]; From 4e927890b44384bf5fa2e41077980514282375c5 Mon Sep 17 00:00:00 2001 From: ThePlayerRolo Date: Sat, 29 Aug 2026 18:46:06 -0400 Subject: [PATCH 2/2] update RP_80186E40 --- config/RSPE01_01/splits.txt | 9 +++------ config/RSPE01_01/symbols.txt | 2 +- configure.py | 1 - src/Pack/RPSystem/RPSysLoadScene.cpp | 4 ++++ src/Pack/RPSystem/RP_80186E40.cpp | 5 ----- 5 files changed, 8 insertions(+), 13 deletions(-) delete mode 100644 src/Pack/RPSystem/RP_80186E40.cpp diff --git a/config/RSPE01_01/splits.txt b/config/RSPE01_01/splits.txt index 9d551c0d..891be71c 100644 --- a/config/RSPE01_01/splits.txt +++ b/config/RSPE01_01/splits.txt @@ -2911,14 +2911,11 @@ Pack/RPSystem/RPSysTagParms.cpp: .data start:0x803B9828 end:0x803B9850 Pack/RPSystem/RPSysLoadScene.cpp: - .text start:0x80186878 end:0x80186E40 - .rodata start:0x80382568 end:0x803825C0 - .sdata2 start:0x804C1538 end:0x804C1548 - -Pack/RPSystem/RP_80186E40.cpp: - .text start:0x80186E40 end:0x80186EB4 + .text start:0x80186878 end:0x80186EB4 .ctors start:0x80355114 end:0x80355118 + .rodata start:0x80382568 end:0x803825C0 .bss start:0x804A3DA0 end:0x804A3DE0 + .sdata2 start:0x804C1538 end:0x804C1548 Pack/RPSystem/RPSysResourceManager.cpp: .text start:0x80186EB4 end:0x80187B54 diff --git a/config/RSPE01_01/symbols.txt b/config/RSPE01_01/symbols.txt index 077df10f..4958bc88 100644 --- a/config/RSPE01_01/symbols.txt +++ b/config/RSPE01_01/symbols.txt @@ -7001,7 +7001,7 @@ isTaskAsyncFinish__10RPSysSceneCFv = .text:0x80186CFC; // type:function size:0x2 setTaskAsync__10RPSysSceneFv = .text:0x80186D1C; // type:function size:0x10 loadUpdate__10RPSysSceneFv = .text:0x80186D2C; // type:function size:0x4 drawTimeStamp__10RPSysSceneFQ34nw4r2ut5Color = .text:0x80186D30; // type:function size:0x110 -__sinit_\RP_80186E40_cpp = .text:0x80186E40; // type:function size:0x58 scope:local +__sinit_\RPSysLoadScene_cpp = .text:0x80186E40; // type:function size:0x58 scope:local __arraydtor$25785 = .text:0x80186E98; // type:function size:0x1C scope:local LoadFromDVD__20RPSysResourceManagerFPCcPQ23EGG4HeapQ33EGG9DvdRipper15EAllocDirectionPl = .text:0x80186EB4; // type:function size:0xEC LoadCompressed__20RPSysResourceManagerFPCcPQ23EGG4Heap = .text:0x80186FA0; // type:function size:0x254 diff --git a/configure.py b/configure.py index 9aa24937..0b7c341a 100755 --- a/configure.py +++ b/configure.py @@ -1213,7 +1213,6 @@ def MatchingFor(*versions): Object(Matching, "Pack/RPSystem/RPSysGameConfig.cpp"), Object(NonMatching, "Pack/RPSystem/RPSysTagParms.cpp"), Object(NonMatching, "Pack/RPSystem/RPSysLoadScene.cpp"), - Object(Matching, "Pack/RPSystem/RP_80186E40.cpp"), Object(NonMatching, "Pack/RPSystem/RPSysResourceManager.cpp"), Object(Matching, "Pack/RPSystem/RPSysQueuedScene.cpp"), Object(NonMatching, "Pack/RPSystem/RPSysCommonObject.cpp"), diff --git a/src/Pack/RPSystem/RPSysLoadScene.cpp b/src/Pack/RPSystem/RPSysLoadScene.cpp index 81f1a70e..f8943b97 100644 --- a/src/Pack/RPSystem/RPSysLoadScene.cpp +++ b/src/Pack/RPSystem/RPSysLoadScene.cpp @@ -11,6 +11,10 @@ #define RP_COMMON_SOUND_PATH "Sound/RPPartyCommon/rp_Common_Party.brsar" #endif +// TODO(ThePlayerRolo) Check if this is used in other Revolution Pack Games since Wii Sports doesn't use it. +// Note this needs to be here since if inside of a seperate tu its gets optimized out +EGG::Vector3f lbl_804A3DB0[4]; + /** * @brief Displays the game's build date timestamp * diff --git a/src/Pack/RPSystem/RP_80186E40.cpp b/src/Pack/RPSystem/RP_80186E40.cpp deleted file mode 100644 index 9c3ad3a3..00000000 --- a/src/Pack/RPSystem/RP_80186E40.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include - -// TODO(ThePlayerRolo) Check if this is used in other Revolution Pack Games since Wii Sports doesn't use it. -// There is a possibility this is in another TU as well. -EGG::Vector3f lbl_804A3DB0[4];