From d7480d5d8bf998c2ece5cbd76374deb8e279e77c Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sat, 31 Dec 2022 09:45:22 -0800 Subject: Couple more J3DModel matches, d_kyeff/d_kyeff2 cleanups --- include/JSystem/J3DGraphBase/J3DMaterial.h | 2 +- include/JSystem/J3DGraphBase/J3DPacket.h | 5 +++-- include/JSystem/J3DGraphBase/J3DShape.h | 1 + include/JSystem/J3DGraphBase/J3DShapeMtx.h | 10 +++++++++- include/JSystem/J3DGraphBase/J3DTexture.h | 1 + 5 files changed, 15 insertions(+), 4 deletions(-) (limited to 'include/JSystem/J3DGraphBase') 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; -- cgit v1.2.3