mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-07 13:23:27 -04:00
revive J3DMaterialAttach
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user