mirror of
https://github.com/zeldaret/tp
synced 2026-06-21 08:31:53 -04:00
Add more J3D_ASSERTs (#2491)
* Fix debug build * Add more J3D_ASSERTs * Move J3DShapeMtx to correct header for assert * Add VSCode task for ninja changes_all
This commit is contained in:
@@ -589,14 +589,23 @@ public:
|
||||
calcTransform(getFrame(), param_0, pSRTInfo);
|
||||
}
|
||||
|
||||
u16 getUpdateMaterialID(u16 idx) const { return mUpdateMaterialID[idx]; }
|
||||
u16 getUpdateMaterialID(u16 idx) const {
|
||||
J3D_ASSERT(1029, idx < mTrackNum / 3, "Error : range over.");
|
||||
return mUpdateMaterialID[idx];
|
||||
}
|
||||
u16 getUpdateMaterialNum() const { return mTrackNum / 3; }
|
||||
u16 getPostUpdateMaterialNum() const { return field_0x4a / 3; }
|
||||
|
||||
int getUpdateTexMtxID(u16 idx) const { return mUpdateTexMtxID[idx]; }
|
||||
int getUpdateTexMtxID(u16 idx) const {
|
||||
J3D_ASSERT(1017, idx < mTrackNum / 3, "Error : range over.");
|
||||
return mUpdateTexMtxID[idx];
|
||||
}
|
||||
bool isValidUpdateMaterialID(u16 idx) const { return mUpdateMaterialID[idx] != 0xffff; }
|
||||
u32 getTexMtxCalcType() { return mTexMtxCalcType; }
|
||||
Vec* getSRTCenter(u16 idx) { return &mSRTCenter[idx]; }
|
||||
Vec* getSRTCenter(u16 idx) {
|
||||
J3D_ASSERT(1047, idx < mTrackNum / 3, "Error : range over.");
|
||||
return &mSRTCenter[idx];
|
||||
}
|
||||
|
||||
/* 0x0C */ int mDecShift;
|
||||
/* 0x10 */ J3DAnmTransformKeyTable* mAnmTable;
|
||||
@@ -640,7 +649,10 @@ public:
|
||||
/* 8032BD20 */ virtual ~J3DAnmTexPattern() {}
|
||||
/* 8032BD94 */ virtual s32 getKind() const { return 2; }
|
||||
|
||||
u16 getUpdateMaterialID(u16 idx) const { return mUpdateMaterialID[idx]; }
|
||||
u16 getUpdateMaterialID(u16 idx) const {
|
||||
J3D_ASSERT(2288, idx < mUpdateMaterialNum, "Error : range over.");
|
||||
return mUpdateMaterialID[idx];
|
||||
}
|
||||
u16 getUpdateMaterialNum() const { return mUpdateMaterialNum; }
|
||||
bool isValidUpdateMaterialID(u16 id) const { return mUpdateMaterialID[id] != 0xFFFF; }
|
||||
J3DAnmTexPatternFullTable* getAnmTable() { return mAnmTable; }
|
||||
@@ -671,8 +683,14 @@ public:
|
||||
u16 getCRegUpdateMaterialNum() const { return mCRegUpdateMaterialNum; }
|
||||
u16 getKRegUpdateMaterialNum() const { return mKRegUpdateMaterialNum; }
|
||||
|
||||
u16 getCRegUpdateMaterialID(u16 idx) const { return mCRegUpdateMaterialID[idx]; }
|
||||
u16 getKRegUpdateMaterialID(u16 idx) const { return mKRegUpdateMaterialID[idx]; }
|
||||
u16 getCRegUpdateMaterialID(u16 idx) const {
|
||||
J3D_ASSERT(2100, idx < mCRegUpdateMaterialNum, "Error : range over.");
|
||||
return mCRegUpdateMaterialID[idx];
|
||||
}
|
||||
u16 getKRegUpdateMaterialID(u16 idx) const {
|
||||
J3D_ASSERT(2140, idx < mKRegUpdateMaterialNum, "Error : range over.");
|
||||
return mKRegUpdateMaterialID[idx];
|
||||
}
|
||||
|
||||
const J3DAnmCRegKeyTable* getAnmCRegKeyTable() const { return mAnmCRegKeyTable; }
|
||||
const J3DAnmKRegKeyTable* getAnmKRegKeyTable() const { return mAnmKRegKeyTable; }
|
||||
@@ -722,7 +740,7 @@ public:
|
||||
u16 getUpdateMaterialNum() const { return mUpdateMaterialNum; }
|
||||
bool isValidUpdateMaterialID(u16 id) const { return mUpdateMaterialID[id] != 0xFFFF; }
|
||||
u16 getUpdateMaterialID(u16 idx) const {
|
||||
J3D_ASSERT(1578, idx < mUpdateMaterialNum, "Error : range over.")
|
||||
J3D_ASSERT(1578, idx < mUpdateMaterialNum, "Error : range over.");
|
||||
return mUpdateMaterialID[idx];
|
||||
}
|
||||
|
||||
|
||||
@@ -81,12 +81,15 @@ public:
|
||||
/* 8032E364 */ void setAnm(J3DAnmCluster*);
|
||||
|
||||
J3DCluster* getClusterPointer(u16 index) {
|
||||
J3D_ASSERT(186, (index < mClusterNum),"Error : range over.");
|
||||
J3D_ASSERT(186, (index < mClusterNum), "Error : range over.");
|
||||
return &mClusterPointer[index];
|
||||
}
|
||||
u16 getClusterNum() const { return mClusterNum; }
|
||||
u16 getClusterKeyNum() const { return mClusterKeyNum; }
|
||||
J3DClusterKey* getClusterKeyPointer(u16 i) { return &mClusterKeyPointer[i]; }
|
||||
J3DClusterKey* getClusterKeyPointer(u16 i) {
|
||||
J3D_ASSERT(199, (i < mClusterKeyNum), "Error : range over.");
|
||||
return &mClusterKeyPointer[i];
|
||||
}
|
||||
f32* getVtxPos() { return mVtxPos; }
|
||||
f32* getVtxNrm() { return mVtxNrm; }
|
||||
|
||||
|
||||
@@ -63,7 +63,10 @@ public:
|
||||
J3DDrawMtxData* getDrawMtxData() { return &mDrawMtxData; }
|
||||
JUTNameTab* getJointName() const { return mJointName; }
|
||||
J3DJoint* getRootNode() { return mRootNode; }
|
||||
J3DJoint* getJointNodePointer(u16 idx) const { return mJointNodePointer[idx]; }
|
||||
J3DJoint* getJointNodePointer(u16 idx) const {
|
||||
J3D_ASSERT(139, idx < mJointNum, "Error : range over.");
|
||||
return mJointNodePointer[idx];
|
||||
}
|
||||
J3DMtxCalc* getBasicMtxCalc() const { return mBasicMtxCalc; }
|
||||
Mtx& getInvJointMtx(int idx) { return mInvJointMtx[idx]; }
|
||||
u32 getModelDataType() const { return mModelDataType; }
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef J3DMATERIALATTACH_H
|
||||
#define J3DMATERIALATTACH_H
|
||||
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
class J3DMaterial;
|
||||
@@ -31,7 +32,10 @@ public:
|
||||
|
||||
/* 8032F604 */ virtual ~J3DMaterialTable();
|
||||
|
||||
J3DMaterial* getMaterialNodePointer(u16 idx) const { return mMaterialNodePointer[idx]; }
|
||||
J3DMaterial* getMaterialNodePointer(u16 idx) const {
|
||||
J3D_ASSERT(92, idx < mMaterialNum, "Error : range over.");
|
||||
return mMaterialNodePointer[idx];
|
||||
}
|
||||
|
||||
J3DTexture* getTexture() const { return mTexture; }
|
||||
JUTNameTab* getTextureName() const { return mTextureName; }
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define J3DSHAPETABLE_H
|
||||
|
||||
#include "JSystem/J3DGraphBase/J3DShape.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
|
||||
class JUTNameTab;
|
||||
|
||||
@@ -25,7 +26,10 @@ public:
|
||||
virtual ~J3DShapeTable() {}
|
||||
|
||||
u16 getShapeNum() const { return mShapeNum; }
|
||||
J3DShape* getShapeNodePointer(u16 idx) const { return mShapeNodePointer[idx]; }
|
||||
J3DShape* getShapeNodePointer(u16 idx) const {
|
||||
J3D_ASSERT(85, idx < mShapeNum, "Error : range over.");
|
||||
return mShapeNodePointer[idx];
|
||||
}
|
||||
|
||||
private:
|
||||
friend class J3DModelLoader;
|
||||
|
||||
Reference in New Issue
Block a user