mirror of
https://github.com/n64decomp/mk64
synced 2026-07-12 06:02:31 -04:00
Variety of changes (#147)
* Update player struct with lap count and rank Also rename some arrays to better reflect what they are tracking * Add bounding box corner struct and surface type enum * Create a .h file and move stuff into it See https://github.com/DeadHamster35/Tarmac64/wiki/Surface-Types and https://github.com/micro500/mariokart64/wiki/Surface-Map for reference Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
+2
-2
@@ -172,7 +172,7 @@ glabel D_80164386
|
||||
|
||||
# List of s32's, seemingly indexed by player ID
|
||||
# Indicates the number of completed laps for that player
|
||||
glabel lapCount
|
||||
glabel gLapCountByPlayerId
|
||||
.skip 2
|
||||
|
||||
glabel D_80164392
|
||||
@@ -238,7 +238,7 @@ glabel D_80164490
|
||||
glabel D_80164498
|
||||
.skip 16
|
||||
|
||||
glabel D_801644A8
|
||||
glabel gLapCompletionPercentByPlayerId
|
||||
.skip 40
|
||||
|
||||
glabel gCourseCompletionPercentByPlayerId
|
||||
|
||||
@@ -91,10 +91,10 @@ glabel func_800088D8
|
||||
/* 009624 80008A24 50200016 */ beql $at, $zero, .L80008A80
|
||||
/* 009628 80008A28 84E40000 */ lh $a0, ($a3)
|
||||
/* 00962C 80008A2C 84E20000 */ lh $v0, ($a3)
|
||||
/* 009630 80008A30 3C018016 */ lui $at, %hi(D_801644A8)
|
||||
/* 009630 80008A30 3C018016 */ lui $at, %hi(gLapCompletionPercentByPlayerId)
|
||||
/* 009634 80008A34 00280821 */ addu $at, $at, $t0
|
||||
/* 009638 80008A38 84E30010 */ lh $v1, 0x10($a3)
|
||||
/* 00963C 80008A3C C42044A8 */ lwc1 $f0, %lo(D_801644A8)($at)
|
||||
/* 00963C 80008A3C C42044A8 */ lwc1 $f0, %lo(gLapCompletionPercentByPlayerId)($at)
|
||||
/* 009640 80008A40 44822000 */ mtc1 $v0, $f4
|
||||
/* 009644 80008A44 3C013F80 */ li $at, 0x3F800000 # 1.000000
|
||||
/* 009648 80008A48 44814000 */ mtc1 $at, $f8
|
||||
@@ -170,10 +170,10 @@ glabel func_800088D8
|
||||
/* 00974C 80008B4C 10200015 */ beqz $at, .L80008BA4
|
||||
/* 009750 80008B50 3C0F800E */ lui $t7, %hi(gCCSelection)
|
||||
/* 009754 80008B54 84E20000 */ lh $v0, ($a3)
|
||||
/* 009758 80008B58 3C018016 */ lui $at, %hi(D_801644A8)
|
||||
/* 009758 80008B58 3C018016 */ lui $at, %hi(gLapCompletionPercentByPlayerId)
|
||||
/* 00975C 80008B5C 00280821 */ addu $at, $at, $t0
|
||||
/* 009760 80008B60 84E30010 */ lh $v1, 0x10($a3)
|
||||
/* 009764 80008B64 C42044A8 */ lwc1 $f0, %lo(D_801644A8)($at)
|
||||
/* 009764 80008B64 C42044A8 */ lwc1 $f0, %lo(gLapCompletionPercentByPlayerId)($at)
|
||||
/* 009768 80008B68 44829000 */ mtc1 $v0, $f18
|
||||
/* 00976C 80008B6C 3C013F80 */ li $at, 0x3F800000 # 1.000000
|
||||
/* 009770 80008B70 44814000 */ mtc1 $at, $f8
|
||||
@@ -308,10 +308,10 @@ glabel func_800088D8
|
||||
/* 00993C 80008D3C 0009C040 */ sll $t8, $t1, 1
|
||||
/* 009940 80008D40 00F83021 */ addu $a2, $a3, $t8
|
||||
/* 009944 80008D44 84C20000 */ lh $v0, ($a2)
|
||||
/* 009948 80008D48 3C018016 */ lui $at, %hi(D_801644A8)
|
||||
/* 009948 80008D48 3C018016 */ lui $at, %hi(gLapCompletionPercentByPlayerId)
|
||||
/* 00994C 80008D4C 00280821 */ addu $at, $at, $t0
|
||||
/* 009950 80008D50 84C30010 */ lh $v1, 0x10($a2)
|
||||
/* 009954 80008D54 C42044A8 */ lwc1 $f0, %lo(D_801644A8)($at)
|
||||
/* 009954 80008D54 C42044A8 */ lwc1 $f0, %lo(gLapCompletionPercentByPlayerId)($at)
|
||||
/* 009958 80008D58 44825000 */ mtc1 $v0, $f10
|
||||
/* 00995C 80008D5C 3C013F80 */ li $at, 0x3F800000 # 1.000000
|
||||
/* 009960 80008D60 44814000 */ mtc1 $at, $f8
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
glabel func_80008F38
|
||||
/* 009B38 80008F38 3C068016 */ lui $a2, %hi(D_801645C8) # $a2, 0x8016
|
||||
/* 009B3C 80008F3C 00041080 */ sll $v0, $a0, 2
|
||||
/* 009B40 80008F40 3C038016 */ lui $v1, %hi(lapCount) # 0x8016
|
||||
/* 009B40 80008F40 3C038016 */ lui $v1, %hi(gLapCountByPlayerId) # 0x8016
|
||||
/* 009B44 80008F44 24C645C8 */ addiu $a2, %lo(D_801645C8) # addiu $a2, $a2, 0x45c8
|
||||
/* 009B48 80008F48 00621821 */ addu $v1, $v1, $v0
|
||||
/* 009B4C 80008F4C 8C634390 */ lw $v1, %lo(lapCount)($v1) # 0x4390($v1)
|
||||
/* 009B4C 80008F4C 8C634390 */ lw $v1, %lo(gLapCountByPlayerId)($v1) # 0x4390($v1)
|
||||
/* 009B50 80008F50 94CE0000 */ lhu $t6, ($a2)
|
||||
/* 009B54 80008F54 00042840 */ sll $a1, $a0, 1
|
||||
/* 009B58 80008F58 3C088016 */ lui $t0, %hi(D_80164438) # 0x8016
|
||||
@@ -42,11 +42,11 @@ glabel func_80008F38
|
||||
.L80008FD4:
|
||||
/* 009BD4 80008FD4 46103003 */ div.s $f0, $f6, $f16
|
||||
/* 009BD8 80008FD8 44832000 */ mtc1 $v1, $f4
|
||||
/* 009BDC 80008FDC 3C018016 */ lui $at, %hi(D_801644A8)
|
||||
/* 009BDC 80008FDC 3C018016 */ lui $at, %hi(gLapCompletionPercentByPlayerId)
|
||||
/* 009BE0 80008FE0 00220821 */ addu $at, $at, $v0
|
||||
/* 009BE4 80008FE4 46802220 */ cvt.s.w $f8, $f4
|
||||
/* 009BE8 80008FE8 46080280 */ add.s $f10, $f0, $f8
|
||||
/* 009BEC 80008FEC E42044A8 */ swc1 $f0, %lo(D_801644A8)($at)
|
||||
/* 009BEC 80008FEC E42044A8 */ swc1 $f0, %lo(gLapCompletionPercentByPlayerId)($at)
|
||||
/* 009BF0 80008FF0 3C018016 */ lui $at, %hi(gCourseCompletionPercentByPlayerId)
|
||||
/* 009BF4 80008FF4 00220821 */ addu $at, $at, $v0
|
||||
/* 009BF8 80008FF8 03E00008 */ jr $ra
|
||||
|
||||
@@ -110,12 +110,12 @@ glabel func_8000929C
|
||||
.L8000943C:
|
||||
/* 00A03C 8000943C C426CFA8 */ lwc1 $f6, %lo(D_800ECFA8)($at)
|
||||
/* 00A040 80009440 00045080 */ sll $t2, $a0, 2
|
||||
/* 00A044 80009444 3C0B8016 */ lui $t3, %hi(lapCount) # 0x8016
|
||||
/* 00A044 80009444 3C0B8016 */ lui $t3, %hi(gLapCountByPlayerId) # 0x8016
|
||||
/* 00A048 80009448 4606603C */ c.lt.s $f12, $f6
|
||||
/* 00A04C 8000944C 016A5821 */ addu $t3, $t3, $t2
|
||||
/* 00A050 80009450 45000028 */ bc1f .L800094F4
|
||||
/* 00A054 80009454 00000000 */ nop
|
||||
/* 00A058 80009458 8D6B4390 */ lw $t3, %lo(lapCount)($t3) # 0x4390($t3)
|
||||
/* 00A058 80009458 8D6B4390 */ lw $t3, %lo(gLapCountByPlayerId)($t3) # 0x4390($t3)
|
||||
/* 00A05C 8000945C 29610002 */ slti $at, $t3, 2
|
||||
/* 00A060 80009460 10200024 */ beqz $at, .L800094F4
|
||||
/* 00A064 80009464 00000000 */ nop
|
||||
@@ -141,12 +141,12 @@ glabel func_8000929C
|
||||
.L800094B0:
|
||||
/* 00A0B0 800094B0 C42ACFAC */ lwc1 $f10, %lo(D_800ECFAC)($at)
|
||||
/* 00A0B4 800094B4 00046880 */ sll $t5, $a0, 2
|
||||
/* 00A0B8 800094B8 3C0E8016 */ lui $t6, %hi(lapCount) # 0x8016
|
||||
/* 00A0B8 800094B8 3C0E8016 */ lui $t6, %hi(gLapCountByPlayerId) # 0x8016
|
||||
/* 00A0BC 800094BC 460C503C */ c.lt.s $f10, $f12
|
||||
/* 00A0C0 800094C0 01CD7021 */ addu $t6, $t6, $t5
|
||||
/* 00A0C4 800094C4 4500000B */ bc1f .L800094F4
|
||||
/* 00A0C8 800094C8 00000000 */ nop
|
||||
/* 00A0CC 800094CC 8DCE4390 */ lw $t6, %lo(lapCount)($t6) # 0x4390($t6)
|
||||
/* 00A0CC 800094CC 8DCE4390 */ lw $t6, %lo(gLapCountByPlayerId)($t6) # 0x4390($t6)
|
||||
/* 00A0D0 800094D0 29C10002 */ slti $at, $t6, 2
|
||||
/* 00A0D4 800094D4 10200007 */ beqz $at, .L800094F4
|
||||
/* 00A0D8 800094D8 00000000 */ nop
|
||||
@@ -178,8 +178,8 @@ glabel func_8000929C
|
||||
/* 00A134 80009534 4500004B */ bc1f .L80009664
|
||||
/* 00A138 80009538 00000000 */ nop
|
||||
/* 00A13C 8000953C 4604003C */ c.lt.s $f0, $f4
|
||||
/* 00A140 80009540 3C188016 */ lui $t8, %hi(lapCount) # $t8, 0x8016
|
||||
/* 00A144 80009544 27184390 */ addiu $t8, %lo(lapCount) # addiu $t8, $t8, 0x4390
|
||||
/* 00A140 80009540 3C188016 */ lui $t8, %hi(gLapCountByPlayerId) # $t8, 0x8016
|
||||
/* 00A144 80009544 27184390 */ addiu $t8, %lo(gLapCountByPlayerId) # addiu $t8, $t8, 0x4390
|
||||
/* 00A148 80009548 00F81021 */ addu $v0, $a3, $t8
|
||||
/* 00A14C 8000954C 45000045 */ bc1f .L80009664
|
||||
/* 00A150 80009550 00000000 */ nop
|
||||
@@ -196,9 +196,9 @@ glabel func_8000929C
|
||||
/* 00A17C 8000957C 01876021 */ addu $t4, $t4, $a3
|
||||
/* 00A180 80009580 8D8C4408 */ lw $t4, %lo(D_80164408)($t4) # 0x4408($t4)
|
||||
/* 00A184 80009584 24010007 */ li $at, 7
|
||||
/* 00A188 80009588 3C028016 */ lui $v0, %hi(lapCount) # $v0, 0x8016
|
||||
/* 00A188 80009588 3C028016 */ lui $v0, %hi(gLapCountByPlayerId) # $v0, 0x8016
|
||||
/* 00A18C 8000958C 15810011 */ bne $t4, $at, .L800095D4
|
||||
/* 00A190 80009590 24424390 */ addiu $v0, %lo(lapCount) # addiu $v0, $v0, 0x4390
|
||||
/* 00A190 80009590 24424390 */ addiu $v0, %lo(gLapCountByPlayerId) # addiu $v0, $v0, 0x4390
|
||||
/* 00A194 80009594 3C038016 */ lui $v1, %hi(D_801643B0) # $v1, 0x8016
|
||||
/* 00A198 80009598 246343B0 */ addiu $v1, %lo(D_801643B0) # addiu $v1, $v1, 0x43b0
|
||||
.L8000959C:
|
||||
@@ -265,8 +265,8 @@ glabel func_8000929C
|
||||
/* 00A280 80009680 4502000E */ bc1fl .L800096BC
|
||||
/* 00A284 80009684 C7AA0044 */ lwc1 $f10, 0x44($sp)
|
||||
/* 00A288 80009688 4608003C */ c.lt.s $f0, $f8
|
||||
/* 00A28C 8000968C 3C0A8016 */ lui $t2, %hi(lapCount) # $t2, 0x8016
|
||||
/* 00A290 80009690 254A4390 */ addiu $t2, %lo(lapCount) # addiu $t2, $t2, 0x4390
|
||||
/* 00A28C 8000968C 3C0A8016 */ lui $t2, %hi(gLapCountByPlayerId) # $t2, 0x8016
|
||||
/* 00A290 80009690 254A4390 */ addiu $t2, %lo(gLapCountByPlayerId) # addiu $t2, $t2, 0x4390
|
||||
/* 00A294 80009694 00EA1021 */ addu $v0, $a3, $t2
|
||||
/* 00A298 80009698 45020008 */ bc1fl .L800096BC
|
||||
/* 00A29C 8000969C C7AA0044 */ lwc1 $f10, 0x44($sp)
|
||||
|
||||
@@ -58,10 +58,10 @@ glabel func_80009B60
|
||||
/* 00A83C 80009C3C 3C018016 */ lui $at, %hi(gCourseCompletionPercentByPlayerId)
|
||||
/* 00A840 80009C40 00270821 */ addu $at, $at, $a3
|
||||
/* 00A844 80009C44 E42044D0 */ swc1 $f0, %lo(gCourseCompletionPercentByPlayerId)($at)
|
||||
/* 00A848 80009C48 3C018016 */ lui $at, %hi(D_801644A8)
|
||||
/* 00A848 80009C48 3C018016 */ lui $at, %hi(gLapCompletionPercentByPlayerId)
|
||||
/* 00A84C 80009C4C 00270821 */ addu $at, $at, $a3
|
||||
/* 00A850 80009C50 10000537 */ b .L8000B130
|
||||
/* 00A854 80009C54 E42044A8 */ swc1 $f0, %lo(D_801644A8)($at)
|
||||
/* 00A854 80009C54 E42044A8 */ swc1 $f0, %lo(gLapCompletionPercentByPlayerId)($at)
|
||||
.L80009C58:
|
||||
/* 00A858 80009C58 00D81021 */ addu $v0, $a2, $t8
|
||||
/* 00A85C 80009C5C A4400000 */ sh $zero, ($v0)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
glabel func_8000F628
|
||||
/* 010228 8000F628 27BDFEE0 */ addiu $sp, $sp, -0x120
|
||||
/* 01022C 8000F62C 3C0E8016 */ lui $t6, %hi(D_80163210) # $t6, 0x8016
|
||||
/* 010230 8000F630 3C0F8016 */ lui $t7, %hi(lapCount) # $t7, 0x8016
|
||||
/* 010234 8000F634 25EF4390 */ addiu $t7, %lo(lapCount) # addiu $t7, $t7, 0x4390
|
||||
/* 010230 8000F630 3C0F8016 */ lui $t7, %hi(gLapCountByPlayerId) # $t7, 0x8016
|
||||
/* 010234 8000F634 25EF4390 */ addiu $t7, %lo(gLapCountByPlayerId) # addiu $t7, $t7, 0x4390
|
||||
/* 010238 8000F638 25CE3210 */ addiu $t6, %lo(D_80163210) # addiu $t6, $t6, 0x3210
|
||||
/* 01023C 8000F63C AFAE00D4 */ sw $t6, 0xd4($sp)
|
||||
/* 010240 8000F640 AFAF00D0 */ sw $t7, 0xd0($sp)
|
||||
|
||||
@@ -59,12 +59,12 @@ glabel L8001ACAC
|
||||
/* 01B8F0 8001ACF0 14200018 */ bnez $at, .L8001AD54
|
||||
/* 01B8F4 8001ACF4 00000000 */ nop
|
||||
/* 01B8F8 8001ACF8 860B0006 */ lh $t3, 6($s0)
|
||||
/* 01B8FC 8001ACFC 3C038016 */ lui $v1, %hi(lapCount) # 0x8016
|
||||
/* 01B8FC 8001ACFC 3C038016 */ lui $v1, %hi(gLapCountByPlayerId) # 0x8016
|
||||
/* 01B900 8001AD00 00621821 */ addu $v1, $v1, $v0
|
||||
/* 01B904 8001AD04 29610003 */ slti $at, $t3, 3
|
||||
/* 01B908 8001AD08 10200012 */ beqz $at, .L8001AD54
|
||||
/* 01B90C 8001AD0C 00000000 */ nop
|
||||
/* 01B910 8001AD10 8C634390 */ lw $v1, %lo(lapCount)($v1) # 0x4390($v1)
|
||||
/* 01B910 8001AD10 8C634390 */ lw $v1, %lo(gLapCountByPlayerId)($v1) # 0x4390($v1)
|
||||
/* 01B914 8001AD14 3C068016 */ lui $a2, %hi(gPlayerPositions) # $a2, 0x8016
|
||||
/* 01B918 8001AD18 24C643B8 */ addiu $a2, %lo(gPlayerPositions) # addiu $a2, $a2, 0x43b8
|
||||
/* 01B91C 8001AD1C 28610003 */ slti $at, $v1, 3
|
||||
@@ -89,11 +89,11 @@ glabel L8001ACAC
|
||||
/* 01B960 8001AD60 86020004 */ lh $v0, 4($s0)
|
||||
glabel L8001AD64
|
||||
/* 01B964 8001AD64 8FA20030 */ lw $v0, 0x30($sp)
|
||||
/* 01B968 8001AD68 3C0E8016 */ lui $t6, %hi(lapCount) # 0x8016
|
||||
/* 01B968 8001AD68 3C0E8016 */ lui $t6, %hi(gLapCountByPlayerId) # 0x8016
|
||||
/* 01B96C 8001AD6C 3C068016 */ lui $a2, %hi(gPlayerPositions) # $a2, 0x8016
|
||||
/* 01B970 8001AD70 00027880 */ sll $t7, $v0, 2
|
||||
/* 01B974 8001AD74 01CF7021 */ addu $t6, $t6, $t7
|
||||
/* 01B978 8001AD78 8DCE4390 */ lw $t6, %lo(lapCount)($t6) # 0x4390($t6)
|
||||
/* 01B978 8001AD78 8DCE4390 */ lw $t6, %lo(gLapCountByPlayerId)($t6) # 0x4390($t6)
|
||||
/* 01B97C 8001AD7C 24C643B8 */ addiu $a2, %lo(gPlayerPositions) # addiu $a2, $a2, 0x43b8
|
||||
/* 01B980 8001AD80 3C038016 */ lui $v1, %hi(D_80163478) # $v1, 0x8016
|
||||
/* 01B984 8001AD84 19C0004B */ blez $t6, .L8001AEB4
|
||||
|
||||
@@ -17,13 +17,13 @@ glabel func_80050320
|
||||
/* 050F5C 8005035C 3C128019 */ lui $s2, %hi(D_8018D050) # $s2, 0x8019
|
||||
/* 050F60 80050360 3C178019 */ lui $s7, %hi(D_8018D3E0) # $s7, 0x8019
|
||||
/* 050F64 80050364 3C15800E */ lui $s5, %hi(gPlayerOne) # $s5, 0x800e
|
||||
/* 050F68 80050368 3C148016 */ lui $s4, %hi(lapCount) # $s4, 0x8016
|
||||
/* 050F68 80050368 3C148016 */ lui $s4, %hi(gLapCountByPlayerId) # $s4, 0x8016
|
||||
/* 050F6C 8005036C 3C138019 */ lui $s3, %hi(D_8018D078) # $s3, 0x8019
|
||||
/* 050F70 80050370 4480B000 */ mtc1 $zero, $f22
|
||||
/* 050F74 80050374 4480A800 */ mtc1 $zero, $f21
|
||||
/* 050F78 80050378 4480A000 */ mtc1 $zero, $f20
|
||||
/* 050F7C 8005037C 2673D078 */ addiu $s3, %lo(D_8018D078) # addiu $s3, $s3, -0x2f88
|
||||
/* 050F80 80050380 26944390 */ addiu $s4, %lo(lapCount) # addiu $s4, $s4, 0x4390
|
||||
/* 050F80 80050380 26944390 */ addiu $s4, %lo(gLapCountByPlayerId) # addiu $s4, $s4, 0x4390
|
||||
/* 050F84 80050384 26B5C4DC */ addiu $s5, %lo(gPlayerOne) # addiu $s5, $s5, -0x3b24
|
||||
/* 050F88 80050388 26F7D3E0 */ addiu $s7, %lo(D_8018D3E0) # addiu $s7, $s7, -0x2c20
|
||||
/* 050F8C 8005038C 2652D050 */ addiu $s2, %lo(D_8018D050) # addiu $s2, $s2, -0x2fb0
|
||||
@@ -103,13 +103,13 @@ glabel func_80050320
|
||||
.L800504A4:
|
||||
/* 0510A4 800504A4 3C128019 */ lui $s2, %hi(D_8018D050) # $s2, 0x8019
|
||||
/* 0510A8 800504A8 3C15800E */ lui $s5, %hi(gPlayerOne) # $s5, 0x800e
|
||||
/* 0510AC 800504AC 3C148016 */ lui $s4, %hi(lapCount) # $s4, 0x8016
|
||||
/* 0510AC 800504AC 3C148016 */ lui $s4, %hi(gLapCountByPlayerId) # $s4, 0x8016
|
||||
/* 0510B0 800504B0 3C138019 */ lui $s3, %hi(D_8018D078) # $s3, 0x8019
|
||||
/* 0510B4 800504B4 4480B000 */ mtc1 $zero, $f22
|
||||
/* 0510B8 800504B8 4480A800 */ mtc1 $zero, $f21
|
||||
/* 0510BC 800504BC 4480A000 */ mtc1 $zero, $f20
|
||||
/* 0510C0 800504C0 2673D078 */ addiu $s3, %lo(D_8018D078) # addiu $s3, $s3, -0x2f88
|
||||
/* 0510C4 800504C4 26944390 */ addiu $s4, %lo(lapCount) # addiu $s4, $s4, 0x4390
|
||||
/* 0510C4 800504C4 26944390 */ addiu $s4, %lo(gLapCountByPlayerId) # addiu $s4, $s4, 0x4390
|
||||
/* 0510C8 800504C8 26B5C4DC */ addiu $s5, %lo(gPlayerOne) # addiu $s5, $s5, -0x3b24
|
||||
/* 0510CC 800504CC 2652D050 */ addiu $s2, %lo(D_8018D050) # addiu $s2, $s2, -0x2fb0
|
||||
/* 0510D0 800504D0 00008025 */ move $s0, $zero
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
glabel func_80050644
|
||||
/* 051244 80050644 308EFFFF */ andi $t6, $a0, 0xffff
|
||||
/* 051248 80050648 000E4080 */ sll $t0, $t6, 2
|
||||
/* 05124C 8005064C 3C078016 */ lui $a3, %hi(lapCount) # 0x8016
|
||||
/* 05124C 8005064C 3C078016 */ lui $a3, %hi(gLapCountByPlayerId) # 0x8016
|
||||
/* 051250 80050650 00E83821 */ addu $a3, $a3, $t0
|
||||
/* 051254 80050654 8CE74390 */ lw $a3, %lo(lapCount)($a3) # 0x4390($a3)
|
||||
/* 051254 80050654 8CE74390 */ lw $a3, %lo(gLapCountByPlayerId)($a3) # 0x4390($a3)
|
||||
/* 051258 80050658 AFA40000 */ sw $a0, ($sp)
|
||||
/* 05125C 8005065C 00001825 */ move $v1, $zero
|
||||
/* 051260 80050660 28E10003 */ slti $at, $a3, 3
|
||||
@@ -15,9 +15,9 @@ glabel func_80050644
|
||||
/* 051278 80050678 15E1002A */ bne $t7, $at, .L80050724
|
||||
/* 05127C 8005067C 00000000 */ nop
|
||||
/* 051280 80050680 04E0000A */ bltz $a3, .L800506AC
|
||||
/* 051284 80050684 3C018016 */ lui $at, %hi(D_801644A8)
|
||||
/* 051284 80050684 3C018016 */ lui $at, %hi(gLapCompletionPercentByPlayerId)
|
||||
/* 051288 80050688 00280821 */ addu $at, $at, $t0
|
||||
/* 05128C 8005068C C42444A8 */ lwc1 $f4, %lo(D_801644A8)($at)
|
||||
/* 05128C 8005068C C42444A8 */ lwc1 $f4, %lo(gLapCompletionPercentByPlayerId)($at)
|
||||
/* 051290 80050690 3C014468 */ li $at, 0x44680000 # 928.000000
|
||||
/* 051294 80050694 44813000 */ mtc1 $at, $f6
|
||||
/* 051298 80050698 00000000 */ nop
|
||||
@@ -65,9 +65,9 @@ glabel func_80050644
|
||||
|
||||
.L80050724:
|
||||
/* 051324 80050724 04E0000A */ bltz $a3, .L80050750
|
||||
/* 051328 80050728 3C018016 */ lui $at, %hi(D_801644A8)
|
||||
/* 051328 80050728 3C018016 */ lui $at, %hi(gLapCompletionPercentByPlayerId)
|
||||
/* 05132C 8005072C 00280821 */ addu $at, $at, $t0
|
||||
/* 051330 80050730 C43044A8 */ lwc1 $f16, %lo(D_801644A8)($at)
|
||||
/* 051330 80050730 C43044A8 */ lwc1 $f16, %lo(gLapCompletionPercentByPlayerId)($at)
|
||||
/* 051334 80050734 3C014382 */ li $at, 0x43820000 # 260.000000
|
||||
/* 051338 80050738 44819000 */ mtc1 $at, $f18
|
||||
/* 05133C 8005073C 00000000 */ nop
|
||||
@@ -100,9 +100,9 @@ glabel func_80050644
|
||||
/* 05139C 8005079C ACCB0000 */ sw $t3, ($a2)
|
||||
|
||||
.L800507A0:
|
||||
/* 0513A0 800507A0 3C018016 */ lui $at, %hi(D_801644A8)
|
||||
/* 0513A0 800507A0 3C018016 */ lui $at, %hi(gLapCompletionPercentByPlayerId)
|
||||
/* 0513A4 800507A4 00280821 */ addu $at, $at, $t0
|
||||
/* 0513A8 800507A8 C42844A8 */ lwc1 $f8, %lo(D_801644A8)($at)
|
||||
/* 0513A8 800507A8 C42844A8 */ lwc1 $f8, %lo(gLapCompletionPercentByPlayerId)($at)
|
||||
/* 0513AC 800507AC 3C014382 */ li $at, 0x43820000 # 260.000000
|
||||
/* 0513B0 800507B0 44815000 */ mtc1 $at, $f10
|
||||
/* 0513B4 800507B4 00000000 */ nop
|
||||
|
||||
@@ -20,9 +20,9 @@ glabel func_800508C0
|
||||
/* 051500 80050900 0C014191 */ jal func_80050644
|
||||
/* 051504 80050904 27A60050 */ addiu $a2, $sp, 0x50
|
||||
/* 051508 80050908 00107880 */ sll $t7, $s0, 2
|
||||
/* 05150C 8005090C 3C038016 */ lui $v1, %hi(lapCount) # 0x8016
|
||||
/* 05150C 8005090C 3C038016 */ lui $v1, %hi(gLapCountByPlayerId) # 0x8016
|
||||
/* 051510 80050910 006F1821 */ addu $v1, $v1, $t7
|
||||
/* 051514 80050914 8C634390 */ lw $v1, %lo(lapCount)($v1) # 0x4390($v1)
|
||||
/* 051514 80050914 8C634390 */ lw $v1, %lo(gLapCountByPlayerId)($v1) # 0x4390($v1)
|
||||
/* 051518 80050918 AFA2004C */ sw $v0, 0x4c($sp)
|
||||
/* 05151C 8005091C 24010001 */ li $at, 1
|
||||
/* 051520 80050920 18600037 */ blez $v1, .L80050A00
|
||||
|
||||
@@ -13,7 +13,7 @@ glabel func_80050E34
|
||||
/* 051A60 80050E60 3C0E800E */ lui $t6, %hi(gPlayerCountSelection1) # $t6, 0x800e
|
||||
/* 051A64 80050E64 8DCEC538 */ lw $t6, %lo(gPlayerCountSelection1)($t6)
|
||||
/* 051A68 80050E68 AFB00024 */ sw $s0, 0x24($sp)
|
||||
/* 051A6C 80050E6C 3C108016 */ lui $s0, %hi(lapCount) # 0x8016
|
||||
/* 051A6C 80050E6C 3C108016 */ lui $s0, %hi(gLapCountByPlayerId) # 0x8016
|
||||
/* 051A70 80050E70 0004C080 */ sll $t8, $a0, 2
|
||||
/* 051A74 80050E74 0004C940 */ sll $t9, $a0, 5
|
||||
/* 051A78 80050E78 3C0D8019 */ lui $t5, %hi(D_8018CE24) # 0x8019
|
||||
@@ -25,7 +25,7 @@ glabel func_80050E34
|
||||
/* 051A90 80050E90 01B96821 */ addu $t5, $t5, $t9
|
||||
/* 051A94 80050E94 24010001 */ li $at, 1
|
||||
/* 051A98 80050E98 00803825 */ move $a3, $a0
|
||||
/* 051A9C 80050E9C 8E104390 */ lw $s0, %lo(lapCount)($s0) # 0x4390($s0)
|
||||
/* 051A9C 80050E9C 8E104390 */ lw $s0, %lo(gLapCountByPlayerId)($s0) # 0x4390($s0)
|
||||
/* 051AA0 80050EA0 94510254 */ lhu $s1, 0x254($v0)
|
||||
/* 051AA4 80050EA4 15C10004 */ bne $t6, $at, .L80050EB8
|
||||
/* 051AA8 80050EA8 8DADCE24 */ lw $t5, %lo(D_8018CE24)($t5) # -0x31dc($t5)
|
||||
|
||||
@@ -3,12 +3,12 @@ glabel func_8005A14C
|
||||
/* 05AD50 8005A150 01C47023 */ subu $t6, $t6, $a0
|
||||
/* 05AD54 8005A154 000E7100 */ sll $t6, $t6, 4
|
||||
/* 05AD58 8005A158 0004C880 */ sll $t9, $a0, 2
|
||||
/* 05AD5C 8005A15C 3C098016 */ lui $t1, %hi(lapCount)
|
||||
/* 05AD5C 8005A15C 3C098016 */ lui $t1, %hi(gLapCountByPlayerId)
|
||||
/* 05AD60 8005A160 01C47023 */ subu $t6, $t6, $a0
|
||||
/* 05AD64 8005A164 3C0F800E */ lui $t7, %hi(gPlayerOne) # $t7, 0x800e
|
||||
/* 05AD68 8005A168 01394821 */ addu $t1, $t1, $t9
|
||||
/* 05AD6C 8005A16C 8DEFC4DC */ lw $t7, %lo(gPlayerOne)($t7)
|
||||
/* 05AD70 8005A170 8D294390 */ lw $t1, %lo(lapCount)($t1)
|
||||
/* 05AD70 8005A170 8D294390 */ lw $t1, %lo(gLapCountByPlayerId)($t1)
|
||||
/* 05AD74 8005A174 27BDFFD0 */ addiu $sp, $sp, -0x30
|
||||
/* 05AD78 8005A178 000E7080 */ sll $t6, $t6, 2
|
||||
/* 05AD7C 8005A17C 01C47023 */ subu $t6, $t6, $a0
|
||||
|
||||
@@ -125,8 +125,8 @@ glabel func_8028F970
|
||||
/* 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(lapCount) # $v0, 0x8016
|
||||
/* 0F915C 8028FB4C 24424390 */ addiu $v0, %lo(lapCount) # addiu $v0, $v0, 0x4390
|
||||
/* 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
|
||||
@@ -135,9 +135,9 @@ glabel func_8028F970
|
||||
/* 0F9174 8028FB64 AC430000 */ sw $v1, ($v0)
|
||||
/* 0F9178 8028FB68 94A40006 */ lhu $a0, 6($a1)
|
||||
.L8028FB6C:
|
||||
/* 0F917C 8028FB6C 3C028016 */ lui $v0, %hi(lapCount) # $v0, 0x8016
|
||||
/* 0F917C 8028FB6C 3C028016 */ lui $v0, %hi(gLapCountByPlayerId) # $v0, 0x8016
|
||||
/* 0F9180 8028FB70 308F0100 */ andi $t7, $a0, 0x100
|
||||
/* 0F9184 8028FB74 24424390 */ addiu $v0, %lo(lapCount) # addiu $v0, $v0, 0x4390
|
||||
/* 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)
|
||||
|
||||
@@ -5,8 +5,8 @@ glabel func_80005B18
|
||||
/* 006724 80005B24 24030001 */ li $v1, 1
|
||||
/* 006728 80005B28 146400CC */ bne $v1, $a0, .L80005E5C
|
||||
/* 00672C 80005B2C AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 006730 80005B30 3C088016 */ lui $t0, %hi(lapCount) # $t0, 0x8016
|
||||
/* 006734 80005B34 25084390 */ addiu $t0, %lo(lapCount) # addiu $t0, $t0, 0x4390
|
||||
/* 006730 80005B30 3C088016 */ lui $t0, %hi(gLapCountByPlayerId) # $t0, 0x8016
|
||||
/* 006734 80005B34 25084390 */ addiu $t0, %lo(gLapCountByPlayerId) # addiu $t0, $t0, 0x4390
|
||||
/* 006738 80005B38 8D020000 */ lw $v0, ($t0)
|
||||
/* 00673C 80005B3C 24060003 */ li $a2, 3
|
||||
/* 006740 80005B40 3C058016 */ lui $a1, %hi(D_80162DDC) # $a1, 0x8016
|
||||
@@ -194,8 +194,8 @@ glabel func_80005B18
|
||||
/* 006A00 80005E00 00000000 */ nop
|
||||
/* 006A04 80005E04 0C0015F7 */ jal func_800057DC
|
||||
/* 006A08 80005E08 00000000 */ nop
|
||||
/* 006A0C 80005E0C 3C088016 */ lui $t0, %hi(lapCount) # $t0, 0x8016
|
||||
/* 006A10 80005E10 25084390 */ addiu $t0, %lo(lapCount) # addiu $t0, $t0, 0x4390
|
||||
/* 006A0C 80005E0C 3C088016 */ lui $t0, %hi(gLapCountByPlayerId) # $t0, 0x8016
|
||||
/* 006A10 80005E10 25084390 */ addiu $t0, %lo(gLapCountByPlayerId) # addiu $t0, $t0, 0x4390
|
||||
/* 006A14 80005E14 24060003 */ li $a2, 3
|
||||
.L80005E18:
|
||||
/* 006A18 80005E18 3C198016 */ lui $t9, %hi(D_80162DD4+0x2) # $t9, 0x8016
|
||||
|
||||
+49
-34
@@ -52,6 +52,31 @@ typedef enum {
|
||||
/* 0x10 */ NUM_TIME_TRIAL_DATA
|
||||
} TIME_TRIAL_DATA_INDEX;
|
||||
|
||||
enum SURFACE_TYPE {
|
||||
/* 0x00 */ AIRBORNE,
|
||||
/* 0x01 */ PAVEMENT, // Luigi's Raceway, Toad's Turnpike, Koopa Troop beach shortcut tunnel, Mario Raceway, Royal Raceway, Rainbow Road, Block Fort, Double Deck, Skyscraper
|
||||
/* 0x02 */ SAND_ONE, // Luigi's Raceway, Moo Moo Farm, Kalimiari Desert on course, Choco Mountain, Wario Stadium, DK Jungle on course, Yoshi Valley
|
||||
/* 0x03 */ SAND_TWO, // Koopa Troopa Beach light color, Royal Raceway
|
||||
/* 0x04 */ STONE_TWO, // Royal Raceway castle entrance, Bowser's Castle
|
||||
/* 0x05 */ SNOW_ONE, // Frappe Snowland on course, Sherber Land tunnel
|
||||
/* 0x06 */ STONE_ONE, // Royal Raceway castle bridges (even the wooden one), Banshee's Boardwalk, Big Donut
|
||||
/* 0x07 */ SAND_FIVE, // Mario Raceway
|
||||
/* 0x08 */ GRASS, // Luigi's Raceway, Mario Raceway, Royal Raceway, Bowser's Castle, DK Jungle, Yoshi Valley
|
||||
/* 0x09 */ ICE, // Sherbert Land
|
||||
/* 0x0A */ SAND_THREE, // Koop Troopa Beach dark color
|
||||
/* 0x0B */ SNOW_TWO, // Frappe Snowland off course
|
||||
/* 0x0C */ CLIFF, // Koopa Troopa Beach, Choco Mountain
|
||||
/* 0x0D */ SAND_FOUR, // Kalimari Desert off course
|
||||
/* 0x0E */ TRAIN_TRACK, // Kalimari Desert
|
||||
/* 0x0F */ DIRT, // DK Jungle cave
|
||||
/* 0x10 */ WOOD_TWO, // Bowser's Castle bridge 2, DK Jungle bridge
|
||||
/* 0x11 */ WOOD_ONE, // Frappe Snowland bridge, Bowser's Castle bridge 1,3, Yoshi Valley bridge 2
|
||||
/* 0xFC */ BOOST_PAD_TWO = 0xFC, // DK Jungle
|
||||
/* 0xFD */ OUT_OF_BOUNDS, // DK Jungle river island
|
||||
/* 0xFE */ BOOST_PAD_ONE, // Royal Raceway
|
||||
/* 0xFF */ RAMP // Koopa Troopa beach
|
||||
};
|
||||
|
||||
// This was added as a silly idea:
|
||||
// In the data to use "A, B, Z, R" instead of hex numbers.
|
||||
typedef enum {
|
||||
@@ -165,12 +190,33 @@ typedef struct {
|
||||
/* 0x46 */ s16 unk_046;
|
||||
} UnkPlayerStruct258; // size = 0x48
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ f32 cornerX;
|
||||
/* 0x04 */ f32 cornerY;
|
||||
/* 0x08 */ f32 cornerZ;
|
||||
// Type of surface the corner is above
|
||||
/* 0x0C */ u8 surfaceType;
|
||||
/* 0x0D */ u8 unk_0D;
|
||||
// Don't know if "tile" is right the right term
|
||||
// D_8015F580 is a pointer to an array of "tile" structs. This is an index to that array
|
||||
/* 0x0E */ u16 tileIndex;
|
||||
// cornerX/Y/Z place the corner "in the air" as it were, this member indicates the Y position of the corner's "on the ground" sibling
|
||||
// On flat ground this value should be cornerY - gKartBoundingBoxTable[characterId]
|
||||
/* 0x10 */ f32 cornerGroundY;
|
||||
/* 0x14 */ s32 unk_14;
|
||||
} kartBoundingBoxCorner; // size = 0x18
|
||||
|
||||
#define FRONT_LEFT_TYRE 0
|
||||
#define FRONT_RIGHT_TYRE 1
|
||||
#define BACK_LEFT_TYRE 2
|
||||
#define BACK_RIGHT_TYRE 3
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ u16 unk_000;
|
||||
/* 0x0002 */ u16 unk_002;
|
||||
/* 0x0004 */ s16 unk_004; // currentPosition
|
||||
/* 0x0004 */ s16 currentRank;
|
||||
/* 0x0006 */ u16 unk_006;
|
||||
/* 0x0008 */ s16 unk_008; // lapCount?
|
||||
/* 0x0008 */ s16 lapCount;
|
||||
/* 0x000A */ char unk_00A[0x2];
|
||||
/* 0x000C */ s32 unk_00C;
|
||||
/* 0x0010 */ s16 unk_010;
|
||||
@@ -269,38 +315,7 @@ typedef struct {
|
||||
/* 0x014C */ char unk_14C[0x4];
|
||||
/* 0x0150 */ f32 unk_150[9];
|
||||
/* 0x0174 */ f32 unk_174[9];
|
||||
/* 0x0198 */ f32 unk_198;
|
||||
/* 0x019C */ f32 unk_19C;
|
||||
/* 0x01A0 */ f32 unk_1A0;
|
||||
/* 0x01A4 */ s8 frontLeftTyreSurface;
|
||||
/* 0x01A5 */ s8 unk_1A5;
|
||||
/* 0x01A6 */ s16 unk_1A6;
|
||||
/* 0x01A8 */ f32 unk_1A8;
|
||||
/* 0x01AC */ s32 unk_1AC;
|
||||
/* 0x01B0 */ f32 unk_1B0;
|
||||
/* 0x01B4 */ f32 unk_1B4;
|
||||
/* 0x01B8 */ f32 unk_1B8;
|
||||
/* 0x01BC */ s8 frontRightTyreSurface;
|
||||
/* 0x01BD */ s8 unk_1BD;
|
||||
/* 0x01BE */ s16 unk_1BE;
|
||||
/* 0x01C0 */ f32 unk_1C0;
|
||||
/* 0x01C4 */ s32 unk_1C4;
|
||||
/* 0x01C8 */ f32 unk_1C8;
|
||||
/* 0x01CC */ f32 unk_1CC;
|
||||
/* 0x01D0 */ f32 unk_1D0;
|
||||
/* 0x01D4 */ s8 backLeftTyreSurface;
|
||||
/* 0x01D5 */ s8 unk_1D5;
|
||||
/* 0x01D6 */ s16 unk_1D6;
|
||||
/* 0x01D8 */ f32 unk_1D8;
|
||||
/* 0x01DC */ s32 unk_1DC;
|
||||
/* 0x01E0 */ f32 unk_1E0;
|
||||
/* 0x01E4 */ f32 unk_1E4;
|
||||
/* 0x01E8 */ f32 unk_1E8;
|
||||
/* 0x01EC */ s8 backRightTyreSurface;
|
||||
/* 0x01ED */ s8 unk_1ED;
|
||||
/* 0x01EE */ s16 unk_1EE;
|
||||
/* 0x01F0 */ f32 unk_1F0;
|
||||
/* 0x01F4 */ s32 unk_1F4;
|
||||
/* 0x0198 */ kartBoundingBoxCorner boundingBoxCorners[4];
|
||||
/* 0x01F8 */ f32 unk_1F8;
|
||||
/* 0x01FC */ f32 unk_1FC;
|
||||
/* 0x0200 */ s32 unk_200;
|
||||
|
||||
@@ -13,7 +13,6 @@ f32 func_802AE1C0(f32 arg0, f32 arg1, f32 arg2);
|
||||
void func_802B6540(f32* arg0, f32 arg1, f32 arg2, f32 arg3, s16 arg4);
|
||||
void func_80295BF8(s32 arg0);
|
||||
void func_8005D6C0(Player* player);
|
||||
void func_8006B87C(Player* player, s32 arg1);
|
||||
void func_8006B7E4(Player* player, s32 arg1);
|
||||
void func_8002D268(Player* player, s32 arg1, s8 arg2, s8 arg3);
|
||||
void func_8002934C(Player* player, s32 arg1, s8 arg2, s8 arg3);
|
||||
|
||||
+7
-2
@@ -5,6 +5,8 @@
|
||||
#include "defines.h"
|
||||
#include "common_structs.h"
|
||||
|
||||
extern s32 gActiveScreenMode; // D_800DC52C
|
||||
|
||||
extern s32 gCCSelection; // D_800DC548
|
||||
extern s8 gCharacterIdByGPOverallRank[8]; // D_8018D9D0
|
||||
extern s8 gCharacterGridSelections[4]; // D_8018EDE4
|
||||
@@ -43,6 +45,9 @@ extern f32 gKartFrictionTable[];
|
||||
extern f32 gKartBoundingBoxTable[];
|
||||
extern f32 gKartGravityTable[];
|
||||
|
||||
extern f32 gLapCompletionPercentByPlayerId[8]; // D_801644A8
|
||||
extern s32 gLapCountByPlayerId[8]; // D_80164390
|
||||
|
||||
extern s32 gMenuTimingCounter; // D_8018EE00
|
||||
extern s32 gMenuSelection; // D_800E86A0
|
||||
extern s32 gModeSelection; // D_800DC53C
|
||||
@@ -59,6 +64,7 @@ extern s32 gPlayerPositions[]; // D_801643B8
|
||||
|
||||
extern u8 gSaveDataSoundMode; // D_8018ED14
|
||||
extern u8 gSaveDataSoundModeBackup; // D_8018ED8C
|
||||
//extern u32 gScreenModeSelection; // D_800DC530
|
||||
extern u32 gSegmentTable[16]; // D_80150258
|
||||
extern OSMesgQueue gSIEventMesgQueue; // D_8014F0B8
|
||||
extern u8 gSoundMode; // D_8018EDF2
|
||||
@@ -86,7 +92,7 @@ extern Player* gPlayerOneCopy;
|
||||
|
||||
extern SaveData D_8018EB90;
|
||||
|
||||
extern Mtx D_80183D60;
|
||||
extern Mtx D_80183D60[];
|
||||
|
||||
extern struct_D_8018CE10 D_8018CE10[];
|
||||
extern struct_D_802874D8 D_802874D8;
|
||||
@@ -103,7 +109,6 @@ extern Gfx D_0D0077A0[];
|
||||
|
||||
extern s32 D_800DC50C;
|
||||
extern u16 D_800DC51C;
|
||||
extern s32 gActiveScreenMode; // D_800DC52C
|
||||
extern s32 D_800DC540;
|
||||
extern u16 D_800DC5FC;
|
||||
|
||||
|
||||
+20
-20
@@ -1968,7 +1968,7 @@ extern ? D_80164376;
|
||||
extern s16 D_80164386;
|
||||
extern ? D_801643BA;
|
||||
extern ? D_80164450;
|
||||
extern ? D_801644A8;
|
||||
extern ? gLapCompletionPercentByPlayerId;
|
||||
extern ? D_80164538;
|
||||
extern u16 D_801645C8;
|
||||
extern ? gPlayers;
|
||||
@@ -2048,7 +2048,7 @@ extern ? gPlayers;
|
||||
phi_a1_2 = -temp_a2;
|
||||
}
|
||||
if (temp_t2 < 0x18) {
|
||||
temp_f0 = *(&D_801644A8 + temp_t0);
|
||||
temp_f0 = *(&gLapCompletionPercentByPlayerId + temp_t0);
|
||||
phi_a0 = (temp_a3->unk10 * temp_f0) + (temp_a3->unk0 * (1.0f - temp_f0));
|
||||
} else {
|
||||
phi_a0 = temp_a3->unk0;
|
||||
@@ -2072,7 +2072,7 @@ extern ? gPlayers;
|
||||
phi_a1_4 = -phi_a1_3;
|
||||
}
|
||||
if (temp_t2 < 0x18) {
|
||||
temp_f0_2 = *(&D_801644A8 + temp_t0);
|
||||
temp_f0_2 = *(&gLapCompletionPercentByPlayerId + temp_t0);
|
||||
phi_a0_2 = (temp_a3->unk10 * temp_f0_2) + (temp_a3->unk0 * (1.0f - temp_f0_2));
|
||||
} else {
|
||||
phi_a0_2 = temp_a3->unk0;
|
||||
@@ -2129,7 +2129,7 @@ extern ? gPlayers;
|
||||
}
|
||||
if (temp_t2 < 0x18) {
|
||||
temp_a2_2 = temp_a3 + (phi_t1 * 2);
|
||||
temp_f0_3 = *(&D_801644A8 + temp_t0);
|
||||
temp_f0_3 = *(&gLapCompletionPercentByPlayerId + temp_t0);
|
||||
phi_a0_5 = (temp_a2_2->unk10 * temp_f0_3) + (temp_a2_2->unk0 * (1.0f - temp_f0_3));
|
||||
} else {
|
||||
phi_a0_5 = *(temp_a3 + (phi_t1 * 2));
|
||||
@@ -2226,11 +2226,11 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80008E58.s")
|
||||
extern s16 D_80162FCE;
|
||||
extern ? D_80164438;
|
||||
extern ? D_80164450;
|
||||
extern ? D_801644A8;
|
||||
extern ? gLapCompletionPercentByPlayerId;
|
||||
extern ? gCourseCompletionPercentByPlayerId;
|
||||
extern ? D_801645B0;
|
||||
extern u16 D_801645C8;
|
||||
extern ? lapCount;
|
||||
extern ? gLapCountByPlayerId;
|
||||
|
||||
void func_80008F38(s32 arg0) {
|
||||
f32 temp_f0;
|
||||
@@ -2245,7 +2245,7 @@ void func_80008F38(s32 arg0) {
|
||||
f32 phi_f16;
|
||||
|
||||
temp_v0 = arg0 * 4;
|
||||
temp_v1 = *(&lapCount + temp_v0);
|
||||
temp_v1 = *(&gLapCountByPlayerId + temp_v0);
|
||||
temp_a1 = arg0 * 2;
|
||||
temp_t0 = *(&D_80164438 + temp_a1);
|
||||
temp_f6 = temp_t0;
|
||||
@@ -2261,7 +2261,7 @@ void func_80008F38(s32 arg0) {
|
||||
phi_f16 = temp_f16 + 4294967296.0f;
|
||||
}
|
||||
temp_f0 = phi_f6 / phi_f16;
|
||||
*(&D_801644A8 + temp_v0) = temp_f0;
|
||||
*(&gLapCompletionPercentByPlayerId + temp_v0) = temp_f0;
|
||||
*(&gCourseCompletionPercentByPlayerId + temp_v0) = temp_f0 + temp_v1;
|
||||
}
|
||||
#else
|
||||
@@ -2418,7 +2418,7 @@ extern s32 D_80164408;
|
||||
extern s32 D_8016440C;
|
||||
extern ? D_80164438;
|
||||
extern ? D_801645C8;
|
||||
extern ? lapCount;
|
||||
extern ? gLapCountByPlayerId;
|
||||
|
||||
void func_8000929C(s32 arg0, void *arg1) {
|
||||
f32 sp4C;
|
||||
@@ -2505,7 +2505,7 @@ void func_8000929C(s32 arg0, void *arg1) {
|
||||
if (arg1->unk14 < 300.0f) {
|
||||
phi_v1 = 1;
|
||||
phi_t0 = 1;
|
||||
} else if ((arg1->unk14 < D_800ECFA8) && (*(&lapCount + (phi_a0 * 4)) < 2) && (phi_a3_2 = phi_a0 * 4, (D_801634EC == 1))) {
|
||||
} else if ((arg1->unk14 < D_800ECFA8) && (*(&gLapCountByPlayerId + (phi_a0 * 4)) < 2) && (phi_a3_2 = phi_a0 * 4, (D_801634EC == 1))) {
|
||||
phi_v1 = 1;
|
||||
phi_t0 = 1;
|
||||
} else {
|
||||
@@ -2517,7 +2517,7 @@ void func_8000929C(s32 arg0, void *arg1) {
|
||||
phi_v1 = 1;
|
||||
phi_t0 = 1;
|
||||
} else {
|
||||
if ((D_800ECFAC < arg1->unk14) && (*(&lapCount + (phi_a0 * 4)) < 2) && (D_801634EC == 1)) {
|
||||
if ((D_800ECFAC < arg1->unk14) && (*(&gLapCountByPlayerId + (phi_a0 * 4)) < 2) && (D_801634EC == 1)) {
|
||||
phi_v1 = 1;
|
||||
phi_t0 = 1;
|
||||
}
|
||||
@@ -2535,12 +2535,12 @@ block_25:
|
||||
if (phi_v1 != 0) {
|
||||
temp_f0_2 = D_8016344C;
|
||||
if (sp44 <= temp_f0_2) {
|
||||
temp_v0_3 = phi_a3_2 + &lapCount;
|
||||
temp_v0_3 = phi_a3_2 + &gLapCountByPlayerId;
|
||||
if (temp_f0_2 < sp38) {
|
||||
temp_t1 = *temp_v0_3 + 1;
|
||||
*temp_v0_3 = temp_t1;
|
||||
if ((gModeSelection == GRAND_PRIX) && (temp_t1 == 5)) {
|
||||
phi_v0 = &lapCount;
|
||||
phi_v0 = &gLapCountByPlayerId;
|
||||
if (*(&D_80164408 + phi_a3_2) == 7) {
|
||||
do {
|
||||
temp_v0_4 = phi_v0 + 0x10;
|
||||
@@ -2575,7 +2575,7 @@ block_25:
|
||||
if (phi_t0 != 0) {
|
||||
temp_f0_3 = D_8016344C;
|
||||
if (sp38 <= temp_f0_3) {
|
||||
temp_v0_5 = phi_a3_2 + &lapCount;
|
||||
temp_v0_5 = phi_a3_2 + &gLapCountByPlayerId;
|
||||
if (temp_f0_3 < sp44) {
|
||||
arg0 = phi_a0_2;
|
||||
*temp_v0_5 = *temp_v0_5 - 1;
|
||||
@@ -2844,7 +2844,7 @@ extern ? D_80163504;
|
||||
extern u16 D_80164430;
|
||||
extern ? D_80164438;
|
||||
extern ? D_80164450;
|
||||
extern ? D_801644A8;
|
||||
extern ? gLapCompletionPercentByPlayerId;
|
||||
extern ? D_801644D0;
|
||||
extern ? D_80164590;
|
||||
extern ? D_801645B0;
|
||||
@@ -2967,7 +2967,7 @@ void func_80009B60(s32 arg0) {
|
||||
if ((temp_v1->unk0 & 0x8000) == 0) {
|
||||
*(&D_80164450 + temp_a3) = -0x14;
|
||||
*(&gCourseCompletionPercentByPlayerId + temp_a3) = -1000.0f;
|
||||
*(&D_801644A8 + temp_a3) = -1000.0f;
|
||||
*(&gLapCompletionPercentByPlayerId + temp_a3) = -1000.0f;
|
||||
return;
|
||||
}
|
||||
temp_v0_2 = temp_a2 + &D_801633E0;
|
||||
@@ -6370,7 +6370,7 @@ extern s16 D_8016479E;
|
||||
extern ? D_801647A8;
|
||||
extern s8 D_8018EE08;
|
||||
extern ? gPlayers;
|
||||
extern s32 lapCount;
|
||||
extern s32 gLapCountByPlayerId;
|
||||
|
||||
void func_8000F628(void) {
|
||||
void *sp104;
|
||||
@@ -6480,7 +6480,7 @@ void func_8000F628(void) {
|
||||
s16 phi_s1_5;
|
||||
|
||||
spD4 = &D_80163210;
|
||||
spD0 = &lapCount;
|
||||
spD0 = &gLapCountByPlayerId;
|
||||
spB8 = &D_80163258;
|
||||
spBC = &D_80164408;
|
||||
spCC = &gCourseCompletionPercentByPlayerId;
|
||||
@@ -13374,7 +13374,7 @@ void func_8001AC10(s32 playerId, s32 *arg2) {
|
||||
case 0: /* switch 1 */
|
||||
temp_s0->unk2 = -1;
|
||||
temp_v0 = playerId * 4;
|
||||
if ((((playerId * 0x14) + 0x64) < *(&D_80164450 + temp_v0)) && (temp_s0->unk4 >= 0x259) && (temp_s0->unk6 < 3) && (temp_v1 = lapCount[playerId], ((temp_v1 < 3) != 0))) {
|
||||
if ((((playerId * 0x14) + 0x64) < *(&D_80164450 + temp_v0)) && (temp_s0->unk4 >= 0x259) && (temp_s0->unk6 < 3) && (temp_v1 = gLapCountByPlayerId[playerId], ((temp_v1 < 3) != 0))) {
|
||||
func_8001AB74(playerId, temp_s0, func_8007AF78(temp_v1, (&gPlayerPositions + temp_v0)->unk2, &gPlayerPositions));
|
||||
} else {
|
||||
func_8001ABE0(playerId, temp_s0);
|
||||
@@ -13383,7 +13383,7 @@ void func_8001AC10(s32 playerId, s32 *arg2) {
|
||||
block_194:
|
||||
break;
|
||||
case 1: /* switch 1 */
|
||||
if ((lapCount[playerId] > 0) && (temp_v1_2 = D_80163478, temp_a0 = *(&gPlayerPositions + (temp_v1_2 * 4)), ((temp_a0 < *(&gPlayerPositions + (playerId * 4))) != 0)) && (temp_a0 == 0)) {
|
||||
if ((gLapCountByPlayerId[playerId] > 0) && (temp_v1_2 = D_80163478, temp_a0 = *(&gPlayerPositions + (temp_v1_2 * 4)), ((temp_a0 < *(&gPlayerPositions + (playerId * 4))) != 0)) && (temp_a0 == 0)) {
|
||||
temp_v0_2 = sp2C->unk254;
|
||||
if (temp_v0_2 != 4) {
|
||||
if (temp_v0_2 != 6) {
|
||||
|
||||
+714
-646
File diff suppressed because it is too large
Load Diff
+43
-33
@@ -79,7 +79,7 @@ void spawn_player(Player *player, s8 playerIndex, f32 arg2, f32 arg3, f32 arg4,
|
||||
player->unk_07C = 0;
|
||||
player->unk_07A = 0;
|
||||
player->unk_006 = 0;
|
||||
player->unk_008 = -1;
|
||||
player->lapCount = -1;
|
||||
player->unk_08C = 0.0f;
|
||||
player->unk_090 = 0.0f;
|
||||
player->unk_094 = 0.0f;
|
||||
@@ -233,44 +233,54 @@ void spawn_player(Player *player, s8 playerIndex, f32 arg2, f32 arg3, f32 arg4,
|
||||
D_801654C0[playerIndex] = 0;
|
||||
D_80165340 = 0;
|
||||
|
||||
player->frontLeftTyreSurface = 0;
|
||||
player->frontRightTyreSurface = 0;
|
||||
player->backLeftTyreSurface = 0;
|
||||
player->backRightTyreSurface = 0;
|
||||
player->unk_1A5 = 0;
|
||||
player->unk_1BD = 0;
|
||||
player->unk_1D5 = 0;
|
||||
player->unk_1ED = 0;
|
||||
player->unk_1A6 = 0;
|
||||
player->unk_1BE = 0;
|
||||
player->unk_1D6 = 0;
|
||||
player->unk_1EE = 0;
|
||||
player->unk_1C4 = 0;
|
||||
player->unk_1AC = 0;
|
||||
player->unk_1DC = 0;
|
||||
player->unk_1F4 = 0;
|
||||
player->boundingBoxCorners[FRONT_LEFT_TYRE].surfaceType = 0;
|
||||
player->boundingBoxCorners[FRONT_RIGHT_TYRE].surfaceType = 0;
|
||||
player->boundingBoxCorners[BACK_LEFT_TYRE].surfaceType = 0;
|
||||
player->boundingBoxCorners[BACK_RIGHT_TYRE].surfaceType = 0;
|
||||
|
||||
player->boundingBoxCorners[FRONT_LEFT_TYRE].unk_0D = 0;
|
||||
player->boundingBoxCorners[FRONT_RIGHT_TYRE].unk_0D = 0;
|
||||
player->boundingBoxCorners[BACK_LEFT_TYRE].unk_0D = 0;
|
||||
player->boundingBoxCorners[BACK_RIGHT_TYRE].unk_0D = 0;
|
||||
|
||||
player->boundingBoxCorners[FRONT_LEFT_TYRE].tileIndex = 0;
|
||||
player->boundingBoxCorners[FRONT_RIGHT_TYRE].tileIndex = 0;
|
||||
player->boundingBoxCorners[BACK_LEFT_TYRE].tileIndex = 0;
|
||||
player->boundingBoxCorners[BACK_RIGHT_TYRE].tileIndex = 0;
|
||||
|
||||
player->boundingBoxCorners[FRONT_RIGHT_TYRE].unk_14 = 0;
|
||||
player->boundingBoxCorners[FRONT_LEFT_TYRE].unk_14 = 0;
|
||||
player->boundingBoxCorners[BACK_LEFT_TYRE].unk_14 = 0;
|
||||
player->boundingBoxCorners[BACK_RIGHT_TYRE].unk_14 = 0;
|
||||
|
||||
player->unk_110 = 0;
|
||||
player->unk_112 = 0;
|
||||
player->unk_114 = 0;
|
||||
player->unk_116 = 0;
|
||||
player->unk_118 = 0;
|
||||
player->unk_11A = 0;
|
||||
player->unk_198 = 0.0f;
|
||||
player->unk_19C = 0.0f;
|
||||
player->unk_1A0 = 0.0f;
|
||||
player->unk_1B0 = 0.0f;
|
||||
player->unk_1B4 = 0.0f;
|
||||
player->unk_1B8 = 0.0f;
|
||||
player->unk_1C8 = 0.0f;
|
||||
player->unk_1CC = 0.0f;
|
||||
player->unk_1D0 = 0.0f;
|
||||
player->unk_1E0 = 0.0f;
|
||||
player->unk_1E4 = 0.0f;
|
||||
player->unk_1E8 = 0.0f;
|
||||
player->unk_1A8 = 0.0f;
|
||||
player->unk_1C0 = 0.0f;
|
||||
player->unk_1D8 = 0.0f;
|
||||
player->unk_1F0 = 0.0f;
|
||||
|
||||
player->boundingBoxCorners[FRONT_LEFT_TYRE].cornerX = 0.0f;
|
||||
player->boundingBoxCorners[FRONT_LEFT_TYRE].cornerY = 0.0f;
|
||||
player->boundingBoxCorners[FRONT_LEFT_TYRE].cornerZ = 0.0f;
|
||||
|
||||
player->boundingBoxCorners[FRONT_RIGHT_TYRE].cornerX = 0.0f;
|
||||
player->boundingBoxCorners[FRONT_RIGHT_TYRE].cornerY = 0.0f;
|
||||
player->boundingBoxCorners[FRONT_RIGHT_TYRE].cornerZ = 0.0f;
|
||||
|
||||
player->boundingBoxCorners[BACK_LEFT_TYRE].cornerX = 0.0f;
|
||||
player->boundingBoxCorners[BACK_LEFT_TYRE].cornerY = 0.0f;
|
||||
player->boundingBoxCorners[BACK_LEFT_TYRE].cornerZ = 0.0f;
|
||||
|
||||
player->boundingBoxCorners[BACK_RIGHT_TYRE].cornerX = 0.0f;
|
||||
player->boundingBoxCorners[BACK_RIGHT_TYRE].cornerY = 0.0f;
|
||||
player->boundingBoxCorners[BACK_RIGHT_TYRE].cornerZ = 0.0f;
|
||||
|
||||
player->boundingBoxCorners[FRONT_LEFT_TYRE].cornerGroundY = 0.0f;
|
||||
player->boundingBoxCorners[FRONT_RIGHT_TYRE].cornerGroundY = 0.0f;
|
||||
player->boundingBoxCorners[BACK_LEFT_TYRE].cornerGroundY = 0.0f;
|
||||
player->boundingBoxCorners[BACK_RIGHT_TYRE].cornerGroundY = 0.0f;
|
||||
|
||||
player->unk_11C = 0.0f;
|
||||
player->unk_120 = 0.0f;
|
||||
player->unk_124 = 0.0f;
|
||||
|
||||
+15
-15
@@ -5928,7 +5928,7 @@ void func_80050320(void) {
|
||||
phi_a0 = 1;
|
||||
}
|
||||
temp_v1 = gGPCurrentRaceRanks[phi_s0];
|
||||
temp_a1 = lapCount[*((phi_s0 * 2) + &D_80164360)];
|
||||
temp_a1 = gLapCountByPlayerId[*((phi_s0 * 2) + &D_80164360)];
|
||||
if (temp_v1 == gPlayerOne->characterId) {
|
||||
func_8004FDB4(*temp_t0, temp_f14, phi_a0, temp_a1, phi_s0, temp_a1, temp_v1, 0xFF, 1, phi_a0, 0);
|
||||
} else {
|
||||
@@ -5953,7 +5953,7 @@ void func_80050320(void) {
|
||||
phi_a0_2 = 1;
|
||||
}
|
||||
temp_v0 = *((phi_s0_2 * 2) + &D_80164360);
|
||||
temp_a1_2 = lapCount[temp_v0];
|
||||
temp_a1_2 = gLapCountByPlayerId[temp_v0];
|
||||
temp_v1_2 = gPlayerOne[temp_v0].characterId;
|
||||
if (temp_v0 == 0) {
|
||||
func_8004FDB4(*temp_t0_2, temp_f14_2, phi_a0_2, temp_a1_2, phi_s0_2, temp_a1_2, temp_v1_2, 0xFF, 1, phi_a0_2, 1);
|
||||
@@ -5978,8 +5978,8 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_80050320.s")
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
extern ? D_801644A8;
|
||||
extern ? lapCount;
|
||||
extern ? gLapCompletionPercentByPlayerId;
|
||||
extern ? gLapCountByPlayerId;
|
||||
|
||||
? func_80050644(s32 arg0, s32 *arg1, s32 *arg2) {
|
||||
s32 temp_a3;
|
||||
@@ -5990,13 +5990,13 @@ extern ? lapCount;
|
||||
|
||||
temp_t6 = arg0 & 0xFFFF;
|
||||
temp_t0 = temp_t6 * 4;
|
||||
temp_a3 = *(&lapCount + temp_t0);
|
||||
temp_a3 = *(&gLapCountByPlayerId + temp_t0);
|
||||
phi_v0 = 0;
|
||||
phi_v0_2 = 0;
|
||||
if (temp_a3 < 3) {
|
||||
if (gPlayerCountSelection1 == 1) {
|
||||
if (temp_a3 >= 0) {
|
||||
phi_v0 = *(&D_801644A8 + temp_t0) * 928.0f;
|
||||
phi_v0 = *(&gLapCompletionPercentByPlayerId + temp_t0) * 928.0f;
|
||||
}
|
||||
if (phi_v0 < 0x104) {
|
||||
*arg1 = phi_v0;
|
||||
@@ -6018,7 +6018,7 @@ extern ? lapCount;
|
||||
return 4;
|
||||
}
|
||||
if (temp_a3 >= 0) {
|
||||
phi_v0_2 = *(&D_801644A8 + temp_t0) * 260.0f;
|
||||
phi_v0_2 = *(&gLapCompletionPercentByPlayerId + temp_t0) * 260.0f;
|
||||
}
|
||||
*arg1 = phi_v0_2;
|
||||
*arg2 = 0;
|
||||
@@ -6029,7 +6029,7 @@ extern ? lapCount;
|
||||
*arg2 = (gPlayerPositions[temp_t6] * 0x14) + 0x20;
|
||||
return 0;
|
||||
}
|
||||
*arg1 = *(&D_801644A8 + temp_t0) * 260.0f;
|
||||
*arg1 = *(&gLapCompletionPercentByPlayerId + temp_t0) * 260.0f;
|
||||
*arg2 = 0;
|
||||
return 0;
|
||||
}
|
||||
@@ -6100,7 +6100,7 @@ void func_800508C0(void) {
|
||||
} else {
|
||||
phi_s0 = D_80164360;
|
||||
}
|
||||
temp_v1 = lapCount[phi_s0];
|
||||
temp_v1 = gLapCountByPlayerId[phi_s0];
|
||||
sp4C = func_80050644(phi_s0 & 0xFFFF, &sp54, &sp50);
|
||||
if (temp_v1 > 0) {
|
||||
if (temp_v1 == 1) {
|
||||
@@ -6128,10 +6128,10 @@ void func_800508C0(void) {
|
||||
phi_s0_3 = sp42;
|
||||
phi_s1_2 = sp40;
|
||||
phi_s2_2 = sp3E;
|
||||
if ((lapCount[phi_s0] >= 0) && (lapCount[phi_s0] < 3)) {
|
||||
if (lapCount[phi_s0] != 0) {
|
||||
if (lapCount[phi_s0] != 1) {
|
||||
if (lapCount[phi_s0] != 2) {
|
||||
if ((gLapCountByPlayerId[phi_s0] >= 0) && (gLapCountByPlayerId[phi_s0] < 3)) {
|
||||
if (gLapCountByPlayerId[phi_s0] != 0) {
|
||||
if (gLapCountByPlayerId[phi_s0] != 1) {
|
||||
if (gLapCountByPlayerId[phi_s0] != 2) {
|
||||
|
||||
} else {
|
||||
phi_s1_2 = 0;
|
||||
@@ -6208,7 +6208,7 @@ extern s32 D_8018D3E4;
|
||||
extern s32 D_8018D3E8;
|
||||
extern s32 D_8018D3EC;
|
||||
extern void *gDisplayListHead;
|
||||
extern ? lapCount;
|
||||
extern ? gLapCountByPlayerId;
|
||||
|
||||
void func_80050E34(s32 arg0, s32 arg1) {
|
||||
s32 spD4;
|
||||
@@ -6261,7 +6261,7 @@ void func_80050E34(s32 arg0, s32 arg1) {
|
||||
|
||||
temp_v0 = &gPlayerOne[arg0];
|
||||
spAC = temp_v0;
|
||||
temp_s0 = *(&lapCount + (arg0 * 4));
|
||||
temp_s0 = *(&gLapCountByPlayerId + (arg0 * 4));
|
||||
temp_s1 = temp_v0->characterId;
|
||||
temp_t5 = *(&D_8018CE24 + (arg0 << 5));
|
||||
if (gPlayerCountSelection1 == 1) {
|
||||
|
||||
+344
-540
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,240 @@
|
||||
#ifndef CODE_80057C60_H
|
||||
#define CODE_80057C60_H
|
||||
|
||||
#include "common_structs.h"
|
||||
|
||||
void func_80057C60();
|
||||
void func_80057CE4();
|
||||
void func_80057DD0();
|
||||
void func_80057FC4(u32);
|
||||
|
||||
void func_80058090(u32);
|
||||
void func_800581C8();
|
||||
void func_800582CC();
|
||||
void func_80058394();
|
||||
void func_8005845C();
|
||||
void func_80058538(u32);
|
||||
void func_80058640();
|
||||
void func_800586FC();
|
||||
void func_800587A4();
|
||||
void func_8005884C();
|
||||
void func_800588F4(s32);
|
||||
void func_80058B58();
|
||||
void func_80058BF4();
|
||||
void func_80058C20(u32);
|
||||
void func_80058DB4(u32);
|
||||
void func_80058F48();
|
||||
void func_80058F78();
|
||||
|
||||
void func_80059024();
|
||||
void func_8005902C();
|
||||
void func_800590D4();
|
||||
void func_800591B4();
|
||||
void func_80059358();
|
||||
void func_80059360();
|
||||
void func_800593F0();
|
||||
void func_800593F8();
|
||||
void func_80059488(s32);
|
||||
void func_800594F0();
|
||||
void func_800594F8();
|
||||
void func_80059528();
|
||||
void func_80059530();
|
||||
void func_80059560(s32);
|
||||
void func_800596A8();
|
||||
void func_800596D8();
|
||||
void func_80059710();
|
||||
void func_80059718();
|
||||
void func_80059750();
|
||||
void func_80059780();
|
||||
void func_800597B8();
|
||||
void func_800597E8();
|
||||
void func_80059820(s32);
|
||||
void func_800598D4(s32);
|
||||
void func_8005994C();
|
||||
void func_8005995C();
|
||||
void func_80059A88(s32);
|
||||
void func_80059D00();
|
||||
|
||||
void func_8005A070();
|
||||
void func_8005A14C(s32);
|
||||
void func_8005A380();
|
||||
void func_8005A3C0();
|
||||
void func_8005A71C();
|
||||
void func_8005A74C();
|
||||
void func_8005A99C();
|
||||
void func_8005AA34();
|
||||
void func_8005AA4C();
|
||||
void func_8005AA6C(s32);
|
||||
void func_8005AA80();
|
||||
void func_8005AA94(s32);
|
||||
void func_8005AAF0();
|
||||
void func_8005AB20();
|
||||
|
||||
void func_8005B914();
|
||||
|
||||
void func_8005C360(f32);
|
||||
void func_8005C6B4(s8, s16*, s16*, s16*);
|
||||
void func_8005C728();
|
||||
void func_8005CB60(s32, s32);
|
||||
|
||||
void func_8005D0FC(s32);
|
||||
void func_8005D18C();
|
||||
void func_8005D1F4(s32);
|
||||
|
||||
void func_80062B18(f32*, f32*, f32*, f32, f32, f32, u16, u16);
|
||||
void func_80062F98(Player*, s16, s8, s8);
|
||||
|
||||
void func_800630C0(Player*, s16, s8, s8);
|
||||
void func_800631A8(Player*, s16, s8, s8);
|
||||
void func_80063268(Player*, s16, s8, s8);
|
||||
void func_80063408(Player*, s16, s8, s8);
|
||||
void func_800635D4(Player*, s16, s8, s8);
|
||||
void func_800639DC(Player*, s16, s8, s8);
|
||||
void func_80063BD4(Player*, s16, s8, s8);
|
||||
void func_80063D58(Player*, s16, s8, s8);
|
||||
|
||||
void func_800643A8(Player*, s16, s8, s8);
|
||||
void func_800647C8(Player*, s16, s8, s8);
|
||||
void func_800648E4(Player*, s16, s8, s8);
|
||||
void func_80064988(Player*, s16, s8, s8);
|
||||
void func_800649F4(Player*, s16, s8, s8);
|
||||
void func_80064B30(Player*, s16, s8, s8);
|
||||
void func_80064C74(Player*, s16, s8, s8);
|
||||
void func_80064DEC(Player*, s16, s8, s8);
|
||||
void func_80064EA4(Player*, s16, s8, s8);
|
||||
void func_80064F88(Player*, s16, s8, s8);
|
||||
|
||||
void func_80065030(Player*, s16, s8, s8);
|
||||
void func_800650FC(Player*, s16, s8, s8);
|
||||
void func_800651F4(Player*, s16, s8, s8);
|
||||
void func_800658A0(Player*, s8, s16, s8);
|
||||
|
||||
void func_80066998(Player*, s8, s16, s8);
|
||||
|
||||
void func_80067964(Player*, s8, s32, s8, s32);
|
||||
void func_80067D3C(Player*, s8, s32, s32, f32, s32);
|
||||
|
||||
void func_8006801C(Player*, s8, s32, s32, f32, s32);
|
||||
void func_80068310(Player*, s8, s32, s8, s32);
|
||||
void func_80068724(Player*, s8, s32, s8, s32);
|
||||
void func_80068AA4(Player*, s8, s32, s8, s32);
|
||||
void func_80068DA0(Player*, s8, s32, s8, s32);
|
||||
|
||||
void func_8006A280(Player*, s8, s16, s8);
|
||||
void func_8006AFD0(Player*, s16, s8, s8);
|
||||
|
||||
void func_8006B87C(Player*, s8);
|
||||
void func_8006B974(s32, s8, s8);
|
||||
void func_8006B9CC(Player*, s8);
|
||||
void func_8006BA94(Player*, s8, s8);
|
||||
|
||||
void func_8006C6AC(Player*, s16, s8, s8);
|
||||
void func_8006C9B8(Player*, s16, s8, s8);
|
||||
void func_8006CEC0(Player*, s16, s8, s8);
|
||||
|
||||
void func_8006D194(Player*, s8, s8);
|
||||
void func_8006D474(Player*, s8, s8);
|
||||
void func_8006DC54(Player*, s8, s8);
|
||||
void func_8006DD3C(Player*, s8, s8);
|
||||
|
||||
void func_8006E058();
|
||||
void func_8006E420(Player*, s8, s8);
|
||||
void func_8006E5AC(Player*, s8, s8);
|
||||
void func_8006E634(Player*, s8, s8);
|
||||
void func_8006E6BC(Player*, s8, s8);
|
||||
void func_8006E744(Player*, s8, s8);
|
||||
void func_8006E7CC(Player*, s8, s8);
|
||||
void func_8006E848(Player*, s8, s8);
|
||||
void func_8006E8C4(Player*, s8, s8);
|
||||
void func_8006E940(Player*, s8, s8);
|
||||
|
||||
extern u16 gPlayerBalloonStatus[8][3]; // D_8018D5F0
|
||||
extern s16 gPlayerBalloonCount[]; // D_8018D8C0
|
||||
extern u32 gScreenModeSelection; // D_800DC530
|
||||
|
||||
extern struct UnkStruct_800DC5EC *D_800DC5EC;
|
||||
extern struct UnkStruct_800DC5EC *D_800DC5F0;
|
||||
extern struct UnkStruct_800DC5EC *D_800DC5F4;
|
||||
extern struct UnkStruct_800DC5EC *D_800DC5F8;
|
||||
|
||||
extern u16 D_800DC5FC;
|
||||
|
||||
extern f64 D_800EE648;
|
||||
extern f64 D_800EE650;
|
||||
extern f64 D_800EE658;
|
||||
extern f64 D_800EE660;
|
||||
extern f64 D_800EE668;
|
||||
extern f64 D_800EE670;
|
||||
extern f64 D_800EE678;
|
||||
extern f32 D_800EE680;
|
||||
extern f32 D_800EE684;
|
||||
extern f32 D_800EE688;
|
||||
extern f32 D_800EE68C;
|
||||
extern f64 D_800EE690;
|
||||
extern f64 D_800EE698;
|
||||
extern f64 D_800EE6A0;
|
||||
extern f64 D_800EE6A8;
|
||||
extern f64 D_800EE6B0;
|
||||
extern f64 D_800EE6B8;
|
||||
extern f64 D_800EE6C0;
|
||||
extern f64 D_800EE6D8;
|
||||
extern f64 D_800EE6E0;
|
||||
extern f64 D_800EE6E8;
|
||||
extern f64 D_800EE700;
|
||||
extern f64 D_800EE708;
|
||||
extern f64 D_800EE710;
|
||||
extern f64 D_800EE718;
|
||||
extern f64 D_800EE720;
|
||||
extern f64 D_800EE728;
|
||||
extern f64 D_800EE730;
|
||||
extern f64 D_800EE738;
|
||||
extern f64 D_800EE740;
|
||||
extern f64 D_800EE748;
|
||||
extern f64 D_800EE750;
|
||||
extern f64 D_800EE758;
|
||||
extern f64 D_800EE760;
|
||||
extern f64 D_800EE768;
|
||||
extern f64 D_800EE770;
|
||||
extern f64 D_800EE778;
|
||||
extern f32 D_800EE780;
|
||||
extern f64 D_800EE788;
|
||||
extern f64 D_800EE790;
|
||||
extern f64 D_800EE798;
|
||||
extern f64 D_800EE7A0;
|
||||
extern f64 D_800EE7A8;
|
||||
extern f32 D_800EE7B0;
|
||||
extern f64 D_800EE7B8;
|
||||
extern f32 D_800EE948;
|
||||
extern f32 D_800EE94C;
|
||||
|
||||
extern s32 D_80164394;
|
||||
extern s32 D_80164398;
|
||||
extern s32 D_8016439C;
|
||||
extern f32 D_801652A0[];
|
||||
extern s32 D_801655C0;
|
||||
extern s32 D_801655F0;
|
||||
extern s32 D_80165678;
|
||||
extern s8 D_801657AE;
|
||||
extern s8 D_801657D8;
|
||||
extern s8 D_801657E8;
|
||||
|
||||
extern s8 D_8018CAE0;
|
||||
|
||||
extern s32 D_8018D120;
|
||||
extern s32 D_8018D170;
|
||||
extern s32 D_8018D178;
|
||||
extern s32 D_8018D188;
|
||||
extern s32 D_8018D190;
|
||||
extern s32 D_8018D1A0;
|
||||
extern s32 D_8018D1B4;
|
||||
extern s32 D_8018D1D4;
|
||||
extern s32 D_8018D1CC;
|
||||
extern s32 D_8018D1FC;
|
||||
extern s32 D_8018D204;
|
||||
extern s32 D_8018D21C;
|
||||
extern s32 D_8018D2A4;
|
||||
extern s32 D_8018D2BC;
|
||||
extern s32 D_8018D480;
|
||||
extern s32 D_8018D484;
|
||||
|
||||
#endif
|
||||
+25
-25
@@ -45,7 +45,7 @@ extern s32 D_800DC544;
|
||||
extern Player gPlayers[];
|
||||
extern Player *gPlayerTwo;
|
||||
extern Player *gPlayerOne;
|
||||
extern s32 lapCount[];
|
||||
extern s32 gLapCountByPlayerId[];
|
||||
extern s32 D_80150120;
|
||||
extern s32 gModeSelection;
|
||||
extern s32 gPlayerCountSelection1;
|
||||
@@ -206,7 +206,7 @@ void update_player_battle_status(void) {
|
||||
extern f32 gTimePlayerLastTouchedFinishLine[];
|
||||
extern u16 D_801645B0[];
|
||||
extern u16 D_801645C8[];
|
||||
extern f32 D_801644A8[];
|
||||
extern f32 gLapCompletionPercentByPlayerId[];
|
||||
|
||||
void func_8028E298(void) {
|
||||
f32 temp_v0;
|
||||
@@ -220,8 +220,8 @@ void func_8028E298(void) {
|
||||
}
|
||||
temp_a2 = D_801645B0[i];
|
||||
|
||||
temp_v0 = ((2 - gPlayers[i].unk_008) * D_801645C8[temp_a2]);
|
||||
temp_v0 += D_801645C8[temp_a2] * (1.0f - D_801644A8[i]);
|
||||
temp_v0 = ((2 - gPlayers[i].lapCount) * D_801645C8[temp_a2]);
|
||||
temp_v0 += D_801645C8[temp_a2] * (1.0f - gLapCompletionPercentByPlayerId[i]);
|
||||
temp_v0 /= 15.0f;
|
||||
|
||||
gTimePlayerLastTouchedFinishLine[i] = gCourseTimer + temp_v0;
|
||||
@@ -612,16 +612,16 @@ void func_8028EF28(void) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (lapCount[i] < gPlayers[i].unk_008) {
|
||||
gPlayers[i].unk_008--;
|
||||
} else if (lapCount[i] > gPlayers[i].unk_008) {
|
||||
gPlayers[i].unk_008++;
|
||||
if (gLapCountByPlayerId[i] < gPlayers[i].lapCount) {
|
||||
gPlayers[i].lapCount--;
|
||||
} else if (gLapCountByPlayerId[i] > gPlayers[i].lapCount) {
|
||||
gPlayers[i].lapCount++;
|
||||
|
||||
if ((gPlayers[i].unk_000 & PLAYER_HUMAN) != 0) {
|
||||
if (gPlayers[i].unk_008 == 3) {
|
||||
if (gPlayers[i].lapCount == 3) {
|
||||
func_8028EEF0(i);
|
||||
|
||||
currentPosition = gPlayers[i].unk_004;
|
||||
currentPosition = gPlayers[i].currentRank;
|
||||
gPlayers[i].unk_000 |= PLAYER_CPU;
|
||||
|
||||
if (currentPosition < 4) {
|
||||
@@ -702,7 +702,7 @@ void func_8028EF28(void) {
|
||||
|
||||
}
|
||||
|
||||
} else if (gPlayers[i].unk_008 == 2) {
|
||||
} else if (gPlayers[i].lapCount == 2) {
|
||||
if ((gPlayers[i].unk_000 & 0x100) != 0) {
|
||||
return;
|
||||
}
|
||||
@@ -711,7 +711,7 @@ void func_8028EF28(void) {
|
||||
func_800CA49C((u8)i);
|
||||
}
|
||||
}
|
||||
} else if (gPlayers[i].unk_008 == 3) {
|
||||
} else if (gPlayers[i].lapCount == 3) {
|
||||
func_8028EEF0(i);
|
||||
if (gModeSelection == TIME_TRIALS) {
|
||||
func_80005AE8(ply);
|
||||
@@ -741,7 +741,7 @@ void update_race_position_data(void) {
|
||||
((gPlayers[i].unk_000 & PLAYER_CINEMATIC_MODE) == 0) &&
|
||||
((gPlayers[i].unk_000 & PLAYER_INVISIBLE_OR_BOMB) == 0)) {
|
||||
position = gPlayerPositions[i];
|
||||
gPlayers[i].unk_004 = position;
|
||||
gPlayers[i].currentRank = position;
|
||||
gPlayerPositionLUT[position] = i;
|
||||
}
|
||||
}
|
||||
@@ -992,23 +992,23 @@ block_20:
|
||||
if ((gEnableDebugMode != 0) && (gModeSelection != BATTLE)) {
|
||||
temp_a1 = gControllerOne;
|
||||
if ((temp_a1->buttonPressed & 0x800) != 0) {
|
||||
lapCount->unk0 = 2;
|
||||
gLapCountByPlayerId->unk0 = 2;
|
||||
}
|
||||
phi_a0 = temp_a1->buttonPressed;
|
||||
if ((temp_a1->buttonPressed & 0x100) != 0) {
|
||||
lapCount->unk0 = 2;
|
||||
lapCount->unk4 = 2;
|
||||
gLapCountByPlayerId->unk0 = 2;
|
||||
gLapCountByPlayerId->unk4 = 2;
|
||||
phi_a0 = temp_a1->buttonPressed;
|
||||
}
|
||||
if ((phi_a0 & 0x400) != 0) {
|
||||
lapCount->unk0 = 2;
|
||||
lapCount->unk4 = 2;
|
||||
lapCount->unk8 = 2;
|
||||
lapCount->unkC = 2;
|
||||
lapCount->unk10 = 2;
|
||||
lapCount->unk14 = 2;
|
||||
lapCount->unk18 = 2;
|
||||
lapCount->unk1C = 2;
|
||||
gLapCountByPlayerId->unk0 = 2;
|
||||
gLapCountByPlayerId->unk4 = 2;
|
||||
gLapCountByPlayerId->unk8 = 2;
|
||||
gLapCountByPlayerId->unkC = 2;
|
||||
gLapCountByPlayerId->unk10 = 2;
|
||||
gLapCountByPlayerId->unk14 = 2;
|
||||
gLapCountByPlayerId->unk18 = 2;
|
||||
gLapCountByPlayerId->unk1C = 2;
|
||||
}
|
||||
}
|
||||
// Duplicate return node #29. Try simplifying control flow for better match
|
||||
@@ -1162,7 +1162,7 @@ void func_8028FCBC(void) {
|
||||
if (((gPlayerOne->unk_000 & PLAYER_CINEMATIC_MODE) != 0) && ((gPlayerTwo->unk_000 & PLAYER_CINEMATIC_MODE) != 0)) {
|
||||
|
||||
|
||||
if (gPlayerOne->unk_004 < gPlayerTwo->unk_004) {
|
||||
if (gPlayerOne->currentRank < gPlayerTwo->currentRank) {
|
||||
gPlayerWinningIndex = 1;
|
||||
} else {
|
||||
gPlayerWinningIndex = 0;
|
||||
|
||||
+9
-8
@@ -2184,14 +2184,15 @@ GLOBAL_ASM("asm/non_matchings/code_80290C20/func_80295A38.s")
|
||||
void func_80295BF8(s32 playerIndex) {
|
||||
Player* player = &gPlayers[playerIndex];
|
||||
func_802AAAAC(&player->unk_110);
|
||||
player->unk_1BD = 0;
|
||||
player->unk_1A5 = 0;
|
||||
player->unk_1ED = 0;
|
||||
player->unk_1D5 = 0;
|
||||
player->unk_1BE = 0x1388;
|
||||
player->unk_1A6 = 0x1388;
|
||||
player->unk_1EE = 0x1388;
|
||||
player->unk_1D6 = 0x1388;
|
||||
player->boundingBoxCorners[FRONT_RIGHT_TYRE].unk_0D = 0.0f;
|
||||
player->boundingBoxCorners[FRONT_LEFT_TYRE].unk_0D = 0.0f;
|
||||
player->boundingBoxCorners[BACK_RIGHT_TYRE].unk_0D = 0.0f;
|
||||
player->boundingBoxCorners[BACK_LEFT_TYRE].unk_0D = 0.0f;
|
||||
|
||||
player->boundingBoxCorners[FRONT_RIGHT_TYRE].tileIndex = 0x1388;
|
||||
player->boundingBoxCorners[FRONT_LEFT_TYRE].tileIndex = 0x1388;
|
||||
player->boundingBoxCorners[BACK_RIGHT_TYRE].tileIndex = 0x1388;
|
||||
player->boundingBoxCorners[BACK_LEFT_TYRE].tileIndex = 0x1388;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+17
-19
@@ -1975,10 +1975,8 @@ GLOBAL_ASM("asm/non_matchings/math_util/func_802B8414.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
|
||||
//This function did not have a glabel in the original assembly, as such it may
|
||||
//be unused/unnamed
|
||||
void func_802B8614(void *arg0) {
|
||||
//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75
|
||||
UNUSED void func_802B8614(Player *player) {
|
||||
f64 sp78;
|
||||
f64 sp70;
|
||||
f64 sp68;
|
||||
@@ -1997,16 +1995,16 @@ void func_802B8614(void *arg0) {
|
||||
f64 temp_f4;
|
||||
f64 temp_f6;
|
||||
|
||||
temp_f6 = arg0->unk1B0;
|
||||
temp_f6 = (f64) player->boundingBoxCorners[1].cornerX;
|
||||
sp78 = temp_f6;
|
||||
sp70 = arg0->unk1C0;
|
||||
sp68 = arg0->unk1B8;
|
||||
temp_f30 = arg0->unk198;
|
||||
sp58 = arg0->unk1A8;
|
||||
sp50 = arg0->unk1A0;
|
||||
sp48 = arg0->unk1E0;
|
||||
sp40 = arg0->unk1F0;
|
||||
temp_f4 = arg0->unk1E8;
|
||||
sp70 = (f64) player->boundingBoxCorners[1].cornerGroundY;
|
||||
sp68 = (f64) player->boundingBoxCorners[1].cornerZ;
|
||||
temp_f30 = (f64) player->boundingBoxCorners[0].cornerX;
|
||||
sp58 = (f64) player->boundingBoxCorners[0].cornerGroundY;
|
||||
sp50 = (f64) player->boundingBoxCorners[0].cornerZ;
|
||||
sp48 = (f64) player->boundingBoxCorners[3].cornerX;
|
||||
sp40 = (f64) player->boundingBoxCorners[3].cornerGroundY;
|
||||
temp_f4 = (f64) player->boundingBoxCorners[3].cornerZ;
|
||||
temp_f2 = sp58 - sp70;
|
||||
sp38 = temp_f4;
|
||||
temp_f12 = temp_f4 - sp50;
|
||||
@@ -2015,14 +2013,14 @@ void func_802B8614(void *arg0) {
|
||||
temp_f18 = sp48 - temp_f30;
|
||||
temp_f20 = temp_f30 - temp_f6;
|
||||
if (0.0 == 0.0) {
|
||||
arg0->unk58 = 0.0f;
|
||||
arg0->unk60 = 0.0f;
|
||||
arg0->unk5C = 1.0f;
|
||||
player->unk_058 = 0.0f;
|
||||
player->unk_060 = 0.0f;
|
||||
player->unk_05C = 1.0f;
|
||||
return;
|
||||
}
|
||||
arg0->unk58 = ((temp_f2 * temp_f12) - (temp_f14 * temp_f16)) / 0.0;
|
||||
arg0->unk5C = ((temp_f14 * temp_f18) - (temp_f20 * temp_f12)) / 0.0;
|
||||
arg0->unk60 = ((temp_f20 * temp_f16) - (temp_f2 * temp_f18)) / 0.0;
|
||||
player->unk_058 = (f32) ((f64) (f32) ((temp_f2 * temp_f12) - (temp_f14 * temp_f16)) / 0.0);
|
||||
player->unk_05C = (f32) ((f64) (f32) ((temp_f14 * temp_f18) - (temp_f20 * temp_f12)) / 0.0);
|
||||
player->unk_060 = (f32) ((f64) (f32) ((temp_f20 * temp_f16) - (temp_f2 * temp_f18)) / 0.0);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/math_util/func_802B8614.s")
|
||||
|
||||
+89
-60
@@ -4438,16 +4438,21 @@ GLOBAL_ASM("asm/non_matchings/memory/func_802AF9F0.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
f32 func_802ABE30(f32, f32, f32, u16); // extern
|
||||
s32 func_802AC760(s16 *, f32, f32, f32, f32, s32, f32, f32, f32); // extern
|
||||
s32 func_802ACBA4(s16 *, f32, f32, f32, f32, s32, f32, f32, f32); // extern
|
||||
s32 func_802AD278(s16 *, f32, f32, f32, f32, s32, f32, f32, f32); // extern
|
||||
? func_802AF9F0(f32, ? *, ?32, void *); // extern
|
||||
//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75
|
||||
f32 func_802ABE30(f32, f32, f32, u16); /* extern */
|
||||
s32 func_802AC760(s16 *, f32, f32, f32, f32, s32, f32, f32, f32); /* extern */
|
||||
s32 func_802ACBA4(s16 *, f32, f32, f32, f32, s32, f32, f32, f32); /* extern */
|
||||
s32 func_802AD278(s16 *, f32, f32, f32, f32, s32, f32, f32, f32); /* extern */
|
||||
? func_802AF9F0(f32, ? *, ?32, kartBoundingBoxCorner *); /* extern */
|
||||
extern ? D_8014F110;
|
||||
extern s32 D_8015F580;
|
||||
extern s32 D_8015F584;
|
||||
extern s16 D_8015F6E8;
|
||||
extern s16 D_8015F6EA;
|
||||
extern s16 D_8015F6F0;
|
||||
extern s16 D_8015F6F2;
|
||||
|
||||
? func_802AFA34(void *arg0, void *arg1, f32 arg2, f32 arg3, f32 arg4) {
|
||||
s32 func_802AFA34(Player *player, kartBoundingBoxCorner *corner, f32 cornerX, f32 cornerY, f32 cornerZ) {
|
||||
? sp128;
|
||||
? sp11C;
|
||||
? sp110;
|
||||
@@ -4498,17 +4503,17 @@ extern s32 D_8015F584;
|
||||
sp104 = 0x447A0000;
|
||||
sp108 = 0x447A0000;
|
||||
sp10C = 0x447A0000;
|
||||
temp_f20 = arg0->unk70;
|
||||
temp_f20 = player->unk_070;
|
||||
spFE = 0x1388;
|
||||
sp100 = 0x1388;
|
||||
sp102 = 0x1388;
|
||||
spF8 = 0;
|
||||
spFA = 0;
|
||||
spFC = 0;
|
||||
temp_v0 = arg1->unkD;
|
||||
temp_f22 = arg1->unk0;
|
||||
temp_f24 = arg1->unk4;
|
||||
temp_f26 = arg1->unk8;
|
||||
temp_v0 = corner->unk_0D;
|
||||
temp_f22 = corner->cornerX;
|
||||
temp_f24 = corner->cornerY;
|
||||
temp_f26 = corner->cornerZ;
|
||||
if (temp_v0 != 0) {
|
||||
phi_s7 = &spF8;
|
||||
if (temp_v0 != 0x20) {
|
||||
@@ -4518,26 +4523,38 @@ extern s32 D_8015F584;
|
||||
if (temp_v0 != 0x80) {
|
||||
goto block_21;
|
||||
}
|
||||
if ((func_802AD278(&spF8, temp_f20, temp_f22, temp_f24, temp_f26, arg1->unkE, arg2, arg3, arg4) == 1) && (temp_f0 = func_802ABE30(temp_f22, temp_f24, temp_f26, arg1->unkE), temp_f2 = arg0->unk18, !(temp_f2 < temp_f0)) && !((2.0f * temp_f20) < (temp_f2 - temp_f0))) {
|
||||
arg1->unk10 = temp_f0;
|
||||
func_802AF9F0(temp_f0, &sp11C, sp108, arg1);
|
||||
return 1;
|
||||
if (func_802AD278(&spF8, temp_f20, temp_f22, temp_f24, temp_f26, (s32) corner->tileIndex, cornerX, cornerY, cornerZ) == 1) {
|
||||
temp_f0 = func_802ABE30(temp_f22, temp_f24, temp_f26, corner->tileIndex);
|
||||
temp_f2 = player->posY;
|
||||
if (!(temp_f2 < temp_f0) && !((2.0f * temp_f20) < (temp_f2 - temp_f0))) {
|
||||
corner->cornerGroundY = temp_f0;
|
||||
func_802AF9F0(temp_f0, &sp11C, sp108, corner);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
phi_f30 = 2.0f;
|
||||
goto block_22;
|
||||
}
|
||||
if ((func_802AC760(&spF8, temp_f20, temp_f22, temp_f24, temp_f26, arg1->unkE, arg2, arg3, arg4) == 1) && (temp_f0_2 = func_802ABE30(temp_f22, temp_f24, temp_f26, arg1->unkE), temp_f2_2 = arg0->unk18, !(temp_f2_2 < temp_f0_2)) && !((2.0f * temp_f20) < (temp_f2_2 - temp_f0_2))) {
|
||||
arg1->unk10 = temp_f0_2;
|
||||
func_802AF9F0(temp_f0_2, &sp128, sp10C, arg1);
|
||||
return 1;
|
||||
if (func_802AC760(&spF8, temp_f20, temp_f22, temp_f24, temp_f26, (s32) corner->tileIndex, cornerX, cornerY, cornerZ) == 1) {
|
||||
temp_f0_2 = func_802ABE30(temp_f22, temp_f24, temp_f26, corner->tileIndex);
|
||||
temp_f2_2 = player->posY;
|
||||
if (!(temp_f2_2 < temp_f0_2) && !((2.0f * temp_f20) < (temp_f2_2 - temp_f0_2))) {
|
||||
corner->cornerGroundY = temp_f0_2;
|
||||
func_802AF9F0(temp_f0_2, &sp128, sp10C, corner);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
phi_f30 = 2.0f;
|
||||
goto block_22;
|
||||
}
|
||||
if ((func_802ACBA4(&spF8, temp_f20, temp_f22, temp_f24, temp_f26, arg1->unkE, arg2, arg3, arg4) == 1) && (temp_f0_3 = func_802ABE30(temp_f22, temp_f24, temp_f26, arg1->unkE), temp_f2_3 = arg0->unk18, !(temp_f2_3 < temp_f0_3)) && !((2.0f * temp_f20) < (temp_f2_3 - temp_f0_3))) {
|
||||
arg1->unk10 = temp_f0_3;
|
||||
func_802AF9F0(temp_f0_3, &sp110, sp104, arg1);
|
||||
return 1;
|
||||
if (func_802ACBA4(&spF8, temp_f20, temp_f22, temp_f24, temp_f26, (s32) corner->tileIndex, cornerX, cornerY, cornerZ) == 1) {
|
||||
temp_f0_3 = func_802ABE30(temp_f22, temp_f24, temp_f26, corner->tileIndex);
|
||||
temp_f2_3 = player->posY;
|
||||
if (!(temp_f2_3 < temp_f0_3) && !((2.0f * temp_f20) < (temp_f2_3 - temp_f0_3))) {
|
||||
corner->cornerGroundY = temp_f0_3;
|
||||
func_802AF9F0(temp_f0_3, &sp110, sp104, corner);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
phi_f30 = 2.0f;
|
||||
goto block_22;
|
||||
@@ -4548,23 +4565,23 @@ block_21:
|
||||
block_22:
|
||||
temp_v0_2 = D_8015F6EA;
|
||||
temp_v1 = D_8015F6F2;
|
||||
temp_f10 = (temp_f22 - temp_v0_2) / ((D_8015F6E8 - temp_v0_2) / 0x20);
|
||||
temp_f16 = (temp_f26 - temp_v1) / ((D_8015F6F0 - temp_v1) / 0x20);
|
||||
if (temp_f10 < 0) {
|
||||
temp_f10 = (s32) ((temp_f22 - (f32) temp_v0_2) / (f32) ((s32) (D_8015F6E8 - temp_v0_2) / 32));
|
||||
temp_f16 = (s32) ((temp_f26 - (f32) temp_v1) / (f32) ((s32) (D_8015F6F0 - temp_v1) / 32));
|
||||
if ((s32) (s16) temp_f10 < 0) {
|
||||
goto block_57;
|
||||
}
|
||||
if (temp_f16 < 0) {
|
||||
if ((s32) (s16) temp_f16 < 0) {
|
||||
goto block_57;
|
||||
}
|
||||
if (temp_f10 >= 0x20) {
|
||||
if ((s32) (s16) temp_f10 >= 0x20) {
|
||||
goto block_57;
|
||||
}
|
||||
if (temp_f16 >= 0x20) {
|
||||
if ((s32) (s16) temp_f16 >= 0x20) {
|
||||
goto block_57;
|
||||
}
|
||||
temp_v1_2 = ((temp_f10 + (temp_f16 << 5)) * 4) + &D_8014F110;
|
||||
temp_v1_2 = ((s16) ((s16) temp_f10 + ((s16) temp_f16 << 5)) * 4) + &D_8014F110;
|
||||
temp_v0_3 = temp_v1_2->unk2;
|
||||
sp8C = temp_v0_3;
|
||||
sp8C = (s32) temp_v0_3;
|
||||
if (temp_v0_3 == 0) {
|
||||
goto block_57;
|
||||
}
|
||||
@@ -4577,41 +4594,53 @@ loop_34:
|
||||
temp_v0_4 = D_8015F580 + temp_s4;
|
||||
temp_v1_3 = temp_v0_4->unk0;
|
||||
if ((temp_v1_3 & 0x4000) != 0) {
|
||||
if ((arg1->unkE != temp_s0) && (func_802AC760(phi_s7, temp_f20, temp_f22, temp_f24, temp_f26, temp_s0, arg2, arg3, arg4) == 1) && (temp_f0_4 = func_802ABE30(temp_f22, temp_f24, temp_f26, temp_s0 & 0xFFFF), temp_f2_4 = arg0->unk18, !(temp_f2_4 < temp_f0_4)) && !((phi_f30 * temp_f20) < (temp_f2_4 - temp_f0_4))) {
|
||||
spD4 = temp_f0_4;
|
||||
func_802AF9F0(temp_f0_4, &sp128, sp10C, arg1);
|
||||
arg1->unk10 = temp_f0_4;
|
||||
arg1->unkD = 0x40;
|
||||
arg1->unkE = temp_s0;
|
||||
arg1->unkC = (D_8015F580 + temp_s4)->unk2;
|
||||
if ((*(D_8015F580 + temp_s4) & 0x1000) != 0) {
|
||||
arg1->unk14 = 1;
|
||||
if ((corner->tileIndex != temp_s0) && (func_802AC760(phi_s7, temp_f20, temp_f22, temp_f24, temp_f26, (s32) temp_s0, cornerX, cornerY, cornerZ) == 1)) {
|
||||
temp_f0_4 = func_802ABE30(temp_f22, temp_f24, temp_f26, temp_s0 & 0xFFFF);
|
||||
temp_f2_4 = player->posY;
|
||||
if (!(temp_f2_4 < temp_f0_4) && !((phi_f30 * temp_f20) < (temp_f2_4 - temp_f0_4))) {
|
||||
spD4 = temp_f0_4;
|
||||
func_802AF9F0(temp_f0_4, &sp128, sp10C, corner);
|
||||
corner->cornerGroundY = spD4;
|
||||
corner->unk_0D = 0x40;
|
||||
corner->tileIndex = temp_s0;
|
||||
corner->surfaceType = (u8) (D_8015F580 + temp_s4)->unk2;
|
||||
if ((*(D_8015F580 + temp_s4) & 0x1000) != 0) {
|
||||
corner->unk_14 = 1;
|
||||
return 1;
|
||||
}
|
||||
corner->unk_14 = 0;
|
||||
return 1;
|
||||
}
|
||||
arg1->unk14 = 0;
|
||||
return 1;
|
||||
}
|
||||
goto block_55;
|
||||
}
|
||||
if ((temp_v1_3 & 0x8000) != 0) {
|
||||
if ((temp_v0_4->unk20 != 0.0f) && (arg1->unkE != temp_s0) && (func_802AD278(phi_s7, temp_f20, temp_f22, temp_f24, temp_f26, temp_s0, arg2, arg3, arg4) == 1) && (temp_f0_5 = func_802ABE30(temp_f22, temp_f24, temp_f26, temp_s0 & 0xFFFF), temp_f2_5 = arg0->unk18, !(temp_f2_5 < temp_f0_5)) && !((phi_f30 * temp_f20) < (temp_f2_5 - temp_f0_5))) {
|
||||
arg1->unk10 = temp_f0_5;
|
||||
func_802AF9F0(temp_f0_5, &sp11C, sp108, arg1);
|
||||
arg1->unk10 = func_802ABE30(temp_f22, temp_f24, temp_f26, temp_s0 & 0xFFFF);
|
||||
arg1->unkD = 0x80;
|
||||
arg1->unkE = temp_s0;
|
||||
arg1->unkC = (D_8015F580 + temp_s4)->unk2;
|
||||
return 1;
|
||||
if ((temp_v0_4->unk20 != 0.0f) && (corner->tileIndex != temp_s0) && (func_802AD278(phi_s7, temp_f20, temp_f22, temp_f24, temp_f26, (s32) temp_s0, cornerX, cornerY, cornerZ) == 1)) {
|
||||
temp_f0_5 = func_802ABE30(temp_f22, temp_f24, temp_f26, temp_s0 & 0xFFFF);
|
||||
temp_f2_5 = player->posY;
|
||||
if (!(temp_f2_5 < temp_f0_5) && !((phi_f30 * temp_f20) < (temp_f2_5 - temp_f0_5))) {
|
||||
corner->cornerGroundY = temp_f0_5;
|
||||
func_802AF9F0(temp_f0_5, &sp11C, sp108, corner);
|
||||
corner->cornerGroundY = func_802ABE30(temp_f22, temp_f24, temp_f26, temp_s0 & 0xFFFF);
|
||||
corner->unk_0D = 0x80;
|
||||
corner->tileIndex = temp_s0;
|
||||
corner->surfaceType = (u8) (D_8015F580 + temp_s4)->unk2;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
goto block_55;
|
||||
}
|
||||
if ((temp_v0_4->unk20 != 0.0f) && (arg1->unkE != temp_s0) && (func_802ACBA4(phi_s7, temp_f20, temp_f22, temp_f24, temp_f26, temp_s0, arg2, arg3, arg4) == 1) && (temp_f0_6 = func_802ABE30(temp_f22, temp_f24, temp_f26, temp_s0 & 0xFFFF), temp_f2_6 = arg0->unk18, !(temp_f2_6 < temp_f0_6)) && !((phi_f30 * temp_f20) < (temp_f2_6 - temp_f0_6))) {
|
||||
arg1->unk10 = temp_f0_6;
|
||||
func_802AF9F0(temp_f0_6, &sp110, sp104, arg1);
|
||||
arg1->unkD = 0x20;
|
||||
arg1->unkE = temp_s0;
|
||||
arg1->unkC = (D_8015F580 + temp_s4)->unk2;
|
||||
return 1;
|
||||
if ((temp_v0_4->unk20 != 0.0f) && (corner->tileIndex != temp_s0) && (func_802ACBA4(phi_s7, temp_f20, temp_f22, temp_f24, temp_f26, (s32) temp_s0, cornerX, cornerY, cornerZ) == 1)) {
|
||||
temp_f0_6 = func_802ABE30(temp_f22, temp_f24, temp_f26, temp_s0 & 0xFFFF);
|
||||
temp_f2_6 = player->posY;
|
||||
if (!(temp_f2_6 < temp_f0_6) && !((phi_f30 * temp_f20) < (temp_f2_6 - temp_f0_6))) {
|
||||
corner->cornerGroundY = temp_f0_6;
|
||||
func_802AF9F0(temp_f0_6, &sp110, sp104, corner);
|
||||
corner->unk_0D = 0x20;
|
||||
corner->tileIndex = temp_s0;
|
||||
corner->surfaceType = (u8) (D_8015F580 + temp_s4)->unk2;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
block_55:
|
||||
temp_t6 = (phi_s2 + 1) & 0xFFFF;
|
||||
@@ -4623,8 +4652,8 @@ block_55:
|
||||
goto loop_34;
|
||||
}
|
||||
block_56:
|
||||
arg1->unk10 = temp_f24;
|
||||
arg1->unkC = 0;
|
||||
corner->cornerGroundY = temp_f24;
|
||||
corner->surfaceType = 0;
|
||||
block_57:
|
||||
return 0;
|
||||
}
|
||||
|
||||
+7
-7
@@ -67,7 +67,7 @@ extern s16 gCurrentCourseId;
|
||||
extern s32 gModeSelection;
|
||||
extern s32 gActiveScreenMode;
|
||||
extern u16 D_8015F890;
|
||||
extern s32 lapCount[];
|
||||
extern s32 gLapCountByPlayerId[];
|
||||
extern s32 D_8018CA78;
|
||||
|
||||
extern Player *gPlayerOne;
|
||||
@@ -489,9 +489,9 @@ void func_80005B18(void) {
|
||||
u16 *phi_a3;
|
||||
|
||||
if (gModeSelection == TIME_TRIALS) {
|
||||
temp_v0 = lapCount[0];
|
||||
temp_v0 = gLapCountByPlayerId[0];
|
||||
//phi_a3 = &D_80162DD4;
|
||||
if ((lapCount[0] == 3) && (D_80162DDC == 0) && D_80162DF8 != 1) {
|
||||
if ((gLapCountByPlayerId[0] == 3) && (D_80162DDC == 0) && D_80162DF8 != 1) {
|
||||
//if (D_80162DF8 != 1) {
|
||||
|
||||
if (D_80162DD4 == 1) {
|
||||
@@ -507,7 +507,7 @@ void func_80005B18(void) {
|
||||
func_80005AE8(gPlayerThree);
|
||||
|
||||
} else {
|
||||
if (lapCount[4] != 3) {
|
||||
if (gLapCountByPlayerId[4] != 3) {
|
||||
D_80162DD0 = D_80162DCC;
|
||||
func_800052A4(); // gModeSelection, &D_80162DDC, 3, &D_80162DD4);
|
||||
D_80162DDC = 1;
|
||||
@@ -534,7 +534,7 @@ void func_80005B18(void) {
|
||||
|
||||
return;
|
||||
}
|
||||
if ((lapCount[0] == 3) && (D_80162DDC == 0) && (D_80162DF8 == 1)) {
|
||||
if ((gLapCountByPlayerId[0] == 3) && (D_80162DDC == 0) && (D_80162DF8 == 1)) {
|
||||
D_80162D80 = (void *) ((D_80162DC8 << 0xF) + 0x3000 + &D_802BFB80);
|
||||
D_80162D84 = D_80162D86;
|
||||
D_80162DDC = 1;
|
||||
@@ -549,10 +549,10 @@ void func_80005B18(void) {
|
||||
D_80162DEC = 100;
|
||||
}
|
||||
if ((gModeSelection == TIME_TRIALS) && (gActiveScreenMode == 0)) {
|
||||
if ((D_80162DD4 == 0) && (lapCount[4] != 3)) {
|
||||
if ((D_80162DD4 == 0) && (gLapCountByPlayerId[4] != 3)) {
|
||||
func_800057DC(); //gModeSelection, &D_80162DDC, 3, &D_80162DD4);
|
||||
}
|
||||
if ((D_80162DD6 == 0) && (3 != lapCount[8])) {
|
||||
if ((D_80162DD6 == 0) && (3 != gLapCountByPlayerId[8])) {
|
||||
func_8000561C();
|
||||
}
|
||||
if (( gPlayerOne->unk_000 & PLAYER_CINEMATIC_MODE) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user