From 44ac0117cf33b87f66c51bb991719f01fc0e96a7 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Wed, 12 May 2021 17:36:30 +1000 Subject: [PATCH] Decompile endscreenPrepare --- src/game/endscreen.c | 778 +++++++++-------------------------------- src/game/game_102240.c | 2 +- src/game/game_110680.c | 7 +- src/include/bss.h | 2 +- 4 files changed, 170 insertions(+), 619 deletions(-) diff --git a/src/game/endscreen.c b/src/game/endscreen.c index 6d1897563..1f81f946e 100644 --- a/src/game/endscreen.c +++ b/src/game/endscreen.c @@ -1210,456 +1210,169 @@ struct menudialog g_SoloMissionEndscreenFailedMenuDialog = { }; #if VERSION >= VERSION_NTSC_1_0 -GLOBAL_ASM( -glabel endscreenPrepare -/* f10e620: 3c0e8007 */ lui $t6,%hi(g_MpPlayerNum) -/* f10e624: 8dce1448 */ lw $t6,%lo(g_MpPlayerNum)($t6) -/* f10e628: 3c07800a */ lui $a3,%hi(g_MissionConfig) -/* f10e62c: 24e7dfe8 */ addiu $a3,$a3,%lo(g_MissionConfig) -/* f10e630: 000e78c0 */ sll $t7,$t6,0x3 -/* f10e634: 01ee7823 */ subu $t7,$t7,$t6 -/* f10e638: 000f7880 */ sll $t7,$t7,0x2 -/* f10e63c: 01ee7821 */ addu $t7,$t7,$t6 -/* f10e640: 000f78c0 */ sll $t7,$t7,0x3 -/* f10e644: 90e60002 */ lbu $a2,0x2($a3) -/* f10e648: 3c18800a */ lui $t8,%hi(g_Menus) -/* f10e64c: 01ee7823 */ subu $t7,$t7,$t6 -/* f10e650: 000f7900 */ sll $t7,$t7,0x4 -/* f10e654: 2718e000 */ addiu $t8,$t8,%lo(g_Menus) -/* f10e658: 01f84021 */ addu $t0,$t7,$t8 -/* f10e65c: 3c03800a */ lui $v1,%hi(g_MenuData+0x4) -/* f10e660: ad060e2c */ sw $a2,0xe2c($t0) -/* f10e664: 8c6319c4 */ lw $v1,%lo(g_MenuData+0x4)($v1) -/* f10e668: 27bdffc8 */ addiu $sp,$sp,-56 -/* f10e66c: 24010001 */ addiu $at,$zero,0x1 -/* f10e670: 10610183 */ beq $v1,$at,.L0f10ec80 -/* f10e674: afbf0014 */ sw $ra,0x14($sp) -/* f10e678: 3c19800a */ lui $t9,%hi(g_Vars+0x314) -/* f10e67c: 8f39a2d4 */ lw $t9,%lo(g_Vars+0x314)($t9) -/* f10e680: 57200180 */ bnezl $t9,.L0f10ec84 -/* f10e684: 24010001 */ addiu $at,$zero,0x1 -/* f10e688: 80ea0003 */ lb $t2,0x3($a3) -/* f10e68c: ad000e20 */ sw $zero,0xe20($t0) -/* f10e690: ad000e24 */ sw $zero,0xe24($t0) -/* f10e694: 05400033 */ bltz $t2,.L0f10e764 -/* f10e698: a100083b */ sb $zero,0x83b($t0) -/* f10e69c: 8ce20000 */ lw $v0,0x0($a3) -/* f10e6a0: 00026640 */ sll $t4,$v0,0x19 -/* f10e6a4: 0580002f */ bltz $t4,.L0f10e764 -/* f10e6a8: 00000000 */ nop -/* f10e6ac: 90ed0000 */ lbu $t5,0x0($a3) -/* f10e6b0: 00c02025 */ or $a0,$a2,$zero -/* f10e6b4: 31ae0001 */ andi $t6,$t5,0x1 -/* f10e6b8: 15c0002a */ bnez $t6,.L0f10e764 -/* f10e6bc: 00000000 */ nop -/* f10e6c0: 0fc41fae */ jal cheatGetByTimedStageIndex -/* f10e6c4: 00022e42 */ srl $a1,$v0,0x19 -/* f10e6c8: 3c04800a */ lui $a0,%hi(g_MissionConfig+0x2) -/* f10e6cc: 9084dfea */ lbu $a0,%lo(g_MissionConfig+0x2)($a0) -/* f10e6d0: 0fc41fc6 */ jal cheatGetByCompletedStageIndex -/* f10e6d4: afa20034 */ sw $v0,0x34($sp) -/* f10e6d8: 8fa30034 */ lw $v1,0x34($sp) -/* f10e6dc: 3c188007 */ lui $t8,%hi(g_MpPlayerNum) -/* f10e6e0: 3c098007 */ lui $t1,%hi(g_MpPlayerNum) -/* f10e6e4: 0460000d */ bltz $v1,.L0f10e71c -/* f10e6e8: 00000000 */ nop -/* f10e6ec: 8f181448 */ lw $t8,%lo(g_MpPlayerNum)($t8) -/* f10e6f0: 3c01800a */ lui $at,%hi(g_Menus+0xe20) -/* f10e6f4: 346f0100 */ ori $t7,$v1,0x100 -/* f10e6f8: 0018c8c0 */ sll $t9,$t8,0x3 -/* f10e6fc: 0338c823 */ subu $t9,$t9,$t8 -/* f10e700: 0019c880 */ sll $t9,$t9,0x2 -/* f10e704: 0338c821 */ addu $t9,$t9,$t8 -/* f10e708: 0019c8c0 */ sll $t9,$t9,0x3 -/* f10e70c: 0338c823 */ subu $t9,$t9,$t8 -/* f10e710: 0019c900 */ sll $t9,$t9,0x4 -/* f10e714: 00390821 */ addu $at,$at,$t9 -/* f10e718: ac2fee20 */ sw $t7,%lo(g_Menus+0xe20)($at) -.L0f10e71c: -/* f10e71c: 04400011 */ bltz $v0,.L0f10e764 -/* f10e720: 00000000 */ nop -/* f10e724: 8d291448 */ lw $t1,%lo(g_MpPlayerNum)($t1) -/* f10e728: 3c0b800a */ lui $t3,%hi(g_Menus) -/* f10e72c: 256be000 */ addiu $t3,$t3,%lo(g_Menus) -/* f10e730: 000950c0 */ sll $t2,$t1,0x3 -/* f10e734: 01495023 */ subu $t2,$t2,$t1 -/* f10e738: 000a5080 */ sll $t2,$t2,0x2 -/* f10e73c: 01495021 */ addu $t2,$t2,$t1 -/* f10e740: 000a50c0 */ sll $t2,$t2,0x3 -/* f10e744: 01495023 */ subu $t2,$t2,$t1 -/* f10e748: 000a5100 */ sll $t2,$t2,0x4 -/* f10e74c: 014b4021 */ addu $t0,$t2,$t3 -/* f10e750: 8d0c0e20 */ lw $t4,0xe20($t0) -/* f10e754: 00026c00 */ sll $t5,$v0,0x10 -/* f10e758: 35ae1000 */ ori $t6,$t5,0x1000 -/* f10e75c: 018ec025 */ or $t8,$t4,$t6 -/* f10e760: ad180e20 */ sw $t8,0xe20($t0) -.L0f10e764: -/* f10e764: 3c02800a */ lui $v0,%hi(g_Vars+0x284) -/* f10e768: 8c42a244 */ lw $v0,%lo(g_Vars+0x284)($v0) -/* f10e76c: 8c4f00d8 */ lw $t7,0xd8($v0) -/* f10e770: 15e00008 */ bnez $t7,.L0f10e794 -/* f10e774: 00000000 */ nop -/* f10e778: 8c59048c */ lw $t9,0x48c($v0) -/* f10e77c: 17200005 */ bnez $t9,.L0f10e794 -/* f10e780: 00000000 */ nop -/* f10e784: 0fc256d9 */ jal objectiveIsAllComplete -/* f10e788: 00000000 */ nop -/* f10e78c: 1440000a */ bnez $v0,.L0f10e7b8 -/* f10e790: 3c048007 */ lui $a0,%hi(g_SoloMissionEndscreenCompletedMenuDialog) -.L0f10e794: -/* f10e794: 3c048007 */ lui $a0,%hi(g_SoloMissionEndscreenFailedMenuDialog) -/* f10e798: 24845b3c */ addiu $a0,$a0,%lo(g_SoloMissionEndscreenFailedMenuDialog) -/* f10e79c: 0fc3e0cc */ jal menuPushRootDialog -/* f10e7a0: 24050001 */ addiu $a1,$zero,0x1 -/* f10e7a4: 3c02800a */ lui $v0,%hi(g_MissionConfig+0x3) -/* f10e7a8: 9042dfeb */ lbu $v0,%lo(g_MissionConfig+0x3)($v0) -/* f10e7ac: 000249c2 */ srl $t1,$v0,0x7 -/* f10e7b0: 1000000f */ b .L0f10e7f0 -/* f10e7b4: 01201025 */ or $v0,$t1,$zero -.L0f10e7b8: -/* f10e7b8: 24845b24 */ addiu $a0,$a0,%lo(g_SoloMissionEndscreenCompletedMenuDialog) -/* f10e7bc: 0fc3e0cc */ jal menuPushRootDialog -/* f10e7c0: 24050001 */ addiu $a1,$zero,0x1 -/* f10e7c4: 3c02800a */ lui $v0,%hi(g_MissionConfig+0x3) -/* f10e7c8: 9042dfeb */ lbu $v0,%lo(g_MissionConfig+0x3)($v0) -/* f10e7cc: 000251c2 */ srl $t2,$v0,0x7 -/* f10e7d0: 11400007 */ beqz $t2,.L0f10e7f0 -/* f10e7d4: 01401025 */ or $v0,$t2,$zero -/* f10e7d8: 0fc43962 */ jal endscreenSetCoopCompleted -/* f10e7dc: 00000000 */ nop -/* f10e7e0: 3c02800a */ lui $v0,%hi(g_MissionConfig+0x3) -/* f10e7e4: 9042dfeb */ lbu $v0,%lo(g_MissionConfig+0x3)($v0) -/* f10e7e8: 000259c2 */ srl $t3,$v0,0x7 -/* f10e7ec: 01601025 */ or $v0,$t3,$zero -.L0f10e7f0: -/* f10e7f0: 1440011c */ bnez $v0,.L0f10ec64 -/* f10e7f4: 3c0d800a */ lui $t5,%hi(g_MissionConfig) -/* f10e7f8: 8daddfe8 */ lw $t5,%lo(g_MissionConfig)($t5) -/* f10e7fc: 3c188007 */ lui $t8,%hi(g_MpPlayerNum) -/* f10e800: 000d7640 */ sll $t6,$t5,0x19 -/* f10e804: 05c00117 */ bltz $t6,.L0f10ec64 -/* f10e808: 00000000 */ nop -/* f10e80c: 8f181448 */ lw $t8,%lo(g_MpPlayerNum)($t8) -/* f10e810: 3c02800a */ lui $v0,%hi(g_Menus+0xe20) -/* f10e814: afa00020 */ sw $zero,0x20($sp) -/* f10e818: 001878c0 */ sll $t7,$t8,0x3 -/* f10e81c: 01f87823 */ subu $t7,$t7,$t8 -/* f10e820: 000f7880 */ sll $t7,$t7,0x2 -/* f10e824: 01f87821 */ addu $t7,$t7,$t8 -/* f10e828: 000f78c0 */ sll $t7,$t7,0x3 -/* f10e82c: 01f87823 */ subu $t7,$t7,$t8 -/* f10e830: 000f7900 */ sll $t7,$t7,0x4 -/* f10e834: 004f1021 */ addu $v0,$v0,$t7 -/* f10e838: 8c42ee20 */ lw $v0,%lo(g_Menus+0xe20)($v0) -/* f10e83c: afa0001c */ sw $zero,0x1c($sp) -/* f10e840: 30590100 */ andi $t9,$v0,0x100 -/* f10e844: 13200014 */ beqz $t9,.L0f10e898 -/* f10e848: 00000000 */ nop -/* f10e84c: 0fc41b50 */ jal cheatIsUnlocked -/* f10e850: 304400ff */ andi $a0,$v0,0xff -/* f10e854: 10400010 */ beqz $v0,.L0f10e898 -/* f10e858: afa20020 */ sw $v0,0x20($sp) -/* f10e85c: 3c098007 */ lui $t1,%hi(g_MpPlayerNum) -/* f10e860: 8d291448 */ lw $t1,%lo(g_MpPlayerNum)($t1) -/* f10e864: 3c0b800a */ lui $t3,%hi(g_Menus) -/* f10e868: 256be000 */ addiu $t3,$t3,%lo(g_Menus) -/* f10e86c: 000950c0 */ sll $t2,$t1,0x3 -/* f10e870: 01495023 */ subu $t2,$t2,$t1 -/* f10e874: 000a5080 */ sll $t2,$t2,0x2 -/* f10e878: 01495021 */ addu $t2,$t2,$t1 -/* f10e87c: 000a50c0 */ sll $t2,$t2,0x3 -/* f10e880: 01495023 */ subu $t2,$t2,$t1 -/* f10e884: 000a5100 */ sll $t2,$t2,0x4 -/* f10e888: 014b4021 */ addu $t0,$t2,$t3 -/* f10e88c: 8d0d0e20 */ lw $t5,0xe20($t0) -/* f10e890: 35ac0400 */ ori $t4,$t5,0x400 -/* f10e894: ad0c0e20 */ sw $t4,0xe20($t0) -.L0f10e898: -/* f10e898: 3c0e8007 */ lui $t6,%hi(g_MpPlayerNum) -/* f10e89c: 8dce1448 */ lw $t6,%lo(g_MpPlayerNum)($t6) -/* f10e8a0: 3c02800a */ lui $v0,%hi(g_Menus+0xe20) -/* f10e8a4: 000ec0c0 */ sll $t8,$t6,0x3 -/* f10e8a8: 030ec023 */ subu $t8,$t8,$t6 -/* f10e8ac: 0018c080 */ sll $t8,$t8,0x2 -/* f10e8b0: 030ec021 */ addu $t8,$t8,$t6 -/* f10e8b4: 0018c0c0 */ sll $t8,$t8,0x3 -/* f10e8b8: 030ec023 */ subu $t8,$t8,$t6 -/* f10e8bc: 0018c100 */ sll $t8,$t8,0x4 -/* f10e8c0: 00581021 */ addu $v0,$v0,$t8 -/* f10e8c4: 8c42ee20 */ lw $v0,%lo(g_Menus+0xe20)($v0) -/* f10e8c8: 304f1000 */ andi $t7,$v0,0x1000 -/* f10e8cc: 11e00005 */ beqz $t7,.L0f10e8e4 -/* f10e8d0: 00022402 */ srl $a0,$v0,0x10 -/* f10e8d4: 309900ff */ andi $t9,$a0,0xff -/* f10e8d8: 0fc41b50 */ jal cheatIsUnlocked -/* f10e8dc: 03202025 */ or $a0,$t9,$zero -/* f10e8e0: afa2001c */ sw $v0,0x1c($sp) -.L0f10e8e4: -/* f10e8e4: 0fc3089f */ jal getMissionTime -/* f10e8e8: 00000000 */ nop -/* f10e8ec: 2401003c */ addiu $at,$zero,0x3c -/* f10e8f0: 0041001a */ div $zero,$v0,$at -/* f10e8f4: 00001812 */ mflo $v1 -/* f10e8f8: 3c047fff */ lui $a0,0x7fff -/* f10e8fc: 10600010 */ beqz $v1,.L0f10e940 -/* f10e900: 3484ffff */ ori $a0,$a0,0xffff -/* f10e904: 0064082b */ sltu $at,$v1,$a0 -/* f10e908: 10200007 */ beqz $at,.L0f10e928 -/* f10e90c: 3c05800a */ lui $a1,%hi(g_SoloSaveFile) -/* f10e910: 24a52200 */ addiu $a1,$a1,%lo(g_SoloSaveFile) -/* f10e914: 8ca20010 */ lw $v0,0x10($a1) -/* f10e918: 00834823 */ subu $t1,$a0,$v1 -/* f10e91c: 0049082b */ sltu $at,$v0,$t1 -/* f10e920: 14200005 */ bnez $at,.L0f10e938 -/* f10e924: 00435021 */ addu $t2,$v0,$v1 -.L0f10e928: -/* f10e928: 3c05800a */ lui $a1,%hi(g_SoloSaveFile) -/* f10e92c: 24a52200 */ addiu $a1,$a1,%lo(g_SoloSaveFile) -/* f10e930: 10000003 */ b .L0f10e940 -/* f10e934: aca40010 */ sw $a0,0x10($a1) -.L0f10e938: -/* f10e938: 3c01800a */ lui $at,%hi(g_SoloSaveFile+0x10) -/* f10e93c: ac2a2210 */ sw $t2,%lo(g_SoloSaveFile+0x10)($at) -.L0f10e940: -/* f10e940: 3c03800a */ lui $v1,%hi(g_MissionConfig) -/* f10e944: 2463dfe8 */ addiu $v1,$v1,%lo(g_MissionConfig) -/* f10e948: 3c05800a */ lui $a1,%hi(g_SoloSaveFile) -/* f10e94c: 8c6d0000 */ lw $t5,0x0($v1) -/* f10e950: 24a52200 */ addiu $a1,$a1,%lo(g_SoloSaveFile) -/* f10e954: 90af000b */ lbu $t7,0xb($a1) -/* f10e958: 906b0002 */ lbu $t3,0x2($v1) -/* f10e95c: 000d7642 */ srl $t6,$t5,0x19 -/* f10e960: 31d80007 */ andi $t8,$t6,0x7 -/* f10e964: 31f9fff8 */ andi $t9,$t7,0xfff8 -/* f10e968: 03194825 */ or $t1,$t8,$t9 -/* f10e96c: a0a9000b */ sb $t1,0xb($a1) -/* f10e970: 3c0a800a */ lui $t2,%hi(g_CheatsActiveBank0) -/* f10e974: a0ab000c */ sb $t3,0xc($a1) -/* f10e978: 8d4a21d0 */ lw $t2,%lo(g_CheatsActiveBank0)($t2) -/* f10e97c: 3c0b800a */ lui $t3,%hi(g_CheatsActiveBank1) -/* f10e980: 154000b8 */ bnez $t2,.L0f10ec64 -/* f10e984: 00000000 */ nop -/* f10e988: 8d6b21d4 */ lw $t3,%lo(g_CheatsActiveBank1)($t3) -/* f10e98c: 156000b5 */ bnez $t3,.L0f10ec64 -/* f10e990: 00000000 */ nop -/* f10e994: 906d0000 */ lbu $t5,0x0($v1) -/* f10e998: 3c02800a */ lui $v0,%hi(g_Vars+0x284) -/* f10e99c: 31ac0001 */ andi $t4,$t5,0x1 -/* f10e9a0: 158000b0 */ bnez $t4,.L0f10ec64 -/* f10e9a4: 00000000 */ nop -/* f10e9a8: 8c42a244 */ lw $v0,%lo(g_Vars+0x284)($v0) -/* f10e9ac: 8c4e00d8 */ lw $t6,0xd8($v0) -/* f10e9b0: 15c000ac */ bnez $t6,.L0f10ec64 -/* f10e9b4: 00000000 */ nop -/* f10e9b8: 8c4f048c */ lw $t7,0x48c($v0) -/* f10e9bc: 15e000a9 */ bnez $t7,.L0f10ec64 -/* f10e9c0: 00000000 */ nop -/* f10e9c4: 0fc256d9 */ jal objectiveIsAllComplete -/* f10e9c8: 00000000 */ nop -/* f10e9cc: 104000a5 */ beqz $v0,.L0f10ec64 -/* f10e9d0: 00000000 */ nop -/* f10e9d4: 0fc3089f */ jal getMissionTime -/* f10e9d8: 00000000 */ nop -/* f10e9dc: 2401003c */ addiu $at,$zero,0x3c -/* f10e9e0: 0041001a */ div $zero,$v0,$at -/* f10e9e4: 00002012 */ mflo $a0 -/* f10e9e8: 3c05800a */ lui $a1,%hi(g_SoloSaveFile) -/* f10e9ec: 2c811000 */ sltiu $at,$a0,0x1000 -/* f10e9f0: 14200002 */ bnez $at,.L0f10e9fc -/* f10e9f4: 24a52200 */ addiu $a1,$a1,%lo(g_SoloSaveFile) -/* f10e9f8: 24040fff */ addiu $a0,$zero,0xfff -.L0f10e9fc: -/* f10e9fc: 14800002 */ bnez $a0,.L0f10ea08 -/* f10ea00: 3c06800a */ lui $a2,%hi(g_MissionConfig+0x2) -/* f10ea04: 24040001 */ addiu $a0,$zero,0x1 -.L0f10ea08: -/* f10ea08: 90c6dfea */ lbu $a2,%lo(g_MissionConfig+0x2)($a2) -/* f10ea0c: 3c09800a */ lui $t1,%hi(g_MissionConfig) -/* f10ea10: 8d29dfe8 */ lw $t1,%lo(g_MissionConfig)($t1) -/* f10ea14: 0006c080 */ sll $t8,$a2,0x2 -/* f10ea18: 0306c023 */ subu $t8,$t8,$a2 -/* f10ea1c: 0018c040 */ sll $t8,$t8,0x1 -/* f10ea20: 00095642 */ srl $t2,$t1,0x19 -/* f10ea24: 000a5840 */ sll $t3,$t2,0x1 -/* f10ea28: 00b8c821 */ addu $t9,$a1,$t8 -/* f10ea2c: 032b3821 */ addu $a3,$t9,$t3 -/* f10ea30: 94e30020 */ lhu $v1,0x20($a3) -/* f10ea34: 3c0c8007 */ lui $t4,%hi(g_MpPlayerNum) -/* f10ea38: 3c09800a */ lui $t1,%hi(g_Menus) -/* f10ea3c: 1460000d */ bnez $v1,.L0f10ea74 -/* f10ea40: 3c0f8007 */ lui $t7,%hi(g_MpPlayerNum) -/* f10ea44: 8d8c1448 */ lw $t4,%lo(g_MpPlayerNum)($t4) -/* f10ea48: 3c01800a */ lui $at,%hi(g_Menus+0xe24) -/* f10ea4c: 240d0001 */ addiu $t5,$zero,0x1 -/* f10ea50: 000c70c0 */ sll $t6,$t4,0x3 -/* f10ea54: 01cc7023 */ subu $t6,$t6,$t4 -/* f10ea58: 000e7080 */ sll $t6,$t6,0x2 -/* f10ea5c: 01cc7021 */ addu $t6,$t6,$t4 -/* f10ea60: 000e70c0 */ sll $t6,$t6,0x3 -/* f10ea64: 01cc7023 */ subu $t6,$t6,$t4 -/* f10ea68: 000e7100 */ sll $t6,$t6,0x4 -/* f10ea6c: 002e0821 */ addu $at,$at,$t6 -/* f10ea70: ac2dee24 */ sw $t5,%lo(g_Menus+0xe24)($at) -.L0f10ea74: -/* f10ea74: 8def1448 */ lw $t7,%lo(g_MpPlayerNum)($t7) -/* f10ea78: 2529e000 */ addiu $t1,$t1,%lo(g_Menus) -/* f10ea7c: 0083082b */ sltu $at,$a0,$v1 -/* f10ea80: 000fc0c0 */ sll $t8,$t7,0x3 -/* f10ea84: 030fc023 */ subu $t8,$t8,$t7 -/* f10ea88: 0018c080 */ sll $t8,$t8,0x2 -/* f10ea8c: 030fc021 */ addu $t8,$t8,$t7 -/* f10ea90: 0018c0c0 */ sll $t8,$t8,0x3 -/* f10ea94: 030fc023 */ subu $t8,$t8,$t7 -/* f10ea98: 0018c100 */ sll $t8,$t8,0x4 -/* f10ea9c: 14200003 */ bnez $at,.L0f10eaac -/* f10eaa0: 03094021 */ addu $t0,$t8,$t1 -/* f10eaa4: 54600003 */ bnezl $v1,.L0f10eab4 -/* f10eaa8: 28c10011 */ slti $at,$a2,0x11 -.L0f10eaac: -/* f10eaac: a4e40020 */ sh $a0,0x20($a3) -/* f10eab0: 28c10011 */ slti $at,$a2,0x11 -.L0f10eab4: -/* f10eab4: 1020001d */ beqz $at,.L0f10eb2c -/* f10eab8: 24ca0001 */ addiu $t2,$a2,0x1 -/* f10eabc: 315900ff */ andi $t9,$t2,0xff -/* f10eac0: 2b210011 */ slti $at,$t9,0x11 -/* f10eac4: 14200003 */ bnez $at,.L0f10ead4 -/* f10eac8: a0aa000c */ sb $t2,0xc($a1) -/* f10eacc: 240b0010 */ addiu $t3,$zero,0x10 -/* f10ead0: a0ab000c */ sb $t3,0xc($a1) -.L0f10ead4: -/* f10ead4: 00003025 */ or $a2,$zero,$zero -/* f10ead8: 24070006 */ addiu $a3,$zero,0x6 -/* f10eadc: 24040011 */ addiu $a0,$zero,0x11 -.L0f10eae0: -/* f10eae0: 3c0c800a */ lui $t4,%hi(g_SoloSaveFile) -/* f10eae4: 258c2200 */ addiu $t4,$t4,%lo(g_SoloSaveFile) -/* f10eae8: 00cc1821 */ addu $v1,$a2,$t4 -/* f10eaec: 00001025 */ or $v0,$zero,$zero -.L0f10eaf0: -/* f10eaf0: 946d0020 */ lhu $t5,0x20($v1) -/* f10eaf4: 51a00008 */ beqzl $t5,.L0f10eb18 -/* f10eaf8: 24420001 */ addiu $v0,$v0,0x1 -/* f10eafc: 90aa000b */ lbu $t2,0xb($a1) -/* f10eb00: 244f0001 */ addiu $t7,$v0,0x1 -/* f10eb04: 000f48c0 */ sll $t1,$t7,0x3 -/* f10eb08: 3159ff07 */ andi $t9,$t2,0xff07 -/* f10eb0c: 01395825 */ or $t3,$t1,$t9 -/* f10eb10: a0ab000b */ sb $t3,0xb($a1) -/* f10eb14: 24420001 */ addiu $v0,$v0,0x1 -.L0f10eb18: -/* f10eb18: 1444fff5 */ bne $v0,$a0,.L0f10eaf0 -/* f10eb1c: 24630006 */ addiu $v1,$v1,0x6 -/* f10eb20: 24c60002 */ addiu $a2,$a2,0x2 -/* f10eb24: 14c7ffee */ bne $a2,$a3,.L0f10eae0 -/* f10eb28: 00000000 */ nop -.L0f10eb2c: -/* f10eb2c: 8d020e20 */ lw $v0,0xe20($t0) -/* f10eb30: 304c0100 */ andi $t4,$v0,0x100 -/* f10eb34: 11800016 */ beqz $t4,.L0f10eb90 -/* f10eb38: 00000000 */ nop -/* f10eb3c: 0fc41b50 */ jal cheatIsUnlocked -/* f10eb40: 304400ff */ andi $a0,$v0,0xff -/* f10eb44: 8fad0020 */ lw $t5,0x20($sp) -/* f10eb48: 15a00011 */ bnez $t5,.L0f10eb90 -/* f10eb4c: 00000000 */ nop -/* f10eb50: 1040000f */ beqz $v0,.L0f10eb90 -/* f10eb54: 3c0e8007 */ lui $t6,%hi(g_MpPlayerNum) -/* f10eb58: 8dce1448 */ lw $t6,%lo(g_MpPlayerNum)($t6) -/* f10eb5c: 3c18800a */ lui $t8,%hi(g_Menus) -/* f10eb60: 2718e000 */ addiu $t8,$t8,%lo(g_Menus) -/* f10eb64: 000e78c0 */ sll $t7,$t6,0x3 -/* f10eb68: 01ee7823 */ subu $t7,$t7,$t6 -/* f10eb6c: 000f7880 */ sll $t7,$t7,0x2 -/* f10eb70: 01ee7821 */ addu $t7,$t7,$t6 -/* f10eb74: 000f78c0 */ sll $t7,$t7,0x3 -/* f10eb78: 01ee7823 */ subu $t7,$t7,$t6 -/* f10eb7c: 000f7900 */ sll $t7,$t7,0x4 -/* f10eb80: 01f84021 */ addu $t0,$t7,$t8 -/* f10eb84: 8d0a0e20 */ lw $t2,0xe20($t0) -/* f10eb88: 35490200 */ ori $t1,$t2,0x200 -/* f10eb8c: ad090e20 */ sw $t1,0xe20($t0) -.L0f10eb90: -/* f10eb90: 3c198007 */ lui $t9,%hi(g_MpPlayerNum) -/* f10eb94: 8f391448 */ lw $t9,%lo(g_MpPlayerNum)($t9) -/* f10eb98: 3c02800a */ lui $v0,%hi(g_Menus+0xe20) -/* f10eb9c: 001958c0 */ sll $t3,$t9,0x3 -/* f10eba0: 01795823 */ subu $t3,$t3,$t9 -/* f10eba4: 000b5880 */ sll $t3,$t3,0x2 -/* f10eba8: 01795821 */ addu $t3,$t3,$t9 -/* f10ebac: 000b58c0 */ sll $t3,$t3,0x3 -/* f10ebb0: 01795823 */ subu $t3,$t3,$t9 -/* f10ebb4: 000b5900 */ sll $t3,$t3,0x4 -/* f10ebb8: 004b1021 */ addu $v0,$v0,$t3 -/* f10ebbc: 8c42ee20 */ lw $v0,%lo(g_Menus+0xe20)($v0) -/* f10ebc0: 304c1000 */ andi $t4,$v0,0x1000 -/* f10ebc4: 11800017 */ beqz $t4,.L0f10ec24 -/* f10ebc8: 00022402 */ srl $a0,$v0,0x10 -/* f10ebcc: 308d00ff */ andi $t5,$a0,0xff -/* f10ebd0: 0fc41b50 */ jal cheatIsUnlocked -/* f10ebd4: 01a02025 */ or $a0,$t5,$zero -/* f10ebd8: 8fae001c */ lw $t6,0x1c($sp) -/* f10ebdc: 15c00011 */ bnez $t6,.L0f10ec24 -/* f10ebe0: 00000000 */ nop -/* f10ebe4: 1040000f */ beqz $v0,.L0f10ec24 -/* f10ebe8: 3c0f8007 */ lui $t7,%hi(g_MpPlayerNum) -/* f10ebec: 8def1448 */ lw $t7,%lo(g_MpPlayerNum)($t7) -/* f10ebf0: 3c0a800a */ lui $t2,%hi(g_Menus) -/* f10ebf4: 254ae000 */ addiu $t2,$t2,%lo(g_Menus) -/* f10ebf8: 000fc0c0 */ sll $t8,$t7,0x3 -/* f10ebfc: 030fc023 */ subu $t8,$t8,$t7 -/* f10ec00: 0018c080 */ sll $t8,$t8,0x2 -/* f10ec04: 030fc021 */ addu $t8,$t8,$t7 -/* f10ec08: 0018c0c0 */ sll $t8,$t8,0x3 -/* f10ec0c: 030fc023 */ subu $t8,$t8,$t7 -/* f10ec10: 0018c100 */ sll $t8,$t8,0x4 -/* f10ec14: 030a4021 */ addu $t0,$t8,$t2 -/* f10ec18: 8d090e20 */ lw $t1,0xe20($t0) -/* f10ec1c: 35390800 */ ori $t9,$t1,0x800 -/* f10ec20: ad190e20 */ sw $t9,0xe20($t0) -.L0f10ec24: -/* f10ec24: 0fc66bf7 */ jal mpDetermineUnlockedFeatures -/* f10ec28: 00000000 */ nop -/* f10ec2c: 3c0b800a */ lui $t3,%hi(g_MissionConfig+0x1) -/* f10ec30: 916bdfe9 */ lbu $t3,%lo(g_MissionConfig+0x1)($t3) -/* f10ec34: 2401002a */ addiu $at,$zero,0x2a -/* f10ec38: 3c02800a */ lui $v0,%hi(var800a2328+0x3) -/* f10ec3c: 15610009 */ bne $t3,$at,.L0f10ec64 -/* f10ec40: 2442232b */ addiu $v0,$v0,%lo(var800a2328+0x3) -/* f10ec44: 904c0000 */ lbu $t4,0x0($v0) -/* f10ec48: 240d0001 */ addiu $t5,$zero,0x1 -/* f10ec4c: 240e0001 */ addiu $t6,$zero,0x1 -/* f10ec50: 15800004 */ bnez $t4,.L0f10ec64 -/* f10ec54: 3c01800a */ lui $at,%hi(g_AltTitle) -/* f10ec58: a04d0000 */ sb $t5,0x0($v0) -/* f10ec5c: 0fc44270 */ jal func0f1109c0 -/* f10ec60: a02e232c */ sb $t6,%lo(g_AltTitle)($at) -.L0f10ec64: -/* f10ec64: 3c04800a */ lui $a0,%hi(g_FilemgrLoadedMainFile) -/* f10ec68: 248422c0 */ addiu $a0,$a0,%lo(g_FilemgrLoadedMainFile) -/* f10ec6c: 00002825 */ or $a1,$zero,$zero -/* f10ec70: 0fc42539 */ jal func0f1094e4 -/* f10ec74: 00003025 */ or $a2,$zero,$zero -/* f10ec78: 3c03800a */ lui $v1,%hi(g_MenuData+0x4) -/* f10ec7c: 8c6319c4 */ lw $v1,%lo(g_MenuData+0x4)($v1) -.L0f10ec80: -/* f10ec80: 24010001 */ addiu $at,$zero,0x1 -.L0f10ec84: -/* f10ec84: 54610008 */ bnel $v1,$at,.L0f10eca8 -/* f10ec88: 8fbf0014 */ lw $ra,0x14($sp) -/* f10ec8c: 0fc5b350 */ jal lvSetPaused -/* f10ec90: 24040001 */ addiu $a0,$zero,0x1 -/* f10ec94: 3c18800a */ lui $t8,%hi(g_Vars+0x284) -/* f10ec98: 8f18a244 */ lw $t8,%lo(g_Vars+0x284)($t8) -/* f10ec9c: 240f0003 */ addiu $t7,$zero,0x3 -/* f10eca0: af0f1a24 */ sw $t7,0x1a24($t8) -/* f10eca4: 8fbf0014 */ lw $ra,0x14($sp) -.L0f10eca8: -/* f10eca8: 27bd0038 */ addiu $sp,$sp,0x38 -/* f10ecac: 03e00008 */ jr $ra -/* f10ecb0: 00000000 */ nop -); +void endscreenPrepare(void) +{ + s32 timedcheatid; + s32 complcheatid; + s32 d; + s32 s; + u32 secs; + s32 timedalreadyunlocked; + s32 complalreadyunlocked; + u16 prevbest; + bool nowunlocked; + + g_Menus[g_MpPlayerNum].data.endscreen.stageindex = g_MissionConfig.stageindex; + + if (g_MenuData.root != MENUROOT_ENDSCREEN && g_Vars.mplayerisrunning == false) { + g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo = 0; + g_Menus[g_MpPlayerNum].data.endscreen.isfirstcompletion = false; + g_Menus[g_MpPlayerNum].playernum = 0; + + // Set cheat info + if (g_MissionConfig.iscoop == false + && g_MissionConfig.isanti == false + && g_MissionConfig.pdmode == false) { + timedcheatid = cheatGetByTimedStageIndex(g_MissionConfig.stageindex, g_MissionConfig.difficulty); + complcheatid = cheatGetByCompletedStageIndex(g_MissionConfig.stageindex); + + if (timedcheatid >= 0) { + g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo = 0x0100 | timedcheatid; + } + + if (complcheatid >= 0) { + g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo |= 0x1000 | (complcheatid << 16); + } + } + + // Push the endscreen + if (g_Vars.currentplayer->isdead + || g_Vars.currentplayer->aborted + || !objectiveIsAllComplete()) { + menuPushRootDialog(&g_SoloMissionEndscreenFailedMenuDialog, MENUROOT_ENDSCREEN); + } else { + menuPushRootDialog(&g_SoloMissionEndscreenCompletedMenuDialog, MENUROOT_ENDSCREEN); + + if (g_MissionConfig.iscoop) { + endscreenSetCoopCompleted(); + } + } + + if (g_MissionConfig.iscoop == false && g_MissionConfig.isanti == false) { + timedalreadyunlocked = false; + complalreadyunlocked = false; + + // If there's a timed cheat for this stage + difficulty + if (g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0x100) { + timedalreadyunlocked = cheatIsUnlocked(g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0xff); + + if (timedalreadyunlocked) { + g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo |= 0x400; + } + } + + // If there's a completion cheat for this stage (ie. not a special stage) + if (g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0x1000) { + complalreadyunlocked = cheatIsUnlocked((g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo >> 16) & 0xff); + } + + // Update total mission time + secs = getMissionTime() / 60; + + if (secs != 0) { + if (secs >= S32_MAX || S32_MAX - secs <= g_SoloSaveFile.totaltime) { + g_SoloSaveFile.totaltime = S32_MAX; + } else { + g_SoloSaveFile.totaltime += secs; + } + } + + g_SoloSaveFile.autostageindex = g_MissionConfig.stageindex; + g_SoloSaveFile.autodifficulty = g_MissionConfig.difficulty; + + if (g_CheatsActiveBank0 == 0 + && g_CheatsActiveBank1 == 0 + && g_MissionConfig.pdmode == false + && g_Vars.currentplayer->isdead == false + && g_Vars.currentplayer->aborted == false + && objectiveIsAllComplete()) { + secs = getMissionTime() / 60; + + // The save file allows 12 bits per time, which is up to + // 1h 8m 16s. If the timer is higher than this, reduce it. + if (secs > 0xfff) { + secs = 0xfff; + } + + // Zero is used as an indicator that the stage is not completed, + // so if the player managed to legitly complete a stage in 0:00 + // adjust it to 0:01. + if (secs == 0) { + secs = 1; + } + + // Set best time + prevbest = g_SoloSaveFile.besttimes[g_MissionConfig.stageindex][g_MissionConfig.difficulty]; + + if (prevbest == 0) { + g_Menus[g_MpPlayerNum].data.endscreen.isfirstcompletion = true; + } + + if (secs < prevbest || prevbest == 0) { + g_SoloSaveFile.besttimes[g_MissionConfig.stageindex][g_MissionConfig.difficulty] = secs; + } + + // Recalculate thumbnail for file select screen + if (g_MissionConfig.stageindex <= SOLOSTAGEINDEX_SKEDARRUINS) { + g_SoloSaveFile.autostageindex = g_MissionConfig.stageindex + 1; + + if (g_SoloSaveFile.autostageindex > SOLOSTAGEINDEX_SKEDARRUINS) { + g_SoloSaveFile.autostageindex = SOLOSTAGEINDEX_SKEDARRUINS; + } + + for (d = 0; d != 3; d++) { + for (s = 0; s <= SOLOSTAGEINDEX_SKEDARRUINS; s++) { + if (g_SoloSaveFile.besttimes[s][d]) { + g_SoloSaveFile.thumbnail = s + 1; + } + } + } + } + + if (g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0x100) { + nowunlocked = cheatIsUnlocked(g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0xff); + + if (!timedalreadyunlocked && nowunlocked) { + g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo |= 0x0200; + } + } + + if (g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0x1000) { + nowunlocked = cheatIsUnlocked((g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo >> 16) & 0xff); + + if (!complalreadyunlocked && nowunlocked) { + g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo |= 0x0800; + } + } + + mpDetermineUnlockedFeatures(); + + if (g_MissionConfig.stagenum == STAGE_SKEDARRUINS && (u8)g_SoloCompleted == false) { + g_SoloCompleted = true; + g_AltTitle = true; + func0f1109c0(); + } + } + } + + func0f1094e4(&g_FilemgrLoadedMainFile, 0, 0); + } + + if (g_MenuData.root == MENUROOT_ENDSCREEN) { + lvSetPaused(true); + g_Vars.currentplayer->pausemode = PAUSEMODE_PAUSED; + } +} #else GLOBAL_ASM( glabel endscreenPrepare @@ -1879,171 +1592,6 @@ glabel endscreenPrepare ); #endif -// Mismatch because address of var800a2328[3] is calcualted differently -//void endscreenPrepare(void) -//{ -// s32 timedcheatid; -// s32 complcheatid; -// s32 d; -// s32 s; -// u32 secs; -// s32 timedalreadyunlocked; -// s32 complalreadyunlocked; -// u16 prevbest; -// bool nowunlocked; -// -// g_Menus[g_MpPlayerNum].data.endscreen.stageindex = g_MissionConfig.stageindex; -// -// if (g_MenuData.root != MENUROOT_ENDSCREEN && g_Vars.mplayerisrunning == false) { -// g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo = 0; -// g_Menus[g_MpPlayerNum].data.endscreen.isfirstcompletion = false; -// g_Menus[g_MpPlayerNum].playernum = 0; -// -// // Set cheat info -// if (g_MissionConfig.iscoop == false -// && g_MissionConfig.isanti == false -// && g_MissionConfig.pdmode == false) { -// timedcheatid = cheatGetByTimedStageIndex(g_MissionConfig.stageindex, g_MissionConfig.difficulty); -// complcheatid = cheatGetByCompletedStageIndex(g_MissionConfig.stageindex); -// -// if (timedcheatid >= 0) { -// g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo = 0x0100 | timedcheatid; -// } -// -// if (complcheatid >= 0) { -// g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo |= 0x1000 | (complcheatid << 16); -// } -// } -// -// // Push the endscreen -// if (g_Vars.currentplayer->isdead -// || g_Vars.currentplayer->aborted -// || !objectiveIsAllComplete()) { -// menuPushRootDialog(&g_SoloMissionEndscreenFailedMenuDialog, MENUROOT_ENDSCREEN); -// } else { -// menuPushRootDialog(&g_SoloMissionEndscreenCompletedMenuDialog, MENUROOT_ENDSCREEN); -// -// if (g_MissionConfig.iscoop) { -// endscreenSetCoopCompleted(); -// } -// } -// -// if (g_MissionConfig.iscoop == false && g_MissionConfig.isanti == false) { -// timedalreadyunlocked = false; -// complalreadyunlocked = false; -// -// // If there's a timed cheat for this stage + difficulty -// if (g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0x100) { -// timedalreadyunlocked = cheatIsUnlocked(g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0xff); -// -// if (timedalreadyunlocked) { -// g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo |= 0x400; -// } -// } -// -// // If there's a completion cheat for this stage (ie. not a special stage) -// if (g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0x1000) { -// complalreadyunlocked = cheatIsUnlocked((g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo >> 16) & 0xff); -// } -// -// // Update total mission time -// secs = getMissionTime() / 60; -// -// if (secs != 0) { -// if (secs >= S32_MAX || S32_MAX - secs <= g_SoloSaveFile.totaltime) { -// g_SoloSaveFile.totaltime = S32_MAX; -// } else { -// g_SoloSaveFile.totaltime += secs; -// } -// } -// -// g_SoloSaveFile.autostageindex = g_MissionConfig.stageindex; -// g_SoloSaveFile.autodifficulty = g_MissionConfig.difficulty; -// -// if (g_CheatsActiveBank0 == 0 -// && g_CheatsActiveBank1 == 0 -// && g_MissionConfig.pdmode == false -// && g_Vars.currentplayer->isdead == false -// && g_Vars.currentplayer->aborted == false -// && objectiveIsAllComplete()) { -// secs = getMissionTime() / 60; -// -// // The save file allows 12 bits per time, which is up to -// // 1h 8m 16s. If the timer is higher than this, reduce it. -// if (secs > 0xfff) { -// secs = 0xfff; -// } -// -// // Zero is used as an indicator that the stage is not completed, -// // so if the player managed to legitly complete a stage in 0:00 -// // adjust it to 0:01. -// if (secs == 0) { -// secs = 1; -// } -// -// // Set best time -// prevbest = g_SoloSaveFile.besttimes[g_MissionConfig.stageindex][g_MissionConfig.difficulty]; -// -// if (prevbest == 0) { -// g_Menus[g_MpPlayerNum].data.endscreen.isfirstcompletion = true; -// } -// -// if (secs < prevbest || prevbest == 0) { -// g_SoloSaveFile.besttimes[g_MissionConfig.stageindex][g_MissionConfig.difficulty] = secs; -// } -// -// // Recalculate thumbnail for file select screen -// if (g_MissionConfig.stageindex <= SOLOSTAGEINDEX_SKEDARRUINS) { -// g_SoloSaveFile.autostageindex = g_MissionConfig.stageindex + 1; -// -// if (g_SoloSaveFile.autostageindex > SOLOSTAGEINDEX_SKEDARRUINS) { -// g_SoloSaveFile.autostageindex = SOLOSTAGEINDEX_SKEDARRUINS; -// } -// -// for (d = 0; d != 3; d++) { -// for (s = 0; s <= SOLOSTAGEINDEX_SKEDARRUINS; s++) { -// if (g_SoloSaveFile.besttimes[s][d]) { -// g_SoloSaveFile.thumbnail = s + 1; -// } -// } -// } -// } -// -// if (g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0x100) { -// nowunlocked = cheatIsUnlocked(g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0xff); -// -// if (!timedalreadyunlocked && nowunlocked) { -// g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo |= 0x0200; -// } -// } -// -// if (g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0x1000) { -// nowunlocked = cheatIsUnlocked((g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo >> 16) & 0xff); -// -// if (!complalreadyunlocked && nowunlocked) { -// g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo |= 0x0800; -// } -// } -// -// mpDetermineUnlockedFeatures(); -// -// if (g_MissionConfig.stagenum == STAGE_SKEDARRUINS && var800a2328[3] == 0) { -// var800a2328[3] = 1; -// g_AltTitle = true; -// func0f1109c0(); -// } -// } -// } -// -// func0f1094e4(&g_FilemgrLoadedMainFile, 0, 0); -// } -// -// if (g_MenuData.root == MENUROOT_ENDSCREEN) { -// lvSetPaused(true); -// g_Vars.currentplayer->pausemode = PAUSEMODE_PAUSED; -// } -//} - struct menudialog g_2PMissionEndscreenCompletedHMenuDialog = { MENUDIALOGTYPE_SUCCESS, (u32)&menuTitleStageCompleted, diff --git a/src/game/game_102240.c b/src/game/game_102240.c index 27305536f..8d2e8e6ab 100644 --- a/src/game/game_102240.c +++ b/src/game/game_102240.c @@ -445,7 +445,7 @@ s32 menuhandlerAlternativeTitle(s32 operation, struct menuitem *item, union hand { switch (operation) { case MENUOP_CHECKHIDDEN: - if (g_Vars.stagenum != STAGE_CITRAINING || var800a2328[3] == 0) { + if (g_Vars.stagenum != STAGE_CITRAINING || (u8)g_SoloCompleted == false) { return true; } break; diff --git a/src/game/game_110680.c b/src/game/game_110680.c index 5e2008828..ef3ac1ea2 100644 --- a/src/game/game_110680.c +++ b/src/game/game_110680.c @@ -43,7 +43,10 @@ u32 var800a2318; u32 var800a231c; u32 var800a2320; u32 var800a2324; -u8 var800a2328[4]; +u8 var800a2328; +u8 var800a2329; +u8 var800a232a; +s8 g_SoloCompleted; u8 g_AltTitle; u32 var800a2330; u32 var800a2334; @@ -565,7 +568,7 @@ void func0f110b68(void) g_Vars.unk00047c = 0; g_Vars.unk000480 = 0; g_Vars.unk000482 = (PAL ? 7 : 0); - var800a2328[3] = 0; + g_SoloCompleted = 0; g_AltTitle = false; func0f1109c0(); } diff --git a/src/include/bss.h b/src/include/bss.h index cfaf62605..e2f4b4d20 100644 --- a/src/include/bss.h +++ b/src/include/bss.h @@ -200,7 +200,7 @@ extern u32 g_CheatsEnabledBank1; extern struct savelocation_2d8 var800a21f8; extern struct savefile_solo g_SoloSaveFile; extern struct savelocation_2d8 g_FilemgrLoadedMainFile; -extern u8 var800a2328[]; +extern s8 g_SoloCompleted; extern u8 g_AltTitle; extern s32 *g_PadsFile; extern u16 *g_PadOffsets;