From 6d70872c5b143ce3f74a51359b78cf91cc61e381 Mon Sep 17 00:00:00 2001 From: Tyler McGavran Date: Sat, 4 Dec 2021 02:04:07 -0500 Subject: [PATCH] Identification of some race related varaibles (#78) * Renamed time/race related variables Signed-off-by: Taggerung --- asm/bss_800029B0.s | 2 +- asm/bss_80005FD0.s | 2 +- asm/bss_MainSeg.s | 2 +- .../code_80005FD0/func_800070F4.s | 24 +-- .../code_80005FD0/func_800074D4.s | 48 +++--- .../code_80005FD0/func_80008F38.s | 4 +- .../code_80005FD0/func_8000929C.s | 4 +- .../code_80005FD0/func_80009B60.s | 4 +- .../code_80005FD0/func_8000F628.s | 8 +- asm/non_matchings/code_80005FD0/set_places.s | 60 +++---- .../code_80057C60/func_8005CB60.s | 4 +- .../code_80091750/func_800A32B4.s | 4 +- include/variables.h | 6 + src/code_80005FD0.c | 152 +++++++++--------- src/code_80057C60.c | 4 +- src/code_80091750.c | 4 +- src/code_8028DF00.c | 4 +- 17 files changed, 171 insertions(+), 165 deletions(-) diff --git a/asm/bss_800029B0.s b/asm/bss_800029B0.s index c8a7b8c77..e42aab240 100644 --- a/asm/bss_800029B0.s +++ b/asm/bss_800029B0.s @@ -190,7 +190,7 @@ glabel D_8015F892 glabel D_8015F894 .skip 4 -glabel D_8015F898 +glabel gTimePlayerLastTouchedFinishLine .skip 32 glabel D_8015F8B8 diff --git a/asm/bss_80005FD0.s b/asm/bss_80005FD0.s index 4ddff8189..39c4ac0e5 100644 --- a/asm/bss_80005FD0.s +++ b/asm/bss_80005FD0.s @@ -47,7 +47,7 @@ glabel D_80162FCE glabel D_80162FD0 .skip 8 -glabel D_80162FD8 +glabel gTrackCompletionPercentByRank .skip 32 glabel D_80162FF8 diff --git a/asm/bss_MainSeg.s b/asm/bss_MainSeg.s index 97bcb4f2b..3c47b6f3e 100644 --- a/asm/bss_MainSeg.s +++ b/asm/bss_MainSeg.s @@ -241,7 +241,7 @@ glabel D_80164498 glabel D_801644A8 .skip 40 -glabel D_801644D0 +glabel gTrackCompletionPercentByPlayerId .skip 40 glabel D_801644F8 diff --git a/asm/non_matchings/code_80005FD0/func_800070F4.s b/asm/non_matchings/code_80005FD0/func_800070F4.s index a752c3498..176a2b007 100644 --- a/asm/non_matchings/code_80005FD0/func_800070F4.s +++ b/asm/non_matchings/code_80005FD0/func_800070F4.s @@ -27,13 +27,13 @@ glabel func_800070F4 /* 007D4C 8000714C 01404825 */ move $t1, $t2 /* 007D50 80007150 3C0F8016 */ lui $t7, %hi(D_80164360) # $t7, 0x8016 /* 007D54 80007154 00002080 */ sll $a0, $zero, 2 -/* 007D58 80007158 3C198016 */ lui $t9, %hi(D_80162FD8) # $t9, 0x8016 -/* 007D5C 8000715C 27392FD8 */ addiu $t9, %lo(D_80162FD8) # addiu $t9, $t9, 0x2fd8 +/* 007D58 80007158 3C198016 */ lui $t9, %hi(gTrackCompletionPercentByRank) # $t9, 0x8016 +/* 007D5C 8000715C 27392FD8 */ addiu $t9, %lo(gTrackCompletionPercentByRank) # addiu $t9, $t9, 0x2fd8 /* 007D60 80007160 25EF4360 */ addiu $t7, %lo(D_80164360) # addiu $t7, $t7, 0x4360 /* 007D64 80007164 00007040 */ sll $t6, $zero, 1 /* 007D68 80007168 27B80050 */ addiu $t8, $sp, 0x50 -/* 007D6C 8000716C 3C0A8016 */ lui $t2, %hi(D_8015F898) # $t2, 0x8016 -/* 007D70 80007170 254AF898 */ addiu $t2, %lo(D_8015F898) # addiu $t2, $t2, -0x768 +/* 007D6C 8000716C 3C0A8016 */ lui $t2, %hi(gTimePlayerLastTouchedFinishLine) # $t2, 0x8016 +/* 007D70 80007170 254AF898 */ addiu $t2, %lo(gTimePlayerLastTouchedFinishLine) # addiu $t2, $t2, -0x768 /* 007D74 80007174 00981021 */ addu $v0, $a0, $t8 /* 007D78 80007178 01CF4021 */ addu $t0, $t6, $t7 /* 007D7C 8000717C 00991821 */ addu $v1, $a0, $t9 @@ -57,15 +57,15 @@ glabel func_800070F4 /* 007DBC 800071BC 3C198016 */ lui $t9, %hi(D_80164360) # $t9, 0x8016 /* 007DC0 800071C0 27394360 */ addiu $t9, %lo(D_80164360) # addiu $t9, $t9, 0x4360 /* 007DC4 800071C4 0007C040 */ sll $t8, $a3, 1 -/* 007DC8 800071C8 3C0F8016 */ lui $t7, %hi(D_80162FD8) # $t7, 0x8016 -/* 007DCC 800071CC 25EF2FD8 */ addiu $t7, %lo(D_80162FD8) # addiu $t7, $t7, 0x2fd8 +/* 007DC8 800071C8 3C0F8016 */ lui $t7, %hi(gTrackCompletionPercentByRank) # $t7, 0x8016 +/* 007DCC 800071CC 25EF2FD8 */ addiu $t7, %lo(gTrackCompletionPercentByRank) # addiu $t7, $t7, 0x2fd8 /* 007DD0 800071D0 03194021 */ addu $t0, $t8, $t9 /* 007DD4 800071D4 00072080 */ sll $a0, $a3, 2 /* 007DD8 800071D8 0006C080 */ sll $t8, $a2, 2 -/* 007DDC 800071DC 3C0A8016 */ lui $t2, %hi(D_8015F898) # $t2, 0x8016 +/* 007DDC 800071DC 3C0A8016 */ lui $t2, %hi(gTimePlayerLastTouchedFinishLine) # $t2, 0x8016 /* 007DE0 800071E0 27AE0050 */ addiu $t6, $sp, 0x50 /* 007DE4 800071E4 008E1021 */ addu $v0, $a0, $t6 -/* 007DE8 800071E8 254AF898 */ addiu $t2, %lo(D_8015F898) # addiu $t2, $t2, -0x768 +/* 007DE8 800071E8 254AF898 */ addiu $t2, %lo(gTimePlayerLastTouchedFinishLine) # addiu $t2, $t2, -0x768 /* 007DEC 800071EC 030F2821 */ addu $a1, $t8, $t7 /* 007DF0 800071F0 008F1821 */ addu $v1, $a0, $t7 .L800071F4: @@ -112,10 +112,10 @@ glabel func_800070F4 /* 007E88 80007288 10200040 */ beqz $at, .L8000738C /* 007E8C 8000728C 00A01025 */ move $v0, $a1 /* 007E90 80007290 00072080 */ sll $a0, $a3, 2 -/* 007E94 80007294 3C198016 */ lui $t9, %hi(D_80162FD8) # $t9, 0x8016 +/* 007E94 80007294 3C198016 */ lui $t9, %hi(gTrackCompletionPercentByRank) # $t9, 0x8016 /* 007E98 80007298 00C54823 */ subu $t1, $a2, $a1 /* 007E9C 8000729C 31270001 */ andi $a3, $t1, 1 -/* 007EA0 800072A0 27392FD8 */ addiu $t9, %lo(D_80162FD8) # addiu $t9, $t9, 0x2fd8 +/* 007EA0 800072A0 27392FD8 */ addiu $t9, %lo(gTrackCompletionPercentByRank) # addiu $t9, $t9, 0x2fd8 /* 007EA4 800072A4 10E00013 */ beqz $a3, .L800072F4 /* 007EA8 800072A8 00991821 */ addu $v1, $a0, $t9 /* 007EAC 800072AC 00053880 */ sll $a3, $a1, 2 @@ -138,8 +138,8 @@ glabel func_800070F4 .L800072F0: /* 007EF0 800072F0 10460026 */ beq $v0, $a2, .L8000738C .L800072F4: -/* 007EF4 800072F4 3C188016 */ lui $t8, %hi(D_80162FD8) # $t8, 0x8016 -/* 007EF8 800072F8 27182FD8 */ addiu $t8, %lo(D_80162FD8) # addiu $t8, $t8, 0x2fd8 +/* 007EF4 800072F4 3C188016 */ lui $t8, %hi(gTrackCompletionPercentByRank) # $t8, 0x8016 +/* 007EF8 800072F8 27182FD8 */ addiu $t8, %lo(gTrackCompletionPercentByRank) # addiu $t8, $t8, 0x2fd8 /* 007EFC 800072FC 00023880 */ sll $a3, $v0, 2 /* 007F00 80007300 00067880 */ sll $t7, $a2, 2 /* 007F04 80007304 01F86021 */ addu $t4, $t7, $t8 diff --git a/asm/non_matchings/code_80005FD0/func_800074D4.s b/asm/non_matchings/code_80005FD0/func_800074D4.s index 940b46285..dd43a09f4 100644 --- a/asm/non_matchings/code_80005FD0/func_800074D4.s +++ b/asm/non_matchings/code_80005FD0/func_800074D4.s @@ -1,11 +1,11 @@ glabel func_800074D4 /* 0080D4 800074D4 27BDFF70 */ addiu $sp, $sp, -0x90 -/* 0080D8 800074D8 3C048016 */ lui $a0, %hi(D_80162FD8) # $a0, 0x8016 +/* 0080D8 800074D8 3C048016 */ lui $a0, %hi(gTrackCompletionPercentByRank) # $a0, 0x8016 /* 0080DC 800074DC 44800000 */ mtc1 $zero, $f0 /* 0080E0 800074E0 AFB1000C */ sw $s1, 0xc($sp) /* 0080E4 800074E4 AFB00008 */ sw $s0, 8($sp) /* 0080E8 800074E8 240A0008 */ li $t2, 8 -/* 0080EC 800074EC 24842FD8 */ addiu $a0, %lo(D_80162FD8) # addiu $a0, $a0, 0x2fd8 +/* 0080EC 800074EC 24842FD8 */ addiu $a0, %lo(gTrackCompletionPercentByRank) # addiu $a0, $a0, 0x2fd8 /* 0080F0 800074F0 24070001 */ li $a3, 1 /* 0080F4 800074F4 24020009 */ li $v0, 9 .L800074F8: @@ -26,10 +26,10 @@ glabel func_800074D4 /* 008130 80007530 3C0F800F */ lui $t7, %hi(gPlayers) # $t7, 0x800f /* 008134 80007534 25EF6990 */ addiu $t7, %lo(gPlayers) # addiu $t7, $t7, 0x6990 /* 008138 80007538 000E70C0 */ sll $t6, $t6, 3 -/* 00813C 8000753C 3C0C8016 */ lui $t4, %hi(D_80162FD8) # $t4, 0x8016 -/* 008140 80007540 3C098016 */ lui $t1, %hi(D_8015F898) # $t1, 0x8016 -/* 008144 80007544 2529F898 */ addiu $t1, %lo(D_8015F898) # addiu $t1, $t1, -0x768 -/* 008148 80007548 258C2FD8 */ addiu $t4, %lo(D_80162FD8) # addiu $t4, $t4, 0x2fd8 +/* 00813C 8000753C 3C0C8016 */ lui $t4, %hi(gTrackCompletionPercentByRank) # $t4, 0x8016 +/* 008140 80007540 3C098016 */ lui $t1, %hi(gTimePlayerLastTouchedFinishLine) # $t1, 0x8016 +/* 008144 80007544 2529F898 */ addiu $t1, %lo(gTimePlayerLastTouchedFinishLine) # addiu $t1, $t1, -0x768 +/* 008148 80007548 258C2FD8 */ addiu $t4, %lo(gTrackCompletionPercentByRank) # addiu $t4, $t4, 0x2fd8 /* 00814C 8000754C 01CF2021 */ addu $a0, $t6, $t7 /* 008150 80007550 00002825 */ move $a1, $zero /* 008154 80007554 24070001 */ li $a3, 1 @@ -65,10 +65,10 @@ glabel func_800074D4 /* 0081C0 800075C0 3C0F800F */ lui $t7, %hi(gPlayers) # $t7, 0x800f /* 0081C4 800075C4 25EF6990 */ addiu $t7, %lo(gPlayers) # addiu $t7, $t7, 0x6990 /* 0081C8 800075C8 000E70C0 */ sll $t6, $t6, 3 -/* 0081CC 800075CC 3C098016 */ lui $t1, %hi(D_8015F898) # $t1, 0x8016 -/* 0081D0 800075D0 3C0C8016 */ lui $t4, %hi(D_80162FD8) # $t4, 0x8016 -/* 0081D4 800075D4 258C2FD8 */ addiu $t4, %lo(D_80162FD8) # addiu $t4, $t4, 0x2fd8 -/* 0081D8 800075D8 2529F898 */ addiu $t1, %lo(D_8015F898) # addiu $t1, $t1, -0x768 +/* 0081CC 800075CC 3C098016 */ lui $t1, %hi(gTimePlayerLastTouchedFinishLine) # $t1, 0x8016 +/* 0081D0 800075D0 3C0C8016 */ lui $t4, %hi(gTrackCompletionPercentByRank) # $t4, 0x8016 +/* 0081D4 800075D4 258C2FD8 */ addiu $t4, %lo(gTrackCompletionPercentByRank) # addiu $t4, $t4, 0x2fd8 +/* 0081D8 800075D8 2529F898 */ addiu $t1, %lo(gTimePlayerLastTouchedFinishLine) # addiu $t1, $t1, -0x768 /* 0081DC 800075DC 01CF2021 */ addu $a0, $t6, $t7 /* 0081E0 800075E0 27A60068 */ addiu $a2, $sp, 0x68 .L800075E4: @@ -135,8 +135,8 @@ glabel func_800074D4 /* 0082C4 800076C4 150AFFC7 */ bne $t0, $t2, .L800075E4 /* 0082C8 800076C8 24843760 */ addiu $a0, $a0, 0x3760 .L800076CC: -/* 0082CC 800076CC 3C0C8016 */ lui $t4, %hi(D_80162FD8) # $t4, 0x8016 -/* 0082D0 800076D0 258C2FD8 */ addiu $t4, %lo(D_80162FD8) # addiu $t4, $t4, 0x2fd8 +/* 0082CC 800076CC 3C0C8016 */ lui $t4, %hi(gTrackCompletionPercentByRank) # $t4, 0x8016 +/* 0082D0 800076D0 258C2FD8 */ addiu $t4, %lo(gTrackCompletionPercentByRank) # addiu $t4, $t4, 0x2fd8 /* 0082D4 800076D4 00004025 */ move $t0, $zero /* 0082D8 800076D8 27A60068 */ addiu $a2, $sp, 0x68 /* 0082DC 800076DC 240B0008 */ li $t3, 8 @@ -151,8 +151,8 @@ glabel func_800074D4 /* 008300 80007700 3C18800F */ lui $t8, %hi(gPlayers) # $t8, 0x800f /* 008304 80007704 27186990 */ addiu $t8, %lo(gPlayers) # addiu $t8, $t8, 0x6990 /* 008308 80007708 000F78C0 */ sll $t7, $t7, 3 -/* 00830C 8000770C 3C0D8016 */ lui $t5, %hi(D_801644D0) # $t5, 0x8016 -/* 008310 80007710 25AD44D0 */ addiu $t5, %lo(D_801644D0) # addiu $t5, $t5, 0x44d0 +/* 00830C 8000770C 3C0D8016 */ lui $t5, %hi(gTrackCompletionPercentByPlayerId) # $t5, 0x8016 +/* 008310 80007710 25AD44D0 */ addiu $t5, %lo(gTrackCompletionPercentByPlayerId) # addiu $t5, $t5, 0x44d0 /* 008314 80007714 01F82021 */ addu $a0, $t7, $t8 /* 008318 80007718 00002825 */ move $a1, $zero /* 00831C 8000771C 24070001 */ li $a3, 1 @@ -185,8 +185,8 @@ glabel func_800074D4 /* 00837C 8000777C 3C18800F */ lui $t8, %hi(gPlayers) # $t8, 0x800f /* 008380 80007780 27186990 */ addiu $t8, %lo(gPlayers) # addiu $t8, $t8, 0x6990 /* 008384 80007784 000F78C0 */ sll $t7, $t7, 3 -/* 008388 80007788 3C0D8016 */ lui $t5, %hi(D_801644D0) # $t5, 0x8016 -/* 00838C 8000778C 25AD44D0 */ addiu $t5, %lo(D_801644D0) # addiu $t5, $t5, 0x44d0 +/* 008388 80007788 3C0D8016 */ lui $t5, %hi(gTrackCompletionPercentByPlayerId) # $t5, 0x8016 +/* 00838C 8000778C 25AD44D0 */ addiu $t5, %lo(gTrackCompletionPercentByPlayerId) # addiu $t5, $t5, 0x44d0 /* 008390 80007790 01F82021 */ addu $a0, $t7, $t8 .L80007794: /* 008394 80007794 94990000 */ lhu $t9, ($a0) @@ -256,10 +256,10 @@ glabel func_800074D4 /* 00847C 8000787C 00E9082A */ slt $at, $a3, $t1 /* 008480 80007880 10200040 */ beqz $at, .L80007984 /* 008484 80007884 00E01025 */ move $v0, $a3 -/* 008488 80007888 3C188016 */ lui $t8, %hi(D_80162FD8) # $t8, 0x8016 +/* 008488 80007888 3C188016 */ lui $t8, %hi(gTrackCompletionPercentByRank) # $t8, 0x8016 /* 00848C 8000788C 01276023 */ subu $t4, $t1, $a3 /* 008490 80007890 31830001 */ andi $v1, $t4, 1 -/* 008494 80007894 27182FD8 */ addiu $t8, %lo(D_80162FD8) # addiu $t8, $t8, 0x2fd8 +/* 008494 80007894 27182FD8 */ addiu $t8, %lo(gTrackCompletionPercentByRank) # addiu $t8, $t8, 0x2fd8 /* 008498 80007898 00082880 */ sll $a1, $t0, 2 /* 00849C 8000789C 10600013 */ beqz $v1, .L800078EC /* 0084A0 800078A0 00B82021 */ addu $a0, $a1, $t8 @@ -283,8 +283,8 @@ glabel func_800074D4 .L800078E8: /* 0084E8 800078E8 10490026 */ beq $v0, $t1, .L80007984 .L800078EC: -/* 0084EC 800078EC 3C0E8016 */ lui $t6, %hi(D_80162FD8) # $t6, 0x8016 -/* 0084F0 800078F0 25CE2FD8 */ addiu $t6, %lo(D_80162FD8) # addiu $t6, $t6, 0x2fd8 +/* 0084EC 800078EC 3C0E8016 */ lui $t6, %hi(gTrackCompletionPercentByRank) # $t6, 0x8016 +/* 0084F0 800078F0 25CE2FD8 */ addiu $t6, %lo(gTrackCompletionPercentByRank) # addiu $t6, $t6, 0x2fd8 /* 0084F4 800078F4 00021880 */ sll $v1, $v0, 2 /* 0084F8 800078F8 00097880 */ sll $t7, $t1, 2 /* 0084FC 800078FC 01EE8821 */ addu $s1, $t7, $t6 @@ -340,8 +340,8 @@ glabel func_800074D4 /* 0085AC 800079AC 00E01025 */ move $v0, $a3 /* 0085B0 800079B0 240E0008 */ li $t6, 8 /* 0085B4 800079B4 01C76023 */ subu $t4, $t6, $a3 -/* 0085B8 800079B8 3C0F8016 */ lui $t7, %hi(D_80162FD8) # $t7, 0x8016 -/* 0085BC 800079BC 25EF2FD8 */ addiu $t7, %lo(D_80162FD8) # addiu $t7, $t7, 0x2fd8 +/* 0085B8 800079B8 3C0F8016 */ lui $t7, %hi(gTrackCompletionPercentByRank) # $t7, 0x8016 +/* 0085BC 800079BC 25EF2FD8 */ addiu $t7, %lo(gTrackCompletionPercentByRank) # addiu $t7, $t7, 0x2fd8 /* 0085C0 800079C0 31830001 */ andi $v1, $t4, 1 /* 0085C4 800079C4 00082880 */ sll $a1, $t0, 2 /* 0085C8 800079C8 10600013 */ beqz $v1, .L80007A18 @@ -366,8 +366,8 @@ glabel func_800074D4 .L80007A14: /* 008614 80007A14 104B0026 */ beq $v0, $t3, .L80007AB0 .L80007A18: -/* 008618 80007A18 3C198016 */ lui $t9, %hi(D_80162FD8) # $t9, 0x8016 -/* 00861C 80007A1C 27392FD8 */ addiu $t9, %lo(D_80162FD8) # addiu $t9, $t9, 0x2fd8 +/* 008618 80007A18 3C198016 */ lui $t9, %hi(gTrackCompletionPercentByRank) # $t9, 0x8016 +/* 00861C 80007A1C 27392FD8 */ addiu $t9, %lo(gTrackCompletionPercentByRank) # addiu $t9, $t9, 0x2fd8 /* 008620 80007A20 00021880 */ sll $v1, $v0, 2 /* 008624 80007A24 000A7080 */ sll $t6, $t2, 2 /* 008628 80007A28 01D96821 */ addu $t5, $t6, $t9 diff --git a/asm/non_matchings/code_80005FD0/func_80008F38.s b/asm/non_matchings/code_80005FD0/func_80008F38.s index 0a863efdf..03801075b 100644 --- a/asm/non_matchings/code_80005FD0/func_80008F38.s +++ b/asm/non_matchings/code_80005FD0/func_80008F38.s @@ -47,7 +47,7 @@ glabel func_80008F38 /* 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) -/* 009BF0 80008FF0 3C018016 */ lui $at, %hi(D_801644D0) +/* 009BF0 80008FF0 3C018016 */ lui $at, %hi(gTrackCompletionPercentByPlayerId) /* 009BF4 80008FF4 00220821 */ addu $at, $at, $v0 /* 009BF8 80008FF8 03E00008 */ jr $ra -/* 009BFC 80008FFC E42A44D0 */ swc1 $f10, %lo(D_801644D0)($at) +/* 009BFC 80008FFC E42A44D0 */ swc1 $f10, %lo(gTrackCompletionPercentByPlayerId)($at) diff --git a/asm/non_matchings/code_80005FD0/func_8000929C.s b/asm/non_matchings/code_80005FD0/func_8000929C.s index 55fa59e84..fa66981cd 100644 --- a/asm/non_matchings/code_80005FD0/func_8000929C.s +++ b/asm/non_matchings/code_80005FD0/func_8000929C.s @@ -249,10 +249,10 @@ glabel func_8000929C /* 00A244 80009644 0C002496 */ jal func_80009258 /* 00A248 80009648 A7A80034 */ sh $t0, 0x34($sp) /* 00A24C 8000964C 8FA70030 */ lw $a3, 0x30($sp) -/* 00A250 80009650 3C018016 */ lui $at, %hi(D_8015F898) +/* 00A250 80009650 3C018016 */ lui $at, %hi(gTimePlayerLastTouchedFinishLine) /* 00A254 80009654 8FA40050 */ lw $a0, 0x50($sp) /* 00A258 80009658 00270821 */ addu $at, $at, $a3 -/* 00A25C 8000965C E420F898 */ swc1 $f0, %lo(D_8015F898)($at) +/* 00A25C 8000965C E420F898 */ swc1 $f0, %lo(gTimePlayerLastTouchedFinishLine)($at) /* 00A260 80009660 87A80034 */ lh $t0, 0x34($sp) .L80009664: /* 00A264 80009664 11000014 */ beqz $t0, .L800096B8 diff --git a/asm/non_matchings/code_80005FD0/func_80009B60.s b/asm/non_matchings/code_80005FD0/func_80009B60.s index 58dcbac07..2eeb89f2d 100644 --- a/asm/non_matchings/code_80005FD0/func_80009B60.s +++ b/asm/non_matchings/code_80005FD0/func_80009B60.s @@ -55,9 +55,9 @@ glabel func_80009B60 /* 00A830 80009C30 00270821 */ addu $at, $at, $a3 /* 00A834 80009C34 240FFFEC */ li $t7, -20 /* 00A838 80009C38 AC2F4450 */ sw $t7, %lo(D_80164450)($at) # 0x4450($at) -/* 00A83C 80009C3C 3C018016 */ lui $at, %hi(D_801644D0) +/* 00A83C 80009C3C 3C018016 */ lui $at, %hi(gTrackCompletionPercentByPlayerId) /* 00A840 80009C40 00270821 */ addu $at, $at, $a3 -/* 00A844 80009C44 E42044D0 */ swc1 $f0, %lo(D_801644D0)($at) +/* 00A844 80009C44 E42044D0 */ swc1 $f0, %lo(gTrackCompletionPercentByPlayerId)($at) /* 00A848 80009C48 3C018016 */ lui $at, %hi(D_801644A8) /* 00A84C 80009C4C 00270821 */ addu $at, $at, $a3 /* 00A850 80009C50 10000537 */ b .L8000B130 diff --git a/asm/non_matchings/code_80005FD0/func_8000F628.s b/asm/non_matchings/code_80005FD0/func_8000F628.s index 5cc7a8596..f8cbd2564 100644 --- a/asm/non_matchings/code_80005FD0/func_8000F628.s +++ b/asm/non_matchings/code_80005FD0/func_8000F628.s @@ -8,10 +8,10 @@ glabel func_8000F628 /* 010240 8000F640 AFAF00D0 */ sw $t7, 0xd0($sp) /* 010244 8000F644 3C0F8016 */ lui $t7, %hi(D_80163258) # $t7, 0x8016 /* 010248 8000F648 3C0E8016 */ lui $t6, %hi(D_80164408) # $t6, 0x8016 -/* 01024C 8000F64C 3C188016 */ lui $t8, %hi(D_801644D0) # $t8, 0x8016 -/* 010250 8000F650 3C198016 */ lui $t9, %hi(D_8015F898) # $t9, 0x8016 -/* 010254 8000F654 2739F898 */ addiu $t9, %lo(D_8015F898) # addiu $t9, $t9, -0x768 -/* 010258 8000F658 271844D0 */ addiu $t8, %lo(D_801644D0) # addiu $t8, $t8, 0x44d0 +/* 01024C 8000F64C 3C188016 */ lui $t8, %hi(gTrackCompletionPercentByPlayerId) # $t8, 0x8016 +/* 010250 8000F650 3C198016 */ lui $t9, %hi(gTimePlayerLastTouchedFinishLine) # $t9, 0x8016 +/* 010254 8000F654 2739F898 */ addiu $t9, %lo(gTimePlayerLastTouchedFinishLine) # addiu $t9, $t9, -0x768 +/* 010258 8000F658 271844D0 */ addiu $t8, %lo(gTrackCompletionPercentByPlayerId) # addiu $t8, $t8, 0x44d0 /* 01025C 8000F65C 25CE4408 */ addiu $t6, %lo(D_80164408) # addiu $t6, $t6, 0x4408 /* 010260 8000F660 25EF3258 */ addiu $t7, %lo(D_80163258) # addiu $t7, $t7, 0x3258 /* 010264 8000F664 AFAF00B8 */ sw $t7, 0xb8($sp) diff --git a/asm/non_matchings/code_80005FD0/set_places.s b/asm/non_matchings/code_80005FD0/set_places.s index e88ff9acf..bb78402bf 100644 --- a/asm/non_matchings/code_80005FD0/set_places.s +++ b/asm/non_matchings/code_80005FD0/set_places.s @@ -34,13 +34,13 @@ glabel set_places /* 007438 80006838 01003025 */ move $a2, $t0 /* 00743C 8000683C 3C188016 */ lui $t8, %hi(D_80164360) # $t8, 0x8016 /* 007440 80006840 00002880 */ sll $a1, $zero, 2 -/* 007444 80006844 3C0E8016 */ lui $t6, %hi(D_80162FD8) # $t6, 0x8016 -/* 007448 80006848 25CE2FD8 */ addiu $t6, %lo(D_80162FD8) # addiu $t6, $t6, 0x2fd8 +/* 007444 80006844 3C0E8016 */ lui $t6, %hi(gTrackCompletionPercentByRank) # $t6, 0x8016 +/* 007448 80006848 25CE2FD8 */ addiu $t6, %lo(gTrackCompletionPercentByRank) # addiu $t6, $t6, 0x2fd8 /* 00744C 8000684C 27184360 */ addiu $t8, %lo(D_80164360) # addiu $t8, $t8, 0x4360 /* 007450 80006850 00007840 */ sll $t7, $zero, 1 /* 007454 80006854 27B90080 */ addiu $t9, $sp, 0x80 -/* 007458 80006858 3C0D8016 */ lui $t5, %hi(D_801644D0) # $t5, 0x8016 -/* 00745C 8000685C 25AD44D0 */ addiu $t5, %lo(D_801644D0) # addiu $t5, $t5, 0x44d0 +/* 007458 80006858 3C0D8016 */ lui $t5, %hi(gTrackCompletionPercentByPlayerId) # $t5, 0x8016 +/* 00745C 8000685C 25AD44D0 */ addiu $t5, %lo(gTrackCompletionPercentByPlayerId) # addiu $t5, $t5, 0x44d0 /* 007460 80006860 00B91021 */ addu $v0, $a1, $t9 /* 007464 80006864 01F85021 */ addu $t2, $t7, $t8 /* 007468 80006868 00AE1821 */ addu $v1, $a1, $t6 @@ -63,15 +63,15 @@ glabel set_places /* 0074A4 800068A4 3C0E8016 */ lui $t6, %hi(D_80164360) # $t6, 0x8016 /* 0074A8 800068A8 25CE4360 */ addiu $t6, %lo(D_80164360) # addiu $t6, $t6, 0x4360 /* 0074AC 800068AC 000BC840 */ sll $t9, $t3, 1 -/* 0074B0 800068B0 3C188016 */ lui $t8, %hi(D_80162FD8) # $t8, 0x8016 -/* 0074B4 800068B4 27182FD8 */ addiu $t8, %lo(D_80162FD8) # addiu $t8, $t8, 0x2fd8 +/* 0074B0 800068B0 3C188016 */ lui $t8, %hi(gTrackCompletionPercentByRank) # $t8, 0x8016 +/* 0074B4 800068B4 27182FD8 */ addiu $t8, %lo(gTrackCompletionPercentByRank) # addiu $t8, $t8, 0x2fd8 /* 0074B8 800068B8 032E5021 */ addu $t2, $t9, $t6 /* 0074BC 800068BC 000B2880 */ sll $a1, $t3, 2 /* 0074C0 800068C0 000CC880 */ sll $t9, $t4, 2 -/* 0074C4 800068C4 3C0D8016 */ lui $t5, %hi(D_801644D0) # $t5, 0x8016 +/* 0074C4 800068C4 3C0D8016 */ lui $t5, %hi(gTrackCompletionPercentByPlayerId) # $t5, 0x8016 /* 0074C8 800068C8 27AF0080 */ addiu $t7, $sp, 0x80 /* 0074CC 800068CC 00AF1021 */ addu $v0, $a1, $t7 -/* 0074D0 800068D0 25AD44D0 */ addiu $t5, %lo(D_801644D0) # addiu $t5, $t5, 0x44d0 +/* 0074D0 800068D0 25AD44D0 */ addiu $t5, %lo(gTrackCompletionPercentByPlayerId) # addiu $t5, $t5, 0x44d0 /* 0074D4 800068D4 03383021 */ addu $a2, $t9, $t8 /* 0074D8 800068D8 00B81821 */ addu $v1, $a1, $t8 .L800068DC: @@ -116,13 +116,13 @@ glabel set_places /* 007568 80006968 01003025 */ move $a2, $t0 /* 00756C 8000696C 3C0F8016 */ lui $t7, %hi(D_80164360) # $t7, 0x8016 /* 007570 80006970 00002880 */ sll $a1, $zero, 2 -/* 007574 80006974 3C188016 */ lui $t8, %hi(D_80162FD8) # $t8, 0x8016 -/* 007578 80006978 27182FD8 */ addiu $t8, %lo(D_80162FD8) # addiu $t8, $t8, 0x2fd8 +/* 007574 80006974 3C188016 */ lui $t8, %hi(gTrackCompletionPercentByRank) # $t8, 0x8016 +/* 007578 80006978 27182FD8 */ addiu $t8, %lo(gTrackCompletionPercentByRank) # addiu $t8, $t8, 0x2fd8 /* 00757C 8000697C 25EF4360 */ addiu $t7, %lo(D_80164360) # addiu $t7, $t7, 0x4360 /* 007580 80006980 00007040 */ sll $t6, $zero, 1 /* 007584 80006984 27B90080 */ addiu $t9, $sp, 0x80 -/* 007588 80006988 3C078016 */ lui $a3, %hi(D_8015F898) # $a3, 0x8016 -/* 00758C 8000698C 24E7F898 */ addiu $a3, %lo(D_8015F898) # addiu $a3, $a3, -0x768 +/* 007588 80006988 3C078016 */ lui $a3, %hi(gTimePlayerLastTouchedFinishLine) # $a3, 0x8016 +/* 00758C 8000698C 24E7F898 */ addiu $a3, %lo(gTimePlayerLastTouchedFinishLine) # addiu $a3, $a3, -0x768 /* 007590 80006990 00B91021 */ addu $v0, $a1, $t9 /* 007594 80006994 01CF5021 */ addu $t2, $t6, $t7 /* 007598 80006998 00B81821 */ addu $v1, $a1, $t8 @@ -146,15 +146,15 @@ glabel set_places /* 0075D8 800069D8 3C188016 */ lui $t8, %hi(D_80164360) # $t8, 0x8016 /* 0075DC 800069DC 27184360 */ addiu $t8, %lo(D_80164360) # addiu $t8, $t8, 0x4360 /* 0075E0 800069E0 000BC840 */ sll $t9, $t3, 1 -/* 0075E4 800069E4 3C0F8016 */ lui $t7, %hi(D_80162FD8) # $t7, 0x8016 -/* 0075E8 800069E8 25EF2FD8 */ addiu $t7, %lo(D_80162FD8) # addiu $t7, $t7, 0x2fd8 +/* 0075E4 800069E4 3C0F8016 */ lui $t7, %hi(gTrackCompletionPercentByRank) # $t7, 0x8016 +/* 0075E8 800069E8 25EF2FD8 */ addiu $t7, %lo(gTrackCompletionPercentByRank) # addiu $t7, $t7, 0x2fd8 /* 0075EC 800069EC 03385021 */ addu $t2, $t9, $t8 /* 0075F0 800069F0 000B2880 */ sll $a1, $t3, 2 /* 0075F4 800069F4 000CC880 */ sll $t9, $t4, 2 -/* 0075F8 800069F8 3C078016 */ lui $a3, %hi(D_8015F898) # $a3, 0x8016 +/* 0075F8 800069F8 3C078016 */ lui $a3, %hi(gTimePlayerLastTouchedFinishLine) # $a3, 0x8016 /* 0075FC 800069FC 27AE0080 */ addiu $t6, $sp, 0x80 /* 007600 80006A00 00AE1021 */ addu $v0, $a1, $t6 -/* 007604 80006A04 24E7F898 */ addiu $a3, %lo(D_8015F898) # addiu $a3, $a3, -0x768 +/* 007604 80006A04 24E7F898 */ addiu $a3, %lo(gTimePlayerLastTouchedFinishLine) # addiu $a3, $a3, -0x768 /* 007608 80006A08 032F3021 */ addu $a2, $t9, $t7 /* 00760C 80006A0C 00AF1821 */ addu $v1, $a1, $t7 .L80006A10: @@ -193,9 +193,9 @@ glabel set_places .L80006A90: /* 007690 80006A90 00005825 */ move $t3, $zero .L80006A94: -/* 007694 80006A94 3C0D8016 */ lui $t5, %hi(D_801644D0) # $t5, 0x8016 +/* 007694 80006A94 3C0D8016 */ lui $t5, %hi(gTrackCompletionPercentByPlayerId) # $t5, 0x8016 /* 007698 80006A98 2598FFFF */ addiu $t8, $t4, -1 -/* 00769C 80006A9C 25AD44D0 */ addiu $t5, %lo(D_801644D0) # addiu $t5, $t5, 0x44d0 +/* 00769C 80006A9C 25AD44D0 */ addiu $t5, %lo(gTrackCompletionPercentByPlayerId) # addiu $t5, $t5, 0x44d0 /* 0076A0 80006AA0 1B000076 */ blez $t8, .L80006C7C /* 0076A4 80006AA4 AFB80030 */ sw $t8, 0x30($sp) /* 0076A8 80006AA8 3C0A8016 */ lui $t2, %hi(D_80164360) # $t2, 0x8016 @@ -219,10 +219,10 @@ glabel set_places /* 0076EC 80006AEC 8FAE0030 */ lw $t6, 0x30($sp) /* 0076F0 80006AF0 1020005D */ beqz $at, .L80006C68 /* 0076F4 80006AF4 01208025 */ move $s0, $t1 -/* 0076F8 80006AF8 3C0F8016 */ lui $t7, %hi(D_80162FD8) # $t7, 0x8016 +/* 0076F8 80006AF8 3C0F8016 */ lui $t7, %hi(gTrackCompletionPercentByRank) # $t7, 0x8016 /* 0076FC 80006AFC 01898823 */ subu $s1, $t4, $t1 /* 007700 80006B00 32220001 */ andi $v0, $s1, 1 -/* 007704 80006B04 25EF2FD8 */ addiu $t7, %lo(D_80162FD8) # addiu $t7, $t7, 0x2fd8 +/* 007704 80006B04 25EF2FD8 */ addiu $t7, %lo(gTrackCompletionPercentByRank) # addiu $t7, $t7, 0x2fd8 /* 007708 80006B08 000B2880 */ sll $a1, $t3, 2 /* 00770C 80006B0C 1040001D */ beqz $v0, .L80006B84 /* 007710 80006B10 00AF1821 */ addu $v1, $a1, $t7 @@ -256,8 +256,8 @@ glabel set_places .L80006B80: /* 007780 80006B80 120C0039 */ beq $s0, $t4, .L80006C68 .L80006B84: -/* 007784 80006B84 3C188016 */ lui $t8, %hi(D_80162FD8) # $t8, 0x8016 -/* 007788 80006B88 27182FD8 */ addiu $t8, %lo(D_80162FD8) # addiu $t8, $t8, 0x2fd8 +/* 007784 80006B84 3C188016 */ lui $t8, %hi(gTrackCompletionPercentByRank) # $t8, 0x8016 +/* 007788 80006B88 27182FD8 */ addiu $t8, %lo(gTrackCompletionPercentByRank) # addiu $t8, $t8, 0x2fd8 /* 00778C 80006B8C 00105880 */ sll $t3, $s0, 2 /* 007790 80006B90 01788821 */ addu $s1, $t3, $t8 .L80006B94: @@ -412,10 +412,10 @@ glabel set_places /* 0079B8 80006DB8 11000018 */ beqz $t0, .L80006E1C /* 0079BC 80006DBC 01003825 */ move $a3, $t0 /* 0079C0 80006DC0 000B2880 */ sll $a1, $t3, 2 -/* 0079C4 80006DC4 3C0E8016 */ lui $t6, %hi(D_80162FD8) # $t6, 0x8016 +/* 0079C4 80006DC4 3C0E8016 */ lui $t6, %hi(gTrackCompletionPercentByRank) # $t6, 0x8016 /* 0079C8 80006DC8 3C198016 */ lui $t9, %hi(D_80164378) # $t9, 0x8016 /* 0079CC 80006DCC 27394378 */ addiu $t9, %lo(D_80164378) # addiu $t9, $t9, 0x4378 -/* 0079D0 80006DD0 25CE2FD8 */ addiu $t6, %lo(D_80162FD8) # addiu $t6, $t6, 0x2fd8 +/* 0079D0 80006DD0 25CE2FD8 */ addiu $t6, %lo(gTrackCompletionPercentByRank) # addiu $t6, $t6, 0x2fd8 /* 0079D4 80006DD4 000BC040 */ sll $t8, $t3, 1 /* 0079D8 80006DD8 03193021 */ addu $a2, $t8, $t9 /* 0079DC 80006DDC 00AE1821 */ addu $v1, $a1, $t6 @@ -439,8 +439,8 @@ glabel set_places /* 007A1C 80006E1C 3C0F8016 */ lui $t7, %hi(D_80164378) # $t7, 0x8016 /* 007A20 80006E20 25EF4378 */ addiu $t7, %lo(D_80164378) # addiu $t7, $t7, 0x4378 /* 007A24 80006E24 000B2880 */ sll $a1, $t3, 2 -/* 007A28 80006E28 3C188016 */ lui $t8, %hi(D_80162FD8) # $t8, 0x8016 -/* 007A2C 80006E2C 27182FD8 */ addiu $t8, %lo(D_80162FD8) # addiu $t8, $t8, 0x2fd8 +/* 007A28 80006E28 3C188016 */ lui $t8, %hi(gTrackCompletionPercentByRank) # $t8, 0x8016 +/* 007A2C 80006E2C 27182FD8 */ addiu $t8, %lo(gTrackCompletionPercentByRank) # addiu $t8, $t8, 0x2fd8 /* 007A30 80006E30 000BC840 */ sll $t9, $t3, 1 /* 007A34 80006E34 000C7040 */ sll $t6, $t4, 1 /* 007A38 80006E38 01CF3821 */ addu $a3, $t6, $t7 @@ -486,10 +486,10 @@ glabel set_places /* 007AC8 80006EC8 012C082A */ slt $at, $t1, $t4 /* 007ACC 80006ECC 10200040 */ beqz $at, .L80006FD0 /* 007AD0 80006ED0 01208025 */ move $s0, $t1 -/* 007AD4 80006ED4 3C198016 */ lui $t9, %hi(D_80162FD8) # $t9, 0x8016 +/* 007AD4 80006ED4 3C198016 */ lui $t9, %hi(gTrackCompletionPercentByRank) # $t9, 0x8016 /* 007AD8 80006ED8 01898823 */ subu $s1, $t4, $t1 /* 007ADC 80006EDC 32220001 */ andi $v0, $s1, 1 -/* 007AE0 80006EE0 27392FD8 */ addiu $t9, %lo(D_80162FD8) # addiu $t9, $t9, 0x2fd8 +/* 007AE0 80006EE0 27392FD8 */ addiu $t9, %lo(gTrackCompletionPercentByRank) # addiu $t9, $t9, 0x2fd8 /* 007AE4 80006EE4 000B2880 */ sll $a1, $t3, 2 /* 007AE8 80006EE8 10400013 */ beqz $v0, .L80006F38 /* 007AEC 80006EEC 00B91821 */ addu $v1, $a1, $t9 @@ -513,8 +513,8 @@ glabel set_places .L80006F34: /* 007B34 80006F34 120C0026 */ beq $s0, $t4, .L80006FD0 .L80006F38: -/* 007B38 80006F38 3C0F8016 */ lui $t7, %hi(D_80162FD8) # $t7, 0x8016 -/* 007B3C 80006F3C 25EF2FD8 */ addiu $t7, %lo(D_80162FD8) # addiu $t7, $t7, 0x2fd8 +/* 007B38 80006F38 3C0F8016 */ lui $t7, %hi(gTrackCompletionPercentByRank) # $t7, 0x8016 +/* 007B3C 80006F3C 25EF2FD8 */ addiu $t7, %lo(gTrackCompletionPercentByRank) # addiu $t7, $t7, 0x2fd8 /* 007B40 80006F40 00105880 */ sll $t3, $s0, 2 /* 007B44 80006F44 000CC080 */ sll $t8, $t4, 2 /* 007B48 80006F48 030F3021 */ addu $a2, $t8, $t7 diff --git a/asm/non_matchings/code_80057C60/func_8005CB60.s b/asm/non_matchings/code_80057C60/func_8005CB60.s index 46c7e8fe1..2ad09b752 100644 --- a/asm/non_matchings/code_80057C60/func_8005CB60.s +++ b/asm/non_matchings/code_80057C60/func_8005CB60.s @@ -40,9 +40,9 @@ glabel func_8005CB60 /* 05D7F8 8005CBF8 806D0000 */ lb $t5, ($v1) /* 05D7FC 8005CBFC 01A5082A */ slt $at, $t5, $a1 /* 05D800 8005CC00 10200120 */ beqz $at, .L8005D084 -/* 05D804 8005CC04 3C018016 */ lui $at, %hi(D_8015F898) +/* 05D804 8005CC04 3C018016 */ lui $at, %hi(gTimePlayerLastTouchedFinishLine) /* 05D808 8005CC08 002F0821 */ addu $at, $at, $t7 -/* 05D80C 8005CC0C C42AF898 */ lwc1 $f10, %lo(D_8015F898)($at) +/* 05D80C 8005CC0C C42AF898 */ lwc1 $f10, %lo(gTimePlayerLastTouchedFinishLine)($at) /* 05D810 8005CC10 00077940 */ sll $t7, $a3, 5 /* 05D814 8005CC14 01E77821 */ addu $t7, $t7, $a3 /* 05D818 8005CC18 46005402 */ mul.s $f16, $f10, $f0 diff --git a/asm/non_matchings/code_80091750/func_800A32B4.s b/asm/non_matchings/code_80091750/func_800A32B4.s index 6cac6047a..e51275fdf 100644 --- a/asm/non_matchings/code_80091750/func_800A32B4.s +++ b/asm/non_matchings/code_80091750/func_800A32B4.s @@ -4,10 +4,10 @@ glabel func_800A32B4 /* 0A3EBC 800A32BC 01EE7821 */ addu $t7, $t7, $t6 /* 0A3EC0 800A32C0 85EF4360 */ lh $t7, %lo(D_80164360)($t7) # 0x4360($t7) /* 0A3EC4 800A32C4 27BDFFA8 */ addiu $sp, $sp, -0x58 -/* 0A3EC8 800A32C8 3C018016 */ lui $at, %hi(D_8015F898) +/* 0A3EC8 800A32C8 3C018016 */ lui $at, %hi(gTimePlayerLastTouchedFinishLine) /* 0A3ECC 800A32CC 000FC080 */ sll $t8, $t7, 2 /* 0A3ED0 800A32D0 00380821 */ addu $at, $at, $t8 -/* 0A3ED4 800A32D4 C424F898 */ lwc1 $f4, %lo(D_8015F898)($at) +/* 0A3ED4 800A32D4 C424F898 */ lwc1 $f4, %lo(gTimePlayerLastTouchedFinishLine)($at) /* 0A3ED8 800A32D8 AFB20030 */ sw $s2, 0x30($sp) /* 0A3EDC 800A32DC AFB1002C */ sw $s1, 0x2c($sp) /* 0A3EE0 800A32E0 AFB00028 */ sw $s0, 0x28($sp) diff --git a/include/variables.h b/include/variables.h index 06723004e..56ad74871 100644 --- a/include/variables.h +++ b/include/variables.h @@ -14,6 +14,12 @@ extern f32 gKartGravityTable[]; extern s8 gGPOverallRanks[8]; extern s32 gModeSelection; extern s32 gPlayerCountSelection1; +// Indexed by Player ID. Track time in seconds since player has last crossed the finish line +extern f32 gTimePlayerLastTouchedFinishLine[8]; // D_8015F898 +// Indexed by Player ID. Tracks the percentage of the track has been completed +extern f32 gTrackCompletionPercentByPlayerId[8]; // D_801644D0 +// Indexed by Rank. Tracks the percentage of the track has been completed +extern f32 gTrackCompletionPercentByRank[8]; // D_80162FD8 extern struct_D_802874D8 D_802874D8; extern s16 D_801650D0[4][8]; diff --git a/src/code_80005FD0.c b/src/code_80005FD0.c index dc5fc8d81..6fd824e73 100644 --- a/src/code_80005FD0.c +++ b/src/code_80005FD0.c @@ -271,15 +271,15 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_800065D0.s") #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern ? D_8015F898; -extern ? D_80162FD8; +extern ? gTimePlayerLastTouchedFinishLine; +extern ? gTrackCompletionPercentByRank; extern s16 D_8016348C; extern s16 D_80164360; extern ? D_80164378; extern ? D_801643D8; extern ? D_801643E0; extern ? D_80164408; -extern ? D_801644D0; +extern ? gTrackCompletionPercentByPlayerId; extern ? gPlayers; void set_places(void) { @@ -474,14 +474,14 @@ block_7: temp_a1 = 0 * 4; phi_t2 = (0 * 2) + &D_80164360; phi_v0 = temp_a1 + &sp80; - phi_v1 = temp_a1 + &D_80162FD8; + phi_v1 = temp_a1 + &gTrackCompletionPercentByRank; phi_t1 = 1; do { temp_a0 = *phi_t2; temp_v0_2 = phi_v0 + 4; temp_v1 = phi_v1 + 4; temp_v0_2->unk-4 = temp_a0; - temp_v1->unk-4 = *(&D_801644D0 + (temp_a0 * 4)); + temp_v1->unk-4 = *(&gTrackCompletionPercentByPlayerId + (temp_a0 * 4)); phi_t2 += 2; phi_v0 = temp_v0_2; phi_v1 = temp_v1; @@ -496,7 +496,7 @@ block_13: temp_a1_2 = phi_t3_9 * 4; phi_t2_2 = (phi_t3_9 * 2) + &D_80164360; phi_v0_2 = temp_a1_2 + &sp80; - phi_v1_2 = temp_a1_2 + &D_80162FD8; + phi_v1_2 = temp_a1_2 + &gTrackCompletionPercentByRank; do { temp_a0_2 = *phi_t2_2; temp_v1_2 = phi_v1_2 + 0x10; @@ -507,16 +507,16 @@ block_13: temp_a0_4 = temp_t2->unk-4; phi_v0_2->unk8 = temp_a0_4; temp_a0_5 = temp_t2->unk-2; - temp_v1_2->unk-10 = *(&D_801644D0 + (temp_a0_2 * 4)); + temp_v1_2->unk-10 = *(&gTrackCompletionPercentByPlayerId + (temp_a0_2 * 4)); temp_v0_3 = phi_v0_2 + 0x10; - temp_v1_2->unk-C = *(&D_801644D0 + (temp_a0_3 * 4)); + temp_v1_2->unk-C = *(&gTrackCompletionPercentByPlayerId + (temp_a0_3 * 4)); temp_v0_3->unk-4 = temp_a0_5; - temp_v1_2->unk-4 = *(&D_801644D0 + (temp_a0_5 * 4)); - temp_v1_2->unk-8 = *(&D_801644D0 + (temp_a0_4 * 4)); + temp_v1_2->unk-4 = *(&gTrackCompletionPercentByPlayerId + (temp_a0_5 * 4)); + temp_v1_2->unk-8 = *(&gTrackCompletionPercentByPlayerId + (temp_a0_4 * 4)); phi_t2_2 = temp_t2; phi_v0_2 = temp_v0_3; phi_v1_2 = temp_v1_2; - } while (temp_v1_2 != ((phi_t4 * 4) + &D_80162FD8)); + } while (temp_v1_2 != ((phi_t4 * 4) + &gTrackCompletionPercentByRank)); } } phi_t3 = 0; @@ -529,14 +529,14 @@ block_13: temp_a1_3 = 0 * 4; phi_t2_3 = (0 * 2) + &D_80164360; phi_v0_3 = temp_a1_3 + &sp80; - phi_v1_3 = temp_a1_3 + &D_80162FD8; + phi_v1_3 = temp_a1_3 + &gTrackCompletionPercentByRank; phi_t1_2 = 1; do { temp_a0_6 = *phi_t2_3; temp_v0_4 = phi_v0_3 + 4; temp_v1_3 = phi_v1_3 + 4; temp_v0_4->unk-4 = temp_a0_6; - temp_v1_3->unk-4 = -*(&D_8015F898 + (temp_a0_6 * 4)); + temp_v1_3->unk-4 = -*(&gTimePlayerLastTouchedFinishLine + (temp_a0_6 * 4)); phi_t2_3 += 2; phi_v0_3 = temp_v0_4; phi_v1_3 = temp_v1_3; @@ -551,7 +551,7 @@ block_22: temp_a1_4 = phi_t3_10 * 4; phi_t2_4 = (phi_t3_10 * 2) + &D_80164360; phi_v0_4 = temp_a1_4 + &sp80; - phi_v1_4 = temp_a1_4 + &D_80162FD8; + phi_v1_4 = temp_a1_4 + &gTrackCompletionPercentByRank; do { temp_a0_7 = *phi_t2_4; temp_v1_4 = phi_v1_4 + 0x10; @@ -562,16 +562,16 @@ block_22: temp_a0_9 = temp_t2_2->unk-4; phi_v0_4->unk8 = temp_a0_9; temp_a0_10 = temp_t2_2->unk-2; - temp_v1_4->unk-10 = -*(&D_8015F898 + (temp_a0_7 * 4)); - temp_v1_4->unk-4 = -*(&D_8015F898 + (temp_a0_10 * 4)); - temp_v1_4->unk-8 = -*(&D_8015F898 + (temp_a0_9 * 4)); - temp_v1_4->unk-C = -*(&D_8015F898 + (temp_a0_8 * 4)); + temp_v1_4->unk-10 = -*(&gTimePlayerLastTouchedFinishLine + (temp_a0_7 * 4)); + temp_v1_4->unk-4 = -*(&gTimePlayerLastTouchedFinishLine + (temp_a0_10 * 4)); + temp_v1_4->unk-8 = -*(&gTimePlayerLastTouchedFinishLine + (temp_a0_9 * 4)); + temp_v1_4->unk-C = -*(&gTimePlayerLastTouchedFinishLine + (temp_a0_8 * 4)); temp_v0_5 = phi_v0_4 + 0x10; temp_v0_5->unk-4 = temp_a0_10; phi_t2_4 = temp_t2_2; phi_v0_4 = temp_v0_5; phi_v1_4 = temp_v1_4; - } while (temp_v1_4 != ((phi_t4 * 4) + &D_80162FD8)); + } while (temp_v1_4 != ((phi_t4 * 4) + &gTrackCompletionPercentByRank)); } } } @@ -585,10 +585,10 @@ block_22: phi_s0_2 = phi_t1_3; if (phi_t1_3 < phi_t4) { temp_a1_5 = phi_t3 * 4; - temp_v1_5 = temp_a1_5 + &D_80162FD8; + temp_v1_5 = temp_a1_5 + &gTrackCompletionPercentByRank; if (((phi_t4 - phi_t1_3) & 1) != 0) { temp_t3 = phi_t1_3 * 4; - temp_s1 = temp_t3 + &D_80162FD8; + temp_s1 = temp_t3 + &gTrackCompletionPercentByRank; temp_f2 = *temp_s1; temp_f0 = *temp_v1_5; if (temp_f0 < temp_f2) { @@ -610,7 +610,7 @@ block_22: } else { block_34: temp_t3_2 = phi_s0_2 * 4; - phi_s1 = temp_t3_2 + &D_80162FD8; + phi_s1 = temp_t3_2 + &gTrackCompletionPercentByRank; phi_s0 = phi_s0_2; phi_t3_2 = temp_t3_2; do { @@ -724,14 +724,14 @@ block_50: temp_a1_7 = 0 * 4; phi_a2 = (0 * 2) + &D_80164378; phi_v0_8 = &sp80 + temp_a1_7; - phi_v1_6 = temp_a1_7 + &D_80162FD8; + phi_v1_6 = temp_a1_7 + &gTrackCompletionPercentByRank; phi_t1_6 = 0 + 1; do { temp_a1_8 = *phi_a2; temp_v0_11 = phi_v0_8 + 4; temp_v1_9 = phi_v1_6 + 4; temp_v0_11->unk-4 = temp_a1_8; - temp_v1_9->unk-4 = *(&D_801644D0 + (temp_a1_8 * 4)); + temp_v1_9->unk-4 = *(&gTrackCompletionPercentByPlayerId + (temp_a1_8 * 4)); phi_a2 += 2; phi_v0_8 = temp_v0_11; phi_v1_6 = temp_v1_9; @@ -746,7 +746,7 @@ block_58: temp_a1_9 = phi_t3_12 * 4; phi_a2_2 = (phi_t3_12 * 2) + &D_80164378; phi_v0_9 = &sp80 + temp_a1_9; - phi_v1_7 = temp_a1_9 + &D_80162FD8; + phi_v1_7 = temp_a1_9 + &gTrackCompletionPercentByRank; do { temp_a1_10 = *phi_a2_2; temp_a2 = phi_a2_2 + 8; @@ -757,12 +757,12 @@ block_58: temp_a1_12 = temp_a2->unk-4; temp_v0_12->unk-8 = temp_a1_12; temp_a1_13 = temp_a2->unk-2; - *phi_v1_7 = *(&D_801644D0 + (temp_a1_10 * 4)); + *phi_v1_7 = *(&gTrackCompletionPercentByPlayerId + (temp_a1_10 * 4)); temp_v1_10 = phi_v1_7 + 0x10; - temp_v1_10->unk-C = *(&D_801644D0 + (temp_a1_11 * 4)); + temp_v1_10->unk-C = *(&gTrackCompletionPercentByPlayerId + (temp_a1_11 * 4)); temp_v0_12->unk-4 = temp_a1_13; - temp_v1_10->unk-4 = *(&D_801644D0 + (temp_a1_13 * 4)); - temp_v1_10->unk-8 = *(&D_801644D0 + (temp_a1_12 * 4)); + temp_v1_10->unk-4 = *(&gTrackCompletionPercentByPlayerId + (temp_a1_13 * 4)); + temp_v1_10->unk-8 = *(&gTrackCompletionPercentByPlayerId + (temp_a1_12 * 4)); phi_a2_2 = temp_a2; phi_v0_9 = temp_v0_12; phi_v1_7 = temp_v1_10; @@ -776,10 +776,10 @@ block_58: phi_s0_3 = phi_t1_7; if (phi_t1_7 < phi_t4) { temp_a1_14 = phi_t3_5 * 4; - temp_v1_11 = temp_a1_14 + &D_80162FD8; + temp_v1_11 = temp_a1_14 + &gTrackCompletionPercentByRank; if (((phi_t4 - phi_t1_7) & 1) != 0) { temp_t3_4 = phi_t1_7 * 4; - temp_s1_2 = temp_t3_4 + &D_80162FD8; + temp_s1_2 = temp_t3_4 + &gTrackCompletionPercentByRank; temp_f2_4 = *temp_s1_2; temp_f0_3 = *temp_v1_11; temp_s0_4 = &sp80 + temp_t3_4; @@ -799,7 +799,7 @@ block_58: } else { block_67: temp_t3_5 = phi_s0_3 * 4; - phi_s1_2 = temp_t3_5 + &D_80162FD8; + phi_s1_2 = temp_t3_5 + &gTrackCompletionPercentByRank; phi_t3_6 = temp_t3_5; do { temp_f0_4 = *temp_v1_11; @@ -827,7 +827,7 @@ block_67: temp_s1_3 = phi_s1_2 + 8; phi_s1_2 = temp_s1_3; phi_t3_6 += 8; - } while (temp_s1_3 != ((phi_t4 * 4) + &D_80162FD8)); + } while (temp_s1_3 != ((phi_t4 * 4) + &gTrackCompletionPercentByRank)); } } phi_t1_7 += 1; @@ -892,8 +892,8 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/set_places.s") #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern ? D_8015F898; -extern ? D_80162FD8; +extern ? gTimePlayerLastTouchedFinishLine; +extern ? gTrackCompletionPercentByRank; extern ? D_80164360; extern ? D_801643D8; extern ? D_801643E0; @@ -998,14 +998,14 @@ block_7: temp_a0 = 0 * 4; phi_t0 = (0 * 2) + &D_80164360; phi_v0 = temp_a0 + &sp50; - phi_v1 = temp_a0 + &D_80162FD8; + phi_v1 = temp_a0 + &gTrackCompletionPercentByRank; phi_a1 = 1; do { temp_a0_2 = *phi_t0; temp_v0_2 = phi_v0 + 4; temp_v1 = phi_v1 + 4; temp_v0_2->unk-4 = temp_a0_2; - temp_v1->unk-4 = -*(&D_8015F898 + (temp_a0_2 * 4)); + temp_v1->unk-4 = -*(&gTimePlayerLastTouchedFinishLine + (temp_a0_2 * 4)); phi_t0 += 2; phi_v0 = temp_v0_2; phi_v1 = temp_v1; @@ -1020,7 +1020,7 @@ block_12: temp_a0_3 = phi_a3_5 * 4; phi_t0_2 = (phi_a3_5 * 2) + &D_80164360; phi_v0_2 = temp_a0_3 + &sp50; - phi_v1_2 = temp_a0_3 + &D_80162FD8; + phi_v1_2 = temp_a0_3 + &gTrackCompletionPercentByRank; do { temp_a0_4 = *phi_t0_2; temp_v1_2 = phi_v1_2 + 0x10; @@ -1031,16 +1031,16 @@ block_12: temp_a0_6 = temp_t0->unk-4; phi_v0_2->unk8 = temp_a0_6; temp_a0_7 = temp_t0->unk-2; - temp_v1_2->unk-10 = -*(&D_8015F898 + (temp_a0_4 * 4)); - temp_v1_2->unk-4 = -*(&D_8015F898 + (temp_a0_7 * 4)); - temp_v1_2->unk-8 = -*(&D_8015F898 + (temp_a0_6 * 4)); - temp_v1_2->unk-C = -*(&D_8015F898 + (temp_a0_5 * 4)); + temp_v1_2->unk-10 = -*(&gTimePlayerLastTouchedFinishLine + (temp_a0_4 * 4)); + temp_v1_2->unk-4 = -*(&gTimePlayerLastTouchedFinishLine + (temp_a0_7 * 4)); + temp_v1_2->unk-8 = -*(&gTimePlayerLastTouchedFinishLine + (temp_a0_6 * 4)); + temp_v1_2->unk-C = -*(&gTimePlayerLastTouchedFinishLine + (temp_a0_5 * 4)); temp_v0_3 = phi_v0_2 + 0x10; temp_v0_3->unk-4 = temp_a0_7; phi_t0_2 = temp_t0; phi_v0_2 = temp_v0_3; phi_v1_2 = temp_v1_2; - } while (temp_v1_2 != ((phi_a2 * 4) + &D_80162FD8)); + } while (temp_v1_2 != ((phi_a2 * 4) + &gTrackCompletionPercentByRank)); } } temp_t0_2 = phi_a2 - 1; @@ -1052,10 +1052,10 @@ block_12: phi_v0_6 = phi_a1_2; if (phi_a1_2 < phi_a2) { temp_a0_8 = phi_a3 * 4; - temp_v1_3 = temp_a0_8 + &D_80162FD8; + temp_v1_3 = temp_a0_8 + &gTrackCompletionPercentByRank; if (((phi_a2 - phi_a1_2) & 1) != 0) { temp_a3 = phi_a1_2 * 4; - temp_t3 = temp_a3 + &D_80162FD8; + temp_t3 = temp_a3 + &gTrackCompletionPercentByRank; temp_f2 = *temp_t3; temp_f0 = *temp_v1_3; temp_t1 = &sp50 + temp_a3; @@ -1075,7 +1075,7 @@ block_12: } else { block_21: temp_a3_2 = phi_v0_6 * 4; - phi_t1 = temp_a3_2 + &D_80162FD8; + phi_t1 = temp_a3_2 + &gTrackCompletionPercentByRank; phi_a3_2 = temp_a3_2; do { temp_f0_2 = *temp_v1_3; @@ -1103,7 +1103,7 @@ block_21: temp_t1_2 = phi_t1 + 8; phi_t1 = temp_t1_2; phi_a3_2 += 8; - } while (temp_t1_2 != ((phi_a2 * 4) + &D_80162FD8)); + } while (temp_t1_2 != ((phi_a2 * 4) + &gTrackCompletionPercentByRank)); } } phi_a1_2 += 1; @@ -1174,12 +1174,12 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_800070F4.s") #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern ? D_8015F898; -extern f32 D_80162FD8; +extern ? gTimePlayerLastTouchedFinishLine; +extern f32 gTrackCompletionPercentByRank; extern ? D_80164360; extern ? D_801643D8; extern ? D_801643E0; -extern ? D_801644D0; +extern ? gTrackCompletionPercentByPlayerId; extern ? gPlayers; void func_800074D4(void) { @@ -1281,7 +1281,7 @@ void func_800074D4(void) { s32 phi_v0_12; s32 phi_v0_13; - phi_a0 = &D_80162FD8; + phi_a0 = &gTrackCompletionPercentByRank; phi_a3 = 1; phi_a3_2 = 1; phi_a3_4 = 1; @@ -1302,28 +1302,28 @@ void func_800074D4(void) { phi_v0_2 = phi_v0; if ((phi_a0_2->unk0 & 0x800) != 0) { *(&sp68 + temp_v1) = phi_t0; - *(&D_80162FD8 + temp_v1) = -*(&D_8015F898 + (phi_t0 * 4)); + *(&gTrackCompletionPercentByRank + temp_v1) = -*(&gTimePlayerLastTouchedFinishLine + (phi_t0 * 4)); phi_v0_2 = phi_v0 + 1; } temp_v1_2 = phi_v0_2 * 4; phi_v0_3 = phi_v0_2; if ((phi_a0_2->unkDD8 & 0x800) != 0) { *(&sp68 + temp_v1_2) = phi_t0 + 1; - *(&D_80162FD8 + temp_v1_2) = -(&D_8015F898 + (phi_t0 * 4))->unk4; + *(&gTrackCompletionPercentByRank + temp_v1_2) = -(&gTimePlayerLastTouchedFinishLine + (phi_t0 * 4))->unk4; phi_v0_3 = phi_v0_2 + 1; } temp_v1_3 = phi_v0_3 * 4; phi_v0_4 = phi_v0_3; if ((phi_a0_2->unk1BB0 & 0x800) != 0) { *(&sp68 + temp_v1_3) = phi_t0 + 2; - *(&D_80162FD8 + temp_v1_3) = -(&D_8015F898 + (phi_t0 * 4))->unk8; + *(&gTrackCompletionPercentByRank + temp_v1_3) = -(&gTimePlayerLastTouchedFinishLine + (phi_t0 * 4))->unk8; phi_v0_4 = phi_v0_3 + 1; } temp_v1_4 = phi_v0_4 * 4; phi_v0_9 = phi_v0_4; if ((phi_a0_2->unk2988 & 0x800) != 0) { *(&sp68 + temp_v1_4) = phi_t0 + 3; - *(&D_80162FD8 + temp_v1_4) = -(&D_8015F898 + (phi_t0 * 4))->unkC; + *(&gTrackCompletionPercentByRank + temp_v1_4) = -(&gTimePlayerLastTouchedFinishLine + (phi_t0 * 4))->unkC; phi_v0_9 = phi_v0_4 + 1; } temp_t0 = phi_t0 + 4; @@ -1338,28 +1338,28 @@ void func_800074D4(void) { phi_v0_6 = phi_v0_5; if ((phi_a0_3->unk0 & 0x800) == 0) { *(&sp68 + temp_v1_5) = phi_t0_2; - *(&D_80162FD8 + temp_v1_5) = *(&D_801644D0 + (phi_t0_2 * 4)); + *(&gTrackCompletionPercentByRank + temp_v1_5) = *(&gTrackCompletionPercentByPlayerId + (phi_t0_2 * 4)); phi_v0_6 = phi_v0_5 + 1; } temp_v1_6 = phi_v0_6 * 4; phi_v0_7 = phi_v0_6; if ((phi_a0_3->unkDD8 & 0x800) == 0) { *(&sp68 + temp_v1_6) = phi_t0_2 + 1; - *(&D_80162FD8 + temp_v1_6) = (&D_801644D0 + (phi_t0_2 * 4))->unk4; + *(&gTrackCompletionPercentByRank + temp_v1_6) = (&gTrackCompletionPercentByPlayerId + (phi_t0_2 * 4))->unk4; phi_v0_7 = phi_v0_6 + 1; } temp_v1_7 = phi_v0_7 * 4; phi_v0_8 = phi_v0_7; if ((phi_a0_3->unk1BB0 & 0x800) == 0) { *(&sp68 + temp_v1_7) = phi_t0_2 + 2; - *(&D_80162FD8 + temp_v1_7) = (&D_801644D0 + (phi_t0_2 * 4))->unk8; + *(&gTrackCompletionPercentByRank + temp_v1_7) = (&gTrackCompletionPercentByPlayerId + (phi_t0_2 * 4))->unk8; phi_v0_8 = phi_v0_7 + 1; } temp_v1_8 = phi_v0_8 * 4; phi_v0_5 = phi_v0_8; if ((phi_a0_3->unk2988 & 0x800) == 0) { *(&sp68 + temp_v1_8) = phi_t0_2 + 3; - *(&D_80162FD8 + temp_v1_8) = (&D_801644D0 + (phi_t0_2 * 4))->unkC; + *(&gTrackCompletionPercentByRank + temp_v1_8) = (&gTrackCompletionPercentByPlayerId + (phi_t0_2 * 4))->unkC; phi_v0_5 = phi_v0_8 + 1; } temp_t0_2 = phi_t0_2 + 4; @@ -1372,10 +1372,10 @@ void func_800074D4(void) { phi_v0_12 = phi_a3_2; if (phi_a3_2 < phi_v0_9) { temp_a1 = phi_t0_3 * 4; - temp_a0 = temp_a1 + &D_80162FD8; + temp_a0 = temp_a1 + &gTrackCompletionPercentByRank; if (((phi_v0_9 - phi_a3_2) & 1) != 0) { temp_v1_9 = phi_a3_2 * 4; - temp_t4 = temp_v1_9 + &D_80162FD8; + temp_t4 = temp_v1_9 + &gTrackCompletionPercentByRank; temp_f2 = *temp_t4; temp_f0 = *temp_a0; temp_t0_3 = &sp68 + temp_v1_9; @@ -1395,7 +1395,7 @@ void func_800074D4(void) { } else { block_41: temp_v1_10 = phi_v0_12 * 4; - phi_t4 = temp_v1_10 + &D_80162FD8; + phi_t4 = temp_v1_10 + &gTrackCompletionPercentByRank; phi_v1 = temp_v1_10; do { temp_f0_2 = *temp_a0; @@ -1423,7 +1423,7 @@ block_41: temp_t4_2 = phi_t4 + 8; phi_t4 = temp_t4_2; phi_v1 += 8; - } while (temp_t4_2 != ((phi_v0_9 * 4) + &D_80162FD8)); + } while (temp_t4_2 != ((phi_v0_9 * 4) + &gTrackCompletionPercentByRank)); } } phi_a3_2 += 1; @@ -1437,10 +1437,10 @@ block_41: phi_v0_13 = phi_a3_3; if (phi_a3_3 < 8) { temp_a1_2 = phi_t0_4 * 4; - temp_a0_2 = temp_a1_2 + &D_80162FD8; + temp_a0_2 = temp_a1_2 + &gTrackCompletionPercentByRank; if (((8 - phi_a3_3) & 1) != 0) { temp_v1_11 = phi_a3_3 * 4; - temp_t4_3 = temp_v1_11 + &D_80162FD8; + temp_t4_3 = temp_v1_11 + &gTrackCompletionPercentByRank; temp_f2_4 = *temp_t4_3; temp_f0_3 = *temp_a0_2; temp_t0_6 = &sp68 + temp_v1_11; @@ -1460,7 +1460,7 @@ block_41: } else { block_55: temp_v1_12 = phi_v0_13 * 4; - phi_t4_2 = temp_v1_12 + &D_80162FD8; + phi_t4_2 = temp_v1_12 + &gTrackCompletionPercentByRank; phi_v1_2 = temp_v1_12; do { temp_f0_4 = *temp_a0_2; @@ -1488,7 +1488,7 @@ block_55: temp_t4_4 = phi_t4_2 + 8; phi_t4_2 = temp_t4_4; phi_v1_2 += 8; - } while (temp_t4_4 != ((8 * 4) + &D_80162FD8)); + } while (temp_t4_4 != ((8 * 4) + &gTrackCompletionPercentByRank)); } } phi_a3_3 += 1; @@ -2228,7 +2228,7 @@ extern s16 D_80162FCE; extern ? D_80164438; extern ? D_80164450; extern ? D_801644A8; -extern ? D_801644D0; +extern ? gTrackCompletionPercentByPlayerId; extern ? D_801645B0; extern u16 D_801645C8; extern ? lapCount; @@ -2263,7 +2263,7 @@ void func_80008F38(s32 arg0) { } temp_f0 = phi_f6 / phi_f16; *(&D_801644A8 + temp_v0) = temp_f0; - *(&D_801644D0 + temp_v0) = temp_f0 + temp_v1; + *(&gTrackCompletionPercentByPlayerId + temp_v0) = temp_f0 + temp_v1; } #else GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80008F38.s") @@ -2402,7 +2402,7 @@ s16 func_8000CD24(f32, f32, f32, s16, void *, s32, s32); // extern ? func_80011AE4(s32); // extern extern f32 D_800ECFA8; extern f32 D_800ECFAC; -extern ? D_8015F898; +extern ? gTimePlayerLastTouchedFinishLine; extern s16 D_80162FCE; extern s16 D_801630E0; extern s16 D_801630E2; @@ -2566,7 +2566,7 @@ block_25: arg0 = temp_a0_2; sp30 = phi_a3_2; sp34 = phi_t0; - *(&D_8015F898 + phi_a3_2) = func_80009258(temp_a0_2, sp38, sp44, phi_a3_2); + *(&gTimePlayerLastTouchedFinishLine + phi_a3_2) = func_80009258(temp_a0_2, sp38, sp44, phi_a3_2); phi_a0_2 = arg0; } } @@ -2967,7 +2967,7 @@ void func_80009B60(s32 arg0) { temp_a2 = temp_a1 * 2; if ((temp_v1->unk0 & 0x8000) == 0) { *(&D_80164450 + temp_a3) = -0x14; - *(&D_801644D0 + temp_a3) = -1000.0f; + *(&gTrackCompletionPercentByPlayerId + temp_a3) = -1000.0f; *(&D_801644A8 + temp_a3) = -1000.0f; return; } @@ -6294,7 +6294,7 @@ f32 *segmented_to_virtual_dupe(void *); // extern extern ? D_0D009418; extern ? D_800DCAA0; extern f32 D_800ED050; -extern f32 D_8015F898; +extern f32 gTimePlayerLastTouchedFinishLine; extern ? D_80162F10; extern ? D_80162F50; extern ? D_80162F8C; @@ -6359,7 +6359,7 @@ extern ? D_80164438; extern ? D_80164448; extern s32 D_80164450; extern ? D_80164478; -extern f32 D_801644D0; +extern f32 gTrackCompletionPercentByPlayerId; extern s16 D_801644F8; extern ? D_80164538; extern ? D_801645B0; @@ -6484,8 +6484,8 @@ void func_8000F628(void) { spD0 = &lapCount; spB8 = &D_80163258; spBC = &D_80164408; - spCC = &D_801644D0; - spC8 = &D_8015F898; + spCC = &gTrackCompletionPercentByPlayerId; + spC8 = &gTimePlayerLastTouchedFinishLine; spB0 = &D_801631E0; spB4 = &D_80163270; spAC = &D_801631F8; diff --git a/src/code_80057C60.c b/src/code_80057C60.c index 46e1c1922..5ed10bae1 100644 --- a/src/code_80057C60.c +++ b/src/code_80057C60.c @@ -3162,7 +3162,7 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005C980.s") ? func_800790B4(s32); // extern ? func_800C9060(s32, ?); // extern ? func_800C90F4(?, s32, s8, s32); // extern -extern ? D_8015F898; +extern ? gTimePlayerLastTouchedFinishLine; extern s32 D_80165594; extern u32 D_80165638; extern u32 D_80165648; @@ -3217,7 +3217,7 @@ void func_8005CB60(s32 arg0, s32 arg1) { phi_v1 = temp_v1; phi_t1 = 3; if (*temp_v1 < arg1) { - temp_f18 = *(&D_8015F898 + (arg0 * 4)) * 100.0f; + temp_f18 = *(&gTimePlayerLastTouchedFinishLine + (arg0 * 4)) * 100.0f; temp_s0->unk10 = temp_f18; (temp_s0 + (*temp_v1 * 4))->unk14 = temp_f18; temp_a0 = *temp_v1; diff --git a/src/code_80091750.c b/src/code_80091750.c index cd94d255e..47a0589ec 100644 --- a/src/code_80091750.c +++ b/src/code_80091750.c @@ -10745,7 +10745,7 @@ extern ? D_800F0C2C; extern ? D_800F0C30; extern f32 D_800F1CA4; extern f32 D_800F1CA8; -extern ? D_8015F898; +extern ? gTimePlayerLastTouchedFinishLine; extern ? D_80164360; void func_800A32B4(s32 arg0, ? arg1, s32 arg2, s32 arg3) { @@ -10757,7 +10757,7 @@ void func_800A32B4(s32 arg0, ? arg1, s32 arg2, s32 arg3) { f32 temp_f20; f32 temp_f4; - temp_f4 = *(&D_8015F898 + (*(&D_80164360 + (arg3 * 2)) * 4)); + temp_f4 = *(&gTimePlayerLastTouchedFinishLine + (*(&D_80164360 + (arg3 * 2)) * 4)); sp50 = temp_f4; // Convert arg3 (some index) into a rank string // This is a little wonky. diff --git a/src/code_8028DF00.c b/src/code_8028DF00.c index 16e792308..1a83a0217 100644 --- a/src/code_8028DF00.c +++ b/src/code_8028DF00.c @@ -201,7 +201,7 @@ void func_8028E0F0(void) { func_8028E028(); } } -extern f32 D_8015F898[]; +extern f32 gTimePlayerLastTouchedFinishLine[]; extern u16 D_801645B0[]; extern u16 D_801645C8[]; extern f32 D_801644A8[]; @@ -222,7 +222,7 @@ void func_8028E298(void) { temp_v0 += D_801645C8[temp_a2] * (1.0f - D_801644A8[i]); temp_v0 /= 15.0f; - D_8015F898[i] = gCourseTimer + temp_v0; + gTimePlayerLastTouchedFinishLine[i] = gCourseTimer + temp_v0; } D_8016348C = 1; func_800070F4();