diff options
| author | Jasper St. Pierre <jstpierre@mecheye.net> | 2022-04-24 01:25:34 -0700 |
|---|---|---|
| committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2022-04-24 01:57:11 -0700 |
| commit | 9bee853ab45970c60019df74f4be1f282bb90bb4 (patch) | |
| tree | 7cd642e8613edce4c82b6c05cc8a9ad9929cb30a /include | |
| parent | f1f9cc713d57df482fc8ea1ec6b73a928f088d21 (diff) | |
J3DShape / J3DShapeDraw: More OK
Diffstat (limited to 'include')
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DShape.h | 3 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DShapeDraw.h | 5 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DVertex.h | 14 | ||||
| -rw-r--r-- | include/dolphin/gx/GX.h | 14 |
4 files changed, 22 insertions, 14 deletions
diff --git a/include/JSystem/J3DGraphBase/J3DShape.h b/include/JSystem/J3DGraphBase/J3DShape.h index 5bac7d8ddf..866dbe34e5 100644 --- a/include/JSystem/J3DGraphBase/J3DShape.h +++ b/include/JSystem/J3DGraphBase/J3DShape.h @@ -90,6 +90,9 @@ public: inline J3DMaterial* getMaterial() const { return mMaterial; } inline u32 getPipeline() const { return (mFlags >> 2) & 0x07; } inline u32 getTexMtxLoadType() const { return mFlags & 0xF000; } + inline u32 getMtxGroupNum() const { return mMtxGroupNum; } + inline J3DShapeDraw* getShapeDraw(u32 idx) const { return mShapeDraw[idx]; } + inline J3DShapeMtx* getShapeMtx(u32 idx) const { return mShapeMtx[idx]; } static void resetVcdVatCache() { sOldVcdVatCmd = NULL; } static void* sOldVcdVatCmd; diff --git a/include/JSystem/J3DGraphBase/J3DShapeDraw.h b/include/JSystem/J3DGraphBase/J3DShapeDraw.h index 8caf151850..8ad82a0c3d 100644 --- a/include/JSystem/J3DGraphBase/J3DShapeDraw.h +++ b/include/JSystem/J3DGraphBase/J3DShapeDraw.h @@ -5,13 +5,16 @@ class J3DShapeDraw { public: - /* 80314924 */ void countVertex(u32); + /* 80314924 */ u32 countVertex(u32); /* 80314974 */ void addTexMtxIndexInDL(u32, u32, u32); /* 80314ABC */ J3DShapeDraw(u8 const*, u32); /* 80314AD4 */ void draw() const; /* 80314B00 */ virtual ~J3DShapeDraw(); + u8* getDisplayList() const { return (u8*)mDisplayList; } + u32 getDisplayListSize() const { return mDisplayListSize; } + private: /* 0x04 */ u32 mDisplayListSize; /* 0x08 */ void* mDisplayList; diff --git a/include/JSystem/J3DGraphBase/J3DVertex.h b/include/JSystem/J3DGraphBase/J3DVertex.h index 360e4a0cea..567a41ebe0 100644 --- a/include/JSystem/J3DGraphBase/J3DVertex.h +++ b/include/JSystem/J3DGraphBase/J3DVertex.h @@ -21,17 +21,19 @@ public: J3DVertexData(); void* getVtxPosArray() const { return mVtxPosArray; } - void* getVtxNrmArray() const { return mVtxNrmArray; } - - _GXColor* getVtxColorArray(u8 idx) const { return mVtxColorArray[idx]; } - + GXColor* getVtxColorArray(u8 idx) const { return mVtxColorArray[idx]; } + void* getVtxTexCoordArray(u8 idx) const { return mVtxTexCoordArray[idx]; } + void* getVtxNBTArray() const { return mVtxNBTArray; } u32 getNrmNum() const { return mNrmNum; } - u32 getVtxNum() const { return mVtxNum; } - GXVtxAttrFmtList* getVtxAttrFmtList() { return mVtxAttrFmtList; } + void setVtxPosFrac(u8 frac) { mVtxPosFrac = frac; } + void setVtxPosType(GXCompType type) { mVtxPosType = type; } + void setVtxNrmFrac(u8 frac) { mVtxNrmFrac = frac; } + void setVtxNrmType(GXCompType type) { mVtxNrmType = type; } + private: /* 0x00 */ u32 mVtxNum; /* 0x04 */ u32 mNrmNum; diff --git a/include/dolphin/gx/GX.h b/include/dolphin/gx/GX.h index baceefa1e8..1951f2bd43 100644 --- a/include/dolphin/gx/GX.h +++ b/include/dolphin/gx/GX.h @@ -85,13 +85,6 @@ typedef struct _GXTexRegion { /* 0x00 */ u8 dummy[0x10]; } GXTexRegion; // Size: 0x10 -typedef struct _GXVtxAttrFmtList { - /* 0x00 */ u32 mAttrib; // GXAttr - /* 0x04 */ u32 mCompCnt; // GXCompCnt - /* 0x08 */ u32 mCompType; // GXCompType - /* 0x0C */ u8 mCompShift; -} GXVtxAttrFmtList; // Size: 0x10 - typedef enum _GXPrimitive { /* 0x80 */ GX_QUADS = 0x80, /* 0x90 */ GX_TRIANGLES = 0x90, @@ -830,6 +823,13 @@ typedef struct _GXVtxDescList { /* 0x4 */ GXAttrType type; } GXVtxDescList; // Size: 0x08 +typedef struct _GXVtxAttrFmtList { + /* 0x00 */ GXAttr mAttrib; + /* 0x04 */ GXCompCnt mCompCnt; + /* 0x08 */ GXCompType mCompType; + /* 0x0C */ u8 mCompShift; +} GXVtxAttrFmtList; // Size: 0x10 + typedef enum _GXFBClamp { /* 0x0 */ GX_CLAMP_NONE, /* 0x1 */ GX_CLAMP_TOP, |
