More matching in code_800AF9B0 (#131)

* Name variables related to selecting a game from the main menu

* Match a couple functions requiring jumptable

* Match func_800B4728

* Match func_800B536C, func_800B5888, func_800B5AAC, and func_800B5AD8

* Name functions related to loading and validating SaveData

* Match func_800B4CB4

* Update selected player defines

* Match func_800B5404

* Match func_800B6088
This commit is contained in:
ChiefFruitcake
2022-01-06 22:32:57 -05:00
committed by GitHub
parent d6cbf56537
commit 7acd1cbc20
47 changed files with 819 additions and 1420 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ Lights1 D_800DC610[] = {
};
static s32 pad = 0x80000000;
s16 gCreditsCourseId = COURSE_LUIGI_RACEWAY;
s16 D_800DC648 = 1;
s16 gPlaceItemBoxes = 1;
void func_800029B0(void) {
switch(D_800DC5A8) {
+11 -11
View File
@@ -163,7 +163,7 @@ s32 func_800061DC(void *arg0, f32 arg1, s32 arg2) {
if (D_800DC51C == 0) {
temp_v0_2 = D_8018EDF3;
phi_a0 = gPlayerOne;
if (temp_v0_2 > 0) {
if (temp_v0_2 > ZERO_PLAYERS_SELECTED) {
do {
temp_a2 = phi_a0->unk_000;
phi_v1_2 = phi_v1_5;
@@ -2105,7 +2105,7 @@ extern ? gPlayers;
phi_v1 = gPlayerPositions;
phi_a0_4 = 0;
phi_a0_7 = 0;
if (temp_t1_2 > 0) {
if (temp_t1_2 > ZERO_PLAYERS_SELECTED) {
sp4 = &gPlayerPositions[temp_t1_2];
do {
phi_a0_6 = phi_a0_7;
@@ -2598,7 +2598,7 @@ block_25:
arg0 = phi_a0_4;
func_800065D0(phi_a0_4, arg1, &D_80163448);
phi_a0_5 = (bitwise f32) arg0;
if ((gModeSelection == GRAND_PRIX) && (D_8018EDF3 == 2) && (arg0 == 0)) {
if ((gModeSelection == GRAND_PRIX) && (D_8018EDF3 == TWO_PLAYERS_SELECTED) && (arg0 == 0)) {
if (D_80164408 < D_8016440C) {
D_80163478 = 0;
} else {
@@ -2725,7 +2725,7 @@ void func_800099EC(s32 arg0, ? arg1) {
temp_a0 = D_8018EDF3;
phi_s0 = 0;
phi_a0 = temp_a0;
if (temp_a0 > 0) {
if (temp_a0 > ZERO_PLAYERS_SELECTED) {
phi_s2 = gPlayerPositions;
phi_s1 = 0;
do {
@@ -3108,7 +3108,7 @@ block_63:
return;
}
temp_v0_9 = D_8018EDF3;
if ((temp_v0_9 > 0) && (temp_v0_9 < 3) && (phi_t1_2 == *(&D_80163330 + phi_t0)) && (*(&D_8016334C + phi_t0) < *(gPlayerPositions + sp38))) {
if ((temp_v0_9 > ZERO_PLAYERS_SELECTED) && (temp_v0_9 < THREE_PLAYERS_SELECTED) && (phi_t1_2 == *(&D_80163330 + phi_t0)) && (*(&D_8016334C + phi_t0) < *(gPlayerPositions + sp38))) {
temp_t0 = sp38 + &D_80163210;
*temp_t0 = D_800ECFB4;
phi_t0_2 = temp_t0;
@@ -5504,7 +5504,7 @@ void func_8000DF8C(s32 arg0, f32 arg1, s32 arg2, s32 arg3) {
temp_v1 = D_8018EDF3;
phi_a0 = 0;
phi_v1 = temp_v1;
if (temp_v1 > 0) {
if (temp_v1 > ZERO_PLAYERS_SELECTED) {
phi_v0 = gPlayers;
phi_a2 = 0x80000000;
phi_a3 = 5;
@@ -6047,10 +6047,10 @@ loop_5:
*phi_s1 = random_int(8);
phi_a1_2 = 0;
phi_a1_5 = 0;
if (temp_a2 < 3) {
if (temp_a2 < THREE_PLAYERS_SELECTED) {
phi_v0_2 = gCharacterSelections;
if (temp_a2 > 0) {
if (temp_a2 > 0) {
if (temp_a2 > ZERO_PLAYERS_SELECTED) {
if (temp_a2 > ZERO_PLAYERS_SELECTED) {
do {
temp_v0_2 = phi_v0_2 + 1;
phi_v0_2 = temp_v0_2;
@@ -8914,7 +8914,7 @@ void func_800132F4(void) {
phi_a1->unk1E = -1;
phi_a1->unkC = temp_a2->unk2;
phi_v1 += 0xB4;
if (D_8018EDF3 >= 3) {
if (D_8018EDF3 >= THREE_PLAYERS_SELECTED) {
phi_a1->unk0 = 0;
} else {
phi_a1->unk0 = 1;
@@ -13117,7 +13117,7 @@ void func_8001A588(s32 arg0, void *arg1, u16 *arg2, s8 arg3, s32 cameraId) {
phi_a3 = cameraId;
if ((gModeSelection != TIME_TRIALS) && (cameraId == 1) && ((temp_v0_6 = *phi_t0, (temp_v0_6 == 0x104)) || (temp_v0_6 == 0x105))) {
phi_v1 = 0;
if (D_8018EDF3 == 2) {
if (D_8018EDF3 == TWO_PLAYERS_SELECTED) {
func_8001A518(phi_s0, *(&gPlayerPositions + (phi_s0 * 4)), 1, cameraId);
} else {
sp44 = phi_s0;
+1 -1
View File
@@ -7514,7 +7514,7 @@ void func_80052E30(s32 arg0) {
D_80183E80.unk0 = 0;
D_80183E80.unk2 = 0;
D_80183E80.unk4 = 0;
if (D_8018EDF3 == 1) {
if (D_8018EDF3 == ONE_PLAYERS_SELECTED) {
phi_s0 = 0;
if (gPlayerCountSelection1 > 0) {
do {
+13 -13
View File
@@ -546,17 +546,17 @@ block_26:
D_8018D2E0 = D_8018D2B0 - D_8018D2E0;
}
temp_v0 = D_8018EDF3;
if (temp_v0 == 4) {
if (temp_v0 == FOUR_PLAYERS_SELECTED) {
phi_v1->unk0 = 0xA0;
phi_t0->unk0 = 0x78;
return;
}
if (temp_v0 == 3) {
if (temp_v0 == THREE_PLAYERS_SELECTED) {
phi_v1->unk0 = 0xEB;
phi_t0->unk0 = 0xAF;
return;
}
if (temp_v0 == 2) {
if (temp_v0 == TWO_PLAYERS_SELECTED) {
if (gCurrentCourseId != 0xA) {
phi_v1->unk2 = 0x109;
phi_v1->unk0 = phi_v1->unk2;
@@ -635,7 +635,7 @@ void func_8006F8CC(void) {
D_801657E8 = 1;
D_80165800.unk0 = D_80165800.unk1;
temp_a0 = D_8018EDF3;
if (temp_a0 == 4) {
if (temp_a0 == FOUR_PLAYERS_SELECTED) {
if (gModeSelection != BATTLE) {
D_801657E4 = 1;
D_801657F0 = 1;
@@ -646,10 +646,10 @@ void func_8006F8CC(void) {
D_801657F8 = 0;
D_80165800.unk0 = D_80165800.unk1;
}
} else if (temp_a0 == 3) {
} else if (temp_a0 == THREE_PLAYERS_SELECTED) {
D_801657E8 = 0;
D_801657F8 = 1;
} else if (temp_a0 == 2) {
} else if (temp_a0 == TWO_PLAYERS_SELECTED) {
if (gModeSelection != BATTLE) {
D_80165800.unk1 = 0;
D_801657E4 = 1;
@@ -809,10 +809,10 @@ void func_8006FA94(void) {
D_80165658.unk0 = 0;
temp_ra = D_8018EDF3;
D_801658BC = D_801658C6;
if (temp_ra != 1) {
if (temp_ra != 2) {
if (temp_ra != 3) {
if (temp_ra != 4) {
if (temp_ra != ONE_PLAYERS_SELECTED) {
if (temp_ra != TWO_PLAYERS_SELECTED) {
if (temp_ra != THREE_PLAYERS_SELECTED) {
if (temp_ra != FOUR_PLAYERS_SELECTED) {
} else {
if (gModeSelection == VERSUS) {
@@ -1243,7 +1243,7 @@ void func_8007055C(void) {
case 5:
phi_s4 = 0x19;
phi_s0 = 0;
if (D_8018EDF3 == 1) {
if (D_8018EDF3 == ONE_PLAYERS_SELECTED) {
phi_s4 = 0x32;
}
phi_s1 = 0;
@@ -1303,7 +1303,7 @@ extern s16 D_80165748;
void func_80070714(void) {
D_80165730 = 1;
if (D_8018EDF3 == 1) {
if (D_8018EDF3 == ONE_PLAYERS_SELECTED) {
D_80165738 = 0x64;
D_80165740 = 0x3C;
D_80165748 = 0x1E;
@@ -1725,7 +1725,7 @@ void func_80070780(void) {
if (D_800DC50C != CREDITS_SEQUENCE) {
temp_v0_10 = D_8018EDF3;
phi_s1_8 = &D_80183EA0;
if ((temp_v0_10 == 1) || ((temp_v0_10 == 2) && (gModeSelection == VERSUS))) {
if ((temp_v0_10 == ONE_PLAYERS_SELECTED) || ((temp_v0_10 == TWO_PLAYERS_SELECTED) && (gModeSelection == VERSUS))) {
temp_v0_11 = gCCSelection;
if (temp_v0_11 != CC_50) {
if (temp_v0_11 != CC_100) {
+39 -39
View File
@@ -221,7 +221,7 @@ s32 func_80091D74(); // extern
? func_80094C60(); // extern
? func_800AF9B0(); // extern
? func_800B44BC(); // extern
? func_800B4A10(); // extern
? load_save_data(); // extern
? func_800C97C4(s32); // extern
? func_800C9D0C(s32); // extern
extern s8 D_800E852C;
@@ -259,7 +259,7 @@ void func_80091B78(void) {
D_8018EDF5 = 5;
D_8018EDF6 = 0xA;
if (osEepromProbe(&gSIEventMesgQueue) != 0) {
func_800B4A10();
load_save_data();
}
if (func_80091D74() != 0) {
gMenuSelection = CONTROLLER_PAK_MENU;
@@ -6517,7 +6517,7 @@ block_74:
gCurrentCourseId = COURSE_MARIO_RACEWAY;
gScreenModeSelection = SCREEN_MODE_1P;
gPlayerCountSelection1 = 1;
D_8018EDF3 = 1;
D_8018EDF3 = ONE_PLAYERS_SELECTED;
gCharacterSelections[0] = MARIO;
gModeSelection = GRAND_PRIX;
break;
@@ -6525,7 +6525,7 @@ block_74:
gCurrentCourseId = COURSE_CHOCO_MOUNTAIN;
gScreenModeSelection = SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL;
gPlayerCountSelection1 = 2;
D_8018EDF3 = 2;
D_8018EDF3 = TWO_PLAYERS_SELECTED;
gCharacterSelections[0] = YOSHI;
gCharacterSelections[1] = DK;
gModeSelection = VERSUS;
@@ -6535,7 +6535,7 @@ block_74:
gCurrentCourseId = COURSE_KALAMARI_DESERT;
gScreenModeSelection = SCREEN_MODE_1P;
gPlayerCountSelection1 = 1;
D_8018EDF3 = 1;
D_8018EDF3 = ONE_PLAYERS_SELECTED;
gCharacterSelections[0] = LUIGI;
gModeSelection = GRAND_PRIX;
break;
@@ -6543,7 +6543,7 @@ block_74:
gCurrentCourseId = COURSE_WARIO_STADIUM;
gScreenModeSelection = SCREEN_MODE_3P_4P_SPLITSCREEN;
gPlayerCountSelection1 = 3;
D_8018EDF3 = 3;
D_8018EDF3 = THREE_PLAYERS_SELECTED;
gCharacterSelections[0] = WARIO;
gCharacterSelections[1] = YOSHI;
gCharacterSelections[2] = BOWSER;
@@ -6554,7 +6554,7 @@ block_74:
gCurrentCourseId = COURSE_BOWSER_CASTLE;
gScreenModeSelection = SCREEN_MODE_1P;
gPlayerCountSelection1 = 1;
D_8018EDF3 = 1;
D_8018EDF3 = ONE_PLAYERS_SELECTED;
gCharacterSelections[0] = BOWSER;
gModeSelection = GRAND_PRIX;
phi_a2 = 2;
@@ -6563,7 +6563,7 @@ block_74:
gCurrentCourseId = COURSE_SHERBET_LAND;
gScreenModeSelection = SCREEN_MODE_3P_4P_SPLITSCREEN;
gPlayerCountSelection1 = 4;
D_8018EDF3 = 4;
D_8018EDF3 = FOUR_PLAYERS_SELECTED;
gCharacterSelections[0] = MARIO;
gCharacterSelections[1] = LUIGI;
gCharacterSelections[2] = PEACH;
@@ -6651,7 +6651,7 @@ block_74:
} else {
gModeSelection = BATTLE;
if (gPlayerCountSelection1 == 1) {
D_8018EDF3 = 2;
D_8018EDF3 = TWO_PLAYERS_SELECTED;
gScreenModeSelection = SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL;
gPlayerCountSelection1 = D_8018EDF3;
}
@@ -8548,10 +8548,10 @@ static ? D_800E824C; /* unable to generate initia
static ? D_800E8254; /* unable to generate initializer; const */
static ? D_800E8294; /* unable to generate initializer; const */
static ? gCharacterSelections; /* unable to generate initializer; const */
static ? D_800E86AB; /* unable to generate initializer; const */
static ? D_800E86AD; /* unable to generate initializer; const */
static ? gGameModeRowSelectionForNumPlayers; /* unable to generate initializer; const */
static ? gGameModeSubMenuRowSelectionForNumPlayers; /* unable to generate initializer; const */
static ? D_800EFD64; /* unable to generate initializer; const */
static ? D_800F2B70; /* unable to generate initializer; const */
static ? gGameModeFromNumPlayersAndRowSelection; /* unable to generate initializer; const */
void func_8009F5E0(void *arg0) {
s32 spAC;
@@ -9018,9 +9018,9 @@ void func_8009F5E0(void *arg0) {
case 0x18: /* switch 4 */
case 0x19: /* switch 4 */
temp_v0_11 = D_8018EDF3;
temp_v1_7 = *(&D_800E86AB + temp_v0_11);
temp_a2_7 = *(&D_800E86AD + ((temp_v0_11 * 3) + temp_v1_7));
temp_a1_4 = *(&D_800F2B70 + ((temp_v0_11 * 0xC) + (temp_v1_7 * 4)));
temp_v1_7 = *(&gGameModeRowSelectionForNumPlayers + temp_v0_11);
temp_a2_7 = *(&gGameModeSubMenuRowSelectionForNumPlayers + ((temp_v0_11 * 3) + temp_v1_7));
temp_a1_4 = *(&gGameModeFromNumPlayersAndRowSelection + ((temp_v0_11 * 0xC) + (temp_v1_7 * 4)));
phi_a2 = temp_a2_7;
phi_a2_2 = temp_a2_7;
phi_a1 = temp_a1_4;
@@ -10349,8 +10349,8 @@ s32 get_string_width(s32); // extern
extern s32 D_800DC540;
extern ? D_800E7500;
extern ? D_800E76CC;
extern ? D_800E86AB;
extern ? D_800E86AD;
extern ? gGameModeRowSelectionForNumPlayers;
extern ? gGameModeSubMenuRowSelectionForNumPlayers;
extern ? D_800F0C1C;
extern ? D_800F0C24;
extern f32 D_800F1C90;
@@ -10461,7 +10461,7 @@ void func_800A2EB8(void *arg0) {
temp_v0 = D_8018EDF3;
temp_f0_4 = D_800F1CA0;
// Print CC mode again?
draw_text((temp_s0_2 - arg0->unkC) + 0xF5, arg0->unk10 + 0xE1, *(&D_800E76CC + (*(&D_800E86AD + ((temp_v0 * 3) + *(&D_800E86AB + temp_v0))) * 4)), 0, temp_f0_4, temp_f0_4);
draw_text((temp_s0_2 - arg0->unkC) + 0xF5, arg0->unk10 + 0xE1, *(&D_800E76CC + (*(&gGameModeSubMenuRowSelectionForNumPlayers + ((temp_v0 * 3) + *(&gGameModeRowSelectionForNumPlayers + temp_v0))) * 4)), 0, temp_f0_4, temp_f0_4);
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A2EB8.s")
@@ -10541,8 +10541,8 @@ extern ? D_80164478;
extern s8 D_8018EDF3;
static ? D_800E7500; /* unable to generate initializer; const */
static ? D_800E76CC; /* unable to generate initializer; const */
static ? D_800E86AB; /* unable to generate initializer; const */
static ? D_800E86AD; /* unable to generate initializer; const */
static ? gGameModeRowSelectionForNumPlayers; /* unable to generate initializer; const */
static ? gGameModeSubMenuRowSelectionForNumPlayers; /* unable to generate initializer; const */
void func_800A34A8(void *arg0) {
s8 sp80;
@@ -10664,7 +10664,7 @@ void func_800A34A8(void *arg0) {
temp_s0_2 = ((get_string_width(*(&D_800E7500 + (gCupSelection * 4))) + 8) * 0.6f) / 2.0f;
draw_text((-(((get_string_width(*(&D_800E76CC + (gCCSelection * 4))) + 8) * 0.6f) / 2.0f) - arg0->unkC) + 0xE6, arg0->unk10 + 0xE1, *(&D_800E7500 + (D_800DC540 * 4)), 0, 0.6f, 0.6f);
temp_v0 = D_8018EDF3;
draw_text((temp_s0_2 - arg0->unkC) + 0xE6, arg0->unk10 + 0xE1, *(&D_800E76CC + (*(&D_800E86AD + ((temp_v0 * 3) + *(&D_800E86AB + temp_v0))) * 4)), 0, 0.6f, 0.6f);
draw_text((temp_s0_2 - arg0->unkC) + 0xE6, arg0->unk10 + 0xE1, *(&D_800E76CC + (*(&gGameModeSubMenuRowSelectionForNumPlayers + ((temp_v0 * 3) + *(&gGameModeRowSelectionForNumPlayers + temp_v0))) * 4)), 0, 0.6f, 0.6f);
}
}
#else
@@ -12176,9 +12176,9 @@ void func_800A638C(void *arg0) {
temp_v0_2->unk4 = phi_a1 & 0xFF;
temp_v0_2->unk0 = 0xFA000000;
temp_a0_2 = D_8018EDF3;
if (temp_a0_2 != 2) {
if (temp_a0_2 != 3) {
if (temp_a0_2 != 4) {
if (temp_a0_2 != TWO_PLAYERS_SELECTED) {
if (temp_a0_2 != THREE_PLAYERS_SELECTED) {
if (temp_a0_2 != FOUR_PLAYERS_SELECTED) {
} else {
func_800A6CC0(arg0, phi_a1);
@@ -12329,7 +12329,7 @@ void func_800A69C8(s32 arg0) {
? *phi_s2;
phi_s0 = 0;
if (D_8018EDF3 > 0) {
if (D_8018EDF3 > ZERO_PLAYERS_SELECTED) {
temp_f22 = D_800F1F24;
phi_s1 = &D_800E7300;
phi_s2 = &D_800E7380;
@@ -12394,7 +12394,7 @@ void func_800A6BEC(s32 arg0) {
temp_v1 = D_8018EDF3;
phi_s0 = 0;
phi_v1 = temp_v1;
if (temp_v1 > 0) {
if (temp_v1 > ZERO_PLAYERS_SELECTED) {
do {
temp_v0 = gModeSelection;
if (temp_v0 != VERSUS) {
@@ -12435,7 +12435,7 @@ void func_800A6CC0(s32 arg0) {
temp_v1 = D_8018EDF3;
phi_s0 = 0;
phi_v1 = temp_v1;
if (temp_v1 > 0) {
if (temp_v1 > ZERO_PLAYERS_SELECTED) {
do {
temp_v0 = gModeSelection;
if (temp_v0 != VERSUS) {
@@ -14426,8 +14426,8 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A9D5C.s")
? func_800A91D8(void *, s32, s32); /* extern */
? func_800A92E8(void *, s32); /* extern */
static ? D_800E70E8; /* unable to generate initializer; const */
static ? D_800E86AB; /* unable to generate initializer; const */
static ? D_800F2B70; /* unable to generate initializer; const */
static ? gGameModeRowSelectionForNumPlayers; /* unable to generate initializer; const */
static ? gGameModeFromNumPlayersAndRowSelection; /* unable to generate initializer; const */
void func_800A9E58(void *arg0) {
void *sp2C;
@@ -14482,8 +14482,8 @@ block_5:
}
temp_v0 = D_8018EDF3;
temp_v1 = arg0->unk4;
temp_a2 = *(&D_800E86AB + temp_v0);
temp_a1 = *(&D_800F2B70 + ((temp_v0 * 0xC) + (temp_a2 * 4)));
temp_a2 = *(&gGameModeRowSelectionForNumPlayers + temp_v0);
temp_a1 = *(&gGameModeFromNumPlayersAndRowSelection + ((temp_v0 * 0xC) + (temp_a2 * 4)));
if (temp_v1 != 0) {
if (temp_v1 != 1) {
if (temp_v1 != 2) {
@@ -14504,7 +14504,7 @@ block_5:
arg0->unkC = temp_a1_2;
arg0->unk10 = temp_v0_2->unk10 + arg0->unk1C;
sp2C = temp_v0_2;
func_800A91D8(arg0, temp_a1_2, (*(&D_800E86AB + D_8018EDF3) * 0x12) + temp_v0_2->unk10 + temp_v1_2->unk2);
func_800A91D8(arg0, temp_a1_2, (*(&gGameModeRowSelectionForNumPlayers + D_8018EDF3) * 0x12) + temp_v0_2->unk10 + temp_v1_2->unk2);
arg0->unk1C = arg0->unk10 - sp2C->unk10;
return;
default: /* switch 4 */
@@ -14559,14 +14559,14 @@ block_37:
arg0->unkC = temp_v0_4->unkC;
arg0->unk1C = 0;
arg0->unk4 = 1;
arg0->unk10 = (*(&D_800E86AB + D_8018EDF3) * 0x12) + temp_v0_4->unk10 + 0x41;
arg0->unk10 = (*(&gGameModeRowSelectionForNumPlayers + D_8018EDF3) * 0x12) + temp_v0_4->unk10 + 0x41;
return;
case CONFIRM_OK_SELECTION_FROM_BACK_OUT: /* switch 2 */
case TIME_TRAILS_DATA_SELECTION_FROM_BACK_OUT: /* switch 2 */
temp_v0_5 = func_800AAE68(arg0, temp_a1, temp_a2);
temp_v1_4 = (arg0->unk0 * 8) + -(sp24 * 8) + &D_800E70E8;
arg0->unkC = temp_v0_5->unkC + temp_v1_4->unk0;
temp_t5_2 = (*(&D_800E86AB + D_8018EDF3) * 0x12) + temp_v0_5->unk10 + temp_v1_4->unk2;
temp_t5_2 = (*(&gGameModeRowSelectionForNumPlayers + D_8018EDF3) * 0x12) + temp_v0_5->unk10 + temp_v1_4->unk2;
arg0->unk10 = temp_t5_2;
arg0->unk1C = temp_t5_2 - temp_v0_5->unk10;
arg0->unk15 = 1;
@@ -14607,7 +14607,7 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AA280.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
s32 func_800B5B2C(?); /* extern */
s32 check_for_controller_pak(?); /* extern */
s32 func_800CE720(? *, ? *, ?); /* extern */
s32 osPfsFindFile(? *, u16, s32, ? *, ? *, ? *); /* extern */
s32 osPfsFreeBlocks(? *, s32 *); /* extern */
@@ -14615,7 +14615,7 @@ s32 osPfsNumFiles(? *, s32 *, s32 *); /* extern */
extern ? D_8018E868;
extern ? D_8018EB84;
extern ? gSIEventMesgQueue;
static ? D_800E86AB; /* unable to generate initializer; const */
static ? gGameModeRowSelectionForNumPlayers; /* unable to generate initializer; const */
static ? D_800F2E64; /* unable to generate initializer; const */
static ? D_800F2E74; /* unable to generate initializer; const */
u16 D_800E86F0; /* unable to generate initializer; const */
@@ -14641,7 +14641,7 @@ void func_800AA2EC(void *arg0) {
case CONFIRM_OK_SELECTION:
case CONFIRM_OK_SELECTION_FROM_BACK_OUT:
case TIME_TRAILS_DATA_SELECTION_FROM_BACK_OUT:
if ((arg0->unk4 == 0) && (temp_v0 = D_8018EDF3, (temp_v0 == 1)) && (*(&D_800E86AB + temp_v0) == 1)) {
if ((arg0->unk4 == 0) && (temp_v0 = D_8018EDF3, (temp_v0 == 1)) && (*(&gGameModeRowSelectionForNumPlayers + temp_v0) == 1)) {
if (D_800E86F8 != 0) {
sp20 = 0;
temp_v0_2 = osPfsFindFile(&D_8018E868, D_800E86F0, D_800E86F4, &D_800F2E64, &D_800F2E74, &D_8018EB84);
@@ -14661,7 +14661,7 @@ block_12:
}
if (phi_t1 == 0) {
if (D_800E86F8 == 0) {
if (func_800B5B2C(0) == 0) {
if (check_for_controller_pak(0) == 0) {
arg0->unk4 = 2;
return;
}
@@ -16451,7 +16451,7 @@ void func_800ACC50(void *arg0) {
case 0:
temp_t8 = temp_a1->unk1C + 3;
temp_a1->unk1C = temp_t8;
if ((temp_t8 >= 0x65) && (temp_a1->unk4 = 1, temp_a1->unk1C = 0, phi_s0 = 0, (D_8018EDF3 > 0))) {
if ((temp_t8 >= 0x65) && (temp_a1->unk4 = 1, temp_a1->unk1C = 0, phi_s0 = 0, (D_8018EDF3 > ZERO_PLAYERS_SELECTED))) {
do {
add_8018D9E0_entry(phi_s0 + 0xB1, 0, 0, 5 - phi_s0);
temp_s0 = phi_s0 + 1;
+126 -125
View File
@@ -1,125 +1,126 @@
#ifndef CODE_80091750_H
#define CODE_80091750_H
#include "common_structs.h"
/* Function Prototypes */
f64 exponent_by_squaring(f64, s32);
void swap_values(s32*, s32*);
void func_800921B4();
void func_800921C0(s32, s32, s32);
void func_80092224(s32, s32, s32);
void func_80092500();
void func_80092564();
void func_800925A0();
void func_80092604();
void func_80092630();
void func_8009265C();
void func_80092C80();
s32 char_to_glyph_index(char*);
s32 func_80092DF8();
s32 get_string_width(char*);
void set_text_color(s32);
void func_800930E4(s32, s32, s32*);
Gfx *func_8009BEF0(Gfx*, s32, f32, f32, s32, f32,f32);
void print_text0(s32, s32, char*, s32, f32, f32, s32);
void func_80093324(s32, s32, char*, s32, f32, f32);
void func_80093358(s32, s32, char*, s32, f32, f32);
void print_text1(s32, s32, char*, s32, f32, f32, s32);
void func_800936B8(s32, s32, char*, s32, f32, f32);
void draw_text(s32, s32, char*, s32, f32, f32);
void func_80093720(s32, s32, char*, s32, f32, f32);
void func_80093754(s32, s32, char*, s32, f32, f32);
void print_text2(s32, s32, char*, s32, f32, f32, s32);
void func_800939C8(s32, s32, char*, s32, f32, f32);
void text_draw(s32, s32, char*, s32, f32, f32);
void func_80093E20();
void func_80093E40();
Gfx *func_80098C18(Gfx*, s32, s32, s32, s32, s32, s32, u32, s32);
Gfx *draw_box(Gfx*, s32, s32, s32, s32, s32, s32, s32, s32);
Gfx *func_80098FC8(Gfx*, s32, s32, s32, s32);
void func_80099110();
void func_80099184(s32);
void *segmented_to_virtual(segment_address_t);
void *segmented_to_virtual_dupe(segment_address_t);
void func_80099A94(Mk64_Texture *, s32);
void func_80099E60(Mk64_Texture *, s32, s32);
void func_8009A594(s32, s32, segment_address_t);
void func_8009A640(s32, s32, s32, segment_address_t);
segment_address_t func_8009A878(struct_8018DEE0_entry*);
void func_8009A76C(s32, s32, s32, s32);
void func_8009A7EC(s32, s32, s32, s32, s32);
void func_8009A944(struct_8018DEE0_entry*, s32);
Gfx *func_8009BA74(Gfx *, Mk64_Texture*, s32, s32);
s32 func_8009C434(s32, struct_8018DEE0_entry*, s32, s32, s32);
s32 func_8009C708(s32, struct_8018DEE0_entry *, s32, s32, s32, s32);
void func_8009E1C0();
void func_8009E208();
void func_8009E258();
void func_800A0AD0(struct_8018D9E0_entry*);
void func_800A11D0(struct_8018D9E0_entry*, s32, s32);
void func_800A1924(struct_8018D9E0_entry*);
void func_800A7258(struct_8018D9E0_entry*);
void func_800A72FC(struct_8018D9E0_entry*);
void func_800A7448(struct_8018D9E0_entry*);
void func_800A75A0(struct_8018D9E0_entry*);
void convert_number_to_ascii(s32, char*);
void write_dashes(char*);
void get_time_record_minutes(s32, char*);
void get_time_record_seconds(s32 , char*);
void get_time_record_centiseconds(s32, char*);
void func_800A86E8(struct_8018D9E0_entry*);
void func_800A8E14(struct_8018D9E0_entry*);
void func_800A8EC0(struct_8018D9E0_entry*);
void func_800A954C(struct_8018D9E0_entry*);
void func_800AADD4(struct_8018D9E0_entry*);
void func_800AAE18(struct_8018D9E0_entry*);
struct_8018D9E0_entry *func_800AAEB4(s32);
struct_8018D9E0_entry *func_800AAEF4(s32);
void func_800AAF94(struct_8018D9E0_entry*, s32);
/* This is where I'd put my static data, if I had any */
extern Mk64_Texture D_0200157C;
extern Mk64_Texture D_02001874;
extern Gfx D_02004A0C[];
extern Gfx D_020077A8[];
extern Gfx D_020077D8[];
extern Gfx D_02008008[];
extern Gfx D_02008030[];
extern Gfx D_02008058[];
extern s16 gGlyphDisplayWidth[]; // D_800EF690
extern RGBA16 D_800E74A8[5];
extern char *D_800E7500[9];
extern char *D_800E7678[];
extern char *D_800E76CC[4];
extern char *D_800E76DC[4];
extern char *D_800E77A8;
extern char *D_800E77AC;
extern char *D_800E77B0;
extern char *D_800E7A88[4];
extern char *D_800E7A98;
extern char *D_800E7A9C[2];
extern s32 gGlyphTextureLUT[]; // D_800E7E84
extern Mk64_Texture_Group *D_800E82B4[5];
extern s8 D_800E86D0[20];
extern f32 D_800F1F30;
extern f32 D_800F24A8;
extern f32 D_800F24AC;
extern f32 D_800F24B0;
extern f32 D_800F24B4;
extern f32 D_800F24B8;
extern f64 D_800F24C0;
extern s8 D_8018D9D9;
extern struct_8018D9E0_entry D_8018D9E0[32]; // D_8018D9E0
extern struct_8018DEE0_entry D_8018DEE0[16]; // D_8018DEE0
extern struct_8018E118_entry D_8018E118[200]; // D_8018E118
extern s8 gTextColor; // D_8018E860
extern s8 D_8018ED91;
extern s8 D_802874F5;
#endif
#ifndef CODE_80091750_H
#define CODE_80091750_H
#include "common_structs.h"
/* Function Prototypes */
f64 exponent_by_squaring(f64, s32);
void swap_values(s32*, s32*);
void func_800921B4();
void func_800921C0(s32, s32, s32);
void func_80092224(s32, s32, s32);
void func_80092500();
void func_80092564();
void func_800925A0();
void func_80092604();
void func_80092630();
void func_8009265C();
void func_80092C80();
s32 char_to_glyph_index(char*);
s32 func_80092DF8();
s32 get_string_width(char*);
void set_text_color(s32);
void func_800930E4(s32, s32, s32*);
Gfx *func_8009BEF0(Gfx*, s32, f32, f32, s32, f32,f32);
void print_text0(s32, s32, char*, s32, f32, f32, s32);
void func_80093324(s32, s32, char*, s32, f32, f32);
void func_80093358(s32, s32, char*, s32, f32, f32);
void print_text1(s32, s32, char*, s32, f32, f32, s32);
void func_800936B8(s32, s32, char*, s32, f32, f32);
void draw_text(s32, s32, char*, s32, f32, f32);
void func_80093720(s32, s32, char*, s32, f32, f32);
void func_80093754(s32, s32, char*, s32, f32, f32);
void print_text2(s32, s32, char*, s32, f32, f32, s32);
void func_800939C8(s32, s32, char*, s32, f32, f32);
void text_draw(s32, s32, char*, s32, f32, f32);
void func_80093E20();
void func_80093E40();
Gfx *func_80098C18(Gfx*, s32, s32, s32, s32, s32, s32, u32, s32);
Gfx *draw_box(Gfx*, s32, s32, s32, s32, s32, s32, s32, s32);
Gfx *func_80098FC8(Gfx*, s32, s32, s32, s32);
void func_80099110();
void func_80099184(s32);
void *segmented_to_virtual(segment_address_t);
void *segmented_to_virtual_dupe(segment_address_t);
void func_80099A94(Mk64_Texture *, s32);
void func_80099E60(Mk64_Texture *, s32, s32);
void func_8009A594(s32, s32, segment_address_t);
void func_8009A640(s32, s32, s32, segment_address_t);
segment_address_t func_8009A878(struct_8018DEE0_entry*);
void func_8009A76C(s32, s32, s32, s32);
void func_8009A7EC(s32, s32, s32, s32, s32);
void func_8009A944(struct_8018DEE0_entry*, s32);
Gfx *func_8009BA74(Gfx *, Mk64_Texture*, s32, s32);
s32 func_8009C434(s32, struct_8018DEE0_entry*, s32, s32, s32);
s32 func_8009C708(s32, struct_8018DEE0_entry *, s32, s32, s32, s32);
void func_8009E1C0();
void func_8009E1E4(void);
void func_8009E208();
void func_8009E258();
void func_800A0AD0(struct_8018D9E0_entry*);
void func_800A11D0(struct_8018D9E0_entry*, s32, s32);
void func_800A1924(struct_8018D9E0_entry*);
void func_800A7258(struct_8018D9E0_entry*);
void func_800A72FC(struct_8018D9E0_entry*);
void func_800A7448(struct_8018D9E0_entry*);
void func_800A75A0(struct_8018D9E0_entry*);
void convert_number_to_ascii(s32, char*);
void write_dashes(char*);
void get_time_record_minutes(s32, char*);
void get_time_record_seconds(s32 , char*);
void get_time_record_centiseconds(s32, char*);
void func_800A86E8(struct_8018D9E0_entry*);
void func_800A8E14(struct_8018D9E0_entry*);
void func_800A8EC0(struct_8018D9E0_entry*);
void func_800A954C(struct_8018D9E0_entry*);
void func_800AADD4(struct_8018D9E0_entry*);
void func_800AAE18(struct_8018D9E0_entry*);
struct_8018D9E0_entry *func_800AAEB4(s32);
struct_8018D9E0_entry *func_800AAEF4(s32);
void func_800AAF94(struct_8018D9E0_entry*, s32);
/* This is where I'd put my static data, if I had any */
extern Mk64_Texture D_0200157C;
extern Mk64_Texture D_02001874;
extern Gfx D_02004A0C[];
extern Gfx D_020077A8[];
extern Gfx D_020077D8[];
extern Gfx D_02008008[];
extern Gfx D_02008030[];
extern Gfx D_02008058[];
extern s16 gGlyphDisplayWidth[]; // D_800EF690
extern RGBA16 D_800E74A8[5];
extern char *D_800E7500[9];
extern char *D_800E7678[];
extern char *D_800E76CC[4];
extern char *D_800E76DC[4];
extern char *D_800E77A8;
extern char *D_800E77AC;
extern char *D_800E77B0;
extern char *D_800E7A88[4];
extern char *D_800E7A98;
extern char *D_800E7A9C[2];
extern s32 gGlyphTextureLUT[]; // D_800E7E84
extern Mk64_Texture_Group *D_800E82B4[5];
extern s8 D_800E86D0[20];
extern f32 D_800F1F30;
extern f32 D_800F24A8;
extern f32 D_800F24AC;
extern f32 D_800F24B0;
extern f32 D_800F24B4;
extern f32 D_800F24B8;
extern f64 D_800F24C0;
extern s8 D_8018D9D9;
extern struct_8018D9E0_entry D_8018D9E0[32]; // D_8018D9E0
extern struct_8018DEE0_entry D_8018DEE0[16]; // D_8018DEE0
extern struct_8018E118_entry D_8018E118[200]; // D_8018E118
extern s8 gTextColor; // D_8018E860
extern s8 D_8018ED91;
extern s8 D_802874F5;
#endif
+321 -520
View File
File diff suppressed because it is too large Load Diff
+140 -79
View File
@@ -1,79 +1,140 @@
#ifndef CODE_800AF9B0_H
#define CODE_800AF9B0_H
#include "PR/os.h"
#include "common_structs.h"
/* Function Prototypes */
void func_800AF9B0();
void func_800B13B0(struct Controller*, s32);
s32 func_800B34E8(s32);
void func_800B3B58(struct Controller*, u16);
void func_800B44AC();
void func_800B44BC();
s32 func_800B4520();
void func_800B45E0(s32);
void func_800B4670();
void func_800B46D0();
void func_800B4728(s32);
void func_800B4820();
s32 func_800B4874(s32);
s32 func_800B492C();
s32 func_800B49E4();
void func_800B4A10();
s32 func_800B4E24(s32);
s32 func_800B4EB4(s32, s32);
s32 func_800B4F2C();
s32 func_800B4FB0(s32);
u8 func_800B54C0(s32, s32);
u8 func_800B54EC(s32, s32);
u8 func_800B5508(s32, s32, s32);
s32 func_800B5530(s32);
s32 func_800B555C();
s32 func_800B557C();
void func_800B559C(s32);
void func_800B5948();
s32 func_800B5B2C(s32);
s32 func_800B5F30();
s32 func_800B6014();
s32 func_800B6A68();
// audio/external.c
void play_sound2(s32);
void func_800CA330(s32);
// memory.c
u32 func_802A7B70(u16);
/* This is where I'd put my static data, if I had any */
extern s32 D_800DC540;
extern u16 D_800E86F0;
extern s32 D_800E86F4;
extern s8 D_800E86F8;
extern s8 D_800E86FC;
extern u8 D_800F2E64;
extern u8 D_800F2E74;
extern s32 D_8018E7A8;
extern s8 D_8018E7B0;
extern OSPfs D_8018E868;
extern OSPfs D_8018E8D0;
extern s32 D_8018EB78;
extern s32 D_8018EB7C;
extern s32 D_8018EB84;
extern u8 D_8018ED10[4]; // Direct reference to the grandPrixPoints section of save data
extern u8 D_8018ED11;
extern u8 D_8018ED12;
extern u8 D_8018ED13;
extern s8 D_8018ED16;
extern s8 D_8018ED17;
extern u32 D_8018EDB8;
extern u32 D_8018EDBC;
extern s8 D_8018EDE5;
extern s8 D_8018EDE6;
extern s8 D_8018EDE7;
extern s8 D_8018EDEC;
extern s8 D_8018EE0A;
#endif
#ifndef CODE_800AF9B0_H
#define CODE_800AF9B0_H
#include "PR/os.h"
#include "common_structs.h"
#include <types.h>
union GrandPrixPointsUnion
{
u8 grandPrixPointsArray[4];
u8 grandPrixPointsMushroomCup;
};
/* Function Prototypes */
void func_800AF9B0();
void func_800B053C(struct Controller*, u16);
void func_800B13B0(struct Controller*, u16);
void func_800B15AC(struct Controller*, u16);
void func_800B1C40(struct Controller*, u16);
void func_800B1C90(struct Controller*, u16);
void func_800B20F4(struct Controller*, u16);
void func_800B29D8(struct Controller*, u16);
s32 func_800B34E8(s32);
void func_800B3554(struct Controller*, u16);
void func_800B3B58(struct Controller*, u16);
void func_800B44AC();
void func_800B44BC();
s32 func_800B4520();
void func_800B45E0(s32);
void write_save_data_grand_prix_points_and_sound_mode();
void func_800B46D0();
void func_800B4728(s32);
void reset_save_data_grand_prix_points_and_sound_mode();
s32 func_800B4874(s32);
s32 compute_save_data_checksum_1();
s32 compute_save_data_checksum_2();
void func_800B4A10();
void func_800B4A9C(s32);
void validate_save_data(void);
s32 func_800B4E24(s32);
s32 func_800B4EB4(s32, s32);
s32 func_800B4F2C();
s32 func_800B4FB0(s32);
u8 func_800B54C0(s32, s32);
u8 func_800B54EC(s32, s32);
u8 func_800B5508(s32, s32, s32);
s32 func_800B5530(s32);
s32 func_800B555C();
s32 func_800B557C();
void func_800B559C(s32);
s32 func_800B578C(s32);
s32 func_800B5888(s32);
void update_save_data_backup();
s32 compute_save_data_checksum_backup_1(void);
s32 compute_save_data_checksum_backup_2(void);
s32 validate_save_data_checksum_backup();
s32 func_800B5B2C(s32);
s32 func_800B5F30();
s32 func_800B6014();
void func_800B69BC(s32);
s32 func_800B6A68();
// audio/external.c
void play_sound2(s32);
void func_800CA330(s32);
void func_800CA388(s32);
// os
s32 func_800CE720(OSMesgQueue*, OSPfs*, s32);
// memory.c
u32 func_802A7B70(u16);
/* This is where I'd put my static data, if I had any */
extern u16 gEnableDebugMode; // D_800DC520
extern s32 gCCSelection; // D_800DC538
extern s32 gModeSelection; // D_800DC53C
extern s32 D_800DC540;
extern s16 gCurrentCourseId; // D_800DC5A0
extern s32 gIsMirrorMode; // D_800DC5F4
extern s16 gPlaceItemBoxes; // D_800DC638
extern s8 gGameModeRowSelectionForNumPlayers[SELECTED_PLAYER_DEFINES_TOTAL]; // D_800E869B. 0-4 players, game type row selected for each player amoun
extern s8 gGameModeSubMenuRowSelectionForNumPlayers[SELECTED_PLAYER_DEFINES_TOTAL][MAX_NUM_MAIN_MENU_GAME_TYPES]; // D_800E869D. 0-4 players, 3 possible game types per player amouunt
extern s32 D_800E86A4;
extern s8 gDisplayedControllerPakTableRows[5]; // D_800E86C6
extern s32 D_800E86E4;
extern u16 D_800E86F0;
extern s32 D_800E86F4;
extern s8 D_800E86F8;
extern s8 D_800E86FC;
extern s32 gGameModeFromNumPlayersAndRowSelection[SELECTED_PLAYER_DEFINES_TOTAL][MAX_NUM_MAIN_MENU_GAME_TYPES]; // D_800F2B60. 0-4 players, 3 possible game types per player amount
extern s16 gCupCourseOrder[NUM_CUPS][NUM_COURSES_PER_CUP]; // D_800F2BB4
extern u8 D_800F2E60[];
extern u8 D_800F2E64;
extern u8 D_800F2E74;
extern OSMesgQueue gSIEventMesgQueue; // D_8014F0B8
extern s32 D_8018E7A8;
extern s8 D_8018E7B0;
extern OSPfs D_8018E868;
extern OSPfs D_8018E8D0;
extern OSPfsState D_8018E938[];
extern s32 D_8018EB38[16];
extern s32 D_8018EB78;
extern s32 D_8018EB7C;
extern s32 D_8018EB84;
extern SaveData D_8018EB90;
extern union GrandPrixPointsUnion D_8018ED10; // Direct reference to the grandPrixPoints section of save data
extern u8 D_8018ED11;
extern u8 D_8018ED12;
extern u8 D_8018ED13;
extern u8 gSaveDataSoundMode; // D_8018ED14
extern u8 D_8018ED16; // D_8018EB90.checksum[1]
extern u8 D_8018ED17; // D_8018EB90.checksum[2]
extern u8 D_8018ED4E; // D_8018EB90.onlyBestTimeTrialRecords[0].unknownBytes[6]
extern union GrandPrixPointsUnion D_8018ED88; // D_8018EB90.grandPrixPointsBackup[0]
extern u8 D_8018ED89;
extern u8 D_8018ED8A;
extern u8 D_8018ED8B;
extern u8 D_8018ED8E; // D_8018EB90.checksumBackup[1]
extern u8 D_8018ED8F; // D_8018EB90.checksumBackup[2]
extern u32 D_8018EDB8;
extern u32 D_8018EDBC;
extern s8 D_8018EDE5;
extern s8 D_8018EDE6;
extern s8 D_8018EDE7;
extern s8 D_8018EDEC;
extern u8 gSoundMode; // D_8018EDF2
extern s8 D_8018EDF3;
extern s8 gTimeTrialDataCourseIndex; // D_8018EDF7
extern s8 gCourseRecordsMenuSelection; // D_8018EDF8
extern s32 gMenuTimingCounter; // D_8018EE00
extern s8 gCupSelection; // D_8018EE09
extern s8 D_8018EE0A;
extern s8 gCupCourseSelection; // D_8018EE0B
extern struct_8018EE10_entry D_8018EE10[];
#endif
+1 -1
View File
@@ -57,7 +57,7 @@ void func_802818BC(void) {
s32 sp1C;
s32 temp_v0_2;
if (D_8018EDF3 != 2) {
if (D_8018EDF3 != TWO_PLAYERS_SELECTED) {
D_802874D8.unk_1D = func_80281880(0);
D_802874D8.unk_1E = gCharacterSelections[0];
return;
+2 -2
View File
@@ -4348,7 +4348,7 @@ GLOBAL_ASM("asm/non_matchings/code_actors/place_segment_06.s")
s16 func_8029EC88(f32 *, s16 *, ? *, ?); // extern
? load_giant_egg(? *, ?, ?, ?); // extern
s16 random_u16(); // extern
extern s16 D_800DC648;
extern s16 gPlaceItemBoxes;
extern ? D_8015F9B8;
extern f32 gCourseDirection;
extern ? gSegmentTable;
@@ -4376,7 +4376,7 @@ void place_all_item_boxes(u32 arg0) {
temp_s0 = *(&gSegmentTable + ((arg0 >> 0x18) * 4)) + (arg0 & 0xFFFFFF) + 0x80000000;
phi_s0 = temp_s0;
if ((gModeSelection != TIME_TRIALS) && (D_800DC648 != 0)) {
if ((gModeSelection != TIME_TRIALS) && (gPlaceItemBoxes != 0)) {
load_giant_egg(&sp60, 0, 0, 0);
temp_v1 = *temp_s0;
phi_v1 = temp_v1;