diff options
| author | Tyler McGavran <tyler.taggerung@gmail.com> | 2021-12-31 15:30:55 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-31 13:30:55 -0700 |
| commit | 494c36bdb15bae2aeb618ad4d2fb85fa7b570627 (patch) | |
| tree | f228e06f91e160adf498974ac14d3555e6cd97fd /src | |
| parent | 2263234e581ca7f9147e1d7fcb46d27d97f179ba (diff) | |
Match assorted functions and identify a variable (#122)
Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/code_80091750.c | 190 | ||||
| -rw-r--r-- | src/code_800AF9B0.c | 54 |
2 files changed, 85 insertions, 159 deletions
diff --git a/src/code_80091750.c b/src/code_80091750.c index ec4efc0f1..ff96e26be 100644 --- a/src/code_80091750.c +++ b/src/code_80091750.c @@ -8241,10 +8241,10 @@ block_63: /* Duplicate return node #87. Try simplifying control flow for better match */ return; case 0xE6: /* switch 2 */ - temp_v0_8 = D_8018EDF7; + temp_v0_8 = gTimeTrialDataCourseIndex; sp7C = phi_ra; phi_ra->unk18 = func_8009A374(segmented_to_virtual_dupe(*(&D_800E7E34 + (*(&gCupCourseOrder + (((temp_v0_8 / 4) * 8) + ((temp_v0_8 % 4) * 2))) * 4)))); - phi_ra->unk1C = D_8018EDF7; + phi_ra->unk1C = gTimeTrialDataCourseIndex; func_800996BC(segmented_to_virtual(&D_02004A0C), 0); func_8006EF60(); if (func_800B5B94() == 0) { @@ -9363,35 +9363,17 @@ to all jump sources and move the label, or add a nop to the delay slot). GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A10CC.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void *func_8009BA74(void *, s32, s32, s32); // extern -void *segmented_to_virtual(segment_address_t); // extern -extern ? D_800E74A8; -extern ? D_800E82B4; -extern void *gDisplayListHead; +extern RGBA16 D_800E74A8[5]; +extern Mk64_Texture_Group *D_800E82B4[5]; -void func_800A11D0(void *arg0, s32 arg1, s32 arg2) { - s32 temp_a3; - void *temp_v0; - void *temp_v0_2; - void *temp_v1; +void func_800A11D0(struct_8018D9E0_entry *arg0, s32 arg1, s32 arg2) { + RGBA16 *temp_v1; - temp_v0 = gDisplayListHead; - gDisplayListHead = temp_v0 + 8; - temp_v1 = (arg1 * 8) + &D_800E74A8; - temp_v0->unk0 = 0xFA000000; - temp_v0->unk4 = (temp_v1->unk0 << 0x18) | ((temp_v1->unk2 & 0xFF) << 0x10) | ((temp_v1->unk4 & 0xFF) << 8) | (temp_v1->unk6 & 0xFF); - temp_v0_2 = gDisplayListHead; - temp_a3 = arg2 & 0xFF; - gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0xFB000000; - temp_v0_2->unk4 = (temp_a3 << 0x18) | (temp_a3 << 0x10) | (temp_a3 << 8); - gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual(*(&D_800E82B4 + (arg1 * 4))), arg0->unkC, arg0->unk10); + temp_v1 = &D_800E74A8[arg1]; + gDPSetPrimColor(gDisplayListHead++, 0, 0, temp_v1->red, temp_v1->green, temp_v1->blue, temp_v1->alpha); + gDPSetEnvColor(gDisplayListHead++, arg2, arg2, arg2, 0x00); + gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual(D_800E82B4[arg1]), arg0->column, arg0->row); } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A11D0.s") -#endif #ifdef MIPS_TO_C //generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 @@ -9562,39 +9544,20 @@ void func_800A1780(void *arg0) { GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A1780.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -? func_8004EF9C(s16); // extern -void *func_800959A0(void *, ?, ?, ?, s32); // extern -? func_8009A76C(s32, ?, ?, ?); // extern -void *func_8009BA74(void *, ? *, ?, ?); // extern -s32 func_800B639C(s8); // extern -extern ? D_02004A0C; -extern s8 D_8018EDF7; -extern ? gCupCourseOrder; -extern void *gDisplayListHead; - -void func_800A1924(void *arg0) { - s8 temp_v0_2; - void *temp_v0; - void *temp_v0_3; +extern Gfx D_02004A0C[]; +extern s16 gCupCourseOrder[4][4]; - func_8009A76C(arg0->unk18, 0x17, 0x84, -1); - if (func_800B639C(D_8018EDF7) >= 0) { - temp_v0 = func_800959A0(gDisplayListHead, 0x57, 0x84, 0x96, 0x95); - gDisplayListHead = temp_v0; - gDisplayListHead = func_8009BA74(temp_v0, &D_02004A0C, 0x57, 0x84); +void func_800A1924(struct_8018D9E0_entry *arg0) { + func_8009A76C(arg0->D_8018DEE0_index, 0x17, 0x84, -1); + if (func_800B639C(gTimeTrialDataCourseIndex) >= TIME_TRIAL_DATA_LUIGI_RACEWAY) { + gDisplayListHead = func_800959A0(gDisplayListHead, 0x57, 0x84, 0x96, 0x95); + gDisplayListHead = func_8009BA74(gDisplayListHead, D_02004A0C, 0x57, 0x84); } - temp_v0_2 = D_8018EDF7; - 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; - temp_v0_3->unk0 = 0xBA000C02; + func_8004EF9C(gCupCourseOrder[gTimeTrialDataCourseIndex / 4][gTimeTrialDataCourseIndex % 4]); + do { + gDPSetTextureFilter(gDisplayListHead++, G_TF_BILERP); + } while(0); } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A1924.s") -#endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 @@ -9608,7 +9571,7 @@ extern ? *D_800E7728; extern ? *D_800E772C; extern ? D_800E77D8; extern ? D_800E77E4; -extern s8 D_8018EDF7; +extern s8 gTimeTrialDataCourseIndex; extern ? gCupCourseOrder; void func_800A1A20(void *arg0) { @@ -9619,7 +9582,7 @@ void func_800A1A20(void *arg0) { s32 phi_s0; s32 phi_s1; - temp_v0 = D_8018EDF7; + temp_v0 = gTimeTrialDataCourseIndex; temp_s1 = *(&gCupCourseOrder + (((temp_v0 / 4) * 8) + ((temp_v0 % 4) * 2))); arg0->unkC = 0x14; set_text_color(TEXT_BLUE_GREEN_RED_CYCLE_1); @@ -9657,7 +9620,7 @@ s32 func_800B639C(s8); // extern extern s32 D_800E7834; extern f32 D_800F1B54; extern ? D_8018EB90; -extern s8 D_8018EDF7; +extern s8 gTimeTrialDataCourseIndex; extern s8 D_8018EDF8; extern void *gDisplayListHead; @@ -9674,7 +9637,7 @@ void func_800A1BE0(s32 arg0) { s32 *phi_s3; ? phi_s2; - temp_v0 = D_8018EDF7; + temp_v0 = gTimeTrialDataCourseIndex; temp_f20 = D_800F1B54; phi_s0 = 0; phi_s4 = 0x3F; @@ -9688,7 +9651,7 @@ void func_800A1BE0(s32 arg0) { if (phi_s0 != 1) { if (phi_s0 != 2) { - } else if (func_800B639C(D_8018EDF7) < 0) { + } else if (func_800B639C(gTimeTrialDataCourseIndex) < 0) { goto block_9; } } else if ((((temp_v0 / 4) * 0x60) + ((temp_v0 % 4) * 0x18) + &D_8018EB90)->unk12 == 0) { @@ -11193,7 +11156,7 @@ extern ? D_800E7744; extern ? D_800F0C54; extern ? D_800F0C58; extern f32 D_800F1DC8; -extern s8 D_8018EDF7; +extern s8 gTimeTrialDataCourseIndex; extern s32 gGlobalTimer; void func_800A474C(s32 arg0, s32 arg1, s32 arg2) { @@ -11216,17 +11179,17 @@ void func_800A474C(s32 arg0, s32 arg1, s32 arg2) { } if (arg0 < 5) { if (sp30 == 0) { - phi_v0 = func_800B4E24(arg0, &D_8018EDF7); + phi_v0 = func_800B4E24(arg0, &gTimeTrialDataCourseIndex); } else { - phi_v0 = func_800B4EB4(arg0, D_8018EDF7); + phi_v0 = func_800B4EB4(arg0, gTimeTrialDataCourseIndex); } sp48 = phi_v0; set_text_color(TEXT_GREEN); } else { if (sp30 == 0) { - phi_v0_2 = func_800B4F2C(&D_8018EDF7); + phi_v0_2 = func_800B4F2C(&gTimeTrialDataCourseIndex); } else { - phi_v0_2 = func_800B4FB0(D_8018EDF7); + phi_v0_2 = func_800B4FB0(gTimeTrialDataCourseIndex); } sp48 = phi_v0_2; } @@ -11265,7 +11228,7 @@ block_21: get_time_record_centiseconds(sp2C, &sp38); // Print millisecond func_800939C8(arg1 + 0x50, arg2, &sp38, 0, temp_f20, temp_f20); - if (sp2C < 0x927C0) { + if (sp2C < MAX_TIME) { phi_v0_3 = sp48 >> 0x14; } else { phi_v0_3 = 8; @@ -12756,7 +12719,7 @@ void write_dashes(char *buffer) { void get_time_record_minutes(s32 timeRecord, char *buffer) { // If timeRecord is greater than 100 minutes, put '-' // in buffer - if (timeRecord >= 0x927C0) { + if (timeRecord >= MAX_TIME) { write_dashes(buffer); return; } @@ -12768,7 +12731,7 @@ void get_time_record_minutes(s32 timeRecord, char *buffer) { void get_time_record_seconds(s32 timeRecord, char *buffer) { // If timeRecord is greater than 100 minutes, put '-' // in buffer - if (timeRecord >= 0x927C0) { + if (timeRecord >= MAX_TIME) { write_dashes(buffer); return; } @@ -12780,7 +12743,7 @@ void get_time_record_seconds(s32 timeRecord, char *buffer) { void get_time_record_centiseconds(s32 timeRecord, char *buffer) { // If timeRecord is greater than 100 minutes, put '-' // in buffer - if (timeRecord >= 0x927C0) { + if (timeRecord >= MAX_TIME) { write_dashes(buffer); return; } @@ -13440,22 +13403,9 @@ block_12: GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A8564.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -s32 func_80098C18(s32, s32, s32, s32, s32, s32, s32, s32, s32); // extern -extern s32 gDisplayListHead; - -void func_800A86E8(void *arg0) { - s32 temp_a1; - s32 temp_a2; - - temp_a2 = arg0->unk10; - temp_a1 = arg0->unkC; - gDisplayListHead = func_80098C18(gDisplayListHead, temp_a1, temp_a2, temp_a1 + 0x64, temp_a2 + 0x27, 1, 1, 1, 0xFF); +void func_800A86E8(struct_8018D9E0_entry *arg0) { + gDisplayListHead = func_80098C18(gDisplayListHead, arg0->column, arg0->row, arg0->column + 0x64, arg0->row + 0x27, 1, 1, 1, 0xFF); } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A86E8.s") -#endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 @@ -13499,7 +13449,7 @@ void func_800A874C(void *arg0) { func_80093324(arg0->unkC + 0x20, arg0->unk10 + 0x21, &D_800F0C9C, 0, temp_f20, temp_f22); get_time_record_centiseconds(temp_s1, &sp58); text_draw(arg0->unkC + 0x29, arg0->unk10 + 0x21, &sp58, 0, temp_f20, temp_f22); - if (temp_s1 < 0x927C0) { + if (temp_s1 < MAX_TIME) { phi_s2 = phi_v0 >> 0x14; } else { phi_s2 = 8; @@ -13675,50 +13625,31 @@ void func_800A8CA4(void *arg0) { GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A8CA4.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -? draw_text(?, ?, s32, ?, f32, f32); // extern -? func_80093324(?, ?, s32, ?, f32, f32); // extern -? set_text_color(?); // extern -extern s32 D_800E77A8; -extern s32 D_800E77AC; -extern s32 D_800E77B0; +extern char *D_800E77A8; +extern char *D_800E77AC; +extern char *D_800E77B0; extern f32 D_800F24A8; extern f32 D_800F24AC; extern f32 D_800F24B0; extern f32 D_800F24B4; -void func_800A8E14(s32 arg0) { +void func_800A8E14(struct_8018D9E0_entry *unused) { set_text_color(TEXT_YELLOW); draw_text(0x98, 0x44, D_800E77A8, 0, 1.0f, 1.0f); func_80093324(0x17, 0x58, D_800E77AC, 0, D_800F24A8, D_800F24AC); func_80093324(0x17, 0x6A, D_800E77B0, 0, D_800F24B0, D_800F24B4); } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A8E14.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -? func_80093324(s32, s32, s32, ?, f32, f32); // extern -? func_8009A76C(s32, s32, s32, ?); // extern -? set_text_color(?); // extern -extern ? D_800E7678; +extern char *D_800E7678[]; extern f32 D_800F24B8; -void func_800A8EC0(void *arg0) { - f32 temp_f0; - +void func_800A8EC0(struct_8018D9E0_entry *arg0) { if (arg0->unk20 != 0) { - func_8009A76C(arg0->unk18, arg0->unkC, arg0->unk10, -1); + func_8009A76C(arg0->D_8018DEE0_index, arg0->column, arg0->row, -1); set_text_color(TEXT_YELLOW); - temp_f0 = D_800F24B8; - func_80093324(arg0->unkC + 0x20, arg0->unk10 + 0x28, *(&D_800E7678 + (arg0->unk20 * 4)), 0, temp_f0, temp_f0); + func_80093324(arg0->column + 0x20, arg0->row + 0x28, D_800E7678[arg0->unk20], 0, D_800F24B8, D_800F24B8); } } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A8EC0.s") -#endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 @@ -15394,20 +15325,15 @@ void func_800AB164(void *arg0) { GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AB164.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern s8 gCupSelection; - -void func_800AB260(void *arg0) { - if ((arg0->unk0 - 0x58) == gCupSelection) { - arg0->unk15 = 1; - return; +void func_800AB260(struct_8018D9E0_entry *arg0) { + s32 temp = (arg0->type - 0x58); + if (temp == gCupSelection) { + arg0->visible = 1; + } + else{ + arg0->visible = 0; } - arg0->unk15 = 0; } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AB260.s") -#endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 @@ -15766,14 +15692,14 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800ABAE8.s") #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 extern ? D_800E7430; -extern s8 D_8018EDF7; +extern s8 gTimeTrialDataCourseIndex; void func_800ABB24(void *arg0) { s32 temp_t7; s8 temp_v0; void *temp_v1; - temp_v0 = D_8018EDF7; + temp_v0 = gTimeTrialDataCourseIndex; temp_v1 = ((temp_v0 / 4) * 8) + &D_800E7430; arg0->unkC = temp_v1->unk0 - 2; temp_t7 = arg0->unk1C + 0x10; @@ -17655,7 +17581,7 @@ s32 func_800B5B94(); // extern ? func_800B6708(); // extern void *segmented_to_virtual_dupe(segment_address_t); // extern extern ? D_800E7E34; -extern s8 D_8018EDF7; +extern s8 gTimeTrialDataCourseIndex; extern ? D_8018EE10; extern ? gCupCourseOrder; @@ -17664,11 +17590,11 @@ void func_800AEDBC(void *arg0) { s8 temp_v0_2; void *temp_a3; - temp_v0 = D_8018EDF7; + temp_v0 = gTimeTrialDataCourseIndex; temp_a3 = arg0; if (temp_v0 != arg0->unk1C) { arg0->unk1C = temp_v0; - temp_v0_2 = D_8018EDF7; + temp_v0_2 = gTimeTrialDataCourseIndex; arg0 = temp_a3; func_8009A594(arg0->unk18, 0, segmented_to_virtual_dupe(*(&D_800E7E34 + (*(&gCupCourseOrder + (((temp_v0_2 / 4) * 8) + ((temp_v0_2 % 4) * 2))) * 4))), arg0); if (func_800B5B94() == 0) { diff --git a/src/code_800AF9B0.c b/src/code_800AF9B0.c index 1a57d8700..9c622cfc9 100644 --- a/src/code_800AF9B0.c +++ b/src/code_800AF9B0.c @@ -1056,7 +1056,7 @@ GLOBAL_ASM("asm/non_matchings/code_800AF9B0/func_800B053C.s") s32 func_800B4520(u16); // extern ? play_sound2(?, s8 *); // extern extern s8 D_8018EDEC; -extern s8 D_8018EDF7; +extern s8 gTimeTrialDataCourseIndex; extern s8 D_8018EDF8; void func_800B13B0(void *arg0, ? arg1) { @@ -1079,29 +1079,29 @@ void func_800B13B0(void *arg0, ? arg1) { if (func_800B4520(phi_a1) == 0) { if (D_8018EDEC == 1) { if ((phi_a1 & 0x400) != 0) { - temp_v0 = D_8018EDF7; + temp_v0 = gTimeTrialDataCourseIndex; if ((temp_v0 % 4) != 3) { - D_8018EDF7 = temp_v0 + 1; + gTimeTrialDataCourseIndex = temp_v0 + 1; sp18 = phi_a1; - play_sound2(0x49008000, &D_8018EDF7); + play_sound2(0x49008000, &gTimeTrialDataCourseIndex); } } if ((phi_a1 & 0x800) != 0) { - temp_v0_2 = D_8018EDF7; + temp_v0_2 = gTimeTrialDataCourseIndex; if ((temp_v0_2 & 3) != 0) { - D_8018EDF7 = temp_v0_2 - 1; + gTimeTrialDataCourseIndex = temp_v0_2 - 1; sp18 = phi_a1; - play_sound2(0x49008000, &D_8018EDF7); + play_sound2(0x49008000, &gTimeTrialDataCourseIndex); } } - phi_a1_2 = &D_8018EDF7; + phi_a1_2 = &gTimeTrialDataCourseIndex; if ((phi_a1 & 0x100) != 0) { - temp_v0_3 = D_8018EDF7; + temp_v0_3 = gTimeTrialDataCourseIndex; if ((temp_v0_3 / 4) != 3) { - D_8018EDF7 = temp_v0_3 + 4; + gTimeTrialDataCourseIndex = temp_v0_3 + 4; sp18 = phi_a1; - play_sound2(0x49008000, &D_8018EDF7); - phi_a1_2 = &D_8018EDF7; + play_sound2(0x49008000, &gTimeTrialDataCourseIndex); + phi_a1_2 = &gTimeTrialDataCourseIndex; } } if ((phi_a1 & 0x200) != 0) { @@ -1154,7 +1154,7 @@ extern f64 D_800F2DA8; extern f64 D_800F2DB0; extern ? D_8018EB90; extern s8 D_8018EDEC; -extern s8 D_8018EDF7; +extern s8 gTimeTrialDataCourseIndex; extern s8 D_8018EDF8; extern s8 D_8018EDF9; @@ -1257,7 +1257,7 @@ void func_800B15AC(void *arg0, ? arg1) { if (temp_v0_4 != 2) { } else { - temp_v0_5 = func_800B639C(D_8018EDF7, 0, temp_a2, sp18); + temp_v0_5 = func_800B639C(gTimeTrialDataCourseIndex, 0, temp_a2, sp18); phi_a1 = temp_v0_5; if (temp_v0_5 >= 0) { sp20 = temp_v0_5; @@ -1276,8 +1276,8 @@ void func_800B15AC(void *arg0, ? arg1) { } } } else { - func_800B4728(D_8018EDF7, 0, temp_a2, sp18); - func_800B559C(D_8018EDF7); + func_800B4728(gTimeTrialDataCourseIndex, 0, temp_a2, sp18); + func_800B559C(gTimeTrialDataCourseIndex); play_sound2(0x4900801D); phi_a1 = -1; } @@ -1297,24 +1297,24 @@ void func_800B15AC(void *arg0, ? arg1) { } phi_a3 = phi_v1; if ((phi_v1 & 0x200) != 0) { - temp_a1_2 = D_8018EDF7; - if (temp_a1_2 > 0) { - D_8018EDF7 = temp_a1_2 - 1; + temp_a1_2 = gTimeTrialDataCourseIndex; + if (temp_a1_2 > TIME_TRIAL_DATA_LUIGI_RACEWAY) { + gTimeTrialDataCourseIndex = temp_a1_2 - 1; sp18 = phi_v1; play_sound2(0x49008000, temp_a1_2); phi_a3 = sp18; } } if ((phi_a3 & 0x100) != 0) { - temp_a1_3 = D_8018EDF7; - if (temp_a1_3 < 0xF) { - D_8018EDF7 = temp_a1_3 + 1; + temp_a1_3 = gTimeTrialDataCourseIndex; + if (temp_a1_3 < TIME_TRIAL_DATA_RAINBOW_ROAD) { + gTimeTrialDataCourseIndex = temp_a1_3 + 1; sp18 = phi_a3; play_sound2(0x49008000, temp_a1_3); } } sp18 = phi_a3; - temp_a1_4 = D_8018EDF7; + temp_a1_4 = gTimeTrialDataCourseIndex; temp_a2_2 = func_800AAEF4(0xE8); temp_t4 = ((temp_a1_4 / 4) * 0x60) + ((temp_a1_4 % 4) * 0x18); if (D_8018EDF8 == 2) { @@ -1361,7 +1361,7 @@ void func_800B15AC(void *arg0, ? arg1) { if ((temp_v0_10 == 1) && ((temp_t4 + &D_8018EB90)->unk12 == 0)) { *phi_v1_2 = temp_v0_10 + 1; } - if ((*phi_v1_2 == 2) && (sp28 = temp_a2_2, sp18 = phi_a3, sp24 = temp_t4 + &D_8018EB90, phi_a3_2 = phi_a3, phi_a2 = temp_a2_2, phi_v1_3 = &D_8018EDF8, (func_800B639C(D_8018EDF7) < 0))) { + if ((*phi_v1_2 == 2) && (sp28 = temp_a2_2, sp18 = phi_a3, sp24 = temp_t4 + &D_8018EB90, phi_a3_2 = phi_a3, phi_a2 = temp_a2_2, phi_v1_3 = &D_8018EDF8, (func_800B639C(gTimeTrialDataCourseIndex) < 0))) { if ((temp_t4 + &D_8018EB90)->unk12 == 0) { D_8018EDF8 = 0; } else { @@ -2549,7 +2549,7 @@ extern s8 D_8018EDEE; extern s8 gDebugMenuSelection; extern s8 D_8018EDF1; extern s8 D_8018EDF3; -extern s8 D_8018EDF7; +extern s8 gTimeTrialDataCourseIndex; extern s8 gDebugGotoScene; extern s8 D_8018EDFB; extern s8 D_8018EDFC; @@ -2618,7 +2618,7 @@ void func_800B3F74(u32 arg0) { gEnableDebugMode = 0; gCupSelection = MUSHROOM_CUP; gCupCourseSelection = CUP_COURSE_ONE; - D_8018EDF7 = 0; + gTimeTrialDataCourseIndex = TIME_TRIAL_DATA_LUIGI_RACEWAY; if (D_8018EDF3 <= 0) { D_8018EDF3 = 1; } @@ -3092,7 +3092,7 @@ void func_800B4A9C(s32 arg0) { s32 phi_a3; s32 phi_a3_2; - if ((func_800B4EB4(0, arg0) & 0xFFFFF) < 0x927C0) { + if ((func_800B4EB4(0, arg0) & 0xFFFFF) < MAX_TIME) { *(&D_8018EBA2 + (((arg0 / 4) * 0x60) + ((arg0 % 4) * 0x18))) = 1; } temp_t2 = ((arg0 / 4) * 0x60) + ((arg0 % 4) * 0x18) + &D_8018EB90; |
