diff options
| author | Max Roncace <me@caseif.net> | 2026-01-04 20:20:35 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-04 17:20:35 -0800 |
| commit | b72be3074adae802510f47643cac7bfc1fd6e9c7 (patch) | |
| tree | 5e26ecdcb7fcf570ee63814fe4a61332bbf34495 /include/JSystem/J3DGraphBase | |
| parent | 7cf1038865d2ea49adf12c122889119bcea4af34 (diff) | |
m_Do_ext retail linked + debug improvements (#3009)
Diffstat (limited to 'include/JSystem/J3DGraphBase')
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DMaterial.h | 7 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DSys.h | 5 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DTexture.h | 1 |
3 files changed, 7 insertions, 6 deletions
diff --git a/include/JSystem/J3DGraphBase/J3DMaterial.h b/include/JSystem/J3DGraphBase/J3DMaterial.h index 39b8be99c2..dcb74c1f46 100644 --- a/include/JSystem/J3DGraphBase/J3DMaterial.h +++ b/include/JSystem/J3DGraphBase/J3DMaterial.h @@ -56,12 +56,9 @@ public: J3DIndBlock* getIndBlock() { return mIndBlock; } J3DJoint* getJoint() { return mJoint; } J3DMaterialAnm* getMaterialAnm() { - if ((uintptr_t)mMaterialAnm < 0xC0000000) { - return mMaterialAnm; - } else { - return NULL; - } + return (uintptr_t)mMaterialAnm < 0xC0000000 ? mMaterialAnm : NULL; } + u32 getMaterialMode() { return mMaterialMode; } J3DNBTScale* getNBTScale() { return mTexGenBlock->getNBTScale(); } u16 getTexNo(u32 idx) { return mTevBlock->getTexNo(idx); } J3DGXColor* getTevKColor(u32 param_0) { return mTevBlock->getTevKColor(param_0); } diff --git a/include/JSystem/J3DGraphBase/J3DSys.h b/include/JSystem/J3DGraphBase/J3DSys.h index 57e3613ea2..1429ca22fe 100644 --- a/include/JSystem/J3DGraphBase/J3DSys.h +++ b/include/JSystem/J3DGraphBase/J3DSys.h @@ -139,7 +139,10 @@ struct J3DSys { J3DMtxCalc * getCurrentMtxCalc() const { return mCurrentMtxCalc; } - void setTexture(J3DTexture* pTex) { mTexture = pTex; } + void setTexture(J3DTexture* pTex) { + JUT_ASSERT_MSG(220, pTex != NULL, "Error : null pointer."); + mTexture = pTex; + } J3DTexture* getTexture() { return mTexture; } void setNBTScale(Vec* scale) { mNBTScale = scale; } diff --git a/include/JSystem/J3DGraphBase/J3DTexture.h b/include/JSystem/J3DGraphBase/J3DTexture.h index 0927e08a47..72a165645b 100644 --- a/include/JSystem/J3DGraphBase/J3DTexture.h +++ b/include/JSystem/J3DGraphBase/J3DTexture.h @@ -33,6 +33,7 @@ public: } void setResTIMG(u16 index, const ResTIMG& timg) { + JUT_ASSERT_MSG(81, (bool)(index < mNum), "Error : range over."); mpRes[index] = timg; mpRes[index].imageOffset = ((mpRes[index].imageOffset + (uintptr_t)&timg - (uintptr_t)(mpRes + index))); mpRes[index].paletteOffset = ((mpRes[index].paletteOffset + (uintptr_t)&timg - (uintptr_t)(mpRes + index))); |
