diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2024-01-22 07:23:54 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-22 17:23:54 +0200 |
| commit | 697cd08979c12f2a1ebd32f12a1a306b730f14ec (patch) | |
| tree | cf87190adf687a837db8424dc00ffa21da99e837 /include/JSystem/J3DGraphAnimator | |
| parent | 5a735a495680b6b410a242cbe570a72b789d7016 (diff) | |
some various J2D/J3D work (#2043)
* most of J2DPicture done
* fix GXSetTexCoordGen
* some j3d work
Diffstat (limited to 'include/JSystem/J3DGraphAnimator')
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DAnimation.h | 13 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DCluster.h | 56 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DSkinDeform.h | 32 |
3 files changed, 63 insertions, 38 deletions
diff --git a/include/JSystem/J3DGraphAnimator/J3DAnimation.h b/include/JSystem/J3DGraphAnimator/J3DAnimation.h index 81afd9898f..a35eed551d 100644 --- a/include/JSystem/J3DGraphAnimator/J3DAnimation.h +++ b/include/JSystem/J3DGraphAnimator/J3DAnimation.h @@ -64,7 +64,7 @@ struct J3DAnmTransformFullTable { struct J3DAnmTexPatternFullTable { /* 0x00 */ u16 mMaxFrame; /* 0x02 */ u16 mOffset; - /* 0x04 */ u8 _4; + /* 0x04 */ u8 mTexNo; /* 0x06 */ u16 _6; }; // Size = 0x8 @@ -421,13 +421,18 @@ public: /* 8032BD20 */ virtual ~J3DAnmTexPattern(); /* 8032BD94 */ virtual s32 getKind() const; + u16 getUpdateMaterialID(u16 idx) const { return mUpdateMaterialID[idx]; } + u16 getUpdateMaterialNum() const { return mUpdateMaterialNum; } + bool isValidUpdateMaterialID(u16 id) const { return mUpdateMaterialID[id] != 0xFFFF; } + J3DAnmTexPatternFullTable* getAnmTable() { return mAnmTable; } + private: /* 0x0C */ void* field_0xc; - /* 0x10 */ void* mAnmTable; + /* 0x10 */ J3DAnmTexPatternFullTable* mAnmTable; /* 0x14 */ u16 field_0x14; /* 0x16 */ u16 mUpdateMaterialNum; - /* 0x18 */ u16* field_0x18; - /* 0x1C */ JUTNameTab field_0x1c; + /* 0x18 */ u16* mUpdateMaterialID; + /* 0x1C */ JUTNameTab mUpdateMaterialName; }; // Size: 0x2C class J3DAnmTevRegKey : public J3DAnmBase { diff --git a/include/JSystem/J3DGraphAnimator/J3DCluster.h b/include/JSystem/J3DGraphAnimator/J3DCluster.h index 511c17eed2..4db7189f2d 100644 --- a/include/JSystem/J3DGraphAnimator/J3DCluster.h +++ b/include/JSystem/J3DGraphAnimator/J3DCluster.h @@ -4,21 +4,59 @@ #include "dolphin/types.h" class J3DDeformer; +class J3DClusterKey; +class J3DClusterVertex; +class J3DVertexBuffer; +class J3DModel; +class J3DAnmCluster; +class JUTNameTab; -struct J3DCluster { - /* 0x00 */ f32 field_0x0; - /* 0x04 */ f32 field_0x4; - /* 0x08 */ int field_0x8; - /* 0x0C */ int field_0xc; - /* 0x10 */ u16 field_0x10; - /* 0x12 */ u16 field_0x12; +class J3DCluster { +public: + J3DDeformer* getDeformer() { return mDeformer; } + void setDeformer(J3DDeformer* deformer) { mDeformer = deformer; } + + /* 0x00 */ f32 mMaxAngle; + /* 0x04 */ f32 mMinAngle; + /* 0x08 */ J3DClusterKey* mClusterKey; + /* 0x0C */ u8 mFlags; + /* 0x0E */ u8 field_0xe[0x10 - 0xD]; + /* 0x10 */ u16 mKeyNum; + /* 0x12 */ u16 mPosNum; /* 0x14 */ u16 field_0x14; /* 0x16 */ u16 field_0x16; - /* 0x18 */ u16 field_0x18[2]; - /* 0x1C */ int field_0x1c; + /* 0x18 */ u16* field_0x18; + /* 0x1C */ J3DClusterVertex* mClusterVertex; /* 0x20 */ J3DDeformer* mDeformer; }; struct J3DClusterKey {}; +class J3DDeformData { +public: + /* 8032E1F8 */ J3DDeformData(); + /* 8032E230 */ void offAllFlag(u32); + /* 8032E298 */ void deform(J3DVertexBuffer*); + /* 8032E274 */ void deform(J3DModel*); + /* 8032E364 */ void setAnm(J3DAnmCluster*); + + J3DCluster* getClusterPointer(u16 index) { + return &mClusterPointer[index]; + } + +private: + /* 0x00 */ u16 mClusterNum; + /* 0x02 */ u16 mClusterKeyNum; + /* 0x04 */ u16 mClusterVertexNum; + /* 0x08 */ J3DCluster* mClusterPointer; + /* 0x0C */ J3DClusterKey* mClusterKeyPointer; + /* 0x10 */ J3DClusterVertex* mClusterVertex; + /* 0x14 */ u16 mVtxPosNum; + /* 0x16 */ u16 mVtxNrmNum; + /* 0x18 */ f32* mVtxPos; + /* 0x1C */ f32* mVtxNrm; + /* 0x20 */ JUTNameTab* mClusterName; + /* 0x24 */ JUTNameTab* mClusterKeyName; +}; // Size: 0x28 + #endif /* J3DCLUSTER_H */ diff --git a/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h b/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h index 1844f2f15e..ac68a97489 100644 --- a/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h +++ b/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h @@ -8,29 +8,8 @@ class J3DModel; class J3DAnmCluster; - -class J3DDeformData { -public: - /* 8032E1F8 */ J3DDeformData(); - /* 8032E230 */ void offAllFlag(u32); - /* 8032E298 */ void deform(J3DVertexBuffer*); - /* 8032E274 */ void deform(J3DModel*); - /* 8032E364 */ void setAnm(J3DAnmCluster*); - -private: - /* 0x00 */ u16 mClusterNum; - /* 0x02 */ u16 mClusterKeyNum; - /* 0x04 */ u16 field_0x4; - /* 0x08 */ J3DCluster** mClusterPointer; - /* 0x0C */ J3DClusterKey** mClusterKeyPointer; - /* 0x10 */ int field_0x10; - /* 0x14 */ u16 field_0x14; - /* 0x16 */ u16 field_0x16; - /* 0x18 */ void* mVtxPos; - /* 0x1C */ void* mVtxNrm; - /* 0x20 */ int field_0x20; - /* 0x24 */ int field_0x24; -}; // Size: 0x28 +class J3DClusterVertex; +class JUTNameTab; struct J3DSkinNList { /* 8032C6E4 */ J3DSkinNList(); @@ -98,11 +77,14 @@ public: /* 8032E60C */ void deform_VtxNrmF32(J3DVertexBuffer*, J3DCluster*, J3DClusterKey*, f32*); /* 8032EBCC */ void normalizeWeight(int, f32*); + void offFlag(u32 i_flag) { mFlags &= ~i_flag; } + void setAnmCluster(J3DAnmCluster* anm) { mAnmCluster = anm; } + private: /* 0x00 */ J3DDeformData* mDeformData; /* 0x04 */ J3DAnmCluster* mAnmCluster; - /* 0x08 */ int field_0x8; - /* 0x0C */ int field_0xc; + /* 0x08 */ f32* field_0x8; + /* 0x0C */ f32* field_0xc; /* 0x10 */ u32 mFlags; }; // Size: 0x14 |
