diff --git a/config/SOUE01/symbols.txt b/config/SOUE01/symbols.txt index 0570fe6b..1f2eb02e 100644 --- a/config/SOUE01/symbols.txt +++ b/config/SOUE01/symbols.txt @@ -17353,15 +17353,15 @@ searchNodeByID__9fLiMgBa_cCF9fBaseID_e = .text:0x802E2760; // type:function size searchNodeByProfName__9fLiMgBa_cCFUsP9fLiNdBa_c = .text:0x802E2790; // type:function size:0x3C link__9fLiNdBa_cFP7fBase_c = .text:0x802E27D0; // type:function size:0x5C unlink__9fLiNdBa_cFv = .text:0x802E2830; // type:function size:0x48 -__dt__9fLiMgBa_cFv = .text:0x802E2880; // type:function size:0x40 +__dt__16fLiMgBa_Search_cFv = .text:0x802E2880; // type:function size:0x40 getSearchTableNum__10fManager_cFv = .text:0x802E28C0; // type:function size:0x10 searchBaseByID__10fManager_cF9fBaseID_e = .text:0x802E28D0; // type:function size:0x48 searchBaseByProfName__10fManager_cFUsPC7fBase_c = .text:0x802E2920; // type:function size:0x54 searchBaseByGroupType__10fManager_cFUcPC7fBase_c = .text:0x802E2980; // type:function size:0x54 mainLoop__10fManager_cFv = .text:0x802E29E0; // type:function size:0xC0 __sinit_\f_manager_cpp = .text:0x802E2AA0; // type:function size:0x138 scope:local -__ct__9fLiMgBa_cFv = .text:0x802E2BE0; // type:function size:0x10 -__arraydtor$4132 = .text:0x802E2BF0; // type:function size:0x1C scope:local +__ct__16fLiMgBa_Search_cFv = .text:0x802E2BE0; // type:function size:0x10 +__arraydtor$4135 = .text:0x802E2BF0; // type:function size:0x1C scope:local walkPack__11fTrMgPTMF_cFv = .text:0x802E2C10; // type:function size:0x84 searchNodeByProfName__9fTrMgBa_cCFUsPC9fTrNdBa_c = .text:0x802E2CA0; // type:function size:0x68 searchNodeByGroupType__9fTrMgBa_cCFUcPC9fTrNdBa_c = .text:0x802E2D10; // type:function size:0x68 @@ -35668,8 +35668,22 @@ lbl_80541A00 = .data:0x80541A00; // type:object size:0x10 __vt__20DynamicModuleControl = .data:0x80541A10; // type:object size:0x30 __vt__24DynamicModuleControlBase = .data:0x80541A40; // type:object size:0x30 lbl_80541A70 = .data:0x80541A70; // type:object size:0x808 -lbl_80542278 = .data:0x80542278; // type:object size:0xB4 data:4byte -lbl_8054232C = .data:0x8054232C; // type:object size:0x30 +lbl_80542278 = .data:0x80542278; // type:object size:0xC data:4byte +lbl_80542284 = .data:0x80542284; // type:object size:0xC +lbl_80542290 = .data:0x80542290; // type:object size:0xC +lbl_8054229C = .data:0x8054229C; // type:object size:0xC +lbl_805422A8 = .data:0x805422A8; // type:object size:0xC +lbl_805422B4 = .data:0x805422B4; // type:object size:0xC +lbl_805422C0 = .data:0x805422C0; // type:object size:0xC +lbl_805422CC = .data:0x805422CC; // type:object size:0xC +lbl_805422D8 = .data:0x805422D8; // type:object size:0xC +lbl_805422E4 = .data:0x805422E4; // type:object size:0xC +lbl_805422F0 = .data:0x805422F0; // type:object size:0xC +lbl_805422FC = .data:0x805422FC; // type:object size:0xC +lbl_80542308 = .data:0x80542308; // type:object size:0xC +lbl_80542314 = .data:0x80542314; // type:object size:0xC +lbl_80542320 = .data:0x80542320; // type:object size:0xC +lbl_8054232C = .data:0x8054232C; // type:object size:0x2F data:string __vt__7fBase_c = .data:0x8054235C; // type:object size:0x4C lbl_805423A8 = .data:0x805423A8; // type:object size:0xC data:4byte lbl_805423B4 = .data:0x805423B4; // type:object size:0xC data:4byte diff --git a/configure.py b/configure.py index 7782d9dd..1be58960 100644 --- a/configure.py +++ b/configure.py @@ -302,7 +302,7 @@ def nw4rLib(lib_name, objects): Object(Matching, "toBeSorted/counters/extra_wallet_counter.cpp"), Object(NonMatching, "toBeSorted/file_manager.cpp"), Object(NonMatching, "toBeSorted/save_manager.cpp"), - Object(NonMatching, "f/f_base.cpp"), + Object(Matching, "f/f_base.cpp"), Object(Matching, "f/f_list.cpp"), Object(Matching, "f/f_manager.cpp"), Object(Matching, "m/m_allocator.cpp"), diff --git a/include/f/f_list_mg.h b/include/f/f_list_mg.h index c6601f21..b39c3602 100644 --- a/include/f/f_list_mg.h +++ b/include/f/f_list_mg.h @@ -15,7 +15,7 @@ class fBase_c; /// @brief A list of fLiNdBa_c nodes. class fLiMgBa_c : public cListMg_c { public: - ~fLiMgBa_c() {} + // ~fLiMgBa_c() {} /** * @brief Counts the number of nodes of a given profile in this list. * @@ -36,4 +36,12 @@ class fLiMgBa_c : public cListMg_c { } }; +/// @brief Unofficial hack that wasn't in NSMBW to prevent fLiMgBa_c from +/// having a dtor instantiated in f_list.cpp. This class is only used +/// in f_manager.cpp +class fLiMgBa_Search_c : public fLiMgBa_c { +public: + ~fLiMgBa_Search_c(); +}; + #endif diff --git a/include/f/f_list_nd.h b/include/f/f_list_nd.h index 6e5cc8eb..4ef42769 100644 --- a/include/f/f_list_nd.h +++ b/include/f/f_list_nd.h @@ -12,6 +12,7 @@ class fBase_c; class fLiNdBa_c : public cListNd_c { public: fLiNdBa_c(fBase_c *owner) : p_owner(owner) {} + ~fLiNdBa_c() {} inline fLiNdBa_c *getPrev() const { return (fLiNdBa_c *)cListNd_c::getPrev(); diff --git a/include/f/f_manager.h b/include/f/f_manager.h index d54f9acf..d6bb8d70 100644 --- a/include/f/f_manager.h +++ b/include/f/f_manager.h @@ -47,7 +47,7 @@ class fManager_c { /* 805b8510 */ static fLiMgPTMF_c m_drawManage; ///< A list of all the bases scheduled for drawing. /* 805b8524 */ static fLiMgPTMF_c m_deleteManage; ///< A list of all the bases scheduled for deletion. - /* 805b8548 */ static fLiMgBa_c m_searchManage[8]; + /* 805b8548 */ static fLiMgBa_Search_c m_searchManage[8]; /* 80575bb8 */ static u32 m_StopProcInf; ///< Which processes should be executed this frame. /* 80573fc0 */ static LOOP_PROC_e m_nowLoopProc; ///< The process ::mainLoop is currently in. diff --git a/src/f/f_base.cpp b/src/f/f_base.cpp index 661ec622..640f83e2 100644 --- a/src/f/f_base.cpp +++ b/src/f/f_base.cpp @@ -24,7 +24,6 @@ void (*fBase_c::sUnloadCallback)(); fBase_c::fBase_c() : unique_ID(m_rootUniqueID), params(m_tmpCtData.params), profile_name(m_tmpCtData.prof_name), group_type(m_tmpCtData.group_type), manager(this) { - fManager_c *mgr = &manager; m_rootUniqueID = (fBaseID_e)(m_rootUniqueID + 1); if (m_rootUniqueID == INVALID) { @@ -33,8 +32,8 @@ fBase_c::fBase_c() } } - fManager_c::m_connectManage.addTreeNode(&mgr->connect_node, m_tmpCtData.connect_parent); - int searchTableIdx = mgr->getSearchTableNum(); + fManager_c::m_connectManage.addTreeNode(&manager.connect_node, m_tmpCtData.connect_parent); + int searchTableIdx = manager.getSearchTableNum(); fManager_c::m_searchManage[searchTableIdx].prepend(&manager.search_node); const fProfile::fBaseProfile_c *profile = (*fProfile::sProfileList)[profile_name]; diff --git a/src/f/f_manager.cpp b/src/f/f_manager.cpp index 69bf8043..93855ba8 100644 --- a/src/f/f_manager.cpp +++ b/src/f/f_manager.cpp @@ -7,14 +7,18 @@ fLiMgPTMF_c fManager_c::m_executeManage(&fBase_c::executePack); fLiMgPTMF_c fManager_c::m_drawManage(&fBase_c::drawPack); fLiMgPTMF_c fManager_c::m_deleteManage(&fBase_c::deletePack); -fLiMgBa_c fManager_c::m_searchManage[8]; +fLiMgBa_Search_c fManager_c::m_searchManage[8]; u32 fManager_c::m_StopProcInf; fManager_c::LOOP_PROC_e fManager_c::m_nowLoopProc = CONNECT; +fLiMgBa_Search_c::~fLiMgBa_Search_c() { + +} + /* 802e28c0 */ int fManager_c::getSearchTableNum() { - return reinterpret_cast(search_node.p_owner)->unique_ID & 7; + return static_cast(search_node.p_owner)->unique_ID & 7; } /* 802e28d0 */