diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-06-18 20:14:26 -0400 |
|---|---|---|
| committer | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-06-18 20:14:26 -0400 |
| commit | ede01ca07bb0b79f27369f82cda41e5cb13697a8 (patch) | |
| tree | f571e952d80852011c36d84898c5a153b91994ff /include/JSystem/J3DGraphAnimator | |
| parent | 264ee5d6e1cacf0c3bae2dd1a83fe15052d35b94 (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.h | 5 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DSkinDeform.h | 6 |
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; } |
