diff options
| author | Jasper St. Pierre <jstpierre@mecheye.net> | 2022-12-31 09:45:22 -0800 |
|---|---|---|
| committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2022-12-31 09:45:40 -0800 |
| commit | d7480d5d8bf998c2ece5cbd76374deb8e279e77c (patch) | |
| tree | 03519576acc56f7fa3c065a60a85f9a2cea06f59 /include | |
| parent | 2e2e08e78341a6a7f7a2847dd89235db07d72530 (diff) | |
Couple more J3DModel matches, d_kyeff/d_kyeff2 cleanups
Diffstat (limited to 'include')
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DJointTree.h | 1 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DModel.h | 1 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DModelData.h | 3 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h | 6 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DMaterial.h | 2 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DPacket.h | 5 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DShape.h | 1 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DShapeMtx.h | 10 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DTexture.h | 1 |
9 files changed, 22 insertions, 8 deletions
diff --git a/include/JSystem/J3DGraphAnimator/J3DJointTree.h b/include/JSystem/J3DGraphAnimator/J3DJointTree.h index 80513fb4de..c73d96deee 100644 --- a/include/JSystem/J3DGraphAnimator/J3DJointTree.h +++ b/include/JSystem/J3DGraphAnimator/J3DJointTree.h @@ -48,6 +48,7 @@ public: J3DJoint* getJointNodePointer(u16 idx) const { return mJointNodePointer[idx]; } J3DMtxCalc* getBasicMtxCalc() const { return mBasicMtxCalc; } Mtx& getInvJointMtx(s32 idx) const { return mInvJointMtx[idx]; } + u32 getModelDataType() const { return mModelDataType; } private: /* 0x04 */ J3DModelHierarchy* mHierarchy; diff --git a/include/JSystem/J3DGraphAnimator/J3DModel.h b/include/JSystem/J3DGraphAnimator/J3DModel.h index 931c225adb..0c54118357 100644 --- a/include/JSystem/J3DGraphAnimator/J3DModel.h +++ b/include/JSystem/J3DGraphAnimator/J3DModel.h @@ -71,6 +71,7 @@ public: void i_setBaseTRMtx(Mtx m) { PSMTXCopy(m, mBaseTransformMtx); } u32 getMtxCalcMode() const { return mFlags & 0x03; } J3DVertexBuffer* getVertexBuffer() const { return (J3DVertexBuffer*)&mVertexBuffer; } + J3DMatPacket* getMatPacket(u16 idx) const { return &mMatPacket[idx]; } J3DShapePacket* getShapePacket(u16 idx) const { return &mShapePacket[idx]; } Mtx33* getBumpMtxPtr(int idx) const { return mMtxBuffer->getBumpMtxPtr(idx); } Mtx33* getNrmMtxPtr() const { return mMtxBuffer->getNrmMtxPtr(); } diff --git a/include/JSystem/J3DGraphAnimator/J3DModelData.h b/include/JSystem/J3DGraphAnimator/J3DModelData.h index 51d8f08e8c..85c0094945 100644 --- a/include/JSystem/J3DGraphAnimator/J3DModelData.h +++ b/include/JSystem/J3DGraphAnimator/J3DModelData.h @@ -38,11 +38,12 @@ public: J3DTexture* getTexture() const { return mMaterialTable.getTexture(); } JUTNameTab* getTextureName() const { return mMaterialTable.getTextureName(); } u16 getWEvlpMtxNum() const { return mJointTree.getWEvlpMtxNum(); } + u32 getModelDataType() const { return mJointTree.getModelDataType(); } void* getVtxPosArray() const { return mVertexData.getVtxPosArray(); } void* getVtxNrmArray() const { return mVertexData.getVtxNrmArray(); } GXColor* getVtxColorArray(u8 idx) const { return mVertexData.getVtxColorArray(idx); } bool checkFlag(u32 flag) const { return !!(mFlags & flag); } - bool checkBumpFlag() const { return mbHasBumpArray; } + u16 checkBumpFlag() const { return mbHasBumpArray; } bool checkBBoardFlag() const { return mbHasBillboard == 1; } bool isLocked() { return mMaterialTable.isLocked(); } void entryTexMtxAnimator(J3DAnmTextureSRTKey* anm) { mMaterialTable.entryTexMtxAnimator(anm); } diff --git a/include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h b/include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h index 1977afe281..5ce09d7fed 100644 --- a/include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h +++ b/include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h @@ -33,8 +33,8 @@ public: Mtx* getDrawMtxPtr() const { return mpDrawMtxArr[mCurrentViewNo]; } Mtx33** getNrmMtxPtrPtr() const { return mpNrmMtxArr; } Mtx33* getNrmMtxPtr() const { return mpNrmMtxArr[mCurrentViewNo]; } - Mtx33** getBumpMtxPtrPtr() const { return mpBumpMtxArr; } - Mtx33* getBumpMtxPtr(int idx) const { return mpBumpMtxArr[idx]; } + Mtx33*** getBumpMtxPtrPtr() const { return mpBumpMtxArr; } + Mtx33* getBumpMtxPtr(int idx) const { return mpBumpMtxArr[idx][mCurrentViewNo]; } void swapDrawMtx() { Mtx* tmp = mpOldDrawMtxArr[mCurrentViewNo]; @@ -64,7 +64,7 @@ private: /* 0x1C */ Mtx33** mpOldNrmMtxArr; /* 0x20 */ Mtx33** mpNrmMtxArr; /* 0x24 */ u32 field_0x24; - /* 0x28 */ Mtx33** mpBumpMtxArr; + /* 0x28 */ Mtx33*** mpBumpMtxArr; /* 0x2C */ u32 mFlags; /* 0x30 */ u32 mCurrentViewNo; /* 0x34 */ Mtx** mUserAnmMtx; diff --git a/include/JSystem/J3DGraphBase/J3DMaterial.h b/include/JSystem/J3DGraphBase/J3DMaterial.h index 3e6b822823..d14c2fca4e 100644 --- a/include/JSystem/J3DGraphBase/J3DMaterial.h +++ b/include/JSystem/J3DGraphBase/J3DMaterial.h @@ -71,7 +71,7 @@ public: /* 0x14 */ u16 mIndex; /* 0x18 */ u32 mInvalid; /* 0x1C */ u32 field_0x1c; - /* 0x20 */ u32 field_0x20; + /* 0x20 */ u32 mDiffFlag; /* 0x24 */ J3DColorBlock* mColorBlock; /* 0x28 */ J3DTexGenBlock* mTexGenBlock; /* 0x2C */ J3DTevBlock* mTevBlock; diff --git a/include/JSystem/J3DGraphBase/J3DPacket.h b/include/JSystem/J3DGraphBase/J3DPacket.h index 232db283d3..6b21f537ba 100644 --- a/include/JSystem/J3DGraphBase/J3DPacket.h +++ b/include/JSystem/J3DGraphBase/J3DPacket.h @@ -15,6 +15,7 @@ class J3DModel; class J3DMtxBuffer; class J3DShape; class J3DTexMtx; +class J3DTexMtxObj; class J3DTexture; class J3DDisplayListObj { @@ -100,13 +101,13 @@ public: void offFlag(u32 flag) { mFlags &= ~flag; } void lock() { onFlag(LOCKED); } void unlock() { offFlag(LOCKED); } - J3DTexMtx* getTexMtxObj() const { return mpTexMtx; } + J3DTexMtxObj* getTexMtxObj() const { return mpTexMtxObj; } public: /* 0x10 */ u32 mFlags; /* 0x14 */ char mPad0[0x0C]; // unk /* 0x20 */ J3DDisplayListObj* mpDisplayListObj; - /* 0x24 */ J3DTexMtx* mpTexMtx; + /* 0x24 */ J3DTexMtxObj* mpTexMtxObj; }; // Size: 0x28 class J3DShapePacket : public J3DDrawPacket { diff --git a/include/JSystem/J3DGraphBase/J3DShape.h b/include/JSystem/J3DGraphBase/J3DShape.h index 372dacc976..3d26ef2d6b 100644 --- a/include/JSystem/J3DGraphBase/J3DShape.h +++ b/include/JSystem/J3DGraphBase/J3DShape.h @@ -101,6 +101,7 @@ public: u32 getBumpMtxOffset() const { return mBumpMtxOffset; } inline J3DMaterial* getMaterial() const { return mMaterial; } + inline u32 getIndex() const { return mIndex; } inline u32 getPipeline() const { return (mFlags >> 2) & 0x07; } inline u32 getTexMtxLoadType() const { return mFlags & 0xF000; } inline u32 getMtxGroupNum() const { return mMtxGroupNum; } diff --git a/include/JSystem/J3DGraphBase/J3DShapeMtx.h b/include/JSystem/J3DGraphBase/J3DShapeMtx.h index 2496c9b8a3..177f754261 100644 --- a/include/JSystem/J3DGraphBase/J3DShapeMtx.h +++ b/include/JSystem/J3DGraphBase/J3DShapeMtx.h @@ -7,6 +7,14 @@ class J3DTexMtx; class J3DTexGenBlock; +class J3DTexMtxObj { +public: + Mtx& getMtx(u16 idx) { return mpTexMtx[idx]; } + +private: + /* 0x00 */ Mtx *mpTexMtx; +}; + class J3DDifferedTexMtx { public: /* 8031322C */ static void loadExecute(f32 const (*)[4]); @@ -17,7 +25,7 @@ public: } static J3DTexGenBlock* sTexGenBlock; - static J3DTexMtx* sTexMtxObj; + static J3DTexMtxObj* sTexMtxObj; }; extern u8 struct_804515B0[4]; diff --git a/include/JSystem/J3DGraphBase/J3DTexture.h b/include/JSystem/J3DGraphBase/J3DTexture.h index e5559255ba..8a8158b7ba 100644 --- a/include/JSystem/J3DGraphBase/J3DTexture.h +++ b/include/JSystem/J3DGraphBase/J3DTexture.h @@ -54,6 +54,7 @@ public: /* 803243BC */ void loadPostTexMtx(u32) const; J3DTexMtxInfo& getTexMtxInfo() { return mTexMtxInfo; } + Mtx& getMtx() { return mMtx; } private: /* 0x00 */ J3DTexMtxInfo mTexMtxInfo; |
