Various cleanup and matching (#369)

* More podium_ceremony_actors documentation

* Updated progress script

* Various matches and cleanup
This commit is contained in:
MegaMech 2023-08-12 15:19:57 -06:00 committed by GitHub
parent 608ffd4550
commit 569bafc48b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 194 additions and 824 deletions

View File

@ -1,166 +0,0 @@
glabel func_8028F970
/* 0F8F80 8028F970 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 0F8F84 8028F974 3C0E8016 */ lui $t6, %hi(D_8015F890) # $t6, 0x8016
/* 0F8F88 8028F978 95CEF890 */ lhu $t6, %lo(D_8015F890)($t6)
/* 0F8F8C 8028F97C AFBF0024 */ sw $ra, 0x24($sp)
/* 0F8F90 8028F980 AFB30020 */ sw $s3, 0x20($sp)
/* 0F8F94 8028F984 AFB2001C */ sw $s2, 0x1c($sp)
/* 0F8F98 8028F988 AFB10018 */ sw $s1, 0x18($sp)
/* 0F8F9C 8028F98C 15C0008A */ bnez $t6, .L8028FBB8
/* 0F8FA0 8028F990 AFB00014 */ sw $s0, 0x14($sp)
/* 0F8FA4 8028F994 3C13800F */ lui $s3, %hi(gPlayers) # $s3, 0x800f
/* 0F8FA8 8028F998 3C11800E */ lui $s1, %hi(D_800DC5A8) # $s1, 0x800e
/* 0F8FAC 8028F99C 2631C5A8 */ addiu $s1, %lo(D_800DC5A8) # addiu $s1, $s1, -0x3a58
/* 0F8FB0 8028F9A0 26736990 */ addiu $s3, %lo(gPlayers) # addiu $s3, $s3, 0x6990
/* 0F8FB4 8028F9A4 00009025 */ move $s2, $zero
.L8028F9A8:
/* 0F8FB8 8028F9A8 96620000 */ lhu $v0, ($s3)
/* 0F8FBC 8028F9AC 304F4000 */ andi $t7, $v0, 0x4000
/* 0F8FC0 8028F9B0 11E00056 */ beqz $t7, .L8028FB0C
/* 0F8FC4 8028F9B4 30581000 */ andi $t8, $v0, 0x1000
/* 0F8FC8 8028F9B8 17000054 */ bnez $t8, .L8028FB0C
/* 0F8FCC 8028F9BC 0012C900 */ sll $t9, $s2, 4
/* 0F8FD0 8028F9C0 3C09800E */ lui $t1, %hi(gActiveScreenMode) # $t1, 0x800e
/* 0F8FD4 8028F9C4 8D29C52C */ lw $t1, %lo(gActiveScreenMode)($t1)
/* 0F8FD8 8028F9C8 3C08800F */ lui $t0, %hi(gControllers) # $t0, 0x800f
/* 0F8FDC 8028F9CC 25086910 */ addiu $t0, %lo(gControllers) # addiu $t0, $t0, 0x6910
/* 0F8FE0 8028F9D0 24010003 */ li $at, 3
/* 0F8FE4 8028F9D4 11210017 */ beq $t1, $at, .L8028FA34
/* 0F8FE8 8028F9D8 03288021 */ addu $s0, $t9, $t0
/* 0F8FEC 8028F9DC 96020006 */ lhu $v0, 6($s0)
/* 0F8FF0 8028F9E0 304A0020 */ andi $t2, $v0, 0x20
/* 0F8FF4 8028F9E4 51400014 */ beql $t2, $zero, .L8028FA38
/* 0F8FF8 8028F9E8 96190006 */ lhu $t9, 6($s0)
/* 0F8FFC 8028F9EC 960B0004 */ lhu $t3, 4($s0)
/* 0F9000 8028F9F0 304DFFDF */ andi $t5, $v0, 0xffdf
/* 0F9004 8028F9F4 3C044900 */ lui $a0, (0x4900801C >> 16) # lui $a0, 0x4900
/* 0F9008 8028F9F8 316C0010 */ andi $t4, $t3, 0x10
/* 0F900C 8028F9FC 5580000E */ bnel $t4, $zero, .L8028FA38
/* 0F9010 8028FA00 96190006 */ lhu $t9, 6($s0)
/* 0F9014 8028FA04 A60D0006 */ sh $t5, 6($s0)
/* 0F9018 8028FA08 962E0000 */ lhu $t6, ($s1)
/* 0F901C 8028FA0C 25CF0001 */ addiu $t7, $t6, 1
/* 0F9020 8028FA10 31F8FFFF */ andi $t8, $t7, 0xffff
/* 0F9024 8028FA14 2B010003 */ slti $at, $t8, 3
/* 0F9028 8028FA18 14200002 */ bnez $at, .L8028FA24
/* 0F902C 8028FA1C A62F0000 */ sh $t7, ($s1)
/* 0F9030 8028FA20 A6200000 */ sh $zero, ($s1)
.L8028FA24:
/* 0F9034 8028FA24 0C032384 */ jal play_sound2
/* 0F9038 8028FA28 3484801C */ ori $a0, (0x4900801C & 0xFFFF) # ori $a0, $a0, 0x801c
/* 0F903C 8028FA2C 0C000A6C */ jal func_800029B0
/* 0F9040 8028FA30 00000000 */ nop
.L8028FA34:
/* 0F9044 8028FA34 96190006 */ lhu $t9, 6($s0)
.L8028FA38:
/* 0F9048 8028FA38 33281000 */ andi $t0, $t9, 0x1000
/* 0F904C 8028FA3C 51000034 */ beql $t0, $zero, .L8028FB10
/* 0F9050 8028FA40 26520001 */ addiu $s2, $s2, 1
/* 0F9054 8028FA44 96020004 */ lhu $v0, 4($s0)
/* 0F9058 8028FA48 30490010 */ andi $t1, $v0, 0x10
/* 0F905C 8028FA4C 1520002F */ bnez $t1, .L8028FB0C
/* 0F9060 8028FA50 304A0020 */ andi $t2, $v0, 0x20
/* 0F9064 8028FA54 5540002E */ bnel $t2, $zero, .L8028FB10
/* 0F9068 8028FA58 26520001 */ addiu $s2, $s2, 1
/* 0F906C 8028FA5C 0C0A37C0 */ jal func_8028DF00
/* 0F9070 8028FA60 00000000 */ nop
/* 0F9074 8028FA64 3C0B800E */ lui $t3, %hi(gControllerOne) # $t3, 0x800e
/* 0F9078 8028FA68 8D6BC4BC */ lw $t3, %lo(gControllerOne)($t3)
/* 0F907C 8028FA6C 3C01800E */ lui $at, %hi(gIsGamePaused) # $at, 0x800e
/* 0F9080 8028FA70 24040001 */ li $a0, 1
/* 0F9084 8028FA74 020B6023 */ subu $t4, $s0, $t3
/* 0F9088 8028FA78 000C6903 */ sra $t5, $t4, 4
/* 0F908C 8028FA7C 25AE0001 */ addiu $t6, $t5, 1
/* 0F9090 8028FA80 A42EC5FC */ sh $t6, %lo(gIsGamePaused)($at)
/* 0F9094 8028FA84 0C0327E4 */ jal func_800C9F90
/* 0F9098 8028FA88 A6000006 */ sh $zero, 6($s0)
/* 0F909C 8028FA8C 3C0F800E */ lui $t7, %hi(gModeSelection) # $t7, 0x800e
/* 0F90A0 8028FA90 8DEFC53C */ lw $t7, %lo(gModeSelection)($t7)
/* 0F90A4 8028FA94 24020001 */ li $v0, 1
/* 0F90A8 8028FA98 3C018016 */ lui $at, %hi(D_80162DF0) # $at, 0x8016
/* 0F90AC 8028FA9C 144F0046 */ bne $v0, $t7, .L8028FBB8
/* 0F90B0 8028FAA0 AC222DF0 */ sw $v0, %lo(D_80162DF0)($at)
/* 0F90B4 8028FAA4 3C04800E */ lui $a0, %hi(gPlayerOne) # $a0, 0x800e
/* 0F90B8 8028FAA8 8C84C4DC */ lw $a0, %lo(gPlayerOne)($a0)
/* 0F90BC 8028FAAC 94980000 */ lhu $t8, ($a0)
/* 0F90C0 8028FAB0 33198100 */ andi $t9, $t8, 0x8100
/* 0F90C4 8028FAB4 13200003 */ beqz $t9, .L8028FAC4
/* 0F90C8 8028FAB8 00000000 */ nop
/* 0F90CC 8028FABC 0C0016BA */ jal func_80005AE8
/* 0F90D0 8028FAC0 00000000 */ nop
.L8028FAC4:
/* 0F90D4 8028FAC4 3C04800E */ lui $a0, %hi(gPlayerTwo) # $a0, 0x800e
/* 0F90D8 8028FAC8 8C84C4E0 */ lw $a0, %lo(gPlayerTwo)($a0)
/* 0F90DC 8028FACC 94880000 */ lhu $t0, ($a0)
/* 0F90E0 8028FAD0 31098100 */ andi $t1, $t0, 0x8100
/* 0F90E4 8028FAD4 11200003 */ beqz $t1, .L8028FAE4
/* 0F90E8 8028FAD8 00000000 */ nop
/* 0F90EC 8028FADC 0C0016BA */ jal func_80005AE8
/* 0F90F0 8028FAE0 00000000 */ nop
.L8028FAE4:
/* 0F90F4 8028FAE4 3C04800E */ lui $a0, %hi(gPlayerThree) # $a0, 0x800e
/* 0F90F8 8028FAE8 8C84C4E4 */ lw $a0, %lo(gPlayerThree)($a0)
/* 0F90FC 8028FAEC 948A0000 */ lhu $t2, ($a0)
/* 0F9100 8028FAF0 314B8100 */ andi $t3, $t2, 0x8100
/* 0F9104 8028FAF4 51600031 */ beql $t3, $zero, .L8028FBBC
/* 0F9108 8028FAF8 8FBF0024 */ lw $ra, 0x24($sp)
/* 0F910C 8028FAFC 0C0016BA */ jal func_80005AE8
/* 0F9110 8028FB00 00000000 */ nop
/* 0F9114 8028FB04 1000002D */ b .L8028FBBC
/* 0F9118 8028FB08 8FBF0024 */ lw $ra, 0x24($sp)
.L8028FB0C:
/* 0F911C 8028FB0C 26520001 */ addiu $s2, $s2, 1
.L8028FB10:
/* 0F9120 8028FB10 24010004 */ li $at, 4
/* 0F9124 8028FB14 1641FFA4 */ bne $s2, $at, .L8028F9A8
/* 0F9128 8028FB18 26730DD8 */ addiu $s3, $s3, 0xdd8
/* 0F912C 8028FB1C 3C0C800E */ lui $t4, %hi(gEnableDebugMode) # $t4, 0x800e
/* 0F9130 8028FB20 958CC520 */ lhu $t4, %lo(gEnableDebugMode)($t4)
/* 0F9134 8028FB24 3C0D800E */ lui $t5, %hi(gModeSelection) # $t5, 0x800e
/* 0F9138 8028FB28 51800024 */ beql $t4, $zero, .L8028FBBC
/* 0F913C 8028FB2C 8FBF0024 */ lw $ra, 0x24($sp)
/* 0F9140 8028FB30 8DADC53C */ lw $t5, %lo(gModeSelection)($t5)
/* 0F9144 8028FB34 24010003 */ li $at, 3
/* 0F9148 8028FB38 3C05800E */ lui $a1, %hi(gControllerOne) # $a1, 0x800e
/* 0F914C 8028FB3C 51A1001F */ beql $t5, $at, .L8028FBBC
/* 0F9150 8028FB40 8FBF0024 */ lw $ra, 0x24($sp)
/* 0F9154 8028FB44 8CA5C4BC */ lw $a1, %lo(gControllerOne)($a1)
/* 0F9158 8028FB48 3C028016 */ lui $v0, %hi(gLapCountByPlayerId) # $v0, 0x8016
/* 0F915C 8028FB4C 24424390 */ addiu $v0, %lo(gLapCountByPlayerId) # addiu $v0, $v0, 0x4390
/* 0F9160 8028FB50 94A40006 */ lhu $a0, 6($a1)
/* 0F9164 8028FB54 24030002 */ li $v1, 2
/* 0F9168 8028FB58 308E0800 */ andi $t6, $a0, 0x800
/* 0F916C 8028FB5C 11C00003 */ beqz $t6, .L8028FB6C
/* 0F9170 8028FB60 00000000 */ nop
/* 0F9174 8028FB64 AC430000 */ sw $v1, ($v0)
/* 0F9178 8028FB68 94A40006 */ lhu $a0, 6($a1)
.L8028FB6C:
/* 0F917C 8028FB6C 3C028016 */ lui $v0, %hi(gLapCountByPlayerId) # $v0, 0x8016
/* 0F9180 8028FB70 308F0100 */ andi $t7, $a0, 0x100
/* 0F9184 8028FB74 24424390 */ addiu $v0, %lo(gLapCountByPlayerId) # addiu $v0, $v0, 0x4390
/* 0F9188 8028FB78 11E00004 */ beqz $t7, .L8028FB8C
/* 0F918C 8028FB7C 24030002 */ li $v1, 2
/* 0F9190 8028FB80 AC430000 */ sw $v1, ($v0)
/* 0F9194 8028FB84 AC430004 */ sw $v1, 4($v0)
/* 0F9198 8028FB88 94A40006 */ lhu $a0, 6($a1)
.L8028FB8C:
/* 0F919C 8028FB8C 30980400 */ andi $t8, $a0, 0x400
/* 0F91A0 8028FB90 5300000A */ beql $t8, $zero, .L8028FBBC
/* 0F91A4 8028FB94 8FBF0024 */ lw $ra, 0x24($sp)
/* 0F91A8 8028FB98 AC430000 */ sw $v1, ($v0)
/* 0F91AC 8028FB9C AC430004 */ sw $v1, 4($v0)
/* 0F91B0 8028FBA0 AC430008 */ sw $v1, 8($v0)
/* 0F91B4 8028FBA4 AC43000C */ sw $v1, 0xc($v0)
/* 0F91B8 8028FBA8 AC430010 */ sw $v1, 0x10($v0)
/* 0F91BC 8028FBAC AC430014 */ sw $v1, 0x14($v0)
/* 0F91C0 8028FBB0 AC430018 */ sw $v1, 0x18($v0)
/* 0F91C4 8028FBB4 AC43001C */ sw $v1, 0x1c($v0)
.L8028FBB8:
/* 0F91C8 8028FBB8 8FBF0024 */ lw $ra, 0x24($sp)
.L8028FBBC:
/* 0F91CC 8028FBBC 8FB00014 */ lw $s0, 0x14($sp)
/* 0F91D0 8028FBC0 8FB10018 */ lw $s1, 0x18($sp)
/* 0F91D4 8028FBC4 8FB2001C */ lw $s2, 0x1c($sp)
/* 0F91D8 8028FBC8 8FB30020 */ lw $s3, 0x20($sp)
/* 0F91DC 8028FBCC 03E00008 */ jr $ra
/* 0F91E0 8028FBD0 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,423 +0,0 @@
.section .late_rodata
glabel D_802B92A0
.float 0.1
glabel D_802B92A4
.float 0.2
glabel D_802B92A8
.float 0.55
.word 0x00000000
glabel D_802B92B0
.double 0.85
.section .text
glabel func_802903D8
/* 0F99E8 802903D8 27BDFF88 */ addiu $sp, $sp, -0x78
/* 0F99EC 802903DC AFBF0014 */ sw $ra, 0x14($sp)
/* 0F99F0 802903E0 C4A60070 */ lwc1 $f6, 0x70($a1)
/* 0F99F4 802903E4 C4840070 */ lwc1 $f4, 0x70($a0)
/* 0F99F8 802903E8 3C0140A0 */ li $at, 0x40A00000 # 5.000000
/* 0F99FC 802903EC 44815000 */ mtc1 $at, $f10
/* 0F9A00 802903F0 46062200 */ add.s $f8, $f4, $f6
/* 0F9A04 802903F4 3C0E802C */ lui $t6, %hi(gFloatArray802B8790) # $t6, 0x802c
/* 0F9A08 802903F8 25CE8790 */ addiu $t6, %lo(gFloatArray802B8790) # addiu $t6, $t6, -0x7870
/* 0F9A0C 802903FC 27A20028 */ addiu $v0, $sp, 0x28
/* 0F9A10 80290400 460A4101 */ sub.s $f4, $f8, $f10
/* 0F9A14 80290404 00803825 */ move $a3, $a0
/* 0F9A18 80290408 00A03025 */ move $a2, $a1
/* 0F9A1C 8029040C E7A40074 */ swc1 $f4, 0x74($sp)
/* 0F9A20 80290410 8DC10000 */ lw $at, ($t6)
/* 0F9A24 80290414 AC410000 */ sw $at, ($v0)
/* 0F9A28 80290418 8DD90004 */ lw $t9, 4($t6)
/* 0F9A2C 8029041C AC590004 */ sw $t9, 4($v0)
/* 0F9A30 80290420 8DC10008 */ lw $at, 8($t6)
/* 0F9A34 80290424 AC410008 */ sw $at, 8($v0)
/* 0F9A38 80290428 8DD9000C */ lw $t9, 0xc($t6)
/* 0F9A3C 8029042C AC59000C */ sw $t9, 0xc($v0)
/* 0F9A40 80290430 8DC10010 */ lw $at, 0x10($t6)
/* 0F9A44 80290434 AC410010 */ sw $at, 0x10($v0)
/* 0F9A48 80290438 8DD90014 */ lw $t9, 0x14($t6)
/* 0F9A4C 8029043C AC590014 */ sw $t9, 0x14($v0)
/* 0F9A50 80290440 8DC10018 */ lw $at, 0x18($t6)
/* 0F9A54 80290444 AC410018 */ sw $at, 0x18($v0)
/* 0F9A58 80290448 8DD9001C */ lw $t9, 0x1c($t6)
/* 0F9A5C 8029044C 3C01802C */ lui $at, %hi(D_802B92A0) # $at, 0x802c
/* 0F9A60 80290450 AC59001C */ sw $t9, 0x1c($v0)
/* 0F9A64 80290454 94880254 */ lhu $t0, 0x254($a0)
/* 0F9A68 80290458 00084880 */ sll $t1, $t0, 2
/* 0F9A6C 8029045C 00495021 */ addu $t2, $v0, $t1
/* 0F9A70 80290460 C5460000 */ lwc1 $f6, ($t2)
/* 0F9A74 80290464 E7A60024 */ swc1 $f6, 0x24($sp)
/* 0F9A78 80290468 94AB0254 */ lhu $t3, 0x254($a1)
/* 0F9A7C 8029046C 000B6080 */ sll $t4, $t3, 2
/* 0F9A80 80290470 004C6821 */ addu $t5, $v0, $t4
/* 0F9A84 80290474 C5A80000 */ lwc1 $f8, ($t5)
/* 0F9A88 80290478 E7A80020 */ swc1 $f8, 0x20($sp)
/* 0F9A8C 8029047C C4A40014 */ lwc1 $f4, 0x14($a1)
/* 0F9A90 80290480 C48A0014 */ lwc1 $f10, 0x14($a0)
/* 0F9A94 80290484 46045181 */ sub.s $f6, $f10, $f4
/* 0F9A98 80290488 E7A60060 */ swc1 $f6, 0x60($sp)
/* 0F9A9C 8029048C C48A0070 */ lwc1 $f10, 0x70($a0)
/* 0F9AA0 80290490 C4880018 */ lwc1 $f8, 0x18($a0)
/* 0F9AA4 80290494 C4A60018 */ lwc1 $f6, 0x18($a1)
/* 0F9AA8 80290498 460A4101 */ sub.s $f4, $f8, $f10
/* 0F9AAC 8029049C C4A80070 */ lwc1 $f8, 0x70($a1)
/* 0F9AB0 802904A0 46083281 */ sub.s $f10, $f6, $f8
/* 0F9AB4 802904A4 460A2181 */ sub.s $f6, $f4, $f10
/* 0F9AB8 802904A8 E7A60064 */ swc1 $f6, 0x64($sp)
/* 0F9ABC 802904AC C4A4001C */ lwc1 $f4, 0x1c($a1)
/* 0F9AC0 802904B0 C488001C */ lwc1 $f8, 0x1c($a0)
/* 0F9AC4 802904B4 46044281 */ sub.s $f10, $f8, $f4
/* 0F9AC8 802904B8 E7AA0068 */ swc1 $f10, 0x68($sp)
/* 0F9ACC 802904BC C4840034 */ lwc1 $f4, 0x34($a0)
/* 0F9AD0 802904C0 C4A80034 */ lwc1 $f8, 0x34($a1)
/* 0F9AD4 802904C4 46044281 */ sub.s $f10, $f8, $f4
/* 0F9AD8 802904C8 E7AA0054 */ swc1 $f10, 0x54($sp)
/* 0F9ADC 802904CC C4840038 */ lwc1 $f4, 0x38($a0)
/* 0F9AE0 802904D0 C4A80038 */ lwc1 $f8, 0x38($a1)
/* 0F9AE4 802904D4 46044281 */ sub.s $f10, $f8, $f4
/* 0F9AE8 802904D8 E7AA0058 */ swc1 $f10, 0x58($sp)
/* 0F9AEC 802904DC C484003C */ lwc1 $f4, 0x3c($a0)
/* 0F9AF0 802904E0 C4A8003C */ lwc1 $f8, 0x3c($a1)
/* 0F9AF4 802904E4 46044281 */ sub.s $f10, $f8, $f4
/* 0F9AF8 802904E8 46063202 */ mul.s $f8, $f6, $f6
/* 0F9AFC 802904EC C7A40060 */ lwc1 $f4, 0x60($sp)
/* 0F9B00 802904F0 E7AA005C */ swc1 $f10, 0x5c($sp)
/* 0F9B04 802904F4 46042282 */ mul.s $f10, $f4, $f4
/* 0F9B08 802904F8 C7A40068 */ lwc1 $f4, 0x68($sp)
/* 0F9B0C 802904FC 46085180 */ add.s $f6, $f10, $f8
/* 0F9B10 80290500 46042282 */ mul.s $f10, $f4, $f4
/* 0F9B14 80290504 C42892A0 */ lwc1 $f8, %lo(D_802B92A0)($at)
/* 0F9B18 80290508 C7A40074 */ lwc1 $f4, 0x74($sp)
/* 0F9B1C 8029050C 46065000 */ add.s $f0, $f10, $f6
/* 0F9B20 80290510 46000004 */ sqrt.s $f0, $f0
/* 0F9B24 80290514 4608003C */ c.lt.s $f0, $f8
/* 0F9B28 80290518 46000386 */ mov.s $f14, $f0
/* 0F9B2C 8029051C 45030131 */ bc1tl .L802909E4
/* 0F9B30 80290520 8FBF0014 */ lw $ra, 0x14($sp)
/* 0F9B34 80290524 4600203C */ c.lt.s $f4, $f0
/* 0F9B38 80290528 00000000 */ nop
/* 0F9B3C 8029052C 4503012D */ bc1tl .L802909E4
/* 0F9B40 80290530 8FBF0014 */ lw $ra, 0x14($sp)
/* 0F9B44 80290534 94980000 */ lhu $t8, ($a0)
/* 0F9B48 80290538 330F0040 */ andi $t7, $t8, 0x40
/* 0F9B4C 8029053C 51E0002F */ beql $t7, $zero, .L802905FC
/* 0F9B50 80290540 94CE0000 */ lhu $t6, ($a2)
/* 0F9B54 80290544 94AE0000 */ lhu $t6, ($a1)
/* 0F9B58 80290548 31D90040 */ andi $t9, $t6, 0x40
/* 0F9B5C 8029054C 53200013 */ beql $t9, $zero, .L8029059C
/* 0F9B60 80290550 8CCB000C */ lw $t3, 0xc($a2)
/* 0F9B64 80290554 0C023F07 */ jal func_8008FC1C
/* 0F9B68 80290558 AFA5007C */ sw $a1, 0x7c($sp)
/* 0F9B6C 8029055C 0C023F07 */ jal func_8008FC1C
/* 0F9B70 80290560 8FA4007C */ lw $a0, 0x7c($sp)
/* 0F9B74 80290564 3C08800E */ lui $t0, %hi(gPlayerOne) # $t0, 0x800e
/* 0F9B78 80290568 8FA6007C */ lw $a2, 0x7c($sp)
/* 0F9B7C 8029056C 8D08C4DC */ lw $t0, %lo(gPlayerOne)($t0)
/* 0F9B80 80290570 24010DD8 */ li $at, 3544
/* 0F9B84 80290574 3C051900 */ lui $a1, (0x19008001 >> 16) # lui $a1, 0x1900
/* 0F9B88 80290578 00C82023 */ subu $a0, $a2, $t0
/* 0F9B8C 8029057C 0081001A */ div $zero, $a0, $at
/* 0F9B90 80290580 00004812 */ mflo $t1
/* 0F9B94 80290584 312400FF */ andi $a0, $t1, 0xff
/* 0F9B98 80290588 0C032418 */ jal func_800C9060
/* 0F9B9C 8029058C 34A58001 */ ori $a1, (0x19008001 & 0xFFFF) # ori $a1, $a1, 0x8001
/* 0F9BA0 80290590 10000114 */ b .L802909E4
/* 0F9BA4 80290594 8FBF0014 */ lw $ra, 0x14($sp)
/* 0F9BA8 80290598 8CCB000C */ lw $t3, 0xc($a2)
.L8029059C:
/* 0F9BAC 8029059C 3C010040 */ lui $at, 0x40
/* 0F9BB0 802905A0 00E02025 */ move $a0, $a3
/* 0F9BB4 802905A4 01616025 */ or $t4, $t3, $at
/* 0F9BB8 802905A8 ACCC000C */ sw $t4, 0xc($a2)
/* 0F9BBC 802905AC E7AE0070 */ swc1 $f14, 0x70($sp)
/* 0F9BC0 802905B0 AFA70078 */ sw $a3, 0x78($sp)
/* 0F9BC4 802905B4 0C023F07 */ jal func_8008FC1C
/* 0F9BC8 802905B8 AFA6007C */ sw $a2, 0x7c($sp)
/* 0F9BCC 802905BC 3C0D800E */ lui $t5, %hi(gPlayerOne) # $t5, 0x800e
/* 0F9BD0 802905C0 8FA6007C */ lw $a2, 0x7c($sp)
/* 0F9BD4 802905C4 8DADC4DC */ lw $t5, %lo(gPlayerOne)($t5)
/* 0F9BD8 802905C8 24010DD8 */ li $at, 3544
/* 0F9BDC 802905CC 3C051900 */ lui $a1, (0x19008001 >> 16) # lui $a1, 0x1900
/* 0F9BE0 802905D0 00CD2023 */ subu $a0, $a2, $t5
/* 0F9BE4 802905D4 0081001A */ div $zero, $a0, $at
/* 0F9BE8 802905D8 0000C012 */ mflo $t8
/* 0F9BEC 802905DC 330400FF */ andi $a0, $t8, 0xff
/* 0F9BF0 802905E0 0C032418 */ jal func_800C9060
/* 0F9BF4 802905E4 34A58001 */ ori $a1, (0x19008001 & 0xFFFF) # ori $a1, $a1, 0x8001
/* 0F9BF8 802905E8 8FA6007C */ lw $a2, 0x7c($sp)
/* 0F9BFC 802905EC 8FA70078 */ lw $a3, 0x78($sp)
/* 0F9C00 802905F0 10000019 */ b .L80290658
/* 0F9C04 802905F4 C7AE0070 */ lwc1 $f14, 0x70($sp)
/* 0F9C08 802905F8 94CE0000 */ lhu $t6, ($a2)
.L802905FC:
/* 0F9C0C 802905FC 31D90040 */ andi $t9, $t6, 0x40
/* 0F9C10 80290600 53200016 */ beql $t9, $zero, .L8029065C
/* 0F9C14 80290604 8CE200BC */ lw $v0, 0xbc($a3)
/* 0F9C18 80290608 8CE8000C */ lw $t0, 0xc($a3)
/* 0F9C1C 8029060C 3C010040 */ lui $at, 0x40
/* 0F9C20 80290610 00C02025 */ move $a0, $a2
/* 0F9C24 80290614 01014825 */ or $t1, $t0, $at
/* 0F9C28 80290618 ACE9000C */ sw $t1, 0xc($a3)
/* 0F9C2C 8029061C 0C023F07 */ jal func_8008FC1C
/* 0F9C30 80290620 AFA70078 */ sw $a3, 0x78($sp)
/* 0F9C34 80290624 3C0A800E */ lui $t2, %hi(gPlayerOne) # $t2, 0x800e
/* 0F9C38 80290628 8FA70078 */ lw $a3, 0x78($sp)
/* 0F9C3C 8029062C 8D4AC4DC */ lw $t2, %lo(gPlayerOne)($t2)
/* 0F9C40 80290630 24010DD8 */ li $at, 3544
/* 0F9C44 80290634 3C051900 */ lui $a1, (0x19008001 >> 16) # lui $a1, 0x1900
/* 0F9C48 80290638 00EA2023 */ subu $a0, $a3, $t2
/* 0F9C4C 8029063C 0081001A */ div $zero, $a0, $at
/* 0F9C50 80290640 00005812 */ mflo $t3
/* 0F9C54 80290644 316400FF */ andi $a0, $t3, 0xff
/* 0F9C58 80290648 0C032418 */ jal func_800C9060
/* 0F9C5C 8029064C 34A58001 */ ori $a1, (0x19008001 & 0xFFFF) # ori $a1, $a1, 0x8001
/* 0F9C60 80290650 100000E4 */ b .L802909E4
/* 0F9C64 80290654 8FBF0014 */ lw $ra, 0x14($sp)
.L80290658:
/* 0F9C68 80290658 8CE200BC */ lw $v0, 0xbc($a3)
.L8029065C:
/* 0F9C6C 8029065C 304D0200 */ andi $t5, $v0, 0x200
/* 0F9C70 80290660 51A0000B */ beql $t5, $zero, .L80290690
/* 0F9C74 80290664 8CC800BC */ lw $t0, 0xbc($a2)
/* 0F9C78 80290668 8CD800BC */ lw $t8, 0xbc($a2)
/* 0F9C7C 8029066C 330F0200 */ andi $t7, $t8, 0x200
/* 0F9C80 80290670 55E00015 */ bnel $t7, $zero, .L802906C8
/* 0F9C84 80290674 C7A20054 */ lwc1 $f2, 0x54($sp)
/* 0F9C88 80290678 8CCE000C */ lw $t6, 0xc($a2)
/* 0F9C8C 8029067C 3C010100 */ lui $at, 0x100
/* 0F9C90 80290680 01C1C825 */ or $t9, $t6, $at
/* 0F9C94 80290684 1000000F */ b .L802906C4
/* 0F9C98 80290688 ACD9000C */ sw $t9, 0xc($a2)
/* 0F9C9C 8029068C 8CC800BC */ lw $t0, 0xbc($a2)
.L80290690:
/* 0F9CA0 80290690 344C8000 */ ori $t4, $v0, 0x8000
/* 0F9CA4 80290694 31090200 */ andi $t1, $t0, 0x200
/* 0F9CA8 80290698 51200007 */ beql $t1, $zero, .L802906B8
/* 0F9CAC 8029069C ACEC00BC */ sw $t4, 0xbc($a3)
/* 0F9CB0 802906A0 8CEA000C */ lw $t2, 0xc($a3)
/* 0F9CB4 802906A4 3C010100 */ lui $at, 0x100
/* 0F9CB8 802906A8 01415825 */ or $t3, $t2, $at
/* 0F9CBC 802906AC 10000005 */ b .L802906C4
/* 0F9CC0 802906B0 ACEB000C */ sw $t3, 0xc($a3)
/* 0F9CC4 802906B4 ACEC00BC */ sw $t4, 0xbc($a3)
.L802906B8:
/* 0F9CC8 802906B8 8CCD00BC */ lw $t5, 0xbc($a2)
/* 0F9CCC 802906BC 35B88000 */ ori $t8, $t5, 0x8000
/* 0F9CD0 802906C0 ACD800BC */ sw $t8, 0xbc($a2)
.L802906C4:
/* 0F9CD4 802906C4 C7A20054 */ lwc1 $f2, 0x54($sp)
.L802906C8:
/* 0F9CD8 802906C8 C7AC0058 */ lwc1 $f12, 0x58($sp)
/* 0F9CDC 802906CC C7B0005C */ lwc1 $f16, 0x5c($sp)
/* 0F9CE0 802906D0 46021282 */ mul.s $f10, $f2, $f2
/* 0F9CE4 802906D4 3C01802C */ lui $at, %hi(D_802B92A4) # $at, 0x802c
/* 0F9CE8 802906D8 460C6182 */ mul.s $f6, $f12, $f12
/* 0F9CEC 802906DC 46065200 */ add.s $f8, $f10, $f6
/* 0F9CF0 802906E0 46108102 */ mul.s $f4, $f16, $f16
/* 0F9CF4 802906E4 C7AA0060 */ lwc1 $f10, 0x60($sp)
/* 0F9CF8 802906E8 460E5183 */ div.s $f6, $f10, $f14
/* 0F9CFC 802906EC C7AA0068 */ lwc1 $f10, 0x68($sp)
/* 0F9D00 802906F0 46082000 */ add.s $f0, $f4, $f8
/* 0F9D04 802906F4 C7A40064 */ lwc1 $f4, 0x64($sp)
/* 0F9D08 802906F8 46000004 */ sqrt.s $f0, $f0
/* 0F9D0C 802906FC E7A60060 */ swc1 $f6, 0x60($sp)
/* 0F9D10 80290700 460E2203 */ div.s $f8, $f4, $f14
/* 0F9D14 80290704 460E5103 */ div.s $f4, $f10, $f14
/* 0F9D18 80290708 E7A80064 */ swc1 $f8, 0x64($sp)
/* 0F9D1C 8029070C C42892A4 */ lwc1 $f8, %lo(D_802B92A4)($at)
/* 0F9D20 80290710 4608003C */ c.lt.s $f0, $f8
/* 0F9D24 80290714 00000000 */ nop
/* 0F9D28 80290718 45000025 */ bc1f .L802907B0
/* 0F9D2C 8029071C E7A40068 */ swc1 $f4, 0x68($sp)
/* 0F9D30 80290720 C4EA0070 */ lwc1 $f10, 0x70($a3)
/* 0F9D34 80290724 C4C40070 */ lwc1 $f4, 0x70($a2)
/* 0F9D38 80290728 3C01802C */ lui $at, %hi(D_802B92A8) # $at, 0x802c
/* 0F9D3C 8029072C 46045200 */ add.s $f8, $f10, $f4
/* 0F9D40 80290730 C42A92A8 */ lwc1 $f10, %lo(D_802B92A8)($at)
/* 0F9D44 80290734 460A4382 */ mul.s $f14, $f8, $f10
/* 0F9D48 80290738 C4C80014 */ lwc1 $f8, 0x14($a2)
/* 0F9D4C 8029073C 460E3102 */ mul.s $f4, $f6, $f14
/* 0F9D50 80290740 46082280 */ add.s $f10, $f4, $f8
/* 0F9D54 80290744 E4EA0014 */ swc1 $f10, 0x14($a3)
/* 0F9D58 80290748 C7A60064 */ lwc1 $f6, 0x64($sp)
/* 0F9D5C 8029074C C4C80018 */ lwc1 $f8, 0x18($a2)
/* 0F9D60 80290750 460E3102 */ mul.s $f4, $f6, $f14
/* 0F9D64 80290754 46082280 */ add.s $f10, $f4, $f8
/* 0F9D68 80290758 E4EA0018 */ swc1 $f10, 0x18($a3)
/* 0F9D6C 8029075C C7A60068 */ lwc1 $f6, 0x68($sp)
/* 0F9D70 80290760 C4C8001C */ lwc1 $f8, 0x1c($a2)
/* 0F9D74 80290764 460E3102 */ mul.s $f4, $f6, $f14
/* 0F9D78 80290768 46082280 */ add.s $f10, $f4, $f8
/* 0F9D7C 8029076C E4EA001C */ swc1 $f10, 0x1c($a3)
/* 0F9D80 80290770 C7A40060 */ lwc1 $f4, 0x60($sp)
/* 0F9D84 80290774 C4C60014 */ lwc1 $f6, 0x14($a2)
/* 0F9D88 80290778 46047202 */ mul.s $f8, $f14, $f4
/* 0F9D8C 8029077C C4C40018 */ lwc1 $f4, 0x18($a2)
/* 0F9D90 80290780 46083281 */ sub.s $f10, $f6, $f8
/* 0F9D94 80290784 E4CA0014 */ swc1 $f10, 0x14($a2)
/* 0F9D98 80290788 C7A60064 */ lwc1 $f6, 0x64($sp)
/* 0F9D9C 8029078C 46067202 */ mul.s $f8, $f14, $f6
/* 0F9DA0 80290790 C4C6001C */ lwc1 $f6, 0x1c($a2)
/* 0F9DA4 80290794 46082281 */ sub.s $f10, $f4, $f8
/* 0F9DA8 80290798 E4CA0018 */ swc1 $f10, 0x18($a2)
/* 0F9DAC 8029079C C7A40068 */ lwc1 $f4, 0x68($sp)
/* 0F9DB0 802907A0 46047202 */ mul.s $f8, $f14, $f4
/* 0F9DB4 802907A4 46083281 */ sub.s $f10, $f6, $f8
/* 0F9DB8 802907A8 1000008D */ b .L802909E0
/* 0F9DBC 802907AC E4CA001C */ swc1 $f10, 0x1c($a2)
.L802907B0:
/* 0F9DC0 802907B0 C7A40060 */ lwc1 $f4, 0x60($sp)
/* 0F9DC4 802907B4 C7A80064 */ lwc1 $f8, 0x64($sp)
/* 0F9DC8 802907B8 3C01802C */ lui $at, %hi(D_802B92B0)
/* 0F9DCC 802907BC 46022182 */ mul.s $f6, $f4, $f2
/* 0F9DD0 802907C0 8CEF00BC */ lw $t7, 0xbc($a3)
/* 0F9DD4 802907C4 24020200 */ li $v0, 512
/* 0F9DD8 802907C8 460C4282 */ mul.s $f10, $f8, $f12
/* 0F9DDC 802907CC C7A80068 */ lwc1 $f8, 0x68($sp)
/* 0F9DE0 802907D0 31EE0200 */ andi $t6, $t7, 0x200
/* 0F9DE4 802907D4 3C0B800E */ lui $t3, %hi(gPlayerOne) # $t3, 0x800e
/* 0F9DE8 802907D8 460A3100 */ add.s $f4, $f6, $f10
/* 0F9DEC 802907DC 46088182 */ mul.s $f6, $f16, $f8
/* 0F9DF0 802907E0 46043280 */ add.s $f10, $f6, $f4
/* 0F9DF4 802907E4 D42492B0 */ ldc1 $f4, %lo(D_802B92B0)($at)
/* 0F9DF8 802907E8 46005483 */ div.s $f18, $f10, $f0
/* 0F9DFC 802907EC 46120202 */ mul.s $f8, $f0, $f18
/* 0F9E00 802907F0 460041A1 */ cvt.d.s $f6, $f8
/* 0F9E04 802907F4 C7A80020 */ lwc1 $f8, 0x20($sp)
/* 0F9E08 802907F8 46243282 */ mul.d $f10, $f6, $f4
/* 0F9E0C 802907FC 104E002C */ beq $v0, $t6, .L802908B0
/* 0F9E10 80290800 46205420 */ cvt.s.d $f16, $f10
/* 0F9E14 80290804 46088182 */ mul.s $f6, $f16, $f8
/* 0F9E18 80290808 C7A40024 */ lwc1 $f4, 0x24($sp)
/* 0F9E1C 8029080C C7A80060 */ lwc1 $f8, 0x60($sp)
/* 0F9E20 80290810 C4EA0034 */ lwc1 $f10, 0x34($a3)
/* 0F9E24 80290814 3C013F00 */ li $at, 0x3F000000 # 0.500000
/* 0F9E28 80290818 44816000 */ mtc1 $at, $f12
/* 0F9E2C 8029081C 46043083 */ div.s $f2, $f6, $f4
/* 0F9E30 80290820 46024182 */ mul.s $f6, $f8, $f2
/* 0F9E34 80290824 C4E80038 */ lwc1 $f8, 0x38($a3)
/* 0F9E38 80290828 46065100 */ add.s $f4, $f10, $f6
/* 0F9E3C 8029082C E4E40034 */ swc1 $f4, 0x34($a3)
/* 0F9E40 80290830 C7AA0064 */ lwc1 $f10, 0x64($sp)
/* 0F9E44 80290834 46025182 */ mul.s $f6, $f10, $f2
/* 0F9E48 80290838 C4EA003C */ lwc1 $f10, 0x3c($a3)
/* 0F9E4C 8029083C 46064100 */ add.s $f4, $f8, $f6
/* 0F9E50 80290840 E4E40038 */ swc1 $f4, 0x38($a3)
/* 0F9E54 80290844 C7A80068 */ lwc1 $f8, 0x68($sp)
/* 0F9E58 80290848 46024182 */ mul.s $f6, $f8, $f2
/* 0F9E5C 8029084C 46065100 */ add.s $f4, $f10, $f6
/* 0F9E60 80290850 C4EA0014 */ lwc1 $f10, 0x14($a3)
/* 0F9E64 80290854 E4E4003C */ swc1 $f4, 0x3c($a3)
/* 0F9E68 80290858 C7A80074 */ lwc1 $f8, 0x74($sp)
/* 0F9E6C 8029085C C7A60060 */ lwc1 $f6, 0x60($sp)
/* 0F9E70 80290860 46087001 */ sub.s $f0, $f14, $f8
/* 0F9E74 80290864 46003102 */ mul.s $f4, $f6, $f0
/* 0F9E78 80290868 00000000 */ nop
/* 0F9E7C 8029086C 460C2202 */ mul.s $f8, $f4, $f12
/* 0F9E80 80290870 C4E40018 */ lwc1 $f4, 0x18($a3)
/* 0F9E84 80290874 46085181 */ sub.s $f6, $f10, $f8
/* 0F9E88 80290878 E4E60014 */ swc1 $f6, 0x14($a3)
/* 0F9E8C 8029087C C7AA0064 */ lwc1 $f10, 0x64($sp)
/* 0F9E90 80290880 46005202 */ mul.s $f8, $f10, $f0
/* 0F9E94 80290884 00000000 */ nop
/* 0F9E98 80290888 460C4182 */ mul.s $f6, $f8, $f12
/* 0F9E9C 8029088C C4E8001C */ lwc1 $f8, 0x1c($a3)
/* 0F9EA0 80290890 46062281 */ sub.s $f10, $f4, $f6
/* 0F9EA4 80290894 E4EA0018 */ swc1 $f10, 0x18($a3)
/* 0F9EA8 80290898 C7A40068 */ lwc1 $f4, 0x68($sp)
/* 0F9EAC 8029089C 46002182 */ mul.s $f6, $f4, $f0
/* 0F9EB0 802908A0 00000000 */ nop
/* 0F9EB4 802908A4 460C3282 */ mul.s $f10, $f6, $f12
/* 0F9EB8 802908A8 460A4101 */ sub.s $f4, $f8, $f10
/* 0F9EBC 802908AC E4E4001C */ swc1 $f4, 0x1c($a3)
.L802908B0:
/* 0F9EC0 802908B0 8CD900BC */ lw $t9, 0xbc($a2)
/* 0F9EC4 802908B4 3C013F00 */ li $at, 0x3F000000 # 0.500000
/* 0F9EC8 802908B8 44816000 */ mtc1 $at, $f12
/* 0F9ECC 802908BC 33280200 */ andi $t0, $t9, 0x200
/* 0F9ED0 802908C0 1048002A */ beq $v0, $t0, .L8029096C
/* 0F9ED4 802908C4 C7A60024 */ lwc1 $f6, 0x24($sp)
/* 0F9ED8 802908C8 46068202 */ mul.s $f8, $f16, $f6
/* 0F9EDC 802908CC C7AA0020 */ lwc1 $f10, 0x20($sp)
/* 0F9EE0 802908D0 C7A60060 */ lwc1 $f6, 0x60($sp)
/* 0F9EE4 802908D4 C4C40034 */ lwc1 $f4, 0x34($a2)
/* 0F9EE8 802908D8 460A4083 */ div.s $f2, $f8, $f10
/* 0F9EEC 802908DC 46023202 */ mul.s $f8, $f6, $f2
/* 0F9EF0 802908E0 C4C60038 */ lwc1 $f6, 0x38($a2)
/* 0F9EF4 802908E4 46082281 */ sub.s $f10, $f4, $f8
/* 0F9EF8 802908E8 E4CA0034 */ swc1 $f10, 0x34($a2)
/* 0F9EFC 802908EC C7A40064 */ lwc1 $f4, 0x64($sp)
/* 0F9F00 802908F0 46022202 */ mul.s $f8, $f4, $f2
/* 0F9F04 802908F4 C4C4003C */ lwc1 $f4, 0x3c($a2)
/* 0F9F08 802908F8 46083281 */ sub.s $f10, $f6, $f8
/* 0F9F0C 802908FC E4CA0038 */ swc1 $f10, 0x38($a2)
/* 0F9F10 80290900 C7A60068 */ lwc1 $f6, 0x68($sp)
/* 0F9F14 80290904 46023202 */ mul.s $f8, $f6, $f2
/* 0F9F18 80290908 46082281 */ sub.s $f10, $f4, $f8
/* 0F9F1C 8029090C C4C40014 */ lwc1 $f4, 0x14($a2)
/* 0F9F20 80290910 E4CA003C */ swc1 $f10, 0x3c($a2)
/* 0F9F24 80290914 C7A60074 */ lwc1 $f6, 0x74($sp)
/* 0F9F28 80290918 C7A80060 */ lwc1 $f8, 0x60($sp)
/* 0F9F2C 8029091C 46067001 */ sub.s $f0, $f14, $f6
/* 0F9F30 80290920 46004282 */ mul.s $f10, $f8, $f0
/* 0F9F34 80290924 00000000 */ nop
/* 0F9F38 80290928 460C5182 */ mul.s $f6, $f10, $f12
/* 0F9F3C 8029092C C4CA0018 */ lwc1 $f10, 0x18($a2)
/* 0F9F40 80290930 46062200 */ add.s $f8, $f4, $f6
/* 0F9F44 80290934 E4C80014 */ swc1 $f8, 0x14($a2)
/* 0F9F48 80290938 C7A40064 */ lwc1 $f4, 0x64($sp)
/* 0F9F4C 8029093C 46002182 */ mul.s $f6, $f4, $f0
/* 0F9F50 80290940 00000000 */ nop
/* 0F9F54 80290944 460C3202 */ mul.s $f8, $f6, $f12
/* 0F9F58 80290948 C4C6001C */ lwc1 $f6, 0x1c($a2)
/* 0F9F5C 8029094C 46085100 */ add.s $f4, $f10, $f8
/* 0F9F60 80290950 E4C40018 */ swc1 $f4, 0x18($a2)
/* 0F9F64 80290954 C7AA0068 */ lwc1 $f10, 0x68($sp)
/* 0F9F68 80290958 46005202 */ mul.s $f8, $f10, $f0
/* 0F9F6C 8029095C 00000000 */ nop
/* 0F9F70 80290960 460C4102 */ mul.s $f4, $f8, $f12
/* 0F9F74 80290964 46043280 */ add.s $f10, $f6, $f4
/* 0F9F78 80290968 E4CA001C */ swc1 $f10, 0x1c($a2)
.L8029096C:
/* 0F9F7C 8029096C 94E90000 */ lhu $t1, ($a3)
/* 0F9F80 80290970 312A4000 */ andi $t2, $t1, 0x4000
/* 0F9F84 80290974 5140000D */ beql $t2, $zero, .L802909AC
/* 0F9F88 80290978 94D80000 */ lhu $t8, ($a2)
/* 0F9F8C 8029097C 8D6BC4DC */ lw $t3, %lo(gPlayerOne)($t3)
/* 0F9F90 80290980 24010DD8 */ li $at, 3544
/* 0F9F94 80290984 3C051900 */ lui $a1, (0x19008001 >> 16) # lui $a1, 0x1900
/* 0F9F98 80290988 00EB2023 */ subu $a0, $a3, $t3
/* 0F9F9C 8029098C 0081001A */ div $zero, $a0, $at
/* 0F9FA0 80290990 00006012 */ mflo $t4
/* 0F9FA4 80290994 318400FF */ andi $a0, $t4, 0xff
/* 0F9FA8 80290998 0C032418 */ jal func_800C9060
/* 0F9FAC 8029099C 34A58001 */ ori $a1, (0x19008001 & 0xFFFF) # ori $a1, $a1, 0x8001
/* 0F9FB0 802909A0 10000010 */ b .L802909E4
/* 0F9FB4 802909A4 8FBF0014 */ lw $ra, 0x14($sp)
/* 0F9FB8 802909A8 94D80000 */ lhu $t8, ($a2)
.L802909AC:
/* 0F9FBC 802909AC 3C0E800E */ lui $t6, %hi(gPlayerOne) # $t6, 0x800e
/* 0F9FC0 802909B0 330F4000 */ andi $t7, $t8, 0x4000
/* 0F9FC4 802909B4 51E0000B */ beql $t7, $zero, .L802909E4
/* 0F9FC8 802909B8 8FBF0014 */ lw $ra, 0x14($sp)
/* 0F9FCC 802909BC 8DCEC4DC */ lw $t6, %lo(gPlayerOne)($t6)
/* 0F9FD0 802909C0 24010DD8 */ li $at, 3544
/* 0F9FD4 802909C4 3C051900 */ lui $a1, (0x19008001 >> 16) # lui $a1, 0x1900
/* 0F9FD8 802909C8 00CE2023 */ subu $a0, $a2, $t6
/* 0F9FDC 802909CC 0081001A */ div $zero, $a0, $at
/* 0F9FE0 802909D0 0000C812 */ mflo $t9
/* 0F9FE4 802909D4 332400FF */ andi $a0, $t9, 0xff
/* 0F9FE8 802909D8 0C032418 */ jal func_800C9060
/* 0F9FEC 802909DC 34A58001 */ ori $a1, (0x19008001 & 0xFFFF) # ori $a1, $a1, 0x8001
.L802909E0:
/* 0F9FF0 802909E0 8FBF0014 */ lw $ra, 0x14($sp)
.L802909E4:
/* 0F9FF4 802909E4 27BD0078 */ addiu $sp, $sp, 0x78
/* 0F9FF8 802909E8 03E00008 */ jr $ra
/* 0F9FFC 802909EC 00000000 */ nop

View File

@ -83,6 +83,7 @@
#define PLAYER_CPU (1 << 12) // 0x1000
#define PLAYER_HUMAN (1 << 14) // 0x4000
#define PLAYER_INVISIBLE_OR_BOMB (1 << 8) // 0x0100
#define PLAYER_UNKNOWN_0x40 (1 << 6) // 0x0040
// unused?
#define PLAYER_UNKNOWN (1 << 10) // 0x0400

View File

@ -26,6 +26,4 @@
#define SET_HIGH_S16_OF_32(var, x) ((((s16 *)&(var))[0]) = (x))
#endif
#define SQUARE(x) ((x) * (x))
#endif // MK64_H

View File

@ -384,13 +384,14 @@ SECTIONS
BUILD_DIR/src/code_802AAA70.o(.text);
BUILD_DIR/src/actors_extended.o(.text);
BUILD_DIR/src/math_util.o(.text);
BUILD_DIR/src/race_logic.o(.data);
BUILD_DIR/src/render_courses.o(.data);
BUILD_DIR/src/actors.o(.data);
BUILD_DIR/src/skybox_and_splitscreen.o(.data);
BUILD_DIR/src/memory.o(.data);
BUILD_DIR/courses/courseTable.inc.o(.data);
BUILD_DIR/src/actors_extended.o(.data);
BUILD_DIR/src/race_logic.o(.data);
BUILD_DIR/src/math_util.o(.data);
BUILD_DIR/src/race_logic.o(.rodata);
BUILD_DIR/src/render_courses.o(.rodata);
BUILD_DIR/src/actors.o(.rodata);
@ -503,7 +504,7 @@ SECTIONS
/* 0x802BA370 724220-729A30 [0x5810] */
BEGIN_SEG(data_802BA370, SEG_802BA370)
{
BUILD_DIR/src/math_util.o(.data);
BUILD_DIR/src/framebuffers.o(.data);
. = ALIGN(0x10);
}
END_SEG(data_802BA370)

View File

@ -84,7 +84,6 @@ seg2Files2 = [
"asm/non_matchings/math_util",
"asm/non_matchings/memory",
"asm/non_matchings/code_802AAA70",
"asm/non_matchings/race_logic",
"asm/non_matchings/render_courses",
"asm/non_matchings/skybox",
]

View File

@ -369,7 +369,6 @@ s16 func_80005FD0(Vec3f arg0, Vec3f arg1) {
s32 func_80006018(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7) {
f32 temp_f0;
f32 temp_f18;
s32 var_v0;
temp_f0 = sqrtf((arg2 * arg2) + (arg3 * arg3));
if (temp_f0 < 0.01f) {
@ -5774,7 +5773,7 @@ f32 func_80010480(s32 pathIndex, u16 wayPointIndex) {
void func_800107C4(s32 pathIndex) {
f64 temp_f2;
s32 temp_t3;
UNUSED s32 pad;
s32 var_a2;
s32 var_s0;
s32 var_t2;

View File

@ -3,6 +3,8 @@
#include "config.h"
#include "framebuffers.h"
#include "trig_tables.inc.c"
u16 gRandomSeed16;
u8 randomSeedPadding[216];
@ -21,4 +23,4 @@ u16 gFramebuffers[3][SCREEN_WIDTH * SCREEN_HEIGHT];
u16 gFramebuffer0[SCREEN_WIDTH * SCREEN_HEIGHT];
u16 gFramebuffer1[SCREEN_WIDTH * SCREEN_HEIGHT];
u16 gFramebuffer2[SCREEN_WIDTH * SCREEN_HEIGHT];
#endif
#endif

View File

@ -5,12 +5,13 @@
#include <main.h>
#include "framebuffers.h"
#include <PR/rcp.h>
// Location based from sm64.
// This may need to be moved before framebuffers.c
// If math_util has data that does not line-up with trig_tables.
#include "trig_tables.inc.c"
#include <trig_tables.h>
#pragma intrinsic (sqrtf)
s32 D_802B91C0[2] = { 13, 13 };
Vec3f D_802B91C8 = { 0.0f, 0.0f, 0.0f };
#ifdef NON_MATCHING
// Nearly matches

View File

@ -4,7 +4,6 @@
#include <PR/ultratypes.h>
#include "types.h"
#include "trig_tables.h"
//#define sins(x) gSineTable[(u16) (x) >> 4]
//#define coss(x) gCosineTable[(u16) (x) >> 4]

View File

@ -397,17 +397,16 @@ extern s16 D_802874D0;
void update_actors_loop(void) {
void (*func)(void *);
CeremonyActor *actor;
s32 i;
s32 j;
spawn_timer();
D_802874D0 = 0;
// Why do we loop over the actor list three times?
// Actors don't with no loop. fireworks don't spawn if the iterator is 2.
for (i = 0; i < 3; i++) {
actor = sPodiumActorList;
// High loop count to produce randomness? May also be a sort of delta?
// If this was for random, wouldn't it make everything move farther?
CeremonyActor *actor = sPodiumActorList;
for (j = 0; j < 200; j++) {
// @bug Check should be outside of this loop
if (actor->isActive & 1) {
func = sUpdate[actor->type][i];

View File

@ -18,6 +18,10 @@
#include "race_logic.h"
#include "skybox_and_splitscreen.h"
#include "math_util_2.h"
#include "code_8008C1D0.h"
#include "math.h"
#pragma intrinsic (sqrtf)
extern Player *gPlayerTwo;
extern Player *gPlayerThree;
@ -91,9 +95,6 @@ extern f32 D_80150148;
extern u16 D_8015F894;
s32 D_802B91C0[2] = { 13, 13 };
Vec3f D_802B91C8 = { 0.0f, 0.0f, 0.0f };
u16 D_802BA030;
u16 D_802BA032;
@ -145,9 +146,8 @@ void func_8028E028(void) {
D_802BA038 = 10;
}
// func_8028E0F0
void update_player_battle_status(void) {
Player *ply;
Player *player;
s32 playerIndex;
s16 playersAlive[4];
s16 playersDead[4];
@ -155,21 +155,21 @@ void update_player_battle_status(void) {
s16 deadCounter = 0;
for (playerIndex = 0; playerIndex < 4; playerIndex++) {
ply = (Player *)&gPlayers[playerIndex];
if (!(ply->unk_000 & PLAYER_EXISTS)) {
player = &gPlayers[playerIndex];
if (!(player->unk_000 & PLAYER_EXISTS)) {
continue;
}
if (ply->unk_000 & PLAYER_CINEMATIC_MODE) {
if (player->unk_000 & PLAYER_CINEMATIC_MODE) {
continue;
}
// If player has no balloons left
if (gPlayerBalloonCount[playerIndex] < 0) {
ply->unk_000 |= PLAYER_CINEMATIC_MODE;
playersDead[deadCounter] = (s16) (ply - gPlayerOne);
player->unk_000 |= PLAYER_CINEMATIC_MODE;
playersDead[deadCounter] = (s16) (player - gPlayerOne);
deadCounter++;
func_800CA118((u8) playerIndex); // play sad character sound?
} else {
playersAlive[aliveCounter] = (s16) (ply - gPlayerOne);
playersAlive[aliveCounter] = (s16) (player - gPlayerOne);
aliveCounter++;
}
}
@ -574,13 +574,12 @@ void func_8028EEF0(s32 i) {
}
void func_8028EF28(void) {
Player *ply;
s16 currentPosition;
s32 i;
for(i = 0; i < 8; i++)
{
ply = &gPlayers[i];
Player *player = &gPlayers[i];
if ((gPlayers[i].unk_000 & PLAYER_EXISTS) == 0) {
continue;
@ -615,7 +614,7 @@ void func_8028EF28(void) {
D_800DC510 = 4;
}
if (gModeSelection == TIME_TRIALS) {
func_80005AE8(ply);
func_80005AE8(player);
}
@ -688,7 +687,7 @@ void func_8028EF28(void) {
} else if (gPlayers[i].lapCount == 3) {
func_8028EEF0(i);
if (gModeSelection == TIME_TRIALS) {
func_80005AE8(ply);
func_80005AE8(player);
}
}
}
@ -849,94 +848,86 @@ void func_8028F914(void) {
func_8028F588();
}
#ifdef MIPS_TO_C
//generated by m2c commit 9841ff34ca242f5f14b2eab2b54a7a65ac47d80f
? func_800C9F90(?); /* extern */
extern s32 D_80162DF0;
static u16 D_800DC5A8; /* unable to generate initializer */
extern u16 D_800DC5A8;
void func_8028F970(void) {
Player *var_s3;
s32 var_s2;
struct Controller *temp_s0;
u16 temp_t7;
u16 temp_v0;
u16 temp_v0_2;
u16 temp_v0_3;
s32 i;
if (D_8015F890 == 0) {
var_s3 = gPlayers;
var_s2 = 0;
loop_2:
temp_v0 = var_s3->unk_000;
if ((temp_v0 & 0x4000) && !(temp_v0 & 0x1000)) {
temp_s0 = &gControllers[var_s2];
if (gActiveScreenMode != 3) {
temp_v0_2 = temp_s0->buttonPressed;
if ((temp_v0_2 & L_TRIG) && !(temp_s0->button & R_TRIG)) {
temp_s0->buttonPressed = temp_v0_2 & 0xFFDF;
temp_t7 = D_800DC5A8 + 1;
D_800DC5A8 = temp_t7;
if ((temp_t7 & 0xFFFF) >= 3) {
D_800DC5A8 = 0;
}
play_sound2(0x4900801C);
func_800029B0();
if (D_8015F890) {
return;
}
// todo: increasing players past four would require increase this loop iterator.
for (i = 0; i < 4; i++) {
Player *player = &gPlayers[i];
struct Controller *controller = &gControllers[i];
if (!(player->unk_000 & PLAYER_HUMAN)) { continue; }
if (player->unk_000 & PLAYER_CPU) { continue; }
if (gActiveScreenMode != SCREEN_MODE_3P_4P_SPLITSCREEN) {
if ((controller->buttonPressed & L_TRIG) && !(controller->button & R_TRIG)) {
controller->buttonPressed &= 0xFFDF;
D_800DC5A8++;
if (D_800DC5A8 >= 3) {
D_800DC5A8 = 0;
}
play_sound2(0x4900801C);
func_800029B0();
}
}
if ((controller->buttonPressed & START_BUTTON) &&
(!(controller->button & R_TRIG)) &&
(!(controller->button & L_TRIG))) {
func_8028DF00();
gIsGamePaused = (controller - gControllerOne) + 1;
controller->buttonPressed = 0;
func_800C9F90(1);
D_80162DF0 = 1;
if (gModeSelection == TIME_TRIALS) {
if (gPlayerOne->unk_000 & (PLAYER_EXISTS | PLAYER_INVISIBLE_OR_BOMB)) {
func_80005AE8(gPlayerOne);
}
if (gPlayerTwo->unk_000 & (PLAYER_EXISTS | PLAYER_INVISIBLE_OR_BOMB)) {
func_80005AE8(gPlayerTwo);
}
if (gPlayerThree->unk_000 & (PLAYER_EXISTS | PLAYER_INVISIBLE_OR_BOMB)) {
func_80005AE8(gPlayerThree);
}
}
if ((temp_s0->buttonPressed & START_BUTTON) && (temp_v0_3 = temp_s0->button, ((temp_v0_3 & R_TRIG) == 0)) && !(temp_v0_3 & L_TRIG)) {
func_8028DF00();
gIsGamePaused = ((s32) (temp_s0 - gControllerOne) >> 4) + 1;
temp_s0->buttonPressed = 0;
func_800C9F90(1);
D_80162DF0 = 1;
if (gModeSelection == 1) {
if (gPlayerOne->unk_000 & 0x8100) {
func_80005AE8(gPlayerOne);
}
if (gPlayerTwo->unk_000 & 0x8100) {
func_80005AE8(gPlayerTwo);
}
if (gPlayerThree->unk_000 & 0x8100) {
func_80005AE8(gPlayerThree);
}
}
} else {
goto block_20;
}
return;
}
}
if (gEnableDebugMode) {
if (gModeSelection == BATTLE) {
// do stuff?
} else {
block_20:
var_s2 += 1;
var_s3 += 0xDD8;
if (var_s2 == 4) {
if ((gEnableDebugMode != 0) && (gModeSelection != BATTLE)) {
if (gControllerOne->buttonPressed & U_JPAD) {
gLapCountByPlayerId->unk0 = 2;
}
if (gControllerOne->buttonPressed & R_JPAD) {
gLapCountByPlayerId->unk0 = 2;
gLapCountByPlayerId->unk4 = 2;
}
if (gControllerOne->buttonPressed & D_JPAD) {
gLapCountByPlayerId->unk0 = 2;
gLapCountByPlayerId->unk4 = 2;
gLapCountByPlayerId->unk8 = 2;
gLapCountByPlayerId->unkC = 2;
gLapCountByPlayerId->unk10 = 2;
gLapCountByPlayerId->unk14 = 2;
gLapCountByPlayerId->unk18 = 2;
gLapCountByPlayerId->unk1C = 2;
}
}
} else {
goto loop_2;
if (gControllerOne->buttonPressed & U_JPAD) {
gLapCountByPlayerId[0] = 2;
}
if (gControllerOne->buttonPressed & R_JPAD) {
gLapCountByPlayerId[0] = 2;
gLapCountByPlayerId[1] = 2;
}
if (gControllerOne->buttonPressed & D_JPAD) {
gLapCountByPlayerId[0] = 2;
gLapCountByPlayerId[1] = 2;
gLapCountByPlayerId[2] = 2;
gLapCountByPlayerId[3] = 2;
gLapCountByPlayerId[4] = 2;
gLapCountByPlayerId[5] = 2;
gLapCountByPlayerId[6] = 2;
gLapCountByPlayerId[7] = 2;
}
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/race_logic/func_8028F970.s")
#endif
//#else
//GLOBAL_ASM("asm/non_matchings/race_logic/func_8028F970.s")
//#endif
void func_8028FBD4(void) {
gMenuSelectionFromQuit = START_MENU_FROM_QUIT;
@ -1175,138 +1166,109 @@ void func_802903B0(void) {
gMenuSelectionFromQuit = RACING;
}
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
static f32 D_802B92A0 = 0.1f;
static f32 D_802B92A4 = 0.2f;
static f32 D_802B92A8 = 0.55f;
static f64 D_802B92B0 = 0.85;
static ? gFloatArray802B8790; /* unable to generate initializer */
void func_802903D8(Player *player_one, Player *player_two) {
f32 sp74;
f32 sp70;
f32 sp68;
f32 sp64;
f32 sp60;
f32 sp5C;
f32 sp58;
f32 sp54;
f32 sp24;
f32 sp20;
void func_802903D8(Player *playerOne, Player *playerTwo) {
f32 sp70 = (playerOne->boundingBoxSize + playerTwo->boundingBoxSize) - 5.0f;
f32 temp_f0;
f32 sp74;
Vec3f sp60;
Vec3f sp54;
f32 temp_f0_2;
f32 temp_f0_3;
f32 temp_f0_4;
f32 temp_f14;
f32 temp_f16;
f32 temp_f2;
f32 temp_f2_2;
f32 temp_f4;
f32 temp_f6;
f32 temp_f6_2;
s32 temp_v0;
temp_f4 = (player_one->boundingBoxSize + player_two->boundingBoxSize) - 5.0f;
sp74 = temp_f4;
sp28[0].unk0 = gFloatArray802B8790.unk0;
sp28[0].unk4 = (s32) gFloatArray802B8790.unk4;
sp28[0].unk8 = (s32) gFloatArray802B8790.unk8;
sp28[0].unkC = (s32) gFloatArray802B8790.unkC;
sp28[0].unk10 = (s32) gFloatArray802B8790.unk10;
sp28[0].unk14 = (s32) gFloatArray802B8790.unk14;
sp28[0].unk18 = (s32) gFloatArray802B8790.unk18;
sp28[0].unk1C = (s32) gFloatArray802B8790.unk1C;
sp24 = (&sp28[0])[player_one->characterId];
sp20 = (&sp28[0])[player_two->characterId];
sp60 = player_one->pos[0] - player_two->pos[0];
temp_f6 = (player_one->pos[1] - player_one->boundingBoxSize) - (player_two->pos[1] - player_two->boundingBoxSize);
sp64 = temp_f6;
sp68 = player_one->pos[2] - player_two->pos[2];
sp54 = player_two->unk_034[0] - player_one->unk_034[0];
sp58 = player_two->unk_034[1] - player_one->unk_034[1];
sp5C = player_two->unk_034[2] - player_one->unk_034[2];
temp_f0 = sqrtf((sp68 * sp68) + ((sp60 * sp60) + (temp_f6 * temp_f6)));
if (!(temp_f0 < D_802B92A0) && !(temp_f4 < temp_f0)) {
if (player_one->unk_000 & 0x40) {
if (player_two->unk_000 & 0x40) {
func_8008FC1C(player_one);
func_8008FC1C(player_two);
func_800C9060(((s32) (player_two - gPlayerOne) / 3544) & 0xFF, 0x19008001U);
return;
}
player_two->statusEffects |= 0x400000;
sp70 = temp_f0;
func_8008FC1C(player_one);
func_800C9060(((s32) (player_two - gPlayerOne) / 3544) & 0xFF, 0x19008001U);
goto block_8;
}
if (player_two->unk_000 & 0x40) {
player_one->statusEffects |= 0x400000;
func_8008FC1C(player_two);
func_800C9060(((s32) (player_one - gPlayerOne) / 3544) & 0xFF, 0x19008001U);
f32 gFloatArray802B8790[] = {
1.2, 1.0, 0.9, 0.7, 2.0, 1.8, 0.9, 2.3
};
f32 sp24 = gFloatArray802B8790[playerOne->characterId];
f32 sp20 = gFloatArray802B8790[playerTwo->characterId];
sp60[0] = playerOne->pos[0] - playerTwo->pos[0];
sp60[1] = (playerOne->pos[1] - playerOne->boundingBoxSize) - (playerTwo->pos[1] - playerTwo->boundingBoxSize);
sp60[2] = playerOne->pos[2] - playerTwo->pos[2];
sp54[0] = playerTwo->unk_034[0] - playerOne->unk_034[0];
sp54[1] = playerTwo->unk_034[1] - playerOne->unk_034[1];
sp54[2] = playerTwo->unk_034[2] - playerOne->unk_034[2];
temp_f0 = sqrtf((sp60[0] * sp60[0]) + (sp60[1] * sp60[1]) + (sp60[2] * sp60[2]));
if (temp_f0 < 0.1f) { return; }
sp74 = temp_f0 - sp70;
if (sp74 > 0) { return; }
if (playerOne->unk_000 & PLAYER_UNKNOWN_0x40) {
if (playerTwo->unk_000 & PLAYER_UNKNOWN_0x40) {
func_8008FC1C(playerOne);
func_8008FC1C(playerTwo);
func_800C9060((playerTwo - gPlayerOne), 0x19008001U);
return;
}
block_8:
temp_v0 = player_one->unk_0BC;
if (temp_v0 & 0x200) {
if (!(player_two->unk_0BC & 0x200)) {
player_two->statusEffects |= 0x01000000;
}
} else if (player_two->unk_0BC & 0x200) {
player_one->statusEffects |= 0x01000000;
} else {
player_one->unk_0BC = temp_v0 | 0x8000;
player_two->unk_0BC |= 0x8000;
playerTwo->statusEffects |= 0x400000;
func_8008FC1C(playerOne);
func_800C9060((playerTwo - gPlayerOne), 0x19008001U);
}
temp_f6_2 = sp60 / temp_f0;
temp_f0_2 = sqrtf((sp5C * sp5C) + ((sp54 * sp54) + (sp58 * sp58)));
sp60 = temp_f6_2;
sp64 /= temp_f0;
sp68 /= temp_f0;
if (temp_f0_2 < D_802B92A4) {
temp_f14 = (player_one->boundingBoxSize + player_two->boundingBoxSize) * D_802B92A8;
player_one->pos[0] = (temp_f6_2 * temp_f14) + player_two->pos[0];
player_one->pos[1] = (sp64 * temp_f14) + player_two->pos[1];
player_one->pos[2] = (sp68 * temp_f14) + player_two->pos[2];
player_two->pos[0] -= temp_f14 * sp60;
player_two->pos[1] -= temp_f14 * sp64;
player_two->pos[2] -= temp_f14 * sp68;
return;
}
temp_f16 = (f32) ((f64) (temp_f0_2 * (((sp5C * sp68) + ((sp60 * sp54) + (sp64 * sp58))) / temp_f0_2)) * D_802B92B0);
if ((player_one->unk_0BC & 0x200) != 0x200) {
temp_f2 = (temp_f16 * sp20) / sp24;
player_one->unk_034[0] += sp60 * temp_f2;
player_one->unk_034[1] += sp64 * temp_f2;
player_one->unk_034[2] += sp68 * temp_f2;
temp_f0_3 = temp_f0 - sp74;
player_one->pos[0] -= sp60 * temp_f0_3 * 0.5f;
player_one->pos[1] -= sp64 * temp_f0_3 * 0.5f;
player_one->pos[2] -= sp68 * temp_f0_3 * 0.5f;
}
if ((player_two->unk_0BC & 0x200) != 0x200) {
temp_f2_2 = (temp_f16 * sp24) / sp20;
player_two->unk_034[0] -= sp60 * temp_f2_2;
player_two->unk_034[1] -= sp64 * temp_f2_2;
player_two->unk_034[2] -= sp68 * temp_f2_2;
temp_f0_4 = temp_f0 - sp74;
player_two->pos[0] += sp60 * temp_f0_4 * 0.5f;
player_two->pos[1] += sp64 * temp_f0_4 * 0.5f;
player_two->pos[2] += sp68 * temp_f0_4 * 0.5f;
}
if (player_one->unk_000 & 0x4000) {
func_800C9060(((s32) (player_one - gPlayerOne) / 3544) & 0xFF, 0x19008001U);
return;
}
if (player_two->unk_000 & 0x4000) {
func_800C9060(((s32) (player_two - gPlayerOne) / 3544) & 0xFF, 0x19008001U);
} else if (playerTwo->unk_000 & PLAYER_UNKNOWN_0x40) {
playerOne->statusEffects |= 0x400000;
func_8008FC1C(playerTwo);
func_800C9060(playerOne - gPlayerOne, 0x19008001U);
return;
}
if (playerOne->unk_0BC & 0x200) {
if (!(playerTwo->unk_0BC & 0x200)) {
playerTwo->statusEffects |= 0x01000000;
}
} else if (playerTwo->unk_0BC & 0x200) {
playerOne->statusEffects |= 0x01000000;
} else {
playerOne->unk_0BC |= 0x8000;
playerTwo->unk_0BC |= 0x8000;
}
temp_f0_2 = sqrtf((sp54[0] * sp54[0]) + (sp54[1] * sp54[1]) + (sp54[2] * sp54[2]));
sp60[0] /= temp_f0;
sp60[1] /= temp_f0;
sp60[2] /= temp_f0;
if (temp_f0_2 < 0.2f) {
temp_f0 = (playerOne->boundingBoxSize + playerTwo->boundingBoxSize) * 0.55f;
playerOne->pos[0] = playerTwo->pos[0] + (sp60[0] * temp_f0);
playerOne->pos[1] = playerTwo->pos[1] + (sp60[1] * temp_f0);
playerOne->pos[2] = playerTwo->pos[2] + (sp60[2] * temp_f0);
playerTwo->pos[0] -= temp_f0 * sp60[0];
playerTwo->pos[1] -= temp_f0 * sp60[1];
playerTwo->pos[2] -= temp_f0 * sp60[2];
return;
} else {
temp_f16 = ((sp60[0] * sp54[0]) + (sp60[1] * sp54[1]) + (sp60[2] * sp54[2])) / temp_f0_2;
}
temp_f0_2 = temp_f0_2 * temp_f16 * 0.85;
if ((playerOne->unk_0BC & 0x200) != 0x200) {
temp_f2 = (temp_f0_2 * sp20) / sp24;
playerOne->unk_034[0] += sp60[0] * temp_f2;
playerOne->unk_034[1] += sp60[1] * temp_f2;
playerOne->unk_034[2] += sp60[2] * temp_f2;
playerOne->pos[0] -= sp60[0] * sp74 * 0.5f;
playerOne->pos[1] -= sp60[1] * sp74 * 0.5f;
playerOne->pos[2] -= sp60[2] * sp74 * 0.5f;
}
if ((playerTwo->unk_0BC & 0x200) != 0x200) {
temp_f2 = (temp_f0_2 * sp24) / sp20;
playerTwo->unk_034[0] -= sp60[0] * temp_f2;
playerTwo->unk_034[1] -= sp60[1] * temp_f2;
playerTwo->unk_034[2] -= sp60[2] * temp_f2;
playerTwo->pos[0] += sp60[0] * sp74 * 0.5f;
playerTwo->pos[1] += sp60[1] * sp74 * 0.5f;
playerTwo->pos[2] += sp60[2] * sp74 * 0.5f;
}
if (playerOne->unk_000 & PLAYER_HUMAN) {
func_800C9060((playerOne - gPlayerOne), 0x19008001U);
return;
}
if (playerTwo->unk_000 & PLAYER_HUMAN) {
func_800C9060((playerTwo - gPlayerOne), 0x19008001U);
}
}
#else
GLOBAL_ASM("asm/non_matchings/race_logic/func_802903D8.s")
#endif
void func_802909F0(void) {
Player *ply;

View File

@ -13,9 +13,6 @@
#include "render_courses.h"
#include "skybox_and_splitscreen.h"
f32 gFloatArray802B8790[] = {
1.2, 1.0, 0.9, 0.7, 2.0, 1.8, 0.9, 2.3
};
s16 D_802B87B0 = 995;
s16 D_802B87B4 = 1000;
UNUSED s32 D_802B87B8 = 0;

View File

@ -30,5 +30,6 @@ extern s32 func_80040174(void *, s32, s32);
extern s32 D_80162DC8;
extern s32 D_80162DCC;
extern s32 D_80162E00;
extern s32 D_80162DF0;
#endif /* STAFF_GHOSTS_H */