summaryrefslogtreecommitdiff
path: root/src
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 /src
parente8350dc5681fd9d689f25474674d0e930263bda2 (diff)
Fix a bunch of m symbols
Diffstat (limited to 'src')
-rw-r--r--src/d/a/d_a_base.cpp3
-rw-r--r--src/d/d_dylink.cpp2
-rw-r--r--src/d/d_player_mdl.cpp4
-rw-r--r--src/d/d_rawarchive.cpp3
-rw-r--r--src/d/d_room.cpp5
-rw-r--r--src/f/f_base.cpp30
-rw-r--r--src/m/m3d/m_banm.cpp3
-rw-r--r--src/m/m3d/m_shadow.cpp4
-rw-r--r--src/m/m_allocator.cpp8
-rw-r--r--src/m/m_dvd.cpp23
-rw-r--r--src/m/m_heap.cpp18
-rw-r--r--src/toBeSorted/attention.cpp3
-rw-r--r--src/toBeSorted/d_emitter.cpp3
-rw-r--r--src/toBeSorted/d_particle.cpp2
-rw-r--r--src/toBeSorted/time_area_mgr.cpp3
15 files changed, 67 insertions, 47 deletions
diff --git a/src/d/a/d_a_base.cpp b/src/d/a/d_a_base.cpp
index 5ad96e3c..a60175f5 100644
--- a/src/d/a/d_a_base.cpp
+++ b/src/d/a/d_a_base.cpp
@@ -16,6 +16,7 @@
#include "f/f_base.h"
#include "f/f_list_nd.h"
#include "m/m_angle.h"
+#include "m/m_heap.h"
#include "m/m_vec.h"
#include "toBeSorted/actor_info.h"
#include "toBeSorted/event.h"
@@ -129,7 +130,7 @@ int dAcBase_c::initAllocatorWork1Heap(int size, char *name, int align) {
}
int dAcBase_c::initAllocator(int size, char *name, EGG::Heap *heap, int align) {
- if (!heap_allocator.createNewTempFrmHeap(size, heap, name, 0x20, 0)) {
+ if (!heap_allocator.createFrmHeapToCurrent(size, heap, name, 0x20, mHeap::OPT_NONE)) {
return 0;
}
sound_source = createSoundSource();
diff --git a/src/d/d_dylink.cpp b/src/d/d_dylink.cpp
index 55197434..2c17a470 100644
--- a/src/d/d_dylink.cpp
+++ b/src/d/d_dylink.cpp
@@ -46,7 +46,7 @@ char relsDir[] = "/rels";
int initDylinkHeap(int maxRelId, const RelNamePtr *dynNameTable, int dynNameTableNum, EGG::Heap *parentHeap) {
cCc_frmHeap = mHeap::createFrmHeap(
maxRelId * 0x10 + dynNameTableNum * 0x48, parentHeap, "ダイナミックリンク制御用ヒープ(dDyl::cCc_frmHeap)", 0x20,
- 0
+ mHeap::OPT_NONE
);
mHeap _guard(cCc_frmHeap);
diff --git a/src/d/d_player_mdl.cpp b/src/d/d_player_mdl.cpp
index c5c45ba3..43a2bf28 100644
--- a/src/d/d_player_mdl.cpp
+++ b/src/d/d_player_mdl.cpp
@@ -15,6 +15,7 @@
#include "m/m3d/m_fanm.h"
#include "m/m3d/m_mdl.h"
#include "m/m_allocator.h"
+#include "m/m_heap.h"
#include "m/m_mtx.h"
#include "m/m_vec.h"
#include "nw4r/g3d/g3d_anmchr.h"
@@ -702,8 +703,7 @@ void daPlayerModelBase_c::freeFrmHeap(mHeapAllocator_c *allocator) {
}
void daPlayerModelBase_c::allocFrmHeap(mHeapAllocator_c *allocator, u32 size, const char *name) {
- // TODO fix char constness
- allocator->createNewTempFrmHeap(size, dHeap::work1Heap.heap, (char *)name, 0x20, 0);
+ allocator->createFrmHeapToCurrent(size, dHeap::work1Heap.heap, name, 0x20, mHeap::OPT_NONE);
new u8[size]();
allocator->adjustFrmHeapRestoreCurrent();
}
diff --git a/src/d/d_rawarchive.cpp b/src/d/d_rawarchive.cpp
index 45b20758..d3854d37 100644
--- a/src/d/d_rawarchive.cpp
+++ b/src/d/d_rawarchive.cpp
@@ -1,4 +1,5 @@
#include "d/d_rawarchive.h"
+#include "m/m_heap.h"
#include "rvl/VI.h" // IWYU pragma: export
@@ -186,7 +187,7 @@ int dRawArcEntry_c::ensureLoadedMaybe(void *callbackArg) {
if (mpArc == nullptr) {
return -1;
}
- mpFrmHeap = mHeap::makeHeapOnCurrentGameHeap(-1, name(), 0x20, 0);
+ mpFrmHeap = mHeap::makeHeapOnCurrentGameHeap(-1, name(), 0x20, mHeap::OPT_NONE);
if (mpFrmHeap == nullptr) {
return -1;
}
diff --git a/src/d/d_room.cpp b/src/d/d_room.cpp
index e6b9720f..801762fb 100644
--- a/src/d/d_room.cpp
+++ b/src/d/d_room.cpp
@@ -22,6 +22,7 @@
#include "m/m3d/m_anmvis.h"
#include "m/m3d/m_fanm.h"
#include "m/m3d/m_smdl.h"
+#include "m/m_heap.h"
#include "m/m_mtx.h"
#include "m/m_vec.h"
#include "nw4r/g3d/g3d_scnmdl.h"
@@ -56,8 +57,8 @@ int dRoom_c::create() {
!(dScGame_c::isCurrentStage("D300") && (roomid == 0 || roomid == 1 || roomid == 4)) &&
// LMF crawlspace, spike maze
!(dScGame_c::isCurrentStage("D300_1") && (roomid == 7 || roomid == 9));
- if (!mAllocator.createNewTempFrmHeap(
- -1, CurrentStageArcManager::GetInstance()->getHeap(roomid), "dRoom_c::m_allocator", 0x20, 0
+ if (!mAllocator.createFrmHeapToCurrent(
+ -1, CurrentStageArcManager::GetInstance()->getHeap(roomid), "dRoom_c::m_allocator", 0x20, mHeap::OPT_NONE
)) {
return FAILED;
}
diff --git a/src/f/f_base.cpp b/src/f/f_base.cpp
index 3fddeae8..d1b7e34a 100644
--- a/src/f/f_base.cpp
+++ b/src/f/f_base.cpp
@@ -23,8 +23,11 @@ void (*fBase_c::sUnloadCallback)();
/* 802e12f0 */
fBase_c::fBase_c()
- : unique_ID(m_rootUniqueID), params(m_tmpCtData.params), profile_name(m_tmpCtData.prof_name),
- group_type(m_tmpCtData.group_type), manager(this) {
+ : unique_ID(m_rootUniqueID),
+ params(m_tmpCtData.params),
+ profile_name(m_tmpCtData.prof_name),
+ group_type(m_tmpCtData.group_type),
+ manager(this) {
m_rootUniqueID = (fBaseID_e)(m_rootUniqueID + 1);
if (m_rootUniqueID == INVALID) {
for (;;) {
@@ -59,10 +62,10 @@ fBase_c::~fBase_c() {
// that causes a weak destructor to spawn that actually needs to be in f_manager.
// And it's not like any of fLiMgBa_c's methods are accessed via actor_list,
// so who can tell? Maybe there's yet another type?
- fLiNdBa_c *node = static_cast<fLiNdBa_c*>(actor_list.getFirst());
+ fLiNdBa_c *node = static_cast<fLiNdBa_c *>(actor_list.getFirst());
while (node != nullptr) {
node->unlink();
- node = static_cast<fLiNdBa_c*>(actor_list.getFirst());
+ node = static_cast<fLiNdBa_c *>(actor_list.getFirst());
}
}
@@ -443,8 +446,9 @@ bool fBase_c::entryFrmHeap(size_t size, EGG::Heap *parentHeap) {
EGG::FrmHeap *new_heap = nullptr;
if (size != 0) {
- new_heap =
- mHeap::makeFrmHeapAndUpdate(size, parentHeap, "各プロセスが個別で持てるヒープ(fBase_c::mHeap)", 0x20, 0);
+ new_heap = mHeap::createFrmHeapToCurrent(
+ size, parentHeap, "各プロセスが個別で持てるヒープ(fBase_c::mHeap)", 0x20, mHeap::OPT_NONE
+ );
if (new_heap != nullptr) {
bool create_sucess = createHeap();
mHeap::restoreCurrentHeap();
@@ -461,8 +465,9 @@ bool fBase_c::entryFrmHeap(size_t size, EGG::Heap *parentHeap) {
}
}
if (new_heap == nullptr) {
- new_heap =
- mHeap::makeFrmHeapAndUpdate(-1, parentHeap, "各プロセスが個別で持てるヒープ(fBase_c::mHeap)", 0x20, 0);
+ new_heap = mHeap::createFrmHeapToCurrent(
+ -1, parentHeap, "各プロセスが個別で持てるヒープ(fBase_c::mHeap)", 0x20, mHeap::OPT_NONE
+ );
if (new_heap != nullptr) {
bool create_sucess = createHeap();
@@ -477,8 +482,8 @@ bool fBase_c::entryFrmHeap(size_t size, EGG::Heap *parentHeap) {
}
if (new_heap != nullptr) {
- EGG::FrmHeap *larger_heap = mHeap::makeFrmHeapAndUpdate(
- heap_size, parentHeap, "各プロセスが個別で持てるヒープ(fBase_c::mHeap)", 0x20, 0
+ EGG::FrmHeap *larger_heap = mHeap::createFrmHeapToCurrent(
+ heap_size, parentHeap, "各プロセスが個別で持てるヒープ(fBase_c::mHeap)", 0x20, mHeap::OPT_NONE
);
if (larger_heap != nullptr) {
if (larger_heap < new_heap) {
@@ -516,8 +521,9 @@ bool fBase_c::entryFrmHeapNonAdjust(size_t size, EGG::Heap *parentHeap) {
return true;
}
- EGG::FrmHeap *new_heap =
- mHeap::makeFrmHeapAndUpdate(size, parentHeap, "各プロセスが個別で持てるヒープ(fBase_c::mHeap)", 0x20, 0);
+ EGG::FrmHeap *new_heap = mHeap::createFrmHeapToCurrent(
+ size, parentHeap, "各プロセスが個別で持てるヒープ(fBase_c::mHeap)", 0x20, mHeap::OPT_NONE
+ );
if (new_heap != nullptr) {
bool create_sucess = createHeap();
mHeap::restoreCurrentHeap();
diff --git a/src/m/m3d/m_banm.cpp b/src/m/m3d/m_banm.cpp
index 047e5972..53a4a81b 100644
--- a/src/m/m3d/m_banm.cpp
+++ b/src/m/m3d/m_banm.cpp
@@ -29,7 +29,8 @@ bool banm_c::createAllocator(mAllocator_c *alloc, u32 *pStart) {
i1 = mHeap::frmHeapCost(i2, 0x20);
*pStart = ROUND_UP(i1, 0x20);
mpFrameHeap = mHeap::createFrmHeap(
- i2, (EGG::Heap *)alloc->mHeap, "アニメ切り替え用アロケータ(m3d::banm_c::m_heap)", internal::l_alignment, 0
+ i2, (EGG::Heap *)alloc->mHeap, "アニメ切り替え用アロケータ(m3d::banm_c::m_heap)", internal::l_alignment,
+ mHeap::OPT_NONE
);
mAllocator.attach(mpFrameHeap, 0x20);
return true;
diff --git a/src/m/m3d/m_shadow.cpp b/src/m/m3d/m_shadow.cpp
index da0246ef..668a6669 100644
--- a/src/m/m3d/m_shadow.cpp
+++ b/src/m/m3d/m_shadow.cpp
@@ -56,7 +56,7 @@ void mShadow_c::create(
// Maybe an Inline?
EGG::FrmHeap **heap = mpFrmHeaps;
for (int i = 0; i < 2; i++) {
- heap[0] = mHeap::createFrmHeap(heapSize, mpHeap, "ShadowTmp", 0x4, 0);
+ heap[0] = mHeap::createFrmHeap(heapSize, mpHeap, "ShadowTmp", 0x4, mHeap::OPT_NONE);
heap[0]->recordState(FRM_HEAP_STATE);
heap++;
}
@@ -519,7 +519,7 @@ void mShadowChild_c::updateMtx() {
mVec3_c a(mQuat.v.x, mQuat.v.y, mQuat.v.z);
a += mPositionMaybe * GetOffset();
-
+
mVec3_c b(mQuat.v.x, mQuat.v.y, mQuat.v.z);
b -= mPositionMaybe * field_0x13C;
diff --git a/src/m/m_allocator.cpp b/src/m/m_allocator.cpp
index 1c6a56f0..25334c5c 100644
--- a/src/m/m_allocator.cpp
+++ b/src/m/m_allocator.cpp
@@ -35,7 +35,7 @@ mHeapAllocator_c::~mHeapAllocator_c() {
destroyHeap();
}
-bool mHeapAllocator_c::replaceWithNewFrmHeap(s32 size, EGG::Heap *newHeap, char *heapName, s32 align, u32 attrs) {
+bool mHeapAllocator_c::createFrmHeap(u32 size, EGG::Heap *newHeap, const char *heapName, u32 align, mHeap::AllocOptBit_t attrs) {
destroyHeap();
EGG::Heap *heap = mHeap::createFrmHeap(size, newHeap, heapName, align, attrs);
if (heap == nullptr) {
@@ -45,7 +45,7 @@ bool mHeapAllocator_c::replaceWithNewFrmHeap(s32 size, EGG::Heap *newHeap, char
return true;
}
-bool mHeapAllocator_c::replaceWithNewExpHeap(s32 size, EGG::Heap *newHeap, char *heapName, s32 align, u32 attrs) {
+bool mHeapAllocator_c::createExpHeap(u32 size, EGG::Heap *newHeap, const char *heapName, u32 align, mHeap::AllocOptBit_t attrs) {
destroyHeap();
EGG::Heap *heap = mHeap::createExpHeap(size, newHeap, heapName, align, attrs);
if (heap == nullptr) {
@@ -79,8 +79,8 @@ s32 mHeapAllocator_c::adjustExpHeap() {
return mHeap::adjustExpHeap(EGG::Heap::toExpHeap(heap));
}
-bool mHeapAllocator_c::createNewTempFrmHeap(s32 size, EGG::Heap *newHeap, char *heapName, s32 align, u32 attrs) {
- if (!replaceWithNewFrmHeap(size, newHeap, heapName, align, attrs)) {
+bool mHeapAllocator_c::createFrmHeapToCurrent(u32 size, EGG::Heap *newHeap, const char *heapName, u32 align, mHeap::AllocOptBit_t attrs) {
+ if (!createFrmHeap(size, newHeap, heapName, align, attrs)) {
return false;
}
mHeap::saveCurrentHeap();
diff --git a/src/m/m_dvd.cpp b/src/m/m_dvd.cpp
index cfee7660..49c2eba8 100644
--- a/src/m/m_dvd.cpp
+++ b/src/m/m_dvd.cpp
@@ -165,8 +165,10 @@ static void *loadToMainRAM(
return result;
}
+static int ConvertPathToEntrynum(const char *path, u8 *);
+
int ConvertPathToEntrynum(const char *path) {
- return ::ConvertPathToEntrynum(path, nullptr);
+ return mDvd::ConvertPathToEntrynum(path, nullptr);
}
u32 IsExistPath(const char *path) {
@@ -374,8 +376,10 @@ mDvd_mountMemArchive_c::mDvd_mountMemArchive_c(int mountDirection) {
mAmountRead = 0;
}
+namespace mDvd {
+
/** 802ef7c0 */
-int findPathWithCompressedExtension(const char *name, u8 *outType) {
+static int ConvertPathToEntrynumASD_(const char *name, u8 *outType) {
u8 type;
char buf[256];
int num;
@@ -434,10 +438,11 @@ void setAutoStreamDecomp(bool arg) {
}
/** 802ef940 */
-bool getAutoStreamDecomp() {
+bool isAutoStreamDecomp() {
return mDvd::l_IsAutoStreamDecomp;
}
+
/** 802ef950 */
static int ConvertPathToEntrynum(const char *path, u8 *outType) {
int num = DVDConvertPathToEntrynum(path);
@@ -445,22 +450,24 @@ static int ConvertPathToEntrynum(const char *path, u8 *outType) {
if (outType != nullptr) {
*outType = 0;
}
- } else if (getAutoStreamDecomp()) {
- num = findPathWithCompressedExtension(path, outType);
+ } else if (mDvd::isAutoStreamDecomp()) {
+ num = mDvd::ConvertPathToEntrynumASD_(path, outType);
}
return num;
}
/** 802ef9d0 */
-static int ConvertPathToEntrynum_Thunk(const char *path, u8 *outType) {
+static int ConvertPathToEntrynumWithWarning(const char *path, u8 *outType) {
return ConvertPathToEntrynum(path, outType);
}
+}
+
/** 802ef9e0 */
mDvd_mountMemArchive_c *mDvd_mountMemArchive_c::create(const char *path, u8 mountDirection, EGG::Heap *heap) {
u8 type;
mDvd_mountMemArchive_c *cmd = nullptr;
- int entryNum = ConvertPathToEntrynum_Thunk(path, &type);
+ int entryNum = mDvd::ConvertPathToEntrynumWithWarning(path, &type);
if (entryNum != -1) {
cmd = new mDvd_mountMemArchive_c(mountDirection);
if (cmd != nullptr) {
@@ -596,7 +603,7 @@ mDvd_toMainRam_normal_c::mDvd_toMainRam_normal_c(int mountDirection) : mDvd_toMa
/** 802eff90 */
mDvd_toMainRam_normal_c *mDvd_toMainRam_normal_c::create(const char *path, int mountDirection, EGG::Heap *heap) {
u8 type;
- int entryNum = ConvertPathToEntrynum_Thunk(path, &type);
+ int entryNum = mDvd::ConvertPathToEntrynumWithWarning(path, &type);
mDvd_toMainRam_normal_c *cmd;
if (entryNum == -1) {
cmd = nullptr;
diff --git a/src/m/m_heap.cpp b/src/m/m_heap.cpp
index f2767ac0..eb6bc6da 100644
--- a/src/m/m_heap.cpp
+++ b/src/m/m_heap.cpp
@@ -22,7 +22,7 @@ const char *const mHeap::s_GameHeapNames[4] = {
0,
};
-u16 mHeap::copyAttribute(u32 arg) {
+u16 mHeap::GetOptFlag(AllocOptBit_t arg) {
u16 result = 0;
if ((arg & 1) != 0) {
@@ -40,7 +40,7 @@ u16 mHeap::copyAttribute(u32 arg) {
EGG::Heap *mHeap::setCurrentHeap(EGG::Heap *heap) {
return heap->becomeCurrentHeap();
}
-EGG::Heap *mHeap::createExpHeap(size_t size, EGG::Heap *parentHeap, const char *name, u32 align, u32 attrs) {
+EGG::Heap *mHeap::createExpHeap(size_t size, EGG::Heap *parentHeap, const char *name, u32 align, AllocOptBit_t attrs) {
if (parentHeap == nullptr) {
parentHeap = EGG::Heap::sCurrentHeap;
}
@@ -58,7 +58,7 @@ EGG::Heap *mHeap::createExpHeap(size_t size, EGG::Heap *parentHeap, const char *
void *mem = parentHeap->alloc(size, align);
EGG::ExpHeap *heap = nullptr;
if (mem != nullptr) {
- heap = EGG::ExpHeap::create(mem, size, copyAttribute(attrs));
+ heap = EGG::ExpHeap::create(mem, size, GetOptFlag(attrs));
if (heap == nullptr) {
parentHeap->free(mem);
} else if (name != nullptr) {
@@ -86,7 +86,7 @@ size_t mHeap::expHeapCost(size_t size, u32 align) {
return size + (~(a)&b);
}
-EGG::FrmHeap *mHeap::createFrmHeap(size_t size, EGG::Heap *parent, const char *name, size_t align, size_t attrs) {
+EGG::FrmHeap *mHeap::createFrmHeap(size_t size, EGG::Heap *parent, const char *name, size_t align, AllocOptBit_t attrs) {
if (parent == nullptr) {
parent = EGG::Heap::sCurrentHeap;
}
@@ -104,7 +104,7 @@ EGG::FrmHeap *mHeap::createFrmHeap(size_t size, EGG::Heap *parent, const char *n
void *mem = parent->alloc(size, align);
EGG::FrmHeap *heap = nullptr;
if (mem != nullptr) {
- heap = EGG::FrmHeap::create(mem, size, copyAttribute(attrs));
+ heap = EGG::FrmHeap::create(mem, size, GetOptFlag(attrs));
if (heap == nullptr) {
parent->free(mem);
} else if (name != nullptr) {
@@ -167,8 +167,8 @@ void mHeap::restoreCurrentHeap() {
s_SavedCurrentHeap = nullptr;
}
-EGG::FrmHeap *mHeap::makeFrmHeapAndUpdate(size_t size, EGG::Heap *parentHeap, const char *name, u32 align, u32 unk) {
- EGG::FrmHeap *heap = createFrmHeap(size, parentHeap, name, align, unk);
+EGG::FrmHeap *mHeap::createFrmHeapToCurrent(size_t size, EGG::Heap *parentHeap, const char *name, u32 align, AllocOptBit_t opt) {
+ EGG::FrmHeap *heap = createFrmHeap(size, parentHeap, name, align, opt);
if (heap != nullptr) {
s_SavedCurrentHeap = setCurrentHeap(heap);
}
@@ -209,6 +209,6 @@ EGG::AssertHeap *mHeap::createAssertHeap(EGG::Heap *parent) {
return g_assertHeap;
}
-EGG::FrmHeap *mHeap::makeHeapOnCurrentGameHeap(size_t size, const char *name, u32 align, u32 flags) {
- return makeFrmHeapAndUpdate(size, g_gameHeaps[0], name, align, flags);
+EGG::FrmHeap *mHeap::makeHeapOnCurrentGameHeap(size_t size, const char *name, u32 align, AllocOptBit_t flags) {
+ return createFrmHeapToCurrent(size, g_gameHeaps[0], name, align, flags);
}
diff --git a/src/toBeSorted/attention.cpp b/src/toBeSorted/attention.cpp
index 21dd1b4a..86257c93 100644
--- a/src/toBeSorted/attention.cpp
+++ b/src/toBeSorted/attention.cpp
@@ -5,6 +5,7 @@
#include "d/d_heap.h"
#include "d/d_pad.h"
#include "m/m_angle.h"
+#include "m/m_heap.h"
#include "nw4r/g3d/res/g3d_resfile.h"
#include "toBeSorted/arc_managers/oarc_manager.h"
#include "toBeSorted/event_manager.h"
@@ -81,7 +82,7 @@ bool AttentionManager::create() {
field_0xBD5 = 0;
field_0xBD4 = 0;
- if (!mAllocator.createNewTempFrmHeap(-1, dHeap::work1Heap.heap, "Attention", 0x20, 0)) {
+ if (!mAllocator.createFrmHeapToCurrent(-1, dHeap::work1Heap.heap, "Attention", 0x20, mHeap::OPT_NONE)) {
return 0;
}
mModels.mMdls[0].field_0x79 = 0;
diff --git a/src/toBeSorted/d_emitter.cpp b/src/toBeSorted/d_emitter.cpp
index a8b0379f..5fab3069 100644
--- a/src/toBeSorted/d_emitter.cpp
+++ b/src/toBeSorted/d_emitter.cpp
@@ -2,6 +2,7 @@
// vtable order
#include "JSystem/JParticle/JPAEmitter.h"
#include "JSystem/JParticle/JPAParticle.h"
+#include "m/m_heap.h"
#include "rvl/GX/GXTypes.h"
#include "toBeSorted/d_d3d.h"
// clang-format on
@@ -910,7 +911,7 @@ bool dJEffManager_c::createEffManagers() {
}
}
- ms_allocator->createNewTempFrmHeap(-1, dHeap::work1Heap.heap, "dJEffManager_c::ms_allocator", 0x20, 0);
+ ms_allocator->createFrmHeapToCurrent(-1, dHeap::work1Heap.heap, "dJEffManager_c::ms_allocator", 0x20, mHeap::OPT_NONE);
for (s32 idx = 0; idx < 2; idx++) {
sFogProcs[idx].create(idx, sInts[idx], -1, ms_allocator);
}
diff --git a/src/toBeSorted/d_particle.cpp b/src/toBeSorted/d_particle.cpp
index e05695af..fe35b08e 100644
--- a/src/toBeSorted/d_particle.cpp
+++ b/src/toBeSorted/d_particle.cpp
@@ -26,7 +26,7 @@ static u16 extractResUserIdx(u16 particleResId) {
namespace dParticle {
JPAResourceManager *res_c::init(const void *jpc, const void *jpn, EGG::Heap *heap) {
- mpHeap = mHeap::createFrmHeap(-1, heap, "dParticle::res_c", 0x20, 0);
+ mpHeap = mHeap::createFrmHeap(-1, heap, "dParticle::res_c", 0x20, mHeap::OPT_NONE);
if (mpHeap == nullptr) {
return nullptr;
}
diff --git a/src/toBeSorted/time_area_mgr.cpp b/src/toBeSorted/time_area_mgr.cpp
index 5e7de081..3a613b34 100644
--- a/src/toBeSorted/time_area_mgr.cpp
+++ b/src/toBeSorted/time_area_mgr.cpp
@@ -2,6 +2,7 @@
#include "d/d_heap.h"
#include "d/d_sc_game.h"
+#include "m/m_heap.h"
#include "nw4r/g3d/g3d_obj.h"
dTimeAreaMgr_c::dTimeAreaMgr_c() {
@@ -13,7 +14,7 @@ dTimeAreaMgr_c::~dTimeAreaMgr_c() {
}
bool dTimeAreaMgr_c::init() {
- mAllocator.replaceWithNewFrmHeap(-1, dHeap::work1Heap.heap, "dTimeAreaMgr_c::m_allocator", 0x20, 0);
+ mAllocator.createFrmHeap(-1, dHeap::work1Heap.heap, "dTimeAreaMgr_c::m_allocator", 0x20, mHeap::OPT_NONE);
mProcA.create(&mAllocator);
mProcB.create(&mAllocator);
mAllocator.adjustFrmHeap();