NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
f_base.cpp
1#include <game/framework/f_base.hpp>
2#include <game/mLib/m_heap.hpp>
3#include <string.h>
4#include <constants/sjis_constants.h>
5
11
14
20 mMng(this) {
21
22 // Update the unique ID. If it maxes out the counter, stall the game
25 while (true);
26 }
27
28 // Add the base to the connect and search trees
29 fManager_c::m_connectManage.addTreeNode(&mMng.mConnectNode, m_tmpCtConnectParent);
30 int idx = mMng.getSearchTableNum();
31 fManager_c::m_searchManage[idx].addTopLineNode(&mMng.mSearchNode);
32
33 // Try to get the profile and set the order fields
34 const fProf::fBaseProfile_c *prof = (*fProfListMg_c::m_data_p)[mProfName].mBaseProfile;
35 if (prof != nullptr) {
36 u16 executeOrder = prof->mExecuteOrder;
37 mMng.mMainNode.mOrder = executeOrder;
38 mMng.mMainNode.mNewOrder = executeOrder;
39
40 u16 drawOrder = prof->mDrawOrder;
41 mMng.mDrawNode.mOrder = drawOrder;
42 mMng.mDrawNode.mNewOrder = drawOrder;
43 }
44
45 // Update process control flags to match the parent base
46 fBase_c *parent = getConnectParent();
47 if (parent != nullptr) {
50 }
53 }
54 }
55}
56
58 // [Clear the unused list]
59 fLiNdBaLink_c *curr = mBaseLinks.getFirst();
60 while (curr != nullptr) {
61 curr->clearData();
62 curr = mBaseLinks.getFirst();
63 }
64}
65
66int fBase_c::commonPack(int (fBase_c::*doFunc)(), int (fBase_c::*preFunc)(), void (fBase_c::*postFunc)(MAIN_STATE_e)) {
67 MAIN_STATE_e state;
68
69 int result = (this->*preFunc)();
70 if (result) {
71 result = (this->*doFunc)();
72 if (result == NOT_READY) {
73 state = WAITING;
74 } else if (result == SUCCEEDED) {
75 state = SUCCESS;
76 } else {
77 state = ERROR;
78 }
79
80 } else {
81 state = CANCELED;
82 }
83
84 (this->*postFunc)(state);
85 return result;
86}
87
89 return SUCCEEDED;
90}
91
93 return SUCCEEDED;
94}
95
97
98 // Creation successful, remove the base from the creation list
99 if (state == SUCCESS) {
100 fManager_c::m_createManage.removeLineNode(&mMng.mMainNode);
101
102 // Since operations cannot be scheduled while the corresponding process
103 // is running, defer execution scheduling to the connect operation
104 if (fManager_c::m_nowLoopProc == fManager_c::EXECUTE) {
105 mDeferExecute = true;
106 } else {
107 fManager_c::m_executeManage.insertLineNodePriority(&mMng.mMainNode);
108 fManager_c::m_drawManage.insertLineNodePriority(&mMng.mDrawNode);
110 }
111
112 // Something went wrong, the base must be discarded
113 } else if (state == ERROR) {
115 }
116}
117
119 return SUCCEEDED;
120}
121
125
127 // Wait for arc list to be ready for deletion if it exists
128 if (mpArcList != nullptr) {
129 if (!mpArcList->checkDelete()) {
130 return NOT_READY;
131 }
132 }
133
134 // If the base has children, do not delete it yet
135 fBase_c *child = getConnectChild();
136 if (child != nullptr) {
137 return NOT_READY;
138 }
139 return SUCCEEDED;
140}
141
143 if (state == SUCCESS) {
144 // Remove from all manager lists
145 fManager_c::m_connectManage.removeTreeNode(&mMng.mConnectNode);
146 fManager_c::m_searchManage[mMng.getSearchTableNum()].removeLineNode(&mMng.mSearchNode);
147 fManager_c::m_deleteManage.removeLineNode(&mMng.mMainNode);
148
149 // Delete the heap
150 if (mHeap != nullptr) {
151 mHeap->destroy();
152 }
153
154 // Unload arc list if it exists
155 if (mpArcList != nullptr) {
156 mpArcList->arcListDelete();
157 }
158
159 // Delete the base itself
160 delete this;
161 }
162}
163
167
169 return SUCCEEDED;
170}
171
173 // Can only execute if not deleting and execution is enabled
175 return NOT_READY;
176 }
177 return SUCCEEDED;
178}
179
181 // Do nothing
182}
183
187
189 return SUCCEEDED;
190}
191
193 // Can only draw if not deleting and drawing is enabled
195 return NOT_READY;
196 }
197 return SUCCEEDED;
198}
199
201 // Do nothing
202}
203
207
209 // Do nothing
210}
211
213 if (mDeleteRequested) {
214 mDeleteRequested = false;
215
216 // Move the base from its current manager lists to the delete list
217 if (mLifecycleState == ACTIVE) {
218 fManager_c::m_executeManage.removeLineNode(&mMng.mMainNode);
219 fManager_c::m_drawManage.removeLineNode(&mMng.mDrawNode);
220 } else {
221 fManager_c::m_createManage.removeLineNode(&mMng.mMainNode);
222 }
223
224 fManager_c::m_deleteManage.addTopLineNode(&mMng.mMainNode);
226
227 // Delete all its children recursively
228 // [Pointless code, since this is already done in deleteRequest]
229 for (fTrNdBa_c *curr = mMng.mConnectNode.getChild(); curr != nullptr; curr = curr->getBrNext()) {
230 curr->mpOwner->deleteRequest();
231 }
232
233 } else {
234 // Update process control flags to match the parent base
235 fBase_c *parent = getConnectParent();
236 if (parent != nullptr) {
241 }
242
245 } else if (isProcControlFlag(DISABLE_DRAW)) {
247 }
248 }
249
250 // Assert the correct order in the execute and draw lists
251 // [There's probably some inlining going on here, which is the reason
252 // for all those duplicated temporaries. Couldn't figure out a better solution, though]
253 if (mLifecycleState == ACTIVE) {
254
255 fLiNdBaPr_c *executeNode = &mMng.mMainNode;
256 if (executeNode->mNewOrder != executeNode->mOrder) {
257 fManager_c::m_executeManage.removeLineNode(&mMng.mMainNode);
258 fLiNdBaPr_c *executeNode2 = &mMng.mMainNode;
259 executeNode2->mOrder = executeNode2->mNewOrder;
260 fManager_c::m_executeManage.insertLineNodePriority(executeNode2);
261 }
262
263 fLiNdBaPr_c *drawNode = &mMng.mDrawNode;
264 if (drawNode->mNewOrder != drawNode->mOrder) {
265 fManager_c::m_drawManage.removeLineNode(&mMng.mDrawNode);
266 fLiNdBaPr_c *drawNode2 = &mMng.mDrawNode;
267 drawNode2->mOrder = drawNode2->mNewOrder;
268 fManager_c::m_drawManage.insertLineNodePriority(drawNode2);
269 }
270
271 // Process deferred operation scheduling requests
272 } else if (mLifecycleState != DELETING) {
273 if (mDeferRetryCreate) {
274 mDeferRetryCreate = false;
275 fManager_c::m_createManage.addLastLineNode(&mMng.mMainNode);
276
277 } else if (mDeferExecute) {
278 mDeferExecute = false;
279 fManager_c::m_executeManage.insertLineNodePriority(&mMng.mMainNode);
280 fManager_c::m_drawManage.insertLineNodePriority(&mMng.mDrawNode);
282 }
283 }
284 }
285
286 return SUCCEEDED;
287}
288
290
291 // Check that deletion hasn't already been requested
293 mDeleteRequested = true;
294 deleteReady();
295
296 // Delete all children recursively
297 for (fTrNdBa_c *curr = mMng.mConnectNode.getChild(); curr != nullptr; curr = curr->getBrNext()) {
298 curr->mpOwner->deleteRequest();
299 }
300 }
301}
302
304 if (mMng.mConnectNode.getParent() != nullptr) {
305 return mMng.mConnectNode.getParent()->mpOwner;
306 }
307 return nullptr;
308}
309
311 if (mMng.mConnectNode.getChild() != nullptr) {
312 return mMng.mConnectNode.getChild()->mpOwner;
313 }
314 return nullptr;
315}
316
318 if (mMng.mConnectNode.getBrNext() != nullptr) {
319 return mMng.mConnectNode.getBrNext()->mpOwner;
320 }
321 return nullptr;
322}
323
324bool fBase_c::entryFrmHeap(unsigned long size, EGG::Heap *parentHeap) {
325
326 // Check if heap was already set
327 if (mHeap != nullptr) {
328 return true;
329 }
330
331 unsigned long heapSize = 0;
332 EGG::FrmHeap *newHeap = nullptr;
333
334 // First, try to make a heap with the given size
335 if (size != 0) {
336 newHeap = mHeap::createFrmHeapToCurrent(size, parentHeap, F_BASE_HEAP_NAME, 0x20, mHeap::OPT_NONE);
337
338 if (newHeap != nullptr) {
339 bool createSuccess = createHeap();
341
342 if (!createSuccess) {
343 mHeap::destroyFrmHeap(newHeap);
344 newHeap = nullptr;
345 } else {
346 heapSize = mHeap::adjustFrmHeap(newHeap);
347 if (size == heapSize) {
348 mHeap = newHeap;
349 return true;
350 }
351 }
352 }
353 }
354
355 // If that failed, allocate all available space
356 if (newHeap == nullptr) {
357 newHeap = mHeap::createFrmHeapToCurrent(-1, parentHeap, F_BASE_HEAP_NAME, 0x20, mHeap::OPT_NONE);
358
359 if (newHeap != nullptr) {
360 bool createSuccess = createHeap();
362
363 if (!createSuccess) {
364 mHeap::destroyFrmHeap(newHeap);
365 newHeap = nullptr;
366 } else {
367 heapSize = mHeap::adjustFrmHeap(newHeap);
368 }
369 }
370 }
371
372 // [I think this is trying to verify if adjusting the new heap freed up some more space]
373 if (newHeap != nullptr) {
374 EGG::FrmHeap *largerHeap = mHeap::createFrmHeapToCurrent(heapSize, parentHeap, F_BASE_HEAP_NAME, 0x20, mHeap::OPT_NONE);
375
376 if (largerHeap != nullptr) {
377 if (largerHeap < newHeap) {
378 mHeap::destroyFrmHeap(newHeap);
379 newHeap = nullptr;
380 bool createSuccess = createHeap();
382
383 if (!createSuccess) {
384 mHeap::destroyFrmHeap(largerHeap);
385 } else {
386 mHeap::adjustFrmHeap(largerHeap);
387 mHeap = largerHeap;
388 return true;
389 }
390
391 } else {
393 mHeap::destroyFrmHeap(largerHeap);
394 }
395 }
396 }
397
398 if (newHeap != nullptr) {
399 mHeap = newHeap;
400 return true;
401 }
402
403 // Everything failed, delete self
405 return false;
406}
407
408bool fBase_c::entryFrmHeapNonAdjust(unsigned long size, EGG::Heap *parentHeap) {
409
410 // Check if heap was already set
411 if (mHeap != nullptr) {
412 return true;
413 }
414
415 // Try to make a heap with the given size
416 EGG::FrmHeap *newHeap = mHeap::createFrmHeapToCurrent(size, parentHeap, F_BASE_HEAP_NAME, 0x20, mHeap::OPT_NONE);
417 if (newHeap != nullptr) {
418 bool createSuccess = createHeap();
420
421 if (!createSuccess) {
422 mHeap::destroyFrmHeap(newHeap);
423 } else {
424 mHeap = newHeap;
425 return true;
426 }
427 }
428
429 // Heap creation failed, delete self
431 return false;
432}
433
435 return true;
436}
437
438void *fBase_c::operator new(size_t size) {
439 void *mem = EGG::Heap::alloc(size, -4, mHeap::g_gameHeaps[mHeap::GAME_HEAP_DEFAULT]);
440 if (mem != nullptr) {
441 memset(mem, 0, size);
442 }
443 return mem;
444}
445
446void fBase_c::operator delete(void *mem) {
447 EGG::Heap::free(mem, mHeap::g_gameHeaps[mHeap::GAME_HEAP_DEFAULT]);
448}
449
451 createPack();
452
453 // If the create operation has not yet been completed, reschedule it for the next tick
454 // Since operations cannot be scheduled while the corresponding process is running, defer
455 // it to the connect operation
457 if (fManager_c::m_nowLoopProc == fManager_c::CREATE) {
458 mDeferRetryCreate = true;
459 } else {
460 fManager_c::m_createManage.addLastLineNode(&mMng.mMainNode);
461 }
462 }
463}
464
466 const fTrNdBa_c *connectNode = &mMng.mConnectNode;
467 fTrNdBa_c *end = connectNode->getTreeNextNotChild();
468 fTrNdBa_c *curr = connectNode->getChild();
469
470 while (curr != nullptr && curr != end) {
471 if (curr->mpOwner->mLifecycleState == CREATING) {
472 return curr->mpOwner;
473 }
474 curr = curr->getTreeNext();
475 }
476 return nullptr;
477}
478
480 return getChildProcessCreateState() != nullptr;
481}
482
483void fBase_c::setTmpCtData(ProfileName profName, fTrNdBa_c *connectParent, unsigned long param, u8 groupType) {
484 m_tmpCtParam = param;
485 m_tmpCtProfName = profName;
486 m_tmpCtGroupType = groupType;
487 m_tmpCtConnectParent = connectParent;
488}
489
490fBase_c *fBase_c::fBase_make(ProfileName profName, fTrNdBa_c *connectParent, unsigned long param, u8 groupType) {
491
492 // Check if the profile exists
493 if ((*fProfListMg_c::m_data_p)[profName].mBaseProfile == nullptr) {
494 return nullptr;
495 }
496
497 // Construct the base
498 setTmpCtData(profName, connectParent, param, groupType);
499 fBase_c *res = (fBase_c *) (*fProfListMg_c::m_data_p)[profName].mBaseProfile->mpClassInit();
500
501 // Reset the temporary data
502 setTmpCtData(0, nullptr, 0, 0);
503
504 // Run create operation if the construction was successful
505 if (res != nullptr) {
506 res->runCreate();
507 }
508 return res;
509}
510
511fBase_c *fBase_c::createChild(ProfileName profName, fBase_c *connectParent, unsigned long param, u8 groupType) {
512 if (connectParent == nullptr) {
513 return nullptr;
514 }
515 return fBase_make(profName, &connectParent->mMng.mConnectNode, param, groupType);
516}
517
518fBase_c *fBase_c::createRoot(ProfileName profName, unsigned long param, u8 groupType) {
519 return fBase_make(profName, nullptr, param, groupType);
520}
int commonPack(int(fBase_c::*doFunc)(), int(fBase_c::*preFunc)(), void(fBase_c::*postFunc)(MAIN_STATE_e))
Executes an operation. See here for more details.
Definition f_base.cpp:66
u8 mGroupType
The base's group type. Value is a GROUP_TYPE_e.
Definition f_base.hpp:82
int deletePack()
Executes the delete operation. See commonPack().
Definition f_base.cpp:164
fBase_c * getChildProcessCreateState() const
Gets a child of the base in the CREATING state.
Definition f_base.cpp:465
MAIN_STATE_e
The possible operation results.
Definition f_base.hpp:36
@ ERROR
The operation could not be completed.
Definition f_base.hpp:38
@ SUCCESS
The operation was completed successfully.
Definition f_base.hpp:39
@ CANCELED
The operation was canceled early.
Definition f_base.hpp:37
@ WAITING
The operation is waiting for something and cannot be completed yet.
Definition f_base.hpp:40
static ProfileName m_tmpCtProfName
Temporary storage for the next constructed base's profile name. See mProfName.
Definition f_base.hpp:283
virtual int preCreate()
pre method for the create operation.
Definition f_base.cpp:92
static int(* sLoadAsyncCallback)()
See Unused Content.
Definition f_base.hpp:277
virtual int draw()
do method for the draw operation.
Definition f_base.cpp:188
int createPack()
Executes the create operation. See commonPack().
Definition f_base.cpp:122
virtual int preDelete()
pre method for the delete operation.
Definition f_base.cpp:126
bool mDeferExecute
If the create operation was completed, but scheduling the execute and draw operations isn't possible ...
Definition f_base.hpp:75
static fBase_c * createChild(ProfileName profName, fBase_c *parent, unsigned long param, u8 groupType)
Creates a child base under the given parent.
Definition f_base.cpp:511
static fBaseID_e m_rootUniqueID
Unique ID counter for base construction. See mUniqueID.
Definition f_base.hpp:281
int connectProc()
Executes the connect operation.
Definition f_base.cpp:212
void runCreate()
Kickstarts the base's lifecycle by running the create operation.
Definition f_base.cpp:450
fArcLoad_c * mpArcList
See Unused Content.
Definition f_base.hpp:94
virtual ~fBase_c()
Destroys the base.
Definition f_base.cpp:57
fBase_c * getConnectChild() const
Gets the base's first child.
Definition f_base.cpp:310
fBase_c * getConnectBrNext() const
Gets the base's next sibling.
Definition f_base.cpp:317
void deleteRequest()
Requests deletion of the base.
Definition f_base.cpp:289
virtual int create()
do method for the create operation.
Definition f_base.cpp:88
static fBase_c * fBase_make(ProfileName profName, fTrNdBa_c *connectParent, unsigned long param, u8 groupType)
Internal function for base construction.
Definition f_base.cpp:490
fLiMgBa_c mBaseLinks
See Unused Content.
Definition f_base.hpp:95
virtual int preExecute()
pre method for the execute operation.
Definition f_base.cpp:172
fManager_c mMng
The base's process manager.
Definition f_base.hpp:92
static u8 m_tmpCtGroupType
Temporary storage for the next constructed base's group type. See mGroupType.
Definition f_base.hpp:284
virtual bool entryFrmHeap(unsigned long size, EGG::Heap *parentHeap)
Creates a heap of the given size for the base.
Definition f_base.cpp:324
virtual bool createHeap()
[Does nothing].
Definition f_base.cpp:434
virtual void postCreate(MAIN_STATE_e state)
post method for the create operation.
Definition f_base.cpp:96
static u32 m_tmpCtParam
Temporary storage for the next constructed base's params. See mParam.
Definition f_base.hpp:282
ProfileName mProfName
The base's profile name.
Definition f_base.hpp:63
bool checkChildProcessCreateState() const
Checks if the base has at least one child in the CREATING state.
Definition f_base.cpp:479
bool mDeferRetryCreate
If the create operation has not been completed, and rescheduling it isn't possible at this time.
Definition f_base.hpp:80
@ CREATING
The base's create operation has yet to conclude.
Definition f_base.hpp:22
@ DELETING
The base's delete operation is about to run.
Definition f_base.hpp:24
@ ACTIVE
The base is in the main execution cycle.
Definition f_base.hpp:23
u32 mParam
A bitfield that configures the base's behaviour. Its usage varies from profile to profile.
Definition f_base.hpp:62
bool mDeleteRequested
If deletion of the base was requested, but the delete operation has not been scheduled yet.
Definition f_base.hpp:70
virtual void postExecute(MAIN_STATE_e state)
post method for the execute operation.
Definition f_base.cpp:180
virtual int preDraw()
pre method for the draw operation.
Definition f_base.cpp:192
void clearProcControlFlag(u8 flag)
Clears a flag in mProcControl.
Definition f_base.hpp:90
int executePack()
Executes the execute operation. See commonPack().
Definition f_base.cpp:184
virtual int execute()
do method for the execute operation.
Definition f_base.cpp:168
void setProcControlFlag(u8 flag)
Sets a flag in mProcControl.
Definition f_base.hpp:88
static fBase_c * createRoot(ProfileName profName, unsigned long param, u8 groupType)
Creates a root base.
Definition f_base.cpp:518
@ DISABLE_DRAW
Drawing is disabled.
Definition f_base.hpp:55
@ ROOT_DISABLE_EXECUTE
Execution is disabled, and this is a root base.
Definition f_base.hpp:52
@ DISABLE_EXECUTE
Execution is disabled.
Definition f_base.hpp:53
@ ROOT_DISABLE_DRAW
Drawing is disabled, and this is a root base.
Definition f_base.hpp:54
virtual bool entryFrmHeapNonAdjust(unsigned long size, EGG::Heap *parentHeap)
Creates a heap of the given size for the base.
Definition f_base.cpp:408
u8 mLifecycleState
The base's lifecycle state. Value is a LIFECYCLE_e.
Definition f_base.hpp:66
virtual void postDraw(MAIN_STATE_e state)
post method for the draw operation.
Definition f_base.cpp:200
int drawPack()
Executes the draw operation. See commonPack().
Definition f_base.cpp:204
virtual void postDelete(MAIN_STATE_e state)
post method for the delete operation.
Definition f_base.cpp:142
fBase_c * getConnectParent() const
Gets the base's parent.
Definition f_base.cpp:303
@ NOT_READY
The step could not completed at this time.
Definition f_base.hpp:45
@ SUCCEEDED
The step was completed successfully.
Definition f_base.hpp:46
static void setTmpCtData(ProfileName profName, fTrNdBa_c *connectParent, unsigned long param, u8 groupType)
Sets temporary data to be used for the next base's construction.
Definition f_base.cpp:483
virtual void deleteReady()
Informs the base that it's about to be deleted.
Definition f_base.cpp:208
static fTrNdBa_c * m_tmpCtConnectParent
Temporary storage for the next constructed base's parent connect node.
Definition f_base.hpp:285
virtual int doDelete()
do method for the delete operation.
Definition f_base.cpp:118
static void(* sUnloadCallback)()
See Unused Content.
Definition f_base.hpp:278
fBaseID_e mUniqueID
The base's unique identifier.
Definition f_base.hpp:61
bool isProcControlFlag(u8 flag) const
Checks if a flag is set in mProcControl.
Definition f_base.hpp:86
fBase_c()
Constructs a new base.
Definition f_base.cpp:15
A base line node, with priority fields for reordering.
Definition f_line_nd.hpp:33
u16 mOrder
The priority of this node. Lower values mean higher priority.
Definition f_line_nd.hpp:56
u16 mNewOrder
The priority the node should change to if it differs from mOrder.
Definition f_line_nd.hpp:57
static fLiMgBaFuPr_c m_createManage
A list of all the bases scheduled for creation.
Definition f_manager.hpp:72
static fLiMgBa_c m_searchManage[8]
An array of lists used for base lookup.
Definition f_manager.hpp:80
static fTrMgBaFu_c m_connectManage
A tree that connects all loaded bases.
Definition f_manager.hpp:71
static LOOP_PROC_e m_nowLoopProc
The current operation being globally executed. See mainLoop().
Definition f_manager.hpp:90
static fLiMgBaFuPr_c m_executeManage
A list of all the bases scheduled for execution.
Definition f_manager.hpp:73
static fLiMgBaFuPr_c m_deleteManage
A list of all the bases scheduled for deletion.
Definition f_manager.hpp:74
fTrNdBa_c mConnectNode
The node in the connect tree.
Definition f_manager.hpp:63
static fLiMgBaFuPr_c m_drawManage
A list of all the bases scheduled for drawing.
Definition f_manager.hpp:75
static const fProfilePtr_c(* m_data_p)[fProf::PROFILE_COUNT]
A list of all profiles.
Definition f_profile.hpp:87
A base tree node.
Definition f_tree_nd.hpp:12
fBase_c * mpOwner
The owner of this node.
Definition f_tree_nd.hpp:45
fTrNdBa_c * getTreeNextNotChild() const
Gets the next node in preorder traversal order, excluding the node's children.
Definition f_tree_nd.hpp:25
fTrNdBa_c * getTreeNext() const
Gets the next node in preorder traversal order.
Definition f_tree_nd.hpp:20
fBaseID_e
A unique identifier for each base.
Definition f_base_id.hpp:6
@ BASE_ID_MAX
The maximum identifier value.
Definition f_base_id.hpp:9
@ BASE_ID_FIRST
The starting identifier value.
Definition f_base_id.hpp:8
u16 ProfileName
The name of a profile. Value is a fProf::PROFILE_NAME_e.
Definition f_profile.hpp:32
Provides high-level heap management utilities built on top of the EGG heap system.
Definition m_heap.hpp:24
@ GAME_HEAP_DEFAULT
The default game heap (alias of MEM1 or MEM2).
Definition m_heap.hpp:38
size_t adjustFrmHeap(EGG::FrmHeap *heap)
Adjusts a frame heap to release unused memory.
Definition m_heap.cpp:111
void restoreCurrentHeap()
Restores the previously saved heap as current.
Definition m_heap.cpp:176
void destroyFrmHeap(EGG::FrmHeap *heap)
Destroys a frame heap.
Definition m_heap.cpp:105
EGG::FrmHeap * createFrmHeapToCurrent(size_t size, EGG::Heap *parent, const char *name, ulong align, AllocOptBit_t opt)
Creates a frame heap and sets it as current.
Definition m_heap.cpp:181
@ OPT_NONE
No special allocation options.
Definition m_heap.hpp:29
EGG::ExpHeap * g_gameHeaps[GAME_HEAP_COUNT]
The game heaps.
Definition m_heap.cpp:13
A set of basic information needed to construct a generic base.
Definition f_profile.hpp:54