mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-08 19:49:32 -04:00
Revert "Isolate JKRHeap operator overloads" (#39)
This commit is contained in:
@@ -7,8 +7,6 @@
|
||||
#include "JSystem/JUtility/JUTTexture.h"
|
||||
#include <gx.h>
|
||||
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
|
||||
void J2DColorBlock::initialize() {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
mMatColor[i] = JUtility::TColor(j2dDefaultColInfo);
|
||||
@@ -58,7 +56,7 @@ void J2DTexGenBlock::setGX() {
|
||||
|
||||
J2DTexGenBlock::~J2DTexGenBlock() {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
JKR_DELETE(mTexMtx[i]);
|
||||
delete mTexMtx[i];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +64,7 @@ void J2DTexGenBlock::setTexMtx(u32 param_0, J2DTexMtx& param_1) {
|
||||
J3D_PANIC(103, param_0 < 8, "Error : range over.");
|
||||
|
||||
if (!mTexMtx[param_0]) {
|
||||
mTexMtx[param_0] = JKR_NEW J2DTexMtx(param_1.getTexMtxInfo());
|
||||
mTexMtx[param_0] = new J2DTexMtx(param_1.getTexMtxInfo());
|
||||
if (!mTexMtx[param_0]) {
|
||||
return;
|
||||
}
|
||||
@@ -103,13 +101,13 @@ J2DTevBlock1::J2DTevBlock1() {
|
||||
|
||||
J2DTevBlock1::~J2DTevBlock1() {
|
||||
if (mUndeleteFlag & 1) {
|
||||
JKR_DELETE(mTexture[0]);
|
||||
delete mTexture[0];
|
||||
}
|
||||
|
||||
JKR_DELETE(mPalette[0]);
|
||||
delete mPalette[0];
|
||||
|
||||
if (mUndeleteFlag & 0x80) {
|
||||
JKR_DELETE(mFont);
|
||||
delete mFont;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,7 +139,7 @@ bool J2DTevBlock1::prepareTexture(u8 param_0) {
|
||||
}
|
||||
|
||||
if (mTexture[0] == NULL) {
|
||||
mTexture[0] = JKR_NEW JUTTexture();
|
||||
mTexture[0] = new JUTTexture();
|
||||
|
||||
if (mTexture[0] == NULL) {
|
||||
return false;
|
||||
@@ -168,7 +166,7 @@ bool J2DTevBlock1::insertTexture(u32 param_0, ResTIMG const* p_timg, JUTPalette*
|
||||
}
|
||||
|
||||
if (mTexture[0] == NULL) {
|
||||
mTexture[0] = JKR_NEW JUTTexture(p_timg, 0);
|
||||
mTexture[0] = new JUTTexture(p_timg, 0);
|
||||
|
||||
if (mTexture[0] == NULL) {
|
||||
return false;
|
||||
@@ -199,7 +197,7 @@ bool J2DTevBlock1::insertTexture(u32 param_0, JUTTexture* p_tex) {
|
||||
}
|
||||
|
||||
if (mUndeleteFlag & 1) {
|
||||
JKR_DELETE(mTexture[0]);
|
||||
delete mTexture[0];
|
||||
}
|
||||
|
||||
mTexture[0] = p_tex;
|
||||
@@ -216,7 +214,7 @@ bool J2DTevBlock1::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
|
||||
if (mTexture[0] == NULL) {
|
||||
if (p_timg != NULL) {
|
||||
mTexture[0] = JKR_NEW JUTTexture(p_timg, 0);
|
||||
mTexture[0] = new JUTTexture(p_timg, 0);
|
||||
|
||||
if (mTexture[0] == NULL) {
|
||||
return false;
|
||||
@@ -230,7 +228,7 @@ bool J2DTevBlock1::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
if (p_timg != NULL) {
|
||||
mTexture[0]->storeTIMG(p_timg, (u8)0);
|
||||
} else {
|
||||
JKR_DELETE(mTexture[0]);
|
||||
delete mTexture[0];
|
||||
mTexture[0] = NULL;
|
||||
mUndeleteFlag &= 0x80;
|
||||
}
|
||||
@@ -238,7 +236,7 @@ bool J2DTevBlock1::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
mTexture[0] = NULL;
|
||||
|
||||
if (p_timg != NULL) {
|
||||
mTexture[0] = JKR_NEW JUTTexture(p_timg, 0);
|
||||
mTexture[0] = new JUTTexture(p_timg, 0);
|
||||
|
||||
if (mTexture[0] == NULL) {
|
||||
return false;
|
||||
@@ -248,7 +246,7 @@ bool J2DTevBlock1::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
}
|
||||
}
|
||||
|
||||
JKR_DELETE(mPalette[0]);
|
||||
delete mPalette[0];
|
||||
mPalette[0] = NULL;
|
||||
mTexNo[0] = -1;
|
||||
return true;
|
||||
@@ -260,12 +258,12 @@ bool J2DTevBlock1::setTexture(u32 param_0, JUTTexture* p_tex) {
|
||||
}
|
||||
|
||||
if (mUndeleteFlag & 1) {
|
||||
JKR_DELETE(mTexture[0]);
|
||||
delete mTexture[0];
|
||||
}
|
||||
|
||||
mTexture[0] = p_tex;
|
||||
mUndeleteFlag &= 0x80;
|
||||
JKR_DELETE(mPalette[0]);
|
||||
delete mPalette[0];
|
||||
mPalette[0] = NULL;
|
||||
mTexNo[0] = -1;
|
||||
return true;
|
||||
@@ -277,12 +275,12 @@ bool J2DTevBlock1::removeTexture(u32 param_0) {
|
||||
}
|
||||
|
||||
if (mUndeleteFlag & 1) {
|
||||
JKR_DELETE(mTexture[0]);
|
||||
delete mTexture[0];
|
||||
}
|
||||
|
||||
mTexture[0] = NULL;
|
||||
mUndeleteFlag &= 0x80;
|
||||
JKR_DELETE(mPalette[0]);
|
||||
delete mPalette[0];
|
||||
mTexNo[0] = -1;
|
||||
return true;
|
||||
}
|
||||
@@ -292,13 +290,13 @@ bool J2DTevBlock1::setFont(ResFONT* p_font) {
|
||||
return false;
|
||||
}
|
||||
|
||||
JUTResFont* resFont = JKR_NEW JUTResFont(p_font, NULL);
|
||||
JUTResFont* resFont = new JUTResFont(p_font, NULL);
|
||||
if (resFont == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mUndeleteFlag & 0x80) {
|
||||
JKR_DELETE(mFont);
|
||||
delete mFont;
|
||||
}
|
||||
|
||||
mFont = resFont;
|
||||
@@ -312,7 +310,7 @@ bool J2DTevBlock1::setFont(JUTFont* p_font) {
|
||||
}
|
||||
|
||||
if (mUndeleteFlag & 0x80) {
|
||||
JKR_DELETE(mFont);
|
||||
delete mFont;
|
||||
}
|
||||
|
||||
mFont = (JUTResFont*)p_font;
|
||||
@@ -327,7 +325,7 @@ bool J2DTevBlock1::setPalette(u32 param_0, ResTLUT const* p_tlut) {
|
||||
|
||||
if (p_tlut != NULL) {
|
||||
if (mPalette[0] == NULL) {
|
||||
mPalette[0] = JKR_NEW JUTPalette(GX_TLUT0, (ResTLUT*)p_tlut);
|
||||
mPalette[0] = new JUTPalette(GX_TLUT0, (ResTLUT*)p_tlut);
|
||||
|
||||
if (mPalette[0] == NULL) {
|
||||
return false;
|
||||
@@ -340,7 +338,7 @@ bool J2DTevBlock1::setPalette(u32 param_0, ResTLUT const* p_tlut) {
|
||||
mTexture[0]->attachPalette(mPalette[0]);
|
||||
}
|
||||
} else {
|
||||
JKR_DELETE(mPalette[0]);
|
||||
delete mPalette[0];
|
||||
mPalette[0] = NULL;
|
||||
}
|
||||
|
||||
@@ -405,18 +403,18 @@ J2DTevBlock2::J2DTevBlock2() {
|
||||
|
||||
J2DTevBlock2::~J2DTevBlock2() {
|
||||
if (mUndeleteFlag & 1) {
|
||||
JKR_DELETE(mTexture[0]);
|
||||
delete mTexture[0];
|
||||
}
|
||||
|
||||
if (mUndeleteFlag & 2) {
|
||||
JKR_DELETE(mTexture[1]);
|
||||
delete mTexture[1];
|
||||
}
|
||||
|
||||
JKR_DELETE(mPalette[0]);
|
||||
JKR_DELETE(mPalette[1]);
|
||||
delete mPalette[0];
|
||||
delete mPalette[1];
|
||||
|
||||
if (mUndeleteFlag & 0x80) {
|
||||
JKR_DELETE(mFont);
|
||||
delete mFont;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -456,7 +454,7 @@ bool J2DTevBlock2::prepareTexture(u8 param_0) {
|
||||
}
|
||||
|
||||
if (mTexture[i] == NULL) {
|
||||
mTexture[i] = JKR_NEW JUTTexture();
|
||||
mTexture[i] = new JUTTexture();
|
||||
|
||||
if (mTexture[i] == NULL) {
|
||||
return false;
|
||||
@@ -501,7 +499,7 @@ bool J2DTevBlock2::insertTexture(u32 param_0, ResTIMG const* p_timg, JUTPalette*
|
||||
|
||||
JUTTexture* tex;
|
||||
if (mTexture[texNo] == NULL) {
|
||||
tex = JKR_NEW JUTTexture(p_timg, tlutid);
|
||||
tex = new JUTTexture(p_timg, tlutid);
|
||||
|
||||
if (tex == NULL) {
|
||||
return false;
|
||||
@@ -577,7 +575,7 @@ bool J2DTevBlock2::insertTexture(u32 param_0, JUTTexture* p_tex) {
|
||||
|
||||
if (mTexture[1] != NULL && mTexture[1]->getTexInfo() == NULL) {
|
||||
if (mUndeleteFlag & 2) {
|
||||
JKR_DELETE(mTexture[1]);
|
||||
delete mTexture[1];
|
||||
}
|
||||
|
||||
mUndeleteFlag &= ~2;
|
||||
@@ -619,7 +617,7 @@ bool J2DTevBlock2::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
|
||||
if (mTexture[param_0] == NULL) {
|
||||
if (p_timg != NULL) {
|
||||
mTexture[param_0] = JKR_NEW JUTTexture(p_timg, tlutid);
|
||||
mTexture[param_0] = new JUTTexture(p_timg, tlutid);
|
||||
|
||||
if (mTexture[param_0] == NULL) {
|
||||
return false;
|
||||
@@ -633,7 +631,7 @@ bool J2DTevBlock2::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
if (p_timg != NULL) {
|
||||
mTexture[param_0]->storeTIMG(p_timg, tlutid);
|
||||
} else {
|
||||
JKR_DELETE(mTexture[param_0]);
|
||||
delete mTexture[param_0];
|
||||
mTexture[param_0] = NULL;
|
||||
mUndeleteFlag &= ~(1 << param_0);
|
||||
}
|
||||
@@ -641,7 +639,7 @@ bool J2DTevBlock2::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
mTexture[param_0] = NULL;
|
||||
|
||||
if (p_timg != NULL) {
|
||||
mTexture[param_0] = JKR_NEW JUTTexture(p_timg, 0);
|
||||
mTexture[param_0] = new JUTTexture(p_timg, 0);
|
||||
|
||||
if (mTexture[param_0] == NULL) {
|
||||
return false;
|
||||
@@ -651,7 +649,7 @@ bool J2DTevBlock2::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
}
|
||||
}
|
||||
|
||||
JKR_DELETE(mPalette[param_0]);
|
||||
delete mPalette[param_0];
|
||||
mPalette[param_0] = NULL;
|
||||
mTexNo[param_0] = -1;
|
||||
return true;
|
||||
@@ -663,12 +661,12 @@ bool J2DTevBlock2::setTexture(u32 param_0, JUTTexture* p_tex) {
|
||||
}
|
||||
|
||||
if (mUndeleteFlag & (1 << param_0)) {
|
||||
JKR_DELETE(mTexture[param_0]);
|
||||
delete mTexture[param_0];
|
||||
}
|
||||
|
||||
mTexture[param_0] = p_tex;
|
||||
mUndeleteFlag &= ~(1 << param_0);
|
||||
JKR_DELETE(mPalette[param_0]);
|
||||
delete mPalette[param_0];
|
||||
mPalette[param_0] = NULL;
|
||||
mTexNo[param_0] = -1;
|
||||
return true;
|
||||
@@ -680,9 +678,9 @@ bool J2DTevBlock2::removeTexture(u32 param_0) {
|
||||
}
|
||||
|
||||
if (mUndeleteFlag & (1 << param_0)) {
|
||||
JKR_DELETE(mTexture[param_0]);
|
||||
delete mTexture[param_0];
|
||||
}
|
||||
JKR_DELETE(mPalette[param_0]);
|
||||
delete mPalette[param_0];
|
||||
|
||||
if (param_0 == 0) {
|
||||
mTexture[0] = mTexture[1];
|
||||
@@ -702,13 +700,13 @@ bool J2DTevBlock2::setFont(ResFONT* p_font) {
|
||||
return false;
|
||||
}
|
||||
|
||||
JUTResFont* resFont = JKR_NEW JUTResFont(p_font, NULL);
|
||||
JUTResFont* resFont = new JUTResFont(p_font, NULL);
|
||||
if (resFont == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mUndeleteFlag & 0x80) {
|
||||
JKR_DELETE(mFont);
|
||||
delete mFont;
|
||||
}
|
||||
|
||||
mFont = resFont;
|
||||
@@ -722,7 +720,7 @@ bool J2DTevBlock2::setFont(JUTFont* p_font) {
|
||||
}
|
||||
|
||||
if (mUndeleteFlag & 0x80) {
|
||||
JKR_DELETE(mFont);
|
||||
delete mFont;
|
||||
}
|
||||
|
||||
mFont = (JUTResFont*)p_font;
|
||||
@@ -737,7 +735,7 @@ bool J2DTevBlock2::setPalette(u32 param_0, ResTLUT const* p_tlut) {
|
||||
|
||||
if (p_tlut != NULL) {
|
||||
if (mPalette[param_0] == NULL) {
|
||||
mPalette[param_0] = JKR_NEW JUTPalette((GXTlut)param_0, (ResTLUT*)p_tlut);
|
||||
mPalette[param_0] = new JUTPalette((GXTlut)param_0, (ResTLUT*)p_tlut);
|
||||
|
||||
if (mPalette[param_0] == NULL) {
|
||||
return false;
|
||||
@@ -750,7 +748,7 @@ bool J2DTevBlock2::setPalette(u32 param_0, ResTLUT const* p_tlut) {
|
||||
mTexture[param_0]->attachPalette(mPalette[param_0]);
|
||||
}
|
||||
} else {
|
||||
JKR_DELETE(mPalette[param_0]);
|
||||
delete mPalette[param_0];
|
||||
mPalette[param_0] = NULL;
|
||||
}
|
||||
|
||||
@@ -843,13 +841,13 @@ J2DTevBlock4::J2DTevBlock4() {
|
||||
J2DTevBlock4::~J2DTevBlock4() {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (mUndeleteFlag & (1 << i)) {
|
||||
JKR_DELETE(mTexture[i]);
|
||||
delete mTexture[i];
|
||||
}
|
||||
JKR_DELETE(mPalette[i]);
|
||||
delete mPalette[i];
|
||||
}
|
||||
|
||||
if (mUndeleteFlag & 0x80) {
|
||||
JKR_DELETE(mFont);
|
||||
delete mFont;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -894,7 +892,7 @@ bool J2DTevBlock4::prepareTexture(u8 param_0) {
|
||||
}
|
||||
|
||||
if (mTexture[i] == NULL) {
|
||||
mTexture[i] = JKR_NEW JUTTexture();
|
||||
mTexture[i] = new JUTTexture();
|
||||
|
||||
if (mTexture[i] == NULL) {
|
||||
return false;
|
||||
@@ -951,7 +949,7 @@ bool J2DTevBlock4::insertTexture(u32 param_0, ResTIMG const* p_timg, JUTPalette*
|
||||
}
|
||||
JUTTexture* texture;
|
||||
if (!mTexture[idx]) {
|
||||
texture = JKR_NEW JUTTexture(p_timg, local_43);
|
||||
texture = new JUTTexture(p_timg, local_43);
|
||||
if (!texture) {
|
||||
return false;
|
||||
}
|
||||
@@ -1019,7 +1017,7 @@ bool J2DTevBlock4::insertTexture(u32 param_0, JUTTexture* p_tex) {
|
||||
|
||||
if (mTexture[3] != NULL && mTexture[3]->getTexInfo() == NULL) {
|
||||
if (mUndeleteFlag & 8) {
|
||||
JKR_DELETE(mTexture[3]);
|
||||
delete mTexture[3];
|
||||
}
|
||||
|
||||
mUndeleteFlag &= ~8;
|
||||
@@ -1071,7 +1069,7 @@ bool J2DTevBlock4::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
|
||||
if (mTexture[param_0] == NULL) {
|
||||
if (p_timg != NULL) {
|
||||
mTexture[param_0] = JKR_NEW JUTTexture(p_timg, tlutid);
|
||||
mTexture[param_0] = new JUTTexture(p_timg, tlutid);
|
||||
|
||||
if (mTexture[param_0] == NULL) {
|
||||
return false;
|
||||
@@ -1085,7 +1083,7 @@ bool J2DTevBlock4::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
if (p_timg != NULL) {
|
||||
mTexture[param_0]->storeTIMG(p_timg, tlutid);
|
||||
} else {
|
||||
JKR_DELETE(mTexture[param_0]);
|
||||
delete mTexture[param_0];
|
||||
mTexture[param_0] = NULL;
|
||||
mUndeleteFlag &= ~(1 << param_0);
|
||||
}
|
||||
@@ -1093,7 +1091,7 @@ bool J2DTevBlock4::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
mTexture[param_0] = NULL;
|
||||
|
||||
if (p_timg != NULL) {
|
||||
mTexture[param_0] = JKR_NEW JUTTexture(p_timg, 0);
|
||||
mTexture[param_0] = new JUTTexture(p_timg, 0);
|
||||
|
||||
if (mTexture[param_0] == NULL) {
|
||||
return false;
|
||||
@@ -1103,7 +1101,7 @@ bool J2DTevBlock4::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
}
|
||||
}
|
||||
|
||||
JKR_DELETE(mPalette[param_0]);
|
||||
delete mPalette[param_0];
|
||||
mPalette[param_0] = NULL;
|
||||
mTexNo[param_0] = -1;
|
||||
return true;
|
||||
@@ -1115,12 +1113,12 @@ bool J2DTevBlock4::setTexture(u32 param_0, JUTTexture* p_tex) {
|
||||
}
|
||||
|
||||
if (mUndeleteFlag & (1 << param_0)) {
|
||||
JKR_DELETE(mTexture[param_0]);
|
||||
delete mTexture[param_0];
|
||||
}
|
||||
|
||||
mTexture[param_0] = p_tex;
|
||||
mUndeleteFlag &= ~(1 << param_0);
|
||||
JKR_DELETE(mPalette[param_0]);
|
||||
delete mPalette[param_0];
|
||||
mPalette[param_0] = NULL;
|
||||
mTexNo[param_0] = -1;
|
||||
return true;
|
||||
@@ -1132,9 +1130,9 @@ bool J2DTevBlock4::removeTexture(u32 param_0) {
|
||||
}
|
||||
|
||||
if (mUndeleteFlag & (1 << param_0)) {
|
||||
JKR_DELETE(mTexture[param_0]);
|
||||
delete mTexture[param_0];
|
||||
}
|
||||
JKR_DELETE(mPalette[param_0]);
|
||||
delete mPalette[param_0];
|
||||
|
||||
for (u32 i = param_0; i < 3; i++) {
|
||||
mTexture[i] = mTexture[i + 1];
|
||||
@@ -1154,13 +1152,13 @@ bool J2DTevBlock4::setFont(ResFONT* p_font) {
|
||||
return false;
|
||||
}
|
||||
|
||||
JUTResFont* resFont = JKR_NEW JUTResFont(p_font, NULL);
|
||||
JUTResFont* resFont = new JUTResFont(p_font, NULL);
|
||||
if (resFont == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mUndeleteFlag & 0x80) {
|
||||
JKR_DELETE(mFont);
|
||||
delete mFont;
|
||||
}
|
||||
|
||||
mFont = resFont;
|
||||
@@ -1174,7 +1172,7 @@ bool J2DTevBlock4::setFont(JUTFont* p_font) {
|
||||
}
|
||||
|
||||
if (mUndeleteFlag & 0x80) {
|
||||
JKR_DELETE(mFont);
|
||||
delete mFont;
|
||||
}
|
||||
|
||||
mFont = (JUTResFont*)p_font;
|
||||
@@ -1189,7 +1187,7 @@ bool J2DTevBlock4::setPalette(u32 param_0, ResTLUT const* p_tlut) {
|
||||
|
||||
if (p_tlut != NULL) {
|
||||
if (mPalette[param_0] == NULL) {
|
||||
mPalette[param_0] = JKR_NEW JUTPalette((GXTlut)param_0, (ResTLUT*)p_tlut);
|
||||
mPalette[param_0] = new JUTPalette((GXTlut)param_0, (ResTLUT*)p_tlut);
|
||||
|
||||
if (mPalette[param_0] == NULL) {
|
||||
return false;
|
||||
@@ -1202,7 +1200,7 @@ bool J2DTevBlock4::setPalette(u32 param_0, ResTLUT const* p_tlut) {
|
||||
mTexture[param_0]->attachPalette(mPalette[param_0]);
|
||||
}
|
||||
} else {
|
||||
JKR_DELETE(mPalette[param_0]);
|
||||
delete mPalette[param_0];
|
||||
mPalette[param_0] = NULL;
|
||||
}
|
||||
|
||||
@@ -1287,13 +1285,13 @@ J2DTevBlock8::J2DTevBlock8() {
|
||||
J2DTevBlock8::~J2DTevBlock8() {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
if (mUndeleteFlag & (1 << i)) {
|
||||
JKR_DELETE(mTexture[i]);
|
||||
delete mTexture[i];
|
||||
}
|
||||
JKR_DELETE(mPalette[i]);
|
||||
delete mPalette[i];
|
||||
}
|
||||
|
||||
if (mFontUndeleteFlag) {
|
||||
JKR_DELETE(mFont);
|
||||
delete mFont;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1339,7 +1337,7 @@ bool J2DTevBlock8::prepareTexture(u8 param_0) {
|
||||
}
|
||||
|
||||
if (mTexture[i] == NULL) {
|
||||
mTexture[i] = JKR_NEW JUTTexture();
|
||||
mTexture[i] = new JUTTexture();
|
||||
|
||||
if (mTexture[i] == NULL) {
|
||||
return false;
|
||||
@@ -1396,7 +1394,7 @@ bool J2DTevBlock8::insertTexture(u32 param_0, ResTIMG const* p_timg, JUTPalette*
|
||||
}
|
||||
JUTTexture* texture;
|
||||
if (!mTexture[idx]) {
|
||||
texture = JKR_NEW JUTTexture(p_timg, local_43);
|
||||
texture = new JUTTexture(p_timg, local_43);
|
||||
if (!texture) {
|
||||
return false;
|
||||
}
|
||||
@@ -1464,7 +1462,7 @@ bool J2DTevBlock8::insertTexture(u32 param_0, JUTTexture* p_tex) {
|
||||
|
||||
if (mTexture[7] != NULL && mTexture[7]->getTexInfo() == NULL) {
|
||||
if (mUndeleteFlag & 0x80) {
|
||||
JKR_DELETE(mTexture[7]);
|
||||
delete mTexture[7];
|
||||
}
|
||||
|
||||
mUndeleteFlag &= ~0x80;
|
||||
@@ -1516,7 +1514,7 @@ bool J2DTevBlock8::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
|
||||
if (mTexture[param_0] == NULL) {
|
||||
if (p_timg != NULL) {
|
||||
mTexture[param_0] = JKR_NEW JUTTexture(p_timg, tlutid);
|
||||
mTexture[param_0] = new JUTTexture(p_timg, tlutid);
|
||||
|
||||
if (mTexture[param_0] == NULL) {
|
||||
return false;
|
||||
@@ -1530,7 +1528,7 @@ bool J2DTevBlock8::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
if (p_timg != NULL) {
|
||||
mTexture[param_0]->storeTIMG(p_timg, tlutid);
|
||||
} else {
|
||||
JKR_DELETE(mTexture[param_0]);
|
||||
delete mTexture[param_0];
|
||||
mTexture[param_0] = NULL;
|
||||
mUndeleteFlag &= ~(1 << param_0);
|
||||
}
|
||||
@@ -1538,7 +1536,7 @@ bool J2DTevBlock8::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
mTexture[param_0] = NULL;
|
||||
|
||||
if (p_timg != NULL) {
|
||||
mTexture[param_0] = JKR_NEW JUTTexture(p_timg, 0);
|
||||
mTexture[param_0] = new JUTTexture(p_timg, 0);
|
||||
|
||||
if (mTexture[param_0] == NULL) {
|
||||
return false;
|
||||
@@ -1548,7 +1546,7 @@ bool J2DTevBlock8::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
}
|
||||
}
|
||||
|
||||
JKR_DELETE(mPalette[param_0]);
|
||||
delete mPalette[param_0];
|
||||
mPalette[param_0] = NULL;
|
||||
mTexNo[param_0] = -1;
|
||||
return true;
|
||||
@@ -1560,12 +1558,12 @@ bool J2DTevBlock8::setTexture(u32 param_0, JUTTexture* p_tex) {
|
||||
}
|
||||
|
||||
if (mUndeleteFlag & (1 << param_0)) {
|
||||
JKR_DELETE(mTexture[param_0]);
|
||||
delete mTexture[param_0];
|
||||
}
|
||||
|
||||
mTexture[param_0] = p_tex;
|
||||
mUndeleteFlag &= ~(1 << param_0);
|
||||
JKR_DELETE(mPalette[param_0]);
|
||||
delete mPalette[param_0];
|
||||
mPalette[param_0] = NULL;
|
||||
mTexNo[param_0] = -1;
|
||||
return true;
|
||||
@@ -1577,9 +1575,9 @@ bool J2DTevBlock8::removeTexture(u32 param_0) {
|
||||
}
|
||||
|
||||
if (mUndeleteFlag & (1 << param_0)) {
|
||||
JKR_DELETE(mTexture[param_0]);
|
||||
delete mTexture[param_0];
|
||||
}
|
||||
JKR_DELETE(mPalette[param_0]);
|
||||
delete mPalette[param_0];
|
||||
|
||||
for (u32 i = param_0; i < 7; i++) {
|
||||
mTexture[i] = mTexture[i + 1];
|
||||
@@ -1599,13 +1597,13 @@ bool J2DTevBlock8::setFont(ResFONT* p_font) {
|
||||
return false;
|
||||
}
|
||||
|
||||
JUTResFont* resFont = JKR_NEW JUTResFont(p_font, NULL);
|
||||
JUTResFont* resFont = new JUTResFont(p_font, NULL);
|
||||
if (resFont == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mFontUndeleteFlag) {
|
||||
JKR_DELETE(mFont);
|
||||
delete mFont;
|
||||
}
|
||||
|
||||
mFont = resFont;
|
||||
@@ -1619,7 +1617,7 @@ bool J2DTevBlock8::setFont(JUTFont* p_font) {
|
||||
}
|
||||
|
||||
if (mFontUndeleteFlag) {
|
||||
JKR_DELETE(mFont);
|
||||
delete mFont;
|
||||
}
|
||||
|
||||
mFont = (JUTResFont*)p_font;
|
||||
@@ -1634,7 +1632,7 @@ bool J2DTevBlock8::setPalette(u32 param_0, ResTLUT const* p_tlut) {
|
||||
|
||||
if (p_tlut != NULL) {
|
||||
if (mPalette[param_0] == NULL) {
|
||||
mPalette[param_0] = JKR_NEW JUTPalette((GXTlut)param_0, (ResTLUT*)p_tlut);
|
||||
mPalette[param_0] = new JUTPalette((GXTlut)param_0, (ResTLUT*)p_tlut);
|
||||
|
||||
if (mPalette[param_0] == NULL) {
|
||||
return false;
|
||||
@@ -1647,7 +1645,7 @@ bool J2DTevBlock8::setPalette(u32 param_0, ResTLUT const* p_tlut) {
|
||||
mTexture[param_0]->attachPalette(mPalette[param_0]);
|
||||
}
|
||||
} else {
|
||||
JKR_DELETE(mPalette[param_0]);
|
||||
delete mPalette[param_0];
|
||||
mPalette[param_0] = NULL;
|
||||
}
|
||||
|
||||
@@ -1727,13 +1725,13 @@ J2DTevBlock16::J2DTevBlock16() {
|
||||
J2DTevBlock16::~J2DTevBlock16() {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
if (mUndeleteFlag & (1 << i)) {
|
||||
JKR_DELETE(mTexture[i]);
|
||||
delete mTexture[i];
|
||||
}
|
||||
JKR_DELETE(mPalette[i]);
|
||||
delete mPalette[i];
|
||||
}
|
||||
|
||||
if (mFontUndeleteFlag) {
|
||||
JKR_DELETE(mFont);
|
||||
delete mFont;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1779,7 +1777,7 @@ bool J2DTevBlock16::prepareTexture(u8 param_0) {
|
||||
}
|
||||
|
||||
if (mTexture[i] == NULL) {
|
||||
mTexture[i] = JKR_NEW JUTTexture();
|
||||
mTexture[i] = new JUTTexture();
|
||||
|
||||
if (mTexture[i] == NULL) {
|
||||
return false;
|
||||
@@ -1836,7 +1834,7 @@ bool J2DTevBlock16::insertTexture(u32 param_0, ResTIMG const* p_timg, JUTPalette
|
||||
}
|
||||
JUTTexture* texture;
|
||||
if (!mTexture[idx]) {
|
||||
texture = JKR_NEW JUTTexture(p_timg, local_43);
|
||||
texture = new JUTTexture(p_timg, local_43);
|
||||
if (!texture) {
|
||||
return false;
|
||||
}
|
||||
@@ -1904,7 +1902,7 @@ bool J2DTevBlock16::insertTexture(u32 param_0, JUTTexture* p_tex) {
|
||||
|
||||
if (mTexture[7] != NULL && mTexture[7]->getTexInfo() == NULL) {
|
||||
if (mUndeleteFlag & 0x80) {
|
||||
JKR_DELETE(mTexture[7]);
|
||||
delete mTexture[7];
|
||||
}
|
||||
|
||||
mUndeleteFlag &= ~0x80;
|
||||
@@ -1956,7 +1954,7 @@ bool J2DTevBlock16::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
|
||||
if (mTexture[param_0] == NULL) {
|
||||
if (p_timg != NULL) {
|
||||
mTexture[param_0] = JKR_NEW JUTTexture(p_timg, tlutid);
|
||||
mTexture[param_0] = new JUTTexture(p_timg, tlutid);
|
||||
|
||||
if (mTexture[param_0] == NULL) {
|
||||
return false;
|
||||
@@ -1970,7 +1968,7 @@ bool J2DTevBlock16::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
if (p_timg != NULL) {
|
||||
mTexture[param_0]->storeTIMG(p_timg, tlutid);
|
||||
} else {
|
||||
JKR_DELETE(mTexture[param_0]);
|
||||
delete mTexture[param_0];
|
||||
mTexture[param_0] = NULL;
|
||||
mUndeleteFlag &= ~(1 << param_0);
|
||||
}
|
||||
@@ -1978,7 +1976,7 @@ bool J2DTevBlock16::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
mTexture[param_0] = NULL;
|
||||
|
||||
if (p_timg != NULL) {
|
||||
mTexture[param_0] = JKR_NEW JUTTexture(p_timg, 0);
|
||||
mTexture[param_0] = new JUTTexture(p_timg, 0);
|
||||
|
||||
if (mTexture[param_0] == NULL) {
|
||||
return false;
|
||||
@@ -1988,7 +1986,7 @@ bool J2DTevBlock16::setTexture(u32 param_0, ResTIMG const* p_timg) {
|
||||
}
|
||||
}
|
||||
|
||||
JKR_DELETE(mPalette[param_0]);
|
||||
delete mPalette[param_0];
|
||||
mPalette[param_0] = NULL;
|
||||
mTexNo[param_0] = -1;
|
||||
return true;
|
||||
@@ -2000,12 +1998,12 @@ bool J2DTevBlock16::setTexture(u32 param_0, JUTTexture* p_tex) {
|
||||
}
|
||||
|
||||
if (mUndeleteFlag & (1 << param_0)) {
|
||||
JKR_DELETE(mTexture[param_0]);
|
||||
delete mTexture[param_0];
|
||||
}
|
||||
|
||||
mTexture[param_0] = p_tex;
|
||||
mUndeleteFlag &= ~(1 << param_0);
|
||||
JKR_DELETE(mPalette[param_0]);
|
||||
delete mPalette[param_0];
|
||||
mPalette[param_0] = NULL;
|
||||
mTexNo[param_0] = -1;
|
||||
return true;
|
||||
@@ -2017,9 +2015,9 @@ bool J2DTevBlock16::removeTexture(u32 param_0) {
|
||||
}
|
||||
|
||||
if (mUndeleteFlag & (1 << param_0)) {
|
||||
JKR_DELETE(mTexture[param_0]);
|
||||
delete mTexture[param_0];
|
||||
}
|
||||
JKR_DELETE(mPalette[param_0]);
|
||||
delete mPalette[param_0];
|
||||
|
||||
for (u32 i = param_0; i < 7; i++) {
|
||||
mTexture[i] = mTexture[i + 1];
|
||||
@@ -2039,13 +2037,13 @@ bool J2DTevBlock16::setFont(ResFONT* p_font) {
|
||||
return false;
|
||||
}
|
||||
|
||||
JUTResFont* resFont = JKR_NEW JUTResFont(p_font, NULL);
|
||||
JUTResFont* resFont = new JUTResFont(p_font, NULL);
|
||||
if (resFont == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mFontUndeleteFlag) {
|
||||
JKR_DELETE(mFont);
|
||||
delete mFont;
|
||||
}
|
||||
|
||||
mFont = resFont;
|
||||
@@ -2059,7 +2057,7 @@ bool J2DTevBlock16::setFont(JUTFont* p_font) {
|
||||
}
|
||||
|
||||
if (mFontUndeleteFlag) {
|
||||
JKR_DELETE(mFont);
|
||||
delete mFont;
|
||||
}
|
||||
|
||||
mFont = (JUTResFont*)p_font;
|
||||
@@ -2074,7 +2072,7 @@ bool J2DTevBlock16::setPalette(u32 param_0, ResTLUT const* p_tlut) {
|
||||
|
||||
if (p_tlut != NULL) {
|
||||
if (mPalette[param_0] == NULL) {
|
||||
mPalette[param_0] = JKR_NEW JUTPalette((GXTlut)param_0, (ResTLUT*)p_tlut);
|
||||
mPalette[param_0] = new JUTPalette((GXTlut)param_0, (ResTLUT*)p_tlut);
|
||||
|
||||
if (mPalette[param_0] == NULL) {
|
||||
return false;
|
||||
@@ -2087,7 +2085,7 @@ bool J2DTevBlock16::setPalette(u32 param_0, ResTLUT const* p_tlut) {
|
||||
mTexture[param_0]->attachPalette(mPalette[param_0]);
|
||||
}
|
||||
} else {
|
||||
JKR_DELETE(mPalette[param_0]);
|
||||
delete mPalette[param_0];
|
||||
mPalette[param_0] = NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user