diff --git a/include/JSystem/J3DGraphAnimator/J3DMaterialAttach.h b/include/JSystem/J3DGraphAnimator/J3DMaterialAttach.h index 708948fb8..f2d665ae0 100644 --- a/include/JSystem/J3DGraphAnimator/J3DMaterialAttach.h +++ b/include/JSystem/J3DGraphAnimator/J3DMaterialAttach.h @@ -57,6 +57,7 @@ private: /* 0x14 */ u32 field_0x14; /* 0x18 */ J3DTexture* mTexture; /* 0x1C */ JUTNameTab* mTextureName; -}; // Size: 0x20 + /* 0x20 */ u16 field_0x20; +}; // Size: 0x24 #endif /* J3DMATERIALATTACH_H */ diff --git a/include/JSystem/J3DGraphAnimator/J3DShapeTable.h b/include/JSystem/J3DGraphAnimator/J3DShapeTable.h index e67c58717..3be962b9a 100644 --- a/include/JSystem/J3DGraphAnimator/J3DShapeTable.h +++ b/include/JSystem/J3DGraphAnimator/J3DShapeTable.h @@ -17,9 +17,8 @@ public: J3DShape* getShapeNodePointer(u16 idx) const { return mShapeNodePointer[idx]; } private: - /* 0x0 */ void *field_0x0; - /* 0x4 */ u16 mShapeNum; - /* 0x8 */ J3DShape** mShapeNodePointer; -}; // Size: 0x0C + /* 0x0 */ u16 mShapeNum; + /* 0x4 */ J3DShape** mShapeNodePointer; +}; // Size: 0x08 #endif /* J3DSHAPETABLE_H */ diff --git a/src/JSystem/J3DGraphAnimator/J3DMaterialAttach.cpp b/src/JSystem/J3DGraphAnimator/J3DMaterialAttach.cpp index 34c144458..c410f6292 100644 --- a/src/JSystem/J3DGraphAnimator/J3DMaterialAttach.cpp +++ b/src/JSystem/J3DGraphAnimator/J3DMaterialAttach.cpp @@ -230,7 +230,7 @@ s32 J3DMaterialTable::setTexNoAnimator(J3DAnmTexPattern* pAnm, J3DTexNoAnm* pAnm } /* 802F6600-802F6798 .text setTexMtxAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKeyP12J3DTexMtxAnmP12J3DTexMtxAnm */ -s32 J3DMaterialTable::setTexMtxAnimator(J3DAnmTextureSRTKey* pAnm, J3DTexMtxAnm* pTexAnmR, J3DTexMtxAnm* pDualAnmR) { +s32 J3DMaterialTable::setTexMtxAnimator(J3DAnmTextureSRTKey* pAnm, J3DTexMtxAnm* pTexAnm, J3DTexMtxAnm* pDualAnmR) { s32 ret = 0; u16 materialNum = pAnm->getUpdateMaterialNum(); @@ -246,17 +246,14 @@ s32 J3DMaterialTable::setTexMtxAnimator(J3DAnmTextureSRTKey* pAnm, J3DTexMtxAnm* if (pMatAnm == NULL) { ret = 1; } else if (texMtxID != 0xFF) { - if (pMaterial->getTexGenBlock()->getTexCoord(texMtxID) != NULL) { + if (pMaterial->getTexGenBlock()->getTexCoord(texMtxID) != NULL) pMaterial->getTexGenBlock()->getTexCoord(texMtxID)->setTexGenMtx(GX_TEXMTX0 + (texMtxID & 0xFF) * 3); - } J3DTexMtx *pTexMtx = pMaterial->getTexGenBlock()->getTexMtx(texMtxID); - pTexMtx->getTexMtxInfo().mInfo = ((pTexMtx->getTexMtxInfo().mInfo) & 0x7F) | (u8)(pAnm->getTexMtxCalcType() << 7); - pTexMtx->getTexMtxInfo().mCenter.x = pAnm->getSRTCenter(i).x; - pTexMtx->getTexMtxInfo().mCenter.x = pAnm->getSRTCenter(i).y; - pTexMtx->getTexMtxInfo().mCenter.z = pAnm->getSRTCenter(i).z; + pTexMtx->getTexMtxInfo().mInfo = ((pTexMtx->getTexMtxInfo().mInfo) & 0x7F) | (pAnm->getTexMtxCalcType() << 7); + pTexMtx->getTexMtxInfo().mCenter = pAnm->getSRTCenter(i); - pMatAnm->setTexMtxAnm(texMtxID, &pTexAnmR[i]); + pMatAnm->setTexMtxAnm(texMtxID, &pTexAnm[i]); } } }