Fix a bunch of m symbols

This commit is contained in:
robojumper
2025-07-24 13:55:13 +02:00
parent e8350dc568
commit 39be7ff72c
18 changed files with 98 additions and 69 deletions
+4 -3
View File
@@ -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();
};
+14 -6
View File
@@ -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();