From b0f75b8ebc516a64ccd0b71d3e0408919ba6b141 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Wed, 30 Nov 2022 16:49:33 -0500 Subject: [PATCH] Named all unlabeled functions from asm/unknown_070110 --- asm/non_matchings/camera/func_80065EA0.s | 2 +- asm/non_matchings/camera/func_80068FA8.s | 24 +++--- asm/non_matchings/camera/func_80069790.s | 12 +-- .../fade_transition/func_800C15D4.s | 4 +- .../fade_transition/func_800C1EE8.s | 4 +- asm/non_matchings/game_ui/func_800A4C44.s | 2 +- asm/non_matchings/game_ui/func_800A8474.s | 4 +- asm/non_matchings/game_ui/func_800AC21C.s | 2 +- asm/non_matchings/game_ui/func_800AC8A8.s | 2 +- asm/non_matchings/game_ui/func_800ACA20.s | 2 +- .../game_ui/render_rain_overlay.s | 4 +- .../game_ui/render_rain_splashes.s | 4 +- .../memory/allocate_at_address_in_main_pool.s | 10 +-- .../memory/allocate_from_memory_pool.s | 8 +- asm/non_matchings/memory/func_80071314.s | 6 +- asm/non_matchings/menu/menu_credits_loop.s | 4 +- .../menu/menu_track_select_init.s | 2 +- .../calc_dynamic_lighting_for_object_1.s | 8 +- .../objects/calc_env_mapping_for_object.s | 8 +- asm/non_matchings/objects/func_8000B38C.s | 8 +- asm/non_matchings/objects/func_8000B750.s | 4 +- asm/non_matchings/objects/func_800135B8.s | 2 +- asm/non_matchings/objects/func_800138A8.s | 2 +- asm/non_matchings/objects/func_80016500.s | 4 +- asm/non_matchings/objects/func_80016748.s | 2 +- asm/non_matchings/objects/func_8001709C.s | 6 +- asm/non_matchings/objects/func_80017E98.s | 2 +- asm/non_matchings/objects/func_8001C6C4.s | 4 +- asm/non_matchings/objects/func_8001D4B4.s | 2 +- asm/non_matchings/particles/func_800B0010.s | 6 +- asm/non_matchings/particles/func_800B03C0.s | 8 +- asm/non_matchings/particles/func_800B0BAC.s | 2 +- asm/non_matchings/particles/func_800B26E0.s | 2 +- asm/non_matchings/printf/func_800B3240.s | 2 +- asm/non_matchings/printf/func_800B3358.s | 2 +- asm/non_matchings/printf/func_800B3564.s | 2 +- asm/non_matchings/printf/func_800B3E64.s | 4 +- asm/non_matchings/racer/drop_bananas.s | 2 +- asm/non_matchings/racer/func_80046524.s | 4 +- asm/non_matchings/racer/func_800494E0.s | 2 +- asm/non_matchings/racer/func_80049794.s | 8 +- asm/non_matchings/racer/func_8004CC20.s | 4 +- asm/non_matchings/racer/func_8004F7F4.s | 4 +- asm/non_matchings/racer/func_80050A28.s | 2 +- asm/non_matchings/racer/func_80054FD0.s | 4 +- asm/non_matchings/racer/func_80059BF0.s | 4 +- asm/non_matchings/racer/update_camera_car.s | 14 +-- asm/non_matchings/racer/update_camera_plane.s | 12 +-- .../unknown_005740/func_80005D08.s | 2 +- .../unknown_005740/func_800063EC.s | 4 +- .../unknown_005740/func_800090C0.s | 8 +- .../unknown_0255E0/func_8002581C.s | 4 +- .../unknown_0255E0/func_800278E8.s | 8 +- .../unknown_0255E0/func_80028050.s | 4 +- .../unknown_0255E0/func_8002DE30.s | 2 +- .../unknown_0255E0/func_8002F440.s | 4 +- .../unknown_0255E0/func_8002FA64.s | 2 +- .../unknown_032760/func_80032424.s | 6 +- .../unknown_032760/func_80036040.s | 2 +- .../unknown_032760/func_8003E694.s | 4 +- .../unknown_032760/obj_init_fish.s | 8 +- .../unknown_032760/obj_init_midifade.s | 6 +- .../unknown_032760/obj_loop_butterfly.s | 8 +- .../unknown_032760/obj_loop_effectbox.s | 4 +- .../unknown_032760/obj_loop_fish.s | 14 +-- .../unknown_032760/obj_loop_frog.s | 6 +- .../unknown_032760/obj_loop_lasergun.s | 2 +- .../unknown_032760/obj_loop_log.s | 4 +- .../unknown_032760/obj_loop_parkwarden.s | 8 +- .../unknown_032760/obj_loop_stopwatchman.s | 4 +- .../unknown_032760/obj_loop_wizpigship.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 +- .../calc_dynamic_lighting_for_object_2.s | 6 +- asm/unknown_070110.s | 70 +++++++-------- asm/unknown_070110/arctan2_f.s | 2 +- .../{func_80070A2C.s => area_triangle_2d.s} | 2 +- .../{func_8007066C.s => atan2s.s} | 2 +- .../{func_800707AC.s => bad_int_sqrt.s} | 2 +- ... => calc_dyn_lighting_for_level_segment.s} | 6 +- ...06F510.s => clear_status_register_flags.s} | 2 +- .../{func_8007082C.s => coss.s} | 4 +- asm/unknown_070110/{sine_s.s => coss_f.s} | 4 +- .../{func_80070B04.s => dmacopy2.s} | 2 +- .../{func_8006F6EC.s => f32_matrix_dot.s} | 2 +- ..._800705F8.s => f32_matrix_from_position.s} | 2 +- ...s => f32_matrix_from_rotation_and_scale.s} | 6 +- ...unc_80070638.s => f32_matrix_from_scale.s} | 2 +- .../{func_8006F768.s => f32_matrix_mult.s} | 2 +- .../{func_8006FE04.s => f32_matrix_scale.s} | 2 +- ..._8006F870.s => f32_matrix_to_s16_matrix.s} | 2 +- ..._8006F5E0.s => f32_matrix_to_s32_matrix.s} | 2 +- .../{func_8006FE30.s => f32_matrix_y_scale.s} | 2 +- ...320.s => f32_vec3_apply_object_rotation.s} | 14 +-- ...D8.s => f32_vec3_apply_object_rotation2.s} | 14 +-- ...90.s => f32_vec3_apply_object_rotation3.s} | 10 +-- .../{func_8006F570.s => get_D_800DD430.s} | 2 +- ...006FC30.s => object_transform_to_matrix.s} | 14 +-- ...6FE74.s => object_transform_to_matrix_2.s} | 26 +++--- ....s => point_triangle_2d_xz_intersection.s} | 2 +- .../{func_8006F9B8.s => s16_matrix_rotate.s} | 2 +- ..._8006FA40.s => s16_matrix_to_s32_matrix.s} | 2 +- ...1E4.s => s16_vec3_apply_object_rotation.s} | 14 +-- ...06FB60.s => s16_vec3_mult_by_s32_matrix.s} | 2 +- ...8.s => s16_vec3_mult_by_s32_matrix_full.s} | 2 +- ...func_80070780.s => s32_matrix_cell_sqrt.s} | 2 +- ..._8006F57C.s => s32_matrix_to_s16_matrix.s} | 2 +- .../{func_8006F564.s => set_D_800DD430.s} | 2 +- ...8006F53C.s => set_status_register_flags.s} | 2 +- .../{func_80070890.s => sins_2.s} | 4 +- asm/unknown_070110/{cosine_s.s => sins_f.s} | 4 +- include/math_util.h | 12 +-- src/camera.c | 86 +++++++++---------- src/camera.h | 8 +- src/game.c | 2 +- src/game.h | 6 +- src/game_ui.c | 8 +- src/memory.c | 52 +++++------ src/memory.h | 4 +- src/menu.c | 8 +- src/menu.h | 2 +- src/object_functions.c | 20 ++--- src/object_functions.h | 6 +- src/objects.c | 10 +-- src/objects.h | 2 +- src/racer.c | 74 ++++++++-------- src/racer.h | 4 +- src/unknown_0255E0.c | 2 +- src/unknown_0255E0.h | 2 +- src/unknown_032760.c | 4 +- src/unknown_032760.h | 2 +- src/weather.c | 8 +- src/weather.h | 6 +- 134 files changed, 468 insertions(+), 468 deletions(-) rename asm/unknown_070110/{func_80070A2C.s => area_triangle_2d.s} (98%) rename asm/unknown_070110/{func_8007066C.s => atan2s.s} (99%) rename asm/unknown_070110/{func_800707AC.s => bad_int_sqrt.s} (92%) rename asm/unknown_070110/{func_800708D0.s => calc_dyn_lighting_for_level_segment.s} (95%) rename asm/unknown_070110/{func_8006F510.s => clear_status_register_flags.s} (94%) rename asm/unknown_070110/{func_8007082C.s => coss.s} (96%) rename asm/unknown_070110/{sine_s.s => coss_f.s} (89%) rename asm/unknown_070110/{func_80070B04.s => dmacopy2.s} (93%) rename asm/unknown_070110/{func_8006F6EC.s => f32_matrix_dot.s} (98%) rename asm/unknown_070110/{func_800705F8.s => f32_matrix_from_position.s} (96%) rename asm/unknown_070110/{func_80070130.s => f32_matrix_from_rotation_and_scale.s} (94%) rename asm/unknown_070110/{func_80070638.s => f32_matrix_from_scale.s} (95%) rename asm/unknown_070110/{func_8006F768.s => f32_matrix_mult.s} (99%) rename asm/unknown_070110/{func_8006FE04.s => f32_matrix_scale.s} (96%) rename asm/unknown_070110/{func_8006F870.s => f32_matrix_to_s16_matrix.s} (98%) rename asm/unknown_070110/{func_8006F5E0.s => f32_matrix_to_s32_matrix.s} (97%) rename asm/unknown_070110/{func_8006FE30.s => f32_matrix_y_scale.s} (97%) rename asm/unknown_070110/{func_80070320.s => f32_vec3_apply_object_rotation.s} (86%) rename asm/unknown_070110/{func_800703D8.s => f32_vec3_apply_object_rotation2.s} (86%) rename asm/unknown_070110/{func_80070490.s => f32_vec3_apply_object_rotation3.s} (81%) rename asm/unknown_070110/{func_8006F570.s => get_D_800DD430.s} (89%) rename asm/unknown_070110/{func_8006FC30.s => object_transform_to_matrix.s} (94%) rename asm/unknown_070110/{func_8006FE74.s => object_transform_to_matrix_2.s} (92%) rename asm/unknown_070110/{func_800704F0.s => point_triangle_2d_xz_intersection.s} (98%) rename asm/unknown_070110/{func_8006F9B8.s => s16_matrix_rotate.s} (98%) rename asm/unknown_070110/{func_8006FA40.s => s16_matrix_to_s32_matrix.s} (95%) rename asm/unknown_070110/{func_800701E4.s => s16_vec3_apply_object_rotation.s} (91%) rename asm/unknown_070110/{func_8006FB60.s => s16_vec3_mult_by_s32_matrix.s} (98%) rename asm/unknown_070110/{func_8006FA78.s => s16_vec3_mult_by_s32_matrix_full.s} (98%) rename asm/unknown_070110/{func_80070780.s => s32_matrix_cell_sqrt.s} (95%) rename asm/unknown_070110/{func_8006F57C.s => s32_matrix_to_s16_matrix.s} (97%) rename asm/unknown_070110/{func_8006F564.s => set_D_800DD430.s} (89%) rename asm/unknown_070110/{func_8006F53C.s => set_status_register_flags.s} (94%) rename asm/unknown_070110/{func_80070890.s => sins_2.s} (95%) rename asm/unknown_070110/{cosine_s.s => sins_f.s} (89%) diff --git a/asm/non_matchings/camera/func_80065EA0.s b/asm/non_matchings/camera/func_80065EA0.s index df1cf614..6954f439 100644 --- a/asm/non_matchings/camera/func_80065EA0.s +++ b/asm/non_matchings/camera/func_80065EA0.s @@ -108,7 +108,7 @@ glabel func_80065EA0 /* 066C24 80066024 E7A80018 */ swc1 $f8, 0x18($sp) /* 066C28 80066028 3C058012 */ lui $a1, %hi(D_80120FE0) # $a1, 0x8012 /* 066C2C 8006602C 24A50FE0 */ addiu $a1, %lo(D_80120FE0) # addiu $a1, $a1, 0xfe0 -/* 066C30 80066030 0C01BE1C */ jal func_8006F870 +/* 066C30 80066030 0C01BE1C */ jal f32_matrix_to_s16_matrix /* 066C34 80066034 02002025 */ move $a0, $s0 /* 066C38 80066038 3C014270 */ li $at, 0x42700000 # 60.000000 /* 066C3C 8006603C 44815000 */ mtc1 $at, $f10 diff --git a/asm/non_matchings/camera/func_80068FA8.s b/asm/non_matchings/camera/func_80068FA8.s index 088123dd..a82cfc7e 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 sine_s +/* 069BF8 80068FF8 0C01C1FE */ jal coss_f /* 069BFC 80068FFC 00C08825 */ move $s1, $a2 /* 069C00 80069000 86240002 */ lh $a0, 2($s1) -/* 069C04 80069004 0C01C1F1 */ jal cosine_s +/* 069C04 80069004 0C01C1F1 */ jal sins_f /* 069C08 80069008 46000786 */ mov.s $f30, $f0 /* 069C0C 8006900C E7A00118 */ swc1 $f0, 0x118($sp) /* 069C10 80069010 86240000 */ lh $a0, ($s1) -/* 069C14 80069014 0C01C1FE */ jal sine_s +/* 069C14 80069014 0C01C1FE */ jal coss_f /* 069C18 80069018 00000000 */ nop /* 069C1C 8006901C 86240000 */ lh $a0, ($s1) -/* 069C20 80069020 0C01C1F1 */ jal cosine_s +/* 069C20 80069020 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 069C50 80069050 0C01C1FE */ jal coss_f /* 069C54 80069054 00000000 */ nop /* 069C58 80069058 86040004 */ lh $a0, 4($s0) -/* 069C5C 8006905C 0C01C1F1 */ jal cosine_s +/* 069C5C 8006905C 0C01C1F1 */ jal sins_f /* 069C60 80069060 46000506 */ mov.s $f20, $f0 /* 069C64 80069064 86040002 */ lh $a0, 2($s0) -/* 069C68 80069068 0C01C1FE */ jal sine_s +/* 069C68 80069068 0C01C1FE */ jal coss_f /* 069C6C 8006906C 46000686 */ mov.s $f26, $f0 /* 069C70 80069070 86040002 */ lh $a0, 2($s0) -/* 069C74 80069074 0C01C1F1 */ jal cosine_s +/* 069C74 80069074 0C01C1F1 */ jal sins_f /* 069C78 80069078 46000706 */ mov.s $f28, $f0 /* 069C7C 8006907C 86040000 */ lh $a0, ($s0) -/* 069C80 80069080 0C01C1FE */ jal sine_s +/* 069C80 80069080 0C01C1FE */ jal coss_f /* 069C84 80069084 E7A00100 */ swc1 $f0, 0x100($sp) /* 069C88 80069088 86040000 */ lh $a0, ($s0) -/* 069C8C 8006908C 0C01C1F1 */ jal cosine_s +/* 069C8C 8006908C 0C01C1F1 */ jal sins_f /* 069C90 80069090 E7A000FC */ swc1 $f0, 0xfc($sp) /* 069C94 80069094 C606000C */ lwc1 $f6, 0xc($s0) /* 069C98 80069098 C7B00138 */ lwc1 $f16, 0x138($sp) @@ -270,12 +270,12 @@ glabel func_80068FA8 /* 069FD8 800693D8 44815000 */ mtc1 $at, $f10 /* 069FDC 800693DC 46062200 */ add.s $f8, $f4, $f6 /* 069FE0 800693E0 E7AA00DC */ swc1 $f10, 0xdc($sp) -/* 069FE4 800693E4 0C01BDDA */ jal func_8006F768 +/* 069FE4 800693E4 0C01BDDA */ jal f32_matrix_mult /* 069FE8 800693E8 E7A800D8 */ swc1 $f8, 0xd8($sp) /* 069FEC 800693EC 8FAB012C */ lw $t3, 0x12c($sp) /* 069FF0 800693F0 02002025 */ move $a0, $s0 /* 069FF4 800693F4 8D650000 */ lw $a1, ($t3) -/* 069FF8 800693F8 0C01BE1C */ jal func_8006F870 +/* 069FF8 800693F8 0C01BE1C */ jal f32_matrix_to_s16_matrix /* 069FFC 800693FC 00000000 */ nop /* 06A000 80069400 8FA50128 */ lw $a1, 0x128($sp) /* 06A004 80069404 8FA4012C */ lw $a0, 0x12c($sp) diff --git a/asm/non_matchings/camera/func_80069790.s b/asm/non_matchings/camera/func_80069790.s index 3bc2926f..45d9db96 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 sine_s +/* 06A400 80069800 0C01C1FE */ jal coss_f /* 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 cosine_s +/* 06A414 80069814 0C01C1F1 */ jal sins_f /* 06A418 80069818 00000000 */ nop /* 06A41C 8006981C 87A4010E */ lh $a0, 0x10e($sp) -/* 06A420 80069820 0C01C1FE */ jal sine_s +/* 06A420 80069820 0C01C1FE */ jal coss_f /* 06A424 80069824 E7A000E4 */ swc1 $f0, 0xe4($sp) /* 06A428 80069828 87A4010E */ lh $a0, 0x10e($sp) -/* 06A42C 8006982C 0C01C1F1 */ jal cosine_s +/* 06A42C 8006982C 0C01C1F1 */ jal sins_f /* 06A430 80069830 46000586 */ mov.s $f22, $f0 /* 06A434 80069834 4614B482 */ mul.s $f18, $f22, $f20 /* 06A438 80069838 C7B000E4 */ lwc1 $f16, 0xe4($sp) @@ -111,12 +111,12 @@ glabel func_80069790 /* 06A544 80069944 46105400 */ add.s $f16, $f10, $f16 /* 06A548 80069948 24A510A0 */ addiu $a1, %lo(D_801210A0) # addiu $a1, $a1, 0x10a0 /* 06A54C 8006994C E7B0009C */ swc1 $f16, 0x9c($sp) -/* 06A550 80069950 0C01BDDA */ jal func_8006F768 +/* 06A550 80069950 0C01BDDA */ jal f32_matrix_mult /* 06A554 80069954 27A600A4 */ addiu $a2, $sp, 0xa4 /* 06A558 80069958 8FAA0104 */ lw $t2, 0x104($sp) /* 06A55C 8006995C 27A400A4 */ addiu $a0, $sp, 0xa4 /* 06A560 80069960 8D450000 */ lw $a1, ($t2) -/* 06A564 80069964 0C01BE1C */ jal func_8006F870 +/* 06A564 80069964 0C01BE1C */ jal f32_matrix_to_s16_matrix /* 06A568 80069968 00000000 */ nop /* 06A56C 8006996C 8FA50100 */ lw $a1, 0x100($sp) /* 06A570 80069970 8FA60104 */ lw $a2, 0x104($sp) diff --git a/asm/non_matchings/fade_transition/func_800C15D4.s b/asm/non_matchings/fade_transition/func_800C15D4.s index 348dd390..d314ff60 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 cosine_s +/* 0C24A4 800C18A4 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 0C24E4 800C18E4 0C01C1FE */ jal coss_f /* 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 4a7b9759..a19ba47d 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 cosine_s +/* 0C2BF8 800C1FF8 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 0C2C10 800C2010 0C01C1FE */ jal coss_f /* 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_800A4C44.s b/asm/non_matchings/game_ui/func_800A4C44.s index cd254984..190b07e1 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 cosine_s +/* 0A59A0 800A4DA0 0C01C1F1 */ jal sins_f /* 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_800A8474.s b/asm/non_matchings/game_ui/func_800A8474.s index 5278a244..7d6b9ce2 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 sine_s +/* 0AA97C 800A9D7C 0C01C1FE */ jal coss_f /* 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 cosine_s +/* 0AA9A8 800A9DA8 0C01C1F1 */ jal sins_f /* 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_800AC21C.s b/asm/non_matchings/game_ui/func_800AC21C.s index 9e74e313..f538660b 100644 --- a/asm/non_matchings/game_ui/func_800AC21C.s +++ b/asm/non_matchings/game_ui/func_800AC21C.s @@ -107,7 +107,7 @@ glabel func_800AC21C /* 0ACFBC 800AC3BC 00000000 */ nop /* 0ACFC0 800AC3C0 46805420 */ cvt.s.w $f16, $f10 /* 0ACFC4 800AC3C4 46148482 */ mul.s $f18, $f16, $f20 -/* 0ACFC8 800AC3C8 0C01BDBB */ jal func_8006F6EC +/* 0ACFC8 800AC3C8 0C01BDBB */ jal f32_matrix_dot /* 0ACFCC 800AC3CC E7B2006C */ swc1 $f18, 0x6c($sp) /* 0ACFD0 800AC3D0 444AF800 */ cfc1 $t2, $31 /* 0ACFD4 800AC3D4 C7A4006C */ lwc1 $f4, 0x6c($sp) diff --git a/asm/non_matchings/game_ui/func_800AC8A8.s b/asm/non_matchings/game_ui/func_800AC8A8.s index 992618ad..abdf7b01 100644 --- a/asm/non_matchings/game_ui/func_800AC8A8.s +++ b/asm/non_matchings/game_ui/func_800AC8A8.s @@ -87,7 +87,7 @@ glabel func_800AC8A8 /* 0AD5D4 800AC9D4 E4A00000 */ swc1 $f0, ($a1) /* 0AD5D8 800AC9D8 E4A00004 */ swc1 $f0, 4($a1) /* 0AD5DC 800AC9DC A7AE001E */ sh $t6, 0x1e($sp) -/* 0AD5E0 800AC9E0 0C01C124 */ jal func_80070490 +/* 0AD5E0 800AC9E0 0C01C124 */ jal f32_vec3_apply_object_rotation3 /* 0AD5E4 800AC9E4 E4A40008 */ swc1 $f4, 8($a1) /* 0AD5E8 800AC9E8 3C058012 */ lui $a1, %hi(D_80127C30) # $a1, 0x8012 /* 0AD5EC 800AC9EC 24A57C30 */ addiu $a1, %lo(D_80127C30) # addiu $a1, $a1, 0x7c30 diff --git a/asm/non_matchings/game_ui/func_800ACA20.s b/asm/non_matchings/game_ui/func_800ACA20.s index 2efd56c5..91493bc6 100644 --- a/asm/non_matchings/game_ui/func_800ACA20.s +++ b/asm/non_matchings/game_ui/func_800ACA20.s @@ -44,7 +44,7 @@ glabel func_800ACA20 /* 0AD6C8 800ACAC8 E7AA00E0 */ swc1 $f10, 0xe0($sp) /* 0AD6CC 800ACACC 27A500D8 */ addiu $a1, $sp, 0xd8 /* 0AD6D0 800ACAD0 00A03025 */ move $a2, $a1 -/* 0AD6D4 800ACAD4 0C01BDBB */ jal func_8006F6EC +/* 0AD6D4 800ACAD4 0C01BDBB */ jal f32_matrix_dot /* 0AD6D8 800ACAD8 00402025 */ move $a0, $v0 /* 0AD6DC 800ACADC 3C1E8012 */ lui $fp, %hi(D_80127C30) # $fp, 0x8012 /* 0AD6E0 800ACAE0 27DE7C30 */ addiu $fp, %lo(D_80127C30) # addiu $fp, $fp, 0x7c30 diff --git a/asm/non_matchings/game_ui/render_rain_overlay.s b/asm/non_matchings/game_ui/render_rain_overlay.s index 762cd851..ac1c765e 100644 --- a/asm/non_matchings/game_ui/render_rain_overlay.s +++ b/asm/non_matchings/game_ui/render_rain_overlay.s @@ -98,13 +98,13 @@ glabel render_rain_overlay /* 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 cosine_s +/* 0AEA48 800ADE48 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 0AEA60 800ADE60 0C01C1FE */ jal coss_f /* 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/game_ui/render_rain_splashes.s b/asm/non_matchings/game_ui/render_rain_splashes.s index 0f77f939..68424991 100644 --- a/asm/non_matchings/game_ui/render_rain_splashes.s +++ b/asm/non_matchings/game_ui/render_rain_splashes.s @@ -73,7 +73,7 @@ glabel render_rain_splashes /* 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 cosine_s +/* 0AE374 800AD774 0C01C1F1 */ jal sins_f /* 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 render_rain_splashes /* 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 sine_s +/* 0AE39C 800AD79C 0C01C1FE */ jal coss_f /* 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/memory/allocate_at_address_in_main_pool.s b/asm/non_matchings/memory/allocate_at_address_in_main_pool.s index 846d05c5..b1f85e89 100644 --- a/asm/non_matchings/memory/allocate_at_address_in_main_pool.s +++ b/asm/non_matchings/memory/allocate_at_address_in_main_pool.s @@ -6,7 +6,7 @@ glabel allocate_at_address_in_main_pool /* 071B08 80070F08 00A08825 */ move $s1, $a1 /* 071B0C 80070F0C 00809025 */ move $s2, $a0 /* 071B10 80070F10 AFB00020 */ sw $s0, 0x20($sp) -/* 071B14 80070F14 0C01BD44 */ jal func_8006F510 +/* 071B14 80070F14 0C01BD44 */ jal clear_status_register_flags /* 071B18 80070F18 AFA60050 */ sw $a2, 0x50($sp) /* 071B1C 80070F1C AFA20038 */ sw $v0, 0x38($sp) /* 071B20 80070F20 3C028012 */ lui $v0, %hi(gMemoryPools) # $v0, 0x8012 @@ -17,7 +17,7 @@ glabel allocate_at_address_in_main_pool /* 071B34 80070F34 15F80006 */ bne $t7, $t8, .L80070F50 /* 071B38 80070F38 3259000F */ andi $t9, $s2, 0xf /* 071B3C 80070F3C 8FA40038 */ lw $a0, 0x38($sp) -/* 071B40 80070F40 0C01BD4F */ jal func_8006F53C +/* 071B40 80070F40 0C01BD4F */ jal set_status_register_flags /* 071B44 80070F44 00000000 */ nop /* 071B48 80070F48 10000053 */ b .L80071098 /* 071B4C 80070F4C 00001025 */ move $v0, $zero @@ -62,7 +62,7 @@ glabel allocate_at_address_in_main_pool /* 071BDC 80070FDC 0C01C5E3 */ jal allocate_memory_pool_slot /* 071BE0 80070FE0 AFB80014 */ sw $t8, 0x14($sp) /* 071BE4 80070FE4 8FA40038 */ lw $a0, 0x38($sp) -/* 071BE8 80070FE8 0C01BD4F */ jal func_8006F53C +/* 071BE8 80070FE8 0C01BD4F */ jal set_status_register_flags /* 071BEC 80070FEC 00000000 */ nop /* 071BF0 80070FF0 8FA30034 */ lw $v1, 0x34($sp) /* 071BF4 80070FF4 00000000 */ nop @@ -89,7 +89,7 @@ glabel allocate_at_address_in_main_pool /* 071C44 80071044 0C01C5E3 */ jal allocate_memory_pool_slot /* 071C48 80071048 AFAB0014 */ sw $t3, 0x14($sp) /* 071C4C 8007104C 8FA40038 */ lw $a0, 0x38($sp) -/* 071C50 80071050 0C01BD4F */ jal func_8006F53C +/* 071C50 80071050 0C01BD4F */ jal set_status_register_flags /* 071C54 80071054 00000000 */ nop /* 071C58 80071058 24080014 */ li $t0, 20 /* 071C5C 8007105C 02080019 */ multu $s0, $t0 @@ -105,7 +105,7 @@ glabel allocate_at_address_in_main_pool /* 071C80 80071080 1606FFBB */ bne $s0, $a2, .L80070F70 /* 071C84 80071084 00000000 */ nop /* 071C88 80071088 8FA40038 */ lw $a0, 0x38($sp) -/* 071C8C 8007108C 0C01BD4F */ jal func_8006F53C +/* 071C8C 8007108C 0C01BD4F */ jal set_status_register_flags /* 071C90 80071090 00000000 */ nop /* 071C94 80071094 00001025 */ move $v0, $zero .L80071098: diff --git a/asm/non_matchings/memory/allocate_from_memory_pool.s b/asm/non_matchings/memory/allocate_from_memory_pool.s index 4596f6fc..d905e6df 100644 --- a/asm/non_matchings/memory/allocate_from_memory_pool.s +++ b/asm/non_matchings/memory/allocate_from_memory_pool.s @@ -5,7 +5,7 @@ glabel allocate_from_memory_pool /* 071948 80070D48 00A08825 */ move $s1, $a1 /* 07194C 80070D4C AFB0001C */ sw $s0, 0x1c($sp) /* 071950 80070D50 AFA40040 */ sw $a0, 0x40($sp) -/* 071954 80070D54 0C01BD44 */ jal func_8006F510 +/* 071954 80070D54 0C01BD44 */ jal clear_status_register_flags /* 071958 80070D58 AFA60048 */ sw $a2, 0x48($sp) /* 07195C 80070D5C 8FAE0040 */ lw $t6, 0x40($sp) /* 071960 80070D60 3C188012 */ lui $t8, %hi(gMemoryPools) # $t8, 0x8012 @@ -19,7 +19,7 @@ glabel allocate_from_memory_pool /* 071980 80070D80 154B0006 */ bne $t2, $t3, .L80070D9C /* 071984 80070D84 322C000F */ andi $t4, $s1, 0xf /* 071988 80070D88 8FA40028 */ lw $a0, 0x28($sp) -/* 07198C 80070D8C 0C01BD4F */ jal func_8006F53C +/* 07198C 80070D8C 0C01BD4F */ jal set_status_register_flags /* 071990 80070D90 00000000 */ nop /* 071994 80070D94 10000039 */ b .L80070E7C /* 071998 80070D98 00001025 */ move $v0, $zero @@ -69,7 +69,7 @@ glabel allocate_from_memory_pool /* 071A38 80070E38 0C01C5E3 */ jal allocate_memory_pool_slot /* 071A3C 80070E3C AFB80014 */ sw $t8, 0x14($sp) /* 071A40 80070E40 8FA40028 */ lw $a0, 0x28($sp) -/* 071A44 80070E44 0C01BD4F */ jal func_8006F53C +/* 071A44 80070E44 0C01BD4F */ jal set_status_register_flags /* 071A48 80070E48 00000000 */ nop /* 071A4C 80070E4C 24080014 */ li $t0, 20 /* 071A50 80070E50 02080019 */ multu $s0, $t0 @@ -81,7 +81,7 @@ glabel allocate_from_memory_pool /* 071A68 80070E68 8FBF0024 */ lw $ra, 0x24($sp) .L80070E6C: /* 071A6C 80070E6C 8FA40028 */ lw $a0, 0x28($sp) -/* 071A70 80070E70 0C01BD4F */ jal func_8006F53C +/* 071A70 80070E70 0C01BD4F */ jal set_status_register_flags /* 071A74 80070E74 00000000 */ nop /* 071A78 80070E78 00001025 */ move $v0, $zero .L80070E7C: diff --git a/asm/non_matchings/memory/func_80071314.s b/asm/non_matchings/memory/func_80071314.s index 1fb760df..5ea80a3f 100644 --- a/asm/non_matchings/memory/func_80071314.s +++ b/asm/non_matchings/memory/func_80071314.s @@ -9,7 +9,7 @@ glabel func_80071314 /* 071F30 80071330 AFB30024 */ sw $s3, 0x24($sp) /* 071F34 80071334 AFB20020 */ sw $s2, 0x20($sp) /* 071F38 80071338 AFB1001C */ sw $s1, 0x1c($sp) -/* 071F3C 8007133C 0C01BD44 */ jal func_8006F510 +/* 071F3C 8007133C 0C01BD44 */ jal clear_status_register_flags /* 071F40 80071340 AFB00018 */ sw $s0, 0x18($sp) /* 071F44 80071344 3C128012 */ lui $s2, %hi(gNumberOfMemoryPools) # $s2, 0x8012 /* 071F48 80071348 8E5235C0 */ lw $s2, %lo(gNumberOfMemoryPools)($s2) @@ -52,7 +52,7 @@ glabel func_80071314 /* 071FD0 800713D0 8630000C */ lh $s0, 0xc($s1) .L800713D4: /* 071FD4 800713D4 8FA40040 */ lw $a0, 0x40($sp) -/* 071FD8 800713D8 0C01BD4F */ jal func_8006F53C +/* 071FD8 800713D8 0C01BD4F */ jal set_status_register_flags /* 071FDC 800713DC 00000000 */ nop /* 071FE0 800713E0 1000000C */ b .L80071414 /* 071FE4 800713E4 8FBF003C */ lw $ra, 0x3c($sp) @@ -67,7 +67,7 @@ glabel func_80071314 /* 072000 80071400 26B5FFF0 */ addiu $s5, $s5, -0x10 .L80071404: /* 072004 80071404 8FA40040 */ lw $a0, 0x40($sp) -/* 072008 80071408 0C01BD4F */ jal func_8006F53C +/* 072008 80071408 0C01BD4F */ jal set_status_register_flags /* 07200C 8007140C 00000000 */ nop /* 072010 80071410 8FBF003C */ lw $ra, 0x3c($sp) .L80071414: diff --git a/asm/non_matchings/menu/menu_credits_loop.s b/asm/non_matchings/menu/menu_credits_loop.s index 75511bc3..de78525e 100644 --- a/asm/non_matchings/menu/menu_credits_loop.s +++ b/asm/non_matchings/menu/menu_credits_loop.s @@ -102,12 +102,12 @@ glabel menu_credits_loop /* 09C090 8009B490 00092400 */ sll $a0, $t1, 0x10 /* 09C094 8009B494 00045403 */ sra $t2, $a0, 0x10 /* 09C098 8009B498 01402025 */ move $a0, $t2 -/* 09C09C 8009B49C 0C01C20C */ jal func_80070830 +/* 09C09C 8009B49C 0C01C20C */ jal sins /* 09C0A0 8009B4A0 01208825 */ move $s1, $t1 /* 09C0A4 8009B4A4 00112400 */ sll $a0, $s1, 0x10 /* 09C0A8 8009B4A8 00046403 */ sra $t4, $a0, 0x10 /* 09C0AC 8009B4AC 01802025 */ move $a0, $t4 -/* 09C0B0 8009B4B0 0C01C20B */ jal func_8007082C +/* 09C0B0 8009B4B0 0C01C20B */ jal coss /* 09C0B4 8009B4B4 00409825 */ move $s3, $v0 /* 09C0B8 8009B4B8 02740019 */ multu $s3, $s4 /* 09C0BC 8009B4BC 8E050000 */ lw $a1, ($s0) diff --git a/asm/non_matchings/menu/menu_track_select_init.s b/asm/non_matchings/menu/menu_track_select_init.s index f312a20e..9c6910a7 100644 --- a/asm/non_matchings/menu/menu_track_select_init.s +++ b/asm/non_matchings/menu/menu_track_select_init.s @@ -536,7 +536,7 @@ glabel menu_track_select_init /* 08FBA8 8008EFA8 00000000 */ nop /* 08FBAC 8008EFAC 0C0002C6 */ jal func_80000B18 /* 08FBB0 8008EFB0 00000000 */ nop -/* 08FBB4 8008EFB4 0C01BD59 */ jal func_8006F564 +/* 08FBB4 8008EFB4 0C01BD59 */ jal set_D_800DD430 /* 08FBB8 8008EFB8 24040001 */ li $a0, 1 /* 08FBBC 8008EFBC 3C0C800E */ lui $t4, %hi(D_800E0418) # $t4, 0x800e /* 08FBC0 8008EFC0 8D8C0418 */ lw $t4, %lo(D_800E0418)($t4) diff --git a/asm/non_matchings/objects/calc_dynamic_lighting_for_object_1.s b/asm/non_matchings/objects/calc_dynamic_lighting_for_object_1.s index f158da98..b7809b5e 100644 --- a/asm/non_matchings/objects/calc_dynamic_lighting_for_object_1.s +++ b/asm/non_matchings/objects/calc_dynamic_lighting_for_object_1.s @@ -62,7 +62,7 @@ glabel calc_dynamic_lighting_for_object_1 /* 01E4FC 8001D8FC A7A0009E */ sh $zero, 0x9e($sp) /* 01E500 8001D900 000FC023 */ negu $t8, $t7 /* 01E504 8001D904 A7B80098 */ sh $t8, 0x98($sp) -/* 01E508 8001D908 0C01C0F6 */ jal func_800703D8 +/* 01E508 8001D908 0C01C0F6 */ jal f32_vec3_apply_object_rotation2 /* 01E50C 8001D90C 27A40094 */ addiu $a0, $sp, 0x94 /* 01E510 8001D910 8E390040 */ lw $t9, 0x40($s1) /* 01E514 8001D914 87A9009E */ lh $t1, 0x9e($sp) @@ -76,7 +76,7 @@ glabel calc_dynamic_lighting_for_object_1 /* 01E534 8001D934 A7A9009E */ sh $t1, 0x9e($sp) /* 01E538 8001D938 00402025 */ move $a0, $v0 /* 01E53C 8001D93C 02002825 */ move $a1, $s0 -/* 01E540 8001D940 0C01BDBB */ jal func_8006F6EC +/* 01E540 8001D940 0C01BDBB */ jal f32_matrix_dot /* 01E544 8001D944 02003025 */ move $a2, $s0 /* 01E548 8001D948 87A9009E */ lh $t1, 0x9e($sp) /* 01E54C 8001D94C 00000000 */ nop @@ -140,14 +140,14 @@ glabel calc_dynamic_lighting_for_object_1 /* 01E630 8001DA30 A7A9009E */ sh $t1, 0x9e($sp) /* 01E634 8001DA34 00402025 */ move $a0, $v0 /* 01E638 8001DA38 02002825 */ move $a1, $s0 -/* 01E63C 8001DA3C 0C01BDBB */ jal func_8006F6EC +/* 01E63C 8001DA3C 0C01BDBB */ jal f32_matrix_dot /* 01E640 8001DA40 02003025 */ move $a2, $s0 /* 01E644 8001DA44 87A9009E */ lh $t1, 0x9e($sp) /* 01E648 8001DA48 00000000 */ nop .L8001DA4C: /* 01E64C 8001DA4C 27A40094 */ addiu $a0, $sp, 0x94 /* 01E650 8001DA50 02002825 */ move $a1, $s0 -/* 01E654 8001DA54 0C01C0F6 */ jal func_800703D8 +/* 01E654 8001DA54 0C01C0F6 */ jal f32_vec3_apply_object_rotation2 /* 01E658 8001DA58 A7A9009E */ sh $t1, 0x9e($sp) /* 01E65C 8001DA5C 444EF800 */ cfc1 $t6, $31 /* 01E660 8001DA60 3C01437F */ li $at, 0x437F0000 # 255.000000 diff --git a/asm/non_matchings/objects/calc_env_mapping_for_object.s b/asm/non_matchings/objects/calc_env_mapping_for_object.s index c8054938..1584d08c 100644 --- a/asm/non_matchings/objects/calc_env_mapping_for_object.s +++ b/asm/non_matchings/objects/calc_env_mapping_for_object.s @@ -32,10 +32,10 @@ glabel calc_env_mapping_for_object /* 01E9CC 8001DDCC E7A00090 */ swc1 $f0, 0x90($sp) /* 01E9D0 8001DDD0 E7A00094 */ swc1 $f0, 0x94($sp) /* 01E9D4 8001DDD4 AFAA0074 */ sw $t2, 0x74($sp) -/* 01E9D8 8001DDD8 0C01BF0C */ jal func_8006FC30 +/* 01E9D8 8001DDD8 0C01BF0C */ jal object_transform_to_matrix /* 01E9DC 8001DDDC E7A40088 */ swc1 $f4, 0x88($sp) /* 01E9E0 8001DDE0 02202025 */ move $a0, $s1 -/* 01E9E4 8001DDE4 0C01BD78 */ jal func_8006F5E0 +/* 01E9E4 8001DDE4 0C01BD78 */ jal f32_matrix_to_s32_matrix /* 01E9E8 8001DDE8 27A500D8 */ addiu $a1, $sp, 0xd8 /* 01E9EC 8001DDEC A7A00062 */ sh $zero, 0x62($sp) /* 01E9F0 8001DDF0 87C20028 */ lh $v0, 0x28($fp) @@ -138,13 +138,13 @@ glabel calc_env_mapping_for_object /* 01EB50 8001DF50 000EA403 */ sra $s4, $t6, 0x10 /* 01EB54 8001DF54 24A5AFEE */ addiu $a1, %lo(D_8011AFEE) # addiu $a1, $a1, -0x5012 /* 01EB58 8001DF58 27A400D8 */ addiu $a0, $sp, 0xd8 -/* 01EB5C 8001DF5C 0C01BED8 */ jal func_8006FB60 +/* 01EB5C 8001DF5C 0C01BED8 */ jal s16_vec3_mult_by_s32_matrix /* 01EB60 8001DF60 A62D000A */ sh $t5, 0xa($s1) /* 01EB64 8001DF64 8FB90070 */ lw $t9, 0x70($sp) /* 01EB68 8001DF68 02202025 */ move $a0, $s1 /* 01EB6C 8001DF6C 17200003 */ bnez $t9, .L8001DF7C /* 01EB70 8001DF70 3C058012 */ lui $a1, %hi(D_8011AFEE) # $a1, 0x8012 -/* 01EB74 8001DF74 0C01BE6E */ jal func_8006F9B8 +/* 01EB74 8001DF74 0C01BE6E */ jal s16_matrix_rotate /* 01EB78 8001DF78 24A5AFEE */ addiu $a1, %lo(D_8011AFEE) # addiu $a1, $a1, -0x5012 .L8001DF7C: /* 01EB7C 8001DF7C 86220006 */ lh $v0, 6($s1) diff --git a/asm/non_matchings/objects/func_8000B38C.s b/asm/non_matchings/objects/func_8000B38C.s index 2ee707d3..662ec8fc 100644 --- a/asm/non_matchings/objects/func_8000B38C.s +++ b/asm/non_matchings/objects/func_8000B38C.s @@ -21,7 +21,7 @@ glabel func_8000B38C /* 00BFD8 8000B3D8 E7B50018 */ swc1 $f21, 0x18($sp) /* 00BFDC 8000B3DC E7A6006C */ swc1 $f6, 0x6c($sp) /* 00BFE0 8000B3E0 02A02825 */ move $a1, $s5 -/* 00BFE4 8000B3E4 0C01C124 */ jal func_80070490 +/* 00BFE4 8000B3E4 0C01C124 */ jal f32_vec3_apply_object_rotation3 /* 00BFE8 8000B3E8 00C02025 */ move $a0, $a2 /* 00BFEC 8000B3EC C7A80064 */ lwc1 $f8, 0x64($sp) /* 00BFF0 8000B3F0 C66A000C */ lwc1 $f10, 0xc($s3) @@ -77,7 +77,7 @@ glabel func_8000B38C /* 00C0B4 8000B4B4 C650FFFC */ lwc1 $f16, -4($s2) /* 00C0B8 8000B4B8 E7B6006C */ swc1 $f22, 0x6c($sp) /* 00C0BC 8000B4BC 46148482 */ mul.s $f18, $f16, $f20 -/* 00C0C0 8000B4C0 0C01C0C8 */ jal func_80070320 +/* 00C0C0 8000B4C0 0C01C0C8 */ jal f32_vec3_apply_object_rotation /* 00C0C4 8000B4C4 E7B20068 */ swc1 $f18, 0x68($sp) /* 00C0C8 8000B4C8 C7A40064 */ lwc1 $f4, 0x64($sp) /* 00C0CC 8000B4CC C666000C */ lwc1 $f6, 0xc($s3) @@ -138,7 +138,7 @@ glabel func_8000B38C .L8000B5A8: /* 00C1A8 8000B5A8 00112400 */ sll $a0, $s1, 0x10 /* 00C1AC 8000B5AC 0004C403 */ sra $t8, $a0, 0x10 -/* 00C1B0 8000B5B0 0C01C20C */ jal func_80070830 +/* 00C1B0 8000B5B0 0C01C20C */ jal sins /* 00C1B4 8000B5B4 03002025 */ move $a0, $t8 /* 00C1B8 8000B5B8 00520019 */ multu $v0, $s2 /* 00C1BC 8000B5BC 00112400 */ sll $a0, $s1, 0x10 @@ -147,7 +147,7 @@ glabel func_8000B38C /* 00C1C8 8000B5C8 0000C812 */ mflo $t9 /* 00C1CC 8000B5CC 00197403 */ sra $t6, $t9, 0x10 /* 00C1D0 8000B5D0 01D27821 */ addu $t7, $t6, $s2 -/* 00C1D4 8000B5D4 0C01C20B */ jal func_8007082C +/* 00C1D4 8000B5D4 0C01C20B */ jal coss /* 00C1D8 8000B5D8 AE0F0000 */ sw $t7, ($s0) /* 00C1DC 8000B5DC 02C20019 */ multu $s6, $v0 /* 00C1E0 8000B5E0 8E190000 */ lw $t9, ($s0) diff --git a/asm/non_matchings/objects/func_8000B750.s b/asm/non_matchings/objects/func_8000B750.s index 7114c140..be1edaae 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 sine_s +/* 00C474 8000B874 0C01C1FE */ jal coss_f /* 00C478 8000B878 AFA20044 */ sw $v0, 0x44($sp) /* 00C47C 8000B87C 8FA20044 */ lw $v0, 0x44($sp) /* 00C480 8000B880 8FAB004C */ lw $t3, 0x4c($sp) @@ -212,7 +212,7 @@ glabel func_8000B750 /* 00C658 8000BA58 E7A40078 */ swc1 $f4, 0x78($sp) /* 00C65C 8000BA5C C4480008 */ lwc1 $f8, 8($v0) /* 00C660 8000BA60 AFAA0038 */ sw $t2, 0x38($sp) -/* 00C664 8000BA64 0C01C0C8 */ jal func_80070320 +/* 00C664 8000BA64 0C01C0C8 */ jal f32_vec3_apply_object_rotation /* 00C668 8000BA68 E7A8007C */ swc1 $f8, 0x7c($sp) /* 00C66C 8000BA6C 0C004558 */ jal func_80011560 /* 00C670 8000BA70 00000000 */ nop diff --git a/asm/non_matchings/objects/func_800135B8.s b/asm/non_matchings/objects/func_800135B8.s index 11e7e08b..a4706808 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 sine_s +/* 0142BC 800136BC 0C01C1FE */ jal coss_f /* 0142C0 800136C0 000C2403 */ sra $a0, $t4, 0x10 /* 0142C4 800136C4 8FA30050 */ lw $v1, 0x50($sp) /* 0142C8 800136C8 3C058012 */ lui $a1, %hi(gObjectCurrMatrix) # $a1, 0x8012 diff --git a/asm/non_matchings/objects/func_800138A8.s b/asm/non_matchings/objects/func_800138A8.s index 8158bede..d5d18425 100644 --- a/asm/non_matchings/objects/func_800138A8.s +++ b/asm/non_matchings/objects/func_800138A8.s @@ -6,7 +6,7 @@ glabel func_800138A8 /* 0144B8 800138B8 00C08025 */ move $s0, $a2 /* 0144BC 800138BC AFA70044 */ sw $a3, 0x44($sp) /* 0144C0 800138C0 24C5000C */ addiu $a1, $a2, 0xc -/* 0144C4 800138C4 0C01C0C8 */ jal func_80070320 +/* 0144C4 800138C4 0C01C0C8 */ jal f32_vec3_apply_object_rotation /* 0144C8 800138C8 AFA40038 */ sw $a0, 0x38($sp) /* 0144CC 800138CC 8FA40038 */ lw $a0, 0x38($sp) /* 0144D0 800138D0 C604000C */ lwc1 $f4, 0xc($s0) diff --git a/asm/non_matchings/objects/func_80016500.s b/asm/non_matchings/objects/func_80016500.s index d30f424f..c19c2317 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 sine_s +/* 01715C 8001655C 0C01C1FE */ jal coss_f /* 017160 80016560 AFA40020 */ sw $a0, 0x20($sp) /* 017164 80016564 8FA40020 */ lw $a0, 0x20($sp) -/* 017168 80016568 0C01C1F1 */ jal cosine_s +/* 017168 80016568 0C01C1F1 */ jal sins_f /* 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_80016748.s b/asm/non_matchings/objects/func_80016748.s index d7d6dd14..45846e92 100644 --- a/asm/non_matchings/objects/func_80016748.s +++ b/asm/non_matchings/objects/func_80016748.s @@ -73,7 +73,7 @@ glabel func_80016748 /* 017448 80016848 8FBF007C */ lw $ra, 0x7c($sp) /* 01744C 8001684C 8E16004C */ lw $s6, 0x4c($s0) /* 017450 80016850 8EB4004C */ lw $s4, 0x4c($s5) -/* 017454 80016854 0C01BF0C */ jal func_8006FC30 +/* 017454 80016854 0C01BF0C */ jal object_transform_to_matrix /* 017458 80016858 02A02825 */ move $a1, $s5 /* 01745C 8001685C 86780020 */ lh $t8, 0x20($s3) /* 017460 80016860 0000F025 */ move $fp, $zero diff --git a/asm/non_matchings/objects/func_8001709C.s b/asm/non_matchings/objects/func_8001709C.s index e2d09ff9..8eb1677b 100644 --- a/asm/non_matchings/objects/func_8001709C.s +++ b/asm/non_matchings/objects/func_8001709C.s @@ -34,7 +34,7 @@ glabel func_8001709C /* 017D1C 8001711C 46009107 */ neg.s $f4, $f18 /* 017D20 80017120 E7A4008C */ swc1 $f4, 0x8c($sp) /* 017D24 80017124 AFA4006C */ sw $a0, 0x6c($sp) -/* 017D28 80017128 0C01BF9D */ jal func_8006FE74 +/* 017D28 80017128 0C01BF9D */ jal object_transform_to_matrix_2 /* 017D2C 8001712C 27A50078 */ addiu $a1, $sp, 0x78 /* 017D30 80017130 8FA70090 */ lw $a3, 0x90($sp) /* 017D34 80017134 3C013FF0 */ li $at, 0x3FF00000 # 1.875000 @@ -65,7 +65,7 @@ glabel func_8001709C /* 017D94 80017194 E7A20054 */ swc1 $f2, 0x54($sp) /* 017D98 80017198 E7B00068 */ swc1 $f16, 0x68($sp) /* 017D9C 8001719C AFA70090 */ sw $a3, 0x90($sp) -/* 017DA0 800171A0 0C01BDDA */ jal func_8006F768 +/* 017DA0 800171A0 0C01BDDA */ jal f32_matrix_mult /* 017DA4 800171A4 E7A20070 */ swc1 $f2, 0x70($sp) /* 017DA8 800171A8 C7A20070 */ lwc1 $f2, 0x70($sp) /* 017DAC 800171AC 3C013FF0 */ li $at, 0x3FF00000 # 1.875000 @@ -100,7 +100,7 @@ glabel func_8001709C /* 017E20 80017220 00000000 */ nop /* 017E24 80017224 252B0002 */ addiu $t3, $t1, 2 /* 017E28 80017228 000B6180 */ sll $t4, $t3, 6 -/* 017E2C 8001722C 0C01BF0C */ jal func_8006FC30 +/* 017E2C 8001722C 0C01BF0C */ jal object_transform_to_matrix /* 017E30 80017230 020C2021 */ addu $a0, $s0, $t4 /* 017E34 80017234 AE000100 */ sw $zero, 0x100($s0) /* 017E38 80017238 8FBF001C */ lw $ra, 0x1c($sp) diff --git a/asm/non_matchings/objects/func_80017E98.s b/asm/non_matchings/objects/func_80017E98.s index 3f9a10cd..2e849b5d 100644 --- a/asm/non_matchings/objects/func_80017E98.s +++ b/asm/non_matchings/objects/func_80017E98.s @@ -235,7 +235,7 @@ glabel func_80017E98 /* 018DFC 800181FC E7B40088 */ swc1 $f20, 0x88($sp) /* 018E00 80018200 E7B4008C */ swc1 $f20, 0x8c($sp) /* 018E04 80018204 E7B40090 */ swc1 $f20, 0x90($sp) -/* 018E08 80018208 0C01BF0C */ jal func_8006FC30 +/* 018E08 80018208 0C01BF0C */ jal object_transform_to_matrix /* 018E0C 8001820C A7AF0080 */ sh $t7, 0x80($sp) /* 018E10 80018210 4405A000 */ mfc1 $a1, $f20 /* 018E14 80018214 4406A000 */ mfc1 $a2, $f20 diff --git a/asm/non_matchings/objects/func_8001C6C4.s b/asm/non_matchings/objects/func_8001C6C4.s index 4348d98a..519d3f49 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 cosine_s +/* 01D740 8001CB40 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 01D760 8001CB60 0C01C1FE */ jal coss_f /* 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/objects/func_8001D4B4.s b/asm/non_matchings/objects/func_8001D4B4.s index 2ed98eed..2f05a893 100644 --- a/asm/non_matchings/objects/func_8001D4B4.s +++ b/asm/non_matchings/objects/func_8001D4B4.s @@ -29,7 +29,7 @@ glabel func_8001D4B4 /* 01E120 8001D520 E7A00020 */ swc1 $f0, 0x20($sp) /* 01E124 8001D524 A7A80028 */ sh $t0, 0x28($sp) /* 01E128 8001D528 A7A9002A */ sh $t1, 0x2a($sp) -/* 01E12C 8001D52C 0C01C0C8 */ jal func_80070320 +/* 01E12C 8001D52C 0C01C0C8 */ jal f32_vec3_apply_object_rotation /* 01E130 8001D530 E7A60024 */ swc1 $f6, 0x24($sp) /* 01E134 8001D534 C7A8001C */ lwc1 $f8, 0x1c($sp) /* 01E138 8001D538 8FA60030 */ lw $a2, 0x30($sp) diff --git a/asm/non_matchings/particles/func_800B0010.s b/asm/non_matchings/particles/func_800B0010.s index 4c71c256..cdaa693d 100644 --- a/asm/non_matchings/particles/func_800B0010.s +++ b/asm/non_matchings/particles/func_800B0010.s @@ -226,7 +226,7 @@ glabel func_800B0010 .L800B033C: /* 0B0F3C 800B033C 27B10030 */ addiu $s1, $sp, 0x30 /* 0B0F40 800B0340 02202825 */ move $a1, $s1 -/* 0B0F44 800B0344 0C01C124 */ jal func_80070490 +/* 0B0F44 800B0344 0C01C124 */ jal f32_vec3_apply_object_rotation3 /* 0B0F48 800B0348 27A40028 */ addiu $a0, $sp, 0x28 /* 0B0F4C 800B034C 10000007 */ b .L800B036C /* 0B0F50 800B0350 8E04003C */ lw $a0, 0x3c($s0) @@ -234,11 +234,11 @@ glabel func_800B0010 .L800B0358: /* 0B0F58 800B0358 27B10030 */ addiu $s1, $sp, 0x30 /* 0B0F5C 800B035C 02202825 */ move $a1, $s1 -/* 0B0F60 800B0360 0C01C124 */ jal func_80070490 +/* 0B0F60 800B0360 0C01C124 */ jal f32_vec3_apply_object_rotation3 /* 0B0F64 800B0364 24840012 */ addiu $a0, $a0, 0x12 /* 0B0F68 800B0368 8E04003C */ lw $a0, 0x3c($s0) .L800B036C: -/* 0B0F6C 800B036C 0C01C0C8 */ jal func_80070320 +/* 0B0F6C 800B036C 0C01C0C8 */ jal f32_vec3_apply_object_rotation /* 0B0F70 800B0370 02202825 */ move $a1, $s1 /* 0B0F74 800B0374 C60A001C */ lwc1 $f10, 0x1c($s0) /* 0B0F78 800B0378 C7A40030 */ lwc1 $f4, 0x30($sp) diff --git a/asm/non_matchings/particles/func_800B03C0.s b/asm/non_matchings/particles/func_800B03C0.s index 6c866488..60a49522 100644 --- a/asm/non_matchings/particles/func_800B03C0.s +++ b/asm/non_matchings/particles/func_800B03C0.s @@ -129,12 +129,12 @@ glabel func_800B03C0 /* 0B1194 800B0594 A7AA002A */ sh $t2, 0x2a($sp) .L800B0598: /* 0B1198 800B0598 27A40028 */ addiu $a0, $sp, 0x28 -/* 0B119C 800B059C 0C01C124 */ jal func_80070490 +/* 0B119C 800B059C 0C01C124 */ jal f32_vec3_apply_object_rotation3 /* 0B11A0 800B05A0 27A50030 */ addiu $a1, $sp, 0x30 /* 0B11A4 800B05A4 10000004 */ b .L800B05B8 /* 0B11A8 800B05A8 C60A004C */ lwc1 $f10, 0x4c($s0) .L800B05AC: -/* 0B11AC 800B05AC 0C01C0C8 */ jal func_80070320 +/* 0B11AC 800B05AC 0C01C0C8 */ jal f32_vec3_apply_object_rotation /* 0B11B0 800B05B0 27A50030 */ addiu $a1, $sp, 0x30 /* 0B11B4 800B05B4 C60A004C */ lwc1 $f10, 0x4c($s0) .L800B05B8: @@ -157,7 +157,7 @@ glabel func_800B03C0 /* 0B11F4 800B05F4 10410006 */ beq $v0, $at, .L800B0610 /* 0B11F8 800B05F8 00000000 */ nop /* 0B11FC 800B05FC 8FA40044 */ lw $a0, 0x44($sp) -/* 0B1200 800B0600 0C01C0C8 */ jal func_80070320 +/* 0B1200 800B0600 0C01C0C8 */ jal f32_vec3_apply_object_rotation /* 0B1204 800B0604 2605004C */ addiu $a1, $s0, 0x4c /* 0B1208 800B0608 92020039 */ lbu $v0, 0x39($s0) /* 0B120C 800B060C 00000000 */ nop @@ -171,7 +171,7 @@ glabel func_800B03C0 /* 0B1228 800B0628 14410004 */ bne $v0, $at, .L800B063C /* 0B122C 800B062C E6080014 */ swc1 $f8, 0x14($s0) /* 0B1230 800B0630 8FA40044 */ lw $a0, 0x44($sp) -/* 0B1234 800B0634 0C01C0C8 */ jal func_80070320 +/* 0B1234 800B0634 0C01C0C8 */ jal f32_vec3_apply_object_rotation /* 0B1238 800B0638 2605000C */ addiu $a1, $s0, 0xc .L800B063C: /* 0B123C 800B063C 8FAB0044 */ lw $t3, 0x44($sp) diff --git a/asm/non_matchings/particles/func_800B0BAC.s b/asm/non_matchings/particles/func_800B0BAC.s index b5d12023..7103416f 100644 --- a/asm/non_matchings/particles/func_800B0BAC.s +++ b/asm/non_matchings/particles/func_800B0BAC.s @@ -179,7 +179,7 @@ glabel func_800B0BAC /* 0B1A40 800B0E40 AFA90024 */ sw $t1, 0x24($sp) /* 0B1A44 800B0E44 AFA80034 */ sw $t0, 0x34($sp) /* 0B1A48 800B0E48 AFA70030 */ sw $a3, 0x30($sp) -/* 0B1A4C 800B0E4C 0C01C0C8 */ jal func_80070320 +/* 0B1A4C 800B0E4C 0C01C0C8 */ jal f32_vec3_apply_object_rotation /* 0B1A50 800B0E50 AFA6003C */ sw $a2, 0x3c($sp) /* 0B1A54 800B0E54 8FA6003C */ lw $a2, 0x3c($sp) /* 0B1A58 800B0E58 C604000C */ lwc1 $f4, 0xc($s0) diff --git a/asm/non_matchings/particles/func_800B26E0.s b/asm/non_matchings/particles/func_800B26E0.s index 2b58dde0..568b381e 100644 --- a/asm/non_matchings/particles/func_800B26E0.s +++ b/asm/non_matchings/particles/func_800B26E0.s @@ -92,7 +92,7 @@ glabel func_800B26E0 /* 0B3414 800B2814 8FA40034 */ lw $a0, 0x34($sp) /* 0B3418 800B2818 AFA30038 */ sw $v1, 0x38($sp) /* 0B341C 800B281C AFA60050 */ sw $a2, 0x50($sp) -/* 0B3420 800B2820 0C01C0C8 */ jal func_80070320 +/* 0B3420 800B2820 0C01C0C8 */ jal f32_vec3_apply_object_rotation /* 0B3424 800B2824 AFA70030 */ sw $a3, 0x30($sp) /* 0B3428 800B2828 8FA30038 */ lw $v1, 0x38($sp) /* 0B342C 800B282C 8FA60050 */ lw $a2, 0x50($sp) diff --git a/asm/non_matchings/printf/func_800B3240.s b/asm/non_matchings/printf/func_800B3240.s index 123477be..363ccfaf 100644 --- a/asm/non_matchings/printf/func_800B3240.s +++ b/asm/non_matchings/printf/func_800B3240.s @@ -35,7 +35,7 @@ glabel func_800B3240 /* 0B3EBC 800B32BC E48A0010 */ swc1 $f10, 0x10($a0) /* 0B3EC0 800B32C0 E4800014 */ swc1 $f0, 0x14($a0) /* 0B3EC4 800B32C4 AFA40018 */ sw $a0, 0x18($sp) -/* 0B3EC8 800B32C8 0C01C0C8 */ jal func_80070320 +/* 0B3EC8 800B32C8 0C01C0C8 */ jal f32_vec3_apply_object_rotation /* 0B3ECC 800B32CC 2485000C */ addiu $a1, $a0, 0xc /* 0B3ED0 800B32D0 8FA40018 */ lw $a0, 0x18($sp) /* 0B3ED4 800B32D4 00000000 */ nop diff --git a/asm/non_matchings/printf/func_800B3358.s b/asm/non_matchings/printf/func_800B3358.s index 4024be08..46e4fb28 100644 --- a/asm/non_matchings/printf/func_800B3358.s +++ b/asm/non_matchings/printf/func_800B3358.s @@ -51,7 +51,7 @@ glabel func_800B3358 /* 0B4018 800B3418 46002187 */ neg.s $f6, $f4 /* 0B401C 800B341C E7A6003C */ swc1 $f6, 0x3c($sp) /* 0B4020 800B3420 02002025 */ move $a0, $s0 -/* 0B4024 800B3424 0C01C0C8 */ jal func_80070320 +/* 0B4024 800B3424 0C01C0C8 */ jal f32_vec3_apply_object_rotation /* 0B4028 800B3428 02602825 */ move $a1, $s3 /* 0B402C 800B342C C608001C */ lwc1 $f8, 0x1c($s0) /* 0B4030 800B3430 C7AA0038 */ lwc1 $f10, 0x38($sp) diff --git a/asm/non_matchings/printf/func_800B3564.s b/asm/non_matchings/printf/func_800B3564.s index 2d626df5..560810f3 100644 --- a/asm/non_matchings/printf/func_800B3564.s +++ b/asm/non_matchings/printf/func_800B3564.s @@ -23,7 +23,7 @@ glabel func_800B3564 /* 0B41B4 800B35B4 E6140020 */ swc1 $f20, 0x20($s0) /* 0B41B8 800B35B8 E6060024 */ swc1 $f6, 0x24($s0) /* 0B41BC 800B35BC 02002025 */ move $a0, $s0 -/* 0B41C0 800B35C0 0C01C124 */ jal func_80070490 +/* 0B41C0 800B35C0 0C01C124 */ jal f32_vec3_apply_object_rotation3 /* 0B41C4 800B35C4 02402825 */ move $a1, $s2 /* 0B41C8 800B35C8 C608000C */ lwc1 $f8, 0xc($s0) /* 0B41CC 800B35CC C60A001C */ lwc1 $f10, 0x1c($s0) diff --git a/asm/non_matchings/printf/func_800B3E64.s b/asm/non_matchings/printf/func_800B3E64.s index b26c3511..485206a2 100644 --- a/asm/non_matchings/printf/func_800B3E64.s +++ b/asm/non_matchings/printf/func_800B3E64.s @@ -42,14 +42,14 @@ glabel func_800B3E64 /* 0B4B00 800B3F00 8E110044 */ lw $s1, 0x44($s0) /* 0B4B04 800B3F04 E7B40074 */ swc1 $f20, 0x74($sp) /* 0B4B08 800B3F08 E7B40078 */ swc1 $f20, 0x78($sp) -/* 0B4B0C 800B3F0C 0C01C0C8 */ jal func_80070320 +/* 0B4B0C 800B3F0C 0C01C0C8 */ jal f32_vec3_apply_object_rotation /* 0B4B10 800B3F10 E7A40070 */ swc1 $f4, 0x70($sp) /* 0B4B14 800B3F14 E7B4007C */ swc1 $f20, 0x7c($sp) /* 0B4B18 800B3F18 C6060008 */ lwc1 $f6, 8($s0) /* 0B4B1C 800B3F1C E7B40084 */ swc1 $f20, 0x84($sp) /* 0B4B20 800B3F20 02002025 */ move $a0, $s0 /* 0B4B24 800B3F24 03C02825 */ move $a1, $fp -/* 0B4B28 800B3F28 0C01C0C8 */ jal func_80070320 +/* 0B4B28 800B3F28 0C01C0C8 */ jal f32_vec3_apply_object_rotation /* 0B4B2C 800B3F2C E7A60080 */ swc1 $f6, 0x80($sp) /* 0B4B30 800B3F30 92090075 */ lbu $t1, 0x75($s0) /* 0B4B34 800B3F34 C7A80070 */ lwc1 $f8, 0x70($sp) diff --git a/asm/non_matchings/racer/drop_bananas.s b/asm/non_matchings/racer/drop_bananas.s index 4424eeb7..90c3e3ea 100644 --- a/asm/non_matchings/racer/drop_bananas.s +++ b/asm/non_matchings/racer/drop_bananas.s @@ -47,7 +47,7 @@ glabel drop_bananas /* 058390 80057790 A7A80072 */ sh $t0, 0x72($sp) /* 058394 80057794 A7A90074 */ sh $t1, 0x74($sp) /* 058398 80057798 27A50070 */ addiu $a1, $sp, 0x70 -/* 05839C 8005779C 0C01C079 */ jal func_800701E4 +/* 05839C 8005779C 0C01C079 */ jal s16_vec3_apply_object_rotation /* 0583A0 800577A0 A7B9007C */ sh $t9, 0x7c($sp) /* 0583A4 800577A4 444BF800 */ cfc1 $t3, $31 /* 0583A8 800577A8 C644000C */ lwc1 $f4, 0xc($s2) diff --git a/asm/non_matchings/racer/func_80046524.s b/asm/non_matchings/racer/func_80046524.s index 66ff2464..3a5be441 100644 --- a/asm/non_matchings/racer/func_80046524.s +++ b/asm/non_matchings/racer/func_80046524.s @@ -769,7 +769,7 @@ glabel func_80046524 /* 047B84 80046F84 E4A00010 */ swc1 $f0, 0x10($a1) /* 047B88 80046F88 E4A00014 */ swc1 $f0, 0x14($a1) /* 047B8C 80046F8C E4A40008 */ swc1 $f4, 8($a1) -/* 047B90 80046F90 0C01BF0C */ jal func_8006FC30 +/* 047B90 80046F90 0C01BF0C */ jal object_transform_to_matrix /* 047B94 80046F94 A4AB0002 */ sh $t3, 2($a1) /* 047B98 80046F98 44800000 */ mtc1 $zero, $f0 /* 047B9C 80046F9C 260D0038 */ addiu $t5, $s0, 0x38 @@ -2513,7 +2513,7 @@ glabel func_80046524 /* 049528 80048928 E4A80008 */ swc1 $f8, 8($a1) /* 04952C 8004892C E4AA000C */ swc1 $f10, 0xc($a1) /* 049530 80048930 E4A40010 */ swc1 $f4, 0x10($a1) -/* 049534 80048934 0C01BF9D */ jal func_8006FE74 +/* 049534 80048934 0C01BF9D */ jal object_transform_to_matrix_2 /* 049538 80048938 E4A60014 */ swc1 $f6, 0x14($a1) /* 04953C 8004893C 8E25001C */ lw $a1, 0x1c($s1) /* 049540 80048940 8E260020 */ lw $a2, 0x20($s1) diff --git a/asm/non_matchings/racer/func_800494E0.s b/asm/non_matchings/racer/func_800494E0.s index 8dca7559..3717d2c1 100644 --- a/asm/non_matchings/racer/func_800494E0.s +++ b/asm/non_matchings/racer/func_800494E0.s @@ -77,7 +77,7 @@ glabel func_800494E0 /* 04A1EC 800495EC E4A00014 */ swc1 $f0, 0x14($a1) /* 04A1F0 800495F0 E7A20044 */ swc1 $f2, 0x44($sp) /* 04A1F4 800495F4 27A40048 */ addiu $a0, $sp, 0x48 -/* 04A1F8 800495F8 0C01BF9D */ jal func_8006FE74 +/* 04A1F8 800495F8 0C01BF9D */ jal object_transform_to_matrix_2 /* 04A1FC 800495FC E4AA0008 */ swc1 $f10, 8($a1) /* 04A200 80049600 8E050000 */ lw $a1, ($s0) /* 04A204 80049604 8E060004 */ lw $a2, 4($s0) diff --git a/asm/non_matchings/racer/func_80049794.s b/asm/non_matchings/racer/func_80049794.s index 41f0dced..f16879ca 100644 --- a/asm/non_matchings/racer/func_80049794.s +++ b/asm/non_matchings/racer/func_80049794.s @@ -562,7 +562,7 @@ glabel func_80049794 /* 04AAF4 80049EF4 E4AC0014 */ swc1 $f12, 0x14($a1) /* 04AAF8 80049EF8 27A40060 */ addiu $a0, $sp, 0x60 /* 04AAFC 80049EFC A4AF0002 */ sh $t7, 2($a1) -/* 04AB00 80049F00 0C01BF0C */ jal func_8006FC30 +/* 04AB00 80049F00 0C01BF0C */ jal object_transform_to_matrix /* 04AB04 80049F04 E4A40008 */ swc1 $f4, 8($a1) /* 04AB08 80049F08 44800000 */ mtc1 $zero, $f0 /* 04AB0C 80049F0C 26180038 */ addiu $t8, $s0, 0x38 @@ -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 sine_s +/* 04C2D4 8004B6D4 0C01C1FE */ jal coss_f /* 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 cosine_s +/* 04C364 8004B764 0C01C1F1 */ jal sins_f /* 04C368 8004B768 E7AC00EC */ swc1 $f12, 0xec($sp) /* 04C36C 8004B76C 820F01E0 */ lb $t7, 0x1e0($s0) /* 04C370 8004B770 C7AC00EC */ lwc1 $f12, 0xec($sp) @@ -2601,7 +2601,7 @@ glabel func_80049794 /* 04C8A8 8004BCA8 E4A0000C */ swc1 $f0, 0xc($a1) /* 04C8AC 8004BCAC E4A00010 */ swc1 $f0, 0x10($a1) /* 04C8B0 8004BCB0 E4A00014 */ swc1 $f0, 0x14($a1) -/* 04C8B4 8004BCB4 0C01BF9D */ jal func_8006FE74 +/* 04C8B4 8004BCB4 0C01BF9D */ jal object_transform_to_matrix_2 /* 04C8B8 8004BCB8 E4AA0008 */ swc1 $f10, 8($a1) /* 04C8BC 8004BCBC 8E25001C */ lw $a1, 0x1c($s1) /* 04C8C0 8004BCC0 8E260020 */ lw $a2, 0x20($s1) diff --git a/asm/non_matchings/racer/func_8004CC20.s b/asm/non_matchings/racer/func_8004CC20.s index 3ebbf811..602fe036 100644 --- a/asm/non_matchings/racer/func_8004CC20.s +++ b/asm/non_matchings/racer/func_8004CC20.s @@ -124,7 +124,7 @@ glabel func_8004CC20 /* 04D9B8 8004CDB8 E4A00010 */ swc1 $f0, 0x10($a1) /* 04D9BC 8004CDBC E4A00014 */ swc1 $f0, 0x14($a1) /* 04D9C0 8004CDC0 A4B90004 */ sh $t9, 4($a1) -/* 04D9C4 8004CDC4 0C01BF0C */ jal func_8006FC30 +/* 04D9C4 8004CDC4 0C01BF0C */ jal object_transform_to_matrix /* 04D9C8 8004CDC8 E4AA0008 */ swc1 $f10, 8($a1) /* 04D9CC 8004CDCC 44800000 */ mtc1 $zero, $f0 /* 04D9D0 8004CDD0 260B0044 */ addiu $t3, $s0, 0x44 @@ -595,7 +595,7 @@ glabel func_8004CC20 /* 04E0B8 8004D4B8 E4AE000C */ swc1 $f14, 0xc($a1) /* 04E0BC 8004D4BC E4AE0010 */ swc1 $f14, 0x10($a1) /* 04E0C0 8004D4C0 E4AE0014 */ swc1 $f14, 0x14($a1) -/* 04E0C4 8004D4C4 0C01BF9D */ jal func_8006FE74 +/* 04E0C4 8004D4C4 0C01BF9D */ jal object_transform_to_matrix_2 /* 04E0C8 8004D4C8 E4A80008 */ swc1 $f8, 8($a1) /* 04E0CC 8004D4CC 8E25001C */ lw $a1, 0x1c($s1) /* 04E0D0 8004D4D0 8E260020 */ lw $a2, 0x20($s1) diff --git a/asm/non_matchings/racer/func_8004F7F4.s b/asm/non_matchings/racer/func_8004F7F4.s index 8d1253ad..46ce336c 100644 --- a/asm/non_matchings/racer/func_8004F7F4.s +++ b/asm/non_matchings/racer/func_8004F7F4.s @@ -569,7 +569,7 @@ glabel func_8004F7F4 /* 050BE0 8004FFE0 E4A0000C */ swc1 $f0, 0xc($a1) /* 050BE4 8004FFE4 E4A00010 */ swc1 $f0, 0x10($a1) /* 050BE8 8004FFE8 E4A00014 */ swc1 $f0, 0x14($a1) -/* 050BEC 8004FFEC 0C01BF9D */ jal func_8006FE74 +/* 050BEC 8004FFEC 0C01BF9D */ jal object_transform_to_matrix_2 /* 050BF0 8004FFF0 E4A40008 */ swc1 $f4, 8($a1) /* 050BF4 8004FFF4 8E050030 */ lw $a1, 0x30($s0) /* 050BF8 8004FFF8 8E07002C */ lw $a3, 0x2c($s0) @@ -795,7 +795,7 @@ glabel func_8004F7F4 /* 050F2C 8005032C A4A80004 */ sh $t0, 4($a1) /* 050F30 80050330 E4A00010 */ swc1 $f0, 0x10($a1) /* 050F34 80050334 E4A00014 */ swc1 $f0, 0x14($a1) -/* 050F38 80050338 0C01BF9D */ jal func_8006FE74 +/* 050F38 80050338 0C01BF9D */ jal object_transform_to_matrix_2 /* 050F3C 8005033C E4A60008 */ swc1 $f6, 8($a1) /* 050F40 80050340 8FA500B8 */ lw $a1, 0xb8($sp) /* 050F44 80050344 8FA700B4 */ lw $a3, 0xb4($sp) diff --git a/asm/non_matchings/racer/func_80050A28.s b/asm/non_matchings/racer/func_80050A28.s index 25800662..16a2a166 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 sine_s +/* 05240C 8005180C 0C01C1FE */ jal coss_f /* 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_80054FD0.s b/asm/non_matchings/racer/func_80054FD0.s index 4285776b..7930b66e 100644 --- a/asm/non_matchings/racer/func_80054FD0.s +++ b/asm/non_matchings/racer/func_80054FD0.s @@ -42,7 +42,7 @@ glabel func_80054FD0 /* 055C50 80055050 00000000 */ nop /* 055C54 80055054 E4AA0010 */ swc1 $f10, 0x10($a1) /* 055C58 80055058 C6240014 */ lwc1 $f4, 0x14($s1) -/* 055C5C 8005505C 0C01BF0C */ jal func_8006FC30 +/* 055C5C 8005505C 0C01BF0C */ jal object_transform_to_matrix /* 055C60 80055060 E4A40014 */ swc1 $f4, 0x14($a1) /* 055C64 80055064 3C038012 */ lui $v1, %hi(D_8011D568) # $v1, 0x8012 /* 055C68 80055068 8C63D568 */ lw $v1, %lo(D_8011D568)($v1) @@ -539,7 +539,7 @@ glabel func_80054FD0 /* 0563B8 800557B8 C6260014 */ lwc1 $f6, 0x14($s1) /* 0563BC 800557BC 00000000 */ nop /* 0563C0 800557C0 46003207 */ neg.s $f8, $f6 -/* 0563C4 800557C4 0C01BF9D */ jal func_8006FE74 +/* 0563C4 800557C4 0C01BF9D */ jal object_transform_to_matrix_2 /* 0563C8 800557C8 E4A80014 */ swc1 $f8, 0x14($a1) /* 0563CC 800557CC 02001025 */ move $v0, $s0 /* 0563D0 800557D0 27A8011C */ addiu $t0, $sp, 0x11c diff --git a/asm/non_matchings/racer/func_80059BF0.s b/asm/non_matchings/racer/func_80059BF0.s index 2a5127d2..3b98e1c4 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 sine_s +/* 05A80C 80059C0C 0C01C1FE */ jal coss_f /* 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 sine_s +/* 05A830 80059C30 0C01C1FE */ jal coss_f /* 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/update_camera_car.s b/asm/non_matchings/racer/update_camera_car.s index 305e4753..75ea23e2 100644 --- a/asm/non_matchings/racer/update_camera_car.s +++ b/asm/non_matchings/racer/update_camera_car.s @@ -321,7 +321,7 @@ glabel update_camera_car /* 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 cosine_s +/* 059260 80058660 0C01C1F1 */ jal sins_f /* 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 update_camera_car /* 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 sine_s +/* 059288 80058688 0C01C1FE */ jal coss_f /* 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 update_camera_car /* 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 cosine_s +/* 0592E0 800586E0 0C01C1F1 */ jal sins_f /* 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 update_camera_car /* 059300 80058700 00000000 */ nop /* 059304 80058704 01492023 */ subu $a0, $t2, $t1 /* 059308 80058708 00045C00 */ sll $t3, $a0, 0x10 -/* 05930C 8005870C 0C01C1FE */ jal sine_s +/* 05930C 8005870C 0C01C1FE */ jal coss_f /* 059310 80058710 000B2403 */ sra $a0, $t3, 0x10 /* 059314 80058714 C7AC0040 */ lwc1 $f12, 0x40($sp) /* 059318 80058718 3C0D8012 */ lui $t5, %hi(gCurrentRacerInput) # $t5, 0x8012 @@ -484,7 +484,7 @@ glabel update_camera_car /* 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 cosine_s +/* 0594D8 800588D8 0C01C1F1 */ jal sins_f /* 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 update_camera_car /* 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 sine_s +/* 0595EC 800589EC 0C01C1FE */ jal coss_f /* 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 update_camera_car /* 0596E8 80058AE8 87040004 */ lh $a0, 4($t8) /* 0596EC 80058AEC 00000000 */ nop .L80058AF0: -/* 0596F0 80058AF0 0C01C1F1 */ jal cosine_s +/* 0596F0 80058AF0 0C01C1F1 */ jal sins_f /* 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/update_camera_plane.s b/asm/non_matchings/racer/update_camera_plane.s index df745e0b..5af11e49 100644 --- a/asm/non_matchings/racer/update_camera_plane.s +++ b/asm/non_matchings/racer/update_camera_plane.s @@ -415,7 +415,7 @@ glabel update_camera_plane /* 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 cosine_s +/* 04D468 8004C868 0C01C1F1 */ jal sins_f /* 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 update_camera_plane /* 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 sine_s +/* 04D490 8004C890 0C01C1FE */ jal coss_f /* 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 update_camera_plane /* 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 cosine_s +/* 04D4E4 8004C8E4 0C01C1F1 */ jal sins_f /* 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 update_camera_plane /* 04D504 8004C904 00000000 */ nop /* 04D508 8004C908 01EC2023 */ subu $a0, $t7, $t4 /* 04D50C 8004C90C 0004C400 */ sll $t8, $a0, 0x10 -/* 04D510 8004C910 0C01C1FE */ jal sine_s +/* 04D510 8004C910 0C01C1FE */ jal coss_f /* 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 update_camera_plane /* 04D52C 8004C92C 00000000 */ nop /* 04D530 8004C930 24844000 */ addiu $a0, $a0, 0x4000 /* 04D534 8004C934 00045C00 */ sll $t3, $a0, 0x10 -/* 04D538 8004C938 0C01C1F1 */ jal cosine_s +/* 04D538 8004C938 0C01C1F1 */ jal sins_f /* 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 update_camera_plane /* 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 sine_s +/* 04D6B0 8004CAB0 0C01C1FE */ jal coss_f /* 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/unknown_005740/func_80005D08.s b/asm/non_matchings/unknown_005740/func_80005D08.s index 5d703855..e24834ba 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 cosine_s +/* 006A84 80005E84 0C01C1F1 */ jal sins_f /* 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 4489b4b6..a7060a0a 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 cosine_s +/* 00740C 8000680C 0C01C1F1 */ jal sins_f /* 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 cosine_s +/* 007420 80006820 0C01C1F1 */ jal sins_f /* 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_005740/func_800090C0.s b/asm/non_matchings/unknown_005740/func_800090C0.s index 63a0e7a5..6a384af7 100644 --- a/asm/non_matchings/unknown_005740/func_800090C0.s +++ b/asm/non_matchings/unknown_005740/func_800090C0.s @@ -30,7 +30,7 @@ glabel func_800090C0 /* 009D30 80009130 00C32023 */ subu $a0, $a2, $v1 /* 009D34 80009134 00047C00 */ sll $t7, $a0, 0x10 /* 009D38 80009138 000F2403 */ sra $a0, $t7, 0x10 -/* 009D3C 8000913C 0C01C20C */ jal func_80070830 +/* 009D3C 8000913C 0C01C20C */ jal sins /* 009D40 80009140 E7A2001C */ swc1 $f2, 0x1c($sp) /* 009D44 80009144 C7A2001C */ lwc1 $f2, 0x1c($sp) /* 009D48 80009148 04410003 */ bgez $v0, .L80009158 @@ -59,7 +59,7 @@ glabel func_800090C0 /* 009DA0 800091A0 10000036 */ b .L8000927C /* 009DA4 800091A4 00000000 */ nop .L800091A8: -/* 009DA8 800091A8 0C01C224 */ jal func_80070890 +/* 009DA8 800091A8 0C01C224 */ jal sins_2 /* 009DAC 800091AC 00092403 */ sra $a0, $t1, 0x10 /* 009DB0 800091B0 04410003 */ bgez $v0, .L800091C0 /* 009DB4 800091B4 00025A83 */ sra $t3, $v0, 0xa @@ -80,7 +80,7 @@ glabel func_800090C0 /* 009DE8 800091E8 00A62023 */ subu $a0, $a1, $a2 /* 009DEC 800091EC 00046C00 */ sll $t5, $a0, 0x10 /* 009DF0 800091F0 000D2403 */ sra $a0, $t5, 0x10 -/* 009DF4 800091F4 0C01C20C */ jal func_80070830 +/* 009DF4 800091F4 0C01C20C */ jal sins /* 009DF8 800091F8 E7A2001C */ swc1 $f2, 0x1c($sp) /* 009DFC 800091FC C7A2001C */ lwc1 $f2, 0x1c($sp) /* 009E00 80009200 04410003 */ bgez $v0, .L80009210 @@ -109,7 +109,7 @@ glabel func_800090C0 /* 009E58 80009258 10000008 */ b .L8000927C /* 009E5C 8000925C 00000000 */ nop .L80009260: -/* 009E60 80009260 0C01C224 */ jal func_80070890 +/* 009E60 80009260 0C01C224 */ jal sins_2 /* 009E64 80009264 00192403 */ sra $a0, $t9, 0x10 /* 009E68 80009268 04410003 */ bgez $v0, .L80009278 /* 009E6C 8000926C 00021A83 */ sra $v1, $v0, 0xa diff --git a/asm/non_matchings/unknown_0255E0/func_8002581C.s b/asm/non_matchings/unknown_0255E0/func_8002581C.s index 44c81062..72dd18db 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 cosine_s +/* 0264E4 800258E4 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 026504 80025904 0C01C1FE */ jal coss_f /* 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_800278E8.s b/asm/non_matchings/unknown_0255E0/func_800278E8.s index 50dc254b..1bb79539 100644 --- a/asm/non_matchings/unknown_0255E0/func_800278E8.s +++ b/asm/non_matchings/unknown_0255E0/func_800278E8.s @@ -157,7 +157,7 @@ glabel func_800278E8 /* 02872C 80027B2C 460071A4 */ cvt.w.s $f6, $f14 /* 028730 80027B30 44053000 */ mfc1 $a1, $f6 /* 028734 80027B34 44CDF800 */ ctc1 $t5, $31 -/* 028738 80027B38 0C01C19B */ jal func_8007066C +/* 028738 80027B38 0C01C19B */ jal atan2s /* 02873C 80027B3C 00000000 */ nop /* 028740 80027B40 8FA30058 */ lw $v1, 0x58($sp) /* 028744 80027B44 00027023 */ negu $t6, $v0 @@ -226,7 +226,7 @@ glabel func_800278E8 /* 02883C 80027C3C 460062A4 */ cvt.w.s $f10, $f12 /* 028840 80027C40 44055000 */ mfc1 $a1, $f10 /* 028844 80027C44 44C8F800 */ ctc1 $t0, $31 -/* 028848 80027C48 0C01C19B */ jal func_8007066C +/* 028848 80027C48 0C01C19B */ jal atan2s /* 02884C 80027C4C 00000000 */ nop /* 028850 80027C50 8FA30058 */ lw $v1, 0x58($sp) /* 028854 80027C54 34018001 */ li $at, 32769 @@ -299,7 +299,7 @@ glabel func_800278E8 /* 028958 80027D58 460071A4 */ cvt.w.s $f6, $f14 /* 02895C 80027D5C 44053000 */ mfc1 $a1, $f6 /* 028960 80027D60 44CEF800 */ ctc1 $t6, $31 -/* 028964 80027D64 0C01C19B */ jal func_8007066C +/* 028964 80027D64 0C01C19B */ jal atan2s /* 028968 80027D68 00000000 */ nop /* 02896C 80027D6C 4448F800 */ cfc1 $t0, $31 /* 028970 80027D70 8FA30058 */ lw $v1, 0x58($sp) @@ -325,7 +325,7 @@ glabel func_800278E8 /* 0289C0 80027DC0 46006124 */ cvt.w.s $f4, $f12 /* 0289C4 80027DC4 44052000 */ mfc1 $a1, $f4 /* 0289C8 80027DC8 44D9F800 */ ctc1 $t9, $31 -/* 0289CC 80027DCC 0C01C19B */ jal func_8007066C +/* 0289CC 80027DCC 0C01C19B */ jal atan2s /* 0289D0 80027DD0 00000000 */ nop /* 0289D4 80027DD4 8FA30058 */ lw $v1, 0x58($sp) /* 0289D8 80027DD8 00000000 */ nop diff --git a/asm/non_matchings/unknown_0255E0/func_80028050.s b/asm/non_matchings/unknown_0255E0/func_80028050.s index 9141be23..49b3c3e5 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 cosine_s +/* 028CBC 800280BC 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 028CD8 800280D8 0C01C1FE */ jal coss_f /* 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_8002DE30.s b/asm/non_matchings/unknown_0255E0/func_8002DE30.s index 7b4289e0..b5c694a0 100644 --- a/asm/non_matchings/unknown_0255E0/func_8002DE30.s +++ b/asm/non_matchings/unknown_0255E0/func_8002DE30.s @@ -209,7 +209,7 @@ glabel func_8002DE30 /* 02ED44 8002E144 01303021 */ addu $a2, $t1, $s0 /* 02ED48 8002E148 00007812 */ mflo $t7 /* 02ED4C 8002E14C 01F0C021 */ addu $t8, $t7, $s0 -/* 02ED50 8002E150 0C01C13C */ jal func_800704F0 +/* 02ED50 8002E150 0C01C13C */ jal point_triangle_2d_xz_intersection /* 02ED54 8002E154 AFB80010 */ sw $t8, 0x10($sp) /* 02ED58 8002E158 8FAA005C */ lw $t2, 0x5c($sp) /* 02ED5C 8002E15C 8FAB0088 */ lw $t3, 0x88($sp) diff --git a/asm/non_matchings/unknown_0255E0/func_8002F440.s b/asm/non_matchings/unknown_0255E0/func_8002F440.s index 1a24097f..59a28c2e 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 cosine_s +/* 03007C 8002F47C 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 030098 8002F498 0C01C1FE */ jal coss_f /* 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_0255E0/func_8002FA64.s b/asm/non_matchings/unknown_0255E0/func_8002FA64.s index 321cafeb..06ef3397 100644 --- a/asm/non_matchings/unknown_0255E0/func_8002FA64.s +++ b/asm/non_matchings/unknown_0255E0/func_8002FA64.s @@ -148,7 +148,7 @@ glabel func_8002FA64 /* 030874 8002FC74 4600F386 */ mov.s $f14, $f30 /* 030878 8002FC78 E7B40010 */ swc1 $f20, 0x10($sp) /* 03087C 8002FC7C E7B60014 */ swc1 $f22, 0x14($sp) -/* 030880 8002FC80 0C01C28B */ jal func_80070A2C +/* 030880 8002FC80 0C01C28B */ jal area_triangle_2d /* 030884 8002FC84 E7A20074 */ swc1 $f2, 0x74($sp) /* 030888 8002FC88 866A000A */ lh $t2, 0xa($s3) /* 03088C 8002FC8C 926D0000 */ lbu $t5, ($s3) diff --git a/asm/non_matchings/unknown_032760/func_80032424.s b/asm/non_matchings/unknown_032760/func_80032424.s index e0c50118..afb2c89b 100644 --- a/asm/non_matchings/unknown_032760/func_80032424.s +++ b/asm/non_matchings/unknown_032760/func_80032424.s @@ -20,7 +20,7 @@ glabel func_80032424 /* 03306C 8003246C E48A0014 */ swc1 $f10, 0x14($a0) /* 033070 80032470 E4920018 */ swc1 $f18, 0x18($a0) /* 033074 80032474 AFA60048 */ sw $a2, 0x48($sp) -/* 033078 80032478 0C01C0C8 */ jal func_80070320 +/* 033078 80032478 0C01C0C8 */ jal f32_vec3_apply_object_rotation /* 03307C 8003247C 00E02025 */ move $a0, $a3 /* 033080 80032480 8FA60048 */ lw $a2, 0x48($sp) /* 033084 80032484 240B0001 */ li $t3, 1 @@ -484,7 +484,7 @@ glabel func_80032424 /* 033738 80032B38 84CF0072 */ lh $t7, 0x72($a2) /* 03373C 80032B3C A7A00044 */ sh $zero, 0x44($sp) /* 033740 80032B40 AFA60048 */ sw $a2, 0x48($sp) -/* 033744 80032B44 0C01C124 */ jal func_80070490 +/* 033744 80032B44 0C01C124 */ jal f32_vec3_apply_object_rotation3 /* 033748 80032B48 A7AF0042 */ sh $t7, 0x42($sp) /* 03374C 80032B4C 8FA60048 */ lw $a2, 0x48($sp) /* 033750 80032B50 02002825 */ move $a1, $s0 @@ -492,7 +492,7 @@ glabel func_80032424 /* 033758 80032B58 00000000 */ nop /* 03375C 80032B5C 10E00005 */ beqz $a3, .L80032B74 /* 033760 80032B60 00E02025 */ move $a0, $a3 -/* 033764 80032B64 0C01C0C8 */ jal func_80070320 +/* 033764 80032B64 0C01C0C8 */ jal f32_vec3_apply_object_rotation /* 033768 80032B68 AFA60048 */ sw $a2, 0x48($sp) /* 03376C 80032B6C 8FA60048 */ lw $a2, 0x48($sp) /* 033770 80032B70 00000000 */ nop diff --git a/asm/non_matchings/unknown_032760/func_80036040.s b/asm/non_matchings/unknown_032760/func_80036040.s index c54cd217..7555386d 100644 --- a/asm/non_matchings/unknown_032760/func_80036040.s +++ b/asm/non_matchings/unknown_032760/func_80036040.s @@ -52,7 +52,7 @@ glabel func_80036040 /* 036D08 80036108 C4520014 */ lwc1 $f18, 0x14($v0) /* 036D0C 8003610C AFA20090 */ sw $v0, 0x90($sp) /* 036D10 80036110 46009107 */ neg.s $f4, $f18 -/* 036D14 80036114 0C01BF9D */ jal func_8006FE74 +/* 036D14 80036114 0C01BF9D */ jal object_transform_to_matrix_2 /* 036D18 80036118 E7A4004C */ swc1 $f4, 0x4c($sp) /* 036D1C 8003611C 8E05000C */ lw $a1, 0xc($s0) /* 036D20 80036120 8E060010 */ lw $a2, 0x10($s0) diff --git a/asm/non_matchings/unknown_032760/func_8003E694.s b/asm/non_matchings/unknown_032760/func_8003E694.s index 66a88382..cb6dce49 100644 --- a/asm/non_matchings/unknown_032760/func_8003E694.s +++ b/asm/non_matchings/unknown_032760/func_8003E694.s @@ -34,7 +34,7 @@ glabel func_8003E694 /* 03F300 8003E700 E7A0004C */ swc1 $f0, 0x4c($sp) /* 03F304 8003E704 E7A00050 */ swc1 $f0, 0x50($sp) /* 03F308 8003E708 E7AA0044 */ swc1 $f10, 0x44($sp) -/* 03F30C 8003E70C 0C01BF0C */ jal func_8006FC30 +/* 03F30C 8003E70C 0C01BF0C */ jal object_transform_to_matrix /* 03F310 8003E710 A7B9003E */ sh $t9, 0x3e($sp) /* 03F314 8003E714 44800000 */ mtc1 $zero, $f0 /* 03F318 8003E718 8E270010 */ lw $a3, 0x10($s1) @@ -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 cosine_s +/* 03F78C 8003EB8C 0C01C1F1 */ jal sins_f /* 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 8b6a5401..8e4df33e 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 cosine_s +/* 037960 80036D60 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 03797C 80036D7C 0C01C1FE */ jal coss_f /* 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 cosine_s +/* 037998 80036D98 0C01C1F1 */ jal sins_f /* 03799C 80036D9C 00000000 */ nop /* 0379A0 80036DA0 86040104 */ lh $a0, 0x104($s0) -/* 0379A4 80036DA4 0C01C1FE */ jal sine_s +/* 0379A4 80036DA4 0C01C1FE */ jal coss_f /* 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 ecee1455..f4df7cdd 100644 --- a/asm/non_matchings/unknown_032760/obj_init_midifade.s +++ b/asm/non_matchings/unknown_032760/obj_init_midifade.s @@ -44,7 +44,7 @@ glabel obj_init_midifade /* 042734 80041B34 E7B400EC */ swc1 $f20, 0xec($sp) /* 042738 80041B38 E7B400F0 */ swc1 $f20, 0xf0($sp) /* 04273C 80041B3C E7B400F4 */ swc1 $f20, 0xf4($sp) -/* 042740 80041B40 0C01BF0C */ jal func_8006FC30 +/* 042740 80041B40 0C01BF0C */ jal object_transform_to_matrix /* 042744 80041B44 A7AD00E4 */ sh $t5, 0xe4($sp) /* 042748 80041B48 4405A000 */ mfc1 $a1, $f20 /* 04274C 80041B4C 4406A000 */ mfc1 $a2, $f20 @@ -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 sine_s +/* 04294C 80041D4C 0C01C1FE */ jal coss_f /* 042950 80041D50 AFA800FC */ sw $t0, 0xfc($sp) /* 042954 80041D54 E7A00068 */ swc1 $f0, 0x68($sp) /* 042958 80041D58 86040000 */ lh $a0, ($s0) -/* 04295C 80041D5C 0C01C1F1 */ jal cosine_s +/* 04295C 80041D5C 0C01C1F1 */ jal sins_f /* 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 b05623a7..346eb7a5 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 cosine_s +/* 04254C 8004194C 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 04256C 8004196C 0C01C1FE */ jal coss_f /* 042570 80041970 E604001C */ swc1 $f4, 0x1c($s0) /* 042574 80041974 8FA8003C */ lw $t0, 0x3c($sp) /* 042578 80041978 8E05001C */ lw $a1, 0x1c($s0) @@ -952,7 +952,7 @@ glabel L8004153C /* 0425F8 800419F8 00AB2004 */ sllv $a0, $t3, $a1 /* 0425FC 800419FC 0004CC00 */ sll $t9, $a0, 0x10 /* 042600 80041A00 00192403 */ sra $a0, $t9, 0x10 -/* 042604 80041A04 0C01C20C */ jal func_80070830 +/* 042604 80041A04 0C01C20C */ jal sins /* 042608 80041A08 A7A50076 */ sh $a1, 0x76($sp) /* 04260C 80041A0C 87A50076 */ lh $a1, 0x76($sp) /* 042610 80041A10 860D0018 */ lh $t5, 0x18($s0) @@ -960,7 +960,7 @@ glabel L8004153C /* 042618 80041A18 00AD2004 */ sllv $a0, $t5, $a1 /* 04261C 80041A1C 00047C00 */ sll $t7, $a0, 0x10 /* 042620 80041A20 000F2403 */ sra $a0, $t7, 0x10 -/* 042624 80041A24 0C01C20B */ jal func_8007082C +/* 042624 80041A24 0C01C20B */ jal coss /* 042628 80041A28 AFA3006C */ sw $v1, 0x6c($sp) /* 04262C 80041A2C 8FA3006C */ lw $v1, 0x6c($sp) /* 042630 80041A30 8FA60040 */ lw $a2, 0x40($sp) diff --git a/asm/non_matchings/unknown_032760/obj_loop_effectbox.s b/asm/non_matchings/unknown_032760/obj_loop_effectbox.s index 6c6c568d..38c9779f 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 sine_s +/* 0357E0 80034BE0 0C01C1FE */ jal coss_f /* 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 cosine_s +/* 0357FC 80034BFC 0C01C1F1 */ jal sins_f /* 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 709dd655..8be289b2 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 cosine_s +/* 037EA0 800372A0 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 037EB4 800372B4 0C01C1FE */ jal coss_f /* 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 cosine_s +/* 037EC8 800372C8 0C01C1F1 */ jal sins_f /* 037ECC 800372CC E7A20064 */ swc1 $f2, 0x64($sp) /* 037ED0 800372D0 86040104 */ lh $a0, 0x104($s0) -/* 037ED4 800372D4 0C01C1FE */ jal sine_s +/* 037ED4 800372D4 0C01C1FE */ jal coss_f /* 037ED8 800372D8 E7A0004C */ swc1 $f0, 0x4c($sp) /* 037EDC 800372DC C7AE006C */ lwc1 $f14, 0x6c($sp) /* 037EE0 800372E0 C7A20064 */ lwc1 $f2, 0x64($sp) @@ -256,12 +256,12 @@ glabel obj_loop_fish /* 03809C 8003749C A20A00FC */ sb $t2, 0xfc($s0) /* 0380A0 800374A0 24630080 */ addiu $v1, $v1, 0x80 /* 0380A4 800374A4 86040106 */ lh $a0, 0x106($s0) -/* 0380A8 800374A8 0C01C20C */ jal func_80070830 +/* 0380A8 800374A8 0C01C20C */ jal sins /* 0380AC 800374AC AFA30028 */ sw $v1, 0x28($sp) /* 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 sine_s +/* 0380BC 800374BC 0C01C1FE */ jal coss_f /* 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 cosine_s +/* 038100 80037500 0C01C1F1 */ jal sins_f /* 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 3cb78798..f1176f9e 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 cosine_s +/* 04315C 8004255C 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 043170 80042570 0C01C1FE */ jal coss_f /* 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 sine_s +/* 043320 80042720 0C01C1FE */ jal coss_f /* 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_lasergun.s b/asm/non_matchings/unknown_032760/obj_loop_lasergun.s index 17f91987..f2646e2d 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_lasergun.s +++ b/asm/non_matchings/unknown_032760/obj_loop_lasergun.s @@ -140,7 +140,7 @@ glabel obj_loop_lasergun /* 0353C0 800347C0 A7A000A8 */ sh $zero, 0xa8($sp) /* 0353C4 800347C4 AFA200C0 */ sw $v0, 0xc0($sp) /* 0353C8 800347C8 27A500A4 */ addiu $a1, $sp, 0xa4 -/* 0353CC 800347CC 0C01BF0C */ jal func_8006FC30 +/* 0353CC 800347CC 0C01BF0C */ jal object_transform_to_matrix /* 0353D0 800347D0 A7B800A6 */ sh $t8, 0xa6($sp) /* 0353D4 800347D4 8239000E */ lb $t9, 0xe($s1) /* 0353D8 800347D8 3C0141F0 */ li $at, 0x41F00000 # 30.000000 diff --git a/asm/non_matchings/unknown_032760/obj_loop_log.s b/asm/non_matchings/unknown_032760/obj_loop_log.s index 0f38a6d3..4cc36b89 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 cosine_s +/* 041268 80040668 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 041288 80040688 0C01C1FE */ jal coss_f /* 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 600f71ee..1e178050 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 cosine_s +/* 03A4E0 800398E0 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 03A4F4 800398F4 0C01C1FE */ jal coss_f /* 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 cosine_s +/* 03B340 8003A740 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 03B35C 8003A75C 0C01C1FE */ jal coss_f /* 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 c4376f49..f724065c 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 cosine_s +/* 03727C 8003667C 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 037290 80036690 0C01C1FE */ jal coss_f /* 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/unknown_032760/obj_loop_wizpigship.s b/asm/non_matchings/unknown_032760/obj_loop_wizpigship.s index fe6292d8..9dd98d02 100644 --- a/asm/non_matchings/unknown_032760/obj_loop_wizpigship.s +++ b/asm/non_matchings/unknown_032760/obj_loop_wizpigship.s @@ -47,7 +47,7 @@ glabel obj_loop_wizpigship /* 038A24 80037E24 114000A4 */ beqz $t2, .L800380B8 /* 038A28 80037E28 27A400CC */ addiu $a0, $sp, 0xcc /* 038A2C 80037E2C AE0B007C */ sw $t3, 0x7c($s0) -/* 038A30 80037E30 0C01BF0C */ jal func_8006FC30 +/* 038A30 80037E30 0C01BF0C */ jal object_transform_to_matrix /* 038A34 80037E34 02002825 */ move $a1, $s0 /* 038A38 80037E38 4480A000 */ mtc1 $zero, $f20 /* 038A3C 80037E3C 3C013F80 */ li $at, 0x3F800000 # 1.000000 @@ -63,7 +63,7 @@ glabel obj_loop_wizpigship /* 038A64 80037E64 A7A00070 */ sh $zero, 0x70($sp) /* 038A68 80037E68 02802025 */ move $a0, $s4 /* 038A6C 80037E6C 27A5006C */ addiu $a1, $sp, 0x6c -/* 038A70 80037E70 0C01BF0C */ jal func_8006FC30 +/* 038A70 80037E70 0C01BF0C */ jal object_transform_to_matrix /* 038A74 80037E74 A7AD006E */ sh $t5, 0x6e($sp) /* 038A78 80037E78 8E020060 */ lw $v0, 0x60($s0) /* 038A7C 80037E7C 00008825 */ move $s1, $zero diff --git a/asm/non_matchings/waves/func_800B82B4.s b/asm/non_matchings/waves/func_800B82B4.s index 58be6380..09611194 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 cosine_s +/* 0B9130 800B8530 0C01C1F1 */ jal sins_f /* 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 cosine_s +/* 0B9144 800B8544 0C01C1F1 */ jal sins_f /* 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 a717fb78..eade32aa 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 cosine_s +/* 0BD334 800BC734 0C01C1F1 */ jal sins_f /* 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 4e7a97cd..39c5e166 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 sine_s +/* 0BFF38 800BF338 0C01C1FE */ jal coss_f /* 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 cosine_s +/* 0BFF4C 800BF34C 0C01C1F1 */ jal sins_f /* 0BFF50 800BF350 01E02025 */ move $a0, $t7 /* 0BFF54 800BF354 C62A0024 */ lwc1 $f10, 0x24($s1) /* 0BFF58 800BF358 00000000 */ nop diff --git a/asm/unknown_0251F0/calc_dynamic_lighting_for_object_2.s b/asm/unknown_0251F0/calc_dynamic_lighting_for_object_2.s index 79b245e5..68bd5902 100644 --- a/asm/unknown_0251F0/calc_dynamic_lighting_for_object_2.s +++ b/asm/unknown_0251F0/calc_dynamic_lighting_for_object_2.s @@ -32,7 +32,7 @@ glabel calc_dynamic_lighting_for_object_2 /* 0253BC 800247BC 00000000 */ nop /* 0253C0 800247C0 27A50010 */ addiu $a1, $sp, 0x10 /* 0253C4 800247C4 00402025 */ move $a0, $v0 -/* 0253C8 800247C8 0C01BDBB */ jal func_8006F6EC +/* 0253C8 800247C8 0C01BDBB */ jal f32_matrix_dot /* 0253CC 800247CC 00A03025 */ move $a2, $a1 .L800247D0: /* 0253D0 800247D0 86080000 */ lh $t0, ($s0) @@ -52,11 +52,11 @@ glabel calc_dynamic_lighting_for_object_2 /* 025408 80024808 A70A0004 */ sh $t2, 4($t8) /* 02540C 8002480C AF030010 */ sw $v1, 0x10($t8) /* 025410 80024810 AF030014 */ sw $v1, 0x14($t8) -/* 025414 80024814 0C01BF9D */ jal func_8006FE74 +/* 025414 80024814 0C01BF9D */ jal object_transform_to_matrix_2 /* 025418 80024818 03002825 */ move $a1, $t8 /* 02541C 8002481C 27A50010 */ addiu $a1, $sp, 0x10 /* 025420 80024820 27A40034 */ addiu $a0, $sp, 0x34 -/* 025424 80024824 0C01BDBB */ jal func_8006F6EC +/* 025424 80024824 0C01BDBB */ jal f32_matrix_dot /* 025428 80024828 00A03025 */ move $a2, $a1 /* 02542C 8002482C 8E190054 */ lw $t9, 0x54($s0) /* 025430 80024830 44933000 */ mtc1 $s3, $f6 diff --git a/asm/unknown_070110.s b/asm/unknown_070110.s index 1eb78bf4..c35dff6c 100644 --- a/asm/unknown_070110.s +++ b/asm/unknown_070110.s @@ -9,45 +9,45 @@ .set noreorder # dont insert nops after branches .set gp=64 # 64-bit instructions are used -.include "asm/unknown_070110/func_8006F510.s" # If D_800DD430 != 0 THEN Set an interrupt? -.include "asm/unknown_070110/func_8006F53C.s" # If D_800DD430 != 0 THEN __osRestoreInt - void func_8006F53C(u32); -.include "asm/unknown_070110/func_8006F564.s" # Set D_800DD430 -.include "asm/unknown_070110/func_8006F570.s" # UNUSED - Get D_800DD430 -.include "asm/unknown_070110/func_8006F57C.s" # UNUSED -.include "asm/unknown_070110/func_8006F5E0.s" +.include "asm/unknown_070110/clear_status_register_flags.s" # If D_800DD430 != 0 THEN Set an interrupt? +.include "asm/unknown_070110/set_status_register_flags.s" # If D_800DD430 != 0 THEN __osRestoreInt - void set_status_register_flags(u32); +.include "asm/unknown_070110/set_D_800DD430.s" # Set D_800DD430 +.include "asm/unknown_070110/get_D_800DD430.s" # UNUSED - Get D_800DD430 +.include "asm/unknown_070110/s32_matrix_to_s16_matrix.s" # UNUSED +.include "asm/unknown_070110/f32_matrix_to_s32_matrix.s" .include "asm/unknown_070110/guMtxXFMF.s" # It's possible the funcs from this point and above are unidentified libultra -.include "asm/unknown_070110/func_8006F6EC.s" # Floating Point Matrix Math -.include "asm/unknown_070110/func_8006F768.s" # Floating Point Matrix Math -.include "asm/unknown_070110/func_8006F870.s" # Floating Point Matrix Math +.include "asm/unknown_070110/f32_matrix_dot.s" # Floating Point Matrix Math +.include "asm/unknown_070110/f32_matrix_mult.s" # Floating Point Matrix Math +.include "asm/unknown_070110/f32_matrix_to_s16_matrix.s" # Floating Point Matrix Math .include "asm/unknown_070110/rng.s" -.include "asm/unknown_070110/func_8006F9B8.s" # 16 bit Matrix Math? -.include "asm/unknown_070110/func_8006FA40.s" # 16 bit a0 struct/array to 32 bit a1? UNUSED? -.include "asm/unknown_070110/func_8006FA78.s" # UNUSED -.include "asm/unknown_070110/func_8006FB60.s" # -.include "asm/unknown_070110/func_8006FC30.s" # Floating Point Matrix and ObjectTransform * -.include "asm/unknown_070110/func_8006FE04.s" -.include "asm/unknown_070110/func_8006FE30.s" -.include "asm/unknown_070110/func_8006FE74.s" -.include "asm/unknown_070110/func_80070130.s" -.include "asm/unknown_070110/func_800701E4.s" -.include "asm/unknown_070110/func_80070320.s" -.include "asm/unknown_070110/func_800703D8.s" -.include "asm/unknown_070110/func_80070490.s" -.include "asm/unknown_070110/func_800704F0.s" -.include "asm/unknown_070110/func_800705F8.s" # Floating Point Matrix Values -.include "asm/unknown_070110/func_80070638.s" -.include "asm/unknown_070110/func_8007066C.s" +.include "asm/unknown_070110/s16_matrix_rotate.s" # 16 bit Matrix Math? +.include "asm/unknown_070110/s16_matrix_to_s32_matrix.s" # 16 bit a0 struct/array to 32 bit a1? UNUSED? +.include "asm/unknown_070110/s16_vec3_mult_by_s32_matrix_full.s" # UNUSED +.include "asm/unknown_070110/s16_vec3_mult_by_s32_matrix.s" # +.include "asm/unknown_070110/object_transform_to_matrix.s" # Floating Point Matrix and ObjectTransform * +.include "asm/unknown_070110/f32_matrix_scale.s" +.include "asm/unknown_070110/f32_matrix_y_scale.s" +.include "asm/unknown_070110/object_transform_to_matrix_2.s" +.include "asm/unknown_070110/f32_matrix_from_rotation_and_scale.s" +.include "asm/unknown_070110/s16_vec3_apply_object_rotation.s" +.include "asm/unknown_070110/f32_vec3_apply_object_rotation.s" +.include "asm/unknown_070110/f32_vec3_apply_object_rotation2.s" +.include "asm/unknown_070110/f32_vec3_apply_object_rotation3.s" +.include "asm/unknown_070110/point_triangle_2d_xz_intersection.s" +.include "asm/unknown_070110/f32_matrix_from_position.s" # Floating Point Matrix Values +.include "asm/unknown_070110/f32_matrix_from_scale.s" +.include "asm/unknown_070110/atan2s.s" .include "asm/unknown_070110/arctan2_f.s" -.include "asm/unknown_070110/func_80070780.s" # UNUSED -.include "asm/unknown_070110/func_800707AC.s" # UNUSED Run a sqrtf on a 32 bit int? -.include "asm/unknown_070110/cosine_s.s" -.include "asm/unknown_070110/sine_s.s" -.include "asm/unknown_070110/func_8007082C.s" # Weird case of one function with two entrance points. Sinewave related? Includes: func_80070830 -.include "asm/unknown_070110/func_80070890.s" # Similar to above, and has UNUSED func_8007088C -.include "asm/unknown_070110/func_800708D0.s" # UNUSED -.include "asm/unknown_070110/func_80070A2C.s" # Floating Point Math with sqrt +.include "asm/unknown_070110/s32_matrix_cell_sqrt.s" # UNUSED +.include "asm/unknown_070110/bad_int_sqrt.s" # UNUSED Run a sqrtf on a 32 bit int? +.include "asm/unknown_070110/sins_f.s" +.include "asm/unknown_070110/coss_f.s" +.include "asm/unknown_070110/coss.s" # Weird case of one function with two entrance points. Sinewave related? Includes: sins +.include "asm/unknown_070110/sins_2.s" # Similar to above, and has UNUSED coss_2 +.include "asm/unknown_070110/calc_dyn_lighting_for_level_segment.s" # UNUSED +.include "asm/unknown_070110/area_triangle_2d.s" # Floating Point Math with sqrt .include "asm/unknown_070110/set_breakpoint.s" # UNUSED - -.include "asm/unknown_070110/func_80070B04.s" # Uses mips3 instructions to copy data from s64 values arg0 to arg1 in a loop +.include "asm/unknown_070110/dmacopy2.s" # Uses mips3 instructions to copy data from s64 values arg0 to arg1 in a loop .section .data diff --git a/asm/unknown_070110/arctan2_f.s b/asm/unknown_070110/arctan2_f.s index 5dc6bcdb..3ed872de 100644 --- a/asm/unknown_070110/arctan2_f.s +++ b/asm/unknown_070110/arctan2_f.s @@ -9,5 +9,5 @@ glabel arctan2_f /* 07136C 8007076C 460073A4 */ cvt.w.s $f14, $f14 /* 071370 80070770 44046000 */ mfc1 $a0, $f12 /* 071374 80070774 44057000 */ mfc1 $a1, $f14 -/* 071378 80070778 0801C19B */ j func_8007066C # Does not do a jr in this func, but lets the jumped to function do it. +/* 071378 80070778 0801C19B */ j atan2s # Does not do a jr in this func, but lets the jumped to function do it. /* 07137C 8007077C 00000000 */ nop diff --git a/asm/unknown_070110/func_80070A2C.s b/asm/unknown_070110/area_triangle_2d.s similarity index 98% rename from asm/unknown_070110/func_80070A2C.s rename to asm/unknown_070110/area_triangle_2d.s index 16c22d40..6c35cfde 100644 --- a/asm/unknown_070110/func_80070A2C.s +++ b/asm/unknown_070110/area_triangle_2d.s @@ -1,4 +1,4 @@ -glabel func_80070A2C +glabel area_triangle_2d /* 07162C 80070A2C 44862000 */ mtc1 $a2, $f4 /* 071630 80070A30 46006006 */ mov.s $f0, $f12 /* 071634 80070A34 44873000 */ mtc1 $a3, $f6 diff --git a/asm/unknown_070110/func_8007066C.s b/asm/unknown_070110/atan2s.s similarity index 99% rename from asm/unknown_070110/func_8007066C.s rename to asm/unknown_070110/atan2s.s index 97e6f992..fa98eb9d 100644 --- a/asm/unknown_070110/func_8007066C.s +++ b/asm/unknown_070110/atan2s.s @@ -1,4 +1,4 @@ -glabel func_8007066C +glabel atan2s /* 07126C 8007066C 00854025 */ or $t0, $a0, $a1 /* 071270 80070670 14080003 */ bne $zero, $t0, .L80070680 /* 071274 80070674 00000000 */ nop diff --git a/asm/unknown_070110/func_800707AC.s b/asm/unknown_070110/bad_int_sqrt.s similarity index 92% rename from asm/unknown_070110/func_800707AC.s rename to asm/unknown_070110/bad_int_sqrt.s index 3a2b5099..c4ebf9d3 100644 --- a/asm/unknown_070110/func_800707AC.s +++ b/asm/unknown_070110/bad_int_sqrt.s @@ -1,4 +1,4 @@ -glabel func_800707AC +glabel bad_int_sqrt /* 0713AC 800707AC 44840000 */ mtc1 $a0, $f0 /* 0713B0 800707B0 00000000 */ nop /* 0713B4 800707B4 46000004 */ sqrt.s $f0, $f0 diff --git a/asm/unknown_070110/func_800708D0.s b/asm/unknown_070110/calc_dyn_lighting_for_level_segment.s similarity index 95% rename from asm/unknown_070110/func_800708D0.s rename to asm/unknown_070110/calc_dyn_lighting_for_level_segment.s index 29411c30..beb85c76 100644 --- a/asm/unknown_070110/func_800708D0.s +++ b/asm/unknown_070110/calc_dyn_lighting_for_level_segment.s @@ -1,4 +1,4 @@ -glabel func_800708D0 +glabel calc_dyn_lighting_for_level_segment /* 0714D0 800708D0 8CA90000 */ lw $t1, ($a1) /* 0714D4 800708D4 8CAA0004 */ lw $t2, 4($a1) /* 0714D8 800708D8 8CAB0008 */ lw $t3, 8($a1) @@ -82,8 +82,8 @@ glabel func_800708D0 /* 071600 80070A00 00000000 */ nop # Unused and a bit of a weird case. -# It blends into func_800708D0 if t0 != 0, -# and func_800708D0 can jump into this from instruction 2 +# It blends into calc_dyn_lighting_for_level_segment if t0 != 0, +# and calc_dyn_lighting_for_level_segment can jump into this from instruction 2 glabel func_80070A04 /* 071604 80070A04 94CC0002 */ lhu $t4, 2($a2) .L80070A08: diff --git a/asm/unknown_070110/func_8006F510.s b/asm/unknown_070110/clear_status_register_flags.s similarity index 94% rename from asm/unknown_070110/func_8006F510.s rename to asm/unknown_070110/clear_status_register_flags.s index e2417b69..d0296317 100644 --- a/asm/unknown_070110/func_8006F510.s +++ b/asm/unknown_070110/clear_status_register_flags.s @@ -1,4 +1,4 @@ -glabel func_8006F510 +glabel clear_status_register_flags /* 070110 8006F510 3C08800E */ lui $t0, %hi(D_800DD430) # $t0, 0x800e /* 070114 8006F514 8108D430 */ lb $t0, %lo(D_800DD430)($t0) /* 070118 8006F518 11000006 */ beqz $t0, .L8006F534 diff --git a/asm/unknown_070110/func_8007082C.s b/asm/unknown_070110/coss.s similarity index 96% rename from asm/unknown_070110/func_8007082C.s rename to asm/unknown_070110/coss.s index 0f8a0e6c..b3de160e 100644 --- a/asm/unknown_070110/func_8007082C.s +++ b/asm/unknown_070110/coss.s @@ -1,6 +1,6 @@ -glabel func_8007082C +glabel coss /* 07142C 8007082C 24844000 */ addiu $a0, $a0, 0x4000 -glabel func_80070830 +glabel sins /* 071430 80070830 00041440 */ sll $v0, $a0, 0x11 /* 071434 80070834 04430003 */ bgezl $v0, .L80070844 /* 071438 80070838 000450C2 */ srl $t2, $a0, 3 diff --git a/asm/unknown_070110/sine_s.s b/asm/unknown_070110/coss_f.s similarity index 89% rename from asm/unknown_070110/sine_s.s rename to asm/unknown_070110/coss_f.s index d09edd66..a499f1fd 100644 --- a/asm/unknown_070110/sine_s.s +++ b/asm/unknown_070110/coss_f.s @@ -1,7 +1,7 @@ -glabel sine_s +glabel coss_f /* 0713F8 800707F8 27BDFFF8 */ addiu $sp, $sp, -8 /* 0713FC 800707FC FFBF0000 */ sd $ra, ($sp) -/* 071400 80070800 0C01C20B */ jal func_8007082C +/* 071400 80070800 0C01C20B */ jal coss /* 071404 80070804 00000000 */ nop /* 071408 80070808 44820000 */ mtc1 $v0, $f0 /* 07140C 8007080C 3C013780 */ li $at, 0x37800000 # 0.000015 diff --git a/asm/unknown_070110/func_80070B04.s b/asm/unknown_070110/dmacopy2.s similarity index 93% rename from asm/unknown_070110/func_80070B04.s rename to asm/unknown_070110/dmacopy2.s index 3ad9426a..62a49b42 100644 --- a/asm/unknown_070110/func_80070B04.s +++ b/asm/unknown_070110/dmacopy2.s @@ -1,4 +1,4 @@ -glabel func_80070B04 +glabel dmacopy2 .L80070B04: /* 071704 80070B04 DC880000 */ ld $t0, ($a0) /* 071708 80070B08 DC890008 */ ld $t1, 8($a0) diff --git a/asm/unknown_070110/func_8006F6EC.s b/asm/unknown_070110/f32_matrix_dot.s similarity index 98% rename from asm/unknown_070110/func_8006F6EC.s rename to asm/unknown_070110/f32_matrix_dot.s index 51d157a3..fbd5bc4a 100644 --- a/asm/unknown_070110/func_8006F6EC.s +++ b/asm/unknown_070110/f32_matrix_dot.s @@ -1,4 +1,4 @@ -glabel func_8006F6EC +glabel f32_matrix_dot /* 0702EC 8006F6EC C4A40000 */ lwc1 $f4, ($a1) /* 0702F0 8006F6F0 C48A0000 */ lwc1 $f10, ($a0) /* 0702F4 8006F6F4 C4A60004 */ lwc1 $f6, 4($a1) diff --git a/asm/unknown_070110/func_800705F8.s b/asm/unknown_070110/f32_matrix_from_position.s similarity index 96% rename from asm/unknown_070110/func_800705F8.s rename to asm/unknown_070110/f32_matrix_from_position.s index 060d403c..903b1df0 100644 --- a/asm/unknown_070110/func_800705F8.s +++ b/asm/unknown_070110/f32_matrix_from_position.s @@ -1,4 +1,4 @@ -glabel func_800705F8 +glabel f32_matrix_from_position /* 0711F8 800705F8 00804025 */ move $t0, $a0 /* 0711FC 800705FC 25090040 */ addiu $t1, $t0, 0x40 .L80070600: diff --git a/asm/unknown_070110/func_80070130.s b/asm/unknown_070110/f32_matrix_from_rotation_and_scale.s similarity index 94% rename from asm/unknown_070110/func_80070130.s rename to asm/unknown_070110/f32_matrix_from_rotation_and_scale.s index f81a65f7..5afd9283 100644 --- a/asm/unknown_070110/func_80070130.s +++ b/asm/unknown_070110/f32_matrix_from_rotation_and_scale.s @@ -1,17 +1,17 @@ -glabel func_80070130 +glabel f32_matrix_from_rotation_and_scale /* 070D30 80070130 27BDFFF8 */ addiu $sp, $sp, -8 /* 070D34 80070134 00E0C825 */ move $t9, $a3 /* 070D38 80070138 3C013780 */ li $at, 0x37800000 # 0.000015 /* 070D3C 8007013C FFBF0000 */ sd $ra, ($sp) /* 070D40 80070140 00803825 */ move $a3, $a0 /* 070D44 80070144 44819000 */ mtc1 $at, $f18 -/* 070D48 80070148 0C01C20C */ jal func_80070830 +/* 070D48 80070148 0C01C20C */ jal sins /* 070D4C 8007014C 00A02025 */ move $a0, $a1 /* 070D50 80070150 44824000 */ mtc1 $v0, $f8 /* 070D54 80070154 00A02025 */ move $a0, $a1 /* 070D58 80070158 46804220 */ cvt.s.w $f8, $f8 /* 070D5C 8007015C 46124202 */ mul.s $f8, $f8, $f18 -/* 070D60 80070160 0C01C20B */ jal func_8007082C +/* 070D60 80070160 0C01C20B */ jal coss /* 070D64 80070164 00000000 */ nop /* 070D68 80070168 44825000 */ mtc1 $v0, $f10 /* 070D6C 8007016C 44868000 */ mtc1 $a2, $f16 diff --git a/asm/unknown_070110/func_80070638.s b/asm/unknown_070110/f32_matrix_from_scale.s similarity index 95% rename from asm/unknown_070110/func_80070638.s rename to asm/unknown_070110/f32_matrix_from_scale.s index e094ca48..c481ce5e 100644 --- a/asm/unknown_070110/func_80070638.s +++ b/asm/unknown_070110/f32_matrix_from_scale.s @@ -1,4 +1,4 @@ -glabel func_80070638 +glabel f32_matrix_from_scale /* 071238 80070638 00804025 */ move $t0, $a0 /* 07123C 8007063C 25090040 */ addiu $t1, $t0, 0x40 .L80070640: diff --git a/asm/unknown_070110/func_8006F768.s b/asm/unknown_070110/f32_matrix_mult.s similarity index 99% rename from asm/unknown_070110/func_8006F768.s rename to asm/unknown_070110/f32_matrix_mult.s index 2367d2fc..2de278f3 100644 --- a/asm/unknown_070110/func_8006F768.s +++ b/asm/unknown_070110/f32_matrix_mult.s @@ -1,4 +1,4 @@ -glabel func_8006F768 +glabel f32_matrix_mult /* 070368 8006F768 27BDFFF8 */ addiu $sp, $sp, -8 /* 07036C 8006F76C F7A20000 */ sdc1 $f2, ($sp) /* 070370 8006F770 34080004 */ ori $t0, $zero, 4 diff --git a/asm/unknown_070110/func_8006FE04.s b/asm/unknown_070110/f32_matrix_scale.s similarity index 96% rename from asm/unknown_070110/func_8006FE04.s rename to asm/unknown_070110/f32_matrix_scale.s index f26efe45..1fca20f8 100644 --- a/asm/unknown_070110/func_8006FE04.s +++ b/asm/unknown_070110/f32_matrix_scale.s @@ -1,4 +1,4 @@ -glabel func_8006FE04 +glabel f32_matrix_scale /* 070A04 8006FE04 44859000 */ mtc1 $a1, $f18 /* 070A08 8006FE08 C4900010 */ lwc1 $f16, 0x10($a0) /* 070A0C 8006FE0C 46128402 */ mul.s $f16, $f16, $f18 diff --git a/asm/unknown_070110/func_8006F870.s b/asm/unknown_070110/f32_matrix_to_s16_matrix.s similarity index 98% rename from asm/unknown_070110/func_8006F870.s rename to asm/unknown_070110/f32_matrix_to_s16_matrix.s index 956900de..00bc918d 100644 --- a/asm/unknown_070110/func_8006F870.s +++ b/asm/unknown_070110/f32_matrix_to_s16_matrix.s @@ -1,4 +1,4 @@ -glabel func_8006F870 +glabel f32_matrix_to_s16_matrix /* 070470 8006F870 3C014780 */ li $at, 0x47800000 # 65536.000000 /* 070474 8006F874 44816000 */ mtc1 $at, $f12 /* 070478 8006F878 34080004 */ ori $t0, $zero, 4 diff --git a/asm/unknown_070110/func_8006F5E0.s b/asm/unknown_070110/f32_matrix_to_s32_matrix.s similarity index 97% rename from asm/unknown_070110/func_8006F5E0.s rename to asm/unknown_070110/f32_matrix_to_s32_matrix.s index 3b7f7c5f..c8d9df6f 100644 --- a/asm/unknown_070110/func_8006F5E0.s +++ b/asm/unknown_070110/f32_matrix_to_s32_matrix.s @@ -1,4 +1,4 @@ -glabel func_8006F5E0 +glabel f32_matrix_to_s32_matrix /* 0701E0 8006F5E0 3C014780 */ li $at, 0x47800000 # 65536.000000 /* 0701E4 8006F5E4 44816000 */ mtc1 $at, $f12 /* 0701E8 8006F5E8 34080004 */ ori $t0, $zero, 4 diff --git a/asm/unknown_070110/func_8006FE30.s b/asm/unknown_070110/f32_matrix_y_scale.s similarity index 97% rename from asm/unknown_070110/func_8006FE30.s rename to asm/unknown_070110/f32_matrix_y_scale.s index a0d382d9..d223cd00 100644 --- a/asm/unknown_070110/func_8006FE30.s +++ b/asm/unknown_070110/f32_matrix_y_scale.s @@ -1,4 +1,4 @@ -glabel func_8006FE30 +glabel f32_matrix_y_scale /* 070A30 8006FE30 44858000 */ mtc1 $a1, $f16 /* 070A34 8006FE34 C4800010 */ lwc1 $f0, 0x10($a0) /* 070A38 8006FE38 C4840014 */ lwc1 $f4, 0x14($a0) diff --git a/asm/unknown_070110/func_80070320.s b/asm/unknown_070110/f32_vec3_apply_object_rotation.s similarity index 86% rename from asm/unknown_070110/func_80070320.s rename to asm/unknown_070110/f32_vec3_apply_object_rotation.s index 67a30c9f..53e69dc8 100644 --- a/asm/unknown_070110/func_80070320.s +++ b/asm/unknown_070110/f32_vec3_apply_object_rotation.s @@ -1,38 +1,38 @@ -glabel func_80070320 +glabel f32_vec3_apply_object_rotation /* 070F20 80070320 27BDFFF8 */ addiu $sp, $sp, -8 /* 070F24 80070324 FFBF0000 */ sd $ra, ($sp) /* 070F28 80070328 00803025 */ move $a2, $a0 /* 070F2C 8007032C C4A40000 */ lwc1 $f4, ($a1) /* 070F30 80070330 C4A60004 */ lwc1 $f6, 4($a1) /* 070F34 80070334 C4A80008 */ lwc1 $f8, 8($a1) -/* 070F38 80070338 0C01C1F1 */ jal cosine_s +/* 070F38 80070338 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 070F4C 8007034C 0C01C1FE */ jal coss_f /* 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 cosine_s +/* 070F64 80070364 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 070F78 80070378 0C01C1FE */ jal coss_f /* 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 cosine_s +/* 070F90 80070390 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 070FA4 800703A4 0C01C1FE */ jal coss_f /* 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/f32_vec3_apply_object_rotation2.s similarity index 86% rename from asm/unknown_070110/func_800703D8.s rename to asm/unknown_070110/f32_vec3_apply_object_rotation2.s index d58f5b30..7387214c 100644 --- a/asm/unknown_070110/func_800703D8.s +++ b/asm/unknown_070110/f32_vec3_apply_object_rotation2.s @@ -1,38 +1,38 @@ -glabel func_800703D8 +glabel f32_vec3_apply_object_rotation2 /* 070FD8 800703D8 27BDFFF8 */ addiu $sp, $sp, -8 /* 070FDC 800703DC FFBF0000 */ sd $ra, ($sp) /* 070FE0 800703E0 00803025 */ move $a2, $a0 /* 070FE4 800703E4 C4A40000 */ lwc1 $f4, ($a1) /* 070FE8 800703E8 C4A60004 */ lwc1 $f6, 4($a1) /* 070FEC 800703EC C4A80008 */ lwc1 $f8, 8($a1) -/* 070FF0 800703F0 0C01C1F1 */ jal cosine_s +/* 070FF0 800703F0 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 071004 80070404 0C01C1FE */ jal coss_f /* 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 cosine_s +/* 07101C 8007041C 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 071030 80070430 0C01C1FE */ jal coss_f /* 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 cosine_s +/* 071048 80070448 0C01C1F1 */ jal sins_f /* 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 sine_s +/* 07105C 8007045C 0C01C1FE */ jal coss_f /* 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/f32_vec3_apply_object_rotation3.s similarity index 81% rename from asm/unknown_070110/func_80070490.s rename to asm/unknown_070110/f32_vec3_apply_object_rotation3.s index 7a641198..e0f738cd 100644 --- a/asm/unknown_070110/func_80070490.s +++ b/asm/unknown_070110/f32_vec3_apply_object_rotation3.s @@ -1,19 +1,19 @@ -glabel func_80070490 +glabel f32_vec3_apply_object_rotation3 /* 071090 80070490 27BDFFF8 */ addiu $sp, $sp, -8 /* 071094 80070494 FFBF0000 */ sd $ra, ($sp) /* 071098 80070498 00803025 */ move $a2, $a0 /* 07109C 8007049C C4A80008 */ lwc1 $f8, 8($a1) -/* 0710A0 800704A0 0C01C1F1 */ jal cosine_s +/* 0710A0 800704A0 0C01C1F1 */ jal sins_f /* 0710A4 800704A4 84C40002 */ lh $a0, 2($a2) /* 0710A8 800704A8 46004182 */ mul.s $f6, $f8, $f0 -/* 0710AC 800704AC 0C01C1FE */ jal sine_s +/* 0710AC 800704AC 0C01C1FE */ jal coss_f /* 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 cosine_s +/* 0710BC 800704BC 0C01C1F1 */ jal sins_f /* 0710C0 800704C0 84C40000 */ lh $a0, ($a2) /* 0710C4 800704C4 46004102 */ mul.s $f4, $f8, $f0 -/* 0710C8 800704C8 0C01C1FE */ jal sine_s +/* 0710C8 800704C8 0C01C1FE */ jal coss_f /* 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_8006F570.s b/asm/unknown_070110/get_D_800DD430.s similarity index 89% rename from asm/unknown_070110/func_8006F570.s rename to asm/unknown_070110/get_D_800DD430.s index 7c05794a..18adefd0 100644 --- a/asm/unknown_070110/func_8006F570.s +++ b/asm/unknown_070110/get_D_800DD430.s @@ -1,4 +1,4 @@ -glabel func_8006F570 +glabel get_D_800DD430 /* 070170 8006F570 3C02800E */ lui $v0, %hi(D_800DD430) # $v0, 0x800e /* 070174 8006F574 03E00008 */ jr $ra /* 070178 8006F578 9042D430 */ lbu $v0, %lo(D_800DD430)($v0) diff --git a/asm/unknown_070110/func_8006FC30.s b/asm/unknown_070110/object_transform_to_matrix.s similarity index 94% rename from asm/unknown_070110/func_8006FC30.s rename to asm/unknown_070110/object_transform_to_matrix.s index 5986c1ab..511c7fc2 100644 --- a/asm/unknown_070110/func_8006FC30.s +++ b/asm/unknown_070110/object_transform_to_matrix.s @@ -1,40 +1,40 @@ -glabel func_8006FC30 +glabel object_transform_to_matrix /* 070830 8006FC30 27BDFFF8 */ addiu $sp, $sp, -8 /* 070834 8006FC34 3C013780 */ li $at, 0x37800000 # 0.000015 /* 070838 8006FC38 FFBF0000 */ sd $ra, ($sp) /* 07083C 8006FC3C 00803825 */ move $a3, $a0 /* 070840 8006FC40 44819000 */ mtc1 $at, $f18 -/* 070844 8006FC44 0C01C20C */ jal func_80070830 +/* 070844 8006FC44 0C01C20C */ jal sins /* 070848 8006FC48 84A40000 */ lh $a0, ($a1) /* 07084C 8006FC4C 44820000 */ mtc1 $v0, $f0 /* 070850 8006FC50 84A40000 */ lh $a0, ($a1) /* 070854 8006FC54 46800020 */ cvt.s.w $f0, $f0 /* 070858 8006FC58 46120002 */ mul.s $f0, $f0, $f18 -/* 07085C 8006FC5C 0C01C20B */ jal func_8007082C +/* 07085C 8006FC5C 0C01C20B */ jal coss /* 070860 8006FC60 00000000 */ nop /* 070864 8006FC64 44821000 */ mtc1 $v0, $f2 /* 070868 8006FC68 84A40002 */ lh $a0, 2($a1) /* 07086C 8006FC6C 468010A0 */ cvt.s.w $f2, $f2 /* 070870 8006FC70 46121082 */ mul.s $f2, $f2, $f18 -/* 070874 8006FC74 0C01C20C */ jal func_80070830 +/* 070874 8006FC74 0C01C20C */ jal sins /* 070878 8006FC78 00000000 */ nop /* 07087C 8006FC7C 44822000 */ mtc1 $v0, $f4 /* 070880 8006FC80 84A40002 */ lh $a0, 2($a1) /* 070884 8006FC84 46802120 */ cvt.s.w $f4, $f4 /* 070888 8006FC88 46122102 */ mul.s $f4, $f4, $f18 -/* 07088C 8006FC8C 0C01C20B */ jal func_8007082C +/* 07088C 8006FC8C 0C01C20B */ jal coss /* 070890 8006FC90 00000000 */ nop /* 070894 8006FC94 44823000 */ mtc1 $v0, $f6 /* 070898 8006FC98 84A40004 */ lh $a0, 4($a1) /* 07089C 8006FC9C 468031A0 */ cvt.s.w $f6, $f6 /* 0708A0 8006FCA0 46123182 */ mul.s $f6, $f6, $f18 -/* 0708A4 8006FCA4 0C01C20C */ jal func_80070830 +/* 0708A4 8006FCA4 0C01C20C */ jal sins /* 0708A8 8006FCA8 00000000 */ nop /* 0708AC 8006FCAC 44824000 */ mtc1 $v0, $f8 /* 0708B0 8006FCB0 84A40004 */ lh $a0, 4($a1) /* 0708B4 8006FCB4 46804220 */ cvt.s.w $f8, $f8 /* 0708B8 8006FCB8 46124202 */ mul.s $f8, $f8, $f18 -/* 0708BC 8006FCBC 0C01C20B */ jal func_8007082C +/* 0708BC 8006FCBC 0C01C20B */ jal coss /* 0708C0 8006FCC0 00000000 */ nop /* 0708C4 8006FCC4 44825000 */ mtc1 $v0, $f10 /* 0708C8 8006FCC8 8CAA0008 */ lw $t2, 8($a1) diff --git a/asm/unknown_070110/func_8006FE74.s b/asm/unknown_070110/object_transform_to_matrix_2.s similarity index 92% rename from asm/unknown_070110/func_8006FE74.s rename to asm/unknown_070110/object_transform_to_matrix_2.s index 49a30b7a..5e263aa3 100644 --- a/asm/unknown_070110/func_8006FE74.s +++ b/asm/unknown_070110/object_transform_to_matrix_2.s @@ -1,40 +1,40 @@ -glabel func_8006FE74 +glabel object_transform_to_matrix_2 /* 070A74 8006FE74 27BDFFF8 */ addiu $sp, $sp, -8 /* 070A78 8006FE78 3C013780 */ li $at, 0x37800000 # 0.000015 /* 070A7C 8006FE7C FFBF0000 */ sd $ra, ($sp) /* 070A80 8006FE80 00803825 */ move $a3, $a0 /* 070A84 8006FE84 44819000 */ mtc1 $at, $f18 -/* 070A88 8006FE88 0C01C20C */ jal func_80070830 +/* 070A88 8006FE88 0C01C20C */ jal sins /* 070A8C 8006FE8C 84A40000 */ lh $a0, ($a1) /* 070A90 8006FE90 44820000 */ mtc1 $v0, $f0 /* 070A94 8006FE94 84A40000 */ lh $a0, ($a1) /* 070A98 8006FE98 46800020 */ cvt.s.w $f0, $f0 /* 070A9C 8006FE9C 46120002 */ mul.s $f0, $f0, $f18 -/* 070AA0 8006FEA0 0C01C20B */ jal func_8007082C +/* 070AA0 8006FEA0 0C01C20B */ jal coss /* 070AA4 8006FEA4 00000000 */ nop /* 070AA8 8006FEA8 44821000 */ mtc1 $v0, $f2 /* 070AAC 8006FEAC 84A40002 */ lh $a0, 2($a1) /* 070AB0 8006FEB0 468010A0 */ cvt.s.w $f2, $f2 /* 070AB4 8006FEB4 46121082 */ mul.s $f2, $f2, $f18 -/* 070AB8 8006FEB8 0C01C20C */ jal func_80070830 +/* 070AB8 8006FEB8 0C01C20C */ jal sins /* 070ABC 8006FEBC 00000000 */ nop /* 070AC0 8006FEC0 44822000 */ mtc1 $v0, $f4 /* 070AC4 8006FEC4 84A40002 */ lh $a0, 2($a1) /* 070AC8 8006FEC8 46802120 */ cvt.s.w $f4, $f4 /* 070ACC 8006FECC 46122102 */ mul.s $f4, $f4, $f18 -/* 070AD0 8006FED0 0C01C20B */ jal func_8007082C +/* 070AD0 8006FED0 0C01C20B */ jal coss /* 070AD4 8006FED4 00000000 */ nop /* 070AD8 8006FED8 44823000 */ mtc1 $v0, $f6 /* 070ADC 8006FEDC 84A40004 */ lh $a0, 4($a1) /* 070AE0 8006FEE0 468031A0 */ cvt.s.w $f6, $f6 /* 070AE4 8006FEE4 46123182 */ mul.s $f6, $f6, $f18 -/* 070AE8 8006FEE8 0C01C20C */ jal func_80070830 +/* 070AE8 8006FEE8 0C01C20C */ jal sins /* 070AEC 8006FEEC 00000000 */ nop /* 070AF0 8006FEF0 44824000 */ mtc1 $v0, $f8 /* 070AF4 8006FEF4 84A40004 */ lh $a0, 4($a1) /* 070AF8 8006FEF8 46804220 */ cvt.s.w $f8, $f8 /* 070AFC 8006FEFC 46124202 */ mul.s $f8, $f8, $f18 -/* 070B00 8006FF00 0C01C20B */ jal func_8007082C +/* 070B00 8006FF00 0C01C20B */ jal coss /* 070B04 8006FF04 00000000 */ nop /* 070B08 8006FF08 44825000 */ mtc1 $v0, $f10 /* 070B0C 8006FF0C ACE0000C */ sw $zero, 0xc($a3) @@ -126,37 +126,37 @@ glabel func_8006FE74 /* 070C60 80070060 FFBF0000 */ sd $ra, ($sp) /* 070C64 80070064 00803825 */ move $a3, $a0 /* 070C68 80070068 44819000 */ mtc1 $at, $f18 -/* 070C6C 8007006C 0C01C20C */ jal func_80070830 +/* 070C6C 8007006C 0C01C20C */ jal sins /* 070C70 80070070 84A40000 */ lh $a0, ($a1) /* 070C74 80070074 44820000 */ mtc1 $v0, $f0 /* 070C78 80070078 84A40000 */ lh $a0, ($a1) /* 070C7C 8007007C 46800020 */ cvt.s.w $f0, $f0 /* 070C80 80070080 46120002 */ mul.s $f0, $f0, $f18 -/* 070C84 80070084 0C01C20B */ jal func_8007082C +/* 070C84 80070084 0C01C20B */ jal coss /* 070C88 80070088 00000000 */ nop /* 070C8C 8007008C 44821000 */ mtc1 $v0, $f2 /* 070C90 80070090 84A40002 */ lh $a0, 2($a1) /* 070C94 80070094 468010A0 */ cvt.s.w $f2, $f2 /* 070C98 80070098 46121082 */ mul.s $f2, $f2, $f18 -/* 070C9C 8007009C 0C01C20C */ jal func_80070830 +/* 070C9C 8007009C 0C01C20C */ jal sins /* 070CA0 800700A0 00000000 */ nop /* 070CA4 800700A4 44822000 */ mtc1 $v0, $f4 /* 070CA8 800700A8 84A40002 */ lh $a0, 2($a1) /* 070CAC 800700AC 46802120 */ cvt.s.w $f4, $f4 /* 070CB0 800700B0 46122102 */ mul.s $f4, $f4, $f18 -/* 070CB4 800700B4 0C01C20B */ jal func_8007082C +/* 070CB4 800700B4 0C01C20B */ jal coss /* 070CB8 800700B8 00000000 */ nop /* 070CBC 800700BC 44823000 */ mtc1 $v0, $f6 /* 070CC0 800700C0 84A40004 */ lh $a0, 4($a1) /* 070CC4 800700C4 468031A0 */ cvt.s.w $f6, $f6 /* 070CC8 800700C8 46123182 */ mul.s $f6, $f6, $f18 -/* 070CCC 800700CC 0C01C20C */ jal func_80070830 +/* 070CCC 800700CC 0C01C20C */ jal sins /* 070CD0 800700D0 00000000 */ nop /* 070CD4 800700D4 44824000 */ mtc1 $v0, $f8 /* 070CD8 800700D8 84A40004 */ lh $a0, 4($a1) /* 070CDC 800700DC 46804220 */ cvt.s.w $f8, $f8 /* 070CE0 800700E0 46124202 */ mul.s $f8, $f8, $f18 -/* 070CE4 800700E4 0C01C20B */ jal func_8007082C +/* 070CE4 800700E4 0C01C20B */ jal coss /* 070CE8 800700E8 00000000 */ nop /* 070CEC 800700EC 44825000 */ mtc1 $v0, $f10 /* 070CF0 800700F0 3C013F80 */ li $at, 0x3F800000 # 1.000000 diff --git a/asm/unknown_070110/func_800704F0.s b/asm/unknown_070110/point_triangle_2d_xz_intersection.s similarity index 98% rename from asm/unknown_070110/func_800704F0.s rename to asm/unknown_070110/point_triangle_2d_xz_intersection.s index 4cbad2fd..486b890f 100644 --- a/asm/unknown_070110/func_800704F0.s +++ b/asm/unknown_070110/point_triangle_2d_xz_intersection.s @@ -1,4 +1,4 @@ -glabel func_800704F0 +glabel point_triangle_2d_xz_intersection /* 0710F0 800704F0 8FAE0010 */ lw $t6, 0x10($sp) /* 0710F4 800704F4 84C80000 */ lh $t0, ($a2) /* 0710F8 800704F8 84C90004 */ lh $t1, 4($a2) diff --git a/asm/unknown_070110/func_8006F9B8.s b/asm/unknown_070110/s16_matrix_rotate.s similarity index 98% rename from asm/unknown_070110/func_8006F9B8.s rename to asm/unknown_070110/s16_matrix_rotate.s index 6a805d2c..8398ede3 100644 --- a/asm/unknown_070110/func_8006F9B8.s +++ b/asm/unknown_070110/s16_matrix_rotate.s @@ -1,4 +1,4 @@ -glabel func_8006F9B8 +glabel s16_matrix_rotate /* 0705B8 8006F9B8 84880000 */ lh $t0, ($a0) /* 0705BC 8006F9BC 84AB0000 */ lh $t3, ($a1) /* 0705C0 8006F9C0 84890002 */ lh $t1, 2($a0) diff --git a/asm/unknown_070110/func_8006FA40.s b/asm/unknown_070110/s16_matrix_to_s32_matrix.s similarity index 95% rename from asm/unknown_070110/func_8006FA40.s rename to asm/unknown_070110/s16_matrix_to_s32_matrix.s index 289affbc..29368348 100644 --- a/asm/unknown_070110/func_8006FA40.s +++ b/asm/unknown_070110/s16_matrix_to_s32_matrix.s @@ -1,4 +1,4 @@ -glabel func_8006FA40 +glabel s16_matrix_to_s32_matrix /* 070640 8006FA40 340A0010 */ ori $t2, $zero, 16 /* 070644 8006FA44 016B5826 */ xor $t3, $t3, $t3 .L8006FA48: diff --git a/asm/unknown_070110/func_800701E4.s b/asm/unknown_070110/s16_vec3_apply_object_rotation.s similarity index 91% rename from asm/unknown_070110/func_800701E4.s rename to asm/unknown_070110/s16_vec3_apply_object_rotation.s index 4f7e4257..71f11922 100644 --- a/asm/unknown_070110/func_800701E4.s +++ b/asm/unknown_070110/s16_vec3_apply_object_rotation.s @@ -1,14 +1,14 @@ -glabel func_800701E4 +glabel s16_vec3_apply_object_rotation /* 070DE4 800701E4 27BDFFF8 */ addiu $sp, $sp, -8 /* 070DE8 800701E8 FFBF0000 */ sd $ra, ($sp) /* 070DEC 800701EC 00803025 */ move $a2, $a0 /* 070DF0 800701F0 84AB0000 */ lh $t3, ($a1) /* 070DF4 800701F4 84AC0002 */ lh $t4, 2($a1) /* 070DF8 800701F8 84AD0004 */ lh $t5, 4($a1) -/* 070DFC 800701FC 0C01C20C */ jal func_80070830 +/* 070DFC 800701FC 0C01C20C */ jal sins /* 070E00 80070200 84C40000 */ lh $a0, ($a2) /* 070E04 80070204 00407025 */ move $t6, $v0 -/* 070E08 80070208 0C01C20B */ jal func_8007082C +/* 070E08 80070208 0C01C20B */ jal coss /* 070E0C 8007020C 84C40000 */ lh $a0, ($a2) /* 070E10 80070210 016E0018 */ mult $t3, $t6 /* 070E14 80070214 00407825 */ move $t7, $v0 @@ -27,10 +27,10 @@ glabel func_800701E4 /* 070E48 80070248 018F0018 */ mult $t4, $t7 /* 070E4C 8007024C 00006012 */ mflo $t4 /* 070E50 80070250 01886020 */ add $t4, $t4, $t0 -/* 070E54 80070254 0C01C20C */ jal func_80070830 +/* 070E54 80070254 0C01C20C */ jal sins /* 070E58 80070258 000C6403 */ sra $t4, $t4, 0x10 /* 070E5C 8007025C 00407025 */ move $t6, $v0 -/* 070E60 80070260 0C01C20B */ jal func_8007082C +/* 070E60 80070260 0C01C20B */ jal coss /* 070E64 80070264 84C40002 */ lh $a0, 2($a2) /* 070E68 80070268 018E0018 */ mult $t4, $t6 /* 070E6C 8007026C 00407825 */ move $t7, $v0 @@ -49,10 +49,10 @@ glabel func_800701E4 /* 070EA0 800702A0 01AF0018 */ mult $t5, $t7 /* 070EA4 800702A4 00006812 */ mflo $t5 /* 070EA8 800702A8 01A86820 */ add $t5, $t5, $t0 -/* 070EAC 800702AC 0C01C20C */ jal func_80070830 +/* 070EAC 800702AC 0C01C20C */ jal sins /* 070EB0 800702B0 000D6C03 */ sra $t5, $t5, 0x10 /* 070EB4 800702B4 00407025 */ move $t6, $v0 -/* 070EB8 800702B8 0C01C20B */ jal func_8007082C +/* 070EB8 800702B8 0C01C20B */ jal coss /* 070EBC 800702BC 84C40004 */ lh $a0, 4($a2) /* 070EC0 800702C0 016E0018 */ mult $t3, $t6 /* 070EC4 800702C4 00407825 */ move $t7, $v0 diff --git a/asm/unknown_070110/func_8006FB60.s b/asm/unknown_070110/s16_vec3_mult_by_s32_matrix.s similarity index 98% rename from asm/unknown_070110/func_8006FB60.s rename to asm/unknown_070110/s16_vec3_mult_by_s32_matrix.s index 7627bf80..845cb67e 100644 --- a/asm/unknown_070110/func_8006FB60.s +++ b/asm/unknown_070110/s16_vec3_mult_by_s32_matrix.s @@ -1,4 +1,4 @@ -glabel func_8006FB60 +glabel s16_vec3_mult_by_s32_matrix /* 070760 8006FB60 8C8B0000 */ lw $t3, ($a0) /* 070764 8006FB64 84A80000 */ lh $t0, ($a1) /* 070768 8006FB68 84A90002 */ lh $t1, 2($a1) diff --git a/asm/unknown_070110/func_8006FA78.s b/asm/unknown_070110/s16_vec3_mult_by_s32_matrix_full.s similarity index 98% rename from asm/unknown_070110/func_8006FA78.s rename to asm/unknown_070110/s16_vec3_mult_by_s32_matrix_full.s index cc2d4ace..a8618cd7 100644 --- a/asm/unknown_070110/func_8006FA78.s +++ b/asm/unknown_070110/s16_vec3_mult_by_s32_matrix_full.s @@ -1,4 +1,4 @@ -glabel func_8006FA78 +glabel s16_vec3_mult_by_s32_matrix_full /* 070678 8006FA78 84A80000 */ lh $t0, ($a1) /* 07067C 8006FA7C 8C8B0000 */ lw $t3, ($a0) /* 070680 8006FA80 84A90002 */ lh $t1, 2($a1) diff --git a/asm/unknown_070110/func_80070780.s b/asm/unknown_070110/s32_matrix_cell_sqrt.s similarity index 95% rename from asm/unknown_070110/func_80070780.s rename to asm/unknown_070110/s32_matrix_cell_sqrt.s index cf32c008..f51306bd 100644 --- a/asm/unknown_070110/func_80070780.s +++ b/asm/unknown_070110/s32_matrix_cell_sqrt.s @@ -1,4 +1,4 @@ -glabel func_80070780 +glabel s32_matrix_cell_sqrt /* 071380 80070780 44840000 */ mtc1 $a0, $f0 /* 071384 80070784 3C014780 */ li $at, 0x47800000 # 65536.000000 /* 071388 80070788 44811000 */ mtc1 $at, $f2 diff --git a/asm/unknown_070110/func_8006F57C.s b/asm/unknown_070110/s32_matrix_to_s16_matrix.s similarity index 97% rename from asm/unknown_070110/func_8006F57C.s rename to asm/unknown_070110/s32_matrix_to_s16_matrix.s index 7ad82a1f..0fb5508f 100644 --- a/asm/unknown_070110/func_8006F57C.s +++ b/asm/unknown_070110/s32_matrix_to_s16_matrix.s @@ -1,4 +1,4 @@ -glabel func_8006F57C +glabel s32_matrix_to_s16_matrix /* 07017C 8006F57C 34080004 */ ori $t0, $zero, 4 /* 070180 8006F580 3C0FFFFF */ lui $t7, 0xffff .L8006F584: diff --git a/asm/unknown_070110/func_8006F564.s b/asm/unknown_070110/set_D_800DD430.s similarity index 89% rename from asm/unknown_070110/func_8006F564.s rename to asm/unknown_070110/set_D_800DD430.s index 69d87238..97e326bc 100644 --- a/asm/unknown_070110/func_8006F564.s +++ b/asm/unknown_070110/set_D_800DD430.s @@ -1,4 +1,4 @@ -glabel func_8006F564 +glabel set_D_800DD430 /* 070164 8006F564 3C01800E */ lui $at, %hi(D_800DD430) # $at, 0x800e /* 070168 8006F568 03E00008 */ jr $ra /* 07016C 8006F56C A024D430 */ sb $a0, %lo(D_800DD430)($at) diff --git a/asm/unknown_070110/func_8006F53C.s b/asm/unknown_070110/set_status_register_flags.s similarity index 94% rename from asm/unknown_070110/func_8006F53C.s rename to asm/unknown_070110/set_status_register_flags.s index c775a350..4631b581 100644 --- a/asm/unknown_070110/func_8006F53C.s +++ b/asm/unknown_070110/set_status_register_flags.s @@ -1,4 +1,4 @@ -glabel func_8006F53C +glabel set_status_register_flags /* 07013C 8006F53C 3C08800E */ lui $t0, %hi(D_800DD430) # $t0, 0x800e /* 070140 8006F540 8108D430 */ lb $t0, %lo(D_800DD430)($t0) /* 070144 8006F544 11000005 */ beqz $t0, .L8006F55C # Identical to __osRestoreInt below this line diff --git a/asm/unknown_070110/func_80070890.s b/asm/unknown_070110/sins_2.s similarity index 95% rename from asm/unknown_070110/func_80070890.s rename to asm/unknown_070110/sins_2.s index 479d7145..eb1128e0 100644 --- a/asm/unknown_070110/func_80070890.s +++ b/asm/unknown_070110/sins_2.s @@ -1,6 +1,6 @@ -glabel func_8007088C +glabel coss_2 /* 07148C 8007088C 24844000 */ addiu $a0, $a0, 0x4000 -glabel func_80070890 +glabel sins_2 /* 071490 80070890 00041440 */ sll $v0, $a0, 0x11 /* 071494 80070894 04430003 */ bgezl $v0, .L800708A4 /* 071498 80070898 000450C2 */ srl $t2, $a0, 3 diff --git a/asm/unknown_070110/cosine_s.s b/asm/unknown_070110/sins_f.s similarity index 89% rename from asm/unknown_070110/cosine_s.s rename to asm/unknown_070110/sins_f.s index 78c66a85..f5621b83 100644 --- a/asm/unknown_070110/cosine_s.s +++ b/asm/unknown_070110/sins_f.s @@ -1,7 +1,7 @@ -glabel cosine_s +glabel sins_f /* 0713C4 800707C4 27BDFFF8 */ addiu $sp, $sp, -8 /* 0713C8 800707C8 FFBF0000 */ sd $ra, ($sp) -/* 0713CC 800707CC 0C01C20C */ jal func_80070830 +/* 0713CC 800707CC 0C01C20C */ jal sins /* 0713D0 800707D0 00000000 */ nop /* 0713D4 800707D4 44820000 */ mtc1 $v0, $f0 /* 0713D8 800707D8 3C013780 */ li $at, 0x37800000 # 0.000015 diff --git a/include/math_util.h b/include/math_util.h index af4c63eb..a05011c1 100644 --- a/include/math_util.h +++ b/include/math_util.h @@ -22,13 +22,13 @@ } s16 arctan2_f(f32 y, f32 x); -f32 sine_s(s16 angle); -f32 cosine_s(s16 angle); +f32 coss_f(s16 angle); +f32 sins_f(s16 angle); void func_80031130(s32, f32*, f32*, s32); s32 func_80031600(f32*, f32*, f32*, s8* surface, s32, s32*); -void func_80070130(Matrix, s32, f32, f32); -void func_80070638(Matrix, f32, f32, f32); -void func_8006FE04(Matrix*, f32); -void func_8006FE30(Matrix*, f32); +void f32_matrix_from_rotation_and_scale(Matrix, s32, f32, f32); +void f32_matrix_from_scale(Matrix, f32, f32, f32); +void f32_matrix_scale(Matrix*, f32); +void f32_matrix_y_scale(Matrix*, f32); #endif // MATH_UTIL_H diff --git a/src/camera.c b/src/camera.c index 3a658bad..c78fccc7 100644 --- a/src/camera.c +++ b/src/camera.c @@ -174,7 +174,7 @@ void func_80065EA0(void) { gAntiPiracyViewport = TRUE; } guPerspectiveF(D_80120EE0, &perspNorm, CAMERA_DEFAULT_FOV, CAMERA_ASPECT, CAMERA_NEAR, CAMERA_FAR, CAMERA_SCALE); - func_8006F870(D_80120EE0, D_80120FE0); + f32_matrix_to_s16_matrix(D_80120EE0, D_80120FE0); gCurCamFOV = CAMERA_DEFAULT_FOV; } #else @@ -220,7 +220,7 @@ void update_camera_fov(f32 camFieldOfView) { if (CAMERA_MIN_FOV < camFieldOfView && camFieldOfView < CAMERA_MAX_FOV && camFieldOfView != gCurCamFOV) { gCurCamFOV = camFieldOfView; guPerspectiveF(D_80120EE0, &perspNorm, camFieldOfView, CAMERA_ASPECT, CAMERA_NEAR, CAMERA_FAR, CAMERA_SCALE); - func_8006F870(&D_80120EE0, &D_80120FE0); + f32_matrix_to_s16_matrix(&D_80120EE0, &D_80120FE0); } } @@ -229,7 +229,7 @@ void update_camera_fov(f32 camFieldOfView) { */ UNUSED void calculate_camera_perspective(void) { guPerspectiveF(D_80120EE0, &perspNorm, CAMERA_DEFAULT_FOV, CAMERA_ASPECT, CAMERA_NEAR, CAMERA_FAR, CAMERA_SCALE); - func_8006F870(&D_80120EE0, &D_80120FE0); + f32_matrix_to_s16_matrix(&D_80120EE0, &D_80120FE0); } UNUSED Matrix *func_80066204(void) { @@ -858,8 +858,8 @@ void func_80067D3C(Gfx **dlist, UNUSED Matrix **mats) { } D_80120CF0.z_position = -gActiveCameraStack[gActiveCameraID].trans.z_position; - func_8006FE74(&D_80120F60, &D_80120CF0); - func_8006F768(&D_80120F60, &D_80120EE0, &D_80120F20); + object_transform_to_matrix_2(&D_80120F60, &D_80120CF0); + f32_matrix_mult(&D_80120F60, &D_80120EE0, &D_80120F20); D_80120CF0.y_rotation = -0x8000 - gActiveCameraStack[gActiveCameraID].trans.y_rotation; D_80120CF0.x_rotation = -(gActiveCameraStack[gActiveCameraID].trans.x_rotation + gActiveCameraStack[gActiveCameraID].unk38.word); @@ -872,8 +872,8 @@ void func_80067D3C(Gfx **dlist, UNUSED Matrix **mats) { } D_80120CF0.z_position = gActiveCameraStack[gActiveCameraID].trans.z_position; - func_8006FC30(D_80120FA0, &D_80120CF0); - func_8006F870(&D_80120FA0, &D_80121020); + object_transform_to_matrix(D_80120FA0, &D_80120CF0); + f32_matrix_to_s16_matrix(&D_80120FA0, &D_80121020); gActiveCameraID = temp; } @@ -894,7 +894,7 @@ void func_80067F2C(Gfx **dlist, Matrix **mats) { widthAndHeight = get_video_width_and_height_as_s32(); height = GET_VIDEO_HEIGHT(widthAndHeight); width = GET_VIDEO_WIDTH(widthAndHeight); - func_8006F870(&gOrthoMatrix, (Matrix *)*mats); + f32_matrix_to_s16_matrix(&gOrthoMatrix, (Matrix *)*mats); D_80120D88[0] = (Matrix *) *mats; D_800DD148[gActiveCameraID + 5].vp.vscale[0] = width * 2; D_800DD148[gActiveCameraID + 5].vp.vscale[1] = width * 2; @@ -914,11 +914,11 @@ void func_80067F2C(Gfx **dlist, Matrix **mats) { } void func_8006807C(Gfx **dlist, Matrix **mats) { - func_8006FE74(&D_80121060, &D_800DD288); - func_8006F768(&D_80121060, &D_80120EE0, &D_80120F20); - func_8006FE74(D_80120D70[0], &D_800DD2A0); - func_8006F768(D_80120D70[0], &D_80120F20, &D_80121060); - func_8006F870(&D_80121060, (Matrix *)*mats); + object_transform_to_matrix_2(&D_80121060, &D_800DD288); + f32_matrix_mult(&D_80121060, &D_80120EE0, &D_80120F20); + object_transform_to_matrix_2(D_80120D70[0], &D_800DD2A0); + f32_matrix_mult(D_80120D70[0], &D_80120F20, &D_80121060); + f32_matrix_to_s16_matrix(&D_80121060, (Matrix *)*mats); gSPMatrix((*dlist)++, OS_PHYSICAL_TO_K0((*mats)++), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); D_80120D1C = 0; D_80120D08 = 0; @@ -959,9 +959,9 @@ void func_800682AC(Gfx **dlist) { } void func_80068408(Gfx **dlist, Matrix **mats) { - func_800705F8(D_80120D70[D_80120D1C], 0.0f, 0.0f, 0.0f); - func_8006F768(D_80120D70[D_80120D1C], &D_80120F20, &D_80121060); - func_8006F870(&D_80121060, (Matrix *)*mats); + f32_matrix_from_position(D_80120D70[D_80120D1C], 0.0f, 0.0f, 0.0f); + f32_matrix_mult(D_80120D70[D_80120D1C], &D_80120F20, &D_80121060); + f32_matrix_to_s16_matrix(&D_80121060, (Matrix *)*mats); D_80120D88[D_80120D1C] = (Matrix *) *mats; gSPMatrix((*dlist)++, OS_PHYSICAL_TO_K0((*mats)++), D_80120D08 << 6); } @@ -993,12 +993,12 @@ s32 render_sprite_billboard(Gfx **dlist, Matrix **mtx, Vertex **vertexList, Obje sp5C = D_80120D28[D_80120D20] - obj->segment.trans.x_position; sp58 = D_80120D40[D_80120D20] - obj->segment.trans.y_position; var_f20 = D_80120D58[D_80120D20] - obj->segment.trans.z_position; - sp4C = cosine_s(obj->segment.trans.y_rotation); - temp_f0 = sine_s(obj->segment.trans.y_rotation); + sp4C = sins_f(obj->segment.trans.y_rotation); + temp_f0 = coss_f(obj->segment.trans.y_rotation); sp44 = (sp5C * temp_f0) + (var_f20 * sp4C); var_f20 = (var_f20 * temp_f0) - (sp5C * sp4C); sp38 = arctan2_f(sp44, sqrtf((sp58 * sp58) + (var_f20 * var_f20))); - sp3C = -func_80070830(arctan2_f(sp44, var_f20)) >> 8; + sp3C = -sins(arctan2_f(sp44, var_f20)) >> 8; if (var_f20 < 0.0f) { var_f20 = -var_f20; sp3C = 1 - sp3C; @@ -1027,11 +1027,11 @@ s32 render_sprite_billboard(Gfx **dlist, Matrix **mtx, Vertex **vertexList, Obje D_80120CF0.x_position = obj->segment.trans.x_position; D_80120CF0.y_position = obj->segment.trans.y_position; D_80120CF0.z_position = obj->segment.trans.z_position; - func_8006FC30(D_80121060, &D_80120CF0); + object_transform_to_matrix(D_80121060, &D_80120CF0); D_80120D1C++; - func_8006F768((Matrix*) D_80121060, (Matrix*)&D_80120D70[D_80120D1C-1][0][0], (Matrix*)&D_80120D70[D_80120D1C][0][0]); - func_8006F768(D_80120D70[D_80120D1C], (Matrix*) D_80120F20, (Matrix*) D_80121060); - func_8006F870((Matrix*) D_80121060, *mtx); + f32_matrix_mult((Matrix*) D_80121060, (Matrix*)&D_80120D70[D_80120D1C-1][0][0], (Matrix*)&D_80120D70[D_80120D1C][0][0]); + f32_matrix_mult(D_80120D70[D_80120D1C], (Matrix*) D_80120F20, (Matrix*) D_80121060); + f32_matrix_to_s16_matrix((Matrix*) D_80121060, *mtx); D_80120D88[D_80120D1C] = *mtx; gSPMatrix((*dlist)++, OS_PHYSICAL_TO_K0((*mtx)++), 0x80); gSPVertexDKR((*dlist)++, OS_K0_TO_PHYSICAL(&D_800DD138), 1, 0); @@ -1053,8 +1053,8 @@ s32 render_sprite_billboard(Gfx **dlist, Matrix **mtx, Vertex **vertexList, Obje } var_s2 = obj->segment.unk18; D_80120D1C++; - func_80070130((f32 (*)[4]) D_80120D70[D_80120D1C], sp34, obj->segment.trans.scale, gVideoAspectRatio); - func_8006F870(D_80120D70[D_80120D1C], *mtx); + f32_matrix_from_rotation_and_scale((f32 (*)[4]) D_80120D70[D_80120D1C], sp34, obj->segment.trans.scale, gVideoAspectRatio); + f32_matrix_to_s16_matrix(D_80120D70[D_80120D1C], *mtx); D_80120D88[D_80120D1C] = *mtx; gSPMatrix((*dlist)++, OS_PHYSICAL_TO_K0((*mtx)++), 0x80); gDkrEnableBillboard((*dlist)++); @@ -1111,16 +1111,16 @@ void func_80068BF4(Gfx **arg0, Matrix **arg1, Vertex **arg2, ObjectSegment *arg3 D_80120CF0.z_position = 0.0f; if (gAdjustViewportHeight) { scale = arg3->trans.scale; - func_80070638(sp50, scale, scale, 1.0f); - func_80070130(sp90, 0, 1.0f, gVideoAspectRatio); - func_8006F768(&sp90, &sp50, &D_80121060); + f32_matrix_from_scale(sp50, scale, scale, 1.0f); + f32_matrix_from_rotation_and_scale(sp90, 0, 1.0f, gVideoAspectRatio); + f32_matrix_mult(&sp90, &sp50, &D_80121060); } else { scale = arg3->trans.scale; - func_80070638(D_80121060, scale, scale, 1.0f); + f32_matrix_from_scale(D_80121060, scale, scale, 1.0f); } - func_8006FE74(&sp90, &D_80120CF0); - func_8006F768(&D_80121060, &sp90, D_80120D70[D_80120D1C]); - func_8006F870(D_80120D70[D_80120D1C], *arg1); + object_transform_to_matrix_2(&sp90, &D_80120CF0); + f32_matrix_mult(&D_80121060, &sp90, D_80120D70[D_80120D1C]); + f32_matrix_to_s16_matrix(D_80120D70[D_80120D1C], *arg1); D_80120D88[D_80120D1C] = *arg1; gSPMatrix((*arg0)++, OS_PHYSICAL_TO_K0((*arg1)++), G_MTX_DKR_INDEX_2); gDkrEnableBillboard((*arg0)++); @@ -1151,16 +1151,16 @@ void func_80069484(Gfx **arg0, Matrix **arg1, ObjectTransform *arg2, f32 arg3, f s32 index; f32 scaleFactor; - func_8006FC30(D_80121060, arg2); + object_transform_to_matrix(D_80121060, arg2); if (arg4 != 0.0f) { - func_8006FE30(&D_80121060, arg4); + f32_matrix_y_scale(&D_80121060, arg4); } if (arg3 != 1.0f) { - func_8006FE04(&D_80121060, arg3); + f32_matrix_scale(&D_80121060, arg3); } - func_8006F768(&D_80121060, D_80120D70[D_80120D1C], D_80120D70[D_80120D1C + 1]); - func_8006F768(D_80120D70[D_80120D1C + 1], &D_80120F20, &D_801210A0); - func_8006F870(&D_801210A0, *arg1); + f32_matrix_mult(&D_80121060, D_80120D70[D_80120D1C], D_80120D70[D_80120D1C + 1]); + f32_matrix_mult(D_80120D70[D_80120D1C + 1], &D_80120F20, &D_801210A0); + f32_matrix_to_s16_matrix(&D_801210A0, *arg1); D_80120D1C++; D_80120D88[0, D_80120D1C] = *arg1; // Should be [D_80120D1C], but only matches with [0, D_80120D1C] if (1) { } if (1) { } if (1) { }; // Necessary to match @@ -1180,7 +1180,7 @@ void func_80069484(Gfx **arg0, Matrix **arg1, ObjectTransform *arg2, f32 arg3, f D_80120CF0.y_position = 0.0f; D_80120CF0.z_position = 0.0f; D_80120CF0.scale = 1.0f; - func_8006FE74(&D_80121060, &D_80120CF0); + object_transform_to_matrix_2(&D_80121060, &D_80120CF0); guMtxXFMF(D_80121060, tempX, tempY, tempZ, &tempX, &tempY, &tempZ); scaleFactor = 1.0f / arg2->scale; tempX *= scaleFactor; @@ -1229,10 +1229,10 @@ UNUSED void func_80069ACC(f32 x, f32 y, f32 z) { } UNUSED void func_80069B70(f32 x, UNUSED f32 y, f32 z) { - gActiveCameraStack[gActiveCameraID].trans.x_position -= x * sine_s(gActiveCameraStack[gActiveCameraID].trans.y_rotation); - gActiveCameraStack[gActiveCameraID].trans.z_position -= x * cosine_s(gActiveCameraStack[gActiveCameraID].trans.y_rotation); - gActiveCameraStack[gActiveCameraID].trans.x_position -= z * cosine_s(gActiveCameraStack[gActiveCameraID].trans.y_rotation); - gActiveCameraStack[gActiveCameraID].trans.z_position += z * sine_s(gActiveCameraStack[gActiveCameraID].trans.y_rotation); + gActiveCameraStack[gActiveCameraID].trans.x_position -= x * coss_f(gActiveCameraStack[gActiveCameraID].trans.y_rotation); + gActiveCameraStack[gActiveCameraID].trans.z_position -= x * sins_f(gActiveCameraStack[gActiveCameraID].trans.y_rotation); + gActiveCameraStack[gActiveCameraID].trans.x_position -= z * sins_f(gActiveCameraStack[gActiveCameraID].trans.y_rotation); + gActiveCameraStack[gActiveCameraID].trans.z_position += z * coss_f(gActiveCameraStack[gActiveCameraID].trans.y_rotation); gActiveCameraStack[gActiveCameraID].unk34_a.levelSegmentIndex = get_level_segment_index_from_position( gActiveCameraStack[gActiveCameraID].trans.x_position, diff --git a/src/camera.h b/src/camera.h index f3fa2524..7d3df7f1 100644 --- a/src/camera.h +++ b/src/camera.h @@ -109,10 +109,10 @@ typedef struct unk80068514_arg4 { } unk80068514_arg4; //TODO: Figure out where these functions live: unknown_070110? - void func_8006F870(Matrix *, Matrix *); //unknown_070110 - void func_800705F8(Matrix *, f32, f32, f32); //From unknown_070110 - void func_8006FE74(Matrix *, ObjectTransform *); // Non Matching unknown_070110? - void func_8006F768(Matrix *, Matrix *, Matrix *); // Non Matching unknown_070110? + void f32_matrix_to_s16_matrix(Matrix *, Matrix *); //unknown_070110 + void f32_matrix_from_position(Matrix *, f32, f32, f32); //From unknown_070110 + void object_transform_to_matrix_2(Matrix *, ObjectTransform *); // Non Matching unknown_070110? + void f32_matrix_mult(Matrix *, Matrix *, Matrix *); // Non Matching unknown_070110? void func_80066060(s32 arg0, s32 arg1); void set_viewport_tv_type(s8 arg0); diff --git a/src/game.c b/src/game.c index bc41ee5f..538d2835 100644 --- a/src/game.c +++ b/src/game.c @@ -1002,7 +1002,7 @@ void main_game_loop(void) { if (osTvType == TV_TYPE_PAL) { framebufferSize = (s32)((SCREEN_WIDTH * SCREEN_HEIGHT * 2) * 1.1f); } - func_80070B04(gVideoLastFramebuffer, (s32)gVideoCurrFramebuffer, (s32)gVideoCurrFramebuffer + framebufferSize); + dmacopy2(gVideoLastFramebuffer, (s32)gVideoCurrFramebuffer, (s32)gVideoCurrFramebuffer + framebufferSize); } // tempLogicUpdateRate will be set to a value 2 or higher, based on the framerate. // the mul factor is hardcapped at 6, which happens at 10FPS. The mul factor diff --git a/src/game.h b/src/game.h index d5357f0f..61898068 100644 --- a/src/game.h +++ b/src/game.h @@ -77,9 +77,9 @@ extern u16 *gVideoCurrFramebuffer; extern s32 gVideoLastFramebuffer; extern s32 gVideoLastDepthBuffer; -void func_8006F870(Matrix *, Matrix *); //unknown_070110 -void func_800705F8(Matrix *, f32, f32, f32); //From unknown_070110 -void func_80070B04(s32 videoLastFrameBuffer, s32 VideoCurrFrameBuffer, s32 size); +void f32_matrix_to_s16_matrix(Matrix *, Matrix *); //unknown_070110 +void f32_matrix_from_position(Matrix *, f32, f32, f32); //From unknown_070110 +void dmacopy2(s32 videoLastFrameBuffer, s32 VideoCurrFrameBuffer, s32 size); s16 func_8006ABB4(s32 arg0); s32 func_8006B018(s8 arg0); diff --git a/src/game_ui.c b/src/game_ui.c index 9693044b..dfcbe334 100644 --- a/src/game_ui.c +++ b/src/game_ui.c @@ -388,7 +388,7 @@ void render_hud(Gfx **dList, Matrix **mtx, TriangleList **tris, Object *arg3, s3 func_8007BF1C(FALSE); if (check_if_showing_cutscene_camera() == FALSE && D_80126D34 == 0 && racer->racer.playerIndex == PLAYER_ONE) { if (D_80126D35 != 0) { - D_80126D28 = cosine_s(D_80126D2C) * D_80126D30 * 8.0f; + D_80126D28 = sins_f(D_80126D2C) * D_80126D30 * 8.0f; D_80126D2C += updateRate << 0xB; if (D_80126D2C >= 0x8000) { D_80126D2C -= 0x8000; @@ -1379,7 +1379,7 @@ void render_weapon_hud(Object *obj, s32 updateRate) { if (D_80126CDC->unk5C > 120) { D_80126CDC->unk5C = 120; } else if (gHUDNumPlayers == ONE_PLAYER) { - D_80126CDC->unk48 += 0.18 * cosine_s(((f32) D_80126CDC->unk5C * 682.6583 * 4.0)); + D_80126CDC->unk48 += 0.18 * sins_f(((f32) D_80126CDC->unk5C * 682.6583 * 4.0)); } } if (gHUDNumPlayers > ONE_PLAYER) { @@ -1859,8 +1859,8 @@ void func_800A8474(Gfx **dList, Matrix **mtx, VertexList **triList, s32 updateRa } func_80068BF4(&gHUDCurrDisplayList, &gHUDCurrMatrix, &gHUDCurrTriList, (ObjectSegment* ) &objTrans.trans, (unk80068BF4* ) sp154, 0); sp11C = (lvlMdl->unk3E - lvlMdl->unk3C) / (f32) (lvlMdl->unk46 - lvlMdl->unk44); - sp118 = sine_s((lvlMdl->unk24 * 0xFFFF) / 360); - sp114 = cosine_s((lvlMdl->unk24 * 0xFFFF) / 360); + sp118 = coss_f((lvlMdl->unk24 * 0xFFFF) / 360); + sp114 = sins_f((lvlMdl->unk24 * 0xFFFF) / 360); if (func_8000E4D8() && func_8001B288()) { temp_v0_8 = func_8001B2E0(); if (temp_v0_8 != NULL) { diff --git a/src/memory.c b/src/memory.c index 85f425ed..f37abc3a 100644 --- a/src/memory.c +++ b/src/memory.c @@ -65,13 +65,13 @@ MemoryPoolSlot *new_sub_memory_pool(s32 poolDataSize, s32 numSlots) { s32 size; MemoryPoolSlot *slots; UNUSED s32 unused_2; - s32 *temp = func_8006F510(); + s32 *temp = clear_status_register_flags(); MemoryPoolSlot *newPool; size = poolDataSize + (numSlots * sizeof(MemoryPoolSlot)); slots = (MemoryPoolSlot *)allocate_from_main_pool_safe(size, COLOUR_TAG_WHITE); newPool = new_memory_pool(slots, size, numSlots); - func_8006F53C(temp); + set_status_register_flags(temp); return newPool; } @@ -153,10 +153,10 @@ MemoryPoolSlot *allocate_from_memory_pool(s32 memoryPoolIndex, s32 size, u32 col s32 phi_s0; s32 *sp28; - sp28 = func_8006F510(); + sp28 = clear_status_register_flags(); pool = &gMemoryPools[memoryPoolIndex]; if (pool->curNumSlots + 1 == pool->maxNumSlots) { - func_8006F53C(sp28); + set_status_register_flags(sp28); } else { if (size & 0xF) { size = _ALIGN16(size); // The size of the pool should be 16-byte aligned @@ -174,10 +174,10 @@ MemoryPoolSlot *allocate_from_memory_pool(s32 memoryPoolIndex, s32 size, u32 col } if (phi_s0 != -1) { allocate_memory_pool_slot(memoryPoolIndex, phi_s0, size, TRUE, FALSE, colorTag); - func_8006F53C(sp28); + set_status_register_flags(sp28); return pool->slots[phi_s0].data; } - func_8006F53C(sp28); + set_status_register_flags(sp28); } return (MemoryPoolSlot *)NULL; } @@ -202,9 +202,9 @@ void *allocate_at_address_in_main_pool(s32 size, u8 *address, u32 colorTag) { MemoryPoolSlot *curSlot; MemoryPoolSlot *slots; - sp38 = func_8006F510(); + sp38 = clear_status_register_flags(); if ((gMemoryPools[0].curNumSlots + 1) == gMemoryPools[0].maxNumSlots) { - func_8006F53C(sp38); + set_status_register_flags(sp38); } else { s0 = 0; if (size & 0xF) { @@ -217,19 +217,19 @@ void *allocate_at_address_in_main_pool(s32 size, u8 *address, u32 colorTag) { if ((address >= (u8 *)curSlot->data) && (((u8 *)curSlot->data + curSlot->size) >= (address + size))) { if (address == (u8 *)curSlot->data) { allocate_memory_pool_slot(0, s0, size, 1, 0, colorTag); - func_8006F53C(sp38); + set_status_register_flags(sp38); return curSlot->data; } else { s0 = allocate_memory_pool_slot(0, s0, address - (u8 *)curSlot->data, 0, 1, colorTag); allocate_memory_pool_slot(0, s0, size, 1, 0, colorTag); - func_8006F53C(sp38); + set_status_register_flags(sp38); return slots[s0].data; } } } s0 = curSlot->nextIndex; } - func_8006F53C(sp38); + set_status_register_flags(sp38); } return NULL; } @@ -242,14 +242,14 @@ GLOBAL_ASM("asm/non_matchings/memory/allocate_at_address_in_main_pool.s") * The free queue will get flushed if the state is set to 0. */ void set_free_queue_state(s32 state) { - s32 *sp2C = func_8006F510(); + s32 *sp2C = clear_status_register_flags(); gFreeQueueState = state; if (state == 0) { // flush free queue if state is 0. while (gFreeQueueCount > 0) { free_slot_containing_address(gFreeQueue[--gFreeQueueCount].dataAddress); } } - func_8006F53C(sp2C); + set_status_register_flags(sp2C); } /** @@ -257,13 +257,13 @@ void set_free_queue_state(s32 state) { * state is set to 0, otherwise the data will just be marked for deletion. */ void free_from_memory_pool(void *data) { - s32 *sp1C = func_8006F510(); + s32 *sp1C = clear_status_register_flags(); if (gFreeQueueState == 0) { free_slot_containing_address(data); } else { func_80071440(data); } - func_8006F53C(sp1C); + set_status_register_flags(sp1C); } /** @@ -273,7 +273,7 @@ void clear_free_queue(void) { s32 i; s32 *sp28; - sp28 = func_8006F510(); + sp28 = clear_status_register_flags(); for (i = 0; i < gFreeQueueCount;) { gFreeQueue[i].unk4--; @@ -287,7 +287,7 @@ void clear_free_queue(void) { } } - func_8006F53C(sp28); + set_status_register_flags(sp28); } #ifdef NON_EQUIVALENT @@ -322,7 +322,7 @@ UNUSED void func_80071314(void) { s32 poolIndex; s32 slotIndex; - sp40 = func_8006F510(); + sp40 = clear_status_register_flags(); for (poolIndex = gNumberOfMemoryPools; poolIndex != -1; poolIndex--) { pool = &gMemoryPools[poolIndex]; @@ -334,12 +334,12 @@ UNUSED void func_80071314(void) { if (slot->flags == 4 && pool->curNumSlots == 1) { free_memory_pool_slot(poolIndex, slotIndex); } else { - func_8006F53C(sp40); + set_status_register_flags(sp40); return; } } } - func_8006F53C(sp40); + set_status_register_flags(sp40); } #else GLOBAL_ASM("asm/non_matchings/memory/func_80071314.s") @@ -357,7 +357,7 @@ s32 func_80071478(u8 *address) { MemoryPool *pool; s32 *sp18; - sp18 = func_8006F510(); + sp18 = clear_status_register_flags(); pool = &gMemoryPools[get_memory_pool_index_containing_address(address)]; slotIndex = 0; while (slotIndex != -1) { @@ -365,13 +365,13 @@ s32 func_80071478(u8 *address) { if (address == (u8 *)slot->data) { if (slot->flags == 1 || slot->flags == 4) { slot->flags |= 2; - func_8006F53C(sp18); + set_status_register_flags(sp18); return 1; } } slotIndex = slot->nextIndex; } - func_8006F53C(sp18); + set_status_register_flags(sp18); return 0; } @@ -381,7 +381,7 @@ s32 func_80071538(u8 *address) { MemoryPool *pool; s32 *sp18; - sp18 = func_8006F510(); + sp18 = clear_status_register_flags(); pool = &gMemoryPools[get_memory_pool_index_containing_address(address)]; slotIndex = 0; while (slotIndex != -1) { @@ -389,13 +389,13 @@ s32 func_80071538(u8 *address) { if (address == (u8 *)slot->data) { if (slot->flags & 2) { slot->flags ^= 2; - func_8006F53C(sp18); + set_status_register_flags(sp18); return 1; } } slotIndex = slot->nextIndex; } - func_8006F53C(sp18); + set_status_register_flags(sp18); return 0; } diff --git a/src/memory.h b/src/memory.h index 9c324279..d002d768 100644 --- a/src/memory.h +++ b/src/memory.h @@ -73,8 +73,8 @@ typedef struct unk800B7D10 { //Functions below don't have files or matches yet unk800B7D10 *get_stack_pointer(void); // Non Matching with own file? -s32 *func_8006F510(void); // Non Matching unknown_070110 -void func_8006F53C(s32*); // Non Matching unknown_070110 +s32 *clear_status_register_flags(void); // Non Matching unknown_070110 +void set_status_register_flags(s32*); // Non Matching unknown_070110 void init_main_memory_pool(void); MemoryPoolSlot *new_sub_memory_pool(s32 poolDataSize, s32 numSlots); diff --git a/src/menu.c b/src/menu.c index 9c020dbc..5a408985 100644 --- a/src/menu.c +++ b/src/menu.c @@ -5663,7 +5663,7 @@ void menu_track_select_init(void) { play_music(SEQUENCE_MAIN_MENU); set_relative_volume_for_music(sMenuMusicVolume); func_80000B18(); - func_8006F564(1); // Set an interrupt? + set_D_800DD430(1); // Set an interrupt? gIsInAdventureTwo = D_800E0418; gMultiplayerSelectedNumberOfRacersCopy = gMultiplayerSelectedNumberOfRacers; } @@ -5828,7 +5828,7 @@ void func_8008F534(void) { func_80000B28(); func_80000C2C(); func_80001844(); - func_8006F564(0); + set_D_800DD430(0); } GLOBAL_ASM("asm/non_matchings/menu/func_8008F618.s") @@ -7995,7 +7995,7 @@ void menu_credits_init(void) { } func_80000B18(); func_800C0170(); - func_8006F564(1); + set_D_800DD430(1); } /** @@ -8028,7 +8028,7 @@ void func_8009BCF0(void) { set_viewport_properties(0, VIEWPORT_AUTO, VIEWPORT_AUTO, VIEWPORT_AUTO, VIEWPORT_AUTO); func_8009C4A8(D_800E17D8); unload_font(ASSET_FONTS_BIGFONT); - func_8006F564(0); + set_D_800DD430(0); } void func_8009BD5C(void) { diff --git a/src/menu.h b/src/menu.h index c72e90a7..0dfdd154 100644 --- a/src/menu.h +++ b/src/menu.h @@ -912,7 +912,7 @@ void func_8009C6D4(s32 arg0); void func_8008B358(void); void func_8008B4C8(void); void func_8008B758(s8 *activePlayers); -void func_8006F564(s8 arg0); +void set_D_800DD430(s8 arg0); void func_80099E8C(s32 updateRate); s32 func_800998E0(s32 arg0); void func_80081218(void); diff --git a/src/object_functions.c b/src/object_functions.c index 5df9da32..50f0160d 100644 --- a/src/object_functions.c +++ b/src/object_functions.c @@ -460,8 +460,8 @@ void obj_loop_effectbox(Object *obj, s32 speed) { level_entry = &obj->segment.unk3C_a.level_entry->effectBox; objList = get_racer_objects(&numberOfObjects); - temp0 = sine_s((level_entry->unkB << 8) * -1); - temp1 = cosine_s((level_entry->unkB << 8) * -1); + temp0 = coss_f((level_entry->unkB << 8) * -1); + temp1 = sins_f((level_entry->unkB << 8) * -1); temp2 = level_entry->unk8 * 3; temp3 = level_entry->unk9 * 3; temp4 = level_entry->unkA * 3; @@ -1462,9 +1462,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 = cosine_s(obj->segment.trans.y_rotation); + obj64->unk0 = sins_f(obj->segment.trans.y_rotation); obj64->unk4 = 0.0f; - obj64->unk8 = sine_s(obj->segment.trans.y_rotation); + obj64->unk8 = coss_f(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->bossFlag; @@ -1637,9 +1637,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 = cosine_s(obj->segment.trans.y_rotation); + obj64->unk0 = sins_f(obj->segment.trans.y_rotation); obj64->unk4 = 0.0f; - obj64->unk8 = sine_s(obj->segment.trans.y_rotation); + obj64->unk8 = coss_f(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; @@ -1662,9 +1662,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 = cosine_s(obj->segment.trans.y_rotation); + obj64->unk0 = sins_f(obj->segment.trans.y_rotation); obj64->unk4 = 0.0f; - obj64->unk8 = sine_s(obj->segment.trans.y_rotation); + obj64->unk8 = coss_f(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; @@ -1927,9 +1927,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 = cosine_s(obj->segment.trans.y_rotation); + obj64->unk0 = sins_f(obj->segment.trans.y_rotation); obj64->unk4 = 0.0f; - obj64->unk8 = sine_s(obj->segment.trans.y_rotation); + obj64->unk8 = coss_f(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 19dacc20..fc84177f 100644 --- a/src/object_functions.h +++ b/src/object_functions.h @@ -224,10 +224,10 @@ extern Triangle D_800DCAA8[8]; extern VertexPosition D_800DCB28[6]; extern u32 osTvType; -f32 cosine_s(s16); // No idea where it's located -f32 sine_s(s16); // No idea where it's located +f32 sins_f(s16); // No idea where it's located +f32 coss_f(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 +s32 atan2s(s32, s32); // Non Matching src/unknown_070110.c void obj_init_fireball_octoweapon(Object *obj, LevelObjectEntry_Fireball_Octoweapon *entry); void obj_init_lasergun(Object *obj, LevelObjectEntry_Lasergun *entry); diff --git a/src/objects.c b/src/objects.c index 6318c460..057cf412 100644 --- a/src/objects.c +++ b/src/objects.c @@ -1267,9 +1267,9 @@ void func_80012E28(Object *this) { sp_1c = 0.0f; if (sp_20->unk1D7 < 5) { - sp_1c = sine_s(sp_20->z_rotation_offset); + sp_1c = coss_f(sp_20->z_rotation_offset); tmp_f2 = sp_1c; - tmp_f0 = sine_s(sp_20->x_rotation_offset - sp_20->unk166) * tmp_f2; + tmp_f0 = coss_f(sp_20->x_rotation_offset - sp_20->unk166) * tmp_f2; tmp_f0 = (tmp_f0 < 0.0f) ? 0.0f : tmp_f0 * tmp_f0; @@ -1354,8 +1354,8 @@ void render_racer_shield(Gfx **dList, Matrix **mtx, VertexList **vtxList, Object D_800DC75C->segment.trans.x_position = shield->x_position; D_800DC75C->segment.trans.y_position = shield->y_position; D_800DC75C->segment.trans.z_position = shield->z_position; - D_800DC75C->segment.trans.y_position += shield->y_offset * cosine_s(D_8011B010[var_a2] * 0x200); - shear = (sine_s(D_8011B010[var_a2] * 0x400) * 0.05f) + 0.95f; + D_800DC75C->segment.trans.y_position += shield->y_offset * sins_f(D_8011B010[var_a2] * 0x200); + shear = (coss_f(D_8011B010[var_a2] * 0x400) * 0.05f) + 0.95f; D_800DC75C->segment.trans.scale = shield->scale * shear; shear = shear * shield->turnSpeed; D_800DC75C->segment.trans.y_rotation = D_8011B010[var_a2] * 0x800; @@ -1428,7 +1428,7 @@ void render_racer_magnet(Gfx **dList, Matrix **mtx, VertexList **vtxList, Object D_800DC764->segment.trans.y_position = magnet[1]; D_800DC764->segment.trans.z_position = magnet[2]; magnet += 3; - shear = (sine_s((D_8011B078[(var_t0 * 4) + 1] * 0x400)) * 0.02f) + 0.98f; + shear = (coss_f((D_8011B078[(var_t0 * 4) + 1] * 0x400)) * 0.02f) + 0.98f; D_800DC764->segment.trans.scale = magnet[0] * shear; magnet += 1; shear = magnet[0] * shear; diff --git a/src/objects.h b/src/objects.h index 090a7c4a..052c017f 100644 --- a/src/objects.h +++ b/src/objects.h @@ -344,7 +344,7 @@ extern s32 D_800DC85C; extern u8 D_800DC860; extern u16 D_800DC864; -f32 sine_s(s16); //? +f32 coss_f(s16); //? Object *func_8000BF44(s32 arg0); void func_8000BF8C(void); diff --git a/src/racer.c b/src/racer.c index 4f6b2447..4dce5ab1 100644 --- a/src/racer.c +++ b/src/racer.c @@ -526,17 +526,17 @@ void update_camera_hovercraft(f32 updateRate, Object *obj, Object_Racer *racer) } gCameraObject->unk1C += (phi_f14 - gCameraObject->unk1C) * 0.125; gCameraObject->unk20 += (phi_f18 - gCameraObject->unk20) * 0.125; - sp34 = cosine_s(gCameraObject->trans.x_rotation - sp24); - phi_f18 = sine_s(gCameraObject->trans.x_rotation - sp24); + sp34 = sins_f(gCameraObject->trans.x_rotation - sp24); + phi_f18 = coss_f(gCameraObject->trans.x_rotation - sp24); phi_f18 = (gCameraObject->unk1C * sp34) + (gCameraObject->unk20 * phi_f18); - xVel = cosine_s(-racer->unk196 + 0x8000) * gCameraObject->unk1C; - zVel = sine_s(-racer->unk196 + 0x8000) * gCameraObject->unk1C; + xVel = sins_f(-racer->unk196 + 0x8000) * gCameraObject->unk1C; + zVel = coss_f(-racer->unk196 + 0x8000) * gCameraObject->unk1C; yVel = (1.0 - (D_8011D586 / 10240.0f)); xVel -= racer->ox1 * 10.0f * yVel; zVel -= racer->oz1 * 10.0f * yVel; yVel = racer->lateral_velocity * 2; racer->unkC8 -= (racer->unkC8 - yVel) * 0.25; - yVel = cosine_s(racer->unk196 + 0x4000) * racer->unkC8; + yVel = sins_f(racer->unk196 + 0x4000) * racer->unkC8; gCameraObject->trans.x_position = obj->segment.trans.x_position + xVel + yVel; yVel = gCameraObject->trans.y_position - (obj->segment.trans.y_position + phi_f18); if (yVel > 0.0f) { @@ -557,7 +557,7 @@ void update_camera_hovercraft(f32 updateRate, Object *obj, Object_Racer *racer) gCameraObject->trans.y_position = obj->segment.trans.y_position + phi_f18; } - sine_s(racer->unk196 + 0x4000); // Unused function call that wasn't fully optimised out. + coss_f(racer->unk196 + 0x4000); // Unused function call that wasn't fully optimised out. gCameraObject->trans.z_position = obj->segment.trans.z_position + zVel; gCameraObject->trans.y_rotation = racer->unk196; segmentIndex = get_level_segment_index_from_position(gCameraObject->trans.x_position, gCameraObject->trans.y_position, gCameraObject->trans.z_position); @@ -597,7 +597,7 @@ f32 func_800494E0(Object *obj1, Object_Racer *racer, f32 *pos, s8 arg3, s32 upda D_8011D510.y_position = 0.0f; D_8011D510.z_position = 0.0f; D_8011D510.scale = 1.0f; - func_8006FE74(&mtx, &D_8011D510); + object_transform_to_matrix_2(&mtx, &D_8011D510); guMtxXFMF(mtx, pos[0], pos[1], pos[2], &pos[0], &pos[1], &pos[2]); angle = -((s16) (u16)arctan2_f(pos[0], pos[1])) * velocity; angle = (u16) (angle - (arg5 << 6)) - (u16) racer->x_rotation_vel; @@ -840,15 +840,15 @@ void update_camera_plane(f32 updateRate, Object* obj, Object_Racer* racer) { } gCameraObject->unk1C += (phi_f14 - gCameraObject->unk1C) * 0.125; gCameraObject->unk20 += (baseFloat1 - gCameraObject->unk20) * 0.125; - phi_f14 = cosine_s(gCameraObject->trans.x_rotation - 0x400); - xOffset = sine_s(gCameraObject->trans.x_rotation - 0x400); + phi_f14 = sins_f(gCameraObject->trans.x_rotation - 0x400); + xOffset = coss_f(gCameraObject->trans.x_rotation - 0x400); baseFloat3 = phi_f14; baseFloat2 = (gCameraObject->unk1C * baseFloat3) - (gCameraObject->unk20 * xOffset); baseFloat1 = ((gCameraObject->unk1C) * (gCameraObject->unk1C)); baseFloat1 += (gCameraObject->unk20 * baseFloat3); - xOffset = cosine_s(0x8000 - racer->unk196) * baseFloat2; - zOffset = sine_s(0x8000 - racer->unk196) * baseFloat2; - yVel = cosine_s(racer->unk196 + 0x4000) * 3.0f; + xOffset = sins_f(0x8000 - racer->unk196) * baseFloat2; + zOffset = coss_f(0x8000 - racer->unk196) * baseFloat2; + yVel = sins_f(racer->unk196 + 0x4000) * 3.0f; yVel = yVel * racer->lateral_velocity; gCameraObject->trans.x_position = (obj->segment.trans.x_position + xOffset) + yVel; temp_f16 = obj->segment.trans.y_position; @@ -873,7 +873,7 @@ void update_camera_plane(f32 updateRate, Object* obj, Object_Racer* racer) { yVel = yOffset; } gCameraObject->trans.y_position -= yVel; - gCameraObject->trans.z_position = zOffset + obj->segment.trans.z_position + (-sine_s(racer->unk196 + 0x4000) * 3.0f * racer->lateral_velocity); + gCameraObject->trans.z_position = zOffset + obj->segment.trans.z_position + (-coss_f(racer->unk196 + 0x4000) * 3.0f * racer->lateral_velocity); gCameraObject->trans.y_rotation = racer->unk196; if (racer->unk1E0 || D_8011D586) { angle = -(u16) gCameraObject->trans.z_rotation; @@ -950,12 +950,12 @@ void update_camera_loop(f32 updateRate, Object* obj, Object_Racer* racer) { D_8011D510.y_position = 0.0f; D_8011D510.z_position = 0.0f; D_8011D510.scale = 1.0f; - func_8006FC30(mtx, &D_8011D510); + object_transform_to_matrix(mtx, &D_8011D510); guMtxXFMF(mtx, 0.0f, 0.0f, gCameraObject->unk1C, &xVel, &yVel, &zVel); gCameraObject->trans.x_position = obj->segment.trans.x_position + xVel; gCameraObject->trans.y_position = obj->segment.trans.y_position + yVel; gCameraObject->trans.z_position = obj->segment.trans.z_position + zVel; - guMtxXFMF(mtx, 0.0f, cosine_s(0x800) * gCameraObject->unk1C, 0.0f, &xVel, &yVel, &zVel); + guMtxXFMF(mtx, 0.0f, sins_f(0x800) * gCameraObject->unk1C, 0.0f, &xVel, &yVel, &zVel); gCameraObject->trans.x_position += xVel; gCameraObject->trans.y_position += yVel; gCameraObject->trans.z_position += zVel; @@ -1247,8 +1247,8 @@ void update_player_racer(Object* obj, s32 updateRate) { } } if (tempRacer->unk1FE == 2) { - tempRacer->unk84 += ((cosine_s((tempRacer->unk1FF << 8)) * 4.0f) - tempRacer->unk84) * 0.0625 * delta; - tempRacer->unk88 += ((sine_s((tempRacer->unk1FF << 8)) * 4.0f) - tempRacer->unk88) * 0.0625 * delta; + tempRacer->unk84 += ((sins_f((tempRacer->unk1FF << 8)) * 4.0f) - tempRacer->unk84) * 0.0625 * delta; + tempRacer->unk88 += ((coss_f((tempRacer->unk1FF << 8)) * 4.0f) - tempRacer->unk88) * 0.0625 * delta; } else { tempRacer->unk84 -= tempRacer->unk84 * 0.0625 * delta; tempRacer->unk88 -= tempRacer->unk88 * 0.0625 * delta; @@ -2256,7 +2256,7 @@ void func_800535C4(unk800535C4 *arg0, unk800535C4_2 *arg1) { D_8011D510.y_position = 0; D_8011D510.z_position = 0; D_8011D510.scale = 1; - func_8006FE74(&mf, &D_8011D510); + object_transform_to_matrix_2(&mf, &D_8011D510); guMtxXFMF(mf, 0.0f, -1.0f, 0.0f, &arg1->ox, &arg1->oy, &arg1->oz); } @@ -2448,7 +2448,7 @@ void func_80054110(Object *obj, Object_Racer *racer, s32 updateRate, f32 updateR D_8011D510.y_position = 0.0f; D_8011D510.z_position = 0.0f; D_8011D510.scale = 1.0f; - func_8006FE74(&mtx, &D_8011D510); + object_transform_to_matrix_2(&mtx, &D_8011D510); guMtxXFMF(mtx, racer->lateral_velocity, 0.0f, racer->velocity, &obj->segment.x_velocity, &tempVel, &obj->segment.z_velocity); } if (racer->unk175) { @@ -2490,7 +2490,7 @@ void func_80054110(Object *obj, Object_Racer *racer, s32 updateRate, f32 updateR D_8011D510.y_position = 0.0f; D_8011D510.z_position = 0.0f; D_8011D510.scale = 1.0f; - func_8006FE74(&mtx, &D_8011D510); + object_transform_to_matrix_2(&mtx, &D_8011D510); guMtxXFMF(mtx, xVel, 0.0f, zVel, &hVel, &tempVel, &yVel); if (racer->unk1D2) { racer->unk1D2 -= updateRate; @@ -2739,8 +2739,8 @@ void func_80055A84(Object *obj, Object_Racer *racer, s32 updateRate) { obj->segment.trans.z_position = racer->unkD8.z; if (racer->unk1E2) { func_8002ACD4(&xTemp, &yTemp, &zTemp); - angleX = cosine_s(-obj->segment.trans.y_rotation); - angleZ = sine_s(-obj->segment.trans.y_rotation); + angleX = sins_f(-obj->segment.trans.y_rotation); + angleZ = coss_f(-obj->segment.trans.y_rotation); distance = (xTemp * angleZ) + (zTemp * angleX); zTemp = (xTemp * angleX) - (zTemp * angleZ); temp_v1_2 = -(s16)(u16)arctan2_f(distance, yTemp); @@ -2954,7 +2954,7 @@ void func_800575EC(Object *obj, Object_Racer *racer) { D_8011D510.y_position = 0.0f; D_8011D510.z_position = 0.0f; D_8011D510.scale = 1.0f; - func_8006FC30(mf, &D_8011D510); + object_transform_to_matrix(mf, &D_8011D510); guMtxXFMF(mf, 0.0f, 0.0f, 1.0f, &racer->ox1, &racer->oy1, &racer->oz1); guMtxXFMF(mf, 0.0f, 1.0f, 0.0f, &racer->ox2, &racer->oy2, &racer->oz2); guMtxXFMF(mf, 1.0f, 0.0f, 0.0f, &racer->ox3, &racer->oy3, &racer->oz3); @@ -3244,13 +3244,13 @@ void update_camera_car(f32 updateRate, Object *obj, Object_Racer *racer) { } gCameraObject->unk1C += (baseDistance - gCameraObject->unk1C) * 0.125; gCameraObject->unk20 += (yVel - gCameraObject->unk20) * 0.125; - cosOffset = cosine_s(gCameraObject->trans.x_rotation - baseAngle); - sineOffset = sine_s(gCameraObject->trans.x_rotation - baseAngle); + cosOffset = sins_f(gCameraObject->trans.x_rotation - baseAngle); + sineOffset = coss_f(gCameraObject->trans.x_rotation - baseAngle); lateralOffset = gCameraObject->unk1C; lateralOffset = (lateralOffset * sineOffset) - (gCameraObject->unk20 * cosOffset); yVel = (gCameraObject->unk1C * cosOffset) + (gCameraObject->unk20 * sineOffset); - sineOffset = cosine_s(-racer->unk196 + 0x8000) * lateralOffset; - cosOffset = sine_s(-racer->unk196 + 0x8000) * lateralOffset; + sineOffset = sins_f(-racer->unk196 + 0x8000) * lateralOffset; + cosOffset = coss_f(-racer->unk196 + 0x8000) * lateralOffset; baseDistance = 0.0f; if (gCurrentRacerInput & A_BUTTON) { baseDistance = racer->lateral_velocity * 1.3; @@ -3278,7 +3278,7 @@ void update_camera_car(f32 updateRate, Object *obj, Object_Racer *racer) { xOffset = obj->segment.trans.x_position - (racer->ox1 * racer->camera_zoom); yOffset = obj->segment.trans.y_position - (racer->oy1 * racer->camera_zoom); zOffset = obj->segment.trans.z_position - (racer->oz1 * racer->camera_zoom); - tempVel = cosine_s(racer->unk196 + 0x4000) * racer->unkC8; + tempVel = sins_f(racer->unk196 + 0x4000) * racer->unkC8; baseDistance = xOffset + tempVel; gCameraObject->trans.x_position = sineOffset + baseDistance; yOffset += yVel; @@ -3290,7 +3290,7 @@ void update_camera_car(f32 updateRate, Object *obj, Object_Racer *racer) { if (temp_f16 > 0.0f || gRaceStartTimer) { gCameraObject->trans.y_position = yOffset; } - gCameraObject->trans.z_position = zOffset + (-sine_s(racer->unk196 + 0x4000) * racer->unkC8) + cosOffset; + gCameraObject->trans.z_position = zOffset + (-coss_f(racer->unk196 + 0x4000) * racer->unkC8) + cosOffset; gCameraObject->trans.y_rotation = racer->unk196; newAngle = gCameraObject->trans.z_rotation; if ((racer->drift_direction && racer->brake > 0.0) || D_8011D586) { @@ -3305,7 +3305,7 @@ void update_camera_car(f32 updateRate, Object *obj, Object_Racer *racer) { if (gCameraObject->trans.z_rotation < -0x2000) { gCameraObject->trans.z_rotation = -0x2000; } - gCameraObject->trans.y_position -= racer->unkC8 * cosine_s(gCameraObject->trans.z_rotation); + gCameraObject->trans.y_position -= racer->unkC8 * sins_f(gCameraObject->trans.z_rotation); lateralOffset = (yOffset = gCameraObject->trans.x_position); segmentIndex = get_level_segment_index_from_position(lateralOffset, gCameraObject->trans.y_position, gCameraObject->trans.z_position); if (segmentIndex != -1) { @@ -3333,8 +3333,8 @@ void update_camera_finish_challenge(UNUSED f32 updateRate, Object *obj, Object_R gCameraObject->trans.x_rotation = 0x400; gCameraObject->trans.z_rotation = 0; gCameraObject->unk1C = 150.0f; - xOffset = cosine_s(0x8000 - gCameraObject->trans.y_rotation) * gCameraObject->unk1C; - zOffset = sine_s(0x8000 - gCameraObject->trans.y_rotation) * gCameraObject->unk1C; + xOffset = sins_f(0x8000 - gCameraObject->trans.y_rotation) * gCameraObject->unk1C; + zOffset = coss_f(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) { @@ -3377,8 +3377,8 @@ void update_camera_finish_race(UNUSED f32 updateRate, Object *obj, Object_Racer yDiff = gCameraObject->trans.y_position - obj->segment.trans.y_position; zDiff = gCameraObject->trans.z_position - obj->segment.trans.z_position; distance = sqrtf((xDiff * xDiff) + (zDiff * zDiff)); - gCameraObject->trans.y_rotation = (s16) (0x8000 - func_8007066C((s32) xDiff, (s32) zDiff)); - gCameraObject->trans.x_rotation = func_8007066C((s32) yDiff, (s32) distance); + gCameraObject->trans.y_rotation = (s16) (0x8000 - atan2s((s32) xDiff, (s32) zDiff)); + gCameraObject->trans.x_rotation = atan2s((s32) yDiff, (s32) distance); gCameraObject->trans.z_rotation = 0; gCameraObject->segmentIndex = get_level_segment_index_from_position(gCameraObject->trans.x_position, racer->oy1, gCameraObject->trans.z_position); } @@ -3394,7 +3394,7 @@ void update_camera_fixed(f32 updateRate, Object *obj, Object_Racer *racer) { delta = (s32) updateRate; xDiff = gCameraObject->trans.x_position - obj->segment.trans.x_position; zDiff = gCameraObject->trans.z_position - obj->segment.trans.z_position; - gCameraObject->trans.y_rotation += ((((-func_8007066C((s32) xDiff, (s32) zDiff)) - + gCameraObject->trans.y_rotation += ((((-atan2s((s32) xDiff, (s32) zDiff)) - gCameraObject->trans.y_rotation) + 0x8000) * delta) >> 4; gCameraObject->trans.z_rotation -= (((s32) (gCameraObject->trans.z_rotation * delta)) >> 4); gCameraObject->segmentIndex = get_level_segment_index_from_position(gCameraObject->trans.x_position, @@ -3745,8 +3745,8 @@ void func_8005A6F0(Object *obj, Object_Racer *racer, s32 updateRate, f32 updateR gCurrentStickY = 60; } if (racer->unk1FE == 2) { - racer->unk84 += ((((cosine_s(racer->unk1FF << 8) * 4) - racer->unk84) * 0.0625 * updateRateF)); - racer->unk88 += ((((sine_s (racer->unk1FF << 8) * 4) - racer->unk88) * 0.0625 * updateRateF)); + racer->unk84 += ((((sins_f(racer->unk1FF << 8) * 4) - racer->unk84) * 0.0625 * updateRateF)); + racer->unk88 += ((((coss_f (racer->unk1FF << 8) * 4) - racer->unk88) * 0.0625 * updateRateF)); } else { racer->unk84 -= racer->unk84 * 0.0625 * updateRateF; racer->unk88 -= racer->unk88 * 0.0625 * updateRateF; diff --git a/src/racer.h b/src/racer.h index 52f7ebc7..f467143b 100644 --- a/src/racer.h +++ b/src/racer.h @@ -197,8 +197,8 @@ extern f32 D_8011D544; extern struct TempStruct8 **D_8011D5B0; s32 get_random_number_from_range(s32, s32); //? -void func_8006FC30(Matrix, ObjectTransform *); // asm func -void func_8006FE74(Matrix *, ObjectTransform *); // Non Matching ? +void object_transform_to_matrix(Matrix, ObjectTransform *); // asm func +void object_transform_to_matrix_2(Matrix *, ObjectTransform *); // Non Matching ? s32 func_80044450(s32 cap); void func_8004C0A0(s32 updateRate, Object *obj, Object_Racer *racer); diff --git a/src/unknown_0255E0.c b/src/unknown_0255E0.c index 241b59f6..857555f2 100644 --- a/src/unknown_0255E0.c +++ b/src/unknown_0255E0.c @@ -1999,7 +1999,7 @@ void func_80031018(void) { trans.z_position = 0.0f; trans.scale = 1.0f; - func_8006FC30(mf, &trans); + object_transform_to_matrix(mf, &trans); guMtxXFMF(mf, x, y, z, &x, &y, &z); //Store x/y/z as integers diff --git a/src/unknown_0255E0.h b/src/unknown_0255E0.h index 443f9971..1a0ed870 100644 --- a/src/unknown_0255E0.h +++ b/src/unknown_0255E0.h @@ -88,7 +88,7 @@ extern s32 D_800DC928; extern s8 D_800DC92C[24]; -void func_8006FC30(Matrix, ObjectTransform *); // asm func +void object_transform_to_matrix(Matrix, ObjectTransform *); // asm func s32 func_800249E0(s32 arg0); void func_800257D0(void); diff --git a/src/unknown_032760.c b/src/unknown_032760.c index 2e2ca77d..8e4c4a7d 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 = sine_s(sqrtf(D_8011D4C0) * arg0->unk6C * 16384.0f); + temp = coss_f(sqrtf(D_8011D4C0) * arg0->unk6C * 16384.0f); out *= temp; break; case 4: - temp = sine_s(sqrtf(D_8011D4C0) * arg0->unk6C * 16384.0f); + temp = coss_f(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 025af2c9..de781165 100644 --- a/src/unknown_032760.h +++ b/src/unknown_032760.h @@ -82,7 +82,7 @@ typedef struct unk800DC964 { extern unk800DC950 **D_800DC950; -f32 sine_s(s16); //? +f32 coss_f(s16); //? void func_80031B60(void); void func_80032210(unk800DC950 *arg0); diff --git a/src/weather.c b/src/weather.c index 44b268a8..6510fab3 100644 --- a/src/weather.c +++ b/src/weather.c @@ -252,9 +252,9 @@ void func_800ABB34(void) { phi_s1 = 0; for(i = 0; i < D_800E28D8.unk4; i++) { - D_800E28D8.unk0[i].unk0 = func_8007082C(phi_s1 & 0xFFFF) << 3; + D_800E28D8.unk0[i].unk0 = coss(phi_s1 & 0xFFFF) << 3; D_800E28D8.unk0[i].unk4 = 0xFFFC0000; - D_800E28D8.unk0[i].unk8 = func_80070830(phi_s1 & 0xFFFF) << 1; + D_800E28D8.unk0[i].unk8 = sins(phi_s1 & 0xFFFF) << 1; phi_s1 += temp_v0; } @@ -561,8 +561,8 @@ void handle_rain_sound(UNUSED s32 updateRate) { f32 sineOffset; length = 1152.0f - (f32) (gLightningFrequency >> 6); - cosOffset = cosine_s(D_80127C1C->trans.y_rotation) * length; - sineOffset = sine_s(D_80127C1C->trans.y_rotation) * length; + cosOffset = sins_f(D_80127C1C->trans.y_rotation) * length; + sineOffset = coss_f(D_80127C1C->trans.y_rotation) * length; xPos = D_80127C1C->trans.x_position + (sineOffset - cosOffset); yPos = D_80127C1C->trans.y_position; zPos = D_80127C1C->trans.z_position + (-sineOffset - cosOffset); diff --git a/src/weather.h b/src/weather.h index 13b19c9d..92904317 100644 --- a/src/weather.h +++ b/src/weather.h @@ -98,11 +98,11 @@ void process_weather(Gfx **currDisplayList, Matrix **currHudMat, VertexList **cu void render_falling_snow(void); void free_weather_memory(void); -s32 func_8007082C(s16); -s32 func_80070830(s16); +s32 coss(s16); +s32 sins(s16); void func_800AB1F0(void); s32 func_800AC0C8(s32, unk80127BF8 *); -void func_8006F6EC(Matrix *arg0, Matrix *arg1, Matrix *arg2); +void f32_matrix_dot(Matrix *arg0, Matrix *arg1, Matrix *arg2); void func_800AC21C(void); #endif