summaryrefslogtreecommitdiff
path: root/include/JSystem/J3DGraphAnimator
diff options
context:
space:
mode:
authorhatal175 <hatal175@users.noreply.github.com>2025-04-16 00:09:31 +0300
committerGitHub <noreply@github.com>2025-04-15 14:09:31 -0700
commitb5e932c493742411fdcef695be5879b729d115c8 (patch)
tree0a6c2e25be2ded3e5b539d0be4834b19c12a43b1 /include/JSystem/J3DGraphAnimator
parent59ff71c355015c7ed2ffadf96371db67c1b1d0b5 (diff)
A Little j3d work (#2396)
Diffstat (limited to 'include/JSystem/J3DGraphAnimator')
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DAnimation.h2
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DCluster.h6
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DJointTree.h2
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DModel.h2
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DModelData.h2
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h2
6 files changed, 10 insertions, 6 deletions
diff --git a/include/JSystem/J3DGraphAnimator/J3DAnimation.h b/include/JSystem/J3DGraphAnimator/J3DAnimation.h
index 88e0480bad..ca556f1546 100644
--- a/include/JSystem/J3DGraphAnimator/J3DAnimation.h
+++ b/include/JSystem/J3DGraphAnimator/J3DAnimation.h
@@ -722,7 +722,7 @@ public:
u16 getUpdateMaterialNum() const { return mUpdateMaterialNum; }
bool isValidUpdateMaterialID(u16 id) const { return mUpdateMaterialID[id] != 0xFFFF; }
u16 getUpdateMaterialID(u16 idx) const {
- JUT_ASSERT_MSG(1578, 0 <= mUpdateMaterialNum - idx, "Error : range over.")
+ J3D_ASSERT(1578, idx < mUpdateMaterialNum, "Error : range over.")
return mUpdateMaterialID[idx];
}
diff --git a/include/JSystem/J3DGraphAnimator/J3DCluster.h b/include/JSystem/J3DGraphAnimator/J3DCluster.h
index ea9fbe2b7b..c575e890f9 100644
--- a/include/JSystem/J3DGraphAnimator/J3DCluster.h
+++ b/include/JSystem/J3DGraphAnimator/J3DCluster.h
@@ -1,6 +1,7 @@
#ifndef J3DCLUSTER_H
#define J3DCLUSTER_H
+#include "JSystem/JUtility/JUTAssert.h"
#include "dolphin/types.h"
class J3DDeformer;
@@ -79,7 +80,10 @@ public:
/* 8032E274 */ void deform(J3DModel*);
/* 8032E364 */ void setAnm(J3DAnmCluster*);
- J3DCluster* getClusterPointer(u16 index) { return &mClusterPointer[index]; }
+ J3DCluster* getClusterPointer(u16 index) {
+ 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]; }
diff --git a/include/JSystem/J3DGraphAnimator/J3DJointTree.h b/include/JSystem/J3DGraphAnimator/J3DJointTree.h
index c1558e5a91..3b9bb85539 100644
--- a/include/JSystem/J3DGraphAnimator/J3DJointTree.h
+++ b/include/JSystem/J3DGraphAnimator/J3DJointTree.h
@@ -65,7 +65,7 @@ public:
J3DJoint* getRootNode() { return mRootNode; }
J3DJoint* getJointNodePointer(u16 idx) const { return mJointNodePointer[idx]; }
J3DMtxCalc* getBasicMtxCalc() const { return mBasicMtxCalc; }
- Mtx& getInvJointMtx(s32 idx) const { return mInvJointMtx[idx]; }
+ Mtx& getInvJointMtx(int idx) { return mInvJointMtx[idx]; }
u32 getModelDataType() const { return mModelDataType; }
void setModelDataType(u32 type) { mModelDataType = type; }
bool checkFlag(u32 flag) { return mFlags & flag; }
diff --git a/include/JSystem/J3DGraphAnimator/J3DModel.h b/include/JSystem/J3DGraphAnimator/J3DModel.h
index 5bbd7dc352..eca87c8127 100644
--- a/include/JSystem/J3DGraphAnimator/J3DModel.h
+++ b/include/JSystem/J3DGraphAnimator/J3DModel.h
@@ -86,7 +86,7 @@ public:
Mtx& getBaseTRMtx() { return mBaseTransformMtx; }
void setBaseTRMtx(Mtx m) { MTXCopy(m, mBaseTransformMtx); }
u32 getMtxCalcMode() const { return mFlags & 0x03; }
- J3DVertexBuffer* getVertexBuffer() const { return (J3DVertexBuffer*)&mVertexBuffer; }
+ J3DVertexBuffer* getVertexBuffer() { return (J3DVertexBuffer*)&mVertexBuffer; }
J3DMatPacket* getMatPacket(u16 idx) const { return &mMatPacket[idx]; }
J3DShapePacket* getShapePacket(u16 idx) const { return &mShapePacket[idx]; }
J3DMtxBuffer* getMtxBuffer() const { return mMtxBuffer; }
diff --git a/include/JSystem/J3DGraphAnimator/J3DModelData.h b/include/JSystem/J3DGraphAnimator/J3DModelData.h
index 629a82e12d..fd613ce616 100644
--- a/include/JSystem/J3DGraphAnimator/J3DModelData.h
+++ b/include/JSystem/J3DGraphAnimator/J3DModelData.h
@@ -52,7 +52,7 @@ public:
void setHierarchy(J3DModelHierarchy* hierarchy) { mJointTree.setHierarchy(hierarchy); }
void setBasicMtxCalc(J3DMtxCalc* calc) { mJointTree.setBasicMtxCalc(calc); }
JUTNameTab* getJointName() const { return mJointTree.getJointName(); }
- Mtx& getInvJointMtx(s32 idx) const { return mJointTree.getInvJointMtx(idx); }
+ Mtx& getInvJointMtx(int idx) { return mJointTree.getInvJointMtx(idx); }
J3DTexture* getTexture() const { return mMaterialTable.getTexture(); }
JUTNameTab* getTextureName() const { return mMaterialTable.getTextureName(); }
u16 getWEvlpMtxNum() const { return mJointTree.getWEvlpMtxNum(); }
diff --git a/include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h b/include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h
index abf85d35c8..5f9d4da047 100644
--- a/include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h
+++ b/include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h
@@ -15,7 +15,7 @@ public:
/* 80326214 */ void initialize();
/* 80326258 */ s32 create(J3DModelData*, u32);
- /* 80326364 */ s32 createAnmMtx(J3DModelData*);
+ /* 80326364 */ J3DError createAnmMtx(J3DModelData*);
/* 803263F0 */ s32 createWeightEnvelopeMtx(J3DModelData*);
/* 8032648C */ s32 setNoUseDrawMtx();
/* 803264B8 */ s32 createDoubleDrawMtx(J3DModelData*, u32);