First batch of widescreen fixes

This commit is contained in:
MegaMech
2024-11-20 12:30:04 -07:00
parent 7ca7f18366
commit 93973e08c3
8 changed files with 275 additions and 76 deletions
+11 -11
View File
@@ -151,7 +151,7 @@ UNUSED s8 D_801657E0;
s8 D_801657E1;
s8 D_801657E2;
s8 D_801657E3;
s8 D_801657E4;
s8 gHUDModes;
s8 D_801657E5;
bool D_801657E6;
u8 D_801657E7;
@@ -963,7 +963,7 @@ void func_80058F78(void) {
set_matrix_hud_screen();
if ((!gDemoMode) && (gIsHUDVisible != 0) && (D_801657D8 == 0)) {
draw_item_window(PLAYER_ONE);
if (D_801657E4 != 2) {
if (gHUDModes != 2) {
render_hud_timer(PLAYER_ONE);
draw_simplified_lap_count(PLAYER_ONE);
func_8004EB38(0);
@@ -1059,7 +1059,7 @@ void func_800591B4(void) {
}
}
}
if ((D_801657E4 != 2) && (gModeSelection == GRAND_PRIX) && (D_8018D2BC != 0)) {
if ((gHUDModes != 2) && (gModeSelection == GRAND_PRIX) && (D_8018D2BC != 0)) {
func_80050320();
}
func_800590D4();
@@ -1135,7 +1135,7 @@ void render_hud_lap_3p_4p(s32 playerId) {
draw_lap_count(playerHUD[playerId].lapX - 12, playerHUD[playerId].lapY + 4,
playerHUD[playerId].alsoLapCount);
}
if (D_801657E4 == 2) {
if (gHUDModes == 2) {
if (playerHUD[playerId].unk_74 && D_80165608) {
func_80047910(playerHUD[playerId].unk_6C, playerHUD[playerId].unk_6E, 0, 1.0f,
(u8*) common_tlut_portrait_bomb_kart_and_question_mark, common_texture_portrait_bomb_kart,
@@ -1499,14 +1499,14 @@ void func_8005A3C0(void) {
switch (gPlayerCountSelection1) {
case 1:
if (gControllerOne->buttonPressed & R_CBUTTONS) {
if (++D_801657E4 >= 3) {
D_801657E4 = 0;
if (++gHUDModes >= 3) {
gHUDModes = 0;
}
if (D_801657E4 == 2) {
if (gHUDModes == 2) {
D_801657E8 = false;
D_801657E6 = false;
D_801657F0 = true;
} else if (D_801657E4 == 1) {
} else if (gHUDModes == 1) {
D_801657E8 = false;
D_801657E6 = true;
D_801657F0 = false;
@@ -1544,14 +1544,14 @@ void func_8005A3C0(void) {
if (gModeSelection != BATTLE) {
D_801657F0 = (D_801657F0 + 1) & 1;
}
D_801657E4 = (D_801657E4 + 1) & 1;
gHUDModes = (gHUDModes + 1) & 1;
b = true;
}
break;
case 4:
if ((gControllerOne->buttonPressed & R_CBUTTONS) || (gControllerTwo->buttonPressed & R_CBUTTONS) ||
(gControllerThree->buttonPressed & R_CBUTTONS) || (gControllerFour->buttonPressed & R_CBUTTONS)) {
D_801657E4 = (D_801657E4 + 1) & 1;
gHUDModes = (gHUDModes + 1) & 1;
D_801657F8 = (D_801657F8 + 1) & 1;
D_80165800[0] = (D_80165800[0] + 1) & 1;
if (gModeSelection != BATTLE) {
@@ -2610,7 +2610,7 @@ void func_8005CB60(s32 playerId, s32 lapCount) {
break;
case 3: /* switch 1 */
if ((D_8018D114 == 0) || (D_8018D114 == 1)) {
D_801657E4 = 0;
gHUDModes = 0;
D_801657E6 = 0;
D_801657F0 = 0;
D_801657E8 = 1;
+1 -1
View File
@@ -331,7 +331,7 @@ extern s8 D_801657D8;
extern s8 D_801657E1;
extern s8 D_801657E2;
extern s8 D_801657E3;
extern s8 D_801657E4;
extern s8 gHUDModes;
extern s8 D_801657E5;
extern bool D_801657E6;
extern u8 D_801657E7;
+8 -8
View File
@@ -370,7 +370,7 @@ void func_8006F008(void) {
}
void func_8006F824(s32 arg0) {
D_80165808 = D_801657E4;
D_80165808 = gHUDModes;
D_80165810 = D_801657E6;
D_80165820 = D_801657F0;
D_80165818 = D_801657E8;
@@ -385,14 +385,14 @@ void func_8006F824(s32 arg0) {
void func_8006F8CC(void) {
if (D_8018EDFC == 0) {
D_8018EDFC = 1;
D_801657E4 = 0;
gHUDModes = 0;
D_801657E6 = 0;
D_801657F0 = 0;
D_801657E8 = 1;
D_80165800[0] = D_80165800[1] = 1;
if (gPlayerCount == 4) {
if (gModeSelection != 3) {
D_801657E4 = 1;
gHUDModes = 1;
D_801657F0 = 1;
D_801657F8 = 1;
D_80165800[0] = D_80165800[1] = 0;
@@ -405,7 +405,7 @@ void func_8006F8CC(void) {
D_801657F8 = 1;
} else if (gPlayerCount == 2) {
if (gModeSelection != (s32) 3) {
D_801657E4 = 1;
gHUDModes = 1;
D_801657F0 = 1;
D_80165800[0] = D_80165800[1] = 0;
}
@@ -414,7 +414,7 @@ void func_8006F8CC(void) {
}
func_8006F824(0);
} else {
D_801657E4 = D_80165808;
gHUDModes = D_80165808;
D_801657E6 = D_80165810;
D_801657F0 = D_80165820;
D_801657E8 = D_80165818;
@@ -1067,9 +1067,9 @@ void init_hud_one_player(void) {
playerHUD[PLAYER_ONE].lapCompletionTimeXs[0] = 0x012C;
playerHUD[PLAYER_ONE].lapCompletionTimeXs[1] = 0x012C;
playerHUD[PLAYER_ONE].timerY = 0x0011;
playerHUD[PLAYER_ONE].lapX = -0x0028;
playerHUD[PLAYER_ONE].lapAfterImage1X = -0x0028;
playerHUD[PLAYER_ONE].lapAfterImage2X = -0x0028;
playerHUD[PLAYER_ONE].lapX = -40;
playerHUD[PLAYER_ONE].lapAfterImage1X = -40;
playerHUD[PLAYER_ONE].lapAfterImage2X = -40;
playerHUD[PLAYER_ONE].lapY = 0x0019;
playerHUD[PLAYER_ONE].itemBoxX = 0x00A0;
playerHUD[PLAYER_ONE].itemBoxY = -0x0020;
+68 -29
View File
@@ -3284,6 +3284,42 @@ Gfx* draw_box_fill_wide(Gfx* displayListHead, s32 ulx, s32 uly, s32 lrx, s32 lry
// draw a box with a solid outline
Gfx* draw_box(Gfx* displayListHead, s32 ulx, s32 uly, s32 lrx, s32 lry, u32 red, u32 green, u32 blue, u32 alpha) {
red &= 0xFF;
green &= 0xFF;
blue &= 0xFF;
alpha &= 0xFF;
if (lrx < ulx) {
swap_values(&ulx, &lrx);
}
if (lry < uly) {
swap_values(&uly, &lry);
}
if ((ulx >= 0x140) || (uly >= 0xF0)) {
return displayListHead;
}
if (ulx < 0) {
ulx = 0;
}
if (uly < 0) {
uly = 0;
}
if ((lrx < 0) || (lry < 0)) {
return displayListHead;
}
if (lrx >= 0x141) {
lrx = 0x140;
}
if (lry >= 0xF1) {
lry = 0xF0;
}
gSPDisplayList(displayListHead++, D_02008008);
gDPSetPrimColor(displayListHead++, 0, 0, red, green, blue, alpha);
gDPFillRectangle(displayListHead++, ulx, uly, lrx, lry);
gDPPipeSync(displayListHead++);
return displayListHead;
}
Gfx* draw_box_wide(Gfx* displayListHead, s32 ulx, s32 uly, s32 lrx, s32 lry, u32 red, u32 green, u32 blue, u32 alpha) {
red &= 0xFF;
green &= 0xFF;
blue &= 0xFF;
@@ -3316,7 +3352,6 @@ Gfx* draw_box(Gfx* displayListHead, s32 ulx, s32 uly, s32 lrx, s32 lry, u32 red,
gDPSetPrimColor(displayListHead++, 0, 0, red, green, blue, alpha);
gDPFillWideRectangle(displayListHead++, OTRGetRectDimensionFromLeftEdge(ulx), uly,
OTRGetRectDimensionFromRightEdge(lrx), lry);
//gDPFillRectangle(displayListHead++, ulx, uly, lrx, lry);
gDPPipeSync(displayListHead++);
return displayListHead;
}
@@ -3325,6 +3360,10 @@ Gfx* func_80098FC8(Gfx* displayListHead, s32 ulx, s32 uly, s32 lrx, s32 lry) {
return draw_box_fill(displayListHead, ulx, uly, lrx, lry, 0, 0, 0, 0xFF);
}
Gfx* func_80098FC8_wide(Gfx* displayListHead, s32 ulx, s32 uly, s32 lrx, s32 lry) {
return draw_box_fill_wide(displayListHead, ulx, uly, lrx, lry, 0, 0, 0, 0xFF);
}
void dma_copy_base_729a30(u64* arg0, size_t nbytes, void* vaddr) {
#ifdef TARGET_N64
OSIoMesg sp30;
@@ -4729,7 +4768,7 @@ void func_8009CBE4(s32 arg0, s32 arg1, s32 arg2) {
h = unk->screenHeight;
}
color = &D_800E7AE8[arg2];
gDisplayListHead = draw_box(gDisplayListHead, x - (w / 2), y - (h / 2), (w / 2) + x, (h / 2) + y, color->red,
gDisplayListHead = draw_box_wide(gDisplayListHead, x - (w / 2), y - (h / 2), (w / 2) + x, (h / 2) + y, color->red,
color->green, color->blue, 0xFF - (D_8018E7D0[arg0] * 0xFF / D_8018E7B8[arg0]));
if ((arg1 == 0) && (D_8018E7D0[arg0] += 1, (D_8018E7D0[arg0] >= D_8018E7B8[arg0]))) {
@@ -5146,7 +5185,7 @@ void func_8009D77C(s32 arg0, s32 arg1, s32 arg2) {
someMath0 += var_t3;
someMath1 = temp_t8;
someMath1 += var_t4;
gDisplayListHead = draw_box(gDisplayListHead, var_t3 - temp_v1, var_t4 - temp_t8, someMath0, someMath1,
gDisplayListHead = draw_box_wide(gDisplayListHead, var_t3 - temp_v1, var_t4 - temp_t8, someMath0, someMath1,
temp_v0_2->red, temp_v0_2->green, temp_v0_2->blue, var_t2);
if (arg1 == 0) {
D_8018E7D0[arg0]++;
@@ -5198,7 +5237,7 @@ void func_8009D998(s32 arg0) {
someMath1 = temp_v1;
someMath1 += var_t1;
gDisplayListHead =
draw_box(gDisplayListHead, var_t0 - temp_v0, var_t1 - temp_v1, someMath0, someMath1, 0, 0, 0, 0x000000FF);
draw_box_wide(gDisplayListHead, var_t0 - temp_v0, var_t1 - temp_v1, someMath0, someMath1, 0, 0, 0, 0x000000FF);
}
void func_8009DAA8(void) {
@@ -5213,7 +5252,7 @@ void func_8009DAA8(void) {
if ((s32) var_t0 >= 0x100) {
var_t0 = 0x000000FF;
}
gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x00000140, 0x000000F0, 0, 0, 0, (s32) var_t0);
gDisplayListHead = draw_box_wide(gDisplayListHead, 0, 0, 0x00000140, 0x000000F0, 0, 0, 0, (s32) var_t0);
}
void func_8009DB8C(void) {
@@ -5264,7 +5303,7 @@ void func_8009DB8C(void) {
if (var_v1 >= 0x100) {
var_v1 = 0x000000FF;
}
gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x00000140, 0x000000F0, 0, 0, 0, var_v1);
gDisplayListHead = draw_box_wide(gDisplayListHead, 0, 0, 0x00000140, 0x000000F0, 0, 0, 0, var_v1);
}
void func_8009DEF8(u32 arg0, u32 arg1) {
@@ -6676,13 +6715,13 @@ void func_800A1350(struct_8018D9E0_entry* arg0) {
case 0:
case 2:
case 4:
gDisplayListHead = draw_box(gDisplayListHead, arg0->column, arg0->row, arg0->column + 0x40,
gDisplayListHead = draw_box_wide(gDisplayListHead, arg0->column, arg0->row, arg0->column + 0x40,
arg0->row + 0x4C, 0, 0, 0, 0x00000064);
break;
case 1:
case 3:
thing = arg0->unk1C;
gDisplayListHead = draw_box(gDisplayListHead, arg0->column + thing, arg0->row,
gDisplayListHead = draw_box_wide(gDisplayListHead, arg0->column + thing, arg0->row,
(arg0->column - thing) + 0x40, arg0->row + 0x4C, 0, 0, 0, 0x00000064);
break;
}
@@ -6740,7 +6779,7 @@ void func_800A15EC(struct_8018D9E0_entry* arg0) {
s16 courseId = gCupCourseOrder[(arg0->type - 0x7C) / 4][(arg0->type - 0x7C) % 4];
gDisplayListHead =
func_8009C204(gDisplayListHead, segmented_to_virtual_dupe(D_800E7D74[courseId]), arg0->column, arg0->row, 2);
gDisplayListHead = draw_box(gDisplayListHead, arg0->column, arg0->row + 0x27, arg0->column + 0x40, arg0->row + 0x30,
gDisplayListHead = draw_box_wide(gDisplayListHead, arg0->column, arg0->row + 0x27, arg0->column + 0x40, arg0->row + 0x30,
0, 0, 0, 0xFF);
gDisplayListHead = func_8009C204(gDisplayListHead, segmented_to_virtual_dupe(D_800E7DC4[courseId]), arg0->column,
arg0->row + 0x27, 3);
@@ -6928,7 +6967,7 @@ void func_800A1FB0(struct_8018D9E0_entry* arg0) {
char sp98[3];
struct_8018EE10_entry* var_v1;
gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x00000140, 0x000000F0, 0, 0, 0, 0x00000064);
gDisplayListHead = draw_box_wide(gDisplayListHead, 0, 0, 0x00000140, 0x000000F0, 0, 0, 0, 0x00000064);
switch (D_8018EDEC) { /* switch 1 */
case 0x15: /* switch 1 */
case 0x16: /* switch 1 */
@@ -7174,15 +7213,15 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A1FB0.s")
void func_800A2D1C(struct_8018D9E0_entry* arg0) {
switch (D_80164A28) {
case 1:
gDisplayListHead = func_80098FC8(gDisplayListHead, 0, 0, 0x13F, 0x28);
gDisplayListHead = func_80098FC8(gDisplayListHead, 0, 0xC7, 0x13F, 0xEF);
gDisplayListHead = func_80098FC8_wide(gDisplayListHead, 0, 0, 0x13F, 0x28);
gDisplayListHead = func_80098FC8_wide(gDisplayListHead, 0, 0xC7, 0x13F, 0xEF);
arg0->unk1C = 0x28;
break;
case 2:
arg0->unk1C -= 2;
if (arg0->unk1C > 0) {
gDisplayListHead = func_80098FC8(gDisplayListHead, 0, 0, 0x13F, arg0->unk1C);
gDisplayListHead = func_80098FC8(gDisplayListHead, 0, 0xEF - arg0->unk1C, 0x13F, 0xEF);
gDisplayListHead = func_80098FC8_wide(gDisplayListHead, 0, 0, 0x13F, arg0->unk1C);
gDisplayListHead = func_80098FC8_wide(gDisplayListHead, 0, 0xEF - arg0->unk1C, 0x13F, 0xEF);
} else {
arg0->type = 0;
}
@@ -7193,8 +7232,8 @@ void func_800A2D1C(struct_8018D9E0_entry* arg0) {
} else {
arg0->unk1C -= 2;
if (arg0->unk1C > 0) {
gDisplayListHead = func_80098FC8(gDisplayListHead, 0, 0, 0x13F, arg0->unk1C);
gDisplayListHead = func_80098FC8(gDisplayListHead, 0, 0xEF - arg0->unk1C, 0x13F, 0xEF);
gDisplayListHead = func_80098FC8_wide(gDisplayListHead, 0, 0, 0x13F, arg0->unk1C);
gDisplayListHead = func_80098FC8_wide(gDisplayListHead, 0, 0xEF - arg0->unk1C, 0x13F, 0xEF);
} else {
arg0->type = 0;
}
@@ -7765,7 +7804,7 @@ void render_pause_menu_time_trials(struct_8018D9E0_entry* arg0) {
s32 var_s0;
s32 zero = 0; // ?
gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, 0x0000008C);
gDisplayListHead = draw_box_wide(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, 0x0000008C);
set_text_color(TEXT_YELLOW);
draw_text(0x000000A0, 0x00000050, CourseManager_GetProps()->Name, 0, 1.0f,
1.0f);
@@ -7814,7 +7853,7 @@ void render_pause_menu_versus(struct_8018D9E0_entry* arg0) {
temp_t0 = temp_v0->screenStartY;
temp_t3 = temp_v0->screenWidth / 2;
temp_t4 = temp_v0->screenHeight / 2;
gDisplayListHead = draw_box(gDisplayListHead, temp_v1 - temp_t3, temp_t0 - temp_t4, temp_v1 + temp_t3,
gDisplayListHead = draw_box_wide(gDisplayListHead, temp_v1 - temp_t3, temp_t0 - temp_t4, temp_v1 + temp_t3,
temp_t0 + temp_t4, 0, 0, 0, 0x0000008C);
temp_s3 = &D_800E8540[(gScreenModeSelection * 4) + (gIsGamePaused - 1)];
for (var_s0 = 0; var_s0 < 4; var_s0++) {
@@ -7845,7 +7884,7 @@ void render_pause_grand_prix(struct_8018D9E0_entry* arg0) {
temp_t0 = temp_v0->screenStartY;
temp_t3 = temp_v0->screenWidth / 2;
temp_t4 = temp_v0->screenHeight / 2;
gDisplayListHead = draw_box(gDisplayListHead, temp_v1 - temp_t3, temp_t0 - temp_t4, temp_v1 + temp_t3,
gDisplayListHead = draw_box_wide(gDisplayListHead, temp_v1 - temp_t3, temp_t0 - temp_t4, temp_v1 + temp_t3,
temp_t0 + temp_t4, 0, 0, 0, 140);
temp_s3 = &D_800E85C0[(gScreenModeSelection * 4) + (gIsGamePaused - 1)];
temp_s0 = ((get_string_width(gCupNames[GetCupIndex()]) * one) + 10.0f) / 2;
@@ -7878,7 +7917,7 @@ void render_pause_battle(struct_8018D9E0_entry* arg0) {
temp_t0 = temp_v0->screenStartY;
temp_t3 = temp_v0->screenWidth / 2;
temp_t4 = temp_v0->screenHeight / 2;
gDisplayListHead = draw_box(gDisplayListHead, temp_v1 - temp_t3, temp_t0 - temp_t4, temp_v1 + temp_t3,
gDisplayListHead = draw_box_wide(gDisplayListHead, temp_v1 - temp_t3, temp_t0 - temp_t4, temp_v1 + temp_t3,
temp_t0 + temp_t4, 0, 0, 0, 0x0000008C);
temp_s3 = &D_800E8600[(gScreenModeSelection * 4) + (gIsGamePaused - 1)];
for (var_a1 = 0; var_a1 < 4; var_a1++) {
@@ -7956,7 +7995,7 @@ void func_800A5738(struct_8018D9E0_entry* arg0) {
if ((arg0->unk1C >= 0x1E) && ((gGlobalTimer / 16) % 2)) {
why = get_string_width(gTextPauseButton[5]) * 0.8f;
gDisplayListHead =
draw_box(gDisplayListHead, 0x000000C0, 0x00000021, (s32) (why) + 0xC6, 0x00000032, 0, 0, 0, 0x00000096);
draw_box_wide(gDisplayListHead, 0x000000C0, 0x00000021, (s32) (why) + 0xC6, 0x00000032, 0, 0, 0, 0x00000096);
set_text_color(1);
func_80093324(0x000000BF, 0x00000030, gTextPauseButton[5], 0, 0.8f, 0.8f);
}
@@ -7968,7 +8007,7 @@ void func_800A5738(struct_8018D9E0_entry* arg0) {
var_s1 = 0x0000008C;
var_s2 = 0x000000FF;
}
gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, var_s1);
gDisplayListHead = draw_box_wide(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, var_s1);
gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x00, 0x00, 0x00, var_s2);
set_text_color(3);
func_80093754(0x000000A0, 0x00000050, CourseManager_GetProps()->Name,
@@ -8122,14 +8161,14 @@ void func_800A6154(struct_8018D9E0_entry* arg0) {
s32 var_s1;
if (arg0->cursor == 0) {
gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, arg0->unk1C);
gDisplayListHead = draw_box_wide(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, arg0->unk1C);
set_text_color(3);
gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x00, 0x00, 0x00, (arg0->unk1C * 0xFF) / 100);
for (var_s1 = 0, var_s0 = 0x96; var_s0 < 0xBE; var_s1++, var_s0 += 0x14) {
func_80093358(0x0000008C, var_s0, gTextPauseButton[(var_s1 * 3) + 1], 0, 1.0f, 1.0f);
}
} else {
gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, 0x00000064);
gDisplayListHead = draw_box_wide(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, 0x00000064);
for (var_s1 = 0, var_s0 = 0x96; var_s1 < 2; var_s1++, var_s0 += 0x14) {
text_rainbow_effect(arg0->cursor - 0xB, var_s1, TEXT_YELLOW);
func_80093324(0x0000008C, var_s0, gTextPauseButton[(var_s1 * 3) + 1], 0, 1.0f, 1.0f);
@@ -8154,12 +8193,12 @@ void func_800A638C(struct_8018D9E0_entry* arg0) {
UNUSED s8** var_s2;
if (arg0->cursor == 0) {
gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, arg0->unk1C);
gDisplayListHead = draw_box_wide(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, arg0->unk1C);
set_text_color(5);
gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x00, 0x00, 0x00, (arg0->unk1C * 0xFF) / 100);
func_80093754(0x000000A0, arg0->row + 0x1E, D_800E7778[gModeSelection / 3], 0, 1.0f, 1.0f);
} else {
gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, 0x00000064);
gDisplayListHead = draw_box_wide(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, 0x00000064);
set_text_color(5);
draw_text(0x000000A0, arg0->row + 0x1E, D_800E7778[gModeSelection / 3], 0, 1.0f, 1.0f);
}
@@ -8411,10 +8450,10 @@ void func_800A70E8(struct_8018D9E0_entry* arg0) {
void func_800A7258(struct_8018D9E0_entry* arg0) {
if (arg0->cursor == 0) {
// If shading layer is fading in
gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x13F, 0xEF, 0, 0, 0, arg0->unk1C);
gDisplayListHead = draw_box_wide(gDisplayListHead, 0, 0, 0x13F, 0xEF, 0, 0, 0, arg0->unk1C);
} else {
// All other stages of the podium scene
gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x13F, 0xEF, 0, 0, 0, 0x64);
gDisplayListHead = draw_box_wide(gDisplayListHead, 0, 0, 0x13F, 0xEF, 0, 0, 0, 0x64);
}
}
@@ -9180,7 +9219,7 @@ void func_800A8CA4(struct_8018D9E0_entry* arg0) {
// Wut?
if ((var_s0 != (temp_v0->unk1C % 4)) != 0) {
gDisplayListHead =
draw_box(gDisplayListHead, D_800E7208[var_s0][0].column + temp_s2,
draw_box_wide(gDisplayListHead, D_800E7208[var_s0][0].column + temp_s2,
D_800E7208[var_s0][0].row + temp_s3, D_800E7208[var_s0][1].column + temp_s2,
D_800E7208[var_s0][1].row + temp_s3, 0, 0, 0, 0x00000064);
}
+1
View File
@@ -174,6 +174,7 @@ Gfx* func_80098558(Gfx*, u32, u32, u32, u32, u32, u32, s32, s32);
Gfx* func_800987D0(Gfx*, u32, u32, u32, u32, s32, s32, u8*, u32, s32);
Gfx* draw_box_fill(Gfx*, s32, s32, s32, s32, s32, s32, s32, s32);
Gfx* draw_box(Gfx*, s32, s32, s32, s32, u32, u32, u32, u32);
Gfx* draw_box_wide(Gfx*, s32, s32, s32, s32, u32, u32, u32, u32);
Gfx* func_80098FC8(Gfx*, s32, s32, s32, s32);
void dma_copy_base_729a30(u64*, size_t, void*);
void dma_copy_base_7fa3c0(u64*, size_t, void*);
+49
View File
@@ -13,6 +13,8 @@
#include "defines.h"
#include "camera.h"
#include "port/Engine.h"
#pragma intrinsic(sqrtf)
UNUSED void operator_or(s32* arg0, s32 arg1) {
@@ -697,6 +699,53 @@ UNUSED void func_800421FC(s32 x, s32 y, f32 scale) {
void func_80042330(s32 x, s32 y, u16 angle, f32 scale) {
Mat4 matrix;
//printf("panel %d %d %d\n", x, (s32)OTRGetDimensionFromLeftEdge(x), (s32)OTRGetDimensionFromLeftEdge(0));
if (gHUDModes != 2) {
if (x < (SCREEN_WIDTH / 2)) {
x = (s32)OTRGetDimensionFromLeftEdge(x);
} else {
x = (s32)OTRGetDimensionFromRightEdge(x);
}
}
mtxf_translation_x_y_rotate_z_scale_x_y(matrix, x, y, angle, scale);
// convert_to_fixed_point_matrix(&gGfxPool->mtxHud[gMatrixHudCount], matrix);
// gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxHud[gMatrixHudCount++]),
// G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
AddHudMatrix(matrix, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
}
void func_80042330_portrait(s32 x, s32 y, u16 angle, f32 scale, s16 lapCount) {
Mat4 matrix;
//printf("panel %d %d %d\n", x, (s32)OTRGetDimensionFromLeftEdge(x), (s32)OTRGetDimensionFromLeftEdge(0));
if (gHUDModes != 2 && lapCount < 3) {
if (x < (SCREEN_WIDTH / 2)) {
x = (s32)OTRGetDimensionFromLeftEdge(x);
} else {
x = (s32)OTRGetDimensionFromRightEdge(x);
}
}
mtxf_translation_x_y_rotate_z_scale_x_y(matrix, x, y, angle, scale);
// convert_to_fixed_point_matrix(&gGfxPool->mtxHud[gMatrixHudCount], matrix);
// gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxHud[gMatrixHudCount++]),
// G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
AddHudMatrix(matrix, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
}
void func_80042330_wide(s32 x, s32 y, u16 angle, f32 scale) {
Mat4 matrix;
if (x < (SCREEN_WIDTH / 2)) {
x = (s32)OTRGetDimensionFromLeftEdge(x);
} else {
x = (s32)OTRGetDimensionFromRightEdge(x);
}
mtxf_translation_x_y_rotate_z_scale_x_y(matrix, x, y, angle, scale);
// convert_to_fixed_point_matrix(&gGfxPool->mtxHud[gMatrixHudCount], matrix);
// gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxHud[gMatrixHudCount++]),
+2
View File
@@ -70,6 +70,8 @@ void func_80041D24(void);
void func_80041D34(void);
void set_matrix_hud_screen(void);
void func_80042330(s32, s32, u16, f32);
void func_80042330_portrait(s32, s32, u16, f32, s16);
void func_80042330_wide(s32, s32, u16, f32);
void mtxf_set_matrix_transformation(Mat4, Vec3f, Vec3su, f32);
void mtxf_set_matrix_scale_transl(Mat4, Vec3f, Vec3f, f32);
void mtxf_set_matrix_gObjectList(s32, Mat4);
+135 -27
View File
@@ -41,6 +41,7 @@
#include <assets/bowsers_castle_data.h>
#include <assets/frappe_snowland_data.h>
#include "port/Game.h"
#include "port/Engine.h"
#include "engine/Engine.h"
#include "engine/courses/Course.h"
@@ -1293,7 +1294,7 @@ void func_8004A2F4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 red, s32 green, s
void func_8004A384(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 red, s32 green, s32 blue, s32 alpha, u8* texture,
Vtx* arg9, s32 argA, s32 argB, s32 argC, s32 argD) {
func_80042330(arg0, arg1, arg2, arg3);
func_80042330_wide(arg0, arg1, arg2, arg3);
gSPDisplayList(gDisplayListHead++, D_0D007A60);
func_8004B414(red, green, blue, alpha);
func_80049970(texture, arg9, argA, argB, argC, argD);
@@ -1577,17 +1578,68 @@ void func_8004B7DC(s32 x, s32 y, s32 width, s32 height, s32 arg4, s32 arg5, s32
if (arg6 == 0) {
//! @todo Update to F3DEX. Uses OLD definition for gspTextureRectangle.
gSPTextureRectangle(gDisplayListHead++, xl, yl, xh, yh, G_TX_RENDERTILE, arg4 << 5, (arg5 << 5), 4 << 10,
1 << 10);
1 << 10);
return;
}
gSPTextureRectangle(gDisplayListHead++, xl, yl, xh2, yh2, G_TX_RENDERTILE, arg4 << 5, (arg5 << 5), 1 << 10,
1 << 10);
1 << 10);
}
void func_8004B7DC_wide(s32 x, s32 y, s32 width, s32 height, s32 arg4, s32 arg5, s32 arg6) {
s32 xh = (((x + width) - 1));
s32 yh = (((y + height) - 1) << 2);
s32 xl = ((x));
s32 yl = y * 4;
s32 xh2 = (((x + width)));
s32 yh2 = ((y + height) << 2);
// if center of image is to the left side of the screen then align left,
// otherwise align right
s32 coordX = 0;
s32 coordX2 = 0;
if (arg6 == 0) {
if ((xl - (width / 2)) < (SCREEN_WIDTH / 2)) {
coordX = (s32)OTRGetDimensionFromLeftEdge(xl) << 2;
coordX2 = (s32)(xh) << 2;
} else {
coordX = (s32)OTRGetDimensionFromRightEdge(xl) << 2;
coordX2 = (s32)OTRGetDimensionFromRightEdge(xh) << 2;
}
//! @todo Update to F3DEX. Uses OLD definition for gspTextureRectangle.
gSPWideTextureRectangle(gDisplayListHead++, coordX, yl, coordX2, yh, G_TX_RENDERTILE, arg4 << 5, (arg5 << 5), 4 << 10,
1 << 10);
//OTRGetDimensionFromLeftEdge
//gSPTextureRectangle(gDisplayListHead++, xl, yl, xh, yh, G_TX_RENDERTILE, arg4 << 5, (arg5 << 5), 4 << 10,
// 1 << 10);
} else {
if ((xl - (width / 2)) < (SCREEN_WIDTH / 2)) {
coordX = (s32)OTRGetDimensionFromLeftEdge(xl) << 2;
coordX2 = (s32)(xh2) << 2;
} else {
coordX = (s32)OTRGetDimensionFromRightEdge(xl) << 2;
coordX2 = (s32)OTRGetDimensionFromRightEdge(xh2) << 2;
}
gSPWideTextureRectangle(gDisplayListHead++, coordX, yl,
coordX2, yh2, G_TX_RENDERTILE, arg4 << 5, (arg5 << 5), 1 << 10,
1 << 10);
}
//gSPTextureRectangle(gDisplayListHead++, xl, yl, xh2, yh2, G_TX_RENDERTILE, arg4 << 5, (arg5 << 5), 1 << 10,
// 1 << 10);
}
void func_8004B950(s32 x, s32 y, s32 width, s32 height, s32 arg4) {
func_8004B7DC(x, y, width, height, 0, 0, arg4);
}
// Positions item window, the Lap 1/2/3, TIME texture, and minimap on the screen.
void func_8004B97C(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
UNUSED s32 pad[2];
s32 sp2C;
@@ -1612,6 +1664,30 @@ void func_8004B97C(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
}
}
void func_8004B97C_wide(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
UNUSED s32 pad[2];
s32 sp2C;
s32 var_a1;
s32 var_v0;
s32 var_v1;
if ((-arg2 < arg0) && (-arg3 < arg1)) {
var_v0 = 0;
var_v1 = 0;
sp2C = arg0;
var_a1 = arg1;
if (arg0 < 0) {
var_v1 = -arg0;
sp2C = 0;
}
if (arg1 < 0) {
var_v0 = -arg1;
var_a1 = 0;
}
func_8004B7DC_wide(sp2C, var_a1, arg2 - var_v1, arg3 - var_v0, var_v1, var_v0, arg4);
}
}
void func_8004BA08(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
UNUSED s32 pad[2];
s32 sp2C;
@@ -1636,6 +1712,7 @@ void func_8004BA08(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
}
}
// Places the timer on the screen
void func_8004BA98(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6) {
UNUSED s32 pad[2];
s32 sp34;
@@ -1662,7 +1739,37 @@ void func_8004BA98(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s
sp30 = 0;
phi_a3 = arg3 + arg1;
}
func_8004B7DC(sp34, sp30, sp2C, phi_a3, phi_v0, phi_v1, arg6);
func_8004B7DC_wide(sp34, sp30, sp2C, phi_a3, phi_v0, phi_v1, arg6);
}
}
void func_8004BA98_wide(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6) {
UNUSED s32 pad[2];
s32 sp34;
s32 sp30;
s32 sp2C;
s32 phi_a3;
s32 phi_v0;
s32 phi_v1;
if ((-arg2 < arg0) && (-arg3 < arg1)) {
sp34 = arg0;
sp30 = arg1;
phi_v0 = arg4;
sp2C = arg2;
phi_a3 = arg3;
phi_v1 = arg5;
if (arg0 < 0) {
phi_v0 = arg4 - arg0;
sp34 = 0;
sp2C = arg2 + arg0;
}
if (arg1 < 0) {
phi_v1 = arg5 - arg1;
sp30 = 0;
phi_a3 = arg3 + arg1;
}
func_8004B7DC_wide(sp34, sp30, sp2C, phi_a3, phi_v0, phi_v1, arg6);
}
}
@@ -1749,7 +1856,7 @@ void func_8004C268(u32 arg0, u32 arg1, u8* texture, u32 width, u32 arg4, u32 hei
for (i = 0; (u32) i < (arg4 / height); i++) {
load_texture_block_rgba16_mirror(img2, width, height);
func_8004B97C(arg0, arg1, width, height, arg6);
func_8004B97C_wide(arg0, arg1, width, height, arg6);
//! @todo fakematch?
#ifdef AVOID_UB
img2 += (width * height) * 2;
@@ -1771,7 +1878,7 @@ void draw_hud_2d_texture(s32 x, s32 y, u32 width, u32 height, u8* texture) {
gSPDisplayList(gDisplayListHead++, D_0D007EF8);
gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD);
load_texture_block_rgba16_mirror(texture, width, height);
func_8004B97C(x - (width >> 1), y - (height >> 1), width, height, 0);
func_8004B97C_wide(x - (width >> 1), y - (height >> 1), width, height, 0);
gSPDisplayList(gDisplayListHead++, D_0D007EB8);
}
@@ -1780,7 +1887,7 @@ void func_8004C450(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8* texture) {
gSPDisplayList(gDisplayListHead++, D_0D007F38);
func_8004B614(D_801656C0, D_801656D0, D_801656E0, 0x80, 0x80, 0x80, 0xFF);
load_texture_block_rgba16_mirror(texture, arg2, arg3);
func_8004B97C(arg0 - (arg2 >> 1), arg1 - (arg3 >> 1), arg2, arg3, 1);
func_8004B97C_wide(arg0 - (arg2 >> 1), arg1 - (arg3 >> 1), arg2, arg3, 1);
gSPDisplayList(gDisplayListHead++, D_0D007EB8);
}
@@ -1790,7 +1897,7 @@ UNUSED void func_8004C53C(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8* texture) {
gSPDisplayList(gDisplayListHead++, D_0D007EF8);
gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD);
load_texture_tile_rgba16_nomirror(texture, arg2, arg3);
func_8004B97C(arg0 - (arg2 >> 1), arg1 - (arg3 >> 1), arg2, arg3, 0);
func_8004B97C_wide(arg0 - (arg2 >> 1), arg1 - (arg3 >> 1), arg2, arg3, 0);
gSPDisplayList(gDisplayListHead++, D_0D007EB8);
}
@@ -1799,7 +1906,7 @@ void func_8004C628(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8* texture) {
gSPDisplayList(gDisplayListHead++, D_0D007EF8);
gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD);
load_texture_block_rgba32_nomirror(texture, arg2, arg3);
func_8004B97C(arg0 - (arg2 >> 1), arg1 - (arg3 >> 1), arg2, arg3, 1);
func_8004B97C_wide(arg0 - (arg2 >> 1), arg1 - (arg3 >> 1), arg2, arg3, 1);
gSPDisplayList(gDisplayListHead++, D_0D007EB8);
}
@@ -1938,7 +2045,7 @@ UNUSED void func_8004CD48(s32 arg0, s32 arg1, UNUSED u8* texture, s32 width, s32
for (i = 0; i < arg4 / height; i++) {
load_texture_block_ia16_nomirror(img, width, height);
func_8004B97C(arg0 - (width / 2), var_s0, width, height, 1);
func_8004B97C_wide(arg0 - (width / 2), var_s0, width, height, 1);
img += width * height * 2;
var_s0 += height;
}
@@ -1951,7 +2058,7 @@ UNUSED void func_8004CE8C(s32 arg0, s32 arg1, u8* texture, s32 width, s32 arg4,
for (i = 0; i < arg4 / height; i++) {
load_texture_block_ia8_nomirror(img, width, height);
func_8004B97C(arg0 - (width / 2), var_s0, width, height, 1);
func_8004B97C_wide(arg0 - (width / 2), var_s0, width, height, 1);
img += width * height;
var_s0 += height;
}
@@ -1988,7 +2095,7 @@ UNUSED void func_8004D0D4(s32 arg0, s32 arg1, u8* texture, s32 width, s32 arg4,
for (i = 0; i < arg4 / height; i++) {
func_80044924(img, width, height);
func_8004B97C(arg0 - (width / 2), var_s0, width, height, 1);
func_8004B97C_wide(arg0 - (width / 2), var_s0, width, height, 1);
img += width * height;
var_s0 += height;
}
@@ -2007,7 +2114,7 @@ void func_8004D210(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4, s32 arg5
for (i = 0; i < arg8 / height; i++) {
func_80044924(img, width, height);
func_8004B97C(arg0 - (width / 2), var_s3, width, height, 1);
func_8004B97C_wide(arg0 - (width / 2), var_s3, width, height, 1);
img += (width * height) / 2;
var_s3 += height;
}
@@ -2026,7 +2133,7 @@ void func_8004D37C(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4, s32 arg5
for (i = 0; i < arg8 / height; i++) {
func_80044F34(img, width, height);
func_8004B97C(arg0 - (width / 2), var_s3, width, height, 1);
func_8004B97C_wide(arg0 - (width / 2), var_s3, width, height, 1);
img += (width * height) / 2;
var_s3 += height;
}
@@ -2095,7 +2202,7 @@ void func_8004D7B4(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4) {
temp_s5 = (s32) ((sins(temp_s0) * temp_f20) + (f32) (arg0 - (arg3 / 2)));
sins(temp_s0);
load_texture_block_ia16_nomirror(img, arg3, 1);
func_8004B97C(temp_s5, var_s3, arg3, 1, 1);
func_8004B97C_wide(temp_s5, var_s3, arg3, 1, 1);
var_s1 += temp_s7;
var_s3 += 1;
@@ -2129,7 +2236,7 @@ void func_8004D93C(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4) {
temp_s6 = (s32) ((sins(temp_s0) * temp_f20) + (f32) (arg0 - (var)));
sins(temp_s0);
load_texture_block_ia8_nomirror(img, arg3, 1);
func_8004B97C(temp_s6, var_s4, arg3, 1, 1);
func_8004B97C_wide(temp_s6, var_s4, arg3, 1, 1);
var_s1 += temp_s7;
img = &img[arg3];
var_s4 += 1;
@@ -2161,7 +2268,7 @@ UNUSED void func_8004DAB8(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4) {
temp_s6 = (s32) ((sins(temp_s0) * temp_f20) + (f32) (arg0 - (var)));
sins(temp_s0);
func_80044924(img, arg3, 1);
func_8004B97C(temp_s6, var_s4, arg3, 1, 1);
func_8004B97C_wide(temp_s6, var_s4, arg3, 1, 1);
var_s1 += temp_s7;
img += arg3;
var_s4 += 1;
@@ -2232,6 +2339,7 @@ UNUSED void func_8004DF24(s32 arg0, s32 arg1, u8* arg2) {
func_8004CF9C(arg0, arg1, arg2, 128, 32, 128, 32);
}
// Positions the item box on screen
void func_8004DF5C(s32 arg0, s32 arg1, u8* texture, s32 width, s32 arg4, s32 height) {
s32 var_s0 = var_s0 = arg1 - (arg4 / 2);
u8* img = texture;
@@ -2269,7 +2377,7 @@ void func_8004E06C(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4) {
temp_s6 = (u32) ((sins(temp_s0) * temp_f20) + (f32) (arg0 - var));
sins(temp_s0);
rsp_load_texture(img, arg3, 1);
func_8004B97C(temp_s6, var_s4, arg3, 1, 1);
func_8004B97C_wide(temp_s6, var_s4, arg3, 1, 1);
var_s1 += temp_s7;
img += arg3;
var_s4 += 1;
@@ -2736,9 +2844,9 @@ void draw_lap_count(s16 lapX, s16 lapY, s8 lap) {
load_texture_block_rgba16_mirror((u8*) common_texture_hud_123, 32, 8);
// Display current lap. Ex. 1/3
func_8004BA98(lapX, lapY, 8, 8, lap * 8, 0, 0); // display the digit
func_8004BA98(lapX + 8, lapY, 8, 8, 24, 0, 0); // display the /
func_8004BA98(lapX + 16, lapY, 8, 8, 16, 0, 0); // display the 3
func_8004BA98_wide(lapX, lapY, 8, 8, lap * 8, 0, 0); // display the digit
func_8004BA98_wide(lapX + 8, lapY, 8, 8, 24, 0, 0); // display the /
func_8004BA98_wide(lapX + 16, lapY, 8, 8, 16, 0, 0); // display the 3
gSPDisplayList(gDisplayListHead++, D_0D007EB8);
}
@@ -2751,7 +2859,7 @@ void func_8004FDB4(f32 arg0, f32 arg1, s16 arg2, s16 arg3, s16 characterId, s32
rsp_load_texture(common_texture_portrait_question_mark, 0x00000020, 0x00000020);
gSPDisplayList(gDisplayListHead++, D_0D0069E0);
} else {
func_80042330(arg0, arg1, 0U, 1.0f);
func_80042330_portrait(arg0, arg1, 0U, 1.0f, arg3);
gSPDisplayList(gDisplayListHead++, D_0D007DB8);
func_8004B35C(0x000000FF, 0x000000FF, 0x000000FF, arg5);
gDPLoadTLUT_pal256(gDisplayListHead++, gPortraitTLUTs[characterId]);
@@ -2762,7 +2870,7 @@ void func_8004FDB4(f32 arg0, f32 arg1, s16 arg2, s16 arg3, s16 characterId, s32
gSPDisplayList(gDisplayListHead++, D_0D0069E0);
}
if (arg6 != 0) {
func_80042330(arg0, arg1, 0U, 1.0f);
func_80042330_portrait(arg0, arg1, 0U, 1.0f, arg3);
gSPDisplayList(gDisplayListHead++, D_0D007A60);
func_8004B35C(D_8018D3E4, D_8018D3E8, D_8018D3EC, 0x000000FF);
func_80044924(common_texture_character_portrait_border, 0x20, 0x20);
@@ -2774,9 +2882,9 @@ void func_8004FDB4(f32 arg0, f32 arg1, s16 arg2, s16 arg3, s16 characterId, s32
gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_hud_type_C_rank_font);
rsp_load_texture(common_texture_hud_type_C_rank_font[arg2], 0x00000010, 0x00000010);
if (arg7 != 0) {
func_80042330((s32) (arg0 + 9.0f), (s32) (arg1 + 7.0f), 0U, 1.0f);
func_80042330_portrait((s32) (arg0 + 9.0f), (s32) (arg1 + 7.0f), 0U, 1.0f, arg3);
} else {
func_80042330((s32) (arg0 - 9.0f), (s32) (arg1 + 7.0f), 0U, 1.0f);
func_80042330_portrait((s32) (arg0 - 9.0f), (s32) (arg1 + 7.0f), 0U, 1.0f, arg3);
}
gSPDisplayList(gDisplayListHead++, D_0D006980);
}
@@ -3073,9 +3181,9 @@ void func_80050E34(s32 playerId, s32 arg1) {
gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_hud_type_C_rank_tiny_font);
rsp_load_texture(common_texture_hud_type_C_rank_tiny_font[arg1 + 1], 8, 8);
if (spB8 != 0) {
func_80042330(spD0 + 0x26, (spC4 + spCC) + 4, 0U, 1.0f);
func_80042330_portrait(spD0 + 0x26, (spC4 + spCC) + 4, 0U, 1.0f, lapCount);
} else {
func_80042330(spD0 + 0x1B, (spC4 + spCC) + 4, 0U, 1.0f);
func_80042330_portrait(spD0 + 0x1B, (spC4 + spCC) + 4, 0U, 1.0f, lapCount);
}
gSPDisplayList(gDisplayListHead++, D_0D006950);
if ((player == gPlayerOne) && (gScreenModeSelection == SCREEN_MODE_1P)) {