From 371516f918c0d3a3995f30b71b28c7703a0ec3cd Mon Sep 17 00:00:00 2001 From: Tyler McGavran Date: Sun, 24 Dec 2023 21:57:02 -0500 Subject: [PATCH] Some matches in code_80091750 (#511) Signed-off-by: Taggerung --- asm/bss_8001C4D0.s | 5 +- .../code_80091750/add_8018D9E0_entry.s | 4 +- .../code_80091750/func_80092E1C.s | 66 - .../code_80091750/func_80095BD0.s | 164 -- .../code_80091750/func_80097A14.s | 53 - .../code_80091750/func_80099E60.s | 28 - .../code_80091750/func_8009A478.s | 79 - .../code_80091750/func_8009BA74.s | 158 -- .../code_80091750/func_8009BC9C.s | 161 -- .../code_80091750/func_8009BEF0.s | 217 -- .../code_80091750/func_8009C204.s | 158 -- .../code_80091750/func_8009C434.s | 193 -- .../code_80091750/func_8009F5E0.s | 4 +- .../code_80091750/func_800A4550.s | 149 - asm/non_matchings/code_80091750/print_text1.s | 225 -- src/code_8006E9C0.h | 1 + src/code_80091750.c | 2449 +++++++---------- src/code_80091750.h | 54 +- src/ending/code_80281C40.c | 2 +- src/ending/code_80281C40.h | 2 +- src/menus.c | 3 - src/menus.h | 3 + src/save.h | 2 +- src/textures.h | 4 +- 24 files changed, 1028 insertions(+), 3156 deletions(-) delete mode 100644 asm/non_matchings/code_80091750/func_80092E1C.s delete mode 100644 asm/non_matchings/code_80091750/func_80095BD0.s delete mode 100644 asm/non_matchings/code_80091750/func_80097A14.s delete mode 100644 asm/non_matchings/code_80091750/func_80099E60.s delete mode 100644 asm/non_matchings/code_80091750/func_8009A478.s delete mode 100644 asm/non_matchings/code_80091750/func_8009BA74.s delete mode 100644 asm/non_matchings/code_80091750/func_8009BC9C.s delete mode 100644 asm/non_matchings/code_80091750/func_8009BEF0.s delete mode 100644 asm/non_matchings/code_80091750/func_8009C204.s delete mode 100644 asm/non_matchings/code_80091750/func_8009C434.s delete mode 100644 asm/non_matchings/code_80091750/func_800A4550.s delete mode 100644 asm/non_matchings/code_80091750/print_text1.s diff --git a/asm/bss_8001C4D0.s b/asm/bss_8001C4D0.s index 6134b5cf8..81767825a 100644 --- a/asm/bss_8001C4D0.s +++ b/asm/bss_8001C4D0.s @@ -1699,10 +1699,7 @@ glabel D_8018E7AC .skip 4 glabel D_8018E7B0 -.skip 1 - -glabel D_8018E7B1 -.skip 7 +.skip 8 glabel D_8018E7B8 .skip 16 diff --git a/asm/non_matchings/code_80091750/add_8018D9E0_entry.s b/asm/non_matchings/code_80091750/add_8018D9E0_entry.s index 8707c3329..2b216fc67 100644 --- a/asm/non_matchings/code_80091750/add_8018D9E0_entry.s +++ b/asm/non_matchings/code_80091750/add_8018D9E0_entry.s @@ -648,11 +648,11 @@ glabel L8009EE74 /* 09FA9C 8009EE9C 00402025 */ move $a0, $v0 /* 09FAA0 8009EEA0 8FA60024 */ lw $a2, 0x24($sp) /* 09FAA4 8009EEA4 8FBF007C */ lw $ra, 0x7c($sp) -/* 09FAA8 8009EEA8 3C04800E */ lui $a0, %hi(D_800E7CA8) +/* 09FAA8 8009EEA8 3C04800E */ lui $a0, %hi(D_800E7D54 - 0xAC) /* 09FAAC 8009EEAC 00862021 */ addu $a0, $a0, $a2 /* 09FAB0 8009EEB0 AFE20018 */ sw $v0, 0x18($ra) /* 09FAB4 8009EEB4 0C026449 */ jal segmented_to_virtual_dupe -/* 09FAB8 8009EEB8 8C847CA8 */ lw $a0, %lo(D_800E7CA8)($a0) +/* 09FAB8 8009EEB8 8C847CA8 */ lw $a0, %lo(D_800E7D54 - 0xAC)($a0) /* 09FABC 8009EEBC 00402025 */ move $a0, $v0 /* 09FAC0 8009EEC0 0C0265AF */ jal func_800996BC /* 09FAC4 8009EEC4 00002825 */ move $a1, $zero diff --git a/asm/non_matchings/code_80091750/func_80092E1C.s b/asm/non_matchings/code_80091750/func_80092E1C.s deleted file mode 100644 index 89cf495ad..000000000 --- a/asm/non_matchings/code_80091750/func_80092E1C.s +++ /dev/null @@ -1,66 +0,0 @@ -glabel func_80092E1C -/* 093A1C 80092E1C 80820000 */ lb $v0, ($a0) -/* 093A20 80092E20 24420080 */ addiu $v0, $v0, 0x80 -/* 093A24 80092E24 304E00FF */ andi $t6, $v0, 0xff -/* 093A28 80092E28 29C10021 */ slti $at, $t6, 0x21 -/* 093A2C 80092E2C 14200018 */ bnez $at, .L80092E90 -/* 093A30 80092E30 01C02025 */ move $a0, $t6 -/* 093A34 80092E34 29C1002B */ slti $at, $t6, 0x2b -/* 093A38 80092E38 50200016 */ beql $at, $zero, .L80092E94 -/* 093A3C 80092E3C 2881002B */ slti $at, $a0, 0x2b -/* 093A40 80092E40 04810004 */ bgez $a0, .L80092E54 -/* 093A44 80092E44 308F0001 */ andi $t7, $a0, 1 -/* 093A48 80092E48 11E00002 */ beqz $t7, .L80092E54 -/* 093A4C 80092E4C 00000000 */ nop -/* 093A50 80092E50 25EFFFFE */ addiu $t7, $t7, -2 -.L80092E54: -/* 093A54 80092E54 11E00008 */ beqz $t7, .L80092E78 -/* 093A58 80092E58 2483FFDF */ addiu $v1, $a0, -0x21 -/* 093A5C 80092E5C 2483FFDF */ addiu $v1, $a0, -0x21 -/* 093A60 80092E60 04610003 */ bgez $v1, .L80092E70 -/* 093A64 80092E64 0003C043 */ sra $t8, $v1, 1 -/* 093A68 80092E68 24610001 */ addiu $at, $v1, 1 -/* 093A6C 80092E6C 0001C043 */ sra $t8, $at, 1 -.L80092E70: -/* 093A70 80092E70 03E00008 */ jr $ra -/* 093A74 80092E74 2702007B */ addiu $v0, $t8, 0x7b - -.L80092E78: -/* 093A78 80092E78 04610003 */ bgez $v1, .L80092E88 -/* 093A7C 80092E7C 0003C843 */ sra $t9, $v1, 1 -/* 093A80 80092E80 24610001 */ addiu $at, $v1, 1 -/* 093A84 80092E84 0001C843 */ sra $t9, $at, 1 -.L80092E88: -/* 093A88 80092E88 03E00008 */ jr $ra -/* 093A8C 80092E8C 27220030 */ addiu $v0, $t9, 0x30 - -.L80092E90: -/* 093A90 80092E90 2881002B */ slti $at, $a0, 0x2b -.L80092E94: -/* 093A94 80092E94 14200005 */ bnez $at, .L80092EAC -/* 093A98 80092E98 2881006E */ slti $at, $a0, 0x6e -/* 093A9C 80092E9C 50200004 */ beql $at, $zero, .L80092EB0 -/* 093AA0 80092EA0 2401006F */ li $at, 111 -/* 093AA4 80092EA4 03E00008 */ jr $ra -/* 093AA8 80092EA8 2482000A */ addiu $v0, $a0, 0xa - -.L80092EAC: -/* 093AAC 80092EAC 2401006F */ li $at, 111 -.L80092EB0: -/* 093AB0 80092EB0 10810008 */ beq $a0, $at, .L80092ED4 -/* 093AB4 80092EB4 24010072 */ li $at, 114 -/* 093AB8 80092EB8 10810008 */ beq $a0, $at, .L80092EDC -/* 093ABC 80092EBC 24830007 */ addiu $v1, $a0, 7 -/* 093AC0 80092EC0 24010073 */ li $at, 115 -/* 093AC4 80092EC4 10810005 */ beq $a0, $at, .L80092EDC -/* 093AC8 80092EC8 00000000 */ nop -/* 093ACC 80092ECC 03E00008 */ jr $ra -/* 093AD0 80092ED0 2402FFFE */ li $v0, -2 - -.L80092ED4: -/* 093AD4 80092ED4 03E00008 */ jr $ra -/* 093AD8 80092ED8 24020078 */ li $v0, 120 - -.L80092EDC: -/* 093ADC 80092EDC 03E00008 */ jr $ra -/* 093AE0 80092EE0 00601025 */ move $v0, $v1 diff --git a/asm/non_matchings/code_80091750/func_80095BD0.s b/asm/non_matchings/code_80091750/func_80095BD0.s deleted file mode 100644 index 5d6ea6a6f..000000000 --- a/asm/non_matchings/code_80091750/func_80095BD0.s +++ /dev/null @@ -1,164 +0,0 @@ -.section .rodata - -glabel D_800F0BCC -.asciiz "effectcount < 0 !!!!!!(kawano)\n" - -.balign 4 -glabel D_800F0BEC -.asciiz "MAX effectcount(760) over!!!!(kawano)\n" - -.section .text - -glabel func_80095BD0 -/* 0967D0 80095BD0 3C098016 */ lui $t1, %hi(gMatrixEffectCount) # $t1, 0x8016 -/* 0967D4 80095BD4 25294AF0 */ addiu $t1, %lo(gMatrixEffectCount) # addiu $t1, $t1, 0x4af0 -/* 0967D8 80095BD8 85220000 */ lh $v0, ($t1) -/* 0967DC 80095BDC 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 0967E0 80095BE0 AFB00020 */ sw $s0, 0x20($sp) -/* 0967E4 80095BE4 284102F7 */ slti $at, $v0, 0x2f7 -/* 0967E8 80095BE8 00808025 */ move $s0, $a0 -/* 0967EC 80095BEC AFBF0024 */ sw $ra, 0x24($sp) -/* 0967F0 80095BF0 AFA50034 */ sw $a1, 0x34($sp) -/* 0967F4 80095BF4 AFA60038 */ sw $a2, 0x38($sp) -/* 0967F8 80095BF8 1020000E */ beqz $at, .L80095C34 -/* 0967FC 80095BFC AFA7003C */ sw $a3, 0x3c($sp) -/* 096800 80095C00 3C0E8015 */ lui $t6, %hi(gGfxPool) # $t6, 0x8015 -/* 096804 80095C04 8DCEEF40 */ lw $t6, %lo(gGfxPool)($t6) -/* 096808 80095C08 00027980 */ sll $t7, $v0, 6 -/* 09680C 80095C0C 3401FAC0 */ li $at, 64192 -/* 096810 80095C10 01CFC021 */ addu $t8, $t6, $t7 -/* 096814 80095C14 0301C821 */ addu $t9, $t8, $at -/* 096818 80095C18 0441000B */ bgez $v0, .L80095C48 -/* 09681C 80095C1C AFB90028 */ sw $t9, 0x28($sp) -/* 096820 80095C20 3C04800F */ lui $a0, %hi(D_800F0BCC) # $a0, 0x800f -/* 096824 80095C24 0C033DDD */ jal rmonPrintf -/* 096828 80095C28 24840BCC */ addiu $a0, %lo(D_800F0BCC) # addiu $a0, $a0, 0xbcc -/* 09682C 80095C2C 10000007 */ b .L80095C4C -/* 096830 80095C30 C7A4004C */ lwc1 $f4, 0x4c($sp) -.L80095C34: -/* 096834 80095C34 3C04800F */ lui $a0, %hi(D_800F0BEC) # $a0, 0x800f -/* 096838 80095C38 0C033DDD */ jal rmonPrintf -/* 09683C 80095C3C 24840BEC */ addiu $a0, %lo(D_800F0BEC) # addiu $a0, $a0, 0xbec -/* 096840 80095C40 1000006E */ b .L80095DFC -/* 096844 80095C44 02001025 */ move $v0, $s0 -.L80095C48: -/* 096848 80095C48 C7A4004C */ lwc1 $f4, 0x4c($sp) -.L80095C4C: -/* 09684C 80095C4C 8FA40028 */ lw $a0, 0x28($sp) -/* 096850 80095C50 8FA50038 */ lw $a1, 0x38($sp) -/* 096854 80095C54 8FA6003C */ lw $a2, 0x3c($sp) -/* 096858 80095C58 8FA70048 */ lw $a3, 0x48($sp) -/* 09685C 80095C5C 0C0256B8 */ jal func_80095AE0 -/* 096860 80095C60 E7A40010 */ swc1 $f4, 0x10($sp) -/* 096864 80095C64 3C0B0102 */ lui $t3, (0x01020040 >> 16) # lui $t3, 0x102 -/* 096868 80095C68 8FA40040 */ lw $a0, 0x40($sp) -/* 09686C 80095C6C 3C098016 */ lui $t1, %hi(gMatrixEffectCount) # $t1, 0x8016 -/* 096870 80095C70 356B0040 */ ori $t3, (0x01020040 & 0xFFFF) # ori $t3, $t3, 0x40 -/* 096874 80095C74 02001025 */ move $v0, $s0 -/* 096878 80095C78 25294AF0 */ addiu $t1, %lo(gMatrixEffectCount) # addiu $t1, $t1, 0x4af0 -/* 09687C 80095C7C AC4B0000 */ sw $t3, ($v0) -/* 096880 80095C80 852D0000 */ lh $t5, ($t1) -/* 096884 80095C84 3C0C8015 */ lui $t4, %hi(gGfxPool) # $t4, 0x8015 -/* 096888 80095C88 8D8CEF40 */ lw $t4, %lo(gGfxPool)($t4) -/* 09688C 80095C8C 000D7180 */ sll $t6, $t5, 6 -/* 096890 80095C90 3401FAC0 */ li $at, 64192 -/* 096894 80095C94 018E7821 */ addu $t7, $t4, $t6 -/* 096898 80095C98 01E1C021 */ addu $t8, $t7, $at -/* 09689C 80095C9C 3C011FFF */ lui $at, (0x1FFFFFFF >> 16) # lui $at, 0x1fff -/* 0968A0 80095CA0 3421FFFF */ ori $at, (0x1FFFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0968A4 80095CA4 0301C824 */ and $t9, $t8, $at -/* 0968A8 80095CA8 AC590004 */ sw $t9, 4($v0) -/* 0968AC 80095CAC 852B0000 */ lh $t3, ($t1) -/* 0968B0 80095CB0 00046042 */ srl $t4, $a0, 1 -/* 0968B4 80095CB4 258EFFFF */ addiu $t6, $t4, -1 -/* 0968B8 80095CB8 26100008 */ addiu $s0, $s0, 8 -/* 0968BC 80095CBC 31CF0FFF */ andi $t7, $t6, 0xfff -/* 0968C0 80095CC0 3C01FD88 */ lui $at, 0xfd88 -/* 0968C4 80095CC4 256D0001 */ addiu $t5, $t3, 1 -/* 0968C8 80095CC8 A52D0000 */ sh $t5, ($t1) -/* 0968CC 80095CCC 01E1C025 */ or $t8, $t7, $at -/* 0968D0 80095CD0 02001825 */ move $v1, $s0 -/* 0968D4 80095CD4 AC780000 */ sw $t8, ($v1) -/* 0968D8 80095CD8 24870001 */ addiu $a3, $a0, 1 -/* 0968DC 80095CDC 8FB90034 */ lw $t9, 0x34($sp) -/* 0968E0 80095CE0 00075842 */ srl $t3, $a3, 1 -/* 0968E4 80095CE4 25670007 */ addiu $a3, $t3, 7 -/* 0968E8 80095CE8 000768C2 */ srl $t5, $a3, 3 -/* 0968EC 80095CEC 26100008 */ addiu $s0, $s0, 8 -/* 0968F0 80095CF0 02002825 */ move $a1, $s0 -/* 0968F4 80095CF4 31AC01FF */ andi $t4, $t5, 0x1ff -/* 0968F8 80095CF8 AC790004 */ sw $t9, 4($v1) -/* 0968FC 80095CFC 000C3A40 */ sll $a3, $t4, 9 -/* 096900 80095D00 26100008 */ addiu $s0, $s0, 8 -/* 096904 80095D04 3C01F588 */ lui $at, 0xf588 -/* 096908 80095D08 3C0A0700 */ lui $t2, 0x700 -/* 09690C 80095D0C 00E17825 */ or $t7, $a3, $at -/* 096910 80095D10 02003025 */ move $a2, $s0 -/* 096914 80095D14 ACAF0000 */ sw $t7, ($a1) -/* 096918 80095D18 ACAA0004 */ sw $t2, 4($a1) -/* 09691C 80095D1C 26100008 */ addiu $s0, $s0, 8 -/* 096920 80095D20 3C18E600 */ lui $t8, 0xe600 -/* 096924 80095D24 ACD80000 */ sw $t8, ($a2) -/* 096928 80095D28 02004025 */ move $t0, $s0 -/* 09692C 80095D2C ACC00004 */ sw $zero, 4($a2) -/* 096930 80095D30 3C19F400 */ lui $t9, 0xf400 -/* 096934 80095D34 AD190000 */ sw $t9, ($t0) -/* 096938 80095D38 8FA20044 */ lw $v0, 0x44($sp) -/* 09693C 80095D3C 00046040 */ sll $t4, $a0, 1 -/* 096940 80095D40 318E0FFF */ andi $t6, $t4, 0xfff -/* 096944 80095D44 000E7B00 */ sll $t7, $t6, 0xc -/* 096948 80095D48 00025880 */ sll $t3, $v0, 2 -/* 09694C 80095D4C 31620FFF */ andi $v0, $t3, 0xfff -/* 096950 80095D50 01EAC025 */ or $t8, $t7, $t2 -/* 096954 80095D54 0302C825 */ or $t9, $t8, $v0 -/* 096958 80095D58 26100008 */ addiu $s0, $s0, 8 -/* 09695C 80095D5C 02001825 */ move $v1, $s0 -/* 096960 80095D60 AD190004 */ sw $t9, 4($t0) -/* 096964 80095D64 26100008 */ addiu $s0, $s0, 8 -/* 096968 80095D68 02002825 */ move $a1, $s0 -/* 09696C 80095D6C 3C0BE700 */ lui $t3, 0xe700 -/* 096970 80095D70 3C01F580 */ lui $at, 0xf580 -/* 096974 80095D74 00047080 */ sll $t6, $a0, 2 -/* 096978 80095D78 31CF0FFF */ andi $t7, $t6, 0xfff -/* 09697C 80095D7C 00E16825 */ or $t5, $a3, $at -/* 096980 80095D80 AC6B0000 */ sw $t3, ($v1) -/* 096984 80095D84 26100008 */ addiu $s0, $s0, 8 -/* 096988 80095D88 AC600004 */ sw $zero, 4($v1) -/* 09698C 80095D8C 02003025 */ move $a2, $s0 -/* 096990 80095D90 000FC300 */ sll $t8, $t7, 0xc -/* 096994 80095D94 0302C825 */ or $t9, $t8, $v0 -/* 096998 80095D98 ACA00004 */ sw $zero, 4($a1) -/* 09699C 80095D9C ACAD0000 */ sw $t5, ($a1) -/* 0969A0 80095DA0 3C0CF200 */ lui $t4, 0xf200 -/* 0969A4 80095DA4 24010010 */ li $at, 16 -/* 0969A8 80095DA8 ACCC0000 */ sw $t4, ($a2) -/* 0969AC 80095DAC ACD90004 */ sw $t9, 4($a2) -/* 0969B0 80095DB0 1081000A */ beq $a0, $at, .L80095DDC -/* 0969B4 80095DB4 26100008 */ addiu $s0, $s0, 8 -/* 0969B8 80095DB8 2401001A */ li $at, 26 -/* 0969BC 80095DBC 1081000A */ beq $a0, $at, .L80095DE8 -/* 0969C0 80095DC0 3C050200 */ lui $a1, %hi(D_02007BB8) -/* 0969C4 80095DC4 2401001E */ li $at, 30 -/* 0969C8 80095DC8 10810009 */ beq $a0, $at, .L80095DF0 -/* 0969CC 80095DCC 3C050200 */ lui $a1, %hi(D_02007DF8) -/* 0969D0 80095DD0 3C050200 */ lui $a1, %hi(D_02007CD8) # $a1, 0x200 -/* 0969D4 80095DD4 10000007 */ b .L80095DF4 -/* 0969D8 80095DD8 24A57CD8 */ addiu $a1, %lo(D_02007CD8) # addiu $a1, $a1, 0x7cd8 -.L80095DDC: -/* 0969DC 80095DDC 3C050200 */ lui $a1, %hi(D_02007CD8) # $a1, 0x200 -/* 0969E0 80095DE0 10000004 */ b .L80095DF4 -/* 0969E4 80095DE4 24A57CD8 */ addiu $a1, %lo(D_02007CD8) # addiu $a1, $a1, 0x7cd8 -.L80095DE8: -/* 0969E8 80095DE8 10000002 */ b .L80095DF4 -/* 0969EC 80095DEC 24A57BB8 */ addiu $a1, $a1, %lo(D_02007BB8) -.L80095DF0: -/* 0969F0 80095DF0 24A57DF8 */ addiu $a1, $a1, %lo(D_02007DF8) -.L80095DF4: -/* 0969F4 80095DF4 0C02567E */ jal func_800959F8 -/* 0969F8 80095DF8 02002025 */ move $a0, $s0 -.L80095DFC: -/* 0969FC 80095DFC 8FBF0024 */ lw $ra, 0x24($sp) -/* 096A00 80095E00 8FB00020 */ lw $s0, 0x20($sp) -/* 096A04 80095E04 27BD0030 */ addiu $sp, $sp, 0x30 -/* 096A08 80095E08 03E00008 */ jr $ra -/* 096A0C 80095E0C 00000000 */ nop diff --git a/asm/non_matchings/code_80091750/func_80097A14.s b/asm/non_matchings/code_80091750/func_80097A14.s deleted file mode 100644 index d69fd612d..000000000 --- a/asm/non_matchings/code_80091750/func_80097A14.s +++ /dev/null @@ -1,53 +0,0 @@ -glabel func_80097A14 -/* 098614 80097A14 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* 098618 80097A18 00801025 */ move $v0, $a0 -/* 09861C 80097A1C AFBF003C */ sw $ra, 0x3c($sp) -/* 098620 80097A20 AFA50044 */ sw $a1, 0x44($sp) -/* 098624 80097A24 AFA60048 */ sw $a2, 0x48($sp) -/* 098628 80097A28 AFA7004C */ sw $a3, 0x4c($sp) -/* 09862C 80097A2C 24840008 */ addiu $a0, $a0, 8 -/* 098630 80097A30 3C18E700 */ lui $t8, 0xe700 -/* 098634 80097A34 AC580000 */ sw $t8, ($v0) -/* 098638 80097A38 AC400004 */ sw $zero, 4($v0) -/* 09863C 80097A3C 00801825 */ move $v1, $a0 -/* 098640 80097A40 3C19BA00 */ lui $t9, (0xBA001402 >> 16) # lui $t9, 0xba00 -/* 098644 80097A44 37391402 */ ori $t9, (0xBA001402 & 0xFFFF) # ori $t9, $t9, 0x1402 -/* 098648 80097A48 3C080020 */ lui $t0, 0x20 -/* 09864C 80097A4C AC680004 */ sw $t0, 4($v1) -/* 098650 80097A50 AC790000 */ sw $t9, ($v1) -/* 098654 80097A54 00057600 */ sll $t6, $a1, 0x18 -/* 098658 80097A58 000E2E03 */ sra $a1, $t6, 0x18 -/* 09865C 80097A5C 8FAE005C */ lw $t6, 0x5c($sp) -/* 098660 80097A60 8FB90068 */ lw $t9, 0x68($sp) -/* 098664 80097A64 8FB80064 */ lw $t8, 0x64($sp) -/* 098668 80097A68 8FAF0060 */ lw $t7, 0x60($sp) -/* 09866C 80097A6C 8FAD0058 */ lw $t5, 0x58($sp) -/* 098670 80097A70 8FAC0054 */ lw $t4, 0x54($sp) -/* 098674 80097A74 8FAB0050 */ lw $t3, 0x50($sp) -/* 098678 80097A78 8FAA004C */ lw $t2, 0x4c($sp) -/* 09867C 80097A7C 8FA90048 */ lw $t1, 0x48($sp) -/* 098680 80097A80 24840008 */ addiu $a0, $a0, 8 -/* 098684 80097A84 24070400 */ li $a3, 1024 -/* 098688 80097A88 24061000 */ li $a2, 4096 -/* 09868C 80097A8C AFAE0024 */ sw $t6, 0x24($sp) -/* 098690 80097A90 AFB90030 */ sw $t9, 0x30($sp) -/* 098694 80097A94 AFB8002C */ sw $t8, 0x2c($sp) -/* 098698 80097A98 AFAF0028 */ sw $t7, 0x28($sp) -/* 09869C 80097A9C AFAD0020 */ sw $t5, 0x20($sp) -/* 0986A0 80097AA0 AFAC001C */ sw $t4, 0x1c($sp) -/* 0986A4 80097AA4 AFAB0018 */ sw $t3, 0x18($sp) -/* 0986A8 80097AA8 AFAA0014 */ sw $t2, 0x14($sp) -/* 0986AC 80097AAC 0C025784 */ jal func_80095E10 -/* 0986B0 80097AB0 AFA90010 */ sw $t1, 0x10($sp) -/* 0986B4 80097AB4 3C09BA00 */ lui $t1, (0xBA001402 >> 16) # lui $t1, 0xba00 -/* 0986B8 80097AB8 3C08E700 */ lui $t0, 0xe700 -/* 0986BC 80097ABC 35291402 */ ori $t1, (0xBA001402 & 0xFFFF) # ori $t1, $t1, 0x1402 -/* 0986C0 80097AC0 AC480000 */ sw $t0, ($v0) -/* 0986C4 80097AC4 AC400004 */ sw $zero, 4($v0) -/* 0986C8 80097AC8 AC490008 */ sw $t1, 8($v0) -/* 0986CC 80097ACC AC40000C */ sw $zero, 0xc($v0) -/* 0986D0 80097AD0 8FBF003C */ lw $ra, 0x3c($sp) -/* 0986D4 80097AD4 27BD0040 */ addiu $sp, $sp, 0x40 -/* 0986D8 80097AD8 24420010 */ addiu $v0, $v0, 0x10 -/* 0986DC 80097ADC 03E00008 */ jr $ra -/* 0986E0 80097AE0 00000000 */ nop diff --git a/asm/non_matchings/code_80091750/func_80099E60.s b/asm/non_matchings/code_80091750/func_80099E60.s deleted file mode 100644 index d5890e30b..000000000 --- a/asm/non_matchings/code_80091750/func_80099E60.s +++ /dev/null @@ -1,28 +0,0 @@ -glabel func_80099E60 -/* 09AA60 80099E60 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 09AA64 80099E64 3C028019 */ lui $v0, %hi(D_8018E0E8) # 0x8019 -/* 09AA68 80099E68 2443E0E8 */ addiu $v1, $v0, %lo(D_8018E0E8) # -0x1f18 -/* 09AA6C 80099E6C AFBF0014 */ sw $ra, 0x14($sp) -/* 09AA70 80099E70 AFA50024 */ sw $a1, 0x24($sp) -/* 09AA74 80099E74 AFA60028 */ sw $a2, 0x28($sp) -/* 09AA78 80099E78 8C6E0000 */ lw $t6, ($v1) -/* 09AA7C 80099E7C 11C00005 */ beqz $t6, .L80099E94 -/* 09AA80 80099E80 00000000 */ nop -/* 09AA84 80099E84 8C6F0008 */ lw $t7, 8($v1) -.L80099E88: -/* 09AA88 80099E88 24630008 */ addiu $v1, $v1, 8 -/* 09AA8C 80099E8C 55E0FFFE */ bnel $t7, $zero, .L80099E88 -/* 09AA90 80099E90 8C6F0008 */ lw $t7, 8($v1) -.L80099E94: -/* 09AA94 80099E94 0C026449 */ jal segmented_to_virtual_dupe -/* 09AA98 80099E98 AFA3001C */ sw $v1, 0x1c($sp) -/* 09AA9C 80099E9C 8FA3001C */ lw $v1, 0x1c($sp) -/* 09AAA0 80099EA0 AC620000 */ sw $v0, ($v1) -/* 09AAA4 80099EA4 8FB80024 */ lw $t8, 0x24($sp) -/* 09AAA8 80099EA8 A4780004 */ sh $t8, 4($v1) -/* 09AAAC 80099EAC 8FB90028 */ lw $t9, 0x28($sp) -/* 09AAB0 80099EB0 A4790006 */ sh $t9, 6($v1) -/* 09AAB4 80099EB4 8FBF0014 */ lw $ra, 0x14($sp) -/* 09AAB8 80099EB8 27BD0020 */ addiu $sp, $sp, 0x20 -/* 09AABC 80099EBC 03E00008 */ jr $ra -/* 09AAC0 80099EC0 00000000 */ nop diff --git a/asm/non_matchings/code_80091750/func_8009A478.s b/asm/non_matchings/code_80091750/func_8009A478.s deleted file mode 100644 index bcd391e01..000000000 --- a/asm/non_matchings/code_80091750/func_8009A478.s +++ /dev/null @@ -1,79 +0,0 @@ -glabel func_8009A478 -/* 09B078 8009A478 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 09B07C 8009A47C AFBF001C */ sw $ra, 0x1c($sp) -/* 09B080 8009A480 AFB00018 */ sw $s0, 0x18($sp) -/* 09B084 8009A484 0C026455 */ jal segmented_to_virtual_dupe_2 -/* 09B088 8009A488 AFA50034 */ sw $a1, 0x34($sp) -/* 09B08C 8009A48C 3C048019 */ lui $a0, %hi(D_8018DEE0) # $a0, 0x8019 -/* 09B090 8009A490 2484DEE0 */ addiu $a0, %lo(D_8018DEE0) # addiu $a0, $a0, -0x2120 -/* 09B094 8009A494 8C8E000C */ lw $t6, 0xc($a0) -/* 09B098 8009A498 00408025 */ move $s0, $v0 -/* 09B09C 8009A49C 00003825 */ move $a3, $zero -/* 09B0A0 8009A4A0 11C0000C */ beqz $t6, .L8009A4D4 -/* 09B0A4 8009A4A4 2419FFFF */ li $t9, -1 -/* 09B0A8 8009A4A8 3C038019 */ lui $v1, %hi(D_8018DEE0) # $v1, 0x8019 -/* 09B0AC 8009A4AC 2463DEE0 */ addiu $v1, %lo(D_8018DEE0) # addiu $v1, $v1, -0x2120 -/* 09B0B0 8009A4B0 24E70001 */ addiu $a3, $a3, 1 -.L8009A4B4: -/* 09B0B4 8009A4B4 28E10010 */ slti $at, $a3, 0x10 -/* 09B0B8 8009A4B8 14200003 */ bnez $at, .L8009A4C8 -/* 09B0BC 8009A4BC 24630018 */ addiu $v1, $v1, 0x18 -.L8009A4C0: -/* 09B0C0 8009A4C0 1000FFFF */ b .L8009A4C0 -/* 09B0C4 8009A4C4 00000000 */ nop -.L8009A4C8: -/* 09B0C8 8009A4C8 8C6F000C */ lw $t7, 0xc($v1) -/* 09B0CC 8009A4CC 55E0FFF9 */ bnel $t7, $zero, .L8009A4B4 -/* 09B0D0 8009A4D0 24E70001 */ addiu $a3, $a3, 1 -.L8009A4D4: -/* 09B0D4 8009A4D4 0007C080 */ sll $t8, $a3, 2 -/* 09B0D8 8009A4D8 0307C023 */ subu $t8, $t8, $a3 -/* 09B0DC 8009A4DC 0018C0C0 */ sll $t8, $t8, 3 -/* 09B0E0 8009A4E0 00981821 */ addu $v1, $a0, $t8 -/* 09B0E4 8009A4E4 3C088000 */ lui $t0, 0x8000 -/* 09B0E8 8009A4E8 AC620000 */ sw $v0, ($v1) -/* 09B0EC 8009A4EC AC790004 */ sw $t9, 4($v1) -/* 09B0F0 8009A4F0 AC600008 */ sw $zero, 8($v1) -/* 09B0F4 8009A4F4 AC68000C */ sw $t0, 0xc($v1) -/* 09B0F8 8009A4F8 3C098019 */ lui $t1, %hi(gNumD_8018E118Entries) # $t1, 0x8019 -/* 09B0FC 8009A4FC 8D29E758 */ lw $t1, %lo(gNumD_8018E118Entries)($t1) -/* 09B100 8009A500 00003025 */ move $a2, $zero -/* 09B104 8009A504 AC690010 */ sw $t1, 0x10($v1) -/* 09B108 8009A508 8C4A0000 */ lw $t2, ($v0) -/* 09B10C 8009A50C 8FA50034 */ lw $a1, 0x34($sp) -/* 09B110 8009A510 51400008 */ beql $t2, $zero, .L8009A534 -/* 09B114 8009A514 8E040008 */ lw $a0, 8($s0) -/* 09B118 8009A518 8E040000 */ lw $a0, ($s0) -/* 09B11C 8009A51C AFA7002C */ sw $a3, 0x2c($sp) -/* 09B120 8009A520 0C026656 */ jal func_80099958 -/* 09B124 8009A524 AFA30024 */ sw $v1, 0x24($sp) -/* 09B128 8009A528 8FA30024 */ lw $v1, 0x24($sp) -/* 09B12C 8009A52C 8FA7002C */ lw $a3, 0x2c($sp) -/* 09B130 8009A530 8E040008 */ lw $a0, 8($s0) -.L8009A534: -/* 09B134 8009A534 8FA50034 */ lw $a1, 0x34($sp) -/* 09B138 8009A538 24060001 */ li $a2, 1 -/* 09B13C 8009A53C 5080000A */ beql $a0, $zero, .L8009A568 -/* 09B140 8009A540 8E040000 */ lw $a0, ($s0) -/* 09B144 8009A544 8FA50034 */ lw $a1, 0x34($sp) -/* 09B148 8009A548 24060001 */ li $a2, 1 -/* 09B14C 8009A54C AFA30024 */ sw $v1, 0x24($sp) -/* 09B150 8009A550 0C026656 */ jal func_80099958 -/* 09B154 8009A554 AFA7002C */ sw $a3, 0x2c($sp) -/* 09B158 8009A558 8FA30024 */ lw $v1, 0x24($sp) -/* 09B15C 8009A55C 10000007 */ b .L8009A57C -/* 09B160 8009A560 8FA7002C */ lw $a3, 0x2c($sp) -/* 09B164 8009A564 8E040000 */ lw $a0, ($s0) -.L8009A568: -/* 09B168 8009A568 AFA7002C */ sw $a3, 0x2c($sp) -/* 09B16C 8009A56C 0C026656 */ jal func_80099958 -/* 09B170 8009A570 AFA30024 */ sw $v1, 0x24($sp) -/* 09B174 8009A574 8FA30024 */ lw $v1, 0x24($sp) -/* 09B178 8009A578 8FA7002C */ lw $a3, 0x2c($sp) -.L8009A57C: -/* 09B17C 8009A57C 8FBF001C */ lw $ra, 0x1c($sp) -/* 09B180 8009A580 8FB00018 */ lw $s0, 0x18($sp) -/* 09B184 8009A584 AC600014 */ sw $zero, 0x14($v1) -/* 09B188 8009A588 27BD0030 */ addiu $sp, $sp, 0x30 -/* 09B18C 8009A58C 03E00008 */ jr $ra -/* 09B190 8009A590 00E01025 */ move $v0, $a3 diff --git a/asm/non_matchings/code_80091750/func_8009BA74.s b/asm/non_matchings/code_80091750/func_8009BA74.s deleted file mode 100644 index bc7feb753..000000000 --- a/asm/non_matchings/code_80091750/func_8009BA74.s +++ /dev/null @@ -1,158 +0,0 @@ -.section .late_rodata - -glabel jpt_800F1060 -.word L8009BB00, L8009BB14, L8009BB28, L8009BB44 -.word L8009BB64 - -.section .text - -glabel func_8009BA74 -/* 09C674 8009BA74 27BDFF98 */ addiu $sp, $sp, -0x68 -/* 09C678 8009BA78 AFB00040 */ sw $s0, 0x40($sp) -/* 09C67C 8009BA7C 00808025 */ move $s0, $a0 -/* 09C680 8009BA80 AFBF0064 */ sw $ra, 0x64($sp) -/* 09C684 8009BA84 AFB7005C */ sw $s7, 0x5c($sp) -/* 09C688 8009BA88 AFB60058 */ sw $s6, 0x58($sp) -/* 09C68C 8009BA8C 00C0B025 */ move $s6, $a2 -/* 09C690 8009BA90 00E0B825 */ move $s7, $a3 -/* 09C694 8009BA94 AFBE0060 */ sw $fp, 0x60($sp) -/* 09C698 8009BA98 AFB50054 */ sw $s5, 0x54($sp) -/* 09C69C 8009BA9C AFB40050 */ sw $s4, 0x50($sp) -/* 09C6A0 8009BAA0 AFB3004C */ sw $s3, 0x4c($sp) -/* 09C6A4 8009BAA4 AFB20048 */ sw $s2, 0x48($sp) -/* 09C6A8 8009BAA8 AFB10044 */ sw $s1, 0x44($sp) -/* 09C6AC 8009BAAC 0C026449 */ jal segmented_to_virtual_dupe -/* 09C6B0 8009BAB0 00A02025 */ move $a0, $a1 -/* 09C6B4 8009BAB4 8C4E0004 */ lw $t6, 4($v0) -/* 09C6B8 8009BAB8 3C1E0200 */ lui $fp, %hi(D_02007708) # $fp, 0x200 -/* 09C6BC 8009BABC 00409025 */ move $s2, $v0 -/* 09C6C0 8009BAC0 11C00069 */ beqz $t6, .L8009BC68 -/* 09C6C4 8009BAC4 27DE7708 */ addiu $fp, %lo(D_02007708) # addiu $fp, $fp, 0x7708 -/* 09C6C8 8009BAC8 3C150200 */ lui $s5, %hi(D_02007728) # $s5, 0x200 -/* 09C6CC 8009BACC 26B57728 */ addiu $s5, %lo(D_02007728) # addiu $s5, $s5, 0x7728 -/* 09C6D0 8009BAD0 3C130600 */ lui $s3, 0x600 -/* 09C6D4 8009BAD4 964F0000 */ lhu $t7, ($s2) -.L8009BAD8: -/* 09C6D8 8009BAD8 0000A025 */ move $s4, $zero -/* 09C6DC 8009BADC 02001025 */ move $v0, $s0 -/* 09C6E0 8009BAE0 2DE10005 */ sltiu $at, $t7, 5 -/* 09C6E4 8009BAE4 10200026 */ beqz $at, .L8009BB80 -/* 09C6E8 8009BAE8 000F7880 */ sll $t7, $t7, 2 -/* 09C6EC 8009BAEC 3C01800F */ lui $at, %hi(jpt_800F1060) -/* 09C6F0 8009BAF0 002F0821 */ addu $at, $at, $t7 -/* 09C6F4 8009BAF4 8C2F1060 */ lw $t7, %lo(jpt_800F1060)($at) -/* 09C6F8 8009BAF8 01E00008 */ jr $t7 -/* 09C6FC 8009BAFC 00000000 */ nop -glabel L8009BB00 -/* 09C700 8009BB00 02001025 */ move $v0, $s0 -/* 09C704 8009BB04 AC530000 */ sw $s3, ($v0) -/* 09C708 8009BB08 AC5E0004 */ sw $fp, 4($v0) -/* 09C70C 8009BB0C 1000001F */ b .L8009BB8C -/* 09C710 8009BB10 26100008 */ addiu $s0, $s0, 8 -glabel L8009BB14 -/* 09C714 8009BB14 02001025 */ move $v0, $s0 -/* 09C718 8009BB18 AC530000 */ sw $s3, ($v0) -/* 09C71C 8009BB1C AC550004 */ sw $s5, 4($v0) -/* 09C720 8009BB20 1000001A */ b .L8009BB8C -/* 09C724 8009BB24 26100008 */ addiu $s0, $s0, 8 -glabel L8009BB28 -/* 09C728 8009BB28 02001025 */ move $v0, $s0 -/* 09C72C 8009BB2C 3C180200 */ lui $t8, %hi(D_02007748) # $t8, 0x200 -/* 09C730 8009BB30 27187748 */ addiu $t8, %lo(D_02007748) # addiu $t8, $t8, 0x7748 -/* 09C734 8009BB34 AC580004 */ sw $t8, 4($v0) -/* 09C738 8009BB38 AC530000 */ sw $s3, ($v0) -/* 09C73C 8009BB3C 10000013 */ b .L8009BB8C -/* 09C740 8009BB40 26100008 */ addiu $s0, $s0, 8 -glabel L8009BB44 -/* 09C744 8009BB44 02001025 */ move $v0, $s0 -/* 09C748 8009BB48 3C190200 */ lui $t9, %hi(D_02007768) # $t9, 0x200 -/* 09C74C 8009BB4C 27397768 */ addiu $t9, %lo(D_02007768) # addiu $t9, $t9, 0x7768 -/* 09C750 8009BB50 AC590004 */ sw $t9, 4($v0) -/* 09C754 8009BB54 AC530000 */ sw $s3, ($v0) -/* 09C758 8009BB58 26100008 */ addiu $s0, $s0, 8 -/* 09C75C 8009BB5C 1000000B */ b .L8009BB8C -/* 09C760 8009BB60 24140003 */ li $s4, 3 -glabel L8009BB64 -/* 09C764 8009BB64 02001025 */ move $v0, $s0 -/* 09C768 8009BB68 3C080200 */ lui $t0, %hi(D_02007788) # $t0, 0x200 -/* 09C76C 8009BB6C 25087788 */ addiu $t0, %lo(D_02007788) # addiu $t0, $t0, 0x7788 -/* 09C770 8009BB70 AC480004 */ sw $t0, 4($v0) -/* 09C774 8009BB74 AC530000 */ sw $s3, ($v0) -/* 09C778 8009BB78 10000004 */ b .L8009BB8C -/* 09C77C 8009BB7C 26100008 */ addiu $s0, $s0, 8 -.L8009BB80: -/* 09C780 8009BB80 26100008 */ addiu $s0, $s0, 8 -/* 09C784 8009BB84 AC530000 */ sw $s3, ($v0) -/* 09C788 8009BB88 AC550004 */ sw $s5, 4($v0) -.L8009BB8C: -/* 09C78C 8009BB8C 0C026E31 */ jal func_8009B8C4 -/* 09C790 8009BB90 8E440004 */ lw $a0, 4($s2) -/* 09C794 8009BB94 10400030 */ beqz $v0, .L8009BC58 -/* 09C798 8009BB98 00401825 */ move $v1, $v0 -/* 09C79C 8009BB9C 3C098019 */ lui $t1, %hi(D_8018E7B0) # $t1, 0x8019 -/* 09C7A0 8009BBA0 8129E7B0 */ lb $t1, %lo(D_8018E7B0)($t1) -/* 09C7A4 8009BBA4 24010004 */ li $at, 4 -/* 09C7A8 8009BBA8 02002025 */ move $a0, $s0 -/* 09C7AC 8009BBAC 5121001A */ beql $t1, $at, .L8009BC18 -/* 09C7B0 8009BBB0 9642000A */ lhu $v0, 0xa($s2) -/* 09C7B4 8009BBB4 AFA00010 */ sw $zero, 0x10($sp) -/* 09C7B8 8009BBB8 AFA00014 */ sw $zero, 0x14($sp) -/* 09C7BC 8009BBBC 96510008 */ lhu $s1, 8($s2) -/* 09C7C0 8009BBC0 00142E00 */ sll $a1, $s4, 0x18 -/* 09C7C4 8009BBC4 00055603 */ sra $t2, $a1, 0x18 -/* 09C7C8 8009BBC8 AFB10018 */ sw $s1, 0x18($sp) -/* 09C7CC 8009BBCC 9642000A */ lhu $v0, 0xa($s2) -/* 09C7D0 8009BBD0 01402825 */ move $a1, $t2 -/* 09C7D4 8009BBD4 02002025 */ move $a0, $s0 -/* 09C7D8 8009BBD8 AFA2001C */ sw $v0, 0x1c($sp) -/* 09C7DC 8009BBDC 964B000C */ lhu $t3, 0xc($s2) -/* 09C7E0 8009BBE0 24060400 */ li $a2, 1024 -/* 09C7E4 8009BBE4 24070400 */ li $a3, 1024 -/* 09C7E8 8009BBE8 01766021 */ addu $t4, $t3, $s6 -/* 09C7EC 8009BBEC AFAC0020 */ sw $t4, 0x20($sp) -/* 09C7F0 8009BBF0 964D000E */ lhu $t5, 0xe($s2) -/* 09C7F4 8009BBF4 AFA30028 */ sw $v1, 0x28($sp) -/* 09C7F8 8009BBF8 AFB1002C */ sw $s1, 0x2c($sp) -/* 09C7FC 8009BBFC 01B77021 */ addu $t6, $t5, $s7 -/* 09C800 8009BC00 AFAE0024 */ sw $t6, 0x24($sp) -/* 09C804 8009BC04 0C025784 */ jal func_80095E10 -/* 09C808 8009BC08 AFA20030 */ sw $v0, 0x30($sp) -/* 09C80C 8009BC0C 10000012 */ b .L8009BC58 -/* 09C810 8009BC10 00408025 */ move $s0, $v0 -/* 09C814 8009BC14 9642000A */ lhu $v0, 0xa($s2) -.L8009BC18: -/* 09C818 8009BC18 96510008 */ lhu $s1, 8($s2) -/* 09C81C 8009BC1C 00002825 */ move $a1, $zero -/* 09C820 8009BC20 AFA20010 */ sw $v0, 0x10($sp) -/* 09C824 8009BC24 964F000C */ lhu $t7, 0xc($s2) -/* 09C828 8009BC28 00003025 */ move $a2, $zero -/* 09C82C 8009BC2C 02203825 */ move $a3, $s1 -/* 09C830 8009BC30 01F6C021 */ addu $t8, $t7, $s6 -/* 09C834 8009BC34 AFB80014 */ sw $t8, 0x14($sp) -/* 09C838 8009BC38 9659000E */ lhu $t9, 0xe($s2) -/* 09C83C 8009BC3C AFA3001C */ sw $v1, 0x1c($sp) -/* 09C840 8009BC40 AFA20024 */ sw $v0, 0x24($sp) -/* 09C844 8009BC44 03374021 */ addu $t0, $t9, $s7 -/* 09C848 8009BC48 AFA80018 */ sw $t0, 0x18($sp) -/* 09C84C 8009BC4C 0C0261F4 */ jal func_800987D0 -/* 09C850 8009BC50 AFB10020 */ sw $s1, 0x20($sp) -/* 09C854 8009BC54 00408025 */ move $s0, $v0 -.L8009BC58: -/* 09C858 8009BC58 8E490018 */ lw $t1, 0x18($s2) -/* 09C85C 8009BC5C 26520014 */ addiu $s2, $s2, 0x14 -/* 09C860 8009BC60 5520FF9D */ bnel $t1, $zero, .L8009BAD8 -/* 09C864 8009BC64 964F0000 */ lhu $t7, ($s2) -.L8009BC68: -/* 09C868 8009BC68 8FBF0064 */ lw $ra, 0x64($sp) -/* 09C86C 8009BC6C 02001025 */ move $v0, $s0 -/* 09C870 8009BC70 8FB00040 */ lw $s0, 0x40($sp) -/* 09C874 8009BC74 8FB10044 */ lw $s1, 0x44($sp) -/* 09C878 8009BC78 8FB20048 */ lw $s2, 0x48($sp) -/* 09C87C 8009BC7C 8FB3004C */ lw $s3, 0x4c($sp) -/* 09C880 8009BC80 8FB40050 */ lw $s4, 0x50($sp) -/* 09C884 8009BC84 8FB50054 */ lw $s5, 0x54($sp) -/* 09C888 8009BC88 8FB60058 */ lw $s6, 0x58($sp) -/* 09C88C 8009BC8C 8FB7005C */ lw $s7, 0x5c($sp) -/* 09C890 8009BC90 8FBE0060 */ lw $fp, 0x60($sp) -/* 09C894 8009BC94 03E00008 */ jr $ra -/* 09C898 8009BC98 27BD0068 */ addiu $sp, $sp, 0x68 diff --git a/asm/non_matchings/code_80091750/func_8009BC9C.s b/asm/non_matchings/code_80091750/func_8009BC9C.s deleted file mode 100644 index 3c567a281..000000000 --- a/asm/non_matchings/code_80091750/func_8009BC9C.s +++ /dev/null @@ -1,161 +0,0 @@ -glabel func_8009BC9C -/* 09C89C 8009BC9C 27BDFF98 */ addiu $sp, $sp, -0x68 -/* 09C8A0 8009BCA0 AFB10044 */ sw $s1, 0x44($sp) -/* 09C8A4 8009BCA4 00808825 */ move $s1, $a0 -/* 09C8A8 8009BCA8 AFBF0064 */ sw $ra, 0x64($sp) -/* 09C8AC 8009BCAC AFB40050 */ sw $s4, 0x50($sp) -/* 09C8B0 8009BCB0 AFB3004C */ sw $s3, 0x4c($sp) -/* 09C8B4 8009BCB4 00C09825 */ move $s3, $a2 -/* 09C8B8 8009BCB8 00E0A025 */ move $s4, $a3 -/* 09C8BC 8009BCBC AFBE0060 */ sw $fp, 0x60($sp) -/* 09C8C0 8009BCC0 AFB7005C */ sw $s7, 0x5c($sp) -/* 09C8C4 8009BCC4 AFB60058 */ sw $s6, 0x58($sp) -/* 09C8C8 8009BCC8 AFB50054 */ sw $s5, 0x54($sp) -/* 09C8CC 8009BCCC AFB20048 */ sw $s2, 0x48($sp) -/* 09C8D0 8009BCD0 AFB00040 */ sw $s0, 0x40($sp) -/* 09C8D4 8009BCD4 0C026449 */ jal segmented_to_virtual_dupe -/* 09C8D8 8009BCD8 00A02025 */ move $a0, $a1 -/* 09C8DC 8009BCDC 8C4E0004 */ lw $t6, 4($v0) -/* 09C8E0 8009BCE0 00408025 */ move $s0, $v0 -/* 09C8E4 8009BCE4 241E0002 */ li $fp, 2 -/* 09C8E8 8009BCE8 11C00074 */ beqz $t6, .L8009BEBC -/* 09C8EC 8009BCEC 3C170600 */ lui $s7, 0x600 -/* 09C8F0 8009BCF0 24160001 */ li $s6, 1 -/* 09C8F4 8009BCF4 8FB5007C */ lw $s5, 0x7c($sp) -/* 09C8F8 8009BCF8 8FB20078 */ lw $s2, 0x78($sp) -/* 09C8FC 8009BCFC 86020000 */ lh $v0, ($s0) -.L8009BD00: -/* 09C900 8009BD00 3C0F0200 */ lui $t7, %hi(D_02007708) # $t7, 0x200 -/* 09C904 8009BD04 25EF7708 */ addiu $t7, %lo(D_02007708) # addiu $t7, $t7, 0x7708 -/* 09C908 8009BD08 50400006 */ beql $v0, $zero, .L8009BD24 -/* 09C90C 8009BD0C 02201025 */ move $v0, $s1 -/* 09C910 8009BD10 10560009 */ beq $v0, $s6, .L8009BD38 -/* 09C914 8009BD14 3C180200 */ lui $t8, %hi(D_02007728) # $t8, 0x200 -/* 09C918 8009BD18 1000000D */ b .L8009BD50 -/* 09C91C 8009BD1C 8E040004 */ lw $a0, 4($s0) -/* 09C920 8009BD20 02201025 */ move $v0, $s1 -.L8009BD24: -/* 09C924 8009BD24 AC570000 */ sw $s7, ($v0) -/* 09C928 8009BD28 AC4F0004 */ sw $t7, 4($v0) -/* 09C92C 8009BD2C 26310008 */ addiu $s1, $s1, 8 -/* 09C930 8009BD30 10000007 */ b .L8009BD50 -/* 09C934 8009BD34 8E040004 */ lw $a0, 4($s0) -.L8009BD38: -/* 09C938 8009BD38 02201025 */ move $v0, $s1 -/* 09C93C 8009BD3C 27187728 */ addiu $t8, %lo(D_02007728) # addiu $t8, $t8, 0x7728 -/* 09C940 8009BD40 AC580004 */ sw $t8, 4($v0) -/* 09C944 8009BD44 AC570000 */ sw $s7, ($v0) -/* 09C948 8009BD48 26310008 */ addiu $s1, $s1, 8 -/* 09C94C 8009BD4C 8E040004 */ lw $a0, 4($s0) -.L8009BD50: -/* 09C950 8009BD50 0C026E31 */ jal func_8009B8C4 -/* 09C954 8009BD54 00000000 */ nop -/* 09C958 8009BD58 10400054 */ beqz $v0, .L8009BEAC -/* 09C95C 8009BD5C 00404025 */ move $t0, $v0 -/* 09C960 8009BD60 12560009 */ beq $s2, $s6, .L8009BD88 -/* 09C964 8009BD64 02202025 */ move $a0, $s1 -/* 09C968 8009BD68 125E0011 */ beq $s2, $fp, .L8009BDB0 -/* 09C96C 8009BD6C 24010003 */ li $at, 3 -/* 09C970 8009BD70 12410024 */ beq $s2, $at, .L8009BE04 -/* 09C974 8009BD74 24010004 */ li $at, 4 -/* 09C978 8009BD78 52410037 */ beql $s2, $at, .L8009BE58 -/* 09C97C 8009BD7C AFA00010 */ sw $zero, 0x10($sp) -/* 09C980 8009BD80 1000004B */ b .L8009BEB0 -/* 09C984 8009BD84 8E0D0018 */ lw $t5, 0x18($s0) -.L8009BD88: -/* 09C988 8009BD88 9619000C */ lhu $t9, 0xc($s0) -/* 09C98C 8009BD8C 9609000E */ lhu $t1, 0xe($s0) -/* 09C990 8009BD90 AFB50014 */ sw $s5, 0x14($sp) -/* 09C994 8009BD94 AFA80010 */ sw $t0, 0x10($sp) -/* 09C998 8009BD98 00002825 */ move $a1, $zero -/* 09C99C 8009BD9C 03333021 */ addu $a2, $t9, $s3 -/* 09C9A0 8009BDA0 0C025EB9 */ jal func_80097AE4 -/* 09C9A4 8009BDA4 01343821 */ addu $a3, $t1, $s4 -/* 09C9A8 8009BDA8 10000040 */ b .L8009BEAC -/* 09C9AC 8009BDAC 00408825 */ move $s1, $v0 -.L8009BDB0: -/* 09C9B0 8009BDB0 96020008 */ lhu $v0, 8($s0) -/* 09C9B4 8009BDB4 02202025 */ move $a0, $s1 -/* 09C9B8 8009BDB8 00002825 */ move $a1, $zero -/* 09C9BC 8009BDBC AFA20010 */ sw $v0, 0x10($sp) -/* 09C9C0 8009BDC0 9603000A */ lhu $v1, 0xa($s0) -/* 09C9C4 8009BDC4 00003025 */ move $a2, $zero -/* 09C9C8 8009BDC8 00003825 */ move $a3, $zero -/* 09C9CC 8009BDCC AFA30014 */ sw $v1, 0x14($sp) -/* 09C9D0 8009BDD0 960A000C */ lhu $t2, 0xc($s0) -/* 09C9D4 8009BDD4 01535821 */ addu $t3, $t2, $s3 -/* 09C9D8 8009BDD8 AFAB0018 */ sw $t3, 0x18($sp) -/* 09C9DC 8009BDDC 960C000E */ lhu $t4, 0xe($s0) -/* 09C9E0 8009BDE0 AFB5002C */ sw $s5, 0x2c($sp) -/* 09C9E4 8009BDE4 AFA80020 */ sw $t0, 0x20($sp) -/* 09C9E8 8009BDE8 01946821 */ addu $t5, $t4, $s4 -/* 09C9EC 8009BDEC AFAD001C */ sw $t5, 0x1c($sp) -/* 09C9F0 8009BDF0 AFA20024 */ sw $v0, 0x24($sp) -/* 09C9F4 8009BDF4 0C025F96 */ jal func_80097E58 -/* 09C9F8 8009BDF8 AFA30028 */ sw $v1, 0x28($sp) -/* 09C9FC 8009BDFC 1000002B */ b .L8009BEAC -/* 09CA00 8009BE00 00408825 */ move $s1, $v0 -.L8009BE04: -/* 09CA04 8009BE04 96020008 */ lhu $v0, 8($s0) -/* 09CA08 8009BE08 02202025 */ move $a0, $s1 -/* 09CA0C 8009BE0C 00002825 */ move $a1, $zero -/* 09CA10 8009BE10 AFA20010 */ sw $v0, 0x10($sp) -/* 09CA14 8009BE14 9603000A */ lhu $v1, 0xa($s0) -/* 09CA18 8009BE18 00003025 */ move $a2, $zero -/* 09CA1C 8009BE1C 00003825 */ move $a3, $zero -/* 09CA20 8009BE20 AFA30014 */ sw $v1, 0x14($sp) -/* 09CA24 8009BE24 960E000C */ lhu $t6, 0xc($s0) -/* 09CA28 8009BE28 01D37821 */ addu $t7, $t6, $s3 -/* 09CA2C 8009BE2C AFAF0018 */ sw $t7, 0x18($sp) -/* 09CA30 8009BE30 9618000E */ lhu $t8, 0xe($s0) -/* 09CA34 8009BE34 AFA80020 */ sw $t0, 0x20($sp) -/* 09CA38 8009BE38 AFA20024 */ sw $v0, 0x24($sp) -/* 09CA3C 8009BE3C 0314C821 */ addu $t9, $t8, $s4 -/* 09CA40 8009BE40 AFB9001C */ sw $t9, 0x1c($sp) -/* 09CA44 8009BE44 0C025E85 */ jal func_80097A14 -/* 09CA48 8009BE48 AFA30028 */ sw $v1, 0x28($sp) -/* 09CA4C 8009BE4C 10000017 */ b .L8009BEAC -/* 09CA50 8009BE50 00408825 */ move $s1, $v0 -/* 09CA54 8009BE54 AFA00010 */ sw $zero, 0x10($sp) -.L8009BE58: -/* 09CA58 8009BE58 AFA00014 */ sw $zero, 0x14($sp) -/* 09CA5C 8009BE5C 96020008 */ lhu $v0, 8($s0) -/* 09CA60 8009BE60 02202025 */ move $a0, $s1 -/* 09CA64 8009BE64 00002825 */ move $a1, $zero -/* 09CA68 8009BE68 AFA20018 */ sw $v0, 0x18($sp) -/* 09CA6C 8009BE6C 9603000A */ lhu $v1, 0xa($s0) -/* 09CA70 8009BE70 24060400 */ li $a2, 1024 -/* 09CA74 8009BE74 24070400 */ li $a3, 1024 -/* 09CA78 8009BE78 AFA3001C */ sw $v1, 0x1c($sp) -/* 09CA7C 8009BE7C 9609000C */ lhu $t1, 0xc($s0) -/* 09CA80 8009BE80 01335021 */ addu $t2, $t1, $s3 -/* 09CA84 8009BE84 AFAA0020 */ sw $t2, 0x20($sp) -/* 09CA88 8009BE88 960B000E */ lhu $t3, 0xe($s0) -/* 09CA8C 8009BE8C AFB50034 */ sw $s5, 0x34($sp) -/* 09CA90 8009BE90 AFA80028 */ sw $t0, 0x28($sp) -/* 09CA94 8009BE94 01746021 */ addu $t4, $t3, $s4 -/* 09CA98 8009BE98 AFAC0024 */ sw $t4, 0x24($sp) -/* 09CA9C 8009BE9C AFA2002C */ sw $v0, 0x2c($sp) -/* 09CAA0 8009BEA0 0C025C9D */ jal func_80097274 -/* 09CAA4 8009BEA4 AFA30030 */ sw $v1, 0x30($sp) -/* 09CAA8 8009BEA8 00408825 */ move $s1, $v0 -.L8009BEAC: -/* 09CAAC 8009BEAC 8E0D0018 */ lw $t5, 0x18($s0) -.L8009BEB0: -/* 09CAB0 8009BEB0 26100014 */ addiu $s0, $s0, 0x14 -/* 09CAB4 8009BEB4 55A0FF92 */ bnel $t5, $zero, .L8009BD00 -/* 09CAB8 8009BEB8 86020000 */ lh $v0, ($s0) -.L8009BEBC: -/* 09CABC 8009BEBC 8FBF0064 */ lw $ra, 0x64($sp) -/* 09CAC0 8009BEC0 02201025 */ move $v0, $s1 -/* 09CAC4 8009BEC4 8FB10044 */ lw $s1, 0x44($sp) -/* 09CAC8 8009BEC8 8FB00040 */ lw $s0, 0x40($sp) -/* 09CACC 8009BECC 8FB20048 */ lw $s2, 0x48($sp) -/* 09CAD0 8009BED0 8FB3004C */ lw $s3, 0x4c($sp) -/* 09CAD4 8009BED4 8FB40050 */ lw $s4, 0x50($sp) -/* 09CAD8 8009BED8 8FB50054 */ lw $s5, 0x54($sp) -/* 09CADC 8009BEDC 8FB60058 */ lw $s6, 0x58($sp) -/* 09CAE0 8009BEE0 8FB7005C */ lw $s7, 0x5c($sp) -/* 09CAE4 8009BEE4 8FBE0060 */ lw $fp, 0x60($sp) -/* 09CAE8 8009BEE8 03E00008 */ jr $ra -/* 09CAEC 8009BEEC 27BD0068 */ addiu $sp, $sp, 0x68 diff --git a/asm/non_matchings/code_80091750/func_8009BEF0.s b/asm/non_matchings/code_80091750/func_8009BEF0.s deleted file mode 100644 index db3b50f79..000000000 --- a/asm/non_matchings/code_80091750/func_8009BEF0.s +++ /dev/null @@ -1,217 +0,0 @@ -glabel func_8009BEF0 -/* 09CAF0 8009BEF0 27BDFF88 */ addiu $sp, $sp, -0x78 -/* 09CAF4 8009BEF4 AFB10058 */ sw $s1, 0x58($sp) -/* 09CAF8 8009BEF8 F7BA0038 */ sdc1 $f26, 0x38($sp) -/* 09CAFC 8009BEFC F7B80030 */ sdc1 $f24, 0x30($sp) -/* 09CB00 8009BF00 4486C000 */ mtc1 $a2, $f24 -/* 09CB04 8009BF04 4487D000 */ mtc1 $a3, $f26 -/* 09CB08 8009BF08 00808825 */ move $s1, $a0 -/* 09CB0C 8009BF0C AFBF0074 */ sw $ra, 0x74($sp) -/* 09CB10 8009BF10 AFB70070 */ sw $s7, 0x70($sp) -/* 09CB14 8009BF14 AFB6006C */ sw $s6, 0x6c($sp) -/* 09CB18 8009BF18 AFB50068 */ sw $s5, 0x68($sp) -/* 09CB1C 8009BF1C AFB40064 */ sw $s4, 0x64($sp) -/* 09CB20 8009BF20 AFB30060 */ sw $s3, 0x60($sp) -/* 09CB24 8009BF24 AFB2005C */ sw $s2, 0x5c($sp) -/* 09CB28 8009BF28 AFB00054 */ sw $s0, 0x54($sp) -/* 09CB2C 8009BF2C F7BE0048 */ sdc1 $f30, 0x48($sp) -/* 09CB30 8009BF30 F7BC0040 */ sdc1 $f28, 0x40($sp) -/* 09CB34 8009BF34 F7B60028 */ sdc1 $f22, 0x28($sp) -/* 09CB38 8009BF38 F7B40020 */ sdc1 $f20, 0x20($sp) -/* 09CB3C 8009BF3C 0C026449 */ jal segmented_to_virtual_dupe -/* 09CB40 8009BF40 00A02025 */ move $a0, $a1 -/* 09CB44 8009BF44 8C4E0004 */ lw $t6, 4($v0) -/* 09CB48 8009BF48 00408025 */ move $s0, $v0 -/* 09CB4C 8009BF4C 3C0143A0 */ li $at, 0x43A00000 # 320.000000 -/* 09CB50 8009BF50 11C0009A */ beqz $t6, .L8009C1BC -/* 09CB54 8009BF54 C7B60090 */ lwc1 $f22, 0x90($sp) -/* 09CB58 8009BF58 3C170200 */ lui $s7, %hi(D_020077F8) # $s7, 0x200 -/* 09CB5C 8009BF5C 3C160200 */ lui $s6, %hi(D_02007818) # $s6, 0x200 -/* 09CB60 8009BF60 4481F000 */ mtc1 $at, $f30 -/* 09CB64 8009BF64 4480E000 */ mtc1 $zero, $f28 -/* 09CB68 8009BF68 26D67818 */ addiu $s6, %lo(D_02007818) # addiu $s6, $s6, 0x7818 -/* 09CB6C 8009BF6C 26F777F8 */ addiu $s7, %lo(D_020077F8) # addiu $s7, $s7, 0x77f8 -/* 09CB70 8009BF70 C7B4008C */ lwc1 $f20, 0x8c($sp) -/* 09CB74 8009BF74 24150002 */ li $s5, 2 -/* 09CB78 8009BF78 24140001 */ li $s4, 1 -/* 09CB7C 8009BF7C 3C130600 */ lui $s3, 0x600 -/* 09CB80 8009BF80 8FB20088 */ lw $s2, 0x88($sp) -/* 09CB84 8009BF84 960F000C */ lhu $t7, 0xc($s0) -.L8009BF88: -/* 09CB88 8009BF88 00001025 */ move $v0, $zero -/* 09CB8C 8009BF8C 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 -/* 09CB90 8009BF90 448F2000 */ mtc1 $t7, $f4 -/* 09CB94 8009BF94 05E10004 */ bgez $t7, .L8009BFA8 -/* 09CB98 8009BF98 468021A0 */ cvt.s.w $f6, $f4 -/* 09CB9C 8009BF9C 44814000 */ mtc1 $at, $f8 -/* 09CBA0 8009BFA0 00000000 */ nop -/* 09CBA4 8009BFA4 46083180 */ add.s $f6, $f6, $f8 -.L8009BFA8: -/* 09CBA8 8009BFA8 46183000 */ add.s $f0, $f6, $f24 -/* 09CBAC 8009BFAC 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 -/* 09CBB0 8009BFB0 4600F03C */ c.lt.s $f30, $f0 -/* 09CBB4 8009BFB4 00000000 */ nop -/* 09CBB8 8009BFB8 45020003 */ bc1fl .L8009BFC8 -/* 09CBBC 8009BFBC 96180008 */ lhu $t8, 8($s0) -/* 09CBC0 8009BFC0 02801025 */ move $v0, $s4 -/* 09CBC4 8009BFC4 96180008 */ lhu $t8, 8($s0) -.L8009BFC8: -/* 09CBC8 8009BFC8 44985000 */ mtc1 $t8, $f10 -/* 09CBCC 8009BFCC 07010004 */ bgez $t8, .L8009BFE0 -/* 09CBD0 8009BFD0 46805420 */ cvt.s.w $f16, $f10 -/* 09CBD4 8009BFD4 44819000 */ mtc1 $at, $f18 -/* 09CBD8 8009BFD8 00000000 */ nop -/* 09CBDC 8009BFDC 46128400 */ add.s $f16, $f16, $f18 -.L8009BFE0: -/* 09CBE0 8009BFE0 46148102 */ mul.s $f4, $f16, $f20 -/* 09CBE4 8009BFE4 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 -/* 09CBE8 8009BFE8 46040000 */ add.s $f0, $f0, $f4 -/* 09CBEC 8009BFEC 461C003C */ c.lt.s $f0, $f28 -/* 09CBF0 8009BFF0 00000000 */ nop -/* 09CBF4 8009BFF4 45020003 */ bc1fl .L8009C004 -/* 09CBF8 8009BFF8 9619000E */ lhu $t9, 0xe($s0) -/* 09CBFC 8009BFFC 24420001 */ addiu $v0, $v0, 1 -/* 09CC00 8009C000 9619000E */ lhu $t9, 0xe($s0) -.L8009C004: -/* 09CC04 8009C004 44994000 */ mtc1 $t9, $f8 -/* 09CC08 8009C008 07210004 */ bgez $t9, .L8009C01C -/* 09CC0C 8009C00C 468041A0 */ cvt.s.w $f6, $f8 -/* 09CC10 8009C010 44815000 */ mtc1 $at, $f10 -/* 09CC14 8009C014 00000000 */ nop -/* 09CC18 8009C018 460A3180 */ add.s $f6, $f6, $f10 -.L8009C01C: -/* 09CC1C 8009C01C 461A3000 */ add.s $f0, $f6, $f26 -/* 09CC20 8009C020 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 -/* 09CC24 8009C024 461C003C */ c.lt.s $f0, $f28 -/* 09CC28 8009C028 00000000 */ nop -/* 09CC2C 8009C02C 45020003 */ bc1fl .L8009C03C -/* 09CC30 8009C030 9608000A */ lhu $t0, 0xa($s0) -/* 09CC34 8009C034 24420001 */ addiu $v0, $v0, 1 -/* 09CC38 8009C038 9608000A */ lhu $t0, 0xa($s0) -.L8009C03C: -/* 09CC3C 8009C03C 44889000 */ mtc1 $t0, $f18 -/* 09CC40 8009C040 05010004 */ bgez $t0, .L8009C054 -/* 09CC44 8009C044 46809420 */ cvt.s.w $f16, $f18 -/* 09CC48 8009C048 44812000 */ mtc1 $at, $f4 -/* 09CC4C 8009C04C 00000000 */ nop -/* 09CC50 8009C050 46048400 */ add.s $f16, $f16, $f4 -.L8009C054: -/* 09CC54 8009C054 46168202 */ mul.s $f8, $f16, $f22 -/* 09CC58 8009C058 3C014370 */ li $at, 0x43700000 # 240.000000 -/* 09CC5C 8009C05C 44815000 */ mtc1 $at, $f10 -/* 09CC60 8009C060 46080001 */ sub.s $f0, $f0, $f8 -/* 09CC64 8009C064 4600503C */ c.lt.s $f10, $f0 -/* 09CC68 8009C068 00000000 */ nop -/* 09CC6C 8009C06C 45000002 */ bc1f .L8009C078 -/* 09CC70 8009C070 00000000 */ nop -/* 09CC74 8009C074 24420001 */ addiu $v0, $v0, 1 -.L8009C078: -/* 09CC78 8009C078 10400003 */ beqz $v0, .L8009C088 -/* 09CC7C 8009C07C 00000000 */ nop -/* 09CC80 8009C080 1000004B */ b .L8009C1B0 -/* 09CC84 8009C084 26100014 */ addiu $s0, $s0, 0x14 -.L8009C088: -/* 09CC88 8009C088 0C026E31 */ jal func_8009B8C4 -/* 09CC8C 8009C08C 8E040004 */ lw $a0, 4($s0) -/* 09CC90 8009C090 10400046 */ beqz $v0, .L8009C1AC -/* 09CC94 8009C094 00402825 */ move $a1, $v0 -/* 09CC98 8009C098 52540006 */ beql $s2, $s4, .L8009C0B4 -/* 09CC9C 8009C09C AE330000 */ sw $s3, ($s1) -/* 09CCA0 8009C0A0 52550024 */ beql $s2, $s5, .L8009C134 -/* 09CCA4 8009C0A4 AE330000 */ sw $s3, ($s1) -/* 09CCA8 8009C0A8 10000041 */ b .L8009C1B0 -/* 09CCAC 8009C0AC 26100014 */ addiu $s0, $s0, 0x14 -/* 09CCB0 8009C0B0 AE330000 */ sw $s3, ($s1) -.L8009C0B4: -/* 09CCB4 8009C0B4 AE370004 */ sw $s7, 4($s1) -/* 09CCB8 8009C0B8 9609000C */ lhu $t1, 0xc($s0) -/* 09CCBC 8009C0BC 26240008 */ addiu $a0, $s1, 8 -/* 09CCC0 8009C0C0 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 -/* 09CCC4 8009C0C4 44893000 */ mtc1 $t1, $f6 -/* 09CCC8 8009C0C8 05210004 */ bgez $t1, .L8009C0DC -/* 09CCCC 8009C0CC 468034A0 */ cvt.s.w $f18, $f6 -/* 09CCD0 8009C0D0 44812000 */ mtc1 $at, $f4 -/* 09CCD4 8009C0D4 00000000 */ nop -/* 09CCD8 8009C0D8 46049480 */ add.s $f18, $f18, $f4 -.L8009C0DC: -/* 09CCDC 8009C0DC 46189400 */ add.s $f16, $f18, $f24 -/* 09CCE0 8009C0E0 960A000E */ lhu $t2, 0xe($s0) -/* 09CCE4 8009C0E4 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 -/* 09CCE8 8009C0E8 448A4000 */ mtc1 $t2, $f8 -/* 09CCEC 8009C0EC 44068000 */ mfc1 $a2, $f16 -/* 09CCF0 8009C0F0 05410004 */ bgez $t2, .L8009C104 -/* 09CCF4 8009C0F4 468042A0 */ cvt.s.w $f10, $f8 -/* 09CCF8 8009C0F8 44813000 */ mtc1 $at, $f6 -/* 09CCFC 8009C0FC 00000000 */ nop -/* 09CD00 8009C100 46065280 */ add.s $f10, $f10, $f6 -.L8009C104: -/* 09CD04 8009C104 960B0008 */ lhu $t3, 8($s0) -/* 09CD08 8009C108 461A5100 */ add.s $f4, $f10, $f26 -/* 09CD0C 8009C10C AFAB0010 */ sw $t3, 0x10($sp) -/* 09CD10 8009C110 960C000A */ lhu $t4, 0xa($s0) -/* 09CD14 8009C114 44072000 */ mfc1 $a3, $f4 -/* 09CD18 8009C118 E7B6001C */ swc1 $f22, 0x1c($sp) -/* 09CD1C 8009C11C E7B40018 */ swc1 $f20, 0x18($sp) -/* 09CD20 8009C120 0C0256F4 */ jal func_80095BD0 -/* 09CD24 8009C124 AFAC0014 */ sw $t4, 0x14($sp) -/* 09CD28 8009C128 10000020 */ b .L8009C1AC -/* 09CD2C 8009C12C 00408825 */ move $s1, $v0 -/* 09CD30 8009C130 AE330000 */ sw $s3, ($s1) -.L8009C134: -/* 09CD34 8009C134 AE360004 */ sw $s6, 4($s1) -/* 09CD38 8009C138 960D000C */ lhu $t5, 0xc($s0) -/* 09CD3C 8009C13C 26240008 */ addiu $a0, $s1, 8 -/* 09CD40 8009C140 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 -/* 09CD44 8009C144 448D9000 */ mtc1 $t5, $f18 -/* 09CD48 8009C148 05A10004 */ bgez $t5, .L8009C15C -/* 09CD4C 8009C14C 46809420 */ cvt.s.w $f16, $f18 -/* 09CD50 8009C150 44814000 */ mtc1 $at, $f8 -/* 09CD54 8009C154 00000000 */ nop -/* 09CD58 8009C158 46088400 */ add.s $f16, $f16, $f8 -.L8009C15C: -/* 09CD5C 8009C15C 46188180 */ add.s $f6, $f16, $f24 -/* 09CD60 8009C160 960E000E */ lhu $t6, 0xe($s0) -/* 09CD64 8009C164 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 -/* 09CD68 8009C168 448E5000 */ mtc1 $t6, $f10 -/* 09CD6C 8009C16C 44063000 */ mfc1 $a2, $f6 -/* 09CD70 8009C170 05C10004 */ bgez $t6, .L8009C184 -/* 09CD74 8009C174 46805120 */ cvt.s.w $f4, $f10 -/* 09CD78 8009C178 44819000 */ mtc1 $at, $f18 -/* 09CD7C 8009C17C 00000000 */ nop -/* 09CD80 8009C180 46122100 */ add.s $f4, $f4, $f18 -.L8009C184: -/* 09CD84 8009C184 960F0008 */ lhu $t7, 8($s0) -/* 09CD88 8009C188 461A2200 */ add.s $f8, $f4, $f26 -/* 09CD8C 8009C18C AFAF0010 */ sw $t7, 0x10($sp) -/* 09CD90 8009C190 9618000A */ lhu $t8, 0xa($s0) -/* 09CD94 8009C194 44074000 */ mfc1 $a3, $f8 -/* 09CD98 8009C198 E7B6001C */ swc1 $f22, 0x1c($sp) -/* 09CD9C 8009C19C E7B40018 */ swc1 $f20, 0x18($sp) -/* 09CDA0 8009C1A0 0C0256F4 */ jal func_80095BD0 -/* 09CDA4 8009C1A4 AFB80014 */ sw $t8, 0x14($sp) -/* 09CDA8 8009C1A8 00408825 */ move $s1, $v0 -.L8009C1AC: -/* 09CDAC 8009C1AC 26100014 */ addiu $s0, $s0, 0x14 -.L8009C1B0: -/* 09CDB0 8009C1B0 8E190004 */ lw $t9, 4($s0) -/* 09CDB4 8009C1B4 5720FF74 */ bnel $t9, $zero, .L8009BF88 -/* 09CDB8 8009C1B8 960F000C */ lhu $t7, 0xc($s0) -.L8009C1BC: -/* 09CDBC 8009C1BC 8FBF0074 */ lw $ra, 0x74($sp) -/* 09CDC0 8009C1C0 02201025 */ move $v0, $s1 -/* 09CDC4 8009C1C4 8FB10058 */ lw $s1, 0x58($sp) -/* 09CDC8 8009C1C8 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 09CDCC 8009C1CC D7B60028 */ ldc1 $f22, 0x28($sp) -/* 09CDD0 8009C1D0 D7B80030 */ ldc1 $f24, 0x30($sp) -/* 09CDD4 8009C1D4 D7BA0038 */ ldc1 $f26, 0x38($sp) -/* 09CDD8 8009C1D8 D7BC0040 */ ldc1 $f28, 0x40($sp) -/* 09CDDC 8009C1DC D7BE0048 */ ldc1 $f30, 0x48($sp) -/* 09CDE0 8009C1E0 8FB00054 */ lw $s0, 0x54($sp) -/* 09CDE4 8009C1E4 8FB2005C */ lw $s2, 0x5c($sp) -/* 09CDE8 8009C1E8 8FB30060 */ lw $s3, 0x60($sp) -/* 09CDEC 8009C1EC 8FB40064 */ lw $s4, 0x64($sp) -/* 09CDF0 8009C1F0 8FB50068 */ lw $s5, 0x68($sp) -/* 09CDF4 8009C1F4 8FB6006C */ lw $s6, 0x6c($sp) -/* 09CDF8 8009C1F8 8FB70070 */ lw $s7, 0x70($sp) -/* 09CDFC 8009C1FC 03E00008 */ jr $ra -/* 09CE00 8009C200 27BD0078 */ addiu $sp, $sp, 0x78 diff --git a/asm/non_matchings/code_80091750/func_8009C204.s b/asm/non_matchings/code_80091750/func_8009C204.s deleted file mode 100644 index 0c9f43291..000000000 --- a/asm/non_matchings/code_80091750/func_8009C204.s +++ /dev/null @@ -1,158 +0,0 @@ -.section .late_rodata - -glabel D_800F1074 -.float 0.457 - -.section .text - -glabel func_8009C204 -/* 09CE04 8009C204 27BDFF80 */ addiu $sp, $sp, -0x80 -/* 09CE08 8009C208 AFB00058 */ sw $s0, 0x58($sp) -/* 09CE0C 8009C20C 00808025 */ move $s0, $a0 -/* 09CE10 8009C210 AFBF007C */ sw $ra, 0x7c($sp) -/* 09CE14 8009C214 AFBE0078 */ sw $fp, 0x78($sp) -/* 09CE18 8009C218 AFB70074 */ sw $s7, 0x74($sp) -/* 09CE1C 8009C21C 00C0B825 */ move $s7, $a2 -/* 09CE20 8009C220 00E0F025 */ move $fp, $a3 -/* 09CE24 8009C224 AFB60070 */ sw $s6, 0x70($sp) -/* 09CE28 8009C228 AFB5006C */ sw $s5, 0x6c($sp) -/* 09CE2C 8009C22C AFB40068 */ sw $s4, 0x68($sp) -/* 09CE30 8009C230 AFB30064 */ sw $s3, 0x64($sp) -/* 09CE34 8009C234 AFB20060 */ sw $s2, 0x60($sp) -/* 09CE38 8009C238 AFB1005C */ sw $s1, 0x5c($sp) -/* 09CE3C 8009C23C F7B60050 */ sdc1 $f22, 0x50($sp) -/* 09CE40 8009C240 F7B40048 */ sdc1 $f20, 0x48($sp) -/* 09CE44 8009C244 0C026449 */ jal segmented_to_virtual_dupe -/* 09CE48 8009C248 00A02025 */ move $a0, $a1 -/* 09CE4C 8009C24C 8C4E0004 */ lw $t6, 4($v0) -/* 09CE50 8009C250 00408825 */ move $s1, $v0 -/* 09CE54 8009C254 3C01800F */ lui $at, %hi(D_800F1074) # $at, 0x800f -/* 09CE58 8009C258 11C00067 */ beqz $t6, .L8009C3F8 -/* 09CE5C 8009C25C 3C160200 */ lui $s6, %hi(D_02007728) # $s6, 0x200 -/* 09CE60 8009C260 C4361074 */ lwc1 $f22, %lo(D_800F1074)($at) -/* 09CE64 8009C264 3C013F00 */ li $at, 0x3F000000 # 0.500000 -/* 09CE68 8009C268 4481A000 */ mtc1 $at, $f20 -/* 09CE6C 8009C26C 26D67728 */ addiu $s6, %lo(D_02007728) # addiu $s6, $s6, 0x7728 -/* 09CE70 8009C270 24150003 */ li $s5, 3 -/* 09CE74 8009C274 8FB40090 */ lw $s4, 0x90($sp) -/* 09CE78 8009C278 3C130600 */ lui $s3, 0x600 -/* 09CE7C 8009C27C 86220000 */ lh $v0, ($s1) -.L8009C280: -/* 09CE80 8009C280 3C0F0200 */ lui $t7, %hi(D_02007708) # $t7, 0x200 -/* 09CE84 8009C284 00009025 */ move $s2, $zero -/* 09CE88 8009C288 1040000B */ beqz $v0, .L8009C2B8 -/* 09CE8C 8009C28C 25EF7708 */ addiu $t7, %lo(D_02007708) # addiu $t7, $t7, 0x7708 -/* 09CE90 8009C290 24010001 */ li $at, 1 -/* 09CE94 8009C294 5041000E */ beql $v0, $at, .L8009C2D0 -/* 09CE98 8009C298 02001025 */ move $v0, $s0 -/* 09CE9C 8009C29C 10550010 */ beq $v0, $s5, .L8009C2E0 -/* 09CEA0 8009C2A0 3C180200 */ lui $t8, %hi(D_02007768) # $t8, 0x200 -/* 09CEA4 8009C2A4 02001025 */ move $v0, $s0 -/* 09CEA8 8009C2A8 AC530000 */ sw $s3, ($v0) -/* 09CEAC 8009C2AC AC560004 */ sw $s6, 4($v0) -/* 09CEB0 8009C2B0 10000011 */ b .L8009C2F8 -/* 09CEB4 8009C2B4 26100008 */ addiu $s0, $s0, 8 -.L8009C2B8: -/* 09CEB8 8009C2B8 02001025 */ move $v0, $s0 -/* 09CEBC 8009C2BC AC530000 */ sw $s3, ($v0) -/* 09CEC0 8009C2C0 AC4F0004 */ sw $t7, 4($v0) -/* 09CEC4 8009C2C4 1000000C */ b .L8009C2F8 -/* 09CEC8 8009C2C8 26100008 */ addiu $s0, $s0, 8 -/* 09CECC 8009C2CC 02001025 */ move $v0, $s0 -.L8009C2D0: -/* 09CED0 8009C2D0 AC530000 */ sw $s3, ($v0) -/* 09CED4 8009C2D4 AC560004 */ sw $s6, 4($v0) -/* 09CED8 8009C2D8 10000007 */ b .L8009C2F8 -/* 09CEDC 8009C2DC 26100008 */ addiu $s0, $s0, 8 -.L8009C2E0: -/* 09CEE0 8009C2E0 02001025 */ move $v0, $s0 -/* 09CEE4 8009C2E4 27187768 */ addiu $t8, %lo(D_02007768) # addiu $t8, $t8, 0x7768 -/* 09CEE8 8009C2E8 AC580004 */ sw $t8, 4($v0) -/* 09CEEC 8009C2EC AC530000 */ sw $s3, ($v0) -/* 09CEF0 8009C2F0 26100008 */ addiu $s0, $s0, 8 -/* 09CEF4 8009C2F4 02A09025 */ move $s2, $s5 -.L8009C2F8: -/* 09CEF8 8009C2F8 0C026E31 */ jal func_8009B8C4 -/* 09CEFC 8009C2FC 8E240004 */ lw $a0, 4($s1) -/* 09CF00 8009C300 24010002 */ li $at, 2 -/* 09CF04 8009C304 12810005 */ beq $s4, $at, .L8009C31C -/* 09CF08 8009C308 00404025 */ move $t0, $v0 -/* 09CF0C 8009C30C 5295001E */ beql $s4, $s5, .L8009C388 -/* 09CF10 8009C310 E7B60010 */ swc1 $f22, 0x10($sp) -/* 09CF14 8009C314 10000035 */ b .L8009C3EC -/* 09CF18 8009C318 8E290018 */ lw $t1, 0x18($s1) -.L8009C31C: -/* 09CF1C 8009C31C E7B40010 */ swc1 $f20, 0x10($sp) -/* 09CF20 8009C320 E7B40014 */ swc1 $f20, 0x14($sp) -/* 09CF24 8009C324 AFA00018 */ sw $zero, 0x18($sp) -/* 09CF28 8009C328 AFA0001C */ sw $zero, 0x1c($sp) -/* 09CF2C 8009C32C 96220008 */ lhu $v0, 8($s1) -/* 09CF30 8009C330 00122E00 */ sll $a1, $s2, 0x18 -/* 09CF34 8009C334 0005CE03 */ sra $t9, $a1, 0x18 -/* 09CF38 8009C338 AFA20020 */ sw $v0, 0x20($sp) -/* 09CF3C 8009C33C 9623000A */ lhu $v1, 0xa($s1) -/* 09CF40 8009C340 03202825 */ move $a1, $t9 -/* 09CF44 8009C344 02002025 */ move $a0, $s0 -/* 09CF48 8009C348 AFA30024 */ sw $v1, 0x24($sp) -/* 09CF4C 8009C34C 9629000C */ lhu $t1, 0xc($s1) -/* 09CF50 8009C350 24060400 */ li $a2, 1024 -/* 09CF54 8009C354 24070400 */ li $a3, 1024 -/* 09CF58 8009C358 01375021 */ addu $t2, $t1, $s7 -/* 09CF5C 8009C35C AFAA0028 */ sw $t2, 0x28($sp) -/* 09CF60 8009C360 962B000E */ lhu $t3, 0xe($s1) -/* 09CF64 8009C364 AFA80030 */ sw $t0, 0x30($sp) -/* 09CF68 8009C368 AFA20034 */ sw $v0, 0x34($sp) -/* 09CF6C 8009C36C 017E6021 */ addu $t4, $t3, $fp -/* 09CF70 8009C370 AFAC002C */ sw $t4, 0x2c($sp) -/* 09CF74 8009C374 0C0258FC */ jal func_800963F0 -/* 09CF78 8009C378 AFA30038 */ sw $v1, 0x38($sp) -/* 09CF7C 8009C37C 1000001A */ b .L8009C3E8 -/* 09CF80 8009C380 00408025 */ move $s0, $v0 -/* 09CF84 8009C384 E7B60010 */ swc1 $f22, 0x10($sp) -.L8009C388: -/* 09CF88 8009C388 E7B40014 */ swc1 $f20, 0x14($sp) -/* 09CF8C 8009C38C AFA00018 */ sw $zero, 0x18($sp) -/* 09CF90 8009C390 AFA0001C */ sw $zero, 0x1c($sp) -/* 09CF94 8009C394 96220008 */ lhu $v0, 8($s1) -/* 09CF98 8009C398 00122E00 */ sll $a1, $s2, 0x18 -/* 09CF9C 8009C39C 00056E03 */ sra $t5, $a1, 0x18 -/* 09CFA0 8009C3A0 AFA20020 */ sw $v0, 0x20($sp) -/* 09CFA4 8009C3A4 9623000A */ lhu $v1, 0xa($s1) -/* 09CFA8 8009C3A8 01A02825 */ move $a1, $t5 -/* 09CFAC 8009C3AC 02002025 */ move $a0, $s0 -/* 09CFB0 8009C3B0 AFA30024 */ sw $v1, 0x24($sp) -/* 09CFB4 8009C3B4 962E000C */ lhu $t6, 0xc($s1) -/* 09CFB8 8009C3B8 24060400 */ li $a2, 1024 -/* 09CFBC 8009C3BC 24070400 */ li $a3, 1024 -/* 09CFC0 8009C3C0 01D77821 */ addu $t7, $t6, $s7 -/* 09CFC4 8009C3C4 AFAF0028 */ sw $t7, 0x28($sp) -/* 09CFC8 8009C3C8 9638000E */ lhu $t8, 0xe($s1) -/* 09CFCC 8009C3CC AFA80030 */ sw $t0, 0x30($sp) -/* 09CFD0 8009C3D0 AFA20034 */ sw $v0, 0x34($sp) -/* 09CFD4 8009C3D4 031EC821 */ addu $t9, $t8, $fp -/* 09CFD8 8009C3D8 AFB9002C */ sw $t9, 0x2c($sp) -/* 09CFDC 8009C3DC 0C0258FC */ jal func_800963F0 -/* 09CFE0 8009C3E0 AFA30038 */ sw $v1, 0x38($sp) -/* 09CFE4 8009C3E4 00408025 */ move $s0, $v0 -.L8009C3E8: -/* 09CFE8 8009C3E8 8E290018 */ lw $t1, 0x18($s1) -.L8009C3EC: -/* 09CFEC 8009C3EC 26310014 */ addiu $s1, $s1, 0x14 -/* 09CFF0 8009C3F0 5520FFA3 */ bnel $t1, $zero, .L8009C280 -/* 09CFF4 8009C3F4 86220000 */ lh $v0, ($s1) -.L8009C3F8: -/* 09CFF8 8009C3F8 8FBF007C */ lw $ra, 0x7c($sp) -/* 09CFFC 8009C3FC 02001025 */ move $v0, $s0 -/* 09D000 8009C400 8FB00058 */ lw $s0, 0x58($sp) -/* 09D004 8009C404 D7B40048 */ ldc1 $f20, 0x48($sp) -/* 09D008 8009C408 D7B60050 */ ldc1 $f22, 0x50($sp) -/* 09D00C 8009C40C 8FB1005C */ lw $s1, 0x5c($sp) -/* 09D010 8009C410 8FB20060 */ lw $s2, 0x60($sp) -/* 09D014 8009C414 8FB30064 */ lw $s3, 0x64($sp) -/* 09D018 8009C418 8FB40068 */ lw $s4, 0x68($sp) -/* 09D01C 8009C41C 8FB5006C */ lw $s5, 0x6c($sp) -/* 09D020 8009C420 8FB60070 */ lw $s6, 0x70($sp) -/* 09D024 8009C424 8FB70074 */ lw $s7, 0x74($sp) -/* 09D028 8009C428 8FBE0078 */ lw $fp, 0x78($sp) -/* 09D02C 8009C42C 03E00008 */ jr $ra -/* 09D030 8009C430 27BD0080 */ addiu $sp, $sp, 0x80 diff --git a/asm/non_matchings/code_80091750/func_8009C434.s b/asm/non_matchings/code_80091750/func_8009C434.s deleted file mode 100644 index fbeda6d26..000000000 --- a/asm/non_matchings/code_80091750/func_8009C434.s +++ /dev/null @@ -1,193 +0,0 @@ -glabel func_8009C434 -/* 09D034 8009C434 27BDFF88 */ addiu $sp, $sp, -0x78 -/* 09D038 8009C438 AFBF0074 */ sw $ra, 0x74($sp) -/* 09D03C 8009C43C AFBE0070 */ sw $fp, 0x70($sp) -/* 09D040 8009C440 AFB7006C */ sw $s7, 0x6c($sp) -/* 09D044 8009C444 AFB60068 */ sw $s6, 0x68($sp) -/* 09D048 8009C448 AFB50064 */ sw $s5, 0x64($sp) -/* 09D04C 8009C44C AFB40060 */ sw $s4, 0x60($sp) -/* 09D050 8009C450 AFB3005C */ sw $s3, 0x5c($sp) -/* 09D054 8009C454 AFB20058 */ sw $s2, 0x58($sp) -/* 09D058 8009C458 AFB10054 */ sw $s1, 0x54($sp) -/* 09D05C 8009C45C AFB00050 */ sw $s0, 0x50($sp) -/* 09D060 8009C460 F7B40048 */ sdc1 $f20, 0x48($sp) -/* 09D064 8009C464 8CAF0004 */ lw $t7, 4($a1) -/* 09D068 8009C468 8CAE0000 */ lw $t6, ($a1) -/* 09D06C 8009C46C 00808825 */ move $s1, $a0 -/* 09D070 8009C470 000FC0C0 */ sll $t8, $t7, 3 -/* 09D074 8009C474 01D8C821 */ addu $t9, $t6, $t8 -/* 09D078 8009C478 00A0A825 */ move $s5, $a1 -/* 09D07C 8009C47C 00C0B025 */ move $s6, $a2 -/* 09D080 8009C480 00E0B825 */ move $s7, $a3 -/* 09D084 8009C484 0C026449 */ jal segmented_to_virtual_dupe -/* 09D088 8009C488 8F240000 */ lw $a0, ($t9) -/* 09D08C 8009C48C 8C4A0004 */ lw $t2, 4($v0) -/* 09D090 8009C490 00408025 */ move $s0, $v0 -/* 09D094 8009C494 3C013F00 */ li $at, 0x3F000000 # 0.500000 -/* 09D098 8009C498 1140008D */ beqz $t2, .L8009C6D0 -/* 09D09C 8009C49C 3C1E0200 */ lui $fp, %hi(D_02007728) # $fp, 0x200 -/* 09D0A0 8009C4A0 3C148019 */ lui $s4, %hi(D_8018D9B0) # $s4, 0x8019 -/* 09D0A4 8009C4A4 4481A000 */ mtc1 $at, $f20 -/* 09D0A8 8009C4A8 2694D9B0 */ addiu $s4, %lo(D_8018D9B0) # addiu $s4, $s4, -0x2650 -/* 09D0AC 8009C4AC 27DE7728 */ addiu $fp, %lo(D_02007728) # addiu $fp, $fp, 0x7728 -/* 09D0B0 8009C4B0 3C130600 */ lui $s3, 0x600 -/* 09D0B4 8009C4B4 8FB20088 */ lw $s2, 0x88($sp) -/* 09D0B8 8009C4B8 86020000 */ lh $v0, ($s0) -.L8009C4BC: -/* 09D0BC 8009C4BC 3C0B0200 */ lui $t3, %hi(D_02007708) # $t3, 0x200 -/* 09D0C0 8009C4C0 00004825 */ move $t1, $zero -/* 09D0C4 8009C4C4 1040000B */ beqz $v0, .L8009C4F4 -/* 09D0C8 8009C4C8 256B7708 */ addiu $t3, %lo(D_02007708) # addiu $t3, $t3, 0x7708 -/* 09D0CC 8009C4CC 24010001 */ li $at, 1 -/* 09D0D0 8009C4D0 1041000D */ beq $v0, $at, .L8009C508 -/* 09D0D4 8009C4D4 24010003 */ li $at, 3 -/* 09D0D8 8009C4D8 10410010 */ beq $v0, $at, .L8009C51C -/* 09D0DC 8009C4DC 3C0C0200 */ lui $t4, %hi(D_02007768) # $t4, 0x200 -/* 09D0E0 8009C4E0 02201025 */ move $v0, $s1 -/* 09D0E4 8009C4E4 AC530000 */ sw $s3, ($v0) -/* 09D0E8 8009C4E8 AC5E0004 */ sw $fp, 4($v0) -/* 09D0EC 8009C4EC 10000011 */ b .L8009C534 -/* 09D0F0 8009C4F0 26310008 */ addiu $s1, $s1, 8 -.L8009C4F4: -/* 09D0F4 8009C4F4 02201025 */ move $v0, $s1 -/* 09D0F8 8009C4F8 AC530000 */ sw $s3, ($v0) -/* 09D0FC 8009C4FC AC4B0004 */ sw $t3, 4($v0) -/* 09D100 8009C500 1000000C */ b .L8009C534 -/* 09D104 8009C504 26310008 */ addiu $s1, $s1, 8 -.L8009C508: -/* 09D108 8009C508 02201025 */ move $v0, $s1 -/* 09D10C 8009C50C AC530000 */ sw $s3, ($v0) -/* 09D110 8009C510 AC5E0004 */ sw $fp, 4($v0) -/* 09D114 8009C514 10000007 */ b .L8009C534 -/* 09D118 8009C518 26310008 */ addiu $s1, $s1, 8 -.L8009C51C: -/* 09D11C 8009C51C 02201025 */ move $v0, $s1 -/* 09D120 8009C520 258C7768 */ addiu $t4, %lo(D_02007768) # addiu $t4, $t4, 0x7768 -/* 09D124 8009C524 AC4C0004 */ sw $t4, 4($v0) -/* 09D128 8009C528 AC530000 */ sw $s3, ($v0) -/* 09D12C 8009C52C 26310008 */ addiu $s1, $s1, 8 -/* 09D130 8009C530 24090003 */ li $t1, 3 -.L8009C534: -/* 09D134 8009C534 8EAD0014 */ lw $t5, 0x14($s5) -/* 09D138 8009C538 02202025 */ move $a0, $s1 -/* 09D13C 8009C53C 00092E00 */ sll $a1, $t1, 0x18 -/* 09D140 8009C540 11A00007 */ beqz $t5, .L8009C560 -/* 09D144 8009C544 2401FFFE */ li $at, -2 -/* 09D148 8009C548 8EAF0010 */ lw $t7, 0x10($s5) -/* 09D14C 8009C54C 3C088019 */ lui $t0, %hi(D_8018E124) # 0x8019 -/* 09D150 8009C550 000F70C0 */ sll $t6, $t7, 3 -/* 09D154 8009C554 010E4021 */ addu $t0, $t0, $t6 -/* 09D158 8009C558 10000006 */ b .L8009C574 -/* 09D15C 8009C55C 8D08E124 */ lw $t0, %lo(D_8018E124)($t0) # -0x1edc($t0) -.L8009C560: -/* 09D160 8009C560 8EB80010 */ lw $t8, 0x10($s5) -/* 09D164 8009C564 3C088019 */ lui $t0, %hi(D_8018E11C) # 0x8019 -/* 09D168 8009C568 0018C8C0 */ sll $t9, $t8, 3 -/* 09D16C 8009C56C 01194021 */ addu $t0, $t0, $t9 -/* 09D170 8009C570 8D08E11C */ lw $t0, %lo(D_8018E11C)($t0) # -0x1ee4($t0) -.L8009C574: -/* 09D174 8009C574 06400018 */ bltz $s2, .L8009C5D8 -/* 09D178 8009C578 00055603 */ sra $t2, $a1, 0x18 -/* 09D17C 8009C57C 96020008 */ lhu $v0, 8($s0) -/* 09D180 8009C580 8E980000 */ lw $t8, ($s4) -/* 09D184 8009C584 00087040 */ sll $t6, $t0, 1 -/* 09D188 8009C588 AFA20010 */ sw $v0, 0x10($sp) -/* 09D18C 8009C58C 9603000A */ lhu $v1, 0xa($s0) -/* 09D190 8009C590 01D8C821 */ addu $t9, $t6, $t8 -/* 09D194 8009C594 01402825 */ move $a1, $t2 -/* 09D198 8009C598 AFA30014 */ sw $v1, 0x14($sp) -/* 09D19C 8009C59C 960B000C */ lhu $t3, 0xc($s0) -/* 09D1A0 8009C5A0 00003025 */ move $a2, $zero -/* 09D1A4 8009C5A4 00003825 */ move $a3, $zero -/* 09D1A8 8009C5A8 01766021 */ addu $t4, $t3, $s6 -/* 09D1AC 8009C5AC AFAC0018 */ sw $t4, 0x18($sp) -/* 09D1B0 8009C5B0 960D000E */ lhu $t5, 0xe($s0) -/* 09D1B4 8009C5B4 AFB2002C */ sw $s2, 0x2c($sp) -/* 09D1B8 8009C5B8 AFB90020 */ sw $t9, 0x20($sp) -/* 09D1BC 8009C5BC 01B77821 */ addu $t7, $t5, $s7 -/* 09D1C0 8009C5C0 AFAF001C */ sw $t7, 0x1c($sp) -/* 09D1C4 8009C5C4 AFA20024 */ sw $v0, 0x24($sp) -/* 09D1C8 8009C5C8 0C025F96 */ jal func_80097E58 -/* 09D1CC 8009C5CC AFA30028 */ sw $v1, 0x28($sp) -/* 09D1D0 8009C5D0 1000003B */ b .L8009C6C0 -/* 09D1D4 8009C5D4 00408825 */ move $s1, $v0 -.L8009C5D8: -/* 09D1D8 8009C5D8 1241001E */ beq $s2, $at, .L8009C654 -/* 09D1DC 8009C5DC 02202025 */ move $a0, $s1 -/* 09D1E0 8009C5E0 2401FFFF */ li $at, -1 -/* 09D1E4 8009C5E4 16410036 */ bne $s2, $at, .L8009C6C0 -/* 09D1E8 8009C5E8 02202025 */ move $a0, $s1 -/* 09D1EC 8009C5EC AFA00010 */ sw $zero, 0x10($sp) -/* 09D1F0 8009C5F0 AFA00014 */ sw $zero, 0x14($sp) -/* 09D1F4 8009C5F4 96020008 */ lhu $v0, 8($s0) -/* 09D1F8 8009C5F8 8E980000 */ lw $t8, ($s4) -/* 09D1FC 8009C5FC 00092E00 */ sll $a1, $t1, 0x18 -/* 09D200 8009C600 AFA20018 */ sw $v0, 0x18($sp) -/* 09D204 8009C604 9603000A */ lhu $v1, 0xa($s0) -/* 09D208 8009C608 00087040 */ sll $t6, $t0, 1 -/* 09D20C 8009C60C 00055603 */ sra $t2, $a1, 0x18 -/* 09D210 8009C610 AFA3001C */ sw $v1, 0x1c($sp) -/* 09D214 8009C614 960B000C */ lhu $t3, 0xc($s0) -/* 09D218 8009C618 01D8C821 */ addu $t9, $t6, $t8 -/* 09D21C 8009C61C 01402825 */ move $a1, $t2 -/* 09D220 8009C620 01766021 */ addu $t4, $t3, $s6 -/* 09D224 8009C624 AFAC0020 */ sw $t4, 0x20($sp) -/* 09D228 8009C628 960D000E */ lhu $t5, 0xe($s0) -/* 09D22C 8009C62C AFB90028 */ sw $t9, 0x28($sp) -/* 09D230 8009C630 24060400 */ li $a2, 1024 -/* 09D234 8009C634 01B77821 */ addu $t7, $t5, $s7 -/* 09D238 8009C638 AFAF0024 */ sw $t7, 0x24($sp) -/* 09D23C 8009C63C 24070400 */ li $a3, 1024 -/* 09D240 8009C640 AFA2002C */ sw $v0, 0x2c($sp) -/* 09D244 8009C644 0C025784 */ jal func_80095E10 -/* 09D248 8009C648 AFA30030 */ sw $v1, 0x30($sp) -/* 09D24C 8009C64C 1000001C */ b .L8009C6C0 -/* 09D250 8009C650 00408825 */ move $s1, $v0 -.L8009C654: -/* 09D254 8009C654 E7B40010 */ swc1 $f20, 0x10($sp) -/* 09D258 8009C658 E7B40014 */ swc1 $f20, 0x14($sp) -/* 09D25C 8009C65C AFA00018 */ sw $zero, 0x18($sp) -/* 09D260 8009C660 AFA0001C */ sw $zero, 0x1c($sp) -/* 09D264 8009C664 96020008 */ lhu $v0, 8($s0) -/* 09D268 8009C668 8E980000 */ lw $t8, ($s4) -/* 09D26C 8009C66C 00092E00 */ sll $a1, $t1, 0x18 -/* 09D270 8009C670 AFA20020 */ sw $v0, 0x20($sp) -/* 09D274 8009C674 9603000A */ lhu $v1, 0xa($s0) -/* 09D278 8009C678 00087040 */ sll $t6, $t0, 1 -/* 09D27C 8009C67C 00055603 */ sra $t2, $a1, 0x18 -/* 09D280 8009C680 AFA30024 */ sw $v1, 0x24($sp) -/* 09D284 8009C684 960B000C */ lhu $t3, 0xc($s0) -/* 09D288 8009C688 01D8C821 */ addu $t9, $t6, $t8 -/* 09D28C 8009C68C 01402825 */ move $a1, $t2 -/* 09D290 8009C690 01766021 */ addu $t4, $t3, $s6 -/* 09D294 8009C694 AFAC0028 */ sw $t4, 0x28($sp) -/* 09D298 8009C698 960D000E */ lhu $t5, 0xe($s0) -/* 09D29C 8009C69C AFB90030 */ sw $t9, 0x30($sp) -/* 09D2A0 8009C6A0 24060400 */ li $a2, 1024 -/* 09D2A4 8009C6A4 01B77821 */ addu $t7, $t5, $s7 -/* 09D2A8 8009C6A8 AFAF002C */ sw $t7, 0x2c($sp) -/* 09D2AC 8009C6AC 24070400 */ li $a3, 1024 -/* 09D2B0 8009C6B0 AFA20034 */ sw $v0, 0x34($sp) -/* 09D2B4 8009C6B4 0C0258FC */ jal func_800963F0 -/* 09D2B8 8009C6B8 AFA30038 */ sw $v1, 0x38($sp) -/* 09D2BC 8009C6BC 00408825 */ move $s1, $v0 -.L8009C6C0: -/* 09D2C0 8009C6C0 8E0A0018 */ lw $t2, 0x18($s0) -/* 09D2C4 8009C6C4 26100014 */ addiu $s0, $s0, 0x14 -/* 09D2C8 8009C6C8 5540FF7C */ bnel $t2, $zero, .L8009C4BC -/* 09D2CC 8009C6CC 86020000 */ lh $v0, ($s0) -.L8009C6D0: -/* 09D2D0 8009C6D0 8FBF0074 */ lw $ra, 0x74($sp) -/* 09D2D4 8009C6D4 02201025 */ move $v0, $s1 -/* 09D2D8 8009C6D8 8FB10054 */ lw $s1, 0x54($sp) -/* 09D2DC 8009C6DC D7B40048 */ ldc1 $f20, 0x48($sp) -/* 09D2E0 8009C6E0 8FB00050 */ lw $s0, 0x50($sp) -/* 09D2E4 8009C6E4 8FB20058 */ lw $s2, 0x58($sp) -/* 09D2E8 8009C6E8 8FB3005C */ lw $s3, 0x5c($sp) -/* 09D2EC 8009C6EC 8FB40060 */ lw $s4, 0x60($sp) -/* 09D2F0 8009C6F0 8FB50064 */ lw $s5, 0x64($sp) -/* 09D2F4 8009C6F4 8FB60068 */ lw $s6, 0x68($sp) -/* 09D2F8 8009C6F8 8FB7006C */ lw $s7, 0x6c($sp) -/* 09D2FC 8009C6FC 8FBE0070 */ lw $fp, 0x70($sp) -/* 09D300 8009C700 03E00008 */ jr $ra -/* 09D304 8009C704 27BD0078 */ addiu $sp, $sp, 0x78 diff --git a/asm/non_matchings/code_80091750/func_8009F5E0.s b/asm/non_matchings/code_80091750/func_8009F5E0.s index 31e51e6a6..a644c81a6 100644 --- a/asm/non_matchings/code_80091750/func_8009F5E0.s +++ b/asm/non_matchings/code_80091750/func_8009F5E0.s @@ -940,10 +940,10 @@ glabel L800A0184 /* 0A0DB8 800A01B8 AE020000 */ sw $v0, ($s0) glabel L800A01BC /* 0A0DBC 800A01BC 00087080 */ sll $t6, $t0, 2 -/* 0A0DC0 800A01C0 3C04800E */ lui $a0, %hi(D_800E7CA8) +/* 0A0DC0 800A01C0 3C04800E */ lui $a0, %hi(D_800E7D54 - 0xAC) /* 0A0DC4 800A01C4 008E2021 */ addu $a0, $a0, $t6 /* 0A0DC8 800A01C8 0C026449 */ jal segmented_to_virtual_dupe -/* 0A0DCC 800A01CC 8C847CA8 */ lw $a0, %lo(D_800E7CA8)($a0) +/* 0A0DCC 800A01CC 8C847CA8 */ lw $a0, %lo(D_800E7D54 - 0xAC)($a0) /* 0A0DD0 800A01D0 02202025 */ move $a0, $s1 /* 0A0DD4 800A01D4 0C0284AF */ jal func_800A12BC /* 0A0DD8 800A01D8 00402825 */ move $a1, $v0 diff --git a/asm/non_matchings/code_80091750/func_800A4550.s b/asm/non_matchings/code_80091750/func_800A4550.s deleted file mode 100644 index 54f8978b4..000000000 --- a/asm/non_matchings/code_80091750/func_800A4550.s +++ /dev/null @@ -1,149 +0,0 @@ -.section .rodata - -glabel D_800F0C4C -.asciiz "'" - -.balign 4 -glabel D_800F0C50 -.asciiz "\"" - -.section .late_rodata - -glabel D_800F1DC4 -.float 0.7 - -.section .text - -glabel func_800A4550 -/* 0A5150 800A4550 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 0A5154 800A4554 28810003 */ slti $at, $a0, 3 -/* 0A5158 800A4558 AFBF0024 */ sw $ra, 0x24($sp) -/* 0A515C 800A455C F7B40018 */ sdc1 $f20, 0x18($sp) -/* 0A5160 800A4560 AFA40048 */ sw $a0, 0x48($sp) -/* 0A5164 800A4564 AFA5004C */ sw $a1, 0x4c($sp) -/* 0A5168 800A4568 1020000B */ beqz $at, .L800A4598 -/* 0A516C 800A456C AFA60050 */ sw $a2, 0x50($sp) -/* 0A5170 800A4570 00041080 */ sll $v0, $a0, 2 -/* 0A5174 800A4574 3C0F8019 */ lui $t7, %hi(D_8018CA90) # 0x8019 -/* 0A5178 800A4578 01E27821 */ addu $t7, $t7, $v0 -/* 0A517C 800A457C 8DEFCA90 */ lw $t7, %lo(D_8018CA90)($t7) # -0x3570($t7) -/* 0A5180 800A4580 AFA2002C */ sw $v0, 0x2c($sp) -/* 0A5184 800A4584 24040002 */ li $a0, 2 -/* 0A5188 800A4588 0C024C36 */ jal set_text_color -/* 0A518C 800A458C AFAF0040 */ sw $t7, 0x40($sp) -/* 0A5190 800A4590 10000009 */ b .L800A45B8 -/* 0A5194 800A4594 8FA2002C */ lw $v0, 0x2c($sp) -.L800A4598: -/* 0A5198 800A4598 3C188019 */ lui $t8, %hi(D_8018CA78) # $t8, 0x8019 -/* 0A519C 800A459C 8F18CA78 */ lw $t8, %lo(D_8018CA78)($t8) -/* 0A51A0 800A45A0 24040001 */ li $a0, 1 -/* 0A51A4 800A45A4 0C024C36 */ jal set_text_color -/* 0A51A8 800A45A8 AFB80040 */ sw $t8, 0x40($sp) -/* 0A51AC 800A45AC 8FA20048 */ lw $v0, 0x48($sp) -/* 0A51B0 800A45B0 0002C880 */ sll $t9, $v0, 2 -/* 0A51B4 800A45B4 03201025 */ move $v0, $t9 -.L800A45B8: -/* 0A51B8 800A45B8 3C01800F */ lui $at, %hi(D_800F1DC4) # $at, 0x800f -/* 0A51BC 800A45BC C4341DC4 */ lwc1 $f20, %lo(D_800F1DC4)($at) -/* 0A51C0 800A45C0 8FA4004C */ lw $a0, 0x4c($sp) -/* 0A51C4 800A45C4 3C06800E */ lui $a2, %hi(D_800E7734) -/* 0A51C8 800A45C8 00C23021 */ addu $a2, $a2, $v0 -/* 0A51CC 800A45CC 8CC67734 */ lw $a2, %lo(D_800E7734)($a2) -/* 0A51D0 800A45D0 8FA50050 */ lw $a1, 0x50($sp) -/* 0A51D4 800A45D4 00003825 */ move $a3, $zero -/* 0A51D8 800A45D8 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A51DC 800A45DC E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A51E0 800A45E0 0C024DAE */ jal func_800936B8 -/* 0A51E4 800A45E4 24840021 */ addiu $a0, $a0, 0x21 -/* 0A51E8 800A45E8 0C02ABBD */ jal find_8018D9E0_entry_dupe -/* 0A51EC 800A45EC 240400BB */ li $a0, 187 -/* 0A51F0 800A45F0 8FA30048 */ lw $v1, 0x48($sp) -/* 0A51F4 800A45F4 28610003 */ slti $at, $v1, 3 -/* 0A51F8 800A45F8 50200010 */ beql $at, $zero, .L800A463C -/* 0A51FC 800A45FC 8C4D001C */ lw $t5, 0x1c($v0) -/* 0A5200 800A4600 8C480020 */ lw $t0, 0x20($v0) -/* 0A5204 800A4604 24090001 */ li $t1, 1 -/* 0A5208 800A4608 00695004 */ sllv $t2, $t1, $v1 -/* 0A520C 800A460C 010A5824 */ and $t3, $t0, $t2 -/* 0A5210 800A4610 11600007 */ beqz $t3, .L800A4630 -/* 0A5214 800A4614 3C04800E */ lui $a0, %hi(gGlobalTimer) # $a0, 0x800e -/* 0A5218 800A4618 8C84C54C */ lw $a0, %lo(gGlobalTimer)($a0) -/* 0A521C 800A461C 24010003 */ li $at, 3 -/* 0A5220 800A4620 0081001A */ div $zero, $a0, $at -/* 0A5224 800A4624 00002010 */ mfhi $a0 -/* 0A5228 800A4628 1000000E */ b .L800A4664 -/* 0A522C 800A462C 00000000 */ nop -.L800A4630: -/* 0A5230 800A4630 1000000C */ b .L800A4664 -/* 0A5234 800A4634 24040003 */ li $a0, 3 -/* 0A5238 800A4638 8C4D001C */ lw $t5, 0x1c($v0) -.L800A463C: -/* 0A523C 800A463C 24040003 */ li $a0, 3 -/* 0A5240 800A4640 05A00008 */ bltz $t5, .L800A4664 -/* 0A5244 800A4644 00000000 */ nop -/* 0A5248 800A4648 3C04800E */ lui $a0, %hi(gGlobalTimer) # $a0, 0x800e -/* 0A524C 800A464C 8C84C54C */ lw $a0, %lo(gGlobalTimer)($a0) -/* 0A5250 800A4650 24010003 */ li $at, 3 -/* 0A5254 800A4654 0081001A */ div $zero, $a0, $at -/* 0A5258 800A4658 00002010 */ mfhi $a0 -/* 0A525C 800A465C 10000001 */ b .L800A4664 -/* 0A5260 800A4660 00000000 */ nop -.L800A4664: -/* 0A5264 800A4664 0C024C36 */ jal set_text_color -/* 0A5268 800A4668 00000000 */ nop -/* 0A526C 800A466C 8FA40040 */ lw $a0, 0x40($sp) -/* 0A5270 800A4670 0C029E3D */ jal get_time_record_minutes -/* 0A5274 800A4674 27A50034 */ addiu $a1, $sp, 0x34 -/* 0A5278 800A4678 8FA4004C */ lw $a0, 0x4c($sp) -/* 0A527C 800A467C 8FA50050 */ lw $a1, 0x50($sp) -/* 0A5280 800A4680 27A60034 */ addiu $a2, $sp, 0x34 -/* 0A5284 800A4684 00003825 */ move $a3, $zero -/* 0A5288 800A4688 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A528C 800A468C E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A5290 800A4690 0C024E72 */ jal func_800939C8 -/* 0A5294 800A4694 2484002C */ addiu $a0, $a0, 0x2c -/* 0A5298 800A4698 8FA4004C */ lw $a0, 0x4c($sp) -/* 0A529C 800A469C 3C06800F */ lui $a2, %hi(D_800F0C4C) # $a2, 0x800f -/* 0A52A0 800A46A0 24C60C4C */ addiu $a2, %lo(D_800F0C4C) # addiu $a2, $a2, 0xc4c -/* 0A52A4 800A46A4 8FA50050 */ lw $a1, 0x50($sp) -/* 0A52A8 800A46A8 00003825 */ move $a3, $zero -/* 0A52AC 800A46AC E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A52B0 800A46B0 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A52B4 800A46B4 0C024CC9 */ jal func_80093324 -/* 0A52B8 800A46B8 24840037 */ addiu $a0, $a0, 0x37 -/* 0A52BC 800A46BC 8FA40040 */ lw $a0, 0x40($sp) -/* 0A52C0 800A46C0 0C029E51 */ jal get_time_record_seconds -/* 0A52C4 800A46C4 27A50034 */ addiu $a1, $sp, 0x34 -/* 0A52C8 800A46C8 8FA4004C */ lw $a0, 0x4c($sp) -/* 0A52CC 800A46CC 8FA50050 */ lw $a1, 0x50($sp) -/* 0A52D0 800A46D0 27A60034 */ addiu $a2, $sp, 0x34 -/* 0A52D4 800A46D4 00003825 */ move $a3, $zero -/* 0A52D8 800A46D8 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A52DC 800A46DC E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A52E0 800A46E0 0C024E72 */ jal func_800939C8 -/* 0A52E4 800A46E4 24840040 */ addiu $a0, $a0, 0x40 -/* 0A52E8 800A46E8 8FA4004C */ lw $a0, 0x4c($sp) -/* 0A52EC 800A46EC 3C06800F */ lui $a2, %hi(D_800F0C50) # $a2, 0x800f -/* 0A52F0 800A46F0 24C60C50 */ addiu $a2, %lo(D_800F0C50) # addiu $a2, $a2, 0xc50 -/* 0A52F4 800A46F4 8FA50050 */ lw $a1, 0x50($sp) -/* 0A52F8 800A46F8 00003825 */ move $a3, $zero -/* 0A52FC 800A46FC E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A5300 800A4700 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A5304 800A4704 0C024CC9 */ jal func_80093324 -/* 0A5308 800A4708 2484004B */ addiu $a0, $a0, 0x4b -/* 0A530C 800A470C 8FA40040 */ lw $a0, 0x40($sp) -/* 0A5310 800A4710 0C029E69 */ jal get_time_record_centiseconds -/* 0A5314 800A4714 27A50034 */ addiu $a1, $sp, 0x34 -/* 0A5318 800A4718 8FA4004C */ lw $a0, 0x4c($sp) -/* 0A531C 800A471C 8FA50050 */ lw $a1, 0x50($sp) -/* 0A5320 800A4720 27A60034 */ addiu $a2, $sp, 0x34 -/* 0A5324 800A4724 00003825 */ move $a3, $zero -/* 0A5328 800A4728 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A532C 800A472C E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A5330 800A4730 0C024E72 */ jal func_800939C8 -/* 0A5334 800A4734 24840055 */ addiu $a0, $a0, 0x55 -/* 0A5338 800A4738 8FBF0024 */ lw $ra, 0x24($sp) -/* 0A533C 800A473C D7B40018 */ ldc1 $f20, 0x18($sp) -/* 0A5340 800A4740 27BD0048 */ addiu $sp, $sp, 0x48 -/* 0A5344 800A4744 03E00008 */ jr $ra -/* 0A5348 800A4748 00000000 */ nop diff --git a/asm/non_matchings/code_80091750/print_text1.s b/asm/non_matchings/code_80091750/print_text1.s deleted file mode 100644 index ec4a07461..000000000 --- a/asm/non_matchings/code_80091750/print_text1.s +++ /dev/null @@ -1,225 +0,0 @@ -glabel print_text1 -/* 093F8C 8009338C 27BDFF90 */ addiu $sp, $sp, -0x70 -/* 093F90 80093390 AFBF005C */ sw $ra, 0x5c($sp) -/* 093F94 80093394 AFBE0058 */ sw $fp, 0x58($sp) -/* 093F98 80093398 AFB70054 */ sw $s7, 0x54($sp) -/* 093F9C 8009339C AFB60050 */ sw $s6, 0x50($sp) -/* 093FA0 800933A0 AFB5004C */ sw $s5, 0x4c($sp) -/* 093FA4 800933A4 AFB40048 */ sw $s4, 0x48($sp) -/* 093FA8 800933A8 AFB30044 */ sw $s3, 0x44($sp) -/* 093FAC 800933AC AFB20040 */ sw $s2, 0x40($sp) -/* 093FB0 800933B0 AFB1003C */ sw $s1, 0x3c($sp) -/* 093FB4 800933B4 AFB00038 */ sw $s0, 0x38($sp) -/* 093FB8 800933B8 F7B60030 */ sdc1 $f22, 0x30($sp) -/* 093FBC 800933BC F7B40028 */ sdc1 $f20, 0x28($sp) -/* 093FC0 800933C0 AFA50074 */ sw $a1, 0x74($sp) -/* 093FC4 800933C4 80CE0000 */ lb $t6, ($a2) -/* 093FC8 800933C8 00C09025 */ move $s2, $a2 -/* 093FCC 800933CC 00809825 */ move $s3, $a0 -/* 093FD0 800933D0 00E0A825 */ move $s5, $a3 -/* 093FD4 800933D4 00C08025 */ move $s0, $a2 -/* 093FD8 800933D8 11C0002D */ beqz $t6, .L80093490 -/* 093FDC 800933DC 00008825 */ move $s1, $zero -/* 093FE0 800933E0 3C16800F */ lui $s6, %hi(gGlyphDisplayWidth) # $s6, 0x800f -/* 093FE4 800933E4 26D6F690 */ addiu $s6, %lo(gGlyphDisplayWidth) # addiu $s6, $s6, -0x970 -/* 093FE8 800933E8 C7B60080 */ lwc1 $f22, 0x80($sp) -/* 093FEC 800933EC 241EFFFF */ li $fp, -1 -/* 093FF0 800933F0 2417FFFE */ li $s7, -2 -.L800933F4: -/* 093FF4 800933F4 0C024B24 */ jal char_to_glyph_index -/* 093FF8 800933F8 02002025 */ move $a0, $s0 -/* 093FFC 800933FC 0440000F */ bltz $v0, .L8009343C -/* 094000 80093400 28410030 */ slti $at, $v0, 0x30 -/* 094004 80093404 00027840 */ sll $t7, $v0, 1 -/* 094008 80093408 02CFC021 */ addu $t8, $s6, $t7 -/* 09400C 8009340C 87190000 */ lh $t9, ($t8) -/* 094010 80093410 44912000 */ mtc1 $s1, $f4 -/* 094014 80093414 03354021 */ addu $t0, $t9, $s5 -/* 094018 80093418 44884000 */ mtc1 $t0, $f8 -/* 09401C 8009341C 468021A0 */ cvt.s.w $f6, $f4 -/* 094020 80093420 468042A0 */ cvt.s.w $f10, $f8 -/* 094024 80093424 46165402 */ mul.s $f16, $f10, $f22 -/* 094028 80093428 46103480 */ add.s $f18, $f6, $f16 -/* 09402C 8009342C 4600910D */ trunc.w.s $f4, $f18 -/* 094030 80093430 44112000 */ mfc1 $s1, $f4 -/* 094034 80093434 1000000E */ b .L80093470 -/* 094038 80093438 00000000 */ nop -.L8009343C: -/* 09403C 8009343C 10570090 */ beq $v0, $s7, .L80093680 -/* 094040 80093440 26AA0007 */ addiu $t2, $s5, 7 -/* 094044 80093444 545E008F */ bnel $v0, $fp, .L80093684 -/* 094048 80093448 8FBF005C */ lw $ra, 0x5c($sp) -/* 09404C 8009344C 448A3000 */ mtc1 $t2, $f6 -/* 094050 80093450 44914000 */ mtc1 $s1, $f8 -/* 094054 80093454 46803420 */ cvt.s.w $f16, $f6 -/* 094058 80093458 468042A0 */ cvt.s.w $f10, $f8 -/* 09405C 8009345C 46168482 */ mul.s $f18, $f16, $f22 -/* 094060 80093460 46125100 */ add.s $f4, $f10, $f18 -/* 094064 80093464 4600220D */ trunc.w.s $f8, $f4 -/* 094068 80093468 44114000 */ mfc1 $s1, $f8 -/* 09406C 8009346C 00000000 */ nop -.L80093470: -/* 094070 80093470 54200004 */ bnel $at, $zero, .L80093484 -/* 094074 80093474 26100001 */ addiu $s0, $s0, 1 -/* 094078 80093478 10000002 */ b .L80093484 -/* 09407C 8009347C 26100002 */ addiu $s0, $s0, 2 -/* 094080 80093480 26100001 */ addiu $s0, $s0, 1 -.L80093484: -/* 094084 80093484 820C0000 */ lb $t4, ($s0) -/* 094088 80093488 1580FFDA */ bnez $t4, .L800933F4 -/* 09408C 8009348C 00000000 */ nop -.L80093490: -/* 094090 80093490 8FA20088 */ lw $v0, 0x88($sp) -/* 094094 80093494 3C16800F */ lui $s6, %hi(gGlyphDisplayWidth) # $s6, 0x800f -/* 094098 80093498 24010001 */ li $at, 1 -/* 09409C 8009349C 26D6F690 */ addiu $s6, %lo(gGlyphDisplayWidth) # addiu $s6, $s6, -0x970 -/* 0940A0 800934A0 2417FFFE */ li $s7, -2 -/* 0940A4 800934A4 241EFFFF */ li $fp, -1 -/* 0940A8 800934A8 1041000A */ beq $v0, $at, .L800934D4 -/* 0940AC 800934AC C7B60080 */ lwc1 $f22, 0x80($sp) -/* 0940B0 800934B0 24010002 */ li $at, 2 -/* 0940B4 800934B4 10410009 */ beq $v0, $at, .L800934DC -/* 0940B8 800934B8 24010003 */ li $at, 3 -/* 0940BC 800934BC 10410005 */ beq $v0, $at, .L800934D4 -/* 0940C0 800934C0 24010004 */ li $at, 4 -/* 0940C4 800934C4 10410005 */ beq $v0, $at, .L800934DC -/* 0940C8 800934C8 00000000 */ nop -/* 0940CC 800934CC 10000009 */ b .L800934F4 -/* 0940D0 800934D0 28410003 */ slti $at, $v0, 3 -.L800934D4: -/* 0940D4 800934D4 10000006 */ b .L800934F0 -/* 0940D8 800934D8 02719823 */ subu $s3, $s3, $s1 -.L800934DC: -/* 0940DC 800934DC 06210003 */ bgez $s1, .L800934EC -/* 0940E0 800934E0 00116843 */ sra $t5, $s1, 1 -/* 0940E4 800934E4 26210001 */ addiu $at, $s1, 1 -/* 0940E8 800934E8 00016843 */ sra $t5, $at, 1 -.L800934EC: -/* 0940EC 800934EC 026D9823 */ subu $s3, $s3, $t5 -.L800934F0: -/* 0940F0 800934F0 28410003 */ slti $at, $v0, 3 -.L800934F4: -/* 0940F4 800934F4 10200004 */ beqz $at, .L80093508 -/* 0940F8 800934F8 3C148015 */ lui $s4, %hi(gDisplayListHead) # $s4, 0x8015 -/* 0940FC 800934FC 240E0001 */ li $t6, 1 -/* 094100 80093500 10000003 */ b .L80093510 -/* 094104 80093504 AFAE0060 */ sw $t6, 0x60($sp) -.L80093508: -/* 094108 80093508 240F0002 */ li $t7, 2 -/* 09410C 8009350C AFAF0060 */ sw $t7, 0x60($sp) -.L80093510: -/* 094110 80093510 26940298 */ addiu $s4, %lo(gDisplayListHead) # addiu $s4, $s4, 0x298 -/* 094114 80093514 8E820000 */ lw $v0, ($s4) -/* 094118 80093518 3C080200 */ lui $t0, %hi(D_020077A8) # $t0, 0x200 -/* 09411C 8009351C 250877A8 */ addiu $t0, %lo(D_020077A8) # addiu $t0, $t0, 0x77a8 -/* 094120 80093520 24580008 */ addiu $t8, $v0, 8 -/* 094124 80093524 AE980000 */ sw $t8, ($s4) -/* 094128 80093528 3C190600 */ li $t9, 0x06000000 # 0.000000 -/* 09412C 8009352C AC590000 */ sw $t9, ($v0) -/* 094130 80093530 AC480004 */ sw $t0, 4($v0) -/* 094134 80093534 82490000 */ lb $t1, ($s2) -/* 094138 80093538 5120004A */ beql $t1, $zero, .L80093664 -/* 09413C 8009353C 8E820000 */ lw $v0, ($s4) -.L80093540: -/* 094140 80093540 0C024B24 */ jal char_to_glyph_index -/* 094144 80093544 02402025 */ move $a0, $s2 -/* 094148 80093548 04400027 */ bltz $v0, .L800935E8 -/* 09414C 8009354C 00408825 */ move $s1, $v0 -/* 094150 80093550 8FAC0074 */ lw $t4, 0x74($sp) -/* 094154 80093554 3C0B800E */ lui $t3, %hi(gGlyphTextureLUT) # $t3, 0x800e -/* 094158 80093558 256B7E84 */ addiu $t3, %lo(gGlyphTextureLUT) # addiu $t3, $t3, 0x7e84 -/* 09415C 8009355C 448C3000 */ mtc1 $t4, $f6 -/* 094160 80093560 00115080 */ sll $t2, $s1, 2 -/* 094164 80093564 014B8021 */ addu $s0, $t2, $t3 -/* 094168 80093568 8E040000 */ lw $a0, ($s0) -/* 09416C 8009356C 0C026449 */ jal segmented_to_virtual_dupe -/* 094170 80093570 46803520 */ cvt.s.w $f20, $f6 -/* 094174 80093574 0C026461 */ jal func_80099184 -/* 094178 80093578 00402025 */ move $a0, $v0 -/* 09417C 8009357C 0C026449 */ jal segmented_to_virtual_dupe -/* 094180 80093580 8E040000 */ lw $a0, ($s0) -/* 094184 80093584 44938000 */ mtc1 $s3, $f16 -/* 094188 80093588 8FAD0060 */ lw $t5, 0x60($sp) -/* 09418C 8009358C C7AA0084 */ lwc1 $f10, 0x84($sp) -/* 094190 80093590 46808420 */ cvt.s.w $f16, $f16 -/* 094194 80093594 4407A000 */ mfc1 $a3, $f20 -/* 094198 80093598 8E840000 */ lw $a0, ($s4) -/* 09419C 8009359C 00402825 */ move $a1, $v0 -/* 0941A0 800935A0 E7B60014 */ swc1 $f22, 0x14($sp) -/* 0941A4 800935A4 AFAD0010 */ sw $t5, 0x10($sp) -/* 0941A8 800935A8 44068000 */ mfc1 $a2, $f16 -/* 0941AC 800935AC 0C026FBC */ jal func_8009BEF0 -/* 0941B0 800935B0 E7AA0018 */ swc1 $f10, 0x18($sp) -/* 0941B4 800935B4 00117040 */ sll $t6, $s1, 1 -/* 0941B8 800935B8 02CE7821 */ addu $t7, $s6, $t6 -/* 0941BC 800935BC 85F80000 */ lh $t8, ($t7) -/* 0941C0 800935C0 AE820000 */ sw $v0, ($s4) -/* 0941C4 800935C4 0315C821 */ addu $t9, $t8, $s5 -/* 0941C8 800935C8 44999000 */ mtc1 $t9, $f18 -/* 0941CC 800935CC 00000000 */ nop -/* 0941D0 800935D0 46809120 */ cvt.s.w $f4, $f18 -/* 0941D4 800935D4 46162202 */ mul.s $f8, $f4, $f22 -/* 0941D8 800935D8 4600418D */ trunc.w.s $f6, $f8 -/* 0941DC 800935DC 44093000 */ mfc1 $t1, $f6 -/* 0941E0 800935E0 10000016 */ b .L8009363C -/* 0941E4 800935E4 01339821 */ addu $s3, $t1, $s3 -.L800935E8: -/* 0941E8 800935E8 1057000B */ beq $v0, $s7, .L80093618 -/* 0941EC 800935EC 26AA0007 */ addiu $t2, $s5, 7 -/* 0941F0 800935F0 545E000A */ bnel $v0, $fp, .L8009361C -/* 0941F4 800935F4 8E820000 */ lw $v0, ($s4) -/* 0941F8 800935F8 448A8000 */ mtc1 $t2, $f16 -/* 0941FC 800935FC 00000000 */ nop -/* 094200 80093600 468082A0 */ cvt.s.w $f10, $f16 -/* 094204 80093604 46165482 */ mul.s $f18, $f10, $f22 -/* 094208 80093608 4600910D */ trunc.w.s $f4, $f18 -/* 09420C 8009360C 440C2000 */ mfc1 $t4, $f4 -/* 094210 80093610 1000000A */ b .L8009363C -/* 094214 80093614 01939821 */ addu $s3, $t4, $s3 -.L80093618: -/* 094218 80093618 8E820000 */ lw $v0, ($s4) -.L8009361C: -/* 09421C 8009361C 3C0F0200 */ lui $t7, %hi(D_020077D8) # $t7, 0x200 -/* 094220 80093620 25EF77D8 */ addiu $t7, %lo(D_020077D8) # addiu $t7, $t7, 0x77d8 -/* 094224 80093624 244D0008 */ addiu $t5, $v0, 8 -/* 094228 80093628 AE8D0000 */ sw $t5, ($s4) -/* 09422C 8009362C 3C0E0600 */ lui $t6, 0x600 -/* 094230 80093630 AC4E0000 */ sw $t6, ($v0) -/* 094234 80093634 10000012 */ b .L80093680 -/* 094238 80093638 AC4F0004 */ sw $t7, 4($v0) -.L8009363C: -/* 09423C 8009363C 2A210030 */ slti $at, $s1, 0x30 -/* 094240 80093640 54200004 */ bnel $at, $zero, .L80093654 -/* 094244 80093644 26520001 */ addiu $s2, $s2, 1 -/* 094248 80093648 10000002 */ b .L80093654 -/* 09424C 8009364C 26520002 */ addiu $s2, $s2, 2 -/* 094250 80093650 26520001 */ addiu $s2, $s2, 1 -.L80093654: -/* 094254 80093654 82580000 */ lb $t8, ($s2) -/* 094258 80093658 1700FFB9 */ bnez $t8, .L80093540 -/* 09425C 8009365C 00000000 */ nop -/* 094260 80093660 8E820000 */ lw $v0, ($s4) -.L80093664: -/* 094264 80093664 3C090200 */ lui $t1, %hi(D_020077D8) # $t1, 0x200 -/* 094268 80093668 252977D8 */ addiu $t1, %lo(D_020077D8) # addiu $t1, $t1, 0x77d8 -/* 09426C 8009366C 24590008 */ addiu $t9, $v0, 8 -/* 094270 80093670 AE990000 */ sw $t9, ($s4) -/* 094274 80093674 3C080600 */ lui $t0, 0x600 -/* 094278 80093678 AC480000 */ sw $t0, ($v0) -/* 09427C 8009367C AC490004 */ sw $t1, 4($v0) -.L80093680: -/* 094280 80093680 8FBF005C */ lw $ra, 0x5c($sp) -.L80093684: -/* 094284 80093684 D7B40028 */ ldc1 $f20, 0x28($sp) -/* 094288 80093688 D7B60030 */ ldc1 $f22, 0x30($sp) -/* 09428C 8009368C 8FB00038 */ lw $s0, 0x38($sp) -/* 094290 80093690 8FB1003C */ lw $s1, 0x3c($sp) -/* 094294 80093694 8FB20040 */ lw $s2, 0x40($sp) -/* 094298 80093698 8FB30044 */ lw $s3, 0x44($sp) -/* 09429C 8009369C 8FB40048 */ lw $s4, 0x48($sp) -/* 0942A0 800936A0 8FB5004C */ lw $s5, 0x4c($sp) -/* 0942A4 800936A4 8FB60050 */ lw $s6, 0x50($sp) -/* 0942A8 800936A8 8FB70054 */ lw $s7, 0x54($sp) -/* 0942AC 800936AC 8FBE0058 */ lw $fp, 0x58($sp) -/* 0942B0 800936B0 03E00008 */ jr $ra -/* 0942B4 800936B4 27BD0070 */ addiu $sp, $sp, 0x70 diff --git a/src/code_8006E9C0.h b/src/code_8006E9C0.h index 909c07cba..76047fee7 100644 --- a/src/code_8006E9C0.h +++ b/src/code_8006E9C0.h @@ -12,6 +12,7 @@ u8 *func_8006ED94(u8*, u8*, u32, u32); void func_8006EE44(void); void init_item_window(s32); void func_8006EEE8(s32); +void func_8006EF60(void); void func_8006F824(s32); void func_8006FA94(void); void func_80070148(void); diff --git a/src/code_80091750.c b/src/code_80091750.c index 93c5b33db..162d96d86 100644 --- a/src/code_80091750.c +++ b/src/code_80091750.c @@ -8,6 +8,7 @@ #include "code_800029B0.h" #include "code_80091750.h" #include "code_80005FD0.h" +#include "code_8006E9C0.h" #include "menus.h" #include "save.h" #include "code_80057C60.h" @@ -20,11 +21,15 @@ #include "hud_renderer.h" #include "staff_ghosts.h" #include "common_textures.h" +#include "textures.h" #include "math_util.h" #include "save_data.h" #include "podium_ceremony_actors.h" #include "skybox_and_splitscreen.h" #include "src/data/startup_logo.inc.h" +#include "framebuffers.h" +#include "racing/race_logic.h" +#include "ending/code_80281C40.h" // TODO: Move gGfxPool out of main.h // Unfortunately that's not a small effort due to weird import structure in this project #include "main.h" @@ -456,7 +461,7 @@ char *gDebugCourseNames[] = { "doughnut", }; -const u8 gPerCupIndexByCourseId[] = { +const s8 gPerCupIndexByCourseId[] = { 3, 2, 3, 2, 1, 1, 2, 2, 0, 1, 0, 3, @@ -467,7 +472,7 @@ const u8 gPerCupIndexByCourseId[] = { const s8 D_800EFD64[] = { 0, 1, 4, 3, 5, 6, 2, 7 }; // Maps course IDs (as defined in the COURSES enum) to the cup they belong to -u8 gCupSelectionByCourseId[] = { +s8 gCupSelectionByCourseId[] = { FLOWER_CUP, FLOWER_CUP, STAR_CUP, SPECIAL_CUP, SPECIAL_CUP, FLOWER_CUP, MUSHROOM_CUP, STAR_CUP, MUSHROOM_CUP, MUSHROOM_CUP, FLOWER_CUP, MUSHROOM_CUP, @@ -986,9 +991,6 @@ MkTexture *D_800E7AF8[] = { D_02000F00, D_02000F28, D_02000F50, D_02000F78, D_02000FA0, D_02000FC8, D_02000FF0, D_02001018, D_02001040, D_02001068, D_02001090, D_020010B8, -}; - -MkTexture *D_800E7CA8[] = { D_020010E0, D_02001108, D_02001130, D_02001158, D_02001180, D_020011A8, D_020011D0, D_020011F8, D_02001220, D_02001248, D_02001270, D_02001298, @@ -1171,10 +1173,13 @@ MkTexture *D_800E82B4[] = { MkTexture *D_800E82C8[] = { D_02004BC4, D_02004BEC, D_02004C14, D_02004C3C, D_02004C64, D_02004C8C, D_02004CF0, D_02004D54, - D_02004DB8, D_02004E1C, D_02004E80, D_02004BC4, - D_02004BEC, D_02004C14, D_02004C3C, D_02004C64, - D_02004C8C, D_02004CF0, D_02004D54, D_02004DB8, - D_02004E1C, D_02004E80, + D_02004DB8, D_02004E1C, D_02004E80, +}; + +MkTexture *D_800E82F4[] = { + D_02004BC4, D_02004BEC, D_02004C14, D_02004C3C, + D_02004C64, D_02004C8C, D_02004CF0, D_02004D54, + D_02004DB8, D_02004E1C, D_02004E80, }; MkAnimation *D_800E8320[] = { @@ -1366,9 +1371,6 @@ f64 exponent_by_squaring(f64 base, s32 exponent) { return 1.0 / result; } -f64 func_8009186C(f64); /* extern */ -f64 func_8009195C(f64); /* extern */ - f64 func_800917B0(f64 arg0, f64 arg1) { if ((arg1 <= 2147483647.0) && (-2147483647.0 <= arg1)) { if (arg1 == (s32) arg1) { @@ -1497,7 +1499,6 @@ void swap_values(s32 *arg0, s32 *arg1) { *arg1 = temp; } -extern s8 D_8018E7AC[]; // size of 4... Actually 5 probably. extern s8 D_800E852C; extern uintptr_t *D_8018D9B4; extern uintptr_t *D_8018D9B8; @@ -1524,7 +1525,7 @@ void func_80091B78(void) { } gNextFreeMemoryAddress = gFreeMemoryResetAnchor; // Hypothetically, this should be a ptr... But only hypothetically. - D_8018D9B0 = (intptr_t) get_next_available_memory_addr(0x000900B0); + D_8018D9B0 = get_next_available_memory_addr(0x000900B0); D_8018D9B4 = (uintptr_t *) get_next_available_memory_addr(0x0000CE00); D_8018D9B8 = (uintptr_t *) get_next_available_memory_addr(0x00012C00); D_8018D9C0 = (struct_8018EE10_entry *) get_next_available_memory_addr(0x00001000); @@ -1623,7 +1624,7 @@ void func_80091FA4(void) { // todo: These sizes need to be sizeof() for shiftability if possible D_8018D9B4 = (uintptr_t *) get_next_available_memory_addr(0x00002800); - D_8018D9B0 = (intptr_t) get_next_available_memory_addr(0x000124F8); + D_8018D9B0 = get_next_available_memory_addr(0x000124F8); D_8018D9B8 = (uintptr_t *) get_next_available_memory_addr(0x00001000); D_8018D9BC = get_next_available_memory_addr(4); @@ -2021,30 +2022,32 @@ s32 func_80092DF8(s8 *arg) { return func_80092E1C(arg) + 0x50; } -#ifdef NON_MATCHING -// https://decomp.me/scratch/Uh0mI -// Really dumb register allocation diff s32 func_80092E1C(char *character) { s32 ret; + s32 test; u8 temp_t6; + u8 temp; temp_t6 = (*character + 0x80); - if ((temp_t6 >= 0x21) && (temp_t6 < 0x2B)) { - if (temp_t6 % 2) { - ret = ((temp_t6 - 0x21) / 2) + 0x7B; + // Huh? + temp = temp_t6; + if (temp) {} + if ((temp > 0x20) && (temp < 0x2B)) { + if (temp % 2) { + ret = ((temp - 0x21) / 2) + 0x7B; } else { - ret = ((temp_t6 - 0x21) / 2) + 0x30; + ret = ((temp - 0x21) / 2) + 0x30; } - } else if ((temp_t6 >= 0x2B) && (temp_t6 < 0x6E)) { - ret = temp_t6 + 0xA; + } else if ((temp > 0x2A) && (temp < 0x6E)) { + ret = temp + 0xA; } else { - switch (temp_t6) { /* irregular */ + switch (temp) { /* irregular */ case 0x6F: ret = 0x00000078; break; case 0x72: case 0x73: - ret = temp_t6 + 7; + ret = temp + 7; break; default: ret = -2; @@ -2053,9 +2056,6 @@ s32 func_80092E1C(char *character) { } return ret; } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_80092E1C.s") -#endif s32 func_80092EE4(char *character) { u8 temp_t6; @@ -2226,35 +2226,35 @@ void func_80093358(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f print_text0(column, row, text, tracking, x_scale, y_scale, 2); } -#ifdef NON_MATCHING // "tracking" is a uniform spacing between all characters in a given word void print_text1(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale, s32 arg6) { char *temp_string = text; s32 stringWidth = 0; s32 glyphIndex; + s32 sp60; - if (*temp_string != 0) { - do{ - glyphIndex = char_to_glyph_index(temp_string); - if (glyphIndex >= 0) { - stringWidth += ((gGlyphDisplayWidth[glyphIndex] + tracking) * x_scale); - } - else if ((glyphIndex != -2) && (glyphIndex == -1)) { - stringWidth += ((tracking + 7) * x_scale); - } - else{ - return; - } - if (glyphIndex >= 0x30) { - temp_string += 2; - } else { - temp_string += 1; - } - } while(*temp_string != 0); + while(*temp_string != 0) { + glyphIndex = char_to_glyph_index(temp_string); + if (glyphIndex >= 0) { + stringWidth += ((gGlyphDisplayWidth[glyphIndex] + tracking) * x_scale); + } + else if ((glyphIndex != -2) && (glyphIndex == -1)) { + stringWidth += ((tracking + 7) * x_scale); + } + else{ + return; + } + if (glyphIndex >= 0x30) { + temp_string += 2; + } else { + temp_string += 1; + } } switch(arg6) { case 1: + // ??? + do { } while (0); case 3: column -= stringWidth; break; @@ -2267,43 +2267,36 @@ void print_text1(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 } if (arg6 < 3){ - arg6 = 1; + sp60 = 1; } else{ - arg6 = 2; + sp60 = 2; } gSPDisplayList(gDisplayListHead++, D_020077A8); - if (*text != 0) { - do{ - glyphIndex = char_to_glyph_index(text); - if (glyphIndex >= 0) { - func_80099184((MkTexture *)segmented_to_virtual_dupe((const void *) gGlyphTextureLUT[glyphIndex])); - gDisplayListHead = func_8009BEF0(gDisplayListHead, (MkTexture *) segmented_to_virtual_dupe((const void *)gGlyphTextureLUT[glyphIndex]), column, row, arg6, x_scale, y_scale); - column += (gGlyphDisplayWidth[glyphIndex] + tracking); - column *= x_scale; - } - else if ((glyphIndex != -2) && (glyphIndex == -1)) { - column += (tracking + 7); - column *= x_scale; - } - else{ - gSPDisplayList(gDisplayListHead++, D_020077D8); - return; - } - if (glyphIndex >= 0x30) { - text += 2; - } else { - text += 1; - } - } while(*text != 0); + while(*text != 0) { + glyphIndex = char_to_glyph_index(text); + if (glyphIndex >= 0) { + func_80099184(segmented_to_virtual_dupe(gGlyphTextureLUT[glyphIndex])); + gDisplayListHead = func_8009BEF0(gDisplayListHead, segmented_to_virtual_dupe(gGlyphTextureLUT[glyphIndex]), column, row, sp60, x_scale, y_scale); + column = column + (s32)((gGlyphDisplayWidth[glyphIndex] + tracking) * x_scale); + } + else if ((glyphIndex != -2) && (glyphIndex == -1)) { + column = column + (s32)((tracking + 7) * x_scale); + } + else{ + gSPDisplayList(gDisplayListHead++, D_020077D8); + return; + } + if (glyphIndex >= 0x30) { + text += 2; + } else { + text += 1; + } } gSPDisplayList(gDisplayListHead++, D_020077D8); } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/print_text1.s") -#endif void func_800936B8(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale) { print_text1(column, row, text, tracking, x_scale, y_scale, 1); @@ -2957,78 +2950,44 @@ void func_80095AE0(Mtx *arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { GLOBAL_ASM("asm/non_matchings/code_80091750/func_80095AE0.s") #endif -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -? func_80095AE0(Mtx *, s32, s32, s32, f32); /* extern */ -? rmonPrintf(? *); /* extern */ - -Gfx *func_80095BD0(Gfx *arg0, s32 arg1, s32 arg2, s32 arg3, u32 arg4, s32 arg5, s32 arg6, f32 arg7) { - Mtx *sp28; - Gfx *temp_s0; - Gfx *temp_s0_2; - Gfx *temp_s0_3; - Gfx *temp_s0_4; - Gfx *temp_s0_5; - Gfx *temp_s0_6; - Gfx *temp_s0_7; +Gfx *func_80095BD0(Gfx *displayListHead, u8 *arg1, f32 arg2, f32 arg3, u32 arg4, u32 arg5, f32 arg6, f32 arg7) { Vtx *var_a1; - s32 temp_a3; - s32 temp_v0; + Mtx *sp28; - if (gMatrixEffectCount <= MTX_EFFECT_POOL_SIZE_MAX) { - sp28 = &gGfxPool->mtxEffect[gMatrixEffectCount]; - if (gMatrixEffectCount < 0) { - rmonPrintf("effectcount < 0 !!!!!!(kawano)\n"); - } - func_80095AE0(sp28, arg2, arg3, arg6, arg7); - arg0->words.w0 = 0x01020040; - arg0->words.w1 = (s32) (&gGfxPool->mtxEffect[gMatrixEffectCount]) & 0x1FFFFFFF; - temp_s0_2 = arg0 + 8; - gMatrixEffectCount += 1; - temp_s0_2->words.w0 = (((arg4 >> 1) - 1) & 0xFFF) | 0xFD880000; - temp_s0_3 = temp_s0_2 + 8; - temp_s0_2->words.w1 = (u32) arg1; - temp_a3 = (((u32) (((u32) (arg4 + 1) >> 1) + 7) >> 3) & 0x1FF) << 9; - temp_s0_4 = temp_s0_3 + 8; - temp_s0_3->words.w0 = temp_a3 | 0xF5880000; - temp_s0_3->words.w1 = 0x07000000; - temp_s0_5 = temp_s0_4 + 8; - temp_s0_4->words.w0 = 0xE6000000; - temp_s0_4->words.w1 = 0; - temp_s0_5->words.w0 = 0xF4000000; - temp_v0 = (arg5 * 4) & 0xFFF; - temp_s0_6 = temp_s0_5 + 8; - temp_s0_5->words.w1 = (((arg4 * 2) & 0xFFF) << 0xC) | 0x07000000U | temp_v0; - temp_s0_7 = temp_s0_6 + 8; - temp_s0_6->words.w0 = 0xE7000000; - temp_s0 = temp_s0_7 + 8; - temp_s0_6->words.w1 = 0; - temp_s0_7->words.w1 = 0; - temp_s0_7->words.w0 = temp_a3 | 0xF5800000; - temp_s0->words.w0 = 0xF2000000; - temp_s0->words.w1 = (((arg4 * 4) & 0xFFF) << 0xC) | temp_v0; - switch (arg4) { /* irregular */ - default: - var_a1 = D_02007CD8; - break; - case 16: - var_a1 = D_02007CD8; - break; - case 26: - var_a1 = D_02007BB8; - break; - case 30: - var_a1 = D_02007DF8; - break; - } - return func_800959F8(temp_s0 + 8, var_a1); + // A match is a match, but why are goto's required here? + if (gMatrixEffectCount >= 0x2F7) { + goto func_80095BD0_label1; } + sp28 = &gGfxPool->mtxEffect[gMatrixEffectCount]; + if (gMatrixEffectCount < 0) { + rmonPrintf("effectcount < 0 !!!!!!(kawano)\n"); + } + goto func_80095BD0_label2; +func_80095BD0_label1: rmonPrintf("MAX effectcount(760) over!!!!(kawano)\n"); - return arg0; + return displayListHead; +func_80095BD0_label2: + func_80095AE0(sp28, arg2, arg3, arg6, arg7); + gSPMatrix(displayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxEffect[gMatrixEffectCount]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gMatrixEffectCount += 1; + gDPLoadTextureTile_4b(displayListHead++, arg1, G_IM_FMT_I, arg4, 0, 0, 0, arg4, arg5, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + switch (arg4) { + default: + var_a1 = D_02007CD8; + break; + case 16: + var_a1 = D_02007CD8; + break; + case 26: + var_a1 = D_02007BB8; + break; + case 30: + var_a1 = D_02007DF8; + break; + } + + return func_800959F8(displayListHead, var_a1); } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_80095BD0.s") -#endif #ifdef MIPS_TO_C //generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 @@ -4100,33 +4059,18 @@ block_37: GLOBAL_ASM("asm/non_matchings/code_80091750/func_80097274.s") #endif -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -void *func_80095E10(Gfx *, s8, ?, ?, s32, s32, s32, s32, s32, s32, s32, s32, s32); /* extern */ - -Gfx *func_80097A14(Gfx *arg0, s8 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA) { - Gfx *temp_a0; - void *temp_v0; - - temp_a0 = arg0 + 8; - arg0->words.w0 = 0xE7000000; - arg0->words.w1 = 0; - temp_a0->words.w1 = 0x00200000; - temp_a0->words.w0 = 0xBA001402; - temp_v0 = func_80095E10(temp_a0 + 8, arg1, 0x1000, 0x400, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, argA); - temp_v0->unk0 = 0xE7000000; - temp_v0->unk4 = 0; - temp_v0->unk8 = 0xBA001402; - temp_v0->unkC = 0; - return temp_v0 + 0x10; +Gfx *func_80097A14(Gfx *displayListHead, s8 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, u32 arg9, u32 argA) { + gDPPipeSync(displayListHead++); + gDPSetCycleType(displayListHead++, G_CYC_COPY); + displayListHead = func_80095E10(displayListHead, arg1, 0x00001000, 0x00000400, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, argA); + gDPPipeSync(displayListHead++); + gDPSetCycleType(displayListHead++, G_CYC_1CYCLE); + return displayListHead; } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_80097A14.s") -#endif #ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -Gfx *func_80097AE4(Gfx *displayListHead, s8 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5) { +//generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Dec-21-2023 +Gfx *func_80097AE4(Gfx *displayListHead, s8 fmt, s32 arg2, s32 arg3, u8 *arg4, s32 arg5) { s32 sp34; Gfx *temp_a0; Gfx *temp_a0_10; @@ -4169,7 +4113,7 @@ Gfx *func_80097AE4(Gfx *displayListHead, s8 arg1, s32 arg2, s32 arg3, s32 arg4, if (arg5 >= 0x20) { } else { - temp_t8 = (arg1 & 7) << 0x15; + temp_t8 = (fmt & 7) << 0x15; temp_s4 = temp_t8 | 0xFD000000 | 0x100000 | 0x3F; temp_t8_2 = temp_t8 | 0xF5000000 | 0x100000 | 0x1200; sp34 = var_s0; @@ -4242,6 +4186,13 @@ Gfx *func_80097AE4(Gfx *displayListHead, s8 arg1, s32 arg2, s32 arg3, s32 arg4, temp_a0_18->words.w1 = 0; temp_a0_19->words.w0 = 0xB2000000; temp_a0_19->words.w1 = temp_t7; + /* + gDPLoadTextureTile(displayListHead++, arg4, fmt, G_IM_SIZ_16b, 64, 0, 0, var_a2, 32, (var_a2 + 1) * 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); + gSPTextureRectangle(displayListHead++, arg2 + arg5, arg3 + 32*var_a2, arg2 + 32, arg3 + 32, G_TX_RENDERTILE, 0, 0, 0x8000 / (32 - arg5), 4); + + gDPLoadTextureTile(displayListHead++, arg4, fmt, G_IM_SIZ_16b, 64, 0, 32, 0, 64, 0, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); + gSPTextureRectangle(displayListHead++, arg2 + 32, arg3 + 32*var_a2, (arg2 + 32 - arg5) + 32, arg3 + 32, G_TX_RENDERTILE, 0, 0, 0x8000 / (32 - arg5), 4); + */ var_a2 = temp_s1; var_a0 = temp_a0_19 + 8; var_s0 = sp34; @@ -4899,8 +4850,6 @@ void func_80099958(MkTexture *arg0, s32 arg1, s32 arg2) { GLOBAL_ASM("asm/non_matchings/code_80091750/func_80099958.s") #endif -extern s32 D_8018E060; - // Possibly a debug print function? void func_80099A70(void) { s32 i; @@ -5029,36 +4978,21 @@ loop_9: GLOBAL_ASM("asm/non_matchings/code_80091750/func_80099AEC.s") #endif -extern s32 D_8018E0E8; - void func_80099E54(void) { - D_8018E0E8 = 0; + D_8018E0E8[0].mk64Texture = NULL; } -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -extern void *D_8018E0E8; - void func_80099E60(MkTexture *arg0, s32 arg1, s32 arg2) { - void **sp1C; - s32 temp_t7; - void **var_v1; + struct_8018E0E8_entry *var_v1; - var_v1 = &D_8018E0E8; - if (D_8018E0E8 != NULL) { - do { - temp_t7 = var_v1->unk8; - var_v1 += 8; - } while (temp_t7 != 0); + var_v1 = D_8018E0E8; + while(var_v1->mk64Texture != NULL) { + var_v1++; } - sp1C = var_v1; - var_v1->unk0 = segmented_to_virtual_dupe(arg0); - var_v1->unk4 = (s16) arg1; - var_v1->unk6 = (s16) arg2; + var_v1->mk64Texture = segmented_to_virtual_dupe(arg0); + var_v1->unk4 = arg1; + var_v1->unk6 = arg2; } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_80099E60.s") -#endif #ifdef MIPS_TO_C //generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 @@ -5196,65 +5130,35 @@ s32 func_8009A374(MkAnimation *arg0) { GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009A374.s") #endif -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -? func_80099958(MkTexture *, s32, ?, s32); /* extern */ - s32 func_8009A478(MkAnimation *arg0, s32 arg1) { - s32 sp2C; - struct_8018DEE0_entry *sp24; - MkAnimation *temp_s0; + s32 var_a1; MkAnimation *temp_v0; - MkTexture *temp_a0; - s32 var_a3; - struct_8018DEE0_entry *temp_v1; - struct_8018DEE0_entry *var_v1; temp_v0 = segmented_to_virtual_dupe_2(arg0); - temp_s0 = temp_v0; - var_a3 = 0; - if (D_8018DEE0->visible != 0) { - var_v1 = D_8018DEE0; -loop_2: - var_a3 += 1; - var_v1 += 0x18; - if (var_a3 >= 0x10) { -loop_3: - goto loop_3; + var_a1 = 0; + while (D_8018DEE0[var_a1].visible != 0) { + var_a1++; + if (var_a1 >= 0x10) { + while(TRUE); } - if (var_v1->visible == 0) { - goto block_5; - } - goto loop_2; } -block_5: - temp_v1 = &D_8018DEE0[var_a3]; - temp_v1->textureSequence = temp_v0; - temp_v1->sequenceIndex = -1; - temp_v1->frameCountDown = 0; - temp_v1->visible = 0x80000000; - temp_v1->D_8018E118_index = gNumD_8018E118Entries; + D_8018DEE0[var_a1].textureSequence = temp_v0; + D_8018DEE0[var_a1].sequenceIndex = -1; + D_8018DEE0[var_a1].frameCountDown = 0; + D_8018DEE0[var_a1].visible = 0x80000000; + D_8018DEE0[var_a1].D_8018E118_index = gNumD_8018E118Entries; if (temp_v0->mk64Texture != NULL) { - sp2C = var_a3; - sp24 = temp_v1; - func_80099958(temp_s0->mk64Texture, arg1, 0, var_a3); + func_80099958(temp_v0->mk64Texture, arg1, 0); } - temp_a0 = temp_s0->unk8; - if (temp_a0 != NULL) { - sp24 = temp_v1; - sp2C = var_a3; - func_80099958(temp_a0, arg1, 1, var_a3); + if ((temp_v0 + 1)->mk64Texture != NULL) { + func_80099958((temp_v0 + 1)->mk64Texture, arg1, 1); } else { - sp2C = var_a3; - sp24 = temp_v1; - func_80099958(temp_s0->mk64Texture, arg1, 1, var_a3); + func_80099958(temp_v0->mk64Texture, arg1, 1); } - temp_v1->unk14 = 0; - return sp2C; + // ????????????????????? + D_8018DEE0[var_a1].unk14 = (temp_v0->mk64Texture != ((void *) 0)) * 0; + return var_a1; } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009A478.s") -#endif void func_8009A594(s32 arg0, s32 arg1, MkAnimation *arg2) { MkAnimation *temp_v0; @@ -5707,506 +5611,256 @@ Gfx *func_8009B9D0(Gfx *displayListHead, MkTexture *textures) { } } -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -Gfx *func_80095E10(Gfx *, s8, ?, ?, s32, s32, s32, s32, s32, s32, s32, s32, s32); /* extern */ -Gfx *func_800987D0(Gfx *, ?, ?, u16, s32, s32, s32, s32, s32, s32); /* extern */ - Gfx *func_8009BA74(Gfx *arg0, MkTexture *arg1, s32 column, s32 row) { - Gfx *temp_v0_2; - Gfx *var_s0; - Gfx *var_v0; - s32 temp_t1; + MkTexture *temp_v0; s32 temp_v0_3; s8 var_s4; - u16 temp_s1; - u16 temp_s1_2; - u16 temp_t7; - u16 temp_v0_4; - u16 temp_v0_5; - void *temp_v0; - void *var_s2; - var_s0 = arg0; temp_v0 = segmented_to_virtual_dupe(arg1); - var_s2 = temp_v0; - if (temp_v0->unk4 != 0) { - do { - temp_t7 = var_s2->unk0; - var_s4 = 0; - temp_v0_2 = var_s0; - switch (temp_t7) { - case 0: - var_s0->words.w0 = 0x06000000; - var_s0->words.w1 = (u32) D_02007708; - var_s0 += 8; - break; - case 1: - var_s0->words.w0 = 0x06000000; - var_s0->words.w1 = (u32) D_02007728; - var_s0 += 8; - break; - case 2: - var_s0->words.w1 = (u32) D_02007748; - var_s0->words.w0 = 0x06000000; - var_s0 += 8; - break; - case 3: - var_s0->words.w1 = (u32) D_02007768; - var_s0->words.w0 = 0x06000000; - var_s0 += 8; - var_s4 = 3; - break; - case 4: - var_s0->words.w1 = (u32) D_02007788; - var_s0->words.w0 = 0x06000000; - var_s0 += 8; - break; - default: - var_s0 += 8; - temp_v0_2->words.w0 = 0x06000000; - temp_v0_2->words.w1 = (u32) D_02007728; - break; + while (temp_v0->textureData != NULL) { + var_s4 = 0; + switch (temp_v0->type) { + case 0: + gSPDisplayList(arg0++, D_02007708); + break; + case 1: + gSPDisplayList(arg0++, D_02007728); + break; + case 2: + gSPDisplayList(arg0++, D_02007748); + break; + case 3: + gSPDisplayList(arg0++, D_02007768); + var_s4 = 3; + break; + case 4: + gSPDisplayList(arg0++, D_02007788); + break; + default: + gSPDisplayList(arg0++, D_02007728); + break; + } + temp_v0_3 = func_8009B8C4(temp_v0->textureData); + if (temp_v0_3 != 0) { + if (D_8018E7B0 != 4) { + arg0 = func_80095E10(arg0, var_s4, 0x00000400, 0x00000400, 0, 0, temp_v0->width, temp_v0->height, temp_v0->dX + column, temp_v0->dY + row, temp_v0_3, temp_v0->width, temp_v0->height); + } else { + arg0 = func_800987D0(arg0, 0U, 0U, temp_v0->width, temp_v0->height, temp_v0->dX + column, temp_v0->dY + row, temp_v0_3, temp_v0->width, temp_v0->height); } - temp_v0_3 = func_8009B8C4(var_s2->unk4); - if (temp_v0_3 != 0) { - if (D_8018E7B0 != 4) { - temp_s1 = var_s2->unk8; - temp_v0_4 = var_s2->unkA; - var_v0 = func_80095E10(var_s0, var_s4, 0x400, 0x400, 0, 0, (s32) temp_s1, (s32) temp_v0_4, var_s2->unkC + column, var_s2->unkE + row, temp_v0_3, (s32) temp_s1, (s32) temp_v0_4); - } else { - temp_v0_5 = var_s2->unkA; - temp_s1_2 = var_s2->unk8; - var_v0 = func_800987D0(var_s0, 0, 0, temp_s1_2, (s32) temp_v0_5, var_s2->unkC + column, var_s2->unkE + row, temp_v0_3, (s32) temp_s1_2, (s32) temp_v0_5); - } - var_s0 = var_v0; - } - temp_t1 = var_s2->unk18; - var_s2 += 0x14; - } while (temp_t1 != 0); + } + temp_v0++; } - return var_s0; + return arg0; } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009BA74.s") -#endif - -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -Gfx *func_80097274(Gfx *, ?, ?, ?, s32, s32, s32, s32, s32, s32, s32, s32, s32, s32); /* extern */ -Gfx *func_80097A14(Gfx *, ?, ?, ?, s32, s32, s32, s32, s32, s32, s32); /* extern */ -Gfx *func_80097AE4(Gfx *, ?, s32, s32, s32, s32); /* extern */ -Gfx *func_80097E58(Gfx *, ?, ?, ?, s32, s32, s32, s32, s32, s32, s32, s32); /* extern */ Gfx *func_8009BC9C(Gfx *arg0, MkTexture *arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5) { - Gfx *var_s1; - Gfx *var_v0; - s16 temp_v0_2; - s32 temp_t5; + MkTexture *var_s0; s32 temp_v0_3; - u16 temp_v0_4; - u16 temp_v0_5; - u16 temp_v0_6; - u16 temp_v1; - u16 temp_v1_2; - u16 temp_v1_3; - void *temp_v0; - void *var_s0; - var_s1 = arg0; - temp_v0 = segmented_to_virtual_dupe(arg1); - var_s0 = temp_v0; - if (temp_v0->unk4 != 0) { - do { - temp_v0_2 = var_s0->unk0; - switch (temp_v0_2) { /* irregular */ - case 0: - var_s1->words.w0 = 0x06000000; - var_s1->words.w1 = (u32) D_02007708; - var_s1 += 8; + var_s0 = segmented_to_virtual_dupe(arg1); + while (var_s0->textureData != NULL) { + switch (var_s0->type) { /* irregular */ + case 0: + gSPDisplayList(arg0++, D_02007708); + break; + case 1: + gSPDisplayList(arg0++, D_02007728); + break; + } + temp_v0_3 = func_8009B8C4(var_s0->textureData); + if (temp_v0_3 != 0) { + switch (arg4) { /* switch 1; irregular */ + case 1: /* switch 1 */ + arg0 = func_80097AE4(arg0, 0, var_s0->dX + arg2, var_s0->dY + arg3, temp_v0_3, arg5); break; - case 1: - var_s1->words.w1 = (u32) D_02007728; - var_s1->words.w0 = 0x06000000; - var_s1 += 8; + case 2: /* switch 1 */ + arg0 = func_80097E58(arg0, 0, 0, 0U, var_s0->width, var_s0->height, var_s0->dX + arg2, var_s0->dY + arg3, temp_v0_3, var_s0->width, var_s0->height, arg5); + break; + case 3: /* switch 1 */ + arg0 = func_80097A14(arg0, 0, 0, 0, var_s0->width, var_s0->height, var_s0->dX + arg2, var_s0->dY + arg3, temp_v0_3, var_s0->width, var_s0->height); + break; + case 4: /* switch 1 */ + arg0 = func_80097274(arg0, 0, 0x00000400, 0x00000400, 0, 0, var_s0->width, var_s0->height, var_s0->dX + arg2, var_s0->dY + arg3, temp_v0_3, var_s0->width, var_s0->height, arg5); break; } - temp_v0_3 = func_8009B8C4(var_s0->unk4); - if (temp_v0_3 != 0) { - switch (arg4) { /* switch 1; irregular */ - case 1: /* switch 1 */ - var_v0 = func_80097AE4(var_s1, 0, var_s0->unkC + arg2, var_s0->unkE + arg3, temp_v0_3, arg5); -block_17: - var_s1 = var_v0; - break; - case 2: /* switch 1 */ - temp_v0_4 = var_s0->unk8; - temp_v1 = var_s0->unkA; - var_v0 = func_80097E58(var_s1, 0, 0, 0, (s32) temp_v0_4, (s32) temp_v1, var_s0->unkC + arg2, var_s0->unkE + arg3, temp_v0_3, (s32) temp_v0_4, (s32) temp_v1, arg5); - goto block_17; - case 3: /* switch 1 */ - temp_v0_5 = var_s0->unk8; - temp_v1_2 = var_s0->unkA; - var_v0 = func_80097A14(var_s1, 0, 0, 0, (s32) temp_v0_5, (s32) temp_v1_2, var_s0->unkC + arg2, var_s0->unkE + arg3, temp_v0_3, (s32) temp_v0_5, (s32) temp_v1_2); - goto block_17; - case 4: /* switch 1 */ - temp_v0_6 = var_s0->unk8; - temp_v1_3 = var_s0->unkA; - var_v0 = func_80097274(var_s1, 0, 0x400, 0x400, 0, 0, (s32) temp_v0_6, (s32) temp_v1_3, var_s0->unkC + arg2, var_s0->unkE + arg3, temp_v0_3, (s32) temp_v0_6, (s32) temp_v1_3, arg5); - goto block_17; - } - } - temp_t5 = var_s0->unk18; - var_s0 += 0x14; - } while (temp_t5 != 0); + } + var_s0++; } - return var_s1; + return arg0; } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009BC9C.s") -#endif - -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -Gfx *func_80095BD0(Gfx *, s32, f32, f32, s32, s32, f32, f32); /* extern */ Gfx *func_8009BEF0(Gfx *arg0, MkTexture *arg1, f32 arg2, f32 arg3, s32 arg4, f32 arg5, f32 arg6) { - Gfx *var_s1; - Gfx *var_v0_2; - f32 temp_f0; - f32 temp_f0_2; - f32 var_f10; - f32 var_f16; - f32 var_f16_2; - f32 var_f16_3; - f32 var_f18; - f32 var_f4; - f32 var_f6; - f32 var_f6_2; - s32 temp_v0_2; s32 var_v0; - u16 temp_t0; - u16 temp_t1; - u16 temp_t2; - u16 temp_t5; - u16 temp_t6; - u16 temp_t7; - u16 temp_t8; - u16 temp_t9; - void *temp_v0; - void *var_s0; + s32 temp_v0_2; + f32 thing0; + f32 thing1; + MkTexture *var_s0; - var_s1 = arg0; - temp_v0 = segmented_to_virtual_dupe(arg1); - var_s0 = temp_v0; - if (temp_v0->unk4 != 0) { - do { - temp_t7 = var_s0->unkC; - var_v0 = 0; - var_f6 = (f32) temp_t7; - if ((s32) temp_t7 < 0) { - var_f6 += 4294967296.0f; - } - temp_f0 = var_f6 + arg2; - if (temp_f0 > 320.0f) { - var_v0 = 1; - } - temp_t8 = var_s0->unk8; - var_f16 = (f32) temp_t8; - if ((s32) temp_t8 < 0) { - var_f16 += 4294967296.0f; - } - if ((temp_f0 + (var_f16 * arg5)) < 0.0f) { - var_v0 += 1; - } - temp_t9 = var_s0->unkE; - var_f6_2 = (f32) temp_t9; - if ((s32) temp_t9 < 0) { - var_f6_2 += 4294967296.0f; - } - temp_f0_2 = var_f6_2 + arg3; - if (temp_f0_2 < 0.0f) { - var_v0 += 1; - } - temp_t0 = var_s0->unkA; - var_f16_2 = (f32) temp_t0; - if ((s32) temp_t0 < 0) { - var_f16_2 += 4294967296.0f; - } - if ((temp_f0_2 - (var_f16_2 * arg6)) > 240.0f) { - var_v0 += 1; - } - if (var_v0 != 0) { + var_s0 = segmented_to_virtual_dupe(arg1); + while (var_s0->textureData != NULL) { + var_v0 = 0; - } else { - temp_v0_2 = func_8009B8C4(var_s0->unk4); - if (temp_v0_2 != 0) { - switch (arg4) { /* irregular */ - case 1: - var_s1->words.w0 = 0x06000000; - var_s1->words.w1 = (u32) D_020077F8; - temp_t1 = var_s0->unkC; - var_f18 = (f32) temp_t1; - if ((s32) temp_t1 < 0) { - var_f18 += 4294967296.0f; - } - temp_t2 = var_s0->unkE; - var_f10 = (f32) temp_t2; - if ((s32) temp_t2 < 0) { - var_f10 += 4294967296.0f; - } - var_v0_2 = func_80095BD0(var_s1 + 8, temp_v0_2, var_f18 + arg2, var_f10 + arg3, (s32) var_s0->unk8, (s32) var_s0->unkA, arg5, arg6); -block_34: - var_s1 = var_v0_2; - break; - case 2: - var_s1->words.w0 = 0x06000000; - var_s1->words.w1 = (u32) D_02007818; - temp_t5 = var_s0->unkC; - var_f16_3 = (f32) temp_t5; - if ((s32) temp_t5 < 0) { - var_f16_3 += 4294967296.0f; - } - temp_t6 = var_s0->unkE; - var_f4 = (f32) temp_t6; - if ((s32) temp_t6 < 0) { - var_f4 += 4294967296.0f; - } - var_v0_2 = func_80095BD0(var_s1 + 8, temp_v0_2, var_f16_3 + arg2, var_f4 + arg3, (s32) var_s0->unk8, (s32) var_s0->unkA, arg5, arg6); - goto block_34; - } + thing0 = var_s0->dX + arg2; + if (thing0 > 320.0f) { + var_v0 = 1; + } + thing0 += var_s0->width * arg5; + if (thing0 < 0.0f) { + var_v0 += 1; + } + thing1 = var_s0->dY + arg3; + if (thing1 < 0.0f) { + var_v0 += 1; + } + thing1 -= var_s0->height * arg6; + if (thing1 > 240.0f) { + var_v0 += 1; + } + + if (var_v0 != 0) { + var_s0++; + } else { + temp_v0_2 = func_8009B8C4(var_s0->textureData); + if (temp_v0_2 != 0) { + switch (arg4) { /* irregular */ + case 1: + gSPDisplayList(arg0++, D_020077F8); + arg0 = func_80095BD0(arg0, (u8 *) temp_v0_2, var_s0->dX + arg2, var_s0->dY + arg3, var_s0->width, var_s0->height, arg5, arg6); + break; + case 2: + gSPDisplayList(arg0++, D_02007818); + arg0 = func_80095BD0(arg0, (u8 *) temp_v0_2, var_s0->dX + arg2, var_s0->dY + arg3, var_s0->width, var_s0->height, arg5, arg6); + break; } } - var_s0 += 0x14; - } while (var_s0->unk4 != 0); + var_s0++; + } } - return var_s1; + return arg0; } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009BEF0.s") -#endif - -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -Gfx *func_800963F0(Gfx *, s8, ?, ?, f32, f32, s32, s32, s32, s32, s32, s32, s32, s32, s32); /* extern */ Gfx *func_8009C204(Gfx *arg0, MkTexture *arg1, s32 arg2, s32 arg3, s32 arg4) { - Gfx *var_s0; - Gfx *var_v0; - s16 temp_v0_2; + s32 var_s2; s32 temp_t0; - s32 temp_t1; - s8 var_s2; - u16 temp_v0_3; - u16 temp_v0_4; - u16 temp_v1; - u16 temp_v1_2; - void *temp_v0; - void *var_s1; + MkTexture *var_s1; - var_s0 = arg0; - temp_v0 = segmented_to_virtual_dupe(arg1); - var_s1 = temp_v0; - if (temp_v0->unk4 != 0) { - do { - temp_v0_2 = var_s1->unk0; - var_s2 = 0; - switch (temp_v0_2) { /* irregular */ - default: - var_s0->words.w0 = 0x06000000; - var_s0->words.w1 = (u32) D_02007728; - var_s0 += 8; - break; - case 0: - var_s0->words.w0 = 0x06000000; - var_s0->words.w1 = (u32) D_02007708; - var_s0 += 8; - break; - case 1: - var_s0->words.w0 = 0x06000000; - var_s0->words.w1 = (u32) D_02007728; - var_s0 += 8; - break; - case 3: - var_s0->words.w1 = (u32) D_02007768; - var_s0->words.w0 = 0x06000000; - var_s0 += 8; - var_s2 = 3; - break; - } - temp_t0 = func_8009B8C4(var_s1->unk4); - switch (arg4) { /* switch 1; irregular */ - case 2: /* switch 1 */ - temp_v0_3 = var_s1->unk8; - temp_v1 = var_s1->unkA; - var_v0 = func_800963F0(var_s0, var_s2, 0x400, 0x400, 0.5f, 0.5f, 0, 0, (s32) temp_v0_3, (s32) temp_v1, var_s1->unkC + arg2, var_s1->unkE + arg3, temp_t0, (s32) temp_v0_3, (s32) temp_v1); -block_14: - var_s0 = var_v0; - break; - case 3: /* switch 1 */ - temp_v0_4 = var_s1->unk8; - temp_v1_2 = var_s1->unkA; - var_v0 = func_800963F0(var_s0, var_s2, 0x400, 0x400, 0.457f, 0.5f, 0, 0, (s32) temp_v0_4, (s32) temp_v1_2, var_s1->unkC + arg2, var_s1->unkE + arg3, temp_t0, (s32) temp_v0_4, (s32) temp_v1_2); - goto block_14; - } - temp_t1 = var_s1->unk18; - var_s1 += 0x14; - } while (temp_t1 != 0); + var_s1 = segmented_to_virtual_dupe(arg1); + while (var_s1->textureData != NULL) { + var_s2 = 0; + switch (var_s1->type) { /* irregular */ + case 0: + gSPDisplayList(arg0++, D_02007708); + break; + case 1: + gSPDisplayList(arg0++, D_02007728); + break; + case 3: + gSPDisplayList(arg0++, D_02007768); + var_s2 = 3; + break; + default: + gSPDisplayList(arg0++, D_02007728); + break; + } + temp_t0 = func_8009B8C4(var_s1->textureData); + switch (arg4) { /* switch 1; irregular */ + case 2: /* switch 1 */ + arg0 = func_800963F0(arg0, var_s2, 0x00000400, 0x00000400, 0.5f, 0.5f, 0, 0, var_s1->width, var_s1->height, var_s1->dX + arg2, var_s1->dY + arg3, temp_t0, var_s1->width, var_s1->height); + break; + case 3: /* switch 1 */ + arg0 = func_800963F0(arg0, var_s2, 0x00000400, 0x00000400, 0.457f, 0.5f, 0, 0, var_s1->width, var_s1->height, var_s1->dX + arg2, var_s1->dY + arg3, temp_t0, var_s1->width, var_s1->height); + break; + } + var_s1++; } - return var_s0; + return arg0; } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009C204.s") -#endif - -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -Gfx *func_80095E10(Gfx *, s8, ?, ?, s32, s32, s32, s32, s32, s32, s32, s32, s32); /* extern */ -Gfx *func_800963F0(Gfx *, s8, ?, ?, f32, f32, s32, s32, s32, s32, s32, s32, s32, s32, s32); /* extern */ -Gfx *func_80097E58(Gfx *, s8, ?, ?, s32, s32, s32, s32, s32, s32, s32, s32); /* extern */ -extern ? D_8018E11C; -extern ? D_8018E124; Gfx *func_8009C434(Gfx *arg0, struct_8018DEE0_entry *arg1, s32 arg2, s32 arg3, s32 arg4) { - Gfx *var_s1; - Gfx *var_v0; - s16 temp_v0_2; - s32 temp_t2; s32 var_t0; - s8 var_t1; - u16 temp_v0_3; - u16 temp_v0_4; - u16 temp_v0_5; - u16 temp_v1; - u16 temp_v1_2; - u16 temp_v1_3; - void *temp_v0; - void *var_s0; + s32 var_t1; + Gfx *temp; + MkTexture *var_s0; - var_s1 = arg0; - temp_v0 = segmented_to_virtual_dupe(arg1->textureSequence[arg1->sequenceIndex].mk64Texture); - var_s0 = temp_v0; - if (temp_v0->unk4 != 0) { - do { - temp_v0_2 = var_s0->unk0; - var_t1 = 0; - switch (temp_v0_2) { /* irregular */ - default: - var_s1->words.w0 = 0x06000000; - var_s1->words.w1 = (u32) D_02007728; - var_s1 += 8; + var_s0 = segmented_to_virtual_dupe(arg1->textureSequence[arg1->sequenceIndex].mk64Texture); + temp = D_02007728; + while (var_s0->textureData != NULL) { + var_t1 = 0; + switch (var_s0->type) { /* irregular */ + default: + gSPDisplayList(arg0++, temp); + break; + case 0: + gSPDisplayList(arg0++, D_02007708); + break; + case 1: + gSPDisplayList(arg0++, temp); + break; + case 3: + gSPDisplayList(arg0++, D_02007768); + var_t1 = 3; + break; + } + if (arg1->unk14 != 0) { + var_t0 = D_8018E118[arg1->D_8018E118_index + 1].offset; + } else { + var_t0 = D_8018E118[arg1->D_8018E118_index].offset; + if (1) { } if (1) { } if (1) { } + } + if (arg4 >= 0) { + arg0 = func_80097E58(arg0, var_t1, 0, 0U, var_s0->width, var_s0->height, var_s0->dX + arg2, var_s0->dY + arg3, D_8018D9B0 + (var_t0* 2), var_s0->width, var_s0->height, (u32) arg4); + } else { + switch(arg4) { + case -1: + arg0 = func_80095E10(arg0, var_t1, 0x00000400, 0x00000400, 0, 0, var_s0->width, var_s0->height, var_s0->dX + arg2, var_s0->dY + arg3, D_8018D9B0 + (var_t0* 2), var_s0->width, var_s0->height); break; - case 0: - var_s1->words.w0 = 0x06000000; - var_s1->words.w1 = (u32) D_02007708; - var_s1 += 8; - break; - case 1: - var_s1->words.w0 = 0x06000000; - var_s1->words.w1 = (u32) D_02007728; - var_s1 += 8; - break; - case 3: - var_s1->words.w1 = (u32) D_02007768; - var_s1->words.w0 = 0x06000000; - var_s1 += 8; - var_t1 = 3; + case -2: + arg0 = func_800963F0(arg0, var_t1, 0x00000400, 0x00000400, 0.5f, 0.5f, 0, 0, var_s0->width, var_s0->height, var_s0->dX + arg2, var_s0->dY + arg3, D_8018D9B0 + (var_t0* 2), var_s0->width, var_s0->height); break; } - if (arg1->unk14 != 0) { - var_t0 = *(&D_8018E124 + (arg1->D_8018E118_index * 8)); - } else { - var_t0 = *(&D_8018E11C + (arg1->D_8018E118_index * 8)); - } - if (arg4 >= 0) { - temp_v0_3 = var_s0->unk8; - temp_v1 = var_s0->unkA; - var_v0 = func_80097E58(var_s1, var_t1, 0, 0, (s32) temp_v0_3, (s32) temp_v1, var_s0->unkC + arg2, var_s0->unkE + arg3, (var_t0 * 2) + D_8018D9B0, (s32) temp_v0_3, (s32) temp_v1, arg4); - goto block_18; - } - if (arg4 != -2) { - if (arg4 == -1) { - temp_v0_4 = var_s0->unk8; - temp_v1_2 = var_s0->unkA; - var_v0 = func_80095E10(var_s1, var_t1, 0x400, 0x400, 0, 0, (s32) temp_v0_4, (s32) temp_v1_2, var_s0->unkC + arg2, var_s0->unkE + arg3, (var_t0 * 2) + D_8018D9B0, (s32) temp_v0_4, (s32) temp_v1_2); - goto block_18; - } - } else { - temp_v0_5 = var_s0->unk8; - temp_v1_3 = var_s0->unkA; - var_v0 = func_800963F0(var_s1, var_t1, 0x400, 0x400, 0.5f, 0.5f, 0, 0, (s32) temp_v0_5, (s32) temp_v1_3, var_s0->unkC + arg2, var_s0->unkE + arg3, (var_t0 * 2) + D_8018D9B0, (s32) temp_v0_5, (s32) temp_v1_3); -block_18: - var_s1 = var_v0; - } - temp_t2 = var_s0->unk18; - var_s0 += 0x14; - } while (temp_t2 != 0); + } + var_s0++; } - return var_s1; + return arg0; } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009C434.s") -#endif - -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -Gfx *func_80097E58(Gfx *, s8, ?, ?, s32, s32, s32, s32, u8 *, s32, s32, s32); /* extern */ +#ifdef NON_MATCHING +// https://decomp.me/scratch/TK1UV +// Some register allocation differences when accessing `D_802BFB80` Gfx *func_8009C708(Gfx *arg0, struct_8018DEE0_entry *arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5) { - Gfx *var_s0; - s16 temp_v0_2; - s32 temp_t5; - s8 var_t0; - u16 temp_v0_3; - u16 temp_v1; - void *temp_v0; - void *var_s1; + s32 var_t0; + s32 thing; + Gfx *temp; + MkTexture *var_s1; - var_s0 = arg0; - temp_v0 = segmented_to_virtual_dupe(arg1->textureSequence[arg1->sequenceIndex].mk64Texture); - var_s1 = temp_v0; - if (temp_v0->unk4 != 0) { - do { - temp_v0_2 = var_s1->unk0; - var_t0 = 0; - switch (temp_v0_2) { /* irregular */ - default: - var_s0->words.w0 = 0x06000000; - var_s0->words.w1 = (u32) D_02007728; - var_s0 += 8; - break; - case 0: - var_s0->words.w0 = 0x06000000; - var_s0->words.w1 = (u32) D_02007708; - var_s0 += 8; - break; - case 1: - var_s0->words.w0 = 0x06000000; - var_s0->words.w1 = (u32) D_02007728; - var_s0 += 8; - break; - case 2: - var_s0->words.w1 = (u32) D_02007748; - var_s0->words.w0 = 0x06000000; - var_s0 += 8; - break; - case 3: - var_s0->words.w1 = (u32) D_02007768; - var_s0->words.w0 = 0x06000000; - var_s0 += 8; - var_t0 = 3; - break; - } - if (arg5 >= 0) { - temp_v0_3 = var_s1->unk8; - temp_v1 = var_s1->unkA; - var_s0 = func_80097E58(var_s0, var_t0, 0, 0, (s32) temp_v0_3, (s32) temp_v1, var_s1->unkC + arg2, var_s1->unkE + arg3, &D_802BFB80[0][0][4].pixel_index_array[(arg1->unk14 << 0x10) + ((arg4 / 2) << 0xF) + ((arg4 % 2) << 0xD)], (s32) temp_v0_3, (s32) temp_v1, arg5); - } - temp_t5 = var_s1->unk18; - var_s1 += 0x14; - } while (temp_t5 != 0); + var_s1 = segmented_to_virtual_dupe(arg1->textureSequence[arg1->sequenceIndex].mk64Texture); + temp = D_02007728; + while (var_s1->textureData != NULL) { + var_t0 = 0; + switch (var_s1->type) { /* irregular */ + case 0: + gSPDisplayList(arg0++, D_02007708); + break; + case 1: + gSPDisplayList(arg0++, temp); + break; + case 2: + gSPDisplayList(arg0++, D_02007748); + break; + case 3: + gSPDisplayList(arg0++, D_02007768); + var_t0 = 3; + break; + default: + gSPDisplayList(arg0++, temp); + break; + } + if (arg5 >= 0) { + arg0 = func_80097E58(arg0, var_t0, 0, 0U, var_s1->width, var_s1->height, var_s1->dX + arg2, var_s1->dY + arg3, D_802BFB80[arg1->unk14][arg4 / 2][((arg4 % 2) + 2) * 2].pixel_index_array, var_s1->width, var_s1->height, (u32) arg5); + } + var_s1++; } - return var_s0; + return arg0; } #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009C708.s") @@ -6377,172 +6031,158 @@ void func_8009CE1C(void) { } } -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -extern ? D_8018E7AC; -s16 gCurrentCourseId; /* unable to generate initializer */ - +#ifdef NON_MATCHING +// https://decomp.me/scratch/NSiHw +// Register allocation difference concerning the use of `gModeSelection` +// See the `REGALLOC DIFF HERE` comment void func_8009CE64(s32 arg0) { - s32 sp28; - s8 *sp18; - s32 temp_t6; - s32 temp_t6_2; - s32 temp_v1; - s32 temp_v1_2; + s32 thing; s32 var_a1; - s32 var_a1_2; - s32 var_t7; - s32 var_v0; - s8 *temp_v0; - struct_8018D9E0_entry *temp_v0_2; - struct_8018D9E0_entry *temp_v0_3; - struct_8018D9E0_entry *temp_v0_4; - struct_8018D9E0_entry *temp_v0_5; + s32 stackPadding0; + struct_8018D9E0_entry *temp_v0; var_a1 = 0; - if (gGamestate == (s32) 5) { - if ((gCCSelection != 2) && (gCCSelection != 3)) { - - } else if ((D_802874D8.unk1D < 3) && (gCupSelection == 3)) { + if (gGamestate == 5) { + if (2 != gCCSelection) { + thing = gCCSelection; + if (thing != 3) { + goto func_8009CE64_label1; + } + goto func_8009CE64_label2; + } +func_8009CE64_label2: + if ((D_802874D8.unk1D < 3) && (gCupSelection == 3)) { var_a1 = 1; } - if (var_a1 != 0) { +func_8009CE64_label1: + if (var_a1) { gMenuSelectionFromEndingSequence = 9; gCreditsCourseId = 8; - return; + } else { + gMenuSelectionFromEndingSequence = 1; + gMenuSelection = 0x0000000B; } - gMenuSelectionFromEndingSequence = 1; - gMenuSelection = 0x0000000B; - return; - } - if (gGamestate == 4) { - temp_v0 = arg0 + &D_8018E7AC; - if (*temp_v0 == 2) { - if (temp_v0 != &D_8018E7B0) { - *temp_v0 = 5; - return; - } - sp18 = temp_v0; - sp28 = 0; - temp_v0_2 = find_8018D9E0_entry(0x000000B0); - if (temp_v0_2 != NULL) { - temp_v1 = temp_v0_2->unk4; - switch (temp_v1) { /* switch 8; irregular */ - case 10: /* switch 8 */ - func_802903B0(); - return; - case 11: /* switch 8 */ - func_80290388(); - return; - case 12: /* switch 8 */ - func_80290360(); - return; - default: /* switch 8 */ - case 13: /* switch 8 */ - func_80290338(); - return; - } + } else if (gGamestate == 4) { + if (D_8018E7AC[arg0] == 2) { + if (arg0 != 4) { + D_8018E7AC[arg0] = 5; } else { - sp28 = 0; - temp_v0_3 = find_8018D9E0_entry(0x000000AC); - if (temp_v0_3 != NULL) { - temp_v1_2 = temp_v0_3->unk4; - switch (temp_v1_2) { /* switch 7; irregular */ - case 11: /* switch 7 */ + var_a1 = 0; + temp_v0 = find_8018D9E0_entry(0x000000B0); + if (temp_v0 != NULL) { + switch (temp_v0->unk4) { /* switch 8; irregular */ + case 10: /* switch 8 */ func_802903B0(); - D_8016556E = 1; - return; - default: /* switch 7 */ - case 12: /* switch 7 */ + break; + case 11: /* switch 8 */ + func_80290388(); + break; + case 12: /* switch 8 */ + func_80290360(); + break; + default: /* switch 8 */ + case 13: /* switch 8 */ func_80290338(); - return; + break; } } else { - sp28 = 0; - temp_v0_4 = find_8018D9E0_entry(0x000000C7); - var_a1_2 = 0; - if (temp_v0_4 != NULL) { - temp_t6 = temp_v0_4->unk4; - switch (temp_t6) { /* switch 1 */ - case 12: /* switch 1 */ + var_a1 = 0; + temp_v0 = find_8018D9E0_entry(0x000000AC); + if (temp_v0 != NULL) { + switch (temp_v0->unk4) { /* switch 7; irregular */ + case 11: /* switch 7 */ func_802903B0(); - var_a1_2 = 1; + D_8016556E = 1; break; - case 13: /* switch 1 */ - case 22: /* switch 1 */ - case 42: /* switch 1 */ - func_80290388(); - var_a1_2 = 1; - break; - case 14: /* switch 1 */ - case 23: /* switch 1 */ - case 43: /* switch 1 */ - func_80290360(); - var_a1_2 = 1; - break; - case 15: /* switch 1 */ - case 24: /* switch 1 */ - case 32: /* switch 1 */ - case 44: /* switch 1 */ + default: /* switch 7 */ + case 12: /* switch 7 */ func_80290338(); - var_a1_2 = 1; break; - default: /* switch 1 */ - *sp18 = 5; - break; - } - if (var_a1_2 != 0) { - gIsGamePaused = 0; - } - } - temp_v0_5 = find_8018D9E0_entry(0x000000BD); - if (temp_v0_5 != NULL) { - temp_t6_2 = temp_v0_5->unk4; - switch (temp_t6_2) { /* switch 2 */ - case 11: /* switch 2 */ - D_8015F892 = 1; - D_8015F890 = 0; - func_802903B0(); - return; - case 12: /* switch 2 */ - D_8015F892 = 0; - D_8015F890 = 0; - func_80290388(); - return; - case 13: /* switch 2 */ - D_8015F892 = 0; - D_8015F890 = 0; - func_80290360(); - return; - case 14: /* switch 2 */ - D_8015F892 = 0; - D_8015F890 = 0; - func_80290338(); - return; - case 15: /* switch 2 */ - D_8015F892 = 0; - D_8015F890 = 1; - func_802903B0(); - return; } } else { - *sp18 = 5; + var_a1 = 0; + temp_v0 = find_8018D9E0_entry(0x000000C7); + if (temp_v0 != NULL) { + switch (temp_v0->unk4) { /* switch 1 */ + case 12: /* switch 1 */ + func_802903B0(); + var_a1 = 1; + break; + case 13: /* switch 1 */ + case 22: /* switch 1 */ + case 42: /* switch 1 */ + func_80290388(); + var_a1 = 1; + break; + case 14: /* switch 1 */ + case 23: /* switch 1 */ + case 43: /* switch 1 */ + func_80290360(); + var_a1 = 1; + break; + case 15: /* switch 1 */ + case 24: /* switch 1 */ + case 32: /* switch 1 */ + case 44: /* switch 1 */ + func_80290338(); + var_a1 = 1; + break; + default: /* switch 1 */ + D_8018E7AC[arg0] = 5; + break; + } + if (var_a1 != 0) { + gIsGamePaused = 0; + } + } + temp_v0 = find_8018D9E0_entry(0x000000BD); + if (temp_v0 != NULL) { + switch (temp_v0->unk4) { /* switch 2 */ + case 11: /* switch 2 */ + D_8015F892 = 1; + D_8015F890 = 0; + func_802903B0(); + break; + case 12: /* switch 2 */ + D_8015F892 = 0; + D_8015F890 = 0; + func_80290388(); + break; + case 13: /* switch 2 */ + D_8015F892 = 0; + D_8015F890 = 0; + func_80290360(); + break; + case 14: /* switch 2 */ + D_8015F892 = 0; + D_8015F890 = 0; + func_80290338(); + break; + case 15: /* switch 2 */ + D_8015F892 = 0; + D_8015F890 = 1; + func_802903B0(); + break; + default: /* switch 2 */ + break; + } + } else { + D_8018E7AC[arg0] = 5; + } } } } } } else { - *(&D_8018E7AC + arg0) = 0; + D_8018E7AC[arg0] = 0; if (gDebugMenuSelection != 0x40) { switch (D_8018EDE0) { /* switch 3 */ case 0: /* switch 3 */ - var_t7 = gMenuSelection + 1; if (gMenuSelection == 8) { gMenuSelection = 0x0000000A; D_800E86A4 = 2; } else { -block_74: - gMenuSelection = var_t7; + gMenuSelection++; } break; case 1: /* switch 3 */ @@ -6556,84 +6196,87 @@ block_74: switch (gNextDemoId) { /* switch 4 */ case 0: /* switch 4 */ gCurrentCourseId = 0; - gScreenModeSelection = SCREEN_MODE_1P; - gPlayerCountSelection1 = (s32) 1; + gScreenModeSelection = 0; + gPlayerCountSelection1 = 1; gPlayerCount = 1; - gCharacterSelections->unk0 = 0; + gCharacterSelections[0] = 0; gModeSelection = 0; break; case 1: /* switch 4 */ gCurrentCourseId = (s16) 1; - gScreenModeSelection = SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL; + gScreenModeSelection = (s32) 1; gPlayerCountSelection1 = 2; gPlayerCount = (s8) 2; - gCharacterSelections->unk0 = (s8) 2; - gCharacterSelections->unk1 = (s8) 4; + gCharacterSelections[0] = (s8) 2; + gCharacterSelections[1] = (s8) 4; gModeSelection = 2; break; case 2: /* switch 4 */ gCurrentCourseId = 0x000B; - gScreenModeSelection = SCREEN_MODE_1P; + gScreenModeSelection = 0; gPlayerCountSelection1 = (s32) 1; gPlayerCount = 1; - gCharacterSelections->unk0 = 1; + gCharacterSelections[0] = 1; gModeSelection = 0; break; case 3: /* switch 4 */ gCurrentCourseId = 0x000E; - gScreenModeSelection = SCREEN_MODE_3P_4P_SPLITSCREEN; + gScreenModeSelection = 3; gPlayerCountSelection1 = 3; gPlayerCount = (s8) 3; - gCharacterSelections->unk0 = 5; - gCharacterSelections->unk1 = 2; - gCharacterSelections->unk2 = 7; + gCharacterSelections[0] = 5; + gCharacterSelections[1] = 2; + gCharacterSelections[2] = 7; gModeSelection = (s32) 2; break; case 4: /* switch 4 */ gCurrentCourseId = 2; - gScreenModeSelection = SCREEN_MODE_1P; + gScreenModeSelection = 0; gPlayerCountSelection1 = (s32) 1; gPlayerCount = 1; - gCharacterSelections->unk0 = 7; + gCharacterSelections[0] = 7; gModeSelection = 0; break; case 5: /* switch 4 */ gCurrentCourseId = 0x000C; - gScreenModeSelection = SCREEN_MODE_3P_4P_SPLITSCREEN; + gScreenModeSelection = 3; gPlayerCountSelection1 = 4; - gPlayerCount = (s8) 4; - gCharacterSelections->unk0 = 0; - gCharacterSelections->unk1 = 1; - gCharacterSelections->unk2 = 6; - gCharacterSelections->unk3 = (s8) 3; + gPlayerCount = 4; + gCharacterSelections[0] = 0; + gCharacterSelections[1] = 1; + gCharacterSelections[2] = 6; + gCharacterSelections[3] = 3; gModeSelection = 2; break; + default: + break; } gNextDemoId += 1; if (gNextDemoId >= 6) { gNextDemoId = 0; } - gCupSelection = (s8) gCupSelectionByCourseId[gCurrentCourseId]; + gCupSelection = gCupSelectionByCourseId[gCurrentCourseId]; D_800DC540 = (s32) gCupSelection; gCupCourseSelection = (s8) gPerCupIndexByCourseId[gCurrentCourseId]; break; case 3: /* switch 3 */ - if (gMenuSelection != 6) { - if (gMenuSelection == 0x0000000B) { - gMenuSelection = 6; - } - } else { - gMenuSelection = 0x0000000B; + switch (gMenuSelection) { + case 11: + gMenuSelection = 6; + break; + case 6: + gMenuSelection = 11; + break; } break; case 4: /* switch 3 */ - var_t7 = 0x0000000B; - if (gMenuSelection != (s32) 5) { - if (gMenuSelection == 0x0000000B) { - gMenuSelection = (s32) 5; - } - } else { - goto block_74; + switch (gMenuSelection) { + case 11: + gMenuSelection = 5; + break; + case 5: + gMenuSelection = 11; + break; } break; } @@ -6648,64 +6291,70 @@ block_74: func_8009CE1C(); } D_8018EE0C = 0; - return; - } - switch (gDebugGotoScene) { /* switch 5; irregular */ - case 1: /* switch 5 */ - gGamestateNext = (s32) 5; - break; - case 2: /* switch 5 */ - case 3: /* switch 5 */ - gGamestateNext = 9; - gCreditsCourseId = 8; - break; - default: /* switch 5 */ - gGamestateNext = 4; - if (gModeSelection == (s32) 1) { - D_8018EDFB = 1; - } - break; - } - func_8000F124(); - if ((gScreenModeSelection == SCREEN_MODE_3P_4P_SPLITSCREEN) && ((gModeSelection == 0) || (gModeSelection == 1))) { - gModeSelection = 2; - } - if ((gCurrentCourseId != 0x000F) && (gCurrentCourseId != 0x0010) && (gCurrentCourseId != 0x0011) && (gCurrentCourseId != 0x0013)) { - var_v0 = gModeSelection; - if (var_v0 == 3) { - gModeSelection = 0; - var_v0 = 0; - } - if ((var_v0 == 2) && (gPlayerCountSelection1 == 1)) { - gModeSelection = 0; - } } else { - gModeSelection = 3; - if (gPlayerCountSelection1 == 1) { - gPlayerCount = (s8) 2; - gScreenModeSelection = SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL; - gPlayerCountSelection1 = (s32) gPlayerCount; + switch (gDebugGotoScene) { /* switch 5; irregular */ + case 1: /* switch 5 */ + gGamestateNext = (s32) 5; + break; + case 2: /* switch 5 */ + case 3: /* switch 5 */ + gGamestateNext = 9; + gCreditsCourseId = 8; + break; + default: /* switch 5 */ + gGamestateNext = 4; + if (gModeSelection == (s32) 1) { + D_8018EDFB = 1; + } + break; } - } - gCupSelection = (s8) gCupSelectionByCourseId[gCurrentCourseId]; - D_800DC540 = (s32) gCupSelection; - gCupCourseSelection = (s8) gPerCupIndexByCourseId[gCurrentCourseId]; - switch (gDebugGotoScene) { /* switch 6; irregular */ - case 2: /* switch 6 */ - gCCSelection = 0; - return; - case 3: /* switch 6 */ - gCCSelection = 3; - return; - default: /* switch 6 */ - if (gCCSelection == 3) { - gIsMirrorMode = 1; - return; + func_8000F124(); + if (gScreenModeSelection == 3) { + // REGALLOC DIFF HERE + if ((gModeSelection == 0) || (1 == gModeSelection)) { + gModeSelection = 2; + } + } + switch (gCurrentCourseId) { + case COURSE_BLOCK_FORT: + case COURSE_SKYSCRAPER: + case COURSE_DOUBLE_DECK: + case COURSE_BIG_DONUT: + gModeSelection = 3; + if (gPlayerCountSelection1 == 1) { + gPlayerCount = 2; + gScreenModeSelection = 1; + gPlayerCountSelection1 = gPlayerCount; + } + break; + default: + if (gModeSelection == 3) { + gModeSelection = 0; + } + if ((gModeSelection == 2) && (gPlayerCountSelection1 == 1)) { + gModeSelection = 0; + } + } + gCupSelection = gCupSelectionByCourseId[gCurrentCourseId]; + D_800DC540 = gCupSelection; + gCupCourseSelection = gPerCupIndexByCourseId[gCurrentCourseId]; + switch (gDebugGotoScene) { /* switch 6; irregular */ + case 1: /* switch 6 */ + break; + case 2: /* switch 6 */ + gCCSelection = 0; + break; + case 3: /* switch 6 */ + gCCSelection = 3; + break; + default: /* switch 6 */ + if (gCCSelection == 3) { + gIsMirrorMode = 1; + } else { + gIsMirrorMode = 0; + } + break; } - gIsMirrorMode = 0; - case 1: /* switch 6 */ - default: /* switch 2 */ - return; } } } @@ -6714,9 +6363,7 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009CE64.s") #endif #ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -? func_8009CE64(s32); /* extern */ -extern ? D_8018E7B8; +//generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Dec-23-2023 extern ? D_8018E7D0; extern ? D_8018E7E8; extern ? D_8018E810; @@ -6724,19 +6371,18 @@ extern ? D_8018E810; void func_8009D77C(s32 arg0, s32 arg1, s32 arg2) { s32 sp44; u32 *sp3C; - u32 *sp38; - RGBA16 *temp_v0_5; + s32 *sp38; + RGBA16 *temp_v0_4; s16 var_ra; s16 var_t3; s16 var_t4; + s32 *temp_t5; s32 temp_t8; s32 temp_v0; s32 temp_v0_2; - s32 temp_v0_4; s32 temp_v1_3; struct UnkStruct_800DC5EC *temp_v0_3; u32 *temp_t1; - u32 *temp_t5; u32 temp_t6; u32 var_t2; void *temp_a0; @@ -6767,19 +6413,18 @@ void func_8009D77C(s32 arg0, s32 arg1, s32 arg2) { var_ra = temp_v0_3->screenWidth; sp44 = (s32) temp_v0_3->screenHeight; } - temp_v0_4 = arg0 * 4; - temp_t1 = temp_v0_4 + &D_8018E7D0; - temp_t5 = temp_v0_4 + &D_8018E7B8; + temp_t1 = (arg0 * 4) + &D_8018E7D0; + temp_t5 = &D_8018E7B8[arg0]; var_t2 = (u32) (*temp_t1 * 0xFF) / (u32) *temp_t5; if ((s32) var_t2 >= 0x100) { var_t2 = 0x000000FF; } temp_v1_3 = var_ra / 2; temp_t8 = sp44 / 2; - temp_v0_5 = &D_800E7AE8[arg2]; + temp_v0_4 = &D_800E7AE8[arg2]; sp3C = temp_t1; sp38 = temp_t5; - gDisplayListHead = draw_box(gDisplayListHead, var_t3 - temp_v1_3, var_t4 - temp_t8, temp_v1_3 + var_t3, temp_t8 + var_t4, (s32) temp_v0_5->red, (s32) temp_v0_5->green, (s32) temp_v0_5->blue, (s32) var_t2); + gDisplayListHead = draw_box(gDisplayListHead, var_t3 - temp_v1_3, var_t4 - temp_t8, temp_v1_3 + var_t3, temp_t8 + var_t4, (s32) temp_v0_4->red, (s32) temp_v0_4->green, (s32) temp_v0_4->blue, (s32) var_t2); if (arg1 == 0) { temp_t6 = *temp_t1 + 1; *temp_t1 = temp_t6; @@ -6854,8 +6499,7 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009D998.s") #endif #ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -? func_8009CE64(?, ? *); /* extern */ +//generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Dec-23-2023 extern u32 D_8018E7C8; extern ? D_8018E7D0; @@ -6867,7 +6511,7 @@ void func_8009DAA8(void) { temp_t8 = D_8018E7D0.unk10 + 1; D_8018E7D0.unk10 = temp_t8; if (temp_t8 >= (u32) (D_8018E7C8 + 1)) { - func_8009CE64(4, &D_8018E7D0); + func_8009CE64(4); } temp_v1 = gDisplayListHead; gDisplayListHead = temp_v1 + 8; @@ -6884,8 +6528,7 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009DAA8.s") #endif #ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -? func_8009CE64(?); /* extern */ +//generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Dec-23-2023 extern s32 D_8018D9B8; extern u32 D_8018E7C8; extern ? D_8018E7D0; @@ -7064,21 +6707,18 @@ void func_8009E088(s32 arg0, s32 arg1) { } #ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 +//generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Dec-23-2023 extern s32 D_8018D9B8; -extern ? D_8018E7AC; -extern ? D_8018E7B8; -extern s32 D_8018E7E0; void func_8009E0F0(s32 arg0) { s32 var_v0; void *temp_t6; - if (D_8018E7AC.unk4 != 3) { - D_8018E7AC.unk4 = 3; - D_8018E7B8.unk10 = arg0; + if (D_8018E7AC->unk4 != 3) { + D_8018E7AC->unk4 = 3; + D_8018E7B8->unk10 = arg0; if ((u32) arg0 >= 0x100U) { - D_8018E7B8.unk10 = 0x000000FF; + D_8018E7B8->unk10 = 0x000000FF; } D_8018E7E0 = 0; var_v0 = 0; @@ -7234,92 +6874,59 @@ void func_8009E620(void) { } } -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -? func_8006EF60(); /* extern */ -s32 func_8009A374(void *); /* extern */ -s32 func_8009A478(void *, s32); /* extern */ -? func_8009B0A4(?, ?); /* extern */ -? func_8009B538(?, ?, u16, u16, s32); /* extern */ -s32 func_800B5218(); /* extern */ -extern ? D_801640F4; -extern u32 D_8018CA78; -u64 gTexture7ED50C[0x32]; - +#ifdef NON_MATCHING +// https://decomp.me/scratch/1BHpa +// Mostly register allocation stuff, but near `case 0xD4` there's a missing `move v0,zero` instruction +// I have no idea what's up with that. void add_8018D9E0_entry(s32 type, s32 column, s32 row, s8 priority) { - struct_8018D9E0_entry *sp7C; - Gfx *sp6C; - s32 sp3C; - MkTexture **sp24; /* compiler-managed */ - s32 sp20; - Gfx *temp_v0; - Gfx *temp_v1; - Gfx *temp_v1_2; - Gfx *temp_v1_3; - Gfx *temp_v1_4; - Gfx *temp_v1_5; - Gfx *temp_v1_6; - Gfx *temp_v1_7; - Gfx *temp_v1_8; - Gfx *temp_v1_9; - MkAnimation *var_a0; - MkAnimation *var_a0_2; - MkTexture **temp_v0_3; - MkTexture **var_v1; - MkTexture **var_v1_2; - RGBA16 *temp_v0_2; - Unk_D_800E70A0 *temp_v0_4; - s32 temp_t9; - s32 temp_v0_5; - s32 temp_v0_6; - s32 temp_v0_7; - s32 var_a2; - s32 var_v0; - s32 var_v0_2; - s32 var_v1_3; - s32 var_v1_4; - s32 var_v1_5; - s8 temp_a1; - s8 temp_a1_2; struct_8018D9E0_entry *var_ra; + s32 stackPadding0; + s32 stackPadding1; + s32 stackPadding2; + s32 temp_v0_6; + s32 var_v0; + s32 var_v1_3; + s32 temp_a1; + MkTexture *mk64Texture; + MkAnimation *var_a0; + s32 one = 1; var_v0 = 0; var_ra = D_8018D9E0; -loop_1: - var_v0 += 1; - if (var_ra->type != 0) { - if (var_v0 >= 0x21) { -loop_3: - goto loop_3; + while (1) { + var_v0++; + if (var_ra->type == 0) break; + + if (var_v0 > 0x20) { + while(1) {} } - var_ra += 0x28; - goto loop_1; + var_ra++; } + var_ra->type = type; var_ra->unk4 = 0; var_ra->unk8 = 0; var_ra->column = column; var_ra->row = row; var_ra->priority = (u8) priority; - var_ra->visible = 1; + var_ra->visible = one; var_ra->unk1C = 0; var_ra->unk20 = 0; - var_ra->type = type; switch (type) { /* irregular */ case 0xFA: s8018ED94 = 0; D_800E8530 = 0.0f; D_800E8534 = 3.0f; D_8018EDC0 = 0x000009C4; - D_8018EDC8 = 0.0f; + D_8018EDC8 = 0; D_8018EDCC = -270.0f; - D_8018EDD0 = 0.0f; - D_8018EDD4 = 0.0f; - D_8018EDD8 = 0.0f; - D_8018EDDC = 0.0f; - D_8018EDC4 = 3.0f; + D_8018EDD0 = 0; + D_8018EDD4 = 0; + D_8018EDD8 = 0; + D_8018EDDC = 0; + D_8018EDC4 = 3; var_ra->unk1C = -1; - var_ra->unk20 = (s32) 1U; - return; + var_ra->unk20 = one; + break; case 0xFB: D_8018EDC0 = 0x00000708; D_8018EDC8 = -51.0f; @@ -7327,84 +6934,37 @@ loop_3: D_8018EDD0 = -18.0f; D_8018EDD4 = -270.0f; D_8018EDD8 = 750.0f; - D_8018EDDC = 0.0f; + D_8018EDDC = 0; D_8018EDC4 = 1.0f; var_ra->unk1C = -1; - var_ra->unk20 = (s32) 1U; - return; + var_ra->unk20 = one; + break; case 0xD2: - sp7C = var_ra; func_800996BC(D_020014C8, 0); func_8009B954(D_020014C8); D_8018E75C = func_8009BA74(D_8018E75C, D_020014C8, var_ra->column, var_ra->row); func_8009B998(); - return; + break; case 0xD3: - sp7C = var_ra; func_800996BC(D_02001540, 0); func_8009B954(D_02001540); D_8018E75C = func_8009BA74(D_8018E75C, D_02001540, var_ra->column, var_ra->row); func_8009B998(); - return; + break; case 0xD4: - sp7C = var_ra; func_800996BC(D_0200157C, 0); func_80099184(D_02001874); - var_v1 = D_800E7AF8; var_ra->row = 0x00000069; - do { - sp24 = var_v1; - func_80099184(segmented_to_virtual_dupe(*var_v1)); - var_v1 += 4; - } while (var_v1 != D_800E7D0C); - return; + for (var_v0 = 0; var_v0 < 133; var_v0++) { + func_80099184(segmented_to_virtual_dupe(D_800E7AF8[var_v0])); + } + break; case 0xD5: - sp7C = var_ra; func_80099184(D_020015A4); func_8009B954(D_020015A4); - temp_v0 = func_8009BA74(D_8018E75C, D_020015A4, var_ra->column, var_ra->row); - D_8018E75C = temp_v0; - D_8018E75C = temp_v0 + 8; - temp_v0->words.w0 = 0xFD700000; - sp6C = temp_v0; - sp6C->words.w1 = func_8009B8C4(gTexture7ED50C); - temp_v1 = D_8018E75C; - D_8018E75C = temp_v1 + 8; - temp_v1->words.w0 = 0xF5700000; - temp_v1->words.w1 = 0x07080200; - temp_v1_2 = D_8018E75C; - D_8018E75C = temp_v1_2 + 8; - temp_v1_2->words.w1 = 0; - temp_v1_2->words.w0 = 0xE6000000; - temp_v1_3 = D_8018E75C; - D_8018E75C = temp_v1_3 + 8; - temp_v1_3->words.w1 = 0x074FF020; - temp_v1_3->words.w0 = 0xF3000000; - temp_v1_4 = D_8018E75C; - D_8018E75C = temp_v1_4 + 8; - temp_v1_4->words.w1 = 0; - temp_v1_4->words.w0 = 0xE7000000; - temp_v1_5 = D_8018E75C; - D_8018E75C = temp_v1_5 + 8; - temp_v1_5->words.w0 = 0xF5708000; - temp_v1_5->words.w1 = 0x00080200; - temp_v1_6 = D_8018E75C; - D_8018E75C = temp_v1_6 + 8; - temp_v1_6->words.w0 = 0xF2000000; - temp_v1_6->words.w1 = 0x003FC010; - temp_v1_7 = D_8018E75C; - D_8018E75C = temp_v1_7 + 8; - temp_v1_7->words.w1 = 0x000802C0; - temp_v1_7->words.w0 = 0xE44802D4; - temp_v1_8 = D_8018E75C; - D_8018E75C = temp_v1_8 + 8; - temp_v1_8->words.w1 = 0x00000080; - temp_v1_8->words.w0 = 0xB3000000; - temp_v1_9 = D_8018E75C; - D_8018E75C = temp_v1_9 + 8; - temp_v1_9->words.w0 = 0xB2000000; - temp_v1_9->words.w1 = 0x0400FC00; - sp7C = var_ra; + D_8018E75C = func_8009BA74(D_8018E75C, D_020015A4, var_ra->column, var_ra->row); + gDPLoadTextureBlock(D_8018E75C++, func_8009B8C4(gTexture7ED50C), G_IM_FMT_IA, G_IM_SIZ_16b, 256, 5, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + gSPTextureRectangle(D_8018E75C++, 0x80, 0x2C0, 0x480, 0x2D4, G_TX_RENDERTILE, 0, 0x80, 0x0400, 0xFC00); func_8009B998(); func_80099184(D_020015CC); func_8009B954(D_020015CC); @@ -7418,47 +6978,42 @@ loop_3: func_8009B954(D_02001658); D_8018E75C = func_8009BA74(D_8018E75C, D_02001658, var_ra->column, var_ra->row); func_8009B998(); - return; + break; case 0xD6: - sp7C = var_ra; - var_ra->D_8018DEE0_index = func_8009A374(segmented_to_virtual_dupe_2(*D_800E7D34)); - return; + var_ra->D_8018DEE0_index = func_8009A374(segmented_to_virtual_dupe_2(D_800E7D34[0])); + break; case 0xD7: - var_v1_2 = D_800E7D0C; - do { - sp24 = var_v1_2; - func_80099184(segmented_to_virtual_dupe(*var_v1_2)); - var_v1_2 += 4; - } while (var_v1_2 != D_800E7D34); - return; + for (var_v0 = 0; var_v0 < 10; var_v0++) { + func_80099184(segmented_to_virtual_dupe(D_800E7D0C[var_v0])); + } + break; case 0xD8: case 0xD9: func_80099184(D_0200184C); - return; + break; case 0x1: func_800996BC(D_800E7D4C[func_800B555C()], 0); - return; + break; case 0x2: func_8006EE44(); gD_8018E118TotalSize += 0x10000; func_80099184(D_020045E8); - return; + break; case 0x3: func_80099184(D_02004610); - return; + break; case 0x23: case 0x24: case 0x25: func_800996BC(D_800E7D4C[func_800B555C()], 0); func_800996BC(D_02004B74, 0); - func_8009B0A4(0, 0x19); - temp_v0_2 = &D_800E74E8[type]; - func_8009B538(0, 0x12C00, temp_v0_2->unk-118, temp_v0_2->unk-116, (s32) temp_v0_2->unk-114); - return; + func_8009B0A4(0, 0x00000019); + func_8009B538(0, 0x00012C00, D_800E74E8[type - 0x23].red, D_800E74E8[type - 0x23].green, D_800E74E8[type - 0x23].blue); + break; case 0xF: var_ra->unk1C = 0x00000020; /* fallthrough */ - case 0xA: + case 0x0A: case 0x10: case 0x11: case 0x12: @@ -7469,31 +7024,28 @@ loop_3: case 0x17: case 0x18: case 0x19: - func_800996BC(segmented_to_virtual_dupe(D_800E822C[type]), 0); - return; + func_800996BC(segmented_to_virtual_dupe(D_800E8274[type - 0x12]), 0); + break; case 0xB: case 0xC: case 0xD: case 0xE: - temp_v0_3 = (type * 8) + D_800E8234; - sp24 = temp_v0_3; - func_800996BC(segmented_to_virtual_dupe(temp_v0_3->unk-58), 0); - func_80099184(segmented_to_virtual_dupe(sp24->unk-54)); - return; + func_800996BC(segmented_to_virtual_dupe(D_800E8234[type - 0xB][0]), 0); + func_80099184(segmented_to_virtual_dupe(D_800E8234[type - 0xB][1])); + break; case 0x2A: func_800996BC(D_02004B4C, 0); - return; + break; case 0x33: - sp7C = var_ra; func_800996BC(D_02004B74, 0); var_ra->unk1C = 0x00000020; - return; + break; case 0x34: case 0x35: case 0x36: case 0x37: - func_80099184(segmented_to_virtual_dupe(D_800E81E4[type])); - return; + func_80099184(segmented_to_virtual_dupe(D_800E82B4[type - 0x34])); + break; case 0x2B: case 0x2C: case 0x2D: @@ -7502,16 +7054,13 @@ loop_3: case 0x30: case 0x31: case 0x32: - sp7C = var_ra; - sp24 = type * 4; - var_ra->D_8018DEE0_index = func_8009A374(segmented_to_virtual_dupe_2(D_800E8274[type])); - func_800996BC(segmented_to_virtual_dupe(*(D_800E7CA8 + sp24)), 0); - return; + var_ra->D_8018DEE0_index = func_8009A374(segmented_to_virtual_dupe_2(D_800E8320[type - 0x2B])); + func_800996BC(segmented_to_virtual_dupe(D_800E7D54[type - 0x2B]), 0); + break; case 0xA0: case 0xA1: - sp7C = var_ra; - var_ra->D_8018DEE0_index = func_8009A374(segmented_to_virtual_dupe_2(D_800E80A0[type])); - return; + var_ra->D_8018DEE0_index = func_8009A374(segmented_to_virtual_dupe_2(D_800E8320[type - 0xA0])); + break; case 0x5D: var_ra->unk1C = 0x00000020; /* fallthrough */ @@ -7525,67 +7074,63 @@ loop_3: case 0x5A: case 0x5B: case 0x5C: - func_800996BC(segmented_to_virtual_dupe(D_800E817C[type]), 0); - return; + func_800996BC(segmented_to_virtual_dupe(D_800E82C8[type - 0x53]), 0); + break; case 0x5F: case 0x60: case 0x61: case 0x62: - sp7C = var_ra; - var_ra->D_8018DEE0_index = func_8009A374(segmented_to_virtual_dupe_2(D_800E7E34[*(gCupCourseOrder - 0xBE + (var_ra->type * 2))])); - return; + var_ra->D_8018DEE0_index = func_8009A374(segmented_to_virtual_dupe_2(D_800E7E34[gCupCourseOrder[0][var_ra->type - 0x5F]])); + break; case 0x5E: - sp7C = var_ra; var_ra->unk20 = random_int(4U) + 2; - return; + break; case 0x65: case 0x66: - temp_v0_4 = &D_800E7248[type]; - var_ra->column = (s32) temp_v0_4->unk-328; - var_ra->row = (s32) temp_v0_4->unk-326; - return; + var_ra->column = D_800E7248[type - 0x65].column; + var_ra->row = D_800E7248[type - 0x65].row; + break; case 0x67: var_ra->unk1C = (s32) gCupSelection; - sp7C = var_ra; - temp_v0_5 = func_800B54C0((s32) gCupSelection, gCCSelection); - var_ra->unk20 = temp_v0_5; - var_ra->D_8018DEE0_index = func_8009A374(segmented_to_virtual_dupe_2(*(D_800E7E20 + ((((s32) gCCSelection / 2) * 0x10) + -(temp_v0_5 * 4))))); - var_ra->column = (s32) D_800E7268->column; - var_ra->row = (s32) D_800E7268->row; - return; + var_ra->unk20 = func_800B54C0(gCupSelection, gCCSelection); + var_ra->D_8018DEE0_index = func_8009A374(segmented_to_virtual_dupe_2(D_800E7E20[((gCCSelection/2) * 4) - var_ra->unk20])); + var_ra->column = D_800E7268[0].column; + var_ra->row = D_800E7268[0].row; + break; case 0x68: - sp7C = var_ra; func_800996BC(segmented_to_virtual_dupe(D_800E8294[gCCSelection]), 0); var_ra->column = 0x00000037; var_ra->row = 0x000000C3; - return; + break; case 0x69: func_800996BC(segmented_to_virtual_dupe(D_02004A0C), 0); if (controller_pak_1_status() == 0) { func_800B6708(); - return; + } else { + // ? D_8018EE10[1].ghostDataSaved = D_8018EE10[0].ghostDataSaved = 0; + D_8018EE10[0].ghostDataSaved = 0; + D_8018EE10[1].ghostDataSaved = 0; } - D_8018EE10->ghostDataSaved = 0; - D_8018EE10->unk84 = 0; - return; + break; case 0x78: case 0x79: case 0x7A: case 0x7B: - func_800996BC(segmented_to_virtual_dupe(D_800E8114[type]), 0); - return; + func_800996BC(segmented_to_virtual_dupe(D_800E82F4[type - 0x78]), 0); + break; case 0x8C: func_800996BC(segmented_to_virtual_dupe(D_02004A34), 0); if (controller_pak_1_status() == 0) { func_800B6708(); - return; + } else { + // ? D_8018EE10[1].ghostDataSaved = D_8018EE10[0].ghostDataSaved = 0; + D_8018EE10[0].ghostDataSaved = 0; + D_8018EE10[1].ghostDataSaved = 0; } - D_8018EE10->ghostDataSaved = 0; - D_8018EE10->unk84 = 0; - return; + break; case 0x8D: func_80099184(segmented_to_virtual_dupe(D_02001FA4)); - return; + break; case 0x7C: case 0x7D: case 0x7E: @@ -7602,106 +7147,154 @@ loop_3: case 0x89: case 0x8A: case 0x8B: - sp7C = var_ra; temp_v0_6 = var_ra->type - 0x7C; - func_800996BC(segmented_to_virtual_dupe(D_800E7D74[*(gCupCourseOrder + (((temp_v0_6 / 4) * 8) + ((temp_v0_6 % 4) * 2)))]), -1); - temp_v0_7 = var_ra->type - 0x7C; - func_800996BC(segmented_to_virtual_dupe(D_800E7DC4[*(gCupCourseOrder + (((temp_v0_7 / 4) * 8) + ((temp_v0_7 % 4) * 2)))]), 0); + func_800996BC(segmented_to_virtual_dupe(D_800E7D74[gCupCourseOrder[temp_v0_6 / 4][temp_v0_6 % 4]]), -1); + temp_v0_6 = var_ra->type - 0x7C; + func_800996BC(segmented_to_virtual_dupe(D_800E7DC4[gCupCourseOrder[temp_v0_6 / 4][temp_v0_6 % 4]]), 0); func_800996BC(segmented_to_virtual_dupe(D_02004A0C), 0); - return; + break; case 0xB1: case 0xB2: case 0xB3: case 0xB4: - temp_a1 = D_800EFD64[(gCharacterSelections - 0xB1)[type]]; + temp_a1 = D_800EFD64[gCharacterSelections[type - 0xB1]]; var_v1_3 = 0; - if (gModeSelection != 2) { - if (gModeSelection != 3) { - var_a2 = type * 4; - } else { - var_a2 = type * 4; - if (type != (gPlayerWinningIndex + 0xB1)) { - goto block_63; - } - } - } else { - temp_t9 = type * 4; - var_a2 = temp_t9; - if (*(&D_801640F4 + temp_t9) != 0) { -block_63: + stackPadding0 = type - 0xB1; + switch(gModeSelection) { + case 2: + if (gGPCurrentRaceRankByPlayerId[type - 0xB1] != 0) { var_v1_3 = 1; } + break; + case 3: + if ((type - 0xB1) != gPlayerWinningIndex) { + var_v1_3 = 1; + } + break; + default: + break; } if (var_v1_3 != 0) { - var_v1_4 = temp_a1 * 4; var_a0 = gCharacterDefeatAnimation[temp_a1]; } else { - var_v1_4 = temp_a1 * 4; var_a0 = D_800E8320[temp_a1]; } - sp7C = var_ra; - sp20 = var_v1_4; - sp24 = var_a2; - sp3C = type - 0xB1; - var_ra->D_8018DEE0_index = func_8009A478(segmented_to_virtual_dupe_2(var_a0), sp3C); - func_800996BC(segmented_to_virtual_dupe(*(D_800E7D54 + var_v1_4)), 0); - func_80099184(segmented_to_virtual_dupe(*(D_800E7FF0 + var_a2))); - return; + var_ra->D_8018DEE0_index = func_8009A478(segmented_to_virtual_dupe_2(var_a0), stackPadding0); + func_800996BC(segmented_to_virtual_dupe(D_800E7D54[temp_a1]), 0); + func_80099184(segmented_to_virtual_dupe(D_800E82B4[type - 0xB1])); + break; case 0xBB: - sp7C = var_ra; - var_ra->unk1C = func_800B5020(D_8018CA78, (s32) *gCharacterSelections); + var_ra->unk1C = func_800B5020(D_8018CA78, gCharacterSelections[0]); var_ra->unk20 = func_800B5218(); - if (*D_80162DD4 != 1) { - sp7C = var_ra; + if (D_80162DD4 != 1) { if (func_800051C4() >= 0x3C01) { - *D_80162DD4 = 1; + D_80162DD4 = 1; } } if ((var_ra->unk1C == 0) || (var_ra->unk20 != 0)) { - func_800B559C((gCupSelection * 4) + gCupCourseSelection); - return; + func_800B559C(gCupCourseSelection + (gCupSelection * 4)); } - return; + break; case 0xE6: - sp7C = var_ra; - var_ra->D_8018DEE0_index = func_8009A374(segmented_to_virtual_dupe_2(D_800E7E34[*(gCupCourseOrder + ((((s8) gTimeTrialDataCourseIndex / 4) * 8) + (((s8) gTimeTrialDataCourseIndex % 4) * 2)))])); - var_ra->unk1C = (s32) gTimeTrialDataCourseIndex; + var_ra->D_8018DEE0_index = func_8009A374(segmented_to_virtual_dupe_2(D_800E7E34[gCupCourseOrder[gTimeTrialDataCourseIndex / 4][gTimeTrialDataCourseIndex % 4]])); + var_ra->unk1C = gTimeTrialDataCourseIndex; func_800996BC(segmented_to_virtual_dupe(D_02004A0C), 0); func_8006EF60(); if (controller_pak_1_status() == 0) { func_800B6708(); - return; + } else { + D_8018EE10[0].ghostDataSaved = 0; + D_8018EE10[1].ghostDataSaved = 0; } - D_8018EE10->ghostDataSaved = 0; - D_8018EE10->unk84 = 0; - return; + break; case 0xF0: var_ra->unk4 = (s32) gSoundMode; - return; + break; case 0xF1: func_800996BC(segmented_to_virtual_dupe(D_02004638), 0); - return; + break; case 0xBE: D_8018ED90 = 0; - return; + break; case 0x130: - temp_a1_2 = D_800EFD64[D_802874D8.unk_1E]; - if (D_802874D8.unk_1D >= 3) { - var_v0_2 = 1; + temp_a1 = D_800EFD64[D_802874D8.unk1E]; + if (D_802874D8.unk1D >= 3) { + var_v0 = 1; } else { - var_v0_2 = 0; + var_v0 = 0; } - var_v1_5 = temp_a1_2 * 4; - if (var_v0_2 != 0) { - var_v1_5 = temp_a1_2 * 4; - var_a0_2 = gCharacterDefeatAnimation[temp_a1_2]; + if (var_v0 != 0) { + var_a0 = gCharacterDefeatAnimation[temp_a1]; } else { - var_a0_2 = D_800E8320[temp_a1_2]; + var_a0 = D_800E8320[temp_a1]; } - sp7C = var_ra; - sp20 = var_v1_5; - var_ra->D_8018DEE0_index = func_8009A478(segmented_to_virtual_dupe_2(var_a0_2), 0); - func_800996BC(segmented_to_virtual_dupe(*(D_800E7D54 + var_v1_5)), 0); + var_ra->D_8018DEE0_index = func_8009A478(segmented_to_virtual_dupe_2(var_a0), 0); + func_800996BC(segmented_to_virtual_dupe(D_800E7D54[temp_a1]), 0); + break; + case 0x190: + case 0x191: + case 0x192: + case 0x193: + case 0x194: + case 0x195: + case 0x196: + case 0x197: + case 0x198: + case 0x199: + case 0x19A: + case 0x19B: + case 0x19C: + case 0x19D: + case 0x19E: + case 0x19F: + case 0x1A0: + case 0x1A1: + case 0x1A2: + case 0x1A3: + case 0x1A4: + case 0x1A5: + case 0x1A6: + case 0x1A7: + case 0x1A8: + case 0x1A9: + case 0x1AA: + case 0x1AB: + case 0x1AC: + case 0x1AD: + case 0x1AE: + case 0x1AF: + case 0x1B0: + case 0x1B1: + case 0x1B2: + case 0x1B3: + case 0x1B4: + case 0x1B5: + case 0x1B6: + case 0x1B7: + case 0x1B8: + case 0x1B9: + case 0x1BA: + case 0x1BB: + case 0x1BC: + case 0x1BD: + case 0x1BE: + case 0x1BF: + case 0x1C0: + case 0x1C1: + case 0x1C2: + case 0x1C3: + case 0x1C4: + case 0x1C5: + case 0x1C6: + case 0x1C7: + case 0x1C8: + case 0x1C9: + case 0x1CA: + case 0x1CB: + case 0x1CC: + case 0x1CD: + case 0x1CE: + default: break; } } @@ -7709,99 +7302,56 @@ block_63: GLOBAL_ASM("asm/non_matchings/code_80091750/add_8018D9E0_entry.s") #endif -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-03-2023 -Gfx *draw_flash_select_case_fast(Gfx *, s32, s32, s32, s32); /* extern */ -Gfx *func_80096CD8(Gfx *, ?, ?, ?, s32); /* extern */ -? func_800A0B80(struct_8018D9E0_entry *); /* extern */ -? func_800A1780(struct_8018D9E0_entry *); /* extern */ -? func_800A1FB0(struct_8018D9E0_entry *); /* extern */ -? func_800A638C(struct_8018D9E0_entry *); /* extern */ -s16 gCurrentCourseId; /* unable to generate initializer */ - +#ifdef NON_MATCHING +// Lots of work left to be done. +// There's a pretty huge diff in the `case 0x4` block concerning all the math +// being done. Not sure what's up there yet. +// spAC and spA8 are used in `case 0x8C` without being intitialized. I don't know if that's +// a result of wonky decompilation or if that's real. void func_8009F5E0(struct_8018D9E0_entry *arg0) { s32 spAC; s32 spA8; + s32 stackPadding0; MkTexture *sp9C; - s8 sp80; - s32 sp58; - f32 sp4C; - s32 sp44; - s8 **sp40; - s32 sp3C; - f32 sp38; - Gfx *temp_v0; - Gfx *temp_v0_2; - Gfx *temp_v0_3; - Gfx *temp_v1; - Gfx *temp_v1_2; - Gfx *var_v0_2; - Gfx *var_v0_3; + s32 stackPadding1; + s32 stackPadding2; + s32 stackPadding3; + s32 stackPadding4; + char sp80[3]; f32 var_f0; s32 temp_a0; - s32 temp_a0_2; - s32 temp_a0_3; - s32 temp_a1; - s32 temp_a1_2; - s32 temp_a1_3; - s32 temp_a1_4; - s32 temp_a1_5; - s32 temp_a2; - s32 temp_a2_2; - s32 temp_a2_3; - s32 temp_a2_4; - s32 temp_a2_5; - s32 temp_a2_6; - s32 temp_t1; + s32 stackPadding5; s32 temp_t2; s32 temp_t4; s32 temp_t5; - s32 temp_t8; s32 temp_t9; s32 temp_v0_4; - s32 temp_v0_5; - s32 temp_v0_6; - s32 temp_v0_7; - s32 temp_v0_8; s32 temp_v1_3; - s32 temp_v1_4; - s32 temp_v1_5; - s32 temp_v1_7; - s32 temp_v1_8; s32 var_a1; - s32 var_a2_2; - s32 var_a2_3; s32 var_t0; - s32 var_t0_2; s32 var_v1; - s8 **var_v0; - s8 temp_v1_6; - s8 var_a2; + s32 var_a2; if ((s8) arg0->visible != 0) { - temp_v1 = gDisplayListHead; - gDisplayListHead = temp_v1 + 8; - temp_v1->words.w1 = 0; - temp_v1->words.w0 = 0xE7000000; - var_t0 = arg0->type; - switch (var_t0) { /* switch 6; irregular */ + gDPPipeSync(gDisplayListHead++); + switch (arg0->type) { /* switch 6; irregular */ case 0xFA: /* switch 6 */ func_80094660(gGfxPool, arg0->unk1C); - return; + break; case 0xFB: /* switch 6 */ func_800947B4(gGfxPool, arg0->unk1C); - return; + break; case 0xD2: /* switch 6 */ gDisplayListHead = func_8009B9D0(gDisplayListHead, D_020014C8); - return; + break; case 0xD3: /* switch 6 */ gDisplayListHead = func_8009B9D0(gDisplayListHead, D_02001540); - return; + break; case 0xD4: /* switch 6 */ func_800A09E0(arg0); func_800A0AD0(arg0); func_800A0B80(arg0); - return; + break; case 0xD5: /* switch 6 */ // Sets the text color of the text on the Controller Pak menu // Also sets the color of the shading at the top and bottom of the menu @@ -7814,35 +7364,34 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) { gDisplayListHead = func_8009B9D0(gDisplayListHead, &D_02001630); gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x32, 0x32, 0x00, 0xFF); gDisplayListHead = func_8009B9D0(gDisplayListHead, D_02001658); - return; + break; case 0xD6: /* switch 6 */ - func_8009A76C(arg0->type, arg0->type, arg0->type, -1); - return; + func_8009A76C(arg0->D_8018DEE0_index, arg0->column, arg0->row, -1); + break; case 0xD7: /* switch 6 */ func_800A0DFC(); - return; + break; case 0xD8: /* switch 6 */ case 0xD9: /* switch 6 */ - func_800A0EB8((s32) arg0, var_t0 - 0xD8); - return; + func_800A0EB8(arg0, arg0->type - 0xD8); + break; case 0x1: /* switch 6 */ - gDisplayListHead = func_8009BA74(gDisplayListHead, D_800E7D4C[func_800B555C()], arg0->type, arg0->type); - return; + gDisplayListHead = func_8009BA74(gDisplayListHead, D_800E7D4C[func_800B555C()], arg0->column, arg0->row); + break; case 0x2: /* switch 6 */ - func_8004C8D4((s16) (arg0->type + 0xA0), (s16) (arg0->type + 0x47)); - gDisplayListHead = func_8009BA74(gDisplayListHead, D_020045E8, arg0->type, arg0->type); - return; + func_8004C8D4((arg0->column + 0xA0), (arg0->row + 0x47)); + gDisplayListHead = func_8009BA74(gDisplayListHead, D_020045E8, arg0->column, arg0->row); + break; case 0x3: /* switch 6 */ - if (((s32) ((s32) gGlobalTimer / 8) % 3) != 0) { - gDisplayListHead = func_8009BA74(gDisplayListHead, D_02004610, arg0->type, arg0->type); - return; + if (((gGlobalTimer / 8) % 3) != 0) { + gDisplayListHead = func_8009BA74(gDisplayListHead, D_02004610, arg0->column, arg0->row); } break; case 0x5: /* switch 6 */ - temp_t4 = (s32) ((f32) (get_string_width(*D_800E7574) + 5) * 0.9f) / 2; + temp_t4 = (s32) ((f32) (get_string_width(D_800E7574[0]) + 5) * 0.9f) / 2; gDisplayListHead = draw_box(gDisplayListHead, 0xA0 - temp_t4, 0x0000007B, temp_t4 + 0xA0, 0x000000A4, 0, 0, 0, 0x00000096); set_text_color(1); - draw_text(0x0000009B, 0x0000008C, *D_800E7574, 0, 0.9f, 0.9f); + draw_text(0x0000009B, 0x0000008C, D_800E7574[0], 0, 0.9f, 0.9f); temp_v1_3 = func_800B4EB4(0, 7) & 0xFFFFF; if (temp_v1_3 < 0x1EAA) { set_text_color((s32) gGlobalTimer % 2); @@ -7851,79 +7400,63 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) { } else { set_text_color(3); } - get_time_record_minutes(temp_v1_3, &sp80); - func_800939C8(0x00000077, 0x000000A0, &sp80, 0, 1.0f, 1.0f); + get_time_record_minutes(temp_v1_3, sp80); + func_800939C8(0x00000077, 0x000000A0, sp80, 0, 1.0f, 1.0f); func_80093324(0x0000008B, 0x000000A0, "'", 0, 1.0f, 1.0f); - get_time_record_seconds(temp_v1_3, &sp80); - func_800939C8(0x00000094, 0x000000A0, &sp80, 0, 1.0f, 1.0f); + get_time_record_seconds(temp_v1_3, sp80); + func_800939C8(0x00000094, 0x000000A0, sp80, 0, 1.0f, 1.0f); func_80093324(0x000000A7, 0x000000A0, "\"", 0, 1.0f, 1.0f); - get_time_record_centiseconds(temp_v1_3, &sp80); - func_800939C8(0x000000B4, 0x000000A0, &sp80, 0, 1.0f, 1.0f); - return; + get_time_record_centiseconds(temp_v1_3, sp80); + func_800939C8(0x000000B4, 0x000000A0, sp80, 0, 1.0f, 1.0f); + break; case 0x4: /* switch 6 */ - sp58 = get_string_width(D_800E77A0->unk0); - temp_v0_4 = get_string_width(D_800E77A0->unk4); - var_t0_2 = sp58; - if (var_t0_2 < temp_v0_4) { - var_t0_2 = temp_v0_4; + var_t0 = get_string_width(D_800E77A0[0]); + temp_v0_4 = get_string_width(D_800E77A0[1]); + if (var_t0 < temp_v0_4) { + var_t0 = temp_v0_4; } - temp_t2 = (s32) ((f32) var_t0_2 * 0.75f) / 2; - temp_t5 = (s32) (((f64) (0.75f * 2.0f) + 0.5) * 16.0) / 2; + temp_t2 = (s32) (var_t0 * 0.75f) / 2; + temp_t5 = (s32) (((0.75f * 2.0f) + 0.5) * 16.0) / 2; gDisplayListHead = draw_box(gDisplayListHead, 0xA0 - temp_t2, 0xB6 - temp_t5, temp_t2 + 0xA0, temp_t5 + 0xB6, 0, 0, 0, 0x00000096); set_text_color(4); - var_v0 = D_800E77A0; - var_v1 = 0; - sp38 = (f32) 0xB4; - sp3C = (s32) ((f32) 0xA0 - (1.0f * 0.75f)); - do { - sp40 = var_v0; - sp44 = var_v1; - draw_text(sp3C, (s32) (sp38 + ((f32) var_v1 * 0.75f)), *var_v0, 0, 0.75f, 0.75f); - var_v0 += 4; - var_v1 += 0x12; - } while (var_v0 != D_800E77A8); - return; + for (var_v1 = 0; var_v1 < 2; var_v1++) { + draw_text(0xA0 - (1.0f * 0.75f), (s32) (0xB4 + ((f32) (var_v1 * 0x12) * 0.75f)), D_800E77A0[var_v1], 0, 0.75f, 0.75f); + } + break; case 0x23: /* switch 6 */ case 0x24: /* switch 6 */ case 0x25: /* switch 6 */ gDisplayListHead = func_8009BC9C(gDisplayListHead, D_800E7D4C[func_800B555C()], arg0->column, arg0->row, 3, 0); - return; + break; case 0xA: /* switch 6 */ gDisplayListHead = func_8009BA74(gDisplayListHead, D_02004660, arg0->column, arg0->row); - return; + break; case 0xB: /* switch 6 */ case 0xC: /* switch 6 */ case 0xD: /* switch 6 */ case 0xE: /* switch 6 */ - temp_a0 = var_t0 - 0xB; - spAC = temp_a0; + temp_a0 = arg0->type - 0xB; func_800A8270(temp_a0, arg0); - func_800A0FA4(arg0, spAC); - return; + func_800A0FA4(arg0, temp_a0); + break; case 0xF: /* switch 6 */ func_800A8564(arg0); gDisplayListHead = func_8009BC9C(gDisplayListHead, D_0200487C, arg0->column, arg0->row, 2, arg0->unk1C); - return; + break; case 0x10: /* switch 6 */ case 0x11: /* switch 6 */ - temp_v1_4 = arg0->unk1C; - if (temp_v1_4 < 0x20) { - temp_t9 = (s32) (temp_v1_4 * 0x3A) / 64; - if ((var_t0 - 0xF) == gMainMenuSelectionDepth) { - temp_v0_5 = arg0->column; - temp_v1_5 = arg0->row; - gDisplayListHead = draw_flash_select_case_fast(gDisplayListHead, temp_v0_5 + temp_t9, temp_v1_5, (temp_v0_5 - temp_t9) + 0x39, temp_v1_5 + 0x12); + temp_a0 = arg0->type - 0xF; + if (arg0->unk1C < 0x20) { + temp_t9 = (s32) (arg0->unk1C * 0x3A) / 64; + if (temp_a0 == gMainMenuSelectionDepth) { + gDisplayListHead = draw_flash_select_case_fast(gDisplayListHead, arg0->column + temp_t9, arg0->row, (arg0->column - temp_t9) + 0x39, arg0->row + 0x12); } else { - temp_v0_6 = arg0->column; - temp_a2 = arg0->row; - gDisplayListHead = draw_box_fill(gDisplayListHead, temp_v0_6 + temp_t9, temp_a2, (temp_v0_6 - temp_t9) + 0x39, temp_a2 + 0x12, 1, 1, 1, 0x000000FF); + gDisplayListHead = draw_box_fill(gDisplayListHead, arg0->column + temp_t9, arg0->row, (arg0->column - temp_t9) + 0x39, arg0->row + 0x12, 1, 1, 1, 0x000000FF); } - var_t0 = arg0->type; } - temp_t8 = var_t0 - 0xA; - spA8 = temp_t8; - gDisplayListHead = func_8009BC9C(gDisplayListHead, D_800E8254[temp_t8], arg0->column, arg0->row, 2, arg0->unk1C); - return; + temp_a0 = arg0->type - 0xA; + gDisplayListHead = func_8009BC9C(gDisplayListHead, D_800E8254[temp_a0], arg0->column, arg0->row, 2, arg0->unk1C); + break; case 0x12: /* switch 6 */ case 0x13: /* switch 6 */ case 0x14: /* switch 6 */ @@ -7932,10 +7465,9 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) { case 0x17: /* switch 6 */ case 0x18: /* switch 6 */ case 0x19: /* switch 6 */ - temp_v1_6 = (D_800E86AC - 1)[gPlayerCount]; - var_a2 = (*(D_800E86B0 - 3))[(gPlayerCount * 3) + temp_v1_6]; - var_a1 = *(gGameModeFromNumPlayersAndRowSelection + ((gPlayerCount * 0xC) + (temp_v1_6 * 4))); - switch (var_t0) { /* switch 5 */ + var_a2 = D_800E86B0[gPlayerCount - 1][D_800E86AC[gPlayerCount - 1]]; + var_a1 = gGameModeFromNumPlayersAndRowSelection[gPlayerCount][D_800E86AC[gPlayerCount - 1]]; + switch (arg0->type) { /* switch 5 */ case 18: /* switch 5 */ case 19: /* switch 5 */ case 20: /* switch 5 */ @@ -7943,21 +7475,16 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) { if ((var_a1 != 0) && (var_a1 != 2)) { var_a2 = -1; } - spA8 = 0x00000012; - spAC = (s32) var_a2; - sp9C = segmented_to_virtual_dupe(D_800E824C[var_t0]); -block_58: - var_a1 = spA8; + var_a1 = 18; + sp9C = segmented_to_virtual_dupe(D_800E824C[arg0->type]); break; case 22: /* switch 5 */ case 23: /* switch 5 */ if (var_a1 != 2) { var_a2 = -1; } else { - spA8 = 0x00000016; - spAC = (s32) var_a2; - sp9C = segmented_to_virtual_dupe(D_800E824C[var_t0]); - goto block_58; + var_a1 = 22; + sp9C = segmented_to_virtual_dupe(D_800E824C[arg0->type]); } break; case 24: /* switch 5 */ @@ -7965,64 +7492,54 @@ block_58: if (var_a1 != 1) { var_a2 = -1; } else { - spA8 = 0x00000018; - spAC = (s32) var_a2; - sp9C = segmented_to_virtual_dupe(D_800E824C[var_t0]); - goto block_58; + var_a1 = 24; + sp9C = segmented_to_virtual_dupe(D_800E824C[arg0->type]); } break; } if (var_a2 != -1) { if ((gMainMenuSelectionDepth >= 5) && (var_a2 == (arg0->type - var_a1))) { if (gMainMenuSelectionDepth >= 6) { - temp_a1 = arg0->column; - temp_a2_2 = arg0->row; - var_v0_2 = draw_box_fill(gDisplayListHead, temp_a1, temp_a2_2, temp_a1 + 0x3F, temp_a2_2 + 0x11, 0x000000FF, 0x000000F9, 0x000000DC, 0x000000FF); + gDisplayListHead = draw_box_fill(gDisplayListHead, arg0->column, arg0->row, arg0->column + 0x3F, arg0->row + 0x11, 0x000000FF, 0x000000F9, 0x000000DC, 0x000000FF); } else { - temp_v1_7 = arg0->row; - temp_v0_7 = arg0->column; - var_v0_2 = draw_flash_select_case_slow(gDisplayListHead, temp_v0_7, temp_v1_7, temp_v0_7 + 0x3F, temp_v1_7 + 0x11); + gDisplayListHead = draw_flash_select_case_slow(gDisplayListHead, arg0->column, arg0->row, arg0->column + 0x3F, arg0->row + 0x11); } } else { - temp_a1_2 = arg0->column; - temp_a2_3 = arg0->row; - var_v0_2 = draw_box_fill(gDisplayListHead, temp_a1_2, temp_a2_3, temp_a1_2 + 0x3F, temp_a2_3 + 0x11, 1, 1, 1, 0x000000FF); + gDisplayListHead = draw_box_fill(gDisplayListHead, arg0->column, arg0->row, arg0->column + 0x3F, arg0->row + 0x11, 1, 1, 1, 0x000000FF); } - gDisplayListHead = var_v0_2; gDisplayListHead = func_8009BA74(gDisplayListHead, sp9C, arg0->column, arg0->row); - return; } break; case 0x1B: /* switch 6 */ func_800A10CC(arg0); - return; + break; case 0x2A: /* switch 6 */ gDisplayListHead = func_8009BA74(gDisplayListHead, D_02004B4C, arg0->column, arg0->row); - return; + break; case 0x34: /* switch 6 */ case 0x35: /* switch 6 */ case 0x36: /* switch 6 */ case 0x37: /* switch 6 */ - if (gCharacterGridSelections[var_t0].unk-34 != 0) { - if (D_8018EDE8[var_t0].unk-34 == 0) { - var_a2_2 = 0x000000FF; + temp_a0 = arg0->type - 0x34; + if (gCharacterGridSelections[temp_a0]) { + if (D_8018EDE8[temp_a0] == 0) { + temp_t2 = 0x000000FF; } else { - temp_t1 = (s32) gGlobalTimer % 16; - if (temp_t1 >= 8) { - var_a2_3 = (temp_t1 * -8) + 0x80; + temp_t2 = gGlobalTimer % 16; + if (temp_t2 >= 8) { + temp_t2 = (-temp_t2 * 8) + 0x80; } else { - var_a2_3 = temp_t1 * 8; + temp_t2 *= 8; } - var_a2_2 = var_a2_3 + 0xBF; + temp_t2 += 0xBF; } - func_800A11D0(arg0, var_t0 - 0x34, var_a2_2); - return; + func_800A11D0(arg0, temp_a0, temp_t2); } break; case 0x33: /* switch 6 */ func_800A8564(arg0); gDisplayListHead = func_8009BC9C(gDisplayListHead, D_02004B74, arg0->column, arg0->row, 2, arg0->unk1C); - return; + break; case 0x2B: /* switch 6 */ case 0x2C: /* switch 6 */ case 0x2D: /* switch 6 */ @@ -8031,104 +7548,92 @@ block_58: case 0x30: /* switch 6 */ case 0x31: /* switch 6 */ case 0x32: /* switch 6 */ - func_800A12BC(arg0, segmented_to_virtual_dupe(D_800E7CA8[var_t0])); + func_800A12BC(arg0, segmented_to_virtual_dupe(D_800E7D54[arg0->type - 0x2B])); /* fallthrough */ case 0xA0: /* switch 6 */ case 0xA1: /* switch 6 */ func_8009A76C(arg0->D_8018DEE0_index, arg0->column, arg0->row, arg0->unk1C); - return; + break; case 0x58: /* switch 6 */ case 0x59: /* switch 6 */ case 0x5A: /* switch 6 */ case 0x5B: /* switch 6 */ case 0x5C: /* switch 6 */ func_800A8A98(arg0); - gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E817C[arg0->type]), arg0->column, arg0->row); + gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E82C8[arg0->type - 0x53]), arg0->column, arg0->row); func_800A8CA4(arg0); - return; + break; case 0x52: /* switch 6 */ - gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E817C[var_t0]), arg0->column, arg0->row); - return; + gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E82C8[arg0->type - 0x53]), arg0->column, arg0->row); + break; case 0x5F: /* switch 6 */ case 0x60: /* switch 6 */ case 0x61: /* switch 6 */ case 0x62: /* switch 6 */ func_800A1500(arg0); - return; + break; case 0x53: /* switch 6 */ case 0x54: /* switch 6 */ case 0x55: /* switch 6 */ case 0x56: /* switch 6 */ - temp_a0_2 = var_t0 - 0x53; - spAC = temp_a0_2; - func_800A890C(temp_a0_2, arg0); - func_800A143C(arg0, spAC); - return; + temp_a0 = arg0->type - 0x53; + func_800A890C(temp_a0, arg0); + func_800A143C(arg0, temp_a0); + break; case 0x5D: /* switch 6 */ func_800A8564(arg0); gDisplayListHead = func_8009BC9C(gDisplayListHead, D_02004E80, arg0->column, arg0->row, 2, arg0->unk1C); - return; + break; case 0x65: /* switch 6 */ case 0x66: /* switch 6 */ - if (var_t0 == 0x00000065) { + if (arg0->type == 0x00000065) { var_f0 = 0.6f; } else { var_f0 = 0.8f; } - sp4C = var_f0; func_800A86E8(arg0); set_text_color(3); - func_80093324(arg0->column + 8, arg0->row + 0x10, (D_800E7728 - 0x194)[arg0->type], 0, var_f0, 0.8f); + func_80093324(arg0->column + 8, arg0->row + 0x10, D_800E7728[arg0->type - 0x65], 0, var_f0, 0.8f); func_800A874C(arg0); - return; + break; case 0x6E: /* switch 6 */ func_800A8E14(arg0); - return; + break; case 0x67: /* switch 6 */ func_800A8EC0(arg0); - return; + break; case 0x68: /* switch 6 */ - temp_a1_3 = arg0->column; - temp_a2_4 = arg0->row; - gDisplayListHead = draw_box_fill(gDisplayListHead, temp_a1_3, temp_a2_4, temp_a1_3 + 0x3F, temp_a2_4 + 0x11, 1, 1, 1, 0x000000FF); + gDisplayListHead = draw_box_fill(gDisplayListHead, arg0->column, arg0->row, arg0->column + 0x3F, arg0->row + 0x11, 1, 1, 1, 0x000000FF); gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E8294[gCCSelection]), arg0->column, arg0->row); - return; + break; case 0x69: /* switch 6 */ func_800A8F48(arg0); - return; + break; case 0x78: /* switch 6 */ case 0x79: /* switch 6 */ case 0x7A: /* switch 6 */ case 0x7B: /* switch 6 */ - temp_a0_3 = var_t0 - 0x78; - spAC = temp_a0_3; - func_800A90D4(temp_a0_3, arg0); - func_800A143C(arg0, spAC); - return; + temp_a0 = arg0->type - 0x78; + func_800A90D4(temp_a0, arg0); + func_800A143C(arg0, temp_a0); + break; case 0x8C: /* switch 6 */ - if ((gMainMenuSelectionDepth >= 5) && (spAC == (var_t0 - spA8))) { + if ((gMainMenuSelectionDepth >= 5) && (spAC == (arg0->type - spA8))) { if (gMainMenuSelectionDepth >= 6) { - temp_a1_4 = arg0->column; - temp_a2_5 = arg0->row; - var_v0_3 = draw_box_fill(gDisplayListHead, temp_a1_4, temp_a2_5, temp_a1_4 + 0x3F, temp_a2_5 + 0x11, 0x000000FF, 0x000000F9, 0x000000DC, 0x000000FF); + gDisplayListHead = draw_box_fill(gDisplayListHead, arg0->column, arg0->row, arg0->column + 0x3F, arg0->row + 0x11, 0x000000FF, 0x000000F9, 0x000000DC, 0x000000FF); } else { - temp_v1_8 = arg0->row; - temp_v0_8 = arg0->column; - var_v0_3 = draw_flash_select_case_slow(gDisplayListHead, temp_v0_8, temp_v1_8, temp_v0_8 + 0x3F, temp_v1_8 + 0x11); + gDisplayListHead = draw_flash_select_case_slow(gDisplayListHead, arg0->column, arg0->row, arg0->column + 0x3F, arg0->row + 0x11); } } else { - temp_a1_5 = arg0->column; - temp_a2_6 = arg0->row; - var_v0_3 = draw_box_fill(gDisplayListHead, temp_a1_5, temp_a2_6, temp_a1_5 + 0x3F, temp_a2_6 + 0x11, 1, 1, 1, 0x000000FF); + gDisplayListHead = draw_box_fill(gDisplayListHead, arg0->column, arg0->row, arg0->column + 0x3F, arg0->row + 0x11, 1, 1, 1, 0x000000FF); } - gDisplayListHead = var_v0_3; gDisplayListHead = func_8009BA74(gDisplayListHead, D_02004A34, arg0->column, arg0->row); set_text_color(3); func_800936B8(0x00000125, 0x0000001C, D_800E77B4, 0, 0.55f, 0.55f); - return; + break; case 0x8D: /* switch 6 */ func_800A1780(arg0); - return; + break; case 0x7C: /* switch 6 */ case 0x7D: /* switch 6 */ case 0x7E: /* switch 6 */ @@ -8146,107 +7651,105 @@ block_58: case 0x8A: /* switch 6 */ case 0x8B: /* switch 6 */ func_800A15EC(arg0); - return; + break; case 0x96: /* switch 6 */ set_text_color(4); func_800936B8(arg0->column, arg0->row, gCupNames[D_800DC540], arg0->unk1C, arg0->unk24, 1.0f); - return; + break; case 0x97: /* switch 6 */ set_text_color(5); func_80093324(arg0->column, arg0->row, D_800E7524[gCurrentCourseId], arg0->unk1C, arg0->unk24, 1.0f); - return; + break; case 0x98: /* switch 6 */ func_800A2D1C(arg0); - return; + break; case 0x5E: /* switch 6 */ - gDisplayListHead = func_80096CD8(gDisplayListHead, 0x19, 0x72, 0x7C, 0x0000004A); - return; + gDisplayListHead = func_80096CD8(gDisplayListHead, 0x00000019, 0x00000072, 0x0000007CU, 0x0000004AU); + break; case 0xAA: /* switch 6 */ func_800A2EB8(arg0); - return; + break; case 0xAB: /* switch 6 */ func_800A34A8(arg0); - return; + break; case 0xAC: /* switch 6 */ func_800A6154(arg0); - return; + break; case 0xAF: /* switch 6 */ func_800A6034(arg0); - return; + break; case 0xB0: /* switch 6 */ func_800A638C(arg0); - return; + break; case 0xB1: /* switch 6 */ case 0xB2: /* switch 6 */ case 0xB3: /* switch 6 */ case 0xB4: /* switch 6 */ if (arg0->unk4 != 0) { - spA8 = var_t0 - 0xB1; - gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E7D54[D_800EFD64[gCharacterSelections[var_t0].unk-B1]]), arg0->column, arg0->row); + spA8 = arg0->type - 0xB1; + gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E7D54[D_800EFD64[gCharacterSelections[spA8]]]), arg0->column, arg0->row); func_8009A7EC(arg0->D_8018DEE0_index, arg0->column, arg0->row, spA8, arg0->unk1C); func_800A11D0(arg0, spA8, 0x000000FF); - return; } break; case 0xB9: /* switch 6 */ func_800A3C84(arg0); - return; + break; case 0xBA: /* switch 6 */ func_800A3E60(arg0); - return; + break; case 0xBC: /* switch 6 */ func_800A4A24(arg0); - return; + break; case 0xC7: /* switch 6 */ func_800A4B38(arg0); - return; + break; case 0xBD: /* switch 6 */ func_800A5738(arg0); - return; + break; case 0xE6: /* switch 6 */ func_800A1924(arg0); - return; + break; case 0xE7: /* switch 6 */ func_800A1A20(arg0); - return; + break; case 0xE8: /* switch 6 */ func_800A1BE0(arg0); - return; + break; case 0xE9: /* switch 6 */ func_800A1DE0(arg0); - return; + break; case 0xEA: /* switch 6 */ func_800A1F30(arg0); - return; + break; case 0xF0: /* switch 6 */ func_800A1FB0(arg0); - return; + break; case 0xF1: /* switch 6 */ gDisplayListHead = func_8009BA74(gDisplayListHead, D_02004638, arg0->column, arg0->row); - return; + break; case 0x10E: /* switch 6 */ func_800A70E8(arg0); - return; + break; case 0x12B: /* switch 6 */ func_800A7258(arg0); - return; + break; case 0x12C: /* switch 6 */ func_800A72FC(arg0); - return; + break; case 0x12D: /* switch 6 */ func_800A7448(arg0); - return; + break; case 0x12E: /* switch 6 */ func_800A75A0(arg0); - return; + break; case 0x12F: /* switch 6 */ func_800A761C(arg0); - return; + break; case 0x130: /* switch 6 */ if (arg0->unk4 != 0) { gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E7D54[D_800EFD64[D_802874D8.unk1E]]), arg0->column, arg0->row); func_8009A7EC(arg0->D_8018DEE0_index, arg0->column, arg0->row, 0, arg0->unk1C); - return; } break; case 0x190: /* switch 6 */ @@ -8465,7 +7968,7 @@ void func_800A0DFC(void) { } while (var_s0 != 0); } -void func_800A0EB8(s32 arg0, s32 arg1) { +void func_800A0EB8(struct_8018D9E0_entry *arg0, s32 arg1) { s32 var_t1; s32 thing; Unk_D_800E70A0 *temp_v0; @@ -9529,58 +9032,46 @@ void func_800A3E60(struct_8018D9E0_entry *arg0) { GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A3E60.s") #endif -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -extern s32 D_8018CA78; -extern ? D_8018CA90; - -void func_800A4550(s32 recordType, s32 column, s32 row) { +void func_800A4550(s32 lapNumber, s32 column, s32 row) { + s32 stackPadding0; s32 sp40; - s8 sp34; - s32 sp2C; - s32 temp_v0; - s32 var_a0; - s32 var_v0; + s32 stackPadding1; + s32 textColor; + char sp34[3]; struct_8018D9E0_entry *temp_v0_2; - if (recordType < 3) { - temp_v0 = recordType * 4; - sp2C = temp_v0; - sp40 = *(&D_8018CA90 + temp_v0); + if (lapNumber < 3) { + sp40 = D_8018CA70[0].lapDurations[lapNumber]; set_text_color(2); - var_v0 = temp_v0; } else { - sp40 = D_8018CA78; + sp40 = D_8018CA70[0].someTimer; set_text_color(1); - var_v0 = recordType * 4; } - func_800936B8(column + 0x21, row, *(D_800E7734 + var_v0), 0, 0.7f, 0.7f); + func_800936B8(column + 0x21, row, D_800E7734[lapNumber], 0, 0.7f, 0.7f); temp_v0_2 = find_8018D9E0_entry_dupe(0x000000BB); - if (recordType < 3) { - if (temp_v0_2->unk20 & (1 << recordType)) { - var_a0 = (s32) gGlobalTimer % 3; + if (lapNumber < 3) { + if (temp_v0_2->unk20 & (1 << lapNumber)) { + textColor = (s32) gGlobalTimer % 3; } else { - var_a0 = 3; + textColor = TEXT_YELLOW; } } else { - var_a0 = 3; if (temp_v0_2->unk1C >= 0) { - var_a0 = (s32) gGlobalTimer % 3; + textColor = (s32) gGlobalTimer % 3; + } else { + textColor = TEXT_YELLOW; } } - set_text_color(var_a0); - get_time_record_minutes(sp40, &sp34); - func_800939C8(column + 0x2C, row, &sp34, 0, 0.7f, 0.7f); + set_text_color(textColor); + get_time_record_minutes(sp40, sp34); + func_800939C8(column + 0x2C, row, sp34, 0, 0.7f, 0.7f); func_80093324(column + 0x37, row, "'", 0, 0.7f, 0.7f); - get_time_record_seconds(sp40, &sp34); - func_800939C8(column + 0x40, row, &sp34, 0, 0.7f, 0.7f); + get_time_record_seconds(sp40, sp34); + func_800939C8(column + 0x40, row, sp34, 0, 0.7f, 0.7f); func_80093324(column + 0x4B, row, "\"", 0, 0.7f, 0.7f); - get_time_record_centiseconds(sp40, &sp34); - func_800939C8(column + 0x55, row, &sp34, 0, 0.7f, 0.7f); + get_time_record_centiseconds(sp40, sp34); + func_800939C8(column + 0x55, row, sp34, 0, 0.7f, 0.7f); } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A4550.s") -#endif #ifdef NON_MATCHING // https://decomp.me/scratch/mWCHC diff --git a/src/code_80091750.h b/src/code_80091750.h index 57b0e05c7..1a91eaa57 100644 --- a/src/code_80091750.h +++ b/src/code_80091750.h @@ -35,6 +35,12 @@ typedef struct { /* 0x14 */ s32 unk14; // Flip flops between 0 and 1, use unknown } struct_8018DEE0_entry; // size = 0x18 +typedef struct { + /* 0x0 */ MkTexture *mk64Texture; + /* 0x4 */ s16 unk4; + /* 0x6 */ s16 unk6; +} struct_8018E0E8_entry; //size = 0x8 + typedef struct { /* 0x00 */ u64 *textureData; // This should be interpreted as a segmented address /** @@ -61,6 +67,9 @@ typedef struct { /* Function Prototypes */ f64 exponent_by_squaring(f64, s32); +f64 func_800917B0(f64, f64); +f64 func_8009186C(f64); +f64 func_8009195C(f64); f64 func_80091A6C(f64, s32); f64 func_80091AC0(f64, s32*); void swap_values(s32*, s32*); @@ -120,7 +129,18 @@ void func_80094C60(void); void func_80095574(void); Gfx *draw_flash_select_case(Gfx*, s32, s32, s32, s32, s32); Gfx *draw_flash_select_case_slow(Gfx*, s32, s32, s32, s32); +Gfx *draw_flash_select_case_fast(Gfx*, s32, s32, s32, s32); Gfx *func_800959F8(Gfx*, Vtx*); +void func_80095AE0(Mtx*, f32, f32, f32, f32); +Gfx *func_80095BD0(Gfx*, u8*, f32, f32, u32, u32, f32, f32); +Gfx *func_80095E10(Gfx*, s8, s32, s32, s32, s32, s32, s32, s32, s32, s32, u32, u32); +Gfx *func_800963F0(Gfx*, s8, s32, s32, f32, f32, s32, s32, s32, s32, s32, s32, s32, u32, u32); +Gfx *func_80096CD8(Gfx*, s32, s32, u32, u32); +Gfx *func_80097274(Gfx*, s8, s32, s32, s32, s32, s32, s32, s32, s32, s32, u32, u32, u32); +Gfx *func_80097A14(Gfx*, s8, s32, s32, s32, s32, s32, s32, s32, u32, u32); +Gfx *func_80097AE4(Gfx*, s8, s32, s32, u8*, s32); +Gfx *func_80097E58(Gfx*, s8, s32, u32, u32, s32, s32, s32, s32, s32, s32, u32); +Gfx *func_800987D0(Gfx*, u32, u32, u32, u32, s32, s32, s32, s32, s32); Gfx *draw_box_fill(Gfx*, s32, s32, s32, s32, s32, s32, s32, s32); Gfx *draw_box(Gfx*, s32, s32, s32, s32, s32, s32, s32, s32); Gfx *func_80098FC8(Gfx*, s32, s32, s32, s32); @@ -132,6 +152,7 @@ void *segmented_to_virtual_dupe(const void*); void *segmented_to_virtual_dupe_2(const void*); void func_8009969C(MkTexture*); void func_800996BC(MkTexture*, s32); +void func_80099958(MkTexture*, s32, s32); void func_80099E54(void); void func_80099E60(MkTexture *, s32, s32); void func_80099EC4(void); @@ -139,6 +160,8 @@ void func_80099A70(void); void func_80099A94(MkTexture *, s32); void func_80099AEC(void); void func_8009A344(void); +s32 func_8009A374(MkAnimation*); +s32 func_8009A478(MkAnimation*, s32); void func_8009A594(s32, s32, MkAnimation*); void func_8009A640(s32, s32, s32, MkAnimation*); void func_8009A6D4(void); @@ -146,6 +169,8 @@ void func_8009A76C(s32, s32, s32, s32); void func_8009A7EC(s32, s32, s32, s32, s32); MkTexture *func_8009A878(struct_8018DEE0_entry*); MkTexture *func_8009A944(struct_8018DEE0_entry*, s32); +void func_8009B0A4(s32, s32); +void func_8009B538(s32, s32, s32, s32, s32); s32 func_8009B8C4(u64*); void func_8009B938(void); void func_8009B954(MkTexture*); @@ -164,6 +189,7 @@ void func_8009CBE4(s32, s32, s32); void func_8009CDDC(s32, s32); void func_8009CDFC(s32, s32); void func_8009CE1C(void); +void func_8009CE64(s32); void func_8009D77C(s32,s32,s32); void func_8009D958(s32, s32); void func_8009D978(s32, s32); @@ -193,8 +219,9 @@ void func_800A08D8(u8, s32, s32); s32 func_800A095C(char*, s32, s32, s32); void func_800A09E0(struct_8018D9E0_entry*); void func_800A0AD0(struct_8018D9E0_entry*); +void func_800A0B80(struct_8018D9E0_entry*); void func_800A0DFC(void); -void func_800A0EB8(s32, s32); +void func_800A0EB8(struct_8018D9E0_entry*, s32); void func_800A0FA4(struct_8018D9E0_entry*, s32); void func_800A10CC(struct_8018D9E0_entry*); void func_800A11D0(struct_8018D9E0_entry*, s32, s32); @@ -203,11 +230,13 @@ void func_800A1350(struct_8018D9E0_entry*); void func_800A143C(struct_8018D9E0_entry*, s32); void func_800A1500(struct_8018D9E0_entry*); void func_800A15EC(struct_8018D9E0_entry*); +void func_800A1780(struct_8018D9E0_entry*); void func_800A1924(struct_8018D9E0_entry*); void func_800A1A20(struct_8018D9E0_entry*); void func_800A1BE0(struct_8018D9E0_entry*); void func_800A1DE0(struct_8018D9E0_entry*); void func_800A1F30(struct_8018D9E0_entry*); +void func_800A1FB0(struct_8018D9E0_entry*); void func_800A2D1C(struct_8018D9E0_entry*); void func_800A2EB8(struct_8018D9E0_entry*); void func_800A32B4(s32, s32, s32, s32); @@ -334,10 +363,14 @@ void func_800AF480(struct_8018D9E0_entry*); void func_800AF4DC(struct_8018D9E0_entry*); void func_800AF740(struct_8018D9E0_entry*); +// This really, really shouldn't be in this header file, but I don't know where else to put it +void rmonPrintf(const char *, ...); + /* File specific defines */ #define D_8018D9E0_SIZE 0x20 #define D_8018DEE0_SIZE 0x10 +#define D_8018E0E8_SIZE 0x05 #define D_8018E118_SIZE 0xC8 #define D_8018E768_SIZE 0x08 @@ -354,12 +387,19 @@ extern s8 D_8018D9D8; extern s8 D_8018D9D9; extern struct_8018D9E0_entry D_8018D9E0[D_8018D9E0_SIZE]; // D_8018D9E0 extern struct_8018DEE0_entry D_8018DEE0[D_8018DEE0_SIZE]; // D_8018DEE0 +extern s32 D_8018E060; +extern struct_8018E0E8_entry D_8018E0E8[D_8018E0E8_SIZE]; extern s32 gD_8018E118TotalSize; // D_8018E110 extern struct_8018E118_entry D_8018E118[D_8018E118_SIZE]; // D_8018E118 extern s32 gNumD_8018E118Entries; // D_8018E758 extern Gfx *D_8018E75C; // D_8018E75C extern s32 gNumD_8018E768Entries; // D_8018E760 extern struct_8018E768_entry D_8018E768[D_8018E768_SIZE]; // D_8018E768 +extern s32 gCycleFlashMenu; // maybe? +extern s8 D_8018E7AC[]; +extern s8 D_8018E7B0; // maybe? +extern s32 D_8018E7B8[]; +extern s32 D_8018E7E0; extern s8 gTextColor; // D_8018E860 extern u8 D_8018ED90; extern u8 D_8018ED91; @@ -370,17 +410,11 @@ extern s32 D_8018E854; extern s32 D_8018E858[]; extern s32 D_8018E85C; -extern s32 D_8018E7B8[]; -extern s32 D_8018E7E0; - extern s32 D_8018CA78; extern u8 _textures_0aSegmentRomStart[]; extern u8 _textures_0bSegmentRomStart[]; -extern s32 gCycleFlashMenu; // maybe? -extern s8 D_8018E7B0; // maybe? - extern Unk_D_800E70A0 D_800E70A0[]; extern Unk_D_800E70A0 D_800E70E8[]; extern Unk_D_800E70A0 D_800E7108[][4]; @@ -415,9 +449,9 @@ extern char *D_800E7574[]; extern char *D_800E75C4[]; extern char *gDebugCourseNames[]; // Maps course IDs (as defined in the COURSES enum) to an index in a given cup's track order -extern const u8 gPerCupIndexByCourseId[]; // D_800EFD50 +extern const s8 gPerCupIndexByCourseId[]; // D_800EFD50 extern const s8 D_800EFD64[]; -extern u8 gCupSelectionByCourseId[]; +extern s8 gCupSelectionByCourseId[]; extern char *D_800E7678[]; extern char *gDebugCharacterNames[]; extern char *D_800E76A8[]; @@ -478,7 +512,6 @@ extern const s8 D_800F0B54[]; extern RGBA16 D_800E7AC8[]; extern RGBA16 D_800E7AE8[]; extern MkTexture *D_800E7AF8[]; -extern MkTexture *D_800E7CA8[]; extern MkTexture *D_800E7D0C[]; extern MkAnimation *D_800E7D34[]; extern MkTexture *D_800E7D4C[]; @@ -503,6 +536,7 @@ extern MkTexture *D_800E8274[]; extern MkTexture *D_800E8294[]; extern MkTexture *D_800E82B4[]; extern MkTexture *D_800E82C8[]; +extern MkTexture *D_800E82F4[]; extern MkAnimation *D_800E8320[]; extern MkAnimation *D_800E8340[]; extern MkAnimation *D_800E8360[]; diff --git a/src/ending/code_80281C40.c b/src/ending/code_80281C40.c index a5ff81ba7..b64d4ffa4 100644 --- a/src/ending/code_80281C40.c +++ b/src/ending/code_80281C40.c @@ -22,7 +22,7 @@ struct UnkStruct80287560 { }; // 0xC /** bss **/ -u32 gMenuSelectionFromEndingSequence; +s32 gMenuSelectionFromEndingSequence; s32 D_80287554; s32 D_80281C40_pad[2]; struct UnkStruct80287560 D_80287560[30]; diff --git a/src/ending/code_80281C40.h b/src/ending/code_80281C40.h index bf423ea5c..db0a86438 100644 --- a/src/ending/code_80281C40.h +++ b/src/ending/code_80281C40.h @@ -7,7 +7,7 @@ void func_80281C40(void); void func_80281CB4(s32, s32, s32, s32); void func_80281D00(void); -extern u32 gMenuSelectionFromEndingSequence; +extern s32 gMenuSelectionFromEndingSequence; extern u16 gIsInQuitToMenuTransition; extern Gfx D_00284F70[]; extern Gfx D_00284EE0[]; diff --git a/src/menus.c b/src/menus.c index 66a24ab57..1d6912b16 100644 --- a/src/menus.c +++ b/src/menus.c @@ -18,9 +18,6 @@ #include "save_data.h" #include -/** Externs to be put into headers **/ -extern void rmonPrintf(const char *, ...); // not in a libultra header? - /** BSS **/ s32 D_8018EDC0; f32 D_8018EDC4; diff --git a/src/menus.h b/src/menus.h index a80ea1fff..2345496f6 100644 --- a/src/menus.h +++ b/src/menus.h @@ -18,6 +18,9 @@ union GameModePack { s32 word; }; +// This really, really shouldn't be in this header file, but I don't know where else to put it +void rmonPrintf(const char *, ...); + /* functions */ void update_menus(void); void options_menu_act(struct Controller *, u16); diff --git a/src/save.h b/src/save.h index 927f4b7f2..eaa7f4743 100644 --- a/src/save.h +++ b/src/save.h @@ -49,11 +49,11 @@ u32 func_800B4EB4(s32, s32); s32 func_800B4F2C(void); s32 func_800B4FB0(s32); s32 func_800B5020(u32, s32); +s32 func_800B5218(void); void func_800B536C(s32); void func_800B5404(s32, s32); u8 func_800B54C0(s32, s32); u8 func_800B54EC(s32, s32); -s32 func_800B5020(u32 time, s32 charId); u8 func_800B5508(s32, s32, s32); s32 func_800B5530(s32); s32 func_800B555C(void); diff --git a/src/textures.h b/src/textures.h index 91877487a..f922680f0 100644 --- a/src/textures.h +++ b/src/textures.h @@ -11,8 +11,8 @@ typedef struct { /* 0x00 */ s16 type; /* 0x02 */ s16 unused1; /* 0x04 */ u64 *textureData; // This should be interpreted as a segmented address - /* 0x08 */ s16 width; - /* 0x0A */ s16 height; + /* 0x08 */ u16 width; + /* 0x0A */ u16 height; /* 0x0C */ u16 dX; /* 0x0E */ u16 dY; /* 0x10 */ s16 size; // This size is NOT equal to width*height. Its likely the size of the compressed texture