diff options
| author | robojumper <robojumper@gmail.com> | 2025-05-18 12:41:12 +0200 |
|---|---|---|
| committer | robojumper <robojumper@gmail.com> | 2025-05-19 21:52:55 +0200 |
| commit | bb6fd66745a19426066f4c664fc0972634d09462 (patch) | |
| tree | 75a0e55e1a20054b28b1ec7f014074d538b2eff1 /include/egg | |
| parent | 790fc7fda31e9daf8cb4299544c78a1ff2b07d36 (diff) | |
More player model
Diffstat (limited to 'include/egg')
| -rw-r--r-- | include/egg/core/eggAllocator.h | 5 | ||||
| -rw-r--r-- | include/egg/core/eggHeap.h | 19 |
2 files changed, 22 insertions, 2 deletions
diff --git a/include/egg/core/eggAllocator.h b/include/egg/core/eggAllocator.h index 4d9978c6..f260f1e1 100644 --- a/include/egg/core/eggAllocator.h +++ b/include/egg/core/eggAllocator.h @@ -21,6 +21,11 @@ public: inline MEMAllocator *getHandle() { return static_cast<MEMAllocator *>(this); } + + Heap *getHeap() { + return mHeap; + } + /* 0x14 */ Heap *mHeap; /* 0x18 */ s32 align; }; diff --git a/include/egg/core/eggHeap.h b/include/egg/core/eggHeap.h index 986248aa..c83a9956 100644 --- a/include/egg/core/eggHeap.h +++ b/include/egg/core/eggHeap.h @@ -5,13 +5,14 @@ #include "common.h" #include "egg/core/eggDisposer.h" -#include "egg/core/eggThread.h" +#include "egg/egg_types.h" #include "egg/prim/eggBitFlag.h" + #include "nw4r/ut.h" + #include "rvl/MEM.h" #include "rvl/OS.h" - namespace EGG { // class ExpHeap; @@ -79,6 +80,20 @@ public: return this; } + static inline EGG::FrmHeap *toFrmHeap(EGG::Heap *heap) { + if (heap != nullptr && heap->getHeapKind() == HEAP_KIND_FRAME) { + return (FrmHeap *)heap; + } + return nullptr; + } + + static inline EGG::ExpHeap *toExpHeap(EGG::Heap *heap) { + if (heap != nullptr && heap->getHeapKind() == HEAP_KIND_EXPANDED) { + return (ExpHeap *)heap; + } + return nullptr; + } + public: // members /* 0x10 */ MEMiHeapHead *mHeapHandle; |
