Add semicolons to macro functions

This commit is contained in:
Ryan Myers
2021-10-27 17:17:08 -04:00
parent b6be278f14
commit b18f474153
11 changed files with 136 additions and 136 deletions
+17 -17
View File
@@ -589,7 +589,7 @@ void func_80066CDC(Gfx **dlist, s32 arg1) {
gScreenViewports[D_80120CE4].upperLeftY,
gScreenViewports[D_80120CE4].lowerRightX,
gScreenViewports[D_80120CE4].lowerRightY
)
);
func_80068158(dlist, 0, 0, 0, 0);
if (arg1 != 0) {
func_80067D3C(dlist, arg1);
@@ -613,7 +613,7 @@ void func_80066CDC(Gfx **dlist, s32 arg1) {
if (osTvType == TV_TYPE_PAL) {
phi_t3 = sp58 - 0x12;
}
gDPSetScissor((*dlist)++, SCISSOR_INTERLACE, 0, 0, temp_t1, temp_t0)
gDPSetScissor((*dlist)++, SCISSOR_INTERLACE, 0, 0, temp_t1, temp_t0);
sp4C = temp_a2;
break;
case VIEWPORTS_COUNT_2_PLAYERS:
@@ -623,19 +623,19 @@ void func_80066CDC(Gfx **dlist, s32 arg1) {
if (osTvType == TV_TYPE_PAL) {
phi_t3 = temp_v0_6 - 0xC;
}
gDPSetScissor((*dlist)++, SCISSOR_INTERLACE, 0, 0, temp_t1, (temp_a3 - (temp_t0 >> 7)))
gDPSetScissor((*dlist)++, SCISSOR_INTERLACE, 0, 0, temp_t1, (temp_a3 - (temp_t0 >> 7)));
} else {
gDPSetScissor((*dlist)++, SCISSOR_INTERLACE, 0, (temp_a3 + (temp_t0 >> 7)), temp_t1, (temp_t0 - (temp_t0 >> 7)))
gDPSetScissor((*dlist)++, SCISSOR_INTERLACE, 0, (temp_a3 + (temp_t0 >> 7)), temp_t1, (temp_t0 - (temp_t0 >> 7)));
phi_t3 = temp_a3 + (temp_t0 >> 2);
}
sp4C = temp_a2;
break;
case VIEWPORTS_COUNT_3_PLAYERS:
if (D_80120CE4 == 0) {
gDPSetScissor((*dlist)++, SCISSOR_INTERLACE, 0, 0, temp_a2 - (temp_t1 >> 8), temp_t0)
gDPSetScissor((*dlist)++, SCISSOR_INTERLACE, 0, 0, temp_a2 - (temp_t1 >> 8), temp_t0);
phi_a1 = temp_t1 >> 2;
} else {
gDPSetScissor((*dlist)++, SCISSOR_INTERLACE, temp_a2 + (temp_t1 >> 8), 0, temp_t1 - (temp_t1 >> 8), temp_t0)
gDPSetScissor((*dlist)++, SCISSOR_INTERLACE, temp_a2 + (temp_t1 >> 8), 0, temp_t1 - (temp_t1 >> 8), temp_t0);
phi_a1 = temp_a2 + (temp_t1 >> 2);
}
sp4C = phi_a1;
@@ -647,24 +647,24 @@ void func_80066CDC(Gfx **dlist, s32 arg1) {
switch(D_80120CE4) {
case 0:
gDPSetScissor((*dlist)++, SCISSOR_INTERLACE, 0.0f, 0.0f,
(temp_a2 - (temp_t1 >> 8)), (temp_a3 - (temp_t0 >> 7)))
(temp_a2 - (temp_t1 >> 8)), (temp_a3 - (temp_t0 >> 7)));
phi_t5 = 0;
phi_t4 = 0;
case 1:
gDPSetScissor((*dlist)++, SCISSOR_INTERLACE, (temp_a2 + (temp_t1 >> 8)), 0,
((temp_a2 * 2) - (temp_t1 >> 8)), (temp_a3 - (temp_t0 >> 7)))
((temp_a2 * 2) - (temp_t1 >> 8)), (temp_a3 - (temp_t0 >> 7)));
phi_t5 = 0;
phi_t4 = temp_a2;
break;
case 2:
gDPSetScissor((*dlist)++, SCISSOR_INTERLACE, 0, temp_a3 + (temp_t0 >> 7),
temp_a2 - (temp_t1 >> 8), (temp_a3 * 2) - (temp_t0 >> 7))
temp_a2 - (temp_t1 >> 8), (temp_a3 * 2) - (temp_t0 >> 7));
phi_t5 = temp_a3;
phi_t4 = 0;
break;
case 3:
gDPSetScissor((*dlist)++, SCISSOR_INTERLACE, temp_a2 + (temp_t1 >> 8), temp_a3 + (temp_t0 >> 7),
(temp_a2 * 2) - (temp_t1 >> 8), (temp_a3 * 2) - (temp_t0 >> 7))
(temp_a2 * 2) - (temp_t1 >> 8), (temp_a3 * 2) - (temp_t0 >> 7));
phi_t5 = temp_a3;
phi_t4 = temp_a2;
break;
@@ -723,8 +723,8 @@ void func_80067F2C(Gfx **dlist, s32 *arg1) {
D_800DD148[D_80120CE4 + 5].vp.vscale[1] = width * 2;
D_800DD148[D_80120CE4 + 5].vp.vtrans[0] = width * 2;
D_800DD148[D_80120CE4 + 5].vp.vtrans[1] = height * 2;
gSPViewport((*dlist)++, (u8*)&D_800DD148[D_80120CE4 + 5] + 0x80000000)
fast3d_cmd((*dlist)++, 0x1000040, (u32)(*arg1 + 0x80000000))
gSPViewport((*dlist)++, (u8*)&D_800DD148[D_80120CE4 + 5] + 0x80000000);
fast3d_cmd((*dlist)++, 0x1000040, (u32)(*arg1 + 0x80000000));
*arg1 += 0x40;
D_80120D1C = 0;
D_80120D08 = 0;
@@ -746,7 +746,7 @@ void func_8006807C(Gfx **dlist, s32 *arg1) {
func_8006FE74(D_80120D70[0], &D_800DD2A0);
func_8006F768(D_80120D70[0], &D_80120F20, &D_80121060);
func_8006F870(D_80121060, (s32*)*arg1); // This doesn't look right. Need to check this!
fast3d_cmd((*dlist)++, 0x1000040, (u32)(*arg1 + 0x80000000))
fast3d_cmd((*dlist)++, 0x1000040, (u32)(*arg1 + 0x80000000));
*arg1 += 0x40;
D_80120D1C = 0;
D_80120D08 = 0;
@@ -763,9 +763,9 @@ void func_80068158(Gfx **dlist, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
D_800DD148[D_80120CE4].vp.vtrans[1] = arg4 * 4;
D_800DD148[D_80120CE4].vp.vscale[0] = tempArg1 * 4;
D_800DD148[D_80120CE4].vp.vscale[1] = arg2 * 4;
gSPViewport((*dlist)++, (u8*)&D_800DD148[D_80120CE4] + 0x80000000)
gSPViewport((*dlist)++, (u8*)&D_800DD148[D_80120CE4] + 0x80000000);
} else {
gSPViewport((*dlist)++, (u8*)&D_800DD148[D_80120CE4 + 10 + (D_800DD134 * 5)] + 0x80000000)
gSPViewport((*dlist)++, (u8*)&D_800DD148[D_80120CE4 + 10 + (D_800DD134 * 5)] + 0x80000000);
}
}
@@ -776,7 +776,7 @@ void func_800682AC(Gfx **dlist) {
height = widthAndHeight >> 0x10;
width = widthAndHeight & 0xFFFF;
if (!(gScreenViewports[D_80120CE4].flags & 1)) {
gDPSetScissor((*dlist)++, G_SC_NON_INTERLACE, 0, 0, width - 1, height - 1)
gDPSetScissor((*dlist)++, G_SC_NON_INTERLACE, 0, 0, width - 1, height - 1);
func_80068158(dlist, width >> 1, height >> 1, width >> 1, height >> 1);
} else {
func_80067A3C(dlist);
@@ -791,7 +791,7 @@ void func_80068408(Gfx **dlist, s32 *arg1) {
func_8006F870(D_80121060, (s32*)*arg1); // This doesn't look right. Need to check this!
D_80120D88[D_80120D1C] = *arg1;
fast3d_cmd((*dlist)++, ((((D_80120D08 << 6) & 0xFF) << 0x10) | 0x1000000) | 0x40, (u32)(*arg1 + 0x80000000))
fast3d_cmd((*dlist)++, ((((D_80120D08 << 6) & 0xFF) << 0x10) | 0x1000000) | 0x40, (u32)(*arg1 + 0x80000000));
*arg1 += 0x40;
}
+31 -31
View File
@@ -392,10 +392,10 @@ GLOBAL_ASM("asm/non_matchings/fade_transition/func_800C0834.s")
void render_fade_fullscreen(Gfx **dlist, s32 arg1, s32 arg2) {
s32 screenSize = get_video_width_and_height_as_s32();
gSPDisplayList((*dlist)++, D_800E31D8)
gDPSetPrimColor((*dlist)++, 0, 0, gCurFadeRed, gCurFadeGreen, gCurFadeBlue, gCurFadeAlpha)
gDPSetCombineMode((*dlist)++, G_CC_PRIMITIVE, G_CC_PRIMITIVE)
gDPFillRectangle((*dlist)++, 0, 0, screenSize & 0x3FF, (screenSize >> 16) & 0x3FF)
gSPDisplayList((*dlist)++, D_800E31D8);
gDPSetPrimColor((*dlist)++, 0, 0, gCurFadeRed, gCurFadeGreen, gCurFadeBlue, gCurFadeAlpha);
gDPSetCombineMode((*dlist)++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
gDPFillRectangle((*dlist)++, 0, 0, screenSize & 0x3FF, (screenSize >> 16) & 0x3FF);
func_8007B3D0(dlist);
}
@@ -404,20 +404,20 @@ GLOBAL_ASM("asm/non_matchings/fade_transition/func_800C1130.s")
void render_fade_barndoor_horizontal(Gfx **dlist, s32 arg1, s32 arg2) {
func_8007B3D0(dlist);
gSPDisplayList((*dlist)++, D_800E3648)
gSPDisplayList((*dlist)++, D_800E3648);
// TODO: Need to clean this up.
gDkrVertices((*dlist)++, (s32)D_800E31C0[D_800E31D0[0]] + 0x80000000, (((s32)D_800E31C0[D_800E31D0[0]] + 0x80000000) & 6) | 0x58, 0x70)
gDkrTriangles((*dlist)++, (s32)D_800E31C8[D_800E31D0[0]] + 0x80000000, 8, TRIN_DISABLE_TEXTURE)
gDkrVertices((*dlist)++, (s32)D_800E31C0[D_800E31D0[0]] + 0x80000000, (((s32)D_800E31C0[D_800E31D0[0]] + 0x80000000) & 6) | 0x58, 0x70);
gDkrTriangles((*dlist)++, (s32)D_800E31C8[D_800E31D0[0]] + 0x80000000, 8, TRIN_DISABLE_TEXTURE);
func_8007B3D0(dlist);
}
// This is exactly the same as render_fade_barndoor_horizontal; I wonder what gets changed then?
void render_fade_barndoor_vertical(Gfx **dlist, s32 arg1, s32 arg2) {
func_8007B3D0(dlist);
gSPDisplayList((*dlist)++, D_800E3648)
gSPDisplayList((*dlist)++, D_800E3648);
// TODO: Need to clean this up.
gDkrVertices((*dlist)++, (s32)D_800E31C0[D_800E31D0[0]] + 0x80000000, (((s32)D_800E31C0[D_800E31D0[0]] + 0x80000000) & 6) | 0x58, 0x70)
gDkrTriangles((*dlist)++, (s32)D_800E31C8[D_800E31D0[0]] + 0x80000000, 8, TRIN_DISABLE_TEXTURE)
gDkrVertices((*dlist)++, (s32)D_800E31C0[D_800E31D0[0]] + 0x80000000, (((s32)D_800E31C0[D_800E31D0[0]] + 0x80000000) & 6) | 0x58, 0x70);
gDkrTriangles((*dlist)++, (s32)D_800E31C8[D_800E31D0[0]] + 0x80000000, 8, TRIN_DISABLE_TEXTURE);
func_8007B3D0(dlist);
}
@@ -428,23 +428,23 @@ GLOBAL_ASM("asm/non_matchings/fade_transition/func_800C1EE8.s")
void render_fade_circle(Gfx **dlist, s32 arg1, s32 arg2) {
u8 *addr, *addr2;
func_8007B3D0(dlist);
gSPDisplayList((*dlist)++, D_800E3648)
gSPDisplayList((*dlist)++, D_800E3648);
addr = (D_800E31C0[D_800E31D0[0]] + 0x80000000);
addr2 = (D_800E31C8[D_800E31D0[0]] + 0x80000000);
gDkrVertices((*dlist)++, (s32)addr, ((s32)addr & 6) | 0x88, 0xA6)
gDkrTriangles((*dlist)++, (s32)addr2, 16, TRIN_DISABLE_TEXTURE)
gDkrVertices((*dlist)++, (s32)addr, ((s32)addr & 6) | 0x88, 0xA6);
gDkrTriangles((*dlist)++, (s32)addr2, 16, TRIN_DISABLE_TEXTURE);
addr += 0xB4;
addr2 += 0x100;
gDkrVertices((*dlist)++, (s32)addr, ((s32)addr & 6) | 0x88, 0xA6)
gDkrTriangles((*dlist)++, (s32)addr2, 16, TRIN_DISABLE_TEXTURE)
gDkrVertices((*dlist)++, (s32)addr, ((s32)addr & 6) | 0x88, 0xA6);
gDkrTriangles((*dlist)++, (s32)addr2, 16, TRIN_DISABLE_TEXTURE);
addr += 0xB4;
addr2 += 0x100;
gDkrVertices((*dlist)++, (s32)addr, ((s32)addr & 6) | 0x88, 0xA6)
gDkrTriangles((*dlist)++, (s32)addr2, 16, TRIN_DISABLE_TEXTURE)
gDkrVertices((*dlist)++, (s32)addr, ((s32)addr & 6) | 0x88, 0xA6);
gDkrTriangles((*dlist)++, (s32)addr2, 16, TRIN_DISABLE_TEXTURE);
addr += 0xB4;
addr2 += 0x100;
gDkrVertices((*dlist)++, (s32)addr, ((s32)addr & 6) | 0x88, 0xA6)
gDkrTriangles((*dlist)++, (s32)addr2, 16, TRIN_DISABLE_TEXTURE)
gDkrVertices((*dlist)++, (s32)addr, ((s32)addr & 6) | 0x88, 0xA6);
gDkrTriangles((*dlist)++, (s32)addr2, 16, TRIN_DISABLE_TEXTURE);
func_8007B3D0(dlist);
}
#else
@@ -455,15 +455,15 @@ GLOBAL_ASM("asm/non_matchings/fade_transition/render_fade_circle.s")
void render_fade_waves(Gfx **dlist, s32 arg1, s32 arg2) {
s32 i;
func_8007B3D0(dlist);
gSPDisplayList((*dlist)++, D_800E3648)
gSPDisplayList((*dlist)++, D_800E3648);
for(i = 0; i < 6; i++) {
s32 index = D_800E31D0[0] + i;
if(i != 1 && i != 4) {
gDkrVertices((*dlist)++, (s32)D_800E31C0[index] + 0x80000000, (((s32)D_800E31C0[index] + 0x80000000) & 6) | 0x78, 0x94)
gDkrTriangles((*dlist)++, (s32)D_800E31C8[index] + 0x80000000, 14, TRIN_DISABLE_TEXTURE)
gDkrVertices((*dlist)++, (s32)D_800E31C0[index] + 0x80000000, (((s32)D_800E31C0[index] + 0x80000000) & 6) | 0x78, 0x94);
gDkrTriangles((*dlist)++, (s32)D_800E31C8[index] + 0x80000000, 14, TRIN_DISABLE_TEXTURE);
} else {
gDkrVertices((*dlist)++, (s32)D_800E31C0[index] + 0x80000000, (((s32)D_800E31C0[index] + 0x80000000) & 6) | 0x68, 0x82)
gDkrTriangles((*dlist)++, (s32)D_800E31C8[index] + 0x80000000, 12, TRIN_DISABLE_TEXTURE)
gDkrVertices((*dlist)++, (s32)D_800E31C0[index] + 0x80000000, (((s32)D_800E31C0[index] + 0x80000000) & 6) | 0x68, 0x82);
gDkrTriangles((*dlist)++, (s32)D_800E31C8[index] + 0x80000000, 12, TRIN_DISABLE_TEXTURE);
}
}
func_8007B3D0(dlist);
@@ -474,10 +474,10 @@ GLOBAL_ASM("asm/non_matchings/fade_transition/render_fade_waves.s")
void render_fade_barndoor_diagonal(Gfx **dlist, s32 arg1, s32 arg2) {
func_8007B3D0(dlist);
gSPDisplayList((*dlist)++, D_800E3648)
gSPDisplayList((*dlist)++, D_800E3648);
// TODO: Need to clean this up.
gDkrVertices((*dlist)++, (s32)D_800E31C0[D_800E31D0[0]] + 0x80000000, (((s32)D_800E31C0[D_800E31D0[0]] + 0x80000000) & 6) | 0x48, 0x5E)
gDkrTriangles((*dlist)++, (s32)D_800E31C8[D_800E31D0[0]] + 0x80000000, 6, TRIN_DISABLE_TEXTURE)
gDkrVertices((*dlist)++, (s32)D_800E31C0[D_800E31D0[0]] + 0x80000000, (((s32)D_800E31C0[D_800E31D0[0]] + 0x80000000) & 6) | 0x48, 0x5E);
gDkrTriangles((*dlist)++, (s32)D_800E31C8[D_800E31D0[0]] + 0x80000000, 6, TRIN_DISABLE_TEXTURE);
func_8007B3D0(dlist);
}
@@ -515,9 +515,9 @@ GLOBAL_ASM("asm/non_matchings/fade_transition/func_800C27A0.s")
void render_fade_disabled(Gfx **dlist, s32 arg1, s32 arg2) {
s32 screenSize = get_video_width_and_height_as_s32();
gSPDisplayList((*dlist)++, D_800E31D8)
gDPSetPrimColor((*dlist)++, 0, 0, (gLastFadeRed >> 16), (gLastFadeGreen >> 16), (gLastFadeBlue >> 16), 255)
gDPSetCombineMode((*dlist)++, G_CC_PRIMITIVE, G_CC_PRIMITIVE)
gDPFillRectangle((*dlist)++, 0, 0, screenSize & 0x3FF, (screenSize >> 16) & 0x3FF)
gSPDisplayList((*dlist)++, D_800E31D8);
gDPSetPrimColor((*dlist)++, 0, 0, (gLastFadeRed >> 16), (gLastFadeGreen >> 16), (gLastFadeBlue >> 16), 255);
gDPSetCombineMode((*dlist)++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
gDPFillRectangle((*dlist)++, 0, 0, screenSize & 0x3FF, (screenSize >> 16) & 0x3FF);
func_8007B3D0(dlist);
}
+6 -6
View File
@@ -584,9 +584,9 @@ void func_800C5B58(Gfx **dlist, s32 *arg1, s32 *arg2, s32 arg3) {
temp = &D_8012A7E8[arg3];
if (temp->unk13 != 0) {
gSPDisplayList((*dlist)++, &D_800E3690)
gDkrDmaDisplayList((*dlist)++, ((u8*)&D_800E36C8[1]) + 0x80000000, 2)
gDPSetEnvColor((*dlist)++, 0, 0, 0, 0)
gSPDisplayList((*dlist)++, &D_800E3690);
gDkrDmaDisplayList((*dlist)++, ((u8*)&D_800E36C8[1]) + 0x80000000, 2);
gDPSetEnvColor((*dlist)++, 0, 0, 0, 0);
if ((temp->unk8 - temp->unk4) < 10 || (temp->unkA - temp->unk6) < 10) {
render_fill_rectangle(dlist, temp->unk4 - 2, temp->unk6 - 2, temp->unk8 + 2, temp->unkA + 2);
} else {
@@ -595,8 +595,8 @@ void func_800C5B58(Gfx **dlist, s32 *arg1, s32 *arg2, s32 arg3) {
render_fill_rectangle(dlist, temp->unk8 - 2, temp->unk6 + 2, temp->unk8 + 2, temp->unkA - 2);
render_fill_rectangle(dlist, temp->unk4 - 2, temp->unkA - 2, temp->unk8 + 2, temp->unkA + 2);
}
gDPPipeSync((*dlist)++)
gDPSetEnvColor((*dlist)++, temp->unk10, temp->unk11, temp->unk12, temp->unk13)
gDPPipeSync((*dlist)++);
gDPSetEnvColor((*dlist)++, temp->unk10, temp->unk11, temp->unk12, temp->unk13);
for (i = 0; D_800E3710[i] >= 0; i += 5) {
x0 = D_800E3710[i] + temp->unk4;
y0 = (D_800E3710[i + 1]) ? D_800E3710[i + 2] + temp->unkA : D_800E3710[i + 2] + temp->unk6;
@@ -604,7 +604,7 @@ void func_800C5B58(Gfx **dlist, s32 *arg1, s32 *arg2, s32 arg3) {
y1 = (D_800E3710[i + 3]) ? D_800E3710[i + 4] + temp->unkA : D_800E3710[i + 4] + temp->unk6;
render_fill_rectangle(dlist, x0, y0, x1, y1);
}
gDPPipeSync((*dlist)++)
gDPPipeSync((*dlist)++);
}
if (arg1 != NULL && arg2 != NULL) {
if (!D_800E36E8) {
+6 -6
View File
@@ -5590,12 +5590,12 @@ void func_8009B1E4(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
arg4 = 0;
}
gSPDisplayList(D_801263A0++, D_800E1780)
gDPSetPrimColor(D_801263A0++, 0, 0, 0, 0, 0, arg4)
gDPSetCombineMode(D_801263A0++, G_CC_PRIMITIVE, G_CC_PRIMITIVE)
gDPFillRectangle(D_801263A0++, arg0, arg1, arg0 + arg2, arg1 + arg3)
gDPPipeSync(D_801263A0++)
gDPSetPrimColor(D_801263A0++, 0, 0, 255, 255, 255, 255)
gSPDisplayList(D_801263A0++, D_800E1780);
gDPSetPrimColor(D_801263A0++, 0, 0, 0, 0, 0, arg4);
gDPSetCombineMode(D_801263A0++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
gDPFillRectangle(D_801263A0++, arg0, arg1, arg0 + arg2, arg1 + arg3);
gDPPipeSync(D_801263A0++);
gDPSetPrimColor(D_801263A0++, 0, 0, 255, 255, 255, 255);
func_8007B3D0(&D_801263A0);
}
+3 -3
View File
@@ -59,7 +59,7 @@ void render_screen(Gfx **dlist, u8 *screenAddress) {
s32 y_pos;
gDkrDmaDisplayList((*dlist)++, (u32)&gRdpSetModeScreenAsset + 0x80000000,
numberOfGfxCommands(gRdpSetModeScreenAsset))
numberOfGfxCommands(gRdpSetModeScreenAsset));
// Screen header is 16 bytes.
screenAddress += 16;
@@ -69,11 +69,11 @@ void render_screen(Gfx **dlist, u8 *screenAddress) {
while(y_pos != SCREEN_HEIGHT) {
// Load the texture.
gDPLoadTextureBlockS((*dlist)++, screenAddress + 0x80000000, G_IM_FMT_RGBA, G_IM_SIZ_16b,
SCREEN_WIDTH, SCREEN_HEIGHT_PART, 0, G_TX_CLAMP, G_TX_CLAMP, 0, 0, 0, 0)
SCREEN_WIDTH, SCREEN_HEIGHT_PART, 0, G_TX_CLAMP, G_TX_CLAMP, 0, 0, 0, 0);
// Draw the texture.
gSPTextureRectangle((*dlist)++, 0, ((y_pos) << 2), SCREEN_WIDTH << 2,
((y_pos + SCREEN_HEIGHT_PART) << 2), 0, 0, 0, 1 << 12, 1 << 10)
((y_pos + SCREEN_HEIGHT_PART) << 2), 0, 0, 0, 1 << 12, 1 << 10);
// Advance to the next slice.
screenAddress += SCREEN_WIDTH * SCREEN_HEIGHT_PART * 2;
+6 -6
View File
@@ -1081,8 +1081,8 @@ void func_8007B3D0(Gfx **dlist) {
D_80126382 = 1;
D_80126378 = 0;
D_80126384 = 0;
gDPPipeSync((*dlist)++)
gSPSetGeometryMode((*dlist)++, G_SHADING_SMOOTH | G_SHADE | G_ZBUFFER)
gDPPipeSync((*dlist)++);
gSPSetGeometryMode((*dlist)++, G_SHADING_SMOOTH | G_SHADE | G_ZBUFFER);
}
void func_8007B43C(void) {
@@ -1296,10 +1296,10 @@ void func_8007F594(Gfx **dlist, u32 index, u32 primitiveColor, u32 environmentCo
index = 2;
}
// There are issues with the structure, but this should be equivalent functionality-wise.
gSPDisplayList((*dlist)++, D_800DF3A8)
gDkrDmaDisplayList((*dlist)++, &D_800DF410[index] + 0x80000000, numberOfGfxCommands(D_800DF410[0]))
gDPSetPrimColorRGBA((*dlist)++, primitiveColor)
gDPSetEnvColorRGBA((*dlist)++, environmentColor)
gSPDisplayList((*dlist)++, D_800DF3A8);
gDkrDmaDisplayList((*dlist)++, &D_800DF410[index] + 0x80000000, numberOfGfxCommands(D_800DF410[0]));
gDPSetPrimColorRGBA((*dlist)++, primitiveColor);
gDPSetEnvColorRGBA((*dlist)++, environmentColor);
}
#else
GLOBAL_ASM("asm/non_matchings/textures_sprites/func_8007F594.s")
+4 -4
View File
@@ -835,21 +835,21 @@ void func_80012C3C(Gfx** dlist) {
s32 i;
Gfx *tmp;
for(i = 0; i<D_8011ADA4; i++){
gSPDisplayList((*dlist)++, D_8011AD78[i])
gSPDisplayList((*dlist)++, D_8011AD78[i]);
}
}
void func_80012C98(Gfx **dlist) {
if (D_8011ADA4 < 9) {
gSPNoOp((*dlist)++) // Placeholder instruction?
gSPNoOp((*dlist)++); // Placeholder instruction?
D_8011AD78[D_8011ADA4] = *dlist;
}
}
void func_80012CE8(Gfx **dlist) {
if (D_8011ADA4 < 9) {
gSPEndDisplayList((*dlist)++)
gSPBranchList(D_8011AD78[D_8011ADA4] - 1, (u32)*dlist)
gSPEndDisplayList((*dlist)++);
gSPBranchList(D_8011AD78[D_8011ADA4] - 1, (u32)*dlist);
D_8011ADA4++;
}
}
+8 -8
View File
@@ -590,25 +590,25 @@ void render_level_segment(s32 segmentId, s32 nonOpaque) {
levelHeaderIndex = (flags >> 28) & 7;
if (levelHeaderIndex != 0) { // This is unused, so this should always be false.
lvlHeader70 = gCurrentLevelHeader2->unk70;//gCurrentLevelHeader2[levelHeaderIndex].unk70;
gDPSetEnvColor(D_8011B0A0++, lvlHeader70->red, lvlHeader70->green, lvlHeader70->blue, lvlHeader70->alpha)
gDPSetEnvColor(D_8011B0A0++, lvlHeader70->red, lvlHeader70->green, lvlHeader70->blue, lvlHeader70->alpha);
} else {
gDPSetEnvColor(D_8011B0A0++, 255, 255, 255, 0)
gDPSetEnvColor(D_8011B0A0++, 255, 255, 255, 0);
}
temp = batchInfo->unk7 << 14;
if (flags & 0x40000) { // Only gets used in Spaceport alpha for the pulsating lights in the outside section.
color = gCurrentLevelHeader2->pulseLightData->outColorValue & 0xFF;
gDPSetPrimColor(D_8011B0A0++, 0, 0, color, color, color, color)
gDPSetPrimColor(D_8011B0A0++, 0, 0, color, color, color, color);
func_8007BA5C(&D_8011B0A0, texture, flags, temp);
vertices += 0x80000000;
gDkrVertices(D_8011B0A0++, vertices, (((numberVertices - 1) << 3) | (vertices & 6)), numberVertices)
gDkrTriangles(D_8011B0A0++, triangles + 0x80000000, numberTriangles, TRIN_ENABLE_TEXTURE)
gDPSetPrimColor(D_8011B0A0++, 0, 0, 255, 255, 255, 255) // Reset the primitive color
gDkrVertices(D_8011B0A0++, vertices, (((numberVertices - 1) << 3) | (vertices & 6)), numberVertices);
gDkrTriangles(D_8011B0A0++, triangles + 0x80000000, numberTriangles, TRIN_ENABLE_TEXTURE);
gDPSetPrimColor(D_8011B0A0++, 0, 0, 255, 255, 255, 255); // Reset the primitive color
} else {
func_8007B4E8(&D_8011B0A0, texture, flags, temp);
hasTexture = (texture == NULL) ? TRIN_DISABLE_TEXTURE : TRIN_ENABLE_TEXTURE;
vertices += 0x80000000;
gDkrVertices(D_8011B0A0++, vertices, (((numberVertices - 1) << 3) | (vertices & 6)), numberVertices)
gDkrTriangles(D_8011B0A0++, triangles + 0x80000000, numberTriangles, hasTexture)
gDkrVertices(D_8011B0A0++, vertices, (((numberVertices - 1) << 3) | (vertices & 6)), numberVertices);
gDkrTriangles(D_8011B0A0++, triangles + 0x80000000, numberTriangles, hasTexture);
}
}
+14 -14
View File
@@ -852,8 +852,8 @@ void func_8006C3E0(void) {
D_801234E8 = 0;
gCurrDisplayList = gDisplayLists[D_801234E8];
gDPFullSync(gCurrDisplayList++)
gSPEndDisplayList(gCurrDisplayList++)
gDPFullSync(gCurrDisplayList++);
gSPEndDisplayList(gCurrDisplayList++);
osSetTime(0);
}
@@ -938,8 +938,8 @@ void render(void) {
func_800829F8(&gCurrDisplayList, D_800DD404);
}
gDPFullSync(gCurrDisplayList++)
gSPEndDisplayList(gCurrDisplayList++)
gDPFullSync(gCurrDisplayList++);
gSPEndDisplayList(gCurrDisplayList++);
func_80066610();
if (D_800DD3F0 != 1) {
@@ -1013,8 +1013,8 @@ void func_8006CC14(void) {
func_800A003C();
func_800C30CC();
gCurrDisplayList = gDisplayLists[D_801234E8];
gDPFullSync(gCurrDisplayList++)
gSPEndDisplayList(gCurrDisplayList++)
gDPFullSync(gCurrDisplayList++);
gSPEndDisplayList(gCurrDisplayList++);
set_free_queue_state(2);
}
@@ -1505,8 +1505,8 @@ void func_8006DCF8(s32 arg0) {
if ((menuLoopResult != -1) && (menuLoopResult & 0x200)) {
func_8006DBE4();
gCurrDisplayList = gDisplayLists[D_801234E8];
gDPFullSync(gCurrDisplayList++)
gSPEndDisplayList(gCurrDisplayList++)
gDPFullSync(gCurrDisplayList++);
gSPEndDisplayList(gCurrDisplayList++);
D_801234F4 = menuLoopResult & 0x7F;
D_80123518 = func_8006B0AC(D_801234F4);
D_80123504 = 0;
@@ -1573,8 +1573,8 @@ void func_8006DCF8(s32 arg0) {
func_8006DBE4();
// Minor issue here.
gCurrDisplayList = gDisplayLists[D_801234E8];
gDPFullSync(gCurrDisplayList++)
gSPEndDisplayList(gCurrDisplayList++)
gDPFullSync(gCurrDisplayList++);
gSPEndDisplayList(gCurrDisplayList++);
temp = menuLoopResult & 0x7F;
D_80121250[1] = temp;
D_80121250[0] = D_801234F4;
@@ -1592,8 +1592,8 @@ void func_8006DCF8(s32 arg0) {
if (menuLoopResult > 0) {
func_8006DBE4();
gCurrDisplayList = gDisplayLists[D_801234E8];
gDPFullSync(gCurrDisplayList++)
gSPEndDisplayList(gCurrDisplayList++)
gDPFullSync(gCurrDisplayList++);
gSPEndDisplayList(gCurrDisplayList++);
D_801234EC = 0;
func_8006CAE4(menuLoopResult, -1, D_80123518);
if (gSettingsPtr->newGame && !is_in_tracks_mode()) {
@@ -1612,8 +1612,8 @@ void load_level_for_menu(s32 levelId, s32 numberOfPlayers, s32 cutsceneId) {
func_8006DBE4();
if (get_thread30_level_id_to_load() == 0) {
gCurrDisplayList = gDisplayLists[D_801234E8];
gDPFullSync(gCurrDisplayList++)
gSPEndDisplayList(gCurrDisplayList++)
gDPFullSync(gCurrDisplayList++);
gSPEndDisplayList(gCurrDisplayList++);
}
}
if (levelId != -1) {
+13 -13
View File
@@ -21,25 +21,25 @@ void render_borders_for_multiplayer(Gfx **dlist) {
temp0 = width >> 8;
height = widthAndHeight >> 16;
temp1 = height >> 7;
gDPSetCycleType((*dlist)++, G_CYC_FILL)
gDPSetFillColor((*dlist)++, 0x00010001) // Black fill color
gDPSetCycleType((*dlist)++, G_CYC_FILL);
gDPSetFillColor((*dlist)++, 0x00010001); // Black fill color
switch(get_viewport_count()){
case VIEWPORTS_COUNT_2_PLAYERS:
// Draws a solid horizontal black line in the middle of the screen.
gDPFillRectangle((*dlist)++, 0, (height >> 1) - temp1, width, ((height >> 1) - temp1) + temp1)
gDPFillRectangle((*dlist)++, 0, (height >> 1) - temp1, width, ((height >> 1) - temp1) + temp1);
break;
case VIEWPORTS_COUNT_3_PLAYERS:
levelHeader = get_current_level_header();
// Draw black square in the bottom-right corner.
if (func_800A8458() || (levelHeader->race_type & 0x40)) {
gDPFillRectangle((*dlist)++, width >> 1, height >> 1, width, height)
gDPFillRectangle((*dlist)++, width >> 1, height >> 1, width, height);
}
// There is no break statement here. This is intentional.
case VIEWPORTS_COUNT_4_PLAYERS:
temp2 = (width >> 1) - temp0;
// Draws 2 black lines in the middle of the screen. One vertical, another horizontal.
gDPFillRectangle((*dlist)++, 0, (height >> 1) - temp1, width, ((height >> 1) - temp1) + temp1)
gDPFillRectangle((*dlist)++, temp2, 0, temp2 + temp0, height)
gDPFillRectangle((*dlist)++, 0, (height >> 1) - temp1, width, ((height >> 1) - temp1) + temp1);
gDPFillRectangle((*dlist)++, temp2, 0, temp2 + temp0, height);
break;
}
return;
@@ -62,22 +62,22 @@ void func_80077268(Gfx **dlist) {
widthAndHeight = get_video_width_and_height_as_s32();
height = widthAndHeight >> 16;
width = widthAndHeight & 0xFFFF;
gDPSetCycleType((*dlist)++, G_CYC_1CYCLE)
gDPSetCombineMode((*dlist)++, G_CC_PRIMITIVE, G_CC_PRIMITIVE)
gDPSetRenderMode((*dlist)++, G_RM_XLU_SURF, G_RM_XLU_SURF2)
gDPSetPrimColor((*dlist)++, 0, 0, 0, 0, 0, 0)
gDPSetCycleType((*dlist)++, G_CYC_1CYCLE);
gDPSetCombineMode((*dlist)++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
gDPSetRenderMode((*dlist)++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
gDPSetPrimColor((*dlist)++, 0, 0, 0, 0, 0, 0);
// Issues with this block.
switch(get_viewport_count()){
case VIEWPORTS_COUNT_2_PLAYERS:
temp_v0_4 = (height >> 1) - (temp_t2 >> 1);
gDPFillRectangle((*dlist)++, 0, temp_v0_4, width, temp_v0_4 + temp_t2)
gDPFillRectangle((*dlist)++, 0, temp_v0_4, width, temp_v0_4 + temp_t2);
break;
case VIEWPORTS_COUNT_3_PLAYERS:
case VIEWPORTS_COUNT_4_PLAYERS:
temp_v0_3 = (height >> 1) - (temp_t2 >> 1);
temp_a2_2 = (width >> 1) - (ra >> 1);
gDPFillRectangle((*dlist)++, 0, temp_v0_3, width, temp_v0_3 + temp_t2)
gDPFillRectangle((*dlist)++, temp_a2_2, 0, temp_a2_2 + ra, height)
gDPFillRectangle((*dlist)++, 0, temp_v0_3, width, temp_v0_3 + temp_t2);
gDPFillRectangle((*dlist)++, temp_a2_2, 0, temp_a2_2 + ra, height);
break;
}
}
+28 -28
View File
@@ -216,14 +216,14 @@ void render_background(Gfx **dlist, s32 *arg1, s32 arg2) {
w = widthAndHeight & 0xFFFF;
h = widthAndHeight >> 0x10;
gDPPipeSync((*dlist)++)
gDPSetScissor((*dlist)++, 0, 0, 0, w - 1, h - 1)
gDPSetCycleType((*dlist)++, G_CYC_FILL)
gDPSetColorImage((*dlist)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, w, 0x02000000)
gDPSetFillColor((*dlist)++, 0xFFFCFFFC)
gDPFillRectangle((*dlist)++, 0, 0, w - 1, h - 1)
gDPPipeSync((*dlist)++)
gDPSetColorImage((*dlist)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, w, 0x01000000)
gDPPipeSync((*dlist)++);
gDPSetScissor((*dlist)++, 0, 0, 0, w - 1, h - 1);
gDPSetCycleType((*dlist)++, G_CYC_FILL);
gDPSetColorImage((*dlist)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, w, 0x02000000);
gDPSetFillColor((*dlist)++, 0xFFFCFFFC);
gDPFillRectangle((*dlist)++, 0, 0, w - 1, h - 1);
gDPPipeSync((*dlist)++);
gDPSetColorImage((*dlist)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, w, 0x01000000);
if (arg2) {
if (func_80066910(0)) {
if (D_800DE4CC) {
@@ -233,15 +233,15 @@ void render_background(Gfx **dlist, s32 *arg1, s32 arg2) {
} else if (D_800DE4D0.ptr != NULL) {
D_800DE4D0.function(dlist, arg1);
} else {
gDPSetFillColor((*dlist)++, D_800DE4BC)
gDPFillRectangle((*dlist)++, 0, 0, w - 1, h - 1)
gDPSetFillColor((*dlist)++, D_800DE4BC);
gDPFillRectangle((*dlist)++, 0, 0, w - 1, h - 1);
}
if (func_80066BA8(0, &sp90, &sp8C, &sp88, &sp84)) {
gDPSetCycleType((*dlist)++, G_CYC_1CYCLE)
gDPSetPrimColor((*dlist)++, 0, 0, D_800DE4B0, D_800DE4B4, D_800DE4B8, 0xFF)
gDPSetCombineMode((*dlist)++, G_CC_PRIMITIVE, G_CC_PRIMITIVE)
gDPSetRenderMode((*dlist)++, G_RM_OPA_SURF, G_RM_OPA_SURF2)
gDPFillRectangle((*dlist)++, sp90, sp8C, sp88, sp84)
gDPSetCycleType((*dlist)++, G_CYC_1CYCLE);
gDPSetPrimColor((*dlist)++, 0, 0, D_800DE4B0, D_800DE4B4, D_800DE4B8, 0xFF);
gDPSetCombineMode((*dlist)++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
gDPSetRenderMode((*dlist)++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
gDPFillRectangle((*dlist)++, sp90, sp8C, sp88, sp84);
}
} else {
if (D_800DE4CC) {
@@ -254,12 +254,12 @@ void render_background(Gfx **dlist, s32 *arg1, s32 arg2) {
//Also has an issue here.
rgba16Color = ((D_800DE4B0 << 8) & 0xF800) | ((D_800DE4B4 * 8) & 0x7C0) | ((D_800DE4B8 >> 2) & 0x3E) | 1;
rgba16Color |= rgba16Color << 0x10;
gDPSetFillColor((*dlist)++, rgba16Color)
gDPFillRectangle((*dlist)++, 0, 0, w - 1, h - 1)
gDPSetFillColor((*dlist)++, rgba16Color);
gDPFillRectangle((*dlist)++, 0, 0, w - 1, h - 1);
}
}
}
gDPPipeSync((*dlist)++)
gDPPipeSync((*dlist)++);
func_80067A3C(dlist);
}
#else
@@ -268,13 +268,13 @@ GLOBAL_ASM("asm/non_matchings/unknown_078050/render_background.s")
void func_80078054(Gfx **dlist) {
s32 width = get_video_width_and_height_as_s32() & 0xFFF;
gDPSetColorImage((*dlist)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, 0x01000000)
gDPSetDepthImage((*dlist)++, 0x2000000)
gSPDisplayList((*dlist)++, D_800DE520)
gDPSetColorImage((*dlist)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, 0x01000000);
gDPSetDepthImage((*dlist)++, 0x2000000);
gSPDisplayList((*dlist)++, D_800DE520);
}
void func_800780DC(Gfx **dlist) {
gSPDisplayList((*dlist)++, D_800DE4E0)
gSPDisplayList((*dlist)++, D_800DE4E0);
}
void func_80078100(OSSched *sc) {
@@ -328,8 +328,8 @@ void render_textured_rectangle(Gfx **dlist, DrawTexture *arg1, s32 arg2, s32 arg
s32 x1, y1;
s32 u, v;
gSPDisplayList((*dlist)++, D_800DE628)
gDPSetPrimColor((*dlist)++, 0, 0, red, green, blue, alpha)
gSPDisplayList((*dlist)++, D_800DE628);
gDPSetPrimColor((*dlist)++, 0, 0, red, green, blue, alpha);
tex = arg1->texture;
while (tex != NULL) {
x0 = (arg1->xOffset * 4) + (arg2 * 4);
@@ -348,15 +348,15 @@ void render_textured_rectangle(Gfx **dlist, DrawTexture *arg1, s32 arg2, s32 arg
v = -(y0 * 8);
y0 = 0;
}
gDkrDmaDisplayList((*dlist)++, tex->cmd + 0x80000000, tex->numberOfCommands)
gSPTextureRectangle((*dlist)++, x0, y0, x1, y1, 0, u, v, 1024, 1024)
gDkrDmaDisplayList((*dlist)++, tex->cmd + 0x80000000, tex->numberOfCommands);
gSPTextureRectangle((*dlist)++, x0, y0, x1, y1, 0, u, v, 1024, 1024);
}
}
arg1++;
tex = arg1->texture;
}
gDPPipeSync((*dlist)++)
gDPSetPrimColor((*dlist)++, 0, 0, 255, 255, 255, 255)
gDPPipeSync((*dlist)++);
gDPSetPrimColor((*dlist)++, 0, 0, 255, 255, 255, 255);
}
#else
GLOBAL_ASM("asm/non_matchings/unknown_078050/render_textured_rectangle.s")