diff --git a/asm/non_matchings/code_80027D00/control_cpu_movement.s b/asm/non_matchings/code_80027D00/control_cpu_movement.s deleted file mode 100644 index 3ead001b4..000000000 --- a/asm/non_matchings/code_80027D00/control_cpu_movement.s +++ /dev/null @@ -1,271 +0,0 @@ -.section .data - -glabel D_800E3D98 -.float 0.0, 0.0, 1.0 - -glabel D_800E3DA4 -.float 0.0, 0.0, 0.0 - -glabel D_800E3DB0 -.float 0.0, 0.0, 0.0 - -glabel D_800E3DBC -.float 0.0, 0.0, 0.0 - -.section .late_rodata - -glabel D_800ED898 -.double 0.12 - -glabel D_800ED8A0 -.double 6000.0 - -.section .text - -glabel control_cpu_movement -/* 02FF5C 8002F35C 27BDFF00 */ addiu $sp, $sp, -0x100 -/* 02FF60 8002F360 3C18800E */ lui $t8, %hi(D_800E3D98) # $t8, 0x800e -/* 02FF64 8002F364 AFBF002C */ sw $ra, 0x2c($sp) -/* 02FF68 8002F368 AFB10028 */ sw $s1, 0x28($sp) -/* 02FF6C 8002F36C AFB00024 */ sw $s0, 0x24($sp) -/* 02FF70 8002F370 F7B40018 */ sdc1 $f20, 0x18($sp) -/* 02FF74 8002F374 AFA50104 */ sw $a1, 0x104($sp) -/* 02FF78 8002F378 AFA60108 */ sw $a2, 0x108($sp) -/* 02FF7C 8002F37C AFA7010C */ sw $a3, 0x10c($sp) -/* 02FF80 8002F380 27183D98 */ addiu $t8, %lo(D_800E3D98) # addiu $t8, $t8, 0x3d98 -/* 02FF84 8002F384 8F010000 */ lw $at, ($t8) -/* 02FF88 8002F388 27AF00F4 */ addiu $t7, $sp, 0xf4 -/* 02FF8C 8002F38C 8F090004 */ lw $t1, 4($t8) -/* 02FF90 8002F390 ADE10000 */ sw $at, ($t7) -/* 02FF94 8002F394 8F010008 */ lw $at, 8($t8) -/* 02FF98 8002F398 3C0B800E */ lui $t3, %hi(D_800E3DA4) # $t3, 0x800e -/* 02FF9C 8002F39C 256B3DA4 */ addiu $t3, %lo(D_800E3DA4) # addiu $t3, $t3, 0x3da4 -/* 02FFA0 8002F3A0 ADE90004 */ sw $t1, 4($t7) -/* 02FFA4 8002F3A4 ADE10008 */ sw $at, 8($t7) -/* 02FFA8 8002F3A8 8D610000 */ lw $at, ($t3) -/* 02FFAC 8002F3AC 00078E00 */ sll $s1, $a3, 0x18 -/* 02FFB0 8002F3B0 00117603 */ sra $t6, $s1, 0x18 -/* 02FFB4 8002F3B4 27AA00E8 */ addiu $t2, $sp, 0xe8 -/* 02FFB8 8002F3B8 01C08825 */ move $s1, $t6 -/* 02FFBC 8002F3BC AD410000 */ sw $at, ($t2) -/* 02FFC0 8002F3C0 8D610008 */ lw $at, 8($t3) -/* 02FFC4 8002F3C4 8D6E0004 */ lw $t6, 4($t3) -/* 02FFC8 8002F3C8 3C19800E */ lui $t9, %hi(D_800E3DB0) # $t9, 0x800e -/* 02FFCC 8002F3CC 27393DB0 */ addiu $t9, %lo(D_800E3DB0) # addiu $t9, $t9, 0x3db0 -/* 02FFD0 8002F3D0 AD410008 */ sw $at, 8($t2) -/* 02FFD4 8002F3D4 AD4E0004 */ sw $t6, 4($t2) -/* 02FFD8 8002F3D8 8F210000 */ lw $at, ($t9) -/* 02FFDC 8002F3DC 27A800DC */ addiu $t0, $sp, 0xdc -/* 02FFE0 8002F3E0 8F290004 */ lw $t1, 4($t9) -/* 02FFE4 8002F3E4 AD010000 */ sw $at, ($t0) -/* 02FFE8 8002F3E8 8F210008 */ lw $at, 8($t9) -/* 02FFEC 8002F3EC 3C0C800E */ lui $t4, %hi(D_800E3DBC) # $t4, 0x800e -/* 02FFF0 8002F3F0 258C3DBC */ addiu $t4, %lo(D_800E3DBC) # addiu $t4, $t4, 0x3dbc -/* 02FFF4 8002F3F4 AD090004 */ sw $t1, 4($t0) -/* 02FFF8 8002F3F8 AD010008 */ sw $at, 8($t0) -/* 02FFFC 8002F3FC 8D810000 */ lw $at, ($t4) -/* 030000 8002F400 27AD00D0 */ addiu $t5, $sp, 0xd0 -/* 030004 8002F404 8D8E0004 */ lw $t6, 4($t4) -/* 030008 8002F408 ADA10000 */ sw $at, ($t5) -/* 03000C 8002F40C 8D810008 */ lw $at, 8($t4) -/* 030010 8002F410 ADAE0004 */ sw $t6, 4($t5) -/* 030014 8002F414 00114880 */ sll $t1, $s1, 2 -/* 030018 8002F418 ADA10008 */ sw $at, 8($t5) -/* 03001C 8002F41C 8C9800BC */ lw $t8, 0xbc($a0) -/* 030020 8002F420 84880044 */ lh $t0, 0x44($a0) -/* 030024 8002F424 3C018016 */ lui $at, %hi(D_80164510) -/* 030028 8002F428 370F1000 */ ori $t7, $t8, 0x1000 -/* 03002C 8002F42C 35190010 */ ori $t9, $t0, 0x10 -/* 030030 8002F430 AC8F00BC */ sw $t7, 0xbc($a0) -/* 030034 8002F434 A4990044 */ sh $t9, 0x44($a0) -/* 030038 8002F438 00290821 */ addu $at, $at, $t1 -/* 03003C 8002F43C C4244510 */ lwc1 $f4, %lo(D_80164510)($at) -/* 030040 8002F440 2401FFEF */ li $at, -17 -/* 030044 8002F444 00112E00 */ sll $a1, $s1, 0x18 -/* 030048 8002F448 E7A40040 */ swc1 $f4, 0x40($sp) -/* 03004C 8002F44C 8C8B00BC */ lw $t3, 0xbc($a0) -/* 030050 8002F450 A4800204 */ sh $zero, 0x204($a0) -/* 030054 8002F454 00056E03 */ sra $t5, $a1, 0x18 -/* 030058 8002F458 01615024 */ and $t2, $t3, $at -/* 03005C 8002F45C AC8A00BC */ sw $t2, 0xbc($a0) -/* 030060 8002F460 00808025 */ move $s0, $a0 -/* 030064 8002F464 83A6010B */ lb $a2, 0x10b($sp) -/* 030068 8002F468 0C00AE0C */ jal func_8002B830 -/* 03006C 8002F46C 01A02825 */ move $a1, $t5 -/* 030070 8002F470 00112E00 */ sll $a1, $s1, 0x18 -/* 030074 8002F474 00056603 */ sra $t4, $a1, 0x18 -/* 030078 8002F478 01802825 */ move $a1, $t4 -/* 03007C 8002F47C 02002025 */ move $a0, $s0 -/* 030080 8002F480 0C00B352 */ jal func_8002CD48 -/* 030084 8002F484 83A6010B */ lb $a2, 0x10b($sp) -/* 030088 8002F488 4480A000 */ mtc1 $zero, $f20 -/* 03008C 8002F48C C6080064 */ lwc1 $f8, 0x64($s0) -/* 030090 8002F490 C7A600DC */ lwc1 $f6, 0xdc($sp) -/* 030094 8002F494 3C01FFFF */ lui $at, (0xFFFF7FFF >> 16) # lui $at, 0xffff -/* 030098 8002F498 4608A282 */ mul.s $f10, $f20, $f8 -/* 03009C 8002F49C C7A800E4 */ lwc1 $f8, 0xe4($sp) -/* 0300A0 8002F4A0 34217FFF */ ori $at, (0xFFFF7FFF & 0xFFFF) # ori $at, $at, 0x7fff -/* 0300A4 8002F4A4 00112E00 */ sll $a1, $s1, 0x18 -/* 0300A8 8002F4A8 00057E03 */ sra $t7, $a1, 0x18 -/* 0300AC 8002F4AC 01E02825 */ move $a1, $t7 -/* 0300B0 8002F4B0 02002025 */ move $a0, $s0 -/* 0300B4 8002F4B4 460A3100 */ add.s $f4, $f6, $f10 -/* 0300B8 8002F4B8 E7A40084 */ swc1 $f4, 0x84($sp) -/* 0300BC 8002F4BC C606006C */ lwc1 $f6, 0x6c($s0) -/* 0300C0 8002F4C0 4606A282 */ mul.s $f10, $f20, $f6 -/* 0300C4 8002F4C4 460A4100 */ add.s $f4, $f8, $f10 -/* 0300C8 8002F4C8 E7A4007C */ swc1 $f4, 0x7c($sp) -/* 0300CC 8002F4CC 8E0E00BC */ lw $t6, 0xbc($s0) -/* 0300D0 8002F4D0 A600010C */ sh $zero, 0x10c($s0) -/* 0300D4 8002F4D4 A6000256 */ sh $zero, 0x256($s0) -/* 0300D8 8002F4D8 01C1C024 */ and $t8, $t6, $at -/* 0300DC 8002F4DC 0C00C054 */ jal func_80030150 -/* 0300E0 8002F4E0 AE1800BC */ sw $t8, 0xbc($s0) -/* 0300E4 8002F4E4 26050174 */ addiu $a1, $s0, 0x174 -/* 0300E8 8002F4E8 E7A000FC */ swc1 $f0, 0xfc($sp) -/* 0300EC 8002F4EC AFA5003C */ sw $a1, 0x3c($sp) -/* 0300F0 8002F4F0 0C0AD8EE */ jal func_802B63B8 -/* 0300F4 8002F4F4 27A400F4 */ addiu $a0, $sp, 0xf4 -/* 0300F8 8002F4F8 C6060034 */ lwc1 $f6, 0x34($s0) -/* 0300FC 8002F4FC E7B4006C */ swc1 $f20, 0x6c($sp) -/* 030100 8002F500 C7A400F4 */ lwc1 $f4, 0xf4($sp) -/* 030104 8002F504 E7A60068 */ swc1 $f6, 0x68($sp) -/* 030108 8002F508 C608003C */ lwc1 $f8, 0x3c($s0) -/* 03010C 8002F50C C7AA0068 */ lwc1 $f10, 0x68($sp) -/* 030110 8002F510 C7A60084 */ lwc1 $f6, 0x84($sp) -/* 030114 8002F514 E7A80070 */ swc1 $f8, 0x70($sp) -/* 030118 8002F518 46005021 */ cvt.d.s $f0, $f10 -/* 03011C 8002F51C 46062200 */ add.s $f8, $f4, $f6 -/* 030120 8002F520 C7AA00D0 */ lwc1 $f10, 0xd0($sp) -/* 030124 8002F524 3C01800F */ lui $at, %hi(D_800ED898) -/* 030128 8002F528 D430D898 */ ldc1 $f16, %lo(D_800ED898)($at) -/* 03012C 8002F52C 460A4100 */ add.s $f4, $f8, $f10 -/* 030130 8002F530 C60800FC */ lwc1 $f8, 0xfc($s0) -/* 030134 8002F534 3C01800F */ lui $at, %hi(D_800ED8A0) -/* 030138 8002F538 D432D8A0 */ ldc1 $f18, %lo(D_800ED8A0)($at) -/* 03013C 8002F53C 460042A1 */ cvt.d.s $f10, $f8 -/* 030140 8002F540 460021A1 */ cvt.d.s $f6, $f4 -/* 030144 8002F544 462A8102 */ mul.d $f4, $f16, $f10 -/* 030148 8002F548 00000000 */ nop -/* 03014C 8002F54C 46240202 */ mul.d $f8, $f0, $f4 -/* 030150 8002F550 46283281 */ sub.d $f10, $f6, $f8 -/* 030154 8002F554 46325103 */ div.d $f4, $f10, $f18 -/* 030158 8002F558 C7AA0070 */ lwc1 $f10, 0x70($sp) -/* 03015C 8002F55C 460050A1 */ cvt.d.s $f2, $f10 -/* 030160 8002F560 C7AA00D8 */ lwc1 $f10, 0xd8($sp) -/* 030164 8002F564 46240180 */ add.d $f6, $f0, $f4 -/* 030168 8002F568 C7A400FC */ lwc1 $f4, 0xfc($sp) -/* 03016C 8002F56C 46203220 */ cvt.s.d $f8, $f6 -/* 030170 8002F570 C7A6007C */ lwc1 $f6, 0x7c($sp) -/* 030174 8002F574 E7A80068 */ swc1 $f8, 0x68($sp) -/* 030178 8002F578 46062200 */ add.s $f8, $f4, $f6 -/* 03017C 8002F57C 460A4100 */ add.s $f4, $f8, $f10 -/* 030180 8002F580 C60800FC */ lwc1 $f8, 0xfc($s0) -/* 030184 8002F584 460042A1 */ cvt.d.s $f10, $f8 -/* 030188 8002F588 460021A1 */ cvt.d.s $f6, $f4 -/* 03018C 8002F58C 462A8102 */ mul.d $f4, $f16, $f10 -/* 030190 8002F590 00000000 */ nop -/* 030194 8002F594 46241202 */ mul.d $f8, $f2, $f4 -/* 030198 8002F598 46283281 */ sub.d $f10, $f6, $f8 -/* 03019C 8002F59C 46325103 */ div.d $f4, $f10, $f18 -/* 0301A0 8002F5A0 46241180 */ add.d $f6, $f2, $f4 -/* 0301A4 8002F5A4 46203220 */ cvt.s.d $f8, $f6 -/* 0301A8 8002F5A8 E7A80070 */ swc1 $f8, 0x70($sp) -/* 0301AC 8002F5AC C60C0014 */ lwc1 $f12, 0x14($s0) -/* 0301B0 8002F5B0 C6040034 */ lwc1 $f4, 0x34($s0) -/* 0301B4 8002F5B4 C60E001C */ lwc1 $f14, 0x1c($s0) -/* 0301B8 8002F5B8 E60C0020 */ swc1 $f12, 0x20($s0) -/* 0301BC 8002F5BC 460C2180 */ add.s $f6, $f4, $f12 -/* 0301C0 8002F5C0 C7AA0040 */ lwc1 $f10, 0x40($sp) -/* 0301C4 8002F5C4 E60E0028 */ swc1 $f14, 0x28($s0) -/* 0301C8 8002F5C8 E60A0024 */ swc1 $f10, 0x24($s0) -/* 0301CC 8002F5CC E7A600CC */ swc1 $f6, 0xcc($sp) -/* 0301D0 8002F5D0 C608003C */ lwc1 $f8, 0x3c($s0) -/* 0301D4 8002F5D4 460E4280 */ add.s $f10, $f8, $f14 -/* 0301D8 8002F5D8 E7AA00C4 */ swc1 $f10, 0xc4($sp) -/* 0301DC 8002F5DC 8608002E */ lh $t0, 0x2e($s0) -/* 0301E0 8002F5E0 A60000C0 */ sh $zero, 0xc0($s0) -/* 0301E4 8002F5E4 E61400F0 */ swc1 $f20, 0xf0($s0) -/* 0301E8 8002F5E8 E61400F4 */ swc1 $f20, 0xf4($s0) -/* 0301EC 8002F5EC E61400EC */ swc1 $f20, 0xec($s0) -/* 0301F0 8002F5F0 8E070060 */ lw $a3, 0x60($s0) -/* 0301F4 8002F5F4 8E06005C */ lw $a2, 0x5c($s0) -/* 0301F8 8002F5F8 8E050058 */ lw $a1, 0x58($s0) -/* 0301FC 8002F5FC 8FA4003C */ lw $a0, 0x3c($sp) -/* 030200 8002F600 0C0AD950 */ jal func_802B6540 -/* 030204 8002F604 AFA80010 */ sw $t0, 0x10($sp) -/* 030208 8002F608 8E1900BC */ lw $t9, 0xbc($s0) -/* 03020C 8002F60C 2401FFFD */ li $at, -3 -/* 030210 8002F610 A60000C2 */ sh $zero, 0xc2($s0) -/* 030214 8002F614 03214824 */ and $t1, $t9, $at -/* 030218 8002F618 2401FFF7 */ li $at, -9 -/* 03021C 8002F61C AE0900BC */ sw $t1, 0xbc($s0) -/* 030220 8002F620 01215024 */ and $t2, $t1, $at -/* 030224 8002F624 AE0A00BC */ sw $t2, 0xbc($s0) -/* 030228 8002F628 A60000C4 */ sh $zero, 0xc4($s0) -/* 03022C 8002F62C A6000206 */ sh $zero, 0x206($s0) -/* 030230 8002F630 C7A40070 */ lwc1 $f4, 0x70($sp) -/* 030234 8002F634 C7A80068 */ lwc1 $f8, 0x68($sp) -/* 030238 8002F638 46042182 */ mul.s $f6, $f4, $f4 -/* 03023C 8002F63C C6040094 */ lwc1 $f4, 0x94($s0) -/* 030240 8002F640 46084282 */ mul.s $f10, $f8, $f8 -/* 030244 8002F644 E604022C */ swc1 $f4, 0x22c($s0) -/* 030248 8002F648 0C033850 */ jal sqrtf -/* 03024C 8002F64C 460A3300 */ add.s $f12, $f6, $f10 -/* 030250 8002F650 E6000094 */ swc1 $f0, 0x94($s0) -/* 030254 8002F654 C7A800CC */ lwc1 $f8, 0xcc($sp) -/* 030258 8002F658 00116880 */ sll $t5, $s1, 2 -/* 03025C 8002F65C 01B16823 */ subu $t5, $t5, $s1 -/* 030260 8002F660 E6080014 */ swc1 $f8, 0x14($s0) -/* 030264 8002F664 C7A600C4 */ lwc1 $f6, 0xc4($sp) -/* 030268 8002F668 3C0C8016 */ lui $t4, %hi(D_80165070) # $t4, 0x8016 -/* 03026C 8002F66C 258C5070 */ addiu $t4, %lo(D_80165070) # addiu $t4, $t4, 0x5070 -/* 030270 8002F670 E606001C */ swc1 $f6, 0x1c($s0) -/* 030274 8002F674 C7AA0040 */ lwc1 $f10, 0x40($sp) -/* 030278 8002F678 E6140064 */ swc1 $f20, 0x64($s0) -/* 03027C 8002F67C E614006C */ swc1 $f20, 0x6c($s0) -/* 030280 8002F680 E60A0018 */ swc1 $f10, 0x18($s0) -/* 030284 8002F684 C7A40068 */ lwc1 $f4, 0x68($sp) -/* 030288 8002F688 000D6880 */ sll $t5, $t5, 2 -/* 03028C 8002F68C 01AC1021 */ addu $v0, $t5, $t4 -/* 030290 8002F690 E6040034 */ swc1 $f4, 0x34($s0) -/* 030294 8002F694 C7A8006C */ lwc1 $f8, 0x6c($sp) -/* 030298 8002F698 3C0F800E */ lui $t7, %hi(gKartTopSpeedTable) # $t7, 0x800e -/* 03029C 8002F69C 25EF2690 */ addiu $t7, %lo(gKartTopSpeedTable) # addiu $t7, $t7, 0x2690 -/* 0302A0 8002F6A0 E6080038 */ swc1 $f8, 0x38($s0) -/* 0302A4 8002F6A4 C7A60070 */ lwc1 $f6, 0x70($sp) -/* 0302A8 8002F6A8 E606003C */ swc1 $f6, 0x3c($s0) -/* 0302AC 8002F6AC C7AA0068 */ lwc1 $f10, 0x68($sp) -/* 0302B0 8002F6B0 C7A4006C */ lwc1 $f4, 0x6c($sp) -/* 0302B4 8002F6B4 C7A80070 */ lwc1 $f8, 0x70($sp) -/* 0302B8 8002F6B8 E44A0000 */ swc1 $f10, ($v0) -/* 0302BC 8002F6BC E4440004 */ swc1 $f4, 4($v0) -/* 0302C0 8002F6C0 E4480008 */ swc1 $f8, 8($v0) -/* 0302C4 8002F6C4 960E0254 */ lhu $t6, 0x254($s0) -/* 0302C8 8002F6C8 C6020094 */ lwc1 $f2, 0x94($s0) -/* 0302CC 8002F6CC 000EC080 */ sll $t8, $t6, 2 -/* 0302D0 8002F6D0 030F1821 */ addu $v1, $t8, $t7 -/* 0302D4 8002F6D4 C46C0000 */ lwc1 $f12, ($v1) -/* 0302D8 8002F6D8 4602603C */ c.lt.s $f12, $f2 -/* 0302DC 8002F6DC 00000000 */ nop -/* 0302E0 8002F6E0 4502000E */ bc1fl .L8002F71C -/* 0302E4 8002F6E4 8FBF002C */ lw $ra, 0x2c($sp) -/* 0302E8 8002F6E8 46026003 */ div.s $f0, $f12, $f2 -/* 0302EC 8002F6EC C6060034 */ lwc1 $f6, 0x34($s0) -/* 0302F0 8002F6F0 C6040038 */ lwc1 $f4, 0x38($s0) -/* 0302F4 8002F6F4 46003282 */ mul.s $f10, $f6, $f0 -/* 0302F8 8002F6F8 C606003C */ lwc1 $f6, 0x3c($s0) -/* 0302FC 8002F6FC 46002202 */ mul.s $f8, $f4, $f0 -/* 030300 8002F700 E60A0034 */ swc1 $f10, 0x34($s0) -/* 030304 8002F704 46003282 */ mul.s $f10, $f6, $f0 -/* 030308 8002F708 E6080038 */ swc1 $f8, 0x38($s0) -/* 03030C 8002F70C E60A003C */ swc1 $f10, 0x3c($s0) -/* 030310 8002F710 C4640000 */ lwc1 $f4, ($v1) -/* 030314 8002F714 E6040094 */ swc1 $f4, 0x94($s0) -/* 030318 8002F718 8FBF002C */ lw $ra, 0x2c($sp) -.L8002F71C: -/* 03031C 8002F71C D7B40018 */ ldc1 $f20, 0x18($sp) -/* 030320 8002F720 8FB00024 */ lw $s0, 0x24($sp) -/* 030324 8002F724 8FB10028 */ lw $s1, 0x28($sp) -/* 030328 8002F728 03E00008 */ jr $ra -/* 03032C 8002F72C 27BD0100 */ addiu $sp, $sp, 0x100 diff --git a/asm/non_matchings/code_80027D00/func_8002A194.s b/asm/non_matchings/code_80027D00/func_8002A194.s deleted file mode 100644 index 6a98036bf..000000000 --- a/asm/non_matchings/code_80027D00/func_8002A194.s +++ /dev/null @@ -1,293 +0,0 @@ -glabel func_8002A194 -/* 02AD94 8002A194 27BDFFB0 */ addiu $sp, $sp, -0x50 -/* 02AD98 8002A198 AFBF0024 */ sw $ra, 0x24($sp) -/* 02AD9C 8002A19C AFB00020 */ sw $s0, 0x20($sp) -/* 02ADA0 8002A1A0 F7B40018 */ sdc1 $f20, 0x18($sp) -/* 02ADA4 8002A1A4 AFA50054 */ sw $a1, 0x54($sp) -/* 02ADA8 8002A1A8 AFA60058 */ sw $a2, 0x58($sp) -/* 02ADAC 8002A1AC AFA7005C */ sw $a3, 0x5c($sp) -/* 02ADB0 8002A1B0 848E002E */ lh $t6, 0x2e($a0) -/* 02ADB4 8002A1B4 849800C0 */ lh $t8, 0xc0($a0) -/* 02ADB8 8002A1B8 8C8900BC */ lw $t1, 0xbc($a0) -/* 02ADBC 8002A1BC 000E7823 */ negu $t7, $t6 -/* 02ADC0 8002A1C0 3C024000 */ lui $v0, 0x4000 -/* 02ADC4 8002A1C4 01F81823 */ subu $v1, $t7, $t8 -/* 02ADC8 8002A1C8 0003CC00 */ sll $t9, $v1, 0x10 -/* 02ADCC 8002A1CC 01225024 */ and $t2, $t1, $v0 -/* 02ADD0 8002A1D0 00808025 */ move $s0, $a0 -/* 02ADD4 8002A1D4 144A001A */ bne $v0, $t2, .L8002A240 -/* 02ADD8 8002A1D8 00191C03 */ sra $v1, $t9, 0x10 -/* 02ADDC 8002A1DC 948B0254 */ lhu $t3, 0x254($a0) -/* 02ADE0 8002A1E0 3C01800E */ lui $at, %hi(D_800DDBD4) -/* 02ADE4 8002A1E4 000B6080 */ sll $t4, $t3, 2 -/* 02ADE8 8002A1E8 002C0821 */ addu $at, $at, $t4 -/* 02ADEC 8002A1EC C424DBD4 */ lwc1 $f4, %lo(D_800DDBD4)($at) -/* 02ADF0 8002A1F0 3C014190 */ li $at, 0x41900000 # 18.000000 -/* 02ADF4 8002A1F4 44813000 */ mtc1 $at, $f6 -/* 02ADF8 8002A1F8 3C014000 */ li $at, 0x40000000 # 2.000000 -/* 02ADFC 8002A1FC 44815000 */ mtc1 $at, $f10 -/* 02AE00 8002A200 46062202 */ mul.s $f8, $f4, $f6 -/* 02AE04 8002A204 C4860224 */ lwc1 $f6, 0x224($a0) -/* 02AE08 8002A208 3C013FF8 */ li $at, 0x3FF80000 # 1.937500 -/* 02AE0C 8002A20C 44815800 */ mtc1 $at, $f11 -/* 02AE10 8002A210 3C013FF0 */ li $at, 0x3FF00000 # 1.875000 -/* 02AE14 8002A214 460A4483 */ div.s $f18, $f8, $f10 -/* 02AE18 8002A218 44805000 */ mtc1 $zero, $f10 -/* 02AE1C 8002A21C 46003221 */ cvt.d.s $f8, $f6 -/* 02AE20 8002A220 46009121 */ cvt.d.s $f4, $f18 -/* 02AE24 8002A224 462A4482 */ mul.d $f18, $f8, $f10 -/* 02AE28 8002A228 44804000 */ mtc1 $zero, $f8 -/* 02AE2C 8002A22C 44814800 */ mtc1 $at, $f9 -/* 02AE30 8002A230 46322182 */ mul.d $f6, $f4, $f18 -/* 02AE34 8002A234 46283281 */ sub.d $f10, $f6, $f8 -/* 02AE38 8002A238 10000011 */ b .L8002A280 -/* 02AE3C 8002A23C 46205520 */ cvt.s.d $f20, $f10 -.L8002A240: -/* 02AE40 8002A240 960D0254 */ lhu $t5, 0x254($s0) -/* 02AE44 8002A244 3C01800E */ lui $at, %hi(D_800DDBD4) -/* 02AE48 8002A248 000D7080 */ sll $t6, $t5, 2 -/* 02AE4C 8002A24C 002E0821 */ addu $at, $at, $t6 -/* 02AE50 8002A250 C424DBD4 */ lwc1 $f4, %lo(D_800DDBD4)($at) -/* 02AE54 8002A254 3C014190 */ li $at, 0x41900000 # 18.000000 -/* 02AE58 8002A258 44819000 */ mtc1 $at, $f18 -/* 02AE5C 8002A25C 3C014000 */ li $at, 0x40000000 # 2.000000 -/* 02AE60 8002A260 44814000 */ mtc1 $at, $f8 -/* 02AE64 8002A264 46122182 */ mul.s $f6, $f4, $f18 -/* 02AE68 8002A268 C6040224 */ lwc1 $f4, 0x224($s0) -/* 02AE6C 8002A26C 3C013F80 */ li $at, 0x3F800000 # 1.000000 -/* 02AE70 8002A270 46083283 */ div.s $f10, $f6, $f8 -/* 02AE74 8002A274 44813000 */ mtc1 $at, $f6 -/* 02AE78 8002A278 46045482 */ mul.s $f18, $f10, $f4 -/* 02AE7C 8002A27C 46069501 */ sub.s $f20, $f18, $f6 -.L8002A280: -/* 02AE80 8002A280 24642000 */ addiu $a0, $v1, 0x2000 -/* 02AE84 8002A284 308FFFFF */ andi $t7, $a0, 0xffff -/* 02AE88 8002A288 01E02025 */ move $a0, $t7 -/* 02AE8C 8002A28C AFAF0028 */ sw $t7, 0x28($sp) -/* 02AE90 8002A290 0C0AE00E */ jal coss -/* 02AE94 8002A294 A7A3003A */ sh $v1, 0x3a($sp) -/* 02AE98 8002A298 46140202 */ mul.s $f8, $f0, $f20 -/* 02AE9C 8002A29C C7AA005C */ lwc1 $f10, 0x5c($sp) -/* 02AEA0 8002A2A0 8FA40028 */ lw $a0, 0x28($sp) -/* 02AEA4 8002A2A4 460A4100 */ add.s $f4, $f8, $f10 -/* 02AEA8 8002A2A8 0C0AE006 */ jal sins -/* 02AEAC 8002A2AC E60401A0 */ swc1 $f4, 0x1a0($s0) -/* 02AEB0 8002A2B0 46140482 */ mul.s $f18, $f0, $f20 -/* 02AEB4 8002A2B4 C7A60054 */ lwc1 $f6, 0x54($sp) -/* 02AEB8 8002A2B8 8E0601A0 */ lw $a2, 0x1a0($s0) -/* 02AEBC 8002A2BC 9607011A */ lhu $a3, 0x11a($s0) -/* 02AEC0 8002A2C0 46069300 */ add.s $f12, $f18, $f6 -/* 02AEC4 8002A2C4 E60C0198 */ swc1 $f12, 0x198($s0) -/* 02AEC8 8002A2C8 0C0AAF8C */ jal func_802ABE30 -/* 02AECC 8002A2CC C7AE0058 */ lwc1 $f14, 0x58($sp) -/* 02AED0 8002A2D0 E60001A8 */ swc1 $f0, 0x1a8($s0) -/* 02AED4 8002A2D4 87A4003A */ lh $a0, 0x3a($sp) -/* 02AED8 8002A2D8 2484E000 */ addiu $a0, $a0, -0x2000 -/* 02AEDC 8002A2DC 3098FFFF */ andi $t8, $a0, 0xffff -/* 02AEE0 8002A2E0 03002025 */ move $a0, $t8 -/* 02AEE4 8002A2E4 0C0AE00E */ jal coss -/* 02AEE8 8002A2E8 AFB80028 */ sw $t8, 0x28($sp) -/* 02AEEC 8002A2EC 46140202 */ mul.s $f8, $f0, $f20 -/* 02AEF0 8002A2F0 C7AA005C */ lwc1 $f10, 0x5c($sp) -/* 02AEF4 8002A2F4 8FA40028 */ lw $a0, 0x28($sp) -/* 02AEF8 8002A2F8 460A4100 */ add.s $f4, $f8, $f10 -/* 02AEFC 8002A2FC 0C0AE006 */ jal sins -/* 02AF00 8002A300 E60401B8 */ swc1 $f4, 0x1b8($s0) -/* 02AF04 8002A304 46140482 */ mul.s $f18, $f0, $f20 -/* 02AF08 8002A308 C7A60054 */ lwc1 $f6, 0x54($sp) -/* 02AF0C 8002A30C 8E0601B8 */ lw $a2, 0x1b8($s0) -/* 02AF10 8002A310 9607011A */ lhu $a3, 0x11a($s0) -/* 02AF14 8002A314 46069300 */ add.s $f12, $f18, $f6 -/* 02AF18 8002A318 E60C01B0 */ swc1 $f12, 0x1b0($s0) -/* 02AF1C 8002A31C 0C0AAF8C */ jal func_802ABE30 -/* 02AF20 8002A320 C7AE0058 */ lwc1 $f14, 0x58($sp) -/* 02AF24 8002A324 E60001C0 */ swc1 $f0, 0x1c0($s0) -/* 02AF28 8002A328 87A4003A */ lh $a0, 0x3a($sp) -/* 02AF2C 8002A32C 24846000 */ addiu $a0, $a0, 0x6000 -/* 02AF30 8002A330 3099FFFF */ andi $t9, $a0, 0xffff -/* 02AF34 8002A334 03202025 */ move $a0, $t9 -/* 02AF38 8002A338 0C0AE00E */ jal coss -/* 02AF3C 8002A33C AFB90028 */ sw $t9, 0x28($sp) -/* 02AF40 8002A340 46140202 */ mul.s $f8, $f0, $f20 -/* 02AF44 8002A344 C7AA005C */ lwc1 $f10, 0x5c($sp) -/* 02AF48 8002A348 8FA40028 */ lw $a0, 0x28($sp) -/* 02AF4C 8002A34C 460A4100 */ add.s $f4, $f8, $f10 -/* 02AF50 8002A350 0C0AE006 */ jal sins -/* 02AF54 8002A354 E60401D0 */ swc1 $f4, 0x1d0($s0) -/* 02AF58 8002A358 46140482 */ mul.s $f18, $f0, $f20 -/* 02AF5C 8002A35C C7A60054 */ lwc1 $f6, 0x54($sp) -/* 02AF60 8002A360 8E0601D0 */ lw $a2, 0x1d0($s0) -/* 02AF64 8002A364 9607011A */ lhu $a3, 0x11a($s0) -/* 02AF68 8002A368 46069300 */ add.s $f12, $f18, $f6 -/* 02AF6C 8002A36C E60C01C8 */ swc1 $f12, 0x1c8($s0) -/* 02AF70 8002A370 0C0AAF8C */ jal func_802ABE30 -/* 02AF74 8002A374 C7AE0058 */ lwc1 $f14, 0x58($sp) -/* 02AF78 8002A378 E60001D8 */ swc1 $f0, 0x1d8($s0) -/* 02AF7C 8002A37C 87A4003A */ lh $a0, 0x3a($sp) -/* 02AF80 8002A380 2484A000 */ addiu $a0, $a0, -0x6000 -/* 02AF84 8002A384 3088FFFF */ andi $t0, $a0, 0xffff -/* 02AF88 8002A388 01002025 */ move $a0, $t0 -/* 02AF8C 8002A38C 0C0AE00E */ jal coss -/* 02AF90 8002A390 AFA80028 */ sw $t0, 0x28($sp) -/* 02AF94 8002A394 46140202 */ mul.s $f8, $f0, $f20 -/* 02AF98 8002A398 C7AA005C */ lwc1 $f10, 0x5c($sp) -/* 02AF9C 8002A39C 8FA40028 */ lw $a0, 0x28($sp) -/* 02AFA0 8002A3A0 460A4100 */ add.s $f4, $f8, $f10 -/* 02AFA4 8002A3A4 0C0AE006 */ jal sins -/* 02AFA8 8002A3A8 E60401E8 */ swc1 $f4, 0x1e8($s0) -/* 02AFAC 8002A3AC 46140482 */ mul.s $f18, $f0, $f20 -/* 02AFB0 8002A3B0 C7A60054 */ lwc1 $f6, 0x54($sp) -/* 02AFB4 8002A3B4 C60C01C8 */ lwc1 $f12, 0x1c8($s0) -/* 02AFB8 8002A3B8 8E0601D0 */ lw $a2, 0x1d0($s0) -/* 02AFBC 8002A3BC 9607011A */ lhu $a3, 0x11a($s0) -/* 02AFC0 8002A3C0 46069200 */ add.s $f8, $f18, $f6 -/* 02AFC4 8002A3C4 E60801E0 */ swc1 $f8, 0x1e0($s0) -/* 02AFC8 8002A3C8 0C0AAF8C */ jal func_802ABE30 -/* 02AFCC 8002A3CC C7AE0058 */ lwc1 $f14, 0x58($sp) -/* 02AFD0 8002A3D0 8E0900BC */ lw $t1, 0xbc($s0) -/* 02AFD4 8002A3D4 24010008 */ li $at, 8 -/* 02AFD8 8002A3D8 E60001F0 */ swc1 $f0, 0x1f0($s0) -/* 02AFDC 8002A3DC 312A0008 */ andi $t2, $t1, 8 -/* 02AFE0 8002A3E0 11410013 */ beq $t2, $at, .L8002A430 -/* 02AFE4 8002A3E4 00000000 */ nop -/* 02AFE8 8002A3E8 C60001A8 */ lwc1 $f0, 0x1a8($s0) -/* 02AFEC 8002A3EC C60201D8 */ lwc1 $f2, 0x1d8($s0) -/* 02AFF0 8002A3F0 3C014000 */ li $at, 0x40000000 # 2.000000 -/* 02AFF4 8002A3F4 44818000 */ mtc1 $at, $f16 -/* 02AFF8 8002A3F8 46020280 */ add.s $f10, $f0, $f2 -/* 02AFFC 8002A3FC C60C01C0 */ lwc1 $f12, 0x1c0($s0) -/* 02B000 8002A400 C60E01F0 */ lwc1 $f14, 0x1f0($s0) -/* 02B004 8002A404 46105103 */ div.s $f4, $f10, $f16 -/* 02B008 8002A408 460E6480 */ add.s $f18, $f12, $f14 -/* 02B00C 8002A40C 460C0200 */ add.s $f8, $f0, $f12 -/* 02B010 8002A410 46109183 */ div.s $f6, $f18, $f16 -/* 02B014 8002A414 E6040230 */ swc1 $f4, 0x230($s0) -/* 02B018 8002A418 460E1100 */ add.s $f4, $f2, $f14 -/* 02B01C 8002A41C 46104283 */ div.s $f10, $f8, $f16 -/* 02B020 8002A420 E606023C */ swc1 $f6, 0x23c($s0) -/* 02B024 8002A424 46102483 */ div.s $f18, $f4, $f16 -/* 02B028 8002A428 E60A01FC */ swc1 $f10, 0x1fc($s0) -/* 02B02C 8002A42C E61201F8 */ swc1 $f18, 0x1f8($s0) -.L8002A430: -/* 02B030 8002A430 0C0AAF44 */ jal func_802ABD10 -/* 02B034 8002A434 9604011A */ lhu $a0, 0x11a($s0) -/* 02B038 8002A438 304300FF */ andi $v1, $v0, 0xff -/* 02B03C 8002A43C 960C0254 */ lhu $t4, 0x254($s0) -/* 02B040 8002A440 3C01800E */ lui $at, %hi(D_800DDBD4) -/* 02B044 8002A444 A60300F8 */ sh $v1, 0xf8($s0) -/* 02B048 8002A448 000C6880 */ sll $t5, $t4, 2 -/* 02B04C 8002A44C A20301EC */ sb $v1, 0x1ec($s0) -/* 02B050 8002A450 A20301D4 */ sb $v1, 0x1d4($s0) -/* 02B054 8002A454 A20301BC */ sb $v1, 0x1bc($s0) -/* 02B058 8002A458 A20301A4 */ sb $v1, 0x1a4($s0) -/* 02B05C 8002A45C 002D0821 */ addu $at, $at, $t5 -/* 02B060 8002A460 C426DBD4 */ lwc1 $f6, %lo(D_800DDBD4)($at) -/* 02B064 8002A464 3C014190 */ li $at, 0x41900000 # 18.000000 -/* 02B068 8002A468 44814000 */ mtc1 $at, $f8 -/* 02B06C 8002A46C 3C013F80 */ li $at, 0x3F800000 # 1.000000 -/* 02B070 8002A470 44812000 */ mtc1 $at, $f4 -/* 02B074 8002A474 46083282 */ mul.s $f10, $f6, $f8 -/* 02B078 8002A478 C6060230 */ lwc1 $f6, 0x230($s0) -/* 02B07C 8002A47C C612023C */ lwc1 $f18, 0x23c($s0) -/* 02B080 8002A480 46069001 */ sub.s $f0, $f18, $f6 -/* 02B084 8002A484 46045500 */ add.s $f20, $f10, $f4 -/* 02B088 8002A488 0C0ADF10 */ jal func_802B7C40 -/* 02B08C 8002A48C 46140303 */ div.s $f12, $f0, $f20 -/* 02B090 8002A490 8E0F00BC */ lw $t7, 0xbc($s0) -/* 02B094 8002A494 00027023 */ negu $t6, $v0 -/* 02B098 8002A498 24010008 */ li $at, 8 -/* 02B09C 8002A49C 31F80008 */ andi $t8, $t7, 8 -/* 02B0A0 8002A4A0 1301000E */ beq $t8, $at, .L8002A4DC -/* 02B0A4 8002A4A4 A60E0206 */ sh $t6, 0x206($s0) -/* 02B0A8 8002A4A8 C60801F8 */ lwc1 $f8, 0x1f8($s0) -/* 02B0AC 8002A4AC C60A01FC */ lwc1 $f10, 0x1fc($s0) -/* 02B0B0 8002A4B0 460A4001 */ sub.s $f0, $f8, $f10 -/* 02B0B4 8002A4B4 0C0ADF10 */ jal func_802B7C40 -/* 02B0B8 8002A4B8 46140303 */ div.s $f12, $f0, $f20 -/* 02B0BC 8002A4BC 00022C00 */ sll $a1, $v0, 0x10 -/* 02B0C0 8002A4C0 0005CC03 */ sra $t9, $a1, 0x10 -/* 02B0C4 8002A4C4 03202825 */ move $a1, $t9 -/* 02B0C8 8002A4C8 260400C4 */ addiu $a0, $s0, 0xc4 -/* 02B0CC 8002A4CC 0C00898D */ jal move_s16_towards -/* 02B0D0 8002A4D0 3C063F00 */ lui $a2, 0x3f00 -/* 02B0D4 8002A4D4 10000017 */ b .L8002A534 -/* 02B0D8 8002A4D8 00000000 */ nop -.L8002A4DC: -/* 02B0DC 8002A4DC C6040024 */ lwc1 $f4, 0x24($s0) -/* 02B0E0 8002A4E0 C7B20058 */ lwc1 $f18, 0x58($sp) -/* 02B0E4 8002A4E4 46122001 */ sub.s $f0, $f4, $f18 -/* 02B0E8 8002A4E8 46140303 */ div.s $f12, $f0, $f20 -/* 02B0EC 8002A4EC 0C0ADF10 */ jal func_802B7C40 -/* 02B0F0 8002A4F0 E7A00030 */ swc1 $f0, 0x30($sp) -/* 02B0F4 8002A4F4 C7A00030 */ lwc1 $f0, 0x30($sp) -/* 02B0F8 8002A4F8 44803000 */ mtc1 $zero, $f6 -/* 02B0FC 8002A4FC 00022880 */ sll $a1, $v0, 2 -/* 02B100 8002A500 00A22821 */ addu $a1, $a1, $v0 -/* 02B104 8002A504 4600303E */ c.le.s $f6, $f0 -/* 02B108 8002A508 00055440 */ sll $t2, $a1, 0x11 -/* 02B10C 8002A50C 000A2C03 */ sra $a1, $t2, 0x10 -/* 02B110 8002A510 260400C4 */ addiu $a0, $s0, 0xc4 -/* 02B114 8002A514 45000005 */ bc1f .L8002A52C -/* 02B118 8002A518 00000000 */ nop -/* 02B11C 8002A51C 00402825 */ move $a1, $v0 -/* 02B120 8002A520 00054440 */ sll $t0, $a1, 0x11 -/* 02B124 8002A524 10000001 */ b .L8002A52C -/* 02B128 8002A528 00082C03 */ sra $a1, $t0, 0x10 -.L8002A52C: -/* 02B12C 8002A52C 0C00898D */ jal move_s16_towards -/* 02B130 8002A530 3C063F00 */ lui $a2, 0x3f00 -.L8002A534: -/* 02B134 8002A534 0C0AAF5F */ jal func_802ABD7C -/* 02B138 8002A538 9604011A */ lhu $a0, 0x11a($s0) -/* 02B13C 8002A53C 50400006 */ beql $v0, $zero, .L8002A558 -/* 02B140 8002A540 8E0E01F4 */ lw $t6, 0x1f4($s0) -/* 02B144 8002A544 8E0C01F4 */ lw $t4, 0x1f4($s0) -/* 02B148 8002A548 358D0001 */ ori $t5, $t4, 1 -/* 02B14C 8002A54C 10000005 */ b .L8002A564 -/* 02B150 8002A550 AE0D01F4 */ sw $t5, 0x1f4($s0) -/* 02B154 8002A554 8E0E01F4 */ lw $t6, 0x1f4($s0) -.L8002A558: -/* 02B158 8002A558 2401FFFE */ li $at, -2 -/* 02B15C 8002A55C 01C17824 */ and $t7, $t6, $at -/* 02B160 8002A560 AE0F01F4 */ sw $t7, 0x1f4($s0) -.L8002A564: -/* 02B164 8002A564 960300F8 */ lhu $v1, 0xf8($s0) -/* 02B168 8002A568 240100FE */ li $at, 254 -/* 02B16C 8002A56C 5461000F */ bnel $v1, $at, .L8002A5AC -/* 02B170 8002A570 240100FC */ li $at, 252 -/* 02B174 8002A574 8E0200BC */ lw $v0, 0xbc($s0) -/* 02B178 8002A578 3C040010 */ lui $a0, 0x10 -/* 02B17C 8002A57C 24010008 */ li $at, 8 -/* 02B180 8002A580 0044C024 */ and $t8, $v0, $a0 -/* 02B184 8002A584 10980008 */ beq $a0, $t8, .L8002A5A8 -/* 02B188 8002A588 30590008 */ andi $t9, $v0, 8 -/* 02B18C 8002A58C 53210007 */ beql $t9, $at, .L8002A5AC -/* 02B190 8002A590 240100FC */ li $at, 252 -/* 02B194 8002A594 8E08000C */ lw $t0, 0xc($s0) -/* 02B198 8002A598 3C010080 */ lui $at, 0x80 -/* 02B19C 8002A59C 960300F8 */ lhu $v1, 0xf8($s0) -/* 02B1A0 8002A5A0 01014825 */ or $t1, $t0, $at -/* 02B1A4 8002A5A4 AE09000C */ sw $t1, 0xc($s0) -.L8002A5A8: -/* 02B1A8 8002A5A8 240100FC */ li $at, 252 -.L8002A5AC: -/* 02B1AC 8002A5AC 5461000D */ bnel $v1, $at, .L8002A5E4 -/* 02B1B0 8002A5B0 8FBF0024 */ lw $ra, 0x24($sp) -/* 02B1B4 8002A5B4 8E0200BC */ lw $v0, 0xbc($s0) -/* 02B1B8 8002A5B8 24010004 */ li $at, 4 -/* 02B1BC 8002A5BC 304A0004 */ andi $t2, $v0, 4 -/* 02B1C0 8002A5C0 11410007 */ beq $t2, $at, .L8002A5E0 -/* 02B1C4 8002A5C4 304B0008 */ andi $t3, $v0, 8 -/* 02B1C8 8002A5C8 24010008 */ li $at, 8 -/* 02B1CC 8002A5CC 51610005 */ beql $t3, $at, .L8002A5E4 -/* 02B1D0 8002A5D0 8FBF0024 */ lw $ra, 0x24($sp) -/* 02B1D4 8002A5D4 8E0C000C */ lw $t4, 0xc($s0) -/* 02B1D8 8002A5D8 358D8000 */ ori $t5, $t4, 0x8000 -/* 02B1DC 8002A5DC AE0D000C */ sw $t5, 0xc($s0) -.L8002A5E0: -/* 02B1E0 8002A5E0 8FBF0024 */ lw $ra, 0x24($sp) -.L8002A5E4: -/* 02B1E4 8002A5E4 D7B40018 */ ldc1 $f20, 0x18($sp) -/* 02B1E8 8002A5E8 8FB00020 */ lw $s0, 0x20($sp) -/* 02B1EC 8002A5EC 03E00008 */ jr $ra -/* 02B1F0 8002A5F0 27BD0050 */ addiu $sp, $sp, 0x50 diff --git a/asm/non_matchings/code_80027D00/func_8002C954.s b/asm/non_matchings/code_80027D00/func_8002C954.s deleted file mode 100644 index 0acf2abbf..000000000 --- a/asm/non_matchings/code_80027D00/func_8002C954.s +++ /dev/null @@ -1,283 +0,0 @@ -.section .late_rodata - -glabel D_800ED7D8 -.double 0.6 - -.section .text - -glabel func_8002C954 -/* 02D554 8002C954 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 02D558 8002C958 AFBF0014 */ sw $ra, 0x14($sp) -/* 02D55C 8002C95C AFA5001C */ sw $a1, 0x1c($sp) -/* 02D560 8002C960 AFA60020 */ sw $a2, 0x20($sp) -/* 02D564 8002C964 8C8200BC */ lw $v0, 0xbc($a0) -/* 02D568 8002C968 C4860074 */ lwc1 $f6, 0x74($a0) -/* 02D56C 8002C96C C4840018 */ lwc1 $f4, 0x18($a0) -/* 02D570 8002C970 3C080001 */ lui $t0, 1 -/* 02D574 8002C974 00481824 */ and $v1, $v0, $t0 -/* 02D578 8002C978 00803825 */ move $a3, $a0 -/* 02D57C 8002C97C 11030004 */ beq $t0, $v1, .L8002C990 -/* 02D580 8002C980 46062001 */ sub.s $f0, $f4, $f6 -/* 02D584 8002C984 3C040010 */ lui $a0, 0x10 -/* 02D588 8002C988 00447024 */ and $t6, $v0, $a0 -/* 02D58C 8002C98C 108E0016 */ beq $a0, $t6, .L8002C9E8 -.L8002C990: -/* 02D590 8002C990 3C0141A0 */ li $at, 0x41A00000 # 20.000000 -/* 02D594 8002C994 44814000 */ mtc1 $at, $f8 -/* 02D598 8002C998 3C01BF80 */ li $at, 0xBF800000 # -1.000000 -/* 02D59C 8002C99C 4600403E */ c.le.s $f8, $f0 -/* 02D5A0 8002C9A0 00000000 */ nop -/* 02D5A4 8002C9A4 45010007 */ bc1t .L8002C9C4 -/* 02D5A8 8002C9A8 00000000 */ nop -/* 02D5AC 8002C9AC 44815000 */ mtc1 $at, $f10 -/* 02D5B0 8002C9B0 00000000 */ nop -/* 02D5B4 8002C9B4 460A003C */ c.lt.s $f0, $f10 -/* 02D5B8 8002C9B8 00000000 */ nop -/* 02D5BC 8002C9BC 45020006 */ bc1fl .L8002C9D8 -/* 02D5C0 8002C9C0 94F80114 */ lhu $t8, 0x114($a3) -.L8002C9C4: -/* 02D5C4 8002C9C4 14600003 */ bnez $v1, .L8002C9D4 -/* 02D5C8 8002C9C8 304F0008 */ andi $t7, $v0, 8 -/* 02D5CC 8002C9CC 55E00007 */ bnel $t7, $zero, .L8002C9EC -/* 02D5D0 8002C9D0 84E200CA */ lh $v0, 0xca($a3) -.L8002C9D4: -/* 02D5D4 8002C9D4 94F80114 */ lhu $t8, 0x114($a3) -.L8002C9D8: -/* 02D5D8 8002C9D8 5700000F */ bnel $t8, $zero, .L8002CA18 -/* 02D5DC 8002C9DC 94E20046 */ lhu $v0, 0x46($a3) -/* 02D5E0 8002C9E0 5460000D */ bnel $v1, $zero, .L8002CA18 -/* 02D5E4 8002C9E4 94E20046 */ lhu $v0, 0x46($a3) -.L8002C9E8: -/* 02D5E8 8002C9E8 84E200CA */ lh $v0, 0xca($a3) -.L8002C9EC: -/* 02D5EC 8002C9EC 00E02025 */ move $a0, $a3 -/* 02D5F0 8002C9F0 83A5001F */ lb $a1, 0x1f($sp) -/* 02D5F4 8002C9F4 30590002 */ andi $t9, $v0, 2 -/* 02D5F8 8002C9F8 13200003 */ beqz $t9, .L8002CA08 -/* 02D5FC 8002C9FC 30490008 */ andi $t1, $v0, 8 -/* 02D600 8002CA00 55200005 */ bnel $t1, $zero, .L8002CA18 -/* 02D604 8002CA04 94E20046 */ lhu $v0, 0x46($a3) -.L8002CA08: -/* 02D608 8002CA08 0C023D25 */ jal func_8008F494 -/* 02D60C 8002CA0C AFA70018 */ sw $a3, 0x18($sp) -/* 02D610 8002CA10 8FA70018 */ lw $a3, 0x18($sp) -/* 02D614 8002CA14 94E20046 */ lhu $v0, 0x46($a3) -.L8002CA18: -/* 02D618 8002CA18 24010020 */ li $at, 32 -/* 02D61C 8002CA1C 304A0020 */ andi $t2, $v0, 0x20 -/* 02D620 8002CA20 11410014 */ beq $t2, $at, .L8002CA74 -/* 02D624 8002CA24 3C01BF80 */ li $at, 0xBF800000 # -1.000000 -/* 02D628 8002CA28 44819000 */ mtc1 $at, $f18 -/* 02D62C 8002CA2C C4F0011C */ lwc1 $f16, 0x11c($a3) -/* 02D630 8002CA30 3C01BF80 */ li $at, 0xBF800000 # -1.000000 -/* 02D634 8002CA34 240B0001 */ li $t3, 1 -/* 02D638 8002CA38 4612803C */ c.lt.s $f16, $f18 -/* 02D63C 8002CA3C 00000000 */ nop -/* 02D640 8002CA40 45030009 */ bc1tl .L8002CA68 -/* 02D644 8002CA44 A4EB0256 */ sh $t3, 0x256($a3) -/* 02D648 8002CA48 C4E40120 */ lwc1 $f4, 0x120($a3) -/* 02D64C 8002CA4C 44813000 */ mtc1 $at, $f6 -/* 02D650 8002CA50 00000000 */ nop -/* 02D654 8002CA54 4606203C */ c.lt.s $f4, $f6 -/* 02D658 8002CA58 00000000 */ nop -/* 02D65C 8002CA5C 45020004 */ bc1fl .L8002CA70 -/* 02D660 8002CA60 344C0020 */ ori $t4, $v0, 0x20 -/* 02D664 8002CA64 A4EB0256 */ sh $t3, 0x256($a3) -.L8002CA68: -/* 02D668 8002CA68 94E20046 */ lhu $v0, 0x46($a3) -/* 02D66C 8002CA6C 344C0020 */ ori $t4, $v0, 0x20 -.L8002CA70: -/* 02D670 8002CA70 A4EC0046 */ sh $t4, 0x46($a3) -.L8002CA74: -/* 02D674 8002CA74 94ED0000 */ lhu $t5, ($a3) -/* 02D678 8002CA78 24014000 */ li $at, 16384 -/* 02D67C 8002CA7C 31AE4000 */ andi $t6, $t5, 0x4000 -/* 02D680 8002CA80 15C10012 */ bne $t6, $at, .L8002CACC -/* 02D684 8002CA84 3C0141F0 */ li $at, 0x41F00000 # 30.000000 -/* 02D688 8002CA88 44814000 */ mtc1 $at, $f8 -/* 02D68C 8002CA8C 3C014190 */ li $at, 0x41900000 # 18.000000 -/* 02D690 8002CA90 44818000 */ mtc1 $at, $f16 -/* 02D694 8002CA94 C4EA0094 */ lwc1 $f10, 0x94($a3) -/* 02D698 8002CA98 3C014358 */ li $at, 0x43580000 # 216.000000 -/* 02D69C 8002CA9C 44812000 */ mtc1 $at, $f4 -/* 02D6A0 8002CAA0 46105483 */ div.s $f18, $f10, $f16 -/* 02D6A4 8002CAA4 00E02025 */ move $a0, $a3 -/* 02D6A8 8002CAA8 3C054040 */ lui $a1, 0x4040 -/* 02D6AC 8002CAAC 46049182 */ mul.s $f6, $f18, $f4 -/* 02D6B0 8002CAB0 4606403C */ c.lt.s $f8, $f6 -/* 02D6B4 8002CAB4 00000000 */ nop -/* 02D6B8 8002CAB8 45020005 */ bc1fl .L8002CAD0 -/* 02D6BC 8002CABC 94F90256 */ lhu $t9, 0x256($a3) -/* 02D6C0 8002CAC0 0C007289 */ jal func_8001CA24 -/* 02D6C4 8002CAC4 AFA70018 */ sw $a3, 0x18($sp) -/* 02D6C8 8002CAC8 8FA70018 */ lw $a3, 0x18($sp) -.L8002CACC: -/* 02D6CC 8002CACC 94F90256 */ lhu $t9, 0x256($a3) -.L8002CAD0: -/* 02D6D0 8002CAD0 94EF0046 */ lhu $t7, 0x46($a3) -/* 02D6D4 8002CAD4 27290001 */ addiu $t1, $t9, 1 -/* 02D6D8 8002CAD8 312AFFFF */ andi $t2, $t1, 0xffff -/* 02D6DC 8002CADC 2941000A */ slti $at, $t2, 0xa -/* 02D6E0 8002CAE0 35F80010 */ ori $t8, $t7, 0x10 -/* 02D6E4 8002CAE4 A4F80046 */ sh $t8, 0x46($a3) -/* 02D6E8 8002CAE8 14200002 */ bnez $at, .L8002CAF4 -/* 02D6EC 8002CAEC A4E90256 */ sh $t1, 0x256($a3) -/* 02D6F0 8002CAF0 A4E00256 */ sh $zero, 0x256($a3) -.L8002CAF4: -/* 02D6F4 8002CAF4 84EB00C4 */ lh $t3, 0xc4($a3) -/* 02D6F8 8002CAF8 3C0140A0 */ li $at, 0x40A00000 # 5.000000 -/* 02D6FC 8002CAFC 05620013 */ bltzl $t3, .L8002CB4C -/* 02D700 8002CB00 94EC0000 */ lhu $t4, ($a3) -/* 02D704 8002CB04 44815000 */ mtc1 $at, $f10 -/* 02D708 8002CB08 3C014190 */ li $at, 0x41900000 # 18.000000 -/* 02D70C 8002CB0C 44819000 */ mtc1 $at, $f18 -/* 02D710 8002CB10 C4F00094 */ lwc1 $f16, 0x94($a3) -/* 02D714 8002CB14 3C014358 */ li $at, 0x43580000 # 216.000000 -/* 02D718 8002CB18 44814000 */ mtc1 $at, $f8 -/* 02D71C 8002CB1C 46128103 */ div.s $f4, $f16, $f18 -/* 02D720 8002CB20 00E02025 */ move $a0, $a3 -/* 02D724 8002CB24 3C054190 */ lui $a1, 0x4190 -/* 02D728 8002CB28 46082182 */ mul.s $f6, $f4, $f8 -/* 02D72C 8002CB2C 4606503C */ c.lt.s $f10, $f6 -/* 02D730 8002CB30 00000000 */ nop -/* 02D734 8002CB34 45020005 */ bc1fl .L8002CB4C -/* 02D738 8002CB38 94EC0000 */ lhu $t4, ($a3) -/* 02D73C 8002CB3C 0C00C7D2 */ jal func_80031F48 -/* 02D740 8002CB40 AFA70018 */ sw $a3, 0x18($sp) -/* 02D744 8002CB44 8FA70018 */ lw $a3, 0x18($sp) -/* 02D748 8002CB48 94EC0000 */ lhu $t4, ($a3) -.L8002CB4C: -/* 02D74C 8002CB4C 83AE001F */ lb $t6, 0x1f($sp) -/* 02D750 8002CB50 24014000 */ li $at, 16384 -/* 02D754 8002CB54 318D4000 */ andi $t5, $t4, 0x4000 -/* 02D758 8002CB58 15A1006A */ bne $t5, $at, .L8002CD04 -/* 02D75C 8002CB5C 000E7880 */ sll $t7, $t6, 2 -/* 02D760 8002CB60 8FB90020 */ lw $t9, 0x20($sp) -/* 02D764 8002CB64 01EE7823 */ subu $t7, $t7, $t6 -/* 02D768 8002CB68 3C188016 */ lui $t8, %hi(D_80165070) # $t8, 0x8016 -/* 02D76C 8002CB6C 27185070 */ addiu $t8, %lo(D_80165070) # addiu $t8, $t8, 0x5070 -/* 02D770 8002CB70 000F7880 */ sll $t7, $t7, 2 -/* 02D774 8002CB74 01F81021 */ addu $v0, $t7, $t8 -/* 02D778 8002CB78 C4500000 */ lwc1 $f16, ($v0) -/* 02D77C 8002CB7C C7320000 */ lwc1 $f18, ($t9) -/* 02D780 8002CB80 C4440004 */ lwc1 $f4, 4($v0) -/* 02D784 8002CB84 C7280004 */ lwc1 $f8, 4($t9) -/* 02D788 8002CB88 46128001 */ sub.s $f0, $f16, $f18 -/* 02D78C 8002CB8C C44A0008 */ lwc1 $f10, 8($v0) -/* 02D790 8002CB90 C7260008 */ lwc1 $f6, 8($t9) -/* 02D794 8002CB94 46082381 */ sub.s $f14, $f4, $f8 -/* 02D798 8002CB98 46000402 */ mul.s $f16, $f0, $f0 -/* 02D79C 8002CB9C AFA70018 */ sw $a3, 0x18($sp) -/* 02D7A0 8002CBA0 46065081 */ sub.s $f2, $f10, $f6 -/* 02D7A4 8002CBA4 460E7482 */ mul.s $f18, $f14, $f14 -/* 02D7A8 8002CBA8 46128100 */ add.s $f4, $f16, $f18 -/* 02D7AC 8002CBAC 46021202 */ mul.s $f8, $f2, $f2 -/* 02D7B0 8002CBB0 0C033850 */ jal sqrtf -/* 02D7B4 8002CBB4 46082300 */ add.s $f12, $f4, $f8 -/* 02D7B8 8002CBB8 3C014040 */ li $at, 0x40400000 # 3.000000 -/* 02D7BC 8002CBBC 44815000 */ mtc1 $at, $f10 -/* 02D7C0 8002CBC0 3C013FF0 */ li $at, 0x3FF00000 # 1.875000 -/* 02D7C4 8002CBC4 44818800 */ mtc1 $at, $f17 -/* 02D7C8 8002CBC8 460A0383 */ div.s $f14, $f0, $f10 -/* 02D7CC 8002CBCC 44808000 */ mtc1 $zero, $f16 -/* 02D7D0 8002CBD0 8FA70018 */ lw $a3, 0x18($sp) -/* 02D7D4 8002CBD4 3C013F80 */ li $at, 0x3F800000 # 1.000000 -/* 02D7D8 8002CBD8 460071A1 */ cvt.d.s $f6, $f14 -/* 02D7DC 8002CBDC 4626803E */ c.le.d $f16, $f6 -/* 02D7E0 8002CBE0 00000000 */ nop -/* 02D7E4 8002CBE4 45000003 */ bc1f .L8002CBF4 -/* 02D7E8 8002CBE8 00000000 */ nop -/* 02D7EC 8002CBEC 44817000 */ mtc1 $at, $f14 -/* 02D7F0 8002CBF0 00000000 */ nop -.L8002CBF4: -/* 02D7F4 8002CBF4 3C01800F */ lui $at, %hi(D_800ED7D8) -/* 02D7F8 8002CBF8 D422D7D8 */ ldc1 $f2, %lo(D_800ED7D8)($at) -/* 02D7FC 8002CBFC 46007021 */ cvt.d.s $f0, $f14 -/* 02D800 8002CC00 3C014190 */ li $at, 0x41900000 # 18.000000 -/* 02D804 8002CC04 4622003E */ c.le.d $f0, $f2 -/* 02D808 8002CC08 00000000 */ nop -/* 02D80C 8002CC0C 45020018 */ bc1fl .L8002CC70 -/* 02D810 8002CC10 94EB0000 */ lhu $t3, ($a3) -/* 02D814 8002CC14 C4F20094 */ lwc1 $f18, 0x94($a3) -/* 02D818 8002CC18 44812000 */ mtc1 $at, $f4 -/* 02D81C 8002CC1C 3C014358 */ li $at, 0x43580000 # 216.000000 -/* 02D820 8002CC20 44815000 */ mtc1 $at, $f10 -/* 02D824 8002CC24 46049203 */ div.s $f8, $f18, $f4 -/* 02D828 8002CC28 3C014220 */ li $at, 0x42200000 # 40.000000 -/* 02D82C 8002CC2C 44818000 */ mtc1 $at, $f16 -/* 02D830 8002CC30 460A4182 */ mul.s $f6, $f8, $f10 -/* 02D834 8002CC34 4606803E */ c.le.s $f16, $f6 -/* 02D838 8002CC38 00000000 */ nop -/* 02D83C 8002CC3C 4502000C */ bc1fl .L8002CC70 -/* 02D840 8002CC40 94EB0000 */ lhu $t3, ($a3) -/* 02D844 8002CC44 94E90000 */ lhu $t1, ($a3) -/* 02D848 8002CC48 3C053F19 */ lui $a1, (0x3F19999A >> 16) # lui $a1, 0x3f19 -/* 02D84C 8002CC4C 34A5999A */ ori $a1, (0x3F19999A & 0xFFFF) # ori $a1, $a1, 0x999a -/* 02D850 8002CC50 312A0100 */ andi $t2, $t1, 0x100 -/* 02D854 8002CC54 15400005 */ bnez $t2, .L8002CC6C -/* 02D858 8002CC58 93A4001F */ lbu $a0, 0x1f($sp) -/* 02D85C 8002CC5C 0C032BB1 */ jal func_800CAEC4 -/* 02D860 8002CC60 AFA70018 */ sw $a3, 0x18($sp) -/* 02D864 8002CC64 10000027 */ b .L8002CD04 -/* 02D868 8002CC68 8FA70018 */ lw $a3, 0x18($sp) -.L8002CC6C: -/* 02D86C 8002CC6C 94EB0000 */ lhu $t3, ($a3) -.L8002CC70: -/* 02D870 8002CC70 316C0100 */ andi $t4, $t3, 0x100 -/* 02D874 8002CC74 55800024 */ bnel $t4, $zero, .L8002CD08 -/* 02D878 8002CC78 8CED00BC */ lw $t5, 0xbc($a3) -/* 02D87C 8002CC7C 4622003E */ c.le.d $f0, $f2 -/* 02D880 8002CC80 3C014190 */ li $at, 0x41900000 # 18.000000 -/* 02D884 8002CC84 93A4001F */ lbu $a0, 0x1f($sp) -/* 02D888 8002CC88 4502001B */ bc1fl .L8002CCF8 -/* 02D88C 8002CC8C 44057000 */ mfc1 $a1, $f14 -/* 02D890 8002CC90 C4F20094 */ lwc1 $f18, 0x94($a3) -/* 02D894 8002CC94 44812000 */ mtc1 $at, $f4 -/* 02D898 8002CC98 3C014358 */ li $at, 0x43580000 # 216.000000 -/* 02D89C 8002CC9C 44815000 */ mtc1 $at, $f10 -/* 02D8A0 8002CCA0 46049203 */ div.s $f8, $f18, $f4 -/* 02D8A4 8002CCA4 3C014220 */ li $at, 0x42200000 # 40.000000 -/* 02D8A8 8002CCA8 44813000 */ mtc1 $at, $f6 -/* 02D8AC 8002CCAC 3C014120 */ li $at, 0x41200000 # 10.000000 -/* 02D8B0 8002CCB0 460A4002 */ mul.s $f0, $f8, $f10 -/* 02D8B4 8002CCB4 4606003C */ c.lt.s $f0, $f6 -/* 02D8B8 8002CCB8 00000000 */ nop -/* 02D8BC 8002CCBC 4502000E */ bc1fl .L8002CCF8 -/* 02D8C0 8002CCC0 44057000 */ mfc1 $a1, $f14 -/* 02D8C4 8002CCC4 44818000 */ mtc1 $at, $f16 -/* 02D8C8 8002CCC8 3C053E99 */ lui $a1, (0x3E99999A >> 16) # lui $a1, 0x3e99 -/* 02D8CC 8002CCCC 34A5999A */ ori $a1, (0x3E99999A & 0xFFFF) # ori $a1, $a1, 0x999a -/* 02D8D0 8002CCD0 4600803E */ c.le.s $f16, $f0 -/* 02D8D4 8002CCD4 00000000 */ nop -/* 02D8D8 8002CCD8 45020007 */ bc1fl .L8002CCF8 -/* 02D8DC 8002CCDC 44057000 */ mfc1 $a1, $f14 -/* 02D8E0 8002CCE0 93A4001F */ lbu $a0, 0x1f($sp) -/* 02D8E4 8002CCE4 0C032BB1 */ jal func_800CAEC4 -/* 02D8E8 8002CCE8 AFA70018 */ sw $a3, 0x18($sp) -/* 02D8EC 8002CCEC 10000005 */ b .L8002CD04 -/* 02D8F0 8002CCF0 8FA70018 */ lw $a3, 0x18($sp) -/* 02D8F4 8002CCF4 44057000 */ mfc1 $a1, $f14 -.L8002CCF8: -/* 02D8F8 8002CCF8 0C032BB1 */ jal func_800CAEC4 -/* 02D8FC 8002CCFC AFA70018 */ sw $a3, 0x18($sp) -/* 02D900 8002CD00 8FA70018 */ lw $a3, 0x18($sp) -.L8002CD04: -/* 02D904 8002CD04 8CED00BC */ lw $t5, 0xbc($a3) -.L8002CD08: -/* 02D908 8002CD08 00E02025 */ move $a0, $a3 -/* 02D90C 8002CD0C 31AE2000 */ andi $t6, $t5, 0x2000 -/* 02D910 8002CD10 51C0000A */ beql $t6, $zero, .L8002CD3C -/* 02D914 8002CD14 8FBF0014 */ lw $ra, 0x14($sp) -/* 02D918 8002CD18 0C023555 */ jal func_8008D554 -/* 02D91C 8002CD1C AFA70018 */ sw $a3, 0x18($sp) -/* 02D920 8002CD20 8FA70018 */ lw $a3, 0x18($sp) -/* 02D924 8002CD24 3C014000 */ li $at, 0x40000000 # 2.000000 -/* 02D928 8002CD28 44812000 */ mtc1 $at, $f4 -/* 02D92C 8002CD2C C4F2008C */ lwc1 $f18, 0x8c($a3) -/* 02D930 8002CD30 46049203 */ div.s $f8, $f18, $f4 -/* 02D934 8002CD34 E4E8008C */ swc1 $f8, 0x8c($a3) -/* 02D938 8002CD38 8FBF0014 */ lw $ra, 0x14($sp) -.L8002CD3C: -/* 02D93C 8002CD3C 27BD0018 */ addiu $sp, $sp, 0x18 -/* 02D940 8002CD40 03E00008 */ jr $ra -/* 02D944 8002CD44 00000000 */ nop diff --git a/src/code_80027D00.c b/src/code_80027D00.c index 1f6bea84d..719f5e2d9 100644 --- a/src/code_80027D00.c +++ b/src/code_80027D00.c @@ -18,8 +18,6 @@ extern s16 D_801633F8; extern s32 D_8018D168; extern s32 D_800DC510; -void func_80028E70(Player*, Camera*, s8, s8); - s16 D_800E3810[] = { 1, 2, 3, 4, 5, 6, 7, 0 }; @@ -615,8 +613,6 @@ void func_80027EDC(Player *player, s8 playerId) { } } -void control_cpu_movement(Player*,Camera*, s8, s8); - void func_80028864(Player *player, Camera *camera, s8 arg2, s8 arg3) { u16 sp1E; @@ -678,77 +674,77 @@ void func_80028864(Player *player, Camera *camera, s8 arg2, s8 arg3) { } } -void func_80028C44(Player *arg0, s32 arg1, s8 arg2, s8 arg3) { - if ((arg0->unk_000 & 0x2000) == 0) { - arg0->unk_0BC &= ~0x1000; - if (((arg0->unk_0BC & 0x80) == 0x80) || - ((arg0->unk_0BC & 0x40) == 0x40) || - ((arg0->unk_0BC & 0x400) == 0x400) || - ((arg0->unk_0BC & 0x4000) == 0x4000) || - ((arg0->unk_0BC & 0x80000) == 0x80000) || - ((arg0->unk_0BC & 0x800000) == 0x800000) || - ((arg0->unk_0BC & 0x1000000) == 0x1000000) || - ((arg0->unk_0BC & 0x2000000) == 0x2000000) || - ((arg0->unk_0BC & 0x20000) == 0x20000) || - ((arg0->unk_044 & 0x800) != 0)) { - func_8002E594(arg0, arg1, arg3, arg2); +void func_80028C44(Player *player, Camera *camera, s8 arg2, s8 arg3) { + if ((player->unk_000 & 0x2000) == 0) { + player->unk_0BC &= ~0x1000; + if (((player->unk_0BC & 0x80) == 0x80) || + ((player->unk_0BC & 0x40) == 0x40) || + ((player->unk_0BC & 0x400) == 0x400) || + ((player->unk_0BC & 0x4000) == 0x4000) || + ((player->unk_0BC & 0x80000) == 0x80000) || + ((player->unk_0BC & 0x800000) == 0x800000) || + ((player->unk_0BC & 0x1000000) == 0x1000000) || + ((player->unk_0BC & 0x2000000) == 0x2000000) || + ((player->unk_0BC & 0x20000) == 0x20000) || + ((player->unk_044 & 0x800) != 0)) { + func_8002E594(player, camera, arg3, arg2); } else { - func_8002D268(arg0, arg1, arg3, arg2); + func_8002D268(player, camera, arg3, arg2); } } else { - arg0->unk_0BC &= -9; + player->unk_0BC &= -9; } } -void func_80028D3C(Player *arg0, s32 arg1, s8 arg2, s8 arg3) { - if (((arg0->unk_000 & 0x2000) == 0) && +void func_80028D3C(Player *player, Camera *camera, s8 arg2, s8 arg3) { + if (((player->unk_000 & 0x2000) == 0) && (D_800DC510 != 5) || - (arg0->unk_0CA & 2) != 0 || - (arg0->unk_0CA & 8) != 0 || - (arg0->unk_0BC & 0x4F010CC0) != 0) { - arg0->unk_0BC &= ~0x1000; + (player->unk_0CA & 2) != 0 || + (player->unk_0CA & 8) != 0 || + (player->unk_0BC & 0x4F010CC0) != 0) { + player->unk_0BC &= ~0x1000; - if (((arg0->unk_0BC & 0x80) == 0x80) || - ((arg0->unk_0BC & 0x40) == 0x40) || - ((arg0->unk_0BC & 0x400) == 0x400) || - ((arg0->unk_0BC & 0x4000) == 0x4000) || - ((arg0->unk_0BC & 0x80000) == 0x80000) || - ((arg0->unk_0BC & 0x800000) == 0x800000) || - ((arg0->unk_0BC & 0x1000000) == 0x1000000) || - ((arg0->unk_0BC & 0x2000000) == 0x2000000) || - ((arg0->unk_0BC & 0x20000) == 0x20000) || - ((arg0->unk_044 & 0x800) != 0)) { - func_8002E594(arg0, arg1, arg3, arg2); + if (((player->unk_0BC & 0x80) == 0x80) || + ((player->unk_0BC & 0x40) == 0x40) || + ((player->unk_0BC & 0x400) == 0x400) || + ((player->unk_0BC & 0x4000) == 0x4000) || + ((player->unk_0BC & 0x80000) == 0x80000) || + ((player->unk_0BC & 0x800000) == 0x800000) || + ((player->unk_0BC & 0x1000000) == 0x1000000) || + ((player->unk_0BC & 0x2000000) == 0x2000000) || + ((player->unk_0BC & 0x20000) == 0x20000) || + ((player->unk_044 & 0x800) != 0)) { + func_8002E594(player, camera, arg3, arg2); } else { - func_8002D268(arg0, arg1, arg3, arg2); + func_8002D268(player, camera, arg3, arg2); } } else { - arg0->unk_0BC = arg0->unk_0BC & ~8; + player->unk_0BC = player->unk_0BC & ~8; } } -void func_80028E70(Player *arg0, Camera *arg1, s8 arg2, s8 arg3) { - if ((arg0->unk_000 & 0x8000) == 0x8000) { +void func_80028E70(Player *player, Camera *camera, s8 arg2, s8 arg3) { + if ((player->unk_000 & 0x8000) == 0x8000) { switch (gGamestate) { case ENDING_SEQUENCE: - if (!(arg0->unk_000 & 0x2000)) { - func_80038C6C(arg0, arg1, arg3, arg2); + if (!(player->unk_000 & 0x2000)) { + func_80038C6C(player, camera, arg3, arg2); } else { - arg0->unk_0BC &= ~8; + player->unk_0BC &= ~8; } break; default: - func_80027DA8(arg0, arg2); + func_80027DA8(player, arg2); switch (gModeSelection) { case TIME_TRIALS: case VERSUS: - func_80028C44(arg0, arg1, arg2, arg3); + func_80028C44(player, camera, arg2, arg3); break; case BATTLE: - func_80028D3C(arg0, arg1, arg2, arg3); + func_80028D3C(player, camera, arg2, arg3); break; default: - func_80028864(arg0, arg1, arg2, arg3); + func_80028864(player, camera, arg2, arg3); break; } break; @@ -839,9 +835,7 @@ void func_80029200(Player *player, s8 arg1) { } #ifdef MIPS_TO_C -//generated by m2c commit 9841ff34ca242f5f14b2eab2b54a7a65ac47d80f -static f32 D_800DDBD4[8] = { 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f }; - +//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Aug-17-2023 void func_8002934C(Player *player, Camera *camera, s8 arg2, s8 arg3) { f32 sp50; f32 sp28; @@ -889,19 +883,19 @@ void func_8002934C(Player *player, Camera *camera, s8 arg2, s8 arg3) { if ((temp_v1 & 0x40000000) == 0x40000000) { sp24 = temp_a3; sp50 = temp_f2; - temp_a3->unkCC = (s16) (s32) ((f64) func_802B7C40(temp_f0 / temp_f2) * 1.6); + player->unk_0CC[arg2] = (s16) (s32) ((f64) func_802B7C40(temp_f0 / temp_f2) * 1.6); } else { sp24 = temp_a3; sp50 = temp_f2; - temp_a3->unkCC = (s16) (func_802B7C40(temp_f0 / temp_f2) * 2); + player->unk_0CC[arg2] = func_802B7C40(temp_f0 / temp_f2) * 2; } } if ((player->unk_0BC & 0x04000000) == 0x04000000) { - temp_a3->unkCC = (s16) (s32) player->unk_D9C; + player->unk_0CC[arg2] = (s16) (s32) player->unk_D9C; } if ((player->unk_0BC & 8) != 8) { sp24 = temp_a3; - temp_a3->unkD4 = (s16) (s32) ((f64) func_802B7C40((player->unk_1F8 - player->unk_1FC) / temp_f2) * 0.9); + player->unk_0D4[arg2] = (s16) (s32) ((f64) func_802B7C40((player->unk_1F8 - player->unk_1FC) / temp_f2) * 0.9); } else { temp_v0 = player->unk_244[arg2]; if (((s32) temp_v0 >= 0) && ((s32) temp_v0 < 0x101)) { @@ -910,7 +904,7 @@ void func_8002934C(Player *player, Camera *camera, s8 arg2, s8 arg3) { var_f0 = player->pos[1] - player->rotY; } sp24 = temp_a3; - temp_a3->unkD4 = (s16) (s32) ((f64) func_802B7C40(var_f0 / temp_f2) * 0.5); + player->unk_0D4[arg2] = (s16) (s32) ((f64) func_802B7C40(var_f0 / temp_f2) * 0.5); } if ((player->unk_0BC & 0x04000000) == 0x04000000) { temp_a3->unkD4 = (s16) (s32) player->unk_D9C; @@ -1022,10 +1016,8 @@ GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002934C.s") #endif #ifdef MIPS_TO_C -//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc -s32 func_802AFA34(Player *, KartBoundingBoxCorner *, f32, f32, f32); /* extern */ -void func_802B6540(f32, f32 (*)[3], ?, ?, ?, s32); /* extern */ -static f32 D_800DDBD4[8] = { 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f }; +//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Aug-17-2023 +? func_802AFA34(Player *, KartBoundingBoxCorner *, f32, f32, f32); /* extern */ void func_80029B4C(Player *player, f32 arg1, f32 arg2, f32 arg3) { f32 sp94; @@ -1064,7 +1056,7 @@ void func_80029B4C(Player *player, f32 arg1, f32 arg2, f32 arg3) { var_f12 = (D_800DDBD4[player->characterId] / 2.0f) * 18.0f; } sp48 = var_f12; - func_802B6540(var_f12, (f32 (*)[3]) &sp5C[0], 0, 0x3F800000, 0, player->unk_02E + player->unk_0C0); + func_802B6540((f32 (*)[3]) &sp5C[0], 0.0f, 1.0f, 0.0f, (s16) (player->unk_02C[1] + player->unk_0C0)); temp_f0 = (f64) sp48; temp_f2 = sp48 - 2.0f; sp8C = (f32) (temp_f0 - 3.6); @@ -1168,11 +1160,6 @@ void func_80029B4C(Player *player, f32 arg1, f32 arg2, f32 arg3) { GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80029B4C.s") #endif -#ifdef NEEDS_RODATA -// data_0DD0A0_1_1.s -// might be plain data? -extern f32 D_800DDBD4[8];// = { 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f }; - void func_8002A194(Player *player, f32 arg1, f32 arg2, f32 arg3) { s32 stackPadding[2]; f32 temp_f12; @@ -1252,9 +1239,6 @@ void func_8002A194(Player *player, f32 arg1, f32 arg2, f32 arg3) { } } } -#else -GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002A194.s") -#endif // Near identical to func_802AC114 in memory.c void func_8002A5F4(Vec3f arg0, f32 arg1, Vec3f arg2, f32 arg3, f32 arg4) { @@ -2059,12 +2043,13 @@ void func_8002C7E4(Player *player, s8 arg1, s8 arg2) { } } -#ifdef NON_MATCHING -void func_8002C954(Player *player, s8 arg1, Vec3fs *arg2) { +void func_8002C954(Player *player, s8 arg1, Vec3f arg2) { f32 temp_f0; f32 var_f14; - Vec3fs *new_var; - + f32 xdist; + f32 ydist; + f32 zdist; + temp_f0 = player->pos[1] - player->unk_074; if ((((player->unk_0BC & 0x10000) != 0x10000) && ((player->unk_0BC & 0x100000) == 0x100000) || @@ -2084,7 +2069,6 @@ void func_8002C954(Player *player, s8 arg1, Vec3fs *arg2) { } player->unk_046 |= 0x20; } - new_var = arg2; if (((player->unk_000 & 0x4000) == 0x4000) && (((player->unk_094 / 18.0f) * 216.0f) > 30.0f)) { func_8001CA24(player, 3.0f); } @@ -2097,8 +2081,11 @@ void func_8002C954(Player *player, s8 arg1, Vec3fs *arg2) { func_80031F48(player, 18.0f); } if ((player->unk_000 & 0x4000) == 0x4000) { - Vec3fs *vec = &D_80165070[arg1]; - var_f14 = sqrtf((((vec->x - arg2->x) * (vec->x - arg2->x)) + ((vec->y - new_var->y) * (vec->y - new_var->y))) + ((vec->z - arg2->z) * (vec->z - arg2->z))) / 3; + xdist = D_80165070[arg1][0] - arg2[0]; + var_f14 = D_80165070[arg1][1] - arg2[1]; + ydist = var_f14; // okay + zdist = D_80165070[arg1][2] - arg2[2]; + var_f14 = sqrtf((xdist * xdist) + (ydist * ydist) + (zdist * zdist)) / 3; if (var_f14 >= 1.0) { var_f14 = 1.0f; } @@ -2121,9 +2108,6 @@ void func_8002C954(Player *player, s8 arg1, Vec3fs *arg2) { player->unk_08C /= 2; } } -#else -GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002C954.s") -#endif void func_8002CD48(Player *player, s8 arg1, s8 arg2) { if (((player->unk_0CA & 2) == 2) || ((player->unk_0CA & 8) == 8)) { @@ -2250,25 +2234,16 @@ GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002D028.s") #endif #ifdef MIPS_TO_C -//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b -? func_80027EDC(Player *, s8); /* extern */ +//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Aug-17-2023 ? func_80029B4C(Player *, f32, f32, f32); /* extern */ -? func_8002A79C(Player *, s8); /* extern */ -? func_8002AE38(Player *, s8, f32, f32, f32, f32); /* extern */ ? func_8002BB9C(Player *, f32 *, f32 *, s8, s32, f32 *); /* extern */ -? func_8002BF4C(Player *, s8); /* extern */ -? func_8002C4F8(Player *, s8); /* extern */ -? func_8002C7E4(f32, f32, Player *, s8, s8); /* extern */ -? func_8002C954(Player *, s8, f32 *); /* extern */ -? func_8002CD48(Player *, s8, s8); /* extern */ -? func_80037BB4(Player *, f32 *); /* extern */ ? func_800CADD0(u8, f32); /* extern */ +s16 gCurrentCourseId; /* unable to generate initializer */ static ? D_800E3CE8; /* unable to generate initializer */ static ? D_800E3CF4; /* unable to generate initializer */ static ? D_800E3D00; /* unable to generate initializer */ static ? D_800E3D0C; /* unable to generate initializer */ -f32 D_800E3D18[0x17]; -s16 gCurrentCourseId; /* unable to generate initializer */ +static ? D_800E3D18; /* unable to generate initializer */ void func_8002D268(Player *player, Camera *camera, s8 arg2, s8 arg3) { f32 sp18C; @@ -2296,21 +2271,16 @@ void func_8002D268(Player *player, Camera *camera, s8 arg2, s8 arg3) { f32 sp60; f32 *sp58; struct_D_8018CE10 *sp54; - ? *var_t7; f32 *temp_a1; + f32 *temp_v0_17; f32 *temp_v0_18; - f32 *temp_v0_19; - f32 *var_t6; - f32 temp_at; f32 temp_f0; f32 temp_f0_2; f32 temp_f0_7; f32 temp_f0_8; f32 temp_f0_9; - f32 temp_f12; + f32 temp_f12_3; f32 temp_f12_4; - f32 temp_f12_5; - f32 temp_f14; f32 temp_f2; f32 temp_f2_2; f32 temp_f2_6; @@ -2323,12 +2293,11 @@ void func_8002D268(Player *player, Camera *camera, s8 arg2, s8 arg3) { f64 temp_f0_4; f64 temp_f0_5; f64 temp_f0_6; + f64 temp_f12; f64 temp_f12_2; - f64 temp_f12_3; f64 temp_f2_3; f64 temp_f2_4; f64 temp_f2_5; - s16 temp_t6; s16 temp_v0_11; s16 temp_v0_13; s16 temp_v0_15; @@ -2339,7 +2308,6 @@ void func_8002D268(Player *player, Camera *camera, s8 arg2, s8 arg3) { s16 temp_v0_9; s32 temp_t4; s32 temp_t4_2; - s32 temp_v0_16; s32 temp_v0_2; s32 temp_v0_3; s32 temp_v1; @@ -2347,12 +2315,15 @@ void func_8002D268(Player *player, Camera *camera, s8 arg2, s8 arg3) { s32 var_v1; s32 var_v1_2; struct_D_8018CE10 *temp_t9; + u16 temp_t6_2; u16 temp_v0; u16 temp_v0_10; u16 temp_v0_12; u16 temp_v0_14; - u16 temp_v0_17; + u16 temp_v0_16; u16 temp_v0_8; + void *temp_t6; + void *temp_t7; sp184.unk0 = D_800E3CE8.unk0; sp184.unk4 = (s32) D_800E3CE8.unk4; @@ -2364,20 +2335,13 @@ void func_8002D268(Player *player, Camera *camera, s8 arg2, s8 arg3) { sp16C.unk4 = (s32) D_800E3D00.unk4; sp16C.unk8 = (s32) D_800E3D00.unk8; sp160.unk0 = D_800E3D0C.unk0; - var_t6 = D_800E3D18; - var_t7 = &sp104; sp160.unk4 = (s32) D_800E3D0C.unk4; sp160.unk8 = (s32) D_800E3D0C.unk8; - do { - temp_at = *var_t6; - var_t6 += 0xC; - var_t7 += 0xC; - var_t7->unk-C = temp_at; - var_t7->unk-8 = (s32) var_t6->unk-8; - var_t7->unk-4 = (s32) var_t6->unk-4; - } while (var_t6 != (D_800E3D18 + 0x54)); - var_t7->unk0 = (f32) var_t6->unk0; - var_t7->unk4 = (s32) var_t6->unk4; + M2C_MEMCPY_ALIGNED(&sp104, &D_800E3D18, 0x54); + temp_t7 = &sp104 + 0x54; + temp_t6 = &D_800E3D18 + 0x54; + temp_t7->unk0 = (s32) temp_t6->unk0; + temp_t7->unk4 = (s32) temp_t6->unk4; sp7C = 0; func_80027EDC(player, arg3); func_8002C11C(player); @@ -2387,7 +2351,7 @@ void func_8002D268(Player *player, Camera *camera, s8 arg2, s8 arg3) { func_8002B830(player, arg3, arg2); temp_v0 = player->unk_000; if (((temp_v0 & 0x4000) == 0x4000) && ((temp_v0 & 0x100) != 0x100)) { - func_8002BF4C(player, arg3); + func_8002BF4C(player, (u8) arg3); } func_8002CD48(player, arg3, arg2); if (((player->unk_0BC & 0x20000000) == 0x20000000) && (player->unk_228 >= 0x64)) { @@ -2448,30 +2412,28 @@ void func_8002D268(Player *player, Camera *camera, s8 arg2, s8 arg3) { sp17C = 0.0f; sp58 = temp_a1; func_802B63B8(&sp178, (f32 (*)[3]) temp_a1); - temp_f14 = spAC; - temp_f12 = temp_f14 + sp180; spB4 += sp178; - spAC = temp_f12; - func_8002C7E4(temp_f12, temp_f14, player, arg3, arg2); + spAC += sp180; + func_8002C7E4(player, arg3, arg2); sp18C = func_80030150(player, arg3); func_802B63B8(&sp184, (f32 (*)[3]) sp58); sp98 = player->unk_034[0]; sp9C = player->unk_034[1]; spA0 = player->unk_034[2]; - if (((player->unk_10C < 3) && ((s32) (u16) player->unk_256 < 3)) || ((player->unk_0BC & 0x2000) == 0x2000)) { + if (((player->unk_10C < 3) && ((s32) player->unk_256 < 3)) || ((player->unk_0BC & 0x2000) == 0x2000)) { temp_t4 = (s32) player->unk_07C >> 0x10; if ((temp_t4 >= 0x28) || (temp_t4 < -0x27)) { temp_f0_3 = (f64) sp98; - temp_f12_2 = (f64) sp7C; + temp_f12 = (f64) sp7C; temp_f2_3 = (f64) spA0; - sp98 = (f32) (temp_f0_3 + ((((f64) (sp184 + spB4 + sp160) - (temp_f0_3 * (0.12 * (f64) player->kartFriction))) / 6000.0) / (((f64) player->unk_20C * 0.6) + 1.0 + temp_f12_2))); - spA0 = (f32) (temp_f2_3 + ((((f64) (sp18C + spAC + sp168) - (temp_f2_3 * (0.12 * (f64) player->kartFriction))) / 6000.0) / (((f64) player->unk_20C * 0.6) + 1.0 + temp_f12_2))); + sp98 = (f32) (temp_f0_3 + ((((f64) (sp184 + spB4 + sp160) - (temp_f0_3 * (0.12 * (f64) player->kartFriction))) / 6000.0) / (((f64) player->unk_20C * 0.6) + 1.0 + temp_f12))); + spA0 = (f32) (temp_f2_3 + ((((f64) (sp18C + spAC + sp168) - (temp_f2_3 * (0.12 * (f64) player->kartFriction))) / 6000.0) / (((f64) player->unk_20C * 0.6) + 1.0 + temp_f12))); } else { temp_f0_4 = (f64) sp98; - temp_f12_3 = (f64) (sp7C + 1); + temp_f12_2 = (f64) (sp7C + 1); temp_f2_4 = (f64) spA0; - sp98 = (f32) (temp_f0_4 + ((((f64) (sp184 + spB4 + sp160) - (temp_f0_4 * (0.12 * (f64) player->kartFriction))) / 6000.0) / temp_f12_3)); - spA0 = (f32) (temp_f2_4 + ((((f64) (sp18C + spAC + sp168) - (temp_f2_4 * (0.12 * (f64) player->kartFriction))) / 6000.0) / temp_f12_3)); + sp98 = (f32) (temp_f0_4 + ((((f64) (sp184 + spB4 + sp160) - (temp_f0_4 * (0.12 * (f64) player->kartFriction))) / 6000.0) / temp_f12_2)); + spA0 = (f32) (temp_f2_4 + ((((f64) (sp18C + spAC + sp168) - (temp_f2_4 * (0.12 * (f64) player->kartFriction))) / 6000.0) / temp_f12_2)); } } else { temp_f0_5 = (f64) sp98; @@ -2494,16 +2456,16 @@ void func_8002D268(Player *player, Camera *camera, s8 arg2, s8 arg3) { temp_f0_7 = player->pos[0]; spF0 = temp_f0_7; temp_f2_6 = player->pos[2]; - temp_f12_4 = player->pos[1]; + temp_f12_3 = player->pos[1]; spE8 = temp_f2_6; player->rotX = temp_f0_7; player->rotZ = temp_f2_6; - player->rotY = temp_f12_4; + player->rotY = temp_f12_3; temp_t9 = &D_8018CE10[arg3]; sp54 = temp_t9; - spFC = temp_t9->unk_04 + (temp_f0_7 + player->unk_034[0]); - spF8 = player->unk_034[1] + temp_f12_4; - spF4 = temp_t9->unk_0C + (spE8 + player->unk_034[2]); + spFC = temp_t9->unk_04[0] + (temp_f0_7 + player->unk_034[0]); + spF8 = player->unk_034[1] + temp_f12_3; + spF4 = temp_t9->unk_04[2] + (spE8 + player->unk_034[2]); temp_v0_6 = player->unk_0CA; if (((temp_v0_6 & 2) != 2) && ((temp_v0_6 & 8) != 8) && ((player->unk_0BC & 0x04000000) != 0x04000000) && !(temp_v0_6 & 1)) { func_8002AAC0(player); @@ -2597,12 +2559,12 @@ void func_8002D268(Player *player, Camera *camera, s8 arg2, s8 arg3) { if (spA8 >= 0.0f) { spA8 = player->unk_110.unk3C[1]; if (spA8 >= 0.0f) { - temp_v0_14 = (u16) player->unk_256; + temp_v0_14 = player->unk_256; player->unk_046 &= 0xFFDF; if (temp_v0_14 != 0) { - temp_t6 = temp_v0_14 + 1; - player->unk_256 = temp_t6; - if ((temp_t6 & 0xFFFF) >= 0xA) { + temp_t6_2 = temp_v0_14 + 1; + player->unk_256 = temp_t6_2; + if ((temp_t6_2 & 0xFFFF) >= 0xA) { player->unk_256 = 0; } } @@ -2617,7 +2579,7 @@ void func_8002D268(Player *player, Camera *camera, s8 arg2, s8 arg3) { func_8008F5A4(player, arg3); } player->unk_074 = func_802ABE30(spFC, spF8, spF4, player->unk_110.unk3A); - if (((player->unk_000 & 0x4000) == 0x4000) && ((temp_v0_16 = gActiveScreenMode, (temp_v0_16 == 0)) || (temp_v0_16 == 2) || (temp_v0_16 == 1))) { + if (((player->unk_000 & 0x4000) == 0x4000) && ((gActiveScreenMode == 0) || (gActiveScreenMode == 2) || (gActiveScreenMode == 1))) { func_80029B4C(player, spFC, spF8, spF4); } else { func_8002A194(player, spFC, spF8, spF4); @@ -2625,16 +2587,16 @@ void func_8002D268(Player *player, Camera *camera, s8 arg2, s8 arg3) { func_8002AE38(player, arg3, spF0, spE8, spFC, spF4); player->unk_22C = player->unk_094; player->unk_094 = sqrtf((spA0 * spA0) + (sp98 * sp98)); - if ((player->unk_08C <= 0.0f) && ((f64) player->unk_094 <= 0.08) && (sp54->unk_04 == 0.0f) && (sp54->unk_0C == 0.0f)) { + if ((player->unk_08C <= 0.0f) && ((f64) player->unk_094 <= 0.08) && (sp54->unk_04[0] == 0.0f) && (sp54->unk_04[2] == 0.0f)) { sp98 += sp98 * -1.0f; spA0 += spA0 * -1.0f; } else { player->pos[0] = spFC; player->pos[2] = spF4; } - temp_v0_17 = player->unk_000; + temp_v0_16 = player->unk_000; player->pos[1] = spF8; - if ((temp_v0_17 & 0x4000) && !(temp_v0_17 & 0x1000)) { + if ((temp_v0_16 & 0x4000) && !(temp_v0_16 & 0x1000)) { func_8002BB9C(player, &spFC, &spF4, arg2, (s32) arg3, &sp98); } player->unk_064 = sp178; @@ -2642,20 +2604,20 @@ void func_8002D268(Player *player, Camera *camera, s8 arg2, s8 arg3) { player->unk_034[0] = sp98; player->unk_034[1] = sp9C; player->unk_034[2] = spA0; - temp_v0_18 = D_80165070[arg3]; - temp_v0_18->unk0 = sp98; - temp_v0_18->unk4 = sp9C; - temp_v0_18->unk8 = spA0; + temp_v0_17 = D_80165070[arg3]; + temp_v0_17->unk0 = sp98; + temp_v0_17->unk4 = sp9C; + temp_v0_17->unk8 = spA0; if ((player->unk_000 & 0x4000) == 0x4000) { temp_f2_7 = player->unk_094; - temp_v0_19 = &gKartTopSpeedTable[player->characterId]; - temp_f12_5 = *temp_v0_19; - if (temp_f12_5 < temp_f2_7) { - temp_f0_8 = temp_f12_5 / temp_f2_7; + temp_v0_18 = &gKartTopSpeedTable[player->characterId]; + temp_f12_4 = *temp_v0_18; + if (temp_f12_4 < temp_f2_7) { + temp_f0_8 = temp_f12_4 / temp_f2_7; player->unk_034[0] *= temp_f0_8; player->unk_034[1] *= temp_f0_8; player->unk_034[2] *= temp_f0_8; - player->unk_094 = *temp_v0_19; + player->unk_094 = *temp_v0_18; } } if ((player->unk_044 & 1) == 1) { @@ -2692,13 +2654,8 @@ void func_8002E4C4(Player *player) { } #ifdef MIPS_TO_C -//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Aug-17-2023 ? func_80029B4C(Player *, f32, f32, f32); /* extern */ -? func_8002AE38(Player *, s8, f32, f32, f32, f32); /* extern */ -? func_8002C4F8(Player *, s8); /* extern */ -? func_8002C7E4(Player *, s8, s8); /* extern */ -? func_8002C954(Player *, s8, f32 *); /* extern */ -? func_8002CD48(Player *, s8, s8); /* extern */ ? func_800CADD0(u8, f32); /* extern */ static ? D_800E3D74; /* unable to generate initializer */ static ? D_800E3D80; /* unable to generate initializer */ @@ -2726,7 +2683,7 @@ void func_8002E594(Player *player, Camera *camera, s8 arg2, s8 arg3) { f32 *sp40; f32 *temp_a0; f32 *temp_a0_2; - f32 *temp_v0_13; + f32 *temp_v0_12; f32 temp_f0; f32 temp_f0_5; f32 temp_f0_6; @@ -2741,7 +2698,6 @@ void func_8002E594(Player *player, Camera *camera, s8 arg2, s8 arg3) { f64 temp_f0_4; f64 temp_f2; f64 temp_f2_2; - s16 temp_t8; s16 temp_v0_10; s16 temp_v0_4; s16 temp_v0_6; @@ -2751,13 +2707,13 @@ void func_8002E594(Player *player, Camera *camera, s8 arg2, s8 arg3) { s32 temp_t5; s32 temp_v0; s32 temp_v0_11; - s32 temp_v0_12; s32 temp_v0_2; s32 temp_v0_3; s32 temp_v1_4; s32 var_v0; s32 var_v0_2; struct_D_8018CE10 *temp_v0_5; + u16 temp_t8; u16 temp_v0_9; u16 temp_v1; u16 temp_v1_2; @@ -2798,7 +2754,7 @@ void func_8002E594(Player *player, Camera *camera, s8 arg2, s8 arg3) { temp_a0 = player->unk_174[0]; sp40 = temp_a0; func_802B6540((f32 (*)[3]) temp_a0, player->unk_058, player->unk_05C, player->unk_060, (s16) (s32) player->unk_02C[1]); - func_802B6540((f32 (*)[3]) player->unk_150, player->unk_058, player->unk_05C, player->unk_060, (s16) (s32) player->unk_0AE); + func_802B6540((f32 (*)[3]) player->unk_150[0], player->unk_058, player->unk_05C, player->unk_060, (s16) (s32) player->unk_0AE); } else { temp_a0_2 = player->unk_174[0]; sp40 = temp_a0_2; @@ -2806,14 +2762,14 @@ void func_8002E594(Player *player, Camera *camera, s8 arg2, s8 arg3) { } spF4 = func_80030150(player, arg3); if (sp46 == 1) { - func_802B63B8(&spEC, (f32 (*)[3]) player->unk_150); + func_802B63B8(&spEC, (f32 (*)[3]) player->unk_150[0]); } else { func_802B63B8(&spEC, (f32 (*)[3]) sp40); } sp54 = player->unk_034[0]; sp58 = player->unk_034[1]; sp5C = player->unk_034[2]; - if ((player->unk_10C < 3) && ((s32) (u16) player->unk_256 < 3) && (temp_v0_3 = player->unk_0BC, ((temp_v0_3 & 0x400) != 0x400)) && ((temp_v0_3 & 0x01000000) != 0x01000000) && ((temp_v0_3 & 0x02000000) != 0x02000000)) { + if ((player->unk_10C < 3) && ((s32) player->unk_256 < 3) && (temp_v0_3 = player->unk_0BC, ((temp_v0_3 & 0x400) != 0x400)) && ((temp_v0_3 & 0x01000000) != 0x01000000) && ((temp_v0_3 & 0x02000000) != 0x02000000)) { temp_f0_2 = (f64) sp54; temp_f2 = (f64) sp5C; sp54 = (f32) (temp_f0_2 + ((((f64) (spEC + sp80 + spD4) - (temp_f0_2 * (0.12 * (f64) player->kartFriction))) / 6000.0) / (f64) ((player->unk_20C * 5.0f) + 1.0f))); @@ -2840,10 +2796,10 @@ void func_8002E594(Player *player, Camera *camera, s8 arg2, s8 arg3) { player->rotY = temp_f2_3; player->rotZ = temp_f18; temp_v0_5 = &D_8018CE10[arg3]; - spD0 = temp_v0_5->unk_04 + (temp_f0_5 + player->unk_034[0]); + spD0 = temp_v0_5->unk_04[0] + (temp_f0_5 + player->unk_034[0]); spCC = player->unk_034[1] + temp_f2_3; spB4 = temp_f18; - temp_f6 = temp_v0_5->unk_0C + (temp_f18 + player->unk_034[2]); + temp_f6 = temp_v0_5->unk_04[2] + (temp_f18 + player->unk_034[2]); spC8 = temp_f6; func_8002AAC0(player); temp_f4 = spCC + player->kartHopVelocity; @@ -2945,7 +2901,7 @@ block_63: if (sp74 >= 0.0f) { sp74 = player->unk_110.unk3C[1]; if (sp74 >= 0.0f) { - temp_v0_9 = (u16) player->unk_256; + temp_v0_9 = player->unk_256; player->unk_046 &= 0xFFDF; if (temp_v0_9 != 0) { temp_t8 = temp_v0_9 + 1; @@ -2965,17 +2921,17 @@ block_63: func_8008F5A4(player, arg3); } player->unk_074 = func_802ABE30(spD0, spCC, spC8, player->unk_110.unk3A); - if (((player->unk_000 & 0x4000) == 0x4000) && ((temp_v0_11 = gActiveScreenMode, (temp_v0_11 == 0)) || (temp_v0_11 == 2) || (temp_v0_11 == 1))) { + if (((player->unk_000 & 0x4000) == 0x4000) && ((gActiveScreenMode == 0) || (gActiveScreenMode == 2) || (gActiveScreenMode == 1))) { func_80029B4C(player, spD0, spCC, spC8); } else { func_8002A194(player, spD0, spCC, spC8); } func_8002AE38(player, arg3, spBC, spB4, spD0, spC8); player->unk_22C = player->unk_094; - temp_v0_12 = player->unk_0BC; + temp_v0_11 = player->unk_0BC; player->unk_094 = sqrtf((sp5C * sp5C) + (sp54 * sp54)); - temp_v1_4 = temp_v0_12 & 0x400; - if (((temp_v1_4 != 0x400) && (player->unk_08C <= 0.0f) && ((f64) player->unk_094 < 0.13)) || ((temp_v1_4 != 0x400) && (player->unk_08C <= 0.0f) && ((f64) player->unk_094 < 0.2) && ((temp_v0_12 & 1) == 1))) { + temp_v1_4 = temp_v0_11 & 0x400; + if (((temp_v1_4 != 0x400) && (player->unk_08C <= 0.0f) && ((f64) player->unk_094 < 0.13)) || ((temp_v1_4 != 0x400) && (player->unk_08C <= 0.0f) && ((f64) player->unk_094 < 0.2) && ((temp_v0_11 & 1) == 1))) { sp54 += sp54 * -1.0f; sp5C += sp5C * -1.0f; } else { @@ -2990,14 +2946,14 @@ block_63: player->unk_034[2] = sp5C; if ((player->unk_000 & 0x4000) == 0x4000) { temp_f2_4 = player->unk_094; - temp_v0_13 = &gKartTopSpeedTable[player->characterId]; - temp_f12 = *temp_v0_13; + temp_v0_12 = &gKartTopSpeedTable[player->characterId]; + temp_f12 = *temp_v0_12; if (temp_f12 < temp_f2_4) { temp_f0_6 = temp_f12 / temp_f2_4; player->unk_034[0] *= temp_f0_6; player->unk_034[1] *= temp_f0_6; player->unk_034[2] *= temp_f0_6; - player->unk_094 = *temp_v0_13; + player->unk_094 = *temp_v0_12; } } func_8002C4F8(player, arg3); @@ -3006,140 +2962,105 @@ block_63: GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002E594.s") #endif -#ifdef MIPS_TO_C -//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b -//? func_8002CD48(Player *, s8, s8); /* extern */ -//static ? D_800E3D98; /* unable to generate initializer */ -//static ? D_800E3DA4; /* unable to generate initializer */ -//static ? D_800E3DB0; /* unable to generate initializer */ -//static ? D_800E3DBC; /* unable to generate initializer */ - -void func_802B63B8(Vec3f, Mat3); - void control_cpu_movement(Player *player, Camera *camera, s8 arg2, s8 arg3) { - f32 spFC; - f32 spF4; - //? spE8; - f32 spDC; - f32 spD0; + Vec3f spF4 = {0.0f, 0.0f, 1.0f}; + Vec3f spE8 = {0.0f, 0.0f, 0.0f}; + Vec3f spDC = {0.0f, 0.0f, 0.0f}; + Vec3f spD0 = {0.0f, 0.0f, 0.0f}; f32 spCC; + f32 stackPadding00; f32 spC4; + f32 stackPadding01; + f32 stackPadding02; + f32 stackPadding03; + f32 stackPadding04; + f32 stackPadding05; + f32 stackPadding06; + f32 stackPadding07; + f32 stackPadding08; + f32 stackPadding09; + f32 stackPadding10; + f32 stackPadding11; + f32 stackPadding12; + f32 stackPadding13; + f32 stackPadding14; + f32 stackPadding15; f32 sp84; + f32 stackPadding16; f32 sp7C; - f32 sp70; - f32 sp6C; - f32 sp68; - f32 sp40; - f32 *sp3C; - f32 *temp_a1; - f32 *temp_v0; - f32 *temp_v1; + f32 stackPadding17; + f32 stackPadding18; + Vec3f sp68; + f32 stackPadding19; + f32 stackPadding20; + f32 stackPadding21; + f32 stackPadding22; + f32 stackPadding23; + f32 stackPadding24; + f32 stackPadding25; + f32 stackPadding26; f32 temp_f0_2; - f32 temp_f12; - f32 temp_f12_2; - f32 temp_f14; - f32 temp_f2_2; - f32 temp_f8; - f32 temp_f8_2; - f64 temp_f0; - f64 temp_f2; - s32 temp_t1; - - Vec3f D_800E3D98 = { 0, 0, 1.0 }; - Vec3f D_800E3DA4 = { 0, 0, 0 }; - Vec3f D_800E3DB0 = { 0, 0, 0 }; - Vec3f D_800E3DBC = { 0, 0, 0 }; - - - //spF4.unk0 = D_800E3D98.unk0; - //spF4.unk4 = (s32) D_800E3D98.unk4; - //spF4.unk8 = (s32) D_800E3D98.unk8; - //spE8.unk0 = (s32) D_800E3DA4.unk0; - //spE8.unk8 = (s32) D_800E3DA4.unk8; - //spE8.unk4 = (s32) D_800E3DA4.unk4; - //spDC.unk0 = D_800E3DB0.unk0; - //spDC.unk4 = (s32) D_800E3DB0.unk4; - //spDC.unk8 = (s32) D_800E3DB0.unk8; - //spD0.unk0 = D_800E3DBC.unk0; - //spD0.unk4 = (s32) D_800E3DBC.unk4; - //spD0.unk8 = (s32) D_800E3DBC.unk8; + f32 test; player->unk_0BC |= 0x1000; player->unk_044 |= 0x10; - sp40 = D_80164510[arg3]; + test = D_80164510[arg3]; player->unk_204 = 0; player->unk_0BC &= ~0x10; func_8002B830(player, arg3, arg2); func_8002CD48(player, arg3, arg2); - sp84 = spDC + (0.0f * player->unk_064); - sp7C = D_800E3DA4[1] + (0.0f * player->unk_06C); + sp84 = spDC[0] + (0 * player->unk_064); + sp7C = spDC[2] + (0 * player->unk_06C); player->unk_10C = 0; player->unk_256 = 0; - player->unk_0BC &= 0xFFFF7FFF; - temp_a1 = player->unk_174[0]; - spFC = func_80030150(player, arg3); - sp3C = temp_a1; - func_802B63B8(D_800E3D98, temp_a1); - sp6C = 0.0f; - sp68 = player->unk_034[0]; - sp70 = player->unk_034[2]; - temp_f0 = (f64) sp68; - temp_f2 = (f64) sp70; - temp_f8 = (f32) (temp_f0 + (((f64) (spF4 + sp84 + spD0) - (temp_f0 * (0.12 * (f64) player->kartFriction))) / 6000.0)); - sp68 = temp_f8; - temp_f8_2 = (f32) (temp_f2 + (((f64) (spFC + sp7C + D_800E3DA4[1]) - (temp_f2 * (0.12 * (f64) player->kartFriction))) / 6000.0)); - sp70 = temp_f8_2; - temp_f12 = player->pos[0]; - temp_f14 = player->pos[2]; - player->rotX = temp_f12; - player->rotZ = temp_f14; - player->rotY = sp40; - spCC = player->unk_034[0] + temp_f12; - spC4 = player->unk_034[2] + temp_f14; + player->unk_0BC &= ~0x8000; + spF4[2] = func_80030150(player, arg3); + func_802B63B8(spF4, player->unk_174); + sp68[0] = player->unk_034[0]; + sp68[1] = 0; + sp68[2] = player->unk_034[2]; + sp68[0] += (((spF4[0] + sp84) + spD0[0]) - (sp68[0] * (0.12 * player->kartFriction))) / 6000.0; + sp68[2] += (((spF4[2] + sp7C) + spD0[2]) - (sp68[2] * (0.12 * player->kartFriction))) / 6000.0; + player->rotX = player->pos[0]; + player->rotY = test; + player->rotZ = player->pos[2]; + spCC = player->pos[0] + player->unk_034[0]; + spC4 = player->pos[2] + player->unk_034[2]; player->unk_0C0 = 0; - player->kartHopJerk = 0.0f; - player->kartHopAcceleration = 0.0f; - player->kartHopVelocity = 0.0f; - func_802B6540((f32 (*)[3]) sp3C, player->unk_058, player->unk_05C, player->unk_060, (s16) (s32) player->unk_02C[1]); + player->kartHopJerk = 0; + player->kartHopAcceleration = 0; + player->kartHopVelocity = 0; + func_802B6540(player->unk_174, player->unk_058, player->unk_05C, player->unk_060, player->unk_02C[1]); player->unk_0C2 = 0; - temp_t1 = player->unk_0BC & ~2; - player->unk_0BC = temp_t1; - player->unk_0BC = temp_t1 & ~8; + player->unk_0BC &= ~2; + player->unk_0BC &= ~8; player->unk_0C4 = 0; player->unk_206 = 0; + stackPadding26 = (sp68[0] * sp68[0]) + (sp68[2] * sp68[2]); player->unk_22C = player->unk_094; - player->unk_094 = sqrtf((sp70 * sp70) + (temp_f8 * temp_f8)); + player->unk_094 = sqrtf(stackPadding26); player->pos[0] = spCC; player->pos[2] = spC4; - player->unk_064 = 0.0f; - player->unk_06C = 0.0f; - player->pos[1] = sp40; - temp_v0 = D_80165070[arg3]; - player->unk_034[0] = sp68; - player->unk_034[1] = sp6C; - player->unk_034[2] = sp70; - D_80165070[arg3][0] = sp68; - D_80165070[arg3][1] = sp6C; - D_80165070[arg3][2] = temp_f8_2; - temp_f2_2 = player->unk_094; - temp_v1 = &gKartTopSpeedTable[player->characterId]; - temp_f12_2 = *temp_v1; - if (temp_f12_2 < temp_f2_2) { - temp_f0_2 = temp_f12_2 / temp_f2_2; + player->pos[1] = test; + player->unk_064 = 0; + player->unk_06C = 0; + player->unk_034[0] = sp68[0]; + player->unk_034[1] = sp68[1]; + player->unk_034[2] = sp68[2]; + D_80165070[arg3][0] = sp68[0]; + D_80165070[arg3][1] = sp68[1]; + D_80165070[arg3][2] = sp68[2]; + if (gKartTopSpeedTable[player->characterId] < player->unk_094) { + temp_f0_2 = gKartTopSpeedTable[player->characterId] / player->unk_094; player->unk_034[0] *= temp_f0_2; player->unk_034[1] *= temp_f0_2; player->unk_034[2] *= temp_f0_2; - player->unk_094 = *temp_v1; + player->unk_094 = gKartTopSpeedTable[player->characterId]; } } -#else -GLOBAL_ASM("asm/non_matchings/code_80027D00/control_cpu_movement.s") -#endif #ifdef MIPS_TO_C -//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Aug-16-2023 ? func_80029B4C(Player *, f32, f32, f32); /* extern */ -? func_8002AE38(Player *, s8, f32, f32, f32, f32); /* extern */ -? func_80037BB4(? *); /* extern */ static ? D_800E3DC8; /* unable to generate initializer */ static ? D_800E3DD4; /* unable to generate initializer */ static ? D_800E3DE0; /* unable to generate initializer */ @@ -3150,7 +3071,7 @@ void func_8002F730(Player *player, Camera *camera, s8 arg2, s8 arg3) { f32 spF4; f32 spE8; ? spDC; - ? spD0; + f32 spD0; f32 spCC; f32 spC8; f32 spC4; @@ -3168,8 +3089,8 @@ void func_8002F730(Player *player, Camera *camera, s8 arg2, s8 arg3) { f32 sp44; f32 sp34; f32 *temp_a1; + f32 *temp_v0; f32 *temp_v0_2; - f32 *temp_v0_3; f32 temp_f0_2; f32 temp_f10; f32 temp_f12_2; @@ -3182,7 +3103,6 @@ void func_8002F730(Player *player, Camera *camera, s8 arg2, s8 arg3) { f64 temp_f0; f64 temp_f12; f64 temp_f2; - s32 temp_v0; spF4.unk0 = D_800E3DC8.unk0; spF4.unk4 = (s32) D_800E3DC8.unk4; @@ -3193,10 +3113,10 @@ void func_8002F730(Player *player, Camera *camera, s8 arg2, s8 arg3) { spDC.unk0 = (s32) D_800E3DE0.unk0; spDC.unk4 = (s32) D_800E3DE0.unk4; spDC.unk8 = (s32) D_800E3DE0.unk8; - spD0.unk0 = (s32) D_800E3DEC.unk0; + spD0.unk0 = D_800E3DEC.unk0; spD0.unk4 = (s32) D_800E3DEC.unk4; spD0.unk8 = (s32) D_800E3DEC.unk8; - func_80037BB4(&spD0); + func_80037BB4(player, &spD0); sp84 = player->unk_064 * 0.0f; sp7C = player->unk_06C * 0.0f; temp_a1 = player->unk_174[0]; @@ -3241,7 +3161,7 @@ void func_8002F730(Player *player, Camera *camera, s8 arg2, s8 arg3) { func_8003F46C(player, &sp5C, &sp68, &spE8, &sp78, &spCC, &spC8, &spC4); } player->unk_074 = func_802ABE30(spCC, spC8, spC4, player->unk_110.unk3A); - if (((player->unk_000 & 0x4000) == 0x4000) && ((temp_v0 = gActiveScreenMode, (temp_v0 == 0)) || (temp_v0 == 2) || (temp_v0 == 1))) { + if (((player->unk_000 & 0x4000) == 0x4000) && ((gActiveScreenMode == 0) || (gActiveScreenMode == 2) || (gActiveScreenMode == 1))) { func_80029B4C(player, spCC, spC8, spC4); } else { func_8002A194(player, spCC, spC8, spC4); @@ -3263,20 +3183,20 @@ void func_8002F730(Player *player, Camera *camera, s8 arg2, s8 arg3) { player->unk_034[0] = sp68; player->unk_034[1] = sp6C; player->unk_034[2] = sp70; - temp_v0_2 = D_80165070[arg3]; - temp_v0_2->unk0 = sp68; - temp_v0_2->unk4 = sp6C; - temp_v0_2->unk8 = sp70; + temp_v0 = D_80165070[arg3]; + temp_v0->unk0 = sp68; + temp_v0->unk4 = sp6C; + temp_v0->unk8 = sp70; if ((player->unk_000 & 0x4000) == 0x4000) { temp_f2_3 = player->unk_094; - temp_v0_3 = &gKartTopSpeedTable[player->characterId]; - temp_f12_2 = *temp_v0_3; + temp_v0_2 = &gKartTopSpeedTable[player->characterId]; + temp_f12_2 = *temp_v0_2; if (temp_f12_2 < temp_f2_3) { temp_f0_2 = temp_f12_2 / temp_f2_3; player->unk_034[0] *= temp_f0_2; player->unk_034[1] *= temp_f0_2; player->unk_034[2] *= temp_f0_2; - player->unk_094 = *temp_v0_3; + player->unk_094 = *temp_v0_2; } } } @@ -4241,167 +4161,8 @@ void func_80033A40(Player *player, s32 *arg1, s32 *arg2, s32 arg3, s32 arg4, s32 } #ifdef MIPS_TO_C -//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c -? func_80033884(Player *, s32 *, s32 *, s32, s32, s32, s32); /* extern */ -? func_80033A40(Player *, s32 *, s32 *, s32, s32, s32, f32); /* extern */ -f32 D_800E3DF8[0x9C] = { - 0.0f, - 0.5f, - 0.5f, - 0.5f, - 0.5f, - 0.5f, - 0.5f, - 0.6f, - 0.6f, - 0.6f, - 0.6f, - 0.6f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.6f, - 0.6f, - 0.6f, - 0.6f, - 0.6f, - 0.6f, - 0.6f, - 0.6f, - 0.6f, - 0.6f, - 0.6f, - 0.6f, - 0.5f, - 0.5f, - 0.5f, - 0.5f, - 0.6f, - 0.6f, - 0.6f, - 0.6f, - 0.6f, - 0.6f, - 0.6f, - 0.6f, - 0.6f, - 0.6f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.6f, - 0.6f, - 0.6f, - 0.6f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.7f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, - 0.8f, -}; +//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Aug-16-2023 +static ? D_800E3DF8; /* unable to generate initializer */ void func_80033AE0(Player *player, struct Controller *controller, s8 arg2) { s32 sp2E4; @@ -4483,7 +4244,7 @@ void func_80033AE0(Player *player, struct Controller *controller, s8 arg2) { u8 temp_v0_9; sp2C0 = 0.0f; - M2C_MEMCPY_ALIGNED(&sp44, D_800E3DF8, 0x270); + M2C_MEMCPY_ALIGNED(&sp44, &D_800E3DF8, 0x270); temp_v1 = player->unk_0BC; if ((((temp_v1 & 2) != 2) && (((temp_lo = (s16) player->unk_0C0 / 182, ((temp_lo < 7) != 0)) && (temp_lo >= -6)) || ((controller->button & 0x10) != 0x10))) || (((player->unk_094 / 18.0f) * 216.0f) <= 20.0f) || ((temp_v1 & 0x8000) == 0x8000)) { sp2BC = 0.0f; diff --git a/src/code_80027D00.h b/src/code_80027D00.h index 72fe717e0..d5542be0e 100644 --- a/src/code_80027D00.h +++ b/src/code_80027D00.h @@ -7,8 +7,16 @@ /* Function Prototypes */ s32 get_player_index_for_player(Player*); +void func_80027DA8(Player*, s8); void func_80027EDC(Player*, s8); + +void func_80028864(Player*, Camera*, s8, s8); +void func_80028C44(Player*, Camera*, s8, s8); +void func_80028D3C(Player*, Camera*, s8, s8); +void func_80028E70(Player*, Camera*, s8, s8); +void func_80028F5C(s32, s32, s32, s32); void func_80028F70(); + void func_80029060(); void func_80029150(); void func_80029158(); @@ -17,6 +25,7 @@ void func_800291F0(); void func_800291F8(); void func_80029200(Player*, s8); void func_8002934C(Player*, Camera*, s8, s8); + void func_8002A194(Player*, f32, f32, f32); void func_8002A5F4(Vec3f, f32, Vec3f, f32, f32); void func_8002A704(Player*, s8); @@ -29,19 +38,32 @@ void func_8002AE20(); void func_8002AE28(); void func_8002AE30(); void func_8002AE38(Player*, s8, f32, f32, f32, f32); + void func_8002B218(Player*); void func_8002B308(Player*, s8, s8); void func_8002B5C0(Player*, s8, s8); void func_8002B830(Player*, s8, s8); void func_8002B8A4(Player*, Player*); +void func_8002B9CC(Player*, s8, s32); void func_8002BD58(Player*); +void func_8002BF4C(Player*, u8); + void func_8002C11C(Player*); void func_8002C17C(Player*, s8); void func_8002C4F8(Player*, s8); +void func_8002C7E4(Player*, s8, s8); +void func_8002C954(Player*, s8, Vec3f); +void func_8002CD48(Player*, s8, s8); + +void func_8002D028(Player*, s8); void func_8002D268(Player*, Camera*, s8, s8); + void func_8002E4C4(Player*); +void control_cpu_movement(Player*,Camera*, s8, s8); + void func_8002FCA8(Player*, s8); void func_8002FE84(Player*, f32); + f32 func_80030150(Player*, s8); void func_80030A34(Player*); void func_80030C34(Player*); @@ -58,17 +80,26 @@ void func_80033280(Player*, f32); void func_800332E8(Player*, s32); void func_800337CC(Player*, f32, s32); void func_80033850(Player*, f32); +void func_80033884(Player*, s32*, s32*, s32, s32, s32, s32); +void func_80033940(Player*, s32*, s32, s32, f32); +void func_800339C4(Player*, s32*, s32, s32, f32); +void func_80033A40(Player*, s32*, s32*, s32, s32, s32, f32); +void func_80033AE0(Player*, struct Controller*, s8); + void func_8003680C(Player*, s16); void func_80036C5C(Player*); void func_80036CB4(Player*); void func_80036DB4(Player*, Vec3f, Vec3f); + void func_800371F4(Player*, Vec3f, Vec3f); void func_80037614(Player*, Vec3f, Vec3f); void func_8003777C(Player*, Vec3f, Vec3f); void func_800378E8(Player*, Vec3f, Vec3f); void func_80037A4C(Player*, Vec3f, Vec3f); void func_80037BB4(Player*player, Vec3f); -void func_80033AE0(Player*, struct Controller*, s8); +void func_80037CFC(Player*, struct Controller*, s8); + +void func_800381AC(Player*, struct Controller*, s8); void func_800382DC(); s16 func_80038534(struct Controller*); s16 func_800388B0(struct Controller*);