From 5e577b8999ba1ba988609df490499270b74848ff Mon Sep 17 00:00:00 2001 From: ChiefFruitcake <96551211+ChiefFruitcake@users.noreply.github.com> Date: Tue, 18 Jan 2022 03:22:35 -0500 Subject: [PATCH] code_8008C1D0 part 3 (#143) * More matches in code_8008C1D0 * Matching continued * Create struct for Player struct 0x258 field --- .../code_8008C1D0/func_8008D698.s | 55 - .../code_8008C1D0/func_8008D8B4.s | 55 - .../code_8008C1D0/func_8008DABC.s | 88 -- .../code_8008C1D0/func_8008DC08.s | 246 ---- .../code_8008C1D0/func_8008E6C0.s | 119 -- .../code_8008C1D0/func_8008F1B8.s | 148 -- .../code_8008C1D0/func_8008F8DC.s | 92 -- .../code_8008C1D0/func_8008FB30.s | 62 - .../code_8008C1D0/func_80090778.s | 63 - .../code_8008C1D0/func_80090868.s | 73 - .../code_8008C1D0/func_800911B4.s | 59 - .../code_8008C1D0/func_80091440.s | 26 - .../code_8008C1D0/func_800914A0.s | 18 - include/common_structs.h | 12 +- include/variables.h | 1 + src/code_8008C1D0.c | 1245 +++++++---------- src/code_8008C1D0.h | 28 +- 17 files changed, 511 insertions(+), 1879 deletions(-) delete mode 100644 asm/non_matchings/code_8008C1D0/func_8008D698.s delete mode 100644 asm/non_matchings/code_8008C1D0/func_8008D8B4.s delete mode 100644 asm/non_matchings/code_8008C1D0/func_8008DABC.s delete mode 100644 asm/non_matchings/code_8008C1D0/func_8008DC08.s delete mode 100644 asm/non_matchings/code_8008C1D0/func_8008E6C0.s delete mode 100644 asm/non_matchings/code_8008C1D0/func_8008F1B8.s delete mode 100644 asm/non_matchings/code_8008C1D0/func_8008F8DC.s delete mode 100644 asm/non_matchings/code_8008C1D0/func_8008FB30.s delete mode 100644 asm/non_matchings/code_8008C1D0/func_80090778.s delete mode 100644 asm/non_matchings/code_8008C1D0/func_80090868.s delete mode 100644 asm/non_matchings/code_8008C1D0/func_800911B4.s delete mode 100644 asm/non_matchings/code_8008C1D0/func_80091440.s delete mode 100644 asm/non_matchings/code_8008C1D0/func_800914A0.s diff --git a/asm/non_matchings/code_8008C1D0/func_8008D698.s b/asm/non_matchings/code_8008C1D0/func_8008D698.s deleted file mode 100644 index 5e1ad8d07..000000000 --- a/asm/non_matchings/code_8008C1D0/func_8008D698.s +++ /dev/null @@ -1,55 +0,0 @@ -glabel func_8008D698 -/* 08E298 8008D698 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 08E29C 8008D69C AFBF0014 */ sw $ra, 0x14($sp) -/* 08E2A0 8008D6A0 AFA5001C */ sw $a1, 0x1c($sp) -/* 08E2A4 8008D6A4 849800B2 */ lh $t8, 0xb2($a0) -/* 08E2A8 8008D6A8 00057600 */ sll $t6, $a1, 0x18 -/* 08E2AC 8008D6AC 000E2E03 */ sra $a1, $t6, 0x18 -/* 08E2B0 8008D6B0 17000005 */ bnez $t8, .L8008D6C8 -/* 08E2B4 8008D6B4 00055040 */ sll $t2, $a1, 1 -/* 08E2B8 8008D6B8 849900AE */ lh $t9, 0xae($a0) -/* 08E2BC 8008D6BC 00001825 */ move $v1, $zero -/* 08E2C0 8008D6C0 10000010 */ b .L8008D704 -/* 08E2C4 8008D6C4 A499002E */ sh $t9, 0x2e($a0) -.L8008D6C8: -/* 08E2C8 8008D6C8 8488002E */ lh $t0, 0x2e($a0) -/* 08E2CC 8008D6CC 3C0B8019 */ lui $t3, %hi(D_8018D920) # $t3, 0x8019 -/* 08E2D0 8008D6D0 256BD920 */ addiu $t3, %lo(D_8018D920) # addiu $t3, $t3, -0x26e0 -/* 08E2D4 8008D6D4 2509F8E4 */ addiu $t1, $t0, -0x71c -/* 08E2D8 8008D6D8 A489002E */ sh $t1, 0x2e($a0) -/* 08E2DC 8008D6DC 014B1021 */ addu $v0, $t2, $t3 -/* 08E2E0 8008D6E0 844C0000 */ lh $t4, ($v0) -/* 08E2E4 8008D6E4 2401071C */ li $at, 1820 -/* 08E2E8 8008D6E8 258DF8E4 */ addiu $t5, $t4, -0x71c -/* 08E2EC 8008D6EC 31A3FFFF */ andi $v1, $t5, 0xffff -/* 08E2F0 8008D6F0 0061001A */ div $zero, $v1, $at -/* 08E2F4 8008D6F4 00007012 */ mflo $t6 -/* 08E2F8 8008D6F8 000E7C00 */ sll $t7, $t6, 0x10 -/* 08E2FC 8008D6FC A44D0000 */ sh $t5, ($v0) -/* 08E300 8008D700 000F1C03 */ sra $v1, $t7, 0x10 -.L8008D704: -/* 08E304 8008D704 54600013 */ bnel $v1, $zero, .L8008D754 -/* 08E308 8008D708 8FBF0014 */ lw $ra, 0x14($sp) -/* 08E30C 8008D70C 849900B2 */ lh $t9, 0xb2($a0) -/* 08E310 8008D710 2728FFFF */ addiu $t0, $t9, -1 -/* 08E314 8008D714 A48800B2 */ sh $t0, 0xb2($a0) -/* 08E318 8008D718 848200B2 */ lh $v0, 0xb2($a0) -/* 08E31C 8008D71C 1C400003 */ bgtz $v0, .L8008D72C -/* 08E320 8008D720 00000000 */ nop -/* 08E324 8008D724 A48000B2 */ sh $zero, 0xb2($a0) -/* 08E328 8008D728 848200B2 */ lh $v0, 0xb2($a0) -.L8008D72C: -/* 08E32C 8008D72C 54400009 */ bnel $v0, $zero, .L8008D754 -/* 08E330 8008D730 8FBF0014 */ lw $ra, 0x14($sp) -/* 08E334 8008D734 8C8900BC */ lw $t1, 0xbc($a0) -/* 08E338 8008D738 24010008 */ li $at, 8 -/* 08E33C 8008D73C 312A0008 */ andi $t2, $t1, 8 -/* 08E340 8008D740 51410004 */ beql $t2, $at, .L8008D754 -/* 08E344 8008D744 8FBF0014 */ lw $ra, 0x14($sp) -/* 08E348 8008D748 0C0235D8 */ jal func_8008D760 -/* 08E34C 8008D74C 00000000 */ nop -/* 08E350 8008D750 8FBF0014 */ lw $ra, 0x14($sp) -.L8008D754: -/* 08E354 8008D754 27BD0018 */ addiu $sp, $sp, 0x18 -/* 08E358 8008D758 03E00008 */ jr $ra -/* 08E35C 8008D75C 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008D8B4.s b/asm/non_matchings/code_8008C1D0/func_8008D8B4.s deleted file mode 100644 index bf8b96dd8..000000000 --- a/asm/non_matchings/code_8008C1D0/func_8008D8B4.s +++ /dev/null @@ -1,55 +0,0 @@ -glabel func_8008D8B4 -/* 08E4B4 8008D8B4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 08E4B8 8008D8B8 AFBF0014 */ sw $ra, 0x14($sp) -/* 08E4BC 8008D8BC AFA5001C */ sw $a1, 0x1c($sp) -/* 08E4C0 8008D8C0 849800B2 */ lh $t8, 0xb2($a0) -/* 08E4C4 8008D8C4 00057600 */ sll $t6, $a1, 0x18 -/* 08E4C8 8008D8C8 000E2E03 */ sra $a1, $t6, 0x18 -/* 08E4CC 8008D8CC 17000005 */ bnez $t8, .L8008D8E4 -/* 08E4D0 8008D8D0 00055040 */ sll $t2, $a1, 1 -/* 08E4D4 8008D8D4 849900AE */ lh $t9, 0xae($a0) -/* 08E4D8 8008D8D8 00001825 */ move $v1, $zero -/* 08E4DC 8008D8DC 10000010 */ b .L8008D920 -/* 08E4E0 8008D8E0 A499002E */ sh $t9, 0x2e($a0) -.L8008D8E4: -/* 08E4E4 8008D8E4 8488002E */ lh $t0, 0x2e($a0) -/* 08E4E8 8008D8E8 3C0B8019 */ lui $t3, %hi(D_8018D920) # $t3, 0x8019 -/* 08E4EC 8008D8EC 256BD920 */ addiu $t3, %lo(D_8018D920) # addiu $t3, $t3, -0x26e0 -/* 08E4F0 8008D8F0 2509F8E4 */ addiu $t1, $t0, -0x71c -/* 08E4F4 8008D8F4 A489002E */ sh $t1, 0x2e($a0) -/* 08E4F8 8008D8F8 014B1021 */ addu $v0, $t2, $t3 -/* 08E4FC 8008D8FC 844C0000 */ lh $t4, ($v0) -/* 08E500 8008D900 2401071C */ li $at, 1820 -/* 08E504 8008D904 258DF8E4 */ addiu $t5, $t4, -0x71c -/* 08E508 8008D908 31A3FFFF */ andi $v1, $t5, 0xffff -/* 08E50C 8008D90C 0061001A */ div $zero, $v1, $at -/* 08E510 8008D910 00007012 */ mflo $t6 -/* 08E514 8008D914 000E7C00 */ sll $t7, $t6, 0x10 -/* 08E518 8008D918 A44D0000 */ sh $t5, ($v0) -/* 08E51C 8008D91C 000F1C03 */ sra $v1, $t7, 0x10 -.L8008D920: -/* 08E520 8008D920 54600013 */ bnel $v1, $zero, .L8008D970 -/* 08E524 8008D924 8FBF0014 */ lw $ra, 0x14($sp) -/* 08E528 8008D928 849900B2 */ lh $t9, 0xb2($a0) -/* 08E52C 8008D92C 2728FFFF */ addiu $t0, $t9, -1 -/* 08E530 8008D930 A48800B2 */ sh $t0, 0xb2($a0) -/* 08E534 8008D934 848200B2 */ lh $v0, 0xb2($a0) -/* 08E538 8008D938 1C400003 */ bgtz $v0, .L8008D948 -/* 08E53C 8008D93C 00000000 */ nop -/* 08E540 8008D940 A48000B2 */ sh $zero, 0xb2($a0) -/* 08E544 8008D944 848200B2 */ lh $v0, 0xb2($a0) -.L8008D948: -/* 08E548 8008D948 54400009 */ bnel $v0, $zero, .L8008D970 -/* 08E54C 8008D94C 8FBF0014 */ lw $ra, 0x14($sp) -/* 08E550 8008D950 8C8900BC */ lw $t1, 0xbc($a0) -/* 08E554 8008D954 24010008 */ li $at, 8 -/* 08E558 8008D958 312A0008 */ andi $t2, $t1, 8 -/* 08E55C 8008D95C 51410004 */ beql $t2, $at, .L8008D970 -/* 08E560 8008D960 8FBF0014 */ lw $ra, 0x14($sp) -/* 08E564 8008D964 0C02365F */ jal func_8008D97C -/* 08E568 8008D968 00000000 */ nop -/* 08E56C 8008D96C 8FBF0014 */ lw $ra, 0x14($sp) -.L8008D970: -/* 08E570 8008D970 27BD0018 */ addiu $sp, $sp, 0x18 -/* 08E574 8008D974 03E00008 */ jr $ra -/* 08E578 8008D978 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008DABC.s b/asm/non_matchings/code_8008C1D0/func_8008DABC.s deleted file mode 100644 index a10d4075a..000000000 --- a/asm/non_matchings/code_8008C1D0/func_8008DABC.s +++ /dev/null @@ -1,88 +0,0 @@ -glabel func_8008DABC -/* 08E6BC 8008DABC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 08E6C0 8008DAC0 AFA5001C */ sw $a1, 0x1c($sp) -/* 08E6C4 8008DAC4 00A07025 */ move $t6, $a1 -/* 08E6C8 8008DAC8 000E2E00 */ sll $a1, $t6, 0x18 -/* 08E6CC 8008DACC AFBF0014 */ sw $ra, 0x14($sp) -/* 08E6D0 8008DAD0 00057E03 */ sra $t7, $a1, 0x18 -/* 08E6D4 8008DAD4 01E02825 */ move $a1, $t7 -/* 08E6D8 8008DAD8 A3AE001F */ sb $t6, 0x1f($sp) -/* 08E6DC 8008DADC 0C0230D5 */ jal func_8008C354 -/* 08E6E0 8008DAE0 AFA40018 */ sw $a0, 0x18($sp) -/* 08E6E4 8008DAE4 8FA60018 */ lw $a2, 0x18($sp) -/* 08E6E8 8008DAE8 83A7001F */ lb $a3, 0x1f($sp) -/* 08E6EC 8008DAEC 3C080400 */ lui $t0, 0x400 -/* 08E6F0 8008DAF0 8CD800BC */ lw $t8, 0xbc($a2) -/* 08E6F4 8008DAF4 24030001 */ li $v1, 1 -/* 08E6F8 8008DAF8 3C014090 */ li $at, 0x40900000 # 4.500000 -/* 08E6FC 8008DAFC 0018C940 */ sll $t9, $t8, 5 -/* 08E700 8008DB00 0720003D */ bltz $t9, .L8008DBF8 -/* 08E704 8008DB04 00074880 */ sll $t1, $a3, 2 -/* 08E708 8008DB08 44812000 */ mtc1 $at, $f4 -/* 08E70C 8008DB0C 3C018019 */ lui $at, %hi(D_8018D990) # 0x8019 -/* 08E710 8008DB10 A4C00DB6 */ sh $zero, 0xdb6($a2) -/* 08E714 8008DB14 A4C00238 */ sh $zero, 0x238($a2) -/* 08E718 8008DB18 00290821 */ addu $at, $at, $t1 -/* 08E71C 8008DB1C E4C40DC4 */ swc1 $f4, 0xdc4($a2) -/* 08E720 8008DB20 AC20D990 */ sw $zero, %lo(D_8018D990)($at) # -0x2670($at) -/* 08E724 8008DB24 8CCA00BC */ lw $t2, 0xbc($a2) -/* 08E728 8008DB28 3C01F7FF */ lui $at, (0xF7FFFFEF >> 16) # lui $at, 0xf7ff -/* 08E72C 8008DB2C 3421FFEF */ ori $at, (0xF7FFFFEF & 0xFFFF) # ori $at, $at, 0xffef -/* 08E730 8008DB30 3C0D8016 */ lui $t5, %hi(D_80165190) # $t5, 0x8016 -/* 08E734 8008DB34 25AD5190 */ addiu $t5, %lo(D_80165190) # addiu $t5, $t5, 0x5190 -/* 08E738 8008DB38 00076040 */ sll $t4, $a3, 1 -/* 08E73C 8008DB3C 01415824 */ and $t3, $t2, $at -/* 08E740 8008DB40 ACCB00BC */ sw $t3, 0xbc($a2) -/* 08E744 8008DB44 018D1021 */ addu $v0, $t4, $t5 -/* 08E748 8008DB48 A4430000 */ sh $v1, ($v0) -/* 08E74C 8008DB4C A4430010 */ sh $v1, 0x10($v0) -/* 08E750 8008DB50 A4430020 */ sh $v1, 0x20($v0) -/* 08E754 8008DB54 A4430030 */ sh $v1, 0x30($v0) -/* 08E758 8008DB58 8CCE000C */ lw $t6, 0xc($a2) -/* 08E75C 8008DB5C 3C014282 */ li $at, 0x42820000 # 65.000000 -/* 08E760 8008DB60 44803000 */ mtc1 $zero, $f6 -/* 08E764 8008DB64 44814000 */ mtc1 $at, $f8 -/* 08E768 8008DB68 31CF0100 */ andi $t7, $t6, 0x100 -/* 08E76C 8008DB6C A4C30D98 */ sh $v1, 0xd98($a2) -/* 08E770 8008DB70 E4C60D9C */ swc1 $f6, 0xd9c($a2) -/* 08E774 8008DB74 11E00004 */ beqz $t7, .L8008DB88 -/* 08E778 8008DB78 E4C80DA0 */ swc1 $f8, 0xda0($a2) -/* 08E77C 8008DB7C 94D80046 */ lhu $t8, 0x46($a2) -/* 08E780 8008DB80 37190080 */ ori $t9, $t8, 0x80 -/* 08E784 8008DB84 A4D90046 */ sh $t9, 0x46($a2) -.L8008DB88: -/* 08E788 8008DB88 94C20000 */ lhu $v0, ($a2) -/* 08E78C 8008DB8C 30494000 */ andi $t1, $v0, 0x4000 -/* 08E790 8008DB90 51200012 */ beql $t1, $zero, .L8008DBDC -/* 08E794 8008DB94 8CCD00BC */ lw $t5, 0xbc($a2) -/* 08E798 8008DB98 8CCA00BC */ lw $t2, 0xbc($a2) -/* 08E79C 8008DB9C 3C012900 */ lui $at, (0x29008005 >> 16) # lui $at, 0x2900 -/* 08E7A0 8008DBA0 34218005 */ ori $at, (0x29008005 & 0xFFFF) # ori $at, $at, 0x8005 -/* 08E7A4 8008DBA4 01485824 */ and $t3, $t2, $t0 -/* 08E7A8 8008DBA8 1560000B */ bnez $t3, .L8008DBD8 -/* 08E7AC 8008DBAC 30E400FF */ andi $a0, $a3, 0xff -/* 08E7B0 8008DBB0 94C50254 */ lhu $a1, 0x254($a2) -/* 08E7B4 8008DBB4 A3A7001F */ sb $a3, 0x1f($sp) -/* 08E7B8 8008DBB8 AFA60018 */ sw $a2, 0x18($sp) -/* 08E7BC 8008DBBC 00056100 */ sll $t4, $a1, 4 -/* 08E7C0 8008DBC0 0C03243D */ jal func_800C90F4 -/* 08E7C4 8008DBC4 01812821 */ addu $a1, $t4, $at -/* 08E7C8 8008DBC8 8FA60018 */ lw $a2, 0x18($sp) -/* 08E7CC 8008DBCC 83A7001F */ lb $a3, 0x1f($sp) -/* 08E7D0 8008DBD0 3C080400 */ lui $t0, 0x400 -/* 08E7D4 8008DBD4 94C20000 */ lhu $v0, ($a2) -.L8008DBD8: -/* 08E7D8 8008DBD8 8CCD00BC */ lw $t5, 0xbc($a2) -.L8008DBDC: -/* 08E7DC 8008DBDC 304F1000 */ andi $t7, $v0, 0x1000 -/* 08E7E0 8008DBE0 00E02025 */ move $a0, $a3 -/* 08E7E4 8008DBE4 01A87025 */ or $t6, $t5, $t0 -/* 08E7E8 8008DBE8 11E00003 */ beqz $t7, .L8008DBF8 -/* 08E7EC 8008DBEC ACCE00BC */ sw $t6, 0xbc($a2) -/* 08E7F0 8008DBF0 0C00263F */ jal func_800098FC -/* 08E7F4 8008DBF4 00C02825 */ move $a1, $a2 -.L8008DBF8: -/* 08E7F8 8008DBF8 8FBF0014 */ lw $ra, 0x14($sp) -/* 08E7FC 8008DBFC 27BD0018 */ addiu $sp, $sp, 0x18 -/* 08E800 8008DC00 03E00008 */ jr $ra -/* 08E804 8008DC04 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008DC08.s b/asm/non_matchings/code_8008C1D0/func_8008DC08.s deleted file mode 100644 index ad9f3f64a..000000000 --- a/asm/non_matchings/code_8008C1D0/func_8008DC08.s +++ /dev/null @@ -1,246 +0,0 @@ -glabel func_8008DC08 -/* 08E808 8008DC08 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 08E80C 8008DC0C AFBF0014 */ sw $ra, 0x14($sp) -/* 08E810 8008DC10 AFA5001C */ sw $a1, 0x1c($sp) -/* 08E814 8008DC14 3C014416 */ li $at, 0x44160000 # 600.000000 -/* 08E818 8008DC18 44810000 */ mtc1 $at, $f0 -/* 08E81C 8008DC1C C4840124 */ lwc1 $f4, 0x124($a0) -/* 08E820 8008DC20 44806000 */ mtc1 $zero, $f12 -/* 08E824 8008DC24 00053E00 */ sll $a3, $a1, 0x18 -/* 08E828 8008DC28 4604003E */ c.le.s $f0, $f4 -/* 08E82C 8008DC2C 00077603 */ sra $t6, $a3, 0x18 -/* 08E830 8008DC30 01C03825 */ move $a3, $t6 -/* 08E834 8008DC34 00803025 */ move $a2, $a0 -/* 08E838 8008DC38 A48000C2 */ sh $zero, 0xc2($a0) -/* 08E83C 8008DC3C A48000A8 */ sh $zero, 0xa8($a0) -/* 08E840 8008DC40 AC80007C */ sw $zero, 0x7c($a0) -/* 08E844 8008DC44 A48000C0 */ sh $zero, 0xc0($a0) -/* 08E848 8008DC48 E48C008C */ swc1 $f12, 0x8c($a0) -/* 08E84C 8008DC4C 45010004 */ bc1t .L8008DC60 -/* 08E850 8008DC50 E48C009C */ swc1 $f12, 0x9c($a0) -/* 08E854 8008DC54 8C8F00BC */ lw $t7, 0xbc($a0) -/* 08E858 8008DC58 31F81000 */ andi $t8, $t7, 0x1000 -/* 08E85C 8008DC5C 13000005 */ beqz $t8, .L8008DC74 -.L8008DC60: -/* 08E860 8008DC60 0007C880 */ sll $t9, $a3, 2 -/* 08E864 8008DC64 3C018019 */ lui $at, %hi(D_8018D990) # 0x8019 -/* 08E868 8008DC68 00390821 */ addu $at, $at, $t9 -/* 08E86C 8008DC6C 24050003 */ li $a1, 3 -/* 08E870 8008DC70 AC25D990 */ sw $a1, %lo(D_8018D990)($at) # -0x2670($at) -.L8008DC74: -/* 08E874 8008DC74 3C098019 */ lui $t1, %hi(D_8018D990) # $t1, 0x8019 -/* 08E878 8008DC78 2529D990 */ addiu $t1, %lo(D_8018D990) # addiu $t1, $t1, -0x2670 -/* 08E87C 8008DC7C 00074080 */ sll $t0, $a3, 2 -/* 08E880 8008DC80 01091821 */ addu $v1, $t0, $t1 -/* 08E884 8008DC84 8C620000 */ lw $v0, ($v1) -/* 08E888 8008DC88 24050003 */ li $a1, 3 -/* 08E88C 8008DC8C 24040001 */ li $a0, 1 -/* 08E890 8008DC90 5040000B */ beql $v0, $zero, .L8008DCC0 -/* 08E894 8008DC94 84C20238 */ lh $v0, 0x238($a2) -/* 08E898 8008DC98 10440037 */ beq $v0, $a0, .L8008DD78 -/* 08E89C 8008DC9C 3C014090 */ lui $at, 0x4090 -/* 08E8A0 8008DCA0 24010002 */ li $at, 2 -/* 08E8A4 8008DCA4 50410070 */ beql $v0, $at, .L8008DE68 -/* 08E8A8 8008DCA8 84CC0238 */ lh $t4, 0x238($a2) -/* 08E8AC 8008DCAC 1045008F */ beq $v0, $a1, .L8008DEEC -/* 08E8B0 8008DCB0 3C014040 */ li $at, 0x40400000 # 3.000000 -/* 08E8B4 8008DCB4 100000B5 */ b .L8008DF8C -/* 08E8B8 8008DCB8 8FBF0014 */ lw $ra, 0x14($sp) -/* 08E8BC 8008DCBC 84C20238 */ lh $v0, 0x238($a2) -.L8008DCC0: -/* 08E8C0 8008DCC0 3C014090 */ li $at, 0x40900000 # 4.500000 -/* 08E8C4 8008DCC4 44813000 */ mtc1 $at, $f6 -/* 08E8C8 8008DCC8 2841003D */ slti $at, $v0, 0x3d -/* 08E8CC 8008DCCC 10200003 */ beqz $at, .L8008DCDC -/* 08E8D0 8008DCD0 E4C60DC4 */ swc1 $f6, 0xdc4($a2) -/* 08E8D4 8008DCD4 244A0001 */ addiu $t2, $v0, 1 -/* 08E8D8 8008DCD8 A4CA0238 */ sh $t2, 0x238($a2) -.L8008DCDC: -/* 08E8DC 8008DCDC 94CB0046 */ lhu $t3, 0x46($a2) -/* 08E8E0 8008DCE0 316C0080 */ andi $t4, $t3, 0x80 -/* 08E8E4 8008DCE4 51800012 */ beql $t4, $zero, .L8008DD30 -/* 08E8E8 8008DCE8 84D90238 */ lh $t9, 0x238($a2) -/* 08E8EC 8008DCEC 8CCD000C */ lw $t5, 0xc($a2) -/* 08E8F0 8008DCF0 24040001 */ li $a0, 1 -/* 08E8F4 8008DCF4 31AE0100 */ andi $t6, $t5, 0x100 -/* 08E8F8 8008DCF8 55C000A4 */ bnel $t6, $zero, .L8008DF8C -/* 08E8FC 8008DCFC 8FBF0014 */ lw $ra, 0x14($sp) -/* 08E900 8008DD00 AC640000 */ sw $a0, ($v1) -/* 08E904 8008DD04 94CF0000 */ lhu $t7, ($a2) -/* 08E908 8008DD08 A4C00238 */ sh $zero, 0x238($a2) -/* 08E90C 8008DD0C 30E400FF */ andi $a0, $a3, 0xff -/* 08E910 8008DD10 31F84000 */ andi $t8, $t7, 0x4000 -/* 08E914 8008DD14 1300009C */ beqz $t8, .L8008DF88 -/* 08E918 8008DD18 3C051901 */ lui $a1, (0x1901904B >> 16) # lui $a1, 0x1901 -/* 08E91C 8008DD1C 0C032418 */ jal func_800C9060 -/* 08E920 8008DD20 34A5904B */ ori $a1, (0x1901904B & 0xFFFF) # ori $a1, $a1, 0x904b -/* 08E924 8008DD24 10000099 */ b .L8008DF8C -/* 08E928 8008DD28 8FBF0014 */ lw $ra, 0x14($sp) -/* 08E92C 8008DD2C 84D90238 */ lh $t9, 0x238($a2) -.L8008DD30: -/* 08E930 8008DD30 24040001 */ li $a0, 1 -/* 08E934 8008DD34 27280001 */ addiu $t0, $t9, 1 -/* 08E938 8008DD38 A4C80238 */ sh $t0, 0x238($a2) -/* 08E93C 8008DD3C 84C90238 */ lh $t1, 0x238($a2) -/* 08E940 8008DD40 2921001E */ slti $at, $t1, 0x1e -/* 08E944 8008DD44 54200091 */ bnel $at, $zero, .L8008DF8C -/* 08E948 8008DD48 8FBF0014 */ lw $ra, 0x14($sp) -/* 08E94C 8008DD4C AC640000 */ sw $a0, ($v1) -/* 08E950 8008DD50 94CA0000 */ lhu $t2, ($a2) -/* 08E954 8008DD54 A4C00238 */ sh $zero, 0x238($a2) -/* 08E958 8008DD58 30E400FF */ andi $a0, $a3, 0xff -/* 08E95C 8008DD5C 314B4000 */ andi $t3, $t2, 0x4000 -/* 08E960 8008DD60 11600089 */ beqz $t3, .L8008DF88 -/* 08E964 8008DD64 3C051901 */ lui $a1, (0x1901904B >> 16) # lui $a1, 0x1901 -/* 08E968 8008DD68 0C032418 */ jal func_800C9060 -/* 08E96C 8008DD6C 34A5904B */ ori $a1, (0x1901904B & 0xFFFF) # ori $a1, $a1, 0x904b -/* 08E970 8008DD70 10000086 */ b .L8008DF8C -/* 08E974 8008DD74 8FBF0014 */ lw $ra, 0x14($sp) -.L8008DD78: -/* 08E978 8008DD78 44814000 */ mtc1 $at, $f8 -/* 08E97C 8008DD7C C4CA0018 */ lwc1 $f10, 0x18($a2) -/* 08E980 8008DD80 3C01800F */ lui $at, %hi(D_800EF570) -/* 08E984 8008DD84 E4C80DC4 */ swc1 $f8, 0xdc4($a2) -/* 08E988 8008DD88 D432F570 */ ldc1 $f18, %lo(D_800EF570)($at) -/* 08E98C 8008DD8C 46005421 */ cvt.d.s $f16, $f10 -/* 08E990 8008DD90 84CC0238 */ lh $t4, 0x238($a2) -/* 08E994 8008DD94 46328100 */ add.d $f4, $f16, $f18 -/* 08E998 8008DD98 94CE0046 */ lhu $t6, 0x46($a2) -/* 08E99C 8008DD9C 258D0001 */ addiu $t5, $t4, 1 -/* 08E9A0 8008DDA0 A4CD0238 */ sh $t5, 0x238($a2) -/* 08E9A4 8008DDA4 462021A0 */ cvt.s.d $f6, $f4 -/* 08E9A8 8008DDA8 31CF0080 */ andi $t7, $t6, 0x80 -/* 08E9AC 8008DDAC 11E0000C */ beqz $t7, .L8008DDE0 -/* 08E9B0 8008DDB0 E4C60018 */ swc1 $f6, 0x18($a2) -/* 08E9B4 8008DDB4 84D80238 */ lh $t8, 0x238($a2) -/* 08E9B8 8008DDB8 24190002 */ li $t9, 2 -/* 08E9BC 8008DDBC 2B010032 */ slti $at, $t8, 0x32 -/* 08E9C0 8008DDC0 5420000F */ bnel $at, $zero, .L8008DE00 -/* 08E9C4 8008DDC4 3C0142B4 */ lui $at, 0x42b4 -/* 08E9C8 8008DDC8 AC790000 */ sw $t9, ($v1) -/* 08E9CC 8008DDCC 94C80046 */ lhu $t0, 0x46($a2) -/* 08E9D0 8008DDD0 A4C00238 */ sh $zero, 0x238($a2) -/* 08E9D4 8008DDD4 3109FF7F */ andi $t1, $t0, 0xff7f -/* 08E9D8 8008DDD8 10000008 */ b .L8008DDFC -/* 08E9DC 8008DDDC A4C90046 */ sh $t1, 0x46($a2) -.L8008DDE0: -/* 08E9E0 8008DDE0 84CA0238 */ lh $t2, 0x238($a2) -/* 08E9E4 8008DDE4 240B0002 */ li $t3, 2 -/* 08E9E8 8008DDE8 29410050 */ slti $at, $t2, 0x50 -/* 08E9EC 8008DDEC 54200004 */ bnel $at, $zero, .L8008DE00 -/* 08E9F0 8008DDF0 3C0142B4 */ lui $at, 0x42b4 -/* 08E9F4 8008DDF4 AC6B0000 */ sw $t3, ($v1) -/* 08E9F8 8008DDF8 A4C00238 */ sh $zero, 0x238($a2) -.L8008DDFC: -/* 08E9FC 8008DDFC 3C0142B4 */ li $at, 0x42B40000 # 90.000000 -.L8008DE00: -/* 08EA00 8008DE00 44811000 */ mtc1 $at, $f2 -/* 08EA04 8008DE04 3C0140C0 */ li $at, 0x40C00000 # 6.000000 -/* 08EA08 8008DE08 44815000 */ mtc1 $at, $f10 -/* 08EA0C 8008DE0C C4C80DA0 */ lwc1 $f8, 0xda0($a2) -/* 08EA10 8008DE10 460A4400 */ add.s $f16, $f8, $f10 -/* 08EA14 8008DE14 E4D00DA0 */ swc1 $f16, 0xda0($a2) -/* 08EA18 8008DE18 C4C00DA0 */ lwc1 $f0, 0xda0($a2) -/* 08EA1C 8008DE1C 4600103E */ c.le.s $f2, $f0 -/* 08EA20 8008DE20 00000000 */ nop -/* 08EA24 8008DE24 45020004 */ bc1fl .L8008DE38 -/* 08EA28 8008DE28 C4D20D9C */ lwc1 $f18, 0xd9c($a2) -/* 08EA2C 8008DE2C E4C20DA0 */ swc1 $f2, 0xda0($a2) -/* 08EA30 8008DE30 C4C00DA0 */ lwc1 $f0, 0xda0($a2) -/* 08EA34 8008DE34 C4D20D9C */ lwc1 $f18, 0xd9c($a2) -.L8008DE38: -/* 08EA38 8008DE38 3C01800F */ lui $at, %hi(D_800EF578) # $at, 0x800f -/* 08EA3C 8008DE3C 46009100 */ add.s $f4, $f18, $f0 -/* 08EA40 8008DE40 E4C40D9C */ swc1 $f4, 0xd9c($a2) -/* 08EA44 8008DE44 C428F578 */ lwc1 $f8, %lo(D_800EF578)($at) -/* 08EA48 8008DE48 C4C60D9C */ lwc1 $f6, 0xd9c($a2) -/* 08EA4C 8008DE4C 4606403E */ c.le.s $f8, $f6 -/* 08EA50 8008DE50 00000000 */ nop -/* 08EA54 8008DE54 4502004D */ bc1fl .L8008DF8C -/* 08EA58 8008DE58 8FBF0014 */ lw $ra, 0x14($sp) -/* 08EA5C 8008DE5C 1000004A */ b .L8008DF88 -/* 08EA60 8008DE60 E4CC0DA0 */ swc1 $f12, 0xda0($a2) -/* 08EA64 8008DE64 84CC0238 */ lh $t4, 0x238($a2) -.L8008DE68: -/* 08EA68 8008DE68 258D0001 */ addiu $t5, $t4, 1 -/* 08EA6C 8008DE6C A4CD0238 */ sh $t5, 0x238($a2) -/* 08EA70 8008DE70 84CE0238 */ lh $t6, 0x238($a2) -/* 08EA74 8008DE74 29C10259 */ slti $at, $t6, 0x259 -/* 08EA78 8008DE78 54200004 */ bnel $at, $zero, .L8008DE8C -/* 08EA7C 8008DE7C C4CA0124 */ lwc1 $f10, 0x124($a2) -/* 08EA80 8008DE80 AC650000 */ sw $a1, ($v1) -/* 08EA84 8008DE84 A4C00238 */ sh $zero, 0x238($a2) -/* 08EA88 8008DE88 C4CA0124 */ lwc1 $f10, 0x124($a2) -.L8008DE8C: -/* 08EA8C 8008DE8C 3C014090 */ li $at, 0x40900000 # 4.500000 -/* 08EA90 8008DE90 44818000 */ mtc1 $at, $f16 -/* 08EA94 8008DE94 460A003E */ c.le.s $f0, $f10 -/* 08EA98 8008DE98 3C01800F */ lui $at, %hi(D_800EF580) -/* 08EA9C 8008DE9C 45020003 */ bc1fl .L8008DEAC -/* 08EAA0 8008DEA0 C4D20018 */ lwc1 $f18, 0x18($a2) -/* 08EAA4 8008DEA4 AC650000 */ sw $a1, ($v1) -/* 08EAA8 8008DEA8 C4D20018 */ lwc1 $f18, 0x18($a2) -.L8008DEAC: -/* 08EAAC 8008DEAC E4D00DC4 */ swc1 $f16, 0xdc4($a2) -/* 08EAB0 8008DEB0 D426F580 */ ldc1 $f6, %lo(D_800EF580)($at) -/* 08EAB4 8008DEB4 46009121 */ cvt.d.s $f4, $f18 -/* 08EAB8 8008DEB8 8CCF00BC */ lw $t7, 0xbc($a2) -/* 08EABC 8008DEBC 46262201 */ sub.d $f8, $f4, $f6 -/* 08EAC0 8008DEC0 24010008 */ li $at, 8 -/* 08EAC4 8008DEC4 31F80008 */ andi $t8, $t7, 8 -/* 08EAC8 8008DEC8 462042A0 */ cvt.s.d $f10, $f8 -/* 08EACC 8008DECC 13010003 */ beq $t8, $at, .L8008DEDC -/* 08EAD0 8008DED0 E4CA0018 */ swc1 $f10, 0x18($a2) -/* 08EAD4 8008DED4 AC650000 */ sw $a1, ($v1) -/* 08EAD8 8008DED8 A4C00238 */ sh $zero, 0x238($a2) -.L8008DEDC: -/* 08EADC 8008DEDC 0C023670 */ jal func_8008D9C0 -/* 08EAE0 8008DEE0 00C02025 */ move $a0, $a2 -/* 08EAE4 8008DEE4 10000029 */ b .L8008DF8C -/* 08EAE8 8008DEE8 8FBF0014 */ lw $ra, 0x14($sp) -.L8008DEEC: -/* 08EAEC 8008DEEC 44818000 */ mtc1 $at, $f16 -/* 08EAF0 8008DEF0 8CD900BC */ lw $t9, 0xbc($a2) -/* 08EAF4 8008DEF4 3C01FBFF */ lui $at, (0xFBFFFFFF >> 16) # lui $at, 0xfbff -/* 08EAF8 8008DEF8 3421FFFF */ ori $at, (0xFBFFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 08EAFC 8008DEFC 03214024 */ and $t0, $t9, $at -/* 08EB00 8008DF00 3C010800 */ lui $at, 0x800 -/* 08EB04 8008DF04 01015025 */ or $t2, $t0, $at -/* 08EB08 8008DF08 94CB0254 */ lhu $t3, 0x254($a2) -/* 08EB0C 8008DF0C 3C013F80 */ li $at, 0x3F800000 # 1.000000 -/* 08EB10 8008DF10 44819000 */ mtc1 $at, $f18 -/* 08EB14 8008DF14 ACC800BC */ sw $t0, 0xbc($a2) -/* 08EB18 8008DF18 3C01800E */ lui $at, %hi(gKartBoundingBoxTable) -/* 08EB1C 8008DF1C 000B6080 */ sll $t4, $t3, 2 -/* 08EB20 8008DF20 A4C00DB6 */ sh $zero, 0xdb6($a2) -/* 08EB24 8008DF24 ACCA00BC */ sw $t2, 0xbc($a2) -/* 08EB28 8008DF28 002C0821 */ addu $at, $at, $t4 -/* 08EB2C 8008DF2C E4D00DC4 */ swc1 $f16, 0xdc4($a2) -/* 08EB30 8008DF30 E4D20224 */ swc1 $f18, 0x224($a2) -/* 08EB34 8008DF34 C42426B0 */ lwc1 $f4, %lo(gKartBoundingBoxTable)($at) -/* 08EB38 8008DF38 3C0E8016 */ lui $t6, %hi(D_80165190) # $t6, 0x8016 -/* 08EB3C 8008DF3C 25CE5190 */ addiu $t6, %lo(D_80165190) # addiu $t6, $t6, 0x5190 -/* 08EB40 8008DF40 00076840 */ sll $t5, $a3, 1 -/* 08EB44 8008DF44 01AE1021 */ addu $v0, $t5, $t6 -/* 08EB48 8008DF48 E4C40070 */ swc1 $f4, 0x70($a2) -/* 08EB4C 8008DF4C A4440000 */ sh $a0, ($v0) -/* 08EB50 8008DF50 A4440010 */ sh $a0, 0x10($v0) -/* 08EB54 8008DF54 A4440020 */ sh $a0, 0x20($v0) -/* 08EB58 8008DF58 A4440030 */ sh $a0, 0x30($v0) -/* 08EB5C 8008DF5C 94CF0000 */ lhu $t7, ($a2) -/* 08EB60 8008DF60 30E400FF */ andi $a0, $a3, 0xff -/* 08EB64 8008DF64 31F84000 */ andi $t8, $t7, 0x4000 -/* 08EB68 8008DF68 53000008 */ beql $t8, $zero, .L8008DF8C -/* 08EB6C 8008DF6C 8FBF0014 */ lw $ra, 0x14($sp) -/* 08EB70 8008DF70 94C50254 */ lhu $a1, 0x254($a2) -/* 08EB74 8008DF74 3C012900 */ lui $at, (0x29008008 >> 16) # lui $at, 0x2900 -/* 08EB78 8008DF78 34218008 */ ori $at, (0x29008008 & 0xFFFF) # ori $at, $at, 0x8008 -/* 08EB7C 8008DF7C 0005C900 */ sll $t9, $a1, 4 -/* 08EB80 8008DF80 0C03243D */ jal func_800C90F4 -/* 08EB84 8008DF84 03212821 */ addu $a1, $t9, $at -.L8008DF88: -/* 08EB88 8008DF88 8FBF0014 */ lw $ra, 0x14($sp) -.L8008DF8C: -/* 08EB8C 8008DF8C 27BD0018 */ addiu $sp, $sp, 0x18 -/* 08EB90 8008DF90 03E00008 */ jr $ra -/* 08EB94 8008DF94 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008E6C0.s b/asm/non_matchings/code_8008C1D0/func_8008E6C0.s deleted file mode 100644 index 1d08d539b..000000000 --- a/asm/non_matchings/code_8008C1D0/func_8008E6C0.s +++ /dev/null @@ -1,119 +0,0 @@ -glabel func_8008E6C0 -/* 08F2C0 8008E6C0 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 08F2C4 8008E6C4 AFBF001C */ sw $ra, 0x1c($sp) -/* 08F2C8 8008E6C8 AFB00018 */ sw $s0, 0x18($sp) -/* 08F2CC 8008E6CC AFA5002C */ sw $a1, 0x2c($sp) -/* 08F2D0 8008E6D0 00808025 */ move $s0, $a0 -/* 08F2D4 8008E6D4 0C0230D5 */ jal func_8008C354 -/* 08F2D8 8008E6D8 83A5002F */ lb $a1, 0x2f($sp) -/* 08F2DC 8008E6DC 0C0230C4 */ jal func_8008C310 -/* 08F2E0 8008E6E0 02002025 */ move $a0, $s0 -/* 08F2E4 8008E6E4 8E0E00BC */ lw $t6, 0xbc($s0) -/* 08F2E8 8008E6E8 44800000 */ mtc1 $zero, $f0 -/* 08F2EC 8008E6EC 3C010100 */ lui $at, 0x100 -/* 08F2F0 8008E6F0 96060254 */ lhu $a2, 0x254($s0) -/* 08F2F4 8008E6F4 01C17825 */ or $t7, $t6, $at -/* 08F2F8 8008E6F8 2401FFEF */ li $at, -17 -/* 08F2FC 8008E6FC 01E1C824 */ and $t9, $t7, $at -/* 08F300 8008E700 AE0F00BC */ sw $t7, 0xbc($s0) -/* 08F304 8008E704 3C01800E */ lui $at, %hi(D_800E3730) -/* 08F308 8008E708 00061080 */ sll $v0, $a2, 2 -/* 08F30C 8008E70C A60000A8 */ sh $zero, 0xa8($s0) -/* 08F310 8008E710 AE1900BC */ sw $t9, 0xbc($s0) -/* 08F314 8008E714 00220821 */ addu $at, $at, $v0 -/* 08F318 8008E718 E60000F0 */ swc1 $f0, 0xf0($s0) -/* 08F31C 8008E71C E60000F4 */ swc1 $f0, 0xf4($s0) -/* 08F320 8008E720 E60000EC */ swc1 $f0, 0xec($s0) -/* 08F324 8008E724 C4243730 */ lwc1 $f4, %lo(D_800E3730)($at) -/* 08F328 8008E728 3C01800E */ lui $at, %hi(D_800E3710) -/* 08F32C 8008E72C 00220821 */ addu $at, $at, $v0 -/* 08F330 8008E730 E60400F0 */ swc1 $f4, 0xf0($s0) -/* 08F334 8008E734 C4263710 */ lwc1 $f6, %lo(D_800E3710)($at) -/* 08F338 8008E738 96030000 */ lhu $v1, ($s0) -/* 08F33C 8008E73C 24080004 */ li $t0, 4 -/* 08F340 8008E740 24014000 */ li $at, 16384 -/* 08F344 8008E744 30694000 */ andi $t1, $v1, 0x4000 -/* 08F348 8008E748 A6080236 */ sh $t0, 0x236($s0) -/* 08F34C 8008E74C A6000042 */ sh $zero, 0x42($s0) -/* 08F350 8008E750 A60000E0 */ sh $zero, 0xe0($s0) -/* 08F354 8008E754 1521002E */ bne $t1, $at, .L8008E810 -/* 08F358 8008E758 E60600EC */ swc1 $f6, 0xec($s0) -/* 08F35C 8008E75C 306A0100 */ andi $t2, $v1, 0x100 -/* 08F360 8008E760 24010100 */ li $at, 256 -/* 08F364 8008E764 1141002A */ beq $t2, $at, .L8008E810 -/* 08F368 8008E768 3C0B800E */ lui $t3, %hi(gModeSelection) # $t3, 0x800e -/* 08F36C 8008E76C 8D6BC53C */ lw $t3, %lo(gModeSelection)($t3) -/* 08F370 8008E770 24010002 */ li $at, 2 -/* 08F374 8008E774 306C1000 */ andi $t4, $v1, 0x1000 -/* 08F378 8008E778 5561000A */ bnel $t3, $at, .L8008E7A4 -/* 08F37C 8008E77C 93A4002F */ lbu $a0, 0x2f($sp) -/* 08F380 8008E780 11800007 */ beqz $t4, .L8008E7A0 -/* 08F384 8008E784 3C0D800E */ lui $t5, %hi(D_800DC51C) # $t5, 0x800e -/* 08F388 8008E788 95ADC51C */ lhu $t5, %lo(D_800DC51C)($t5) -/* 08F38C 8008E78C 55A00005 */ bnel $t5, $zero, .L8008E7A4 -/* 08F390 8008E790 93A4002F */ lbu $a0, 0x2f($sp) -/* 08F394 8008E794 0C032893 */ jal func_800CA24C -/* 08F398 8008E798 93A4002F */ lbu $a0, 0x2f($sp) -/* 08F39C 8008E79C 96060254 */ lhu $a2, 0x254($s0) -.L8008E7A0: -/* 08F3A0 8008E7A0 93A4002F */ lbu $a0, 0x2f($sp) -.L8008E7A4: -/* 08F3A4 8008E7A4 3C012900 */ lui $at, (0x29008005 >> 16) # lui $at, 0x2900 -/* 08F3A8 8008E7A8 34218005 */ ori $at, (0x29008005 & 0xFFFF) # ori $at, $at, 0x8005 -/* 08F3AC 8008E7AC 00062900 */ sll $a1, $a2, 4 -/* 08F3B0 8008E7B0 00A12821 */ addu $a1, $a1, $at -/* 08F3B4 8008E7B4 0C03243D */ jal func_800C90F4 -/* 08F3B8 8008E7B8 AFA40020 */ sw $a0, 0x20($sp) -/* 08F3BC 8008E7BC 3C0E800E */ lui $t6, %hi(gModeSelection) # $t6, 0x800e -/* 08F3C0 8008E7C0 8DCEC53C */ lw $t6, %lo(gModeSelection)($t6) -/* 08F3C4 8008E7C4 24010002 */ li $at, 2 -/* 08F3C8 8008E7C8 55C1000C */ bnel $t6, $at, .L8008E7FC -/* 08F3CC 8008E7CC 3C051900 */ lui $a1, 0x1900 -/* 08F3D0 8008E7D0 960F0000 */ lhu $t7, ($s0) -/* 08F3D4 8008E7D4 3C19800E */ lui $t9, %hi(D_800DC51C) # $t9, 0x800e -/* 08F3D8 8008E7D8 31F81000 */ andi $t8, $t7, 0x1000 -/* 08F3DC 8008E7DC 53000007 */ beql $t8, $zero, .L8008E7FC -/* 08F3E0 8008E7E0 3C051900 */ lui $a1, 0x1900 -/* 08F3E4 8008E7E4 9739C51C */ lhu $t9, %lo(D_800DC51C)($t9) -/* 08F3E8 8008E7E8 57200004 */ bnel $t9, $zero, .L8008E7FC -/* 08F3EC 8008E7EC 3C051900 */ lui $a1, 0x1900 -/* 08F3F0 8008E7F0 0C032893 */ jal func_800CA24C -/* 08F3F4 8008E7F4 93A40023 */ lbu $a0, 0x23($sp) -/* 08F3F8 8008E7F8 3C051900 */ lui $a1, (0x19009005 >> 16) # lui $a1, 0x1900 -.L8008E7FC: -/* 08F3FC 8008E7FC 34A59005 */ ori $a1, (0x19009005 & 0xFFFF) # ori $a1, $a1, 0x9005 -/* 08F400 8008E800 0C032418 */ jal func_800C9060 -/* 08F404 8008E804 93A40023 */ lbu $a0, 0x23($sp) -/* 08F408 8008E808 10000005 */ b .L8008E820 -/* 08F40C 8008E80C 8E08000C */ lw $t0, 0xc($s0) -.L8008E810: -/* 08F410 8008E810 83A4002F */ lb $a0, 0x2f($sp) -/* 08F414 8008E814 0C00263F */ jal func_800098FC -/* 08F418 8008E818 02002825 */ move $a1, $s0 -/* 08F41C 8008E81C 8E08000C */ lw $t0, 0xc($s0) -.L8008E820: -/* 08F420 8008E820 960A00B6 */ lhu $t2, 0xb6($s0) -/* 08F424 8008E824 3C01FFB7 */ lui $at, (0xFFB7FFFF >> 16) # lui $at, 0xffb7 -/* 08F428 8008E828 3421FFFF */ ori $at, (0xFFB7FFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 08F42C 8008E82C 01014824 */ and $t1, $t0, $at -/* 08F430 8008E830 354B0040 */ ori $t3, $t2, 0x40 -/* 08F434 8008E834 AE09000C */ sw $t1, 0xc($s0) -/* 08F438 8008E838 A60B00B6 */ sh $t3, 0xb6($s0) -/* 08F43C 8008E83C 83A2002F */ lb $v0, 0x2f($sp) -/* 08F440 8008E840 3C018016 */ lui $at, %hi(D_80165480) # 0x8016 -/* 08F444 8008E844 8FBF001C */ lw $ra, 0x1c($sp) -/* 08F448 8008E848 00026080 */ sll $t4, $v0, 2 -/* 08F44C 8008E84C 002C0821 */ addu $at, $at, $t4 -/* 08F450 8008E850 AC205480 */ sw $zero, %lo(D_80165480)($at) # 0x5480($at) -/* 08F454 8008E854 3C018016 */ lui $at, %hi(D_80165460) # 0x8016 -/* 08F458 8008E858 002C0821 */ addu $at, $at, $t4 -/* 08F45C 8008E85C AC205460 */ sw $zero, %lo(D_80165460)($at) # 0x5460($at) -/* 08F460 8008E860 3C018016 */ lui $at, %hi(D_80165440) # 0x8016 -/* 08F464 8008E864 002C0821 */ addu $at, $at, $t4 -/* 08F468 8008E868 AC205440 */ sw $zero, %lo(D_80165440)($at) # 0x5440($at) -/* 08F46C 8008E86C 3C018016 */ lui $at, %hi(D_80165420) # 0x8016 -/* 08F470 8008E870 002C0821 */ addu $at, $at, $t4 -/* 08F474 8008E874 8FB00018 */ lw $s0, 0x18($sp) -/* 08F478 8008E878 AC205420 */ sw $zero, %lo(D_80165420)($at) # 0x5420($at) -/* 08F47C 8008E87C 03E00008 */ jr $ra -/* 08F480 8008E880 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/non_matchings/code_8008C1D0/func_8008F1B8.s b/asm/non_matchings/code_8008C1D0/func_8008F1B8.s deleted file mode 100644 index 97c1159b4..000000000 --- a/asm/non_matchings/code_8008C1D0/func_8008F1B8.s +++ /dev/null @@ -1,148 +0,0 @@ -glabel func_8008F1B8 -/* 08FDB8 8008F1B8 AFA50004 */ sw $a1, 4($sp) -/* 08FDBC 8008F1BC C4840210 */ lwc1 $f4, 0x210($a0) -/* 08FDC0 8008F1C0 3C01800F */ lui $at, %hi(D_800EF5A8) -/* 08FDC4 8008F1C4 D428F5A8 */ ldc1 $f8, %lo(D_800EF5A8)($at) -/* 08FDC8 8008F1C8 460021A1 */ cvt.d.s $f6, $f4 -/* 08FDCC 8008F1CC 848200B2 */ lh $v0, 0xb2($a0) -/* 08FDD0 8008F1D0 46283282 */ mul.d $f10, $f6, $f8 -/* 08FDD4 8008F1D4 00057600 */ sll $t6, $a1, 0x18 -/* 08FDD8 8008F1D8 000E7E03 */ sra $t7, $t6, 0x18 -/* 08FDDC 8008F1DC 01E02825 */ move $a1, $t7 -/* 08FDE0 8008F1E0 304E0001 */ andi $t6, $v0, 1 -/* 08FDE4 8008F1E4 46205420 */ cvt.s.d $f16, $f10 -/* 08FDE8 8008F1E8 04410043 */ bgez $v0, .L8008F2F8 -/* 08FDEC 8008F1EC E490008C */ swc1 $f16, 0x8c($a0) -/* 08FDF0 8008F1F0 84980044 */ lh $t8, 0x44($a0) -/* 08FDF4 8008F1F4 24010080 */ li $at, 128 -/* 08FDF8 8008F1F8 00056840 */ sll $t5, $a1, 1 -/* 08FDFC 8008F1FC 33190080 */ andi $t9, $t8, 0x80 -/* 08FE00 8008F200 17210020 */ bne $t9, $at, .L8008F284 -/* 08FE04 8008F204 3C0E8019 */ lui $t6, %hi(D_8018D920) # 0x8019 -/* 08FE08 8008F208 8488002E */ lh $t0, 0x2e($a0) -/* 08FE0C 8008F20C 3C0B8019 */ lui $t3, %hi(D_8018D920) # $t3, 0x8019 -/* 08FE10 8008F210 256BD920 */ addiu $t3, %lo(D_8018D920) # addiu $t3, $t3, -0x26e0 -/* 08FE14 8008F214 000F5040 */ sll $t2, $t7, 1 -/* 08FE18 8008F218 250900B6 */ addiu $t1, $t0, 0xb6 -/* 08FE1C 8008F21C A489002E */ sh $t1, 0x2e($a0) -/* 08FE20 8008F220 014B1021 */ addu $v0, $t2, $t3 -/* 08FE24 8008F224 844C0000 */ lh $t4, ($v0) -/* 08FE28 8008F228 240100B6 */ li $at, 182 -/* 08FE2C 8008F22C 258D00B6 */ addiu $t5, $t4, 0xb6 -/* 08FE30 8008F230 31A3FFFF */ andi $v1, $t5, 0xffff -/* 08FE34 8008F234 0061001A */ div $zero, $v1, $at -/* 08FE38 8008F238 00007012 */ mflo $t6 -/* 08FE3C 8008F23C 000E7C00 */ sll $t7, $t6, 0x10 -/* 08FE40 8008F240 000FC403 */ sra $t8, $t7, 0x10 -/* 08FE44 8008F244 240100B4 */ li $at, 180 -/* 08FE48 8008F248 17010063 */ bne $t8, $at, .L8008F3D8 -/* 08FE4C 8008F24C A44D0000 */ sh $t5, ($v0) -/* 08FE50 8008F250 8C9900BC */ lw $t9, 0xbc($a0) -/* 08FE54 8008F254 2401BFFF */ li $at, -16385 -/* 08FE58 8008F258 C492009C */ lwc1 $f18, 0x9c($a0) -/* 08FE5C 8008F25C 03214024 */ and $t0, $t9, $at -/* 08FE60 8008F260 3C014040 */ li $at, 0x40400000 # 3.000000 -/* 08FE64 8008F264 44812000 */ mtc1 $at, $f4 -/* 08FE68 8008F268 94890000 */ lhu $t1, ($a0) -/* 08FE6C 8008F26C AC8800BC */ sw $t0, 0xbc($a0) -/* 08FE70 8008F270 46049183 */ div.s $f6, $f18, $f4 -/* 08FE74 8008F274 312AFF7F */ andi $t2, $t1, 0xff7f -/* 08FE78 8008F278 A48A0000 */ sh $t2, ($a0) -/* 08FE7C 8008F27C 03E00008 */ jr $ra -/* 08FE80 8008F280 E486009C */ swc1 $f6, 0x9c($a0) - -.L8008F284: -/* 08FE84 8008F284 848B002E */ lh $t3, 0x2e($a0) -/* 08FE88 8008F288 25CED920 */ addiu $t6, $t6, %lo(D_8018D920) # -0x26e0 -/* 08FE8C 8008F28C 01AE1021 */ addu $v0, $t5, $t6 -/* 08FE90 8008F290 256CFF4A */ addiu $t4, $t3, -0xb6 -/* 08FE94 8008F294 A48C002E */ sh $t4, 0x2e($a0) -/* 08FE98 8008F298 844F0000 */ lh $t7, ($v0) -/* 08FE9C 8008F29C 240100B6 */ li $at, 182 -/* 08FEA0 8008F2A0 25F8FF4A */ addiu $t8, $t7, -0xb6 -/* 08FEA4 8008F2A4 3303FFFF */ andi $v1, $t8, 0xffff -/* 08FEA8 8008F2A8 0061001A */ div $zero, $v1, $at -/* 08FEAC 8008F2AC 0000C812 */ mflo $t9 -/* 08FEB0 8008F2B0 00194400 */ sll $t0, $t9, 0x10 -/* 08FEB4 8008F2B4 00084C03 */ sra $t1, $t0, 0x10 -/* 08FEB8 8008F2B8 240100B4 */ li $at, 180 -/* 08FEBC 8008F2BC 15210046 */ bne $t1, $at, .L8008F3D8 -/* 08FEC0 8008F2C0 A4580000 */ sh $t8, ($v0) -/* 08FEC4 8008F2C4 8C8A00BC */ lw $t2, 0xbc($a0) -/* 08FEC8 8008F2C8 2401BFFF */ li $at, -16385 -/* 08FECC 8008F2CC C488009C */ lwc1 $f8, 0x9c($a0) -/* 08FED0 8008F2D0 01415824 */ and $t3, $t2, $at -/* 08FED4 8008F2D4 3C014040 */ li $at, 0x40400000 # 3.000000 -/* 08FED8 8008F2D8 44815000 */ mtc1 $at, $f10 -/* 08FEDC 8008F2DC 948C0000 */ lhu $t4, ($a0) -/* 08FEE0 8008F2E0 AC8B00BC */ sw $t3, 0xbc($a0) -/* 08FEE4 8008F2E4 460A4403 */ div.s $f16, $f8, $f10 -/* 08FEE8 8008F2E8 318DFF7F */ andi $t5, $t4, 0xff7f -/* 08FEEC 8008F2EC A48D0000 */ sh $t5, ($a0) -/* 08FEF0 8008F2F0 03E00008 */ jr $ra -/* 08FEF4 8008F2F4 E490009C */ swc1 $f16, 0x9c($a0) - -.L8008F2F8: -/* 08FEF8 8008F2F8 11C0001D */ beqz $t6, .L8008F370 -/* 08FEFC 8008F2FC 00056040 */ sll $t4, $a1, 1 -/* 08FF00 8008F300 848F002E */ lh $t7, 0x2e($a0) -/* 08FF04 8008F304 3C088019 */ lui $t0, %hi(D_8018D920) # $t0, 0x8019 -/* 08FF08 8008F308 2508D920 */ addiu $t0, %lo(D_8018D920) # addiu $t0, $t0, -0x26e0 -/* 08FF0C 8008F30C 0005C840 */ sll $t9, $a1, 1 -/* 08FF10 8008F310 25F8FE94 */ addiu $t8, $t7, -0x16c -/* 08FF14 8008F314 A498002E */ sh $t8, 0x2e($a0) -/* 08FF18 8008F318 03281021 */ addu $v0, $t9, $t0 -/* 08FF1C 8008F31C 84490000 */ lh $t1, ($v0) -/* 08FF20 8008F320 2401016C */ li $at, 364 -/* 08FF24 8008F324 252AFE94 */ addiu $t2, $t1, -0x16c -/* 08FF28 8008F328 3143FFFF */ andi $v1, $t2, 0xffff -/* 08FF2C 8008F32C 0061001A */ div $zero, $v1, $at -/* 08FF30 8008F330 00005812 */ mflo $t3 -/* 08FF34 8008F334 000B6400 */ sll $t4, $t3, 0x10 -/* 08FF38 8008F338 000C6C03 */ sra $t5, $t4, 0x10 -/* 08FF3C 8008F33C 29A10047 */ slti $at, $t5, 0x47 -/* 08FF40 8008F340 10200004 */ beqz $at, .L8008F354 -/* 08FF44 8008F344 A44A0000 */ sh $t2, ($v0) -/* 08FF48 8008F348 848E00B2 */ lh $t6, 0xb2($a0) -/* 08FF4C 8008F34C 25CFFFFF */ addiu $t7, $t6, -1 -/* 08FF50 8008F350 A48F00B2 */ sh $t7, 0xb2($a0) -.L8008F354: -/* 08FF54 8008F354 84980044 */ lh $t8, 0x44($a0) -/* 08FF58 8008F358 37190080 */ ori $t9, $t8, 0x80 -/* 08FF5C 8008F35C A4990044 */ sh $t9, 0x44($a0) -/* 08FF60 8008F360 84880044 */ lh $t0, 0x44($a0) -/* 08FF64 8008F364 3109FFBF */ andi $t1, $t0, 0xffbf -/* 08FF68 8008F368 03E00008 */ jr $ra -/* 08FF6C 8008F36C A4890044 */ sh $t1, 0x44($a0) - -.L8008F370: -/* 08FF70 8008F370 848A002E */ lh $t2, 0x2e($a0) -/* 08FF74 8008F374 3C0D8019 */ lui $t5, %hi(D_8018D920) # $t5, 0x8019 -/* 08FF78 8008F378 25ADD920 */ addiu $t5, %lo(D_8018D920) # addiu $t5, $t5, -0x26e0 -/* 08FF7C 8008F37C 254B016C */ addiu $t3, $t2, 0x16c -/* 08FF80 8008F380 A48B002E */ sh $t3, 0x2e($a0) -/* 08FF84 8008F384 018D1021 */ addu $v0, $t4, $t5 -/* 08FF88 8008F388 844E0000 */ lh $t6, ($v0) -/* 08FF8C 8008F38C 2401016C */ li $at, 364 -/* 08FF90 8008F390 25CF016C */ addiu $t7, $t6, 0x16c -/* 08FF94 8008F394 31E3FFFF */ andi $v1, $t7, 0xffff -/* 08FF98 8008F398 0061001A */ div $zero, $v1, $at -/* 08FF9C 8008F39C 0000C012 */ mflo $t8 -/* 08FFA0 8008F3A0 0018CC00 */ sll $t9, $t8, 0x10 -/* 08FFA4 8008F3A4 00194403 */ sra $t0, $t9, 0x10 -/* 08FFA8 8008F3A8 2901006E */ slti $at, $t0, 0x6e -/* 08FFAC 8008F3AC 14200004 */ bnez $at, .L8008F3C0 -/* 08FFB0 8008F3B0 A44F0000 */ sh $t7, ($v0) -/* 08FFB4 8008F3B4 848900B2 */ lh $t1, 0xb2($a0) -/* 08FFB8 8008F3B8 252AFFFF */ addiu $t2, $t1, -1 -/* 08FFBC 8008F3BC A48A00B2 */ sh $t2, 0xb2($a0) -.L8008F3C0: -/* 08FFC0 8008F3C0 848B0044 */ lh $t3, 0x44($a0) -/* 08FFC4 8008F3C4 356C0040 */ ori $t4, $t3, 0x40 -/* 08FFC8 8008F3C8 A48C0044 */ sh $t4, 0x44($a0) -/* 08FFCC 8008F3CC 848D0044 */ lh $t5, 0x44($a0) -/* 08FFD0 8008F3D0 31AEFF7F */ andi $t6, $t5, 0xff7f -/* 08FFD4 8008F3D4 A48E0044 */ sh $t6, 0x44($a0) -.L8008F3D8: -/* 08FFD8 8008F3D8 03E00008 */ jr $ra -/* 08FFDC 8008F3DC 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008F8DC.s b/asm/non_matchings/code_8008C1D0/func_8008F8DC.s deleted file mode 100644 index d56548f61..000000000 --- a/asm/non_matchings/code_8008C1D0/func_8008F8DC.s +++ /dev/null @@ -1,92 +0,0 @@ -glabel func_8008F8DC -/* 0904DC 8008F8DC 3C01800E */ lui $at, %hi(gCourseTimer) # $at, 0x800e -/* 0904E0 8008F8E0 C424C598 */ lwc1 $f4, %lo(gCourseTimer)($at) -/* 0904E4 8008F8E4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 0904E8 8008F8E8 AFA50024 */ sw $a1, 0x24($sp) -/* 0904EC 8008F8EC 4600218D */ trunc.w.s $f6, $f4 -/* 0904F0 8008F8F0 00057600 */ sll $t6, $a1, 0x18 -/* 0904F4 8008F8F4 000E2E03 */ sra $a1, $t6, 0x18 -/* 0904F8 8008F8F8 00051880 */ sll $v1, $a1, 2 -/* 0904FC 8008F8FC 3C088019 */ lui $t0, %hi(D_8018D950) # 0x8019 -/* 090500 8008F900 01034021 */ addu $t0, $t0, $v1 -/* 090504 8008F904 8D08D950 */ lw $t0, %lo(D_8018D950)($t0) # -0x26b0($t0) -/* 090508 8008F908 44193000 */ mfc1 $t9, $f6 -/* 09050C 8008F90C AFBF0014 */ sw $ra, 0x14($sp) -/* 090510 8008F910 00803025 */ move $a2, $a0 -/* 090514 8008F914 03281023 */ subu $v0, $t9, $t0 -/* 090518 8008F918 28410007 */ slti $at, $v0, 7 -/* 09051C 8008F91C 10200012 */ beqz $at, .L8008F968 -/* 090520 8008F920 3C0D8019 */ lui $t5, %hi(D_8018D970) # $t5, 0x8019 -/* 090524 8008F924 848900C6 */ lh $t1, 0xc6($a0) -/* 090528 8008F928 25ADD970 */ addiu $t5, %lo(D_8018D970) # addiu $t5, $t5, -0x2690 -/* 09052C 8008F92C 240C0060 */ li $t4, 96 -/* 090530 8008F930 252AFFFE */ addiu $t2, $t1, -2 -/* 090534 8008F934 A48A00C6 */ sh $t2, 0xc6($a0) -/* 090538 8008F938 848B00C6 */ lh $t3, 0xc6($a0) -/* 09053C 8008F93C 006D1021 */ addu $v0, $v1, $t5 -/* 090540 8008F940 29610061 */ slti $at, $t3, 0x61 -/* 090544 8008F944 50200003 */ beql $at, $zero, .L8008F954 -/* 090548 8008F948 8C4E0000 */ lw $t6, ($v0) -/* 09054C 8008F94C A48C00C6 */ sh $t4, 0xc6($a0) -/* 090550 8008F950 8C4E0000 */ lw $t6, ($v0) -.L8008F954: -/* 090554 8008F954 25CFFFFE */ addiu $t7, $t6, -2 -/* 090558 8008F958 1DE00033 */ bgtz $t7, .L8008FA28 -/* 09055C 8008F95C AC4F0000 */ sw $t7, ($v0) -/* 090560 8008F960 10000031 */ b .L8008FA28 -/* 090564 8008F964 AC400000 */ sw $zero, ($v0) -.L8008F968: -/* 090568 8008F968 84D900C6 */ lh $t9, 0xc6($a2) -/* 09056C 8008F96C 240700FF */ li $a3, 255 -/* 090570 8008F970 27280004 */ addiu $t0, $t9, 4 -/* 090574 8008F974 A4C800C6 */ sh $t0, 0xc6($a2) -/* 090578 8008F978 84C900C6 */ lh $t1, 0xc6($a2) -/* 09057C 8008F97C 292100F0 */ slti $at, $t1, 0xf0 -/* 090580 8008F980 14200014 */ bnez $at, .L8008F9D4 -/* 090584 8008F984 3C018019 */ lui $at, %hi(D_8018D970) # 0x8019 -/* 090588 8008F988 A4C700C6 */ sh $a3, 0xc6($a2) -/* 09058C 8008F98C 00230821 */ addu $at, $at, $v1 -/* 090590 8008F990 AC27D970 */ sw $a3, %lo(D_8018D970)($at) # -0x2690($at) -/* 090594 8008F994 8CCA00BC */ lw $t2, 0xbc($a2) -/* 090598 8008F998 94CC0000 */ lhu $t4, ($a2) -/* 09059C 8008F99C 3C017FFF */ lui $at, (0x7FFFFFFF >> 16) # lui $at, 0x7fff -/* 0905A0 8008F9A0 3421FFFF */ ori $at, (0x7FFFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0905A4 8008F9A4 01415824 */ and $t3, $t2, $at -/* 0905A8 8008F9A8 318D4000 */ andi $t5, $t4, 0x4000 -/* 0905AC 8008F9AC 11A00009 */ beqz $t5, .L8008F9D4 -/* 0905B0 8008F9B0 ACCB00BC */ sw $t3, 0xbc($a2) -/* 0905B4 8008F9B4 30A400FF */ andi $a0, $a1, 0xff -/* 0905B8 8008F9B8 AFA30018 */ sw $v1, 0x18($sp) -/* 0905BC 8008F9BC A3A50027 */ sb $a1, 0x27($sp) -/* 0905C0 8008F9C0 0C032C19 */ jal func_800CB064 -/* 0905C4 8008F9C4 AFA60020 */ sw $a2, 0x20($sp) -/* 0905C8 8008F9C8 8FA30018 */ lw $v1, 0x18($sp) -/* 0905CC 8008F9CC 83A50027 */ lb $a1, 0x27($sp) -/* 0905D0 8008F9D0 8FA60020 */ lw $a2, 0x20($sp) -.L8008F9D4: -/* 0905D4 8008F9D4 3C0E8019 */ lui $t6, %hi(D_8018D970) # $t6, 0x8019 -/* 0905D8 8008F9D8 25CED970 */ addiu $t6, %lo(D_8018D970) # addiu $t6, $t6, -0x2690 -/* 0905DC 8008F9DC 006E1021 */ addu $v0, $v1, $t6 -/* 0905E0 8008F9E0 8C4F0000 */ lw $t7, ($v0) -/* 0905E4 8008F9E4 240700FF */ li $a3, 255 -/* 0905E8 8008F9E8 25F80008 */ addiu $t8, $t7, 8 -/* 0905EC 8008F9EC 2B0100F0 */ slti $at, $t8, 0xf0 -/* 0905F0 8008F9F0 1420000D */ bnez $at, .L8008FA28 -/* 0905F4 8008F9F4 AC580000 */ sw $t8, ($v0) -/* 0905F8 8008F9F8 AC470000 */ sw $a3, ($v0) -/* 0905FC 8008F9FC 8CC800BC */ lw $t0, 0xbc($a2) -/* 090600 8008FA00 94CA0000 */ lhu $t2, ($a2) -/* 090604 8008FA04 3C017FFF */ lui $at, (0x7FFFFFFF >> 16) # lui $at, 0x7fff -/* 090608 8008FA08 3421FFFF */ ori $at, (0x7FFFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 09060C 8008FA0C 01014824 */ and $t1, $t0, $at -/* 090610 8008FA10 314B4000 */ andi $t3, $t2, 0x4000 -/* 090614 8008FA14 A4C700C6 */ sh $a3, 0xc6($a2) -/* 090618 8008FA18 11600003 */ beqz $t3, .L8008FA28 -/* 09061C 8008FA1C ACC900BC */ sw $t1, 0xbc($a2) -/* 090620 8008FA20 0C032C19 */ jal func_800CB064 -/* 090624 8008FA24 30A400FF */ andi $a0, $a1, 0xff -.L8008FA28: -/* 090628 8008FA28 8FBF0014 */ lw $ra, 0x14($sp) -/* 09062C 8008FA2C 27BD0020 */ addiu $sp, $sp, 0x20 -/* 090630 8008FA30 03E00008 */ jr $ra -/* 090634 8008FA34 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008FB30.s b/asm/non_matchings/code_8008C1D0/func_8008FB30.s deleted file mode 100644 index 427703658..000000000 --- a/asm/non_matchings/code_8008C1D0/func_8008FB30.s +++ /dev/null @@ -1,62 +0,0 @@ -glabel func_8008FB30 -/* 090730 8008FB30 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 090734 8008FB34 AFBF0014 */ sw $ra, 0x14($sp) -/* 090738 8008FB38 AFA5001C */ sw $a1, 0x1c($sp) -/* 09073C 8008FB3C 849800C6 */ lh $t8, 0xc6($a0) -/* 090740 8008FB40 00057600 */ sll $t6, $a1, 0x18 -/* 090744 8008FB44 000E7E03 */ sra $t7, $t6, 0x18 -/* 090748 8008FB48 27190008 */ addiu $t9, $t8, 8 -/* 09074C 8008FB4C A49900C6 */ sh $t9, 0xc6($a0) -/* 090750 8008FB50 848800C6 */ lh $t0, 0xc6($a0) -/* 090754 8008FB54 01E02825 */ move $a1, $t7 -/* 090758 8008FB58 00803025 */ move $a2, $a0 -/* 09075C 8008FB5C 290100F0 */ slti $at, $t0, 0xf0 -/* 090760 8008FB60 14200014 */ bnez $at, .L8008FBB4 -/* 090764 8008FB64 240300FF */ li $v1, 255 -/* 090768 8008FB68 000F4880 */ sll $t1, $t7, 2 -/* 09076C 8008FB6C 3C018019 */ lui $at, %hi(D_8018D970) # 0x8019 -/* 090770 8008FB70 A48300C6 */ sh $v1, 0xc6($a0) -/* 090774 8008FB74 00290821 */ addu $at, $at, $t1 -/* 090778 8008FB78 AC23D970 */ sw $v1, %lo(D_8018D970)($at) # -0x2690($at) -/* 09077C 8008FB7C 8C8A00BC */ lw $t2, 0xbc($a0) -/* 090780 8008FB80 948C0000 */ lhu $t4, ($a0) -/* 090784 8008FB84 3C017FFF */ lui $at, (0x7FFFFFFF >> 16) # lui $at, 0x7fff -/* 090788 8008FB88 3421FFFF */ ori $at, (0x7FFFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 09078C 8008FB8C 01415824 */ and $t3, $t2, $at -/* 090790 8008FB90 318D4000 */ andi $t5, $t4, 0x4000 -/* 090794 8008FB94 11A00007 */ beqz $t5, .L8008FBB4 -/* 090798 8008FB98 AC8B00BC */ sw $t3, 0xbc($a0) -/* 09079C 8008FB9C 31E400FF */ andi $a0, $t7, 0xff -/* 0907A0 8008FBA0 A3AF001F */ sb $t7, 0x1f($sp) -/* 0907A4 8008FBA4 0C032C19 */ jal func_800CB064 -/* 0907A8 8008FBA8 AFA60018 */ sw $a2, 0x18($sp) -/* 0907AC 8008FBAC 83A5001F */ lb $a1, 0x1f($sp) -/* 0907B0 8008FBB0 8FA60018 */ lw $a2, 0x18($sp) -.L8008FBB4: -/* 0907B4 8008FBB4 3C0F8019 */ lui $t7, %hi(D_8018D970) # $t7, 0x8019 -/* 0907B8 8008FBB8 25EFD970 */ addiu $t7, %lo(D_8018D970) # addiu $t7, $t7, -0x2690 -/* 0907BC 8008FBBC 00057080 */ sll $t6, $a1, 2 -/* 0907C0 8008FBC0 01CF1021 */ addu $v0, $t6, $t7 -/* 0907C4 8008FBC4 8C580000 */ lw $t8, ($v0) -/* 0907C8 8008FBC8 240300FF */ li $v1, 255 -/* 0907CC 8008FBCC 27190010 */ addiu $t9, $t8, 0x10 -/* 0907D0 8008FBD0 2B2100E0 */ slti $at, $t9, 0xe0 -/* 0907D4 8008FBD4 1420000D */ bnez $at, .L8008FC0C -/* 0907D8 8008FBD8 AC590000 */ sw $t9, ($v0) -/* 0907DC 8008FBDC AC430000 */ sw $v1, ($v0) -/* 0907E0 8008FBE0 8CC900BC */ lw $t1, 0xbc($a2) -/* 0907E4 8008FBE4 94CB0000 */ lhu $t3, ($a2) -/* 0907E8 8008FBE8 3C017FFF */ lui $at, (0x7FFFFFFF >> 16) # lui $at, 0x7fff -/* 0907EC 8008FBEC 3421FFFF */ ori $at, (0x7FFFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0907F0 8008FBF0 01215024 */ and $t2, $t1, $at -/* 0907F4 8008FBF4 316C4000 */ andi $t4, $t3, 0x4000 -/* 0907F8 8008FBF8 A4C300C6 */ sh $v1, 0xc6($a2) -/* 0907FC 8008FBFC 11800003 */ beqz $t4, .L8008FC0C -/* 090800 8008FC00 ACCA00BC */ sw $t2, 0xbc($a2) -/* 090804 8008FC04 0C032C19 */ jal func_800CB064 -/* 090808 8008FC08 30A400FF */ andi $a0, $a1, 0xff -.L8008FC0C: -/* 09080C 8008FC0C 8FBF0014 */ lw $ra, 0x14($sp) -/* 090810 8008FC10 27BD0018 */ addiu $sp, $sp, 0x18 -/* 090814 8008FC14 03E00008 */ jr $ra -/* 090818 8008FC18 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_80090778.s b/asm/non_matchings/code_8008C1D0/func_80090778.s deleted file mode 100644 index 6d35195e5..000000000 --- a/asm/non_matchings/code_8008C1D0/func_80090778.s +++ /dev/null @@ -1,63 +0,0 @@ -glabel func_80090778 -/* 091378 80090778 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 09137C 8009077C AFBF001C */ sw $ra, 0x1c($sp) -/* 091380 80090780 AFB00018 */ sw $s0, 0x18($sp) -/* 091384 80090784 0C009F40 */ jal get_player_index_for_player -/* 091388 80090788 00808025 */ move $s0, $a0 -/* 09138C 8009078C AFA2002C */ sw $v0, 0x2c($sp) -/* 091390 80090790 860E00CA */ lh $t6, 0xca($s0) -/* 091394 80090794 8E1800BC */ lw $t8, 0xbc($s0) -/* 091398 80090798 44802000 */ mtc1 $zero, $f4 -/* 09139C 8009079C 2401FFEF */ li $at, -17 -/* 0913A0 800907A0 00022E00 */ sll $a1, $v0, 0x18 -/* 0913A4 800907A4 00054603 */ sra $t0, $a1, 0x18 -/* 0913A8 800907A8 35CF0008 */ ori $t7, $t6, 8 -/* 0913AC 800907AC 0301C824 */ and $t9, $t8, $at -/* 0913B0 800907B0 A6000078 */ sh $zero, 0x78($s0) -/* 0913B4 800907B4 AE00007C */ sw $zero, 0x7c($s0) -/* 0913B8 800907B8 A60000C0 */ sh $zero, 0xc0($s0) -/* 0913BC 800907BC A60F00CA */ sh $t7, 0xca($s0) -/* 0913C0 800907C0 AE1900BC */ sw $t9, 0xbc($s0) -/* 0913C4 800907C4 A6000222 */ sh $zero, 0x222($s0) -/* 0913C8 800907C8 01002825 */ move $a1, $t0 -/* 0913CC 800907CC 02002025 */ move $a0, $s0 -/* 0913D0 800907D0 0C0230D5 */ jal func_8008C354 -/* 0913D4 800907D4 E604008C */ swc1 $f4, 0x8c($s0) -/* 0913D8 800907D8 83A5002F */ lb $a1, 0x2f($sp) -/* 0913DC 800907DC 02002025 */ move $a0, $s0 -/* 0913E0 800907E0 0C023E1B */ jal func_8008F86C -/* 0913E4 800907E4 AFA50024 */ sw $a1, 0x24($sp) -/* 0913E8 800907E8 8E0200BC */ lw $v0, 0xbc($s0) -/* 0913EC 800907EC 44803000 */ mtc1 $zero, $f6 -/* 0913F0 800907F0 3C034000 */ lui $v1, 0x4000 -/* 0913F4 800907F4 8FA50024 */ lw $a1, 0x24($sp) -/* 0913F8 800907F8 00434824 */ and $t1, $v0, $v1 -/* 0913FC 800907FC A6000DB4 */ sh $zero, 0xdb4($s0) -/* 091400 80090800 A60000C2 */ sh $zero, 0xc2($s0) -/* 091404 80090804 14690010 */ bne $v1, $t1, .L80090848 -/* 091408 80090808 E6060DBC */ swc1 $f6, 0xdbc($s0) -/* 09140C 8009080C 3C030002 */ lui $v1, 2 -/* 091410 80090810 00435024 */ and $t2, $v0, $v1 -/* 091414 80090814 146A0009 */ bne $v1, $t2, .L8009083C -/* 091418 80090818 3C01FFFD */ lui $at, (0xFFFDFFFF >> 16) # lui $at, 0xfffd -/* 09141C 8009081C 860C00AE */ lh $t4, 0xae($s0) -/* 091420 80090820 3421FFFF */ ori $at, (0xFFFDFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 091424 80090824 00415824 */ and $t3, $v0, $at -/* 091428 80090828 AE0B00BC */ sw $t3, 0xbc($s0) -/* 09142C 8009082C A60000A8 */ sh $zero, 0xa8($s0) -/* 091430 80090830 AE00007C */ sw $zero, 0x7c($s0) -/* 091434 80090834 A60000C0 */ sh $zero, 0xc0($s0) -/* 091438 80090838 A60C002E */ sh $t4, 0x2e($s0) -.L8009083C: -/* 09143C 8009083C 0C0238F0 */ jal func_8008E3C0 -/* 091440 80090840 02002025 */ move $a0, $s0 -/* 091444 80090844 8E0200BC */ lw $v0, 0xbc($s0) -.L80090848: -/* 091448 80090848 2401FFDF */ li $at, -33 -/* 09144C 8009084C 00416824 */ and $t5, $v0, $at -/* 091450 80090850 AE0D00BC */ sw $t5, 0xbc($s0) -/* 091454 80090854 8FBF001C */ lw $ra, 0x1c($sp) -/* 091458 80090858 8FB00018 */ lw $s0, 0x18($sp) -/* 09145C 8009085C 27BD0030 */ addiu $sp, $sp, 0x30 -/* 091460 80090860 03E00008 */ jr $ra -/* 091464 80090864 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_80090868.s b/asm/non_matchings/code_8008C1D0/func_80090868.s deleted file mode 100644 index 35444461b..000000000 --- a/asm/non_matchings/code_8008C1D0/func_80090868.s +++ /dev/null @@ -1,73 +0,0 @@ -glabel func_80090868 -/* 091468 80090868 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 09146C 8009086C AFBF0014 */ sw $ra, 0x14($sp) -/* 091470 80090870 44802000 */ mtc1 $zero, $f4 -/* 091474 80090874 A4800078 */ sh $zero, 0x78($a0) -/* 091478 80090878 AC80007C */ sw $zero, 0x7c($a0) -/* 09147C 8009087C A48000C0 */ sh $zero, 0xc0($a0) -/* 091480 80090880 E484008C */ swc1 $f4, 0x8c($a0) -/* 091484 80090884 0C009F40 */ jal get_player_index_for_player -/* 091488 80090888 AFA40018 */ sw $a0, 0x18($sp) -/* 09148C 8009088C 8FA40018 */ lw $a0, 0x18($sp) -/* 091490 80090890 00022E00 */ sll $a1, $v0, 0x18 -/* 091494 80090894 24010002 */ li $at, 2 -/* 091498 80090898 848E00CA */ lh $t6, 0xca($a0) -/* 09149C 8009089C 0005CE03 */ sra $t9, $a1, 0x18 -/* 0914A0 800908A0 24180001 */ li $t8, 1 -/* 0914A4 800908A4 31CF0002 */ andi $t7, $t6, 2 -/* 0914A8 800908A8 11E1002D */ beq $t7, $at, .L80090960 -/* 0914AC 800908AC 03202825 */ move $a1, $t9 -/* 0914B0 800908B0 3C013F00 */ li $at, 0x3F000000 # 0.500000 -/* 0914B4 800908B4 44803000 */ mtc1 $zero, $f6 -/* 0914B8 800908B8 44814000 */ mtc1 $at, $f8 -/* 0914BC 800908BC A4980D98 */ sh $t8, 0xd98($a0) -/* 0914C0 800908C0 E4860D9C */ swc1 $f6, 0xd9c($a0) -/* 0914C4 800908C4 E4880DA0 */ swc1 $f8, 0xda0($a0) -/* 0914C8 800908C8 0C023FC2 */ jal func_8008FF08 -/* 0914CC 800908CC AFA40018 */ sw $a0, 0x18($sp) -/* 0914D0 800908D0 8FA40018 */ lw $a0, 0x18($sp) -/* 0914D4 800908D4 24010001 */ li $at, 1 -/* 0914D8 800908D8 3C03800E */ lui $v1, %hi(gCurrentCourseId) # $v1, 0x800e -/* 0914DC 800908DC 848800CA */ lh $t0, 0xca($a0) -/* 0914E0 800908E0 948A00DE */ lhu $t2, 0xde($a0) -/* 0914E4 800908E4 A4800222 */ sh $zero, 0x222($a0) -/* 0914E8 800908E8 35090002 */ ori $t1, $t0, 2 -/* 0914EC 800908EC 314B0001 */ andi $t3, $t2, 1 -/* 0914F0 800908F0 A48900CA */ sh $t1, 0xca($a0) -/* 0914F4 800908F4 1561001A */ bne $t3, $at, .L80090960 -/* 0914F8 800908F8 A48000C8 */ sh $zero, 0xc8($a0) -/* 0914FC 800908FC 2463C5A0 */ addiu $v1, %lo(gCurrentCourseId) # addiu $v1, $v1, -0x3a60 -/* 091500 80090900 84620000 */ lh $v0, ($v1) -/* 091504 80090904 24010002 */ li $at, 2 -/* 091508 80090908 10410003 */ beq $v0, $at, .L80090918 -/* 09150C 8009090C 24010013 */ li $at, 19 -/* 091510 80090910 54410006 */ bnel $v0, $at, .L8009092C -/* 091514 80090914 848E00CA */ lh $t6, 0xca($a0) -.L80090918: -/* 091518 80090918 848C00CA */ lh $t4, 0xca($a0) -/* 09151C 8009091C 358D1000 */ ori $t5, $t4, 0x1000 -/* 091520 80090920 10000004 */ b .L80090934 -/* 091524 80090924 A48D00CA */ sh $t5, 0xca($a0) -/* 091528 80090928 848E00CA */ lh $t6, 0xca($a0) -.L8009092C: -/* 09152C 8009092C 35CF2000 */ ori $t7, $t6, 0x2000 -/* 091530 80090930 A48F00CA */ sh $t7, 0xca($a0) -.L80090934: -/* 091534 80090934 84620000 */ lh $v0, ($v1) -/* 091538 80090938 2401000C */ li $at, 12 -/* 09153C 8009093C 10410005 */ beq $v0, $at, .L80090954 -/* 091540 80090940 24010010 */ li $at, 16 -/* 091544 80090944 10410003 */ beq $v0, $at, .L80090954 -/* 091548 80090948 2401000D */ li $at, 13 -/* 09154C 8009094C 54410005 */ bnel $v0, $at, .L80090964 -/* 091550 80090950 8FBF0014 */ lw $ra, 0x14($sp) -.L80090954: -/* 091554 80090954 849800CA */ lh $t8, 0xca($a0) -/* 091558 80090958 3319CFFF */ andi $t9, $t8, 0xcfff -/* 09155C 8009095C A49900CA */ sh $t9, 0xca($a0) -.L80090960: -/* 091560 80090960 8FBF0014 */ lw $ra, 0x14($sp) -.L80090964: -/* 091564 80090964 27BD0018 */ addiu $sp, $sp, 0x18 -/* 091568 80090968 03E00008 */ jr $ra -/* 09156C 8009096C 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_800911B4.s b/asm/non_matchings/code_8008C1D0/func_800911B4.s deleted file mode 100644 index 258fc30f3..000000000 --- a/asm/non_matchings/code_8008C1D0/func_800911B4.s +++ /dev/null @@ -1,59 +0,0 @@ -glabel func_800911B4 -/* 091DB4 800911B4 AFA50004 */ sw $a1, 4($sp) -/* 091DB8 800911B8 84990044 */ lh $t9, 0x44($a0) -/* 091DBC 800911BC 8498002E */ lh $t8, 0x2e($a0) -/* 091DC0 800911C0 3C01800F */ lui $at, %hi(D_800EF678) # $at, 0x800f -/* 091DC4 800911C4 37281800 */ ori $t0, $t9, 0x1800 -/* 091DC8 800911C8 A4880044 */ sh $t0, 0x44($a0) -/* 091DCC 800911CC 84890044 */ lh $t1, 0x44($a0) -/* 091DD0 800911D0 A49800AE */ sh $t8, 0xae($a0) -/* 091DD4 800911D4 44803000 */ mtc1 $zero, $f6 -/* 091DD8 800911D8 312AFBFF */ andi $t2, $t1, 0xfbff -/* 091DDC 800911DC A48A0044 */ sh $t2, 0x44($a0) -/* 091DE0 800911E0 848B0044 */ lh $t3, 0x44($a0) -/* 091DE4 800911E4 00057600 */ sll $t6, $a1, 0x18 -/* 091DE8 800911E8 000E7E03 */ sra $t7, $t6, 0x18 -/* 091DEC 800911EC 356C2000 */ ori $t4, $t3, 0x2000 -/* 091DF0 800911F0 A48C0044 */ sh $t4, 0x44($a0) -/* 091DF4 800911F4 C424F678 */ lwc1 $f4, %lo(D_800EF678)($at) -/* 091DF8 800911F8 3C01800F */ lui $at, %hi(D_800EF67C) # $at, 0x800f -/* 091DFC 800911FC E48600F4 */ swc1 $f6, 0xf4($a0) -/* 091E00 80091200 E48400F0 */ swc1 $f4, 0xf0($a0) -/* 091E04 80091204 C428F67C */ lwc1 $f8, %lo(D_800EF67C)($at) -/* 091E08 80091208 240D0002 */ li $t5, 2 -/* 091E0C 8009120C 3C018019 */ lui $at, %hi(D_8018D920) # 0x8019 -/* 091E10 80091210 000F7040 */ sll $t6, $t7, 1 -/* 091E14 80091214 A48D00B2 */ sh $t5, 0xb2($a0) -/* 091E18 80091218 A48000C0 */ sh $zero, 0xc0($a0) -/* 091E1C 8009121C AC80007C */ sw $zero, 0x7c($a0) -/* 091E20 80091220 A4800078 */ sh $zero, 0x78($a0) -/* 091E24 80091224 002E0821 */ addu $at, $at, $t6 -/* 091E28 80091228 E48800EC */ swc1 $f8, 0xec($a0) -/* 091E2C 8009122C A420D920 */ sh $zero, %lo(D_8018D920)($at) # -0x26e0($at) -/* 091E30 80091230 A4800B22 */ sh $zero, 0xb22($a0) -/* 091E34 80091234 A4800B2E */ sh $zero, 0xb2e($a0) -/* 091E38 80091238 A4800B2C */ sh $zero, 0xb2c($a0) -/* 091E3C 8009123C A4800ADA */ sh $zero, 0xada($a0) -/* 091E40 80091240 A4800AE6 */ sh $zero, 0xae6($a0) -/* 091E44 80091244 A4800AE4 */ sh $zero, 0xae4($a0) -/* 091E48 80091248 24830090 */ addiu $v1, $a0, 0x90 -/* 091E4C 8009124C 2404000A */ li $a0, 10 -/* 091E50 80091250 24020002 */ li $v0, 2 -.L80091254: -/* 091E54 80091254 24420004 */ addiu $v0, $v0, 4 -/* 091E58 80091258 A4600B2C */ sh $zero, 0xb2c($v1) -/* 091E5C 8009125C A4600B2E */ sh $zero, 0xb2e($v1) -/* 091E60 80091260 A4600B22 */ sh $zero, 0xb22($v1) -/* 091E64 80091264 A4600B74 */ sh $zero, 0xb74($v1) -/* 091E68 80091268 A4600B76 */ sh $zero, 0xb76($v1) -/* 091E6C 8009126C A4600B6A */ sh $zero, 0xb6a($v1) -/* 091E70 80091270 A4600BBC */ sh $zero, 0xbbc($v1) -/* 091E74 80091274 A4600BBE */ sh $zero, 0xbbe($v1) -/* 091E78 80091278 A4600BB2 */ sh $zero, 0xbb2($v1) -/* 091E7C 8009127C 24630120 */ addiu $v1, $v1, 0x120 -/* 091E80 80091280 A46009C4 */ sh $zero, 0x9c4($v1) -/* 091E84 80091284 A46009C6 */ sh $zero, 0x9c6($v1) -/* 091E88 80091288 1444FFF2 */ bne $v0, $a0, .L80091254 -/* 091E8C 8009128C A46009BA */ sh $zero, 0x9ba($v1) -/* 091E90 80091290 03E00008 */ jr $ra -/* 091E94 80091294 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_80091440.s b/asm/non_matchings/code_8008C1D0/func_80091440.s deleted file mode 100644 index 7d8a7baf5..000000000 --- a/asm/non_matchings/code_8008C1D0/func_80091440.s +++ /dev/null @@ -1,26 +0,0 @@ -glabel func_80091440 -/* 092040 80091440 00047600 */ sll $t6, $a0, 0x18 -/* 092044 80091444 000E7E03 */ sra $t7, $t6, 0x18 -/* 092048 80091448 000FC0C0 */ sll $t8, $t7, 3 -/* 09204C 8009144C 030FC023 */ subu $t8, $t8, $t7 -/* 092050 80091450 0018C100 */ sll $t8, $t8, 4 -/* 092054 80091454 030FC023 */ subu $t8, $t8, $t7 -/* 092058 80091458 0018C080 */ sll $t8, $t8, 2 -/* 09205C 8009145C 030FC023 */ subu $t8, $t8, $t7 -/* 092060 80091460 3C19800F */ lui $t9, %hi(gPlayers) # $t9, 0x800f -/* 092064 80091464 27396990 */ addiu $t9, %lo(gPlayers) # addiu $t9, $t9, 0x6990 -/* 092068 80091468 0018C0C0 */ sll $t8, $t8, 3 -/* 09206C 8009146C 03191021 */ addu $v0, $t8, $t9 -/* 092070 80091470 84430044 */ lh $v1, 0x44($v0) -/* 092074 80091474 AFA40000 */ sw $a0, ($sp) -/* 092078 80091478 30680800 */ andi $t0, $v1, 0x800 -/* 09207C 8009147C 15000006 */ bnez $t0, .L80091498 -/* 092080 80091480 00000000 */ nop -/* 092084 80091484 944A0000 */ lhu $t2, ($v0) -/* 092088 80091488 34692400 */ ori $t1, $v1, 0x2400 -/* 09208C 8009148C A4490044 */ sh $t1, 0x44($v0) -/* 092090 80091490 314BDFFF */ andi $t3, $t2, 0xdfff -/* 092094 80091494 A44B0000 */ sh $t3, ($v0) -.L80091498: -/* 092098 80091498 03E00008 */ jr $ra -/* 09209C 8009149C 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_800914A0.s b/asm/non_matchings/code_8008C1D0/func_800914A0.s deleted file mode 100644 index 2f800038e..000000000 --- a/asm/non_matchings/code_8008C1D0/func_800914A0.s +++ /dev/null @@ -1,18 +0,0 @@ -glabel func_800914A0 -/* 0920A0 800914A0 3C0E800E */ lui $t6, %hi(gPlayerOneCopy) # $t6, 0x800e -/* 0920A4 800914A4 8DCEC4FC */ lw $t6, %lo(gPlayerOneCopy)($t6) -/* 0920A8 800914A8 3C048015 */ lui $a0, %hi(D_80152308) # $a0, 0x8015 -/* 0920AC 800914AC 24842308 */ addiu $a0, %lo(D_80152308) # addiu $a0, $a0, 0x2308 -/* 0920B0 800914B0 95CF0006 */ lhu $t7, 6($t6) -/* 0920B4 800914B4 3C028016 */ lui $v0, %hi(D_8015F6F8) # $v0, 0x8016 -/* 0920B8 800914B8 25F80007 */ addiu $t8, $t7, 7 -/* 0920BC 800914BC A4980000 */ sh $t8, ($a0) -/* 0920C0 800914C0 9442F6F8 */ lhu $v0, %lo(D_8015F6F8)($v0) -/* 0920C4 800914C4 3303FFFF */ andi $v1, $t8, 0xffff -/* 0920C8 800914C8 0043082A */ slt $at, $v0, $v1 -/* 0920CC 800914CC 10200002 */ beqz $at, .L800914D8 -/* 0920D0 800914D0 0062C823 */ subu $t9, $v1, $v0 -/* 0920D4 800914D4 A4990000 */ sh $t9, ($a0) -.L800914D8: -/* 0920D8 800914D8 03E00008 */ jr $ra -/* 0920DC 800914DC 00000000 */ nop diff --git a/include/common_structs.h b/include/common_structs.h index 041d6f31e..1a51b46c6 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -133,15 +133,20 @@ typedef struct { f32 unk30; } Camera; +typedef struct { + s16 unk_000[0x24]; +} UnkPlayerStruct258; // size = 0x48 + typedef struct { /* 0x0000 */ u16 unk_000; /* 0x0002 */ s16 unk_002; /* 0x0004 */ s16 unk_004; // currentPosition - /* 0x0006 */ s16 unk_006; + /* 0x0006 */ u16 unk_006; /* 0x0008 */ s16 unk_008; // lapCount? /* 0x000A */ char unk_00A[0x2]; /* 0x000C */ s32 unk_00C; - /* 0x0010 */ char unk_010[0x4]; + /* 0x0010 */ s16 unk_010; + /* 0x0012 */ s16 unk_012; /* 0x0014 */ f32 posX; /* 0x0018 */ f32 posY; /* 0x001C */ f32 posZ; @@ -280,6 +285,7 @@ typedef struct { /* 0x0218 */ f32 unk_218; /* 0x021C */ f32 unk_21C; /* 0x0220 */ s16 unk_220; + /* 0x0222 */ s16 unk_222; /* 0x0224 */ f32 unk_224; /* 0x0228 */ s16 unk_228; /* 0x022A */ s16 unk_22A; @@ -295,7 +301,7 @@ typedef struct { /* 0x0244 */ u16 unk_24C[4]; /* 0x0254 */ u16 characterId; /* 0x0256 */ s16 unk_256; - /* 0x0258 */ char unk_258[0xB40]; + /* 0x0258 */ UnkPlayerStruct258 unk_258[40]; /* 0x0D98 */ s16 unk_D98; /* 0x0D9A */ s16 unk_D9A; /* 0x0D9C */ f32 unk_D9C; diff --git a/include/variables.h b/include/variables.h index 44e288cfb..a1257d3bb 100644 --- a/include/variables.h +++ b/include/variables.h @@ -73,6 +73,7 @@ extern Camera *camera2; extern Camera *camera3; extern Camera *camera4; +extern Player gPlayers[8]; extern Player* gPlayerOne; extern Player* gPlayerTwo; extern Player* gPlayerThree; diff --git a/src/code_8008C1D0.c b/src/code_8008C1D0.c index 1f407abf7..16812f685 100644 --- a/src/code_8008C1D0.c +++ b/src/code_8008C1D0.c @@ -230,8 +230,8 @@ void func_8008C528(Player *player, s8 arg1) { player->unk_236 = 2; player->unk_042 = 0; if (((player->unk_000 & PLAYER_HUMAN) == PLAYER_HUMAN) && ((player->unk_000 & PLAYER_INVISIBLE_OR_BOMB) != PLAYER_INVISIBLE_OR_BOMB)) { - func_800C90F4( (u8) arg1, (temp_v1 * 0x10) + 0x29008005); - func_800C9060( (u8) arg1, 0x19009005); + func_800C90F4(arg1, (temp_v1 * 0x10) + 0x29008005); + func_800C9060(arg1, 0x19009005); } else { func_800098FC(arg1, player); } @@ -299,7 +299,7 @@ void func_8008C73C(Player *player, s8 arg1) { D_8018D920[arg1] = 0; if (((player->unk_000 & 0x4000) == 0x4000) && ((player->unk_000 & 0x100) != 0x100)) { - func_800C90F4(arg1 & 0xFF, (player->characterId * 0x10) + 0x29008003); + func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008003); } else { func_800098FC(arg1, player); } @@ -648,13 +648,13 @@ void func_8008D3C4(Player* player, s8 arg1) { if (D_8015F890 != 1) { if (((player->unk_000 & 0x4000) == 0x4000) && ((player->unk_000 & 0x100) != 0x100)) { - func_800C9250(arg1 & 0xFF); - func_800C9060(arg1 & 0xFF, 0x1900A40B); + func_800C9250(arg1); + func_800C9060(arg1, 0x1900A40B); } } else { if (player == gPlayerOne) { - func_800C9250(arg1 & 0xFF); - func_800C9060(arg1 & 0xFF, 0x1900A40B); + func_800C9250(arg1); + func_800C9060(arg1, 0x1900A40B); } } @@ -700,49 +700,35 @@ void func_8008D570(Player *player, s8 arg1) { D_8018D920[arg1] = 0; if (((player->unk_000 & 0x4000) == 0x4000) && ((player->unk_000 & 0x100) != 0x100)) { - func_800C9060(arg1 & 0xFF, 0x19008002); + func_800C9060(arg1, 0x19008002); } if (((player->unk_000 & 0x4000) == 0x4000) && ((player->unk_000 & 0x100) != 0x100)) { - func_800C90F4(arg1 & 0xFF, (player->characterId * 0x10) + 0x2900800C); + func_800C90F4(arg1, (player->characterId * 0x10) + 0x2900800C); } } -#ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -? func_8008D760(s8); /* extern */ -extern ? D_8018D920; - -void func_8008D698(void *arg0, s8 arg1) { - s16 *temp_v0; - s16 temp_t5; - s32 temp_t7; - s32 phi_v1; - - if (arg0->unkB2 == 0) { - arg0->unk2E = arg0->unkAE; - phi_v1 = 0; +void func_8008D698(Player* player, s8 arg1) { + s16 temp; + + if (player->unk_0B2 == 0) { + player->unk_02E = player->unk_0AE; + temp = 0; } else { - arg0->unk2E = arg0->unk2E - 0x71C; - temp_v0 = (arg1 * 2) + &D_8018D920; - temp_t5 = *temp_v0 - 0x71C; - temp_t7 = ((temp_t5 & 0xFFFF) / 1820) << 0x10; - *temp_v0 = temp_t5; - phi_v1 = temp_t7 >> 0x10; + player->unk_02E -= 1820; + D_8018D920[arg1] -= 1820; + temp = ((u16) D_8018D920[arg1] / 1820); } - if (phi_v1 == 0) { - arg0->unkB2 = arg0->unkB2 - 1; - if (arg0->unkB2 <= 0) { - arg0->unkB2 = 0; + if (temp == 0) { + --player->unk_0B2; + if (player->unk_0B2 <= 0) { + player->unk_0B2 = 0; } - if ((arg0->unkB2 == 0) && ((arg0->unkBC & 8) != 8)) { - func_8008D760(arg1); + if ((player->unk_0B2 == 0) && ((player->unk_0BC & 8) != 8)) { + func_8008D760(player); } } } -#else -GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008D698.s") -#endif void func_8008D760(Player* player) { player->unk_0A8 = 0; @@ -771,45 +757,31 @@ void func_8008D7B0(Player* player, s8 arg1) { player->unk_078 = 0; if (((player->unk_000 & 0x4000) == 0x4000) && ((player->unk_000 & 0x100) != 0x100)) { - func_800C90F4(arg1 & 0xFF, (player->characterId * 0x10) + 0x29008003); + func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008003); } } -#ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -? func_8008D97C(s8); /* extern */ -extern ? D_8018D920; +void func_8008D8B4(Player* player, s8 arg1) { + s16 temp; -void func_8008D8B4(void *arg0, s8 arg1) { - s16 *temp_v0; - s16 temp_t5; - s32 temp_t7; - s32 phi_v1; - - if (arg0->unkB2 == 0) { - arg0->unk2E = arg0->unkAE; - phi_v1 = 0; + if (player->unk_0B2 == 0) { + player->unk_02E = player->unk_0AE; + temp = 0; } else { - arg0->unk2E = arg0->unk2E - 0x71C; - temp_v0 = (arg1 * 2) + &D_8018D920; - temp_t5 = *temp_v0 - 0x71C; - temp_t7 = ((temp_t5 & 0xFFFF) / 1820) << 0x10; - *temp_v0 = temp_t5; - phi_v1 = temp_t7 >> 0x10; + player->unk_02E -= 1820; + D_8018D920[arg1] -= 1820; + temp = ((u16) (D_8018D920[arg1]) / 1820); } - if (phi_v1 == 0) { - arg0->unkB2 = arg0->unkB2 - 1; - if (arg0->unkB2 <= 0) { - arg0->unkB2 = 0; + if (temp == 0) { + --player->unk_0B2; + if (player->unk_0B2 <= 0) { + player->unk_0B2 = 0; } - if ((arg0->unkB2 == 0) && ((arg0->unkBC & 8) != 8)) { - func_8008D97C(arg1); + if ((player->unk_0B2 == 0) && ((player->unk_0BC & 8) != 8)) { + func_8008D97C(player); } } } -#else -GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008D8B4.s") -#endif void func_8008D97C(Player *player) { player->unk_0A8 = 0; @@ -842,190 +814,143 @@ void func_8008D9C0(Player* player) { } } -#ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -? func_800098FC(s8, void *, void *, s8); /* extern */ -? func_8008C354(s8); /* extern */ -? func_800C90F4(s32, s32, void *, s8); /* extern */ -extern ? D_80165190; -extern ? D_8018D990; +void func_8008DABC(Player *player, s8 arg1) { + func_8008C354(player, arg1); -void func_8008DABC(void *arg0, s8 arg1) { - s32 temp_a0; - s8 temp_a1; - s8 temp_a3; - u16 temp_a1_2; - u16 temp_v0_2; - void *temp_a2; - void *temp_v0; - void *phi_a2; - u16 phi_v0; - s8 phi_a3; + if ((player->unk_0BC & 0x4000000) == 0) { + player->unk_DB6 = 0; + player->unk_238 = 0; + player->unk_DC4 = 4.5f; + D_8018D990[arg1] = 0; + player->unk_0BC &= ~0x08000010; + D_80165190[0][arg1] = 1; + D_80165190[1][arg1] = 1; + D_80165190[2][arg1] = 1; + D_80165190[3][arg1] = 1; + player->unk_D98 = 1; + player->unk_D9C = 0.0f; + player->unk_DA0 = 65.0f; - temp_a1 = arg1; - arg1 = arg1; - func_8008C354(temp_a1); - temp_a2 = arg0; - temp_a3 = arg1; - phi_a2 = temp_a2; - phi_a3 = temp_a3; - if ((temp_a2->unkBC << 5) >= 0) { - temp_a2->unkDB6 = 0; - temp_a2->unk238 = 0; - temp_a2->unkDC4 = 4.5f; - *(&D_8018D990 + (temp_a3 * 4)) = 0; - temp_a2->unkBC = temp_a2->unkBC & 0xF7FFFFEF; - temp_v0 = (temp_a3 * 2) + &D_80165190; - temp_v0->unk0 = 1; - temp_v0->unk10 = 1; - temp_v0->unk20 = 1; - temp_v0->unk30 = 1; - temp_a2->unkD98 = 1; - temp_a2->unkD9C = 0.0f; - temp_a2->unkDA0 = 65.0f; - if ((temp_a2->unkC & 0x100) != 0) { - temp_a2->unk46 = temp_a2->unk46 | 0x80; + if ((player->unk_00C & 0x100) != 0) { + player->unk_046 |= 0x80; } - temp_v0_2 = temp_a2->unk0; - phi_v0 = temp_v0_2; - if ((temp_v0_2 & 0x4000) != 0) { - temp_a0 = temp_a3 & 0xFF; - if ((temp_a2->unkBC & 0x4000000) == 0) { - temp_a1_2 = temp_a2->unk254; - arg1 = temp_a3; - arg0 = temp_a2; - func_800C90F4(temp_a0, (temp_a1_2 * 0x10) + 0x29008005, temp_a2, temp_a3); - phi_a2 = arg0; - phi_v0 = arg0->unk0; - phi_a3 = arg1; - } + + if (((player->unk_000 & 0x4000) != 0) && ((player->unk_0BC & 0x04000000) == 0)) { + func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008005); } - phi_a2->unkBC = phi_a2->unkBC | 0x4000000; - if ((phi_v0 & 0x1000) != 0) { - func_800098FC(phi_a3, phi_a2, phi_a2, phi_a3); + + player->unk_0BC |= 0x04000000; + if (((player->unk_000) & 0x1000) != 0) { + func_800098FC(arg1, player); } } } -#else -GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008DABC.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -? func_8008D9C0(f32, void *, s32, void *, s8); /* extern */ -? func_800C9060(f32, s32, ?, void *, s8); /* extern */ -? func_800C90F4(f32, s32, s32, void *, s8); /* extern */ -extern ? D_80165190; -extern ? D_8018D990; -extern ? gKartBoundingBoxTable; +void func_8008DC08(Player* player, s8 arg1) { + player->unk_0C2 = 0; + player->unk_0A8 = 0; + player->unk_07C = 0; + player->unk_0C0 = 0; + player->unk_08C = 0.0f; + player->unk_09C = 0.0f; + if ((player->unk_124 >= 600.0f) || ((player->unk_0BC & 0x1000) != 0)) { D_8018D990[arg1] = 3; } // placed block on same line to match -void func_8008DC08(void *arg0, s8 arg1) { - s16 temp_v0_3; - s32 *temp_v1; - s32 temp_t0; - s32 temp_t2; - s32 temp_v0; - void *temp_v0_2; + switch (D_8018D990[arg1]) { + case 0: + player->unk_DC4 = 4.5f; + if (player->unk_238 < 0x3D) { + ++player->unk_238; + } - arg0->unkC2 = 0; - arg0->unkA8 = 0; - arg0->unk7C = 0; - arg0->unkC0 = 0; - arg0->unk8C = 0.0f; - arg0->unk9C = 0.0f; - if ((arg0->unk124 >= 600.0f) || ((arg0->unkBC & 0x1000) != 0)) { - *(&D_8018D990 + (arg1 * 4)) = 3; - } - temp_v1 = (arg1 * 4) + &D_8018D990; - temp_v0 = *temp_v1; - if (temp_v0 != 0) { - if (temp_v0 != 1) { - if (temp_v0 != 2) { - if (temp_v0 != 3) { - return; + if ((player->unk_046 & 0x80) != 0) { + if ((player->unk_00C & 0x100) == 0) { + D_8018D990[arg1] = 1; + player->unk_238 = 0; + if ((player->unk_000 & 0x4000) != 0) { + func_800C9060(arg1, 0x1901904B); + break; } - temp_t0 = arg0->unkBC & 0xFBFFFFFF; - temp_t2 = temp_t0 | 0x8000000; - arg0->unkBC = temp_t0; - arg0->unkDB6 = 0; - arg0->unkBC = temp_t2; - arg0->unkDC4 = 3.0f; - arg0->unk224 = 1.0f; - temp_v0_2 = (arg1 * 2) + &D_80165190; - arg0->unk70 = *(&gKartBoundingBoxTable + (arg0->unk254 * 4)); - temp_v0_2->unk0 = 1; - temp_v0_2->unk10 = 1; - temp_v0_2->unk20 = 1; - temp_v0_2->unk30 = 1; - if ((arg0->unk0 & 0x4000) != 0) { - func_800C90F4(0.0f, arg1 & 0xFF, (arg0->unk254 * 0x10) + 0x29008008, arg0, arg1); + } + } else { + ++player->unk_238; + if (player->unk_238 >= 0x1E) { + D_8018D990[arg1] = 1; + player->unk_238 = 0; + if ((player->unk_000 & 0x4000) != 0) { + func_800C9060(arg1, 0x1901904B); + break; } - /* Duplicate return node #35. Try simplifying control flow for better match */ - return; } - arg0->unk238 = arg0->unk238 + 1; - if (arg0->unk238 >= 0x259) { - *temp_v1 = 3; - arg0->unk238 = 0; + break; + } + + break; + case 1: + player->unk_DC4 = 4.5f; + player->posY += D_800EF570; + ++player->unk_238; + + if ((player->unk_046 & 0x80) != 0) { + if (player->unk_238 >= 0x32) { + D_8018D990[arg1] = 2; + player->unk_238 = 0; + player->unk_046 &= 0xFF7F; } - if (arg0->unk124 >= 600.0f) { - *temp_v1 = 3; - } - arg0->unkDC4 = 4.5f; - arg0->unk18 = arg0->unk18 - 0.085; - if ((arg0->unkBC & 8) != 8) { - *temp_v1 = 3; - arg0->unk238 = 0; - } - func_8008D9C0(0.0f, arg0, 3, arg0, arg1); - return; + } else if (player->unk_238 >= 0x50) { + D_8018D990[arg1] = 2; + player->unk_238 = 0; } - arg0->unkDC4 = 4.5f; - arg0->unk238 = arg0->unk238 + 1; - arg0->unk18 = arg0->unk18 + 0.13; - if ((arg0->unk46 & 0x80) != 0) { - if (arg0->unk238 >= 0x32) { - *temp_v1 = 2; - arg0->unk238 = 0; - arg0->unk46 = arg0->unk46 & 0xFF7F; - } - } else if (arg0->unk238 >= 0x50) { - *temp_v1 = 2; - arg0->unk238 = 0; + + player->unk_DA0 += 6.0f; + if (player->unk_DA0 >= 90.0f) { + player->unk_DA0 = 90.0f; } - arg0->unkDA0 = arg0->unkDA0 + 6.0f; - if (arg0->unkDA0 >= 90.0f) { - arg0->unkDA0 = 90.0f; + + player->unk_D9C += player->unk_DA0; + if (D_800EF578 <= player->unk_D9C) { + player->unk_DA0 = 0.0f; + break; } - arg0->unkD9C = arg0->unkD9C + arg0->unkDA0; - if (arg0->unkD9C >= 3458.0f) { - arg0->unkDA0 = 0.0f; - return; + break; + case 2: + ++player->unk_238; + if (player->unk_238 >= 0x259) { + D_8018D990[arg1] = 3; + player->unk_238 = 0; } - /* Duplicate return node #35. Try simplifying control flow for better match */ - return; - } - temp_v0_3 = arg0->unk238; - arg0->unkDC4 = 4.5f; - if (temp_v0_3 < 0x3D) { - arg0->unk238 = temp_v0_3 + 1; - } - if ((arg0->unk46 & 0x80) != 0) { - if (((arg0->unkC & 0x100) == 0) && (*temp_v1 = 1, arg0->unk238 = 0, ((arg0->unk0 & 0x4000) != 0))) { - func_800C9060(0.0f, arg1 & 0xFF, 0x1901904B, arg0, arg1); - return; + + if (player->unk_124 >= 600.0f) { + D_8018D990[arg1] = 3; } - /* Duplicate return node #35. Try simplifying control flow for better match */ - return; - } - arg0->unk238 = arg0->unk238 + 1; - if ((arg0->unk238 >= 0x1E) && (*temp_v1 = 1, arg0->unk238 = 0, ((arg0->unk0 & 0x4000) != 0))) { - func_800C9060(0.0f, arg1 & 0xFF, 0x1901904B, arg0, arg1); + + player->unk_DC4 = 4.5f; + player->posY -= D_800EF580; + + if ((player->unk_0BC & 8) != 8) { + D_8018D990[arg1] = 3; + player->unk_238 = 0; + } + + func_8008D9C0(player); + break; + case 3: + player->unk_DC4 = 3.0f; + player->unk_0BC &= ~0x04000000; + player->unk_DB6 = 0; + player->unk_0BC |= 0x08000000; + player->unk_224 = 1.0f; + player->unk_070 = gKartBoundingBoxTable[player->characterId]; + D_80165190[0][arg1] = 1; + D_80165190[1][arg1] = 1; + D_80165190[2][arg1] = 1; + D_80165190[3][arg1] = 1; + + if ((player->unk_000 & 0x4000) != 0) { + func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008008); + } + break; } } -#else -GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008DC08.s") -#endif void func_8008DF98(Player* player, s8 arg1) { func_8008C354(player, arg1); @@ -1051,7 +976,7 @@ void func_8008DF98(Player* player, s8 arg1) { D_8018D920[arg1] = 0; if (((player->unk_000 & 0x4000) == 0x4000) && ((player->unk_000 & 0x100) != 0x100)) { - func_800C90F4(arg1 & 0xFF, (player->characterId * 0x10) + 0x29008003); + func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008003); } else { func_800098FC(arg1, player); } @@ -1227,74 +1152,47 @@ void func_8008E4A4(Player* player, s8 arg1) { } } -#ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -? func_800098FC(s8, void *, u16); /* extern */ -? func_8008C310(void *); /* extern */ -? func_8008C354(s8); /* extern */ -? func_800C9060(u8, ?); /* extern */ -? func_800C90F4(u8, s32, u16); /* extern */ -? func_800CA24C(u8); /* extern */ -extern u16 D_800DC51C; -extern ? D_800E3710; -extern ? D_800E3730; -extern ? D_80165420; -extern ? D_80165440; -extern ? D_80165460; -extern ? D_80165480; -extern s32 gModeSelection; +void func_8008E6C0(Player *player, s8 arg1) +{ + func_8008C354(player, arg1); + func_8008C310(player); -void func_8008E6C0(void *arg0, s8 arg1) { - s32 sp20; - s32 temp_t4; - s32 temp_t7; - s32 temp_t9; - s32 temp_v0; - u16 temp_a2; - u16 temp_v1; + player->unk_0A8 = 0; + player->unk_0BC |= 0x01000000; + player->unk_0BC &= ~0x10; + player->kartHopJerk = 0.0f; + player->kartHopAcceleration = 0.0f; + player->kartHopVelocity = 0.0f; + player->kartHopJerk = D_800E3730[player->characterId]; + player->kartHopVelocity = D_800E3710[player->characterId]; + player->unk_236 = 4; + player->unk_042 = 0; + player->unk_0E0 = 0; - func_8008C354(arg1); - func_8008C310(arg0); - temp_a2 = arg0->unk254; - temp_t7 = arg0->unkBC | 0x1000000; - temp_t9 = temp_t7 & ~0x10; - arg0->unkBC = temp_t7; - temp_v0 = temp_a2 * 4; - arg0->unkA8 = 0; - arg0->unkBC = temp_t9; - arg0->unkF0 = 0.0f; - arg0->unkF4 = 0.0f; - arg0->unkEC = 0.0f; - arg0->unkF0 = *(&D_800E3730 + temp_v0); - temp_v1 = arg0->unk0; - arg0->unk236 = 4; - arg0->unk42 = 0; - arg0->unkE0 = 0; - arg0->unkEC = *(&D_800E3710 + temp_v0); - if (((temp_v1 & 0x4000) == 0x4000) && ((temp_v1 & 0x100) != 0x100)) { - if ((gModeSelection == VERSUS) && ((temp_v1 & 0x1000) != 0) && (D_800DC51C == 0)) { + if (((player->unk_000 & 0x4000) == 0x4000) && ((player->unk_000 & 0x100) != 0x100)) { + if (((gModeSelection == 2) && ((player->unk_000 & 0x1000) != 0)) && (D_800DC51C == 0)) { func_800CA24C(arg1); } - sp20 = arg1; - func_800C90F4(arg1, (arg0->unk254 * 0x10) + 0x29008005, arg0->unk254); - if ((gModeSelection == VERSUS) && ((arg0->unk0 & 0x1000) != 0) && (D_800DC51C == 0)) { - func_800CA24C(unksp23); + + if (1) { } - func_800C9060(unksp23, 0x19009005); + + func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008005); + if (((gModeSelection == 2) && ((player->unk_000 & 0x1000) != 0)) && (D_800DC51C == 0)) { + func_800CA24C(arg1); + } + func_800C9060(arg1, 0x19009005); } else { - func_800098FC(arg1, arg0, temp_a2); + func_800098FC(arg1, player); } - arg0->unkC = arg0->unkC & 0xFFB7FFFF; - arg0->unkB6 = arg0->unkB6 | 0x40; - temp_t4 = arg1 * 4; - *(&D_80165480 + temp_t4) = 0; - *(&D_80165460 + temp_t4) = 0; - *(&D_80165440 + temp_t4) = 0; - *(&D_80165420 + temp_t4) = 0; + + player->unk_00C &= ~0x00480000; + player->unk_0B6 |= 0x40; + D_80165480[arg1] = 0; + D_80165460[arg1] = 0; + D_80165440[arg1] = 0; + D_80165420[arg1] = 0; } -#else -GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008E6C0.s") -#endif void func_8008E884(Player* player, s8 arg1) { player->unk_0BC &= ~0x01000000; @@ -1380,8 +1278,8 @@ void func_8008EAE0(Player* player, s8 arg1) { player->unk_0E0 = 0; if (((player->unk_000 & 0x4000) == 0x4000) && ((player->unk_000 & 0x100) != 0x100)) { - func_800C90F4((u8) arg1, (player->characterId * 0x10) + 0x29008005); - func_800C9060((u8) arg1, 0x19009005); + func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008005); + func_800C9060(arg1, 0x19009005); } else { func_800098FC(arg1, player); } @@ -1416,12 +1314,12 @@ void func_8008EC88(Player* player, s8 arg1) { player->unk_DBC = 8.0f; if (D_8015F890 != 1) { if (((player->unk_000 & 0x4000) == 0x4000) && ((player->unk_000 & 0x100) == 0)) { - func_800C90F4((u8) arg1, (player->characterId * 0x10) + 0x29008001); - func_800C9060((u8) arg1, 0x1900A40B); + func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008001); + func_800C9060(arg1, 0x1900A40B); } } else if (player == gPlayerOne) { - func_800C90F4((u8) arg1, (player->characterId * 0x10) + 0x29008001); - func_800C9060((u8) arg1, 0x1900A40B); + func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008001); + func_800C9060(arg1, 0x1900A40B); } player->unk_044 &= ~0x1; player->unk_0BC &= ~0x20; @@ -1463,12 +1361,12 @@ void func_8008EEE4(Player* player, s8 arg1) { if (D_8015F890 != 1) { if (((player->unk_000 & 0x4000) == 0x4000) && ((player->unk_000 & 0x100) == 0)) { - func_800C90F4((u8) arg1, (player->characterId * 0x10) + 0x29008001); - func_800C9060((u8) arg1, 0x1900A40B); + func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008001); + func_800C9060(arg1, 0x1900A40B); } } else if (player == gPlayerOne) { - func_800C90F4((u8) arg1, (player->characterId * 0x10) + 0x29008001); - func_800C9060((u8) arg1, 0x1900A40B); + func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008001); + func_800C9060(arg1, 0x1900A40B); } player->unk_044 &= ~0x1; @@ -1509,80 +1407,58 @@ void func_8008F104(Player* player, s8 arg1) { D_8018D920[arg1] = -0x8000; if (((player->unk_000 & 0x4000) == 0x4000) && ((player->unk_000 & 0x100) != 0x100)) { - func_800C90F4((u8) arg1, (player->characterId * 0x10) + 0x29008003); + func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008003); } } -#ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -extern ? D_8018D920; +void func_8008F1B8(Player* player, s8 arg1) { + s16 temp; -void func_8008F1B8(void *arg0, s8 arg1) { - s16 *temp_v0_2; - s16 *temp_v0_3; - s16 *temp_v0_4; - s16 *temp_v0_5; - s16 temp_t2; - s16 temp_t5; - s16 temp_t7; - s16 temp_t8; - s16 temp_v0; + player->unk_08C = (player->unk_210 * D_800EF5A8); + if (player->unk_0B2 < 0) { + if ((player->unk_044 & 0x80) == 0x80) { + player->unk_02E += 182; + D_8018D920[arg1] += 182; - temp_v0 = arg0->unkB2; - arg0->unk8C = arg0->unk210 * 0.05; - if (temp_v0 < 0) { - if ((arg0->unk44 & 0x80) == 0x80) { - arg0->unk2E = arg0->unk2E + 0xB6; - temp_v0_2 = (arg1 * 2) + &D_8018D920; - temp_t5 = *temp_v0_2 + 0xB6; - *temp_v0_2 = temp_t5; - if (((temp_t5 & 0xFFFF) / 182) == 0xB4) { - arg0->unkBC = arg0->unkBC & ~0x4000; - arg0->unk0 = arg0->unk0 & 0xFF7F; - arg0->unk9C = arg0->unk9C / 3.0f; - return; + temp = ((u16) D_8018D920[arg1] / 182); + if (temp == 180) { + player->unk_0BC &= ~0x4000; + player->unk_000 &= ~0x80; + player->unk_09C /= 3.0f; } - /* Duplicate return node #13. Try simplifying control flow for better match */ + } else { + + player->unk_02E -= 182; + D_8018D920[arg1] -= 182; + temp = ((u16) D_8018D920[arg1] / 182); + if (temp == 180) { + player->unk_0BC &= ~0x4000; + player->unk_000 &= ~0x80; + player->unk_09C /= 3.0f; + } + } + } else { + if ((player->unk_0B2 & 1) != 0) { + player->unk_02E -= 364; + D_8018D920[arg1] -= 364; + temp = ((u16) D_8018D920[arg1] / 364); + if (temp < 71) { + --player->unk_0B2; + } + player->unk_044 |= 0x80; + player->unk_044 &= ~0x40; return; } - temp_v0_3 = (arg1 * 2) + &D_8018D920; - arg0->unk2E = arg0->unk2E - 0xB6; - temp_t8 = *temp_v0_3 - 0xB6; - *temp_v0_3 = temp_t8; - if (((temp_t8 & 0xFFFF) / 182) == 0xB4) { - arg0->unkBC = arg0->unkBC & ~0x4000; - arg0->unk0 = arg0->unk0 & 0xFF7F; - arg0->unk9C = arg0->unk9C / 3.0f; - return; + player->unk_02E += 364; + D_8018D920[arg1] += 364; + temp = ((u16) D_8018D920[arg1] / 364); + if (temp >= 110) { + --player->unk_0B2; } - /* Duplicate return node #13. Try simplifying control flow for better match */ - return; + player->unk_044 |= 0x40; + player->unk_044 &= ~0x80; } - if ((temp_v0 & 1) != 0) { - arg0->unk2E = arg0->unk2E - 0x16C; - temp_v0_4 = (arg1 * 2) + &D_8018D920; - temp_t2 = *temp_v0_4 - 0x16C; - *temp_v0_4 = temp_t2; - if (((temp_t2 & 0xFFFF) / 364) < 0x47) { - arg0->unkB2 = arg0->unkB2 - 1; - } - arg0->unk44 = arg0->unk44 | 0x80; - arg0->unk44 = arg0->unk44 & 0xFFBF; - return; - } - arg0->unk2E = arg0->unk2E + 0x16C; - temp_v0_5 = (arg1 * 2) + &D_8018D920; - temp_t7 = *temp_v0_5 + 0x16C; - *temp_v0_5 = temp_t7; - if (((temp_t7 & 0xFFFF) / 364) >= 0x6E) { - arg0->unkB2 = arg0->unkB2 - 1; - } - arg0->unk44 = arg0->unk44 | 0x40; - arg0->unk44 = arg0->unk44 & 0xFF7F; } -#else -GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008F1B8.s") -#endif void func_8008F3E0(Player* player) { player->unk_0BC &= ~0x4000; @@ -1628,7 +1504,7 @@ void func_8008F494(Player* player, s8 arg1) { ((player->unk_0CA & 2) == 0) && ((player->unk_0DE & 1) == 0) && ((player->unk_0DE & 2) == 0)) { - func_800C90F4((u8) arg1, (player->characterId * 0x10) + 0x29008004); + func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008004); } } @@ -1689,7 +1565,7 @@ void func_8008F778(Player* player, s8 arg1) { D_8018D900[arg1] = 2; } } else if (D_8018D900[arg1] == 1) { - func_800CA984((u8) arg1); + func_800CA984(arg1); D_8018D900[arg1] = 2; } } @@ -1703,76 +1579,41 @@ void func_8008F86C(Player* player, s8 arg1) { func_800CAACC(arg1); } -#ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -? func_800CB064(s32, s8, void *, s16); /* extern */ -extern ? D_8018D950; -extern ? D_8018D970; -extern f32 gCourseTimer; +void func_8008F8DC(Player* arg0, s8 arg1) { + s32 tmp; + tmp = ((s32) gCourseTimer) - D_8018D950[arg1]; + if (tmp < 7) { + arg0->unk_0C6 -= 2; + + if (arg0->unk_0C6 < 0x61) { + arg0->unk_0C6 = 0x60; + } + D_8018D970[arg1] -= 2; + if (D_8018D970[arg1] <= 0) { + D_8018D970[arg1] = 0; + } + } else { + arg0->unk_0C6 += 4; + if (arg0->unk_0C6 >= 0xF0) { + arg0->unk_0C6 = 0xFF; + D_8018D970[arg1] = 0xFF; + arg0->unk_0BC &= ~0x80000000; + if ((arg0->unk_000 & 0x4000) != 0) { + func_800CB064(arg1); + } + } -void func_8008F8DC(void *arg0, s8 arg1) { - s32 sp18; - s32 *temp_v0; - s32 *temp_v0_2; - s32 temp_a0; - s32 temp_t7; - s32 temp_t8; - s32 temp_v1; - s8 temp_a1; - void *temp_a2; - void *phi_a2; - s8 phi_a1; - - temp_a1 = arg1; - temp_v1 = temp_a1 * 4; - temp_a2 = arg0; - phi_a2 = temp_a2; - phi_a1 = temp_a1; - if ((gCourseTimer - *(&D_8018D950 + temp_v1)) < 7) { - arg0->unkC6 = arg0->unkC6 - 2; - temp_v0 = temp_v1 + &D_8018D970; - if (arg0->unkC6 < 0x61) { - arg0->unkC6 = 0x60; - } - temp_t7 = *temp_v0 - 2; - *temp_v0 = temp_t7; - if (temp_t7 <= 0) { - *temp_v0 = 0; - return; - } - /* Duplicate return node #11. Try simplifying control flow for better match */ - return; - } - temp_a2->unkC6 = temp_a2->unkC6 + 4; - if (temp_a2->unkC6 >= 0xF0) { - temp_a2->unkC6 = 0xFF; - *(&D_8018D970 + temp_v1) = 0xFF; - temp_a2->unkBC = temp_a2->unkBC & 0x7FFFFFFF; - if ((temp_a2->unk0 & 0x4000) != 0) { - temp_a0 = temp_a1 & 0xFF; - sp18 = temp_v1; - arg1 = temp_a1; - arg0 = temp_a2; - func_800CB064(temp_a0, temp_a1, temp_a2, 0xFF); - phi_a2 = arg0; - phi_a1 = arg1; - } - } - temp_v0_2 = (temp_a1 * 4) + &D_8018D970; - temp_t8 = *temp_v0_2 + 8; - *temp_v0_2 = temp_t8; - if (temp_t8 >= 0xF0) { - *temp_v0_2 = 0xFF; - phi_a2->unkC6 = 0xFF; - phi_a2->unkBC = phi_a2->unkBC & 0x7FFFFFFF; - if ((phi_a2->unk0 & 0x4000) != 0) { - func_800CB064(phi_a1 & 0xFF, phi_a1, phi_a2, 0xFF); + D_8018D970[arg1] += 8; + if (D_8018D970[arg1] >= 0xF0) { + D_8018D970[arg1] = 0xFF; + arg0->unk_0C6 = 0xFF; + arg0->unk_0BC &= ~0x80000000; + if ((arg0->unk_000 & 0x4000) != 0) { + func_800CB064(arg1); + } } } } -#else -GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008F8DC.s") -#endif void func_8008FA38(Player* player, s8 arg1) { s16 temp_v1; @@ -1781,9 +1622,9 @@ void func_8008FA38(Player* player, s8 arg1) { player->unk_044 |= 0x200; for (temp_v1 = 0; temp_v1 < 10; ++temp_v1) { - *((s16*) &player->unk_258[28 + temp_v1 * 0x48]) = 0; - *((s16*) &player->unk_258[30 + temp_v1 * 0x48]) = 0; - *((s16*) &player->unk_258[18 + temp_v1 * 0x48]) = 0; + player->unk_258[temp_v1].unk_000[14] = 0; + player->unk_258[temp_v1].unk_000[15] = 0; + player->unk_258[temp_v1].unk_000[9] = 0; } } @@ -1799,53 +1640,28 @@ void func_8008FA38(Player* player, s8 arg1) { } } -#ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -? func_800CB064(s32, s8, void *); /* extern */ -extern ? D_8018D970; +void func_8008FB30(Player* arg0, s8 arg1) { + arg0->unk_0C6 += 8; + if (arg0->unk_0C6 >= 0xF0) { + arg0->unk_0C6 = 0xFF; + D_8018D970[arg1] = 0xFF; -void func_8008FB30(void *arg0, s8 arg1) { - s32 *temp_v0; - s32 temp_a0; - s32 temp_t9; - s8 temp_a1; - void *temp_a2; - s8 phi_a1; - void *phi_a2; - - arg0->unkC6 = arg0->unkC6 + 8; - temp_a1 = arg1; - temp_a2 = arg0; - phi_a1 = temp_a1; - phi_a2 = temp_a2; - if (arg0->unkC6 >= 0xF0) { - arg0->unkC6 = 0xFF; - *(&D_8018D970 + (arg1 * 4)) = 0xFF; - arg0->unkBC = arg0->unkBC & 0x7FFFFFFF; - if ((arg0->unk0 & 0x4000) != 0) { - temp_a0 = arg1 & 0xFF; - arg1 = arg1; - arg0 = temp_a2; - func_800CB064(temp_a0, temp_a1, temp_a2); - phi_a1 = arg1; - phi_a2 = arg0; + arg0->unk_0BC &= ~0x80000000; + if ((arg0->unk_000 & 0x4000) != 0) { + func_800CB064(arg1); } } - temp_v0 = (phi_a1 * 4) + &D_8018D970; - temp_t9 = *temp_v0 + 0x10; - *temp_v0 = temp_t9; - if (temp_t9 >= 0xE0) { - *temp_v0 = 0xFF; - phi_a2->unkC6 = 0xFF; - phi_a2->unkBC = phi_a2->unkBC & 0x7FFFFFFF; - if ((phi_a2->unk0 & 0x4000) != 0) { - func_800CB064(phi_a1 & 0xFF, phi_a1, phi_a2); + + D_8018D970[arg1] += 0x10; + if (D_8018D970[arg1] >= 0xE0) { + D_8018D970[arg1] = 0xFF; + arg0->unk_0C6 = 0xFF; + arg0->unk_0BC &= ~0x80000000; + if ((arg0->unk_000 & 0x4000) != 0) { + func_800CB064(arg1); } } } -#else -GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008FB30.s") -#endif void func_8008FC1C(Player* player) { s32 playerIndex; @@ -1887,9 +1703,9 @@ void func_8008FD4C(Player* player, UNUSED s8 arg1) { player->unk_044 |= 0x200; for (temp_v0 = 0; temp_v0 < 10; ++temp_v0) { - *((s16*) &player->unk_258[28 + temp_v0 * 0x48]) = 0; - *((s16*) &player->unk_258[30 + temp_v0 * 0x48]) = 0; - *((s16*) &player->unk_258[18 + temp_v0 * 0x48]) = 0; + player->unk_258[temp_v0].unk_000[14] = 0; + player->unk_258[temp_v0].unk_000[15] = 0; + player->unk_258[temp_v0].unk_000[9] = 0; } } @@ -1897,9 +1713,9 @@ void func_8008FDA8(Player* player, UNUSED s8 arg1) { s16 temp_v0; player->unk_044 |= 0x200; for (temp_v0 = 0; temp_v0 < 10; ++temp_v0) { - *((s16*) &player->unk_258[28 + temp_v0 * 0x48]) = 0; - *((s16*) &player->unk_258[30 + temp_v0 * 0x48]) = 0; - *((s16*) &player->unk_258[18 + temp_v0 * 0x48]) = 0; + player->unk_258[temp_v0].unk_000[14] = 0; + player->unk_258[temp_v0].unk_000[15] = 0; + player->unk_258[temp_v0].unk_000[9] = 0; } } @@ -1930,124 +1746,99 @@ void func_8008FEDC(Player* player, UNUSED s8 arg1) { player->kartHopAcceleration = 0.0f; } -#ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -extern ? D_80164438; -extern u16 D_801645C8; -extern ? D_80165320; -static s16 gCurrentCourseId; /* type too large by 2; unable to generate initializer */ +#ifdef NEEDS_RODATA +void func_8008FF08(Player *player, s8 arg1) { + s8 arg1Copy; + arg1Copy = arg1; -void func_8008FF08(void *arg0, s8 arg1) { - s16 temp_t8; - s16 temp_v0; - s16 temp_v0_2; - s16 temp_v0_3; - s16 temp_v0_4; - s16 temp_v0_5; - s16 temp_v0_6; - s16 temp_v0_7; - s16 temp_v0_8; - s32 temp_v1_3; - s32 temp_v1_4; - u16 temp_v1; - u16 temp_v1_2; - u16 temp_v1_5; + switch (gCurrentCourseId) { + case COURSE_BOWSER_CASTLE: + if ((((s16)D_80164438[arg1Copy]) >= 0x235) && (((s16)D_80164438[arg1Copy]) < 0x247)) { + player->unk_220 = 0x214U; + break; + } - temp_t8 = gCurrentCourseId; - switch (temp_t8) { - case 2: - temp_v1 = *(&D_80164438 + (arg1 * 2)); - if ((temp_v1 >= 0x235) && (temp_v1 < 0x247)) { - arg0->unk220 = 0x214; - return; + if ((((s16)D_80164438[arg1Copy]) >= 0x267) && (((s16)D_80164438[arg1Copy]) < 0x277)) { + player->unk_220 = 0x25BU; + break; } - if ((temp_v1 >= 0x267) && (temp_v1 < 0x277)) { - arg0->unk220 = 0x25B; - return; + + player->unk_220 = D_80164438[arg1Copy]; + if (player->unk_220 < 0) { + player->unk_220 = D_801645C8 + player->unk_220; + break; } - arg0->unk220 = temp_v1; - temp_v0 = arg0->unk220; - if (temp_v0 < 0) { - arg0->unk220 = D_801645C8 + temp_v0; - return; + + break; + case COURSE_BANSHEE_BOARDWALK: + if ((((s16)D_80164438[arg1Copy]) >= 0x12C) && (((s16)D_80164438[arg1Copy]) < 0x13C)) { + player->unk_220 = 0x12CU; + break; } - return; - case 3: - temp_v1_2 = *(&D_80164438 + (arg1 * 2)); - if ((temp_v1_2 >= 0x12C) && (temp_v1_2 < 0x13C)) { - arg0->unk220 = 0x12C; - return; + + player->unk_220 = D_80164438[arg1Copy]; + if (player->unk_220 < 0) { + player->unk_220 = D_801645C8 + player->unk_220; + break; } - arg0->unk220 = temp_v1_2; - temp_v0_2 = arg0->unk220; - if (temp_v0_2 < 0) { - arg0->unk220 = D_801645C8 + temp_v0_2; - return; + + break; + case COURSE_YOSHI_VALLEY: + case COURSE_RAINBOW_ROAD: + player->unk_220 = D_80165320[arg1Copy]; + break; + case COURSE_FRAPPE_SNOWLAND: + if ((((s16)D_80164438[arg1Copy]) >= 0xF0) && (((s16)D_80164438[arg1Copy]) < 0x105)) { + player->unk_220 = 0xF0U; + break; } - /* Duplicate return node #34. Try simplifying control flow for better match */ - return; - case 4: - case 13: - arg0->unk220 = *(&D_80165320 + (arg1 * 2)); - return; - case 5: - temp_v1_3 = arg1 * 2; - temp_v0_3 = *(&D_80164438 + temp_v1_3); - if ((temp_v0_3 >= 0xF0) && (temp_v0_3 < 0x105)) { - arg0->unk220 = 0xF0; - return; + + player->unk_220 = D_80165320[arg1Copy]; + if (player->unk_220 < 0) { + player->unk_220 = D_801645C8 + player->unk_220; + break; } - arg0->unk220 = *(&D_80165320 + temp_v1_3); - temp_v0_4 = arg0->unk220; - if (temp_v0_4 < 0) { - arg0->unk220 = D_801645C8 + temp_v0_4; - return; + + break; + case COURSE_ROYAL_RACEWAY: + if ((((s16)D_80164438[arg1Copy]) >= 0x258) && (((s16)D_80164438[arg1Copy]) < 0x2A4)) { + player->unk_220 = 0x258U; + break; } - /* Duplicate return node #34. Try simplifying control flow for better match */ - return; - case 7: - temp_v1_4 = arg1 * 2; - temp_v0_5 = *(&D_80164438 + temp_v1_4); - if ((temp_v0_5 >= 0x258) && (temp_v0_5 < 0x2A4)) { - arg0->unk220 = 0x258; - return; + + player->unk_220 = D_80165320[arg1Copy]; + if (player->unk_220 < 0) { + player->unk_220 = D_801645C8 + player->unk_220; + break; } - arg0->unk220 = *(&D_80165320 + temp_v1_4); - temp_v0_6 = arg0->unk220; - if (temp_v0_6 < 0) { - arg0->unk220 = D_801645C8 + temp_v0_6; - return; + + break; + case COURSE_DK_JUNGLE: + if ((((s16)D_80164438[arg1Copy]) >= 0xB9) && (((s16)D_80164438[arg1Copy]) < 0x119)) { + player->unk_220 = 0xB9U; + break; } - /* Duplicate return node #34. Try simplifying control flow for better match */ - return; - case 18: - temp_v1_5 = *(&D_80164438 + (arg1 * 2)); - if ((temp_v1_5 >= 0xB9) && (temp_v1_5 < 0x119)) { - arg0->unk220 = 0xB9; - return; + + player->unk_220 = D_80164438[arg1Copy]; + if (player->unk_220 < 0) { + player->unk_220 = D_801645C8 + player->unk_220; + break; } - arg0->unk220 = temp_v1_5; - temp_v0_7 = arg0->unk220; - if (temp_v0_7 < 0) { - arg0->unk220 = D_801645C8 + temp_v0_7; - return; - } - /* Duplicate return node #34. Try simplifying control flow for better match */ - return; - case 15: - case 16: - case 17: - case 19: - arg0->unk220 = 0; - return; + + break; + case COURSE_BLOCK_FORT: + case COURSE_SKYSCRAPER: + case COURSE_DOUBLE_DECK: + case COURSE_BIG_DONUT: + player->unk_220 = 0U; + break; default: - arg0->unk220 = *(&D_80164438 + (arg1 * 2)); - temp_v0_8 = arg0->unk220; - if (temp_v0_8 < 0) { - arg0->unk220 = D_801645C8 + temp_v0_8; + player->unk_220 = D_80164438[arg1Copy]; + if (player->unk_220 < 0) { + player->unk_220 = D_801645C8 + player->unk_220; + break; } - /* Duplicate return node #34. Try simplifying control flow for better match */ - return; + break; } } #else @@ -2239,95 +2030,66 @@ block_8: GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_80090178.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -s32 get_player_index_for_player(); /* extern */ -? func_8008C354(void *, s8); /* extern */ -? func_8008E3C0(void *, s8); /* extern */ -? func_8008F86C(void *, s8); /* extern */ +void func_80090778(Player* player) { + s32 playerIndex = get_player_index_for_player(player); -void func_80090778(void *arg0) { - s32 sp2C; - s32 sp24; - s32 temp_v0; - s32 temp_v0_2; + player->unk_078 = 0; + player->unk_07C = 0; + player->unk_0C0 = 0; + player->unk_0CA |= 8; + player->unk_0BC &= ~0x10; + player->unk_222 = 0; + player->unk_08C = 0.0f; - temp_v0 = get_player_index_for_player(); - sp2C = temp_v0; - arg0->unk78 = 0; - arg0->unk7C = 0; - arg0->unkC0 = 0; - arg0->unkCA = arg0->unkCA | 8; - arg0->unkBC = arg0->unkBC & ~0x10; - arg0->unk222 = 0; - arg0->unk8C = 0.0f; - func_8008C354(arg0, temp_v0); - sp24 = unksp2F; - func_8008F86C(arg0, unksp2F); - temp_v0_2 = arg0->unkBC; - arg0->unkDB4 = 0; - arg0->unkC2 = 0; - arg0->unkDBC = 0.0f; - if ((temp_v0_2 & 0x40000000) == 0x40000000) { - if ((temp_v0_2 & 0x20000) == 0x20000) { - arg0->unkBC = temp_v0_2 & 0xFFFDFFFF; - arg0->unkA8 = 0; - arg0->unk7C = 0; - arg0->unkC0 = 0; - arg0->unk2E = arg0->unkAE; + func_8008C354(player, playerIndex); + func_8008F86C(player, playerIndex); + + player->unk_DB4 = 0; + player->unk_0C2 = 0; + player->unk_DBC = 0.0f; + if ((player->unk_0BC & 0x40000000) == 0x40000000) { + if ((player->unk_0BC & 0x20000) == 0x20000) { + player->unk_0BC &= ~0x20000; + player->unk_0A8 = 0; + player->unk_07C = 0; + player->unk_0C0 = 0; + player->unk_02E = player->unk_0AE; } - func_8008E3C0(arg0, unksp2F); + func_8008E3C0(player, playerIndex); } - arg0->unkBC = arg0->unkBC & ~0x20; + player->unk_0BC &= ~0x20; } -#else -GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_80090778.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -s8 get_player_index_for_player(); /* extern */ -? func_8008FF08(void *, s8); /* extern */ -static s16 gCurrentCourseId; /* type too large by 2; unable to generate initializer */ +void func_80090868(Player* player) { + s32 playerIndex; -void func_80090868(void *arg0) { - s16 temp_v0; - s16 temp_v0_2; - s8 temp_a1; - void *temp_a0; + player->unk_078 = 0; + player->unk_07C = 0; + player->unk_0C0 = 0; + player->unk_08C = 0.0f; + playerIndex = get_player_index_for_player(player); - arg0->unk78 = 0; - arg0->unk7C = 0; - arg0->unkC0 = 0; - arg0->unk8C = 0.0f; - temp_a0 = arg0; - temp_a1 = get_player_index_for_player(); - if ((temp_a0->unkCA & 2) != 2) { - temp_a0->unkD98 = 1; - temp_a0->unkD9C = 0.0f; - temp_a0->unkDA0 = 0.5f; - arg0 = temp_a0; - func_8008FF08(temp_a0, temp_a1); - arg0->unk222 = 0; - arg0->unkCA = arg0->unkCA | 2; - arg0->unkC8 = 0; - if ((arg0->unkDE & 1) == 1) { - temp_v0 = gCurrentCourseId; - if ((temp_v0 == 2) || (temp_v0 == 0x13)) { - arg0->unkCA = arg0->unkCA | 0x1000; + if ((player->unk_0CA & 2) != 2) { + player->unk_D98 = 1; + player->unk_D9C = 0.0f; + player->unk_DA0 = 0.5f; + func_8008FF08(player, playerIndex); + player->unk_222 = 0; + player->unk_0CA |= 2; + player->unk_0C8 = 0; + if ((player->unk_0DE & 1) == 1) { + if ((gCurrentCourseId == COURSE_BOWSER_CASTLE) || (gCurrentCourseId == COURSE_BIG_DONUT)) { + player->unk_0CA |= 0x1000; } else { - arg0->unkCA = arg0->unkCA | 0x2000; + player->unk_0CA |= 0x2000; } - temp_v0_2 = gCurrentCourseId; - if ((temp_v0_2 == 0xC) || (temp_v0_2 == 0x10) || (temp_v0_2 == 0xD)) { - arg0->unkCA = arg0->unkCA & 0xCFFF; + + if ((gCurrentCourseId == COURSE_SHERBET_LAND) || (gCurrentCourseId == COURSE_SKYSCRAPER) || (gCurrentCourseId == COURSE_RAINBOW_ROAD)) { + player->unk_0CA &= ~0x3000; } } } } -#else -GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_80090868.s") -#endif // Note that D_80004334 is a fake pointer. // Should put this func through mips to C prior to decomp. @@ -2552,101 +2314,80 @@ block_41: GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_80090970.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -? func_800910E4(void *arg0) { - s16 temp_t1; - s16 temp_v1; - u16 temp_v1_2; +#if NEEDS_RODATA +s32 func_800910E4(Player *arg0) { s32 phi_v0; - s32 phi_v0_2; - - temp_v1 = arg0->unkCA; phi_v0 = 0; - phi_v0_2 = 0; - if (((temp_v1 & 2) == 2) || ((temp_v1 & 8) == 8) || (temp_v1_2 = arg0->unk0, ((temp_v1_2 & 0x40) != 0)) || ((temp_v1_2 & 0x800) != 0) || ((temp_v1_2 & 0x8000) == 0)) { + if ((((((arg0->unk_0CA & 2) == 2) || ((arg0->unk_0CA & 8) == 8)) || ((arg0->unk_000 & 0x40) != 0)) || ((arg0->unk_000 & 0x800) != 0)) || ((arg0->unk_000 & 0x8000) == 0)) { return 1; } - temp_t1 = arg0->unk10; - switch (temp_t1) { + + switch (arg0->unk_010) { case 12: case 13: case 14: case 15: - if ((arg0->unkBC & 8) != 0) { + if ((arg0->unk_0BC & 8) != 0) { return 1; } phi_v0 = 0x5F934EC4; + goto func_800910E4_label; + case 10: + phi_v0 = 0xDF934EC4; + case 11: + phi_v0 = phi_v0 | 0xDF934EC4; +func_800910E4_label: default: -block_13: - if ((arg0->unkBC & phi_v0) != 0) { + if ((arg0->unk_0BC & phi_v0) != 0) { return 1; } return 0; - case 10: - phi_v0_2 = 0xDF934EC4; - /* fallthrough */ - case 11: - phi_v0 = phi_v0_2 | 0xDF934EC4; - goto block_13; } } #else GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_800910E4.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -extern ? D_8018D920; - -void func_800911B4(void *arg0, s8 arg1) { +void func_800911B4(Player* player, s8 arg1) { s32 temp_v0; - void *temp_v1; - void *phi_v1; - s32 phi_v0; - arg0->unk44 = arg0->unk44 | 0x1800; - arg0->unkAE = arg0->unk2E; - arg0->unk44 = arg0->unk44 & 0xFBFF; - arg0->unk44 = arg0->unk44 | 0x2000; - arg0->unkF4 = 0.0f; - arg0->unkF0 = 0.002f; - arg0->unkB2 = 2; - arg0->unkC0 = 0; - arg0->unk7C = 0; - arg0->unk78 = 0; - arg0->unkEC = 2.6f; - *(&D_8018D920 + (arg1 * 2)) = 0; - arg0->unkB22 = 0; - arg0->unkB2E = 0; - arg0->unkB2C = 0; - arg0->unkADA = 0; - arg0->unkAE6 = 0; - arg0->unkAE4 = 0; - phi_v1 = arg0 + 0x90; - phi_v0 = 2; - do { - temp_v0 = phi_v0 + 4; - phi_v1->unkB2C = 0; - phi_v1->unkB2E = 0; - phi_v1->unkB22 = 0; - phi_v1->unkB74 = 0; - phi_v1->unkB76 = 0; - phi_v1->unkB6A = 0; - phi_v1->unkBBC = 0; - phi_v1->unkBBE = 0; - phi_v1->unkBB2 = 0; - temp_v1 = phi_v1 + 0x120; - temp_v1->unk9C4 = 0; - temp_v1->unk9C6 = 0; - temp_v1->unk9BA = 0; - phi_v1 = temp_v1; - phi_v0 = temp_v0; - } while (temp_v0 != 0xA); + player->unk_0AE = player->unk_02E; + player->unk_044 |= 0x1800; + player->unk_044 &= ~0x0400; + player->unk_044 |= 0x2000; + player->kartHopJerk = D_800EF678; + player->kartHopAcceleration = 0.0f; + player->kartHopVelocity = D_800EF67C; + player->unk_0B2 = 2; + player->unk_0C0 = 0; + player->unk_07C = 0; + player->unk_078 = 0; + D_8018D920[arg1] = 0; + + player->unk_258[31].unk_000[9] = 0; + player->unk_258[31].unk_000[15] = 0; + player->unk_258[31].unk_000[14] = 0; + player->unk_258[30].unk_000[9] = 0; + player->unk_258[30].unk_000[15] = 0; + player->unk_258[30].unk_000[14] = 0; + + temp_v0 = 2; do { + player->unk_258[31 + temp_v0].unk_000[14] = 0; + player->unk_258[31 + temp_v0].unk_000[15] = 0; + player->unk_258[31 + temp_v0].unk_000[9] = 0; + player->unk_258[32 + temp_v0].unk_000[14] = 0; + player->unk_258[32 + temp_v0].unk_000[15] = 0; + player->unk_258[32 + temp_v0].unk_000[9] = 0; + player->unk_258[33 + temp_v0].unk_000[14] = 0; + player->unk_258[33 + temp_v0].unk_000[15] = 0; + player->unk_258[33 + temp_v0].unk_000[9] = 0; + + temp_v0 += 4; + player->unk_258[26 + temp_v0].unk_000[14] = 0; + player->unk_258[26 + temp_v0].unk_000[15] = 0; + player->unk_258[26 + temp_v0].unk_000[9] = 0; + } while (temp_v0 < 10); } -#else -GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_800911B4.s") -#endif #ifdef MIPS_TO_C //generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 @@ -2711,47 +2452,19 @@ void func_80091298(void *arg0, s8 arg1) { GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_80091298.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -extern ? gPlayers; - void func_80091440(s8 arg0) { - s16 temp_v1; - void *temp_v0; - - temp_v0 = (arg0 * 0xDD8) + &gPlayers; - temp_v1 = temp_v0->unk44; - if ((temp_v1 & 0x800) == 0) { - temp_v0->unk44 = temp_v1 | 0x2400; - temp_v0->unk0 = temp_v0->unk0 & 0xDFFF; + if ((gPlayers[arg0].unk_044 & 0x800) == 0) { + gPlayers[arg0].unk_044 |= 0x2400; + gPlayers[arg0].unk_000 &= ~0x2000; } } -#else -GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_80091440.s") -#endif - -#ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -extern void *gPlayerOneCopy; -extern s16 D_80152308; -extern u16 D_8015F6F8; void func_800914A0(void) { - s16 temp_t8; - s32 temp_v1; - u16 temp_v0; - - temp_t8 = gPlayerOneCopy->unk6 + 7; - D_80152308 = temp_t8; - temp_v0 = D_8015F6F8; - temp_v1 = temp_t8 & 0xFFFF; - if (temp_v0 < temp_v1) { - D_80152308 = temp_v1 - temp_v0; + D_80152308 = gPlayerOneCopy->unk_006 + 7; + if ((s32) D_8015F6F8 < D_80152308) { + D_80152308 -= D_8015F6F8; } } -#else -GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_800914A0.s") -#endif #ifdef MIPS_TO_C //generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 diff --git a/src/code_8008C1D0.h b/src/code_8008C1D0.h index f1e6a0aa1..1731503d9 100644 --- a/src/code_8008C1D0.h +++ b/src/code_8008C1D0.h @@ -10,6 +10,7 @@ void func_8008C354(Player*, s8); void func_8008C528(Player*, s8); void func_8008C62C(Player*, s8); void func_8008C6D0(Player*, s8); +void func_8008C73C(Player*, s8); void func_8008D0E4(Player*, s8); void func_8008D3B0(Player*, s8); void func_8008D554(Player*); @@ -24,8 +25,10 @@ void func_8008F5A4(Player*, s8); void func_8008F86C(Player*, s8); void func_8008FDA8(Player*, s8); void func_8008FEDC(Player*, s8); +void func_8008FF08(Player*, s8); void func_8008C8C4(Player*, s8); void func_8008C6D0(Player*, s8); +void func_8008D9C0(Player*); void func_80090778(Player*); void func_80090868(Player*); void func_800098FC(u32, Player*); @@ -37,18 +40,20 @@ void func_800569F4(s32); void func_80056A40(s32, s32); void func_80056A94(s32, Player*); // code_80057C60 -void func_8006B8B4(Player*, s8); +void func_8006B8B4(Player*, s8); // code_80027D00.c s32 func_80031F48(Player*, float); // audio/external.c -void func_800C90F4(s32, s32); -void func_800C9060(); -void func_800C9250(s32); +void func_800C90F4(u8, s32); +void func_800C9060(u8, s32); +void func_800C9250(u8); +void func_800CA24C(u8); void func_800CA59C(u8); void func_800CA730(u8); -void func_800CA984(s32); +void func_800CA984(u8); void func_800CAACC(u8); void func_800CAFC0(u8); +void func_800CB064(u8); /* This is where I'd put my static data, if I had any */ @@ -63,10 +68,21 @@ extern f32 D_800E37D0[]; extern f32 D_800E37F0[]; extern f32 D_800EF568; extern f32 D_800EF56C; +extern f64 D_800EF570; +extern f32 D_800EF578; +extern f64 D_800EF580; extern f64 D_800EF588; extern f64 D_800EF5A0; +extern f64 D_800EF5A8; +extern f32 D_800EF678; +extern f32 D_800EF67C; +extern u16 D_80152308; +extern u16 D_8015F6F8; +extern u16 D_80164438[]; +extern u16 D_801645C8; extern s16 D_80165190[4][8]; extern f32 D_80165280[]; +extern s16 D_80165320[]; extern s32 D_80165420[]; extern s32 D_80165440[]; extern s32 D_80165460[]; @@ -76,6 +92,6 @@ extern s16 D_8018D920[]; extern s32 D_8018D930[]; extern s32 D_8018D950[]; extern s32 D_8018D970[]; - +extern s32 D_8018D990[]; #endif