From 508d5b9e720f81ebf8148fd07faef1c61e9901b2 Mon Sep 17 00:00:00 2001 From: robojumper Date: Sun, 15 Sep 2024 21:40:03 +0200 Subject: Actor cleanup (#32) * Actor cleanup --------- Co-authored-by: elijah-thomas774 --- include/d/a/obj/d_a_obj_base.h | 4 +++- include/m/m3d/m_shadow.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/d/a/obj/d_a_obj_base.h b/include/d/a/obj/d_a_obj_base.h index 434fb4a6..e4ec0f2b 100644 --- a/include/d/a/obj/d_a_obj_base.h +++ b/include/d/a/obj/d_a_obj_base.h @@ -128,6 +128,8 @@ protected: }; // Actors' createHeap functions often have patterns that can be matched with this macro -#define TRY_CREATE(thing) do { bool result = (thing); if (!result) return result; } while (0); +#define TRY_CREATE(thing) do { bool result = (thing); if (!result) return result; } while (0) + +#define CREATE_ALLOCATOR(className) do { if (!initAllocatorWork1Heap(-1, #className "::m_allocator", 0x20)) { return FAILED; } } while (0) #endif diff --git a/include/m/m3d/m_shadow.h b/include/m/m3d/m_shadow.h index 9f0b70d1..f06863c5 100644 --- a/include/m/m3d/m_shadow.h +++ b/include/m/m3d/m_shadow.h @@ -127,7 +127,7 @@ public: void draw(const mMtx_c &, u32); void afterDraw(); - EGG::FrmHeap *changeHeap(int index) { + void changeHeap(int index) { mCurrentHeapIdx = index % 2; mpCurrentHeap = mpFrmHeaps[mCurrentHeapIdx]; } -- cgit v1.2.3