diff --git a/asm/non_matchings/code_80057C60/func_8005DA30.s b/asm/non_matchings/code_80057C60/func_8005DA30.s deleted file mode 100644 index 6191f8d9c..000000000 --- a/asm/non_matchings/code_80057C60/func_8005DA30.s +++ /dev/null @@ -1,45 +0,0 @@ -glabel func_8005DA30 -/* 05E630 8005DA30 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 05E634 8005DA34 AFA50024 */ sw $a1, 0x24($sp) -/* 05E638 8005DA38 00057400 */ sll $t6, $a1, 0x10 -/* 05E63C 8005DA3C 000E2C03 */ sra $a1, $t6, 0x10 -/* 05E640 8005DA40 AFA7002C */ sw $a3, 0x2c($sp) -/* 05E644 8005DA44 0007C600 */ sll $t8, $a3, 0x18 -/* 05E648 8005DA48 00183E03 */ sra $a3, $t8, 0x18 -/* 05E64C 8005DA4C 14A00011 */ bnez $a1, .L8005DA94 -/* 05E650 8005DA50 AFBF001C */ sw $ra, 0x1c($sp) -/* 05E654 8005DA54 000640C0 */ sll $t0, $a2, 3 -/* 05E658 8005DA58 01064021 */ addu $t0, $t0, $a2 -/* 05E65C 8005DA5C 000840C0 */ sll $t0, $t0, 3 -/* 05E660 8005DA60 00881021 */ addu $v0, $a0, $t0 -/* 05E664 8005DA64 84490546 */ lh $t1, 0x546($v0) -/* 05E668 8005DA68 83AB0033 */ lb $t3, 0x33($sp) -/* 05E66C 8005DA6C 29210003 */ slti $at, $t1, 3 -/* 05E670 8005DA70 10200004 */ beqz $at, .L8005DA84 -/* 05E674 8005DA74 00000000 */ nop -/* 05E678 8005DA78 844A0544 */ lh $t2, 0x544($v0) -/* 05E67C 8005DA7C 55400006 */ bnel $t2, $zero, .L8005DA98 -/* 05E680 8005DA80 000660C0 */ sll $t4, $a2, 3 -.L8005DA84: -/* 05E684 8005DA84 0C017626 */ jal func_8005D898 -/* 05E688 8005DA88 AFAB0010 */ sw $t3, 0x10($sp) -/* 05E68C 8005DA8C 1000000D */ b .L8005DAC4 -/* 05E690 8005DA90 8FBF001C */ lw $ra, 0x1c($sp) -.L8005DA94: -/* 05E694 8005DA94 000660C0 */ sll $t4, $a2, 3 -.L8005DA98: -/* 05E698 8005DA98 01866021 */ addu $t4, $t4, $a2 -/* 05E69C 8005DA9C 000C60C0 */ sll $t4, $t4, 3 -/* 05E6A0 8005DAA0 008C6821 */ addu $t5, $a0, $t4 -/* 05E6A4 8005DAA4 85AE0546 */ lh $t6, 0x546($t5) -/* 05E6A8 8005DAA8 83AF0033 */ lb $t7, 0x33($sp) -/* 05E6AC 8005DAAC 29C10003 */ slti $at, $t6, 3 -/* 05E6B0 8005DAB0 54200004 */ bnel $at, $zero, .L8005DAC4 -/* 05E6B4 8005DAB4 8FBF001C */ lw $ra, 0x1c($sp) -/* 05E6B8 8005DAB8 0C017626 */ jal func_8005D898 -/* 05E6BC 8005DABC AFAF0010 */ sw $t7, 0x10($sp) -/* 05E6C0 8005DAC0 8FBF001C */ lw $ra, 0x1c($sp) -.L8005DAC4: -/* 05E6C4 8005DAC4 27BD0020 */ addiu $sp, $sp, 0x20 -/* 05E6C8 8005DAC8 03E00008 */ jr $ra -/* 05E6CC 8005DACC 00000000 */ nop diff --git a/asm/non_matchings/code_80057C60/func_80061224.s b/asm/non_matchings/code_80057C60/func_80061224.s deleted file mode 100644 index 3ebae86e6..000000000 --- a/asm/non_matchings/code_80057C60/func_80061224.s +++ /dev/null @@ -1,58 +0,0 @@ -glabel func_80061224 -/* 061E24 80061224 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 061E28 80061228 00057400 */ sll $t6, $a1, 0x10 -/* 061E2C 8006122C 000E7C03 */ sra $t7, $t6, 0x10 -/* 061E30 80061230 AFA50024 */ sw $a1, 0x24($sp) -/* 061E34 80061234 AFA7002C */ sw $a3, 0x2c($sp) -/* 061E38 80061238 0007C600 */ sll $t8, $a3, 0x18 -/* 061E3C 8006123C 00183E03 */ sra $a3, $t8, 0x18 -/* 061E40 80061240 01E02825 */ move $a1, $t7 -/* 061E44 80061244 15E00013 */ bnez $t7, .L80061294 -/* 061E48 80061248 AFBF001C */ sw $ra, 0x1c($sp) -/* 061E4C 8006124C 24020048 */ li $v0, 72 -/* 061E50 80061250 00C20019 */ multu $a2, $v0 -/* 061E54 80061254 83AE0033 */ lb $t6, 0x33($sp) -/* 061E58 80061258 00004012 */ mflo $t0 -/* 061E5C 8006125C 00884821 */ addu $t1, $a0, $t0 -/* 061E60 80061260 852A0276 */ lh $t2, 0x276($t1) -/* 061E64 80061264 1D400007 */ bgtz $t2, .L80061284 -/* 061E68 80061268 00000000 */ nop -/* 061E6C 8006126C 01E20019 */ multu $t7, $v0 -/* 061E70 80061270 00005812 */ mflo $t3 -/* 061E74 80061274 008B6021 */ addu $t4, $a0, $t3 -/* 061E78 80061278 858D0274 */ lh $t5, 0x274($t4) -/* 061E7C 8006127C 55A00006 */ bnel $t5, $zero, .L80061298 -/* 061E80 80061280 24020048 */ li $v0, 72 -.L80061284: -/* 061E84 80061284 0C01844C */ jal func_80061130 -/* 061E88 80061288 AFAE0010 */ sw $t6, 0x10($sp) -/* 061E8C 8006128C 10000017 */ b .L800612EC -/* 061E90 80061290 8FBF001C */ lw $ra, 0x1c($sp) -.L80061294: -/* 061E94 80061294 24020048 */ li $v0, 72 -.L80061298: -/* 061E98 80061298 00C20019 */ multu $a2, $v0 -/* 061E9C 8006129C 83A80033 */ lb $t0, 0x33($sp) -/* 061EA0 800612A0 00007812 */ mflo $t7 -/* 061EA4 800612A4 008FC021 */ addu $t8, $a0, $t7 -/* 061EA8 800612A8 87190276 */ lh $t9, 0x276($t8) -/* 061EAC 800612AC 2B210002 */ slti $at, $t9, 2 -/* 061EB0 800612B0 5420000E */ bnel $at, $zero, .L800612EC -/* 061EB4 800612B4 8FBF001C */ lw $ra, 0x1c($sp) -/* 061EB8 800612B8 AFA80010 */ sw $t0, 0x10($sp) -/* 061EBC 800612BC AFA40020 */ sw $a0, 0x20($sp) -/* 061EC0 800612C0 0C01844C */ jal func_80061130 -/* 061EC4 800612C4 A7A50026 */ sh $a1, 0x26($sp) -/* 061EC8 800612C8 87A50026 */ lh $a1, 0x26($sp) -/* 061ECC 800612CC 24010009 */ li $at, 9 -/* 061ED0 800612D0 8FA40020 */ lw $a0, 0x20($sp) -/* 061ED4 800612D4 54A10005 */ bnel $a1, $at, .L800612EC -/* 061ED8 800612D8 8FBF001C */ lw $ra, 0x1c($sp) -/* 061EDC 800612DC 84890044 */ lh $t1, 0x44($a0) -/* 061EE0 800612E0 312AFDFF */ andi $t2, $t1, 0xfdff -/* 061EE4 800612E4 A48A0044 */ sh $t2, 0x44($a0) -/* 061EE8 800612E8 8FBF001C */ lw $ra, 0x1c($sp) -.L800612EC: -/* 061EEC 800612EC 27BD0020 */ addiu $sp, $sp, 0x20 -/* 061EF0 800612F0 03E00008 */ jr $ra -/* 061EF4 800612F4 00000000 */ nop diff --git a/asm/non_matchings/code_80057C60/func_800612F8.s b/asm/non_matchings/code_80057C60/func_800612F8.s deleted file mode 100644 index 64c12d0db..000000000 --- a/asm/non_matchings/code_80057C60/func_800612F8.s +++ /dev/null @@ -1,81 +0,0 @@ -glabel func_800612F8 -/* 061EF8 800612F8 27BDFFB0 */ addiu $sp, $sp, -0x50 -/* 061EFC 800612FC F7B80028 */ sdc1 $f24, 0x28($sp) -/* 061F00 80061300 3C0142C8 */ li $at, 0x42C80000 # 100.000000 -/* 061F04 80061304 4481C000 */ mtc1 $at, $f24 -/* 061F08 80061308 F7B60020 */ sdc1 $f22, 0x20($sp) -/* 061F0C 8006130C 3C0140A0 */ li $at, 0x40A00000 # 5.000000 -/* 061F10 80061310 F7B40018 */ sdc1 $f20, 0x18($sp) -/* 061F14 80061314 4481B000 */ mtc1 $at, $f22 -/* 061F18 80061318 AFB60048 */ sw $s6, 0x48($sp) -/* 061F1C 8006131C 3C013FF8 */ li $at, 0x3FF80000 # 1.937500 -/* 061F20 80061320 AFB50044 */ sw $s5, 0x44($sp) -/* 061F24 80061324 AFB40040 */ sw $s4, 0x40($sp) -/* 061F28 80061328 AFB3003C */ sw $s3, 0x3c($sp) -/* 061F2C 8006132C AFB20038 */ sw $s2, 0x38($sp) -/* 061F30 80061330 AFB10034 */ sw $s1, 0x34($sp) -/* 061F34 80061334 AFB00030 */ sw $s0, 0x30($sp) -/* 061F38 80061338 3C160001 */ lui $s6, (0x00011C60 >> 16) # lui $s6, 1 -/* 061F3C 8006133C 4481A800 */ mtc1 $at, $f21 -/* 061F40 80061340 4480A000 */ mtc1 $zero, $f20 -/* 061F44 80061344 00808825 */ move $s1, $a0 -/* 061F48 80061348 AFBF004C */ sw $ra, 0x4c($sp) -/* 061F4C 8006134C AFA50054 */ sw $a1, 0x54($sp) -/* 061F50 80061350 AFA60058 */ sw $a2, 0x58($sp) -/* 061F54 80061354 AFA7005C */ sw $a3, 0x5c($sp) -/* 061F58 80061358 36D61C60 */ ori $s6, (0x00011C60 & 0xFFFF) # ori $s6, $s6, 0x1c60 -/* 061F5C 8006135C 00808025 */ move $s0, $a0 -/* 061F60 80061360 00009025 */ move $s2, $zero -/* 061F64 80061364 24130001 */ li $s3, 1 -/* 061F68 80061368 24140001 */ li $s4, 1 -/* 061F6C 8006136C 241500FF */ li $s5, 255 -.L80061370: -/* 061F70 80061370 A6130AE4 */ sh $s3, 0xae4($s0) -/* 061F74 80061374 C6240018 */ lwc1 $f4, 0x18($s1) -/* 061F78 80061378 24040064 */ li $a0, 100 -/* 061F7C 8006137C 46162180 */ add.s $f6, $f4, $f22 -/* 061F80 80061380 E6060AF0 */ swc1 $f6, 0xaf0($s0) -/* 061F84 80061384 862E002E */ lh $t6, 0x2e($s1) -/* 061F88 80061388 024E7823 */ subu $t7, $s2, $t6 -/* 061F8C 8006138C 0C0ADF8D */ jal random_int -/* 061F90 80061390 A60F0AE8 */ sh $t7, 0xae8($s0) -/* 061F94 80061394 44824000 */ mtc1 $v0, $f8 -/* 061F98 80061398 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 -/* 061F9C 8006139C 04410004 */ bgez $v0, .L800613B0 -/* 061FA0 800613A0 468042A0 */ cvt.s.w $f10, $f8 -/* 061FA4 800613A4 44818000 */ mtc1 $at, $f16 -/* 061FA8 800613A8 00000000 */ nop -/* 061FAC 800613AC 46105280 */ add.s $f10, $f10, $f16 -.L800613B0: -/* 061FB0 800613B0 46185483 */ div.s $f18, $f10, $f24 -/* 061FB4 800613B4 A6000B02 */ sh $zero, 0xb02($s0) -/* 061FB8 800613B8 A6140ADA */ sh $s4, 0xada($s0) -/* 061FBC 800613BC A6000AE6 */ sh $zero, 0xae6($s0) -/* 061FC0 800613C0 A6150B06 */ sh $s5, 0xb06($s0) -/* 061FC4 800613C4 26521C70 */ addiu $s2, $s2, 0x1c70 -/* 061FC8 800613C8 26100048 */ addiu $s0, $s0, 0x48 -/* 061FCC 800613CC 46009121 */ cvt.d.s $f4, $f18 -/* 061FD0 800613D0 46342180 */ add.d $f6, $f4, $f20 -/* 061FD4 800613D4 46203220 */ cvt.s.d $f8, $f6 -/* 061FD8 800613D8 E6080AA4 */ swc1 $f8, 0xaa4($s0) -/* 061FDC 800613DC C630001C */ lwc1 $f16, 0x1c($s1) -/* 061FE0 800613E0 E6100A88 */ swc1 $f16, 0xa88($s0) -/* 061FE4 800613E4 C62A0014 */ lwc1 $f10, 0x14($s1) -/* 061FE8 800613E8 1656FFE1 */ bne $s2, $s6, .L80061370 -/* 061FEC 800613EC E60A0A80 */ swc1 $f10, 0xa80($s0) -/* 061FF0 800613F0 96380046 */ lhu $t8, 0x46($s1) -/* 061FF4 800613F4 3319FFF7 */ andi $t9, $t8, 0xfff7 -/* 061FF8 800613F8 A6390046 */ sh $t9, 0x46($s1) -/* 061FFC 800613FC 8FBF004C */ lw $ra, 0x4c($sp) -/* 062000 80061400 8FB60048 */ lw $s6, 0x48($sp) -/* 062004 80061404 8FB50044 */ lw $s5, 0x44($sp) -/* 062008 80061408 8FB40040 */ lw $s4, 0x40($sp) -/* 06200C 8006140C 8FB3003C */ lw $s3, 0x3c($sp) -/* 062010 80061410 8FB20038 */ lw $s2, 0x38($sp) -/* 062014 80061414 8FB10034 */ lw $s1, 0x34($sp) -/* 062018 80061418 8FB00030 */ lw $s0, 0x30($sp) -/* 06201C 8006141C D7B80028 */ ldc1 $f24, 0x28($sp) -/* 062020 80061420 D7B60020 */ ldc1 $f22, 0x20($sp) -/* 062024 80061424 D7B40018 */ ldc1 $f20, 0x18($sp) -/* 062028 80061428 03E00008 */ jr $ra -/* 06202C 8006142C 27BD0050 */ addiu $sp, $sp, 0x50 diff --git a/asm/non_matchings/code_80057C60/func_80061754.s b/asm/non_matchings/code_80057C60/func_80061754.s deleted file mode 100644 index 34fb5e35d..000000000 --- a/asm/non_matchings/code_80057C60/func_80061754.s +++ /dev/null @@ -1,152 +0,0 @@ -glabel func_80061754 -/* 062354 80061754 27BDFFA8 */ addiu $sp, $sp, -0x58 -/* 062358 80061758 AFB20030 */ sw $s2, 0x30($sp) -/* 06235C 8006175C 00809025 */ move $s2, $a0 -/* 062360 80061760 AFBF0034 */ sw $ra, 0x34($sp) -/* 062364 80061764 AFB1002C */ sw $s1, 0x2c($sp) -/* 062368 80061768 AFB00028 */ sw $s0, 0x28($sp) -/* 06236C 8006176C AFA5005C */ sw $a1, 0x5c($sp) -/* 062370 80061770 AFA60060 */ sw $a2, 0x60($sp) -/* 062374 80061774 AFA70064 */ sw $a3, 0x64($sp) -/* 062378 80061778 0C0ADF8D */ jal random_int -/* 06237C 8006177C 24040168 */ li $a0, 360 -/* 062380 80061780 244EFF4C */ addiu $t6, $v0, -0xb4 -/* 062384 80061784 AFAE0054 */ sw $t6, 0x54($sp) -/* 062388 80061788 0C0ADF8D */ jal random_int -/* 06238C 8006178C 24040006 */ li $a0, 6 -/* 062390 80061790 AFA2004C */ sw $v0, 0x4c($sp) -/* 062394 80061794 0C0ADF8D */ jal random_int -/* 062398 80061798 24040060 */ li $a0, 96 -/* 06239C 8006179C 00028C00 */ sll $s1, $v0, 0x10 -/* 0623A0 800617A0 00117C03 */ sra $t7, $s1, 0x10 -/* 0623A4 800617A4 01E08825 */ move $s1, $t7 -/* 0623A8 800617A8 0C0ADF8D */ jal random_int -/* 0623AC 800617AC 24040006 */ li $a0, 6 -/* 0623B0 800617B0 44822000 */ mtc1 $v0, $f4 -/* 0623B4 800617B4 24040002 */ li $a0, 2 -/* 0623B8 800617B8 04410005 */ bgez $v0, .L800617D0 -/* 0623BC 800617BC 468021A0 */ cvt.s.w $f6, $f4 -/* 0623C0 800617C0 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 -/* 0623C4 800617C4 44814000 */ mtc1 $at, $f8 -/* 0623C8 800617C8 00000000 */ nop -/* 0623CC 800617CC 46083180 */ add.s $f6, $f6, $f8 -.L800617D0: -/* 0623D0 800617D0 0C0ADF8D */ jal random_int -/* 0623D4 800617D4 E7A60044 */ swc1 $f6, 0x44($sp) -/* 0623D8 800617D8 44825000 */ mtc1 $v0, $f10 -/* 0623DC 800617DC 44800000 */ mtc1 $zero, $f0 -/* 0623E0 800617E0 04410005 */ bgez $v0, .L800617F8 -/* 0623E4 800617E4 46805420 */ cvt.s.w $f16, $f10 -/* 0623E8 800617E8 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 -/* 0623EC 800617EC 44819000 */ mtc1 $at, $f18 -/* 0623F0 800617F0 00000000 */ nop -/* 0623F4 800617F4 46128400 */ add.s $f16, $f16, $f18 -.L800617F8: -/* 0623F8 800617F8 87B8005E */ lh $t8, 0x5e($sp) -/* 0623FC 800617FC 44060000 */ mfc1 $a2, $f0 -/* 062400 80061800 44070000 */ mfc1 $a3, $f0 -/* 062404 80061804 0018C8C0 */ sll $t9, $t8, 3 -/* 062408 80061808 0338C821 */ addu $t9, $t9, $t8 -/* 06240C 8006180C 0019C8C0 */ sll $t9, $t9, 3 -/* 062410 80061810 02598021 */ addu $s0, $s2, $t9 -/* 062414 80061814 26050AC8 */ addiu $a1, $s0, 0xac8 -/* 062418 80061818 E7B00048 */ swc1 $f16, 0x48($sp) -/* 06241C 8006181C AFA5003C */ sw $a1, 0x3c($sp) -/* 062420 80061820 02402025 */ move $a0, $s2 -/* 062424 80061824 E7A00010 */ swc1 $f0, 0x10($sp) -/* 062428 80061828 AFA00014 */ sw $zero, 0x14($sp) -/* 06242C 8006182C 0C0175E5 */ jal func_8005D794 -/* 062430 80061830 AFA00018 */ sw $zero, 0x18($sp) -/* 062434 80061834 8FA4003C */ lw $a0, 0x3c($sp) -/* 062438 80061838 24050006 */ li $a1, 6 -/* 06243C 8006183C 0C0175F6 */ jal func_8005D7D8 -/* 062440 80061840 3C063F80 */ lui $a2, 0x3f80 -/* 062444 80061844 8E4300BC */ lw $v1, 0xbc($s2) -/* 062448 80061848 8FA4003C */ lw $a0, 0x3c($sp) -/* 06244C 8006184C 3C0500FF */ lui $a1, (0x00FFFFFF >> 16) # lui $a1, 0xff -/* 062450 80061850 00034180 */ sll $t0, $v1, 6 -/* 062454 80061854 05000007 */ bltz $t0, .L80061874 -/* 062458 80061858 000349C0 */ sll $t1, $v1, 7 -/* 06245C 8006185C 05200005 */ bltz $t1, .L80061874 -/* 062460 80061860 306A0400 */ andi $t2, $v1, 0x400 -/* 062464 80061864 15400003 */ bnez $t2, .L80061874 -/* 062468 80061868 00035800 */ sll $t3, $v1, 0 -/* 06246C 8006186C 0561000E */ bgez $t3, .L800618A8 -/* 062470 80061870 240600A0 */ li $a2, 160 -.L80061874: -/* 062474 80061874 34A5FFFF */ ori $a1, (0x00FFFFFF & 0xFFFF) # ori $a1, $a1, 0xffff -/* 062478 80061878 0C017600 */ jal func_8005D800 -/* 06247C 8006187C 240600A0 */ li $a2, 160 -/* 062480 80061880 860C0B00 */ lh $t4, 0xb00($s0) -/* 062484 80061884 860E0B02 */ lh $t6, 0xb02($s0) -/* 062488 80061888 86180B04 */ lh $t8, 0xb04($s0) -/* 06248C 8006188C 01916823 */ subu $t5, $t4, $s1 -/* 062490 80061890 01D17823 */ subu $t7, $t6, $s1 -/* 062494 80061894 0311C823 */ subu $t9, $t8, $s1 -/* 062498 80061898 A60D0B00 */ sh $t5, 0xb00($s0) -/* 06249C 8006189C A60F0B02 */ sh $t7, 0xb02($s0) -/* 0624A0 800618A0 1000000C */ b .L800618D4 -/* 0624A4 800618A4 A6190B04 */ sh $t9, 0xb04($s0) -.L800618A8: -/* 0624A8 800618A8 0C017600 */ jal func_8005D800 -/* 0624AC 800618AC 00002825 */ move $a1, $zero -/* 0624B0 800618B0 86080B00 */ lh $t0, 0xb00($s0) -/* 0624B4 800618B4 860A0B02 */ lh $t2, 0xb02($s0) -/* 0624B8 800618B8 860C0B04 */ lh $t4, 0xb04($s0) -/* 0624BC 800618BC 01114821 */ addu $t1, $t0, $s1 -/* 0624C0 800618C0 01515821 */ addu $t3, $t2, $s1 -/* 0624C4 800618C4 01916821 */ addu $t5, $t4, $s1 -/* 0624C8 800618C8 A6090B00 */ sh $t1, 0xb00($s0) -/* 0624CC 800618CC A60B0B02 */ sh $t3, 0xb02($s0) -/* 0624D0 800618D0 A60D0B04 */ sh $t5, 0xb04($s0) -.L800618D4: -/* 0624D4 800618D4 8FB10054 */ lw $s1, 0x54($sp) -/* 0624D8 800618D8 00117080 */ sll $t6, $s1, 2 -/* 0624DC 800618DC 01D17023 */ subu $t6, $t6, $s1 -/* 0624E0 800618E0 000E70C0 */ sll $t6, $t6, 3 -/* 0624E4 800618E4 01D17023 */ subu $t6, $t6, $s1 -/* 0624E8 800618E8 000E7080 */ sll $t6, $t6, 2 -/* 0624EC 800618EC 01D17023 */ subu $t6, $t6, $s1 -/* 0624F0 800618F0 000E7040 */ sll $t6, $t6, 1 -/* 0624F4 800618F4 31D1FFFF */ andi $s1, $t6, 0xffff -/* 0624F8 800618F8 0C0AE00E */ jal coss -/* 0624FC 800618FC 3224FFFF */ andi $a0, $s1, 0xffff -/* 062500 80061900 3C01C0A0 */ li $at, 0xC0A00000 # -5.000000 -/* 062504 80061904 44812000 */ mtc1 $at, $f4 -/* 062508 80061908 C646001C */ lwc1 $f6, 0x1c($s2) -/* 06250C 8006190C 3224FFFF */ andi $a0, $s1, 0xffff -/* 062510 80061910 46040202 */ mul.s $f8, $f0, $f4 -/* 062514 80061914 46064280 */ add.s $f10, $f8, $f6 -/* 062518 80061918 0C0AE006 */ jal sins -/* 06251C 8006191C E60A0AD0 */ swc1 $f10, 0xad0($s0) -/* 062520 80061920 3C013F80 */ li $at, 0x3F800000 # 1.000000 -/* 062524 80061924 44811000 */ mtc1 $at, $f2 -/* 062528 80061928 3C01C0A0 */ li $at, 0xC0A00000 # -5.000000 -/* 06252C 8006192C 44819000 */ mtc1 $at, $f18 -/* 062530 80061930 C6440014 */ lwc1 $f4, 0x14($s2) -/* 062534 80061934 3C014000 */ li $at, 0x40000000 # 2.000000 -/* 062538 80061938 46120402 */ mul.s $f16, $f0, $f18 -/* 06253C 8006193C 46048200 */ add.s $f8, $f16, $f4 -/* 062540 80061940 E6080AC8 */ swc1 $f8, 0xac8($s0) -/* 062544 80061944 8FB8004C */ lw $t8, 0x4c($sp) -/* 062548 80061948 C64A0070 */ lwc1 $f10, 0x70($s2) -/* 06254C 8006194C C6460018 */ lwc1 $f6, 0x18($s2) -/* 062550 80061950 44988000 */ mtc1 $t8, $f16 -/* 062554 80061954 460A3481 */ sub.s $f18, $f6, $f10 -/* 062558 80061958 44813000 */ mtc1 $at, $f6 -/* 06255C 8006195C 46808120 */ cvt.s.w $f4, $f16 -/* 062560 80061960 46049200 */ add.s $f8, $f18, $f4 -/* 062564 80061964 46064280 */ add.s $f10, $f8, $f6 -/* 062568 80061968 E60A0ACC */ swc1 $f10, 0xacc($s0) -/* 06256C 8006196C C7B00044 */ lwc1 $f16, 0x44($sp) -/* 062570 80061970 46028480 */ add.s $f18, $f16, $f2 -/* 062574 80061974 E6120AE0 */ swc1 $f18, 0xae0($s0) -/* 062578 80061978 C7A40048 */ lwc1 $f4, 0x48($sp) -/* 06257C 8006197C 46022200 */ add.s $f8, $f4, $f2 -/* 062580 80061980 E6080AD4 */ swc1 $f8, 0xad4($s0) -/* 062584 80061984 8FBF0034 */ lw $ra, 0x34($sp) -/* 062588 80061988 8FB20030 */ lw $s2, 0x30($sp) -/* 06258C 8006198C 8FB1002C */ lw $s1, 0x2c($sp) -/* 062590 80061990 8FB00028 */ lw $s0, 0x28($sp) -/* 062594 80061994 03E00008 */ jr $ra -/* 062598 80061998 27BD0058 */ addiu $sp, $sp, 0x58 diff --git a/asm/non_matchings/code_80057C60/func_8006199C.s b/asm/non_matchings/code_80057C60/func_8006199C.s deleted file mode 100644 index 48293ccd0..000000000 --- a/asm/non_matchings/code_80057C60/func_8006199C.s +++ /dev/null @@ -1,43 +0,0 @@ -glabel func_8006199C -/* 06259C 8006199C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 0625A0 800619A0 AFA50024 */ sw $a1, 0x24($sp) -/* 0625A4 800619A4 00057400 */ sll $t6, $a1, 0x10 -/* 0625A8 800619A8 000E2C03 */ sra $a1, $t6, 0x10 -/* 0625AC 800619AC AFA7002C */ sw $a3, 0x2c($sp) -/* 0625B0 800619B0 0007C600 */ sll $t8, $a3, 0x18 -/* 0625B4 800619B4 00183E03 */ sra $a3, $t8, 0x18 -/* 0625B8 800619B8 14A00010 */ bnez $a1, .L800619FC -/* 0625BC 800619BC AFBF001C */ sw $ra, 0x1c($sp) -/* 0625C0 800619C0 000640C0 */ sll $t0, $a2, 3 -/* 0625C4 800619C4 01064021 */ addu $t0, $t0, $a2 -/* 0625C8 800619C8 000840C0 */ sll $t0, $t0, 3 -/* 0625CC 800619CC 00881021 */ addu $v0, $a0, $t0 -/* 0625D0 800619D0 84490AE6 */ lh $t1, 0xae6($v0) -/* 0625D4 800619D4 83AB0033 */ lb $t3, 0x33($sp) -/* 0625D8 800619D8 1D200004 */ bgtz $t1, .L800619EC -/* 0625DC 800619DC 00000000 */ nop -/* 0625E0 800619E0 844A0AE4 */ lh $t2, 0xae4($v0) -/* 0625E4 800619E4 55400006 */ bnel $t2, $zero, .L80061A00 -/* 0625E8 800619E8 000660C0 */ sll $t4, $a2, 3 -.L800619EC: -/* 0625EC 800619EC 0C0185D5 */ jal func_80061754 -/* 0625F0 800619F0 AFAB0010 */ sw $t3, 0x10($sp) -/* 0625F4 800619F4 1000000C */ b .L80061A28 -/* 0625F8 800619F8 8FBF001C */ lw $ra, 0x1c($sp) -.L800619FC: -/* 0625FC 800619FC 000660C0 */ sll $t4, $a2, 3 -.L80061A00: -/* 062600 80061A00 01866021 */ addu $t4, $t4, $a2 -/* 062604 80061A04 000C60C0 */ sll $t4, $t4, 3 -/* 062608 80061A08 008C6821 */ addu $t5, $a0, $t4 -/* 06260C 80061A0C 85AE0AE6 */ lh $t6, 0xae6($t5) -/* 062610 80061A10 83AF0033 */ lb $t7, 0x33($sp) -/* 062614 80061A14 59C00004 */ blezl $t6, .L80061A28 -/* 062618 80061A18 8FBF001C */ lw $ra, 0x1c($sp) -/* 06261C 80061A1C 0C0185D5 */ jal func_80061754 -/* 062620 80061A20 AFAF0010 */ sw $t7, 0x10($sp) -/* 062624 80061A24 8FBF001C */ lw $ra, 0x1c($sp) -.L80061A28: -/* 062628 80061A28 27BD0020 */ addiu $sp, $sp, 0x20 -/* 06262C 80061A2C 03E00008 */ jr $ra -/* 062630 80061A30 00000000 */ nop diff --git a/asm/non_matchings/code_80057C60/func_80061A34.s b/asm/non_matchings/code_80057C60/func_80061A34.s deleted file mode 100644 index 1e9bd9382..000000000 --- a/asm/non_matchings/code_80057C60/func_80061A34.s +++ /dev/null @@ -1,205 +0,0 @@ -glabel func_80061A34 -/* 062634 80061A34 27BDFFA8 */ addiu $sp, $sp, -0x58 -/* 062638 80061A38 AFB20030 */ sw $s2, 0x30($sp) -/* 06263C 80061A3C 00809025 */ move $s2, $a0 -/* 062640 80061A40 AFBF0034 */ sw $ra, 0x34($sp) -/* 062644 80061A44 AFB00028 */ sw $s0, 0x28($sp) -/* 062648 80061A48 00C08025 */ move $s0, $a2 -/* 06264C 80061A4C AFB1002C */ sw $s1, 0x2c($sp) -/* 062650 80061A50 AFA5005C */ sw $a1, 0x5c($sp) -/* 062654 80061A54 AFA70064 */ sw $a3, 0x64($sp) -/* 062658 80061A58 0C0ADF8D */ jal random_int -/* 06265C 80061A5C 24040168 */ li $a0, 360 -/* 062660 80061A60 244EFF4C */ addiu $t6, $v0, -0xb4 -/* 062664 80061A64 AFAE0054 */ sw $t6, 0x54($sp) -/* 062668 80061A68 0C0ADF8D */ jal random_int -/* 06266C 80061A6C 24040006 */ li $a0, 6 -/* 062670 80061A70 AFA2004C */ sw $v0, 0x4c($sp) -/* 062674 80061A74 0C0ADF8D */ jal random_int -/* 062678 80061A78 24040006 */ li $a0, 6 -/* 06267C 80061A7C 0C0ADF8D */ jal random_int -/* 062680 80061A80 24040003 */ li $a0, 3 -/* 062684 80061A84 44822000 */ mtc1 $v0, $f4 -/* 062688 80061A88 87A8005E */ lh $t0, 0x5e($sp) -/* 06268C 80061A8C 04410005 */ bgez $v0, .L80061AA4 -/* 062690 80061A90 468021A0 */ cvt.s.w $f6, $f4 -/* 062694 80061A94 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 -/* 062698 80061A98 44814000 */ mtc1 $at, $f8 -/* 06269C 80061A9C 00000000 */ nop -/* 0626A0 80061AA0 46083180 */ add.s $f6, $f6, $f8 -.L80061AA4: -/* 0626A4 80061AA4 15000054 */ bnez $t0, .L80061BF8 -/* 0626A8 80061AA8 E7A60048 */ swc1 $f6, 0x48($sp) -/* 0626AC 80061AAC 24030048 */ li $v1, 72 -/* 0626B0 80061AB0 02030019 */ multu $s0, $v1 -/* 0626B4 80061AB4 00007812 */ mflo $t7 -/* 0626B8 80061AB8 024F1021 */ addu $v0, $s2, $t7 -/* 0626BC 80061ABC 84580AE6 */ lh $t8, 0xae6($v0) -/* 0626C0 80061AC0 1F000004 */ bgtz $t8, .L80061AD4 -/* 0626C4 80061AC4 00000000 */ nop -/* 0626C8 80061AC8 84590AE4 */ lh $t9, 0xae4($v0) -/* 0626CC 80061ACC 5720004B */ bnel $t9, $zero, .L80061BFC -/* 0626D0 80061AD0 24030048 */ li $v1, 72 -.L80061AD4: -/* 0626D4 80061AD4 01030019 */ multu $t0, $v1 -/* 0626D8 80061AD8 44800000 */ mtc1 $zero, $f0 -/* 0626DC 80061ADC 02402025 */ move $a0, $s2 -/* 0626E0 80061AE0 AFA00014 */ sw $zero, 0x14($sp) -/* 0626E4 80061AE4 44060000 */ mfc1 $a2, $f0 -/* 0626E8 80061AE8 44070000 */ mfc1 $a3, $f0 -/* 0626EC 80061AEC AFA00018 */ sw $zero, 0x18($sp) -/* 0626F0 80061AF0 E7A00010 */ swc1 $f0, 0x10($sp) -/* 0626F4 80061AF4 00004812 */ mflo $t1 -/* 0626F8 80061AF8 02498021 */ addu $s0, $s2, $t1 -/* 0626FC 80061AFC 26110AC8 */ addiu $s1, $s0, 0xac8 -/* 062700 80061B00 0C0175E5 */ jal func_8005D794 -/* 062704 80061B04 02202825 */ move $a1, $s1 -/* 062708 80061B08 02202025 */ move $a0, $s1 -/* 06270C 80061B0C 24050007 */ li $a1, 7 -/* 062710 80061B10 0C0175F6 */ jal func_8005D7D8 -/* 062714 80061B14 3C063F80 */ lui $a2, 0x3f80 -/* 062718 80061B18 3C0500FF */ lui $a1, (0x00FFFFFF >> 16) # lui $a1, 0xff -/* 06271C 80061B1C 34A5FFFF */ ori $a1, (0x00FFFFFF & 0xFFFF) # ori $a1, $a1, 0xffff -/* 062720 80061B20 02202025 */ move $a0, $s1 -/* 062724 80061B24 0C017600 */ jal func_8005D800 -/* 062728 80061B28 240600FF */ li $a2, 255 -/* 06272C 80061B2C 8FA40054 */ lw $a0, 0x54($sp) -/* 062730 80061B30 00045080 */ sll $t2, $a0, 2 -/* 062734 80061B34 01445023 */ subu $t2, $t2, $a0 -/* 062738 80061B38 000A50C0 */ sll $t2, $t2, 3 -/* 06273C 80061B3C 01445023 */ subu $t2, $t2, $a0 -/* 062740 80061B40 000A5080 */ sll $t2, $t2, 2 -/* 062744 80061B44 01445023 */ subu $t2, $t2, $a0 -/* 062748 80061B48 000A5040 */ sll $t2, $t2, 1 -/* 06274C 80061B4C 3144FFFF */ andi $a0, $t2, 0xffff -/* 062750 80061B50 0C0AE00E */ jal coss -/* 062754 80061B54 AFA4003C */ sw $a0, 0x3c($sp) -/* 062758 80061B58 3C01C000 */ li $at, 0xC0000000 # -2.000000 -/* 06275C 80061B5C 44818800 */ mtc1 $at, $f17 -/* 062760 80061B60 44808000 */ mtc1 $zero, $f16 -/* 062764 80061B64 460002A1 */ cvt.d.s $f10, $f0 -/* 062768 80061B68 C644001C */ lwc1 $f4, 0x1c($s2) -/* 06276C 80061B6C 46305482 */ mul.d $f18, $f10, $f16 -/* 062770 80061B70 8FA4003C */ lw $a0, 0x3c($sp) -/* 062774 80061B74 46002221 */ cvt.d.s $f8, $f4 -/* 062778 80061B78 46289180 */ add.d $f6, $f18, $f8 -/* 06277C 80061B7C 462032A0 */ cvt.s.d $f10, $f6 -/* 062780 80061B80 0C0AE006 */ jal sins -/* 062784 80061B84 E60A0AD0 */ swc1 $f10, 0xad0($s0) -/* 062788 80061B88 3C014000 */ li $at, 0x40000000 # 2.000000 -/* 06278C 80061B8C 44811000 */ mtc1 $at, $f2 -/* 062790 80061B90 3C01C000 */ li $at, 0xC0000000 # -2.000000 -/* 062794 80061B94 44812800 */ mtc1 $at, $f5 -/* 062798 80061B98 44802000 */ mtc1 $zero, $f4 -/* 06279C 80061B9C 46000421 */ cvt.d.s $f16, $f0 -/* 0627A0 80061BA0 C6480014 */ lwc1 $f8, 0x14($s2) -/* 0627A4 80061BA4 46248482 */ mul.d $f18, $f16, $f4 -/* 0627A8 80061BA8 3C014120 */ li $at, 0x41200000 # 10.000000 -/* 0627AC 80061BAC 460041A1 */ cvt.d.s $f6, $f8 -/* 0627B0 80061BB0 46269280 */ add.d $f10, $f18, $f6 -/* 0627B4 80061BB4 46205420 */ cvt.s.d $f16, $f10 -/* 0627B8 80061BB8 E6100AC8 */ swc1 $f16, 0xac8($s0) -/* 0627BC 80061BBC 8FAC004C */ lw $t4, 0x4c($sp) -/* 0627C0 80061BC0 C6480070 */ lwc1 $f8, 0x70($s2) -/* 0627C4 80061BC4 C6440018 */ lwc1 $f4, 0x18($s2) -/* 0627C8 80061BC8 448C3000 */ mtc1 $t4, $f6 -/* 0627CC 80061BCC 46082481 */ sub.s $f18, $f4, $f8 -/* 0627D0 80061BD0 468032A0 */ cvt.s.w $f10, $f6 -/* 0627D4 80061BD4 460A9400 */ add.s $f16, $f18, $f10 -/* 0627D8 80061BD8 44819000 */ mtc1 $at, $f18 -/* 0627DC 80061BDC 46028100 */ add.s $f4, $f16, $f2 -/* 0627E0 80061BE0 E6040ACC */ swc1 $f4, 0xacc($s0) -/* 0627E4 80061BE4 C7A80048 */ lwc1 $f8, 0x48($sp) -/* 0627E8 80061BE8 46024180 */ add.s $f6, $f8, $f2 -/* 0627EC 80061BEC 46123283 */ div.s $f10, $f6, $f18 -/* 0627F0 80061BF0 10000050 */ b .L80061D34 -/* 0627F4 80061BF4 E60A0AD4 */ swc1 $f10, 0xad4($s0) -.L80061BF8: -/* 0627F8 80061BF8 24030048 */ li $v1, 72 -.L80061BFC: -/* 0627FC 80061BFC 02030019 */ multu $s0, $v1 -/* 062800 80061C00 00006812 */ mflo $t5 -/* 062804 80061C04 024D7021 */ addu $t6, $s2, $t5 -/* 062808 80061C08 85CF0AE6 */ lh $t7, 0xae6($t6) -/* 06280C 80061C0C 59E0004A */ blezl $t7, .L80061D38 -/* 062810 80061C10 8FBF0034 */ lw $ra, 0x34($sp) -/* 062814 80061C14 01030019 */ multu $t0, $v1 -/* 062818 80061C18 44800000 */ mtc1 $zero, $f0 -/* 06281C 80061C1C 02402025 */ move $a0, $s2 -/* 062820 80061C20 AFA00014 */ sw $zero, 0x14($sp) -/* 062824 80061C24 44060000 */ mfc1 $a2, $f0 -/* 062828 80061C28 44070000 */ mfc1 $a3, $f0 -/* 06282C 80061C2C AFA00018 */ sw $zero, 0x18($sp) -/* 062830 80061C30 E7A00010 */ swc1 $f0, 0x10($sp) -/* 062834 80061C34 0000C012 */ mflo $t8 -/* 062838 80061C38 02588021 */ addu $s0, $s2, $t8 -/* 06283C 80061C3C 26110AC8 */ addiu $s1, $s0, 0xac8 -/* 062840 80061C40 0C0175E5 */ jal func_8005D794 -/* 062844 80061C44 02202825 */ move $a1, $s1 -/* 062848 80061C48 02202025 */ move $a0, $s1 -/* 06284C 80061C4C 24050007 */ li $a1, 7 -/* 062850 80061C50 0C0175F6 */ jal func_8005D7D8 -/* 062854 80061C54 3C063F80 */ lui $a2, 0x3f80 -/* 062858 80061C58 3C0500FF */ lui $a1, (0x00FFFFFF >> 16) # lui $a1, 0xff -/* 06285C 80061C5C 34A5FFFF */ ori $a1, (0x00FFFFFF & 0xFFFF) # ori $a1, $a1, 0xffff -/* 062860 80061C60 02202025 */ move $a0, $s1 -/* 062864 80061C64 0C017600 */ jal func_8005D800 -/* 062868 80061C68 240600FF */ li $a2, 255 -/* 06286C 80061C6C 8FA40054 */ lw $a0, 0x54($sp) -/* 062870 80061C70 0004C880 */ sll $t9, $a0, 2 -/* 062874 80061C74 0324C823 */ subu $t9, $t9, $a0 -/* 062878 80061C78 0019C8C0 */ sll $t9, $t9, 3 -/* 06287C 80061C7C 0324C823 */ subu $t9, $t9, $a0 -/* 062880 80061C80 0019C880 */ sll $t9, $t9, 2 -/* 062884 80061C84 0324C823 */ subu $t9, $t9, $a0 -/* 062888 80061C88 0019C840 */ sll $t9, $t9, 1 -/* 06288C 80061C8C 3324FFFF */ andi $a0, $t9, 0xffff -/* 062890 80061C90 0C0AE00E */ jal coss -/* 062894 80061C94 AFA4003C */ sw $a0, 0x3c($sp) -/* 062898 80061C98 3C01C000 */ li $at, 0xC0000000 # -2.000000 -/* 06289C 80061C9C 44812800 */ mtc1 $at, $f5 -/* 0628A0 80061CA0 44802000 */ mtc1 $zero, $f4 -/* 0628A4 80061CA4 46000421 */ cvt.d.s $f16, $f0 -/* 0628A8 80061CA8 C646001C */ lwc1 $f6, 0x1c($s2) -/* 0628AC 80061CAC 46248202 */ mul.d $f8, $f16, $f4 -/* 0628B0 80061CB0 8FA4003C */ lw $a0, 0x3c($sp) -/* 0628B4 80061CB4 460034A1 */ cvt.d.s $f18, $f6 -/* 0628B8 80061CB8 46324280 */ add.d $f10, $f8, $f18 -/* 0628BC 80061CBC 46205420 */ cvt.s.d $f16, $f10 -/* 0628C0 80061CC0 0C0AE006 */ jal sins -/* 0628C4 80061CC4 E6100AD0 */ swc1 $f16, 0xad0($s0) -/* 0628C8 80061CC8 3C014000 */ li $at, 0x40000000 # 2.000000 -/* 0628CC 80061CCC 44811000 */ mtc1 $at, $f2 -/* 0628D0 80061CD0 3C01C000 */ li $at, 0xC0000000 # -2.000000 -/* 0628D4 80061CD4 44813800 */ mtc1 $at, $f7 -/* 0628D8 80061CD8 44803000 */ mtc1 $zero, $f6 -/* 0628DC 80061CDC 46000121 */ cvt.d.s $f4, $f0 -/* 0628E0 80061CE0 C6520014 */ lwc1 $f18, 0x14($s2) -/* 0628E4 80061CE4 46262202 */ mul.d $f8, $f4, $f6 -/* 0628E8 80061CE8 3C014120 */ li $at, 0x41200000 # 10.000000 -/* 0628EC 80061CEC 460092A1 */ cvt.d.s $f10, $f18 -/* 0628F0 80061CF0 462A4400 */ add.d $f16, $f8, $f10 -/* 0628F4 80061CF4 46208120 */ cvt.s.d $f4, $f16 -/* 0628F8 80061CF8 E6040AC8 */ swc1 $f4, 0xac8($s0) -/* 0628FC 80061CFC 8FAA004C */ lw $t2, 0x4c($sp) -/* 062900 80061D00 C6520070 */ lwc1 $f18, 0x70($s2) -/* 062904 80061D04 C6460018 */ lwc1 $f6, 0x18($s2) -/* 062908 80061D08 448A5000 */ mtc1 $t2, $f10 -/* 06290C 80061D0C 46123201 */ sub.s $f8, $f6, $f18 -/* 062910 80061D10 46805420 */ cvt.s.w $f16, $f10 -/* 062914 80061D14 46104100 */ add.s $f4, $f8, $f16 -/* 062918 80061D18 44814000 */ mtc1 $at, $f8 -/* 06291C 80061D1C 46022180 */ add.s $f6, $f4, $f2 -/* 062920 80061D20 E6060ACC */ swc1 $f6, 0xacc($s0) -/* 062924 80061D24 C7B20048 */ lwc1 $f18, 0x48($sp) -/* 062928 80061D28 46029280 */ add.s $f10, $f18, $f2 -/* 06292C 80061D2C 46085403 */ div.s $f16, $f10, $f8 -/* 062930 80061D30 E6100AD4 */ swc1 $f16, 0xad4($s0) -.L80061D34: -/* 062934 80061D34 8FBF0034 */ lw $ra, 0x34($sp) -.L80061D38: -/* 062938 80061D38 8FB00028 */ lw $s0, 0x28($sp) -/* 06293C 80061D3C 8FB1002C */ lw $s1, 0x2c($sp) -/* 062940 80061D40 8FB20030 */ lw $s2, 0x30($sp) -/* 062944 80061D44 03E00008 */ jr $ra -/* 062948 80061D48 27BD0058 */ addiu $sp, $sp, 0x58 diff --git a/asm/non_matchings/code_80057C60/func_80061EF4.s b/asm/non_matchings/code_80057C60/func_80061EF4.s deleted file mode 100644 index 7610333bd..000000000 --- a/asm/non_matchings/code_80057C60/func_80061EF4.s +++ /dev/null @@ -1,190 +0,0 @@ -glabel func_80061EF4 -/* 062AF4 80061EF4 27BDFFB0 */ addiu $sp, $sp, -0x50 -/* 062AF8 80061EF8 AFB10028 */ sw $s1, 0x28($sp) -/* 062AFC 80061EFC 00808825 */ move $s1, $a0 -/* 062B00 80061F00 AFBF002C */ sw $ra, 0x2c($sp) -/* 062B04 80061F04 AFB00024 */ sw $s0, 0x24($sp) -/* 062B08 80061F08 240800FF */ li $t0, 255 -/* 062B0C 80061F0C 00C08025 */ move $s0, $a2 -/* 062B10 80061F10 AFA50054 */ sw $a1, 0x54($sp) -/* 062B14 80061F14 AFA7005C */ sw $a3, 0x5c($sp) -/* 062B18 80061F18 AFA80048 */ sw $t0, 0x48($sp) -/* 062B1C 80061F1C 0C0ADF8D */ jal random_int -/* 062B20 80061F20 24040008 */ li $a0, 8 -/* 062B24 80061F24 30430001 */ andi $v1, $v0, 1 -/* 062B28 80061F28 24010001 */ li $at, 1 -/* 062B2C 80061F2C 8FA80048 */ lw $t0, 0x48($sp) -/* 062B30 80061F30 14610006 */ bne $v1, $at, .L80061F4C -/* 062B34 80061F34 87AA0056 */ lh $t2, 0x56($sp) -/* 062B38 80061F38 C6220018 */ lwc1 $f2, 0x18($s1) -/* 062B3C 80061F3C 24090001 */ li $t1, 1 -/* 062B40 80061F40 00004025 */ move $t0, $zero -/* 062B44 80061F44 AFA90044 */ sw $t1, 0x44($sp) -/* 062B48 80061F48 E7A2003C */ swc1 $f2, 0x3c($sp) -.L80061F4C: -/* 062B4C 80061F4C 8FA90044 */ lw $t1, 0x44($sp) -/* 062B50 80061F50 14600004 */ bnez $v1, .L80061F64 -/* 062B54 80061F54 C7A2003C */ lwc1 $f2, 0x3c($sp) -/* 062B58 80061F58 00004825 */ move $t1, $zero -/* 062B5C 80061F5C 00004025 */ move $t0, $zero -/* 062B60 80061F60 C6220018 */ lwc1 $f2, 0x18($s1) -.L80061F64: -/* 062B64 80061F64 55000091 */ bnel $t0, $zero, .L800621AC -/* 062B68 80061F68 8FBF002C */ lw $ra, 0x2c($sp) -/* 062B6C 80061F6C 15400049 */ bnez $t2, .L80062094 -/* 062B70 80061F70 24030048 */ li $v1, 72 -/* 062B74 80061F74 02030019 */ multu $s0, $v1 -/* 062B78 80061F78 00007012 */ mflo $t6 -/* 062B7C 80061F7C 022E1021 */ addu $v0, $s1, $t6 -/* 062B80 80061F80 844F0AE6 */ lh $t7, 0xae6($v0) -/* 062B84 80061F84 1DE00004 */ bgtz $t7, .L80061F98 -/* 062B88 80061F88 00000000 */ nop -/* 062B8C 80061F8C 84580AE4 */ lh $t8, 0xae4($v0) -/* 062B90 80061F90 57000041 */ bnel $t8, $zero, .L80062098 -/* 062B94 80061F94 24030048 */ li $v1, 72 -.L80061F98: -/* 062B98 80061F98 01430019 */ multu $t2, $v1 -/* 062B9C 80061F9C 44800000 */ mtc1 $zero, $f0 -/* 062BA0 80061FA0 44071000 */ mfc1 $a3, $f2 -/* 062BA4 80061FA4 02202025 */ move $a0, $s1 -/* 062BA8 80061FA8 44060000 */ mfc1 $a2, $f0 -/* 062BAC 80061FAC AFA80014 */ sw $t0, 0x14($sp) -/* 062BB0 80061FB0 AFA90018 */ sw $t1, 0x18($sp) -/* 062BB4 80061FB4 E7A00010 */ swc1 $f0, 0x10($sp) -/* 062BB8 80061FB8 0000C812 */ mflo $t9 -/* 062BBC 80061FBC 02398021 */ addu $s0, $s1, $t9 -/* 062BC0 80061FC0 26050AC8 */ addiu $a1, $s0, 0xac8 -/* 062BC4 80061FC4 0C0175E5 */ jal func_8005D794 -/* 062BC8 80061FC8 AFA50030 */ sw $a1, 0x30($sp) -/* 062BCC 80061FCC 8FA40030 */ lw $a0, 0x30($sp) -/* 062BD0 80061FD0 24050003 */ li $a1, 3 -/* 062BD4 80061FD4 0C0175F6 */ jal func_8005D7D8 -/* 062BD8 80061FD8 3C063F00 */ lui $a2, 0x3f00 -/* 062BDC 80061FDC 3C0500FF */ lui $a1, (0x00FFFFFF >> 16) # lui $a1, 0xff -/* 062BE0 80061FE0 34A5FFFF */ ori $a1, (0x00FFFFFF & 0xFFFF) # ori $a1, $a1, 0xffff -/* 062BE4 80061FE4 8FA40030 */ lw $a0, 0x30($sp) -/* 062BE8 80061FE8 0C017600 */ jal func_8005D800 -/* 062BEC 80061FEC 24060060 */ li $a2, 96 -/* 062BF0 80061FF0 960B0AD8 */ lhu $t3, 0xad8($s0) -/* 062BF4 80061FF4 24010001 */ li $at, 1 -/* 062BF8 80061FF8 A6000AE8 */ sh $zero, 0xae8($s0) -/* 062BFC 80061FFC 55610006 */ bnel $t3, $at, .L80062018 -/* 062C00 80062000 860E0AE8 */ lh $t6, 0xae8($s0) -/* 062C04 80062004 860C0AE8 */ lh $t4, 0xae8($s0) -/* 062C08 80062008 258D0888 */ addiu $t5, $t4, 0x888 -/* 062C0C 8006200C 10000004 */ b .L80062020 -/* 062C10 80062010 A60D0AE8 */ sh $t5, 0xae8($s0) -/* 062C14 80062014 860E0AE8 */ lh $t6, 0xae8($s0) -.L80062018: -/* 062C18 80062018 25CFF778 */ addiu $t7, $t6, -0x888 -/* 062C1C 8006201C A60F0AE8 */ sh $t7, 0xae8($s0) -.L80062020: -/* 062C20 80062020 86180AE8 */ lh $t8, 0xae8($s0) -/* 062C24 80062024 8639002E */ lh $t9, 0x2e($s1) -/* 062C28 80062028 862C00C0 */ lh $t4, 0xc0($s1) -/* 062C2C 8006202C 03195823 */ subu $t3, $t8, $t9 -/* 062C30 80062030 016C2023 */ subu $a0, $t3, $t4 -/* 062C34 80062034 308DFFFF */ andi $t5, $a0, 0xffff -/* 062C38 80062038 0C0AE00E */ jal coss -/* 062C3C 8006203C 01A02025 */ move $a0, $t5 -/* 062C40 80062040 3C0140A0 */ li $at, 0x40A00000 # 5.000000 -/* 062C44 80062044 44812000 */ mtc1 $at, $f4 -/* 062C48 80062048 C628001C */ lwc1 $f8, 0x1c($s1) -/* 062C4C 8006204C 860E0AE8 */ lh $t6, 0xae8($s0) -/* 062C50 80062050 46040182 */ mul.s $f6, $f0, $f4 -/* 062C54 80062054 46083280 */ add.s $f10, $f6, $f8 -/* 062C58 80062058 E60A0AD0 */ swc1 $f10, 0xad0($s0) -/* 062C5C 8006205C 862F002E */ lh $t7, 0x2e($s1) -/* 062C60 80062060 863900C0 */ lh $t9, 0xc0($s1) -/* 062C64 80062064 01CFC023 */ subu $t8, $t6, $t7 -/* 062C68 80062068 03192023 */ subu $a0, $t8, $t9 -/* 062C6C 8006206C 308BFFFF */ andi $t3, $a0, 0xffff -/* 062C70 80062070 0C0AE006 */ jal sins -/* 062C74 80062074 01602025 */ move $a0, $t3 -/* 062C78 80062078 3C0140A0 */ li $at, 0x40A00000 # 5.000000 -/* 062C7C 8006207C 44818000 */ mtc1 $at, $f16 -/* 062C80 80062080 C6240014 */ lwc1 $f4, 0x14($s1) -/* 062C84 80062084 46100482 */ mul.s $f18, $f0, $f16 -/* 062C88 80062088 46049180 */ add.s $f6, $f18, $f4 -/* 062C8C 8006208C 10000046 */ b .L800621A8 -/* 062C90 80062090 E6060AC8 */ swc1 $f6, 0xac8($s0) -.L80062094: -/* 062C94 80062094 24030048 */ li $v1, 72 -.L80062098: -/* 062C98 80062098 02030019 */ multu $s0, $v1 -/* 062C9C 8006209C 00006012 */ mflo $t4 -/* 062CA0 800620A0 022C6821 */ addu $t5, $s1, $t4 -/* 062CA4 800620A4 85AE0AE6 */ lh $t6, 0xae6($t5) -/* 062CA8 800620A8 59C00040 */ blezl $t6, .L800621AC -/* 062CAC 800620AC 8FBF002C */ lw $ra, 0x2c($sp) -/* 062CB0 800620B0 01430019 */ multu $t2, $v1 -/* 062CB4 800620B4 44800000 */ mtc1 $zero, $f0 -/* 062CB8 800620B8 44071000 */ mfc1 $a3, $f2 -/* 062CBC 800620BC 02202025 */ move $a0, $s1 -/* 062CC0 800620C0 44060000 */ mfc1 $a2, $f0 -/* 062CC4 800620C4 AFA80014 */ sw $t0, 0x14($sp) -/* 062CC8 800620C8 AFA90018 */ sw $t1, 0x18($sp) -/* 062CCC 800620CC E7A00010 */ swc1 $f0, 0x10($sp) -/* 062CD0 800620D0 00007812 */ mflo $t7 -/* 062CD4 800620D4 022F8021 */ addu $s0, $s1, $t7 -/* 062CD8 800620D8 26050AC8 */ addiu $a1, $s0, 0xac8 -/* 062CDC 800620DC 0C0175E5 */ jal func_8005D794 -/* 062CE0 800620E0 AFA50030 */ sw $a1, 0x30($sp) -/* 062CE4 800620E4 8FA40030 */ lw $a0, 0x30($sp) -/* 062CE8 800620E8 24050003 */ li $a1, 3 -/* 062CEC 800620EC 0C0175F6 */ jal func_8005D7D8 -/* 062CF0 800620F0 3C063F00 */ lui $a2, 0x3f00 -/* 062CF4 800620F4 3C0500FF */ lui $a1, (0x00FFFFFF >> 16) # lui $a1, 0xff -/* 062CF8 800620F8 34A5FFFF */ ori $a1, (0x00FFFFFF & 0xFFFF) # ori $a1, $a1, 0xffff -/* 062CFC 800620FC 8FA40030 */ lw $a0, 0x30($sp) -/* 062D00 80062100 0C017600 */ jal func_8005D800 -/* 062D04 80062104 24060060 */ li $a2, 96 -/* 062D08 80062108 96180AD8 */ lhu $t8, 0xad8($s0) -/* 062D0C 8006210C 24010001 */ li $at, 1 -/* 062D10 80062110 A6000AE8 */ sh $zero, 0xae8($s0) -/* 062D14 80062114 57010006 */ bnel $t8, $at, .L80062130 -/* 062D18 80062118 860C0AE8 */ lh $t4, 0xae8($s0) -/* 062D1C 8006211C 86190AE8 */ lh $t9, 0xae8($s0) -/* 062D20 80062120 272B0888 */ addiu $t3, $t9, 0x888 -/* 062D24 80062124 10000004 */ b .L80062138 -/* 062D28 80062128 A60B0AE8 */ sh $t3, 0xae8($s0) -/* 062D2C 8006212C 860C0AE8 */ lh $t4, 0xae8($s0) -.L80062130: -/* 062D30 80062130 258DF778 */ addiu $t5, $t4, -0x888 -/* 062D34 80062134 A60D0AE8 */ sh $t5, 0xae8($s0) -.L80062138: -/* 062D38 80062138 860E0AE8 */ lh $t6, 0xae8($s0) -/* 062D3C 8006213C 862F002E */ lh $t7, 0x2e($s1) -/* 062D40 80062140 863900C0 */ lh $t9, 0xc0($s1) -/* 062D44 80062144 01CFC023 */ subu $t8, $t6, $t7 -/* 062D48 80062148 03192023 */ subu $a0, $t8, $t9 -/* 062D4C 8006214C 308BFFFF */ andi $t3, $a0, 0xffff -/* 062D50 80062150 0C0AE00E */ jal coss -/* 062D54 80062154 01602025 */ move $a0, $t3 -/* 062D58 80062158 3C0140A0 */ li $at, 0x40A00000 # 5.000000 -/* 062D5C 8006215C 44814000 */ mtc1 $at, $f8 -/* 062D60 80062160 C630001C */ lwc1 $f16, 0x1c($s1) -/* 062D64 80062164 860C0AE8 */ lh $t4, 0xae8($s0) -/* 062D68 80062168 46080282 */ mul.s $f10, $f0, $f8 -/* 062D6C 8006216C 46105480 */ add.s $f18, $f10, $f16 -/* 062D70 80062170 E6120AD0 */ swc1 $f18, 0xad0($s0) -/* 062D74 80062174 862D002E */ lh $t5, 0x2e($s1) -/* 062D78 80062178 862F00C0 */ lh $t7, 0xc0($s1) -/* 062D7C 8006217C 018D7023 */ subu $t6, $t4, $t5 -/* 062D80 80062180 01CF2023 */ subu $a0, $t6, $t7 -/* 062D84 80062184 3098FFFF */ andi $t8, $a0, 0xffff -/* 062D88 80062188 0C0AE006 */ jal sins -/* 062D8C 8006218C 03002025 */ move $a0, $t8 -/* 062D90 80062190 3C0140A0 */ li $at, 0x40A00000 # 5.000000 -/* 062D94 80062194 44812000 */ mtc1 $at, $f4 -/* 062D98 80062198 C6280014 */ lwc1 $f8, 0x14($s1) -/* 062D9C 8006219C 46040182 */ mul.s $f6, $f0, $f4 -/* 062DA0 800621A0 46083280 */ add.s $f10, $f6, $f8 -/* 062DA4 800621A4 E60A0AC8 */ swc1 $f10, 0xac8($s0) -.L800621A8: -/* 062DA8 800621A8 8FBF002C */ lw $ra, 0x2c($sp) -.L800621AC: -/* 062DAC 800621AC 8FB00024 */ lw $s0, 0x24($sp) -/* 062DB0 800621B0 8FB10028 */ lw $s1, 0x28($sp) -/* 062DB4 800621B4 03E00008 */ jr $ra -/* 062DB8 800621B8 27BD0050 */ addiu $sp, $sp, 0x50 diff --git a/asm/non_matchings/code_80057C60/func_80063FBC.s b/asm/non_matchings/code_80057C60/func_80063FBC.s deleted file mode 100644 index 27aaad0d9..000000000 --- a/asm/non_matchings/code_80057C60/func_80063FBC.s +++ /dev/null @@ -1,118 +0,0 @@ -glabel func_80063FBC -/* 064BBC 80063FBC 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* 064BC0 80063FC0 00057400 */ sll $t6, $a1, 0x10 -/* 064BC4 80063FC4 000E7C03 */ sra $t7, $t6, 0x10 -/* 064BC8 80063FC8 000FC0C0 */ sll $t8, $t7, 3 -/* 064BCC 80063FCC 030FC021 */ addu $t8, $t8, $t7 -/* 064BD0 80063FD0 0018C0C0 */ sll $t8, $t8, 3 -/* 064BD4 80063FD4 AFBF002C */ sw $ra, 0x2c($sp) -/* 064BD8 80063FD8 AFB00028 */ sw $s0, 0x28($sp) -/* 064BDC 80063FDC AFA50044 */ sw $a1, 0x44($sp) -/* 064BE0 80063FE0 AFA60048 */ sw $a2, 0x48($sp) -/* 064BE4 80063FE4 AFA7004C */ sw $a3, 0x4c($sp) -/* 064BE8 80063FE8 00981021 */ addu $v0, $a0, $t8 -/* 064BEC 80063FEC 94590538 */ lhu $t9, 0x538($v0) -/* 064BF0 80063FF0 24010001 */ li $at, 1 -/* 064BF4 80063FF4 00808025 */ move $s0, $a0 -/* 064BF8 80063FF8 57210025 */ bnel $t9, $at, .L80064090 -/* 064BFC 80063FFC 44803000 */ mtc1 $zero, $f6 -/* 064C00 80064000 44802000 */ mtc1 $zero, $f4 -/* 064C04 80064004 3C014190 */ li $at, 0x41900000 # 18.000000 -/* 064C08 80064008 44814000 */ mtc1 $at, $f8 -/* 064C0C 8006400C E7A40010 */ swc1 $f4, 0x10($sp) -/* 064C10 80064010 C6060094 */ lwc1 $f6, 0x94($s0) -/* 064C14 80064014 3C014358 */ li $at, 0x43580000 # 216.000000 -/* 064C18 80064018 44818000 */ mtc1 $at, $f16 -/* 064C1C 8006401C 46083283 */ div.s $f10, $f6, $f8 -/* 064C20 80064020 3C014170 */ li $at, 0x41700000 # 15.000000 -/* 064C24 80064024 44812000 */ mtc1 $at, $f4 -/* 064C28 80064028 84480546 */ lh $t0, 0x546($v0) -/* 064C2C 8006402C 3C01C016 */ li $at, 0xC0160000 # -2.343750 -/* 064C30 80064030 44812800 */ mtc1 $at, $f5 -/* 064C34 80064034 44884000 */ mtc1 $t0, $f8 -/* 064C38 80064038 27A4003C */ addiu $a0, $sp, 0x3c -/* 064C3C 8006403C 27A50034 */ addiu $a1, $sp, 0x34 -/* 064C40 80064040 27A60038 */ addiu $a2, $sp, 0x38 -/* 064C44 80064044 3C074040 */ lui $a3, 0x4040 -/* 064C48 80064048 46105482 */ mul.s $f18, $f10, $f16 -/* 064C4C 8006404C 468042A0 */ cvt.s.w $f10, $f8 -/* 064C50 80064050 46049183 */ div.s $f6, $f18, $f4 -/* 064C54 80064054 44802000 */ mtc1 $zero, $f4 -/* 064C58 80064058 46065402 */ mul.s $f16, $f10, $f6 -/* 064C5C 8006405C 460084A1 */ cvt.d.s $f18, $f16 -/* 064C60 80064060 46322201 */ sub.d $f8, $f4, $f18 -/* 064C64 80064064 462042A0 */ cvt.s.d $f10, $f8 -/* 064C68 80064068 E7AA0014 */ swc1 $f10, 0x14($sp) -/* 064C6C 8006406C 84490548 */ lh $t1, 0x548($v0) -/* 064C70 80064070 AFA20030 */ sw $v0, 0x30($sp) -/* 064C74 80064074 AFA0001C */ sw $zero, 0x1c($sp) -/* 064C78 80064078 00095023 */ negu $t2, $t1 -/* 064C7C 8006407C 0C018AC6 */ jal func_80062B18 -/* 064C80 80064080 AFAA0018 */ sw $t2, 0x18($sp) -/* 064C84 80064084 10000023 */ b .L80064114 -/* 064C88 80064088 8FA20030 */ lw $v0, 0x30($sp) -/* 064C8C 8006408C 44803000 */ mtc1 $zero, $f6 -.L80064090: -/* 064C90 80064090 3C014190 */ li $at, 0x41900000 # 18.000000 -/* 064C94 80064094 44812000 */ mtc1 $at, $f4 -/* 064C98 80064098 E7A60010 */ swc1 $f6, 0x10($sp) -/* 064C9C 8006409C C6100094 */ lwc1 $f16, 0x94($s0) -/* 064CA0 800640A0 3C014358 */ li $at, 0x43580000 # 216.000000 -/* 064CA4 800640A4 44814000 */ mtc1 $at, $f8 -/* 064CA8 800640A8 46048483 */ div.s $f18, $f16, $f4 -/* 064CAC 800640AC 3C014170 */ li $at, 0x41700000 # 15.000000 -/* 064CB0 800640B0 44813000 */ mtc1 $at, $f6 -/* 064CB4 800640B4 844B0546 */ lh $t3, 0x546($v0) -/* 064CB8 800640B8 3C01C016 */ li $at, 0xC0160000 # -2.343750 -/* 064CBC 800640BC 44813800 */ mtc1 $at, $f7 -/* 064CC0 800640C0 448B2000 */ mtc1 $t3, $f4 -/* 064CC4 800640C4 27A4003C */ addiu $a0, $sp, 0x3c -/* 064CC8 800640C8 27A50034 */ addiu $a1, $sp, 0x34 -/* 064CCC 800640CC 27A60038 */ addiu $a2, $sp, 0x38 -/* 064CD0 800640D0 3C07C040 */ lui $a3, 0xc040 -/* 064CD4 800640D4 46089282 */ mul.s $f10, $f18, $f8 -/* 064CD8 800640D8 468024A0 */ cvt.s.w $f18, $f4 -/* 064CDC 800640DC 46065403 */ div.s $f16, $f10, $f6 -/* 064CE0 800640E0 44803000 */ mtc1 $zero, $f6 -/* 064CE4 800640E4 46109202 */ mul.s $f8, $f18, $f16 -/* 064CE8 800640E8 460042A1 */ cvt.d.s $f10, $f8 -/* 064CEC 800640EC 462A3101 */ sub.d $f4, $f6, $f10 -/* 064CF0 800640F0 462024A0 */ cvt.s.d $f18, $f4 -/* 064CF4 800640F4 E7B20014 */ swc1 $f18, 0x14($sp) -/* 064CF8 800640F8 844C0548 */ lh $t4, 0x548($v0) -/* 064CFC 800640FC AFA20030 */ sw $v0, 0x30($sp) -/* 064D00 80064100 AFA0001C */ sw $zero, 0x1c($sp) -/* 064D04 80064104 000C6823 */ negu $t5, $t4 -/* 064D08 80064108 0C018AC6 */ jal func_80062B18 -/* 064D0C 8006410C AFAD0018 */ sw $t5, 0x18($sp) -/* 064D10 80064110 8FA20030 */ lw $v0, 0x30($sp) -.L80064114: -/* 064D14 80064114 C6100014 */ lwc1 $f16, 0x14($s0) -/* 064D18 80064118 C7A8003C */ lwc1 $f8, 0x3c($sp) -/* 064D1C 8006411C 844E0546 */ lh $t6, 0x546($v0) -/* 064D20 80064120 24010006 */ li $at, 6 -/* 064D24 80064124 46088180 */ add.s $f6, $f16, $f8 -/* 064D28 80064128 25CF0001 */ addiu $t7, $t6, 1 -/* 064D2C 8006412C E4460528 */ swc1 $f6, 0x528($v0) -/* 064D30 80064130 C7A40038 */ lwc1 $f4, 0x38($sp) -/* 064D34 80064134 C60A001C */ lwc1 $f10, 0x1c($s0) -/* 064D38 80064138 46045480 */ add.s $f18, $f10, $f4 -/* 064D3C 8006413C E4520530 */ swc1 $f18, 0x530($v0) -/* 064D40 80064140 C6080070 */ lwc1 $f8, 0x70($s0) -/* 064D44 80064144 C6100018 */ lwc1 $f16, 0x18($s0) -/* 064D48 80064148 C7AA0034 */ lwc1 $f10, 0x34($sp) -/* 064D4C 8006414C A44F0546 */ sh $t7, 0x546($v0) -/* 064D50 80064150 46088181 */ sub.s $f6, $f16, $f8 -/* 064D54 80064154 84580546 */ lh $t8, 0x546($v0) -/* 064D58 80064158 460A3100 */ add.s $f4, $f6, $f10 -/* 064D5C 8006415C 17010004 */ bne $t8, $at, .L80064170 -/* 064D60 80064160 E444052C */ swc1 $f4, 0x52c($v0) -/* 064D64 80064164 A4400544 */ sh $zero, 0x544($v0) -/* 064D68 80064168 A4400546 */ sh $zero, 0x546($v0) -/* 064D6C 8006416C A440053A */ sh $zero, 0x53a($v0) -.L80064170: -/* 064D70 80064170 8FBF002C */ lw $ra, 0x2c($sp) -/* 064D74 80064174 8FB00028 */ lw $s0, 0x28($sp) -/* 064D78 80064178 27BD0040 */ addiu $sp, $sp, 0x40 -/* 064D7C 8006417C 03E00008 */ jr $ra -/* 064D80 80064180 00000000 */ nop diff --git a/asm/non_matchings/code_80057C60/func_800652D4.s b/asm/non_matchings/code_80057C60/func_800652D4.s deleted file mode 100644 index 62e1a877d..000000000 --- a/asm/non_matchings/code_80057C60/func_800652D4.s +++ /dev/null @@ -1,47 +0,0 @@ -glabel func_800652D4 -/* 065ED4 800652D4 27BDFFA0 */ addiu $sp, $sp, -0x60 -/* 065ED8 800652D8 AFA50064 */ sw $a1, 0x64($sp) -/* 065EDC 800652DC 00802825 */ move $a1, $a0 -/* 065EE0 800652E0 AFBF0014 */ sw $ra, 0x14($sp) -/* 065EE4 800652E4 AFA40060 */ sw $a0, 0x60($sp) -/* 065EE8 800652E8 AFA60068 */ sw $a2, 0x68($sp) -/* 065EEC 800652EC 8FA60064 */ lw $a2, 0x64($sp) -/* 065EF0 800652F0 0C008784 */ jal func_80021E10 -/* 065EF4 800652F4 27A40020 */ addiu $a0, $sp, 0x20 -/* 065EF8 800652F8 27A40020 */ addiu $a0, $sp, 0x20 -/* 065EFC 800652FC 0C0087E1 */ jal func_80021F84 -/* 065F00 80065300 8FA50068 */ lw $a1, 0x68($sp) -/* 065F04 80065304 3C0F8016 */ lui $t7, %hi(D_80164AF0) # $t7, 0x8016 -/* 065F08 80065308 85EF4AF0 */ lh $t7, %lo(D_80164AF0)($t7) -/* 065F0C 8006530C 3C0E8015 */ lui $t6, %hi(gGfxPool) # $t6, 0x8015 -/* 065F10 80065310 8DCEEF40 */ lw $t6, %lo(gGfxPool)($t6) -/* 065F14 80065314 000FC180 */ sll $t8, $t7, 6 -/* 065F18 80065318 3401FAC0 */ li $at, 64192 -/* 065F1C 8006531C 01D82021 */ addu $a0, $t6, $t8 -/* 065F20 80065320 00812021 */ addu $a0, $a0, $at -/* 065F24 80065324 0C008860 */ jal func_80022180 -/* 065F28 80065328 27A50020 */ addiu $a1, $sp, 0x20 -/* 065F2C 8006532C 3C048015 */ lui $a0, %hi(gDisplayListHead) # $a0, 0x8015 -/* 065F30 80065330 24840298 */ addiu $a0, %lo(gDisplayListHead) # addiu $a0, $a0, 0x298 -/* 065F34 80065334 8C830000 */ lw $v1, ($a0) -/* 065F38 80065338 3C080102 */ lui $t0, (0x01020040 >> 16) # lui $t0, 0x102 -/* 065F3C 8006533C 35080040 */ ori $t0, (0x01020040 & 0xFFFF) # ori $t0, $t0, 0x40 -/* 065F40 80065340 24790008 */ addiu $t9, $v1, 8 -/* 065F44 80065344 AC990000 */ sw $t9, ($a0) -/* 065F48 80065348 3C0A8016 */ lui $t2, %hi(D_80164AF0) # $t2, 0x8016 -/* 065F4C 8006534C AC680000 */ sw $t0, ($v1) -/* 065F50 80065350 854A4AF0 */ lh $t2, %lo(D_80164AF0)($t2) -/* 065F54 80065354 3C098015 */ lui $t1, %hi(gGfxPool) # $t1, 0x8015 -/* 065F58 80065358 8D29EF40 */ lw $t1, %lo(gGfxPool)($t1) -/* 065F5C 8006535C 000A5980 */ sll $t3, $t2, 6 -/* 065F60 80065360 3401FAC0 */ li $at, 64192 -/* 065F64 80065364 012B6021 */ addu $t4, $t1, $t3 -/* 065F68 80065368 01816821 */ addu $t5, $t4, $at -/* 065F6C 8006536C 3C011FFF */ lui $at, (0x1FFFFFFF >> 16) # lui $at, 0x1fff -/* 065F70 80065370 3421FFFF */ ori $at, (0x1FFFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 065F74 80065374 01A17824 */ and $t7, $t5, $at -/* 065F78 80065378 AC6F0004 */ sw $t7, 4($v1) -/* 065F7C 8006537C 8FBF0014 */ lw $ra, 0x14($sp) -/* 065F80 80065380 27BD0060 */ addiu $sp, $sp, 0x60 -/* 065F84 80065384 03E00008 */ jr $ra -/* 065F88 80065388 00000000 */ nop diff --git a/asm/non_matchings/code_80057C60/func_800658A0.s b/asm/non_matchings/code_80057C60/func_800658A0.s deleted file mode 100644 index 09e391793..000000000 --- a/asm/non_matchings/code_80057C60/func_800658A0.s +++ /dev/null @@ -1,134 +0,0 @@ -glabel func_800658A0 -/* 0664A0 800658A0 27BDFFA0 */ addiu $sp, $sp, -0x60 -/* 0664A4 800658A4 AFA60068 */ sw $a2, 0x68($sp) -/* 0664A8 800658A8 00067400 */ sll $t6, $a2, 0x10 -/* 0664AC 800658AC 000E3403 */ sra $a2, $t6, 0x10 -/* 0664B0 800658B0 000678C0 */ sll $t7, $a2, 3 -/* 0664B4 800658B4 01E67821 */ addu $t7, $t7, $a2 -/* 0664B8 800658B8 AFA7006C */ sw $a3, 0x6c($sp) -/* 0664BC 800658BC 0007C600 */ sll $t8, $a3, 0x18 -/* 0664C0 800658C0 000F78C0 */ sll $t7, $t7, 3 -/* 0664C4 800658C4 00183E03 */ sra $a3, $t8, 0x18 -/* 0664C8 800658C8 AFBF0014 */ sw $ra, 0x14($sp) -/* 0664CC 800658CC AFA40060 */ sw $a0, 0x60($sp) -/* 0664D0 800658D0 AFA50064 */ sw $a1, 0x64($sp) -/* 0664D4 800658D4 008F1021 */ addu $v0, $a0, $t7 -/* 0664D8 800658D8 84580274 */ lh $t8, 0x274($v0) -/* 0664DC 800658DC 24010001 */ li $at, 1 -/* 0664E0 800658E0 00807025 */ move $t6, $a0 -/* 0664E4 800658E4 5701006F */ bnel $t8, $at, .L80065AA4 -/* 0664E8 800658E8 8FBF0014 */ lw $ra, 0x14($sp) -/* 0664EC 800658EC 84590290 */ lh $t9, 0x290($v0) -/* 0664F0 800658F0 27A5004C */ addiu $a1, $sp, 0x4c -/* 0664F4 800658F4 A7B9004A */ sh $t9, 0x4a($sp) -/* 0664F8 800658F8 844F0292 */ lh $t7, 0x292($v0) -/* 0664FC 800658FC A7AF0048 */ sh $t7, 0x48($sp) -/* 066500 80065900 84580294 */ lh $t8, 0x294($v0) -/* 066504 80065904 00077840 */ sll $t7, $a3, 1 -/* 066508 80065908 A7B80046 */ sh $t8, 0x46($sp) -/* 06650C 8006590C 84590296 */ lh $t9, 0x296($v0) -/* 066510 80065910 008FC021 */ addu $t8, $a0, $t7 -/* 066514 80065914 27A40054 */ addiu $a0, $sp, 0x54 -/* 066518 80065918 A7B90044 */ sh $t9, 0x44($sp) -/* 06651C 8006591C C4440258 */ lwc1 $f4, 0x258($v0) -/* 066520 80065920 E7A40054 */ swc1 $f4, 0x54($sp) -/* 066524 80065924 C446025C */ lwc1 $f6, 0x25c($v0) -/* 066528 80065928 E7A60058 */ swc1 $f6, 0x58($sp) -/* 06652C 8006592C C4480260 */ lwc1 $f8, 0x260($v0) -/* 066530 80065930 A7A0004C */ sh $zero, 0x4c($sp) -/* 066534 80065934 E7A8005C */ swc1 $f8, 0x5c($sp) -/* 066538 80065938 87190048 */ lh $t9, 0x48($t8) -/* 06653C 8006593C A7A00050 */ sh $zero, 0x50($sp) -/* 066540 80065940 A7B9004E */ sh $t9, 0x4e($sp) -/* 066544 80065944 C5D00224 */ lwc1 $f16, 0x224($t6) -/* 066548 80065948 C44A0264 */ lwc1 $f10, 0x264($v0) -/* 06654C 8006594C 46105482 */ mul.s $f18, $f10, $f16 -/* 066550 80065950 44069000 */ mfc1 $a2, $f18 -/* 066554 80065954 0C0194B5 */ jal func_800652D4 -/* 066558 80065958 00000000 */ nop -/* 06655C 8006595C 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 066560 80065960 24630298 */ addiu $v1, %lo(gDisplayListHead) # addiu $v1, $v1, 0x298 -/* 066564 80065964 8C620000 */ lw $v0, ($v1) -/* 066568 80065968 3C190D01 */ lui $t9, %hi(D_0D008DB8) # $t9, 0xd01 -/* 06656C 8006596C 27398DB8 */ addiu $t9, %lo(D_0D008DB8) # addiu $t9, $t9, -0x7248 -/* 066570 80065970 244F0008 */ addiu $t7, $v0, 8 -/* 066574 80065974 AC6F0000 */ sw $t7, ($v1) -/* 066578 80065978 3C180600 */ lui $t8, 0x600 -/* 06657C 8006597C AC580000 */ sw $t8, ($v0) -/* 066580 80065980 AC590004 */ sw $t9, 4($v0) -/* 066584 80065984 8C620000 */ lw $v0, ($v1) -/* 066588 80065988 3C0FFD70 */ lui $t7, 0xfd70 -/* 06658C 8006598C 3C188019 */ lui $t8, %hi(D_8018D48C) # $t8, 0x8019 -/* 066590 80065990 244E0008 */ addiu $t6, $v0, 8 -/* 066594 80065994 AC6E0000 */ sw $t6, ($v1) -/* 066598 80065998 AC4F0000 */ sw $t7, ($v0) -/* 06659C 8006599C 8F18D48C */ lw $t8, %lo(D_8018D48C)($t8) -/* 0665A0 800659A0 3C0F0700 */ lui $t7, 0x700 -/* 0665A4 800659A4 3C0EF570 */ lui $t6, 0xf570 -/* 0665A8 800659A8 AC580004 */ sw $t8, 4($v0) -/* 0665AC 800659AC 8C620000 */ lw $v0, ($v1) -/* 0665B0 800659B0 24590008 */ addiu $t9, $v0, 8 -/* 0665B4 800659B4 AC790000 */ sw $t9, ($v1) -/* 0665B8 800659B8 AC4F0004 */ sw $t7, 4($v0) -/* 0665BC 800659BC AC4E0000 */ sw $t6, ($v0) -/* 0665C0 800659C0 8C620000 */ lw $v0, ($v1) -/* 0665C4 800659C4 3C19E600 */ lui $t9, 0xe600 -/* 0665C8 800659C8 3C0FF300 */ lui $t7, 0xf300 -/* 0665CC 800659CC 24580008 */ addiu $t8, $v0, 8 -/* 0665D0 800659D0 AC780000 */ sw $t8, ($v1) -/* 0665D4 800659D4 AC400004 */ sw $zero, 4($v0) -/* 0665D8 800659D8 AC590000 */ sw $t9, ($v0) -/* 0665DC 800659DC 8C620000 */ lw $v0, ($v1) -/* 0665E0 800659E0 3C18071F */ lui $t8, (0x071FF200 >> 16) # lui $t8, 0x71f -/* 0665E4 800659E4 3718F200 */ ori $t8, (0x071FF200 & 0xFFFF) # ori $t8, $t8, 0xf200 -/* 0665E8 800659E8 244E0008 */ addiu $t6, $v0, 8 -/* 0665EC 800659EC AC6E0000 */ sw $t6, ($v1) -/* 0665F0 800659F0 AC580004 */ sw $t8, 4($v0) -/* 0665F4 800659F4 AC4F0000 */ sw $t7, ($v0) -/* 0665F8 800659F8 8C620000 */ lw $v0, ($v1) -/* 0665FC 800659FC 3C0EE700 */ lui $t6, 0xe700 -/* 066600 80065A00 3C18F568 */ lui $t8, (0xF5680800 >> 16) # lui $t8, 0xf568 -/* 066604 80065A04 24590008 */ addiu $t9, $v0, 8 -/* 066608 80065A08 AC790000 */ sw $t9, ($v1) -/* 06660C 80065A0C AC400004 */ sw $zero, 4($v0) -/* 066610 80065A10 AC4E0000 */ sw $t6, ($v0) -/* 066614 80065A14 8C620000 */ lw $v0, ($v1) -/* 066618 80065A18 37180800 */ ori $t8, (0xF5680800 & 0xFFFF) # ori $t8, $t8, 0x800 -/* 06661C 80065A1C 3C0EF200 */ lui $t6, 0xf200 -/* 066620 80065A20 244F0008 */ addiu $t7, $v0, 8 -/* 066624 80065A24 AC6F0000 */ sw $t7, ($v1) -/* 066628 80065A28 AC400004 */ sw $zero, 4($v0) -/* 06662C 80065A2C AC580000 */ sw $t8, ($v0) -/* 066630 80065A30 8C620000 */ lw $v0, ($v1) -/* 066634 80065A34 3C180007 */ lui $t8, (0x0007C07C >> 16) # lui $t8, 7 -/* 066638 80065A38 3718C07C */ ori $t8, (0x0007C07C & 0xFFFF) # ori $t8, $t8, 0xc07c -/* 06663C 80065A3C 24590008 */ addiu $t9, $v0, 8 -/* 066640 80065A40 AC790000 */ sw $t9, ($v1) -/* 066644 80065A44 AFA20024 */ sw $v0, 0x24($sp) -/* 066648 80065A48 AC580004 */ sw $t8, 4($v0) -/* 06664C 80065A4C AC4E0000 */ sw $t6, ($v0) -/* 066650 80065A50 87A70044 */ lh $a3, 0x44($sp) -/* 066654 80065A54 87A60046 */ lh $a2, 0x46($sp) -/* 066658 80065A58 87A50048 */ lh $a1, 0x48($sp) -/* 06665C 80065A5C 0C012CD7 */ jal func_8004B35C -/* 066660 80065A60 87A4004A */ lh $a0, 0x4a($sp) -/* 066664 80065A64 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 066668 80065A68 24630298 */ addiu $v1, %lo(gDisplayListHead) # addiu $v1, $v1, 0x298 -/* 06666C 80065A6C 8C620000 */ lw $v0, ($v1) -/* 066670 80065A70 3C180D01 */ lui $t8, %hi(D_0D008E48) # $t8, 0xd01 -/* 066674 80065A74 3C058016 */ lui $a1, %hi(D_80164AF0) # $a1, 0x8016 -/* 066678 80065A78 24590008 */ addiu $t9, $v0, 8 -/* 06667C 80065A7C AC790000 */ sw $t9, ($v1) -/* 066680 80065A80 27188E48 */ addiu $t8, %lo(D_0D008E48) # addiu $t8, $t8, -0x71b8 -/* 066684 80065A84 3C0E0600 */ lui $t6, 0x600 -/* 066688 80065A88 24A54AF0 */ addiu $a1, %lo(D_80164AF0) # addiu $a1, $a1, 0x4af0 -/* 06668C 80065A8C AC4E0000 */ sw $t6, ($v0) -/* 066690 80065A90 AC580004 */ sw $t8, 4($v0) -/* 066694 80065A94 84AF0000 */ lh $t7, ($a1) -/* 066698 80065A98 25F90001 */ addiu $t9, $t7, 1 -/* 06669C 80065A9C A4B90000 */ sh $t9, ($a1) -/* 0666A0 80065AA0 8FBF0014 */ lw $ra, 0x14($sp) -.L80065AA4: -/* 0666A4 80065AA4 27BD0060 */ addiu $sp, $sp, 0x60 -/* 0666A8 80065AA8 03E00008 */ jr $ra -/* 0666AC 80065AAC 00000000 */ nop diff --git a/include/common_structs.h b/include/common_structs.h index c278d5967..56644bc01 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -128,8 +128,7 @@ typedef struct { /* 0x20 */ s16 unk_020; /* 0x22 */ s16 unk_022; /* 0x24 */ f32 unk_024; - /* 0x28 */ s16 unk_028; - /* 0x2A */ s16 unk_02A; + /* 0x28 */ f32 unk_028; /* 0x2C */ s16 unk_02C; /* 0x2E */ s16 unk_02E; /* 0x30 */ s16 unk_030; diff --git a/src/code_80057C60.c b/src/code_80057C60.c index 5d0600dd0..fac29f79e 100644 --- a/src/code_80057C60.c +++ b/src/code_80057C60.c @@ -7,13 +7,15 @@ #include #include "math_util.h" #include "math_util_2.h" -#include "code_800431B0.h" #include "code_80005FD0.h" +#include "code_8001F980.h" +#include "code_800431B0.h" #include "code_80057C60.h" #include "code_80071F00.h" #include "code_80086E70.h" #include "code_8008C1D0.h" #include "skybox_and_splitscreen.h" +#include "common_textures.h" // UI Code? void func_80057C60(void) { @@ -665,19 +667,14 @@ void func_80059358(void) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75 -void func_8004CB60(s16, s16, ? *); /* extern */ -void func_8004E638(?); /* extern */ -void func_8004FA78(?); /* extern */ -void func_8004FC78(s16, s16, s8); /* extern */ -extern ? D_0D00A958; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b extern s8 D_801657B0; void func_80059360(void) { if (D_801657B0 == 0) { func_8004FA78(0); if (D_8018CA70->lapCount != 3) { - func_8004CB60(D_8018CA70->lapX, D_8018CA70->lapY, &D_0D00A958); + func_8004CB60((s32) D_8018CA70->lapX, (s32) D_8018CA70->lapY, (s32) D_0D00A958); func_8004FC78((s16) (D_8018CA70->lapX + 0xC), (s16) (D_8018CA70->lapY - 4), D_8018CA70->alsoLapCount); func_8004E638(0); } @@ -692,21 +689,15 @@ void func_800593F0(void) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004CB60(s16, s16, ? *); // extern -void func_8004E638(?); // extern -void func_8004FA78(?); // extern -void func_8004FC78(s16, s16, s8); // extern -extern ? D_0D00A958; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b extern s8 D_801657B0; -extern struct_8018CA70_entry D_8018CA70; void func_800593F8(void) { if (D_801657B0 == 0) { func_8004FA78(1); - if (D_8018CA70.unkF5 != 3) { - func_8004CB60(D_8018CA70.unkDE, D_8018CA70.unkE4, &D_0D00A958); - func_8004FC78(D_8018CA70.unkDE + 0xC, D_8018CA70.unkE4 - 4, D_8018CA70.unkF6); + if (D_8018CA70->unkF5 != 3) { + func_8004CB60((s32) D_8018CA70->unkDE, (s32) D_8018CA70->unkE4, (s32) D_0D00A958); + func_8004FC78((s16) (D_8018CA70->unkDE + 0xC), (s16) (D_8018CA70->unkE4 - 4), D_8018CA70->unkF6); func_8004E638(1); } } @@ -744,15 +735,7 @@ void func_80059530(void) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75 -void func_80047910(s16, s16, ?, ?, ? *, ? *, ? *, s32, s32, s32, s32); /* extern */ -void func_8004CB60(s16, s16, ? *); /* extern */ -void func_8004E6C4(s32); /* extern */ -void func_8004FC78(s16, s16, s8); /* extern */ -extern Vtx D_0D005AE0; -extern ? D_0D00A958; -extern s8 D_0D01B4D8; -extern s8 D_0D01D6D8; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b extern s32 D_80165608; extern s8 D_801657E4; extern s8 D_801657F8; @@ -763,17 +746,17 @@ void func_80059560(s32 playerId) { struct_8018CA70_entry *temp_v0; struct_8018CA70_entry *temp_v0_2; - if (gModeSelection != BATTLE) { + if (gModeSelection != 3) { if ((D_801657F8 != 0) && (D_8018D188 != 0)) { temp_v0 = &D_8018CA70[playerId]; sp3C = temp_v0; - func_8004CB60(temp_v0->lapX, temp_v0->lapY, &D_0D00A958); + func_8004CB60((s32) temp_v0->lapX, (s32) temp_v0->lapY, (s32) D_0D00A958); func_8004FC78((s16) (temp_v0->lapX - 0xC), (s16) (temp_v0->lapY + 4), temp_v0->alsoLapCount); } if (D_801657E4 == 2) { temp_v0_2 = &D_8018CA70[playerId]; if ((temp_v0_2->unk_74 != 0) && (D_80165608 != 0)) { - func_80047910(temp_v0_2->unk_6C, temp_v0_2->unk_6E, 0, 0x3F800000, &D_0D01B4D8, &D_0D01D6D8, &D_0D005AE0, 0x20, 0x20, 0x20, 0x20); + func_80047910((s32) temp_v0_2->unk_6C, (s32) temp_v0_2->unk_6E, 0U, 1.0f, (s32) D_0D01B4D8, (s32) D_0D01D6D8, D_0D005AE0, 0x00000020, 0x00000020, 0x00000020, 0x00000020); } } } @@ -873,47 +856,45 @@ void func_8005994C(void) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75 +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b extern s8 D_80165890; void func_8005995C(void) { - s32 temp_v1; + Player *temp_v0; + Player *var_v0; + s32 var_v1; struct_8018CA70_entry *temp_a0; struct_8018CA70_entry *temp_a0_2; - void *temp_v0; - Player *phi_v0; - s32 phi_v1; - phi_v0 = gPlayerOne; - phi_v1 = 0; + var_v0 = gPlayerOne; + var_v1 = 0; do { - if ((D_80165890 != 0) && ((phi_v0->unk_000 & 0x100) != 0)) { - phi_v0->unk_010 = 0xC; - D_8018CA70[phi_v1].unk_75 = 2; + if ((D_80165890 != 0) && (var_v0->unk_000 & 0x100)) { + var_v0->unk_010 = 0x000C; + D_8018CA70[var_v1].unk_75 = 2; } - if (((phi_v0->unk_000 & 0x100) != 0) && (phi_v0->unk_010 == 0)) { - temp_a0 = &D_8018CA70[phi_v1]; + if ((var_v0->unk_000 & 0x100) && (var_v0->unk_010 == 0)) { + temp_a0 = &D_8018CA70[var_v1]; if (temp_a0->unk_75 != 0) { - phi_v0->unk_010 = 0xC; - temp_a0->unk_75 += -1; + var_v0->unk_010 = 0x000C; + temp_a0->unk_75 -= 1; } } - temp_v0 = phi_v0 + 0xDD8; - if ((D_80165890 != 0) && ((temp_v0->unk0 & 0x100) != 0)) { - temp_v0->unk10 = 0xC; - D_8018CA70[phi_v1].unkF9 = 2; + temp_v0 = var_v0 + 0xDD8; + if ((D_80165890 != 0) && (temp_v0->unk_000 & 0x100)) { + temp_v0->unk_010 = 0x000C; + D_8018CA70[var_v1].unkF9 = 2; } - if (((temp_v0->unk0 & 0x100) != 0) && (temp_v0->unk10 == 0)) { - temp_a0_2 = &D_8018CA70[phi_v1]; + if ((temp_v0->unk_000 & 0x100) && (temp_v0->unk_010 == 0)) { + temp_a0_2 = &D_8018CA70[var_v1]; if (temp_a0_2->unkF9 != 0) { - temp_v0->unk10 = 0xC; + temp_v0->unk_010 = 0x000C; temp_a0_2->unkF9 = (s8) (temp_a0_2->unkF9 - 1); } } - temp_v1 = phi_v1 + 2; - phi_v0 = temp_v0 + 0xDD8; - phi_v1 = temp_v1; - } while (temp_v1 != 4); + var_v1 += 2; + var_v0 = temp_v0 + 0xDD8; + } while (var_v1 != 4); D_80165890 = 0; } #else @@ -928,68 +909,57 @@ void func_80059A88(s32 arg0) { } } -#ifdef NON_MATCHING -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -//void func_80059820(?); // extern -//void func_8005995C(); // extern -//void func_80059A88(?); // extern -//void func_8005A71C(); // extern -//void func_800892E0(s32); // extern -s32 func_8008A890(Camera*); // extern -//void func_8008C1D8(? *); // extern -extern u16 D_800DC5FC; +#ifdef MIPS_TO_C +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b extern s32 D_80165678; -extern s16 D_8018CF68[]; +extern s32 gGamestate; extern s32 gRaceFrameCounter; -extern Camera *camera1; -// unused? void func_80059AC8(void) { - //s32 temp_s0; - UNUSED s32 temp_v0; - s16 *phi_s2; - s32 phi_s0; + s16 *var_s2; + s32 temp_v0; + s32 var_s0; + s32 var_s1; if (D_800DC5FC == 0) { func_8008C1D8(&D_80165678); - gRaceFrameCounter++; - phi_s2 = (s16*) &D_8018CF68; - phi_s0 = 0; - //phi_s1 = 0; - for (phi_s0 = 0; phi_s0 != 8; phi_s0++) { - *phi_s2 = func_8008A890(phi_s0 + camera1); - func_800892E0(phi_s0); - //temp_s0 = phi_s0 + 1; - //phi_s1 += 0xB8; - phi_s2 += 2; - phi_s0++; - } //while (phi_s0 != 8); - - switch (gScreenModeSelection) { - case SCREEN_MODE_1P: - if (gGamestate != 9) { - func_80059A88(0); - if (gModeSelection == TIME_TRIALS) { - func_8005995C(); - } - } else { - func_80059820(0); + gRaceFrameCounter += 1; + var_s2 = D_8018CF68; + var_s0 = 0; + var_s1 = 0; + do { + *var_s2 = func_8008A890(var_s1 + camera1); + func_800892E0(var_s0); + var_s0 += 1; + var_s1 += 0xB8; + var_s2 += 2; + } while (var_s0 != 8); + temp_v0 = gScreenModeSelection; + switch (temp_v0) { /* irregular */ + case SCREEN_MODE_1P: + if (gGamestate != 9) { + func_80059A88(0); + if (gModeSelection == TIME_TRIALS) { + func_8005995C(); } - break; - case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL: - func_80059A88(0); - func_80059A88(1); - break; - case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL: - func_80059A88(0); - func_80059A88(1); - break; - case SCREEN_MODE_3P_4P_SPLITSCREEN: - func_80059A88(0); - func_80059A88(1); - func_80059A88(2); - func_80059A88(3); - break; + } else { + func_80059820(0); + } + break; + case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL: + func_80059A88(0); + func_80059A88(1); + break; + case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL: + func_80059A88(0); + func_80059A88(1); + break; + case SCREEN_MODE_3P_4P_SPLITSCREEN: + func_80059A88(0); + func_80059A88(1); + func_80059A88(2); + func_80059A88(3); + break; } func_8005A71C(); } @@ -999,44 +969,46 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80059AC8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -void func_8005A3C0(); /* extern */ -extern s16 gGPCurrentRacePlayerIdByRank; -extern s32 gPlayerPositions; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b extern ? D_801643D8; -extern s16 D_8018CF90; +extern ? D_8018CF90; extern ? D_8018CF98; +extern ? gGPCurrentRaceRanks; void func_80059C50(void) { - ? *temp_v0_2; - ? *temp_v1; - u32 temp_v0; - s16 *phi_a0; - s16 *phi_v0; - ? *phi_v0_2; - ? *phi_v1; + ? *var_v0; + ? *var_v1; + s16 *var_a0; + s32 *var_v0_2; + s32 temp_lo; + s32 temp_t0; + s32 temp_t1; + s32 temp_t2; + s32 temp_t9; func_8005A3C0(); - phi_a0 = &gGPCurrentRacePlayerIdByRank; - phi_v0 = gGPCurrentRaceRanks; + var_v0 = &gGPCurrentRaceRanks; + var_a0 = gGPCurrentRacePlayerIdByRank; do { - temp_v0 = phi_v0 + 2; - temp_v0->unk-2 = gPlayerOne[*phi_a0].characterId; - phi_a0 += 2; - phi_v0 = temp_v0; - } while (temp_v0 < &D_8018CF90); - phi_v0_2 = &gPlayerPositions; - phi_v1 = &D_8018CF98; + var_v0 += 2; + temp_lo = *var_a0 * 0xDD8; + var_a0 += 2; + var_v0->unk-2 = (u16) (temp_lo + gPlayerOne)->unk254; + } while ((u32) var_v0 < (u32) &D_8018CF90); + var_v0_2 = gPlayerPositions; + var_v1 = &D_8018CF98; do { - temp_v0_2 = phi_v0_2 + 0x10; - temp_v1 = phi_v1 + 8; - temp_v1->unk-6 = phi_v0_2->unk4; - temp_v1->unk-4 = phi_v0_2->unk8; - temp_v1->unk-2 = phi_v0_2->unkC; - temp_v1->unk-8 = phi_v0_2->unk0; - phi_v0_2 = temp_v0_2; - phi_v1 = temp_v1; - } while (temp_v0_2 != &D_801643D8); + temp_t0 = var_v0_2->unk4; + temp_t1 = var_v0_2->unk8; + temp_t2 = var_v0_2->unkC; + temp_t9 = var_v0_2->unk0; + var_v0_2 += 0x10; + var_v1 += 8; + var_v1->unk-6 = (s16) temp_t0; + var_v1->unk-4 = (s16) temp_t1; + var_v1->unk-2 = (s16) temp_t2; + var_v1->unk-8 = (s16) temp_t9; + } while (var_v0_2 != &D_801643D8); } #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80059C50.s") @@ -1172,82 +1144,70 @@ void func_8005A070(void) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -s32 u16_step_up_towards(s32, ?, ?); // extern -s32 u16_step_down_towards(s32, ?, ?); // extern -s32 f32_step_towards(void *, ?, ?, s32); // extern -s32 func_80087D24(s32, ?, ?, ?); // extern -extern f32 D_800EE1E0; -extern struct_80165C18_entry D_80165C18; -extern s32 D_8018CE24; -extern s32 gLapCountByPlayerId; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +extern ? D_8018CE24; -void func_8005A14C(s32 arg0) { +void func_8005A14C(s32 playerId) { s32 sp2C; s32 sp28; Player *sp24; Player *temp_t0; s32 temp_a3; + struct_80165C18_entry *temp_s0; + struct_80165C18_entry *temp_s0_2; u16 temp_v1; - void *temp_s0; - void *temp_s0_2; - void *phi_s0; - temp_t0 = &gPlayerOne[arg0]; - sp28 = *(&gLapCountByPlayerId + (arg0 * 4)); - temp_a3 = *(&D_8018CE24 + (arg0 << 5)); - if ((temp_t0->unk_000 & 0x8000) != 0) { - if ((temp_t0->unk_0BC & 0x204C0) != 0) { - temp_s0 = (temp_a3 * 0xE0) + &D_80165C18; - temp_s0->unkC2 = temp_s0->unkC2 + 0x1000; - phi_s0 = temp_s0; - goto block_5; + temp_t0 = &gPlayerOne[playerId]; + sp28 = gLapCountByPlayerId[playerId]; + temp_a3 = *(&D_8018CE24 + (playerId << 5)); + if (temp_t0->unk_000 & 0x8000) { + if (temp_t0->unk_0BC & 0x204C0) { + temp_s0 = &D_80165C18[temp_a3]; + temp_s0->unk_0BE[2] += 0x1000; + } else { + temp_s0_2 = &D_80165C18[temp_a3]; + temp_v1 = temp_s0_2->unk_0BE[2]; + if (temp_v1 != 0) { + temp_s0_2->unk_0BE[2] = temp_v1 + 0x1000; + } } - temp_s0_2 = (temp_a3 * 0xE0) + &D_80165C18; - temp_v1 = temp_s0_2->unkC2; - phi_s0 = temp_s0_2; - phi_s0 = temp_s0_2; - if (temp_v1 != 0) { - temp_s0_2->unkC2 = temp_v1 + 0x1000; -block_5: - } - if ((temp_t0->unk_0BC * 2) < 0) { + if (temp_t0->unk_0BC & 0x40000000) { sp2C = temp_a3; sp24 = temp_t0; - f32_step_towards(phi_s0, 0x3E99999A, 0x3CA3D70A, temp_a3); + f32_step_towards(&D_80165C18[temp_a3].unk_000, 0.3f, 0.02f); } else { sp2C = temp_a3; sp24 = temp_t0; - f32_step_towards(phi_s0, 0x3F19999A, 0x3CA3D70A, temp_a3); + f32_step_towards(&D_80165C18[temp_a3].unk_000, 0.6f, 0.02f); } - if (sp24->unk_0BC & 0x4000000) { + if (sp24->unk_0BC & 0x04000000) { sp24 = sp24; - u16_step_up_towards(phi_s0 + 0xBE, 0xC00, 0x100); + u16_step_up_towards(&D_80165C18[temp_a3].unk_000 + 0xBE, 0x0C00U, 0x0100U); } else { sp24 = sp24; - u16_step_down_towards(phi_s0 + 0xBE, 0, 0x100); + u16_step_down_towards(&D_80165C18[temp_a3].unk_000 + 0xBE, 0, 0x00000100); } - if ((sp24->unk_0BC & 0x3000000) != 0) { + if (sp24->unk_0BC & 0x03000000) { sp24 = sp24; - func_80087D24(sp2C, 0x40C00000, 0x3FC00000, 0); + func_80087D24(sp2C, 6.0f, 1.5f, 0.0f); } else { sp24 = sp24; - f32_step_towards(phi_s0 + 0x2C, 0, 0x3F800000); + f32_step_towards(&D_80165C18[temp_a3].unk_000 + 0x2C, 0.0f, 1.0f); } - if (((sp24->unk_000 & 0x100) != 0) || (sp24->unk_0BC & 0x80000000)) { - phi_s0->unkA0 = 0x50; + if ((sp24->unk_000 & 0x100) || (sp24->unk_0BC & 0x80000000)) { + D_80165C18[temp_a3].unk_000.unkA0 = 0x0050; } else { - phi_s0->unkA0 = 0xFF; + D_80165C18[temp_a3].unk_000.unkA0 = 0x00FF; } if (sp28 >= 3) { - phi_s0->unkC2 = 0; - phi_s0->unkC0 = 0; - phi_s0->unkBE = 0; - phi_s0->unk30 = 0.0f; - phi_s0->unk2C = 0.0f; - phi_s0->unk28 = 0.0f; - phi_s0->unkA0 = 0xFF; - phi_s0->unk0 = D_800EE1E0; + D_80165C18[temp_a3].unk_000.unkC2 = 0; + D_80165C18[temp_a3].unk_000.unkC0 = 0; + D_80165C18[temp_a3].unk_000.unkBE = 0; + D_80165C18[temp_a3].unk_000.unk30 = 0.0f; + D_80165C18[temp_a3].unk_000.unk2C = 0.0f; + D_80165C18[temp_a3].unk_000.unk28 = 0.0f; + D_80165C18[temp_a3].unk_000.unkA0 = 0x00FF; + D_80165C18[temp_a3].unk_000 = 0.6f; } } } @@ -1263,79 +1223,79 @@ void func_8005A380(void) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -void func_8006F824(?, s8, s32); /* extern */ -extern s32 gGamestate; -extern u16 D_800DC51C; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_8006F824(?, s8, s32); /* extern */ extern s8 D_801657E4; extern s8 D_801657E6; -extern s8 D_801657E8; extern s8 D_801657F0; extern s8 D_801657F8; -extern s8 D_80165800; +extern ? D_80165800; extern s32 D_8018D204; +extern void *gControllerFour; +extern void *gControllerOne; +extern void *gControllerThree; +extern void *gControllerTwo; +extern s32 gGamestate; -void func_8005A3C0(s32 arg2) { +void func_8005A3C0(s32 arg0, s32 arg1, s32 arg2) { s32 temp_v0; s32 temp_v0_2; - s8 phi_a1; - s32 phi_a2; + s32 var_a2; + s8 var_a1; + var_a2 = arg2; temp_v0 = gGamestate; - phi_a1 = 0; - phi_a2 = arg2; - phi_a1 = 0; + var_a1 = 0; if ((temp_v0 != 5) && (temp_v0 != 9) && (D_8018D204 == 0)) { temp_v0_2 = gPlayerCountSelection1; - if (temp_v0_2 != 1) { + if (temp_v0_2 != (s32) 1) { if (temp_v0_2 != 2) { - if (temp_v0_2 != 3) { - if (temp_v0_2 != 4) { - phi_a2 = 3; - } else if (((gControllerOne->buttonPressed & 1) != 0) || ((gControllerTwo->buttonPressed & 1) != 0) || ((gControllerThree->buttonPressed & 1) != 0) || (phi_a2 = 3, ((gControllerFour->buttonPressed & 1) != 0))) { + var_a2 = 3; + switch (temp_v0_2) { /* irregular */ + case 3: + if ((gControllerOne->unk6 & 1) || (gControllerTwo->unk6 & 1) || (gControllerThree->unk6 & 1)) { + if (gModeSelection != 3) { + D_801657F0 = (D_801657F0 + 1) & 1; + } + var_a1 = 1; + D_801657E4 = (D_801657E4 + 1) & 1; + } + break; + case 4: + if ((gControllerOne->unk6 & 1) || (gControllerTwo->unk6 & 1) || (gControllerThree->unk6 & 1) || (gControllerFour->unk6 & 1)) { D_801657E4 = (D_801657E4 + 1) & 1; D_801657F8 = (D_801657F8 + 1) & 1; - D_80165800.unk0 = (D_80165800.unk0 + 1) & 1; - phi_a1 = 1; - phi_a2 = 3; - if (gModeSelection != BATTLE) { + D_80165800.unk0 = (s8) ((D_80165800.unk0 + 1) & 1); + var_a1 = 1; + if (gModeSelection != 3) { D_801657F0 = (D_801657F0 + 1) & 1; - phi_a1 = 1; - phi_a2 = 3; } } - } else if (((gControllerOne->buttonPressed & 1) != 0) || ((gControllerTwo->buttonPressed & 1) != 0) || (phi_a2 = 3, ((gControllerThree->buttonPressed & 1) != 0))) { - if (gModeSelection != BATTLE) { - D_801657F0 = (D_801657F0 + 1) & 1; - } - D_801657E4 = (D_801657E4 + 1) & 1; - phi_a1 = 1; - phi_a2 = 3; + break; } } else { - phi_a2 = 3; - if (gModeSelection != BATTLE) { - if ((gControllerOne->buttonPressed & 1) != 0) { - D_80165800.unk0 = (D_80165800.unk0 + 1) & 1; - phi_a1 = 1; + var_a2 = 3; + if (gModeSelection != 3) { + if (gControllerOne->unk6 & 1) { + var_a1 = 1; + D_80165800.unk0 = (s8) ((D_80165800.unk0 + 1) & 1); } - if ((gControllerTwo->buttonPressed & 1) != 0) { - D_80165800.unk1 = (D_80165800.unk1 + 1) & 1; - phi_a1 = 1; + if (gControllerTwo->unk6 & 1) { + var_a1 = 1; + D_80165800.unk1 = (s8) ((D_80165800.unk1 + 1) & 1); } if ((D_80165800.unk0 != 0) && (D_80165800.unk1 != 0)) { D_801657F0 = 0; } else { D_801657F0 = 1; } - phi_a2 = 3; if (D_800DC51C != 0) { D_801657F0 = 0; - phi_a2 = 3; } } } - } else if ((gControllerOne->buttonPressed & 1) != 0) { + } else if (gControllerOne->unk6 & 1) { + var_a1 = 1; D_801657E4 += 1; if (D_801657E4 >= 3) { D_801657E4 = 0; @@ -1344,21 +1304,20 @@ void func_8005A3C0(s32 arg2) { D_801657E8 = 0; D_801657E6 = 0; D_801657F0 = 1; - phi_a1 = 1; } else if (D_801657E4 == 1) { D_801657E8 = 0; D_801657E6 = 1; D_801657F0 = 0; - phi_a1 = 1; + var_a1 = 1; } else { D_801657E8 = 1; D_801657E6 = 0; D_801657F0 = 0; - phi_a1 = 1; + var_a1 = 1; } } - if (phi_a1 != 0) { - func_8006F824(1, phi_a1, phi_a2); + if (var_a1 != 0) { + func_8006F824(1, var_a1, var_a2); } } } @@ -1373,38 +1332,37 @@ void func_8005A71C(void) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -void func_80074EE8(); /* extern */ -void func_80075838(); /* extern */ -void func_80075CA8(); /* extern */ -void func_80076B84(); /* extern */ -void func_80076F2C(); /* extern */ -void func_80077C9C(); /* extern */ -void func_80078838(); /* extern */ -void func_8007C2F8(?); /* extern */ -void func_8007C340(); /* extern */ -void func_8007DB44(); /* extern */ -void func_8007E1AC(); /* extern */ -void func_8007E4C4(); /* extern */ -void func_80081208(); /* extern */ -void func_800821FC(); /* extern */ -void func_80082870(); /* extern */ -void func_80082E5C(); /* extern */ -void func_80083080(); /* extern */ -void func_800834B8(); /* extern */ -void func_80083D60(); /* extern */ -void func_800842C8(); /* extern */ -void func_80085214(); /* extern */ -void func_800857C0(); /* extern */ -void func_80085AA8(); /* extern */ -void func_800861E0(); /* extern */ -u16 gCurrentCourseId; /* unable to generate initializer */ +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_80074EE8(); /* extern */ +? func_80075838(); /* extern */ +? func_80075CA8(); /* extern */ +? func_80076B84(); /* extern */ +? func_80076F2C(); /* extern */ +? func_80077C9C(); /* extern */ +? func_80078838(); /* extern */ +? func_8007DB44(); /* extern */ +? func_8007E1AC(); /* extern */ +? func_8007E4C4(); /* extern */ +? func_800821FC(); /* extern */ +? func_80082870(); /* extern */ +? func_80082E5C(); /* extern */ +? func_80083080(); /* extern */ +? func_800834B8(); /* extern */ +? func_80083D60(); /* extern */ +? func_800842C8(); /* extern */ +? func_80085214(); /* extern */ +? func_800857C0(); /* extern */ +? func_80085AA8(); /* extern */ +? func_800861E0(); /* extern */ +extern s8 D_80165898; +extern s32 gGamestate; +s16 gCurrentCourseId; /* unable to generate initializer */ void func_8005A74C(void) { s8 temp_v0; u16 temp_t6; - temp_t6 = gCurrentCourseId; + temp_t6 = (u16) gCurrentCourseId; switch (temp_t6) { case 2: func_80081208(); @@ -1548,22 +1506,21 @@ void func_8005AB20(void) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75 -s32 s16_step_towards(? *, ?, ?); /* extern */ +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b extern s16 D_8016579E; extern u8 D_801657E7; -extern ? D_8018CAAE; -extern ? D_8018CAB0; +extern s16 D_8018CAAE; +extern s16 D_8018CAB0; extern s16 D_8018CAB8; -extern ? D_8018CABE; -extern ? D_8018CAC0; -extern ? D_8018CAC2; -extern ? D_8018CACA; -extern ? D_8018CACC; -extern ? D_8018CACE; +extern s16 D_8018CABE; +extern s16 D_8018CAC0; +extern s16 D_8018CAC2; +extern s16 D_8018CACA; +extern s16 D_8018CACC; +extern s16 D_8018CACE; extern f32 D_8018CFEC; extern f32 D_8018CFF4; -static u16 D_800E55B0[0]; /* unable to generate initializer; const */ +static u16 D_800E55B0[0]; /* unable to generate initializer */ void func_8005AB60(void) { s32 temp_v0_2; @@ -1581,45 +1538,45 @@ void func_8005AB60(void) { temp_t6 = (u8) D_8018CA70->unk_78; switch (temp_t6) { /* switch 1 */ case 1: /* switch 1 */ - s16_step_towards(&D_8018CAAE, 0x106, 0x10); - if (s16_step_towards(&D_8018CAB0, 0xB6, 0x10) != 0) { + s16_step_towards(&D_8018CAAE, 0x0106, 0x0010); + if (s16_step_towards(&D_8018CAB0, 0x00B6, 0x0010) != 0) { D_8018CA70->unk_79 = 1; D_8018CA70->unk_78 = (u8) D_8018CA70->unk_78 + 1; } break; case 2: /* switch 1 */ - s16_step_towards(&D_8018CAAE, 0x116, 4); - if (s16_step_towards(&D_8018CAB0, 0xC6, 4) != 0) { + s16_step_towards(&D_8018CAAE, 0x0116, 4); + if (s16_step_towards(&D_8018CAB0, 0x00C6, 4) != 0) { D_8018CA70->unk_78 = (u8) D_8018CA70->unk_78 + 1; } break; case 3: /* switch 1 */ - s16_step_towards(&D_8018CAAE, 0x106, 4); - if (s16_step_towards(&D_8018CAB0, 0xB6, 4) != 0) { + s16_step_towards(&D_8018CAAE, 0x0106, 4); + if (s16_step_towards(&D_8018CAB0, 0x00B6, 4) != 0) { D_8018CA70->unk_78 = (u8) D_8018CA70->unk_78 + 1; } break; case 4: /* switch 1 */ - s16_step_towards(&D_8018CAAE, 0x10E, 4); - if (s16_step_towards(&D_8018CAB0, 0xBE, 4) != 0) { + s16_step_towards(&D_8018CAAE, 0x010E, 4); + if (s16_step_towards(&D_8018CAB0, 0x00BE, 4) != 0) { D_8018CA70->unk_78 = (u8) D_8018CA70->unk_78 + 1; } break; case 5: /* switch 1 */ - s16_step_towards(&D_8018CAAE, 0x106, 4); - if (s16_step_towards(&D_8018CAB0, 0xB6, 4) != 0) { + s16_step_towards(&D_8018CAAE, 0x0106, 4); + if (s16_step_towards(&D_8018CAB0, 0x00B6, 4) != 0) { D_8018CA70->unk_78 = (u8) D_8018CA70->unk_78 + 1; } break; case 6: /* switch 1 */ - s16_step_towards(&D_8018CAAE, 0x10A, 2); - if (s16_step_towards(&D_8018CAB0, 0xBA, 2) != 0) { + s16_step_towards(&D_8018CAAE, 0x010A, 2); + if (s16_step_towards(&D_8018CAB0, 0x00BA, 2) != 0) { D_8018CA70->unk_78 = (u8) D_8018CA70->unk_78 + 1; } break; case 7: /* switch 1 */ - s16_step_towards(&D_8018CAAE, 0x106, 2); - if (s16_step_towards(&D_8018CAB0, 0xB6, 2) != 0) { + s16_step_towards(&D_8018CAAE, 0x0106, 2); + if (s16_step_towards(&D_8018CAB0, 0x00B6, 2) != 0) { D_8018CA70->unk_78 = (u8) D_8018CA70->unk_78 + 1; } break; @@ -1640,81 +1597,81 @@ void func_8005AB60(void) { D_8016579E = D_800E55B0[temp_v0_2] + 0xDD00; } } - temp_t8 = D_8018CA70->unk80; + temp_t8 = (u8) D_8018CA70->unk_80; switch (temp_t8) { /* switch 2 */ case 1: /* switch 2 */ - if (s16_step_towards(&D_8018CAB8, 0x40, 8) != 0) { - D_8018CA70->unk80 = (u8) (D_8018CA70->unk80 + 1); + if (s16_step_towards(&D_8018CAB8, 0x0040, 8) != 0) { + D_8018CA70->unk_80 = (u8) D_8018CA70->unk_80 + 1; } break; case 2: /* switch 2 */ - if (s16_step_towards(&D_8018CAB8, 0x38, 8) != 0) { - D_8018CA70->unk80 = (u8) (D_8018CA70->unk80 + 1); + if (s16_step_towards(&D_8018CAB8, 0x0038, 8) != 0) { + D_8018CA70->unk_80 = (u8) D_8018CA70->unk_80 + 1; } break; case 3: /* switch 2 */ - if (s16_step_towards(&D_8018CAB8, 0x40, 8) != 0) { - D_8018CA70->unk80 = (u8) (D_8018CA70->unk80 + 1); + if (s16_step_towards(&D_8018CAB8, 0x0040, 8) != 0) { + D_8018CA70->unk_80 = (u8) D_8018CA70->unk_80 + 1; } break; case 4: /* switch 2 */ - if (s16_step_towards(&D_8018CAB8, 0x38, 8) != 0) { - D_8018CA70->unk80 = (u8) (D_8018CA70->unk80 + 1); + if (s16_step_towards(&D_8018CAB8, 0x0038, 8) != 0) { + D_8018CA70->unk_80 = (u8) D_8018CA70->unk_80 + 1; } break; case 5: /* switch 2 */ - if (s16_step_towards(&D_8018CAB8, 0x40, 8) != 0) { - D_8018CA70->unk80 = (u8) (D_8018CA70->unk80 + 1); + if (s16_step_towards(&D_8018CAB8, 0x0040, 8) != 0) { + D_8018CA70->unk_80 = (u8) D_8018CA70->unk_80 + 1; } break; case 6: /* switch 2 */ - if (s16_step_towards(&D_8018CAB8, 0x38, 4) != 0) { - D_8018CA70->unk80 = (u8) (D_8018CA70->unk80 + 1); + if (s16_step_towards(&D_8018CAB8, 0x0038, 4) != 0) { + D_8018CA70->unk_80 = (u8) D_8018CA70->unk_80 + 1; } break; case 7: /* switch 2 */ - if (s16_step_towards(&D_8018CAB8, 0x40, 4) != 0) { - D_8018CA70->unk80 = (u8) (D_8018CA70->unk80 + 1); + if (s16_step_towards(&D_8018CAB8, 0x0040, 4) != 0) { + D_8018CA70->unk_80 = (u8) D_8018CA70->unk_80 + 1; } break; case 8: /* switch 2 */ - D_8018CA70->unk80 = 0U; + D_8018CA70->unk_80 = 0; break; } temp_t3_2 = (u8) D_8018CA70->unk_7A; switch (temp_t3_2) { /* switch 3 */ case 1: /* switch 3 */ - if (s16_step_towards(&D_8018CABE, 0xE4, 0x10) != 0) { + if (s16_step_towards(&D_8018CABE, 0x00E4, 0x0010) != 0) { D_8018CA70->unk_7A = (u8) D_8018CA70->unk_7A + 1; } break; case 2: /* switch 3 */ - if (s16_step_towards(&D_8018CABE, 0xF4, 4) != 0) { + if (s16_step_towards(&D_8018CABE, 0x00F4, 4) != 0) { D_8018CA70->unk_7A = (u8) D_8018CA70->unk_7A + 1; } break; case 3: /* switch 3 */ - if (s16_step_towards(&D_8018CABE, 0xE4, 4) != 0) { + if (s16_step_towards(&D_8018CABE, 0x00E4, 4) != 0) { D_8018CA70->unk_7A = (u8) D_8018CA70->unk_7A + 1; } break; case 4: /* switch 3 */ - if (s16_step_towards(&D_8018CABE, 0xEC, 4) != 0) { + if (s16_step_towards(&D_8018CABE, 0x00EC, 4) != 0) { D_8018CA70->unk_7A = (u8) D_8018CA70->unk_7A + 1; } break; case 5: /* switch 3 */ - if (s16_step_towards(&D_8018CABE, 0xE4, 4) != 0) { + if (s16_step_towards(&D_8018CABE, 0x00E4, 4) != 0) { D_8018CA70->unk_7A = (u8) D_8018CA70->unk_7A + 1; } break; case 6: /* switch 3 */ - if (s16_step_towards(&D_8018CABE, 0xE8, 2) != 0) { + if (s16_step_towards(&D_8018CABE, 0x00E8, 2) != 0) { D_8018CA70->unk_7A = (u8) D_8018CA70->unk_7A + 1; } break; case 7: /* switch 3 */ - if (s16_step_towards(&D_8018CABE, 0xE4, 2) != 0) { + if (s16_step_towards(&D_8018CABE, 0x00E4, 2) != 0) { D_8018CA70->unk_7A = (u8) D_8018CA70->unk_7A + 1; } break; @@ -1725,37 +1682,37 @@ void func_8005AB60(void) { temp_t8_2 = (u8) D_8018CA70->unk_7D; switch (temp_t8_2) { /* switch 4 */ case 1: /* switch 4 */ - if (s16_step_towards(&D_8018CACA, 0x53, 0x10) != 0) { + if (s16_step_towards(&D_8018CACA, 0x0053, 0x0010) != 0) { D_8018CA70->unk_7D = (u8) D_8018CA70->unk_7D + 1; } break; case 2: /* switch 4 */ - if (s16_step_towards(&D_8018CACA, 0x43, 4) != 0) { + if (s16_step_towards(&D_8018CACA, 0x0043, 4) != 0) { D_8018CA70->unk_7D = (u8) D_8018CA70->unk_7D + 1; } break; case 3: /* switch 4 */ - if (s16_step_towards(&D_8018CACA, 0x53, 4) != 0) { + if (s16_step_towards(&D_8018CACA, 0x0053, 4) != 0) { D_8018CA70->unk_7D = (u8) D_8018CA70->unk_7D + 1; } break; case 4: /* switch 4 */ - if (s16_step_towards(&D_8018CACA, 0x4B, 4) != 0) { + if (s16_step_towards(&D_8018CACA, 0x004B, 4) != 0) { D_8018CA70->unk_7D = (u8) D_8018CA70->unk_7D + 1; } break; case 5: /* switch 4 */ - if (s16_step_towards(&D_8018CACA, 0x53, 4) != 0) { + if (s16_step_towards(&D_8018CACA, 0x0053, 4) != 0) { D_8018CA70->unk_7D = (u8) D_8018CA70->unk_7D + 1; } break; case 6: /* switch 4 */ - if (s16_step_towards(&D_8018CACA, 0x4F, 2) != 0) { + if (s16_step_towards(&D_8018CACA, 0x004F, 2) != 0) { D_8018CA70->unk_7D = (u8) D_8018CA70->unk_7D + 1; } break; case 7: /* switch 4 */ - if (s16_step_towards(&D_8018CACA, 0x53, 2) != 0) { + if (s16_step_towards(&D_8018CACA, 0x0053, 2) != 0) { D_8018CA70->unk_7D = (u8) D_8018CA70->unk_7D + 1; } break; @@ -1768,37 +1725,37 @@ void func_8005AB60(void) { temp_t7 = (u8) D_8018CA70->unk_7B; switch (temp_t7) { /* switch 5 */ case 1: /* switch 5 */ - if (s16_step_towards(&D_8018CAC0, 0xE4, 0x10) != 0) { + if (s16_step_towards(&D_8018CAC0, 0x00E4, 0x0010) != 0) { D_8018CA70->unk_7B = (u8) D_8018CA70->unk_7B + 1; } break; case 2: /* switch 5 */ - if (s16_step_towards(&D_8018CAC0, 0xF4, 4) != 0) { + if (s16_step_towards(&D_8018CAC0, 0x00F4, 4) != 0) { D_8018CA70->unk_7B = (u8) D_8018CA70->unk_7B + 1; } break; case 3: /* switch 5 */ - if (s16_step_towards(&D_8018CAC0, 0xE4, 4) != 0) { + if (s16_step_towards(&D_8018CAC0, 0x00E4, 4) != 0) { D_8018CA70->unk_7B = (u8) D_8018CA70->unk_7B + 1; } break; case 4: /* switch 5 */ - if (s16_step_towards(&D_8018CAC0, 0xEC, 4) != 0) { + if (s16_step_towards(&D_8018CAC0, 0x00EC, 4) != 0) { D_8018CA70->unk_7B = (u8) D_8018CA70->unk_7B + 1; } break; case 5: /* switch 5 */ - if (s16_step_towards(&D_8018CAC0, 0xE4, 4) != 0) { + if (s16_step_towards(&D_8018CAC0, 0x00E4, 4) != 0) { D_8018CA70->unk_7B = (u8) D_8018CA70->unk_7B + 1; } break; case 6: /* switch 5 */ - if (s16_step_towards(&D_8018CAC0, 0xE8, 2) != 0) { + if (s16_step_towards(&D_8018CAC0, 0x00E8, 2) != 0) { D_8018CA70->unk_7B = (u8) D_8018CA70->unk_7B + 1; } break; case 7: /* switch 5 */ - if (s16_step_towards(&D_8018CAC0, 0xE4, 2) != 0) { + if (s16_step_towards(&D_8018CAC0, 0x00E4, 2) != 0) { D_8018CA70->unk_7B = (u8) D_8018CA70->unk_7B + 1; } break; @@ -1809,37 +1766,37 @@ void func_8005AB60(void) { temp_t2 = (u8) D_8018CA70->unk_7E; switch (temp_t2) { /* switch 6 */ case 1: /* switch 6 */ - if (s16_step_towards(&D_8018CACC, 0x53, 0x10) != 0) { + if (s16_step_towards(&D_8018CACC, 0x0053, 0x0010) != 0) { D_8018CA70->unk_7E = (u8) D_8018CA70->unk_7E + 1; } break; case 2: /* switch 6 */ - if (s16_step_towards(&D_8018CACC, 0x43, 4) != 0) { + if (s16_step_towards(&D_8018CACC, 0x0043, 4) != 0) { D_8018CA70->unk_7E = (u8) D_8018CA70->unk_7E + 1; } break; case 3: /* switch 6 */ - if (s16_step_towards(&D_8018CACC, 0x53, 4) != 0) { + if (s16_step_towards(&D_8018CACC, 0x0053, 4) != 0) { D_8018CA70->unk_7E = (u8) D_8018CA70->unk_7E + 1; } break; case 4: /* switch 6 */ - if (s16_step_towards(&D_8018CACC, 0x4B, 4) != 0) { + if (s16_step_towards(&D_8018CACC, 0x004B, 4) != 0) { D_8018CA70->unk_7E = (u8) D_8018CA70->unk_7E + 1; } break; case 5: /* switch 6 */ - if (s16_step_towards(&D_8018CACC, 0x53, 4) != 0) { + if (s16_step_towards(&D_8018CACC, 0x0053, 4) != 0) { D_8018CA70->unk_7E = (u8) D_8018CA70->unk_7E + 1; } break; case 6: /* switch 6 */ - if (s16_step_towards(&D_8018CACC, 0x4F, 2) != 0) { + if (s16_step_towards(&D_8018CACC, 0x004F, 2) != 0) { D_8018CA70->unk_7E = (u8) D_8018CA70->unk_7E + 1; } break; case 7: /* switch 6 */ - if (s16_step_towards(&D_8018CACC, 0x53, 2) != 0) { + if (s16_step_towards(&D_8018CACC, 0x0053, 2) != 0) { D_8018CA70->unk_7E = (u8) D_8018CA70->unk_7E + 1; } break; @@ -1850,37 +1807,37 @@ void func_8005AB60(void) { temp_t7_2 = (u8) D_8018CA70->unk_7C; switch (temp_t7_2) { /* switch 7 */ case 1: /* switch 7 */ - if (s16_step_towards(&D_8018CAC2, 0xE4, 0x10) != 0) { + if (s16_step_towards(&D_8018CAC2, 0x00E4, 0x0010) != 0) { D_8018CA70->unk_7C = (u8) D_8018CA70->unk_7C + 1; } break; case 2: /* switch 7 */ - if (s16_step_towards(&D_8018CAC2, 0xF4, 4) != 0) { + if (s16_step_towards(&D_8018CAC2, 0x00F4, 4) != 0) { D_8018CA70->unk_7C = (u8) D_8018CA70->unk_7C + 1; } break; case 3: /* switch 7 */ - if (s16_step_towards(&D_8018CAC2, 0xE4, 4) != 0) { + if (s16_step_towards(&D_8018CAC2, 0x00E4, 4) != 0) { D_8018CA70->unk_7C = (u8) D_8018CA70->unk_7C + 1; } break; case 4: /* switch 7 */ - if (s16_step_towards(&D_8018CAC2, 0xEC, 4) != 0) { + if (s16_step_towards(&D_8018CAC2, 0x00EC, 4) != 0) { D_8018CA70->unk_7C = (u8) D_8018CA70->unk_7C + 1; } break; case 5: /* switch 7 */ - if (s16_step_towards(&D_8018CAC2, 0xE4, 4) != 0) { + if (s16_step_towards(&D_8018CAC2, 0x00E4, 4) != 0) { D_8018CA70->unk_7C = (u8) D_8018CA70->unk_7C + 1; } break; case 6: /* switch 7 */ - if (s16_step_towards(&D_8018CAC2, 0xE8, 2) != 0) { + if (s16_step_towards(&D_8018CAC2, 0x00E8, 2) != 0) { D_8018CA70->unk_7C = (u8) D_8018CA70->unk_7C + 1; } break; case 7: /* switch 7 */ - if (s16_step_towards(&D_8018CAC2, 0xE4, 2) != 0) { + if (s16_step_towards(&D_8018CAC2, 0x00E4, 2) != 0) { D_8018CA70->unk_7C = (u8) D_8018CA70->unk_7C + 1; } break; @@ -1891,44 +1848,44 @@ void func_8005AB60(void) { temp_t2_2 = (u8) D_8018CA70->unk_7F; switch (temp_t2_2) { /* switch 8 */ case 1: /* switch 8 */ - if (s16_step_towards(&D_8018CACE, 0x53, 0x10) != 0) { + if (s16_step_towards(&D_8018CACE, 0x0053, 0x0010) != 0) { D_8018CA70->unk_7F = (u8) D_8018CA70->unk_7F + 1; return; } default: /* switch 8 */ return; case 2: /* switch 8 */ - if (s16_step_towards(&D_8018CACE, 0x43, 4) != 0) { + if (s16_step_towards(&D_8018CACE, 0x0043, 4) != 0) { D_8018CA70->unk_7F = (u8) D_8018CA70->unk_7F + 1; return; } break; case 3: /* switch 8 */ - if (s16_step_towards(&D_8018CACE, 0x53, 4) != 0) { + if (s16_step_towards(&D_8018CACE, 0x0053, 4) != 0) { D_8018CA70->unk_7F = (u8) D_8018CA70->unk_7F + 1; return; } break; case 4: /* switch 8 */ - if (s16_step_towards(&D_8018CACE, 0x4B, 4) != 0) { + if (s16_step_towards(&D_8018CACE, 0x004B, 4) != 0) { D_8018CA70->unk_7F = (u8) D_8018CA70->unk_7F + 1; return; } break; case 5: /* switch 8 */ - if (s16_step_towards(&D_8018CACE, 0x53, 4) != 0) { + if (s16_step_towards(&D_8018CACE, 0x0053, 4) != 0) { D_8018CA70->unk_7F = (u8) D_8018CA70->unk_7F + 1; return; } break; case 6: /* switch 8 */ - if (s16_step_towards(&D_8018CACE, 0x4F, 2) != 0) { + if (s16_step_towards(&D_8018CACE, 0x004F, 2) != 0) { D_8018CA70->unk_7F = (u8) D_8018CA70->unk_7F + 1; return; } break; case 7: /* switch 8 */ - if (s16_step_towards(&D_8018CACE, 0x53, 2) != 0) { + if (s16_step_towards(&D_8018CACE, 0x0053, 2) != 0) { D_8018CA70->unk_7F = (u8) D_8018CA70->unk_7F + 1; return; } @@ -1943,67 +1900,57 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005AB60.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75 -s32 s16_step_towards(? *, ?, ?); /* extern */ -s32 f32_step_towards(f32 *, f32, f32); /* extern */ -extern ? D_8018CAC0; -extern ? D_8018CAC2; -extern ? D_8018CAC4; -extern ? D_8018CAC6; -extern f32 D_8018D028; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +extern s16 D_8018CAC0; +extern s16 D_8018CAC2; +extern s16 D_8018CAC4; +extern s16 D_8018CAC6; +extern ? D_8018D028; extern f32 D_8018D050; -extern s16 D_8018D070; +extern ? D_8018D070; extern ? D_8018D078; -extern f32 D_8018D0C8; +extern ? D_8018D0C8; void func_8005B7A0(void) { - f32 *temp_s1; f32 *temp_s2; f32 *temp_s3; f32 *temp_s4; + f32 *var_s1; f32 temp_f0; - f32 *phi_s1; - s32 phi_s0; + s32 var_s0; - s16_step_towards(&D_8018CAC0, 0xE4, 0x10); - s16_step_towards(&D_8018CAC2, 0xE4, 0x10); - s16_step_towards(&D_8018CAC4, 0xE4, 0x10); - s16_step_towards(&D_8018CAC6, 0xE4, 0x10); - phi_s1 = &D_8018D050; - phi_s0 = 0; + s16_step_towards(&D_8018CAC0, 0x00E4, 0x0010); + s16_step_towards(&D_8018CAC2, 0x00E4, 0x0010); + s16_step_towards(&D_8018CAC4, 0x00E4, 0x0010); + s16_step_towards(&D_8018CAC6, 0x00E4, 0x0010); + var_s1 = &D_8018D050; + var_s0 = 0; do { - temp_s2 = &D_8018D028 + phi_s0; - temp_s3 = &D_8018D0C8 + phi_s0; - temp_s4 = &D_8018D078 + phi_s0; - if (*phi_s1 >= 0.0f) { + temp_s2 = &D_8018D028 + var_s0; + temp_s3 = &D_8018D0C8 + var_s0; + temp_s4 = &D_8018D078 + var_s0; + if (*var_s1 >= 0.0f) { f32_step_towards(temp_s2, *temp_s3, *temp_s4); temp_f0 = *temp_s2; if (temp_f0 == *temp_s3) { *temp_s4 = 0.0f; } if ((f64) temp_f0 <= -32.0) { - *phi_s1 = -32.0f; + *var_s1 = -32.0f; } } - temp_s1 = phi_s1 + 4; - phi_s1 = temp_s1; - phi_s0 += 4; - } while (temp_s1 != &D_8018D070); + var_s1 += 4; + var_s0 += 4; + } while (var_s1 != &D_8018D070); } #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005B7A0.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75 -s32 f32_step_towards(f32 *, f32, ?32); /* extern */ -void func_8005AA4C(); /* extern */ -void func_8005AA6C(?); /* extern */ -void func_8005AA80(); /* extern */ -void func_8005AA94(?); /* extern */ -void func_8005AAF0(); /* extern */ -void func_8005AB60(); /* extern */ -void func_8005B7A0(); /* extern */ +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_8005AB60(); /* extern */ +? func_8005B7A0(); /* extern */ extern s8 D_801657E2; extern f32 D_8018D028; extern f32 D_8018D02C; @@ -2021,8 +1968,8 @@ extern f32 D_8018D060; extern f32 D_8018D064; extern f32 D_8018D068; extern f32 D_8018D06C; -extern s16 D_8018D070; -extern ?32 D_8018D078; +extern ? D_8018D070; +extern f32 D_8018D078; extern f32 D_8018D07C; extern f32 D_8018D080; extern f32 D_8018D084; @@ -2030,7 +1977,7 @@ extern f32 D_8018D088; extern f32 D_8018D08C; extern f32 D_8018D090; extern f32 D_8018D094; -extern s16 D_8018D098; +extern ? D_8018D098; extern f32 D_8018D0C8; extern f32 D_8018D0CC; extern f32 D_8018D0D0; @@ -2042,32 +1989,27 @@ extern f32 D_8018D0E4; extern s32 D_8018D1CC; void func_8005B914(void) { - ?32 *sp20; + f32 *sp20; f32 *sp1C; f32 *sp18; - ?32 *temp_v0_3; - f32 *temp_v0_2; - f32 *temp_v1; - s32 temp_v0; - f32 *phi_v0; - ?32 *phi_v0_2; - s32 phi_v0_3; - s32 phi_v0_4; - ?32 *phi_v0_5; - f32 *phi_v1; - f32 *phi_a0; + f32 *var_a0; + f32 *var_v0_2; + f32 *var_v0_3; + f32 *var_v0_4; + f32 *var_v1; + s32 temp_cond; + s32 var_v0; - temp_v0 = D_8018D1CC; - phi_v0_3 = temp_v0; - switch (temp_v0) { /* irregular */ + var_v0 = D_8018D1CC; + switch (var_v0) { /* irregular */ case 0x1: func_8005AAF0(); block_76: - phi_v0_3 = D_8018D1CC; + var_v0 = D_8018D1CC; break; case 0x2: - if (gModeSelection == TIME_TRIALS) { - D_8018CA70->unk80 = 1; + if (gModeSelection == 1) { + D_8018CA70->unk_80 = 1; } D_8018CA70->unk_78 = 1; D_8018CA70->unk_7A = 1; @@ -2092,7 +2034,7 @@ block_76: func_8005AA80(); goto block_76; case 0x14: - D_8018D078 = 0x41800000; + D_8018D078 = 16.0f; func_8005AA4C(); goto block_76; case 0x15: @@ -2117,7 +2059,7 @@ block_76: func_8005AA4C(); goto block_76; case 0x1B: - func_8005AA94(0xA); + func_8005AA94(0x0000000A); goto block_76; case 0x1C: func_8005AA80(); @@ -2126,10 +2068,10 @@ block_76: func_8005AA4C(); goto block_76; case 0x65: - func_8005AA94(0x3A); + func_8005AA94(0x0000003A); goto block_76; case 0x66: - D_8018D078 = 0xC1000000; + D_8018D078 = -8.0f; D_8018D0C8 = -32.0f; func_8005AA4C(); goto block_76; @@ -2158,22 +2100,21 @@ block_76: func_8005AA4C(); goto block_76; case 0x6D: - func_8005AA94(0xA); + func_8005AA94(0x0000000A); goto block_76; case 0x6E: - phi_v0 = &D_8018D050; + var_v0_2 = &D_8018D050; do { - temp_v0_2 = phi_v0 + 0x10; - temp_v0_2->unk-10 = -32.0f; - temp_v0_2->unk-C = -32.0f; - temp_v0_2->unk-8 = -32.0f; - temp_v0_2->unk-4 = -32.0f; - phi_v0 = temp_v0_2; - } while (temp_v0_2 != &D_8018D070); + var_v0_2 += 0x10; + var_v0_2->unk-10 = -32.0f; + var_v0_2->unk-C = -32.0f; + var_v0_2->unk-8 = -32.0f; + var_v0_2->unk-4 = -32.0f; + } while (var_v0_2 != &D_8018D070); D_8018D028 = 360.0f; D_8018D050 = 110.0f; D_8018D0C8 = 44.0f; - D_8018D078 = 0xC1800000; + D_8018D078 = -16.0f; D_801657E2 = 1; func_8005AA4C(); goto block_76; @@ -2248,35 +2189,34 @@ block_76: func_8005AA4C(); goto block_76; case 0x7D: - func_8005AA94(0xA); + func_8005AA94(0x0000000A); goto block_76; case 0x7E: - phi_v0_2 = &D_8018D078; + var_v0_3 = &D_8018D078; do { - temp_v0_3 = phi_v0_2 + 0x10; - temp_v0_3->unk-C = 0.0f; - temp_v0_3->unk-8 = 0.0f; - temp_v0_3->unk-4 = 0.0f; - temp_v0_3->unk-10 = 0.0f; - phi_v0_2 = temp_v0_3; - } while (temp_v0_3 != &D_8018D098); + var_v0_3 += 0x10; + var_v0_3->unk-C = 0.0f; + var_v0_3->unk-8 = 0.0f; + var_v0_3->unk-4 = 0.0f; + var_v0_3->unk-10 = 0.0f; + } while (var_v0_3 != &D_8018D098); func_8005AA4C(); goto block_76; case 0x7F: - func_8005AA94(0x82); + func_8005AA94(0x00000082); goto block_76; case 0x80: if (*gPlayerPositions < 4) { - func_8005AA6C(0x8C); + func_8005AA6C(0x0000008C); } else { - func_8005AA6C(0x82); + func_8005AA6C(0x00000082); } goto block_76; case 0x82: func_8005AA80(); goto block_76; case 0x8C: - D_8018D078 = 0xC1800000; + D_8018D078 = -16.0f; D_8018D0C8 = -32.0f; func_8005AA4C(); goto block_76; @@ -2337,39 +2277,38 @@ block_76: func_8005AA4C(); goto block_76; case 0x9B: - func_8005AA94(0x14); + func_8005AA94(0x00000014); goto block_76; case 0x9C: func_8005AA80(); goto block_76; } - phi_v0_4 = phi_v0_3; - if (phi_v0_3 < 0x64) { + if (var_v0 < 0x64) { func_8005AB60(); goto block_81; } - if (phi_v0_3 < 0xC8) { + if (var_v0 < 0xC8) { func_8005B7A0(); block_81: - phi_v0_4 = D_8018D1CC; + var_v0 = D_8018D1CC; } - if ((phi_v0_4 != 0) && (phi_v0_4 >= 0x14) && (phi_v0_4 < 0x1E)) { - phi_v0_5 = &D_8018D078; - phi_v1 = &D_8018D0C8; - phi_a0 = &D_8018D028; + if ((var_v0 != 0) && (var_v0 >= 0x14) && (var_v0 < 0x1E)) { + var_v1 = &D_8018D0C8; + var_a0 = &D_8018D028; + var_v0_4 = &D_8018D078; do { - sp20 = phi_v0_5; - sp18 = phi_v1; - sp1C = phi_a0; - f32_step_towards(phi_a0, *phi_v1, *phi_v0_5); - temp_v1 = phi_v1 + 4; - phi_v1 = temp_v1; - phi_a0 += 4; - if (*phi_a0 == *phi_v1) { - *phi_v0_5 = 0; + sp20 = var_v0_4; + sp18 = var_v1; + sp1C = var_a0; + f32_step_towards(var_a0, *var_v1, *var_v0_4); + temp_cond = *var_a0 == *var_v1; + var_v1 += 4; + var_a0 += 4; + if (temp_cond) { + *var_v0_4 = 0.0f; } - phi_v0_5 += 4; - } while (temp_v1 != &D_8018D0D8); + var_v0_4 += 4; + } while (var_v1 != &D_8018D0D8); } } #else @@ -2377,27 +2316,26 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005B914.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern ? D_800E55A0; -extern f64 D_800EE4A8; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b extern s16 D_8016579E; extern u8 D_801657E7; extern u8 D_8018CAE9; extern f32 D_8018CFE4; +static u16 D_800E55A0[0]; /* unable to generate initializer */ void func_8005C360(f32 arg0) { f64 temp_f0; + s32 var_v0; u8 temp_t7; - s32 phi_v0; if (D_8018CAE9 == 0) { - temp_f0 = arg0; + temp_f0 = (f64) arg0; if (temp_f0 < 10.0) { - phi_v0 = ((128.0f * arg0) + 0xDD00) & 0xFFFF; + var_v0 = ((u32) (128.0f * arg0) + 0xDD00) & 0xFFFF; } else if (temp_f0 < 20.0) { - phi_v0 = (((temp_f0 - 10.0) * 256.0) + 0xE200) & 0xFFFF; + var_v0 = ((u32) ((temp_f0 - 10.0) * 256.0) + 0xE200) & 0xFFFF; } else { - phi_v0 = (((temp_f0 - 20.0) * D_800EE4A8) + 0xEC00) & 0xFFFF; + var_v0 = ((u32) ((temp_f0 - 20.0) * 268.8) + 0xEC00) & 0xFFFF; } if (arg0 == D_8018CFE4) { if (arg0 > 5.0f) { @@ -2411,7 +2349,7 @@ block_10: D_801657E7 = 0; } } - D_8016579E = *(&D_800E55A0 + (D_801657E7 * 2)) + phi_v0; + D_8016579E = D_800E55A0[D_801657E7] + var_v0; D_8018CFE4 = arg0; } } @@ -2485,9 +2423,9 @@ void func_8005C6B4(s8 arg0, s16* arg1, s16* arg2, s16* arg3) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8005C674(s8, s16 *, s16 *, s16 *); // extern -void func_8005C980(); // extern +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_8005C674(s8, s16 *, s16 *, s16 *); /* extern */ +? func_8005C980(); /* extern */ extern s32 D_80165590; extern s32 D_80165594; extern s32 D_80165598; @@ -2517,66 +2455,56 @@ void func_8005C728(void) { s16 sp26; s16 sp24; s16 sp22; - s32 temp_t2; - s32 temp_t3; - s32 temp_t4; s32 temp_t5; - s32 temp_t5_2; s32 temp_t7; s32 temp_t8; - s32 temp_t9; temp_t7 = D_8018D400 + 1; temp_t8 = temp_t7 & 0x3F; - temp_t9 = temp_t7 & 0x1F; - temp_t2 = temp_t7 & 0xF; - temp_t3 = temp_t7 & 7; - temp_t4 = temp_t7 & 3; - temp_t5 = temp_t7 & 1; D_8018D400 = temp_t7; D_8018D40C = temp_t8; - D_8018D410 = temp_t9; - D_80165590 = temp_t2; - D_80165594 = temp_t3; - D_80165598 = temp_t4; - D_8016559C = temp_t5; + D_8018D410 = temp_t7 & 0x1F; + D_80165590 = temp_t7 & 0xF; + D_80165594 = temp_t7 & 7; + D_80165598 = temp_t7 & 3; + D_8016559C = temp_t7 & 1; if (temp_t8 == 0) { - D_801655A4 = D_801655A4 + 1; - D_801655D8 = D_801655D8 ^ 1; + D_801655A4 += 1; + D_801655D8 ^= 1; } if (D_8018D410 == 0) { - D_801655AC = D_801655AC + 1; - D_801655E8 = D_801655E8 ^ 1; + D_801655AC += 1; + D_801655E8 ^= 1; } if (D_80165590 == 0) { - D_801655B4 = D_801655B4 + 1; - D_801655F8 = D_801655F8 ^ 1; + D_801655B4 += 1; + D_801655F8 ^= 1; } if (D_80165594 == 0) { - D_801655BC = D_801655BC + 1; - D_80165608 = D_80165608 ^ 1; + D_801655BC += 1; + D_80165608 ^= 1; } if (D_80165598 == 0) { - D_801655C4 = D_801655C4 + 1; - D_80165618 = D_80165618 ^ 1; + D_801655C4 += 1; + D_80165618 ^= 1; } if (D_8016559C == 0) { - D_801655CC = D_801655CC + 1; - D_80165628 = D_80165628 ^ 1; + D_801655CC += 1; + D_80165628 ^= 1; } - temp_t5_2 = D_8018D2AC - 1; - D_8018D2AC = temp_t5_2; - if (temp_t5_2 < 0) { + temp_t5 = D_8018D2AC - 1; + D_8018D2AC = temp_t5; + if (temp_t5 < 0) { D_8018D2AC = 0; } - D_801658A8 = D_801658A8 + 1; + D_801658A8 += 1; if (D_801658A8 >= 7) { D_801658A8 = 0; } func_8005C674(D_801658A8, &sp26, &sp24, &sp22); - D_801656C0 = sp26 / 2; - D_801656D0 = sp24 / 2; - D_801656E0 = sp22 / 2; + D_801656C0 = (s16) (sp26 / 2); + D_801656D0 = (s16) (sp24 / 2); + D_801656E0 = (s16) (sp22 / 2); func_8005C980(); } #else @@ -2584,14 +2512,18 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005C728.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -extern s16 gGPCurrentRacePlayerIdByRank; -extern s32 gPlayerPositions; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +struct _struct_D_800E55D0_0x3 { + /* 0x0 */ u8 unk0; /* inferred */ + /* 0x1 */ u8 unk1; /* inferred */ + /* 0x2 */ u8 unk2; /* inferred */ +}; /* size = 0x3 */ + extern s32 D_80165590; extern s16 D_80165794; extern ? D_8018CF28; extern ? D_8018CF50; -extern s16 D_8018CF60; +extern ? D_8018CF60; extern ? D_8018CF98; extern s32 D_8018D314; extern s32 D_8018D3E4; @@ -2599,84 +2531,95 @@ extern s32 D_8018D3E8; extern s32 D_8018D3EC; extern s32 D_8018D3F4; extern s32 D_8018D3F8; -static ? D_800E55D0; /* unable to generate initializer; const */ +extern ? gGPCurrentRaceRanks; +static struct _struct_D_800E55D0_0x3 D_800E55D0[0xD] = { + { 0x64, 0x64, 0x64 }, + { 0x96, 0x96, 0x73 }, + { 0xC8, 0xC8, 0x82 }, + { 0xFF, 0xFF, 0x96 }, + { 0xC8, 0xC8, 0x82 }, + { 0x96, 0x96, 0x73 }, + { 0, 0, 0 }, + { 1, 2, 3 }, + { 2, 1, 0 }, + { 4, 5, 6 }, + { 5, 4, 0 }, + { 7, 8, 9 }, + { 8, 7, 0 }, +}; void func_8005C980(void) { - ? *temp_t0; + ? *var_t0; Player *temp_a3; + s16 *var_a0_2; s16 temp_a2; s16 temp_a2_2; s16 temp_a2_3; - s16 temp_v0_2; + s16 temp_v0; + s32 *var_a0; s32 temp_a1; s32 temp_t4; s32 temp_t6; - s32 temp_v0; - s32 temp_v0_3; + s32 temp_v0_2; s32 temp_v1; - void *temp_v1_2; - s32 *phi_a0; - s32 phi_v0; - ? *phi_a0_2; - ? *phi_t0; - s32 phi_v1; + s32 var_v0; + s32 var_v1; + struct _struct_D_800E55D0_0x3 *temp_v1_2; temp_a3 = gPlayerOne; temp_a1 = D_80165590; - phi_a0 = &gPlayerPositions; - phi_v0 = 0; + var_a0 = gPlayerPositions; + var_v0 = 0; do { - temp_v1 = *phi_a0; + temp_v1 = *var_a0; if (temp_a1 == 0) { - *(&D_8018CF98 + (phi_v0 * 2)) = temp_v1; + *(&D_8018CF98 + (var_v0 * 2)) = (s16) temp_v1; } *(&D_8018CF28 + (temp_v1 * 4)) = &temp_a3[sp0]; if (sp0 == 0) { - D_80165794 = temp_v1; + D_80165794 = (s16) temp_v1; } - temp_v0 = phi_v0 + 1; - phi_a0 += 4; - phi_v0 = temp_v0; - } while (temp_v0 < 8); - phi_a0_2 = &gGPCurrentRacePlayerIdByRank; - phi_t0 = &D_8018CF50; - phi_v1 = 0; + var_v0 += 1; + var_a0 += 4; + } while (var_v0 < 8); + var_t0 = &D_8018CF50; + var_a0_2 = gGPCurrentRacePlayerIdByRank; + var_v1 = 0; do { - temp_v0_2 = phi_a0_2->unk0; - phi_t0->unk0 = temp_v0_2; + temp_v0 = var_a0_2->unk0; + var_t0->unk0 = temp_v0; if (temp_a1 == 0) { - *(gGPCurrentRaceRanks + phi_v1) = temp_a3[temp_v0_2].characterId; + *(&gGPCurrentRaceRanks + var_v1) = temp_a3[temp_v0].characterId; } - temp_a2 = phi_a0_2->unk2; - phi_t0->unk2 = temp_a2; + temp_a2 = var_a0_2->unk2; + var_t0->unk2 = temp_a2; if (temp_a1 == 0) { - (gGPCurrentRaceRanks + phi_v1)->unk2 = temp_a3[temp_a2].characterId; + (&gGPCurrentRaceRanks + var_v1)->unk2 = (u16) temp_a3[temp_a2].characterId; } - temp_a2_2 = phi_a0_2->unk4; - phi_t0->unk4 = temp_a2_2; + temp_a2_2 = var_a0_2->unk4; + var_t0->unk4 = temp_a2_2; if (temp_a1 == 0) { - (gGPCurrentRaceRanks + phi_v1)->unk4 = temp_a3[temp_a2_2].characterId; + (&gGPCurrentRaceRanks + var_v1)->unk4 = (u16) temp_a3[temp_a2_2].characterId; } - temp_a2_3 = phi_a0_2->unk6; - phi_t0->unk6 = temp_a2_3; - phi_a0_2 += 8; + temp_a2_3 = var_a0_2->unk6; + var_a0_2 += 8; + var_t0->unk6 = temp_a2_3; if (temp_a1 == 0) { - (gGPCurrentRaceRanks + phi_v1)->unk6 = temp_a3[temp_a2_3].characterId; + (&gGPCurrentRaceRanks + var_v1)->unk6 = (u16) temp_a3[temp_a2_3].characterId; } - temp_t0 = phi_t0 + 8; - phi_t0 = temp_t0; - phi_v1 += 8; - } while (temp_t0 != &D_8018CF60); + var_t0 += 8; + var_v1 += 8; + } while (var_t0 != &D_8018CF60); temp_t4 = D_8018D314 - 1; D_8018D314 = temp_t4; if (temp_t4 <= 0) { - temp_v0_3 = D_8018D3F8; - temp_v1_2 = (temp_v0_3 * 3) + &D_800E55D0; + temp_v0_2 = D_8018D3F8; + temp_v1_2 = &D_800E55D0[temp_v0_2]; D_8018D314 = D_8018D3F4; - D_8018D3E4 = temp_v1_2->unk0; - temp_t6 = temp_v0_3 + 1; - D_8018D3E8 = temp_v1_2->unk1; - D_8018D3EC = temp_v1_2->unk2; + D_8018D3E4 = (s32) temp_v1_2->unk0; + temp_t6 = temp_v0_2 + 1; + D_8018D3E8 = (s32) temp_v1_2->unk1; + D_8018D3EC = (s32) temp_v1_2->unk2; D_8018D3F8 = temp_t6; if (temp_t6 == 6) { D_8018D3F8 = 0; @@ -2688,25 +2631,18 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005C980.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75 -s32 s16_step_towards(s16 *, ?, ?, s32); /* extern */ -s32 f32_step_towards(f32 *, ?, ?, s32); /* extern */ -void func_80079054(s32); /* extern */ -void func_80079084(s32); /* extern */ -void func_800790B4(s32); /* extern */ -void func_800C9060(s32, ?); /* extern */ -void func_800C90F4(?, s32, s8, s32); /* extern */ +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b extern s32 D_80165594; extern u32 D_80165638; extern u32 D_80165648; extern ? D_80165654; -extern s32 D_80165658; +extern ? D_80165658; extern s8 D_801657E3; extern s8 D_801657E4; extern s8 D_801657E5; extern s8 D_801657E6; extern s8 D_801657F0; -extern s8 D_80165800; +extern ? D_80165800; extern s32 D_8016587C; extern s8 D_80165898; extern s32 D_8018D114; @@ -2715,13 +2651,10 @@ extern s32 D_8018D1FC; extern s32 D_8018D204; extern s32 D_8018D20C; extern s32 D_8018D320; -extern s8 D_8018EDF3; -extern s32 gScreenModeSelection; s16 gCurrentCourseId; /* unable to generate initializer */ void func_8005CB60(s32 playerId, s32 arg1) { s8 *sp20; - s32 temp_a3; s32 temp_f18; s32 temp_v0_3; s32 temp_v0_5; @@ -2731,25 +2664,15 @@ void func_8005CB60(s32 playerId, s32 arg1) { s8 temp_a0; s8 temp_v0_4; struct_8018CA70_entry *temp_s0; - u16 temp_a1; u32 temp_a0_2; u32 temp_v0_2; void *temp_v0; - s8 *phi_v1; - s8 phi_a2; - s32 phi_t1; - s32 phi_a3; temp_s0 = &D_8018CA70[playerId]; - temp_a3 = playerId; - phi_a3 = temp_a3; - phi_a3 = temp_a3; - if ((s32) temp_s0->lapCount < D_8018D320) { + if (temp_s0->lapCount < D_8018D320) { temp_v1 = &temp_s0->alsoLapCount; temp_s0->someTimer = (u32) (s32) (gCourseTimer * 100.0f); - phi_v1 = temp_v1; - phi_t1 = 3; - if ((s32) *temp_v1 < arg1) { + if (*temp_v1 < arg1) { temp_f18 = (s32) (gTimePlayerLastTouchedFinishLine[playerId] * 100.0f); temp_s0->timeLastTouchedFinishLine = (u32) temp_f18; (temp_s0 + (*temp_v1 * 4))->unk14 = temp_f18; @@ -2757,16 +2680,15 @@ void func_8005CB60(s32 playerId, s32 arg1) { if (temp_a0 == 0) { (temp_s0 + (temp_a0 * 4))->unk20 = (u32) temp_s0->timeLastTouchedFinishLine; } else { - temp_v0 = &D_8018CA70[temp_a3] + (temp_a0 * 4); + temp_v0 = &D_8018CA70[playerId] + (temp_a0 * 4); temp_v0->unk20 = (s32) (temp_v0->unk14 - temp_v0->unk10); } - temp_s0->blinkTimer = 0x3C; + temp_s0->blinkTimer = 0x003C; temp_s0->someTimer1 = (temp_s0 + (*temp_v1 * 4))->unk20; if (arg1 == 3) { temp_s0->someTimer = (temp_s0 + (*temp_v1 * 4))->unk14; } - phi_a2 = 1; - if (gModeSelection == TIME_TRIALS) { + if (gModeSelection == (s32) 1) { temp_v0_2 = D_80165638; temp_a0_2 = temp_s0->someTimer1; if (temp_v0_2 >= temp_a0_2) { @@ -2774,110 +2696,101 @@ void func_8005CB60(s32 playerId, s32 arg1) { D_80165658.unk4 = 0; D_80165658.unk0 = 0; } - temp_a1 = gPlayerOne[playerId].characterId; - playerId = temp_a3; sp20 = temp_v1; - func_800C90F4(0, (temp_a1 * 0x10) + 0x2900800D, 1, temp_a3); + func_800C90F4(0U, (gPlayerOne[playerId].characterId * 0x10) + 0x2900800D); D_80165638 = temp_s0->someTimer1; *(&D_80165654 + (arg1 * 4)) = 1; D_801657E3 = 1; - phi_a3 = playerId; } - phi_v1 = &temp_s0->alsoLapCount; - phi_a2 = 1; - phi_t1 = 3; if ((arg1 == 3) && ((u32) temp_s0->someTimer < (u32) D_80165648)) { D_801657E5 = 1; } } - *phi_v1 += 1; + *temp_v1 += 1; temp_v0_3 = D_8018D320; - if (temp_v0_3 == *phi_v1) { - *phi_v1 = temp_v0_3 - 1; + if (temp_v0_3 == *temp_v1) { + *temp_v1 = temp_v0_3 - 1; } temp_v1_2 = &temp_s0->lapCount; *temp_v1_2 += 1; temp_v0_4 = *temp_v1_2; - if (temp_v0_4 != 0) { - if (temp_v0_4 != phi_a2) { - if (temp_v0_4 != 2) { - if (temp_v0_4 != phi_t1) { - - } else { - temp_v0_5 = D_8018D114; - if ((temp_v0_5 == 0) || (phi_a2 == temp_v0_5)) { - D_801657E4 = 0; - D_801657E6 = 0; - D_801657F0 = 0; - D_801657E8 = phi_a2; - D_80165800.unk0 = phi_a2; - D_80165800.unk1 = phi_a2; - D_8018D204 = (s32) phi_a2; - } - temp_s0->raceCompleteBool = phi_a2; - if (temp_v0_5 == 2) { - *(&D_80165800 + phi_a3) = 0; - } - if (gCurrentCourseId == 4) { - temp_s0->unk81 = 1; - } - temp_s0->lap1CompletionTimeX = 0x140; - temp_s0->lap2CompletionTimeX = 0x1E0; - temp_s0->lap3CompletionTimeX = 0x280; - temp_s0->totalTimeX = 0x320; - D_8016587C = (s32) phi_a2; - if (D_8018D20C == 0) { - func_80079054(phi_a3); - D_8018D20C = 1; - if (D_8018EDF3 == 1) { - D_8018D1CC = 0x64; - } - } - } - } else { - func_800790B4(phi_a3); - } - } else { - playerId = phi_a3; - func_80079084(phi_a3); - func_800C9060(playerId & 0xFF, 0x1900F015); - if ((gCurrentCourseId == 8) && (D_80165898 == 0) && (gModeSelection != TIME_TRIALS)) { - D_80165898 = 1; + switch (temp_v0_4) { /* switch 1; irregular */ + case 0: /* switch 1 */ + break; + case 1: /* switch 1 */ + func_80079084(playerId); + func_800C9060(playerId & 0xFF, 0x1900F015U); + if ((gCurrentCourseId == 8) && (D_80165898 == 0) && (gModeSelection != (s32) 1)) { + D_80165898 = 1; + } + break; + case 2: /* switch 1 */ + func_800790B4(playerId); + break; + case 3: /* switch 1 */ + temp_v0_5 = D_8018D114; + if ((temp_v0_5 == 0) || (temp_v0_5 == (s32) 1)) { + D_801657E4 = 0; + D_801657E6 = 0; + D_801657F0 = 0; + D_801657E8 = 1; + D_80165800.unk0 = 1; + D_80165800.unk1 = 1; + D_8018D204 = (s32) 1; + } + temp_s0->raceCompleteBool = 1; + if (temp_v0_5 == 2) { + *(&D_80165800 + playerId) = 0; + } + if (gCurrentCourseId == 4) { + temp_s0->unk_81 = 1; + } + temp_s0->lap1CompletionTimeX = 0x0140; + temp_s0->lap2CompletionTimeX = 0x01E0; + temp_s0->lap3CompletionTimeX = 0x0280; + temp_s0->totalTimeX = 0x0320; + D_8016587C = (s32) 1; + if (D_8018D20C == 0) { + func_80079054(playerId); + D_8018D20C = 1; + if (D_8018EDF3 == (s8) 1) { + D_8018D1CC = 0x00000064; } } + break; } } } else { - playerId = temp_a3; - f32_step_towards(&temp_s0->rankScaling, 0x3F800000, 0x3E000000, temp_a3); - switch (gScreenModeSelection) { /* irregular */ - case SCREEN_MODE_1P: - s16_step_towards(&temp_s0->slideRankX, 0x1C, 7, playerId); + f32_step_towards(&temp_s0->rankScaling, 1.0f, 0.125f); + temp_v0_6 = gScreenModeSelection; + switch (temp_v0_6) { /* irregular */ + case 0: + s16_step_towards(&temp_s0->slideRankX, 0x001C, 7); if (D_8018D1FC != 0) { - s16_step_towards(&temp_s0->slideRankY, -0x28, 1); + s16_step_towards(&temp_s0->slideRankY, -0x0028, 1); } else { - s16_step_towards(&temp_s0->slideRankY, -0x10, 4); + s16_step_towards(&temp_s0->slideRankY, -0x0010, 4); } break; - case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL: - s16_step_towards(&temp_s0->slideRankX, 0x1C, 7, playerId); - s16_step_towards(&temp_s0->slideRankY, -0x10, 4); + case 2: + s16_step_towards(&temp_s0->slideRankX, 0x001C, 7); + s16_step_towards(&temp_s0->slideRankY, -0x0010, 4); break; - case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL: - s16_step_towards(&temp_s0->slideRankX, 0x1C, 7, playerId); - s16_step_towards(&temp_s0->slideRankY, -0x10, 4); - s16_step_towards(&temp_s0->lap1CompletionTimeX, 0xE4, 0x10); - s16_step_towards(&temp_s0->lap2CompletionTimeX, 0xE4, 0x10); - s16_step_towards(&temp_s0->lap3CompletionTimeX, 0xE4, 0x10); - s16_step_towards(&temp_s0->totalTimeX, 0xE4, 0x10); + case 1: + s16_step_towards(&temp_s0->slideRankX, 0x001C, 7); + s16_step_towards(&temp_s0->slideRankY, -0x0010, 4); + s16_step_towards(&temp_s0->lap1CompletionTimeX, 0x00E4, 0x0010); + s16_step_towards(&temp_s0->lap2CompletionTimeX, 0x00E4, 0x0010); + s16_step_towards(&temp_s0->lap3CompletionTimeX, 0x00E4, 0x0010); + s16_step_towards(&temp_s0->totalTimeX, 0x00E4, 0x0010); break; - case SCREEN_MODE_3P_4P_SPLITSCREEN: + case 3: if ((playerId & 1) == 1) { - s16_step_towards(&temp_s0->slideRankX, -8, 2, playerId); + s16_step_towards(&temp_s0->slideRankX, -8, 2); } else { - s16_step_towards(&temp_s0->slideRankX, 8, 2, playerId); + s16_step_towards(&temp_s0->slideRankX, 8, 2); } - s16_step_towards(&temp_s0->slideRankY, -0x10, 4); + s16_step_towards(&temp_s0->slideRankY, -0x0010, 4); break; } } @@ -2890,7 +2803,7 @@ void func_8005CB60(s32 playerId, s32 arg1) { temp_s0->blinkState += 1; temp_s0->blinkState &= 1; } - temp_s0->blinkTimer += -1; + temp_s0->blinkTimer -= 1; if (temp_s0->blinkTimer == 0) { temp_s0->blinkState = 0; } @@ -2932,34 +2845,31 @@ void func_8005D18C(void) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75 +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b extern ? D_80163DE8; extern ? D_80164034; -extern u16 gNearestWaypointByPlayerId; void func_8005D1F4(s32 playerId) { - ? *temp_a2; + ? *var_a2; s32 temp_a1; struct_8018CA70_entry *temp_v1; u16 temp_a0; - ? *phi_a2; - if (gModeSelection == VERSUS) { + if (gModeSelection == 2) { temp_v1 = &D_8018CA70[playerId]; temp_v1->unk_74 = 0; - phi_a2 = &D_80163DE8; + var_a2 = &D_80163DE8; loop_2: - temp_a0 = phi_a2->unk44; + temp_a0 = var_a2->unk44; if ((temp_a0 != 4) && (temp_a0 != 0)) { - temp_a1 = phi_a2->unk42 - *(&gNearestWaypointByPlayerId + (playerId * 2)); + temp_a1 = var_a2->unk42 - gNearestWaypointByPlayerId[playerId]; if ((temp_a1 >= -5) && (temp_a1 < 0x1F)) { temp_v1->unk_74 = 1; return; } } - temp_a2 = phi_a2 + 0x54; - phi_a2 = temp_a2; - if (temp_a2 == &D_80164034) { + var_a2 += 0x54; + if (var_a2 == &D_80164034) { } else { goto loop_2; @@ -3158,7 +3068,7 @@ void func_8005D82C(UnkPlayerStruct258* arg0, s32 arg1, s16 arg2) { arg0->unk_03E = arg2; } -void func_8005D898(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { +void func_8005D898(Player* player, s16 arg1, UNUSED s32 arg2, UNUSED s8 arg3, UNUSED s8 arg4) { s32 temp_lo; if (player->unk_0C0 >= 0) { @@ -3193,24 +3103,13 @@ void func_8005D898(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { } } -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8005D898(s16, s8, s32); // extern - -void func_8005DA30(s32 arg0, s16 arg1, s32 arg2, s8 arg3, s8 arg4) { - void *temp_v0; - - if ((arg1 == 0) && ((temp_v0 = arg0 + (arg2 * 0x48), ((temp_v0->unk546 < 3) == 0)) || (temp_v0->unk544 == 0))) { - func_8005D898(arg1, arg3, arg4); - return; - } - if ((arg0 + (arg2 * 0x48))->unk546 >= 3) { - func_8005D898(arg1, arg3, arg4); +void func_8005DA30(Player *player, s16 arg1, s32 arg2, s8 arg3, s8 arg4) { + if ((arg1 == 0) && ((player->unk_258[10 + arg2].unk_01E >= 3) || (player->unk_258[10 + arg2].unk_01C == 0))) { + func_8005D898(player, arg1, arg2, arg3, arg4); + } else if (player->unk_258[10 + arg2].unk_01E >= 3) { + func_8005D898(player, arg1, arg2, arg3, arg4); } } -#else -GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005DA30.s") -#endif UNUSED void func_8005DAD0(void) { @@ -3223,14 +3122,8 @@ void func_8005DAD8(UnkPlayerStruct258* arg0, s16 arg1, s16 arg2, s16 arg3) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75 -void func_8005D794(f32, f32, Player *, void *, f32, f32, f32, s32, s32); /* extern */ -void func_8005D7D8(void *, ?, ?); /* extern */ -void func_8005D800(void *, ?, ?); /* extern */ -void func_8005D82C(void *, ?, ?); /* extern */ -void func_8005DAD8(void *, ?, ?, ?); /* extern */ -s16 random_int(u16); /* extern */ -static u16 D_800E483E; /* unable to generate initializer; const */ +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +static u16 D_800E483E; /* unable to generate initializer */ s16 gCurrentCourseId; /* unable to generate initializer */ void func_8005DAF4(Player *player, s32 arg1, s8 arg2, s32 arg3) { @@ -3239,48 +3132,40 @@ void func_8005DAF4(Player *player, s32 arg1, s8 arg2, s32 arg3) { f32 sp40; f32 sp3C; f32 sp38; + UnkPlayerStruct258 *temp_s0; + UnkPlayerStruct258 *temp_s0_10; + UnkPlayerStruct258 *temp_s0_11; + UnkPlayerStruct258 *temp_s0_12; + UnkPlayerStruct258 *temp_s0_13; + UnkPlayerStruct258 *temp_s0_14; + UnkPlayerStruct258 *temp_s0_15; + UnkPlayerStruct258 *temp_s0_16; + UnkPlayerStruct258 *temp_s0_2; + UnkPlayerStruct258 *temp_s0_3; + UnkPlayerStruct258 *temp_s0_4; + UnkPlayerStruct258 *temp_s0_5; + UnkPlayerStruct258 *temp_s0_6; + UnkPlayerStruct258 *temp_s0_7; + UnkPlayerStruct258 *temp_s0_8; + UnkPlayerStruct258 *temp_s0_9; f32 temp_f0; f32 temp_f0_2; - s16 temp_v0; + f32 var_f12; + f32 var_f14; + f32 var_f2; s16 temp_v1; s16 temp_v1_2; s32 temp_lo; s32 temp_lo_2; s32 temp_v1_3; s32 temp_v1_4; - void *temp_s0; - void *temp_s0_10; - void *temp_s0_11; - void *temp_s0_12; - void *temp_s0_13; - void *temp_s0_14; - void *temp_s0_15; - void *temp_s0_16; - void *temp_s0_2; - void *temp_s0_3; - void *temp_s0_4; - void *temp_s0_5; - void *temp_s0_6; - void *temp_s0_7; - void *temp_s0_8; - void *temp_s0_9; + s32 var_t1; + s32 var_t3; + u16 temp_v0; + u16 var_v0; void *temp_s2; - void *temp_s2_10; - void *temp_s2_11; - void *temp_s2_12; - void *temp_s2_13; - void *temp_s2_14; - void *temp_s2_15; - void *temp_s2_16; - void *temp_s2_17; void *temp_s2_2; void *temp_s2_3; - void *temp_s2_4; - void *temp_s2_5; - void *temp_s2_6; - void *temp_s2_7; - void *temp_s2_8; - void *temp_s2_9; void *temp_v0_2; void *temp_v0_3; void *temp_v0_4; @@ -3289,298 +3174,244 @@ void func_8005DAF4(Player *player, s32 arg1, s8 arg2, s32 arg3) { void *temp_v0_7; void *temp_v0_8; void *temp_v0_9; - s32 phi_t1; - f32 phi_f12; - f32 phi_f14; - f32 phi_f2; - s32 phi_t3; - s16 phi_v1; - s16 phi_v1_2; - s16 phi_v1_3; - s16 phi_v1_4; - s16 phi_v1_5; - s16 phi_v1_6; - s16 phi_v1_7; - s16 phi_v1_8; - s16 phi_v1_9; - s16 phi_v1_10; - s16 phi_t0; - s16 phi_v0; - void *phi_s2; + void *var_s2; - sp48 = 0xFF; + sp48 = 0x000000FF; temp_v0 = random_int(D_800E483E); - phi_t0 = (s16) arg1; - phi_t1 = 0xFF; + var_t1 = 0x000000FF; if ((temp_v0 == 0) || (temp_v0 == 4)) { + var_t1 = (s32) player->boundingBoxCorners[2].surfaceType; sp44 = 1; sp3C = player->boundingBoxCorners[2].cornerGroundY + 2.0f; sp40 = player->boundingBoxCorners[2].cornerPos[0]; sp38 = player->boundingBoxCorners[2].cornerPos[2]; - phi_t1 = (s32) player->boundingBoxCorners[2].surfaceType; } - phi_f12 = sp3C; - phi_f14 = sp38; - phi_f2 = sp40; - phi_t3 = sp44; + var_t3 = sp44; + var_f2 = sp40; + var_f12 = sp3C; + var_f14 = sp38; if ((temp_v0 == 2) || (temp_v0 == 6)) { - phi_t1 = (s32) player->boundingBoxCorners[3].surfaceType; - phi_f12 = player->boundingBoxCorners[3].cornerGroundY + 2.0f; - phi_f14 = player->boundingBoxCorners[3].cornerPos[2]; - phi_f2 = player->boundingBoxCorners[3].cornerPos[0]; - phi_t3 = 0; + var_f2 = player->boundingBoxCorners[3].cornerPos[0]; + var_f14 = player->boundingBoxCorners[3].cornerPos[2]; + var_t3 = 0; + var_t1 = (s32) player->boundingBoxCorners[3].surfaceType; + var_f12 = player->boundingBoxCorners[3].cornerGroundY + 2.0f; } - switch (phi_t1) { + switch (var_t1) { case 2: - if (((s16) arg1 == 0) && ((temp_v0_2 = player + (arg2 * 0x48), ((s32) temp_v0_2->unk546 > 0)) || (temp_v0_2->unk544 == 0))) { + if (((s16) arg1 == 0) && ((temp_v0_2 = player + (arg2 * 0x48), (temp_v0_2->unk546 > 0)) || (temp_v0_2->unk544 == 0))) { if (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f) { - temp_s2 = player + ((s16) arg1 * 0x48); - temp_s0 = temp_s2 + 0x528; - func_8005D794(phi_f12, phi_f14, player, temp_s0, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); - func_8005D7D8(temp_s0, 2, 0x3EEB851F); + var_s2 = player + ((s16) arg1 * 0x48); + temp_s0 = var_s2 + 0x528; + func_8005D794(player, temp_s0, var_f2, var_f12, var_f14, (s8) var_t1, (s8) var_t3); + func_8005D7D8(temp_s0, 2, 0.46f); temp_v1 = gCurrentCourseId; - phi_v1 = temp_v1; - phi_s2 = temp_s2; if ((temp_v1 == 1) || (temp_v1 == 7)) { - func_8005DAD8(temp_s0, 1, 0, 0x80); - phi_v1 = gCurrentCourseId; + func_8005DAD8(temp_s0, 1, 0, 0x0080); } - phi_v1_2 = phi_v1; - if (phi_v1 == 0xB) { - func_8005DAD8(temp_s0, 7, 0, 0x80); - phi_v1_2 = gCurrentCourseId; + if (gCurrentCourseId == 0x000B) { + func_8005DAD8(temp_s0, 7, 0, 0x0080); } - phi_v1_3 = phi_v1_2; - if (phi_v1_2 == 9) { - func_8005DAD8(temp_s0, 8, 0, 0x80); - phi_v1_3 = gCurrentCourseId; + if (gCurrentCourseId == 9) { + func_8005DAD8(temp_s0, 8, 0, 0x0080); } - phi_v1_4 = phi_v1_3; - if (phi_v1_3 == 0xE) { - func_8005DAD8(temp_s0, 9, 0, 0x80); - phi_v1_4 = gCurrentCourseId; + if (gCurrentCourseId == 0x000E) { + func_8005DAD8(temp_s0, 9, 0, 0x0080); } - phi_v1_5 = phi_v1_4; - if (phi_v1_4 == 4) { - func_8005DAD8(temp_s0, 0xA, 0, 0x80); - phi_v1_5 = gCurrentCourseId; + if (gCurrentCourseId == 4) { + func_8005DAD8(temp_s0, 0x000A, 0, 0x0080); } - if (phi_v1_5 == 0x12) { - func_8005DAD8(temp_s0, 0xB, 0, 0x80); + if (gCurrentCourseId == 0x0012) { + func_8005DAD8(temp_s0, 0x000B, 0, 0x0080); } - phi_v0 = random_int(0x10U); + var_v0 = random_int(0x0010U); goto block_105; } - } else if (((s32) (player + (arg2 * 0x48))->unk546 > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { - temp_s2_2 = player + ((s16) arg1 * 0x48); - temp_s0_2 = temp_s2_2 + 0x528; - func_8005D794(phi_f12, phi_f14, player, temp_s0_2, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); - func_8005D7D8(temp_s0_2, 2, 0x3EEB851F); + } else if (((player + (arg2 * 0x48))->unk546 > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { + var_s2 = player + ((s16) arg1 * 0x48); + temp_s0_2 = var_s2 + 0x528; + func_8005D794(player, temp_s0_2, var_f2, var_f12, var_f14, (s8) var_t1, (s8) var_t3); + func_8005D7D8(temp_s0_2, 2, 0.46f); temp_v1_2 = gCurrentCourseId; - phi_v1_6 = temp_v1_2; - phi_s2 = temp_s2_2; if ((temp_v1_2 == 1) || (temp_v1_2 == 7)) { - func_8005DAD8(temp_s0_2, 1, 0, 0x80); - phi_v1_6 = gCurrentCourseId; + func_8005DAD8(temp_s0_2, 1, 0, 0x0080); } - phi_v1_7 = phi_v1_6; - if (phi_v1_6 == 0xB) { - func_8005DAD8(temp_s0_2, 7, 0, 0x80); - phi_v1_7 = gCurrentCourseId; + if (gCurrentCourseId == 0x000B) { + func_8005DAD8(temp_s0_2, 7, 0, 0x0080); } - phi_v1_8 = phi_v1_7; - if (phi_v1_7 == 9) { - func_8005DAD8(temp_s0_2, 8, 0, 0x80); - phi_v1_8 = gCurrentCourseId; + if (gCurrentCourseId == 9) { + func_8005DAD8(temp_s0_2, 8, 0, 0x0080); } - phi_v1_9 = phi_v1_8; - if (phi_v1_8 == 0xE) { - func_8005DAD8(temp_s0_2, 9, 0, 0x80); - phi_v1_9 = gCurrentCourseId; + if (gCurrentCourseId == 0x000E) { + func_8005DAD8(temp_s0_2, 9, 0, 0x0080); } - phi_v1_10 = phi_v1_9; - if (phi_v1_9 == 4) { - func_8005DAD8(temp_s0_2, 0xA, 0, 0x80); - phi_v1_10 = gCurrentCourseId; + if (gCurrentCourseId == 4) { + func_8005DAD8(temp_s0_2, 0x000A, 0, 0x0080); } - if (phi_v1_10 == 0x12) { - func_8005DAD8(temp_s0_2, 0xB, 0, 0x80); + if (gCurrentCourseId == 0x0012) { + func_8005DAD8(temp_s0_2, 0x000B, 0, 0x0080); } - phi_v0 = random_int(0x10U); + var_v0 = random_int(0x0010U); block_105: - phi_s2->unk562 = phi_v0; + var_s2->unk562 = var_v0; } default: return; case 8: - if (((s16) arg1 == 0) && ((temp_v0_3 = player + (arg2 * 0x48), ((s32) temp_v0_3->unk546 > 0)) || (temp_v0_3->unk544 == 0))) { + if (((s16) arg1 == 0) && ((temp_v0_3 = player + (arg2 * 0x48), (temp_v0_3->unk546 > 0)) || (temp_v0_3->unk544 == 0))) { if (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f) { - temp_s2_3 = player + ((s16) arg1 * 0x48); - temp_s0_3 = temp_s2_3 + 0x528; - func_8005D794(phi_f12, phi_f14, player, temp_s0_3, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); - func_8005D7D8(temp_s0_3, 3, 0x3F800000); - func_8005D800(temp_s0_3, 0xFFFFFF, 0xFF); + temp_s2 = player + ((s16) arg1 * 0x48); + temp_s0_3 = temp_s2 + 0x528; + func_8005D794(player, temp_s0_3, var_f2, var_f12, var_f14, (s8) var_t1, (s8) var_t3); + func_8005D7D8(temp_s0_3, 3, 1.0f); + func_8005D800(temp_s0_3, 0x00FFFFFF, 0x00FF); temp_v1_3 = (s16) arg1 * 8; - temp_s2_3->unk560 = (s16) (temp_s2_3->unk560 - temp_v1_3); - temp_s2_3->unk562 = (s16) (temp_s2_3->unk562 - temp_v1_3); - temp_s2_3->unk564 = (s16) (temp_s2_3->unk564 - temp_v1_3); - phi_t0 = (s16) arg1; + temp_s2->unk560 = (s16) (temp_s2->unk560 - temp_v1_3); + temp_s2->unk562 = (s16) (temp_s2->unk562 - temp_v1_3); + temp_s2->unk564 = (s16) (temp_s2->unk564 - temp_v1_3); } - } else if (((s32) (player + (arg2 * 0x48))->unk546 > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { - temp_s2_4 = player + ((s16) arg1 * 0x48); - temp_s0_4 = temp_s2_4 + 0x528; - func_8005D794(phi_f12, phi_f14, player, temp_s0_4, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); - func_8005D7D8(temp_s0_4, 3, 0x3F800000); - func_8005D800(temp_s0_4, 0xFFFFFF, 0xFF); + } else if (((player + (arg2 * 0x48))->unk546 > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { + temp_s2_2 = player + ((s16) arg1 * 0x48); + temp_s0_4 = temp_s2_2 + 0x528; + func_8005D794(player, temp_s0_4, var_f2, var_f12, var_f14, (s8) var_t1, (s8) var_t3); + func_8005D7D8(temp_s0_4, 3, 1.0f); + func_8005D800(temp_s0_4, 0x00FFFFFF, 0x00FF); temp_v1_4 = (s16) arg1 * 8; - temp_s2_4->unk560 = (s16) (temp_s2_4->unk560 - temp_v1_4); - temp_s2_4->unk562 = (s16) (temp_s2_4->unk562 - temp_v1_4); - temp_s2_4->unk564 = (s16) (temp_s2_4->unk564 - temp_v1_4); - phi_t0 = (s16) arg1; + temp_s2_2->unk560 = (s16) (temp_s2_2->unk560 - temp_v1_4); + temp_s2_2->unk562 = (s16) (temp_s2_2->unk562 - temp_v1_4); + temp_s2_2->unk564 = (s16) (temp_s2_2->unk564 - temp_v1_4); } - temp_s2_5 = player + (phi_t0 * 0x48); - temp_s2_5->unk52C = (f32) ((f64) temp_s2_5->unk52C - 1.5); + temp_s2_3 = player + ((s16) arg1 * 0x48); + temp_s2_3->unk52C = (f32) ((f64) temp_s2_3->unk52C - 1.5); return; case 7: - if (((s16) arg1 == 0) && ((temp_v0_4 = player + (arg2 * 0x48), ((s32) temp_v0_4->unk546 > 0)) || (temp_v0_4->unk544 == 0))) { + if (((s16) arg1 == 0) && ((temp_v0_4 = player + (arg2 * 0x48), (temp_v0_4->unk546 > 0)) || (temp_v0_4->unk544 == 0))) { if (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f) { - temp_s2_6 = player + ((s16) arg1 * 0x48); - temp_s0_5 = temp_s2_6 + 0x528; - func_8005D794(phi_f12, phi_f14, player, temp_s0_5, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); - func_8005D7D8(temp_s0_5, 2, 0x3EEB851F); - func_8005DAD8(temp_s0_5, 2, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_6; + var_s2 = player + ((s16) arg1 * 0x48); + temp_s0_5 = var_s2 + 0x528; + func_8005D794(player, temp_s0_5, var_f2, var_f12, var_f14, (s8) var_t1, (s8) var_t3); + func_8005D7D8(temp_s0_5, 2, 0.46f); + func_8005DAD8(temp_s0_5, 2, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_105; } - } else if (((s32) (player + (arg2 * 0x48))->unk546 > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { - temp_s2_7 = player + ((s16) arg1 * 0x48); - temp_s0_6 = temp_s2_7 + 0x528; - func_8005D794(phi_f12, phi_f14, player, temp_s0_6, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); - func_8005D7D8(temp_s0_6, 2, 0x3EEB851F); - func_8005DAD8(temp_s0_6, 2, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_7; + } else if (((player + (arg2 * 0x48))->unk546 > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { + var_s2 = player + ((s16) arg1 * 0x48); + temp_s0_6 = var_s2 + 0x528; + func_8005D794(player, temp_s0_6, var_f2, var_f12, var_f14, (s8) var_t1, (s8) var_t3); + func_8005D7D8(temp_s0_6, 2, 0.46f); + func_8005DAD8(temp_s0_6, 2, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_105; } break; case 3: - if (((s16) arg1 == 0) && ((temp_v0_5 = player + (arg2 * 0x48), ((s32) temp_v0_5->unk546 > 0)) || (temp_v0_5->unk544 == 0))) { + if (((s16) arg1 == 0) && ((temp_v0_5 = player + (arg2 * 0x48), (temp_v0_5->unk546 > 0)) || (temp_v0_5->unk544 == 0))) { if (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f) { - temp_s2_8 = player + ((s16) arg1 * 0x48); - temp_s0_7 = temp_s2_8 + 0x528; - func_8005D794(phi_f12, phi_f14, player, temp_s0_7, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); - func_8005D7D8(temp_s0_7, 2, 0x3EEB851F); - func_8005DAD8(temp_s0_7, 3, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_8; + var_s2 = player + ((s16) arg1 * 0x48); + temp_s0_7 = var_s2 + 0x528; + func_8005D794(player, temp_s0_7, var_f2, var_f12, var_f14, (s8) var_t1, (s8) var_t3); + func_8005D7D8(temp_s0_7, 2, 0.46f); + func_8005DAD8(temp_s0_7, 3, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_105; } - } else if (((s32) (player + (arg2 * 0x48))->unk546 > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { - temp_s2_9 = player + ((s16) arg1 * 0x48); - temp_s0_8 = temp_s2_9 + 0x528; - func_8005D794(phi_f12, phi_f14, player, temp_s0_8, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); - func_8005D7D8(temp_s0_8, 2, 0x3EEB851F); - func_8005DAD8(temp_s0_8, 3, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_9; + } else if (((player + (arg2 * 0x48))->unk546 > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { + var_s2 = player + ((s16) arg1 * 0x48); + temp_s0_8 = var_s2 + 0x528; + func_8005D794(player, temp_s0_8, var_f2, var_f12, var_f14, (s8) var_t1, (s8) var_t3); + func_8005D7D8(temp_s0_8, 2, 0.46f); + func_8005DAD8(temp_s0_8, 3, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_105; } break; case 10: - if (((s16) arg1 == 0) && ((temp_v0_6 = player + (arg2 * 0x48), ((s32) temp_v0_6->unk546 > 0)) || (temp_v0_6->unk544 == 0))) { + if (((s16) arg1 == 0) && ((temp_v0_6 = player + (arg2 * 0x48), (temp_v0_6->unk546 > 0)) || (temp_v0_6->unk544 == 0))) { if (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f) { - temp_s2_10 = player + ((s16) arg1 * 0x48); - temp_s0_9 = temp_s2_10 + 0x528; - func_8005D794(phi_f12, phi_f14, player, temp_s0_9, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); - func_8005D7D8(temp_s0_9, 2, 0x3EEB851F); - func_8005DAD8(temp_s0_9, 4, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_10; + var_s2 = player + ((s16) arg1 * 0x48); + temp_s0_9 = var_s2 + 0x528; + func_8005D794(player, temp_s0_9, var_f2, var_f12, var_f14, (s8) var_t1, (s8) var_t3); + func_8005D7D8(temp_s0_9, 2, 0.46f); + func_8005DAD8(temp_s0_9, 4, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_105; } - } else if (((s32) (player + (arg2 * 0x48))->unk546 > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { - temp_s2_11 = player + ((s16) arg1 * 0x48); - temp_s0_10 = temp_s2_11 + 0x528; - func_8005D794(phi_f12, phi_f14, player, temp_s0_10, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); - func_8005D7D8(temp_s0_10, 2, 0x3EEB851F); - func_8005DAD8(temp_s0_10, 4, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_11; + } else if (((player + (arg2 * 0x48))->unk546 > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { + var_s2 = player + ((s16) arg1 * 0x48); + temp_s0_10 = var_s2 + 0x528; + func_8005D794(player, temp_s0_10, var_f2, var_f12, var_f14, (s8) var_t1, (s8) var_t3); + func_8005D7D8(temp_s0_10, 2, 0.46f); + func_8005DAD8(temp_s0_10, 4, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_105; } break; case 13: - if (((s16) arg1 == 0) && ((temp_v0_7 = player + (arg2 * 0x48), ((s32) temp_v0_7->unk546 > 0)) || (temp_v0_7->unk544 == 0))) { + if (((s16) arg1 == 0) && ((temp_v0_7 = player + (arg2 * 0x48), (temp_v0_7->unk546 > 0)) || (temp_v0_7->unk544 == 0))) { if (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f) { - temp_s2_12 = player + ((s16) arg1 * 0x48); - temp_s0_11 = temp_s2_12 + 0x528; - func_8005D794(phi_f12, phi_f14, player, temp_s0_11, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); - func_8005D7D8(temp_s0_11, 2, 0x3EEB851F); - func_8005DAD8(temp_s0_11, 5, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_12; + var_s2 = player + ((s16) arg1 * 0x48); + temp_s0_11 = var_s2 + 0x528; + func_8005D794(player, temp_s0_11, var_f2, var_f12, var_f14, (s8) var_t1, (s8) var_t3); + func_8005D7D8(temp_s0_11, 2, 0.46f); + func_8005DAD8(temp_s0_11, 5, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_105; } - } else if (((s32) (player + (arg2 * 0x48))->unk546 > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { - temp_s2_13 = player + ((s16) arg1 * 0x48); - temp_s0_12 = temp_s2_13 + 0x528; - func_8005D794(phi_f12, phi_f14, player, temp_s0_12, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); - func_8005D7D8(temp_s0_12, 2, 0x3EEB851F); - func_8005D82C(temp_s0_12, 0xFFA54F, 0xAF); - func_8005DAD8(temp_s0_12, 5, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_13; + } else if (((player + (arg2 * 0x48))->unk546 > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { + var_s2 = player + ((s16) arg1 * 0x48); + temp_s0_12 = var_s2 + 0x528; + func_8005D794(player, temp_s0_12, var_f2, var_f12, var_f14, (s8) var_t1, (s8) var_t3); + func_8005D7D8(temp_s0_12, 2, 0.46f); + func_8005D82C(temp_s0_12, 0x00FFA54F, 0x00AF); + func_8005DAD8(temp_s0_12, 5, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_105; } break; case 5: case 11: - if (((s16) arg1 == 0) && ((temp_v0_8 = player + (arg2 * 0x48), ((s32) temp_v0_8->unk546 > 0)) || (temp_v0_8->unk544 == 0))) { + if (((s16) arg1 == 0) && ((temp_v0_8 = player + (arg2 * 0x48), (temp_v0_8->unk546 > 0)) || (temp_v0_8->unk544 == 0))) { if (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f) { - temp_s2_14 = player + ((s16) arg1 * 0x48); - temp_s0_13 = temp_s2_14 + 0x528; - func_8005D794(phi_f12, phi_f14, player, temp_s0_13, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); - func_8005D7D8(temp_s0_13, 2, 0x3EEB851F); - func_8005DAD8(temp_s0_13, 6, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_14; + var_s2 = player + ((s16) arg1 * 0x48); + temp_s0_13 = var_s2 + 0x528; + func_8005D794(player, temp_s0_13, var_f2, var_f12, var_f14, (s8) var_t1, (s8) var_t3); + func_8005D7D8(temp_s0_13, 2, 0.46f); + func_8005DAD8(temp_s0_13, 6, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_105; } - } else if (((s32) (player + (arg2 * 0x48))->unk546 > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { - temp_s2_15 = player + ((s16) arg1 * 0x48); - temp_s0_14 = temp_s2_15 + 0x528; - func_8005D794(phi_f12, phi_f14, player, temp_s0_14, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); - func_8005D7D8(temp_s0_14, 2, 0x3EEB851F); - func_8005DAD8(temp_s0_14, 6, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_15; + } else if (((player + (arg2 * 0x48))->unk546 > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { + var_s2 = player + ((s16) arg1 * 0x48); + temp_s0_14 = var_s2 + 0x528; + func_8005D794(player, temp_s0_14, var_f2, var_f12, var_f14, (s8) var_t1, (s8) var_t3); + func_8005D7D8(temp_s0_14, 2, 0.46f); + func_8005DAD8(temp_s0_14, 6, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_105; } break; case 1: case 4: case 6: - if (((s16) arg1 == 0) && ((temp_v0_9 = player + (arg2 * 0x48), ((s32) temp_v0_9->unk546 > 0)) || (temp_v0_9->unk544 == 0))) { + if (((s16) arg1 == 0) && ((temp_v0_9 = player + (arg2 * 0x48), (temp_v0_9->unk546 > 0)) || (temp_v0_9->unk544 == 0))) { temp_f0 = player->unk_094; - if (((((temp_f0 / 18.0f) * 216.0f) >= 30.0f) && ((temp_lo = (s32) player->unk_0C0 / 182, ((temp_lo < 0x15) == 0)) || (temp_lo < -0x14))) || ((f64) (player->unk_22C - temp_f0) >= 0.04)) { - temp_s2_16 = player + ((s16) arg1 * 0x48); - temp_s0_15 = temp_s2_16 + 0x528; - func_8005D794(phi_f12, phi_f14, player, temp_s0_15, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); - func_8005D7D8(temp_s0_15, 2, 0x3EEB851F); - func_8005DAD8(temp_s0_15, 0, 0, 0x80); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_16; + if (((((temp_f0 / 18.0f) * 216.0f) >= 30.0f) && ((temp_lo = (s16) player->unk_0C0 / 182, ((temp_lo < 0x15) == 0)) || (temp_lo < -0x14))) || ((f64) (player->unk_22C - temp_f0) >= 0.04)) { + var_s2 = player + ((s16) arg1 * 0x48); + temp_s0_15 = var_s2 + 0x528; + func_8005D794(player, temp_s0_15, var_f2, var_f12, var_f14, (s8) var_t1, (s8) var_t3); + func_8005D7D8(temp_s0_15, 2, 0.46f); + func_8005DAD8(temp_s0_15, 0, 0, 0x0080); + var_v0 = random_int(0x0010U); goto block_105; } - } else if (((s32) (player + (arg2 * 0x48))->unk546 > 0) && (((temp_f0_2 = player->unk_094, (((temp_f0_2 / 18.0f) * 216.0f) >= 30.0f)) && ((temp_lo_2 = (s32) player->unk_0C0 / 182, ((temp_lo_2 < 0x15) == 0)) || (temp_lo_2 < -0x14))) || ((f64) (player->unk_22C - temp_f0_2) >= 0.04))) { - temp_s2_17 = player + ((s16) arg1 * 0x48); - temp_s0_16 = temp_s2_17 + 0x528; - func_8005D794(phi_f12, phi_f14, player, temp_s0_16, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); - func_8005D7D8(temp_s0_16, 2, 0x3EEB851F); - func_8005DAD8(temp_s0_16, 0, 0, 0x80); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_17; + } else if (((player + (arg2 * 0x48))->unk546 > 0) && (((temp_f0_2 = player->unk_094, (((temp_f0_2 / 18.0f) * 216.0f) >= 30.0f)) && ((temp_lo_2 = (s16) player->unk_0C0 / 182, ((temp_lo_2 < 0x15) == 0)) || (temp_lo_2 < -0x14))) || ((f64) (player->unk_22C - temp_f0_2) >= 0.04))) { + var_s2 = player + ((s16) arg1 * 0x48); + temp_s0_16 = var_s2 + 0x528; + func_8005D794(player, temp_s0_16, var_f2, var_f12, var_f14, (s8) var_t1, (s8) var_t3); + func_8005D7D8(temp_s0_16, 2, 0.46f); + func_8005DAD8(temp_s0_16, 0, 0, 0x0080); + var_v0 = random_int(0x0010U); goto block_105; } break; @@ -3591,74 +3422,70 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005DAF4.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75 -void func_8005D794(f32, f32, Player *, void *, f32, f32, f32, s32, s32); /* extern */ -void func_8005D7D8(void *, ?, ?); /* extern */ -void func_8005D800(void *, ?, ?); /* extern */ -s32 random_int(u16); /* extern */ -static u16 D_800E4842; /* unable to generate initializer; const */ +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +static u16 D_800E4842; /* unable to generate initializer */ -void func_8005EA94(Player *player, s16 arg1, s32 arg2, s8 arg3) { +void func_8005EA94(Player *player, s16 arg1, s32 arg2, s32 arg3) { s32 sp48; s32 sp44; f32 sp40; f32 sp3C; f32 sp38; - void *sp34; + UnkPlayerStruct258 *sp34; + UnkPlayerStruct258 *temp_a1; + UnkPlayerStruct258 *temp_a1_2; f32 temp_f0; f32 temp_f0_2; - s32 temp_v0; - void *temp_a1; - void *temp_a1_2; + f32 var_f12; + f32 var_f14; + f32 var_f2; + s32 var_t0; + s32 var_t1; + u16 temp_v0; void *temp_v0_2; - s32 phi_t0; - f32 phi_f12; - f32 phi_f14; - f32 phi_f2; - s32 phi_t1; - sp48 = 0xFF; + sp48 = 0x000000FF; temp_v0 = random_int(D_800E4842); - phi_t0 = 0xFF; + var_t0 = 0x000000FF; if ((temp_v0 == 0) || (temp_v0 == 8)) { temp_f0 = player->boundingBoxCorners[2].cornerGroundY; - if ((f64) (D_801652A0[arg3] - temp_f0) >= 3.5) { + if ((f64) (D_801652A0[(s8) arg3] - temp_f0) >= 3.5) { sp44 = 1; + var_t0 = 0; sp40 = player->boundingBoxCorners[2].cornerPos[0]; sp3C = temp_f0 + 2.0f; sp38 = player->boundingBoxCorners[2].cornerPos[2]; - phi_t0 = 0; } } - phi_f12 = sp3C; - phi_f14 = sp38; - phi_f2 = sp40; - phi_t1 = sp44; + var_t1 = sp44; + var_f2 = sp40; + var_f12 = sp3C; + var_f14 = sp38; if ((temp_v0 == 2) || (temp_v0 == 6)) { temp_f0_2 = player->boundingBoxCorners[3].cornerGroundY; - if ((f64) (D_801652A0[arg3] - temp_f0_2) >= 3.5) { - phi_t0 = 0; - phi_f12 = temp_f0_2 + 2.0f; - phi_f14 = player->boundingBoxCorners[3].cornerPos[2]; - phi_f2 = player->boundingBoxCorners[3].cornerPos[0]; - phi_t1 = 0; + if ((f64) (D_801652A0[(s8) arg3] - temp_f0_2) >= 3.5) { + var_f2 = player->boundingBoxCorners[3].cornerPos[0]; + var_f14 = player->boundingBoxCorners[3].cornerPos[2]; + var_t1 = 0; + var_t0 = 0; + var_f12 = temp_f0_2 + 2.0f; } } - if (phi_t0 == 0) { - if ((arg1 == 0) && ((temp_v0_2 = player + (arg2 * 0x48), ((s32) temp_v0_2->unk546 > 0)) || (temp_v0_2->unk544 == 0))) { + if (var_t0 == 0) { + if ((arg1 == 0) && ((temp_v0_2 = player + (arg2 * 0x48), (temp_v0_2->unk546 > 0)) || (temp_v0_2->unk544 == 0))) { if (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f) { temp_a1 = player + (arg1 * 0x48) + 0x528; sp34 = temp_a1; - func_8005D794(phi_f12, phi_f14, player, temp_a1, phi_f2, phi_f12, phi_f14, phi_t0, phi_t1); - func_8005D7D8(sp34, 9, 0x3F4CCCCD); - func_8005D800(sp34, 0xFFFFFF, 0xAF); + func_8005D794(player, temp_a1, var_f2, var_f12, var_f14, (s8) var_t0, (s8) var_t1); + func_8005D7D8(sp34, 9, 0.8f); + func_8005D800(sp34, 0x00FFFFFF, 0x00AF); } - } else if (((s32) (player + (arg2 * 0x48))->unk546 > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { + } else if (((player + (arg2 * 0x48))->unk546 > 0) && (((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) { temp_a1_2 = player + (arg1 * 0x48) + 0x528; sp34 = temp_a1_2; - func_8005D794(phi_f12, phi_f14, player, temp_a1_2, phi_f2, phi_f12, phi_f14, phi_t0, phi_t1); - func_8005D7D8(sp34, 9, 0x3F4CCCCD); - func_8005D800(sp34, 0xFFFFFF, 0xAF); + func_8005D794(player, temp_a1_2, var_f2, var_f12, var_f14, (s8) var_t0, (s8) var_t1); + func_8005D7D8(sp34, 9, 0.8f); + func_8005D800(sp34, 0x00FFFFFF, 0x00AF); } } } @@ -3667,13 +3494,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005EA94.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75 -void func_8005D794(f32, Player *, void *, f32, f32, f32, s32, s32); /* extern */ -void func_8005D7D8(void *, ?, ?); /* extern */ -void func_8005D800(void *, ?, ?); /* extern */ -void func_8005DAD8(void *, ?, ?, ?); /* extern */ -s16 random_int(u16); /* extern */ -static u16 D_800E4846; /* unable to generate initializer; const */ +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +static u16 D_800E4846; /* unable to generate initializer */ s16 gCurrentCourseId; /* unable to generate initializer */ void func_8005ED48(Player *player, s16 arg1, s32 arg2, s32 arg3) { @@ -3682,44 +3504,36 @@ void func_8005ED48(Player *player, s16 arg1, s32 arg2, s32 arg3) { f32 sp40; f32 sp3C; f32 sp38; - s16 temp_v0; + UnkPlayerStruct258 *temp_s0; + UnkPlayerStruct258 *temp_s0_10; + UnkPlayerStruct258 *temp_s0_11; + UnkPlayerStruct258 *temp_s0_12; + UnkPlayerStruct258 *temp_s0_13; + UnkPlayerStruct258 *temp_s0_14; + UnkPlayerStruct258 *temp_s0_15; + UnkPlayerStruct258 *temp_s0_16; + UnkPlayerStruct258 *temp_s0_2; + UnkPlayerStruct258 *temp_s0_3; + UnkPlayerStruct258 *temp_s0_4; + UnkPlayerStruct258 *temp_s0_5; + UnkPlayerStruct258 *temp_s0_6; + UnkPlayerStruct258 *temp_s0_7; + UnkPlayerStruct258 *temp_s0_8; + UnkPlayerStruct258 *temp_s0_9; + f32 var_f0; + f32 var_f12; + f32 var_f2; s16 temp_v1; s16 temp_v1_2; s32 temp_v1_3; s32 temp_v1_4; - void *temp_s0; - void *temp_s0_10; - void *temp_s0_11; - void *temp_s0_12; - void *temp_s0_13; - void *temp_s0_14; - void *temp_s0_15; - void *temp_s0_16; - void *temp_s0_2; - void *temp_s0_3; - void *temp_s0_4; - void *temp_s0_5; - void *temp_s0_6; - void *temp_s0_7; - void *temp_s0_8; - void *temp_s0_9; + s32 var_t2; + s32 var_t3; + u16 temp_v0; + u16 var_v0; void *temp_s2; - void *temp_s2_10; - void *temp_s2_11; - void *temp_s2_12; - void *temp_s2_13; - void *temp_s2_14; - void *temp_s2_15; - void *temp_s2_16; - void *temp_s2_17; void *temp_s2_2; void *temp_s2_3; - void *temp_s2_4; - void *temp_s2_5; - void *temp_s2_6; - void *temp_s2_7; - void *temp_s2_8; - void *temp_s2_9; void *temp_v0_2; void *temp_v0_3; void *temp_v0_4; @@ -3728,283 +3542,233 @@ void func_8005ED48(Player *player, s16 arg1, s32 arg2, s32 arg3) { void *temp_v0_7; void *temp_v0_8; void *temp_v0_9; - s32 phi_t2; - f32 phi_f12; - f32 phi_f0; - f32 phi_f2; - s32 phi_t3; - s16 phi_v1; - s16 phi_v1_2; - s16 phi_v1_3; - s16 phi_v1_4; - s16 phi_v1_5; - s16 phi_v1_6; - s16 phi_v1_7; - s16 phi_v1_8; - s16 phi_v1_9; - s16 phi_v1_10; - s16 phi_v0; - void *phi_s2; + void *var_s2; - sp48 = 0xFF; + sp48 = 0x000000FF; temp_v0 = random_int(D_800E4846); - phi_t2 = 0xFF; + var_t2 = 0x000000FF; if ((temp_v0 == 2) || (temp_v0 == 4)) { + var_t2 = (s32) player->boundingBoxCorners[2].surfaceType; sp44 = 1; sp3C = player->boundingBoxCorners[2].cornerGroundY + 2.0f; sp40 = player->boundingBoxCorners[2].cornerPos[0]; sp38 = player->boundingBoxCorners[2].cornerPos[2]; - phi_t2 = (s32) player->boundingBoxCorners[2].surfaceType; } - phi_f12 = sp38; - phi_f0 = sp40; - phi_f2 = sp3C; - phi_t3 = sp44; + var_t3 = sp44; + var_f0 = sp40; + var_f2 = sp3C; + var_f12 = sp38; if ((temp_v0 == 0) || (temp_v0 == 6)) { - phi_t2 = (s32) player->boundingBoxCorners[3].surfaceType; - phi_f12 = player->boundingBoxCorners[3].cornerPos[2]; - phi_f0 = player->boundingBoxCorners[3].cornerPos[0]; - phi_f2 = player->boundingBoxCorners[3].cornerGroundY + 2.0f; - phi_t3 = 0; + var_f0 = player->boundingBoxCorners[3].cornerPos[0]; + var_f12 = player->boundingBoxCorners[3].cornerPos[2]; + var_t3 = 0; + var_t2 = (s32) player->boundingBoxCorners[3].surfaceType; + var_f2 = player->boundingBoxCorners[3].cornerGroundY + 2.0f; } - switch (phi_t2) { + switch (var_t2) { case 2: - if ((arg1 == 0) && ((temp_v0_2 = player + (arg2 * 0x48), ((s32) temp_v0_2->unk546 > 0)) || (temp_v0_2->unk544 == 0))) { - temp_s2 = player + (arg1 * 0x48); - temp_s0 = temp_s2 + 0x528; - func_8005D794(phi_f12, player, temp_s0, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); - func_8005D7D8(temp_s0, 5, 0x3EEB851F); + if ((arg1 == 0) && ((temp_v0_2 = player + (arg2 * 0x48), (temp_v0_2->unk546 > 0)) || (temp_v0_2->unk544 == 0))) { + var_s2 = player + (arg1 * 0x48); + temp_s0 = var_s2 + 0x528; + func_8005D794(player, temp_s0, var_f0, var_f2, var_f12, (s8) var_t2, (s8) var_t3); + func_8005D7D8(temp_s0, 5, 0.46f); temp_v1 = gCurrentCourseId; - phi_v1 = temp_v1; - phi_s2 = temp_s2; if ((temp_v1 == 1) || (temp_v1 == 7)) { - func_8005DAD8(temp_s0, 1, 0, 0x80); - phi_v1 = gCurrentCourseId; + func_8005DAD8(temp_s0, 1, 0, 0x0080); } - phi_v1_2 = phi_v1; - if (phi_v1 == 0xB) { - func_8005DAD8(temp_s0, 7, 0, 0x80); - phi_v1_2 = gCurrentCourseId; + if (gCurrentCourseId == 0x000B) { + func_8005DAD8(temp_s0, 7, 0, 0x0080); } - phi_v1_3 = phi_v1_2; - if (phi_v1_2 == 9) { - func_8005DAD8(temp_s0, 8, 0, 0x80); - phi_v1_3 = gCurrentCourseId; + if (gCurrentCourseId == 9) { + func_8005DAD8(temp_s0, 8, 0, 0x0080); } - phi_v1_4 = phi_v1_3; - if (phi_v1_3 == 0xE) { - func_8005DAD8(temp_s0, 9, 0, 0x80); - phi_v1_4 = gCurrentCourseId; + if (gCurrentCourseId == 0x000E) { + func_8005DAD8(temp_s0, 9, 0, 0x0080); } - phi_v1_5 = phi_v1_4; - if (phi_v1_4 == 4) { - func_8005DAD8(temp_s0, 0xA, 0, 0x80); - phi_v1_5 = gCurrentCourseId; + if (gCurrentCourseId == 4) { + func_8005DAD8(temp_s0, 0x000A, 0, 0x0080); } - if (phi_v1_5 == 0x12) { - func_8005DAD8(temp_s0, 0xB, 0, 0x80); + if (gCurrentCourseId == 0x0012) { + func_8005DAD8(temp_s0, 0x000B, 0, 0x0080); } - phi_v0 = random_int(0x10U); + var_v0 = random_int(0x0010U); goto block_83; } - if ((s32) (player + (arg2 * 0x48))->unk546 > 0) { - temp_s2_2 = player + (arg1 * 0x48); - temp_s0_2 = temp_s2_2 + 0x528; - func_8005D794(phi_f12, player, temp_s0_2, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); - func_8005D7D8(temp_s0_2, 5, 0x3EEB851F); + if ((player + (arg2 * 0x48))->unk546 > 0) { + var_s2 = player + (arg1 * 0x48); + temp_s0_2 = var_s2 + 0x528; + func_8005D794(player, temp_s0_2, var_f0, var_f2, var_f12, (s8) var_t2, (s8) var_t3); + func_8005D7D8(temp_s0_2, 5, 0.46f); temp_v1_2 = gCurrentCourseId; - phi_v1_6 = temp_v1_2; - phi_s2 = temp_s2_2; if ((temp_v1_2 == 1) || (temp_v1_2 == 7)) { - func_8005DAD8(temp_s0_2, 1, 0, 0x80); - phi_v1_6 = gCurrentCourseId; + func_8005DAD8(temp_s0_2, 1, 0, 0x0080); } - phi_v1_7 = phi_v1_6; - if (phi_v1_6 == 0xB) { - func_8005DAD8(temp_s0_2, 7, 0, 0x80); - phi_v1_7 = gCurrentCourseId; + if (gCurrentCourseId == 0x000B) { + func_8005DAD8(temp_s0_2, 7, 0, 0x0080); } - phi_v1_8 = phi_v1_7; - if (phi_v1_7 == 9) { - func_8005DAD8(temp_s0_2, 8, 0, 0x80); - phi_v1_8 = gCurrentCourseId; + if (gCurrentCourseId == 9) { + func_8005DAD8(temp_s0_2, 8, 0, 0x0080); } - phi_v1_9 = phi_v1_8; - if (phi_v1_8 == 0xE) { - func_8005DAD8(temp_s0_2, 9, 0, 0x80); - phi_v1_9 = gCurrentCourseId; + if (gCurrentCourseId == 0x000E) { + func_8005DAD8(temp_s0_2, 9, 0, 0x0080); } - phi_v1_10 = phi_v1_9; - if (phi_v1_9 == 4) { - func_8005DAD8(temp_s0_2, 0xA, 0, 0x80); - phi_v1_10 = gCurrentCourseId; + if (gCurrentCourseId == 4) { + func_8005DAD8(temp_s0_2, 0x000A, 0, 0x0080); } - if (phi_v1_10 == 0x12) { - func_8005DAD8(temp_s0_2, 0xB, 0, 0x80); + if (gCurrentCourseId == 0x0012) { + func_8005DAD8(temp_s0_2, 0x000B, 0, 0x0080); } - phi_v0 = random_int(0x10U); + var_v0 = random_int(0x0010U); block_83: - phi_s2->unk562 = phi_v0; + var_s2->unk562 = var_v0; } default: return; case 8: - if ((arg1 == 0) && ((temp_v0_3 = player + (arg2 * 0x48), ((s32) temp_v0_3->unk546 > 0)) || (temp_v0_3->unk544 == 0))) { - temp_s2_3 = player + (arg1 * 0x48); - temp_s0_3 = temp_s2_3 + 0x528; - func_8005D794(phi_f12, player, temp_s0_3, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); - func_8005D7D8(temp_s0_3, 5, 0x3DCCCCCD); - func_8005D800(temp_s0_3, 0xFFFFFF, 0xFF); + if ((arg1 == 0) && ((temp_v0_3 = player + (arg2 * 0x48), (temp_v0_3->unk546 > 0)) || (temp_v0_3->unk544 == 0))) { + temp_s2 = player + (arg1 * 0x48); + temp_s0_3 = temp_s2 + 0x528; + func_8005D794(player, temp_s0_3, var_f0, var_f2, var_f12, (s8) var_t2, (s8) var_t3); + func_8005D7D8(temp_s0_3, 5, 0.1f); + func_8005D800(temp_s0_3, 0x00FFFFFF, 0x00FF); temp_v1_3 = arg1 * 8; - temp_s2_3->unk560 = (s16) (temp_s2_3->unk560 - temp_v1_3); - temp_s2_3->unk562 = (s16) (temp_s2_3->unk562 - temp_v1_3); - temp_s2_3->unk564 = (s16) (temp_s2_3->unk564 - temp_v1_3); - } else if ((s32) (player + (arg2 * 0x48))->unk546 > 0) { - temp_s2_4 = player + (arg1 * 0x48); - temp_s0_4 = temp_s2_4 + 0x528; - func_8005D794(phi_f12, player, temp_s0_4, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); - func_8005D7D8(temp_s0_4, 5, 0x3DCCCCCD); - func_8005D800(temp_s0_4, 0xFFFFFF, 0xFF); + temp_s2->unk560 = (s16) (temp_s2->unk560 - temp_v1_3); + temp_s2->unk562 = (s16) (temp_s2->unk562 - temp_v1_3); + temp_s2->unk564 = (s16) (temp_s2->unk564 - temp_v1_3); + } else if ((player + (arg2 * 0x48))->unk546 > 0) { + temp_s2_2 = player + (arg1 * 0x48); + temp_s0_4 = temp_s2_2 + 0x528; + func_8005D794(player, temp_s0_4, var_f0, var_f2, var_f12, (s8) var_t2, (s8) var_t3); + func_8005D7D8(temp_s0_4, 5, 0.1f); + func_8005D800(temp_s0_4, 0x00FFFFFF, 0x00FF); temp_v1_4 = arg1 * 8; - temp_s2_4->unk560 = (s16) (temp_s2_4->unk560 - temp_v1_4); - temp_s2_4->unk562 = (s16) (temp_s2_4->unk562 - temp_v1_4); - temp_s2_4->unk564 = (s16) (temp_s2_4->unk564 - temp_v1_4); + temp_s2_2->unk560 = (s16) (temp_s2_2->unk560 - temp_v1_4); + temp_s2_2->unk562 = (s16) (temp_s2_2->unk562 - temp_v1_4); + temp_s2_2->unk564 = (s16) (temp_s2_2->unk564 - temp_v1_4); } - temp_s2_5 = player + (arg1 * 0x48); - temp_s2_5->unk52C = (f32) ((f64) temp_s2_5->unk52C - 1.5); + temp_s2_3 = player + (arg1 * 0x48); + temp_s2_3->unk52C = (f32) ((f64) temp_s2_3->unk52C - 1.5); return; case 7: - if ((arg1 == 0) && ((temp_v0_4 = player + (arg2 * 0x48), ((s32) temp_v0_4->unk546 > 0)) || (temp_v0_4->unk544 == 0))) { - temp_s2_6 = player + (arg1 * 0x48); - temp_s0_5 = temp_s2_6 + 0x528; - func_8005D794(phi_f12, player, temp_s0_5, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); - func_8005D7D8(temp_s0_5, 5, 0x3EEB851F); - func_8005DAD8(temp_s0_5, 2, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_6; + if ((arg1 == 0) && ((temp_v0_4 = player + (arg2 * 0x48), (temp_v0_4->unk546 > 0)) || (temp_v0_4->unk544 == 0))) { + var_s2 = player + (arg1 * 0x48); + temp_s0_5 = var_s2 + 0x528; + func_8005D794(player, temp_s0_5, var_f0, var_f2, var_f12, (s8) var_t2, (s8) var_t3); + func_8005D7D8(temp_s0_5, 5, 0.46f); + func_8005DAD8(temp_s0_5, 2, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_83; } - if ((s32) (player + (arg2 * 0x48))->unk546 > 0) { - temp_s2_7 = player + (arg1 * 0x48); - temp_s0_6 = temp_s2_7 + 0x528; - func_8005D794(phi_f12, player, temp_s0_6, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); - func_8005D7D8(temp_s0_6, 5, 0x3EEB851F); - func_8005DAD8(temp_s0_6, 2, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_7; + if ((player + (arg2 * 0x48))->unk546 > 0) { + var_s2 = player + (arg1 * 0x48); + temp_s0_6 = var_s2 + 0x528; + func_8005D794(player, temp_s0_6, var_f0, var_f2, var_f12, (s8) var_t2, (s8) var_t3); + func_8005D7D8(temp_s0_6, 5, 0.46f); + func_8005DAD8(temp_s0_6, 2, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_83; } break; case 3: - if ((arg1 == 0) && ((temp_v0_5 = player + (arg2 * 0x48), ((s32) temp_v0_5->unk546 > 0)) || (temp_v0_5->unk544 == 0))) { - temp_s2_8 = player + (arg1 * 0x48); - temp_s0_7 = temp_s2_8 + 0x528; - func_8005D794(phi_f12, player, temp_s0_7, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); - func_8005D7D8(temp_s0_7, 5, 0x3EEB851F); - func_8005DAD8(temp_s0_7, 3, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_8; + if ((arg1 == 0) && ((temp_v0_5 = player + (arg2 * 0x48), (temp_v0_5->unk546 > 0)) || (temp_v0_5->unk544 == 0))) { + var_s2 = player + (arg1 * 0x48); + temp_s0_7 = var_s2 + 0x528; + func_8005D794(player, temp_s0_7, var_f0, var_f2, var_f12, (s8) var_t2, (s8) var_t3); + func_8005D7D8(temp_s0_7, 5, 0.46f); + func_8005DAD8(temp_s0_7, 3, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_83; } - if ((s32) (player + (arg2 * 0x48))->unk546 > 0) { - temp_s2_9 = player + (arg1 * 0x48); - temp_s0_8 = temp_s2_9 + 0x528; - func_8005D794(phi_f12, player, temp_s0_8, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); - func_8005D7D8(temp_s0_8, 5, 0x3EEB851F); - func_8005DAD8(temp_s0_8, 3, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_9; + if ((player + (arg2 * 0x48))->unk546 > 0) { + var_s2 = player + (arg1 * 0x48); + temp_s0_8 = var_s2 + 0x528; + func_8005D794(player, temp_s0_8, var_f0, var_f2, var_f12, (s8) var_t2, (s8) var_t3); + func_8005D7D8(temp_s0_8, 5, 0.46f); + func_8005DAD8(temp_s0_8, 3, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_83; } break; case 10: - if ((arg1 == 0) && ((temp_v0_6 = player + (arg2 * 0x48), ((s32) temp_v0_6->unk546 > 0)) || (temp_v0_6->unk544 == 0))) { - temp_s2_10 = player + (arg1 * 0x48); - temp_s0_9 = temp_s2_10 + 0x528; - func_8005D794(phi_f12, player, temp_s0_9, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); - func_8005D7D8(temp_s0_9, 5, 0x3EEB851F); - func_8005DAD8(temp_s0_9, 4, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_10; + if ((arg1 == 0) && ((temp_v0_6 = player + (arg2 * 0x48), (temp_v0_6->unk546 > 0)) || (temp_v0_6->unk544 == 0))) { + var_s2 = player + (arg1 * 0x48); + temp_s0_9 = var_s2 + 0x528; + func_8005D794(player, temp_s0_9, var_f0, var_f2, var_f12, (s8) var_t2, (s8) var_t3); + func_8005D7D8(temp_s0_9, 5, 0.46f); + func_8005DAD8(temp_s0_9, 4, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_83; } - if ((s32) (player + (arg2 * 0x48))->unk546 > 0) { - temp_s2_11 = player + (arg1 * 0x48); - temp_s0_10 = temp_s2_11 + 0x528; - func_8005D794(phi_f12, player, temp_s0_10, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); - func_8005D7D8(temp_s0_10, 5, 0x3EEB851F); - func_8005DAD8(temp_s0_10, 4, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_11; + if ((player + (arg2 * 0x48))->unk546 > 0) { + var_s2 = player + (arg1 * 0x48); + temp_s0_10 = var_s2 + 0x528; + func_8005D794(player, temp_s0_10, var_f0, var_f2, var_f12, (s8) var_t2, (s8) var_t3); + func_8005D7D8(temp_s0_10, 5, 0.46f); + func_8005DAD8(temp_s0_10, 4, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_83; } break; case 13: - if ((arg1 == 0) && ((temp_v0_7 = player + (arg2 * 0x48), ((s32) temp_v0_7->unk546 > 0)) || (temp_v0_7->unk544 == 0))) { - temp_s2_12 = player + (arg1 * 0x48); - temp_s0_11 = temp_s2_12 + 0x528; - func_8005D794(phi_f12, player, temp_s0_11, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); - func_8005D7D8(temp_s0_11, 5, 0x3EEB851F); - func_8005DAD8(temp_s0_11, 5, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_12; + if ((arg1 == 0) && ((temp_v0_7 = player + (arg2 * 0x48), (temp_v0_7->unk546 > 0)) || (temp_v0_7->unk544 == 0))) { + var_s2 = player + (arg1 * 0x48); + temp_s0_11 = var_s2 + 0x528; + func_8005D794(player, temp_s0_11, var_f0, var_f2, var_f12, (s8) var_t2, (s8) var_t3); + func_8005D7D8(temp_s0_11, 5, 0.46f); + func_8005DAD8(temp_s0_11, 5, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_83; } - if ((s32) (player + (arg2 * 0x48))->unk546 > 0) { - temp_s2_13 = player + (arg1 * 0x48); - temp_s0_12 = temp_s2_13 + 0x528; - func_8005D794(phi_f12, player, temp_s0_12, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); - func_8005D7D8(temp_s0_12, 5, 0x3EEB851F); - func_8005DAD8(temp_s0_12, 5, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_13; + if ((player + (arg2 * 0x48))->unk546 > 0) { + var_s2 = player + (arg1 * 0x48); + temp_s0_12 = var_s2 + 0x528; + func_8005D794(player, temp_s0_12, var_f0, var_f2, var_f12, (s8) var_t2, (s8) var_t3); + func_8005D7D8(temp_s0_12, 5, 0.46f); + func_8005DAD8(temp_s0_12, 5, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_83; } break; case 5: case 11: - if ((arg1 == 0) && ((temp_v0_8 = player + (arg2 * 0x48), ((s32) temp_v0_8->unk546 > 0)) || (temp_v0_8->unk544 == 0))) { - temp_s2_14 = player + (arg1 * 0x48); - temp_s0_13 = temp_s2_14 + 0x528; - func_8005D794(phi_f12, player, temp_s0_13, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); - func_8005D7D8(temp_s0_13, 5, 0x3EEB851F); - func_8005DAD8(temp_s0_13, 6, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_14; + if ((arg1 == 0) && ((temp_v0_8 = player + (arg2 * 0x48), (temp_v0_8->unk546 > 0)) || (temp_v0_8->unk544 == 0))) { + var_s2 = player + (arg1 * 0x48); + temp_s0_13 = var_s2 + 0x528; + func_8005D794(player, temp_s0_13, var_f0, var_f2, var_f12, (s8) var_t2, (s8) var_t3); + func_8005D7D8(temp_s0_13, 5, 0.46f); + func_8005DAD8(temp_s0_13, 6, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_83; } - if ((s32) (player + (arg2 * 0x48))->unk546 > 0) { - temp_s2_15 = player + (arg1 * 0x48); - temp_s0_14 = temp_s2_15 + 0x528; - func_8005D794(phi_f12, player, temp_s0_14, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); - func_8005D7D8(temp_s0_14, 5, 0x3EEB851F); - func_8005DAD8(temp_s0_14, 6, 1, 0xA8); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_15; + if ((player + (arg2 * 0x48))->unk546 > 0) { + var_s2 = player + (arg1 * 0x48); + temp_s0_14 = var_s2 + 0x528; + func_8005D794(player, temp_s0_14, var_f0, var_f2, var_f12, (s8) var_t2, (s8) var_t3); + func_8005D7D8(temp_s0_14, 5, 0.46f); + func_8005DAD8(temp_s0_14, 6, 1, 0x00A8); + var_v0 = random_int(0x0010U); goto block_83; } break; case 1: case 4: case 6: - if ((arg1 == 0) && ((temp_v0_9 = player + (arg2 * 0x48), ((s32) temp_v0_9->unk546 > 0)) || (temp_v0_9->unk544 == 0))) { - temp_s2_16 = player + (arg1 * 0x48); - temp_s0_15 = temp_s2_16 + 0x528; - func_8005D794(phi_f12, player, temp_s0_15, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); - func_8005D7D8(temp_s0_15, 5, 0x3EEB851F); - func_8005DAD8(temp_s0_15, 0, 0, 0x80); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_16; + if ((arg1 == 0) && ((temp_v0_9 = player + (arg2 * 0x48), (temp_v0_9->unk546 > 0)) || (temp_v0_9->unk544 == 0))) { + var_s2 = player + (arg1 * 0x48); + temp_s0_15 = var_s2 + 0x528; + func_8005D794(player, temp_s0_15, var_f0, var_f2, var_f12, (s8) var_t2, (s8) var_t3); + func_8005D7D8(temp_s0_15, 5, 0.46f); + func_8005DAD8(temp_s0_15, 0, 0, 0x0080); + var_v0 = random_int(0x0010U); goto block_83; } - if ((s32) (player + (arg2 * 0x48))->unk546 > 0) { - temp_s2_17 = player + (arg1 * 0x48); - temp_s0_16 = temp_s2_17 + 0x528; - func_8005D794(phi_f12, player, temp_s0_16, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); - func_8005D7D8(temp_s0_16, 5, 0x3EEB851F); - func_8005DAD8(temp_s0_16, 0, 0, 0x80); - phi_v0 = random_int(0x10U); - phi_s2 = temp_s2_17; + if ((player + (arg2 * 0x48))->unk546 > 0) { + var_s2 = player + (arg1 * 0x48); + temp_s0_16 = var_s2 + 0x528; + func_8005D794(player, temp_s0_16, var_f0, var_f2, var_f12, (s8) var_t2, (s8) var_t3); + func_8005D7D8(temp_s0_16, 5, 0.46f); + func_8005DAD8(temp_s0_16, 0, 0, 0x0080); + var_v0 = random_int(0x0010U); goto block_83; } break; @@ -4015,52 +3779,39 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005ED48.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75 -void func_8005D794(f32, Player *, void *, f32, f32, f32, s32, s32); /* extern */ -void func_8005D7D8(void *, ?, ?); /* extern */ -void func_8005D800(void *, ?, ?); /* extern */ -void func_8005DAD8(void *, ?, ?, ?); /* extern */ -s16 random_int(?); /* extern */ +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b s16 gCurrentCourseId; /* unable to generate initializer */ void func_8005F90C(Player *player, s16 arg1, s32 arg2, s32 arg3) { + UnkPlayerStruct258 *temp_s0; + UnkPlayerStruct258 *temp_s0_10; + UnkPlayerStruct258 *temp_s0_11; + UnkPlayerStruct258 *temp_s0_12; + UnkPlayerStruct258 *temp_s0_13; + UnkPlayerStruct258 *temp_s0_14; + UnkPlayerStruct258 *temp_s0_15; + UnkPlayerStruct258 *temp_s0_16; + UnkPlayerStruct258 *temp_s0_2; + UnkPlayerStruct258 *temp_s0_3; + UnkPlayerStruct258 *temp_s0_4; + UnkPlayerStruct258 *temp_s0_5; + UnkPlayerStruct258 *temp_s0_6; + UnkPlayerStruct258 *temp_s0_7; + UnkPlayerStruct258 *temp_s0_8; + UnkPlayerStruct258 *temp_s0_9; + f32 var_f0; + f32 var_f12; + f32 var_f2; s16 temp_v1; s16 temp_v1_2; s32 temp_t2; s32 temp_t6; - void *temp_s0; - void *temp_s0_10; - void *temp_s0_11; - void *temp_s0_12; - void *temp_s0_13; - void *temp_s0_14; - void *temp_s0_15; - void *temp_s0_16; - void *temp_s0_2; - void *temp_s0_3; - void *temp_s0_4; - void *temp_s0_5; - void *temp_s0_6; - void *temp_s0_7; - void *temp_s0_8; - void *temp_s0_9; + s32 var_t1; + u16 var_v0_2; + u8 var_v0; void *temp_s2; - void *temp_s2_10; - void *temp_s2_11; - void *temp_s2_12; - void *temp_s2_13; - void *temp_s2_14; - void *temp_s2_15; - void *temp_s2_16; - void *temp_s2_17; void *temp_s2_2; void *temp_s2_3; - void *temp_s2_4; - void *temp_s2_5; - void *temp_s2_6; - void *temp_s2_7; - void *temp_s2_8; - void *temp_s2_9; void *temp_v0; void *temp_v0_2; void *temp_v0_3; @@ -4069,275 +3820,225 @@ void func_8005F90C(Player *player, s16 arg1, s32 arg2, s32 arg3) { void *temp_v0_6; void *temp_v0_7; void *temp_v0_8; - s32 phi_v0; - f32 phi_f12; - f32 phi_f0; - f32 phi_f2; - s32 phi_t1; - s16 phi_v1; - s16 phi_v1_2; - s16 phi_v1_3; - s16 phi_v1_4; - s16 phi_v1_5; - s16 phi_v1_6; - s16 phi_v1_7; - s16 phi_v1_8; - s16 phi_v1_9; - s16 phi_v1_10; - s16 phi_v0_2; - void *phi_s2; + void *var_s2; - phi_t1 = 0; + var_t1 = 0; if ((player->unk_0BC & 0x80) == 0x80) { - phi_v0 = (s32) player->boundingBoxCorners[2].surfaceType; - phi_f12 = player->pos[2]; - phi_f0 = player->pos[0]; - phi_f2 = player->pos[1] - player->boundingBoxSize; - phi_t1 = 1; + var_f0 = player->pos[0]; + var_f12 = player->pos[2]; + var_t1 = 1; + var_v0 = player->boundingBoxCorners[2].surfaceType; + var_f2 = player->pos[1] - player->boundingBoxSize; } else { - phi_v0 = (s32) player->boundingBoxCorners[3].surfaceType; - phi_f12 = player->pos[2]; - phi_f0 = player->pos[0]; - phi_f2 = player->pos[1] - player->boundingBoxSize; + var_f0 = player->pos[0]; + var_f12 = player->pos[2]; + var_v0 = player->boundingBoxCorners[3].surfaceType; + var_f2 = player->pos[1] - player->boundingBoxSize; } - switch (phi_v0) { + switch (var_v0) { case 2: - if ((arg1 == 0) && ((temp_v0 = player + (arg2 * 0x48), ((s32) temp_v0->unk546 > 0)) || (temp_v0->unk544 == 0))) { - temp_s2 = player + (arg1 * 0x48); - temp_s0 = temp_s2 + 0x528; - func_8005D794(phi_f12, player, temp_s0, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); - func_8005D7D8(temp_s0, 4, 0x3EEB851F); + if ((arg1 == 0) && ((temp_v0 = player + (arg2 * 0x48), (temp_v0->unk546 > 0)) || (temp_v0->unk544 == 0))) { + var_s2 = player + (arg1 * 0x48); + temp_s0 = var_s2 + 0x528; + func_8005D794(player, temp_s0, var_f0, var_f2, var_f12, (s8) (s32) var_v0, (s8) var_t1); + func_8005D7D8(temp_s0, 4, 0.46f); temp_v1 = gCurrentCourseId; - phi_v1 = temp_v1; - phi_s2 = temp_s2; if ((temp_v1 == 1) || (temp_v1 == 7)) { - func_8005DAD8(temp_s0, 1, 0, 0x80); - phi_v1 = gCurrentCourseId; + func_8005DAD8(temp_s0, 1, 0, 0x0080); } - phi_v1_2 = phi_v1; - if (phi_v1 == 0xB) { - func_8005DAD8(temp_s0, 7, 0, 0x80); - phi_v1_2 = gCurrentCourseId; + if (gCurrentCourseId == 0x000B) { + func_8005DAD8(temp_s0, 7, 0, 0x0080); } - phi_v1_3 = phi_v1_2; - if (phi_v1_2 == 9) { - func_8005DAD8(temp_s0, 8, 0, 0x80); - phi_v1_3 = gCurrentCourseId; + if (gCurrentCourseId == 9) { + func_8005DAD8(temp_s0, 8, 0, 0x0080); } - phi_v1_4 = phi_v1_3; - if (phi_v1_3 == 0xE) { - func_8005DAD8(temp_s0, 9, 0, 0x80); - phi_v1_4 = gCurrentCourseId; + if (gCurrentCourseId == 0x000E) { + func_8005DAD8(temp_s0, 9, 0, 0x0080); } - phi_v1_5 = phi_v1_4; - if (phi_v1_4 == 4) { - func_8005DAD8(temp_s0, 0xA, 0, 0x80); - phi_v1_5 = gCurrentCourseId; + if (gCurrentCourseId == 4) { + func_8005DAD8(temp_s0, 0x000A, 0, 0x0080); } - if (phi_v1_5 == 0x12) { - func_8005DAD8(temp_s0, 0xB, 0, 0x80); + if (gCurrentCourseId == 0x0012) { + func_8005DAD8(temp_s0, 0x000B, 0, 0x0080); } - phi_v0_2 = random_int(0x10); + var_v0_2 = random_int(0x0010U); goto block_80; } - if ((s32) (player + (arg2 * 0x48))->unk546 > 0) { - temp_s2_2 = player + (arg1 * 0x48); - temp_s0_2 = temp_s2_2 + 0x528; - func_8005D794(phi_f12, player, temp_s0_2, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); - func_8005D7D8(temp_s0_2, 4, 0x3EEB851F); + if ((player + (arg2 * 0x48))->unk546 > 0) { + var_s2 = player + (arg1 * 0x48); + temp_s0_2 = var_s2 + 0x528; + func_8005D794(player, temp_s0_2, var_f0, var_f2, var_f12, (s8) (s32) var_v0, (s8) var_t1); + func_8005D7D8(temp_s0_2, 4, 0.46f); temp_v1_2 = gCurrentCourseId; - phi_v1_6 = temp_v1_2; - phi_s2 = temp_s2_2; if ((temp_v1_2 == 1) || (temp_v1_2 == 7)) { - func_8005DAD8(temp_s0_2, 1, 0, 0x80); - phi_v1_6 = gCurrentCourseId; + func_8005DAD8(temp_s0_2, 1, 0, 0x0080); } - phi_v1_7 = phi_v1_6; - if (phi_v1_6 == 0xB) { - func_8005DAD8(temp_s0_2, 7, 0, 0x80); - phi_v1_7 = gCurrentCourseId; + if (gCurrentCourseId == 0x000B) { + func_8005DAD8(temp_s0_2, 7, 0, 0x0080); } - phi_v1_8 = phi_v1_7; - if (phi_v1_7 == 9) { - func_8005DAD8(temp_s0_2, 8, 0, 0x80); - phi_v1_8 = gCurrentCourseId; + if (gCurrentCourseId == 9) { + func_8005DAD8(temp_s0_2, 8, 0, 0x0080); } - phi_v1_9 = phi_v1_8; - if (phi_v1_8 == 0xE) { - func_8005DAD8(temp_s0_2, 9, 0, 0x80); - phi_v1_9 = gCurrentCourseId; + if (gCurrentCourseId == 0x000E) { + func_8005DAD8(temp_s0_2, 9, 0, 0x0080); } - phi_v1_10 = phi_v1_9; - if (phi_v1_9 == 4) { - func_8005DAD8(temp_s0_2, 0xA, 0, 0x80); - phi_v1_10 = gCurrentCourseId; + if (gCurrentCourseId == 4) { + func_8005DAD8(temp_s0_2, 0x000A, 0, 0x0080); } - if (phi_v1_10 == 0x12) { - func_8005DAD8(temp_s0_2, 0xB, 0, 0x80); + if (gCurrentCourseId == 0x0012) { + func_8005DAD8(temp_s0_2, 0x000B, 0, 0x0080); } - phi_v0_2 = random_int(0x10); + var_v0_2 = random_int(0x0010U); block_80: - phi_s2->unk562 = phi_v0_2; + var_s2->unk562 = var_v0_2; } default: return; case 8: - if ((arg1 == 0) && ((temp_v0_2 = player + (arg2 * 0x48), ((s32) temp_v0_2->unk546 > 0)) || (temp_v0_2->unk544 == 0))) { - temp_s2_3 = player + (arg1 * 0x48); - temp_s0_3 = temp_s2_3 + 0x528; - func_8005D794(phi_f12, player, temp_s0_3, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); - func_8005D7D8(temp_s0_3, 4, 0x3DCCCCCD); - func_8005D800(temp_s0_3, 0xFFFFFF, 0xFF); + if ((arg1 == 0) && ((temp_v0_2 = player + (arg2 * 0x48), (temp_v0_2->unk546 > 0)) || (temp_v0_2->unk544 == 0))) { + temp_s2 = player + (arg1 * 0x48); + temp_s0_3 = temp_s2 + 0x528; + func_8005D794(player, temp_s0_3, var_f0, var_f2, var_f12, (s8) (s32) var_v0, (s8) var_t1); + func_8005D7D8(temp_s0_3, 4, 0.1f); + func_8005D800(temp_s0_3, 0x00FFFFFF, 0x00FF); temp_t6 = arg1 * 8; - temp_s2_3->unk560 = (s16) (temp_s2_3->unk560 - temp_t6); - temp_s2_3->unk562 = (s16) (temp_s2_3->unk562 - temp_t6); - temp_s2_3->unk564 = (s16) (temp_s2_3->unk564 - temp_t6); - } else if ((s32) (player + (arg2 * 0x48))->unk546 > 0) { - temp_s2_4 = player + (arg1 * 0x48); - temp_s0_4 = temp_s2_4 + 0x528; - func_8005D794(phi_f12, player, temp_s0_4, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); - func_8005D7D8(temp_s0_4, 4, 0x3DCCCCCD); - func_8005D800(temp_s0_4, 0xFFFFFF, 0xFF); + temp_s2->unk560 = (s16) (temp_s2->unk560 - temp_t6); + temp_s2->unk562 = (s16) (temp_s2->unk562 - temp_t6); + temp_s2->unk564 = (s16) (temp_s2->unk564 - temp_t6); + } else if ((player + (arg2 * 0x48))->unk546 > 0) { + temp_s2_2 = player + (arg1 * 0x48); + temp_s0_4 = temp_s2_2 + 0x528; + func_8005D794(player, temp_s0_4, var_f0, var_f2, var_f12, (s8) (s32) var_v0, (s8) var_t1); + func_8005D7D8(temp_s0_4, 4, 0.1f); + func_8005D800(temp_s0_4, 0x00FFFFFF, 0x00FF); temp_t2 = arg1 * 8; - temp_s2_4->unk560 = (s16) (temp_s2_4->unk560 - temp_t2); - temp_s2_4->unk562 = (s16) (temp_s2_4->unk562 - temp_t2); - temp_s2_4->unk564 = (s16) (temp_s2_4->unk564 - temp_t2); + temp_s2_2->unk560 = (s16) (temp_s2_2->unk560 - temp_t2); + temp_s2_2->unk562 = (s16) (temp_s2_2->unk562 - temp_t2); + temp_s2_2->unk564 = (s16) (temp_s2_2->unk564 - temp_t2); } - temp_s2_5 = player + (arg1 * 0x48); - temp_s2_5->unk52C = (f32) ((f64) temp_s2_5->unk52C - 1.5); + temp_s2_3 = player + (arg1 * 0x48); + temp_s2_3->unk52C = (f32) ((f64) temp_s2_3->unk52C - 1.5); return; case 7: - if ((arg1 == 0) && ((temp_v0_3 = player + (arg2 * 0x48), ((s32) temp_v0_3->unk546 > 0)) || (temp_v0_3->unk544 == 0))) { - temp_s2_6 = player + (arg1 * 0x48); - temp_s0_5 = temp_s2_6 + 0x528; - func_8005D794(phi_f12, player, temp_s0_5, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); - func_8005D7D8(temp_s0_5, 4, 0x3EEB851F); - func_8005DAD8(temp_s0_5, 2, 1, 0xA8); - phi_v0_2 = random_int(0x10); - phi_s2 = temp_s2_6; + if ((arg1 == 0) && ((temp_v0_3 = player + (arg2 * 0x48), (temp_v0_3->unk546 > 0)) || (temp_v0_3->unk544 == 0))) { + var_s2 = player + (arg1 * 0x48); + temp_s0_5 = var_s2 + 0x528; + func_8005D794(player, temp_s0_5, var_f0, var_f2, var_f12, (s8) (s32) var_v0, (s8) var_t1); + func_8005D7D8(temp_s0_5, 4, 0.46f); + func_8005DAD8(temp_s0_5, 2, 1, 0x00A8); + var_v0_2 = random_int(0x0010U); goto block_80; } - if ((s32) (player + (arg2 * 0x48))->unk546 > 0) { - temp_s2_7 = player + (arg1 * 0x48); - temp_s0_6 = temp_s2_7 + 0x528; - func_8005D794(phi_f12, player, temp_s0_6, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); - func_8005D7D8(temp_s0_6, 4, 0x3EEB851F); - func_8005DAD8(temp_s0_6, 2, 1, 0xA8); - phi_v0_2 = random_int(0x10); - phi_s2 = temp_s2_7; + if ((player + (arg2 * 0x48))->unk546 > 0) { + var_s2 = player + (arg1 * 0x48); + temp_s0_6 = var_s2 + 0x528; + func_8005D794(player, temp_s0_6, var_f0, var_f2, var_f12, (s8) (s32) var_v0, (s8) var_t1); + func_8005D7D8(temp_s0_6, 4, 0.46f); + func_8005DAD8(temp_s0_6, 2, 1, 0x00A8); + var_v0_2 = random_int(0x0010U); goto block_80; } break; case 3: - if ((arg1 == 0) && ((temp_v0_4 = player + (arg2 * 0x48), ((s32) temp_v0_4->unk546 > 0)) || (temp_v0_4->unk544 == 0))) { - temp_s2_8 = player + (arg1 * 0x48); - temp_s0_7 = temp_s2_8 + 0x528; - func_8005D794(phi_f12, player, temp_s0_7, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); - func_8005D7D8(temp_s0_7, 4, 0x3EEB851F); - func_8005DAD8(temp_s0_7, 3, 1, 0xA8); - phi_v0_2 = random_int(0x10); - phi_s2 = temp_s2_8; + if ((arg1 == 0) && ((temp_v0_4 = player + (arg2 * 0x48), (temp_v0_4->unk546 > 0)) || (temp_v0_4->unk544 == 0))) { + var_s2 = player + (arg1 * 0x48); + temp_s0_7 = var_s2 + 0x528; + func_8005D794(player, temp_s0_7, var_f0, var_f2, var_f12, (s8) (s32) var_v0, (s8) var_t1); + func_8005D7D8(temp_s0_7, 4, 0.46f); + func_8005DAD8(temp_s0_7, 3, 1, 0x00A8); + var_v0_2 = random_int(0x0010U); goto block_80; } - if ((s32) (player + (arg2 * 0x48))->unk546 > 0) { - temp_s2_9 = player + (arg1 * 0x48); - temp_s0_8 = temp_s2_9 + 0x528; - func_8005D794(phi_f12, player, temp_s0_8, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); - func_8005D7D8(temp_s0_8, 4, 0x3EEB851F); - func_8005DAD8(temp_s0_8, 3, 1, 0xA8); - phi_v0_2 = random_int(0x10); - phi_s2 = temp_s2_9; + if ((player + (arg2 * 0x48))->unk546 > 0) { + var_s2 = player + (arg1 * 0x48); + temp_s0_8 = var_s2 + 0x528; + func_8005D794(player, temp_s0_8, var_f0, var_f2, var_f12, (s8) (s32) var_v0, (s8) var_t1); + func_8005D7D8(temp_s0_8, 4, 0.46f); + func_8005DAD8(temp_s0_8, 3, 1, 0x00A8); + var_v0_2 = random_int(0x0010U); goto block_80; } break; case 10: - if ((arg1 == 0) && ((temp_v0_5 = player + (arg2 * 0x48), ((s32) temp_v0_5->unk546 > 0)) || (temp_v0_5->unk544 == 0))) { - temp_s2_10 = player + (arg1 * 0x48); - temp_s0_9 = temp_s2_10 + 0x528; - func_8005D794(phi_f12, player, temp_s0_9, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); - func_8005D7D8(temp_s0_9, 4, 0x3EEB851F); - func_8005DAD8(temp_s0_9, 4, 1, 0xA8); - phi_v0_2 = random_int(0x10); - phi_s2 = temp_s2_10; + if ((arg1 == 0) && ((temp_v0_5 = player + (arg2 * 0x48), (temp_v0_5->unk546 > 0)) || (temp_v0_5->unk544 == 0))) { + var_s2 = player + (arg1 * 0x48); + temp_s0_9 = var_s2 + 0x528; + func_8005D794(player, temp_s0_9, var_f0, var_f2, var_f12, (s8) (s32) var_v0, (s8) var_t1); + func_8005D7D8(temp_s0_9, 4, 0.46f); + func_8005DAD8(temp_s0_9, 4, 1, 0x00A8); + var_v0_2 = random_int(0x0010U); goto block_80; } - if ((s32) (player + (arg2 * 0x48))->unk546 > 0) { - temp_s2_11 = player + (arg1 * 0x48); - temp_s0_10 = temp_s2_11 + 0x528; - func_8005D794(phi_f12, player, temp_s0_10, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); - func_8005D7D8(temp_s0_10, 4, 0x3EEB851F); - func_8005DAD8(temp_s0_10, 4, 1, 0xA8); - phi_v0_2 = random_int(0x10); - phi_s2 = temp_s2_11; + if ((player + (arg2 * 0x48))->unk546 > 0) { + var_s2 = player + (arg1 * 0x48); + temp_s0_10 = var_s2 + 0x528; + func_8005D794(player, temp_s0_10, var_f0, var_f2, var_f12, (s8) (s32) var_v0, (s8) var_t1); + func_8005D7D8(temp_s0_10, 4, 0.46f); + func_8005DAD8(temp_s0_10, 4, 1, 0x00A8); + var_v0_2 = random_int(0x0010U); goto block_80; } break; case 13: - if ((arg1 == 0) && ((temp_v0_6 = player + (arg2 * 0x48), ((s32) temp_v0_6->unk546 > 0)) || (temp_v0_6->unk544 == 0))) { - temp_s2_12 = player + (arg1 * 0x48); - temp_s0_11 = temp_s2_12 + 0x528; - func_8005D794(phi_f12, player, temp_s0_11, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); - func_8005D7D8(temp_s0_11, 4, 0x3EEB851F); - func_8005DAD8(temp_s0_11, 5, 1, 0xA8); - phi_v0_2 = random_int(0x10); - phi_s2 = temp_s2_12; + if ((arg1 == 0) && ((temp_v0_6 = player + (arg2 * 0x48), (temp_v0_6->unk546 > 0)) || (temp_v0_6->unk544 == 0))) { + var_s2 = player + (arg1 * 0x48); + temp_s0_11 = var_s2 + 0x528; + func_8005D794(player, temp_s0_11, var_f0, var_f2, var_f12, (s8) (s32) var_v0, (s8) var_t1); + func_8005D7D8(temp_s0_11, 4, 0.46f); + func_8005DAD8(temp_s0_11, 5, 1, 0x00A8); + var_v0_2 = random_int(0x0010U); goto block_80; } - if ((s32) (player + (arg2 * 0x48))->unk546 > 0) { - temp_s2_13 = player + (arg1 * 0x48); - temp_s0_12 = temp_s2_13 + 0x528; - func_8005D794(phi_f12, player, temp_s0_12, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); - func_8005D7D8(temp_s0_12, 4, 0x3EEB851F); - func_8005DAD8(temp_s0_12, 5, 1, 0xA8); - phi_v0_2 = random_int(0x10); - phi_s2 = temp_s2_13; + if ((player + (arg2 * 0x48))->unk546 > 0) { + var_s2 = player + (arg1 * 0x48); + temp_s0_12 = var_s2 + 0x528; + func_8005D794(player, temp_s0_12, var_f0, var_f2, var_f12, (s8) (s32) var_v0, (s8) var_t1); + func_8005D7D8(temp_s0_12, 4, 0.46f); + func_8005DAD8(temp_s0_12, 5, 1, 0x00A8); + var_v0_2 = random_int(0x0010U); goto block_80; } break; case 5: case 11: - if ((arg1 == 0) && ((temp_v0_7 = player + (arg2 * 0x48), ((s32) temp_v0_7->unk546 > 0)) || (temp_v0_7->unk544 == 0))) { - temp_s2_14 = player + (arg1 * 0x48); - temp_s0_13 = temp_s2_14 + 0x528; - func_8005D794(phi_f12, player, temp_s0_13, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); - func_8005D7D8(temp_s0_13, 4, 0x3EEB851F); - func_8005DAD8(temp_s0_13, 6, 1, 0xA8); - phi_v0_2 = random_int(0x10); - phi_s2 = temp_s2_14; + if ((arg1 == 0) && ((temp_v0_7 = player + (arg2 * 0x48), (temp_v0_7->unk546 > 0)) || (temp_v0_7->unk544 == 0))) { + var_s2 = player + (arg1 * 0x48); + temp_s0_13 = var_s2 + 0x528; + func_8005D794(player, temp_s0_13, var_f0, var_f2, var_f12, (s8) (s32) var_v0, (s8) var_t1); + func_8005D7D8(temp_s0_13, 4, 0.46f); + func_8005DAD8(temp_s0_13, 6, 1, 0x00A8); + var_v0_2 = random_int(0x0010U); goto block_80; } - if ((s32) (player + (arg2 * 0x48))->unk546 > 0) { - temp_s2_15 = player + (arg1 * 0x48); - temp_s0_14 = temp_s2_15 + 0x528; - func_8005D794(phi_f12, player, temp_s0_14, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); - func_8005D7D8(temp_s0_14, 4, 0x3EEB851F); - func_8005DAD8(temp_s0_14, 6, 1, 0xA8); - phi_v0_2 = random_int(0x10); - phi_s2 = temp_s2_15; + if ((player + (arg2 * 0x48))->unk546 > 0) { + var_s2 = player + (arg1 * 0x48); + temp_s0_14 = var_s2 + 0x528; + func_8005D794(player, temp_s0_14, var_f0, var_f2, var_f12, (s8) (s32) var_v0, (s8) var_t1); + func_8005D7D8(temp_s0_14, 4, 0.46f); + func_8005DAD8(temp_s0_14, 6, 1, 0x00A8); + var_v0_2 = random_int(0x0010U); goto block_80; } break; case 1: case 4: case 6: - if ((arg1 == 0) && ((temp_v0_8 = player + (arg2 * 0x48), ((s32) temp_v0_8->unk546 > 0)) || (temp_v0_8->unk544 == 0))) { - temp_s2_16 = player + (arg1 * 0x48); - temp_s0_15 = temp_s2_16 + 0x528; - func_8005D794(phi_f12, player, temp_s0_15, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); - func_8005D7D8(temp_s0_15, 4, 0x3EEB851F); - func_8005DAD8(temp_s0_15, 0, 0, 0x80); - phi_v0_2 = random_int(0x10); - phi_s2 = temp_s2_16; + if ((arg1 == 0) && ((temp_v0_8 = player + (arg2 * 0x48), (temp_v0_8->unk546 > 0)) || (temp_v0_8->unk544 == 0))) { + var_s2 = player + (arg1 * 0x48); + temp_s0_15 = var_s2 + 0x528; + func_8005D794(player, temp_s0_15, var_f0, var_f2, var_f12, (s8) (s32) var_v0, (s8) var_t1); + func_8005D7D8(temp_s0_15, 4, 0.46f); + func_8005DAD8(temp_s0_15, 0, 0, 0x0080); + var_v0_2 = random_int(0x0010U); goto block_80; } - if ((s32) (player + (arg2 * 0x48))->unk546 > 0) { - temp_s2_17 = player + (arg1 * 0x48); - temp_s0_16 = temp_s2_17 + 0x528; - func_8005D794(phi_f12, player, temp_s0_16, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); - func_8005D7D8(temp_s0_16, 4, 0x3EEB851F); - func_8005DAD8(temp_s0_16, 0, 0, 0x80); - phi_v0_2 = random_int(0x10); - phi_s2 = temp_s2_17; + if ((player + (arg2 * 0x48))->unk546 > 0) { + var_s2 = player + (arg1 * 0x48); + temp_s0_16 = var_s2 + 0x528; + func_8005D794(player, temp_s0_16, var_f0, var_f2, var_f12, (s8) (s32) var_v0, (s8) var_t1); + func_8005D7D8(temp_s0_16, 4, 0.46f); + func_8005DAD8(temp_s0_16, 0, 0, 0x0080); + var_v0_2 = random_int(0x0010U); goto block_80; } break; @@ -4348,243 +4049,197 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005F90C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8005D794(void *, void *, f32, f32, f32, s32, s32); // extern -void func_8005D7D8(void *, ?, ?); // extern -void func_8005D800(void *, ?, ?); // extern -void func_80062B18(f32 *, f32 *, f32 *, ?, f32, f32, s32, s32); // extern -extern f32 D_800EE560; -extern f64 D_800EE568; -extern f32 D_800EE570; -extern f64 D_800EE578; - -void func_80060504(void *arg0, s16 arg1, s32 arg2, ? arg3) { +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +void func_80060504(Player *player, s16 arg1, s32 arg2, s32 arg3) { f32 sp50; f32 sp4C; f32 sp48; void *sp34; + UnkPlayerStruct258 *temp_s0; + UnkPlayerStruct258 *temp_s0_2; + UnkPlayerStruct258 *temp_s0_3; f32 temp_f16; f32 temp_f16_2; - s32 temp_lo; - s32 temp_v0; - void *temp_s0; - void *temp_s0_2; - void *temp_s0_3; - void *temp_v0_2; + f32 var_f0; + s32 var_v0; + u16 temp_v0; void *temp_v1; - s32 phi_v0; - void *phi_v1; - f32 phi_f0; - if ((arg0->unk44 & 0x20) == 0x20) { - phi_v0 = 5; + if ((player->unk_044 & 0x20) == 0x20) { + var_v0 = 5; } else { - phi_v0 = 0xE; + var_v0 = 0xE; } - temp_v0 = random_int(phi_v0 & 0xFFFF); + temp_v0 = random_int(var_v0 & 0xFFFF); if ((temp_v0 == 1) || (temp_v0 == 2) || (temp_v0 == 3)) { - if ((arg1 == 0) && ((temp_v0_2 = arg0 + (arg2 * 0x48), (temp_v0_2->unk276 > 0)) || (temp_v0_2->unk274 == 0))) { - temp_f16 = arg0->unk18 - 2.5; + if ((arg1 == 0) && ((player->unk_258[arg2].unk_01E > 0) || (player->unk_258[arg2].unk_01C == 0))) { + temp_f16 = (f32) ((f64) player->pos[1] - 2.5); sp4C = temp_f16; - sp48 = arg0->unk1C; - temp_s0 = arg0 + (arg1 * 0x48) + 0x258; - sp50 = arg0->unk14; - func_8005D794(arg0, temp_s0, sp50, temp_f16, sp48, 0, 0); - func_8005D7D8(temp_s0, 1, 0x3F000000); - } else if ((arg0 + (arg2 * 0x48))->unk276 > 0) { - temp_f16_2 = arg0->unk18 - 2.5; + sp48 = player->pos[2]; + temp_s0 = &player->unk_258[arg1]; + sp50 = player->pos[0]; + func_8005D794(player, temp_s0, sp50, temp_f16, sp48, (s8) 0, (s8) 0); + func_8005D7D8(temp_s0, 1, 0.5f); + } else if (player->unk_258[arg2].unk_01E > 0) { + temp_f16_2 = (f32) ((f64) player->pos[1] - 2.5); sp4C = temp_f16_2; - sp48 = arg0->unk1C; - temp_s0_2 = arg0 + (arg1 * 0x48) + 0x258; - sp50 = arg0->unk14; - func_8005D794(arg0, temp_s0_2, sp50, temp_f16_2, sp48, 0, 0); - func_8005D7D8(temp_s0_2, 1, 0x3F000000); + sp48 = player->pos[2]; + temp_s0_2 = &player->unk_258[arg1]; + sp50 = player->pos[0]; + func_8005D794(player, temp_s0_2, sp50, temp_f16_2, sp48, (s8) 0, (s8) 0); + func_8005D7D8(temp_s0_2, 1, 0.5f); } } - temp_lo = arg1 * 0x48; - temp_v1 = arg0 + temp_lo; - temp_v1->unk27C = 0.0f; - temp_s0_3 = temp_v1 + 0x258; - if ((arg0->unk44 & 0x20) == 0x20) { - temp_v1->unk298 = 0; - if ((arg0->unkBC & 0x2000) == 0x2000) { + temp_v1 = player + (arg1 * 0x48); + player->unk_258[arg1].unk_024 = 0.0f; + temp_s0_3 = &player->unk_258[arg1]; + if ((player->unk_044 & 0x20) == 0x20) { + player->unk_258[arg1].unk_040 = 0; + if ((player->unk_0BC & 0x2000) == 0x2000) { sp34 = temp_v1; - func_8005D800(temp_s0_3, 0xFFFF00, 0x80); - temp_v1->unk290 = 1; - phi_v1 = temp_v1; + func_8005D800(temp_s0_3, 0x00FFFF00, 0x0080); + player->unk_258[arg1].unk_038 = 1; } else { sp34 = temp_v1; - func_8005D800(temp_s0_3, 0xFFFFFF, 0x70); + func_8005D800(temp_s0_3, 0x00FFFFFF, 0x0070); goto block_19; } } else { - temp_v1->unk298 = 1; - if ((arg0->unkBC & 0x2000) == 0x2000) { + player->unk_258[arg1].unk_040 = 1; + if ((player->unk_0BC & 0x2000) == 0x2000) { sp34 = temp_v1; - func_8005D800(temp_s0_3, 0xFFFF00, 0x80); - temp_v1->unk290 = 1; - phi_v1 = temp_v1; + func_8005D800(temp_s0_3, 0x00FFFF00, 0x0080); + player->unk_258[arg1].unk_038 = 1; } else { sp34 = temp_v1; - func_8005D800(temp_s0_3, 0xFFFFFF, 0x70); + func_8005D800(temp_s0_3, 0x00FFFFFF, 0x0070); block_19: - (arg0 + temp_lo)->unk290 = 0; - phi_v1 = arg0 + temp_lo; + temp_v1->unk290 = 0; } } - if (phi_v1->unk298 == 0) { - phi_f0 = -((arg0->unk98 / D_800EE560) + D_800EE568); + if (temp_v1->unk298 == 0) { + var_f0 = (f32) -((f64) (player->unk_098 / 3000.0f) + 0.1); } else { - phi_f0 = -((arg0->unk98 / D_800EE570) + D_800EE578); + var_f0 = (f32) -((f64) (player->unk_098 / 5000.0f) + 0.1); } - sp34 = phi_v1; - func_80062B18(&sp50, &sp4C, &sp48, 0, 4.5f, (phi_v1->unk276 * phi_f0) + -5.5, -(phi_v1->unk278 - (arg0->unkC0 / 2)), arg0->unk206 * -2); - phi_v1->unk258 = arg0->unk14 + sp50; - sp4C += arg0->unk18 - arg0->unk70; - phi_v1->unk260 = arg0->unk1C + sp48; - phi_v1->unk268 = 0; - phi_v1->unk25C = phi_v1->unk27C + sp4C; + sp34 = temp_v1; + func_80062B18(&sp50, &sp4C, &sp48, 0.0f, 4.5f, (f32) ((f64) ((f32) temp_v1->unk276 * var_f0) + -5.5), (u16) (s32) -(s16) (temp_v1->unk278 - ((s16) player->unk_0C0 / 2)), (u16) (player->unk_206 * -2)); + sp34->unk258 = (f32) (player->pos[0] + sp50); + sp4C += player->pos[1] - player->boundingBoxSize; + sp34->unk260 = (f32) (player->pos[2] + sp48); + sp34->unk268 = 0; + sp34->unk25C = (f32) (sp34->unk27C + sp4C); } #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80060504.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8005D794(f32, f32, void *, void *, f32, f32, f32, s32, s32); // extern -void func_8005D7D8(void *, ?, f32); // extern -void func_8005D800(void *, ?, ?); // extern -void func_80062B18(f32 *, f32 *, f32 *, ?, f32, f32, s32, s32); // extern -extern f64 D_800EE580; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +s16 gCurrentCourseId; /* unable to generate initializer */ -void func_800608E0(void *arg0, s16 arg1, ? arg2, s8 arg3) { +void func_800608E0(Player *player, s16 arg1, s32 arg2, s8 arg3) { f32 sp54; f32 sp50; f32 sp4C; f32 sp48; - f32 temp_f0; + UnkPlayerStruct258 *temp_s2; f32 temp_f12; f32 temp_f2; - s16 temp_v0; - void *temp_s1; - void *temp_s2; - f32 phi_f0; + f32 var_f0; temp_f2 = D_801652A0[arg3]; - temp_f12 = temp_f2 - arg0->unk18; - temp_f0 = 8.0f - temp_f12; - phi_f0 = temp_f0; - if (temp_f0 <= 0.0) { - phi_f0 = 0.0f; + temp_f12 = temp_f2 - player->pos[1]; + var_f0 = 8.0f - temp_f12; + if ((f64) var_f0 <= 0.0) { + var_f0 = 0.0f; } sp4C = temp_f12 - 3.0f; - if (((arg0->unkDE & 1) != 0) && (gCurrentCourseId != 6)) { - sp4C = (temp_f2 - arg0->unk18) + D_800EE580; - phi_f0 = 2.5f; + if ((player->unk_0DE & 1) && (gCurrentCourseId != 6)) { + var_f0 = 2.5f; + sp4C = (f32) ((f64) (temp_f2 - player->pos[1]) + 0.1); } - temp_s1 = arg0 + (arg1 * 0x48); - temp_s2 = temp_s1 + 0x258; - sp54 = phi_f0; - func_8005D794(temp_f12, 0.0f, arg0, temp_s2, 0.0f, 0.0f, 0.0f, 0, 0); - func_8005D7D8(temp_s2, 3, phi_f0); - temp_v0 = gCurrentCourseId; - if ((temp_v0 == 2) || (temp_v0 == 0x13)) { - func_8005D800(temp_s2, 0, 0xAF); + temp_s2 = &player->unk_258[arg1]; + sp54 = var_f0; + func_8005D794(player, temp_s2, 0.0f, 0.0f, 0.0f, (s8) 0, (s8) 0); + func_8005D7D8(temp_s2, 3, var_f0); + if ((gCurrentCourseId == 2) || (gCurrentCourseId == 0x0013)) { + func_8005D800(temp_s2, 0, 0x00AF); } else { - func_8005D800(temp_s2, 0xFFFFFF, 0xCF); + func_8005D800(temp_s2, 0x00FFFFFF, 0x00CF); } - func_80062B18(&sp50, &sp4C, &sp48, 0, sp4C, ((-temp_s1->unk276 * (arg0->unk94 / 18.0f) * 216.0f) / 10.0f) + -4.0f, -temp_s1->unk278, arg0->unk206 * -2); - temp_s1->unk258 = arg0->unk14 + sp50; - temp_s1->unk260 = arg0->unk1C + sp48; - temp_s1->unk25C = arg0->unk18 + sp4C; + func_80062B18(&sp50, &sp4C, &sp48, 0.0f, sp4C, (((f32) -player->unk_258[arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 10.0f) + -4.0f, (u16) (s32) -player->unk_258[arg1].unk_020, (u16) (player->unk_206 * -2)); + player->unk_258[arg1].unk_000[0] = player->pos[0] + sp50; + player->unk_258[arg1].unk_000[1] = player->pos[1] + sp4C; + player->unk_258[arg1].unk_000[2] = player->pos[2] + sp48; } #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800608E0.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_800608E0(s16, s8, s32); // extern +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800608E0(s16, s8, s32); /* extern */ +s16 gCurrentCourseId; /* unable to generate initializer */ -void func_80060B14(s32 arg0, s16 arg1, s32 arg2, s8 arg3, s8 arg4) { +void func_80060B14(Player *player, s16 arg1, s32 arg2, s8 arg3, s8 arg4) { s16 temp_v0; - void *temp_v0_2; temp_v0 = gCurrentCourseId; - if ((temp_v0 != 0x10) && (temp_v0 != 0xD)) { - if ((arg1 == 0) && ((temp_v0_2 = arg0 + (arg2 * 0x48), (temp_v0_2->unk276 > 0)) || (temp_v0_2->unk274 == 0))) { - func_800608E0(arg1, arg3, arg4); + if ((temp_v0 != 0x0010) && (temp_v0 != 0x000D)) { + if ((arg1 == 0) && ((player->unk_258[arg2].unk_01E > 0) || (player->unk_258[arg2].unk_01C == 0))) { + func_800608E0(arg1, arg3, (s32) arg4); return; } - if ((arg0 + (arg2 * 0x48))->unk276 > 0) { - func_800608E0(arg1, arg3, arg4); + if (player->unk_258[arg2].unk_01E > 0) { + func_800608E0(arg1, arg3, (s32) arg4); } - // Duplicate return node #8. Try simplifying control flow for better match } } #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80060B14.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8005D794(void *, void *, f32, f32, f32, s32, s32); // extern -void func_8005D7D8(void *, ?, ?); // extern -void func_8005D800(void *, ?, ?); // extern -f32 sins(s32); // extern -f32 coss(s32); // extern -extern f64 D_800EE588; -extern f64 D_800EE590; -extern f64 D_800EE598; -extern f64 D_800EE5A0; +#ifdef NEEDS_RODATA +// data_0DD0A0_3_0.s +extern f64 D_800EE588;// = -1.8; +extern f64 D_800EE590;// = -1.8; +extern f64 D_800EE598;// = -1.8; +extern f64 D_800EE5A0;// = -1.8; -void func_80060BCC(void *arg0, s16 arg1, s32 arg2, ? arg3) { +void func_80060BCC(Player *player, s16 arg1, s32 arg2, s32 arg3) { s32 sp54; + s32 stackPadding0; s32 sp4C; f32 sp48; f32 sp44; - s32 sp3C; - s16 temp_v0; - s32 temp_a0; - s32 temp_a0_2; - void *temp_s0; - void *temp_s0_2; - void *temp_s1; - void *temp_s1_2; - void *temp_v0_2; - temp_v0 = gCurrentCourseId; - if ((temp_v0 != 0x10) && (temp_v0 != 0xD) && (sp54 = random_int(0x168) - 0xB4, sp4C = random_int(6), sp44 = random_int(6), sp48 = random_int(3), (arg0 == gPlayerOne))) { - if ((arg1 == 0) && ((temp_v0_2 = arg0 + (arg2 * 0x48), (temp_v0_2->unk546 > 0)) || (temp_v0_2->unk544 == 0))) { - temp_s0 = arg0 + (arg1 * 0x48); - temp_s1 = temp_s0 + 0x528; - func_8005D794(arg0, temp_s1, 0.0f, 0.0f, 0.0f, 0, 0); - func_8005D7D8(temp_s1, 0xB, 0x3ECCCCCD); - func_8005D800(temp_s1, 0xFFFFFF, 0xFF); - temp_a0 = (sp54 * 0xB6) & 0xFFFF; - sp3C = temp_a0; - temp_s0->unk530 = (coss(temp_a0) * D_800EE588) + arg0->unk1C; - temp_s0->unk528 = (sins(temp_a0) * D_800EE590) + arg0->unk14; - temp_s0->unk52C = (arg0->unk18 - arg0->unk70) + sp4C + 2.0f; - temp_s0->unk540 = sp44 + 1.0f; - temp_s0->unk534 = (sp48 + 2.0f) / 10.0f; - return; - } - if ((arg0 + (arg2 * 0x48))->unk546 > 0) { - temp_s0_2 = arg0 + (arg1 * 0x48); - temp_s1_2 = temp_s0_2 + 0x528; - func_8005D794(arg0, temp_s1_2, 0.0f, 0.0f, 0.0f, 0, 0); - func_8005D7D8(temp_s1_2, 0xB, 0x3ECCCCCD); - func_8005D800(temp_s1_2, 0xFFFFFF, 0xFF); - temp_a0_2 = (sp54 * 0xB6) & 0xFFFF; - sp3C = temp_a0_2; - temp_s0_2->unk530 = (coss(temp_a0_2) * D_800EE598) + arg0->unk1C; - temp_s0_2->unk528 = (sins(temp_a0_2) * D_800EE5A0) + arg0->unk14; - temp_s0_2->unk52C = (arg0->unk18 - arg0->unk70) + sp4C + 2.0f; - temp_s0_2->unk540 = sp44 + 1.0f; - temp_s0_2->unk534 = (sp48 + 2.0f) / 10.0f; - } - // Duplicate return node #9. Try simplifying control flow for better match + if (gCurrentCourseId == COURSE_SKYSCRAPER) return; + if (gCurrentCourseId == COURSE_RAINBOW_ROAD) return; + sp54 = random_int(0x0168U) - 0xB4; + sp4C = random_int(6U); + sp44 = random_int(6U); + sp48 = random_int(3U); + if (player != gPlayerOne) return; + if ((arg1 == 0) && ((player->unk_258[arg2 + 10].unk_01E > 0) || (player->unk_258[arg2 + 10].unk_01C == 0))) { + func_8005D794(player, &player->unk_258[arg1 + 10], 0.0f, 0.0f, 0.0f, (s8) 0, (s8) 0); + func_8005D7D8(&player->unk_258[arg1 + 10], 0x0B, 0.4f); + func_8005D800(&player->unk_258[arg1 + 10], 0x00FFFFFF, 0x00FF); + player->unk_258[arg1 + 10].unk_000[2] = player->pos[2] + (coss(sp54 * 0xB6) * -1.8); + player->unk_258[arg1 + 10].unk_000[0] = player->pos[0] + (sins(sp54 * 0xB6) * -1.8); + player->unk_258[arg1 + 10].unk_000[1] = (player->pos[1] - player->boundingBoxSize) + sp4C + 2.0f; + player->unk_258[arg1 + 10].unk_018 = sp44 + 1.0f; + player->unk_258[arg1 + 10].unk_00C = (sp48 + 2.0f) / 10.0f; + } + else if (player->unk_258[arg2 + 10].unk_01E > 0) { + func_8005D794(player, &player->unk_258[arg1 + 10], 0.0f, 0.0f, 0.0f, (s8) 0, (s8) 0); + func_8005D7D8(&player->unk_258[arg1 + 10], 0x0B, 0.4f); + func_8005D800(&player->unk_258[arg1 + 10], 0x00FFFFFF, 0x00FF); + player->unk_258[arg1 + 10].unk_000[2] = player->pos[2] + (coss(sp54 * 0xB6) * -1.8); + player->unk_258[arg1 + 10].unk_000[0] = player->pos[0] + (sins(sp54 * 0xB6) * -1.8); + player->unk_258[arg1 + 10].unk_000[1] = (player->pos[1] - player->boundingBoxSize) + sp4C + 2.0f; + player->unk_258[arg1 + 10].unk_018 = sp44 + 1.0f; + player->unk_258[arg1 + 10].unk_00C = (sp48 + 2.0f) / 10.0f; } } #else @@ -4618,7 +4273,7 @@ void func_80061094(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { } } -void func_80061130(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { +void func_80061130(Player* player, s16 arg1, UNUSED s32 arg2, UNUSED s8 arg3, UNUSED s8 arg4) { func_8005D794(player, &player->unk_258[arg1], 0.0f, 0.0f, 0.0f, 0, 0); func_8005D7D8(&player->unk_258[arg1], 7, 0.6f); func_8005D800(&player->unk_258[arg1], 0xFFFFFF, 0xD0); @@ -4630,429 +4285,249 @@ void func_80061130(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { player->unk_258[arg1].unk_024 = 0.0f; } -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_80061130(s16, s8, s32); // extern - -void func_80061224(void *arg0, s16 arg1, s32 arg2, s8 arg3, s8 arg4) { - s16 temp_a1; - - temp_a1 = arg1; - if ((arg1 == 0) && (((arg0 + (arg2 * 0x48))->unk276 > 0) || ((arg0 + (arg1 * 0x48))->unk274 == 0))) { - func_80061130(temp_a1, arg3, arg4); - return; +void func_80061224(Player *player, s16 arg1, s32 arg2, s8 arg3, s8 arg4) { + if ((arg1 == 0) && ((player->unk_258[arg2].unk_01E > 0) || (player->unk_258[arg1].unk_01C == 0))) { + func_80061130(player, arg1, arg2, arg3, arg4); } - if ((arg0 + (arg2 * 0x48))->unk276 >= 2) { - arg1 = temp_a1; - func_80061130(temp_a1, arg3, arg4); + else if (player->unk_258[arg2].unk_01E >= 2) { + func_80061130(player, arg1, arg2, arg3, arg4); if (arg1 == 9) { - arg0->unk44 = arg0->unk44 & 0xFDFF; + player->unk_044 &= ~0x0200; } } } -#else -GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80061224.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_800612F8(void *arg0, ? arg1, ? arg2, ? arg3) { - f32 temp_f10; - s32 temp_s2; - s32 temp_v0; - void *temp_s0; - void *phi_s0; - s32 phi_s2; - f32 phi_f10; +void func_800612F8(Player *player, s32 arg1, s32 arg2, s32 arg3) { + s32 var_s2; - phi_s0 = arg0; - phi_s2 = 0; - do { - phi_s0->unkAE4 = 1; - phi_s0->unkAF0 = arg0->unk18 + 5.0f; - phi_s0->unkAE8 = phi_s2 - arg0->unk2E; - temp_v0 = random_int(0x64); - temp_f10 = temp_v0; - phi_f10 = temp_f10; - if (temp_v0 < 0) { - phi_f10 = temp_f10 + 4294967296.0f; - } - phi_s0->unkB02 = 0; - phi_s0->unkADA = 1; - phi_s0->unkAE6 = 0; - phi_s0->unkB06 = 0xFF; - temp_s2 = phi_s2 + 0x1C70; - temp_s0 = phi_s0 + 0x48; - temp_s0->unkAA4 = (phi_f10 / 100.0f) + 1.5; - temp_s0->unkA88 = arg0->unk1C; - temp_s0->unkA80 = arg0->unk14; - phi_s0 = temp_s0; - phi_s2 = temp_s2; - } while (temp_s2 != 0x11C60); - arg0->unk46 = arg0->unk46 & 0xFFF7; + for (var_s2 = 0; var_s2 < 10; var_s2++){ + player->unk_258[0x1E + var_s2].unk_01C = 1; + player->unk_258[0x1E + var_s2].unk_028 = player->pos[1] + 5.0f; + player->unk_258[0x1E + var_s2].unk_020 = (0x1C70 * var_s2) - player->unk_02C[1]; + player->unk_258[0x1E + var_s2].unk_024 = (random_int(0x0064U) / 100.0f) + 1.5; + player->unk_258[0x1E + var_s2].unk_03A = 0; + player->unk_258[0x1E + var_s2].unk_012 = 1; + player->unk_258[0x1E + var_s2].unk_01E = 0; + player->unk_258[0x1E + var_s2].unk_03E = 0x00FF; + player->unk_258[0x1E + var_s2].unk_000[2] = player->pos[2]; + player->unk_258[0x1E + var_s2].unk_000[0] = player->pos[0]; + } + player->unk_046 &= ~0x0008; } -#else -GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800612F8.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern f64 D_800EE5B8; +#ifdef NEEDS_RODATA +// data_0DD0A0_3_0.s +extern f64 D_800EE5B8;// = 1.9; +void func_80061430(Player *player, s32 arg1, s32 arg2, s32 arg3) { + s32 var_s2; -void func_80061430(void *arg0, ? arg1, ? arg2, ? arg3) { - f32 temp_f10; - f32 temp_f10_2; - f64 temp_f22; - s32 temp_s1; - s32 temp_v0; - s32 temp_v0_2; - void *temp_s0; - void *phi_s0; - s32 phi_s1; - f32 phi_f10; - f32 phi_f10_2; - - temp_f22 = D_800EE5B8; - phi_s0 = arg0; - phi_s1 = 0; - do { - phi_s0->unkAE4 = 1; - phi_s0->unkAF0 = arg0->unk18 - 4.0f; - phi_s0->unkAE8 = phi_s1 - arg0->unk2E; - temp_v0 = random_int(0x64); - temp_f10 = temp_v0; - phi_f10 = temp_f10; - if (temp_v0 < 0) { - phi_f10 = temp_f10 + 4294967296.0f; - } - phi_s0->unkAEC = (phi_f10 / 100.0f) + temp_f22; - temp_v0_2 = random_int(0x64); - temp_f10_2 = temp_v0_2; - phi_f10_2 = temp_f10_2; - if (temp_v0_2 < 0) { - phi_f10_2 = temp_f10_2 + 4294967296.0f; - } - phi_s0->unkB02 = 0; - phi_s0->unkADA = 9; - phi_s0->unkAE6 = 0; - phi_s0->unkB06 = 0xFF; - temp_s1 = phi_s1 + 0x1C70; - temp_s0 = phi_s0 + 0x48; - temp_s0->unkAA4 = (phi_f10_2 / 100.0f) + 1.5; - temp_s0->unkA88 = arg0->unk1C; - temp_s0->unkA80 = arg0->unk14; - phi_s0 = temp_s0; - phi_s1 = temp_s1; - } while (temp_s1 != 0xC710); - arg0->unk44 = arg0->unk44 & 0xEFFF; + for (var_s2 = 0; var_s2 < 7; var_s2++){ + player->unk_258[0x1E + var_s2].unk_01C = 1; + player->unk_258[0x1E + var_s2].unk_028 = player->pos[1] - 4.0f; + player->unk_258[0x1E + var_s2].unk_020 = (0x1C70 * var_s2) - player->unk_02C[1]; + // ??? + player->unk_258[0x1E + var_s2].unk_024 = (random_int(0x0064U) / 100.0f) + 1.9; + player->unk_258[0x1E + var_s2].unk_024 = (random_int(0x0064U) / 100.0f) + 1.5; + player->unk_258[0x1E + var_s2].unk_03A = 0; + player->unk_258[0x1E + var_s2].unk_012 = 9; + player->unk_258[0x1E + var_s2].unk_01E = 0; + player->unk_258[0x1E + var_s2].unk_03E = 0x00FF; + player->unk_258[0x1E + var_s2].unk_000[2] = player->pos[2]; + player->unk_258[0x1E + var_s2].unk_000[0] = player->pos[0]; + } + player->unk_044 &= ~0x1000; } #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80061430.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern s32 D_800E4848; -extern f32 D_800EE5C0; +#ifdef NEEDS_RODATA +// data_0DD0A0_2.s +extern f32 D_800E4848[0xA];// = { -182.0f, 182.0f, 364.0f, -364.0f, 546.0f, -546.0f, 728.0f, -728.0f, 910.0f, -910.0f }; -void func_800615AC(void *arg0, s16 arg1, ? arg2, ? arg3) { - ? sp28; - void *sp24; - ? *temp_t6; +void func_800615AC(Player *player, s16 arg1, s32 arg2, s32 arg3) { + s32 test = 2; + s32 stackPadding0; + s32 stackPadding1; f32 temp_f0; - s32 *temp_t7; - void *temp_v1; - s32 *phi_t7; - ? *phi_t6; + f32 sp28[10] = { -182.0f, 182.0f, 364.0f, -364.0f, 546.0f, -546.0f, 728.0f, -728.0f, 910.0f, -910.0f }; - phi_t7 = &D_800E4848; - phi_t6 = &sp28; - do { - temp_t7 = phi_t7 + 0xC; - temp_t6 = phi_t6 + 0xC; - temp_t6->unk-C = *phi_t7; - temp_t6->unk-8 = temp_t7->unk-8; - temp_t6->unk-4 = temp_t7->unk-4; - phi_t7 = temp_t7; - phi_t6 = temp_t6; - } while (temp_t7 != (&D_800E4848 + 0x24)); - temp_t6->unk0 = temp_t7->unk0; - temp_v1 = arg0 + (arg1 * 0x48); - if (random_int(3) == 2.0f) { - temp_v1->unkAE4 = 1; - temp_v1->unkAC8 = arg0->unk14; - temp_v1->unkAD0 = arg0->unk1C; - temp_v1->unkAE8 = (sp + (arg1 * 4))->unk28 + -arg0->unk2E; - sp24 = temp_v1; - temp_v1->unkAE0 = random_int(1) + 2.0f; - temp_f0 = random_int(4) - 2; - temp_v1->unkADC = temp_f0; - temp_v1->unkACC = arg0->unk18 + temp_f0; - temp_v1->unkADA = 5; - temp_v1->unkAE6 = 0; - temp_v1->unkB06 = 0xFF; - temp_v1->unkB00 = 0; - temp_v1->unkAD4 = D_800EE5C0; + if (random_int(3U) == 2.0f) { + player->unk_258[0x1E + arg1].unk_01C = 1; + player->unk_258[0x1E + arg1].unk_000[0] = player->pos[0]; + player->unk_258[0x1E + arg1].unk_000[2] = player->pos[2]; + player->unk_258[0x1E + arg1].unk_020 = -player->unk_02C[1] + sp28[arg1]; + player->unk_258[0x1E + arg1].unk_018 = random_int(1U) + 2.0f; + temp_f0 = random_int(4U); + temp_f0 -= test; + player->unk_258[0x1E + arg1].unk_014 = temp_f0; + player->unk_258[0x1E + arg1].unk_000[1] = player->pos[1] + temp_f0; + player->unk_258[0x1E + arg1].unk_00C = 0.15f; + player->unk_258[0x1E + arg1].unk_012 = 5; + player->unk_258[0x1E + arg1].unk_01E = 0; + player->unk_258[0x1E + arg1].unk_03E = 0x00FF; + player->unk_258[0x1E + arg1].unk_038 = 0; } } #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800615AC.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8005D794(void *, s32, f32, f32, f32, s32, s32); // extern -void func_8005D7D8(s32, ?, ?); // extern -void func_8005D800(s32, ?, ?); // extern -f32 sins(s32); // extern -f32 coss(s32); // extern - -void func_80061754(void *arg0, s16 arg1, ? arg2, ? arg3) { +void func_80061754(Player *player, s16 arg1, s32 arg2, s32 arg3, s32 arg4) { s32 sp54; + s16 temp_s1; s32 sp4C; f32 sp48; f32 sp44; - s32 sp3C; - s16 temp_s1; - s32 temp_a1; - s32 temp_s1_2; - s32 temp_v1; - void *temp_s0; - sp54 = random_int(0x168) - 0xB4; - sp4C = random_int(6); - temp_s1 = random_int(0x60); - sp44 = random_int(6); - temp_s0 = arg0 + (arg1 * 0x48); - temp_a1 = temp_s0 + 0xAC8; - sp48 = random_int(2); - sp3C = temp_a1; - func_8005D794(arg0, temp_a1, 0.0f, 0.0f, 0.0f, 0, 0); - func_8005D7D8(sp3C, 6, 0x3F800000); - temp_v1 = arg0->unkBC; - if (((temp_v1 << 6) < 0) || ((temp_v1 << 7) < 0) || ((temp_v1 & 0x400) != 0) || (temp_v1 & 0x80000000)) { - func_8005D800(sp3C, 0xFFFFFF, 0xA0); - temp_s0->unkB00 = temp_s0->unkB00 - temp_s1; - temp_s0->unkB02 = temp_s0->unkB02 - temp_s1; - temp_s0->unkB04 = temp_s0->unkB04 - temp_s1; + sp54 = random_int(0x0168U) - 0xB4; + sp4C = random_int(6U); + temp_s1 = random_int(0x0060U); + sp44 = random_int(6U); + sp48 = random_int(2U); + func_8005D794(player, &player->unk_258[0x1E + arg1], 0.0f, 0.0f, 0.0f, (s8) 0, (s8) 0); + func_8005D7D8(&player->unk_258[0x1E + arg1], 6, 1.0f); + /* + Exactly 3 of the player->unk_0BC references here must be needlessly XOR'd with 0, otherwise player->unk_0BC is erroneously + saved to $v0 instead of $v1. + ALTERNATIVELY + Changing the return type of func_8005D7D8 to some non-void type will also fix the mismatch. However, that is a nonseical + solution as func_8005D7D8 is supposed to be a void return type + */ + if ((player->unk_0BC & 0x02000000) || ((player->unk_0BC ^ 0) & 0x01000000) || ((player->unk_0BC ^ 0) & 0x400) || ((player->unk_0BC ^ 0) & 0x80000000)) { + func_8005D800(&player->unk_258[0x1E + arg1], 0x00FFFFFF, 0x00A0); + player->unk_258[0x1E + arg1].unk_038 -= temp_s1; + player->unk_258[0x1E + arg1].unk_03A -= temp_s1; + player->unk_258[0x1E + arg1].unk_03C -= temp_s1; } else { - func_8005D800(sp3C, 0, 0xA0); - temp_s0->unkB00 = temp_s0->unkB00 + temp_s1; - temp_s0->unkB02 = temp_s0->unkB02 + temp_s1; - temp_s0->unkB04 = temp_s0->unkB04 + temp_s1; + func_8005D800(&player->unk_258[0x1E + arg1], 0, 0x00A0); + player->unk_258[0x1E + arg1].unk_038 += temp_s1; + player->unk_258[0x1E + arg1].unk_03A += temp_s1; + player->unk_258[0x1E + arg1].unk_03C += temp_s1; } - temp_s1_2 = (sp54 * 0xB6) & 0xFFFF; - temp_s0->unkAD0 = (coss(temp_s1_2 & 0xFFFF) * -5.0f) + arg0->unk1C; - temp_s0->unkAC8 = (sins(temp_s1_2 & 0xFFFF) * -5.0f) + arg0->unk14; - temp_s0->unkACC = (arg0->unk18 - arg0->unk70) + sp4C + 2.0f; - temp_s0->unkAE0 = sp44 + 1.0f; - temp_s0->unkAD4 = sp48 + 1.0f; + player->unk_258[0x1E + arg1].unk_000[2] = player->pos[2] + (coss(sp54 * 0xB6) * -5.0f); + player->unk_258[0x1E + arg1].unk_000[0] = player->pos[0] + (sins(sp54 * 0xB6) * -5.0f); + player->unk_258[0x1E + arg1].unk_000[1] = (player->pos[1] - player->boundingBoxSize) + sp4C + 2.0f; + player->unk_258[0x1E + arg1].unk_018 = sp44 + 1.0f; + player->unk_258[0x1E + arg1].unk_00C = sp48 + 1.0f; } -#else -GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80061754.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_80061754(s16, s8, s32); // extern - -void func_8006199C(s32 arg0, s16 arg1, s32 arg2, s8 arg3, s8 arg4) { - void *temp_v0; - - if ((arg1 == 0) && ((temp_v0 = arg0 + (arg2 * 0x48), (temp_v0->unkAE6 > 0)) || (temp_v0->unkAE4 == 0))) { - func_80061754(arg1, arg3, arg4); - return; - } - if ((arg0 + (arg2 * 0x48))->unkAE6 > 0) { - func_80061754(arg1, arg3, arg4); +void func_8006199C(Player *player, s16 arg1, s32 arg2, s8 arg3, s8 arg4) { + if ((arg1 == 0) && ((player->unk_258[0x1E + arg2].unk_01E > 0) || (player->unk_258[0x1E + arg2].unk_01C == 0))) { + func_80061754(player, arg1, arg2, (s32) arg3, arg4); + } else if (player->unk_258[0x1E + arg2].unk_01E > 0) { + func_80061754(player, arg1, arg2, (s32) arg3, arg4); } } -#else -GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006199C.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8005D794(void *, void *, f32, f32, f32, s32, s32); // extern -void func_8005D7D8(void *, ?, ?); // extern -void func_8005D800(void *, ?, ?); // extern -f32 sins(s32); // extern -f32 coss(s32); // extern - -void func_80061A34(void *arg0, s16 arg1, s32 arg2, ? arg3) { +void func_80061A34(Player *player, s16 arg1, s32 arg2, s32 arg3) { s32 sp54; + s32 stackPadding0; s32 sp4C; f32 sp48; - s32 sp3C; - s32 temp_a0; - s32 temp_a0_2; - void *temp_s0; - void *temp_s0_2; - void *temp_s1; - void *temp_s1_2; - void *temp_v0; + s32 stackPadding1; - sp54 = random_int(0x168) - 0xB4; - sp4C = random_int(6); - random_int(6); - sp48 = random_int(3); - if ((arg1 == 0) && ((temp_v0 = arg0 + (arg2 * 0x48), (temp_v0->unkAE6 > 0)) || (temp_v0->unkAE4 == 0))) { - temp_s0 = arg0 + (arg1 * 0x48); - temp_s1 = temp_s0 + 0xAC8; - func_8005D794(arg0, temp_s1, 0.0f, 0.0f, 0.0f, 0, 0); - func_8005D7D8(temp_s1, 7, 0x3F800000); - func_8005D800(temp_s1, 0xFFFFFF, 0xFF); - temp_a0 = (sp54 * 0xB6) & 0xFFFF; - sp3C = temp_a0; - temp_s0->unkAD0 = (coss(temp_a0) * -2.0) + arg0->unk1C; - temp_s0->unkAC8 = (sins(temp_a0) * -2.0) + arg0->unk14; - temp_s0->unkACC = (arg0->unk18 - arg0->unk70) + sp4C + 2.0f; - temp_s0->unkAD4 = (sp48 + 2.0f) / 10.0f; - return; - } - if ((arg0 + (arg2 * 0x48))->unkAE6 > 0) { - temp_s0_2 = arg0 + (arg1 * 0x48); - temp_s1_2 = temp_s0_2 + 0xAC8; - func_8005D794(arg0, temp_s1_2, 0.0f, 0.0f, 0.0f, 0, 0); - func_8005D7D8(temp_s1_2, 7, 0x3F800000); - func_8005D800(temp_s1_2, 0xFFFFFF, 0xFF); - temp_a0_2 = (sp54 * 0xB6) & 0xFFFF; - sp3C = temp_a0_2; - temp_s0_2->unkAD0 = (coss(temp_a0_2) * -2.0) + arg0->unk1C; - temp_s0_2->unkAC8 = (sins(temp_a0_2) * -2.0) + arg0->unk14; - temp_s0_2->unkACC = (arg0->unk18 - arg0->unk70) + sp4C + 2.0f; - temp_s0_2->unkAD4 = (sp48 + 2.0f) / 10.0f; + sp54 = random_int(0x0168U) - 0xB4; + sp4C = random_int(6U); + random_int(6U); + sp48 = (f32) random_int(3U); + if ((arg1 == 0) && ((player->unk_258[0x1E + arg2].unk_01E > 0) || (player->unk_258[0x1E + arg2].unk_01C == 0))) { + func_8005D794(player, &player->unk_258[0x1E + arg1], 0.0f, 0.0f, 0.0f, (s8) 0, (s8) 0); + func_8005D7D8(&player->unk_258[0x1E + arg1], 7, 1.0f); + func_8005D800(&player->unk_258[0x1E + arg1], 0x00FFFFFF, 0x00FF); + player->unk_258[0x1E + arg1].unk_000[2] = player->pos[2] + (coss(sp54 * 0xB6) * -2.0); + player->unk_258[0x1E + arg1].unk_000[0] = player->pos[0] + (sins(sp54 * 0xB6) * -2.0); + player->unk_258[0x1E + arg1].unk_000[1] = (player->pos[1] - player->boundingBoxSize) + sp4C + 2.0f; + player->unk_258[0x1E + arg1].unk_00C = (sp48 + 2.0f) / 10.0f; + } else if (player->unk_258[0x1E + arg2].unk_01E > 0) { + func_8005D794(player, &player->unk_258[0x1E + arg1], 0.0f, 0.0f, 0.0f, (s8) 0, (s8) 0); + func_8005D7D8(&player->unk_258[0x1E + arg1], 7, 1.0f); + func_8005D800(&player->unk_258[0x1E + arg1], 0x00FFFFFF, 0x00FF); + player->unk_258[0x1E + arg1].unk_000[2] = player->pos[2] + (coss(sp54 * 0xB6) * -2.0); + player->unk_258[0x1E + arg1].unk_000[0] = player->pos[0] + (sins(sp54 * 0xB6) * -2.0); + player->unk_258[0x1E + arg1].unk_000[1] = (player->pos[1] - player->boundingBoxSize) + (f32) sp4C + 2.0f; + player->unk_258[0x1E + arg1].unk_00C = (sp48 + 2.0f) / 10.0f; } } -#else -GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80061A34.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern s32 D_800E4870; -extern f32 D_800EE5C4; +#ifdef NEEDS_RODATA +// data_0DD0A0_2.s +extern f32 D_800E4870[0xA];// = { -182.0f, 182.0f, 364.0f, -364.0f, 546.0f, -546.0f, 728.0f, -728.0f, 910.0f, -910.0f }; -void func_80061D4C(void *arg0, s16 arg1, ? arg2, ? arg3) { - ? sp20; - void *sp1C; - ? *temp_t6; - s32 *temp_t7; - void *temp_v1; - s32 *phi_t7; - ? *phi_t6; +void func_80061D4C(Player *player, s16 arg1, s32 arg2, s32 arg3) { + s32 test = 2; + s32 stackPadding0; + s32 stackPadding1; + s32 stackPadding2; + f32 sp20[10] = { -182.0f, 182.0f, 364.0f, -364.0f, 546.0f, -546.0f, 728.0f, -728.0f, 910.0f, -910.0f }; - phi_t7 = &D_800E4870; - phi_t6 = &sp20; - do { - temp_t7 = phi_t7 + 0xC; - temp_t6 = phi_t6 + 0xC; - temp_t6->unk-C = *phi_t7; - temp_t6->unk-8 = temp_t7->unk-8; - temp_t6->unk-4 = temp_t7->unk-4; - phi_t7 = temp_t7; - phi_t6 = temp_t6; - } while (temp_t7 != (&D_800E4870 + 0x24)); - temp_t6->unk0 = temp_t7->unk0; - arg0 = arg0; - temp_v1 = arg0 + (arg1 * 0x48); - if (random_int(3) == 2.0f) { - temp_v1->unkAE4 = 1; - temp_v1->unkAC8 = arg0->unk14; - temp_v1->unkACC = arg0->unk18 + 2.0f; - temp_v1->unkAD0 = arg0->unk1C; - temp_v1->unkAE8 = (sp + (arg1 * 4))->unk20 + -arg0->unk2E; - sp1C = temp_v1; - temp_v1->unkAE0 = random_int(3) + 2.0f; - temp_v1->unkADC = random_int(4) - 2; - temp_v1->unkADA = 2; - temp_v1->unkAE6 = 0; - temp_v1->unkB06 = 0xFF; - temp_v1->unkAD4 = D_800EE5C4; + if (random_int(3U) == 2.0f) { + player->unk_258[0x1E + arg1].unk_01C = 1; + player->unk_258[0x1E + arg1].unk_000[0] = player->pos[0]; + player->unk_258[0x1E + arg1].unk_000[1] = player->pos[1] + 2.0f; + player->unk_258[0x1E + arg1].unk_000[2] = player->pos[2]; + player->unk_258[0x1E + arg1].unk_020 = -player->unk_02C[1] + sp20[arg1]; + player->unk_258[0x1E + arg1].unk_018 = random_int(3U) + 2.0f; + player->unk_258[0x1E + arg1].unk_014 = random_int(4U); + player->unk_258[0x1E + arg1].unk_014 -= test; + player->unk_258[0x1E + arg1].unk_00C = 0.4f; + player->unk_258[0x1E + arg1].unk_012 = 2; + player->unk_258[0x1E + arg1].unk_01E = 0; + player->unk_258[0x1E + arg1].unk_03E = 0x00FF; } } #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80061D4C.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8005D794(void *, void *, f32, f32, f32, s32, s32); // extern -void func_8005D7D8(void *, ?, ?); // extern -void func_8005D800(void *, ?, ?); // extern -f32 sins(s32); // extern -f32 coss(s32); // extern - -void func_80061EF4(void *arg0, s16 arg1, s32 arg2, ? arg3) { - s32 sp48; - s32 sp44; - f32 sp3C; - void *sp30; +void func_80061EF4(Player *player, s16 arg1, s32 arg2, s32 arg3) { + s32 stackPadding0; + s32 var_t0 = 0x000000FF; + s32 var_t1; s32 temp_v1; - void *temp_a1; - void *temp_a1_2; - void *temp_s0; - void *temp_s0_2; - void *temp_v0; - s32 phi_t0; - f32 phi_f2; - s32 phi_t1; + f32 var_f2; + s32 stackPadding1; - sp48 = 0xFF; - temp_v1 = random_int(8) & 1; - phi_t0 = 0xFF; + if(1) {}; + temp_v1 = random_int(8U) & 1; if (temp_v1 == 1) { - sp44 = 1; - sp3C = arg0->unk18; - phi_t0 = 0; + var_t1 = 1; + var_t0 = 0; + var_f2 = player->pos[1]; } - phi_f2 = sp3C; - phi_t1 = sp44; if (temp_v1 == 0) { - phi_t0 = 0; - phi_f2 = arg0->unk18; - phi_t1 = 0; + var_t1 = 0; + var_t0 = 0; + var_f2 = player->pos[1]; } - if (phi_t0 == 0) { - if ((arg1 == 0) && ((temp_v0 = arg0 + (arg2 * 0x48), (temp_v0->unkAE6 > 0)) || (temp_v0->unkAE4 == 0))) { - temp_s0 = arg0 + (arg1 * 0x48); - temp_a1 = temp_s0 + 0xAC8; - sp30 = temp_a1; - func_8005D794(arg0, temp_a1, 0.0f, phi_f2, 0.0f, phi_t0, phi_t1); - func_8005D7D8(sp30, 3, 0x3F000000); - func_8005D800(sp30, 0xFFFFFF, 0x60); - temp_s0->unkAE8 = 0; - if (temp_s0->unkAD8 == 1) { - temp_s0->unkAE8 = temp_s0->unkAE8 + 0x888; + if (var_t0 == 0) { + if ((arg1 == 0) && ((player->unk_258[0x1E + arg2].unk_01E > 0) || (player->unk_258[0x1E + arg2].unk_01C == 0))) { + func_8005D794(player, &player->unk_258[0x1E + arg1], 0.0f, var_f2, 0.0f, (s8) var_t0, (s8) var_t1); + func_8005D7D8(&player->unk_258[0x1E + arg1], 3, 0.5f); + func_8005D800(&player->unk_258[0x1E + arg1], 0x00FFFFFF, 0x0060); + player->unk_258[0x1E + arg1].unk_020 = 0; + if (player->unk_258[0x1E + arg1].unk_010 == 1) { + player->unk_258[0x1E + arg1].unk_020 += 0x888; } else { - temp_s0->unkAE8 = temp_s0->unkAE8 - 0x888; + player->unk_258[0x1E + arg1].unk_020 -= 0x888; } - temp_s0->unkAD0 = (coss(((temp_s0->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk1C; - temp_s0->unkAC8 = (sins(((temp_s0->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk14; - return; - } - if ((arg0 + (arg2 * 0x48))->unkAE6 > 0) { - temp_s0_2 = arg0 + (arg1 * 0x48); - temp_a1_2 = temp_s0_2 + 0xAC8; - sp30 = temp_a1_2; - func_8005D794(arg0, temp_a1_2, 0.0f, phi_f2, 0.0f, phi_t0, phi_t1); - func_8005D7D8(sp30, 3, 0x3F000000); - func_8005D800(sp30, 0xFFFFFF, 0x60); - temp_s0_2->unkAE8 = 0; - if (temp_s0_2->unkAD8 == 1) { - temp_s0_2->unkAE8 = temp_s0_2->unkAE8 + 0x888; + player->unk_258[0x1E + arg1].unk_000[2] = player->pos[2] + (coss(player->unk_258[0x1E + arg1].unk_020 - player->unk_02C[1] - player->unk_0C0) * 5.0f); + player->unk_258[0x1E + arg1].unk_000[0] = player->pos[0] + (sins(player->unk_258[0x1E + arg1].unk_020 - player->unk_02C[1] - player->unk_0C0) * 5.0f); + } else if (player->unk_258[0x1E + arg2].unk_01E > 0) { + func_8005D794(player, &player->unk_258[0x1E + arg1], 0.0f, var_f2, 0.0f, (s8) var_t0, (s8) var_t1); + func_8005D7D8(&player->unk_258[0x1E + arg1], 3, 0.5f); + func_8005D800(&player->unk_258[0x1E + arg1], 0x00FFFFFF, 0x0060); + player->unk_258[0x1E + arg1].unk_020 = 0; + if (player->unk_258[0x1E + arg1].unk_010 == 1) { + player->unk_258[0x1E + arg1].unk_020 += 0x888; } else { - temp_s0_2->unkAE8 = temp_s0_2->unkAE8 - 0x888; + player->unk_258[0x1E + arg1].unk_020 -= 0x888; } - temp_s0_2->unkAD0 = (coss(((temp_s0_2->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk1C; - temp_s0_2->unkAC8 = (sins(((temp_s0_2->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk14; + player->unk_258[0x1E + arg1].unk_000[2] = player->pos[2] + (coss(player->unk_258[0x1E + arg1].unk_020 - player->unk_02C[1] - player->unk_0C0) * 5.0f); + player->unk_258[0x1E + arg1].unk_000[0] = player->pos[0] + (sins(player->unk_258[0x1E + arg1].unk_020 - player->unk_02C[1] - player->unk_0C0) * 5.0f); } - // Duplicate return node #17. Try simplifying control flow for better match } } -#else -GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80061EF4.s") -#endif void func_800621BC(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3) { s32 temp_v1; @@ -5125,192 +4600,97 @@ void func_80062484(Player* player, UnkPlayerStruct258* arg1, s32 arg2) { arg1->unk_01E = 0; } -#ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -void func_8005DAD8(void *, s16, ?, ?); /* extern */ -void func_80062484(void *, void *, s32); /* extern */ -s16 gCurrentCourseId; /* unable to generate initializer */ +#ifdef NEEDS_RODATA +// data_0DD0A0_3_0.s +// jpt_800EE5C8 -void func_800624D8(void *arg0, s16 arg1, s8 arg2, s8 arg3) { - s16 temp_v0; - s32 temp_s1; - s32 temp_s1_2; - s32 temp_s1_3; - s32 temp_s1_4; - s32 temp_s1_5; - s32 temp_s1_6; - s32 temp_s1_7; - s32 temp_s1_8; - s32 temp_s1_9; - u16 temp_t6; - void *phi_s0; - s16 phi_v0; - s16 phi_v0_2; - s16 phi_v0_3; - s16 phi_v0_4; - s16 phi_v0_5; - s32 phi_s1; - void *phi_s0_2; - s32 phi_s1_2; - void *phi_s0_3; - s32 phi_s1_3; - void *phi_s0_4; - s32 phi_s1_4; - void *phi_s0_5; - s32 phi_s1_5; - void *phi_s0_6; - s32 phi_s1_6; - void *phi_s0_7; - s32 phi_s1_7; - void *phi_s0_8; - s32 phi_s1_8; - void *phi_s0_9; - s32 phi_s1_9; - s16 phi_t6; +void func_800624D8(Player *player, s32 arg1, s32 arg2, s32 arg3) { + s32 var_s1; - temp_t6 = arg0->unkF8; - switch (temp_t6) { + switch (player->unk_0F8) { case 2: - phi_s0 = arg0 + 0xAC8; - phi_s1 = 0; - do { - temp_v0 = gCurrentCourseId; - phi_v0 = temp_v0; - if ((temp_v0 == 1) || (temp_v0 == 7)) { - func_8005DAD8(phi_s0, 1, 0, 0xA8); - phi_v0 = gCurrentCourseId; + for (var_s1 = 0; var_s1 < 10; var_s1++) { + if ((gCurrentCourseId == COURSE_CHOCO_MOUNTAIN) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY)) { + func_8005DAD8(&player->unk_258[0x1E + var_s1], 1, 0, 0x00A8); } - phi_v0_2 = phi_v0; - if (phi_v0 == 0xB) { - func_8005DAD8(phi_s0, 7, 0, 0xA8); - phi_v0_2 = gCurrentCourseId; + if (gCurrentCourseId == COURSE_KALAMARI_DESERT) { + func_8005DAD8(&player->unk_258[0x1E + var_s1], 7, 0, 0x00A8); } - phi_v0_3 = phi_v0_2; - if (phi_v0_2 == 9) { - func_8005DAD8(phi_s0, 8, 0, 0xA8); - phi_v0_3 = gCurrentCourseId; + if (gCurrentCourseId == COURSE_MOO_MOO_FARM) { + func_8005DAD8(&player->unk_258[0x1E + var_s1], 8, 0, 0x00A8); } - phi_v0_4 = phi_v0_3; - if (phi_v0_3 == 0xE) { - func_8005DAD8(phi_s0, 9, 0, 0xA8); - phi_v0_4 = gCurrentCourseId; + if (gCurrentCourseId == COURSE_WARIO_STADIUM) { + func_8005DAD8(&player->unk_258[0x1E + var_s1], 9, 0, 0x00A8); } - phi_v0_5 = phi_v0_4; - if (phi_v0_4 == 4) { - func_8005DAD8(phi_s0, 0xA, 0, 0xA8); - phi_v0_5 = gCurrentCourseId; + if (gCurrentCourseId == COURSE_YOSHI_VALLEY) { + func_8005DAD8(&player->unk_258[0x1E + var_s1], 0x000A, 0, 0x00A8); } - if (phi_v0_5 == 0x12) { - func_8005DAD8(phi_s0, 0xB, 0, 0xA8); + if (gCurrentCourseId == COURSE_DK_JUNGLE) { + func_8005DAD8(&player->unk_258[0x1E + var_s1], 0x000B, 0, 0x00A8); } - func_80062484(arg0, phi_s0, phi_s1); - temp_s1 = phi_s1 + 1; - phi_s0 += 0x48; - phi_s1 = temp_s1; - } while (temp_s1 != 0xA); - arg0->unk44 = arg0->unk44 & 0xFEFF; - return; + func_80062484(player, &player->unk_258[0x1E + var_s1], var_s1); + } + player->unk_044 &= ~0x0100; + break; case 8: - phi_s0_2 = arg0 + 0xAC8; - phi_s1_2 = 0; - do { - func_8005DAD8(phi_s0_2, 2, 1, 0xA8); - func_80062484(arg0, phi_s0_2, phi_s1_2); - temp_s1_2 = phi_s1_2 + 1; - phi_s0_2 += 0x48; - phi_s1_2 = temp_s1_2; - } while (temp_s1_2 != 0xA); - arg0->unk44 = arg0->unk44 & 0xFEFF; - return; + for (var_s1 = 0; var_s1 < 10; var_s1++) { + func_8005DAD8(&player->unk_258[0x1E + var_s1], 2, 1, 0x00A8); + func_80062484(player, &player->unk_258[0x1E + var_s1], var_s1); + } + player->unk_044 &= ~0x0100; + break; case 7: - phi_s0_3 = arg0 + 0xAC8; - phi_s1_3 = 0; - do { - func_8005DAD8(phi_s0_3, 2, 1, 0xA8); - func_80062484(arg0, phi_s0_3, phi_s1_3); - temp_s1_3 = phi_s1_3 + 1; - phi_s0_3 += 0x48; - phi_s1_3 = temp_s1_3; - } while (temp_s1_3 != 0xA); - arg0->unk44 = arg0->unk44 & 0xFEFF; - return; + for (var_s1 = 0; var_s1 < 10; var_s1++) { + func_8005DAD8(&player->unk_258[0x1E + var_s1], 2, 1, 0x00A8); + func_80062484(player, &player->unk_258[0x1E + var_s1], var_s1); + } + player->unk_044 &= ~0x0100; + break; case 3: - phi_s0_4 = arg0 + 0xAC8; - phi_s1_4 = 0; - do { - func_8005DAD8(phi_s0_4, 3, 1, 0xA8); - func_80062484(arg0, phi_s0_4, phi_s1_4); - temp_s1_4 = phi_s1_4 + 1; - phi_s0_4 += 0x48; - phi_s1_4 = temp_s1_4; - } while (temp_s1_4 != 0xA); - phi_t6 = arg0->unk44 & 0xFEFF; -block_42: - arg0->unk44 = phi_t6; - return; + for (var_s1 = 0; var_s1 < 10; var_s1++) { + func_8005DAD8(&player->unk_258[0x1E + var_s1], 3, 1, 0x00A8); + func_80062484(player, &player->unk_258[0x1E + var_s1], var_s1); + } + player->unk_044 &= ~0x0100; + break; case 10: - phi_s0_5 = arg0 + 0xAC8; - phi_s1_5 = 0; - do { - func_8005DAD8(phi_s0_5, 4, 1, 0xA8); - func_80062484(arg0, phi_s0_5, phi_s1_5); - temp_s1_5 = phi_s1_5 + 1; - phi_s0_5 += 0x48; - phi_s1_5 = temp_s1_5; - } while (temp_s1_5 != 0xA); - arg0->unk44 = arg0->unk44 & 0xFEFF; - return; + for (var_s1 = 0; var_s1 < 10; var_s1++) { + func_8005DAD8(&player->unk_258[0x1E + var_s1], 4, 1, 0x00A8); + func_80062484(player, &player->unk_258[0x1E + var_s1], var_s1); + } + player->unk_044 &= ~0x0100; + break; case 13: - phi_s0_6 = arg0 + 0xAC8; - phi_s1_6 = 0; - do { - func_8005DAD8(phi_s0_6, 5, 1, 0xA8); - func_80062484(arg0, phi_s0_6, phi_s1_6); - temp_s1_6 = phi_s1_6 + 1; - phi_s0_6 += 0x48; - phi_s1_6 = temp_s1_6; - } while (temp_s1_6 != 0xA); - arg0->unk44 = arg0->unk44 & 0xFEFF; - return; + for (var_s1 = 0; var_s1 < 10; var_s1++) { + func_8005DAD8(&player->unk_258[0x1E + var_s1], 5, 1, 0x00A8); + func_80062484(player, &player->unk_258[0x1E + var_s1], var_s1); + } + player->unk_044 &= ~0x0100; + break; case 5: case 11: - phi_s0_7 = arg0 + 0xAC8; - phi_s1_7 = 0; - do { - func_8005DAD8(phi_s0_7, 6, 1, 0xA8); - func_80062484(arg0, phi_s0_7, phi_s1_7); - temp_s1_7 = phi_s1_7 + 1; - phi_s0_7 += 0x48; - phi_s1_7 = temp_s1_7; - } while (temp_s1_7 != 0xA); - arg0->unk44 = arg0->unk44 & 0xFEFF; - return; + for (var_s1 = 0; var_s1 < 10; var_s1++) { + func_8005DAD8(&player->unk_258[0x1E + var_s1], 6, 1, 0x00A8); + func_80062484(player, &player->unk_258[0x1E + var_s1], var_s1); + } + player->unk_044 &= ~0x0100; + break; case 1: case 4: case 6: - phi_s0_8 = arg0 + 0xAC8; - phi_s1_8 = 0; - do { - func_8005DAD8(phi_s0_8, 0, 0, 0xA8); - func_80062484(arg0, phi_s0_8, phi_s1_8); - temp_s1_8 = phi_s1_8 + 1; - phi_s0_8 += 0x48; - phi_s1_8 = temp_s1_8; - } while (temp_s1_8 != 0xA); - arg0->unk44 = arg0->unk44 & 0xFEFF; - return; + for (var_s1 = 0; var_s1 < 10; var_s1++) { + func_8005DAD8(&player->unk_258[0x1E + var_s1], 0, 0, 0x00A8); + func_80062484(player, &player->unk_258[0x1E + var_s1], var_s1); + } + player->unk_044 &= ~0x0100; + break; default: - phi_s0_9 = arg0 + 0xAC8; - phi_s1_9 = 0; - do { - func_8005DAD8(phi_s0_9, 0, 0, 0xA8); - func_80062484(arg0, phi_s0_9, phi_s1_9); - temp_s1_9 = phi_s1_9 + 1; - phi_s0_9 += 0x48; - phi_s1_9 = temp_s1_9; - } while (temp_s1_9 != 0xA); - phi_t6 = arg0->unk44 & 0xFEFF; - goto block_42; + for (var_s1 = 0; var_s1 < 10; var_s1++) { + func_8005DAD8(&player->unk_258[0x1E + var_s1], 0, 0, 0x00A8); + func_80062484(player, &player->unk_258[0x1E + var_s1], var_s1); + } + player->unk_044 &= ~0x0100; + break; } } #else @@ -5406,88 +4786,73 @@ void func_80062B18(f32 *arg0, f32 *arg1, f32 *arg2, f32 arg3, f32 arg4, f32 arg5 *arg2 = (coss(arg6) * arg5) + (((arg3 * temp_f20) * sp30) + ((arg4 * sp2C) * sp28)); } -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_80062B18(f32 *, f32 *, f32 *, ?, f32, f32, s32, s32); // extern -extern ? D_800E4898; -extern f64 D_800EE610; -extern f64 D_800EE618; -extern f64 D_800EE620; -extern f64 D_800EE628; -extern f64 D_800EE630; -extern f32 D_800EE638; -extern f32 D_800EE63C; -extern f64 D_800EE640; +#ifdef NEEDS_RODATA +// data_0DD0A0_2_0.s +// may be plain data? +extern f32 D_800E4898[8];// = { 4.5, 4.5, 4.5, 4.5, 4.5, 5.5, 4.5, 6.5 }; +// data_0DD0A0_3_0.s +extern f64 D_800EE610;// = 0.07; +extern f64 D_800EE618;// = 0.3; +extern f64 D_800EE620;// = 0.1; +extern f64 D_800EE628;// = 0.1; +extern f64 D_800EE630;// = 0.3; +extern f32 D_800EE638;// = 5000.0f; +extern f32 D_800EE63C;// = 6000.0f; +extern f64 D_800EE640;// = 0.06; -void func_80062C74(void *arg0, s16 arg1, ? arg2, ? arg3) { - ? sp48; + +void func_80062C74(Player *player, s16 arg1, s32 arg2, s32 arg3) { + f32 sp48[8] = { 4.5f, 4.5f, 4.5f, 4.5f, 4.5f, 5.5f, 4.5f, 6.5f }; + f32 var_f6; f32 sp40; f32 sp3C; f32 sp38; - void *sp30; - f64 temp_f2; - u16 temp_t7; - void *temp_v0; - f64 phi_f6; - f64 phi_f2; + s16 thing; - sp48.unk0 = D_800E4898.unk0; - sp48.unk4 = D_800E4898.unk4; - sp48.unk8 = D_800E4898.unk8; - temp_v0 = arg0 + (arg1 * 0x48); - sp48.unkC = D_800E4898.unkC; - sp48.unk10 = D_800E4898.unk10; - sp48.unk14 = D_800E4898.unk14; - sp48.unk18 = D_800E4898.unk18; - sp48.unk1C = D_800E4898.unk1C; - temp_v0->unk276 = temp_v0->unk276 + 1; - if (temp_v0->unk276 == 0xC) { - temp_v0->unk274 = 0; - temp_v0->unk276 = 0; - temp_v0->unk26A = 0; + player->unk_258[arg1].unk_01E += 1; + if (player->unk_258[arg1].unk_01E == 0x000C) { + player->unk_258[arg1].unk_01C = 0; + player->unk_258[arg1].unk_01E = 0; + player->unk_258[arg1].unk_012 = 0; } - temp_v0->unk270 = 2.0f; - if (temp_v0->unk298 == 0) { - temp_v0->unk264 = temp_v0->unk264 + D_800EE610; - temp_v0->unk27C = temp_v0->unk27C + D_800EE618; - if (temp_v0->unk276 >= 3) { - temp_v0->unk296 = temp_v0->unk296 - 3; + player->unk_258[arg1].unk_018 = 2.0f; + if (player->unk_258[arg1].unk_040 == 0) { + player->unk_258[arg1].unk_00C = player->unk_258[arg1].unk_00C + 0.07; + player->unk_258[arg1].unk_024 = player->unk_258[arg1].unk_024 + 0.3; + if (player->unk_258[arg1].unk_01E >= 3) { + player->unk_258[arg1].unk_03E -= 3; } - if (temp_v0->unk296 <= 0) { - temp_v0->unk296 = 0; + if (player->unk_258[arg1].unk_03E <= 0) { + player->unk_258[arg1].unk_03E = 0; } - phi_f2 = D_800EE620; } else { - temp_f2 = D_800EE628; - temp_v0->unk264 = temp_v0->unk264 + temp_f2; - temp_v0->unk27C = temp_v0->unk27C + D_800EE630; - phi_f2 = temp_f2; - if (temp_v0->unk276 >= 3) { - temp_v0->unk296 = temp_v0->unk296 - 2; + player->unk_258[arg1].unk_00C = player->unk_258[arg1].unk_00C + 0.1; + player->unk_258[arg1].unk_024 = player->unk_258[arg1].unk_024 + 0.3; + if (player->unk_258[arg1].unk_01E >= 3) { + player->unk_258[arg1].unk_03E -= 2; } - if (temp_v0->unk296 <= 0) { - temp_v0->unk296 = 0; + if (player->unk_258[arg1].unk_03E <= 0) { + player->unk_258[arg1].unk_03E = 0; } } - if (temp_v0->unk298 == 0) { - phi_f6 = -((arg0->unk98 / D_800EE638) + phi_f2); + thing = player->unk_258[arg1].unk_020 - (player->unk_0C0 / 2); + if (player->unk_258[arg1].unk_040 == 0) { + var_f6 = -((player->unk_098 / 5000.0f) + 0.1); } else { - phi_f6 = -((arg0->unk98 / D_800EE63C) + phi_f2); + var_f6 = -((player->unk_098 / 6000.0f) + 0.1); } - if (((arg0->unkBC & 0x2000) == 0x2000) && (temp_v0->unk276 >= 6)) { - temp_v0->unk264 = temp_v0->unk264 + D_800EE640; + if (((player->unk_0BC & 0x2000) == 0x2000) && (player->unk_258[arg1].unk_01E >= 6)) { + player->unk_258[arg1].unk_00C = player->unk_258[arg1].unk_00C + 0.06; } - temp_t7 = temp_v0->unk268 + 1; - temp_v0->unk268 = temp_t7; - if ((temp_t7 & 0xFFFF) >= 3) { - temp_v0->unk268 = 0; + player->unk_258[arg1].unk_010++; + if (player->unk_258[arg1].unk_010 >= 3) { + player->unk_258[arg1].unk_010 = 0; } - sp30 = temp_v0; - func_80062B18(&sp40, &sp38, &sp3C, 0, *(&sp48 + (arg0->unk254 * 4)), (temp_v0->unk276 * phi_f6) + -5.5, -(temp_v0->unk278 - (arg0->unkC0 / 2)), arg0->unk206 * -2); - temp_v0->unk258 = arg0->unk14 + sp40; - sp38 += arg0->unk18 - arg0->unk70; - temp_v0->unk260 = arg0->unk1C + sp3C; - temp_v0->unk25C = temp_v0->unk27C + sp38; + func_80062B18(&sp40, &sp38, &sp3C, 0.0f, sp48[player->characterId], (player->unk_258[arg1].unk_01E * var_f6) + -5.5, -thing, -player->unk_206 * 2); + player->unk_258[arg1].unk_000[0] = player->pos[0] + sp40; + sp38 = (player->pos[1] - player->boundingBoxSize) + sp38; + player->unk_258[arg1].unk_000[2] = player->pos[2] + sp3C; + player->unk_258[arg1].unk_000[1] = player->unk_258[arg1].unk_024 + sp38; } #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80062C74.s") @@ -5747,39 +5112,26 @@ void func_80063D58(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { } } -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_80062B18(f32 *, f32 *, f32 *, ?, f32, f32, s32, s32); // extern - -// Separated from asm in code_80057C60/func_80063D58.s -UNUSED void func_80063FBC(void *arg0, s16 arg1, ? arg2, ? arg3) { +void func_80063FBC(Player *player, s16 arg1, s32 arg2, s32 arg3) { f32 sp3C; f32 sp38; f32 sp34; - void *sp30; - void *temp_v0; - temp_v0 = arg0 + (arg1 * 0x48); - if (temp_v0->unk538 == 1) { - sp30 = temp_v0; - func_80062B18(&sp3C, &sp34, &sp38, 0x40400000, 0.0f, (f32) (-5.5 - (f64) ((f32) temp_v0->unk546 * (((arg0->unk94 / 18.0f) * 216.0f) / 15.0f))), -(s32) temp_v0->unk548, 0); + if (player->unk_258[10 + arg1].unk_010 == 1) { + func_80062B18(&sp3C, &sp34, &sp38, 3.0f, 0.0f, -5.5 - (player->unk_258[10 + arg1].unk_01E * (((player->unk_094 / 18.0f) * 216.0f) / 15.0f)), -player->unk_258[10 + arg1].unk_020, 0); } else { - sp30 = temp_v0; - func_80062B18(&sp3C, &sp34, &sp38, 0xC0400000, 0.0f, (f32) (-5.5 - (f64) ((f32) temp_v0->unk546 * (((arg0->unk94 / 18.0f) * 216.0f) / 15.0f))), -(s32) temp_v0->unk548, 0); + func_80062B18(&sp3C, &sp34, &sp38, -3.0f, 0.0f, -5.5 - (player->unk_258[10 + arg1].unk_01E * (((player->unk_094 / 18.0f) * 216.0f) / 15.0f)), -player->unk_258[10 + arg1].unk_020, 0); } - sp30->unk528 = (f32) (arg0->unk14 + sp3C); - sp30->unk530 = (f32) (arg0->unk1C + sp38); - sp30->unk546 = (s16) (sp30->unk546 + 1); - sp30->unk52C = (f32) ((arg0->unk18 - arg0->unk70) + sp34); - if (sp30->unk546 == 6) { - sp30->unk544 = 0; - sp30->unk546 = 0; - sp30->unk53A = 0; + player->unk_258[10 + arg1].unk_000[0] = player->pos[0] + sp3C; + player->unk_258[10 + arg1].unk_000[2] = player->pos[2] + sp38; + player->unk_258[10 + arg1].unk_000[1] = (player->pos[1] - player->boundingBoxSize) + sp34; + player->unk_258[10 + arg1].unk_01E++; + if (player->unk_258[10 + arg1].unk_01E == 6) { + player->unk_258[10 + arg1].unk_01C = 0; + player->unk_258[10 + arg1].unk_01E = 0; + player->unk_258[10 + arg1].unk_012 = 0; } } -#else -GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80063FBC.s") -#endif void func_80064184(Player* player, s16 arg1, s8 arg2, UNUSED s8 arg3) { f32 sp44; @@ -5827,52 +5179,40 @@ void func_800643A8(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { player->unk_258[10 + arg1].unk_00C += D_800EE6E8; player->unk_258[10 + arg1].unk_03E -= 8; - if ( player->unk_258[10 + arg1].unk_03E <= 0) { + if (player->unk_258[10 + arg1].unk_03E <= 0) { player->unk_258[10 + arg1].unk_03E = 0; } } -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -f32 sins(u16, s32); // extern -f32 coss(u16); // extern -extern f64 D_800EE6F0; -extern f64 D_800EE6F8; +#ifdef NEEDS_RODATA +// data_0DD0A0_3_0.s +extern f64 D_800EE6F0;// = -0.7; +extern f64 D_800EE6F8;// = 0.2; -void func_800644E8(void *arg0, s16 arg1, ? arg2, ? arg3) { - f32 sp34; - s32 sp2C; - void *sp24; - f64 sp18; - f32 temp_f4; - f64 temp_f2; - f64 temp_f6; - void *temp_v0; +void func_800644E8(Player *player, s16 arg1, s32 arg2, s32 arg3) { + f32 thing2; + s32 stackPadding0; + s32 thing; + s32 stackPadding1; - temp_v0 = arg0 + (arg1 * 0x48); - if (temp_v0->unkAE6 >= 9) { - temp_v0->unkAE6 = 9; + if (player->unk_258[30 + arg1].unk_01E >= 9) { + player->unk_258[30 + arg1].unk_01E = 9; } - temp_f4 = temp_v0->unkAEC; - sp34 = temp_f4; - sp2C = temp_v0->unkAE6; - sp24 = temp_v0; - temp_f2 = D_800EE6F0 * sp2C; - temp_v0->unkAD0 = (coss(temp_v0->unkAE8) * temp_f2) + arg0->unk1C; - sp18 = temp_f2; - temp_f6 = (sins(temp_v0->unkAE8, sp2C) * temp_f2) + arg0->unk14; - temp_v0->unkAE6 = temp_v0->unkAE6 + 1; - temp_v0->unkAC8 = temp_f6; - temp_v0->unkACC = temp_v0->unkAF0 + ((sp2C * temp_f4) - (D_800EE6F8 * (sp2C * sp2C))); - if (temp_v0->unkAE6 == 0xA) { - temp_v0->unkAE6 = 0; - temp_v0->unkAE4 = 0; - temp_v0->unkADA = 0; + thing2 = player->unk_258[30 + arg1].unk_024; + thing = player->unk_258[30 + arg1].unk_01E; + player->unk_258[30 + arg1].unk_000[2] = player->pos[2] + (coss(player->unk_258[30 + arg1].unk_020) * (-0.7 * thing)); + player->unk_258[30 + arg1].unk_000[0] = player->pos[0] + (sins(player->unk_258[30 + arg1].unk_020) * (-0.7 * thing)); + player->unk_258[30 + arg1].unk_01E++; + player->unk_258[30 + arg1].unk_000[1] = player->unk_258[30 + arg1].unk_028 + (f32) ((thing * thing2) - (0.2 * (thing * thing))); + if (player->unk_258[30 + arg1].unk_01E == 0x000A) { + player->unk_258[30 + arg1].unk_01E = 0; + player->unk_258[30 + arg1].unk_01C = 0; + player->unk_258[30 + arg1].unk_012 = 0; } - if (temp_v0->unkAE6 >= 7) { - temp_v0->unkB06 = temp_v0->unkB06 - 0x60; - if (temp_v0->unkB06 <= 0) { - temp_v0->unkB06 = 0; + if (player->unk_258[30 + arg1].unk_01E >= 7) { + player->unk_258[30 + arg1].unk_03E -= 0x60; + if (player->unk_258[30 + arg1].unk_03E <= 0) { + player->unk_258[30 + arg1].unk_03E = 0; } } } @@ -5880,46 +5220,32 @@ void func_800644E8(void *arg0, s16 arg1, ? arg2, ? arg3) { GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800644E8.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -f32 sins(u16); // extern -f32 coss(u16); // extern -extern f64 D_800EE700; -extern f64 D_800EE708; +#ifdef NEEDS_RODATA +// data_0DD0A0_3_0.s +extern f64 D_800EE6F0;// = -0.6; +extern f64 D_800EE6F8;// = 0.1; -void func_80064664(void *arg0, s16 arg1, ? arg2, ? arg3) { - f32 sp34; - s32 sp2C; - void *sp24; - f64 sp18; +void func_80064664(Player *player, s16 arg1, s32 arg2, s32 arg3) { f32 temp_f4; - f64 temp_f2; - f64 temp_f6; - s16 temp_v1; - void *temp_v0; + s32 stackPadding0; + s32 temp_v1; + s32 stackPadding1; - temp_v0 = arg0 + (arg1 * 0x48); - temp_f4 = temp_v0->unkAEC; - temp_v1 = temp_v0->unkAE6; - sp34 = temp_f4; - sp24 = temp_v0; - sp2C = temp_v1; - temp_f2 = D_800EE700 * temp_v1; - temp_v0->unkAD0 = (coss(temp_v0->unkAE8) * temp_f2) + arg0->unk1C; - sp18 = temp_f2; - temp_f6 = (sins(temp_v0->unkAE8) * temp_f2) + arg0->unk14; - temp_v0->unkAE6 = temp_v0->unkAE6 + 1; - temp_v0->unkAC8 = temp_f6; - temp_v0->unkACC = temp_v0->unkAF0 + ((temp_v1 * temp_f4) - (D_800EE708 * (temp_v1 * temp_v1))); - if (temp_v0->unkAE6 == 0x19) { - temp_v0->unkAE6 = 0; - temp_v0->unkAE4 = 0; - temp_v0->unkADA = 0; + temp_v1 = player->unk_258[30 + arg1].unk_01E; + temp_f4 = player->unk_258[30 + arg1].unk_024; + player->unk_258[30 + arg1].unk_000[2] = player->pos[2] + (coss(player->unk_258[30 + arg1].unk_020) * (-0.6 * temp_v1)); + player->unk_258[30 + arg1].unk_000[0] = player->pos[0] + (sins(player->unk_258[30 + arg1].unk_020) * (-0.6 * temp_v1)); + player->unk_258[30 + arg1].unk_01E++; + player->unk_258[30 + arg1].unk_000[1] = player->unk_258[30 + arg1].unk_028 + (f32) ((temp_v1 * temp_f4) - (0.1 * (temp_v1 * temp_v1))); + if (player->unk_258[30 + arg1].unk_01E == 0x0019) { + player->unk_258[30 + arg1].unk_01E = 0; + player->unk_258[30 + arg1].unk_01C = 0; + player->unk_258[30 + arg1].unk_012 = 0; } - if (temp_v0->unkAE6 >= 7) { - temp_v0->unkB06 = temp_v0->unkB06 - 6; - if (temp_v0->unkB06 <= 0) { - temp_v0->unkB06 = 0; + if (player->unk_258[30 + arg1].unk_01E >= 7) { + player->unk_258[30 + arg1].unk_03E -= 0x6; + if (player->unk_258[30 + arg1].unk_03E <= 0) { + player->unk_258[30 + arg1].unk_03E = 0; } } } @@ -6157,55 +5483,29 @@ void func_800651F4(Player* player, UNUSED s16 arg1, UNUSED s8 arg2, s8 arg3) { } } -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_80021E10(? *, s32, s32); // extern -void func_80021F84(? *, s32); // extern -void func_80022180(void *, ? *); // extern -extern s16 D_80164AF0; -extern void *gDisplayListHead; +void func_800652D4(Vec3f arg0, Vec3s arg1, f32 arg2) { + Mat4 sp20; -void func_800652D4(s32 arg0, s32 arg1, s32 arg2) { - ? sp20; - void *temp_v1; - - func_80021E10(&sp20, arg0, arg1); - func_80021F84(&sp20, arg2); - func_80022180(gGfxPool + (D_80164AF0 << 6) + 0xFAC0, &sp20); - temp_v1 = gDisplayListHead; - gDisplayListHead = temp_v1 + 8; - temp_v1->unk0 = 0x1020040; - temp_v1->unk4 = (gGfxPool + (D_80164AF0 << 6) + 0xFAC0) & 0x1FFFFFFF; + func_80021E10(sp20, arg0, arg1); + func_80021F84(sp20, arg2); + func_80022180(&gGfxPool->mtxPool[D_80164AF0 + 0x3EB], sp20); + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[D_80164AF0 + 0x3EB]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); } -#else -GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800652D4.s") -#endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004B72C(s16, s16, s16, s16, s32, s32, s32); // extern -void func_800652D4(f32 *, s16 *, f32, s8); // extern +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b extern ? D_06000224; -extern Gfx D_0D008DB8; -extern Gfx D_0D008E48; -extern s8 D_0D02BC58; -extern ? D_800E48B8; -extern ? D_800E48C0; -extern f64 D_800EE7C0; -extern s16 D_80164AF0; -extern s32 D_8018D930; -extern f32 gCourseTimer; -extern ? **gDisplayListHead; +extern ? D_8018D930; +static ? D_800E48B8; /* unable to generate initializer */ +static ? D_800E48C0; /* unable to generate initializer */ -void func_8006538C(void *arg0, s8 arg1, s16 arg2, s8 arg3) { +void func_8006538C(Player *player, s8 arg1, s16 arg2, s8 arg3) { f32 spBC; f32 spB8; f32 spB4; s16 spB0; s16 spAE; s16 spAC; - ? spA4; - ? sp9C; s16 sp9A; s16 sp98; s16 sp96; @@ -6213,273 +5513,216 @@ void func_8006538C(void *arg0, s8 arg1, s16 arg2, s8 arg3) { s16 sp92; s16 sp90; s16 sp8E; - ? **sp70; - ? **sp6C; - ? **sp48; - ? **sp44; + Gfx *sp70; + Gfx *sp6C; + Gfx *sp48; + Gfx *sp44; void *sp3C; - ? **temp_v0; - ? **temp_v0_10; - ? **temp_v0_12; - ? **temp_v0_13; - ? **temp_v0_14; - ? **temp_v0_15; - ? **temp_v0_16; - ? **temp_v0_17; - ? **temp_v0_18; - ? **temp_v0_19; - ? **temp_v0_20; - ? **temp_v0_2; - ? **temp_v0_3; - ? **temp_v0_4; - ? **temp_v0_5; - ? **temp_v0_6; - ? **temp_v0_7; - ? **temp_v0_8; - ? **temp_v0_9; + ? *var_s0; + Gfx *temp_v0; + Gfx *temp_v0_10; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_14; + Gfx *temp_v0_15; + Gfx *temp_v0_16; + Gfx *temp_v0_17; + Gfx *temp_v0_18; + Gfx *temp_v0_19; + Gfx *temp_v0_20; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; + s16 temp_a3; s32 temp_v0_11; s32 temp_v1; - s8 temp_t9; void *temp_t0; - ? *phi_s0; - ? **phi_v0; - spA4.unk0 = D_800E48B8.unk0; - spA4.unk4 = D_800E48B8.unk4; - sp9C.unk0 = D_800E48C0.unk0; - temp_t0 = arg0 + (arg2 * 0x48); - sp9C.unk4 = D_800E48C0.unk4; - if (temp_t0->unk274 == 1) { - spB4 = temp_t0->unk258; - spB8 = temp_t0->unk25C; + spA4[0].unk0 = D_800E48B8.unk0; + spA4[0].unk4 = (s32) D_800E48B8.unk4; + sp9C[0].unk0 = D_800E48C0.unk0; + temp_t0 = player + (arg2 * 0x48); + sp9C[0].unk4 = (s32) D_800E48C0.unk4; + if (player->unk_258[arg2].unk_01C == 1) { + spB4 = player->unk_258[arg2].unk_000[0]; + spB8 = player->unk_258[arg2].unk_000[1]; spAC = 0; - spBC = temp_t0->unk260; + spBC = player->unk_258[arg2].unk_000[2]; spB0 = 0; - spAE = (arg0 + (arg3 * 2))->unk48; - if (((arg0->unkBC & 0x200) != 0) && ((gCourseTimer - *(&D_8018D930 + (arg1 * 4))) < 9)) { + spAE = player->unk_048[arg3]; + if ((player->unk_0BC & 0x200) && (((s32) gCourseTimer - *(&D_8018D930 + (arg1 * 4))) < 9)) { sp9A = (spA8 >> 0x10) & 0xFF; sp98 = (spA8 >> 8) & 0xFF; sp96 = spA8 & 0xFF; sp92 = (spA0 >> 0x10) & 0xFF; sp90 = (spA0 >> 8) & 0xFF; sp8E = spA0 & 0xFF; - sp94 = temp_t0->unk296; + sp94 = player->unk_258[arg2].unk_03E; sp3C = temp_t0; - func_800652D4(&spB4, &spAC, (temp_t0->unk264 * arg0->unk224) * D_800EE7C0, arg3); + func_800652D4(&spB4, &spAC, (f32) ((f64) (player->unk_258[arg2].unk_00C * player->unk_224) * 1.4)); temp_v0 = gDisplayListHead; gDisplayListHead = temp_v0 + 8; - temp_v0->unk4 = &D_0D008DB8; - temp_v0->unk0 = &D_06000224; + var_s0 = &D_06000224; + temp_v0->words.w1 = (u32) D_0D008DB8; + temp_v0->words.w0 = (u32) &D_06000224; temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0xFD900000; - temp_v0_2->unk4 = (temp_t0->unk268 << 0xA) + &D_0D02BC58; + temp_v0_2->words.w0 = 0xFD900000; + temp_v0_2->words.w1 = (u32) ((sp3C->unk268 << 0xA) + D_0D02BC58); temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk0 = 0xF5900000; - temp_v0_3->unk4 = 0x7000000; + temp_v0_3->words.w0 = 0xF5900000; + temp_v0_3->words.w1 = 0x07000000; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk0 = 0xE6000000; - temp_v0_4->unk4 = 0; + temp_v0_4->words.w0 = 0xE6000000; + temp_v0_4->words.w1 = 0; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk0 = 0xF3000000; - temp_v0_5->unk4 = 0x71FF200; + temp_v0_5->words.w0 = 0xF3000000; + temp_v0_5->words.w1 = 0x071FF200; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk0 = 0xE7000000; - temp_v0_6->unk4 = 0; + temp_v0_6->words.w0 = 0xE7000000; + temp_v0_6->words.w1 = 0; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; sp70 = temp_v0_7; - temp_v0_7->unk0 = 0xF5880800; - temp_v0_7->unk4 = 0; + temp_v0_7->words.w0 = 0xF5880800; + temp_v0_7->words.w1 = 0; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; sp6C = temp_v0_8; - temp_v0_8->unk0 = 0xF2000000; - sp6C->unk4 = 0x7C07C; - func_8004B72C(sp9A, sp98, sp96, sp92, sp90, sp8E, sp94); + temp_v0_8->words.w0 = 0xF2000000; + sp6C->words.w1 = 0x0007C07C; + func_8004B72C((s32) sp9A, (s32) sp98, (s32) sp96, (s32) sp92, (s32) sp90, (s32) sp8E, (s32) sp94); temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; - temp_v0_9->unk4 = 3; - temp_v0_9->unk0 = 0xB9000002; + temp_v0_9->words.w1 = 3; + temp_v0_9->words.w0 = 0xB9000002; temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->unk4 = &D_0D008E48; - phi_s0 = &D_06000224; - phi_v0 = temp_v0_10; + temp_v0_10->words.w1 = (u32) D_0D008E48; } else { - temp_t9 = temp_t0->unk290 * 4; - temp_v0_11 = *(&spA4 + temp_t9); + temp_a3 = player->unk_258[arg2].unk_038; + temp_v0_11 = (&spA4[0])[temp_a3]; sp9A = (temp_v0_11 >> 0x10) & 0xFF; sp98 = (temp_v0_11 >> 8) & 0xFF; sp96 = temp_v0_11 & 0xFF; - temp_v1 = *(&sp9C + temp_t9); + temp_v1 = (&sp9C[0])[temp_a3]; sp92 = (temp_v1 >> 0x10) & 0xFF; sp90 = (temp_v1 >> 8) & 0xFF; sp8E = temp_v1 & 0xFF; - sp94 = temp_t0->unk296; + sp94 = player->unk_258[arg2].unk_03E; sp3C = temp_t0; - func_800652D4(&spB4, &spAC, temp_t0->unk264 * arg0->unk0, temp_t9); + func_800652D4(&spB4, &spAC, player->unk_258[arg2].unk_00C * player->unk0); temp_v0_12 = gDisplayListHead; gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk4 = &D_0D008DB8; - temp_v0_12->unk0 = 0x6000000; + var_s0 = (? *)0x06000000; + temp_v0_12->words.w1 = (u32) D_0D008DB8; + temp_v0_12->words.w0 = (u32) (? *)0x06000000; temp_v0_13 = gDisplayListHead; gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk0 = 0xFD900000; - temp_v0_13->unk4 = (temp_t0->unk268 << 0xA) + &D_0D02BC58; + temp_v0_13->words.w0 = 0xFD900000; + temp_v0_13->words.w1 = (u32) ((sp3C->unk268 << 0xA) + D_0D02BC58); temp_v0_14 = gDisplayListHead; gDisplayListHead = temp_v0_14 + 8; - temp_v0_14->unk0 = 0xF5900000; - temp_v0_14->unk4 = 0x7000000; + temp_v0_14->words.w0 = 0xF5900000; + temp_v0_14->words.w1 = 0x07000000; temp_v0_15 = gDisplayListHead; gDisplayListHead = temp_v0_15 + 8; - temp_v0_15->unk0 = 0xE6000000; - temp_v0_15->unk4 = 0; + temp_v0_15->words.w0 = 0xE6000000; + temp_v0_15->words.w1 = 0; temp_v0_16 = gDisplayListHead; gDisplayListHead = temp_v0_16 + 8; - temp_v0_16->unk0 = 0xF3000000; - temp_v0_16->unk4 = 0x71FF200; + temp_v0_16->words.w0 = 0xF3000000; + temp_v0_16->words.w1 = 0x071FF200; temp_v0_17 = gDisplayListHead; gDisplayListHead = temp_v0_17 + 8; - temp_v0_17->unk0 = 0xE7000000; - temp_v0_17->unk4 = 0; + temp_v0_17->words.w0 = 0xE7000000; + temp_v0_17->words.w1 = 0; temp_v0_18 = gDisplayListHead; gDisplayListHead = temp_v0_18 + 8; sp48 = temp_v0_18; - temp_v0_18->unk0 = 0xF5880800; - sp48->unk4 = 0; + temp_v0_18->words.w0 = 0xF5880800; + sp48->words.w1 = 0; temp_v0_19 = gDisplayListHead; gDisplayListHead = temp_v0_19 + 8; sp44 = temp_v0_19; - temp_v0_19->unk0 = 0xF2000000; - sp44->unk4 = 0x7C07C; - func_8004B72C(sp9A, sp98, sp96, sp92, sp90, sp8E, sp94); + temp_v0_19->words.w0 = 0xF2000000; + sp44->words.w1 = 0x0007C07C; + func_8004B72C((s32) sp9A, (s32) sp98, (s32) sp96, (s32) sp92, (s32) sp90, (s32) sp8E, (s32) sp94); temp_v0_20 = gDisplayListHead; gDisplayListHead = temp_v0_20 + 8; - temp_v0_20->unk4 = &D_0D008E48; - phi_s0 = 0x6000000; - phi_v0 = temp_v0_20; + temp_v0_20->words.w1 = (u32) D_0D008E48; } - *phi_v0 = phi_s0; - D_80164AF0 = D_80164AF0 + 1; + gDisplayListHead->words.w0 = var_s0; + D_80164AF0 += 1; } } #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006538C.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004B35C(s16, s16, s16, s16); // extern -void func_800652D4(f32 *, s16 *, f32, s8); // extern -extern Gfx D_0D008DB8; -extern Gfx D_0D008E48; -extern s16 D_80164AF0; -extern s32 D_8018D48C; -extern void *gDisplayListHead; +void func_800658A0(Player *player, s8 arg1, s16 arg2, s8 arg3) { + Vec3f sp54; + Vec3s sp4C; + s16 red; + s16 green; + s16 blue; + s16 alpha; -void func_800658A0(void *arg0, ? arg1, s16 arg2, s8 arg3) { - f32 sp5C; - f32 sp58; - f32 sp54; - s16 sp50; - s16 sp4E; - s16 sp4C; - s16 sp4A; - s16 sp48; - s16 sp46; - s16 sp44; - void *sp24; - f32 *temp_a0; - s16 *temp_a1; - void *temp_v0; - void *temp_v0_10; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; - - temp_v0 = arg0 + (arg2 * 0x48); - if (temp_v0->unk274 == 1) { - temp_a1 = &sp4C; - sp4A = temp_v0->unk290; - sp48 = temp_v0->unk292; - sp46 = temp_v0->unk294; - temp_a0 = &sp54; - sp44 = temp_v0->unk296; - sp54 = temp_v0->unk258; - sp58 = temp_v0->unk25C; - sp4C = 0; - sp5C = temp_v0->unk260; - sp50 = 0; - sp4E = (arg0 + (arg3 * 2))->unk48; - func_800652D4(temp_a0, temp_a1, temp_v0->unk264 * arg0->unk224, arg3); - temp_v0_2 = gDisplayListHead; - gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0x6000000; - temp_v0_2->unk4 = &D_0D008DB8; - temp_v0_3 = gDisplayListHead; - gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk0 = 0xFD700000; - temp_v0_3->unk4 = D_8018D48C; - temp_v0_4 = gDisplayListHead; - gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk4 = 0x7000000; - temp_v0_4->unk0 = 0xF5700000; - temp_v0_5 = gDisplayListHead; - gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0; - temp_v0_5->unk0 = 0xE6000000; - temp_v0_6 = gDisplayListHead; - gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0x71FF200; - temp_v0_6->unk0 = 0xF3000000; - temp_v0_7 = gDisplayListHead; - gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0; - temp_v0_7->unk0 = 0xE7000000; - temp_v0_8 = gDisplayListHead; - gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0; - temp_v0_8->unk0 = 0xF5680800; - temp_v0_9 = gDisplayListHead; - gDisplayListHead = temp_v0_9 + 8; - sp24 = temp_v0_9; - temp_v0_9->unk4 = 0x7C07C; - temp_v0_9->unk0 = 0xF2000000; - func_8004B35C(sp4A, sp48, sp46, sp44); - temp_v0_10 = gDisplayListHead; - gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->unk0 = 0x6000000; - temp_v0_10->unk4 = &D_0D008E48; - D_80164AF0 = D_80164AF0 + 1; + if (player->unk_258[arg2].unk_01C == 1) { + red = player->unk_258[arg2].unk_038; + green = player->unk_258[arg2].unk_03A; + blue = player->unk_258[arg2].unk_03C; + alpha = player->unk_258[arg2].unk_03E; + sp54[0] = player->unk_258[arg2].unk_000[0]; + sp54[1] = player->unk_258[arg2].unk_000[1]; + sp54[2] = player->unk_258[arg2].unk_000[2]; + sp4C[0] = 0; + sp4C[1] = player->unk_048[arg3]; + sp4C[2] = 0; + func_800652D4(sp54, sp4C, player->unk_258[arg2].unk_00C * player->unk_224); + gSPDisplayList(gDisplayListHead++, D_0D008DB8); + gDPLoadTextureBlock(gDisplayListHead++, D_8018D48C, G_IM_FMT_IA, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + func_8004B35C(red, green, blue, alpha); + gSPDisplayList(gDisplayListHead++, D_0D008E48); + D_80164AF0 += 1; } } -#else -GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800658A0.s") -#endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004B72C(s16, s16, s16, s16, s32, s32, s32); // extern -void func_800652D4(f32 *, s16 *, f32, s8); // extern -extern Gfx D_0D008DB8; -extern Gfx D_0D008DF8; -extern Gfx D_0D008E48; -extern ? D_800E4770; -extern ? D_800E48C8; -extern s16 D_80164AF0; -extern s32 *gDisplayListHead; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32, s8); /* extern */ +extern u32 D_8018D420; +extern u32 D_8018D424; +extern u32 D_8018D428; +extern u32 D_8018D42C; +extern u32 D_8018D430; +extern u32 D_8018D434; +static u32 *D_800E4770[0xC] = { + &D_8018D420, + &D_8018D424, + &D_8018D428, + &D_8018D428, + &D_8018D42C, + &D_8018D42C, + &D_8018D430, + &D_8018D430, + &D_8018D434, + &D_8018D434, + &D_8018D434, + &D_8018D434, +}; +static ? D_800E48C8; /* unable to generate initializer */ -void func_80065AB0(void *arg0, ? arg1, s16 arg2, s8 arg3) { +void func_80065AB0(Player *player, s32 arg1, s16 arg2, s8 arg3) { f32 spBC; f32 spB8; f32 spB4; @@ -6493,51 +5736,48 @@ void func_80065AB0(void *arg0, ? arg1, s16 arg2, s8 arg3) { s16 sp9E; s16 sp9C; s16 sp9A; - ? sp8C; - s32 *sp6C; - s32 *sp44; - f32 *temp_a0; - s16 *temp_a1; - s32 *temp_v0_10; - s32 *temp_v0_11; - s32 *temp_v0_12; - s32 *temp_v0_13; - s32 *temp_v0_14; - s32 *temp_v0_15; - s32 *temp_v0_16; - s32 *temp_v0_17; - s32 *temp_v0_18; - s32 *temp_v0_19; - s32 *temp_v0_20; - s32 *temp_v0_21; - s32 *temp_v0_2; - s32 *temp_v0_3; - s32 *temp_v0_4; - s32 *temp_v0_5; - s32 *temp_v0_6; - s32 *temp_v0_7; - s32 *temp_v0_8; - s32 *temp_v0_9; + RGBA16 sp8C[3] = { + {{0x00, 0xFF, 0xFF, 0xFF}}, + {{0x00, 0xFF, 0xFF, 0x00}}, + {{0x00, 0xFF, 0x96, 0x00}}, + }; + Gfx *sp6C; + Gfx *sp44; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_14; + Gfx *temp_v0_15; + Gfx *temp_v0_16; + Gfx *temp_v0_17; + Gfx *temp_v0_18; + Gfx *temp_v0_19; + Gfx *temp_v0_20; + Gfx *temp_v0_21; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; s32 temp_v0; + s32 var_s0; void *temp_v1; - s32 phi_s0; - sp8C.unk0 = D_800E48C8.unk0; - sp8C.unk4 = D_800E48C8.unk4; - sp8C.unk8 = D_800E48C8.unk8; - temp_v1 = arg0 + (arg2 * 0x48); + temp_v1 = player + (arg2 * 0x48); if (temp_v1->unk544 == 1) { - phi_s0 = 0; - if (arg0->unk204 >= 0x32) { - phi_s0 = 1; + var_s0 = 0; + if (player->unk_204 >= 0x32) { + var_s0 = 1; } - temp_a0 = &spB4; spA6 = temp_v1->unk560; spA4 = temp_v1->unk562; spA2 = temp_v1->unk564; spA0 = temp_v1->unk566; - temp_v0 = *(&sp8C + (temp_v1->unk568 * 4)); - temp_a1 = &spAC; + temp_v0 = (&sp8C[0])[temp_v1->unk568]; sp9E = (temp_v0 >> 0x10) & 0xFF; sp9C = (temp_v0 >> 8) & 0xFF; sp9A = temp_v0 & 0xFF; @@ -6546,96 +5786,22 @@ void func_80065AB0(void *arg0, ? arg1, s16 arg2, s8 arg3) { spAC = 0; spBC = temp_v1->unk530; spB0 = 0; - spAE = (arg0 + (arg3 * 2))->unk48; - func_800652D4(temp_a0, temp_a1, temp_v1->unk534 * arg0->unk224, arg3); - if (phi_s0 == 0) { - temp_v0_2 = gDisplayListHead; - gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0x6000000; - temp_v0_2->unk4 = &D_0D008DB8; - temp_v0_3 = gDisplayListHead; - gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk0 = 0xFD900000; - temp_v0_3->unk4 = **(&D_800E4770 + (phi_s0 * 4)); - temp_v0_4 = gDisplayListHead; - gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk0 = 0xF5900000; - temp_v0_4->unk4 = 0x7000000; - temp_v0_5 = gDisplayListHead; - gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk0 = 0xE6000000; - temp_v0_5->unk4 = 0; - temp_v0_6 = gDisplayListHead; - gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk0 = 0xF3000000; - temp_v0_6->unk4 = 0x707F400; - temp_v0_7 = gDisplayListHead; - gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk0 = 0xE7000000; - temp_v0_7->unk4 = 0; - temp_v0_8 = gDisplayListHead; - gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk0 = 0xF5880400; - temp_v0_8->unk4 = 0; - temp_v0_9 = gDisplayListHead; - gDisplayListHead = temp_v0_9 + 8; - sp6C = temp_v0_9; - temp_v0_9->unk0 = 0xF2000000; - sp6C->unk4 = 0x3C03C; - func_8004B72C(spA6, spA4, spA2, sp9E, sp9C, sp9A, spA0); - temp_v0_10 = gDisplayListHead; - gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->unk0 = 0xB900031D; - temp_v0_10->unk4 = 0x504A50; - temp_v0_11 = gDisplayListHead; - gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk0 = 0x6000000; - temp_v0_11->unk4 = &D_0D008DF8; + spAE = player->unk_048[arg3]; + func_800652D4(&spB4, &spAC, temp_v1->unk534 * player->unk_224, arg3); + if (var_s0 == 0) { + gSPDisplayList(gDisplayListHead++, D_0D008DB8); + gDPLoadTextureBlock(gDisplayListHead++, D_800E4770[var_s0], G_IM_FMT_I, G_IM_SIZ_8b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + func_8004B72C((s32) spA6, (s32) spA4, (s32) spA2, (s32) sp9E, (s32) sp9C, (s32) sp9A, (s32) spA0); + gDPSetRenderMode(gDisplayListHead++, G_RM_ZB_XLU_SURF, G_RM_ZB_XLU_SURF2); + gSPDisplayList(gDisplayListHead++, D_0D008DF8); } else { - temp_v0_12 = gDisplayListHead; - gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk0 = 0x6000000; - temp_v0_12->unk4 = &D_0D008DB8; - temp_v0_13 = gDisplayListHead; - gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk0 = 0xFD900000; - temp_v0_13->unk4 = **(&D_800E4770 + (phi_s0 * 4)); - temp_v0_14 = gDisplayListHead; - gDisplayListHead = temp_v0_14 + 8; - temp_v0_14->unk0 = 0xF5900000; - temp_v0_14->unk4 = 0x7000000; - temp_v0_15 = gDisplayListHead; - gDisplayListHead = temp_v0_15 + 8; - temp_v0_15->unk0 = 0xE6000000; - temp_v0_15->unk4 = 0; - temp_v0_16 = gDisplayListHead; - gDisplayListHead = temp_v0_16 + 8; - temp_v0_16->unk0 = 0xF3000000; - temp_v0_16->unk4 = 0x71FF200; - temp_v0_17 = gDisplayListHead; - gDisplayListHead = temp_v0_17 + 8; - temp_v0_17->unk0 = 0xE7000000; - temp_v0_17->unk4 = 0; - temp_v0_18 = gDisplayListHead; - gDisplayListHead = temp_v0_18 + 8; - temp_v0_18->unk0 = 0xF5880800; - temp_v0_18->unk4 = 0; - temp_v0_19 = gDisplayListHead; - gDisplayListHead = temp_v0_19 + 8; - sp44 = temp_v0_19; - temp_v0_19->unk0 = 0xF2000000; - sp44->unk4 = 0x7C07C; - func_8004B72C(spA6, spA4, spA2, sp9E, sp9C, sp9A, spA0); - temp_v0_20 = gDisplayListHead; - gDisplayListHead = temp_v0_20 + 8; - temp_v0_20->unk0 = 0xB900031D; - temp_v0_20->unk4 = 0x504A50; - temp_v0_21 = gDisplayListHead; - gDisplayListHead = temp_v0_21 + 8; - temp_v0_21->unk0 = 0x6000000; - temp_v0_21->unk4 = &D_0D008E48; + gSPDisplayList(gDisplayListHead++, D_0D008DB8); + gDPLoadTextureBlock(gDisplayListHead++, D_800E4770[var_s0], G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + func_8004B72C((s32) spA6, (s32) spA4, (s32) spA2, (s32) sp9E, (s32) sp9C, (s32) sp9A, (s32) spA0); + gDPSetRenderMode(gDisplayListHead++, G_RM_ZB_XLU_SURF, G_RM_ZB_XLU_SURF2); + gSPDisplayList(gDisplayListHead++, D_0D008E48); } - D_80164AF0 = D_80164AF0 + 1; + D_80164AF0 += 1; } } #else @@ -6643,24 +5809,42 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80065AB0.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004B35C(s16, s16, s16, ?); // extern -void func_8004B72C(s16, s16, s16, s16, s32, s32, s32); // extern -void func_800652D4(f32 *, s16 *, f32); // extern +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32); /* extern */ extern ? D_05FF8DB8; -extern Gfx D_0D008C90; -extern Gfx D_0D008DA0; -extern Gfx D_0D008DB8; -extern Gfx D_0D008E48; -extern ? D_800E47DC; -extern ? D_800E480C; -extern ? D_800E8C00; -extern s16 D_80164AF0; -extern s32 D_8018D494; -extern s32 D_8018D498; -extern void *gDisplayListHead; +extern u32 D_8018D494; +extern u32 D_8018D498; +static s32 D_800E47DC[0xC] = { + 0x00FBFFFB, + 0x00A06011, + 0x00E0C090, + 0x00D0B080, + 0x00907040, + 0x00C07010, + 0x00D0F0FF, + 0x00E09030, + 0x00C09030, + 0x00604020, + 0x00F0D0B0, + 0x00A08030, +}; +static s32 D_800E480C[0xC] = { + 0x00B0B0B0, + 0x00804011, + 0x00B08050, + 0x00A07040, + 0x00603011, + 0x00804010, + 0x007090A0, + 0x00A06030, + 0x00A07010, + 0x00301011, + 0x00B0A080, + 0x00806010, +}; +static ? D_800E8C00; /* unable to generate initializer */ -void func_80065F0C(void *arg0, ? arg1, s16 arg2, s8 arg3) { +void func_80065F0C(Player *player, s32 arg1, s16 arg2, s8 arg3) { f32 spE4; f32 spE0; f32 spDC; @@ -6672,203 +5856,201 @@ void func_80065F0C(void *arg0, ? arg1, s16 arg2, s8 arg3) { s16 spC8; s16 spC6; void *sp44; - s16 *temp_a1; + Gfx *temp_s0; + Gfx *temp_s0_10; + Gfx *temp_s0_11; + Gfx *temp_s0_12; + Gfx *temp_s0_13; + Gfx *temp_s0_14; + Gfx *temp_s0_15; + Gfx *temp_s0_16; + Gfx *temp_s0_17; + Gfx *temp_s0_18; + Gfx *temp_s0_19; + Gfx *temp_s0_20; + Gfx *temp_s0_21; + Gfx *temp_s0_22; + Gfx *temp_s0_23; + Gfx *temp_s0_24; + Gfx *temp_s0_25; + Gfx *temp_s0_26; + Gfx *temp_s0_27; + Gfx *temp_s0_28; + Gfx *temp_s0_29; + Gfx *temp_s0_2; + Gfx *temp_s0_30; + Gfx *temp_s0_31; + Gfx *temp_s0_3; + Gfx *temp_s0_4; + Gfx *temp_s0_5; + Gfx *temp_s0_6; + Gfx *temp_s0_7; + Gfx *temp_s0_8; + Gfx *temp_s0_9; s16 temp_a0; + s16 temp_a1; s16 temp_ra; s16 temp_s2; s16 temp_s3; s32 temp_a2; - s32 temp_t6; s32 temp_v1; - void *temp_s0; - void *temp_s0_10; - void *temp_s0_11; - void *temp_s0_12; - void *temp_s0_13; - void *temp_s0_14; - void *temp_s0_15; - void *temp_s0_16; - void *temp_s0_17; - void *temp_s0_18; - void *temp_s0_19; - void *temp_s0_20; - void *temp_s0_21; - void *temp_s0_22; - void *temp_s0_23; - void *temp_s0_24; - void *temp_s0_25; - void *temp_s0_26; - void *temp_s0_27; - void *temp_s0_28; - void *temp_s0_29; - void *temp_s0_2; - void *temp_s0_30; - void *temp_s0_31; - void *temp_s0_3; - void *temp_s0_4; - void *temp_s0_5; - void *temp_s0_6; - void *temp_s0_7; - void *temp_s0_8; - void *temp_s0_9; void *temp_v0; - temp_v0 = arg0 + (arg2 * 0x48); + temp_v0 = player + (arg2 * 0x48); if ((temp_v0->unk544 == 1) && (temp_v0->unk546 != 0)) { spDC = temp_v0->unk528; - temp_a1 = &spD4; spE0 = temp_v0->unk52C; spD4 = 0; spE4 = temp_v0->unk530; spD8 = 0; - spD6 = (arg0 + (arg3 * 2))->unk48; + spD6 = player->unk_048[arg3]; sp44 = temp_v0; - func_800652D4(&spDC, temp_a1, temp_v0->unk534 * arg0->unk224); - if (temp_v0->unk53C != 8) { - temp_a0 = temp_v0->unk562; - temp_t6 = temp_v0->unk560 * 4; - temp_v1 = *(&D_800E47DC + temp_t6); + func_800652D4(&spDC, &spD4, temp_v0->unk534 * player->unk_224); + if ((s32) sp44->unk53C != 8) { + temp_a1 = sp44->unk560; + temp_a0 = sp44->unk562; + temp_v1 = D_800E47DC[temp_a1]; temp_ra = ((temp_v1 >> 0x10) & 0xFF) - temp_a0; - temp_a2 = *(&D_800E480C + temp_t6); + temp_a2 = D_800E480C[temp_a1]; temp_s2 = ((temp_v1 >> 8) & 0xFF) - temp_a0; temp_s3 = (temp_v1 & 0xFF) - temp_a0; spCA = ((temp_a2 >> 0x10) & 0xFF) - temp_a0; spC8 = ((temp_a2 >> 8) & 0xFF) - temp_a0; spC6 = (temp_a2 & 0xFF) - temp_a0; - spCC = temp_v0->unk566; - if (temp_v0->unk568 == 0) { + spCC = sp44->unk566; + if (sp44->unk568 == 0) { temp_s0 = gDisplayListHead; gDisplayListHead = temp_s0 + 8; - temp_s0->unk4 = &D_0D008DB8; - temp_s0->unk0 = 0x6000000; + temp_s0->words.w1 = (u32) D_0D008DB8; + temp_s0->words.w0 = 0x06000000; temp_s0_2 = gDisplayListHead; gDisplayListHead = temp_s0_2 + 8; - temp_s0_2->unk0 = 0xFD900000; - temp_s0_2->unk4 = D_8018D494; + temp_s0_2->words.w0 = 0xFD900000; + temp_s0_2->words.w1 = D_8018D494; temp_s0_3 = gDisplayListHead; gDisplayListHead = temp_s0_3 + 8; - temp_s0_3->unk4 = 0x7000000; - temp_s0_3->unk0 = 0xF5900000; + temp_s0_3->words.w1 = 0x07000000; + temp_s0_3->words.w0 = 0xF5900000; temp_s0_4 = gDisplayListHead; gDisplayListHead = temp_s0_4 + 8; - temp_s0_4->unk4 = 0; - temp_s0_4->unk0 = 0xE6000000; + temp_s0_4->words.w1 = 0; + temp_s0_4->words.w0 = 0xE6000000; temp_s0_5 = gDisplayListHead; gDisplayListHead = temp_s0_5 + 8; - temp_s0_5->unk4 = 0x71FF200; - temp_s0_5->unk0 = 0xF3000000; + temp_s0_5->words.w1 = 0x071FF200; + temp_s0_5->words.w0 = 0xF3000000; temp_s0_6 = gDisplayListHead; gDisplayListHead = temp_s0_6 + 8; - temp_s0_6->unk4 = 0; - temp_s0_6->unk0 = 0xE7000000; + temp_s0_6->words.w1 = 0; + temp_s0_6->words.w0 = 0xE7000000; temp_s0_7 = gDisplayListHead; gDisplayListHead = temp_s0_7 + 8; - temp_s0_7->unk4 = 0; - temp_s0_7->unk0 = 0xF5880800; + temp_s0_7->words.w1 = 0; + temp_s0_7->words.w0 = 0xF5880800; temp_s0_8 = gDisplayListHead; gDisplayListHead = temp_s0_8 + 8; - temp_s0_8->unk4 = 0x7C07C; - temp_s0_8->unk0 = 0xF2000000; - func_8004B72C(temp_ra, temp_s2, temp_s3, spCA, spC8, spC6, spCC); + temp_s0_8->words.w1 = 0x0007C07C; + temp_s0_8->words.w0 = 0xF2000000; + func_8004B72C((s32) temp_ra, (s32) temp_s2, (s32) temp_s3, (s32) spCA, (s32) spC8, (s32) spC6, (s32) spCC); temp_s0_9 = gDisplayListHead; gDisplayListHead = temp_s0_9 + 8; - temp_s0_9->unk0 = &D_05FF8DB8; - temp_s0_9->unk4 = &D_0D008E48; + temp_s0_9->words.w0 = (u32) &D_05FF8DB8; + temp_s0_9->words.w1 = (u32) D_0D008E48; } else { temp_s0_10 = gDisplayListHead; gDisplayListHead = temp_s0_10 + 8; - temp_s0_10->unk4 = 0xD010000; - temp_s0_10->unk0 = 0x6000000; + temp_s0_10->words.w1 = 0x0D010000; + temp_s0_10->words.w0 = 0x06000000; temp_s0_11 = gDisplayListHead; gDisplayListHead = temp_s0_11 + 8; - temp_s0_11->unk0 = 0xFD900000; - temp_s0_11->unk4 = D_8018D494; + temp_s0_11->words.w0 = 0xFD900000; + temp_s0_11->words.w1 = D_8018D494; temp_s0_12 = gDisplayListHead; gDisplayListHead = temp_s0_12 + 8; - temp_s0_12->unk4 = 0x7000000; - temp_s0_12->unk0 = 0xF5900000; + temp_s0_12->words.w1 = 0x07000000; + temp_s0_12->words.w0 = 0xF5900000; temp_s0_13 = gDisplayListHead; gDisplayListHead = temp_s0_13 + 8; - temp_s0_13->unk4 = 0; - temp_s0_13->unk0 = 0xE6000000; + temp_s0_13->words.w1 = 0; + temp_s0_13->words.w0 = 0xE6000000; temp_s0_14 = gDisplayListHead; gDisplayListHead = temp_s0_14 + 8; - temp_s0_14->unk4 = 0x71FF200; - temp_s0_14->unk0 = 0xF3000000; + temp_s0_14->words.w1 = 0x071FF200; + temp_s0_14->words.w0 = 0xF3000000; temp_s0_15 = gDisplayListHead; gDisplayListHead = temp_s0_15 + 8; - temp_s0_15->unk4 = 0; - temp_s0_15->unk0 = 0xE7000000; + temp_s0_15->words.w1 = 0; + temp_s0_15->words.w0 = 0xE7000000; temp_s0_16 = gDisplayListHead; gDisplayListHead = temp_s0_16 + 8; - temp_s0_16->unk4 = 0; - temp_s0_16->unk0 = 0xF5880800; + temp_s0_16->words.w1 = 0; + temp_s0_16->words.w0 = 0xF5880800; temp_s0_17 = gDisplayListHead; gDisplayListHead = temp_s0_17 + 8; - temp_s0_17->unk4 = 0x7C07C; - temp_s0_17->unk0 = 0xF2000000; - func_8004B72C(temp_ra, temp_s2, temp_s3, spCA, spC8, spC6, spCC); + temp_s0_17->words.w1 = 0x0007C07C; + temp_s0_17->words.w0 = 0xF2000000; + func_8004B72C((s32) temp_ra, (s32) temp_s2, (s32) temp_s3, (s32) spCA, (s32) spC8, (s32) spC6, (s32) spCC); temp_s0_18 = gDisplayListHead; gDisplayListHead = temp_s0_18 + 8; - temp_s0_18->unk4 = 3; - temp_s0_18->unk0 = 0xB9000002; + temp_s0_18->words.w1 = 3; + temp_s0_18->words.w0 = 0xB9000002; temp_s0_19 = gDisplayListHead; gDisplayListHead = temp_s0_19 + 8; - temp_s0_19->unk0 = 0x6000000; - temp_s0_19->unk4 = &D_0D008E48; + temp_s0_19->words.w0 = 0x06000000; + temp_s0_19->words.w1 = (u32) D_0D008E48; } } else { temp_s0_20 = gDisplayListHead; gDisplayListHead = temp_s0_20 + 8; - temp_s0_20->unk4 = &D_0D008C90; - temp_s0_20->unk0 = 0x6000000; + temp_s0_20->words.w1 = (u32) D_0D008C90; + temp_s0_20->words.w0 = 0x06000000; temp_s0_21 = gDisplayListHead; gDisplayListHead = temp_s0_21 + 8; - temp_s0_21->unk4 = 0; - temp_s0_21->unk0 = 0xBA000E02; + temp_s0_21->words.w1 = 0; + temp_s0_21->words.w0 = 0xBA000E02; temp_s0_22 = gDisplayListHead; gDisplayListHead = temp_s0_22 + 8; - temp_s0_22->unk0 = 0xFD100000; - temp_s0_22->unk4 = D_8018D498; + temp_s0_22->words.w0 = 0xFD100000; + temp_s0_22->words.w1 = D_8018D498; temp_s0_23 = gDisplayListHead; gDisplayListHead = temp_s0_23 + 8; - temp_s0_23->unk4 = 0x7080200; - temp_s0_23->unk0 = 0xF5100000; + temp_s0_23->words.w1 = 0x07080200; + temp_s0_23->words.w0 = 0xF5100000; temp_s0_24 = gDisplayListHead; gDisplayListHead = temp_s0_24 + 8; - temp_s0_24->unk4 = 0; - temp_s0_24->unk0 = 0xE6000000; + temp_s0_24->words.w1 = 0; + temp_s0_24->words.w0 = 0xE6000000; temp_s0_25 = gDisplayListHead; gDisplayListHead = temp_s0_25 + 8; - temp_s0_25->unk4 = 0x77FF100; - temp_s0_25->unk0 = 0xF3000000; + temp_s0_25->words.w1 = 0x077FF100; + temp_s0_25->words.w0 = 0xF3000000; temp_s0_26 = gDisplayListHead; gDisplayListHead = temp_s0_26 + 8; - temp_s0_26->unk4 = 0; - temp_s0_26->unk0 = 0xE7000000; + temp_s0_26->words.w1 = 0; + temp_s0_26->words.w0 = 0xE7000000; temp_s0_27 = gDisplayListHead; gDisplayListHead = temp_s0_27 + 8; - temp_s0_27->unk0 = 0xF5101000; - temp_s0_27->unk4 = 0x80200; + temp_s0_27->words.w0 = 0xF5101000; + temp_s0_27->words.w1 = 0x00080200; temp_s0_28 = gDisplayListHead; gDisplayListHead = temp_s0_28 + 8; - temp_s0_28->unk0 = 0xF2000000; - temp_s0_28->unk4 = 0x7C0FC; - func_8004B35C(temp_v0->unk560, temp_v0->unk562, temp_v0->unk564, 0xFF); + temp_s0_28->words.w0 = 0xF2000000; + temp_s0_28->words.w1 = 0x0007C0FC; + func_8004B35C((s32) sp44->unk560, (s32) sp44->unk562, (s32) sp44->unk564, 0x000000FF); temp_s0_29 = gDisplayListHead; gDisplayListHead = temp_s0_29 + 8; - temp_s0_29->unk0 = 0xB900031D; - temp_s0_29->unk4 = 0x553078; + temp_s0_29->words.w0 = 0xB900031D; + temp_s0_29->words.w1 = 0x00553078; temp_s0_30 = gDisplayListHead; gDisplayListHead = temp_s0_30 + 8; - temp_s0_30->unk4 = &D_800E8C00; - temp_s0_30->unk0 = 0x400103F; + temp_s0_30->words.w1 = (u32) &D_800E8C00; + temp_s0_30->words.w0 = 0x0400103F; temp_s0_31 = gDisplayListHead; gDisplayListHead = temp_s0_31 + 8; - temp_s0_31->unk0 = 0x6000000; - temp_s0_31->unk4 = &D_0D008DA0; + temp_s0_31->words.w0 = 0x06000000; + temp_s0_31->words.w1 = (u32) D_0D008DA0; } - D_80164AF0 = D_80164AF0 + 1; + D_80164AF0 += 1; } } #else @@ -6876,16 +6058,11 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80065F0C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004B35C(s16, s16, s16, s16); // extern -void func_800652D4(f32 *, s16 *, f32, s8); // extern -extern Gfx D_0D008DB8; -extern Gfx D_0D008E48; -extern s16 D_80164AF0; -extern s32 D_8018D48C; -extern void *gDisplayListHead; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32, s8); /* extern */ +extern u32 D_8018D48C; -void func_800664E0(void *arg0, ? arg1, s16 arg2, s8 arg3) { +void func_800664E0(Player *player, s32 arg1, s16 arg2, s8 arg3) { f32 sp5C; f32 sp58; f32 sp54; @@ -6896,81 +6073,77 @@ void func_800664E0(void *arg0, ? arg1, s16 arg2, s8 arg3) { s16 sp48; s16 sp46; s16 sp44; - void *sp24; - void *sp20; - f32 *temp_a0; - s16 *temp_a1; + Gfx *sp24; + Gfx *sp20; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; void *temp_v0; - void *temp_v0_10; - void *temp_v0_11; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; - temp_v0 = arg0 + (arg2 * 0x48); + temp_v0 = player + (arg2 * 0x48); if (temp_v0->unk544 == 1) { - temp_a1 = &sp4C; sp4A = temp_v0->unk560; sp48 = temp_v0->unk562; sp46 = temp_v0->unk564; - temp_a0 = &sp54; sp44 = temp_v0->unk566; sp54 = temp_v0->unk528; sp58 = temp_v0->unk52C; sp4C = 0; sp5C = temp_v0->unk530; sp50 = 0; - sp4E = (arg0 + (arg3 * 2))->unk48; - func_800652D4(temp_a0, temp_a1, temp_v0->unk534 * arg0->unk224, arg3); + sp4E = player->unk_048[arg3]; + func_800652D4(&sp54, &sp4C, temp_v0->unk534 * player->unk_224, arg3); temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0x6000000; - temp_v0_2->unk4 = &D_0D008DB8; + temp_v0_2->words.w0 = 0x06000000; + temp_v0_2->words.w1 = (u32) D_0D008DB8; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk4 = 3; - temp_v0_3->unk0 = 0xB9000002; + temp_v0_3->words.w1 = 3; + temp_v0_3->words.w0 = 0xB9000002; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk0 = 0xFD700000; - temp_v0_4->unk4 = D_8018D48C; + temp_v0_4->words.w0 = 0xFD700000; + temp_v0_4->words.w1 = D_8018D48C; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0x7000000; - temp_v0_5->unk0 = 0xF5700000; + temp_v0_5->words.w1 = 0x07000000; + temp_v0_5->words.w0 = 0xF5700000; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0; - temp_v0_6->unk0 = 0xE6000000; + temp_v0_6->words.w1 = 0; + temp_v0_6->words.w0 = 0xE6000000; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0x71FF200; - temp_v0_7->unk0 = 0xF3000000; + temp_v0_7->words.w1 = 0x071FF200; + temp_v0_7->words.w0 = 0xF3000000; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0; - temp_v0_8->unk0 = 0xE7000000; + temp_v0_8->words.w1 = 0; + temp_v0_8->words.w0 = 0xE7000000; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; sp24 = temp_v0_9; - temp_v0_9->unk4 = 0; - temp_v0_9->unk0 = 0xF5680800; + temp_v0_9->words.w1 = 0; + temp_v0_9->words.w0 = 0xF5680800; temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; sp20 = temp_v0_10; - temp_v0_10->unk4 = 0x7C07C; - temp_v0_10->unk0 = 0xF2000000; - func_8004B35C(sp4A, sp48, sp46, sp44); + temp_v0_10->words.w1 = 0x0007C07C; + temp_v0_10->words.w0 = 0xF2000000; + func_8004B35C((s32) sp4A, (s32) sp48, (s32) sp46, (s32) sp44); temp_v0_11 = gDisplayListHead; gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk0 = 0x6000000; - temp_v0_11->unk4 = &D_0D008E48; - D_80164AF0 = D_80164AF0 + 1; + temp_v0_11->words.w0 = 0x06000000; + temp_v0_11->words.w1 = (u32) D_0D008E48; + D_80164AF0 += 1; } } #else @@ -6978,7 +6151,11 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800664E0.s") #endif #ifdef MIPS_TO_C -UNUSED void func_80066714(void *arg0, ? arg1, s16 arg2, s8 arg3) { +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32, s8); /* extern */ +static ? D_800E8B00; /* unable to generate initializer */ + +void func_80066714(Player *player, s32 arg1, s16 arg2, s8 arg3) { f32 sp64; f32 sp60; f32 sp5C; @@ -6989,23 +6166,23 @@ UNUSED void func_80066714(void *arg0, ? arg1, s16 arg2, s8 arg3) { s16 sp50; s16 sp4E; s16 sp4C; - void *sp2C; - void *sp28; + Gfx *sp2C; + Gfx *sp28; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; void *temp_v0; - void *temp_v0_10; - void *temp_v0_11; - void *temp_v0_12; - void *temp_v0_13; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; - temp_v0 = arg0 + (arg2 * 0x48); + temp_v0 = player + (arg2 * 0x48); if (temp_v0->unk544 == 1) { sp52 = temp_v0->unk560; sp50 = temp_v0->unk562; @@ -7016,59 +6193,59 @@ UNUSED void func_80066714(void *arg0, ? arg1, s16 arg2, s8 arg3) { sp54 = 0; sp64 = temp_v0->unk530; sp58 = 0; - sp56 = (arg0 + (arg3 * 2))->unk48; - func_800652D4(&sp5C, &sp54, temp_v0->unk534 * arg0->unk224, arg3); + sp56 = player->unk_048[arg3]; + func_800652D4(&sp5C, &sp54, temp_v0->unk534 * player->unk_224, arg3); temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0x06000000; - temp_v0_2->unk4 = &D_0D008C90; + temp_v0_2->words.w0 = 0x06000000; + temp_v0_2->words.w1 = (u32) D_0D008C90; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk4 = 0; - temp_v0_3->unk0 = 0xBA000E02; + temp_v0_3->words.w1 = 0; + temp_v0_3->words.w0 = 0xBA000E02; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk0 = 0xFD100000; - temp_v0_4->unk4 = &D_0D000200; + temp_v0_4->words.w0 = 0xFD100000; + temp_v0_4->words.w1 = (u32) D_0D000200; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk0 = 0xF5100000; - temp_v0_5->unk4 = 0x07080200; + temp_v0_5->words.w0 = 0xF5100000; + temp_v0_5->words.w1 = 0x07080200; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0; - temp_v0_6->unk0 = 0xE6000000; + temp_v0_6->words.w1 = 0; + temp_v0_6->words.w0 = 0xE6000000; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0x077FF100; - temp_v0_7->unk0 = 0xF3000000; + temp_v0_7->words.w1 = 0x077FF100; + temp_v0_7->words.w0 = 0xF3000000; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0; - temp_v0_8->unk0 = 0xE7000000; + temp_v0_8->words.w1 = 0; + temp_v0_8->words.w0 = 0xE7000000; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; sp2C = temp_v0_9; - temp_v0_9->unk0 = 0xF5101000; - temp_v0_9->unk4 = 0x80200; + temp_v0_9->words.w0 = 0xF5101000; + temp_v0_9->words.w1 = 0x00080200; temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; sp28 = temp_v0_10; - temp_v0_10->unk0 = 0xF2000000; - temp_v0_10->unk4 = 0x7C0FC; - func_8004B35C(sp52, sp50, sp4E, sp4C); + temp_v0_10->words.w0 = 0xF2000000; + temp_v0_10->words.w1 = 0x0007C0FC; + func_8004B35C((s32) sp52, (s32) sp50, (s32) sp4E, (s32) sp4C); temp_v0_11 = gDisplayListHead; gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk0 = 0xB900031D; - temp_v0_11->unk4 = 0x504A50; + temp_v0_11->words.w0 = 0xB900031D; + temp_v0_11->words.w1 = 0x00504A50; temp_v0_12 = gDisplayListHead; gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk4 = &D_800E8B00; - temp_v0_12->unk0 = 0x0400103F; + temp_v0_12->words.w1 = (u32) &D_800E8B00; + temp_v0_12->words.w0 = 0x0400103F; temp_v0_13 = gDisplayListHead; gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk0 = 0x06000000; - temp_v0_13->unk4 = &D_0D008DA0; + temp_v0_13->words.w0 = 0x06000000; + temp_v0_13->words.w1 = (u32) D_0D008DA0; D_80164AF0 += 1; } } @@ -7077,16 +6254,11 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80066714.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004B35C(s16, s16, s16, s16); // extern -void func_800652D4(f32 *, s16 *, f32, s8); // extern -extern Gfx D_0D008DB8; -extern Gfx D_0D008E48; -extern s16 D_80164AF0; -extern s32 D_8018D48C; -extern void *gDisplayListHead; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32, s8); /* extern */ +extern u32 D_8018D48C; -void func_80066998(void *arg0, ? arg1, s16 arg2, s8 arg3) { +void func_80066998(Player *player, s8 arg1, s16 arg2, s8 arg3) { f32 sp5C; f32 sp58; f32 sp54; @@ -7097,74 +6269,68 @@ void func_80066998(void *arg0, ? arg1, s16 arg2, s8 arg3) { s16 sp48; s16 sp46; s16 sp44; - void *sp24; - f32 *temp_a0; - s16 *temp_a1; - void *temp_v0; - void *temp_v0_10; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; + Gfx *sp24; + Gfx *temp_v0; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; - temp_v0 = arg0 + (arg2 * 0x48); - if (temp_v0->unk274 == 1) { - temp_a1 = &sp4C; - sp4A = temp_v0->unk290; - sp48 = temp_v0->unk292; - sp46 = temp_v0->unk294; - sp44 = temp_v0->unk296; - temp_a0 = &sp54; - sp54 = temp_v0->unk258; - sp58 = temp_v0->unk25C; + if (player->unk_258[arg2].unk_01C == 1) { + sp4A = player->unk_258[arg2].unk_038; + sp48 = player->unk_258[arg2].unk_03A; + sp46 = player->unk_258[arg2].unk_03C; + sp44 = player->unk_258[arg2].unk_03E; + sp54 = player->unk_258[arg2].unk_000[0]; + sp58 = player->unk_258[arg2].unk_000[1]; sp4C = 0x4000; - sp5C = temp_v0->unk260; + sp5C = player->unk_258[arg2].unk_000[2]; sp50 = 0; - sp4E = (arg0 + (arg3 * 2))->unk48; - func_800652D4(temp_a0, temp_a1, temp_v0->unk264 * arg0->unk224, arg3); + sp4E = player->unk_048[arg3]; + func_800652D4(&sp54, &sp4C, player->unk_258[arg2].unk_00C * player->unk_224, arg3); + temp_v0 = gDisplayListHead; + gDisplayListHead = temp_v0 + 8; + temp_v0->words.w0 = 0x06000000; + temp_v0->words.w1 = (u32) D_0D008DB8; temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0x6000000; - temp_v0_2->unk4 = &D_0D008DB8; + temp_v0_2->words.w0 = 0xFD700000; + temp_v0_2->words.w1 = D_8018D48C; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk0 = 0xFD700000; - temp_v0_3->unk4 = D_8018D48C; + temp_v0_3->words.w1 = 0x07000000; + temp_v0_3->words.w0 = 0xF5700000; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk4 = 0x7000000; - temp_v0_4->unk0 = 0xF5700000; + temp_v0_4->words.w1 = 0; + temp_v0_4->words.w0 = 0xE6000000; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0; - temp_v0_5->unk0 = 0xE6000000; + temp_v0_5->words.w1 = 0x071FF200; + temp_v0_5->words.w0 = 0xF3000000; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0x71FF200; - temp_v0_6->unk0 = 0xF3000000; + temp_v0_6->words.w1 = 0; + temp_v0_6->words.w0 = 0xE7000000; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0; - temp_v0_7->unk0 = 0xE7000000; + temp_v0_7->words.w1 = 0; + temp_v0_7->words.w0 = 0xF5680800; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0; - temp_v0_8->unk0 = 0xF5680800; + sp24 = temp_v0_8; + temp_v0_8->words.w1 = 0x0007C07C; + temp_v0_8->words.w0 = 0xF2000000; + func_8004B35C((s32) sp4A, (s32) sp48, (s32) sp46, (s32) sp44); temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; - sp24 = temp_v0_9; - temp_v0_9->unk4 = 0x7C07C; - temp_v0_9->unk0 = 0xF2000000; - func_8004B35C(sp4A, sp48, sp46, sp44); - temp_v0_10 = gDisplayListHead; - gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->unk0 = 0x6000000; - temp_v0_10->unk4 = &D_0D008E48; - D_80164AF0 = D_80164AF0 + 1; + temp_v0_9->words.w0 = 0x06000000; + temp_v0_9->words.w1 = (u32) D_0D008E48; + D_80164AF0 += 1; } } #else @@ -7172,21 +6338,13 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80066998.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_800652D4(f32 *, s16 *, f32); // extern -f32 sins(u16); // extern -f32 coss(u16); // extern -extern Gfx D_0D008C78; -extern Gfx D_0D008DA0; -extern Gfx D_0D008DB8; -extern ? D_800E8900; -extern u16 D_80164714; -extern s16 D_80164AF0; -extern s32 D_8018D4C4; -extern s32 D_8018D4C8; -extern s32 *gDisplayListHead; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32); /* extern */ +extern u32 D_8018D4C4; +extern u32 D_8018D4C8; +static struct _struct_D_800E8900_0x10 D_800E8900[0]; /* unable to generate initializer */ -void func_80066BAC(void *arg0, ? arg1, s16 arg2, s8 arg3) { +void func_80066BAC(Player *player, s32 arg1, s16 arg2, s8 arg3) { f32 spE4; f32 spE0; f32 spDC; @@ -7195,246 +6353,241 @@ void func_80066BAC(void *arg0, ? arg1, s16 arg2, s8 arg3) { s16 spD4; void *sp24; void *sp20; - s32 *temp_v0_10; - s32 *temp_v0_11; - s32 *temp_v0_12; - s32 *temp_v0_13; - s32 *temp_v0_14; - s32 *temp_v0_15; - s32 *temp_v0_16; - s32 *temp_v0_17; - s32 *temp_v0_18; - s32 *temp_v0_19; - s32 *temp_v0_20; - s32 *temp_v0_21; - s32 *temp_v0_22; - s32 *temp_v0_23; - s32 *temp_v0_24; - s32 *temp_v0_25; - s32 *temp_v0_26; - s32 *temp_v0_27; - s32 *temp_v0_28; - s32 *temp_v0_29; - s32 *temp_v0_2; - s32 *temp_v0_30; - s32 *temp_v0_31; - s32 *temp_v0_32; - s32 *temp_v0_33; - s32 *temp_v0_34; - s32 *temp_v0_35; - s32 *temp_v0_36; - s32 *temp_v0_37; - s32 *temp_v0_38; - s32 *temp_v0_39; - s32 *temp_v0_3; - s32 *temp_v0_40; - s32 *temp_v0_41; - s32 *temp_v0_42; - s32 *temp_v0_43; - s32 *temp_v0_4; - s32 *temp_v0_5; - s32 *temp_v0_6; - s32 *temp_v0_7; - s32 *temp_v0_8; - s32 *temp_v0_9; + Gfx *temp_v0; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_14; + Gfx *temp_v0_15; + Gfx *temp_v0_16; + Gfx *temp_v0_17; + Gfx *temp_v0_18; + Gfx *temp_v0_19; + Gfx *temp_v0_20; + Gfx *temp_v0_21; + Gfx *temp_v0_22; + Gfx *temp_v0_23; + Gfx *temp_v0_24; + Gfx *temp_v0_25; + Gfx *temp_v0_26; + Gfx *temp_v0_27; + Gfx *temp_v0_28; + Gfx *temp_v0_29; + Gfx *temp_v0_2; + Gfx *temp_v0_30; + Gfx *temp_v0_31; + Gfx *temp_v0_32; + Gfx *temp_v0_33; + Gfx *temp_v0_34; + Gfx *temp_v0_35; + Gfx *temp_v0_36; + Gfx *temp_v0_37; + Gfx *temp_v0_38; + Gfx *temp_v0_39; + Gfx *temp_v0_3; + Gfx *temp_v0_40; + Gfx *temp_v0_41; + Gfx *temp_v0_42; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; void *temp_ra; - void *temp_v0; - s32 *phi_v0; - temp_ra = arg0 + (arg2 * 0x48); - if ((temp_ra->unk274 == 1) && (temp_ra->unk290 != 0xFF)) { - if (arg0->unk124 >= 300.0f) { - spE0 = arg0->unk18 + 5.0f; + temp_ra = player + (arg2 * 0x48); + if ((player->unk_258[arg2].unk_01C == 1) && (player->unk_258[arg2].unk_038 != 0x00FF)) { + if (player->unk_110.unk3C[2] >= 300.0f) { + spE0 = player->pos[1] + 5.0f; } else { - spE0 = arg0->unk18 - 3.0f; + spE0 = player->pos[1] - 3.0f; } - temp_v0 = arg0 + (arg3 * 2); sp24 = temp_ra; - sp20 = temp_v0; - spE4 = (coss(temp_v0->unk48) * -10.0f) + arg0->unk1C; - spDC = (sins(sp20->unk48) * -10.0f) + arg0->unk14; - if (arg0->unk124 >= 300.0f) { - spD4 = *(&D_80164714 + (arg3 * 0xB8)) - 0x4000; + sp20 = player + (arg3 * 2); + spE4 = (coss((u16) player->unk_048[arg3]) * -10.0f) + player->pos[2]; + spDC = (sins(sp20->unk48) * -10.0f) + player->pos[0]; + if (player->unk_110.unk3C[2] >= 300.0f) { + spD4 = *(cameras->rot + (arg3 * 0xB8)) - 0x4000; } else { spD4 = 0; } spD8 = 0; - spD6 = sp20->unk48; + spD6 = (s16) sp20->unk48; sp24 = temp_ra; - func_800652D4(&spDC, &spD4, temp_ra->unk264 * arg0->unk224); - if (temp_ra->unk290 == 0) { + func_800652D4(&spDC, &spD4, player->unk_258[arg2].unk_00C * player->unk_224); + if (sp24->unk290 == 0) { + temp_v0 = gDisplayListHead; + gDisplayListHead = temp_v0 + 8; + temp_v0->words.w1 = (u32) D_0D008DB8; + temp_v0->words.w0 = 0x06000000; temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk4 = &D_0D008DB8; - temp_v0_2->unk0 = 0x6000000; + temp_v0_2->words.w1 = -0x00000C07U; + temp_v0_2->words.w0 = 0xFC127E24; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk4 = -0xC07; - temp_v0_3->unk0 = 0xFC127E24; + temp_v0_3->words.w1 = 0x00504B50; + temp_v0_3->words.w0 = 0xB900031D; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk4 = 0x504B50; - temp_v0_4->unk0 = 0xB900031D; + temp_v0_4->words.w0 = 0xFD700000; + temp_v0_4->words.w1 = D_8018D4C4; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk0 = 0xFD700000; - temp_v0_5->unk4 = D_8018D4C4; + temp_v0_5->words.w1 = 0x07000000; + temp_v0_5->words.w0 = 0xF5700000; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0x7000000; - temp_v0_6->unk0 = 0xF5700000; + temp_v0_6->words.w1 = 0; + temp_v0_6->words.w0 = 0xE6000000; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0; - temp_v0_7->unk0 = 0xE6000000; + temp_v0_7->words.w1 = 0x073FF200; + temp_v0_7->words.w0 = 0xF3000000; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0x73FF200; - temp_v0_8->unk0 = 0xF3000000; + temp_v0_8->words.w1 = 0; + temp_v0_8->words.w0 = 0xE7000000; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; - temp_v0_9->unk4 = 0; - temp_v0_9->unk0 = 0xE7000000; + temp_v0_9->words.w1 = 0; + temp_v0_9->words.w0 = 0xF5680800; temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->unk4 = 0; - temp_v0_10->unk0 = 0xF5680800; + temp_v0_10->words.w1 = 0x0007C0FC; + temp_v0_10->words.w0 = 0xF2000000; temp_v0_11 = gDisplayListHead; gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk4 = 0x7C0FC; - temp_v0_11->unk0 = 0xF2000000; + temp_v0_11->words.w0 = 0x0400103F; + temp_v0_11->words.w1 = (u32) &D_800E8900[sp24->unk290]; temp_v0_12 = gDisplayListHead; gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk0 = 0x400103F; - temp_v0_12->unk4 = (temp_ra->unk290 * 0x10) + &D_800E8900; + temp_v0_12->words.w1 = (u32) D_0D008C78; + temp_v0_12->words.w0 = 0x06000000; temp_v0_13 = gDisplayListHead; gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk4 = &D_0D008C78; - temp_v0_13->unk0 = 0x6000000; + temp_v0_13->words.w0 = 0xFD700000; + temp_v0_13->words.w1 = D_8018D4C8; temp_v0_14 = gDisplayListHead; gDisplayListHead = temp_v0_14 + 8; - temp_v0_14->unk0 = 0xFD700000; - temp_v0_14->unk4 = D_8018D4C8; + temp_v0_14->words.w1 = 0x07000000; + temp_v0_14->words.w0 = 0xF5700000; temp_v0_15 = gDisplayListHead; gDisplayListHead = temp_v0_15 + 8; - temp_v0_15->unk4 = 0x7000000; - temp_v0_15->unk0 = 0xF5700000; + temp_v0_15->words.w1 = 0; + temp_v0_15->words.w0 = 0xE6000000; temp_v0_16 = gDisplayListHead; gDisplayListHead = temp_v0_16 + 8; - temp_v0_16->unk4 = 0; - temp_v0_16->unk0 = 0xE6000000; + temp_v0_16->words.w1 = 0x073FF200; + temp_v0_16->words.w0 = 0xF3000000; temp_v0_17 = gDisplayListHead; gDisplayListHead = temp_v0_17 + 8; - temp_v0_17->unk4 = 0x73FF200; - temp_v0_17->unk0 = 0xF3000000; + temp_v0_17->words.w1 = 0; + temp_v0_17->words.w0 = 0xE7000000; temp_v0_18 = gDisplayListHead; gDisplayListHead = temp_v0_18 + 8; - temp_v0_18->unk4 = 0; - temp_v0_18->unk0 = 0xE7000000; + temp_v0_18->words.w1 = 0; + temp_v0_18->words.w0 = 0xF5680800; temp_v0_19 = gDisplayListHead; gDisplayListHead = temp_v0_19 + 8; - temp_v0_19->unk4 = 0; - temp_v0_19->unk0 = 0xF5680800; + temp_v0_19->words.w1 = 0x0007C0FC; + temp_v0_19->words.w0 = 0xF2000000; temp_v0_20 = gDisplayListHead; gDisplayListHead = temp_v0_20 + 8; - temp_v0_20->unk4 = 0x7C0FC; - temp_v0_20->unk0 = 0xF2000000; + temp_v0_20->words.w0 = 0x0400103F; + temp_v0_20->words.w1 = (u32) ((sp24->unk290 * 0x10) + 0x40 + D_800E8900); temp_v0_21 = gDisplayListHead; gDisplayListHead = temp_v0_21 + 8; - temp_v0_21->unk0 = 0x400103F; - temp_v0_21->unk4 = (temp_ra->unk290 * 0x10) + 0x40 + &D_800E8900; + temp_v0_21->words.w1 = (u32) D_0D008DA0; + } else { temp_v0_22 = gDisplayListHead; gDisplayListHead = temp_v0_22 + 8; - temp_v0_22->unk4 = &D_0D008DA0; - phi_v0 = temp_v0_22; - } else { + temp_v0_22->words.w1 = 0x0D008DB8; + temp_v0_22->words.w0 = 0x06000000; temp_v0_23 = gDisplayListHead; gDisplayListHead = temp_v0_23 + 8; - temp_v0_23->unk4 = 0xD008DB8; - temp_v0_23->unk0 = 0x6000000; + temp_v0_23->words.w1 = -0x00000C07U; + temp_v0_23->words.w0 = 0xFC127E24; temp_v0_24 = gDisplayListHead; gDisplayListHead = temp_v0_24 + 8; - temp_v0_24->unk4 = -0xC07; - temp_v0_24->unk0 = 0xFC127E24; + temp_v0_24->words.w1 = 0x00504B50; + temp_v0_24->words.w0 = 0xB900031D; temp_v0_25 = gDisplayListHead; gDisplayListHead = temp_v0_25 + 8; - temp_v0_25->unk4 = 0x504B50; - temp_v0_25->unk0 = 0xB900031D; + temp_v0_25->words.w0 = 0xFD700000; + temp_v0_25->words.w1 = D_8018D4C8; temp_v0_26 = gDisplayListHead; gDisplayListHead = temp_v0_26 + 8; - temp_v0_26->unk0 = 0xFD700000; - temp_v0_26->unk4 = D_8018D4C8; + temp_v0_26->words.w1 = 0x07000000; + temp_v0_26->words.w0 = 0xF5700000; temp_v0_27 = gDisplayListHead; gDisplayListHead = temp_v0_27 + 8; - temp_v0_27->unk4 = 0x7000000; - temp_v0_27->unk0 = 0xF5700000; + temp_v0_27->words.w1 = 0; + temp_v0_27->words.w0 = 0xE6000000; temp_v0_28 = gDisplayListHead; gDisplayListHead = temp_v0_28 + 8; - temp_v0_28->unk4 = 0; - temp_v0_28->unk0 = 0xE6000000; + temp_v0_28->words.w1 = 0x073FF200; + temp_v0_28->words.w0 = 0xF3000000; temp_v0_29 = gDisplayListHead; gDisplayListHead = temp_v0_29 + 8; - temp_v0_29->unk4 = 0x73FF200; - temp_v0_29->unk0 = 0xF3000000; + temp_v0_29->words.w1 = 0; + temp_v0_29->words.w0 = 0xE7000000; temp_v0_30 = gDisplayListHead; gDisplayListHead = temp_v0_30 + 8; - temp_v0_30->unk4 = 0; - temp_v0_30->unk0 = 0xE7000000; + temp_v0_30->words.w1 = 0; + temp_v0_30->words.w0 = 0xF5680800; temp_v0_31 = gDisplayListHead; gDisplayListHead = temp_v0_31 + 8; - temp_v0_31->unk4 = 0; - temp_v0_31->unk0 = 0xF5680800; + temp_v0_31->words.w1 = 0x0007C0FC; + temp_v0_31->words.w0 = 0xF2000000; temp_v0_32 = gDisplayListHead; gDisplayListHead = temp_v0_32 + 8; - temp_v0_32->unk4 = 0x7C0FC; - temp_v0_32->unk0 = 0xF2000000; + temp_v0_32->words.w0 = 0x0400103F; + temp_v0_32->words.w1 = (u32) &D_800E8900[sp24->unk290]; temp_v0_33 = gDisplayListHead; gDisplayListHead = temp_v0_33 + 8; - temp_v0_33->unk0 = 0x400103F; - temp_v0_33->unk4 = (temp_ra->unk290 * 0x10) + &D_800E8900; + temp_v0_33->words.w1 = (u32) D_0D008C78; + temp_v0_33->words.w0 = 0x06000000; temp_v0_34 = gDisplayListHead; gDisplayListHead = temp_v0_34 + 8; - temp_v0_34->unk4 = &D_0D008C78; - temp_v0_34->unk0 = 0x6000000; + temp_v0_34->words.w0 = 0xFD700000; + temp_v0_34->words.w1 = D_8018D4C4; temp_v0_35 = gDisplayListHead; gDisplayListHead = temp_v0_35 + 8; - temp_v0_35->unk0 = 0xFD700000; - temp_v0_35->unk4 = D_8018D4C4; + temp_v0_35->words.w1 = 0x07000000; + temp_v0_35->words.w0 = 0xF5700000; temp_v0_36 = gDisplayListHead; gDisplayListHead = temp_v0_36 + 8; - temp_v0_36->unk4 = 0x7000000; - temp_v0_36->unk0 = 0xF5700000; + temp_v0_36->words.w1 = 0; + temp_v0_36->words.w0 = 0xE6000000; temp_v0_37 = gDisplayListHead; gDisplayListHead = temp_v0_37 + 8; - temp_v0_37->unk4 = 0; - temp_v0_37->unk0 = 0xE6000000; + temp_v0_37->words.w1 = 0x073FF200; + temp_v0_37->words.w0 = 0xF3000000; temp_v0_38 = gDisplayListHead; gDisplayListHead = temp_v0_38 + 8; - temp_v0_38->unk4 = 0x73FF200; - temp_v0_38->unk0 = 0xF3000000; + temp_v0_38->words.w1 = 0; + temp_v0_38->words.w0 = 0xE7000000; temp_v0_39 = gDisplayListHead; gDisplayListHead = temp_v0_39 + 8; - temp_v0_39->unk4 = 0; - temp_v0_39->unk0 = 0xE7000000; + temp_v0_39->words.w1 = 0; + temp_v0_39->words.w0 = 0xF5680800; temp_v0_40 = gDisplayListHead; gDisplayListHead = temp_v0_40 + 8; - temp_v0_40->unk4 = 0; - temp_v0_40->unk0 = 0xF5680800; + temp_v0_40->words.w1 = 0x0007C0FC; + temp_v0_40->words.w0 = 0xF2000000; temp_v0_41 = gDisplayListHead; gDisplayListHead = temp_v0_41 + 8; - temp_v0_41->unk4 = 0x7C0FC; - temp_v0_41->unk0 = 0xF2000000; + temp_v0_41->words.w0 = 0x0400103F; + temp_v0_41->words.w1 = (u32) ((sp24->unk290 * 0x10) + 0x40 + D_800E8900); temp_v0_42 = gDisplayListHead; gDisplayListHead = temp_v0_42 + 8; - temp_v0_42->unk0 = 0x400103F; - temp_v0_42->unk4 = (temp_ra->unk290 * 0x10) + 0x40 + &D_800E8900; - temp_v0_43 = gDisplayListHead; - gDisplayListHead = temp_v0_43 + 8; - temp_v0_43->unk4 = &D_0D008DA0; - phi_v0 = temp_v0_43; + temp_v0_42->words.w1 = (u32) D_0D008DA0; } - *phi_v0 = 0x6000000; - D_80164AF0 = D_80164AF0 + 1; + gDisplayListHead->words.w0 = 0x06000000; + D_80164AF0 += 1; } } #else @@ -7442,18 +6595,12 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80066BAC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004B35C(s16, s16, s16, s16); // extern -void func_800652D4(f32 *, s16 *, f32, s8); // extern +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32, s8); /* extern */ extern ? D_06000224; -extern Gfx D_0D008DB8; -extern Gfx D_0D008E48; -extern Gfx D_0D008E70; -extern s16 D_80164AF0; -extern s32 D_8018D48C; -extern ? **gDisplayListHead; +extern u32 D_8018D48C; -void func_80067280(void *arg0, ? arg1, s16 arg2, s8 arg3) { +void func_80067280(Player *player, s32 arg1, s16 arg2, s8 arg3) { f32 sp84; f32 sp80; f32 sp7C; @@ -7464,31 +6611,30 @@ void func_80067280(void *arg0, ? arg1, s16 arg2, s8 arg3) { s16 sp70; s16 sp6E; s16 sp6C; - ? **sp4C; - ? **sp28; - ? **temp_v0_10; - ? **temp_v0_11; - ? **temp_v0_12; - ? **temp_v0_13; - ? **temp_v0_14; - ? **temp_v0_15; - ? **temp_v0_16; - ? **temp_v0_17; - ? **temp_v0_18; - ? **temp_v0_19; - ? **temp_v0_2; - ? **temp_v0_3; - ? **temp_v0_4; - ? **temp_v0_5; - ? **temp_v0_6; - ? **temp_v0_7; - ? **temp_v0_8; - ? **temp_v0_9; + Gfx *sp4C; + Gfx *sp28; + ? *var_s0; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_14; + Gfx *temp_v0_15; + Gfx *temp_v0_16; + Gfx *temp_v0_17; + Gfx *temp_v0_18; + Gfx *temp_v0_19; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; void *temp_v0; - ? *phi_s0; - ? **phi_v0; - temp_v0 = arg0 + (arg2 * 0x48); + temp_v0 = player + (arg2 * 0x48); if (temp_v0->unkAE4 == 1) { sp72 = temp_v0->unkB00; sp70 = temp_v0->unkB02; @@ -7496,96 +6642,94 @@ void func_80067280(void *arg0, ? arg1, s16 arg2, s8 arg3) { sp6C = temp_v0->unkB06; sp7C = temp_v0->unkAC8; sp80 = temp_v0->unkACC; - sp74 = -0x71C; + sp74 = -0x071C; sp78 = 0; sp84 = temp_v0->unkAD0; - if (temp_v0->unkAD8 == 1) { - sp76 = (arg0 + (arg3 * 2))->unk48 - 0x2000; - func_800652D4(&sp7C, &sp74, temp_v0->unkAD4 * arg0->unk224, arg3); + if (temp_v0->unkAD8 == (u16) 1) { + sp76 = player->unk_048[arg3] - 0x2000; + func_800652D4(&sp7C, &sp74, temp_v0->unkAD4 * player->unk_224, arg3); temp_v0_2 = gDisplayListHead; + var_s0 = &D_06000224; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk4 = &D_0D008DB8; - temp_v0_2->unk0 = &D_06000224; + temp_v0_2->words.w1 = (u32) D_0D008DB8; + temp_v0_2->words.w0 = (u32) &D_06000224; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk0 = 0xFD700000; - temp_v0_3->unk4 = D_8018D48C; + temp_v0_3->words.w0 = 0xFD700000; + temp_v0_3->words.w1 = D_8018D48C; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk4 = 0x7000000; - temp_v0_4->unk0 = 0xF5700000; + temp_v0_4->words.w1 = 0x07000000; + temp_v0_4->words.w0 = 0xF5700000; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0; - temp_v0_5->unk0 = 0xE6000000; + temp_v0_5->words.w1 = 0; + temp_v0_5->words.w0 = 0xE6000000; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0x71FF200; - temp_v0_6->unk0 = 0xF3000000; + temp_v0_6->words.w1 = 0x071FF200; + temp_v0_6->words.w0 = 0xF3000000; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0; - temp_v0_7->unk0 = 0xE7000000; + temp_v0_7->words.w1 = 0; + temp_v0_7->words.w0 = 0xE7000000; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0; - temp_v0_8->unk0 = 0xF5680800; + temp_v0_8->words.w1 = 0; + temp_v0_8->words.w0 = 0xF5680800; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; sp4C = temp_v0_9; - temp_v0_9->unk4 = 0x7C07C; - temp_v0_9->unk0 = 0xF2000000; - func_8004B35C(sp72, sp70, sp6E, sp6C); + temp_v0_9->words.w1 = 0x0007C07C; + temp_v0_9->words.w0 = 0xF2000000; + func_8004B35C((s32) sp72, (s32) sp70, (s32) sp6E, (s32) sp6C); temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->unk4 = &D_0D008E70; - phi_s0 = &D_06000224; - phi_v0 = temp_v0_10; + temp_v0_10->words.w1 = (u32) D_0D008E70; } else { - sp76 = (arg0 + (arg3 * 2))->unk48 + 0x2000; - func_800652D4(&sp7C, &sp74, temp_v0->unkAD4 * arg0->unk0, arg3); + sp76 = player->unk_048[arg3] + 0x2000; + func_800652D4(&sp7C, &sp74, temp_v0->unkAD4 * player->unk0, arg3); temp_v0_11 = gDisplayListHead; + var_s0 = (? *)0x06000000; gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk4 = &D_0D008DB8; - temp_v0_11->unk0 = 0x6000000; + temp_v0_11->words.w1 = (u32) D_0D008DB8; + temp_v0_11->words.w0 = (u32) (? *)0x06000000; temp_v0_12 = gDisplayListHead; gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk0 = 0xFD700000; - temp_v0_12->unk4 = D_8018D48C; + temp_v0_12->words.w0 = 0xFD700000; + temp_v0_12->words.w1 = D_8018D48C; temp_v0_13 = gDisplayListHead; gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk4 = 0x7000000; - temp_v0_13->unk0 = 0xF5700000; + temp_v0_13->words.w1 = 0x07000000; + temp_v0_13->words.w0 = 0xF5700000; temp_v0_14 = gDisplayListHead; gDisplayListHead = temp_v0_14 + 8; - temp_v0_14->unk4 = 0; - temp_v0_14->unk0 = 0xE6000000; + temp_v0_14->words.w1 = 0; + temp_v0_14->words.w0 = 0xE6000000; temp_v0_15 = gDisplayListHead; gDisplayListHead = temp_v0_15 + 8; - temp_v0_15->unk4 = 0x71FF200; - temp_v0_15->unk0 = 0xF3000000; + temp_v0_15->words.w1 = 0x071FF200; + temp_v0_15->words.w0 = 0xF3000000; temp_v0_16 = gDisplayListHead; gDisplayListHead = temp_v0_16 + 8; - temp_v0_16->unk4 = 0; - temp_v0_16->unk0 = 0xE7000000; + temp_v0_16->words.w1 = 0; + temp_v0_16->words.w0 = 0xE7000000; temp_v0_17 = gDisplayListHead; gDisplayListHead = temp_v0_17 + 8; - temp_v0_17->unk4 = 0; - temp_v0_17->unk0 = 0xF5680800; + temp_v0_17->words.w1 = 0; + temp_v0_17->words.w0 = 0xF5680800; temp_v0_18 = gDisplayListHead; gDisplayListHead = temp_v0_18 + 8; sp28 = temp_v0_18; - temp_v0_18->unk4 = 0x7C07C; - temp_v0_18->unk0 = 0xF2000000; - func_8004B35C(sp72, sp70, sp6E, sp6C); + temp_v0_18->words.w1 = 0x0007C07C; + temp_v0_18->words.w0 = 0xF2000000; + func_8004B35C((s32) sp72, (s32) sp70, (s32) sp6E, (s32) sp6C); temp_v0_19 = gDisplayListHead; gDisplayListHead = temp_v0_19 + 8; - temp_v0_19->unk4 = &D_0D008E48; - phi_s0 = 0x6000000; - phi_v0 = temp_v0_19; + temp_v0_19->words.w1 = (u32) D_0D008E48; } - *phi_v0 = phi_s0; - D_80164AF0 = D_80164AF0 + 1; + gDisplayListHead->words.w0 = var_s0; + D_80164AF0 += 1; } } #else @@ -7593,139 +6737,130 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80067280.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004B72C(?, ?, ?, ?, s32, s32, s32); // extern -void func_800652D4(f32 *, s16 *, f32); // extern +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32); /* extern */ extern ? D_05FF8DB8; -extern Gfx D_0D008DB8; -extern Gfx D_0D008E48; -extern Gfx D_0D008E70; -extern s8 D_0D02AC58; -extern s16 D_80164AF0; -extern void *gDisplayListHead; -void func_80067604(void *arg0, ? arg1, s16 arg2, s8 arg3) { +void func_80067604(Player *player, s32 arg1, s16 arg2, s8 arg3) { f32 sp94; f32 sp90; f32 sp8C; s16 sp88; s16 sp86; s16 sp84; - void *sp54; - void *sp30; + Gfx *sp54; + Gfx *sp30; void *sp28; - s16 *temp_a1; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_14; + Gfx *temp_v0_15; + Gfx *temp_v0_16; + Gfx *temp_v0_17; + Gfx *temp_v0_18; + Gfx *temp_v0_19; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; void *temp_v0; - void *temp_v0_10; - void *temp_v0_11; - void *temp_v0_12; - void *temp_v0_13; - void *temp_v0_14; - void *temp_v0_15; - void *temp_v0_16; - void *temp_v0_17; - void *temp_v0_18; - void *temp_v0_19; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; - temp_v0 = arg0 + (arg2 * 0x48); + temp_v0 = player + (arg2 * 0x48); if (temp_v0->unkAE4 == 1) { sp8C = temp_v0->unkAC8; - temp_a1 = &sp84; sp90 = temp_v0->unkACC; sp84 = 0; sp94 = temp_v0->unkAD0; sp88 = 0; - sp86 = (arg0 + (arg3 * 2))->unk48; + sp86 = player->unk_048[arg3]; sp28 = temp_v0; - func_800652D4(&sp8C, temp_a1, temp_v0->unkAD4 * arg0->unk224); - if (temp_v0->unkAD8 == 1) { + func_800652D4(&sp8C, &sp84, temp_v0->unkAD4 * player->unk_224); + if (sp28->unkAD8 == 1) { temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0x6000000; - temp_v0_2->unk4 = &D_0D008DB8; + temp_v0_2->words.w0 = 0x06000000; + temp_v0_2->words.w1 = (u32) D_0D008DB8; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk0 = 0xFD900000; - temp_v0_3->unk4 = &D_0D02AC58; + temp_v0_3->words.w0 = 0xFD900000; + temp_v0_3->words.w1 = (u32) D_0D02AC58; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk4 = 0x7000000; - temp_v0_4->unk0 = 0xF5900000; + temp_v0_4->words.w1 = 0x07000000; + temp_v0_4->words.w0 = 0xF5900000; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0; - temp_v0_5->unk0 = 0xE6000000; + temp_v0_5->words.w1 = 0; + temp_v0_5->words.w0 = 0xE6000000; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0x71FF200; - temp_v0_6->unk0 = 0xF3000000; + temp_v0_6->words.w1 = 0x071FF200; + temp_v0_6->words.w0 = 0xF3000000; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0; - temp_v0_7->unk0 = 0xE7000000; + temp_v0_7->words.w1 = 0; + temp_v0_7->words.w0 = 0xE7000000; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0; - temp_v0_8->unk0 = 0xF5880800; + temp_v0_8->words.w1 = 0; + temp_v0_8->words.w0 = 0xF5880800; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; sp54 = temp_v0_9; - temp_v0_9->unk0 = 0xF2000000; - temp_v0_9->unk4 = 0x7C07C; - func_8004B72C(0xFF, 0xFF, 0xDF, 0xFF, 0x5F, 0, 0x60); + temp_v0_9->words.w0 = 0xF2000000; + temp_v0_9->words.w1 = 0x0007C07C; + func_8004B72C(0x000000FF, 0x000000FF, 0x000000DF, 0x000000FF, 0x0000005F, 0, 0x00000060); temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->unk0 = &D_05FF8DB8; - temp_v0_10->unk4 = &D_0D008E70; + temp_v0_10->words.w0 = (u32) &D_05FF8DB8; + temp_v0_10->words.w1 = (u32) D_0D008E70; } else { temp_v0_11 = gDisplayListHead; gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk4 = 0xD010000; - temp_v0_11->unk0 = 0x6000000; + temp_v0_11->words.w1 = 0x0D010000; + temp_v0_11->words.w0 = 0x06000000; temp_v0_12 = gDisplayListHead; gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk0 = 0xFD900000; - temp_v0_12->unk4 = &D_0D02AC58; + temp_v0_12->words.w0 = 0xFD900000; + temp_v0_12->words.w1 = (u32) D_0D02AC58; temp_v0_13 = gDisplayListHead; gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk4 = 0x7000000; - temp_v0_13->unk0 = 0xF5900000; + temp_v0_13->words.w1 = 0x07000000; + temp_v0_13->words.w0 = 0xF5900000; temp_v0_14 = gDisplayListHead; gDisplayListHead = temp_v0_14 + 8; - temp_v0_14->unk4 = 0; - temp_v0_14->unk0 = 0xE6000000; + temp_v0_14->words.w1 = 0; + temp_v0_14->words.w0 = 0xE6000000; temp_v0_15 = gDisplayListHead; gDisplayListHead = temp_v0_15 + 8; - temp_v0_15->unk4 = 0x71FF200; - temp_v0_15->unk0 = 0xF3000000; + temp_v0_15->words.w1 = 0x071FF200; + temp_v0_15->words.w0 = 0xF3000000; temp_v0_16 = gDisplayListHead; gDisplayListHead = temp_v0_16 + 8; - temp_v0_16->unk4 = 0; - temp_v0_16->unk0 = 0xE7000000; + temp_v0_16->words.w1 = 0; + temp_v0_16->words.w0 = 0xE7000000; temp_v0_17 = gDisplayListHead; gDisplayListHead = temp_v0_17 + 8; - temp_v0_17->unk4 = 0; - temp_v0_17->unk0 = 0xF5880800; + temp_v0_17->words.w1 = 0; + temp_v0_17->words.w0 = 0xF5880800; temp_v0_18 = gDisplayListHead; gDisplayListHead = temp_v0_18 + 8; sp30 = temp_v0_18; - temp_v0_18->unk0 = 0xF2000000; - temp_v0_18->unk4 = 0x7C07C; - func_8004B72C(0xFF, 0xFF, 0xDF, 0xFF, 0x5F, 0, 0x60); + temp_v0_18->words.w0 = 0xF2000000; + temp_v0_18->words.w1 = 0x0007C07C; + func_8004B72C(0x000000FF, 0x000000FF, 0x000000DF, 0x000000FF, 0x0000005F, 0, 0x00000060); temp_v0_19 = gDisplayListHead; gDisplayListHead = temp_v0_19 + 8; - temp_v0_19->unk0 = 0x6000000; - temp_v0_19->unk4 = &D_0D008E48; + temp_v0_19->words.w0 = 0x06000000; + temp_v0_19->words.w1 = (u32) D_0D008E48; } - D_80164AF0 = D_80164AF0 + 1; + D_80164AF0 += 1; } } #else @@ -7733,177 +6868,168 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80067604.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_800652D4(f32, f32 *, s16 *, f32, void *); // extern -extern Gfx D_0D008C78; -extern Gfx D_0D008C90; -extern Gfx D_0D008DA0; -extern ? D_800E52D0; -extern ? D_800E8800; -extern ? D_800E8840; -extern s16 D_80164AF0; -extern s32 D_8018D4AC; -extern s32 D_8018D4B0; -extern void *gDisplayListHead; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(s32, f32 *, s16 *, f32, Player *); /* extern */ +extern u32 D_8018D4AC; +extern u32 D_8018D4B0; +static ? D_800E52D0; /* unable to generate initializer */ +static ? D_800E8800; /* unable to generate initializer */ +static ? D_800E8840; /* unable to generate initializer */ -void func_80067964(void *arg0, ? arg1, f32 arg2, ? arg3, s8 arg4) { +void func_80067964(Player *player, s8 arg1, s32 arg2, s8 arg3, s32 arg4) { f32 spA4; f32 spA0; f32 sp9C; s16 sp98; s16 sp96; s16 sp94; - f32 *temp_a0; - s16 *temp_a1; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_14; + Gfx *temp_v0_15; + Gfx *temp_v0_16; + Gfx *temp_v0_17; + Gfx *temp_v0_18; + Gfx *temp_v0_19; + Gfx *temp_v0_20; + Gfx *temp_v0_21; + Gfx *temp_v0_22; + Gfx *temp_v0_23; + Gfx *temp_v0_24; + Gfx *temp_v0_25; + Gfx *temp_v0_26; + Gfx *temp_v0_27; + Gfx *temp_v0_28; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; void *temp_v0; - void *temp_v0_10; - void *temp_v0_11; - void *temp_v0_12; - void *temp_v0_13; - void *temp_v0_14; - void *temp_v0_15; - void *temp_v0_16; - void *temp_v0_17; - void *temp_v0_18; - void *temp_v0_19; - void *temp_v0_20; - void *temp_v0_21; - void *temp_v0_22; - void *temp_v0_23; - void *temp_v0_24; - void *temp_v0_25; - void *temp_v0_26; - void *temp_v0_27; - void *temp_v0_28; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; - temp_v0 = arg0 + (arg4 * 0x48); + temp_v0 = player + ((s8) arg4 * 0x48); if (temp_v0->unk814 == 1) { - temp_a0 = &sp9C; - temp_a1 = &sp94; sp9C = temp_v0->unk7F8; spA0 = temp_v0->unk7FC; sp94 = 0; spA4 = temp_v0->unk800; sp98 = 0; sp96 = temp_v0->unk818; - func_800652D4(arg2, temp_a0, temp_a1, arg0->unk224 * arg2, arg0); + func_800652D4(arg2, &sp9C, &sp94, player->unk_224 * (bitwise f32) arg2, player); temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk4 = &D_0D008C90; - temp_v0_2->unk0 = 0x6000000; + temp_v0_2->words.w1 = (u32) D_0D008C90; + temp_v0_2->words.w0 = 0x06000000; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk4 = 0x3000; - temp_v0_3->unk0 = 0xB6000000; + temp_v0_3->words.w1 = 0x00003000; + temp_v0_3->words.w0 = 0xB6000000; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk0 = 0xFD100000; - temp_v0_4->unk4 = &D_800E52D0; + temp_v0_4->words.w0 = 0xFD100000; + temp_v0_4->words.w1 = (u32) &D_800E52D0; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0; - temp_v0_5->unk0 = 0xE8000000; + temp_v0_5->words.w1 = 0; + temp_v0_5->words.w0 = 0xE8000000; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0x7000000; - temp_v0_6->unk0 = 0xF5000100; + temp_v0_6->words.w1 = 0x07000000; + temp_v0_6->words.w0 = 0xF5000100; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0; - temp_v0_7->unk0 = 0xE6000000; + temp_v0_7->words.w1 = 0; + temp_v0_7->words.w0 = 0xE6000000; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0x73FC000; - temp_v0_8->unk0 = 0xF0000000; + temp_v0_8->words.w1 = 0x073FC000; + temp_v0_8->words.w0 = 0xF0000000; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; - temp_v0_9->unk4 = 0; - temp_v0_9->unk0 = 0xE7000000; + temp_v0_9->words.w1 = 0; + temp_v0_9->words.w0 = 0xE7000000; temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->unk4 = 0x8000; - temp_v0_10->unk0 = 0xBA000E02; + temp_v0_10->words.w1 = 0x00008000; + temp_v0_10->words.w0 = 0xBA000E02; temp_v0_11 = gDisplayListHead; gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk0 = 0xFD500000; - temp_v0_11->unk4 = D_8018D4AC; + temp_v0_11->words.w0 = 0xFD500000; + temp_v0_11->words.w1 = D_8018D4AC; temp_v0_12 = gDisplayListHead; gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk4 = 0x7080200; - temp_v0_12->unk0 = 0xF5500000; + temp_v0_12->words.w1 = 0x07080200; + temp_v0_12->words.w0 = 0xF5500000; temp_v0_13 = gDisplayListHead; gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk4 = 0; - temp_v0_13->unk0 = 0xE6000000; + temp_v0_13->words.w1 = 0; + temp_v0_13->words.w0 = 0xE6000000; temp_v0_14 = gDisplayListHead; gDisplayListHead = temp_v0_14 + 8; - temp_v0_14->unk4 = 0x73FF100; - temp_v0_14->unk0 = 0xF3000000; + temp_v0_14->words.w1 = 0x073FF100; + temp_v0_14->words.w0 = 0xF3000000; temp_v0_15 = gDisplayListHead; gDisplayListHead = temp_v0_15 + 8; - temp_v0_15->unk4 = 0; - temp_v0_15->unk0 = 0xE7000000; + temp_v0_15->words.w1 = 0; + temp_v0_15->words.w0 = 0xE7000000; temp_v0_16 = gDisplayListHead; gDisplayListHead = temp_v0_16 + 8; - temp_v0_16->unk0 = 0xF5481000; - temp_v0_16->unk4 = 0x80200; + temp_v0_16->words.w0 = 0xF5481000; + temp_v0_16->words.w1 = 0x00080200; temp_v0_17 = gDisplayListHead; gDisplayListHead = temp_v0_17 + 8; - temp_v0_17->unk0 = 0xF2000000; - temp_v0_17->unk4 = 0xFC07C; + temp_v0_17->words.w0 = 0xF2000000; + temp_v0_17->words.w1 = 0x000FC07C; temp_v0_18 = gDisplayListHead; gDisplayListHead = temp_v0_18 + 8; - temp_v0_18->unk4 = &D_800E8840; - temp_v0_18->unk0 = 0x400103F; + temp_v0_18->words.w1 = (u32) &D_800E8840; + temp_v0_18->words.w0 = 0x0400103F; temp_v0_19 = gDisplayListHead; gDisplayListHead = temp_v0_19 + 8; - temp_v0_19->unk4 = &D_0D008C78; - temp_v0_19->unk0 = 0x6000000; + temp_v0_19->words.w1 = (u32) D_0D008C78; + temp_v0_19->words.w0 = 0x06000000; temp_v0_20 = gDisplayListHead; gDisplayListHead = temp_v0_20 + 8; - temp_v0_20->unk0 = 0xFD500000; - temp_v0_20->unk4 = D_8018D4B0; + temp_v0_20->words.w0 = 0xFD500000; + temp_v0_20->words.w1 = D_8018D4B0; temp_v0_21 = gDisplayListHead; gDisplayListHead = temp_v0_21 + 8; - temp_v0_21->unk4 = 0x7080200; - temp_v0_21->unk0 = 0xF5500000; + temp_v0_21->words.w1 = 0x07080200; + temp_v0_21->words.w0 = 0xF5500000; temp_v0_22 = gDisplayListHead; gDisplayListHead = temp_v0_22 + 8; - temp_v0_22->unk4 = 0; - temp_v0_22->unk0 = 0xE6000000; + temp_v0_22->words.w1 = 0; + temp_v0_22->words.w0 = 0xE6000000; temp_v0_23 = gDisplayListHead; gDisplayListHead = temp_v0_23 + 8; - temp_v0_23->unk4 = 0x73FF100; - temp_v0_23->unk0 = 0xF3000000; + temp_v0_23->words.w1 = 0x073FF100; + temp_v0_23->words.w0 = 0xF3000000; temp_v0_24 = gDisplayListHead; gDisplayListHead = temp_v0_24 + 8; - temp_v0_24->unk4 = 0; - temp_v0_24->unk0 = 0xE7000000; + temp_v0_24->words.w1 = 0; + temp_v0_24->words.w0 = 0xE7000000; temp_v0_25 = gDisplayListHead; gDisplayListHead = temp_v0_25 + 8; - temp_v0_25->unk0 = 0xF5481000; - temp_v0_25->unk4 = 0x80200; + temp_v0_25->words.w0 = 0xF5481000; + temp_v0_25->words.w1 = 0x00080200; temp_v0_26 = gDisplayListHead; gDisplayListHead = temp_v0_26 + 8; - temp_v0_26->unk0 = 0xF2000000; - temp_v0_26->unk4 = 0xFC07C; + temp_v0_26->words.w0 = 0xF2000000; + temp_v0_26->words.w1 = 0x000FC07C; temp_v0_27 = gDisplayListHead; gDisplayListHead = temp_v0_27 + 8; - temp_v0_27->unk4 = &D_800E8800; - temp_v0_27->unk0 = 0x400103F; + temp_v0_27->words.w1 = (u32) &D_800E8800; + temp_v0_27->words.w0 = 0x0400103F; temp_v0_28 = gDisplayListHead; gDisplayListHead = temp_v0_28 + 8; - temp_v0_28->unk4 = &D_0D008DA0; - temp_v0_28->unk0 = 0x6000000; - D_80164AF0 = D_80164AF0 + 1; + temp_v0_28->words.w1 = (u32) D_0D008DA0; + temp_v0_28->words.w0 = 0x06000000; + D_80164AF0 += 1; } } #else @@ -7911,18 +7037,11 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80067964.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004B414(s16, s16, s16, ?); // extern -void func_800652D4(f32 *, s16 *, f32); // extern -f32 sins(s32, s8, s8); // extern -f32 coss(s32); // extern -extern Gfx D_0D008DB8; -extern Gfx D_0D008E20; -extern ? D_800E48D4; -extern s16 D_80164AF0; -extern void *gDisplayListHead; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32); /* extern */ +static ? D_800E48D4; /* unable to generate initializer */ -void func_80067D3C(void *arg0, s8 arg1, s32 arg2, s8 arg3, f32 arg4, s32 arg5) { +void func_80067D3C(Player *player, s8 arg1, s32 arg2, s32 arg3, f32 arg4, s32 arg5) { f32 sp84; f32 sp80; f32 sp7C; @@ -7931,73 +7050,73 @@ void func_80067D3C(void *arg0, s8 arg1, s32 arg2, s8 arg3, f32 arg4, s32 arg5) { s16 sp74; ? sp54; void *sp24; + Gfx *temp_v0_10; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; void *temp_v0; - void *temp_v0_10; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; - sp54.unk0 = D_800E48D4.unk0; - sp54.unk4 = D_800E48D4.unk4; - sp54.unkC = D_800E48D4.unkC; - sp54.unk8 = D_800E48D4.unk8; - sp54.unk10 = D_800E48D4.unk10; - sp54.unk14 = D_800E48D4.unk14; - temp_v0 = arg0 + (arg3 * 0x48); - sp54.unk1C = D_800E48D4.unk1C; - sp54.unk18 = D_800E48D4.unk18; + sp54.unk0 = (s32) D_800E48D4.unk0; + sp54.unk4 = (s32) D_800E48D4.unk4; + sp54.unkC = (s32) D_800E48D4.unkC; + sp54.unk8 = (s32) D_800E48D4.unk8; + sp54.unk10 = (s32) D_800E48D4.unk10; + sp54.unk14 = (s32) D_800E48D4.unk14; + temp_v0 = player + ((s8) arg3 * 0x48); + sp54.unk1C = (s32) D_800E48D4.unk1C; + sp54.unk18 = (s32) D_800E48D4.unk18; if (temp_v0->unk814 == 1) { sp74 = 0; sp78 = 0; - sp76 = (arg0 + (arg1 * 2))->unk48; + sp76 = player->unk_048[arg1]; sp24 = temp_v0; - sp7C = (sins((0x4000 - (arg0->unk2E + arg0->unkC0)) & 0xFFFF, arg1, arg3) * arg4) + arg0->unk14; - sp80 = ((arg0->unk18 + arg0->unk70) - (sp + (arg0->unk254 * 4))->unk54) - 2.0f; - sp84 = (coss((0x4000 - (arg0->unk2E + arg0->unkC0)) & 0xFFFF) * arg4) + arg0->unk1C; - func_800652D4(&sp7C, &sp74, temp_v0->unk804 * arg0->unk224); + sp7C = (sins((0x4000 - (player->unk_02C[1] + player->unk_0C0)) & 0xFFFF) * arg4) + player->pos[0]; + sp80 = ((player->pos[1] + player->boundingBoxSize) - (sp + (player->characterId * 4))->unk54) - 2.0f; + sp84 = (coss((0x4000 - (player->unk_02C[1] + player->unk_0C0)) & 0xFFFF) * arg4) + player->pos[2]; + func_800652D4(&sp7C, &sp74, temp_v0->unk804 * player->unk_224); temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0x6000000; - temp_v0_2->unk4 = &D_0D008DB8; + temp_v0_2->words.w0 = 0x06000000; + temp_v0_2->words.w1 = (u32) D_0D008DB8; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk0 = 0xFD900000; - temp_v0_3->unk4 = arg2; + temp_v0_3->words.w0 = 0xFD900000; + temp_v0_3->words.w1 = (u32) arg2; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk4 = 0x7000000; - temp_v0_4->unk0 = 0xF5900000; + temp_v0_4->words.w1 = 0x07000000; + temp_v0_4->words.w0 = 0xF5900000; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0; - temp_v0_5->unk0 = 0xE6000000; + temp_v0_5->words.w1 = 0; + temp_v0_5->words.w0 = 0xE6000000; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0x71FF200; - temp_v0_6->unk0 = 0xF3000000; + temp_v0_6->words.w1 = 0x071FF200; + temp_v0_6->words.w0 = 0xF3000000; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0; - temp_v0_7->unk0 = 0xE7000000; + temp_v0_7->words.w1 = 0; + temp_v0_7->words.w0 = 0xE7000000; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0; - temp_v0_8->unk0 = 0xF5880800; + temp_v0_8->words.w1 = 0; + temp_v0_8->words.w0 = 0xF5880800; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; - temp_v0_9->unk4 = 0x7C07C; - temp_v0_9->unk0 = 0xF2000000; - func_8004B414((arg5 >> 0x10) & 0xFF, (arg5 >> 8) & 0xFF, arg5 & 0xFF, 0xFF); + temp_v0_9->words.w1 = 0x0007C07C; + temp_v0_9->words.w0 = 0xF2000000; + func_8004B414((s32) (s16) ((arg5 >> 0x10) & 0xFF), (s32) (s16) ((arg5 >> 8) & 0xFF), (s32) (s16) (arg5 & 0xFF), 0x000000FF); temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->unk0 = 0x6000000; - temp_v0_10->unk4 = &D_0D008E20; - D_80164AF0 = D_80164AF0 + 1; + temp_v0_10->words.w0 = 0x06000000; + temp_v0_10->words.w1 = (u32) D_0D008E20; + D_80164AF0 += 1; } } #else @@ -8005,19 +7124,11 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80067D3C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004B414(s16, s16, s16, ?); // extern -void func_800652D4(f32 *, s16 *, f32); // extern -f32 sins(s32, s8, s8); // extern -f32 coss(s32); // extern -extern Gfx D_0D008DB8; -extern Gfx D_0D008E20; -extern ? D_800E48F4; -extern f64 D_800EE7C8; -extern s16 D_80164AF0; -extern void *gDisplayListHead; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32); /* extern */ +static ? D_800E48F4; /* unable to generate initializer */ -void func_8006801C(void *arg0, s8 arg1, s32 arg2, s8 arg3, f32 arg4, s32 arg5) { +void func_8006801C(Player *player, s8 arg1, s32 arg2, s32 arg3, f32 arg4, s32 arg5) { f32 sp84; f32 sp80; f32 sp7C; @@ -8026,73 +7137,73 @@ void func_8006801C(void *arg0, s8 arg1, s32 arg2, s8 arg3, f32 arg4, s32 arg5) { s16 sp74; ? sp54; void *sp24; + Gfx *temp_v0_10; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; void *temp_v0; - void *temp_v0_10; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; - sp54.unk0 = D_800E48F4.unk0; - sp54.unk4 = D_800E48F4.unk4; - sp54.unkC = D_800E48F4.unkC; - sp54.unk8 = D_800E48F4.unk8; - sp54.unk10 = D_800E48F4.unk10; - sp54.unk14 = D_800E48F4.unk14; - temp_v0 = arg0 + (arg3 * 0x48); - sp54.unk1C = D_800E48F4.unk1C; - sp54.unk18 = D_800E48F4.unk18; + sp54.unk0 = (s32) D_800E48F4.unk0; + sp54.unk4 = (s32) D_800E48F4.unk4; + sp54.unkC = (s32) D_800E48F4.unkC; + sp54.unk8 = (s32) D_800E48F4.unk8; + sp54.unk10 = (s32) D_800E48F4.unk10; + sp54.unk14 = (s32) D_800E48F4.unk14; + temp_v0 = player + ((s8) arg3 * 0x48); + sp54.unk1C = (s32) D_800E48F4.unk1C; + sp54.unk18 = (s32) D_800E48F4.unk18; if (temp_v0->unk814 == 1) { sp74 = 0; sp78 = 0; - sp76 = (arg0 + (arg1 * 2))->unk48; + sp76 = player->unk_048[arg1]; sp24 = temp_v0; - sp7C = (sins((0x4000 - (arg0->unk2E + arg0->unkC0)) & 0xFFFF, arg1, arg3) * arg4) + arg0->unk14; - sp80 = ((arg0->unk18 + arg0->unk70) - (sp + (arg0->unk254 * 4))->unk54) - 2.0f; - sp84 = (coss((0x4000 - (arg0->unk2E + arg0->unkC0)) & 0xFFFF) * arg4) + arg0->unk1C; - func_800652D4(&sp7C, &sp74, (temp_v0->unk804 * arg0->unk224) * D_800EE7C8); + sp7C = (sins((0x4000 - (player->unk_02C[1] + player->unk_0C0)) & 0xFFFF) * arg4) + player->pos[0]; + sp80 = ((player->pos[1] + player->boundingBoxSize) - (sp + (player->characterId * 4))->unk54) - 2.0f; + sp84 = (coss((0x4000 - (player->unk_02C[1] + player->unk_0C0)) & 0xFFFF) * arg4) + player->pos[2]; + func_800652D4(&sp7C, &sp74, (f32) ((f64) (temp_v0->unk804 * player->unk_224) * 0.8)); temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0x6000000; - temp_v0_2->unk4 = &D_0D008DB8; + temp_v0_2->words.w0 = 0x06000000; + temp_v0_2->words.w1 = (u32) D_0D008DB8; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk0 = 0xFD900000; - temp_v0_3->unk4 = arg2; + temp_v0_3->words.w0 = 0xFD900000; + temp_v0_3->words.w1 = (u32) arg2; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk4 = 0x7000000; - temp_v0_4->unk0 = 0xF5900000; + temp_v0_4->words.w1 = 0x07000000; + temp_v0_4->words.w0 = 0xF5900000; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0; - temp_v0_5->unk0 = 0xE6000000; + temp_v0_5->words.w1 = 0; + temp_v0_5->words.w0 = 0xE6000000; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0x71FF200; - temp_v0_6->unk0 = 0xF3000000; + temp_v0_6->words.w1 = 0x071FF200; + temp_v0_6->words.w0 = 0xF3000000; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0; - temp_v0_7->unk0 = 0xE7000000; + temp_v0_7->words.w1 = 0; + temp_v0_7->words.w0 = 0xE7000000; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0; - temp_v0_8->unk0 = 0xF5880800; + temp_v0_8->words.w1 = 0; + temp_v0_8->words.w0 = 0xF5880800; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; - temp_v0_9->unk4 = 0x7C07C; - temp_v0_9->unk0 = 0xF2000000; - func_8004B414((arg5 >> 0x10) & 0xFF, (arg5 >> 8) & 0xFF, arg5 & 0xFF, 0xFF); + temp_v0_9->words.w1 = 0x0007C07C; + temp_v0_9->words.w0 = 0xF2000000; + func_8004B414((s32) (s16) ((arg5 >> 0x10) & 0xFF), (s32) (s16) ((arg5 >> 8) & 0xFF), (s32) (s16) (arg5 & 0xFF), 0x000000FF); temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->unk0 = 0x6000000; - temp_v0_10->unk4 = &D_0D008E20; - D_80164AF0 = D_80164AF0 + 1; + temp_v0_10->words.w0 = 0x06000000; + temp_v0_10->words.w1 = (u32) D_0D008E20; + D_80164AF0 += 1; } } #else @@ -8100,22 +7211,15 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006801C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_800652D4(f32 *, s16 *, f32); // extern -f32 sins(u16); // extern -f32 coss(u16); // extern -extern Gfx D_0D008C78; -extern Gfx D_0D008C90; -extern Gfx D_0D008DA0; -extern ? D_800E52D0; -extern ? D_800E8880; -extern ? D_800E88C0; -extern s16 D_80164AF0; -extern s32 D_8018D4B4; -extern s32 D_8018D4B8; -extern void *gDisplayListHead; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32); /* extern */ +extern u32 D_8018D4B4; +extern u32 D_8018D4B8; +static ? D_800E52D0; /* unable to generate initializer */ +static ? D_800E8880; /* unable to generate initializer */ +static ? D_800E88C0; /* unable to generate initializer */ -void func_80068310(void *arg0, ? arg1, ? arg2, s8 arg3, s8 arg4) { +void func_80068310(Player *player, s8 arg1, s32 arg2, s8 arg3, s32 arg4) { f32 spA4; f32 spA0; f32 sp9C; @@ -8124,156 +7228,152 @@ void func_80068310(void *arg0, ? arg1, ? arg2, s8 arg3, s8 arg4) { s16 sp94; void *sp28; void *sp24; - f32 *temp_a0; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_14; + Gfx *temp_v0_15; + Gfx *temp_v0_16; + Gfx *temp_v0_17; + Gfx *temp_v0_18; + Gfx *temp_v0_19; + Gfx *temp_v0_20; + Gfx *temp_v0_21; + Gfx *temp_v0_22; + Gfx *temp_v0_23; + Gfx *temp_v0_24; + Gfx *temp_v0_25; + Gfx *temp_v0_26; + Gfx *temp_v0_27; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; f32 temp_f4; void *temp_v0; - void *temp_v0_10; - void *temp_v0_11; - void *temp_v0_12; - void *temp_v0_13; - void *temp_v0_14; - void *temp_v0_15; - void *temp_v0_16; - void *temp_v0_17; - void *temp_v0_18; - void *temp_v0_19; - void *temp_v0_20; - void *temp_v0_21; - void *temp_v0_22; - void *temp_v0_23; - void *temp_v0_24; - void *temp_v0_25; - void *temp_v0_26; - void *temp_v0_27; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; - void *temp_v1; - temp_v0 = arg0 + (arg4 * 0x48); + temp_v0 = player + ((s8) arg4 * 0x48); if (temp_v0->unk814 == 1) { - temp_v1 = arg0 + (arg3 * 2); spA0 = temp_v0->unk7FC; - sp24 = temp_v1; + sp24 = player + (arg3 * 2); sp28 = temp_v0; - spA4 = (coss(temp_v1->unk48) * -10.0f) + arg0->unk1C; + spA4 = (coss((u16) player->unk_048[arg3]) * -10.0f) + player->pos[2]; temp_f4 = sins(sp24->unk48) * -10.0f; sp94 = 0; - temp_a0 = &sp9C; - sp9C = temp_f4 + arg0->unk14; + sp9C = temp_f4 + player->pos[0]; sp98 = 0; - sp96 = sp24->unk48; - func_800652D4(temp_a0, &sp94, temp_v0->unk804 * arg0->unk224); + sp96 = (s16) sp24->unk48; + func_800652D4(&sp9C, &sp94, temp_v0->unk804 * player->unk_224); temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk4 = &D_0D008C90; - temp_v0_2->unk0 = 0x6000000; + temp_v0_2->words.w1 = (u32) D_0D008C90; + temp_v0_2->words.w0 = 0x06000000; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk0 = 0xFD100000; - temp_v0_3->unk4 = &D_800E52D0; + temp_v0_3->words.w0 = 0xFD100000; + temp_v0_3->words.w1 = (u32) &D_800E52D0; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk4 = 0; - temp_v0_4->unk0 = 0xE8000000; + temp_v0_4->words.w1 = 0; + temp_v0_4->words.w0 = 0xE8000000; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0x7000000; - temp_v0_5->unk0 = 0xF5000100; + temp_v0_5->words.w1 = 0x07000000; + temp_v0_5->words.w0 = 0xF5000100; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0; - temp_v0_6->unk0 = 0xE6000000; + temp_v0_6->words.w1 = 0; + temp_v0_6->words.w0 = 0xE6000000; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0x73FC000; - temp_v0_7->unk0 = 0xF0000000; + temp_v0_7->words.w1 = 0x073FC000; + temp_v0_7->words.w0 = 0xF0000000; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0; - temp_v0_8->unk0 = 0xE7000000; + temp_v0_8->words.w1 = 0; + temp_v0_8->words.w0 = 0xE7000000; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; - temp_v0_9->unk4 = 0x8000; - temp_v0_9->unk0 = 0xBA000E02; + temp_v0_9->words.w1 = 0x00008000; + temp_v0_9->words.w0 = 0xBA000E02; temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->unk0 = 0xFD500000; - temp_v0_10->unk4 = D_8018D4B4; + temp_v0_10->words.w0 = 0xFD500000; + temp_v0_10->words.w1 = D_8018D4B4; temp_v0_11 = gDisplayListHead; gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk4 = 0x7080200; - temp_v0_11->unk0 = 0xF5500000; + temp_v0_11->words.w1 = 0x07080200; + temp_v0_11->words.w0 = 0xF5500000; temp_v0_12 = gDisplayListHead; gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk4 = 0; - temp_v0_12->unk0 = 0xE6000000; + temp_v0_12->words.w1 = 0; + temp_v0_12->words.w0 = 0xE6000000; temp_v0_13 = gDisplayListHead; gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk4 = 0x73FF100; - temp_v0_13->unk0 = 0xF3000000; + temp_v0_13->words.w1 = 0x073FF100; + temp_v0_13->words.w0 = 0xF3000000; temp_v0_14 = gDisplayListHead; gDisplayListHead = temp_v0_14 + 8; - temp_v0_14->unk4 = 0; - temp_v0_14->unk0 = 0xE7000000; + temp_v0_14->words.w1 = 0; + temp_v0_14->words.w0 = 0xE7000000; temp_v0_15 = gDisplayListHead; gDisplayListHead = temp_v0_15 + 8; - temp_v0_15->unk0 = 0xF5481000; - temp_v0_15->unk4 = 0x80200; + temp_v0_15->words.w0 = 0xF5481000; + temp_v0_15->words.w1 = 0x00080200; temp_v0_16 = gDisplayListHead; gDisplayListHead = temp_v0_16 + 8; - temp_v0_16->unk0 = 0xF2000000; - temp_v0_16->unk4 = 0xFC07C; + temp_v0_16->words.w0 = 0xF2000000; + temp_v0_16->words.w1 = 0x000FC07C; temp_v0_17 = gDisplayListHead; gDisplayListHead = temp_v0_17 + 8; - temp_v0_17->unk4 = &D_800E8880; - temp_v0_17->unk0 = 0x400103F; + temp_v0_17->words.w1 = (u32) &D_800E8880; + temp_v0_17->words.w0 = 0x0400103F; temp_v0_18 = gDisplayListHead; gDisplayListHead = temp_v0_18 + 8; - temp_v0_18->unk4 = &D_0D008C78; - temp_v0_18->unk0 = 0x6000000; + temp_v0_18->words.w1 = (u32) D_0D008C78; + temp_v0_18->words.w0 = 0x06000000; temp_v0_19 = gDisplayListHead; gDisplayListHead = temp_v0_19 + 8; - temp_v0_19->unk0 = 0xFD500000; - temp_v0_19->unk4 = D_8018D4B8; + temp_v0_19->words.w0 = 0xFD500000; + temp_v0_19->words.w1 = D_8018D4B8; temp_v0_20 = gDisplayListHead; gDisplayListHead = temp_v0_20 + 8; - temp_v0_20->unk4 = 0x7080200; - temp_v0_20->unk0 = 0xF5500000; + temp_v0_20->words.w1 = 0x07080200; + temp_v0_20->words.w0 = 0xF5500000; temp_v0_21 = gDisplayListHead; gDisplayListHead = temp_v0_21 + 8; - temp_v0_21->unk4 = 0; - temp_v0_21->unk0 = 0xE6000000; + temp_v0_21->words.w1 = 0; + temp_v0_21->words.w0 = 0xE6000000; temp_v0_22 = gDisplayListHead; gDisplayListHead = temp_v0_22 + 8; - temp_v0_22->unk4 = 0x73FF100; - temp_v0_22->unk0 = 0xF3000000; + temp_v0_22->words.w1 = 0x073FF100; + temp_v0_22->words.w0 = 0xF3000000; temp_v0_23 = gDisplayListHead; gDisplayListHead = temp_v0_23 + 8; - temp_v0_23->unk4 = 0; - temp_v0_23->unk0 = 0xE7000000; + temp_v0_23->words.w1 = 0; + temp_v0_23->words.w0 = 0xE7000000; temp_v0_24 = gDisplayListHead; gDisplayListHead = temp_v0_24 + 8; - temp_v0_24->unk0 = 0xF5481000; - temp_v0_24->unk4 = 0x80200; + temp_v0_24->words.w0 = 0xF5481000; + temp_v0_24->words.w1 = 0x00080200; temp_v0_25 = gDisplayListHead; gDisplayListHead = temp_v0_25 + 8; - temp_v0_25->unk0 = 0xF2000000; - temp_v0_25->unk4 = 0xFC07C; + temp_v0_25->words.w0 = 0xF2000000; + temp_v0_25->words.w1 = 0x000FC07C; temp_v0_26 = gDisplayListHead; gDisplayListHead = temp_v0_26 + 8; - temp_v0_26->unk4 = &D_800E88C0; - temp_v0_26->unk0 = 0x400103F; + temp_v0_26->words.w1 = (u32) &D_800E88C0; + temp_v0_26->words.w0 = 0x0400103F; temp_v0_27 = gDisplayListHead; gDisplayListHead = temp_v0_27 + 8; - temp_v0_27->unk4 = &D_0D008DA0; - temp_v0_27->unk0 = 0x6000000; - D_80164AF0 = D_80164AF0 + 1; + temp_v0_27->words.w1 = (u32) D_0D008DA0; + temp_v0_27->words.w0 = 0x06000000; + D_80164AF0 += 1; } } #else @@ -8281,21 +7381,14 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80068310.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_800652D4(f32 *, s16 *, f32); // extern -f32 sins(u16); // extern -f32 coss(u16); // extern -extern Gfx D_0D008C78; -extern Gfx D_0D008DA0; -extern Gfx D_0D008DB8; -extern ? D_800E8A00; -extern ? D_800E8A40; -extern s16 D_80164AF0; -extern s32 D_8018D4C4; -extern s32 D_8018D4C8; -extern void *gDisplayListHead; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32); /* extern */ +extern u32 D_8018D4C4; +extern u32 D_8018D4C8; +static ? D_800E8A00; /* unable to generate initializer */ +static ? D_800E8A40; /* unable to generate initializer */ -void func_80068724(void *arg0, ? arg1, ? arg2, s8 arg3, s8 arg4) { +void func_80068724(Player *player, s8 arg1, s32 arg2, s8 arg3, s32 arg4) { f32 sp8C; f32 sp88; f32 sp84; @@ -8304,131 +7397,127 @@ void func_80068724(void *arg0, ? arg1, ? arg2, s8 arg3, s8 arg4) { s16 sp7C; void *sp24; void *sp20; - f32 *temp_a0; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_14; + Gfx *temp_v0_15; + Gfx *temp_v0_16; + Gfx *temp_v0_17; + Gfx *temp_v0_18; + Gfx *temp_v0_19; + Gfx *temp_v0_20; + Gfx *temp_v0_21; + Gfx *temp_v0_22; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; f32 temp_f8; void *temp_v0; - void *temp_v0_10; - void *temp_v0_11; - void *temp_v0_12; - void *temp_v0_13; - void *temp_v0_14; - void *temp_v0_15; - void *temp_v0_16; - void *temp_v0_17; - void *temp_v0_18; - void *temp_v0_19; - void *temp_v0_20; - void *temp_v0_21; - void *temp_v0_22; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; - void *temp_v1; - temp_v0 = arg0 + (arg4 * 0x48); + temp_v0 = player + ((s8) arg4 * 0x48); if (temp_v0->unk814 == 1) { - temp_v1 = arg0 + (arg3 * 2); - sp88 = arg0->unk18 - 3.0f; - sp20 = temp_v1; + sp88 = player->pos[1] - 3.0f; + sp20 = player + (arg3 * 2); sp24 = temp_v0; - sp8C = (coss(temp_v1->unk48) * -10.0f) + arg0->unk1C; + sp8C = (coss((u16) player->unk_048[arg3]) * -10.0f) + player->pos[2]; temp_f8 = sins(sp20->unk48) * -10.0f; sp7C = 0; - temp_a0 = &sp84; - sp84 = temp_f8 + arg0->unk14; + sp84 = temp_f8 + player->pos[0]; sp80 = 0; - sp7E = sp20->unk48; - func_800652D4(temp_a0, &sp7C, temp_v0->unk804 * arg0->unk224); + sp7E = (s16) sp20->unk48; + func_800652D4(&sp84, &sp7C, temp_v0->unk804 * player->unk_224); temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk4 = &D_0D008DB8; - temp_v0_2->unk0 = 0x6000000; + temp_v0_2->words.w1 = (u32) D_0D008DB8; + temp_v0_2->words.w0 = 0x06000000; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk4 = -0xC07; - temp_v0_3->unk0 = 0xFC127E24; + temp_v0_3->words.w1 = -0x00000C07U; + temp_v0_3->words.w0 = 0xFC127E24; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk4 = 0x504B50; - temp_v0_4->unk0 = 0xB900031D; + temp_v0_4->words.w1 = 0x00504B50; + temp_v0_4->words.w0 = 0xB900031D; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk0 = 0xFD700000; - temp_v0_5->unk4 = D_8018D4C4; + temp_v0_5->words.w0 = 0xFD700000; + temp_v0_5->words.w1 = D_8018D4C4; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0x7000000; - temp_v0_6->unk0 = 0xF5700000; + temp_v0_6->words.w1 = 0x07000000; + temp_v0_6->words.w0 = 0xF5700000; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0; - temp_v0_7->unk0 = 0xE6000000; + temp_v0_7->words.w1 = 0; + temp_v0_7->words.w0 = 0xE6000000; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0x73FF200; - temp_v0_8->unk0 = 0xF3000000; + temp_v0_8->words.w1 = 0x073FF200; + temp_v0_8->words.w0 = 0xF3000000; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; - temp_v0_9->unk4 = 0; - temp_v0_9->unk0 = 0xE7000000; + temp_v0_9->words.w1 = 0; + temp_v0_9->words.w0 = 0xE7000000; temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->unk4 = 0; - temp_v0_10->unk0 = 0xF5680800; + temp_v0_10->words.w1 = 0; + temp_v0_10->words.w0 = 0xF5680800; temp_v0_11 = gDisplayListHead; gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk4 = 0x7C0FC; - temp_v0_11->unk0 = 0xF2000000; + temp_v0_11->words.w1 = 0x0007C0FC; + temp_v0_11->words.w0 = 0xF2000000; temp_v0_12 = gDisplayListHead; gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk4 = &D_800E8A00; - temp_v0_12->unk0 = 0x400103F; + temp_v0_12->words.w1 = (u32) &D_800E8A00; + temp_v0_12->words.w0 = 0x0400103F; temp_v0_13 = gDisplayListHead; gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk4 = &D_0D008C78; - temp_v0_13->unk0 = 0x6000000; + temp_v0_13->words.w1 = (u32) D_0D008C78; + temp_v0_13->words.w0 = 0x06000000; temp_v0_14 = gDisplayListHead; gDisplayListHead = temp_v0_14 + 8; - temp_v0_14->unk0 = 0xFD700000; - temp_v0_14->unk4 = D_8018D4C8; + temp_v0_14->words.w0 = 0xFD700000; + temp_v0_14->words.w1 = D_8018D4C8; temp_v0_15 = gDisplayListHead; gDisplayListHead = temp_v0_15 + 8; - temp_v0_15->unk4 = 0x7000000; - temp_v0_15->unk0 = 0xF5700000; + temp_v0_15->words.w1 = 0x07000000; + temp_v0_15->words.w0 = 0xF5700000; temp_v0_16 = gDisplayListHead; gDisplayListHead = temp_v0_16 + 8; - temp_v0_16->unk4 = 0; - temp_v0_16->unk0 = 0xE6000000; + temp_v0_16->words.w1 = 0; + temp_v0_16->words.w0 = 0xE6000000; temp_v0_17 = gDisplayListHead; gDisplayListHead = temp_v0_17 + 8; - temp_v0_17->unk4 = 0x73FF200; - temp_v0_17->unk0 = 0xF3000000; + temp_v0_17->words.w1 = 0x073FF200; + temp_v0_17->words.w0 = 0xF3000000; temp_v0_18 = gDisplayListHead; gDisplayListHead = temp_v0_18 + 8; - temp_v0_18->unk4 = 0; - temp_v0_18->unk0 = 0xE7000000; + temp_v0_18->words.w1 = 0; + temp_v0_18->words.w0 = 0xE7000000; temp_v0_19 = gDisplayListHead; gDisplayListHead = temp_v0_19 + 8; - temp_v0_19->unk4 = 0; - temp_v0_19->unk0 = 0xF5680800; + temp_v0_19->words.w1 = 0; + temp_v0_19->words.w0 = 0xF5680800; temp_v0_20 = gDisplayListHead; gDisplayListHead = temp_v0_20 + 8; - temp_v0_20->unk4 = 0x7C0FC; - temp_v0_20->unk0 = 0xF2000000; + temp_v0_20->words.w1 = 0x0007C0FC; + temp_v0_20->words.w0 = 0xF2000000; temp_v0_21 = gDisplayListHead; gDisplayListHead = temp_v0_21 + 8; - temp_v0_21->unk4 = &D_800E8A40; - temp_v0_21->unk0 = 0x400103F; + temp_v0_21->words.w1 = (u32) &D_800E8A40; + temp_v0_21->words.w0 = 0x0400103F; temp_v0_22 = gDisplayListHead; gDisplayListHead = temp_v0_22 + 8; - temp_v0_22->unk4 = &D_0D008DA0; - temp_v0_22->unk0 = 0x6000000; - D_80164AF0 = D_80164AF0 + 1; + temp_v0_22->words.w1 = (u32) D_0D008DA0; + temp_v0_22->words.w0 = 0x06000000; + D_80164AF0 += 1; } } #else @@ -8436,112 +7525,99 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80068724.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004B35C(?, ?, ?, ?); // extern -void func_800652D4(f32 *, s16 *, f32); // extern -f32 sins(u16); // extern -f32 coss(u16); // extern -extern Gfx D_0D008D58; -extern Gfx D_0D008DA0; -extern ? D_800E8B40; -extern s16 D_80164AF0; -extern s32 D_8018D4A0; -extern void *gDisplayListHead; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32); /* extern */ +extern u32 D_8018D4A0; +static ? D_800E8B40; /* unable to generate initializer */ -void func_80068AA4(void *arg0, ? arg1, ? arg2, s8 arg3, s8 arg4) { +void func_80068AA4(Player *player, s8 arg1, s32 arg2, s8 arg3, s32 arg4) { f32 sp6C; f32 sp68; f32 sp64; s16 sp60; s16 sp5E; s16 sp5C; - void *sp38; + Gfx *sp38; void *sp28; void *sp24; - f32 *temp_a0; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; f64 temp_f18; void *temp_v0; - void *temp_v0_10; - void *temp_v0_11; - void *temp_v0_12; - void *temp_v0_13; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; - void *temp_v1; - temp_v0 = arg0 + (arg4 * 0x48); - if (temp_v0->unk814 == 1) { - temp_v1 = arg0 + (arg3 * 2); - if (temp_v1->unk244 < 0xD) { - sp68 = arg0->unk18 - 3.0f; - sp24 = temp_v1; - sp28 = temp_v0; - sp6C = (coss(temp_v1->unk48) * (-2.5 * temp_v0->unk816)) + arg0->unk1C; - temp_f18 = sins(temp_v1->unk48); - temp_a0 = &sp64; - sp5C = 0; - sp64 = (temp_f18 * (-2.5 * temp_v0->unk816)) + arg0->unk14; - sp60 = 0; - sp5E = temp_v1->unk48; - func_800652D4(temp_a0, &sp5C, temp_v0->unk804 * arg0->unk224); - temp_v0_2 = gDisplayListHead; - gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0x6000000; - temp_v0_2->unk4 = &D_0D008D58; - temp_v0_3 = gDisplayListHead; - gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk4 = 0; - temp_v0_3->unk0 = 0xBA000E02; - temp_v0_4 = gDisplayListHead; - gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk0 = 0xFD700000; - temp_v0_4->unk4 = D_8018D4A0; - temp_v0_5 = gDisplayListHead; - gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0x7080200; - temp_v0_5->unk0 = 0xF5700000; - temp_v0_6 = gDisplayListHead; - gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0; - temp_v0_6->unk0 = 0xE6000000; - temp_v0_7 = gDisplayListHead; - gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0x73FF100; - temp_v0_7->unk0 = 0xF3000000; - temp_v0_8 = gDisplayListHead; - gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0; - temp_v0_8->unk0 = 0xE7000000; - temp_v0_9 = gDisplayListHead; - gDisplayListHead = temp_v0_9 + 8; - temp_v0_9->unk0 = 0xF5681000; - temp_v0_9->unk4 = 0x80200; - temp_v0_10 = gDisplayListHead; - gDisplayListHead = temp_v0_10 + 8; - sp38 = temp_v0_10; - temp_v0_10->unk4 = 0xFC07C; - temp_v0_10->unk0 = 0xF2000000; - func_8004B35C(0xFF, 0xFF, 0xFF, 0xFF); - temp_v0_11 = gDisplayListHead; - gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk0 = 0xB900031D; - temp_v0_11->unk4 = 0x504B50; - temp_v0_12 = gDisplayListHead; - gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk4 = &D_800E8B40; - temp_v0_12->unk0 = 0x400103F; - temp_v0_13 = gDisplayListHead; - gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk0 = 0x6000000; - temp_v0_13->unk4 = &D_0D008DA0; - D_80164AF0 = D_80164AF0 + 1; - } + temp_v0 = player + ((s8) arg4 * 0x48); + if ((temp_v0->unk814 == 1) && ((s32) player->unk_244[arg3] < 0xD)) { + sp68 = player->pos[1] - 3.0f; + sp24 = player + (arg3 * 2); + sp28 = temp_v0; + sp6C = (f32) (((f64) coss((u16) player->unk_048[arg3]) * (-2.5 * (f64) temp_v0->unk816)) + (f64) player->pos[2]); + temp_f18 = (f64) sins((u16) player->unk_048[arg3]); + sp5C = 0; + sp64 = (f32) ((temp_f18 * (-2.5 * (f64) temp_v0->unk816)) + (f64) player->pos[0]); + sp60 = 0; + sp5E = player->unk_048[arg3]; + func_800652D4(&sp64, &sp5C, temp_v0->unk804 * player->unk_224); + temp_v0_2 = gDisplayListHead; + gDisplayListHead = temp_v0_2 + 8; + temp_v0_2->words.w0 = 0x06000000; + temp_v0_2->words.w1 = (u32) D_0D008D58; + temp_v0_3 = gDisplayListHead; + gDisplayListHead = temp_v0_3 + 8; + temp_v0_3->words.w1 = 0; + temp_v0_3->words.w0 = 0xBA000E02; + temp_v0_4 = gDisplayListHead; + gDisplayListHead = temp_v0_4 + 8; + temp_v0_4->words.w0 = 0xFD700000; + temp_v0_4->words.w1 = D_8018D4A0; + temp_v0_5 = gDisplayListHead; + gDisplayListHead = temp_v0_5 + 8; + temp_v0_5->words.w1 = 0x07080200; + temp_v0_5->words.w0 = 0xF5700000; + temp_v0_6 = gDisplayListHead; + gDisplayListHead = temp_v0_6 + 8; + temp_v0_6->words.w1 = 0; + temp_v0_6->words.w0 = 0xE6000000; + temp_v0_7 = gDisplayListHead; + gDisplayListHead = temp_v0_7 + 8; + temp_v0_7->words.w1 = 0x073FF100; + temp_v0_7->words.w0 = 0xF3000000; + temp_v0_8 = gDisplayListHead; + gDisplayListHead = temp_v0_8 + 8; + temp_v0_8->words.w1 = 0; + temp_v0_8->words.w0 = 0xE7000000; + temp_v0_9 = gDisplayListHead; + gDisplayListHead = temp_v0_9 + 8; + temp_v0_9->words.w0 = 0xF5681000; + temp_v0_9->words.w1 = 0x00080200; + temp_v0_10 = gDisplayListHead; + gDisplayListHead = temp_v0_10 + 8; + sp38 = temp_v0_10; + temp_v0_10->words.w1 = 0x000FC07C; + temp_v0_10->words.w0 = 0xF2000000; + func_8004B35C(0x000000FF, 0x000000FF, 0x000000FF, 0x000000FF); + temp_v0_11 = gDisplayListHead; + gDisplayListHead = temp_v0_11 + 8; + temp_v0_11->words.w0 = 0xB900031D; + temp_v0_11->words.w1 = 0x00504B50; + temp_v0_12 = gDisplayListHead; + gDisplayListHead = temp_v0_12 + 8; + temp_v0_12->words.w1 = (u32) &D_800E8B40; + temp_v0_12->words.w0 = 0x0400103F; + temp_v0_13 = gDisplayListHead; + gDisplayListHead = temp_v0_13 + 8; + temp_v0_13->words.w0 = 0x06000000; + temp_v0_13->words.w1 = (u32) D_0D008DA0; + D_80164AF0 += 1; } } #else @@ -8549,22 +7625,15 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80068AA4.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_800652D4(f32 *, s16 *, f32); // extern -f32 sins(u16); // extern -f32 coss(u16); // extern -extern Gfx D_0D008C78; -extern Gfx D_0D008C90; -extern Gfx D_0D008DA0; -extern ? D_800E52D0; -extern ? D_800E8B80; -extern ? D_800E8BC0; -extern s16 D_80164AF0; -extern s32 D_8018D4A4; -extern s32 D_8018D4A8; -extern void *gDisplayListHead; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32); /* extern */ +extern u32 D_8018D4A4; +extern u32 D_8018D4A8; +static ? D_800E52D0; /* unable to generate initializer */ +static ? D_800E8B80; /* unable to generate initializer */ +static ? D_800E8BC0; /* unable to generate initializer */ -void func_80068DA0(void *arg0, ? arg1, ? arg2, s8 arg3, s8 arg4) { +void func_80068DA0(Player *player, s8 arg1, s32 arg2, s8 arg3, s32 arg4) { f32 spA4; f32 spA0; f32 sp9C; @@ -8573,158 +7642,152 @@ void func_80068DA0(void *arg0, ? arg1, ? arg2, s8 arg3, s8 arg4) { s16 sp94; void *sp28; void *sp24; - f32 *temp_a0; + Gfx *temp_v0; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_14; + Gfx *temp_v0_15; + Gfx *temp_v0_16; + Gfx *temp_v0_17; + Gfx *temp_v0_18; + Gfx *temp_v0_19; + Gfx *temp_v0_20; + Gfx *temp_v0_21; + Gfx *temp_v0_22; + Gfx *temp_v0_23; + Gfx *temp_v0_24; + Gfx *temp_v0_25; + Gfx *temp_v0_26; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; f32 temp_f16; - void *temp_v0; - void *temp_v0_10; - void *temp_v0_11; - void *temp_v0_12; - void *temp_v0_13; - void *temp_v0_14; - void *temp_v0_15; - void *temp_v0_16; - void *temp_v0_17; - void *temp_v0_18; - void *temp_v0_19; - void *temp_v0_20; - void *temp_v0_21; - void *temp_v0_22; - void *temp_v0_23; - void *temp_v0_24; - void *temp_v0_25; - void *temp_v0_26; - void *temp_v0_27; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; void *temp_v1; - temp_v1 = arg0 + (arg4 * 0x48); - if (temp_v1->unk814 == 1) { - temp_v0 = arg0 + (arg3 * 2); - if (temp_v0->unk244 < 0xD) { - spA0 = temp_v1->unk7FC + (arg0->unk18 - 3.0f); - sp28 = temp_v1; - sp24 = temp_v0; - spA4 = (coss(temp_v0->unk48) * -10.0f) + arg0->unk1C; - temp_f16 = sins(temp_v0->unk48) * -10.0f; - sp94 = 0; - temp_a0 = &sp9C; - sp9C = temp_f16 + arg0->unk14; - sp98 = 0; - sp96 = temp_v0->unk48; - func_800652D4(temp_a0, &sp94, temp_v1->unk804 * arg0->unk224); - temp_v0_2 = gDisplayListHead; - gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk4 = &D_0D008C90; - temp_v0_2->unk0 = 0x6000000; - temp_v0_3 = gDisplayListHead; - gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk0 = 0xFD100000; - temp_v0_3->unk4 = &D_800E52D0; - temp_v0_4 = gDisplayListHead; - gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk4 = 0; - temp_v0_4->unk0 = 0xE8000000; - temp_v0_5 = gDisplayListHead; - gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0x7000000; - temp_v0_5->unk0 = 0xF5000100; - temp_v0_6 = gDisplayListHead; - gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0; - temp_v0_6->unk0 = 0xE6000000; - temp_v0_7 = gDisplayListHead; - gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0x73FC000; - temp_v0_7->unk0 = 0xF0000000; - temp_v0_8 = gDisplayListHead; - gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0; - temp_v0_8->unk0 = 0xE7000000; - temp_v0_9 = gDisplayListHead; - gDisplayListHead = temp_v0_9 + 8; - temp_v0_9->unk4 = 0x8000; - temp_v0_9->unk0 = 0xBA000E02; - temp_v0_10 = gDisplayListHead; - gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->unk0 = 0xFD500000; - temp_v0_10->unk4 = D_8018D4A4; - temp_v0_11 = gDisplayListHead; - gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk4 = 0x7000000; - temp_v0_11->unk0 = 0xF5500000; - temp_v0_12 = gDisplayListHead; - gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk4 = 0; - temp_v0_12->unk0 = 0xE6000000; - temp_v0_13 = gDisplayListHead; - gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk4 = 0x73FF100; - temp_v0_13->unk0 = 0xF3000000; - temp_v0_14 = gDisplayListHead; - gDisplayListHead = temp_v0_14 + 8; - temp_v0_14->unk4 = 0; - temp_v0_14->unk0 = 0xE7000000; - temp_v0_15 = gDisplayListHead; - gDisplayListHead = temp_v0_15 + 8; - temp_v0_15->unk4 = 0; - temp_v0_15->unk0 = 0xF5481000; - temp_v0_16 = gDisplayListHead; - gDisplayListHead = temp_v0_16 + 8; - temp_v0_16->unk4 = 0xFC07C; - temp_v0_16->unk0 = 0xF2000000; - temp_v0_17 = gDisplayListHead; - gDisplayListHead = temp_v0_17 + 8; - temp_v0_17->unk4 = &D_800E8B80; - temp_v0_17->unk0 = 0x400103F; - temp_v0_18 = gDisplayListHead; - gDisplayListHead = temp_v0_18 + 8; - temp_v0_18->unk4 = &D_0D008C78; - temp_v0_18->unk0 = 0x6000000; - temp_v0_19 = gDisplayListHead; - gDisplayListHead = temp_v0_19 + 8; - temp_v0_19->unk0 = 0xFD500000; - temp_v0_19->unk4 = D_8018D4A8; - temp_v0_20 = gDisplayListHead; - gDisplayListHead = temp_v0_20 + 8; - temp_v0_20->unk4 = 0x7000000; - temp_v0_20->unk0 = 0xF5500000; - temp_v0_21 = gDisplayListHead; - gDisplayListHead = temp_v0_21 + 8; - temp_v0_21->unk4 = 0; - temp_v0_21->unk0 = 0xE6000000; - temp_v0_22 = gDisplayListHead; - gDisplayListHead = temp_v0_22 + 8; - temp_v0_22->unk4 = 0x73FF100; - temp_v0_22->unk0 = 0xF3000000; - temp_v0_23 = gDisplayListHead; - gDisplayListHead = temp_v0_23 + 8; - temp_v0_23->unk4 = 0; - temp_v0_23->unk0 = 0xE7000000; - temp_v0_24 = gDisplayListHead; - gDisplayListHead = temp_v0_24 + 8; - temp_v0_24->unk4 = 0; - temp_v0_24->unk0 = 0xF5481000; - temp_v0_25 = gDisplayListHead; - gDisplayListHead = temp_v0_25 + 8; - temp_v0_25->unk4 = 0xFC07C; - temp_v0_25->unk0 = 0xF2000000; - temp_v0_26 = gDisplayListHead; - gDisplayListHead = temp_v0_26 + 8; - temp_v0_26->unk4 = &D_800E8BC0; - temp_v0_26->unk0 = 0x400103F; - temp_v0_27 = gDisplayListHead; - gDisplayListHead = temp_v0_27 + 8; - temp_v0_27->unk4 = &D_0D008DA0; - temp_v0_27->unk0 = 0x6000000; - D_80164AF0 = D_80164AF0 + 1; - } + temp_v1 = player + ((s8) arg4 * 0x48); + if ((temp_v1->unk814 == 1) && ((s32) player->unk_244[arg3] < 0xD)) { + spA0 = temp_v1->unk7FC + (player->pos[1] - 3.0f); + sp28 = temp_v1; + sp24 = player + (arg3 * 2); + spA4 = (coss((u16) player->unk_048[arg3]) * -10.0f) + player->pos[2]; + temp_f16 = sins((u16) player->unk_048[arg3]) * -10.0f; + sp94 = 0; + sp9C = temp_f16 + player->pos[0]; + sp98 = 0; + sp96 = player->unk_048[arg3]; + func_800652D4(&sp9C, &sp94, temp_v1->unk804 * player->unk_224); + temp_v0 = gDisplayListHead; + gDisplayListHead = temp_v0 + 8; + temp_v0->words.w1 = (u32) D_0D008C90; + temp_v0->words.w0 = 0x06000000; + temp_v0_2 = gDisplayListHead; + gDisplayListHead = temp_v0_2 + 8; + temp_v0_2->words.w0 = 0xFD100000; + temp_v0_2->words.w1 = (u32) &D_800E52D0; + temp_v0_3 = gDisplayListHead; + gDisplayListHead = temp_v0_3 + 8; + temp_v0_3->words.w1 = 0; + temp_v0_3->words.w0 = 0xE8000000; + temp_v0_4 = gDisplayListHead; + gDisplayListHead = temp_v0_4 + 8; + temp_v0_4->words.w1 = 0x07000000; + temp_v0_4->words.w0 = 0xF5000100; + temp_v0_5 = gDisplayListHead; + gDisplayListHead = temp_v0_5 + 8; + temp_v0_5->words.w1 = 0; + temp_v0_5->words.w0 = 0xE6000000; + temp_v0_6 = gDisplayListHead; + gDisplayListHead = temp_v0_6 + 8; + temp_v0_6->words.w1 = 0x073FC000; + temp_v0_6->words.w0 = 0xF0000000; + temp_v0_7 = gDisplayListHead; + gDisplayListHead = temp_v0_7 + 8; + temp_v0_7->words.w1 = 0; + temp_v0_7->words.w0 = 0xE7000000; + temp_v0_8 = gDisplayListHead; + gDisplayListHead = temp_v0_8 + 8; + temp_v0_8->words.w1 = 0x00008000; + temp_v0_8->words.w0 = 0xBA000E02; + temp_v0_9 = gDisplayListHead; + gDisplayListHead = temp_v0_9 + 8; + temp_v0_9->words.w0 = 0xFD500000; + temp_v0_9->words.w1 = D_8018D4A4; + temp_v0_10 = gDisplayListHead; + gDisplayListHead = temp_v0_10 + 8; + temp_v0_10->words.w1 = 0x07000000; + temp_v0_10->words.w0 = 0xF5500000; + temp_v0_11 = gDisplayListHead; + gDisplayListHead = temp_v0_11 + 8; + temp_v0_11->words.w1 = 0; + temp_v0_11->words.w0 = 0xE6000000; + temp_v0_12 = gDisplayListHead; + gDisplayListHead = temp_v0_12 + 8; + temp_v0_12->words.w1 = 0x073FF100; + temp_v0_12->words.w0 = 0xF3000000; + temp_v0_13 = gDisplayListHead; + gDisplayListHead = temp_v0_13 + 8; + temp_v0_13->words.w1 = 0; + temp_v0_13->words.w0 = 0xE7000000; + temp_v0_14 = gDisplayListHead; + gDisplayListHead = temp_v0_14 + 8; + temp_v0_14->words.w1 = 0; + temp_v0_14->words.w0 = 0xF5481000; + temp_v0_15 = gDisplayListHead; + gDisplayListHead = temp_v0_15 + 8; + temp_v0_15->words.w1 = 0x000FC07C; + temp_v0_15->words.w0 = 0xF2000000; + temp_v0_16 = gDisplayListHead; + gDisplayListHead = temp_v0_16 + 8; + temp_v0_16->words.w1 = (u32) &D_800E8B80; + temp_v0_16->words.w0 = 0x0400103F; + temp_v0_17 = gDisplayListHead; + gDisplayListHead = temp_v0_17 + 8; + temp_v0_17->words.w1 = (u32) D_0D008C78; + temp_v0_17->words.w0 = 0x06000000; + temp_v0_18 = gDisplayListHead; + gDisplayListHead = temp_v0_18 + 8; + temp_v0_18->words.w0 = 0xFD500000; + temp_v0_18->words.w1 = D_8018D4A8; + temp_v0_19 = gDisplayListHead; + gDisplayListHead = temp_v0_19 + 8; + temp_v0_19->words.w1 = 0x07000000; + temp_v0_19->words.w0 = 0xF5500000; + temp_v0_20 = gDisplayListHead; + gDisplayListHead = temp_v0_20 + 8; + temp_v0_20->words.w1 = 0; + temp_v0_20->words.w0 = 0xE6000000; + temp_v0_21 = gDisplayListHead; + gDisplayListHead = temp_v0_21 + 8; + temp_v0_21->words.w1 = 0x073FF100; + temp_v0_21->words.w0 = 0xF3000000; + temp_v0_22 = gDisplayListHead; + gDisplayListHead = temp_v0_22 + 8; + temp_v0_22->words.w1 = 0; + temp_v0_22->words.w0 = 0xE7000000; + temp_v0_23 = gDisplayListHead; + gDisplayListHead = temp_v0_23 + 8; + temp_v0_23->words.w1 = 0; + temp_v0_23->words.w0 = 0xF5481000; + temp_v0_24 = gDisplayListHead; + gDisplayListHead = temp_v0_24 + 8; + temp_v0_24->words.w1 = 0x000FC07C; + temp_v0_24->words.w0 = 0xF2000000; + temp_v0_25 = gDisplayListHead; + gDisplayListHead = temp_v0_25 + 8; + temp_v0_25->words.w1 = (u32) &D_800E8BC0; + temp_v0_25->words.w0 = 0x0400103F; + temp_v0_26 = gDisplayListHead; + gDisplayListHead = temp_v0_26 + 8; + temp_v0_26->words.w1 = (u32) D_0D008DA0; + temp_v0_26->words.w0 = 0x06000000; + D_80164AF0 += 1; } } #else @@ -8838,18 +7901,39 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800691B8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004B72C(s16, s16, s16, s16, s32, s32, s32); // extern -void func_800652D4(f32 *, s16 *, f32, s8); // extern -extern Gfx D_0D008DB8; -extern Gfx D_0D008E48; -extern ? D_800E47DC; -extern ? D_800E480C; -extern s16 D_80164AF0; -extern s32 D_8018D494; -extern s32 *gDisplayListHead; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32, s8); /* extern */ +extern u32 D_8018D494; +static s32 D_800E47DC[0xC] = { + 0x00FBFFFB, + 0x00A06011, + 0x00E0C090, + 0x00D0B080, + 0x00907040, + 0x00C07010, + 0x00D0F0FF, + 0x00E09030, + 0x00C09030, + 0x00604020, + 0x00F0D0B0, + 0x00A08030, +}; +static s32 D_800E480C[0xC] = { + 0x00B0B0B0, + 0x00804011, + 0x00B08050, + 0x00A07040, + 0x00603011, + 0x00804010, + 0x007090A0, + 0x00A06030, + 0x00A07010, + 0x00301011, + 0x00B0A080, + 0x00806010, +}; -void func_80069444(void *arg0, ? arg1, s16 arg2, s8 arg3) { +void func_80069444(Player *player, s32 arg1, s16 arg2, s8 arg3) { f32 sp7C; f32 sp78; f32 sp74; @@ -8863,26 +7947,26 @@ void func_80069444(void *arg0, ? arg1, s16 arg2, s8 arg3) { s16 sp62; s16 sp60; s16 sp5E; - s32 *sp3C; - s32 *temp_v0_10; - s32 *temp_v0_2; - s32 *temp_v0_3; - s32 *temp_v0_4; - s32 *temp_v0_5; - s32 *temp_v0_6; - s32 *temp_v0_7; - s32 *temp_v0_8; - s32 *temp_v0_9; - s32 temp_t9; + Gfx *sp3C; + Gfx *temp_v0_10; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; + s16 temp_a0; s32 temp_v0; s32 temp_v1; void *temp_a1; - temp_a1 = arg0 + (arg2 * 0x48); + temp_a1 = player + (arg2 * 0x48); if (temp_a1->unkAE4 == 1) { - temp_t9 = temp_a1->unkB00 * 4; - temp_v0 = *(&D_800E47DC + temp_t9); - temp_v1 = *(&D_800E480C + temp_t9); + temp_a0 = temp_a1->unkB00; + temp_v0 = D_800E47DC[temp_a0]; + temp_v1 = D_800E480C[temp_a0]; sp6A = (temp_v0 >> 0x10) & 0xFF; sp68 = (temp_v0 >> 8) & 0xFF; sp66 = temp_v0 & 0xFF; @@ -8895,47 +7979,47 @@ void func_80069444(void *arg0, ? arg1, s16 arg2, s8 arg3) { sp6C = 0; sp7C = temp_a1->unkAD0; sp70 = 0; - sp6E = (arg0 + (arg3 * 2))->unk48; - func_800652D4(&sp74, &sp6C, arg0->unk224 * 1.5, arg3); + sp6E = player->unk_048[arg3]; + func_800652D4(&sp74, &sp6C, (f32) ((f64) player->unk_224 * 1.5), arg3); temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0x6000000; - temp_v0_2->unk4 = &D_0D008DB8; + temp_v0_2->words.w0 = 0x06000000; + temp_v0_2->words.w1 = (u32) D_0D008DB8; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk0 = 0xFD900000; - temp_v0_3->unk4 = D_8018D494; + temp_v0_3->words.w0 = 0xFD900000; + temp_v0_3->words.w1 = D_8018D494; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk0 = 0xF5900000; - temp_v0_4->unk4 = 0x7000000; + temp_v0_4->words.w0 = 0xF5900000; + temp_v0_4->words.w1 = 0x07000000; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk0 = 0xE6000000; - temp_v0_5->unk4 = 0; + temp_v0_5->words.w0 = 0xE6000000; + temp_v0_5->words.w1 = 0; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk0 = 0xF3000000; - temp_v0_6->unk4 = 0x71FF200; + temp_v0_6->words.w0 = 0xF3000000; + temp_v0_6->words.w1 = 0x071FF200; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk0 = 0xE7000000; - temp_v0_7->unk4 = 0; + temp_v0_7->words.w0 = 0xE7000000; + temp_v0_7->words.w1 = 0; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk0 = 0xF5880800; - temp_v0_8->unk4 = 0; + temp_v0_8->words.w0 = 0xF5880800; + temp_v0_8->words.w1 = 0; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; sp3C = temp_v0_9; - temp_v0_9->unk0 = 0xF2000000; - sp3C->unk4 = 0x7C07C; - func_8004B72C(sp6A, sp68, sp66, sp62, sp60, sp5E, sp64); + temp_v0_9->words.w0 = 0xF2000000; + sp3C->words.w1 = 0x0007C07C; + func_8004B72C((s32) sp6A, (s32) sp68, (s32) sp66, (s32) sp62, (s32) sp60, (s32) sp5E, (s32) sp64); temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->unk0 = 0x6000000; - temp_v0_10->unk4 = &D_0D008E48; - D_80164AF0 = D_80164AF0 + 1; + temp_v0_10->words.w0 = 0x06000000; + temp_v0_10->words.w1 = (u32) D_0D008E48; + D_80164AF0 += 1; } } #else @@ -8943,17 +8027,12 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80069444.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004B35C(?, ?, ?, s16); // extern -void func_800652D4(f32 *, s16 *, f32, s8); // extern -extern Gfx D_0D008D58; -extern Gfx D_0D008DA0; -extern Gfx D_800E87C0; -extern s16 D_80164AF0; -extern s32 D_8018D488; -extern void *gDisplayListHead; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32, s8); /* extern */ +extern u32 D_8018D488; +static ? D_800E87C0; /* unable to generate initializer */ -void func_800696CC(void *arg0, ? arg1, s16 arg2, s8 arg3, f32 arg4) { +void func_800696CC(Player *player, s32 arg1, s16 arg2, s8 arg3, f32 arg4) { f32 sp64; f32 sp60; f32 sp5C; @@ -8961,88 +8040,84 @@ void func_800696CC(void *arg0, ? arg1, s16 arg2, s8 arg3, f32 arg4) { s16 sp56; s16 sp54; s16 sp52; - void *sp30; - void *sp2C; - f32 *temp_a0; - s16 *temp_a1; + Gfx *sp30; + Gfx *sp2C; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; void *temp_v0; - void *temp_v0_10; - void *temp_v0_11; - void *temp_v0_12; - void *temp_v0_13; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; - temp_v0 = arg0 + (arg2 * 0x48); + temp_v0 = player + (arg2 * 0x48); if (temp_v0->unkAE4 == 1) { sp52 = temp_v0->unkB06; - temp_a0 = &sp5C; sp5C = temp_v0->unkAC8; - temp_a1 = &sp54; sp60 = temp_v0->unkACC; sp54 = 0; sp64 = temp_v0->unkAD0; sp58 = 0; - sp56 = (arg0 + (arg3 * 2))->unk48; - func_800652D4(temp_a0, temp_a1, arg0->unk224 * arg4, arg3); + sp56 = player->unk_048[arg3]; + func_800652D4(&sp5C, &sp54, player->unk_224 * arg4, arg3); temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0x6000000; - temp_v0_2->unk4 = &D_0D008D58; + temp_v0_2->words.w0 = 0x06000000; + temp_v0_2->words.w1 = (u32) D_0D008D58; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk4 = 0; - temp_v0_3->unk0 = 0xBA000E02; + temp_v0_3->words.w1 = 0; + temp_v0_3->words.w0 = 0xBA000E02; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk0 = 0xFD700000; - temp_v0_4->unk4 = D_8018D488; + temp_v0_4->words.w0 = 0xFD700000; + temp_v0_4->words.w1 = D_8018D488; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0x7080200; - temp_v0_5->unk0 = 0xF5700000; + temp_v0_5->words.w1 = 0x07080200; + temp_v0_5->words.w0 = 0xF5700000; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0; - temp_v0_6->unk0 = 0xE6000000; + temp_v0_6->words.w1 = 0; + temp_v0_6->words.w0 = 0xE6000000; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0x71FF200; - temp_v0_7->unk0 = 0xF3000000; + temp_v0_7->words.w1 = 0x071FF200; + temp_v0_7->words.w0 = 0xF3000000; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0; - temp_v0_8->unk0 = 0xE7000000; + temp_v0_8->words.w1 = 0; + temp_v0_8->words.w0 = 0xE7000000; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; sp30 = temp_v0_9; - temp_v0_9->unk0 = 0xF5680800; - temp_v0_9->unk4 = 0x80200; + temp_v0_9->words.w0 = 0xF5680800; + temp_v0_9->words.w1 = 0x00080200; temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; sp2C = temp_v0_10; - temp_v0_10->unk0 = 0xF2000000; - temp_v0_10->unk4 = 0x7C07C; - func_8004B35C(0xFF, 0xFF, 0, sp52); + temp_v0_10->words.w0 = 0xF2000000; + temp_v0_10->words.w1 = 0x0007C07C; + func_8004B35C(0x000000FF, 0x000000FF, 0, (s32) sp52); temp_v0_11 = gDisplayListHead; gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk0 = 0xB900031D; - temp_v0_11->unk4 = 0x504B50; + temp_v0_11->words.w0 = 0xB900031D; + temp_v0_11->words.w1 = 0x00504B50; temp_v0_12 = gDisplayListHead; gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk4 = &D_800E87C0; - temp_v0_12->unk0 = 0x400103F; + temp_v0_12->words.w1 = (u32) &D_800E87C0; + temp_v0_12->words.w0 = 0x0400103F; temp_v0_13 = gDisplayListHead; gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk0 = 0x6000000; - temp_v0_13->unk4 = &D_0D008DA0; - D_80164AF0 = D_80164AF0 + 1; + temp_v0_13->words.w0 = 0x06000000; + temp_v0_13->words.w1 = (u32) D_0D008DA0; + D_80164AF0 += 1; } } #else @@ -9050,17 +8125,12 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800696CC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004B35C(?, ?, ?, s16); // extern -void func_800652D4(f32 *, s16 *, f32, s8); // extern -extern Gfx D_0D008D58; -extern Gfx D_0D008DA0; -extern Gfx D_800E87C0; -extern s16 D_80164AF0; -extern s32 D_8018D488; -extern void *gDisplayListHead; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32, s8); /* extern */ +extern u32 D_8018D488; +static ? D_800E87C0; /* unable to generate initializer */ -void func_80069938(void *arg0, ? arg1, s16 arg2, s8 arg3) { +void func_80069938(Player *player, s32 arg1, s16 arg2, s8 arg3) { f32 sp64; f32 sp60; f32 sp5C; @@ -9068,88 +8138,84 @@ void func_80069938(void *arg0, ? arg1, s16 arg2, s8 arg3) { s16 sp56; s16 sp54; s16 sp52; - void *sp30; - void *sp2C; - f32 *temp_a0; - s16 *temp_a1; + Gfx *sp30; + Gfx *sp2C; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; void *temp_v0; - void *temp_v0_10; - void *temp_v0_11; - void *temp_v0_12; - void *temp_v0_13; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; - temp_v0 = arg0 + (arg2 * 0x48); + temp_v0 = player + (arg2 * 0x48); if (temp_v0->unkAE4 == 1) { sp52 = temp_v0->unkB06; - temp_a0 = &sp5C; - temp_a1 = &sp54; sp5C = temp_v0->unkAC8; sp60 = temp_v0->unkACC; sp54 = 0; sp64 = temp_v0->unkAD0; - sp56 = (arg0 + (arg3 * 2))->unk48; + sp56 = player->unk_048[arg3]; sp58 = temp_v0->unkB00; - func_800652D4(temp_a0, temp_a1, temp_v0->unkAD4 * arg0->unk224, arg3); + func_800652D4(&sp5C, &sp54, temp_v0->unkAD4 * player->unk_224, arg3); temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0x6000000; - temp_v0_2->unk4 = &D_0D008D58; + temp_v0_2->words.w0 = 0x06000000; + temp_v0_2->words.w1 = (u32) D_0D008D58; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk4 = 0; - temp_v0_3->unk0 = 0xBA000E02; + temp_v0_3->words.w1 = 0; + temp_v0_3->words.w0 = 0xBA000E02; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk0 = 0xFD700000; - temp_v0_4->unk4 = D_8018D488; + temp_v0_4->words.w0 = 0xFD700000; + temp_v0_4->words.w1 = D_8018D488; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0x7080200; - temp_v0_5->unk0 = 0xF5700000; + temp_v0_5->words.w1 = 0x07080200; + temp_v0_5->words.w0 = 0xF5700000; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0; - temp_v0_6->unk0 = 0xE6000000; + temp_v0_6->words.w1 = 0; + temp_v0_6->words.w0 = 0xE6000000; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0x71FF200; - temp_v0_7->unk0 = 0xF3000000; + temp_v0_7->words.w1 = 0x071FF200; + temp_v0_7->words.w0 = 0xF3000000; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0; - temp_v0_8->unk0 = 0xE7000000; + temp_v0_8->words.w1 = 0; + temp_v0_8->words.w0 = 0xE7000000; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; sp30 = temp_v0_9; - temp_v0_9->unk0 = 0xF5680800; - temp_v0_9->unk4 = 0x80200; + temp_v0_9->words.w0 = 0xF5680800; + temp_v0_9->words.w1 = 0x00080200; temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; sp2C = temp_v0_10; - temp_v0_10->unk0 = 0xF2000000; - temp_v0_10->unk4 = 0x7C07C; - func_8004B35C(0xFF, 0xFF, 0, sp52); + temp_v0_10->words.w0 = 0xF2000000; + temp_v0_10->words.w1 = 0x0007C07C; + func_8004B35C(0x000000FF, 0x000000FF, 0, (s32) sp52); temp_v0_11 = gDisplayListHead; gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk0 = 0xB900031D; - temp_v0_11->unk4 = 0x504B50; + temp_v0_11->words.w0 = 0xB900031D; + temp_v0_11->words.w1 = 0x00504B50; temp_v0_12 = gDisplayListHead; gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk4 = &D_800E87C0; - temp_v0_12->unk0 = 0x400103F; + temp_v0_12->words.w1 = (u32) &D_800E87C0; + temp_v0_12->words.w0 = 0x0400103F; temp_v0_13 = gDisplayListHead; gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk0 = 0x6000000; - temp_v0_13->unk4 = &D_0D008DA0; - D_80164AF0 = D_80164AF0 + 1; + temp_v0_13->words.w0 = 0x06000000; + temp_v0_13->words.w1 = (u32) D_0D008DA0; + D_80164AF0 += 1; } } #else @@ -9157,16 +8223,11 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80069938.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004B35C(s16, s16, s16, s16); // extern -void func_800652D4(f32 *, s16 *, f32, s8); // extern -extern Gfx D_0D008DB8; -extern Gfx D_0D008E48; -extern s16 D_80164AF0; -extern s32 D_8018D48C; -extern void *gDisplayListHead; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32, s8); /* extern */ +extern u32 D_8018D48C; -void func_80069BA8(void *arg0, ? arg1, s16 arg2, s8 arg3) { +void func_80069BA8(Player *player, s32 arg1, s16 arg2, s8 arg3) { f32 sp5C; f32 sp58; f32 sp54; @@ -9177,74 +8238,70 @@ void func_80069BA8(void *arg0, ? arg1, s16 arg2, s8 arg3) { s16 sp48; s16 sp46; s16 sp44; - void *sp24; - f32 *temp_a0; - s16 *temp_a1; + Gfx *sp24; + Gfx *temp_v0_10; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; void *temp_v0; - void *temp_v0_10; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; - temp_v0 = arg0 + (arg2 * 0x48); + temp_v0 = player + (arg2 * 0x48); if (temp_v0->unkAE4 == 1) { - temp_a1 = &sp4C; sp4A = temp_v0->unkB00; sp48 = temp_v0->unkB02; sp46 = temp_v0->unkB04; - temp_a0 = &sp54; sp44 = temp_v0->unkB06; sp54 = temp_v0->unkAC8; sp58 = temp_v0->unkACC; sp4C = 0; sp5C = temp_v0->unkAD0; sp50 = 0; - sp4E = (arg0 + (arg3 * 2))->unk48; - func_800652D4(temp_a0, temp_a1, temp_v0->unkAD4 * arg0->unk224, arg3); + sp4E = player->unk_048[arg3]; + func_800652D4(&sp54, &sp4C, temp_v0->unkAD4 * player->unk_224, arg3); temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0x6000000; - temp_v0_2->unk4 = &D_0D008DB8; + temp_v0_2->words.w0 = 0x06000000; + temp_v0_2->words.w1 = (u32) D_0D008DB8; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk0 = 0xFD700000; - temp_v0_3->unk4 = D_8018D48C; + temp_v0_3->words.w0 = 0xFD700000; + temp_v0_3->words.w1 = D_8018D48C; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk4 = 0x7000000; - temp_v0_4->unk0 = 0xF5700000; + temp_v0_4->words.w1 = 0x07000000; + temp_v0_4->words.w0 = 0xF5700000; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0; - temp_v0_5->unk0 = 0xE6000000; + temp_v0_5->words.w1 = 0; + temp_v0_5->words.w0 = 0xE6000000; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0x71FF200; - temp_v0_6->unk0 = 0xF3000000; + temp_v0_6->words.w1 = 0x071FF200; + temp_v0_6->words.w0 = 0xF3000000; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0; - temp_v0_7->unk0 = 0xE7000000; + temp_v0_7->words.w1 = 0; + temp_v0_7->words.w0 = 0xE7000000; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0; - temp_v0_8->unk0 = 0xF5680800; + temp_v0_8->words.w1 = 0; + temp_v0_8->words.w0 = 0xF5680800; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; sp24 = temp_v0_9; - temp_v0_9->unk4 = 0x7C07C; - temp_v0_9->unk0 = 0xF2000000; - func_8004B35C(sp4A, sp48, sp46, sp44); + temp_v0_9->words.w1 = 0x0007C07C; + temp_v0_9->words.w0 = 0xF2000000; + func_8004B35C((s32) sp4A, (s32) sp48, (s32) sp46, (s32) sp44); temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->unk0 = 0x6000000; - temp_v0_10->unk4 = &D_0D008E48; - D_80164AF0 = D_80164AF0 + 1; + temp_v0_10->words.w0 = 0x06000000; + temp_v0_10->words.w1 = (u32) D_0D008E48; + D_80164AF0 += 1; } } #else @@ -9252,102 +8309,95 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80069BA8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004B35C(?, ?, ?, ?); // extern -void func_800652D4(f32 *, s16 *, f32); // extern -extern Gfx D_0D008D58; -extern Gfx D_0D008DA0; -extern ? D_800E8740; -extern s16 D_80164AF0; -extern s32 D_8018D49C; -extern void *gDisplayListHead; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32); /* extern */ +extern u32 D_8018D49C; +static ? D_800E8740; /* unable to generate initializer */ -void func_80069DB8(void *arg0, ? arg1, s16 arg2, s8 arg3) { +void func_80069DB8(Player *player, s32 arg1, s16 arg2, s8 arg3) { f32 sp64; f32 sp60; f32 sp5C; s16 sp58; s16 sp56; s16 sp54; - void *sp2C; - void *sp28; - s16 *temp_a1; + Gfx *sp2C; + Gfx *sp28; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; void *temp_v0; - void *temp_v0_10; - void *temp_v0_11; - void *temp_v0_12; - void *temp_v0_13; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; - temp_v0 = arg0 + (arg2 * 0x48); + temp_v0 = player + (arg2 * 0x48); if (temp_v0->unkAE4 == 1) { sp5C = temp_v0->unkAC8; - temp_a1 = &sp54; sp60 = temp_v0->unkACC; sp54 = 0; sp64 = temp_v0->unkAD0; sp58 = 0; - sp56 = (arg0 + (arg3 * 2))->unk48; - func_800652D4(&sp5C, temp_a1, temp_v0->unkAD4 * arg0->unk224); + sp56 = player->unk_048[arg3]; + func_800652D4(&sp5C, &sp54, temp_v0->unkAD4 * player->unk_224); temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0x6000000; - temp_v0_2->unk4 = &D_0D008D58; + temp_v0_2->words.w0 = 0x06000000; + temp_v0_2->words.w1 = (u32) D_0D008D58; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk4 = 0; - temp_v0_3->unk0 = 0xBA000E02; + temp_v0_3->words.w1 = 0; + temp_v0_3->words.w0 = 0xBA000E02; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk0 = 0xFD700000; - temp_v0_4->unk4 = D_8018D49C; + temp_v0_4->words.w0 = 0xFD700000; + temp_v0_4->words.w1 = D_8018D49C; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0x7080200; - temp_v0_5->unk0 = 0xF5700000; + temp_v0_5->words.w1 = 0x07080200; + temp_v0_5->words.w0 = 0xF5700000; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0; - temp_v0_6->unk0 = 0xE6000000; + temp_v0_6->words.w1 = 0; + temp_v0_6->words.w0 = 0xE6000000; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0x70FF200; - temp_v0_7->unk0 = 0xF3000000; + temp_v0_7->words.w1 = 0x070FF200; + temp_v0_7->words.w0 = 0xF3000000; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0; - temp_v0_8->unk0 = 0xE7000000; + temp_v0_8->words.w1 = 0; + temp_v0_8->words.w0 = 0xE7000000; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; sp2C = temp_v0_9; - temp_v0_9->unk0 = 0xF5700800; - temp_v0_9->unk4 = 0x80200; + temp_v0_9->words.w0 = 0xF5700800; + temp_v0_9->words.w1 = 0x00080200; temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; sp28 = temp_v0_10; - temp_v0_10->unk4 = 0x3C03C; - temp_v0_10->unk0 = 0xF2000000; - func_8004B35C(0xFF, 0xFF, 0xFF, 0xFF); + temp_v0_10->words.w1 = 0x0003C03C; + temp_v0_10->words.w0 = 0xF2000000; + func_8004B35C(0x000000FF, 0x000000FF, 0x000000FF, 0x000000FF); temp_v0_11 = gDisplayListHead; gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk0 = 0xB900031D; - temp_v0_11->unk4 = 0x504B50; + temp_v0_11->words.w0 = 0xB900031D; + temp_v0_11->words.w1 = 0x00504B50; temp_v0_12 = gDisplayListHead; gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk4 = &D_800E8740; - temp_v0_12->unk0 = 0x400103F; + temp_v0_12->words.w1 = (u32) &D_800E8740; + temp_v0_12->words.w0 = 0x0400103F; temp_v0_13 = gDisplayListHead; gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk0 = 0x6000000; - temp_v0_13->unk4 = &D_0D008DA0; - D_80164AF0 = D_80164AF0 + 1; + temp_v0_13->words.w0 = 0x06000000; + temp_v0_13->words.w1 = (u32) D_0D008DA0; + D_80164AF0 += 1; } } #else @@ -9355,102 +8405,94 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80069DB8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004B35C(?, ?, ?, ?); // extern -void func_800652D4(f32 *, s16 *, f32); // extern -extern Vtx D_0D008B78; -extern Gfx D_0D008D58; -extern Gfx D_0D008DA0; -extern s16 D_80164AF0; -extern s32 D_8018D49C; -extern void *gDisplayListHead; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32); /* extern */ +extern u32 D_8018D49C; -void func_8006A01C(void *arg0, ? arg1, s16 arg2, s8 arg3) { +void func_8006A01C(Player *player, s32 arg1, s16 arg2, s8 arg3) { f32 sp5C; f32 sp58; f32 sp54; s16 sp50; s16 sp4E; s16 sp4C; - void *sp2C; - void *sp28; - s16 *temp_a1; + Gfx *sp2C; + Gfx *sp28; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; void *temp_v0; - void *temp_v0_10; - void *temp_v0_11; - void *temp_v0_12; - void *temp_v0_13; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; - temp_v0 = arg0 + (arg2 * 0x48); - if (temp_v0->unk274 == 1) { + temp_v0 = player + (arg2 * 0x48); + if (player->unk_258[arg2].unk_01C == 1) { sp54 = temp_v0->unk528; - temp_a1 = &sp4C; sp58 = temp_v0->unk52C; sp4C = 0; sp5C = temp_v0->unk530; sp50 = 0; - sp4E = (arg0 + (arg3 * 2))->unk48; - func_800652D4(&sp54, temp_a1, temp_v0->unk534 * arg0->unk224); + sp4E = player->unk_048[arg3]; + func_800652D4(&sp54, &sp4C, temp_v0->unk534 * player->unk_224); temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0x6000000; - temp_v0_2->unk4 = &D_0D008D58; + temp_v0_2->words.w0 = 0x06000000; + temp_v0_2->words.w1 = (u32) D_0D008D58; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk4 = 0; - temp_v0_3->unk0 = 0xBA000E02; + temp_v0_3->words.w1 = 0; + temp_v0_3->words.w0 = 0xBA000E02; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk0 = 0xFD700000; - temp_v0_4->unk4 = D_8018D49C; + temp_v0_4->words.w0 = 0xFD700000; + temp_v0_4->words.w1 = D_8018D49C; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0x7080200; - temp_v0_5->unk0 = 0xF5700000; + temp_v0_5->words.w1 = 0x07080200; + temp_v0_5->words.w0 = 0xF5700000; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0; - temp_v0_6->unk0 = 0xE6000000; + temp_v0_6->words.w1 = 0; + temp_v0_6->words.w0 = 0xE6000000; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0x70FF200; - temp_v0_7->unk0 = 0xF3000000; + temp_v0_7->words.w1 = 0x070FF200; + temp_v0_7->words.w0 = 0xF3000000; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0; - temp_v0_8->unk0 = 0xE7000000; + temp_v0_8->words.w1 = 0; + temp_v0_8->words.w0 = 0xE7000000; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; sp2C = temp_v0_9; - temp_v0_9->unk0 = 0xF5700800; - temp_v0_9->unk4 = 0x80200; + temp_v0_9->words.w0 = 0xF5700800; + temp_v0_9->words.w1 = 0x00080200; temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; sp28 = temp_v0_10; - temp_v0_10->unk4 = 0x3C03C; - temp_v0_10->unk0 = 0xF2000000; - func_8004B35C(0xFF, 0xFF, 0xFF, 0xFF); + temp_v0_10->words.w1 = 0x0003C03C; + temp_v0_10->words.w0 = 0xF2000000; + func_8004B35C(0x000000FF, 0x000000FF, 0x000000FF, 0x000000FF); temp_v0_11 = gDisplayListHead; gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk0 = 0xB900031D; - temp_v0_11->unk4 = 0x504B50; + temp_v0_11->words.w0 = 0xB900031D; + temp_v0_11->words.w1 = 0x00504B50; temp_v0_12 = gDisplayListHead; gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk4 = &D_0D008B78; - temp_v0_12->unk0 = 0x400103F; + temp_v0_12->words.w1 = (u32) D_0D008B78; + temp_v0_12->words.w0 = 0x0400103F; temp_v0_13 = gDisplayListHead; gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk0 = 0x6000000; - temp_v0_13->unk4 = &D_0D008DA0; - D_80164AF0 = D_80164AF0 + 1; + temp_v0_13->words.w0 = 0x06000000; + temp_v0_13->words.w1 = (u32) D_0D008DA0; + D_80164AF0 += 1; } } #else @@ -9458,17 +8500,43 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006A01C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004B414(s16, s16, s16, ?); // extern -void func_800652D4(f32 *, s16 *, f32, s8); // extern -extern Gfx D_0D008D58; -extern Gfx D_0D008DA0; -extern ? D_800E47A0; -extern ? D_800E8780; -extern s16 D_80164AF0; -extern void *gDisplayListHead; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_800652D4(f32 *, s16 *, f32, s8); /* extern */ +extern u32 D_8018D438; +extern u32 D_8018D43C; +extern u32 D_8018D440; +extern u32 D_8018D444; +extern u32 D_8018D448; +extern u32 D_8018D44C; +extern u32 D_8018D450; +extern u32 D_8018D454; +extern u32 D_8018D458; +extern u32 D_8018D45C; +extern u32 D_8018D460; +extern u32 D_8018D464; +extern u32 D_8018D468; +extern u32 D_8018D46C; +extern u32 D_8018D470; +static u32 *D_800E47A0[0xF] = { + &D_8018D438, + &D_8018D43C, + &D_8018D440, + &D_8018D444, + &D_8018D448, + &D_8018D44C, + &D_8018D450, + &D_8018D454, + &D_8018D458, + &D_8018D45C, + &D_8018D460, + &D_8018D464, + &D_8018D468, + &D_8018D46C, + &D_8018D470, +}; +static ? D_800E8780; /* unable to generate initializer */ -void func_8006A280(void *arg0, ? arg1, s16 arg2, s8 arg3) { +void func_8006A280(Player *player, s8 arg1, s16 arg2, s8 arg3) { f32 sp64; f32 sp60; f32 sp5C; @@ -9479,87 +8547,81 @@ void func_8006A280(void *arg0, ? arg1, s16 arg2, s8 arg3) { s16 sp50; s16 sp4E; void *sp18; - f32 *temp_a0; - s16 *temp_a1; - void *temp_t0; - void *temp_v0; - void *temp_v0_10; - void *temp_v0_11; - void *temp_v0_12; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; + Gfx *temp_v0; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; - temp_t0 = arg0 + (arg2 * 0x48); - if (temp_t0->unk274 == 1) { - temp_a1 = &sp54; - sp52 = temp_t0->unk290; - sp50 = temp_t0->unk292; - temp_a0 = &sp5C; - sp4E = temp_t0->unk294; - sp5C = temp_t0->unk258; - sp60 = temp_t0->unk25C; + if (player->unk_258[arg2].unk_01C == 1) { + sp52 = player->unk_258[arg2].unk_038; + sp50 = player->unk_258[arg2].unk_03A; + sp4E = player->unk_258[arg2].unk_03C; + sp5C = player->unk_258[arg2].unk_000[0]; + sp60 = player->unk_258[arg2].unk_000[1]; sp54 = 0; - sp64 = temp_t0->unk260; + sp64 = player->unk_258[arg2].unk_000[2]; sp58 = 0; - sp56 = (arg0 + (arg3 * 2))->unk48; - sp18 = temp_t0; - func_800652D4(temp_a0, temp_a1, temp_t0->unk264 * arg0->unk224, arg3); + sp56 = player->unk_048[arg3]; + sp18 = player + (arg2 * 0x48); + func_800652D4(&sp5C, &sp54, player->unk_258[arg2].unk_00C * player->unk_224, arg3); temp_v0 = gDisplayListHead; gDisplayListHead = temp_v0 + 8; - temp_v0->unk0 = 0x6000000; - temp_v0->unk4 = &D_0D008D58; + temp_v0->words.w0 = 0x06000000; + temp_v0->words.w1 = (u32) D_0D008D58; temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk4 = 0; - temp_v0_2->unk0 = 0xBA000E02; + temp_v0_2->words.w1 = 0; + temp_v0_2->words.w0 = 0xBA000E02; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk0 = 0xFD900000; - temp_v0_3->unk4 = **(&D_800E47A0 + (temp_t0->unk276 * 4)); + temp_v0_3->words.w0 = 0xFD900000; + temp_v0_3->words.w1 = *D_800E47A0[sp18->unk276]; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk4 = 0x7080200; - temp_v0_4->unk0 = 0xF5900000; + temp_v0_4->words.w1 = 0x07080200; + temp_v0_4->words.w0 = 0xF5900000; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0; - temp_v0_5->unk0 = 0xE6000000; + temp_v0_5->words.w1 = 0; + temp_v0_5->words.w0 = 0xE6000000; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0x73FF200; - temp_v0_6->unk0 = 0xF3000000; + temp_v0_6->words.w1 = 0x073FF200; + temp_v0_6->words.w0 = 0xF3000000; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0; - temp_v0_7->unk0 = 0xE7000000; + temp_v0_7->words.w1 = 0; + temp_v0_7->words.w0 = 0xE7000000; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk0 = 0xF5800800; - temp_v0_8->unk4 = 0x80200; + temp_v0_8->words.w0 = 0xF5800800; + temp_v0_8->words.w1 = 0x00080200; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; - temp_v0_9->unk0 = 0xF2000000; - temp_v0_9->unk4 = 0xFC0FC; - func_8004B414(sp52, sp50, sp4E, 0xFF); + temp_v0_9->words.w0 = 0xF2000000; + temp_v0_9->words.w1 = 0x000FC0FC; + func_8004B414((s32) sp52, (s32) sp50, (s32) sp4E, 0x000000FF); temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->unk0 = 0xB900031D; - temp_v0_10->unk4 = 0x504B50; + temp_v0_10->words.w0 = 0xB900031D; + temp_v0_10->words.w1 = 0x00504B50; temp_v0_11 = gDisplayListHead; gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk4 = &D_800E8780; - temp_v0_11->unk0 = 0x400103F; + temp_v0_11->words.w1 = (u32) &D_800E8780; + temp_v0_11->words.w0 = 0x0400103F; temp_v0_12 = gDisplayListHead; gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk0 = 0x6000000; - temp_v0_12->unk4 = &D_0D008DA0; - D_80164AF0 = D_80164AF0 + 1; + temp_v0_12->words.w0 = 0x06000000; + temp_v0_12->words.w1 = (u32) D_0D008DA0; + D_80164AF0 += 1; } } #else @@ -9567,14 +8629,10 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006A280.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_80062B18(?, f32, f32 *, f32 *, f32 *, ?, f32, f32, s32, s32); // extern -extern f32 D_800EE7D0; -extern f64 D_800EE7D8; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b extern ? D_8018D4D0; extern ? D_8018D530; extern ? D_8018D590; -extern u16 gPlayerBalloonStatus; extern ? D_8018D620; extern ? D_8018D650; extern ? D_8018D6B0; @@ -9586,8 +8644,9 @@ extern ? D_8018D800; extern ? D_8018D830; extern ? D_8018D860; extern ? D_8018D890; +extern ? gPlayerBalloonStatus; -void func_8006A50C(void *arg0, ? arg1, f32 arg2, s8 arg3, s8 arg4, s16 arg5) { +void func_8006A50C(Player *player, f32 arg1, f32 arg2, s8 arg3, s8 arg4, s16 arg5) { f32 sp44; f32 sp40; f32 sp3C; @@ -9602,7 +8661,7 @@ void func_8006A50C(void *arg0, ? arg1, f32 arg2, s8 arg3, s8 arg4, s16 arg5) { temp_t0 = (arg3 * 6) + temp_v0 + &gPlayerBalloonStatus; *temp_t0 = 0; temp_v1 = arg4 * 4; - *(&D_8018D650 + ((arg3 * 0xC) + temp_v1)) = D_800EE7D0; + *(&D_8018D650 + ((arg3 * 0xC) + temp_v1)) = 0.1f; *(&D_8018D6B0 + ((arg3 * 0xC) + temp_v1)) = 0.0f; *(&D_8018D710 + ((arg3 * 0xC) + temp_v1)) = 0.0f; *(&D_8018D770 + ((arg3 * 6) + temp_v0)) = 0; @@ -9610,44 +8669,27 @@ void func_8006A50C(void *arg0, ? arg1, f32 arg2, s8 arg3, s8 arg4, s16 arg5) { *(&D_8018D7D0 + ((arg3 * 6) + temp_v0)) = 0; *(&D_8018D800 + ((arg3 * 6) + temp_v0)) = 5; *(&D_8018D830 + ((arg3 * 6) + temp_v0)) = 1; - *(&D_8018D620 + ((arg3 * 6) + temp_v0)) = -arg0->unk2E - arg0->unkC0; + *(&D_8018D620 + ((arg3 * 6) + temp_v0)) = -player->unk_02C[1] - player->unk_0C0; sp34 = temp_t0; sp30 = temp_v1; sp38 = temp_v0; - func_80062B18(arg1, arg2, &sp44, &sp40, &sp3C, arg1, 4.0f, arg2 + D_800EE7D8, -arg0->unk2E, 0); - *(&D_8018D4D0 + ((arg3 * 0xC) + temp_v1)) = arg0->unk14 + sp44; - *(&D_8018D590 + ((arg3 * 0xC) + temp_v1)) = arg0->unk1C + sp3C; - *(&D_8018D530 + ((arg3 * 0xC) + temp_v1)) = (arg0->unk18 - arg0->unk70) + sp40; - *temp_t0 = *temp_t0 | 1; - *(&D_8018D860 + ((arg3 * 6) + temp_v0)) = arg5; - *(&D_8018D890 + ((arg3 * 6) + temp_v0)) = 0; + func_80062B18(&sp44, &sp40, &sp3C, arg1, 4.0f, (f32) ((f64) arg2 + -3.8), (u16) (s32) -player->unk_02C[1], (u16) 0); + *(&D_8018D4D0 + ((arg3 * 0xC) + sp30)) = player->pos[0] + sp44; + *(&D_8018D590 + ((arg3 * 0xC) + sp30)) = player->pos[2] + sp3C; + *(&D_8018D530 + ((arg3 * 0xC) + sp30)) = (player->pos[1] - player->boundingBoxSize) + sp40; + *sp34 |= 1; + *(&D_8018D860 + ((arg3 * 6) + sp38)) = arg5; + *(&D_8018D890 + ((arg3 * 6) + sp38)) = 0; } #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006A50C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void move_s16_towards(void *, s16, ?); // extern -void func_80062B18(f32 *, f32 *, f32 *, s32, f32, f32, s32, s32); // extern -void func_8006B974(void *, s8, s8); // extern -extern ? D_800E4914; -extern f64 D_800EE7E0; -extern f64 D_800EE7E8; -extern f64 D_800EE7F0; -extern f32 D_800EE7F8; -extern f64 D_800EE800; -extern f32 D_800EE808; -extern f64 D_800EE810; -extern f32 D_800EE818; -extern f64 D_800EE820; -extern f32 D_800EE828; -extern f64 D_800EE830; -extern f64 D_800EE838; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b extern ? D_8018D4D0; extern ? D_8018D530; extern ? D_8018D590; -extern u16 gPlayerBalloonStatus; extern ? D_8018D620; extern ? D_8018D650; extern ? D_8018D6B0; @@ -9660,8 +8702,10 @@ extern ? D_8018D830; extern ? D_8018D860; extern ? D_8018D890; extern ? D_8018D8D0; +extern ? gPlayerBalloonStatus; +static ? D_800E4914; /* unable to generate initializer */ -void func_8006A7C0(void *arg0, s32 arg1, f32 arg2, s8 arg3, s8 arg4) { +void func_8006A7C0(Player *player, f32 arg1, f32 arg2, s8 arg3, s8 arg4) { ? sp80; f32 sp78; f32 sp74; @@ -9677,181 +8721,152 @@ void func_8006A7C0(void *arg0, s32 arg1, f32 arg2, s8 arg3, s8 arg4) { s16 *sp34; f32 *temp_a1; f32 *temp_t2; - f32 *temp_v0_4; + f32 *temp_v0_2; f32 *temp_v1; f32 *temp_v1_2; f32 *temp_v1_3; - f32 temp_f12; + f32 *var_t2; f32 temp_f8; - f64 temp_f0; - f64 temp_f0_2; - s16 *temp_a1_2; - s16 *temp_a1_3; + f32 var_f12; + f64 var_f0; + f64 var_f0_2; + s16 *temp_a0; s16 *temp_a2; s16 *temp_v0; - s16 *temp_v0_2; - s16 *temp_v0_3; - s32 temp_t0; + s16 *var_a1; + s16 *var_v0; s32 temp_t1; - s32 temp_t3; - s32 temp_t6; s32 temp_t8; - s32 temp_t9; + s32 var_t0; + s32 var_t1; u16 *temp_t7; - f64 phi_f0; - f32 phi_f2; - f64 phi_f0_2; - f32 phi_f12; - s32 phi_t0; - f32 phi_f12_2; - s16 *phi_v0; - s32 phi_v1; - s32 phi_a0; - s16 *phi_a1; - sp80.unk0 = D_800E4914.unk0; - sp80.unk4 = D_800E4914.unk4; - sp80.unk8 = D_800E4914.unk8; - sp80.unkC = D_800E4914.unkC; - sp80.unk10 = D_800E4914.unk10; - sp80.unk14 = D_800E4914.unk14; - sp80.unk18 = D_800E4914.unk18; - sp80.unk1C = D_800E4914.unk1C; - temp_f12 = arg0->unk94; - temp_t0 = arg4 * 2; - temp_t7 = (arg3 * 6) + temp_t0 + &gPlayerBalloonStatus; + sp80.unk0 = (s32) D_800E4914.unk0; + sp80.unk4 = (s32) D_800E4914.unk4; + sp80.unk8 = (s32) D_800E4914.unk8; + sp80.unkC = (s32) D_800E4914.unkC; + sp80.unk10 = (s32) D_800E4914.unk10; + sp80.unk14 = (s32) D_800E4914.unk14; + sp80.unk18 = (s32) D_800E4914.unk18; + sp80.unk1C = (s32) D_800E4914.unk1C; + var_f12 = player->unk_094; + var_t0 = arg4 * 2; + temp_t7 = (arg3 * 6) + var_t0 + &gPlayerBalloonStatus; sp58 = temp_t7; temp_t1 = arg4 * 4; - sp6C = (-(temp_f12 / 18.0f) * 216.0f) / 10.0f; - phi_t0 = temp_t0; - phi_f12_2 = temp_f12; + sp6C = (-(var_f12 / 18.0f) * 216.0f) / 10.0f; if ((*temp_t7 & 2) != 2) { temp_a1 = (arg3 * 0xC) + temp_t1 + &D_8018D650; - *temp_a1 = *temp_a1 + (D_800EE7E8 + (-temp_f12 * D_800EE7E0)); - temp_f0 = *temp_a1; + *temp_a1 = (f32) ((f64) *temp_a1 + (-0.003 + ((f64) -var_f12 * 0.0006))); + var_f0 = (f64) *temp_a1; temp_v1 = (arg3 * 0xC) + temp_t1 + &D_8018D6B0; temp_t2 = (arg3 * 0xC) + temp_t1 + &D_8018D710; - phi_f0 = temp_f0; - if (D_800EE7F0 <= temp_f0) { - *temp_a1 = D_800EE7F8; - phi_f0 = *temp_a1; + if (var_f0 >= 0.05) { + *temp_a1 = 0.05f; + var_f0 = (f64) *temp_a1; } - phi_f2 = *temp_a1; - if (phi_f0 <= D_800EE800) { - *temp_a1 = D_800EE808; - phi_f2 = *temp_a1; + if (var_f0 <= -0.05) { + *temp_a1 = -0.05f; } - *temp_v1 = *temp_v1 + phi_f2; - temp_f0_2 = *temp_v1; - phi_f0_2 = temp_f0_2; - if (D_800EE810 <= temp_f0_2) { - *temp_v1 = D_800EE818; - phi_f0_2 = *temp_v1; + *temp_v1 += *temp_a1; + var_f0_2 = (f64) *temp_v1; + if (var_f0_2 >= 0.06) { + *temp_v1 = 0.06f; + var_f0_2 = (f64) *temp_v1; } - phi_f12 = *temp_v1; - if (phi_f0_2 <= D_800EE820) { - *temp_v1 = D_800EE828; - phi_f12 = *temp_v1; + if (var_f0_2 <= -0.06) { + *temp_v1 = -0.06f; } - *temp_t2 = *temp_t2 + phi_f12; + *temp_t2 += *temp_v1; if (*temp_t2 < 0.0f) { sp60 = temp_v1; sp50 = temp_a1; - sp5C = temp_t0; + sp5C = var_t0; sp4C = temp_t2; - temp_f8 = random_int(0xB) / 0xA; + temp_f8 = (f32) (random_int(0x000BU) / 10); *temp_v1 = 0.0f; *temp_t2 = 0.0f; *temp_a1 = temp_f8; } - *(&D_8018D620 + ((arg3 * 6) + (arg4 * 2))) = -arg0->unk2E - arg0->unkC0; - sp5C = arg4 * 2; - move_s16_towards((arg3 * 6) + (arg4 * 2) + &D_8018D890, arg0->unk94 * 182.0f, 0x3DCCCCCD); - phi_t0 = arg4 * 2; - phi_f12_2 = arg0->unk94; + *(&D_8018D620 + ((arg3 * 6) + var_t0)) = -player->unk_02C[1] - player->unk_0C0; + sp5C = var_t0; + move_s16_towards((arg3 * 6) + var_t0 + &D_8018D890, (s16) (s32) (player->unk_094 * 182.0f), 0.1f); + var_f12 = player->unk_094; } - temp_t9 = (arg3 * 6) + phi_t0; - temp_a2 = temp_t9 + &D_8018D830; + temp_a2 = (arg3 * 6) + var_t0 + &D_8018D830; temp_t8 = arg4 * 4; - temp_t6 = (arg3 * 0xC) + temp_t8; - sp50 = (arg3 * 6) + phi_t0 + &D_8018D620; + var_t1 = temp_t8; + sp50 = (arg3 * 6) + var_t0 + &D_8018D620; + var_t2 = (arg3 * 0xC) + temp_t8 + &D_8018D710; if (*temp_a2 == 1) { - temp_a1_2 = (arg3 * 6) + phi_t0 + &D_8018D800; - temp_v0 = (arg3 * 6) + phi_t0 + &D_8018D770; - *temp_v0 = *temp_v0 + (*temp_a1_2 - phi_f12_2); - phi_v0 = temp_v0; - phi_a1 = temp_a1_2; + var_a1 = (arg3 * 6) + var_t0 + &D_8018D800; + var_v0 = (arg3 * 6) + var_t0 + &D_8018D770; + *var_v0 = (s16) (s32) ((f32) *var_v0 + ((f32) *var_a1 - var_f12)); } else { - temp_a1_3 = (arg3 * 6) + phi_t0 + &D_8018D800; - temp_v0_2 = (arg3 * 6) + phi_t0 + &D_8018D770; - *temp_v0_2 = *temp_v0_2 + (*temp_a1_3 + phi_f12_2); - phi_v0 = temp_v0_2; - phi_a1 = temp_a1_3; + var_a1 = (arg3 * 6) + var_t0 + &D_8018D800; + var_v0 = (arg3 * 6) + var_t0 + &D_8018D770; + *var_v0 = (s16) (s32) ((f32) *var_v0 + ((f32) *var_a1 + var_f12)); } - if (*phi_v0 >= 0xB) { - *phi_v0 = 0xB; + if (*var_v0 >= 0xB) { + *var_v0 = 0x000B; } - phi_v1 = *phi_v0; - if (*phi_v0 < -0xA) { - *phi_v0 = -0xB; - phi_v1 = *phi_v0; + if (*var_v0 < -0xA) { + *var_v0 = -0x000B; } - temp_v0_3 = (arg3 * 6) + phi_t0 + &D_8018D7A0; - *temp_v0_3 = *temp_v0_3 + phi_v1; - temp_t3 = (arg3 * 6) + phi_t0; - if (*temp_v0_3 >= 0x29) { - *temp_v0_3 = 0x29; + temp_v0 = (arg3 * 6) + var_t0 + &D_8018D7A0; + *temp_v0 += *var_v0; + if (*temp_v0 >= 0x29) { + *temp_v0 = 0x0029; } - phi_a0 = *temp_v0_3; - if (*temp_v0_3 < -0x28) { - *temp_v0_3 = -0x29; - phi_a0 = *temp_v0_3; + if (*temp_v0 < -0x28) { + *temp_v0 = -0x0029; } - temp_v1_2 = temp_t3 + &D_8018D7D0; - *temp_v1_2 = *temp_v1_2 + phi_a0; + temp_v1_2 = (arg3 * 6) + var_t0 + &D_8018D7D0; + *temp_v1_2 = (s16) (*temp_v1_2 + *temp_v0); if (*temp_v1_2 >= 0x38E) { sp60 = temp_v1_2; - sp34 = phi_a1; + sp34 = var_a1; sp3C = temp_a2; - sp5C = phi_t0; - sp54 = temp_t8; - sp4C = temp_t6 + &D_8018D710; - *phi_a1 = -random_int(8); + sp5C = var_t0; + sp54 = var_t1; + sp4C = var_t2; + *var_a1 = -random_int(8U); if (*temp_a2 != 1) { *temp_a2 = 1; } } - if (*(temp_t3 + &D_8018D7D0) < -0x38D) { - sp34 = phi_a1; - sp3C = temp_t9 + &D_8018D830; - sp5C = phi_t0; - sp54 = arg4 * 4; - sp4C = temp_t6 + &D_8018D710; - *phi_a1 = random_int(8); - if (*(temp_t9 + &D_8018D830) != -1) { - *(temp_t9 + &D_8018D830) = -1; + if (*temp_v1_2 < -0x38D) { + sp34 = var_a1; + sp3C = temp_a2; + sp5C = var_t0; + sp54 = var_t1; + sp4C = var_t2; + *var_a1 = random_int(8U); + if (*temp_a2 != -1) { + *temp_a2 = -1; } } - sp54 = arg4 * 4; - sp5C = phi_t0; - func_80062B18(&sp78, &sp74, &sp70, arg1, (sp + (arg0->unk254 * 4))->unk80 - *(temp_t6 + &D_8018D710), arg2 + D_800EE830 + (sp6C * 1.0f), -*sp50, arg0->unk206 * -2); + sp54 = var_t1; + sp5C = var_t0; + func_80062B18(&sp78, &sp74, &sp70, arg1, (sp + (player->characterId * 4))->unk80 - *var_t2, (f32) ((f64) arg2 + -3.2 + (f64) (sp6C * 1.0f)), (u16) (s32) -*sp50, (u16) (player->unk_206 * -2)); if ((*sp58 & 2) != 2) { - *(&D_8018D530 + ((arg3 * 0xC) + (arg4 * 4))) = (arg0->unk18 - arg0->unk70) + sp74; - *(&D_8018D4D0 + ((arg3 * 0xC) + (arg4 * 4))) = arg0->unk14 + sp78; - *(&D_8018D590 + ((arg3 * 0xC) + (arg4 * 4))) = arg0->unk1C + sp70; - *(&D_8018D8D0 + ((arg3 * 6) + phi_t0)) = 0; + *(&D_8018D530 + ((arg3 * 0xC) + sp54)) = (player->pos[1] - player->boundingBoxSize) + sp74; + *(&D_8018D4D0 + ((arg3 * 0xC) + sp54)) = player->pos[0] + sp78; + *(&D_8018D590 + ((arg3 * 0xC) + sp54)) = player->pos[2] + sp70; + *(&D_8018D8D0 + ((arg3 * 6) + sp5C)) = 0; return; } - temp_v0_4 = (arg3 * 0xC) + (arg4 * 4) + &D_8018D530; - temp_v1_3 = (arg3 * 6) + phi_t0 + &D_8018D8D0; - *temp_v0_4 = *temp_v0_4 + D_800EE838; - *temp_v1_3 = *temp_v1_3 + 1; + temp_v0_2 = (arg3 * 0xC) + sp54 + &D_8018D530; + temp_v1_3 = (arg3 * 6) + sp5C + &D_8018D8D0; + *temp_v0_2 = (f32) ((f64) *temp_v0_2 + 0.2); + *temp_v1_3 = (s16) (*temp_v1_3 + 1); + temp_a0 = (arg3 * 6) + sp5C + &D_8018D890; sp60 = temp_v1_3; - sp5C = phi_t0; - move_s16_towards((arg3 * 6) + phi_t0 + &D_8018D890, 0, 0x3DCCCCCD); - move_s16_towards((arg3 * 6) + phi_t0 + &D_8018D860, 0, 0x3DCCCCCD); + sp5C = sp5C; + move_s16_towards(temp_a0, 0, 0.1f); + move_s16_towards((arg3 * 6) + sp5C + &D_8018D860, 0, 0.1f); if (*temp_v1_3 >= 0x78) { - func_8006B974(arg0, arg3, arg4); + func_8006B974((s32) player, arg3, arg4); } } #else @@ -9859,28 +8874,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006A7C0.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_80021E10(? *, f32 *, s16 *); // extern -void func_80021F84(? *, f32); // extern -void func_80022180(void *, ? *); // extern -void func_8004B614(s16, s16, s16, s16, s32, s32, s32); // extern -f32 sins(u16); // extern -f32 coss(s32); // extern -extern Gfx D_0D008C78; -extern Gfx D_0D008DB8; -extern ? D_800E4934; -extern ? D_800E4954; -extern ? D_800E5250; -extern ? D_800E5290; -extern ? D_800E52D0; -extern f32 D_800EE840; -extern f64 D_800EE848; -extern f32 D_800EE850; -extern f64 D_800EE858; -extern f32 D_800EE860; -extern Camera cameras; -extern s16 D_80164AF0; -extern s32 D_8018D4BC; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +extern u32 D_8018D4BC; extern s32 D_8018D4C0; extern ? D_8018D4D0; extern ? D_8018D530; @@ -9888,10 +8883,13 @@ extern ? D_8018D590; extern ? D_8018D7D0; extern ? D_8018D860; extern ? D_8018D890; -extern s32 *gDisplayListHead; +static ? D_800E4934; /* unable to generate initializer */ +static ? D_800E4954; /* unable to generate initializer */ +static ? D_800E5250; /* unable to generate initializer */ +static ? D_800E5290; /* unable to generate initializer */ +static ? D_800E52D0; /* unable to generate initializer */ -void func_8006AFD0(void *arg0, s8 arg1, s16 arg2, s8 arg3) { - ? sp140; +void func_8006AFD0(Player *player, s16 arg1, s8 arg2, s8 arg3) { f32 sp13C; f32 sp138; f32 sp134; @@ -9905,257 +8903,242 @@ void func_8006AFD0(void *arg0, s8 arg1, s16 arg2, s8 arg3) { s16 sp120; s16 sp11E; s16 sp11C; - ? spF0; - ? spD0; - s32 *spB0; - s32 *spAC; + Gfx *spB0; + Gfx *spAC; f32 sp58; void *sp54; s32 sp44; s32 sp40; s16 *sp3C; + Camera *temp_v0_2; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_14; + Gfx *temp_v0_15; + Gfx *temp_v0_16; + Gfx *temp_v0_17; + Gfx *temp_v0_18; + Gfx *temp_v0_19; + Gfx *temp_v0_20; + Gfx *temp_v0_21; + Gfx *temp_v0_22; + Gfx *temp_v0_23; + Gfx *temp_v0_24; + Gfx *temp_v0_25; + Gfx *temp_v0_26; + Gfx *temp_v0_27; + Gfx *temp_v0_28; + Gfx *temp_v0_29; + Gfx *temp_v0_30; + Gfx *temp_v0_31; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; f32 temp_f0; f32 temp_f20; - f32 temp_f20_2; - f64 temp_f0_2; + f32 var_f20; + f64 var_f0; s16 *temp_v1_2; - s32 *temp_v0_10; - s32 *temp_v0_11; - s32 *temp_v0_12; - s32 *temp_v0_13; - s32 *temp_v0_14; - s32 *temp_v0_15; - s32 *temp_v0_16; - s32 *temp_v0_17; - s32 *temp_v0_18; - s32 *temp_v0_19; - s32 *temp_v0_20; - s32 *temp_v0_21; - s32 *temp_v0_22; - s32 *temp_v0_23; - s32 *temp_v0_24; - s32 *temp_v0_25; - s32 *temp_v0_26; - s32 *temp_v0_27; - s32 *temp_v0_28; - s32 *temp_v0_29; - s32 *temp_v0_30; - s32 *temp_v0_31; - s32 *temp_v0_3; - s32 *temp_v0_4; - s32 *temp_v0_5; - s32 *temp_v0_6; - s32 *temp_v0_7; - s32 *temp_v0_8; - s32 *temp_v0_9; + s16 temp_t1; s32 temp_a0; - s32 temp_t1; s32 temp_t6; - s32 temp_t6_2; - s32 temp_t7_2; - s32 temp_t9; + s32 temp_t7; s32 temp_v0; s32 temp_v1; - void *temp_t7; - void *temp_v0_2; - f32 phi_f20; - f64 phi_f0; - s32 phi_t1; - f32 phi_f20_2; + u16 temp_t0; - spF0.unk0 = D_800E4934.unk0; - spF0.unk4 = D_800E4934.unk4; - spF0.unk8 = D_800E4934.unk8; - spF0.unkC = D_800E4934.unkC; - spF0.unk10 = D_800E4934.unk10; - spF0.unk14 = D_800E4934.unk14; - spF0.unk18 = D_800E4934.unk18; - spF0.unk1C = D_800E4934.unk1C; - spD0.unk0 = D_800E4954.unk0; - spD0.unk4 = D_800E4954.unk4; - spD0.unk8 = D_800E4954.unk8; - spD0.unkC = D_800E4954.unkC; - spD0.unk10 = D_800E4954.unk10; - spD0.unk14 = D_800E4954.unk14; - spD0.unk18 = D_800E4954.unk18; - spD0.unk1C = D_800E4954.unk1C; - temp_t9 = arg0->unk254 * 4; - temp_v0 = *(&spF0 + temp_t9); + spF0[0].unk0 = D_800E4934.unk0; + spF0[0].unk4 = (s32) D_800E4934.unk4; + spF0[0].unk8 = (s32) D_800E4934.unk8; + spF0[0].unkC = (s32) D_800E4934.unkC; + spF0[0].unk10 = (s32) D_800E4934.unk10; + spF0[0].unk14 = (s32) D_800E4934.unk14; + spF0[0].unk18 = (s32) D_800E4934.unk18; + spF0[0].unk1C = (s32) D_800E4934.unk1C; + spD0[0].unk0 = D_800E4954.unk0; + spD0[0].unk4 = (s32) D_800E4954.unk4; + spD0[0].unk8 = (s32) D_800E4954.unk8; + spD0[0].unkC = (s32) D_800E4954.unkC; + spD0[0].unk10 = (s32) D_800E4954.unk10; + spD0[0].unk14 = (s32) D_800E4954.unk14; + spD0[0].unk18 = (s32) D_800E4954.unk18; + spD0[0].unk1C = (s32) D_800E4954.unk1C; + temp_t0 = player->characterId; + temp_v0 = (&spF0[0])[temp_t0]; sp128 = (temp_v0 >> 0x10) & 0xFF; sp126 = (temp_v0 >> 8) & 0xFF; sp124 = temp_v0 & 0xFF; - temp_v1 = *(&spD0 + temp_t9); + temp_v1 = (&spD0[0])[temp_t0]; sp122 = (temp_v1 >> 0x10) & 0xFF; - temp_t7 = arg0 + (arg3 * 2); sp120 = (temp_v1 >> 8) & 0xFF; sp11E = temp_v1 & 0xFF; - sp54 = temp_t7; - temp_t6 = (((arg0->unk2E + temp_t7->unk48 + arg0->unkC0) & 0xFFFF) / 0x80) << 0x17; - temp_t1 = temp_t6 >> 0x10; - phi_t1 = temp_t1; - if (arg3 == arg1) { - phi_f20_2 = D_800EE840; + sp54 = player + (arg3 * 2); + temp_t1 = ((s32) ((player->unk_02C[1] + player->unk_048[arg3] + player->unk_0C0) & 0xFFFF) / 128) << 7; + if (arg3 == (s8) arg1) { + var_f20 = 0.3f; } else { - temp_v0_2 = (arg3 * 0xB8) + &cameras; - temp_f20 = arg0->unk14 - temp_v0_2->unk0; - temp_f0 = arg0->unk1C - temp_v0_2->unk8; - if (gActiveScreenMode != SCREEN_MODE_3P_4P_SPLITSCREEN) { + temp_v0_2 = &cameras[arg3]; + temp_f20 = player->pos[0] - temp_v0_2->pos[0]; + temp_f0 = player->pos[2] - temp_v0_2->pos[2]; + if (gActiveScreenMode != 3) { sp11C = temp_t1; - phi_f20 = sqrtf((temp_f20 * temp_f20) + (temp_f0 * temp_f0)) / 300.0f; + var_f20 = sqrtf((temp_f20 * temp_f20) + (temp_f0 * temp_f0)) / 300.0f; } else { sp11C = temp_t1; - phi_f20 = sqrtf((temp_f20 * temp_f20) + (temp_f0 * temp_f0)) / 200.0f; + var_f20 = sqrtf((temp_f20 * temp_f20) + (temp_f0 * temp_f0)) / 200.0f; } - temp_f0_2 = phi_f20; - phi_f0 = temp_f0_2; - phi_t1 = temp_t6 >> 0x10; - phi_f20_2 = phi_f20; - if (D_800EE848 <= temp_f0_2) { - temp_f20_2 = D_800EE850; - phi_f0 = temp_f20_2; - phi_f20_2 = temp_f20_2; + var_f0 = (f64) var_f20; + if (var_f0 >= 1.8) { + var_f20 = 1.8f; + var_f0 = (f64) 1.8f; } - if (phi_f0 <= D_800EE858) { - phi_f20_2 = D_800EE860; + if (var_f0 <= 0.3) { + var_f20 = 0.3f; } } - temp_t7_2 = arg2 * 4; - temp_a0 = phi_t1 & 0xFFFF; + temp_t7 = (s16) arg2 * 4; + temp_a0 = temp_t1 & 0xFFFF; sp44 = temp_a0; - sp134 = *(&D_8018D4D0 + ((arg1 * 0xC) + temp_t7_2)); - sp138 = *(&D_8018D530 + ((arg1 * 0xC) + temp_t7_2)); - sp13C = *(&D_8018D590 + ((arg1 * 0xC) + temp_t7_2)); - temp_t6_2 = arg2 * 2; - temp_v1_2 = (arg1 * 6) + temp_t6_2 + &D_8018D890; - sp12C = -(coss(temp_a0) * (*temp_v1_2 * 4)); + sp134 = *(&D_8018D4D0 + (((s8) arg1 * 0xC) + temp_t7)); + sp138 = *(&D_8018D530 + (((s8) arg1 * 0xC) + temp_t7)); + sp13C = *(&D_8018D590 + (((s8) arg1 * 0xC) + temp_t7)); + temp_t6 = (s16) arg2 * 2; + temp_v1_2 = ((s8) arg1 * 6) + temp_t6 + &D_8018D890; + sp12C = (s16) (s32) -(coss((u16) temp_a0) * (f32) (*temp_v1_2 * 4)); sp3C = temp_v1_2; - sp40 = temp_t6_2; + sp40 = temp_t6; sp12E = sp54->unk48; - sp58 = coss(sp46); - sp130 = (*(&D_8018D7D0 + ((arg1 * 6) + temp_t6_2)) - (*(&D_8018D860 + ((arg1 * 6) + temp_t6_2)) * sp58)) - (sins(sp46) * (*sp3C * 8)); - func_80021E10(&sp140, &sp134, &sp12C); - func_80021F84(&sp140, phi_f20_2); - func_80022180(gGfxPool + (D_80164AF0 << 6) + 0xFAC0, &sp140); + sp58 = coss(unksp46); + sp130 = (s16) (s32) (((f32) *(&D_8018D7D0 + (((s8) arg1 * 6) + temp_t6)) - ((f32) *(&D_8018D860 + (((s8) arg1 * 6) + temp_t6)) * sp58)) - (sins(unksp46) * (f32) (*sp3C * 8))); + func_80021E10((f32 (*)[4]) &sp140[0], &sp134, &sp12C); + func_80021F84((f32 (*)[4]) &sp140[0], var_f20); + func_80022180(&gGfxPool->mtxPool[D_80164AF0] + 0xFAC0, (f32 (*)[4]) &sp140[0]); temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk0 = 0x1020040; - temp_v0_3->unk4 = (gGfxPool + (D_80164AF0 << 6) + 0xFAC0) & 0x1FFFFFFF; + temp_v0_3->words.w0 = 0x01020040; + temp_v0_3->words.w1 = (s32) (&gGfxPool->mtxPool[D_80164AF0] + 0xFAC0) & 0x1FFFFFFF; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk4 = &D_0D008DB8; - temp_v0_4->unk0 = 0x6000000; + temp_v0_4->words.w1 = (u32) D_0D008DB8; + temp_v0_4->words.w0 = 0x06000000; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk0 = 0xFD100000; - temp_v0_5->unk4 = &D_800E52D0; + temp_v0_5->words.w0 = 0xFD100000; + temp_v0_5->words.w1 = (u32) &D_800E52D0; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk0 = 0xE8000000; - temp_v0_6->unk4 = 0; + temp_v0_6->words.w0 = 0xE8000000; + temp_v0_6->words.w1 = 0; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk0 = 0xF5000100; - temp_v0_7->unk4 = 0x7000000; + temp_v0_7->words.w0 = 0xF5000100; + temp_v0_7->words.w1 = 0x07000000; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk0 = 0xE6000000; - temp_v0_8->unk4 = 0; + temp_v0_8->words.w0 = 0xE6000000; + temp_v0_8->words.w1 = 0; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; - temp_v0_9->unk0 = 0xF0000000; - temp_v0_9->unk4 = 0x73FC000; + temp_v0_9->words.w0 = 0xF0000000; + temp_v0_9->words.w1 = 0x073FC000; temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; spB0 = temp_v0_10; - temp_v0_10->unk0 = 0xE7000000; - temp_v0_10->unk4 = 0; + temp_v0_10->words.w0 = 0xE7000000; + temp_v0_10->words.w1 = 0; temp_v0_11 = gDisplayListHead; gDisplayListHead = temp_v0_11 + 8; spAC = temp_v0_11; - temp_v0_11->unk0 = 0xBA000E02; - spAC->unk4 = 0x8000; - func_8004B614(sp128, sp126, sp124, sp122, sp120, sp11E, 0xD8); + temp_v0_11->words.w0 = 0xBA000E02; + spAC->words.w1 = 0x00008000; + func_8004B614((s32) sp128, (s32) sp126, (s32) sp124, (s32) sp122, (s32) sp120, (s32) sp11E, 0x000000D8); temp_v0_12 = gDisplayListHead; gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk0 = 0xB900031D; - temp_v0_12->unk4 = 0x505978; + temp_v0_12->words.w0 = 0xB900031D; + temp_v0_12->words.w1 = 0x00505978; temp_v0_13 = gDisplayListHead; gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk0 = 0xFD500000; - temp_v0_13->unk4 = D_8018D4BC; + temp_v0_13->words.w0 = 0xFD500000; + temp_v0_13->words.w1 = D_8018D4BC; temp_v0_14 = gDisplayListHead; gDisplayListHead = temp_v0_14 + 8; - temp_v0_14->unk4 = 0x7080200; - temp_v0_14->unk0 = 0xF5500000; + temp_v0_14->words.w1 = 0x07080200; + temp_v0_14->words.w0 = 0xF5500000; temp_v0_15 = gDisplayListHead; gDisplayListHead = temp_v0_15 + 8; - temp_v0_15->unk4 = 0; - temp_v0_15->unk0 = 0xE6000000; + temp_v0_15->words.w1 = 0; + temp_v0_15->words.w0 = 0xE6000000; temp_v0_16 = gDisplayListHead; gDisplayListHead = temp_v0_16 + 8; - temp_v0_16->unk4 = 0x73FF100; - temp_v0_16->unk0 = 0xF3000000; + temp_v0_16->words.w1 = 0x073FF100; + temp_v0_16->words.w0 = 0xF3000000; temp_v0_17 = gDisplayListHead; gDisplayListHead = temp_v0_17 + 8; - temp_v0_17->unk4 = 0; - temp_v0_17->unk0 = 0xE7000000; + temp_v0_17->words.w1 = 0; + temp_v0_17->words.w0 = 0xE7000000; temp_v0_18 = gDisplayListHead; gDisplayListHead = temp_v0_18 + 8; - temp_v0_18->unk0 = 0xF5481000; - temp_v0_18->unk4 = 0x80200; + temp_v0_18->words.w0 = 0xF5481000; + temp_v0_18->words.w1 = 0x00080200; temp_v0_19 = gDisplayListHead; gDisplayListHead = temp_v0_19 + 8; - temp_v0_19->unk0 = 0xF2000000; - temp_v0_19->unk4 = 0xFC07C; + temp_v0_19->words.w0 = 0xF2000000; + temp_v0_19->words.w1 = 0x000FC07C; temp_v0_20 = gDisplayListHead; gDisplayListHead = temp_v0_20 + 8; - temp_v0_20->unk4 = &D_800E5250; - temp_v0_20->unk0 = 0x400103F; + temp_v0_20->words.w1 = (u32) &D_800E5250; + temp_v0_20->words.w0 = 0x0400103F; temp_v0_21 = gDisplayListHead; gDisplayListHead = temp_v0_21 + 8; - temp_v0_21->unk4 = &D_0D008C78; - temp_v0_21->unk0 = 0x6000000; + temp_v0_21->words.w1 = (u32) D_0D008C78; + temp_v0_21->words.w0 = 0x06000000; temp_v0_22 = gDisplayListHead; gDisplayListHead = temp_v0_22 + 8; - temp_v0_22->unk0 = 0xFD500000; - temp_v0_22->unk4 = D_8018D4C0 - 0x40; + temp_v0_22->words.w0 = 0xFD500000; + temp_v0_22->words.w1 = D_8018D4C0 - 0x40; temp_v0_23 = gDisplayListHead; gDisplayListHead = temp_v0_23 + 8; - temp_v0_23->unk4 = 0x7080200; - temp_v0_23->unk0 = 0xF5500000; + temp_v0_23->words.w1 = 0x07080200; + temp_v0_23->words.w0 = 0xF5500000; temp_v0_24 = gDisplayListHead; gDisplayListHead = temp_v0_24 + 8; - temp_v0_24->unk4 = 0; - temp_v0_24->unk0 = 0xE6000000; + temp_v0_24->words.w1 = 0; + temp_v0_24->words.w0 = 0xE6000000; temp_v0_25 = gDisplayListHead; gDisplayListHead = temp_v0_25 + 8; - temp_v0_25->unk4 = 0x73FF100; - temp_v0_25->unk0 = 0xF3000000; + temp_v0_25->words.w1 = 0x073FF100; + temp_v0_25->words.w0 = 0xF3000000; temp_v0_26 = gDisplayListHead; gDisplayListHead = temp_v0_26 + 8; - temp_v0_26->unk4 = 0; - temp_v0_26->unk0 = 0xE7000000; + temp_v0_26->words.w1 = 0; + temp_v0_26->words.w0 = 0xE7000000; temp_v0_27 = gDisplayListHead; gDisplayListHead = temp_v0_27 + 8; - temp_v0_27->unk0 = 0xF5481000; - temp_v0_27->unk4 = 0x80200; + temp_v0_27->words.w0 = 0xF5481000; + temp_v0_27->words.w1 = 0x00080200; temp_v0_28 = gDisplayListHead; gDisplayListHead = temp_v0_28 + 8; - temp_v0_28->unk0 = 0xF2000000; - temp_v0_28->unk4 = 0xFC07C; + temp_v0_28->words.w0 = 0xF2000000; + temp_v0_28->words.w1 = 0x000FC07C; temp_v0_29 = gDisplayListHead; gDisplayListHead = temp_v0_29 + 8; - temp_v0_29->unk4 = &D_800E5290; - temp_v0_29->unk0 = 0x400103F; + temp_v0_29->words.w1 = (u32) &D_800E5290; + temp_v0_29->words.w0 = 0x0400103F; temp_v0_30 = gDisplayListHead; gDisplayListHead = temp_v0_30 + 8; - temp_v0_30->unk4 = &D_0D008C78; - temp_v0_30->unk0 = 0x6000000; + temp_v0_30->words.w1 = (u32) D_0D008C78; + temp_v0_30->words.w0 = 0x06000000; temp_v0_31 = gDisplayListHead; gDisplayListHead = temp_v0_31 + 8; - temp_v0_31->unk4 = 0x10001; - temp_v0_31->unk0 = 0xBB000000; - D_80164AF0 = D_80164AF0 + 1; + temp_v0_31->words.w1 = 0x00010001; + temp_v0_31->words.w0 = 0xBB000000; + D_80164AF0 += 1; } #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006AFD0.s") @@ -10183,36 +9166,29 @@ void func_8006B87C(UNUSED Player *player, s8 playerIndex) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8008FD4C(s32, s8, s8); // extern -void func_800C9060(s32, ?, s8, s16); // extern -extern u16 gPlayerBalloonStatus; -extern s16 gPlayerBalloonCount; - -void func_8006B8B4(s32 arg0, s8 playerIndex) { +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +void func_8006B8B4(Player *player, s8 playerIndex) { s16 *sp1C; - s16 *currentPlayerBalloonCount; - s16 playerBalloonCountValue; - s32 temp_a0; - s8 playerIndexTemp; + s16 *temp_v1; + s16 temp_a3; u16 *temp_v0; u16 temp_t5; + u8 temp_a0; - currentPlayerBalloonCount = (playerIndex * 2) + &gPlayerBalloonCount; - playerBalloonCountValue = *currentPlayerBalloonCount; - playerIndexTemp = playerIndex; - if (playerBalloonCountValue >= 0) { - temp_v0 = (playerIndex * 6) + (playerBalloonCountValue * 2) + &gPlayerBalloonStatus; + temp_v1 = &gPlayerBalloonCount[playerIndex]; + temp_a3 = *temp_v1; + if (temp_a3 >= 0) { + temp_v0 = (playerIndex * 6) + (temp_a3 * 2) + gPlayerBalloonStatus; temp_t5 = *temp_v0 & 0xFFFE; *temp_v0 = temp_t5; *temp_v0 = temp_t5 | 2; - *currentPlayerBalloonCount = playerBalloonCountValue - 1; - temp_a0 = playerIndexTemp & 0xFF; - sp1C = currentPlayerBalloonCount; - playerIndex = playerIndexTemp; - func_800C9060(temp_a0, 0x19009051, playerIndexTemp, playerBalloonCountValue); - if (*currentPlayerBalloonCount < 0) { - func_8008FD4C(arg0, playerIndex, playerIndex); + *temp_v1 = temp_a3 - 1; + temp_a0 = playerIndex & 0xFF; + sp1C = temp_v1; + playerIndex = playerIndex; + func_800C9060(temp_a0, 0x19009051U); + if (*temp_v1 < 0) { + func_8008FD4C(player, playerIndex); } } } @@ -10254,28 +9230,19 @@ void func_8006BA94(Player* player, s8 playerIndex, s8 arg2) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_80021E10(? *, f32 *, s16 *, s16); // extern -void func_80021F84(? *, s32); // extern -void func_80022180(void *, ? *); // extern -void func_8004B614(s16, s16, s16, s16, s32, s32, s32); // extern -extern Gfx D_0D008C78; -extern Gfx D_0D008DB8; -extern ? D_800E4974; -extern ? D_800E4994; -extern ? D_800E5250; -extern ? D_800E5290; -extern ? D_800E52D0; -extern s16 D_80164AF0; -extern s32 D_8018D4BC; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +extern u32 D_8018D4BC; extern s32 D_8018D4C0; -extern s32 *gDisplayListHead; +static ? D_800E4974; /* unable to generate initializer */ +static ? D_800E4994; /* unable to generate initializer */ +static ? D_800E5250; /* unable to generate initializer */ +static ? D_800E5290; /* unable to generate initializer */ +static ? D_800E52D0; /* unable to generate initializer */ -void func_8006BB34(struct UnkStruct_8028088C arg0*, s32 arg1, s16 arg2, s16 arg3) { - ? sp108; +void func_8006BB34(struct UnkStruct_8028088C *arg0, f32 arg1, s16 arg2, s16 arg3) { f32 sp104; f32 sp100; - f32 spFC; + s32 spFC; s16 spF8; s16 spF6; s16 spF4; @@ -10285,69 +9252,61 @@ void func_8006BB34(struct UnkStruct_8028088C arg0*, s32 arg1, s16 arg2, s16 arg3 s16 spEA; s16 spE8; s16 spE6; - ? spC4; - ? spA4; - s32 *sp84; - s32 *sp80; - f32 *temp_a1; - s16 *temp_a2; - s32 *temp_v0_10; - s32 *temp_v0_11; - s32 *temp_v0_12; - s32 *temp_v0_13; - s32 *temp_v0_14; - s32 *temp_v0_15; - s32 *temp_v0_16; - s32 *temp_v0_17; - s32 *temp_v0_18; - s32 *temp_v0_19; - s32 *temp_v0_20; - s32 *temp_v0_21; - s32 *temp_v0_22; - s32 *temp_v0_23; - s32 *temp_v0_24; - s32 *temp_v0_25; - s32 *temp_v0_26; - s32 *temp_v0_27; - s32 *temp_v0_28; - s32 *temp_v0_29; - s32 *temp_v0_2; - s32 *temp_v0_30; - s32 *temp_v0_3; - s32 *temp_v0_4; - s32 *temp_v0_5; - s32 *temp_v0_6; - s32 *temp_v0_7; - s32 *temp_v0_8; - s32 *temp_v0_9; - s32 temp_t0; + Gfx *sp84; + Gfx *sp80; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_14; + Gfx *temp_v0_15; + Gfx *temp_v0_16; + Gfx *temp_v0_17; + Gfx *temp_v0_18; + Gfx *temp_v0_19; + Gfx *temp_v0_20; + Gfx *temp_v0_21; + Gfx *temp_v0_22; + Gfx *temp_v0_23; + Gfx *temp_v0_24; + Gfx *temp_v0_25; + Gfx *temp_v0_26; + Gfx *temp_v0_27; + Gfx *temp_v0_28; + Gfx *temp_v0_29; + Gfx *temp_v0_2; + Gfx *temp_v0_30; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; s32 temp_v0; s32 temp_v1; - spC4.unk0 = D_800E4974.unk0; - spC4.unk4 = D_800E4974.unk4; - spC4.unk8 = D_800E4974.unk8; - temp_t0 = arg3 * 4; - temp_a2 = &spF4; - spC4.unkC = D_800E4974.unkC; - temp_a1 = &spFC; - spC4.unk10 = D_800E4974.unk10; - spC4.unk14 = D_800E4974.unk14; - spC4.unk18 = D_800E4974.unk18; - spC4.unk1C = D_800E4974.unk1C; - temp_v0 = *(&spC4 + temp_t0); - spA4.unk0 = D_800E4994.unk0; - spA4.unk4 = D_800E4994.unk4; - spA4.unk8 = D_800E4994.unk8; - spA4.unkC = D_800E4994.unkC; - spA4.unk10 = D_800E4994.unk10; - spA4.unk14 = D_800E4994.unk14; - spA4.unk18 = D_800E4994.unk18; - spA4.unk1C = D_800E4994.unk1C; + spC4[0].unk0 = D_800E4974.unk0; + spC4[0].unk4 = (s32) D_800E4974.unk4; + spC4[0].unk8 = (s32) D_800E4974.unk8; + spC4[0].unkC = (s32) D_800E4974.unkC; + spC4[0].unk10 = (s32) D_800E4974.unk10; + spC4[0].unk14 = (s32) D_800E4974.unk14; + spC4[0].unk18 = (s32) D_800E4974.unk18; + spC4[0].unk1C = (s32) D_800E4974.unk1C; + temp_v0 = (&spC4[0])[arg3]; + spA4[0].unk0 = D_800E4994.unk0; + spA4[0].unk4 = (s32) D_800E4994.unk4; + spA4[0].unk8 = (s32) D_800E4994.unk8; + spA4[0].unkC = (s32) D_800E4994.unkC; + spA4[0].unk10 = (s32) D_800E4994.unk10; + spA4[0].unk14 = (s32) D_800E4994.unk14; + spA4[0].unk18 = (s32) D_800E4994.unk18; + spA4[0].unk1C = (s32) D_800E4994.unk1C; spF0 = (temp_v0 >> 0x10) & 0xFF; spEE = (temp_v0 >> 8) & 0xFF; spEC = temp_v0 & 0xFF; - temp_v1 = *(&spA4 + temp_t0); + temp_v1 = (&spA4[0])[arg3]; spEA = (temp_v1 >> 0x10) & 0xFF; spE8 = (temp_v1 >> 8) & 0xFF; spE6 = temp_v1 & 0xFF; @@ -10356,130 +9315,130 @@ void func_8006BB34(struct UnkStruct_8028088C arg0*, s32 arg1, s16 arg2, s16 arg3 spF4 = 0; sp104 = arg0->unk8; spF8 = arg2; - spF6 = camera1->unk26; - func_80021E10(&sp108, temp_a1, temp_a2, arg3); - func_80021F84(&sp108, arg1); - func_80022180(gGfxPool + (D_80164AF0 << 6) + 0xFAC0, &sp108); + spF6 = camera1->rot[1]; + func_80021E10((f32 (*)[4]) &sp108[0], (f32 *) &spFC, &spF4); + func_80021F84((f32 (*)[4]) &sp108[0], arg1); + func_80022180(&gGfxPool->mtxPool[D_80164AF0] + 0xFAC0, (f32 (*)[4]) &sp108[0]); temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0x1020040; - temp_v0_2->unk4 = (gGfxPool + (D_80164AF0 << 6) + 0xFAC0) & 0x1FFFFFFF; + temp_v0_2->words.w0 = 0x01020040; + temp_v0_2->words.w1 = (s32) (&gGfxPool->mtxPool[D_80164AF0] + 0xFAC0) & 0x1FFFFFFF; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk0 = 0x6000000; - temp_v0_3->unk4 = &D_0D008DB8; + temp_v0_3->words.w0 = 0x06000000; + temp_v0_3->words.w1 = (u32) D_0D008DB8; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk0 = 0xFD100000; - temp_v0_4->unk4 = &D_800E52D0; + temp_v0_4->words.w0 = 0xFD100000; + temp_v0_4->words.w1 = (u32) &D_800E52D0; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk0 = 0xE8000000; - temp_v0_5->unk4 = 0; + temp_v0_5->words.w0 = 0xE8000000; + temp_v0_5->words.w1 = 0; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk0 = 0xF5000100; - temp_v0_6->unk4 = 0x7000000; + temp_v0_6->words.w0 = 0xF5000100; + temp_v0_6->words.w1 = 0x07000000; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk0 = 0xE6000000; - temp_v0_7->unk4 = 0; + temp_v0_7->words.w0 = 0xE6000000; + temp_v0_7->words.w1 = 0; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk0 = 0xF0000000; - temp_v0_8->unk4 = 0x73FC000; + temp_v0_8->words.w0 = 0xF0000000; + temp_v0_8->words.w1 = 0x073FC000; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; sp84 = temp_v0_9; - temp_v0_9->unk0 = 0xE7000000; - sp84->unk4 = 0; + temp_v0_9->words.w0 = 0xE7000000; + sp84->words.w1 = 0; temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; sp80 = temp_v0_10; - temp_v0_10->unk0 = 0xBA000E02; - sp80->unk4 = 0x8000; - func_8004B614(spF0, spEE, spEC, spEA, spE8, spE6, 0xD8); + temp_v0_10->words.w0 = 0xBA000E02; + sp80->words.w1 = 0x00008000; + func_8004B614((s32) spF0, (s32) spEE, (s32) spEC, (s32) spEA, (s32) spE8, (s32) spE6, 0x000000D8); temp_v0_11 = gDisplayListHead; gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk0 = 0xB900031D; - temp_v0_11->unk4 = 0x505978; + temp_v0_11->words.w0 = 0xB900031D; + temp_v0_11->words.w1 = 0x00505978; temp_v0_12 = gDisplayListHead; gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk0 = 0xFD500000; - temp_v0_12->unk4 = D_8018D4BC; + temp_v0_12->words.w0 = 0xFD500000; + temp_v0_12->words.w1 = D_8018D4BC; temp_v0_13 = gDisplayListHead; gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk4 = 0x7080200; - temp_v0_13->unk0 = 0xF5500000; + temp_v0_13->words.w1 = 0x07080200; + temp_v0_13->words.w0 = 0xF5500000; temp_v0_14 = gDisplayListHead; gDisplayListHead = temp_v0_14 + 8; - temp_v0_14->unk4 = 0; - temp_v0_14->unk0 = 0xE6000000; + temp_v0_14->words.w1 = 0; + temp_v0_14->words.w0 = 0xE6000000; temp_v0_15 = gDisplayListHead; gDisplayListHead = temp_v0_15 + 8; - temp_v0_15->unk4 = 0x73FF100; - temp_v0_15->unk0 = 0xF3000000; + temp_v0_15->words.w1 = 0x073FF100; + temp_v0_15->words.w0 = 0xF3000000; temp_v0_16 = gDisplayListHead; gDisplayListHead = temp_v0_16 + 8; - temp_v0_16->unk4 = 0; - temp_v0_16->unk0 = 0xE7000000; + temp_v0_16->words.w1 = 0; + temp_v0_16->words.w0 = 0xE7000000; temp_v0_17 = gDisplayListHead; gDisplayListHead = temp_v0_17 + 8; - temp_v0_17->unk0 = 0xF5481000; - temp_v0_17->unk4 = 0x80200; + temp_v0_17->words.w0 = 0xF5481000; + temp_v0_17->words.w1 = 0x00080200; temp_v0_18 = gDisplayListHead; gDisplayListHead = temp_v0_18 + 8; - temp_v0_18->unk0 = 0xF2000000; - temp_v0_18->unk4 = 0xFC07C; + temp_v0_18->words.w0 = 0xF2000000; + temp_v0_18->words.w1 = 0x000FC07C; temp_v0_19 = gDisplayListHead; gDisplayListHead = temp_v0_19 + 8; - temp_v0_19->unk4 = &D_800E5250; - temp_v0_19->unk0 = 0x400103F; + temp_v0_19->words.w1 = (u32) &D_800E5250; + temp_v0_19->words.w0 = 0x0400103F; temp_v0_20 = gDisplayListHead; gDisplayListHead = temp_v0_20 + 8; - temp_v0_20->unk4 = &D_0D008C78; - temp_v0_20->unk0 = 0x6000000; + temp_v0_20->words.w1 = (u32) D_0D008C78; + temp_v0_20->words.w0 = 0x06000000; temp_v0_21 = gDisplayListHead; gDisplayListHead = temp_v0_21 + 8; - temp_v0_21->unk0 = 0xFD500000; - temp_v0_21->unk4 = D_8018D4C0 - 0x40; + temp_v0_21->words.w0 = 0xFD500000; + temp_v0_21->words.w1 = D_8018D4C0 - 0x40; temp_v0_22 = gDisplayListHead; gDisplayListHead = temp_v0_22 + 8; - temp_v0_22->unk4 = 0x7080200; - temp_v0_22->unk0 = 0xF5500000; + temp_v0_22->words.w1 = 0x07080200; + temp_v0_22->words.w0 = 0xF5500000; temp_v0_23 = gDisplayListHead; gDisplayListHead = temp_v0_23 + 8; - temp_v0_23->unk4 = 0; - temp_v0_23->unk0 = 0xE6000000; + temp_v0_23->words.w1 = 0; + temp_v0_23->words.w0 = 0xE6000000; temp_v0_24 = gDisplayListHead; gDisplayListHead = temp_v0_24 + 8; - temp_v0_24->unk4 = 0x73FF100; - temp_v0_24->unk0 = 0xF3000000; + temp_v0_24->words.w1 = 0x073FF100; + temp_v0_24->words.w0 = 0xF3000000; temp_v0_25 = gDisplayListHead; gDisplayListHead = temp_v0_25 + 8; - temp_v0_25->unk4 = 0; - temp_v0_25->unk0 = 0xE7000000; + temp_v0_25->words.w1 = 0; + temp_v0_25->words.w0 = 0xE7000000; temp_v0_26 = gDisplayListHead; gDisplayListHead = temp_v0_26 + 8; - temp_v0_26->unk0 = 0xF5481000; - temp_v0_26->unk4 = 0x80200; + temp_v0_26->words.w0 = 0xF5481000; + temp_v0_26->words.w1 = 0x00080200; temp_v0_27 = gDisplayListHead; gDisplayListHead = temp_v0_27 + 8; - temp_v0_27->unk0 = 0xF2000000; - temp_v0_27->unk4 = 0xFC07C; + temp_v0_27->words.w0 = 0xF2000000; + temp_v0_27->words.w1 = 0x000FC07C; temp_v0_28 = gDisplayListHead; gDisplayListHead = temp_v0_28 + 8; - temp_v0_28->unk4 = &D_800E5290; - temp_v0_28->unk0 = 0x400103F; + temp_v0_28->words.w1 = (u32) &D_800E5290; + temp_v0_28->words.w0 = 0x0400103F; temp_v0_29 = gDisplayListHead; gDisplayListHead = temp_v0_29 + 8; - temp_v0_29->unk4 = &D_0D008C78; - temp_v0_29->unk0 = 0x6000000; + temp_v0_29->words.w1 = (u32) D_0D008C78; + temp_v0_29->words.w0 = 0x06000000; temp_v0_30 = gDisplayListHead; gDisplayListHead = temp_v0_30 + 8; - temp_v0_30->unk4 = 0x10001; - temp_v0_30->unk0 = 0xBB000000; - D_80164AF0 = D_80164AF0 + 1; + temp_v0_30->words.w1 = 0x00010001; + temp_v0_30->words.w0 = 0xBB000000; + D_80164AF0 += 1; } #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006BB34.s") @@ -10714,23 +9673,13 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006C4D4.s") #ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -void func_8005DA30(s16, s32, s8, s32); /* extern */ -void func_8005DAF4(s16, s32, s8, s32); /* extern */ -void func_8005EA94(s16, s32, s8, s32); /* extern */ -void func_8005ED48(s16, s32, s8, s32); /* extern */ -void func_8005F90C(s16, s32, s8, s32); /* extern */ -void func_80060BCC(s16, s32, s8, s32); /* extern */ -void func_80062F98(s16, s8, s8); /* extern */ -void func_80063408(s16, s8, s8); /* extern */ -void func_800635D4(s16, s8, s8); /* extern */ -void func_800639DC(s16, s8, s8); /* extern */ -void func_80063BD4(s16, s8, s8); /* extern */ -void func_80063D58(s16, s8, s8); /* extern */ -void func_800643A8(s16, s8, s8); /* extern */ -extern f32 D_801652A0; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_8005DAF4(s16, s32, s8, s32); /* extern */ +? func_8005EA94(s16, s32, s8, s32); /* extern */ +? func_8005ED48(s16, s32, s8, s32); /* extern */ +? func_8005F90C(s16, s32, s8, s32); /* extern */ -void func_8006C6AC(void *arg0, s16 arg1, s8 arg2, s8 arg3) { +void func_8006C6AC(Player *player, s16 arg1, s8 arg2, s8 arg3) { s32 sp28; f32 temp_f0; s32 temp_v0; @@ -10743,61 +9692,60 @@ void func_8006C6AC(void *arg0, s16 arg1, s8 arg2, s8 arg3) { if (temp_v0 < 0) { sp28 = 9; } - temp_v0_2 = arg0 + (arg1 * 0x48); + temp_v0_2 = player + (arg1 * 0x48); if (temp_v0_2->unk544 == 1) { temp_t2 = temp_v0_2->unk53A; switch (temp_t2) { case 1: - func_80063408(arg1, arg2, arg3); + func_80063408(player, arg1, arg2, arg3); return; case 2: - func_800635D4(arg1, arg2, arg3); + func_800635D4(player, arg1, arg2, arg3); return; case 3: - func_80063BD4(arg1, arg2, arg3); + func_80063BD4(player, arg1, arg2, arg3); return; case 4: - func_800643A8(arg1, arg2, arg3); + func_800643A8(player, arg1, arg2, arg3); return; case 5: - func_800639DC(arg1, arg2, arg3); + func_800639DC(player, arg1, arg2, arg3); return; case 9: - func_80063D58(arg1, arg2, arg3); + func_80063D58(player, arg1, arg2, arg3); return; case 11: - func_80062F98(arg1, arg2, arg3); + func_80062F98(player, arg1, arg2, arg3); return; } } else { - if ((arg0->unkDE & 1) != 0) { - func_80060BCC(arg1, sp28, arg2, arg3); + if (player->unk_0DE & 1) { + func_80060BCC(player, arg1, sp28, (s32) arg2, /* extra? */ (s32) arg3); return; } - temp_v0_3 = arg0->unkBC; - if (((temp_v0_3 & 8) == 0) && ((temp_v0_3 & 2) == 0)) { - if (((temp_v0_3 & 0x10) == 0x10) && ((arg0->unk0 & 0x4000) == 0x4000)) { - func_8005DA30(arg1, sp28, arg2, arg3); + temp_v0_3 = player->unk_0BC; + if (!(temp_v0_3 & 8) && !(temp_v0_3 & 2)) { + if (((temp_v0_3 & 0x10) == 0x10) && ((player->unk_000 & 0x4000) == 0x4000)) { + func_8005DA30(player, arg1, sp28, arg2, (s8) (s32) arg3); return; } - temp_f0 = *(&D_801652A0 + (arg2 * 4)); - if (((temp_f0 - arg0->unk1F0) >= 3.5) || ((temp_f0 - arg0->unk1D8) >= 3.5)) { - func_8005EA94(arg1, sp28, arg2, arg3); + temp_f0 = D_801652A0[arg2]; + if (((f64) (temp_f0 - player->boundingBoxCorners[3].cornerGroundY) >= 3.5) || ((f64) (temp_f0 - player->boundingBoxCorners[2].cornerGroundY) >= 3.5)) { + func_8005EA94(arg1, sp28, arg2, (s32) arg3); return; } if (((temp_v0_3 & 0x80) == 0x80) || ((temp_v0_3 & 0x40) == 0x40)) { - func_8005F90C(arg1, sp28, arg2, arg3); + func_8005F90C(arg1, sp28, arg2, (s32) arg3); return; } - if ((((temp_v0_3 & 0x4000) != 0) && ((arg0->unk0 & 0x2000) == 0)) || ((temp_v0_3 & 0x800) != 0) || ((temp_v0_3 & 0x20) != 0) || ((arg0->unk44 & 0x4000) != 0)) { - func_8005ED48(arg1, sp28, arg2, arg3); + if (((temp_v0_3 & 0x4000) && !(player->unk_000 & 0x2000)) || (temp_v0_3 & 0x800) || (temp_v0_3 & 0x20) || (player->unk_044 & 0x4000)) { + func_8005ED48(arg1, sp28, arg2, (s32) arg3); return; } - func_8005DAF4(arg1, sp28, arg2, arg3); - /* Duplicate return node #32. Try simplifying control flow for better match */ - return; + func_8005DAF4(arg1, sp28, arg2, (s32) arg3); + } else { + default: } - default: } } #else @@ -10805,27 +9753,10 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006C6AC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -void func_800612F8(s16, s32, s8, s32); /* extern */ -void func_80061430(s16, s32, s8, s32); /* extern */ -void func_800615AC(s16, s32, s8, s32); /* extern */ -void func_8006199C(s16, s32, s8, s32); /* extern */ -void func_80061A34(s16, s32, s8, s32); /* extern */ -void func_80061D4C(s16, s32, s8, s32); /* extern */ -void func_80061EF4(s16, s32, s8, s32); /* extern */ -void func_800621BC(s16, s32, s8, s32); /* extern */ -void func_800624D8(s16, s32, s8, s32); /* extern */ -void func_800644E8(s16, s8, s8); /* extern */ -void func_80064664(s16, s8, s8); /* extern */ -void func_800647C8(s16, s8, s8); /* extern */ -void func_800648E4(s16, s8, s8); /* extern */ -void func_80064988(s16, s8, s8); /* extern */ -void func_800649F4(s16, s8, s8); /* extern */ -void func_80064B30(s16, s8, s8); /* extern */ -void func_80064C74(s16, s8, s8); /* extern */ -extern s32 D_8018D930; +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +extern ? D_8018D930; -void func_8006C9B8(void *arg0, s16 arg1, s8 arg2, s8 arg3) { +void func_8006C9B8(Player *player, s16 arg1, s8 arg2, s8 arg3) { s32 sp28; s16 temp_a2; s16 temp_a3; @@ -10841,89 +9772,89 @@ void func_8006C9B8(void *arg0, s16 arg1, s8 arg2, s8 arg3) { if (temp_v0 < 0) { sp28 = 9; } - temp_v0_2 = arg0 + (arg1 * 0x48); + temp_v0_2 = player + (arg1 * 0x48); if (temp_v0_2->unkAE4 == 1) { temp_t3 = temp_v0_2->unkADA; switch (temp_t3) { case 1: - func_800644E8(arg1, arg2, arg3); + func_800644E8(player, arg1, (s32) arg2, (s32) arg3); return; case 2: - func_800649F4(arg1, arg2, arg3); + func_800649F4(player, arg1, arg2, arg3); return; case 3: - func_80064C74(arg1, arg2, arg3); + func_80064C74(player, arg1, arg2, arg3); return; case 4: - func_800647C8(arg1, arg2, arg3); + func_800647C8(player, arg1, arg2, arg3); return; case 5: - func_80064B30(arg1, arg2, arg3); + func_80064B30(player, arg1, arg2, arg3); return; case 6: - func_800648E4(arg1, arg2, arg3); + func_800648E4(player, arg1, arg2, arg3); return; case 7: - func_80064988(arg1, arg2, arg3); + func_80064988(player, arg1, arg2, arg3); return; case 8: - func_80064C74(arg1, arg2, arg3); + func_80064C74(player, arg1, arg2, arg3); return; case 9: - func_80064664(arg1, arg2, arg3); + func_80064664(player, arg1, (s32) arg2, (s32) arg3); return; } } else { - temp_a3 = arg0->unk44; - if ((temp_a3 & 0x1000) != 0) { - func_80061430(arg1, sp28, arg2, arg3); - arg0->unk44 = arg0->unk44 & 0xFEFF; + temp_a3 = player->unk_044; + if (temp_a3 & 0x1000) { + func_80061430(player, (s32) arg1, sp28, (s32) arg2, /* extra? */ (s32) arg3); + player->unk_044 &= 0xFEFF; return; } - temp_a2 = arg0->unkCA; - if (((temp_a2 & 0x1000) == 0x1000) || ((temp_v0_3 = arg0->unkE0, ((temp_v0_3 < 2) != 0)) && ((arg0->unkBC << 7) < 0)) || ((temp_v1 = arg0->unkBC, ((temp_v0_3 < 2) != 0)) && ((temp_v1 << 6) < 0)) || ((temp_v1 & 0x400) != 0)) { - func_8006199C(arg1, sp28, arg2, arg3); - arg0->unk46 = arg0->unk46 & 0xFFF7; - arg0->unk44 = arg0->unk44 & 0xFEFF; + temp_a2 = player->unk_0CA; + if (((temp_a2 & 0x1000) == 0x1000) || ((temp_v0_3 = player->unk_0E0, ((temp_v0_3 < 2) != 0)) && (player->unk_0BC & 0x01000000)) || ((temp_v1 = player->unk_0BC, ((temp_v0_3 < 2) != 0)) && (temp_v1 & 0x02000000)) || (temp_v1 & 0x400)) { + func_8006199C(player, arg1, sp28, arg2, (s8) (s32) arg3); + player->unk_046 &= 0xFFF7; + player->unk_044 &= 0xFEFF; return; } if ((temp_a2 & 0x2000) == 0x2000) { - func_80061A34(arg1, sp28, arg2, arg3); - arg0->unk46 = arg0->unk46 & 0xFFF7; - arg0->unk44 = arg0->unk44 & 0xFEFF; + func_80061A34(player, arg1, sp28, (s32) arg2, /* extra? */ (s32) arg3); + player->unk_046 &= 0xFFF7; + player->unk_044 &= 0xFEFF; return; } - if (((temp_v1 & 0x200) != 0) && ((gCourseTimer - *(&D_8018D930 + (arg2 * 4))) < 9)) { - func_800615AC(arg1, sp28, arg2, arg3); - arg0->unk46 = arg0->unk46 & 0xFFF7; - arg0->unk44 = arg0->unk44 & 0xFEFF; + if ((temp_v1 & 0x200) && (((s32) gCourseTimer - *(&D_8018D930 + (arg2 * 4))) < 9)) { + func_800615AC(player, arg1, sp28, (s32) arg2, /* extra? */ (s32) arg3); + player->unk_046 &= 0xFFF7; + player->unk_044 &= 0xFEFF; return; } - temp_v0_4 = arg0->unk46; + temp_v0_4 = player->unk_046; if ((temp_v0_4 & 8) == 8) { - func_800612F8(arg1, sp28, arg2, arg3); - arg0->unk44 = arg0->unk44 & 0xFEFF; + func_800612F8(player, (s32) arg1, sp28, (s32) arg2, /* extra? */ (s32) arg3); + player->unk_044 &= 0xFEFF; return; } - if (((temp_v0_4 & 0x20) == 0x20) && (((arg0->unk94 / 18.0f) * 216.0f) >= 20.0f)) { - func_80061D4C(arg1, sp28, arg2, arg3); - arg0->unk46 = arg0->unk46 & 0xFFF7; - arg0->unk44 = arg0->unk44 & 0xFEFF; + if (((temp_v0_4 & 0x20) == 0x20) && (((player->unk_094 / 18.0f) * 216.0f) >= 20.0f)) { + func_80061D4C(player, arg1, sp28, (s32) arg2, /* extra? */ (s32) arg3); + player->unk_046 &= 0xFFF7; + player->unk_044 &= 0xFEFF; return; } - if (((temp_v1 & 0x2000) != 0) && ((arg0->unk0 & 0x4000) != 0)) { - func_800621BC(arg1, sp28, arg2, arg3); + if ((temp_v1 & 0x2000) && (player->unk_000 & 0x4000)) { + func_800621BC(player, arg1, sp28, arg2, /* extra? */ (s32) arg3); return; } - if ((((temp_v1 << 0xA) < 0) || (temp_v1 & 0x100000)) && ((arg0->unk0 & 0x4000) == 0x4000)) { - func_80061EF4(arg1, sp28, arg2, arg3); - arg0->unk46 = arg0->unk46 & 0xFFF7; - arg0->unk44 = arg0->unk44 & 0xFEFF; + if (((temp_v1 & 0x200000) || (temp_v1 & 0x100000)) && ((player->unk_000 & 0x4000) == 0x4000)) { + func_80061EF4(player, arg1, sp28, (s32) arg2, /* extra? */ (s32) arg3); + player->unk_046 &= 0xFFF7; + player->unk_044 &= 0xFEFF; return; } if ((temp_a3 & 0x100) == 0x100) { - func_800624D8(arg1, sp28, arg2, arg3); - arg0->unk46 = arg0->unk46 & 0xFFF7; + func_800624D8(player, (s32) arg1, sp28, (s32) arg2, /* extra? */ (s32) arg3); + player->unk_046 &= 0xFFF7; } default: } @@ -10933,177 +9864,147 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006C9B8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -void func_80060504(s16, s32, s8, s32); /* extern */ -void func_80060B14(s16, s32, s8, s32); /* extern */ -void func_80060F50(s16, s32, s8, s32); /* extern */ -void func_80061094(s16, s32, s8, s32); /* extern */ -void func_80061224(s16, s32, s8, s32); /* extern */ -void func_80062C74(s16, s8, s8); /* extern */ -void func_800630C0(s16, s8, s8); /* extern */ -void func_800631A8(s16, s8, s8); /* extern */ -void func_80063268(s16, s8, s8); /* extern */ -void func_80064184(s16, s8, s8); /* extern */ +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_80060504(s16, s32, s8, s32); /* extern */ +? func_80060B14(s16, s32, s8, s32); /* extern */ +? func_80061224(s16, s32, s8, s32); /* extern */ +? func_80062C74(s16, s8, s8); /* extern */ -void func_8006CEC0(void *arg0, s16 arg1, s8 arg2, s8 arg3) { +void func_8006CEC0(Player *player, s16 arg1, s8 arg2, s8 arg3) { s32 sp20; + s16 temp_v0_4; s16 temp_v0_5; - s16 temp_v0_6; s32 temp_t1_2; s32 temp_v0; - s32 temp_v0_4; + s32 temp_v0_3; s32 temp_v1; u16 temp_t1; - u16 temp_v0_3; - void *temp_v0_2; + u16 temp_v0_2; temp_v0 = arg1 - 1; sp20 = temp_v0; if (temp_v0 < 0) { sp20 = 9; } - temp_v0_2 = arg0 + (arg1 * 0x48); - if (temp_v0_2->unk274 == 1) { - temp_t1 = temp_v0_2->unk26A; + if (player->unk_258[arg1].unk_01C == 1) { + temp_t1 = player->unk_258[arg1].unk_012; switch (temp_t1) { case 1: func_80062C74(arg1, arg2, arg3); return; case 3: - func_80064184(arg1, arg2, arg3); + func_80064184(player, arg1, arg2, arg3); return; case 5: - func_800630C0(arg1, arg2, arg3); + func_800630C0(player, arg1, arg2, arg3); return; case 6: - func_800631A8(arg1, arg2, arg3); + func_800631A8(player, arg1, arg2, arg3); return; case 7: - func_80063268(arg1, arg2, arg3); + func_80063268(player, arg1, arg2, arg3); return; } } else { - if (((arg0->unk44 & 0x200) != 0) && ((arg0->unk0 & 0x4000) != 0)) { - func_80061224(arg1, sp20, arg2, arg3); + if ((player->unk_044 & 0x200) && (player->unk_000 & 0x4000)) { + func_80061224(arg1, sp20, arg2, (s32) arg3); return; } - temp_v1 = arg0->unkBC; - if (((temp_v1 & 0x40000000) == 0x40000000) && (arg0->unkB0 < 0x32)) { - func_80061094(arg1, sp20, arg2, arg3); + temp_v1 = player->unk_0BC; + if (((temp_v1 & 0x40000000) == 0x40000000) && (player->unk_0B0 < 0x32)) { + func_80061094(player, arg1, (s8) sp20, arg2, /* extra? */ (s32) arg3); return; } - temp_t1_2 = arg0->unk0 & 0x4000; + temp_t1_2 = player->unk_000 & 0x4000; if (temp_t1_2 == 0x4000) { - temp_v0_3 = arg0->unkDE; - if ((temp_v0_3 & 8) == 8) { - func_80060F50(arg1, sp20, arg2, arg3); + temp_v0_2 = player->unk_0DE; + if ((temp_v0_2 & 8) == 8) { + func_80060F50(player, arg1, (s8) sp20, arg2, /* extra? */ (s32) arg3); return; } - if (((temp_v0_3 & 2) != 0) || ((temp_v0_3 & 1) != 0)) { - func_80060B14(arg1, sp20, arg2, arg3); + if ((temp_v0_2 & 2) || (temp_v0_2 & 1)) { + func_80060B14(arg1, sp20, arg2, (s32) arg3); return; } goto block_22; } block_22: - temp_v0_4 = gActiveScreenMode; - if (temp_v0_4 != SCREEN_MODE_1P) { - if ((temp_v0_4 != SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL) && (temp_v0_4 != SCREEN_MODE_2P_SPLITSCREEN_VERTICAL) && (temp_v0_4 != SCREEN_MODE_3P_4P_SPLITSCREEN)) { - return; - } - if ((temp_t1_2 != 0) && ((temp_v1 & 0x4000000) != 0x4000000) && ((temp_v1 & 0x400) != 0x400) && ((temp_v1 & 0x1000000) != 0x1000000)) { - temp_v0_5 = arg0->unkCA; - if (((temp_v0_5 & 2) != 2) && ((temp_v0_5 & 0x10) != 0x10) && ((temp_v0_5 & 0x100) == 0)) { - func_80060504(arg1, sp20, arg2, arg3); + temp_v0_3 = gActiveScreenMode; + switch (temp_v0_3) { /* switch 1; irregular */ + case 0: /* switch 1 */ + if (((temp_v1 & 0x04000000) != 0x04000000) && ((temp_v1 & 0x400) != 0x400) && ((temp_v1 & 0x01000000) != 0x01000000)) { + temp_v0_4 = player->unk_0CA; + if (((temp_v0_4 & 2) != 2) && ((temp_v0_4 & 0x10) != 0x10) && !(temp_v0_4 & 0x100)) { + func_80060504(arg1, sp20, arg2, (s32) arg3); + return; } } - /* Duplicate return node #42. Try simplifying control flow for better match */ + default: return; + case 1: /* switch 1 */ + case 2: /* switch 1 */ + case 3: /* switch 1 */ + if ((temp_t1_2 != 0) && ((temp_v1 & 0x04000000) != 0x04000000) && ((temp_v1 & 0x400) != 0x400) && ((temp_v1 & 0x01000000) != 0x01000000)) { + temp_v0_5 = player->unk_0CA; + if (((temp_v0_5 & 2) != 2) && ((temp_v0_5 & 0x10) != 0x10) && !(temp_v0_5 & 0x100)) { + func_80060504(arg1, sp20, arg2, (s32) arg3); + } + } + break; } - if (((temp_v1 & 0x4000000) != 0x4000000) && ((temp_v1 & 0x400) != 0x400) && ((temp_v1 & 0x1000000) != 0x1000000) && (temp_v0_6 = arg0->unkCA, ((temp_v0_6 & 2) != 2)) && ((temp_v0_6 & 0x10) != 0x10) && ((temp_v0_6 & 0x100) == 0)) { - func_80060504(arg1, sp20, arg2, arg3); - return; - } - default: } } #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006CEC0.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -void func_800628C0(void *, s8, s8, ?); /* extern */ -void func_80062914(void *, s8, s8, ?); /* extern */ -void func_80062968(void *, s8, s8, ?); /* extern */ -void func_800629BC(void *, s8, s8, ?); /* extern */ -void func_80062A18(void *, s8, s8, ?); /* extern */ -void func_80062AA8(void *, s8, s8, ?); /* extern */ -void func_80064DEC(void *, s8, s8, ?); /* extern */ -void func_80064EA4(void *, s8, s8, ?); /* extern */ -void func_80064F88(void *, s8, s8, ?); /* extern */ -void func_80065030(void *, s8, s8, ?); /* extern */ -void func_800650FC(void *, s8, s8, ?); /* extern */ -void func_800651F4(void *, s8, s8, ?); /* extern */ - -void func_8006D194(void *arg0, s8 arg1, s8 arg2) { - u16 temp_t9; - u16 phi_v0; - u16 phi_v0_2; - u16 phi_v0_3; - - if (arg0->unk814 == 1) { - temp_t9 = arg0->unk80A; - switch (temp_t9) { +#ifdef NON_MATCHING +// So, a lot of the functions called by this function have their argument types +// slightly wrong. +// For example, func_80064DEC, arg1 is currently marked as an s16 but based on +// this function it ought to be an s8 +void func_8006D194(Player *player, s8 arg1, s8 arg2) { + if (player->unk_258[0x14].unk_01C == 1) { + switch (player->unk_258[0x14].unk_012) { case 2: - func_80064DEC(arg0, arg1, arg2, 0); + func_80064DEC(player, arg1, arg2, 0); break; case 3: - func_800650FC(arg0, arg1, arg2, 0); + func_800650FC(player, arg1, arg2, 0); break; case 4: - func_80064EA4(arg0, arg1, arg2, 0); + func_80064EA4(player, arg1, arg2, 0); break; case 5: - func_80064F88(arg0, arg1, arg2, 0); + func_80064F88(player, arg1, arg2, 0); break; case 6: - func_80065030(arg0, arg1, arg2, 0); + func_80065030(player, arg1, arg2, 0); break; } } else { - if ((arg0->unkB6 & 0x40) == 0x40) { - func_800628C0(arg0, arg1, arg2, 0); + if ((player->unk_0B6 & 0x40) == 0x40) { + func_800628C0(player, arg1, arg2, 0); } - phi_v0 = arg0->unkB6; - if ((arg0->unkB6 & 0x800) == 0x800) { - func_80062968(arg0, arg1, arg2, 0); - phi_v0 = arg0->unkB6; + if ((player->unk_0B6 & 0x800) == 0x800) { + func_80062968(player, arg1, arg2, 0); } - phi_v0_2 = phi_v0; - if ((phi_v0 & 0x1000) == 0x1000) { - func_80062914(arg0, arg1, arg2, 0); - phi_v0_2 = arg0->unkB6; + if ((player->unk_0B6 & 0x1000) == 0x1000) { + func_80062914(player, arg1, arg2, 0); } - phi_v0_3 = phi_v0_2; - if ((phi_v0_2 & 0x80) == 0x80) { - func_80062A18(arg0, arg1, arg2, 0); - phi_v0_3 = arg0->unkB6; + if ((player->unk_0B6 & 0x80) == 0x80) { + func_80062A18(player, arg1, arg2, 0); } - if ((phi_v0_3 & 0x100) == 0x100) { - func_800629BC(arg0, arg1, arg2, 0); + if ((player->unk_0B6 & 0x100) == 0x100) { + func_800629BC(player, arg1, arg2, 0); } } - if (arg0->unk85C == 1) { - if (arg0->unk852 == 5) { - func_800651F4(arg0, arg1, arg2, 1); - return; + if (player->unk_258[0x15].unk_01C == 1) { + if (player->unk_258[0x15].unk_012 == 5) { + func_800651F4(player, arg1, arg2, 1); } - /* Duplicate return node #23. Try simplifying control flow for better match */ - return; - } - if ((arg0->unkB6 & 0x20) == 0x20) { - func_80062AA8(arg0, arg1, arg2, 1); + } else if ((player->unk_0B6 & 0x20) == 0x20) { + func_80062AA8(player, arg1, arg2, 1); } } #else @@ -11111,167 +10012,167 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006D194.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -void func_8006538C(void *, s8, s16, s8); /* extern */ -void func_80065AB0(void *, s8, s16, s8); /* extern */ -void func_80065F0C(void *, s8, s16, s8); /* extern */ -void func_800664E0(void *, s8, s16, s8); /* extern */ -void func_80066BAC(void *, s8, s16, s8); /* extern */ -void func_80067280(void *, s8, s16, s8); /* extern */ -void func_80067604(void *, s8, s16, s8); /* extern */ -void func_800691B8(void *, s8, s16, s8); /* extern */ -void func_80069444(void *, s8, s16, s8); /* extern */ -void func_800696CC(void *, s8, s16, s8, f32); /* extern */ -void func_80069938(void *, s8, s16, s8); /* extern */ -void func_80069BA8(void *, s8, s16, s8); /* extern */ -void func_80069DB8(void *, s8, s16, s8); /* extern */ -void func_8006A01C(void *, s8, s16, s8); /* extern */ -void func_8006BA94(void *, s8, s8); /* extern */ +//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b +? func_8006538C(Player *, s8, s16, s8); /* extern */ +? func_80065AB0(Player *, s8, s16, s8); /* extern */ +? func_80065F0C(Player *, s8, s16, s8); /* extern */ +? func_800664E0(Player *, s8, s16, s8); /* extern */ +? func_80066BAC(Player *, s8, s16, s8); /* extern */ +? func_80067280(Player *, s8, s16, s8); /* extern */ +? func_80067604(Player *, s8, s16, s8); /* extern */ +? func_800691B8(Player *, s8, s16, s8); /* extern */ +? func_80069444(Player *, s8, s16, s8); /* extern */ +? func_800696CC(Player *, s8, s16, s8, f32); /* extern */ +? func_80069938(Player *, s8, s16, s8); /* extern */ +? func_80069BA8(Player *, s8, s16, s8); /* extern */ +? func_80069DB8(Player *, s8, s16, s8); /* extern */ +? func_8006A01C(Player *, s8, s16, s8); /* extern */ -void func_8006D474(void *arg0, s8 arg1, s8 arg2) { +void func_8006D474(Player *player, s8 arg1, s8 arg2) { s32 sp44; - s16 temp_s2; + s16 var_s2; s32 temp_t8; s32 temp_v0; u16 temp_t6; u16 temp_t8_2; u16 temp_v0_2; void *temp_s5; - s16 phi_s2; temp_t8 = arg2 * 4; sp44 = temp_t8; temp_v0 = 8 << temp_t8; - if (temp_v0 == (arg0->unk2 & temp_v0)) { - phi_s2 = 0; + if (temp_v0 == (player->unk_002 & temp_v0)) { + var_s2 = 0; do { - temp_s5 = arg0 + (phi_s2 * 0x48); - temp_v0_2 = temp_s5->unk26A; - if (temp_v0_2 != 1) { - if (temp_v0_2 != 6) { - - } else if (gActiveScreenMode == SCREEN_MODE_3P_4P_SPLITSCREEN) { + temp_s5 = player + (var_s2 * 0x48); + temp_v0_2 = player->unk_258[var_s2].unk_012; + switch (temp_v0_2) { /* switch 3; irregular */ + case 1: /* switch 3 */ + if (gActiveScreenMode == 3) { if (arg2 == arg1) { - func_80066BAC(arg0, arg1, phi_s2, arg2); + func_8006538C(player, arg1, var_s2, arg2); + } + } else { + func_8006538C(player, arg1, var_s2, arg2); + } + break; + case 6: /* switch 3 */ + if (gActiveScreenMode == 3) { + if (arg2 == arg1) { + func_80066BAC(player, arg1, var_s2, arg2); } } else if (arg2 == arg1) { - func_80066BAC(arg0, arg1, phi_s2, arg2); + func_80066BAC(player, arg1, var_s2, arg2); } - } else if (gActiveScreenMode == SCREEN_MODE_3P_4P_SPLITSCREEN) { - if (arg2 == arg1) { - func_8006538C(arg0, arg1, phi_s2, arg2); - } - } else { - func_8006538C(arg0, arg1, phi_s2, arg2); + break; } temp_t8_2 = temp_s5->unkADA; switch (temp_t8_2) { /* switch 1 */ case 1: /* switch 1 */ case 9: /* switch 1 */ - if (gActiveScreenMode == SCREEN_MODE_1P) { - func_800691B8(arg0, arg1, phi_s2, arg2); + if (gActiveScreenMode == 0) { + func_800691B8(player, arg1, var_s2, arg2); } else if (arg2 == arg1) { - func_800691B8(arg0, arg1, phi_s2, arg2); + func_800691B8(player, arg1, var_s2, arg2); } break; case 2: /* switch 1 */ - if (gActiveScreenMode == SCREEN_MODE_1P) { - func_800696CC(arg0, arg1, phi_s2, arg2, temp_s5->unkAD4); + if (gActiveScreenMode == 0) { + func_800696CC(player, arg1, var_s2, arg2, temp_s5->unkAD4); } else if (arg2 == arg1) { - func_800696CC(arg0, arg1, phi_s2, arg2, temp_s5->unkAD4); + func_800696CC(player, arg1, var_s2, arg2, temp_s5->unkAD4); } break; case 3: /* switch 1 */ - if (gActiveScreenMode == SCREEN_MODE_1P) { - func_80067280(arg0, arg1, phi_s2, arg2); + if (gActiveScreenMode == 0) { + func_80067280(player, arg1, var_s2, arg2); } else if (arg2 == arg1) { - func_80067280(arg0, arg1, phi_s2, arg2); + func_80067280(player, arg1, var_s2, arg2); } break; case 4: /* switch 1 */ - if (gActiveScreenMode == SCREEN_MODE_1P) { - func_80069444(arg0, arg1, phi_s2, arg2); + if (gActiveScreenMode == 0) { + func_80069444(player, arg1, var_s2, arg2); } else if (arg2 == arg1) { - func_80069444(arg0, arg1, phi_s2, arg2); + func_80069444(player, arg1, var_s2, arg2); } break; case 5: /* switch 1 */ - if (gActiveScreenMode == SCREEN_MODE_1P) { - func_80069938(arg0, arg1, phi_s2, arg2); + if (gActiveScreenMode == 0) { + func_80069938(player, arg1, var_s2, arg2); } else if (arg2 == arg1) { - func_80069938(arg0, arg1, phi_s2, arg2); + func_80069938(player, arg1, var_s2, arg2); } break; case 6: /* switch 1 */ - if (gActiveScreenMode == SCREEN_MODE_1P) { - func_80069BA8(arg0, arg1, phi_s2, arg2); + if (gActiveScreenMode == 0) { + func_80069BA8(player, arg1, var_s2, arg2); } else if (arg2 == arg1) { - func_80069BA8(arg0, arg1, phi_s2, arg2); + func_80069BA8(player, arg1, var_s2, arg2); } break; case 7: /* switch 1 */ - if (gActiveScreenMode == SCREEN_MODE_1P) { - func_80069DB8(arg0, arg1, phi_s2, arg2); + if (gActiveScreenMode == 0) { + func_80069DB8(player, arg1, var_s2, arg2); } else if (arg2 == arg1) { - func_80069DB8(arg0, arg1, phi_s2, arg2); + func_80069DB8(player, arg1, var_s2, arg2); } break; case 8: /* switch 1 */ - if (gActiveScreenMode == SCREEN_MODE_1P) { - func_80067604(arg0, arg1, phi_s2, arg2); + if (gActiveScreenMode == 0) { + func_80067604(player, arg1, var_s2, arg2); } else if (arg2 == arg1) { - func_80067604(arg0, arg1, phi_s2, arg2); + func_80067604(player, arg1, var_s2, arg2); } break; } temp_t6 = temp_s5->unk53A; switch (temp_t6) { /* switch 2 */ case 1: /* switch 2 */ - if (gActiveScreenMode == SCREEN_MODE_3P_4P_SPLITSCREEN) { + if (gActiveScreenMode == 3) { if (arg2 == arg1) { - func_80065AB0(arg0, arg1, phi_s2, arg2); + func_80065AB0(player, arg1, var_s2, arg2); } } else { - func_80065AB0(arg0, arg1, phi_s2, arg2); + func_80065AB0(player, arg1, var_s2, arg2); } break; case 2: /* switch 2 */ case 3: /* switch 2 */ case 4: /* switch 2 */ case 5: /* switch 2 */ - if (gActiveScreenMode == SCREEN_MODE_3P_4P_SPLITSCREEN) { + if (gActiveScreenMode == 3) { if (arg2 == arg1) { - func_80065F0C(arg0, arg1, phi_s2, arg2); + func_80065F0C(player, arg1, var_s2, arg2); } } else { - func_80065F0C(arg0, arg1, phi_s2, arg2); + func_80065F0C(player, arg1, var_s2, arg2); } break; case 9: /* switch 2 */ - if (gActiveScreenMode == SCREEN_MODE_3P_4P_SPLITSCREEN) { + if (gActiveScreenMode == 3) { if (arg2 == arg1) { - func_800664E0(arg0, arg1, phi_s2, arg2); + func_800664E0(player, arg1, var_s2, arg2); } } else { - func_800664E0(arg0, arg1, phi_s2, arg2); + func_800664E0(player, arg1, var_s2, arg2); } break; case 11: /* switch 2 */ - if (gActiveScreenMode == SCREEN_MODE_3P_4P_SPLITSCREEN) { + if (gActiveScreenMode == 3) { if (arg2 == arg1) { - func_8006A01C(arg0, arg1, phi_s2, arg2); + func_8006A01C(player, arg1, var_s2, arg2); } } else if (arg2 == arg1) { - func_8006A01C(arg0, arg1, phi_s2, arg2); + func_8006A01C(player, arg1, var_s2, arg2); } break; } - temp_s2 = phi_s2 + 1; - phi_s2 = temp_s2; - } while (temp_s2 < 0xA); + var_s2 += 1; + } while (var_s2 < 0xA); } - if ((gModeSelection == BATTLE) && ((arg0->unk2 & (2 << sp44)) != 0)) { - func_8006BA94(arg0, arg1, arg2); + if ((gModeSelection == 3) && (player->unk_002 & (2 << sp44))) { + func_8006BA94(player, arg1, arg2); } } #else diff --git a/src/code_80057C60.h b/src/code_80057C60.h index d3ae7feef..eb6c209af 100644 --- a/src/code_80057C60.h +++ b/src/code_80057C60.h @@ -91,14 +91,29 @@ void func_8005D794(Player*, UnkPlayerStruct258*, f32, f32, f32, s8, s8); void func_8005D7D8(UnkPlayerStruct258*, s8, f32); void func_8005D800(UnkPlayerStruct258*, s32, s16); void func_8005D82C(UnkPlayerStruct258*, s32, s16); -void func_8005D898(Player*, s16, s8, s8); +void func_8005D898(Player*, s16, s32, s8, s8); +void func_8005DA30(Player*, s16, s32, s8, s8); void func_8005DAD0(); void func_8005DAD8(UnkPlayerStruct258*, s16, s16, s16); + +void func_80060BCC(Player*, s16, s32, s32); void func_80060F50(Player*, s16, s8, s8); + void func_80061094(Player*, s16, s8, s8); -void func_80061130(Player*, s16, s8, s8); +void func_80061130(Player*, s16, s32, s8, s8); +void func_80061224(Player*, s16, s32, s8, s8); +void func_800612F8(Player*, s32, s32, s32); +void func_80061430(Player*, s32, s32, s32); +void func_800615AC(Player*, s16, s32, s32); +void func_80061754(Player*, s16, s32, s32, s32); +void func_8006199C(Player*, s16, s32, s8, s8); +void func_80061A34(Player*, s16, s32, s32); +void func_80061D4C(Player*, s16, s32, s32); +void func_80061EF4(Player*, s16, s32, s32); + void func_800621BC(Player*, s16, s32, s8); void func_80062484(Player*, UnkPlayerStruct258*, s32); +void func_800624D8(Player*, s32, s32, s32); void func_800628C0(Player*, s8, s8, s8); void func_80062914(Player*, s8, s8, s8); void func_80062968(Player*, s8, s8, s8); @@ -106,6 +121,7 @@ void func_800629BC(Player*, s8, s8, s8); void func_80062A18(Player*, s8, s8, s8); void func_80062AA8(Player*, s8, s8, s8); void func_80062B18(f32*, f32*, f32*, f32, f32, f32, u16, u16); +void func_80062C74(Player*, s16, s32, s32); void func_80062F98(Player*, s16, s8, s8); void func_800630C0(Player*, s16, s8, s8); @@ -116,9 +132,12 @@ void func_800635D4(Player*, s16, s8, s8); void func_800639DC(Player*, s16, s8, s8); void func_80063BD4(Player*, s16, s8, s8); void func_80063D58(Player*, s16, s8, s8); +void func_80063FBC(Player*, s16, s32, s32); void func_80064184(Player*, s16, s8, s8); void func_800643A8(Player*, s16, s8, s8); +void func_800644E8(Player*, s16, s32, s32); +void func_80064664(Player*, s16, s32, s32); void func_800647C8(Player*, s16, s8, s8); void func_800648E4(Player*, s16, s8, s8); void func_80064988(Player*, s16, s8, s8); @@ -132,6 +151,7 @@ void func_80064F88(Player*, s16, s8, s8); void func_80065030(Player*, s16, s8, s8); void func_800650FC(Player*, s16, s8, s8); void func_800651F4(Player*, s16, s8, s8); +void func_800652D4(Vec3f, Vec3s, f32); void func_800658A0(Player*, s8, s16, s8); void func_80066998(Player*, s8, s16, s8); @@ -199,6 +219,7 @@ extern u8 D_801658FF; extern struct Controller *gControllerOne; extern s32 D_8018D214; extern s32 D_8018D2C8[]; +extern uintptr_t D_8018D48C; // Some kind of pointer to some decoded texture(s) extern u16 gPlayerBalloonStatus[8][3]; // D_8018D5F0 extern s16 gPlayerBalloonCount[]; // D_8018D8C0 diff --git a/src/common_textures.h b/src/common_textures.h index d57132d55..61d118a11 100644 --- a/src/common_textures.h +++ b/src/common_textures.h @@ -207,7 +207,8 @@ extern Gfx D_0D008DF8[]; extern Gfx D_0D008E20[]; extern Gfx D_0D008E48[]; extern Gfx D_0D008E70[]; -extern Vtx D_0D008E98[]; +extern Mtx D_0D008E98; +extern Vtx D_0D008EA8[]; extern f32 D_0D009418[]; extern f32 D_0D009568[]; extern f32 D_0D0096B8[]; diff --git a/src/common_textures.inc.c b/src/common_textures.inc.c index ee4ac13dd..97c9245b9 100644 --- a/src/common_textures.inc.c +++ b/src/common_textures.inc.c @@ -1893,92 +1893,123 @@ Gfx D_0D008E70[] = { gsSPEndDisplayList(), }; -static Vtx D_0D008E98[] = { +static Mtx D_0D008E98 = { + {{65536, 0, 1, 0}, + { 0, 65536, 0, 1}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}}, +}; - {{{ 1, 0, 0}, 0, {0, 1}, {0x00, 0x00, 0x00, 0x00}}}, - {{{ 0, 0, 1}, 0, {0, 0}, {0x00, 0x00, 0x00, 0x01}}}, - {{{ 0, 0, 0}, 0, {0, 0}, {0x00, 0x00, 0x00, 0x00}}}, - {{{ 0, 0, 0}, 0, {0, 0}, {0x00, 0x00, 0x00, 0x00}}}, +static Vtx D_0D008EA8[] = { + + // I think these 4 Vtx's are really the rows of a Mtx (D_0D008E98), based on the usage of D_0D008E98 throughout the code base + // {{{ 1, 0, 0}, 0, {0, 1}, {0x00, 0x00, 0x00, 0x00}}}, + // {{{ 0, 0, 1}, 0, {0, 0}, {0x00, 0x00, 0x00, 0x01}}}, + // {{{ 0, 0, 0}, 0, {0, 0}, {0x00, 0x00, 0x00, 0x00}}}, + // {{{ 0, 0, 0}, 0, {0, 0}, {0x00, 0x00, 0x00, 0x00}}}, + + // These 4 Vtx's MAY be a Mtx too, its hard to say though as I can't find any references + // to any of them in the code base {{{ 0, 410, 0}, 0, {0, 0}, {0x00, 0x00, 0x00, 0x00}}}, {{{ 0, 0, 0}, 546, {0, 0}, {0x00, 0x00, 0x00, 0x00}}}, {{{ 0, 0, 0}, 0, {65535, 3}, {0x00, 0x00, 0x00, 0x00}}}, {{{ -1, 3, -1}, 3, {65535, 3}, {0x00, 0x01, 0x00, 0x00}}}, + {{{ 1, 3, 0}, 2, {65535, 65535}, {0x00, 0x00, 0x00, 0x00}}}, {{{ 1, 2, 0}, 6, {11, 30}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 55, 74, 0}, 1, {90, 105}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 139, 155, 0}, 1, {177, 205}, {0x00, 0x00, 0x00, 0x01}}}, + {{{ 225, 242, 0}, 1, {292, 313}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 352, 373, 0}, 1, {452, 465}, {0x00, 0x00, 0x00, 0x01}}}, {{{ -1, -1, 0}, 0, {1, 2}, {0x00, 0x00, 0x00, 0x06}}}, {{{ 10, 25, 0}, 1, {190, 210}, {0x00, 0x00, 0x00, 0x01}}}, + {{{ 270, 290, 0}, 1, {410, 440}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 540, 550, 0}, 1, {65535, 65535}, {0x00, 0x00, 0x00, 0x00}}}, {{{ 1, 2, 0}, 6, {60, 80}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 125, 140, 0}, 1, {170, 185}, {0x00, 0x00, 0x00, 0x01}}}, + {{{ 230, 240, 0}, 1, {275, 285}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 310, 320, 0}, 1, {321, 349}, {0x00, 0x00, 0x00, 0x03}}}, {{{ 350, 360, 0}, 1, {385, 415}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 450, 468, 0}, 1, {470, 477}, {0x00, 0x00, 0x00, 0x09}}}, + {{{ 480, 485, 0}, 11, {543, 546}, {0x00, 0x00, 0x00, 0x09}}}, {{{ 548, 550, 0}, 11, {565, 568}, {0x00, 0x00, 0x00, 0x02}}}, {{{ 630, 631, 0}, 6, {635, 640}, {0x00, 0x00, 0x00, 0x0a}}}, {{{ 645, 655, 0}, 1, {65535, 65535}, {0x00, 0x00, 0x00, 0x00}}}, + {{{ 1, 2, 0}, 6, {15, 30}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 55, 65, 0}, 1, {125, 150}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 265, 270, 0}, 1, {275, 285}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 305, 320, 0}, 2, {330, 340}, {0x00, 0x00, 0x00, 0x01}}}, + {{{ 375, 385, 0}, 1, {547, 570}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 582, 600, 0}, 1, {65535, 65535}, {0x00, 0x00, 0x00, 0x00}}}, {{{ 1, 2, 0}, 6, {70, 94}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 120, 133, 0}, 1, {150, 170}, {0x00, 0x00, 0x00, 0x01}}}, + {{{ 249, 265, 0}, 1, {360, 395}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 635, 655, 0}, 1, {65535, 65535}, {0x00, 0x00, 0x00, 0x00}}}, {{{ 1, 2, 0}, 6, {15, 30}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 41, 63, 0}, 1, {115, 155}, {0x00, 0x00, 0x00, 0x01}}}, + {{{ 200, 215, 0}, 1, {240, 241}, {0x00, 0x00, 0x00, 0x09}}}, {{{ 264, 265, 0}, 10, {270, 290}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 345, 375, 0}, 1, {493, 544}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 583, 605, 0}, 1, {65535, 65535}, {0x00, 0x00, 0x00, 0x00}}}, + {{{ 1, 2, 0}, 6, {75, 100}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 135, 150, 0}, 1, {355, 390}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 505, 525, 0}, 1, {65535, 65535}, {0x00, 0x00, 0x00, 0x00}}}, {{{ 1, 2, 0}, 6, {65, 80}, {0x00, 0x00, 0x00, 0x01}}}, + {{{ 165, 166, 0}, 9, {180, 210}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 220, 221, 0}, 10, {250, 275}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 360, 380, 0}, 1, {440, 480}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 600, 601, 0}, 9, {689, 690}, {0x00, 0x00, 0x00, 0x0a}}}, + {{{ 695, 725, 0}, 1, {65535, 65535}, {0x00, 0x00, 0x00, 0x00}}}, {{{ 1, 2, 0}, 6, {128, 275}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 320, 345, 0}, 1, {465, 565}, {0x00, 0x00, 0x00, 0x01}}}, {{{ -1, -1, 0}, 0, {1, 2}, {0x00, 0x00, 0x00, 0x06}}}, + {{{ 75, 100, 0}, 1, {175, 210}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 275, 300, 0}, 1, {65535, 65535}, {0x00, 0x00, 0x00, 0x00}}}, {{{ 1, 2, 0}, 6, {106, 188}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 220, 386, 0}, 1, {583, 765}, {0x00, 0x00, 0x00, 0x01}}}, + {{{ -1, -1, 0}, 0, {1, 2}, {0x00, 0x00, 0x00, 0x06}}}, {{{ 245, 262, 0}, 1, {585, 606}, {0x00, 0x00, 0x00, 0x01}}}, {{{ -1, -1, 0}, 0, {1, 2}, {0x00, 0x00, 0x00, 0x06}}}, {{{ 7, 38, 0}, 1, {36, 54}, {0x00, 0x00, 0x00, 0x01}}}, + {{{ 129, 150, 0}, 1, {380, 410}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 425, 445, 0}, 1, {456, 500}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 594, 625, 0}, 1, {65535, 65535}, {0x00, 0x00, 0x00, 0x00}}}, {{{ 1, 2, 0}, 6, {4, 5}, {0x00, 0x00, 0x00, 0x09}}}, + {{{ 129, 130, 0}, 10, {555, 560}, {0x00, 0x00, 0x00, 0x09}}}, {{{ 827, 832, 0}, 10, {810, 845}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 910, 993, 0}, 1, {1390, 1600}, {0x00, 0x00, 0x00, 0x01}}}, {{{ -1, -1, 0}, 0, {1, 2}, {0x00, 0x00, 0x00, 0x06}}}, + {{{ 80, 120, 0}, 1, {200, 250}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 252, 253, 0}, 9, {273, 295}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 300, 315, 0}, 1, {333, 384}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 400, 401, 0}, 10, {405, 435}, {0x00, 0x00, 0x00, 0x01}}}, + {{{ 445, 475, 0}, 1, {485, 525}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 585, 615, 0}, 1, {685, 735}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 783, 820, 0}, 1, {956, 984}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 1005, 1050, 0}, 1, {1063, 1088}, {0x00, 0x00, 0x00, 0x01}}}, + {{{ 1130, 1131, 0}, 9, {1169, 1170}, {0x00, 0x00, 0x00, 0x0a}}}, {{{ 1195, 1240, 0}, 1, {1262, 1300}, {0x00, 0x00, 0x00, 0x01}}}, {{{ -1, -1, 0}, 0, {1, 2}, {0x00, 0x00, 0x00, 0x06}}}, {{{ 20, 40, 0}, 1, {190, 191}, {0x00, 0x00, 0x00, 0x09}}}, + {{{ 259, 260, 0}, 10, {315, 335}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 353, 370, 0}, 1, {398, 430}, {0x00, 0x00, 0x00, 0x01}}}, {{{ 458, 485, 0}, 1, {510, 535}, {0x00, 0x00, 0x00, 0x01}}}, diff --git a/src/skybox_and_splitscreen.c b/src/skybox_and_splitscreen.c index 0778f45ea..30291fabb 100644 --- a/src/skybox_and_splitscreen.c +++ b/src/skybox_and_splitscreen.c @@ -7,6 +7,7 @@ #include #include #include "camera.h" +#include "common_textures.h" #include "skybox_and_splitscreen.h" Vp D_802B8880[] = { diff --git a/src/skybox_and_splitscreen.h b/src/skybox_and_splitscreen.h index f5e3cae36..8cd0a20ca 100644 --- a/src/skybox_and_splitscreen.h +++ b/src/skybox_and_splitscreen.h @@ -73,7 +73,6 @@ extern s32 D_801625EC; extern s32 D_801625F0; extern s32 D_801625F4; extern u16 D_800DC5BC; -extern Mtx *D_0D008E98; extern struct GfxPool *gGfxPool; extern f32 D_80150130[]; extern u16 D_800DC5B4;