diff options
| author | Jasper St. Pierre <jstpierre@mecheye.net> | 2022-04-23 22:17:28 -0700 |
|---|---|---|
| committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2022-04-24 01:57:11 -0700 |
| commit | f1f9cc713d57df482fc8ea1ec6b73a928f088d21 (patch) | |
| tree | a6eab74f0539f116bea58e561010eee7936aab70 /include | |
| parent | fb8b3251d6eeea44510e0bae251e63b122f56b36 (diff) | |
J3DShape/J3DShapeMtx: More work
Diffstat (limited to 'include')
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DJointTree.h | 1 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DModelData.h | 3 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DShape.h | 2 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DShapeMtx.h | 31 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DSys.h | 3 | ||||
| -rw-r--r-- | include/dolphin/gx/GX.h | 6 |
6 files changed, 28 insertions, 18 deletions
diff --git a/include/JSystem/J3DGraphAnimator/J3DJointTree.h b/include/JSystem/J3DGraphAnimator/J3DJointTree.h index 181d3554f5..b8e8267339 100644 --- a/include/JSystem/J3DGraphAnimator/J3DJointTree.h +++ b/include/JSystem/J3DGraphAnimator/J3DJointTree.h @@ -37,6 +37,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]; } private: /* 0x04 */ J3DModelHierarchy* mHierarchy; diff --git a/include/JSystem/J3DGraphAnimator/J3DModelData.h b/include/JSystem/J3DGraphAnimator/J3DModelData.h index 12e98f3869..56b896c926 100644 --- a/include/JSystem/J3DGraphAnimator/J3DModelData.h +++ b/include/JSystem/J3DGraphAnimator/J3DModelData.h @@ -33,12 +33,13 @@ public: J3DShape* getShapeNodePointer(u16 idx) const { return mShapeTable.getShapeNodePointer(idx); } J3DJoint* getJointNodePointer(u16 idx) const { return mJointTree.getJointNodePointer(idx); } J3DJointTree& getJointTree() { return mJointTree; } + Mtx& getInvJointMtx(s32 idx) const { return mJointTree.getInvJointMtx(idx); } J3DTexture* getTexture() const { return mMaterialTable.getTexture(); } JUTNameTab* getTextureName() const { return mMaterialTable.getTextureName(); } u16 getWEvlpMtxNum() const { return mJointTree.getWEvlpMtxNum(); } void* getVtxPosArray() const { return mVertexData.getVtxPosArray(); } void* getVtxNrmArray() const { return mVertexData.getVtxNrmArray(); } - _GXColor* getVtxColorArray(u8 idx) const { return mVertexData.getVtxColorArray(idx); } + GXColor* getVtxColorArray(u8 idx) const { return mVertexData.getVtxColorArray(idx); } bool checkFlag(u32 flag) const { return !!(mFlags & flag); } bool checkBumpFlag() const { return mbHasBumpArray; } bool checkBBoardFlag() const { return mbHasBillboard == 1; } diff --git a/include/JSystem/J3DGraphBase/J3DShape.h b/include/JSystem/J3DGraphBase/J3DShape.h index e2d0cccae9..5bac7d8ddf 100644 --- a/include/JSystem/J3DGraphBase/J3DShape.h +++ b/include/JSystem/J3DGraphBase/J3DShape.h @@ -58,7 +58,7 @@ public: /* 80314BB8 */ void addTexMtxIndexInDL(_GXAttr, u32); /* 80314CBC */ void addTexMtxIndexInVcd(_GXAttr); /* 80314DA8 */ void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]); - /* 80314E28 */ void countBumpMtxNum() const; + /* 80314E28 */ u32 countBumpMtxNum() const; /* 80314EEC */ void loadVtxArray() const; /* 80314F5C */ bool isSameVcdVatCmd(J3DShape*); /* 80314F98 */ void makeVtxArrayCmd(); diff --git a/include/JSystem/J3DGraphBase/J3DShapeMtx.h b/include/JSystem/J3DGraphBase/J3DShapeMtx.h index 4b0249ac4c..0a346b2068 100644 --- a/include/JSystem/J3DGraphBase/J3DShapeMtx.h +++ b/include/JSystem/J3DGraphBase/J3DShapeMtx.h @@ -9,7 +9,12 @@ class J3DTexGenBlock; class J3DDifferedTexMtx { public: - /* 8031322C */ void loadExecute(f32 const (*)[4]); + /* 8031322C */ static void loadExecute(f32 const (*)[4]); + + static inline void load(Mtx m) { + if (sTexGenBlock != NULL) + loadExecute(m); + } static J3DTexGenBlock* sTexGenBlock; static J3DTexMtx* sTexMtxObj; @@ -26,9 +31,9 @@ public: /* 803131D4 */ void loadMtxIndx_PNCPU(int, u16) const; /* 80314798 */ virtual ~J3DShapeMtx(); - /* 803147E0 */ virtual void getType() const; - /* 80273E08 */ virtual bool getUseMtxNum() const; - /* 8031459C */ virtual void getUseMtxIndex(u16) const; + /* 803147E0 */ virtual u32 getType() const; + /* 80273E08 */ virtual u32 getUseMtxNum() const; + /* 8031459C */ virtual u32 getUseMtxIndex(u16) const; /* 80313B94 */ virtual void load() const; /* 80313BF0 */ virtual void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]); @@ -50,7 +55,7 @@ private: class J3DShapeMtxConcatView : public J3DShapeMtx { public: /* 80314730 */ virtual ~J3DShapeMtxConcatView(); - /* 8031478C */ virtual void getType() const; + /* 803147E0 */ virtual u32 getType() const; /* 80313C54 */ virtual void load() const; /* 80314598 */ virtual void loadNrmMtx(int, u16) const; /* 80313D28 */ virtual void loadNrmMtx(int, u16, f32 (*)[4]) const; @@ -69,23 +74,23 @@ public: class J3DShapeMtxYBBoardConcatView : public J3DShapeMtxConcatView { public: /* 80314520 */ virtual ~J3DShapeMtxYBBoardConcatView(); - /* 8031458C */ virtual void getType() const; + /* 803147E0 */ virtual u32 getType() const; /* 803143E4 */ virtual void load() const; }; class J3DShapeMtxBBoardConcatView : public J3DShapeMtxConcatView { public: /* 803145A4 */ virtual ~J3DShapeMtxBBoardConcatView(); - /* 80314610 */ virtual void getType() const; + /* 803147E0 */ virtual u32 getType() const; /* 803142D4 */ virtual void load() const; }; class J3DShapeMtxMulti : public J3DShapeMtx { public: /* 803146B0 */ virtual ~J3DShapeMtxMulti(); - /* 8031470C */ virtual void getType() const; - /* 80314718 */ virtual void getUseMtxNum() const; - /* 80314720 */ virtual void getUseMtxIndex(u16) const; + /* 803147E0 */ virtual u32 getType() const; + /* 80273E08 */ virtual u32 getUseMtxNum() const; + /* 8031459C */ virtual u32 getUseMtxIndex(u16) const; /* 80313E4C */ virtual void load() const; /* 80313EEC */ virtual void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]); @@ -97,9 +102,9 @@ private: class J3DShapeMtxMultiConcatView : public J3DShapeMtx { public: /* 8031461C */ virtual ~J3DShapeMtxMultiConcatView(); - /* 80314688 */ virtual void getType() const; - /* 80314694 */ virtual void getUseMtxNum() const; - /* 8031469C */ virtual void getUseMtxIndex(u16) const; + /* 803147E0 */ virtual u32 getType() const; + /* 80273E08 */ virtual u32 getUseMtxNum() const; + /* 8031459C */ virtual u32 getUseMtxIndex(u16) const; /* 80313FA4 */ virtual void load() const; /* 803146AC */ virtual void loadNrmMtx(int, u16) const; /* 8031419C */ virtual void loadNrmMtx(int, u16, f32 (*)[4]) const; diff --git a/include/JSystem/J3DGraphBase/J3DSys.h b/include/JSystem/J3DGraphBase/J3DSys.h index c06c9a5777..a4bded7e42 100644 --- a/include/JSystem/J3DGraphBase/J3DSys.h +++ b/include/JSystem/J3DGraphBase/J3DSys.h @@ -118,6 +118,9 @@ struct J3DSys { // Type 1: Xlu Buffer J3DDrawBuffer* getDrawBuffer(int type) { return mDrawBuffer[type]; } + Mtx& getModelDrawMtx(u16 no) const { return mModelDrawMtx[no]; } + J3DShapePacket* getShapePacket() const { return mShapePacket; } + void setViewMtx(Mtx m) { PSMTXCopy(m, mViewMtx); } static Mtx mCurrentMtx; diff --git a/include/dolphin/gx/GX.h b/include/dolphin/gx/GX.h index a6d8bf4df8..baceefa1e8 100644 --- a/include/dolphin/gx/GX.h +++ b/include/dolphin/gx/GX.h @@ -826,9 +826,9 @@ typedef enum _GXPTTexMtx { }; typedef struct _GXVtxDescList { - GXAttr attr; - GXAttrType type; -} GXVtxDescList; + /* 0x0 */ GXAttr attr; + /* 0x4 */ GXAttrType type; +} GXVtxDescList; // Size: 0x08 typedef enum _GXFBClamp { /* 0x0 */ GX_CLAMP_NONE, |
