summaryrefslogtreecommitdiff
path: root/src/JSystem/J3DGraphBase/J3DGD.cpp
diff options
context:
space:
mode:
authorJcw87 <Jcw87@users.noreply.github.com>2023-09-26 22:00:39 -0700
committerGitHub <noreply@github.com>2023-09-27 01:00:39 -0400
commit4ed4bf3bff73b461814dddf5cf2c1984a9e19eb3 (patch)
treef2eb9a6742ecffd5bbc1372fd9bbcde7b5f2f8f5 /src/JSystem/J3DGraphBase/J3DGD.cpp
parent31857a4976a74e80611b02201b19accb6963df4b (diff)
J3DMatBlock (#85)
Diffstat (limited to 'src/JSystem/J3DGraphBase/J3DGD.cpp')
-rw-r--r--src/JSystem/J3DGraphBase/J3DGD.cpp56
1 files changed, 32 insertions, 24 deletions
diff --git a/src/JSystem/J3DGraphBase/J3DGD.cpp b/src/JSystem/J3DGraphBase/J3DGD.cpp
index a383d8e0..00e7a706 100644
--- a/src/JSystem/J3DGraphBase/J3DGD.cpp
+++ b/src/JSystem/J3DGraphBase/J3DGD.cpp
@@ -7,121 +7,129 @@
#include "dolphin/types.h"
/* 802D5F38-802D60B0 .text J3DGDSetGenMode__FUcUcUcUc11_GXCullMode */
-void J3DGDSetGenMode(unsigned char, unsigned char, unsigned char, unsigned char, _GXCullMode) {
+void J3DGDSetGenMode(u8, u8, u8, u8, _GXCullMode) {
/* Nonmatching */
}
/* 802D60B0-802D6204 .text J3DGDSetGenMode_3Param__FUcUcUc */
-void J3DGDSetGenMode_3Param(unsigned char, unsigned char, unsigned char) {
+void J3DGDSetGenMode_3Param(u8, u8, u8) {
/* Nonmatching */
}
/* 802D6204-802D632C .text J3DGDSetIndTexStageNum__FUl */
-void J3DGDSetIndTexStageNum(unsigned long) {
+void J3DGDSetIndTexStageNum(u32) {
/* Nonmatching */
}
/* 802D632C-802D6624 .text J3DGDSetLightAttn__F10_GXLightIDffffff */
-void J3DGDSetLightAttn(_GXLightID, float, float, float, float, float, float) {
+void J3DGDSetLightAttn(GXLightID, f32, f32, f32, f32, f32, f32) {
/* Nonmatching */
}
/* 802D6624-802D6734 .text J3DGDSetLightColor__F10_GXLightID8_GXColor */
-void J3DGDSetLightColor(_GXLightID, _GXColor) {
+void J3DGDSetLightColor(GXLightID, GXColor) {
/* Nonmatching */
}
/* 802D6734-802D6900 .text J3DGDSetLightPos__F10_GXLightIDfff */
-void J3DGDSetLightPos(_GXLightID, float, float, float) {
+void J3DGDSetLightPos(GXLightID, f32, f32, f32) {
/* Nonmatching */
}
/* 802D6900-802D6ACC .text J3DGDSetLightDir__F10_GXLightIDfff */
-void J3DGDSetLightDir(_GXLightID, float, float, float) {
+void J3DGDSetLightDir(GXLightID, f32, f32, f32) {
/* Nonmatching */
}
/* 802D6ACC-802D702C .text J3DGDSetVtxAttrFmtv__F9_GXVtxFmtP17_GXVtxAttrFmtListb */
-void J3DGDSetVtxAttrFmtv(_GXVtxFmt, _GXVtxAttrFmtList*, bool) {
+void J3DGDSetVtxAttrFmtv(GXVtxFmt, GXVtxAttrFmtList*, bool) {
/* Nonmatching */
}
/* 802D702C-802D71FC .text J3DGDSetTexCoordGen__F13_GXTexGenType12_GXTexGenSrc */
-void J3DGDSetTexCoordGen(_GXTexGenType, _GXTexGenSrc) {
+void J3DGDSetTexCoordGen(GXTexGenType, GXTexGenSrc) {
/* Nonmatching */
}
/* 802D71FC-802D7400 .text J3DGDSetTexCoordScale2__F13_GXTexCoordIDUsUcUcUsUcUc */
-void J3DGDSetTexCoordScale2(_GXTexCoordID, unsigned short, unsigned char, unsigned char, unsigned short, unsigned char, unsigned char) {
+void J3DGDSetTexCoordScale2(GXTexCoordID, u16, u8, u8, u16, u8, u8) {
/* Nonmatching */
}
/* 802D7400-802D759C .text J3DGDSetTexLookupMode__F11_GXTexMapID14_GXTexWrapMode14_GXTexWrapMode12_GXTexFilter12_GXTexFilterfffUcUc13_GXAnisotropy */
-void J3DGDSetTexLookupMode(_GXTexMapID, _GXTexWrapMode, _GXTexWrapMode, _GXTexFilter, _GXTexFilter, float, float, float, unsigned char, unsigned char, _GXAnisotropy) {
+void J3DGDSetTexLookupMode(GXTexMapID, GXTexWrapMode, GXTexWrapMode, GXTexFilter, GXTexFilter, f32, f32, f32, u8, u8, GXAnisotropy) {
/* Nonmatching */
}
/* 802D759C-802D7644 .text J3DGDSetTexImgAttr__F11_GXTexMapIDUsUs9_GXTexFmt */
-void J3DGDSetTexImgAttr(_GXTexMapID, unsigned short, unsigned short, _GXTexFmt) {
+void J3DGDSetTexImgAttr(GXTexMapID, u16, u16, GXTexFmt) {
/* Nonmatching */
}
/* 802D7644-802D76D4 .text J3DGDSetTexImgPtr__F11_GXTexMapIDPv */
-void J3DGDSetTexImgPtr(_GXTexMapID, void*) {
+void J3DGDSetTexImgPtr(GXTexMapID, void*) {
/* Nonmatching */
}
/* 802D76D4-802D77A8 .text J3DGDSetTexImgPtrRaw__F11_GXTexMapIDUl */
-void J3DGDSetTexImgPtrRaw(_GXTexMapID, unsigned long) {
+void J3DGDSetTexImgPtrRaw(GXTexMapID, u32) {
/* Nonmatching */
}
/* 802D77A8-802D7840 .text J3DGDSetTexTlut__F11_GXTexMapIDUl10_GXTlutFmt */
-void J3DGDSetTexTlut(_GXTexMapID, unsigned long, _GXTlutFmt) {
+void J3DGDSetTexTlut(GXTexMapID, u32, GXTlutFmt) {
/* Nonmatching */
}
/* 802D7840-802D7AF8 .text J3DGDLoadTlut__FPvUl11_GXTlutSize */
-void J3DGDLoadTlut(void*, unsigned long, _GXTlutSize) {
+void J3DGDLoadTlut(void*, u32, GXTlutSize) {
/* Nonmatching */
}
/* 802D7AF8-802D7DD8 .text J3DGDSetIndTexMtx__F14_GXIndTexMtxIDPA3_fSc */
-void J3DGDSetIndTexMtx(_GXIndTexMtxID, float(*)[3], signed char) {
+void J3DGDSetIndTexMtx(GXIndTexMtxID, Mtx23, s8) {
/* Nonmatching */
}
/* 802D7DD8-802D7ED0 .text J3DGDSetIndTexCoordScale__F16_GXIndTexStageID14_GXIndTexScale14_GXIndTexScale14_GXIndTexScale14_GXIndTexScale */
-void J3DGDSetIndTexCoordScale(_GXIndTexStageID, _GXIndTexScale, _GXIndTexScale, _GXIndTexScale, _GXIndTexScale) {
+void J3DGDSetIndTexCoordScale(GXIndTexStageID, GXIndTexScale, GXIndTexScale, GXIndTexScale, GXIndTexScale) {
/* Nonmatching */
}
/* 802D7ED0-802D80D0 .text J3DGDSetIndTexOrder__FUl13_GXTexCoordID11_GXTexMapID13_GXTexCoordID11_GXTexMapID13_GXTexCoordID11_GXTexMapID13_GXTexCoordID11_GXTexMapID */
-void J3DGDSetIndTexOrder(unsigned long, _GXTexCoordID, _GXTexMapID, _GXTexCoordID, _GXTexMapID, _GXTexCoordID, _GXTexMapID, _GXTexCoordID, _GXTexMapID) {
+void J3DGDSetIndTexOrder(u32, GXTexCoordID, GXTexMapID, GXTexCoordID, GXTexMapID, GXTexCoordID, GXTexMapID, GXTexCoordID, GXTexMapID) {
/* Nonmatching */
}
/* 802D80D0-802D825C .text J3DGDSetTevOrder__F13_GXTevStageID13_GXTexCoordID11_GXTexMapID12_GXChannelID13_GXTexCoordID11_GXTexMapID12_GXChannelID */
-void J3DGDSetTevOrder(_GXTevStageID, _GXTexCoordID, _GXTexMapID, _GXChannelID, _GXTexCoordID, _GXTexMapID, _GXChannelID) {
+void J3DGDSetTevOrder(GXTevStageID stage, GXTexCoordID coord1, GXTexMapID map1, GXChannelID color1, GXTexCoordID coord2, GXTexMapID map2, GXChannelID color2) {
/* Nonmatching */
+ static u8 c2r[] = {0, 1, 0, 1, 0, 1, 7, 5, 6, 0, 0, 0, 0, 0, 0, 7};
+
+ GXTexCoordID r31 = coord1 >= 8 ? GX_TEXCOORD0 : coord1;
+ GXTexCoordID r30 = coord2 >= 8 ? GX_TEXCOORD0 : coord2;
+ GDOverflowCheck(5);
+ bool r27 = map1 != GX_TEXMAP_NULL && (map1 & GX_TEXMAP_DISABLE) == 0;
+ bool r26 = map2 != GX_TEXMAP_NULL && (map2 & GX_TEXMAP_DISABLE) == 0;
+ J3DGDWriteBPCmd((stage / 2 + 0x28) << 24 | r31 << 3 | r27 << 6 | c2r[color2 & 0xf] << 19 | r26 << 18 | r30 << 15 | (map2 & 7) << 0xc | c2r[color1 & 0xf] << 7 | r27 << 6 | r31 << 3 | map1 & 7);
}
/* 802D825C-802D83C4 .text J3DGDSetTevKColor__F14_GXTevKColorID8_GXColor */
-void J3DGDSetTevKColor(_GXTevKColorID, _GXColor) {
+void J3DGDSetTevKColor(GXTevKColorID, GXColor) {
/* Nonmatching */
}
/* 802D83C4-802D85F8 .text J3DGDSetTevColorS10__F11_GXTevRegID11_GXColorS10 */
-void J3DGDSetTevColorS10(_GXTevRegID, _GXColorS10) {
+void J3DGDSetTevColorS10(GXTevRegID, GXColorS10) {
/* Nonmatching */
}
/* 802D85F8-802D895C .text J3DGDSetFog__F10_GXFogTypeffff8_GXColor */
-void J3DGDSetFog(_GXFogType, float, float, float, float, _GXColor) {
+void J3DGDSetFog(GXFogType, f32, f32, f32, f32, GXColor) {
/* Nonmatching */
}
/* 802D895C-802D8AA8 .text J3DGDSetFogRangeAdj__FUcUsP14_GXFogAdjTable */
-void J3DGDSetFogRangeAdj(unsigned char, unsigned short, _GXFogAdjTable*) {
+void J3DGDSetFogRangeAdj(u8, u16, GXFogAdjTable*) {
/* Nonmatching */
}