More miscellaneous matches (#246)

And more mips_to_c refreshes

Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
Tyler McGavran 2022-07-18 23:40:17 -04:00 committed by GitHub
parent bf4ca94711
commit fb010e4186
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 1882 additions and 2755 deletions

View File

@ -1,165 +0,0 @@
glabel func_8001FB0C
/* 02070C 8001FB0C 27BDFF80 */ addiu $sp, $sp, -0x80
/* 020710 8001FB10 3C02800E */ lui $v0, %hi(gActiveScreenMode) # $v0, 0x800e
/* 020714 8001FB14 8C42C52C */ lw $v0, %lo(gActiveScreenMode)($v0)
/* 020718 8001FB18 AFB00018 */ sw $s0, 0x18($sp)
/* 02071C 8001FB1C 00A08025 */ move $s0, $a1
/* 020720 8001FB20 AFBF001C */ sw $ra, 0x1c($sp)
/* 020724 8001FB24 AFA40080 */ sw $a0, 0x80($sp)
/* 020728 8001FB28 AFA60088 */ sw $a2, 0x88($sp)
/* 02072C 8001FB2C AFA7008C */ sw $a3, 0x8c($sp)
/* 020730 8001FB30 1040000A */ beqz $v0, .L8001FB5C
/* 020734 8001FB34 A7A00040 */ sh $zero, 0x40($sp)
/* 020738 8001FB38 24010001 */ li $at, 1
/* 02073C 8001FB3C 10410009 */ beq $v0, $at, .L8001FB64
/* 020740 8001FB40 24010002 */ li $at, 2
/* 020744 8001FB44 10410007 */ beq $v0, $at, .L8001FB64
/* 020748 8001FB48 24010003 */ li $at, 3
/* 02074C 8001FB4C 10410007 */ beq $v0, $at, .L8001FB6C
/* 020750 8001FB50 00000000 */ nop
/* 020754 8001FB54 10000007 */ b .L8001FB74
/* 020758 8001FB58 24021FFE */ li $v0, 8190
.L8001FB5C:
/* 02075C 8001FB5C 10000005 */ b .L8001FB74
/* 020760 8001FB60 2402293C */ li $v0, 10556
.L8001FB64:
/* 020764 8001FB64 10000003 */ b .L8001FB74
/* 020768 8001FB68 24023058 */ li $v0, 12376
.L8001FB6C:
/* 02076C 8001FB6C 10000001 */ b .L8001FB74
/* 020770 8001FB70 24021FFE */ li $v0, 8190
.L8001FB74:
/* 020774 8001FB74 860E0026 */ lh $t6, 0x26($s0)
/* 020778 8001FB78 A7A20042 */ sh $v0, 0x42($sp)
/* 02077C 8001FB7C 01C22023 */ subu $a0, $t6, $v0
/* 020780 8001FB80 308FFFFF */ andi $t7, $a0, 0xffff
/* 020784 8001FB84 0C0AE00E */ jal coss
/* 020788 8001FB88 01E02025 */ move $a0, $t7
/* 02078C 8001FB8C C7A60088 */ lwc1 $f6, 0x88($sp)
/* 020790 8001FB90 C6040008 */ lwc1 $f4, 8($s0)
/* 020794 8001FB94 87A20042 */ lh $v0, 0x42($sp)
/* 020798 8001FB98 46003202 */ mul.s $f8, $f6, $f0
/* 02079C 8001FB9C 46082280 */ add.s $f10, $f4, $f8
/* 0207A0 8001FBA0 E7AA004C */ swc1 $f10, 0x4c($sp)
/* 0207A4 8001FBA4 86180026 */ lh $t8, 0x26($s0)
/* 0207A8 8001FBA8 03022023 */ subu $a0, $t8, $v0
/* 0207AC 8001FBAC 3099FFFF */ andi $t9, $a0, 0xffff
/* 0207B0 8001FBB0 0C0AE006 */ jal sins
/* 0207B4 8001FBB4 03202025 */ move $a0, $t9
/* 0207B8 8001FBB8 C7A40088 */ lwc1 $f4, 0x88($sp)
/* 0207BC 8001FBBC C6060000 */ lwc1 $f6, ($s0)
/* 0207C0 8001FBC0 87A20042 */ lh $v0, 0x42($sp)
/* 0207C4 8001FBC4 46002202 */ mul.s $f8, $f4, $f0
/* 0207C8 8001FBC8 46083280 */ add.s $f10, $f6, $f8
/* 0207CC 8001FBCC E7AA0058 */ swc1 $f10, 0x58($sp)
/* 0207D0 8001FBD0 86080026 */ lh $t0, 0x26($s0)
/* 0207D4 8001FBD4 01022021 */ addu $a0, $t0, $v0
/* 0207D8 8001FBD8 3089FFFF */ andi $t1, $a0, 0xffff
/* 0207DC 8001FBDC 0C0AE00E */ jal coss
/* 0207E0 8001FBE0 01202025 */ move $a0, $t1
/* 0207E4 8001FBE4 C7A60088 */ lwc1 $f6, 0x88($sp)
/* 0207E8 8001FBE8 C6040008 */ lwc1 $f4, 8($s0)
/* 0207EC 8001FBEC 87A20042 */ lh $v0, 0x42($sp)
/* 0207F0 8001FBF0 46003202 */ mul.s $f8, $f6, $f0
/* 0207F4 8001FBF4 46082280 */ add.s $f10, $f4, $f8
/* 0207F8 8001FBF8 E7AA0048 */ swc1 $f10, 0x48($sp)
/* 0207FC 8001FBFC 860A0026 */ lh $t2, 0x26($s0)
/* 020800 8001FC00 01422021 */ addu $a0, $t2, $v0
/* 020804 8001FC04 308BFFFF */ andi $t3, $a0, 0xffff
/* 020808 8001FC08 0C0AE006 */ jal sins
/* 02080C 8001FC0C 01602025 */ move $a0, $t3
/* 020810 8001FC10 C7A40088 */ lwc1 $f4, 0x88($sp)
/* 020814 8001FC14 C6060000 */ lwc1 $f6, ($s0)
/* 020818 8001FC18 46002202 */ mul.s $f8, $f4, $f0
/* 02081C 8001FC1C 46083280 */ add.s $f10, $f6, $f8
/* 020820 8001FC20 E7AA0054 */ swc1 $f10, 0x54($sp)
/* 020824 8001FC24 86040026 */ lh $a0, 0x26($s0)
/* 020828 8001FC28 24845FFA */ addiu $a0, $a0, 0x5ffa
/* 02082C 8001FC2C 308CFFFF */ andi $t4, $a0, 0xffff
/* 020830 8001FC30 0C0AE00E */ jal coss
/* 020834 8001FC34 01802025 */ move $a0, $t4
/* 020838 8001FC38 C7A6008C */ lwc1 $f6, 0x8c($sp)
/* 02083C 8001FC3C C6040008 */ lwc1 $f4, 8($s0)
/* 020840 8001FC40 46003202 */ mul.s $f8, $f6, $f0
/* 020844 8001FC44 46082280 */ add.s $f10, $f4, $f8
/* 020848 8001FC48 E7AA0044 */ swc1 $f10, 0x44($sp)
/* 02084C 8001FC4C 86040026 */ lh $a0, 0x26($s0)
/* 020850 8001FC50 24845FFA */ addiu $a0, $a0, 0x5ffa
/* 020854 8001FC54 308DFFFF */ andi $t5, $a0, 0xffff
/* 020858 8001FC58 0C0AE006 */ jal sins
/* 02085C 8001FC5C 01A02025 */ move $a0, $t5
/* 020860 8001FC60 C7A4008C */ lwc1 $f4, 0x8c($sp)
/* 020864 8001FC64 C6060000 */ lwc1 $f6, ($s0)
/* 020868 8001FC68 8FA20080 */ lw $v0, 0x80($sp)
/* 02086C 8001FC6C 46002202 */ mul.s $f8, $f4, $f0
/* 020870 8001FC70 C7A4004C */ lwc1 $f4, 0x4c($sp)
/* 020874 8001FC74 44800000 */ mtc1 $zero, $f0
/* 020878 8001FC78 46083280 */ add.s $f10, $f6, $f8
/* 02087C 8001FC7C C7A60054 */ lwc1 $f6, 0x54($sp)
/* 020880 8001FC80 C7A80058 */ lwc1 $f8, 0x58($sp)
/* 020884 8001FC84 E7AA0050 */ swc1 $f10, 0x50($sp)
/* 020888 8001FC88 C44C0014 */ lwc1 $f12, 0x14($v0)
/* 02088C 8001FC8C C442001C */ lwc1 $f2, 0x1c($v0)
/* 020890 8001FC90 C7AA0048 */ lwc1 $f10, 0x48($sp)
/* 020894 8001FC94 460C3401 */ sub.s $f16, $f6, $f12
/* 020898 8001FC98 46022381 */ sub.s $f14, $f4, $f2
/* 02089C 8001FC9C 460C4481 */ sub.s $f18, $f8, $f12
/* 0208A0 8001FCA0 46107182 */ mul.s $f6, $f14, $f16
/* 0208A4 8001FCA4 46025101 */ sub.s $f4, $f10, $f2
/* 0208A8 8001FCA8 46049202 */ mul.s $f8, $f18, $f4
/* 0208AC 8001FCAC E7A40020 */ swc1 $f4, 0x20($sp)
/* 0208B0 8001FCB0 46083281 */ sub.s $f10, $f6, $f8
/* 0208B4 8001FCB4 C7A60050 */ lwc1 $f6, 0x50($sp)
/* 0208B8 8001FCB8 460C3201 */ sub.s $f8, $f6, $f12
/* 0208BC 8001FCBC C7A60044 */ lwc1 $f6, 0x44($sp)
/* 0208C0 8001FCC0 E7AA0064 */ swc1 $f10, 0x64($sp)
/* 0208C4 8001FCC4 460A003E */ c.le.s $f0, $f10
/* 0208C8 8001FCC8 E7A8002C */ swc1 $f8, 0x2c($sp)
/* 0208CC 8001FCCC 46023181 */ sub.s $f6, $f6, $f2
/* 0208D0 8001FCD0 E7A60034 */ swc1 $f6, 0x34($sp)
/* 0208D4 8001FCD4 46082182 */ mul.s $f6, $f4, $f8
/* 0208D8 8001FCD8 C7A40034 */ lwc1 $f4, 0x34($sp)
/* 0208DC 8001FCDC 46048102 */ mul.s $f4, $f16, $f4
/* 0208E0 8001FCE0 46043181 */ sub.s $f6, $f6, $f4
/* 0208E4 8001FCE4 C7A40034 */ lwc1 $f4, 0x34($sp)
/* 0208E8 8001FCE8 E7A60060 */ swc1 $f6, 0x60($sp)
/* 0208EC 8001FCEC 46122182 */ mul.s $f6, $f4, $f18
/* 0208F0 8001FCF0 00000000 */ nop
/* 0208F4 8001FCF4 460E4102 */ mul.s $f4, $f8, $f14
/* 0208F8 8001FCF8 46043201 */ sub.s $f8, $f6, $f4
/* 0208FC 8001FCFC C7A60060 */ lwc1 $f6, 0x60($sp)
/* 020900 8001FD00 45000009 */ bc1f .L8001FD28
/* 020904 8001FD04 E7A8005C */ swc1 $f8, 0x5c($sp)
/* 020908 8001FD08 4606003E */ c.le.s $f0, $f6
/* 02090C 8001FD0C C7A4005C */ lwc1 $f4, 0x5c($sp)
/* 020910 8001FD10 45020006 */ bc1fl .L8001FD2C
/* 020914 8001FD14 C7A80064 */ lwc1 $f8, 0x64($sp)
/* 020918 8001FD18 4604003E */ c.le.s $f0, $f4
/* 02091C 8001FD1C 00000000 */ nop
/* 020920 8001FD20 4503000F */ bc1tl .L8001FD60
/* 020924 8001FD24 240E0001 */ li $t6, 1
.L8001FD28:
/* 020928 8001FD28 C7A80064 */ lwc1 $f8, 0x64($sp)
.L8001FD2C:
/* 02092C 8001FD2C C7AA0060 */ lwc1 $f10, 0x60($sp)
/* 020930 8001FD30 4600403E */ c.le.s $f8, $f0
/* 020934 8001FD34 00000000 */ nop
/* 020938 8001FD38 4502000B */ bc1fl .L8001FD68
/* 02093C 8001FD3C 8FBF001C */ lw $ra, 0x1c($sp)
/* 020940 8001FD40 4600503E */ c.le.s $f10, $f0
/* 020944 8001FD44 C7A6005C */ lwc1 $f6, 0x5c($sp)
/* 020948 8001FD48 45020007 */ bc1fl .L8001FD68
/* 02094C 8001FD4C 8FBF001C */ lw $ra, 0x1c($sp)
/* 020950 8001FD50 4600303E */ c.le.s $f6, $f0
/* 020954 8001FD54 00000000 */ nop
/* 020958 8001FD58 45000002 */ bc1f .L8001FD64
/* 02095C 8001FD5C 240E0001 */ li $t6, 1
.L8001FD60:
/* 020960 8001FD60 A7AE0040 */ sh $t6, 0x40($sp)
.L8001FD64:
/* 020964 8001FD64 8FBF001C */ lw $ra, 0x1c($sp)
.L8001FD68:
/* 020968 8001FD68 97A20040 */ lhu $v0, 0x40($sp)
/* 02096C 8001FD6C 8FB00018 */ lw $s0, 0x18($sp)
/* 020970 8001FD70 03E00008 */ jr $ra
/* 020974 8001FD74 27BD0080 */ addiu $sp, $sp, 0x80

View File

@ -1,168 +0,0 @@
glabel func_8001FD78
/* 020978 8001FD78 27BDFF98 */ addiu $sp, $sp, -0x68
/* 02097C 8001FD7C AFBF001C */ sw $ra, 0x1c($sp)
/* 020980 8001FD80 AFB00018 */ sw $s0, 0x18($sp)
/* 020984 8001FD84 AFA5006C */ sw $a1, 0x6c($sp)
/* 020988 8001FD88 AFA60070 */ sw $a2, 0x70($sp)
/* 02098C 8001FD8C AFA70074 */ sw $a3, 0x74($sp)
/* 020990 8001FD90 A7A00042 */ sh $zero, 0x42($sp)
/* 020994 8001FD94 848E002E */ lh $t6, 0x2e($a0)
/* 020998 8001FD98 848D00C0 */ lh $t5, 0xc0($a0)
/* 02099C 8001FD9C 00808025 */ move $s0, $a0
/* 0209A0 8001FDA0 01AE2023 */ subu $a0, $t5, $t6
/* 0209A4 8001FDA4 2484F8E4 */ addiu $a0, $a0, -0x71c
/* 0209A8 8001FDA8 308FFFFF */ andi $t7, $a0, 0xffff
/* 0209AC 8001FDAC 0C0AE00E */ jal coss
/* 0209B0 8001FDB0 01E02025 */ move $a0, $t7
/* 0209B4 8001FDB4 3C01428C */ li $at, 0x428C0000 # 70.000000
/* 0209B8 8001FDB8 44815000 */ mtc1 $at, $f10
/* 0209BC 8001FDBC C604001C */ lwc1 $f4, 0x1c($s0)
/* 0209C0 8001FDC0 46005182 */ mul.s $f6, $f10, $f0
/* 0209C4 8001FDC4 46062200 */ add.s $f8, $f4, $f6
/* 0209C8 8001FDC8 E7A80058 */ swc1 $f8, 0x58($sp)
/* 0209CC 8001FDCC 8619002E */ lh $t9, 0x2e($s0)
/* 0209D0 8001FDD0 861800C0 */ lh $t8, 0xc0($s0)
/* 0209D4 8001FDD4 03192023 */ subu $a0, $t8, $t9
/* 0209D8 8001FDD8 2484F8E4 */ addiu $a0, $a0, -0x71c
/* 0209DC 8001FDDC 3088FFFF */ andi $t0, $a0, 0xffff
/* 0209E0 8001FDE0 0C0AE006 */ jal sins
/* 0209E4 8001FDE4 01002025 */ move $a0, $t0
/* 0209E8 8001FDE8 3C01428C */ li $at, 0x428C0000 # 70.000000
/* 0209EC 8001FDEC 44812000 */ mtc1 $at, $f4
/* 0209F0 8001FDF0 C60A0014 */ lwc1 $f10, 0x14($s0)
/* 0209F4 8001FDF4 46002182 */ mul.s $f6, $f4, $f0
/* 0209F8 8001FDF8 46065200 */ add.s $f8, $f10, $f6
/* 0209FC 8001FDFC E7A80064 */ swc1 $f8, 0x64($sp)
/* 020A00 8001FE00 860A002E */ lh $t2, 0x2e($s0)
/* 020A04 8001FE04 860900C0 */ lh $t1, 0xc0($s0)
/* 020A08 8001FE08 012A2023 */ subu $a0, $t1, $t2
/* 020A0C 8001FE0C 2484071C */ addiu $a0, $a0, 0x71c
/* 020A10 8001FE10 308BFFFF */ andi $t3, $a0, 0xffff
/* 020A14 8001FE14 0C0AE00E */ jal coss
/* 020A18 8001FE18 01602025 */ move $a0, $t3
/* 020A1C 8001FE1C 3C01428C */ li $at, 0x428C0000 # 70.000000
/* 020A20 8001FE20 44815000 */ mtc1 $at, $f10
/* 020A24 8001FE24 C604001C */ lwc1 $f4, 0x1c($s0)
/* 020A28 8001FE28 46005182 */ mul.s $f6, $f10, $f0
/* 020A2C 8001FE2C 46062200 */ add.s $f8, $f4, $f6
/* 020A30 8001FE30 E7A80054 */ swc1 $f8, 0x54($sp)
/* 020A34 8001FE34 860D002E */ lh $t5, 0x2e($s0)
/* 020A38 8001FE38 860C00C0 */ lh $t4, 0xc0($s0)
/* 020A3C 8001FE3C 018D2023 */ subu $a0, $t4, $t5
/* 020A40 8001FE40 2484071C */ addiu $a0, $a0, 0x71c
/* 020A44 8001FE44 308EFFFF */ andi $t6, $a0, 0xffff
/* 020A48 8001FE48 0C0AE006 */ jal sins
/* 020A4C 8001FE4C 01C02025 */ move $a0, $t6
/* 020A50 8001FE50 3C01428C */ li $at, 0x428C0000 # 70.000000
/* 020A54 8001FE54 44812000 */ mtc1 $at, $f4
/* 020A58 8001FE58 C60A0014 */ lwc1 $f10, 0x14($s0)
/* 020A5C 8001FE5C 46002182 */ mul.s $f6, $f4, $f0
/* 020A60 8001FE60 46065200 */ add.s $f8, $f10, $f6
/* 020A64 8001FE64 E7A80060 */ swc1 $f8, 0x60($sp)
/* 020A68 8001FE68 8618002E */ lh $t8, 0x2e($s0)
/* 020A6C 8001FE6C 860F00C0 */ lh $t7, 0xc0($s0)
/* 020A70 8001FE70 01F82023 */ subu $a0, $t7, $t8
/* 020A74 8001FE74 24841C70 */ addiu $a0, $a0, 0x1c70
/* 020A78 8001FE78 3099FFFF */ andi $t9, $a0, 0xffff
/* 020A7C 8001FE7C 0C0AE00E */ jal coss
/* 020A80 8001FE80 03202025 */ move $a0, $t9
/* 020A84 8001FE84 3C014120 */ li $at, 0x41200000 # 10.000000
/* 020A88 8001FE88 44815000 */ mtc1 $at, $f10
/* 020A8C 8001FE8C C604001C */ lwc1 $f4, 0x1c($s0)
/* 020A90 8001FE90 46005182 */ mul.s $f6, $f10, $f0
/* 020A94 8001FE94 46062200 */ add.s $f8, $f4, $f6
/* 020A98 8001FE98 E7A80050 */ swc1 $f8, 0x50($sp)
/* 020A9C 8001FE9C 8609002E */ lh $t1, 0x2e($s0)
/* 020AA0 8001FEA0 860800C0 */ lh $t0, 0xc0($s0)
/* 020AA4 8001FEA4 01092023 */ subu $a0, $t0, $t1
/* 020AA8 8001FEA8 24841C70 */ addiu $a0, $a0, 0x1c70
/* 020AAC 8001FEAC 308AFFFF */ andi $t2, $a0, 0xffff
/* 020AB0 8001FEB0 0C0AE006 */ jal sins
/* 020AB4 8001FEB4 01402025 */ move $a0, $t2
/* 020AB8 8001FEB8 3C014120 */ li $at, 0x41200000 # 10.000000
/* 020ABC 8001FEBC 44812000 */ mtc1 $at, $f4
/* 020AC0 8001FEC0 C60A0014 */ lwc1 $f10, 0x14($s0)
/* 020AC4 8001FEC4 44806000 */ mtc1 $zero, $f12
/* 020AC8 8001FEC8 46002182 */ mul.s $f6, $f4, $f0
/* 020ACC 8001FECC C7A40058 */ lwc1 $f4, 0x58($sp)
/* 020AD0 8001FED0 46065200 */ add.s $f8, $f10, $f6
/* 020AD4 8001FED4 C7AA0074 */ lwc1 $f10, 0x74($sp)
/* 020AD8 8001FED8 C7A60060 */ lwc1 $f6, 0x60($sp)
/* 020ADC 8001FEDC E7A8005C */ swc1 $f8, 0x5c($sp)
/* 020AE0 8001FEE0 460A2401 */ sub.s $f16, $f4, $f10
/* 020AE4 8001FEE4 C7A8006C */ lwc1 $f8, 0x6c($sp)
/* 020AE8 8001FEE8 C7A40054 */ lwc1 $f4, 0x54($sp)
/* 020AEC 8001FEEC E7AA0020 */ swc1 $f10, 0x20($sp)
/* 020AF0 8001FEF0 46083481 */ sub.s $f18, $f6, $f8
/* 020AF4 8001FEF4 E7A80024 */ swc1 $f8, 0x24($sp)
/* 020AF8 8001FEF8 460A2181 */ sub.s $f6, $f4, $f10
/* 020AFC 8001FEFC C7A40064 */ lwc1 $f4, 0x64($sp)
/* 020B00 8001FF00 46082101 */ sub.s $f4, $f4, $f8
/* 020B04 8001FF04 E7A60030 */ swc1 $f6, 0x30($sp)
/* 020B08 8001FF08 46043282 */ mul.s $f10, $f6, $f4
/* 020B0C 8001FF0C E7A4002C */ swc1 $f4, 0x2c($sp)
/* 020B10 8001FF10 46128202 */ mul.s $f8, $f16, $f18
/* 020B14 8001FF14 460A4381 */ sub.s $f14, $f8, $f10
/* 020B18 8001FF18 C7AA0024 */ lwc1 $f10, 0x24($sp)
/* 020B1C 8001FF1C C7A8005C */ lwc1 $f8, 0x5c($sp)
/* 020B20 8001FF20 460E603E */ c.le.s $f12, $f14
/* 020B24 8001FF24 00000000 */ nop
/* 020B28 8001FF28 45020016 */ bc1fl .L8001FF84
/* 020B2C 8001FF2C 460C703E */ c.le.s $f14, $f12
/* 020B30 8001FF30 460A4001 */ sub.s $f0, $f8, $f10
/* 020B34 8001FF34 C7AA0020 */ lwc1 $f10, 0x20($sp)
/* 020B38 8001FF38 C7A80050 */ lwc1 $f8, 0x50($sp)
/* 020B3C 8001FF3C 460A4081 */ sub.s $f2, $f8, $f10
/* 020B40 8001FF40 46003202 */ mul.s $f8, $f6, $f0
/* 020B44 8001FF44 00000000 */ nop
/* 020B48 8001FF48 46121282 */ mul.s $f10, $f2, $f18
/* 020B4C 8001FF4C 460A4181 */ sub.s $f6, $f8, $f10
/* 020B50 8001FF50 4606603E */ c.le.s $f12, $f6
/* 020B54 8001FF54 00000000 */ nop
/* 020B58 8001FF58 45000009 */ bc1f .L8001FF80
/* 020B5C 8001FF5C 00000000 */ nop
/* 020B60 8001FF60 46041202 */ mul.s $f8, $f2, $f4
/* 020B64 8001FF64 00000000 */ nop
/* 020B68 8001FF68 46008282 */ mul.s $f10, $f16, $f0
/* 020B6C 8001FF6C 460A4181 */ sub.s $f6, $f8, $f10
/* 020B70 8001FF70 4606603E */ c.le.s $f12, $f6
/* 020B74 8001FF74 00000000 */ nop
/* 020B78 8001FF78 4501001A */ bc1t .L8001FFE4
/* 020B7C 8001FF7C 00000000 */ nop
.L8001FF80:
/* 020B80 8001FF80 460C703E */ c.le.s $f14, $f12
.L8001FF84:
/* 020B84 8001FF84 C7A4005C */ lwc1 $f4, 0x5c($sp)
/* 020B88 8001FF88 C7A8006C */ lwc1 $f8, 0x6c($sp)
/* 020B8C 8001FF8C C7AA0050 */ lwc1 $f10, 0x50($sp)
/* 020B90 8001FF90 45000016 */ bc1f .L8001FFEC
/* 020B94 8001FF94 C7A60074 */ lwc1 $f6, 0x74($sp)
/* 020B98 8001FF98 46082001 */ sub.s $f0, $f4, $f8
/* 020B9C 8001FF9C C7A40030 */ lwc1 $f4, 0x30($sp)
/* 020BA0 8001FFA0 46065081 */ sub.s $f2, $f10, $f6
/* 020BA4 8001FFA4 46002202 */ mul.s $f8, $f4, $f0
/* 020BA8 8001FFA8 C7A4002C */ lwc1 $f4, 0x2c($sp)
/* 020BAC 8001FFAC 46121282 */ mul.s $f10, $f2, $f18
/* 020BB0 8001FFB0 460A4181 */ sub.s $f6, $f8, $f10
/* 020BB4 8001FFB4 460C303E */ c.le.s $f6, $f12
/* 020BB8 8001FFB8 00000000 */ nop
/* 020BBC 8001FFBC 4502000C */ bc1fl .L8001FFF0
/* 020BC0 8001FFC0 8FBF001C */ lw $ra, 0x1c($sp)
/* 020BC4 8001FFC4 46041202 */ mul.s $f8, $f2, $f4
/* 020BC8 8001FFC8 00000000 */ nop
/* 020BCC 8001FFCC 46008282 */ mul.s $f10, $f16, $f0
/* 020BD0 8001FFD0 460A4181 */ sub.s $f6, $f8, $f10
/* 020BD4 8001FFD4 460C303E */ c.le.s $f6, $f12
/* 020BD8 8001FFD8 00000000 */ nop
/* 020BDC 8001FFDC 45000003 */ bc1f .L8001FFEC
/* 020BE0 8001FFE0 00000000 */ nop
.L8001FFE4:
/* 020BE4 8001FFE4 240B0001 */ li $t3, 1
/* 020BE8 8001FFE8 A7AB0042 */ sh $t3, 0x42($sp)
.L8001FFEC:
/* 020BEC 8001FFEC 8FBF001C */ lw $ra, 0x1c($sp)
.L8001FFF0:
/* 020BF0 8001FFF0 97A20042 */ lhu $v0, 0x42($sp)
/* 020BF4 8001FFF4 8FB00018 */ lw $s0, 0x18($sp)
/* 020BF8 8001FFF8 03E00008 */ jr $ra
/* 020BFC 8001FFFC 27BD0068 */ addiu $sp, $sp, 0x68

View File

@ -1,218 +0,0 @@
glabel func_8002276C
/* 02336C 8002276C 3C02800E */ lui $v0, %hi(gActiveScreenMode) # $v0, 0x800e
/* 023370 80022770 8C42C52C */ lw $v0, %lo(gActiveScreenMode)($v0)
/* 023374 80022774 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 023378 80022778 AFBF0014 */ sw $ra, 0x14($sp)
/* 02337C 8002277C 1040000B */ beqz $v0, .L800227AC
/* 023380 80022780 24030001 */ li $v1, 1
/* 023384 80022784 1043006A */ beq $v0, $v1, .L80022930
/* 023388 80022788 24040002 */ li $a0, 2
/* 02338C 8002278C 24040002 */ li $a0, 2
/* 023390 80022790 10440067 */ beq $v0, $a0, .L80022930
/* 023394 80022794 00000000 */ nop
/* 023398 80022798 24030003 */ li $v1, 3
/* 02339C 8002279C 104300A1 */ beq $v0, $v1, .L80022A24
/* 0233A0 800227A0 00000000 */ nop
/* 0233A4 800227A4 100000B9 */ b .L80022A8C
/* 0233A8 800227A8 8FBF0014 */ lw $ra, 0x14($sp)
.L800227AC:
/* 0233AC 800227AC 3C02800E */ lui $v0, %hi(gModeSelection) # $v0, 0x800e
/* 0233B0 800227B0 8C42C53C */ lw $v0, %lo(gModeSelection)($v0)
/* 0233B4 800227B4 24030001 */ li $v1, 1
/* 0233B8 800227B8 3C04800E */ lui $a0, %hi(gPlayerOne) # 0x800e
/* 0233BC 800227BC 1040000A */ beqz $v0, .L800227E8
/* 0233C0 800227C0 00002825 */ move $a1, $zero
/* 0233C4 800227C4 10430028 */ beq $v0, $v1, .L80022868
/* 0233C8 800227C8 3C04800E */ lui $a0, %hi(gPlayerOne) # $a0, 0x800e
/* 0233CC 800227CC 24040002 */ li $a0, 2
/* 0233D0 800227D0 1044003C */ beq $v0, $a0, .L800228C4
/* 0233D4 800227D4 24030003 */ li $v1, 3
/* 0233D8 800227D8 1043003A */ beq $v0, $v1, .L800228C4
/* 0233DC 800227DC 00000000 */ nop
/* 0233E0 800227E0 100000AA */ b .L80022A8C
/* 0233E4 800227E4 8FBF0014 */ lw $ra, 0x14($sp)
.L800227E8:
/* 0233E8 800227E8 0C008AA6 */ jal func_80022A98
/* 0233EC 800227EC 8C84C4DC */ lw $a0, %lo(gPlayerOne)($a0)
/* 0233F0 800227F0 3C04800E */ lui $a0, %hi(gPlayerTwo) # $a0, 0x800e
/* 0233F4 800227F4 8C84C4E0 */ lw $a0, %lo(gPlayerTwo)($a0)
/* 0233F8 800227F8 0C008AA6 */ jal func_80022A98
/* 0233FC 800227FC 24050001 */ li $a1, 1
/* 023400 80022800 3C04800E */ lui $a0, %hi(gPlayerThree) # $a0, 0x800e
/* 023404 80022804 8C84C4E4 */ lw $a0, %lo(gPlayerThree)($a0)
/* 023408 80022808 0C008AA6 */ jal func_80022A98
/* 02340C 8002280C 24050002 */ li $a1, 2
/* 023410 80022810 3C04800E */ lui $a0, %hi(gPlayerFour) # $a0, 0x800e
/* 023414 80022814 8C84C4E8 */ lw $a0, %lo(gPlayerFour)($a0)
/* 023418 80022818 0C008AA6 */ jal func_80022A98
/* 02341C 8002281C 24050003 */ li $a1, 3
/* 023420 80022820 3C04800E */ lui $a0, %hi(gPlayerFive) # $a0, 0x800e
/* 023424 80022824 8C84C4EC */ lw $a0, %lo(gPlayerFive)($a0)
/* 023428 80022828 0C008AA6 */ jal func_80022A98
/* 02342C 8002282C 24050004 */ li $a1, 4
/* 023430 80022830 3C04800E */ lui $a0, %hi(gPlayerSix) # $a0, 0x800e
/* 023434 80022834 8C84C4F0 */ lw $a0, %lo(gPlayerSix)($a0)
/* 023438 80022838 0C008AA6 */ jal func_80022A98
/* 02343C 8002283C 24050005 */ li $a1, 5
/* 023440 80022840 3C04800E */ lui $a0, %hi(gPlayerSeven) # $a0, 0x800e
/* 023444 80022844 8C84C4F4 */ lw $a0, %lo(gPlayerSeven)($a0)
/* 023448 80022848 0C008AA6 */ jal func_80022A98
/* 02344C 8002284C 24050006 */ li $a1, 6
/* 023450 80022850 3C04800E */ lui $a0, %hi(gPlayerEight) # $a0, 0x800e
/* 023454 80022854 8C84C4F8 */ lw $a0, %lo(gPlayerEight)($a0)
/* 023458 80022858 0C008AA6 */ jal func_80022A98
/* 02345C 8002285C 24050007 */ li $a1, 7
/* 023460 80022860 1000008A */ b .L80022A8C
/* 023464 80022864 8FBF0014 */ lw $ra, 0x14($sp)
.L80022868:
/* 023468 80022868 8C84C4DC */ lw $a0, %lo(gPlayerOne)($a0) # -0x3b24($a0)
/* 02346C 8002286C 0C008AA6 */ jal func_80022A98
/* 023470 80022870 00002825 */ move $a1, $zero
/* 023474 80022874 3C04800E */ lui $a0, %hi(gPlayerTwo) # $a0, 0x800e
/* 023478 80022878 8C84C4E0 */ lw $a0, %lo(gPlayerTwo)($a0)
/* 02347C 8002287C 24010100 */ li $at, 256
/* 023480 80022880 948E0000 */ lhu $t6, ($a0)
/* 023484 80022884 31CF0100 */ andi $t7, $t6, 0x100
/* 023488 80022888 15E10003 */ bne $t7, $at, .L80022898
/* 02348C 8002288C 00000000 */ nop
/* 023490 80022890 0C008AA6 */ jal func_80022A98
/* 023494 80022894 24050001 */ li $a1, 1
.L80022898:
/* 023498 80022898 3C04800E */ lui $a0, %hi(gPlayerThree) # $a0, 0x800e
/* 02349C 8002289C 8C84C4E4 */ lw $a0, %lo(gPlayerThree)($a0)
/* 0234A0 800228A0 24010100 */ li $at, 256
/* 0234A4 800228A4 94980000 */ lhu $t8, ($a0)
/* 0234A8 800228A8 33190100 */ andi $t9, $t8, 0x100
/* 0234AC 800228AC 57210077 */ bnel $t9, $at, .L80022A8C
/* 0234B0 800228B0 8FBF0014 */ lw $ra, 0x14($sp)
/* 0234B4 800228B4 0C008AA6 */ jal func_80022A98
/* 0234B8 800228B8 24050002 */ li $a1, 2
/* 0234BC 800228BC 10000073 */ b .L80022A8C
/* 0234C0 800228C0 8FBF0014 */ lw $ra, 0x14($sp)
.L800228C4:
/* 0234C4 800228C4 3C04800E */ lui $a0, %hi(gPlayerOne) # $a0, 0x800e
/* 0234C8 800228C8 8C84C4DC */ lw $a0, %lo(gPlayerOne)($a0)
/* 0234CC 800228CC 0C008AA6 */ jal func_80022A98
/* 0234D0 800228D0 00002825 */ move $a1, $zero
/* 0234D4 800228D4 3C04800E */ lui $a0, %hi(gPlayerTwo) # $a0, 0x800e
/* 0234D8 800228D8 8C84C4E0 */ lw $a0, %lo(gPlayerTwo)($a0)
/* 0234DC 800228DC 0C008AA6 */ jal func_80022A98
/* 0234E0 800228E0 24050001 */ li $a1, 1
/* 0234E4 800228E4 3C02800E */ lui $v0, %hi(gPlayerCountSelection1) # $v0, 0x800e
/* 0234E8 800228E8 8C42C538 */ lw $v0, %lo(gPlayerCountSelection1)($v0)
/* 0234EC 800228EC 3C04800E */ lui $a0, %hi(gPlayerThree) # $a0, 0x800e
/* 0234F0 800228F0 24050002 */ li $a1, 2
/* 0234F4 800228F4 28410003 */ slti $at, $v0, 3
/* 0234F8 800228F8 54200006 */ bnel $at, $zero, .L80022914
/* 0234FC 800228FC 24010004 */ li $at, 4
/* 023500 80022900 0C008AA6 */ jal func_80022A98
/* 023504 80022904 8C84C4E4 */ lw $a0, %lo(gPlayerThree)($a0)
/* 023508 80022908 3C02800E */ lui $v0, %hi(gPlayerCountSelection1) # $v0, 0x800e
/* 02350C 8002290C 8C42C538 */ lw $v0, %lo(gPlayerCountSelection1)($v0)
/* 023510 80022910 24010004 */ li $at, 4
.L80022914:
/* 023514 80022914 1441005C */ bne $v0, $at, .L80022A88
/* 023518 80022918 3C04800E */ lui $a0, %hi(gPlayerFour) # $a0, 0x800e
/* 02351C 8002291C 8C84C4E8 */ lw $a0, %lo(gPlayerFour)($a0)
/* 023520 80022920 0C008AA6 */ jal func_80022A98
/* 023524 80022924 24050003 */ li $a1, 3
/* 023528 80022928 10000058 */ b .L80022A8C
/* 02352C 8002292C 8FBF0014 */ lw $ra, 0x14($sp)
.L80022930:
/* 023530 80022930 3C02800E */ lui $v0, %hi(gModeSelection) # $v0, 0x800e
/* 023534 80022934 8C42C53C */ lw $v0, %lo(gModeSelection)($v0)
/* 023538 80022938 00002825 */ move $a1, $zero
/* 02353C 8002293C 10400009 */ beqz $v0, .L80022964
/* 023540 80022940 00000000 */ nop
/* 023544 80022944 10430032 */ beq $v0, $v1, .L80022A10
/* 023548 80022948 00002825 */ move $a1, $zero
/* 02354C 8002294C 10440026 */ beq $v0, $a0, .L800229E8
/* 023550 80022950 24030003 */ li $v1, 3
/* 023554 80022954 10430024 */ beq $v0, $v1, .L800229E8
/* 023558 80022958 00000000 */ nop
/* 02355C 8002295C 1000004B */ b .L80022A8C
/* 023560 80022960 8FBF0014 */ lw $ra, 0x14($sp)
.L80022964:
/* 023564 80022964 3C04800E */ lui $a0, %hi(gPlayerOne) # $a0, 0x800e
/* 023568 80022968 0C008AA6 */ jal func_80022A98
/* 02356C 8002296C 8C84C4DC */ lw $a0, %lo(gPlayerOne)($a0)
/* 023570 80022970 3C04800E */ lui $a0, %hi(gPlayerTwo) # $a0, 0x800e
/* 023574 80022974 8C84C4E0 */ lw $a0, %lo(gPlayerTwo)($a0)
/* 023578 80022978 0C008AA6 */ jal func_80022A98
/* 02357C 8002297C 24050001 */ li $a1, 1
/* 023580 80022980 3C04800E */ lui $a0, %hi(gPlayerThree) # $a0, 0x800e
/* 023584 80022984 8C84C4E4 */ lw $a0, %lo(gPlayerThree)($a0)
/* 023588 80022988 0C008AA6 */ jal func_80022A98
/* 02358C 8002298C 24050002 */ li $a1, 2
/* 023590 80022990 3C04800E */ lui $a0, %hi(gPlayerFour) # $a0, 0x800e
/* 023594 80022994 8C84C4E8 */ lw $a0, %lo(gPlayerFour)($a0)
/* 023598 80022998 0C008AA6 */ jal func_80022A98
/* 02359C 8002299C 24050003 */ li $a1, 3
/* 0235A0 800229A0 3C04800E */ lui $a0, %hi(gPlayerFive) # $a0, 0x800e
/* 0235A4 800229A4 8C84C4EC */ lw $a0, %lo(gPlayerFive)($a0)
/* 0235A8 800229A8 0C008AA6 */ jal func_80022A98
/* 0235AC 800229AC 24050004 */ li $a1, 4
/* 0235B0 800229B0 3C04800E */ lui $a0, %hi(gPlayerSix) # $a0, 0x800e
/* 0235B4 800229B4 8C84C4F0 */ lw $a0, %lo(gPlayerSix)($a0)
/* 0235B8 800229B8 0C008AA6 */ jal func_80022A98
/* 0235BC 800229BC 24050005 */ li $a1, 5
/* 0235C0 800229C0 3C04800E */ lui $a0, %hi(gPlayerSeven) # $a0, 0x800e
/* 0235C4 800229C4 8C84C4F4 */ lw $a0, %lo(gPlayerSeven)($a0)
/* 0235C8 800229C8 0C008AA6 */ jal func_80022A98
/* 0235CC 800229CC 24050006 */ li $a1, 6
/* 0235D0 800229D0 3C04800E */ lui $a0, %hi(gPlayerEight) # $a0, 0x800e
/* 0235D4 800229D4 8C84C4F8 */ lw $a0, %lo(gPlayerEight)($a0)
/* 0235D8 800229D8 0C008AA6 */ jal func_80022A98
/* 0235DC 800229DC 24050007 */ li $a1, 7
/* 0235E0 800229E0 1000002A */ b .L80022A8C
/* 0235E4 800229E4 8FBF0014 */ lw $ra, 0x14($sp)
.L800229E8:
/* 0235E8 800229E8 3C04800E */ lui $a0, %hi(gPlayerOne) # $a0, 0x800e
/* 0235EC 800229EC 8C84C4DC */ lw $a0, %lo(gPlayerOne)($a0)
/* 0235F0 800229F0 0C008AA6 */ jal func_80022A98
/* 0235F4 800229F4 00002825 */ move $a1, $zero
/* 0235F8 800229F8 3C04800E */ lui $a0, %hi(gPlayerTwo) # $a0, 0x800e
/* 0235FC 800229FC 8C84C4E0 */ lw $a0, %lo(gPlayerTwo)($a0)
/* 023600 80022A00 0C008AA6 */ jal func_80022A98
/* 023604 80022A04 24050001 */ li $a1, 1
/* 023608 80022A08 10000020 */ b .L80022A8C
/* 02360C 80022A0C 8FBF0014 */ lw $ra, 0x14($sp)
.L80022A10:
/* 023610 80022A10 3C04800E */ lui $a0, %hi(gPlayerOne) # $a0, 0x800e
/* 023614 80022A14 0C008AA6 */ jal func_80022A98
/* 023618 80022A18 8C84C4DC */ lw $a0, %lo(gPlayerOne)($a0)
/* 02361C 80022A1C 1000001B */ b .L80022A8C
/* 023620 80022A20 8FBF0014 */ lw $ra, 0x14($sp)
.L80022A24:
/* 023624 80022A24 3C02800E */ lui $v0, %hi(gModeSelection) # $v0, 0x800e
/* 023628 80022A28 8C42C53C */ lw $v0, %lo(gModeSelection)($v0)
/* 02362C 80022A2C 00002825 */ move $a1, $zero
/* 023630 80022A30 10440002 */ beq $v0, $a0, .L80022A3C
/* 023634 80022A34 00000000 */ nop
/* 023638 80022A38 14430013 */ bne $v0, $v1, .L80022A88
.L80022A3C:
/* 02363C 80022A3C 3C04800E */ lui $a0, %hi(gPlayerOne) # $a0, 0x800e
/* 023640 80022A40 0C008AA6 */ jal func_80022A98
/* 023644 80022A44 8C84C4DC */ lw $a0, %lo(gPlayerOne)($a0)
/* 023648 80022A48 3C04800E */ lui $a0, %hi(gPlayerTwo) # $a0, 0x800e
/* 02364C 80022A4C 8C84C4E0 */ lw $a0, %lo(gPlayerTwo)($a0)
/* 023650 80022A50 0C008AA6 */ jal func_80022A98
/* 023654 80022A54 24050001 */ li $a1, 1
/* 023658 80022A58 3C04800E */ lui $a0, %hi(gPlayerThree) # $a0, 0x800e
/* 02365C 80022A5C 8C84C4E4 */ lw $a0, %lo(gPlayerThree)($a0)
/* 023660 80022A60 0C008AA6 */ jal func_80022A98
/* 023664 80022A64 24050002 */ li $a1, 2
/* 023668 80022A68 3C08800E */ lui $t0, %hi(gPlayerCountSelection1) # $t0, 0x800e
/* 02366C 80022A6C 8D08C538 */ lw $t0, %lo(gPlayerCountSelection1)($t0)
/* 023670 80022A70 24010004 */ li $at, 4
/* 023674 80022A74 3C04800E */ lui $a0, %hi(gPlayerFour) # $a0, 0x800e
/* 023678 80022A78 15010003 */ bne $t0, $at, .L80022A88
/* 02367C 80022A7C 24050003 */ li $a1, 3
/* 023680 80022A80 0C008AA6 */ jal func_80022A98
/* 023684 80022A84 8C84C4E8 */ lw $a0, %lo(gPlayerFour)($a0)
.L80022A88:
/* 023688 80022A88 8FBF0014 */ lw $ra, 0x14($sp)
.L80022A8C:
/* 02368C 80022A8C 27BD0018 */ addiu $sp, $sp, 0x18
/* 023690 80022A90 03E00008 */ jr $ra
/* 023694 80022A94 00000000 */ nop

View File

@ -125,12 +125,12 @@ s32 func_800061DC(Vec3f arg0, f32 arg1, s32 arg2) {
}
#ifdef MIPS_TO_C
//generated by m2c commit bece1d6db17040749f77dbbd090363cc6fb926f9
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
extern ? D_80163258;
extern ? D_80163270;
extern ? D_80163288;
void func_800065D0(s32 arg0, void *arg1) {
void func_800065D0(s32 arg0, Player *player) {
Player *temp_a3;
Player *temp_a3_2;
s16 temp_t2;
@ -142,7 +142,7 @@ void func_800065D0(s32 arg0, void *arg1) {
u16 temp_t9;
temp_v0 = arg0 * 2;
temp_t2 = (s16) ((s16) arg1->unk2E / 182) - (s16) ((s16) D_80164590[(s16) gPathIndexByPlayerId[arg0]][gNearestWaypointByPlayerId[arg0]] / 182);
temp_t2 = (s16) ((s16) player->unk_02E / 182) - (s16) ((s16) D_80164590[(s16) gPathIndexByPlayerId[arg0]][gNearestWaypointByPlayerId[arg0]] / 182);
var_t1 = temp_t2;
if (temp_t2 < 0) {
var_t1 = temp_t2 * -1;
@ -934,7 +934,7 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_800070F4.s")
#endif
#ifdef MIPS_TO_C
//generated by m2c commit bece1d6db17040749f77dbbd090363cc6fb926f9
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
extern ? D_801643D8;
extern ? D_801643E0;
@ -1025,25 +1025,25 @@ void func_800074D4(void) {
var_t0 = 0;
var_a0_2 = &gPlayers[0];
do {
if ((var_a0_2->unk_000 & 0x800) != 0) {
if (var_a0_2->unk_000 & 0x800) {
(&sp68[0])[var_v0] = var_t0;
temp_t9 = &gCourseCompletionPercentByRank[var_v0];
var_v0 += 1;
*temp_t9 = -gTimePlayerLastTouchedFinishLine[var_t0].unk0;
}
if ((var_a0_2->unkDD8 & 0x800) != 0) {
if (var_a0_2->unkDD8 & 0x800) {
(&sp68[0])[var_v0] = var_t0 + 1;
temp_t8 = &gCourseCompletionPercentByRank[var_v0];
var_v0 += 1;
*temp_t8 = -gTimePlayerLastTouchedFinishLine[var_t0].unk4;
}
if ((var_a0_2->unk1BB0 & 0x800) != 0) {
if (var_a0_2->unk1BB0 & 0x800) {
(&sp68[0])[var_v0] = var_t0 + 2;
temp_t7 = &gCourseCompletionPercentByRank[var_v0];
var_v0 += 1;
*temp_t7 = -gTimePlayerLastTouchedFinishLine[var_t0].unk8;
}
if ((var_a0_2->unk2988 & 0x800) != 0) {
if (var_a0_2->unk2988 & 0x800) {
(&sp68[0])[var_v0] = var_t0 + 3;
temp_t6 = &gCourseCompletionPercentByRank[var_v0];
var_v0 += 1;
@ -1056,25 +1056,25 @@ void func_800074D4(void) {
temp_t1 = var_v0;
var_a0_3 = &gPlayers[0];
do {
if ((var_a0_3->unk_000 & 0x800) == 0) {
if (!(var_a0_3->unk_000 & 0x800)) {
(&sp68[0])[var_v0] = var_t0_2;
temp_t6_2 = &gCourseCompletionPercentByRank[var_v0];
var_v0 += 1;
*temp_t6_2 = gCourseCompletionPercentByPlayerId[var_t0_2].unk0;
}
if ((var_a0_3->unkDD8 & 0x800) == 0) {
if (!(var_a0_3->unkDD8 & 0x800)) {
(&sp68[0])[var_v0] = var_t0_2 + 1;
temp_t9_2 = &gCourseCompletionPercentByRank[var_v0];
var_v0 += 1;
*temp_t9_2 = gCourseCompletionPercentByPlayerId[var_t0_2].unk4;
}
if ((var_a0_3->unk1BB0 & 0x800) == 0) {
if (!(var_a0_3->unk1BB0 & 0x800)) {
(&sp68[0])[var_v0] = var_t0_2 + 2;
temp_t8_2 = &gCourseCompletionPercentByRank[var_v0];
var_v0 += 1;
*temp_t8_2 = gCourseCompletionPercentByPlayerId[var_t0_2].unk8;
}
if ((var_a0_3->unk2988 & 0x800) == 0) {
if (!(var_a0_3->unk2988 & 0x800)) {
(&sp68[0])[var_v0] = var_t0_2 + 3;
temp_t7_2 = &gCourseCompletionPercentByRank[var_v0];
var_v0 += 1;
@ -1091,7 +1091,7 @@ void func_800074D4(void) {
var_v0_2 = var_a3_2;
if (var_a3_2 < temp_t1) {
temp_a0 = &gCourseCompletionPercentByRank[var_t0_3];
if (((temp_t1 - var_a3_2) & 1) != 0) {
if ((temp_t1 - var_a3_2) & 1) {
temp_t4 = &gCourseCompletionPercentByRank[var_a3_2];
temp_f2 = *temp_t4;
temp_f0 = *temp_a0;
@ -1151,7 +1151,7 @@ block_41:
var_v0_3 = var_a3_3;
if (var_a3_3 < 8) {
temp_a0_2 = &gCourseCompletionPercentByRank[var_t0_4];
if (((8 - var_a3_3) & 1) != 0) {
if ((8 - var_a3_3) & 1) {
temp_t4_2 = &gCourseCompletionPercentByRank[var_a3_3];
temp_f2_4 = *temp_t4_2;
temp_f0_3 = *temp_a0_2;
@ -1454,176 +1454,147 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80007FA4.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_80007D04(f32, s32, void *, s32, void *); // extern
? func_80007FA4(f32, void *, f32, void *); // extern
s32 func_800088D8(f32, s32, s16, s16, void *); // extern
? func_80030FC8(f32, void *, void *, s32, void *); // extern
? func_80031F48(f32, void *, ?, s32, void *); // extern
extern f32 D_800ECF9C;
extern f32 D_800ECFA0;
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
? func_80007D04(f32, s32, Player *, s32, Player *); /* extern */
? func_80007FA4(f32, Player *, f32, Player *); /* extern */
s32 func_800088D8(f32, s32, s16, s16, Player *); /* extern */
extern ? D_801631E0;
extern ? D_80163330;
extern ? D_80163350;
extern ? D_801634D8;
extern ? D_80164392;
extern ? D_8016440A;
s16 gCurrentCourseId; /* unable to generate initializer */
void func_80008424(s32 arg0, f32 arg1, void *arg2) {
void func_80008424(s32 arg0, f32 arg1, Player *player) {
f32 sp34;
void *sp28;
s32 sp28;
s32 sp1C;
f32 temp_f12;
f32 temp_f2;
f32 var_f0;
f32 var_f12;
s32 temp_t5;
s32 temp_v0;
s32 temp_v0_2;
s32 temp_v0_3;
s32 temp_v0_5;
s32 temp_v1;
s32 var_a1;
u16 temp_v0_4;
void *temp_a0;
void *temp_a3;
f32 phi_f0;
void *phi_a1;
f32 phi_f12;
void *phi_a3;
temp_v1 = arg2->unkBC;
temp_f12 = arg1;
temp_a3 = arg2;
temp_f2 = arg2->unk94;
phi_a3 = temp_a3;
phi_f12 = temp_f12;
phi_f12 = temp_f12;
if (((temp_v1 & 0x80) == 0) && ((temp_v1 & 0x40) == 0) && ((temp_v1 << 0xE) >= 0) && (temp_v0 = arg2->unkC, ((temp_v0 << 9) >= 0)) && ((temp_v0 << 7) >= 0) && ((temp_v0 & 2) == 0) && ((temp_v0 & 4) == 0)) {
if (gCurrentCourseId == 0x14) {
func_80007FA4(temp_f12, arg2, temp_f2, temp_a3);
temp_v1 = player->unk_0BC;
var_f12 = arg1;
temp_f2 = player->unk_094;
if (!(temp_v1 & 0x80) && !(temp_v1 & 0x40) && ((temp_v1 << 0xE) >= 0) && (temp_v0 = player->unk_00C, ((temp_v0 << 9) >= 0)) && ((temp_v0 << 7) >= 0) && !(temp_v0 & 2) && !(temp_v0 & 4)) {
if (gCurrentCourseId == 0x0014) {
func_80007FA4(var_f12, player, temp_f2, player);
return;
}
temp_t5 = arg0 * 2;
if ((*(&D_801634D8 + temp_t5) == 1) && (temp_a0 = temp_a3, ((temp_v1 & 0x80000200) == 0))) {
arg2 = temp_a3;
func_80031F48(temp_f12, temp_a0, 0x41200000, temp_t5, temp_a3);
if (arg2->unk9C == 0.0) {
arg2->unk34 = 0.0f;
arg2->unk3C = 0.0f;
return;
}
// Duplicate return node #55. Try simplifying control flow for better match
return;
}
temp_v0_2 = gCCSelection;
phi_f0 = D_800ECF9C;
if (temp_v0_2 != CC_50) {
if (temp_v0_2 != CC_100) {
if (temp_v0_2 != CC_150) {
if (temp_v0_2 != CC_EXTRA) {
}
} else {
phi_f0 = 3.75f;
}
if ((*(&D_801634D8 + temp_t5) == (s16) 1) && !(temp_v1 & 0x80000200)) {
func_80031F48(player, 10.0f);
if ((f64) player->unk_09C == 0.0) {
player->unk_034[0] = 0.0f;
player->unk_034[2] = 0.0f;
}
} else {
phi_f0 = 2.5f;
}
if (temp_f2 < phi_f0) {
temp_a3->unkBC = temp_v1 & 0xFFDFFFFF;
func_80030FC8(temp_f12, temp_a3, arg2, temp_t5, temp_a3);
return;
}
if ((temp_a3->unk0 & 0x800) != 0) {
if (temp_f2 < temp_f12) {
temp_a3->unkBC = temp_v1 & 0xFFDFFFFF;
func_80030FC8(temp_f12, temp_a3, arg2, temp_t5, temp_a3);
temp_v0_2 = gCCSelection;
var_f0 = 3.3333333f;
switch (temp_v0_2) { /* irregular */
case 1:
case 3:
break;
case 0:
var_f0 = 2.5f;
break;
case 2:
var_f0 = 3.75f;
break;
}
if (temp_f2 < var_f0) {
player->unk_0BC = temp_v1 & 0xFFDFFFFF;
func_80030FC8(player);
return;
}
temp_a3->unkBC = temp_v1 & 0xFFDFFFFF;
func_80031F48(temp_f12, temp_a3, 0x3F800000, temp_t5, temp_a3);
return;
}
if ((*(&D_801631E0 + temp_t5) == 1) && (*(&D_80163330 + temp_t5) != 1)) {
temp_v0_3 = arg0 * 4;
arg2 = temp_a3;
if (func_800088D8(temp_f12, arg0, *(&D_80164392 + temp_v0_3), *(&D_8016440A + temp_v0_3), temp_a3) == 1) {
arg2->unkBC = arg2->unkBC | 0x200000;
func_80030FC8((bitwise f32) arg2);
return;
}
arg2->unkBC = arg2->unkBC & 0xFFDFFFFF;
func_80031F48((bitwise f32) arg2, 0x3F800000);
return;
}
temp_v0_4 = *(&D_80163350 + temp_t5);
phi_a1 = 1;
if (temp_v0_4 != 0) {
if (temp_v0_4 != 1) {
if (temp_v0_4 != 2) {
if (temp_v0_4 != 3) {
goto block_41;
}
temp_a3->unkBC = temp_v1 | 0x200000;
arg1 = temp_f12;
sp34 = temp_f2;
arg2 = temp_a3;
sp1C = temp_t5;
sp28 = 1;
func_80030FC8(temp_f12, temp_a3, 1, temp_t5, temp_a3);
phi_f12 = arg1;
phi_a3 = arg2;
} else {
if (((temp_f2 / 18.0f) * 216.0f) > 20.0f) {
phi_f12 = D_800ECFA0;
}
goto block_41;
if (player->unk_000 & 0x800) {
if (temp_f2 < var_f12) {
player->unk_0BC = temp_v1 & 0xFFDFFFFF;
func_80030FC8(player);
return;
}
} else {
temp_a3->unkBC = temp_v1 & 0xFFDFFFFF;
arg1 = temp_f12;
player->unk_0BC = temp_v1 & 0xFFDFFFFF;
func_80031F48(player, 1.0f);
return;
}
if ((*(&D_801631E0 + temp_t5) == (u16) 1) && (*(&D_80163330 + temp_t5) != (u16) 1)) {
temp_v0_3 = arg0 * 4;
if (func_800088D8(var_f12, arg0, *(&D_80164392 + temp_v0_3), *(&D_8016440A + temp_v0_3), player) == 1) {
player->unk_0BC |= 0x200000;
func_80030FC8(player);
return;
}
player->unk_0BC &= 0xFFDFFFFF;
func_80031F48(player, 1.0f);
return;
}
temp_v0_4 = *(&D_80163350 + temp_t5);
switch (temp_v0_4) { /* switch 1; irregular */
case 1: /* switch 1 */
player->unk_0BC = temp_v1 & 0xFFDFFFFF;
sp34 = temp_f2;
arg2 = temp_a3;
sp1C = temp_t5;
sp28 = 1;
func_80030FC8(temp_f12, temp_a3, 1, temp_t5, temp_a3);
phi_f12 = arg1;
phi_a3 = arg2;
func_80030FC8(player);
var_a1 = 1;
var_f12 = arg1;
break;
case 3: /* switch 1 */
player->unk_0BC = temp_v1 | 0x200000;
sp34 = temp_f2;
sp1C = temp_t5;
sp28 = 1;
func_80030FC8(player);
var_a1 = 1;
var_f12 = arg1;
break;
case 2: /* switch 1 */
if (((temp_f2 / 18.0f) * 216.0f) > 20.0f) {
var_f12 = 1.6666666f;
}
/* fallthrough */
default: /* switch 1 */
case 0: /* switch 1 */
var_a1 = 0;
break;
}
if (var_a1 != 1) {
if (temp_f2 < var_f12) {
if ((D_800DC51C == (u16) 1) && (gCurrentCourseId != 0x0014)) {
func_80030FC8(player);
return;
}
temp_v0_5 = arg0 * 4;
if (*(&D_80163330 + temp_t5) == (u16) 1) {
func_80007D04(var_f12, arg0, player, temp_t5, player);
return;
}
if (func_800088D8(var_f12, arg0, *(&D_80164392 + temp_v0_5), *(&D_8016440A + temp_v0_5), player) == 1) {
player->unk_0BC |= 0x200000;
func_80030FC8(player);
return;
}
player->unk_0BC &= 0xFFDFFFFF;
func_80031F48(player, 1.0f);
return;
}
player->unk_0BC &= 0xFFDFFFFF;
if (var_f12 > 1.0f) {
func_80031F48(player, 2.0f);
return;
}
func_80031F48(player, 5.0f);
}
} else {
block_41:
phi_a1 = NULL;
}
if (phi_a1 != 1) {
if (arg2->unk94 < phi_f12) {
if ((D_800DC51C == 1) && (gCurrentCourseId != 0x14)) {
func_80030FC8(phi_f12, phi_a3, phi_a1, arg0 * 2, phi_a3);
return;
}
temp_v0_5 = arg0 * 4;
if (*(&D_80163330 + (arg0 * 2)) == 1) {
func_80007D04(phi_f12, arg0, phi_a3, arg0 * 2, phi_a3);
return;
}
arg2 = phi_a3;
if (func_800088D8(phi_f12, arg0, *(&D_80164392 + temp_v0_5), *(&D_8016440A + temp_v0_5), phi_a3) == 1) {
arg2->unkBC = arg2->unkBC | 0x200000;
func_80030FC8((bitwise f32) arg2);
return;
}
arg2->unkBC = arg2->unkBC & 0xFFDFFFFF;
func_80031F48((bitwise f32) arg2, 0x3F800000);
return;
}
phi_a3->unkBC = phi_a3->unkBC & 0xFFDFFFFF;
if (phi_f12 > 1.0f) {
func_80031F48(phi_f12, phi_a3, 0x40000000, arg0 * 2, phi_a3);
return;
}
func_80031F48(phi_f12, phi_a3, 0x40A00000, arg0 * 2, phi_a3);
// Duplicate return node #55. Try simplifying control flow for better match
return;
}
// Duplicate return node #55. Try simplifying control flow for better match
}
}
#else
@ -3763,17 +3734,13 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000D3B8.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
s32 func_8000B820(s32); // extern
? func_8000BBD8(s32, f32, s16, u16); // extern
f32 func_8000D3B8(s32, u16); // extern
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
? func_8000BBD8(s32, f32, s16, u16); /* extern */
f32 func_8000D3B8(s32, u16); /* extern */
extern ? D_80162FA0;
extern ? D_80163068;
extern s32 D_801631D8;
extern ? D_80163380;
extern s16 D_8016344A;
extern u16 D_80164430;
extern s32 D_801645E0;
s16 gCurrentCourseId; /* unable to generate initializer */
void func_8000D438(s32 arg0, u16 arg1) {
f32 sp48;
@ -3789,74 +3756,66 @@ void func_8000D438(s32 arg0, u16 arg1) {
s16 temp_v1;
s32 temp_a0;
s32 temp_hi;
s32 temp_t0;
s32 var_a2;
s32 var_a2_2;
u16 temp_a3;
u16 temp_a3_2;
s32 phi_a2;
s32 phi_a2_2;
s32 phi_a2_3;
s32 phi_v0;
temp_a3 = arg1 & 0xFFFF;
temp_t0 = temp_a3 * 2;
temp_v1 = *(D_801645E0 + temp_t0);
temp_v1 = D_801645E0[temp_a3];
sp28 = 6;
sp1C = temp_t0;
sp1C = temp_a3 * 2;
arg1 = temp_a3;
sp26 = temp_v1;
temp_v0 = gCurrentCourseId;
var_a2 = 6;
sp2C = func_8000D3B8(6, temp_a3);
phi_a2 = 6;
if (temp_v0 != 4) {
if (temp_v0 != 0xA) {
if (temp_v0 == 0x14) {
phi_a2 = 1;
if (temp_v0 != 0x000A) {
if (temp_v0 == 0x0014) {
var_a2 = 1;
} else if (temp_v1 < 6) {
phi_a2 = 8;
var_a2 = 8;
} else if (temp_v1 >= 0x15) {
phi_a2 = 0x14;
var_a2 = 0x00000014;
}
} else {
phi_a2 = 7;
var_a2 = 7;
}
}
phi_a2_2 = phi_a2;
phi_a2_2 = phi_a2;
if (phi_a2 >= 8) {
temp_f0 = *(&D_80163068 + (arg0 * 4));
if ((temp_f0 > 0.75f) && (*(D_801631D8 + temp_t0) == 0)) {
phi_a2_2 = 7;
if (var_a2 >= 8) {
temp_f0 = D_80163068[arg0];
if ((temp_f0 > 0.75f) && (D_801631D8[temp_a3] == 0)) {
var_a2 = 7;
}
if ((temp_f0 < -0.75f) && (*(D_801631D8 + temp_t0) == 1)) {
phi_a2_2 = 7;
if ((temp_f0 < -0.75f) && (D_801631D8[temp_a3] == 1)) {
var_a2 = 7;
}
}
sp28 = phi_a2_2;
sp28 = var_a2;
arg1 = arg1;
var_a2_2 = var_a2;
temp_a3_2 = arg1;
phi_a2_3 = phi_a2_2;
if (func_8000B820(arg0) == 1) {
phi_a2_3 = 5;
var_a2_2 = 5;
}
temp_v1_2 = (arg0 * 2) + &D_80163380;
temp_v0_2 = *temp_v1_2;
if (temp_v0_2 < phi_a2_3) {
if (temp_v0_2 < var_a2_2) {
*temp_v1_2 = temp_v0_2 + 1;
}
phi_v0 = *temp_v1_2;
if (phi_a2_3 < *temp_v1_2) {
*temp_v1_2 = *temp_v1_2 - 1;
phi_v0 = *temp_v1_2;
if (var_a2_2 < *temp_v1_2) {
*temp_v1_2 -= 1;
}
temp_hi = (phi_v0 + temp_a3_2) % D_80164430;
temp_hi = (s32) (*temp_v1_2 + temp_a3_2) % (s32) D_80164430;
temp_a0 = temp_hi & 0xFFFF;
arg1 = temp_hi;
arg1 = (u16) temp_hi;
func_8000BBD8(temp_a0, sp2C, D_8016344A, temp_a3_2);
sp48 = D_80162FA0.unk0;
sp44 = D_80162FA0.unk8;
func_8000BBD8(((arg1 + 1) % D_80164430) & 0xFFFF, sp2C, D_8016344A, arg1);
D_80162FA0.unk0 = (sp48 + D_80162FA0.unk0) * 0.5f;
D_80162FA0.unk8 = (sp44 + D_80162FA0.unk8) * 0.5f;
func_8000BBD8(((s32) (arg1 + 1) % (s32) D_80164430) & 0xFFFF, sp2C, D_8016344A, arg1);
D_80162FA0.unk0 = (f32) ((sp48 + D_80162FA0.unk0) * 0.5f);
D_80162FA0.unk8 = (f32) ((sp44 + D_80162FA0.unk8) * 0.5f);
}
#else
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000D438.s")
@ -3940,15 +3899,11 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000D6D0.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_80005FD0(f32, f32, f32 *, void *); // extern
? func_8000BBD8(u16, s32, s16, s32); // extern
s16 func_8000D2B4(f32, f32, f32, s16, s32); // extern
extern f32 D_800ED000;
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
? func_8000BBD8(u16, s32, s16, s32); /* extern */
extern ? D_80162FA0;
extern ? gWaypointCountByPathIndex;
void func_8000D940(void *arg0, s16 *arg1, f32 arg2, s32 arg3, s16 arg4) {
void func_8000D940(Vec3f arg0, s16 *arg1, f32 arg2, s32 arg3, s16 pathIndex) {
s16 spA8;
u16 spA6;
f32 spA0;
@ -3968,71 +3923,69 @@ void func_8000D940(void *arg0, s16 *arg1, f32 arg2, s32 arg3, s16 arg4) {
f32 temp_f24;
f32 temp_f4;
f32 temp_f4_2;
s16 *temp_v0_2;
f32 var_f12;
f32 var_f14;
f32 var_f2;
s16 temp_v0;
s32 temp_a3;
s32 temp_t2;
s32 temp_v1;
struct TrackWayPoint *temp_v0_2;
u16 temp_t0;
f32 phi_f2;
f32 phi_f12;
f32 phi_f14;
sp54 = arg0->unk0;
sp58 = arg0->unk4;
temp_t0 = *(&gWaypointCountByPathIndex + (arg4 * 2));
temp_t0 = gWaypointCountByPathIndex[pathIndex];
sp5C = arg0->unk8;
temp_f24 = arg0->unk8;
temp_f20 = arg0->unk0;
temp_f22 = arg0->unk4;
sp60 = temp_t0;
temp_v0 = func_8000D2B4(temp_f20, temp_f22, temp_f24, *arg1, arg4);
sp60 = (s32) temp_t0;
temp_v0 = func_8000D2B4(temp_f20, temp_f22, temp_f24, *arg1, (s32) pathIndex);
temp_v1 = temp_v0 + temp_t0;
temp_t2 = temp_v1 - 4;
temp_a3 = (temp_v1 - 3) % temp_t0;
temp_a3 = (s32) (temp_v1 - 3) % (s32) temp_t0;
*arg1 = temp_v0;
spA8 = temp_a3;
spA6 = temp_t2 % temp_t0;
func_8000BBD8(temp_a3 & 0xFFFF, arg3, arg4, temp_a3);
spA8 = (s16) temp_a3;
spA6 = (u16) (temp_t2 % (s32) temp_t0);
func_8000BBD8(temp_a3 & 0xFFFF, arg3, pathIndex, temp_a3);
temp_f4 = D_80162FA0.unk8;
spA0 = D_80162FA0.unk0;
sp98 = temp_f4;
func_8000BBD8(spA6, arg3, arg4);
temp_v0_2 = (&D_80164550)[arg4];
temp_f18 = (((temp_v0_2 + (spA6 * 8))->unk2 + (temp_v0_2 + (spA8 * 8))->unk2) * 0.5f) - temp_f22;
func_8000BBD8(spA6, arg3, pathIndex);
temp_v0_2 = D_80164550[pathIndex];
temp_f18 = ((f32) (temp_v0_2[(s16) spA6].wayPointY + temp_v0_2[spA8].wayPointY) * 0.5f) - temp_f22;
temp_f16 = ((spA0 + D_80162FA0.unk0) * 0.5f) - temp_f20;
sp4C = temp_f18;
sp50 = temp_f16;
temp_f4_2 = ((temp_f4 + D_80162FA0.unk8) * 0.5f) - temp_f24;
sp48 = temp_f4_2;
temp_f0 = sqrtf((temp_f16 * temp_f16) + (temp_f18 * temp_f18) + (temp_f4_2 * temp_f4_2));
if (D_800ED000 < temp_f0) {
phi_f2 = ((temp_f16 * arg2) / temp_f0) + temp_f20;
phi_f12 = ((temp_f18 * arg2) / temp_f0) + temp_f22;
phi_f14 = ((sp48 * arg2) / temp_f0) + temp_f24;
if (temp_f0 > 0.01f) {
var_f2 = ((temp_f16 * arg2) / temp_f0) + temp_f20;
var_f12 = ((temp_f18 * arg2) / temp_f0) + temp_f22;
var_f14 = ((sp48 * arg2) / temp_f0) + temp_f24;
} else {
phi_f2 = temp_f20;
phi_f12 = temp_f22;
phi_f14 = temp_f24;
var_f2 = temp_f20;
var_f12 = temp_f22;
var_f14 = temp_f24;
}
arg0->unk0 = phi_f2;
arg0->unk4 = phi_f12;
arg0->unk8 = phi_f14;
func_80005FD0(phi_f12, phi_f14, &sp54, arg0);
arg0->unk0 = var_f2;
arg0->unk4 = var_f12;
arg0->unk8 = var_f14;
func_80005FD0(&sp54, arg0);
}
#else
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000D940.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_80005FD0(f32, f32, f32 *, void *); // extern
s16 func_8000D100(f32, f32, f32, s16); // extern
extern f32 D_800ED004;
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
s16 func_8000D100(f32, f32, f32, s16); /* extern */
extern s32 D_80163598;
extern s32 D_8016359C;
void func_8000DBAC(void *arg0, s16 *arg1, f32 arg2) {
void func_8000DBAC(Vec3f arg0, s16 *arg1, f32 arg2) {
f32 sp98;
f32 sp94;
f32 sp40;
@ -4046,13 +3999,13 @@ void func_8000DBAC(void *arg0, s16 *arg1, f32 arg2) {
f32 temp_f16;
f32 temp_f18;
f32 temp_f2;
f32 var_f12;
f32 var_f14;
s16 temp_v0;
s32 temp_a1;
s32 temp_v1;
void *temp_a0;
void *temp_a2;
f32 phi_f12;
f32 phi_f14;
temp_f12 = arg0->unk0;
temp_f14 = arg0->unk4;
@ -4066,24 +4019,24 @@ void func_8000DBAC(void *arg0, s16 *arg1, f32 arg2) {
*arg1 = temp_v0;
temp_v1 = D_8016359C;
temp_a1 = D_80163598;
temp_a0 = (((temp_v0 + 3) % temp_v1) * 4) + temp_a1;
temp_a2 = (((temp_v0 + 4) % temp_v1) * 4) + temp_a1;
temp_f16 = ((temp_a0->unk0 + temp_a2->unk0) * 0.5f) - temp_f12;
temp_f18 = ((temp_a0->unk2 + temp_a2->unk2) * 0.5f) - temp_f2;
temp_a0 = ((s16) ((s32) (temp_v0 + 3) % temp_v1) * 4) + temp_a1;
temp_a2 = ((s16) ((s32) (temp_v0 + 4) % temp_v1) * 4) + temp_a1;
temp_f16 = ((f32) (temp_a0->unk0 + temp_a2->unk0) * 0.5f) - temp_f12;
temp_f18 = ((f32) (temp_a0->unk2 + temp_a2->unk2) * 0.5f) - temp_f2;
sp34 = temp_f16;
sp30 = temp_f18;
temp_f0 = sqrtf((temp_f16 * temp_f16) + (temp_f18 * temp_f18));
if (D_800ED004 < temp_f0) {
phi_f12 = ((temp_f16 * arg2) / temp_f0) + temp_f12;
phi_f14 = ((temp_f18 * arg2) / temp_f0) + temp_f2;
if (temp_f0 > 0.01f) {
var_f12 = ((temp_f16 * arg2) / temp_f0) + temp_f12;
var_f14 = ((temp_f18 * arg2) / temp_f0) + temp_f2;
} else {
phi_f12 = temp_f12;
phi_f14 = temp_f2;
var_f12 = temp_f12;
var_f14 = temp_f2;
}
arg0->unk0 = phi_f12;
arg0->unk8 = phi_f14;
arg0->unk0 = var_f12;
arg0->unk8 = var_f14;
arg0->unk4 = sp98;
func_80005FD0(phi_f12, phi_f14, &sp38, arg0);
func_80005FD0(&sp38, arg0);
}
#else
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000DBAC.s")

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,9 @@
/* Function Prototypes */
void func_8001F980(s32*, s32*);
void func_80020000(Player*, struct Camera*, u8, u8);
u16 func_8001FB0C(Player*, Camera*, f32, f32);
u16 func_8001FD78(Player*, f32, f32, f32);
void func_80020000(Player*, Camera*, u8, u8);
void func_8002088C();
void func_80020F1C();
void func_80021244(Player*, u8, u8);
@ -22,6 +24,7 @@ void func_80021F84(Mat4, f32);
void func_80021FF8(Mtx*, Mat4);
void func_80022180(Mtx*, Mat4);
s32 func_800224F0(s16*, s16, s16);
void func_8002276C();
void move_s32_towards(s32*, s32, f32);
void move_f32_towards(f32*, f32, f32);
void move_s16_towards(s16*, s16, f32);

View File

@ -245,10 +245,10 @@ GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80282700.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_80282700(f32, f32, s32, s32, f32 *, f32 *, f32 *, f32 *); // extern
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
? func_80282700(f32, f32, f32 *, f32 *, f32 *, f32 *, f32 *, f32 *); /* extern */
s32 func_802828C8(s32 arg0, s32 arg1, s32 arg2, s16 *arg3, f32 *arg4) {
s32 func_802828C8(f32 *arg0, f32 *arg1, s32 arg2, s16 *arg3, f32 *arg4) {
s32 sp94;
f32 sp90;
f32 sp8C;
@ -268,76 +268,71 @@ s32 func_802828C8(s32 arg0, s32 arg1, s32 arg2, s16 *arg3, f32 *arg4) {
f32 sp54;
f32 sp44;
f32 sp40;
f32 *temp_a3;
f32 *temp_t9;
f32 temp_f0;
f32 var_f12;
f32 var_f14;
f32 var_f16;
s16 temp_v1;
s32 var_t1;
u16 temp_v1_2;
u16 temp_v1_3;
void *temp_v0;
void *temp_v0_2;
void *temp_v0_3;
f32 phi_f12;
f32 phi_f16;
f32 phi_f14;
s32 phi_t1;
temp_v1 = *arg3;
phi_f12 = *arg4;
phi_f16 = 0.0f;
phi_f14 = 0.0f;
phi_t1 = 0;
phi_t1 = 0;
var_f12 = *arg4;
if (temp_v1 < 0) {
phi_f12 = 0.0f;
var_f12 = 0.0f;
}
temp_v0 = arg2 + (temp_v1 * 0xC);
if ((temp_v0->unk0 == -1) || (temp_v0->unkC == -1) || (temp_v0->unk18 == -1)) {
return 1;
}
temp_v0_2 = arg2 + (temp_v1 * 0xC);
temp_a3 = &sp54;
sp54 = temp_v0_2->unk6;
sp58 = temp_v0_2->unk8;
sp5C = temp_v0_2->unkA;
sp60 = temp_v0_2->unk4 * 256.0f;
sp64 = temp_v0_2->unk12;
sp68 = temp_v0_2->unk14;
sp6C = temp_v0_2->unk16;
sp70 = temp_v0_2->unk10 * 256.0f;
sp74 = temp_v0_2->unk1E;
sp78 = temp_v0_2->unk20;
sp7C = temp_v0_2->unk22;
temp_t9 = &sp84;
sp80 = temp_v0_2->unk1C * 256.0f;
sp84 = temp_v0_2->unk2A;
sp88 = temp_v0_2->unk2C;
sp8C = temp_v0_2->unk2E;
sp54 = (f32) temp_v0_2->unk6;
sp58 = (f32) temp_v0_2->unk8;
sp5C = (f32) temp_v0_2->unkA;
sp60 = (f32) temp_v0_2->unk4 * 256.0f;
sp64 = (f32) temp_v0_2->unk12;
sp68 = (f32) temp_v0_2->unk14;
sp6C = (f32) temp_v0_2->unk16;
sp70 = (f32) temp_v0_2->unk10 * 256.0f;
sp74 = (f32) temp_v0_2->unk1E;
sp78 = (f32) temp_v0_2->unk20;
sp7C = (f32) temp_v0_2->unk22;
sp80 = (f32) temp_v0_2->unk1C * 256.0f;
sp84 = (f32) temp_v0_2->unk2A;
sp88 = (f32) temp_v0_2->unk2C;
sp8C = (f32) temp_v0_2->unk2E;
sp40 = 0.0f;
sp44 = 0.0f;
sp94 = 0;
sp90 = temp_v0_2->unk28 * 256.0f;
func_80282700(phi_f12, 0.0f, arg0, arg1, temp_a3, &sp64, &sp74, temp_t9);
sp90 = (f32) temp_v0_2->unk28 * 256.0f;
func_80282700(var_f12, 0.0f, arg0, arg1, &sp54, &sp64, &sp74, &sp84);
var_t1 = sp94;
var_f14 = sp44;
var_f16 = sp40;
temp_v0_3 = arg2 + (*arg3 * 0xC);
temp_v1_2 = temp_v0_3->unkE;
if (temp_v1_2 != 0) {
phi_f14 = 1.0f / temp_v1_2;
var_f14 = 1.0f / (f32) temp_v1_2;
}
temp_v1_3 = temp_v0_3->unk1A;
if (temp_v1_3 != 0) {
phi_f16 = 1.0f / temp_v1_3;
var_f16 = 1.0f / (f32) temp_v1_3;
}
temp_f0 = *arg4;
*arg4 = temp_f0 + ((temp_f0 * (phi_f16 - phi_f14)) + phi_f14);
*arg4 = temp_f0 + ((temp_f0 * (var_f16 - var_f14)) + var_f14);
if (*arg4 >= 1.0f) {
*arg3 = *arg3 + 1;
*arg3 += 1;
if ((arg2 + (*arg3 * 0xC))->unk24 == -1) {
*arg3 = 0;
phi_t1 = 1;
var_t1 = 1;
}
*arg4 = *arg4 - 1.0f;
*arg4 -= 1.0f;
}
return phi_t1;
return var_t1;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_802828C8.s")
@ -409,23 +404,23 @@ loop_1:
GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80282C40.s")
#endif
s32 func_80282D90(s32 arg0, s32 arg1, s32 arg2, s32 arg3) {
s32 func_80282D90(Camera *camera, s32 arg1, s32 arg2, s32 arg3) {
s32 res;
func_802832C4(&func_80282434, arg0, 0, 0);
func_802832C4(&func_80282434, camera, 0, 0);
func_80282C40(&D_80287818, arg1, arg3);
func_80282C40(&D_80287998, arg2, arg3);
if (0) {}; // debug stub?
res = func_802828C8(arg0 + 0xC, arg0 + 0x18, &D_80287818, &D_80287B1C, &D_80287B18) |
func_802828C8(arg0, arg0 + 0x18, &D_80287998, &D_80287B1C, &D_80287B18);
res = func_802828C8(camera->lookAt, camera->up, &D_80287818, &D_80287B1C, &D_80287B18) |
func_802828C8(camera->pos, camera->up, &D_80287998, &D_80287B1C, &D_80287B18);
return res;
}
void func_80282E58(s32 arg0, s32 arg1, s32 arg2) {
void func_80282E58(Camera *camera, s32 arg1, s32 arg2) {
func_80282C40(&D_80287818, arg1, arg2);
func_802828C8(arg0 + 0xC, arg0 + 0x18, &D_80287818, &D_80287B1C, &D_80287B18);
func_802828C8(camera->lookAt, camera->up, &D_80287818, &D_80287B1C, &D_80287B18);
}
#ifdef MIPS_TO_C
@ -545,9 +540,9 @@ void func_80283240(s16 arg0) {
}
}
s32 func_802832C4(void (*func_ptr)(s32), s32 arg1, s16 arg2, s16 arg3) {
s32 func_802832C4(void (*func_ptr)(s32), Camera *camera, s16 arg2, s16 arg3) {
if ((D_802876D2 >= arg2) && ((arg3 == -1) || (arg3 >= D_802876D2))) {
func_ptr(arg1);
func_ptr(camera);
}
return 0;
}
@ -683,7 +678,7 @@ GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80283430.s")
#endif
#ifdef MIPS_TO_C
//generated by m2c commit bece1d6db17040749f77dbbd090363cc6fb926f9
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
? func_80282F44(?, s32 *, Camera *); /* extern */
? func_80283100(s32 *, f32 *); /* extern */
s32 func_8028336C(s32 *, Camera *); /* extern */
@ -716,10 +711,10 @@ s32 func_80283648(Camera *camera) {
func_80283428();
vec3f_copy_dupe(&sp58, camera->pos);
temp_a1 = &camera->unk;
temp_a1 = camera->lookAt;
sp34 = temp_a1;
vec3f_copy_dupe(&sp4C, temp_a1);
temp_a1_2 = &camera->angleX;
temp_a1_2 = camera->up;
sp30 = temp_a1_2;
vec3f_copy_dupe(&sp40, temp_a1_2);
temp_v1 = func_8028336C(&D_802876E0, camera) & 0xFF;
@ -755,15 +750,15 @@ s32 func_80283648(Camera *camera) {
temp_t9 = (u32) var_f0 & 0xFFFF;
sp2C = temp_t9;
sp38 = sins((u16) temp_t9);
camera->angleX = coss((u16) sp6C) * sp38;
camera->angleY = coss(unksp2E);
camera->up[0] = coss((u16) sp6C) * sp38;
camera->up[1] = coss(unksp2E);
sp38 = sins(unksp2E);
camera->angleZ = sins((u16) sp6C) * -sp38;
camera->up[2] = sins((u16) sp6C) * -sp38;
vec3f_copy_dupe(camera->pos, &D_802876EC);
vec3f_copy_dupe(sp34, (f32 *) &D_802876E0);
if ((gGamestate == 9) && (gIsMirrorMode != 0)) {
camera->pos[0] = -camera->pos[0];
camera->unk = -camera->unk;
camera->lookAt[0] = -camera->lookAt[0];
}
}
func_80282F44(0, &D_802876E0, camera);
@ -884,77 +879,77 @@ void func_80283D04(s32 arg0) {
play_sound2(0x49008026);
}
void func_80283D2C(s32 arg0) {
void func_80283D2C(Camera *camera) {
D_802856B8 = 120.0f;
func_802832C4(&func_80283CA8, arg0, 0, 0);
func_802832C4(&func_80283A34, arg0, 1, 1);
func_802832C4(&func_80283BF0, arg0, 0, 0);
func_802832C4(&func_80283A7C, arg0, 0x2D, 0x2D);
func_802832C4(&func_80283A7C, arg0, 0x41, 0x41);
func_802832C4(&func_80283A7C, arg0, 0x46, 0x46);
func_802832C4(&func_80283A7C, arg0, 0x5E, 0x5E);
func_802832C4(&func_80283A7C, arg0, 0x6E, 0x6E);
func_802832C4(&func_80283A7C, arg0, 0x82, 0x82);
func_802832C4(&func_80283A7C, arg0, 0x98, 0x98);
func_802832C4(&func_80283A7C, arg0, 0xA0, 0xA0);
func_802832C4(&func_80283994, arg0, D_80285D14 - 0x3C, D_80285D14 - 0x3C);
func_80282D90(arg0, &D_802856DC, &D_80285718, 0);
func_802832C4(&func_80283CA8, camera, 0, 0);
func_802832C4(&func_80283A34, camera, 1, 1);
func_802832C4(&func_80283BF0, camera, 0, 0);
func_802832C4(&func_80283A7C, camera, 0x2D, 0x2D);
func_802832C4(&func_80283A7C, camera, 0x41, 0x41);
func_802832C4(&func_80283A7C, camera, 0x46, 0x46);
func_802832C4(&func_80283A7C, camera, 0x5E, 0x5E);
func_802832C4(&func_80283A7C, camera, 0x6E, 0x6E);
func_802832C4(&func_80283A7C, camera, 0x82, 0x82);
func_802832C4(&func_80283A7C, camera, 0x98, 0x98);
func_802832C4(&func_80283A7C, camera, 0xA0, 0xA0);
func_802832C4(&func_80283994, camera, D_80285D14 - 0x3C, D_80285D14 - 0x3C);
func_80282D90(camera, &D_802856DC, &D_80285718, 0);
}
void func_80283EA0(s32 arg0) {
func_80282D90(arg0, &D_80285754, &D_80285784, 0);
void func_80283EA0(Camera *camera) {
func_80282D90(camera, &D_80285754, &D_80285784, 0);
}
void func_80283ED0(Vec3f arg0) {
vec3f_copy_dupe(arg0, &gPlayerTwo->pos[0]);
void func_80283ED0(Camera *camera) {
vec3f_copy_dupe(camera->pos, gPlayerTwo->pos);
}
void func_80283EF8(Vec3f arg0) {
func_802821A0(&arg0[0], gPlayerTwo->pos[0], 0.12f);
func_802821A0(&arg0[1], gPlayerTwo->pos[1], 0.12f);
func_802821A0(&arg0[2], gPlayerTwo->pos[2], 0.12f);
void func_80283EF8(Camera *camera) {
func_802821A0(&camera->pos[0], gPlayerTwo->pos[0], 0.12f);
func_802821A0(&camera->pos[1], gPlayerTwo->pos[1], 0.12f);
func_802821A0(&camera->pos[2], gPlayerTwo->pos[2], 0.12f);
}
void func_80283F6C(s32 arg0) {
func_802832C4(&func_80283ED0, arg0, 0, 0);
func_802832C4(&func_80283EF8, arg0, 0, -1);
func_80282E58(arg0, &D_802857B4, 0);
void func_80283F6C(Camera *camera) {
func_802832C4(&func_80283ED0, camera, 0, 0);
func_802832C4(&func_80283EF8, camera, 0, -1);
func_80282E58(camera, &D_802857B4, 0);
}
void func_80283FCC(Vec3f arg0) {
vec3f_copy_dupe(arg0, &gPlayerThree->pos[0]);
void func_80283FCC(Camera *camera) {
vec3f_copy_dupe(camera->pos, gPlayerThree->pos);
}
void func_80283FF4(Vec3f arg0) {
func_802821A0(&arg0[0], gPlayerThree->pos[0], 0.12f);
func_802821A0(&arg0[1], gPlayerThree->pos[1], 0.12f);
func_802821A0(&arg0[2], gPlayerThree->pos[2], 0.12f);
void func_80283FF4(Camera *camera) {
func_802821A0(&camera->pos[0], gPlayerThree->pos[0], 0.12f);
func_802821A0(&camera->pos[1], gPlayerThree->pos[1], 0.12f);
func_802821A0(&camera->pos[2], gPlayerThree->pos[2], 0.12f);
}
void func_80284068(s32 arg0) {
func_802832C4(&func_80283FCC, arg0, 0, 0);
func_802832C4(&func_80283FF4, arg0, 0, -1);
func_80282E58(arg0, &D_802857CC, 0);
void func_80284068(Camera *camera) {
func_802832C4(&func_80283FCC, camera, 0, 0);
func_802832C4(&func_80283FF4, camera, 0, -1);
func_80282E58(camera, &D_802857CC, 0);
}
void func_802840C8(s32 arg0) {
func_802832C4(&func_80283C14, arg0, 5, 5);
void func_802840C8(Camera *camera) {
func_802832C4(&func_80283C14, camera, 5, 5);
switch(D_802876D8) {
case 2:
func_80283EA0(arg0);
func_80283EA0(camera);
break;
case 3:
func_80283F6C(arg0);
func_80283F6C(camera);
break;
case 4:
func_80284068(arg0);
func_80284068(camera);
break;
}
}
void func_80284154(s32 arg0) {
func_80282D90(arg0, &D_80285910, &D_80285928, 0);
void func_80284154(Camera *camera) {
func_80282D90(camera, &D_80285910, &D_80285928, 0);
}
#ifdef MIPS_TO_C
@ -974,16 +969,16 @@ void func_80284184(s32 *arg0) {
GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80284184.s")
#endif
void func_802841E8(Vec3f arg0) {
func_80282E58(arg0, &D_80285940, 0);
vec3f_set_dupe(arg0, -3202.0f, 90.0f, -478.0f);
void func_802841E8(Camera *camera) {
func_80282E58(camera, &D_80285940, 0);
vec3f_set_dupe(camera->pos, -3202.0f, 90.0f, -478.0f);
}
void func_8028422C(s32 arg0) {
func_802832C4(&func_80283AF4, arg0, 6, 6);
func_802832C4(&func_80283B44, arg0, 0x1E, 0x1E);
func_802832C4(&func_802841E8, arg0, 0, 0);
func_802832C4(&func_80284184, arg0, 6, -1);
void func_8028422C(Camera *camera) {
func_802832C4(&func_80283AF4, camera, 6, 6);
func_802832C4(&func_80283B44, camera, 0x1E, 0x1E);
func_802832C4(&func_802841E8, camera, 0, 0);
func_802832C4(&func_80284184, camera, 6, -1);
}
void func_802842A8(s32 arg0) {
@ -995,39 +990,36 @@ void func_802842D8(s32 arg0) {
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_80282D90(void *, ? *, ? *, ?); // extern
? func_802832C4(? *, void *, ?, ?); // extern
extern ? D_802858E0;
extern ? D_802858F8;
extern ? D_80285A00;
extern s8 D_802874F5;
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
static ? D_802858E0; /* unable to generate initializer */
static ? D_802858F8; /* unable to generate initializer */
static ? D_80285A00; /* unable to generate initializer */
void func_80284308(void *arg0) {
void func_80284308(Camera *camera) {
s32 sp30;
Player *player = &gPlayerOne;
Player *temp_v1;
f32 temp_f0;
f32 temp_f12;
f32 temp_f2;
void *temp_v0;
sp30.unk0 = D_80285A00.unk0;
sp30.unk4 = D_80285A00.unk4;
sp30.unkC = D_80285A00.unkC;
sp30.unk8 = D_80285A00.unk8;
func_802832C4(&func_80283A54, arg0, 0x8C, 0x8C);
func_80282D90(arg0, &D_802858E0, &D_802858F8, 0);
sp30.unk4 = (s32) D_80285A00.unk4;
sp30.unkC = (s32) D_80285A00.unkC;
sp30.unk8 = (s32) D_80285A00.unk8;
func_802832C4(func_80283A54, (s32) camera, 0x008C, 0x008C);
func_80282D90((s32) camera, (s32) &D_802858E0, (s32) &D_802858F8, 0);
temp_v0 = *(sp30 + (D_802874F5 * 4));
//player = gPlayerOne;
temp_f0 = temp_v0->unk14 - player->pos[0];
temp_f12 = temp_v0->unk1C - player->pos[2];
temp_f2 = temp_v0->unk18 - player->pos[1];
arg0->unkC = arg0->unkC + temp_f0;
arg0->unk0 = arg0->unk0 + temp_f0;
arg0->unk14 = arg0->unk14 + temp_f12;
arg0->unk8 = arg0->unk8 + temp_f12;
arg0->unk4 = arg0->unk4 + temp_f2;
arg0->unk10 = arg0->unk10 + temp_f2;
temp_v1 = gPlayerOne;
temp_f0 = temp_v0->unk14 - temp_v1->pos[0];
temp_f12 = temp_v0->unk1C - temp_v1->pos[2];
temp_f2 = temp_v0->unk18 - temp_v1->pos[1];
camera->lookAt[0] += temp_f0;
camera->pos[0] += temp_f0;
camera->lookAt[2] += temp_f12;
camera->pos[2] += temp_f12;
camera->pos[1] += temp_f2;
camera->lookAt[1] += temp_f2;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80284308.s")

View File

@ -24,11 +24,11 @@ void func_80282434(s32);
void func_80282454(Vec3f, Vec3f, f32*, s16*, s16*);
void func_80282504(Vec3f, Vec3f, f32, s16, s16);
void func_802825C8(Vec3f, Vec3f, Vec3f, Vec3s);
s32 func_80282D90(s32, s32, s32, s32);
void func_80282E58(s32, s32, s32);
s32 func_80282D90(Camera*, s32, s32, s32);
void func_80282E58(Camera*, s32, s32);
void func_80282F00(s16*, s16);
void func_80283240(s16);
s32 func_802832C4(void (*)(s32), s32, s16, s16);
s32 func_802832C4(void (*)(s32), Camera*, s16, s16);
s32 func_80283330(s32);
s32 func_80283428();
void func_80283968(s32);
@ -55,19 +55,19 @@ void func_80283C78(s32);
void func_80283CA8(s32);
void func_80283CD0(s32);
void func_80283D04(s32);
void func_80283D2C(s32);
void func_80283EA0(s32);
void func_80283ED0(Vec3f);
void func_80283EF8(Vec3f);
void func_80283F6C(s32);
void func_80283FCC(Vec3f);
void func_80283FF4(Vec3f);
void func_80284068(s32);
void func_802840C8(s32);
void func_80284154(s32);
void func_80283D2C(Camera*);
void func_80283EA0(Camera*);
void func_80283ED0(Camera*);
void func_80283EF8(Camera*);
void func_80283F6C(Camera*);
void func_80283FCC(Camera*);
void func_80283FF4(Camera*);
void func_80284068(Camera*);
void func_802840C8(Camera*);
void func_80284154(Camera*);
void func_80284184();
void func_802841E8(Vec3f);
void func_8028422C(s32);
void func_802841E8(Camera*);
void func_8028422C(Camera*);
void func_802842A8(s32);
void func_802842D8(s32);
void func_80284418(s32 arg0);

View File

@ -83,120 +83,38 @@ void crash_screen_draw_glyph(u16 *framebuffer, s32 x, s32 y, s32 glyph) {
}
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
#ifdef NON_MATCHING
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
#define WHITE_COLOUR 0xFFFF
#define RED_COLOUR 0xF801
void crash_screen_draw_square(u16 *framebuffer) {
s32 temp_a0;
s32 temp_a1;
s32 temp_a1_2;
s32 temp_ra;
s32 temp_s0;
s32 temp_s1;
s32 temp_t0;
s32 temp_v1;
s32 phi_s2;
s32 phi_s0;
s16 *phi_v0;
s32 phi_v1;
void *phi_v0_2;
s32 phi_a1;
s32 phi_s1;
s32 phi_a0;
s32 phi_a1_2;
s32 phi_v1_2;
s32 phi_a0_2;
s32 phi_a0_3;
s32 phi_a1_3;
s32 phi_a1_4;
s32 i, j, k;
//phi_s2 = 0x28;
//phi_s0 = 0x2E;
phi_a0_2 = framebuffer;
//phi_a1_3 = arg1;
for (i = 46; i > 44; i--) {
//phi_s1 = phi_s2;
//phi_a0 = phi_a0_2;
//phi_a1_2 = phi_a1_3;
// phi_a0_3 = phi_a0_2;
//phi_a1_4 = phi_a1_3;
//if (phi_s2 < phi_s0) {
for (j = 40; j < i; j++) {
//phi_v1 = phi_s2;
//phi_v1_2 = phi_s2;
if (phi_s2 < phi_s0) {
//temp_a0 = i - j;
temp_t0 = (i - j) & 3;
//temp_ra = framebuffer + (phi_s1 * 0x280);
//phi_a0_3 = temp_a0;
if (temp_t0 != 0) {
phi_v0 = temp_ra + (phi_s2 * 2);
do { // (temp_t0 + j;) {
j++;
//temp_v1 = phi_v1 + 1;
//phi_v1 = temp_v1;
//phi_v1_2 = temp_v1;
if (i - j == 6) {
framebuffer[i * 640 + j * 2] = RED_COLOUR;
} else {
framebuffer[i * 640 + j * 2] = WHITE_COLOUR;
}
j += 2;
} while ((temp_t0 + j) != j);
phi_a1_4 = temp_v1 * 2;
if (temp_v1 != phi_s0) {
break; // goto 10
}
} else {
//block_10:
//temp_a1 = phi_v1_2 * 2;
phi_v0_2 = framebuffer[i * 640 + j * 2];
phi_a1 = temp_a1;
for (k = j + 8; k < j * 2; k += 8) {
//do {
//temp_a1_2 = phi_a1 + 8;
//phi_a1 = temp_a1_2;
//phi_a1_4 = temp_a1_2;
if (temp_a0 == 6) {
framebuffer[i * 640 + j * 2] = RED_COLOUR;
} else {
framebuffer[i * 640 + j * 2] = WHITE_COLOUR;
}
//if (temp_a0 == 6) {
// phi_v0_2->unk2 = RED_COLOUR;
//} else {
// phi_v0_2->unk2 = WHITE_COLOUR;
//}
//if (temp_a0 == 6) {
// phi_v0_2->unk4 = RED_COLOUR;
//} else {
// phi_v0_2->unk4 = WHITE_COLOUR;
//}
//if (temp_a0 == 6) {
// phi_v0_2->unk6 = RED_COLOUR;
//} else {
// phi_v0_2->unk6 = WHITE_COLOUR;
//}
//phi_v0_2 += 8;
} //while (temp_a1_2 != (phi_s0 * 2));
}
/**
* The big mismatch is the handling of the '6' used in the if statement
* In the target assembly that 6 is saved to 5 different temp registers,
* while in this non-matching decomp its only saved to one temp register.
* This seems to be related to how the innermost for loop is unrolled, but
* its not clear why the target assembley would save the same immediate to
* 5 different registers instead of just re-using one
* There's some stack related differences too, maybe that's related?
**/
void crash_screen_draw_square(u16 *framebuffer) {
s32 var_s0;
s32 var_s2;
s32 row;
s32 column;
for (var_s0 = 0x2E, var_s2 = 0x28; var_s0 > 0x2C; var_s0--, var_s2++) {
for (row = var_s2; row < var_s0; row++) {
for (column = var_s2; column < var_s0; column++) {
if ((var_s0 - var_s2) == 6) {
framebuffer[(row * 320) + column] = RED_COLOUR;
} else {
framebuffer[(row * 320) + column] = WHITE_COLOUR;
}
//temp_s1 = phi_s1 + 1;
//phi_s1 = temp_s1;
//phi_a0 = phi_a0_3;
//phi_a1_2 = phi_a1_4;
} //while (temp_s1 != phi_s0);
//temp_s0 = phi_s0 - 1;
//phi_s2 += 1;
//phi_s0 = temp_s0;
//phi_a0_2 = phi_a0;
//phi_a1_3 = phi_a1_2;
//i--;
} //while (temp_s0 != 44);
}
}
}
osWritebackDCacheAll();
osViSwapBuffer(framebuffer);
}

View File

@ -3,7 +3,7 @@
#include <PR/gbi.h>
extern s32 D_02007B38[];
extern Vtx D_02007B38[];
extern Gfx D_02007650[];
extern Gfx D_020076B0[];

View File

@ -269,25 +269,15 @@ Gfx D_02007B18[] = {
gsSPEndDisplayList(),
};
// gfx data?
UNUSED s32 D_02007B38[] = {
0x00000000, 0x00000000,
0x00000000, 0xffffffff,
0x00100000, 0x00000000,
0x00000000, 0xffffffff,
0x00100010, 0x00000000,
0x00000000, 0xffffffff,
0x00000010, 0x00000000,
0x00000000, 0xffffffff,
0x0000fff8, 0x00000000,
0x00000000, 0xffffffff,
0x0008fff8, 0x00000000,
0x01c00000, 0xffffffff,
0x00080000, 0x00000000,
0x01c001c0, 0xff0000ff,
0x00000000, 0x00000000,
0x000001c0, 0xff0000ff,
UNUSED Vtx D_02007B38[] = {
{{{ 0, 0, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ 16, 0, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ 16, 16, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ 0, 16, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ 0, -8, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ 8, -8, 0}, 0, {448, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ 8, 0, 0}, 0, {448, 448}, {0xff, 0x00, 0x00, 0xff}}},
{{{ 0, 0, 0}, 0, { 0, 448}, {0xff, 0x00, 0x00, 0xff}}},
};
// Todo: Place all theces vertices in a single array

File diff suppressed because it is too large Load Diff