mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-13 11:38:49 -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:
@@ -22,23 +22,23 @@ dFile_info_c::dFile_info_c(JKRArchive* i_archive, u8 param_1) {
|
||||
}
|
||||
|
||||
dFile_info_c::~dFile_info_c() {
|
||||
delete mFileInfo.Scr;
|
||||
delete mDatBase;
|
||||
delete mNoDatBase;
|
||||
JKR_DELETE(mFileInfo.Scr);
|
||||
JKR_DELETE(mDatBase);
|
||||
JKR_DELETE(mNoDatBase);
|
||||
|
||||
mDoExt_removeMesgFont();
|
||||
}
|
||||
|
||||
void dFile_info_c::screenSet() {
|
||||
mFileInfo.Scr = new J2DScreen();
|
||||
mFileInfo.Scr = JKR_NEW J2DScreen();
|
||||
JUT_ASSERT(0, mFileInfo.Scr != NULL);
|
||||
|
||||
mFileInfo.Scr->setPriority("zelda_file_select_info_text.blo", 0x1100000, mArchive);
|
||||
mFileInfo.mFont = mDoExt_getMesgFont();
|
||||
mFileInfo.Scr->search(MULTI_CHAR('w_cp_ef1'))->hide();
|
||||
mFileInfo.field_0x10 = mFileInfo.Scr->search(MULTI_CHAR('w_dat_i1'));
|
||||
mDatBase = new CPaneMgrAlpha(mFileInfo.Scr, MULTI_CHAR('w_dat_i1'), 2, NULL);
|
||||
mNoDatBase = new CPaneMgrAlpha(mFileInfo.Scr, MULTI_CHAR('w_nda_i1'), 2, NULL);
|
||||
mDatBase = JKR_NEW CPaneMgrAlpha(mFileInfo.Scr, MULTI_CHAR('w_dat_i1'), 2, NULL);
|
||||
mNoDatBase = JKR_NEW CPaneMgrAlpha(mFileInfo.Scr, MULTI_CHAR('w_nda_i1'), 2, NULL);
|
||||
|
||||
J2DTextBox* info_text[4];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user