Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 19 additions & 5 deletions config/SOUE01/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
10 changes: 9 additions & 1 deletion include/f/f_list_mg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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
1 change: 1 addition & 0 deletions include/f/f_list_nd.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class fBase_c;
class fLiNdBa_c : public cListNd_c {
public:
fLiNdBa_c(fBase_c *owner) : p_owner(owner) {}
~fLiNdBa_c() {}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows the fBase_c constructor to match for whatever reason


inline fLiNdBa_c *getPrev() const {
return (fLiNdBa_c *)cListNd_c::getPrev();
Expand Down
2 changes: 1 addition & 1 deletion include/f/f_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 2 additions & 3 deletions src/f/f_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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];
Expand Down
8 changes: 6 additions & 2 deletions src/f/f_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<fBase_c *>(search_node.p_owner)->unique_ID & 7;
return static_cast<fBase_c *>(search_node.p_owner)->unique_ID & 7;
}

/* 802e28d0 */
Expand Down