From d28382b328eb881753e8ef412a5b409730d17b5c Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Sun, 1 May 2022 18:33:37 +0100 Subject: [PATCH 01/17] some hilariously destructive renaming because damn it's used a lot by the assembly oh but also I added a math_util.h so one can include the assembly func headers --- asm/non_matchings/camera/func_80068514.s | 10 +-- asm/non_matchings/objects/func_8001C6C4.s | 4 +- asm/non_matchings/objects/func_8001F460.s | 8 +- asm/non_matchings/objects/func_80021600.s | 8 +- asm/non_matchings/objects/func_800230D0.s | 2 +- asm/non_matchings/racer/func_80042D20.s | 4 +- asm/non_matchings/racer/func_8004447C.s | 22 ++--- asm/non_matchings/racer/func_800452A0.s | 32 +++---- asm/non_matchings/racer/func_80045C48.s | 86 +++++++++---------- asm/non_matchings/racer/func_80046524.s | 58 ++++++------- asm/non_matchings/racer/func_800494E0.s | 8 +- asm/non_matchings/racer/func_80049794.s | 56 ++++++------ asm/non_matchings/racer/func_8004CC20.s | 8 +- asm/non_matchings/racer/func_8004DE38.s | 44 +++++----- asm/non_matchings/racer/func_8004F7F4.s | 12 +-- asm/non_matchings/racer/func_80050A28.s | 24 +++--- asm/non_matchings/racer/func_80052B64.s | 12 +-- asm/non_matchings/racer/func_80052D7C.s | 20 ++--- asm/non_matchings/racer/func_80053750.s | 4 +- asm/non_matchings/racer/func_8005492C.s | 8 +- asm/non_matchings/racer/func_80054FD0.s | 8 +- asm/non_matchings/racer/func_80055A84.s | 4 +- asm/non_matchings/racer/func_80059208.s | 2 +- asm/non_matchings/racer/func_8005A424.s | 10 +-- asm/non_matchings/racer/func_8005A6F0.s | 16 ++-- asm/non_matchings/racer/func_8005B818.s | 4 +- .../unknown_005740/func_800090C0.s | 2 +- .../unknown_032760/func_8003EC14.s | 4 +- .../unknown_032760/func_8003EDD8.s | 6 +- .../unknown_032760/obj_loop_butterfly.s | 4 +- .../obj_loop_fireball_octoweapon.s | 2 +- .../unknown_032760/obj_loop_fish.s | 4 +- .../unknown_032760/obj_loop_frog.s | 4 +- .../unknown_032760/obj_loop_lasergun.s | 4 +- .../unknown_032760/obj_loop_parkwarden.s | 8 +- .../unknown_032760/obj_loop_stopwatchman.s | 4 +- .../unknown_05CEF0/func_8005C364.s | 2 +- .../unknown_05DCD0/func_8005D0D0.s | 2 +- .../unknown_05DCD0/func_8005D820.s | 2 +- .../unknown_05F0C0/func_8005E4C0.s | 2 +- asm/unknown_070110.s | 2 +- .../{func_80070750.s => atan2f.s} | 2 +- include/math_util.h | 9 ++ src/object_functions.c | 4 +- src/racer.c | 35 ++++---- src/racer.h | 2 +- 46 files changed, 294 insertions(+), 284 deletions(-) rename asm/unknown_070110/{func_80070750.s => atan2f.s} (98%) create mode 100644 include/math_util.h diff --git a/asm/non_matchings/camera/func_80068514.s b/asm/non_matchings/camera/func_80068514.s index 3078ef43..7f5ffc7e 100644 --- a/asm/non_matchings/camera/func_80068514.s +++ b/asm/non_matchings/camera/func_80068514.s @@ -56,11 +56,11 @@ glabel func_80068514 /* 0691EC 800685EC 0C0326B4 */ jal sqrtf /* 0691F0 800685F0 46125300 */ add.s $f12, $f10, $f18 /* 0691F4 800685F4 C7AC0044 */ lwc1 $f12, 0x44($sp) -/* 0691F8 800685F8 0C01C1D4 */ jal func_80070750 +/* 0691F8 800685F8 0C01C1D4 */ jal atan2f /* 0691FC 800685FC 46000386 */ mov.s $f14, $f0 /* 069200 80068600 C7AC0044 */ lwc1 $f12, 0x44($sp) /* 069204 80068604 AFA20038 */ sw $v0, 0x38($sp) -/* 069208 80068608 0C01C1D4 */ jal func_80070750 +/* 069208 80068608 0C01C1D4 */ jal atan2f /* 06920C 8006860C 4600A386 */ mov.s $f14, $f20 /* 069210 80068610 00022400 */ sll $a0, $v0, 0x10 /* 069214 80068614 00045403 */ sra $t2, $a0, 0x10 @@ -81,7 +81,7 @@ glabel func_80068514 .L80068650: /* 069250 80068650 C7AC0058 */ lwc1 $f12, 0x58($sp) /* 069254 80068654 4600A386 */ mov.s $f14, $f20 -/* 069258 80068658 0C01C1D4 */ jal func_80070750 +/* 069258 80068658 0C01C1D4 */ jal atan2f /* 06925C 8006865C AFA4003C */ sw $a0, 0x3c($sp) /* 069260 80068660 34018001 */ li $at, 32769 /* 069264 80068664 8FA4003C */ lw $a0, 0x3c($sp) @@ -136,13 +136,13 @@ glabel func_80068514 /* 069320 80068720 46125300 */ add.s $f12, $f10, $f18 /* 069324 80068724 C7AC005C */ lwc1 $f12, 0x5c($sp) /* 069328 80068728 E7A00050 */ swc1 $f0, 0x50($sp) -/* 06932C 8006872C 0C01C1D4 */ jal func_80070750 +/* 06932C 8006872C 0C01C1D4 */ jal atan2f /* 069330 80068730 4600A386 */ mov.s $f14, $f20 /* 069334 80068734 3C058012 */ lui $a1, %hi(D_80120CF0) # $a1, 0x8012 /* 069338 80068738 24A50CF0 */ addiu $a1, %lo(D_80120CF0) # addiu $a1, $a1, 0xcf0 /* 06933C 8006873C C7AC0058 */ lwc1 $f12, 0x58($sp) /* 069340 80068740 C7AE0050 */ lwc1 $f14, 0x50($sp) -/* 069344 80068744 0C01C1D4 */ jal func_80070750 +/* 069344 80068744 0C01C1D4 */ jal atan2f /* 069348 80068748 A4A20000 */ sh $v0, ($a1) /* 06934C 8006874C 3C058012 */ lui $a1, %hi(D_80120CF0) # $a1, 0x8012 /* 069350 80068750 8FAE0034 */ lw $t6, 0x34($sp) diff --git a/asm/non_matchings/objects/func_8001C6C4.s b/asm/non_matchings/objects/func_8001C6C4.s index bdd630d4..5047530e 100644 --- a/asm/non_matchings/objects/func_8001C6C4.s +++ b/asm/non_matchings/objects/func_8001C6C4.s @@ -245,7 +245,7 @@ glabel func_8001C6C4 /* 01D638 8001CA38 4500003C */ bc1f .L8001CB2C /* 01D63C 8001CA3C 8FAB00EC */ lw $t3, 0xec($sp) /* 01D640 8001CA40 4600B306 */ mov.s $f12, $f22 -/* 01D644 8001CA44 0C01C1D4 */ jal func_80070750 +/* 01D644 8001CA44 0C01C1D4 */ jal atan2f /* 01D648 8001CA48 4600D386 */ mov.s $f14, $f26 /* 01D64C 8001CA4C 8FA800EC */ lw $t0, 0xec($sp) /* 01D650 8001CA50 24018000 */ li $at, -32768 @@ -281,7 +281,7 @@ glabel func_8001C6C4 /* 01D6C0 8001CAC0 00005812 */ mflo $t3 /* 01D6C4 8001CAC4 000B6103 */ sra $t4, $t3, 4 /* 01D6C8 8001CAC8 006C6821 */ addu $t5, $v1, $t4 -/* 01D6CC 8001CACC 0C01C1D4 */ jal func_80070750 +/* 01D6CC 8001CACC 0C01C1D4 */ jal atan2f /* 01D6D0 8001CAD0 A5CD0000 */ sh $t5, ($t6) /* 01D6D4 8001CAD4 8FAF00EC */ lw $t7, 0xec($sp) /* 01D6D8 8001CAD8 00000000 */ nop diff --git a/asm/non_matchings/objects/func_8001F460.s b/asm/non_matchings/objects/func_8001F460.s index 382c32c0..09a1367a 100644 --- a/asm/non_matchings/objects/func_8001F460.s +++ b/asm/non_matchings/objects/func_8001F460.s @@ -1404,7 +1404,7 @@ glabel func_8001F460 .L800208E8: /* 0214E8 800208E8 C7AE011C */ lwc1 $f14, 0x11c($sp) /* 0214EC 800208EC C7AC0124 */ lwc1 $f12, 0x124($sp) -/* 0214F0 800208F0 0C01C1D4 */ jal func_80070750 +/* 0214F0 800208F0 0C01C1D4 */ jal atan2f /* 0214F4 800208F4 00000000 */ nop /* 0214F8 800208F8 24018000 */ li $at, -32768 /* 0214FC 800208FC 00417021 */ addu $t6, $v0, $at @@ -1412,7 +1412,7 @@ glabel func_8001F460 /* 021504 80020904 3C0142C8 */ li $at, 0x42C80000 # 100.000000 /* 021508 80020908 44817000 */ mtc1 $at, $f14 /* 02150C 8002090C C7AC0120 */ lwc1 $f12, 0x120($sp) -/* 021510 80020910 0C01C1D4 */ jal func_80070750 +/* 021510 80020910 0C01C1D4 */ jal atan2f /* 021514 80020914 00000000 */ nop /* 021518 80020918 10000107 */ b .L80020D38 /* 02151C 8002091C A6C20002 */ sh $v0, 2($s6) @@ -1916,13 +1916,13 @@ glabel func_8001F460 /* 021C48 80021048 4500000B */ bc1f .L80021078 /* 021C4C 8002104C 46000506 */ mov.s $f20, $f0 /* 021C50 80021050 C7AC0124 */ lwc1 $f12, 0x124($sp) -/* 021C54 80021054 0C01C1D4 */ jal func_80070750 +/* 021C54 80021054 0C01C1D4 */ jal atan2f /* 021C58 80021058 00000000 */ nop /* 021C5C 8002105C 24018000 */ li $at, -32768 /* 021C60 80021060 0041C021 */ addu $t8, $v0, $at /* 021C64 80021064 A6D80000 */ sh $t8, ($s6) /* 021C68 80021068 C7AC0120 */ lwc1 $f12, 0x120($sp) -/* 021C6C 8002106C 0C01C1D4 */ jal func_80070750 +/* 021C6C 8002106C 0C01C1D4 */ jal atan2f /* 021C70 80021070 4600A386 */ mov.s $f14, $f20 /* 021C74 80021074 A6C20002 */ sh $v0, 2($s6) .L80021078: diff --git a/asm/non_matchings/objects/func_80021600.s b/asm/non_matchings/objects/func_80021600.s index cb17d2c8..5fafc5b6 100644 --- a/asm/non_matchings/objects/func_80021600.s +++ b/asm/non_matchings/objects/func_80021600.s @@ -626,7 +626,7 @@ glabel func_80021600 .L80021F60: /* 022B60 80021F60 C7AE00F0 */ lwc1 $f14, 0xf0($sp) /* 022B64 80021F64 C7AC00F8 */ lwc1 $f12, 0xf8($sp) -/* 022B68 80021F68 0C01C1D4 */ jal func_80070750 +/* 022B68 80021F68 0C01C1D4 */ jal atan2f /* 022B6C 80021F6C 00000000 */ nop /* 022B70 80021F70 24018000 */ li $at, -32768 /* 022B74 80021F74 8FAD0154 */ lw $t5, 0x154($sp) @@ -635,7 +635,7 @@ glabel func_80021600 /* 022B80 80021F80 A5AC0000 */ sh $t4, ($t5) /* 022B84 80021F84 C7AC00F4 */ lwc1 $f12, 0xf4($sp) /* 022B88 80021F88 44817000 */ mtc1 $at, $f14 -/* 022B8C 80021F8C 0C01C1D4 */ jal func_80070750 +/* 022B8C 80021F8C 0C01C1D4 */ jal atan2f /* 022B90 80021F90 00000000 */ nop /* 022B94 80021F94 8FAF0154 */ lw $t7, 0x154($sp) /* 022B98 80021F98 1000015A */ b .L80022504 @@ -706,7 +706,7 @@ glabel func_80021600 /* 022C90 80022090 C7AC00F8 */ lwc1 $f12, 0xf8($sp) /* 022C94 80022094 4500011B */ bc1f .L80022504 /* 022C98 80022098 E7A000EC */ swc1 $f0, 0xec($sp) -/* 022C9C 8002209C 0C01C1D4 */ jal func_80070750 +/* 022C9C 8002209C 0C01C1D4 */ jal atan2f /* 022CA0 800220A0 00000000 */ nop /* 022CA4 800220A4 8FAF0154 */ lw $t7, 0x154($sp) /* 022CA8 800220A8 24018000 */ li $at, -32768 @@ -714,7 +714,7 @@ glabel func_80021600 /* 022CB0 800220B0 A5ED0000 */ sh $t5, ($t7) /* 022CB4 800220B4 C7AE00EC */ lwc1 $f14, 0xec($sp) /* 022CB8 800220B8 C7AC00F4 */ lwc1 $f12, 0xf4($sp) -/* 022CBC 800220BC 0C01C1D4 */ jal func_80070750 +/* 022CBC 800220BC 0C01C1D4 */ jal atan2f /* 022CC0 800220C0 00000000 */ nop /* 022CC4 800220C4 8FAE0154 */ lw $t6, 0x154($sp) /* 022CC8 800220C8 1000010E */ b .L80022504 diff --git a/asm/non_matchings/objects/func_800230D0.s b/asm/non_matchings/objects/func_800230D0.s index c004f8d9..272901b6 100644 --- a/asm/non_matchings/objects/func_800230D0.s +++ b/asm/non_matchings/objects/func_800230D0.s @@ -117,7 +117,7 @@ glabel func_800230D0 /* 023E80 80023280 E6280064 */ swc1 $f8, 0x64($s1) /* 023E84 80023284 C50C0000 */ lwc1 $f12, ($t0) /* 023E88 80023288 C50E0008 */ lwc1 $f14, 8($t0) -/* 023E8C 8002328C 0C01C1D4 */ jal func_80070750 +/* 023E8C 8002328C 0C01C1D4 */ jal atan2f /* 023E90 80023290 AFA8005C */ sw $t0, 0x5c($sp) /* 023E94 80023294 8FA8005C */ lw $t0, 0x5c($sp) /* 023E98 80023298 10000004 */ b .L800232AC diff --git a/asm/non_matchings/racer/func_80042D20.s b/asm/non_matchings/racer/func_80042D20.s index 5f11da27..09a8e29e 100644 --- a/asm/non_matchings/racer/func_80042D20.s +++ b/asm/non_matchings/racer/func_80042D20.s @@ -1196,9 +1196,9 @@ glabel func_80042D20 /* 044A30 80043E30 462A903C */ c.lt.d $f18, $f10 /* 044A34 80043E34 35D98000 */ ori $t9, $t6, 0x8000 /* 044A38 80043E38 45000003 */ bc1f .L80043E48 -/* 044A3C 80043E3C 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 +/* 044A3C 80043E3C 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 /* 044A40 80043E40 AC590000 */ sw $t9, ($v0) -/* 044A44 80043E44 AC20D534 */ sw $zero, %lo(D_8011D534)($at) +/* 044A44 80043E44 AC20D534 */ sw $zero, %lo(gCurrentStickX)($at) .L80043E48: /* 044A48 80043E48 82180214 */ lb $t8, 0x214($s0) /* 044A4C 80043E4C 87AE006E */ lh $t6, 0x6e($sp) diff --git a/asm/non_matchings/racer/func_8004447C.s b/asm/non_matchings/racer/func_8004447C.s index 9f95f17e..104fd685 100644 --- a/asm/non_matchings/racer/func_8004447C.s +++ b/asm/non_matchings/racer/func_8004447C.s @@ -16,15 +16,15 @@ glabel func_8004447C /* 04508C 8004448C 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 /* 045090 80044490 27BDFF88 */ addiu $sp, $sp, -0x78 /* 045094 80044494 AC20D528 */ sw $zero, %lo(gCurrentCarInput)($at) -/* 045098 80044498 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 -/* 04509C 8004449C AC20D534 */ sw $zero, %lo(D_8011D534)($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) /* 0450A4 800444A4 AFB00018 */ sw $s0, 0x18($sp) /* 0450A8 800444A8 AFA40078 */ sw $a0, 0x78($sp) -/* 0450AC 800444AC 3C018012 */ lui $at, %hi(D_8011D538) # $at, 0x8012 +/* 0450AC 800444AC 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 /* 0450B0 800444B0 00A08025 */ move $s0, $a1 /* 0450B4 800444B4 AFA60080 */ sw $a2, 0x80($sp) -/* 0450B8 800444B8 AC20D538 */ sw $zero, %lo(D_8011D538)($at) +/* 0450B8 800444B8 AC20D538 */ sw $zero, %lo(gCurrentStickY)($at) /* 0450BC 800444BC 0C006E9D */ jal get_object_struct_array /* 0450C0 800444C0 27A40058 */ addiu $a0, $sp, 0x58 /* 0450C4 800444C4 8FAE0058 */ lw $t6, 0x58($sp) @@ -86,7 +86,7 @@ glabel func_8004447C /* 0451A0 800445A0 4500001A */ bc1f .L8004460C /* 0451A4 800445A4 E7A0005C */ swc1 $f0, 0x5c($sp) /* 0451A8 800445A8 C7AC0064 */ lwc1 $f12, 0x64($sp) -/* 0451AC 800445AC 0C01C1D4 */ jal func_80070750 +/* 0451AC 800445AC 0C01C1D4 */ jal atan2f /* 0451B0 800445B0 AFA60074 */ sw $a2, 0x74($sp) /* 0451B4 800445B4 24018000 */ li $at, -32768 /* 0451B8 800445B8 00417821 */ addu $t7, $v0, $at @@ -110,8 +110,8 @@ glabel func_8004447C .L800445FC: /* 0451FC 800445FC 00036823 */ negu $t5, $v1 /* 045200 80044600 000D7103 */ sra $t6, $t5, 4 -/* 045204 80044604 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 -/* 045208 80044608 AC2ED534 */ sw $t6, %lo(D_8011D534)($at) +/* 045204 80044604 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 +/* 045208 80044608 AC2ED534 */ sw $t6, %lo(gCurrentStickX)($at) .L8004460C: /* 04520C 8004460C 3C0F8012 */ lui $t7, %hi(D_8011D540) # $t7, 0x8012 /* 045210 80044610 8DEFD540 */ lw $t7, %lo(D_8011D540)($t7) @@ -500,8 +500,8 @@ glabel L80044ADC .L80044B7C: /* 04577C 80044B7C A20F01CD */ sb $t7, 0x1cd($s0) .L80044B80: -/* 045780 80044B80 3C028012 */ lui $v0, %hi(D_8011D534) # $v0, 0x8012 -/* 045784 80044B84 8C42D534 */ lw $v0, %lo(D_8011D534)($v0) +/* 045780 80044B80 3C028012 */ lui $v0, %hi(gCurrentStickX) # $v0, 0x8012 +/* 045784 80044B84 8C42D534 */ lw $v0, %lo(gCurrentStickX)($v0) /* 045788 80044B88 00000000 */ nop /* 04578C 80044B8C 2841FFE3 */ slti $at, $v0, -0x1d /* 045790 80044B90 1420000E */ bnez $at, .L80044BCC @@ -571,7 +571,7 @@ glabel L80044ADC /* 045880 80044C80 45000028 */ bc1f .L80044D24 /* 045884 80044C84 00000000 */ nop /* 045888 80044C88 C7AC0064 */ lwc1 $f12, 0x64($sp) -/* 04588C 80044C8C 0C01C1D4 */ jal func_80070750 +/* 04588C 80044C8C 0C01C1D4 */ jal atan2f /* 045890 80044C90 00000000 */ nop /* 045894 80044C94 24018000 */ li $at, -32768 /* 045898 80044C98 00417021 */ addu $t6, $v0, $at @@ -841,7 +841,7 @@ glabel L80044F54 /* 045C5C 8004505C 45000028 */ bc1f .L80045100 /* 045C60 80045060 00000000 */ nop /* 045C64 80045064 C7AC0064 */ lwc1 $f12, 0x64($sp) -/* 045C68 80045068 0C01C1D4 */ jal func_80070750 +/* 045C68 80045068 0C01C1D4 */ jal atan2f /* 045C6C 8004506C A7A50052 */ sh $a1, 0x52($sp) /* 045C70 80045070 8FB90078 */ lw $t9, 0x78($sp) /* 045C74 80045074 AFA20058 */ sw $v0, 0x58($sp) diff --git a/asm/non_matchings/racer/func_800452A0.s b/asm/non_matchings/racer/func_800452A0.s index 312aa2a8..a4c37e53 100644 --- a/asm/non_matchings/racer/func_800452A0.s +++ b/asm/non_matchings/racer/func_800452A0.s @@ -19,14 +19,14 @@ glabel func_800452A0 /* 045EB4 800452B4 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 /* 045EB8 800452B8 340E8000 */ li $t6, 32768 /* 045EBC 800452BC AC2ED528 */ sw $t6, %lo(gCurrentCarInput)($at) -/* 045EC0 800452C0 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 +/* 045EC0 800452C0 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 /* 045EC4 800452C4 AFB60048 */ sw $s6, 0x48($sp) -/* 045EC8 800452C8 AC20D534 */ sw $zero, %lo(D_8011D534)($at) +/* 045EC8 800452C8 AC20D534 */ sw $zero, %lo(gCurrentStickX)($at) /* 045ECC 800452CC 0080B025 */ move $s6, $a0 /* 045ED0 800452D0 AFBF0054 */ sw $ra, 0x54($sp) /* 045ED4 800452D4 AFB50044 */ sw $s5, 0x44($sp) /* 045ED8 800452D8 AFB00030 */ sw $s0, 0x30($sp) -/* 045EDC 800452DC 3C018012 */ lui $at, %hi(D_8011D538) # $at, 0x8012 +/* 045EDC 800452DC 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 /* 045EE0 800452E0 00C08025 */ move $s0, $a2 /* 045EE4 800452E4 00A0A825 */ move $s5, $a1 /* 045EE8 800452E8 AFBE0050 */ sw $fp, 0x50($sp) @@ -41,7 +41,7 @@ glabel func_800452A0 /* 045F0C 8004530C E7B60024 */ swc1 $f22, 0x24($sp) /* 045F10 80045310 E7B50018 */ swc1 $f21, 0x18($sp) /* 045F14 80045314 E7B4001C */ swc1 $f20, 0x1c($sp) -/* 045F18 80045318 AC20D538 */ sw $zero, %lo(D_8011D538)($at) +/* 045F18 80045318 AC20D538 */ sw $zero, %lo(gCurrentStickY)($at) /* 045F1C 8004531C 0C006E9D */ jal get_object_struct_array /* 045F20 80045320 27A4009C */ addiu $a0, $sp, 0x9c /* 045F24 80045324 8FAF009C */ lw $t7, 0x9c($sp) @@ -504,7 +504,7 @@ glabel L800456DC /* 046568 80045968 45000031 */ bc1f .L80045A30 /* 04656C 8004596C 46000086 */ mov.s $f2, $f0 /* 046570 80045970 4600A306 */ mov.s $f12, $f20 -/* 046574 80045974 0C01C1D4 */ jal func_80070750 +/* 046574 80045974 0C01C1D4 */ jal atan2f /* 046578 80045978 E7A200A8 */ swc1 $f2, 0xa8($sp) /* 04657C 8004597C 24018000 */ li $at, -32768 /* 046580 80045980 0041C821 */ addu $t9, $v0, $at @@ -529,13 +529,13 @@ glabel L800456DC /* 0465C4 800459C4 C7A8005C */ lwc1 $f8, 0x5c($sp) /* 0465C8 800459C8 00035823 */ negu $t3, $v1 /* 0465CC 800459CC 000B6143 */ sra $t4, $t3, 5 -/* 0465D0 800459D0 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 -/* 0465D4 800459D4 AC2CD534 */ sw $t4, %lo(D_8011D534)($at) +/* 0465D0 800459D0 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 +/* 0465D4 800459D4 AC2CD534 */ sw $t4, %lo(gCurrentStickX)($at) /* 0465D8 800459D8 E7A200A8 */ swc1 $f2, 0xa8($sp) /* 0465DC 800459DC 0C0326B4 */ jal sqrtf /* 0465E0 800459E0 4608C300 */ add.s $f12, $f24, $f8 /* 0465E4 800459E4 4600B306 */ mov.s $f12, $f22 -/* 0465E8 800459E8 0C01C1D4 */ jal func_80070750 +/* 0465E8 800459E8 0C01C1D4 */ jal atan2f /* 0465EC 800459EC 46000386 */ mov.s $f14, $f0 /* 0465F0 800459F0 3044FFFF */ andi $a0, $v0, 0xffff /* 0465F4 800459F4 C7A200A8 */ lwc1 $f2, 0xa8($sp) @@ -553,24 +553,24 @@ glabel L800456DC .L80045A20: /* 046620 80045A20 00036823 */ negu $t5, $v1 /* 046624 80045A24 000D71C3 */ sra $t6, $t5, 7 -/* 046628 80045A28 3C018012 */ lui $at, %hi(D_8011D538) # $at, 0x8012 -/* 04662C 80045A2C AC2ED538 */ sw $t6, %lo(D_8011D538)($at) +/* 046628 80045A28 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 +/* 04662C 80045A2C AC2ED538 */ sw $t6, %lo(gCurrentStickY)($at) .L80045A30: /* 046630 80045A30 82A201CC */ lb $v0, 0x1cc($s5) -/* 046634 80045A34 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 +/* 046634 80045A34 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 /* 046638 80045A38 0441000A */ bgez $v0, .L80045A64 -/* 04663C 80045A3C 3C038012 */ lui $v1, %hi(D_8011D534) # $v1, 0x8012 -/* 046640 80045A40 AC20D534 */ sw $zero, %lo(D_8011D534)($at) -/* 046644 80045A44 3C018012 */ lui $at, %hi(D_8011D538) # $at, 0x8012 +/* 04663C 80045A3C 3C038012 */ lui $v1, %hi(gCurrentStickX) # $v1, 0x8012 +/* 046640 80045A40 AC20D534 */ sw $zero, %lo(gCurrentStickX)($at) +/* 046644 80045A44 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 /* 046648 80045A48 240FFFDD */ li $t7, -35 -/* 04664C 80045A4C AC2FD538 */ sw $t7, %lo(D_8011D538)($at) +/* 04664C 80045A4C AC2FD538 */ sw $t7, %lo(gCurrentStickY)($at) /* 046650 80045A50 82B801CC */ lb $t8, 0x1cc($s5) /* 046654 80045A54 00000000 */ nop /* 046658 80045A58 27190001 */ addiu $t9, $t8, 1 /* 04665C 80045A5C 10000013 */ b .L80045AAC /* 046660 80045A60 A2B901CC */ sb $t9, 0x1cc($s5) .L80045A64: -/* 046664 80045A64 8C63D534 */ lw $v1, %lo(D_8011D534)($v1) +/* 046664 80045A64 8C63D534 */ lw $v1, %lo(gCurrentStickX)($v1) /* 046668 80045A68 24490001 */ addiu $t1, $v0, 1 /* 04666C 80045A6C 2861003D */ slti $at, $v1, 0x3d /* 046670 80045A70 10200003 */ beqz $at, .L80045A80 diff --git a/asm/non_matchings/racer/func_80045C48.s b/asm/non_matchings/racer/func_80045C48.s index 48c696f6..406d48e8 100644 --- a/asm/non_matchings/racer/func_80045C48.s +++ b/asm/non_matchings/racer/func_80045C48.s @@ -6,11 +6,11 @@ glabel func_80045C48 /* 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) -/* 046864 80045C64 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 -/* 046868 80045C68 AC20D534 */ sw $zero, %lo(D_8011D534)($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) /* 046870 80045C70 AFB10024 */ sw $s1, 0x24($sp) -/* 046874 80045C74 3C018012 */ lui $at, %hi(D_8011D538) # $at, 0x8012 +/* 046874 80045C74 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 /* 046878 80045C78 00A08825 */ move $s1, $a1 /* 04687C 80045C7C AFB20028 */ sw $s2, 0x28($sp) /* 046880 80045C80 AFB00020 */ sw $s0, 0x20($sp) @@ -20,13 +20,13 @@ glabel func_80045C48 /* 046890 80045C90 AFA600F0 */ sw $a2, 0xf0($sp) /* 046894 80045C94 AFA000C4 */ sw $zero, 0xc4($sp) /* 046898 80045C98 0C006E99 */ jal func_8001BA64 -/* 04689C 80045C9C AC20D538 */ sw $zero, %lo(D_8011D538)($at) +/* 04689C 80045C9C AC20D538 */ sw $zero, %lo(gCurrentStickY)($at) /* 0468A0 80045CA0 14400005 */ bnez $v0, .L80045CB8 /* 0468A4 80045CA4 00409025 */ move $s2, $v0 /* 0468A8 80045CA8 240E0019 */ li $t6, 25 -/* 0468AC 80045CAC 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 +/* 0468AC 80045CAC 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 /* 0468B0 80045CB0 10000214 */ b .L80046504 -/* 0468B4 80045CB4 AC2ED534 */ sw $t6, %lo(D_8011D534)($at) +/* 0468B4 80045CB4 AC2ED534 */ sw $t6, %lo(gCurrentStickX)($at) .L80045CB8: /* 0468B8 80045CB8 C62400A8 */ lwc1 $f4, 0xa8($s1) /* 0468BC 80045CBC 3C013FF0 */ li $at, 0x3FF00000 # 1.875000 @@ -234,7 +234,7 @@ glabel func_80045C48 .L80045FC8: /* 046BC8 80045FC8 C7AE0054 */ lwc1 $f14, 0x54($sp) /* 046BCC 80045FCC C7AC005C */ lwc1 $f12, 0x5c($sp) -/* 046BD0 80045FD0 0C01C1D4 */ jal func_80070750 +/* 046BD0 80045FD0 0C01C1D4 */ jal atan2f /* 046BD4 80045FD4 00000000 */ nop /* 046BD8 80045FD8 24018000 */ li $at, -32768 /* 046BDC 80045FDC 00418021 */ addu $s0, $v0, $at @@ -242,7 +242,7 @@ glabel func_80045C48 /* 046BE4 80045FE4 320BFFFF */ andi $t3, $s0, 0xffff /* 046BE8 80045FE8 44817000 */ mtc1 $at, $f14 /* 046BEC 80045FEC C7AC0058 */ lwc1 $f12, 0x58($sp) -/* 046BF0 80045FF0 0C01C1D4 */ jal func_80070750 +/* 046BF0 80045FF0 0C01C1D4 */ jal atan2f /* 046BF4 80045FF4 01608025 */ move $s0, $t3 /* 046BF8 80045FF8 862C01BE */ lh $t4, 0x1be($s1) /* 046BFC 80045FFC 862D01C0 */ lh $t5, 0x1c0($s1) @@ -282,12 +282,12 @@ glabel func_80045C48 /* 046C78 80046078 3401FFFF */ li $at, 65535 /* 046C7C 8004607C 00611821 */ addu $v1, $v1, $at .L80046080: -/* 046C80 80046080 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 -/* 046C84 80046084 AC2AD534 */ sw $t2, %lo(D_8011D534)($at) +/* 046C80 80046080 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 +/* 046C84 80046084 AC2AD534 */ sw $t2, %lo(gCurrentStickX)($at) /* 046C88 80046088 000358C3 */ sra $t3, $v1, 3 /* 046C8C 8004608C 000B6023 */ negu $t4, $t3 -/* 046C90 80046090 3C018012 */ lui $at, %hi(D_8011D538) # $at, 0x8012 -/* 046C94 80046094 AC2CD538 */ sw $t4, %lo(D_8011D538)($at) +/* 046C90 80046090 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 +/* 046C94 80046094 AC2CD538 */ sw $t4, %lo(gCurrentStickY)($at) /* 046C98 80046098 862D01A0 */ lh $t5, 0x1a0($s1) /* 046C9C 8004609C 44804000 */ mtc1 $zero, $f8 /* 046CA0 800460A0 31AEFFFF */ andi $t6, $t5, 0xffff @@ -472,7 +472,7 @@ glabel func_80045C48 /* 046F38 80046338 C4460014 */ lwc1 $f6, 0x14($v0) /* 046F3C 8004633C 46082280 */ add.s $f10, $f4, $f8 /* 046F40 80046340 46065381 */ sub.s $f14, $f10, $f6 -/* 046F44 80046344 0C01C1D4 */ jal func_80070750 +/* 046F44 80046344 0C01C1D4 */ jal atan2f /* 046F48 80046348 E7AE0054 */ swc1 $f14, 0x54($sp) /* 046F4C 8004634C 24018000 */ li $at, -32768 /* 046F50 80046350 00418021 */ addu $s0, $v0, $at @@ -480,7 +480,7 @@ glabel func_80045C48 /* 046F58 80046358 320DFFFF */ andi $t5, $s0, 0xffff /* 046F5C 8004635C 44817000 */ mtc1 $at, $f14 /* 046F60 80046360 C7AC0058 */ lwc1 $f12, 0x58($sp) -/* 046F64 80046364 0C01C1D4 */ jal func_80070750 +/* 046F64 80046364 0C01C1D4 */ jal atan2f /* 046F68 80046368 01A08025 */ move $s0, $t5 /* 046F6C 8004636C 862501A0 */ lh $a1, 0x1a0($s1) /* 046F70 80046370 34018001 */ li $at, 32769 @@ -533,63 +533,63 @@ glabel func_80045C48 /* 047018 80046418 A62C01A0 */ sh $t4, 0x1a0($s1) .L8004641C: /* 04701C 8004641C 10C70019 */ beq $a2, $a3, .L80046484 -/* 047020 80046420 3C0A8012 */ lui $t2, %hi(D_8011D534) # $t2, 0x8012 +/* 047020 80046420 3C0A8012 */ lui $t2, %hi(gCurrentStickX) # $t2, 0x8012 /* 047024 80046424 24010004 */ li $at, 4 /* 047028 80046428 10C10013 */ beq $a2, $at, .L80046478 /* 04702C 8004642C 24010005 */ li $at, 5 /* 047030 80046430 10C1001B */ beq $a2, $at, .L800464A0 -/* 047034 80046434 3C0D8012 */ lui $t5, %hi(D_8011D534) # $t5, 0x8012 +/* 047034 80046434 3C0D8012 */ lui $t5, %hi(gCurrentStickX) # $t5, 0x8012 /* 047038 80046438 24010007 */ li $at, 7 /* 04703C 8004643C 10C10021 */ beq $a2, $at, .L800464C4 -/* 047040 80046440 3C0F8012 */ lui $t7, %hi(D_8011D534) # $t7, 0x8012 -/* 047044 80046444 3C0D8012 */ lui $t5, %hi(D_8011D534) # $t5, 0x8012 -/* 047048 80046448 8DADD534 */ lw $t5, %lo(D_8011D534)($t5) +/* 047040 80046440 3C0F8012 */ lui $t7, %hi(gCurrentStickX) # $t7, 0x8012 +/* 047044 80046444 3C0D8012 */ lui $t5, %hi(gCurrentStickX) # $t5, 0x8012 +/* 047048 80046448 8DADD534 */ lw $t5, %lo(gCurrentStickX)($t5) /* 04704C 8004644C 00447007 */ srav $t6, $a0, $v0 -/* 047050 80046450 3C198012 */ lui $t9, %hi(D_8011D538) # $t9, 0x8012 -/* 047054 80046454 8F39D538 */ lw $t9, %lo(D_8011D538)($t9) -/* 047058 80046458 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 +/* 047050 80046450 3C198012 */ lui $t9, %hi(gCurrentStickY) # $t9, 0x8012 +/* 047054 80046454 8F39D538 */ lw $t9, %lo(gCurrentStickY)($t9) +/* 047058 80046458 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 /* 04705C 8004645C 01AEC021 */ addu $t8, $t5, $t6 -/* 047060 80046460 AC38D534 */ sw $t8, %lo(D_8011D534)($at) +/* 047060 80046460 AC38D534 */ sw $t8, %lo(gCurrentStickX)($at) /* 047064 80046464 00437807 */ srav $t7, $v1, $v0 -/* 047068 80046468 3C018012 */ lui $at, %hi(D_8011D538) # $at, 0x8012 +/* 047068 80046468 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 /* 04706C 8004646C 032F4821 */ addu $t1, $t9, $t7 /* 047070 80046470 10000020 */ b .L800464F4 -/* 047074 80046474 AC29D538 */ sw $t1, %lo(D_8011D538)($at) +/* 047074 80046474 AC29D538 */ sw $t1, %lo(gCurrentStickY)($at) .L80046478: -/* 047078 80046478 3C018012 */ lui $at, %hi(D_8011D538) # $at, 0x8012 +/* 047078 80046478 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 /* 04707C 8004647C 1000001D */ b .L800464F4 -/* 047080 80046480 AC20D538 */ sw $zero, %lo(D_8011D538)($at) +/* 047080 80046480 AC20D538 */ sw $zero, %lo(gCurrentStickY)($at) .L80046484: -/* 047084 80046484 8D4AD534 */ lw $t2, %lo(D_8011D534)($t2) -/* 047088 80046488 AC20D538 */ sw $zero, %lo(D_8011D538)($at) +/* 047084 80046484 8D4AD534 */ lw $t2, %lo(gCurrentStickX)($t2) +/* 047088 80046488 AC20D538 */ sw $zero, %lo(gCurrentStickY)($at) /* 04708C 8004648C 00445807 */ srav $t3, $a0, $v0 -/* 047090 80046490 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 +/* 047090 80046490 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 /* 047094 80046494 014B6021 */ addu $t4, $t2, $t3 /* 047098 80046498 10000016 */ b .L800464F4 -/* 04709C 8004649C AC2CD534 */ sw $t4, %lo(D_8011D534)($at) +/* 04709C 8004649C AC2CD534 */ sw $t4, %lo(gCurrentStickX)($at) .L800464A0: -/* 0470A0 800464A0 8DADD534 */ lw $t5, %lo(D_8011D534)($t5) +/* 0470A0 800464A0 8DADD534 */ lw $t5, %lo(gCurrentStickX)($t5) /* 0470A4 800464A4 244E001F */ addiu $t6, $v0, 0x1f /* 0470A8 800464A8 01C4C007 */ srav $t8, $a0, $t6 -/* 0470AC 800464AC 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 +/* 0470AC 800464AC 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 /* 0470B0 800464B0 01B8C821 */ addu $t9, $t5, $t8 -/* 0470B4 800464B4 AC39D534 */ sw $t9, %lo(D_8011D534)($at) -/* 0470B8 800464B8 3C018012 */ lui $at, %hi(D_8011D538) # $at, 0x8012 +/* 0470B4 800464B4 AC39D534 */ sw $t9, %lo(gCurrentStickX)($at) +/* 0470B8 800464B8 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 /* 0470BC 800464BC 1000000D */ b .L800464F4 -/* 0470C0 800464C0 AC20D538 */ sw $zero, %lo(D_8011D538)($at) +/* 0470C0 800464C0 AC20D538 */ sw $zero, %lo(gCurrentStickY)($at) .L800464C4: -/* 0470C4 800464C4 8DEFD534 */ lw $t7, %lo(D_8011D534)($t7) +/* 0470C4 800464C4 8DEFD534 */ lw $t7, %lo(gCurrentStickX)($t7) /* 0470C8 800464C8 2442FFFF */ addiu $v0, $v0, -1 /* 0470CC 800464CC 00444807 */ srav $t1, $a0, $v0 -/* 0470D0 800464D0 3C0B8012 */ lui $t3, %hi(D_8011D538) # $t3, 0x8012 -/* 0470D4 800464D4 8D6BD538 */ lw $t3, %lo(D_8011D538)($t3) -/* 0470D8 800464D8 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 +/* 0470D0 800464D0 3C0B8012 */ lui $t3, %hi(gCurrentStickY) # $t3, 0x8012 +/* 0470D4 800464D4 8D6BD538 */ lw $t3, %lo(gCurrentStickY)($t3) +/* 0470D8 800464D8 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 /* 0470DC 800464DC 01E95021 */ addu $t2, $t7, $t1 -/* 0470E0 800464E0 AC2AD534 */ sw $t2, %lo(D_8011D534)($at) +/* 0470E0 800464E0 AC2AD534 */ sw $t2, %lo(gCurrentStickX)($at) /* 0470E4 800464E4 00436007 */ srav $t4, $v1, $v0 -/* 0470E8 800464E8 3C018012 */ lui $at, %hi(D_8011D538) # $at, 0x8012 +/* 0470E8 800464E8 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 /* 0470EC 800464EC 016C7021 */ addu $t6, $t3, $t4 -/* 0470F0 800464F0 AC2ED538 */ sw $t6, %lo(D_8011D538)($at) +/* 0470F0 800464F0 AC2ED538 */ sw $t6, %lo(gCurrentStickY)($at) .L800464F4: /* 0470F4 800464F4 8FA400E8 */ lw $a0, 0xe8($sp) /* 0470F8 800464F8 8FA600F0 */ lw $a2, 0xf0($sp) diff --git a/asm/non_matchings/racer/func_80046524.s b/asm/non_matchings/racer/func_80046524.s index a0476955..dc03593a 100644 --- a/asm/non_matchings/racer/func_80046524.s +++ b/asm/non_matchings/racer/func_80046524.s @@ -77,7 +77,7 @@ glabel func_80046524 .L80046570: /* 047170 80046570 A3A00067 */ sb $zero, 0x67($sp) /* 047174 80046574 860E0000 */ lh $t6, ($s0) -/* 047178 80046578 3C0D8012 */ lui $t5, %hi(D_8011D534) # $t5, 0x8012 +/* 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 @@ -146,7 +146,7 @@ glabel func_80046524 /* 047274 80046674 00000000 */ nop .L80046678: /* 047278 80046678 820801E1 */ lb $t0, 0x1e1($s0) -/* 04727C 8004667C 8DADD534 */ lw $t5, %lo(D_8011D534)($t5) +/* 04727C 8004667C 8DADD534 */ lw $t5, %lo(gCurrentStickX)($t5) /* 047280 80046680 C7A4012C */ lwc1 $f4, 0x12c($sp) /* 047284 80046684 01A81823 */ subu $v1, $t5, $t0 /* 047288 80046688 44835000 */ mtc1 $v1, $f10 @@ -314,8 +314,8 @@ glabel func_80046524 /* 0474E8 800468E8 E7A800F4 */ swc1 $f8, 0xf4($sp) .L800468EC: /* 0474EC 800468EC 11C0002F */ beqz $t6, .L800469AC -/* 0474F0 800468F0 3C0F8012 */ lui $t7, %hi(D_8011D538) # $t7, 0x8012 -/* 0474F4 800468F4 8DEFD538 */ lw $t7, %lo(D_8011D538)($t7) +/* 0474F0 800468F0 3C0F8012 */ lui $t7, %hi(gCurrentStickY) # $t7, 0x8012 +/* 0474F4 800468F4 8DEFD538 */ lw $t7, %lo(gCurrentStickY)($t7) /* 0474F8 800468F8 C7A70050 */ lwc1 $f7, 0x50($sp) /* 0474FC 800468FC 29E1FFD8 */ slti $at, $t7, -0x28 /* 047500 80046900 14200006 */ bnez $at, .L8004691C @@ -417,8 +417,8 @@ glabel func_80046524 /* 047668 80046A68 921801F5 */ lbu $t8, 0x1f5($s0) /* 04766C 80046A6C 00000000 */ nop /* 047670 80046A70 13000059 */ beqz $t8, .L80046BD8 -/* 047674 80046A74 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 -/* 047678 80046A78 AC20D534 */ sw $zero, %lo(D_8011D534)($at) +/* 047674 80046A74 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 +/* 047678 80046A78 AC20D534 */ sw $zero, %lo(gCurrentStickX)($at) /* 04767C 80046A7C 8E19014C */ lw $t9, 0x14c($s0) /* 047680 80046A80 860201A0 */ lh $v0, 0x1a0($s0) /* 047684 80046A84 A2000175 */ sb $zero, 0x175($s0) @@ -590,8 +590,8 @@ glabel func_80046524 /* 0478E4 80046CE4 00000000 */ nop /* 0478E8 80046CE8 A20001D5 */ sb $zero, 0x1d5($s0) .L80046CEC: -/* 0478EC 80046CEC 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 -/* 0478F0 80046CF0 AC20D534 */ sw $zero, %lo(D_8011D534)($at) +/* 0478EC 80046CEC 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 +/* 0478F0 80046CF0 AC20D534 */ sw $zero, %lo(gCurrentStickX)($at) .L80046CF4: /* 0478F4 80046CF4 820201DB */ lb $v0, 0x1db($s0) /* 0478F8 80046CF8 00000000 */ nop @@ -737,11 +737,11 @@ glabel func_80046524 /* 047B0C 80046F0C 01416024 */ and $t4, $t2, $at /* 047B10 80046F10 3C018012 */ lui $at, %hi(gCurrentCarInput) # $at, 0x8012 /* 047B14 80046F14 AC2CD528 */ sw $t4, %lo(gCurrentCarInput)($at) -/* 047B18 80046F18 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 -/* 047B1C 80046F1C AC20D534 */ sw $zero, %lo(D_8011D534)($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) -/* 047B24 80046F24 3C018012 */ lui $at, %hi(D_8011D538) # $at, 0x8012 -/* 047B28 80046F28 AC20D538 */ sw $zero, %lo(D_8011D538)($at) +/* 047B24 80046F24 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 +/* 047B28 80046F28 AC20D538 */ sw $zero, %lo(gCurrentStickY)($at) .L80046F2C: /* 047B2C 80046F2C 920B01F1 */ lbu $t3, 0x1f1($s0) /* 047B30 80046F30 3C013F80 */ li $at, 0x3F800000 # 1.000000 @@ -918,8 +918,8 @@ glabel func_80046524 /* 047DBC 800471BC 10000004 */ b .L800471D0 /* 047DC0 800471C0 00000000 */ nop .L800471C4: -/* 047DC4 800471C4 3C088012 */ lui $t0, %hi(D_8011D534) # $t0, 0x8012 -/* 047DC8 800471C8 8D08D534 */ lw $t0, %lo(D_8011D534)($t0) +/* 047DC4 800471C4 3C088012 */ lui $t0, %hi(gCurrentStickX) # $t0, 0x8012 +/* 047DC8 800471C8 8D08D534 */ lw $t0, %lo(gCurrentStickX)($t0) /* 047DCC 800471CC 00000000 */ nop .L800471D0: /* 047DD0 800471D0 3C01800E */ lui $at, %hi(D_800E63F0) # $at, 0x800e @@ -942,8 +942,8 @@ glabel func_80046524 /* 047E14 80047214 00000000 */ nop /* 047E18 80047218 31F84000 */ andi $t8, $t7, 0x4000 /* 047E1C 8004721C 13000013 */ beqz $t8, .L8004726C -/* 047E20 80047220 3C198012 */ lui $t9, %hi(D_8011D538) # $t9, 0x8012 -/* 047E24 80047224 8F39D538 */ lw $t9, %lo(D_8011D538)($t9) +/* 047E20 80047220 3C198012 */ lui $t9, %hi(gCurrentStickY) # $t9, 0x8012 +/* 047E24 80047224 8F39D538 */ lw $t9, %lo(gCurrentStickY)($t9) /* 047E28 80047228 00000000 */ nop /* 047E2C 8004722C 2B21FFD8 */ slti $at, $t9, -0x28 /* 047E30 80047230 1420000F */ bnez $at, .L80047270 @@ -966,8 +966,8 @@ glabel func_80046524 .L80047270: /* 047E70 80047270 000850C0 */ sll $t2, $t0, 3 /* 047E74 80047274 01440019 */ multu $t2, $a0 -/* 047E78 80047278 3C028012 */ lui $v0, %hi(D_8011D538) # $v0, 0x8012 -/* 047E7C 8004727C 8C42D538 */ lw $v0, %lo(D_8011D538)($v0) +/* 047E78 80047278 3C028012 */ lui $v0, %hi(gCurrentStickY) # $v0, 0x8012 +/* 047E7C 8004727C 8C42D538 */ lw $v0, %lo(gCurrentStickY)($v0) /* 047E80 80047280 00004025 */ move $t0, $zero /* 047E84 80047284 00006012 */ mflo $t4 /* 047E88 80047288 448C4000 */ mtc1 $t4, $f8 @@ -1306,7 +1306,7 @@ glabel func_80046524 /* 048368 80047768 C62C001C */ lwc1 $f12, 0x1c($s1) /* 04836C 8004776C C62E0024 */ lwc1 $f14, 0x24($s1) /* 048370 80047770 E7B20104 */ swc1 $f18, 0x104($sp) -/* 048374 80047774 0C01C1D4 */ jal func_80070750 +/* 048374 80047774 0C01C1D4 */ jal atan2f /* 048378 80047778 E7A200D0 */ swc1 $f2, 0xd0($sp) /* 04837C 8004777C 34058000 */ li $a1, 32768 /* 048380 80047780 C7A200D0 */ lwc1 $f2, 0xd0($sp) @@ -1558,9 +1558,9 @@ glabel func_80046524 /* 048720 80047B20 30980010 */ andi $t8, $a0, 0x10 /* 048724 80047B24 1300002E */ beqz $t8, .L80047BE0 /* 048728 80047B28 46204420 */ cvt.s.d $f16, $f8 -/* 04872C 80047B2C 3C028012 */ lui $v0, %hi(D_8011D534) # $v0, 0x8012 +/* 04872C 80047B2C 3C028012 */ lui $v0, %hi(gCurrentStickX) # $v0, 0x8012 /* 048730 80047B30 44815000 */ mtc1 $at, $f10 -/* 048734 80047B34 8C42D534 */ lw $v0, %lo(D_8011D534)($v0) +/* 048734 80047B34 8C42D534 */ lw $v0, %lo(gCurrentStickX)($v0) /* 048738 80047B38 460A8402 */ mul.s $f16, $f16, $f10 /* 04873C 80047B3C 2841FFD9 */ slti $at, $v0, -0x27 /* 048740 80047B40 1420000C */ bnez $at, .L80047B74 @@ -2095,8 +2095,8 @@ glabel func_80046524 /* 048F04 80048304 31CF0010 */ andi $t7, $t6, 0x10 /* 048F08 80048308 11E00006 */ beqz $t7, .L80048324 /* 048F0C 8004830C 02202025 */ move $a0, $s1 -/* 048F10 80048310 3C088012 */ lui $t0, %hi(D_8011D534) # $t0, 0x8012 -/* 048F14 80048314 8D08D534 */ lw $t0, %lo(D_8011D534)($t0) +/* 048F10 80048310 3C088012 */ lui $t0, %hi(gCurrentStickX) # $t0, 0x8012 +/* 048F14 80048314 8D08D534 */ lw $t0, %lo(gCurrentStickX)($t0) /* 048F18 80048318 00000000 */ nop /* 048F1C 8004831C 0008C040 */ sll $t8, $t0, 1 /* 048F20 80048320 03004025 */ move $t0, $t8 @@ -2262,8 +2262,8 @@ glabel func_80046524 /* 049180 80048580 34018010 */ li $at, 32784 /* 049184 80048584 330D8010 */ andi $t5, $t8, 0x8010 /* 049188 80048588 15A10011 */ bne $t5, $at, .L800485D0 -/* 04918C 8004858C 3C028012 */ lui $v0, %hi(D_8011D534) # $v0, 0x8012 -/* 049190 80048590 8C42D534 */ lw $v0, %lo(D_8011D534)($v0) +/* 04918C 8004858C 3C028012 */ lui $v0, %hi(gCurrentStickX) # $v0, 0x8012 +/* 049190 80048590 8C42D534 */ lw $v0, %lo(gCurrentStickX)($v0) /* 049194 80048594 02202025 */ move $a0, $s1 /* 049198 80048598 2841FFE2 */ slti $at, $v0, -0x1e /* 04919C 8004859C 14200004 */ bnez $at, .L800485B0 @@ -2531,10 +2531,10 @@ glabel func_80046524 /* 049570 80048970 1580002B */ bnez $t4, .L80048A20 /* 049574 80048974 24060004 */ li $a2, 4 /* 049578 80048978 820B01E5 */ lb $t3, 0x1e5($s0) -/* 04957C 8004897C 3C088012 */ lui $t0, %hi(D_8011D538) # $t0, 0x8012 +/* 04957C 8004897C 3C088012 */ lui $t0, %hi(gCurrentStickY) # $t0, 0x8012 /* 049580 80048980 15600027 */ bnez $t3, .L80048A20 /* 049584 80048984 34018001 */ li $at, 32769 -/* 049588 80048988 8D08D538 */ lw $t0, %lo(D_8011D538)($t0) +/* 049588 80048988 8D08D538 */ lw $t0, %lo(gCurrentStickY)($t0) /* 04958C 8004898C 86240002 */ lh $a0, 2($s1) /* 049590 80048990 00084023 */ negu $t0, $t0 /* 049594 80048994 00087180 */ sll $t6, $t0, 6 @@ -2698,7 +2698,7 @@ glabel func_80046524 /* 0497D4 80048BD4 C7AA0118 */ lwc1 $f10, 0x118($sp) /* 0497D8 80048BD8 3C01800E */ lui $at, %hi(D_800E6468) # $at, 0x800e /* 0497DC 80048BDC 460A303C */ c.lt.s $f6, $f10 -/* 0497E0 80048BE0 3C0C8012 */ lui $t4, %hi(D_8011D534) # $t4, 0x8012 +/* 0497E0 80048BE0 3C0C8012 */ lui $t4, %hi(gCurrentStickX) # $t4, 0x8012 /* 0497E4 80048BE4 45000004 */ bc1f .L80048BF8 /* 0497E8 80048BE8 00000000 */ nop /* 0497EC 80048BEC C4246468 */ lwc1 $f4, %lo(D_800E6468)($at) @@ -2712,7 +2712,7 @@ glabel func_80046524 /* 049808 80048C08 1541000F */ bne $t2, $at, .L80048C48 /* 04980C 80048C0C 8FA7012C */ lw $a3, 0x12c($sp) /* 049810 80048C10 8C620004 */ lw $v0, 4($v1) -/* 049814 80048C14 8D8CD534 */ lw $t4, %lo(D_8011D534)($t4) +/* 049814 80048C14 8D8CD534 */ lw $t4, %lo(gCurrentStickX)($t4) /* 049818 80048C18 804F003A */ lb $t7, 0x3a($v0) /* 04981C 80048C1C 000C5880 */ sll $t3, $t4, 2 /* 049820 80048C20 25F80001 */ addiu $t8, $t7, 1 diff --git a/asm/non_matchings/racer/func_800494E0.s b/asm/non_matchings/racer/func_800494E0.s index e0e4126e..a3486f5c 100644 --- a/asm/non_matchings/racer/func_800494E0.s +++ b/asm/non_matchings/racer/func_800494E0.s @@ -91,7 +91,7 @@ glabel func_800494E0 /* 04A224 80049624 27A40048 */ addiu $a0, $sp, 0x48 /* 04A228 80049628 C60C0000 */ lwc1 $f12, ($s0) /* 04A22C 8004962C C60E0004 */ lwc1 $f14, 4($s0) -/* 04A230 80049630 0C01C1D4 */ jal func_80070750 +/* 04A230 80049630 0C01C1D4 */ jal atan2f /* 04A234 80049634 00000000 */ nop /* 04A238 80049638 00026400 */ sll $t4, $v0, 0x10 /* 04A23C 8004963C 000C6C03 */ sra $t5, $t4, 0x10 @@ -135,15 +135,15 @@ glabel func_800494E0 /* 04A2CC 800496CC A4AF01A4 */ sh $t7, 0x1a4($a1) /* 04A2D0 800496D0 C60E0004 */ lwc1 $f14, 4($s0) /* 04A2D4 800496D4 C60C0008 */ lwc1 $f12, 8($s0) -/* 04A2D8 800496D8 0C01C1D4 */ jal func_80070750 +/* 04A2D8 800496D8 0C01C1D4 */ jal atan2f /* 04A2DC 800496DC E7A20044 */ swc1 $f2, 0x44($sp) /* 04A2E0 800496E0 0002CC00 */ sll $t9, $v0, 0x10 /* 04A2E4 800496E4 0019C403 */ sra $t8, $t9, 0x10 /* 04A2E8 800496E8 44988000 */ mtc1 $t8, $f16 /* 04A2EC 800496EC C7A20044 */ lwc1 $f2, 0x44($sp) /* 04A2F0 800496F0 468082A0 */ cvt.s.w $f10, $f16 -/* 04A2F4 800496F4 3C0A8012 */ lui $t2, %hi(D_8011D538) # $t2, 0x8012 -/* 04A2F8 800496F8 8D4AD538 */ lw $t2, %lo(D_8011D538)($t2) +/* 04A2F4 800496F4 3C0A8012 */ lui $t2, %hi(gCurrentStickY) # $t2, 0x8012 +/* 04A2F8 800496F8 8D4AD538 */ lw $t2, %lo(gCurrentStickY)($t2) /* 04A2FC 800496FC 46025182 */ mul.s $f6, $f10, $f2 /* 04A300 80049700 000A5823 */ negu $t3, $t2 /* 04A304 80049704 000B6140 */ sll $t4, $t3, 5 diff --git a/asm/non_matchings/racer/func_80049794.s b/asm/non_matchings/racer/func_80049794.s index 2241f49f..a7f769c8 100644 --- a/asm/non_matchings/racer/func_80049794.s +++ b/asm/non_matchings/racer/func_80049794.s @@ -232,16 +232,16 @@ glabel func_80049794 /* 04A62C 80049A2C 462C903C */ c.lt.d $f18, $f12 /* 04A630 80049A30 44802000 */ mtc1 $zero, $f4 /* 04A634 80049A34 45010007 */ bc1t .L80049A54 -/* 04A638 80049A38 3C088012 */ lui $t0, %hi(D_8011D538) # $t0, 0x8012 -/* 04A63C 80049A3C 2508D538 */ addiu $t0, %lo(D_8011D538) # addiu $t0, $t0, -0x2ac8 +/* 04A638 80049A38 3C088012 */ lui $t0, %hi(gCurrentStickY) # $t0, 0x8012 +/* 04A63C 80049A3C 2508D538 */ addiu $t0, %lo(gCurrentStickY) # addiu $t0, $t0, -0x2ac8 /* 04A640 80049A40 8D0B0000 */ lw $t3, ($t0) /* 04A644 80049A44 00000000 */ nop /* 04A648 80049A48 2961FFF6 */ slti $at, $t3, -0xa /* 04A64C 80049A4C 10200005 */ beqz $at, .L80049A64 /* 04A650 80049A50 3C014100 */ lui $at, 0x4100 .L80049A54: -/* 04A654 80049A54 3C088012 */ lui $t0, %hi(D_8011D538) # $t0, 0x8012 -/* 04A658 80049A58 2508D538 */ addiu $t0, %lo(D_8011D538) # addiu $t0, $t0, -0x2ac8 +/* 04A654 80049A54 3C088012 */ lui $t0, %hi(gCurrentStickY) # $t0, 0x8012 +/* 04A658 80049A58 2508D538 */ addiu $t0, %lo(gCurrentStickY) # addiu $t0, $t0, -0x2ac8 /* 04A65C 80049A5C A20001E6 */ sb $zero, 0x1e6($s0) /* 04A660 80049A60 3C014100 */ li $at, 0x41000000 # 8.000000 .L80049A64: @@ -287,13 +287,13 @@ glabel func_80049794 /* 04A6F4 80049AF4 3C018012 */ lui $at, %hi(D_8011D558) # $at, 0x8012 /* 04A6F8 80049AF8 AC20D558 */ sw $zero, %lo(D_8011D558)($at) /* 04A6FC 80049AFC C624000C */ lwc1 $f4, 0xc($s1) -/* 04A700 80049B00 3C088012 */ lui $t0, %hi(D_8011D538) # $t0, 0x8012 +/* 04A700 80049B00 3C088012 */ lui $t0, %hi(gCurrentStickY) # $t0, 0x8012 /* 04A704 80049B04 E7A400E8 */ swc1 $f4, 0xe8($sp) /* 04A708 80049B08 C6260010 */ lwc1 $f6, 0x10($s1) -/* 04A70C 80049B0C 2508D538 */ addiu $t0, %lo(D_8011D538) # addiu $t0, $t0, -0x2ac8 +/* 04A70C 80049B0C 2508D538 */ addiu $t0, %lo(gCurrentStickY) # addiu $t0, $t0, -0x2ac8 /* 04A710 80049B10 E7A600E4 */ swc1 $f6, 0xe4($sp) /* 04A714 80049B14 C6280014 */ lwc1 $f8, 0x14($s1) -/* 04A718 80049B18 3C0E8012 */ lui $t6, %hi(D_8011D534) # $t6, 0x8012 +/* 04A718 80049B18 3C0E8012 */ lui $t6, %hi(gCurrentStickX) # $t6, 0x8012 /* 04A71C 80049B1C E7A800E0 */ swc1 $f8, 0xe0($sp) /* 04A720 80049B20 820D01E0 */ lb $t5, 0x1e0($s0) /* 04A724 80049B24 00000000 */ nop @@ -306,7 +306,7 @@ glabel func_80049794 /* 04A73C 80049B3C 46008086 */ mov.s $f2, $f16 /* 04A740 80049B40 820501E1 */ lb $a1, 0x1e1($s0) .L80049B44: -/* 04A744 80049B44 8DCED534 */ lw $t6, %lo(D_8011D534)($t6) +/* 04A744 80049B44 8DCED534 */ lw $t6, %lo(gCurrentStickX)($t6) /* 04A748 80049B48 C7A400FC */ lwc1 $f4, 0xfc($sp) /* 04A74C 80049B4C 01C51023 */ subu $v0, $t6, $a1 /* 04A750 80049B50 44825000 */ mtc1 $v0, $f10 @@ -468,8 +468,8 @@ glabel func_80049794 /* 04A994 80049D94 332B4000 */ andi $t3, $t9, 0x4000 /* 04A998 80049D98 11600038 */ beqz $t3, .L80049E7C /* 04A99C 80049D9C E7B200C8 */ swc1 $f18, 0xc8($sp) -/* 04A9A0 80049DA0 3C0C8012 */ lui $t4, %hi(D_8011D538) # $t4, 0x8012 -/* 04A9A4 80049DA4 8D8CD538 */ lw $t4, %lo(D_8011D538)($t4) +/* 04A9A0 80049DA0 3C0C8012 */ lui $t4, %hi(gCurrentStickY) # $t4, 0x8012 +/* 04A9A4 80049DA4 8D8CD538 */ lw $t4, %lo(gCurrentStickY)($t4) /* 04A9A8 80049DA8 00000000 */ nop /* 04A9AC 80049DAC 2981FFD8 */ slti $at, $t4, -0x28 /* 04A9B0 80049DB0 14200007 */ bnez $at, .L80049DD0 @@ -704,8 +704,8 @@ glabel func_80049794 /* 04AD18 8004A118 460051A1 */ cvt.d.s $f6, $f10 /* 04AD1C 8004A11C 00000000 */ nop /* 04AD20 8004A120 46243203 */ div.d $f8, $f6, $f4 -/* 04AD24 8004A124 3C098012 */ lui $t1, %hi(D_8011D538) # $t1, 0x8012 -/* 04AD28 8004A128 2529D538 */ addiu $t1, %lo(D_8011D538) # addiu $t1, $t1, -0x2ac8 +/* 04AD24 8004A124 3C098012 */ lui $t1, %hi(gCurrentStickY) # $t1, 0x8012 +/* 04AD28 8004A128 2529D538 */ addiu $t1, %lo(gCurrentStickY) # addiu $t1, $t1, -0x2ac8 /* 04AD2C 8004A12C 8D2E0000 */ lw $t6, ($t1) /* 04AD30 8004A130 4600A4A1 */ cvt.d.s $f18, $f20 /* 04AD34 8004A134 44803000 */ mtc1 $zero, $f6 @@ -730,9 +730,9 @@ glabel func_80049794 .L8004A178: /* 04AD78 8004A178 C602002C */ lwc1 $f2, 0x2c($s0) /* 04AD7C 8004A17C 44809000 */ mtc1 $zero, $f18 -/* 04AD80 8004A180 3C098012 */ lui $t1, %hi(D_8011D538) # $t1, 0x8012 +/* 04AD80 8004A180 3C098012 */ lui $t1, %hi(gCurrentStickY) # $t1, 0x8012 /* 04AD84 8004A184 4612103C */ c.lt.s $f2, $f18 -/* 04AD88 8004A188 2529D538 */ addiu $t1, %lo(D_8011D538) # addiu $t1, $t1, -0x2ac8 +/* 04AD88 8004A188 2529D538 */ addiu $t1, %lo(gCurrentStickY) # addiu $t1, $t1, -0x2ac8 /* 04AD8C 8004A18C 45000002 */ bc1f .L8004A198 /* 04AD90 8004A190 46001386 */ mov.s $f14, $f2 /* 04AD94 8004A194 46007387 */ neg.s $f14, $f14 @@ -896,11 +896,11 @@ glabel func_80049794 /* 04AFE4 8004A3E4 86040000 */ lh $a0, ($s0) /* 04AFE8 8004A3E8 0C01C8D2 */ jal func_80072348 /* 04AFEC 8004A3EC 24050008 */ li $a1, 8 -/* 04AFF0 8004A3F0 3C098012 */ lui $t1, %hi(D_8011D538) # $t1, 0x8012 +/* 04AFF0 8004A3F0 3C098012 */ lui $t1, %hi(gCurrentStickY) # $t1, 0x8012 /* 04AFF4 8004A3F4 C7A10048 */ lwc1 $f1, 0x48($sp) /* 04AFF8 8004A3F8 C7A0004C */ lwc1 $f0, 0x4c($sp) /* 04AFFC 8004A3FC C7AE00DC */ lwc1 $f14, 0xdc($sp) -/* 04B000 8004A400 2529D538 */ addiu $t1, %lo(D_8011D538) # addiu $t1, $t1, -0x2ac8 +/* 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 @@ -1033,9 +1033,9 @@ glabel func_80049794 /* 04B1E0 8004A5E0 45010021 */ bc1t .L8004A668 /* 04B1E4 8004A5E4 3C01BF80 */ li $at, 0xBF800000 # -1.000000 /* 04B1E8 8004A5E8 44810000 */ mtc1 $at, $f0 -/* 04B1EC 8004A5EC 3C018012 */ lui $at, %hi(D_8011D538) # $at, 0x8012 +/* 04B1EC 8004A5EC 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 /* 04B1F0 8004A5F0 240BFFC4 */ li $t3, -60 -/* 04B1F4 8004A5F4 AC2BD538 */ sw $t3, %lo(D_8011D538)($at) +/* 04B1F4 8004A5F4 AC2BD538 */ sw $t3, %lo(gCurrentStickY)($at) /* 04B1F8 8004A5F8 3C0141A0 */ li $at, 0x41A00000 # 20.000000 /* 04B1FC 8004A5FC 44813000 */ mtc1 $at, $f6 /* 04B200 8004A600 C60800C0 */ lwc1 $f8, 0xc0($s0) @@ -1669,7 +1669,7 @@ glabel func_80049794 /* 04BB00 8004AF00 8D8CD55C */ lw $t4, %lo(D_8011D55C)($t4) /* 04BB04 8004AF04 2401FFFF */ li $at, -1 /* 04BB08 8004AF08 11810025 */ beq $t4, $at, .L8004AFA0 -/* 04BB0C 8004AF0C 3C088012 */ lui $t0, %hi(D_8011D534) # $t0, 0x8012 +/* 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 /* 04BB18 8004AF18 15600021 */ bnez $t3, .L8004AFA0 @@ -1708,7 +1708,7 @@ glabel func_80049794 /* 04BB98 8004AF98 1000002E */ b .L8004B054 /* 04BB9C 8004AF9C A61801A0 */ sh $t8, 0x1a0($s0) .L8004AFA0: -/* 04BBA0 8004AFA0 8D08D534 */ lw $t0, %lo(D_8011D534)($t0) +/* 04BBA0 8004AFA0 8D08D534 */ lw $t0, %lo(gCurrentStickX)($t0) /* 04BBA4 8004AFA4 8FAB00F8 */ lw $t3, 0xf8($sp) /* 04BBA8 8004AFA8 0008C880 */ sll $t9, $t0, 2 /* 04BBAC 8004AFAC 032B0019 */ multu $t9, $t3 @@ -1806,8 +1806,8 @@ glabel func_80049794 /* 04BD04 8004B104 03201025 */ move $v0, $t9 .L8004B108: /* 04BD08 8004B108 8DEFD55C */ lw $t7, %lo(D_8011D55C)($t7) -/* 04BD0C 8004B10C 3C088012 */ lui $t0, %hi(D_8011D538) # $t0, 0x8012 -/* 04BD10 8004B110 8D08D538 */ lw $t0, %lo(D_8011D538)($t0) +/* 04BD0C 8004B10C 3C088012 */ lui $t0, %hi(gCurrentStickY) # $t0, 0x8012 +/* 04BD10 8004B110 8D08D538 */ lw $t0, %lo(gCurrentStickY)($t0) /* 04BD14 8004B114 2401FFFF */ li $at, -1 /* 04BD18 8004B118 11E10007 */ beq $t7, $at, .L8004B138 /* 04BD1C 8004B11C 00000000 */ nop @@ -1917,17 +1917,17 @@ glabel func_80049794 /* 04BEA8 8004B2A8 45000020 */ bc1f .L8004B32C /* 04BEAC 8004B2AC 00000000 */ nop /* 04BEB0 8004B2B0 821901E5 */ lb $t9, 0x1e5($s0) -/* 04BEB4 8004B2B4 3C028012 */ lui $v0, %hi(D_8011D534) # $v0, 0x8012 +/* 04BEB4 8004B2B4 3C028012 */ lui $v0, %hi(gCurrentStickX) # $v0, 0x8012 /* 04BEB8 8004B2B8 1720001C */ bnez $t9, .L8004B32C -/* 04BEBC 8004B2BC 3C0B8012 */ lui $t3, %hi(D_8011D538) # $t3, 0x8012 -/* 04BEC0 8004B2C0 8C42D534 */ lw $v0, %lo(D_8011D534)($v0) +/* 04BEBC 8004B2BC 3C0B8012 */ lui $t3, %hi(gCurrentStickY) # $t3, 0x8012 +/* 04BEC0 8004B2C0 8C42D534 */ lw $v0, %lo(gCurrentStickX)($v0) /* 04BEC4 8004B2C4 240FFFFF */ li $t7, -1 /* 04BEC8 8004B2C8 28410029 */ slti $at, $v0, 0x29 /* 04BECC 8004B2CC 14200005 */ bnez $at, .L8004B2E4 /* 04BED0 8004B2D0 240D0001 */ li $t5, 1 /* 04BED4 8004B2D4 A20F01E0 */ sb $t7, 0x1e0($s0) -/* 04BED8 8004B2D8 3C028012 */ lui $v0, %hi(D_8011D534) # $v0, 0x8012 -/* 04BEDC 8004B2DC 8C42D534 */ lw $v0, %lo(D_8011D534)($v0) +/* 04BED8 8004B2D8 3C028012 */ lui $v0, %hi(gCurrentStickX) # $v0, 0x8012 +/* 04BEDC 8004B2DC 8C42D534 */ lw $v0, %lo(gCurrentStickX)($v0) /* 04BEE0 8004B2E0 00000000 */ nop .L8004B2E4: /* 04BEE4 8004B2E4 2841FFD8 */ slti $at, $v0, -0x28 @@ -1935,7 +1935,7 @@ glabel func_80049794 /* 04BEEC 8004B2EC 00000000 */ nop /* 04BEF0 8004B2F0 A20D01E0 */ sb $t5, 0x1e0($s0) .L8004B2F4: -/* 04BEF4 8004B2F4 8D6BD538 */ lw $t3, %lo(D_8011D538)($t3) +/* 04BEF4 8004B2F4 8D6BD538 */ lw $t3, %lo(gCurrentStickY)($t3) /* 04BEF8 8004B2F8 00000000 */ nop /* 04BEFC 8004B2FC 29610029 */ slti $at, $t3, 0x29 /* 04BF00 8004B300 14200003 */ bnez $at, .L8004B310 diff --git a/asm/non_matchings/racer/func_8004CC20.s b/asm/non_matchings/racer/func_8004CC20.s index 0ec9b238..39526a75 100644 --- a/asm/non_matchings/racer/func_8004CC20.s +++ b/asm/non_matchings/racer/func_8004CC20.s @@ -53,16 +53,16 @@ glabel func_8004CC20 /* 04D8B4 8004CCB4 3C018012 */ lui $at, %hi(D_8011D558) # $at, 0x8012 /* 04D8B8 8004CCB8 AC20D558 */ sw $zero, %lo(D_8011D558)($at) /* 04D8BC 8004CCBC C624000C */ lwc1 $f4, 0xc($s1) -/* 04D8C0 8004CCC0 3C188012 */ lui $t8, %hi(D_8011D534) # $t8, 0x8012 +/* 04D8C0 8004CCC0 3C188012 */ lui $t8, %hi(gCurrentStickX) # $t8, 0x8012 /* 04D8C4 8004CCC4 E7A400B8 */ swc1 $f4, 0xb8($sp) /* 04D8C8 8004CCC8 C6260010 */ lwc1 $f6, 0x10($s1) -/* 04D8CC 8004CCCC 8F18D534 */ lw $t8, %lo(D_8011D534)($t8) +/* 04D8CC 8004CCCC 8F18D534 */ lw $t8, %lo(gCurrentStickX)($t8) /* 04D8D0 8004CCD0 E7A600B4 */ swc1 $f6, 0xb4($sp) /* 04D8D4 8004CCD4 C6280014 */ lwc1 $f8, 0x14($s1) /* 04D8D8 8004CCD8 8FA800D8 */ lw $t0, 0xd8($sp) /* 04D8DC 8004CCDC E7A800B0 */ swc1 $f8, 0xb0($sp) /* 04D8E0 8004CCE0 820401E1 */ lb $a0, 0x1e1($s0) -/* 04D8E4 8004CCE4 3C0C8012 */ lui $t4, %hi(D_8011D538) # $t4, 0x8012 +/* 04D8E4 8004CCE4 3C0C8012 */ lui $t4, %hi(gCurrentStickY) # $t4, 0x8012 /* 04D8E8 8004CCE8 03041823 */ subu $v1, $t8, $a0 /* 04D8EC 8004CCEC 00680019 */ multu $v1, $t0 /* 04D8F0 8004CCF0 02002825 */ move $a1, $s0 @@ -83,7 +83,7 @@ glabel func_8004CC20 /* 04D924 8004CD24 00865821 */ addu $t3, $a0, $a2 .L8004CD28: /* 04D928 8004CD28 A20B01E1 */ sb $t3, 0x1e1($s0) -/* 04D92C 8004CD2C 8D8CD538 */ lw $t4, %lo(D_8011D538)($t4) +/* 04D92C 8004CD2C 8D8CD538 */ lw $t4, %lo(gCurrentStickY)($t4) /* 04D930 8004CD30 820701E8 */ lb $a3, 0x1e8($s0) /* 04D934 8004CD34 02202025 */ move $a0, $s1 /* 04D938 8004CD38 01871823 */ subu $v1, $t4, $a3 diff --git a/asm/non_matchings/racer/func_8004DE38.s b/asm/non_matchings/racer/func_8004DE38.s index bbbcf797..e75a9308 100644 --- a/asm/non_matchings/racer/func_8004DE38.s +++ b/asm/non_matchings/racer/func_8004DE38.s @@ -590,25 +590,25 @@ glabel func_8004DE38 /* 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(D_8011D534) # $at, 0x8012 +/* 04F26C 8004E66C 3C018012 */ lui $at, %hi(gCurrentStickX) # $at, 0x8012 /* 04F270 8004E670 0C0270C3 */ jal get_filtered_cheats -/* 04F274 8004E674 AC22D534 */ sw $v0, %lo(D_8011D534)($at) +/* 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(D_8011D534) # $t8, 0x8012 -/* 04F28C 8004E68C 8F18D534 */ lw $t8, %lo(D_8011D534)($t8) -/* 04F290 8004E690 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 +/* 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(D_8011D534)($at) +/* 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(D_8011D538) # $at, 0x8012 +/* 04F2A8 8004E6A8 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 /* 04F2AC 8004E6AC 0C01A94A */ jal get_buttons_held_from_player -/* 04F2B0 8004E6B0 AC22D538 */ sw $v0, %lo(D_8011D538)($at) +/* 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 @@ -663,10 +663,10 @@ glabel func_8004DE38 /* 04F370 8004E770 00000000 */ nop /* 04F374 8004E774 1840000C */ blez $v0, .L8004E7A8 .L8004E778: -/* 04F378 8004E778 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 -/* 04F37C 8004E77C AC20D534 */ sw $zero, %lo(D_8011D534)($at) -/* 04F380 8004E780 3C018012 */ lui $at, %hi(D_8011D538) # $at, 0x8012 -/* 04F384 8004E784 AC20D538 */ sw $zero, %lo(D_8011D538)($at) +/* 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 @@ -732,13 +732,13 @@ glabel func_8004DE38 /* 04F470 8004E870 24050050 */ li $a1, 80 /* 04F474 8004E874 A20201D1 */ sb $v0, 0x1d1($s0) .L8004E878: -/* 04F478 8004E878 3C0E8012 */ lui $t6, %hi(D_8011D534) # $t6, 0x8012 -/* 04F47C 8004E87C 8DCED534 */ lw $t6, %lo(D_8011D534)($t6) +/* 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(D_8011D534) # $at, 0x8012 +/* 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(D_8011D534)($at) +/* 04F490 8004E890 AC28D534 */ sw $t0, %lo(gCurrentStickX)($at) .L8004E894: /* 04F494 8004E894 A600018A */ sh $zero, 0x18a($s0) .L8004E898: @@ -766,10 +766,10 @@ glabel func_8004DE38 /* 04F4E8 8004E8E8 24010008 */ li $at, 8 /* 04F4EC 8004E8EC 14410006 */ bne $v0, $at, .L8004E908 .L8004E8F0: -/* 04F4F0 8004E8F0 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 -/* 04F4F4 8004E8F4 AC20D534 */ sw $zero, %lo(D_8011D534)($at) -/* 04F4F8 8004E8F8 3C018012 */ lui $at, %hi(D_8011D538) # $at, 0x8012 -/* 04F4FC 8004E8FC AC20D538 */ sw $zero, %lo(D_8011D538)($at) +/* 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: @@ -1020,10 +1020,10 @@ glabel L8004EC50 /* 04F88C 8004EC8C 820A0175 */ lb $t2, 0x175($s0) glabel L8004EC90 /* 04F890 8004EC90 3C188012 */ lui $t8, %hi(gCurrentCarInput) # $t8, 0x8012 -/* 04F894 8004EC94 3C198012 */ lui $t9, %hi(D_8011D534) # $t9, 0x8012 +/* 04F894 8004EC94 3C198012 */ lui $t9, %hi(gCurrentStickX) # $t9, 0x8012 /* 04F898 8004EC98 3C0A8012 */ lui $t2, %hi(D_8011D540) # $t2, 0x8012 /* 04F89C 8004EC9C 254AD540 */ addiu $t2, %lo(D_8011D540) # addiu $t2, $t2, -0x2ac0 -/* 04F8A0 8004ECA0 2739D534 */ addiu $t9, %lo(D_8011D534) # addiu $t9, $t9, -0x2acc +/* 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) diff --git a/asm/non_matchings/racer/func_8004F7F4.s b/asm/non_matchings/racer/func_8004F7F4.s index fe13d6f4..d26a00f2 100644 --- a/asm/non_matchings/racer/func_8004F7F4.s +++ b/asm/non_matchings/racer/func_8004F7F4.s @@ -130,8 +130,8 @@ glabel func_8004F7F4 /* 050594 8004F994 10400068 */ beqz $v0, .L8004FB38 /* 050598 8004F998 00000000 */ nop /* 05059C 8004F99C 04410013 */ bgez $v0, .L8004F9EC -/* 0505A0 8004F9A0 3C068012 */ lui $a2, %hi(D_8011D534) # $a2, 0x8012 -/* 0505A4 8004F9A4 24C6D534 */ addiu $a2, %lo(D_8011D534) # addiu $a2, $a2, -0x2acc +/* 0505A0 8004F9A0 3C068012 */ lui $a2, %hi(gCurrentStickX) # $a2, 0x8012 +/* 0505A4 8004F9A4 24C6D534 */ addiu $a2, %lo(gCurrentStickX) # addiu $a2, $a2, -0x2acc /* 0505A8 8004F9A8 8CC90000 */ lw $t1, ($a2) /* 0505AC 8004F9AC 8FAB00C0 */ lw $t3, 0xc0($sp) /* 0505B0 8004F9B0 2921001A */ slti $at, $t1, 0x1a @@ -150,9 +150,9 @@ glabel func_8004F7F4 /* 0505E4 8004F9E4 10000019 */ b .L8004FA4C /* 0505E8 8004F9E8 44825000 */ mtc1 $v0, $f10 .L8004F9EC: -/* 0505EC 8004F9EC 3C068012 */ lui $a2, %hi(D_8011D534) # $a2, 0x8012 +/* 0505EC 8004F9EC 3C068012 */ lui $a2, %hi(gCurrentStickX) # $a2, 0x8012 /* 0505F0 8004F9F0 18400012 */ blez $v0, .L8004FA3C -/* 0505F4 8004F9F4 24C6D534 */ addiu $a2, %lo(D_8011D534) # addiu $a2, $a2, -0x2acc +/* 0505F4 8004F9F4 24C6D534 */ addiu $a2, %lo(gCurrentStickX) # addiu $a2, $a2, -0x2acc /* 0505F8 8004F9F8 8CCD0000 */ lw $t5, ($a2) /* 0505FC 8004F9FC 8FAF00C0 */ lw $t7, 0xc0($sp) /* 050600 8004FA00 29A1FFE7 */ slti $at, $t5, -0x19 @@ -200,9 +200,9 @@ glabel func_8004F7F4 /* 050698 8004FA98 0C015C12 */ jal func_80057048 /* 05069C 8004FA9C 2405001C */ li $a1, 28 /* 0506A0 8004FAA0 821901E6 */ lb $t9, 0x1e6($s0) -/* 0506A4 8004FAA4 3C068012 */ lui $a2, %hi(D_8011D534) # $a2, 0x8012 +/* 0506A4 8004FAA4 3C068012 */ lui $a2, %hi(gCurrentStickX) # $a2, 0x8012 /* 0506A8 8004FAA8 00194023 */ negu $t0, $t9 -/* 0506AC 8004FAAC 24C6D534 */ addiu $a2, %lo(D_8011D534) # addiu $a2, $a2, -0x2acc +/* 0506AC 8004FAAC 24C6D534 */ addiu $a2, %lo(gCurrentStickX) # addiu $a2, $a2, -0x2acc /* 0506B0 8004FAB0 A20801DB */ sb $t0, 0x1db($s0) /* 0506B4 8004FAB4 A20001E6 */ sb $zero, 0x1e6($s0) .L8004FAB8: diff --git a/asm/non_matchings/racer/func_80050A28.s b/asm/non_matchings/racer/func_80050A28.s index 90dfc3a0..3e2fe637 100644 --- a/asm/non_matchings/racer/func_80050A28.s +++ b/asm/non_matchings/racer/func_80050A28.s @@ -260,8 +260,8 @@ glabel func_80050A28 /* 051948 80050D48 8FA70078 */ lw $a3, 0x78($sp) /* 05194C 80050D4C 2508D528 */ addiu $t0, %lo(gCurrentCarInput) # addiu $t0, $t0, -0x2ad8 .L80050D50: -/* 051950 80050D50 3C098012 */ lui $t1, %hi(D_8011D534) # $t1, 0x8012 -/* 051954 80050D54 2529D534 */ addiu $t1, %lo(D_8011D534) # addiu $t1, $t1, -0x2acc +/* 051950 80050D50 3C098012 */ lui $t1, %hi(gCurrentStickX) # $t1, 0x8012 +/* 051954 80050D54 2529D534 */ addiu $t1, %lo(gCurrentStickX) # addiu $t1, $t1, -0x2acc /* 051958 80050D58 8D390000 */ lw $t9, ($t1) /* 05195C 80050D5C 820A01D1 */ lb $t2, 0x1d1($s0) /* 051960 80050D60 00000000 */ nop @@ -269,9 +269,9 @@ glabel func_80050A28 /* 051968 80050D68 AD2B0000 */ sw $t3, ($t1) .L80050D6C: /* 05196C 80050D6C 820401FA */ lb $a0, 0x1fa($s0) -/* 051970 80050D70 3C098012 */ lui $t1, %hi(D_8011D534) # $t1, 0x8012 +/* 051970 80050D70 3C098012 */ lui $t1, %hi(gCurrentStickX) # $t1, 0x8012 /* 051974 80050D74 14800020 */ bnez $a0, .L80050DF8 -/* 051978 80050D78 2529D534 */ addiu $t1, %lo(D_8011D534) # addiu $t1, $t1, -0x2acc +/* 051978 80050D78 2529D534 */ addiu $t1, %lo(gCurrentStickX) # addiu $t1, $t1, -0x2acc /* 05197C 80050D7C C60A002C */ lwc1 $f10, 0x2c($s0) /* 051980 80050D80 3C014000 */ li $at, 0x40000000 # 2.000000 /* 051984 80050D84 44812800 */ mtc1 $at, $f5 @@ -317,9 +317,9 @@ glabel func_80050A28 /* 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) -/* 051A24 80050E24 3C018012 */ lui $at, %hi(D_8011D538) # $at, 0x8012 +/* 051A24 80050E24 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 /* 051A28 80050E28 240CFFBA */ li $t4, -70 -/* 051A2C 80050E2C AC2CD538 */ sw $t4, %lo(D_8011D538)($at) +/* 051A2C 80050E2C AC2CD538 */ sw $t4, %lo(gCurrentStickY)($at) /* 051A30 80050E30 240D0001 */ li $t5, 1 /* 051A34 80050E34 29C10003 */ slti $at, $t6, 3 /* 051A38 80050E38 10200006 */ beqz $at, .L80050E54 @@ -465,12 +465,12 @@ glabel func_80050A28 /* 051C34 80051034 820401E6 */ lb $a0, 0x1e6($s0) /* 051C38 80051038 3C01800E */ lui $at, %hi(D_800E6648 + 4) # $at, 0x800e /* 051C3C 8005103C 10800015 */ beqz $a0, .L80051094 -/* 051C40 80051040 3C198012 */ lui $t9, %hi(D_8011D534) # $t9, 0x8012 +/* 051C40 80051040 3C198012 */ lui $t9, %hi(gCurrentStickX) # $t9, 0x8012 /* 051C44 80051044 C4296648 */ lwc1 $f9, %lo(D_800E6648)($at) /* 051C48 80051048 C428664C */ lwc1 $f8, %lo(D_800E6648 + 4)($at) /* 051C4C 8005104C 46000121 */ cvt.d.s $f4, $f0 /* 051C50 80051050 46282182 */ mul.d $f6, $f4, $f8 -/* 051C54 80051054 8F39D534 */ lw $t9, %lo(D_8011D534)($t9) +/* 051C54 80051054 8F39D534 */ lw $t9, %lo(gCurrentStickX)($t9) /* 051C58 80051058 00045900 */ sll $t3, $a0, 4 /* 051C5C 8005105C 01645823 */ subu $t3, $t3, $a0 /* 051C60 80051060 000B5840 */ sll $t3, $t3, 1 @@ -917,10 +917,10 @@ glabel func_80050A28 /* 0522B0 800516B0 1700001B */ bnez $t8, .L80051720 /* 0522B4 800516B4 00000000 */ nop /* 0522B8 800516B8 820A01D8 */ lb $t2, 0x1d8($s0) -/* 0522BC 800516BC 3C0B8012 */ lui $t3, %hi(D_8011D534) # $t3, 0x8012 +/* 0522BC 800516BC 3C0B8012 */ lui $t3, %hi(gCurrentStickX) # $t3, 0x8012 /* 0522C0 800516C0 15400017 */ bnez $t2, .L80051720 /* 0522C4 800516C4 00000000 */ nop -/* 0522C8 800516C8 8D6BD534 */ lw $t3, %lo(D_8011D534)($t3) +/* 0522C8 800516C8 8D6BD534 */ lw $t3, %lo(gCurrentStickX)($t3) /* 0522CC 800516CC 82190003 */ lb $t9, 3($s0) /* 0522D0 800516D0 448B9000 */ mtc1 $t3, $f18 /* 0522D4 800516D4 00196080 */ sll $t4, $t9, 2 @@ -1399,7 +1399,7 @@ glabel func_80050A28 /* 0529C8 80051DC8 860F0000 */ lh $t7, ($s0) /* 0529CC 80051DCC 2401FFFF */ li $at, -1 /* 0529D0 80051DD0 15E10004 */ bne $t7, $at, .L80051DE4 -/* 0529D4 80051DD4 3C0A8012 */ lui $t2, %hi(D_8011D538) # $t2, 0x8012 +/* 0529D4 80051DD4 3C0A8012 */ lui $t2, %hi(gCurrentStickY) # $t2, 0x8012 /* 0529D8 80051DD8 820E0214 */ lb $t6, 0x214($s0) /* 0529DC 80051DDC 00000000 */ nop /* 0529E0 80051DE0 11C0002A */ beqz $t6, .L80051E8C @@ -1420,7 +1420,7 @@ glabel func_80050A28 /* 052A18 80051E18 46249182 */ mul.d $f6, $f18, $f4 /* 052A1C 80051E1C 46203020 */ cvt.s.d $f0, $f6 .L80051E20: -/* 052A20 80051E20 8D4AD538 */ lw $t2, %lo(D_8011D538)($t2) +/* 052A20 80051E20 8D4AD538 */ lw $t2, %lo(gCurrentStickY)($t2) /* 052A24 80051E24 00000000 */ nop /* 052A28 80051E28 2941FFE7 */ slti $at, $t2, -0x19 /* 052A2C 80051E2C 10200017 */ beqz $at, .L80051E8C diff --git a/asm/non_matchings/racer/func_80052B64.s b/asm/non_matchings/racer/func_80052B64.s index e1f821b6..11255ad7 100644 --- a/asm/non_matchings/racer/func_80052B64.s +++ b/asm/non_matchings/racer/func_80052B64.s @@ -84,10 +84,10 @@ glabel func_80052B64 /* 053888 80052C88 0461002B */ bgez $v1, .L80052D38 /* 05388C 80052C8C 00000000 */ nop /* 053890 80052C90 80ED01DB */ lb $t5, 0x1db($a3) -/* 053894 80052C94 3C0F8012 */ lui $t7, %hi(D_8011D534) # $t7, 0x8012 +/* 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(D_8011D534)($t7) +/* 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 @@ -113,10 +113,10 @@ glabel func_80052B64 /* 0538F8 80052CF8 1860000F */ blez $v1, .L80052D38 /* 0538FC 80052CFC 00000000 */ nop /* 053900 80052D00 80E901DB */ lb $t1, 0x1db($a3) -/* 053904 80052D04 3C0D8012 */ lui $t5, %hi(D_8011D534) # $t5, 0x8012 +/* 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(D_8011D534)($t5) +/* 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 @@ -135,10 +135,10 @@ glabel func_80052B64 /* 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(D_8011D534) # $at, 0x8012 +/* 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(D_8011D534)($at) +/* 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) diff --git a/asm/non_matchings/racer/func_80052D7C.s b/asm/non_matchings/racer/func_80052D7C.s index f14782ac..47e70911 100644 --- a/asm/non_matchings/racer/func_80052D7C.s +++ b/asm/non_matchings/racer/func_80052D7C.s @@ -39,8 +39,8 @@ glabel func_80052D7C /* 0539A8 80052DA8 2401FFFF */ li $at, -1 /* 0539AC 80052DAC 15E10003 */ bne $t7, $at, .L80052DBC /* 0539B0 80052DB0 2418003C */ li $t8, 60 -/* 0539B4 80052DB4 3C018012 */ lui $at, %hi(D_8011D538) # $at, 0x8012 -/* 0539B8 80052DB8 AC38D538 */ sw $t8, %lo(D_8011D538)($at) +/* 0539B4 80052DB4 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 +/* 0539B8 80052DB8 AC38D538 */ sw $t8, %lo(gCurrentStickY)($at) .L80052DBC: /* 0539BC 80052DBC 90B901F0 */ lbu $t9, 0x1f0($a1) /* 0539C0 80052DC0 00000000 */ nop @@ -49,12 +49,12 @@ glabel func_80052D7C /* 0539CC 80052DCC 84A80000 */ lh $t0, ($a1) /* 0539D0 80052DD0 2401FFFF */ li $at, -1 /* 0539D4 80052DD4 11010004 */ beq $t0, $at, .L80052DE8 -/* 0539D8 80052DD8 3C038012 */ lui $v1, %hi(D_8011D534) # $v1, 0x8012 +/* 0539D8 80052DD8 3C038012 */ lui $v1, %hi(gCurrentStickX) # $v1, 0x8012 /* 0539DC 80052DDC 80A301E1 */ lb $v1, 0x1e1($a1) /* 0539E0 80052DE0 10000004 */ b .L80052DF4 /* 0539E4 80052DE4 00034880 */ sll $t1, $v1, 2 .L80052DE8: -/* 0539E8 80052DE8 8C63D534 */ lw $v1, %lo(D_8011D534)($v1) +/* 0539E8 80052DE8 8C63D534 */ lw $v1, %lo(gCurrentStickX)($v1) /* 0539EC 80052DEC 00000000 */ nop /* 0539F0 80052DF0 00034880 */ sll $t1, $v1, 2 .L80052DF4: @@ -154,7 +154,7 @@ glabel func_80052D7C /* 053B44 80052F44 4626003C */ c.lt.d $f0, $f6 /* 053B48 80052F48 3C01C000 */ li $at, 0xC0000000 # -2.000000 /* 053B4C 80052F4C 45000004 */ bc1f .L80052F60 -/* 053B50 80052F50 3C0D8012 */ lui $t5, %hi(D_8011D538) # $t5, 0x8012 +/* 053B50 80052F50 3C0D8012 */ lui $t5, %hi(gCurrentStickY) # $t5, 0x8012 /* 053B54 80052F54 44812000 */ mtc1 $at, $f4 /* 053B58 80052F58 00000000 */ nop /* 053B5C 80052F5C E5440020 */ swc1 $f4, 0x20($t2) @@ -181,7 +181,7 @@ glabel func_80052D7C .L80052FAC: /* 053BAC 80052FAC 11C0000E */ beqz $t6, .L80052FE8 /* 053BB0 80052FB0 00000000 */ nop -/* 053BB4 80052FB4 8DADD538 */ lw $t5, %lo(D_8011D538)($t5) +/* 053BB4 80052FB4 8DADD538 */ lw $t5, %lo(gCurrentStickY)($t5) /* 053BB8 80052FB8 00000000 */ nop /* 053BBC 80052FBC 29A1FFE7 */ slti $at, $t5, -0x19 /* 053BC0 80052FC0 10200009 */ beqz $at, .L80052FE8 @@ -205,7 +205,7 @@ glabel func_80052D7C /* 053C04 80053004 C4B0002C */ lwc1 $f16, 0x2c($a1) /* 053C08 80053008 3C01800E */ lui $at, %hi(D_800E6700) # $at, 0x800e /* 053C0C 8005300C 460084A1 */ cvt.d.s $f18, $f16 -/* 053C10 80053010 3C088012 */ lui $t0, %hi(D_8011D534) # $t0, 0x8012 +/* 053C10 80053010 3C088012 */ lui $t0, %hi(gCurrentStickX) # $t0, 0x8012 /* 053C14 80053014 46209182 */ mul.d $f6, $f18, $f0 /* 053C18 80053018 462042A0 */ cvt.s.d $f10, $f8 /* 053C1C 8005301C 3C078012 */ lui $a3, %hi(D_8011D504) # $a3, 0x8012 @@ -224,7 +224,7 @@ glabel func_80052D7C /* 053C50 80053050 44812000 */ mtc1 $at, $f4 /* 053C54 80053054 462091A0 */ cvt.s.d $f6, $f18 /* 053C58 80053058 E4860020 */ swc1 $f6, 0x20($a0) -/* 053C5C 8005305C 8D08D534 */ lw $t0, %lo(D_8011D534)($t0) +/* 053C5C 8005305C 8D08D534 */ lw $t0, %lo(gCurrentStickX)($t0) /* 053C60 80053060 8FB90048 */ lw $t9, 0x48($sp) /* 053C64 80053064 80E7D504 */ lb $a3, %lo(D_8011D504)($a3) /* 053C68 80053068 AFA50044 */ sw $a1, 0x44($sp) @@ -280,7 +280,7 @@ glabel func_80052D7C /* 053D1C 8005311C 80A901D3 */ lb $t1, 0x1d3($a1) /* 053D20 80053120 3C01C034 */ li $at, 0xC0340000 # -2.812500 /* 053D24 80053124 1120000F */ beqz $t1, .L80053164 -/* 053D28 80053128 3C038012 */ lui $v1, %hi(D_8011D538) # $v1, 0x8012 +/* 053D28 80053128 3C038012 */ lui $v1, %hi(gCurrentStickY) # $v1, 0x8012 /* 053D2C 8005312C C4B2002C */ lwc1 $f18, 0x2c($a1) /* 053D30 80053130 44813800 */ mtc1 $at, $f7 /* 053D34 80053134 44803000 */ mtc1 $zero, $f6 @@ -296,7 +296,7 @@ glabel func_80052D7C /* 053D5C 8005315C 46205220 */ cvt.s.d $f8, $f10 /* 053D60 80053160 E4A8002C */ swc1 $f8, 0x2c($a1) .L80053164: -/* 053D64 80053164 8C63D538 */ lw $v1, %lo(D_8011D538)($v1) +/* 053D64 80053164 8C63D538 */ lw $v1, %lo(gCurrentStickY)($v1) /* 053D68 80053168 8FAA0040 */ lw $t2, 0x40($sp) /* 053D6C 8005316C 28610032 */ slti $at, $v1, 0x32 /* 053D70 80053170 10200004 */ beqz $at, .L80053184 diff --git a/asm/non_matchings/racer/func_80053750.s b/asm/non_matchings/racer/func_80053750.s index 42662baa..f8a2ea02 100644 --- a/asm/non_matchings/racer/func_80053750.s +++ b/asm/non_matchings/racer/func_80053750.s @@ -496,8 +496,8 @@ glabel func_80053750 /* 054A44 80053E44 24420008 */ addiu $v0, $v0, 8 /* 054A48 80053E48 1443FF99 */ bne $v0, $v1, .L80053CB0 /* 054A4C 80053E4C 01603825 */ move $a3, $t3 -/* 054A50 80053E50 3C028012 */ lui $v0, %hi(D_8011D534) # $v0, 0x8012 -/* 054A54 80053E54 2442D534 */ addiu $v0, %lo(D_8011D534) # addiu $v0, $v0, -0x2acc +/* 054A50 80053E50 3C028012 */ lui $v0, %hi(gCurrentStickX) # $v0, 0x8012 +/* 054A54 80053E54 2442D534 */ addiu $v0, %lo(gCurrentStickX) # addiu $v0, $v0, -0x2acc /* 054A58 80053E58 8C4D0000 */ lw $t5, ($v0) /* 054A5C 80053E5C 24030064 */ li $v1, 100 /* 054A60 80053E60 01A30019 */ multu $t5, $v1 diff --git a/asm/non_matchings/racer/func_8005492C.s b/asm/non_matchings/racer/func_8005492C.s index 51feb79f..1794ce70 100644 --- a/asm/non_matchings/racer/func_8005492C.s +++ b/asm/non_matchings/racer/func_8005492C.s @@ -51,7 +51,7 @@ glabel func_8005492C /* 05558C 8005498C C7A20030 */ lwc1 $f2, 0x30($sp) /* 055590 80054990 28411C01 */ slti $at, $v0, 0x1c01 /* 055594 80054994 10200003 */ beqz $at, .L800549A4 -/* 055598 80054998 3C048012 */ lui $a0, %hi(D_8011D534) # $a0, 0x8012 +/* 055598 80054998 3C048012 */ lui $a0, %hi(gCurrentStickX) # $a0, 0x8012 /* 05559C 8005499C 2841E400 */ slti $at, $v0, -0x1c00 /* 0555A0 800549A0 10200002 */ beqz $at, .L800549AC .L800549A4: @@ -60,7 +60,7 @@ glabel func_8005492C .L800549AC: /* 0555AC 800549AC 3C028012 */ lui $v0, %hi(gCurrentCarInput) # $v0, 0x8012 /* 0555B0 800549B0 8C42D528 */ lw $v0, %lo(gCurrentCarInput)($v0) -/* 0555B4 800549B4 8C84D534 */ lw $a0, %lo(D_8011D534)($a0) +/* 0555B4 800549B4 8C84D534 */ lw $a0, %lo(gCurrentStickX)($a0) /* 0555B8 800549B8 304F4000 */ andi $t7, $v0, 0x4000 /* 0555BC 800549BC 24030006 */ li $v1, 6 /* 0555C0 800549C0 11E00002 */ beqz $t7, .L800549CC @@ -350,9 +350,9 @@ glabel func_8005492C /* 0559E8 80054DE8 46208201 */ sub.d $f8, $f16, $f0 /* 0559EC 80054DEC C4256810 */ lwc1 $f5, %lo(D_800E6810)($at) /* 0559F0 80054DF0 C4246814 */ lwc1 $f4, %lo(D_800E6810 + 4)($at) -/* 0559F4 80054DF4 3C088012 */ lui $t0, %hi(D_8011D538) # $t0, 0x8012 +/* 0559F4 80054DF4 3C088012 */ lui $t0, %hi(gCurrentStickY) # $t0, 0x8012 /* 0559F8 80054DF8 46244182 */ mul.d $f6, $f8, $f4 -/* 0559FC 80054DFC 8D08D538 */ lw $t0, %lo(D_8011D538)($t0) +/* 0559FC 80054DFC 8D08D538 */ lw $t0, %lo(gCurrentStickY)($t0) /* 055A00 80054E00 3C028012 */ lui $v0, %hi(gCurrentCarInput) # $v0, 0x8012 /* 055A04 80054E04 2901FFE7 */ slti $at, $t0, -0x19 /* 055A08 80054E08 1020000D */ beqz $at, .L80054E40 diff --git a/asm/non_matchings/racer/func_80054FD0.s b/asm/non_matchings/racer/func_80054FD0.s index 70eb86fb..17cc5016 100644 --- a/asm/non_matchings/racer/func_80054FD0.s +++ b/asm/non_matchings/racer/func_80054FD0.s @@ -256,7 +256,7 @@ glabel func_80054FD0 /* 055F94 80055394 46003302 */ mul.s $f12, $f6, $f0 /* 055F98 80055398 AFA9018C */ sw $t1, 0x18c($sp) /* 055F9C 8005539C 46004382 */ mul.s $f14, $f8, $f0 -/* 055FA0 800553A0 0C01C1D4 */ jal func_80070750 +/* 055FA0 800553A0 0C01C1D4 */ jal atan2f /* 055FA4 800553A4 00000000 */ nop /* 055FA8 800553A8 86390000 */ lh $t9, ($s1) /* 055FAC 800553AC 8FA9018C */ lw $t1, 0x18c($sp) @@ -587,7 +587,7 @@ glabel func_80054FD0 /* 056474 80055874 46083080 */ add.s $f2, $f6, $f8 /* 056478 80055878 E7B00180 */ swc1 $f16, 0x180($sp) /* 05647C 8005587C 46029381 */ sub.s $f14, $f18, $f2 -/* 056480 80055880 0C01C1D4 */ jal func_80070750 +/* 056480 80055880 0C01C1D4 */ jal atan2f /* 056484 80055884 46008301 */ sub.s $f12, $f16, $f0 /* 056488 80055888 34018000 */ li $at, 32768 /* 05648C 8005588C 00412021 */ addu $a0, $v0, $at @@ -657,7 +657,7 @@ glabel func_80054FD0 /* 056570 80055970 46045301 */ sub.s $f12, $f10, $f4 /* 056574 80055974 46083381 */ sub.s $f14, $f6, $f8 /* 056578 80055978 E7AC0180 */ swc1 $f12, 0x180($sp) -/* 05657C 8005597C 0C01C1D4 */ jal func_80070750 +/* 05657C 8005597C 0C01C1D4 */ jal atan2f /* 056580 80055980 E7AE017C */ swc1 $f14, 0x17c($sp) /* 056584 80055984 8FB80184 */ lw $t8, 0x184($sp) /* 056588 80055988 00000000 */ nop @@ -675,7 +675,7 @@ glabel func_80054FD0 /* 0565B4 800559B4 46045301 */ sub.s $f12, $f10, $f4 /* 0565B8 800559B8 46083381 */ sub.s $f14, $f6, $f8 /* 0565BC 800559BC E7AC0180 */ swc1 $f12, 0x180($sp) -/* 0565C0 800559C0 0C01C1D4 */ jal func_80070750 +/* 0565C0 800559C0 0C01C1D4 */ jal atan2f /* 0565C4 800559C4 E7AE017C */ swc1 $f14, 0x17c($sp) /* 0565C8 800559C8 8FB80184 */ lw $t8, 0x184($sp) /* 0565CC 800559CC 24194000 */ li $t9, 16384 diff --git a/asm/non_matchings/racer/func_80055A84.s b/asm/non_matchings/racer/func_80055A84.s index d750f7a6..dae70cc5 100644 --- a/asm/non_matchings/racer/func_80055A84.s +++ b/asm/non_matchings/racer/func_80055A84.s @@ -196,7 +196,7 @@ glabel func_80055A84 /* 056968 80055D68 460A4300 */ add.s $f12, $f8, $f10 /* 05696C 80055D6C 46009182 */ mul.s $f6, $f18, $f0 /* 056970 80055D70 46062481 */ sub.s $f18, $f4, $f6 -/* 056974 80055D74 0C01C1D4 */ jal func_80070750 +/* 056974 80055D74 0C01C1D4 */ jal atan2f /* 056978 80055D78 E7B20060 */ swc1 $f18, 0x60($sp) /* 05697C 80055D7C 00021C00 */ sll $v1, $v0, 0x10 /* 056980 80055D80 00034C03 */ sra $t1, $v1, 0x10 @@ -210,7 +210,7 @@ glabel func_80055A84 .L80055DA0: /* 0569A0 80055DA0 C7AC0060 */ lwc1 $f12, 0x60($sp) /* 0569A4 80055DA4 C7AE0064 */ lwc1 $f14, 0x64($sp) -/* 0569A8 80055DA8 0C01C1D4 */ jal func_80070750 +/* 0569A8 80055DA8 0C01C1D4 */ jal atan2f /* 0569AC 80055DAC 00000000 */ nop /* 0569B0 80055DB0 00021C00 */ sll $v1, $v0, 0x10 /* 0569B4 80055DB4 00035403 */ sra $t2, $v1, 0x10 diff --git a/asm/non_matchings/racer/func_80059208.s b/asm/non_matchings/racer/func_80059208.s index d462935a..2401270f 100644 --- a/asm/non_matchings/racer/func_80059208.s +++ b/asm/non_matchings/racer/func_80059208.s @@ -242,7 +242,7 @@ glabel func_80059208 .L80059588: /* 05A188 80059588 C7AE004C */ lwc1 $f14, 0x4c($sp) /* 05A18C 8005958C C7AC0054 */ lwc1 $f12, 0x54($sp) -/* 05A190 80059590 0C01C1D4 */ jal func_80070750 +/* 05A190 80059590 0C01C1D4 */ jal atan2f /* 05A194 80059594 00000000 */ nop /* 05A198 80059598 863901A0 */ lh $t9, 0x1a0($s1) /* 05A19C 8005959C 24018000 */ li $at, -32768 diff --git a/asm/non_matchings/racer/func_8005A424.s b/asm/non_matchings/racer/func_8005A424.s index fa2345e5..061d1ce3 100644 --- a/asm/non_matchings/racer/func_8005A424.s +++ b/asm/non_matchings/racer/func_8005A424.s @@ -9,7 +9,7 @@ glabel func_8005A424 /* 05B040 8005A440 C4EE0008 */ lwc1 $f14, 8($a3) /* 05B044 8005A444 C4EC0000 */ lwc1 $f12, ($a3) /* 05B048 8005A448 AFA40020 */ sw $a0, 0x20($sp) -/* 05B04C 8005A44C 0C01C1D4 */ jal func_80070750 +/* 05B04C 8005A44C 0C01C1D4 */ jal atan2f /* 05B050 8005A450 AFA7001C */ sw $a3, 0x1c($sp) /* 05B054 8005A454 8FA60020 */ lw $a2, 0x20($sp) /* 05B058 8005A458 3058FFFF */ andi $t8, $v0, 0xffff @@ -31,9 +31,9 @@ glabel func_8005A424 /* 05B094 8005A494 3401FFFF */ li $at, 65535 /* 05B098 8005A498 00611821 */ addu $v1, $v1, $at .L8005A49C: -/* 05B09C 8005A49C 3C058012 */ lui $a1, %hi(D_8011D534) # $a1, 0x8012 +/* 05B09C 8005A49C 3C058012 */ lui $a1, %hi(gCurrentStickX) # $a1, 0x8012 /* 05B0A0 8005A4A0 00031823 */ negu $v1, $v1 -/* 05B0A4 8005A4A4 24A5D534 */ addiu $a1, %lo(D_8011D534) # addiu $a1, $a1, -0x2acc +/* 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 @@ -42,8 +42,8 @@ glabel func_8005A424 /* 05B0BC 8005A4BC AC20D530 */ sw $zero, %lo(D_8011D530)($at) /* 05B0C0 8005A4C0 2484D528 */ addiu $a0, %lo(gCurrentCarInput) # addiu $a0, $a0, -0x2ad8 /* 05B0C4 8005A4C4 AC800000 */ sw $zero, ($a0) -/* 05B0C8 8005A4C8 3C018012 */ lui $at, %hi(D_8011D538) # $at, 0x8012 -/* 05B0CC 8005A4CC AC20D538 */ sw $zero, %lo(D_8011D538)($at) +/* 05B0C8 8005A4C8 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 +/* 05B0CC 8005A4CC AC20D538 */ sw $zero, %lo(gCurrentStickY)($at) /* 05B0D0 8005A4D0 C4C4002C */ lwc1 $f4, 0x2c($a2) /* 05B0D4 8005A4D4 3C01C010 */ li $at, 0xC0100000 # -2.250000 /* 05B0D8 8005A4D8 44813800 */ mtc1 $at, $f7 diff --git a/asm/non_matchings/racer/func_8005A6F0.s b/asm/non_matchings/racer/func_8005A6F0.s index fd0db90b..ba54dab7 100644 --- a/asm/non_matchings/racer/func_8005A6F0.s +++ b/asm/non_matchings/racer/func_8005A6F0.s @@ -414,7 +414,7 @@ glabel func_8005A6F0 /* 05B868 8005AC68 46040182 */ mul.s $f6, $f0, $f4 /* 05B86C 8005AC6C 3C014300 */ li $at, 0x43000000 # 128.000000 /* 05B870 8005AC70 44819000 */ mtc1 $at, $f18 -/* 05B874 8005AC74 3C018012 */ lui $at, %hi(D_8011D538) # $at, 0x8012 +/* 05B874 8005AC74 3C018012 */ lui $at, %hi(gCurrentStickY) # $at, 0x8012 /* 05B878 8005AC78 46123283 */ div.s $f10, $f6, $f18 /* 05B87C 8005AC7C 2418003C */ li $t8, 60 /* 05B880 8005AC80 460A0201 */ sub.s $f8, $f0, $f10 @@ -428,7 +428,7 @@ glabel func_8005A6F0 /* 05B8A0 8005ACA0 46002187 */ neg.s $f6, $f4 /* 05B8A4 8005ACA4 E5860000 */ swc1 $f6, ($t4) .L8005ACA8: -/* 05B8A8 8005ACA8 AC38D538 */ sw $t8, %lo(D_8011D538)($at) +/* 05B8A8 8005ACA8 AC38D538 */ sw $t8, %lo(gCurrentStickY)($at) /* 05B8AC 8005ACAC 920201FE */ lbu $v0, 0x1fe($s0) /* 05B8B0 8005ACB0 00000000 */ nop /* 05B8B4 8005ACB4 24010002 */ li $at, 2 @@ -591,11 +591,11 @@ glabel func_8005A6F0 /* 05BB08 8005AF08 00000000 */ nop /* 05BB0C 8005AF0C 19E0000E */ blez $t7, .L8005AF48 .L8005AF10: -/* 05BB10 8005AF10 3C018012 */ lui $at, %hi(D_8011D534) # $at, 0x8012 -/* 05BB14 8005AF14 AC20D534 */ sw $zero, %lo(D_8011D534)($at) -/* 05BB18 8005AF18 3C018012 */ lui $at, %hi(D_8011D538) # $at, 0x8012 +/* 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 -/* 05BB20 8005AF20 AC20D538 */ sw $zero, %lo(D_8011D538)($at) +/* 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 /* 05BB2C 8005AF2C AC600000 */ sw $zero, ($v1) @@ -711,8 +711,8 @@ glabel L8005B094 /* 05BCC4 8005B0C4 1000003A */ b .L8005B1B0 /* 05BCC8 8005B0C8 240B0001 */ li $t3, 1 glabel L8005B0CC -/* 05BCCC 8005B0CC 3C0D8012 */ lui $t5, %hi(D_8011D534) # $t5, 0x8012 -/* 05BCD0 8005B0D0 25ADD534 */ addiu $t5, %lo(D_8011D534) # addiu $t5, $t5, -0x2acc +/* 05BCCC 8005B0CC 3C0D8012 */ lui $t5, %hi(gCurrentStickX) # $t5, 0x8012 +/* 05BCD0 8005B0D0 25ADD534 */ addiu $t5, %lo(gCurrentStickX) # addiu $t5, $t5, -0x2acc /* 05BCD4 8005B0D4 8FA400A8 */ lw $a0, 0xa8($sp) /* 05BCD8 8005B0D8 8FA500AC */ lw $a1, 0xac($sp) /* 05BCDC 8005B0DC 8FA600A0 */ lw $a2, 0xa0($sp) diff --git a/asm/non_matchings/racer/func_8005B818.s b/asm/non_matchings/racer/func_8005B818.s index 4634d5e8..65dd3fe1 100644 --- a/asm/non_matchings/racer/func_8005B818.s +++ b/asm/non_matchings/racer/func_8005B818.s @@ -564,7 +564,7 @@ glabel func_8005B818 /* 05CC20 8005C020 E7AC009C */ swc1 $f12, 0x9c($sp) /* 05CC24 8005C024 46004283 */ div.s $f10, $f8, $f0 /* 05CC28 8005C028 E7AE0094 */ swc1 $f14, 0x94($sp) -/* 05CC2C 8005C02C 0C01C1D4 */ jal func_80070750 +/* 05CC2C 8005C02C 0C01C1D4 */ jal atan2f /* 05CC30 8005C030 E7AA0098 */ swc1 $f10, 0x98($sp) /* 05CC34 8005C034 24018000 */ li $at, -32768 /* 05CC38 8005C038 00415021 */ addu $t2, $v0, $at @@ -574,7 +574,7 @@ glabel func_8005B818 /* 05CC48 8005C048 A6790000 */ sh $t9, ($s3) /* 05CC4C 8005C04C C7AC0098 */ lwc1 $f12, 0x98($sp) /* 05CC50 8005C050 44817000 */ mtc1 $at, $f14 -/* 05CC54 8005C054 0C01C1D4 */ jal func_80070750 +/* 05CC54 8005C054 0C01C1D4 */ jal atan2f /* 05CC58 8005C058 00000000 */ nop /* 05CC5C 8005C05C A6620002 */ sh $v0, 2($s3) .L8005C060: diff --git a/asm/non_matchings/unknown_005740/func_800090C0.s b/asm/non_matchings/unknown_005740/func_800090C0.s index 23b18851..9b5b6002 100644 --- a/asm/non_matchings/unknown_005740/func_800090C0.s +++ b/asm/non_matchings/unknown_005740/func_800090C0.s @@ -11,7 +11,7 @@ glabel func_800090C0 /* 009CE4 800090E4 46128300 */ add.s $f12, $f16, $f18 /* 009CE8 800090E8 C7AE002C */ lwc1 $f14, 0x2c($sp) /* 009CEC 800090EC C7AC0028 */ lwc1 $f12, 0x28($sp) -/* 009CF0 800090F0 0C01C1D4 */ jal func_80070750 +/* 009CF0 800090F0 0C01C1D4 */ jal atan2f /* 009CF4 800090F4 E7A0001C */ swc1 $f0, 0x1c($sp) /* 009CF8 800090F8 8FA60030 */ lw $a2, 0x30($sp) /* 009CFC 800090FC 340EFFFF */ li $t6, 65535 diff --git a/asm/non_matchings/unknown_032760/func_8003EC14.s b/asm/non_matchings/unknown_032760/func_8003EC14.s index 14bf42b5..b909afe3 100644 --- a/asm/non_matchings/unknown_032760/func_8003EC14.s +++ b/asm/non_matchings/unknown_032760/func_8003EC14.s @@ -66,7 +66,7 @@ glabel func_8003EC14 /* 03F90C 8003ED0C E6120010 */ swc1 $f18, 0x10($s0) /* 03F910 8003ED10 C7AC002C */ lwc1 $f12, 0x2c($sp) /* 03F914 8003ED14 AFA70038 */ sw $a3, 0x38($sp) -/* 03F918 8003ED18 0C01C1D4 */ jal func_80070750 +/* 03F918 8003ED18 0C01C1D4 */ jal atan2f /* 03F91C 8003ED1C AFA50034 */ sw $a1, 0x34($sp) /* 03F920 8003ED20 8FA70038 */ lw $a3, 0x38($sp) /* 03F924 8003ED24 24018000 */ li $at, -32768 @@ -104,7 +104,7 @@ glabel func_8003EC14 /* 03F994 8003ED94 C7AC0028 */ lwc1 $f12, 0x28($sp) /* 03F998 8003ED98 C7AE0030 */ lwc1 $f14, 0x30($sp) /* 03F99C 8003ED9C AFA60020 */ sw $a2, 0x20($sp) -/* 03F9A0 8003EDA0 0C01C1D4 */ jal func_80070750 +/* 03F9A0 8003EDA0 0C01C1D4 */ jal atan2f /* 03F9A4 8003EDA4 AFA70038 */ sw $a3, 0x38($sp) /* 03F9A8 8003EDA8 8FA70038 */ lw $a3, 0x38($sp) /* 03F9AC 8003EDAC 8FA60020 */ lw $a2, 0x20($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003EDD8.s b/asm/non_matchings/unknown_032760/func_8003EDD8.s index 24efb196..fcc681f9 100644 --- a/asm/non_matchings/unknown_032760/func_8003EDD8.s +++ b/asm/non_matchings/unknown_032760/func_8003EDD8.s @@ -93,7 +93,7 @@ glabel func_8003EDD8 /* 03FB2C 8003EF2C 3C0143FA */ li $at, 0x43FA0000 # 500.000000 /* 03FB30 8003EF30 44817000 */ mtc1 $at, $f14 /* 03FB34 8003EF34 C7AC0064 */ lwc1 $f12, 0x64($sp) -/* 03FB38 8003EF38 0C01C1D4 */ jal func_80070750 +/* 03FB38 8003EF38 0C01C1D4 */ jal atan2f /* 03FB3C 8003EF3C AFA20058 */ sw $v0, 0x58($sp) /* 03FB40 8003EF40 8FA80074 */ lw $t0, 0x74($sp) /* 03FB44 8003EF44 304FFFFF */ andi $t7, $v0, 0xffff @@ -111,7 +111,7 @@ glabel func_8003EDD8 .L8003EF6C: /* 03FB6C 8003EF6C C7AC0068 */ lwc1 $f12, 0x68($sp) /* 03FB70 8003EF70 C7AE0060 */ lwc1 $f14, 0x60($sp) -/* 03FB74 8003EF74 0C01C1D4 */ jal func_80070750 +/* 03FB74 8003EF74 0C01C1D4 */ jal atan2f /* 03FB78 8003EF78 AFA80074 */ sw $t0, 0x74($sp) /* 03FB7C 8003EF7C 86050000 */ lh $a1, ($s0) /* 03FB80 8003EF80 24018000 */ li $at, -32768 @@ -179,7 +179,7 @@ glabel func_8003EDD8 .L8003F060: /* 03FC60 8003F060 C7AC0064 */ lwc1 $f12, 0x64($sp) /* 03FC64 8003F064 C7AE006C */ lwc1 $f14, 0x6c($sp) -/* 03FC68 8003F068 0C01C1D4 */ jal func_80070750 +/* 03FC68 8003F068 0C01C1D4 */ jal atan2f /* 03FC6C 8003F06C AFA60054 */ sw $a2, 0x54($sp) /* 03FC70 8003F070 8FA60054 */ lw $a2, 0x54($sp) /* 03FC74 8003F074 A6020002 */ sh $v0, 2($s0) diff --git a/asm/non_matchings/unknown_032760/obj_loop_butterfly.s b/asm/non_matchings/unknown_032760/obj_loop_butterfly.s index 86fc3b4a..08fc0594 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_butterfly.s +++ b/asm/non_matchings/unknown_032760/obj_loop_butterfly.s @@ -188,7 +188,7 @@ glabel L80040E54 /* 041AC8 80040EC8 E7AC0094 */ swc1 $f12, 0x94($sp) /* 041ACC 80040ECC E7AE008C */ swc1 $f14, 0x8c($sp) /* 041AD0 80040ED0 AFA90038 */ sw $t1, 0x38($sp) -/* 041AD4 80040ED4 0C01C1D4 */ jal func_80070750 +/* 041AD4 80040ED4 0C01C1D4 */ jal atan2f /* 041AD8 80040ED8 AFA8003C */ sw $t0, 0x3c($sp) /* 041ADC 80040EDC 86040000 */ lh $a0, ($s0) /* 041AE0 80040EE0 8FA8003C */ lw $t0, 0x3c($sp) @@ -517,7 +517,7 @@ glabel L800411E4 /* 041FAC 800413AC E7AC0094 */ swc1 $f12, 0x94($sp) /* 041FB0 800413B0 E7AE008C */ swc1 $f14, 0x8c($sp) /* 041FB4 800413B4 A7AA0072 */ sh $t2, 0x72($sp) -/* 041FB8 800413B8 0C01C1D4 */ jal func_80070750 +/* 041FB8 800413B8 0C01C1D4 */ jal atan2f /* 041FBC 800413BC AFA8003C */ sw $t0, 0x3c($sp) /* 041FC0 800413C0 86040000 */ lh $a0, ($s0) /* 041FC4 800413C4 8FA8003C */ lw $t0, 0x3c($sp) diff --git a/asm/non_matchings/unknown_032760/obj_loop_fireball_octoweapon.s b/asm/non_matchings/unknown_032760/obj_loop_fireball_octoweapon.s index e6cc1576..1176a302 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_fireball_octoweapon.s +++ b/asm/non_matchings/unknown_032760/obj_loop_fireball_octoweapon.s @@ -196,7 +196,7 @@ glabel obj_loop_fireball_octoweapon /* 034E24 80034224 00000000 */ nop /* 034E28 80034228 C60C001C */ lwc1 $f12, 0x1c($s0) /* 034E2C 8003422C C60E0024 */ lwc1 $f14, 0x24($s0) -/* 034E30 80034230 0C01C1D4 */ jal func_80070750 +/* 034E30 80034230 0C01C1D4 */ jal atan2f /* 034E34 80034234 00000000 */ nop /* 034E38 80034238 C7A2007C */ lwc1 $f2, 0x7c($sp) /* 034E3C 8003423C A6020000 */ sh $v0, ($s0) diff --git a/asm/non_matchings/unknown_032760/obj_loop_fish.s b/asm/non_matchings/unknown_032760/obj_loop_fish.s index 5b2a52c0..0508e3cd 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_fish.s +++ b/asm/non_matchings/unknown_032760/obj_loop_fish.s @@ -211,12 +211,12 @@ glabel obj_loop_fish /* 037FF0 800373F0 A6080106 */ sh $t0, 0x106($s0) /* 037FF4 800373F4 C7AE0058 */ lwc1 $f14, 0x58($sp) /* 037FF8 800373F8 C7AC0060 */ lwc1 $f12, 0x60($sp) -/* 037FFC 800373FC 0C01C1D4 */ jal func_80070750 +/* 037FFC 800373FC 0C01C1D4 */ jal atan2f /* 038000 80037400 00000000 */ nop /* 038004 80037404 A6220000 */ sh $v0, ($s1) /* 038008 80037408 C7AC005C */ lwc1 $f12, 0x5c($sp) /* 03800C 8003740C C7AE0054 */ lwc1 $f14, 0x54($sp) -/* 038010 80037410 0C01C1D4 */ jal func_80070750 +/* 038010 80037410 0C01C1D4 */ jal atan2f /* 038014 80037414 46006307 */ neg.s $f12, $f12 /* 038018 80037418 86230002 */ lh $v1, 2($s1) /* 03801C 8003741C 8FAE0074 */ lw $t6, 0x74($sp) diff --git a/asm/non_matchings/unknown_032760/obj_loop_frog.s b/asm/non_matchings/unknown_032760/obj_loop_frog.s index 2487f15a..6e604efa 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_frog.s +++ b/asm/non_matchings/unknown_032760/obj_loop_frog.s @@ -141,7 +141,7 @@ glabel L80042378 /* 0430CC 800424CC 460A4402 */ mul.s $f16, $f8, $f10 /* 0430D0 800424D0 E610001C */ swc1 $f16, 0x1c($s0) .L800424D4: -/* 0430D4 800424D4 0C01C1D4 */ jal func_80070750 +/* 0430D4 800424D4 0C01C1D4 */ jal atan2f /* 0430D8 800424D8 4600B387 */ neg.s $f14, $f22 /* 0430DC 800424DC 34018000 */ li $at, 32768 /* 0430E0 800424E0 0041C021 */ addu $t8, $v0, $at @@ -231,7 +231,7 @@ glabel L80042378 /* 043214 80042614 C6100000 */ lwc1 $f16, ($s0) /* 043218 80042618 C6120008 */ lwc1 $f18, 8($s0) /* 04321C 8004261C 46008301 */ sub.s $f12, $f16, $f0 -/* 043220 80042620 0C01C1D4 */ jal func_80070750 +/* 043220 80042620 0C01C1D4 */ jal atan2f /* 043224 80042624 46029381 */ sub.s $f14, $f18, $f2 /* 043228 80042628 A602001A */ sh $v0, 0x1a($s0) /* 04322C 8004262C C6220014 */ lwc1 $f2, 0x14($s1) diff --git a/asm/non_matchings/unknown_032760/obj_loop_lasergun.s b/asm/non_matchings/unknown_032760/obj_loop_lasergun.s index 201b65bd..0cd26c5f 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_lasergun.s +++ b/asm/non_matchings/unknown_032760/obj_loop_lasergun.s @@ -61,14 +61,14 @@ glabel obj_loop_lasergun /* 035288 80034688 4600A303 */ div.s $f12, $f20, $f0 /* 03528C 8003468C 00000000 */ nop /* 035290 80034690 4600B583 */ div.s $f22, $f22, $f0 -/* 035294 80034694 0C01C1D4 */ jal func_80070750 +/* 035294 80034694 0C01C1D4 */ jal atan2f /* 035298 80034698 46007383 */ div.s $f14, $f14, $f0 /* 03529C 8003469C 24018000 */ li $at, -32768 /* 0352A0 800346A0 00415021 */ addu $t2, $v0, $at /* 0352A4 800346A4 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 0352A8 800346A8 44817000 */ mtc1 $at, $f14 /* 0352AC 800346AC A60A0000 */ sh $t2, ($s0) -/* 0352B0 800346B0 0C01C1D4 */ jal func_80070750 +/* 0352B0 800346B0 0C01C1D4 */ jal atan2f /* 0352B4 800346B4 4600B306 */ mov.s $f12, $f22 /* 0352B8 800346B8 A6020002 */ sh $v0, 2($s0) .L800346BC: diff --git a/asm/non_matchings/unknown_032760/obj_loop_parkwarden.s b/asm/non_matchings/unknown_032760/obj_loop_parkwarden.s index 0c14f44f..0cd7623c 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_parkwarden.s +++ b/asm/non_matchings/unknown_032760/obj_loop_parkwarden.s @@ -143,7 +143,7 @@ glabel obj_loop_parkwarden /* 03A0F8 800394F8 C5CA0014 */ lwc1 $f10, 0x14($t6) /* 03A0FC 800394FC AFA60084 */ sw $a2, 0x84($sp) /* 03A100 80039500 46122301 */ sub.s $f12, $f4, $f18 -/* 03A104 80039504 0C01C1D4 */ jal func_80070750 +/* 03A104 80039504 0C01C1D4 */ jal atan2f /* 03A108 80039508 46065381 */ sub.s $f14, $f10, $f6 /* 03A10C 8003950C 8FAF0090 */ lw $t7, 0x90($sp) /* 03A110 80039510 34018001 */ li $at, 32769 @@ -211,7 +211,7 @@ glabel obj_loop_parkwarden /* 03A1F0 800395F0 C448000C */ lwc1 $f8, 0xc($v0) /* 03A1F4 800395F4 C4440014 */ lwc1 $f4, 0x14($v0) /* 03A1F8 800395F8 46104301 */ sub.s $f12, $f8, $f16 -/* 03A1FC 800395FC 0C01C1D4 */ jal func_80070750 +/* 03A1FC 800395FC 0C01C1D4 */ jal atan2f /* 03A200 80039600 46122381 */ sub.s $f14, $f4, $f18 /* 03A204 80039604 8FAC0090 */ lw $t4, 0x90($sp) /* 03A208 80039608 34018001 */ li $at, 32769 @@ -365,7 +365,7 @@ glabel L800397BC /* 03A41C 8003981C 240A0002 */ li $t2, 2 /* 03A420 80039820 00000000 */ nop /* 03A424 80039824 46028303 */ div.s $f12, $f16, $f2 -/* 03A428 80039828 0C01C1D4 */ jal func_80070750 +/* 03A428 80039828 0C01C1D4 */ jal atan2f /* 03A42C 8003982C 46022383 */ div.s $f14, $f4, $f2 /* 03A430 80039830 86050000 */ lh $a1, ($s0) /* 03A434 80039834 34018000 */ li $at, 32768 @@ -1348,7 +1348,7 @@ glabel L8003A5AC /* 03B26C 8003A66C C7AA00A0 */ lwc1 $f10, 0xa0($sp) /* 03B270 8003A670 C7B000A8 */ lwc1 $f16, 0xa8($sp) /* 03B274 8003A674 46085383 */ div.s $f14, $f10, $f8 -/* 03B278 8003A678 0C01C1D4 */ jal func_80070750 +/* 03B278 8003A678 0C01C1D4 */ jal atan2f /* 03B27C 8003A67C 46088303 */ div.s $f12, $f16, $f8 /* 03B280 8003A680 244D4000 */ addiu $t5, $v0, 0x4000 /* 03B284 8003A684 A62D001E */ sh $t5, 0x1e($s1) diff --git a/asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s b/asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s index 32e66350..9260271a 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s +++ b/asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s @@ -99,7 +99,7 @@ glabel obj_loop_stopwatchman /* 036F30 80036330 C448000C */ lwc1 $f8, 0xc($v0) /* 036F34 80036334 C4460014 */ lwc1 $f6, 0x14($v0) /* 036F38 80036338 460A4301 */ sub.s $f12, $f8, $f10 -/* 036F3C 8003633C 0C01C1D4 */ jal func_80070750 +/* 036F3C 8003633C 0C01C1D4 */ jal atan2f /* 036F40 80036340 46043381 */ sub.s $f14, $f6, $f4 /* 036F44 80036344 8FB90064 */ lw $t9, 0x64($sp) /* 036F48 80036348 34018001 */ li $at, 32769 @@ -273,7 +273,7 @@ glabel obj_loop_stopwatchman /* 0371B8 800365B8 240D0002 */ li $t5, 2 /* 0371BC 800365BC C7A60074 */ lwc1 $f6, 0x74($sp) /* 0371C0 800365C0 460A4303 */ div.s $f12, $f8, $f10 -/* 0371C4 800365C4 0C01C1D4 */ jal func_80070750 +/* 0371C4 800365C4 0C01C1D4 */ jal atan2f /* 0371C8 800365C8 460A3383 */ div.s $f14, $f6, $f10 /* 0371CC 800365CC 86040000 */ lh $a0, ($s0) /* 0371D0 800365D0 34018000 */ li $at, 32768 diff --git a/asm/non_matchings/unknown_05CEF0/func_8005C364.s b/asm/non_matchings/unknown_05CEF0/func_8005C364.s index bc5ca848..a9d25337 100644 --- a/asm/non_matchings/unknown_05CEF0/func_8005C364.s +++ b/asm/non_matchings/unknown_05CEF0/func_8005C364.s @@ -372,7 +372,7 @@ glabel func_8005C364 /* 05D4B4 8005C8B4 4500001E */ bc1f .L8005C930 /* 05D4B8 8005C8B8 00000000 */ nop /* 05D4BC 8005C8BC 4600A306 */ mov.s $f12, $f20 -/* 05D4C0 8005C8C0 0C01C1D4 */ jal func_80070750 +/* 05D4C0 8005C8C0 0C01C1D4 */ jal atan2f /* 05D4C4 8005C8C4 AFA50038 */ sw $a1, 0x38($sp) /* 05D4C8 8005C8C8 86380000 */ lh $t8, ($s1) /* 05D4CC 8005C8CC 34018000 */ li $at, 32768 diff --git a/asm/non_matchings/unknown_05DCD0/func_8005D0D0.s b/asm/non_matchings/unknown_05DCD0/func_8005D0D0.s index 974cc6f6..44954071 100644 --- a/asm/non_matchings/unknown_05DCD0/func_8005D0D0.s +++ b/asm/non_matchings/unknown_05DCD0/func_8005D0D0.s @@ -419,7 +419,7 @@ glabel func_8005D0D0 /* 05E2CC 8005D6CC C7AE0050 */ lwc1 $f14, 0x50($sp) /* 05E2D0 8005D6D0 4500001B */ bc1f .L8005D740 /* 05E2D4 8005D6D4 00000000 */ nop -/* 05E2D8 8005D6D8 0C01C1D4 */ jal func_80070750 +/* 05E2D8 8005D6D8 0C01C1D4 */ jal atan2f /* 05E2DC 8005D6DC 4600A306 */ mov.s $f12, $f20 /* 05E2E0 8005D6E0 862B0000 */ lh $t3, ($s1) /* 05E2E4 8005D6E4 34018000 */ li $at, 32768 diff --git a/asm/non_matchings/unknown_05DCD0/func_8005D820.s b/asm/non_matchings/unknown_05DCD0/func_8005D820.s index 5e0dc154..c796633a 100644 --- a/asm/non_matchings/unknown_05DCD0/func_8005D820.s +++ b/asm/non_matchings/unknown_05DCD0/func_8005D820.s @@ -621,7 +621,7 @@ glabel L8005DCE8 /* 05ECC8 8005E0C8 C7AE0050 */ lwc1 $f14, 0x50($sp) /* 05ECCC 8005E0CC 4500001B */ bc1f .L8005E13C /* 05ECD0 8005E0D0 00000000 */ nop -/* 05ECD4 8005E0D4 0C01C1D4 */ jal func_80070750 +/* 05ECD4 8005E0D4 0C01C1D4 */ jal atan2f /* 05ECD8 8005E0D8 4600A306 */ mov.s $f12, $f20 /* 05ECDC 8005E0DC 862D0000 */ lh $t5, ($s1) /* 05ECE0 8005E0E0 34018000 */ li $at, 32768 diff --git a/asm/non_matchings/unknown_05F0C0/func_8005E4C0.s b/asm/non_matchings/unknown_05F0C0/func_8005E4C0.s index 3d37abc0..5a632d97 100644 --- a/asm/non_matchings/unknown_05F0C0/func_8005E4C0.s +++ b/asm/non_matchings/unknown_05F0C0/func_8005E4C0.s @@ -315,7 +315,7 @@ glabel func_8005E4C0 /* 05F548 8005E948 4500001E */ bc1f .L8005E9C4 /* 05F54C 8005E94C 00000000 */ nop /* 05F550 8005E950 4600A306 */ mov.s $f12, $f20 -/* 05F554 8005E954 0C01C1D4 */ jal func_80070750 +/* 05F554 8005E954 0C01C1D4 */ jal atan2f /* 05F558 8005E958 AFA50038 */ sw $a1, 0x38($sp) /* 05F55C 8005E95C 862E0000 */ lh $t6, ($s1) /* 05F560 8005E960 34018000 */ li $at, 32768 diff --git a/asm/unknown_070110.s b/asm/unknown_070110.s index f0aac61d..76752920 100644 --- a/asm/unknown_070110.s +++ b/asm/unknown_070110.s @@ -33,7 +33,7 @@ .include "asm/unknown_070110/func_800705F8.s" .include "asm/unknown_070110/func_80070638.s" .include "asm/unknown_070110/func_8007066C.s" -.include "asm/unknown_070110/func_80070750.s" +.include "asm/unknown_070110/atan2f.s" .include "asm/unknown_070110/func_800707C4.s" .include "asm/unknown_070110/func_800707F8.s" .include "asm/unknown_070110/func_8007082C.s" diff --git a/asm/unknown_070110/func_80070750.s b/asm/unknown_070110/atan2f.s similarity index 98% rename from asm/unknown_070110/func_80070750.s rename to asm/unknown_070110/atan2f.s index 9ffca0af..dccdcf58 100644 --- a/asm/unknown_070110/func_80070750.s +++ b/asm/unknown_070110/atan2f.s @@ -1,4 +1,4 @@ -glabel func_80070750 +glabel atan2f /* 071350 80070750 3C01437F */ li $at, 0x437F0000 # 255.000000 /* 071354 80070754 44810000 */ mtc1 $at, $f0 /* 071358 80070758 00000000 */ nop diff --git a/include/math_util.h b/include/math_util.h new file mode 100644 index 00000000..1b693a45 --- /dev/null +++ b/include/math_util.h @@ -0,0 +1,9 @@ +#ifndef MATH_UTIL_H +#define MATH_UTIL_H + +#include "types.h" +#include "structs.h" + +extern s16 atan2f(f32 y, f32 x); + +#endif // MATH_UTIL_H diff --git a/src/object_functions.c b/src/object_functions.c index fbb3635f..c7a2401b 100644 --- a/src/object_functions.c +++ b/src/object_functions.c @@ -211,7 +211,7 @@ typedef struct Object80033F60_4C_64 { s32 func_80011560(void); void func_80011570(Object*, f32, f32, f32); void func_8003FC44(f32, f32, f32, s32, s32, f32, s32); -s16 func_80070750(f32, f32); +s16 atan2f(f32, f32); s32 func_8002AD08(f32, f32**, s32); void func_80001D04(u16, s32 *); void func_8000488C(s32); @@ -268,7 +268,7 @@ void obj_loop_fireball_octoweapon(Object *obj, s32 speed) { } obj->segment.z_velocity += (phi_f2 - obj->segment.z_velocity) * 0.125 * sp7C; if (sqrtf((obj->segment.x_velocity * obj->segment.x_velocity) + (obj->segment.z_velocity * obj->segment.z_velocity)) > 0.5) { - obj->segment.trans.y_rotation = func_80070750(obj->segment.x_velocity, obj->segment.z_velocity); + obj->segment.trans.y_rotation = atan2f(obj->segment.x_velocity, obj->segment.z_velocity); obj->segment.trans.x_rotation -= speed << 9; } func_80011570(obj, obj->segment.x_velocity * sp7C, obj->segment.y_velocity * sp7C, obj->segment.z_velocity * sp7C); diff --git a/src/racer.c b/src/racer.c index bcc407a1..d804d14a 100644 --- a/src/racer.c +++ b/src/racer.c @@ -17,6 +17,7 @@ #include "object_functions.h" #include "game.h" #include "printf.h" +#include "math_util.h" #define MAX_NUMBER_OF_GHOST_NODES 360 @@ -142,8 +143,8 @@ ObjectTransform D_8011D510; s32 gCurrentCarInput; // Related to input of the car. s32 gActivePlayerButtonPress; s32 D_8011D530; -s32 D_8011D534; -s32 D_8011D538; +s32 gCurrentStickX; +s32 gCurrentStickY; s32 D_8011D53C; s32 D_8011D540; f32 D_8011D544; @@ -332,27 +333,29 @@ void func_80044170(Object *arg0, Object_Racer *arg1, s32 arg2) { } } + // Kick it into reverse. if (arg1->unk214 != 0) { - D_8011D534 *= -1; + gCurrentStickX *= -1; gCurrentCarInput &= ~A_BUTTON; - D_8011D538 = -50; + gCurrentStickY = -50; gCurrentCarInput |= B_BUTTON; } - if (D_8011D534 > 75) { - D_8011D534 = 75; + // Cap stick inputs. + if (gCurrentStickX > 75) { + gCurrentStickX = 75; } - if (D_8011D534 < -75) { - D_8011D534 = -75; + if (gCurrentStickX < -75) { + gCurrentStickX = -75; } - if (D_8011D538 > 75) { - D_8011D538 = 75; + if (gCurrentStickY > 75) { + gCurrentStickY = 75; } - if (D_8011D538 < -75) { - D_8011D538 = -75; + if (gCurrentStickY < -75) { + gCurrentStickY = -75; } } @@ -753,8 +756,6 @@ void func_8005234C(unk8005234C *arg0) { } } -extern s16 func_80070750(f32 y, f32 x); - s32 func_80052388(Object *obj1, Object_Racer *arg1, Object *obj2, f32 distance) { s32 rotation; f32 diffX; @@ -764,7 +765,7 @@ s32 func_80052388(Object *obj1, Object_Racer *arg1, Object *obj2, f32 distance) 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 = (func_80070750(diffX, diffZ) - (obj1->segment.trans.y_rotation & 0xFFFF)) + 0x8000; + rotation = (atan2f(diffX, diffZ) - (obj1->segment.trans.y_rotation & 0xFFFF)) + 0x8000; if (rotation > 0x8000) { rotation += 0xFFFF0001; } @@ -782,7 +783,7 @@ s32 func_80052388(Object *obj1, Object_Racer *arg1, Object *obj2, f32 distance) arg1->unk16C = 0; } arg1 = (struct Object_Racer *) obj2->unk64; - rotation = func_80070750(diffX, diffZ) - (obj1->segment.trans.y_rotation & 0xFFFF); + rotation = atan2f(diffX, diffZ) - (obj1->segment.trans.y_rotation & 0xFFFF); if (rotation > 0x8000) { rotation += 0xFFFF0001; } @@ -1033,7 +1034,7 @@ GLOBAL_ASM("asm/non_matchings/racer/func_800576E0.s") void func_800579B0(unk800579B0 *arg0, UNUSED s32 arg1, f32 arg2) { s32 temp, temp2; - temp = D_8011D534 - arg0->unk1E1; + temp = gCurrentStickX - arg0->unk1E1; temp2 = (s32)((f64)((f32)temp * arg2) * 0.125); if (temp != 0 && temp2 == 0) { diff --git a/src/racer.h b/src/racer.h index 707aae1a..c3ff0ace 100644 --- a/src/racer.h +++ b/src/racer.h @@ -126,7 +126,7 @@ extern s16 D_800DCDD4[4]; extern ObjectTransform D_8011D510; -extern s32 D_8011D534; +extern s32 gCurrentStickX; s32 get_random_number_from_range(s32, s32); //? void func_8006FC30(Matrix, ObjectTransform *); // asm func From 28c900b3d3d4dc4bb0a7910170850afbb9886878 Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Sun, 1 May 2022 19:45:00 +0100 Subject: [PATCH 02/17] rotation offset --- include/structs.h | 10 +++++----- src/objects.c | 16 ++++++++-------- src/racer.c | 37 ++++++++++++++++++------------------- 3 files changed, 31 insertions(+), 32 deletions(-) diff --git a/include/structs.h b/include/structs.h index afc0f2fa..58f4ef48 100644 --- a/include/structs.h +++ b/include/structs.h @@ -889,13 +889,13 @@ typedef struct Object_Racer { /* 0x154 */ struct Object *unk154; /* 0x158 */ s32 unk158; /* 0x15C */ s32 unk15C; - /* 0x160 */ s16 unk160; - /* 0x162 */ s16 unk162; - /* 0x164 */ s16 unk164; - /* 0x166 */ s16 unk166; + /* 0x160 */ s16 x_rotation_offset; + /* 0x162 */ s16 y_rotation_offset; + /* 0x164 */ s16 z_rotation_offset; + /* 0x166 */ s16 unk166; // I don't know exactly what these are, but this one in particular seems to cause a Y position offset. /* 0x168 */ s16 unk168; /* 0x16A */ s16 unk16A; - /* 0x166 */ s16 unk16C; + /* 0x166 */ s16 unk16C; // As for these, they seem to affect the turning direction of the racer's head. /* 0x16E */ s16 unk16E; /* 0x170 */ s16 unk170; /* 0x172 */ u8 balloon_type; diff --git a/src/objects.c b/src/objects.c index 293930e0..b5a5e59f 100644 --- a/src/objects.c +++ b/src/objects.c @@ -990,15 +990,15 @@ void func_80012E28(Object *this) { if (this->behaviorId == 1) { sp_20 = &this->unk64->racer; - this->segment.trans.y_rotation += sp_20->unk160; - this->segment.trans.x_rotation += sp_20->unk162; - this->segment.trans.z_rotation += sp_20->unk164; + this->segment.trans.y_rotation += sp_20->x_rotation_offset; + this->segment.trans.x_rotation += sp_20->y_rotation_offset; + this->segment.trans.z_rotation += sp_20->z_rotation_offset; sp_1c = 0.0f; if (sp_20->unk1D7 < 5) { - sp_1c = func_800707F8(sp_20->unk164); + sp_1c = func_800707F8(sp_20->z_rotation_offset); tmp_f2 = sp_1c; - tmp_f0 = func_800707F8(sp_20->unk162 - sp_20->unk166) * tmp_f2; + tmp_f0 = func_800707F8(sp_20->y_rotation_offset - sp_20->unk166) * tmp_f2; tmp_f0 = (tmp_f0 < 0.0f) ? 0.0f : tmp_f0 * tmp_f0; @@ -1014,9 +1014,9 @@ void func_80012E28(Object *this) { void func_80012F30(Object *arg0) { if (arg0->behaviorId == 1) { Object_Racer *object_64 = &arg0->unk64->racer; - arg0->segment.trans.y_rotation -= object_64->unk160; - arg0->segment.trans.x_rotation -= object_64->unk162; - arg0->segment.trans.z_rotation -= object_64->unk164; + arg0->segment.trans.y_rotation -= object_64->x_rotation_offset; + arg0->segment.trans.x_rotation -= object_64->y_rotation_offset; + arg0->segment.trans.z_rotation -= object_64->z_rotation_offset; arg0->segment.trans.y_position -= D_8011ADD0; } } diff --git a/src/racer.c b/src/racer.c index d804d14a..539938ad 100644 --- a/src/racer.c +++ b/src/racer.c @@ -425,30 +425,30 @@ void func_8004C140(Object *obj, Object_Racer *obj64) { if (temp != 4) { func_800576E0(obj, obj64, 2); } - obj64->unk18C = 0x168; + obj64->unk18C = 360; if (obj64->unk1C9 == 8) { obj64->unk1C9 = 0; } if (obj64->unk1D6 < 5) { - func_800570B8(obj, 0x1C2, 8, 0x81); + func_800570B8(obj, 450, 8, 129); switch (obj64->unk187) { case 1: case 2: if (phi_v1 != 0) { - obj64->spinout_timer = 0x28; + obj64->spinout_timer = 40; } else { - obj64->spinout_timer = 0x3C; + obj64->spinout_timer = 60; } break; case 3: if (phi_v1 != 0) { - obj64->spinout_timer = 0x28; + obj64->spinout_timer = 40; } else { - obj64->spinout_timer = 0x3C; + obj64->spinout_timer = 60; } break; case 6: - obj64->unk204 = 0x78; + obj64->unk204 = 120; obj->segment.x_velocity *= 0.7; obj->segment.z_velocity *= 0.7; break; @@ -654,18 +654,17 @@ void func_80050754(Object *obj, Object_Racer *obj64, f32 arg2) { #else GLOBAL_ASM("asm/non_matchings/racer/func_80050754.s") #endif - /** * Applies visual rotational offets to vehicles. * Examples include planes when on the ground, or when crashing, or hovercraft when braking. */ -void apply_vehicle_rotation_offset(Object_Racer *obj, s32 max, s16 roll, s16 pitch, s16 yaw) { +void apply_vehicle_rotation_offset(Object_Racer *obj, s32 max, s16 xRotation, s16 yRotation, s16 zRotation) { s32 diff; s32 tempAngle; if (!obj->unk1F1) { - tempAngle = roll - (obj->unk160 & 0xFFFF); - obj->unk166 = pitch; + tempAngle = xRotation - (obj->x_rotation_offset & 0xFFFF); + obj->unk166 = yRotation; if (tempAngle > 0x8000) { tempAngle += 0xFFFF0001; } @@ -677,15 +676,15 @@ void apply_vehicle_rotation_offset(Object_Racer *obj, s32 max, s16 roll, s16 pit if (diff < tempAngle) { tempAngle = diff; } - obj->unk160 += tempAngle; + obj->x_rotation_offset += tempAngle; } else if (tempAngle < 0) { diff = -(max * 0x600); if (tempAngle < diff) { tempAngle = diff; } - obj->unk160 += tempAngle; + obj->x_rotation_offset += tempAngle; } - tempAngle = pitch - (obj->unk162 & 0xFFFF); + tempAngle = yRotation - (obj->y_rotation_offset & 0xFFFF); if (tempAngle > 0x8000) { tempAngle = tempAngle + 0xFFFF0001; } @@ -697,15 +696,15 @@ void apply_vehicle_rotation_offset(Object_Racer *obj, s32 max, s16 roll, s16 pit if (diff < tempAngle) { tempAngle = diff; } - obj->unk162 += tempAngle; + obj->y_rotation_offset += tempAngle; } else if (tempAngle < 0) { diff = -(max * 0x600); if (tempAngle < diff) { tempAngle = diff; } - obj->unk162 += tempAngle; + obj->y_rotation_offset += tempAngle; } - tempAngle = yaw - (obj->unk164 & 0xFFFF); + tempAngle = zRotation - (obj->z_rotation_offset & 0xFFFF); if (tempAngle > 0x8000) { tempAngle = tempAngle + 0xFFFF0001; } @@ -717,7 +716,7 @@ void apply_vehicle_rotation_offset(Object_Racer *obj, s32 max, s16 roll, s16 pit if (diff < tempAngle) { tempAngle = diff; } - obj->unk164 += tempAngle; + obj->z_rotation_offset += tempAngle; return; } if (tempAngle < 0) { @@ -725,7 +724,7 @@ void apply_vehicle_rotation_offset(Object_Racer *obj, s32 max, s16 roll, s16 pit if (tempAngle < diff) { tempAngle = diff; } - obj->unk164 += tempAngle; + obj->z_rotation_offset += tempAngle; } } } From 55cdf9934841f3d5f61d7160c3d62c323eb207b7 Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Sun, 1 May 2022 21:38:43 +0100 Subject: [PATCH 03/17] h --- src/racer.c | 12 +++++++----- src/racer.h | 9 +++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/racer.c b/src/racer.c index 539938ad..7028d719 100644 --- a/src/racer.c +++ b/src/racer.c @@ -497,7 +497,7 @@ void func_8004D95C(s32 arg0, s32 arg1, Object *obj, Object_Racer *obj64) { */ void obj_init_racer(Object *obj, LevelObjectEntry_CharacterFlag *arg1) { Object_Racer *tempObj; - s32 player; + ActivePlayers player; s32 i; D_8011D53C = 0; @@ -509,13 +509,15 @@ void obj_init_racer(Object *obj, LevelObjectEntry_CharacterFlag *arg1) { tempObj->unk194 = 0; tempObj->stretch_height = 1.0f; tempObj->stretch_height_cap = 1.0f; - if (player >= 0 && player < 4) { + // Decide which player ID to assign to this object. Human players get a positive value. + // Computer players will be -1. + if (player >= PLAYER_NONE && player < PLAYER_FOUR) { if (func_8000E158()) { player = 1 - player; } tempObj->playerIndex = player; } else { - tempObj->playerIndex = -1; + tempObj->playerIndex = PLAYER_COMPUTER; } tempObj->unk1A0 = obj->segment.trans.y_rotation; tempObj->unk1A4 = obj->segment.trans.z_rotation; @@ -603,12 +605,12 @@ void func_8004F77C(unk8004F77C *arg0) { s32 temp; arg0->flags &= ~0x80; - if ((gCurrentCarInput & B_BUTTON) != 0) { + if ((gCurrentCarInput & B_BUTTON)) { arg0->flags |= 0x80; } temp = arg0->flags & 0xF; - if ((arg0->flags & 0xC0) != 0) { + if ((arg0->flags & 0xC0)) { temp++; if (temp >= 3) { temp = 2; diff --git a/src/racer.h b/src/racer.h index c3ff0ace..3d891645 100644 --- a/src/racer.h +++ b/src/racer.h @@ -4,6 +4,15 @@ #include "types.h" #include "structs.h" +typedef enum ActivePlayers { + PLAYER_COMPUTER = -1, + PLAYER_NONE, + PLAYER_ONE, + PLAYER_TWO, + PLAYER_THREE, + PLAYER_FOUR +} ActivePlayers; + typedef struct ObjectCamera { /* 0x0014 */ ObjectTransform trans; /* 0x0018 */ f32 unk18; From 9ff65880bb33039680b0b9f12d2726d11dae9bc3 Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Sun, 1 May 2022 21:57:18 +0100 Subject: [PATCH 04/17] Update racer.c --- src/racer.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/racer.c b/src/racer.c index 7028d719..d399dd8f 100644 --- a/src/racer.c +++ b/src/racer.c @@ -589,10 +589,7 @@ void obj_init_racer(Object *obj, LevelObjectEntry_CharacterFlag *arg1) { // This needs to be on one line to match. for (i = 0; i < 4; i++) { D_8011D58C[i] = 0; } - if (tempObj); - if (tempObj); - if (tempObj); - if (tempObj); + if (1); if (1); // Also critical to match. func_80043ECC(0, 0, 0); D_8011D583 = i; D_8011D585 = 0; From 5cf19c00b21f672d3bdb56fee28ff08347593792 Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Mon, 2 May 2022 12:41:29 +0100 Subject: [PATCH 05/17] I trust this --- include/enums.h | 5 ++++- include/structs.h | 1 + src/font.h | 24 ------------------------ src/game.c | 6 +++--- src/game.h | 20 -------------------- src/menu.c | 28 ++++++++++++++-------------- src/menu.h | 7 ------- src/objects.c | 2 +- src/objects.h | 8 ++++++-- src/racer.c | 12 ++++++------ src/save_data.c | 8 ++++---- src/unknown_077C50.c | 2 +- 12 files changed, 40 insertions(+), 83 deletions(-) diff --git a/include/enums.h b/include/enums.h index 34482934..048c97d6 100644 --- a/include/enums.h +++ b/include/enums.h @@ -6,7 +6,9 @@ typedef enum Vehicle { VEHICLE_CAR, VEHICLE_HOVERCRAFT, - VEHICLE_PLANE + VEHICLE_PLANE, + + NUMBER_OF_VEHICLE_TYPES } Vehicle; typedef enum Language { @@ -33,6 +35,7 @@ typedef enum RaceType { RACETYPE_CUTSCENE_1 = 6, // Not sure what the difference between these two are. RACETYPE_CUTSCENE_2 = 7, RACETYPE_BOSS = 8, + RACETYPE_CHALLENGE = 64, // For masking RACETYPE_CHALLENGE_BATTLE = 64, RACETYPE_CHALLENGE_BANANAS = 65, RACETYPE_CHALLENGE_EGGS = 66 diff --git a/include/structs.h b/include/structs.h index 58f4ef48..f6b45364 100644 --- a/include/structs.h +++ b/include/structs.h @@ -4,6 +4,7 @@ /* Note: Structs are not complete, take them with a grain of salt. */ #include "types.h" +#include "enums.h" /* Size: 0x20 bytes */ typedef struct MenuElement { diff --git a/src/font.h b/src/font.h index 2df5e243..1c8669ef 100644 --- a/src/font.h +++ b/src/font.h @@ -34,30 +34,6 @@ enum DialogueFlags { DIALOGUE_BOX_UNUSED_02 = 0xFFFE, }; -typedef enum HorizontalAlignmentFlags { - HORZ_ALIGN_LEFT = 0, - HORZ_ALIGN_RIGHT = 1, - HORZ_ALIGN_CENTER = 4, -} HorizontalAlignmentFlags; - -typedef enum VerticalAlignmentFlags { - VERT_ALIGN_TOP = 0, - VERT_ALIGN_BOTTOM = 2, - VERT_ALIGN_MIDDLE = 8, -} VerticalAlignmentFlags; - -typedef enum AlignmentFlags { - ALIGN_TOP_LEFT = VERT_ALIGN_TOP | HORZ_ALIGN_LEFT, - ALIGN_TOP_CENTER = VERT_ALIGN_TOP | HORZ_ALIGN_CENTER, - ALIGN_TOP_RIGHT = VERT_ALIGN_TOP | HORZ_ALIGN_RIGHT, - ALIGN_MIDDLE_LEFT = VERT_ALIGN_MIDDLE | HORZ_ALIGN_LEFT, - ALIGN_MIDDLE_CENTER = VERT_ALIGN_MIDDLE | HORZ_ALIGN_CENTER, - ALIGN_MIDDLE_RIGHT = VERT_ALIGN_MIDDLE | HORZ_ALIGN_RIGHT, - ALIGN_BOTTOM_LEFT = VERT_ALIGN_BOTTOM | HORZ_ALIGN_LEFT, - ALIGN_BOTTOM_CENTER = VERT_ALIGN_BOTTOM | HORZ_ALIGN_CENTER, - ALIGN_BOTTOM_RIGHT = VERT_ALIGN_BOTTOM | HORZ_ALIGN_RIGHT, -} AlignmentFlags; - /* Size: 0x20 bytes */ typedef struct unk8012A7EC { u8 unk0; diff --git a/src/game.c b/src/game.c index fc643b28..0c6aaf28 100644 --- a/src/game.c +++ b/src/game.c @@ -643,21 +643,21 @@ u8 *get_level_name(s32 levelId) { levelName = gLevelNames[levelId]; switch (get_language()) { - case GERMAN: + case LANGUAGE_GERMAN: while (numberOfNullPointers < 1) { if (*(levelName++) == 0) { numberOfNullPointers++; } } break; - case FRENCH: + case LANGUAGE_FRENCH: while (numberOfNullPointers < 2) { if (*(levelName++) == 0) { numberOfNullPointers++; } } break; - case JAPANESE: + case LANGUAGE_JAPANESE: while (numberOfNullPointers < 3) { if (*(levelName++) == 0) { numberOfNullPointers++; diff --git a/src/game.h b/src/game.h index 2314842e..23ca246e 100644 --- a/src/game.h +++ b/src/game.h @@ -33,26 +33,6 @@ enum NumberOfPlayers { FOUR_PLAYERS = 3 }; -enum Vehicle { - VEHICLE_CAR, - VEHICLE_HOVERCRAFT, - VEHICLE_PLANE, - - NUMBER_OF_VEHICLE_TYPES, -}; - -enum RaceType { - RACE_TYPE_DEFAULT = 0, - RACE_TYPE_HUB_AREA = 5, - RACE_TYPE_CUTSCENE_1 = 6, - RACE_TYPE_CUTSCENE_2 = 7, - RACE_TYPE_BOSS = 8, - RACE_TYPE_CHALLENGE = 0x40, // For masking - RACE_TYPE_CHALLENGE_BATTLE = 0x40, - RACE_TYPE_CHALLENGE_BANANAS = 0x41, - RACE_TYPE_CHALLENGE_EGGS = 0x42 -}; - extern s8 *D_800DD310; extern s8 D_800DD314; extern u8 D_800DD318; diff --git a/src/menu.c b/src/menu.c index f2e82ad0..f0d51ea1 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1506,13 +1506,13 @@ void load_menu_text(s32 language) { } switch (language) { - case JAPANESE: + case LANGUAGE_JAPANESE: langIndex = 4; break; - case GERMAN: + case LANGUAGE_GERMAN: langIndex = 3; break; - case FRENCH: + case LANGUAGE_FRENCH: langIndex = 2; break; default: // English @@ -1706,7 +1706,7 @@ void func_80081218(void) { gCheatsAssetData = get_misc_asset(0x41); gNumberOfCheats = (s32)(*gCheatsAssetData); gMenuText = allocate_from_main_pool_safe(1024 * sizeof(char *), COLOUR_TAG_WHITE); - load_menu_text(ENGLISH); + load_menu_text(LANGUAGE_ENGLISH); for (i = 0; i < 128; i++) { D_80126550[i] = NULL; } @@ -2445,10 +2445,10 @@ s32 menu_options_loop(s32 arg0) { } else if (D_800DF460 == 0 && analogX != 0) { // Change language s32 currentLang = get_language(); - if ((currentLang >> 31) == 0 && currentLang == ENGLISH) { - set_language(FRENCH); + if ((currentLang >> 31) == 0 && currentLang == LANGUAGE_ENGLISH) { + set_language(LANGUAGE_FRENCH); } else { - set_language(ENGLISH); + set_language(LANGUAGE_ENGLISH); } func_80001D04(0xEB, 0); } else if (D_800DF460 == 1 && analogX != 0) { @@ -6983,16 +6983,16 @@ u64 get_eeprom_settings(void) { * 0 = English, 1 = German, 2 = French, 3 = Japanese */ s32 get_language(void) { - s32 language = ENGLISH; + s32 language = LANGUAGE_ENGLISH; switch (sEepromSettings & 0xC) { case 4: - language = GERMAN; + language = LANGUAGE_GERMAN; break; case 8: - language = FRENCH; + language = LANGUAGE_FRENCH; break; case 12: - language = JAPANESE; + language = LANGUAGE_JAPANESE; break; } return language; @@ -7007,13 +7007,13 @@ void set_language(s32 language) { u64 langFlag = 0; // English switch (language) { - case GERMAN: + case LANGUAGE_GERMAN: langFlag = 4; break; - case FRENCH: + case LANGUAGE_FRENCH: langFlag = 8; break; - case JAPANESE: + case LANGUAGE_JAPANESE: langFlag = 12; break; } diff --git a/src/menu.h b/src/menu.h index b362bf2b..87d48eb8 100644 --- a/src/menu.h +++ b/src/menu.h @@ -94,13 +94,6 @@ typedef enum MENU_ID { MENU_CAUTION } MENU_ID; -enum Language { - ENGLISH, - GERMAN, - FRENCH, - JAPANESE -}; - /* Size: 0x20 bytes */ // So this is looking to be a struct for menu images. typedef struct unk800DF510 { diff --git a/src/objects.c b/src/objects.c index b5a5e59f..0e197942 100644 --- a/src/objects.c +++ b/src/objects.c @@ -1620,7 +1620,7 @@ GLOBAL_ASM("asm/non_matchings/objects/func_8002342C.s") s32 func_80023568(void) { if (D_8011AD3C != 0) { return D_8011AD24[1] + 1; - } else if (get_current_level_race_type() == RACE_TYPE_BOSS) { + } else if (get_current_level_race_type() == RACETYPE_BOSS) { return D_8011AD24[1] + 1; } return 0; diff --git a/src/objects.h b/src/objects.h index f80deee3..1df3bd2c 100644 --- a/src/objects.h +++ b/src/objects.h @@ -19,11 +19,15 @@ typedef struct unknown800DC6F0 { /* Size: 0x3C bytes */ typedef struct unknown8011AECC { - u8 unk00[0x10]; + f32 unk0; + f32 unk4; + f32 unk8; + f32 unkC; f32 unk10; f32 unk14; f32 unk18; - u8 pad1C[0x1E]; + f32 unk1C; + u8 pad20[0x1A]; s8 unk3A; s8 unk3B; } unknown8011AECC; diff --git a/src/racer.c b/src/racer.c index d399dd8f..6d0f9ff6 100644 --- a/src/racer.c +++ b/src/racer.c @@ -288,11 +288,11 @@ void func_80044170(Object *arg0, Object_Racer *arg1, s32 arg2) { raceType = get_current_level_race_type(); switch (raceType) { - case RACE_TYPE_CHALLENGE_BATTLE: - case RACE_TYPE_CHALLENGE_BANANAS: + case RACETYPE_CHALLENGE_BATTLE: + case RACETYPE_CHALLENGE_BANANAS: func_8004447C(arg0, arg1, arg2); break; - case RACE_TYPE_CHALLENGE_EGGS: + case RACETYPE_CHALLENGE_EGGS: func_800452A0(arg0, arg1, arg2); break; default: @@ -316,9 +316,9 @@ void func_80044170(Object *arg0, Object_Racer *arg1, s32 arg2) { arg1->unk214 = 60; arg1->unk215 = 120; - if ((raceType & RACE_TYPE_CHALLENGE) == 0) { + if ((raceType & RACETYPE_CHALLENGE) == 0) { arg1->unk1CA = (arg1->unk1CA + 1) & 3; - } else if (raceType == RACE_TYPE_CHALLENGE_BATTLE || raceType == RACE_TYPE_CHALLENGE_BANANAS) { + } else if (raceType == RACETYPE_CHALLENGE_BATTLE || raceType == RACETYPE_CHALLENGE_BANANAS) { if (arg1->unk1CE != 0xFF) { arg1->unk154 = func_8001D214(arg1->unk1CE); } @@ -509,7 +509,7 @@ void obj_init_racer(Object *obj, LevelObjectEntry_CharacterFlag *arg1) { tempObj->unk194 = 0; tempObj->stretch_height = 1.0f; tempObj->stretch_height_cap = 1.0f; - // Decide which player ID to assign to this object. Human players get a positive value. + // 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_NONE && player < PLAYER_FOUR) { if (func_8000E158()) { diff --git a/src/save_data.c b/src/save_data.c index 73e4af89..2f868b4c 100644 --- a/src/save_data.c +++ b/src/save_data.c @@ -908,8 +908,8 @@ s32 get_controller_pak_file_list(s32 controllerIndex, s32 maxNumOfFilesToGet, u8 start_reading_controller_data(controllerIndex); return (controllerIndex << 30) | CONTROLLER_PAK_BAD_DATA; } - - if (get_language() == JAPANESE) { + + if (get_language() == LANGUAGE_JAPANESE) { gameCode = JPN_GAME_CODE; } else if (osTvType == TV_TYPE_PAL) { gameCode = PAL_GAME_CODE; @@ -1099,7 +1099,7 @@ SIDeviceStatus get_file_number(s32 controllerIndex, u8 *fileName, u8 *fileExt, s string_to_font_codes(fileName, fileNameAsFontCodes, PFS_FILE_NAME_LEN); string_to_font_codes(fileExt, fileExtAsFontCodes, PFS_FILE_EXT_LEN); - if (get_language() == JAPANESE) { + if (get_language() == LANGUAGE_JAPANESE) { gameCode = JPN_GAME_CODE; } else if (osTvType == TV_TYPE_PAL) { gameCode = PAL_GAME_CODE; @@ -1176,7 +1176,7 @@ SIDeviceStatus write_controller_pak_file(s32 controllerIndex, s32 fileNumber, u8 string_to_font_codes(fileName, fileNameAsFontCodes, PFS_FILE_NAME_LEN); string_to_font_codes(fileExt, fileExtAsFontCodes, PFS_FILE_EXT_LEN); - if (get_language() == JAPANESE) { + if (get_language() == LANGUAGE_JAPANESE) { game_code = JPN_GAME_CODE; } else if (osTvType == TV_TYPE_PAL) { game_code = PAL_GAME_CODE; diff --git a/src/unknown_077C50.c b/src/unknown_077C50.c index 396c0479..1fb94650 100644 --- a/src/unknown_077C50.c +++ b/src/unknown_077C50.c @@ -35,7 +35,7 @@ void render_borders_for_multiplayer(Gfx **dlist) { case VIEWPORTS_COUNT_3_PLAYERS: levelHeader = get_current_level_header(); // Draw black square in the bottom-right corner. - if (func_800A8458() || (levelHeader->race_type & RACE_TYPE_CHALLENGE)) { + if (func_800A8458() || (levelHeader->race_type & RACETYPE_CHALLENGE)) { gDPFillRectangle((*dlist)++, width >> 1, height >> 1, width, height); } // There is no break statement here. This is intentional. From 298195bf924f4864962a9004857707f0f119f747 Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Tue, 3 May 2022 17:18:56 +0100 Subject: [PATCH 06/17] match func_80045128 --- asm/non_matchings/racer/func_80045128.s | 104 ------------------------ asm/non_matchings/racer/func_800452A0.s | 16 ++-- include/structs.h | 4 +- src/font.h | 4 +- src/game.h | 2 +- src/racer.c | 30 +++++-- 6 files changed, 37 insertions(+), 123 deletions(-) delete mode 100644 asm/non_matchings/racer/func_80045128.s diff --git a/asm/non_matchings/racer/func_80045128.s b/asm/non_matchings/racer/func_80045128.s deleted file mode 100644 index 52d825e6..00000000 --- a/asm/non_matchings/racer/func_80045128.s +++ /dev/null @@ -1,104 +0,0 @@ -glabel func_80045128 -/* 045D28 80045128 8C8E0000 */ lw $t6, ($a0) -/* 045D2C 8004512C 3C018012 */ lui $at, %hi(D_8011D588) # $at, 0x8012 -/* 045D30 80045130 8DC20064 */ lw $v0, 0x64($t6) -/* 045D34 80045134 00801825 */ move $v1, $a0 -/* 045D38 80045138 804F0193 */ lb $t7, 0x193($v0) -/* 045D3C 8004513C 3C198012 */ lui $t9, %hi(D_8011D588) # $t9, 0x8012 -/* 045D40 80045140 A02FD588 */ sb $t7, %lo(D_8011D588)($at) -/* 045D44 80045144 805801CF */ lb $t8, 0x1cf($v0) -/* 045D48 80045148 3C0F8012 */ lui $t7, %hi(D_8011D589) # $t7, 0x8012 -/* 045D4C 8004514C 13000005 */ beqz $t8, .L80045164 -/* 045D50 80045150 3C0A8012 */ lui $t2, %hi(D_8011D588) # $t2, 0x8012 -/* 045D54 80045154 8339D588 */ lb $t9, %lo(D_8011D588)($t9) -/* 045D58 80045158 3C018012 */ lui $at, %hi(D_8011D588) # $at, 0x8012 -/* 045D5C 8004515C 37280040 */ ori $t0, $t9, 0x40 -/* 045D60 80045160 A028D588 */ sb $t0, %lo(D_8011D588)($at) -.L80045164: -/* 045D64 80045164 8C490144 */ lw $t1, 0x144($v0) -/* 045D68 80045168 3C088012 */ lui $t0, %hi(D_8011D589) # $t0, 0x8012 -/* 045D6C 8004516C 11200005 */ beqz $t1, .L80045184 -/* 045D70 80045170 00000000 */ nop -/* 045D74 80045174 814AD588 */ lb $t2, %lo(D_8011D588)($t2) -/* 045D78 80045178 3C018012 */ lui $at, %hi(D_8011D588) # $at, 0x8012 -/* 045D7C 8004517C 354B0080 */ ori $t3, $t2, 0x80 -/* 045D80 80045180 A02BD588 */ sb $t3, %lo(D_8011D588)($at) -.L80045184: -/* 045D84 80045184 8C6C0004 */ lw $t4, 4($v1) -/* 045D88 80045188 3C018012 */ lui $at, %hi(D_8011D589) # $at, 0x8012 -/* 045D8C 8004518C 8D820064 */ lw $v0, 0x64($t4) -/* 045D90 80045190 00000000 */ nop -/* 045D94 80045194 804D0193 */ lb $t5, 0x193($v0) -/* 045D98 80045198 00000000 */ nop -/* 045D9C 8004519C A02DD589 */ sb $t5, %lo(D_8011D589)($at) -/* 045DA0 800451A0 804E01CF */ lb $t6, 0x1cf($v0) -/* 045DA4 800451A4 3C0D8012 */ lui $t5, %hi(D_8011D58A) # $t5, 0x8012 -/* 045DA8 800451A8 11C00005 */ beqz $t6, .L800451C0 -/* 045DAC 800451AC 00000000 */ nop -/* 045DB0 800451B0 81EFD589 */ lb $t7, %lo(D_8011D589)($t7) -/* 045DB4 800451B4 3C018012 */ lui $at, %hi(D_8011D589) # $at, 0x8012 -/* 045DB8 800451B8 35F80040 */ ori $t8, $t7, 0x40 -/* 045DBC 800451BC A038D589 */ sb $t8, %lo(D_8011D589)($at) -.L800451C0: -/* 045DC0 800451C0 8C590144 */ lw $t9, 0x144($v0) -/* 045DC4 800451C4 3C188012 */ lui $t8, %hi(D_8011D58A) # $t8, 0x8012 -/* 045DC8 800451C8 13200005 */ beqz $t9, .L800451E0 -/* 045DCC 800451CC 00000000 */ nop -/* 045DD0 800451D0 8108D589 */ lb $t0, %lo(D_8011D589)($t0) -/* 045DD4 800451D4 3C018012 */ lui $at, %hi(D_8011D589) # $at, 0x8012 -/* 045DD8 800451D8 35090080 */ ori $t1, $t0, 0x80 -/* 045DDC 800451DC A029D589 */ sb $t1, %lo(D_8011D589)($at) -.L800451E0: -/* 045DE0 800451E0 8C6A0008 */ lw $t2, 8($v1) -/* 045DE4 800451E4 3C018012 */ lui $at, %hi(D_8011D58A) # $at, 0x8012 -/* 045DE8 800451E8 8D420064 */ lw $v0, 0x64($t2) -/* 045DEC 800451EC 00000000 */ nop -/* 045DF0 800451F0 804B0193 */ lb $t3, 0x193($v0) -/* 045DF4 800451F4 00000000 */ nop -/* 045DF8 800451F8 A02BD58A */ sb $t3, %lo(D_8011D58A)($at) -/* 045DFC 800451FC 804C01CF */ lb $t4, 0x1cf($v0) -/* 045E00 80045200 3C0B8012 */ lui $t3, %hi(D_8011D58B) # $t3, 0x8012 -/* 045E04 80045204 11800005 */ beqz $t4, .L8004521C -/* 045E08 80045208 00000000 */ nop -/* 045E0C 8004520C 81ADD58A */ lb $t5, %lo(D_8011D58A)($t5) -/* 045E10 80045210 3C018012 */ lui $at, %hi(D_8011D58A) # $at, 0x8012 -/* 045E14 80045214 35AE0040 */ ori $t6, $t5, 0x40 -/* 045E18 80045218 A02ED58A */ sb $t6, %lo(D_8011D58A)($at) -.L8004521C: -/* 045E1C 8004521C 8C4F0144 */ lw $t7, 0x144($v0) -/* 045E20 80045220 3C0E8012 */ lui $t6, %hi(D_8011D58B) # $t6, 0x8012 -/* 045E24 80045224 11E00005 */ beqz $t7, .L8004523C -/* 045E28 80045228 00000000 */ nop -/* 045E2C 8004522C 8318D58A */ lb $t8, %lo(D_8011D58A)($t8) -/* 045E30 80045230 3C018012 */ lui $at, %hi(D_8011D58A) # $at, 0x8012 -/* 045E34 80045234 37190080 */ ori $t9, $t8, 0x80 -/* 045E38 80045238 A039D58A */ sb $t9, %lo(D_8011D58A)($at) -.L8004523C: -/* 045E3C 8004523C 8C68000C */ lw $t0, 0xc($v1) -/* 045E40 80045240 3C018012 */ lui $at, %hi(D_8011D58B) # $at, 0x8012 -/* 045E44 80045244 8D020064 */ lw $v0, 0x64($t0) -/* 045E48 80045248 00000000 */ nop -/* 045E4C 8004524C 80490193 */ lb $t1, 0x193($v0) -/* 045E50 80045250 00000000 */ nop -/* 045E54 80045254 A029D58B */ sb $t1, %lo(D_8011D58B)($at) -/* 045E58 80045258 804A01CF */ lb $t2, 0x1cf($v0) -/* 045E5C 8004525C 00000000 */ nop -/* 045E60 80045260 11400005 */ beqz $t2, .L80045278 -/* 045E64 80045264 00000000 */ nop -/* 045E68 80045268 816BD58B */ lb $t3, %lo(D_8011D58B)($t3) -/* 045E6C 8004526C 3C018012 */ lui $at, %hi(D_8011D58B) # $at, 0x8012 -/* 045E70 80045270 356C0040 */ ori $t4, $t3, 0x40 -/* 045E74 80045274 A02CD58B */ sb $t4, %lo(D_8011D58B)($at) -.L80045278: -/* 045E78 80045278 8C4D0144 */ lw $t5, 0x144($v0) -/* 045E7C 8004527C 00000000 */ nop -/* 045E80 80045280 11A00005 */ beqz $t5, .L80045298 -/* 045E84 80045284 00000000 */ nop -/* 045E88 80045288 81CED58B */ lb $t6, %lo(D_8011D58B)($t6) -/* 045E8C 8004528C 3C018012 */ lui $at, %hi(D_8011D58B) # $at, 0x8012 -/* 045E90 80045290 35CF0080 */ ori $t7, $t6, 0x80 -/* 045E94 80045294 A02FD58B */ sb $t7, %lo(D_8011D58B)($at) -.L80045298: -/* 045E98 80045298 03E00008 */ jr $ra -/* 045E9C 8004529C 00000000 */ nop - diff --git a/asm/non_matchings/racer/func_800452A0.s b/asm/non_matchings/racer/func_800452A0.s index a4c37e53..e0ee62f6 100644 --- a/asm/non_matchings/racer/func_800452A0.s +++ b/asm/non_matchings/racer/func_800452A0.s @@ -79,11 +79,11 @@ glabel func_800452A0 /* 045F9C 8004539C 8FBE0080 */ lw $fp, 0x80($sp) /* 045FA0 800453A0 24170003 */ li $s7, 3 .L800453A4: -/* 045FA4 800453A4 3C058012 */ lui $a1, %hi(D_8011D58B) # $a1, 0x8012 +/* 045FA4 800453A4 3C058012 */ lui $a1, %hi(D_8011D588+3) # $a1, 0x8012 /* 045FA8 800453A8 2411FFFF */ li $s1, -1 /* 045FAC 800453AC 00008025 */ move $s0, $zero /* 045FB0 800453B0 00009025 */ move $s2, $zero -/* 045FB4 800453B4 24A5D58B */ addiu $a1, %lo(D_8011D58B) # addiu $a1, $a1, -0x2a75 +/* 045FB4 800453B4 24A5D58B */ addiu $a1, %lo(D_8011D588+3) # addiu $a1, $a1, -0x2a75 /* 045FB8 800453B8 02E02025 */ move $a0, $s7 /* 045FBC 800453BC 00009825 */ move $s3, $zero .L800453C0: @@ -177,8 +177,8 @@ glabel func_800452A0 /* 0460FC 800454FC 00008825 */ move $s1, $zero .L80045500: /* 046100 80045500 10410007 */ beq $v0, $at, .L80045520 -/* 046104 80045504 3C0C8012 */ lui $t4, %hi(D_8011D589) # $t4, 0x8012 -/* 046108 80045508 818CD589 */ lb $t4, %lo(D_8011D589)($t4) +/* 046104 80045504 3C0C8012 */ lui $t4, %hi(D_8011D588+1) # $t4, 0x8012 +/* 046108 80045508 818CD589 */ lb $t4, %lo(D_8011D588+1)($t4) /* 04610C 8004550C 00000000 */ nop /* 046110 80045510 318D0040 */ andi $t5, $t4, 0x40 /* 046114 80045514 11A00003 */ beqz $t5, .L80045524 @@ -188,8 +188,8 @@ glabel func_800452A0 /* 046120 80045520 24010002 */ li $at, 2 .L80045524: /* 046124 80045524 10410007 */ beq $v0, $at, .L80045544 -/* 046128 80045528 3C0E8012 */ lui $t6, %hi(D_8011D58A) # $t6, 0x8012 -/* 04612C 8004552C 81CED58A */ lb $t6, %lo(D_8011D58A)($t6) +/* 046128 80045528 3C0E8012 */ lui $t6, %hi(D_8011D588+2) # $t6, 0x8012 +/* 04612C 8004552C 81CED58A */ lb $t6, %lo(D_8011D588+2)($t6) /* 046130 80045530 00000000 */ nop /* 046134 80045534 31CF0040 */ andi $t7, $t6, 0x40 /* 046138 80045538 11E00003 */ beqz $t7, .L80045548 @@ -199,8 +199,8 @@ glabel func_800452A0 /* 046144 80045544 24010003 */ li $at, 3 .L80045548: /* 046148 80045548 10410009 */ beq $v0, $at, .L80045570 -/* 04614C 8004554C 3C188012 */ lui $t8, %hi(D_8011D58B) # $t8, 0x8012 -/* 046150 80045550 8318D58B */ lb $t8, %lo(D_8011D58B)($t8) +/* 04614C 8004554C 3C188012 */ lui $t8, %hi(D_8011D588+3) # $t8, 0x8012 +/* 046150 80045550 8318D58B */ lb $t8, %lo(D_8011D588+3)($t8) /* 046154 80045554 00000000 */ nop /* 046158 80045558 33190040 */ andi $t9, $t8, 0x40 /* 04615C 8004555C 13200005 */ beqz $t9, .L80045574 diff --git a/include/structs.h b/include/structs.h index f6b45364..d8c8b3f4 100644 --- a/include/structs.h +++ b/include/structs.h @@ -916,7 +916,7 @@ typedef struct Object_Racer { /* 0x18E */ s16 unk18E; /* 0x190 */ u16 unk190; /* 0x192 */ u8 unk192; - /* 0x193 */ u8 unk193; + /* 0x193 */ s8 unk193; /* 0x194 */ s8 unk194; /* 0x195 */ s8 unk195; /* 0x196 */ s16 unk196; @@ -946,7 +946,7 @@ typedef struct Object_Racer { /* 0x1CC */ u8 unk1CC; /* 0x1CD */ u8 unk1CD; /* 0x1CE */ u8 unk1CE; - /* 0x1CF */ u8 unk1CF; + /* 0x1CF */ s8 unk1CF; /* 0x1D0 */ u8 unk1D0; /* 0x1D1 */ u8 unk1D1; /* 0x1D2 */ u8 unk1D2; diff --git a/src/font.h b/src/font.h index 1c8669ef..5b8bc28d 100644 --- a/src/font.h +++ b/src/font.h @@ -22,7 +22,7 @@ typedef enum TextFonts { FONT_COLOURFUL, FONT_SMALL, FONT_LARGE, - FONT_UNK_FF = 255, + FONT_UNK_FF = 255 } TextFonts; enum DialogueFlags { @@ -31,7 +31,7 @@ enum DialogueFlags { DIALOGUE_BOX_CLOSED = 0x7FFF, DIALOGUE_BOX_OPEN = 0x8000, DIALOGUE_BOX_UNK_02 = 0xBFFF, - DIALOGUE_BOX_UNUSED_02 = 0xFFFE, + DIALOGUE_BOX_UNUSED_02 = 0xFFFE }; /* Size: 0x20 bytes */ diff --git a/src/game.h b/src/game.h index 23ca246e..5b284aa6 100644 --- a/src/game.h +++ b/src/game.h @@ -13,7 +13,7 @@ enum RenderContext { DRAW_UNK_02, DRAW_UNK_03, DRAW_UNK_04, - DRAW_CRASH_SCREEN, + DRAW_CRASH_SCREEN }; /* Size: 6 bytes */ diff --git a/src/racer.c b/src/racer.c index 6d0f9ff6..79342cc8 100644 --- a/src/racer.c +++ b/src/racer.c @@ -172,11 +172,7 @@ s8 D_8011D583; s8 D_8011D584; s8 D_8011D585; s16 D_8011D586; -s8 D_8011D588; -s8 D_8011D589; -s8 D_8011D58A; -s8 D_8011D58B; -s8 D_8011D58B; +s8 D_8011D588[4]; s8 D_8011D58C[4]; GhostHeader *gGhostData[3]; s8 D_8011D59C; @@ -364,7 +360,29 @@ s32 func_80044450(s32 arg0) { } GLOBAL_ASM("asm/non_matchings/racer/func_8004447C.s") -GLOBAL_ASM("asm/non_matchings/racer/func_80045128.s") + +struct TempStruct2 { + Object *unk0[4]; + u8 pad10[0x1BF]; + s32 unk1CF; +}; + +void func_80045128(struct TempStruct2 *header) { + struct Object_Racer *obj; + s32 i; + + for (i = 0; i < 4; i++) { + obj = (struct Object_Racer *) header->unk0[i]->unk64; + D_8011D588[i] = obj->unk193; + if (obj->unk1CF != 0) { + D_8011D588[i] |= 0x40; + } + if (obj->held_obj != 0) { + D_8011D588[i] |= 0x80; + } + } +} + 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") From a8d3c29c8b6aa2342eb6928ee6b61a1ca2225acb Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Tue, 3 May 2022 17:50:44 +0100 Subject: [PATCH 07/17] match func_80050754 makes you feel dumb when the permuter matches on literally the first try and also when I realise I could've saved time from seeing this func was already a wip --- asm/non_matchings/racer/func_80050754.s | 65 ------------------------- src/racer.c | 46 ++++++++--------- 2 files changed, 20 insertions(+), 91 deletions(-) delete mode 100644 asm/non_matchings/racer/func_80050754.s diff --git a/asm/non_matchings/racer/func_80050754.s b/asm/non_matchings/racer/func_80050754.s deleted file mode 100644 index daea1fee..00000000 --- a/asm/non_matchings/racer/func_80050754.s +++ /dev/null @@ -1,65 +0,0 @@ -glabel func_80050754 -/* 051354 80050754 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 051358 80050758 AFBF001C */ sw $ra, 0x1c($sp) -/* 05135C 8005075C AFB00018 */ sw $s0, 0x18($sp) -/* 051360 80050760 240E0028 */ li $t6, 40 -/* 051364 80050764 A080003B */ sb $zero, 0x3b($a0) -/* 051368 80050768 A48E0018 */ sh $t6, 0x18($a0) -/* 05136C 8005076C 8CA20148 */ lw $v0, 0x148($a1) -/* 051370 80050770 C486000C */ lwc1 $f6, 0xc($a0) -/* 051374 80050774 C444000C */ lwc1 $f4, 0xc($v0) -/* 051378 80050778 C48A0010 */ lwc1 $f10, 0x10($a0) -/* 05137C 8005077C 46062001 */ sub.s $f0, $f4, $f6 -/* 051380 80050780 C4840014 */ lwc1 $f4, 0x14($a0) -/* 051384 80050784 C4480010 */ lwc1 $f8, 0x10($v0) -/* 051388 80050788 C4520014 */ lwc1 $f18, 0x14($v0) -/* 05138C 8005078C 44867000 */ mtc1 $a2, $f14 -/* 051390 80050790 460A4081 */ sub.s $f2, $f8, $f10 -/* 051394 80050794 00A08025 */ move $s0, $a1 -/* 051398 80050798 46049301 */ sub.s $f12, $f18, $f4 -/* 05139C 8005079C 44050000 */ mfc1 $a1, $f0 -/* 0513A0 800507A0 44076000 */ mfc1 $a3, $f12 -/* 0513A4 800507A4 44061000 */ mfc1 $a2, $f2 -/* 0513A8 800507A8 E7AC0024 */ swc1 $f12, 0x24($sp) -/* 0513AC 800507AC E7A20028 */ swc1 $f2, 0x28($sp) -/* 0513B0 800507B0 E7A0002C */ swc1 $f0, 0x2c($sp) -/* 0513B4 800507B4 AFA40030 */ sw $a0, 0x30($sp) -/* 0513B8 800507B8 0C00455C */ jal func_80011570 -/* 0513BC 800507BC E7AE0038 */ swc1 $f14, 0x38($sp) -/* 0513C0 800507C0 8E0F0148 */ lw $t7, 0x148($s0) -/* 0513C4 800507C4 8FA40030 */ lw $a0, 0x30($sp) -/* 0513C8 800507C8 85F80000 */ lh $t8, ($t7) -/* 0513CC 800507CC C7A0002C */ lwc1 $f0, 0x2c($sp) -/* 0513D0 800507D0 C7A20028 */ lwc1 $f2, 0x28($sp) -/* 0513D4 800507D4 C7AC0024 */ lwc1 $f12, 0x24($sp) -/* 0513D8 800507D8 C7AE0038 */ lwc1 $f14, 0x38($sp) -/* 0513DC 800507DC A4980000 */ sh $t8, ($a0) -/* 0513E0 800507E0 8E190148 */ lw $t9, 0x148($s0) -/* 0513E4 800507E4 460E0183 */ div.s $f6, $f0, $f14 -/* 0513E8 800507E8 87280002 */ lh $t0, 2($t9) -/* 0513EC 800507EC 44808000 */ mtc1 $zero, $f16 -/* 0513F0 800507F0 A4880002 */ sh $t0, 2($a0) -/* 0513F4 800507F4 8E090148 */ lw $t1, 0x148($s0) -/* 0513F8 800507F8 00000000 */ nop -/* 0513FC 800507FC 852A0004 */ lh $t2, 4($t1) -/* 051400 80050800 00000000 */ nop -/* 051404 80050804 A48A0004 */ sh $t2, 4($a0) -/* 051408 80050808 848B0004 */ lh $t3, 4($a0) -/* 05140C 8005080C 00000000 */ nop -/* 051410 80050810 A60B01A4 */ sh $t3, 0x1a4($s0) -/* 051414 80050814 460E1203 */ div.s $f8, $f2, $f14 -/* 051418 80050818 848C0000 */ lh $t4, ($a0) -/* 05141C 8005081C 00000000 */ nop -/* 051420 80050820 A60C01A0 */ sh $t4, 0x1a0($s0) -/* 051424 80050824 E486001C */ swc1 $f6, 0x1c($a0) -/* 051428 80050828 460E6283 */ div.s $f10, $f12, $f14 -/* 05142C 8005082C E4880020 */ swc1 $f8, 0x20($a0) -/* 051430 80050830 E48A0024 */ swc1 $f10, 0x24($a0) -/* 051434 80050834 A20001F2 */ sb $zero, 0x1f2($s0) -/* 051438 80050838 E610002C */ swc1 $f16, 0x2c($s0) -/* 05143C 8005083C E6100030 */ swc1 $f16, 0x30($s0) -/* 051440 80050840 8FBF001C */ lw $ra, 0x1c($sp) -/* 051444 80050844 8FB00018 */ lw $s0, 0x18($sp) -/* 051448 80050848 03E00008 */ jr $ra -/* 05144C 8005084C 27BD0030 */ addiu $sp, $sp, 0x30 - diff --git a/src/racer.c b/src/racer.c index 79342cc8..7674013e 100644 --- a/src/racer.c +++ b/src/racer.c @@ -642,35 +642,29 @@ void func_8004F77C(unk8004F77C *arg0) { GLOBAL_ASM("asm/non_matchings/racer/func_8004F7F4.s") -#ifdef NON_EQUIVALENT - -// Mainly has regalloc issues. -void func_80050754(Object *obj, Object_Racer *obj64, f32 arg2) { - f32 xDiff, yDiff, zDiff; - Object *someObj; +void func_80050754(Object *obj, Object_Racer *racer, f32 arg2) { + f32 diffX; + f32 diffY; + f32 diffZ; obj->segment.unk3B = 0; - obj->segment.unk18 = 0x28; - someObj = obj64->unk148; - xDiff = someObj->segment.trans.x_position - obj->segment.trans.x_position; - yDiff = someObj->segment.trans.y_position - obj->segment.trans.y_position; - zDiff = someObj->segment.trans.z_position - obj->segment.trans.z_position; - func_80011570(obj, xDiff, yDiff, zDiff); - obj->segment.trans.y_rotation = obj64->unk148->segment.trans.y_rotation; - obj->segment.trans.x_rotation = obj64->unk148->segment.trans.x_rotation; - obj->segment.trans.z_rotation = obj64->unk148->segment.trans.z_rotation; - obj64->unk1A4 = obj->segment.trans.z_rotation; - obj64->unk1A0 = obj->segment.trans.y_rotation; - obj->segment.x_velocity = xDiff / arg2; - obj->segment.y_velocity = yDiff / arg2; - obj->segment.z_velocity = zDiff / arg2; - obj64->unk1F2 = 0; - obj64->velocity = 0.0f; - obj64->lateral_velocity = 0.0f; + 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); + 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->unk1A4 = obj->segment.trans.z_rotation; + racer->unk1A0 = obj->segment.trans.y_rotation; + obj->segment.x_velocity = diffX / arg2; + obj->segment.y_velocity = diffY / arg2; + obj->segment.z_velocity = diffZ / arg2; + racer->velocity = 0.0f; + racer->unk1F2 = 0; + racer->lateral_velocity = 0.0f; } -#else -GLOBAL_ASM("asm/non_matchings/racer/func_80050754.s") -#endif /** * Applies visual rotational offets to vehicles. * Examples include planes when on the ground, or when crashing, or hovercraft when braking. From 862ef369dfee999aef481839e6e4424b1f83d742 Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Tue, 3 May 2022 18:45:09 +0100 Subject: [PATCH 08/17] match func_80058F44 --- asm/non_matchings/racer/func_80058F44.s | 81 ------------------------- src/racer.c | 26 ++++---- 2 files changed, 15 insertions(+), 92 deletions(-) delete mode 100644 asm/non_matchings/racer/func_80058F44.s diff --git a/asm/non_matchings/racer/func_80058F44.s b/asm/non_matchings/racer/func_80058F44.s deleted file mode 100644 index 8f7a0d44..00000000 --- a/asm/non_matchings/racer/func_80058F44.s +++ /dev/null @@ -1,81 +0,0 @@ -glabel func_80058F44 -/* 059B44 80058F44 444EF800 */ cfc1 $t6, $31 -/* 059B48 80058F48 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 059B4C 80058F4C 35C10003 */ ori $at, $t6, 3 -/* 059B50 80058F50 38210002 */ xori $at, $at, 2 -/* 059B54 80058F54 44C1F800 */ ctc1 $at, $31 -/* 059B58 80058F58 AFBF0014 */ sw $ra, 0x14($sp) -/* 059B5C 80058F5C AFA60028 */ sw $a2, 0x28($sp) -/* 059B60 80058F60 3C038012 */ lui $v1, %hi(gCameraObject) # $v1, 0x8012 -/* 059B64 80058F64 8C63D508 */ lw $v1, %lo(gCameraObject)($v1) -/* 059B68 80058F68 46006124 */ cvt.w.s $f4, $f12 -/* 059B6C 80058F6C C4A8000C */ lwc1 $f8, 0xc($a1) -/* 059B70 80058F70 44CEF800 */ ctc1 $t6, $31 -/* 059B74 80058F74 C4B00014 */ lwc1 $f16, 0x14($a1) -/* 059B78 80058F78 C466000C */ lwc1 $f6, 0xc($v1) -/* 059B7C 80058F7C C46A0014 */ lwc1 $f10, 0x14($v1) -/* 059B80 80058F80 46083001 */ sub.s $f0, $f6, $f8 -/* 059B84 80058F84 44082000 */ mfc1 $t0, $f4 -/* 059B88 80058F88 46105081 */ sub.s $f2, $f10, $f16 -/* 059B8C 80058F8C AFA8001C */ sw $t0, 0x1c($sp) -/* 059B90 80058F90 444FF800 */ cfc1 $t7, $31 -/* 059B94 80058F94 00000000 */ nop -/* 059B98 80058F98 35E10003 */ ori $at, $t7, 3 -/* 059B9C 80058F9C 38210002 */ xori $at, $at, 2 -/* 059BA0 80058FA0 44C1F800 */ ctc1 $at, $31 -/* 059BA4 80058FA4 00000000 */ nop -/* 059BA8 80058FA8 460004A4 */ cvt.w.s $f18, $f0 -/* 059BAC 80058FAC 44CFF800 */ ctc1 $t7, $31 -/* 059BB0 80058FB0 44049000 */ mfc1 $a0, $f18 -/* 059BB4 80058FB4 00000000 */ nop -/* 059BB8 80058FB8 4458F800 */ cfc1 $t8, $31 -/* 059BBC 80058FBC 00000000 */ nop -/* 059BC0 80058FC0 37010003 */ ori $at, $t8, 3 -/* 059BC4 80058FC4 38210002 */ xori $at, $at, 2 -/* 059BC8 80058FC8 44C1F800 */ ctc1 $at, $31 -/* 059BCC 80058FCC 00000000 */ nop -/* 059BD0 80058FD0 46001124 */ cvt.w.s $f4, $f2 -/* 059BD4 80058FD4 44052000 */ mfc1 $a1, $f4 -/* 059BD8 80058FD8 44D8F800 */ ctc1 $t8, $31 -/* 059BDC 80058FDC 0C01C19B */ jal func_8007066C -/* 059BE0 80058FE0 00000000 */ nop -/* 059BE4 80058FE4 3C078012 */ lui $a3, %hi(gCameraObject) # $a3, 0x8012 -/* 059BE8 80058FE8 24E7D508 */ addiu $a3, %lo(gCameraObject) # addiu $a3, $a3, -0x2af8 -/* 059BEC 80058FEC 8CE30000 */ lw $v1, ($a3) -/* 059BF0 80058FF0 0002C823 */ negu $t9, $v0 -/* 059BF4 80058FF4 84640000 */ lh $a0, ($v1) -/* 059BF8 80058FF8 8FA8001C */ lw $t0, 0x1c($sp) -/* 059BFC 80058FFC 34018000 */ li $at, 32768 -/* 059C00 80059000 03244823 */ subu $t1, $t9, $a0 -/* 059C04 80059004 01215021 */ addu $t2, $t1, $at -/* 059C08 80059008 01480019 */ multu $t2, $t0 -/* 059C0C 8005900C 00005812 */ mflo $t3 -/* 059C10 80059010 000B6103 */ sra $t4, $t3, 4 -/* 059C14 80059014 008C6821 */ addu $t5, $a0, $t4 -/* 059C18 80059018 A46D0000 */ sh $t5, ($v1) -/* 059C1C 8005901C 8CE30000 */ lw $v1, ($a3) -/* 059C20 80059020 00000000 */ nop -/* 059C24 80059024 84650004 */ lh $a1, 4($v1) -/* 059C28 80059028 00000000 */ nop -/* 059C2C 8005902C 00A80019 */ multu $a1, $t0 -/* 059C30 80059030 00007012 */ mflo $t6 -/* 059C34 80059034 000E7903 */ sra $t7, $t6, 4 -/* 059C38 80059038 00AFC023 */ subu $t8, $a1, $t7 -/* 059C3C 8005903C A4780004 */ sh $t8, 4($v1) -/* 059C40 80059040 8CE30000 */ lw $v1, ($a3) -/* 059C44 80059044 8FB90028 */ lw $t9, 0x28($sp) -/* 059C48 80059048 C46C000C */ lwc1 $f12, 0xc($v1) -/* 059C4C 8005904C 8C660014 */ lw $a2, 0x14($v1) -/* 059C50 80059050 C72E003C */ lwc1 $f14, 0x3c($t9) -/* 059C54 80059054 0C00A7C6 */ jal get_level_segment_index_from_position -/* 059C58 80059058 00000000 */ nop -/* 059C5C 8005905C 3C078012 */ lui $a3, %hi(gCameraObject) # $a3, 0x8012 -/* 059C60 80059060 24E7D508 */ addiu $a3, %lo(gCameraObject) # addiu $a3, $a3, -0x2af8 -/* 059C64 80059064 8CE90000 */ lw $t1, ($a3) -/* 059C68 80059068 00000000 */ nop -/* 059C6C 8005906C A5220034 */ sh $v0, 0x34($t1) -/* 059C70 80059070 8FBF0014 */ lw $ra, 0x14($sp) -/* 059C74 80059074 27BD0020 */ addiu $sp, $sp, 0x20 -/* 059C78 80059078 03E00008 */ jr $ra -/* 059C7C 8005907C 00000000 */ nop - diff --git a/src/racer.c b/src/racer.c index 7674013e..4d929b96 100644 --- a/src/racer.c +++ b/src/racer.c @@ -18,6 +18,7 @@ #include "game.h" #include "printf.h" #include "math_util.h" +#include "unknown_0255E0.h" #define MAX_NUMBER_OF_GHOST_NODES 360 @@ -665,6 +666,7 @@ void func_80050754(Object *obj, Object_Racer *racer, f32 arg2) { racer->unk1F2 = 0; racer->lateral_velocity = 0.0f; } + /** * Applies visual rotational offets to vehicles. * Examples include planes when on the ground, or when crashing, or hovercraft when braking. @@ -1084,18 +1086,20 @@ GLOBAL_ASM("asm/non_matchings/racer/func_800581E8.s") GLOBAL_ASM("asm/non_matchings/racer/func_80058B84.s") GLOBAL_ASM("asm/non_matchings/racer/func_80058D5C.s") -#ifdef NON_EQUIVALENT -void func_80058F44(f32 arg0, Object *arg1, Object *arg2) { - s32 temp0, temp1; - temp0 = (s32)arg0; - temp1 = func_8007066C(gCameraObject->trans.x_position - arg1->segment.trans.x_position, gCameraObject->trans.z_position - arg1->segment.trans.z_position); - gCameraObject->y_rotation += (((-temp1 - gCameraObject->y_rotation) + 0x8000) * temp0) >> 4; - gCameraObject->z_rotation -= (gCameraObject->z_rotation * temp0) >> 4; - gCameraObject->unk34 = get_level_segment_index_from_position(gCameraObject->trans.x_position, arg2->segment.unk3C_a.unk3C_f, gCameraObject->trans.z_position); +void func_80058F44(f32 arg0, struct Object *arg1, struct Object *arg2) +{ + s32 temp_f4; + f32 diffX; + f32 diffZ; + temp_f4 = (s32) arg0; + diffX = gCameraObject->trans.x_position - arg1->segment.trans.x_position; + diffZ = gCameraObject->trans.z_position - arg1->segment.trans.z_position; + gCameraObject->trans.y_rotation += ((((-func_8007066C((s32) diffX, (s32) diffZ)) - + gCameraObject->trans.y_rotation) + 0x8000) * temp_f4) >> 4; + gCameraObject->trans.z_rotation -= (((s32) (gCameraObject->trans.z_rotation * temp_f4)) >> 4); + gCameraObject->unk34 = get_level_segment_index_from_position(gCameraObject->trans.x_position, + arg2->segment.unk3C_a.unk3C_f, gCameraObject->trans.z_position); } -#else -GLOBAL_ASM("asm/non_matchings/racer/func_80058F44.s") -#endif typedef struct Object_64_80059080 { u8 pad0[0x10]; From 03c54b030b2f500749df24ea68a93d780b13c47a Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Tue, 3 May 2022 19:26:32 +0100 Subject: [PATCH 09/17] match func_800570B8 --- asm/non_matchings/racer/func_800570B8.s | 99 ------------------------- src/racer.c | 42 +++++------ 2 files changed, 17 insertions(+), 124 deletions(-) delete mode 100644 asm/non_matchings/racer/func_800570B8.s diff --git a/asm/non_matchings/racer/func_800570B8.s b/asm/non_matchings/racer/func_800570B8.s deleted file mode 100644 index eccd6912..00000000 --- a/asm/non_matchings/racer/func_800570B8.s +++ /dev/null @@ -1,99 +0,0 @@ -glabel func_800570B8 -/* 057CB8 800570B8 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 057CBC 800570BC AFBF002C */ sw $ra, 0x2c($sp) -/* 057CC0 800570C0 AFB30028 */ sw $s3, 0x28($sp) -/* 057CC4 800570C4 AFB20024 */ sw $s2, 0x24($sp) -/* 057CC8 800570C8 AFB10020 */ sw $s1, 0x20($sp) -/* 057CCC 800570CC AFB0001C */ sw $s0, 0x1c($sp) -/* 057CD0 800570D0 AFA40038 */ sw $a0, 0x38($sp) -/* 057CD4 800570D4 AFA60040 */ sw $a2, 0x40($sp) -/* 057CD8 800570D8 8C920064 */ lw $s2, 0x64($a0) -/* 057CDC 800570DC 00E08025 */ move $s0, $a3 -/* 057CE0 800570E0 8E4F0108 */ lw $t7, 0x108($s2) -/* 057CE4 800570E4 00A09825 */ move $s3, $a1 -/* 057CE8 800570E8 15E00046 */ bnez $t7, .L80057204 -/* 057CEC 800570EC 30F80080 */ andi $t8, $a3, 0x80 -/* 057CF0 800570F0 13000004 */ beqz $t8, .L80057104 -/* 057CF4 800570F4 3C198012 */ lui $t9, %hi(D_8011D55C) # $t9, 0x8012 -/* 057CF8 800570F8 8F39D55C */ lw $t9, %lo(D_8011D55C)($t9) -/* 057CFC 800570FC 2401FFFF */ li $at, -1 -/* 057D00 80057100 13210040 */ beq $t9, $at, .L80057204 -.L80057104: -/* 057D04 80057104 24010002 */ li $at, 2 -/* 057D08 80057108 1601000C */ bne $s0, $at, .L8005713C -/* 057D0C 8005710C 00000000 */ nop -/* 057D10 80057110 8E440024 */ lw $a0, 0x24($s2) -/* 057D14 80057114 00000000 */ nop -/* 057D18 80057118 10800008 */ beqz $a0, .L8005713C -/* 057D1C 8005711C 00000000 */ nop -/* 057D20 80057120 9649002A */ lhu $t1, 0x2a($s2) -/* 057D24 80057124 00000000 */ nop -/* 057D28 80057128 12690004 */ beq $s3, $t1, .L8005713C -/* 057D2C 8005712C 00000000 */ nop -/* 057D30 80057130 0C0025BE */ jal func_800096F8 -/* 057D34 80057134 00000000 */ nop -/* 057D38 80057138 AE400024 */ sw $zero, 0x24($s2) -.L8005713C: -/* 057D3C 8005713C 8E4A0024 */ lw $t2, 0x24($s2) -/* 057D40 80057140 24010003 */ li $at, 3 -/* 057D44 80057144 15400030 */ bnez $t2, .L80057208 -/* 057D48 80057148 8FBF002C */ lw $ra, 0x2c($sp) -/* 057D4C 8005714C 16010005 */ bne $s0, $at, .L80057164 -/* 057D50 80057150 00002025 */ move $a0, $zero -/* 057D54 80057154 0C01BE53 */ jal get_random_number_from_range -/* 057D58 80057158 24050001 */ li $a1, 1 -/* 057D5C 8005715C 1040002A */ beqz $v0, .L80057208 -/* 057D60 80057160 8FBF002C */ lw $ra, 0x2c($sp) -.L80057164: -/* 057D64 80057164 A653002A */ sh $s3, 0x2a($s2) -/* 057D68 80057168 8FB10040 */ lw $s1, 0x40($sp) -/* 057D6C 8005716C 824B0003 */ lb $t3, 3($s2) -/* 057D70 80057170 2631FFFF */ addiu $s1, $s1, -1 -/* 057D74 80057174 02202825 */ move $a1, $s1 -/* 057D78 80057178 00002025 */ move $a0, $zero -/* 057D7C 8005717C 0C01BE53 */ jal get_random_number_from_range -/* 057D80 80057180 026B9821 */ addu $s3, $s3, $t3 -/* 057D84 80057184 2410000C */ li $s0, 12 -/* 057D88 80057188 00500019 */ multu $v0, $s0 -/* 057D8C 8005718C 00006012 */ mflo $t4 -/* 057D90 80057190 01931821 */ addu $v1, $t4, $s3 -/* 057D94 80057194 1A20000D */ blez $s1, .L800571CC -/* 057D98 80057198 00604025 */ move $t0, $v1 -/* 057D9C 8005719C 964D0028 */ lhu $t5, 0x28($s2) -/* 057DA0 800571A0 00000000 */ nop -/* 057DA4 800571A4 146D0009 */ bne $v1, $t5, .L800571CC -/* 057DA8 800571A8 00002025 */ move $a0, $zero -.L800571AC: -/* 057DAC 800571AC 0C01BE53 */ jal get_random_number_from_range -/* 057DB0 800571B0 02202825 */ move $a1, $s1 -/* 057DB4 800571B4 00500019 */ multu $v0, $s0 -/* 057DB8 800571B8 964F0028 */ lhu $t7, 0x28($s2) -/* 057DBC 800571BC 00007012 */ mflo $t6 -/* 057DC0 800571C0 01D34021 */ addu $t0, $t6, $s3 -/* 057DC4 800571C4 110FFFF9 */ beq $t0, $t7, .L800571AC -/* 057DC8 800571C8 00002025 */ move $a0, $zero -.L800571CC: -/* 057DCC 800571CC 8FB80038 */ lw $t8, 0x38($sp) -/* 057DD0 800571D0 24190004 */ li $t9, 4 -/* 057DD4 800571D4 8F05000C */ lw $a1, 0xc($t8) -/* 057DD8 800571D8 8F060010 */ lw $a2, 0x10($t8) -/* 057DDC 800571DC 8F070014 */ lw $a3, 0x14($t8) -/* 057DE0 800571E0 26490024 */ addiu $t1, $s2, 0x24 -/* 057DE4 800571E4 AFA90014 */ sw $t1, 0x14($sp) -/* 057DE8 800571E8 AFA80034 */ sw $t0, 0x34($sp) -/* 057DEC 800571EC AFB90010 */ sw $t9, 0x10($sp) -/* 057DF0 800571F0 0C002556 */ jal func_80009558 -/* 057DF4 800571F4 3104FFFF */ andi $a0, $t0, 0xffff -/* 057DF8 800571F8 8FA80034 */ lw $t0, 0x34($sp) -/* 057DFC 800571FC 00000000 */ nop -/* 057E00 80057200 A6480028 */ sh $t0, 0x28($s2) -.L80057204: -/* 057E04 80057204 8FBF002C */ lw $ra, 0x2c($sp) -.L80057208: -/* 057E08 80057208 8FB0001C */ lw $s0, 0x1c($sp) -/* 057E0C 8005720C 8FB10020 */ lw $s1, 0x20($sp) -/* 057E10 80057210 8FB20024 */ lw $s2, 0x24($sp) -/* 057E14 80057214 8FB30028 */ lw $s3, 0x28($sp) -/* 057E18 80057218 03E00008 */ jr $ra -/* 057E1C 8005721C 27BD0038 */ addiu $sp, $sp, 0x38 - diff --git a/src/racer.c b/src/racer.c index 4d929b96..aed54782 100644 --- a/src/racer.c +++ b/src/racer.c @@ -988,40 +988,32 @@ void func_800570A4(Object *obj, s32 arg1, s32 arg2) { temp->unk210 = arg2; } -#ifdef NON_EQUIVALENT -void func_800570B8(Object *obj, s32 arg1, s32 arg2, s32 arg3) { - s32 phi_t0; - Object_Racer *obj64; +void func_800570B8(Object* obj, s32 arg1, s32 arg2, s32 arg3) { + s32 temp_v1; + Object_64* temp_s2; - obj64 = &obj->unk64->racer; - if ((obj64->unk108 == 0) && ((!(arg3 & 0x80)) || (D_8011D55C != -1))) { + temp_s2 = obj->unk64; + if ((temp_s2->racer.unk108 == 0) && ((!(arg3 & 0x80)) || (D_8011D55C != -1))) { if (arg3 == 2) { - if ((obj64->unk24 != 0) && (arg1 != obj64->unk2A)) { - func_800096F8(obj64->unk24); - obj64->unk24 = 0; + if ((temp_s2->racer.unk24 != 0) && (arg1 != temp_s2->racer.unk2A)) { + func_800096F8(temp_s2->racer.unk24); + temp_s2->racer.unk24 = 0; } } - if (obj64->unk24 == 0) { - if (arg3 != 3 || get_random_number_from_range(0, 1) != 0) { - obj64->unk2A = arg1; - arg1 += obj64->characterId; - arg2--; - phi_t0 = (get_random_number_from_range(0, arg2) * 12) + arg1; - if (arg2 > 0) { - while (phi_t0 == obj64->unk28) { - phi_t0 = (get_random_number_from_range(0, arg2) * 12) + arg1; - } + if ((temp_s2->racer.unk24 == 0) && ((arg3 != 3) || (get_random_number_from_range(0, 1) != 0))) { + temp_s2->racer.unk2A = arg1; + arg1 += temp_s2->racer.characterId; + temp_v1 = (get_random_number_from_range(0, arg2 - 1) * 12) + arg1; + if (arg2 - 1 > 0) { + while (temp_v1 == temp_s2->racer.unk28) { + temp_v1 = (get_random_number_from_range(0, arg2 - 1) * 12) + arg1; } - //sp34 = phi_t0; - func_80009558(phi_t0, obj->segment.trans.x_position, obj->segment.trans.y_position, obj->segment.trans.z_position, 4, &obj64->unk24); - obj64->unk28 = phi_t0; } + func_80009558(temp_v1, obj->segment.trans.x_position, obj->segment.trans.y_position, obj->segment.trans.z_position, 4, &temp_s2->racer.unk24); + temp_s2->racer.unk28 = temp_v1; } } } -#else -GLOBAL_ASM("asm/non_matchings/racer/func_800570B8.s") -#endif GLOBAL_ASM("asm/non_matchings/racer/func_80057220.s") From 2579d013144598401123890d4fefc19e7e1871c2 Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Tue, 3 May 2022 20:59:56 +0100 Subject: [PATCH 10/17] match func_80058B84 --- asm/non_matchings/racer/func_80058B84.s | 123 ------------------------ src/racer.c | 32 +++++- 2 files changed, 31 insertions(+), 124 deletions(-) delete mode 100644 asm/non_matchings/racer/func_80058B84.s diff --git a/asm/non_matchings/racer/func_80058B84.s b/asm/non_matchings/racer/func_80058B84.s deleted file mode 100644 index 0fd51b1f..00000000 --- a/asm/non_matchings/racer/func_80058B84.s +++ /dev/null @@ -1,123 +0,0 @@ -glabel func_80058B84 -/* 059784 80058B84 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 059788 80058B88 AFB00018 */ sw $s0, 0x18($sp) -/* 05978C 80058B8C 3C108012 */ lui $s0, %hi(gCameraObject) # $s0, 0x8012 -/* 059790 80058B90 2610D508 */ addiu $s0, %lo(gCameraObject) # addiu $s0, $s0, -0x2af8 -/* 059794 80058B94 8E020000 */ lw $v0, ($s0) -/* 059798 80058B98 AFBF001C */ sw $ra, 0x1c($sp) -/* 05979C 80058B9C E7AC0030 */ swc1 $f12, 0x30($sp) -/* 0597A0 80058BA0 AFA60038 */ sw $a2, 0x38($sp) -/* 0597A4 80058BA4 844E0000 */ lh $t6, ($v0) -/* 0597A8 80058BA8 24180400 */ li $t8, 1024 -/* 0597AC 80058BAC 25CF0200 */ addiu $t7, $t6, 0x200 -/* 0597B0 80058BB0 A44F0000 */ sh $t7, ($v0) -/* 0597B4 80058BB4 8E190000 */ lw $t9, ($s0) -/* 0597B8 80058BB8 3C014316 */ li $at, 0x43160000 # 150.000000 -/* 0597BC 80058BBC A7380002 */ sh $t8, 2($t9) -/* 0597C0 80058BC0 8E080000 */ lw $t0, ($s0) -/* 0597C4 80058BC4 44812000 */ mtc1 $at, $f4 -/* 0597C8 80058BC8 A5000004 */ sh $zero, 4($t0) -/* 0597CC 80058BCC 8E090000 */ lw $t1, ($s0) -/* 0597D0 80058BD0 340C8000 */ li $t4, 32768 -/* 0597D4 80058BD4 E524001C */ swc1 $f4, 0x1c($t1) -/* 0597D8 80058BD8 8E0A0000 */ lw $t2, ($s0) -/* 0597DC 80058BDC 00000000 */ nop -/* 0597E0 80058BE0 854B0000 */ lh $t3, ($t2) -/* 0597E4 80058BE4 AFA50034 */ sw $a1, 0x34($sp) -/* 0597E8 80058BE8 018B2023 */ subu $a0, $t4, $t3 -/* 0597EC 80058BEC 00046C00 */ sll $t5, $a0, 0x10 -/* 0597F0 80058BF0 0C01C1F1 */ jal func_800707C4 -/* 0597F4 80058BF4 000D2403 */ sra $a0, $t5, 0x10 -/* 0597F8 80058BF8 8E020000 */ lw $v0, ($s0) -/* 0597FC 80058BFC 34188000 */ li $t8, 32768 -/* 059800 80058C00 C446001C */ lwc1 $f6, 0x1c($v0) -/* 059804 80058C04 00000000 */ nop -/* 059808 80058C08 46060202 */ mul.s $f8, $f0, $f6 -/* 05980C 80058C0C E7A80020 */ swc1 $f8, 0x20($sp) -/* 059810 80058C10 844F0000 */ lh $t7, ($v0) -/* 059814 80058C14 00000000 */ nop -/* 059818 80058C18 030F2023 */ subu $a0, $t8, $t7 -/* 05981C 80058C1C 0004CC00 */ sll $t9, $a0, 0x10 -/* 059820 80058C20 0C01C1FE */ jal func_800707F8 -/* 059824 80058C24 00192403 */ sra $a0, $t9, 0x10 -/* 059828 80058C28 8FA50034 */ lw $a1, 0x34($sp) -/* 05982C 80058C2C C7A60020 */ lwc1 $f6, 0x20($sp) -/* 059830 80058C30 C4A4000C */ lwc1 $f4, 0xc($a1) -/* 059834 80058C34 8E020000 */ lw $v0, ($s0) -/* 059838 80058C38 46062200 */ add.s $f8, $f4, $f6 -/* 05983C 80058C3C C44A001C */ lwc1 $f10, 0x1c($v0) -/* 059840 80058C40 E448000C */ swc1 $f8, 0xc($v0) -/* 059844 80058C44 460A0402 */ mul.s $f16, $f0, $f10 -/* 059848 80058C48 3C014234 */ li $at, 0x42340000 # 45.000000 -/* 05984C 80058C4C 44819000 */ mtc1 $at, $f18 -/* 059850 80058C50 8E020000 */ lw $v0, ($s0) -/* 059854 80058C54 C4AA0010 */ lwc1 $f10, 0x10($a1) -/* 059858 80058C58 C44E0010 */ lwc1 $f14, 0x10($v0) -/* 05985C 80058C5C 46125100 */ add.s $f4, $f10, $f18 -/* 059860 80058C60 3C013FD0 */ li $at, 0x3FD00000 # 1.625000 -/* 059864 80058C64 46047181 */ sub.s $f6, $f14, $f4 -/* 059868 80058C68 44815800 */ mtc1 $at, $f11 -/* 05986C 80058C6C 44805000 */ mtc1 $zero, $f10 -/* 059870 80058C70 46003221 */ cvt.d.s $f8, $f6 -/* 059874 80058C74 462A4102 */ mul.d $f4, $f8, $f10 -/* 059878 80058C78 3C01C000 */ li $at, 0xC0000000 # -2.000000 -/* 05987C 80058C7C 44813800 */ mtc1 $at, $f7 -/* 059880 80058C80 44803000 */ mtc1 $zero, $f6 -/* 059884 80058C84 3C014000 */ li $at, 0x40000000 # 2.000000 -/* 059888 80058C88 46202320 */ cvt.s.d $f12, $f4 -/* 05988C 80058C8C 460060A1 */ cvt.d.s $f2, $f12 -/* 059890 80058C90 4626103C */ c.lt.d $f2, $f6 -/* 059894 80058C94 00000000 */ nop -/* 059898 80058C98 4500000A */ bc1f .L80058CC4 -/* 05989C 80058C9C 00000000 */ nop -/* 0598A0 80058CA0 44815800 */ mtc1 $at, $f11 -/* 0598A4 80058CA4 44805000 */ mtc1 $zero, $f10 -/* 0598A8 80058CA8 46007221 */ cvt.d.s $f8, $f14 -/* 0598AC 80058CAC 462A1100 */ add.d $f4, $f2, $f10 -/* 0598B0 80058CB0 46244181 */ sub.d $f6, $f8, $f4 -/* 0598B4 80058CB4 462032A0 */ cvt.s.d $f10, $f6 -/* 0598B8 80058CB8 E44A0010 */ swc1 $f10, 0x10($v0) -/* 0598BC 80058CBC 8E020000 */ lw $v0, ($s0) -/* 0598C0 80058CC0 00000000 */ nop -.L80058CC4: -/* 0598C4 80058CC4 44804000 */ mtc1 $zero, $f8 -/* 0598C8 80058CC8 00000000 */ nop -/* 0598CC 80058CCC 460C403C */ c.lt.s $f8, $f12 -/* 0598D0 80058CD0 00000000 */ nop -/* 0598D4 80058CD4 45000007 */ bc1f .L80058CF4 -/* 0598D8 80058CD8 00000000 */ nop -/* 0598DC 80058CDC C4A40010 */ lwc1 $f4, 0x10($a1) -/* 0598E0 80058CE0 00000000 */ nop -/* 0598E4 80058CE4 46122180 */ add.s $f6, $f4, $f18 -/* 0598E8 80058CE8 E4460010 */ swc1 $f6, 0x10($v0) -/* 0598EC 80058CEC 8E020000 */ lw $v0, ($s0) -/* 0598F0 80058CF0 00000000 */ nop -.L80058CF4: -/* 0598F4 80058CF4 C4AA0014 */ lwc1 $f10, 0x14($a1) -/* 0598F8 80058CF8 00000000 */ nop -/* 0598FC 80058CFC 46105200 */ add.s $f8, $f10, $f16 -/* 059900 80058D00 E4480014 */ swc1 $f8, 0x14($v0) -/* 059904 80058D04 8E020000 */ lw $v0, ($s0) -/* 059908 80058D08 00000000 */ nop -/* 05990C 80058D0C C44C000C */ lwc1 $f12, 0xc($v0) -/* 059910 80058D10 C44E0010 */ lwc1 $f14, 0x10($v0) -/* 059914 80058D14 8C460014 */ lw $a2, 0x14($v0) -/* 059918 80058D18 0C00A7C6 */ jal get_level_segment_index_from_position -/* 05991C 80058D1C 00000000 */ nop -/* 059920 80058D20 2401FFFF */ li $at, -1 -/* 059924 80058D24 10410004 */ beq $v0, $at, .L80058D38 -/* 059928 80058D28 00000000 */ nop -/* 05992C 80058D2C 8E090000 */ lw $t1, ($s0) -/* 059930 80058D30 00000000 */ nop -/* 059934 80058D34 A5220034 */ sh $v0, 0x34($t1) -.L80058D38: -/* 059938 80058D38 8E0A0000 */ lw $t2, ($s0) -/* 05993C 80058D3C 8FAB0038 */ lw $t3, 0x38($sp) -/* 059940 80058D40 854C0000 */ lh $t4, ($t2) -/* 059944 80058D44 00000000 */ nop -/* 059948 80058D48 A56C0196 */ sh $t4, 0x196($t3) -/* 05994C 80058D4C 8FBF001C */ lw $ra, 0x1c($sp) -/* 059950 80058D50 8FB00018 */ lw $s0, 0x18($sp) -/* 059954 80058D54 03E00008 */ jr $ra -/* 059958 80058D58 27BD0030 */ addiu $sp, $sp, 0x30 - diff --git a/src/racer.c b/src/racer.c index aed54782..e5aced07 100644 --- a/src/racer.c +++ b/src/racer.c @@ -19,6 +19,7 @@ #include "printf.h" #include "math_util.h" #include "unknown_0255E0.h" +#include "weather.h" #define MAX_NUMBER_OF_GHOST_NODES 360 @@ -1075,7 +1076,36 @@ void func_800580B4(Object *obj, Object_Racer *obj64, s32 arg2, f32 arg3) { } GLOBAL_ASM("asm/non_matchings/racer/func_800581E8.s") -GLOBAL_ASM("asm/non_matchings/racer/func_80058B84.s") + +void func_80058B84(f32 arg0, Object* obj, Object_Racer* arg2) { + s32 levelSeg; + f32 temp_f12; + f32 zOffset; + f32 xOffset; + + gCameraObject->trans.y_rotation += 0x200; + if (1); + gCameraObject->trans.x_rotation = 0x400; + gCameraObject->trans.z_rotation = 0; + gCameraObject->unk1C = 150.0f; + xOffset = func_800707C4(0x8000 - gCameraObject->trans.y_rotation) * gCameraObject->unk1C; + zOffset = func_800707F8(0x8000 - gCameraObject->trans.y_rotation) * gCameraObject->unk1C; + gCameraObject->trans.x_position = obj->segment.trans.x_position + xOffset; + temp_f12 = (gCameraObject->trans.y_position - (obj->segment.trans.y_position + 45.0f)) * 0.25; + if (temp_f12 < -2.0) { + gCameraObject->trans.y_position = (gCameraObject->trans.y_position - (temp_f12 + 2.0)); + } + if (temp_f12 > 0.0f) { + gCameraObject->trans.y_position = obj->segment.trans.y_position + 45.0f; + } + gCameraObject->trans.z_position = obj->segment.trans.z_position + zOffset; + levelSeg = get_level_segment_index_from_position(gCameraObject->trans.x_position, gCameraObject->trans.y_position, gCameraObject->trans.z_position); + if (levelSeg != -1) { + gCameraObject->unk34 = levelSeg; + } + arg2->unk196 = gCameraObject->trans.y_rotation; +} + GLOBAL_ASM("asm/non_matchings/racer/func_80058D5C.s") void func_80058F44(f32 arg0, struct Object *arg1, struct Object *arg2) From 47a8b7b22b0d921e6ef89036f2e96c66cdc47e41 Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Tue, 3 May 2022 21:26:56 +0100 Subject: [PATCH 11/17] rename sine and cosine funcs --- asm/non_matchings/camera/func_80068514.s | 4 ++-- asm/non_matchings/camera/func_80068FA8.s | 20 ++++++++-------- asm/non_matchings/camera/func_80069790.s | 8 +++---- asm/non_matchings/camera/func_80069A40.s | 8 +++---- .../fade_transition/func_800C15D4.s | 4 ++-- .../fade_transition/func_800C1EE8.s | 4 ++-- asm/non_matchings/game_ui/func_800A01A0.s | 2 +- asm/non_matchings/game_ui/func_800A4C44.s | 2 +- asm/non_matchings/game_ui/func_800A7520.s | 2 +- asm/non_matchings/game_ui/func_800A8474.s | 4 ++-- asm/non_matchings/game_ui/func_800AD658.s | 4 ++-- asm/non_matchings/game_ui/func_800ADCBC.s | 4 ++-- asm/non_matchings/objects/func_8000B750.s | 2 +- asm/non_matchings/objects/func_800135B8.s | 2 +- asm/non_matchings/objects/func_80013A0C.s | 4 ++-- asm/non_matchings/objects/func_80013DCC.s | 2 +- asm/non_matchings/objects/func_80016500.s | 4 ++-- asm/non_matchings/objects/func_8001C6C4.s | 4 ++-- asm/non_matchings/racer/func_80048E64.s | 12 +++++----- asm/non_matchings/racer/func_80049794.s | 4 ++-- asm/non_matchings/racer/func_8004C2B0.s | 12 +++++----- asm/non_matchings/racer/func_8004D590.s | 2 +- asm/non_matchings/racer/func_8004DE38.s | 4 ++-- asm/non_matchings/racer/func_80050A28.s | 2 +- asm/non_matchings/racer/func_80055A84.s | 4 ++-- asm/non_matchings/racer/func_800581E8.s | 14 +++++------ asm/non_matchings/racer/func_80059BF0.s | 4 ++-- asm/non_matchings/racer/func_8005A6F0.s | 4 ++-- .../unknown_005740/func_80005D08.s | 2 +- .../unknown_005740/func_800063EC.s | 4 ++-- .../unknown_0255E0/func_8002581C.s | 4 ++-- .../unknown_0255E0/func_80028050.s | 4 ++-- .../unknown_0255E0/func_8002F440.s | 4 ++-- .../unknown_032760/func_8003E694.s | 2 +- .../unknown_032760/obj_init_fish.s | 8 +++---- .../unknown_032760/obj_init_midifade.s | 4 ++-- .../unknown_032760/obj_loop_butterfly.s | 4 ++-- .../unknown_032760/obj_loop_effectbox.s | 4 ++-- .../unknown_032760/obj_loop_fish.s | 12 +++++----- .../unknown_032760/obj_loop_frog.s | 6 ++--- .../unknown_032760/obj_loop_log.s | 4 ++-- .../unknown_032760/obj_loop_parkwarden.s | 8 +++---- .../unknown_032760/obj_loop_stopwatchman.s | 4 ++-- asm/non_matchings/waves/func_800B82B4.s | 4 ++-- asm/non_matchings/waves/func_800BC6C8.s | 2 +- asm/non_matchings/waves/func_800BEFC4.s | 4 ++-- asm/unknown_070110.s | 4 ++-- .../{func_800707C4.s => cosine_s.s} | 2 +- asm/unknown_070110/func_80070320.s | 12 +++++----- asm/unknown_070110/func_800703D8.s | 12 +++++----- asm/unknown_070110/func_80070490.s | 8 +++---- .../{func_800707F8.s => sine_s.s} | 2 +- include/math_util.h | 2 ++ src/object_functions.c | 24 +++++++++---------- src/object_functions.h | 4 ++-- src/objects.c | 4 ++-- src/objects.h | 2 +- src/racer.c | 4 ++-- src/unknown_032760.c | 4 ++-- src/unknown_032760.h | 2 +- src/weather.c | 4 ++-- src/weather.h | 4 ++-- 62 files changed, 163 insertions(+), 161 deletions(-) rename asm/unknown_070110/{func_800707C4.s => cosine_s.s} (96%) rename asm/unknown_070110/{func_800707F8.s => sine_s.s} (96%) diff --git a/asm/non_matchings/camera/func_80068514.s b/asm/non_matchings/camera/func_80068514.s index 7f5ffc7e..9be1d891 100644 --- a/asm/non_matchings/camera/func_80068514.s +++ b/asm/non_matchings/camera/func_80068514.s @@ -34,10 +34,10 @@ glabel func_80068514 /* 069194 80068594 C4E80014 */ lwc1 $f8, 0x14($a3) /* 069198 80068598 C4260D58 */ lwc1 $f6, %lo(perspNorm)($at) /* 06919C 8006859C 84E40000 */ lh $a0, ($a3) -/* 0691A0 800685A0 0C01C1F1 */ jal func_800707C4 +/* 0691A0 800685A0 0C01C1F1 */ jal cosine_s /* 0691A4 800685A4 46083501 */ sub.s $f20, $f6, $f8 /* 0691A8 800685A8 86040000 */ lh $a0, ($s0) -/* 0691AC 800685AC 0C01C1FE */ jal func_800707F8 +/* 0691AC 800685AC 0C01C1FE */ jal sine_s /* 0691B0 800685B0 E7A0004C */ swc1 $f0, 0x4c($sp) /* 0691B4 800685B4 C7AE005C */ lwc1 $f14, 0x5c($sp) /* 0691B8 800685B8 C7A2004C */ lwc1 $f2, 0x4c($sp) diff --git a/asm/non_matchings/camera/func_80068FA8.s b/asm/non_matchings/camera/func_80068FA8.s index 983d7026..088123dd 100644 --- a/asm/non_matchings/camera/func_80068FA8.s +++ b/asm/non_matchings/camera/func_80068FA8.s @@ -19,17 +19,17 @@ glabel func_80068FA8 /* 069BEC 80068FEC AFA5012C */ sw $a1, 0x12c($sp) /* 069BF0 80068FF0 84C40002 */ lh $a0, 2($a2) /* 069BF4 80068FF4 00E08025 */ move $s0, $a3 -/* 069BF8 80068FF8 0C01C1FE */ jal func_800707F8 +/* 069BF8 80068FF8 0C01C1FE */ jal sine_s /* 069BFC 80068FFC 00C08825 */ move $s1, $a2 /* 069C00 80069000 86240002 */ lh $a0, 2($s1) -/* 069C04 80069004 0C01C1F1 */ jal func_800707C4 +/* 069C04 80069004 0C01C1F1 */ jal cosine_s /* 069C08 80069008 46000786 */ mov.s $f30, $f0 /* 069C0C 8006900C E7A00118 */ swc1 $f0, 0x118($sp) /* 069C10 80069010 86240000 */ lh $a0, ($s1) -/* 069C14 80069014 0C01C1FE */ jal func_800707F8 +/* 069C14 80069014 0C01C1FE */ jal sine_s /* 069C18 80069018 00000000 */ nop /* 069C1C 8006901C 86240000 */ lh $a0, ($s1) -/* 069C20 80069020 0C01C1F1 */ jal func_800707C4 +/* 069C20 80069020 0C01C1F1 */ jal cosine_s /* 069C24 80069024 46000586 */ mov.s $f22, $f0 /* 069C28 80069028 C624000C */ lwc1 $f4, 0xc($s1) /* 069C2C 8006902C 46000606 */ mov.s $f24, $f0 @@ -41,22 +41,22 @@ glabel func_80068FA8 /* 069C44 80069044 00000000 */ nop /* 069C48 80069048 E7A800EC */ swc1 $f8, 0xec($sp) /* 069C4C 8006904C 86040004 */ lh $a0, 4($s0) -/* 069C50 80069050 0C01C1FE */ jal func_800707F8 +/* 069C50 80069050 0C01C1FE */ jal sine_s /* 069C54 80069054 00000000 */ nop /* 069C58 80069058 86040004 */ lh $a0, 4($s0) -/* 069C5C 8006905C 0C01C1F1 */ jal func_800707C4 +/* 069C5C 8006905C 0C01C1F1 */ jal cosine_s /* 069C60 80069060 46000506 */ mov.s $f20, $f0 /* 069C64 80069064 86040002 */ lh $a0, 2($s0) -/* 069C68 80069068 0C01C1FE */ jal func_800707F8 +/* 069C68 80069068 0C01C1FE */ jal sine_s /* 069C6C 8006906C 46000686 */ mov.s $f26, $f0 /* 069C70 80069070 86040002 */ lh $a0, 2($s0) -/* 069C74 80069074 0C01C1F1 */ jal func_800707C4 +/* 069C74 80069074 0C01C1F1 */ jal cosine_s /* 069C78 80069078 46000706 */ mov.s $f28, $f0 /* 069C7C 8006907C 86040000 */ lh $a0, ($s0) -/* 069C80 80069080 0C01C1FE */ jal func_800707F8 +/* 069C80 80069080 0C01C1FE */ jal sine_s /* 069C84 80069084 E7A00100 */ swc1 $f0, 0x100($sp) /* 069C88 80069088 86040000 */ lh $a0, ($s0) -/* 069C8C 8006908C 0C01C1F1 */ jal func_800707C4 +/* 069C8C 8006908C 0C01C1F1 */ jal cosine_s /* 069C90 80069090 E7A000FC */ swc1 $f0, 0xfc($sp) /* 069C94 80069094 C606000C */ lwc1 $f6, 0xc($s0) /* 069C98 80069098 C7B00138 */ lwc1 $f16, 0x138($sp) diff --git a/asm/non_matchings/camera/func_80069790.s b/asm/non_matchings/camera/func_80069790.s index 07f3f809..cd29ae50 100644 --- a/asm/non_matchings/camera/func_80069790.s +++ b/asm/non_matchings/camera/func_80069790.s @@ -27,18 +27,18 @@ glabel func_80069790 /* 06A3F4 800697F4 468021A0 */ cvt.s.w $f6, $f4 /* 06A3F8 800697F8 E7A600EC */ swc1 $f6, 0xec($sp) /* 06A3FC 800697FC 84C4001C */ lh $a0, 0x1c($a2) -/* 06A400 80069800 0C01C1FE */ jal func_800707F8 +/* 06A400 80069800 0C01C1FE */ jal sine_s /* 06A404 80069804 AFA60108 */ sw $a2, 0x108($sp) /* 06A408 80069808 8FA60108 */ lw $a2, 0x108($sp) /* 06A40C 8006980C 46000506 */ mov.s $f20, $f0 /* 06A410 80069810 84C4001C */ lh $a0, 0x1c($a2) -/* 06A414 80069814 0C01C1F1 */ jal func_800707C4 +/* 06A414 80069814 0C01C1F1 */ jal cosine_s /* 06A418 80069818 00000000 */ nop /* 06A41C 8006981C 87A4010E */ lh $a0, 0x10e($sp) -/* 06A420 80069820 0C01C1FE */ jal func_800707F8 +/* 06A420 80069820 0C01C1FE */ jal sine_s /* 06A424 80069824 E7A000E4 */ swc1 $f0, 0xe4($sp) /* 06A428 80069828 87A4010E */ lh $a0, 0x10e($sp) -/* 06A42C 8006982C 0C01C1F1 */ jal func_800707C4 +/* 06A42C 8006982C 0C01C1F1 */ jal cosine_s /* 06A430 80069830 46000586 */ mov.s $f22, $f0 /* 06A434 80069834 4614B482 */ mul.s $f18, $f22, $f20 /* 06A438 80069838 C7B000E4 */ lwc1 $f16, 0xe4($sp) diff --git a/asm/non_matchings/camera/func_80069A40.s b/asm/non_matchings/camera/func_80069A40.s index 14f77133..08940164 100644 --- a/asm/non_matchings/camera/func_80069A40.s +++ b/asm/non_matchings/camera/func_80069A40.s @@ -98,7 +98,7 @@ glabel func_80069A40 /* 06A7B0 80069BB0 00007812 */ mflo $t7 /* 06A7B4 80069BB4 022FC021 */ addu $t8, $s1, $t7 /* 06A7B8 80069BB8 87040000 */ lh $a0, ($t8) -/* 06A7BC 80069BBC 0C01C1FE */ jal func_800707F8 +/* 06A7BC 80069BBC 0C01C1FE */ jal sine_s /* 06A7C0 80069BC0 00000000 */ nop /* 06A7C4 80069BC4 8E590000 */ lw $t9, ($s2) /* 06A7C8 80069BC8 C7A60028 */ lwc1 $f6, 0x28($sp) @@ -109,7 +109,7 @@ glabel func_80069A40 /* 06A7DC 80069BDC C604000C */ lwc1 $f4, 0xc($s0) /* 06A7E0 80069BE0 86040000 */ lh $a0, ($s0) /* 06A7E4 80069BE4 46082281 */ sub.s $f10, $f4, $f8 -/* 06A7E8 80069BE8 0C01C1F1 */ jal func_800707C4 +/* 06A7E8 80069BE8 0C01C1F1 */ jal cosine_s /* 06A7EC 80069BEC E60A000C */ swc1 $f10, 0xc($s0) /* 06A7F0 80069BF0 8E490000 */ lw $t1, ($s2) /* 06A7F4 80069BF4 C7B20028 */ lwc1 $f18, 0x28($sp) @@ -120,7 +120,7 @@ glabel func_80069A40 /* 06A808 80069C08 C6100014 */ lwc1 $f16, 0x14($s0) /* 06A80C 80069C0C 86040000 */ lh $a0, ($s0) /* 06A810 80069C10 46068101 */ sub.s $f4, $f16, $f6 -/* 06A814 80069C14 0C01C1F1 */ jal func_800707C4 +/* 06A814 80069C14 0C01C1F1 */ jal cosine_s /* 06A818 80069C18 E6040014 */ swc1 $f4, 0x14($s0) /* 06A81C 80069C1C 8E4B0000 */ lw $t3, ($s2) /* 06A820 80069C20 C7AA0030 */ lwc1 $f10, 0x30($sp) @@ -131,7 +131,7 @@ glabel func_80069A40 /* 06A834 80069C34 C608000C */ lwc1 $f8, 0xc($s0) /* 06A838 80069C38 86040000 */ lh $a0, ($s0) /* 06A83C 80069C3C 46124401 */ sub.s $f16, $f8, $f18 -/* 06A840 80069C40 0C01C1FE */ jal func_800707F8 +/* 06A840 80069C40 0C01C1FE */ jal sine_s /* 06A844 80069C44 E610000C */ swc1 $f16, 0xc($s0) /* 06A848 80069C48 8E4D0000 */ lw $t5, ($s2) /* 06A84C 80069C4C C7A40030 */ lwc1 $f4, 0x30($sp) diff --git a/asm/non_matchings/fade_transition/func_800C15D4.s b/asm/non_matchings/fade_transition/func_800C15D4.s index 24d6ae32..348dd390 100644 --- a/asm/non_matchings/fade_transition/func_800C15D4.s +++ b/asm/non_matchings/fade_transition/func_800C15D4.s @@ -183,7 +183,7 @@ glabel func_800C15D4 /* 0C2498 800C1898 00182400 */ sll $a0, $t8, 0x10 /* 0C249C 800C189C 0004CC03 */ sra $t9, $a0, 0x10 /* 0C24A0 800C18A0 03202025 */ move $a0, $t9 -/* 0C24A4 800C18A4 0C01C1F1 */ jal func_800707C4 +/* 0C24A4 800C18A4 0C01C1F1 */ jal cosine_s /* 0C24A8 800C18A8 03009825 */ move $s3, $t8 /* 0C24AC 800C18AC 46140102 */ mul.s $f4, $f0, $f20 /* 0C24B0 800C18B0 00132400 */ sll $a0, $s3, 0x10 @@ -199,7 +199,7 @@ glabel func_800C15D4 /* 0C24D8 800C18D8 44113000 */ mfc1 $s1, $f6 /* 0C24DC 800C18DC 44CDF800 */ ctc1 $t5, $31 /* 0C24E0 800C18E0 00116400 */ sll $t4, $s1, 0x10 -/* 0C24E4 800C18E4 0C01C1FE */ jal func_800707F8 +/* 0C24E4 800C18E4 0C01C1FE */ jal sine_s /* 0C24E8 800C18E8 000C8C03 */ sra $s1, $t4, 0x10 /* 0C24EC 800C18EC 3C014334 */ li $at, 0x43340000 # 180.000000 /* 0C24F0 800C18F0 44814000 */ mtc1 $at, $f8 diff --git a/asm/non_matchings/fade_transition/func_800C1EE8.s b/asm/non_matchings/fade_transition/func_800C1EE8.s index 2bebd001..4a7b9759 100644 --- a/asm/non_matchings/fade_transition/func_800C1EE8.s +++ b/asm/non_matchings/fade_transition/func_800C1EE8.s @@ -75,13 +75,13 @@ glabel func_800C1EE8 /* 0C2BEC 800C1FEC 000F2400 */ sll $a0, $t7, 0x10 /* 0C2BF0 800C1FF0 0004C403 */ sra $t8, $a0, 0x10 /* 0C2BF4 800C1FF4 03002025 */ move $a0, $t8 -/* 0C2BF8 800C1FF8 0C01C1F1 */ jal func_800707C4 +/* 0C2BF8 800C1FF8 0C01C1F1 */ jal cosine_s /* 0C2BFC 800C1FFC 01E0A025 */ move $s4, $t7 /* 0C2C00 800C2000 C6E40000 */ lwc1 $f4, ($s7) /* 0C2C04 800C2004 00142400 */ sll $a0, $s4, 0x10 /* 0C2C08 800C2008 0004CC03 */ sra $t9, $a0, 0x10 /* 0C2C0C 800C200C 46040502 */ mul.s $f20, $f0, $f4 -/* 0C2C10 800C2010 0C01C1FE */ jal func_800707F8 +/* 0C2C10 800C2010 0C01C1FE */ jal sine_s /* 0C2C14 800C2014 03202025 */ move $a0, $t9 /* 0C2C18 800C2018 C7D20000 */ lwc1 $f18, ($fp) /* 0C2C1C 800C201C 00124040 */ sll $t0, $s2, 1 diff --git a/asm/non_matchings/game_ui/func_800A01A0.s b/asm/non_matchings/game_ui/func_800A01A0.s index 96680145..fd85dacc 100644 --- a/asm/non_matchings/game_ui/func_800A01A0.s +++ b/asm/non_matchings/game_ui/func_800A01A0.s @@ -352,7 +352,7 @@ glabel func_800A01A0 /* 0A12CC 800A06CC 3C098012 */ lui $t1, %hi(D_80126CD4) # $t1, 0x8012 /* 0A12D0 800A06D0 24426D2C */ addiu $v0, %lo(D_80126D2C) # addiu $v0, $v0, 0x6d2c /* 0A12D4 800A06D4 84440000 */ lh $a0, ($v0) -/* 0A12D8 800A06D8 0C01C1F1 */ jal func_800707C4 +/* 0A12D8 800A06D8 0C01C1F1 */ jal cosine_s /* 0A12DC 800A06DC 00000000 */ nop /* 0A12E0 800A06E0 3C048012 */ lui $a0, %hi(D_80126D30) # $a0, 0x8012 /* 0A12E4 800A06E4 24846D30 */ addiu $a0, %lo(D_80126D30) # addiu $a0, $a0, 0x6d30 diff --git a/asm/non_matchings/game_ui/func_800A4C44.s b/asm/non_matchings/game_ui/func_800A4C44.s index 6a16766c..118e1498 100644 --- a/asm/non_matchings/game_ui/func_800A4C44.s +++ b/asm/non_matchings/game_ui/func_800A4C44.s @@ -92,7 +92,7 @@ glabel func_800A4C44 /* 0A5994 800A4D94 44044000 */ mfc1 $a0, $f8 /* 0A5998 800A4D98 44C9F800 */ ctc1 $t1, $31 /* 0A599C 800A4D9C 00045400 */ sll $t2, $a0, 0x10 -/* 0A59A0 800A4DA0 0C01C1F1 */ jal func_800707C4 +/* 0A59A0 800A4DA0 0C01C1F1 */ jal cosine_s /* 0A59A4 800A4DA4 000A2403 */ sra $a0, $t2, 0x10 /* 0A59A8 800A4DA8 3C088012 */ lui $t0, %hi(D_80126CDC) # $t0, 0x8012 /* 0A59AC 800A4DAC 25086CDC */ addiu $t0, %lo(D_80126CDC) # addiu $t0, $t0, 0x6cdc diff --git a/asm/non_matchings/game_ui/func_800A7520.s b/asm/non_matchings/game_ui/func_800A7520.s index 5383658e..f6127ad9 100644 --- a/asm/non_matchings/game_ui/func_800A7520.s +++ b/asm/non_matchings/game_ui/func_800A7520.s @@ -153,7 +153,7 @@ glabel func_800A7520 /* 0A8334 800A7734 44045000 */ mfc1 $a0, $f10 /* 0A8338 800A7738 44CFF800 */ ctc1 $t7, $31 /* 0A833C 800A773C 0004C400 */ sll $t8, $a0, 0x10 -/* 0A8340 800A7740 0C01C1F1 */ jal func_800707C4 +/* 0A8340 800A7740 0C01C1F1 */ jal cosine_s /* 0A8344 800A7744 00182403 */ sra $a0, $t8, 0x10 /* 0A8348 800A7748 3C01800F */ lui $at, %hi(D_800E8790 + 4) # $at, 0x800f /* 0A834C 800A774C C4318790 */ lwc1 $f17, %lo(D_800E8790)($at) diff --git a/asm/non_matchings/game_ui/func_800A8474.s b/asm/non_matchings/game_ui/func_800A8474.s index 4ab434a8..f2d92acd 100644 --- a/asm/non_matchings/game_ui/func_800A8474.s +++ b/asm/non_matchings/game_ui/func_800A8474.s @@ -1716,7 +1716,7 @@ glabel func_800A8474 /* 0AA970 800A9D70 01A1001A */ div $zero, $t5, $at /* 0AA974 800A9D74 00007012 */ mflo $t6 /* 0AA978 800A9D78 000EC400 */ sll $t8, $t6, 0x10 -/* 0AA97C 800A9D7C 0C01C1FE */ jal func_800707F8 +/* 0AA97C 800A9D7C 0C01C1FE */ jal sine_s /* 0AA980 800A9D80 00182403 */ sra $a0, $t8, 0x10 /* 0AA984 800A9D84 8FB90158 */ lw $t9, 0x158($sp) /* 0AA988 800A9D88 E7A00118 */ swc1 $f0, 0x118($sp) @@ -1727,7 +1727,7 @@ glabel func_800A8474 /* 0AA99C 800A9D9C 0181001A */ div $zero, $t4, $at /* 0AA9A0 800A9DA0 00005812 */ mflo $t3 /* 0AA9A4 800A9DA4 000B5400 */ sll $t2, $t3, 0x10 -/* 0AA9A8 800A9DA8 0C01C1F1 */ jal func_800707C4 +/* 0AA9A8 800A9DA8 0C01C1F1 */ jal cosine_s /* 0AA9AC 800A9DAC 000A2403 */ sra $a0, $t2, 0x10 /* 0AA9B0 800A9DB0 0C003936 */ jal func_8000E4D8 /* 0AA9B4 800A9DB4 E7A00114 */ swc1 $f0, 0x114($sp) diff --git a/asm/non_matchings/game_ui/func_800AD658.s b/asm/non_matchings/game_ui/func_800AD658.s index 898937b0..cce9b1a5 100644 --- a/asm/non_matchings/game_ui/func_800AD658.s +++ b/asm/non_matchings/game_ui/func_800AD658.s @@ -73,7 +73,7 @@ glabel func_800AD658 /* 0AE368 800AD768 00102400 */ sll $a0, $s0, 0x10 /* 0AE36C 800AD76C 00045403 */ sra $t2, $a0, 0x10 /* 0AE370 800AD770 E7A6005C */ swc1 $f6, 0x5c($sp) -/* 0AE374 800AD774 0C01C1F1 */ jal func_800707C4 +/* 0AE374 800AD774 0C01C1F1 */ jal cosine_s /* 0AE378 800AD778 01402025 */ move $a0, $t2 /* 0AE37C 800AD77C C7A8005C */ lwc1 $f8, 0x5c($sp) /* 0AE380 800AD780 8FAB0050 */ lw $t3, 0x50($sp) @@ -83,7 +83,7 @@ glabel func_800AD658 /* 0AE390 800AD790 00046403 */ sra $t4, $a0, 0x10 /* 0AE394 800AD794 46105480 */ add.s $f18, $f10, $f16 /* 0AE398 800AD798 01802025 */ move $a0, $t4 -/* 0AE39C 800AD79C 0C01C1FE */ jal func_800707F8 +/* 0AE39C 800AD79C 0C01C1FE */ jal sine_s /* 0AE3A0 800AD7A0 E7B20058 */ swc1 $f18, 0x58($sp) /* 0AE3A4 800AD7A4 C7A4005C */ lwc1 $f4, 0x5c($sp) /* 0AE3A8 800AD7A8 8FA20050 */ lw $v0, 0x50($sp) diff --git a/asm/non_matchings/game_ui/func_800ADCBC.s b/asm/non_matchings/game_ui/func_800ADCBC.s index 7d5dc05a..faad555e 100644 --- a/asm/non_matchings/game_ui/func_800ADCBC.s +++ b/asm/non_matchings/game_ui/func_800ADCBC.s @@ -98,13 +98,13 @@ glabel func_800ADCBC /* 0AEA3C 800ADE3C 01B97021 */ addu $t6, $t5, $t9 /* 0AEA40 800ADE40 01CF4024 */ and $t0, $t6, $t7 /* 0AEA44 800ADE44 02288821 */ addu $s1, $s1, $t0 -/* 0AEA48 800ADE48 0C01C1F1 */ jal func_800707C4 +/* 0AEA48 800ADE48 0C01C1F1 */ jal cosine_s /* 0AEA4C 800ADE4C AFA8009C */ sw $t0, 0x9c($sp) /* 0AEA50 800ADE50 3C188012 */ lui $t8, %hi(D_80127C1C) # $t8, 0x8012 /* 0AEA54 800ADE54 8F187C1C */ lw $t8, %lo(D_80127C1C)($t8) /* 0AEA58 800ADE58 00000000 */ nop /* 0AEA5C 800ADE5C 87040004 */ lh $a0, 4($t8) -/* 0AEA60 800ADE60 0C01C1FE */ jal func_800707F8 +/* 0AEA60 800ADE60 0C01C1FE */ jal sine_s /* 0AEA64 800ADE64 E7A0007C */ swc1 $f0, 0x7c($sp) /* 0AEA68 800ADE68 3C01800E */ lui $at, %hi(D_800E2A8C) # $at, 0x800e /* 0AEA6C 800ADE6C C42C2A8C */ lwc1 $f12, %lo(D_800E2A8C)($at) diff --git a/asm/non_matchings/objects/func_8000B750.s b/asm/non_matchings/objects/func_8000B750.s index b85afe42..7114c140 100644 --- a/asm/non_matchings/objects/func_8000B750.s +++ b/asm/non_matchings/objects/func_8000B750.s @@ -85,7 +85,7 @@ glabel func_8000B750 /* 00C468 8000B868 00192403 */ sra $a0, $t9, 0x10 /* 00C46C 8000B86C AFAB004C */ sw $t3, 0x4c($sp) /* 00C470 8000B870 AFAA0038 */ sw $t2, 0x38($sp) -/* 00C474 8000B874 0C01C1FE */ jal func_800707F8 +/* 00C474 8000B874 0C01C1FE */ jal sine_s /* 00C478 8000B878 AFA20044 */ sw $v0, 0x44($sp) /* 00C47C 8000B87C 8FA20044 */ lw $v0, 0x44($sp) /* 00C480 8000B880 8FAB004C */ lw $t3, 0x4c($sp) diff --git a/asm/non_matchings/objects/func_800135B8.s b/asm/non_matchings/objects/func_800135B8.s index 399ea5ce..631cd34b 100644 --- a/asm/non_matchings/objects/func_800135B8.s +++ b/asm/non_matchings/objects/func_800135B8.s @@ -71,7 +71,7 @@ glabel func_800135B8 /* 0142B0 800136B0 92390072 */ lbu $t9, 0x72($s1) /* 0142B4 800136B4 00000000 */ nop /* 0142B8 800136B8 00196700 */ sll $t4, $t9, 0x1c -/* 0142BC 800136BC 0C01C1FE */ jal func_800707F8 +/* 0142BC 800136BC 0C01C1FE */ jal sine_s /* 0142C0 800136C0 000C2403 */ sra $a0, $t4, 0x10 /* 0142C4 800136C4 8FA30050 */ lw $v1, 0x50($sp) /* 0142C8 800136C8 3C058012 */ lui $a1, %hi(D_8011AE90) # $a1, 0x8012 diff --git a/asm/non_matchings/objects/func_80013A0C.s b/asm/non_matchings/objects/func_80013A0C.s index 6baab4e3..133c0a26 100644 --- a/asm/non_matchings/objects/func_80013A0C.s +++ b/asm/non_matchings/objects/func_80013A0C.s @@ -86,7 +86,7 @@ glabel func_80013A0C /* 01472C 80013B2C 90EE0000 */ lbu $t6, ($a3) /* 014730 80013B30 AFA70028 */ sw $a3, 0x28($sp) /* 014734 80013B34 000E7E40 */ sll $t7, $t6, 0x19 -/* 014738 80013B38 0C01C1F1 */ jal func_800707C4 +/* 014738 80013B38 0C01C1F1 */ jal cosine_s /* 01473C 80013B3C 000F2403 */ sra $a0, $t7, 0x10 /* 014740 80013B40 8FB90058 */ lw $t9, 0x58($sp) /* 014744 80013B44 8E020000 */ lw $v0, ($s0) @@ -103,7 +103,7 @@ glabel func_80013A0C /* 014770 80013B70 914B0000 */ lbu $t3, ($t2) /* 014774 80013B74 00000000 */ nop /* 014778 80013B78 000B6680 */ sll $t4, $t3, 0x1a -/* 01477C 80013B7C 0C01C1FE */ jal func_800707F8 +/* 01477C 80013B7C 0C01C1FE */ jal sine_s /* 014780 80013B80 000C2403 */ sra $a0, $t4, 0x10 /* 014784 80013B84 3C01800E */ lui $at, %hi(D_800E556C) # $at, 0x800e /* 014788 80013B88 C432556C */ lwc1 $f18, %lo(D_800E556C)($at) diff --git a/asm/non_matchings/objects/func_80013DCC.s b/asm/non_matchings/objects/func_80013DCC.s index d4590046..4b110254 100644 --- a/asm/non_matchings/objects/func_80013DCC.s +++ b/asm/non_matchings/objects/func_80013DCC.s @@ -78,7 +78,7 @@ glabel func_80013DCC /* 014AD4 80013ED4 000E2403 */ sra $a0, $t6, 0x10 /* 014AD8 80013ED8 AFA30048 */ sw $v1, 0x48($sp) /* 014ADC 80013EDC AFAB0054 */ sw $t3, 0x54($sp) -/* 014AE0 80013EE0 0C01C1FE */ jal func_800707F8 +/* 014AE0 80013EE0 0C01C1FE */ jal sine_s /* 014AE4 80013EE4 AFA90028 */ sw $t1, 0x28($sp) /* 014AE8 80013EE8 3C01800E */ lui $at, %hi(D_800E5580) # $at, 0x800e /* 014AEC 80013EEC C42A5580 */ lwc1 $f10, %lo(D_800E5580)($at) diff --git a/asm/non_matchings/objects/func_80016500.s b/asm/non_matchings/objects/func_80016500.s index a644458b..3bf2e8f3 100644 --- a/asm/non_matchings/objects/func_80016500.s +++ b/asm/non_matchings/objects/func_80016500.s @@ -23,10 +23,10 @@ glabel func_80016500 .L80016554: /* 017154 80016554 00044C00 */ sll $t1, $a0, 0x10 /* 017158 80016558 00092403 */ sra $a0, $t1, 0x10 -/* 01715C 8001655C 0C01C1FE */ jal func_800707F8 +/* 01715C 8001655C 0C01C1FE */ jal sine_s /* 017160 80016560 AFA40020 */ sw $a0, 0x20($sp) /* 017164 80016564 8FA40020 */ lw $a0, 0x20($sp) -/* 017168 80016568 0C01C1F1 */ jal func_800707C4 +/* 017168 80016568 0C01C1F1 */ jal cosine_s /* 01716C 8001656C E7A0002C */ swc1 $f0, 0x2c($sp) /* 017170 80016570 8FAB0040 */ lw $t3, 0x40($sp) /* 017174 80016574 C7A2002C */ lwc1 $f2, 0x2c($sp) diff --git a/asm/non_matchings/objects/func_8001C6C4.s b/asm/non_matchings/objects/func_8001C6C4.s index 5047530e..cc1bb885 100644 --- a/asm/non_matchings/objects/func_8001C6C4.s +++ b/asm/non_matchings/objects/func_8001C6C4.s @@ -313,7 +313,7 @@ glabel func_8001C6C4 /* 01D734 8001CB34 A5600004 */ sh $zero, 4($t3) /* 01D738 8001CB38 01902021 */ addu $a0, $t4, $s0 /* 01D73C 8001CB3C 00046C00 */ sll $t5, $a0, 0x10 -/* 01D740 8001CB40 0C01C1F1 */ jal func_800707C4 +/* 01D740 8001CB40 0C01C1F1 */ jal cosine_s /* 01D744 8001CB44 000D2403 */ sra $a0, $t5, 0x10 /* 01D748 8001CB48 8FAF00EC */ lw $t7, 0xec($sp) /* 01D74C 8001CB4C 46140582 */ mul.s $f22, $f0, $f20 @@ -321,7 +321,7 @@ glabel func_8001C6C4 /* 01D754 8001CB54 00000000 */ nop /* 01D758 8001CB58 03102021 */ addu $a0, $t8, $s0 /* 01D75C 8001CB5C 0004CC00 */ sll $t9, $a0, 0x10 -/* 01D760 8001CB60 0C01C1FE */ jal func_800707F8 +/* 01D760 8001CB60 0C01C1FE */ jal sine_s /* 01D764 8001CB64 00192403 */ sra $a0, $t9, 0x10 /* 01D768 8001CB68 C7A600F0 */ lwc1 $f6, 0xf0($sp) /* 01D76C 8001CB6C 8FA400EC */ lw $a0, 0xec($sp) diff --git a/asm/non_matchings/racer/func_80048E64.s b/asm/non_matchings/racer/func_80048E64.s index 21837dd5..aaddd28f 100644 --- a/asm/non_matchings/racer/func_80048E64.s +++ b/asm/non_matchings/racer/func_80048E64.s @@ -245,7 +245,7 @@ glabel func_80048E64 /* 049DD4 800491D4 AFA70068 */ sw $a3, 0x68($sp) /* 049DD8 800491D8 016C2023 */ subu $a0, $t3, $t4 /* 049DDC 800491DC 00046C00 */ sll $t5, $a0, 0x10 -/* 049DE0 800491E0 0C01C1F1 */ jal func_800707C4 +/* 049DE0 800491E0 0C01C1F1 */ jal cosine_s /* 049DE4 800491E4 000D2403 */ sra $a0, $t5, 0x10 /* 049DE8 800491E8 8E0F0000 */ lw $t7, ($s0) /* 049DEC 800491EC E7A00034 */ swc1 $f0, 0x34($sp) @@ -254,7 +254,7 @@ glabel func_80048E64 /* 049DF8 800491F8 00000000 */ nop /* 049DFC 800491FC 03192023 */ subu $a0, $t8, $t9 /* 049E00 80049200 00044400 */ sll $t0, $a0, 0x10 -/* 049E04 80049204 0C01C1FE */ jal func_800707F8 +/* 049E04 80049204 0C01C1FE */ jal sine_s /* 049E08 80049208 00082403 */ sra $a0, $t0, 0x10 /* 049E0C 8004920C 8E050000 */ lw $a1, ($s0) /* 049E10 80049210 C7A60034 */ lwc1 $f6, 0x34($sp) @@ -269,7 +269,7 @@ glabel func_80048E64 /* 049E34 80049234 00046400 */ sll $t4, $a0, 0x10 /* 049E38 80049238 000C2403 */ sra $a0, $t4, 0x10 /* 049E3C 8004923C 460A4480 */ add.s $f18, $f8, $f10 -/* 049E40 80049240 0C01C1F1 */ jal func_800707C4 +/* 049E40 80049240 0C01C1F1 */ jal cosine_s /* 049E44 80049244 E7B20044 */ swc1 $f18, 0x44($sp) /* 049E48 80049248 8E0E0000 */ lw $t6, ($s0) /* 049E4C 8004924C 8FA70068 */ lw $a3, 0x68($sp) @@ -281,7 +281,7 @@ glabel func_80048E64 /* 049E64 80049264 00000000 */ nop /* 049E68 80049268 030F2023 */ subu $a0, $t8, $t7 /* 049E6C 8004926C 0004CC00 */ sll $t9, $a0, 0x10 -/* 049E70 80049270 0C01C1FE */ jal func_800707F8 +/* 049E70 80049270 0C01C1FE */ jal sine_s /* 049E74 80049274 00192403 */ sra $a0, $t9, 0x10 /* 049E78 80049278 3C0B8012 */ lui $t3, %hi(D_8011D586) # $t3, 0x8012 /* 049E7C 8004927C 856BD586 */ lh $t3, %lo(D_8011D586)($t3) @@ -333,7 +333,7 @@ glabel func_80048E64 /* 049F34 80049334 462A4101 */ sub.d $f4, $f8, $f10 /* 049F38 80049338 462021A0 */ cvt.s.d $f6, $f4 /* 049F3C 8004933C E4E600C8 */ swc1 $f6, 0xc8($a3) -/* 049F40 80049340 0C01C1F1 */ jal func_800707C4 +/* 049F40 80049340 0C01C1F1 */ jal cosine_s /* 049F44 80049344 E7B0003C */ swc1 $f16, 0x3c($sp) /* 049F48 80049348 8FA70068 */ lw $a3, 0x68($sp) /* 049F4C 8004934C 8FA20064 */ lw $v0, 0x64($sp) @@ -412,7 +412,7 @@ glabel func_80048E64 /* 04A05C 8004945C 24844000 */ addiu $a0, $a0, 0x4000 /* 04A060 80049460 00044C00 */ sll $t1, $a0, 0x10 /* 04A064 80049464 00092403 */ sra $a0, $t1, 0x10 -/* 04A068 80049468 0C01C1FE */ jal func_800707F8 +/* 04A068 80049468 0C01C1FE */ jal sine_s /* 04A06C 8004946C AFA70068 */ sw $a3, 0x68($sp) /* 04A070 80049470 8FAA0064 */ lw $t2, 0x64($sp) /* 04A074 80049474 C7B0003C */ lwc1 $f16, 0x3c($sp) diff --git a/asm/non_matchings/racer/func_80049794.s b/asm/non_matchings/racer/func_80049794.s index a7f769c8..0cf9733e 100644 --- a/asm/non_matchings/racer/func_80049794.s +++ b/asm/non_matchings/racer/func_80049794.s @@ -2199,7 +2199,7 @@ glabel func_80049794 /* 04C2C8 8004B6C8 860401A4 */ lh $a0, 0x1a4($s0) /* 04C2CC 8004B6CC 46244482 */ mul.d $f18, $f8, $f4 /* 04C2D0 8004B6D0 46209320 */ cvt.s.d $f12, $f18 -/* 04C2D4 8004B6D4 0C01C1FE */ jal func_800707F8 +/* 04C2D4 8004B6D4 0C01C1FE */ jal sine_s /* 04C2D8 8004B6D8 E7AC00EC */ swc1 $f12, 0xec($sp) /* 04C2DC 8004B6DC 821901E0 */ lb $t9, 0x1e0($s0) /* 04C2E0 8004B6E0 C7AC00EC */ lwc1 $f12, 0xec($sp) @@ -2237,7 +2237,7 @@ glabel func_80049794 /* 04C358 8004B758 46044481 */ sub.s $f18, $f8, $f4 /* 04C35C 8004B75C E6320024 */ swc1 $f18, 0x24($s1) /* 04C360 8004B760 860401A4 */ lh $a0, 0x1a4($s0) -/* 04C364 8004B764 0C01C1F1 */ jal func_800707C4 +/* 04C364 8004B764 0C01C1F1 */ jal cosine_s /* 04C368 8004B768 E7AC00EC */ swc1 $f12, 0xec($sp) /* 04C36C 8004B76C 820F01E0 */ lb $t7, 0x1e0($s0) /* 04C370 8004B770 C7AC00EC */ lwc1 $f12, 0xec($sp) diff --git a/asm/non_matchings/racer/func_8004C2B0.s b/asm/non_matchings/racer/func_8004C2B0.s index 3f80e3f0..3e614576 100644 --- a/asm/non_matchings/racer/func_8004C2B0.s +++ b/asm/non_matchings/racer/func_8004C2B0.s @@ -415,7 +415,7 @@ glabel func_8004C2B0 /* 04D45C 8004C85C AFA70058 */ sw $a3, 0x58($sp) /* 04D460 8004C860 2484FC00 */ addiu $a0, $a0, -0x400 /* 04D464 8004C864 00047400 */ sll $t6, $a0, 0x10 -/* 04D468 8004C868 0C01C1F1 */ jal func_800707C4 +/* 04D468 8004C868 0C01C1F1 */ jal cosine_s /* 04D46C 8004C86C 000E2403 */ sra $a0, $t6, 0x10 /* 04D470 8004C870 3C088012 */ lui $t0, %hi(gCameraObject) # $t0, 0x8012 /* 04D474 8004C874 2508D508 */ addiu $t0, %lo(gCameraObject) # addiu $t0, $t0, -0x2af8 @@ -425,7 +425,7 @@ glabel func_8004C2B0 /* 04D484 8004C884 E7A0001C */ swc1 $f0, 0x1c($sp) /* 04D488 8004C888 2484FC00 */ addiu $a0, $a0, -0x400 /* 04D48C 8004C88C 0004C400 */ sll $t8, $a0, 0x10 -/* 04D490 8004C890 0C01C1FE */ jal func_800707F8 +/* 04D490 8004C890 0C01C1FE */ jal sine_s /* 04D494 8004C894 00182403 */ sra $a0, $t8, 0x10 /* 04D498 8004C898 3C088012 */ lui $t0, %hi(gCameraObject) # $t0, 0x8012 /* 04D49C 8004C89C 2508D508 */ addiu $t0, %lo(gCameraObject) # addiu $t0, $t0, -0x2af8 @@ -446,7 +446,7 @@ glabel func_8004C2B0 /* 04D4D8 8004C8D8 E7B00020 */ swc1 $f16, 0x20($sp) /* 04D4DC 8004C8DC 46006282 */ mul.s $f10, $f12, $f0 /* 04D4E0 8004C8E0 460A3480 */ add.s $f18, $f6, $f10 -/* 04D4E4 8004C8E4 0C01C1F1 */ jal func_800707C4 +/* 04D4E4 8004C8E4 0C01C1F1 */ jal cosine_s /* 04D4E8 8004C8E8 E7B20030 */ swc1 $f18, 0x30($sp) /* 04D4EC 8004C8EC C7B00020 */ lwc1 $f16, 0x20($sp) /* 04D4F0 8004C8F0 8FA70058 */ lw $a3, 0x58($sp) @@ -457,7 +457,7 @@ glabel func_8004C2B0 /* 04D504 8004C904 00000000 */ nop /* 04D508 8004C908 01EC2023 */ subu $a0, $t7, $t4 /* 04D50C 8004C90C 0004C400 */ sll $t8, $a0, 0x10 -/* 04D510 8004C910 0C01C1FE */ jal func_800707F8 +/* 04D510 8004C910 0C01C1FE */ jal sine_s /* 04D514 8004C914 00182403 */ sra $a0, $t8, 0x10 /* 04D518 8004C918 C7B00020 */ lwc1 $f16, 0x20($sp) /* 04D51C 8004C91C 8FA70058 */ lw $a3, 0x58($sp) @@ -467,7 +467,7 @@ glabel func_8004C2B0 /* 04D52C 8004C92C 00000000 */ nop /* 04D530 8004C930 24844000 */ addiu $a0, $a0, 0x4000 /* 04D534 8004C934 00045C00 */ sll $t3, $a0, 0x10 -/* 04D538 8004C938 0C01C1F1 */ jal func_800707C4 +/* 04D538 8004C938 0C01C1F1 */ jal cosine_s /* 04D53C 8004C93C 000B2403 */ sra $a0, $t3, 0x10 /* 04D540 8004C940 3C014040 */ li $at, 0x40400000 # 3.000000 /* 04D544 8004C944 44813000 */ mtc1 $at, $f6 @@ -570,7 +570,7 @@ glabel func_8004C2B0 /* 04D6A4 8004CAA4 AFA70058 */ sw $a3, 0x58($sp) /* 04D6A8 8004CAA8 24844000 */ addiu $a0, $a0, 0x4000 /* 04D6AC 8004CAAC 00047C00 */ sll $t7, $a0, 0x10 -/* 04D6B0 8004CAB0 0C01C1FE */ jal func_800707F8 +/* 04D6B0 8004CAB0 0C01C1FE */ jal sine_s /* 04D6B4 8004CAB4 000F2403 */ sra $a0, $t7, 0x10 /* 04D6B8 8004CAB8 3C014040 */ li $at, 0x40400000 # 3.000000 /* 04D6BC 8004CABC 44812000 */ mtc1 $at, $f4 diff --git a/asm/non_matchings/racer/func_8004D590.s b/asm/non_matchings/racer/func_8004D590.s index e84d08e6..10ab160e 100644 --- a/asm/non_matchings/racer/func_8004D590.s +++ b/asm/non_matchings/racer/func_8004D590.s @@ -111,7 +111,7 @@ glabel func_8004D590 /* 04E334 8004D734 C4480014 */ lwc1 $f8, 0x14($v0) /* 04E338 8004D738 8E0B0000 */ lw $t3, ($s0) /* 04E33C 8004D73C 46104280 */ add.s $f10, $f8, $f16 -/* 04E340 8004D740 0C01C1F1 */ jal func_800707C4 +/* 04E340 8004D740 0C01C1F1 */ jal cosine_s /* 04E344 8004D744 E56A0014 */ swc1 $f10, 0x14($t3) /* 04E348 8004D748 8E0C0000 */ lw $t4, ($s0) /* 04E34C 8004D74C 44801000 */ mtc1 $zero, $f2 diff --git a/asm/non_matchings/racer/func_8004DE38.s b/asm/non_matchings/racer/func_8004DE38.s index e75a9308..dfd8839d 100644 --- a/asm/non_matchings/racer/func_8004DE38.s +++ b/asm/non_matchings/racer/func_8004DE38.s @@ -410,7 +410,7 @@ glabel func_8004DE38 /* 04EFB0 8004E3B0 920E01FF */ lbu $t6, 0x1ff($s0) /* 04EFB4 8004E3B4 00000000 */ nop /* 04EFB8 8004E3B8 000E7E00 */ sll $t7, $t6, 0x18 -/* 04EFBC 8004E3BC 0C01C1F1 */ jal func_800707C4 +/* 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 @@ -433,7 +433,7 @@ glabel func_8004DE38 /* 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 func_800707F8 +/* 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 diff --git a/asm/non_matchings/racer/func_80050A28.s b/asm/non_matchings/racer/func_80050A28.s index 3e2fe637..a48459c8 100644 --- a/asm/non_matchings/racer/func_80050A28.s +++ b/asm/non_matchings/racer/func_80050A28.s @@ -1004,7 +1004,7 @@ glabel func_80050A28 /* 052400 80051800 E60A0030 */ swc1 $f10, 0x30($s0) /* 052404 80051804 E7AE0044 */ swc1 $f14, 0x44($sp) /* 052408 80051808 AFA90064 */ sw $t1, 0x64($sp) -/* 05240C 8005180C 0C01C1FE */ jal func_800707F8 +/* 05240C 8005180C 0C01C1FE */ jal sine_s /* 052410 80051810 A3A80057 */ sb $t0, 0x57($sp) /* 052414 80051814 44803000 */ mtc1 $zero, $f6 /* 052418 80051818 83A80057 */ lb $t0, 0x57($sp) diff --git a/asm/non_matchings/racer/func_80055A84.s b/asm/non_matchings/racer/func_80055A84.s index dae70cc5..fe887759 100644 --- a/asm/non_matchings/racer/func_80055A84.s +++ b/asm/non_matchings/racer/func_80055A84.s @@ -177,13 +177,13 @@ glabel func_80055A84 /* 05691C 80055D1C 00000000 */ nop /* 056920 80055D20 00042023 */ negu $a0, $a0 /* 056924 80055D24 00047400 */ sll $t6, $a0, 0x10 -/* 056928 80055D28 0C01C1F1 */ jal func_800707C4 +/* 056928 80055D28 0C01C1F1 */ jal cosine_s /* 05692C 80055D2C 000E2403 */ sra $a0, $t6, 0x10 /* 056930 80055D30 86240000 */ lh $a0, ($s1) /* 056934 80055D34 E7A00058 */ swc1 $f0, 0x58($sp) /* 056938 80055D38 00042023 */ negu $a0, $a0 /* 05693C 80055D3C 0004C400 */ sll $t8, $a0, 0x10 -/* 056940 80055D40 0C01C1FE */ jal func_800707F8 +/* 056940 80055D40 0C01C1FE */ jal sine_s /* 056944 80055D44 00182403 */ sra $a0, $t8, 0x10 /* 056948 80055D48 C7B00068 */ lwc1 $f16, 0x68($sp) /* 05694C 80055D4C C7A20058 */ lwc1 $f2, 0x58($sp) diff --git a/asm/non_matchings/racer/func_800581E8.s b/asm/non_matchings/racer/func_800581E8.s index a3478f9b..81ea8432 100644 --- a/asm/non_matchings/racer/func_800581E8.s +++ b/asm/non_matchings/racer/func_800581E8.s @@ -321,7 +321,7 @@ glabel func_800581E8 /* 059254 80058654 AFA70070 */ sw $a3, 0x70($sp) /* 059258 80058658 01CF2023 */ subu $a0, $t6, $t7 /* 05925C 8005865C 0004C400 */ sll $t8, $a0, 0x10 -/* 059260 80058660 0C01C1F1 */ jal func_800707C4 +/* 059260 80058660 0C01C1F1 */ jal cosine_s /* 059264 80058664 00182403 */ sra $a0, $t8, 0x10 /* 059268 80058668 3C088012 */ lui $t0, %hi(gCameraObject) # $t0, 0x8012 /* 05926C 8005866C 2508D508 */ addiu $t0, %lo(gCameraObject) # addiu $t0, $t0, -0x2af8 @@ -331,7 +331,7 @@ glabel func_800581E8 /* 05927C 8005867C E7A00038 */ swc1 $f0, 0x38($sp) /* 059280 80058680 014B2023 */ subu $a0, $t2, $t3 /* 059284 80058684 00046400 */ sll $t4, $a0, 0x10 -/* 059288 80058688 0C01C1FE */ jal func_800707F8 +/* 059288 80058688 0C01C1FE */ jal sine_s /* 05928C 8005868C 000C2403 */ sra $a0, $t4, 0x10 /* 059290 80058690 3C088012 */ lui $t0, %hi(gCameraObject) # $t0, 0x8012 /* 059294 80058694 2508D508 */ addiu $t0, %lo(gCameraObject) # addiu $t0, $t0, -0x2af8 @@ -353,7 +353,7 @@ glabel func_800581E8 /* 0592D4 800586D4 E7AC0040 */ swc1 $f12, 0x40($sp) /* 0592D8 800586D8 01EE2023 */ subu $a0, $t7, $t6 /* 0592DC 800586DC 0004C400 */ sll $t8, $a0, 0x10 -/* 0592E0 800586E0 0C01C1F1 */ jal func_800707C4 +/* 0592E0 800586E0 0C01C1F1 */ jal cosine_s /* 0592E4 800586E4 00182403 */ sra $a0, $t8, 0x10 /* 0592E8 800586E8 C7AC0040 */ lwc1 $f12, 0x40($sp) /* 0592EC 800586EC 8FA70070 */ lw $a3, 0x70($sp) @@ -364,7 +364,7 @@ glabel func_800581E8 /* 059300 80058700 00000000 */ nop /* 059304 80058704 01492023 */ subu $a0, $t2, $t1 /* 059308 80058708 00045C00 */ sll $t3, $a0, 0x10 -/* 05930C 8005870C 0C01C1FE */ jal func_800707F8 +/* 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 @@ -484,7 +484,7 @@ glabel func_800581E8 /* 0594CC 800588CC AFA70070 */ sw $a3, 0x70($sp) /* 0594D0 800588D0 24844000 */ addiu $a0, $a0, 0x4000 /* 0594D4 800588D4 0004C400 */ sll $t8, $a0, 0x10 -/* 0594D8 800588D8 0C01C1F1 */ jal func_800707C4 +/* 0594D8 800588D8 0C01C1F1 */ jal cosine_s /* 0594DC 800588DC 00182403 */ sra $a0, $t8, 0x10 /* 0594E0 800588E0 8FA70070 */ lw $a3, 0x70($sp) /* 0594E4 800588E4 C7A60030 */ lwc1 $f6, 0x30($sp) @@ -556,7 +556,7 @@ glabel func_800581E8 /* 0595E0 800589E0 AFA70070 */ sw $a3, 0x70($sp) /* 0595E4 800589E4 24844000 */ addiu $a0, $a0, 0x4000 /* 0595E8 800589E8 00046400 */ sll $t4, $a0, 0x10 -/* 0595EC 800589EC 0C01C1FE */ jal func_800707F8 +/* 0595EC 800589EC 0C01C1FE */ jal sine_s /* 0595F0 800589F0 000C2403 */ sra $a0, $t4, 0x10 /* 0595F4 800589F4 8FA70070 */ lw $a3, 0x70($sp) /* 0595F8 800589F8 46000107 */ neg.s $f4, $f0 @@ -626,7 +626,7 @@ glabel func_800581E8 /* 0596E8 80058AE8 87040004 */ lh $a0, 4($t8) /* 0596EC 80058AEC 00000000 */ nop .L80058AF0: -/* 0596F0 80058AF0 0C01C1F1 */ jal func_800707C4 +/* 0596F0 80058AF0 0C01C1F1 */ jal cosine_s /* 0596F4 80058AF4 AFA70070 */ sw $a3, 0x70($sp) /* 0596F8 80058AF8 8FA70070 */ lw $a3, 0x70($sp) /* 0596FC 80058AFC 3C088012 */ lui $t0, %hi(gCameraObject) # $t0, 0x8012 diff --git a/asm/non_matchings/racer/func_80059BF0.s b/asm/non_matchings/racer/func_80059BF0.s index 21e27791..2a5127d2 100644 --- a/asm/non_matchings/racer/func_80059BF0.s +++ b/asm/non_matchings/racer/func_80059BF0.s @@ -6,7 +6,7 @@ glabel func_80059BF0 /* 05A800 80059C00 00803025 */ move $a2, $a0 /* 05A804 80059C04 85040164 */ lh $a0, 0x164($t0) /* 05A808 80059C08 AFA60028 */ sw $a2, 0x28($sp) -/* 05A80C 80059C0C 0C01C1FE */ jal func_800707F8 +/* 05A80C 80059C0C 0C01C1FE */ jal sine_s /* 05A810 80059C10 AFA80020 */ sw $t0, 0x20($sp) /* 05A814 80059C14 8FA80020 */ lw $t0, 0x20($sp) /* 05A818 80059C18 E7A00018 */ swc1 $f0, 0x18($sp) @@ -15,7 +15,7 @@ glabel func_80059BF0 /* 05A824 80059C24 00000000 */ nop /* 05A828 80059C28 01CF2023 */ subu $a0, $t6, $t7 /* 05A82C 80059C2C 0004C400 */ sll $t8, $a0, 0x10 -/* 05A830 80059C30 0C01C1FE */ jal func_800707F8 +/* 05A830 80059C30 0C01C1FE */ jal sine_s /* 05A834 80059C34 00182403 */ sra $a0, $t8, 0x10 /* 05A838 80059C38 C7A40018 */ lwc1 $f4, 0x18($sp) /* 05A83C 80059C3C 44803000 */ mtc1 $zero, $f6 diff --git a/asm/non_matchings/racer/func_8005A6F0.s b/asm/non_matchings/racer/func_8005A6F0.s index ba54dab7..a7d6309c 100644 --- a/asm/non_matchings/racer/func_8005A6F0.s +++ b/asm/non_matchings/racer/func_8005A6F0.s @@ -438,7 +438,7 @@ glabel func_8005A6F0 /* 05B8C0 8005ACC0 920F01FF */ lbu $t7, 0x1ff($s0) /* 05B8C4 8005ACC4 00000000 */ nop /* 05B8C8 8005ACC8 000FCE00 */ sll $t9, $t7, 0x18 -/* 05B8CC 8005ACCC 0C01C1F1 */ jal func_800707C4 +/* 05B8CC 8005ACCC 0C01C1F1 */ jal cosine_s /* 05B8D0 8005ACD0 00192403 */ sra $a0, $t9, 0x10 /* 05B8D4 8005ACD4 3C013FB0 */ li $at, 0x3FB00000 # 1.375000 /* 05B8D8 8005ACD8 44817800 */ mtc1 $at, $f15 @@ -461,7 +461,7 @@ glabel func_8005A6F0 /* 05B91C 8005AD1C 462034A0 */ cvt.s.d $f18, $f6 /* 05B920 8005AD20 E6120084 */ swc1 $f18, 0x84($s0) /* 05B924 8005AD24 E7AC0044 */ swc1 $f12, 0x44($sp) -/* 05B928 8005AD28 0C01C1FE */ jal func_800707F8 +/* 05B928 8005AD28 0C01C1FE */ jal sine_s /* 05B92C 8005AD2C E7AD0040 */ swc1 $f13, 0x40($sp) /* 05B930 8005AD30 3C013FB0 */ li $at, 0x3FB00000 # 1.375000 /* 05B934 8005AD34 44817800 */ mtc1 $at, $f15 diff --git a/asm/non_matchings/unknown_005740/func_80005D08.s b/asm/non_matchings/unknown_005740/func_80005D08.s index b7414355..a505d025 100644 --- a/asm/non_matchings/unknown_005740/func_80005D08.s +++ b/asm/non_matchings/unknown_005740/func_80005D08.s @@ -117,7 +117,7 @@ glabel func_80005D08 /* 006A78 80005E78 00047403 */ sra $t6, $a0, 0x10 /* 006A7C 80005E7C 01C02025 */ move $a0, $t6 /* 006A80 80005E80 E7AE001C */ swc1 $f14, 0x1c($sp) -/* 006A84 80005E84 0C01C1F1 */ jal func_800707C4 +/* 006A84 80005E84 0C01C1F1 */ jal cosine_s /* 006A88 80005E88 E7B00030 */ swc1 $f16, 0x30($sp) /* 006A8C 80005E8C 44803000 */ mtc1 $zero, $f6 /* 006A90 80005E90 C7AE001C */ lwc1 $f14, 0x1c($sp) diff --git a/asm/non_matchings/unknown_005740/func_800063EC.s b/asm/non_matchings/unknown_005740/func_800063EC.s index 42836050..e4fb87fb 100644 --- a/asm/non_matchings/unknown_005740/func_800063EC.s +++ b/asm/non_matchings/unknown_005740/func_800063EC.s @@ -300,12 +300,12 @@ glabel func_800063EC /* 007400 80006800 85640002 */ lh $a0, 2($t3) /* 007404 80006804 46067380 */ add.s $f14, $f14, $f6 /* 007408 80006808 E7B2002C */ swc1 $f18, 0x2c($sp) -/* 00740C 8000680C 0C01C1F1 */ jal func_800707C4 +/* 00740C 8000680C 0C01C1F1 */ jal cosine_s /* 007410 80006810 E7AE0018 */ swc1 $f14, 0x18($sp) /* 007414 80006814 8FAC0030 */ lw $t4, 0x30($sp) /* 007418 80006818 E7A00028 */ swc1 $f0, 0x28($sp) /* 00741C 8000681C 85840004 */ lh $a0, 4($t4) -/* 007420 80006820 0C01C1F1 */ jal func_800707C4 +/* 007420 80006820 0C01C1F1 */ jal cosine_s /* 007424 80006824 00000000 */ nop /* 007428 80006828 3C098012 */ lui $t1, %hi(D_80119C38) # $t1, 0x8012 /* 00742C 8000682C 25299C38 */ addiu $t1, %lo(D_80119C38) # addiu $t1, $t1, -0x63c8 diff --git a/asm/non_matchings/unknown_0255E0/func_8002581C.s b/asm/non_matchings/unknown_0255E0/func_8002581C.s index b8b7dba0..b5bdcae5 100644 --- a/asm/non_matchings/unknown_0255E0/func_8002581C.s +++ b/asm/non_matchings/unknown_0255E0/func_8002581C.s @@ -54,7 +54,7 @@ glabel func_8002581C /* 0264D8 800258D8 00000000 */ nop /* 0264DC 800258DC 00042023 */ negu $a0, $a0 /* 0264E0 800258E0 00046C00 */ sll $t5, $a0, 0x10 -/* 0264E4 800258E4 0C01C1F1 */ jal func_800707C4 +/* 0264E4 800258E4 0C01C1F1 */ jal cosine_s /* 0264E8 800258E8 000D2403 */ sra $a0, $t5, 0x10 /* 0264EC 800258EC 8E0F0000 */ lw $t7, ($s0) /* 0264F0 800258F0 46000686 */ mov.s $f26, $f0 @@ -62,7 +62,7 @@ glabel func_8002581C /* 0264F8 800258F8 00000000 */ nop /* 0264FC 800258FC 00042023 */ negu $a0, $a0 /* 026500 80025900 0004C400 */ sll $t8, $a0, 0x10 -/* 026504 80025904 0C01C1FE */ jal func_800707F8 +/* 026504 80025904 0C01C1FE */ jal sine_s /* 026508 80025908 00182403 */ sra $a0, $t8, 0x10 /* 02650C 8002590C 3C01800E */ lui $at, %hi(D_800E5E60 + 4) # $at, 0x800e /* 026510 80025910 C42F5E60 */ lwc1 $f15, %lo(D_800E5E60)($at) diff --git a/asm/non_matchings/unknown_0255E0/func_80028050.s b/asm/non_matchings/unknown_0255E0/func_80028050.s index 0b25df8c..f2f3071e 100644 --- a/asm/non_matchings/unknown_0255E0/func_80028050.s +++ b/asm/non_matchings/unknown_0255E0/func_80028050.s @@ -26,14 +26,14 @@ glabel func_80028050 /* 028CB0 800280B0 00046C00 */ sll $t5, $a0, 0x10 /* 028CB4 800280B4 25F3FFFF */ addiu $s3, $t7, -1 /* 028CB8 800280B8 000D2403 */ sra $a0, $t5, 0x10 -/* 028CBC 800280BC 0C01C1F1 */ jal func_800707C4 +/* 028CBC 800280BC 0C01C1F1 */ jal cosine_s /* 028CC0 800280C0 AFA30074 */ sw $v1, 0x74($sp) /* 028CC4 800280C4 E7A0010C */ swc1 $f0, 0x10c($sp) /* 028CC8 800280C8 86440000 */ lh $a0, ($s2) /* 028CCC 800280CC 00000000 */ nop /* 028CD0 800280D0 00042023 */ negu $a0, $a0 /* 028CD4 800280D4 00047C00 */ sll $t7, $a0, 0x10 -/* 028CD8 800280D8 0C01C1FE */ jal func_800707F8 +/* 028CD8 800280D8 0C01C1FE */ jal sine_s /* 028CDC 800280DC 000F2403 */ sra $a0, $t7, 0x10 /* 028CE0 800280E0 3C0144A0 */ li $at, 0x44A00000 # 1280.000000 /* 028CE4 800280E4 44812000 */ mtc1 $at, $f4 diff --git a/asm/non_matchings/unknown_0255E0/func_8002F440.s b/asm/non_matchings/unknown_0255E0/func_8002F440.s index e4c226f5..1a24097f 100644 --- a/asm/non_matchings/unknown_0255E0/func_8002F440.s +++ b/asm/non_matchings/unknown_0255E0/func_8002F440.s @@ -21,14 +21,14 @@ glabel func_8002F440 /* 030070 8002F470 AFB1001C */ sw $s1, 0x1c($sp) /* 030074 8002F474 AFB00018 */ sw $s0, 0x18($sp) /* 030078 8002F478 85C40000 */ lh $a0, ($t6) -/* 03007C 8002F47C 0C01C1F1 */ jal func_800707C4 +/* 03007C 8002F47C 0C01C1F1 */ jal cosine_s /* 030080 8002F480 241700FF */ li $s7, 255 /* 030084 8002F484 3C0C8012 */ lui $t4, %hi(D_8011D0C4) # $t4, 0x8012 /* 030088 8002F488 258CD0C4 */ addiu $t4, %lo(D_8011D0C4) # addiu $t4, $t4, -0x2f3c /* 03008C 8002F48C 8D8F0000 */ lw $t7, ($t4) /* 030090 8002F490 00000000 */ nop /* 030094 8002F494 85E40000 */ lh $a0, ($t7) -/* 030098 8002F498 0C01C1FE */ jal func_800707F8 +/* 030098 8002F498 0C01C1FE */ jal sine_s /* 03009C 8002F49C E7A00074 */ swc1 $f0, 0x74($sp) /* 0300A0 8002F4A0 3C188012 */ lui $t8, %hi(D_8011D0C0) # $t8, 0x8012 /* 0300A4 8002F4A4 8F18D0C0 */ lw $t8, %lo(D_8011D0C0)($t8) diff --git a/asm/non_matchings/unknown_032760/func_8003E694.s b/asm/non_matchings/unknown_032760/func_8003E694.s index 37866477..87627b38 100644 --- a/asm/non_matchings/unknown_032760/func_8003E694.s +++ b/asm/non_matchings/unknown_032760/func_8003E694.s @@ -340,7 +340,7 @@ glabel func_8003E694 /* 03F784 8003EB84 E6320008 */ swc1 $f18, 8($s1) .L8003EB88: /* 03F788 8003EB88 00046700 */ sll $t4, $a0, 0x1c -/* 03F78C 8003EB8C 0C01C1F1 */ jal func_800707C4 +/* 03F78C 8003EB8C 0C01C1F1 */ jal cosine_s /* 03F790 8003EB90 000C2403 */ sra $a0, $t4, 0x10 /* 03F794 8003EB94 3C013E80 */ li $at, 0x3E800000 # 0.250000 /* 03F798 8003EB98 44812000 */ mtc1 $at, $f4 diff --git a/asm/non_matchings/unknown_032760/obj_init_fish.s b/asm/non_matchings/unknown_032760/obj_init_fish.s index 7ad7af13..8b6a5401 100644 --- a/asm/non_matchings/unknown_032760/obj_init_fish.s +++ b/asm/non_matchings/unknown_032760/obj_init_fish.s @@ -84,24 +84,24 @@ glabel obj_init_fish /* 037954 80036D54 861800FE */ lh $t8, 0xfe($s0) /* 037958 80036D58 00000000 */ nop /* 03795C 80036D5C 0018CC40 */ sll $t9, $t8, 0x11 -/* 037960 80036D60 0C01C1F1 */ jal func_800707C4 +/* 037960 80036D60 0C01C1F1 */ jal cosine_s /* 037964 80036D64 00192403 */ sra $a0, $t9, 0x10 /* 037968 80036D68 C6060114 */ lwc1 $f6, 0x114($s0) /* 03796C 80036D6C 00000000 */ nop /* 037970 80036D70 46060282 */ mul.s $f10, $f0, $f6 /* 037974 80036D74 E7AA0030 */ swc1 $f10, 0x30($sp) /* 037978 80036D78 860400FE */ lh $a0, 0xfe($s0) -/* 03797C 80036D7C 0C01C1FE */ jal func_800707F8 +/* 03797C 80036D7C 0C01C1FE */ jal sine_s /* 037980 80036D80 00000000 */ nop /* 037984 80036D84 C6040114 */ lwc1 $f4, 0x114($s0) /* 037988 80036D88 00000000 */ nop /* 03798C 80036D8C 46040482 */ mul.s $f18, $f0, $f4 /* 037990 80036D90 E7B2002C */ swc1 $f18, 0x2c($sp) /* 037994 80036D94 86040104 */ lh $a0, 0x104($s0) -/* 037998 80036D98 0C01C1F1 */ jal func_800707C4 +/* 037998 80036D98 0C01C1F1 */ jal cosine_s /* 03799C 80036D9C 00000000 */ nop /* 0379A0 80036DA0 86040104 */ lh $a0, 0x104($s0) -/* 0379A4 80036DA4 0C01C1FE */ jal func_800707F8 +/* 0379A4 80036DA4 0C01C1FE */ jal sine_s /* 0379A8 80036DA8 E7A00028 */ swc1 $f0, 0x28($sp) /* 0379AC 80036DAC C7A20030 */ lwc1 $f2, 0x30($sp) /* 0379B0 80036DB0 C7AC0028 */ lwc1 $f12, 0x28($sp) diff --git a/asm/non_matchings/unknown_032760/obj_init_midifade.s b/asm/non_matchings/unknown_032760/obj_init_midifade.s index d99b7675..ecee1455 100644 --- a/asm/non_matchings/unknown_032760/obj_init_midifade.s +++ b/asm/non_matchings/unknown_032760/obj_init_midifade.s @@ -184,11 +184,11 @@ glabel obj_init_midifade /* 042940 80041D40 E7AE0080 */ swc1 $f14, 0x80($sp) /* 042944 80041D44 E7AC006C */ swc1 $f12, 0x6c($sp) /* 042948 80041D48 E7A20070 */ swc1 $f2, 0x70($sp) -/* 04294C 80041D4C 0C01C1FE */ jal func_800707F8 +/* 04294C 80041D4C 0C01C1FE */ jal sine_s /* 042950 80041D50 AFA800FC */ sw $t0, 0xfc($sp) /* 042954 80041D54 E7A00068 */ swc1 $f0, 0x68($sp) /* 042958 80041D58 86040000 */ lh $a0, ($s0) -/* 04295C 80041D5C 0C01C1F1 */ jal func_800707C4 +/* 04295C 80041D5C 0C01C1F1 */ jal cosine_s /* 042960 80041D60 00000000 */ nop /* 042964 80041D64 C7AE0080 */ lwc1 $f14, 0x80($sp) /* 042968 80041D68 C7AA0068 */ lwc1 $f10, 0x68($sp) diff --git a/asm/non_matchings/unknown_032760/obj_loop_butterfly.s b/asm/non_matchings/unknown_032760/obj_loop_butterfly.s index 08fc0594..586a1e61 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_butterfly.s +++ b/asm/non_matchings/unknown_032760/obj_loop_butterfly.s @@ -903,7 +903,7 @@ glabel L8004153C /* 042540 80041940 45010019 */ bc1t .L800419A8 /* 042544 80041944 00000000 */ nop /* 042548 80041948 86040000 */ lh $a0, ($s0) -/* 04254C 8004194C 0C01C1F1 */ jal func_800707C4 +/* 04254C 8004194C 0C01C1F1 */ jal cosine_s /* 042550 80041950 AFA8003C */ sw $t0, 0x3c($sp) /* 042554 80041954 8FA8003C */ lw $t0, 0x3c($sp) /* 042558 80041958 86040000 */ lh $a0, ($s0) @@ -911,7 +911,7 @@ glabel L8004153C /* 042560 80041960 00000000 */ nop /* 042564 80041964 46009287 */ neg.s $f10, $f18 /* 042568 80041968 460A0102 */ mul.s $f4, $f0, $f10 -/* 04256C 8004196C 0C01C1FE */ jal func_800707F8 +/* 04256C 8004196C 0C01C1FE */ jal sine_s /* 042570 80041970 E604001C */ swc1 $f4, 0x1c($s0) /* 042574 80041974 8FA8003C */ lw $t0, 0x3c($sp) /* 042578 80041978 8E05001C */ lw $a1, 0x1c($s0) diff --git a/asm/non_matchings/unknown_032760/obj_loop_effectbox.s b/asm/non_matchings/unknown_032760/obj_loop_effectbox.s index 86220401..99aae354 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_effectbox.s +++ b/asm/non_matchings/unknown_032760/obj_loop_effectbox.s @@ -26,14 +26,14 @@ glabel obj_loop_effectbox /* 0357D4 80034BD4 00047200 */ sll $t6, $a0, 8 /* 0357D8 80034BD8 000E2023 */ negu $a0, $t6 /* 0357DC 80034BDC 00047C00 */ sll $t7, $a0, 0x10 -/* 0357E0 80034BE0 0C01C1FE */ jal func_800707F8 +/* 0357E0 80034BE0 0C01C1FE */ jal sine_s /* 0357E4 80034BE4 000F2403 */ sra $a0, $t7, 0x10 /* 0357E8 80034BE8 9204000B */ lbu $a0, 0xb($s0) /* 0357EC 80034BEC 46000506 */ mov.s $f20, $f0 /* 0357F0 80034BF0 0004CA00 */ sll $t9, $a0, 8 /* 0357F4 80034BF4 00192023 */ negu $a0, $t9 /* 0357F8 80034BF8 00044400 */ sll $t0, $a0, 0x10 -/* 0357FC 80034BFC 0C01C1F1 */ jal func_800707C4 +/* 0357FC 80034BFC 0C01C1F1 */ jal cosine_s /* 035800 80034C00 00082403 */ sra $a0, $t0, 0x10 /* 035804 80034C04 920A0008 */ lbu $t2, 8($s0) /* 035808 80034C08 24020003 */ li $v0, 3 diff --git a/asm/non_matchings/unknown_032760/obj_loop_fish.s b/asm/non_matchings/unknown_032760/obj_loop_fish.s index 0508e3cd..bb9de29e 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_fish.s +++ b/asm/non_matchings/unknown_032760/obj_loop_fish.s @@ -124,20 +124,20 @@ glabel obj_loop_fish /* 037E94 80037294 860B00FE */ lh $t3, 0xfe($s0) /* 037E98 80037298 00000000 */ nop /* 037E9C 8003729C 000B6440 */ sll $t4, $t3, 0x11 -/* 037EA0 800372A0 0C01C1F1 */ jal func_800707C4 +/* 037EA0 800372A0 0C01C1F1 */ jal cosine_s /* 037EA4 800372A4 000C2403 */ sra $a0, $t4, 0x10 /* 037EA8 800372A8 C6080114 */ lwc1 $f8, 0x114($s0) /* 037EAC 800372AC 860400FE */ lh $a0, 0xfe($s0) /* 037EB0 800372B0 46080302 */ mul.s $f12, $f0, $f8 -/* 037EB4 800372B4 0C01C1FE */ jal func_800707F8 +/* 037EB4 800372B4 0C01C1FE */ jal sine_s /* 037EB8 800372B8 E7AC006C */ swc1 $f12, 0x6c($sp) /* 037EBC 800372BC C6040114 */ lwc1 $f4, 0x114($s0) /* 037EC0 800372C0 86040104 */ lh $a0, 0x104($s0) /* 037EC4 800372C4 46040082 */ mul.s $f2, $f0, $f4 -/* 037EC8 800372C8 0C01C1F1 */ jal func_800707C4 +/* 037EC8 800372C8 0C01C1F1 */ jal cosine_s /* 037ECC 800372CC E7A20064 */ swc1 $f2, 0x64($sp) /* 037ED0 800372D0 86040104 */ lh $a0, 0x104($s0) -/* 037ED4 800372D4 0C01C1FE */ jal func_800707F8 +/* 037ED4 800372D4 0C01C1FE */ jal sine_s /* 037ED8 800372D8 E7A0004C */ swc1 $f0, 0x4c($sp) /* 037EDC 800372DC C7AE006C */ lwc1 $f14, 0x6c($sp) /* 037EE0 800372E0 C7A20064 */ lwc1 $f2, 0x64($sp) @@ -261,7 +261,7 @@ glabel obj_loop_fish /* 0380B0 800374B0 000288C3 */ sra $s1, $v0, 3 /* 0380B4 800374B4 00112400 */ sll $a0, $s1, 0x10 /* 0380B8 800374B8 00047403 */ sra $t6, $a0, 0x10 -/* 0380BC 800374BC 0C01C1FE */ jal func_800707F8 +/* 0380BC 800374BC 0C01C1FE */ jal sine_s /* 0380C0 800374C0 01C02025 */ move $a0, $t6 /* 0380C4 800374C4 3C014200 */ li $at, 0x42000000 # 32.000000 /* 0380C8 800374C8 44813000 */ mtc1 $at, $f6 @@ -278,7 +278,7 @@ glabel obj_loop_fish /* 0380F4 800374F4 46005224 */ cvt.w.s $f8, $f10 /* 0380F8 800374F8 44104000 */ mfc1 $s0, $f8 /* 0380FC 800374FC 44D8F800 */ ctc1 $t8, $31 -/* 038100 80037500 0C01C1F1 */ jal func_800707C4 +/* 038100 80037500 0C01C1F1 */ jal cosine_s /* 038104 80037504 00000000 */ nop /* 038108 80037508 3C014200 */ li $at, 0x42000000 # 32.000000 /* 03810C 8003750C 44812000 */ mtc1 $at, $f4 diff --git a/asm/non_matchings/unknown_032760/obj_loop_frog.s b/asm/non_matchings/unknown_032760/obj_loop_frog.s index 6e604efa..e33c944e 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_frog.s +++ b/asm/non_matchings/unknown_032760/obj_loop_frog.s @@ -179,12 +179,12 @@ glabel L80042378 .L80042554: /* 043154 80042554 8604001A */ lh $a0, 0x1a($s0) /* 043158 80042558 AFA30100 */ sw $v1, 0x100($sp) -/* 04315C 8004255C 0C01C1F1 */ jal func_800707C4 +/* 04315C 8004255C 0C01C1F1 */ jal cosine_s /* 043160 80042560 AFA20108 */ sw $v0, 0x108($sp) /* 043164 80042564 C606001C */ lwc1 $f6, 0x1c($s0) /* 043168 80042568 8604001A */ lh $a0, 0x1a($s0) /* 04316C 8004256C 46060202 */ mul.s $f8, $f0, $f6 -/* 043170 80042570 0C01C1FE */ jal func_800707F8 +/* 043170 80042570 0C01C1FE */ jal sine_s /* 043174 80042574 E6080028 */ swc1 $f8, 0x28($s0) /* 043178 80042578 C60A001C */ lwc1 $f10, 0x1c($s0) /* 04317C 8004257C 8FA20108 */ lw $v0, 0x108($sp) @@ -301,7 +301,7 @@ glabel L800426B8 /* 043314 80042714 820B0018 */ lb $t3, 0x18($s0) /* 043318 80042718 00000000 */ nop /* 04331C 8004271C 000B6680 */ sll $t4, $t3, 0x1a -/* 043320 80042720 0C01C1FE */ jal func_800707F8 +/* 043320 80042720 0C01C1FE */ jal sine_s /* 043324 80042724 000C2403 */ sra $a0, $t4, 0x10 /* 043328 80042728 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 04332C 8004272C 44816000 */ mtc1 $at, $f12 diff --git a/asm/non_matchings/unknown_032760/obj_loop_log.s b/asm/non_matchings/unknown_032760/obj_loop_log.s index 339eaf7f..0f38a6d3 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_log.s +++ b/asm/non_matchings/unknown_032760/obj_loop_log.s @@ -64,7 +64,7 @@ glabel obj_loop_log /* 04125C 8004065C 00042023 */ negu $a0, $a0 /* 041260 80040660 00045C00 */ sll $t3, $a0, 0x10 /* 041264 80040664 000B2403 */ sra $a0, $t3, 0x10 -/* 041268 80040668 0C01C1F1 */ jal func_800707C4 +/* 041268 80040668 0C01C1F1 */ jal cosine_s /* 04126C 8004066C AFA30024 */ sw $v1, 0x24($sp) /* 041270 80040670 8FA60028 */ lw $a2, 0x28($sp) /* 041274 80040674 00000000 */ nop @@ -72,7 +72,7 @@ glabel obj_loop_log /* 04127C 8004067C E7A00018 */ swc1 $f0, 0x18($sp) /* 041280 80040680 00042023 */ negu $a0, $a0 /* 041284 80040684 00046C00 */ sll $t5, $a0, 0x10 -/* 041288 80040688 0C01C1FE */ jal func_800707F8 +/* 041288 80040688 0C01C1FE */ jal sine_s /* 04128C 8004068C 000D2403 */ sra $a0, $t5, 0x10 /* 041290 80040690 8FA30024 */ lw $v1, 0x24($sp) /* 041294 80040694 8FA60028 */ lw $a2, 0x28($sp) diff --git a/asm/non_matchings/unknown_032760/obj_loop_parkwarden.s b/asm/non_matchings/unknown_032760/obj_loop_parkwarden.s index 0cd7623c..a6add04c 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_parkwarden.s +++ b/asm/non_matchings/unknown_032760/obj_loop_parkwarden.s @@ -417,12 +417,12 @@ glabel L800397BC /* 03A4D4 800398D4 46208120 */ cvt.s.d $f4, $f16 /* 03A4D8 800398D8 E6240014 */ swc1 $f4, 0x14($s1) /* 03A4DC 800398DC 86040000 */ lh $a0, ($s0) -/* 03A4E0 800398E0 0C01C1F1 */ jal func_800707C4 +/* 03A4E0 800398E0 0C01C1F1 */ jal cosine_s /* 03A4E4 800398E4 00000000 */ nop /* 03A4E8 800398E8 C62A0014 */ lwc1 $f10, 0x14($s1) /* 03A4EC 800398EC 86040000 */ lh $a0, ($s0) /* 03A4F0 800398F0 460A0182 */ mul.s $f6, $f0, $f10 -/* 03A4F4 800398F4 0C01C1FE */ jal func_800707F8 +/* 03A4F4 800398F4 0C01C1FE */ jal sine_s /* 03A4F8 800398F8 E606001C */ swc1 $f6, 0x1c($s0) /* 03A4FC 800398FC C6320014 */ lwc1 $f18, 0x14($s1) /* 03A500 80039900 C7A200AC */ lwc1 $f2, 0xac($sp) @@ -1404,14 +1404,14 @@ glabel L8003A5AC /* 03B334 8003A734 00000000 */ nop /* 03B338 8003A738 00812021 */ addu $a0, $a0, $at /* 03B33C 8003A73C 00046C00 */ sll $t5, $a0, 0x10 -/* 03B340 8003A740 0C01C1F1 */ jal func_800707C4 +/* 03B340 8003A740 0C01C1F1 */ jal cosine_s /* 03B344 8003A744 000D2403 */ sra $a0, $t5, 0x10 /* 03B348 8003A748 E7A000A8 */ swc1 $f0, 0xa8($sp) /* 03B34C 8003A74C 86040000 */ lh $a0, ($s0) /* 03B350 8003A750 34018000 */ li $at, 32768 /* 03B354 8003A754 00812021 */ addu $a0, $a0, $at /* 03B358 8003A758 00047C00 */ sll $t7, $a0, 0x10 -/* 03B35C 8003A75C 0C01C1FE */ jal func_800707F8 +/* 03B35C 8003A75C 0C01C1FE */ jal sine_s /* 03B360 8003A760 000F2403 */ sra $a0, $t7, 0x10 /* 03B364 8003A764 C7AC0048 */ lwc1 $f12, 0x48($sp) /* 03B368 8003A768 C7B200A8 */ lwc1 $f18, 0xa8($sp) diff --git a/asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s b/asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s index 9260271a..d9b5138d 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s +++ b/asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s @@ -325,12 +325,12 @@ glabel obj_loop_stopwatchman /* 037270 80036670 462024A0 */ cvt.s.d $f18, $f4 /* 037274 80036674 E6320014 */ swc1 $f18, 0x14($s1) /* 037278 80036678 86040000 */ lh $a0, ($s0) -/* 03727C 8003667C 0C01C1F1 */ jal func_800707C4 +/* 03727C 8003667C 0C01C1F1 */ jal cosine_s /* 037280 80036680 00000000 */ nop /* 037284 80036684 C6280014 */ lwc1 $f8, 0x14($s1) /* 037288 80036688 86040000 */ lh $a0, ($s0) /* 03728C 8003668C 46080282 */ mul.s $f10, $f0, $f8 -/* 037290 80036690 0C01C1FE */ jal func_800707F8 +/* 037290 80036690 0C01C1FE */ jal sine_s /* 037294 80036694 E60A001C */ swc1 $f10, 0x1c($s0) /* 037298 80036698 C6260014 */ lwc1 $f6, 0x14($s1) /* 03729C 8003669C C7A2007C */ lwc1 $f2, 0x7c($sp) diff --git a/asm/non_matchings/waves/func_800B82B4.s b/asm/non_matchings/waves/func_800B82B4.s index 4555f49e..58be6380 100644 --- a/asm/non_matchings/waves/func_800B82B4.s +++ b/asm/non_matchings/waves/func_800B82B4.s @@ -174,12 +174,12 @@ glabel func_800B82B4 .L800B8528: /* 0B9128 800B8528 00162400 */ sll $a0, $s6, 0x10 /* 0B912C 800B852C 00047403 */ sra $t6, $a0, 0x10 -/* 0B9130 800B8530 0C01C1F1 */ jal func_800707C4 +/* 0B9130 800B8530 0C01C1F1 */ jal cosine_s /* 0B9134 800B8534 01C02025 */ move $a0, $t6 /* 0B9138 800B8538 001E2400 */ sll $a0, $fp, 0x10 /* 0B913C 800B853C 00047C03 */ sra $t7, $a0, 0x10 /* 0B9140 800B8540 01E02025 */ move $a0, $t7 -/* 0B9144 800B8544 0C01C1F1 */ jal func_800707C4 +/* 0B9144 800B8544 0C01C1F1 */ jal cosine_s /* 0B9148 800B8548 46000506 */ mov.s $f20, $f0 /* 0B914C 800B854C C6920018 */ lwc1 $f18, 0x18($s4) /* 0B9150 800B8550 C686000C */ lwc1 $f6, 0xc($s4) diff --git a/asm/non_matchings/waves/func_800BC6C8.s b/asm/non_matchings/waves/func_800BC6C8.s index dbece45f..a717fb78 100644 --- a/asm/non_matchings/waves/func_800BC6C8.s +++ b/asm/non_matchings/waves/func_800BC6C8.s @@ -29,7 +29,7 @@ glabel func_800BC6C8 /* 0BD328 800BC728 01E02025 */ move $a0, $t7 /* 0BD32C 800BC72C AFA20234 */ sw $v0, 0x234($sp) /* 0BD330 800BC730 AFA50028 */ sw $a1, 0x28($sp) -/* 0BD334 800BC734 0C01C1F1 */ jal func_800707C4 +/* 0BD334 800BC734 0C01C1F1 */ jal cosine_s /* 0BD338 800BC738 AFAB0244 */ sw $t3, 0x244($sp) /* 0BD33C 800BC73C 3C0A8013 */ lui $t2, %hi(D_80129FC8) # $t2, 0x8013 /* 0BD340 800BC740 8FAB0244 */ lw $t3, 0x244($sp) diff --git a/asm/non_matchings/waves/func_800BEFC4.s b/asm/non_matchings/waves/func_800BEFC4.s index 90066c61..4e7a97cd 100644 --- a/asm/non_matchings/waves/func_800BEFC4.s +++ b/asm/non_matchings/waves/func_800BEFC4.s @@ -228,12 +228,12 @@ glabel func_800BEFC4 /* 0BFF2C 800BF32C 44044000 */ mfc1 $a0, $f8 /* 0BFF30 800BF330 44CCF800 */ ctc1 $t4, $31 /* 0BFF34 800BF334 00046C00 */ sll $t5, $a0, 0x10 -/* 0BFF38 800BF338 0C01C1FE */ jal func_800707F8 +/* 0BFF38 800BF338 0C01C1FE */ jal sine_s /* 0BFF3C 800BF33C 000D2403 */ sra $a0, $t5, 0x10 /* 0BFF40 800BF340 00102400 */ sll $a0, $s0, 0x10 /* 0BFF44 800BF344 00047C03 */ sra $t7, $a0, 0x10 /* 0BFF48 800BF348 46000506 */ mov.s $f20, $f0 -/* 0BFF4C 800BF34C 0C01C1F1 */ jal func_800707C4 +/* 0BFF4C 800BF34C 0C01C1F1 */ jal cosine_s /* 0BFF50 800BF350 01E02025 */ move $a0, $t7 /* 0BFF54 800BF354 C62A0024 */ lwc1 $f10, 0x24($s1) /* 0BFF58 800BF358 00000000 */ nop diff --git a/asm/unknown_070110.s b/asm/unknown_070110.s index 76752920..9bae15fb 100644 --- a/asm/unknown_070110.s +++ b/asm/unknown_070110.s @@ -34,8 +34,8 @@ .include "asm/unknown_070110/func_80070638.s" .include "asm/unknown_070110/func_8007066C.s" .include "asm/unknown_070110/atan2f.s" -.include "asm/unknown_070110/func_800707C4.s" -.include "asm/unknown_070110/func_800707F8.s" +.include "asm/unknown_070110/cosine_s.s" +.include "asm/unknown_070110/sine_s.s" .include "asm/unknown_070110/func_8007082C.s" .include "asm/unknown_070110/func_80070890.s" .include "asm/unknown_070110/func_80070A2C.s" diff --git a/asm/unknown_070110/func_800707C4.s b/asm/unknown_070110/cosine_s.s similarity index 96% rename from asm/unknown_070110/func_800707C4.s rename to asm/unknown_070110/cosine_s.s index fb84beac..78c66a85 100644 --- a/asm/unknown_070110/func_800707C4.s +++ b/asm/unknown_070110/cosine_s.s @@ -1,4 +1,4 @@ -glabel func_800707C4 +glabel cosine_s /* 0713C4 800707C4 27BDFFF8 */ addiu $sp, $sp, -8 /* 0713C8 800707C8 FFBF0000 */ sd $ra, ($sp) /* 0713CC 800707CC 0C01C20C */ jal func_80070830 diff --git a/asm/unknown_070110/func_80070320.s b/asm/unknown_070110/func_80070320.s index dd6132b2..67a30c9f 100644 --- a/asm/unknown_070110/func_80070320.s +++ b/asm/unknown_070110/func_80070320.s @@ -5,34 +5,34 @@ glabel func_80070320 /* 070F2C 8007032C C4A40000 */ lwc1 $f4, ($a1) /* 070F30 80070330 C4A60004 */ lwc1 $f6, 4($a1) /* 070F34 80070334 C4A80008 */ lwc1 $f8, 8($a1) -/* 070F38 80070338 0C01C1F1 */ jal func_800707C4 +/* 070F38 80070338 0C01C1F1 */ jal cosine_s /* 070F3C 8007033C 84C40004 */ lh $a0, 4($a2) /* 070F40 80070340 46002282 */ mul.s $f10, $f4, $f0 /* 070F44 80070344 84C40004 */ lh $a0, 4($a2) /* 070F48 80070348 46003302 */ mul.s $f12, $f6, $f0 -/* 070F4C 8007034C 0C01C1FE */ jal func_800707F8 +/* 070F4C 8007034C 0C01C1FE */ jal sine_s /* 070F50 80070350 00000000 */ nop /* 070F54 80070354 46002102 */ mul.s $f4, $f4, $f0 /* 070F58 80070358 84C40002 */ lh $a0, 2($a2) /* 070F5C 8007035C 46003182 */ mul.s $f6, $f6, $f0 /* 070F60 80070360 460C2101 */ sub.s $f4, $f4, $f12 -/* 070F64 80070364 0C01C1F1 */ jal func_800707C4 +/* 070F64 80070364 0C01C1F1 */ jal cosine_s /* 070F68 80070368 460A3180 */ add.s $f6, $f6, $f10 /* 070F6C 8007036C 46003282 */ mul.s $f10, $f6, $f0 /* 070F70 80070370 84C40002 */ lh $a0, 2($a2) /* 070F74 80070374 46004302 */ mul.s $f12, $f8, $f0 -/* 070F78 80070378 0C01C1FE */ jal func_800707F8 +/* 070F78 80070378 0C01C1FE */ jal sine_s /* 070F7C 8007037C 00000000 */ nop /* 070F80 80070380 46003182 */ mul.s $f6, $f6, $f0 /* 070F84 80070384 84C40000 */ lh $a0, ($a2) /* 070F88 80070388 46004202 */ mul.s $f8, $f8, $f0 /* 070F8C 8007038C 460C3181 */ sub.s $f6, $f6, $f12 -/* 070F90 80070390 0C01C1F1 */ jal func_800707C4 +/* 070F90 80070390 0C01C1F1 */ jal cosine_s /* 070F94 80070394 460A4200 */ add.s $f8, $f8, $f10 /* 070F98 80070398 46002282 */ mul.s $f10, $f4, $f0 /* 070F9C 8007039C 84C40000 */ lh $a0, ($a2) /* 070FA0 800703A0 46004302 */ mul.s $f12, $f8, $f0 -/* 070FA4 800703A4 0C01C1FE */ jal func_800707F8 +/* 070FA4 800703A4 0C01C1FE */ jal sine_s /* 070FA8 800703A8 00000000 */ nop /* 070FAC 800703AC 46002102 */ mul.s $f4, $f4, $f0 /* 070FB0 800703B0 E4A60004 */ swc1 $f6, 4($a1) diff --git a/asm/unknown_070110/func_800703D8.s b/asm/unknown_070110/func_800703D8.s index e5c77423..d58f5b30 100644 --- a/asm/unknown_070110/func_800703D8.s +++ b/asm/unknown_070110/func_800703D8.s @@ -5,34 +5,34 @@ glabel func_800703D8 /* 070FE4 800703E4 C4A40000 */ lwc1 $f4, ($a1) /* 070FE8 800703E8 C4A60004 */ lwc1 $f6, 4($a1) /* 070FEC 800703EC C4A80008 */ lwc1 $f8, 8($a1) -/* 070FF0 800703F0 0C01C1F1 */ jal func_800707C4 +/* 070FF0 800703F0 0C01C1F1 */ jal cosine_s /* 070FF4 800703F4 84C40000 */ lh $a0, ($a2) /* 070FF8 800703F8 46002282 */ mul.s $f10, $f4, $f0 /* 070FFC 800703FC 84C40000 */ lh $a0, ($a2) /* 071000 80070400 46004302 */ mul.s $f12, $f8, $f0 -/* 071004 80070404 0C01C1FE */ jal func_800707F8 +/* 071004 80070404 0C01C1FE */ jal sine_s /* 071008 80070408 00000000 */ nop /* 07100C 8007040C 46002102 */ mul.s $f4, $f4, $f0 /* 071010 80070410 84C40002 */ lh $a0, 2($a2) /* 071014 80070414 46004202 */ mul.s $f8, $f8, $f0 /* 071018 80070418 460C2100 */ add.s $f4, $f4, $f12 -/* 07101C 8007041C 0C01C1F1 */ jal func_800707C4 +/* 07101C 8007041C 0C01C1F1 */ jal cosine_s /* 071020 80070420 460A4201 */ sub.s $f8, $f8, $f10 /* 071024 80070424 46003282 */ mul.s $f10, $f6, $f0 /* 071028 80070428 84C40002 */ lh $a0, 2($a2) /* 07102C 8007042C 46004302 */ mul.s $f12, $f8, $f0 -/* 071030 80070430 0C01C1FE */ jal func_800707F8 +/* 071030 80070430 0C01C1FE */ jal sine_s /* 071034 80070434 00000000 */ nop /* 071038 80070438 46003182 */ mul.s $f6, $f6, $f0 /* 07103C 8007043C 84C40004 */ lh $a0, 4($a2) /* 071040 80070440 46004202 */ mul.s $f8, $f8, $f0 /* 071044 80070444 460C3181 */ sub.s $f6, $f6, $f12 -/* 071048 80070448 0C01C1F1 */ jal func_800707C4 +/* 071048 80070448 0C01C1F1 */ jal cosine_s /* 07104C 8007044C 460A4200 */ add.s $f8, $f8, $f10 /* 071050 80070450 46002282 */ mul.s $f10, $f4, $f0 /* 071054 80070454 84C40004 */ lh $a0, 4($a2) /* 071058 80070458 46003302 */ mul.s $f12, $f6, $f0 -/* 07105C 8007045C 0C01C1FE */ jal func_800707F8 +/* 07105C 8007045C 0C01C1FE */ jal sine_s /* 071060 80070460 00000000 */ nop /* 071064 80070464 46002102 */ mul.s $f4, $f4, $f0 /* 071068 80070468 E4A80008 */ swc1 $f8, 8($a1) diff --git a/asm/unknown_070110/func_80070490.s b/asm/unknown_070110/func_80070490.s index afed0ef2..7a641198 100644 --- a/asm/unknown_070110/func_80070490.s +++ b/asm/unknown_070110/func_80070490.s @@ -3,17 +3,17 @@ glabel func_80070490 /* 071094 80070494 FFBF0000 */ sd $ra, ($sp) /* 071098 80070498 00803025 */ move $a2, $a0 /* 07109C 8007049C C4A80008 */ lwc1 $f8, 8($a1) -/* 0710A0 800704A0 0C01C1F1 */ jal func_800707C4 +/* 0710A0 800704A0 0C01C1F1 */ jal cosine_s /* 0710A4 800704A4 84C40002 */ lh $a0, 2($a2) /* 0710A8 800704A8 46004182 */ mul.s $f6, $f8, $f0 -/* 0710AC 800704AC 0C01C1FE */ jal func_800707F8 +/* 0710AC 800704AC 0C01C1FE */ jal sine_s /* 0710B0 800704B0 84C40002 */ lh $a0, 2($a2) /* 0710B4 800704B4 46004202 */ mul.s $f8, $f8, $f0 /* 0710B8 800704B8 46003187 */ neg.s $f6, $f6 -/* 0710BC 800704BC 0C01C1F1 */ jal func_800707C4 +/* 0710BC 800704BC 0C01C1F1 */ jal cosine_s /* 0710C0 800704C0 84C40000 */ lh $a0, ($a2) /* 0710C4 800704C4 46004102 */ mul.s $f4, $f8, $f0 -/* 0710C8 800704C8 0C01C1FE */ jal func_800707F8 +/* 0710C8 800704C8 0C01C1FE */ jal sine_s /* 0710CC 800704CC 84C40000 */ lh $a0, ($a2) /* 0710D0 800704D0 46004202 */ mul.s $f8, $f8, $f0 /* 0710D4 800704D4 E4A40000 */ swc1 $f4, ($a1) diff --git a/asm/unknown_070110/func_800707F8.s b/asm/unknown_070110/sine_s.s similarity index 96% rename from asm/unknown_070110/func_800707F8.s rename to asm/unknown_070110/sine_s.s index 67e0472d..d09edd66 100644 --- a/asm/unknown_070110/func_800707F8.s +++ b/asm/unknown_070110/sine_s.s @@ -1,4 +1,4 @@ -glabel func_800707F8 +glabel sine_s /* 0713F8 800707F8 27BDFFF8 */ addiu $sp, $sp, -8 /* 0713FC 800707FC FFBF0000 */ sd $ra, ($sp) /* 071400 80070800 0C01C20B */ jal func_8007082C diff --git a/include/math_util.h b/include/math_util.h index 1b693a45..3ec99cc9 100644 --- a/include/math_util.h +++ b/include/math_util.h @@ -5,5 +5,7 @@ #include "structs.h" extern s16 atan2f(f32 y, f32 x); +extern f32 sine_s(s16 angle); +extern f32 cosine_s(s16 angle); #endif // MATH_UTIL_H diff --git a/src/object_functions.c b/src/object_functions.c index c7a2401b..27c46444 100644 --- a/src/object_functions.c +++ b/src/object_functions.c @@ -455,8 +455,8 @@ void obj_init_effectbox(UNUSED Object *obj, UNUSED LevelObjectEntry_EffectBox *e // Has regalloc & stack issues. -f32 func_800707C4(s16); -f32 func_800707F8(s16); +f32 cosine_s(s16); +f32 sine_s(s16); Object **get_object_struct_array(s32 *count); void obj_loop_effectbox(Object *obj, s32 speed) { @@ -479,8 +479,8 @@ void obj_loop_effectbox(Object *obj, s32 speed) { obj3C = obj->segment.unk3C_a.unk3C; objList = get_object_struct_array(&numberOfObjects); - temp0 = func_800707F8((obj3C->unkB << 8) * -1); - temp1 = func_800707C4((obj3C->unkB << 8) * -1); + temp0 = sine_s((obj3C->unkB << 8) * -1); + temp1 = cosine_s((obj3C->unkB << 8) * -1); temp2 = obj3C->unk8 * 3; temp3 = obj3C->unk9 * 3; temp4 = obj3C->unkA * 3; @@ -1486,9 +1486,9 @@ void obj_init_exit(Object *obj, LevelObjectEntry_Exit *entry) { phi_f0 /= 128; obj->segment.trans.scale = phi_f0; obj->segment.trans.y_rotation = entry->unk11 << 6 << 4; - obj64->unk0 = func_800707C4(obj->segment.trans.y_rotation); + obj64->unk0 = cosine_s(obj->segment.trans.y_rotation); obj64->unk4 = 0.0f; - obj64->unk8 = func_800707F8(obj->segment.trans.y_rotation); + obj64->unk8 = sine_s(obj->segment.trans.y_rotation); obj64->unkC = -((obj64->unk0 * obj->segment.trans.x_position) + (obj64->unk8 * obj->segment.trans.z_position)); obj64->unk10 = entry->unk10; obj64->unk14 = entry->unk18; @@ -1657,9 +1657,9 @@ void obj_init_modechange(Object *obj, LevelObjectEntry_ModeChange *entry) { phi_f0 /= 128; obj->segment.trans.scale = phi_f0; obj->segment.trans.y_rotation = entry->unk9 << 6 << 4; - obj64->unk0 = func_800707C4(obj->segment.trans.y_rotation); + obj64->unk0 = cosine_s(obj->segment.trans.y_rotation); obj64->unk4 = 0.0f; - obj64->unk8 = func_800707F8(obj->segment.trans.y_rotation); + obj64->unk8 = sine_s(obj->segment.trans.y_rotation); obj64->unkC = -((obj64->unk0 * obj->segment.trans.x_position) + (obj64->unk8 * obj->segment.trans.z_position)); obj64->unk10 = entry->unk8; obj64->unk14 = entry->unkA; @@ -1682,9 +1682,9 @@ void obj_init_bonus(Object *obj, LevelObjectEntry_Bonus *entry) { phi_f0 /= 128; obj->segment.trans.scale = phi_f0; obj->segment.trans.y_rotation = entry->unk9 << 6 << 4; - obj64->unk0 = func_800707C4(obj->segment.trans.y_rotation); + obj64->unk0 = cosine_s(obj->segment.trans.y_rotation); obj64->unk4 = 0.0f; - obj64->unk8 = func_800707F8(obj->segment.trans.y_rotation); + obj64->unk8 = sine_s(obj->segment.trans.y_rotation); obj64->unkC = -((obj64->unk0 * obj->segment.trans.x_position) + (obj64->unk8 * obj->segment.trans.z_position)); obj64->unk10 = entry->unk8; obj64->unk14 = entry->unkA; @@ -1955,9 +1955,9 @@ void obj_init_trigger(Object *obj, LevelObjectEntry_Trigger *entry) { phi_f0 /= 128; obj->segment.trans.scale = phi_f0; obj->segment.trans.y_rotation = entry->rotation << 6 << 4; - obj64->unk0 = func_800707C4(obj->segment.trans.y_rotation); + obj64->unk0 = cosine_s(obj->segment.trans.y_rotation); obj64->unk4 = 0.0f; - obj64->unk8 = func_800707F8(obj->segment.trans.y_rotation); + obj64->unk8 = sine_s(obj->segment.trans.y_rotation); obj64->unkC = -((obj64->unk0 * obj->segment.trans.x_position) + (obj64->unk8 * obj->segment.trans.z_position)); obj64->unk10 = entry->scale; obj64->unk14 = entry->unkD; diff --git a/src/object_functions.h b/src/object_functions.h index baee3195..95b27beb 100644 --- a/src/object_functions.h +++ b/src/object_functions.h @@ -246,8 +246,8 @@ extern Triangle D_800DCAA8[8]; extern VertexPosition D_800DCB28[6]; extern u32 osTvType; -f32 func_800707C4(s16); // No idea where it's located -f32 func_800707F8(s16); // No idea where it's located +f32 cosine_s(s16); // No idea where it's located +f32 sine_s(s16); // No idea where it's located s32 get_random_number_from_range(s32, s32); // Non Matching src/unknown_070110.c s32 func_8007066C(s32, s32); // Non Matching src/unknown_070110.c diff --git a/src/objects.c b/src/objects.c index 0e197942..8d086ab1 100644 --- a/src/objects.c +++ b/src/objects.c @@ -996,9 +996,9 @@ void func_80012E28(Object *this) { sp_1c = 0.0f; if (sp_20->unk1D7 < 5) { - sp_1c = func_800707F8(sp_20->z_rotation_offset); + sp_1c = sine_s(sp_20->z_rotation_offset); tmp_f2 = sp_1c; - tmp_f0 = func_800707F8(sp_20->y_rotation_offset - sp_20->unk166) * tmp_f2; + tmp_f0 = sine_s(sp_20->y_rotation_offset - sp_20->unk166) * tmp_f2; tmp_f0 = (tmp_f0 < 0.0f) ? 0.0f : tmp_f0 * tmp_f0; diff --git a/src/objects.h b/src/objects.h index 1df3bd2c..8366cab3 100644 --- a/src/objects.h +++ b/src/objects.h @@ -124,7 +124,7 @@ extern s32 D_800DC85C; extern u8 D_800DC860; extern u16 D_800DC864; -f32 func_800707F8(s16); //? +f32 sine_s(s16); //? Object *func_8000BF44(s32 arg0); void func_8000BF8C(void); diff --git a/src/racer.c b/src/racer.c index e5aced07..a7ded5f6 100644 --- a/src/racer.c +++ b/src/racer.c @@ -1088,8 +1088,8 @@ void func_80058B84(f32 arg0, Object* obj, Object_Racer* arg2) { gCameraObject->trans.x_rotation = 0x400; gCameraObject->trans.z_rotation = 0; gCameraObject->unk1C = 150.0f; - xOffset = func_800707C4(0x8000 - gCameraObject->trans.y_rotation) * gCameraObject->unk1C; - zOffset = func_800707F8(0x8000 - gCameraObject->trans.y_rotation) * gCameraObject->unk1C; + xOffset = cosine_s(0x8000 - gCameraObject->trans.y_rotation) * gCameraObject->unk1C; + zOffset = sine_s(0x8000 - gCameraObject->trans.y_rotation) * gCameraObject->unk1C; gCameraObject->trans.x_position = obj->segment.trans.x_position + xOffset; temp_f12 = (gCameraObject->trans.y_position - (obj->segment.trans.y_position + 45.0f)) * 0.25; if (temp_f12 < -2.0) { diff --git a/src/unknown_032760.c b/src/unknown_032760.c index 65246d53..2e2ca77d 100644 --- a/src/unknown_032760.c +++ b/src/unknown_032760.c @@ -349,11 +349,11 @@ f32 func_80033A14(unk800DC950 *arg0) { out *= temp; break; case 3: - temp = func_800707F8(sqrtf(D_8011D4C0) * arg0->unk6C * 16384.0f); + temp = sine_s(sqrtf(D_8011D4C0) * arg0->unk6C * 16384.0f); out *= temp; break; case 4: - temp = func_800707F8(sqrtf(D_8011D4C0) * arg0->unk6C * 16384.0f); + temp = sine_s(sqrtf(D_8011D4C0) * arg0->unk6C * 16384.0f); temp *= temp; out *= temp; break; diff --git a/src/unknown_032760.h b/src/unknown_032760.h index 986454da..025af2c9 100644 --- a/src/unknown_032760.h +++ b/src/unknown_032760.h @@ -82,7 +82,7 @@ typedef struct unk800DC964 { extern unk800DC950 **D_800DC950; -f32 func_800707F8(s16); //? +f32 sine_s(s16); //? void func_80031B60(void); void func_80032210(unk800DC950 *arg0); diff --git a/src/weather.c b/src/weather.c index 917293f6..b3b49634 100644 --- a/src/weather.c +++ b/src/weather.c @@ -495,8 +495,8 @@ void func_800ADBC8(UNUSED s32 arg0) { f32 temp_f2; sp28 = 1152.0f - (f32) (D_800E2C60 >> 6); - sp24 = func_800707C4(D_80127C1C->trans.y_rotation) * sp28; - temp_f2 = func_800707F8(D_80127C1C->trans.y_rotation) * sp28; + sp24 = cosine_s(D_80127C1C->trans.y_rotation) * sp28; + temp_f2 = sine_s(D_80127C1C->trans.y_rotation) * sp28; temp_f14 = D_80127C1C->trans.x_position + (temp_f2 - sp24); temp_f16 = D_80127C1C->trans.y_position; temp_f18 = D_80127C1C->trans.z_position + (-temp_f2 - sp24); diff --git a/src/weather.h b/src/weather.h index 1eb7403a..763e683f 100644 --- a/src/weather.h +++ b/src/weather.h @@ -91,8 +91,8 @@ void func_800ADAB8(s32); void func_800ADCBC(unk800E2C2C*, s32); void func_800ABE68(Gfx **currDisplayList, Mtx **currHudMat, VertexList **currHudVerts, TriangleList **currHudTris, s32 updateRate); -f32 func_800707C4(s16); -f32 func_800707F8(s16); +f32 cosine_s(s16); +f32 sine_s(s16); s32 func_8007082C(s16); s32 func_80070830(s16); void func_800AB35C(void); From 5182d522dc48c0fffe92c52cc15abc05db981ae4 Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Tue, 3 May 2022 21:33:25 +0100 Subject: [PATCH 12/17] minor style fix --- src/racer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/racer.c b/src/racer.c index a7ded5f6..1ed4a911 100644 --- a/src/racer.c +++ b/src/racer.c @@ -989,9 +989,9 @@ void func_800570A4(Object *obj, s32 arg1, s32 arg2) { temp->unk210 = arg2; } -void func_800570B8(Object* obj, s32 arg1, s32 arg2, s32 arg3) { +void func_800570B8(Object *obj, s32 arg1, s32 arg2, s32 arg3) { s32 temp_v1; - Object_64* temp_s2; + Object_64 *temp_s2; temp_s2 = obj->unk64; if ((temp_s2->racer.unk108 == 0) && ((!(arg3 & 0x80)) || (D_8011D55C != -1))) { From d406742c3547d1a841fd0a4c292bccf559d1f73f Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Tue, 3 May 2022 21:48:02 +0100 Subject: [PATCH 13/17] Update README.md --- README.md | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 6532f2ba..d97e4d83 100755 --- a/README.md +++ b/README.md @@ -115,29 +115,29 @@ s32 is_drumstick_unlocked(void) { As of April 29th, 2022, this is our current score: ``` - =================================================================== - ADVENTURE ONE (ASM -> C Decompilation) - ------------------------- 23.32% Complete ------------------------- - # Decompiled functions: 1124 - # GLOBAL_ASM remaining: 656 - # NON_MATCHING functions: 8 - # NON_EQUIVALENT WIP functions: 107 - --------------------------- Game Status --------------------------- - Balloons: 12/47, Keys: 1/4, Trophies: 0/5 - T.T. Amulets: 1/4, Wizpig Amulets: 1/4 - ------------------------------------------------------------------- - We are participating in the Trophy Race of Dino Domain. (Round Two) - =================================================================== - ADVENTURE TWO (Cleanup & Documentation) - ------------------------- 2.99% Complete ------------------------- - # Documented functions: 147 - # Undocumented remaining: 1633 - --------------------------- Game Status --------------------------- - Balloons: 1/47, Keys: 0/4, Trophies: 0/5 - T.T. Amulets: 0/4, Wizpig Amulets: 0/4 - ------------------------------------------------------------------- - We are collecting the second balloon on Timber's Island. - =================================================================== + ===================================================================== + ADVENTURE ONE (ASM -> C Decompilation) + -------------------------- 23.52% Complete -------------------------- + # Decompiled functions: 1129 + # GLOBAL_ASM remaining: 650 + # NON_MATCHING functions: 8 + # NON_EQUIVALENT WIP functions: 104 + ---------------------------- Game Status ---------------------------- + Balloons: 12/47, Keys: 1/4, Trophies: 0/5 + T.T. Amulets: 1/4, Wizpig Amulets: 1/4 + --------------------------------------------------------------------- + We are participating in the Trophy Race of Dino Domain. (Round Three) + ===================================================================== + ADVENTURE TWO (Cleanup & Documentation) + -------------------------- 2.99% Complete -------------------------- + # Documented functions: 147 + # Undocumented remaining: 1632 + ---------------------------- Game Status ---------------------------- + Balloons: 1/47, Keys: 0/4, Trophies: 0/5 + T.T. Amulets: 0/4, Wizpig Amulets: 0/4 + --------------------------------------------------------------------- + We are collecting the second balloon on Timber's Island. + ===================================================================== ``` --- From cec67791d470d3735b40a34400510578ad3fd024 Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Tue, 3 May 2022 23:10:13 +0100 Subject: [PATCH 14/17] fix small label accuracy apprently I didn't commit this yday on my other machine --- src/racer.c | 2 +- src/racer.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/racer.c b/src/racer.c index 1ed4a911..04a0f058 100644 --- a/src/racer.c +++ b/src/racer.c @@ -531,7 +531,7 @@ void obj_init_racer(Object *obj, LevelObjectEntry_CharacterFlag *arg1) { tempObj->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_NONE && player < PLAYER_FOUR) { + if (player >= PLAYER_ONE && player <= PLAYER_FOUR) { if (func_8000E158()) { player = 1 - player; } diff --git a/src/racer.h b/src/racer.h index 3d891645..08c335dd 100644 --- a/src/racer.h +++ b/src/racer.h @@ -6,7 +6,6 @@ typedef enum ActivePlayers { PLAYER_COMPUTER = -1, - PLAYER_NONE, PLAYER_ONE, PLAYER_TWO, PLAYER_THREE, From 778ca1a175823abc07dc7881ec0cbbf72a0f8b9b Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Wed, 4 May 2022 14:46:31 +0100 Subject: [PATCH 15/17] match func_80057220 and func_800521C4 --- README.md | 6 +- asm/non_matchings/racer/func_800521C4.s | 107 --------- asm/non_matchings/racer/func_80057220.s | 274 ------------------------ include/structs.h | 4 +- src/racer.c | 148 ++++++++++++- src/racer.h | 1 + 6 files changed, 152 insertions(+), 388 deletions(-) delete mode 100644 asm/non_matchings/racer/func_800521C4.s delete mode 100644 asm/non_matchings/racer/func_80057220.s diff --git a/README.md b/README.md index d97e4d83..00a65c1b 100755 --- a/README.md +++ b/README.md @@ -117,9 +117,9 @@ As of April 29th, 2022, this is our current score: ``` ===================================================================== ADVENTURE ONE (ASM -> C Decompilation) - -------------------------- 23.52% Complete -------------------------- - # Decompiled functions: 1129 - # GLOBAL_ASM remaining: 650 + -------------------------- 23.68% Complete -------------------------- + # Decompiled functions: 1131 + # GLOBAL_ASM remaining: 648 # NON_MATCHING functions: 8 # NON_EQUIVALENT WIP functions: 104 ---------------------------- Game Status ---------------------------- diff --git a/asm/non_matchings/racer/func_800521C4.s b/asm/non_matchings/racer/func_800521C4.s deleted file mode 100644 index 73af964c..00000000 --- a/asm/non_matchings/racer/func_800521C4.s +++ /dev/null @@ -1,107 +0,0 @@ -glabel func_800521C4 -/* 052DC4 800521C4 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 052DC8 800521C8 AFBF001C */ sw $ra, 0x1c($sp) -/* 052DCC 800521CC AFB00018 */ sw $s0, 0x18($sp) -/* 052DD0 800521D0 00A08025 */ move $s0, $a1 -/* 052DD4 800521D4 AFA40030 */ sw $a0, 0x30($sp) -/* 052DD8 800521D8 AFA60038 */ sw $a2, 0x38($sp) -/* 052DDC 800521DC 0C008D5A */ jal func_80023568 -/* 052DE0 800521E0 A3A0002B */ sb $zero, 0x2b($sp) -/* 052DE4 800521E4 83A3002B */ lb $v1, 0x2b($sp) -/* 052DE8 800521E8 1040000C */ beqz $v0, .L8005221C -/* 052DEC 800521EC 00000000 */ nop -/* 052DF0 800521F0 0C006EB2 */ jal get_object_struct -/* 052DF4 800521F4 24040001 */ li $a0, 1 -/* 052DF8 800521F8 8FA40030 */ lw $a0, 0x30($sp) -/* 052DFC 800521FC 3C07481C */ lui $a3, (0x481C4000 >> 16) # lui $a3, 0x481c -/* 052E00 80052200 34E74000 */ ori $a3, (0x481C4000 & 0xFFFF) # ori $a3, $a3, 0x4000 -/* 052E04 80052204 02002825 */ move $a1, $s0 -/* 052E08 80052208 0C0148E2 */ jal func_80052388 -/* 052E0C 8005220C 00403025 */ move $a2, $v0 -/* 052E10 80052210 00021E00 */ sll $v1, $v0, 0x18 -/* 052E14 80052214 00037603 */ sra $t6, $v1, 0x18 -/* 052E18 80052218 01C01825 */ move $v1, $t6 -.L8005221C: -/* 052E1C 8005221C 14600013 */ bnez $v1, .L8005226C -/* 052E20 80052220 02002025 */ move $a0, $s0 -/* 052E24 80052224 24050001 */ li $a1, 1 -/* 052E28 80052228 27A60024 */ addiu $a2, $sp, 0x24 -/* 052E2C 8005222C 0C006DEA */ jal func_8001B7A8 -/* 052E30 80052230 A3A3002B */ sb $v1, 0x2b($sp) -/* 052E34 80052234 83A3002B */ lb $v1, 0x2b($sp) -/* 052E38 80052238 1040000C */ beqz $v0, .L8005226C -/* 052E3C 8005223C 00403025 */ move $a2, $v0 -/* 052E40 80052240 3C0F8012 */ lui $t7, %hi(D_8011D540) # $t7, 0x8012 -/* 052E44 80052244 8DEFD540 */ lw $t7, %lo(D_8011D540)($t7) -/* 052E48 80052248 8FA40030 */ lw $a0, 0x30($sp) -/* 052E4C 8005224C 15E00007 */ bnez $t7, .L8005226C -/* 052E50 80052250 02002825 */ move $a1, $s0 -/* 052E54 80052254 3C07481C */ lui $a3, (0x481C4000 >> 16) # lui $a3, 0x481c -/* 052E58 80052258 0C0148E2 */ jal func_80052388 -/* 052E5C 8005225C 34E74000 */ ori $a3, (0x481C4000 & 0xFFFF) # ori $a3, $a3, 0x4000 -/* 052E60 80052260 00021E00 */ sll $v1, $v0, 0x18 -/* 052E64 80052264 0003C603 */ sra $t8, $v1, 0x18 -/* 052E68 80052268 03001825 */ move $v1, $t8 -.L8005226C: -/* 052E6C 8005226C 14600013 */ bnez $v1, .L800522BC -/* 052E70 80052270 02002025 */ move $a0, $s0 -/* 052E74 80052274 2405FFFF */ li $a1, -1 -/* 052E78 80052278 27A60024 */ addiu $a2, $sp, 0x24 -/* 052E7C 8005227C 0C006DEA */ jal func_8001B7A8 -/* 052E80 80052280 A3A3002B */ sb $v1, 0x2b($sp) -/* 052E84 80052284 83A3002B */ lb $v1, 0x2b($sp) -/* 052E88 80052288 1040000C */ beqz $v0, .L800522BC -/* 052E8C 8005228C 00403025 */ move $a2, $v0 -/* 052E90 80052290 3C198012 */ lui $t9, %hi(D_8011D540) # $t9, 0x8012 -/* 052E94 80052294 8F39D540 */ lw $t9, %lo(D_8011D540)($t9) -/* 052E98 80052298 8FA40030 */ lw $a0, 0x30($sp) -/* 052E9C 8005229C 17200007 */ bnez $t9, .L800522BC -/* 052EA0 800522A0 02002825 */ move $a1, $s0 -/* 052EA4 800522A4 3C0746EA */ lui $a3, (0x46EA6000 >> 16) # lui $a3, 0x46ea -/* 052EA8 800522A8 0C0148E2 */ jal func_80052388 -/* 052EAC 800522AC 34E76000 */ ori $a3, (0x46EA6000 & 0xFFFF) # ori $a3, $a3, 0x6000 -/* 052EB0 800522B0 00021E00 */ sll $v1, $v0, 0x18 -/* 052EB4 800522B4 00034603 */ sra $t0, $v1, 0x18 -/* 052EB8 800522B8 01001825 */ move $v1, $t0 -.L800522BC: -/* 052EBC 800522BC 14600020 */ bnez $v1, .L80052340 -/* 052EC0 800522C0 8FBF001C */ lw $ra, 0x1c($sp) -/* 052EC4 800522C4 820901E7 */ lb $t1, 0x1e7($s0) -/* 052EC8 800522C8 240C2800 */ li $t4, 10240 -/* 052ECC 800522CC 312A001F */ andi $t2, $t1, 0x1f -/* 052ED0 800522D0 29410002 */ slti $at, $t2, 2 -/* 052ED4 800522D4 10200019 */ beqz $at, .L8005233C -/* 052ED8 800522D8 3C0144A0 */ li $at, 0x44A00000 # 1280.000000 -/* 052EDC 800522DC 44813000 */ mtc1 $at, $f6 -/* 052EE0 800522E0 C604002C */ lwc1 $f4, 0x2c($s0) -/* 052EE4 800522E4 00000000 */ nop -/* 052EE8 800522E8 46062202 */ mul.s $f8, $f4, $f6 -/* 052EEC 800522EC 444BF800 */ cfc1 $t3, $31 -/* 052EF0 800522F0 00000000 */ nop -/* 052EF4 800522F4 35610003 */ ori $at, $t3, 3 -/* 052EF8 800522F8 38210002 */ xori $at, $at, 2 -/* 052EFC 800522FC 44C1F800 */ ctc1 $at, $31 -/* 052F00 80052300 00000000 */ nop -/* 052F04 80052304 460042A4 */ cvt.w.s $f10, $f8 -/* 052F08 80052308 44055000 */ mfc1 $a1, $f10 -/* 052F0C 8005230C 44CBF800 */ ctc1 $t3, $31 -/* 052F10 80052310 04A10003 */ bgez $a1, .L80052320 -/* 052F14 80052314 28A12801 */ slti $at, $a1, 0x2801 -/* 052F18 80052318 00052823 */ negu $a1, $a1 -/* 052F1C 8005231C 28A12801 */ slti $at, $a1, 0x2801 -.L80052320: -/* 052F20 80052320 14200003 */ bnez $at, .L80052330 -/* 052F24 80052324 01852823 */ subu $a1, $t4, $a1 -/* 052F28 80052328 24052800 */ li $a1, 10240 -/* 052F2C 8005232C 01852823 */ subu $a1, $t4, $a1 -.L80052330: -/* 052F30 80052330 0C01BE53 */ jal get_random_number_from_range -/* 052F34 80052334 00052023 */ negu $a0, $a1 -/* 052F38 80052338 A602016C */ sh $v0, 0x16c($s0) -.L8005233C: -/* 052F3C 8005233C 8FBF001C */ lw $ra, 0x1c($sp) -.L80052340: -/* 052F40 80052340 8FB00018 */ lw $s0, 0x18($sp) -/* 052F44 80052344 03E00008 */ jr $ra -/* 052F48 80052348 27BD0030 */ addiu $sp, $sp, 0x30 - diff --git a/asm/non_matchings/racer/func_80057220.s b/asm/non_matchings/racer/func_80057220.s deleted file mode 100644 index 959369bc..00000000 --- a/asm/non_matchings/racer/func_80057220.s +++ /dev/null @@ -1,274 +0,0 @@ -.late_rodata -glabel D_800E68CC -.float 0.025 - -.text -glabel func_80057220 -/* 057E20 80057220 3C0E8012 */ lui $t6, %hi(D_8011D540) # $t6, 0x8012 -/* 057E24 80057224 8DCED540 */ lw $t6, %lo(D_8011D540)($t6) -/* 057E28 80057228 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* 057E2C 8005722C 3C013F80 */ li $at, 0x3F800000 # 1.000000 -/* 057E30 80057230 AFB00018 */ sw $s0, 0x18($sp) -/* 057E34 80057234 44810000 */ mtc1 $at, $f0 -/* 057E38 80057238 00A08025 */ move $s0, $a1 -/* 057E3C 8005723C AFBF001C */ sw $ra, 0x1c($sp) -/* 057E40 80057240 11C00003 */ beqz $t6, .L80057250 -/* 057E44 80057244 AFA40040 */ sw $a0, 0x40($sp) -/* 057E48 80057248 44800000 */ mtc1 $zero, $f0 -/* 057E4C 8005724C 00000000 */ nop -.L80057250: -/* 057E50 80057250 0C0044EB */ jal func_800113AC -/* 057E54 80057254 E7A0003C */ swc1 $f0, 0x3c($sp) -/* 057E58 80057258 3C048012 */ lui $a0, %hi(D_8011D540) # $a0, 0x8012 -/* 057E5C 8005725C 8C84D540 */ lw $a0, %lo(D_8011D540)($a0) -/* 057E60 80057260 AFA20028 */ sw $v0, 0x28($sp) -/* 057E64 80057264 18800072 */ blez $a0, .L80057430 -/* 057E68 80057268 2881001E */ slti $at, $a0, 0x1e -/* 057E6C 8005726C 10200070 */ beqz $at, .L80057430 -/* 057E70 80057270 00000000 */ nop -/* 057E74 80057274 920F01F4 */ lbu $t7, 0x1f4($s0) -/* 057E78 80057278 3C188012 */ lui $t8, %hi(gActivePlayerButtonPress) # $t8, 0x8012 -/* 057E7C 8005727C 15E0006C */ bnez $t7, .L80057430 -/* 057E80 80057280 00000000 */ nop -/* 057E84 80057284 8F18D52C */ lw $t8, %lo(gActivePlayerButtonPress)($t8) -/* 057E88 80057288 2483FFF2 */ addiu $v1, $a0, -0xe -/* 057E8C 8005728C 33198000 */ andi $t9, $t8, 0x8000 -/* 057E90 80057290 1320003C */ beqz $t9, .L80057384 -/* 057E94 80057294 3C088012 */ lui $t0, %hi(gCurrentCarInput) # $t0, 0x8012 -/* 057E98 80057298 04610004 */ bgez $v1, .L800572AC -/* 057E9C 8005729C 240A0018 */ li $t2, 24 -/* 057EA0 800572A0 04400002 */ bltz $v0, .L800572AC -/* 057EA4 800572A4 00000000 */ nop -/* 057EA8 800572A8 00001825 */ move $v1, $zero -.L800572AC: -/* 057EAC 800572AC 04610002 */ bgez $v1, .L800572B8 -/* 057EB0 800572B0 00000000 */ nop -/* 057EB4 800572B4 00031823 */ negu $v1, $v1 -.L800572B8: -/* 057EB8 800572B8 8D08D528 */ lw $t0, %lo(gCurrentCarInput)($t0) -/* 057EBC 800572BC 28610002 */ slti $at, $v1, 2 -/* 057EC0 800572C0 31092000 */ andi $t1, $t0, 0x2000 -/* 057EC4 800572C4 11200005 */ beqz $t1, .L800572DC -/* 057EC8 800572C8 01432823 */ subu $a1, $t2, $v1 -/* 057ECC 800572CC 10200003 */ beqz $at, .L800572DC -/* 057ED0 800572D0 01432823 */ subu $a1, $t2, $v1 -/* 057ED4 800572D4 00001825 */ move $v1, $zero -/* 057ED8 800572D8 01432823 */ subu $a1, $t2, $v1 -.L800572DC: -/* 057EDC 800572DC 00052043 */ sra $a0, $a1, 1 -/* 057EE0 800572E0 0C00322D */ jal func_8000C8B4 -/* 057EE4 800572E4 AFA50024 */ sw $a1, 0x24($sp) -/* 057EE8 800572E8 8FA50024 */ lw $a1, 0x24($sp) -/* 057EEC 800572EC 24010018 */ li $at, 24 -/* 057EF0 800572F0 14A10007 */ bne $a1, $at, .L80057310 -/* 057EF4 800572F4 A20201D3 */ sb $v0, 0x1d3($s0) -/* 057EF8 800572F8 8FA40040 */ lw $a0, 0x40($sp) -/* 057EFC 800572FC 0C015C12 */ jal func_80057048 -/* 057F00 80057300 24050022 */ li $a1, 34 -/* 057F04 80057304 0C00322D */ jal func_8000C8B4 -/* 057F08 80057308 24040014 */ li $a0, 20 -/* 057F0C 8005730C A20201D3 */ sb $v0, 0x1d3($s0) -.L80057310: -/* 057F10 80057310 0C00322D */ jal func_8000C8B4 -/* 057F14 80057314 24040014 */ li $a0, 20 -/* 057F18 80057318 820B01D3 */ lb $t3, 0x1d3($s0) -/* 057F1C 8005731C 00000000 */ nop -/* 057F20 80057320 0162082A */ slt $at, $t3, $v0 -/* 057F24 80057324 10200003 */ beqz $at, .L80057334 -/* 057F28 80057328 00000000 */ nop -/* 057F2C 8005732C 1000000B */ b .L8005735C -/* 057F30 80057330 A2000203 */ sb $zero, 0x203($s0) -.L80057334: -/* 057F34 80057334 0C00322D */ jal func_8000C8B4 -/* 057F38 80057338 24040023 */ li $a0, 35 -/* 057F3C 8005733C 820C01D3 */ lb $t4, 0x1d3($s0) -/* 057F40 80057340 240D0001 */ li $t5, 1 -/* 057F44 80057344 0182082A */ slt $at, $t4, $v0 -/* 057F48 80057348 10200003 */ beqz $at, .L80057358 -/* 057F4C 8005734C 240E0002 */ li $t6, 2 -/* 057F50 80057350 10000002 */ b .L8005735C -/* 057F54 80057354 A20D0203 */ sb $t5, 0x203($s0) -.L80057358: -/* 057F58 80057358 A20E0203 */ sb $t6, 0x203($s0) -.L8005735C: -/* 057F5C 8005735C 920F01EF */ lbu $t7, 0x1ef($s0) -/* 057F60 80057360 24190007 */ li $t9, 7 -/* 057F64 80057364 35F80001 */ ori $t8, $t7, 1 -/* 057F68 80057368 A21801EF */ sb $t8, 0x1ef($s0) -/* 057F6C 8005736C 3C018012 */ lui $at, %hi(D_8011D560) # $at, 0x8012 -/* 057F70 80057370 A439D560 */ sh $t9, %lo(D_8011D560)($at) -/* 057F74 80057374 820801D3 */ lb $t0, 0x1d3($s0) -/* 057F78 80057378 3C038012 */ lui $v1, %hi(D_8011D585) # $v1, 0x8012 -/* 057F7C 8005737C 2463D585 */ addiu $v1, %lo(D_8011D585) # addiu $v1, $v1, -0x2a7b -/* 057F80 80057380 A0680000 */ sb $t0, ($v1) -.L80057384: -/* 057F84 80057384 86090000 */ lh $t1, ($s0) -/* 057F88 80057388 3C038012 */ lui $v1, %hi(D_8011D585) # $v1, 0x8012 -/* 057F8C 8005738C 2401FFFF */ li $at, -1 -/* 057F90 80057390 15210027 */ bne $t1, $at, .L80057430 -/* 057F94 80057394 2463D585 */ addiu $v1, %lo(D_8011D585) # addiu $v1, $v1, -0x2a7b -/* 057F98 80057398 820201CC */ lb $v0, 0x1cc($s0) -/* 057F9C 8005739C 24010001 */ li $at, 1 -/* 057FA0 800573A0 10400007 */ beqz $v0, .L800573C0 -/* 057FA4 800573A4 00000000 */ nop -/* 057FA8 800573A8 14410021 */ bne $v0, $at, .L80057430 -/* 057FAC 800573AC 00000000 */ nop -/* 057FB0 800573B0 806A0000 */ lb $t2, ($v1) -/* 057FB4 800573B4 00000000 */ nop -/* 057FB8 800573B8 1140001D */ beqz $t2, .L80057430 -/* 057FBC 800573BC 00000000 */ nop -.L800573C0: -/* 057FC0 800573C0 80620000 */ lb $v0, ($v1) -/* 057FC4 800573C4 00000000 */ nop -/* 057FC8 800573C8 10400003 */ beqz $v0, .L800573D8 -/* 057FCC 800573CC 00000000 */ nop -/* 057FD0 800573D0 10000004 */ b .L800573E4 -/* 057FD4 800573D4 A20201D3 */ sb $v0, 0x1d3($s0) -.L800573D8: -/* 057FD8 800573D8 0C00322D */ jal func_8000C8B4 -/* 057FDC 800573DC 24040005 */ li $a0, 5 -/* 057FE0 800573E0 A20201D3 */ sb $v0, 0x1d3($s0) -.L800573E4: -/* 057FE4 800573E4 0C00322D */ jal func_8000C8B4 -/* 057FE8 800573E8 24040014 */ li $a0, 20 -/* 057FEC 800573EC 820B01D3 */ lb $t3, 0x1d3($s0) -/* 057FF0 800573F0 00000000 */ nop -/* 057FF4 800573F4 0162082A */ slt $at, $t3, $v0 -/* 057FF8 800573F8 10200003 */ beqz $at, .L80057408 -/* 057FFC 800573FC 00000000 */ nop -/* 058000 80057400 1000000B */ b .L80057430 -/* 058004 80057404 A2000203 */ sb $zero, 0x203($s0) -.L80057408: -/* 058008 80057408 0C00322D */ jal func_8000C8B4 -/* 05800C 8005740C 24040023 */ li $a0, 35 -/* 058010 80057410 820C01D3 */ lb $t4, 0x1d3($s0) -/* 058014 80057414 240D0001 */ li $t5, 1 -/* 058018 80057418 0182082A */ slt $at, $t4, $v0 -/* 05801C 8005741C 10200003 */ beqz $at, .L8005742C -/* 058020 80057420 240E0002 */ li $t6, 2 -/* 058024 80057424 10000002 */ b .L80057430 -/* 058028 80057428 A20D0203 */ sb $t5, 0x203($s0) -.L8005742C: -/* 05802C 8005742C A20E0203 */ sb $t6, 0x203($s0) -.L80057430: -/* 058030 80057430 820F01D3 */ lb $t7, 0x1d3($s0) -/* 058034 80057434 3C048012 */ lui $a0, %hi(D_8011D540) # $a0, 0x8012 -/* 058038 80057438 8C84D540 */ lw $a0, %lo(D_8011D540)($a0) -/* 05803C 8005743C 11E00012 */ beqz $t7, .L80057488 -/* 058040 80057440 28810050 */ slti $at, $a0, 0x50 -/* 058044 80057444 14800010 */ bnez $a0, .L80057488 -/* 058048 80057448 28810050 */ slti $at, $a0, 0x50 -/* 05804C 8005744C 8FB80028 */ lw $t8, 0x28($sp) -/* 058050 80057450 00000000 */ nop -/* 058054 80057454 1300000C */ beqz $t8, .L80057488 -/* 058058 80057458 28810050 */ slti $at, $a0, 0x50 -/* 05805C 8005745C 821901D8 */ lb $t9, 0x1d8($s0) -/* 058060 80057460 00000000 */ nop -/* 058064 80057464 17200008 */ bnez $t9, .L80057488 -/* 058068 80057468 28810050 */ slti $at, $a0, 0x50 -/* 05806C 8005746C 86040000 */ lh $a0, ($s0) -/* 058070 80057470 0C01C8D2 */ jal func_80072348 -/* 058074 80057474 24050006 */ li $a1, 6 -/* 058078 80057478 3C048012 */ lui $a0, %hi(D_8011D540) # $a0, 0x8012 -/* 05807C 8005747C 8C84D540 */ lw $a0, %lo(D_8011D540)($a0) -/* 058080 80057480 00000000 */ nop -/* 058084 80057484 28810050 */ slti $at, $a0, 0x50 -.L80057488: -/* 058088 80057488 1020000A */ beqz $at, .L800574B4 -/* 05808C 8005748C 3C088012 */ lui $t0, %hi(gActivePlayerButtonPress) # $t0, 0x8012 -/* 058090 80057490 8D08D52C */ lw $t0, %lo(gActivePlayerButtonPress)($t0) -/* 058094 80057494 240A0001 */ li $t2, 1 -/* 058098 80057498 31098000 */ andi $t1, $t0, 0x8000 -/* 05809C 8005749C 11200005 */ beqz $t1, .L800574B4 -/* 0580A0 800574A0 00000000 */ nop -/* 0580A4 800574A4 A20A01F4 */ sb $t2, 0x1f4($s0) -/* 0580A8 800574A8 3C048012 */ lui $a0, %hi(D_8011D540) # $a0, 0x8012 -/* 0580AC 800574AC 8C84D540 */ lw $a0, %lo(D_8011D540)($a0) -/* 0580B0 800574B0 00000000 */ nop -.L800574B4: -/* 0580B4 800574B4 1480000E */ bnez $a0, .L800574F0 -/* 0580B8 800574B8 00000000 */ nop -/* 0580BC 800574BC 920201EF */ lbu $v0, 0x1ef($s0) -/* 0580C0 800574C0 24050162 */ li $a1, 354 -/* 0580C4 800574C4 304B0001 */ andi $t3, $v0, 1 -/* 0580C8 800574C8 11600009 */ beqz $t3, .L800574F0 -/* 0580CC 800574CC 304CFFFE */ andi $t4, $v0, 0xfffe -/* 0580D0 800574D0 A20C01EF */ sb $t4, 0x1ef($s0) -/* 0580D4 800574D4 8FA40040 */ lw $a0, 0x40($sp) -/* 0580D8 800574D8 24060008 */ li $a2, 8 -/* 0580DC 800574DC 0C015C2E */ jal func_800570B8 -/* 0580E0 800574E0 24070082 */ li $a3, 130 -/* 0580E4 800574E4 8FA40040 */ lw $a0, 0x40($sp) -/* 0580E8 800574E8 0C015C12 */ jal func_80057048 -/* 0580EC 800574EC 24050021 */ li $a1, 33 -.L800574F0: -/* 0580F0 800574F0 920201EF */ lbu $v0, 0x1ef($s0) -/* 0580F4 800574F4 2401FFFF */ li $at, -1 -/* 0580F8 800574F8 304D0002 */ andi $t5, $v0, 2 -/* 0580FC 800574FC 11A00002 */ beqz $t5, .L80057508 -/* 058100 80057500 304EFFFD */ andi $t6, $v0, 0xfffd -/* 058104 80057504 A20E01EF */ sb $t6, 0x1ef($s0) -.L80057508: -/* 058108 80057508 820F0185 */ lb $t7, 0x185($s0) -/* 05810C 8005750C 86180000 */ lh $t8, ($s0) -/* 058110 80057510 448F2000 */ mtc1 $t7, $f4 -/* 058114 80057514 17010004 */ bne $t8, $at, .L80057528 -/* 058118 80057518 468020A0 */ cvt.s.w $f2, $f4 -/* 05811C 8005751C C6020124 */ lwc1 $f2, 0x124($s0) -/* 058120 80057520 1000001F */ b .L800575A0 -/* 058124 80057524 3C0141A0 */ lui $at, 0x41a0 -.L80057528: -/* 058128 80057528 3C014024 */ li $at, 0x40240000 # 2.562500 -/* 05812C 8005752C 44813800 */ mtc1 $at, $f7 -/* 058130 80057530 44803000 */ mtc1 $zero, $f6 -/* 058134 80057534 46001221 */ cvt.d.s $f8, $f2 -/* 058138 80057538 4628303C */ c.lt.d $f6, $f8 -/* 05813C 8005753C 00000000 */ nop -/* 058140 80057540 45000009 */ bc1f .L80057568 -/* 058144 80057544 00000000 */ nop -/* 058148 80057548 0C0270C3 */ jal get_filtered_cheats -/* 05814C 8005754C E7A20034 */ swc1 $f2, 0x34($sp) -/* 058150 80057550 C7A20034 */ lwc1 $f2, 0x34($sp) -/* 058154 80057554 30594000 */ andi $t9, $v0, 0x4000 -/* 058158 80057558 17200003 */ bnez $t9, .L80057568 -/* 05815C 8005755C 3C014120 */ li $at, 0x41200000 # 10.000000 -/* 058160 80057560 44811000 */ mtc1 $at, $f2 -/* 058164 80057564 00000000 */ nop -.L80057568: -/* 058168 80057568 0C0270C3 */ jal get_filtered_cheats -/* 05816C 8005756C E7A20034 */ swc1 $f2, 0x34($sp) -/* 058170 80057570 C7A20034 */ lwc1 $f2, 0x34($sp) -/* 058174 80057574 30482000 */ andi $t0, $v0, 0x2000 -/* 058178 80057578 11000009 */ beqz $t0, .L800575A0 -/* 05817C 8005757C 3C0141A0 */ lui $at, 0x41a0 -/* 058180 80057580 44805000 */ mtc1 $zero, $f10 -/* 058184 80057584 00000000 */ nop -/* 058188 80057588 4602503C */ c.lt.s $f10, $f2 -/* 05818C 8005758C 00000000 */ nop -/* 058190 80057590 45000003 */ bc1f .L800575A0 -/* 058194 80057594 3C0141A0 */ lui $at, 0x41a0 -/* 058198 80057598 46001087 */ neg.s $f2, $f2 -/* 05819C 8005759C 3C0141A0 */ li $at, 0x41A00000 # 20.000000 -.L800575A0: -/* 0581A0 800575A0 44816000 */ mtc1 $at, $f12 -/* 0581A4 800575A4 8FB00018 */ lw $s0, 0x18($sp) -/* 0581A8 800575A8 4602603C */ c.lt.s $f12, $f2 -/* 0581AC 800575AC 3C01800E */ lui $at, %hi(D_800E68CC) # $at, 0x800e -/* 0581B0 800575B0 45000002 */ bc1f .L800575BC -/* 0581B4 800575B4 46006007 */ neg.s $f0, $f12 -/* 0581B8 800575B8 46006086 */ mov.s $f2, $f12 -.L800575BC: -/* 0581BC 800575BC 4600103C */ c.lt.s $f2, $f0 -/* 0581C0 800575C0 00000000 */ nop -/* 0581C4 800575C4 45000002 */ bc1f .L800575D0 -/* 0581C8 800575C8 00000000 */ nop -/* 0581CC 800575CC 46000086 */ mov.s $f2, $f0 -.L800575D0: -/* 0581D0 800575D0 C43068CC */ lwc1 $f16, %lo(D_800E68CC)($at) -/* 0581D4 800575D4 C7AC003C */ lwc1 $f12, 0x3c($sp) -/* 0581D8 800575D8 46101482 */ mul.s $f18, $f2, $f16 -/* 0581DC 800575DC 8FBF001C */ lw $ra, 0x1c($sp) -/* 0581E0 800575E0 27BD0040 */ addiu $sp, $sp, 0x40 -/* 0581E4 800575E4 03E00008 */ jr $ra -/* 0581E8 800575E8 46126000 */ add.s $f0, $f12, $f18 - diff --git a/include/structs.h b/include/structs.h index d8c8b3f4..8d2723bd 100644 --- a/include/structs.h +++ b/include/structs.h @@ -877,7 +877,7 @@ typedef struct Object_Racer { /* 0x118 */ s32 unk118; /* 0x11C */ s32 unk11C; /* 0x120 */ s32 unk120; - /* 0x124 */ s32 unk124; + /* 0x124 */ f32 unk124; /* 0x128 */ u32 lap_times[3]; /* 0x134 */ s32 unk134; /* 0x138 */ s32 unk138; @@ -943,7 +943,7 @@ typedef struct Object_Racer { /* 0x1C9 */ u8 unk1C9; /* 0x1CA */ s8 unk1CA; /* 0x1CB */ u8 unk1CB; - /* 0x1CC */ u8 unk1CC; + /* 0x1CC */ s8 unk1CC; /* 0x1CD */ u8 unk1CD; /* 0x1CE */ u8 unk1CE; /* 0x1CF */ s8 unk1CF; diff --git a/src/racer.c b/src/racer.c index 04a0f058..27091b1b 100644 --- a/src/racer.c +++ b/src/racer.c @@ -759,7 +759,47 @@ void func_800521B8(s32 arg0) { D_8011D582 = arg0; } -GLOBAL_ASM("asm/non_matchings/racer/func_800521C4.s") +void func_800521C4(Object *obj, Object_Racer *racer, s32 arg2) { + Object *tempObj; + s8 foundObj; + s32 sp24; + s32 temp_f10; + + foundObj = 0; + if (func_80023568()) { + tempObj = get_object_struct(1); + foundObj = func_80052388(obj, racer, tempObj, 160000.0f); + } + if (!foundObj) { + tempObj = func_8001B7A8(racer, 1, &sp24); + if (tempObj && !D_8011D540) { + foundObj = func_80052388(obj, racer, tempObj, 160000.0f); + } + } + if (!foundObj) { + tempObj = func_8001B7A8(racer, -1, &sp24); + if (tempObj && !D_8011D540) { + foundObj = func_80052388(obj, racer, tempObj, 30000.0f); + } + } + if (!foundObj) { + if ((racer->unk1E7 & 0x1F) < 2) { + temp_f10 = racer->velocity * 1280.0f; + + if (temp_f10 < 0) { + temp_f10 = -temp_f10; + } + + if (temp_f10 > 0x2800) { + temp_f10 = 0x2800; + } + + temp_f10 = 0x2800 - temp_f10; + + racer->unk16C = get_random_number_from_range(-temp_f10, temp_f10); + } + } +} // Ran by the AI. Seems to be direction related of some sorts. void func_8005234C(unk8005234C *arg0) { @@ -1016,7 +1056,111 @@ void func_800570B8(Object *obj, s32 arg1, s32 arg2, s32 arg3) { } } -GLOBAL_ASM("asm/non_matchings/racer/func_80057220.s") +f32 func_80057220(Object* arg0, Object_Racer* arg1) { + f32 speedMultiplier; + s32 temp_v1; + f32 bananas; + f32 cap; + s32 phi_a1; + s32 sp28; + + speedMultiplier = 1.0f; + if (D_8011D540 != 0) { + speedMultiplier = 0.0f; + } + sp28 = func_800113AC(); + if (D_8011D540); + if ((D_8011D540 > 0) && (D_8011D540 < 30) && (!arg1->unk1F4)) { + temp_v1 = D_8011D540 - 14; + if ((gActivePlayerButtonPress & 0x8000) != 0) { + if ((temp_v1 < 0) && (sp28 >= 0)) { + temp_v1 = 0; + } + if (temp_v1 < 0) { + temp_v1 = -temp_v1; + } + + if ((gCurrentCarInput & 0x2000)) { + if (temp_v1 < 2) { + temp_v1 = 0; + } + } + + phi_a1 = 24 - temp_v1; + arg1->unk1D3 = func_8000C8B4(phi_a1 >> 1); + if (phi_a1 == 24) { + func_80057048(arg0, 34); + arg1->unk1D3 = func_8000C8B4(20); + } + if ((s32) arg1->unk1D3 < func_8000C8B4(20)) { + arg1->unk203 = 0; + } else if ((s32) arg1->unk1D3 < func_8000C8B4(35)) { + arg1->unk203 = 1; + } else { + arg1->unk203 = 2; + } + arg1->boost_sound |= 1; + D_8011D560 = 7; + D_8011D585 = arg1->unk1D3; + } + if ((arg1->playerIndex == -1) && (!arg1->unk1CC || (arg1->unk1CC == 1 && D_8011D585))) { + if (D_8011D585) { + arg1->unk1D3 = D_8011D585; + } else { + arg1->unk1D3 = func_8000C8B4(5); + } + if (arg1->unk1D3 < func_8000C8B4(20)) { + arg1->unk203 = 0; + } else if (arg1->unk1D3 < func_8000C8B4(35)) { + arg1->unk203 = 1; + } else { + arg1->unk203 = 2; + } + } + } + if (arg1->unk1D3 && !D_8011D540 && sp28 && !arg1->unk1D8) { + func_80072348(arg1->playerIndex, 6); + } + if ((D_8011D540 < 80) && ((gActivePlayerButtonPress & 0x8000))) { + arg1->unk1F4 = 1U; + } + if (D_8011D540 == 0) { + if ((arg1->boost_sound & 1) != 0) { + arg1->boost_sound = (u8) (arg1->boost_sound & 0xFFFE); + func_800570B8(arg0, 0x162, 8, 0x82); + func_80057048(arg0, 0x21); + } + } + if ((arg1->boost_sound & 2) != 0) { + arg1->boost_sound = (u8) (arg1->boost_sound & 0xFFFD); + } + bananas = arg1->bananas; + // Cheats only apply to human players. + if (arg1->playerIndex == PLAYER_COMPUTER) { + bananas = arg1->unk124; + } else { + if (bananas > 10.0) { + // Cap the banana speed boost to 10 if the unlimited bananas cheat is not enabled. + if (!(get_filtered_cheats() & CHEAT_NO_LIMIT_TO_BANANAS)) { + bananas = 10.0f; + } + } + // Make the speed bonus negative if the speed reduction cheat is on. + if (((get_filtered_cheats() & CHEAT_BANANAS_REDUCE_SPEED)) && (bananas > 0.0f)) { + bananas = -bananas; + } + } + // This also means the AI can have twice as many + cap = 20.0f; + if (bananas > cap) { + bananas = cap; + } + if (bananas < -cap) { + bananas = -cap; + } + speedMultiplier += (bananas * 0.025f); + return speedMultiplier; +} void func_800575EC(Object *obj, Object_Racer *obj64) { Matrix mf; diff --git a/src/racer.h b/src/racer.h index 08c335dd..3be4f778 100644 --- a/src/racer.h +++ b/src/racer.h @@ -172,6 +172,7 @@ void func_8005A3B0(void); void func_8005A3C0(void); void func_8005A3D0(void); void antipiracy_modify_surface_traction_table(void); +s32 func_80052388(Object *obj1, Object_Racer *arg1, Object *obj2, f32 distance); //Non Matching void set_ghost_position_and_rotation(Object *obj); From c756b700e2770fcfa4dbabf75f4704dd286162c4 Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Wed, 4 May 2022 14:47:26 +0100 Subject: [PATCH 16/17] rename arctan2 again --- asm/non_matchings/camera/func_80068514.s | 10 +++++----- asm/non_matchings/objects/func_8001C6C4.s | 4 ++-- asm/non_matchings/objects/func_8001F460.s | 8 ++++---- asm/non_matchings/objects/func_80021600.s | 8 ++++---- asm/non_matchings/objects/func_800230D0.s | 2 +- asm/non_matchings/racer/func_8004447C.s | 6 +++--- asm/non_matchings/racer/func_800452A0.s | 4 ++-- asm/non_matchings/racer/func_80045C48.s | 8 ++++---- asm/non_matchings/racer/func_80046524.s | 2 +- asm/non_matchings/racer/func_800494E0.s | 4 ++-- asm/non_matchings/racer/func_80054FD0.s | 8 ++++---- asm/non_matchings/racer/func_80055A84.s | 4 ++-- asm/non_matchings/racer/func_80059208.s | 2 +- asm/non_matchings/racer/func_8005A424.s | 2 +- asm/non_matchings/racer/func_8005B818.s | 4 ++-- asm/non_matchings/unknown_005740/func_800090C0.s | 2 +- asm/non_matchings/unknown_032760/func_8003EC14.s | 4 ++-- asm/non_matchings/unknown_032760/func_8003EDD8.s | 6 +++--- asm/non_matchings/unknown_032760/obj_loop_butterfly.s | 4 ++-- .../unknown_032760/obj_loop_fireball_octoweapon.s | 2 +- asm/non_matchings/unknown_032760/obj_loop_fish.s | 4 ++-- asm/non_matchings/unknown_032760/obj_loop_frog.s | 4 ++-- asm/non_matchings/unknown_032760/obj_loop_lasergun.s | 4 ++-- asm/non_matchings/unknown_032760/obj_loop_parkwarden.s | 8 ++++---- .../unknown_032760/obj_loop_stopwatchman.s | 4 ++-- asm/non_matchings/unknown_05CEF0/func_8005C364.s | 2 +- asm/non_matchings/unknown_05DCD0/func_8005D0D0.s | 2 +- asm/non_matchings/unknown_05DCD0/func_8005D820.s | 2 +- asm/non_matchings/unknown_05F0C0/func_8005E4C0.s | 2 +- asm/unknown_070110.s | 2 +- asm/unknown_070110/{atan2f.s => arctan2_f.s} | 2 +- include/math_util.h | 2 +- src/object_functions.c | 4 ++-- src/racer.c | 4 ++-- 34 files changed, 70 insertions(+), 70 deletions(-) rename asm/unknown_070110/{atan2f.s => arctan2_f.s} (98%) diff --git a/asm/non_matchings/camera/func_80068514.s b/asm/non_matchings/camera/func_80068514.s index 9be1d891..aa429b32 100644 --- a/asm/non_matchings/camera/func_80068514.s +++ b/asm/non_matchings/camera/func_80068514.s @@ -56,11 +56,11 @@ glabel func_80068514 /* 0691EC 800685EC 0C0326B4 */ jal sqrtf /* 0691F0 800685F0 46125300 */ add.s $f12, $f10, $f18 /* 0691F4 800685F4 C7AC0044 */ lwc1 $f12, 0x44($sp) -/* 0691F8 800685F8 0C01C1D4 */ jal atan2f +/* 0691F8 800685F8 0C01C1D4 */ jal arctan2_f /* 0691FC 800685FC 46000386 */ mov.s $f14, $f0 /* 069200 80068600 C7AC0044 */ lwc1 $f12, 0x44($sp) /* 069204 80068604 AFA20038 */ sw $v0, 0x38($sp) -/* 069208 80068608 0C01C1D4 */ jal atan2f +/* 069208 80068608 0C01C1D4 */ jal arctan2_f /* 06920C 8006860C 4600A386 */ mov.s $f14, $f20 /* 069210 80068610 00022400 */ sll $a0, $v0, 0x10 /* 069214 80068614 00045403 */ sra $t2, $a0, 0x10 @@ -81,7 +81,7 @@ glabel func_80068514 .L80068650: /* 069250 80068650 C7AC0058 */ lwc1 $f12, 0x58($sp) /* 069254 80068654 4600A386 */ mov.s $f14, $f20 -/* 069258 80068658 0C01C1D4 */ jal atan2f +/* 069258 80068658 0C01C1D4 */ jal arctan2_f /* 06925C 8006865C AFA4003C */ sw $a0, 0x3c($sp) /* 069260 80068660 34018001 */ li $at, 32769 /* 069264 80068664 8FA4003C */ lw $a0, 0x3c($sp) @@ -136,13 +136,13 @@ glabel func_80068514 /* 069320 80068720 46125300 */ add.s $f12, $f10, $f18 /* 069324 80068724 C7AC005C */ lwc1 $f12, 0x5c($sp) /* 069328 80068728 E7A00050 */ swc1 $f0, 0x50($sp) -/* 06932C 8006872C 0C01C1D4 */ jal atan2f +/* 06932C 8006872C 0C01C1D4 */ jal arctan2_f /* 069330 80068730 4600A386 */ mov.s $f14, $f20 /* 069334 80068734 3C058012 */ lui $a1, %hi(D_80120CF0) # $a1, 0x8012 /* 069338 80068738 24A50CF0 */ addiu $a1, %lo(D_80120CF0) # addiu $a1, $a1, 0xcf0 /* 06933C 8006873C C7AC0058 */ lwc1 $f12, 0x58($sp) /* 069340 80068740 C7AE0050 */ lwc1 $f14, 0x50($sp) -/* 069344 80068744 0C01C1D4 */ jal atan2f +/* 069344 80068744 0C01C1D4 */ jal arctan2_f /* 069348 80068748 A4A20000 */ sh $v0, ($a1) /* 06934C 8006874C 3C058012 */ lui $a1, %hi(D_80120CF0) # $a1, 0x8012 /* 069350 80068750 8FAE0034 */ lw $t6, 0x34($sp) diff --git a/asm/non_matchings/objects/func_8001C6C4.s b/asm/non_matchings/objects/func_8001C6C4.s index cc1bb885..4348d98a 100644 --- a/asm/non_matchings/objects/func_8001C6C4.s +++ b/asm/non_matchings/objects/func_8001C6C4.s @@ -245,7 +245,7 @@ glabel func_8001C6C4 /* 01D638 8001CA38 4500003C */ bc1f .L8001CB2C /* 01D63C 8001CA3C 8FAB00EC */ lw $t3, 0xec($sp) /* 01D640 8001CA40 4600B306 */ mov.s $f12, $f22 -/* 01D644 8001CA44 0C01C1D4 */ jal atan2f +/* 01D644 8001CA44 0C01C1D4 */ jal arctan2_f /* 01D648 8001CA48 4600D386 */ mov.s $f14, $f26 /* 01D64C 8001CA4C 8FA800EC */ lw $t0, 0xec($sp) /* 01D650 8001CA50 24018000 */ li $at, -32768 @@ -281,7 +281,7 @@ glabel func_8001C6C4 /* 01D6C0 8001CAC0 00005812 */ mflo $t3 /* 01D6C4 8001CAC4 000B6103 */ sra $t4, $t3, 4 /* 01D6C8 8001CAC8 006C6821 */ addu $t5, $v1, $t4 -/* 01D6CC 8001CACC 0C01C1D4 */ jal atan2f +/* 01D6CC 8001CACC 0C01C1D4 */ jal arctan2_f /* 01D6D0 8001CAD0 A5CD0000 */ sh $t5, ($t6) /* 01D6D4 8001CAD4 8FAF00EC */ lw $t7, 0xec($sp) /* 01D6D8 8001CAD8 00000000 */ nop diff --git a/asm/non_matchings/objects/func_8001F460.s b/asm/non_matchings/objects/func_8001F460.s index 09a1367a..286a1d28 100644 --- a/asm/non_matchings/objects/func_8001F460.s +++ b/asm/non_matchings/objects/func_8001F460.s @@ -1404,7 +1404,7 @@ glabel func_8001F460 .L800208E8: /* 0214E8 800208E8 C7AE011C */ lwc1 $f14, 0x11c($sp) /* 0214EC 800208EC C7AC0124 */ lwc1 $f12, 0x124($sp) -/* 0214F0 800208F0 0C01C1D4 */ jal atan2f +/* 0214F0 800208F0 0C01C1D4 */ jal arctan2_f /* 0214F4 800208F4 00000000 */ nop /* 0214F8 800208F8 24018000 */ li $at, -32768 /* 0214FC 800208FC 00417021 */ addu $t6, $v0, $at @@ -1412,7 +1412,7 @@ glabel func_8001F460 /* 021504 80020904 3C0142C8 */ li $at, 0x42C80000 # 100.000000 /* 021508 80020908 44817000 */ mtc1 $at, $f14 /* 02150C 8002090C C7AC0120 */ lwc1 $f12, 0x120($sp) -/* 021510 80020910 0C01C1D4 */ jal atan2f +/* 021510 80020910 0C01C1D4 */ jal arctan2_f /* 021514 80020914 00000000 */ nop /* 021518 80020918 10000107 */ b .L80020D38 /* 02151C 8002091C A6C20002 */ sh $v0, 2($s6) @@ -1916,13 +1916,13 @@ glabel func_8001F460 /* 021C48 80021048 4500000B */ bc1f .L80021078 /* 021C4C 8002104C 46000506 */ mov.s $f20, $f0 /* 021C50 80021050 C7AC0124 */ lwc1 $f12, 0x124($sp) -/* 021C54 80021054 0C01C1D4 */ jal atan2f +/* 021C54 80021054 0C01C1D4 */ jal arctan2_f /* 021C58 80021058 00000000 */ nop /* 021C5C 8002105C 24018000 */ li $at, -32768 /* 021C60 80021060 0041C021 */ addu $t8, $v0, $at /* 021C64 80021064 A6D80000 */ sh $t8, ($s6) /* 021C68 80021068 C7AC0120 */ lwc1 $f12, 0x120($sp) -/* 021C6C 8002106C 0C01C1D4 */ jal atan2f +/* 021C6C 8002106C 0C01C1D4 */ jal arctan2_f /* 021C70 80021070 4600A386 */ mov.s $f14, $f20 /* 021C74 80021074 A6C20002 */ sh $v0, 2($s6) .L80021078: diff --git a/asm/non_matchings/objects/func_80021600.s b/asm/non_matchings/objects/func_80021600.s index 5fafc5b6..0ae8bd1b 100644 --- a/asm/non_matchings/objects/func_80021600.s +++ b/asm/non_matchings/objects/func_80021600.s @@ -626,7 +626,7 @@ glabel func_80021600 .L80021F60: /* 022B60 80021F60 C7AE00F0 */ lwc1 $f14, 0xf0($sp) /* 022B64 80021F64 C7AC00F8 */ lwc1 $f12, 0xf8($sp) -/* 022B68 80021F68 0C01C1D4 */ jal atan2f +/* 022B68 80021F68 0C01C1D4 */ jal arctan2_f /* 022B6C 80021F6C 00000000 */ nop /* 022B70 80021F70 24018000 */ li $at, -32768 /* 022B74 80021F74 8FAD0154 */ lw $t5, 0x154($sp) @@ -635,7 +635,7 @@ glabel func_80021600 /* 022B80 80021F80 A5AC0000 */ sh $t4, ($t5) /* 022B84 80021F84 C7AC00F4 */ lwc1 $f12, 0xf4($sp) /* 022B88 80021F88 44817000 */ mtc1 $at, $f14 -/* 022B8C 80021F8C 0C01C1D4 */ jal atan2f +/* 022B8C 80021F8C 0C01C1D4 */ jal arctan2_f /* 022B90 80021F90 00000000 */ nop /* 022B94 80021F94 8FAF0154 */ lw $t7, 0x154($sp) /* 022B98 80021F98 1000015A */ b .L80022504 @@ -706,7 +706,7 @@ glabel func_80021600 /* 022C90 80022090 C7AC00F8 */ lwc1 $f12, 0xf8($sp) /* 022C94 80022094 4500011B */ bc1f .L80022504 /* 022C98 80022098 E7A000EC */ swc1 $f0, 0xec($sp) -/* 022C9C 8002209C 0C01C1D4 */ jal atan2f +/* 022C9C 8002209C 0C01C1D4 */ jal arctan2_f /* 022CA0 800220A0 00000000 */ nop /* 022CA4 800220A4 8FAF0154 */ lw $t7, 0x154($sp) /* 022CA8 800220A8 24018000 */ li $at, -32768 @@ -714,7 +714,7 @@ glabel func_80021600 /* 022CB0 800220B0 A5ED0000 */ sh $t5, ($t7) /* 022CB4 800220B4 C7AE00EC */ lwc1 $f14, 0xec($sp) /* 022CB8 800220B8 C7AC00F4 */ lwc1 $f12, 0xf4($sp) -/* 022CBC 800220BC 0C01C1D4 */ jal atan2f +/* 022CBC 800220BC 0C01C1D4 */ jal arctan2_f /* 022CC0 800220C0 00000000 */ nop /* 022CC4 800220C4 8FAE0154 */ lw $t6, 0x154($sp) /* 022CC8 800220C8 1000010E */ b .L80022504 diff --git a/asm/non_matchings/objects/func_800230D0.s b/asm/non_matchings/objects/func_800230D0.s index 272901b6..aedc8cb3 100644 --- a/asm/non_matchings/objects/func_800230D0.s +++ b/asm/non_matchings/objects/func_800230D0.s @@ -117,7 +117,7 @@ glabel func_800230D0 /* 023E80 80023280 E6280064 */ swc1 $f8, 0x64($s1) /* 023E84 80023284 C50C0000 */ lwc1 $f12, ($t0) /* 023E88 80023288 C50E0008 */ lwc1 $f14, 8($t0) -/* 023E8C 8002328C 0C01C1D4 */ jal atan2f +/* 023E8C 8002328C 0C01C1D4 */ jal arctan2_f /* 023E90 80023290 AFA8005C */ sw $t0, 0x5c($sp) /* 023E94 80023294 8FA8005C */ lw $t0, 0x5c($sp) /* 023E98 80023298 10000004 */ b .L800232AC diff --git a/asm/non_matchings/racer/func_8004447C.s b/asm/non_matchings/racer/func_8004447C.s index 104fd685..31c06816 100644 --- a/asm/non_matchings/racer/func_8004447C.s +++ b/asm/non_matchings/racer/func_8004447C.s @@ -86,7 +86,7 @@ glabel func_8004447C /* 0451A0 800445A0 4500001A */ bc1f .L8004460C /* 0451A4 800445A4 E7A0005C */ swc1 $f0, 0x5c($sp) /* 0451A8 800445A8 C7AC0064 */ lwc1 $f12, 0x64($sp) -/* 0451AC 800445AC 0C01C1D4 */ jal atan2f +/* 0451AC 800445AC 0C01C1D4 */ jal arctan2_f /* 0451B0 800445B0 AFA60074 */ sw $a2, 0x74($sp) /* 0451B4 800445B4 24018000 */ li $at, -32768 /* 0451B8 800445B8 00417821 */ addu $t7, $v0, $at @@ -571,7 +571,7 @@ glabel L80044ADC /* 045880 80044C80 45000028 */ bc1f .L80044D24 /* 045884 80044C84 00000000 */ nop /* 045888 80044C88 C7AC0064 */ lwc1 $f12, 0x64($sp) -/* 04588C 80044C8C 0C01C1D4 */ jal atan2f +/* 04588C 80044C8C 0C01C1D4 */ jal arctan2_f /* 045890 80044C90 00000000 */ nop /* 045894 80044C94 24018000 */ li $at, -32768 /* 045898 80044C98 00417021 */ addu $t6, $v0, $at @@ -841,7 +841,7 @@ glabel L80044F54 /* 045C5C 8004505C 45000028 */ bc1f .L80045100 /* 045C60 80045060 00000000 */ nop /* 045C64 80045064 C7AC0064 */ lwc1 $f12, 0x64($sp) -/* 045C68 80045068 0C01C1D4 */ jal atan2f +/* 045C68 80045068 0C01C1D4 */ jal arctan2_f /* 045C6C 8004506C A7A50052 */ sh $a1, 0x52($sp) /* 045C70 80045070 8FB90078 */ lw $t9, 0x78($sp) /* 045C74 80045074 AFA20058 */ sw $v0, 0x58($sp) diff --git a/asm/non_matchings/racer/func_800452A0.s b/asm/non_matchings/racer/func_800452A0.s index e0ee62f6..b7f9dc0f 100644 --- a/asm/non_matchings/racer/func_800452A0.s +++ b/asm/non_matchings/racer/func_800452A0.s @@ -504,7 +504,7 @@ glabel L800456DC /* 046568 80045968 45000031 */ bc1f .L80045A30 /* 04656C 8004596C 46000086 */ mov.s $f2, $f0 /* 046570 80045970 4600A306 */ mov.s $f12, $f20 -/* 046574 80045974 0C01C1D4 */ jal atan2f +/* 046574 80045974 0C01C1D4 */ jal arctan2_f /* 046578 80045978 E7A200A8 */ swc1 $f2, 0xa8($sp) /* 04657C 8004597C 24018000 */ li $at, -32768 /* 046580 80045980 0041C821 */ addu $t9, $v0, $at @@ -535,7 +535,7 @@ glabel L800456DC /* 0465DC 800459DC 0C0326B4 */ jal sqrtf /* 0465E0 800459E0 4608C300 */ add.s $f12, $f24, $f8 /* 0465E4 800459E4 4600B306 */ mov.s $f12, $f22 -/* 0465E8 800459E8 0C01C1D4 */ jal atan2f +/* 0465E8 800459E8 0C01C1D4 */ jal arctan2_f /* 0465EC 800459EC 46000386 */ mov.s $f14, $f0 /* 0465F0 800459F0 3044FFFF */ andi $a0, $v0, 0xffff /* 0465F4 800459F4 C7A200A8 */ lwc1 $f2, 0xa8($sp) diff --git a/asm/non_matchings/racer/func_80045C48.s b/asm/non_matchings/racer/func_80045C48.s index 406d48e8..4b67219d 100644 --- a/asm/non_matchings/racer/func_80045C48.s +++ b/asm/non_matchings/racer/func_80045C48.s @@ -234,7 +234,7 @@ glabel func_80045C48 .L80045FC8: /* 046BC8 80045FC8 C7AE0054 */ lwc1 $f14, 0x54($sp) /* 046BCC 80045FCC C7AC005C */ lwc1 $f12, 0x5c($sp) -/* 046BD0 80045FD0 0C01C1D4 */ jal atan2f +/* 046BD0 80045FD0 0C01C1D4 */ jal arctan2_f /* 046BD4 80045FD4 00000000 */ nop /* 046BD8 80045FD8 24018000 */ li $at, -32768 /* 046BDC 80045FDC 00418021 */ addu $s0, $v0, $at @@ -242,7 +242,7 @@ glabel func_80045C48 /* 046BE4 80045FE4 320BFFFF */ andi $t3, $s0, 0xffff /* 046BE8 80045FE8 44817000 */ mtc1 $at, $f14 /* 046BEC 80045FEC C7AC0058 */ lwc1 $f12, 0x58($sp) -/* 046BF0 80045FF0 0C01C1D4 */ jal atan2f +/* 046BF0 80045FF0 0C01C1D4 */ jal arctan2_f /* 046BF4 80045FF4 01608025 */ move $s0, $t3 /* 046BF8 80045FF8 862C01BE */ lh $t4, 0x1be($s1) /* 046BFC 80045FFC 862D01C0 */ lh $t5, 0x1c0($s1) @@ -472,7 +472,7 @@ glabel func_80045C48 /* 046F38 80046338 C4460014 */ lwc1 $f6, 0x14($v0) /* 046F3C 8004633C 46082280 */ add.s $f10, $f4, $f8 /* 046F40 80046340 46065381 */ sub.s $f14, $f10, $f6 -/* 046F44 80046344 0C01C1D4 */ jal atan2f +/* 046F44 80046344 0C01C1D4 */ jal arctan2_f /* 046F48 80046348 E7AE0054 */ swc1 $f14, 0x54($sp) /* 046F4C 8004634C 24018000 */ li $at, -32768 /* 046F50 80046350 00418021 */ addu $s0, $v0, $at @@ -480,7 +480,7 @@ glabel func_80045C48 /* 046F58 80046358 320DFFFF */ andi $t5, $s0, 0xffff /* 046F5C 8004635C 44817000 */ mtc1 $at, $f14 /* 046F60 80046360 C7AC0058 */ lwc1 $f12, 0x58($sp) -/* 046F64 80046364 0C01C1D4 */ jal atan2f +/* 046F64 80046364 0C01C1D4 */ jal arctan2_f /* 046F68 80046368 01A08025 */ move $s0, $t5 /* 046F6C 8004636C 862501A0 */ lh $a1, 0x1a0($s1) /* 046F70 80046370 34018001 */ li $at, 32769 diff --git a/asm/non_matchings/racer/func_80046524.s b/asm/non_matchings/racer/func_80046524.s index dc03593a..d1c68e78 100644 --- a/asm/non_matchings/racer/func_80046524.s +++ b/asm/non_matchings/racer/func_80046524.s @@ -1306,7 +1306,7 @@ glabel func_80046524 /* 048368 80047768 C62C001C */ lwc1 $f12, 0x1c($s1) /* 04836C 8004776C C62E0024 */ lwc1 $f14, 0x24($s1) /* 048370 80047770 E7B20104 */ swc1 $f18, 0x104($sp) -/* 048374 80047774 0C01C1D4 */ jal atan2f +/* 048374 80047774 0C01C1D4 */ jal arctan2_f /* 048378 80047778 E7A200D0 */ swc1 $f2, 0xd0($sp) /* 04837C 8004777C 34058000 */ li $a1, 32768 /* 048380 80047780 C7A200D0 */ lwc1 $f2, 0xd0($sp) diff --git a/asm/non_matchings/racer/func_800494E0.s b/asm/non_matchings/racer/func_800494E0.s index a3486f5c..8dca7559 100644 --- a/asm/non_matchings/racer/func_800494E0.s +++ b/asm/non_matchings/racer/func_800494E0.s @@ -91,7 +91,7 @@ glabel func_800494E0 /* 04A224 80049624 27A40048 */ addiu $a0, $sp, 0x48 /* 04A228 80049628 C60C0000 */ lwc1 $f12, ($s0) /* 04A22C 8004962C C60E0004 */ lwc1 $f14, 4($s0) -/* 04A230 80049630 0C01C1D4 */ jal atan2f +/* 04A230 80049630 0C01C1D4 */ jal arctan2_f /* 04A234 80049634 00000000 */ nop /* 04A238 80049638 00026400 */ sll $t4, $v0, 0x10 /* 04A23C 8004963C 000C6C03 */ sra $t5, $t4, 0x10 @@ -135,7 +135,7 @@ glabel func_800494E0 /* 04A2CC 800496CC A4AF01A4 */ sh $t7, 0x1a4($a1) /* 04A2D0 800496D0 C60E0004 */ lwc1 $f14, 4($s0) /* 04A2D4 800496D4 C60C0008 */ lwc1 $f12, 8($s0) -/* 04A2D8 800496D8 0C01C1D4 */ jal atan2f +/* 04A2D8 800496D8 0C01C1D4 */ jal arctan2_f /* 04A2DC 800496DC E7A20044 */ swc1 $f2, 0x44($sp) /* 04A2E0 800496E0 0002CC00 */ sll $t9, $v0, 0x10 /* 04A2E4 800496E4 0019C403 */ sra $t8, $t9, 0x10 diff --git a/asm/non_matchings/racer/func_80054FD0.s b/asm/non_matchings/racer/func_80054FD0.s index 17cc5016..6ed49ce0 100644 --- a/asm/non_matchings/racer/func_80054FD0.s +++ b/asm/non_matchings/racer/func_80054FD0.s @@ -256,7 +256,7 @@ glabel func_80054FD0 /* 055F94 80055394 46003302 */ mul.s $f12, $f6, $f0 /* 055F98 80055398 AFA9018C */ sw $t1, 0x18c($sp) /* 055F9C 8005539C 46004382 */ mul.s $f14, $f8, $f0 -/* 055FA0 800553A0 0C01C1D4 */ jal atan2f +/* 055FA0 800553A0 0C01C1D4 */ jal arctan2_f /* 055FA4 800553A4 00000000 */ nop /* 055FA8 800553A8 86390000 */ lh $t9, ($s1) /* 055FAC 800553AC 8FA9018C */ lw $t1, 0x18c($sp) @@ -587,7 +587,7 @@ glabel func_80054FD0 /* 056474 80055874 46083080 */ add.s $f2, $f6, $f8 /* 056478 80055878 E7B00180 */ swc1 $f16, 0x180($sp) /* 05647C 8005587C 46029381 */ sub.s $f14, $f18, $f2 -/* 056480 80055880 0C01C1D4 */ jal atan2f +/* 056480 80055880 0C01C1D4 */ jal arctan2_f /* 056484 80055884 46008301 */ sub.s $f12, $f16, $f0 /* 056488 80055888 34018000 */ li $at, 32768 /* 05648C 8005588C 00412021 */ addu $a0, $v0, $at @@ -657,7 +657,7 @@ glabel func_80054FD0 /* 056570 80055970 46045301 */ sub.s $f12, $f10, $f4 /* 056574 80055974 46083381 */ sub.s $f14, $f6, $f8 /* 056578 80055978 E7AC0180 */ swc1 $f12, 0x180($sp) -/* 05657C 8005597C 0C01C1D4 */ jal atan2f +/* 05657C 8005597C 0C01C1D4 */ jal arctan2_f /* 056580 80055980 E7AE017C */ swc1 $f14, 0x17c($sp) /* 056584 80055984 8FB80184 */ lw $t8, 0x184($sp) /* 056588 80055988 00000000 */ nop @@ -675,7 +675,7 @@ glabel func_80054FD0 /* 0565B4 800559B4 46045301 */ sub.s $f12, $f10, $f4 /* 0565B8 800559B8 46083381 */ sub.s $f14, $f6, $f8 /* 0565BC 800559BC E7AC0180 */ swc1 $f12, 0x180($sp) -/* 0565C0 800559C0 0C01C1D4 */ jal atan2f +/* 0565C0 800559C0 0C01C1D4 */ jal arctan2_f /* 0565C4 800559C4 E7AE017C */ swc1 $f14, 0x17c($sp) /* 0565C8 800559C8 8FB80184 */ lw $t8, 0x184($sp) /* 0565CC 800559CC 24194000 */ li $t9, 16384 diff --git a/asm/non_matchings/racer/func_80055A84.s b/asm/non_matchings/racer/func_80055A84.s index fe887759..74946648 100644 --- a/asm/non_matchings/racer/func_80055A84.s +++ b/asm/non_matchings/racer/func_80055A84.s @@ -196,7 +196,7 @@ glabel func_80055A84 /* 056968 80055D68 460A4300 */ add.s $f12, $f8, $f10 /* 05696C 80055D6C 46009182 */ mul.s $f6, $f18, $f0 /* 056970 80055D70 46062481 */ sub.s $f18, $f4, $f6 -/* 056974 80055D74 0C01C1D4 */ jal atan2f +/* 056974 80055D74 0C01C1D4 */ jal arctan2_f /* 056978 80055D78 E7B20060 */ swc1 $f18, 0x60($sp) /* 05697C 80055D7C 00021C00 */ sll $v1, $v0, 0x10 /* 056980 80055D80 00034C03 */ sra $t1, $v1, 0x10 @@ -210,7 +210,7 @@ glabel func_80055A84 .L80055DA0: /* 0569A0 80055DA0 C7AC0060 */ lwc1 $f12, 0x60($sp) /* 0569A4 80055DA4 C7AE0064 */ lwc1 $f14, 0x64($sp) -/* 0569A8 80055DA8 0C01C1D4 */ jal atan2f +/* 0569A8 80055DA8 0C01C1D4 */ jal arctan2_f /* 0569AC 80055DAC 00000000 */ nop /* 0569B0 80055DB0 00021C00 */ sll $v1, $v0, 0x10 /* 0569B4 80055DB4 00035403 */ sra $t2, $v1, 0x10 diff --git a/asm/non_matchings/racer/func_80059208.s b/asm/non_matchings/racer/func_80059208.s index 2401270f..35e528e4 100644 --- a/asm/non_matchings/racer/func_80059208.s +++ b/asm/non_matchings/racer/func_80059208.s @@ -242,7 +242,7 @@ glabel func_80059208 .L80059588: /* 05A188 80059588 C7AE004C */ lwc1 $f14, 0x4c($sp) /* 05A18C 8005958C C7AC0054 */ lwc1 $f12, 0x54($sp) -/* 05A190 80059590 0C01C1D4 */ jal atan2f +/* 05A190 80059590 0C01C1D4 */ jal arctan2_f /* 05A194 80059594 00000000 */ nop /* 05A198 80059598 863901A0 */ lh $t9, 0x1a0($s1) /* 05A19C 8005959C 24018000 */ li $at, -32768 diff --git a/asm/non_matchings/racer/func_8005A424.s b/asm/non_matchings/racer/func_8005A424.s index 061d1ce3..b820eb6b 100644 --- a/asm/non_matchings/racer/func_8005A424.s +++ b/asm/non_matchings/racer/func_8005A424.s @@ -9,7 +9,7 @@ glabel func_8005A424 /* 05B040 8005A440 C4EE0008 */ lwc1 $f14, 8($a3) /* 05B044 8005A444 C4EC0000 */ lwc1 $f12, ($a3) /* 05B048 8005A448 AFA40020 */ sw $a0, 0x20($sp) -/* 05B04C 8005A44C 0C01C1D4 */ jal atan2f +/* 05B04C 8005A44C 0C01C1D4 */ jal arctan2_f /* 05B050 8005A450 AFA7001C */ sw $a3, 0x1c($sp) /* 05B054 8005A454 8FA60020 */ lw $a2, 0x20($sp) /* 05B058 8005A458 3058FFFF */ andi $t8, $v0, 0xffff diff --git a/asm/non_matchings/racer/func_8005B818.s b/asm/non_matchings/racer/func_8005B818.s index 65dd3fe1..0d149b6a 100644 --- a/asm/non_matchings/racer/func_8005B818.s +++ b/asm/non_matchings/racer/func_8005B818.s @@ -564,7 +564,7 @@ glabel func_8005B818 /* 05CC20 8005C020 E7AC009C */ swc1 $f12, 0x9c($sp) /* 05CC24 8005C024 46004283 */ div.s $f10, $f8, $f0 /* 05CC28 8005C028 E7AE0094 */ swc1 $f14, 0x94($sp) -/* 05CC2C 8005C02C 0C01C1D4 */ jal atan2f +/* 05CC2C 8005C02C 0C01C1D4 */ jal arctan2_f /* 05CC30 8005C030 E7AA0098 */ swc1 $f10, 0x98($sp) /* 05CC34 8005C034 24018000 */ li $at, -32768 /* 05CC38 8005C038 00415021 */ addu $t2, $v0, $at @@ -574,7 +574,7 @@ glabel func_8005B818 /* 05CC48 8005C048 A6790000 */ sh $t9, ($s3) /* 05CC4C 8005C04C C7AC0098 */ lwc1 $f12, 0x98($sp) /* 05CC50 8005C050 44817000 */ mtc1 $at, $f14 -/* 05CC54 8005C054 0C01C1D4 */ jal atan2f +/* 05CC54 8005C054 0C01C1D4 */ jal arctan2_f /* 05CC58 8005C058 00000000 */ nop /* 05CC5C 8005C05C A6620002 */ sh $v0, 2($s3) .L8005C060: diff --git a/asm/non_matchings/unknown_005740/func_800090C0.s b/asm/non_matchings/unknown_005740/func_800090C0.s index 9b5b6002..63a0e7a5 100644 --- a/asm/non_matchings/unknown_005740/func_800090C0.s +++ b/asm/non_matchings/unknown_005740/func_800090C0.s @@ -11,7 +11,7 @@ glabel func_800090C0 /* 009CE4 800090E4 46128300 */ add.s $f12, $f16, $f18 /* 009CE8 800090E8 C7AE002C */ lwc1 $f14, 0x2c($sp) /* 009CEC 800090EC C7AC0028 */ lwc1 $f12, 0x28($sp) -/* 009CF0 800090F0 0C01C1D4 */ jal atan2f +/* 009CF0 800090F0 0C01C1D4 */ jal arctan2_f /* 009CF4 800090F4 E7A0001C */ swc1 $f0, 0x1c($sp) /* 009CF8 800090F8 8FA60030 */ lw $a2, 0x30($sp) /* 009CFC 800090FC 340EFFFF */ li $t6, 65535 diff --git a/asm/non_matchings/unknown_032760/func_8003EC14.s b/asm/non_matchings/unknown_032760/func_8003EC14.s index b909afe3..a5b8a0d0 100644 --- a/asm/non_matchings/unknown_032760/func_8003EC14.s +++ b/asm/non_matchings/unknown_032760/func_8003EC14.s @@ -66,7 +66,7 @@ glabel func_8003EC14 /* 03F90C 8003ED0C E6120010 */ swc1 $f18, 0x10($s0) /* 03F910 8003ED10 C7AC002C */ lwc1 $f12, 0x2c($sp) /* 03F914 8003ED14 AFA70038 */ sw $a3, 0x38($sp) -/* 03F918 8003ED18 0C01C1D4 */ jal atan2f +/* 03F918 8003ED18 0C01C1D4 */ jal arctan2_f /* 03F91C 8003ED1C AFA50034 */ sw $a1, 0x34($sp) /* 03F920 8003ED20 8FA70038 */ lw $a3, 0x38($sp) /* 03F924 8003ED24 24018000 */ li $at, -32768 @@ -104,7 +104,7 @@ glabel func_8003EC14 /* 03F994 8003ED94 C7AC0028 */ lwc1 $f12, 0x28($sp) /* 03F998 8003ED98 C7AE0030 */ lwc1 $f14, 0x30($sp) /* 03F99C 8003ED9C AFA60020 */ sw $a2, 0x20($sp) -/* 03F9A0 8003EDA0 0C01C1D4 */ jal atan2f +/* 03F9A0 8003EDA0 0C01C1D4 */ jal arctan2_f /* 03F9A4 8003EDA4 AFA70038 */ sw $a3, 0x38($sp) /* 03F9A8 8003EDA8 8FA70038 */ lw $a3, 0x38($sp) /* 03F9AC 8003EDAC 8FA60020 */ lw $a2, 0x20($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003EDD8.s b/asm/non_matchings/unknown_032760/func_8003EDD8.s index fcc681f9..ba6d8fee 100644 --- a/asm/non_matchings/unknown_032760/func_8003EDD8.s +++ b/asm/non_matchings/unknown_032760/func_8003EDD8.s @@ -93,7 +93,7 @@ glabel func_8003EDD8 /* 03FB2C 8003EF2C 3C0143FA */ li $at, 0x43FA0000 # 500.000000 /* 03FB30 8003EF30 44817000 */ mtc1 $at, $f14 /* 03FB34 8003EF34 C7AC0064 */ lwc1 $f12, 0x64($sp) -/* 03FB38 8003EF38 0C01C1D4 */ jal atan2f +/* 03FB38 8003EF38 0C01C1D4 */ jal arctan2_f /* 03FB3C 8003EF3C AFA20058 */ sw $v0, 0x58($sp) /* 03FB40 8003EF40 8FA80074 */ lw $t0, 0x74($sp) /* 03FB44 8003EF44 304FFFFF */ andi $t7, $v0, 0xffff @@ -111,7 +111,7 @@ glabel func_8003EDD8 .L8003EF6C: /* 03FB6C 8003EF6C C7AC0068 */ lwc1 $f12, 0x68($sp) /* 03FB70 8003EF70 C7AE0060 */ lwc1 $f14, 0x60($sp) -/* 03FB74 8003EF74 0C01C1D4 */ jal atan2f +/* 03FB74 8003EF74 0C01C1D4 */ jal arctan2_f /* 03FB78 8003EF78 AFA80074 */ sw $t0, 0x74($sp) /* 03FB7C 8003EF7C 86050000 */ lh $a1, ($s0) /* 03FB80 8003EF80 24018000 */ li $at, -32768 @@ -179,7 +179,7 @@ glabel func_8003EDD8 .L8003F060: /* 03FC60 8003F060 C7AC0064 */ lwc1 $f12, 0x64($sp) /* 03FC64 8003F064 C7AE006C */ lwc1 $f14, 0x6c($sp) -/* 03FC68 8003F068 0C01C1D4 */ jal atan2f +/* 03FC68 8003F068 0C01C1D4 */ jal arctan2_f /* 03FC6C 8003F06C AFA60054 */ sw $a2, 0x54($sp) /* 03FC70 8003F070 8FA60054 */ lw $a2, 0x54($sp) /* 03FC74 8003F074 A6020002 */ sh $v0, 2($s0) diff --git a/asm/non_matchings/unknown_032760/obj_loop_butterfly.s b/asm/non_matchings/unknown_032760/obj_loop_butterfly.s index 586a1e61..b05623a7 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_butterfly.s +++ b/asm/non_matchings/unknown_032760/obj_loop_butterfly.s @@ -188,7 +188,7 @@ glabel L80040E54 /* 041AC8 80040EC8 E7AC0094 */ swc1 $f12, 0x94($sp) /* 041ACC 80040ECC E7AE008C */ swc1 $f14, 0x8c($sp) /* 041AD0 80040ED0 AFA90038 */ sw $t1, 0x38($sp) -/* 041AD4 80040ED4 0C01C1D4 */ jal atan2f +/* 041AD4 80040ED4 0C01C1D4 */ jal arctan2_f /* 041AD8 80040ED8 AFA8003C */ sw $t0, 0x3c($sp) /* 041ADC 80040EDC 86040000 */ lh $a0, ($s0) /* 041AE0 80040EE0 8FA8003C */ lw $t0, 0x3c($sp) @@ -517,7 +517,7 @@ glabel L800411E4 /* 041FAC 800413AC E7AC0094 */ swc1 $f12, 0x94($sp) /* 041FB0 800413B0 E7AE008C */ swc1 $f14, 0x8c($sp) /* 041FB4 800413B4 A7AA0072 */ sh $t2, 0x72($sp) -/* 041FB8 800413B8 0C01C1D4 */ jal atan2f +/* 041FB8 800413B8 0C01C1D4 */ jal arctan2_f /* 041FBC 800413BC AFA8003C */ sw $t0, 0x3c($sp) /* 041FC0 800413C0 86040000 */ lh $a0, ($s0) /* 041FC4 800413C4 8FA8003C */ lw $t0, 0x3c($sp) diff --git a/asm/non_matchings/unknown_032760/obj_loop_fireball_octoweapon.s b/asm/non_matchings/unknown_032760/obj_loop_fireball_octoweapon.s index 1176a302..c69c7917 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_fireball_octoweapon.s +++ b/asm/non_matchings/unknown_032760/obj_loop_fireball_octoweapon.s @@ -196,7 +196,7 @@ glabel obj_loop_fireball_octoweapon /* 034E24 80034224 00000000 */ nop /* 034E28 80034228 C60C001C */ lwc1 $f12, 0x1c($s0) /* 034E2C 8003422C C60E0024 */ lwc1 $f14, 0x24($s0) -/* 034E30 80034230 0C01C1D4 */ jal atan2f +/* 034E30 80034230 0C01C1D4 */ jal arctan2_f /* 034E34 80034234 00000000 */ nop /* 034E38 80034238 C7A2007C */ lwc1 $f2, 0x7c($sp) /* 034E3C 8003423C A6020000 */ sh $v0, ($s0) diff --git a/asm/non_matchings/unknown_032760/obj_loop_fish.s b/asm/non_matchings/unknown_032760/obj_loop_fish.s index bb9de29e..709dd655 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_fish.s +++ b/asm/non_matchings/unknown_032760/obj_loop_fish.s @@ -211,12 +211,12 @@ glabel obj_loop_fish /* 037FF0 800373F0 A6080106 */ sh $t0, 0x106($s0) /* 037FF4 800373F4 C7AE0058 */ lwc1 $f14, 0x58($sp) /* 037FF8 800373F8 C7AC0060 */ lwc1 $f12, 0x60($sp) -/* 037FFC 800373FC 0C01C1D4 */ jal atan2f +/* 037FFC 800373FC 0C01C1D4 */ jal arctan2_f /* 038000 80037400 00000000 */ nop /* 038004 80037404 A6220000 */ sh $v0, ($s1) /* 038008 80037408 C7AC005C */ lwc1 $f12, 0x5c($sp) /* 03800C 8003740C C7AE0054 */ lwc1 $f14, 0x54($sp) -/* 038010 80037410 0C01C1D4 */ jal atan2f +/* 038010 80037410 0C01C1D4 */ jal arctan2_f /* 038014 80037414 46006307 */ neg.s $f12, $f12 /* 038018 80037418 86230002 */ lh $v1, 2($s1) /* 03801C 8003741C 8FAE0074 */ lw $t6, 0x74($sp) diff --git a/asm/non_matchings/unknown_032760/obj_loop_frog.s b/asm/non_matchings/unknown_032760/obj_loop_frog.s index e33c944e..3cb78798 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_frog.s +++ b/asm/non_matchings/unknown_032760/obj_loop_frog.s @@ -141,7 +141,7 @@ glabel L80042378 /* 0430CC 800424CC 460A4402 */ mul.s $f16, $f8, $f10 /* 0430D0 800424D0 E610001C */ swc1 $f16, 0x1c($s0) .L800424D4: -/* 0430D4 800424D4 0C01C1D4 */ jal atan2f +/* 0430D4 800424D4 0C01C1D4 */ jal arctan2_f /* 0430D8 800424D8 4600B387 */ neg.s $f14, $f22 /* 0430DC 800424DC 34018000 */ li $at, 32768 /* 0430E0 800424E0 0041C021 */ addu $t8, $v0, $at @@ -231,7 +231,7 @@ glabel L80042378 /* 043214 80042614 C6100000 */ lwc1 $f16, ($s0) /* 043218 80042618 C6120008 */ lwc1 $f18, 8($s0) /* 04321C 8004261C 46008301 */ sub.s $f12, $f16, $f0 -/* 043220 80042620 0C01C1D4 */ jal atan2f +/* 043220 80042620 0C01C1D4 */ jal arctan2_f /* 043224 80042624 46029381 */ sub.s $f14, $f18, $f2 /* 043228 80042628 A602001A */ sh $v0, 0x1a($s0) /* 04322C 8004262C C6220014 */ lwc1 $f2, 0x14($s1) diff --git a/asm/non_matchings/unknown_032760/obj_loop_lasergun.s b/asm/non_matchings/unknown_032760/obj_loop_lasergun.s index 0cd26c5f..17f91987 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_lasergun.s +++ b/asm/non_matchings/unknown_032760/obj_loop_lasergun.s @@ -61,14 +61,14 @@ glabel obj_loop_lasergun /* 035288 80034688 4600A303 */ div.s $f12, $f20, $f0 /* 03528C 8003468C 00000000 */ nop /* 035290 80034690 4600B583 */ div.s $f22, $f22, $f0 -/* 035294 80034694 0C01C1D4 */ jal atan2f +/* 035294 80034694 0C01C1D4 */ jal arctan2_f /* 035298 80034698 46007383 */ div.s $f14, $f14, $f0 /* 03529C 8003469C 24018000 */ li $at, -32768 /* 0352A0 800346A0 00415021 */ addu $t2, $v0, $at /* 0352A4 800346A4 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 0352A8 800346A8 44817000 */ mtc1 $at, $f14 /* 0352AC 800346AC A60A0000 */ sh $t2, ($s0) -/* 0352B0 800346B0 0C01C1D4 */ jal atan2f +/* 0352B0 800346B0 0C01C1D4 */ jal arctan2_f /* 0352B4 800346B4 4600B306 */ mov.s $f12, $f22 /* 0352B8 800346B8 A6020002 */ sh $v0, 2($s0) .L800346BC: diff --git a/asm/non_matchings/unknown_032760/obj_loop_parkwarden.s b/asm/non_matchings/unknown_032760/obj_loop_parkwarden.s index a6add04c..f10f077e 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_parkwarden.s +++ b/asm/non_matchings/unknown_032760/obj_loop_parkwarden.s @@ -143,7 +143,7 @@ glabel obj_loop_parkwarden /* 03A0F8 800394F8 C5CA0014 */ lwc1 $f10, 0x14($t6) /* 03A0FC 800394FC AFA60084 */ sw $a2, 0x84($sp) /* 03A100 80039500 46122301 */ sub.s $f12, $f4, $f18 -/* 03A104 80039504 0C01C1D4 */ jal atan2f +/* 03A104 80039504 0C01C1D4 */ jal arctan2_f /* 03A108 80039508 46065381 */ sub.s $f14, $f10, $f6 /* 03A10C 8003950C 8FAF0090 */ lw $t7, 0x90($sp) /* 03A110 80039510 34018001 */ li $at, 32769 @@ -211,7 +211,7 @@ glabel obj_loop_parkwarden /* 03A1F0 800395F0 C448000C */ lwc1 $f8, 0xc($v0) /* 03A1F4 800395F4 C4440014 */ lwc1 $f4, 0x14($v0) /* 03A1F8 800395F8 46104301 */ sub.s $f12, $f8, $f16 -/* 03A1FC 800395FC 0C01C1D4 */ jal atan2f +/* 03A1FC 800395FC 0C01C1D4 */ jal arctan2_f /* 03A200 80039600 46122381 */ sub.s $f14, $f4, $f18 /* 03A204 80039604 8FAC0090 */ lw $t4, 0x90($sp) /* 03A208 80039608 34018001 */ li $at, 32769 @@ -365,7 +365,7 @@ glabel L800397BC /* 03A41C 8003981C 240A0002 */ li $t2, 2 /* 03A420 80039820 00000000 */ nop /* 03A424 80039824 46028303 */ div.s $f12, $f16, $f2 -/* 03A428 80039828 0C01C1D4 */ jal atan2f +/* 03A428 80039828 0C01C1D4 */ jal arctan2_f /* 03A42C 8003982C 46022383 */ div.s $f14, $f4, $f2 /* 03A430 80039830 86050000 */ lh $a1, ($s0) /* 03A434 80039834 34018000 */ li $at, 32768 @@ -1348,7 +1348,7 @@ glabel L8003A5AC /* 03B26C 8003A66C C7AA00A0 */ lwc1 $f10, 0xa0($sp) /* 03B270 8003A670 C7B000A8 */ lwc1 $f16, 0xa8($sp) /* 03B274 8003A674 46085383 */ div.s $f14, $f10, $f8 -/* 03B278 8003A678 0C01C1D4 */ jal atan2f +/* 03B278 8003A678 0C01C1D4 */ jal arctan2_f /* 03B27C 8003A67C 46088303 */ div.s $f12, $f16, $f8 /* 03B280 8003A680 244D4000 */ addiu $t5, $v0, 0x4000 /* 03B284 8003A684 A62D001E */ sh $t5, 0x1e($s1) diff --git a/asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s b/asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s index d9b5138d..68d63f73 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s +++ b/asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s @@ -99,7 +99,7 @@ glabel obj_loop_stopwatchman /* 036F30 80036330 C448000C */ lwc1 $f8, 0xc($v0) /* 036F34 80036334 C4460014 */ lwc1 $f6, 0x14($v0) /* 036F38 80036338 460A4301 */ sub.s $f12, $f8, $f10 -/* 036F3C 8003633C 0C01C1D4 */ jal atan2f +/* 036F3C 8003633C 0C01C1D4 */ jal arctan2_f /* 036F40 80036340 46043381 */ sub.s $f14, $f6, $f4 /* 036F44 80036344 8FB90064 */ lw $t9, 0x64($sp) /* 036F48 80036348 34018001 */ li $at, 32769 @@ -273,7 +273,7 @@ glabel obj_loop_stopwatchman /* 0371B8 800365B8 240D0002 */ li $t5, 2 /* 0371BC 800365BC C7A60074 */ lwc1 $f6, 0x74($sp) /* 0371C0 800365C0 460A4303 */ div.s $f12, $f8, $f10 -/* 0371C4 800365C4 0C01C1D4 */ jal atan2f +/* 0371C4 800365C4 0C01C1D4 */ jal arctan2_f /* 0371C8 800365C8 460A3383 */ div.s $f14, $f6, $f10 /* 0371CC 800365CC 86040000 */ lh $a0, ($s0) /* 0371D0 800365D0 34018000 */ li $at, 32768 diff --git a/asm/non_matchings/unknown_05CEF0/func_8005C364.s b/asm/non_matchings/unknown_05CEF0/func_8005C364.s index a9d25337..8b04c94d 100644 --- a/asm/non_matchings/unknown_05CEF0/func_8005C364.s +++ b/asm/non_matchings/unknown_05CEF0/func_8005C364.s @@ -372,7 +372,7 @@ glabel func_8005C364 /* 05D4B4 8005C8B4 4500001E */ bc1f .L8005C930 /* 05D4B8 8005C8B8 00000000 */ nop /* 05D4BC 8005C8BC 4600A306 */ mov.s $f12, $f20 -/* 05D4C0 8005C8C0 0C01C1D4 */ jal atan2f +/* 05D4C0 8005C8C0 0C01C1D4 */ jal arctan2_f /* 05D4C4 8005C8C4 AFA50038 */ sw $a1, 0x38($sp) /* 05D4C8 8005C8C8 86380000 */ lh $t8, ($s1) /* 05D4CC 8005C8CC 34018000 */ li $at, 32768 diff --git a/asm/non_matchings/unknown_05DCD0/func_8005D0D0.s b/asm/non_matchings/unknown_05DCD0/func_8005D0D0.s index 44954071..5996b5a7 100644 --- a/asm/non_matchings/unknown_05DCD0/func_8005D0D0.s +++ b/asm/non_matchings/unknown_05DCD0/func_8005D0D0.s @@ -419,7 +419,7 @@ glabel func_8005D0D0 /* 05E2CC 8005D6CC C7AE0050 */ lwc1 $f14, 0x50($sp) /* 05E2D0 8005D6D0 4500001B */ bc1f .L8005D740 /* 05E2D4 8005D6D4 00000000 */ nop -/* 05E2D8 8005D6D8 0C01C1D4 */ jal atan2f +/* 05E2D8 8005D6D8 0C01C1D4 */ jal arctan2_f /* 05E2DC 8005D6DC 4600A306 */ mov.s $f12, $f20 /* 05E2E0 8005D6E0 862B0000 */ lh $t3, ($s1) /* 05E2E4 8005D6E4 34018000 */ li $at, 32768 diff --git a/asm/non_matchings/unknown_05DCD0/func_8005D820.s b/asm/non_matchings/unknown_05DCD0/func_8005D820.s index c796633a..3036cd7e 100644 --- a/asm/non_matchings/unknown_05DCD0/func_8005D820.s +++ b/asm/non_matchings/unknown_05DCD0/func_8005D820.s @@ -621,7 +621,7 @@ glabel L8005DCE8 /* 05ECC8 8005E0C8 C7AE0050 */ lwc1 $f14, 0x50($sp) /* 05ECCC 8005E0CC 4500001B */ bc1f .L8005E13C /* 05ECD0 8005E0D0 00000000 */ nop -/* 05ECD4 8005E0D4 0C01C1D4 */ jal atan2f +/* 05ECD4 8005E0D4 0C01C1D4 */ jal arctan2_f /* 05ECD8 8005E0D8 4600A306 */ mov.s $f12, $f20 /* 05ECDC 8005E0DC 862D0000 */ lh $t5, ($s1) /* 05ECE0 8005E0E0 34018000 */ li $at, 32768 diff --git a/asm/non_matchings/unknown_05F0C0/func_8005E4C0.s b/asm/non_matchings/unknown_05F0C0/func_8005E4C0.s index 5a632d97..6a9a4993 100644 --- a/asm/non_matchings/unknown_05F0C0/func_8005E4C0.s +++ b/asm/non_matchings/unknown_05F0C0/func_8005E4C0.s @@ -315,7 +315,7 @@ glabel func_8005E4C0 /* 05F548 8005E948 4500001E */ bc1f .L8005E9C4 /* 05F54C 8005E94C 00000000 */ nop /* 05F550 8005E950 4600A306 */ mov.s $f12, $f20 -/* 05F554 8005E954 0C01C1D4 */ jal atan2f +/* 05F554 8005E954 0C01C1D4 */ jal arctan2_f /* 05F558 8005E958 AFA50038 */ sw $a1, 0x38($sp) /* 05F55C 8005E95C 862E0000 */ lh $t6, ($s1) /* 05F560 8005E960 34018000 */ li $at, 32768 diff --git a/asm/unknown_070110.s b/asm/unknown_070110.s index 9bae15fb..546ce0ec 100644 --- a/asm/unknown_070110.s +++ b/asm/unknown_070110.s @@ -33,7 +33,7 @@ .include "asm/unknown_070110/func_800705F8.s" .include "asm/unknown_070110/func_80070638.s" .include "asm/unknown_070110/func_8007066C.s" -.include "asm/unknown_070110/atan2f.s" +.include "asm/unknown_070110/arctan2_f.s" .include "asm/unknown_070110/cosine_s.s" .include "asm/unknown_070110/sine_s.s" .include "asm/unknown_070110/func_8007082C.s" diff --git a/asm/unknown_070110/atan2f.s b/asm/unknown_070110/arctan2_f.s similarity index 98% rename from asm/unknown_070110/atan2f.s rename to asm/unknown_070110/arctan2_f.s index dccdcf58..5cec5f5e 100644 --- a/asm/unknown_070110/atan2f.s +++ b/asm/unknown_070110/arctan2_f.s @@ -1,4 +1,4 @@ -glabel atan2f +glabel arctan2_f /* 071350 80070750 3C01437F */ li $at, 0x437F0000 # 255.000000 /* 071354 80070754 44810000 */ mtc1 $at, $f0 /* 071358 80070758 00000000 */ nop diff --git a/include/math_util.h b/include/math_util.h index 3ec99cc9..ece8f218 100644 --- a/include/math_util.h +++ b/include/math_util.h @@ -4,7 +4,7 @@ #include "types.h" #include "structs.h" -extern s16 atan2f(f32 y, f32 x); +extern s16 arctan2_f(f32 y, f32 x); extern f32 sine_s(s16 angle); extern f32 cosine_s(s16 angle); diff --git a/src/object_functions.c b/src/object_functions.c index 27c46444..97fbdd57 100644 --- a/src/object_functions.c +++ b/src/object_functions.c @@ -211,7 +211,7 @@ typedef struct Object80033F60_4C_64 { s32 func_80011560(void); void func_80011570(Object*, f32, f32, f32); void func_8003FC44(f32, f32, f32, s32, s32, f32, s32); -s16 atan2f(f32, f32); +s16 arctan2_f(f32, f32); s32 func_8002AD08(f32, f32**, s32); void func_80001D04(u16, s32 *); void func_8000488C(s32); @@ -268,7 +268,7 @@ void obj_loop_fireball_octoweapon(Object *obj, s32 speed) { } obj->segment.z_velocity += (phi_f2 - obj->segment.z_velocity) * 0.125 * sp7C; if (sqrtf((obj->segment.x_velocity * obj->segment.x_velocity) + (obj->segment.z_velocity * obj->segment.z_velocity)) > 0.5) { - obj->segment.trans.y_rotation = atan2f(obj->segment.x_velocity, obj->segment.z_velocity); + obj->segment.trans.y_rotation = arctan2_f(obj->segment.x_velocity, obj->segment.z_velocity); obj->segment.trans.x_rotation -= speed << 9; } func_80011570(obj, obj->segment.x_velocity * sp7C, obj->segment.y_velocity * sp7C, obj->segment.z_velocity * sp7C); diff --git a/src/racer.c b/src/racer.c index 27091b1b..e00387a9 100644 --- a/src/racer.c +++ b/src/racer.c @@ -818,7 +818,7 @@ s32 func_80052388(Object *obj1, Object_Racer *arg1, Object *obj2, f32 distance) 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 = (atan2f(diffX, diffZ) - (obj1->segment.trans.y_rotation & 0xFFFF)) + 0x8000; + rotation = (arctan2_f(diffX, diffZ) - (obj1->segment.trans.y_rotation & 0xFFFF)) + 0x8000; if (rotation > 0x8000) { rotation += 0xFFFF0001; } @@ -836,7 +836,7 @@ s32 func_80052388(Object *obj1, Object_Racer *arg1, Object *obj2, f32 distance) arg1->unk16C = 0; } arg1 = (struct Object_Racer *) obj2->unk64; - rotation = atan2f(diffX, diffZ) - (obj1->segment.trans.y_rotation & 0xFFFF); + rotation = arctan2_f(diffX, diffZ) - (obj1->segment.trans.y_rotation & 0xFFFF); if (rotation > 0x8000) { rotation += 0xFFFF0001; } From 1a61a676f0a4b22ba5ad6f431f7d9a4458a130ce Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Wed, 4 May 2022 16:38:52 +0100 Subject: [PATCH 17/17] swap xrotoff and yrotoff labels --- include/structs.h | 4 ++-- src/objects.c | 30 +++++++++++++++--------------- src/racer.c | 26 +++++++++++++------------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/include/structs.h b/include/structs.h index 8d2723bd..d0b9a54e 100644 --- a/include/structs.h +++ b/include/structs.h @@ -890,8 +890,8 @@ typedef struct Object_Racer { /* 0x154 */ struct Object *unk154; /* 0x158 */ s32 unk158; /* 0x15C */ s32 unk15C; - /* 0x160 */ s16 x_rotation_offset; - /* 0x162 */ s16 y_rotation_offset; + /* 0x160 */ s16 y_rotation_offset; + /* 0x162 */ s16 x_rotation_offset; /* 0x164 */ s16 z_rotation_offset; /* 0x166 */ s16 unk166; // I don't know exactly what these are, but this one in particular seems to cause a Y position offset. /* 0x168 */ s16 unk168; diff --git a/src/objects.c b/src/objects.c index 8d086ab1..ba08b5f2 100644 --- a/src/objects.c +++ b/src/objects.c @@ -50,7 +50,7 @@ s32 D_800DC760 = 9; // Currently unknown, might be a different type. Object *D_800DC764 = NULL; // Currently unknown, might be a different type. s32 D_800DC768 = 0; // Currently unknown, might be a different type. -f32 D_800DC76C[15] = { +f32 D_800DC76C[15] = { 1.0f, 0.70711f, 0.70711f, 1.0f, 0.0f, 0.70711f, -0.70711f, 0.0f, -1.0f, -0.70711f, -0.70711f, -1.0f, @@ -768,11 +768,11 @@ s32 func_8000FAC4(Object *obj, s32 arg1) { if ((particleDataEntry[i].upper & 0xFFFF0000) == 0xFFFF0000) { func_800AF1E0(&obj->unk6C[i], (particleDataEntry[i].upper >> 8) & 0xFF, particleDataEntry[i].upper & 0xFF); } else { - func_800AF29C(&obj->unk6C[i], - (particleDataEntry[i].upper >> 0x18) & 0xFF, - (particleDataEntry[i].upper >> 0x10) & 0xFF, - particleDataEntry[i].upper & 0xFFFF, - (particleDataEntry[i].lower >> 0x10) & 0xFFFF, + func_800AF29C(&obj->unk6C[i], + (particleDataEntry[i].upper >> 0x18) & 0xFF, + (particleDataEntry[i].upper >> 0x10) & 0xFF, + particleDataEntry[i].upper & 0xFFFF, + (particleDataEntry[i].lower >> 0x10) & 0xFFFF, particleDataEntry[i].lower & 0xFFFF ); } @@ -990,15 +990,15 @@ void func_80012E28(Object *this) { if (this->behaviorId == 1) { sp_20 = &this->unk64->racer; - this->segment.trans.y_rotation += sp_20->x_rotation_offset; - this->segment.trans.x_rotation += sp_20->y_rotation_offset; + this->segment.trans.y_rotation += sp_20->y_rotation_offset; + this->segment.trans.x_rotation += sp_20->x_rotation_offset; this->segment.trans.z_rotation += sp_20->z_rotation_offset; sp_1c = 0.0f; if (sp_20->unk1D7 < 5) { sp_1c = sine_s(sp_20->z_rotation_offset); tmp_f2 = sp_1c; - tmp_f0 = sine_s(sp_20->y_rotation_offset - sp_20->unk166) * tmp_f2; + tmp_f0 = sine_s(sp_20->x_rotation_offset - sp_20->unk166) * tmp_f2; tmp_f0 = (tmp_f0 < 0.0f) ? 0.0f : tmp_f0 * tmp_f0; @@ -1014,8 +1014,8 @@ void func_80012E28(Object *this) { void func_80012F30(Object *arg0) { if (arg0->behaviorId == 1) { Object_Racer *object_64 = &arg0->unk64->racer; - arg0->segment.trans.y_rotation -= object_64->x_rotation_offset; - arg0->segment.trans.x_rotation -= object_64->y_rotation_offset; + arg0->segment.trans.y_rotation -= object_64->y_rotation_offset; + arg0->segment.trans.x_rotation -= object_64->x_rotation_offset; arg0->segment.trans.z_rotation -= object_64->z_rotation_offset; arg0->segment.trans.y_position -= D_8011ADD0; } @@ -1088,7 +1088,7 @@ GLOBAL_ASM("asm/non_matchings/objects/func_80017248.s") unk800179D0 *func_8001790C(u32 *arg0, u32 *arg1) { unk800179D0 *entry; s16 i; - + for(i = 0; i < 16; i++) { entry = &D_8011AFF4[i]; if (entry->unk0 != 0 && entry->unk04 == arg0 && entry->unk08 == arg1) { @@ -1102,7 +1102,7 @@ unk800179D0 *func_8001790C(u32 *arg0, u32 *arg1) { unk800179D0 *func_80017978(s32 arg0, s32 arg1) { unk800179D0 *entry; s16 i; - + for(i = 0; i < 16; i++) { entry = &D_8011AFF4[i]; if (entry->unk0 == 0) { @@ -1505,14 +1505,14 @@ s32 func_8001F3EC(s32 arg0){ if (D_8011AE78 == 0) { return -1; } - + count = 0; for (i = 0; i < D_8011AE78; i++) { if (D_8011AE74[i]->unk7C.word == arg0){ count++; } } - + return count; } diff --git a/src/racer.c b/src/racer.c index e00387a9..e8dd172f 100644 --- a/src/racer.c +++ b/src/racer.c @@ -672,13 +672,13 @@ void func_80050754(Object *obj, Object_Racer *racer, f32 arg2) { * Applies visual rotational offets to vehicles. * Examples include planes when on the ground, or when crashing, or hovercraft when braking. */ -void apply_vehicle_rotation_offset(Object_Racer *obj, s32 max, s16 xRotation, s16 yRotation, s16 zRotation) { +void apply_vehicle_rotation_offset(Object_Racer *obj, s32 max, s16 yRotation, s16 xRotation, s16 zRotation) { s32 diff; s32 tempAngle; if (!obj->unk1F1) { - tempAngle = xRotation - (obj->x_rotation_offset & 0xFFFF); - obj->unk166 = yRotation; + tempAngle = yRotation - (obj->y_rotation_offset & 0xFFFF); + obj->unk166 = xRotation; if (tempAngle > 0x8000) { tempAngle += 0xFFFF0001; } @@ -690,15 +690,15 @@ void apply_vehicle_rotation_offset(Object_Racer *obj, s32 max, s16 xRotation, s1 if (diff < tempAngle) { tempAngle = diff; } - obj->x_rotation_offset += tempAngle; + obj->y_rotation_offset += tempAngle; } else if (tempAngle < 0) { diff = -(max * 0x600); if (tempAngle < diff) { tempAngle = diff; } - obj->x_rotation_offset += tempAngle; + obj->y_rotation_offset += tempAngle; } - tempAngle = yRotation - (obj->y_rotation_offset & 0xFFFF); + tempAngle = xRotation - (obj->x_rotation_offset & 0xFFFF); if (tempAngle > 0x8000) { tempAngle = tempAngle + 0xFFFF0001; } @@ -710,13 +710,13 @@ void apply_vehicle_rotation_offset(Object_Racer *obj, s32 max, s16 xRotation, s1 if (diff < tempAngle) { tempAngle = diff; } - obj->y_rotation_offset += tempAngle; + obj->x_rotation_offset += tempAngle; } else if (tempAngle < 0) { diff = -(max * 0x600); if (tempAngle < diff) { tempAngle = diff; } - obj->y_rotation_offset += tempAngle; + obj->x_rotation_offset += tempAngle; } tempAngle = zRotation - (obj->z_rotation_offset & 0xFFFF); if (tempAngle > 0x8000) { @@ -1072,7 +1072,7 @@ f32 func_80057220(Object* arg0, Object_Racer* arg1) { if (D_8011D540); if ((D_8011D540 > 0) && (D_8011D540 < 30) && (!arg1->unk1F4)) { temp_v1 = D_8011D540 - 14; - if ((gActivePlayerButtonPress & 0x8000) != 0) { + if (gActivePlayerButtonPress & A_BUTTON) { if ((temp_v1 < 0) && (sp28 >= 0)) { temp_v1 = 0; } @@ -1080,7 +1080,7 @@ f32 func_80057220(Object* arg0, Object_Racer* arg1) { temp_v1 = -temp_v1; } - if ((gCurrentCarInput & 0x2000)) { + if ((gCurrentCarInput & Z_TRIG)) { if (temp_v1 < 2) { temp_v1 = 0; } @@ -1121,14 +1121,14 @@ f32 func_80057220(Object* arg0, Object_Racer* arg1) { if (arg1->unk1D3 && !D_8011D540 && sp28 && !arg1->unk1D8) { func_80072348(arg1->playerIndex, 6); } - if ((D_8011D540 < 80) && ((gActivePlayerButtonPress & 0x8000))) { + if ((D_8011D540 < 80) && gActivePlayerButtonPress & A_BUTTON) { arg1->unk1F4 = 1U; } if (D_8011D540 == 0) { if ((arg1->boost_sound & 1) != 0) { arg1->boost_sound = (u8) (arg1->boost_sound & 0xFFFE); - func_800570B8(arg0, 0x162, 8, 0x82); - func_80057048(arg0, 0x21); + func_800570B8(arg0, 354, 8, 130); + func_80057048(arg0, 33); } } if ((arg1->boost_sound & 2) != 0) {