summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2025-07-24 13:55:13 +0200
committerrobojumper <robojumper@gmail.com>2025-07-24 13:55:13 +0200
commit39be7ff72cd374e2d915487e90987c8518c4a395 (patch)
treee091d030fbb85ec5b82d37b6260f91ac3cc86be1 /include
parente8350dc5681fd9d689f25474674d0e930263bda2 (diff)
Fix a bunch of m symbols
Diffstat (limited to 'include')
-rw-r--r--include/m/m_allocator.h7
-rw-r--r--include/m/m_heap.h20
2 files changed, 18 insertions, 9 deletions
diff --git a/include/m/m_allocator.h b/include/m/m_allocator.h
index 4391ad0e..6d6f307b 100644
--- a/include/m/m_allocator.h
+++ b/include/m/m_allocator.h
@@ -2,6 +2,7 @@
#define M_ALLOCATOR_H
#include "egg/core/eggAllocator.h"
+#include "m/m_heap.h"
class mAllocator_c : public EGG::Allocator {
public:
@@ -19,12 +20,12 @@ public:
/* 0x08 */ virtual ~mHeapAllocator_c();
/* 0x0C */ // virtual void* alloc(u32 size); // see mAlloctor::alloc
/* 0x10 */ // virtual void free(void* block); // see mAlloctor::free
- bool replaceWithNewFrmHeap(s32 size, EGG::Heap *newHeap, char *heapName, s32 align, u32 unk);
- bool replaceWithNewExpHeap(s32 size, EGG::Heap *newHeap, char *heapName, s32 align, u32 unk);
+ bool createFrmHeap(u32 size, EGG::Heap *newHeap, const char *heapName, u32 align, mHeap::AllocOptBit_t attr);
+ bool createExpHeap(u32 size, EGG::Heap *newHeap, const char *heapName, u32 align, mHeap::AllocOptBit_t attr);
void destroyHeap();
s32 adjustFrmHeap();
s32 adjustExpHeap();
- bool createNewTempFrmHeap(s32 size, EGG::Heap *newHeap, char *heapName, s32 align, u32 unk);
+ bool createFrmHeapToCurrent(u32 size, EGG::Heap *newHeap, const char *heapName, u32 align, mHeap::AllocOptBit_t attr);
void adjustFrmHeapRestoreCurrent();
};
diff --git a/include/m/m_heap.h b/include/m/m_heap.h
index 05cc8308..e13b028b 100644
--- a/include/m/m_heap.h
+++ b/include/m/m_heap.h
@@ -16,14 +16,22 @@ class AssertHeap;
// TODO: Doc symbols and func locations
class mHeap {
public:
- /* 802f0f00 */ static u16 copyAttribute(u32);
+ // TODO - fix when importing RVL MEM
+ enum AllocOptBit_t {
+ OPT_NONE = 0x0,
+ OPT_1 = 0x1,
+ OPT_2 = 0x2,
+ OPT_4 = 0x4,
+ };
+
+ /* 802f0f00 */ static u16 GetOptFlag(AllocOptBit_t);
/* 802f0f40 */ static EGG::Heap *setCurrentHeap(EGG::Heap *);
/* 802f0f50 */ static EGG::Heap *createExpHeap(size_t size, EGG::Heap *parentHeap, const char *name, u32 align,
- u32 attrs);
+ AllocOptBit_t attrs);
/* 802f1060 */ static size_t adjustExpHeap(EGG::ExpHeap *heap);
/* 802f10d0 */ static size_t expHeapCost(size_t start, u32 size);
/* 802f10f0 */ static EGG::FrmHeap *createFrmHeap(size_t size, EGG::Heap *parentHeap, const char *name,
- size_t align, size_t attrs);
+ size_t align, AllocOptBit_t attrs);
/* 802f1200 */ static void destroyFrmHeap(EGG::FrmHeap *heap);
/* 802f1220 */ static size_t adjustFrmHeap(EGG::FrmHeap *heap);
/* 802f1290 */ static size_t frmHeapCost(size_t start, u32 size);
@@ -35,8 +43,8 @@ public:
/* 802f1350 */ static EGG::ExpHeap *createHeap(size_t size, EGG::Heap *, const char *name);
/* 802f13d0 */ static void saveCurrentHeap();
/* 802f13e0 */ static void restoreCurrentHeap();
- /* 802f1410 */ static EGG::FrmHeap *makeFrmHeapAndUpdate(size_t size, EGG::Heap *parentHeap, const char *name,
- u32 align, u32 attrs);
+ /* 802f1410 */ static EGG::FrmHeap *createFrmHeapToCurrent(size_t size, EGG::Heap *parentHeap, const char *name,
+ u32 align, AllocOptBit_t attrs);
/* 802f1450 */ static int getGameHeapNum();
/* 802f1460 */ static EGG::Heap *createGameHeap(int heapNum, size_t size, EGG::Heap *parentHeap);
/* 802f1510 */ static void createGameHeap1(size_t size, EGG::Heap *parentHeap);
@@ -44,7 +52,7 @@ public:
/* 802f1590 */ static void createCommandHeap(size_t size, EGG::Heap *parentHeap);
/* 802f15c0 */ static void createDylinkHeap(size_t size, EGG::Heap *parentHeap);
/* 802f15f0 */ static EGG::AssertHeap *createAssertHeap(EGG::Heap *parentHeap);
- /* 802f1640 */ static EGG::FrmHeap *makeHeapOnCurrentGameHeap(size_t size, const char *name, u32 align, u32 flags);
+ /* 802f1640 */ static EGG::FrmHeap *makeHeapOnCurrentGameHeap(size_t size, const char *name, u32 align, AllocOptBit_t flags);
static int getDefaultGameHeapId();