diff --git a/asm/bss_8001C4D0.s b/asm/bss_8001C4D0.s index f734f2464..d49a6f705 100644 --- a/asm/bss_8001C4D0.s +++ b/asm/bss_8001C4D0.s @@ -2073,7 +2073,7 @@ glabel D_8018EDEB glabel D_8018EDEC .skip 1 -glabel D_8018EDED +glabel gMainMenuSelectionDepth .skip 1 glabel D_8018EDEE @@ -2082,7 +2082,7 @@ glabel D_8018EDEE glabel gDebugMenuSelection .skip 1 -glabel gMenuState # 0x8018EDF0 +glabel gControllerPakMenuSelection # 0x8018EDF0 .skip 1 glabel D_8018EDF1 diff --git a/asm/non_matchings/audio/external/func_800C2274.s b/asm/non_matchings/audio/external/func_800C2274.s index 5cf5796de..3565856ac 100644 --- a/asm/non_matchings/audio/external/func_800C2274.s +++ b/asm/non_matchings/audio/external/func_800C2274.s @@ -21,8 +21,8 @@ glabel func_800C2274 /* 0C2EC0 800C22C0 AFA40048 */ sw $a0, 0x48($sp) /* 0C2EC4 800C22C4 13200062 */ beqz $t9, .L800C2450 /* 0C2EC8 800C22C8 2406000F */ li $a2, 15 -/* 0C2ECC 800C22CC 3C02800E */ lui $v0, %hi(D_800DC530) # $v0, 0x800e -/* 0C2ED0 800C22D0 8C42C530 */ lw $v0, %lo(D_800DC530)($v0) +/* 0C2ECC 800C22CC 3C02800E */ lui $v0, %hi(gScreenModeSelection) # $v0, 0x800e +/* 0C2ED0 800C22D0 8C42C530 */ lw $v0, %lo(gScreenModeSelection)($v0) /* 0C2ED4 800C22D4 00074880 */ sll $t1, $a3, 2 /* 0C2ED8 800C22D8 01274821 */ addu $t1, $t1, $a3 /* 0C2EDC 800C22DC 10400010 */ beqz $v0, .L800C2320 diff --git a/asm/non_matchings/code_80005FD0/func_800127E0.s b/asm/non_matchings/code_80005FD0/func_800127E0.s index 230310d56..c51dedb12 100644 --- a/asm/non_matchings/code_80005FD0/func_800127E0.s +++ b/asm/non_matchings/code_80005FD0/func_800127E0.s @@ -94,8 +94,8 @@ glabel func_800127E0 /* 013540 80012940 26F7010C */ addiu $s7, $s7, 0x10c /* 013544 80012944 1420FFBF */ bnez $at, .L80012844 /* 013548 80012948 AEC0FFF8 */ sw $zero, -8($s6) -/* 01354C 8001294C 3C02800E */ lui $v0, %hi(D_800DC530) -/* 013550 80012950 8C42C530 */ lw $v0, %lo(D_800DC530)($v0) +/* 01354C 8001294C 3C02800E */ lui $v0, %hi(gScreenModeSelection) +/* 013550 80012950 8C42C530 */ lw $v0, %lo(gScreenModeSelection)($v0) /* 013554 80012954 3C0D8016 */ lui $t5, %hi(D_801635A0) # 0x8016 /* 013558 80012958 25A635A0 */ addiu $a2, $t5, %lo(D_801635A0) # 0x35a0 /* 01355C 8001295C 10400008 */ beqz $v0, .L80012980 diff --git a/asm/non_matchings/code_800431B0/func_80050E34.s b/asm/non_matchings/code_800431B0/func_80050E34.s index 94329beba..c0277c6d4 100644 --- a/asm/non_matchings/code_800431B0/func_80050E34.s +++ b/asm/non_matchings/code_800431B0/func_80050E34.s @@ -384,10 +384,10 @@ glabel func_80050E34 /* 051FFC 800513FC 3C0F800E */ lui $t7, %hi(D_800DC4DC) # $t7, 0x800e /* 052000 80051400 8DEFC4DC */ lw $t7, %lo(D_800DC4DC)($t7) /* 052004 80051404 8FAE00AC */ lw $t6, 0xac($sp) -/* 052008 80051408 3C18800E */ lui $t8, %hi(D_800DC530) # $t8, 0x800e +/* 052008 80051408 3C18800E */ lui $t8, %hi(gScreenModeSelection) # $t8, 0x800e /* 05200C 8005140C 55CF0027 */ bnel $t6, $t7, .L800514AC /* 052010 80051410 8FBF002C */ lw $ra, 0x2c($sp) -/* 052014 80051414 8F18C530 */ lw $t8, %lo(D_800DC530)($t8) +/* 052014 80051414 8F18C530 */ lw $t8, %lo(gScreenModeSelection)($t8) /* 052018 80051418 3C0F0D00 */ lui $t7, %hi(D_0D007A40) # $t7, 0xd00 /* 05201C 8005141C 25EF7A40 */ addiu $t7, %lo(D_0D007A40) # addiu $t7, $t7, 0x7a40 /* 052020 80051420 17000021 */ bnez $t8, .L800514A8 diff --git a/asm/non_matchings/code_800431B0/func_800514BC.s b/asm/non_matchings/code_800431B0/func_800514BC.s index 7c9b8b913..ec53a2cf9 100644 --- a/asm/non_matchings/code_800431B0/func_800514BC.s +++ b/asm/non_matchings/code_800431B0/func_800514BC.s @@ -1,7 +1,7 @@ glabel func_800514BC /* 0520BC 800514BC 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 0520C0 800514C0 3C0E800E */ lui $t6, %hi(D_800DC530) # $t6, 0x800e -/* 0520C4 800514C4 8DCEC530 */ lw $t6, %lo(D_800DC530)($t6) +/* 0520C0 800514C0 3C0E800E */ lui $t6, %hi(gScreenModeSelection) # $t6, 0x800e +/* 0520C4 800514C4 8DCEC530 */ lw $t6, %lo(gScreenModeSelection)($t6) /* 0520C8 800514C8 AFBF0034 */ sw $ra, 0x34($sp) /* 0520CC 800514CC AFB70030 */ sw $s7, 0x30($sp) /* 0520D0 800514D0 AFB6002C */ sw $s6, 0x2c($sp) diff --git a/asm/non_matchings/code_800431B0/func_800532A4.s b/asm/non_matchings/code_800431B0/func_800532A4.s index 7cd10a406..f3ff671d1 100644 --- a/asm/non_matchings/code_800431B0/func_800532A4.s +++ b/asm/non_matchings/code_800431B0/func_800532A4.s @@ -88,8 +88,8 @@ glabel func_800532A4 /* 053FF0 800533F0 0C012171 */ jal func_800485C4 /* 053FF4 800533F4 AFB90028 */ sw $t9, 0x28($sp) .L800533F8: -/* 053FF8 800533F8 3C08800E */ lui $t0, %hi(D_800DC530) # $t0, 0x800e -/* 053FFC 800533FC 8D08C530 */ lw $t0, %lo(D_800DC530)($t0) +/* 053FF8 800533F8 3C08800E */ lui $t0, %hi(gScreenModeSelection) # $t0, 0x800e +/* 053FFC 800533FC 8D08C530 */ lw $t0, %lo(gScreenModeSelection)($t0) /* 054000 80053400 3C028019 */ lui $v0, %hi(D_8018CF14) # $v0, 0x8019 /* 054004 80053404 55000023 */ bnel $t0, $zero, .L80053494 /* 054008 80053408 8FBF003C */ lw $ra, 0x3c($sp) diff --git a/asm/non_matchings/code_80057C60/func_80059AC8.s b/asm/non_matchings/code_80057C60/func_80059AC8.s index 3fbd6646e..60001e819 100644 --- a/asm/non_matchings/code_80057C60/func_80059AC8.s +++ b/asm/non_matchings/code_80057C60/func_80059AC8.s @@ -35,8 +35,8 @@ glabel func_80059AC8 /* 05A748 80059B48 263100B8 */ addiu $s1, $s1, 0xb8 /* 05A74C 80059B4C 1614FFF7 */ bne $s0, $s4, .L80059B2C /* 05A750 80059B50 26520002 */ addiu $s2, $s2, 2 -/* 05A754 80059B54 3C02800E */ lui $v0, %hi(D_800DC530) # $v0, 0x800e -/* 05A758 80059B58 8C42C530 */ lw $v0, %lo(D_800DC530)($v0) +/* 05A754 80059B54 3C02800E */ lui $v0, %hi(gScreenModeSelection) # $v0, 0x800e +/* 05A758 80059B58 8C42C530 */ lw $v0, %lo(gScreenModeSelection)($v0) /* 05A75C 80059B5C 24010001 */ li $at, 1 /* 05A760 80059B60 3C08800E */ lui $t0, %hi(D_800DC50C) # $t0, 0x800e /* 05A764 80059B64 10400009 */ beqz $v0, .L80059B8C diff --git a/asm/non_matchings/code_80057C60/func_80059D00.s b/asm/non_matchings/code_80057C60/func_80059D00.s index cf74740d6..07b01f206 100644 --- a/asm/non_matchings/code_80057C60/func_80059D00.s +++ b/asm/non_matchings/code_80057C60/func_80059D00.s @@ -9,10 +9,10 @@ glabel func_80059D00 /* 05A91C 80059D1C 00000000 */ nop /* 05A920 80059D20 3C0E8016 */ lui $t6, %hi(D_801657AE) # $t6, 0x8016 /* 05A924 80059D24 81CE57AE */ lb $t6, %lo(D_801657AE)($t6) -/* 05A928 80059D28 3C02800E */ lui $v0, %hi(D_800DC530) # $v0, 0x800e +/* 05A928 80059D28 3C02800E */ lui $v0, %hi(gScreenModeSelection) # $v0, 0x800e /* 05A92C 80059D2C 55C000CD */ bnel $t6, $zero, .L8005A064 /* 05A930 80059D30 8FBF0014 */ lw $ra, 0x14($sp) -/* 05A934 80059D34 8C42C530 */ lw $v0, %lo(D_800DC530)($v0) +/* 05A934 80059D34 8C42C530 */ lw $v0, %lo(gScreenModeSelection)($v0) /* 05A938 80059D38 24010001 */ li $at, 1 /* 05A93C 80059D3C 10400009 */ beqz $v0, .L80059D64 /* 05A940 80059D40 00000000 */ nop diff --git a/asm/non_matchings/code_80057C60/func_8005CB60.s b/asm/non_matchings/code_80057C60/func_8005CB60.s index 2ad09b752..b9e137de6 100644 --- a/asm/non_matchings/code_80057C60/func_8005CB60.s +++ b/asm/non_matchings/code_80057C60/func_8005CB60.s @@ -261,8 +261,8 @@ glabel func_8005CB60 /* 05DB2C 8005CF2C 3C063E00 */ lui $a2, 0x3e00 /* 05DB30 8005CF30 0C0104EE */ jal func_800413B8 /* 05DB34 8005CF34 AFA70040 */ sw $a3, 0x40($sp) -/* 05DB38 8005CF38 3C02800E */ lui $v0, %hi(D_800DC530) # $v0, 0x800e -/* 05DB3C 8005CF3C 8C42C530 */ lw $v0, %lo(D_800DC530)($v0) +/* 05DB38 8005CF38 3C02800E */ lui $v0, %hi(gScreenModeSelection) # $v0, 0x800e +/* 05DB3C 8005CF3C 8C42C530 */ lw $v0, %lo(gScreenModeSelection)($v0) /* 05DB40 8005CF40 8FA70040 */ lw $a3, 0x40($sp) /* 05DB44 8005CF44 26040066 */ addiu $a0, $s0, 0x66 /* 05DB48 8005CF48 1040000C */ beqz $v0, .L8005CF7C diff --git a/asm/non_matchings/code_8006E9C0/func_8006FA94.s b/asm/non_matchings/code_8006E9C0/func_8006FA94.s index 3ce384f56..5e8eb7424 100644 --- a/asm/non_matchings/code_8006E9C0/func_8006FA94.s +++ b/asm/non_matchings/code_8006E9C0/func_8006FA94.s @@ -77,7 +77,7 @@ glabel func_8006FA94 /* 0707C0 8006FBC0 03E01025 */ move $v0, $ra /* 0707C4 8006FBC4 24030002 */ li $v1, 2 /* 0707C8 8006FBC8 1043001E */ beq $v0, $v1, .L8006FC44 -/* 0707CC 8006FBCC 3C0F800E */ lui $t7, %hi(D_800DC530) # 0x800e +/* 0707CC 8006FBCC 3C0F800E */ lui $t7, %hi(gScreenModeSelection) # 0x800e /* 0707D0 8006FBD0 24010003 */ li $at, 3 /* 0707D4 8006FBD4 1041005A */ beq $v0, $at, .L8006FD40 /* 0707D8 8006FBD8 3C0E800E */ lui $t6, %hi(gModeSelection) # 0x800e @@ -110,7 +110,7 @@ glabel func_8006FA94 /* 07083C 8006FC3C 10000072 */ b .L8006FE08 /* 070840 8006FC40 240C0008 */ li $t4, 8 .L8006FC44: -/* 070844 8006FC44 8DEFC530 */ lw $t7, %lo(D_800DC530)($t7) # -0x3ad0($t7) +/* 070844 8006FC44 8DEFC530 */ lw $t7, %lo(gScreenModeSelection)($t7) # -0x3ad0($t7) /* 070848 8006FC48 24010001 */ li $at, 1 /* 07084C 8006FC4C 3C02800E */ lui $v0, %hi(gModeSelection) # 0x800e /* 070850 8006FC50 15E10029 */ bne $t7, $at, .L8006FCF8 diff --git a/asm/non_matchings/code_80071F00/func_80078F64.s b/asm/non_matchings/code_80071F00/func_80078F64.s index d1befc5da..d97e5bc31 100644 --- a/asm/non_matchings/code_80071F00/func_80078F64.s +++ b/asm/non_matchings/code_80071F00/func_80078F64.s @@ -1,6 +1,6 @@ glabel func_80078F64 -/* 079B64 80078F64 3C02800E */ lui $v0, %hi(D_800DC530) # $v0, 0x800e -/* 079B68 80078F68 8C42C530 */ lw $v0, %lo(D_800DC530)($v0) +/* 079B64 80078F64 3C02800E */ lui $v0, %hi(gScreenModeSelection) # $v0, 0x800e +/* 079B68 80078F68 8C42C530 */ lw $v0, %lo(gScreenModeSelection)($v0) /* 079B6C 80078F6C 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 079B70 80078F70 AFBF001C */ sw $ra, 0x1c($sp) /* 079B74 80078F74 1040000C */ beqz $v0, .L80078FA8 diff --git a/asm/non_matchings/code_80071F00/func_80080A4C.s b/asm/non_matchings/code_80071F00/func_80080A4C.s index 4cbebed8a..79f90c2e0 100644 --- a/asm/non_matchings/code_80071F00/func_80080A4C.s +++ b/asm/non_matchings/code_80071F00/func_80080A4C.s @@ -8,8 +8,8 @@ glabel func_80080A4C /* 081664 80080A64 8DEFDB40 */ lw $t7, %lo(camera1)($t7) /* 081668 80080A68 000E70C0 */ sll $t6, $t6, 3 /* 08166C 80080A6C 0325C823 */ subu $t9, $t9, $a1 -/* 081670 80080A70 3C09800E */ lui $t1, %hi(D_800DC530) # $t1, 0x800e -/* 081674 80080A74 8D29C530 */ lw $t1, %lo(D_800DC530)($t1) +/* 081670 80080A70 3C09800E */ lui $t1, %hi(gScreenModeSelection) # $t1, 0x800e +/* 081674 80080A74 8D29C530 */ lw $t1, %lo(gScreenModeSelection)($t1) /* 081678 80080A78 01C57023 */ subu $t6, $t6, $a1 /* 08167C 80080A7C 0019C880 */ sll $t9, $t9, 2 /* 081680 80080A80 3C08800E */ lui $t0, %hi(D_800DC4DC) # $t0, 0x800e diff --git a/asm/non_matchings/code_80091750/func_8009CE64.s b/asm/non_matchings/code_80091750/func_8009CE64.s index 8f3290a76..ceb1e19c4 100644 --- a/asm/non_matchings/code_80091750/func_8009CE64.s +++ b/asm/non_matchings/code_80091750/func_8009CE64.s @@ -301,8 +301,8 @@ glabel L8009D280 /* 09DE8C 8009D28C 3C0A800E */ lui $t2, %hi(gPlayerCountSelection1) # $t2, 0x800e /* 09DE90 8009D290 3C0B8019 */ lui $t3, %hi(D_8018EDF3) # $t3, 0x8019 /* 09DE94 8009D294 3C0C800E */ lui $t4, %hi(gModeSelection) # $t4, 0x800e -/* 09DE98 8009D298 3C0D800E */ lui $t5, %hi(D_800DC530) # $t5, 0x800e -/* 09DE9C 8009D29C 25ADC530 */ addiu $t5, %lo(D_800DC530) # addiu $t5, $t5, -0x3ad0 +/* 09DE98 8009D298 3C0D800E */ lui $t5, %hi(gScreenModeSelection) # $t5, 0x800e +/* 09DE9C 8009D29C 25ADC530 */ addiu $t5, %lo(gScreenModeSelection) # addiu $t5, $t5, -0x3ad0 /* 09DEA0 8009D2A0 258CC53C */ addiu $t4, %lo(gModeSelection) # addiu $t4, $t4, -0x3ac4 /* 09DEA4 8009D2A4 256BEDF3 */ addiu $t3, %lo(D_8018EDF3) # addiu $t3, $t3, -0x120d /* 09DEA8 8009D2A8 254AC538 */ addiu $t2, %lo(gPlayerCountSelection1) # addiu $t2, $t2, -0x3ac8 @@ -321,8 +321,8 @@ glabel L8009D2C8 /* 09DED8 8009D2D8 3C0A800E */ lui $t2, %hi(gPlayerCountSelection1) # $t2, 0x800e /* 09DEDC 8009D2DC 3C0B8019 */ lui $t3, %hi(D_8018EDF3) # $t3, 0x8019 /* 09DEE0 8009D2E0 3C0C800E */ lui $t4, %hi(gModeSelection) # $t4, 0x800e -/* 09DEE4 8009D2E4 3C0D800E */ lui $t5, %hi(D_800DC530) # $t5, 0x800e -/* 09DEE8 8009D2E8 25ADC530 */ addiu $t5, %lo(D_800DC530) # addiu $t5, $t5, -0x3ad0 +/* 09DEE4 8009D2E4 3C0D800E */ lui $t5, %hi(gScreenModeSelection) # $t5, 0x800e +/* 09DEE8 8009D2E8 25ADC530 */ addiu $t5, %lo(gScreenModeSelection) # addiu $t5, $t5, -0x3ad0 /* 09DEEC 8009D2EC 258CC53C */ addiu $t4, %lo(gModeSelection) # addiu $t4, $t4, -0x3ac4 /* 09DEF0 8009D2F0 256BEDF3 */ addiu $t3, %lo(D_8018EDF3) # addiu $t3, $t3, -0x120d /* 09DEF4 8009D2F4 254AC538 */ addiu $t2, %lo(gPlayerCountSelection1) # addiu $t2, $t2, -0x3ac8 @@ -342,8 +342,8 @@ glabel L8009D318 /* 09DF28 8009D328 3C0A800E */ lui $t2, %hi(gPlayerCountSelection1) # $t2, 0x800e /* 09DF2C 8009D32C 3C0B8019 */ lui $t3, %hi(D_8018EDF3) # $t3, 0x8019 /* 09DF30 8009D330 3C0C800E */ lui $t4, %hi(gModeSelection) # $t4, 0x800e -/* 09DF34 8009D334 3C0D800E */ lui $t5, %hi(D_800DC530) # $t5, 0x800e -/* 09DF38 8009D338 25ADC530 */ addiu $t5, %lo(D_800DC530) # addiu $t5, $t5, -0x3ad0 +/* 09DF34 8009D334 3C0D800E */ lui $t5, %hi(gScreenModeSelection) # $t5, 0x800e +/* 09DF38 8009D338 25ADC530 */ addiu $t5, %lo(gScreenModeSelection) # addiu $t5, $t5, -0x3ad0 /* 09DF3C 8009D33C 258CC53C */ addiu $t4, %lo(gModeSelection) # addiu $t4, $t4, -0x3ac4 /* 09DF40 8009D340 256BEDF3 */ addiu $t3, %lo(D_8018EDF3) # addiu $t3, $t3, -0x120d /* 09DF44 8009D344 254AC538 */ addiu $t2, %lo(gPlayerCountSelection1) # addiu $t2, $t2, -0x3ac8 @@ -364,8 +364,8 @@ glabel L8009D364 /* 09DF7C 8009D37C 3C0A800E */ lui $t2, %hi(gPlayerCountSelection1) # $t2, 0x800e /* 09DF80 8009D380 3C0B8019 */ lui $t3, %hi(D_8018EDF3) # $t3, 0x8019 /* 09DF84 8009D384 3C0C800E */ lui $t4, %hi(gModeSelection) # $t4, 0x800e -/* 09DF88 8009D388 3C0D800E */ lui $t5, %hi(D_800DC530) # $t5, 0x800e -/* 09DF8C 8009D38C 25ADC530 */ addiu $t5, %lo(D_800DC530) # addiu $t5, $t5, -0x3ad0 +/* 09DF88 8009D388 3C0D800E */ lui $t5, %hi(gScreenModeSelection) # $t5, 0x800e +/* 09DF8C 8009D38C 25ADC530 */ addiu $t5, %lo(gScreenModeSelection) # addiu $t5, $t5, -0x3ad0 /* 09DF90 8009D390 258CC53C */ addiu $t4, %lo(gModeSelection) # addiu $t4, $t4, -0x3ac4 /* 09DF94 8009D394 256BEDF3 */ addiu $t3, %lo(D_8018EDF3) # addiu $t3, $t3, -0x120d /* 09DF98 8009D398 254AC538 */ addiu $t2, %lo(gPlayerCountSelection1) # addiu $t2, $t2, -0x3ac8 @@ -387,8 +387,8 @@ glabel L8009D3C4 /* 09DFD4 8009D3D4 3C0A800E */ lui $t2, %hi(gPlayerCountSelection1) # $t2, 0x800e /* 09DFD8 8009D3D8 3C0B8019 */ lui $t3, %hi(D_8018EDF3) # $t3, 0x8019 /* 09DFDC 8009D3DC 3C0C800E */ lui $t4, %hi(gModeSelection) # $t4, 0x800e -/* 09DFE0 8009D3E0 3C0D800E */ lui $t5, %hi(D_800DC530) # $t5, 0x800e -/* 09DFE4 8009D3E4 25ADC530 */ addiu $t5, %lo(D_800DC530) # addiu $t5, $t5, -0x3ad0 +/* 09DFE0 8009D3E0 3C0D800E */ lui $t5, %hi(gScreenModeSelection) # $t5, 0x800e +/* 09DFE4 8009D3E4 25ADC530 */ addiu $t5, %lo(gScreenModeSelection) # addiu $t5, $t5, -0x3ad0 /* 09DFE8 8009D3E8 258CC53C */ addiu $t4, %lo(gModeSelection) # addiu $t4, $t4, -0x3ac4 /* 09DFEC 8009D3EC 256BEDF3 */ addiu $t3, %lo(D_8018EDF3) # addiu $t3, $t3, -0x120d /* 09DFF0 8009D3F0 254AC538 */ addiu $t2, %lo(gPlayerCountSelection1) # addiu $t2, $t2, -0x3ac8 @@ -409,8 +409,8 @@ glabel L8009D414 /* 09E028 8009D428 3C0A800E */ lui $t2, %hi(gPlayerCountSelection1) # $t2, 0x800e /* 09E02C 8009D42C 3C0B8019 */ lui $t3, %hi(D_8018EDF3) # $t3, 0x8019 /* 09E030 8009D430 3C0C800E */ lui $t4, %hi(gModeSelection) # $t4, 0x800e -/* 09E034 8009D434 3C0D800E */ lui $t5, %hi(D_800DC530) # $t5, 0x800e -/* 09E038 8009D438 25ADC530 */ addiu $t5, %lo(D_800DC530) # addiu $t5, $t5, -0x3ad0 +/* 09E034 8009D434 3C0D800E */ lui $t5, %hi(gScreenModeSelection) # $t5, 0x800e +/* 09E038 8009D438 25ADC530 */ addiu $t5, %lo(gScreenModeSelection) # addiu $t5, $t5, -0x3ad0 /* 09E03C 8009D43C 258CC53C */ addiu $t4, %lo(gModeSelection) # addiu $t4, $t4, -0x3ac4 /* 09E040 8009D440 256BEDF3 */ addiu $t3, %lo(D_8018EDF3) # addiu $t3, $t3, -0x120d /* 09E044 8009D444 254AC538 */ addiu $t2, %lo(gPlayerCountSelection1) # addiu $t2, $t2, -0x3ac8 @@ -543,8 +543,8 @@ glabel L8009D50C .L8009D60C: /* 09E20C 8009D60C 0C003C49 */ jal func_8000F124 /* 09E210 8009D610 00000000 */ nop -/* 09E214 8009D614 3C0D800E */ lui $t5, %hi(D_800DC530) # $t5, 0x800e -/* 09E218 8009D618 25ADC530 */ addiu $t5, %lo(D_800DC530) # addiu $t5, $t5, -0x3ad0 +/* 09E214 8009D614 3C0D800E */ lui $t5, %hi(gScreenModeSelection) # $t5, 0x800e +/* 09E218 8009D618 25ADC530 */ addiu $t5, %lo(gScreenModeSelection) # addiu $t5, $t5, -0x3ad0 /* 09E21C 8009D61C 8DB90000 */ lw $t9, ($t5) /* 09E220 8009D620 24070003 */ li $a3, 3 /* 09E224 8009D624 3C0C800E */ lui $t4, %hi(gModeSelection) # $t4, 0x800e diff --git a/asm/non_matchings/code_80091750/func_8009F5E0.s b/asm/non_matchings/code_80091750/func_8009F5E0.s index cd5a5e940..361e9f015 100644 --- a/asm/non_matchings/code_80091750/func_8009F5E0.s +++ b/asm/non_matchings/code_80091750/func_8009F5E0.s @@ -525,7 +525,7 @@ glabel L8009FD58 glabel L8009FD90 /* 0A0990 8009FD90 8E23001C */ lw $v1, 0x1c($s1) /* 0A0994 8009FD94 2506FFF1 */ addiu $a2, $t0, -0xf -/* 0A0998 8009FD98 3C098019 */ lui $t1, %hi(D_8018EDED) # $t1, 0x8019 +/* 0A0998 8009FD98 3C098019 */ lui $t1, %hi(gMainMenuSelectionDepth) # $t1, 0x8019 /* 0A099C 8009FD9C 28610020 */ slti $at, $v1, 0x20 /* 0A09A0 8009FDA0 50200030 */ beql $at, $zero, .L8009FE64 /* 0A09A4 8009FDA4 2518FFF6 */ addiu $t8, $t0, -0xa @@ -534,7 +534,7 @@ glabel L8009FD90 /* 0A09B0 8009FDB0 00084080 */ sll $t0, $t0, 2 /* 0A09B4 8009FDB4 01034021 */ addu $t0, $t0, $v1 /* 0A09B8 8009FDB8 00084040 */ sll $t0, $t0, 1 -/* 0A09BC 8009FDBC 8129EDED */ lb $t1, %lo(D_8018EDED)($t1) +/* 0A09BC 8009FDBC 8129EDED */ lb $t1, %lo(gMainMenuSelectionDepth)($t1) /* 0A09C0 8009FDC0 05010003 */ bgez $t0, .L8009FDD0 /* 0A09C4 8009FDC4 0008C983 */ sra $t9, $t0, 6 /* 0A09C8 8009FDC8 2501003F */ addiu $at, $t0, 0x3f @@ -681,8 +681,8 @@ glabel L8009FF90 .L8009FFCC: /* 0A0BCC 8009FFCC 2401FFFF */ li $at, -1 /* 0A0BD0 8009FFD0 10C1023C */ beq $a2, $at, .L800A08C4 -/* 0A0BD4 8009FFD4 3C028019 */ lui $v0, %hi(D_8018EDED) # $v0, 0x8019 -/* 0A0BD8 8009FFD8 8042EDED */ lb $v0, %lo(D_8018EDED)($v0) +/* 0A0BD4 8009FFD4 3C028019 */ lui $v0, %hi(gMainMenuSelectionDepth) # $v0, 0x8019 +/* 0A0BD8 8009FFD8 8042EDED */ lb $v0, %lo(gMainMenuSelectionDepth)($v0) /* 0A0BDC 8009FFDC 240E0001 */ li $t6, 1 /* 0A0BE0 8009FFE0 240F00FF */ li $t7, 255 /* 0A0BE4 8009FFE4 28410005 */ slti $at, $v0, 5 @@ -986,8 +986,8 @@ glabel L800A0404 /* 0A1020 800A0420 10000129 */ b .L800A08C8 /* 0A1024 800A0424 8FBF0034 */ lw $ra, 0x34($sp) glabel L800A0428 -/* 0A1028 800A0428 3C028019 */ lui $v0, %hi(D_8018EDED) # $v0, 0x8019 -/* 0A102C 800A042C 8042EDED */ lb $v0, %lo(D_8018EDED)($v0) +/* 0A1028 800A0428 3C028019 */ lui $v0, %hi(gMainMenuSelectionDepth) # $v0, 0x8019 +/* 0A102C 800A042C 8042EDED */ lb $v0, %lo(gMainMenuSelectionDepth)($v0) /* 0A1030 800A0430 8FAB00A8 */ lw $t3, 0xa8($sp) /* 0A1034 800A0434 240D0001 */ li $t5, 1 /* 0A1038 800A0438 28410005 */ slti $at, $v0, 5 diff --git a/asm/non_matchings/code_80091750/func_800A0EB8.s b/asm/non_matchings/code_80091750/func_800A0EB8.s index b702e32b8..243cbdd6b 100644 --- a/asm/non_matchings/code_80091750/func_800A0EB8.s +++ b/asm/non_matchings/code_80091750/func_800A0EB8.s @@ -7,10 +7,10 @@ glabel func_800A0EB8 /* 0A1ACC 800A0ECC 240400DA */ li $a0, 218 /* 0A1AD0 800A0ED0 8FA4001C */ lw $a0, 0x1c($sp) /* 0A1AD4 800A0ED4 00405825 */ move $t3, $v0 -/* 0A1AD8 800A0ED8 3C0E8019 */ lui $t6, %hi(gMenuState) # $t6, 0x8019 +/* 0A1AD8 800A0ED8 3C0E8019 */ lui $t6, %hi(gControllerPakMenuSelection) # $t6, 0x8019 /* 0A1ADC 800A0EDC 14800009 */ bnez $a0, .L800A0F04 -/* 0A1AE0 800A0EE0 3C028019 */ lui $v0, %hi(gMenuState) # $v0, 0x8019 -/* 0A1AE4 800A0EE4 81CEEDF0 */ lb $t6, %lo(gMenuState)($t6) +/* 0A1AE0 800A0EE0 3C028019 */ lui $v0, %hi(gControllerPakMenuSelection) # $v0, 0x8019 +/* 0A1AE4 800A0EE4 81CEEDF0 */ lb $t6, %lo(gControllerPakMenuSelection)($t6) /* 0A1AE8 800A0EE8 24010002 */ li $at, 2 /* 0A1AEC 800A0EEC 15C10003 */ bne $t6, $at, .L800A0EFC /* 0A1AF0 800A0EF0 00000000 */ nop @@ -20,7 +20,7 @@ glabel func_800A0EB8 /* 0A1AFC 800A0EFC 1000000A */ b .L800A0F28 /* 0A1B00 800A0F00 00004825 */ move $t1, $zero .L800A0F04: -/* 0A1B04 800A0F04 8042EDF0 */ lb $v0, %lo(gMenuState)($v0) +/* 0A1B04 800A0F04 8042EDF0 */ lb $v0, %lo(gControllerPakMenuSelection)($v0) /* 0A1B08 800A0F08 24010003 */ li $at, 3 /* 0A1B0C 800A0F0C 00047840 */ sll $t7, $a0, 1 /* 0A1B10 800A0F10 10410003 */ beq $v0, $at, .L800A0F20 diff --git a/asm/non_matchings/code_80091750/func_800A4EF8.s b/asm/non_matchings/code_80091750/func_800A4EF8.s index d083e4685..2e341a681 100644 --- a/asm/non_matchings/code_80091750/func_800A4EF8.s +++ b/asm/non_matchings/code_80091750/func_800A4EF8.s @@ -48,8 +48,8 @@ glabel func_800A4EF8 /* 0A5BA8 800A4FA8 0C02637E */ jal draw_box /* 0A5BAC 800A4FAC 010C3023 */ subu $a2, $t0, $t4 /* 0A5BB0 800A4FB0 AE220000 */ sw $v0, ($s1) -/* 0A5BB4 800A4FB4 3C0F800E */ lui $t7, %hi(D_800DC530) # $t7, 0x800e -/* 0A5BB8 800A4FB8 8DF8C530 */ lw $t8, %lo(D_800DC530)($t7) +/* 0A5BB4 800A4FB4 3C0F800E */ lui $t7, %hi(gScreenModeSelection) # $t7, 0x800e +/* 0A5BB8 800A4FB8 8DF8C530 */ lw $t8, %lo(gScreenModeSelection)($t7) /* 0A5BBC 800A4FBC 960B0000 */ lhu $t3, ($s0) /* 0A5BC0 800A4FC0 3C0F800F */ lui $t7, %hi(D_800E8540) # $t7, 0x800f /* 0A5BC4 800A4FC4 0018C940 */ sll $t9, $t8, 5 diff --git a/asm/non_matchings/code_80091750/func_800A5084.s b/asm/non_matchings/code_80091750/func_800A5084.s index ba6fabe6b..03150aa1e 100644 --- a/asm/non_matchings/code_80091750/func_800A5084.s +++ b/asm/non_matchings/code_80091750/func_800A5084.s @@ -47,8 +47,8 @@ glabel func_800A5084 /* 0A5D30 800A5130 0C02637E */ jal draw_box /* 0A5D34 800A5134 010C3023 */ subu $a2, $t0, $t4 /* 0A5D38 800A5138 AE220000 */ sw $v0, ($s1) -/* 0A5D3C 800A513C 3C0F800E */ lui $t7, %hi(D_800DC530) # $t7, 0x800e -/* 0A5D40 800A5140 8DF8C530 */ lw $t8, %lo(D_800DC530)($t7) +/* 0A5D3C 800A513C 3C0F800E */ lui $t7, %hi(gScreenModeSelection) # $t7, 0x800e +/* 0A5D40 800A5140 8DF8C530 */ lw $t8, %lo(gScreenModeSelection)($t7) /* 0A5D44 800A5144 960B0000 */ lhu $t3, ($s0) /* 0A5D48 800A5148 3C128019 */ lui $s2, %hi(gCupSelection) # $s2, 0x8019 /* 0A5D4C 800A514C 2652EE09 */ addiu $s2, %lo(gCupSelection) # addiu $s2, $s2, -0x11f7 diff --git a/asm/non_matchings/code_80091750/func_800A5360.s b/asm/non_matchings/code_80091750/func_800A5360.s index e30ada774..bcdfc6978 100644 --- a/asm/non_matchings/code_80091750/func_800A5360.s +++ b/asm/non_matchings/code_80091750/func_800A5360.s @@ -48,8 +48,8 @@ glabel func_800A5360 /* 0A6010 800A5410 0C02637E */ jal draw_box /* 0A6014 800A5414 010C3023 */ subu $a2, $t0, $t4 /* 0A6018 800A5418 AE220000 */ sw $v0, ($s1) -/* 0A601C 800A541C 3C0F800E */ lui $t7, %hi(D_800DC530) # $t7, 0x800e -/* 0A6020 800A5420 8DF8C530 */ lw $t8, %lo(D_800DC530)($t7) +/* 0A601C 800A541C 3C0F800E */ lui $t7, %hi(gScreenModeSelection) # $t7, 0x800e +/* 0A6020 800A5420 8DF8C530 */ lw $t8, %lo(gScreenModeSelection)($t7) /* 0A6024 800A5424 960B0000 */ lhu $t3, ($s0) /* 0A6028 800A5428 3C0F800F */ lui $t7, %hi(D_800E8600) # $t7, 0x800f /* 0A602C 800A542C 0018C940 */ sll $t9, $t8, 5 diff --git a/asm/non_matchings/code_80091750/func_800A54EC.s b/asm/non_matchings/code_80091750/func_800A54EC.s index 1d907185f..1c9eb74b7 100644 --- a/asm/non_matchings/code_80091750/func_800A54EC.s +++ b/asm/non_matchings/code_80091750/func_800A54EC.s @@ -86,17 +86,17 @@ glabel func_800A54EC /* 0A623C 800A563C 3C03800F */ lui $v1, %hi(D_800E8538) # 0x800f /* 0A6240 800A5640 24010002 */ li $at, 2 /* 0A6244 800A5644 11410008 */ beq $t2, $at, .L800A5668 -/* 0A6248 800A5648 3C0D800E */ lui $t5, %hi(D_800DC530) # $t5, 0x800e +/* 0A6248 800A5648 3C0D800E */ lui $t5, %hi(gScreenModeSelection) # $t5, 0x800e /* 0A624C 800A564C 24010003 */ li $at, 3 /* 0A6250 800A5650 1141001A */ beq $t2, $at, .L800A56BC -/* 0A6254 800A5654 3C0C800E */ lui $t4, %hi(D_800DC530) +/* 0A6254 800A5654 3C0C800E */ lui $t4, %hi(gScreenModeSelection) /* 0A6258 800A5658 10000021 */ b .L800A56E0 /* 0A625C 800A565C 8FA3004C */ lw $v1, 0x4c($sp) .L800A5660: /* 0A6260 800A5660 1000001F */ b .L800A56E0 /* 0A6264 800A5664 24638538 */ addiu $v1, $v1, %lo(D_800E8538) # -0x7ac8 .L800A5668: -/* 0A6268 800A5668 8DAFC530 */ lw $t7, %lo(D_800DC530)($t5) +/* 0A6268 800A5668 8DAFC530 */ lw $t7, %lo(gScreenModeSelection)($t5) /* 0A626C 800A566C 95790000 */ lhu $t9, ($t3) /* 0A6270 800A5670 000FC140 */ sll $t8, $t7, 5 /* 0A6274 800A5674 001970C0 */ sll $t6, $t9, 3 @@ -107,8 +107,8 @@ glabel func_800A54EC /* 0A6288 800A5688 10000015 */ b .L800A56E0 /* 0A628C 800A568C 01AF1821 */ addu $v1, $t5, $t7 .L800A5690: -/* 0A6290 800A5690 3C19800E */ lui $t9, %hi(D_800DC530) # $t9, 0x800e -/* 0A6294 800A5694 8F38C530 */ lw $t8, %lo(D_800DC530)($t9) +/* 0A6290 800A5690 3C19800E */ lui $t9, %hi(gScreenModeSelection) # $t9, 0x800e +/* 0A6294 800A5694 8F38C530 */ lw $t8, %lo(gScreenModeSelection)($t9) /* 0A6298 800A5698 956C0000 */ lhu $t4, ($t3) /* 0A629C 800A569C 00187140 */ sll $t6, $t8, 5 /* 0A62A0 800A56A0 000C68C0 */ sll $t5, $t4, 3 @@ -119,7 +119,7 @@ glabel func_800A54EC /* 0A62B4 800A56B4 1000000A */ b .L800A56E0 /* 0A62B8 800A56B8 03381821 */ addu $v1, $t9, $t8 .L800A56BC: -/* 0A62BC 800A56BC 8D8EC530 */ lw $t6, %lo(D_800DC530)($t4) +/* 0A62BC 800A56BC 8D8EC530 */ lw $t6, %lo(gScreenModeSelection)($t4) /* 0A62C0 800A56C0 956F0000 */ lhu $t7, ($t3) /* 0A62C4 800A56C4 000E6940 */ sll $t5, $t6, 5 /* 0A62C8 800A56C8 000FC8C0 */ sll $t9, $t7, 3 diff --git a/asm/non_matchings/code_80091750/func_800A7A4C.s b/asm/non_matchings/code_80091750/func_800A7A4C.s index 32438c89e..042c6aa83 100644 --- a/asm/non_matchings/code_80091750/func_800A7A4C.s +++ b/asm/non_matchings/code_80091750/func_800A7A4C.s @@ -235,8 +235,8 @@ glabel L800A7D8C /* 0A8994 800A7D94 100000F5 */ b .L800A816C /* 0A8998 800A7D98 00000000 */ nop glabel L800A7D9C -/* 0A899C 800A7D9C 3C198019 */ lui $t9, %hi(D_8018EDED) # $t9, 0x8019 -/* 0A89A0 800A7DA0 8339EDED */ lb $t9, %lo(D_8018EDED)($t9) +/* 0A899C 800A7D9C 3C198019 */ lui $t9, %hi(gMainMenuSelectionDepth) # $t9, 0x8019 +/* 0A89A0 800A7DA0 8339EDED */ lb $t9, %lo(gMainMenuSelectionDepth)($t9) /* 0A89A4 800A7DA4 2728FFFF */ addiu $t0, $t9, -1 /* 0A89A8 800A7DA8 2D010008 */ sltiu $at, $t0, 8 /* 0A89AC 800A7DAC 102000EF */ beqz $at, .L800A816C @@ -264,8 +264,8 @@ glabel L800A7DE8 /* 0A89F8 800A7DF8 100000DC */ b .L800A816C /* 0A89FC 800A7DFC 00000000 */ nop glabel L800A7E00 -/* 0A8A00 800A7E00 3C098019 */ lui $t1, %hi(D_8018EDED) # $t1, 0x8019 -/* 0A8A04 800A7E04 8129EDED */ lb $t1, %lo(D_8018EDED)($t1) +/* 0A8A00 800A7E00 3C098019 */ lui $t1, %hi(gMainMenuSelectionDepth) # $t1, 0x8019 +/* 0A8A04 800A7E04 8129EDED */ lb $t1, %lo(gMainMenuSelectionDepth)($t1) /* 0A8A08 800A7E08 252AFFFF */ addiu $t2, $t1, -1 /* 0A8A0C 800A7E0C 2D410008 */ sltiu $at, $t2, 8 /* 0A8A10 800A7E10 1020000C */ beqz $at, .L800A7E44 diff --git a/asm/non_matchings/code_80091750/func_800A8270.s b/asm/non_matchings/code_80091750/func_800A8270.s index c628c62c1..9fa0c3210 100644 --- a/asm/non_matchings/code_80091750/func_800A8270.s +++ b/asm/non_matchings/code_80091750/func_800A8270.s @@ -56,8 +56,8 @@ glabel func_800A8270 /* 0A8F44 800A8344 01289821 */ addu $s3, $t1, $t0 /* 0A8F48 800A8348 15F80029 */ bne $t7, $t8, .L800A83F0 /* 0A8F4C 800A834C 02602825 */ move $a1, $s3 -/* 0A8F50 800A8350 3C028019 */ lui $v0, %hi(D_8018EDED) # $v0, 0x8019 -/* 0A8F54 800A8354 8042EDED */ lb $v0, %lo(D_8018EDED)($v0) +/* 0A8F50 800A8350 3C028019 */ lui $v0, %hi(gMainMenuSelectionDepth) # $v0, 0x8019 +/* 0A8F54 800A8354 8042EDED */ lb $v0, %lo(gMainMenuSelectionDepth)($v0) /* 0A8F58 800A8358 24010001 */ li $at, 1 /* 0A8F5C 800A835C 01289821 */ addu $s3, $t1, $t0 /* 0A8F60 800A8360 10410006 */ beq $v0, $at, .L800A837C @@ -128,10 +128,10 @@ glabel func_800A8270 /* 0A9050 800A8450 02003025 */ move $a2, $s0 /* 0A9054 800A8454 81ADEDF3 */ lb $t5, %lo(D_8018EDF3)($t5) /* 0A9058 800A8458 27CC0001 */ addiu $t4, $fp, 1 -/* 0A905C 800A845C 3C028019 */ lui $v0, %hi(D_8018EDED) # $v0, 0x8019 +/* 0A905C 800A845C 3C028019 */ lui $v0, %hi(gMainMenuSelectionDepth) # $v0, 0x8019 /* 0A9060 800A8460 558D0021 */ bnel $t4, $t5, .L800A84E8 /* 0A9064 800A8464 260C0011 */ addiu $t4, $s0, 0x11 -/* 0A9068 800A8468 8042EDED */ lb $v0, %lo(D_8018EDED)($v0) +/* 0A9068 800A8468 8042EDED */ lb $v0, %lo(gMainMenuSelectionDepth)($v0) /* 0A906C 800A846C 28410004 */ slti $at, $v0, 4 /* 0A9070 800A8470 5420001D */ bnel $at, $zero, .L800A84E8 /* 0A9074 800A8474 260C0011 */ addiu $t4, $s0, 0x11 diff --git a/asm/non_matchings/code_80091750/func_800A8564.s b/asm/non_matchings/code_80091750/func_800A8564.s index 9c748b726..2002db608 100644 --- a/asm/non_matchings/code_80091750/func_800A8564.s +++ b/asm/non_matchings/code_80091750/func_800A8564.s @@ -14,8 +14,8 @@ glabel func_800A8564 /* 0A9194 800A8594 10000051 */ b .L800A86DC /* 0A9198 800A8598 8FBF002C */ lw $ra, 0x2c($sp) .L800A859C: -/* 0A919C 800A859C 3C028019 */ lui $v0, %hi(D_8018EDED) # $v0, 0x8019 -/* 0A91A0 800A85A0 8042EDED */ lb $v0, %lo(D_8018EDED)($v0) +/* 0A919C 800A859C 3C028019 */ lui $v0, %hi(gMainMenuSelectionDepth) # $v0, 0x8019 +/* 0A91A0 800A85A0 8042EDED */ lb $v0, %lo(gMainMenuSelectionDepth)($v0) /* 0A91A4 800A85A4 3C040200 */ lui $a0, %hi(D_0200487C) # $a0, 0x200 /* 0A91A8 800A85A8 24010006 */ li $at, 6 /* 0A91AC 800A85AC 10410004 */ beq $v0, $at, .L800A85C0 diff --git a/asm/non_matchings/code_80091750/func_800A9710.s b/asm/non_matchings/code_80091750/func_800A9710.s index 8c3179b20..8dbc1ae29 100644 --- a/asm/non_matchings/code_80091750/func_800A9710.s +++ b/asm/non_matchings/code_80091750/func_800A9710.s @@ -1,6 +1,6 @@ glabel func_800A9710 -/* 0AA310 800A9710 3C0E8019 */ lui $t6, %hi(gMenuState) # $t6, 0x8019 -/* 0AA314 800A9714 81CEEDF0 */ lb $t6, %lo(gMenuState)($t6) +/* 0AA310 800A9710 3C0E8019 */ lui $t6, %hi(gControllerPakMenuSelection) # $t6, 0x8019 +/* 0AA314 800A9714 81CEEDF0 */ lb $t6, %lo(gControllerPakMenuSelection)($t6) /* 0AA318 800A9718 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0AA31C 800A971C AFBF0014 */ sw $ra, 0x14($sp) /* 0AA320 800A9720 25CFFFFD */ addiu $t7, $t6, -3 diff --git a/asm/non_matchings/code_80091750/func_800A9A98.s b/asm/non_matchings/code_80091750/func_800A9A98.s index 51cce260a..371f2522d 100644 --- a/asm/non_matchings/code_80091750/func_800A9A98.s +++ b/asm/non_matchings/code_80091750/func_800A9A98.s @@ -3,7 +3,7 @@ glabel func_800A9A98 /* 0AA69C 800A9A9C 2401000F */ li $at, 15 /* 0AA6A0 800A9AA0 27BDFFF8 */ addiu $sp, $sp, -8 /* 0AA6A4 800A9AA4 10410009 */ beq $v0, $at, .L800A9ACC -/* 0AA6A8 800A9AA8 3C0E8019 */ lui $t6, %hi(D_8018EDED) # $t6, 0x8019 +/* 0AA6A8 800A9AA8 3C0E8019 */ lui $t6, %hi(gMainMenuSelectionDepth) # $t6, 0x8019 /* 0AA6AC 800A9AAC 24010033 */ li $at, 51 /* 0AA6B0 800A9AB0 10410010 */ beq $v0, $at, .L800A9AF4 /* 0AA6B4 800A9AB4 3C188019 */ lui $t8, %hi(D_8018EDEE) # $t8, 0x8019 @@ -13,7 +13,7 @@ glabel func_800A9A98 /* 0AA6C4 800A9AC4 1000000F */ b .L800A9B04 /* 0AA6C8 800A9AC8 8FA20004 */ lw $v0, 4($sp) .L800A9ACC: -/* 0AA6CC 800A9ACC 81CEEDED */ lb $t6, %lo(D_8018EDED)($t6) +/* 0AA6CC 800A9ACC 81CEEDED */ lb $t6, %lo(gMainMenuSelectionDepth)($t6) /* 0AA6D0 800A9AD0 3C02800F */ lui $v0, %hi(D_800F0C9C+0x03) # 0x800f /* 0AA6D4 800A9AD4 004E1021 */ addu $v0, $v0, $t6 /* 0AA6D8 800A9AD8 1000000A */ b .L800A9B04 diff --git a/asm/non_matchings/code_80091750/func_800A9C40.s b/asm/non_matchings/code_80091750/func_800A9C40.s index 3cb9a068a..614f99f9e 100644 --- a/asm/non_matchings/code_80091750/func_800A9C40.s +++ b/asm/non_matchings/code_80091750/func_800A9C40.s @@ -42,8 +42,8 @@ glabel L800A9CA4 glabel L800A9CD0 /* 0AA8D0 800A9CD0 0C02A8A0 */ jal func_800AA280 /* 0AA8D4 800A9CD4 AFA40018 */ sw $a0, 0x18($sp) -/* 0AA8D8 800A9CD8 3C028019 */ lui $v0, %hi(D_8018EDED) # $v0, 0x8019 -/* 0AA8DC 800A9CDC 8042EDED */ lb $v0, %lo(D_8018EDED)($v0) +/* 0AA8D8 800A9CD8 3C028019 */ lui $v0, %hi(gMainMenuSelectionDepth) # $v0, 0x8019 +/* 0AA8DC 800A9CDC 8042EDED */ lb $v0, %lo(gMainMenuSelectionDepth)($v0) /* 0AA8E0 800A9CE0 24010007 */ li $at, 7 /* 0AA8E4 800A9CE4 8FA40018 */ lw $a0, 0x18($sp) /* 0AA8E8 800A9CE8 10410004 */ beq $v0, $at, .L800A9CFC diff --git a/asm/non_matchings/code_80091750/func_800A9D5C.s b/asm/non_matchings/code_80091750/func_800A9D5C.s index 185b01952..4d65e171d 100644 --- a/asm/non_matchings/code_80091750/func_800A9D5C.s +++ b/asm/non_matchings/code_80091750/func_800A9D5C.s @@ -23,8 +23,8 @@ glabel func_800A9D5C /* 0AA9A8 800A9DA8 01200008 */ jr $t1 /* 0AA9AC 800A9DAC 00000000 */ nop glabel L800A9DB0 -/* 0AA9B0 800A9DB0 3C028019 */ lui $v0, %hi(D_8018EDED) # $v0, 0x8019 -/* 0AA9B4 800A9DB4 8042EDED */ lb $v0, %lo(D_8018EDED)($v0) +/* 0AA9B0 800A9DB0 3C028019 */ lui $v0, %hi(gMainMenuSelectionDepth) # $v0, 0x8019 +/* 0AA9B4 800A9DB4 8042EDED */ lb $v0, %lo(gMainMenuSelectionDepth)($v0) /* 0AA9B8 800A9DB8 24010007 */ li $at, 7 /* 0AA9BC 800A9DBC 240A0080 */ li $t2, 128 /* 0AA9C0 800A9DC0 10410004 */ beq $v0, $at, .L800A9DD4 diff --git a/asm/non_matchings/code_80091750/func_800A9E58.s b/asm/non_matchings/code_80091750/func_800A9E58.s index 4cc9cf145..1b03095b4 100644 --- a/asm/non_matchings/code_80091750/func_800A9E58.s +++ b/asm/non_matchings/code_80091750/func_800A9E58.s @@ -53,15 +53,15 @@ glabel L800A9EBC /* 0AAB14 800A9F14 8CA52B70 */ lw $a1, %lo(D_800F2B70)($a1) # 0x2b70($a1) /* 0AAB18 800A9F18 24010001 */ li $at, 1 /* 0AAB1C 800A9F1C 10610055 */ beq $v1, $at, .L800AA074 -/* 0AAB20 800A9F20 3C0A8019 */ lui $t2, %hi(D_8018EDED) # 0x8019 +/* 0AAB20 800A9F20 3C0A8019 */ lui $t2, %hi(gMainMenuSelectionDepth) # 0x8019 /* 0AAB24 800A9F24 24010002 */ li $at, 2 /* 0AAB28 800A9F28 10610091 */ beq $v1, $at, .L800AA170 -/* 0AAB2C 800A9F2C 3C198019 */ lui $t9, %hi(D_8018EDED) # 0x8019 +/* 0AAB2C 800A9F2C 3C198019 */ lui $t9, %hi(gMainMenuSelectionDepth) # 0x8019 /* 0AAB30 800A9F30 100000D0 */ b .L800AA274 /* 0AAB34 800A9F34 8FBF0014 */ lw $ra, 0x14($sp) .L800A9F38: /* 0AAB38 800A9F38 10A70005 */ beq $a1, $a3, .L800A9F50 -/* 0AAB3C 800A9F3C 3C0D8019 */ lui $t5, %hi(D_8018EDED) # $t5, 0x8019 +/* 0AAB3C 800A9F3C 3C0D8019 */ lui $t5, %hi(gMainMenuSelectionDepth) # $t5, 0x8019 /* 0AAB40 800A9F40 50A80004 */ beql $a1, $t0, .L800A9F54 /* 0AAB44 800A9F44 AC860020 */ sw $a2, 0x20($a0) /* 0AAB48 800A9F48 100000C9 */ b .L800AA270 @@ -69,7 +69,7 @@ glabel L800A9EBC .L800A9F50: /* 0AAB50 800A9F50 AC860020 */ sw $a2, 0x20($a0) .L800A9F54: -/* 0AAB54 800A9F54 81ADEDED */ lb $t5, %lo(D_8018EDED)($t5) +/* 0AAB54 800A9F54 81ADEDED */ lb $t5, %lo(gMainMenuSelectionDepth)($t5) /* 0AAB58 800A9F58 25AEFFFC */ addiu $t6, $t5, -4 /* 0AAB5C 800A9F5C 2DC10005 */ sltiu $at, $t6, 5 /* 0AAB60 800A9F60 10200042 */ beqz $at, .L800AA06C @@ -145,7 +145,7 @@ glabel L800A9FD8 /* 0AAC6C 800AA06C 10000080 */ b .L800AA270 /* 0AAC70 800AA070 A0800015 */ sb $zero, 0x15($a0) .L800AA074: -/* 0AAC74 800AA074 814AEDED */ lb $t2, %lo(D_8018EDED)($t2) # -0x1213($t2) +/* 0AAC74 800AA074 814AEDED */ lb $t2, %lo(gMainMenuSelectionDepth)($t2) # -0x1213($t2) /* 0AAC78 800AA078 254BFFFC */ addiu $t3, $t2, -4 /* 0AAC7C 800AA07C 2D610005 */ sltiu $at, $t3, 5 /* 0AAC80 800AA080 10200038 */ beqz $at, .L800AA164 @@ -213,7 +213,7 @@ glabel L800AA09C /* 0AAD68 800AA168 10000041 */ b .L800AA270 /* 0AAD6C 800AA16C AC800004 */ sw $zero, 4($a0) .L800AA170: -/* 0AAD70 800AA170 8339EDED */ lb $t9, %lo(D_8018EDED)($t9) # -0x1213($t9) +/* 0AAD70 800AA170 8339EDED */ lb $t9, %lo(gMainMenuSelectionDepth)($t9) # -0x1213($t9) /* 0AAD74 800AA174 2738FFFC */ addiu $t8, $t9, -4 /* 0AAD78 800AA178 2F010005 */ sltiu $at, $t8, 5 /* 0AAD7C 800AA17C 1020003A */ beqz $at, .L800AA268 diff --git a/asm/non_matchings/code_80091750/func_800AA280.s b/asm/non_matchings/code_80091750/func_800AA280.s index 6c1740df1..11f8244a3 100644 --- a/asm/non_matchings/code_80091750/func_800AA280.s +++ b/asm/non_matchings/code_80091750/func_800AA280.s @@ -2,8 +2,8 @@ glabel func_800AA280 /* 0AAE80 800AA280 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0AAE84 800AA284 AFBF0014 */ sw $ra, 0x14($sp) /* 0AAE88 800AA288 8C8E0000 */ lw $t6, ($a0) -/* 0AAE8C 800AA28C 3C038019 */ lui $v1, %hi(D_8018EDED) # $v1, 0x8019 -/* 0AAE90 800AA290 8063EDED */ lb $v1, %lo(D_8018EDED)($v1) +/* 0AAE8C 800AA28C 3C038019 */ lui $v1, %hi(gMainMenuSelectionDepth) # $v1, 0x8019 +/* 0AAE90 800AA290 8063EDED */ lb $v1, %lo(gMainMenuSelectionDepth)($v1) /* 0AAE94 800AA294 3C19800E */ lui $t9, %hi(D_800E70A0) # $t9, 0x800e /* 0AAE98 800AA298 000E78C0 */ sll $t7, $t6, 3 /* 0AAE9C 800AA29C 25F8FFB0 */ addiu $t8, $t7, -0x50 diff --git a/asm/non_matchings/code_80091750/func_800AA2EC.s b/asm/non_matchings/code_80091750/func_800AA2EC.s index b0e8ddfff..bb6c0a637 100644 --- a/asm/non_matchings/code_80091750/func_800AA2EC.s +++ b/asm/non_matchings/code_80091750/func_800AA2EC.s @@ -1,6 +1,6 @@ glabel func_800AA2EC -/* 0AAEEC 800AA2EC 3C0E8019 */ lui $t6, %hi(D_8018EDED) # $t6, 0x8019 -/* 0AAEF0 800AA2F0 81CEEDED */ lb $t6, %lo(D_8018EDED)($t6) +/* 0AAEEC 800AA2EC 3C0E8019 */ lui $t6, %hi(gMainMenuSelectionDepth) # $t6, 0x8019 +/* 0AAEF0 800AA2F0 81CEEDED */ lb $t6, %lo(gMainMenuSelectionDepth)($t6) /* 0AAEF4 800AA2F4 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 0AAEF8 800AA2F8 AFBF001C */ sw $ra, 0x1c($sp) /* 0AAEFC 800AA2FC 25CFFFFF */ addiu $t7, $t6, -1 diff --git a/asm/non_matchings/code_80091750/func_800AAC18.s b/asm/non_matchings/code_80091750/func_800AAC18.s index 38e4dff80..8ca55805b 100644 --- a/asm/non_matchings/code_80091750/func_800AAC18.s +++ b/asm/non_matchings/code_80091750/func_800AAC18.s @@ -26,8 +26,8 @@ glabel L800AAC50 /* 0AB874 800AAC74 8FA50024 */ lw $a1, 0x24($sp) /* 0AB878 800AAC78 04400052 */ bltz $v0, .L800AADC4 /* 0AB87C 800AAC7C 8FA70030 */ lw $a3, 0x30($sp) -/* 0AB880 800AAC80 3C18800E */ lui $t8, %hi(D_800DC530) # $t8, 0x800e -/* 0AB884 800AAC84 8F19C530 */ lw $t9, %lo(D_800DC530)($t8) +/* 0AB880 800AAC80 3C18800E */ lui $t8, %hi(gScreenModeSelection) # $t8, 0x800e +/* 0AB884 800AAC84 8F19C530 */ lw $t9, %lo(gScreenModeSelection)($t8) /* 0AB888 800AAC88 000250C0 */ sll $t2, $v0, 3 /* 0AB88C 800AAC8C 3C0C800E */ lui $t4, %hi(D_800E7188) # $t4, 0x800e /* 0AB890 800AAC90 00194940 */ sll $t1, $t9, 5 @@ -74,8 +74,8 @@ glabel L800AAD14 /* 0AB928 800AAD28 24060002 */ li $a2, 2 /* 0AB92C 800AAD2C 0440000A */ bltz $v0, .L800AAD58 /* 0AB930 800AAD30 8FA70030 */ lw $a3, 0x30($sp) -/* 0AB934 800AAD34 3C0B800E */ lui $t3, %hi(D_800DC530) # $t3, 0x800e -/* 0AB938 800AAD38 8D6CC530 */ lw $t4, %lo(D_800DC530)($t3) +/* 0AB934 800AAD34 3C0B800E */ lui $t3, %hi(gScreenModeSelection) # $t3, 0x800e +/* 0AB938 800AAD38 8D6CC530 */ lw $t4, %lo(gScreenModeSelection)($t3) /* 0AB93C 800AAD3C 000270C0 */ sll $t6, $v0, 3 /* 0AB940 800AAD40 3C18800E */ lui $t8, %hi(D_800E7188) # $t8, 0x800e /* 0AB944 800AAD44 000C6940 */ sll $t5, $t4, 5 diff --git a/asm/non_matchings/code_800AF9B0/func_800B1C90.s b/asm/non_matchings/code_800AF9B0/func_800B1C90.s index ae3da3152..660029148 100644 --- a/asm/non_matchings/code_800AF9B0/func_800B1C90.s +++ b/asm/non_matchings/code_800AF9B0/func_800B1C90.s @@ -9,8 +9,8 @@ glabel func_800B1C90 /* 0B28AC 800B1CAC A7B80036 */ sh $t8, 0x36($sp) /* 0B28B0 800B1CB0 1440010C */ bnez $v0, .L800B20E4 /* 0B28B4 800B1CB4 97A30036 */ lhu $v1, 0x36($sp) -/* 0B28B8 800B1CB8 3C098019 */ lui $t1, %hi(gMenuState) # $t1, 0x8019 -/* 0B28BC 800B1CBC 2529EDF0 */ addiu $t1, %lo(gMenuState) # addiu $t1, $t1, -0x1210 +/* 0B28B8 800B1CB8 3C098019 */ lui $t1, %hi(gControllerPakMenuSelection) # $t1, 0x8019 +/* 0B28BC 800B1CBC 2529EDF0 */ addiu $t1, %lo(gControllerPakMenuSelection) # addiu $t1, $t1, -0x1210 /* 0B28C0 800B1CC0 81390000 */ lb $t9, ($t1) /* 0B28C4 800B1CC4 272AFFFF */ addiu $t2, $t9, -1 /* 0B28C8 800B1CC8 2D41000A */ sltiu $at, $t2, 0xa @@ -254,8 +254,8 @@ glabel L800B1FF4 /* 0B2C3C 800B203C AFA8002C */ sw $t0, 0x2c($sp) /* 0B2C40 800B2040 0C033E90 */ jal osPfsDeleteFile /* 0B2C44 800B2044 2484E868 */ addiu $a0, %lo(D_8018E868) # addiu $a0, $a0, -0x1798 -/* 0B2C48 800B2048 3C098019 */ lui $t1, %hi(gMenuState) # $t1, 0x8019 -/* 0B2C4C 800B204C 2529EDF0 */ addiu $t1, %lo(gMenuState) # addiu $t1, $t1, -0x1210 +/* 0B2C48 800B2048 3C098019 */ lui $t1, %hi(gControllerPakMenuSelection) # $t1, 0x8019 +/* 0B2C4C 800B204C 2529EDF0 */ addiu $t1, %lo(gControllerPakMenuSelection) # addiu $t1, $t1, -0x1210 /* 0B2C50 800B2050 8FA30020 */ lw $v1, 0x20($sp) /* 0B2C54 800B2054 1040000A */ beqz $v0, .L800B2080 /* 0B2C58 800B2058 8FA8002C */ lw $t0, 0x2c($sp) diff --git a/asm/non_matchings/code_800AF9B0/func_800B20F4.s b/asm/non_matchings/code_800AF9B0/func_800B20F4.s index aa919e0ee..601a43caa 100644 --- a/asm/non_matchings/code_800AF9B0/func_800B20F4.s +++ b/asm/non_matchings/code_800AF9B0/func_800B20F4.s @@ -169,11 +169,11 @@ glabel L800B231C /* 0B2F54 800B2354 AFA30024 */ sw $v1, 0x24($sp) /* 0B2F58 800B2358 820B0000 */ lb $t3, ($s0) /* 0B2F5C 800B235C 3C0C800F */ lui $t4, %hi(D_800F2B50) # 0x800f -/* 0B2F60 800B2360 3C01800E */ lui $at, %hi(D_800DC530) # $at, 0x800e +/* 0B2F60 800B2360 3C01800E */ lui $at, %hi(gScreenModeSelection) # $at, 0x800e /* 0B2F64 800B2364 018B6021 */ addu $t4, $t4, $t3 /* 0B2F68 800B2368 818C2B50 */ lb $t4, %lo(D_800F2B50)($t4) # 0x2b50($t4) /* 0B2F6C 800B236C 8FA30024 */ lw $v1, 0x24($sp) -/* 0B2F70 800B2370 AC2CC530 */ sw $t4, %lo(D_800DC530)($at) +/* 0B2F70 800B2370 AC2CC530 */ sw $t4, %lo(gScreenModeSelection)($at) .L800B2374: /* 0B2F74 800B2374 3C108019 */ lui $s0, %hi(D_8018EDF1) # $s0, 0x8019 /* 0B2F78 800B2378 306D0200 */ andi $t5, $v1, 0x200 @@ -189,11 +189,11 @@ glabel L800B231C /* 0B2FA0 800B23A0 AFA30024 */ sw $v1, 0x24($sp) /* 0B2FA4 800B23A4 820F0000 */ lb $t7, ($s0) /* 0B2FA8 800B23A8 3C18800F */ lui $t8, %hi(D_800F2B50) # 0x800f -/* 0B2FAC 800B23AC 3C01800E */ lui $at, %hi(D_800DC530) # $at, 0x800e +/* 0B2FAC 800B23AC 3C01800E */ lui $at, %hi(gScreenModeSelection) # $at, 0x800e /* 0B2FB0 800B23B0 030FC021 */ addu $t8, $t8, $t7 /* 0B2FB4 800B23B4 83182B50 */ lb $t8, %lo(D_800F2B50)($t8) # 0x2b50($t8) /* 0B2FB8 800B23B8 8FA30024 */ lw $v1, 0x24($sp) -/* 0B2FBC 800B23BC AC38C530 */ sw $t8, %lo(D_800DC530)($at) +/* 0B2FBC 800B23BC AC38C530 */ sw $t8, %lo(gScreenModeSelection)($at) .L800B23C0: /* 0B2FC0 800B23C0 30790800 */ andi $t9, $v1, 0x800 /* 0B2FC4 800B23C4 13200008 */ beqz $t9, .L800B23E8 diff --git a/asm/non_matchings/code_800AF9B0/func_800B29D8.s b/asm/non_matchings/code_800AF9B0/func_800B29D8.s index 696b10051..8e5cb7ce0 100644 --- a/asm/non_matchings/code_800AF9B0/func_800B29D8.s +++ b/asm/non_matchings/code_800AF9B0/func_800B29D8.s @@ -26,8 +26,8 @@ glabel func_800B29D8 /* 0B3630 800B2A30 97A3002E */ lhu $v1, 0x2e($sp) /* 0B3634 800B2A34 144002A8 */ bnez $v0, .L800B34D8 /* 0B3638 800B2A38 97A50036 */ lhu $a1, 0x36($sp) -/* 0B363C 800B2A3C 3C088019 */ lui $t0, %hi(D_8018EDED) # $t0, 0x8019 -/* 0B3640 800B2A40 2508EDED */ addiu $t0, %lo(D_8018EDED) # addiu $t0, $t0, -0x1213 +/* 0B363C 800B2A3C 3C088019 */ lui $t0, %hi(gMainMenuSelectionDepth) # $t0, 0x8019 +/* 0B3640 800B2A40 2508EDED */ addiu $t0, %lo(gMainMenuSelectionDepth) # addiu $t0, $t0, -0x1213 /* 0B3644 800B2A44 910C0000 */ lbu $t4, ($t0) /* 0B3648 800B2A48 3C188019 */ lui $t8, %hi(D_8018EDF3) # 0x8019 /* 0B364C 800B2A4C 2D810009 */ sltiu $at, $t4, 9 @@ -69,8 +69,8 @@ glabel L800B2AA4 /* 0B36D4 800B2AD4 3C044900 */ lui $a0, (0x49008000 >> 16) # lui $a0, 0x4900 /* 0B36D8 800B2AD8 0C032384 */ jal play_sound2 /* 0B36DC 800B2ADC 34848000 */ ori $a0, (0x49008000 & 0xFFFF) # ori $a0, $a0, 0x8000 -/* 0B36E0 800B2AE0 3C088019 */ lui $t0, %hi(D_8018EDED) # $t0, 0x8019 -/* 0B36E4 800B2AE4 2508EDED */ addiu $t0, %lo(D_8018EDED) # addiu $t0, $t0, -0x1213 +/* 0B36E0 800B2AE0 3C088019 */ lui $t0, %hi(gMainMenuSelectionDepth) # $t0, 0x8019 +/* 0B36E4 800B2AE4 2508EDED */ addiu $t0, %lo(gMainMenuSelectionDepth) # addiu $t0, $t0, -0x1213 /* 0B36E8 800B2AE8 8FA6001C */ lw $a2, 0x1c($sp) .L800B2AEC: /* 0B36EC 800B2AEC 3C028019 */ lui $v0, %hi(D_8018EDF3) # $v0, 0x8019 @@ -88,8 +88,8 @@ glabel L800B2AA4 /* 0B371C 800B2B1C 0C032384 */ jal play_sound2 /* 0B3720 800B2B20 34848000 */ ori $a0, (0x49008000 & 0xFFFF) # ori $a0, $a0, 0x8000 /* 0B3724 800B2B24 3C028019 */ lui $v0, %hi(D_8018EDF3) # $v0, 0x8019 -/* 0B3728 800B2B28 3C088019 */ lui $t0, %hi(D_8018EDED) # $t0, 0x8019 -/* 0B372C 800B2B2C 2508EDED */ addiu $t0, %lo(D_8018EDED) # addiu $t0, $t0, -0x1213 +/* 0B3728 800B2B28 3C088019 */ lui $t0, %hi(gMainMenuSelectionDepth) # $t0, 0x8019 +/* 0B372C 800B2B2C 2508EDED */ addiu $t0, %lo(gMainMenuSelectionDepth) # addiu $t0, $t0, -0x1213 /* 0B3730 800B2B30 8042EDF3 */ lb $v0, %lo(D_8018EDF3)($v0) /* 0B3734 800B2B34 8FA6001C */ lw $a2, 0x1c($sp) .L800B2B38: @@ -109,16 +109,16 @@ glabel L800B2AA4 /* 0B376C 800B2B6C 1000000A */ b .L800B2B98 /* 0B3770 800B2B70 30CD4000 */ andi $t5, $a2, 0x4000 .L800B2B74: -/* 0B3774 800B2B74 3C01800E */ lui $at, %hi(D_800DC530) # $at, 0x800e +/* 0B3774 800B2B74 3C01800E */ lui $at, %hi(gScreenModeSelection) # $at, 0x800e /* 0B3778 800B2B78 10000006 */ b .L800B2B94 -/* 0B377C 800B2B7C AC20C530 */ sw $zero, %lo(D_800DC530)($at) +/* 0B377C 800B2B7C AC20C530 */ sw $zero, %lo(gScreenModeSelection)($at) .L800B2B80: -/* 0B3780 800B2B80 3C01800E */ lui $at, %hi(D_800DC530) # $at, 0x800e +/* 0B3780 800B2B80 3C01800E */ lui $at, %hi(gScreenModeSelection) # $at, 0x800e /* 0B3784 800B2B84 10000003 */ b .L800B2B94 -/* 0B3788 800B2B88 AC27C530 */ sw $a3, %lo(D_800DC530)($at) +/* 0B3788 800B2B88 AC27C530 */ sw $a3, %lo(gScreenModeSelection)($at) .L800B2B8C: -/* 0B378C 800B2B8C 3C01800E */ lui $at, %hi(D_800DC530) # $at, 0x800e -/* 0B3790 800B2B90 AC24C530 */ sw $a0, %lo(D_800DC530)($at) +/* 0B378C 800B2B8C 3C01800E */ lui $at, %hi(gScreenModeSelection) # $at, 0x800e +/* 0B3790 800B2B90 AC24C530 */ sw $a0, %lo(gScreenModeSelection)($at) .L800B2B94: /* 0B3794 800B2B94 30CD4000 */ andi $t5, $a2, 0x4000 .L800B2B98: @@ -251,8 +251,8 @@ glabel L800B2D30 /* 0B397C 800B2D7C 3C044900 */ lui $a0, (0x49008000 >> 16) # lui $a0, 0x4900 /* 0B3980 800B2D80 0C032384 */ jal play_sound2 /* 0B3984 800B2D84 34848000 */ ori $a0, (0x49008000 & 0xFFFF) # ori $a0, $a0, 0x8000 -/* 0B3988 800B2D88 3C088019 */ lui $t0, %hi(D_8018EDED) # $t0, 0x8019 -/* 0B398C 800B2D8C 2508EDED */ addiu $t0, %lo(D_8018EDED) # addiu $t0, $t0, -0x1213 +/* 0B3988 800B2D88 3C088019 */ lui $t0, %hi(gMainMenuSelectionDepth) # $t0, 0x8019 +/* 0B398C 800B2D8C 2508EDED */ addiu $t0, %lo(gMainMenuSelectionDepth) # addiu $t0, $t0, -0x1213 /* 0B3990 800B2D90 8FA6001C */ lw $a2, 0x1c($sp) .L800B2D94: /* 0B3994 800B2D94 30CA0800 */ andi $t2, $a2, 0x800 @@ -272,8 +272,8 @@ glabel L800B2D30 /* 0B39C8 800B2DC8 3C044900 */ lui $a0, (0x49008000 >> 16) # lui $a0, 0x4900 /* 0B39CC 800B2DCC 0C032384 */ jal play_sound2 /* 0B39D0 800B2DD0 34848000 */ ori $a0, (0x49008000 & 0xFFFF) # ori $a0, $a0, 0x8000 -/* 0B39D4 800B2DD4 3C088019 */ lui $t0, %hi(D_8018EDED) # $t0, 0x8019 -/* 0B39D8 800B2DD8 2508EDED */ addiu $t0, %lo(D_8018EDED) # addiu $t0, $t0, -0x1213 +/* 0B39D4 800B2DD4 3C088019 */ lui $t0, %hi(gMainMenuSelectionDepth) # $t0, 0x8019 +/* 0B39D8 800B2DD8 2508EDED */ addiu $t0, %lo(gMainMenuSelectionDepth) # addiu $t0, $t0, -0x1213 /* 0B39DC 800B2DDC 8FA6001C */ lw $a2, 0x1c($sp) .L800B2DE0: /* 0B39E0 800B2DE0 30D84000 */ andi $t8, $a2, 0x4000 @@ -520,10 +520,10 @@ glabel L800B2F70 /* 0B3D68 800B3168 00024880 */ sll $t1, $v0, 2 /* 0B3D6C 800B316C 01224823 */ subu $t1, $t1, $v0 /* 0B3D70 800B3170 01245821 */ addu $t3, $t1, $a0 -/* 0B3D74 800B3174 3C088019 */ lui $t0, %hi(D_8018EDED) # $t0, 0x8019 +/* 0B3D74 800B3174 3C088019 */ lui $t0, %hi(gMainMenuSelectionDepth) # $t0, 0x8019 /* 0B3D78 800B3178 00AB2821 */ addu $a1, $a1, $t3 /* 0B3D7C 800B317C 30CA4000 */ andi $t2, $a2, 0x4000 -/* 0B3D80 800B3180 2508EDED */ addiu $t0, %lo(D_8018EDED) # addiu $t0, $t0, -0x1213 +/* 0B3D80 800B3180 2508EDED */ addiu $t0, %lo(gMainMenuSelectionDepth) # addiu $t0, $t0, -0x1213 /* 0B3D84 800B3184 11400015 */ beqz $t2, .L800B31DC /* 0B3D88 800B3188 80A586AD */ lb $a1, %lo(D_800E86AD)($a1) # -0x7953($a1) /* 0B3D8C 800B318C 240F0004 */ li $t7, 4 @@ -574,9 +574,9 @@ glabel L800B2F70 .L800B323C: /* 0B3E3C 800B323C 240A0006 */ li $t2, 6 .L800B3240: -/* 0B3E40 800B3240 3C018019 */ lui $at, %hi(D_8018EDED) # $at, 0x8019 +/* 0B3E40 800B3240 3C018019 */ lui $at, %hi(gMainMenuSelectionDepth) # $at, 0x8019 /* 0B3E44 800B3244 3C044900 */ lui $a0, (0x49008001 >> 16) # lui $a0, 0x4900 -/* 0B3E48 800B3248 A02AEDED */ sb $t2, %lo(D_8018EDED)($at) +/* 0B3E48 800B3248 A02AEDED */ sb $t2, %lo(gMainMenuSelectionDepth)($at) /* 0B3E4C 800B324C 0C032384 */ jal play_sound2 /* 0B3E50 800B3250 34848001 */ ori $a0, (0x49008001 & 0xFFFF) # ori $a0, $a0, 0x8001 /* 0B3E54 800B3254 3C018019 */ lui $at, %hi(gMenuTimingCounter) # $at, 0x8019 @@ -625,8 +625,8 @@ glabel L800B32B4 .L800B32F4: /* 0B3EF4 800B32F4 0C032384 */ jal play_sound2 /* 0B3EF8 800B32F8 AFA6001C */ sw $a2, 0x1c($sp) -/* 0B3EFC 800B32FC 3C088019 */ lui $t0, %hi(D_8018EDED) # $t0, 0x8019 -/* 0B3F00 800B3300 2508EDED */ addiu $t0, %lo(D_8018EDED) # addiu $t0, $t0, -0x1213 +/* 0B3EFC 800B32FC 3C088019 */ lui $t0, %hi(gMainMenuSelectionDepth) # $t0, 0x8019 +/* 0B3F00 800B3300 2508EDED */ addiu $t0, %lo(gMainMenuSelectionDepth) # addiu $t0, $t0, -0x1213 /* 0B3F04 800B3304 8FA6001C */ lw $a2, 0x1c($sp) .L800B3308: /* 0B3F08 800B3308 30CD4000 */ andi $t5, $a2, 0x4000 diff --git a/asm/non_matchings/code_800AF9B0/func_800B3F74.s b/asm/non_matchings/code_800AF9B0/func_800B3F74.s index 499c04dca..dfc65ca7c 100644 --- a/asm/non_matchings/code_800AF9B0/func_800B3F74.s +++ b/asm/non_matchings/code_800AF9B0/func_800B3F74.s @@ -60,8 +60,8 @@ glabel L800B4040 /* 0B4C4C 800B404C 10000111 */ b .L800B4494 /* 0B4C50 800B4050 00000000 */ nop glabel L800B4054 -/* 0B4C54 800B4054 3C018019 */ lui $at, %hi(gMenuState) # $at, 0x8019 -/* 0B4C58 800B4058 A023EDF0 */ sb $v1, %lo(gMenuState)($at) +/* 0B4C54 800B4054 3C018019 */ lui $at, %hi(gControllerPakMenuSelection) # $at, 0x8019 +/* 0B4C58 800B4058 A023EDF0 */ sb $v1, %lo(gControllerPakMenuSelection)($at) /* 0B4C5C 800B405C 00002025 */ move $a0, $zero /* 0B4C60 800B4060 0C032802 */ jal func_800CA008 /* 0B4C64 800B4064 00002825 */ move $a1, $zero @@ -136,26 +136,26 @@ glabel L800B4100 .L800B4168: /* 0B4D68 800B4168 3C028019 */ lui $v0, %hi(D_8018EDE0) # $v0, 0x8019 /* 0B4D6C 800B416C 8C42EDE0 */ lw $v0, %lo(D_8018EDE0)($v0) -/* 0B4D70 800B4170 3C058019 */ lui $a1, %hi(D_8018EDED) # $a1, 0x8019 -/* 0B4D74 800B4174 24A5EDED */ addiu $a1, %lo(D_8018EDED) # addiu $a1, $a1, -0x1213 +/* 0B4D70 800B4170 3C058019 */ lui $a1, %hi(gMainMenuSelectionDepth) # $a1, 0x8019 +/* 0B4D74 800B4174 24A5EDED */ addiu $a1, %lo(gMainMenuSelectionDepth) # addiu $a1, $a1, -0x1213 /* 0B4D78 800B4178 1040000B */ beqz $v0, .L800B41A8 /* 0B4D7C 800B417C 24060003 */ li $a2, 3 /* 0B4D80 800B4180 10430019 */ beq $v0, $v1, .L800B41E8 -/* 0B4D84 800B4184 3C058019 */ lui $a1, %hi(D_8018EDED) # 0x8019 +/* 0B4D84 800B4184 3C058019 */ lui $a1, %hi(gMainMenuSelectionDepth) # 0x8019 /* 0B4D88 800B4188 24060003 */ li $a2, 3 /* 0B4D8C 800B418C 1046001A */ beq $v0, $a2, .L800B41F8 -/* 0B4D90 800B4190 3C058019 */ lui $a1, %hi(D_8018EDED) # 0x8019 +/* 0B4D90 800B4190 3C058019 */ lui $a1, %hi(gMainMenuSelectionDepth) # 0x8019 /* 0B4D94 800B4194 24080004 */ li $t0, 4 /* 0B4D98 800B4198 10480022 */ beq $v0, $t0, .L800B4224 -/* 0B4D9C 800B419C 3C058019 */ lui $a1, %hi(D_8018EDED) # 0x8019 +/* 0B4D9C 800B419C 3C058019 */ lui $a1, %hi(gMainMenuSelectionDepth) # 0x8019 /* 0B4DA0 800B41A0 100000BC */ b .L800B4494 /* 0B4DA4 800B41A4 00000000 */ nop .L800B41A8: /* 0B4DA8 800B41A8 A0A60000 */ sb $a2, ($a1) /* 0B4DAC 800B41AC 0C0323AB */ jal func_800C8EAC /* 0B4DB0 800B41B0 24040002 */ li $a0, 2 -/* 0B4DB4 800B41B4 3C05800E */ lui $a1, %hi(D_800DC530) # $a1, 0x800e -/* 0B4DB8 800B41B8 24A5C530 */ addiu $a1, %lo(D_800DC530) # addiu $a1, $a1, -0x3ad0 +/* 0B4DB4 800B41B4 3C05800E */ lui $a1, %hi(gScreenModeSelection) # $a1, 0x800e +/* 0B4DB8 800B41B8 24A5C530 */ addiu $a1, %lo(gScreenModeSelection) # addiu $a1, $a1, -0x3ad0 /* 0B4DBC 800B41BC 8CA20000 */ lw $v0, ($a1) /* 0B4DC0 800B41C0 3C048019 */ lui $a0, %hi(D_8018EDF3) # $a0, 0x8019 /* 0B4DC4 800B41C4 2484EDF3 */ addiu $a0, %lo(D_8018EDF3) # addiu $a0, $a0, -0x120d @@ -169,12 +169,12 @@ glabel L800B4100 /* 0B4DE0 800B41E0 100000AC */ b .L800B4494 /* 0B4DE4 800B41E4 ACA00000 */ sw $zero, ($a1) .L800B41E8: -/* 0B4DE8 800B41E8 24A5EDED */ addiu $a1, $a1, %lo(D_8018EDED) # -0x1213 +/* 0B4DE8 800B41E8 24A5EDED */ addiu $a1, $a1, %lo(gMainMenuSelectionDepth) # -0x1213 /* 0B4DEC 800B41EC 240A0007 */ li $t2, 7 /* 0B4DF0 800B41F0 100000A8 */ b .L800B4494 /* 0B4DF4 800B41F4 A0AA0000 */ sb $t2, ($a1) .L800B41F8: -/* 0B4DF8 800B41F8 24A5EDED */ addiu $a1, $a1, %lo(D_8018EDED) # -0x1213 +/* 0B4DF8 800B41F8 24A5EDED */ addiu $a1, $a1, %lo(gMainMenuSelectionDepth) # -0x1213 /* 0B4DFC 800B41FC 80A20000 */ lb $v0, ($a1) /* 0B4E00 800B4200 24010002 */ li $at, 2 /* 0B4E04 800B4204 10430005 */ beq $v0, $v1, .L800B421C @@ -187,7 +187,7 @@ glabel L800B4100 /* 0B4E1C 800B421C 1000009D */ b .L800B4494 /* 0B4E20 800B4220 A0A60000 */ sb $a2, ($a1) .L800B4224: -/* 0B4E24 800B4224 24A5EDED */ addiu $a1, $a1, %lo(D_8018EDED) # -0x1213 +/* 0B4E24 800B4224 24A5EDED */ addiu $a1, $a1, %lo(gMainMenuSelectionDepth) # -0x1213 /* 0B4E28 800B4228 1000009A */ b .L800B4494 /* 0B4E2C 800B422C A0A60000 */ sb $a2, ($a1) glabel L800B4230 diff --git a/asm/non_matchings/code_80290C20/func_80295D88.s b/asm/non_matchings/code_80290C20/func_80295D88.s index 82cd25a98..49c8cd591 100644 --- a/asm/non_matchings/code_80290C20/func_80295D88.s +++ b/asm/non_matchings/code_80290C20/func_80295D88.s @@ -48,8 +48,8 @@ glabel L80295E3C /* 0FF44C 80295E3C 3C040700 */ lui $a0, (0x07001140 >> 16) # lui $a0, 0x700 /* 0FF450 80295E40 0C0ABD62 */ jal func_802AF588 /* 0FF454 80295E44 34841140 */ ori $a0, (0x07001140 & 0xFFFF) # ori $a0, $a0, 0x1140 -/* 0FF458 80295E48 3C18800E */ lui $t8, %hi(D_800DC530) # $t8, 0x800e -/* 0FF45C 80295E4C 8F18C530 */ lw $t8, %lo(D_800DC530)($t8) +/* 0FF458 80295E48 3C18800E */ lui $t8, %hi(gScreenModeSelection) # $t8, 0x800e +/* 0FF45C 80295E4C 8F18C530 */ lw $t8, %lo(gScreenModeSelection)($t8) /* 0FF460 80295E50 17000005 */ bnez $t8, .L80295E68 /* 0FF464 80295E54 3C040700 */ lui $a0, (0x070008E8 >> 16) # lui $a0, 0x700 /* 0FF468 80295E58 0C0ABD62 */ jal func_802AF588 diff --git a/asm/non_matchings/code_802A3730/func_802A4D18.s b/asm/non_matchings/code_802A3730/func_802A4D18.s index 56463da6c..403698446 100644 --- a/asm/non_matchings/code_802A3730/func_802A4D18.s +++ b/asm/non_matchings/code_802A3730/func_802A4D18.s @@ -93,8 +93,8 @@ glabel L802A4E28 /* 10E474 802A4E64 3C018015 */ lui $at, %hi(D_80150150) # $at, 0x8015 /* 10E478 802A4E68 E42A0150 */ swc1 $f10, %lo(D_80150150)($at) .L802A4E6C: -/* 10E47C 802A4E6C 3C02800E */ lui $v0, %hi(D_800DC530) # $v0, 0x800e -/* 10E480 802A4E70 8C42C530 */ lw $v0, %lo(D_800DC530)($v0) +/* 10E47C 802A4E6C 3C02800E */ lui $v0, %hi(gScreenModeSelection) # $v0, 0x800e +/* 10E480 802A4E70 8C42C530 */ lw $v0, %lo(gScreenModeSelection)($v0) /* 10E484 802A4E74 3C01802C */ lui $at, %hi(D_802B9C1C) /* 10E488 802A4E78 1040000A */ beqz $v0, .L802A4EA4 /* 10E48C 802A4E7C 00000000 */ nop diff --git a/include/defines.h b/include/defines.h index 05cd2090c..688a06089 100644 --- a/include/defines.h +++ b/include/defines.h @@ -80,7 +80,7 @@ #define LOGO_INTRO_MENU 8 #define CONTROLLER_PAK_MENU 9 #define START_MENU 10 -#define GAME_SELECT_MENU 11 +#define MAIN_MENU 11 #define PLAYER_SELECT_MENU 12 #define COURSE_SELECT_MENU 13 #define RACING_DUPLICATE 14 @@ -89,7 +89,7 @@ * Options for gMenuSelectionFromQuit and gMenuSelectionFromEndingSequence **/ #define START_MENU_FROM_QUIT 0 -#define GAME_SELECT_MENU_FROM_QUIT 1 +#define MAIN_MENU_FROM_QUIT 1 #define PLAYER_SELECT_MENU_FROM_QUIT 2 #define COURSE_SELECT_MENU_FROM_QUIT 3 #define RACING 4 @@ -97,7 +97,34 @@ #define CREDITS_SEQUENCE 9 /** - * Options for gStartMenuDebugRowSelection + * Options for gMainMenuSelectionDepth +**/ +#define BLANK_MAIN_MENU 0 +#define OPTIONS_SELECTION 1 +#define DATA_SELECTION 2 +#define PLAYER_NUM_SELECTION 3 +#define GAME_MODE_SELECTION 4 +#define GAME_MODE_CC_OR_TIME_TRIALS_OPTIONS_SELECTION 5 // Selecting CC for GP and Versus. Selecting "Begin" or "Data" for Time Trials. Unused for Battle +#define CONFIRM_OK_SELECTION 6 +#define CONFIRM_OK_SELECTION_FROM_BACK_OUT 7 +#define TIME_TRAILS_DATA_SELECTION_FROM_BACK_OUT 8 + +/** + * Options for gControllerPakMenuSelection +**/ +#define CONTROLLER_PAK_MENU_SELECT_RECORD 1 +#define CONTROLLER_PAK_MENU_END 2 +#define CONTROLLER_PAK_MENU_ERASE 3 +#define CONTROLLER_PAK_MENU_QUIT 4 +#define CONTROLLER_PAK_MENU_TABLE_GAME_DATA 5 +#define CONTROLLER_PAK_MENU_GO_TO_ERASING 6 +#define CONTROLLER_PAK_MENU_ERASING 7 +#define CONTROLLER_PAK_MENU_ERASE_ERROR_NOT_ERASED 8 +#define CONTROLLER_PAK_MENU_ERASE_ERROR_NO_PAK 9 +#define CONTROLLER_PAK_MENU_ERASE_ERROR_PAK_CHANGED 10 + +/** + * Options for gDebugMenuSelection */ #define DEBUG_MENU_DISABLED 1 #define DEBUG_MENU_DEBUG_MODE 2 @@ -116,6 +143,15 @@ #define DEBUG_GOTO_CREDITS_SEQUENCE_CC_50 2 #define DEBUG_GOTO_CREDITS_SEQUENCE_CC_EXTRA 3 +/** + * Options for gScreenModeSelection + */ +#define SCREEN_MODE_1P 0 +#define SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL 1 +#define SCREEN_MODE_2P_SPLITSCREEN_VERTICAL 2 +#define SCREEN_MODE_3P_4P_SPLITSCREEN 3 +#define NUM_SCREEN_MODES 4 + /** * Indexes for accessing Time Trial records **/ @@ -141,7 +177,6 @@ #define TEXT_BLUE_GREEN_RED_CYCLE_1 4 #define TEXT_BLUE_GREEN_RED_CYCLE_2 5 - /** * Sound mode options * Option 2 appears to be unused, as such its probably not diff --git a/include/variables.h b/include/variables.h index c250d9bfd..6f4f243ef 100644 --- a/include/variables.h +++ b/include/variables.h @@ -25,7 +25,7 @@ extern s8 gHumanPlayerCount; extern f32 gKartFrictionTable[]; extern f32 gKartBoundingBoxTable[]; extern f32 gKartGravityTable[]; -extern s8 gMenuState; // D_8018EDF0 +extern s8 gControllerPakMenuSelection; // D_8018EDF0 extern s32 gModeSelection; // Indicates the ID of the next title screen demo that will be played extern u8 gNextDemoId; // D_800E86BC diff --git a/src/code_800029B0.c b/src/code_800029B0.c index f6569a4a2..e13fda595 100644 --- a/src/code_800029B0.c +++ b/src/code_800029B0.c @@ -41,7 +41,7 @@ extern s8 D_8018EDF3; extern s8 gCupSelection; -extern u32 D_800DC530; +extern u32 gScreenModeSelection; extern u32 D_8015F730; extern u32 D_8015F734; extern u32 gPrevLoadedAddress; @@ -143,7 +143,7 @@ void func_80002A18(void) { if (gModeSelection == GRAND_PRIX) { gCurrentCourseId = gCupCourseOrder[gCupSelection][gCupCourseSelection]; } - D_800DC52C = D_800DC530; + D_800DC52C = gScreenModeSelection; if (gCurrentCourseId != gCurrentlyLoadedCourseId) { D_80150120 = 0; gCurrentlyLoadedCourseId = gCurrentCourseId; diff --git a/src/code_80005FD0.c b/src/code_80005FD0.c index db9051062..4caa337fc 100644 --- a/src/code_80005FD0.c +++ b/src/code_80005FD0.c @@ -8518,7 +8518,7 @@ loop_2: phi_fp = temp_fp; phi_s7_2 += 0x10C; } while (temp_fp < 2); - temp_v0_2 = D_800DC530; + temp_v0_2 = gScreenModeSelection; phi_s6_3 = &D_801635A0; phi_a2 = &D_801635A0; if (temp_v0_2 != 0) { diff --git a/src/code_800431B0.c b/src/code_800431B0.c index 4f64c6e83..738fce04d 100644 --- a/src/code_800431B0.c +++ b/src/code_800431B0.c @@ -6412,7 +6412,7 @@ void func_80050E34(s32 arg0, s32 arg1) { gDisplayListHead = temp_v0_26 + 8; temp_v0_26->unk0 = 0x6000000; temp_v0_26->unk4 = &D_0D006950; - if ((spAC == D_800DC4DC) && (D_800DC530 == 0)) { + if ((spAC == D_800DC4DC) && (gScreenModeSelection == SCREEN_MODE_1P)) { temp_v0_27 = gDisplayListHead; gDisplayListHead = temp_v0_27 + 8; temp_v0_27->unk4 = &D_0D007A40; @@ -6449,7 +6449,7 @@ void func_800514BC(void) { s32 phi_s0; s32 phi_s1; - if (D_800DC530 == 0) { + if (gScreenModeSelection == SCREEN_MODE_1P) { func_800508C0(); } phi_s3 = 8; @@ -7705,7 +7705,7 @@ void func_800532A4(s32 arg0) { temp_v0_2 = temp_s0->unkD9; func_800485C4(temp_s1_2, temp_s0 + 0xB2, temp_s0->unk0, temp_s0->unkA0, temp_s0->unk60, temp_s0->unk64, temp_s0->unk74, temp_v0_2, temp_v1_2, temp_v0_2, temp_v1_2 / 2); } - if (D_800DC530 == 0) { + if (gScreenModeSelection == SCREEN_MODE_1P) { temp_v0_3 = D_8018CF14; temp_f0 = temp_s0->unk4 - temp_v0_3->unk0; temp_f2 = temp_s0->unkC - temp_v0_3->unk8; diff --git a/src/code_80057C60.c b/src/code_80057C60.c index f0472b0d2..a1538cc6a 100644 --- a/src/code_80057C60.c +++ b/src/code_80057C60.c @@ -721,7 +721,7 @@ extern s8 D_80165801; extern s32 D_8018D188; extern s32 D_8018D2BC; -extern s32 D_800DC530; +extern s32 gScreenModeSelection; void func_800591B4(void) { @@ -742,7 +742,7 @@ void func_800591B4(void) { } func_8004F3E4(0); } - if ((D_800DC530 == 1) && (D_80165801 != 0)) { + if ((gScreenModeSelection == SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL) && (D_80165801 != 0)) { func_8004EE54(1); if (gModeSelection != BATTLE) { func_8004F020(1); @@ -1094,8 +1094,8 @@ void func_80059AC8(void) { phi_s0++; } //while (phi_s0 != 8); - switch (D_800DC530) { - case 0: + switch (gScreenModeSelection) { + case SCREEN_MODE_1P: if (D_800DC50C != 9) { func_80059A88(0); if (gModeSelection == 1) { @@ -1105,15 +1105,15 @@ void func_80059AC8(void) { func_80059820(0); } break; - case 2: + case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL: func_80059A88(0); func_80059A88(1); break; - case 1: + case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL: func_80059A88(0); func_80059A88(1); break; - case 3: + case SCREEN_MODE_3P_4P_SPLITSCREEN: func_80059A88(0); func_80059A88(1); func_80059A88(2); @@ -1197,7 +1197,7 @@ void func_80059D00(void) { func_8005A3C0(); func_8005A380(); if (D_801657AE == 0) { - temp_v0 = D_800DC530; + temp_v0 = gScreenModeSelection; if (temp_v0 != 0) { if (temp_v0 != 1) { if (temp_v0 != 2) { @@ -3096,7 +3096,7 @@ void func_8005CB60(s32 arg0, s32 arg1) { } else { arg0 = temp_a3; func_800413B8(temp_s0 + 4, 0x3F800000, 0x3E000000, temp_a3); - temp_v0_6 = D_800DC530; + temp_v0_6 = gScreenModeSelection; if (temp_v0_6 != 0) { if (temp_v0_6 != 1) { if (temp_v0_6 != 2) { diff --git a/src/code_8006E9C0.c b/src/code_8006E9C0.c index ae57792a5..648b9f0cb 100644 --- a/src/code_8006E9C0.c +++ b/src/code_8006E9C0.c @@ -3,24 +3,24 @@ #include void func_8006EA5C(void); -extern s32 D_800DC530; +extern s32 gScreenModeSelection; void func_8006E9C0(void) { func_8006EA5C(); func_8006FA94(); - switch (D_800DC530) { - case 0: + switch (gScreenModeSelection) { + case SCREEN_MODE_1P: func_80071428(); break; - case 2: + case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL: func_80071818(); break; - case 1: + case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL: func_80071A20(); break; - case 3: + case SCREEN_MODE_3P_4P_SPLITSCREEN: func_80071C28(); break; } @@ -837,7 +837,7 @@ void func_8006FA94(void) { D_8018D180 = 0x96; D_8018D2AC = 0x3C; } - } else if (D_800DC530 == 1) { + } else if (gScreenModeSelection == SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL) { temp_v0 = gModeSelection; if (temp_v0 == GRAND_PRIX) { D_8018D114 = 2; diff --git a/src/code_80071F00.c b/src/code_80071F00.c index 5d5ac4c65..92277779c 100644 --- a/src/code_80071F00.c +++ b/src/code_80071F00.c @@ -4942,7 +4942,7 @@ extern ? D_80183DB8; void func_80078F64(void) { s32 temp_v0; - temp_v0 = D_800DC530; + temp_v0 = gScreenModeSelection; if (temp_v0 != 0) { if (temp_v0 != 1) { if (temp_v0 != 2) { @@ -10023,7 +10023,7 @@ void func_80080A4C(s32 arg0, s32 arg1) { sp1C = (arg1 * 0xB8) + camera1; temp_a3 = &D_800DC4DC[arg1]; - if (D_800DC530 != 3) { + if (gScreenModeSelection != 3) { sp18 = temp_a3; if ((func_80072320(0x10, temp_a3) != 0) && (func_80088A58(arg0, temp_a3, 0x43FA0000, temp_a3) != 0)) { func_8001CA10(sp1C); diff --git a/src/code_80091750.c b/src/code_80091750.c index 98ef5c8dc..21b65702d 100644 --- a/src/code_80091750.c +++ b/src/code_80091750.c @@ -1901,7 +1901,7 @@ void func_80094A64(s32 arg0) { case COURSE_DATA_MENU: case LOGO_INTRO_MENU: case CONTROLLER_PAK_MENU: - case GAME_SELECT_MENU: + case MAIN_MENU: case PLAYER_SELECT_MENU: case COURSE_SELECT_MENU: func_800A8230(); @@ -2013,7 +2013,7 @@ void func_80094C60(void) { D_800DC51C = 0; D_8018EE08 = 0; break; - case GAME_SELECT_MENU: + case MAIN_MENU: func_8009E650(0x23, 0, 0, 2); func_8009E650(0xA, 0x15E, 0x11, 6); func_8009E650(0xE, 0x15E, 0x3E, 6); @@ -6433,8 +6433,8 @@ void func_8009CE64(s32 *arg0, s32 arg2, s32 arg3) { gCreditsCourseId = COURSE_LUIGI_RACEWAY; return; } - gMenuSelectionFromEndingSequence = GAME_SELECT_MENU_FROM_QUIT; - gMenuSelection = GAME_SELECT_MENU; + gMenuSelectionFromEndingSequence = MAIN_MENU_FROM_QUIT; + gMenuSelection = MAIN_MENU; return; } if (temp_v0 == RACING) { @@ -6589,7 +6589,7 @@ block_74: switch (gNextDemoId) { /* switch 4 */ case DEMO_ONE: /* switch 4 */ gCurrentCourseId = COURSE_MARIO_RACEWAY; - D_800DC530 = 0; + gScreenModeSelection = SCREEN_MODE_1P; gPlayerCountSelection1 = 1; D_8018EDF3 = 1; D_800E86A8[0] = MARIO; @@ -6597,7 +6597,7 @@ block_74: break; case DEMO_TWO: /* switch 4 */ gCurrentCourseId = COURSE_CHOCO_MOUNTAIN; - D_800DC530 = 1; + gScreenModeSelection = SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL; gPlayerCountSelection1 = 2; D_8018EDF3 = 2; D_800E86A8[0] = YOSHI; @@ -6607,7 +6607,7 @@ block_74: break; case DEMO_THREE: /* switch 4 */ gCurrentCourseId = COURSE_KALAMARI_DESERT; - D_800DC530 = 0; + gScreenModeSelection = SCREEN_MODE_1P; gPlayerCountSelection1 = 1; D_8018EDF3 = 1; D_800E86A8[0] = LUIGI; @@ -6615,7 +6615,7 @@ block_74: break; case DEMO_FOUR: /* switch 4 */ gCurrentCourseId = COURSE_WARIO_STADIUM; - D_800DC530 = 3; + gScreenModeSelection = SCREEN_MODE_3P_4P_SPLITSCREEN; gPlayerCountSelection1 = 3; D_8018EDF3 = 3; D_800E86A8[0] = WARIO; @@ -6626,7 +6626,7 @@ block_74: break; case DEMO_FIVE: /* switch 4 */ gCurrentCourseId = COURSE_BOWSER_CASTLE; - D_800DC530 = 0; + gScreenModeSelection = SCREEN_MODE_1P; gPlayerCountSelection1 = 1; D_8018EDF3 = 1; D_800E86A8[0] = BOWSER; @@ -6635,7 +6635,7 @@ block_74: break; case DEMO_SIX: /* switch 4 */ gCurrentCourseId = COURSE_SHERBET_LAND; - D_800DC530 = 3; + gScreenModeSelection = SCREEN_MODE_3P_4P_SPLITSCREEN; gPlayerCountSelection1 = 4; D_8018EDF3 = 4; D_800E86A8[0] = MARIO; @@ -6659,11 +6659,11 @@ block_74: temp_v1_5 = gMenuSelection; phi_a0 = &gMenuSelection; if (temp_v1_5 != DATA_MENU) { - if (temp_v1_5 == GAME_SELECT_MENU) { + if (temp_v1_5 == MAIN_MENU) { gMenuSelection = DATA_MENU; } } else { - gMenuSelection = GAME_SELECT_MENU; + gMenuSelection = MAIN_MENU; } break; case 4: /* switch 3 */ @@ -6671,7 +6671,7 @@ block_74: phi_t7 = 0xB; phi_a0 = &gMenuSelection; if (temp_v1_6 != OPTIONS_MENU) { - if (temp_v1_6 == GAME_SELECT_MENU) { + if (temp_v1_6 == MAIN_MENU) { gMenuSelection = OPTIONS_MENU; } } else { @@ -6707,7 +6707,7 @@ block_74: D_800DC524 = ENDING_SEQUENCE; } func_8000F124(1, 2); - if ((D_800DC530 == 3) && ((temp_v1_8 = gModeSelection, (temp_v1_8 == 0)) || (temp_v1_8 == 1))) { + if ((gScreenModeSelection == SCREEN_MODE_3P_4P_SPLITSCREEN) && ((temp_v1_8 = gModeSelection, (temp_v1_8 == 0)) || (temp_v1_8 == 1))) { gModeSelection = VERSUS; } temp_a0_2 = gCurrentCourseId; @@ -6726,7 +6726,7 @@ block_74: gModeSelection = BATTLE; if (gPlayerCountSelection1 == 1) { D_8018EDF3 = 2; - D_800DC530 = 1; + gScreenModeSelection = SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL; gPlayerCountSelection1 = D_8018EDF3; } } @@ -8427,7 +8427,7 @@ void *segmented_to_virtual(segment_address_t); /* extern */ extern s32 D_800DC540; extern s32 D_800DC548; extern ? D_8018EDE8; -extern s8 D_8018EDED; +extern s8 gMainMenuSelectionDepth; extern s8 D_8018EDF3; extern s8 D_802874F6; extern ? gCharacterSelections; @@ -8703,9 +8703,9 @@ void func_8009F5E0(void *arg0) { func_800A143C(arg0, spAC); return; case 0x8C: /* switch 3 */ - temp_v0_4 = D_8018EDED; - if ((temp_v0_4 >= 5) && (spAC == (temp_t0 - spA8))) { - if (temp_v0_4 >= 6) { + temp_v0_4 = gMainMenuSelectionDepth; + if ((temp_v0_4 >= GAME_MODE_CC_OR_TIME_TRIALS_OPTIONS_SELECTION) && (spAC == (temp_t0 - spA8))) { + if (temp_v0_4 >= CONFIRM_OK_SELECTION) { temp_a1_2 = arg0->unkC; temp_a2_3 = arg0->unk10; phi_v0 = func_80098C18(gDisplayListHead, temp_a1_2, temp_a2_3, temp_a1_2 + 0x3F, temp_a2_3 + 0x11, 0xFF, 0xF9, 0xDC, 0xFF); @@ -8918,7 +8918,7 @@ void func_8009F5E0(void *arg0) { phi_v1_2 = temp_v1_5; if (temp_v1_5 < 0x20) { temp_t9 = (temp_v1_5 * 0x3A) / 64; - if ((temp_t0 - 0xF) == D_8018EDED) { + if ((temp_t0 - 0xF) == gMainMenuSelectionDepth) { temp_v0_9 = arg0->unkC; temp_v1_6 = arg0->unk10; gDisplayListHead = func_800959CC(gDisplayListHead, temp_v0_9 + temp_t9, temp_v1_6, (temp_v0_9 - temp_t9) + 0x39, temp_v1_6 + 0x12); @@ -8990,9 +8990,9 @@ block_58: break; } if (phi_a2_2 != -1) { - temp_v0_12 = D_8018EDED; - if ((temp_v0_12 >= 5) && (phi_a2_2 == (arg0->unk0 - phi_a1))) { - if (temp_v0_12 >= 6) { + temp_v0_12 = gMainMenuSelectionDepth; + if ((temp_v0_12 >= GAME_MODE_CC_OR_TIME_TRIALS_OPTIONS_SELECTION) && (phi_a2_2 == (arg0->unk0 - phi_a1))) { + if (temp_v0_12 >= CONFIRM_OK_SELECTION) { temp_a1_5 = arg0->unkC; temp_a2_8 = arg0->unk10; phi_v0_3 = func_80098C18(gDisplayListHead, temp_a1_5, temp_a2_8, temp_a1_5 + 0x3F, temp_a2_8 + 0x11, 0xFF, 0xF9, 0xDC, 0xFF); @@ -9168,7 +9168,7 @@ void func_800A0AD0(struct_8018D9E0_entry *unused) { struct_8018D9E0_entry *temp_t1; // Find struct_8018D9E0_entry with a type/id of 0xDA temp_t1 = func_800AAEF4(0xDA); - if ((gMenuState != 1) && (gMenuState != 2)) + if ((gControllerPakMenuSelection != CONTROLLER_PAK_MENU_SELECT_RECORD) && (gControllerPakMenuSelection != CONTROLLER_PAK_MENU_END)) { gDPSetPrimColor(gDisplayListHead++, 0, 0, 0xFF, temp_t1->unk20, 0x00, 0xFF); gDisplayListHead = func_8009BA74(gDisplayListHead, &D_02001874, 0x24, (gControllerPakSelectedTableRow * 0xA) + 0x7C); @@ -9283,7 +9283,7 @@ void *func_800AAEF4(?); // extern extern ? D_0200184C; extern ? D_800E7278; extern void *gDisplayListHead; -extern s8 gMenuState; +extern s8 gControllerPakMenuSelection; void func_800A0EB8(s32 arg0, s32 arg1) { s8 temp_v0; @@ -9294,15 +9294,15 @@ void func_800A0EB8(s32 arg0, s32 arg1) { temp_t3 = func_800AAEF4(0xDA); if (arg1 == 0) { - if (gMenuState == 2) { + if (gControllerPakMenuSelection == CONTROLLER_PAK_MENU_END) { phi_t1 = 1; } else { phi_t1 = 0; } goto block_7; } - temp_v0 = gMenuState; - if ((temp_v0 == 3) || (temp_v0 == 4)) { + temp_v0 = gControllerPakMenuSelection; + if ((temp_v0 == CONTROLLER_PAK_MENU_ERASE) || (temp_v0 == CONTROLLER_PAK_MENU_QUIT)) { phi_t1 = ((arg1 * 2) + temp_v0) - 3; block_7: temp_t0 = gDisplayListHead; @@ -11437,7 +11437,7 @@ void func_800A4EF8(void *arg0) { temp_t3 = temp_v0->unk2C / 2; temp_t4 = temp_v0->unk2E / 2; gDisplayListHead = draw_box(gDisplayListHead, temp_v1 - temp_t3, temp_t0 - temp_t4, temp_v1 + temp_t3, temp_t0 + temp_t4, 0, 0, 0, 0x8C); - temp_s3 = ((D_800DC530 << 5) + (D_800DC5FC * 8)) - 8 + &D_800E8540; + temp_s3 = ((gScreenModeSelection << 5) + (D_800DC5FC * 8)) - 8 + &D_800E8540; phi_a1 = 0; phi_s2 = 0; do { @@ -11498,7 +11498,7 @@ void func_800A5084(void *arg0) { temp_t3 = temp_v0->unk2C / 2; temp_t4 = temp_v0->unk2E / 2; gDisplayListHead = draw_box(gDisplayListHead, temp_v1 - temp_t3, temp_t0 - temp_t4, temp_v1 + temp_t3, temp_t0 + temp_t4, 0, 0, 0, 0x8C); - temp_s3 = ((D_800DC530 << 5) + (D_800DC5FC * 8)) - 8 + &D_800E85C0; + temp_s3 = ((gScreenModeSelection << 5) + (D_800DC5FC * 8)) - 8 + &D_800E85C0; temp_s0 = ((get_string_width(*(&D_800E7500 + (gCupSelection * 4))) * 1.0f) + 10.0f) / 2.0f; temp_s1 = ((get_string_width(*(&D_800E76CC + (gCCSelection * 4))) * 1.0f) + 10.0f) / 2.0f; set_text_color(TEXT_YELLOW); @@ -11553,7 +11553,7 @@ void func_800A5360(void *arg0) { temp_t3 = temp_v0->unk2C / 2; temp_t4 = temp_v0->unk2E / 2; gDisplayListHead = draw_box(gDisplayListHead, temp_v1 - temp_t3, temp_t0 - temp_t4, temp_v1 + temp_t3, temp_t0 + temp_t4, 0, 0, 0, 0x8C); - temp_s3 = ((D_800DC530 << 5) + (D_800DC5FC * 8)) - 8 + &D_800E8600; + temp_s3 = ((gScreenModeSelection << 5) + (D_800DC5FC * 8)) - 8 + &D_800E8600; phi_a1 = 0; phi_s2 = 0; do { @@ -11620,16 +11620,16 @@ void func_800A54EC(void) { if (temp_t2 != BATTLE) { phi_v1 = sp4C; } else { - phi_v1 = ((D_800DC530 << 5) + (D_800DC5FC * 8)) - 8 + &D_800E8600; + phi_v1 = ((gScreenModeSelection << 5) + (D_800DC5FC * 8)) - 8 + &D_800E8600; } } else { - phi_v1 = ((D_800DC530 << 5) + (D_800DC5FC * 8)) - 8 + &D_800E8540; + phi_v1 = ((gScreenModeSelection << 5) + (D_800DC5FC * 8)) - 8 + &D_800E8540; } } else { phi_v1 = &D_800E8538; } } else { - phi_v1 = ((D_800DC530 << 5) + (D_800DC5FC * 8)) - 8 + &D_800E85C0; + phi_v1 = ((gScreenModeSelection << 5) + (D_800DC5FC * 8)) - 8 + &D_800E85C0; } sp50 = phi_v1->unk0 - 8; sp52 = (phi_v1->unk2 + ((sp48->unk4 - *(&D_800F0B50 + temp_t2)) * 0xD)) - 8; @@ -13076,18 +13076,18 @@ block_7: break; case 0x10: /* switch 4 */ case 0x11: /* switch 4 */ - temp_t9 = D_8018EDED; - switch (temp_t9) { /* switch 5 */ - case 1: /* switch 5 */ - case 2: /* switch 5 */ - case 3: /* switch 5 */ + temp_t9 = gMainMenuSelectionDepth; + switch (temp_t9) { /* switch 5 */ + case OPTIONS_SELECTION: /* switch 5 */ + case DATA_SELECTION: /* switch 5 */ + case PLAYER_NUM_SELECTION: /* switch 5 */ func_800A9B9C(phi_s1); break; - case 4: /* switch 5 */ - case 5: /* switch 5 */ - case 6: /* switch 5 */ - case 7: /* switch 5 */ - case 8: /* switch 5 */ + case GAME_MODE_SELECTION: /* switch 5 */ + case GAME_MODE_CC_OR_TIME_TRIALS_OPTIONS_SELECTION: /* switch 5 */ + case CONFIRM_OK_SELECTION: /* switch 5 */ + case CONFIRM_OK_SELECTION_FROM_BACK_OUT: /* switch 5 */ + case TIME_TRAILS_DATA_SELECTION_FROM_BACK_OUT: /* switch 5 */ func_800A9C40(phi_s1); break; } @@ -13100,18 +13100,18 @@ block_7: case 0xC: /* switch 4 */ case 0xD: /* switch 4 */ case 0xE: /* switch 4 */ - temp_t1 = D_8018EDED; - switch (temp_t1) { /* switch 6 */ - case 1: /* switch 6 */ - case 2: /* switch 6 */ - case 3: /* switch 6 */ + temp_t1 = gMainMenuSelectionDepth; + switch (temp_t1) { /* switch 6 */ + case OPTIONS_SELECTION: /* switch 6 */ + case DATA_SELECTION: /* switch 6 */ + case PLAYER_NUM_SELECTION: /* switch 6 */ func_800A9B9C(phi_s1); break; - case 4: /* switch 6 */ - case 5: /* switch 6 */ - case 6: /* switch 6 */ - case 7: /* switch 6 */ - case 8: /* switch 6 */ + case GAME_MODE_SELECTION: /* switch 6 */ + case GAME_MODE_CC_OR_TIME_TRIALS_OPTIONS_SELECTION: /* switch 6 */ + case CONFIRM_OK_SELECTION: /* switch 6 */ + case CONFIRM_OK_SELECTION_FROM_BACK_OUT: /* switch 6 */ + case TIME_TRAILS_DATA_SELECTION_FROM_BACK_OUT: /* switch 6 */ func_800A9C40(phi_s1); break; } @@ -13230,7 +13230,7 @@ void *func_80098C18(void *, s32, s32, s32, s32, s32, s32, s32, s32); // extern void *func_80098FC8(void *, s32, s32, s32, s32); // extern extern ? D_800E86AC; extern ? D_800F2B60; -extern s8 D_8018EDED; +extern s8 gMainMenuSelectionDepth; extern void *gDisplayListHead; void func_800A8270(s32 arg0, void *arg1) { @@ -13278,10 +13278,10 @@ void func_800A8270(s32 arg0, void *arg1) { temp_s3 = temp_t1 + temp_t6; phi_s3 = temp_s3; if ((arg0 + 1) == D_8018EDF3) { - temp_v0_4 = D_8018EDED; + temp_v0_4 = gMainMenuSelectionDepth; temp_s3_2 = temp_t1 + temp_t6; phi_s3 = temp_s3_2; - if ((temp_v0_4 == 1) || (temp_v0_4 == 2) || (temp_v0_4 == 3)) { + if ((temp_v0_4 == OPTIONS_SELECTION) || (temp_v0_4 == DATA_SELECTION) || (temp_v0_4 == PLAYER_NUM_SELECTION)) { temp_s4_2 = (temp_t1 - temp_t6) + 0x3F; phi_v0 = func_800959A0(gDisplayListHead, temp_s3_2, temp_s0, temp_s4_2, temp_s0 + 0x35); phi_s4 = temp_s4_2; @@ -13303,7 +13303,7 @@ void func_800A8270(s32 arg0, void *arg1) { phi_s0 = temp_s0 + 0x41; if (*temp_s7 >= 0) { do { - if ((phi_s2 == *(arg0 + &D_800E86AC)) && ((arg0 + 1) == D_8018EDF3) && (temp_v0_5 = D_8018EDED, ((temp_v0_5 < 4) == 0))) { + if ((phi_s2 == *(arg0 + &D_800E86AC)) && ((arg0 + 1) == D_8018EDF3) && (temp_v0_5 = gMainMenuSelectionDepth, ((temp_v0_5 < GAME_MODE_SELECTION) == 0))) { if (temp_v0_5 == 4) { phi_v0_2 = func_800959A0(gDisplayListHead, phi_s3, phi_s0, phi_s4, phi_s0 + 0x11); } else { @@ -13333,7 +13333,7 @@ extern ? D_0200487C; extern ? D_02004B74; extern ? D_02004E80; extern s8 D_8018EDEC; -extern s8 D_8018EDED; +extern s8 gMainMenuSelectionDepth; extern s8 D_8018EDEE; extern s32 gDisplayListHead; @@ -13375,10 +13375,10 @@ void func_800A8564(void *arg0) { } goto block_12; } - temp_v0_3 = D_8018EDED; + temp_v0_3 = gMainMenuSelectionDepth; phi_a0 = &D_0200487C; phi_a0 = &D_0200487C; - if ((temp_v0_3 == 6) || (temp_v0_3 == 7)) { + if ((temp_v0_3 == CONFIRM_OK_SELECTION) || (temp_v0_3 == CONFIRM_OK_SELECTION_FROM_BACK_OUT)) { block_11: phi_a1 = 1; } @@ -13998,22 +13998,22 @@ void func_800A9710(void *arg0) { s8 temp_t6; s32 phi_v0; - switch (gMenuState) { - case 3: - case 4: + switch (gControllerPakMenuSelection) { + case CONTROLLER_PAK_MENU_ERASE: + case CONTROLLER_PAK_MENU_QUIT: phi_v0 = 1; break; - case 6: - case 7: + case CONTROLLER_PAK_MENU_GO_TO_ERASING: + case CONTROLLER_PAK_MENU_ERASING: phi_v0 = 5; break; - case 8: + case CONTROLLER_PAK_MENU_ERASE_ERROR_NOT_ERASED: phi_v0 = 2; break; - case 9: + case CONTROLLER_PAK_MENU_ERASE_ERROR_NO_PAK: phi_v0 = 3; break; - case 10: + case CONTROLLER_PAK_MENU_ERASE_ERROR_PAK_CHANGED: phi_v0 = 4; break; default: @@ -14185,7 +14185,7 @@ extern ? D_800F0C9C; extern ? D_800F0CA7; extern ? D_800F0CAB; extern s8 D_8018EDEC; -extern s8 D_8018EDED; +extern s8 gMainMenuSelectionDepth; extern s8 D_8018EDEE; void func_800A9A98(void *arg0) { @@ -14208,7 +14208,7 @@ void func_800A9A98(void *arg0) { phi_v0 = *(&D_800F0CA7 + D_8018EDEE); } } else { - phi_v0 = *(&D_800F0C9C + 3 + D_8018EDED); + phi_v0 = *(&D_800F0C9C + 3 + gMainMenuSelectionDepth); } if (phi_v0 != 0) { if (phi_v0 != 1) { @@ -14315,8 +14315,8 @@ void func_800A9C40(void *arg0) { arg0->unk4 = 1; case 1: func_800AA280(); - temp_v0 = D_8018EDED; - if ((temp_v0 == 7) || (temp_v0 == 8)) { + temp_v0 = gMainMenuSelectionDepth; + if ((temp_v0 == CONFIRM_OK_SELECTION_FROM_BACK_OUT) || (temp_v0 == TIME_TRAILS_DATA_SELECTION_FROM_BACK_OUT)) { arg0->unk1C = 0x20; return; } @@ -14359,8 +14359,8 @@ void func_800A9D5C(void *arg0) { temp_t1 = arg0->unk4; switch (temp_t1) { case 2: - temp_v0 = D_8018EDED; - if ((temp_v0 == 7) || (temp_v0 == 8)) { + temp_v0 = gMainMenuSelectionDepth; + if ((temp_v0 == CONFIRM_OK_SELECTION_FROM_BACK_OUT) || (temp_v0 == TIME_TRAILS_DATA_SELECTION_FROM_BACK_OUT)) { arg0->unkC = 0x80; arg0->unk10 = 0x3E; return; @@ -14451,7 +14451,7 @@ block_5: if (temp_v1 != 2) { return; } - temp_t9 = D_8018EDED; + temp_t9 = gMainMenuSelectionDepth; switch (temp_t9) { /* switch 4 */ if ((temp_a1 != sp20) && (temp_a1 != sp1C)) { arg0->unk15 = 0; @@ -14474,7 +14474,7 @@ block_5: goto block_37; } } else { - temp_t2 = D_8018EDED; + temp_t2 = gMainMenuSelectionDepth; switch (temp_t2) { /* switch 3 */ if ((temp_a1 != sp20) && (temp_a1 != sp1C)) { arg0->unk15 = 0; @@ -14511,11 +14511,11 @@ block_37: return; } arg0->unk20 = temp_a2; - temp_t5 = D_8018EDED; + temp_t5 = gMainMenuSelectionDepth; switch (temp_t5) { /* switch 2 */ - case 4: /* switch 2 */ - case 5: /* switch 2 */ - case 6: /* switch 2 */ + case GAME_MODE_SELECTION: /* switch 2 */ + case GAME_MODE_CC_OR_TIME_TRIALS_OPTIONS_SELECTION: /* switch 2 */ + case CONFIRM_OK_SELECTION: /* switch 2 */ arg0->unk15 = 1; temp_v0_4 = func_800AAE68(arg0, temp_a1, temp_a2); arg0->unkC = temp_v0_4->unkC; @@ -14523,8 +14523,8 @@ block_37: arg0->unk4 = 1; arg0->unk10 = (*(&D_800E86AB + D_8018EDF3) * 0x12) + temp_v0_4->unk10 + 0x41; return; - case 7: /* switch 2 */ - case 8: /* switch 2 */ + 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; @@ -14548,15 +14548,15 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A9E58.s") //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_800A91D8(s16, s16); // extern extern ? D_800E70A0; -extern s8 D_8018EDED; +extern s8 gMainMenuSelectionDepth; void func_800AA280(void *arg0) { s8 temp_v1; void *temp_v0; - temp_v1 = D_8018EDED; + temp_v1 = gMainMenuSelectionDepth; temp_v0 = (arg0->unk0 * 8) - 0x50 + &D_800E70A0; - if ((temp_v1 == 7) || (temp_v1 == 8)) { + if ((temp_v1 == CONFIRM_OK_SELECTION_FROM_BACK_OUT) || (temp_v1 == TIME_TRAILS_DATA_SELECTION_FROM_BACK_OUT)) { arg0->unkC = temp_v0->unk0; arg0->unk10 = temp_v0->unk2; return; @@ -14590,19 +14590,19 @@ void func_800AA2EC(void *arg0) { s8 temp_v0; s32 phi_t1; - temp_t6 = D_8018EDED; + temp_t6 = gMainMenuSelectionDepth; phi_t1 = 0; switch (temp_t6) { - case 1: - case 2: - case 3: - case 4: + case OPTIONS_SELECTION: + case DATA_SELECTION: + case PLAYER_NUM_SELECTION: + case GAME_MODE_SELECTION: arg0->unk4 = 0; return; - case 5: - case 6: - case 7: - case 8: + case GAME_MODE_CC_OR_TIME_TRIALS_OPTIONS_SELECTION: + 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 (D_800E86F8 != 0) { sp20 = 0; @@ -14960,7 +14960,7 @@ void func_800AAC18(void *arg0) { temp_v0 = func_800AAFCC(temp_a0, temp_a1, MIPS2C_ERROR(Read from unset register $a2), temp_a3); temp_a3_2 = arg0; if (temp_v0 >= 0) { - temp_t0 = (D_800DC530 << 5) + (temp_v0 * 8) + &D_800E7188; + temp_t0 = (gScreenModeSelection << 5) + (temp_v0 * 8) + &D_800E7188; temp_a3_2->unkC = temp_t0->unk0; temp_a3_2->unk4 = 2; temp_a3_2->unk8 = 2; @@ -14985,7 +14985,7 @@ void func_800AAC18(void *arg0) { temp_v0_3 = func_800AAFCC(temp_a1, temp_a1, 2, temp_a3); phi_a3 = arg0; if (temp_v0_3 >= 0) { - sp18 = (D_800DC530 << 5) + (temp_v0_3 * 8) + &D_800E7188; + sp18 = (gScreenModeSelection << 5) + (temp_v0_3 * 8) + &D_800E7188; } phi_v1 = arg0->unk4; phi_t0 = sp18; diff --git a/src/code_800AF9B0.c b/src/code_800AF9B0.c index 30426a6b7..7fa4fbea8 100644 --- a/src/code_800AF9B0.c +++ b/src/code_800AF9B0.c @@ -475,7 +475,7 @@ void func_800B0350(void) { do { if ((func_800B4520() == 0) && (gEnableDebugMode != 0) && ((gControllers[phi_s0].buttonPressed & 0x1000) != 0)) { temp_v0 = gMenuSelection; - if ((temp_v0 != GAME_SELECT_MENU) && (temp_v0 != PLAYER_SELECT_MENU)) { + if ((temp_v0 != MAIN_MENU) && (temp_v0 != PLAYER_SELECT_MENU)) { if (temp_v0 == COURSE_SELECT_MENU) { func_800CA330(0x19); goto block_9; @@ -512,8 +512,8 @@ block_9: case START_MENU: func_800B20F4(&gControllers[phi_s0], phi_s0 & 0xFFFF); break; - case GAME_SELECT_MENU_FROM_QUIT: - case GAME_SELECT_MENU: + case MAIN_MENU_FROM_QUIT: + case MAIN_MENU: func_800B29D8(&gControllers[phi_s0], phi_s0 & 0xFFFF); break; case PLAYER_SELECT_MENU_FROM_QUIT: @@ -1476,22 +1476,22 @@ void func_800B1C90(void *arg0, s32 arg1) { sp36 = arg0->unk6 | arg0->unkC; if (func_800B4520() == 0) { - temp_t9 = gMenuState; + temp_t9 = gControllerPakMenuSelection; switch (temp_t9) { - case 1: + case CONTROLLER_PAK_MENU_SELECT_RECORD: if ((sp36 & 0x9000) != 0) { - gMenuState = 5; + gControllerPakMenuSelection = CONTROLLER_PAK_MENU_TABLE_GAME_DATA; play_sound2(0x49008001); return; } if ((sp36 & 0x300) != 0) { - gMenuState = 2; + gControllerPakMenuSelection = CONTROLLER_PAK_MENU_END; play_sound2(0x49008000); return; } /* Duplicate return node #49. Try simplifying control flow for better match */ return; - case 2: + case CONTROLLER_PAK_MENU_END: if ((sp36 & 0x9000) != 0) { play_sound2(0x49008001); func_8009E1C0(); @@ -1499,16 +1499,16 @@ void func_800B1C90(void *arg0, s32 arg1) { return; } if ((sp36 & 0x300) != 0) { - gMenuState = 1; + gControllerPakMenuSelection = CONTROLLER_PAK_MENU_SELECT_RECORD; play_sound2(0x49008000); return; } /* Duplicate return node #49. Try simplifying control flow for better match */ return; - case 5: + case CONTROLLER_PAK_MENU_TABLE_GAME_DATA: if ((sp36 & 0x9000) != 0) { if (*(&D_8018EB38 + ((*(&D_800E86C6 + gControllerPakSelectedTableRow) - 1) * 4)) == 0) { - gMenuState = 4; + gControllerPakMenuSelection = CONTROLLER_PAK_MENU_QUIT; play_sound2(0x49008001); return; } @@ -1517,7 +1517,7 @@ void func_800B1C90(void *arg0, s32 arg1) { } if ((sp36 & 0x4000) != 0) { if (*D_800E86D0 == 0) { - gMenuState = 1; + gControllerPakMenuSelection = CONTROLLER_PAK_MENU_SELECT_RECORD; play_sound2(0x49008002); return; } @@ -1560,67 +1560,67 @@ void func_800B1C90(void *arg0, s32 arg1) { } /* Duplicate return node #49. Try simplifying control flow for better match */ return; - case 4: + case CONTROLLER_PAK_MENU_QUIT: if ((sp36 & 0xD000) != 0) { - gMenuState = 5; + gControllerPakMenuSelection = CONTROLLER_PAK_MENU_TABLE_GAME_DATA; play_sound2(0x49008002); return; } if ((sp36 & 0x300) != 0) { - gMenuState = 3; + gControllerPakMenuSelection = CONTROLLER_PAK_MENU_ERASE; play_sound2(0x49008000); return; } /* Duplicate return node #49. Try simplifying control flow for better match */ return; - case 3: + case CONTROLLER_PAK_MENU_ERASE: if ((sp36 & 0x9000) != 0) { - gMenuState = 6; + gControllerPakMenuSelection = CONTROLLER_PAK_MENU_GO_TO_ERASING; play_sound2(0x49008001); return; } if ((sp36 & 0x4000) != 0) { - gMenuState = 5; + gControllerPakMenuSelection = CONTROLLER_PAK_MENU_TABLE_GAME_DATA; play_sound2(0x49008002); return; } if ((sp36 & 0x300) != 0) { - gMenuState = 4; + gControllerPakMenuSelection = CONTROLLER_PAK_MENU_QUIT; play_sound2(0x49008000); return; } /* Duplicate return node #49. Try simplifying control flow for better match */ return; - case 6: - gMenuState = 7; + case CONTROLLER_PAK_MENU_GO_TO_ERASING: + gControllerPakMenuSelection = CONTROLLER_PAK_MENU_ERASING; return; - case 7: + case CONTROLLER_PAK_MENU_ERASING: temp_t0 = *(&D_800E86C6 + gControllerPakSelectedTableRow) - 1; temp_v1 = (temp_t0 << 5) + &D_8018E938; sp20 = temp_v1; sp2C = temp_t0; temp_v0 = osPfsDeleteFile(&D_8018E868, temp_v1->unk8, temp_v1->unk4, temp_v1 + 0xE, temp_v1 + 0xA); if (temp_v0 != 0) { - if (temp_v0 != 1) { - if (temp_v0 != 2) { - gMenuState = 8; + if (temp_v0 != PFS_ERR_NOPACK) { + if (temp_v0 != PFS_ERR_NEW_PACK) { + gControllerPakMenuSelection = CONTROLLER_PAK_MENU_ERASE_ERROR_NOT_ERASED; return; } - gMenuState = 0xA; + gControllerPakMenuSelection = CONTROLLER_PAK_MENU_ERASE_ERROR_PAK_CHANGED; return; } - gMenuState = 9; + gControllerPakMenuSelection = CONTROLLER_PAK_MENU_ERASE_ERROR_NO_PAK; return; } *(&D_8018EB38 + (temp_t0 * 4)) = -1; gControllerPakNumPagesFree = gControllerPakNumPagesFree + (((temp_v1->unk0 + 0xFF) >> 8) & 0xFF); - gMenuState = 5; + gControllerPakMenuSelection = CONTROLLER_PAK_MENU_TABLE_GAME_DATA; return; - case 8: - case 9: - case 10: + case CONTROLLER_PAK_MENU_ERASE_ERROR_NOT_ERASED: + case CONTROLLER_PAK_MENU_ERASE_ERROR_NO_PAK: + case CONTROLLER_PAK_MENU_ERASE_ERROR_PAK_CHANGED: if ((sp36 & 0x9000) != 0) { - gMenuState = 5; + gControllerPakMenuSelection = CONTROLLER_PAK_MENU_TABLE_GAME_DATA; } /* Duplicate return node #49. Try simplifying control flow for better match */ return; @@ -1741,7 +1741,7 @@ void func_800B20F4(void *arg0, s32 arg1) { D_8018EDF1 = temp_v0_3 + 1; sp24 = sp2E; play_sound2(0x49008000); - D_800DC530 = *(&D_800F2B50 + D_8018EDF1); + gScreenModeSelection = *(&D_800F2B50 + D_8018EDF1); } } if ((sp2E & 0x200) != 0) { @@ -1750,7 +1750,7 @@ void func_800B20F4(void *arg0, s32 arg1) { D_8018EDF1 = temp_v0_4 - 1; sp24 = sp2E; play_sound2(0x49008000); - D_800DC530 = *(&D_800F2B50 + D_8018EDF1); + gScreenModeSelection = *(&D_800F2B50 + D_8018EDF1); } } if ((sp2E & 0x800) != 0) { @@ -2064,13 +2064,13 @@ void func_800B29D8(void *arg0, u16 arg1) { sp2E = phi_v1; arg1 &= 0xFFFF; if (func_800B4520(arg0) == 0) { - temp_t4 = D_8018EDED; + temp_t4 = gMainMenuSelectionDepth; switch (temp_t4) { - case 0: + case BLANK_MAIN_MENU: temp_t5 = D_8018EDF3; phi_v1_3 = &D_800F2B70 + ((temp_t5 * 0xC) + (*(&D_800E86AB + temp_t5) * 4)); break; - case 3: + case PLAYER_NUM_SELECTION: phi_a2 = phi_v1; if ((phi_v1 & 0x100) != 0) { temp_v0 = D_8018EDF3; @@ -2084,14 +2084,14 @@ void func_800B29D8(void *arg0, u16 arg1) { } temp_v0_2 = D_8018EDF3; phi_v0 = temp_v0_2; - phi_t0 = &D_8018EDED; + phi_t0 = &gMainMenuSelectionDepth; if (((phi_a2 & 0x200) != 0) && (temp_v0_2 >= 2)) { D_8018EDF3 = temp_v0_2 - 1; sp1C = phi_a2; func_800B44AC(); play_sound2(0x49008000); phi_v0 = D_8018EDF3; - phi_t0 = &D_8018EDED; + phi_t0 = &gMainMenuSelectionDepth; } gPlayerCountSelection1 = phi_v0; phi_a0 = &gPlayerCountSelection1; @@ -2101,13 +2101,13 @@ void func_800B29D8(void *arg0, u16 arg1) { if ((phi_v0 != 3) && (phi_v0 != 4)) { } else { - D_800DC530 = 3; + gScreenModeSelection = SCREEN_MODE_3P_4P_SPLITSCREEN; } } else { - D_800DC530 = 1; + gScreenModeSelection = SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL; } } else { - D_800DC530 = 0; + gScreenModeSelection = SCREEN_MODE_1P; } if ((phi_a2 & 0x4000) != 0) { func_8009E0F0(0x14); @@ -2117,19 +2117,19 @@ void func_800B29D8(void *arg0, u16 arg1) { temp_t7 = D_8018EDF3; phi_v1_3 = &D_800F2B70 + ((temp_t7 * 0xC) + (*(&D_800E86AB + temp_t7) * 4)); } else if ((phi_a2 & 0x8000) != 0) { - *phi_t0 = 4; + *phi_t0 = GAME_MODE_SELECTION; func_800B44AC(phi_a0); play_sound2(0x49008001); temp_t4_2 = D_8018EDF3; phi_v1_3 = &D_800F2B70 + ((temp_t4_2 * 0xC) + (*(&D_800E86AB + temp_t4_2) * 4)); } else if ((phi_a2 & 0x20) != 0) { - *phi_t0 = 1; + *phi_t0 = OPTIONS_SELECTION; func_8009E280(phi_a0); play_sound2(0x49009010); temp_t1 = D_8018EDF3; phi_v1_3 = &D_800F2B70 + ((temp_t1 * 0xC) + (*(&D_800E86AB + temp_t1) * 4)); } else if ((phi_a2 & 0x10) != 0) { - *phi_t0 = 2; + *phi_t0 = DATA_SELECTION; func_8009E258(phi_a0); play_sound2(0x49009011); temp_t6 = D_8018EDF3; @@ -2138,7 +2138,7 @@ void func_800B29D8(void *arg0, u16 arg1) { phi_v1_3 = &D_800F2B70 + ((phi_v0 * 0xC) + (*(&D_800E86AB + phi_v0) * 4)); } break; - case 4: + case GAME_MODE_SELECTION: if ((phi_v1 & 0x400) != 0) { temp_v0_3 = D_8018EDF3; temp_v1 = temp_v0_3 + &D_800E86AC; @@ -2150,7 +2150,7 @@ void func_800B29D8(void *arg0, u16 arg1) { play_sound2(0x49008000); } } - phi_t0_2 = &D_8018EDED; + phi_t0_2 = &gMainMenuSelectionDepth; if ((phi_v1 & 0x800) != 0) { temp_v1_2 = D_8018EDF3 + &D_800E86AC; temp_a0_2 = temp_v1_2->unk-1; @@ -2159,11 +2159,11 @@ void func_800B29D8(void *arg0, u16 arg1) { sp1C = phi_v1; func_800B44AC(temp_a0_2); play_sound2(0x49008000); - phi_t0_2 = &D_8018EDED; + phi_t0_2 = &gMainMenuSelectionDepth; } } if ((phi_v1 & 0x4000) != 0) { - *phi_t0_2 = 3; + *phi_t0_2 = PLAYER_NUM_SELECTION; func_800B44AC(3); play_sound2(0x49008002); temp_t6_2 = D_8018EDF3; @@ -2177,21 +2177,21 @@ void func_800B29D8(void *arg0, u16 arg1) { if (temp_v1_3 != 1) { if (temp_v1_3 != 2) { if (temp_v1_3 != 3) { - *phi_t0_2 = 6; + *phi_t0_2 = CONFIRM_OK_SELECTION; } else { - *phi_t0_2 = 6; + *phi_t0_2 = CONFIRM_OK_SELECTION; play_sound2(0x4900900D); } } else { - *phi_t0_2 = 5; + *phi_t0_2 = GAME_MODE_CC_OR_TIME_TRIALS_OPTIONS_SELECTION; play_sound2(0x4900900C); } } else { - *phi_t0_2 = 5; + *phi_t0_2 = GAME_MODE_CC_OR_TIME_TRIALS_OPTIONS_SELECTION; play_sound2(0x4900900B); } } else { - *phi_t0_2 = 5; + *phi_t0_2 = GAME_MODE_CC_OR_TIME_TRIALS_OPTIONS_SELECTION; play_sound2(0x4900900A); } func_800B44AC(); @@ -2203,8 +2203,8 @@ void func_800B29D8(void *arg0, u16 arg1) { } } break; - case 5: - case 8: + case GAME_MODE_CC_OR_TIME_TRIALS_OPTIONS_SELECTION: + case TIME_TRAILS_DATA_SELECTION_FROM_BACK_OUT: if ((arg1 == 0) && ((temp_t7_3 = gMenuTimingCounter + 1, gMenuTimingCounter = temp_t7_3, (temp_t7_3 == 0x64)) || ((temp_t7_3 % 300) == 0)) && ((temp_v0_5 = D_8018EDF3, temp_v1_4 = *(&D_800F2B70 + ((temp_v0_5 * 0xC) + (*(&D_800E86AB + temp_v0_5) * 4))), (temp_v1_4 == 0)) || (temp_v1_4 == 2))) { sp1C = phi_v1; play_sound2(0x4900900E, arg1, phi_v1); @@ -2260,7 +2260,7 @@ block_64: temp_a0_7 = *(&D_800E86AB + temp_v0_9); temp_a1 = *(&D_800E86AD + ((temp_v0_9 * 3) + temp_a0_7)); if ((phi_v1 & 0x4000) != 0) { - D_8018EDED = 4; + gMainMenuSelectionDepth = GAME_MODE_SELECTION; func_800B44AC(temp_a0_7, temp_a1, phi_v1); play_sound2(0x49008002); temp_t5_2 = D_8018EDF3; @@ -2273,7 +2273,7 @@ block_64: func_8009E258(); play_sound2(0x49009011); } else { - D_8018EDED = 6; + gMainMenuSelectionDepth = CONFIRM_OK_SELECTION; play_sound2(0x49008001, temp_a1); gMenuTimingCounter = 0; } @@ -2283,8 +2283,8 @@ block_64: phi_v1_3 = &D_800F2B70 + ((temp_v0_9 * 0xC) + (temp_a0_7 * 4)); } break; - case 6: - case 7: + case CONFIRM_OK_SELECTION: + case CONFIRM_OK_SELECTION_FROM_BACK_OUT: if ((arg1 == 0) && ((temp_t7_5 = gMenuTimingCounter + 1, gMenuTimingCounter = temp_t7_5, (temp_t7_5 == 0x3C)) || ((temp_t7_5 % 300) == 0))) { sp1C = phi_v1; play_sound2(0x4900900F, arg1, phi_v1); @@ -2296,9 +2296,9 @@ block_64: if (temp_v1_7 != 3) { } - D_8018EDED = 4; + gMainMenuSelectionDepth = GAME_MODE_SELECTION; } else { - D_8018EDED = 5; + gMainMenuSelectionDepth = GAME_MODE_CC_OR_TIME_TRIALS_OPTIONS_SELECTION; } func_800B44AC(); play_sound2(0x49008002); @@ -2316,8 +2316,8 @@ block_64: phi_v1_3 = &D_800F2B70 + ((temp_t4_3 * 0xC) + (*(&D_800E86AB + temp_t4_3) * 4)); } break; - case 1: - case 2: + case OPTIONS_SELECTION: + case DATA_SELECTION: temp_t2 = D_8018EDF3; phi_v1_3 = &D_800F2B70 + ((temp_t2 * 0xC) + (*(&D_800E86AB + temp_t2) * 4)); break; @@ -2483,7 +2483,7 @@ void func_800B3B58(struct Controller *arg0, u16 arg1) { ? play_sound2(?, s8 *, s8 *, s8); /* extern */ extern s32 D_800DC50C; extern s32 D_800DC524; -extern s32 D_800DC530; +extern s32 gScreenModeSelection; extern s32 D_800DC540; extern s16 D_8015F890; extern s16 D_8015F892; @@ -2499,7 +2499,7 @@ extern s8 D_8018EDE9; extern s8 D_8018EDEA; extern s8 D_8018EDEB; extern s8 D_8018EDEC; -extern s8 D_8018EDED; +extern s8 gMainMenuSelectionDepth; extern s8 D_8018EDEE; extern s8 gDebugMenuSelection; extern s8 D_8018EDF1; @@ -2564,7 +2564,7 @@ void func_800B3F74(u32 arg0) { func_800CA008(0, 0); break; case CONTROLLER_PAK_MENU: - gMenuState = 1; + gControllerPakMenuSelection = CONTROLLER_PAK_MENU_SELECT_RECORD; func_800CA008(0, 0); break; case START_MENU_FROM_QUIT: @@ -2587,8 +2587,8 @@ void func_800B3F74(u32 arg0) { func_800C8EAC(1); D_8018EDFC = 0; break; - case GAME_SELECT_MENU_FROM_QUIT: - case GAME_SELECT_MENU: + case MAIN_MENU_FROM_QUIT: + case MAIN_MENU: gEnableDebugMode = 0; gIsMirrorMode = 0; D_8018EDFC = 0; @@ -2608,26 +2608,26 @@ void func_800B3F74(u32 arg0) { if (temp_v0 != 4) { } else { - D_8018EDED = 3; + gMainMenuSelectionDepth = PLAYER_NUM_SELECTION; } } else { - temp_v0_2 = D_8018EDED; - if ((temp_v0_2 != 1) && (temp_v0_2 != 2)) { - D_8018EDED = 8; + temp_v0_2 = gMainMenuSelectionDepth; + if ((temp_v0_2 != OPTIONS_SELECTION) && (temp_v0_2 != DATA_SELECTION)) { + gMainMenuSelectionDepth = TIME_TRAILS_DATA_SELECTION_FROM_BACK_OUT; } else { - D_8018EDED = 3; + gMainMenuSelectionDepth = PLAYER_NUM_SELECTION; } } } else { - D_8018EDED = 7; + gMainMenuSelectionDepth = CONFIRM_OK_SELECTION_FROM_BACK_OUT; } } else { - D_8018EDED = 3; - func_800C8EAC(2, &D_8018EDED, 3); - temp_v0_3 = D_800DC530; + gMainMenuSelectionDepth = PLAYER_NUM_SELECTION; + func_800C8EAC(2, &gMainMenuSelectionDepth, 3); + temp_v0_3 = gScreenModeSelection; D_8018EDF3 = 1; - if ((temp_v0_3 >= 4) || (temp_v0_3 < 0)) { - D_800DC530 = 0; + if ((temp_v0_3 >= NUM_SCREEN_MODES) || (temp_v0_3 < SCREEN_MODE_1P)) { + gScreenModeSelection = SCREEN_MODE_1P; } } break; diff --git a/src/code_80280000.c b/src/code_80280000.c index 9a31c8b40..5ab7f74f3 100644 --- a/src/code_80280000.c +++ b/src/code_80280000.c @@ -129,7 +129,7 @@ void func_80280420(void) { D_800DC5EC->screenHeight = 240; D_800DC5EC->screenStartX = 160; D_800DC5EC->screenStartY = 120; - D_800DC530 = 0; + gScreenModeSelection = SCREEN_MODE_1P; D_800DC52C = 0; gPrevLoadedAddress = D_8015F734; load_course(gCurrentCourseId); diff --git a/src/code_80281780.c b/src/code_80281780.c index 575856256..25e031bd9 100644 --- a/src/code_80281780.c +++ b/src/code_80281780.c @@ -89,7 +89,7 @@ void load_ending_sequence_royalraceway(void) { D_800DC5EC->screenHeight = 240; D_800DC5EC->screenStartX = 160; D_800DC5EC->screenStartY = 120; - D_800DC530 = 0; + gScreenModeSelection = SCREEN_MODE_1P; gPrevLoadedAddress = (s32) D_8015F734; D_800DC52C = 0; gModeSelection = GRAND_PRIX; diff --git a/src/code_80281780.h b/src/code_80281780.h index 04a51037c..24c52d729 100644 --- a/src/code_80281780.h +++ b/src/code_80281780.h @@ -23,7 +23,7 @@ extern s16 gCurrentCourseId; extern u16 D_800DC5B4; extern s32 gIsMirrorMode; -extern s32 D_800DC530; +extern s32 gScreenModeSelection; extern s32 D_800DC52C; extern s32 gModeSelection; extern u16 D_800DC5BC; diff --git a/src/code_8028DF00.c b/src/code_8028DF00.c index 4907aef9b..fa77a4bfb 100644 --- a/src/code_8028DF00.c +++ b/src/code_8028DF00.c @@ -65,7 +65,7 @@ extern u16 D_800DC518; extern u16 D_8015011E; extern float gCourseTimer; extern float D_800DC594; -extern s32 D_800DC530; +extern s32 gScreenModeSelection; extern s32 D_8018D2AC; extern s32 D_800DC52C; extern s16 gCurrentCourseId; @@ -336,14 +336,14 @@ void func_8028E678(void) { break; } D_800DC5B8 = 0; - switch(D_800DC530) { - case 0: + switch(gScreenModeSelection) { + case SCREEN_MODE_1P: D_8015F894 = 1; break; - case 1: + case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL: D_8015F894 = 5; break; - case 2: + case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL: D_8015F894 = 6; break; } @@ -505,7 +505,7 @@ void func_8028EC38(s32 arg0) { void func_8028EC98(s32 arg0) { - if (D_800DC530 == 3) { + if (gScreenModeSelection == SCREEN_MODE_3P_4P_SPLITSCREEN) { return; } @@ -1079,7 +1079,7 @@ void func_8028FCBC(void) { D_800DC5B4 = 1; D_802BA034 = 0.008f; D_8015F894 = 0; - if (D_800DC530 != 0) { + if (gScreenModeSelection != SCREEN_MODE_1P) { func_8005C64C(&D_8018D2AC); } for (i = 0; i < 8; i++) { @@ -1149,14 +1149,14 @@ void func_8028FCBC(void) { func_8028EF28(); func_8028F970(); - switch(D_800DC530) { - case 0: + switch(gScreenModeSelection) { + case SCREEN_MODE_1P: D_802BA038 = 690; D_800DC510 = 5; func_8028E298(); break; - case 1: - case 2: + case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL: + case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL: if (((D_800DC4DC->unk_000 & PLAYER_CINEMATIC_MODE) != 0) && ((D_800DC4E0->unk_000 & PLAYER_CINEMATIC_MODE) != 0)) { if (D_800DC4DC->unk_004 < D_800DC4E0->unk_004) { @@ -1196,7 +1196,7 @@ void func_8028FCBC(void) { case GRAND_PRIX: if (D_80150120 != 0) { func_8028E678(); - } else if (D_800DC530 == 0) { + } else if (gScreenModeSelection == SCREEN_MODE_1P) { func_80092564(); D_800DC510 = 7; } else { @@ -1235,7 +1235,7 @@ UNUSED void func_80290314(void) { void func_80290338(void) { gIsInQuitToMenuTransition = 1; gQuitToMenuTransitionCounter = 5; - gMenuSelectionFromQuit = GAME_SELECT_MENU_FROM_QUIT; + gMenuSelectionFromQuit = MAIN_MENU_FROM_QUIT; } void func_80290360(void) { diff --git a/src/code_80290C20.c b/src/code_80290C20.c index 600d84591..0560464f3 100644 --- a/src/code_80290C20.c +++ b/src/code_80290C20.c @@ -210,10 +210,10 @@ void func_80291198(void) { gSPDisplayList(gDisplayListHead++, 0x07001140); } -extern s32 D_800DC530; +extern s32 gScreenModeSelection; void func_802911C4(void) { - if (D_800DC530 == 0) { + if (gScreenModeSelection == SCREEN_MODE_1P) { gSPDisplayList(gDisplayListHead++, 0x070008E8); } else { gSPDisplayList(gDisplayListHead++, 0x07002D68); @@ -2306,7 +2306,7 @@ void func_80295D88(void) { switch (temp_t7) { case 0: func_802AF588(0x7001140); - if (D_800DC530 == 0) { + if (gScreenModeSelection == SCREEN_MODE_1P) { func_802AF588(0x70008E8); } else { func_802AF588(0x7002D68); diff --git a/src/code_802A3730.c b/src/code_802A3730.c index 8417fb14c..70c4c3e3d 100644 --- a/src/code_802A3730.c +++ b/src/code_802A3730.c @@ -154,8 +154,8 @@ void func_802A38B4(void) { gMenuSelection = START_MENU; } break; - case GAME_SELECT_MENU_FROM_QUIT: - gMenuSelection = GAME_SELECT_MENU; + case MAIN_MENU_FROM_QUIT: + gMenuSelection = MAIN_MENU; break; case PLAYER_SELECT_MENU_FROM_QUIT: gMenuSelection = PLAYER_SELECT_MENU; @@ -677,7 +677,7 @@ void func_802A4A0C(Vtx *arg0, void *arg1, ? arg2, ? arg3) { */ #ifdef MIPS_TO_C -extern s32 D_800DC530; +extern s32 gScreenModeSelection; void func_802A4D18(void) { f32 phi_f10; @@ -734,7 +734,7 @@ void func_802A4D18(void) { } } - switch(D_800DC530) { + switch(gScreenModeSelection) { case 0: D_80150148 = 1.3333333730697632f; // D_802B9C1C break; diff --git a/src/main.c b/src/main.c index 01daa034f..006f9760b 100644 --- a/src/main.c +++ b/src/main.c @@ -172,7 +172,7 @@ s32 D_800DC524 = 7; // = COURSE_DATA_MENU?; UNUSED s32 D_800DC528 = 1; s32 D_800DC52C = 0; -s32 D_800DC530[2] = {0}; +s32 gScreenModeSelection[2] = {0}; s32 gPlayerCountSelection1 = 2; s32 gModeSelection = GRAND_PRIX;