mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-01 02:11:44 -04:00
Isolate JKRHeap operator overloads
Fixes #25 This isolates the JKRHeap operator new/delete overloads. Every single new/delete site in the code has been replaced with a macro. Sadly for new[] and delete[] we have to keep global operators. The global new[] just allocates into malloc() however, and delete[] goes into free() if it's not in a JKRHeap. So that's fine.
This commit is contained in:
@@ -377,7 +377,7 @@ int daObj_GrA_c::CreateHeap() {
|
||||
aMdlData_p = (J3DModelData*)dComIfG_getObjectRes(l_resNames[l_bmdGetParamList[1]], l_bmdGetParamList[0]);
|
||||
JUT_ASSERT(854, NULL != aMdlData_p);
|
||||
u32 reg_r25 = 0x11020284;
|
||||
mpModelMorf = new mDoExt_McaMorfSO(aMdlData_p, NULL, NULL, NULL, -1, 1.0f, 0, -1, &mSound, 0x80000, reg_r25);
|
||||
mpModelMorf = JKR_NEW mDoExt_McaMorfSO(aMdlData_p, NULL, NULL, NULL, -1, 1.0f, 0, -1, &mSound, 0x80000, reg_r25);
|
||||
if (mpModelMorf != NULL && mpModelMorf->getModel() == NULL) {
|
||||
mpModelMorf->stopZelAnime();
|
||||
mpModelMorf = NULL;
|
||||
|
||||
Reference in New Issue
Block a user