summaryrefslogtreecommitdiff
path: root/include/JSystem/J3DGraphAnimator
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-06-18 20:14:26 -0400
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2025-06-18 20:14:26 -0400
commitede01ca07bb0b79f27369f82cda41e5cb13697a8 (patch)
treef571e952d80852011c36d84898c5a153b91994ff /include/JSystem/J3DGraphAnimator
parent264ee5d6e1cacf0c3bae2dd1a83fe15052d35b94 (diff)
daPy_lk_c::draw and linkDraw matched on retail with (void)0 assert, d_a_figure OK
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; }