summaryrefslogtreecommitdiff
path: root/include/JSystem/J3DGraphAnimator
diff options
context:
space:
mode:
Diffstat (limited to 'include/JSystem/J3DGraphAnimator')
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DAnimation.h5
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DSkinDeform.h6
2 files changed, 9 insertions, 2 deletions
diff --git a/include/JSystem/J3DGraphAnimator/J3DAnimation.h b/include/JSystem/J3DGraphAnimator/J3DAnimation.h
index 596ffc38..4f1b6f6f 100644
--- a/include/JSystem/J3DGraphAnimator/J3DAnimation.h
+++ b/include/JSystem/J3DGraphAnimator/J3DAnimation.h
@@ -620,7 +620,10 @@ public:
u16 getUpdateMaterialNum() const { return mUpdateMaterialNum; }
bool isValidUpdateMaterialID(u16 id) const { return mUpdateMaterialID[id] != 0xFFFF; }
- u16 getUpdateMaterialID(u16 idx) const { return mUpdateMaterialID[idx]; }
+ u16 getUpdateMaterialID(u16 idx) const {
+ J3D_ASSERT(1578, idx < mUpdateMaterialNum, "Error : range over.");
+ return mUpdateMaterialID[idx];
+ }
JUTNameTab * getUpdateMaterialName() { return &mUpdateMaterialName; }
protected:
diff --git a/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h b/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h
index 46bea165..46752032 100644
--- a/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h
+++ b/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h
@@ -3,6 +3,7 @@
#include "JSystem/J3DGraphAnimator/J3DCluster.h"
#include "JSystem/J3DGraphBase/J3DTransform.h"
+#include "JSystem/JUtility/JUTAssert.h"
#include "dolphin/types.h"
#include "global.h"
@@ -21,7 +22,10 @@ public:
u16 getClusterNum() const { return mClusterNum; }
u16 getClusterKeyNum() const { return mClusterKeyNum; }
- J3DCluster* getClusterPointer(u16 i) { return &mClusterPointer[i]; }
+ J3DCluster* getClusterPointer(u16 index) {
+ J3D_ASSERT(186, (index < mClusterNum),"Error : range over.");
+ return &mClusterPointer[index];
+ }
J3DClusterKey* getClusterKeyPointer(u16 i) { return &mClusterKeyPointer[i]; }
f32* getVtxPos() { return mVtxPos; }
f32* getVtxNrm() { return mVtxNrm; }