From af59a51db3a6959561cc91d90fef4fa27f57956c Mon Sep 17 00:00:00 2001 From: elijah-thomas774 Date: Sun, 5 May 2024 12:27:34 -0400 Subject: [PATCH] fix up align type (Ui -> i) --- config/SOUE01/symbols.txt | 4 ++-- include/egg/core/eggHeap.h | 6 +++--- src/egg/core/eggHeap.cpp | 7 +++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/config/SOUE01/symbols.txt b/config/SOUE01/symbols.txt index a1226acc..d3a1ee7f 100644 --- a/config/SOUE01/symbols.txt +++ b/config/SOUE01/symbols.txt @@ -26206,9 +26206,9 @@ becomeCurrentHeap__Q23EGG4HeapFv = .text:0x804959A0; // type:function size:0x58 _becomeCurrentHeapWithoutLock__Q23EGG4HeapFv = .text:0x80495A00; // type:function size:0x3C initAllocator__Q23EGG4HeapFPQ23EGG9Allocatori = .text:0x80495A40; // type:function size:0x14 __nw__FUlPv = .text:0x80495A60; // type:function size:0x8 -__nw__FUlPQ23EGG4HeapUi = .text:0x80495A70; // type:function size:0x10 +__nw__FUlPQ23EGG4Heapi = .text:0x80495A70; // type:function size:0x10 __nw__FUlPQ23EGG9Allocator = .text:0x80495A80; // type:function size:0x10 -__nwa__FUlUi = .text:0x80495A90; // type:function size:0x8 +__nwa__FUli = .text:0x80495A90; // type:function size:0x8 __nwa__FUlPQ23EGG4Heapi = .text:0x80495AA0; // type:function size:0x10 __ct__Q23EGG7ExpHeapFP12MEMiHeapHead = .text:0x80495AB0; // type:function size:0x3C __dt__Q23EGG7ExpHeapFv = .text:0x80495AF0; // type:function size:0x74 diff --git a/include/egg/core/eggHeap.h b/include/egg/core/eggHeap.h index 6043c60d..2e33d8a7 100644 --- a/include/egg/core/eggHeap.h +++ b/include/egg/core/eggHeap.h @@ -161,9 +161,9 @@ public: } // namespace EGG /* 80495a60 */ void *operator new(size_t, void *p); -/* 80495a70 */ void *operator new(size_t size, EGG::Heap *heap, u32 align); +/* 80495a70 */ void *operator new(size_t size, EGG::Heap *heap, int align); /* 80495a80 */ void *operator new(size_t size, EGG::Allocator *alloc); -/* 80495a90 */ void *operator new[](size_t size, u32 align); -/* 80495aa0 */ void *operator new[](size_t size, EGG::Heap *heap, u32 align); +/* 80495a90 */ void *operator new[](size_t size, int align); +/* 80495aa0 */ void *operator new[](size_t size, EGG::Heap *heap, int align); #endif diff --git a/src/egg/core/eggHeap.cpp b/src/egg/core/eggHeap.cpp index 620b9e95..a7a0dc7a 100644 --- a/src/egg/core/eggHeap.cpp +++ b/src/egg/core/eggHeap.cpp @@ -54,8 +54,7 @@ namespace EGG { // TODO small instshuffle here, related to regshuffle problems OSReport("cannot allocate from heap %x(%s) : allocatable heap is %x(%s)\n", heap, heap->getName(), sAllocatableHeap, sAllocatableHeap->getName()); - OSReport("\tthread heap=%x(%s)\n", threadHeap, - threadHeap != nullptr ? threadHeap->getName() : "none"); + OSReport("\tthread heap=%x(%s)\n", threadHeap, threadHeap != nullptr ? threadHeap->getName() : "none"); if (sErrorCallback != nullptr) { HeapErrorArg arg; arg.msg = "disable_but"; @@ -192,14 +191,14 @@ extern "C" void MEMInitAllocatorForHeap(Allocator *alloc, s32 align, Heap *heap) /* 80495a60 */ void *operator new(size_t, void *p) { return p; } -/* 80495a70 */ void *operator new(size_t size, EGG::Heap *heap, u32 align) { +/* 80495a70 */ void *operator new(size_t size, EGG::Heap *heap, int align) { return EGG::Heap::alloc(size, align, heap); } /* 80495a80 */ void *operator new(size_t size, EGG::Allocator *alloc) { return MEMAllocFromAllocator(alloc->getHandle(), size); } -/* 80495a90 */ void *operator new[](size_t size, u32 align) { +/* 80495a90 */ void *operator new[](size_t size, int align) { return EGG::Heap::alloc(size, align, nullptr); } /* 80495aa0 */ void *operator new[](size_t size, EGG::Heap *heap, int align) {