Revert "Isolate JKRHeap operator overloads" (#39)

This commit is contained in:
TakaRikka
2026-03-06 19:49:35 -08:00
committed by GitHub
parent b7c482fb87
commit 78d4169929
630 changed files with 3349 additions and 3452 deletions
+2 -2
View File
@@ -146,8 +146,8 @@ struct daFmtMng_c : public fopAc_ac_c {
for (int i = 0; i < mFormationLine * mFormationRow; i++, member++) {
fopAcM_delete(member->mNpcId);
}
JKR_DELETE_ARRAY(mPos);
JKR_DELETE_ARRAY(mMember);
delete [] mPos;
delete [] mMember;
}
int getTimeHour() {
+1 -1
View File
@@ -815,7 +815,7 @@ STATIC_ASSERT(sizeof(daNpcT_c) == 0xE40);
#define daNpcT_ct(ptr, ClassName, faceMotionAnmData, motionAnmData, faceMotionSequenceData, faceMotionStepNum, motionSequenceData, motionStepNum, evtData, arcNames) \
if (!fopAcM_CheckCondition(ptr, fopAcCnd_INIT_e)) { \
JKR_NEW_ARGS (ptr) ClassName(faceMotionAnmData, motionAnmData, faceMotionSequenceData, faceMotionStepNum, motionSequenceData, motionStepNum, evtData, arcNames); \
new (ptr) ClassName(faceMotionAnmData, motionAnmData, faceMotionSequenceData, faceMotionStepNum, motionSequenceData, motionStepNum, evtData, arcNames); \
fopAcM_OnCondition(ptr, fopAcCnd_INIT_e); \
}
+1 -1
View File
@@ -51,7 +51,7 @@ public:
}
~_Fairy_Feather_c() {
if (mpMorf != NULL) {
JKR_DELETE(mpMorf);
delete mpMorf;
mpMorf = NULL;
}
}
+1 -1
View File
@@ -22,7 +22,7 @@ public:
int getLuggageParamHigh(u32);
int create();
void create_init();
~daPasserMng_c() { JKR_DELETE_ARRAY(childProcIds); }
~daPasserMng_c() { delete [] childProcIds; }
u8 getDetailLevel() { return argument; }
u8 getPathID() { return fopAcM_GetParam(this); }
+1 -1
View File
@@ -59,7 +59,7 @@ class dCsr_mng_c {
};
bloObj_c() {
m_panes = JKR_NEW paneObj_c[1];
m_panes = new paneObj_c[1];
m_screen = 0;
}
+7 -7
View File
@@ -15,8 +15,8 @@ class dDlst_FileSel_c : public dDlst_base_c {
public:
void draw();
virtual ~dDlst_FileSel_c() {
JKR_DELETE(Scr);
JKR_DELETE(mMessageString);
delete Scr;
delete mMessageString;
}
dDlst_FileSel_c() {
@@ -26,7 +26,7 @@ public:
font[1] = mDoExt_getSubFont();
JUT_ASSERT(107, font[1] != NULL);
mMessageString = JKR_NEW dMsgString_c();
mMessageString = new dMsgString_c();
JUT_ASSERT(110, mMessageString != NULL);
}
@@ -78,7 +78,7 @@ public:
class dDlst_FileSelYn_c : public dDlst_base_c {
public:
void draw();
virtual ~dDlst_FileSelYn_c() { JKR_DELETE(ScrYn); }
virtual ~dDlst_FileSelYn_c() { delete ScrYn; }
/* 0x04 */ J2DScreen* ScrYn;
/* 0x08 */ u8 field_0x08[4];
@@ -87,7 +87,7 @@ public:
class dDlst_FileSelDt_c : public dDlst_base_c {
public:
void draw();
virtual ~dDlst_FileSelDt_c() { JKR_DELETE(ScrDt); }
virtual ~dDlst_FileSelDt_c() { delete ScrDt; }
/* 0x04 */ J2DScreen* ScrDt;
/* 0x08 */ J2DPane* mpPane;
@@ -97,7 +97,7 @@ public:
class dDlst_FileSelCp_c : public dDlst_base_c {
public:
void draw();
virtual ~dDlst_FileSelCp_c() { JKR_DELETE(Scr); }
virtual ~dDlst_FileSelCp_c() { delete Scr; }
/* 0x04 */ J2DScreen* Scr;
/* 0x08 */ bool isShow;
@@ -108,7 +108,7 @@ public:
class dDlst_FileSel3m_c : public dDlst_base_c {
public:
void draw();
virtual ~dDlst_FileSel3m_c() { JKR_DELETE(Scr3m); }
virtual ~dDlst_FileSel3m_c() { delete Scr3m; }
/* 0x04 */ J2DScreen* Scr3m;
};
+3 -3
View File
@@ -14,7 +14,7 @@ public:
~fmpTresTypeGroupData_c() {
if (mpNext != NULL) {
JKR_DELETE(mpNext);
delete mpNext;
}
}
@@ -34,7 +34,7 @@ public:
void addTypeGroupData(u8, dTres_c::data_s const*);
~fmpTresTypeGroupDataList_c() {
if (mpTypeGroupDataHead != NULL) {
JKR_DELETE(mpTypeGroupDataHead);
delete mpTypeGroupDataHead;
}
}
fmpTresTypeGroupDataList_c() {
@@ -106,7 +106,7 @@ public:
~dMenu_Fmap_room_data_c() {
if (mp_fmpTresTypeGroupDataListAll != NULL) {
JKR_DELETE(mp_fmpTresTypeGroupDataListAll);
delete mp_fmpTresTypeGroupDataListAll;
}
}
+1 -3
View File
@@ -8,8 +8,6 @@
#include "CaptureScreen.h"
#include <cstring>
#include "JSystem/JKernel/JKRHeap.h"
void fapGm_After();
void fapGm_Create();
void fapGm_Execute();
@@ -30,7 +28,7 @@ public:
static void executeCaptureScreen() {}
static void createCaptureScreen() {
mCaptureScreen = JKR_NEW CaptureScreen(JFWDisplay::getManager());
mCaptureScreen = new CaptureScreen(JFWDisplay::getManager());
JUT_ASSERT(46, mCaptureScreen != NULL);
}
+1 -1
View File
@@ -23,7 +23,7 @@
#define fopAcM_ct_placement(ptr, ClassName) \
fopAc_ac_c copy; \
memcpy(&copy.type, &(ptr)->type, fopAcM_ct_placement_copy_length); \
JKR_NEW_ARGS (ptr) ClassName() ; \
new (ptr) ClassName() ; \
memcpy(&(ptr)->type, &copy.type, fopAcM_ct_placement_copy_length);
#else
#define fopAcM_ct_placement(ptr, ClassName) new (ptr) ClassName()
+1 -2
View File
@@ -4,7 +4,6 @@
#include "JSystem/JKernel/JKRArchive.h"
#include <os.h>
#include <os.h>
#include "JSystem/JKernel/JKRHeap.h"
#include "f_pc/f_pc_node.h"
#define mDoDvd_MOUNT_DIRECTION_HEAD 0
@@ -24,7 +23,7 @@ public:
virtual ~mDoDvdThd_command_c();
mDoDvdThd_command_c();
inline s32 sync() { return mIsDone; }
inline void destroy() { JKR_DELETE(this); }
inline void destroy() { delete this; }
virtual s32 execute() = 0;
}; // Size = 0x14