From c443f269a747f8a9c2c5b09bfb05ac92979c12c9 Mon Sep 17 00:00:00 2001 From: Amber Brault Date: Fri, 2 Aug 2024 16:52:29 -0400 Subject: [PATCH] Fix more files --- libs/monolib/include/monolib/CPathUtil.hpp | 1 + libs/monolib/src/CPathUtil.cpp | 1 - libs/monolib/src/MemManager.cpp | 15 ++++++++------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/libs/monolib/include/monolib/CPathUtil.hpp b/libs/monolib/include/monolib/CPathUtil.hpp index 63c270b..1491455 100644 --- a/libs/monolib/include/monolib/CPathUtil.hpp +++ b/libs/monolib/include/monolib/CPathUtil.hpp @@ -1,6 +1,7 @@ #pragma once #include "types.h" +#include namespace ml{ diff --git a/libs/monolib/src/CPathUtil.cpp b/libs/monolib/src/CPathUtil.cpp index 69a36df..b35e89c 100644 --- a/libs/monolib/src/CPathUtil.cpp +++ b/libs/monolib/src/CPathUtil.cpp @@ -1,6 +1,5 @@ #include "monolib/CPathUtil.hpp" #include "monolib/FixStr.hpp" -#include namespace ml{ diff --git a/libs/monolib/src/MemManager.cpp b/libs/monolib/src/MemManager.cpp index dc7c65b..a5a62af 100644 --- a/libs/monolib/src/MemManager.cpp +++ b/libs/monolib/src/MemManager.cpp @@ -14,6 +14,7 @@ u32 regionIndex2; bool lbl_80665E38; bool lbl_80665E39; s32 lbl_80667E50; +BOOL lbl_80667E58; @@ -104,14 +105,14 @@ void MemManager_setArenaMemorySize(u32 val, bool b){ //requires func_align 4 MemBlock* MemManager_804339B8(Heap* heap, MemBlock* arg1) { MemBlock* entryTemp = arg1; - MemBlock* tempEntry1 = entryTemp->unk8; + MemBlock* tempEntry1 = entryTemp->next; if (tempEntry1 != entryTemp) { memmove((void*)tempEntry1, entryTemp, sizeof(MemBlock)); entryTemp = tempEntry1; } - entryTemp->unk8 = MemBlock::dummy(); //set the pointer to a random known value + entryTemp->next = (MemBlock*)MemBlock::dummyDataPtr(); //set the pointer to a random known value MemBlock* currentEntry = heap->head; //Go to the end of the list @@ -261,11 +262,6 @@ u32 MemManager_804348C0(u8* arg0, u32 arg1) { return (var_r5 >> 8) & 0xFFFF; } -//dummy operator new -void* operator new(u32 arg0) { - return 0; -} - static inline void deallocate(void* p){ if(p != nullptr){ if(regionIndex1 != -1){ @@ -314,6 +310,11 @@ static inline void deallocate(void* p){ } +//dummy operator new +void* operator new(u32 arg0) { + return 0; +} + void operator delete(void* p) { mtl::deallocate(p); }