diff options
Diffstat (limited to 'libs/JSystem/J3DGraphBase/J3DGD.cpp')
| -rw-r--r-- | libs/JSystem/J3DGraphBase/J3DGD.cpp | 226 |
1 files changed, 108 insertions, 118 deletions
diff --git a/libs/JSystem/J3DGraphBase/J3DGD.cpp b/libs/JSystem/J3DGraphBase/J3DGD.cpp index 927cd214c1..7f65db79a5 100644 --- a/libs/JSystem/J3DGraphBase/J3DGD.cpp +++ b/libs/JSystem/J3DGraphBase/J3DGD.cpp @@ -5,6 +5,7 @@ #include "JSystem/J3DGraphBase/J3DGD.h"
#include "dol2asm.h"
+#include "dolphin/gd.h"
#include "dolphin/os.h"
//
@@ -74,8 +75,8 @@ void J3DGDSetGenMode(u8 texGenNum, u8 colorChanNum, u8 tevStageNum, u8 indTexSta GDOverflowCheck(0xa);
J3DGDWriteBPCmd(0xfe07fc3f);
static u8 cm2hw[4] = {0, 2, 1, 3};
- J3DGDWriteBPCmd(texGenNum | colorChanNum << 4 | (tevStageNum - 1) << 0xa
- | cm2hw[cullMode] << 0xe | indTexStageNum << 0x10);
+ J3DGDWriteBPCmd(texGenNum | colorChanNum << 4 | (tevStageNum - 1) << 0xa |
+ cm2hw[cullMode] << 0xe | indTexStageNum << 0x10);
}
/* 8030D210-8030D364 307B50 0154+00 0/0 1/1 0/0 .text J3DGDSetGenMode_3Param__FUcUcUc */
@@ -86,48 +87,40 @@ void J3DGDSetGenMode_3Param(u8 texGenNum, u8 tevStageNum, u8 indTexStageNum) { }
/* 8030D364-8030D65C 307CA4 02F8+00 0/0 1/1 0/0 .text J3DGDSetLightAttn__F10_GXLightIDffffff */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void J3DGDSetLightAttn(_GXLightID param_0, f32 param_1, f32 param_2, f32 param_3, f32 param_4,
- f32 param_5, f32 param_6) {
- nofralloc
-#include "asm/JSystem/J3DGraphBase/J3DGD/J3DGDSetLightAttn__F10_GXLightIDffffff.s"
+void J3DGDSetLightAttn(GXLightID id, f32 a0, f32 a1, f32 a2, f32 k0, f32 k1, f32 k2) {
+ J3DGDWriteXFCmdHdr(0x0604 + __GDLightID2Offset(id), 6);
+ J3DGDWrite_f32(a0);
+ J3DGDWrite_f32(a1);
+ J3DGDWrite_f32(a2);
+ J3DGDWrite_f32(k0);
+ J3DGDWrite_f32(k1);
+ J3DGDWrite_f32(k2);
}
-#pragma pop
/* 8030D65C-8030D76C 307F9C 0110+00 0/0 1/1 0/0 .text J3DGDSetLightColor__F10_GXLightID8_GXColor
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void J3DGDSetLightColor(_GXLightID param_0, _GXColor param_1) {
- nofralloc
-#include "asm/JSystem/J3DGraphBase/J3DGD/J3DGDSetLightColor__F10_GXLightID8_GXColor.s"
+void J3DGDSetLightColor(GXLightID id, GXColor color) {
+ J3DGDWriteXFCmd(0x0603 + __GDLightID2Offset(id),
+ (color.r << 24) | (color.g << 16) | (color.b << 8) | (color.a << 0));
}
-#pragma pop
/* 8030D76C-8030D938 3080AC 01CC+00 0/0 1/1 0/0 .text J3DGDSetLightPos__F10_GXLightIDfff
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void J3DGDSetLightPos(_GXLightID param_0, f32 param_1, f32 param_2, f32 param_3) {
- nofralloc
-#include "asm/JSystem/J3DGraphBase/J3DGD/J3DGDSetLightPos__F10_GXLightIDfff.s"
+void J3DGDSetLightPos(GXLightID id, f32 x, f32 y, f32 z) {
+ J3DGDWriteXFCmdHdr(0x060A + __GDLightID2Offset(id), 3);
+ J3DGDWrite_f32(x);
+ J3DGDWrite_f32(y);
+ J3DGDWrite_f32(z);
}
-#pragma pop
/* 8030D938-8030DB04 308278 01CC+00 0/0 1/1 0/0 .text J3DGDSetLightDir__F10_GXLightIDfff
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void J3DGDSetLightDir(_GXLightID param_0, f32 param_1, f32 param_2, f32 param_3) {
- nofralloc
-#include "asm/JSystem/J3DGraphBase/J3DGD/J3DGDSetLightDir__F10_GXLightIDfff.s"
+void J3DGDSetLightDir(GXLightID id, f32 x, f32 y, f32 z) {
+ J3DGDWriteXFCmdHdr(0x060D + __GDLightID2Offset(id), 3);
+ J3DGDWrite_f32(x);
+ J3DGDWrite_f32(y);
+ J3DGDWrite_f32(z);
}
-#pragma pop
/* 8030DB04-8030E064 308444 0560+00 1/0 1/1 0/0 .text
* J3DGDSetVtxAttrFmtv__F9_GXVtxFmtPC17_GXVtxAttrFmtListb */
@@ -239,17 +232,19 @@ void J3DGDSetVtxAttrFmtv(GXVtxFmt fmt, GXVtxAttrFmtList const* fmtList, bool par }
}
GDOverflowCheck(0x12);
- J3DGDWriteCPCmd(GX_CP_REG_VAT_GRP0 + fmt, pos_cnt | pos_type << 1 | pos_shift << 4
- | nrm_cnt << 9 | nrm_type << 0xa | clr0_cnt << 0xd | clr0_type << 0xe | clr1_cnt << 0x11
- | clr1_type << 0x12 | tex0_cnt << 0x15 | tex0_type << 0x16 | tex0_shift << 0x19
- | 0x40000000 | local_34 << 0x1f);
- J3DGDWriteCPCmd(GX_CP_REG_VAT_GRP1 + fmt, tex1_cnt | tex1_type << 1 | tex1_shift << 4
- | tex2_cnt << 9 | tex2_type << 0xa | tex2_shift << 0xd | tex3_cnt << 0x12
- | tex3_type << 0x13 | tex3_shift << 0x16 | tex4_cnt << 0x1b | tex4_type << 0x1c
- | 0x80000000);
- J3DGDWriteCPCmd(GX_CP_REG_VAT_GRP2 + fmt, tex4_shift | tex5_cnt << 5 | tex5_type << 6
- | tex5_shift << 9 | tex6_cnt << 0xe | tex6_type << 0xf | tex6_shift << 0x12
- | tex7_cnt << 0x17 | tex7_type << 0x18 | tex7_shift << 0x1b);
+ J3DGDWriteCPCmd(GX_CP_REG_VAT_GRP0 + fmt,
+ pos_cnt | pos_type << 1 | pos_shift << 4 | nrm_cnt << 9 | nrm_type << 0xa |
+ clr0_cnt << 0xd | clr0_type << 0xe | clr1_cnt << 0x11 | clr1_type << 0x12 |
+ tex0_cnt << 0x15 | tex0_type << 0x16 | tex0_shift << 0x19 | 0x40000000 |
+ local_34 << 0x1f);
+ J3DGDWriteCPCmd(GX_CP_REG_VAT_GRP1 + fmt,
+ tex1_cnt | tex1_type << 1 | tex1_shift << 4 | tex2_cnt << 9 | tex2_type << 0xa |
+ tex2_shift << 0xd | tex3_cnt << 0x12 | tex3_type << 0x13 |
+ tex3_shift << 0x16 | tex4_cnt << 0x1b | tex4_type << 0x1c | 0x80000000);
+ J3DGDWriteCPCmd(GX_CP_REG_VAT_GRP2 + fmt,
+ tex4_shift | tex5_cnt << 5 | tex5_type << 6 | tex5_shift << 9 |
+ tex6_cnt << 0xe | tex6_type << 0xf | tex6_shift << 0x12 | tex7_cnt << 0x17 |
+ tex7_type << 0x18 | tex7_shift << 0x1b);
}
/* 8030E064-8030E234 3089A4 01D0+00 1/0 1/1 0/0 .text
@@ -358,23 +353,22 @@ void J3DGDSetTexCoordGen(GXTexGenType texGenType, GXTexGenSrc texGenSrc) { break;
}
J3DGDWrite_u32(
- proj_type << (31 - GX_XF_TEX_PROJTYPE_END)
- | input_form << (31 - GX_XF_TEX_INPUTFORM_END)
- | texgen_type << (31 - GX_XF_TEX_TEXGENTYPE_END)
- | src_row << (31 - GX_XF_TEX_SRCROW_END)
- | bump_src_tex << (31 - GX_XF_TEX_BUMPSRCTEX_END)
- | bump_src_light << (31 - GX_XF_TEX_BUMPSRCLIGHT_END)
- );
+ proj_type << (31 - GX_XF_TEX_PROJTYPE_END) | input_form << (31 - GX_XF_TEX_INPUTFORM_END) |
+ texgen_type << (31 - GX_XF_TEX_TEXGENTYPE_END) | src_row << (31 - GX_XF_TEX_SRCROW_END) |
+ bump_src_tex << (31 - GX_XF_TEX_BUMPSRCTEX_END) |
+ bump_src_light << (31 - GX_XF_TEX_BUMPSRCLIGHT_END));
}
/* 8030E234-8030E438 308B74 0204+00 0/0 16/16 0/0 .text
* J3DGDSetTexCoordScale2__F13_GXTexCoordIDUsUcUcUsUcUc */
-void J3DGDSetTexCoordScale2(GXTexCoordID param_0, u16 param_1, u8 param_2, u8 param_3,
- u16 param_4, u8 param_5, u8 param_6) {
+void J3DGDSetTexCoordScale2(GXTexCoordID param_0, u16 param_1, u8 param_2, u8 param_3, u16 param_4,
+ u8 param_5, u8 param_6) {
GDOverflowCheck(0xf);
J3DGDWriteBPCmd(0xfe03ffff);
- J3DGDWriteBPCmd((param_1 - 1) | param_2 << 0x10 | param_3 << 0x11 | (param_0 * 2 + 0x30) << 0x18);
- J3DGDWriteBPCmd((param_4 - 1) | param_5 << 0x10 | param_6 << 0x11 | (param_0 * 2 + 0x31) << 0x18);
+ J3DGDWriteBPCmd((param_1 - 1) | param_2 << 0x10 | param_3 << 0x11 |
+ (param_0 * 2 + 0x30) << 0x18);
+ J3DGDWriteBPCmd((param_4 - 1) | param_5 << 0x10 | param_6 << 0x11 |
+ (param_0 * 2 + 0x31) << 0x18);
}
/* 8045090C-80450914 00038C 0008+00 1/1 0/0 0/0 .sdata J3DGDTexMode0Ids */
@@ -413,18 +407,19 @@ static u8 GX2HWFiltConv[6] = { void J3DGDSetTexLookupMode(GXTexMapID param_0, GXTexWrapMode param_1, GXTexWrapMode param_2,
GXTexFilter param_3, GXTexFilter param_4, f32 param_5, f32 param_6,
f32 param_7, u8 param_8, u8 param_9, GXAnisotropy param_10) {
- J3DGDWriteBPCmd(param_1 | param_2 << 2 | (param_4 == GX_LINEAR) << 4
- | GX2HWFiltConv[param_3] << 5 | (param_9 == 0) << 8 | ((int)(param_7 * 32.0f) & 0xff) << 9
- | param_10 << 0x13 | param_8 << 0x15 | J3DGDTexMode0Ids[param_0] << 0x18);
- J3DGDWriteBPCmd(((int)(param_5 * 16.0f) & 0xff) | ((int)(param_6 * 16.0f) & 0xff) << 8
- | J3DGDTexMode1Ids[param_0] << 0x18);
+ J3DGDWriteBPCmd(param_1 | param_2 << 2 | (param_4 == GX_LINEAR) << 4 |
+ GX2HWFiltConv[param_3] << 5 | (param_9 == 0) << 8 |
+ ((int)(param_7 * 32.0f) & 0xff) << 9 | param_10 << 0x13 | param_8 << 0x15 |
+ J3DGDTexMode0Ids[param_0] << 0x18);
+ J3DGDWriteBPCmd(((int)(param_5 * 16.0f) & 0xff) | ((int)(param_6 * 16.0f) & 0xff) << 8 |
+ J3DGDTexMode1Ids[param_0] << 0x18);
}
/* 8030E5D4-8030E67C 308F14 00A8+00 0/0 1/1 0/0 .text
* J3DGDSetTexImgAttr__F11_GXTexMapIDUsUs9_GXTexFmt */
void J3DGDSetTexImgAttr(GXTexMapID param_0, u16 param_1, u16 param_2, GXTexFmt param_3) {
- J3DGDWriteBPCmd((param_1 - 1) | (param_2 - 1) << 0xa | param_3 << 0x14
- | J3DGDTexImage0Ids[param_0] << 0x18);
+ J3DGDWriteBPCmd((param_1 - 1) | (param_2 - 1) << 0xa | param_3 << 0x14 |
+ J3DGDTexImage0Ids[param_0] << 0x18);
}
/* 8030E67C-8030E70C 308FBC 0090+00 0/0 1/1 0/0 .text J3DGDSetTexImgPtr__F11_GXTexMapIDPv
@@ -456,58 +451,53 @@ void J3DGDLoadTlut(void* param_0, u32 param_1, GXTlutSize param_2) { J3DGDWriteBPCmd(0x0f000000);
}
-/* ############################################################################################## */
-/* 80456330-80456334 004930 0004+00 1/1 0/0 0/0 .sdata2 @1233 */
-SECTION_SDATA2 static f32 lit_1233 = 1024.0f;
-
/* 8030EB30-8030EE10 309470 02E0+00 0/0 2/2 0/0 .text J3DGDSetIndTexMtx__F14_GXIndTexMtxIDPA3_fSc
*/
-#ifdef NONMATCHING
-void J3DGDSetIndTexMtx(GXIndTexMtxID mtxID, Mtx3P mtx, s8 param_2) {
+void J3DGDSetIndTexMtx(GXIndTexMtxID id, Mtx3P mtx, s8 exp) {
+ s32 mtx32[6];
u32 idx;
- switch (mtxID) {
+
+ switch (id) {
case GX_ITM_0:
case GX_ITM_1:
case GX_ITM_2:
- idx = mtxID - GX_ITM_0;
+ idx = (u32)(id - GX_ITM_0);
break;
case GX_ITM_S0:
case GX_ITM_S1:
case GX_ITM_S2:
- idx = mtxID - GX_ITM_S0;
+ idx = (u32)(id - GX_ITM_S0);
break;
case GX_ITM_T0:
case GX_ITM_T1:
case GX_ITM_T2:
- idx = mtxID - GX_ITM_T0;
+ idx = (u32)(id - GX_ITM_T0);
break;
- case GX_ITM_3:
- case GX_ITM_S3:
default:
idx = 0;
break;
}
- u32 m00 = (int)(mtx[0][0] * 1024.0f) & 0x7ff;
- u32 m10 = (int)(mtx[1][0] * 1024.0f) & 0x7ff;
- u32 m01 = (int)(mtx[0][1] * 1024.0f) & 0x7ff;
- u32 m11 = (int)(mtx[1][1] * 1024.0f) & 0x7ff;
- u32 m02 = (int)(mtx[0][2] * 1024.0f) & 0x7ff;
- u32 m12 = (int)(mtx[1][2] * 1024.0f) & 0x7ff;
- GDOverflowCheck(0xf);
- J3DGDWriteBPCmd(m00 | m10 << 0xb | ((param_2 + 0x11) & 3) << 0x16 | (idx * 3 + GX_BP_REG_INDMTX0A) << 0x18);
- J3DGDWriteBPCmd(m01 | m11 << 0xb | ((param_2 + 0x11) >> 2 & 3) << 0x16 | (idx * 3 + GX_BP_REG_INDMTX0B) << 0x18);
- J3DGDWriteBPCmd(m02 | m12 << 0xb | ((param_2 + 0x11) >> 4 & 3) << 0x16 | (idx * 3 + GX_BP_REG_INDMTX0C) << 0x18);
-}
-#else
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void J3DGDSetIndTexMtx(_GXIndTexMtxID param_0, f32 (*param_1)[3], s8 param_2) {
- nofralloc
-#include "asm/JSystem/J3DGraphBase/J3DGD/J3DGDSetIndTexMtx__F14_GXIndTexMtxIDPA3_fSc.s"
+
+ exp += 17;
+
+ mtx32[0] = (s32)(mtx[0][0] * 1024.0f) & 0x7FF;
+ mtx32[1] = (s32)(mtx[1][0] * 1024.0f) & 0x7FF;
+
+ mtx32[2] = (s32)(mtx[0][1] * 1024.0f) & 0x7FF;
+ mtx32[3] = (s32)(mtx[1][1] * 1024.0f) & 0x7FF;
+
+ mtx32[4] = (s32)(mtx[0][2] * 1024.0f) & 0x7FF;
+ mtx32[5] = (s32)(mtx[1][2] * 1024.0f) & 0x7FF;
+
+ GDOverflowCheck(15);
+
+ J3DGDWriteBPCmd((mtx32[0] << 0) | (mtx32[1] << 11) | (((exp >> 0) & 0x03) << 22) |
+ (0x06 + idx * 3) << 24);
+ J3DGDWriteBPCmd((mtx32[2] << 0) | (mtx32[3] << 11) | (((exp >> 2) & 0x03) << 22) |
+ (0x07 + idx * 3) << 24);
+ J3DGDWriteBPCmd((mtx32[4] << 0) | (mtx32[5] << 11) | (((exp >> 4) & 0x03) << 22) |
+ (0x08 + idx * 3) << 24);
}
-#pragma pop
-#endif
/* 8030EE10-8030EF08 309750 00F8+00 0/0 2/2 0/0 .text
* J3DGDSetIndTexCoordScale__F16_GXIndTexStageID14_GXIndTexScale14_GXIndTexScale14_GXIndTexScale14_GXIndTexScale
@@ -515,20 +505,20 @@ asm void J3DGDSetIndTexMtx(_GXIndTexMtxID param_0, f32 (*param_1)[3], s8 param_2 void J3DGDSetIndTexCoordScale(GXIndTexStageID stage, GXIndTexScale scale0, GXIndTexScale scale1,
GXIndTexScale scale2, GXIndTexScale scale3) {
GDOverflowCheck(5);
- J3DGDWriteBPCmd(scale0 | scale1 << 4 | scale2 << 8 | scale3 << 0xc
- | ((stage >> 1) + GX_BP_REG_RAS1_SS0) << 0x18);
+ J3DGDWriteBPCmd(scale0 | scale1 << 4 | scale2 << 8 | scale3 << 0xc |
+ ((stage >> 1) + GX_BP_REG_RAS1_SS0) << 0x18);
}
/* 8030EF08-8030F108 309848 0200+00 0/0 2/2 0/0 .text
* J3DGDSetIndTexOrder__FUl13_GXTexCoordID11_GXTexMapID13_GXTexCoordID11_GXTexMapID13_GXTexCoordID11_GXTexMapID13_GXTexCoordID11_GXTexMapID
*/
-void J3DGDSetIndTexOrder(u32 count, GXTexCoordID coord0, GXTexMapID map0,
- GXTexCoordID coord1, GXTexMapID map1, GXTexCoordID coord2,
- GXTexMapID map2, GXTexCoordID coord3, GXTexMapID map3) {
+void J3DGDSetIndTexOrder(u32 count, GXTexCoordID coord0, GXTexMapID map0, GXTexCoordID coord1,
+ GXTexMapID map1, GXTexCoordID coord2, GXTexMapID map2, GXTexCoordID coord3,
+ GXTexMapID map3) {
GDOverflowCheck(0xa);
- J3DGDWriteBPCmd(map0 & 7 | (coord0 & 7) << 3 | (map1 & 7) << 6 | (coord1 & 7) << 9
- | (map2 & 7) << 0xc | (coord2 & 7) << 0xf | (map3 & 7) << 0x12 | (coord3 & 7) << 0x15
- | GX_BP_REG_RAS1_IREF << 0x18);
+ J3DGDWriteBPCmd(map0 & 7 | (coord0 & 7) << 3 | (map1 & 7) << 6 | (coord1 & 7) << 9 |
+ (map2 & 7) << 0xc | (coord2 & 7) << 0xf | (map3 & 7) << 0x12 |
+ (coord3 & 7) << 0x15 | GX_BP_REG_RAS1_IREF << 0x18);
u32 imask = 0;
for (u32 i = 0; i < count; i++) {
switch (i) {
@@ -559,12 +549,12 @@ void J3DGDSetTevOrder(GXTevStageID stage, GXTexCoordID coord0, GXTexMapID map0, coord1 = coord1 >= GX_MAXCOORD ? GX_TEXCOORD0 : coord1;
GDOverflowCheck(5);
static u8 c2r[32] = {0, 1, 0, 1, 0, 1, 7, 5, 6, 0, 0, 0, 0, 0, 0, 7,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
- J3DGDWriteBPCmd((map0 & 7) | coord0 << 3
- | (map0 != GX_TEXMAP_NULL && !(map0 & GX_TEXMAP_DISABLE)) << 6 | c2r[channel0 & 0xf] << 7
- | (map1 & 7) << 0xc | coord1 << 0xf
- | (map1 != GX_TEXMAP_NULL && !(map1 & GX_TEXMAP_DISABLE)) << 0x12
- | c2r[channel1 & 0xf] << 0x13 | (stage / 2 + GX_BP_REG_RAS1_TREF0) << 0x18);
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ J3DGDWriteBPCmd((map0 & 7) | coord0 << 3 |
+ (map0 != GX_TEXMAP_NULL && !(map0 & GX_TEXMAP_DISABLE)) << 6 |
+ c2r[channel0 & 0xf] << 7 | (map1 & 7) << 0xc | coord1 << 0xf |
+ (map1 != GX_TEXMAP_NULL && !(map1 & GX_TEXMAP_DISABLE)) << 0x12 |
+ c2r[channel1 & 0xf] << 0x13 | (stage / 2 + GX_BP_REG_RAS1_TREF0) << 0x18);
}
/* 8030F294-8030F3FC 309BD4 0168+00 0/0 11/11 0/0 .text
@@ -580,10 +570,10 @@ void J3DGDSetTevKColor(GXTevKColorID id, GXColor color) { /* 8030F3FC-8030F630 309D3C 0234+00 0/0 11/11 0/0 .text
* J3DGDSetTevColorS10__F11_GXTevRegID11_GXColorS10 */
void J3DGDSetTevColorS10(GXTevRegID id, GXColorS10 color) {
- u32 cmd0 = (color.r & 0x7ff) | (color.a & 0x7ff) << 0xc
- | (id * 2 + GX_BP_REG_TEVREG0LO) << 0x18;
- u32 cmd1 = (color.b & 0x7ff) | (color.g & 0x7ff) << 0xc
- | (id * 2 + GX_BP_REG_TEVREG0HI) << 0x18;
+ u32 cmd0 =
+ (color.r & 0x7ff) | (color.a & 0x7ff) << 0xc | (id * 2 + GX_BP_REG_TEVREG0LO) << 0x18;
+ u32 cmd1 =
+ (color.b & 0x7ff) | (color.g & 0x7ff) << 0xc | (id * 2 + GX_BP_REG_TEVREG0HI) << 0x18;
GDOverflowCheck(0x14);
J3DGDWriteBPCmd(cmd0);
J3DGDWriteBPCmd(cmd1);
@@ -626,8 +616,8 @@ void J3DGDSetFog(GXFogType fogType, f32 param_1, f32 param_2, f32 nearZ, f32 far void J3DGDSetFogRangeAdj(u8 param_0, u16 param_1, GXFogAdjTable* table) {
if (param_0 != 0) {
for (int i = 0; i < 0xa; i += 2) {
- J3DGDWriteBPCmd((i / 2 + GX_BP_REG_FOGRANGEK0) << 0x18
- | table->fogVals[i + 1] << 0xc | table->fogVals[i]);
+ J3DGDWriteBPCmd((i / 2 + GX_BP_REG_FOGRANGEK0) << 0x18 | table->fogVals[i + 1] << 0xc |
+ table->fogVals[i]);
}
}
u32 cmd = GX_BP_REG_FOGRANGE << 0x18 | (param_1 + 0x156) | param_0 << 0xa;
@@ -728,13 +718,13 @@ SECTION_SDATA static u8 J3DTexImage2Ids[8] = { /* 8030FD68-8030FDE8 30A6A8 0080+00 0/0 1/1 0/0 .text
* J3DFifoLoadTexCached__F11_GXTexMapIDUl15_GXTexCacheSizeUl15_GXTexCacheSize */
#ifdef NONMATCHING
-void J3DFifoLoadTexCached(GXTexMapID id, u32 param_1, GXTexCacheSize param_2,
- u32 param_3, GXTexCacheSize param_4) {
- J3DFifoLoadBPCmd(param_1 >> 5 | (param_2 + 3) << 0xf | (param_2 + 3) << 0x12
- | J3DTexImage1Ids[id] << 0x18);
+void J3DFifoLoadTexCached(GXTexMapID id, u32 param_1, GXTexCacheSize param_2, u32 param_3,
+ GXTexCacheSize param_4) {
+ J3DFifoLoadBPCmd(param_1 >> 5 | (param_2 + 3) << 0xf | (param_2 + 3) << 0x12 |
+ J3DTexImage1Ids[id] << 0x18);
if (param_4 != GX_TEXCACHE_NONE && param_3 < 0x100000) {
- J3DFifoLoadBPCmd(param_3 >> 5 | (param_4 + 3) << 0xf | (param_4 + 3) << 0x12
- | J3DTexImage2Ids[id] << 0x18);
+ J3DFifoLoadBPCmd(param_3 >> 5 | (param_4 + 3) << 0xf | (param_4 + 3) << 0x12 |
+ J3DTexImage2Ids[id] << 0x18);
}
}
#else
|
