From 9c8456cfee8d7d8bb0fece43d2ddac3c0e5377a8 Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Sat, 28 May 2022 23:41:26 +0100 Subject: [PATCH] 25% (#235) Match and label various racer.c funcs --- README.md | 42 +- asm/non_matchings/objects/func_8000CC7C.s | 2 +- asm/non_matchings/objects/func_80010994.s | 2 +- asm/non_matchings/racer/func_80042D20.s | 48 +- asm/non_matchings/racer/func_8004447C.s | 44 +- asm/non_matchings/racer/func_800452A0.s | 20 +- asm/non_matchings/racer/func_80045C48.s | 12 +- asm/non_matchings/racer/func_80046524.s | 120 +- asm/non_matchings/racer/func_80048C7C.s | 148 -- asm/non_matchings/racer/func_80049794.s | 132 +- asm/non_matchings/racer/func_8004CC20.s | 12 +- asm/non_matchings/racer/func_8004DE38.s | 1785 ----------------- asm/non_matchings/racer/func_8004F7F4.s | 52 +- asm/non_matchings/racer/func_80050A28.s | 68 +- asm/non_matchings/racer/func_8005250C.s | 24 +- asm/non_matchings/racer/func_80052B64.s | 147 -- asm/non_matchings/racer/func_80052D7C.s | 8 +- asm/non_matchings/racer/func_80053E9C.s | 188 -- asm/non_matchings/racer/func_8005492C.s | 8 +- asm/non_matchings/racer/func_80054FD0.s | 8 +- asm/non_matchings/racer/func_80055EC0.s | 36 +- asm/non_matchings/racer/func_8005A424.s | 12 +- asm/non_matchings/racer/func_8005A6F0.s | 128 +- asm/non_matchings/racer/update_camera_car.s | 4 +- asm/non_matchings/racer/update_camera_plane.s | 8 +- ...96D8.s => update_spatial_audio_position.s} | 2 +- .../unknown_032760/func_8003F0F8.s | 2 +- include/level_object_entries.h | 2 +- include/sound_ids.h | 6 +- include/structs.h | 66 +- lib/src/mips1/sc/sched.c | 2 +- src/object_functions.c | 18 +- src/objects.c | 16 +- src/objects.h | 10 +- src/racer.c | 1064 ++++++++-- src/racer.h | 48 +- src/save_data.h | 1 + src/set_rsp_segment.c | 4 + src/stacks.c | 4 +- src/stacks.h | 4 +- src/unknown_003260.h | 2 +- src/unknown_005740.h | 4 + src/unknown_008C40.c | 4 +- src/unknown_008C40.h | 2 +- src/unknown_0255E0.c | 26 +- src/unknown_0255E0.h | 4 +- src/unknown_05CEF0.h | 1 + src/unknown_05DCD0.h | 5 + src/unknown_05F0C0.h | 3 + src/unknown_05F690.h | 3 + src/unknown_05FF10.h | 4 + src/unknown_077C50.c | 8 +- src/unknown_078050.c | 3 +- src/weather.c | 2 +- 54 files changed, 1478 insertions(+), 2900 deletions(-) delete mode 100644 asm/non_matchings/racer/func_80048C7C.s delete mode 100644 asm/non_matchings/racer/func_8004DE38.s delete mode 100644 asm/non_matchings/racer/func_80052B64.s delete mode 100644 asm/non_matchings/racer/func_80053E9C.s rename asm/non_matchings/unknown_005740/{func_800096D8.s => update_spatial_audio_position.s} (91%) diff --git a/README.md b/README.md index 253ff516..d1e1619f 100755 --- a/README.md +++ b/README.md @@ -113,31 +113,31 @@ s32 is_drumstick_unlocked(void) { } ``` -As of May 23rd, 2022, this is our current score: +As of May 28th, 2022, this is our current score: ``` - ======================================================= - ADVENTURE ONE (ASM -> C Decompilation) - ------------------- 24.58% Complete ------------------- - # Decompiled functions: 1136 - # GLOBAL_ASM remaining: 642 - # NON_MATCHING functions: 9 + ======================================================== + ADVENTURE ONE (ASM -> C Decompilation) + ------------------- 25.50% Complete -------------------- + # Decompiled functions: 1140 + # GLOBAL_ASM remaining: 638 + # NON_MATCHING functions: 10 # NON_EQUIVALENT WIP functions: 105 - --------------------- Game Status --------------------- + --------------------- Game Status ---------------------- Balloons: 12/47, Keys: 1/4, Trophies: 1/5 - T.T. Amulets: 1/4, Wizpig Amulets: 1/4 - ------------------------------------------------------- - We are racing Taj in the Car Challenge. (Lap 1/3) - ======================================================= + T.T. Amulets: 1/4, Wizpig Amulets: 1/4 + -------------------------------------------------------- + We are racing Taj in the Car Challenge. (Lap 3/3) + ======================================================== ADVENTURE TWO (Cleanup & Documentation) - ------------------- 3.89% Complete ------------------- - # Documented functions: 169 - # Undocumented remaining: 1609 - --------------------- Game Status --------------------- - Balloons: 2/47, Keys: 0/4, Trophies: 0/5 - T.T. Amulets: 0/4, Wizpig Amulets: 0/4 - ------------------------------------------------------- - We are collecting the third balloon on Timber's Island. - ======================================================= + ------------------- 5.01% Complete -------------------- + # Documented functions: 175 + # Undocumented remaining: 1603 + --------------------- Game Status ---------------------- + Balloons: 3/47, Keys: 0/4, Trophies: 0/5 + T.T. Amulets: 0/4, Wizpig Amulets: 0/4 + -------------------------------------------------------- + We are collecting the fourth balloon on Timber's Island. + ======================================================== ``` --- diff --git a/asm/non_matchings/objects/func_8000CC7C.s b/asm/non_matchings/objects/func_8000CC7C.s index 1ce7a094..f74d8295 100644 --- a/asm/non_matchings/objects/func_8000CC7C.s +++ b/asm/non_matchings/objects/func_8000CC7C.s @@ -1166,7 +1166,7 @@ glabel L8000D98C /* 00E8C8 8000DCC8 00000000 */ nop /* 00E8CC 8000DCCC 02202025 */ move $a0, $s1 .L8000DCD0: -/* 00E8D0 8000DCD0 0C01378E */ jal func_8004DE38 +/* 00E8D0 8000DCD0 0C01378E */ jal update_player_racer /* 00E8D4 8000DCD4 24050002 */ li $a1, 2 /* 00E8D8 8000DCD8 26100001 */ addiu $s0, $s0, 1 /* 00E8DC 8000DCDC 2A01000A */ slti $at, $s0, 0xa diff --git a/asm/non_matchings/objects/func_80010994.s b/asm/non_matchings/objects/func_80010994.s index 2ab12416..8f606e4f 100644 --- a/asm/non_matchings/objects/func_80010994.s +++ b/asm/non_matchings/objects/func_80010994.s @@ -249,7 +249,7 @@ glabel func_80010994 /* 011920 80010D20 02802825 */ move $a1, $s4 /* 011924 80010D24 01B27021 */ addu $t6, $t5, $s2 /* 011928 80010D28 8DC40000 */ lw $a0, ($t6) -/* 01192C 80010D2C 0C01378E */ jal func_8004DE38 +/* 01192C 80010D2C 0C01378E */ jal update_player_racer /* 011930 80010D30 00000000 */ nop /* 011934 80010D34 3C0F8012 */ lui $t7, %hi(gObjectCount) # $t7, 0x8012 /* 011938 80010D38 8DEFAEF0 */ lw $t7, %lo(gObjectCount)($t7) diff --git a/asm/non_matchings/racer/func_80042D20.s b/asm/non_matchings/racer/func_80042D20.s index 20ef5499..85869499 100644 --- a/asm/non_matchings/racer/func_80042D20.s +++ b/asm/non_matchings/racer/func_80042D20.s @@ -67,8 +67,8 @@ glabel func_80042D20 /* 0439A0 80042DA0 AFAA0060 */ sw $t2, 0x60($sp) /* 0439A4 80042DA4 8FAA0060 */ lw $t2, 0x60($sp) /* 0439A8 80042DA8 10400007 */ beqz $v0, .L80042DC8 -/* 0439AC 80042DAC 3C028012 */ lui $v0, %hi(gCurrentCarInput) # $v0, 0x8012 -/* 0439B0 80042DB0 2442D528 */ addiu $v0, %lo(gCurrentCarInput) # addiu $v0, $v0, -0x2ad8 +/* 0439AC 80042DAC 3C028012 */ lui $v0, %hi(gCurrentRacerInput) # $v0, 0x8012 +/* 0439B0 80042DB0 2442D528 */ addiu $v0, %lo(gCurrentRacerInput) # addiu $v0, $v0, -0x2ad8 /* 0439B4 80042DB4 8C590000 */ lw $t9, ($v0) /* 0439B8 80042DB8 00000000 */ nop /* 0439BC 80042DBC 372E8000 */ ori $t6, $t9, 0x8000 @@ -431,11 +431,11 @@ glabel func_80042D20 /* 043EFC 800432FC 4608803E */ c.le.s $f16, $f8 /* 043F00 80043300 00000000 */ nop /* 043F04 80043304 45000005 */ bc1f .L8004331C -/* 043F08 80043308 3C0F8012 */ lui $t7, %hi(gCurrentCarInput) # $t7, 0x8012 -/* 043F0C 8004330C 8DEFD528 */ lw $t7, %lo(gCurrentCarInput)($t7) -/* 043F10 80043310 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 +/* 043F08 80043308 3C0F8012 */ lui $t7, %hi(gCurrentRacerInput) # $t7, 0x8012 +/* 043F0C 8004330C 8DEFD528 */ lw $t7, %lo(gCurrentRacerInput)($t7) +/* 043F10 80043310 3C018012 */ lui $at, %hi(gCurrentRacerInput) # $at, 0x8012 /* 043F14 80043314 35EE8000 */ ori $t6, $t7, 0x8000 -/* 043F18 80043318 AC2ED528 */ sw $t6, %lo(gCurrentCarInput)($at) +/* 043F18 80043318 AC2ED528 */ sw $t6, %lo(gCurrentRacerInput)($at) .L8004331C: /* 043F1C 8004331C AFA9005C */ sw $t1, 0x5c($sp) /* 043F20 80043320 A7AC0034 */ sh $t4, 0x34($sp) @@ -622,11 +622,11 @@ glabel func_80042D20 /* 0441C4 800435C4 87AD0078 */ lh $t5, 0x78($sp) /* 0441C8 800435C8 10400006 */ beqz $v0, .L800435E4 /* 0441CC 800435CC 241FFFFF */ li $ra, -1 -/* 0441D0 800435D0 3C188012 */ lui $t8, %hi(D_8011D530) # $t8, 0x8012 -/* 0441D4 800435D4 8F18D530 */ lw $t8, %lo(D_8011D530)($t8) -/* 0441D8 800435D8 3C018012 */ lui $at, %hi(D_8011D530) # $at, 0x8012 +/* 0441D0 800435D0 3C188012 */ lui $t8, %hi(gCurrentButtonsReleased) # $t8, 0x8012 +/* 0441D4 800435D4 8F18D530 */ lw $t8, %lo(gCurrentButtonsReleased)($t8) +/* 0441D8 800435D8 3C018012 */ lui $at, %hi(gCurrentButtonsReleased) # $at, 0x8012 /* 0441DC 800435DC 370E2000 */ ori $t6, $t8, 0x2000 -/* 0441E0 800435E0 AC2ED530 */ sw $t6, %lo(D_8011D530)($at) +/* 0441E0 800435E0 AC2ED530 */ sw $t6, %lo(gCurrentButtonsReleased)($at) .L800435E4: /* 0441E4 800435E4 820F0173 */ lb $t7, 0x173($s0) /* 0441E8 800435E8 3C19800E */ lui $t9, %hi(D_800DCD90) # $t9, 0x800e @@ -772,14 +772,14 @@ glabel func_80042D20 /* 044400 80043800 30F80004 */ andi $t8, $a3, 4 .L80043804: /* 044404 80043804 13000014 */ beqz $t8, .L80043858 -/* 044408 80043808 3C0E8012 */ lui $t6, %hi(gCurrentCarInput) # $t6, 0x8012 -/* 04440C 8004380C 8DCED528 */ lw $t6, %lo(gCurrentCarInput)($t6) +/* 044408 80043808 3C0E8012 */ lui $t6, %hi(gCurrentRacerInput) # $t6, 0x8012 +/* 04440C 8004380C 8DCED528 */ lw $t6, %lo(gCurrentRacerInput)($t6) /* 044410 80043810 3C01FFFF */ lui $at, (0xFFFF7FFF >> 16) # lui $at, 0xffff /* 044414 80043814 34217FFF */ ori $at, (0xFFFF7FFF & 0xFFFF) # ori $at, $at, 0x7fff /* 044418 80043818 01C17824 */ and $t7, $t6, $at -/* 04441C 8004381C 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 +/* 04441C 8004381C 3C018012 */ lui $at, %hi(gCurrentRacerInput) # $at, 0x8012 /* 044420 80043820 1000000D */ b .L80043858 -/* 044424 80043824 AC2FD528 */ sw $t7, %lo(gCurrentCarInput)($at) +/* 044424 80043824 AC2FD528 */ sw $t7, %lo(gCurrentRacerInput)($at) .L80043828: /* 044428 80043828 2401FFFD */ li $at, -3 /* 04442C 8004382C 00E1C824 */ and $t9, $a3, $at @@ -798,13 +798,13 @@ glabel func_80042D20 /* 04445C 8004385C 00000000 */ nop /* 044460 80043860 31F90004 */ andi $t9, $t7, 4 /* 044464 80043864 13200007 */ beqz $t9, .L80043884 -/* 044468 80043868 3C188012 */ lui $t8, %hi(gCurrentCarInput) # $t8, 0x8012 -/* 04446C 8004386C 8F18D528 */ lw $t8, %lo(gCurrentCarInput)($t8) +/* 044468 80043868 3C188012 */ lui $t8, %hi(gCurrentRacerInput) # $t8, 0x8012 +/* 04446C 8004386C 8F18D528 */ lw $t8, %lo(gCurrentRacerInput)($t8) /* 044470 80043870 3C01FFFF */ lui $at, (0xFFFF7FFF >> 16) # lui $at, 0xffff /* 044474 80043874 34217FFF */ ori $at, (0xFFFF7FFF & 0xFFFF) # ori $at, $at, 0x7fff /* 044478 80043878 03017024 */ and $t6, $t8, $at -/* 04447C 8004387C 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 -/* 044480 80043880 AC2ED528 */ sw $t6, %lo(gCurrentCarInput)($at) +/* 04447C 8004387C 3C018012 */ lui $at, %hi(gCurrentRacerInput) # $at, 0x8012 +/* 044480 80043880 AC2ED528 */ sw $t6, %lo(gCurrentRacerInput)($at) .L80043884: /* 044484 80043884 860F01C6 */ lh $t7, 0x1c6($s0) /* 044488 80043888 00000000 */ nop @@ -813,15 +813,15 @@ glabel func_80042D20 /* 044494 80043894 920201C9 */ lbu $v0, 0x1c9($s0) /* 044498 80043898 24010004 */ li $at, 4 /* 04449C 8004389C 10410004 */ beq $v0, $at, .L800438B0 -/* 0444A0 800438A0 3C198012 */ lui $t9, %hi(D_8011D530) # $t9, 0x8012 +/* 0444A0 800438A0 3C198012 */ lui $t9, %hi(gCurrentButtonsReleased) # $t9, 0x8012 /* 0444A4 800438A4 24010005 */ li $at, 5 /* 0444A8 800438A8 14410005 */ bne $v0, $at, .L800438C0 /* 0444AC 800438AC 00000000 */ nop .L800438B0: -/* 0444B0 800438B0 8F39D530 */ lw $t9, %lo(D_8011D530)($t9) -/* 0444B4 800438B4 3C018012 */ lui $at, %hi(D_8011D530) # $at, 0x8012 +/* 0444B0 800438B0 8F39D530 */ lw $t9, %lo(gCurrentButtonsReleased)($t9) +/* 0444B4 800438B4 3C018012 */ lui $at, %hi(gCurrentButtonsReleased) # $at, 0x8012 /* 0444B8 800438B8 37382000 */ ori $t8, $t9, 0x2000 -/* 0444BC 800438BC AC38D530 */ sw $t8, %lo(D_8011D530)($at) +/* 0444BC 800438BC AC38D530 */ sw $t8, %lo(gCurrentButtonsReleased)($at) .L800438C0: /* 0444C0 800438C0 1060001D */ beqz $v1, .L80043938 /* 0444C4 800438C4 A20001C9 */ sb $zero, 0x1c9($s0) @@ -1176,9 +1176,9 @@ glabel func_80042D20 /* 0449E4 80043DE4 E60E0124 */ swc1 $f14, 0x124($s0) .L80043DE8: /* 0449E8 80043DE8 820E01D8 */ lb $t6, 0x1d8($s0) -/* 0449EC 80043DEC 3C028012 */ lui $v0, %hi(gCurrentCarInput) # $v0, 0x8012 +/* 0449EC 80043DEC 3C028012 */ lui $v0, %hi(gCurrentRacerInput) # $v0, 0x8012 /* 0449F0 80043DF0 11C00015 */ beqz $t6, .L80043E48 -/* 0449F4 80043DF4 2442D528 */ addiu $v0, %lo(gCurrentCarInput) # addiu $v0, $v0, -0x2ad8 +/* 0449F4 80043DF4 2442D528 */ addiu $v0, %lo(gCurrentRacerInput) # addiu $v0, $v0, -0x2ad8 /* 0449F8 80043DF8 A20001D3 */ sb $zero, 0x1d3($s0) /* 0449FC 80043DFC A2000213 */ sb $zero, 0x213($s0) /* 044A00 80043E00 8C4F0000 */ lw $t7, ($v0) diff --git a/asm/non_matchings/racer/func_8004447C.s b/asm/non_matchings/racer/func_8004447C.s index ac4faa9c..5b0a7668 100644 --- a/asm/non_matchings/racer/func_8004447C.s +++ b/asm/non_matchings/racer/func_8004447C.s @@ -9,13 +9,13 @@ glabel D_800E6350 .text glabel func_8004447C -/* 04507C 8004447C 3C018012 */ lui $at, %hi(gActivePlayerButtonPress) # $at, 0x8012 -/* 045080 80044480 AC20D52C */ sw $zero, %lo(gActivePlayerButtonPress)($at) -/* 045084 80044484 3C018012 */ lui $at, %hi(D_8011D530) # $at, 0x8012 -/* 045088 80044488 AC20D530 */ sw $zero, %lo(D_8011D530)($at) -/* 04508C 8004448C 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 +/* 04507C 8004447C 3C018012 */ lui $at, %hi(gCurrentButtonsPressed) # $at, 0x8012 +/* 045080 80044480 AC20D52C */ sw $zero, %lo(gCurrentButtonsPressed)($at) +/* 045084 80044484 3C018012 */ lui $at, %hi(gCurrentButtonsReleased) # $at, 0x8012 +/* 045088 80044488 AC20D530 */ sw $zero, %lo(gCurrentButtonsReleased)($at) +/* 04508C 8004448C 3C018012 */ lui $at, %hi(gCurrentRacerInput) # $at, 0x8012 /* 045090 80044490 27BDFF88 */ addiu $sp, $sp, -0x78 -/* 045094 80044494 AC20D528 */ sw $zero, %lo(gCurrentCarInput)($at) +/* 045094 80044494 AC20D528 */ sw $zero, %lo(gCurrentRacerInput)($at) /* 045098 80044498 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 /* 04509C 8004449C AC20D534 */ sw $zero, %lo(gCurrentStickX)($at) /* 0450A0 800444A0 AFBF001C */ sw $ra, 0x1c($sp) @@ -514,11 +514,11 @@ glabel L80044ADC /* 0457AC 80044BAC 44804000 */ mtc1 $zero, $f8 /* 0457B0 80044BB0 46005421 */ cvt.d.s $f16, $f10 /* 0457B4 80044BB4 4630403C */ c.lt.d $f8, $f16 -/* 0457B8 80044BB8 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 +/* 0457B8 80044BB8 3C018012 */ lui $at, %hi(gCurrentRacerInput) # $at, 0x8012 /* 0457BC 80044BBC 4500001B */ bc1f .L80044C2C /* 0457C0 80044BC0 34198000 */ li $t9, 32768 /* 0457C4 80044BC4 10000019 */ b .L80044C2C -/* 0457C8 80044BC8 AC39D528 */ sw $t9, %lo(gCurrentCarInput)($at) +/* 0457C8 80044BC8 AC39D528 */ sw $t9, %lo(gCurrentRacerInput)($at) .L80044BCC: /* 0457CC 80044BCC C604002C */ lwc1 $f4, 0x2c($s0) /* 0457D0 80044BD0 3C01C010 */ li $at, 0xC0100000 # -2.250000 @@ -530,22 +530,22 @@ glabel L80044ADC /* 0457E8 80044BE8 45000005 */ bc1f .L80044C00 /* 0457EC 80044BEC 240C4000 */ li $t4, 16384 /* 0457F0 80044BF0 3418C000 */ li $t8, 49152 -/* 0457F4 80044BF4 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 +/* 0457F4 80044BF4 3C018012 */ lui $at, %hi(gCurrentRacerInput) # $at, 0x8012 /* 0457F8 80044BF8 10000003 */ b .L80044C08 -/* 0457FC 80044BFC AC38D528 */ sw $t8, %lo(gCurrentCarInput)($at) +/* 0457FC 80044BFC AC38D528 */ sw $t8, %lo(gCurrentRacerInput)($at) .L80044C00: -/* 045800 80044C00 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 -/* 045804 80044C04 AC2CD528 */ sw $t4, %lo(gCurrentCarInput)($at) +/* 045800 80044C00 3C018012 */ lui $at, %hi(gCurrentRacerInput) # $at, 0x8012 +/* 045804 80044C04 AC2CD528 */ sw $t4, %lo(gCurrentRacerInput)($at) .L80044C08: /* 045808 80044C08 C608002C */ lwc1 $f8, 0x2c($s0) /* 04580C 80044C0C 3C01BFF0 */ li $at, 0xBFF00000 # -1.875000 /* 045810 80044C10 44815800 */ mtc1 $at, $f11 /* 045814 80044C14 46004421 */ cvt.d.s $f16, $f8 /* 045818 80044C18 4630503C */ c.lt.d $f10, $f16 -/* 04581C 80044C1C 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 +/* 04581C 80044C1C 3C018012 */ lui $at, %hi(gCurrentRacerInput) # $at, 0x8012 /* 045820 80044C20 45000002 */ bc1f .L80044C2C /* 045824 80044C24 340D8000 */ li $t5, 32768 -/* 045828 80044C28 AC2DD528 */ sw $t5, %lo(gCurrentCarInput)($at) +/* 045828 80044C28 AC2DD528 */ sw $t5, %lo(gCurrentRacerInput)($at) .L80044C2C: /* 04582C 80044C2C 8E080158 */ lw $t0, 0x158($s0) /* 045830 80044C30 00000000 */ nop @@ -604,15 +604,15 @@ glabel L80044ADC /* 0458F8 80044CF8 44803000 */ mtc1 $zero, $f6 /* 0458FC 80044CFC 460042A1 */ cvt.d.s $f10, $f8 /* 045900 80044D00 462A303C */ c.lt.d $f6, $f10 -/* 045904 80044D04 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 +/* 045904 80044D04 3C018012 */ lui $at, %hi(gCurrentRacerInput) # $at, 0x8012 /* 045908 80044D08 45000005 */ bc1f .L80044D20 /* 04590C 80044D0C 240D4000 */ li $t5, 16384 /* 045910 80044D10 340CC000 */ li $t4, 49152 -/* 045914 80044D14 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 +/* 045914 80044D14 3C018012 */ lui $at, %hi(gCurrentRacerInput) # $at, 0x8012 /* 045918 80044D18 10000002 */ b .L80044D24 -/* 04591C 80044D1C AC2CD528 */ sw $t4, %lo(gCurrentCarInput)($at) +/* 04591C 80044D1C AC2CD528 */ sw $t4, %lo(gCurrentRacerInput)($at) .L80044D20: -/* 045920 80044D20 AC2DD528 */ sw $t5, %lo(gCurrentCarInput)($at) +/* 045920 80044D20 AC2DD528 */ sw $t5, %lo(gCurrentRacerInput)($at) .L80044D24: /* 045924 80044D24 3C01800E */ lui $at, %hi(D_800E6350 + 4) # $at, 0x800e /* 045928 80044D28 C7B0005C */ lwc1 $f16, 0x5c($sp) @@ -877,11 +877,11 @@ glabel L80044F54 /* 045CE0 800450E0 10200007 */ beqz $at, .L80045100 /* 045CE4 800450E4 0183082A */ slt $at, $t4, $v1 /* 045CE8 800450E8 10200005 */ beqz $at, .L80045100 -/* 045CEC 800450EC 3C0E8012 */ lui $t6, %hi(D_8011D530) # $t6, 0x8012 -/* 045CF0 800450F0 8DCED530 */ lw $t6, %lo(D_8011D530)($t6) -/* 045CF4 800450F4 3C018012 */ lui $at, %hi(D_8011D530) # $at, 0x8012 +/* 045CEC 800450EC 3C0E8012 */ lui $t6, %hi(gCurrentButtonsReleased) # $t6, 0x8012 +/* 045CF0 800450F0 8DCED530 */ lw $t6, %lo(gCurrentButtonsReleased)($t6) +/* 045CF4 800450F4 3C018012 */ lui $at, %hi(gCurrentButtonsReleased) # $at, 0x8012 /* 045CF8 800450F8 35D92000 */ ori $t9, $t6, 0x2000 -/* 045CFC 800450FC AC39D530 */ sw $t9, %lo(D_8011D530)($at) +/* 045CFC 800450FC AC39D530 */ sw $t9, %lo(gCurrentButtonsReleased)($at) .L80045100: /* 045D00 80045100 24A50001 */ addiu $a1, $a1, 1 /* 045D04 80045104 0005C400 */ sll $t8, $a1, 0x10 diff --git a/asm/non_matchings/racer/func_800452A0.s b/asm/non_matchings/racer/func_800452A0.s index b7f9dc0f..1e374b9f 100644 --- a/asm/non_matchings/racer/func_800452A0.s +++ b/asm/non_matchings/racer/func_800452A0.s @@ -12,13 +12,13 @@ glabel D_800E63A0 .text glabel func_800452A0 /* 045EA0 800452A0 27BDFF48 */ addiu $sp, $sp, -0xb8 -/* 045EA4 800452A4 3C018012 */ lui $at, %hi(gActivePlayerButtonPress) # $at, 0x8012 -/* 045EA8 800452A8 AC20D52C */ sw $zero, %lo(gActivePlayerButtonPress)($at) -/* 045EAC 800452AC 3C018012 */ lui $at, %hi(D_8011D530) # $at, 0x8012 -/* 045EB0 800452B0 AC20D530 */ sw $zero, %lo(D_8011D530)($at) -/* 045EB4 800452B4 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 +/* 045EA4 800452A4 3C018012 */ lui $at, %hi(gCurrentButtonsPressed) # $at, 0x8012 +/* 045EA8 800452A8 AC20D52C */ sw $zero, %lo(gCurrentButtonsPressed)($at) +/* 045EAC 800452AC 3C018012 */ lui $at, %hi(gCurrentButtonsReleased) # $at, 0x8012 +/* 045EB0 800452B0 AC20D530 */ sw $zero, %lo(gCurrentButtonsReleased)($at) +/* 045EB4 800452B4 3C018012 */ lui $at, %hi(gCurrentRacerInput) # $at, 0x8012 /* 045EB8 800452B8 340E8000 */ li $t6, 32768 -/* 045EBC 800452BC AC2ED528 */ sw $t6, %lo(gCurrentCarInput)($at) +/* 045EBC 800452BC AC2ED528 */ sw $t6, %lo(gCurrentRacerInput)($at) /* 045EC0 800452C0 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 /* 045EC4 800452C4 AFB60048 */ sw $s6, 0x48($sp) /* 045EC8 800452C8 AC20D534 */ sw $zero, %lo(gCurrentStickX)($at) @@ -618,9 +618,9 @@ glabel L80045AF8 /* 046700 80045B00 44808000 */ mtc1 $zero, $f16 /* 046704 80045B04 460012A1 */ cvt.d.s $f10, $f2 /* 046708 80045B08 4630503C */ c.lt.d $f10, $f16 -/* 04670C 80045B0C 3C028012 */ lui $v0, %hi(gActivePlayerButtonPress) # $v0, 0x8012 +/* 04670C 80045B0C 3C028012 */ lui $v0, %hi(gCurrentButtonsPressed) # $v0, 0x8012 /* 046710 80045B10 4500003B */ bc1f .L80045C00 -/* 046714 80045B14 2442D52C */ addiu $v0, %lo(gActivePlayerButtonPress) # addiu $v0, $v0, -0x2ad4 +/* 046714 80045B14 2442D52C */ addiu $v0, %lo(gCurrentButtonsPressed) # addiu $v0, $v0, -0x2ad4 /* 046718 80045B18 A2A001CD */ sb $zero, 0x1cd($s5) /* 04671C 80045B1C 8C4F0000 */ lw $t7, ($v0) /* 046720 80045B20 00000000 */ nop @@ -649,14 +649,14 @@ glabel L80045B70 /* 046770 80045B70 82A90173 */ lb $t1, 0x173($s5) /* 046774 80045B74 3C01800E */ lui $at, %hi(D_800E63A0 + 4) # $at, 0x800e /* 046778 80045B78 15200002 */ bnez $t1, .L80045B84 -/* 04677C 80045B7C 3C028012 */ lui $v0, %hi(D_8011D530) # $v0, 0x8012 +/* 04677C 80045B7C 3C028012 */ lui $v0, %hi(gCurrentButtonsReleased) # $v0, 0x8012 /* 046780 80045B80 A2A001CD */ sb $zero, 0x1cd($s5) .L80045B84: /* 046784 80045B84 C42963A0 */ lwc1 $f9, %lo(D_800E63A0)($at) /* 046788 80045B88 C42863A4 */ lwc1 $f8, %lo(D_800E63A0 + 4)($at) /* 04678C 80045B8C 460011A1 */ cvt.d.s $f6, $f2 /* 046790 80045B90 4628303C */ c.lt.d $f6, $f8 -/* 046794 80045B94 2442D530 */ addiu $v0, %lo(D_8011D530) # addiu $v0, $v0, -0x2ad0 +/* 046794 80045B94 2442D530 */ addiu $v0, %lo(gCurrentButtonsReleased) # addiu $v0, $v0, -0x2ad0 /* 046798 80045B98 4500001A */ bc1f .L80045C04 /* 04679C 80045B9C 8FBF0054 */ lw $ra, 0x54($sp) /* 0467A0 80045BA0 8C480000 */ lw $t0, ($v0) diff --git a/asm/non_matchings/racer/func_80045C48.s b/asm/non_matchings/racer/func_80045C48.s index 4b67219d..daca44d8 100644 --- a/asm/non_matchings/racer/func_80045C48.s +++ b/asm/non_matchings/racer/func_80045C48.s @@ -1,11 +1,11 @@ glabel func_80045C48 -/* 046848 80045C48 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 +/* 046848 80045C48 3C018012 */ lui $at, %hi(gCurrentRacerInput) # $at, 0x8012 /* 04684C 80045C4C 27BDFF18 */ addiu $sp, $sp, -0xe8 -/* 046850 80045C50 AC20D528 */ sw $zero, %lo(gCurrentCarInput)($at) -/* 046854 80045C54 3C018012 */ lui $at, %hi(gActivePlayerButtonPress) # $at, 0x8012 -/* 046858 80045C58 AC20D52C */ sw $zero, %lo(gActivePlayerButtonPress)($at) -/* 04685C 80045C5C 3C018012 */ lui $at, %hi(D_8011D530) # $at, 0x8012 -/* 046860 80045C60 AC20D530 */ sw $zero, %lo(D_8011D530)($at) +/* 046850 80045C50 AC20D528 */ sw $zero, %lo(gCurrentRacerInput)($at) +/* 046854 80045C54 3C018012 */ lui $at, %hi(gCurrentButtonsPressed) # $at, 0x8012 +/* 046858 80045C58 AC20D52C */ sw $zero, %lo(gCurrentButtonsPressed)($at) +/* 04685C 80045C5C 3C018012 */ lui $at, %hi(gCurrentButtonsReleased) # $at, 0x8012 +/* 046860 80045C60 AC20D530 */ sw $zero, %lo(gCurrentButtonsReleased)($at) /* 046864 80045C64 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 /* 046868 80045C68 AC20D534 */ sw $zero, %lo(gCurrentStickX)($at) /* 04686C 80045C6C AFBF002C */ sw $ra, 0x2c($sp) diff --git a/asm/non_matchings/racer/func_80046524.s b/asm/non_matchings/racer/func_80046524.s index 2d1cd6db..7ae18ced 100644 --- a/asm/non_matchings/racer/func_80046524.s +++ b/asm/non_matchings/racer/func_80046524.s @@ -80,8 +80,8 @@ glabel func_80046524 /* 047178 80046578 3C0D8012 */ lui $t5, %hi(gCurrentStickX) # $t5, 0x8012 /* 04717C 8004657C 05C0000B */ bltz $t6, .L800465AC /* 047180 80046580 02202025 */ move $a0, $s1 -/* 047184 80046584 3C0F800E */ lui $t7, %hi(D_800DCB98) # $t7, 0x800e -/* 047188 80046588 8DEFCB98 */ lw $t7, %lo(D_800DCB98)($t7) +/* 047184 80046584 3C0F800E */ lui $t7, %hi(gNumViewports) # $t7, 0x800e +/* 047188 80046588 8DEFCB98 */ lw $t7, %lo(gNumViewports)($t7) /* 04718C 8004658C 00000000 */ nop /* 047190 80046590 29E10002 */ slti $at, $t7, 2 /* 047194 80046594 10200006 */ beqz $at, .L800465B0 @@ -116,8 +116,8 @@ glabel func_80046524 /* 047200 80046600 44813800 */ mtc1 $at, $f7 /* 047204 80046604 44803000 */ mtc1 $zero, $f6 /* 047208 80046608 3C014100 */ li $at, 0x41000000 # 8.000000 -/* 04720C 8004660C 3C0B8012 */ lui $t3, %hi(D_8011D55C) # $t3, 0x8012 -/* 047210 80046610 8D6BD55C */ lw $t3, %lo(D_8011D55C)($t3) +/* 04720C 8004660C 3C0B8012 */ lui $t3, %hi(gCurrentPlayerIndex) # $t3, 0x8012 +/* 047210 80046610 8D6BD55C */ lw $t3, %lo(gCurrentPlayerIndex)($t3) /* 047214 80046614 44811000 */ mtc1 $at, $f2 /* 047218 80046618 2401FFFF */ li $at, -1 /* 04721C 8004661C 02002825 */ move $a1, $s0 @@ -188,8 +188,8 @@ glabel func_80046524 /* 04730C 8004670C 02202025 */ move $a0, $s1 /* 047310 80046710 0C01231F */ jal func_80048C7C /* 047314 80046714 02002825 */ move $a1, $s0 -/* 047318 80046718 3C188012 */ lui $t8, %hi(D_8011D55C) # $t8, 0x8012 -/* 04731C 8004671C 8F18D55C */ lw $t8, %lo(D_8011D55C)($t8) +/* 047318 80046718 3C188012 */ lui $t8, %hi(gCurrentPlayerIndex) # $t8, 0x8012 +/* 04731C 8004671C 8F18D55C */ lw $t8, %lo(gCurrentPlayerIndex)($t8) /* 047320 80046720 2401FFFF */ li $at, -1 /* 047324 80046724 13010007 */ beq $t8, $at, .L80046744 /* 047328 80046728 00000000 */ nop @@ -203,9 +203,9 @@ glabel func_80046524 /* 047344 80046744 0C0148D3 */ jal func_8005234C /* 047348 80046748 02002025 */ move $a0, $s0 .L8004674C: -/* 04734C 8004674C 3C198012 */ lui $t9, %hi(gCurrentCarInput) # $t9, 0x8012 -/* 047350 80046750 8F39D528 */ lw $t9, %lo(gCurrentCarInput)($t9) -/* 047354 80046754 3C048012 */ lui $a0, %hi(gCurrentCarInput) # $a0, 0x8012 +/* 04734C 8004674C 3C198012 */ lui $t9, %hi(gCurrentRacerInput) # $t9, 0x8012 +/* 047350 80046750 8F39D528 */ lw $t9, %lo(gCurrentRacerInput)($t9) +/* 047354 80046754 3C048012 */ lui $a0, %hi(gCurrentRacerInput) # $a0, 0x8012 /* 047358 80046758 332A8000 */ andi $t2, $t9, 0x8000 /* 04735C 8004675C 1140001E */ beqz $t2, .L800467D8 /* 047360 80046760 00000000 */ nop @@ -273,8 +273,8 @@ glabel func_80046524 /* 04744C 8004684C 460E303C */ c.lt.s $f6, $f14 /* 047450 80046850 46001006 */ mov.s $f0, $f2 /* 047454 80046854 45000008 */ bc1f .L80046878 -/* 047458 80046858 3C0B8012 */ lui $t3, %hi(gCurrentCarInput) # $t3, 0x8012 -/* 04745C 8004685C 8D6BD528 */ lw $t3, %lo(gCurrentCarInput)($t3) +/* 047458 80046858 3C0B8012 */ lui $t3, %hi(gCurrentRacerInput) # $t3, 0x8012 +/* 04745C 8004685C 8D6BD528 */ lw $t3, %lo(gCurrentRacerInput)($t3) /* 047460 80046860 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 047464 80046864 316C8000 */ andi $t4, $t3, 0x8000 /* 047468 80046868 11800003 */ beqz $t4, .L80046878 @@ -302,7 +302,7 @@ glabel func_80046524 .L800468BC: /* 0474BC 800468BC 46007221 */ cvt.d.s $f8, $f14 /* 0474C0 800468C0 4628203C */ c.lt.d $f4, $f8 -/* 0474C4 800468C4 8C84D528 */ lw $a0, %lo(gCurrentCarInput)($a0) +/* 0474C4 800468C4 8C84D528 */ lw $a0, %lo(gCurrentRacerInput)($a0) /* 0474C8 800468C8 45000008 */ bc1f .L800468EC /* 0474CC 800468CC 308E4000 */ andi $t6, $a0, 0x4000 /* 0474D0 800468D0 3C01800E */ lui $at, %hi(D_800E63C0 + 4) # $at, 0x800e @@ -705,7 +705,7 @@ glabel func_80046524 /* 047A94 80046E94 A20A01DB */ sb $t2, 0x1db($s0) .L80046E98: /* 047A98 80046E98 04610019 */ bgez $v1, .L80046F00 -/* 047A9C 80046E9C 3C0A8012 */ lui $t2, %hi(gCurrentCarInput) # $t2, 0x8012 +/* 047A9C 80046E9C 3C0A8012 */ lui $t2, %hi(gCurrentRacerInput) # $t2, 0x8012 /* 047AA0 80046EA0 00036080 */ sll $t4, $v1, 2 /* 047AA4 80046EA4 01836023 */ subu $t4, $t4, $v1 /* 047AA8 80046EA8 000C6080 */ sll $t4, $t4, 2 @@ -731,12 +731,12 @@ glabel func_80046524 /* 047AF8 80046EF8 27190001 */ addiu $t9, $t8, 1 /* 047AFC 80046EFC A21901DB */ sb $t9, 0x1db($s0) .L80046F00: -/* 047B00 80046F00 8D4AD528 */ lw $t2, %lo(gCurrentCarInput)($t2) +/* 047B00 80046F00 8D4AD528 */ lw $t2, %lo(gCurrentRacerInput)($t2) /* 047B04 80046F04 3C01FFFF */ lui $at, (0xFFFF3FFF >> 16) # lui $at, 0xffff /* 047B08 80046F08 34213FFF */ ori $at, (0xFFFF3FFF & 0xFFFF) # ori $at, $at, 0x3fff /* 047B0C 80046F0C 01416024 */ and $t4, $t2, $at -/* 047B10 80046F10 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 -/* 047B14 80046F14 AC2CD528 */ sw $t4, %lo(gCurrentCarInput)($at) +/* 047B10 80046F10 3C018012 */ lui $at, %hi(gCurrentRacerInput) # $at, 0x8012 +/* 047B14 80046F14 AC2CD528 */ sw $t4, %lo(gCurrentRacerInput)($at) /* 047B18 80046F18 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 /* 047B1C 80046F1C AC20D534 */ sw $zero, %lo(gCurrentStickX)($at) /* 047B20 80046F20 A20001E1 */ sb $zero, 0x1e1($s0) @@ -832,7 +832,7 @@ glabel func_80046524 /* 047C74 80047074 460A903C */ c.lt.s $f18, $f10 /* 047C78 80047078 44810000 */ mtc1 $at, $f0 /* 047C7C 8004707C 45000002 */ bc1f .L80047088 -/* 047C80 80047080 3C0D8012 */ lui $t5, %hi(D_8011D55C) # $t5, 0x8012 +/* 047C80 80047080 3C0D8012 */ lui $t5, %hi(gCurrentPlayerIndex) # $t5, 0x8012 /* 047C84 80047084 46009487 */ neg.s $f18, $f18 .L80047088: /* 047C88 80047088 4612003C */ c.lt.s $f0, $f18 @@ -906,7 +906,7 @@ glabel func_80046524 /* 047D90 80047190 46062281 */ sub.s $f10, $f4, $f6 /* 047D94 80047194 E62A0020 */ swc1 $f10, 0x20($s1) .L80047198: -/* 047D98 80047198 8DADD55C */ lw $t5, %lo(D_8011D55C)($t5) +/* 047D98 80047198 8DADD55C */ lw $t5, %lo(gCurrentPlayerIndex)($t5) /* 047D9C 8004719C 2401FFFF */ li $at, -1 /* 047DA0 800471A0 11A10008 */ beq $t5, $at, .L800471C4 /* 047DA4 800471A4 24060004 */ li $a2, 4 @@ -933,12 +933,12 @@ glabel func_80046524 /* 047DF0 800471F0 46240182 */ mul.d $f6, $f0, $f4 /* 047DF4 800471F4 C7AB0050 */ lwc1 $f11, 0x50($sp) /* 047DF8 800471F8 C7AA0054 */ lwc1 $f10, 0x54($sp) -/* 047DFC 800471FC 3C0F8012 */ lui $t7, %hi(gCurrentCarInput) # $t7, 0x8012 +/* 047DFC 800471FC 3C0F8012 */ lui $t7, %hi(gCurrentRacerInput) # $t7, 0x8012 /* 047E00 80047200 462A3202 */ mul.d $f8, $f6, $f10 /* 047E04 80047204 46280101 */ sub.d $f4, $f0, $f8 /* 047E08 80047208 462021A0 */ cvt.s.d $f6, $f4 /* 047E0C 8004720C E6260020 */ swc1 $f6, 0x20($s1) -/* 047E10 80047210 8DEFD528 */ lw $t7, %lo(gCurrentCarInput)($t7) +/* 047E10 80047210 8DEFD528 */ lw $t7, %lo(gCurrentRacerInput)($t7) /* 047E14 80047214 00000000 */ nop /* 047E18 80047218 31F84000 */ andi $t8, $t7, 0x4000 /* 047E1C 8004721C 13000013 */ beqz $t8, .L8004726C @@ -1077,8 +1077,8 @@ glabel func_80046524 /* 04800C 8004740C 10A0000B */ beqz $a1, .L8004743C /* 048010 80047410 2401000C */ li $at, 12 /* 048014 80047414 15210009 */ bne $t1, $at, .L8004743C -/* 048018 80047418 3C0B8012 */ lui $t3, %hi(gActivePlayerButtonPress) # $t3, 0x8012 -/* 04801C 8004741C 8D6BD52C */ lw $t3, %lo(gActivePlayerButtonPress)($t3) +/* 048018 80047418 3C0B8012 */ lui $t3, %hi(gCurrentButtonsPressed) # $t3, 0x8012 +/* 04801C 8004741C 8D6BD52C */ lw $t3, %lo(gCurrentButtonsPressed)($t3) /* 048020 80047420 240F0002 */ li $t7, 2 /* 048024 80047424 316E2000 */ andi $t6, $t3, 0x2000 /* 048028 80047428 11C00004 */ beqz $t6, .L8004743C @@ -1408,9 +1408,9 @@ glabel func_80046524 .L800478EC: /* 0484EC 800478EC 46206283 */ div.d $f10, $f12, $f0 /* 0484F0 800478F0 44832000 */ mtc1 $v1, $f4 -/* 0484F4 800478F4 3C048012 */ lui $a0, %hi(gCurrentCarInput) # $a0, 0x8012 +/* 0484F4 800478F4 3C048012 */ lui $a0, %hi(gCurrentRacerInput) # $a0, 0x8012 /* 0484F8 800478F8 468021A0 */ cvt.s.w $f6, $f4 -/* 0484FC 800478FC 8C84D528 */ lw $a0, %lo(gCurrentCarInput)($a0) +/* 0484FC 800478FC 8C84D528 */ lw $a0, %lo(gCurrentRacerInput)($a0) /* 048500 80047900 00000000 */ nop /* 048504 80047904 308E8000 */ andi $t6, $a0, 0x8000 /* 048508 80047908 308F0010 */ andi $t7, $a0, 0x10 @@ -1484,11 +1484,11 @@ glabel func_80046524 /* 048604 80047A04 008DC821 */ addu $t9, $a0, $t5 /* 048608 80047A08 15400120 */ bnez $t2, .L80047E8C /* 04860C 80047A0C A6190196 */ sh $t9, 0x196($s0) -/* 048610 80047A10 3C0C8012 */ lui $t4, %hi(D_8011D55C) # $t4, 0x8012 -/* 048614 80047A14 8D8CD55C */ lw $t4, %lo(D_8011D55C)($t4) +/* 048610 80047A10 3C0C8012 */ lui $t4, %hi(gCurrentPlayerIndex) # $t4, 0x8012 +/* 048614 80047A14 8D8CD55C */ lw $t4, %lo(gCurrentPlayerIndex)($t4) /* 048618 80047A18 2401FFFF */ li $at, -1 /* 04861C 80047A1C 15810038 */ bne $t4, $at, .L80047B00 -/* 048620 80047A20 3C048012 */ lui $a0, %hi(gCurrentCarInput) # $a0, 0x8012 +/* 048620 80047A20 3C048012 */ lui $a0, %hi(gCurrentRacerInput) # $a0, 0x8012 /* 048624 80047A24 820B01D8 */ lb $t3, 0x1d8($s0) /* 048628 80047A28 3C013FD0 */ li $at, 0x3FD00000 # 1.625000 /* 04862C 80047A2C 15600034 */ bnez $t3, .L80047B00 @@ -1503,7 +1503,7 @@ glabel func_80046524 /* 048650 80047A50 C428641C */ lwc1 $f8, %lo(D_800E6418 + 4)($at) /* 048654 80047A54 3C01800E */ lui $at, %hi(D_800E6420 + 4) # $at, 0x800e /* 048658 80047A58 46203420 */ cvt.s.d $f16, $f6 -/* 04865C 80047A5C 3C0E8012 */ lui $t6, %hi(gCurrentCarInput) # $t6, 0x8012 +/* 04865C 80047A5C 3C0E8012 */ lui $t6, %hi(gCurrentRacerInput) # $t6, 0x8012 /* 048660 80047A60 46008121 */ cvt.d.s $f4, $f16 /* 048664 80047A64 46282282 */ mul.d $f10, $f4, $f8 /* 048668 80047A68 44802000 */ mtc1 $zero, $f4 @@ -1523,10 +1523,10 @@ glabel func_80046524 /* 04869C 80047A9C 00000000 */ nop /* 0486A0 80047AA0 45000005 */ bc1f .L80047AB8 /* 0486A4 80047AA4 00000000 */ nop -/* 0486A8 80047AA8 8DCED528 */ lw $t6, %lo(gCurrentCarInput)($t6) -/* 0486AC 80047AAC 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 +/* 0486A8 80047AA8 8DCED528 */ lw $t6, %lo(gCurrentRacerInput)($t6) +/* 0486AC 80047AAC 3C018012 */ lui $at, %hi(gCurrentRacerInput) # $at, 0x8012 /* 0486B0 80047AB0 35CF0010 */ ori $t7, $t6, 0x10 -/* 0486B4 80047AB4 AC2FD528 */ sw $t7, %lo(gCurrentCarInput)($at) +/* 0486B4 80047AB4 AC2FD528 */ sw $t7, %lo(gCurrentRacerInput)($at) .L80047AB8: /* 0486B8 80047AB8 C6040038 */ lwc1 $f4, 0x38($s0) /* 0486BC 80047ABC C626001C */ lwc1 $f6, 0x1c($s1) @@ -1553,7 +1553,7 @@ glabel func_80046524 /* 04870C 80047B0C C426642C */ lwc1 $f6, %lo(D_800E6428 + 4)($at) /* 048710 80047B10 46002021 */ cvt.d.s $f0, $f4 /* 048714 80047B14 46260202 */ mul.d $f8, $f0, $f6 -/* 048718 80047B18 8C84D528 */ lw $a0, %lo(gCurrentCarInput)($a0) +/* 048718 80047B18 8C84D528 */ lw $a0, %lo(gCurrentRacerInput)($a0) /* 04871C 80047B1C 3C014000 */ li $at, 0x40000000 # 2.000000 /* 048720 80047B20 30980010 */ andi $t8, $a0, 0x10 /* 048724 80047B24 1300002E */ beqz $t8, .L80047BE0 @@ -1614,7 +1614,7 @@ glabel func_80046524 /* 0487F0 80047BF0 3C014000 */ li $at, 0x40000000 # 2.000000 /* 0487F4 80047BF4 3C0A8012 */ lui $t2, %hi(D_8011D584) # $t2, 0x8012 /* 0487F8 80047BF8 460A3101 */ sub.s $f4, $f6, $f10 -/* 0487FC 80047BFC 3C0B8012 */ lui $t3, %hi(gCurrentCarInput) # $t3, 0x8012 +/* 0487FC 80047BFC 3C0B8012 */ lui $t3, %hi(gCurrentRacerInput) # $t3, 0x8012 /* 048800 80047C00 E624001C */ swc1 $f4, 0x1c($s1) /* 048804 80047C04 C6060054 */ lwc1 $f6, 0x54($s0) /* 048808 80047C08 00000000 */ nop @@ -1738,7 +1738,7 @@ glabel func_80046524 /* 0489D8 80047DD8 C7A400FC */ lwc1 $f4, 0xfc($sp) /* 0489DC 80047DDC 4500000D */ bc1f .L80047E14 /* 0489E0 80047DE0 00000000 */ nop -/* 0489E4 80047DE4 8D6BD528 */ lw $t3, %lo(gCurrentCarInput)($t3) +/* 0489E4 80047DE4 8D6BD528 */ lw $t3, %lo(gCurrentRacerInput)($t3) /* 0489E8 80047DE8 C7A800FC */ lwc1 $f8, 0xfc($sp) /* 0489EC 80047DEC 316E8000 */ andi $t6, $t3, 0x8000 /* 0489F0 80047DF0 15C00008 */ bnez $t6, .L80047E14 @@ -1920,8 +1920,8 @@ glabel func_80046524 /* 048C78 80048078 0C00455C */ jal func_80011570 /* 048C7C 8004807C 00000000 */ nop /* 048C80 80048080 1040000F */ beqz $v0, .L800480C0 -/* 048C84 80048084 3C198012 */ lui $t9, %hi(D_8011D55C) # $t9, 0x8012 -/* 048C88 80048088 8F39D55C */ lw $t9, %lo(D_8011D55C)($t9) +/* 048C84 80048084 3C198012 */ lui $t9, %hi(gCurrentPlayerIndex) # $t9, 0x8012 +/* 048C88 80048088 8F39D55C */ lw $t9, %lo(gCurrentPlayerIndex)($t9) /* 048C8C 8004808C 2401FFFF */ li $at, -1 /* 048C90 80048090 1321000B */ beq $t9, $at, .L800480C0 /* 048C94 80048094 240A0001 */ li $t2, 1 @@ -2089,8 +2089,8 @@ glabel func_80046524 /* 048EEC 800482EC 4622403C */ c.lt.d $f8, $f2 /* 048EF0 800482F0 00000000 */ nop /* 048EF4 800482F4 45000017 */ bc1f .L80048354 -/* 048EF8 800482F8 3C0E8012 */ lui $t6, %hi(gCurrentCarInput) # $t6, 0x8012 -/* 048EFC 800482FC 8DCED528 */ lw $t6, %lo(gCurrentCarInput)($t6) +/* 048EF8 800482F8 3C0E8012 */ lui $t6, %hi(gCurrentRacerInput) # $t6, 0x8012 +/* 048EFC 800482FC 8DCED528 */ lw $t6, %lo(gCurrentRacerInput)($t6) /* 048F00 80048300 00004025 */ move $t0, $zero /* 048F04 80048304 31CF0010 */ andi $t7, $t6, 0x10 /* 048F08 80048308 11E00006 */ beqz $t7, .L80048324 @@ -2116,7 +2116,7 @@ glabel func_80046524 .L80048354: /* 048F54 80048354 44802800 */ mtc1 $zero, $f5 /* 048F58 80048358 44802000 */ mtc1 $zero, $f4 -/* 048F5C 8004835C 3C198012 */ lui $t9, %hi(D_8011D55C) # $t9, 0x8012 +/* 048F5C 8004835C 3C198012 */ lui $t9, %hi(gCurrentPlayerIndex) # $t9, 0x8012 /* 048F60 80048360 4622203C */ c.lt.d $f4, $f2 /* 048F64 80048364 00000000 */ nop /* 048F68 80048368 45000013 */ bc1f .L800483B8 @@ -2140,7 +2140,7 @@ glabel func_80046524 /* 048FB0 800483B0 462032A0 */ cvt.s.d $f10, $f6 /* 048FB4 800483B4 E60A00C4 */ swc1 $f10, 0xc4($s0) .L800483B8: -/* 048FB8 800483B8 8F39D55C */ lw $t9, %lo(D_8011D55C)($t9) +/* 048FB8 800483B8 8F39D55C */ lw $t9, %lo(gCurrentPlayerIndex)($t9) /* 048FBC 800483BC 820801D2 */ lb $t0, 0x1d2($s0) /* 048FC0 800483C0 2401FFFF */ li $at, -1 /* 048FC4 800483C4 1721000E */ bne $t9, $at, .L80048400 @@ -2188,8 +2188,8 @@ glabel func_80046524 /* 04905C 8004845C 46044181 */ sub.s $f6, $f8, $f4 /* 049060 80048460 C7A40108 */ lwc1 $f4, 0x108($sp) /* 049064 80048464 3C018012 */ lui $at, %hi(D_8011D54C) # $at, 0x8012 -/* 049068 80048468 3C03800E */ lui $v1, %hi(D_800DCB98) # $v1, 0x800e -/* 04906C 8004846C 2463CB98 */ addiu $v1, %lo(D_800DCB98) # addiu $v1, $v1, -0x3468 +/* 049068 80048468 3C03800E */ lui $v1, %hi(gNumViewports) # $v1, 0x800e +/* 04906C 8004846C 2463CB98 */ addiu $v1, %lo(gNumViewports) # addiu $v1, $v1, -0x3468 /* 049070 80048470 460A3201 */ sub.s $f8, $f6, $f10 /* 049074 80048474 C7A600E4 */ lwc1 $f6, 0xe4($sp) /* 049078 80048478 46024402 */ mul.s $f16, $f8, $f2 @@ -2252,13 +2252,13 @@ glabel func_80046524 /* 049158 80048558 10200026 */ beqz $at, .L800485F4 /* 04915C 8004855C 00000000 */ nop /* 049160 80048560 8E2E0040 */ lw $t6, 0x40($s1) -/* 049164 80048564 3C188012 */ lui $t8, %hi(gCurrentCarInput) # $t8, 0x8012 +/* 049164 80048564 3C188012 */ lui $t8, %hi(gCurrentRacerInput) # $t8, 0x8012 /* 049168 80048568 81CF0057 */ lb $t7, 0x57($t6) /* 04916C 8004856C 00000000 */ nop /* 049170 80048570 29E10009 */ slti $at, $t7, 9 /* 049174 80048574 1420001F */ bnez $at, .L800485F4 /* 049178 80048578 00000000 */ nop -/* 04917C 8004857C 8F18D528 */ lw $t8, %lo(gCurrentCarInput)($t8) +/* 04917C 8004857C 8F18D528 */ lw $t8, %lo(gCurrentRacerInput)($t8) /* 049180 80048580 34018010 */ li $at, 32784 /* 049184 80048584 330D8010 */ andi $t5, $t8, 0x8010 /* 049188 80048588 15A10011 */ bne $t5, $at, .L800485D0 @@ -2277,9 +2277,9 @@ glabel func_80046524 /* 0491B8 800485B8 0006CA80 */ sll $t9, $a2, 0xa /* 0491BC 800485BC 0C02D19A */ jal func_800B4668 /* 0491C0 800485C0 03203025 */ move $a2, $t9 -/* 0491C4 800485C4 3C03800E */ lui $v1, %hi(D_800DCB98) # $v1, 0x800e +/* 0491C4 800485C4 3C03800E */ lui $v1, %hi(gNumViewports) # $v1, 0x800e /* 0491C8 800485C8 1000000A */ b .L800485F4 -/* 0491CC 800485CC 2463CB98 */ addiu $v1, %lo(D_800DCB98) # addiu $v1, $v1, -0x3468 +/* 0491CC 800485CC 2463CB98 */ addiu $v1, %lo(gNumViewports) # addiu $v1, $v1, -0x3468 .L800485D0: /* 0491D0 800485D0 8FA60128 */ lw $a2, 0x128($sp) .L800485D4: @@ -2289,11 +2289,11 @@ glabel func_80046524 /* 0491E0 800485E0 24050008 */ li $a1, 8 /* 0491E4 800485E4 0C02D1AF */ jal func_800B46BC /* 0491E8 800485E8 24070020 */ li $a3, 32 -/* 0491EC 800485EC 3C03800E */ lui $v1, %hi(D_800DCB98) # $v1, 0x800e -/* 0491F0 800485F0 2463CB98 */ addiu $v1, %lo(D_800DCB98) # addiu $v1, $v1, -0x3468 +/* 0491EC 800485EC 3C03800E */ lui $v1, %hi(gNumViewports) # $v1, 0x800e +/* 0491F0 800485F0 2463CB98 */ addiu $v1, %lo(gNumViewports) # addiu $v1, $v1, -0x3468 .L800485F4: -/* 0491F4 800485F4 3C028012 */ lui $v0, %hi(D_8011D55C) # $v0, 0x8012 -/* 0491F8 800485F8 8C42D55C */ lw $v0, %lo(D_8011D55C)($v0) +/* 0491F4 800485F4 3C028012 */ lui $v0, %hi(gCurrentPlayerIndex) # $v0, 0x8012 +/* 0491F8 800485F8 8C42D55C */ lw $v0, %lo(gCurrentPlayerIndex)($v0) /* 0491FC 800485FC 00000000 */ nop /* 049200 80048600 04400057 */ bltz $v0, .L80048760 /* 049204 80048604 2401FFFF */ li $at, -1 @@ -2315,7 +2315,7 @@ glabel func_80046524 /* 049244 80048644 46000282 */ mul.s $f10, $f0, $f0 /* 049248 80048648 C62E0024 */ lwc1 $f14, 0x24($s1) /* 04924C 8004864C 3C014180 */ li $at, 0x41800000 # 16.000000 -/* 049250 80048650 3C028012 */ lui $v0, %hi(D_8011D55C) # $v0, 0x8012 +/* 049250 80048650 3C028012 */ lui $v0, %hi(gCurrentPlayerIndex) # $v0, 0x8012 /* 049254 80048654 460C6102 */ mul.s $f4, $f12, $f12 /* 049258 80048658 00000000 */ nop /* 04925C 8004865C 460E7182 */ mul.s $f6, $f14, $f14 @@ -2362,7 +2362,7 @@ glabel func_80046524 /* 0492F8 800486F8 372A0040 */ ori $t2, $t9, 0x40 /* 0492FC 800486FC AE2A0074 */ sw $t2, 0x74($s1) .L80048700: -/* 049300 80048700 8C42D55C */ lw $v0, %lo(D_8011D55C)($v0) +/* 049300 80048700 8C42D55C */ lw $v0, %lo(gCurrentPlayerIndex)($v0) /* 049304 80048704 10000016 */ b .L80048760 /* 049308 80048708 2401FFFF */ li $at, -1 .L8004870C: @@ -2383,10 +2383,10 @@ glabel func_80046524 /* 04933C 8004873C 45000008 */ bc1f .L80048760 /* 049340 80048740 2401FFFF */ li $at, -1 /* 049344 80048744 8E2C0074 */ lw $t4, 0x74($s1) -/* 049348 80048748 3C028012 */ lui $v0, %hi(D_8011D55C) # $v0, 0x8012 +/* 049348 80048748 3C028012 */ lui $v0, %hi(gCurrentPlayerIndex) # $v0, 0x8012 /* 04934C 8004874C 358B000C */ ori $t3, $t4, 0xc /* 049350 80048750 AE2B0074 */ sw $t3, 0x74($s1) -/* 049354 80048754 8C42D55C */ lw $v0, %lo(D_8011D55C)($v0) +/* 049354 80048754 8C42D55C */ lw $v0, %lo(gCurrentPlayerIndex)($v0) /* 049358 80048758 00000000 */ nop /* 04935C 8004875C 2401FFFF */ li $at, -1 .L80048760: @@ -2579,15 +2579,15 @@ glabel func_80046524 .L80048A20: /* 049620 80048A20 3C0E8012 */ lui $t6, %hi(gRaceStartTimer) # $t6, 0x8012 /* 049624 80048A24 8DCED540 */ lw $t6, %lo(gRaceStartTimer)($t6) -/* 049628 80048A28 3C0D8012 */ lui $t5, %hi(gActivePlayerButtonPress) # $t5, 0x8012 +/* 049628 80048A28 3C0D8012 */ lui $t5, %hi(gCurrentButtonsPressed) # $t5, 0x8012 /* 04962C 80048A2C 11C00007 */ beqz $t6, .L80048A4C /* 049630 80048A30 02202025 */ move $a0, $s1 -/* 049634 80048A34 3C0F8012 */ lui $t7, %hi(gActivePlayerButtonPress) # $t7, 0x8012 -/* 049638 80048A38 8DEFD52C */ lw $t7, %lo(gActivePlayerButtonPress)($t7) +/* 049634 80048A34 3C0F8012 */ lui $t7, %hi(gCurrentButtonsPressed) # $t7, 0x8012 +/* 049638 80048A38 8DEFD52C */ lw $t7, %lo(gCurrentButtonsPressed)($t7) /* 04963C 80048A3C 2401FFEF */ li $at, -17 /* 049640 80048A40 01E1C024 */ and $t8, $t7, $at -/* 049644 80048A44 3C018012 */ lui $at, %hi(gActivePlayerButtonPress) # $at, 0x8012 -/* 049648 80048A48 AC38D52C */ sw $t8, %lo(gActivePlayerButtonPress)($at) +/* 049644 80048A44 3C018012 */ lui $at, %hi(gCurrentButtonsPressed) # $at, 0x8012 +/* 049648 80048A48 AC38D52C */ sw $t8, %lo(gCurrentButtonsPressed)($at) .L80048A4C: /* 04964C 80048A4C C60A00C0 */ lwc1 $f10, 0xc0($s0) /* 049650 80048A50 00000000 */ nop @@ -2602,7 +2602,7 @@ glabel func_80046524 .L80048A74: /* 049674 80048A74 A20001FB */ sb $zero, 0x1fb($s0) .L80048A78: -/* 049678 80048A78 8DADD52C */ lw $t5, %lo(gActivePlayerButtonPress)($t5) +/* 049678 80048A78 8DADD52C */ lw $t5, %lo(gCurrentButtonsPressed)($t5) /* 04967C 80048A7C 00000000 */ nop /* 049680 80048A80 31AA0010 */ andi $t2, $t5, 0x10 /* 049684 80048A84 1140004A */ beqz $t2, .L80048BB0 diff --git a/asm/non_matchings/racer/func_80048C7C.s b/asm/non_matchings/racer/func_80048C7C.s deleted file mode 100644 index c8194bf8..00000000 --- a/asm/non_matchings/racer/func_80048C7C.s +++ /dev/null @@ -1,148 +0,0 @@ -.late_rodata -glabel jpt_800E646C -.word L80048D40, L80048D40, L80048E50, L80048DAC, L80048E18, L80048DB8 -.word 0 # Padding -glabel D_800E6488 -.double 0.7 -glabel D_800E6490 -.double 20.5 - -.text -glabel func_80048C7C -/* 04987C 80048C7C 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 049880 80048C80 AFBF001C */ sw $ra, 0x1c($sp) -/* 049884 80048C84 AFB00018 */ sw $s0, 0x18($sp) -/* 049888 80048C88 84AE0000 */ lh $t6, ($a1) -/* 04988C 80048C8C 2401FFFF */ li $at, -1 -/* 049890 80048C90 15C10003 */ bne $t6, $at, .L80048CA0 -/* 049894 80048C94 00A08025 */ move $s0, $a1 -/* 049898 80048C98 10000003 */ b .L80048CA8 -/* 04989C 80048C9C 00001825 */ move $v1, $zero -.L80048CA0: -/* 0498A0 80048CA0 82030185 */ lb $v1, 0x185($s0) -/* 0498A4 80048CA4 00000000 */ nop -.L80048CA8: -/* 0498A8 80048CA8 82020187 */ lb $v0, 0x187($s0) -/* 0498AC 80048CAC 00000000 */ nop -/* 0498B0 80048CB0 10400005 */ beqz $v0, .L80048CC8 -/* 0498B4 80048CB4 00000000 */ nop -/* 0498B8 80048CB8 860F018E */ lh $t7, 0x18e($s0) -/* 0498BC 80048CBC 24010004 */ li $at, 4 -/* 0498C0 80048CC0 19E00003 */ blez $t7, .L80048CD0 -/* 0498C4 80048CC4 00000000 */ nop -.L80048CC8: -/* 0498C8 80048CC8 10000062 */ b .L80048E54 -/* 0498CC 80048CCC A2000187 */ sb $zero, 0x187($s0) -.L80048CD0: -/* 0498D0 80048CD0 10410008 */ beq $v0, $at, .L80048CF4 -/* 0498D4 80048CD4 02002825 */ move $a1, $s0 -/* 0498D8 80048CD8 24060002 */ li $a2, 2 -/* 0498DC 80048CDC A3A30027 */ sb $v1, 0x27($sp) -/* 0498E0 80048CE0 0C015DB8 */ jal func_800576E0 -/* 0498E4 80048CE4 AFA40028 */ sw $a0, 0x28($sp) -/* 0498E8 80048CE8 83A30027 */ lb $v1, 0x27($sp) -/* 0498EC 80048CEC 8FA40028 */ lw $a0, 0x28($sp) -/* 0498F0 80048CF0 00000000 */ nop -.L80048CF4: -/* 0498F4 80048CF4 240501C2 */ li $a1, 450 -/* 0498F8 80048CF8 24060008 */ li $a2, 8 -/* 0498FC 80048CFC 24070081 */ li $a3, 129 -/* 049900 80048D00 A3A30027 */ sb $v1, 0x27($sp) -/* 049904 80048D04 0C015C2E */ jal play_random_character_voice -/* 049908 80048D08 AFA40028 */ sw $a0, 0x28($sp) -/* 04990C 80048D0C 82180187 */ lb $t8, 0x187($s0) -/* 049910 80048D10 83A30027 */ lb $v1, 0x27($sp) -/* 049914 80048D14 2719FFFF */ addiu $t9, $t8, -1 -/* 049918 80048D18 8FA40028 */ lw $a0, 0x28($sp) -/* 04991C 80048D1C 2F210006 */ sltiu $at, $t9, 6 -/* 049920 80048D20 1020004B */ beqz $at, .L80048E50 -/* 049924 80048D24 0019C880 */ sll $t9, $t9, 2 -/* 049928 80048D28 3C01800E */ lui $at, %hi(jpt_800E646C) # $at, 0x800e -/* 04992C 80048D2C 00390821 */ addu $at, $at, $t9 -/* 049930 80048D30 8C39646C */ lw $t9, %lo(jpt_800E646C)($at) -/* 049934 80048D34 00000000 */ nop -/* 049938 80048D38 03200008 */ jr $t9 -/* 04993C 80048D3C 00000000 */ nop -glabel L80048D40 -/* 049940 80048D40 24080001 */ li $t0, 1 -/* 049944 80048D44 14600008 */ bnez $v1, .L80048D68 -/* 049948 80048D48 A20801F1 */ sb $t0, 0x1f1($s0) -/* 04994C 80048D4C 44800000 */ mtc1 $zero, $f0 -/* 049950 80048D50 3C014100 */ li $at, 0x41000000 # 8.000000 -/* 049954 80048D54 44812000 */ mtc1 $at, $f4 -/* 049958 80048D58 E480001C */ swc1 $f0, 0x1c($a0) -/* 04995C 80048D5C E4800024 */ swc1 $f0, 0x24($a0) -/* 049960 80048D60 1000003B */ b .L80048E50 -/* 049964 80048D64 E4840020 */ swc1 $f4, 0x20($a0) -.L80048D68: -/* 049968 80048D68 C486001C */ lwc1 $f6, 0x1c($a0) -/* 04996C 80048D6C 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 049970 80048D70 44810800 */ mtc1 $at, $f1 -/* 049974 80048D74 44800000 */ mtc1 $zero, $f0 -/* 049978 80048D78 46003221 */ cvt.d.s $f8, $f6 -/* 04997C 80048D7C 46204282 */ mul.d $f10, $f8, $f0 -/* 049980 80048D80 C4920024 */ lwc1 $f18, 0x24($a0) -/* 049984 80048D84 3C0140C0 */ li $at, 0x40C00000 # 6.000000 -/* 049988 80048D88 46009121 */ cvt.d.s $f4, $f18 -/* 04998C 80048D8C 46202182 */ mul.d $f6, $f4, $f0 -/* 049990 80048D90 46205420 */ cvt.s.d $f16, $f10 -/* 049994 80048D94 44815000 */ mtc1 $at, $f10 -/* 049998 80048D98 E490001C */ swc1 $f16, 0x1c($a0) -/* 04999C 80048D9C E48A0020 */ swc1 $f10, 0x20($a0) -/* 0499A0 80048DA0 46203220 */ cvt.s.d $f8, $f6 -/* 0499A4 80048DA4 1000002A */ b .L80048E50 -/* 0499A8 80048DA8 E4880024 */ swc1 $f8, 0x24($a0) -glabel L80048DAC -/* 0499AC 80048DAC 2409003C */ li $t1, 60 -/* 0499B0 80048DB0 10000027 */ b .L80048E50 -/* 0499B4 80048DB4 A20901ED */ sb $t1, 0x1ed($s0) -glabel L80048DB8 -/* 0499B8 80048DB8 3C01800E */ lui $at, %hi(D_800E6488 + 4) # $at, 0x800e -/* 0499BC 80048DBC C4216488 */ lwc1 $f1, %lo(D_800E6488)($at) -/* 0499C0 80048DC0 C420648C */ lwc1 $f0, %lo(D_800E6488 + 4)($at) -/* 0499C4 80048DC4 240A0078 */ li $t2, 120 -/* 0499C8 80048DC8 A60A0204 */ sh $t2, 0x204($s0) -/* 0499CC 80048DCC C490001C */ lwc1 $f16, 0x1c($a0) -/* 0499D0 80048DD0 3C014000 */ li $at, 0x40000000 # 2.000000 -/* 0499D4 80048DD4 460084A1 */ cvt.d.s $f18, $f16 -/* 0499D8 80048DD8 46209102 */ mul.d $f4, $f18, $f0 -/* 0499DC 80048DDC 44811000 */ mtc1 $at, $f2 -/* 0499E0 80048DE0 C4880020 */ lwc1 $f8, 0x20($a0) -/* 0499E4 80048DE4 00000000 */ nop -/* 0499E8 80048DE8 4608103C */ c.lt.s $f2, $f8 -/* 0499EC 80048DEC 462021A0 */ cvt.s.d $f6, $f4 -/* 0499F0 80048DF0 45000002 */ bc1f .L80048DFC -/* 0499F4 80048DF4 E486001C */ swc1 $f6, 0x1c($a0) -/* 0499F8 80048DF8 E4820020 */ swc1 $f2, 0x20($a0) -.L80048DFC: -/* 0499FC 80048DFC C48A0024 */ lwc1 $f10, 0x24($a0) -/* 049A00 80048E00 00000000 */ nop -/* 049A04 80048E04 46005421 */ cvt.d.s $f16, $f10 -/* 049A08 80048E08 46208482 */ mul.d $f18, $f16, $f0 -/* 049A0C 80048E0C 46209120 */ cvt.s.d $f4, $f18 -/* 049A10 80048E10 1000000F */ b .L80048E50 -/* 049A14 80048E14 E4840024 */ swc1 $f4, 0x24($a0) -glabel L80048E18 -/* 049A18 80048E18 44800000 */ mtc1 $zero, $f0 -/* 049A1C 80048E1C 240B0001 */ li $t3, 1 -/* 049A20 80048E20 A20B01F1 */ sb $t3, 0x1f1($s0) -/* 049A24 80048E24 E600002C */ swc1 $f0, 0x2c($s0) -/* 049A28 80048E28 3C01800E */ lui $at, %hi(D_800E6490 + 4) # $at, 0x800e -/* 049A2C 80048E2C C4860020 */ lwc1 $f6, 0x20($a0) -/* 049A30 80048E30 C42B6490 */ lwc1 $f11, %lo(D_800E6490)($at) -/* 049A34 80048E34 C42A6494 */ lwc1 $f10, %lo(D_800E6490 + 4)($at) -/* 049A38 80048E38 46003221 */ cvt.d.s $f8, $f6 -/* 049A3C 80048E3C 462A4400 */ add.d $f16, $f8, $f10 -/* 049A40 80048E40 24050139 */ li $a1, 313 -/* 049A44 80048E44 462084A0 */ cvt.s.d $f18, $f16 -/* 049A48 80048E48 0C015C12 */ jal racer_play_sound -/* 049A4C 80048E4C E4920020 */ swc1 $f18, 0x20($a0) -.L80048E50: -glabel L80048E50 -/* 049A50 80048E50 A2000187 */ sb $zero, 0x187($s0) -.L80048E54: -/* 049A54 80048E54 8FBF001C */ lw $ra, 0x1c($sp) -/* 049A58 80048E58 8FB00018 */ lw $s0, 0x18($sp) -/* 049A5C 80048E5C 03E00008 */ jr $ra -/* 049A60 80048E60 27BD0028 */ addiu $sp, $sp, 0x28 - diff --git a/asm/non_matchings/racer/func_80049794.s b/asm/non_matchings/racer/func_80049794.s index 70d2f945..c51f46a8 100644 --- a/asm/non_matchings/racer/func_80049794.s +++ b/asm/non_matchings/racer/func_80049794.s @@ -96,8 +96,8 @@ glabel func_80049794 /* 04A434 80049834 44807000 */ mtc1 $zero, $f14 /* 04A438 80049838 A21901DB */ sb $t9, 0x1db($s0) .L8004983C: -/* 04A43C 8004983C 3C0B8012 */ lui $t3, %hi(D_8011D55C) # $t3, 0x8012 -/* 04A440 80049840 8D6BD55C */ lw $t3, %lo(D_8011D55C)($t3) +/* 04A43C 8004983C 3C0B8012 */ lui $t3, %hi(gCurrentPlayerIndex) # $t3, 0x8012 +/* 04A440 80049840 8D6BD55C */ lw $t3, %lo(gCurrentPlayerIndex)($t3) /* 04A444 80049844 2409FFFF */ li $t1, -1 /* 04A448 80049848 112B00A4 */ beq $t1, $t3, .L80049ADC /* 04A44C 8004984C 00005025 */ move $t2, $zero @@ -386,8 +386,8 @@ glabel func_80049794 /* 04A860 80049C60 02202025 */ move $a0, $s1 /* 04A864 80049C64 0C013050 */ jal func_8004C140 /* 04A868 80049C68 02002825 */ move $a1, $s0 -/* 04A86C 80049C6C 3C0D8012 */ lui $t5, %hi(D_8011D55C) # $t5, 0x8012 -/* 04A870 80049C70 8DADD55C */ lw $t5, %lo(D_8011D55C)($t5) +/* 04A86C 80049C6C 3C0D8012 */ lui $t5, %hi(gCurrentPlayerIndex) # $t5, 0x8012 +/* 04A870 80049C70 8DADD55C */ lw $t5, %lo(gCurrentPlayerIndex)($t5) /* 04A874 80049C74 2401FFFF */ li $at, -1 /* 04A878 80049C78 11A10007 */ beq $t5, $at, .L80049C98 /* 04A87C 80049C7C 00000000 */ nop @@ -401,9 +401,9 @@ glabel func_80049794 /* 04A898 80049C98 0C0148D3 */ jal func_8005234C /* 04A89C 80049C9C 02002025 */ move $a0, $s0 .L80049CA0: -/* 04A8A0 80049CA0 3C0E8012 */ lui $t6, %hi(gCurrentCarInput) # $t6, 0x8012 -/* 04A8A4 80049CA4 8DCED528 */ lw $t6, %lo(gCurrentCarInput)($t6) -/* 04A8A8 80049CA8 3C198012 */ lui $t9, %hi(gCurrentCarInput) # $t9, 0x8012 +/* 04A8A0 80049CA0 3C0E8012 */ lui $t6, %hi(gCurrentRacerInput) # $t6, 0x8012 +/* 04A8A4 80049CA4 8DCED528 */ lw $t6, %lo(gCurrentRacerInput)($t6) +/* 04A8A8 80049CA8 3C198012 */ lui $t9, %hi(gCurrentRacerInput) # $t9, 0x8012 /* 04A8AC 80049CAC 31CF8000 */ andi $t7, $t6, 0x8000 /* 04A8B0 80049CB0 11E00019 */ beqz $t7, .L80049D18 /* 04A8B4 80049CB4 3C01800E */ lui $at, %hi(D_800E64B8 + 4) # $at, 0x800e @@ -463,7 +463,7 @@ glabel func_80049794 /* 04A984 80049D84 00000000 */ nop /* 04A988 80049D88 E60A00B4 */ swc1 $f10, 0xb4($s0) .L80049D8C: -/* 04A98C 80049D8C 8F39D528 */ lw $t9, %lo(gCurrentCarInput)($t9) +/* 04A98C 80049D8C 8F39D528 */ lw $t9, %lo(gCurrentRacerInput)($t9) /* 04A990 80049D90 C61200B4 */ lwc1 $f18, 0xb4($s0) /* 04A994 80049D94 332B4000 */ andi $t3, $t9, 0x4000 /* 04A998 80049D98 11600038 */ beqz $t3, .L80049E7C @@ -612,8 +612,8 @@ glabel func_80049794 /* 04ABB8 80049FB8 86020000 */ lh $v0, ($s0) /* 04ABBC 80049FBC 2403FFFF */ li $v1, -1 /* 04ABC0 80049FC0 14620008 */ bne $v1, $v0, .L80049FE4 -/* 04ABC4 80049FC4 3C0C8012 */ lui $t4, %hi(D_8011D55C) # $t4, 0x8012 -/* 04ABC8 80049FC8 8D8CD55C */ lw $t4, %lo(D_8011D55C)($t4) +/* 04ABC4 80049FC4 3C0C8012 */ lui $t4, %hi(gCurrentPlayerIndex) # $t4, 0x8012 +/* 04ABC8 80049FC8 8D8CD55C */ lw $t4, %lo(gCurrentPlayerIndex)($t4) /* 04ABCC 80049FCC 3C01800E */ lui $at, %hi(D_800E64E8) # $at, 0x800e /* 04ABD0 80049FD0 106C0004 */ beq $v1, $t4, .L80049FE4 /* 04ABD4 80049FD4 00000000 */ nop @@ -673,9 +673,9 @@ glabel func_80049794 /* 04AC9C 8004A09C 3C013FD0 */ li $at, 0x3FD00000 # 1.625000 /* 04ACA0 8004A0A0 44819800 */ mtc1 $at, $f19 /* 04ACA4 8004A0A4 44809000 */ mtc1 $zero, $f18 -/* 04ACA8 8004A0A8 3C018012 */ lui $at, %hi(D_8011D4F0) # $at, 0x8012 +/* 04ACA8 8004A0A8 3C018012 */ lui $at, %hi(gCurrentCourseHeight) # $at, 0x8012 /* 04ACAC 8004A0AC 46320102 */ mul.d $f4, $f0, $f18 -/* 04ACB0 8004A0B0 C428D4F0 */ lwc1 $f8, %lo(D_8011D4F0)($at) +/* 04ACB0 8004A0B0 C428D4F0 */ lwc1 $f8, %lo(gCurrentCourseHeight)($at) /* 04ACB4 8004A0B4 3C014049 */ li $at, 0x40490000 # 3.140625 /* 04ACB8 8004A0B8 A3A000A3 */ sb $zero, 0xa3($sp) /* 04ACBC 8004A0BC 820201E0 */ lb $v0, 0x1e0($s0) @@ -819,7 +819,7 @@ glabel func_80049794 /* 04AEC0 8004A2C0 1506FFF8 */ bne $t0, $a2, .L8004A2A4 /* 04AEC4 8004A2C4 24630001 */ addiu $v1, $v1, 1 /* 04AEC8 8004A2C8 14A60002 */ bne $a1, $a2, .L8004A2D4 -/* 04AECC 8004A2CC 3C0B8012 */ lui $t3, %hi(gCurrentCarInput) # $t3, 0x8012 +/* 04AECC 8004A2CC 3C0B8012 */ lui $t3, %hi(gCurrentRacerInput) # $t3, 0x8012 /* 04AED0 8004A2D0 A2000175 */ sb $zero, 0x175($s0) .L8004A2D4: /* 04AED4 8004A2D4 860E0000 */ lh $t6, ($s0) @@ -827,15 +827,15 @@ glabel func_80049794 /* 04AEDC 8004A2DC 15C00009 */ bnez $t6, .L8004A304 /* 04AEE0 8004A2E0 00000000 */ nop /* 04AEE4 8004A2E4 14A10007 */ bne $a1, $at, .L8004A304 -/* 04AEE8 8004A2E8 3C0F8012 */ lui $t7, %hi(gActivePlayerButtonPress) # $t7, 0x8012 -/* 04AEEC 8004A2EC 8DEFD52C */ lw $t7, %lo(gActivePlayerButtonPress)($t7) +/* 04AEE8 8004A2E8 3C0F8012 */ lui $t7, %hi(gCurrentButtonsPressed) # $t7, 0x8012 +/* 04AEEC 8004A2EC 8DEFD52C */ lw $t7, %lo(gCurrentButtonsPressed)($t7) /* 04AEF0 8004A2F0 24190002 */ li $t9, 2 /* 04AEF4 8004A2F4 31F82000 */ andi $t8, $t7, 0x2000 /* 04AEF8 8004A2F8 13000002 */ beqz $t8, .L8004A304 /* 04AEFC 8004A2FC 3C018012 */ lui $at, %hi(D_8011D582) # $at, 0x8012 /* 04AF00 8004A300 A039D582 */ sb $t9, %lo(D_8011D582)($at) .L8004A304: -/* 04AF04 8004A304 8D6BD528 */ lw $t3, %lo(gCurrentCarInput)($t3) +/* 04AF04 8004A304 8D6BD528 */ lw $t3, %lo(gCurrentRacerInput)($t3) /* 04AF08 8004A308 00000000 */ nop /* 04AF0C 8004A30C 316C4000 */ andi $t4, $t3, 0x4000 /* 04AF10 8004A310 11800013 */ beqz $t4, .L8004A360 @@ -903,10 +903,10 @@ glabel func_80049794 /* 04B000 8004A400 2529D538 */ addiu $t1, %lo(gCurrentStickY) # addiu $t1, $t1, -0x2ac8 .L8004A404: /* 04B004 8004A404 820C01D6 */ lb $t4, 0x1d6($s0) -/* 04B008 8004A408 3C0D8012 */ lui $t5, %hi(gCurrentCarInput) # $t5, 0x8012 +/* 04B008 8004A408 3C0D8012 */ lui $t5, %hi(gCurrentRacerInput) # $t5, 0x8012 /* 04B00C 8004A40C 29810005 */ slti $at, $t4, 5 /* 04B010 8004A410 14200018 */ bnez $at, .L8004A474 -/* 04B014 8004A414 3C0F800E */ lui $t7, %hi(D_800DCB98) # $t7, 0x800e +/* 04B014 8004A414 3C0F800E */ lui $t7, %hi(gNumViewports) # $t7, 0x800e /* 04B018 8004A418 C608002C */ lwc1 $f8, 0x2c($s0) /* 04B01C 8004A41C 3C01C018 */ li $at, 0xC0180000 # -2.375000 /* 04B020 8004A420 44812800 */ mtc1 $at, $f5 @@ -932,12 +932,12 @@ glabel func_80049794 /* 04B070 8004A470 E7A600C4 */ swc1 $f6, 0xc4($sp) .L8004A474: /* 04B074 8004A474 A20001E0 */ sb $zero, 0x1e0($s0) -/* 04B078 8004A478 8DADD528 */ lw $t5, %lo(gCurrentCarInput)($t5) +/* 04B078 8004A478 8DADD528 */ lw $t5, %lo(gCurrentRacerInput)($t5) /* 04B07C 8004A47C 00000000 */ nop /* 04B080 8004A480 31AE4000 */ andi $t6, $t5, 0x4000 /* 04B084 8004A484 11C00007 */ beqz $t6, .L8004A4A4 /* 04B088 8004A488 00000000 */ nop -/* 04B08C 8004A48C 8DEFCB98 */ lw $t7, %lo(D_800DCB98)($t7) +/* 04B08C 8004A48C 8DEFCB98 */ lw $t7, %lo(gNumViewports)($t7) /* 04B090 8004A490 24180003 */ li $t8, 3 /* 04B094 8004A494 29E10003 */ slti $at, $t7, 3 /* 04B098 8004A498 10200002 */ beqz $at, .L8004A4A4 @@ -1305,13 +1305,13 @@ glabel func_80049794 /* 04B5C0 8004A9C0 00000000 */ nop /* 04B5C4 8004A9C4 E5C60030 */ swc1 $f6, 0x30($t6) .L8004A9C8: -/* 04B5C8 8004A9C8 3C188012 */ lui $t8, %hi(gCurrentCarInput) # $t8, 0x8012 -/* 04B5CC 8004A9CC 8F18D528 */ lw $t8, %lo(gCurrentCarInput)($t8) +/* 04B5C8 8004A9C8 3C188012 */ lui $t8, %hi(gCurrentRacerInput) # $t8, 0x8012 +/* 04B5CC 8004A9CC 8F18D528 */ lw $t8, %lo(gCurrentRacerInput)($t8) /* 04B5D0 8004A9D0 3C01FFFF */ lui $at, (0xFFFF5FFF >> 16) # lui $at, 0xffff /* 04B5D4 8004A9D4 34215FFF */ ori $at, (0xFFFF5FFF & 0xFFFF) # ori $at, $at, 0x5fff /* 04B5D8 8004A9D8 0301C824 */ and $t9, $t8, $at -/* 04B5DC 8004A9DC 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 -/* 04B5E0 8004A9E0 AC39D528 */ sw $t9, %lo(gCurrentCarInput)($at) +/* 04B5DC 8004A9DC 3C018012 */ lui $at, %hi(gCurrentRacerInput) # $at, 0x8012 +/* 04B5E0 8004A9E0 AC39D528 */ sw $t9, %lo(gCurrentRacerInput)($at) /* 04B5E4 8004A9E4 8FA400F8 */ lw $a0, 0xf8($sp) /* 04B5E8 8004A9E8 820B01DB */ lb $t3, 0x1db($s0) /* 04B5EC 8004A9EC 3C013F80 */ li $at, 0x3F800000 # 1.000000 @@ -1414,7 +1414,7 @@ glabel func_80049794 .L8004AB4C: /* 04B74C 8004AB4C 86230002 */ lh $v1, 2($s1) /* 04B750 8004AB50 820F01D5 */ lb $t7, 0x1d5($s0) -/* 04B754 8004AB54 3C0D8012 */ lui $t5, %hi(gCurrentCarInput) # $t5, 0x8012 +/* 04B754 8004AB54 3C0D8012 */ lui $t5, %hi(gCurrentRacerInput) # $t5, 0x8012 /* 04B758 8004AB58 15E00009 */ bnez $t7, .L8004AB80 /* 04B75C 8004AB5C 00604025 */ move $t0, $v1 /* 04B760 8004AB60 0002C080 */ sll $t8, $v0, 2 @@ -1426,7 +1426,7 @@ glabel func_80049794 /* 04B778 8004AB78 006B6021 */ addu $t4, $v1, $t3 /* 04B77C 8004AB7C A62C0002 */ sh $t4, 2($s1) .L8004AB80: -/* 04B780 8004AB80 8DADD528 */ lw $t5, %lo(gCurrentCarInput)($t5) +/* 04B780 8004AB80 8DADD528 */ lw $t5, %lo(gCurrentRacerInput)($t5) /* 04B784 8004AB84 00000000 */ nop /* 04B788 8004AB88 31AE0010 */ andi $t6, $t5, 0x10 /* 04B78C 8004AB8C 15C00002 */ bnez $t6, .L8004AB98 @@ -1503,11 +1503,11 @@ glabel func_80049794 /* 04B890 8004AC90 142001A6 */ bnez $at, .L8004B32C /* 04B894 8004AC94 00000000 */ nop /* 04B898 8004AC98 862E0002 */ lh $t6, 2($s1) -/* 04B89C 8004AC9C 3C0F8012 */ lui $t7, %hi(gCurrentCarInput) # $t7, 0x8012 +/* 04B89C 8004AC9C 3C0F8012 */ lui $t7, %hi(gCurrentRacerInput) # $t7, 0x8012 /* 04B8A0 8004ACA0 29C1C000 */ slti $at, $t6, -0x4000 /* 04B8A4 8004ACA4 102001A1 */ beqz $at, .L8004B32C /* 04B8A8 8004ACA8 00000000 */ nop -/* 04B8AC 8004ACAC 8DEFD528 */ lw $t7, %lo(gCurrentCarInput)($t7) +/* 04B8AC 8004ACAC 8DEFD528 */ lw $t7, %lo(gCurrentRacerInput)($t7) /* 04B8B0 8004ACB0 2419003C */ li $t9, 60 /* 04B8B4 8004ACB4 31F80010 */ andi $t8, $t7, 0x10 /* 04B8B8 8004ACB8 1300019C */ beqz $t8, .L8004B32C @@ -1550,11 +1550,11 @@ glabel func_80049794 /* 04B93C 8004AD3C 1020017B */ beqz $at, .L8004B32C /* 04B940 8004AD40 00000000 */ nop /* 04B944 8004AD44 86390002 */ lh $t9, 2($s1) -/* 04B948 8004AD48 3C0B8012 */ lui $t3, %hi(gCurrentCarInput) # $t3, 0x8012 +/* 04B948 8004AD48 3C0B8012 */ lui $t3, %hi(gCurrentRacerInput) # $t3, 0x8012 /* 04B94C 8004AD4C 2B214001 */ slti $at, $t9, 0x4001 /* 04B950 8004AD50 14200176 */ bnez $at, .L8004B32C /* 04B954 8004AD54 00000000 */ nop -/* 04B958 8004AD58 8D6BD528 */ lw $t3, %lo(gCurrentCarInput)($t3) +/* 04B958 8004AD58 8D6BD528 */ lw $t3, %lo(gCurrentRacerInput)($t3) /* 04B95C 8004AD5C 240D003C */ li $t5, 60 /* 04B960 8004AD60 316C0010 */ andi $t4, $t3, 0x10 /* 04B964 8004AD64 11800171 */ beqz $t4, .L8004B32C @@ -1565,18 +1565,18 @@ glabel func_80049794 /* 04B974 8004AD74 820401E1 */ lb $a0, 0x1e1($s0) /* 04B978 8004AD78 A3A000A1 */ sb $zero, 0xa1($sp) /* 04B97C 8004AD7C 820301E2 */ lb $v1, 0x1e2($s0) -/* 04B980 8004AD80 3C028012 */ lui $v0, %hi(gCurrentCarInput) # $v0, 0x8012 +/* 04B980 8004AD80 3C028012 */ lui $v0, %hi(gCurrentRacerInput) # $v0, 0x8012 /* 04B984 8004AD84 1060000B */ beqz $v1, .L8004ADB4 /* 04B988 8004AD88 2401FFEF */ li $at, -17 -/* 04B98C 8004AD8C 8C42D528 */ lw $v0, %lo(gCurrentCarInput)($v0) +/* 04B98C 8004AD8C 8C42D528 */ lw $v0, %lo(gCurrentRacerInput)($v0) /* 04B990 8004AD90 240F0001 */ li $t7, 1 /* 04B994 8004AD94 304E0010 */ andi $t6, $v0, 0x10 /* 04B998 8004AD98 11C00002 */ beqz $t6, .L8004ADA4 /* 04B99C 8004AD9C 0041C024 */ and $t8, $v0, $at /* 04B9A0 8004ADA0 A3AF00A1 */ sb $t7, 0xa1($sp) .L8004ADA4: -/* 04B9A4 8004ADA4 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 -/* 04B9A8 8004ADA8 AC38D528 */ sw $t8, %lo(gCurrentCarInput)($at) +/* 04B9A4 8004ADA4 3C018012 */ lui $at, %hi(gCurrentRacerInput) # $at, 0x8012 +/* 04B9A8 8004ADA8 AC38D528 */ sw $t8, %lo(gCurrentRacerInput)($at) /* 04B9AC 8004ADAC 820301E2 */ lb $v1, 0x1e2($s0) /* 04B9B0 8004ADB0 00000000 */ nop .L8004ADB4: @@ -1613,8 +1613,8 @@ glabel func_80049794 /* 04BA24 8004AE24 46085183 */ div.s $f6, $f10, $f8 /* 04BA28 8004AE28 44812800 */ mtc1 $at, $f5 /* 04BA2C 8004AE2C 44802000 */ mtc1 $zero, $f4 -/* 04BA30 8004AE30 3C0B8012 */ lui $t3, %hi(gCurrentCarInput) # $t3, 0x8012 -/* 04BA34 8004AE34 8D6BD528 */ lw $t3, %lo(gCurrentCarInput)($t3) +/* 04BA30 8004AE30 3C0B8012 */ lui $t3, %hi(gCurrentRacerInput) # $t3, 0x8012 +/* 04BA34 8004AE34 8D6BD528 */ lw $t3, %lo(gCurrentRacerInput)($t3) /* 04BA38 8004AE38 00000000 */ nop /* 04BA3C 8004AE3C 316C0010 */ andi $t4, $t3, 0x10 /* 04BA40 8004AE40 460034A1 */ cvt.d.s $f18, $f6 @@ -1660,22 +1660,22 @@ glabel func_80049794 /* 04BADC 8004AEDC 8FAD00F8 */ lw $t5, 0xf8($sp) /* 04BAE0 8004AEE0 920E01F5 */ lbu $t6, 0x1f5($s0) /* 04BAE4 8004AEE4 006D0019 */ multu $v1, $t5 -/* 04BAE8 8004AEE8 3C0C8012 */ lui $t4, %hi(D_8011D55C) # $t4, 0x8012 +/* 04BAE8 8004AEE8 3C0C8012 */ lui $t4, %hi(gCurrentPlayerIndex) # $t4, 0x8012 /* 04BAEC 8004AEEC 00007812 */ mflo $t7 /* 04BAF0 8004AEF0 000FC103 */ sra $t8, $t7, 4 /* 04BAF4 8004AEF4 0078C823 */ subu $t9, $v1, $t8 /* 04BAF8 8004AEF8 15C00056 */ bnez $t6, .L8004B054 /* 04BAFC 8004AEFC A61901A4 */ sh $t9, 0x1a4($s0) -/* 04BB00 8004AF00 8D8CD55C */ lw $t4, %lo(D_8011D55C)($t4) +/* 04BB00 8004AF00 8D8CD55C */ lw $t4, %lo(gCurrentPlayerIndex)($t4) /* 04BB04 8004AF04 2401FFFF */ li $at, -1 /* 04BB08 8004AF08 11810025 */ beq $t4, $at, .L8004AFA0 /* 04BB0C 8004AF0C 3C088012 */ lui $t0, %hi(gCurrentStickX) # $t0, 0x8012 /* 04BB10 8004AF10 820B01D8 */ lb $t3, 0x1d8($s0) -/* 04BB14 8004AF14 3C028012 */ lui $v0, %hi(gCurrentCarInput) # $v0, 0x8012 +/* 04BB14 8004AF14 3C028012 */ lui $v0, %hi(gCurrentRacerInput) # $v0, 0x8012 /* 04BB18 8004AF18 15600021 */ bnez $t3, .L8004AFA0 /* 04BB1C 8004AF1C 00000000 */ nop /* 04BB20 8004AF20 860801A4 */ lh $t0, 0x1a4($s0) -/* 04BB24 8004AF24 8C42D528 */ lw $v0, %lo(gCurrentCarInput)($v0) +/* 04BB24 8004AF24 8C42D528 */ lw $v0, %lo(gCurrentRacerInput)($v0) /* 04BB28 8004AF28 00084023 */ negu $t0, $t0 /* 04BB2C 8004AF2C 00086983 */ sra $t5, $t0, 6 /* 04BB30 8004AF30 304F0010 */ andi $t7, $v0, 0x10 @@ -1737,12 +1737,12 @@ glabel func_80049794 /* 04BC00 8004B000 00411021 */ addu $v0, $v0, $at .L8004B004: /* 04BC04 8004B004 00580019 */ multu $v0, $t8 -/* 04BC08 8004B008 3C0E8012 */ lui $t6, %hi(gCurrentCarInput) # $t6, 0x8012 +/* 04BC08 8004B008 3C0E8012 */ lui $t6, %hi(gCurrentRacerInput) # $t6, 0x8012 /* 04BC0C 8004B00C 0000C812 */ mflo $t9 /* 04BC10 8004B010 00195903 */ sra $t3, $t9, 4 /* 04BC14 8004B014 006B6821 */ addu $t5, $v1, $t3 /* 04BC18 8004B018 A60D01A4 */ sh $t5, 0x1a4($s0) -/* 04BC1C 8004B01C 8DCED528 */ lw $t6, %lo(gCurrentCarInput)($t6) +/* 04BC1C 8004B01C 8DCED528 */ lw $t6, %lo(gCurrentRacerInput)($t6) /* 04BC20 8004B020 8FB800F8 */ lw $t8, 0xf8($sp) /* 04BC24 8004B024 31CC0010 */ andi $t4, $t6, 0x10 /* 04BC28 8004B028 11800005 */ beqz $t4, .L8004B040 @@ -1758,9 +1758,9 @@ glabel func_80049794 /* 04BC4C 8004B04C 01EB6823 */ subu $t5, $t7, $t3 /* 04BC50 8004B050 A60D01A0 */ sh $t5, 0x1a0($s0) .L8004B054: -/* 04BC54 8004B054 3C028012 */ lui $v0, %hi(gCurrentCarInput) # $v0, 0x8012 -/* 04BC58 8004B058 8C42D528 */ lw $v0, %lo(gCurrentCarInput)($v0) -/* 04BC5C 8004B05C 3C0F8012 */ lui $t7, %hi(D_8011D55C) # $t7, 0x8012 +/* 04BC54 8004B054 3C028012 */ lui $v0, %hi(gCurrentRacerInput) # $v0, 0x8012 +/* 04BC58 8004B058 8C42D528 */ lw $v0, %lo(gCurrentRacerInput)($v0) +/* 04BC5C 8004B05C 3C0F8012 */ lui $t7, %hi(gCurrentPlayerIndex) # $t7, 0x8012 /* 04BC60 8004B060 304E0010 */ andi $t6, $v0, 0x10 /* 04BC64 8004B064 11C00009 */ beqz $t6, .L8004B08C /* 04BC68 8004B068 01C01025 */ move $v0, $t6 @@ -1781,7 +1781,7 @@ glabel func_80049794 /* 04BCA0 8004B0A0 46083482 */ mul.s $f18, $f6, $f8 /* 04BCA4 8004B0A4 C4246514 */ lwc1 $f4, %lo(D_800E6510 + 4)($at) /* 04BCA8 8004B0A8 C628001C */ lwc1 $f8, 0x1c($s1) -/* 04BCAC 8004B0AC 3C028012 */ lui $v0, %hi(gCurrentCarInput) # $v0, 0x8012 +/* 04BCAC 8004B0AC 3C028012 */ lui $v0, %hi(gCurrentRacerInput) # $v0, 0x8012 /* 04BCB0 8004B0B0 460092A1 */ cvt.d.s $f10, $f18 /* 04BCB4 8004B0B4 46245182 */ mul.d $f6, $f10, $f4 /* 04BCB8 8004B0B8 C6120050 */ lwc1 $f18, 0x50($s0) @@ -1800,12 +1800,12 @@ glabel func_80049794 /* 04BCEC 8004B0EC 46149182 */ mul.s $f6, $f18, $f20 /* 04BCF0 8004B0F0 46062201 */ sub.s $f8, $f4, $f6 /* 04BCF4 8004B0F4 E6280024 */ swc1 $f8, 0x24($s1) -/* 04BCF8 8004B0F8 8C42D528 */ lw $v0, %lo(gCurrentCarInput)($v0) +/* 04BCF8 8004B0F8 8C42D528 */ lw $v0, %lo(gCurrentRacerInput)($v0) /* 04BCFC 8004B0FC 00000000 */ nop /* 04BD00 8004B100 30590010 */ andi $t9, $v0, 0x10 /* 04BD04 8004B104 03201025 */ move $v0, $t9 .L8004B108: -/* 04BD08 8004B108 8DEFD55C */ lw $t7, %lo(D_8011D55C)($t7) +/* 04BD08 8004B108 8DEFD55C */ lw $t7, %lo(gCurrentPlayerIndex)($t7) /* 04BD0C 8004B10C 3C088012 */ lui $t0, %hi(gCurrentStickY) # $t0, 0x8012 /* 04BD10 8004B110 8D08D538 */ lw $t0, %lo(gCurrentStickY)($t0) /* 04BD14 8004B114 2401FFFF */ li $at, -1 @@ -1952,8 +1952,8 @@ glabel func_80049794 /* 04BF24 8004B324 A20001D4 */ sb $zero, 0x1d4($s0) /* 04BF28 8004B328 A20001D5 */ sb $zero, 0x1d5($s0) .L8004B32C: -/* 04BF2C 8004B32C 3C0C8012 */ lui $t4, %hi(D_8011D55C) # $t4, 0x8012 -/* 04BF30 8004B330 8D8CD55C */ lw $t4, %lo(D_8011D55C)($t4) +/* 04BF2C 8004B32C 3C0C8012 */ lui $t4, %hi(gCurrentPlayerIndex) # $t4, 0x8012 +/* 04BF30 8004B330 8D8CD55C */ lw $t4, %lo(gCurrentPlayerIndex)($t4) /* 04BF34 8004B334 2401FFFF */ li $at, -1 /* 04BF38 8004B338 1181000F */ beq $t4, $at, .L8004B378 /* 04BF3C 8004B33C 02202025 */ move $a0, $s1 @@ -2038,7 +2038,7 @@ glabel func_80049794 /* 04C064 8004B464 460E0002 */ mul.s $f0, $f0, $f14 /* 04C068 8004B468 C62A001C */ lwc1 $f10, 0x1c($s1) /* 04C06C 8004B46C C6280020 */ lwc1 $f8, 0x20($s1) -/* 04C070 8004B470 3C188012 */ lui $t8, %hi(gCurrentCarInput) # $t8, 0x8012 +/* 04C070 8004B470 3C188012 */ lui $t8, %hi(gCurrentRacerInput) # $t8, 0x8012 /* 04C074 8004B474 46009102 */ mul.s $f4, $f18, $f0 /* 04C078 8004B478 46045181 */ sub.s $f6, $f10, $f4 /* 04C07C 8004B47C E626001C */ swc1 $f6, 0x1c($s1) @@ -2116,7 +2116,7 @@ glabel func_80049794 /* 04C18C 8004B58C C7A600D8 */ lwc1 $f6, 0xd8($sp) /* 04C190 8004B590 4500000D */ bc1f .L8004B5C8 /* 04C194 8004B594 00000000 */ nop -/* 04C198 8004B598 8F18D528 */ lw $t8, %lo(gCurrentCarInput)($t8) +/* 04C198 8004B598 8F18D528 */ lw $t8, %lo(gCurrentRacerInput)($t8) /* 04C19C 8004B59C C7A800D8 */ lwc1 $f8, 0xd8($sp) /* 04C1A0 8004B5A0 330C8000 */ andi $t4, $t8, 0x8000 /* 04C1A4 8004B5A4 15800008 */ bnez $t4, .L8004B5C8 @@ -2453,15 +2453,15 @@ glabel func_80049794 /* 04C684 8004BA84 00000000 */ nop /* 04C688 8004BA88 C7AC00EC */ lwc1 $f12, 0xec($sp) /* 04C68C 8004BA8C 10400006 */ beqz $v0, .L8004BAA8 -/* 04C690 8004BA90 3C0C8012 */ lui $t4, %hi(D_8011D55C) # $t4, 0x8012 -/* 04C694 8004BA94 8D8CD55C */ lw $t4, %lo(D_8011D55C)($t4) +/* 04C690 8004BA90 3C0C8012 */ lui $t4, %hi(gCurrentPlayerIndex) # $t4, 0x8012 +/* 04C694 8004BA94 8D8CD55C */ lw $t4, %lo(gCurrentPlayerIndex)($t4) /* 04C698 8004BA98 2401FFFF */ li $at, -1 /* 04C69C 8004BA9C 11810002 */ beq $t4, $at, .L8004BAA8 /* 04C6A0 8004BAA0 24190001 */ li $t9, 1 /* 04C6A4 8004BAA4 A3B9005F */ sb $t9, 0x5f($sp) .L8004BAA8: -/* 04C6A8 8004BAA8 3C028012 */ lui $v0, %hi(D_8011D55C) # $v0, 0x8012 -/* 04C6AC 8004BAAC 8C42D55C */ lw $v0, %lo(D_8011D55C)($v0) +/* 04C6A8 8004BAA8 3C028012 */ lui $v0, %hi(gCurrentPlayerIndex) # $v0, 0x8012 +/* 04C6AC 8004BAAC 8C42D55C */ lw $v0, %lo(gCurrentPlayerIndex)($v0) /* 04C6B0 8004BAB0 1000000B */ b .L8004BAE0 /* 04C6B4 8004BAB4 820801E2 */ lb $t0, 0x1e2($s0) /* 04C6B8 8004BAB8 8FA600FC */ lw $a2, 0xfc($sp) @@ -2470,8 +2470,8 @@ glabel func_80049794 /* 04C6C0 8004BAC0 02002825 */ move $a1, $s0 /* 04C6C4 8004BAC4 0C0141D5 */ jal func_80050754 /* 04C6C8 8004BAC8 E7AC00EC */ swc1 $f12, 0xec($sp) -/* 04C6CC 8004BACC 3C028012 */ lui $v0, %hi(D_8011D55C) # $v0, 0x8012 -/* 04C6D0 8004BAD0 8C42D55C */ lw $v0, %lo(D_8011D55C)($v0) +/* 04C6CC 8004BACC 3C028012 */ lui $v0, %hi(gCurrentPlayerIndex) # $v0, 0x8012 +/* 04C6D0 8004BAD0 8C42D55C */ lw $v0, %lo(gCurrentPlayerIndex)($v0) /* 04C6D4 8004BAD4 C7AC00EC */ lwc1 $f12, 0xec($sp) /* 04C6D8 8004BAD8 00000000 */ nop /* 04C6DC 8004BADC 820801E2 */ lb $t0, 0x1e2($s0) @@ -2745,16 +2745,16 @@ glabel func_80049794 /* 04CAC0 8004BEC0 35ED4000 */ ori $t5, $t7, 0x4000 /* 04CAC4 8004BEC4 A44D0006 */ sh $t5, 6($v0) .L8004BEC8: -/* 04CAC8 8004BEC8 3C0B8012 */ lui $t3, %hi(D_8011D55C) # $t3, 0x8012 -/* 04CACC 8004BECC 8D6BD55C */ lw $t3, %lo(D_8011D55C)($t3) +/* 04CAC8 8004BEC8 3C0B8012 */ lui $t3, %hi(gCurrentPlayerIndex) # $t3, 0x8012 +/* 04CACC 8004BECC 8D6BD55C */ lw $t3, %lo(gCurrentPlayerIndex)($t3) /* 04CAD0 8004BED0 2401FFFF */ li $at, -1 /* 04CAD4 8004BED4 11610046 */ beq $t3, $at, .L8004BFF0 /* 04CAD8 8004BED8 00000000 */ nop /* 04CADC 8004BEDC 820E01D3 */ lb $t6, 0x1d3($s0) -/* 04CAE0 8004BEE0 3C18800E */ lui $t8, %hi(D_800DCB98) # $t8, 0x800e +/* 04CAE0 8004BEE0 3C18800E */ lui $t8, %hi(gNumViewports) # $t8, 0x800e /* 04CAE4 8004BEE4 15C00042 */ bnez $t6, .L8004BFF0 /* 04CAE8 8004BEE8 00000000 */ nop -/* 04CAEC 8004BEEC 8F18CB98 */ lw $t8, %lo(D_800DCB98)($t8) +/* 04CAEC 8004BEEC 8F18CB98 */ lw $t8, %lo(gNumViewports)($t8) /* 04CAF0 8004BEF0 00000000 */ nop /* 04CAF4 8004BEF4 2B010002 */ slti $at, $t8, 2 /* 04CAF8 8004BEF8 1020003D */ beqz $at, .L8004BFF0 @@ -2823,8 +2823,8 @@ glabel func_80049794 /* 04CBE8 8004BFE8 01D96825 */ or $t5, $t6, $t9 /* 04CBEC 8004BFEC AE2D0074 */ sw $t5, 0x74($s1) .L8004BFF0: -/* 04CBF0 8004BFF0 3C0F8012 */ lui $t7, %hi(D_8011D55C) # $t7, 0x8012 -/* 04CBF4 8004BFF4 8DEFD55C */ lw $t7, %lo(D_8011D55C)($t7) +/* 04CBF0 8004BFF0 3C0F8012 */ lui $t7, %hi(gCurrentPlayerIndex) # $t7, 0x8012 +/* 04CBF4 8004BFF4 8DEFD55C */ lw $t7, %lo(gCurrentPlayerIndex)($t7) /* 04CBF8 8004BFF8 2401FFFF */ li $at, -1 /* 04CBFC 8004BFFC 15E10002 */ bne $t7, $at, .L8004C008 /* 04CC00 8004C000 00000000 */ nop @@ -2848,8 +2848,8 @@ glabel func_80049794 /* 04CC3C 8004C03C 02202025 */ move $a0, $s1 /* 04CC40 8004C040 11800007 */ beqz $t4, .L8004C060 /* 04CC44 8004C044 02002825 */ move $a1, $s0 -/* 04CC48 8004C048 3C028012 */ lui $v0, %hi(gCurrentCarInput) # $v0, 0x8012 -/* 04CC4C 8004C04C 2442D528 */ addiu $v0, %lo(gCurrentCarInput) # addiu $v0, $v0, -0x2ad8 +/* 04CC48 8004C048 3C028012 */ lui $v0, %hi(gCurrentRacerInput) # $v0, 0x8012 +/* 04CC4C 8004C04C 2442D528 */ addiu $v0, %lo(gCurrentRacerInput) # addiu $v0, $v0, -0x2ad8 /* 04CC50 8004C050 8C4E0000 */ lw $t6, ($v0) /* 04CC54 8004C054 00000000 */ nop /* 04CC58 8004C058 35D90010 */ ori $t9, $t6, 0x10 diff --git a/asm/non_matchings/racer/func_8004CC20.s b/asm/non_matchings/racer/func_8004CC20.s index f05c9057..3ebbf811 100644 --- a/asm/non_matchings/racer/func_8004CC20.s +++ b/asm/non_matchings/racer/func_8004CC20.s @@ -139,8 +139,8 @@ glabel func_8004CC20 /* 04D9F4 8004CDF4 0C01BD93 */ jal guMtxXFMF /* 04D9F8 8004CDF8 3C063F80 */ lui $a2, 0x3f80 /* 04D9FC 8004CDFC 340E8000 */ li $t6, 32768 -/* 04DA00 8004CE00 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 -/* 04DA04 8004CE04 AC2ED528 */ sw $t6, %lo(gCurrentCarInput)($at) +/* 04DA00 8004CE00 3C018012 */ lui $at, %hi(gCurrentRacerInput) # $at, 0x8012 +/* 04DA04 8004CE04 AC2ED528 */ sw $t6, %lo(gCurrentRacerInput)($at) /* 04DA08 8004CE08 02202025 */ move $a0, $s1 /* 04DA0C 8004CE0C 0C014D71 */ jal func_800535C4 /* 04DA10 8004CE10 02002825 */ move $a1, $s0 @@ -274,8 +274,8 @@ glabel func_8004CC20 /* 04DBEC 8004CFEC 46122003 */ div.s $f0, $f4, $f18 /* 04DBF0 8004CFF0 C626001C */ lwc1 $f6, 0x1c($s1) /* 04DBF4 8004CFF4 C6240020 */ lwc1 $f4, 0x20($s1) -/* 04DBF8 8004CFF8 3C098012 */ lui $t1, %hi(D_8011D55C) # $t1, 0x8012 -/* 04DBFC 8004CFFC 2529D55C */ addiu $t1, %lo(D_8011D55C) # addiu $t1, $t1, -0x2aa4 +/* 04DBF8 8004CFF8 3C098012 */ lui $t1, %hi(gCurrentPlayerIndex) # $t1, 0x8012 +/* 04DBFC 8004CFFC 2529D55C */ addiu $t1, %lo(gCurrentPlayerIndex) # addiu $t1, $t1, -0x2aa4 /* 04DC00 8004D000 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 04DC04 8004D004 44811000 */ mtc1 $at, $f2 /* 04DC08 8004D008 46004402 */ mul.s $f16, $f8, $f0 @@ -537,8 +537,8 @@ glabel func_8004CC20 /* 04DFDC 8004D3DC 44078000 */ mfc1 $a3, $f16 /* 04DFE0 8004D3E0 0C00455C */ jal func_80011570 /* 04DFE4 8004D3E4 00000000 */ nop -/* 04DFE8 8004D3E8 3C098012 */ lui $t1, %hi(D_8011D55C) # $t1, 0x8012 -/* 04DFEC 8004D3EC 2529D55C */ addiu $t1, %lo(D_8011D55C) # addiu $t1, $t1, -0x2aa4 +/* 04DFE8 8004D3E8 3C098012 */ lui $t1, %hi(gCurrentPlayerIndex) # $t1, 0x8012 +/* 04DFEC 8004D3EC 2529D55C */ addiu $t1, %lo(gCurrentPlayerIndex) # addiu $t1, $t1, -0x2aa4 /* 04DFF0 8004D3F0 10400006 */ beqz $v0, .L8004D40C /* 04DFF4 8004D3F4 2408FFFF */ li $t0, -1 /* 04DFF8 8004D3F8 8D2B0000 */ lw $t3, ($t1) diff --git a/asm/non_matchings/racer/func_8004DE38.s b/asm/non_matchings/racer/func_8004DE38.s deleted file mode 100644 index 7caa8a0e..00000000 --- a/asm/non_matchings/racer/func_8004DE38.s +++ /dev/null @@ -1,1785 +0,0 @@ -.late_rodata -glabel D_800E6590 -.double 1.2 -glabel D_800E6598 -.double 0.45 -glabel D_800E65A0 -.float -0.02 -glabel D_800E65A4 -.float 0.87 -glabel D_800E65A8 -.float 0.9 -glabel D_800E65AC -.float -10000.0 -glabel jpt_800E65B0 -.word L8004EB84, L8004EBBC, L8004EBD8, L8004EBF4, L8004EBA0, L8004EC10, L8004EC50, L8004EC90, L8004EC90, L8004ED88, L8004EBF4, L8004ECD0, L8004ED10, L8004ED50 -glabel D_800E65E8 -.float 1.12 -glabel D_800E65EC -.float 0.02 -glabel D_800E65F0 -.float -0.02 -glabel D_800E65F4 -.float 265.0 -glabel D_800E65F8 -.double 1500.0 - -.text -glabel func_8004DE38 -/* 04EA38 8004DE38 27BDFF50 */ addiu $sp, $sp, -0xb0 -/* 04EA3C 8004DE3C AFBF002C */ sw $ra, 0x2c($sp) -/* 04EA40 8004DE40 AFB10028 */ sw $s1, 0x28($sp) -/* 04EA44 8004DE44 00808825 */ move $s1, $a0 -/* 04EA48 8004DE48 AFB00024 */ sw $s0, 0x24($sp) -/* 04EA4C 8004DE4C 0C019884 */ jal get_viewport_count -/* 04EA50 8004DE50 AFA500B4 */ sw $a1, 0xb4($sp) -/* 04EA54 8004DE54 244E0001 */ addiu $t6, $v0, 1 -/* 04EA58 8004DE58 3C01800E */ lui $at, %hi(D_800DCB98) # $at, 0x800e -/* 04EA5C 8004DE5C AC2ECB98 */ sw $t6, %lo(D_800DCB98)($at) -/* 04EA60 8004DE60 3C018012 */ lui $at, %hi(D_8011D581) # $at, 0x8012 -/* 04EA64 8004DE64 0C0044E7 */ jal func_8001139C -/* 04EA68 8004DE68 A020D581 */ sb $zero, %lo(D_8011D581)($at) -/* 04EA6C 8004DE6C 3C014049 */ li $at, 0x40490000 # 3.140625 -/* 04EA70 8004DE70 44811800 */ mtc1 $at, $f3 -/* 04EA74 8004DE74 3C018012 */ lui $at, %hi(gRaceStartTimer) # $at, 0x8012 -/* 04EA78 8004DE78 8FA300B4 */ lw $v1, 0xb4($sp) -/* 04EA7C 8004DE7C AC22D540 */ sw $v0, %lo(gRaceStartTimer)($at) -/* 04EA80 8004DE80 C626001C */ lwc1 $f6, 0x1c($s1) -/* 04EA84 8004DE84 44801000 */ mtc1 $zero, $f2 -/* 04EA88 8004DE88 44832000 */ mtc1 $v1, $f4 -/* 04EA8C 8004DE8C 46003221 */ cvt.d.s $f8, $f6 -/* 04EA90 8004DE90 46802420 */ cvt.s.w $f16, $f4 -/* 04EA94 8004DE94 8E300064 */ lw $s0, 0x64($s1) -/* 04EA98 8004DE98 44800000 */ mtc1 $zero, $f0 -/* 04EA9C 8004DE9C 4628103C */ c.lt.d $f2, $f8 -/* 04EAA0 8004DEA0 46008486 */ mov.s $f18, $f16 -/* 04EAA4 8004DEA4 45000004 */ bc1f .L8004DEB8 -/* 04EAA8 8004DEA8 3C014248 */ li $at, 0x42480000 # 50.000000 -/* 04EAAC 8004DEAC 44817000 */ mtc1 $at, $f14 -/* 04EAB0 8004DEB0 00000000 */ nop -/* 04EAB4 8004DEB4 E62E001C */ swc1 $f14, 0x1c($s1) -.L8004DEB8: -/* 04EAB8 8004DEB8 C62A0020 */ lwc1 $f10, 0x20($s1) -/* 04EABC 8004DEBC 3C014248 */ li $at, 0x42480000 # 50.000000 -/* 04EAC0 8004DEC0 46005121 */ cvt.d.s $f4, $f10 -/* 04EAC4 8004DEC4 4624103C */ c.lt.d $f2, $f4 -/* 04EAC8 8004DEC8 44817000 */ mtc1 $at, $f14 -/* 04EACC 8004DECC 45000002 */ bc1f .L8004DED8 -/* 04EAD0 8004DED0 3C01C049 */ li $at, 0xC0490000 # -3.140625 -/* 04EAD4 8004DED4 E62E0020 */ swc1 $f14, 0x20($s1) -.L8004DED8: -/* 04EAD8 8004DED8 C6260024 */ lwc1 $f6, 0x24($s1) -/* 04EADC 8004DEDC 3C188000 */ lui $t8, %hi(osTvType) # $t8, 0x8000 -/* 04EAE0 8004DEE0 46003221 */ cvt.d.s $f8, $f6 -/* 04EAE4 8004DEE4 4628103C */ c.lt.d $f2, $f8 -/* 04EAE8 8004DEE8 00000000 */ nop -/* 04EAEC 8004DEEC 45000002 */ bc1f .L8004DEF8 -/* 04EAF0 8004DEF0 00000000 */ nop -/* 04EAF4 8004DEF4 E62E0024 */ swc1 $f14, 0x24($s1) -.L8004DEF8: -/* 04EAF8 8004DEF8 C62A001C */ lwc1 $f10, 0x1c($s1) -/* 04EAFC 8004DEFC 44810800 */ mtc1 $at, $f1 -/* 04EB00 8004DF00 46005121 */ cvt.d.s $f4, $f10 -/* 04EB04 8004DF04 4620203C */ c.lt.d $f4, $f0 -/* 04EB08 8004DF08 00000000 */ nop -/* 04EB0C 8004DF0C 45000004 */ bc1f .L8004DF20 -/* 04EB10 8004DF10 3C01C248 */ li $at, 0xC2480000 # -50.000000 -/* 04EB14 8004DF14 44816000 */ mtc1 $at, $f12 -/* 04EB18 8004DF18 00000000 */ nop -/* 04EB1C 8004DF1C E62C001C */ swc1 $f12, 0x1c($s1) -.L8004DF20: -/* 04EB20 8004DF20 C6260020 */ lwc1 $f6, 0x20($s1) -/* 04EB24 8004DF24 3C01C248 */ li $at, 0xC2480000 # -50.000000 -/* 04EB28 8004DF28 46003221 */ cvt.d.s $f8, $f6 -/* 04EB2C 8004DF2C 4620403C */ c.lt.d $f8, $f0 -/* 04EB30 8004DF30 44816000 */ mtc1 $at, $f12 -/* 04EB34 8004DF34 45000002 */ bc1f .L8004DF40 -/* 04EB38 8004DF38 3C01BFF0 */ li $at, 0xBFF00000 # -1.875000 -/* 04EB3C 8004DF3C E62C0020 */ swc1 $f12, 0x20($s1) -.L8004DF40: -/* 04EB40 8004DF40 C62A0024 */ lwc1 $f10, 0x24($s1) -/* 04EB44 8004DF44 00000000 */ nop -/* 04EB48 8004DF48 46005121 */ cvt.d.s $f4, $f10 -/* 04EB4C 8004DF4C 4620203C */ c.lt.d $f4, $f0 -/* 04EB50 8004DF50 00000000 */ nop -/* 04EB54 8004DF54 45000002 */ bc1f .L8004DF60 -/* 04EB58 8004DF58 00000000 */ nop -/* 04EB5C 8004DF5C E62C0024 */ swc1 $f12, 0x24($s1) -.L8004DF60: -/* 04EB60 8004DF60 C606002C */ lwc1 $f6, 0x2c($s0) -/* 04EB64 8004DF64 00000000 */ nop -/* 04EB68 8004DF68 46003221 */ cvt.d.s $f8, $f6 -/* 04EB6C 8004DF6C 4628103C */ c.lt.d $f2, $f8 -/* 04EB70 8004DF70 00000000 */ nop -/* 04EB74 8004DF74 45000002 */ bc1f .L8004DF80 -/* 04EB78 8004DF78 00000000 */ nop -/* 04EB7C 8004DF7C E60E002C */ swc1 $f14, 0x2c($s0) -.L8004DF80: -/* 04EB80 8004DF80 C60A0030 */ lwc1 $f10, 0x30($s0) -/* 04EB84 8004DF84 00000000 */ nop -/* 04EB88 8004DF88 46005121 */ cvt.d.s $f4, $f10 -/* 04EB8C 8004DF8C 4624103C */ c.lt.d $f2, $f4 -/* 04EB90 8004DF90 00000000 */ nop -/* 04EB94 8004DF94 45000002 */ bc1f .L8004DFA0 -/* 04EB98 8004DF98 00000000 */ nop -/* 04EB9C 8004DF9C E60E0030 */ swc1 $f14, 0x30($s0) -.L8004DFA0: -/* 04EBA0 8004DFA0 C606002C */ lwc1 $f6, 0x2c($s0) -/* 04EBA4 8004DFA4 00000000 */ nop -/* 04EBA8 8004DFA8 46003221 */ cvt.d.s $f8, $f6 -/* 04EBAC 8004DFAC 4620403C */ c.lt.d $f8, $f0 -/* 04EBB0 8004DFB0 44814800 */ mtc1 $at, $f9 -/* 04EBB4 8004DFB4 45000002 */ bc1f .L8004DFC0 -/* 04EBB8 8004DFB8 00000000 */ nop -/* 04EBBC 8004DFBC E60C002C */ swc1 $f12, 0x2c($s0) -.L8004DFC0: -/* 04EBC0 8004DFC0 C60A0030 */ lwc1 $f10, 0x30($s0) -/* 04EBC4 8004DFC4 3C01BF80 */ li $at, 0xBF800000 # -1.000000 -/* 04EBC8 8004DFC8 46005121 */ cvt.d.s $f4, $f10 -/* 04EBCC 8004DFCC 4620203C */ c.lt.d $f4, $f0 -/* 04EBD0 8004DFD0 00000000 */ nop -/* 04EBD4 8004DFD4 45000002 */ bc1f .L8004DFE0 -/* 04EBD8 8004DFD8 00000000 */ nop -/* 04EBDC 8004DFDC E60C0030 */ swc1 $f12, 0x30($s0) -.L8004DFE0: -/* 04EBE0 8004DFE0 C60600A8 */ lwc1 $f6, 0xa8($s0) -/* 04EBE4 8004DFE4 44804000 */ mtc1 $zero, $f8 -/* 04EBE8 8004DFE8 46003021 */ cvt.d.s $f0, $f6 -/* 04EBEC 8004DFEC 4628003C */ c.lt.d $f0, $f8 -/* 04EBF0 8004DFF0 44803000 */ mtc1 $zero, $f6 -/* 04EBF4 8004DFF4 45000007 */ bc1f .L8004E014 -/* 04EBF8 8004DFF8 00000000 */ nop -/* 04EBFC 8004DFFC 44815000 */ mtc1 $at, $f10 -/* 04EC00 8004E000 00000000 */ nop -/* 04EC04 8004E004 E60A00A8 */ swc1 $f10, 0xa8($s0) -/* 04EC08 8004E008 C60400A8 */ lwc1 $f4, 0xa8($s0) -/* 04EC0C 8004E00C 00000000 */ nop -/* 04EC10 8004E010 46002021 */ cvt.d.s $f0, $f4 -.L8004E014: -/* 04EC14 8004E014 3C014000 */ li $at, 0x40000000 # 2.000000 -/* 04EC18 8004E018 44813800 */ mtc1 $at, $f7 -/* 04EC1C 8004E01C 3C014000 */ li $at, 0x40000000 # 2.000000 -/* 04EC20 8004E020 4620303C */ c.lt.d $f6, $f0 -/* 04EC24 8004E024 00000000 */ nop -/* 04EC28 8004E028 45000004 */ bc1f .L8004E03C -/* 04EC2C 8004E02C 00000000 */ nop -/* 04EC30 8004E030 44814000 */ mtc1 $at, $f8 -/* 04EC34 8004E034 00000000 */ nop -/* 04EC38 8004E038 E60800A8 */ swc1 $f8, 0xa8($s0) -.L8004E03C: -/* 04EC3C 8004E03C 920F01FE */ lbu $t7, 0x1fe($s0) -/* 04EC40 8004E040 24010001 */ li $at, 1 -/* 04EC44 8004E044 15E10002 */ bne $t7, $at, .L8004E050 -/* 04EC48 8004E048 00000000 */ nop -/* 04EC4C 8004E04C A20001F1 */ sb $zero, 0x1f1($s0) -.L8004E050: -/* 04EC50 8004E050 8F180300 */ lw $t8, %lo(osTvType)($t8) -/* 04EC54 8004E054 3C01800E */ lui $at, %hi(D_800E6590 + 4) # $at, 0x800e -/* 04EC58 8004E058 17000006 */ bnez $t8, .L8004E074 -/* 04EC5C 8004E05C 00000000 */ nop -/* 04EC60 8004E060 C4256590 */ lwc1 $f5, %lo(D_800E6590)($at) -/* 04EC64 8004E064 C4246594 */ lwc1 $f4, %lo(D_800E6590 + 4)($at) -/* 04EC68 8004E068 460082A1 */ cvt.d.s $f10, $f16 -/* 04EC6C 8004E06C 46245182 */ mul.d $f6, $f10, $f4 -/* 04EC70 8004E070 462034A0 */ cvt.s.d $f18, $f6 -.L8004E074: -/* 04EC74 8004E074 821901F6 */ lb $t9, 0x1f6($s0) -/* 04EC78 8004E078 00000000 */ nop -/* 04EC7C 8004E07C 03234023 */ subu $t0, $t9, $v1 -/* 04EC80 8004E080 A20801F6 */ sb $t0, 0x1f6($s0) -/* 04EC84 8004E084 820901F6 */ lb $t1, 0x1f6($s0) -/* 04EC88 8004E088 00000000 */ nop -/* 04EC8C 8004E08C 05210002 */ bgez $t1, .L8004E098 -/* 04EC90 8004E090 00000000 */ nop -/* 04EC94 8004E094 A20001F6 */ sb $zero, 0x1f6($s0) -.L8004E098: -/* 04EC98 8004E098 AE200074 */ sw $zero, 0x74($s1) -/* 04EC9C 8004E09C 82020201 */ lb $v0, 0x201($s0) -/* 04ECA0 8004E0A0 00000000 */ nop -/* 04ECA4 8004E0A4 18400003 */ blez $v0, .L8004E0B4 -/* 04ECA8 8004E0A8 00435023 */ subu $t2, $v0, $v1 -/* 04ECAC 8004E0AC 10000002 */ b .L8004E0B8 -/* 04ECB0 8004E0B0 A20A0201 */ sb $t2, 0x201($s0) -.L8004E0B4: -/* 04ECB4 8004E0B4 A2000201 */ sb $zero, 0x201($s0) -.L8004E0B8: -/* 04ECB8 8004E0B8 0C01AF6C */ jal get_current_level_header -/* 04ECBC 8004E0BC E7B2009C */ swc1 $f18, 0x9c($sp) -/* 04ECC0 8004E0C0 AFA2007C */ sw $v0, 0x7c($sp) -/* 04ECC4 8004E0C4 C4480008 */ lwc1 $f8, 8($v0) -/* 04ECC8 8004E0C8 3C018012 */ lui $at, %hi(D_8011D4F0) # $at, 0x8012 -/* 04ECCC 8004E0CC E428D4F0 */ swc1 $f8, %lo(D_8011D4F0)($at) -/* 04ECD0 8004E0D0 86030000 */ lh $v1, ($s0) -/* 04ECD4 8004E0D4 2401FFFF */ li $at, -1 -/* 04ECD8 8004E0D8 14610008 */ bne $v1, $at, .L8004E0FC -/* 04ECDC 8004E0DC A200020C */ sb $zero, 0x20c($s0) -/* 04ECE0 8004E0E0 8FA600B4 */ lw $a2, 0xb4($sp) -/* 04ECE4 8004E0E4 8FA7009C */ lw $a3, 0x9c($sp) -/* 04ECE8 8004E0E8 02202025 */ move $a0, $s1 -/* 04ECEC 8004E0EC 0C0169BC */ jal func_8005A6F0 -/* 04ECF0 8004E0F0 02002825 */ move $a1, $s0 -/* 04ECF4 8004E0F4 1000059D */ b .L8004F76C -/* 04ECF8 8004E0F8 8FBF002C */ lw $ra, 0x2c($sp) -.L8004E0FC: -/* 04ECFC 8004E0FC 3C0B8012 */ lui $t3, %hi(gRaceStartTimer) # $t3, 0x8012 -/* 04ED00 8004E100 8D6BD540 */ lw $t3, %lo(gRaceStartTimer)($t3) -/* 04ED04 8004E104 00000000 */ nop -/* 04ED08 8004E108 15600017 */ bnez $t3, .L8004E168 -/* 04ED0C 8004E10C 00002025 */ move $a0, $zero -/* 04ED10 8004E110 14600015 */ bnez $v1, .L8004E168 -/* 04ED14 8004E114 00002025 */ move $a0, $zero -/* 04ED18 8004E118 0C0270C3 */ jal get_filtered_cheats -/* 04ED1C 8004E11C 00000000 */ nop -/* 04ED20 8004E120 304C0200 */ andi $t4, $v0, 0x200 -/* 04ED24 8004E124 1180000F */ beqz $t4, .L8004E164 -/* 04ED28 8004E128 3C04800E */ lui $a0, %hi(D_800E6280) # $a0, 0x800e -/* 04ED2C 8004E12C C6260010 */ lwc1 $f6, 0x10($s1) -/* 04ED30 8004E130 C62A000C */ lwc1 $f10, 0xc($s1) -/* 04ED34 8004E134 46003221 */ cvt.d.s $f8, $f6 -/* 04ED38 8004E138 46005121 */ cvt.d.s $f4, $f10 -/* 04ED3C 8004E13C E7A80014 */ swc1 $f8, 0x14($sp) -/* 04ED40 8004E140 E7A90010 */ swc1 $f9, 0x10($sp) -/* 04ED44 8004E144 C62A0014 */ lwc1 $f10, 0x14($s1) -/* 04ED48 8004E148 44072000 */ mfc1 $a3, $f4 -/* 04ED4C 8004E14C 44062800 */ mfc1 $a2, $f5 -/* 04ED50 8004E150 46005121 */ cvt.d.s $f4, $f10 -/* 04ED54 8004E154 E7A4001C */ swc1 $f4, 0x1c($sp) -/* 04ED58 8004E158 E7A50018 */ swc1 $f5, 0x18($sp) -/* 04ED5C 8004E15C 0C02D7B7 */ jal render_printf -/* 04ED60 8004E160 24846280 */ addiu $a0, %lo(D_800E6280) # addiu $a0, $a0, 0x6280 -.L8004E164: -/* 04ED64 8004E164 00002025 */ move $a0, $zero -.L8004E168: -/* 04ED68 8004E168 00002825 */ move $a1, $zero -/* 04ED6C 8004E16C 00003025 */ move $a2, $zero -/* 04ED70 8004E170 0C02D8AD */ jal set_render_printf_background_colour -/* 04ED74 8004E174 24070080 */ li $a3, 128 -/* 04ED78 8004E178 0C008D07 */ jal func_8002341C -/* 04ED7C 8004E17C 00000000 */ nop -/* 04ED80 8004E180 10400002 */ beqz $v0, .L8004E18C -/* 04ED84 8004E184 3C018012 */ lui $at, %hi(D_8011D586) # $at, 0x8012 -/* 04ED88 8004E188 A420D586 */ sh $zero, %lo(D_8011D586)($at) -.L8004E18C: -/* 04ED8C 8004E18C 0C01B683 */ jal get_render_context -/* 04ED90 8004E190 00000000 */ nop -/* 04ED94 8004E194 3C0D8012 */ lui $t5, %hi(gRaceStartTimer) # $t5, 0x8012 -/* 04ED98 8004E198 8DADD540 */ lw $t5, %lo(gRaceStartTimer)($t5) -/* 04ED9C 8004E19C AFA200A4 */ sw $v0, 0xa4($sp) -/* 04EDA0 8004E1A0 15A00010 */ bnez $t5, .L8004E1E4 -/* 04EDA4 8004E1A4 3C028012 */ lui $v0, %hi(D_8011D544) # $v0, 0x8012 -/* 04EDA8 8004E1A8 2442D544 */ addiu $v0, %lo(D_8011D544) # addiu $v0, $v0, -0x2abc -/* 04EDAC 8004E1AC C4400000 */ lwc1 $f0, ($v0) -/* 04EDB0 8004E1B0 44803800 */ mtc1 $zero, $f7 -/* 04EDB4 8004E1B4 44803000 */ mtc1 $zero, $f6 -/* 04EDB8 8004E1B8 46000221 */ cvt.d.s $f8, $f0 -/* 04EDBC 8004E1BC 4628303C */ c.lt.d $f6, $f8 -/* 04EDC0 8004E1C0 C7AA009C */ lwc1 $f10, 0x9c($sp) -/* 04EDC4 8004E1C4 45000004 */ bc1f .L8004E1D8 -/* 04EDC8 8004E1C8 00000000 */ nop -/* 04EDCC 8004E1CC 460A0101 */ sub.s $f4, $f0, $f10 -/* 04EDD0 8004E1D0 10000009 */ b .L8004E1F8 -/* 04EDD4 8004E1D4 E4440000 */ swc1 $f4, ($v0) -.L8004E1D8: -/* 04EDD8 8004E1D8 44803000 */ mtc1 $zero, $f6 -/* 04EDDC 8004E1DC 10000006 */ b .L8004E1F8 -/* 04EDE0 8004E1E0 E4460000 */ swc1 $f6, ($v0) -.L8004E1E4: -/* 04EDE4 8004E1E4 2404FFC4 */ li $a0, -60 -/* 04EDE8 8004E1E8 0C01BE53 */ jal get_random_number_from_range -/* 04EDEC 8004E1EC 2405003C */ li $a1, 60 -/* 04EDF0 8004E1F0 244E0078 */ addiu $t6, $v0, 0x78 -/* 04EDF4 8004E1F4 A60E01C6 */ sh $t6, 0x1c6($s0) -.L8004E1F8: -/* 04EDF8 8004E1F8 8602018C */ lh $v0, 0x18c($s0) -/* 04EDFC 8004E1FC 00000000 */ nop -/* 04EE00 8004E200 18400006 */ blez $v0, .L8004E21C -/* 04EE04 8004E204 00000000 */ nop -/* 04EE08 8004E208 8FAF00B4 */ lw $t7, 0xb4($sp) -/* 04EE0C 8004E20C 00000000 */ nop -/* 04EE10 8004E210 004FC023 */ subu $t8, $v0, $t7 -/* 04EE14 8004E214 10000002 */ b .L8004E220 -/* 04EE18 8004E218 A618018C */ sh $t8, 0x18c($s0) -.L8004E21C: -/* 04EE1C 8004E21C A600018C */ sh $zero, 0x18c($s0) -.L8004E220: -/* 04EE20 8004E220 0C0078A7 */ jal get_misc_asset -/* 04EE24 8004E224 24040009 */ li $a0, 9 -/* 04EE28 8004E228 3C058012 */ lui $a1, %hi(D_8011D564) # $a1, 0x8012 -/* 04EE2C 8004E22C 24A5D564 */ addiu $a1, %lo(D_8011D564) # addiu $a1, $a1, -0x2a9c -/* 04EE30 8004E230 ACA20000 */ sw $v0, ($a1) -/* 04EE34 8004E234 82080003 */ lb $t0, 3($s0) -/* 04EE38 8004E238 3C01800E */ lui $at, %hi(D_800E6598 + 4) # $at, 0x800e -/* 04EE3C 8004E23C 00084880 */ sll $t1, $t0, 2 -/* 04EE40 8004E240 00495021 */ addu $t2, $v0, $t1 -/* 04EE44 8004E244 C5480000 */ lwc1 $f8, ($t2) -/* 04EE48 8004E248 C4256598 */ lwc1 $f5, %lo(D_800E6598)($at) -/* 04EE4C 8004E24C C424659C */ lwc1 $f4, %lo(D_800E6598 + 4)($at) -/* 04EE50 8004E250 460042A1 */ cvt.d.s $f10, $f8 -/* 04EE54 8004E254 46245182 */ mul.d $f6, $f10, $f4 -/* 04EE58 8004E258 3C038012 */ lui $v1, %hi(D_8011D56C) # $v1, 0x8012 -/* 04EE5C 8004E25C 2463D56C */ addiu $v1, %lo(D_8011D56C) # addiu $v1, $v1, -0x2a94 -/* 04EE60 8004E260 46203220 */ cvt.s.d $f8, $f6 -/* 04EE64 8004E264 E4680000 */ swc1 $f8, ($v1) -/* 04EE68 8004E268 860B0204 */ lh $t3, 0x204($s0) -/* 04EE6C 8004E26C 00000000 */ nop -/* 04EE70 8004E270 19600004 */ blez $t3, .L8004E284 -/* 04EE74 8004E274 3C01800E */ lui $at, %hi(D_800E65A0) # $at, 0x800e -/* 04EE78 8004E278 C42A65A0 */ lwc1 $f10, %lo(D_800E65A0)($at) -/* 04EE7C 8004E27C 00000000 */ nop -/* 04EE80 8004E280 E46A0000 */ swc1 $f10, ($v1) -.L8004E284: -/* 04EE84 8004E284 0C0078A7 */ jal get_misc_asset -/* 04EE88 8004E288 2404000A */ li $a0, 10 -/* 04EE8C 8004E28C 3C058012 */ lui $a1, %hi(D_8011D564) # $a1, 0x8012 -/* 04EE90 8004E290 24A5D564 */ addiu $a1, %lo(D_8011D564) # addiu $a1, $a1, -0x2a9c -/* 04EE94 8004E294 ACA20000 */ sw $v0, ($a1) -/* 04EE98 8004E298 820D0003 */ lb $t5, 3($s0) -/* 04EE9C 8004E29C 3C018012 */ lui $at, %hi(D_8011D570) # $at, 0x8012 -/* 04EEA0 8004E2A0 000D7080 */ sll $t6, $t5, 2 -/* 04EEA4 8004E2A4 004E7821 */ addu $t7, $v0, $t6 -/* 04EEA8 8004E2A8 C5E40000 */ lwc1 $f4, ($t7) -/* 04EEAC 8004E2AC 2404000B */ li $a0, 11 -/* 04EEB0 8004E2B0 0C0078A7 */ jal get_misc_asset -/* 04EEB4 8004E2B4 E424D570 */ swc1 $f4, %lo(D_8011D570)($at) -/* 04EEB8 8004E2B8 3C018012 */ lui $at, %hi(D_8011D564) # $at, 0x8012 -/* 04EEBC 8004E2BC AC22D564 */ sw $v0, %lo(D_8011D564)($at) -/* 04EEC0 8004E2C0 82080003 */ lb $t0, 3($s0) -/* 04EEC4 8004E2C4 3C188012 */ lui $t8, %hi(D_8011D564) # $t8, 0x8012 -/* 04EEC8 8004E2C8 8F18D564 */ lw $t8, %lo(D_8011D564)($t8) -/* 04EECC 8004E2CC 0008C880 */ sll $t9, $t0, 2 -/* 04EED0 8004E2D0 03194821 */ addu $t1, $t8, $t9 -/* 04EED4 8004E2D4 C5260000 */ lwc1 $f6, ($t1) -/* 04EED8 8004E2D8 3C018012 */ lui $at, %hi(D_8011D574) # $at, 0x8012 -/* 04EEDC 8004E2DC E426D574 */ swc1 $f6, %lo(D_8011D574)($at) -/* 04EEE0 8004E2E0 920401FE */ lbu $a0, 0x1fe($s0) -/* 04EEE4 8004E2E4 3C038012 */ lui $v1, %hi(D_8011D56C) # $v1, 0x8012 -/* 04EEE8 8004E2E8 24010003 */ li $at, 3 -/* 04EEEC 8004E2EC 14810011 */ bne $a0, $at, .L8004E334 -/* 04EEF0 8004E2F0 2463D56C */ addiu $v1, %lo(D_8011D56C) # addiu $v1, $v1, -0x2a94 -/* 04EEF4 8004E2F4 920A01FF */ lbu $t2, 0x1ff($s0) -/* 04EEF8 8004E2F8 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 -/* 04EEFC 8004E2FC 448A4000 */ mtc1 $t2, $f8 -/* 04EF00 8004E300 05410004 */ bgez $t2, .L8004E314 -/* 04EF04 8004E304 468042A0 */ cvt.s.w $f10, $f8 -/* 04EF08 8004E308 44812000 */ mtc1 $at, $f4 -/* 04EF0C 8004E30C 00000000 */ nop -/* 04EF10 8004E310 46045280 */ add.s $f10, $f10, $f4 -.L8004E314: -/* 04EF14 8004E314 3C014380 */ li $at, 0x43800000 # 256.000000 -/* 04EF18 8004E318 44813000 */ mtc1 $at, $f6 -/* 04EF1C 8004E31C C4640000 */ lwc1 $f4, ($v1) -/* 04EF20 8004E320 46065203 */ div.s $f8, $f10, $f6 -/* 04EF24 8004E324 46082282 */ mul.s $f10, $f4, $f8 -/* 04EF28 8004E328 E46A0000 */ swc1 $f10, ($v1) -/* 04EF2C 8004E32C 920401FE */ lbu $a0, 0x1fe($s0) -/* 04EF30 8004E330 00000000 */ nop -.L8004E334: -/* 04EF34 8004E334 24010001 */ li $at, 1 -/* 04EF38 8004E338 14810019 */ bne $a0, $at, .L8004E3A0 -/* 04EF3C 8004E33C 00000000 */ nop -/* 04EF40 8004E340 920B01FF */ lbu $t3, 0x1ff($s0) -/* 04EF44 8004E344 C4600000 */ lwc1 $f0, ($v1) -/* 04EF48 8004E348 448B3000 */ mtc1 $t3, $f6 -/* 04EF4C 8004E34C 05610005 */ bgez $t3, .L8004E364 -/* 04EF50 8004E350 46803120 */ cvt.s.w $f4, $f6 -/* 04EF54 8004E354 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 -/* 04EF58 8004E358 44814000 */ mtc1 $at, $f8 -/* 04EF5C 8004E35C 00000000 */ nop -/* 04EF60 8004E360 46082100 */ add.s $f4, $f4, $f8 -.L8004E364: -/* 04EF64 8004E364 46040282 */ mul.s $f10, $f0, $f4 -/* 04EF68 8004E368 3C014300 */ li $at, 0x43000000 # 128.000000 -/* 04EF6C 8004E36C 44813000 */ mtc1 $at, $f6 -/* 04EF70 8004E370 00000000 */ nop -/* 04EF74 8004E374 46065203 */ div.s $f8, $f10, $f6 -/* 04EF78 8004E378 46080101 */ sub.s $f4, $f0, $f8 -/* 04EF7C 8004E37C E4640000 */ swc1 $f4, ($v1) -/* 04EF80 8004E380 860D0204 */ lh $t5, 0x204($s0) -/* 04EF84 8004E384 00000000 */ nop -/* 04EF88 8004E388 19A00005 */ blez $t5, .L8004E3A0 -/* 04EF8C 8004E38C 00000000 */ nop -/* 04EF90 8004E390 C46A0000 */ lwc1 $f10, ($v1) -/* 04EF94 8004E394 00000000 */ nop -/* 04EF98 8004E398 46005187 */ neg.s $f6, $f10 -/* 04EF9C 8004E39C E4660000 */ swc1 $f6, ($v1) -.L8004E3A0: -/* 04EFA0 8004E3A0 920C01FE */ lbu $t4, 0x1fe($s0) -/* 04EFA4 8004E3A4 24010002 */ li $at, 2 -/* 04EFA8 8004E3A8 1581002F */ bne $t4, $at, .L8004E468 -/* 04EFAC 8004E3AC 00000000 */ nop -/* 04EFB0 8004E3B0 920E01FF */ lbu $t6, 0x1ff($s0) -/* 04EFB4 8004E3B4 00000000 */ nop -/* 04EFB8 8004E3B8 000E7E00 */ sll $t7, $t6, 0x18 -/* 04EFBC 8004E3BC 0C01C1F1 */ jal cosine_s -/* 04EFC0 8004E3C0 000F2403 */ sra $a0, $t7, 0x10 -/* 04EFC4 8004E3C4 3C013FB0 */ li $at, 0x3FB00000 # 1.375000 -/* 04EFC8 8004E3C8 44816800 */ mtc1 $at, $f13 -/* 04EFCC 8004E3CC 3C014080 */ li $at, 0x40800000 # 4.000000 -/* 04EFD0 8004E3D0 44815000 */ mtc1 $at, $f10 -/* 04EFD4 8004E3D4 C7A8009C */ lwc1 $f8, 0x9c($sp) -/* 04EFD8 8004E3D8 460A0182 */ mul.s $f6, $f0, $f10 -/* 04EFDC 8004E3DC C6020084 */ lwc1 $f2, 0x84($s0) -/* 04EFE0 8004E3E0 460043A1 */ cvt.d.s $f14, $f8 -/* 04EFE4 8004E3E4 44806000 */ mtc1 $zero, $f12 -/* 04EFE8 8004E3E8 46023201 */ sub.s $f8, $f6, $f2 -/* 04EFEC 8004E3EC 921801FF */ lbu $t8, 0x1ff($s0) -/* 04EFF0 8004E3F0 460042A1 */ cvt.d.s $f10, $f8 -/* 04EFF4 8004E3F4 462C5182 */ mul.d $f6, $f10, $f12 -/* 04EFF8 8004E3F8 46001121 */ cvt.d.s $f4, $f2 -/* 04EFFC 8004E3FC 0018CE00 */ sll $t9, $t8, 0x18 -/* 04F000 8004E400 00192403 */ sra $a0, $t9, 0x10 -/* 04F004 8004E404 462E3202 */ mul.d $f8, $f6, $f14 -/* 04F008 8004E408 46282280 */ add.d $f10, $f4, $f8 -/* 04F00C 8004E40C 462051A0 */ cvt.s.d $f6, $f10 -/* 04F010 8004E410 E6060084 */ swc1 $f6, 0x84($s0) -/* 04F014 8004E414 E7AE0054 */ swc1 $f14, 0x54($sp) -/* 04F018 8004E418 0C01C1FE */ jal sine_s -/* 04F01C 8004E41C E7AF0050 */ swc1 $f15, 0x50($sp) -/* 04F020 8004E420 3C013FB0 */ li $at, 0x3FB00000 # 1.375000 -/* 04F024 8004E424 44816800 */ mtc1 $at, $f13 -/* 04F028 8004E428 3C014080 */ li $at, 0x40800000 # 4.000000 -/* 04F02C 8004E42C 44812000 */ mtc1 $at, $f4 -/* 04F030 8004E430 C6020088 */ lwc1 $f2, 0x88($s0) -/* 04F034 8004E434 46040202 */ mul.s $f8, $f0, $f4 -/* 04F038 8004E438 44806000 */ mtc1 $zero, $f12 -/* 04F03C 8004E43C C7A90050 */ lwc1 $f9, 0x50($sp) -/* 04F040 8004E440 46024281 */ sub.s $f10, $f8, $f2 -/* 04F044 8004E444 C7A80054 */ lwc1 $f8, 0x54($sp) -/* 04F048 8004E448 460051A1 */ cvt.d.s $f6, $f10 -/* 04F04C 8004E44C 462C3102 */ mul.d $f4, $f6, $f12 -/* 04F050 8004E450 460011A1 */ cvt.d.s $f6, $f2 -/* 04F054 8004E454 46282282 */ mul.d $f10, $f4, $f8 -/* 04F058 8004E458 462A3100 */ add.d $f4, $f6, $f10 -/* 04F05C 8004E45C 46202220 */ cvt.s.d $f8, $f4 -/* 04F060 8004E460 10000018 */ b .L8004E4C4 -/* 04F064 8004E464 E6080088 */ swc1 $f8, 0x88($s0) -.L8004E468: -/* 04F068 8004E468 C6060084 */ lwc1 $f6, 0x84($s0) -/* 04F06C 8004E46C 3C013FB0 */ li $at, 0x3FB00000 # 1.375000 -/* 04F070 8004E470 44816800 */ mtc1 $at, $f13 -/* 04F074 8004E474 44806000 */ mtc1 $zero, $f12 -/* 04F078 8004E478 46003021 */ cvt.d.s $f0, $f6 -/* 04F07C 8004E47C 462C0102 */ mul.d $f4, $f0, $f12 -/* 04F080 8004E480 C7AA009C */ lwc1 $f10, 0x9c($sp) -/* 04F084 8004E484 00000000 */ nop -/* 04F088 8004E488 460053A1 */ cvt.d.s $f14, $f10 -/* 04F08C 8004E48C 462E2202 */ mul.d $f8, $f4, $f14 -/* 04F090 8004E490 C6040088 */ lwc1 $f4, 0x88($s0) -/* 04F094 8004E494 00000000 */ nop -/* 04F098 8004E498 460020A1 */ cvt.d.s $f2, $f4 -/* 04F09C 8004E49C 46280181 */ sub.d $f6, $f0, $f8 -/* 04F0A0 8004E4A0 462C1202 */ mul.d $f8, $f2, $f12 -/* 04F0A4 8004E4A4 462032A0 */ cvt.s.d $f10, $f6 -/* 04F0A8 8004E4A8 E60A0084 */ swc1 $f10, 0x84($s0) -/* 04F0AC 8004E4AC 462E4182 */ mul.d $f6, $f8, $f14 -/* 04F0B0 8004E4B0 46261281 */ sub.d $f10, $f2, $f6 -/* 04F0B4 8004E4B4 46205120 */ cvt.s.d $f4, $f10 -/* 04F0B8 8004E4B8 E6040088 */ swc1 $f4, 0x88($s0) -/* 04F0BC 8004E4BC E7AE0054 */ swc1 $f14, 0x54($sp) -/* 04F0C0 8004E4C0 E7AF0050 */ swc1 $f15, 0x50($sp) -.L8004E4C4: -/* 04F0C4 8004E4C4 8E2A0040 */ lw $t2, 0x40($s1) -/* 04F0C8 8004E4C8 00000000 */ nop -/* 04F0CC 8004E4CC 9144005C */ lbu $a0, 0x5c($t2) -/* 04F0D0 8004E4D0 0C0078A7 */ jal get_misc_asset -/* 04F0D4 8004E4D4 00000000 */ nop -/* 04F0D8 8004E4D8 3C018012 */ lui $at, %hi(D_8011D564) # $at, 0x8012 -/* 04F0DC 8004E4DC AC22D564 */ sw $v0, %lo(D_8011D564)($at) -/* 04F0E0 8004E4E0 8E2B0040 */ lw $t3, 0x40($s1) -/* 04F0E4 8004E4E4 00000000 */ nop -/* 04F0E8 8004E4E8 9164005D */ lbu $a0, 0x5d($t3) -/* 04F0EC 8004E4EC 0C0078A7 */ jal get_misc_asset -/* 04F0F0 8004E4F0 00000000 */ nop -/* 04F0F4 8004E4F4 3C018012 */ lui $at, %hi(D_8011D568) # $at, 0x8012 -/* 04F0F8 8004E4F8 AC22D568 */ sw $v0, %lo(D_8011D568)($at) -/* 04F0FC 8004E4FC C6280020 */ lwc1 $f8, 0x20($s1) -/* 04F100 8004E500 3C014010 */ li $at, 0x40100000 # 2.250000 -/* 04F104 8004E504 44815800 */ mtc1 $at, $f11 -/* 04F108 8004E508 44805000 */ mtc1 $zero, $f10 -/* 04F10C 8004E50C 460041A1 */ cvt.d.s $f6, $f8 -/* 04F110 8004E510 462A303C */ c.lt.d $f6, $f10 -/* 04F114 8004E514 00000000 */ nop -/* 04F118 8004E518 4500000F */ bc1f .L8004E558 -/* 04F11C 8004E51C 00000000 */ nop -/* 04F120 8004E520 820D01E2 */ lb $t5, 0x1e2($s0) -/* 04F124 8004E524 00000000 */ nop -/* 04F128 8004E528 29A10003 */ slti $at, $t5, 3 -/* 04F12C 8004E52C 10200009 */ beqz $at, .L8004E554 -/* 04F130 8004E530 00000000 */ nop -/* 04F134 8004E534 C60800C0 */ lwc1 $f8, 0xc0($s0) -/* 04F138 8004E538 44802800 */ mtc1 $zero, $f5 -/* 04F13C 8004E53C 44802000 */ mtc1 $zero, $f4 -/* 04F140 8004E540 460041A1 */ cvt.d.s $f6, $f8 -/* 04F144 8004E544 46262032 */ c.eq.d $f4, $f6 -/* 04F148 8004E548 00000000 */ nop -/* 04F14C 8004E54C 45010002 */ bc1t .L8004E558 -/* 04F150 8004E550 00000000 */ nop -.L8004E554: -/* 04F154 8004E554 A20001F1 */ sb $zero, 0x1f1($s0) -.L8004E558: -/* 04F158 8004E558 C62A000C */ lwc1 $f10, 0xc($s1) -/* 04F15C 8004E55C 00000000 */ nop -/* 04F160 8004E560 E7AA0090 */ swc1 $f10, 0x90($sp) -/* 04F164 8004E564 C6280010 */ lwc1 $f8, 0x10($s1) -/* 04F168 8004E568 00000000 */ nop -/* 04F16C 8004E56C E7A8008C */ swc1 $f8, 0x8c($sp) -/* 04F170 8004E570 C6240014 */ lwc1 $f4, 0x14($s1) -/* 04F174 8004E574 00000000 */ nop -/* 04F178 8004E578 E7A40088 */ swc1 $f4, 0x88($sp) -/* 04F17C 8004E57C 860201B2 */ lh $v0, 0x1b2($s0) -/* 04F180 8004E580 00000000 */ nop -/* 04F184 8004E584 1840000A */ blez $v0, .L8004E5B0 -/* 04F188 8004E588 00000000 */ nop -/* 04F18C 8004E58C 8FAC00B4 */ lw $t4, 0xb4($sp) -/* 04F190 8004E590 00000000 */ nop -/* 04F194 8004E594 004C7023 */ subu $t6, $v0, $t4 -/* 04F198 8004E598 A60E01B2 */ sh $t6, 0x1b2($s0) -/* 04F19C 8004E59C 860F01B2 */ lh $t7, 0x1b2($s0) -/* 04F1A0 8004E5A0 00000000 */ nop -/* 04F1A4 8004E5A4 05E10002 */ bgez $t7, .L8004E5B0 -/* 04F1A8 8004E5A8 00000000 */ nop -/* 04F1AC 8004E5AC A60001B2 */ sh $zero, 0x1b2($s0) -.L8004E5B0: -/* 04F1B0 8004E5B0 86040000 */ lh $a0, ($s0) -/* 04F1B4 8004E5B4 0C01997A */ jal func_800665E8 -/* 04F1B8 8004E5B8 00000000 */ nop -/* 04F1BC 8004E5BC 0C01A73F */ jal func_80069CFC -/* 04F1C0 8004E5C0 00000000 */ nop -/* 04F1C4 8004E5C4 3C018012 */ lui $at, %hi(gCameraObject) # $at, 0x8012 -/* 04F1C8 8004E5C8 AC22D508 */ sw $v0, %lo(gCameraObject)($at) -/* 04F1CC 8004E5CC 820801E7 */ lb $t0, 0x1e7($s0) -/* 04F1D0 8004E5D0 86190000 */ lh $t9, ($s0) -/* 04F1D4 8004E5D4 25180001 */ addiu $t8, $t0, 1 -/* 04F1D8 8004E5D8 A21801E7 */ sb $t8, 0x1e7($s0) -/* 04F1DC 8004E5DC 3C018012 */ lui $at, %hi(D_8011D55C) # $at, 0x8012 -/* 04F1E0 8004E5E0 AC39D55C */ sw $t9, %lo(D_8011D55C)($at) -/* 04F1E4 8004E5E4 820901D8 */ lb $t1, 0x1d8($s0) -/* 04F1E8 8004E5E8 24070001 */ li $a3, 1 -/* 04F1EC 8004E5EC 10E90005 */ beq $a3, $t1, .L8004E604 -/* 04F1F0 8004E5F0 00000000 */ nop -/* 04F1F4 8004E5F4 8FAA00A4 */ lw $t2, 0xa4($sp) -/* 04F1F8 8004E5F8 00000000 */ nop -/* 04F1FC 8004E5FC 1547000A */ bne $t2, $a3, .L8004E628 -/* 04F200 8004E600 00000000 */ nop -.L8004E604: -/* 04F204 8004E604 860D018E */ lh $t5, 0x18e($s0) -/* 04F208 8004E608 240BFFFF */ li $t3, -1 -/* 04F20C 8004E60C 29A10006 */ slti $at, $t5, 6 -/* 04F210 8004E610 A20701CA */ sb $a3, 0x1ca($s0) -/* 04F214 8004E614 A60B0000 */ sh $t3, ($s0) -/* 04F218 8004E618 14200003 */ bnez $at, .L8004E628 -/* 04F21C 8004E61C A20001C9 */ sb $zero, 0x1c9($s0) -/* 04F220 8004E620 240C0005 */ li $t4, 5 -/* 04F224 8004E624 A60C018E */ sh $t4, 0x18e($s0) -.L8004E628: -/* 04F228 8004E628 86030000 */ lh $v1, ($s0) -/* 04F22C 8004E62C 2401FFFF */ li $at, -1 -/* 04F230 8004E630 10610030 */ beq $v1, $at, .L8004E6F4 -/* 04F234 8004E634 8FA600B4 */ lw $a2, 0xb4($sp) -/* 04F238 8004E638 8E0E0108 */ lw $t6, 0x108($s0) -/* 04F23C 8004E63C 8FA500B4 */ lw $a1, 0xb4($sp) -/* 04F240 8004E640 15C00027 */ bnez $t6, .L8004E6E0 -/* 04F244 8004E644 00000000 */ nop -/* 04F248 8004E648 0C003856 */ jal func_8000E158 -/* 04F24C 8004E64C AFA300AC */ sw $v1, 0xac($sp) -/* 04F250 8004E650 8FA600AC */ lw $a2, 0xac($sp) -/* 04F254 8004E654 10400002 */ beqz $v0, .L8004E660 -/* 04F258 8004E658 240F0001 */ li $t7, 1 -/* 04F25C 8004E65C 01E63023 */ subu $a2, $t7, $a2 -.L8004E660: -/* 04F260 8004E660 00C02025 */ move $a0, $a2 -/* 04F264 8004E664 0C01A967 */ jal clamp_joystick_x_axis -/* 04F268 8004E668 AFA600AC */ sw $a2, 0xac($sp) -/* 04F26C 8004E66C 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 -/* 04F270 8004E670 0C0270C3 */ jal get_filtered_cheats -/* 04F274 8004E674 AC22D534 */ sw $v0, %lo(gCurrentStickX)($at) -/* 04F278 8004E678 8FA600AC */ lw $a2, 0xac($sp) -/* 04F27C 8004E67C 30480004 */ andi $t0, $v0, 4 -/* 04F280 8004E680 11000006 */ beqz $t0, .L8004E69C -/* 04F284 8004E684 00C02025 */ move $a0, $a2 -/* 04F288 8004E688 3C188012 */ lui $t8, %hi(gCurrentStickX) # $t8, 0x8012 -/* 04F28C 8004E68C 8F18D534 */ lw $t8, %lo(gCurrentStickX)($t8) -/* 04F290 8004E690 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 -/* 04F294 8004E694 0018C823 */ negu $t9, $t8 -/* 04F298 8004E698 AC39D534 */ sw $t9, %lo(gCurrentStickX)($at) -.L8004E69C: -/* 04F29C 8004E69C 0C01A978 */ jal clamp_joystick_y_axis -/* 04F2A0 8004E6A0 AFA600AC */ sw $a2, 0xac($sp) -/* 04F2A4 8004E6A4 8FA400AC */ lw $a0, 0xac($sp) -/* 04F2A8 8004E6A8 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 -/* 04F2AC 8004E6AC 0C01A94A */ jal get_buttons_held_from_player -/* 04F2B0 8004E6B0 AC22D538 */ sw $v0, %lo(gCurrentStickY)($at) -/* 04F2B4 8004E6B4 8FA400AC */ lw $a0, 0xac($sp) -/* 04F2B8 8004E6B8 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 -/* 04F2BC 8004E6BC 0C01A955 */ jal get_buttons_pressed_from_player -/* 04F2C0 8004E6C0 AC22D528 */ sw $v0, %lo(gCurrentCarInput)($at) -/* 04F2C4 8004E6C4 8FA400AC */ lw $a0, 0xac($sp) -/* 04F2C8 8004E6C8 3C018012 */ lui $at, %hi(gActivePlayerButtonPress) # $at, 0x8012 -/* 04F2CC 8004E6CC 0C01A95E */ jal get_buttons_released_from_player -/* 04F2D0 8004E6D0 AC22D52C */ sw $v0, %lo(gActivePlayerButtonPress)($at) -/* 04F2D4 8004E6D4 3C018012 */ lui $at, %hi(D_8011D530) # $at, 0x8012 -/* 04F2D8 8004E6D8 10000009 */ b .L8004E700 -/* 04F2DC 8004E6DC AC22D530 */ sw $v0, %lo(D_8011D530)($at) -.L8004E6E0: -/* 04F2E0 8004E6E0 0C016909 */ jal func_8005A424 -/* 04F2E4 8004E6E4 02002025 */ move $a0, $s0 -/* 04F2E8 8004E6E8 10000005 */ b .L8004E700 -/* 04F2EC 8004E6EC 00000000 */ nop -/* 04F2F0 8004E6F0 8FA600B4 */ lw $a2, 0xb4($sp) -.L8004E6F4: -/* 04F2F4 8004E6F4 02202025 */ move $a0, $s1 -/* 04F2F8 8004E6F8 0C01105C */ jal func_80044170 -/* 04F2FC 8004E6FC 02002825 */ move $a1, $s0 -.L8004E700: -/* 04F300 8004E700 3C098012 */ lui $t1, %hi(gCurrentCarInput) # $t1, 0x8012 -/* 04F304 8004E704 8D29D528 */ lw $t1, %lo(gCurrentCarInput)($t1) -/* 04F308 8004E708 00000000 */ nop -/* 04F30C 8004E70C 312A8000 */ andi $t2, $t1, 0x8000 -/* 04F310 8004E710 15400002 */ bnez $t2, .L8004E71C -/* 04F314 8004E714 240B0001 */ li $t3, 1 -/* 04F318 8004E718 A20B020C */ sb $t3, 0x20c($s0) -.L8004E71C: -/* 04F31C 8004E71C 0C019944 */ jal func_80066510 -/* 04F320 8004E720 00000000 */ nop -/* 04F324 8004E724 14400014 */ bnez $v0, .L8004E778 -/* 04F328 8004E728 3C0D8012 */ lui $t5, %hi(gRaceStartTimer) # $t5, 0x8012 -/* 04F32C 8004E72C 8DADD540 */ lw $t5, %lo(gRaceStartTimer)($t5) -/* 04F330 8004E730 24010064 */ li $at, 100 -/* 04F334 8004E734 11A10010 */ beq $t5, $at, .L8004E778 -/* 04F338 8004E738 00000000 */ nop -/* 04F33C 8004E73C 920C01F1 */ lbu $t4, 0x1f1($s0) -/* 04F340 8004E740 3C0E8012 */ lui $t6, %hi(D_8011D584) # $t6, 0x8012 -/* 04F344 8004E744 1580000C */ bnez $t4, .L8004E778 -/* 04F348 8004E748 00000000 */ nop -/* 04F34C 8004E74C 81CED584 */ lb $t6, %lo(D_8011D584)($t6) -/* 04F350 8004E750 00000000 */ nop -/* 04F354 8004E754 15C00008 */ bnez $t6, .L8004E778 -/* 04F358 8004E758 00000000 */ nop -/* 04F35C 8004E75C 8E0F0148 */ lw $t7, 0x148($s0) -/* 04F360 8004E760 00000000 */ nop -/* 04F364 8004E764 15E00004 */ bnez $t7, .L8004E778 -/* 04F368 8004E768 00000000 */ nop -/* 04F36C 8004E76C 86020204 */ lh $v0, 0x204($s0) -/* 04F370 8004E770 00000000 */ nop -/* 04F374 8004E774 1840000C */ blez $v0, .L8004E7A8 -.L8004E778: -/* 04F378 8004E778 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 -/* 04F37C 8004E77C AC20D534 */ sw $zero, %lo(gCurrentStickX)($at) -/* 04F380 8004E780 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 -/* 04F384 8004E784 AC20D538 */ sw $zero, %lo(gCurrentStickY)($at) -/* 04F388 8004E788 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 -/* 04F38C 8004E78C AC20D528 */ sw $zero, %lo(gCurrentCarInput)($at) -/* 04F390 8004E790 3C018012 */ lui $at, %hi(gActivePlayerButtonPress) # $at, 0x8012 -/* 04F394 8004E794 AC20D52C */ sw $zero, %lo(gActivePlayerButtonPress)($at) -/* 04F398 8004E798 3C018012 */ lui $at, %hi(D_8011D530) # $at, 0x8012 -/* 04F39C 8004E79C AC20D530 */ sw $zero, %lo(D_8011D530)($at) -/* 04F3A0 8004E7A0 86020204 */ lh $v0, 0x204($s0) -/* 04F3A4 8004E7A4 A20001E1 */ sb $zero, 0x1e1($s0) -.L8004E7A8: -/* 04F3A8 8004E7A8 18400019 */ blez $v0, .L8004E810 -/* 04F3AC 8004E7AC 3C01800E */ lui $at, %hi(D_800E65A4) # $at, 0x800e -/* 04F3B0 8004E7B0 C42065A4 */ lwc1 $f0, %lo(D_800E65A4)($at) -/* 04F3B4 8004E7B4 8FA800B4 */ lw $t0, 0xb4($sp) -/* 04F3B8 8004E7B8 3C014000 */ li $at, 0x40000000 # 2.000000 -/* 04F3BC 8004E7BC 44811000 */ mtc1 $at, $f2 -/* 04F3C0 8004E7C0 0048C023 */ subu $t8, $v0, $t0 -/* 04F3C4 8004E7C4 A6180204 */ sh $t8, 0x204($s0) -/* 04F3C8 8004E7C8 3C01800E */ lui $at, %hi(D_800E65A8) # $at, 0x800e -/* 04F3CC 8004E7CC C42A65A8 */ lwc1 $f10, %lo(D_800E65A8)($at) -/* 04F3D0 8004E7D0 C606002C */ lwc1 $f6, 0x2c($s0) -/* 04F3D4 8004E7D4 00000000 */ nop -/* 04F3D8 8004E7D8 460A3202 */ mul.s $f8, $f6, $f10 -/* 04F3DC 8004E7DC E608002C */ swc1 $f8, 0x2c($s0) -/* 04F3E0 8004E7E0 C624001C */ lwc1 $f4, 0x1c($s1) -/* 04F3E4 8004E7E4 C62A0020 */ lwc1 $f10, 0x20($s1) -/* 04F3E8 8004E7E8 46002182 */ mul.s $f6, $f4, $f0 -/* 04F3EC 8004E7EC 460A103C */ c.lt.s $f2, $f10 -/* 04F3F0 8004E7F0 00000000 */ nop -/* 04F3F4 8004E7F4 45000002 */ bc1f .L8004E800 -/* 04F3F8 8004E7F8 E626001C */ swc1 $f6, 0x1c($s1) -/* 04F3FC 8004E7FC E6220020 */ swc1 $f2, 0x20($s1) -.L8004E800: -/* 04F400 8004E800 C6280024 */ lwc1 $f8, 0x24($s1) -/* 04F404 8004E804 00000000 */ nop -/* 04F408 8004E808 46004102 */ mul.s $f4, $f8, $f0 -/* 04F40C 8004E80C E6240024 */ swc1 $f4, 0x24($s1) -.L8004E810: -/* 04F410 8004E810 86020206 */ lh $v0, 0x206($s0) -/* 04F414 8004E814 00000000 */ nop -/* 04F418 8004E818 18400006 */ blez $v0, .L8004E834 -/* 04F41C 8004E81C 00000000 */ nop -/* 04F420 8004E820 A602018A */ sh $v0, 0x18a($s0) -/* 04F424 8004E824 8FB900B4 */ lw $t9, 0xb4($sp) -/* 04F428 8004E828 00000000 */ nop -/* 04F42C 8004E82C 00594823 */ subu $t1, $v0, $t9 -/* 04F430 8004E830 A6090206 */ sh $t1, 0x206($s0) -.L8004E834: -/* 04F434 8004E834 8602018A */ lh $v0, 0x18a($s0) -/* 04F438 8004E838 00000000 */ nop -/* 04F43C 8004E83C 18400015 */ blez $v0, .L8004E894 -/* 04F440 8004E840 00000000 */ nop -/* 04F444 8004E844 8FAA00B4 */ lw $t2, 0xb4($sp) -/* 04F448 8004E848 3046000F */ andi $a2, $v0, 0xf -/* 04F44C 8004E84C 004A5823 */ subu $t3, $v0, $t2 -/* 04F450 8004E850 A60B018A */ sh $t3, 0x18a($s0) -/* 04F454 8004E854 860D018A */ lh $t5, 0x18a($s0) -/* 04F458 8004E858 2404FFB0 */ li $a0, -80 -/* 04F45C 8004E85C 31AC000F */ andi $t4, $t5, 0xf -/* 04F460 8004E860 00CC082A */ slt $at, $a2, $t4 -/* 04F464 8004E864 10200004 */ beqz $at, .L8004E878 -/* 04F468 8004E868 00000000 */ nop -/* 04F46C 8004E86C 0C01BE53 */ jal get_random_number_from_range -/* 04F470 8004E870 24050050 */ li $a1, 80 -/* 04F474 8004E874 A20201D1 */ sb $v0, 0x1d1($s0) -.L8004E878: -/* 04F478 8004E878 3C0E8012 */ lui $t6, %hi(gCurrentStickX) # $t6, 0x8012 -/* 04F47C 8004E87C 8DCED534 */ lw $t6, %lo(gCurrentStickX)($t6) -/* 04F480 8004E880 820F01D1 */ lb $t7, 0x1d1($s0) -/* 04F484 8004E884 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 -/* 04F488 8004E888 01CF4021 */ addu $t0, $t6, $t7 -/* 04F48C 8004E88C 10000002 */ b .L8004E898 -/* 04F490 8004E890 AC28D534 */ sw $t0, %lo(gCurrentStickX)($at) -.L8004E894: -/* 04F494 8004E894 A600018A */ sh $zero, 0x18a($s0) -.L8004E898: -/* 04F498 8004E898 82180175 */ lb $t8, 0x175($s0) -/* 04F49C 8004E89C 00000000 */ nop -/* 04F4A0 8004E8A0 13000005 */ beqz $t8, .L8004E8B8 -/* 04F4A4 8004E8A4 00000000 */ nop -/* 04F4A8 8004E8A8 8FA600B4 */ lw $a2, 0xb4($sp) -/* 04F4AC 8004E8AC 02202025 */ move $a0, $s1 -/* 04F4B0 8004E8B0 0C015B8B */ jal func_80056E2C -/* 04F4B4 8004E8B4 02002825 */ move $a1, $s0 -.L8004E8B8: -/* 04F4B8 8004E8B8 3C038012 */ lui $v1, %hi(gRaceStartTimer) # $v1, 0x8012 -/* 04F4BC 8004E8BC 8C63D540 */ lw $v1, %lo(gRaceStartTimer)($v1) -/* 04F4C0 8004E8C0 00000000 */ nop -/* 04F4C4 8004E8C4 10600010 */ beqz $v1, .L8004E908 -/* 04F4C8 8004E8C8 00000000 */ nop -/* 04F4CC 8004E8CC 8FB9007C */ lw $t9, 0x7c($sp) -/* 04F4D0 8004E8D0 24010003 */ li $at, 3 -/* 04F4D4 8004E8D4 8322004C */ lb $v0, 0x4c($t9) -/* 04F4D8 8004E8D8 00000000 */ nop -/* 04F4DC 8004E8DC 10400004 */ beqz $v0, .L8004E8F0 -/* 04F4E0 8004E8E0 00000000 */ nop -/* 04F4E4 8004E8E4 10410002 */ beq $v0, $at, .L8004E8F0 -/* 04F4E8 8004E8E8 24010008 */ li $at, 8 -/* 04F4EC 8004E8EC 14410006 */ bne $v0, $at, .L8004E908 -.L8004E8F0: -/* 04F4F0 8004E8F0 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 -/* 04F4F4 8004E8F4 AC20D534 */ sw $zero, %lo(gCurrentStickX)($at) -/* 04F4F8 8004E8F8 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 -/* 04F4FC 8004E8FC AC20D538 */ sw $zero, %lo(gCurrentStickY)($at) -/* 04F500 8004E900 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 -/* 04F504 8004E904 AC20D528 */ sw $zero, %lo(gCurrentCarInput)($at) -.L8004E908: -/* 04F508 8004E908 1460001C */ bnez $v1, .L8004E97C -/* 04F50C 8004E90C 00000000 */ nop -/* 04F510 8004E910 8FAA007C */ lw $t2, 0x7c($sp) -/* 04F514 8004E914 82090194 */ lb $t1, 0x194($s0) -/* 04F518 8004E918 814B004B */ lb $t3, 0x4b($t2) -/* 04F51C 8004E91C 00000000 */ nop -/* 04F520 8004E920 012B082A */ slt $at, $t1, $t3 -/* 04F524 8004E924 10200015 */ beqz $at, .L8004E97C -/* 04F528 8004E928 00000000 */ nop -/* 04F52C 8004E92C 0C00322D */ jal normalise_time -/* 04F530 8004E930 34048CA0 */ li $a0, 36000 -/* 04F534 8004E934 820D0194 */ lb $t5, 0x194($s0) -/* 04F538 8004E938 8FA500B4 */ lw $a1, 0xb4($sp) -/* 04F53C 8004E93C 000D6080 */ sll $t4, $t5, 2 -/* 04F540 8004E940 020C1821 */ addu $v1, $s0, $t4 -/* 04F544 8004E944 8C640128 */ lw $a0, 0x128($v1) -/* 04F548 8004E948 00457023 */ subu $t6, $v0, $a1 -/* 04F54C 8004E94C 008E082A */ slt $at, $a0, $t6 -/* 04F550 8004E950 10200003 */ beqz $at, .L8004E960 -/* 04F554 8004E954 00857821 */ addu $t7, $a0, $a1 -/* 04F558 8004E958 10000008 */ b .L8004E97C -/* 04F55C 8004E95C AC6F0128 */ sw $t7, 0x128($v1) -.L8004E960: -/* 04F560 8004E960 0C00322D */ jal normalise_time -/* 04F564 8004E964 34048CA0 */ li $a0, 36000 -/* 04F568 8004E968 82080194 */ lb $t0, 0x194($s0) -/* 04F56C 8004E96C 00000000 */ nop -/* 04F570 8004E970 0008C080 */ sll $t8, $t0, 2 -/* 04F574 8004E974 0218C821 */ addu $t9, $s0, $t8 -/* 04F578 8004E978 AF220128 */ sw $v0, 0x128($t9) -.L8004E97C: -/* 04F57C 8004E97C 3C0A8012 */ lui $t2, %hi(D_8011D55C) # $t2, 0x8012 -/* 04F580 8004E980 8D4AD55C */ lw $t2, %lo(D_8011D55C)($t2) -/* 04F584 8004E984 2401FFFF */ li $at, -1 -/* 04F588 8004E988 11410005 */ beq $t2, $at, .L8004E9A0 -/* 04F58C 8004E98C 00000000 */ nop -/* 04F590 8004E990 0C01A73F */ jal func_80069CFC -/* 04F594 8004E994 00000000 */ nop -/* 04F598 8004E998 3C018012 */ lui $at, %hi(gCameraObject) # $at, 0x8012 -/* 04F59C 8004E99C AC22D508 */ sw $v0, %lo(gCameraObject)($at) -.L8004E9A0: -/* 04F5A0 8004E9A0 8624002E */ lh $a0, 0x2e($s1) -/* 04F5A4 8004E9A4 8E25000C */ lw $a1, 0xc($s1) -/* 04F5A8 8004E9A8 8E260014 */ lw $a2, 0x14($s1) -/* 04F5AC 8004E9AC 3C078012 */ lui $a3, %hi(D_8011D5B0) # $a3, 0x8012 -/* 04F5B0 8004E9B0 0C00AC3D */ jal func_8002B0F4 -/* 04F5B4 8004E9B4 24E7D5B0 */ addiu $a3, %lo(D_8011D5B0) # addiu $a3, $a3, -0x2a50 -/* 04F5B8 8004E9B8 3C038012 */ lui $v1, %hi(D_8011D5AE) # $v1, 0x8012 -/* 04F5BC 8004E9BC 2463D5AE */ addiu $v1, %lo(D_8011D5AE) # addiu $v1, $v1, -0x2a52 -/* 04F5C0 8004E9C0 A0620000 */ sb $v0, ($v1) -/* 04F5C4 8004E9C4 80640000 */ lb $a0, ($v1) -/* 04F5C8 8004E9C8 00000000 */ nop -/* 04F5CC 8004E9CC 10800019 */ beqz $a0, .L8004EA34 -/* 04F5D0 8004E9D0 00000000 */ nop -/* 04F5D4 8004E9D4 18800017 */ blez $a0, .L8004EA34 -/* 04F5D8 8004E9D8 00001025 */ move $v0, $zero -/* 04F5DC 8004E9DC 3C038012 */ lui $v1, %hi(D_8011D5B0) # $v1, 0x8012 -/* 04F5E0 8004E9E0 3C078012 */ lui $a3, %hi(D_8011D4F0) # $a3, 0x8012 -/* 04F5E4 8004E9E4 8C63D5B0 */ lw $v1, %lo(D_8011D5B0)($v1) -/* 04F5E8 8004E9E8 24E7D4F0 */ addiu $a3, %lo(D_8011D4F0) # addiu $a3, $a3, -0x2b10 -/* 04F5EC 8004E9EC 00042880 */ sll $a1, $a0, 2 -/* 04F5F0 8004E9F0 2406000F */ li $a2, 15 -.L8004E9F4: -/* 04F5F4 8004E9F4 8C640000 */ lw $a0, ($v1) -/* 04F5F8 8004E9F8 24420004 */ addiu $v0, $v0, 4 -/* 04F5FC 8004E9FC 80890010 */ lb $t1, 0x10($a0) -/* 04F600 8004EA00 0045082A */ slt $at, $v0, $a1 -/* 04F604 8004EA04 14C90009 */ bne $a2, $t1, .L8004EA2C -/* 04F608 8004EA08 00000000 */ nop -/* 04F60C 8004EA0C C4800000 */ lwc1 $f0, ($a0) -/* 04F610 8004EA10 C4E60000 */ lwc1 $f6, ($a3) -/* 04F614 8004EA14 00000000 */ nop -/* 04F618 8004EA18 4606003C */ c.lt.s $f0, $f6 -/* 04F61C 8004EA1C 00000000 */ nop -/* 04F620 8004EA20 45000002 */ bc1f .L8004EA2C -/* 04F624 8004EA24 00000000 */ nop -/* 04F628 8004EA28 E4E00000 */ swc1 $f0, ($a3) -.L8004EA2C: -/* 04F62C 8004EA2C 1420FFF1 */ bnez $at, .L8004E9F4 -/* 04F630 8004EA30 24630004 */ addiu $v1, $v1, 4 -.L8004EA34: -/* 04F634 8004EA34 820B01D6 */ lb $t3, 0x1d6($s0) -/* 04F638 8004EA38 24010001 */ li $at, 1 -/* 04F63C 8004EA3C 11610044 */ beq $t3, $at, .L8004EB50 -/* 04F640 8004EA40 3C01800E */ lui $at, %hi(D_800E65AC) # $at, 0x800e -/* 04F644 8004EA44 C42A65AC */ lwc1 $f10, %lo(D_800E65AC)($at) -/* 04F648 8004EA48 3C068012 */ lui $a2, %hi(D_8011D4F8) # $a2, 0x8012 -/* 04F64C 8004EA4C E7AA0098 */ swc1 $f10, 0x98($sp) -/* 04F650 8004EA50 C62C0010 */ lwc1 $f12, 0x10($s1) -/* 04F654 8004EA54 24C6D4F8 */ addiu $a2, %lo(D_8011D4F8) # addiu $a2, $a2, -0x2b08 -/* 04F658 8004EA58 0C00AB42 */ jal func_8002AD08 -/* 04F65C 8004EA5C 27A50098 */ addiu $a1, $sp, 0x98 -/* 04F660 8004EA60 3C038012 */ lui $v1, %hi(D_8011D504) # $v1, 0x8012 -/* 04F664 8004EA64 2463D504 */ addiu $v1, %lo(D_8011D504) # addiu $v1, $v1, -0x2afc -/* 04F668 8004EA68 A0620000 */ sb $v0, ($v1) -/* 04F66C 8004EA6C 806D0000 */ lb $t5, ($v1) -/* 04F670 8004EA70 3C0140A0 */ li $at, 0x40A00000 # 5.000000 -/* 04F674 8004EA74 11A00014 */ beqz $t5, .L8004EAC8 -/* 04F678 8004EA78 00000000 */ nop -/* 04F67C 8004EA7C 44810000 */ mtc1 $at, $f0 -/* 04F680 8004EA80 C6280010 */ lwc1 $f8, 0x10($s1) -/* 04F684 8004EA84 C7A60098 */ lwc1 $f6, 0x98($sp) -/* 04F688 8004EA88 46004101 */ sub.s $f4, $f8, $f0 -/* 04F68C 8004EA8C 240C0005 */ li $t4, 5 -/* 04F690 8004EA90 4606203C */ c.lt.s $f4, $f6 -/* 04F694 8004EA94 00000000 */ nop -/* 04F698 8004EA98 45000008 */ bc1f .L8004EABC -/* 04F69C 8004EA9C 00000000 */ nop -/* 04F6A0 8004EAA0 A20C01E5 */ sb $t4, 0x1e5($s0) -/* 04F6A4 8004EAA4 C6280010 */ lwc1 $f8, 0x10($s1) -/* 04F6A8 8004EAA8 C7AA0098 */ lwc1 $f10, 0x98($sp) -/* 04F6AC 8004EAAC 46004101 */ sub.s $f4, $f8, $f0 -/* 04F6B0 8004EAB0 46045181 */ sub.s $f6, $f10, $f4 -/* 04F6B4 8004EAB4 1000000F */ b .L8004EAF4 -/* 04F6B8 8004EAB8 E60600C0 */ swc1 $f6, 0xc0($s0) -.L8004EABC: -/* 04F6BC 8004EABC 44804000 */ mtc1 $zero, $f8 -/* 04F6C0 8004EAC0 1000000C */ b .L8004EAF4 -/* 04F6C4 8004EAC4 E60800C0 */ swc1 $f8, 0xc0($s0) -.L8004EAC8: -/* 04F6C8 8004EAC8 820201E5 */ lb $v0, 0x1e5($s0) -/* 04F6CC 8004EACC 3C0140A0 */ li $at, 0x40A00000 # 5.000000 -/* 04F6D0 8004EAD0 18400005 */ blez $v0, .L8004EAE8 -/* 04F6D4 8004EAD4 244EFFFF */ addiu $t6, $v0, -1 -/* 04F6D8 8004EAD8 3C0140A0 */ li $at, 0x40A00000 # 5.000000 -/* 04F6DC 8004EADC 44810000 */ mtc1 $at, $f0 -/* 04F6E0 8004EAE0 10000004 */ b .L8004EAF4 -/* 04F6E4 8004EAE4 A20E01E5 */ sb $t6, 0x1e5($s0) -.L8004EAE8: -/* 04F6E8 8004EAE8 44805000 */ mtc1 $zero, $f10 -/* 04F6EC 8004EAEC 44810000 */ mtc1 $at, $f0 -/* 04F6F0 8004EAF0 E60A00C0 */ swc1 $f10, 0xc0($s0) -.L8004EAF4: -/* 04F6F4 8004EAF4 820F01E5 */ lb $t7, 0x1e5($s0) -/* 04F6F8 8004EAF8 C7A60098 */ lwc1 $f6, 0x98($sp) -/* 04F6FC 8004EAFC 19E0000E */ blez $t7, .L8004EB38 -/* 04F700 8004EB00 00000000 */ nop -/* 04F704 8004EB04 C6240010 */ lwc1 $f4, 0x10($s1) -/* 04F708 8004EB08 46003200 */ add.s $f8, $f6, $f0 -/* 04F70C 8004EB0C 4608203C */ c.lt.s $f4, $f8 -/* 04F710 8004EB10 00000000 */ nop -/* 04F714 8004EB14 45000008 */ bc1f .L8004EB38 -/* 04F718 8004EB18 00000000 */ nop -/* 04F71C 8004EB1C 8E22004C */ lw $v0, 0x4c($s1) -/* 04F720 8004EB20 00000000 */ nop -/* 04F724 8004EB24 84480014 */ lh $t0, 0x14($v0) -/* 04F728 8004EB28 00000000 */ nop -/* 04F72C 8004EB2C 35180010 */ ori $t8, $t0, 0x10 -/* 04F730 8004EB30 10000007 */ b .L8004EB50 -/* 04F734 8004EB34 A4580014 */ sh $t8, 0x14($v0) -.L8004EB38: -/* 04F738 8004EB38 8E22004C */ lw $v0, 0x4c($s1) -/* 04F73C 8004EB3C 00000000 */ nop -/* 04F740 8004EB40 84590014 */ lh $t9, 0x14($v0) -/* 04F744 8004EB44 00000000 */ nop -/* 04F748 8004EB48 332AFFEF */ andi $t2, $t9, 0xffef -/* 04F74C 8004EB4C A44A0014 */ sh $t2, 0x14($v0) -.L8004EB50: -/* 04F750 8004EB50 0C00AB32 */ jal func_8002ACC8 -/* 04F754 8004EB54 00002025 */ move $a0, $zero -/* 04F758 8004EB58 920901D6 */ lbu $t1, 0x1d6($s0) -/* 04F75C 8004EB5C 00000000 */ nop -/* 04F760 8004EB60 2D21000E */ sltiu $at, $t1, 0xe -/* 04F764 8004EB64 10200088 */ beqz $at, .L8004ED88 -/* 04F768 8004EB68 00094880 */ sll $t1, $t1, 2 -/* 04F76C 8004EB6C 3C01800E */ lui $at, %hi(jpt_800E65B0) # $at, 0x800e -/* 04F770 8004EB70 00290821 */ addu $at, $at, $t1 -/* 04F774 8004EB74 8C2965B0 */ lw $t1, %lo(jpt_800E65B0)($at) -/* 04F778 8004EB78 00000000 */ nop -/* 04F77C 8004EB7C 01200008 */ jr $t1 -/* 04F780 8004EB80 00000000 */ nop -glabel L8004EB84 -/* 04F784 8004EB84 8FA400B4 */ lw $a0, 0xb4($sp) -/* 04F788 8004EB88 8FA5009C */ lw $a1, 0x9c($sp) -/* 04F78C 8004EB8C 02203025 */ move $a2, $s1 -/* 04F790 8004EB90 0C013DFD */ jal func_8004F7F4 -/* 04F794 8004EB94 02003825 */ move $a3, $s0 -/* 04F798 8004EB98 1000007C */ b .L8004ED8C -/* 04F79C 8004EB9C 820A0175 */ lb $t2, 0x175($s0) -glabel L8004EBA0 -/* 04F7A0 8004EBA0 8FA400B4 */ lw $a0, 0xb4($sp) -/* 04F7A4 8004EBA4 8FA5009C */ lw $a1, 0x9c($sp) -/* 04F7A8 8004EBA8 02203025 */ move $a2, $s1 -/* 04F7AC 8004EBAC 0C013308 */ jal func_8004CC20 -/* 04F7B0 8004EBB0 02003825 */ move $a3, $s0 -/* 04F7B4 8004EBB4 10000075 */ b .L8004ED8C -/* 04F7B8 8004EBB8 820A0175 */ lb $t2, 0x175($s0) -glabel L8004EBBC -/* 04F7BC 8004EBBC 8FA400B4 */ lw $a0, 0xb4($sp) -/* 04F7C0 8004EBC0 8FA5009C */ lw $a1, 0x9c($sp) -/* 04F7C4 8004EBC4 02203025 */ move $a2, $s1 -/* 04F7C8 8004EBC8 0C011949 */ jal func_80046524 -/* 04F7CC 8004EBCC 02003825 */ move $a3, $s0 -/* 04F7D0 8004EBD0 1000006E */ b .L8004ED8C -/* 04F7D4 8004EBD4 820A0175 */ lb $t2, 0x175($s0) -glabel L8004EBD8 -/* 04F7D8 8004EBD8 8FA400B4 */ lw $a0, 0xb4($sp) -/* 04F7DC 8004EBDC 8FA5009C */ lw $a1, 0x9c($sp) -/* 04F7E0 8004EBE0 02203025 */ move $a2, $s1 -/* 04F7E4 8004EBE4 0C0125E5 */ jal func_80049794 -/* 04F7E8 8004EBE8 02003825 */ move $a3, $s0 -/* 04F7EC 8004EBEC 10000067 */ b .L8004ED8C -/* 04F7F0 8004EBF0 820A0175 */ lb $t2, 0x175($s0) -glabel L8004EBF4 -/* 04F7F4 8004EBF4 8FA400B4 */ lw $a0, 0xb4($sp) -/* 04F7F8 8004EBF8 8FA5009C */ lw $a1, 0x9c($sp) -/* 04F7FC 8004EBFC 02203025 */ move $a2, $s1 -/* 04F800 8004EC00 0C013657 */ jal func_8004D95C -/* 04F804 8004EC04 02003825 */ move $a3, $s0 -/* 04F808 8004EC08 10000060 */ b .L8004ED8C -/* 04F80C 8004EC0C 820A0175 */ lb $t2, 0x175($s0) -glabel L8004EC10 -/* 04F810 8004EC10 3C0B8012 */ lui $t3, %hi(gCurrentCarInput) # $t3, 0x8012 -/* 04F814 8004EC14 3C0D8012 */ lui $t5, %hi(gActivePlayerButtonPress) # $t5, 0x8012 -/* 04F818 8004EC18 3C0C8012 */ lui $t4, %hi(gRaceStartTimer) # $t4, 0x8012 -/* 04F81C 8004EC1C 258CD540 */ addiu $t4, %lo(gRaceStartTimer) # addiu $t4, $t4, -0x2ac0 -/* 04F820 8004EC20 25ADD52C */ addiu $t5, %lo(gActivePlayerButtonPress) # addiu $t5, $t5, -0x2ad4 -/* 04F824 8004EC24 256BD528 */ addiu $t3, %lo(gCurrentCarInput) # addiu $t3, $t3, -0x2ad8 -/* 04F828 8004EC28 8FA400B4 */ lw $a0, 0xb4($sp) -/* 04F82C 8004EC2C 8FA5009C */ lw $a1, 0x9c($sp) -/* 04F830 8004EC30 AFAB0010 */ sw $t3, 0x10($sp) -/* 04F834 8004EC34 AFAD0014 */ sw $t5, 0x14($sp) -/* 04F838 8004EC38 AFAC0018 */ sw $t4, 0x18($sp) -/* 04F83C 8004EC3C 02203025 */ move $a2, $s1 -/* 04F840 8004EC40 0C0170D9 */ jal func_8005C364 -/* 04F844 8004EC44 02003825 */ move $a3, $s0 -/* 04F848 8004EC48 10000050 */ b .L8004ED8C -/* 04F84C 8004EC4C 820A0175 */ lb $t2, 0x175($s0) -glabel L8004EC50 -/* 04F850 8004EC50 3C0E8012 */ lui $t6, %hi(gCurrentCarInput) # $t6, 0x8012 -/* 04F854 8004EC54 3C0F8012 */ lui $t7, %hi(gActivePlayerButtonPress) # $t7, 0x8012 -/* 04F858 8004EC58 3C088012 */ lui $t0, %hi(gRaceStartTimer) # $t0, 0x8012 -/* 04F85C 8004EC5C 2508D540 */ addiu $t0, %lo(gRaceStartTimer) # addiu $t0, $t0, -0x2ac0 -/* 04F860 8004EC60 25EFD52C */ addiu $t7, %lo(gActivePlayerButtonPress) # addiu $t7, $t7, -0x2ad4 -/* 04F864 8004EC64 25CED528 */ addiu $t6, %lo(gCurrentCarInput) # addiu $t6, $t6, -0x2ad8 -/* 04F868 8004EC68 8FA400B4 */ lw $a0, 0xb4($sp) -/* 04F86C 8004EC6C 8FA5009C */ lw $a1, 0x9c($sp) -/* 04F870 8004EC70 AFAE0010 */ sw $t6, 0x10($sp) -/* 04F874 8004EC74 AFAF0014 */ sw $t7, 0x14($sp) -/* 04F878 8004EC78 AFA80018 */ sw $t0, 0x18($sp) -/* 04F87C 8004EC7C 02203025 */ move $a2, $s1 -/* 04F880 8004EC80 0C017434 */ jal func_8005D0D0 -/* 04F884 8004EC84 02003825 */ move $a3, $s0 -/* 04F888 8004EC88 10000040 */ b .L8004ED8C -/* 04F88C 8004EC8C 820A0175 */ lb $t2, 0x175($s0) -glabel L8004EC90 -/* 04F890 8004EC90 3C188012 */ lui $t8, %hi(gCurrentCarInput) # $t8, 0x8012 -/* 04F894 8004EC94 3C198012 */ lui $t9, %hi(gCurrentStickX) # $t9, 0x8012 -/* 04F898 8004EC98 3C0A8012 */ lui $t2, %hi(gRaceStartTimer) # $t2, 0x8012 -/* 04F89C 8004EC9C 254AD540 */ addiu $t2, %lo(gRaceStartTimer) # addiu $t2, $t2, -0x2ac0 -/* 04F8A0 8004ECA0 2739D534 */ addiu $t9, %lo(gCurrentStickX) # addiu $t9, $t9, -0x2acc -/* 04F8A4 8004ECA4 2718D528 */ addiu $t8, %lo(gCurrentCarInput) # addiu $t8, $t8, -0x2ad8 -/* 04F8A8 8004ECA8 8FA400B4 */ lw $a0, 0xb4($sp) -/* 04F8AC 8004ECAC 8FA5009C */ lw $a1, 0x9c($sp) -/* 04F8B0 8004ECB0 AFB80010 */ sw $t8, 0x10($sp) -/* 04F8B4 8004ECB4 AFB90014 */ sw $t9, 0x14($sp) -/* 04F8B8 8004ECB8 AFAA0018 */ sw $t2, 0x18($sp) -/* 04F8BC 8004ECBC 02203025 */ move $a2, $s1 -/* 04F8C0 8004ECC0 0C017608 */ jal func_8005D820 -/* 04F8C4 8004ECC4 02003825 */ move $a3, $s0 -/* 04F8C8 8004ECC8 10000030 */ b .L8004ED8C -/* 04F8CC 8004ECCC 820A0175 */ lb $t2, 0x175($s0) -glabel L8004ECD0 -/* 04F8D0 8004ECD0 3C098012 */ lui $t1, %hi(gCurrentCarInput) # $t1, 0x8012 -/* 04F8D4 8004ECD4 3C0B8012 */ lui $t3, %hi(gActivePlayerButtonPress) # $t3, 0x8012 -/* 04F8D8 8004ECD8 3C0D8012 */ lui $t5, %hi(gRaceStartTimer) # $t5, 0x8012 -/* 04F8DC 8004ECDC 25ADD540 */ addiu $t5, %lo(gRaceStartTimer) # addiu $t5, $t5, -0x2ac0 -/* 04F8E0 8004ECE0 256BD52C */ addiu $t3, %lo(gActivePlayerButtonPress) # addiu $t3, $t3, -0x2ad4 -/* 04F8E4 8004ECE4 2529D528 */ addiu $t1, %lo(gCurrentCarInput) # addiu $t1, $t1, -0x2ad8 -/* 04F8E8 8004ECE8 8FA400B4 */ lw $a0, 0xb4($sp) -/* 04F8EC 8004ECEC 8FA5009C */ lw $a1, 0x9c($sp) -/* 04F8F0 8004ECF0 AFA90010 */ sw $t1, 0x10($sp) -/* 04F8F4 8004ECF4 AFAB0014 */ sw $t3, 0x14($sp) -/* 04F8F8 8004ECF8 AFAD0018 */ sw $t5, 0x18($sp) -/* 04F8FC 8004ECFC 02203025 */ move $a2, $s1 -/* 04F900 8004ED00 0C017930 */ jal func_8005E4C0 -/* 04F904 8004ED04 02003825 */ move $a3, $s0 -/* 04F908 8004ED08 10000020 */ b .L8004ED8C -/* 04F90C 8004ED0C 820A0175 */ lb $t2, 0x175($s0) -glabel L8004ED10 -/* 04F910 8004ED10 3C0C8012 */ lui $t4, %hi(gCurrentCarInput) # $t4, 0x8012 -/* 04F914 8004ED14 3C0E8012 */ lui $t6, %hi(gActivePlayerButtonPress) # $t6, 0x8012 -/* 04F918 8004ED18 3C0F8012 */ lui $t7, %hi(gRaceStartTimer) # $t7, 0x8012 -/* 04F91C 8004ED1C 25EFD540 */ addiu $t7, %lo(gRaceStartTimer) # addiu $t7, $t7, -0x2ac0 -/* 04F920 8004ED20 25CED52C */ addiu $t6, %lo(gActivePlayerButtonPress) # addiu $t6, $t6, -0x2ad4 -/* 04F924 8004ED24 258CD528 */ addiu $t4, %lo(gCurrentCarInput) # addiu $t4, $t4, -0x2ad8 -/* 04F928 8004ED28 8FA400B4 */ lw $a0, 0xb4($sp) -/* 04F92C 8004ED2C 8FA5009C */ lw $a1, 0x9c($sp) -/* 04F930 8004ED30 AFAC0010 */ sw $t4, 0x10($sp) -/* 04F934 8004ED34 AFAE0014 */ sw $t6, 0x14($sp) -/* 04F938 8004ED38 AFAF0018 */ sw $t7, 0x18($sp) -/* 04F93C 8004ED3C 02203025 */ move $a2, $s1 -/* 04F940 8004ED40 0C017AA4 */ jal func_8005EA90 -/* 04F944 8004ED44 02003825 */ move $a3, $s0 -/* 04F948 8004ED48 10000010 */ b .L8004ED8C -/* 04F94C 8004ED4C 820A0175 */ lb $t2, 0x175($s0) -glabel L8004ED50 -/* 04F950 8004ED50 3C088012 */ lui $t0, %hi(gCurrentCarInput) # $t0, 0x8012 -/* 04F954 8004ED54 3C188012 */ lui $t8, %hi(gActivePlayerButtonPress) # $t8, 0x8012 -/* 04F958 8004ED58 3C198012 */ lui $t9, %hi(gRaceStartTimer) # $t9, 0x8012 -/* 04F95C 8004ED5C 2739D540 */ addiu $t9, %lo(gRaceStartTimer) # addiu $t9, $t9, -0x2ac0 -/* 04F960 8004ED60 2718D52C */ addiu $t8, %lo(gActivePlayerButtonPress) # addiu $t8, $t8, -0x2ad4 -/* 04F964 8004ED64 2508D528 */ addiu $t0, %lo(gCurrentCarInput) # addiu $t0, $t0, -0x2ad8 -/* 04F968 8004ED68 8FA400B4 */ lw $a0, 0xb4($sp) -/* 04F96C 8004ED6C 8FA5009C */ lw $a1, 0x9c($sp) -/* 04F970 8004ED70 AFA80010 */ sw $t0, 0x10($sp) -/* 04F974 8004ED74 AFB80014 */ sw $t8, 0x14($sp) -/* 04F978 8004ED78 AFB90018 */ sw $t9, 0x18($sp) -/* 04F97C 8004ED7C 02203025 */ move $a2, $s1 -/* 04F980 8004ED80 0C017CC4 */ jal func_8005F310 -/* 04F984 8004ED84 02003825 */ move $a3, $s0 -.L8004ED88: -glabel L8004ED88 -/* 04F988 8004ED88 820A0175 */ lb $t2, 0x175($s0) -.L8004ED8C: -/* 04F98C 8004ED8C 00000000 */ nop -/* 04F990 8004ED90 15400009 */ bnez $t2, .L8004EDB8 -/* 04F994 8004ED94 8FA9007C */ lw $t1, 0x7c($sp) -/* 04F998 8004ED98 8E040178 */ lw $a0, 0x178($s0) -/* 04F99C 8004ED9C 00000000 */ nop -/* 04F9A0 8004EDA0 10800005 */ beqz $a0, .L8004EDB8 -/* 04F9A4 8004EDA4 8FA9007C */ lw $t1, 0x7c($sp) -/* 04F9A8 8004EDA8 0C001223 */ jal func_8000488C -/* 04F9AC 8004EDAC 00000000 */ nop -/* 04F9B0 8004EDB0 AE000178 */ sw $zero, 0x178($s0) -/* 04F9B4 8004EDB4 8FA9007C */ lw $t1, 0x7c($sp) -.L8004EDB8: -/* 04F9B8 8004EDB8 00000000 */ nop -/* 04F9BC 8004EDBC 8122004A */ lb $v0, 0x4a($t1) -/* 04F9C0 8004EDC0 00000000 */ nop -/* 04F9C4 8004EDC4 10400011 */ beqz $v0, .L8004EE0C -/* 04F9C8 8004EDC8 8FAB00A4 */ lw $t3, 0xa4($sp) -/* 04F9CC 8004EDCC 44825000 */ mtc1 $v0, $f10 -/* 04F9D0 8004EDD0 C600002C */ lwc1 $f0, 0x2c($s0) -/* 04F9D4 8004EDD4 468050A0 */ cvt.s.w $f2, $f10 -/* 04F9D8 8004EDD8 4600103C */ c.lt.s $f2, $f0 -/* 04F9DC 8004EDDC 46001307 */ neg.s $f12, $f2 -/* 04F9E0 8004EDE0 45000004 */ bc1f .L8004EDF4 -/* 04F9E4 8004EDE4 00000000 */ nop -/* 04F9E8 8004EDE8 E602002C */ swc1 $f2, 0x2c($s0) -/* 04F9EC 8004EDEC C600002C */ lwc1 $f0, 0x2c($s0) -/* 04F9F0 8004EDF0 00000000 */ nop -.L8004EDF4: -/* 04F9F4 8004EDF4 460C003C */ c.lt.s $f0, $f12 -/* 04F9F8 8004EDF8 00000000 */ nop -/* 04F9FC 8004EDFC 45000003 */ bc1f .L8004EE0C -/* 04FA00 8004EE00 8FAB00A4 */ lw $t3, 0xa4($sp) -/* 04FA04 8004EE04 E60C002C */ swc1 $f12, 0x2c($s0) -/* 04FA08 8004EE08 8FAB00A4 */ lw $t3, 0xa4($sp) -.L8004EE0C: -/* 04FA0C 8004EE0C 24010001 */ li $at, 1 -/* 04FA10 8004EE10 15610004 */ bne $t3, $at, .L8004EE24 -/* 04FA14 8004EE14 00000000 */ nop -/* 04FA18 8004EE18 0C003852 */ jal func_8000E148 -/* 04FA1C 8004EE1C 00000000 */ nop -/* 04FA20 8004EE20 10400007 */ beqz $v0, .L8004EE40 -.L8004EE24: -/* 04FA24 8004EE24 3C058012 */ lui $a1, %hi(gActivePlayerButtonPress) # $a1, 0x8012 -/* 04FA28 8004EE28 3C068012 */ lui $a2, %hi(gCurrentCarInput) # $a2, 0x8012 -/* 04FA2C 8004EE2C 8CC6D528 */ lw $a2, %lo(gCurrentCarInput)($a2) -/* 04FA30 8004EE30 8CA5D52C */ lw $a1, %lo(gActivePlayerButtonPress)($a1) -/* 04FA34 8004EE34 8FA700B4 */ lw $a3, 0xb4($sp) -/* 04FA38 8004EE38 0C001434 */ jal func_800050D0 -/* 04FA3C 8004EE3C 02202025 */ move $a0, $s1 -.L8004EE40: -/* 04FA40 8004EE40 C60600A8 */ lwc1 $f6, 0xa8($s0) -/* 04FA44 8004EE44 C7A40088 */ lwc1 $f4, 0x88($sp) -/* 04FA48 8004EE48 E7A60084 */ swc1 $f6, 0x84($sp) -/* 04FA4C 8004EE4C 82040192 */ lb $a0, 0x192($s0) -/* 04FA50 8004EE50 8FA60090 */ lw $a2, 0x90($sp) -/* 04FA54 8004EE54 8FA7008C */ lw $a3, 0x8c($sp) -/* 04FA58 8004EE58 260D00A8 */ addiu $t5, $s0, 0xa8 -/* 04FA5C 8004EE5C 260C01C8 */ addiu $t4, $s0, 0x1c8 -/* 04FA60 8004EE60 AFAC0018 */ sw $t4, 0x18($sp) -/* 04FA64 8004EE64 AFAD0014 */ sw $t5, 0x14($sp) -/* 04FA68 8004EE68 02202825 */ move $a1, $s1 -/* 04FA6C 8004EE6C 0C006179 */ jal func_800185E4 -/* 04FA70 8004EE70 E7A40010 */ swc1 $f4, 0x10($sp) -/* 04FA74 8004EE74 2401FF9C */ li $at, -100 -/* 04FA78 8004EE78 14410006 */ bne $v0, $at, .L8004EE94 -/* 04FA7C 8004EE7C 00403025 */ move $a2, $v0 -/* 04FA80 8004EE80 02002025 */ move $a0, $s0 -/* 04FA84 8004EE84 0C01709C */ jal func_8005C270 -/* 04FA88 8004EE88 AFA200AC */ sw $v0, 0xac($sp) -/* 04FA8C 8004EE8C 8FA600AC */ lw $a2, 0xac($sp) -/* 04FA90 8004EE90 00000000 */ nop -.L8004EE94: -/* 04FA94 8004EE94 82040192 */ lb $a0, 0x192($s0) -/* 04FA98 8004EE98 920501C8 */ lbu $a1, 0x1c8($s0) -/* 04FA9C 8004EE9C 0C006E87 */ jal func_8001BA1C -/* 04FAA0 8004EEA0 AFA600AC */ sw $a2, 0xac($sp) -/* 04FAA4 8004EEA4 860E0000 */ lh $t6, ($s0) -/* 04FAA8 8004EEA8 8FA600AC */ lw $a2, 0xac($sp) -/* 04FAAC 8004EEAC 2401FFFF */ li $at, -1 -/* 04FAB0 8004EEB0 15C1000D */ bne $t6, $at, .L8004EEE8 -/* 04FAB4 8004EEB4 00000000 */ nop -/* 04FAB8 8004EEB8 820F01CA */ lb $t7, 0x1ca($s0) -/* 04FABC 8004EEBC 24010005 */ li $at, 5 -/* 04FAC0 8004EEC0 004F4021 */ addu $t0, $v0, $t7 -/* 04FAC4 8004EEC4 81180036 */ lb $t8, 0x36($t0) -/* 04FAC8 8004EEC8 00000000 */ nop -/* 04FACC 8004EECC 17010006 */ bne $t8, $at, .L8004EEE8 -/* 04FAD0 8004EED0 00000000 */ nop -/* 04FAD4 8004EED4 821901E5 */ lb $t9, 0x1e5($s0) -/* 04FAD8 8004EED8 240A0001 */ li $t2, 1 -/* 04FADC 8004EEDC 13200002 */ beqz $t9, .L8004EEE8 -/* 04FAE0 8004EEE0 00000000 */ nop -/* 04FAE4 8004EEE4 A20A01C8 */ sb $t2, 0x1c8($s0) -.L8004EEE8: -/* 04FAE8 8004EEE8 820901CA */ lb $t1, 0x1ca($s0) -/* 04FAEC 8004EEEC 24010006 */ li $at, 6 -/* 04FAF0 8004EEF0 00495821 */ addu $t3, $v0, $t1 -/* 04FAF4 8004EEF4 816D0036 */ lb $t5, 0x36($t3) -/* 04FAF8 8004EEF8 00000000 */ nop -/* 04FAFC 8004EEFC 15A10007 */ bne $t5, $at, .L8004EF1C -/* 04FB00 8004EF00 00000000 */ nop -/* 04FB04 8004EF04 8FAC007C */ lw $t4, 0x7c($sp) -/* 04FB08 8004EF08 00000000 */ nop -/* 04FB0C 8004EF0C 818E004B */ lb $t6, 0x4b($t4) -/* 04FB10 8004EF10 00000000 */ nop -/* 04FB14 8004EF14 25CF0001 */ addiu $t7, $t6, 1 -/* 04FB18 8004EF18 A20F0193 */ sb $t7, 0x193($s0) -.L8004EF1C: -/* 04FB1C 8004EF1C 86030000 */ lh $v1, ($s0) -/* 04FB20 8004EF20 14C00097 */ bnez $a2, .L8004F180 -/* 04FB24 8004EF24 2401FFFF */ li $at, -1 -/* 04FB28 8004EF28 14610009 */ bne $v1, $at, .L8004EF50 -/* 04FB2C 8004EF2C 00000000 */ nop -/* 04FB30 8004EF30 820801CA */ lb $t0, 0x1ca($s0) -/* 04FB34 8004EF34 24010002 */ li $at, 2 -/* 04FB38 8004EF38 0048C021 */ addu $t8, $v0, $t0 -/* 04FB3C 8004EF3C 83190036 */ lb $t9, 0x36($t8) -/* 04FB40 8004EF40 240A0001 */ li $t2, 1 -/* 04FB44 8004EF44 17210002 */ bne $t9, $at, .L8004EF50 -/* 04FB48 8004EF48 00000000 */ nop -/* 04FB4C 8004EF4C A20A01C8 */ sb $t2, 0x1c8($s0) -.L8004EF50: -/* 04FB50 8004EF50 0C006E99 */ jal func_8001BA64 -/* 04FB54 8004EF54 00000000 */ nop -/* 04FB58 8004EF58 AFA200A8 */ sw $v0, 0xa8($sp) -/* 04FB5C 8004EF5C 82090192 */ lb $t1, 0x192($s0) -/* 04FB60 8004EF60 00000000 */ nop -/* 04FB64 8004EF64 252B0001 */ addiu $t3, $t1, 1 -/* 04FB68 8004EF68 A20B0192 */ sb $t3, 0x192($s0) -/* 04FB6C 8004EF6C 820D0192 */ lb $t5, 0x192($s0) -/* 04FB70 8004EF70 00000000 */ nop -/* 04FB74 8004EF74 01A2082A */ slt $at, $t5, $v0 -/* 04FB78 8004EF78 14200023 */ bnez $at, .L8004F008 -/* 04FB7C 8004EF7C 00000000 */ nop -/* 04FB80 8004EF80 860C0190 */ lh $t4, 0x190($s0) -/* 04FB84 8004EF84 A2000192 */ sb $zero, 0x192($s0) -/* 04FB88 8004EF88 19800007 */ blez $t4, .L8004EFA8 -/* 04FB8C 8004EF8C 00000000 */ nop -/* 04FB90 8004EF90 82020193 */ lb $v0, 0x193($s0) -/* 04FB94 8004EF94 00000000 */ nop -/* 04FB98 8004EF98 28410078 */ slti $at, $v0, 0x78 -/* 04FB9C 8004EF9C 10200002 */ beqz $at, .L8004EFA8 -/* 04FBA0 8004EFA0 244E0001 */ addiu $t6, $v0, 1 -/* 04FBA4 8004EFA4 A20E0193 */ sb $t6, 0x193($s0) -.L8004EFA8: -/* 04FBA8 8004EFA8 860F0000 */ lh $t7, ($s0) -/* 04FBAC 8004EFAC 2401FFFF */ li $at, -1 -/* 04FBB0 8004EFB0 11E10015 */ beq $t7, $at, .L8004F008 -/* 04FBB4 8004EFB4 00000000 */ nop -/* 04FBB8 8004EFB8 8FA8007C */ lw $t0, 0x7c($sp) -/* 04FBBC 8004EFBC 82190193 */ lb $t9, 0x193($s0) -/* 04FBC0 8004EFC0 8118004B */ lb $t8, 0x4b($t0) -/* 04FBC4 8004EFC4 272A0001 */ addiu $t2, $t9, 1 -/* 04FBC8 8004EFC8 170A000F */ bne $t8, $t2, .L8004F008 -/* 04FBCC 8004EFCC 3C098012 */ lui $t1, %hi(D_8011D580) # $t1, 0x8012 -/* 04FBD0 8004EFD0 9129D580 */ lbu $t1, %lo(D_8011D580)($t1) -/* 04FBD4 8004EFD4 00000000 */ nop -/* 04FBD8 8004EFD8 1520000B */ bnez $t1, .L8004F008 -/* 04FBDC 8004EFDC 00000000 */ nop -/* 04FBE0 8004EFE0 0C01AF66 */ jal get_current_level_race_type -/* 04FBE4 8004EFE4 00000000 */ nop -/* 04FBE8 8004EFE8 14400007 */ bnez $v0, .L8004F008 -/* 04FBEC 8004EFEC 3C01800E */ lui $at, %hi(D_800E65E8) # $at, 0x800e -/* 04FBF0 8004EFF0 C42C65E8 */ lwc1 $f12, %lo(D_800E65E8)($at) -/* 04FBF4 8004EFF4 0C00052F */ jal func_800014BC -/* 04FBF8 8004EFF8 00000000 */ nop -/* 04FBFC 8004EFFC 240B0001 */ li $t3, 1 -/* 04FC00 8004F000 3C018012 */ lui $at, %hi(D_8011D580) # $at, 0x8012 -/* 04FC04 8004F004 A02BD580 */ sb $t3, %lo(D_8011D580)($at) -.L8004F008: -/* 04FC08 8004F008 0C008D07 */ jal func_8002341C -/* 04FC0C 8004F00C 00000000 */ nop -/* 04FC10 8004F010 1040004C */ beqz $v0, .L8004F144 -/* 04FC14 8004F014 3C0D8012 */ lui $t5, %hi(D_8011D55C) # $t5, 0x8012 -/* 04FC18 8004F018 8DADD55C */ lw $t5, %lo(D_8011D55C)($t5) -/* 04FC1C 8004F01C 2401FFFF */ li $at, -1 -/* 04FC20 8004F020 11A10049 */ beq $t5, $at, .L8004F148 -/* 04FC24 8004F024 8FAE007C */ lw $t6, 0x7c($sp) -/* 04FC28 8004F028 82040192 */ lb $a0, 0x192($s0) -/* 04FC2C 8004F02C 920501C8 */ lbu $a1, 0x1c8($s0) -/* 04FC30 8004F030 0C006E87 */ jal func_8001BA1C -/* 04FC34 8004F034 00000000 */ nop -/* 04FC38 8004F038 8E0C015C */ lw $t4, 0x15c($s0) -/* 04FC3C 8004F03C 00401825 */ move $v1, $v0 -/* 04FC40 8004F040 15800012 */ bnez $t4, .L8004F08C -/* 04FC44 8004F044 240E0086 */ li $t6, 134 -/* 04FC48 8004F048 240F0008 */ li $t7, 8 -/* 04FC4C 8004F04C A7A00066 */ sh $zero, 0x66($sp) -/* 04FC50 8004F050 A7A00068 */ sh $zero, 0x68($sp) -/* 04FC54 8004F054 A7A0006A */ sh $zero, 0x6a($sp) -/* 04FC58 8004F058 A3AE0064 */ sb $t6, 0x64($sp) -/* 04FC5C 8004F05C A3AF0065 */ sb $t7, 0x65($sp) -/* 04FC60 8004F060 27A40064 */ addiu $a0, $sp, 0x64 -/* 04FC64 8004F064 24050001 */ li $a1, 1 -/* 04FC68 8004F068 0C003A95 */ jal spawn_object -/* 04FC6C 8004F06C AFA20078 */ sw $v0, 0x78($sp) -/* 04FC70 8004F070 8FA30078 */ lw $v1, 0x78($sp) -/* 04FC74 8004F074 10400005 */ beqz $v0, .L8004F08C -/* 04FC78 8004F078 AE02015C */ sw $v0, 0x15c($s0) -/* 04FC7C 8004F07C AC40003C */ sw $zero, 0x3c($v0) -/* 04FC80 8004F080 8E18015C */ lw $t8, 0x15c($s0) -/* 04FC84 8004F084 24190080 */ li $t9, 128 -/* 04FC88 8004F088 A3190039 */ sb $t9, 0x39($t8) -.L8004F08C: -/* 04FC8C 8004F08C 8E02015C */ lw $v0, 0x15c($s0) -/* 04FC90 8004F090 00000000 */ nop -/* 04FC94 8004F094 1040002C */ beqz $v0, .L8004F148 -/* 04FC98 8004F098 8FAE007C */ lw $t6, 0x7c($sp) -/* 04FC9C 8004F09C 8C6A0028 */ lw $t2, 0x28($v1) -/* 04FCA0 8004F0A0 3C01403E */ li $at, 0x403E0000 # 2.968750 -/* 04FCA4 8004F0A4 C548000C */ lwc1 $f8, 0xc($t2) -/* 04FCA8 8004F0A8 00000000 */ nop -/* 04FCAC 8004F0AC E448000C */ swc1 $f8, 0xc($v0) -/* 04FCB0 8004F0B0 8C690028 */ lw $t1, 0x28($v1) -/* 04FCB4 8004F0B4 8E0B015C */ lw $t3, 0x15c($s0) -/* 04FCB8 8004F0B8 C52A0010 */ lwc1 $f10, 0x10($t1) -/* 04FCBC 8004F0BC 00000000 */ nop -/* 04FCC0 8004F0C0 E56A0010 */ swc1 $f10, 0x10($t3) -/* 04FCC4 8004F0C4 820D01D6 */ lb $t5, 0x1d6($s0) -/* 04FCC8 8004F0C8 00000000 */ nop -/* 04FCCC 8004F0CC 15A00009 */ bnez $t5, .L8004F0F4 -/* 04FCD0 8004F0D0 00000000 */ nop -/* 04FCD4 8004F0D4 8E02015C */ lw $v0, 0x15c($s0) -/* 04FCD8 8004F0D8 44814800 */ mtc1 $at, $f9 -/* 04FCDC 8004F0DC C4460010 */ lwc1 $f6, 0x10($v0) -/* 04FCE0 8004F0E0 44804000 */ mtc1 $zero, $f8 -/* 04FCE4 8004F0E4 46003121 */ cvt.d.s $f4, $f6 -/* 04FCE8 8004F0E8 46282281 */ sub.d $f10, $f4, $f8 -/* 04FCEC 8004F0EC 462051A0 */ cvt.s.d $f6, $f10 -/* 04FCF0 8004F0F0 E4460010 */ swc1 $f6, 0x10($v0) -.L8004F0F4: -/* 04FCF4 8004F0F4 8C6C0028 */ lw $t4, 0x28($v1) -/* 04FCF8 8004F0F8 8E0E015C */ lw $t6, 0x15c($s0) -/* 04FCFC 8004F0FC C5840014 */ lwc1 $f4, 0x14($t4) -/* 04FD00 8004F100 00000000 */ nop -/* 04FD04 8004F104 E5C40014 */ swc1 $f4, 0x14($t6) -/* 04FD08 8004F108 8C6F0028 */ lw $t7, 0x28($v1) -/* 04FD0C 8004F10C 8E19015C */ lw $t9, 0x15c($s0) -/* 04FD10 8004F110 85E80000 */ lh $t0, ($t7) -/* 04FD14 8004F114 00000000 */ nop -/* 04FD18 8004F118 A7280000 */ sh $t0, ($t9) -/* 04FD1C 8004F11C 8C780028 */ lw $t8, 0x28($v1) -/* 04FD20 8004F120 8E09015C */ lw $t1, 0x15c($s0) -/* 04FD24 8004F124 870A0002 */ lh $t2, 2($t8) -/* 04FD28 8004F128 00000000 */ nop -/* 04FD2C 8004F12C A52A0002 */ sh $t2, 2($t1) -/* 04FD30 8004F130 8C6B0028 */ lw $t3, 0x28($v1) -/* 04FD34 8004F134 8E0C015C */ lw $t4, 0x15c($s0) -/* 04FD38 8004F138 856D002E */ lh $t5, 0x2e($t3) -/* 04FD3C 8004F13C 00000000 */ nop -/* 04FD40 8004F140 A58D002E */ sh $t5, 0x2e($t4) -.L8004F144: -/* 04FD44 8004F144 8FAE007C */ lw $t6, 0x7c($sp) -.L8004F148: -/* 04FD48 8004F148 8FB900A8 */ lw $t9, 0xa8($sp) -/* 04FD4C 8004F14C 81CF004B */ lb $t7, 0x4b($t6) -/* 04FD50 8004F150 86020190 */ lh $v0, 0x190($s0) -/* 04FD54 8004F154 25E80003 */ addiu $t0, $t7, 3 -/* 04FD58 8004F158 01190019 */ multu $t0, $t9 -/* 04FD5C 8004F15C 24092710 */ li $t1, 10000 -/* 04FD60 8004F160 244A0001 */ addiu $t2, $v0, 1 -/* 04FD64 8004F164 0000C012 */ mflo $t8 -/* 04FD68 8004F168 0058082A */ slt $at, $v0, $t8 -/* 04FD6C 8004F16C 10200002 */ beqz $at, .L8004F178 -/* 04FD70 8004F170 00000000 */ nop -/* 04FD74 8004F174 A60A0190 */ sh $t2, 0x190($s0) -.L8004F178: -/* 04FD78 8004F178 1000000D */ b .L8004F1B0 -/* 04FD7C 8004F17C A60901A8 */ sh $t1, 0x1a8($s0) -.L8004F180: -/* 04FD80 8004F180 2401FFFF */ li $at, -1 -/* 04FD84 8004F184 14610009 */ bne $v1, $at, .L8004F1AC -/* 04FD88 8004F188 00000000 */ nop -/* 04FD8C 8004F18C C7A00084 */ lwc1 $f0, 0x84($sp) -/* 04FD90 8004F190 C60800A8 */ lwc1 $f8, 0xa8($s0) -/* 04FD94 8004F194 00000000 */ nop -/* 04FD98 8004F198 4608003C */ c.lt.s $f0, $f8 -/* 04FD9C 8004F19C 00000000 */ nop -/* 04FDA0 8004F1A0 45000002 */ bc1f .L8004F1AC -/* 04FDA4 8004F1A4 00000000 */ nop -/* 04FDA8 8004F1A8 E60000A8 */ swc1 $f0, 0xa8($s0) -.L8004F1AC: -/* 04FDAC 8004F1AC A60601A8 */ sh $a2, 0x1a8($s0) -.L8004F1B0: -/* 04FDB0 8004F1B0 0C008D07 */ jal func_8002341C -/* 04FDB4 8004F1B4 00000000 */ nop -/* 04FDB8 8004F1B8 10400013 */ beqz $v0, .L8004F208 -/* 04FDBC 8004F1BC 8FAF00B4 */ lw $t7, 0xb4($sp) -/* 04FDC0 8004F1C0 8E02015C */ lw $v0, 0x15c($s0) -/* 04FDC4 8004F1C4 8FAD00B4 */ lw $t5, 0xb4($sp) -/* 04FDC8 8004F1C8 10400005 */ beqz $v0, .L8004F1E0 -/* 04FDCC 8004F1CC 00000000 */ nop -/* 04FDD0 8004F1D0 844B0018 */ lh $t3, 0x18($v0) -/* 04FDD4 8004F1D4 000D60C0 */ sll $t4, $t5, 3 -/* 04FDD8 8004F1D8 016C7021 */ addu $t6, $t3, $t4 -/* 04FDDC 8004F1DC A44E0018 */ sh $t6, 0x18($v0) -.L8004F1E0: -/* 04FDE0 8004F1E0 860201BA */ lh $v0, 0x1ba($s0) -/* 04FDE4 8004F1E4 00000000 */ nop -/* 04FDE8 8004F1E8 28410191 */ slti $at, $v0, 0x191 -/* 04FDEC 8004F1EC 10200003 */ beqz $at, .L8004F1FC -/* 04FDF0 8004F1F0 2841FE70 */ slti $at, $v0, -0x190 -/* 04FDF4 8004F1F4 10200004 */ beqz $at, .L8004F208 -/* 04FDF8 8004F1F8 8FAF00B4 */ lw $t7, 0xb4($sp) -.L8004F1FC: -/* 04FDFC 8004F1FC 0C008B86 */ jal func_80022E18 -/* 04FE00 8004F200 24040002 */ li $a0, 2 -/* 04FE04 8004F204 8FAF00B4 */ lw $t7, 0xb4($sp) -.L8004F208: -/* 04FE08 8004F208 8FA50090 */ lw $a1, 0x90($sp) -/* 04FE0C 8004F20C 8FA6008C */ lw $a2, 0x8c($sp) -/* 04FE10 8004F210 8FA70088 */ lw $a3, 0x88($sp) -/* 04FE14 8004F214 02202025 */ move $a0, $s1 -/* 04FE18 8004F218 0C006338 */ jal func_80018CE0 -/* 04FE1C 8004F21C AFAF0010 */ sw $t7, 0x10($sp) -/* 04FE20 8004F220 8FA600B4 */ lw $a2, 0xb4($sp) -/* 04FE24 8004F224 02202025 */ move $a0, $s1 -/* 04FE28 8004F228 0C016482 */ jal func_80059208 -/* 04FE2C 8004F22C 02002825 */ move $a1, $s0 -/* 04FE30 8004F230 820801D8 */ lb $t0, 0x1d8($s0) -/* 04FE34 8004F234 24010001 */ li $at, 1 -/* 04FE38 8004F238 15010007 */ bne $t0, $at, .L8004F258 -/* 04FE3C 8004F23C 00000000 */ nop -/* 04FE40 8004F240 820201D9 */ lb $v0, 0x1d9($s0) -/* 04FE44 8004F244 8FB900B4 */ lw $t9, 0xb4($sp) -/* 04FE48 8004F248 2841003C */ slti $at, $v0, 0x3c -/* 04FE4C 8004F24C 10200002 */ beqz $at, .L8004F258 -/* 04FE50 8004F250 0059C021 */ addu $t8, $v0, $t9 -/* 04FE54 8004F254 A21801D9 */ sb $t8, 0x1d9($s0) -.L8004F258: -/* 04FE58 8004F258 82060188 */ lb $a2, 0x188($s0) -/* 04FE5C 8004F25C 00000000 */ nop -/* 04FE60 8004F260 18C00003 */ blez $a2, .L8004F270 -/* 04FE64 8004F264 02202025 */ move $a0, $s1 -/* 04FE68 8004F268 0C015DB8 */ jal func_800576E0 -/* 04FE6C 8004F26C 02002825 */ move $a1, $s0 -.L8004F270: -/* 04FE70 8004F270 3C0A8012 */ lui $t2, %hi(D_8011D55C) # $t2, 0x8012 -/* 04FE74 8004F274 8D4AD55C */ lw $t2, %lo(D_8011D55C)($t2) -/* 04FE78 8004F278 02202025 */ move $a0, $s1 -/* 04FE7C 8004F27C A60A0000 */ sh $t2, ($s0) -/* 04FE80 8004F280 8FA6009C */ lw $a2, 0x9c($sp) -/* 04FE84 8004F284 0C015E90 */ jal func_80057A40 -/* 04FE88 8004F288 02002825 */ move $a1, $s0 -/* 04FE8C 8004F28C 3C018012 */ lui $at, %hi(D_8011D583) # $at, 0x8012 -/* 04FE90 8004F290 A020D583 */ sb $zero, %lo(D_8011D583)($at) -/* 04FE94 8004F294 8E090148 */ lw $t1, 0x148($s0) -/* 04FE98 8004F298 44802000 */ mtc1 $zero, $f4 -/* 04FE9C 8004F29C 11200005 */ beqz $t1, .L8004F2B4 -/* 04FEA0 8004F2A0 3C02800E */ lui $v0, %hi(D_800DCB54) # $v0, 0x800e -/* 04FEA4 8004F2A4 44807000 */ mtc1 $zero, $f14 -/* 04FEA8 8004F2A8 AE000148 */ sw $zero, 0x148($s0) -/* 04FEAC 8004F2AC E60E002C */ swc1 $f14, 0x2c($s0) -/* 04FEB0 8004F2B0 E60E0030 */ swc1 $f14, 0x30($s0) -.L8004F2B4: -/* 04FEB4 8004F2B4 C60C0090 */ lwc1 $f12, 0x90($s0) -/* 04FEB8 8004F2B8 C600008C */ lwc1 $f0, 0x8c($s0) -/* 04FEBC 8004F2BC 44807000 */ mtc1 $zero, $f14 -/* 04FEC0 8004F2C0 460C003E */ c.le.s $f0, $f12 -/* 04FEC4 8004F2C4 46006281 */ sub.s $f10, $f12, $f0 -/* 04FEC8 8004F2C8 45000004 */ bc1f .L8004F2DC -/* 04FECC 8004F2CC 3C01800E */ lui $at, %hi(D_800E65EC) # $at, 0x800e -/* 04FED0 8004F2D0 C42265EC */ lwc1 $f2, %lo(D_800E65EC)($at) -/* 04FED4 8004F2D4 10000005 */ b .L8004F2EC -/* 04FED8 8004F2D8 3C013FC0 */ lui $at, 0x3fc0 -.L8004F2DC: -/* 04FEDC 8004F2DC 3C01800E */ lui $at, %hi(D_800E65F0) # $at, 0x800e -/* 04FEE0 8004F2E0 C42265F0 */ lwc1 $f2, %lo(D_800E65F0)($at) -/* 04FEE4 8004F2E4 00000000 */ nop -/* 04FEE8 8004F2E8 3C013FC0 */ li $at, 0x3FC00000 # 1.500000 -.L8004F2EC: -/* 04FEEC 8004F2EC 44812800 */ mtc1 $at, $f5 -/* 04FEF0 8004F2F0 460051A1 */ cvt.d.s $f6, $f10 -/* 04FEF4 8004F2F4 46243202 */ mul.d $f8, $f6, $f4 -/* 04FEF8 8004F2F8 460012A1 */ cvt.d.s $f10, $f2 -/* 04FEFC 8004F2FC C7A40054 */ lwc1 $f4, 0x54($sp) -/* 04FF00 8004F300 C7A50050 */ lwc1 $f5, 0x50($sp) -/* 04FF04 8004F304 462A4180 */ add.d $f6, $f8, $f10 -/* 04FF08 8004F308 46243202 */ mul.d $f8, $f6, $f4 -/* 04FF0C 8004F30C 460002A1 */ cvt.d.s $f10, $f0 -/* 04FF10 8004F310 460E103C */ c.lt.s $f2, $f14 -/* 04FF14 8004F314 46285180 */ add.d $f6, $f10, $f8 -/* 04FF18 8004F318 46203120 */ cvt.s.d $f4, $f6 -/* 04FF1C 8004F31C 45000007 */ bc1f .L8004F33C -/* 04FF20 8004F320 E604008C */ swc1 $f4, 0x8c($s0) -/* 04FF24 8004F324 C60A008C */ lwc1 $f10, 0x8c($s0) -/* 04FF28 8004F328 00000000 */ nop -/* 04FF2C 8004F32C 460C503E */ c.le.s $f10, $f12 -/* 04FF30 8004F330 00000000 */ nop -/* 04FF34 8004F334 4501000B */ bc1t .L8004F364 -/* 04FF38 8004F338 3C013F80 */ lui $at, 0x3f80 -.L8004F33C: -/* 04FF3C 8004F33C 4602703C */ c.lt.s $f14, $f2 -/* 04FF40 8004F340 00000000 */ nop -/* 04FF44 8004F344 4500000A */ bc1f .L8004F370 -/* 04FF48 8004F348 00000000 */ nop -/* 04FF4C 8004F34C C608008C */ lwc1 $f8, 0x8c($s0) -/* 04FF50 8004F350 00000000 */ nop -/* 04FF54 8004F354 4608603E */ c.le.s $f12, $f8 -/* 04FF58 8004F358 00000000 */ nop -/* 04FF5C 8004F35C 45000004 */ bc1f .L8004F370 -/* 04FF60 8004F360 3C013F80 */ li $at, 0x3F800000 # 1.000000 -.L8004F364: -/* 04FF64 8004F364 44813000 */ mtc1 $at, $f6 -/* 04FF68 8004F368 E60C008C */ swc1 $f12, 0x8c($s0) -/* 04FF6C 8004F36C E6060090 */ swc1 $f6, 0x90($s0) -.L8004F370: -/* 04FF70 8004F370 8603016A */ lh $v1, 0x16a($s0) -/* 04FF74 8004F374 860D016C */ lh $t5, 0x16c($s0) -/* 04FF78 8004F378 8FAC00B4 */ lw $t4, 0xb4($sp) -/* 04FF7C 8004F37C 01A35823 */ subu $t3, $t5, $v1 -/* 04FF80 8004F380 016C0019 */ multu $t3, $t4 -/* 04FF84 8004F384 00003012 */ mflo $a2 -/* 04FF88 8004F388 000670C3 */ sra $t6, $a2, 3 -/* 04FF8C 8004F38C 29C10801 */ slti $at, $t6, 0x801 -/* 04FF90 8004F390 14200002 */ bnez $at, .L8004F39C -/* 04FF94 8004F394 01C03025 */ move $a2, $t6 -/* 04FF98 8004F398 24060800 */ li $a2, 2048 -.L8004F39C: -/* 04FF9C 8004F39C 28C1F800 */ slti $at, $a2, -0x800 -/* 04FFA0 8004F3A0 10200002 */ beqz $at, .L8004F3AC -/* 04FFA4 8004F3A4 00000000 */ nop -/* 04FFA8 8004F3A8 2406F800 */ li $a2, -2048 -.L8004F3AC: -/* 04FFAC 8004F3AC 8442CB54 */ lh $v0, %lo(D_800DCB54)($v0) -/* 04FFB0 8004F3B0 00000000 */ nop -/* 04FFB4 8004F3B4 10400003 */ beqz $v0, .L8004F3C4 -/* 04FFB8 8004F3B8 00627821 */ addu $t7, $v1, $v0 -/* 04FFBC 8004F3BC 10000003 */ b .L8004F3CC -/* 04FFC0 8004F3C0 A60F016A */ sh $t7, 0x16a($s0) -.L8004F3C4: -/* 04FFC4 8004F3C4 00664021 */ addu $t0, $v1, $a2 -/* 04FFC8 8004F3C8 A608016A */ sh $t0, 0x16a($s0) -.L8004F3CC: -/* 04FFCC 8004F3CC 3C028012 */ lui $v0, %hi(gActivePlayerButtonPress) # $v0, 0x8012 -/* 04FFD0 8004F3D0 8C42D52C */ lw $v0, %lo(gActivePlayerButtonPress)($v0) -/* 04FFD4 8004F3D4 00000000 */ nop -/* 04FFD8 8004F3D8 30590010 */ andi $t9, $v0, 0x10 -/* 04FFDC 8004F3DC 13200008 */ beqz $t9, .L8004F400 -/* 04FFE0 8004F3E0 03201025 */ move $v0, $t9 -/* 04FFE4 8004F3E4 821801EB */ lb $t8, 0x1eb($s0) -/* 04FFE8 8004F3E8 240A0001 */ li $t2, 1 -/* 04FFEC 8004F3EC 13000004 */ beqz $t8, .L8004F400 -/* 04FFF0 8004F3F0 00000000 */ nop -/* 04FFF4 8004F3F4 A20A01EC */ sb $t2, 0x1ec($s0) -/* 04FFF8 8004F3F8 10000004 */ b .L8004F40C -/* 04FFFC 8004F3FC A20001EB */ sb $zero, 0x1eb($s0) -.L8004F400: -/* 050000 8004F400 10400002 */ beqz $v0, .L8004F40C -/* 050004 8004F404 24090016 */ li $t1, 22 -/* 050008 8004F408 A20901EB */ sb $t1, 0x1eb($s0) -.L8004F40C: -/* 05000C 8004F40C 820201EB */ lb $v0, 0x1eb($s0) -/* 050010 8004F410 00000000 */ nop -/* 050014 8004F414 18400006 */ blez $v0, .L8004F430 -/* 050018 8004F418 00000000 */ nop -/* 05001C 8004F41C 8FAD00B4 */ lw $t5, 0xb4($sp) -/* 050020 8004F420 00000000 */ nop -/* 050024 8004F424 004D5823 */ subu $t3, $v0, $t5 -/* 050028 8004F428 10000002 */ b .L8004F434 -/* 05002C 8004F42C A20B01EB */ sb $t3, 0x1eb($s0) -.L8004F430: -/* 050030 8004F430 A20001EB */ sb $zero, 0x1eb($s0) -.L8004F434: -/* 050034 8004F434 8602018E */ lh $v0, 0x18e($s0) -/* 050038 8004F438 00000000 */ nop -/* 05003C 8004F43C 1840002E */ blez $v0, .L8004F4F8 -/* 050040 8004F440 2841003D */ slti $at, $v0, 0x3d -/* 050044 8004F444 1420001B */ bnez $at, .L8004F4B4 -/* 050048 8004F448 00000000 */ nop -/* 05004C 8004F44C 8E04017C */ lw $a0, 0x17c($s0) -/* 050050 8004F450 00000000 */ nop -/* 050054 8004F454 10800009 */ beqz $a0, .L8004F47C -/* 050058 8004F458 00000000 */ nop -/* 05005C 8004F45C 8E25000C */ lw $a1, 0xc($s1) -/* 050060 8004F460 8E260010 */ lw $a2, 0x10($s1) -/* 050064 8004F464 8E270014 */ lw $a3, 0x14($s1) -/* 050068 8004F468 0C0025B6 */ jal func_800096D8 -/* 05006C 8004F46C 00000000 */ nop -/* 050070 8004F470 8602018E */ lh $v0, 0x18e($s0) -/* 050074 8004F474 10000018 */ b .L8004F4D8 -/* 050078 8004F478 8FA800B4 */ lw $t0, 0xb4($sp) -.L8004F47C: -/* 05007C 8004F47C 8E0C0118 */ lw $t4, 0x118($s0) -/* 050080 8004F480 2404009F */ li $a0, 159 -/* 050084 8004F484 11800013 */ beqz $t4, .L8004F4D4 -/* 050088 8004F488 240E0001 */ li $t6, 1 -/* 05008C 8004F48C 8E25000C */ lw $a1, 0xc($s1) -/* 050090 8004F490 8E260010 */ lw $a2, 0x10($s1) -/* 050094 8004F494 8E270014 */ lw $a3, 0x14($s1) -/* 050098 8004F498 260F017C */ addiu $t7, $s0, 0x17c -/* 05009C 8004F49C AFAF0014 */ sw $t7, 0x14($sp) -/* 0500A0 8004F4A0 0C002556 */ jal func_80009558 -/* 0500A4 8004F4A4 AFAE0010 */ sw $t6, 0x10($sp) -/* 0500A8 8004F4A8 8602018E */ lh $v0, 0x18e($s0) -/* 0500AC 8004F4AC 1000000A */ b .L8004F4D8 -/* 0500B0 8004F4B0 8FA800B4 */ lw $t0, 0xb4($sp) -.L8004F4B4: -/* 0500B4 8004F4B4 8E04017C */ lw $a0, 0x17c($s0) -/* 0500B8 8004F4B8 00000000 */ nop -/* 0500BC 8004F4BC 10800006 */ beqz $a0, .L8004F4D8 -/* 0500C0 8004F4C0 8FA800B4 */ lw $t0, 0xb4($sp) -/* 0500C4 8004F4C4 0C0025BE */ jal func_800096F8 -/* 0500C8 8004F4C8 00000000 */ nop -/* 0500CC 8004F4CC 8602018E */ lh $v0, 0x18e($s0) -/* 0500D0 8004F4D0 AE00017C */ sw $zero, 0x17c($s0) -.L8004F4D4: -/* 0500D4 8004F4D4 8FA800B4 */ lw $t0, 0xb4($sp) -.L8004F4D8: -/* 0500D8 8004F4D8 00000000 */ nop -/* 0500DC 8004F4DC 0048C823 */ subu $t9, $v0, $t0 -/* 0500E0 8004F4E0 A619018E */ sh $t9, 0x18e($s0) -/* 0500E4 8004F4E4 8618018E */ lh $t8, 0x18e($s0) -/* 0500E8 8004F4E8 00000000 */ nop -/* 0500EC 8004F4EC 1F000002 */ bgtz $t8, .L8004F4F8 -/* 0500F0 8004F4F0 00000000 */ nop -/* 0500F4 8004F4F4 A2000189 */ sb $zero, 0x189($s0) -.L8004F4F8: -/* 0500F8 8004F4F8 8E040180 */ lw $a0, 0x180($s0) -/* 0500FC 8004F4FC 00000000 */ nop -/* 050100 8004F500 10800006 */ beqz $a0, .L8004F51C -/* 050104 8004F504 00000000 */ nop -/* 050108 8004F508 8E25000C */ lw $a1, 0xc($s1) -/* 05010C 8004F50C 8E260010 */ lw $a2, 0x10($s1) -/* 050110 8004F510 8E270014 */ lw $a3, 0x14($s1) -/* 050114 8004F514 0C0025B6 */ jal func_800096D8 -/* 050118 8004F518 00000000 */ nop -.L8004F51C: -/* 05011C 8004F51C 0C003936 */ jal func_8000E4D8 -/* 050120 8004F520 00000000 */ nop -/* 050124 8004F524 1040000B */ beqz $v0, .L8004F554 -/* 050128 8004F528 00000000 */ nop -/* 05012C 8004F52C 860A0000 */ lh $t2, ($s0) -/* 050130 8004F530 3C098012 */ lui $t1, %hi(gRaceStartTimer) # $t1, 0x8012 -/* 050134 8004F534 15400007 */ bnez $t2, .L8004F554 -/* 050138 8004F538 00000000 */ nop -/* 05013C 8004F53C 8D29D540 */ lw $t1, %lo(gRaceStartTimer)($t1) -/* 050140 8004F540 8FA500B4 */ lw $a1, 0xb4($sp) -/* 050144 8004F544 15200003 */ bnez $t1, .L8004F554 -/* 050148 8004F548 00000000 */ nop -/* 05014C 8004F54C 0C0166FC */ jal func_80059BF0 -/* 050150 8004F550 02202025 */ move $a0, $s1 -.L8004F554: -/* 050154 8004F554 8E040024 */ lw $a0, 0x24($s0) -/* 050158 8004F558 00000000 */ nop -/* 05015C 8004F55C 10800006 */ beqz $a0, .L8004F578 -/* 050160 8004F560 00000000 */ nop -/* 050164 8004F564 8E25000C */ lw $a1, 0xc($s1) -/* 050168 8004F568 8E260010 */ lw $a2, 0x10($s1) -/* 05016C 8004F56C 8E270014 */ lw $a3, 0x14($s1) -/* 050170 8004F570 0C0025B6 */ jal func_800096D8 -/* 050174 8004F574 00000000 */ nop -.L8004F578: -/* 050178 8004F578 3C018012 */ lui $at, %hi(D_8011D584) # $at, 0x8012 -/* 05017C 8004F57C A020D584 */ sb $zero, %lo(D_8011D584)($at) -/* 050180 8004F580 8E020150 */ lw $v0, 0x150($s0) -/* 050184 8004F584 3C0D8012 */ lui $t5, %hi(gRaceStartTimer) # $t5, 0x8012 -/* 050188 8004F588 1040003D */ beqz $v0, .L8004F680 -/* 05018C 8004F58C 00000000 */ nop -/* 050190 8004F590 8DADD540 */ lw $t5, %lo(gRaceStartTimer)($t5) -/* 050194 8004F594 00002025 */ move $a0, $zero -/* 050198 8004F598 15A0003A */ bnez $t5, .L8004F684 -/* 05019C 8004F59C 240D00FF */ li $t5, 255 -/* 0501A0 8004F5A0 C624000C */ lwc1 $f4, 0xc($s1) -/* 0501A4 8004F5A4 0C0078A7 */ jal get_misc_asset -/* 0501A8 8004F5A8 E444000C */ swc1 $f4, 0xc($v0) -/* 0501AC 8004F5AC 820B0003 */ lb $t3, 3($s0) -/* 0501B0 8004F5B0 C6260010 */ lwc1 $f6, 0x10($s1) -/* 0501B4 8004F5B4 01626021 */ addu $t4, $t3, $v0 -/* 0501B8 8004F5B8 818E0000 */ lb $t6, ($t4) -/* 0501BC 8004F5BC 8E0F0150 */ lw $t7, 0x150($s0) -/* 0501C0 8004F5C0 448E5000 */ mtc1 $t6, $f10 -/* 0501C4 8004F5C4 3C01800E */ lui $at, %hi(D_800E65F4) # $at, 0x800e -/* 0501C8 8004F5C8 46805220 */ cvt.s.w $f8, $f10 -/* 0501CC 8004F5CC 46064100 */ add.s $f4, $f8, $f6 -/* 0501D0 8004F5D0 E5E40010 */ swc1 $f4, 0x10($t7) -/* 0501D4 8004F5D4 8E080150 */ lw $t0, 0x150($s0) -/* 0501D8 8004F5D8 C62A0014 */ lwc1 $f10, 0x14($s1) -/* 0501DC 8004F5DC 00000000 */ nop -/* 0501E0 8004F5E0 E50A0014 */ swc1 $f10, 0x14($t0) -/* 0501E4 8004F5E4 C6280030 */ lwc1 $f8, 0x30($s1) -/* 0501E8 8004F5E8 C42665F4 */ lwc1 $f6, %lo(D_800E65F4)($at) -/* 0501EC 8004F5EC 8E190150 */ lw $t9, 0x150($s0) -/* 0501F0 8004F5F0 46064103 */ div.s $f4, $f8, $f6 -/* 0501F4 8004F5F4 3C01800E */ lui $at, %hi(D_800E65F8) # $at, 0x800e -/* 0501F8 8004F5F8 E7240008 */ swc1 $f4, 8($t9) -/* 0501FC 8004F5FC C62A0030 */ lwc1 $f10, 0x30($s1) -/* 050200 8004F600 C42665FC */ lwc1 $f6, %lo(D_800E65F8 + 4)($at) -/* 050204 8004F604 C42765F8 */ lwc1 $f7, %lo(D_800E65F8)($at) -/* 050208 8004F608 46005221 */ cvt.d.s $f8, $f10 -/* 05020C 8004F60C 4626403C */ c.lt.d $f8, $f6 -/* 050210 8004F610 00000000 */ nop -/* 050214 8004F614 45010006 */ bc1t .L8004F630 -/* 050218 8004F618 00000000 */ nop -/* 05021C 8004F61C 0C0270C3 */ jal get_filtered_cheats -/* 050220 8004F620 00000000 */ nop -/* 050224 8004F624 30580004 */ andi $t8, $v0, 4 -/* 050228 8004F628 13000007 */ beqz $t8, .L8004F648 -/* 05022C 8004F62C 00000000 */ nop -.L8004F630: -/* 050230 8004F630 8E020150 */ lw $v0, 0x150($s0) -/* 050234 8004F634 00000000 */ nop -/* 050238 8004F638 844A0006 */ lh $t2, 6($v0) -/* 05023C 8004F63C 00000000 */ nop -/* 050240 8004F640 35494000 */ ori $t1, $t2, 0x4000 -/* 050244 8004F644 A4490006 */ sh $t1, 6($v0) -.L8004F648: -/* 050248 8004F648 8E020150 */ lw $v0, 0x150($s0) -/* 05024C 8004F64C 3C013FF0 */ li $at, 0x3FF00000 # 1.875000 -/* 050250 8004F650 C4440008 */ lwc1 $f4, 8($v0) -/* 050254 8004F654 44814800 */ mtc1 $at, $f9 -/* 050258 8004F658 44804000 */ mtc1 $zero, $f8 -/* 05025C 8004F65C 460022A1 */ cvt.d.s $f10, $f4 -/* 050260 8004F660 4628503C */ c.lt.d $f10, $f8 -/* 050264 8004F664 3C013F80 */ li $at, 0x3F800000 # 1.000000 -/* 050268 8004F668 45000004 */ bc1f .L8004F67C -/* 05026C 8004F66C 00000000 */ nop -/* 050270 8004F670 44813000 */ mtc1 $at, $f6 -/* 050274 8004F674 00000000 */ nop -/* 050278 8004F678 E4460008 */ swc1 $f6, 8($v0) -.L8004F67C: -/* 05027C 8004F67C AE000150 */ sw $zero, 0x150($s0) -.L8004F680: -/* 050280 8004F680 240D00FF */ li $t5, 255 -.L8004F684: -/* 050284 8004F684 A20D01FE */ sb $t5, 0x1fe($s0) -/* 050288 8004F688 0C013DDF */ jal func_8004F77C -/* 05028C 8004F68C 02002025 */ move $a0, $s0 -/* 050290 8004F690 960B020E */ lhu $t3, 0x20e($s0) -/* 050294 8004F694 8FAC00B4 */ lw $t4, 0xb4($sp) -/* 050298 8004F698 1160001E */ beqz $t3, .L8004F714 -/* 05029C 8004F69C 8FB9007C */ lw $t9, 0x7c($sp) -/* 0502A0 8004F6A0 92020210 */ lbu $v0, 0x210($s0) -/* 0502A4 8004F6A4 00000000 */ nop -/* 0502A8 8004F6A8 0182082A */ slt $at, $t4, $v0 -/* 0502AC 8004F6AC 10200003 */ beqz $at, .L8004F6BC -/* 0502B0 8004F6B0 004C7023 */ subu $t6, $v0, $t4 -/* 0502B4 8004F6B4 10000016 */ b .L8004F710 -/* 0502B8 8004F6B8 A20E0210 */ sb $t6, 0x210($s0) -.L8004F6BC: -/* 0502BC 8004F6BC 860F0000 */ lh $t7, ($s0) -/* 0502C0 8004F6C0 2401FFFF */ li $at, -1 -/* 0502C4 8004F6C4 15E1000B */ bne $t7, $at, .L8004F6F4 -/* 0502C8 8004F6C8 A2000210 */ sb $zero, 0x210($s0) -/* 0502CC 8004F6CC 9604020E */ lhu $a0, 0x20e($s0) -/* 0502D0 8004F6D0 8E25000C */ lw $a1, 0xc($s1) -/* 0502D4 8004F6D4 8E260010 */ lw $a2, 0x10($s1) -/* 0502D8 8004F6D8 8E270014 */ lw $a3, 0x14($s1) -/* 0502DC 8004F6DC 24080004 */ li $t0, 4 -/* 0502E0 8004F6E0 AFA80010 */ sw $t0, 0x10($sp) -/* 0502E4 8004F6E4 0C002556 */ jal func_80009558 -/* 0502E8 8004F6E8 AFA00014 */ sw $zero, 0x14($sp) -/* 0502EC 8004F6EC 10000008 */ b .L8004F710 -/* 0502F0 8004F6F0 A600020E */ sh $zero, 0x20e($s0) -.L8004F6F4: -/* 0502F4 8004F6F4 9604020E */ lhu $a0, 0x20e($s0) -/* 0502F8 8004F6F8 8E25000C */ lw $a1, 0xc($s1) -/* 0502FC 8004F6FC 8E260010 */ lw $a2, 0x10($s1) -/* 050300 8004F700 8E270014 */ lw $a3, 0x14($s1) -/* 050304 8004F704 0C0007AA */ jal play_sound_spatial -/* 050308 8004F708 AFA00010 */ sw $zero, 0x10($sp) -/* 05030C 8004F70C A600020E */ sh $zero, 0x20e($s0) -.L8004F710: -/* 050310 8004F710 8FB9007C */ lw $t9, 0x7c($sp) -.L8004F714: -/* 050314 8004F714 24010042 */ li $at, 66 -/* 050318 8004F718 8322004C */ lb $v0, 0x4c($t9) -/* 05031C 8004F71C 00000000 */ nop -/* 050320 8004F720 30580040 */ andi $t8, $v0, 0x40 -/* 050324 8004F724 13000008 */ beqz $t8, .L8004F748 -/* 050328 8004F728 00000000 */ nop -/* 05032C 8004F72C 10410006 */ beq $v0, $at, .L8004F748 -/* 050330 8004F730 00000000 */ nop -/* 050334 8004F734 C62C0010 */ lwc1 $f12, 0x10($s1) -/* 050338 8004F738 0C007106 */ jal func_8001C418 -/* 05033C 8004F73C 00000000 */ nop -/* 050340 8004F740 10000002 */ b .L8004F74C -/* 050344 8004F744 A2020212 */ sb $v0, 0x212($s0) -.L8004F748: -/* 050348 8004F748 A2000212 */ sb $zero, 0x212($s0) -.L8004F74C: -/* 05034C 8004F74C 82020193 */ lb $v0, 0x193($s0) -/* 050350 8004F750 820A0194 */ lb $t2, 0x194($s0) -/* 050354 8004F754 00000000 */ nop -/* 050358 8004F758 0142082A */ slt $at, $t2, $v0 -/* 05035C 8004F75C 10200003 */ beqz $at, .L8004F76C -/* 050360 8004F760 8FBF002C */ lw $ra, 0x2c($sp) -/* 050364 8004F764 A2020194 */ sb $v0, 0x194($s0) -/* 050368 8004F768 8FBF002C */ lw $ra, 0x2c($sp) -.L8004F76C: -/* 05036C 8004F76C 8FB00024 */ lw $s0, 0x24($sp) -/* 050370 8004F770 8FB10028 */ lw $s1, 0x28($sp) -/* 050374 8004F774 03E00008 */ jr $ra -/* 050378 8004F778 27BD00B0 */ addiu $sp, $sp, 0xb0 - diff --git a/asm/non_matchings/racer/func_8004F7F4.s b/asm/non_matchings/racer/func_8004F7F4.s index 7a41bc89..f8abd01c 100644 --- a/asm/non_matchings/racer/func_8004F7F4.s +++ b/asm/non_matchings/racer/func_8004F7F4.s @@ -27,20 +27,20 @@ glabel func_8004F7F4 /* 050414 8004F814 00E08025 */ move $s0, $a3 /* 050418 8004F818 11C00008 */ beqz $t6, .L8004F83C /* 05041C 8004F81C 00C08825 */ move $s1, $a2 -/* 050420 8004F820 3C048012 */ lui $a0, %hi(gCurrentCarInput) # $a0, 0x8012 -/* 050424 8004F824 2484D528 */ addiu $a0, %lo(gCurrentCarInput) # addiu $a0, $a0, -0x2ad8 +/* 050420 8004F820 3C048012 */ lui $a0, %hi(gCurrentRacerInput) # $a0, 0x8012 +/* 050424 8004F824 2484D528 */ addiu $a0, %lo(gCurrentRacerInput) # addiu $a0, $a0, -0x2ad8 /* 050428 8004F828 8C8F0000 */ lw $t7, ($a0) /* 05042C 8004F82C 3C01FFFF */ lui $at, (0xFFFF7FFF >> 16) # lui $at, 0xffff /* 050430 8004F830 34217FFF */ ori $at, (0xFFFF7FFF & 0xFFFF) # ori $at, $at, 0x7fff /* 050434 8004F834 01E1C024 */ and $t8, $t7, $at /* 050438 8004F838 AC980000 */ sw $t8, ($a0) .L8004F83C: -/* 05043C 8004F83C 3C198012 */ lui $t9, %hi(D_8011D55C) # $t9, 0x8012 -/* 050440 8004F840 8F39D55C */ lw $t9, %lo(D_8011D55C)($t9) -/* 050444 8004F844 3C048012 */ lui $a0, %hi(gCurrentCarInput) # $a0, 0x8012 +/* 05043C 8004F83C 3C198012 */ lui $t9, %hi(gCurrentPlayerIndex) # $t9, 0x8012 +/* 050440 8004F840 8F39D55C */ lw $t9, %lo(gCurrentPlayerIndex)($t9) +/* 050444 8004F844 3C048012 */ lui $a0, %hi(gCurrentRacerInput) # $a0, 0x8012 /* 050448 8004F848 2401FFFF */ li $at, -1 /* 05044C 8004F84C 13210005 */ beq $t9, $at, .L8004F864 -/* 050450 8004F850 2484D528 */ addiu $a0, %lo(gCurrentCarInput) # addiu $a0, $a0, -0x2ad8 +/* 050450 8004F850 2484D528 */ addiu $a0, %lo(gCurrentRacerInput) # addiu $a0, $a0, -0x2ad8 /* 050454 8004F854 820801D8 */ lb $t0, 0x1d8($s0) /* 050458 8004F858 00003025 */ move $a2, $zero /* 05045C 8004F85C 11000008 */ beqz $t0, .L8004F880 @@ -55,9 +55,9 @@ glabel func_8004F7F4 /* 05047C 8004F87C 8FBF002C */ lw $ra, 0x2c($sp) .L8004F880: /* 050480 8004F880 820901D4 */ lb $t1, 0x1d4($s0) -/* 050484 8004F884 3C038012 */ lui $v1, %hi(gActivePlayerButtonPress) # $v1, 0x8012 +/* 050484 8004F884 3C038012 */ lui $v1, %hi(gCurrentButtonsPressed) # $v1, 0x8012 /* 050488 8004F888 1120000D */ beqz $t1, .L8004F8C0 -/* 05048C 8004F88C 2463D52C */ addiu $v1, %lo(gActivePlayerButtonPress) # addiu $v1, $v1, -0x2ad4 +/* 05048C 8004F88C 2463D52C */ addiu $v1, %lo(gCurrentButtonsPressed) # addiu $v1, $v1, -0x2ad4 /* 050490 8004F890 8C6A0000 */ lw $t2, ($v1) /* 050494 8004F894 2401DFEF */ li $at, -8209 /* 050498 8004F898 01415824 */ and $t3, $t2, $at @@ -265,7 +265,7 @@ glabel func_8004F7F4 /* 050778 8004FB78 02002825 */ move $a1, $s0 /* 05077C 8004FB7C 8FA600C0 */ lw $a2, 0xc0($sp) /* 050780 8004FB80 02202025 */ move $a0, $s1 -/* 050784 8004FB84 0C014FA7 */ jal func_80053E9C +/* 050784 8004FB84 0C014FA7 */ jal racer_attack_handler /* 050788 8004FB88 02002825 */ move $a1, $s0 /* 05078C 8004FB8C 820F01DB */ lb $t7, 0x1db($s0) /* 050790 8004FB90 00000000 */ nop @@ -274,7 +274,7 @@ glabel func_8004F7F4 /* 05079C 8004FB9C 8FA600C0 */ lw $a2, 0xc0($sp) /* 0507A0 8004FBA0 8FA700C4 */ lw $a3, 0xc4($sp) /* 0507A4 8004FBA4 02202025 */ move $a0, $s1 -/* 0507A8 8004FBA8 0C014AD9 */ jal func_80052B64 +/* 0507A8 8004FBA8 0C014AD9 */ jal racer_spinout_car /* 0507AC 8004FBAC 02002825 */ move $a1, $s0 /* 0507B0 8004FBB0 10000010 */ b .L8004FBF4 /* 0507B4 8004FBB4 8E02001C */ lw $v0, 0x1c($s0) @@ -512,8 +512,8 @@ glabel func_8004F7F4 /* 050B04 8004FF04 9484D550 */ lhu $a0, %lo(D_8011D550)($a0) /* 050B08 8004FF08 00000000 */ nop /* 050B0C 8004FF0C 10800024 */ beqz $a0, .L8004FFA0 -/* 050B10 8004FF10 3C0E8012 */ lui $t6, %hi(D_8011D55C) # $t6, 0x8012 -/* 050B14 8004FF14 8DCED55C */ lw $t6, %lo(D_8011D55C)($t6) +/* 050B10 8004FF10 3C0E8012 */ lui $t6, %hi(gCurrentPlayerIndex) # $t6, 0x8012 +/* 050B14 8004FF14 8DCED55C */ lw $t6, %lo(gCurrentPlayerIndex)($t6) /* 050B18 8004FF18 2401FFFF */ li $at, -1 /* 050B1C 8004FF1C 11C1000F */ beq $t6, $at, .L8004FF5C /* 050B20 8004FF20 2401010C */ li $at, 268 @@ -709,22 +709,22 @@ glabel func_8004F7F4 /* 050DE8 800501E8 0C00455C */ jal func_80011570 /* 050DEC 800501EC 00000000 */ nop /* 050DF0 800501F0 10400006 */ beqz $v0, .L8005020C -/* 050DF4 800501F4 3C098012 */ lui $t1, %hi(D_8011D55C) # $t1, 0x8012 -/* 050DF8 800501F8 8D29D55C */ lw $t1, %lo(D_8011D55C)($t1) +/* 050DF4 800501F4 3C098012 */ lui $t1, %hi(gCurrentPlayerIndex) # $t1, 0x8012 +/* 050DF8 800501F8 8D29D55C */ lw $t1, %lo(gCurrentPlayerIndex)($t1) /* 050DFC 800501FC 2401FFFF */ li $at, -1 /* 050E00 80050200 11210002 */ beq $t1, $at, .L8005020C /* 050E04 80050204 240A0001 */ li $t2, 1 /* 050E08 80050208 A3AA0053 */ sb $t2, 0x53($sp) .L8005020C: -/* 050E0C 8005020C 3C028012 */ lui $v0, %hi(D_8011D55C) # $v0, 0x8012 -/* 050E10 80050210 8C42D55C */ lw $v0, %lo(D_8011D55C)($v0) +/* 050E0C 8005020C 3C028012 */ lui $v0, %hi(gCurrentPlayerIndex) # $v0, 0x8012 +/* 050E10 80050210 8C42D55C */ lw $v0, %lo(gCurrentPlayerIndex)($v0) /* 050E14 80050214 10000007 */ b .L80050234 /* 050E18 80050218 2401FFFF */ li $at, -1 .L8005021C: /* 050E1C 8005021C 0C0141D5 */ jal func_80050754 /* 050E20 80050220 02002825 */ move $a1, $s0 -/* 050E24 80050224 3C028012 */ lui $v0, %hi(D_8011D55C) # $v0, 0x8012 -/* 050E28 80050228 8C42D55C */ lw $v0, %lo(D_8011D55C)($v0) +/* 050E24 80050224 3C028012 */ lui $v0, %hi(gCurrentPlayerIndex) # $v0, 0x8012 +/* 050E28 80050228 8C42D55C */ lw $v0, %lo(gCurrentPlayerIndex)($v0) /* 050E2C 8005022C 00000000 */ nop /* 050E30 80050230 2401FFFF */ li $at, -1 .L80050234: @@ -897,10 +897,10 @@ glabel func_8004F7F4 /* 0510B4 800504B4 E6100030 */ swc1 $f16, 0x30($s0) .L800504B8: /* 0510B8 800504B8 820F01D3 */ lb $t7, 0x1d3($s0) -/* 0510BC 800504BC 3C18800E */ lui $t8, %hi(D_800DCB98) # $t8, 0x800e +/* 0510BC 800504BC 3C18800E */ lui $t8, %hi(gNumViewports) # $t8, 0x800e /* 0510C0 800504C0 15E00043 */ bnez $t7, .L800505D0 /* 0510C4 800504C4 00000000 */ nop -/* 0510C8 800504C8 8F18CB98 */ lw $t8, %lo(D_800DCB98)($t8) +/* 0510C8 800504C8 8F18CB98 */ lw $t8, %lo(gNumViewports)($t8) /* 0510CC 800504CC 00000000 */ nop /* 0510D0 800504D0 2B010002 */ slti $at, $t8, 2 /* 0510D4 800504D4 1020003E */ beqz $at, .L800505D0 @@ -970,12 +970,12 @@ glabel func_8004F7F4 /* 0511C8 800505C8 014D6025 */ or $t4, $t2, $t5 /* 0511CC 800505CC AE2C0074 */ sw $t4, 0x74($s1) .L800505D0: -/* 0511D0 800505D0 3C0E8012 */ lui $t6, %hi(D_8011D55C) # $t6, 0x8012 -/* 0511D4 800505D4 8DCED55C */ lw $t6, %lo(D_8011D55C)($t6) +/* 0511D0 800505D0 3C0E8012 */ lui $t6, %hi(gCurrentPlayerIndex) # $t6, 0x8012 +/* 0511D4 800505D4 8DCED55C */ lw $t6, %lo(gCurrentPlayerIndex)($t6) /* 0511D8 800505D8 2401FFFF */ li $at, -1 /* 0511DC 800505DC 11C10030 */ beq $t6, $at, .L800506A0 -/* 0511E0 800505E0 3C0F800E */ lui $t7, %hi(D_800DCB98) # $t7, 0x800e -/* 0511E4 800505E4 8DEFCB98 */ lw $t7, %lo(D_800DCB98)($t7) +/* 0511E0 800505E0 3C0F800E */ lui $t7, %hi(gNumViewports) # $t7, 0x800e +/* 0511E4 800505E4 8DEFCB98 */ lw $t7, %lo(gNumViewports)($t7) /* 0511E8 800505E8 00000000 */ nop /* 0511EC 800505EC 29E10002 */ slti $at, $t7, 2 /* 0511F0 800505F0 1020002B */ beqz $at, .L800506A0 @@ -1037,8 +1037,8 @@ glabel func_8004F7F4 /* 0512C4 800506C4 02002825 */ move $a1, $s0 /* 0512C8 800506C8 0C01602D */ jal func_800580B4 /* 0512CC 800506CC 00003025 */ move $a2, $zero -/* 0512D0 800506D0 3C0A800E */ lui $t2, %hi(D_800DCB98) # $t2, 0x800e -/* 0512D4 800506D4 8D4ACB98 */ lw $t2, %lo(D_800DCB98)($t2) +/* 0512D0 800506D0 3C0A800E */ lui $t2, %hi(gNumViewports) # $t2, 0x800e +/* 0512D4 800506D4 8D4ACB98 */ lw $t2, %lo(gNumViewports)($t2) /* 0512D8 800506D8 24010001 */ li $at, 1 /* 0512DC 800506DC 15410013 */ bne $t2, $at, .L8005072C /* 0512E0 800506E0 83AC0053 */ lb $t4, 0x53($sp) diff --git a/asm/non_matchings/racer/func_80050A28.s b/asm/non_matchings/racer/func_80050A28.s index b28d9dab..4a434642 100644 --- a/asm/non_matchings/racer/func_80050A28.s +++ b/asm/non_matchings/racer/func_80050A28.s @@ -66,9 +66,9 @@ glabel func_80050A28 /* 051678 80050A78 E60E0088 */ swc1 $f14, 0x88($s0) /* 05167C 80050A7C 3C0E8012 */ lui $t6, %hi(D_8011D586) # $t6, 0x8012 /* 051680 80050A80 85CED586 */ lh $t6, %lo(D_8011D586)($t6) -/* 051684 80050A84 3C088012 */ lui $t0, %hi(gCurrentCarInput) # $t0, 0x8012 +/* 051684 80050A84 3C088012 */ lui $t0, %hi(gCurrentRacerInput) # $t0, 0x8012 /* 051688 80050A88 15C00041 */ bnez $t6, .L80050B90 -/* 05168C 80050A8C 2508D528 */ addiu $t0, %lo(gCurrentCarInput) # addiu $t0, $t0, -0x2ad8 +/* 05168C 80050A8C 2508D528 */ addiu $t0, %lo(gCurrentRacerInput) # addiu $t0, $t0, -0x2ad8 /* 051690 80050A90 820F01E7 */ lb $t7, 0x1e7($s0) /* 051694 80050A94 3C19800E */ lui $t9, %hi(D_800DCDB0) # $t9, 0x800e /* 051698 80050A98 31F8001F */ andi $t8, $t7, 0x1f @@ -160,8 +160,8 @@ glabel func_80050A28 /* 0517DC 80050BDC 10000008 */ b .L80050C00 /* 0517E0 80050BE0 A20001FB */ sb $zero, 0x1fb($s0) .L80050BE4: -/* 0517E4 80050BE4 3C188012 */ lui $t8, %hi(gCurrentCarInput) # $t8, 0x8012 -/* 0517E8 80050BE8 8F18D528 */ lw $t8, %lo(gCurrentCarInput)($t8) +/* 0517E4 80050BE4 3C188012 */ lui $t8, %hi(gCurrentRacerInput) # $t8, 0x8012 +/* 0517E8 80050BE8 8F18D528 */ lw $t8, %lo(gCurrentRacerInput)($t8) /* 0517EC 80050BEC 00000000 */ nop /* 0517F0 80050BF0 33198000 */ andi $t9, $t8, 0x8000 /* 0517F4 80050BF4 17200002 */ bnez $t9, .L80050C00 @@ -169,9 +169,9 @@ glabel func_80050A28 /* 0517FC 80050BFC A20001FB */ sb $zero, 0x1fb($s0) .L80050C00: /* 051800 80050C00 820201FB */ lb $v0, 0x1fb($s0) -/* 051804 80050C04 3C088012 */ lui $t0, %hi(gCurrentCarInput) # $t0, 0x8012 +/* 051804 80050C04 3C088012 */ lui $t0, %hi(gCurrentRacerInput) # $t0, 0x8012 /* 051808 80050C08 18400006 */ blez $v0, .L80050C24 -/* 05180C 80050C0C 2508D528 */ addiu $t0, %lo(gCurrentCarInput) # addiu $t0, $t0, -0x2ad8 +/* 05180C 80050C0C 2508D528 */ addiu $t0, %lo(gCurrentRacerInput) # addiu $t0, $t0, -0x2ad8 /* 051810 80050C10 8FAA0080 */ lw $t2, 0x80($sp) /* 051814 80050C14 00000000 */ nop /* 051818 80050C18 004A5823 */ subu $t3, $v0, $t2 @@ -206,17 +206,17 @@ glabel func_80050A28 /* 051884 80050C84 86040000 */ lh $a0, ($s0) /* 051888 80050C88 0C01C8D2 */ jal func_80072348 /* 05188C 80050C8C AFA70078 */ sw $a3, 0x78($sp) -/* 051890 80050C90 3C088012 */ lui $t0, %hi(gCurrentCarInput) # $t0, 0x8012 +/* 051890 80050C90 3C088012 */ lui $t0, %hi(gCurrentRacerInput) # $t0, 0x8012 /* 051894 80050C94 8FA70078 */ lw $a3, 0x78($sp) -/* 051898 80050C98 2508D528 */ addiu $t0, %lo(gCurrentCarInput) # addiu $t0, $t0, -0x2ad8 +/* 051898 80050C98 2508D528 */ addiu $t0, %lo(gCurrentRacerInput) # addiu $t0, $t0, -0x2ad8 .L80050C9C: -/* 05189C 80050C9C 3C0E8012 */ lui $t6, %hi(D_8011D55C) # $t6, 0x8012 -/* 0518A0 80050CA0 8DCED55C */ lw $t6, %lo(D_8011D55C)($t6) +/* 05189C 80050C9C 3C0E8012 */ lui $t6, %hi(gCurrentPlayerIndex) # $t6, 0x8012 +/* 0518A0 80050CA0 8DCED55C */ lw $t6, %lo(gCurrentPlayerIndex)($t6) /* 0518A4 80050CA4 240D0001 */ li $t5, 1 /* 0518A8 80050CA8 05C0001D */ bltz $t6, .L80050D20 /* 0518AC 80050CAC AFAD0060 */ sw $t5, 0x60($sp) -/* 0518B0 80050CB0 3C0F800E */ lui $t7, %hi(D_800DCB98) # $t7, 0x800e -/* 0518B4 80050CB4 8DEFCB98 */ lw $t7, %lo(D_800DCB98)($t7) +/* 0518B0 80050CB0 3C0F800E */ lui $t7, %hi(gNumViewports) # $t7, 0x800e +/* 0518B4 80050CB4 8DEFCB98 */ lw $t7, %lo(gNumViewports)($t7) /* 0518B8 80050CB8 240E0001 */ li $t6, 1 /* 0518BC 80050CBC 29E10003 */ slti $at, $t7, 3 /* 0518C0 80050CC0 10200016 */ beqz $at, .L80050D1C @@ -256,9 +256,9 @@ glabel func_80050A28 /* 051938 80050D38 0C01BE53 */ jal get_random_number_from_range /* 05193C 80050D3C AFA70078 */ sw $a3, 0x78($sp) /* 051940 80050D40 A20201D1 */ sb $v0, 0x1d1($s0) -/* 051944 80050D44 3C088012 */ lui $t0, %hi(gCurrentCarInput) # $t0, 0x8012 +/* 051944 80050D44 3C088012 */ lui $t0, %hi(gCurrentRacerInput) # $t0, 0x8012 /* 051948 80050D48 8FA70078 */ lw $a3, 0x78($sp) -/* 05194C 80050D4C 2508D528 */ addiu $t0, %lo(gCurrentCarInput) # addiu $t0, $t0, -0x2ad8 +/* 05194C 80050D4C 2508D528 */ addiu $t0, %lo(gCurrentRacerInput) # addiu $t0, $t0, -0x2ad8 .L80050D50: /* 051950 80050D50 3C098012 */ lui $t1, %hi(gCurrentStickX) # $t1, 0x8012 /* 051954 80050D54 2529D534 */ addiu $t1, %lo(gCurrentStickX) # addiu $t1, $t1, -0x2acc @@ -315,8 +315,8 @@ glabel func_80050A28 /* 051A10 80050E10 AD190000 */ sw $t9, ($t0) /* 051A14 80050E14 372B4000 */ ori $t3, $t9, 0x4000 /* 051A18 80050E18 AD0B0000 */ sw $t3, ($t0) -/* 051A1C 80050E1C 3C0E800E */ lui $t6, %hi(D_800DCB98) # $t6, 0x800e -/* 051A20 80050E20 8DCECB98 */ lw $t6, %lo(D_800DCB98)($t6) +/* 051A1C 80050E1C 3C0E800E */ lui $t6, %hi(gNumViewports) # $t6, 0x800e +/* 051A20 80050E20 8DCECB98 */ lw $t6, %lo(gNumViewports)($t6) /* 051A24 80050E24 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 /* 051A28 80050E28 240CFFBA */ li $t4, -70 /* 051A2C 80050E2C AC2CD538 */ sw $t4, %lo(gCurrentStickY)($at) @@ -382,12 +382,12 @@ glabel func_80050A28 /* 051B08 80050F08 820401E6 */ lb $a0, 0x1e6($s0) /* 051B0C 80050F0C 44809000 */ mtc1 $zero, $f18 /* 051B10 80050F10 10800019 */ beqz $a0, .L80050F78 -/* 051B14 80050F14 3C0C8012 */ lui $t4, %hi(D_8011D55C) # $t4, 0x8012 -/* 051B18 80050F18 8D8CD55C */ lw $t4, %lo(D_8011D55C)($t4) -/* 051B1C 80050F1C 3C0D800E */ lui $t5, %hi(D_800DCB98) # $t5, 0x800e +/* 051B14 80050F14 3C0C8012 */ lui $t4, %hi(gCurrentPlayerIndex) # $t4, 0x8012 +/* 051B18 80050F18 8D8CD55C */ lw $t4, %lo(gCurrentPlayerIndex)($t4) +/* 051B1C 80050F1C 3C0D800E */ lui $t5, %hi(gNumViewports) # $t5, 0x800e /* 051B20 80050F20 05800015 */ bltz $t4, .L80050F78 /* 051B24 80050F24 00000000 */ nop -/* 051B28 80050F28 8DADCB98 */ lw $t5, %lo(D_800DCB98)($t5) +/* 051B28 80050F28 8DADCB98 */ lw $t5, %lo(gNumViewports)($t5) /* 051B2C 80050F2C 240A0001 */ li $t2, 1 /* 051B30 80050F30 29A10003 */ slti $at, $t5, 3 /* 051B34 80050F34 1020000F */ beqz $at, .L80050F74 @@ -456,8 +456,8 @@ glabel func_80050A28 .L80051014: /* 051C14 80051014 0C015C88 */ jal handle_racer_top_speed /* 051C18 80051018 AFA70078 */ sw $a3, 0x78($sp) -/* 051C1C 8005101C 3C0F8012 */ lui $t7, %hi(gCurrentCarInput) # $t7, 0x8012 -/* 051C20 80051020 8DEFD528 */ lw $t7, %lo(gCurrentCarInput)($t7) +/* 051C1C 8005101C 3C0F8012 */ lui $t7, %hi(gCurrentRacerInput) # $t7, 0x8012 +/* 051C20 80051020 8DEFD528 */ lw $t7, %lo(gCurrentRacerInput)($t7) /* 051C24 80051024 E7A00034 */ swc1 $f0, 0x34($sp) /* 051C28 80051028 31F80010 */ andi $t8, $t7, 0x10 /* 051C2C 8005102C 13000019 */ beqz $t8, .L80051094 @@ -617,8 +617,8 @@ glabel func_80050A28 /* 051E54 80051254 0C001223 */ jal func_8000488C /* 051E58 80051258 00402025 */ move $a0, $v0 .L8005125C: -/* 051E5C 8005125C 3C028012 */ lui $v0, %hi(gCurrentCarInput) # $v0, 0x8012 -/* 051E60 80051260 8C42D528 */ lw $v0, %lo(gCurrentCarInput)($v0) +/* 051E5C 8005125C 3C028012 */ lui $v0, %hi(gCurrentRacerInput) # $v0, 0x8012 +/* 051E60 80051260 8C42D528 */ lw $v0, %lo(gCurrentRacerInput)($v0) /* 051E64 80051264 820301E1 */ lb $v1, 0x1e1($s0) /* 051E68 80051268 30584000 */ andi $t8, $v0, 0x4000 /* 051E6C 8005126C 24060006 */ li $a2, 6 @@ -841,8 +841,8 @@ glabel func_80050A28 /* 05218C 8005158C 11600009 */ beqz $t3, .L800515B4 /* 052190 80051590 00000000 */ nop /* 052194 80051594 15210007 */ bne $t1, $at, .L800515B4 -/* 052198 80051598 3C198012 */ lui $t9, %hi(gActivePlayerButtonPress) # $t9, 0x8012 -/* 05219C 8005159C 8F39D52C */ lw $t9, %lo(gActivePlayerButtonPress)($t9) +/* 052198 80051598 3C198012 */ lui $t9, %hi(gCurrentButtonsPressed) # $t9, 0x8012 +/* 05219C 8005159C 8F39D52C */ lw $t9, %lo(gCurrentButtonsPressed)($t9) /* 0521A0 800515A0 240D0002 */ li $t5, 2 /* 0521A4 800515A4 332C2000 */ andi $t4, $t9, 0x2000 /* 0521A8 800515A8 11800002 */ beqz $t4, .L800515B4 @@ -894,8 +894,8 @@ glabel func_80050A28 /* 052254 80051654 E7AE0044 */ swc1 $f14, 0x44($sp) /* 052258 80051658 0C0078A7 */ jal get_misc_asset /* 05225C 8005165C E7B00040 */ swc1 $f16, 0x40($sp) -/* 052260 80051660 3C0F8012 */ lui $t7, %hi(D_8011D55C) # $t7, 0x8012 -/* 052264 80051664 8DEFD55C */ lw $t7, %lo(D_8011D55C)($t7) +/* 052260 80051660 3C0F8012 */ lui $t7, %hi(gCurrentPlayerIndex) # $t7, 0x8012 +/* 052264 80051664 8DEFD55C */ lw $t7, %lo(gCurrentPlayerIndex)($t7) /* 052268 80051668 2403FFFF */ li $v1, -1 /* 05226C 8005166C 83A80057 */ lb $t0, 0x57($sp) /* 052270 80051670 8FA90064 */ lw $t1, 0x64($sp) @@ -1095,8 +1095,8 @@ glabel func_80050A28 /* 05255C 8005195C 4612203C */ c.lt.s $f4, $f18 /* 052560 80051960 00000000 */ nop /* 052564 80051964 4500000F */ bc1f .L800519A4 -/* 052568 80051968 3C0A8012 */ lui $t2, %hi(gCurrentCarInput) # $t2, 0x8012 -/* 05256C 8005196C 8D4AD528 */ lw $t2, %lo(gCurrentCarInput)($t2) +/* 052568 80051968 3C0A8012 */ lui $t2, %hi(gCurrentRacerInput) # $t2, 0x8012 +/* 05256C 8005196C 8D4AD528 */ lw $t2, %lo(gCurrentRacerInput)($t2) /* 052570 80051970 00000000 */ nop /* 052574 80051974 314B8000 */ andi $t3, $t2, 0x8000 /* 052578 80051978 1560000A */ bnez $t3, .L800519A4 @@ -1410,7 +1410,7 @@ glabel func_80050A28 /* 0529F0 80051DF0 46228181 */ sub.d $f6, $f16, $f2 /* 0529F4 80051DF4 24010004 */ li $at, 4 /* 0529F8 80051DF8 46283282 */ mul.d $f10, $f6, $f8 -/* 0529FC 80051DFC 3C028012 */ lui $v0, %hi(gCurrentCarInput) # $v0, 0x8012 +/* 0529FC 80051DFC 3C028012 */ lui $v0, %hi(gCurrentRacerInput) # $v0, 0x8012 /* 052A00 80051E00 15210007 */ bne $t1, $at, .L80051E20 /* 052A04 80051E04 46205020 */ cvt.s.d $f0, $f10 /* 052A08 80051E08 3C013FD0 */ li $at, 0x3FD00000 # 1.625000 @@ -1425,7 +1425,7 @@ glabel func_80050A28 /* 052A28 80051E28 2941FFE7 */ slti $at, $t2, -0x19 /* 052A2C 80051E2C 10200017 */ beqz $at, .L80051E8C /* 052A30 80051E30 00000000 */ nop -/* 052A34 80051E34 8C42D528 */ lw $v0, %lo(gCurrentCarInput)($v0) +/* 052A34 80051E34 8C42D528 */ lw $v0, %lo(gCurrentRacerInput)($v0) /* 052A38 80051E38 00000000 */ nop /* 052A3C 80051E3C 304B8000 */ andi $t3, $v0, 0x8000 /* 052A40 80051E40 15600012 */ bnez $t3, .L80051E8C @@ -1627,8 +1627,8 @@ glabel func_80050A28 /* 052D24 80052124 8D4AD554 */ lw $t2, %lo(gCurrentCarSteerVel)($t2) /* 052D28 80052128 11600013 */ beqz $t3, .L80052178 /* 052D2C 8005212C AE0A0110 */ sw $t2, 0x110($s0) -/* 052D30 80052130 3C188012 */ lui $t8, %hi(D_8011D55C) # $t8, 0x8012 -/* 052D34 80052134 8F18D55C */ lw $t8, %lo(D_8011D55C)($t8) +/* 052D30 80052130 3C188012 */ lui $t8, %hi(gCurrentPlayerIndex) # $t8, 0x8012 +/* 052D34 80052134 8F18D55C */ lw $t8, %lo(gCurrentPlayerIndex)($t8) /* 052D38 80052138 2401FFFF */ li $at, -1 /* 052D3C 8005213C 1301000F */ beq $t8, $at, .L8005217C /* 052D40 80052140 8FBF0024 */ lw $ra, 0x24($sp) diff --git a/asm/non_matchings/racer/func_8005250C.s b/asm/non_matchings/racer/func_8005250C.s index fd958165..80493a84 100644 --- a/asm/non_matchings/racer/func_8005250C.s +++ b/asm/non_matchings/racer/func_8005250C.s @@ -27,12 +27,12 @@ glabel func_8005250C /* 05315C 8005255C 81430000 */ lb $v1, ($t2) /* 053160 80052560 00000000 */ nop .L80052564: -/* 053164 80052564 3C0B8012 */ lui $t3, %hi(gActivePlayerButtonPress) # $t3, 0x8012 -/* 053168 80052568 8D6BD52C */ lw $t3, %lo(gActivePlayerButtonPress)($t3) +/* 053164 80052564 3C0B8012 */ lui $t3, %hi(gCurrentButtonsPressed) # $t3, 0x8012 +/* 053168 80052568 8D6BD52C */ lw $t3, %lo(gCurrentButtonsPressed)($t3) /* 05316C 8005256C 24010004 */ li $at, 4 /* 053170 80052570 316C2000 */ andi $t4, $t3, 0x2000 /* 053174 80052574 11800006 */ beqz $t4, .L80052590 -/* 053178 80052578 3C09800E */ lui $t1, %hi(D_800DCB98) # $t1, 0x800e +/* 053178 80052578 3C09800E */ lui $t1, %hi(gNumViewports) # $t1, 0x800e /* 05317C 8005257C 10610004 */ beq $v1, $at, .L80052590 /* 053180 80052580 24010008 */ li $at, 8 /* 053184 80052584 10610002 */ beq $v1, $at, .L80052590 @@ -53,12 +53,12 @@ glabel func_8005250C /* 0531B8 800525B8 33080008 */ andi $t0, $t8, 8 /* 0531BC 800525BC 11000016 */ beqz $t0, .L80052618 /* 0531C0 800525C0 24180004 */ li $t8, 4 -/* 0531C4 800525C4 8D29CB98 */ lw $t1, %lo(D_800DCB98)($t1) -/* 0531C8 800525C8 3C0A8012 */ lui $t2, %hi(D_8011D55C) # $t2, 0x8012 +/* 0531C4 800525C4 8D29CB98 */ lw $t1, %lo(gNumViewports)($t1) +/* 0531C8 800525C8 3C0A8012 */ lui $t2, %hi(gCurrentPlayerIndex) # $t2, 0x8012 /* 0531CC 800525CC 29210003 */ slti $at, $t1, 3 /* 0531D0 800525D0 10200010 */ beqz $at, .L80052614 /* 0531D4 800525D4 00000000 */ nop -/* 0531D8 800525D8 8D4AD55C */ lw $t2, %lo(D_8011D55C)($t2) +/* 0531D8 800525D8 8D4AD55C */ lw $t2, %lo(gCurrentPlayerIndex)($t2) /* 0531DC 800525DC 8FAE0028 */ lw $t6, 0x28($sp) /* 0531E0 800525E0 05400008 */ bltz $t2, .L80052604 /* 0531E4 800525E4 00000000 */ nop @@ -130,7 +130,7 @@ glabel L80052678 /* 0532D4 800526D4 44CFF800 */ ctc1 $t7, $31 /* 0532D8 800526D8 03231823 */ subu $v1, $t9, $v1 /* 0532DC 800526DC 04610002 */ bgez $v1, .L800526E8 -/* 0532E0 800526E0 3C0F8012 */ lui $t7, %hi(gCurrentCarInput) # $t7, 0x8012 +/* 0532E0 800526E0 3C0F8012 */ lui $t7, %hi(gCurrentRacerInput) # $t7, 0x8012 /* 0532E4 800526E4 00001825 */ move $v1, $zero .L800526E8: /* 0532E8 800526E8 2861004A */ slti $at, $v1, 0x4a @@ -179,7 +179,7 @@ glabel L80052678 /* 053384 80052784 00000000 */ nop /* 053388 80052788 4500007C */ bc1f .L8005297C /* 05338C 8005278C 8FBF0024 */ lw $ra, 0x24($sp) -/* 053390 80052790 8DEFD528 */ lw $t7, %lo(gCurrentCarInput)($t7) +/* 053390 80052790 8DEFD528 */ lw $t7, %lo(gCurrentRacerInput)($t7) /* 053394 80052794 240E0006 */ li $t6, 6 /* 053398 80052798 31F94000 */ andi $t9, $t7, 0x4000 /* 05339C 8005279C 13200077 */ beqz $t9, .L8005297C @@ -233,8 +233,8 @@ glabel L8005280C /* 053450 80052850 10000049 */ b .L80052978 /* 053454 80052854 A0A801F3 */ sb $t0, 0x1f3($a1) glabel L80052858 -/* 053458 80052858 3C098012 */ lui $t1, %hi(gCurrentCarInput) # $t1, 0x8012 -/* 05345C 8005285C 8D29D528 */ lw $t1, %lo(gCurrentCarInput)($t1) +/* 053458 80052858 3C098012 */ lui $t1, %hi(gCurrentRacerInput) # $t1, 0x8012 +/* 05345C 8005285C 8D29D528 */ lw $t1, %lo(gCurrentRacerInput)($t1) /* 053460 80052860 8FA40028 */ lw $a0, 0x28($sp) /* 053464 80052864 312A2000 */ andi $t2, $t1, 0x2000 /* 053468 80052868 11400002 */ beqz $t2, .L80052874 @@ -262,8 +262,8 @@ glabel L800528A4 /* 0534B8 800528B8 8FA40028 */ lw $a0, 0x28($sp) /* 0534BC 800528BC 45000008 */ bc1f .L800528E0 /* 0534C0 800528C0 24020003 */ li $v0, 3 -/* 0534C4 800528C4 3C0F8012 */ lui $t7, %hi(gCurrentCarInput) # $t7, 0x8012 -/* 0534C8 800528C8 8DEFD528 */ lw $t7, %lo(gCurrentCarInput)($t7) +/* 0534C4 800528C4 3C0F8012 */ lui $t7, %hi(gCurrentRacerInput) # $t7, 0x8012 +/* 0534C8 800528C8 8DEFD528 */ lw $t7, %lo(gCurrentRacerInput)($t7) /* 0534CC 800528CC 00000000 */ nop /* 0534D0 800528D0 31F94000 */ andi $t9, $t7, 0x4000 /* 0534D4 800528D4 13200003 */ beqz $t9, .L800528E4 diff --git a/asm/non_matchings/racer/func_80052B64.s b/asm/non_matchings/racer/func_80052B64.s deleted file mode 100644 index 11255ad7..00000000 --- a/asm/non_matchings/racer/func_80052B64.s +++ /dev/null @@ -1,147 +0,0 @@ -.late_rodata -glabel D_800E66F0 -.double 0.97 - -.text -glabel func_80052B64 -/* 053764 80052B64 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 053768 80052B68 AFBF001C */ sw $ra, 0x1c($sp) -/* 05376C 80052B6C AFB00018 */ sw $s0, 0x18($sp) -/* 053770 80052B70 AFA50024 */ sw $a1, 0x24($sp) -/* 053774 80052B74 AFA7002C */ sw $a3, 0x2c($sp) -/* 053778 80052B78 3C01800E */ lui $at, %hi(D_800E66F0 + 4) # $at, 0x800e -/* 05377C 80052B7C C4A4002C */ lwc1 $f4, 0x2c($a1) -/* 053780 80052B80 C42966F0 */ lwc1 $f9, %lo(D_800E66F0)($at) -/* 053784 80052B84 C42866F4 */ lwc1 $f8, %lo(D_800E66F0 + 4)($at) -/* 053788 80052B88 460021A1 */ cvt.d.s $f6, $f4 -/* 05378C 80052B8C 46283282 */ mul.d $f10, $f6, $f8 -/* 053790 80052B90 44809000 */ mtc1 $zero, $f18 -/* 053794 80052B94 80AE01D8 */ lb $t6, 0x1d8($a1) -/* 053798 80052B98 00A03825 */ move $a3, $a1 -/* 05379C 80052B9C 00808025 */ move $s0, $a0 -/* 0537A0 80052BA0 46205420 */ cvt.s.d $f16, $f10 -/* 0537A4 80052BA4 E4B20030 */ swc1 $f18, 0x30($a1) -/* 0537A8 80052BA8 15C00009 */ bnez $t6, .L80052BD0 -/* 0537AC 80052BAC E4B0002C */ swc1 $f16, 0x2c($a1) -/* 0537B0 80052BB0 84A40000 */ lh $a0, ($a1) -/* 0537B4 80052BB4 AFA70024 */ sw $a3, 0x24($sp) -/* 0537B8 80052BB8 AFA60028 */ sw $a2, 0x28($sp) -/* 0537BC 80052BBC 0C01C8D2 */ jal func_80072348 -/* 0537C0 80052BC0 00002825 */ move $a1, $zero -/* 0537C4 80052BC4 8FA60028 */ lw $a2, 0x28($sp) -/* 0537C8 80052BC8 8FA70024 */ lw $a3, 0x24($sp) -/* 0537CC 80052BCC 00000000 */ nop -.L80052BD0: -/* 0537D0 80052BD0 3C0F8012 */ lui $t7, %hi(D_8011D55C) # $t7, 0x8012 -/* 0537D4 80052BD4 8DEFD55C */ lw $t7, %lo(D_8011D55C)($t7) -/* 0537D8 80052BD8 84E301A2 */ lh $v1, 0x1a2($a3) -/* 0537DC 80052BDC 05E0001E */ bltz $t7, .L80052C58 -/* 0537E0 80052BE0 3C18800E */ lui $t8, %hi(D_800DCB98) # $t8, 0x800e -/* 0537E4 80052BE4 8F18CB98 */ lw $t8, %lo(D_800DCB98)($t8) -/* 0537E8 80052BE8 00000000 */ nop -/* 0537EC 80052BEC 2B010003 */ slti $at, $t8, 3 -/* 0537F0 80052BF0 10200007 */ beqz $at, .L80052C10 -/* 0537F4 80052BF4 00000000 */ nop -/* 0537F8 80052BF8 8E190074 */ lw $t9, 0x74($s0) -/* 0537FC 80052BFC 3C010004 */ lui $at, (0x0004FC00 >> 16) # lui $at, 4 -/* 053800 80052C00 3421FC00 */ ori $at, (0x0004FC00 & 0xFFFF) # ori $at, $at, 0xfc00 -/* 053804 80052C04 03214025 */ or $t0, $t9, $at -/* 053808 80052C08 10000013 */ b .L80052C58 -/* 05380C 80052C0C AE080074 */ sw $t0, 0x74($s0) -.L80052C10: -/* 053810 80052C10 90E201DE */ lbu $v0, 0x1de($a3) -/* 053814 80052C14 240B0001 */ li $t3, 1 -/* 053818 80052C18 284100FF */ slti $at, $v0, 0xff -/* 05381C 80052C1C 10200005 */ beqz $at, .L80052C34 -/* 053820 80052C20 00025040 */ sll $t2, $v0, 1 -/* 053824 80052C24 8E090074 */ lw $t1, 0x74($s0) -/* 053828 80052C28 014B6004 */ sllv $t4, $t3, $t2 -/* 05382C 80052C2C 012C6825 */ or $t5, $t1, $t4 -/* 053830 80052C30 AE0D0074 */ sw $t5, 0x74($s0) -.L80052C34: -/* 053834 80052C34 90E201DF */ lbu $v0, 0x1df($a3) -/* 053838 80052C38 24180002 */ li $t8, 2 -/* 05383C 80052C3C 284100FF */ slti $at, $v0, 0xff -/* 053840 80052C40 10200005 */ beqz $at, .L80052C58 -/* 053844 80052C44 00027840 */ sll $t7, $v0, 1 -/* 053848 80052C48 8E0E0074 */ lw $t6, 0x74($s0) -/* 05384C 80052C4C 01F8C804 */ sllv $t9, $t8, $t7 -/* 053850 80052C50 01D94025 */ or $t0, $t6, $t9 -/* 053854 80052C54 AE080074 */ sw $t0, 0x74($s0) -.L80052C58: -/* 053858 80052C58 80E201DB */ lb $v0, 0x1db($a3) -/* 05385C 80052C5C 00065080 */ sll $t2, $a2, 2 -/* 053860 80052C60 1840001A */ blez $v0, .L80052CCC -/* 053864 80052C64 01465021 */ addu $t2, $t2, $a2 -/* 053868 80052C68 84EB01A2 */ lh $t3, 0x1a2($a3) -/* 05386C 80052C6C 000A5200 */ sll $t2, $t2, 8 -/* 053870 80052C70 016A4821 */ addu $t1, $t3, $t2 -/* 053874 80052C74 A4E901A2 */ sh $t1, 0x1a2($a3) -/* 053878 80052C78 84EC01A2 */ lh $t4, 0x1a2($a3) -/* 05387C 80052C7C 00000000 */ nop -/* 053880 80052C80 1980002D */ blez $t4, .L80052D38 -/* 053884 80052C84 00000000 */ nop -/* 053888 80052C88 0461002B */ bgez $v1, .L80052D38 -/* 05388C 80052C8C 00000000 */ nop -/* 053890 80052C90 80ED01DB */ lb $t5, 0x1db($a3) -/* 053894 80052C94 3C0F8012 */ lui $t7, %hi(gCurrentStickX) # $t7, 0x8012 -/* 053898 80052C98 25B8FFFF */ addiu $t8, $t5, -1 -/* 05389C 80052C9C A0F801DB */ sb $t8, 0x1db($a3) -/* 0538A0 80052CA0 8DEFD534 */ lw $t7, %lo(gCurrentStickX)($t7) -/* 0538A4 80052CA4 00000000 */ nop -/* 0538A8 80052CA8 29E10033 */ slti $at, $t7, 0x33 -/* 0538AC 80052CAC 14200022 */ bnez $at, .L80052D38 -/* 0538B0 80052CB0 00000000 */ nop -/* 0538B4 80052CB4 80EE01DB */ lb $t6, 0x1db($a3) -/* 0538B8 80052CB8 24010001 */ li $at, 1 -/* 0538BC 80052CBC 15C1001E */ bne $t6, $at, .L80052D38 -/* 0538C0 80052CC0 00000000 */ nop -/* 0538C4 80052CC4 1000001C */ b .L80052D38 -/* 0538C8 80052CC8 A0E001DB */ sb $zero, 0x1db($a3) -.L80052CCC: -/* 0538CC 80052CCC 0441001A */ bgez $v0, .L80052D38 -/* 0538D0 80052CD0 00064080 */ sll $t0, $a2, 2 -/* 0538D4 80052CD4 84F901A2 */ lh $t9, 0x1a2($a3) -/* 0538D8 80052CD8 01064021 */ addu $t0, $t0, $a2 -/* 0538DC 80052CDC 00084200 */ sll $t0, $t0, 8 -/* 0538E0 80052CE0 03285823 */ subu $t3, $t9, $t0 -/* 0538E4 80052CE4 A4EB01A2 */ sh $t3, 0x1a2($a3) -/* 0538E8 80052CE8 84EA01A2 */ lh $t2, 0x1a2($a3) -/* 0538EC 80052CEC 00000000 */ nop -/* 0538F0 80052CF0 05410011 */ bgez $t2, .L80052D38 -/* 0538F4 80052CF4 00000000 */ nop -/* 0538F8 80052CF8 1860000F */ blez $v1, .L80052D38 -/* 0538FC 80052CFC 00000000 */ nop -/* 053900 80052D00 80E901DB */ lb $t1, 0x1db($a3) -/* 053904 80052D04 3C0D8012 */ lui $t5, %hi(gCurrentStickX) # $t5, 0x8012 -/* 053908 80052D08 252C0001 */ addiu $t4, $t1, 1 -/* 05390C 80052D0C A0EC01DB */ sb $t4, 0x1db($a3) -/* 053910 80052D10 8DADD534 */ lw $t5, %lo(gCurrentStickX)($t5) -/* 053914 80052D14 00000000 */ nop -/* 053918 80052D18 29A1FFCE */ slti $at, $t5, -0x32 -/* 05391C 80052D1C 10200006 */ beqz $at, .L80052D38 -/* 053920 80052D20 00000000 */ nop -/* 053924 80052D24 80F801DB */ lb $t8, 0x1db($a3) -/* 053928 80052D28 2401FFFF */ li $at, -1 -/* 05392C 80052D2C 17010002 */ bne $t8, $at, .L80052D38 -/* 053930 80052D30 00000000 */ nop -/* 053934 80052D34 A0E001DB */ sb $zero, 0x1db($a3) -.L80052D38: -/* 053938 80052D38 84EF01A2 */ lh $t7, 0x1a2($a3) -/* 05393C 80052D3C 3C018012 */ lui $at, %hi(gCurrentCarSteerVel) # $at, 0x8012 -/* 053940 80052D40 AC2FD554 */ sw $t7, %lo(gCurrentCarSteerVel)($at) -/* 053944 80052D44 3C018012 */ lui $at, %hi(D_8011D56C) # $at, 0x8012 -/* 053948 80052D48 C424D56C */ lwc1 $f4, %lo(D_8011D56C)($at) -/* 05394C 80052D4C C7A6002C */ lwc1 $f6, 0x2c($sp) -/* 053950 80052D50 C60A0020 */ lwc1 $f10, 0x20($s0) -/* 053954 80052D54 46062202 */ mul.s $f8, $f4, $f6 -/* 053958 80052D58 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 -/* 05395C 80052D5C 46085401 */ sub.s $f16, $f10, $f8 -/* 053960 80052D60 E6100020 */ swc1 $f16, 0x20($s0) -/* 053964 80052D64 AC20D534 */ sw $zero, %lo(gCurrentStickX)($at) -/* 053968 80052D68 A0E001E1 */ sb $zero, 0x1e1($a3) -/* 05396C 80052D6C 8FBF001C */ lw $ra, 0x1c($sp) -/* 053970 80052D70 8FB00018 */ lw $s0, 0x18($sp) -/* 053974 80052D74 03E00008 */ jr $ra -/* 053978 80052D78 27BD0020 */ addiu $sp, $sp, 0x20 - diff --git a/asm/non_matchings/racer/func_80052D7C.s b/asm/non_matchings/racer/func_80052D7C.s index 47e70911..3a14e701 100644 --- a/asm/non_matchings/racer/func_80052D7C.s +++ b/asm/non_matchings/racer/func_80052D7C.s @@ -160,9 +160,9 @@ glabel func_80052D7C /* 053B5C 80052F5C E5440020 */ swc1 $f4, 0x20($t2) .L80052F60: /* 053B60 80052F60 80AB01E1 */ lb $t3, 0x1e1($a1) -/* 053B64 80052F64 3C028012 */ lui $v0, %hi(gCurrentCarInput) # $v0, 0x8012 +/* 053B64 80052F64 3C028012 */ lui $v0, %hi(gCurrentRacerInput) # $v0, 0x8012 /* 053B68 80052F68 A0AB01E8 */ sb $t3, 0x1e8($a1) -/* 053B6C 80052F6C 8C42D528 */ lw $v0, %lo(gCurrentCarInput)($v0) +/* 053B6C 80052F6C 8C42D528 */ lw $v0, %lo(gCurrentRacerInput)($v0) /* 053B70 80052F70 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 /* 053B74 80052F74 304C8000 */ andi $t4, $v0, 0x8000 /* 053B78 80052F78 1180000C */ beqz $t4, .L80052FAC @@ -172,10 +172,10 @@ glabel func_80052D7C /* 053B88 80052F88 44808000 */ mtc1 $zero, $f16 /* 053B8C 80052F8C 460042A1 */ cvt.d.s $f10, $f8 /* 053B90 80052F90 46305481 */ sub.d $f18, $f10, $f16 -/* 053B94 80052F94 3C028012 */ lui $v0, %hi(gCurrentCarInput) # $v0, 0x8012 +/* 053B94 80052F94 3C028012 */ lui $v0, %hi(gCurrentRacerInput) # $v0, 0x8012 /* 053B98 80052F98 462091A0 */ cvt.s.d $f6, $f18 /* 053B9C 80052F9C E4A6002C */ swc1 $f6, 0x2c($a1) -/* 053BA0 80052FA0 8C42D528 */ lw $v0, %lo(gCurrentCarInput)($v0) +/* 053BA0 80052FA0 8C42D528 */ lw $v0, %lo(gCurrentRacerInput)($v0) /* 053BA4 80052FA4 00000000 */ nop /* 053BA8 80052FA8 304E4000 */ andi $t6, $v0, 0x4000 .L80052FAC: diff --git a/asm/non_matchings/racer/func_80053E9C.s b/asm/non_matchings/racer/func_80053E9C.s deleted file mode 100644 index 6e9e7419..00000000 --- a/asm/non_matchings/racer/func_80053E9C.s +++ /dev/null @@ -1,188 +0,0 @@ -.late_rodata -glabel D_800E67A0 -.float 0.1 -glabel jpt_800E67A4 -.word L80053FF0, L8005406C, L800540FC, L8005408C, L800540C4, L80054098 -.word 0 # Padding -glabel D_800E67C0 -.double 20.5 - -.text -glabel func_80053E9C -/* 054A9C 80053E9C 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 054AA0 80053EA0 AFBF001C */ sw $ra, 0x1c($sp) -/* 054AA4 80053EA4 AFB00018 */ sw $s0, 0x18($sp) -/* 054AA8 80053EA8 84AE0000 */ lh $t6, ($a1) -/* 054AAC 80053EAC 2401FFFF */ li $at, -1 -/* 054AB0 80053EB0 15C10003 */ bne $t6, $at, .L80053EC0 -/* 054AB4 80053EB4 00A08025 */ move $s0, $a1 -/* 054AB8 80053EB8 10000004 */ b .L80053ECC -/* 054ABC 80053EBC A3A00027 */ sb $zero, 0x27($sp) -.L80053EC0: -/* 054AC0 80053EC0 820F0185 */ lb $t7, 0x185($s0) -/* 054AC4 80053EC4 00000000 */ nop -/* 054AC8 80053EC8 A3AF0027 */ sb $t7, 0x27($sp) -.L80053ECC: -/* 054ACC 80053ECC 820201ED */ lb $v0, 0x1ed($s0) -/* 054AD0 80053ED0 3C01800E */ lui $at, %hi(D_800E67A0) # $at, 0x800e -/* 054AD4 80053ED4 18400012 */ blez $v0, .L80053F20 -/* 054AD8 80053ED8 0046C023 */ subu $t8, $v0, $a2 -/* 054ADC 80053EDC 44802000 */ mtc1 $zero, $f4 -/* 054AE0 80053EE0 A21801ED */ sb $t8, 0x1ed($s0) -/* 054AE4 80053EE4 E60400B4 */ swc1 $f4, 0xb4($s0) -/* 054AE8 80053EE8 C42667A0 */ lwc1 $f6, %lo(D_800E67A0)($at) -/* 054AEC 80053EEC 821901ED */ lb $t9, 0x1ed($s0) -/* 054AF0 80053EF0 E6060090 */ swc1 $f6, 0x90($s0) -/* 054AF4 80053EF4 1F20000B */ bgtz $t9, .L80053F24 -/* 054AF8 80053EF8 00000000 */ nop -/* 054AFC 80053EFC 86080000 */ lh $t0, ($s0) -/* 054B00 80053F00 24050140 */ li $a1, 320 -/* 054B04 80053F04 05000007 */ bltz $t0, .L80053F24 -/* 054B08 80053F08 00000000 */ nop -/* 054B0C 80053F0C 0C015C12 */ jal racer_play_sound -/* 054B10 80053F10 AFA40028 */ sw $a0, 0x28($sp) -/* 054B14 80053F14 8FA40028 */ lw $a0, 0x28($sp) -/* 054B18 80053F18 10000003 */ b .L80053F28 -/* 054B1C 80053F1C 82020187 */ lb $v0, 0x187($s0) -.L80053F20: -/* 054B20 80053F20 A20001ED */ sb $zero, 0x1ed($s0) -.L80053F24: -/* 054B24 80053F24 82020187 */ lb $v0, 0x187($s0) -.L80053F28: -/* 054B28 80053F28 00000000 */ nop -/* 054B2C 80053F2C 10400005 */ beqz $v0, .L80053F44 -/* 054B30 80053F30 00000000 */ nop -/* 054B34 80053F34 8609018E */ lh $t1, 0x18e($s0) -/* 054B38 80053F38 00000000 */ nop -/* 054B3C 80053F3C 19200003 */ blez $t1, .L80053F4C -/* 054B40 80053F40 00000000 */ nop -.L80053F44: -/* 054B44 80053F44 1000006E */ b .L80054100 -/* 054B48 80053F48 A2000187 */ sb $zero, 0x187($s0) -.L80053F4C: -/* 054B4C 80053F4C 820A01ED */ lb $t2, 0x1ed($s0) -/* 054B50 80053F50 24010004 */ li $at, 4 -/* 054B54 80053F54 11400002 */ beqz $t2, .L80053F60 -/* 054B58 80053F58 00000000 */ nop -/* 054B5C 80053F5C 10410068 */ beq $v0, $at, .L80054100 -.L80053F60: -/* 054B60 80053F60 24010002 */ li $at, 2 -/* 054B64 80053F64 10410008 */ beq $v0, $at, .L80053F88 -/* 054B68 80053F68 24010004 */ li $at, 4 -/* 054B6C 80053F6C 10410006 */ beq $v0, $at, .L80053F88 -/* 054B70 80053F70 02002825 */ move $a1, $s0 -/* 054B74 80053F74 24060002 */ li $a2, 2 -/* 054B78 80053F78 0C015DB8 */ jal func_800576E0 -/* 054B7C 80053F7C AFA40028 */ sw $a0, 0x28($sp) -/* 054B80 80053F80 8FA40028 */ lw $a0, 0x28($sp) -/* 054B84 80053F84 00000000 */ nop -.L80053F88: -/* 054B88 80053F88 920C01C9 */ lbu $t4, 0x1c9($s0) -/* 054B8C 80053F8C 240B0168 */ li $t3, 360 -/* 054B90 80053F90 24010008 */ li $at, 8 -/* 054B94 80053F94 15810002 */ bne $t4, $at, .L80053FA0 -/* 054B98 80053F98 A60B018C */ sh $t3, 0x18c($s0) -/* 054B9C 80053F9C A20001C9 */ sb $zero, 0x1c9($s0) -.L80053FA0: -/* 054BA0 80053FA0 820D01D6 */ lb $t5, 0x1d6($s0) -/* 054BA4 80053FA4 240501C2 */ li $a1, 450 -/* 054BA8 80053FA8 29A10005 */ slti $at, $t5, 5 -/* 054BAC 80053FAC 10200054 */ beqz $at, .L80054100 -/* 054BB0 80053FB0 24060008 */ li $a2, 8 -/* 054BB4 80053FB4 24070081 */ li $a3, 129 -/* 054BB8 80053FB8 0C015C2E */ jal play_random_character_voice -/* 054BBC 80053FBC AFA40028 */ sw $a0, 0x28($sp) -/* 054BC0 80053FC0 820E0187 */ lb $t6, 0x187($s0) -/* 054BC4 80053FC4 8FA40028 */ lw $a0, 0x28($sp) -/* 054BC8 80053FC8 25CFFFFF */ addiu $t7, $t6, -1 -/* 054BCC 80053FCC 2DE10006 */ sltiu $at, $t7, 6 -/* 054BD0 80053FD0 1020004A */ beqz $at, .L800540FC -/* 054BD4 80053FD4 000F7880 */ sll $t7, $t7, 2 -/* 054BD8 80053FD8 3C01800E */ lui $at, %hi(jpt_800E67A4) # $at, 0x800e -/* 054BDC 80053FDC 002F0821 */ addu $at, $at, $t7 -/* 054BE0 80053FE0 8C2F67A4 */ lw $t7, %lo(jpt_800E67A4)($at) -/* 054BE4 80053FE4 00000000 */ nop -/* 054BE8 80053FE8 01E00008 */ jr $t7 -/* 054BEC 80053FEC 00000000 */ nop -glabel L80053FF0 -/* 054BF0 80053FF0 24180001 */ li $t8, 1 -/* 054BF4 80053FF4 A21801F1 */ sb $t8, 0x1f1($s0) -/* 054BF8 80053FF8 83B90027 */ lb $t9, 0x27($sp) -/* 054BFC 80053FFC 3C014080 */ li $at, 0x40800000 # 4.000000 -/* 054C00 80054000 1720000C */ bnez $t9, .L80054034 -/* 054C04 80054004 00000000 */ nop -/* 054C08 80054008 44804000 */ mtc1 $zero, $f8 -/* 054C0C 8005400C 3C014025 */ li $at, 0x40250000 # 2.578125 -/* 054C10 80054010 E608002C */ swc1 $f8, 0x2c($s0) -/* 054C14 80054014 C48A0020 */ lwc1 $f10, 0x20($a0) -/* 054C18 80054018 44819800 */ mtc1 $at, $f19 -/* 054C1C 8005401C 44809000 */ mtc1 $zero, $f18 -/* 054C20 80054020 46005421 */ cvt.d.s $f16, $f10 -/* 054C24 80054024 46328100 */ add.d $f4, $f16, $f18 -/* 054C28 80054028 462021A0 */ cvt.s.d $f6, $f4 -/* 054C2C 8005402C 10000033 */ b .L800540FC -/* 054C30 80054030 E4860020 */ swc1 $f6, 0x20($a0) -.L80054034: -/* 054C34 80054034 C608002C */ lwc1 $f8, 0x2c($s0) -/* 054C38 80054038 44815000 */ mtc1 $at, $f10 -/* 054C3C 8005403C 3C014021 */ li $at, 0x40210000 # 2.515625 -/* 054C40 80054040 460A4403 */ div.s $f16, $f8, $f10 -/* 054C44 80054044 44813800 */ mtc1 $at, $f7 -/* 054C48 80054048 44803000 */ mtc1 $zero, $f6 -/* 054C4C 8005404C E610002C */ swc1 $f16, 0x2c($s0) -/* 054C50 80054050 C4920020 */ lwc1 $f18, 0x20($a0) -/* 054C54 80054054 00000000 */ nop -/* 054C58 80054058 46009121 */ cvt.d.s $f4, $f18 -/* 054C5C 8005405C 46262200 */ add.d $f8, $f4, $f6 -/* 054C60 80054060 462042A0 */ cvt.s.d $f10, $f8 -/* 054C64 80054064 10000025 */ b .L800540FC -/* 054C68 80054068 E48A0020 */ swc1 $f10, 0x20($a0) -glabel L8005406C -/* 054C6C 8005406C 24080002 */ li $t0, 2 -/* 054C70 80054070 24091002 */ li $t1, 4098 -/* 054C74 80054074 A20801DB */ sb $t0, 0x1db($s0) -/* 054C78 80054078 A60901A2 */ sh $t1, 0x1a2($s0) -/* 054C7C 8005407C 0C015C12 */ jal racer_play_sound -/* 054C80 80054080 2405013B */ li $a1, 315 -/* 054C84 80054084 1000001E */ b .L80054100 -/* 054C88 80054088 A2000187 */ sb $zero, 0x187($s0) -glabel L8005408C -/* 054C8C 8005408C 240A003C */ li $t2, 60 -/* 054C90 80054090 1000001A */ b .L800540FC -/* 054C94 80054094 A20A01ED */ sb $t2, 0x1ed($s0) -glabel L80054098 -/* 054C98 80054098 C610002C */ lwc1 $f16, 0x2c($s0) -/* 054C9C 8005409C 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 054CA0 800540A0 44812800 */ mtc1 $at, $f5 -/* 054CA4 800540A4 44802000 */ mtc1 $zero, $f4 -/* 054CA8 800540A8 460084A1 */ cvt.d.s $f18, $f16 -/* 054CAC 800540AC 46249182 */ mul.d $f6, $f18, $f4 -/* 054CB0 800540B0 240B0078 */ li $t3, 120 -/* 054CB4 800540B4 A60B0204 */ sh $t3, 0x204($s0) -/* 054CB8 800540B8 46203220 */ cvt.s.d $f8, $f6 -/* 054CBC 800540BC 1000000F */ b .L800540FC -/* 054CC0 800540C0 E608002C */ swc1 $f8, 0x2c($s0) -glabel L800540C4 -/* 054CC4 800540C4 44805000 */ mtc1 $zero, $f10 -/* 054CC8 800540C8 240C0001 */ li $t4, 1 -/* 054CCC 800540CC A20C01F1 */ sb $t4, 0x1f1($s0) -/* 054CD0 800540D0 E60A002C */ swc1 $f10, 0x2c($s0) -/* 054CD4 800540D4 3C01800E */ lui $at, %hi(D_800E67C0 + 4) # $at, 0x800e -/* 054CD8 800540D8 C4900020 */ lwc1 $f16, 0x20($a0) -/* 054CDC 800540DC C42567C0 */ lwc1 $f5, %lo(D_800E67C0)($at) -/* 054CE0 800540E0 C42467C4 */ lwc1 $f4, %lo(D_800E67C0 + 4)($at) -/* 054CE4 800540E4 460084A1 */ cvt.d.s $f18, $f16 -/* 054CE8 800540E8 46249180 */ add.d $f6, $f18, $f4 -/* 054CEC 800540EC 24050139 */ li $a1, 313 -/* 054CF0 800540F0 46203220 */ cvt.s.d $f8, $f6 -/* 054CF4 800540F4 0C015C12 */ jal racer_play_sound -/* 054CF8 800540F8 E4880020 */ swc1 $f8, 0x20($a0) -.L800540FC: -glabel L800540FC -/* 054CFC 800540FC A2000187 */ sb $zero, 0x187($s0) -.L80054100: -/* 054D00 80054100 8FBF001C */ lw $ra, 0x1c($sp) -/* 054D04 80054104 8FB00018 */ lw $s0, 0x18($sp) -/* 054D08 80054108 03E00008 */ jr $ra -/* 054D0C 8005410C 27BD0028 */ addiu $sp, $sp, 0x28 - diff --git a/asm/non_matchings/racer/func_8005492C.s b/asm/non_matchings/racer/func_8005492C.s index aceb27d6..fb0dd1d0 100644 --- a/asm/non_matchings/racer/func_8005492C.s +++ b/asm/non_matchings/racer/func_8005492C.s @@ -58,8 +58,8 @@ glabel func_8005492C /* 0555A4 800549A4 240E0001 */ li $t6, 1 /* 0555A8 800549A8 AFAE0038 */ sw $t6, 0x38($sp) .L800549AC: -/* 0555AC 800549AC 3C028012 */ lui $v0, %hi(gCurrentCarInput) # $v0, 0x8012 -/* 0555B0 800549B0 8C42D528 */ lw $v0, %lo(gCurrentCarInput)($v0) +/* 0555AC 800549AC 3C028012 */ lui $v0, %hi(gCurrentRacerInput) # $v0, 0x8012 +/* 0555B0 800549B0 8C42D528 */ lw $v0, %lo(gCurrentRacerInput)($v0) /* 0555B4 800549B4 8C84D534 */ lw $a0, %lo(gCurrentStickX)($a0) /* 0555B8 800549B8 304F4000 */ andi $t7, $v0, 0x4000 /* 0555BC 800549BC 24030006 */ li $v1, 6 @@ -353,11 +353,11 @@ glabel func_8005492C /* 0559F4 80054DF4 3C088012 */ lui $t0, %hi(gCurrentStickY) # $t0, 0x8012 /* 0559F8 80054DF8 46244182 */ mul.d $f6, $f8, $f4 /* 0559FC 80054DFC 8D08D538 */ lw $t0, %lo(gCurrentStickY)($t0) -/* 055A00 80054E00 3C028012 */ lui $v0, %hi(gCurrentCarInput) # $v0, 0x8012 +/* 055A00 80054E00 3C028012 */ lui $v0, %hi(gCurrentRacerInput) # $v0, 0x8012 /* 055A04 80054E04 2901FFE7 */ slti $at, $t0, -0x19 /* 055A08 80054E08 1020000D */ beqz $at, .L80054E40 /* 055A0C 80054E0C 462033A0 */ cvt.s.d $f14, $f6 -/* 055A10 80054E10 8C42D528 */ lw $v0, %lo(gCurrentCarInput)($v0) +/* 055A10 80054E10 8C42D528 */ lw $v0, %lo(gCurrentRacerInput)($v0) /* 055A14 80054E14 00000000 */ nop /* 055A18 80054E18 30498000 */ andi $t1, $v0, 0x8000 /* 055A1C 80054E1C 15200008 */ bnez $t1, .L80054E40 diff --git a/asm/non_matchings/racer/func_80054FD0.s b/asm/non_matchings/racer/func_80054FD0.s index f0e71514..4285776b 100644 --- a/asm/non_matchings/racer/func_80054FD0.s +++ b/asm/non_matchings/racer/func_80054FD0.s @@ -11,8 +11,8 @@ glabel func_80054FD0 /* 055BD8 80054FD8 AFB10028 */ sw $s1, 0x28($sp) /* 055BDC 80054FDC AFB00024 */ sw $s0, 0x24($sp) /* 055BE0 80054FE0 AFA601A8 */ sw $a2, 0x1a8($sp) -/* 055BE4 80054FE4 3C018012 */ lui $at, %hi(D_8011D4F0) # $at, 0x8012 -/* 055BE8 80054FE8 C420D4F0 */ lwc1 $f0, %lo(D_8011D4F0)($at) +/* 055BE4 80054FE4 3C018012 */ lui $at, %hi(gCurrentCourseHeight) # $at, 0x8012 +/* 055BE8 80054FE8 C420D4F0 */ lwc1 $f0, %lo(gCurrentCourseHeight)($at) /* 055BEC 80054FEC C4840010 */ lwc1 $f4, 0x10($a0) /* 055BF0 80054FF0 00A08025 */ move $s0, $a1 /* 055BF4 80054FF4 4604003C */ c.lt.s $f0, $f4 @@ -322,10 +322,10 @@ glabel func_80054FD0 /* 05608C 8005548C 4500003D */ bc1f .L80055584 /* 056090 80055490 00000000 */ nop /* 056094 80055494 921801F3 */ lbu $t8, 0x1f3($s0) -/* 056098 80055498 3C0D8012 */ lui $t5, %hi(D_8011D55C) # $t5, 0x8012 +/* 056098 80055498 3C0D8012 */ lui $t5, %hi(gCurrentPlayerIndex) # $t5, 0x8012 /* 05609C 8005549C 37190008 */ ori $t9, $t8, 8 /* 0560A0 800554A0 A21901F3 */ sb $t9, 0x1f3($s0) -/* 0560A4 800554A4 8DADD55C */ lw $t5, %lo(D_8011D55C)($t5) +/* 0560A4 800554A4 8DADD55C */ lw $t5, %lo(gCurrentPlayerIndex)($t5) /* 0560A8 800554A8 2401FFFF */ li $at, -1 /* 0560AC 800554AC 11A10006 */ beq $t5, $at, .L800554C8 /* 0560B0 800554B0 3C0E8012 */ lui $t6, %hi(gCameraObject) # $t6, 0x8012 diff --git a/asm/non_matchings/racer/func_80055EC0.s b/asm/non_matchings/racer/func_80055EC0.s index d722f2f9..184e7da8 100644 --- a/asm/non_matchings/racer/func_80055EC0.s +++ b/asm/non_matchings/racer/func_80055EC0.s @@ -19,8 +19,8 @@ glabel func_80055EC0 /* 056AD8 80055ED8 00A08025 */ move $s0, $a1 /* 056ADC 80055EDC 10400073 */ beqz $v0, .L800560AC /* 056AE0 80055EE0 00803825 */ move $a3, $a0 -/* 056AE4 80055EE4 3C058012 */ lui $a1, %hi(gActivePlayerButtonPress) # $a1, 0x8012 -/* 056AE8 80055EE8 24A5D52C */ addiu $a1, %lo(gActivePlayerButtonPress) # addiu $a1, $a1, -0x2ad4 +/* 056AE4 80055EE4 3C058012 */ lui $a1, %hi(gCurrentButtonsPressed) # $a1, 0x8012 +/* 056AE8 80055EE8 24A5D52C */ addiu $a1, %lo(gCurrentButtonsPressed) # addiu $a1, $a1, -0x2ad4 /* 056AEC 80055EEC 8CAE0000 */ lw $t6, ($a1) /* 056AF0 80055EF0 00401825 */ move $v1, $v0 /* 056AF4 80055EF4 31CF2000 */ andi $t7, $t6, 0x2000 # Z_TRIG @@ -136,10 +136,10 @@ glabel func_80055EC0 /* 056CA4 800560A4 1000021E */ b .L80056920 /* 056CA8 800560A8 A20B0211 */ sb $t3, 0x211($s0) .L800560AC: -/* 056CAC 800560AC 3C058012 */ lui $a1, %hi(gActivePlayerButtonPress) # $a1, 0x8012 -/* 056CB0 800560B0 24A5D52C */ addiu $a1, %lo(gActivePlayerButtonPress) # addiu $a1, $a1, -0x2ad4 +/* 056CAC 800560AC 3C058012 */ lui $a1, %hi(gCurrentButtonsPressed) # $a1, 0x8012 +/* 056CB0 800560B0 24A5D52C */ addiu $a1, %lo(gCurrentButtonsPressed) # addiu $a1, $a1, -0x2ad4 /* 056CB4 800560B4 8CAD0000 */ lw $t5, ($a1) -/* 056CB8 800560B8 3C018012 */ lui $at, %hi(D_8011D530) # $at, 0x8012 +/* 056CB8 800560B8 3C018012 */ lui $at, %hi(gCurrentButtonsReleased) # $at, 0x8012 /* 056CBC 800560BC 31AE2000 */ andi $t6, $t5, 0x2000 /* 056CC0 800560C0 11C00002 */ beqz $t6, .L800560CC /* 056CC4 800560C4 2404000C */ li $a0, 12 @@ -149,7 +149,7 @@ glabel func_80055EC0 /* 056CD0 800560D0 00000000 */ nop /* 056CD4 800560D4 11E00006 */ beqz $t7, .L800560F0 /* 056CD8 800560D8 00000000 */ nop -/* 056CDC 800560DC AC20D530 */ sw $zero, %lo(D_8011D530)($at) +/* 056CDC 800560DC AC20D530 */ sw $zero, %lo(gCurrentButtonsReleased)($at) /* 056CE0 800560E0 8CB80000 */ lw $t8, ($a1) /* 056CE4 800560E4 2401DFFF */ li $at, -8193 /* 056CE8 800560E8 0301C824 */ and $t9, $t8, $at @@ -192,10 +192,10 @@ glabel func_80055EC0 /* 056D6C 8005616C 032B6821 */ addu $t5, $t9, $t3 /* 056D70 80056170 01A27021 */ addu $t6, $t5, $v0 /* 056D74 80056174 81C80000 */ lb $t0, ($t6) -/* 056D78 80056178 3C058012 */ lui $a1, %hi(gActivePlayerButtonPress) # $a1, 0x8012 +/* 056D78 80056178 3C058012 */ lui $a1, %hi(gCurrentButtonsPressed) # $a1, 0x8012 /* 056D7C 8005617C 2401FFFF */ li $at, -1 /* 056D80 80056180 15010003 */ bne $t0, $at, .L80056190 -/* 056D84 80056184 24A5D52C */ addiu $a1, %lo(gActivePlayerButtonPress) # addiu $a1, $a1, -0x2ad4 +/* 056D84 80056184 24A5D52C */ addiu $a1, %lo(gCurrentButtonsPressed) # addiu $a1, $a1, -0x2ad4 /* 056D88 80056188 100001E5 */ b .L80056920 /* 056D8C 8005618C A2000173 */ sb $zero, 0x173($s0) .L80056190: @@ -213,7 +213,7 @@ glabel func_80055EC0 /* 056DBC 800561BC 00000000 */ nop .L800561C0: /* 056DC0 800561C0 820C0195 */ lb $t4, 0x195($s0) -/* 056DC4 800561C4 3C0B8012 */ lui $t3, %hi(gCurrentCarInput) # $t3, 0x8012 +/* 056DC4 800561C4 3C0B8012 */ lui $t3, %hi(gCurrentRacerInput) # $t3, 0x8012 /* 056DC8 800561C8 11800006 */ beqz $t4, .L800561E4 /* 056DCC 800561CC 00000000 */ nop /* 056DD0 800561D0 82190175 */ lb $t9, 0x175($s0) @@ -222,12 +222,12 @@ glabel func_80055EC0 /* 056DDC 800561DC 8FBF0024 */ lw $ra, 0x24($sp) /* 056DE0 800561E0 A2000195 */ sb $zero, 0x195($s0) .L800561E4: -/* 056DE4 800561E4 8D6BD528 */ lw $t3, %lo(gCurrentCarInput)($t3) -/* 056DE8 800561E8 3C038012 */ lui $v1, %hi(D_8011D530) # $v1, 0x8012 +/* 056DE4 800561E4 8D6BD528 */ lw $t3, %lo(gCurrentRacerInput)($t3) +/* 056DE8 800561E8 3C038012 */ lui $v1, %hi(gCurrentButtonsReleased) # $v1, 0x8012 /* 056DEC 800561EC 316D2000 */ andi $t5, $t3, 0x2000 /* 056DF0 800561F0 15A00006 */ bnez $t5, .L8005620C /* 056DF4 800561F4 00000000 */ nop -/* 056DF8 800561F8 8C63D530 */ lw $v1, %lo(D_8011D530)($v1) +/* 056DF8 800561F8 8C63D530 */ lw $v1, %lo(gCurrentButtonsReleased)($v1) /* 056DFC 800561FC 00000000 */ nop /* 056E00 80056200 306E2000 */ andi $t6, $v1, 0x2000 /* 056E04 80056204 11C00045 */ beqz $t6, .L8005631C @@ -242,8 +242,8 @@ glabel func_80055EC0 /* 056E24 80056224 11010017 */ beq $t0, $at, .L80056284 /* 056E28 80056228 24010007 */ li $at, 7 /* 056E2C 8005622C 11010015 */ beq $t0, $at, .L80056284 -/* 056E30 80056230 3C038012 */ lui $v1, %hi(D_8011D530) # $v1, 0x8012 -/* 056E34 80056234 8C63D530 */ lw $v1, %lo(D_8011D530)($v1) +/* 056E30 80056230 3C038012 */ lui $v1, %hi(gCurrentButtonsReleased) # $v1, 0x8012 +/* 056E34 80056234 8C63D530 */ lw $v1, %lo(gCurrentButtonsReleased)($v1) /* 056E38 80056238 00000000 */ nop /* 056E3C 8005623C 306F2000 */ andi $t7, $v1, 0x2000 /* 056E40 80056240 10000036 */ b .L8005631C @@ -258,8 +258,8 @@ glabel func_80055EC0 /* 056E60 80056260 8FA8007C */ lw $t0, 0x7c($sp) /* 056E64 80056264 A2000175 */ sb $zero, 0x175($s0) /* 056E68 80056268 AE020140 */ sw $v0, 0x140($s0) -/* 056E6C 8005626C 3C038012 */ lui $v1, %hi(D_8011D530) # $v1, 0x8012 -/* 056E70 80056270 8C63D530 */ lw $v1, %lo(D_8011D530)($v1) +/* 056E6C 8005626C 3C038012 */ lui $v1, %hi(gCurrentButtonsReleased) # $v1, 0x8012 +/* 056E70 80056270 8C63D530 */ lw $v1, %lo(gCurrentButtonsReleased)($v1) /* 056E74 80056274 AFA2006C */ sw $v0, 0x6c($sp) /* 056E78 80056278 30782000 */ andi $t8, $v1, 0x2000 /* 056E7C 8005627C 10000027 */ b .L8005631C @@ -288,7 +288,7 @@ glabel func_80055EC0 .L800562D0: /* 056ED0 800562D0 24010006 */ li $at, 6 /* 056ED4 800562D4 4600303C */ c.lt.s $f6, $f0 -/* 056ED8 800562D8 3C038012 */ lui $v1, %hi(D_8011D530) # $v1, 0x8012 +/* 056ED8 800562D8 3C038012 */ lui $v1, %hi(gCurrentButtonsReleased) # $v1, 0x8012 /* 056EDC 800562DC 45000009 */ bc1f .L80056304 /* 056EE0 800562E0 00000000 */ nop /* 056EE4 800562E4 15010005 */ bne $t0, $at, .L800562FC @@ -304,7 +304,7 @@ glabel func_80055EC0 /* 056F04 80056304 AE000140 */ sw $zero, 0x140($s0) /* 056F08 80056308 00005025 */ move $t2, $zero .L8005630C: -/* 056F0C 8005630C 8C63D530 */ lw $v1, %lo(D_8011D530)($v1) +/* 056F0C 8005630C 8C63D530 */ lw $v1, %lo(gCurrentButtonsReleased)($v1) /* 056F10 80056310 AFAA006C */ sw $t2, 0x6c($sp) /* 056F14 80056314 306C2000 */ andi $t4, $v1, 0x2000 /* 056F18 80056318 01801825 */ move $v1, $t4 diff --git a/asm/non_matchings/racer/func_8005A424.s b/asm/non_matchings/racer/func_8005A424.s index b820eb6b..4add9526 100644 --- a/asm/non_matchings/racer/func_8005A424.s +++ b/asm/non_matchings/racer/func_8005A424.s @@ -27,7 +27,7 @@ glabel func_8005A424 .L8005A488: /* 05B088 8005A488 28618000 */ slti $at, $v1, -0x8000 /* 05B08C 8005A48C 10200003 */ beqz $at, .L8005A49C -/* 05B090 8005A490 3C048012 */ lui $a0, %hi(gCurrentCarInput) # $a0, 0x8012 +/* 05B090 8005A490 3C048012 */ lui $a0, %hi(gCurrentRacerInput) # $a0, 0x8012 /* 05B094 8005A494 3401FFFF */ li $at, 65535 /* 05B098 8005A498 00611821 */ addu $v1, $v1, $at .L8005A49C: @@ -36,11 +36,11 @@ glabel func_8005A424 /* 05B0A4 8005A4A4 24A5D534 */ addiu $a1, %lo(gCurrentStickX) # addiu $a1, $a1, -0x2acc /* 05B0A8 8005A4A8 00035943 */ sra $t3, $v1, 5 /* 05B0AC 8005A4AC ACAB0000 */ sw $t3, ($a1) -/* 05B0B0 8005A4B0 3C018012 */ lui $at, %hi(gActivePlayerButtonPress) # $at, 0x8012 -/* 05B0B4 8005A4B4 AC20D52C */ sw $zero, %lo(gActivePlayerButtonPress)($at) -/* 05B0B8 8005A4B8 3C018012 */ lui $at, %hi(D_8011D530) # $at, 0x8012 -/* 05B0BC 8005A4BC AC20D530 */ sw $zero, %lo(D_8011D530)($at) -/* 05B0C0 8005A4C0 2484D528 */ addiu $a0, %lo(gCurrentCarInput) # addiu $a0, $a0, -0x2ad8 +/* 05B0B0 8005A4B0 3C018012 */ lui $at, %hi(gCurrentButtonsPressed) # $at, 0x8012 +/* 05B0B4 8005A4B4 AC20D52C */ sw $zero, %lo(gCurrentButtonsPressed)($at) +/* 05B0B8 8005A4B8 3C018012 */ lui $at, %hi(gCurrentButtonsReleased) # $at, 0x8012 +/* 05B0BC 8005A4BC AC20D530 */ sw $zero, %lo(gCurrentButtonsReleased)($at) +/* 05B0C0 8005A4C0 2484D528 */ addiu $a0, %lo(gCurrentRacerInput) # addiu $a0, $a0, -0x2ad8 /* 05B0C4 8005A4C4 AC800000 */ sw $zero, ($a0) /* 05B0C8 8005A4C8 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 /* 05B0CC 8005A4CC AC20D538 */ sw $zero, %lo(gCurrentStickY)($at) diff --git a/asm/non_matchings/racer/func_8005A6F0.s b/asm/non_matchings/racer/func_8005A6F0.s index f19a5335..49ebe1de 100644 --- a/asm/non_matchings/racer/func_8005A6F0.s +++ b/asm/non_matchings/racer/func_8005A6F0.s @@ -32,13 +32,13 @@ glabel func_8005A6F0 /* 05B2F4 8005A6F4 AFBF002C */ sw $ra, 0x2c($sp) /* 05B2F8 8005A6F8 AFB00028 */ sw $s0, 0x28($sp) /* 05B2FC 8005A6FC 240EFFFF */ li $t6, -1 -/* 05B300 8005A700 3C018012 */ lui $at, %hi(D_8011D55C) # $at, 0x8012 +/* 05B300 8005A700 3C018012 */ lui $at, %hi(gCurrentPlayerIndex) # $at, 0x8012 /* 05B304 8005A704 00A08025 */ move $s0, $a1 /* 05B308 8005A708 AFA400A0 */ sw $a0, 0xa0($sp) /* 05B30C 8005A70C AFA600A8 */ sw $a2, 0xa8($sp) /* 05B310 8005A710 AFA700AC */ sw $a3, 0xac($sp) /* 05B314 8005A714 0C01B683 */ jal get_render_context -/* 05B318 8005A718 AC2ED55C */ sw $t6, %lo(D_8011D55C)($at) +/* 05B318 8005A718 AC2ED55C */ sw $t6, %lo(gCurrentPlayerIndex)($at) /* 05B31C 8005A71C 0C01AF6C */ jal get_current_level_header /* 05B320 8005A720 AFA20094 */ sw $v0, 0x94($sp) /* 05B324 8005A724 AFA20070 */ sw $v0, 0x70($sp) @@ -367,8 +367,8 @@ glabel func_8005A6F0 /* 05B7BC 8005ABBC 8FA700AC */ lw $a3, 0xac($sp) /* 05B7C0 8005ABC0 0C01105C */ jal func_80044170 /* 05B7C4 8005ABC4 02002825 */ move $a1, $s0 -/* 05B7C8 8005ABC8 3C0E8012 */ lui $t6, %hi(gCurrentCarInput) # $t6, 0x8012 -/* 05B7CC 8005ABCC 8DCED528 */ lw $t6, %lo(gCurrentCarInput)($t6) +/* 05B7C8 8005ABC8 3C0E8012 */ lui $t6, %hi(gCurrentRacerInput) # $t6, 0x8012 +/* 05B7CC 8005ABCC 8DCED528 */ lw $t6, %lo(gCurrentRacerInput)($t6) /* 05B7D0 8005ABD0 3C0C8012 */ lui $t4, %hi(D_8011D56C) # $t4, 0x8012 /* 05B7D4 8005ABD4 31D88000 */ andi $t8, $t6, 0x8000 /* 05B7D8 8005ABD8 258CD56C */ addiu $t4, %lo(D_8011D56C) # addiu $t4, $t4, -0x2a94 @@ -594,25 +594,25 @@ glabel func_8005A6F0 /* 05BB10 8005AF10 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 /* 05BB14 8005AF14 AC20D534 */ sw $zero, %lo(gCurrentStickX)($at) /* 05BB18 8005AF18 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 -/* 05BB1C 8005AF1C 3C038012 */ lui $v1, %hi(gCurrentCarInput) # $v1, 0x8012 +/* 05BB1C 8005AF1C 3C038012 */ lui $v1, %hi(gCurrentRacerInput) # $v1, 0x8012 /* 05BB20 8005AF20 AC20D538 */ sw $zero, %lo(gCurrentStickY)($at) -/* 05BB24 8005AF24 2463D528 */ addiu $v1, %lo(gCurrentCarInput) # addiu $v1, $v1, -0x2ad8 -/* 05BB28 8005AF28 3C028012 */ lui $v0, %hi(gActivePlayerButtonPress) # $v0, 0x8012 +/* 05BB24 8005AF24 2463D528 */ addiu $v1, %lo(gCurrentRacerInput) # addiu $v1, $v1, -0x2ad8 +/* 05BB28 8005AF28 3C028012 */ lui $v0, %hi(gCurrentButtonsPressed) # $v0, 0x8012 /* 05BB2C 8005AF2C AC600000 */ sw $zero, ($v1) -/* 05BB30 8005AF30 3C018012 */ lui $at, %hi(D_8011D530) # $at, 0x8012 -/* 05BB34 8005AF34 2442D52C */ addiu $v0, %lo(gActivePlayerButtonPress) # addiu $v0, $v0, -0x2ad4 +/* 05BB30 8005AF30 3C018012 */ lui $at, %hi(gCurrentButtonsReleased) # $at, 0x8012 +/* 05BB34 8005AF34 2442D52C */ addiu $v0, %lo(gCurrentButtonsPressed) # addiu $v0, $v0, -0x2ad4 /* 05BB38 8005AF38 3C088012 */ lui $t0, %hi(gRaceStartTimer) # $t0, 0x8012 -/* 05BB3C 8005AF3C AC20D530 */ sw $zero, %lo(D_8011D530)($at) +/* 05BB3C 8005AF3C AC20D530 */ sw $zero, %lo(gCurrentButtonsReleased)($at) /* 05BB40 8005AF40 2508D540 */ addiu $t0, %lo(gRaceStartTimer) # addiu $t0, $t0, -0x2ac0 /* 05BB44 8005AF44 AC400000 */ sw $zero, ($v0) .L8005AF48: /* 05BB48 8005AF48 921901D6 */ lbu $t9, 0x1d6($s0) -/* 05BB4C 8005AF4C 3C028012 */ lui $v0, %hi(gActivePlayerButtonPress) # $v0, 0x8012 -/* 05BB50 8005AF50 3C038012 */ lui $v1, %hi(gCurrentCarInput) # $v1, 0x8012 +/* 05BB4C 8005AF4C 3C028012 */ lui $v0, %hi(gCurrentButtonsPressed) # $v0, 0x8012 +/* 05BB50 8005AF50 3C038012 */ lui $v1, %hi(gCurrentRacerInput) # $v1, 0x8012 /* 05BB54 8005AF54 2F21000E */ sltiu $at, $t9, 0xe -/* 05BB58 8005AF58 2463D528 */ addiu $v1, %lo(gCurrentCarInput) # addiu $v1, $v1, -0x2ad8 +/* 05BB58 8005AF58 2463D528 */ addiu $v1, %lo(gCurrentRacerInput) # addiu $v1, $v1, -0x2ad8 /* 05BB5C 8005AF5C 10200094 */ beqz $at, .L8005B1B0 -/* 05BB60 8005AF60 2442D52C */ addiu $v0, %lo(gActivePlayerButtonPress) # addiu $v0, $v0, -0x2ad4 +/* 05BB60 8005AF60 2442D52C */ addiu $v0, %lo(gCurrentButtonsPressed) # addiu $v0, $v0, -0x2ad4 /* 05BB64 8005AF64 0019C880 */ sll $t9, $t9, 2 /* 05BB68 8005AF68 3C01800E */ lui $at, %hi(jpt_800E6968) # $at, 0x800e /* 05BB6C 8005AF6C 00390821 */ addu $at, $at, $t9 @@ -626,10 +626,10 @@ glabel L8005AF80 /* 05BB88 8005AF88 8FA600A0 */ lw $a2, 0xa0($sp) /* 05BB8C 8005AF8C 0C013DFD */ jal func_8004F7F4 /* 05BB90 8005AF90 02003825 */ move $a3, $s0 -/* 05BB94 8005AF94 3C038012 */ lui $v1, %hi(gCurrentCarInput) # $v1, 0x8012 -/* 05BB98 8005AF98 3C028012 */ lui $v0, %hi(gActivePlayerButtonPress) # $v0, 0x8012 -/* 05BB9C 8005AF9C 2442D52C */ addiu $v0, %lo(gActivePlayerButtonPress) # addiu $v0, $v0, -0x2ad4 -/* 05BBA0 8005AFA0 2463D528 */ addiu $v1, %lo(gCurrentCarInput) # addiu $v1, $v1, -0x2ad8 +/* 05BB94 8005AF94 3C038012 */ lui $v1, %hi(gCurrentRacerInput) # $v1, 0x8012 +/* 05BB98 8005AF98 3C028012 */ lui $v0, %hi(gCurrentButtonsPressed) # $v0, 0x8012 +/* 05BB9C 8005AF9C 2442D52C */ addiu $v0, %lo(gCurrentButtonsPressed) # addiu $v0, $v0, -0x2ad4 +/* 05BBA0 8005AFA0 2463D528 */ addiu $v1, %lo(gCurrentRacerInput) # addiu $v1, $v1, -0x2ad8 /* 05BBA4 8005AFA4 10000082 */ b .L8005B1B0 /* 05BBA8 8005AFA8 240B0001 */ li $t3, 1 glabel L8005AFAC @@ -638,10 +638,10 @@ glabel L8005AFAC /* 05BBB4 8005AFB4 8FA600A0 */ lw $a2, 0xa0($sp) /* 05BBB8 8005AFB8 0C013308 */ jal func_8004CC20 /* 05BBBC 8005AFBC 02003825 */ move $a3, $s0 -/* 05BBC0 8005AFC0 3C038012 */ lui $v1, %hi(gCurrentCarInput) # $v1, 0x8012 -/* 05BBC4 8005AFC4 3C028012 */ lui $v0, %hi(gActivePlayerButtonPress) # $v0, 0x8012 -/* 05BBC8 8005AFC8 2442D52C */ addiu $v0, %lo(gActivePlayerButtonPress) # addiu $v0, $v0, -0x2ad4 -/* 05BBCC 8005AFCC 2463D528 */ addiu $v1, %lo(gCurrentCarInput) # addiu $v1, $v1, -0x2ad8 +/* 05BBC0 8005AFC0 3C038012 */ lui $v1, %hi(gCurrentRacerInput) # $v1, 0x8012 +/* 05BBC4 8005AFC4 3C028012 */ lui $v0, %hi(gCurrentButtonsPressed) # $v0, 0x8012 +/* 05BBC8 8005AFC8 2442D52C */ addiu $v0, %lo(gCurrentButtonsPressed) # addiu $v0, $v0, -0x2ad4 +/* 05BBCC 8005AFCC 2463D528 */ addiu $v1, %lo(gCurrentRacerInput) # addiu $v1, $v1, -0x2ad8 /* 05BBD0 8005AFD0 10000077 */ b .L8005B1B0 /* 05BBD4 8005AFD4 240B0001 */ li $t3, 1 glabel L8005AFD8 @@ -650,10 +650,10 @@ glabel L8005AFD8 /* 05BBE0 8005AFE0 8FA600A0 */ lw $a2, 0xa0($sp) /* 05BBE4 8005AFE4 0C011949 */ jal func_80046524 /* 05BBE8 8005AFE8 02003825 */ move $a3, $s0 -/* 05BBEC 8005AFEC 3C038012 */ lui $v1, %hi(gCurrentCarInput) # $v1, 0x8012 -/* 05BBF0 8005AFF0 3C028012 */ lui $v0, %hi(gActivePlayerButtonPress) # $v0, 0x8012 -/* 05BBF4 8005AFF4 2442D52C */ addiu $v0, %lo(gActivePlayerButtonPress) # addiu $v0, $v0, -0x2ad4 -/* 05BBF8 8005AFF8 2463D528 */ addiu $v1, %lo(gCurrentCarInput) # addiu $v1, $v1, -0x2ad8 +/* 05BBEC 8005AFEC 3C038012 */ lui $v1, %hi(gCurrentRacerInput) # $v1, 0x8012 +/* 05BBF0 8005AFF0 3C028012 */ lui $v0, %hi(gCurrentButtonsPressed) # $v0, 0x8012 +/* 05BBF4 8005AFF4 2442D52C */ addiu $v0, %lo(gCurrentButtonsPressed) # addiu $v0, $v0, -0x2ad4 +/* 05BBF8 8005AFF8 2463D528 */ addiu $v1, %lo(gCurrentRacerInput) # addiu $v1, $v1, -0x2ad8 /* 05BBFC 8005AFFC 1000006C */ b .L8005B1B0 /* 05BC00 8005B000 240B0001 */ li $t3, 1 glabel L8005B004 @@ -662,10 +662,10 @@ glabel L8005B004 /* 05BC0C 8005B00C 8FA600A0 */ lw $a2, 0xa0($sp) /* 05BC10 8005B010 0C0125E5 */ jal func_80049794 /* 05BC14 8005B014 02003825 */ move $a3, $s0 -/* 05BC18 8005B018 3C038012 */ lui $v1, %hi(gCurrentCarInput) # $v1, 0x8012 -/* 05BC1C 8005B01C 3C028012 */ lui $v0, %hi(gActivePlayerButtonPress) # $v0, 0x8012 -/* 05BC20 8005B020 2442D52C */ addiu $v0, %lo(gActivePlayerButtonPress) # addiu $v0, $v0, -0x2ad4 -/* 05BC24 8005B024 2463D528 */ addiu $v1, %lo(gCurrentCarInput) # addiu $v1, $v1, -0x2ad8 +/* 05BC18 8005B018 3C038012 */ lui $v1, %hi(gCurrentRacerInput) # $v1, 0x8012 +/* 05BC1C 8005B01C 3C028012 */ lui $v0, %hi(gCurrentButtonsPressed) # $v0, 0x8012 +/* 05BC20 8005B020 2442D52C */ addiu $v0, %lo(gCurrentButtonsPressed) # addiu $v0, $v0, -0x2ad4 +/* 05BC24 8005B024 2463D528 */ addiu $v1, %lo(gCurrentRacerInput) # addiu $v1, $v1, -0x2ad8 /* 05BC28 8005B028 10000061 */ b .L8005B1B0 /* 05BC2C 8005B02C 240B0001 */ li $t3, 1 glabel L8005B030 @@ -674,10 +674,10 @@ glabel L8005B030 /* 05BC38 8005B038 8FA600A0 */ lw $a2, 0xa0($sp) /* 05BC3C 8005B03C 0C013657 */ jal func_8004D95C /* 05BC40 8005B040 02003825 */ move $a3, $s0 -/* 05BC44 8005B044 3C038012 */ lui $v1, %hi(gCurrentCarInput) # $v1, 0x8012 -/* 05BC48 8005B048 3C028012 */ lui $v0, %hi(gActivePlayerButtonPress) # $v0, 0x8012 -/* 05BC4C 8005B04C 2442D52C */ addiu $v0, %lo(gActivePlayerButtonPress) # addiu $v0, $v0, -0x2ad4 -/* 05BC50 8005B050 2463D528 */ addiu $v1, %lo(gCurrentCarInput) # addiu $v1, $v1, -0x2ad8 +/* 05BC44 8005B044 3C038012 */ lui $v1, %hi(gCurrentRacerInput) # $v1, 0x8012 +/* 05BC48 8005B048 3C028012 */ lui $v0, %hi(gCurrentButtonsPressed) # $v0, 0x8012 +/* 05BC4C 8005B04C 2442D52C */ addiu $v0, %lo(gCurrentButtonsPressed) # addiu $v0, $v0, -0x2ad4 +/* 05BC50 8005B050 2463D528 */ addiu $v1, %lo(gCurrentRacerInput) # addiu $v1, $v1, -0x2ad8 /* 05BC54 8005B054 10000056 */ b .L8005B1B0 /* 05BC58 8005B058 240B0001 */ li $t3, 1 glabel L8005B05C @@ -689,10 +689,10 @@ glabel L8005B05C /* 05BC70 8005B070 AFA20014 */ sw $v0, 0x14($sp) /* 05BC74 8005B074 0C0170D9 */ jal func_8005C364 /* 05BC78 8005B078 AFA80018 */ sw $t0, 0x18($sp) -/* 05BC7C 8005B07C 3C038012 */ lui $v1, %hi(gCurrentCarInput) # $v1, 0x8012 -/* 05BC80 8005B080 3C028012 */ lui $v0, %hi(gActivePlayerButtonPress) # $v0, 0x8012 -/* 05BC84 8005B084 2442D52C */ addiu $v0, %lo(gActivePlayerButtonPress) # addiu $v0, $v0, -0x2ad4 -/* 05BC88 8005B088 2463D528 */ addiu $v1, %lo(gCurrentCarInput) # addiu $v1, $v1, -0x2ad8 +/* 05BC7C 8005B07C 3C038012 */ lui $v1, %hi(gCurrentRacerInput) # $v1, 0x8012 +/* 05BC80 8005B080 3C028012 */ lui $v0, %hi(gCurrentButtonsPressed) # $v0, 0x8012 +/* 05BC84 8005B084 2442D52C */ addiu $v0, %lo(gCurrentButtonsPressed) # addiu $v0, $v0, -0x2ad4 +/* 05BC88 8005B088 2463D528 */ addiu $v1, %lo(gCurrentRacerInput) # addiu $v1, $v1, -0x2ad8 /* 05BC8C 8005B08C 10000048 */ b .L8005B1B0 /* 05BC90 8005B090 240B0001 */ li $t3, 1 glabel L8005B094 @@ -704,10 +704,10 @@ glabel L8005B094 /* 05BCA8 8005B0A8 AFA20014 */ sw $v0, 0x14($sp) /* 05BCAC 8005B0AC 0C017434 */ jal func_8005D0D0 /* 05BCB0 8005B0B0 AFA80018 */ sw $t0, 0x18($sp) -/* 05BCB4 8005B0B4 3C038012 */ lui $v1, %hi(gCurrentCarInput) # $v1, 0x8012 -/* 05BCB8 8005B0B8 3C028012 */ lui $v0, %hi(gActivePlayerButtonPress) # $v0, 0x8012 -/* 05BCBC 8005B0BC 2442D52C */ addiu $v0, %lo(gActivePlayerButtonPress) # addiu $v0, $v0, -0x2ad4 -/* 05BCC0 8005B0C0 2463D528 */ addiu $v1, %lo(gCurrentCarInput) # addiu $v1, $v1, -0x2ad8 +/* 05BCB4 8005B0B4 3C038012 */ lui $v1, %hi(gCurrentRacerInput) # $v1, 0x8012 +/* 05BCB8 8005B0B8 3C028012 */ lui $v0, %hi(gCurrentButtonsPressed) # $v0, 0x8012 +/* 05BCBC 8005B0BC 2442D52C */ addiu $v0, %lo(gCurrentButtonsPressed) # addiu $v0, $v0, -0x2ad4 +/* 05BCC0 8005B0C0 2463D528 */ addiu $v1, %lo(gCurrentRacerInput) # addiu $v1, $v1, -0x2ad8 /* 05BCC4 8005B0C4 1000003A */ b .L8005B1B0 /* 05BCC8 8005B0C8 240B0001 */ li $t3, 1 glabel L8005B0CC @@ -721,10 +721,10 @@ glabel L8005B0CC /* 05BCE8 8005B0E8 AFA30010 */ sw $v1, 0x10($sp) /* 05BCEC 8005B0EC 0C017608 */ jal func_8005D820 /* 05BCF0 8005B0F0 AFA80018 */ sw $t0, 0x18($sp) -/* 05BCF4 8005B0F4 3C038012 */ lui $v1, %hi(gCurrentCarInput) # $v1, 0x8012 -/* 05BCF8 8005B0F8 3C028012 */ lui $v0, %hi(gActivePlayerButtonPress) # $v0, 0x8012 -/* 05BCFC 8005B0FC 2442D52C */ addiu $v0, %lo(gActivePlayerButtonPress) # addiu $v0, $v0, -0x2ad4 -/* 05BD00 8005B100 2463D528 */ addiu $v1, %lo(gCurrentCarInput) # addiu $v1, $v1, -0x2ad8 +/* 05BCF4 8005B0F4 3C038012 */ lui $v1, %hi(gCurrentRacerInput) # $v1, 0x8012 +/* 05BCF8 8005B0F8 3C028012 */ lui $v0, %hi(gCurrentButtonsPressed) # $v0, 0x8012 +/* 05BCFC 8005B0FC 2442D52C */ addiu $v0, %lo(gCurrentButtonsPressed) # addiu $v0, $v0, -0x2ad4 +/* 05BD00 8005B100 2463D528 */ addiu $v1, %lo(gCurrentRacerInput) # addiu $v1, $v1, -0x2ad8 /* 05BD04 8005B104 1000002A */ b .L8005B1B0 /* 05BD08 8005B108 240B0001 */ li $t3, 1 glabel L8005B10C @@ -736,10 +736,10 @@ glabel L8005B10C /* 05BD20 8005B120 AFA20014 */ sw $v0, 0x14($sp) /* 05BD24 8005B124 0C017930 */ jal func_8005E4C0 /* 05BD28 8005B128 AFA80018 */ sw $t0, 0x18($sp) -/* 05BD2C 8005B12C 3C038012 */ lui $v1, %hi(gCurrentCarInput) # $v1, 0x8012 -/* 05BD30 8005B130 3C028012 */ lui $v0, %hi(gActivePlayerButtonPress) # $v0, 0x8012 -/* 05BD34 8005B134 2442D52C */ addiu $v0, %lo(gActivePlayerButtonPress) # addiu $v0, $v0, -0x2ad4 -/* 05BD38 8005B138 2463D528 */ addiu $v1, %lo(gCurrentCarInput) # addiu $v1, $v1, -0x2ad8 +/* 05BD2C 8005B12C 3C038012 */ lui $v1, %hi(gCurrentRacerInput) # $v1, 0x8012 +/* 05BD30 8005B130 3C028012 */ lui $v0, %hi(gCurrentButtonsPressed) # $v0, 0x8012 +/* 05BD34 8005B134 2442D52C */ addiu $v0, %lo(gCurrentButtonsPressed) # addiu $v0, $v0, -0x2ad4 +/* 05BD38 8005B138 2463D528 */ addiu $v1, %lo(gCurrentRacerInput) # addiu $v1, $v1, -0x2ad8 /* 05BD3C 8005B13C 1000001C */ b .L8005B1B0 /* 05BD40 8005B140 240B0001 */ li $t3, 1 glabel L8005B144 @@ -751,10 +751,10 @@ glabel L8005B144 /* 05BD58 8005B158 AFA20014 */ sw $v0, 0x14($sp) /* 05BD5C 8005B15C 0C017AA4 */ jal func_8005EA90 /* 05BD60 8005B160 AFA80018 */ sw $t0, 0x18($sp) -/* 05BD64 8005B164 3C038012 */ lui $v1, %hi(gCurrentCarInput) # $v1, 0x8012 -/* 05BD68 8005B168 3C028012 */ lui $v0, %hi(gActivePlayerButtonPress) # $v0, 0x8012 -/* 05BD6C 8005B16C 2442D52C */ addiu $v0, %lo(gActivePlayerButtonPress) # addiu $v0, $v0, -0x2ad4 -/* 05BD70 8005B170 2463D528 */ addiu $v1, %lo(gCurrentCarInput) # addiu $v1, $v1, -0x2ad8 +/* 05BD64 8005B164 3C038012 */ lui $v1, %hi(gCurrentRacerInput) # $v1, 0x8012 +/* 05BD68 8005B168 3C028012 */ lui $v0, %hi(gCurrentButtonsPressed) # $v0, 0x8012 +/* 05BD6C 8005B16C 2442D52C */ addiu $v0, %lo(gCurrentButtonsPressed) # addiu $v0, $v0, -0x2ad4 +/* 05BD70 8005B170 2463D528 */ addiu $v1, %lo(gCurrentRacerInput) # addiu $v1, $v1, -0x2ad8 /* 05BD74 8005B174 1000000E */ b .L8005B1B0 /* 05BD78 8005B178 240B0001 */ li $t3, 1 glabel L8005B17C @@ -766,10 +766,10 @@ glabel L8005B17C /* 05BD90 8005B190 AFA20014 */ sw $v0, 0x14($sp) /* 05BD94 8005B194 0C017CC4 */ jal func_8005F310 /* 05BD98 8005B198 AFA80018 */ sw $t0, 0x18($sp) -/* 05BD9C 8005B19C 3C038012 */ lui $v1, %hi(gCurrentCarInput) # $v1, 0x8012 -/* 05BDA0 8005B1A0 3C028012 */ lui $v0, %hi(gActivePlayerButtonPress) # $v0, 0x8012 -/* 05BDA4 8005B1A4 2442D52C */ addiu $v0, %lo(gActivePlayerButtonPress) # addiu $v0, $v0, -0x2ad4 -/* 05BDA8 8005B1A8 2463D528 */ addiu $v1, %lo(gCurrentCarInput) # addiu $v1, $v1, -0x2ad8 +/* 05BD9C 8005B19C 3C038012 */ lui $v1, %hi(gCurrentRacerInput) # $v1, 0x8012 +/* 05BDA0 8005B1A0 3C028012 */ lui $v0, %hi(gCurrentButtonsPressed) # $v0, 0x8012 +/* 05BDA4 8005B1A4 2442D52C */ addiu $v0, %lo(gCurrentButtonsPressed) # addiu $v0, $v0, -0x2ad4 +/* 05BDA8 8005B1A8 2463D528 */ addiu $v1, %lo(gCurrentRacerInput) # addiu $v1, $v1, -0x2ad8 /* 05BDAC 8005B1AC 240B0001 */ li $t3, 1 .L8005B1B0: glabel L8005B1B0 @@ -946,11 +946,11 @@ glabel L8005B1B0 /* 05C024 8005B424 8FB80094 */ lw $t8, 0x94($sp) /* 05C028 8005B428 240B0001 */ li $t3, 1 /* 05C02C 8005B42C 130B0008 */ beq $t8, $t3, .L8005B450 -/* 05C030 8005B430 3C058012 */ lui $a1, %hi(gActivePlayerButtonPress) # $a1, 0x8012 -/* 05C034 8005B434 3C068012 */ lui $a2, %hi(gCurrentCarInput) # $a2, 0x8012 -/* 05C038 8005B438 8CC6D528 */ lw $a2, %lo(gCurrentCarInput)($a2) +/* 05C030 8005B430 3C058012 */ lui $a1, %hi(gCurrentButtonsPressed) # $a1, 0x8012 +/* 05C034 8005B434 3C068012 */ lui $a2, %hi(gCurrentRacerInput) # $a2, 0x8012 +/* 05C038 8005B438 8CC6D528 */ lw $a2, %lo(gCurrentRacerInput)($a2) /* 05C03C 8005B43C 8FA400A0 */ lw $a0, 0xa0($sp) -/* 05C040 8005B440 8CA5D52C */ lw $a1, %lo(gActivePlayerButtonPress)($a1) +/* 05C040 8005B440 8CA5D52C */ lw $a1, %lo(gCurrentButtonsPressed)($a1) /* 05C044 8005B444 8FA700A8 */ lw $a3, 0xa8($sp) /* 05C048 8005B448 0C001434 */ jal func_800050D0 /* 05C04C 8005B44C 00000000 */ nop @@ -1094,7 +1094,7 @@ glabel L8005B1B0 /* 05C240 8005B640 8C45000C */ lw $a1, 0xc($v0) /* 05C244 8005B644 8C460010 */ lw $a2, 0x10($v0) /* 05C248 8005B648 8C470014 */ lw $a3, 0x14($v0) -/* 05C24C 8005B64C 0C0025B6 */ jal func_800096D8 +/* 05C24C 8005B64C 0C0025B6 */ jal update_spatial_audio_position /* 05C250 8005B650 00000000 */ nop /* 05C254 8005B654 8602018E */ lh $v0, 0x18e($s0) /* 05C258 8005B658 10000019 */ b .L8005B6C0 @@ -1143,7 +1143,7 @@ glabel L8005B1B0 /* 05C2F0 8005B6F0 8C45000C */ lw $a1, 0xc($v0) /* 05C2F4 8005B6F4 8C460010 */ lw $a2, 0x10($v0) /* 05C2F8 8005B6F8 8C470014 */ lw $a3, 0x14($v0) -/* 05C2FC 8005B6FC 0C0025B6 */ jal func_800096D8 +/* 05C2FC 8005B6FC 0C0025B6 */ jal update_spatial_audio_position /* 05C300 8005B700 00000000 */ nop .L8005B704: /* 05C304 8005B704 3C018012 */ lui $at, %hi(D_8011D584) # $at, 0x8012 diff --git a/asm/non_matchings/racer/update_camera_car.s b/asm/non_matchings/racer/update_camera_car.s index caa9f30d..305e4753 100644 --- a/asm/non_matchings/racer/update_camera_car.s +++ b/asm/non_matchings/racer/update_camera_car.s @@ -367,9 +367,9 @@ glabel update_camera_car /* 05930C 8005870C 0C01C1FE */ jal sine_s /* 059310 80058710 000B2403 */ sra $a0, $t3, 0x10 /* 059314 80058714 C7AC0040 */ lwc1 $f12, 0x40($sp) -/* 059318 80058718 3C0D8012 */ lui $t5, %hi(gCurrentCarInput) # $t5, 0x8012 +/* 059318 80058718 3C0D8012 */ lui $t5, %hi(gCurrentRacerInput) # $t5, 0x8012 /* 05931C 8005871C 460C0202 */ mul.s $f8, $f0, $f12 -/* 059320 80058720 8DADD528 */ lw $t5, %lo(gCurrentCarInput)($t5) +/* 059320 80058720 8DADD528 */ lw $t5, %lo(gCurrentRacerInput)($t5) /* 059324 80058724 44807000 */ mtc1 $zero, $f14 /* 059328 80058728 8FA70070 */ lw $a3, 0x70($sp) /* 05932C 8005872C 31AF8000 */ andi $t7, $t5, 0x8000 diff --git a/asm/non_matchings/racer/update_camera_plane.s b/asm/non_matchings/racer/update_camera_plane.s index 8e80fd67..df745e0b 100644 --- a/asm/non_matchings/racer/update_camera_plane.s +++ b/asm/non_matchings/racer/update_camera_plane.s @@ -23,8 +23,8 @@ glabel update_camera_plane /* 04CECC 8004C2CC AFBF0014 */ sw $ra, 0x14($sp) /* 04CED0 8004C2D0 E7AC0050 */ swc1 $f12, 0x50($sp) /* 04CED4 8004C2D4 AFA50054 */ sw $a1, 0x54($sp) -/* 04CED8 8004C2D8 3C018012 */ lui $at, %hi(D_8011D4F0) # $at, 0x8012 -/* 04CEDC 8004C2DC C424D4F0 */ lwc1 $f4, %lo(D_8011D4F0)($at) +/* 04CED8 8004C2D8 3C018012 */ lui $at, %hi(gCurrentCourseHeight) # $at, 0x8012 +/* 04CEDC 8004C2DC C424D4F0 */ lwc1 $f4, %lo(gCurrentCourseHeight)($at) /* 04CEE0 8004C2E0 C4A60010 */ lwc1 $f6, 0x10($a1) /* 04CEE4 8004C2E4 44801000 */ mtc1 $zero, $f2 /* 04CEE8 8004C2E8 46062401 */ sub.s $f16, $f4, $f6 @@ -53,7 +53,7 @@ glabel update_camera_plane /* 04CF3C 8004C33C C7B20030 */ lwc1 $f18, 0x30($sp) /* 04CF40 8004C340 24010001 */ li $at, 1 /* 04CF44 8004C344 14410007 */ bne $v0, $at, .L8004C364 -/* 04CF48 8004C348 3C0F8012 */ lui $t7, %hi(gCurrentCarInput) # $t7, 0x8012 +/* 04CF48 8004C348 3C0F8012 */ lui $t7, %hi(gCurrentRacerInput) # $t7, 0x8012 /* 04CF4C 8004C34C 3C014334 */ li $at, 0x43340000 # 180.000000 /* 04CF50 8004C350 44817000 */ mtc1 $at, $f14 /* 04CF54 8004C354 3C014248 */ li $at, 0x42480000 # 50.000000 @@ -69,7 +69,7 @@ glabel update_camera_plane /* 04CF78 8004C378 44819000 */ mtc1 $at, $f18 /* 04CF7C 8004C37C 00000000 */ nop .L8004C380: -/* 04CF80 8004C380 8DEFD528 */ lw $t7, %lo(gCurrentCarInput)($t7) +/* 04CF80 8004C380 8DEFD528 */ lw $t7, %lo(gCurrentRacerInput)($t7) /* 04CF84 8004C384 00000000 */ nop /* 04CF88 8004C388 31F80010 */ andi $t8, $t7, 0x10 /* 04CF8C 8004C38C 13000006 */ beqz $t8, .L8004C3A8 diff --git a/asm/non_matchings/unknown_005740/func_800096D8.s b/asm/non_matchings/unknown_005740/update_spatial_audio_position.s similarity index 91% rename from asm/non_matchings/unknown_005740/func_800096D8.s rename to asm/non_matchings/unknown_005740/update_spatial_audio_position.s index 740a63ea..9c1c679a 100644 --- a/asm/non_matchings/unknown_005740/func_800096D8.s +++ b/asm/non_matchings/unknown_005740/update_spatial_audio_position.s @@ -1,4 +1,4 @@ -glabel func_800096D8 +glabel update_spatial_audio_position /* 00A2D8 800096D8 44856000 */ mtc1 $a1, $f12 /* 00A2DC 800096DC 44867000 */ mtc1 $a2, $f14 /* 00A2E0 800096E0 AFA7000C */ sw $a3, 0xc($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003F0F8.s b/asm/non_matchings/unknown_032760/func_8003F0F8.s index f25a004f..b6282e73 100644 --- a/asm/non_matchings/unknown_032760/func_8003F0F8.s +++ b/asm/non_matchings/unknown_032760/func_8003F0F8.s @@ -99,7 +99,7 @@ glabel func_8003F0F8 /* 03FE68 8003F268 8E45000C */ lw $a1, 0xc($s2) /* 03FE6C 8003F26C 8E460010 */ lw $a2, 0x10($s2) /* 03FE70 8003F270 8E470014 */ lw $a3, 0x14($s2) -/* 03FE74 8003F274 0C0025B6 */ jal func_800096D8 +/* 03FE74 8003F274 0C0025B6 */ jal update_spatial_audio_position /* 03FE78 8003F278 00000000 */ nop /* 03FE7C 8003F27C 1000000F */ b .L8003F2BC /* 03FE80 8003F280 8FBF0044 */ lw $ra, 0x44($sp) diff --git a/include/level_object_entries.h b/include/level_object_entries.h index d43b6dcb..c0d5831b 100644 --- a/include/level_object_entries.h +++ b/include/level_object_entries.h @@ -3,7 +3,7 @@ /* Size: 8 bytes. Shared across every entry. */ typedef struct LevelObjectEntryCommon { - u8 object_id; // 9-bit object ID to load (uses size's MSB). + u8 objectID; // 9-bit object ID to load (uses size's MSB). u8 size; // 7-bit total entry length (MSB is used in object_id). s16 x, y, z; // Position in level } LevelObjectEntryCommon; diff --git a/include/sound_ids.h b/include/sound_ids.h index 446f0e17..74ac0f2d 100644 --- a/include/sound_ids.h +++ b/include/sound_ids.h @@ -312,7 +312,7 @@ enum SoundID { SOUND_VOICE_TT_DRAGON_FOREST, SOUND_VOICE_TT_FUTURE_FUN_LAND, SOUND_VOICE_TT_ICICLE_PYRAMID, - SOUND_VOICE_TT_SHIVER_ISLAND, + SOUND_VOICE_TT_SHERBET_ISLAND, SOUND_VOICE_TT_SNOWFLAKE_MOUNTAIN, SOUND_VOICE_TT_SMOKEY_CASTLE, SOUND_VOICE_TT_TROPHY_RACE, @@ -331,7 +331,7 @@ enum SoundID { SOUND_TWANG, SOUND_UNK317, // Unsure SOUND_VOICE_TT_POWERUP, - SOUND_SPLOINK, + SOUND_SPLAT, SOUND_PLOP2, SOUND_VOICE_TT_INTRO, // "Hi there, I'm T.T!" SOUND_VOICE_TT_SEE_YOU, // "See you there" @@ -552,7 +552,7 @@ enum SoundID { SOUND_VOICE_CONKER_NEGATIVE8, SOUND_VOICE_TIMBER_NEGATIVE8, SOUND_VOICE_BANJO_NEGATIVE8, - SOUND_VOICE_DRUMSTICK_NEGATIVE8, + SOUND_VOICE_DRUMSTICK_NEGATIVE8, // Sounds kind of profane ngl SOUND_VOICE_PIPSY_NEGATIVE8, SOUND_VOICE_TT_NEGATIVE8, SOUND_VOICE_DIDDY_NEGATIVE8, diff --git a/include/structs.h b/include/structs.h index bcf3a90c..39a1b7a7 100644 --- a/include/structs.h +++ b/include/structs.h @@ -237,7 +237,7 @@ typedef struct LevelHeader { /* 0x44 */ u8 unk44[0x5]; /* 0x49 */ s8 unk49; - /* 0x4A */ u8 unk4A; + /* 0x4A */ s8 playerIndex; /* 0x4B */ s8 laps; /* 0x4C */ s8 race_type; /* 0x4D */ s8 vehicle; @@ -808,7 +808,7 @@ typedef struct Object_Racer { /* 0x002 */ u8 unk2; /* 0x003 */ s8 characterId; // Affects minimap color, horn, voice, etc. /* 0x004 */ s32 unk4; - /* 0x008 */ f32 unk8; + /* 0x008 */ f32 forwardVel; /* 0x00C */ s32 unkC; /* 0x010 */ f32 unk10; /* 0x014 */ f32 unk14; @@ -820,7 +820,7 @@ typedef struct Object_Racer { /* 0x02A */ u16 unk2A; /* 0x02C */ f32 velocity; /* 0x030 */ f32 lateral_velocity; - /* 0x034 */ s32 unk34; + /* 0x034 */ s32 unk34; // I think this is the engine pitch for the hovercraft and plane, but I cannot yet confirm. /* 0x038 */ f32 ox1; /* 0x03C */ f32 oy1; /* 0x040 */ f32 oz1; @@ -837,25 +837,25 @@ typedef struct Object_Racer { /* 0x06C */ s32 unk6C; /* 0x070 */ s32 unk70; /* 0x074 */ f32 unk74; - /* 0x078 */ f32 unk78; - /* 0x07C */ f32 unk7C; - /* 0x080 */ f32 unk80; + /* 0x078 */ f32 carBobX; + /* 0x07C */ f32 carBobY; + /* 0x080 */ f32 carBobZ; /* 0x084 */ f32 unk84; /* 0x088 */ f32 unk88; /* 0x08C */ f32 stretch_height; /* 0x090 */ f32 stretch_height_cap; /* 0x094 */ f32 camera_zoom; - /* 0x098 */ f32 unk98; + /* 0x098 */ f32 unk98; // Can only guess this is yaw. /* 0x09C */ f32 pitch; - /* 0x0A0 */ f32 unkA0; - /* 0x0A4 */ s32 unkA4; + /* 0x0A0 */ f32 unkA0; // might be roll + /* 0x0A4 */ f32 unkA4; /* 0x0A8 */ f32 checkpoint_distance; /* 0x0AC */ f32 unkAC; /* 0x0B0 */ f32 unkB0; /* 0x0B4 */ f32 throttle; /* 0x0B8 */ f32 brake; /* 0x0BC */ f32 unkBC; - /* 0x0C0 */ f32 unkC0; + /* 0x0C0 */ f32 buoyancy; /* 0x0C4 */ f32 unkC4; /* 0x0C8 */ f32 unkC8; /* 0x0CC */ f32 unkCC; @@ -873,7 +873,7 @@ typedef struct Object_Racer { /* 0x11C */ f32 unk11C; /* 0x120 */ f32 unk120; /* 0x124 */ f32 unk124; - /* 0x128 */ u32 lap_times[3]; + /* 0x128 */ s32 lap_times[3]; /* 0x134 */ s32 unk134; /* 0x138 */ s32 unk138; /* 0x13C */ s32 unk13C; @@ -883,8 +883,8 @@ typedef struct Object_Racer { /* 0x14C */ struct Object *unk14C; /* 0x150 */ struct Object *unk150; /* 0x154 */ struct Object *unk154; - /* 0x158 */ s32 unk158; - /* 0x15C */ s32 unk15C; + /* 0x158 */ struct Object *unk158; + /* 0x15C */ struct Object *unk15C; /* 0x160 */ s16 y_rotation_offset; /* 0x162 */ s16 x_rotation_offset; /* 0x164 */ s16 z_rotation_offset; @@ -900,18 +900,17 @@ typedef struct Object_Racer { /* 0x175 */ s8 unk175; /* 0x176 */ s16 unk176; /* 0x178 */ s32 unk178; - /* 0x17C */ s32 unk17C; - /* 0x180 */ s32 unk180; + /* 0x17C */ s32 shieldSoundMask; + /* 0x180 */ s32 unk180; // Soundmask for banana pickup, whether that's the only use I do not yet know. /* 0x184 */ s8 unk184; /* 0x185 */ s8 bananas; /* 0x186 */ u8 unk186; - /* 0x187 */ s8 unk187; + /* 0x187 */ s8 attackType; /* 0x188 */ s8 unk188; - /* 0x189 */ s8 unk189; - /* 0x18A */ s8 unk18A; - /* 0x18B */ s8 unk18B; + /* 0x189 */ s8 shieldType; + /* 0x18A */ s16 unk18A; /* 0x18C */ s16 unk18C; - /* 0x18E */ s16 unk18E; + /* 0x18E */ s16 shieldTimer; /* 0x190 */ s16 unk190; /* 0x192 */ s8 unk192; /* 0x193 */ s8 unk193; @@ -930,10 +929,11 @@ typedef struct Object_Racer { /* 0x1AC */ u8 unk1AC; /* 0x1AD */ u8 unk1AD; /* 0x1AE */ s16 unk1AE; - /* 0x1B0 */ s32 unk1B0; + /* 0x1B0 */ s16 unk1B0; + /* 0x1B2 */ s16 unk1B2; /* 0x1B4 */ s32 unk1B4; /* 0x1B8 */ s16 unk1B8; - /* 0x1BA */ u16 unk1BA; + /* 0x1BA */ s16 unk1BA; /* 0x1BC */ s32 unk1BC; /* 0x1C0 */ s32 unk1C0; /* 0x1C4 */ s16 unk1C4; @@ -947,7 +947,7 @@ typedef struct Object_Racer { /* 0x1CE */ u8 unk1CE; /* 0x1CF */ s8 unk1CF; /* 0x1D0 */ s8 spectateCamID; - /* 0x1D1 */ u8 unk1D1; + /* 0x1D1 */ s8 unk1D1; /* 0x1D2 */ s8 unk1D2; /* 0x1D3 */ s8 boostTimer; /* 0x1D4 */ u8 unk1D4; @@ -955,7 +955,7 @@ typedef struct Object_Racer { /* 0x1D6 */ s8 unk1D6; /* 0x1D7 */ s8 unk1D7; /* 0x1D8 */ s8 raceStatus; - /* 0x1D9 */ u8 unk1D9; + /* 0x1D9 */ s8 unk1D9; /* 0x1DA */ u8 unk1DA; /* 0x1DB */ s8 spinout_timer; /* 0x1DC */ u8 wheel_surfaces[4]; @@ -981,7 +981,7 @@ typedef struct Object_Racer { /* 0x1F3 */ u8 unk1F3; /* 0x1F4 */ u8 startInput; /* 0x1F5 */ u8 unk1F5; - /* 0x1F6 */ u8 unk1F6; + /* 0x1F6 */ s8 unk1F6; /* 0x1F7 */ u8 transparency; /* 0x290 */ u8 indicator_type; /* 0x291 */ s8 indicator_timer; @@ -989,8 +989,8 @@ typedef struct Object_Racer { /* 0x1FB */ s8 unk1FB; /* 0x1FC */ s8 unk1FC; /* 0x1FD */ u8 unk1FD; - /* 0x1FE */ s8 unk1FE; - /* 0x1FF */ s8 unk1FF; + /* 0x1FE */ u8 unk1FE; + /* 0x1FF */ u8 unk1FF; /* 0x200 */ s8 unk200; /* 0x201 */ s8 unk201; /* 0x202 */ s8 unk202; @@ -1002,8 +1002,8 @@ typedef struct Object_Racer { /* 0x20B */ s8 unk20B; /* 0x20C */ u8 throttleReleased; /* 0x20D */ u8 unk20D; - /* 0x20E */ s16 unk20E; - /* 0x210 */ s8 unk210; + /* 0x20E */ u16 unk20E; + /* 0x210 */ u8 unk210; /* 0x211 */ s8 unk211; /* 0x212 */ u8 unk212; /* 0x213 */ s8 unk213; @@ -1394,14 +1394,6 @@ typedef struct Object { u32 unk378[174]; // Not an array. Unknown values. } Object; -typedef struct unk80027FC4 { - u8 unk0; - u8 unk1; - s16 unk2; - s16 unk4; - s16 unk6; -} unk80027FC4; - // Unused typedef struct GhostHeaderChecksum { u8 levelID; diff --git a/lib/src/mips1/sc/sched.c b/lib/src/mips1/sc/sched.c index c91d950a..b2c07bc8 100644 --- a/lib/src/mips1/sc/sched.c +++ b/lib/src/mips1/sc/sched.c @@ -288,7 +288,7 @@ void __scHandleRetrace(OSSched *sc) { gRetraceCounter64++; gRetraceCounter32++; - sc->frameCount++; + sc->frameCount+=1; // If you want to make the game 60FPS, change this to 2. if ((sc->unkTask) && (sc->frameCount >= 2)) { unkTask = sc->unkTask; diff --git a/src/object_functions.c b/src/object_functions.c index 14bde344..d47a1c12 100644 --- a/src/object_functions.c +++ b/src/object_functions.c @@ -212,9 +212,7 @@ s32 func_80011560(void); void func_80011570(Object*, f32, f32, f32); void func_8003FC44(f32, f32, f32, s32, s32, f32, s32); s16 arctan2_f(f32, f32); -s32 func_8002AD08(f32, f32**, s32); void play_sound_global(u16, s32 *); -void func_8000488C(s32); void func_800AFC3C(Object *, s32); void gParticlePtrList_addObject(Object *); @@ -558,7 +556,7 @@ void obj_loop_trophycab(Object *obj, s32 speed) { s32 sp34; s32 isTrophyRaceAvaliable; s32 raceType; - unk80027FC4 sp44; + LevelObjectEntryCommon sp44; Settings *settings; LevelHeader *curLevelHeader; Object_TrophyCabinet *obj64; @@ -578,11 +576,11 @@ void obj_loop_trophycab(Object *obj, s32 speed) { if ((raceType != 7) && (raceType != 6)) { // Make sure the current level is not a cutscene. obj->unk7C.word = 1; if ((settings->trophies >> (((settings->worldId - 1) ^ 0) * 2)) & 3) { - sp44.unk0 = 128; - sp44.unk2 = obj->segment.unk3C_a.unk3C->unk2; - sp44.unk4 = obj->segment.unk3C_a.unk3C->unk4; - sp44.unk6 = obj->segment.unk3C_a.unk3C->unk6; - sp44.unk1 = 8; + sp44.objectID = 128; + sp44.x = obj->segment.unk3C_a.unk3C->unk2; + sp44.y = obj->segment.unk3C_a.unk3C->unk4; + sp44.z = obj->segment.unk3C_a.unk3C->unk6; + sp44.size = 8; trophyObj = spawn_object(&sp44, 1); if (trophyObj) { trophyObj->segment.unk3C_a.unk3C = (void *) 0; @@ -1305,7 +1303,7 @@ void obj_loop_snowball(Object *obj, s32 speed) { if (obj64->soundMask == 0) { func_80009558(obj64->unk24, obj->segment.trans.x_position, obj->segment.trans.y_position, obj->segment.trans.z_position, 1, &obj64->soundMask); } else { - func_800096D8(obj64->soundMask, obj->segment.trans.x_position, obj->segment.trans.y_position, obj->segment.trans.z_position); + update_spatial_audio_position(obj64->soundMask, obj->segment.trans.x_position, obj->segment.trans.y_position, obj->segment.trans.z_position); } } func_8001F460(obj, speed, obj); @@ -2077,7 +2075,7 @@ void obj_loop_bananacreator(Object *obj, s32 speed) { newEntry.y = ((s32) ((s16) obj->segment.trans.y_position)) - 3; newEntry.z = (s32) obj->segment.trans.z_position; newEntry.size = 8; - newEntry.object_id = 83; + newEntry.objectID = 83; newBananaObj = spawn_object(&newEntry, 1); obj->unk7C.word = 1; if (newBananaObj) { diff --git a/src/objects.c b/src/objects.c index a7061a23..937cf951 100644 --- a/src/objects.c +++ b/src/objects.c @@ -652,7 +652,7 @@ void func_8000E2B4(void) { sp2C.common.size = sp2C.common.size | ((s32) (object_id & 0x100) >> 1); sp2C.unkA = 0; sp2C.unk8 = 0; - sp2C.common.object_id = (s8) object_id; + sp2C.common.objectID = (s8) object_id; sp2C.common.x = D_8011AD46; sp2C.common.y = D_8011AD48; sp2C.common.z = D_8011AD4A; @@ -1057,11 +1057,11 @@ void render_object(Object *this) { func_80013548(this); } -void func_80013548(Object *arg0) { - if ((arg0->segment.trans.unk6 & 0x8000) == 0 && arg0->segment.header->behaviorId == 1) { - arg0->segment.trans.x_position -= arg0->unk64->racer.unk78; - arg0->segment.trans.y_position -= arg0->unk64->racer.unk7C; - arg0->segment.trans.z_position -= arg0->unk64->racer.unk80; +void func_80013548(Object *obj) { + if ((obj->segment.trans.unk6 & 0x8000) == 0 && obj->segment.header->behaviorId == 1) { + obj->segment.trans.x_position -= obj->unk64->racer.carBobX; + obj->segment.trans.y_position -= obj->unk64->racer.carBobY; + obj->segment.trans.z_position -= obj->unk64->racer.carBobZ; } } @@ -1329,11 +1329,11 @@ u32 func_8001BD94(s32 arg0) { GLOBAL_ASM("asm/non_matchings/objects/func_8001BDD4.s") GLOBAL_ASM("asm/non_matchings/objects/func_8001BF20.s") -s16 func_8001C418(f32 arg0) { +s16 func_8001C418(f32 yPos) { s16 i = 0; s16 out = 0; for(; i < 4; i++) { - if ((D_8011AF18[i] != -20000.0f) && (D_8011AF18[i] < arg0)) { + if ((D_8011AF18[i] != -20000.0f) && (D_8011AF18[i] < yPos)) { out = i; } } diff --git a/src/objects.h b/src/objects.h index be8dead2..a91bcd29 100644 --- a/src/objects.h +++ b/src/objects.h @@ -27,7 +27,11 @@ typedef struct unknown8011AECC { f32 unk14; f32 unk18; f32 unk1C; - u8 pad20[0x1A]; + f32 unk20; + f32 unk24; + Object* unk28; + u8 pad2C[0xA]; + s8 unk36[4]; s8 unk3A; s8 unk3B; } unknown8011AECC; @@ -230,6 +234,7 @@ void func_800245B4(s16 arg0); void func_80012E28(Object *this); f32 catmull_rom_interpolation(f32*, s32, f32); s32 func_80031F88(Object*, s32); +s16 func_8001C418(f32 yPos); //Non Matching void calc_dynamic_lighting_for_object_1(Object *, ObjectModel *, s16, Object *, f32, f32); @@ -246,5 +251,8 @@ s32 func_8001F460(Object*, s32, Object*); void func_80011570(Object *, f32, f32, f32); s32 func_80016DE8(f32, f32, f32, f32, s32, unk80042178 *); void func_8001BF20(void); +void func_80022E18(s32); /* extern */ +void func_80018CE0(Object* obj, f32 xPos, f32 yPos, f32 zPos, s32 updateRate); /* extern */ +s32 func_800185E4(s8, Object* obj, f32 xPos, f32 yPos, f32 zPos, f32* checkpointDistance, u8*); /* extern */ #endif diff --git a/src/racer.c b/src/racer.c index f2da6d18..6594a802 100644 --- a/src/racer.c +++ b/src/racer.c @@ -20,6 +20,12 @@ #include "math_util.h" #include "unknown_0255E0.h" #include "weather.h" +#include "unknown_05CEF0.h" +#include "unknown_05DCD0.h" +#include "unknown_05F0C0.h" +#include "unknown_05F690.h" +#include "unknown_05FF10.h" +#include "unknown_005740.h" #define MAX_NUMBER_OF_GHOST_NODES 360 @@ -44,7 +50,7 @@ f32 D_800DCB60[14] = { 10.0f, 10.0f, }; -s32 D_800DCB98 = 0; // Currently unknown, might be a different type. +s32 gNumViewports = 0; // Currently unknown, might be a different type. // Table used for quantifying speed reduction while the car drives over it, like how grass will slow you down more than the road. // An antipiracy trigger can set the first index to 0.5f, which makes that surface type impossible to drive on. f32 gSurfaceTractionTable[19] = { @@ -142,38 +148,38 @@ const char D_800E62A0[] = "Back\n"; /************ .bss ************/ -f32 D_8011D4F0[2]; +f32 gCurrentCourseHeight; s32 D_8011D4F8[3]; -s32 D_8011D504; +s8 D_8011D504; ObjectCamera *gCameraObject; UNUSED s32 D_8011D50C; ObjectTransform D_8011D510; -s32 gCurrentCarInput; // Related to input of the car. -s32 gActivePlayerButtonPress; -s32 D_8011D530; +s32 gCurrentRacerInput; +s32 gCurrentButtonsPressed; +s32 gCurrentButtonsReleased; s32 gCurrentStickX; s32 gCurrentStickY; s32 D_8011D53C; // Set to 0 and only 0. Checked for being 1, but never true. s32 gRaceStartTimer; -f32 D_8011D544; +f32 D_8011D544; // Starts are 300, then counts down when the race starts. Usage currently unknown. f32 D_8011D548; f32 D_8011D54C; s16 D_8011D550; s8 D_8011D552; s8 D_8011D553; -s32 gCurrentCarSteerVel; // Related to rotational velocity of the car. +s32 gCurrentCarSteerVel; s32 D_8011D558; -s32 D_8011D55C; +s32 gCurrentPlayerIndex; s16 D_8011D560; // Set, but never read. UNUSED s16 D_8011D562; -s32 D_8011D564; -s32 D_8011D568; -s32 D_8011D56C; +f32 *D_8011D564; +s32 *D_8011D568; +f32 D_8011D56C; f32 D_8011D570; f32 D_8011D574; f32 D_8011D578; f32 D_8011D57C; -s8 D_8011D580; +u8 D_8011D580; s8 D_8011D581; s8 D_8011D582; s8 D_8011D583; @@ -190,8 +196,9 @@ s16 D_8011D5A0[2]; s16 gTTGhostNodeCount; // Gets assigned, but never used? s16 D_8011D5A8[2]; s16 D_8011D5AC; -s16 D_8011D5AE; -s32 D_8011D5B0; +s8 D_8011D5AE; +s8 D_8011D5AF; +struct TempStruct8 **D_8011D5B0; s32 D_8011D5B4; s16 D_8011D5B8; @@ -221,7 +228,7 @@ void func_80043ECC(s32 arg0, Object_Racer *racer, s32 updateRate) { temp_v0->unk8[3][1] += temp_v0->unk8[3][3]; D_8011D5BB = 1; } - if (!(gCurrentCarInput & A_BUTTON)) { + if (!(gCurrentRacerInput & A_BUTTON)) { D_8011D5BA += updateRate; } } else { @@ -242,7 +249,7 @@ void func_80043ECC(s32 arg0, Object_Racer *racer, s32 updateRate) { D_8011D5BC = 0; } test = get_misc_asset(12); - if ((D_8011D530 & 0x2000) && racer->balloon_quantity) { + if ((gCurrentButtonsReleased & 0x2000) && racer->balloon_quantity) { if (racer->balloon_level < 3) { phi_a0 = test[racer->balloon_type * 3 + racer->balloon_level]; } else { @@ -323,9 +330,9 @@ void func_80044170(Object *obj, Object_Racer *racer, s32 updateRate) { // Kick it into reverse. if (racer->unk214 != 0) { gCurrentStickX *= -1; - gCurrentCarInput &= ~A_BUTTON; + gCurrentRacerInput &= ~A_BUTTON; gCurrentStickY = -50; - gCurrentCarInput |= B_BUTTON; + gCurrentRacerInput |= B_BUTTON; } // Cap stick inputs. @@ -365,7 +372,61 @@ void func_80045128(struct TempStruct2 *header) { GLOBAL_ASM("asm/non_matchings/racer/func_800452A0.s") GLOBAL_ASM("asm/non_matchings/racer/func_80045C48.s") GLOBAL_ASM("asm/non_matchings/racer/func_80046524.s") -GLOBAL_ASM("asm/non_matchings/racer/func_80048C7C.s") + +void func_80048C7C(Object* obj, Object_Racer* racer) { + s8 bananas; + + if (racer->playerIndex == PLAYER_COMPUTER) { + bananas = 0; + } else { + bananas = racer->bananas; + } + if ((racer->attackType == ATTACK_NONE) || (racer->shieldTimer > 0)) { + racer->attackType = ATTACK_NONE; + return; + } + if (racer->attackType != ATTACK_SQUISHED) { + func_800576E0(obj, racer, 2); + } + play_random_character_voice(obj, SOUND_VOICE_CHARACTER_NEGATIVE, 8, 129); + switch (racer->attackType) { + // Getting hit by a rocket, running into a landmine or an oil slick. + case ATTACK_EXPLOSION: + case ATTACK_SPIN: + racer->unk1F1 = 1; + if (bananas == 0) { + obj->segment.x_velocity = 0.0f; + obj->segment.z_velocity = 0.0f; + obj->segment.y_velocity = 8.0f; + } else { + obj->segment.x_velocity = obj->segment.x_velocity * 0.5; + obj->segment.z_velocity = obj->segment.z_velocity * 0.5; + obj->segment.y_velocity = 6.0f; + } + break; + // Crushed by something big, like a snowball. + case ATTACK_SQUISHED: + racer->squish_timer = 60; + break; + // Running into a bubble trap. + case ATTACK_BUBBLE: + racer->unk204 = 0x78; + obj->segment.x_velocity *= 0.7; + if (obj->segment.y_velocity > 2.0f) { + obj->segment.y_velocity = 2.0f; + } + obj->segment.z_velocity *= 0.7; + break; + // This goes unused. + case ATTACK_FLUNG: + racer->unk1F1 = 1; + racer->velocity = 0.0f; + obj->segment.y_velocity += 20.5; + racer_play_sound(obj, 0x139); + break; + } + racer->attackType = ATTACK_NONE; +} /** * Handles the camera movement when the player is driving a hovercraft. @@ -406,7 +467,7 @@ void update_camera_hovercraft(f32 updateRate, Object *obj, Object_Racer *racer) } brakeVar = racer->brake; tempZoom = gCameraObject->zoom; - baseSpeed = racer->unk8; + baseSpeed = racer->forwardVel; switch (gCameraObject->zoom) { case 1: phi_f14 += 35.0f; @@ -505,7 +566,57 @@ void update_camera_hovercraft(f32 updateRate, Object *obj, Object_Racer *racer) } } +// Function itself matches but causes a diff in another func. +#ifdef NON_MATCHING +f32 func_800494E0(Object* obj1, Object_Racer* racer, f32 *pos, s8 arg3, s32 updateRate, s32 arg5, f32 arg6) { + Matrix mtx; + f32 velocity; + s32 angle; + s32 v1; + f32 delta; + + delta = updateRate; + if (arg3 == 14) { + velocity = racer->velocity; + if (velocity < 0.0f) { + velocity = -velocity; + } + velocity = 1.0 - (velocity * 0.166); + if (velocity < 0.0f) { + velocity = 0.0f; + } + } else { + obj1->segment.trans.x_position += pos[0] * delta * arg6; + obj1->segment.trans.z_position += pos[2] * delta * arg6; + velocity = 1.0f; + } + D_8011D510.y_rotation = -obj1->segment.trans.y_rotation; + D_8011D510.x_rotation = 0; + D_8011D510.z_rotation = 0; + D_8011D510.x_position = 0.0f; + D_8011D510.y_position = 0.0f; + D_8011D510.z_position = 0.0f; + D_8011D510.scale = 1.0f; + func_8006FE74(&mtx, &D_8011D510); + guMtxXFMF(mtx, pos[0], pos[1], pos[2], &pos[0], &pos[1], &pos[2]); + angle = -((s16) (u16)arctan2_f(pos[0], pos[1])) * velocity; + angle = (u16) (angle - (arg5 << 6)) - (u16) racer->x_rotation_vel; + angle = angle > 0x8000 ? angle - 0xffff : angle; + angle = angle < -0x8000 ? angle + 0xffff : angle; + racer->x_rotation_vel += (angle * updateRate) >> 4; + v1 = ((s16) (u16)arctan2_f(pos[2], pos[1]) * velocity); + v1 += -gCurrentStickY * 32; + v1 += 0x3C0; + angle = (u16)v1 - ((u16) obj1->segment.trans.x_rotation); + angle = angle > 0x8000 ? angle - 0xffff : angle; + angle = angle < -0x8000 ? angle + 0xffff : angle; + obj1->segment.trans.x_rotation += (angle * updateRate) >> 4; + return velocity; +} +#else GLOBAL_ASM("asm/non_matchings/racer/func_800494E0.s") +#endif + GLOBAL_ASM("asm/non_matchings/racer/func_80049794.s") // Something Plane related. @@ -544,20 +655,21 @@ void func_8004C0A0(s32 arg0, Object *planeObj, Object_Racer *racer) { } } +// Another attack handler by the looks of things. void func_8004C140(Object *obj, Object_Racer *racer) { s8 bananas; - s8 temp; + s8 attackType; if (racer->playerIndex == PLAYER_COMPUTER) { bananas = 0; } else { bananas = racer->bananas; } - temp = racer->unk187; - if (temp == 0 || racer->unk18E > 0) { - racer->unk187 = 0; + attackType = racer->attackType; + if (attackType == 0 || racer->shieldTimer > 0) { + racer->attackType = ATTACK_NONE; return; } - if (temp != 4) { + if (attackType != ATTACK_SQUISHED) { func_800576E0(obj, racer, 2); } racer->unk18C = 360; @@ -566,29 +678,29 @@ void func_8004C140(Object *obj, Object_Racer *racer) { } if (racer->unk1D6 < 5) { play_random_character_voice(obj, SOUND_VOICE_CHARACTER_NEGATIVE, 8, 129); - switch (racer->unk187) { - case 1: - case 2: + switch (racer->attackType) { + case ATTACK_EXPLOSION: + case ATTACK_SPIN: if (bananas != 0) { racer->spinout_timer = 40; } else { racer->spinout_timer = 60; } break; - case 3: + case ATTACK_UNK3: if (bananas != 0) { racer->spinout_timer = 40; } else { racer->spinout_timer = 60; } break; - case 6: + case ATTACK_BUBBLE: racer->unk204 = 120; obj->segment.x_velocity *= 0.7; obj->segment.z_velocity *= 0.7; break; } - racer->unk187 = 0; + racer->attackType = ATTACK_NONE; } } @@ -614,7 +726,7 @@ void update_camera_plane(f32 updateRate, Object* obj, Object_Racer* racer) { s32 delta; delta = (s32) updateRate; - temp_f16 = D_8011D4F0[0]; + temp_f16 = gCurrentCourseHeight; temp_f16 = 200.0f - (obj->segment.trans.y_position + (-temp_f16)); if (temp_f16 < 0.0f) { temp_f16 = 0.0f; @@ -630,7 +742,7 @@ void update_camera_plane(f32 updateRate, Object* obj, Object_Racer* racer) { baseFloat2 = 110.0f; baseFloat1 = 42.0f; } - if (((!(gCurrentCarInput & 0x10)) || racer->unk1E2 < 3) && !racer->unk1F5) { + if (((!(gCurrentRacerInput & 0x10)) || racer->unk1E2 < 3) && !racer->unk1F5) { angle = (-racer->unk1A0 - (racer->unk196 & 0xFFFF)) + 0x8000; if (angle > 0x8000) { angle -= 0xFFFF; @@ -686,7 +798,7 @@ void update_camera_plane(f32 updateRate, Object* obj, Object_Racer* racer) { } gCameraObject->trans.x_rotation += ((angle * delta) >> 4); brakeVar = racer->brake; - baseSpeed = racer->unk8; + baseSpeed = racer->forwardVel; switch (gCameraObject->zoom) { case 1: baseFloat2 += 35.0f; @@ -869,7 +981,7 @@ void update_camera_loop(f32 updateRate, Object* obj, Object_Racer* racer) { gCameraObject->trans.z_position += gCameraObject->z_velocity; } -void func_8004D95C(s32 arg0, s32 arg1, Object *obj, Object_Racer *racer) { +void func_8004D95C(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *racer) { s16 sp26; if (racer->unk118 != 0) { @@ -880,7 +992,7 @@ void func_8004D95C(s32 arg0, s32 arg1, Object *obj, Object_Racer *racer) { } sp26 = obj->segment.unk18; racer->unk1D6 = 10; - func_80049794(arg0, arg1, obj, racer); + func_80049794(updateRate, updateRateF, obj, racer); racer->unk1D6 = racer->unk1D7; obj->segment.unk3B = 0; if (racer->unk1D6 == 10) { @@ -893,7 +1005,7 @@ void func_8004D95C(s32 arg0, s32 arg1, Object *obj, Object_Racer *racer) { racer->unk154->segment.trans.x_rotation = obj->segment.trans.x_rotation; racer->unk154->segment.trans.z_rotation = obj->segment.trans.z_rotation; obj->segment.unk3B = 0; - obj->segment.unk18 = sp26 + arg0; + obj->segment.unk18 = sp26 + updateRate; func_80061C0C(obj); } } @@ -904,77 +1016,77 @@ void func_8004D95C(s32 arg0, s32 arg1, Object *obj, Object_Racer *racer) { * will also initialise a camera object. */ void obj_init_racer(Object *obj, LevelObjectEntry_CharacterFlag *racer) { - Object_Racer *tempObj; + Object_Racer *tempRacer; ActivePlayers player; s32 i; D_8011D53C = 0; - tempObj = (struct Object_Racer *) obj->unk64; + tempRacer = (struct Object_Racer *) obj->unk64; obj->segment.trans.y_rotation = racer->unkC; obj->segment.trans.x_rotation = racer->unkA; obj->segment.trans.z_rotation = racer->unk8; player = racer->unkE; - tempObj->unk194 = 0; - tempObj->stretch_height = 1.0f; - tempObj->stretch_height_cap = 1.0f; + tempRacer->unk194 = 0; + tempRacer->stretch_height = 1.0f; + tempRacer->stretch_height_cap = 1.0f; // Decide which player ID to assign to this object. Human players get a value from 0-3. // Computer players will be -1. if (player >= PLAYER_ONE && player <= PLAYER_FOUR) { if (func_8000E158()) { player = 1 - player; } - tempObj->playerIndex = player; + tempRacer->playerIndex = player; } else { - tempObj->playerIndex = PLAYER_COMPUTER; + tempRacer->playerIndex = PLAYER_COMPUTER; } - tempObj->unk1A0 = obj->segment.trans.y_rotation; - tempObj->x_rotation_vel = obj->segment.trans.z_rotation; - tempObj->unkC4 = 0.5f; + tempRacer->unk1A0 = obj->segment.trans.y_rotation; + tempRacer->x_rotation_vel = obj->segment.trans.z_rotation; + tempRacer->unkC4 = 0.5f; if (1); - tempObj->unk196 = tempObj->unk1A0; - tempObj->unkD8[0] = obj->segment.trans.x_position; - tempObj->unkD8[1] = obj->segment.trans.y_position + 30.0f; - tempObj->unkD8[2] = obj->segment.trans.z_position; - tempObj->unkE4[0] = obj->segment.trans.x_position; - tempObj->unkE4[1] = obj->segment.trans.y_position + 30.0f; - tempObj->unkE4[2] = obj->segment.trans.z_position; - tempObj->unkF0[0] = obj->segment.trans.x_position; - tempObj->unkF0[1] = obj->segment.trans.y_position + 30.0f; - tempObj->unkF0[2] = obj->segment.trans.z_position; - tempObj->unkFC[0] = obj->segment.trans.x_position; - tempObj->unkFC[1] = obj->segment.trans.y_position + 30.0f; - tempObj->unkFC[2] = obj->segment.trans.z_position; - tempObj->prev_x_position = obj->segment.trans.x_position; - tempObj->prev_y_position = obj->segment.trans.y_position; - tempObj->prev_z_position = obj->segment.trans.z_position; + tempRacer->unk196 = tempRacer->unk1A0; + tempRacer->unkD8[0] = obj->segment.trans.x_position; + tempRacer->unkD8[1] = obj->segment.trans.y_position + 30.0f; + tempRacer->unkD8[2] = obj->segment.trans.z_position; + tempRacer->unkE4[0] = obj->segment.trans.x_position; + tempRacer->unkE4[1] = obj->segment.trans.y_position + 30.0f; + tempRacer->unkE4[2] = obj->segment.trans.z_position; + tempRacer->unkF0[0] = obj->segment.trans.x_position; + tempRacer->unkF0[1] = obj->segment.trans.y_position + 30.0f; + tempRacer->unkF0[2] = obj->segment.trans.z_position; + tempRacer->unkFC[0] = obj->segment.trans.x_position; + tempRacer->unkFC[1] = obj->segment.trans.y_position + 30.0f; + tempRacer->unkFC[2] = obj->segment.trans.z_position; + tempRacer->prev_x_position = obj->segment.trans.x_position; + tempRacer->prev_y_position = obj->segment.trans.y_position; + tempRacer->prev_z_position = obj->segment.trans.z_position; obj->unk4C->x_position = obj->segment.trans.x_position; obj->unk4C->y_position = obj->segment.trans.y_position; obj->unk4C->z_position = obj->segment.trans.z_position; - tempObj->unk1E2 = 3; - tempObj->unk1AA = 1; - tempObj->unk1AE = 1; - tempObj->unk1E7 = tempObj->playerIndex * 5; - tempObj->checkpoint_distance = 1.0f; - tempObj->unk1FD = 0; - tempObj->unk178 = 0; - tempObj->unk17C = 0; - tempObj->unk180 = 0; - tempObj->unk218 = 0; - tempObj->unk220 = 0; - tempObj->unk21C = 0; - if (tempObj->playerIndex != -1 && !D_8011D582) { + tempRacer->unk1E2 = 3; + tempRacer->unk1AA = 1; + tempRacer->unk1AE = 1; + tempRacer->unk1E7 = tempRacer->playerIndex * 5; + tempRacer->checkpoint_distance = 1.0f; + tempRacer->unk1FD = 0; + tempRacer->unk178 = 0; + tempRacer->shieldSoundMask = 0; + tempRacer->unk180 = 0; + tempRacer->unk218 = 0; + tempRacer->unk220 = 0; + tempRacer->unk21C = 0; + if (tempRacer->playerIndex != -1 && !D_8011D582) { func_800665E8(player); gCameraObject = func_80069CFC(); gCameraObject->trans.z_rotation = 0; gCameraObject->trans.x_rotation = 0x400; - gCameraObject->trans.y_rotation = tempObj->unk196; + gCameraObject->trans.y_rotation = tempRacer->unk196; gCameraObject->mode = CAMERA_CAR; gCameraObject->unk3C = 0xFF; gCameraObject->unk3D = 0xFF; gCameraObject->unk3E = 0xFF; gCameraObject->unk3F = 0xFF; gCameraObject->unk18 = 0.0f; - func_80057A40(obj, tempObj, 1.0f); + update_player_camera(obj, tempRacer, 1.0f); } if (!D_8011D582) { D_8011D583 = 0; @@ -985,14 +1097,14 @@ void obj_init_racer(Object *obj, LevelObjectEntry_CharacterFlag *racer) { obj->unk4C->unk11 = 0; obj->unk4C->unk10 = 0xF; obj->unk4C->unk12 = 0x14; - tempObj->unk1EE = 0; + tempRacer->unk1EE = 0; if (!D_8011D582) { - tempObj->transparency = 0xFF; + tempRacer->transparency = 0xFF; } D_8011D560 = 0; D_8011D544 = 300.0f; - tempObj->unk1C9 = 6; - tempObj->unk1C6 = 100; + tempRacer->unk1C9 = 6; + tempRacer->unk1C6 = 100; D_8011D580 = 0; // This needs to be on one line to match. @@ -1001,16 +1113,550 @@ void obj_init_racer(Object *obj, LevelObjectEntry_CharacterFlag *racer) { func_80043ECC(0, NULL, 0); D_8011D583 = i; gStartBoostTime = 0; - tempObj->unk20A = 0; + tempRacer->unk20A = 0; } -GLOBAL_ASM("asm/non_matchings/racer/func_8004DE38.s") +/** + * Main function for handling everything related to the player controlled racer object. + * Branches off into a different function if the player becomes computer controlled. (Finishing a race) + */ +void update_player_racer(Object* obj, s32 updateRate) { + s32 tempVar; + s32 temp_v0_17; + s32 context; + Object* tempObj; + f32 delta; + f32 waterHeight; + Object_Racer* tempRacer; + f32 tempX; + f32 tempY; + f32 tempZ; + f32 lastCheckpointDist; + f32 temp_f12; + LevelHeader* header; + unknown8011AECC* temp_v0_16; + s32 angleVel; + s32 temp_v1_4; + s32 i; + struct LevelObjectEntryCommon newObject; + + gNumViewports = get_viewport_count() + 1; + D_8011D581 = 0; + gRaceStartTimer = func_8001139C(); + delta = updateRate; + tempRacer = (Object_Racer *)obj->unk64; + // Cap all of the velocities on the different axes. + // Unfortunately, Rareware didn't appear to use a clamp macro here, which would've saved a lot of real estate. + if (obj->segment.x_velocity > 50.0) { + obj->segment.x_velocity = 50.0f; + } + if (obj->segment.y_velocity > 50.0) { + obj->segment.y_velocity = 50.0f; + } + if (obj->segment.z_velocity > 50.0) { + obj->segment.z_velocity = 50.0f; + } + if (obj->segment.x_velocity < -50.0) { + obj->segment.x_velocity = -50.0f; + } + if (obj->segment.y_velocity < -50.0) { + obj->segment.y_velocity = -50.0f; + } + if (obj->segment.z_velocity < -50.0) { + obj->segment.z_velocity = -50.0f; + } + if (tempRacer->velocity > 50.0) { + tempRacer->velocity = 50.0f; + } + if (tempRacer->lateral_velocity > 50.0) { + tempRacer->lateral_velocity = 50.0f; + } + if (tempRacer->velocity < -50.0) { + tempRacer->velocity = -50.0f; + } + if (tempRacer->lateral_velocity < -50.0) { + tempRacer->lateral_velocity = -50.0f; + } + if (tempRacer->checkpoint_distance < -1.0) { + tempRacer->checkpoint_distance = -1.0f; + } + if (tempRacer->checkpoint_distance > 2.0) { + tempRacer->checkpoint_distance = 2.0f; + } + if (tempRacer->unk1FE == 1) { + tempRacer->unk1F1 = 0; + } + // PAL moves 20% faster. + if (osTvType == TV_TYPE_PAL) { + delta *= 1.2; + } + tempRacer->unk1F6 -= updateRate; + if (tempRacer->unk1F6 < 0) { + tempRacer->unk1F6 = 0; + } + obj->unk74 = 0; + if (tempRacer->unk201 > 0) { + tempRacer->unk201 -= updateRate; + } else { + tempRacer->unk201 = 0; + } + header = get_current_level_header(); + gCurrentCourseHeight = header->course_height; + tempRacer->throttleReleased = 0; + if (tempRacer->playerIndex == PLAYER_COMPUTER) { + func_8005A6F0(obj, tempRacer, updateRate, delta); + } else { + // Print player 1's coordinates to the screen if the debug cheat is enabled. + if ((gRaceStartTimer == 0) && (tempRacer->playerIndex == PLAYER_ONE)) { + if (get_filtered_cheats() & CHEAT_PRINT_COORDS) { + render_printf(&D_800E6280, obj->segment.trans.x_position, obj->segment.trans.y_position, obj->segment.trans.z_position); + } + } + set_render_printf_background_colour(0, 0, 0, 128); + if (func_8002341C()) { + D_8011D586 = 0; + } + context = get_render_context(); + if (gRaceStartTimer == 0) { + if (D_8011D544 > 0.0) { + D_8011D544 -= delta; + } else { + D_8011D544 = 0.0f; + } + } else { + tempRacer->unk1C6 = get_random_number_from_range(-60, 60) + 120; + } + if (tempRacer->unk18C > 0) { + tempRacer->unk18C -= updateRate; + } else { + tempRacer->unk18C = 0; + } + D_8011D564 = (f32*) get_misc_asset(9); + D_8011D56C = D_8011D564[tempRacer->characterId] * 0.45; + if (tempRacer->unk204 > 0) { + D_8011D56C = -0.02f; + } + D_8011D564 = (f32*) get_misc_asset(10); + D_8011D570 = D_8011D564[tempRacer->characterId]; + D_8011D564 = (f32*) get_misc_asset(11); + D_8011D574 = D_8011D564[tempRacer->characterId]; + if (tempRacer->unk1FE == 3) { + D_8011D56C *= (f32) tempRacer->unk1FF / 256; + } + if (tempRacer->unk1FE == 1) { + D_8011D56C -= (D_8011D56C * tempRacer->unk1FF) / 128; + if (tempRacer->unk204 > 0) { + D_8011D56C = -D_8011D56C; + } + } + if (tempRacer->unk1FE == 2) { + tempRacer->unk84 += ((cosine_s((tempRacer->unk1FF << 8)) * 4.0f) - tempRacer->unk84) * 0.0625 * delta; + tempRacer->unk88 += ((sine_s((tempRacer->unk1FF << 8)) * 4.0f) - tempRacer->unk88) * 0.0625 * delta; + } else { + tempRacer->unk84 -= tempRacer->unk84 * 0.0625 * delta; + tempRacer->unk88 -= tempRacer->unk88 * 0.0625 * delta; + } + D_8011D564 = (f32*) get_misc_asset(obj->segment.header->pad5B[1]); + D_8011D568 = get_misc_asset(obj->segment.header->pad5B[2]); + if (obj->segment.y_velocity < 4.0 && (tempRacer->unk1E2 >= 3 || tempRacer->buoyancy != 0.0)) { + tempRacer->unk1F1 = 0; + } + tempX = obj->segment.trans.x_position; + tempY = obj->segment.trans.y_position; + tempZ = obj->segment.trans.z_position; + if (tempRacer->unk1B2 > 0) { + tempRacer->unk1B2 -= updateRate; + if (tempRacer->unk1B2 < 0) { + tempRacer->unk1B2 = 0; + } + } + func_800665E8(tempRacer->playerIndex); + gCameraObject = (ObjectCamera *) func_80069CFC(); + tempRacer->unk1E7++; + gCurrentPlayerIndex = tempRacer->playerIndex; + if ((tempRacer->raceStatus == STATUS_FINISHED) || (context == 1)) { + tempRacer->unk1CA = 1; + tempRacer->playerIndex = PLAYER_COMPUTER; + tempRacer->unk1C9 = 0; + if (tempRacer->shieldTimer >= 6) { + tempRacer->shieldTimer = 5; + } + } + tempVar = tempRacer->playerIndex; + if (tempRacer->playerIndex != PLAYER_COMPUTER) { + if (tempRacer->unk108 == 0) { + if (func_8000E158()) { + tempVar = 1 - tempVar; + } + //Cap the joystick tilt and write the button inputs to the current buffer. + gCurrentStickX = clamp_joystick_x_axis(tempVar); + // Flip the steering for adventure 2. + if (get_filtered_cheats() & CHEAT_MIRRORED_TRACKS) { + gCurrentStickX = -gCurrentStickX; + } + gCurrentStickY = clamp_joystick_y_axis(tempVar); + gCurrentRacerInput = get_buttons_held_from_player(tempVar); + gCurrentButtonsPressed = get_buttons_pressed_from_player(tempVar); + gCurrentButtonsReleased = get_buttons_released_from_player(tempVar); + } else { + func_8005A424(tempRacer, updateRate); + } + } else { + func_80044170(obj, tempRacer, updateRate); + } + //Set the value that decides whether to get an empowered boost. + if ((gCurrentRacerInput & 0x8000) == 0) { + tempRacer->throttleReleased = 1; + } + if (func_80066510() || gRaceStartTimer == 100 || tempRacer->unk1F1 || D_8011D584 || tempRacer->unk148 || tempRacer->unk204 > 0) { + gCurrentStickX = 0; + gCurrentStickY = 0; + gCurrentRacerInput = 0; + gCurrentButtonsPressed = 0; + gCurrentButtonsReleased = 0; + tempRacer->steerAngle = 0; + } + if (tempRacer->unk204 > 0) { + tempRacer->unk204 -= updateRate; + tempRacer->velocity *= 0.9f; + obj->segment.x_velocity *= 0.87f; + if (obj->segment.y_velocity > 2.0f) { + obj->segment.y_velocity = 2.0f; + } + obj->segment.z_velocity *= 0.87f; + } + if (tempRacer->unk206 > 0) { + tempRacer->unk18A = tempRacer->unk206; + tempRacer->unk206 -= updateRate; + } + if (tempRacer->unk18A > 0) { + tempVar = tempRacer->unk18A & 0xF; + tempRacer->unk18A -= updateRate; + if (tempVar < (tempRacer->unk18A & 0xF)) { + tempRacer->unk1D1 = get_random_number_from_range(-80, 80); + } + gCurrentStickX += tempRacer->unk1D1; + } else { + tempRacer->unk18A = 0; + } + if (tempRacer->unk175) { + func_80056E2C(obj, tempRacer, updateRate); + } + // Zero out input before the race has begun. + if (gRaceStartTimer && (header->race_type == RACETYPE_DEFAULT || + header->race_type == RACETYPE_HORSESHOE_GULCH || header->race_type == RACETYPE_BOSS)) { + gCurrentStickX = 0; + gCurrentStickY = 0; + gCurrentRacerInput = 0; + } + // Handle the race timer if it's currently active. + if (gRaceStartTimer == 0 && header->laps > (tempRacer->unk194)) { + // Keep it under 10 minutes. + if (tempRacer->lap_times[tempRacer->unk194] < normalise_time(36000) - updateRate) { + tempRacer->lap_times[tempRacer->unk194] += updateRate; + } else { + tempRacer->lap_times[tempRacer->unk194] = normalise_time(36000); + } + } + // Assign a camera to human players. + if (gCurrentPlayerIndex != PLAYER_COMPUTER) { + gCameraObject = (ObjectCamera *) func_80069CFC(); + } + D_8011D5AE = func_8002B0F4(obj->segment.unk2C.half.lower, obj->segment.trans.x_position, obj->segment.trans.z_position, &D_8011D5B0); + if (D_8011D5AE) { + for (i = 0; i < D_8011D5AE; i++) { + if (D_8011D5B0[i]->unk10 == 0xF) { + if (D_8011D5B0[i]->unk0 < gCurrentCourseHeight) { + gCurrentCourseHeight = D_8011D5B0[i]->unk0; + } + } + } + } + if (tempRacer->unk1D6 != 1) { + waterHeight = -10000.0f; + // So I assume this func exists to find the water height. + D_8011D504 = func_8002AD08(obj->segment.trans.y_position, &waterHeight, D_8011D4F8); + if (D_8011D504) { + if (obj->segment.trans.y_position - 5.0f < waterHeight) { + tempRacer->unk1E5 = 5; + tempRacer->buoyancy = waterHeight - (obj->segment.trans.y_position - 5.0f); + } else { + tempRacer->buoyancy = 0.0f; + } + } else { + if (tempRacer->unk1E5 > 0) { + tempRacer->unk1E5--; + } else { + tempRacer->buoyancy = 0.0f; + } + } + if (tempRacer->unk1E5 > 0 && obj->segment.trans.y_position < waterHeight + 5.0f) { + obj->unk4C->unk14 |= 0x10; + } else { + obj->unk4C->unk14 &= 0xFFEF; + } + } + func_8002ACC8(0); + switch (tempRacer->unk1D6) { + case 0: + func_8004F7F4(updateRate, delta, obj, tempRacer); + break; + case 4: + func_8004CC20(updateRate, delta, obj, tempRacer); + break; + case 1: + func_80046524(updateRate, delta, obj, tempRacer); + break; + case 2: + func_80049794(updateRate, delta, obj, tempRacer); + break; + case 3: + case 10: + func_8004D95C(updateRate, delta, obj, tempRacer); + break; + case 5: + func_8005C364(updateRate, delta, obj, tempRacer, &gCurrentRacerInput, &gCurrentButtonsPressed, &gRaceStartTimer); + break; + case 6: + func_8005D0D0(updateRate, delta, obj, tempRacer, &gCurrentRacerInput, &gCurrentButtonsPressed, &gRaceStartTimer); + break; + case 7: + case 8: + func_8005D820(updateRate, delta, obj, tempRacer, &gCurrentRacerInput, &gCurrentStickX, &gRaceStartTimer); + break; + case 11: + func_8005E4C0(updateRate, delta, obj, tempRacer, &gCurrentRacerInput, &gCurrentButtonsPressed, &gRaceStartTimer); + break; + case 12: + func_8005EA90(updateRate, delta, obj, tempRacer, &gCurrentRacerInput, &gCurrentButtonsPressed, &gRaceStartTimer); + break; + case 13: + func_8005F310(updateRate, delta, obj, tempRacer, &gCurrentRacerInput, &gCurrentButtonsPressed, &gRaceStartTimer); + break; + } + if (tempRacer->unk175 == 0) { + if (tempRacer->unk178) { + func_8000488C(tempRacer->unk178); + tempRacer->unk178 = 0; + } + } + temp_v0_17 = header->playerIndex; + if (temp_v0_17) { + temp_f12 = -(f32) temp_v0_17; + if (tempRacer->velocity > temp_v0_17) { + tempRacer->velocity = temp_v0_17; + } + if (tempRacer->velocity < temp_f12) { + tempRacer->velocity = temp_f12; + } + } + if (context != 1 || func_8000E148()) { + func_800050D0(obj, gCurrentButtonsPressed, gCurrentRacerInput, updateRate); + } + lastCheckpointDist = tempRacer->checkpoint_distance; + tempVar = func_800185E4(tempRacer->unk192, obj, tempX, tempY, tempZ, &tempRacer->checkpoint_distance, &tempRacer->unk1C8); + if (tempVar == -100) { + func_8005C270(tempRacer); + } + temp_v0_16 = func_8001BA1C(tempRacer->unk192, tempRacer->unk1C8); + if (tempRacer->playerIndex == PLAYER_COMPUTER && temp_v0_16->unk36[tempRacer->unk1CA] == 5 && tempRacer->unk1E5) { + tempRacer->unk1C8 = 1; + } + if (temp_v0_16->unk36[tempRacer->unk1CA] == 6) { + tempRacer->unk193 = header->laps + 1; + } + if (tempVar == 0) { + if (tempRacer->playerIndex == PLAYER_COMPUTER && temp_v0_16->unk36[tempRacer->unk1CA] == 2) { + tempRacer->unk1C8 = 1; + } + temp_v0_17 = func_8001BA64(); + tempRacer->unk192++; + if (tempRacer->unk192 >= temp_v0_17) { + tempRacer->unk192 = 0; + if (tempRacer->unk190 > 0) { + if (tempRacer->unk193 < 120) { + tempRacer->unk193++; + } + } + if (tempRacer->playerIndex != PLAYER_COMPUTER && tempRacer->unk193 + 1 == header->laps + && !D_8011D580 && get_current_level_race_type() == RACETYPE_DEFAULT) { + func_800014BC(1.12f); + D_8011D580 = 1; + } + } + if (func_8002341C()) { + if (gCurrentPlayerIndex != PLAYER_COMPUTER) { + temp_v0_16 = func_8001BA1C(tempRacer->unk192, tempRacer->unk1C8); + if (!tempRacer->unk15C) { + newObject.x = 0; + newObject.y = 0; + newObject.z = 0; + newObject.objectID = 0x86; + newObject.size = 8; + tempRacer->unk15C = spawn_object(&newObject, 1); + if (tempRacer->unk15C) { + tempRacer->unk15C->segment.unk3C_a.unk3C = 0; + tempRacer->unk15C->segment.unk38.half.lower = 128; + } + } + if (tempRacer->unk15C) { + tempRacer->unk15C->segment.trans.x_position = temp_v0_16->unk28->segment.trans.x_position; + tempRacer->unk15C->segment.trans.y_position = temp_v0_16->unk28->segment.trans.y_position; + if (tempRacer->unk1D6 == 0) { + tempRacer->unk15C->segment.trans.y_position -= 30.0; + } + tempRacer->unk15C->segment.trans.z_position = temp_v0_16->unk28->segment.trans.z_position; + tempRacer->unk15C->segment.trans.y_rotation = temp_v0_16->unk28->segment.trans.y_rotation; + tempRacer->unk15C->segment.trans.x_rotation = temp_v0_16->unk28->segment.trans.x_rotation; + tempRacer->unk15C->segment.unk2C.half.lower = temp_v0_16->unk28->segment.unk2C.half.lower; + } + } + } + if (tempRacer->unk190 < (header->laps + 3) * temp_v0_17) { + tempRacer->unk190++; + } + tempRacer->unk1A8 = 10000; + } else { + if (tempRacer->playerIndex == PLAYER_COMPUTER && lastCheckpointDist < tempRacer->checkpoint_distance) { + tempRacer->checkpoint_distance = lastCheckpointDist; + } + tempRacer->unk1A8 = tempVar; + } + if (func_8002341C()) { + if (tempRacer->unk15C) { + tempRacer->unk15C->segment.unk18 += 8 * updateRate; + } + if ((tempRacer->unk1BA > 400) || (tempRacer->unk1BA < -400)) { + func_80022E18(2); + } + } + func_80018CE0(obj, tempX, tempY, tempZ, updateRate); + func_80059208(obj, tempRacer, updateRate); + if (tempRacer->raceStatus == 1) { + if (tempRacer->unk1D9 < 60) { + tempRacer->unk1D9 += updateRate; + } + } + if (tempRacer->unk188 > 0) { + func_800576E0(obj, tempRacer, tempRacer->unk188); + } + tempRacer->playerIndex = gCurrentPlayerIndex; + update_player_camera(obj, tempRacer, delta); + D_8011D583 = 0; + if (tempRacer->unk148) { + tempRacer->unk148 = NULL; + tempRacer->velocity = 0.0f; + tempRacer->lateral_velocity = 0.0f; + } + if (tempRacer->stretch_height <= tempRacer->stretch_height_cap) { + temp_f12 = 0.02f; + } else { + temp_f12 = -0.02f; + } + tempRacer->stretch_height += (((tempRacer->stretch_height_cap - tempRacer->stretch_height) * 0.125) + temp_f12) * delta; + if ((temp_f12 < 0.0f && tempRacer->stretch_height <= tempRacer->stretch_height_cap) || + (temp_f12 > 0.0f && tempRacer->stretch_height >= tempRacer->stretch_height_cap)) { + tempRacer->stretch_height = tempRacer->stretch_height_cap; + tempRacer->stretch_height_cap = 1.0f; + } + + tempVar = ((tempRacer->unk16C - tempRacer->unk16A) * updateRate) >> 3; + if (tempVar > 0x800) { + tempVar = 0x800; + } + if (tempVar < -0x800) { + tempVar = -0x800; + } + angleVel = D_800DCB54; + if (angleVel) { + tempRacer->unk16A += angleVel; + } else { + tempRacer->unk16A += tempVar; + } + if ((gCurrentButtonsPressed & R_TRIG) && tempRacer->unk1EB) { + tempRacer->unk1EC = 1; + tempRacer->unk1EB = 0; + } else if (gCurrentButtonsPressed & R_TRIG) { + tempRacer->unk1EB = 22; + } + if (tempRacer->unk1EB > 0) { + tempRacer->unk1EB -= updateRate; + } else { + tempRacer->unk1EB = 0; + } + if (tempRacer->shieldTimer > 0) { + if (tempRacer->shieldTimer > 60) { + if (tempRacer->shieldSoundMask) { + update_spatial_audio_position(tempRacer->shieldSoundMask, obj->segment.trans.x_position, obj->segment.trans.y_position, obj->segment.trans.z_position); + } else if (tempRacer->unk118) { + func_80009558(SOUND_SHIELD, obj->segment.trans.x_position, obj->segment.trans.y_position, obj->segment.trans.z_position, 1, &tempRacer->shieldSoundMask); + } + } else if (tempRacer->shieldSoundMask) { + func_800096F8(tempRacer->shieldSoundMask); + tempRacer->shieldSoundMask = 0; + } + tempRacer->shieldTimer -= updateRate; + if (tempRacer->shieldTimer <= 0) { + tempRacer->shieldType = SHIELD_NONE; + } + } + if (tempRacer->unk180) { + update_spatial_audio_position(tempRacer->unk180, obj->segment.trans.x_position, obj->segment.trans.y_position, obj->segment.trans.z_position); + } + if (func_8000E4D8() && tempRacer->playerIndex == PLAYER_ONE && gRaceStartTimer == 0) { + func_80059BF0(obj, updateRate); + } + if (tempRacer->soundMask) { + update_spatial_audio_position(tempRacer->soundMask, obj->segment.trans.x_position, obj->segment.trans.y_position, obj->segment.trans.z_position); + } + D_8011D584 = 0; + if (tempRacer->unk150 && gRaceStartTimer == 0) { + s8 *yAsset; + tempRacer->unk150->segment.trans.x_position = obj->segment.trans.x_position; + yAsset = (s8 *)get_misc_asset(0); + tempRacer->unk150->segment.trans.y_position = obj->segment.trans.y_position + yAsset[tempRacer->characterId]; + tempRacer->unk150->segment.trans.z_position = obj->segment.trans.z_position; + tempRacer->unk150->segment.trans.scale = obj->segment.unk30 / 265.0f; + if (obj->segment.unk30 < 1500.0 || get_filtered_cheats() & CHEAT_MIRRORED_TRACKS) { + tempObj = tempRacer->unk150; + tempObj->segment.trans.unk6 |= 0x4000; + } + if (tempRacer->unk150->segment.trans.scale < 1.0) { + tempRacer->unk150->segment.trans.scale = 1.0f; + } + tempRacer->unk150 = NULL; + } + tempRacer->unk1FE = -1; + func_8004F77C((unk8004F77C* ) tempRacer); + if (tempRacer->unk20E) { + if (tempRacer->unk210 > updateRate) { + tempRacer->unk210 -= updateRate; + } else { + tempRacer->unk210 = 0; + if (tempRacer->playerIndex == PLAYER_COMPUTER) { + func_80009558(tempRacer->unk20E, obj->segment.trans.x_position, obj->segment.trans.y_position, obj->segment.trans.z_position, 4, NULL); + } else { + play_sound_spatial(tempRacer->unk20E, obj->segment.trans.x_position, obj->segment.trans.y_position, obj->segment.trans.z_position, NULL); + } + tempRacer->unk20E = 0; + } + } + if (header->race_type & RACETYPE_CHALLENGE && header->race_type != RACETYPE_CHALLENGE_EGGS) { + tempRacer->unk212 = func_8001C418(obj->segment.trans.y_position); + } else { + tempRacer->unk212 = 0; + } + if (tempRacer->unk194 < tempRacer->unk193) { + tempRacer->unk194 = tempRacer->unk193; + } + } +} void func_8004F77C(unk8004F77C *arg0) { s32 temp; arg0->flags &= ~0x80; - if ((gCurrentCarInput & B_BUTTON)) { + if ((gCurrentRacerInput & B_BUTTON)) { arg0->flags |= 0x80; } @@ -1033,24 +1679,24 @@ void func_8004F77C(unk8004F77C *arg0) { GLOBAL_ASM("asm/non_matchings/racer/func_8004F7F4.s") void func_80050754(Object *obj, Object_Racer *racer, f32 divisor) { - f32 diffX; - f32 diffY; - f32 diffZ; + f32 xDiff; + f32 yDiff; + f32 zDiff; obj->segment.unk3B = 0; obj->segment.unk18 = 40; - diffX = racer->unk148->segment.trans.x_position - obj->segment.trans.x_position; - diffY = racer->unk148->segment.trans.y_position - obj->segment.trans.y_position; - diffZ = racer->unk148->segment.trans.z_position - obj->segment.trans.z_position; - func_80011570(obj, diffX, diffY, diffZ); + xDiff = racer->unk148->segment.trans.x_position - obj->segment.trans.x_position; + yDiff = racer->unk148->segment.trans.y_position - obj->segment.trans.y_position; + zDiff = racer->unk148->segment.trans.z_position - obj->segment.trans.z_position; + func_80011570(obj, xDiff, yDiff, zDiff); obj->segment.trans.y_rotation = racer->unk148->segment.trans.y_rotation; obj->segment.trans.x_rotation = racer->unk148->segment.trans.x_rotation; obj->segment.trans.z_rotation = racer->unk148->segment.trans.z_rotation; racer->x_rotation_vel = obj->segment.trans.z_rotation; racer->unk1A0 = obj->segment.trans.y_rotation; - obj->segment.x_velocity = diffX / divisor; - obj->segment.y_velocity = diffY / divisor; - obj->segment.z_velocity = diffZ / divisor; + obj->segment.x_velocity = xDiff / divisor; + obj->segment.y_velocity = yDiff / divisor; + obj->segment.z_velocity = zDiff / divisor; racer->velocity = 0.0f; racer->unk1F2 = 0; racer->lateral_velocity = 0.0f; @@ -1184,14 +1830,14 @@ void func_8005234C(Object_Racer *racer) { s32 func_80052388(Object *obj1, Object_Racer *racer, Object *obj2, f32 distance) { s32 rotation; - f32 diffX; - f32 diffZ; + f32 xDiff; + f32 zDiff; s32 ret = FALSE; - diffX = obj2->segment.trans.x_position - obj1->segment.trans.x_position; - diffZ = obj2->segment.trans.z_position - obj1->segment.trans.z_position; - if ((diffX * diffX) + (diffZ * diffZ) < distance) { - rotation = (arctan2_f(diffX, diffZ) - (obj1->segment.trans.y_rotation & 0xFFFF)) + 0x8000; + xDiff = obj2->segment.trans.x_position - obj1->segment.trans.x_position; + zDiff = obj2->segment.trans.z_position - obj1->segment.trans.z_position; + if ((xDiff * xDiff) + (zDiff * zDiff) < distance) { + rotation = (arctan2_f(xDiff, zDiff) - (obj1->segment.trans.y_rotation & 0xFFFF)) + 0x8000; WRAP(rotation, -0x8000, 0x8000); CLAMP(rotation, -0x3000, 0x3000); racer->unk16C = rotation; @@ -1199,7 +1845,7 @@ s32 func_80052388(Object *obj1, Object_Racer *racer, Object *obj2, f32 distance) racer->unk16C = 0; } racer = (struct Object_Racer *) obj2->unk64; - rotation = arctan2_f(diffX, diffZ) - (obj1->segment.trans.y_rotation & 0xFFFF); + rotation = arctan2_f(xDiff, zDiff) - (obj1->segment.trans.y_rotation & 0xFFFF); WRAP(rotation, -0x8000, 0x8000); CLAMP(rotation, -0x3000, 0x3000); racer->unk16C = rotation; @@ -1217,7 +1863,7 @@ GLOBAL_ASM("asm/non_matchings/racer/func_8005250C.s") void func_80052988(Object *obj, Object_Racer *racer, s32 action, s32 arg3, s32 duration, s32 arg5, s32 arg6, s32 arg7) { arg5 *= arg7; - if ((D_8011D55C == -1) && (action >= 3)) { + if ((gCurrentPlayerIndex == -1) && (action >= 3)) { obj->segment.unk3B = 0; racer->unk1F2 = 0; } else if (obj->segment.unk3B == 0) { @@ -1274,7 +1920,55 @@ void func_80052988(Object *obj, Object_Racer *racer, s32 action, s32 arg3, s32 d } } -GLOBAL_ASM("asm/non_matchings/racer/func_80052B64.s") +/** + * If the spinout timer is above zero, remove steering control and have them rotate until + * the timer runs out. + */ +void racer_spinout_car(Object* obj, Object_Racer* racer, s32 updateRate, f32 updateRateF) { + s32 angleVel; + + racer->velocity *= 0.97; //@Delta: Reduces 3% of speed per frame, not accounting for game speed. + racer->lateral_velocity = 0.0f; + if (racer->raceStatus == STATUS_RACING) { + func_80072348(racer->playerIndex, 0); + } + angleVel = racer->y_rotation_vel; + if (gCurrentPlayerIndex >= 0) { + if (gNumViewports < 3) { + obj->unk74 |= 0x4FC00; + goto skip; + } + if (racer->wheel_surfaces[2] < 0xFF) { + obj->unk74 |= 1 << (racer->wheel_surfaces[2] * 2); + } + if (racer->wheel_surfaces[3] < 0xFF) { + obj->unk74 |= 2 << (racer->wheel_surfaces[3] * 2); + } + } + skip: + if (racer->spinout_timer > 0) { + racer->y_rotation_vel += updateRate * 0x500; + if (racer->y_rotation_vel > 0 && angleVel < 0) { + racer->spinout_timer--; //@Delta + if (gCurrentStickX > 50 && racer->spinout_timer == 1) { + racer->spinout_timer = 0; + } + } + } else if (racer->spinout_timer < 0) { + racer->y_rotation_vel -= updateRate * 0x500; + if (racer->y_rotation_vel < 0 && angleVel > 0) { + racer->spinout_timer++; //@Delta + if (gCurrentStickX < -50 && racer->spinout_timer == -1) { + racer->spinout_timer = 0; + } + } + } + gCurrentCarSteerVel = racer->y_rotation_vel; + obj->segment.y_velocity -= D_8011D56C * updateRateF; + gCurrentStickX = 0; + racer->steerAngle = 0; +} + GLOBAL_ASM("asm/non_matchings/racer/func_80052D7C.s") /** @@ -1332,11 +2026,11 @@ void handle_car_velocity_control(Object_Racer *racer) { racer->throttle -= 0.1; } - if (gCurrentCarInput & A_BUTTON) { + if (gCurrentRacerInput & A_BUTTON) { racer->throttle = 1.0f; } - if (gCurrentCarInput & B_BUTTON) { + if (gCurrentRacerInput & B_BUTTON) { if (racer->brake < 1.0) { racer->brake += 0.2; } @@ -1349,7 +2043,83 @@ void handle_car_velocity_control(Object_Racer *racer) { } GLOBAL_ASM("asm/non_matchings/racer/func_80053750.s") -GLOBAL_ASM("asm/non_matchings/racer/func_80053E9C.s") + +/** + * Initialise some states when a racer is attacked or runs into something. + * While the majority of the respondent behaviour takes place elsewhere, the squish behaviour + * happens here. + */ +void racer_attack_handler(Object* obj, Object_Racer* racer, s32 updateRate) { + s8 bananas; + + if (racer->playerIndex == PLAYER_COMPUTER) { + bananas = 0; + } else { + bananas = racer->bananas; + } + if (racer->squish_timer > 0) { + racer->squish_timer -= updateRate; + racer->throttle = 0.0f; + racer->stretch_height_cap = 0.1f; + if (racer->squish_timer <= 0 && racer->playerIndex >= 0) { + racer_play_sound(obj, SOUND_PLOP2); + } + } else { + racer->squish_timer = 0; + } + if (racer->attackType == 0 || racer->shieldTimer > 0) { + racer->attackType = 0; + } else { + if ((racer->squish_timer == 0) || racer->attackType != 4) { + if ((racer->attackType != 2) && (racer->attackType != 4)) { + func_800576E0(obj, racer, 2); + } + racer->unk18C = 360; + if (racer->unk1C9 == 8) { + racer->unk1C9 = 0; + } + if (racer->unk1D6 < 5) { + play_random_character_voice(obj, SOUND_VOICE_CHARACTER_NEGATIVE, 8, 129); + switch (racer->attackType) { + // Getting hit by a rocket, or running into a landmine. + case ATTACK_EXPLOSION: + racer->unk1F1 = 1; + if (bananas == 0) { + racer->velocity = 0.0f; + obj->segment.y_velocity += 10.5; + } else { + racer->velocity /= 4; + obj->segment.y_velocity += 8.5; + } + break; + // Running into an oil slick. + case ATTACK_SPIN: + racer->spinout_timer = 2; + racer->y_rotation_vel = 0x1002; + racer_play_sound(obj, SOUND_TYRE_SCREECH); + break; + // Crushed by something big, like a snowball. + case ATTACK_SQUISHED: + racer->squish_timer = 0x3C; + break; + // Running into a bubble trap. + case ATTACK_BUBBLE: + racer->unk204 = 0x78; + racer->velocity *= 0.5; + break; + // This goes unused. + case ATTACK_FLUNG: + racer->unk1F1 = 1; + racer->velocity = 0.0f; + obj->segment.y_velocity += 20.5; + racer_play_sound(obj, SOUND_WHEE); + break; + } + racer->attackType = 0; + } + } + } +} void func_80054110(Object *obj, Object_Racer *racer, s32 updateRate, f32 updateRateF) { f32 tempVel; @@ -1357,26 +2127,26 @@ void func_80054110(Object *obj, Object_Racer *racer, s32 updateRate, f32 updateR f32 zVel; f32 yVel; f32 hVel; - f32 tempX; - f32 tempY; - f32 tempZ; + f32 xTemp; + f32 yTemp; + f32 zTemp; Matrix mtx; LevelHeader *header; s32 angle; s32 tempAngle; - tempX = obj->segment.trans.x_position; - tempY = obj->segment.trans.y_position; - tempZ = obj->segment.trans.z_position; + xTemp = obj->segment.trans.x_position; + yTemp = obj->segment.trans.y_position; + zTemp = obj->segment.trans.z_position; gCurrentCarSteerVel = 0; D_8011D558 = 0; handle_base_steering(racer, 0, updateRateF); handle_car_velocity_control(racer); func_800575EC(obj, racer); func_80055EC0(obj, racer, updateRate); - func_80053E9C(obj, racer, updateRate); + racer_attack_handler(obj, racer, updateRate); if (racer->spinout_timer) { - func_80052B64(obj, racer, updateRate, updateRateF); // Sbinalla + racer_spinout_car(obj, racer, updateRate, updateRateF); // Sbinalla } else if (racer->unk1E2 > 0) { func_8005492C(obj, racer, updateRate, updateRateF); } else { @@ -1384,7 +2154,7 @@ void func_80054110(Object *obj, Object_Racer *racer, s32 updateRate, f32 updateR } apply_vehicle_rotation_offset(racer, updateRate, 0, 0, 0); header = get_current_level_header(); - if ((racer->unkC0 != 0.0 && header->unk2) || D_8011D581 == 10) { + if ((racer->buoyancy != 0.0 && header->unk2) || D_8011D581 == 10) { if (racer->unk1F0) { racer->checkpoint_distance -= 0.3; } else { @@ -1455,7 +2225,7 @@ void func_80054110(Object *obj, Object_Racer *racer, s32 updateRate, f32 updateR } else { func_80050754(obj, racer, updateRateF); } - if (D_8011D55C == -1 && !func_80023568()) { + if (gCurrentPlayerIndex == -1 && !func_80023568()) { func_80055A84(obj, racer, updateRate); } else { func_80054FD0(obj, racer, updateRate); @@ -1467,9 +2237,9 @@ void func_80054110(Object *obj, Object_Racer *racer, s32 updateRate, f32 updateR } func_80053750(obj, racer, updateRateF); tempVel = 1.0f / updateRateF; - xVel = (((obj->segment.trans.x_position - tempX) - D_8011D548) * tempVel) - racer->unk84; - obj->segment.y_velocity = (obj->segment.trans.y_position - tempY) * tempVel; - zVel = (((obj->segment.trans.z_position - tempZ) - D_8011D54C) * tempVel) - racer->unk88; + xVel = (((obj->segment.trans.x_position - xTemp) - D_8011D548) * tempVel) - racer->unk84; + obj->segment.y_velocity = (obj->segment.trans.y_position - yTemp) * tempVel; + zVel = (((obj->segment.trans.z_position - zTemp) - D_8011D54C) * tempVel) - racer->unk88; D_8011D510.y_rotation = -(racer->unk1A0 + racer->unk10C); D_8011D510.x_rotation = -obj->segment.trans.x_rotation; D_8011D510.z_rotation = -obj->segment.trans.z_rotation; @@ -1512,9 +2282,9 @@ void func_80055A84(Object *obj, Object_Racer *racer, s32 updateRate) { s32 sp74; s32 flags; s32 temp_v1_2; - f32 tempX; - f32 tempY; - f32 tempZ; + f32 xTemp; + f32 yTemp; + f32 zTemp; s32 xRot; f32 angleX; f32 *temp_v0; @@ -1524,8 +2294,8 @@ void func_80055A84(Object *obj, Object_Racer *racer, s32 updateRate) { s8 sp3F; s8 shouldSquish; - if (obj->segment.trans.y_position > D_8011D4F0[0]) { - obj->segment.trans.y_position = D_8011D4F0[0]; + if (obj->segment.trans.y_position > gCurrentCourseHeight) { + obj->segment.trans.y_position = gCurrentCourseHeight; } temp_v0 =(f32 *) get_misc_asset(56); sp3F = -1; @@ -1561,7 +2331,7 @@ void func_80055A84(Object *obj, Object_Racer *racer, s32 updateRate) { } if (shouldSquish && sp74) { if (racer->squish_timer == 0) { - racer->unk187 = 4; + racer->attackType = ATTACK_SQUISHED; } else { racer->squish_timer = 60; } @@ -1578,16 +2348,16 @@ void func_80055A84(Object *obj, Object_Racer *racer, s32 updateRate) { obj->segment.trans.y_position = racer->unkD8[1]; obj->segment.trans.z_position = racer->unkD8[2]; if (racer->unk1E2) { - func_8002ACD4(&tempX, &tempY, &tempZ); + func_8002ACD4(&xTemp, &yTemp, &zTemp); angleX = cosine_s(-obj->segment.trans.y_rotation); angleZ = sine_s(-obj->segment.trans.y_rotation); - distance = (tempX * angleZ) + (tempZ * angleX); - tempZ = (tempX * angleX) - (tempZ * angleZ); - temp_v1_2 = -(s16)(u16)arctan2_f(distance, tempY); + distance = (xTemp * angleZ) + (zTemp * angleX); + zTemp = (xTemp * angleX) - (zTemp * angleZ); + temp_v1_2 = -(s16)(u16)arctan2_f(distance, yTemp); if (temp_v1_2 < 0x2000 && temp_v1_2 > -0x2000) { racer->x_rotation_vel = temp_v1_2; } - xRot = -(s16)(u16)arctan2_f(tempZ, tempY); + xRot = -(s16)(u16)arctan2_f(zTemp, yTemp); if ((xRot < 0x2000) && (xRot > -0x2000)) { obj->segment.trans.x_rotation = xRot; } @@ -1624,7 +2394,7 @@ GLOBAL_ASM("asm/non_matchings/racer/func_80056E2C.s") */ void racer_play_sound(Object *obj, s32 soundID) { Object_Racer *racer = &obj->unk64->racer; - if (D_8011D55C != -1 && racer->unk108 == 0) { + if (gCurrentPlayerIndex != -1 && racer->unk108 == 0) { play_sound_spatial(soundID, obj->segment.trans.x_position, obj->segment.trans.y_position, obj->segment.trans.z_position, NULL); } } @@ -1646,7 +2416,7 @@ void play_random_character_voice(Object *obj, s32 soundID, s32 range, s32 arg3) Object_64 *tempRacer; tempRacer = obj->unk64; - if (tempRacer->racer.unk108 == 0 && ((!(arg3 & 0x80)) || D_8011D55C != -1)) { + if (tempRacer->racer.unk108 == 0 && ((!(arg3 & 0x80)) || gCurrentPlayerIndex != -1)) { if (arg3 == 2) { if ((tempRacer->racer.soundMask != 0) && (soundID != tempRacer->racer.unk2A)) { func_800096F8(tempRacer->racer.soundMask); @@ -1693,7 +2463,7 @@ f32 handle_racer_top_speed(Object *obj, Object_Racer *racer) { // decide how much boost to add based on when it was pressed. if (gRaceStartTimer > 0 && gRaceStartTimer < 30 && !racer->startInput) { timer = gRaceStartTimer - 14; - if (gActivePlayerButtonPress & A_BUTTON) { + if (gCurrentButtonsPressed & A_BUTTON) { if (timer < 0 && timer3 >= 0) { timer = 0; } @@ -1701,7 +2471,7 @@ f32 handle_racer_top_speed(Object *obj, Object_Racer *racer) { if (timer < 0) { timer = -timer; } - if ((gCurrentCarInput & Z_TRIG)) { + if ((gCurrentRacerInput & Z_TRIG)) { if (timer < 2) { timer = 0; } @@ -1742,7 +2512,7 @@ f32 handle_racer_top_speed(Object *obj, Object_Racer *racer) { if (racer->boostTimer && !gRaceStartTimer && timer3 && racer->raceStatus == STATUS_RACING) { func_80072348(racer->playerIndex, 6); } - if ((gRaceStartTimer < 80) && gActivePlayerButtonPress & A_BUTTON) { + if ((gRaceStartTimer < 80) && gCurrentButtonsPressed & A_BUTTON) { racer->startInput = 1; } if (!gRaceStartTimer) { @@ -1825,12 +2595,17 @@ void handle_base_steering(Object_Racer *racer, UNUSED s32 arg1, f32 updateRate) } -void func_80057A40(Object *obj, Object_Racer *racer, f32 updateRate) { +/** + * Primary function for updating the camera during player control. + * Decides which behaviour to use, then branches off to that function. + * Afterwards, writes position data to the current camera object. + */ +void update_player_camera(Object *obj, Object_Racer *racer, f32 updateRate) { f32 temp_f14; s32 delta; s32 angle; - if (gActivePlayerButtonPress & U_CBUTTONS && func_800A0190()) { + if (gCurrentButtonsPressed & U_CBUTTONS && func_800A0190()) { gCameraObject->zoom++; if (gCameraObject->zoom > ZOOM_VERY_CLOSE) { gCameraObject->zoom = ZOOM_MEDIUM; @@ -1932,14 +2707,14 @@ void func_80057A40(Object *obj, Object_Racer *racer, f32 updateRate) { void func_800580B4(Object *obj, Object_Racer *racer, s32 mode, f32 arg3) { f32 xPos, yPos, zPos; - if ((D_8011D55C != -1) && (racer->raceStatus != STATUS_FINISHED)) { + if ((gCurrentPlayerIndex != -1) && (racer->raceStatus != STATUS_FINISHED)) { if (mode != gCameraObject->mode) { - func_80057A40(obj, racer, arg3); + update_player_camera(obj, racer, arg3); xPos = gCameraObject->trans.x_position; yPos = gCameraObject->trans.y_position; zPos = gCameraObject->trans.z_position; gCameraObject->mode = mode; - func_80057A40(obj, racer, arg3); + update_player_camera(obj, racer, arg3); if (gRaceStartTimer == 0 && D_8011D582 == 0) { gCameraObject->x_velocity = xPos - gCameraObject->trans.x_position; gCameraObject->y_velocity = yPos - (gCameraObject->trans.y_position + gCameraObject->unk30); @@ -2010,7 +2785,7 @@ void update_camera_car(f32 updateRate, Object *obj, Object_Racer *racer) { } } brakeVar = racer->brake; - baseSpeed = racer->unk8; + baseSpeed = racer->forwardVel; switch (gCameraObject->zoom) { case 1: baseDistance += 35.0f; @@ -2087,7 +2862,7 @@ void update_camera_car(f32 updateRate, Object *obj, Object_Racer *racer) { sineOffset = cosine_s(-racer->unk196 + 0x8000) * lateralOffset; cosOffset = sine_s(-racer->unk196 + 0x8000) * lateralOffset; baseDistance = 0.0f; - if (gCurrentCarInput & 0x8000) { + if (gCurrentRacerInput & 0x8000) { baseDistance = racer->lateral_velocity * 1.3; if (baseDistance > 0.0f) { baseDistance -= 1.5; @@ -2236,6 +3011,7 @@ void update_camera_fixed(f32 updateRate, struct Object *obj, struct Object_Racer racer->oy1, gCameraObject->trans.z_position); } +// Think this is used to calculate the path for the AI. void func_80059080(UNUSED Object *obj, Object_Racer *racer, f32 *xVel, f32 *yVel, f32 *zVel) { unknown8011AECC *temp_v0_2; s32 splinePos; diff --git a/src/racer.h b/src/racer.h index 0bff5c91..66fc8800 100644 --- a/src/racer.h +++ b/src/racer.h @@ -7,6 +7,14 @@ #define SEGMENT_NONE -1 // If the level in question does not use segmentation. +struct TempStruct8 { + f32 unk0; + f32 unk4; + f32 unk8; + f32 unkC; + s8 unk10; +}; + typedef enum ActivePlayers { PLAYER_COMPUTER = -1, PLAYER_ONE, @@ -52,6 +60,23 @@ typedef enum AISkill { AI_EASY } AISkill; +typedef enum AttackType { + ATTACK_NONE, + ATTACK_EXPLOSION, + ATTACK_SPIN, + ATTACK_UNK3, + ATTACK_SQUISHED, + ATTACK_FLUNG, + ATTACK_BUBBLE +} AttackType; + +typedef enum ShieldType { + SHIELD_NONE, + SHIELD_LEVEL1, + SHIELD_LEVEL2, + SHIELD_LEVEL3 +} ShieldType; + typedef struct ObjectCamera { /* 0x0014 */ ObjectTransform trans; /* 0x0018 */ f32 unk18; @@ -127,7 +152,7 @@ extern s32 D_800DCB5C; // Not sure if D_800DCB58 & D_800DCB5C are actually a part of this array. extern f32 D_800DCB60[14]; -extern s32 D_800DCB98; +extern s32 gNumViewports; extern f32 gSurfaceTractionTable[19]; extern f32 D_800DCBE8[19]; @@ -172,7 +197,7 @@ void func_8006FE74(Matrix *, ObjectTransform *); // Non Matching ? s32 func_80044450(s32 cap); void func_8004C0A0(s32 arg0, Object *planeObj, Object_Racer *planeObj64); void func_8004C140(Object *obj, Object_Racer *racer); -void func_8004D95C(s32 arg0, s32 arg1, Object *obj, Object_Racer *racer); +void func_8004D95C(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *racer); void func_8004F77C(unk8004F77C *arg0); s32 func_80052188(void); void func_800521B8(s32 arg0); @@ -222,7 +247,10 @@ void obj_init_racer(Object *obj, LevelObjectEntry_CharacterFlag *racer); void func_80044170(Object *obj, Object_Racer *racer, s32 updateRate); void func_80043ECC(s32 arg0, Object_Racer *racer, s32 updateRate); void func_80055A84(Object *obj, Object_Racer *racer, s32 updateRate); -void func_80057A40(Object *obj, Object_Racer *racer, f32 updateRate); +void update_player_camera(Object *obj, Object_Racer *racer, f32 updateRate); +void racer_spinout_car(Object* obj, Object_Racer* racer, s32 updateRate, f32 updateRateF); +void racer_attack_handler(Object* obj, Object_Racer* racer, s32 updateRate); +void func_80048C7C(Object* obj, Object_Racer* racer); //Non Matching void set_ghost_position_and_rotation(Object *obj); @@ -230,10 +258,20 @@ void func_800576E0(Object *obj, Object_Racer *racer, s32 arg2); void func_80055EC0(Object *obj, Object_Racer *racer, s32); void func_80054FD0(Object *obj, Object_Racer *racer, s32); void func_8005492C(Object *obj, Object_Racer *racer, s32, f32); -void func_80053E9C(Object *obj, Object_Racer *racer, s32); void func_80053750(Object *obj, Object_Racer *racer, f32); void func_80052D7C(Object *obj, Object_Racer *racer, s32, f32); -void func_80052B64(Object *obj, Object_Racer *racer, s32, f32); s32 func_80017248(void*, s32, s32*, void*, f32*, s32*, s8*); +void func_80059BF0(Object* obj, s32 updateRate); +void func_8005A6F0(Object* obj, Object_Racer* racer, s32 updateRate, f32 updateRateF); /* extern */ +void func_8005A424(Object_Racer *racer, s32 updateRate); /* extern */ +void func_80059208(Object* obj, Object_Racer* racer, s32 updateRate); /* extern */ +void func_8004F7F4(s32 updateRate, f32 updateRateF, Object* obj, Object_Racer* racer); /* extern */ +void func_80046524(s32 updateRate, f32 updateRateF, Object* obj, Object_Racer* racer); /* extern */ +void func_80049794(s32 updateRate, f32 updateRateF, Object* obj, Object_Racer* racer); /* extern */ +void func_8004CC20(s32 updateRate, f32 updateRateF, Object* obj, Object_Racer* racer); /* extern */ +void func_8004447C(Object *obj, Object_Racer *racer, s32 updateRate); +void func_800452A0(Object *obj, Object_Racer *racer, s32 updateRate); +void func_80045C48(Object *obj, Object_Racer *racer, s32 updateRate); +void func_80056E2C(Object *obj, Object_Racer *racer, s32 updateRate); #endif diff --git a/src/save_data.h b/src/save_data.h index d9a24dab..8f5b8bda 100644 --- a/src/save_data.h +++ b/src/save_data.h @@ -94,5 +94,6 @@ s32 func_80075000(s32 controllerIndex, s16 arg1, s16 arg2, s16 ghostCharacterId, s32 func_800753D8(s32 controllerIndex, s32 arg1); //Pretty bad signature, but at can confidently state arg0 is controllerIndex. s32 func_800756D4(s32 controllerIndex, s8 *arg1, void *arg2, u8 *arg3, void *arg4); +void func_80072348(s16 arg0, u8 arg1); #endif diff --git a/src/set_rsp_segment.c b/src/set_rsp_segment.c index 942923b6..b5b688f3 100644 --- a/src/set_rsp_segment.c +++ b/src/set_rsp_segment.c @@ -6,6 +6,10 @@ #include "PR/gbi.h" #include "PR/R4300.h" +/** + * Set the offset for the given address, so the RSP can get the correct physical address. + * This is used for the colour and depth buffers. + */ void set_rsp_segment(Gfx **dlist, s32 segment, s32 base) { gSPSegment((*dlist)++, segment, base + K0BASE) } diff --git a/src/stacks.c b/src/stacks.c index b5209828..8d023e6c 100644 --- a/src/stacks.c +++ b/src/stacks.c @@ -8,8 +8,8 @@ /************ .bss ************/ -u8 piThreadStack[256]; // piThreadStack[OS_PIM_STACKSIZE]; -s64 D_80129BB0[128]; // epcStack? +u8 piThreadStack[0x100]; // piThreadStack[OS_PIM_STACKSIZE]; +u8 D_80129BB0[0x400]; // epcStack? s32 D_80129FB0[3]; s32 D_80129FBC; diff --git a/src/stacks.h b/src/stacks.h index 0c9f6f78..b2b65c49 100644 --- a/src/stacks.h +++ b/src/stacks.h @@ -5,8 +5,8 @@ #define OS_PIM_STACKSIZE 4096 -extern u8 piThreadStack[256]; // piThreadStack[OS_PIM_STACKSIZE]; -extern s64 D_80129BB0[128]; //epcStack? +extern u8 piThreadStack[0x100]; // piThreadStack[OS_PIM_STACKSIZE]; +extern u8 D_80129BB0[0x400]; //epcStack? extern s32 D_80129FB0[3]; extern s32 D_80129FBC; diff --git a/src/unknown_003260.h b/src/unknown_003260.h index 06095961..780b3f4b 100644 --- a/src/unknown_003260.h +++ b/src/unknown_003260.h @@ -119,7 +119,7 @@ void func_80004604(u8 *arg0, u8 arg1); u8 func_8000461C(u8 *arg0); void func_80004638(ALBank *bnk, s16 sndIndx, s32 arg2); //Causes issues with its type -//void func_8000488C(u8 *arg0); +//void func_8000488C(u8 *soundMask); void func_800049D8(void); void func_800049F8(void * sndState,s16 type, u32 arg2); u16 func_80004A3C(u8 arg0); diff --git a/src/unknown_005740.h b/src/unknown_005740.h index 3a2ea7f1..e83ef0d1 100644 --- a/src/unknown_005740.h +++ b/src/unknown_005740.h @@ -2,6 +2,7 @@ #define _UNKNOWN_005740_H_ #include "types.h" +#include "structs.h" extern s8 D_800DC6D0; extern s32 D_800DC6D4; @@ -12,4 +13,7 @@ extern s32 D_80119C40; extern s32 **D_80119C48; extern s32 D_80119C50[2]; + +void func_800050D0(Object* obj, u32 buttonsPressed, s32 carInput, s32 updateRate); /* extern */ + #endif diff --git a/src/unknown_008C40.c b/src/unknown_008C40.c index 1a88d9b2..c3d4e1b8 100644 --- a/src/unknown_008C40.c +++ b/src/unknown_008C40.c @@ -134,9 +134,11 @@ s32 func_800092A8(f32 inX, f32 inY, f32 inZ, floatXYZVals *floatXYZ, f32 *outX, return ret; } +// Another function related to playing sound. GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80009558.s") GLOBAL_ASM("asm/non_matchings/unknown_005740/func_800095E8.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_800096D8.s") +// I think this function is used to update the world position of any sound associated with the given soundmask. +GLOBAL_ASM("asm/non_matchings/unknown_005740/update_spatial_audio_position.s") void func_800096F8(s32 arg0) { s32 i; s32 *v0 = D_80119C44; diff --git a/src/unknown_008C40.h b/src/unknown_008C40.h index 8a71a3ad..fa0b6269 100644 --- a/src/unknown_008C40.h +++ b/src/unknown_008C40.h @@ -20,7 +20,7 @@ void func_800096F8(s32); s32 func_800092A8(f32 inX, f32 inY, f32 inZ, floatXYZVals *floatXYZ, f32 *outX, f32 *outY, f32 *outZ); void func_80009558(u16, f32 x, f32 y, f32 z, s32, s32 *); // Non Matching void func_80009968(f32, f32, f32, u8, u8, s32); // Non Matching -void func_800096D8(s32, f32, f32, f32); // Non Matching +void update_spatial_audio_position(s32, f32, f32, f32); // Non Matching void func_8000A2E8(s32); // Non Matching // Yeah this one seems excessive, and it's Non Matching void func_800098A4(s32, s32, f32, f32, f32, s32, s32, s32, s32, s32, s32, s32, s32); diff --git a/src/unknown_0255E0.c b/src/unknown_0255E0.c index 94c64296..332aeb1d 100644 --- a/src/unknown_0255E0.c +++ b/src/unknown_0255E0.c @@ -309,18 +309,18 @@ void func_80027E24(s32 arg0) { } void func_80027FC4(s32 arg0) { - unk80027FC4 sp20; + LevelObjectEntryCommon sp20; func_8005A3D0(); if (arg0 == -1) { D_8011B0B8 = NULL; return; } - sp20.unk2 = 0; - sp20.unk4 = 0; - sp20.unk6 = 0; - sp20.unk1 = 8; - sp20.unk0 = arg0; + sp20.x = 0; + sp20.y = 0; + sp20.z = 0; + sp20.size = 8; + sp20.objectID = arg0; D_8011B0B8 = spawn_object(&sp20, 2); if (D_8011B0B8 != 0) { D_8011B0B8->segment.unk3C_a.unk3C = 0; @@ -907,7 +907,7 @@ void func_8002C0C4(s32 modelId) { LevelModelSegment *segment; TriangleBatchInfo *batch; Vertex *vertex; - + func_8007B374(0xFF00FF); D_8011D30C = allocate_from_main_pool_safe(LEVEL_MODEL_MAX_SIZE, 0xFFFF00FFU); gCurrentLevelModel = D_8011D30C; @@ -967,11 +967,11 @@ void func_8002C0C4(s32 modelId) { for(i = 0; i < gCurrentLevelModel->numberOfSegments; i++) { for(j = 0; j < gCurrentLevelModel->segments[i].numberOfBatches; j++) { - for(k = gCurrentLevelModel->segments[i].batches[j].verticesOffset; - k < gCurrentLevelModel->segments[i].batches[j+1].verticesOffset; + for(k = gCurrentLevelModel->segments[i].batches[j].verticesOffset; + k < gCurrentLevelModel->segments[i].batches[j+1].verticesOffset; k++) { // Why do this? Why not just set the vertex colors in the model itself? - if(gCurrentLevelModel->segments[i].vertices[k].r == 1 && gCurrentLevelModel->segments[i].vertices[k].g == 1) { + if(gCurrentLevelModel->segments[i].vertices[k].r == 1 && gCurrentLevelModel->segments[i].vertices[k].g == 1) { gCurrentLevelModel->segments[i].vertices[k].a = gCurrentLevelModel->segments[i].vertices[k].b; gCurrentLevelModel->segments[i].vertices[k].r = 0x80; gCurrentLevelModel->segments[i].vertices[k].g = 0x80; @@ -1207,11 +1207,11 @@ void obj_loop_fogchanger(Object* obj) { Object *tempObj; unk8011D388 *temp_v0_3; ObjectSegment *phi_s3; - + sp40 = NULL; sp44 = obj->segment.unk3C_a.unk3C; phi_s3 = NULL; - + // func_80066510() returns the bool D_80120D14. 1 if camera is controlled by cutscene, 0 if controlled by racer. if (func_80066510()) { phi_s3 = func_80069D7C(); @@ -1219,7 +1219,7 @@ void obj_loop_fogchanger(Object* obj) { } else { sp40 = get_object_struct_array(&sp74); } - + for(i = 0; i < sp74; i++) { index = -1; if (sp40 != NULL) { diff --git a/src/unknown_0255E0.h b/src/unknown_0255E0.h index 6f82817a..0e7d939c 100644 --- a/src/unknown_0255E0.h +++ b/src/unknown_0255E0.h @@ -126,6 +126,8 @@ Gfx *func_8002581C(u8 *segmentIds, s32 numberOfSegments, s32 currentViewportInde s32 func_80027568(void); void func_8002C954(LevelModelSegment*, LevelModelSegmentBoundingBox*, s32); s32 func_8002CC30(LevelModelSegment*); -//void func_80013DCC(Gfx **arg0, Vertex **arg1, Vertex **arg2, Object *arg3); +s8 func_8002B0F4(s16, f32 xPos, f32 zPos, s32*); /* extern */ +void func_80013DCC(Gfx **arg0, Vertex **arg1, Vertex **arg2, Object *arg3); +s8 func_8002AD08(f32 yPos, f32* waterHeight, s32*); /* extern */ #endif diff --git a/src/unknown_05CEF0.h b/src/unknown_05CEF0.h index 75fdab77..42ba6bdb 100644 --- a/src/unknown_05CEF0.h +++ b/src/unknown_05CEF0.h @@ -27,5 +27,6 @@ void func_8005CA78(s32 arg0); void func_8005CA84(f32 x, f32 y, f32 z, s32 arg3); void func_8005CB04(s32 arg0); void func_8005D048(Object *object, unk8005D048 *arg1, s32 arg2); +void func_8005C364(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *racer, s32 *input, u32 *buttonsPressed, s32 *startTimer); /* extern */ #endif diff --git a/src/unknown_05DCD0.h b/src/unknown_05DCD0.h index 40159fbf..09b2b0a6 100644 --- a/src/unknown_05DCD0.h +++ b/src/unknown_05DCD0.h @@ -2,8 +2,13 @@ #define _UNKNOWN_05DCD0_H_ #include "types.h" +#include "structs.h" extern s16 D_800DCE00[16]; extern s16 D_800DCE20[16]; + +void func_8005D820(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *racer, s32 *input, u32 *buttonsPressed, s32 *startTimer); /* extern */ +void func_8005D0D0(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *racer, s32 *input, u32 *buttonsPressed, s32 *startTimer); /* extern */ + #endif diff --git a/src/unknown_05F0C0.h b/src/unknown_05F0C0.h index d5e327ee..a56d9b50 100644 --- a/src/unknown_05F0C0.h +++ b/src/unknown_05F0C0.h @@ -2,7 +2,10 @@ #define _UNKNOWN_05F0C0_H_ #include "types.h" +#include "structs.h" extern s16 D_800DCE40[16]; +void func_8005E4C0(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *racer, s32 *input, u32 *buttonsPressed, s32 *startTimer); /* extern */ + #endif diff --git a/src/unknown_05F690.h b/src/unknown_05F690.h index e40a4f59..81ef2c38 100644 --- a/src/unknown_05F690.h +++ b/src/unknown_05F690.h @@ -2,7 +2,10 @@ #define _UNKNOWN_05F690_H_ #include "types.h" +#include "structs.h" extern s16 D_800DCE60[14]; +void func_8005EA90(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *racer, s32 *input, u32 *buttonsPressed, s32 *startTimer); /* extern */ + #endif diff --git a/src/unknown_05FF10.h b/src/unknown_05FF10.h index 68cefc97..ca4d9354 100644 --- a/src/unknown_05FF10.h +++ b/src/unknown_05FF10.h @@ -2,7 +2,11 @@ #define _UNKNOWN_05FF10_H_ #include "types.h" +#include "structs.h" extern s16 D_800DCE80[14]; +//Nonmatching +void func_8005F310(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *racer, s32 *input, u32 *buttonsPressed, s32 *startTimer); /* extern */ + #endif diff --git a/src/unknown_077C50.c b/src/unknown_077C50.c index 1fb94650..8e521746 100644 --- a/src/unknown_077C50.c +++ b/src/unknown_077C50.c @@ -12,12 +12,16 @@ #include "game.h" #include "game_ui.h" -// Draws the borders/negative space for multiplayer. +/** + * Renders the black borders that separate each viewport during multiplayer. + * 2 player has a single horizontal line, while 3 and 4 player splits the screen into quadrants. + * 3 player will completely fill in where player 4 would normally be. + */ void render_borders_for_multiplayer(Gfx **dlist) { u32 widthAndHeight, width, height; u32 y, x, xOffset, yOffset; LevelHeader *levelHeader; - + widthAndHeight = get_video_width_and_height_as_s32(); width = GET_VIDEO_WIDTH(widthAndHeight); height = GET_VIDEO_HEIGHT(widthAndHeight); diff --git a/src/unknown_078050.c b/src/unknown_078050.c index 55b549f8..623d7b4e 100644 --- a/src/unknown_078050.c +++ b/src/unknown_078050.c @@ -32,7 +32,8 @@ s32 D_800DE4D8 = 0; s32 D_800DE4DC = 0; Gfx dRspInit[] = { - gsSPClearGeometryMode(0x001F3204), + gsSPClearGeometryMode(G_SHADE | G_SHADING_SMOOTH | G_CULL_FRONT | G_CULL_BACK | + G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD), gsSPTexture(0, 0, 0, 0, 0), gsSPSetGeometryMode(G_SHADING_SMOOTH | G_SHADE), gsSPClipRatio(FRUSTRATIO_2), diff --git a/src/weather.c b/src/weather.c index 7d3b0a0e..823bc73f 100644 --- a/src/weather.c +++ b/src/weather.c @@ -525,7 +525,7 @@ void handle_rain_sound(UNUSED s32 updateRate) { yPos = D_80127C1C->trans.y_position; zPos = D_80127C1C->trans.z_position + (-sineOffset - cosOffset); if (gWeatherSoundMask) { - func_800096D8(gWeatherSoundMask, xPos, yPos, zPos); + update_spatial_audio_position(gWeatherSoundMask, xPos, yPos, zPos); } else { func_80009558(SOUND_RAIN, xPos, yPos, zPos, 1, &gWeatherSoundMask); }