summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2022-04-23 18:58:35 -0700
committerJasper St. Pierre <jstpierre@mecheye.net>2022-04-24 01:57:06 -0700
commit2358fd042d3bf4d55294d63c1f72cf23003ee6b4 (patch)
treebc3868feac3736d4a9f2c72a909623f2538f4c14 /include
parentd954f9348c58321ed5d502a728f10e09bccc0a3e (diff)
J3DShape: OK progress
Diffstat (limited to 'include')
-rw-r--r--include/JSystem/J3DGraphBase/J3DShape.h4
-rw-r--r--include/JSystem/J3DGraphBase/J3DVertex.h16
-rw-r--r--include/dolphin/gd/GDBase.h10
-rw-r--r--include/dolphin/gd/GDGeometry.h9
-rw-r--r--include/dolphin/gx/GX.h7
5 files changed, 35 insertions, 11 deletions
diff --git a/include/JSystem/J3DGraphBase/J3DShape.h b/include/JSystem/J3DGraphBase/J3DShape.h
index b0576077c0..b37f074849 100644
--- a/include/JSystem/J3DGraphBase/J3DShape.h
+++ b/include/JSystem/J3DGraphBase/J3DShape.h
@@ -56,7 +56,7 @@ public:
void setDrawMtxDataPointer(J3DDrawMtxData* pMtxData) { mDrawMtxData = pMtxData; }
void setVertexDataPointer(J3DVertexData* pVtxData) { mVertexData = pVtxData; }
void* getVcdVatCmd() const { return mVcdVatCmd; }
- void setVcdVatCmd(void* pVatCmd) { mVcdVatCmd = pVatCmd; }
+ void setVcdVatCmd(void* pVatCmd) { mVcdVatCmd = (u8*)pVatCmd; }
void show() { offFlag(J3DShpFlag_Visible); }
void hide() { onFlag(J3DShpFlag_Visible); }
void setCurrentViewNoPtr(u32* pViewNoPtr) { mCurrentViewNo = pViewNoPtr; }
@@ -81,7 +81,7 @@ private:
/* 0x10 */ f32 mRadius;
/* 0x14 */ Vec mMin;
/* 0x20 */ Vec mMax;
- /* 0x2C */ void* mVcdVatCmd;
+ /* 0x2C */ u8* mVcdVatCmd;
/* 0x30 */ GXVtxDescList* mVtxDesc;
/* 0x34 */ bool mHasNBT;
/* 0x38 */ J3DShapeMtx** mShapeMtx;
diff --git a/include/JSystem/J3DGraphBase/J3DVertex.h b/include/JSystem/J3DGraphBase/J3DVertex.h
index 87e50c9276..360e4a0cea 100644
--- a/include/JSystem/J3DGraphBase/J3DVertex.h
+++ b/include/JSystem/J3DGraphBase/J3DVertex.h
@@ -30,22 +30,24 @@ public:
u32 getVtxNum() const { return mVtxNum; }
+ GXVtxAttrFmtList* getVtxAttrFmtList() { return mVtxAttrFmtList; }
+
private:
/* 0x00 */ u32 mVtxNum;
/* 0x04 */ u32 mNrmNum;
/* 0x08 */ u32 mColNum;
/* 0x0C */ u32 field_0xc;
/* 0x10 */ u32 field_0x10;
- /* 0x14 */ void* mVtxAttrFmtList;
+ /* 0x14 */ GXVtxAttrFmtList* mVtxAttrFmtList;
/* 0x18 */ void* mVtxPosArray;
/* 0x1C */ void* mVtxNrmArray;
/* 0x20 */ void* mVtxNBTArray;
- /* 0x24 */ _GXColor* mVtxColorArray[2];
+ /* 0x24 */ GXColor* mVtxColorArray[2];
/* 0x2C */ void* mVtxTexCoordArray[8];
/* 0x4C */ u8 mVtxPosFrac;
- /* 0x50 */ _GXCompType mVtxPosType;
+ /* 0x50 */ GXCompType mVtxPosType;
/* 0x54 */ u8 mVtxNrmFrac;
- /* 0x58 */ _GXCompType mVtxNrmType;
+ /* 0x58 */ GXCompType mVtxNrmType;
};
class J3DVertexBuffer {
@@ -64,7 +66,7 @@ public:
void setCurrentVtxNrm(void* pVtxNrm) { mCurrentVtxNrm = pVtxNrm; }
- void setCurrentVtxCol(_GXColor* pVtxCol) { mCurrentVtxCol = pVtxCol; }
+ void setCurrentVtxCol(GXColor* pVtxCol) { mCurrentVtxCol = pVtxCol; }
void frameInit() {
setCurrentVtxPos(mVtxPosArray[0]);
@@ -76,12 +78,12 @@ private:
/* 0x00 */ J3DVertexData* mVtxData;
/* 0x04 */ void* mVtxPosArray[2];
/* 0x0C */ void* mVtxNrmArray[2];
- /* 0x14 */ _GXColor* mVtxColArray[2];
+ /* 0x14 */ GXColor* mVtxColArray[2];
/* 0x1C */ void* mTransformedVtxPosArray[2];
/* 0x24 */ void* mTransformedVtxNrmArray[2];
/* 0x2C */ void* mCurrentVtxPos;
/* 0x30 */ void* mCurrentVtxNrm;
- /* 0x34 */ _GXColor* mCurrentVtxCol;
+ /* 0x34 */ GXColor* mCurrentVtxCol;
}; // Size: 0x38
struct VertexNormal {
diff --git a/include/dolphin/gd/GDBase.h b/include/dolphin/gd/GDBase.h
index ef685d3519..121f2f6ce9 100644
--- a/include/dolphin/gd/GDBase.h
+++ b/include/dolphin/gd/GDBase.h
@@ -10,8 +10,6 @@ struct GDLObj {
/* 0xC */ u8* end;
}; // Size: 0x10
-extern "C" void GDInitGDLObj(GDLObj*, u8*, u32);
-
extern GDLObj* __GDCurrentDL;
inline void GDSetCurrent(GDLObj* obj) {
@@ -22,4 +20,12 @@ inline u32 GDGetGDLObjOffset(GDLObj* obj) {
return (u32)(obj->ptr - obj->start);
}
+extern "C" {
+
+void GDInitGDLObj(GDLObj*, u8*, u32);
+void GDFlushCurrToMem();
+void GDPadCurr32();
+
+}
+
#endif /* GDBASE_H */
diff --git a/include/dolphin/gd/GDGeometry.h b/include/dolphin/gd/GDGeometry.h
index 3737290c3d..e3f59751a2 100644
--- a/include/dolphin/gd/GDGeometry.h
+++ b/include/dolphin/gd/GDGeometry.h
@@ -2,5 +2,14 @@
#define GDGEOMETRY_H
#include "dolphin/types.h"
+#include "dolphin/gx/GX.h"
+
+extern "C" {
+
+void GDSetVtxDescv(GXVtxDescList*);
+void GDSetArray(GXAttr attr, const void* data, u8 stride);
+void GDSetArrayRaw(GXAttr attr, u32 data, u8 stride);
+
+}
#endif /* GDGEOMETRY_H */
diff --git a/include/dolphin/gx/GX.h b/include/dolphin/gx/GX.h
index 82d40d0ce2..76866d250c 100644
--- a/include/dolphin/gx/GX.h
+++ b/include/dolphin/gx/GX.h
@@ -85,6 +85,13 @@ 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,