Rename a couple variables (#93)

* Rename a couple variables

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
This commit is contained in:
Tyler McGavran
2021-12-14 22:40:38 -05:00
committed by GitHub
parent 66d9a4fe88
commit d587580bd5
52 changed files with 362 additions and 359 deletions
+2 -2
View File
@@ -46,7 +46,7 @@ extern u32 D_8015F730;
extern u32 D_8015F734;
extern u32 gPrevLoadedAddress;
extern s32 D_80150120;
extern s16 gCupTrackOrder[][4];
extern s16 gCupCourseOrder[][4];
void func_800CA008(u8, u8);
@@ -141,7 +141,7 @@ void func_80002A18(void) {
gCourseDirection = 1.0f;
}
if (gModeSelection == GRAND_PRIX) {
gCurrentCourseId = gCupTrackOrder[gCupSelection][gCourseSelection];
gCurrentCourseId = gCupCourseOrder[gCupSelection][gCupCourseSelection];
}
D_800DC52C = D_800DC530;
if (gCurrentCourseId != gCurrentlyLoadedCourseId) {
+60 -60
View File
@@ -272,14 +272,14 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_800065D0.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
extern ? gTimePlayerLastTouchedFinishLine;
extern ? gTrackCompletionPercentByRank;
extern ? gCourseCompletionPercentByRank;
extern s16 D_8016348C;
extern s16 D_80164360;
extern ? D_80164378;
extern ? D_801643D8;
extern ? D_801643E0;
extern ? D_80164408;
extern ? gTrackCompletionPercentByPlayerId;
extern ? gCourseCompletionPercentByPlayerId;
extern ? gPlayers;
void set_places(void) {
@@ -474,14 +474,14 @@ block_7:
temp_a1 = 0 * 4;
phi_t2 = (0 * 2) + &D_80164360;
phi_v0 = temp_a1 + &sp80;
phi_v1 = temp_a1 + &gTrackCompletionPercentByRank;
phi_v1 = temp_a1 + &gCourseCompletionPercentByRank;
phi_t1 = 1;
do {
temp_a0 = *phi_t2;
temp_v0_2 = phi_v0 + 4;
temp_v1 = phi_v1 + 4;
temp_v0_2->unk-4 = temp_a0;
temp_v1->unk-4 = *(&gTrackCompletionPercentByPlayerId + (temp_a0 * 4));
temp_v1->unk-4 = *(&gCourseCompletionPercentByPlayerId + (temp_a0 * 4));
phi_t2 += 2;
phi_v0 = temp_v0_2;
phi_v1 = temp_v1;
@@ -496,7 +496,7 @@ block_13:
temp_a1_2 = phi_t3_9 * 4;
phi_t2_2 = (phi_t3_9 * 2) + &D_80164360;
phi_v0_2 = temp_a1_2 + &sp80;
phi_v1_2 = temp_a1_2 + &gTrackCompletionPercentByRank;
phi_v1_2 = temp_a1_2 + &gCourseCompletionPercentByRank;
do {
temp_a0_2 = *phi_t2_2;
temp_v1_2 = phi_v1_2 + 0x10;
@@ -507,16 +507,16 @@ block_13:
temp_a0_4 = temp_t2->unk-4;
phi_v0_2->unk8 = temp_a0_4;
temp_a0_5 = temp_t2->unk-2;
temp_v1_2->unk-10 = *(&gTrackCompletionPercentByPlayerId + (temp_a0_2 * 4));
temp_v1_2->unk-10 = *(&gCourseCompletionPercentByPlayerId + (temp_a0_2 * 4));
temp_v0_3 = phi_v0_2 + 0x10;
temp_v1_2->unk-C = *(&gTrackCompletionPercentByPlayerId + (temp_a0_3 * 4));
temp_v1_2->unk-C = *(&gCourseCompletionPercentByPlayerId + (temp_a0_3 * 4));
temp_v0_3->unk-4 = temp_a0_5;
temp_v1_2->unk-4 = *(&gTrackCompletionPercentByPlayerId + (temp_a0_5 * 4));
temp_v1_2->unk-8 = *(&gTrackCompletionPercentByPlayerId + (temp_a0_4 * 4));
temp_v1_2->unk-4 = *(&gCourseCompletionPercentByPlayerId + (temp_a0_5 * 4));
temp_v1_2->unk-8 = *(&gCourseCompletionPercentByPlayerId + (temp_a0_4 * 4));
phi_t2_2 = temp_t2;
phi_v0_2 = temp_v0_3;
phi_v1_2 = temp_v1_2;
} while (temp_v1_2 != ((phi_t4 * 4) + &gTrackCompletionPercentByRank));
} while (temp_v1_2 != ((phi_t4 * 4) + &gCourseCompletionPercentByRank));
}
}
phi_t3 = 0;
@@ -529,7 +529,7 @@ block_13:
temp_a1_3 = 0 * 4;
phi_t2_3 = (0 * 2) + &D_80164360;
phi_v0_3 = temp_a1_3 + &sp80;
phi_v1_3 = temp_a1_3 + &gTrackCompletionPercentByRank;
phi_v1_3 = temp_a1_3 + &gCourseCompletionPercentByRank;
phi_t1_2 = 1;
do {
temp_a0_6 = *phi_t2_3;
@@ -551,7 +551,7 @@ block_22:
temp_a1_4 = phi_t3_10 * 4;
phi_t2_4 = (phi_t3_10 * 2) + &D_80164360;
phi_v0_4 = temp_a1_4 + &sp80;
phi_v1_4 = temp_a1_4 + &gTrackCompletionPercentByRank;
phi_v1_4 = temp_a1_4 + &gCourseCompletionPercentByRank;
do {
temp_a0_7 = *phi_t2_4;
temp_v1_4 = phi_v1_4 + 0x10;
@@ -571,7 +571,7 @@ block_22:
phi_t2_4 = temp_t2_2;
phi_v0_4 = temp_v0_5;
phi_v1_4 = temp_v1_4;
} while (temp_v1_4 != ((phi_t4 * 4) + &gTrackCompletionPercentByRank));
} while (temp_v1_4 != ((phi_t4 * 4) + &gCourseCompletionPercentByRank));
}
}
}
@@ -585,10 +585,10 @@ block_22:
phi_s0_2 = phi_t1_3;
if (phi_t1_3 < phi_t4) {
temp_a1_5 = phi_t3 * 4;
temp_v1_5 = temp_a1_5 + &gTrackCompletionPercentByRank;
temp_v1_5 = temp_a1_5 + &gCourseCompletionPercentByRank;
if (((phi_t4 - phi_t1_3) & 1) != 0) {
temp_t3 = phi_t1_3 * 4;
temp_s1 = temp_t3 + &gTrackCompletionPercentByRank;
temp_s1 = temp_t3 + &gCourseCompletionPercentByRank;
temp_f2 = *temp_s1;
temp_f0 = *temp_v1_5;
if (temp_f0 < temp_f2) {
@@ -610,7 +610,7 @@ block_22:
} else {
block_34:
temp_t3_2 = phi_s0_2 * 4;
phi_s1 = temp_t3_2 + &gTrackCompletionPercentByRank;
phi_s1 = temp_t3_2 + &gCourseCompletionPercentByRank;
phi_s0 = phi_s0_2;
phi_t3_2 = temp_t3_2;
do {
@@ -724,14 +724,14 @@ block_50:
temp_a1_7 = 0 * 4;
phi_a2 = (0 * 2) + &D_80164378;
phi_v0_8 = &sp80 + temp_a1_7;
phi_v1_6 = temp_a1_7 + &gTrackCompletionPercentByRank;
phi_v1_6 = temp_a1_7 + &gCourseCompletionPercentByRank;
phi_t1_6 = 0 + 1;
do {
temp_a1_8 = *phi_a2;
temp_v0_11 = phi_v0_8 + 4;
temp_v1_9 = phi_v1_6 + 4;
temp_v0_11->unk-4 = temp_a1_8;
temp_v1_9->unk-4 = *(&gTrackCompletionPercentByPlayerId + (temp_a1_8 * 4));
temp_v1_9->unk-4 = *(&gCourseCompletionPercentByPlayerId + (temp_a1_8 * 4));
phi_a2 += 2;
phi_v0_8 = temp_v0_11;
phi_v1_6 = temp_v1_9;
@@ -746,7 +746,7 @@ block_58:
temp_a1_9 = phi_t3_12 * 4;
phi_a2_2 = (phi_t3_12 * 2) + &D_80164378;
phi_v0_9 = &sp80 + temp_a1_9;
phi_v1_7 = temp_a1_9 + &gTrackCompletionPercentByRank;
phi_v1_7 = temp_a1_9 + &gCourseCompletionPercentByRank;
do {
temp_a1_10 = *phi_a2_2;
temp_a2 = phi_a2_2 + 8;
@@ -757,12 +757,12 @@ block_58:
temp_a1_12 = temp_a2->unk-4;
temp_v0_12->unk-8 = temp_a1_12;
temp_a1_13 = temp_a2->unk-2;
*phi_v1_7 = *(&gTrackCompletionPercentByPlayerId + (temp_a1_10 * 4));
*phi_v1_7 = *(&gCourseCompletionPercentByPlayerId + (temp_a1_10 * 4));
temp_v1_10 = phi_v1_7 + 0x10;
temp_v1_10->unk-C = *(&gTrackCompletionPercentByPlayerId + (temp_a1_11 * 4));
temp_v1_10->unk-C = *(&gCourseCompletionPercentByPlayerId + (temp_a1_11 * 4));
temp_v0_12->unk-4 = temp_a1_13;
temp_v1_10->unk-4 = *(&gTrackCompletionPercentByPlayerId + (temp_a1_13 * 4));
temp_v1_10->unk-8 = *(&gTrackCompletionPercentByPlayerId + (temp_a1_12 * 4));
temp_v1_10->unk-4 = *(&gCourseCompletionPercentByPlayerId + (temp_a1_13 * 4));
temp_v1_10->unk-8 = *(&gCourseCompletionPercentByPlayerId + (temp_a1_12 * 4));
phi_a2_2 = temp_a2;
phi_v0_9 = temp_v0_12;
phi_v1_7 = temp_v1_10;
@@ -776,10 +776,10 @@ block_58:
phi_s0_3 = phi_t1_7;
if (phi_t1_7 < phi_t4) {
temp_a1_14 = phi_t3_5 * 4;
temp_v1_11 = temp_a1_14 + &gTrackCompletionPercentByRank;
temp_v1_11 = temp_a1_14 + &gCourseCompletionPercentByRank;
if (((phi_t4 - phi_t1_7) & 1) != 0) {
temp_t3_4 = phi_t1_7 * 4;
temp_s1_2 = temp_t3_4 + &gTrackCompletionPercentByRank;
temp_s1_2 = temp_t3_4 + &gCourseCompletionPercentByRank;
temp_f2_4 = *temp_s1_2;
temp_f0_3 = *temp_v1_11;
temp_s0_4 = &sp80 + temp_t3_4;
@@ -799,7 +799,7 @@ block_58:
} else {
block_67:
temp_t3_5 = phi_s0_3 * 4;
phi_s1_2 = temp_t3_5 + &gTrackCompletionPercentByRank;
phi_s1_2 = temp_t3_5 + &gCourseCompletionPercentByRank;
phi_t3_6 = temp_t3_5;
do {
temp_f0_4 = *temp_v1_11;
@@ -827,7 +827,7 @@ block_67:
temp_s1_3 = phi_s1_2 + 8;
phi_s1_2 = temp_s1_3;
phi_t3_6 += 8;
} while (temp_s1_3 != ((phi_t4 * 4) + &gTrackCompletionPercentByRank));
} while (temp_s1_3 != ((phi_t4 * 4) + &gCourseCompletionPercentByRank));
}
}
phi_t1_7 += 1;
@@ -893,7 +893,7 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/set_places.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
extern ? gTimePlayerLastTouchedFinishLine;
extern ? gTrackCompletionPercentByRank;
extern ? gCourseCompletionPercentByRank;
extern ? D_80164360;
extern ? D_801643D8;
extern ? D_801643E0;
@@ -998,7 +998,7 @@ block_7:
temp_a0 = 0 * 4;
phi_t0 = (0 * 2) + &D_80164360;
phi_v0 = temp_a0 + &sp50;
phi_v1 = temp_a0 + &gTrackCompletionPercentByRank;
phi_v1 = temp_a0 + &gCourseCompletionPercentByRank;
phi_a1 = 1;
do {
temp_a0_2 = *phi_t0;
@@ -1020,7 +1020,7 @@ block_12:
temp_a0_3 = phi_a3_5 * 4;
phi_t0_2 = (phi_a3_5 * 2) + &D_80164360;
phi_v0_2 = temp_a0_3 + &sp50;
phi_v1_2 = temp_a0_3 + &gTrackCompletionPercentByRank;
phi_v1_2 = temp_a0_3 + &gCourseCompletionPercentByRank;
do {
temp_a0_4 = *phi_t0_2;
temp_v1_2 = phi_v1_2 + 0x10;
@@ -1040,7 +1040,7 @@ block_12:
phi_t0_2 = temp_t0;
phi_v0_2 = temp_v0_3;
phi_v1_2 = temp_v1_2;
} while (temp_v1_2 != ((phi_a2 * 4) + &gTrackCompletionPercentByRank));
} while (temp_v1_2 != ((phi_a2 * 4) + &gCourseCompletionPercentByRank));
}
}
temp_t0_2 = phi_a2 - 1;
@@ -1052,10 +1052,10 @@ block_12:
phi_v0_6 = phi_a1_2;
if (phi_a1_2 < phi_a2) {
temp_a0_8 = phi_a3 * 4;
temp_v1_3 = temp_a0_8 + &gTrackCompletionPercentByRank;
temp_v1_3 = temp_a0_8 + &gCourseCompletionPercentByRank;
if (((phi_a2 - phi_a1_2) & 1) != 0) {
temp_a3 = phi_a1_2 * 4;
temp_t3 = temp_a3 + &gTrackCompletionPercentByRank;
temp_t3 = temp_a3 + &gCourseCompletionPercentByRank;
temp_f2 = *temp_t3;
temp_f0 = *temp_v1_3;
temp_t1 = &sp50 + temp_a3;
@@ -1075,7 +1075,7 @@ block_12:
} else {
block_21:
temp_a3_2 = phi_v0_6 * 4;
phi_t1 = temp_a3_2 + &gTrackCompletionPercentByRank;
phi_t1 = temp_a3_2 + &gCourseCompletionPercentByRank;
phi_a3_2 = temp_a3_2;
do {
temp_f0_2 = *temp_v1_3;
@@ -1103,7 +1103,7 @@ block_21:
temp_t1_2 = phi_t1 + 8;
phi_t1 = temp_t1_2;
phi_a3_2 += 8;
} while (temp_t1_2 != ((phi_a2 * 4) + &gTrackCompletionPercentByRank));
} while (temp_t1_2 != ((phi_a2 * 4) + &gCourseCompletionPercentByRank));
}
}
phi_a1_2 += 1;
@@ -1175,11 +1175,11 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_800070F4.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
extern ? gTimePlayerLastTouchedFinishLine;
extern f32 gTrackCompletionPercentByRank;
extern f32 gCourseCompletionPercentByRank;
extern ? D_80164360;
extern ? D_801643D8;
extern ? D_801643E0;
extern ? gTrackCompletionPercentByPlayerId;
extern ? gCourseCompletionPercentByPlayerId;
extern ? gPlayers;
void func_800074D4(void) {
@@ -1281,7 +1281,7 @@ void func_800074D4(void) {
s32 phi_v0_12;
s32 phi_v0_13;
phi_a0 = &gTrackCompletionPercentByRank;
phi_a0 = &gCourseCompletionPercentByRank;
phi_a3 = 1;
phi_a3_2 = 1;
phi_a3_4 = 1;
@@ -1302,28 +1302,28 @@ void func_800074D4(void) {
phi_v0_2 = phi_v0;
if ((phi_a0_2->unk0 & 0x800) != 0) {
*(&sp68 + temp_v1) = phi_t0;
*(&gTrackCompletionPercentByRank + temp_v1) = -*(&gTimePlayerLastTouchedFinishLine + (phi_t0 * 4));
*(&gCourseCompletionPercentByRank + temp_v1) = -*(&gTimePlayerLastTouchedFinishLine + (phi_t0 * 4));
phi_v0_2 = phi_v0 + 1;
}
temp_v1_2 = phi_v0_2 * 4;
phi_v0_3 = phi_v0_2;
if ((phi_a0_2->unkDD8 & 0x800) != 0) {
*(&sp68 + temp_v1_2) = phi_t0 + 1;
*(&gTrackCompletionPercentByRank + temp_v1_2) = -(&gTimePlayerLastTouchedFinishLine + (phi_t0 * 4))->unk4;
*(&gCourseCompletionPercentByRank + temp_v1_2) = -(&gTimePlayerLastTouchedFinishLine + (phi_t0 * 4))->unk4;
phi_v0_3 = phi_v0_2 + 1;
}
temp_v1_3 = phi_v0_3 * 4;
phi_v0_4 = phi_v0_3;
if ((phi_a0_2->unk1BB0 & 0x800) != 0) {
*(&sp68 + temp_v1_3) = phi_t0 + 2;
*(&gTrackCompletionPercentByRank + temp_v1_3) = -(&gTimePlayerLastTouchedFinishLine + (phi_t0 * 4))->unk8;
*(&gCourseCompletionPercentByRank + temp_v1_3) = -(&gTimePlayerLastTouchedFinishLine + (phi_t0 * 4))->unk8;
phi_v0_4 = phi_v0_3 + 1;
}
temp_v1_4 = phi_v0_4 * 4;
phi_v0_9 = phi_v0_4;
if ((phi_a0_2->unk2988 & 0x800) != 0) {
*(&sp68 + temp_v1_4) = phi_t0 + 3;
*(&gTrackCompletionPercentByRank + temp_v1_4) = -(&gTimePlayerLastTouchedFinishLine + (phi_t0 * 4))->unkC;
*(&gCourseCompletionPercentByRank + temp_v1_4) = -(&gTimePlayerLastTouchedFinishLine + (phi_t0 * 4))->unkC;
phi_v0_9 = phi_v0_4 + 1;
}
temp_t0 = phi_t0 + 4;
@@ -1338,28 +1338,28 @@ void func_800074D4(void) {
phi_v0_6 = phi_v0_5;
if ((phi_a0_3->unk0 & 0x800) == 0) {
*(&sp68 + temp_v1_5) = phi_t0_2;
*(&gTrackCompletionPercentByRank + temp_v1_5) = *(&gTrackCompletionPercentByPlayerId + (phi_t0_2 * 4));
*(&gCourseCompletionPercentByRank + temp_v1_5) = *(&gCourseCompletionPercentByPlayerId + (phi_t0_2 * 4));
phi_v0_6 = phi_v0_5 + 1;
}
temp_v1_6 = phi_v0_6 * 4;
phi_v0_7 = phi_v0_6;
if ((phi_a0_3->unkDD8 & 0x800) == 0) {
*(&sp68 + temp_v1_6) = phi_t0_2 + 1;
*(&gTrackCompletionPercentByRank + temp_v1_6) = (&gTrackCompletionPercentByPlayerId + (phi_t0_2 * 4))->unk4;
*(&gCourseCompletionPercentByRank + temp_v1_6) = (&gCourseCompletionPercentByPlayerId + (phi_t0_2 * 4))->unk4;
phi_v0_7 = phi_v0_6 + 1;
}
temp_v1_7 = phi_v0_7 * 4;
phi_v0_8 = phi_v0_7;
if ((phi_a0_3->unk1BB0 & 0x800) == 0) {
*(&sp68 + temp_v1_7) = phi_t0_2 + 2;
*(&gTrackCompletionPercentByRank + temp_v1_7) = (&gTrackCompletionPercentByPlayerId + (phi_t0_2 * 4))->unk8;
*(&gCourseCompletionPercentByRank + temp_v1_7) = (&gCourseCompletionPercentByPlayerId + (phi_t0_2 * 4))->unk8;
phi_v0_8 = phi_v0_7 + 1;
}
temp_v1_8 = phi_v0_8 * 4;
phi_v0_5 = phi_v0_8;
if ((phi_a0_3->unk2988 & 0x800) == 0) {
*(&sp68 + temp_v1_8) = phi_t0_2 + 3;
*(&gTrackCompletionPercentByRank + temp_v1_8) = (&gTrackCompletionPercentByPlayerId + (phi_t0_2 * 4))->unkC;
*(&gCourseCompletionPercentByRank + temp_v1_8) = (&gCourseCompletionPercentByPlayerId + (phi_t0_2 * 4))->unkC;
phi_v0_5 = phi_v0_8 + 1;
}
temp_t0_2 = phi_t0_2 + 4;
@@ -1372,10 +1372,10 @@ void func_800074D4(void) {
phi_v0_12 = phi_a3_2;
if (phi_a3_2 < phi_v0_9) {
temp_a1 = phi_t0_3 * 4;
temp_a0 = temp_a1 + &gTrackCompletionPercentByRank;
temp_a0 = temp_a1 + &gCourseCompletionPercentByRank;
if (((phi_v0_9 - phi_a3_2) & 1) != 0) {
temp_v1_9 = phi_a3_2 * 4;
temp_t4 = temp_v1_9 + &gTrackCompletionPercentByRank;
temp_t4 = temp_v1_9 + &gCourseCompletionPercentByRank;
temp_f2 = *temp_t4;
temp_f0 = *temp_a0;
temp_t0_3 = &sp68 + temp_v1_9;
@@ -1395,7 +1395,7 @@ void func_800074D4(void) {
} else {
block_41:
temp_v1_10 = phi_v0_12 * 4;
phi_t4 = temp_v1_10 + &gTrackCompletionPercentByRank;
phi_t4 = temp_v1_10 + &gCourseCompletionPercentByRank;
phi_v1 = temp_v1_10;
do {
temp_f0_2 = *temp_a0;
@@ -1423,7 +1423,7 @@ block_41:
temp_t4_2 = phi_t4 + 8;
phi_t4 = temp_t4_2;
phi_v1 += 8;
} while (temp_t4_2 != ((phi_v0_9 * 4) + &gTrackCompletionPercentByRank));
} while (temp_t4_2 != ((phi_v0_9 * 4) + &gCourseCompletionPercentByRank));
}
}
phi_a3_2 += 1;
@@ -1437,10 +1437,10 @@ block_41:
phi_v0_13 = phi_a3_3;
if (phi_a3_3 < 8) {
temp_a1_2 = phi_t0_4 * 4;
temp_a0_2 = temp_a1_2 + &gTrackCompletionPercentByRank;
temp_a0_2 = temp_a1_2 + &gCourseCompletionPercentByRank;
if (((8 - phi_a3_3) & 1) != 0) {
temp_v1_11 = phi_a3_3 * 4;
temp_t4_3 = temp_v1_11 + &gTrackCompletionPercentByRank;
temp_t4_3 = temp_v1_11 + &gCourseCompletionPercentByRank;
temp_f2_4 = *temp_t4_3;
temp_f0_3 = *temp_a0_2;
temp_t0_6 = &sp68 + temp_v1_11;
@@ -1460,7 +1460,7 @@ block_41:
} else {
block_55:
temp_v1_12 = phi_v0_13 * 4;
phi_t4_2 = temp_v1_12 + &gTrackCompletionPercentByRank;
phi_t4_2 = temp_v1_12 + &gCourseCompletionPercentByRank;
phi_v1_2 = temp_v1_12;
do {
temp_f0_4 = *temp_a0_2;
@@ -1488,7 +1488,7 @@ block_55:
temp_t4_4 = phi_t4_2 + 8;
phi_t4_2 = temp_t4_4;
phi_v1_2 += 8;
} while (temp_t4_4 != ((8 * 4) + &gTrackCompletionPercentByRank));
} while (temp_t4_4 != ((8 * 4) + &gCourseCompletionPercentByRank));
}
}
phi_a3_3 += 1;
@@ -2228,7 +2228,7 @@ extern s16 D_80162FCE;
extern ? D_80164438;
extern ? D_80164450;
extern ? D_801644A8;
extern ? gTrackCompletionPercentByPlayerId;
extern ? gCourseCompletionPercentByPlayerId;
extern ? D_801645B0;
extern u16 D_801645C8;
extern ? lapCount;
@@ -2263,7 +2263,7 @@ void func_80008F38(s32 arg0) {
}
temp_f0 = phi_f6 / phi_f16;
*(&D_801644A8 + temp_v0) = temp_f0;
*(&gTrackCompletionPercentByPlayerId + temp_v0) = temp_f0 + temp_v1;
*(&gCourseCompletionPercentByPlayerId + temp_v0) = temp_f0 + temp_v1;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80008F38.s")
@@ -2967,7 +2967,7 @@ void func_80009B60(s32 arg0) {
temp_a2 = temp_a1 * 2;
if ((temp_v1->unk0 & 0x8000) == 0) {
*(&D_80164450 + temp_a3) = -0x14;
*(&gTrackCompletionPercentByPlayerId + temp_a3) = -1000.0f;
*(&gCourseCompletionPercentByPlayerId + temp_a3) = -1000.0f;
*(&D_801644A8 + temp_a3) = -1000.0f;
return;
}
@@ -6359,7 +6359,7 @@ extern ? D_80164438;
extern ? D_80164448;
extern s32 D_80164450;
extern ? D_80164478;
extern f32 gTrackCompletionPercentByPlayerId;
extern f32 gCourseCompletionPercentByPlayerId;
extern s16 D_801644F8;
extern ? D_80164538;
extern ? D_801645B0;
@@ -6484,7 +6484,7 @@ void func_8000F628(void) {
spD0 = &lapCount;
spB8 = &D_80163258;
spBC = &D_80164408;
spCC = &gTrackCompletionPercentByPlayerId;
spCC = &gCourseCompletionPercentByPlayerId;
spC8 = &gTimePlayerLastTouchedFinishLine;
spB0 = &D_801631E0;
spB4 = &D_80163270;
@@ -9943,7 +9943,7 @@ void func_80014DE4(s32 arg0) {
temp_v1 = temp_v0 + &D_80164678;
*temp_v1 = *(&D_80164670 + temp_v0);
temp_a1 = gModeSelection;
if ((temp_a1 != TIME_TRIALS) && ((gCourseSelection == 0) || (D_800DC51C == 1))) {
if ((temp_a1 != TIME_TRIALS) && ((gCupCourseSelection == CUP_COURSE_ONE) || (D_800DC51C == 1))) {
goto block_8;
}
temp_a2 = *temp_v1;
+7 -7
View File
@@ -406,7 +406,7 @@ void func_80039DA4(void) {
temp_80039DA4 sp2C = D_800E4360;
temp_80039DA4 spC = D_800E4380;
if (((gCourseSelection == 0) && (D_8016556E == 0)) ||
if (((gCupCourseSelection == CUP_COURSE_ONE) && (D_8016556E == 0)) ||
(D_800DC51C == 1) ||
(D_8018EDEF == 0x40)) {
for (i = 0; i < 8; i++) {
@@ -421,7 +421,7 @@ void func_80039DA4(void) {
void func_80039F44(f32 *arg0, f32 *arg1, f32 arg2) {
func_80039DA4();
if (((gCourseSelection == 0) && (D_8016556E == 0)) ||
if (((gCupCourseSelection == CUP_COURSE_ONE) && (D_8016556E == 0)) ||
(D_800DC51C == 1) ||
(D_8018EDEF == 0x40)) {
s16 rand;
@@ -509,7 +509,7 @@ void func_8003A59C(f32 *arg0, f32 *arg1, f32 arg2) {
void func_8003A9F0(f32* arg0, f32* arg1, f32 arg2) {
func_80039DA4();
if ((gCourseSelection == 0) || (D_800DC51C == 1) || (D_8018EDEF == 0x40)) {
if ((gCupCourseSelection == CUP_COURSE_ONE) || (D_800DC51C == 1) || (D_8018EDEF == 0x40)) {
s16 rand;
s16 i;
@@ -689,13 +689,13 @@ extern f32 D_800EDE58;
extern f32 D_800EDE5C;
void func_8003BE30(void) {
spawn_player(D_800DC4DC, 0, -2770.774f, -345.187f, D_800EDE20, 0.0f, gGPOverallRanks[0], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(D_800DC4E0, 1, -3691.506f, -6.822f, D_800EDE24, D_800EDE28, gGPOverallRanks[1], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(D_800DC4E4, 2, -3475.028f, -998.485f, D_800EDE2C, D_800EDE30, gGPOverallRanks[2], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(D_800DC4DC, 0, -2770.774f, -345.187f, D_800EDE20, 0.0f, gCharacterIdByGPOverallRank[0], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(D_800DC4E0, 1, -3691.506f, -6.822f, D_800EDE24, D_800EDE28, gCharacterIdByGPOverallRank[1], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(D_800DC4E4, 2, -3475.028f, -998.485f, D_800EDE2C, D_800EDE30, gCharacterIdByGPOverallRank[2], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
if (D_802874D8.unk_1D >= 3) {
spawn_player(D_800DC4E8, 3, -3025.772f, 110.039f, D_800EDE34, D_800EDE38, D_802874D8.unk_1E, PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
} else {
spawn_player(D_800DC4E8, 3, -3025.772f, 110.039f, D_800EDE3C, D_800EDE40, gGPOverallRanks[3], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(D_800DC4E8, 3, -3025.772f, 110.039f, D_800EDE3C, D_800EDE40, gCharacterIdByGPOverallRank[3], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
}
spawn_player(D_800DC4EC, 4, -2770.774f, -345.187f, D_800EDE44, 0.0f, 0, 0x7000);
spawn_player(D_800DC4F0, 5, -3691.506f, -6.822f, D_800EDE48, D_800EDE4C, 0, 0x7000);
+56 -56
View File
@@ -408,7 +408,7 @@ void func_80091EE4(void) {
D_800E86F8 = 0;
if ((D_8018EDFB != 0) && (func_800B5F30() == 0)) {
temp_s2 = (gCupSelection * 4) + gCourseSelection;
temp_s2 = (gCupSelection * 4) + gCupCourseSelection;
func_800B6708();
phi_s0 = 0;
do {
@@ -6755,7 +6755,7 @@ block_74:
}
gCupSelection = gCupSelectionByCourseId[gCurrentCourseId];
D_800DC540 = gCupSelection;
gCourseSelection = gPerCupIndexByCourseId[gCurrentCourseId];
gCupCourseSelection = gPerCupIndexByCourseId[gCurrentCourseId];
phi_a0 = gCurrentCourseId;
break;
case 3: /* switch 3 */
@@ -6835,7 +6835,7 @@ block_74:
gCupSelection = gCupSelectionByCourseId[gCurrentCourseId];
temp_v1_9 = D_8018EDFA;
D_800DC540 = gCupSelection;
gCourseSelection = gPerCupIndexByCourseId[gCurrentCourseId];
gCupCourseSelection = gPerCupIndexByCourseId[gCurrentCourseId];
if (temp_v1_9 != 1) {
if (temp_v1_9 != 2) {
if (temp_v1_9 != 3) {
@@ -7940,7 +7940,7 @@ static ? D_800E8420; /* unable to generate initia
static ? D_800E85F7; /* unable to generate initializer; const */
static s8 D_800E86A8 = 0; /* const */
static ? D_800EFD64; /* unable to generate initializer; const */
static ? gCupTrackOrder; /* unable to generate initializer; const */
static ? gCupCourseOrder; /* unable to generate initializer; const */
void func_8009E650(s32 arg0, s32 arg1, s32 arg2, s8 arg3) {
void *sp7C;
@@ -8204,7 +8204,7 @@ loop_3:
case 0x61: /* switch 2 */
case 0x62: /* switch 2 */
sp7C = phi_ra;
phi_ra->unk18 = func_8009A374(segmented_to_virtual_dupe(*(&D_800E7E34 + (*(&gCupTrackOrder - 0xBE + (phi_ra->unk0 * 2)) * 4)), arg3));
phi_ra->unk18 = func_8009A374(segmented_to_virtual_dupe(*(&D_800E7E34 + (*(&gCupCourseOrder - 0xBE + (phi_ra->unk0 * 2)) * 4)), arg3));
return;
case 0x5E: /* switch 2 */
sp7C = phi_ra;
@@ -8277,9 +8277,9 @@ loop_3:
case 0x8B: /* switch 2 */
sp7C = phi_ra;
temp_v0_5 = phi_ra->unk0 - 0x7C;
func_800996BC(segmented_to_virtual(*(&D_800E7D74 + (*(&gCupTrackOrder + (((temp_v0_5 / 4) * 8) + ((temp_v0_5 % 4) * 2))) * 4)), arg3), -1);
func_800996BC(segmented_to_virtual(*(&D_800E7D74 + (*(&gCupCourseOrder + (((temp_v0_5 / 4) * 8) + ((temp_v0_5 % 4) * 2))) * 4)), arg3), -1);
temp_v0_6 = phi_ra->unk0 - 0x7C;
func_800996BC(segmented_to_virtual(*(&D_800E7DC4 + (*(&gCupTrackOrder + (((temp_v0_6 / 4) * 8) + ((temp_v0_6 % 4) * 2))) * 4))), 0);
func_800996BC(segmented_to_virtual(*(&D_800E7DC4 + (*(&gCupCourseOrder + (((temp_v0_6 / 4) * 8) + ((temp_v0_6 % 4) * 2))) * 4))), 0);
func_800996BC(segmented_to_virtual(&D_02004A0C), 0);
return;
case 0xB1: /* switch 2 */
@@ -8337,7 +8337,7 @@ block_63:
}
}
if ((phi_ra->unk1C == 0) || (phi_ra->unk20 != 0)) {
func_800B559C((gCupSelection * 4) + gCourseSelection);
func_800B559C((gCupSelection * 4) + gCupCourseSelection);
return;
}
/* Duplicate return node #87. Try simplifying control flow for better match */
@@ -8345,7 +8345,7 @@ block_63:
case 0xE6: /* switch 2 */
temp_v0_8 = D_8018EDF7;
sp7C = phi_ra;
phi_ra->unk18 = func_8009A374(segmented_to_virtual_dupe(*(&D_800E7E34 + (*(&gCupTrackOrder + (((temp_v0_8 / 4) * 8) + ((temp_v0_8 % 4) * 2))) * 4)), arg3));
phi_ra->unk18 = func_8009A374(segmented_to_virtual_dupe(*(&D_800E7E34 + (*(&gCupCourseOrder + (((temp_v0_8 / 4) * 8) + ((temp_v0_8 % 4) * 2))) * 4)), arg3));
phi_ra->unk1C = D_8018EDF7;
func_800996BC(segmented_to_virtual(&D_02004A0C), 0);
func_8006EF60();
@@ -9629,7 +9629,7 @@ s32 segmented_to_virtual(? *, s32); // extern
extern ? D_02004A0C;
extern ? D_800E7D74;
extern ? D_800E7DC4;
extern ? gCupTrackOrder;
extern ? gCupCourseOrder;
extern s32 gDisplayListHead;
void func_800A15EC(void *arg0) {
@@ -9643,7 +9643,7 @@ void func_800A15EC(void *arg0) {
s32 temp_v1_2;
temp_v0 = arg0->unk0 - 0x7C;
temp_a1 = *(&gCupTrackOrder + (((temp_v0 / 4) * 8) + ((temp_v0 % 4) * 2))) * 4;
temp_a1 = *(&gCupCourseOrder + (((temp_v0 / 4) * 8) + ((temp_v0 % 4) * 2))) * 4;
sp44 = temp_a1;
temp_v0_2 = func_8009C204(gDisplayListHead, segmented_to_virtual(*(&D_800E7D74 + temp_a1), temp_a1), arg0->unkC, arg0->unk10, 2);
gDisplayListHead = temp_v0_2;
@@ -9702,7 +9702,7 @@ void *func_8009BA74(void *, ? *, ?, ?); // extern
s32 func_800B639C(s8); // extern
extern ? D_02004A0C;
extern s8 D_8018EDF7;
extern ? gCupTrackOrder;
extern ? gCupCourseOrder;
extern void *gDisplayListHead;
void func_800A1924(void *arg0) {
@@ -9717,7 +9717,7 @@ void func_800A1924(void *arg0) {
gDisplayListHead = func_8009BA74(temp_v0, &D_02004A0C, 0x57, 0x84);
}
temp_v0_2 = D_8018EDF7;
func_8004EF9C(*(&gCupTrackOrder + (((temp_v0_2 / 4) * 8) + ((temp_v0_2 % 4) * 2))));
func_8004EF9C(*(&gCupCourseOrder + (((temp_v0_2 / 4) * 8) + ((temp_v0_2 % 4) * 2))));
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->unk4 = 0x2000;
@@ -9740,7 +9740,7 @@ extern ? *D_800E772C;
extern ? D_800E77D8;
extern ? D_800E77E4;
extern s8 D_8018EDF7;
extern ? gCupTrackOrder;
extern ? gCupCourseOrder;
void func_800A1A20(void *arg0) {
s16 temp_s1;
@@ -9751,7 +9751,7 @@ void func_800A1A20(void *arg0) {
s32 phi_s1;
temp_v0 = D_8018EDF7;
temp_s1 = *(&gCupTrackOrder + (((temp_v0 / 4) * 8) + ((temp_v0 % 4) * 2)));
temp_s1 = *(&gCupCourseOrder + (((temp_v0 / 4) * 8) + ((temp_v0 % 4) * 2)));
arg0->unkC = 0x14;
set_text_color(TEXT_BLUE_GREEN_RED_CYCLE_1);
temp_s0 = temp_s1 * 4;
@@ -9966,7 +9966,7 @@ static ? D_800E7938; /* unable to generate initia
static ? *D_800E7A44 = "NO DATA"; /* const */
static ? *D_800E7A48[3] = { "CREATING ", "MARIO KART 64 ", "GAME DATA" }; /* const */
static ? D_800E7A54; /* unable to generate initializer; const */
static ? gCupTrackOrder; /* unable to generate initializer; const */
static ? gCupCourseOrder; /* unable to generate initializer; const */
void func_800A1FB0(void *arg0) {
s16 spE2;
@@ -10225,7 +10225,7 @@ loop_38:
func_80093324(phi_s3, phi_s2_3, D_800E7A44, 0, 0.5f, 0.5f);
} else {
temp_v0 = phi_v1->unk5;
func_80093324(phi_s3, phi_s2_3, *(&D_800E75C4 + (*(&gCupTrackOrder + (((temp_v0 / 4) * 8) + ((temp_v0 % 4) * 2))) * 4)), 0, 0.5f, 0.5f);
func_80093324(phi_s3, phi_s2_3, *(&D_800E75C4 + (*(&gCupCourseOrder + (((temp_v0 / 4) * 8) + ((temp_v0 % 4) * 2))) * 4)), 0, 0.5f, 0.5f);
}
phi_s0_9 = temp_s1_4;
phi_s2_3 += 0x1E;
@@ -10283,7 +10283,7 @@ loop_58:
func_80093324(phi_s3_2, phi_s2_4, D_800E7A44, 0, 0.5f, 0.5f);
} else {
temp_v0_2 = phi_v1_2->unk5;
func_80093324(phi_s3_2, phi_s2_4, *(&D_800E75C4 + (*(&gCupTrackOrder + (((temp_v0_2 / 4) * 8) + ((temp_v0_2 % 4) * 2))) * 4)), 0, 0.5f, 0.5f);
func_80093324(phi_s3_2, phi_s2_4, *(&D_800E75C4 + (*(&gCupCourseOrder + (((temp_v0_2 / 4) * 8) + ((temp_v0_2 % 4) * 2))) * 4)), 0, 0.5f, 0.5f);
}
phi_s0_11 = temp_s1_5;
phi_s2_4 += 0x1E;
@@ -10357,7 +10357,7 @@ loop_80:
func_80093324(phi_s3_4, phi_s2_6, D_800E7A44, 0, 0.5f, 0.5f);
} else {
temp_v0_4 = phi_v1_3->unk5;
func_80093324(phi_s3_4, phi_s2_6, *(&D_800E75C4 + (*(&gCupTrackOrder + (((temp_v0_4 / 4) * 8) + ((temp_v0_4 % 4) * 2))) * 4)), 0, 0.5f, 0.5f);
func_80093324(phi_s3_4, phi_s2_6, *(&D_800E75C4 + (*(&gCupCourseOrder + (((temp_v0_4 / 4) * 8) + ((temp_v0_4 % 4) * 2))) * 4)), 0, 0.5f, 0.5f);
}
phi_s0_12 = temp_s1_6;
phi_s2_6 += 0x1E;
@@ -10516,7 +10516,7 @@ void func_800A2EB8(void *arg0) {
temp_f0 = D_800F1C90;
func_80093324(arg0->unkC + 0x2C, arg0->unk10 + 0x28, &D_800F0C24, 0, temp_f0, temp_f0);
// Convert index of current course in the cup order into a round number
convert_number_to_ascii(gCourseSelection + 1, &sp68);
convert_number_to_ascii(gCupCourseSelection + 1, &sp68);
// Print previously converted round number
temp_f0_2 = D_800F1C94;
func_80093324(arg0->unkC + 0x57, arg0->unk10 + 0x28, &sp69, 0, temp_f0_2, temp_f0_2);
@@ -10693,7 +10693,7 @@ void func_800A34A8(void *arg0) {
} while (temp_a0 != &D_80164370);
} else {
func_800A3A10(&sp80);
func_800A3A10(gGPOverallRanks);
func_800A3A10(gCharacterIdByGPOverallRank);
}
// "Driver's Points"
set_text_color(TEXT_BLUE_GREEN_RED_CYCLE_1);
@@ -10702,7 +10702,7 @@ void func_800A34A8(void *arg0) {
set_text_color(5);
func_80093324(arg0->unkC + 0x36, 0x28 - arg0->unk10, "round", 0, 0.7f, 0.7f);
// Convert course index to a round number
convert_number_to_ascii(gCourseSelection + 1, &sp78);
convert_number_to_ascii(gCupCourseSelection + 1, &sp78);
// Print round number
func_80093324(arg0->unkC + 0x61, 0x28 - arg0->unk10, &sp79, 0, 0.7f, 0.7f);
phi_s1 = 0;
@@ -10806,8 +10806,8 @@ loop_3:
temp_a3 = phi_a2->unk-1;
temp_t1 = phi_a2->unk0;
temp_a1 = phi_a1 - 1;
temp_t2 = gGPCharacterPoints[temp_t1];
temp_t0 = gGPCharacterPoints[temp_a3];
temp_t2 = gGPPointsByCharacterId[temp_t1];
temp_t0 = gGPPointsByCharacterId[temp_a3];
phi_a1 = temp_a1;
if (temp_t0 < temp_t2) {
phi_a2->unk0 = temp_a3;
@@ -10862,7 +10862,7 @@ void func_800A3ADC(void *arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5)
phi_v0 = arg5 + arg4;
loop_4:
phi_v1_2 = phi_v1;
if (gGPCharacterPoints[phi_v0->unk0] == gGPCharacterPoints[phi_v0->unk-1]) {
if (gGPPointsByCharacterId[phi_v0->unk0] == gGPPointsByCharacterId[phi_v0->unk-1]) {
temp_v1 = phi_v1 - 1;
phi_v0 += -1;
phi_v1 = temp_v1;
@@ -10881,7 +10881,7 @@ loop_4:
// Print character name
func_80093324(arg1 + 0xA, arg2, *(&D_800E76A8 + (arg3 * 4)), 0, 0.7f, 0.7f);
// Print character's current point count
convert_number_to_ascii(gGPCharacterPoints[arg3], &sp34);
convert_number_to_ascii(gGPPointsByCharacterId[arg3], &sp34);
func_800939C8(arg1 + 0x47, arg2, &sp34, 0, 0.7f, 0.7f);
// Print "+" + points left to be allocated
// Only done for rank 1, 2, 3 and 4
@@ -10909,7 +10909,7 @@ extern s32 D_800E772C;
extern s32 D_800E7730;
extern f32 D_800F1CC8;
extern s8 gCupSelection;
extern ? gCupTrackOrder;
extern ? gCupCourseOrder;
void func_800A3C84(void *arg0) {
f32 temp_f0;
@@ -10922,7 +10922,7 @@ void func_800A3C84(void *arg0) {
set_text_color(TEXT_BLUE_GREEN_RED_CYCLE_1);
temp_f0 = D_800F1CC8;
draw_text(arg0->unkC + 0x43, arg0->unk10 + 0x19, *(&D_800E7574 + (*(&gCupTrackOrder + ((gCupSelection * 8) + (gCourseSelection * 2))) * 4)), 0, temp_f0, temp_f0);
draw_text(arg0->unkC + 0x43, arg0->unk10 + 0x19, *(&D_800E7574 + (*(&gCupCourseOrder + ((gCupSelection * 8) + (gCupCourseSelection * 2))) * 4)), 0, temp_f0, temp_f0);
set_text_color(TEXT_YELLOW);
draw_text(arg0->unkC + 0x46, arg0->unk10 + 0x28, D_800E7730, 0, 0.75f, 0.75f);
phi_s0 = 0;
@@ -10980,7 +10980,7 @@ static ? *D_800E7A6C[2] = { "QUIT", "SAVE" }; /* const */
static ? *D_800E7A74[3] = { "SAVING GHOST DATA", "", "PLEASE WAIT" }; /* const */
static ? *D_800E7A80[2] = { "UNABLE TO SAVE ", "THE GHOST" }; /* const */
static ? D_800E7A88; /* unable to generate initializer; const */
static ? gCupTrackOrder; /* unable to generate initializer; const */
static ? gCupCourseOrder; /* unable to generate initializer; const */
void func_800A3E60(void *arg0) {
s16 sp86;
@@ -11034,7 +11034,7 @@ void func_800A3E60(void *arg0) {
temp_v0 = arg0->unk4;
if ((temp_v0 != 0) && (temp_v0 != 0x1F)) {
set_text_color(TEXT_BLUE_GREEN_RED_CYCLE_1);
draw_text(arg0->unkC + 0x55, 0x19 - arg0->unk10, *(&D_800E7574 + (*(&gCupTrackOrder + ((gCupSelection * 8) + (gCourseSelection * 2))) * 4)), 0, 0.6f, 0.6f);
draw_text(arg0->unkC + 0x55, 0x19 - arg0->unk10, *(&D_800E7574 + (*(&gCupCourseOrder + ((gCupSelection * 8) + (gCupCourseSelection * 2))) * 4)), 0, 0.6f, 0.6f);
set_text_color(TEXT_YELLOW);
draw_text(arg0->unkC + 0x55, 0x28 - arg0->unk10, D_800E7730, 0, 0.75f, 0.75f);
phi_s1 = 0;
@@ -11130,7 +11130,7 @@ block_43:
func_80093324(0xBB - arg0->unkC, phi_s0_5, D_800E7A44, 0, 0.45f, 0.45f);
} else {
temp_v0_2 = phi_s2_3->unk5;
func_80093324(0xBB - arg0->unkC, phi_s0_5, *(&D_800E75C4 + (*(&gCupTrackOrder + (((temp_v0_2 / 4) * 8) + ((temp_v0_2 % 4) * 2))) * 4)), 0, 0.45f, 0.45f);
func_80093324(0xBB - arg0->unkC, phi_s0_5, *(&D_800E75C4 + (*(&gCupCourseOrder + (((temp_v0_2 / 4) * 8) + ((temp_v0_2 % 4) * 2))) * 4)), 0, 0.45f, 0.45f);
}
phi_s1_3 = sp54;
phi_s0_5 += 0x1E;
@@ -11505,7 +11505,7 @@ extern ? D_800F0C64;
extern ? D_800F0C68;
extern f32 D_800F1DD4;
extern s8 gCupSelection;
extern ? gCupTrackOrder;
extern ? gCupCourseOrder;
extern s32 gDisplayListHead;
void func_800A4BC8(void *arg0) {
@@ -11522,7 +11522,7 @@ void func_800A4BC8(void *arg0) {
gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x13F, 0xEF, 0, 0, 0, 0x8C);
set_text_color(TEXT_YELLOW);
draw_text(0xA0, 0x50, *(&D_800E7574 + (*(&gCupTrackOrder + ((gCupSelection * 8) + (gCourseSelection * 2))) * 4)), 0, 1.0f, 1.0f);
draw_text(0xA0, 0x50, *(&D_800E7574 + (*(&gCupCourseOrder + ((gCupSelection * 8) + (gCupCourseSelection * 2))) * 4)), 0, 1.0f, 1.0f);
set_text_color(TEXT_RED);
temp_f20 = D_800F1DD4;
// "Best Records"
@@ -11643,7 +11643,7 @@ extern s32 D_800E775C;
extern ? D_800E85C0;
extern ? D_8015F480;
extern s8 gCupSelection;
extern ? gCupTrackOrder;
extern ? gCupCourseOrder;
extern s32 gDisplayListHead;
void func_800A5084(void *arg0) {
@@ -11674,7 +11674,7 @@ void func_800A5084(void *arg0) {
set_text_color(TEXT_YELLOW);
draw_text(temp_s0 + 0xA0, temp_s3->unk2 - 0x32, *(&D_800E76CC + (gCCSelection * 4)), 0, 1.0f, 1.0f);
set_text_color(TEXT_YELLOW);
draw_text(0xA0, temp_s3->unk2 - 0x1E, *(&D_800E7574 + (*(&gCupTrackOrder + ((gCupSelection * 8) + (gCourseSelection * 2))) * 4)), 0, 1.0f, 1.0f);
draw_text(0xA0, temp_s3->unk2 - 0x1E, *(&D_800E7574 + (*(&gCupCourseOrder + ((gCupSelection * 8) + (gCupCourseSelection * 2))) * 4)), 0, 1.0f, 1.0f);
phi_s0 = 0;
phi_s1 = 0;
phi_s2 = &D_800E775C;
@@ -11852,7 +11852,7 @@ static ? *D_800E7A80[2] = { "UNABLE TO SAVE ", "THE GHOST" }; /* const */
static ? D_800E7A88; /* unable to generate initializer; const */
static s16 D_800E8538; /* type too large by 2; unable to generate initializer; const */
static s16 D_800E853A; /* type too large by 2; unable to generate initializer; const */
static ? gCupTrackOrder; /* unable to generate initializer; const */
static ? gCupCourseOrder; /* unable to generate initializer; const */
void func_800A5738(void *arg0) {
s16 sp9A;
@@ -11931,7 +11931,7 @@ void func_800A5738(void *arg0) {
temp_v0->words.w1 = phi_s2 & 0xFF;
temp_v0->words.w0 = 0xFA000000;
set_text_color(TEXT_YELLOW);
func_80093754(0xA0, 0x50, *(&D_800E7574 + (*(&gCupTrackOrder + ((gCupSelection * 8) + (gCourseSelection * 2))) * 4)), 0, 1.0f, 1.0f);
func_80093754(0xA0, 0x50, *(&D_800E7574 + (*(&gCupCourseOrder + ((gCupSelection * 8) + (gCupCourseSelection * 2))) * 4)), 0, 1.0f, 1.0f);
temp_v1_2 = arg0->unk4;
switch (temp_v1_2) { /* switch 1 */
case 1: /* switch 1 */
@@ -12020,7 +12020,7 @@ block_36:
func_80093324(0x69 - arg0->unkC, phi_s0_4, D_800E7A44, 0, 0.75f, 0.75f);
} else {
temp_v0_3 = phi_s2_2->unk5;
func_80093324(0x69 - arg0->unkC, phi_s0_4, *(&D_800E75C4 + (*(&gCupTrackOrder + (((temp_v0_3 / 4) * 8) + ((temp_v0_3 % 4) * 2))) * 4)), 0, 0.75f, 0.75f);
func_80093324(0x69 - arg0->unkC, phi_s0_4, *(&D_800E75C4 + (*(&gCupCourseOrder + (((temp_v0_3 / 4) * 8) + ((temp_v0_3 % 4) * 2))) * 4)), 0, 0.75f, 0.75f);
}
phi_s1_3 = sp54;
phi_s0_4 += 0x14;
@@ -13769,7 +13769,7 @@ void func_800A8A98(void *arg0) {
phi_s4 = 0;
phi_s0 = &D_800E7208;
do {
if ((phi_s4 == gCourseSelection) && (temp_v0_4 = D_8018EDEC, ((temp_v0_4 < 2) == 0)) && (gModeSelection != GRAND_PRIX)) {
if ((phi_s4 == gCupCourseSelection) && (temp_v0_4 = D_8018EDEC, ((temp_v0_4 < 2) == 0)) && (gModeSelection != GRAND_PRIX)) {
if ((temp_v0_4 == 2) || (temp_v0_4 == 4)) {
phi_v0 = func_800959A0(gDisplayListHead, phi_s0->unk0 + temp_s2, phi_s0->unk2 + temp_s3, phi_s0->unk8 + temp_s2, phi_s0->unkA + temp_s3);
} else {
@@ -13919,7 +13919,7 @@ void func_800A8F48(s32 arg0) {
if (temp_v0 != 2) {
}
if (func_800B639C((gCupSelection * 4) + gCourseSelection) >= 0) {
if (func_800B639C((gCupSelection * 4) + gCupCourseSelection) >= 0) {
temp_v0_2 = func_80098FC8(gDisplayListHead, 0x57, 0x70, 0x96, 0x81);
gDisplayListHead = temp_v0_2;
gDisplayListHead = func_8009BA74(temp_v0_2, 0x2004A0C, 0x57, 0x70);
@@ -15591,7 +15591,7 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AB260.s")
s32 segmented_to_virtual_dupe(s32, void *); // extern
extern ? D_800E7E34;
extern s8 gCupSelection;
extern ? gCupTrackOrder;
extern ? gCupCourseOrder;
void func_800AB290(void *arg0) {
s16 temp_t2;
@@ -15602,7 +15602,7 @@ void func_800AB290(void *arg0) {
temp_a3 = arg0;
if (temp_v0 != arg0->unk1C) {
arg0->unk1C = temp_v0;
temp_t2 = *(&gCupTrackOrder - 0xBE + ((gCupSelection * 8) + (arg0->unk0 * 2)));
temp_t2 = *(&gCupCourseOrder - 0xBE + ((gCupSelection * 8) + (arg0->unk0 * 2)));
arg0 = temp_a3;
func_8009A594(arg0->unk18, 0, segmented_to_virtual_dupe(*(&D_800E7E34 + (temp_t2 * 4)), temp_a3), arg0);
}
@@ -15652,7 +15652,7 @@ void func_800AB314(void *arg0) {
if (D_8018EDEC != 1) {
arg0->unk4 = 0;
arg0->unk20 = 0;
if (gCourseSelection == 0) {
if (gCupCourseSelection == CUP_COURSE_ONE) {
sp24->unk15 = 1;
if (arg0->unk1C != 0) {
arg0->unk1C = 0;
@@ -15660,7 +15660,7 @@ void func_800AB314(void *arg0) {
} else {
sp24->unk15 = 0;
}
if (gCourseSelection == 1) {
if (gCupCourseSelection == CUP_COURSE_TWO) {
sp28->unk15 = 1;
if (arg0->unk1C != 1) {
arg0->unk1C = 1;
@@ -15668,7 +15668,7 @@ void func_800AB314(void *arg0) {
} else {
sp28->unk15 = 0;
}
if (gCourseSelection == 2) {
if (gCupCourseSelection == CUP_COURSE_THREE) {
sp2C->unk15 = 1;
if (arg0->unk1C != 2) {
arg0->unk1C = 2;
@@ -15676,7 +15676,7 @@ void func_800AB314(void *arg0) {
} else {
sp2C->unk15 = 0;
}
if (gCourseSelection == 3) {
if (gCupCourseSelection == CUP_COURSE_FOUR) {
sp30->unk15 = 1;
if (arg0->unk1C != 3) {
arg0->unk1C = 3;
@@ -16372,7 +16372,7 @@ s8 *func_800AC458(void *arg0) {
temp_t4 = *(&gPlayers->characterId + (*(&D_80164360 + (temp_a1_2 * 2)) * 0xDD8));
sp18 = 0;
arg0 = temp_a3;
gGPCharacterPoints[temp_t4] += 1;
gGPPointsByCharacterId[temp_t4] += 1;
place = temp_a1_2;
play_sound2(0x49008017, temp_a1_2, temp_a2_2, temp_a3);
phi_a3 = arg0;
@@ -16429,8 +16429,8 @@ s8 *func_800AC458(void *arg0) {
if (D_8018D9D8 != 0) {
temp_a3->unk1C = temp_t7 - 5;
}
if ((temp_a3->unk1C <= 0) && (temp_a3->unk4 = 0xA, temp_a3->unk1C = 0, phi_a1 = 0, phi_v0_2 = gGPOverallRanks, (gCourseSelection == COURSE_BANSHEE_BOARDWALK))) {
phi_v0 = gGPOverallRanks;
if ((temp_a3->unk1C <= 0) && (temp_a3->unk4 = 0xA, temp_a3->unk1C = 0, phi_a1 = 0, phi_v0_2 = gCharacterIdByGPOverallRank, (gCupCourseSelection == CUP_COURSE_FOUR))) {
phi_v0 = gCharacterIdByGPOverallRank;
loop_41:
if (*(&D_80164478 + (*phi_v0 * 2)) < D_8018EDF3) {
return func_800B536C(phi_a1, phi_a1, 8, temp_a3);
@@ -17127,7 +17127,7 @@ block_42:
}
} else {
func_800B6708();
arg0->unk4 = func_800B6348((gCupSelection * 4) + gCourseSelection) + 0x11;
arg0->unk4 = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x11;
sp28 = 1;
play_sound2(0x49008001);
phi_v1 = 1;
@@ -17168,7 +17168,7 @@ block_42:
}
if (osPfsFindFile(&D_8018E868, D_800E86F0, D_800E86F4, &D_800F2E64, &D_800F2E74, &D_8018EB84) == 0) {
func_800B6708();
arg0->unk4 = func_800B6348((gCupSelection * 4) + gCourseSelection) + 0x11;
arg0->unk4 = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x11;
play_sound2(0x49008001);
return;
}
@@ -17512,7 +17512,7 @@ block_34:
}
} else {
func_800B6708();
arg0->unk4 = func_800B6348((gCupSelection * 4) + gCourseSelection) + 0x1E;
arg0->unk4 = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x1E;
phi_v1 = 1;
}
}
@@ -17554,7 +17554,7 @@ block_34:
}
if (osPfsFindFile(&D_8018E868, D_800E86F0, D_800E86F4, &D_800F2E64, &D_800F2E74, &D_8018EB84) == 0) {
func_800B6708();
arg0->unk4 = func_800B6348((gCupSelection * 4) + gCourseSelection) + 0x1E;
arg0->unk4 = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x1E;
play_sound2(0x49008001);
return;
}
@@ -17609,7 +17609,7 @@ block_49:
case 30: /* switch 1 */
case 31: /* switch 1 */
arg0->unk20 = arg0->unk4 - 0x1E;
if (func_800B639C((gCupSelection * 4) + gCourseSelection) != arg0->unk20) {
if (func_800B639C((gCupSelection * 4) + gCupCourseSelection) != arg0->unk20) {
temp_v0_5 = D_800DC4BC;
temp_a1_2 = temp_v0_5->unk6 | temp_v0_5->unkC;
phi_a1_2 = temp_a1_2;
@@ -17833,7 +17833,7 @@ s32 segmented_to_virtual_dupe(s32, void *); // extern
extern ? D_800E7E34;
extern s8 D_8018EDF7;
extern ? D_8018EE10;
extern ? gCupTrackOrder;
extern ? gCupCourseOrder;
void func_800AEDBC(void *arg0) {
s8 temp_v0;
@@ -17846,7 +17846,7 @@ void func_800AEDBC(void *arg0) {
arg0->unk1C = temp_v0;
temp_v0_2 = D_8018EDF7;
arg0 = temp_a3;
func_8009A594(arg0->unk18, 0, segmented_to_virtual_dupe(*(&D_800E7E34 + (*(&gCupTrackOrder + (((temp_v0_2 / 4) * 8) + ((temp_v0_2 % 4) * 2))) * 4)), temp_a3), arg0);
func_8009A594(arg0->unk18, 0, segmented_to_virtual_dupe(*(&D_800E7E34 + (*(&gCupCourseOrder + (((temp_v0_2 / 4) * 8) + ((temp_v0_2 % 4) * 2))) * 4)), temp_a3), arg0);
if (func_800B5B94() == 0) {
func_800B6708();
return;
+23 -23
View File
@@ -2358,7 +2358,7 @@ extern s8 D_8018EDEC;
extern s32 D_8018EE00;
extern s8 D_8018EE0A;
extern s8 gCupSelection;
extern ? gCupTrackOrder;
extern ? gCupCourseOrder;
void func_800B3B58(void *arg0, u16 arg1) {
u16 sp26;
@@ -2425,27 +2425,27 @@ void func_800B3B58(void *arg0, u16 arg1) {
block_22:
phi_v1 = phi_a2;
if ((phi_a2 & 0x400) != 0) {
temp_v0_3 = gCourseSelection;
temp_v0_3 = gCupCourseSelection;
if (temp_v0_3 < 3) {
gCourseSelection = temp_v0_3 + 1;
gCupCourseSelection = temp_v0_3 + 1;
sp1C = phi_a2;
func_800B44AC(&gCourseSelection, &D_8018EDEC, phi_a2);
func_800B44AC(&gCupCourseSelection, &D_8018EDEC, phi_a2);
play_sound2(0x49008000);
phi_v1 = sp1C;
}
}
temp_v0_4 = gCourseSelection;
temp_v0_4 = gCupCourseSelection;
phi_v0 = temp_v0_4;
phi_a1 = &D_8018EDEC;
if (((phi_v1 & 0x800) != 0) && (temp_v0_4 > 0)) {
gCourseSelection = temp_v0_4 - 1;
gCupCourseSelection = temp_v0_4 - 1;
sp1C = phi_v1;
func_800B44AC(&gCourseSelection, &D_8018EDEC);
func_800B44AC(&gCupCourseSelection, &D_8018EDEC);
play_sound2(0x49008000);
phi_v0 = gCourseSelection;
phi_v0 = gCupCourseSelection;
phi_a1 = &D_8018EDEC;
}
gCurrentCourseId = *(&gCupTrackOrder + ((gCupSelection * 8) + (phi_v0 * 2)));
gCurrentCourseId = *(&gCupCourseOrder + ((gCupSelection * 8) + (phi_v0 * 2)));
if ((phi_v1 & 0x4000) != 0) {
if (*phi_a1 == 2) {
*phi_a1 = 1;
@@ -2491,7 +2491,7 @@ block_22:
phi_a1_2 = &D_8018EDEC;
}
D_800DC540 = phi_v0_2;
gCurrentCourseId = *(&gCupTrackOrder + ((phi_v0_2 * 8) + (gCourseSelection * 2)));
gCurrentCourseId = *(&gCupCourseOrder + ((phi_v0_2 * 8) + (gCupCourseSelection * 2)));
if ((phi_v1_2 & 0x4000) != 0) {
func_8009E208();
play_sound2(0x49008002);
@@ -2504,7 +2504,7 @@ block_22:
} else {
*phi_a1_2 = 3;
play_sound2(0x49008001, phi_a1_2);
gCurrentCourseId = *(&gCupTrackOrder + (gCupSelection * 8));
gCurrentCourseId = *(&gCupCourseOrder + (gCupSelection * 8));
D_8018EE00 = 0;
}
func_800B44AC();
@@ -2617,7 +2617,7 @@ void func_800B3F74(u32 arg0) {
gIsMirrorMode = 0;
gEnableDebugMode = 0;
gCupSelection = MUSHROOM_CUP;
gCourseSelection = COURSE_MARIO_RACEWAY;
gCupCourseSelection = CUP_COURSE_ONE;
D_8018EDF7 = 0;
if (D_8018EDF3 <= 0) {
D_8018EDF3 = 1;
@@ -2768,9 +2768,9 @@ void func_800B3F74(u32 arg0) {
play_sound2(0x49009013);
D_8018EE0A = 0;
if (gModeSelection == GRAND_PRIX) {
gCourseSelection = COURSE_MARIO_RACEWAY;
gCupCourseSelection = CUP_COURSE_ONE;
}
phi_v0_2 = gGPCharacterPoints;
phi_v0_2 = gGPPointsByCharacterId;
do {
temp_v0_5 = phi_v0_2 + 4;
temp_v0_5->unk-3 = 0;
@@ -2778,7 +2778,7 @@ void func_800B3F74(u32 arg0) {
temp_v0_5->unk-1 = 0;
temp_v0_5->unk-4 = 0;
phi_v0_2 = temp_v0_5;
} while (temp_v0_5 != gGPOverallRanks);
} while (temp_v0_5 != gCharacterIdByGPOverallRank);
break;
}
func_800B44AC();
@@ -3217,8 +3217,8 @@ GLOBAL_ASM("asm/non_matchings/code_800AF9B0/func_800B4DF4.s")
s32 func_800B4E24(s32 recordIndex) {
return func_800B4DF4(
D_8018EB90.allCourseTimeTrialRecords \
.cupRecords[(((gCupSelection * 4) + gCourseSelection) / 4)] \
.courseRecords[(((gCupSelection * 4) + gCourseSelection) % 4)] \
.cupRecords[(((gCupSelection * 4) + gCupCourseSelection) / 4)] \
.courseRecords[(((gCupSelection * 4) + gCupCourseSelection) % 4)] \
.records[recordIndex]
);
}
@@ -3237,8 +3237,8 @@ s32 func_800B4EB4(s32 recordIndex, s32 courseIndex) {
s32 func_800B4F2C(void) {
return func_800B4DF4(
D_8018EB90.allCourseTimeTrialRecords \
.cupRecords[(((gCupSelection * 4) + gCourseSelection) / 4)] \
.courseRecords[(((gCupSelection * 4) + gCourseSelection) % 4)] \
.cupRecords[(((gCupSelection * 4) + gCupCourseSelection) / 4)] \
.courseRecords[(((gCupSelection * 4) + gCupCourseSelection) % 4)] \
.records[TIME_TRIAL_1LAP_RECORD]
);
}
@@ -3285,7 +3285,7 @@ s32 func_800B5020(u32 arg0, s32 arg1) {
s32 phi_s0_2;
s32 phi_a0_2;
temp_v0 = (gCupSelection * 4) + gCourseSelection;
temp_v0 = (gCupSelection * 4) + gCupCourseSelection;
temp_s2 = ((temp_v0 / 4) * 0x60) + ((temp_v0 % 4) * 0x18) + &D_8018EB90;
sp30 = temp_v0;
phi_s0 = 0;
@@ -3391,7 +3391,7 @@ s32 func_800B5218(void) {
s32 phi_v0_2;
s32 phi_a3_2;
sp38 = (gCupSelection * 4) + gCourseSelection;
sp38 = (gCupSelection * 4) + gCupCourseSelection;
sp28 = *D_800E86A8;
phi_a1 = &D_8018CA74;
phi_a2 = &D_8018CA70;
@@ -4184,7 +4184,7 @@ s32 func_800B6178(s32 arg0) {
if (temp_v0_2 == 0) {
temp_s3->unk4 = 1;
if (D_800DC50C == 4) {
temp_s3->unk5 = (gCupSelection * 4) + gCourseSelection;
temp_s3->unk5 = (gCupSelection * 4) + gCupCourseSelection;
}
temp_s3->unk0 = D_80162DFC;
temp_s3->unk6 = D_80162DE0;
@@ -4278,7 +4278,7 @@ extern s8 gCupSelection;
func_80005AE8(D_800DC4E4);
temp_v0 = (arg0 << 7) + &D_8018EE10;
phi_s3 = 0;
if (((gCupSelection * 4) + gCourseSelection) != temp_v0->unk5) {
if (((gCupSelection * 4) + gCupCourseSelection) != temp_v0->unk5) {
phi_s3 = 2;
} else if (D_80162DFC != temp_v0->unk0) {
phi_s3 = 3;
+2 -2
View File
@@ -37,7 +37,7 @@ void func_80281780(void) {
} else {
D_800E86A8[0] = 0;
}
bcopy(&D_80284ED0, &gGPOverallRanks, 8);
bcopy(&D_80284ED0, &gCharacterIdByGPOverallRank, 8);
}
}
}
@@ -45,7 +45,7 @@ void func_80281780(void) {
s32 func_80281880(s32 arg0) {
s32 i;
for (i = 0; i < 8; i++) {
if (gGPOverallRanks[i] == D_800E86A8[arg0]) break;
if (gCharacterIdByGPOverallRank[i] == D_800E86A8[arg0]) break;
}
return i;
}
+4 -4
View File
@@ -39,7 +39,7 @@ extern u8 *D_8015F8CC;
extern s16 D_8018D8C0[];
extern s16 D_8016348C;
extern s8 gCourseSelection;
extern s8 gCupCourseSelection;
extern s32 D_800DC544;
extern Player gPlayers[];
@@ -232,16 +232,16 @@ void func_8028E3A0(void) {
if (D_80150120) {
if (gCourseSelection == COURSE_BANSHEE_BOARDWALK) {
if (gCupCourseSelection == CUP_COURSE_FOUR) {
D_80150124 = 5;
} else {
D_800DC544++;
gCourseSelection++;
gCupCourseSelection++;
D_80150124 = 4;
}
} else {
D_800DC544++;
gCourseSelection++;
gCupCourseSelection++;
D_80150124 = 4;
}
}
+1 -1
View File
@@ -344,7 +344,7 @@ s32 D_800F3B1C[] = {
};
u16 gCupTrackOrder[] = { // ISSUE CHECK WRONG PREVIEW TEXTURES
u16 gCupCourseOrder[] = { // ISSUE CHECK WRONG PREVIEW TEXTURES
0x0008, 0x0009, 0x0006, 0x000b, // mushroom cup: LR, MMF, KTB, KD
0x000a, 0x0005, 0x0001, 0x0000, // flower cup: TT, FS, CM, MR
0x000e, 0x000c, 0x0007, 0x0002, // star cup: WS, SL, RRy, BC