summaryrefslogtreecommitdiff
path: root/src/JSystem/J2DGraph/J2DMaterial.cpp
diff options
context:
space:
mode:
authorJcw87 <Jcw87@users.noreply.github.com>2026-01-11 19:00:04 -0800
committerGitHub <noreply@github.com>2026-01-11 19:00:04 -0800
commit2dd7e2ea62daaa33195b2adbca8b086ceaa6d464 (patch)
treed56016fab9d536e646ebde852dd8ef2ad81ba732 /src/JSystem/J2DGraph/J2DMaterial.cpp
parent6e76f12dd3b49acc9b682eeb811dbec64bc3519c (diff)
J2DGraph debug (#3028)
* J2DGraph debug * J2DGraph debug
Diffstat (limited to 'src/JSystem/J2DGraph/J2DMaterial.cpp')
-rw-r--r--src/JSystem/J2DGraph/J2DMaterial.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/JSystem/J2DGraph/J2DMaterial.cpp b/src/JSystem/J2DGraph/J2DMaterial.cpp
index 4fadaf5ace..57cccf8255 100644
--- a/src/JSystem/J2DGraph/J2DMaterial.cpp
+++ b/src/JSystem/J2DGraph/J2DMaterial.cpp
@@ -67,9 +67,7 @@ J2DTevBlock* J2DMaterial::createTevBlock(int block_type, bool noAlign) {
block = new (-4) J2DTevBlock16();
}
}
- if (!block) {
- OS_PANIC(101, "Error : allocate memory.");
- }
+ ASSERTMSGLINE(101, block, "Error : allocate memory.");
return block;
}
@@ -90,9 +88,7 @@ J2DIndBlock* J2DMaterial::createIndBlock(int block_type, bool noAlign) {
block = new (-4) J2DIndBlockNull();
}
}
- if (!block) {
- OS_PANIC(133, "Error : allocate memory.");
- }
+ ASSERTMSGLINE(133, block, "Error : allocate memory.");
return block;
}
@@ -148,9 +144,7 @@ void J2DMaterial::setAnimation(J2DAnmColor* anm) {
u16 index = getIndex();
for (u16 i = 0; i < matNum; i++) {
- u16 matID = anm->getUpdateMaterialID(i);
-
- if (index == matID) {
+ if (index == anm->getUpdateMaterialID(i)) {
mAnmPointer->mColorIds = i;
return;
}
@@ -219,9 +213,7 @@ void J2DMaterial::setAnimation(J2DAnmTevRegKey* anm) {
u16 index = getIndex();
for (u16 i = 0; i < matNum; i++) {
- u16 matID = anm->getCRegUpdateMaterialID(i);
-
- if (index == matID) {
+ if (index == anm->getCRegUpdateMaterialID(i)) {
J3DAnmCRegKeyTable* anmTbl = anm->getAnmCRegKeyTable();
mAnmPointer->mTevCRegIds[anmTbl[i].mColorId] = i;
}
@@ -237,9 +229,7 @@ void J2DMaterial::setAnimation(J2DAnmTevRegKey* anm) {
u16 index = getIndex();
for (u16 i = 0; i < matNum; i++) {
- u16 matID = anm->getKRegUpdateMaterialID(i);
-
- if (index == matID) {
+ if (index == anm->getKRegUpdateMaterialID(i)) {
J3DAnmKRegKeyTable* anmTbl = anm->getAnmKRegKeyTable();
mAnmPointer->mTevKRegIds[anmTbl[i].mColorId] = i;
}