From 3aa76152c56ab56af9e253fcef86115ccbb628d2 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Mon, 23 Nov 2020 20:34:32 -0600 Subject: [PATCH] En_Attack_Niw, En_Insect, z_skin_matrix, and z_skelanime matched (#493) * Darkmeiro decompilation Bg_Gnd_Darkmeiro decompiled, matched, and documented. * give this a shot * fix conflict * one more try * could be useful * whoops * ZAP2 stuff * ZAP why * ZAP again * marginal improvement * matched functions. Also fixed a serious lack of static * format * more static * fixing a function prototype * skelanime OK * forgot .s * skin matrix matched * format --- .../code/z_skelanime/func_800A29BC.s | 285 ------------------ .../code/z_skin_matrix/SkinMatrix_Invert.s | 207 ------------- .../code/z_skin_matrix/func_800A7EC0.s | 94 ------ .../actors/ovl_En_Attack_Niw/func_809B5670.s | 233 -------------- .../actors/ovl_En_Insect/func_80A7C86C.s | 157 ---------- data/overlays/actors/z_en_attack_niw.reloc.s | 13 - data/overlays/actors/z_en_insect.reloc.s | 13 - include/functions.h | 2 +- spec | 8 - src/code/z_eff_blure.c | 21 +- src/code/z_skelanime.c | 7 +- src/code/z_skin_matrix.c | 115 +++---- .../actors/ovl_Arms_Hook/z_arms_hook.c | 18 +- .../actors/ovl_Bg_Dodoago/z_bg_dodoago.c | 10 +- .../ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c | 2 +- .../ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c | 8 +- .../z_bg_hidan_firewall.c | 2 +- .../ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c | 8 +- .../ovl_Bg_Jya_1flift/z_bg_jya_1flift.c | 12 +- .../actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c | 2 +- .../ovl_Bg_Jya_Megami/z_bg_jya_megami.c | 8 +- .../ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c | 2 +- .../z_bg_spot01_objects2.c | 2 +- .../z_bg_spot08_bakudankabe.c | 2 +- .../z_bg_spot11_bakudankabe.c | 4 +- .../ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c | 4 +- .../ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c | 6 +- .../z_bg_spot16_bombstone.c | 2 +- .../ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c | 12 +- .../actors/ovl_Bg_Treemouth/z_bg_treemouth.c | 2 +- .../actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c | 2 +- .../ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c | 16 +- src/overlays/actors/ovl_Demo_Go/z_demo_go.c | 6 +- src/overlays/actors/ovl_Demo_Im/z_demo_im.c | 6 +- src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c | 6 +- src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c | 6 +- src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c | 4 +- src/overlays/actors/ovl_En_Ani/z_en_ani.c | 2 +- .../ovl_En_Attack_Niw/z_en_attack_niw.c | 16 +- .../actors/ovl_En_Blkobj/z_en_blkobj.c | 4 +- .../actors/ovl_En_Encount1/z_en_encount1.c | 7 +- src/overlays/actors/ovl_En_GirlA/z_en_girla.c | 12 +- src/overlays/actors/ovl_En_Gs/z_en_gs.c | 8 +- src/overlays/actors/ovl_En_Guest/z_en_guest.c | 2 +- .../actors/ovl_En_Heishi1/z_en_heishi1.c | 12 +- .../ovl_En_Horse_Ganon/z_en_horse_ganon.c | 4 +- .../z_en_horse_link_child.c | 4 +- .../ovl_En_Horse_Normal/z_en_horse_normal.c | 4 +- .../actors/ovl_En_Insect/z_en_insect.c | 21 +- src/overlays/actors/ovl_En_Light/z_en_light.c | 2 +- src/overlays/actors/ovl_En_Ma1/z_en_ma1.c | 10 +- .../actors/ovl_En_Niw_Girl/z_en_niw_girl.c | 2 +- src/overlays/actors/ovl_En_Rl/z_en_rl.c | 6 +- .../ovl_En_Wonder_Talk2/z_en_wonder_talk2.c | 2 +- .../actors/ovl_En_Yukabyun/z_en_yukabyun.c | 2 +- src/overlays/actors/ovl_En_Zl1/z_en_zl1.c | 4 +- src/overlays/actors/ovl_En_Zl2/z_en_zl2.c | 4 +- .../actors/ovl_Magic_Wind/z_magic_wind.c | 20 +- src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c | 4 +- .../actors/ovl_Obj_Hsblock/z_obj_hsblock.c | 2 +- .../actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c | 12 +- 61 files changed, 209 insertions(+), 1264 deletions(-) delete mode 100644 asm/non_matchings/code/z_skelanime/func_800A29BC.s delete mode 100644 asm/non_matchings/code/z_skin_matrix/SkinMatrix_Invert.s delete mode 100644 asm/non_matchings/code/z_skin_matrix/func_800A7EC0.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Attack_Niw/func_809B5670.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Insect/func_80A7C86C.s delete mode 100644 data/overlays/actors/z_en_attack_niw.reloc.s delete mode 100644 data/overlays/actors/z_en_insect.reloc.s diff --git a/asm/non_matchings/code/z_skelanime/func_800A29BC.s b/asm/non_matchings/code/z_skelanime/func_800A29BC.s deleted file mode 100644 index 6969122af0..0000000000 --- a/asm/non_matchings/code/z_skelanime/func_800A29BC.s +++ /dev/null @@ -1,285 +0,0 @@ -glabel func_800A29BC -/* B19B5C 800A29BC 00047100 */ sll $t6, $a0, 4 -/* B19B60 800A29C0 3C0B8016 */ lui $t3, %hi(gSegments) # $t3, 0x8016 -/* B19B64 800A29C4 000E7F02 */ srl $t7, $t6, 0x1c -/* B19B68 800A29C8 256B6FA8 */ addiu $t3, %lo(gSegments) # addiu $t3, $t3, 0x6fa8 -/* B19B6C 800A29CC 000FC080 */ sll $t8, $t7, 2 -/* B19B70 800A29D0 0178C821 */ addu $t9, $t3, $t8 -/* B19B74 800A29D4 8F2E0000 */ lw $t6, ($t9) -/* B19B78 800A29D8 3C0C00FF */ lui $t4, (0x00FFFFFF >> 16) # lui $t4, 0xff -/* B19B7C 800A29DC 358CFFFF */ ori $t4, (0x00FFFFFF & 0xFFFF) # ori $t4, $t4, 0xffff -/* B19B80 800A29E0 008C7824 */ and $t7, $a0, $t4 -/* B19B84 800A29E4 3C0D8000 */ lui $t5, 0x8000 -/* B19B88 800A29E8 01CFC021 */ addu $t8, $t6, $t7 -/* B19B8C 800A29EC 030D1021 */ addu $v0, $t8, $t5 -/* B19B90 800A29F0 8C480008 */ lw $t0, 8($v0) -/* B19B94 800A29F4 8C4A0004 */ lw $t2, 4($v0) -/* B19B98 800A29F8 84430002 */ lh $v1, 2($v0) -/* B19B9C 800A29FC 0008C900 */ sll $t9, $t0, 4 -/* B19BA0 800A2A00 00197702 */ srl $t6, $t9, 0x1c -/* B19BA4 800A2A04 000E7880 */ sll $t7, $t6, 2 -/* B19BA8 800A2A08 016FC021 */ addu $t8, $t3, $t7 -/* B19BAC 800A2A0C 8F190000 */ lw $t9, ($t8) -/* B19BB0 800A2A10 010C7024 */ and $t6, $t0, $t4 -/* B19BB4 800A2A14 000AC100 */ sll $t8, $t2, 4 -/* B19BB8 800A2A18 032E7821 */ addu $t7, $t9, $t6 -/* B19BBC 800A2A1C 0018CF02 */ srl $t9, $t8, 0x1c -/* B19BC0 800A2A20 01ED3821 */ addu $a3, $t7, $t5 -/* B19BC4 800A2A24 00197080 */ sll $t6, $t9, 2 -/* B19BC8 800A2A28 016E7821 */ addu $t7, $t3, $t6 -/* B19BCC 800A2A2C 8DF80000 */ lw $t8, ($t7) -/* B19BD0 800A2A30 84EF0000 */ lh $t7, ($a3) -/* B19BD4 800A2A34 014CC824 */ and $t9, $t2, $t4 -/* B19BD8 800A2A38 03197021 */ addu $t6, $t8, $t9 -/* B19BDC 800A2A3C 00AF082A */ slt $at, $a1, $t7 -/* B19BE0 800A2A40 10200009 */ beqz $at, .L800A2A68 -/* B19BE4 800A2A44 01CD4821 */ addu $t1, $t6, $t5 -/* B19BE8 800A2A48 84EE0002 */ lh $t6, 2($a3) -/* B19BEC 800A2A4C 0005C040 */ sll $t8, $a1, 1 -/* B19BF0 800A2A50 0309C821 */ addu $t9, $t8, $t1 -/* B19BF4 800A2A54 000E7840 */ sll $t7, $t6, 1 -/* B19BF8 800A2A58 032FC021 */ addu $t8, $t9, $t7 -/* B19BFC 800A2A5C 870E0000 */ lh $t6, ($t8) -/* B19C00 800A2A60 10000006 */ b .L800A2A7C -/* B19C04 800A2A64 A4CE0000 */ sh $t6, ($a2) -.L800A2A68: -/* B19C08 800A2A68 84F90002 */ lh $t9, 2($a3) -/* B19C0C 800A2A6C 00197840 */ sll $t7, $t9, 1 -/* B19C10 800A2A70 012FC021 */ addu $t8, $t1, $t7 -/* B19C14 800A2A74 870E0000 */ lh $t6, ($t8) -/* B19C18 800A2A78 A4CE0000 */ sh $t6, ($a2) -.L800A2A7C: -/* B19C1C 800A2A7C 84F90004 */ lh $t9, 4($a3) -/* B19C20 800A2A80 24020001 */ li $v0, 1 -/* B19C24 800A2A84 30640001 */ andi $a0, $v1, 1 -/* B19C28 800A2A88 00B9082A */ slt $at, $a1, $t9 -/* B19C2C 800A2A8C 5020000A */ beql $at, $zero, .L800A2AB8 -/* B19C30 800A2A90 84F80006 */ lh $t8, 6($a3) -/* B19C34 800A2A94 84EE0006 */ lh $t6, 6($a3) -/* B19C38 800A2A98 00057840 */ sll $t7, $a1, 1 -/* B19C3C 800A2A9C 01E9C021 */ addu $t8, $t7, $t1 -/* B19C40 800A2AA0 000EC840 */ sll $t9, $t6, 1 -/* B19C44 800A2AA4 03197821 */ addu $t7, $t8, $t9 -/* B19C48 800A2AA8 85EE0000 */ lh $t6, ($t7) -/* B19C4C 800A2AAC 10000006 */ b .L800A2AC8 -/* B19C50 800A2AB0 A4CE0002 */ sh $t6, 2($a2) -/* B19C54 800A2AB4 84F80006 */ lh $t8, 6($a3) -.L800A2AB8: -/* B19C58 800A2AB8 0018C840 */ sll $t9, $t8, 1 -/* B19C5C 800A2ABC 01397821 */ addu $t7, $t1, $t9 -/* B19C60 800A2AC0 85EE0000 */ lh $t6, ($t7) -/* B19C64 800A2AC4 A4CE0002 */ sh $t6, 2($a2) -.L800A2AC8: -/* B19C68 800A2AC8 84F80008 */ lh $t8, 8($a3) -/* B19C6C 800A2ACC 00B8082A */ slt $at, $a1, $t8 -/* B19C70 800A2AD0 5020000A */ beql $at, $zero, .L800A2AFC -/* B19C74 800A2AD4 84EF000A */ lh $t7, 0xa($a3) -/* B19C78 800A2AD8 84EE000A */ lh $t6, 0xa($a3) -/* B19C7C 800A2ADC 0005C840 */ sll $t9, $a1, 1 -/* B19C80 800A2AE0 03297821 */ addu $t7, $t9, $t1 -/* B19C84 800A2AE4 000EC040 */ sll $t8, $t6, 1 -/* B19C88 800A2AE8 01F8C821 */ addu $t9, $t7, $t8 -/* B19C8C 800A2AEC 872E0000 */ lh $t6, ($t9) -/* B19C90 800A2AF0 10000006 */ b .L800A2B0C -/* B19C94 800A2AF4 A4CE0004 */ sh $t6, 4($a2) -/* B19C98 800A2AF8 84EF000A */ lh $t7, 0xa($a3) -.L800A2AFC: -/* B19C9C 800A2AFC 000FC040 */ sll $t8, $t7, 1 -/* B19CA0 800A2B00 0138C821 */ addu $t9, $t1, $t8 -/* B19CA4 800A2B04 872E0000 */ lh $t6, ($t9) -/* B19CA8 800A2B08 A4CE0004 */ sh $t6, 4($a2) -.L800A2B0C: -/* B19CAC 800A2B0C 24C60006 */ addiu $a2, $a2, 6 -/* B19CB0 800A2B10 186000A8 */ blez $v1, .L800A2DB4 -/* B19CB4 800A2B14 24E7000C */ addiu $a3, $a3, 0xc -/* B19CB8 800A2B18 5080003A */ beql $a0, $zero, .L800A2C04 -/* B19CBC 800A2B1C 84F80000 */ lh $t8, ($a3) -/* B19CC0 800A2B20 84EF0000 */ lh $t7, ($a3) -/* B19CC4 800A2B24 24020002 */ li $v0, 2 -/* B19CC8 800A2B28 00AF082A */ slt $at, $a1, $t7 -/* B19CCC 800A2B2C 5020000A */ beql $at, $zero, .L800A2B58 -/* B19CD0 800A2B30 84F90002 */ lh $t9, 2($a3) -/* B19CD4 800A2B34 84EE0002 */ lh $t6, 2($a3) -/* B19CD8 800A2B38 0005C040 */ sll $t8, $a1, 1 -/* B19CDC 800A2B3C 0309C821 */ addu $t9, $t8, $t1 -/* B19CE0 800A2B40 000E7840 */ sll $t7, $t6, 1 -/* B19CE4 800A2B44 032FC021 */ addu $t8, $t9, $t7 -/* B19CE8 800A2B48 870E0000 */ lh $t6, ($t8) -/* B19CEC 800A2B4C 10000006 */ b .L800A2B68 -/* B19CF0 800A2B50 A4CE0000 */ sh $t6, ($a2) -/* B19CF4 800A2B54 84F90002 */ lh $t9, 2($a3) -.L800A2B58: -/* B19CF8 800A2B58 00197840 */ sll $t7, $t9, 1 -/* B19CFC 800A2B5C 012FC021 */ addu $t8, $t1, $t7 -/* B19D00 800A2B60 870E0000 */ lh $t6, ($t8) -/* B19D04 800A2B64 A4CE0000 */ sh $t6, ($a2) -.L800A2B68: -/* B19D08 800A2B68 84F90004 */ lh $t9, 4($a3) -/* B19D0C 800A2B6C 00B9082A */ slt $at, $a1, $t9 -/* B19D10 800A2B70 5020000A */ beql $at, $zero, .L800A2B9C -/* B19D14 800A2B74 84F80006 */ lh $t8, 6($a3) -/* B19D18 800A2B78 84EE0006 */ lh $t6, 6($a3) -/* B19D1C 800A2B7C 00057840 */ sll $t7, $a1, 1 -/* B19D20 800A2B80 01E9C021 */ addu $t8, $t7, $t1 -/* B19D24 800A2B84 000EC840 */ sll $t9, $t6, 1 -/* B19D28 800A2B88 03197821 */ addu $t7, $t8, $t9 -/* B19D2C 800A2B8C 85EE0000 */ lh $t6, ($t7) -/* B19D30 800A2B90 10000006 */ b .L800A2BAC -/* B19D34 800A2B94 A4CE0002 */ sh $t6, 2($a2) -/* B19D38 800A2B98 84F80006 */ lh $t8, 6($a3) -.L800A2B9C: -/* B19D3C 800A2B9C 0018C840 */ sll $t9, $t8, 1 -/* B19D40 800A2BA0 01397821 */ addu $t7, $t1, $t9 -/* B19D44 800A2BA4 85EE0000 */ lh $t6, ($t7) -/* B19D48 800A2BA8 A4CE0002 */ sh $t6, 2($a2) -.L800A2BAC: -/* B19D4C 800A2BAC 84F80008 */ lh $t8, 8($a3) -/* B19D50 800A2BB0 00B8082A */ slt $at, $a1, $t8 -/* B19D54 800A2BB4 5020000A */ beql $at, $zero, .L800A2BE0 -/* B19D58 800A2BB8 84EF000A */ lh $t7, 0xa($a3) -/* B19D5C 800A2BBC 84EE000A */ lh $t6, 0xa($a3) -/* B19D60 800A2BC0 0005C840 */ sll $t9, $a1, 1 -/* B19D64 800A2BC4 03297821 */ addu $t7, $t9, $t1 -/* B19D68 800A2BC8 000EC040 */ sll $t8, $t6, 1 -/* B19D6C 800A2BCC 01F8C821 */ addu $t9, $t7, $t8 -/* B19D70 800A2BD0 872E0000 */ lh $t6, ($t9) -/* B19D74 800A2BD4 10000006 */ b .L800A2BF0 -/* B19D78 800A2BD8 A4CE0004 */ sh $t6, 4($a2) -/* B19D7C 800A2BDC 84EF000A */ lh $t7, 0xa($a3) -.L800A2BE0: -/* B19D80 800A2BE0 000FC040 */ sll $t8, $t7, 1 -/* B19D84 800A2BE4 0138C821 */ addu $t9, $t1, $t8 -/* B19D88 800A2BE8 872E0000 */ lh $t6, ($t9) -/* B19D8C 800A2BEC A4CE0004 */ sh $t6, 4($a2) -.L800A2BF0: -/* B19D90 800A2BF0 246F0001 */ addiu $t7, $v1, 1 -/* B19D94 800A2BF4 24E7000C */ addiu $a3, $a3, 0xc -/* B19D98 800A2BF8 11E2006E */ beq $t7, $v0, .L800A2DB4 -/* B19D9C 800A2BFC 24C60006 */ addiu $a2, $a2, 6 -.L800A2C00: -/* B19DA0 800A2C00 84F80000 */ lh $t8, ($a3) -.L800A2C04: -/* B19DA4 800A2C04 24420002 */ addiu $v0, $v0, 2 -/* B19DA8 800A2C08 00B8082A */ slt $at, $a1, $t8 -/* B19DAC 800A2C0C 5020000A */ beql $at, $zero, .L800A2C38 -/* B19DB0 800A2C10 84EE0002 */ lh $t6, 2($a3) -/* B19DB4 800A2C14 84EF0002 */ lh $t7, 2($a3) -/* B19DB8 800A2C18 0005C840 */ sll $t9, $a1, 1 -/* B19DBC 800A2C1C 03297021 */ addu $t6, $t9, $t1 -/* B19DC0 800A2C20 000FC040 */ sll $t8, $t7, 1 -/* B19DC4 800A2C24 01D8C821 */ addu $t9, $t6, $t8 -/* B19DC8 800A2C28 872F0000 */ lh $t7, ($t9) -/* B19DCC 800A2C2C 10000006 */ b .L800A2C48 -/* B19DD0 800A2C30 A4CF0000 */ sh $t7, ($a2) -/* B19DD4 800A2C34 84EE0002 */ lh $t6, 2($a3) -.L800A2C38: -/* B19DD8 800A2C38 000EC040 */ sll $t8, $t6, 1 -/* B19DDC 800A2C3C 0138C821 */ addu $t9, $t1, $t8 -/* B19DE0 800A2C40 872F0000 */ lh $t7, ($t9) -/* B19DE4 800A2C44 A4CF0000 */ sh $t7, ($a2) -.L800A2C48: -/* B19DE8 800A2C48 84EE0004 */ lh $t6, 4($a3) -/* B19DEC 800A2C4C 00AE082A */ slt $at, $a1, $t6 -/* B19DF0 800A2C50 5020000A */ beql $at, $zero, .L800A2C7C -/* B19DF4 800A2C54 84F90006 */ lh $t9, 6($a3) -/* B19DF8 800A2C58 84EF0006 */ lh $t7, 6($a3) -/* B19DFC 800A2C5C 0005C040 */ sll $t8, $a1, 1 -/* B19E00 800A2C60 0309C821 */ addu $t9, $t8, $t1 -/* B19E04 800A2C64 000F7040 */ sll $t6, $t7, 1 -/* B19E08 800A2C68 032EC021 */ addu $t8, $t9, $t6 -/* B19E0C 800A2C6C 870F0000 */ lh $t7, ($t8) -/* B19E10 800A2C70 10000006 */ b .L800A2C8C -/* B19E14 800A2C74 A4CF0002 */ sh $t7, 2($a2) -/* B19E18 800A2C78 84F90006 */ lh $t9, 6($a3) -.L800A2C7C: -/* B19E1C 800A2C7C 00197040 */ sll $t6, $t9, 1 -/* B19E20 800A2C80 012EC021 */ addu $t8, $t1, $t6 -/* B19E24 800A2C84 870F0000 */ lh $t7, ($t8) -/* B19E28 800A2C88 A4CF0002 */ sh $t7, 2($a2) -.L800A2C8C: -/* B19E2C 800A2C8C 84F90008 */ lh $t9, 8($a3) -/* B19E30 800A2C90 00B9082A */ slt $at, $a1, $t9 -/* B19E34 800A2C94 5020000A */ beql $at, $zero, .L800A2CC0 -/* B19E38 800A2C98 84F8000A */ lh $t8, 0xa($a3) -/* B19E3C 800A2C9C 84EF000A */ lh $t7, 0xa($a3) -/* B19E40 800A2CA0 00057040 */ sll $t6, $a1, 1 -/* B19E44 800A2CA4 01C9C021 */ addu $t8, $t6, $t1 -/* B19E48 800A2CA8 000FC840 */ sll $t9, $t7, 1 -/* B19E4C 800A2CAC 03197021 */ addu $t6, $t8, $t9 -/* B19E50 800A2CB0 85CF0000 */ lh $t7, ($t6) -/* B19E54 800A2CB4 10000006 */ b .L800A2CD0 -/* B19E58 800A2CB8 A4CF0004 */ sh $t7, 4($a2) -/* B19E5C 800A2CBC 84F8000A */ lh $t8, 0xa($a3) -.L800A2CC0: -/* B19E60 800A2CC0 0018C840 */ sll $t9, $t8, 1 -/* B19E64 800A2CC4 01397021 */ addu $t6, $t1, $t9 -/* B19E68 800A2CC8 85CF0000 */ lh $t7, ($t6) -/* B19E6C 800A2CCC A4CF0004 */ sh $t7, 4($a2) -.L800A2CD0: -/* B19E70 800A2CD0 84F8000C */ lh $t8, 0xc($a3) -/* B19E74 800A2CD4 24E7000C */ addiu $a3, $a3, 0xc -/* B19E78 800A2CD8 24C60006 */ addiu $a2, $a2, 6 -/* B19E7C 800A2CDC 00B8082A */ slt $at, $a1, $t8 -/* B19E80 800A2CE0 5020000A */ beql $at, $zero, .L800A2D0C -/* B19E84 800A2CE4 84EE0002 */ lh $t6, 2($a3) -/* B19E88 800A2CE8 84EF0002 */ lh $t7, 2($a3) -/* B19E8C 800A2CEC 0005C840 */ sll $t9, $a1, 1 -/* B19E90 800A2CF0 03297021 */ addu $t6, $t9, $t1 -/* B19E94 800A2CF4 000FC040 */ sll $t8, $t7, 1 -/* B19E98 800A2CF8 01D8C821 */ addu $t9, $t6, $t8 -/* B19E9C 800A2CFC 872F0000 */ lh $t7, ($t9) -/* B19EA0 800A2D00 10000006 */ b .L800A2D1C -/* B19EA4 800A2D04 A4CF0000 */ sh $t7, ($a2) -/* B19EA8 800A2D08 84EE0002 */ lh $t6, 2($a3) -.L800A2D0C: -/* B19EAC 800A2D0C 000EC040 */ sll $t8, $t6, 1 -/* B19EB0 800A2D10 0138C821 */ addu $t9, $t1, $t8 -/* B19EB4 800A2D14 872F0000 */ lh $t7, ($t9) -/* B19EB8 800A2D18 A4CF0000 */ sh $t7, ($a2) -.L800A2D1C: -/* B19EBC 800A2D1C 84EE0004 */ lh $t6, 4($a3) -/* B19EC0 800A2D20 00AE082A */ slt $at, $a1, $t6 -/* B19EC4 800A2D24 5020000A */ beql $at, $zero, .L800A2D50 -/* B19EC8 800A2D28 84F90006 */ lh $t9, 6($a3) -/* B19ECC 800A2D2C 84EF0006 */ lh $t7, 6($a3) -/* B19ED0 800A2D30 0005C040 */ sll $t8, $a1, 1 -/* B19ED4 800A2D34 0309C821 */ addu $t9, $t8, $t1 -/* B19ED8 800A2D38 000F7040 */ sll $t6, $t7, 1 -/* B19EDC 800A2D3C 032EC021 */ addu $t8, $t9, $t6 -/* B19EE0 800A2D40 870F0000 */ lh $t7, ($t8) -/* B19EE4 800A2D44 10000006 */ b .L800A2D60 -/* B19EE8 800A2D48 A4CF0002 */ sh $t7, 2($a2) -/* B19EEC 800A2D4C 84F90006 */ lh $t9, 6($a3) -.L800A2D50: -/* B19EF0 800A2D50 00197040 */ sll $t6, $t9, 1 -/* B19EF4 800A2D54 012EC021 */ addu $t8, $t1, $t6 -/* B19EF8 800A2D58 870F0000 */ lh $t7, ($t8) -/* B19EFC 800A2D5C A4CF0002 */ sh $t7, 2($a2) -.L800A2D60: -/* B19F00 800A2D60 84F90008 */ lh $t9, 8($a3) -/* B19F04 800A2D64 00B9082A */ slt $at, $a1, $t9 -/* B19F08 800A2D68 5020000A */ beql $at, $zero, .L800A2D94 -/* B19F0C 800A2D6C 84F8000A */ lh $t8, 0xa($a3) -/* B19F10 800A2D70 84EF000A */ lh $t7, 0xa($a3) -/* B19F14 800A2D74 00057040 */ sll $t6, $a1, 1 -/* B19F18 800A2D78 01C9C021 */ addu $t8, $t6, $t1 -/* B19F1C 800A2D7C 000FC840 */ sll $t9, $t7, 1 -/* B19F20 800A2D80 03197021 */ addu $t6, $t8, $t9 -/* B19F24 800A2D84 85CF0000 */ lh $t7, ($t6) -/* B19F28 800A2D88 10000006 */ b .L800A2DA4 -/* B19F2C 800A2D8C A4CF0004 */ sh $t7, 4($a2) -/* B19F30 800A2D90 84F8000A */ lh $t8, 0xa($a3) -.L800A2D94: -/* B19F34 800A2D94 0018C840 */ sll $t9, $t8, 1 -/* B19F38 800A2D98 01397021 */ addu $t6, $t1, $t9 -/* B19F3C 800A2D9C 85CF0000 */ lh $t7, ($t6) -/* B19F40 800A2DA0 A4CF0004 */ sh $t7, 4($a2) -.L800A2DA4: -/* B19F44 800A2DA4 24780001 */ addiu $t8, $v1, 1 -/* B19F48 800A2DA8 24E7000C */ addiu $a3, $a3, 0xc -/* B19F4C 800A2DAC 1702FF94 */ bne $t8, $v0, .L800A2C00 -/* B19F50 800A2DB0 24C60006 */ addiu $a2, $a2, 6 -.L800A2DB4: -/* B19F54 800A2DB4 03E00008 */ jr $ra -/* B19F58 800A2DB8 00601025 */ move $v0, $v1 - diff --git a/asm/non_matchings/code/z_skin_matrix/SkinMatrix_Invert.s b/asm/non_matchings/code/z_skin_matrix/SkinMatrix_Invert.s deleted file mode 100644 index a72522af6d..0000000000 --- a/asm/non_matchings/code/z_skin_matrix/SkinMatrix_Invert.s +++ /dev/null @@ -1,207 +0,0 @@ -.rdata -glabel D_801407D0 - .asciz "\x1b[43;30m" - .balign 4 - -glabel D_801407DC - .asciz "Skin_Matrix_InverseMatrix():逆行列つくれません\n" - # EUC-JP: 逆行列つくれません | Inverse matrix cannot be created - .balign 4 - -glabel D_8014080C - .asciz "\x1b[m" - .balign 4 - -.late_rodata -glabel D_80140844 - .float 0.0005 - -.text -glabel SkinMatrix_Invert -/* B1E580 800A73E0 27BDFF48 */ addiu $sp, $sp, -0xb8 -/* B1E584 800A73E4 AFB40028 */ sw $s4, 0x28($sp) -/* B1E588 800A73E8 AFB30024 */ sw $s3, 0x24($sp) -/* B1E58C 800A73EC 00A09825 */ move $s3, $a1 -/* B1E590 800A73F0 27B40078 */ addiu $s4, $sp, 0x78 -/* B1E594 800A73F4 AFBF002C */ sw $ra, 0x2c($sp) -/* B1E598 800A73F8 AFB20020 */ sw $s2, 0x20($sp) -/* B1E59C 800A73FC AFB1001C */ sw $s1, 0x1c($sp) -/* B1E5A0 800A7400 AFB00018 */ sw $s0, 0x18($sp) -/* B1E5A4 800A7404 0C029CD7 */ jal SkinMatrix_MtxFCopy -/* B1E5A8 800A7408 02802825 */ move $a1, $s4 -/* B1E5AC 800A740C 0C029CC3 */ jal SkinMatrix_Clear -/* B1E5B0 800A7410 02602025 */ move $a0, $s3 -/* B1E5B4 800A7414 3C018014 */ lui $at, %hi(D_80140844) -/* B1E5B8 800A7418 C42C0844 */ lwc1 $f12, %lo(D_80140844)($at) -/* B1E5BC 800A741C 00008025 */ move $s0, $zero -/* B1E5C0 800A7420 240C0004 */ li $t4, 4 -/* B1E5C4 800A7424 2A010004 */ slti $at, $s0, 4 -.L800A7428: -/* B1E5C8 800A7428 10200016 */ beqz $at, .L800A7484 -/* B1E5CC 800A742C 02004825 */ move $t1, $s0 -/* B1E5D0 800A7430 00107100 */ sll $t6, $s0, 4 -/* B1E5D4 800A7434 028E5821 */ addu $t3, $s4, $t6 -/* B1E5D8 800A7438 00107880 */ sll $t7, $s0, 2 -/* B1E5DC 800A743C 016FC021 */ addu $t8, $t3, $t7 -/* B1E5E0 800A7440 C7000000 */ lwc1 $f0, ($t8) -/* B1E5E4 800A7444 46000005 */ abs.s $f0, $f0 -/* B1E5E8 800A7448 460C003C */ c.lt.s $f0, $f12 -/* B1E5EC 800A744C 00000000 */ nop -/* B1E5F0 800A7450 4500000C */ bc1f .L800A7484 -/* B1E5F4 800A7454 00000000 */ nop -/* B1E5F8 800A7458 25290001 */ addiu $t1, $t1, 1 -.L800A745C: -/* B1E5FC 800A745C 29210004 */ slti $at, $t1, 4 -/* B1E600 800A7460 10200008 */ beqz $at, .L800A7484 -/* B1E604 800A7464 0009C880 */ sll $t9, $t1, 2 -/* B1E608 800A7468 01797021 */ addu $t6, $t3, $t9 -/* B1E60C 800A746C C5C00000 */ lwc1 $f0, ($t6) -/* B1E610 800A7470 46000005 */ abs.s $f0, $f0 -/* B1E614 800A7474 460C003C */ c.lt.s $f0, $f12 -/* B1E618 800A7478 00000000 */ nop -/* B1E61C 800A747C 4503FFF7 */ bc1tl .L800A745C -/* B1E620 800A7480 25290001 */ addiu $t1, $t1, 1 -.L800A7484: -/* B1E624 800A7484 152C000C */ bne $t1, $t4, .L800A74B8 -/* B1E628 800A7488 00107900 */ sll $t7, $s0, 4 -/* B1E62C 800A748C 3C048014 */ lui $a0, %hi(D_801407D0) # $a0, 0x8014 -/* B1E630 800A7490 0C00084C */ jal osSyncPrintf -/* B1E634 800A7494 248407D0 */ addiu $a0, %lo(D_801407D0) # addiu $a0, $a0, 0x7d0 -/* B1E638 800A7498 3C048014 */ lui $a0, %hi(D_801407DC) # $a0, 0x8014 -/* B1E63C 800A749C 0C00084C */ jal osSyncPrintf -/* B1E640 800A74A0 248407DC */ addiu $a0, %lo(D_801407DC) # addiu $a0, $a0, 0x7dc -/* B1E644 800A74A4 3C048014 */ lui $a0, %hi(D_8014080C) # $a0, 0x8014 -/* B1E648 800A74A8 0C00084C */ jal osSyncPrintf -/* B1E64C 800A74AC 2484080C */ addiu $a0, %lo(D_8014080C) # addiu $a0, $a0, 0x80c -/* B1E650 800A74B0 10000074 */ b .L800A7684 -/* B1E654 800A74B4 24020002 */ li $v0, 2 -.L800A74B8: -/* B1E658 800A74B8 00106880 */ sll $t5, $s0, 2 -/* B1E65C 800A74BC 028F5821 */ addu $t3, $s4, $t7 -/* B1E660 800A74C0 016D9021 */ addu $s2, $t3, $t5 -/* B1E664 800A74C4 028D2021 */ addu $a0, $s4, $t5 -/* B1E668 800A74C8 026D2821 */ addu $a1, $s3, $t5 -/* B1E66C 800A74CC 1130001E */ beq $t1, $s0, .L800A7548 -/* B1E670 800A74D0 0260F825 */ move $ra, $s3 -/* B1E674 800A74D4 00094080 */ sll $t0, $t1, 2 -/* B1E678 800A74D8 27B80078 */ addiu $t8, $sp, 0x78 -/* B1E67C 800A74DC 01181021 */ addu $v0, $t0, $t8 -/* B1E680 800A74E0 01B81821 */ addu $v1, $t5, $t8 -/* B1E684 800A74E4 02683021 */ addu $a2, $s3, $t0 -/* B1E688 800A74E8 00005025 */ move $t2, $zero -/* B1E68C 800A74EC 026D3821 */ addu $a3, $s3, $t5 -.L800A74F0: -/* B1E690 800A74F0 C4640000 */ lwc1 $f4, ($v1) -/* B1E694 800A74F4 C4400000 */ lwc1 $f0, ($v0) -/* B1E698 800A74F8 254A0002 */ addiu $t2, $t2, 2 -/* B1E69C 800A74FC E4440000 */ swc1 $f4, ($v0) -/* B1E6A0 800A7500 E4600000 */ swc1 $f0, ($v1) -/* B1E6A4 800A7504 C4E60000 */ lwc1 $f6, ($a3) -/* B1E6A8 800A7508 C4C20000 */ lwc1 $f2, ($a2) -/* B1E6AC 800A750C 24420020 */ addiu $v0, $v0, 0x20 -/* B1E6B0 800A7510 E4C60000 */ swc1 $f6, ($a2) -/* B1E6B4 800A7514 E4E20000 */ swc1 $f2, ($a3) -/* B1E6B8 800A7518 C4680010 */ lwc1 $f8, 0x10($v1) -/* B1E6BC 800A751C C440FFF0 */ lwc1 $f0, -0x10($v0) -/* B1E6C0 800A7520 24630020 */ addiu $v1, $v1, 0x20 -/* B1E6C4 800A7524 E448FFF0 */ swc1 $f8, -0x10($v0) -/* B1E6C8 800A7528 E460FFF0 */ swc1 $f0, -0x10($v1) -/* B1E6CC 800A752C C4EA0010 */ lwc1 $f10, 0x10($a3) -/* B1E6D0 800A7530 C4C20010 */ lwc1 $f2, 0x10($a2) -/* B1E6D4 800A7534 24C60020 */ addiu $a2, $a2, 0x20 -/* B1E6D8 800A7538 E4CAFFF0 */ swc1 $f10, -0x10($a2) -/* B1E6DC 800A753C 24E70020 */ addiu $a3, $a3, 0x20 -/* B1E6E0 800A7540 154CFFEB */ bne $t2, $t4, .L800A74F0 -/* B1E6E4 800A7544 E4E2FFF0 */ swc1 $f2, -0x10($a3) -.L800A7548: -/* B1E6E8 800A7548 C6400000 */ lwc1 $f0, ($s2) -/* B1E6EC 800A754C C4900000 */ lwc1 $f16, ($a0) -/* B1E6F0 800A7550 00004825 */ move $t1, $zero -/* B1E6F4 800A7554 46008483 */ div.s $f18, $f16, $f0 -/* B1E6F8 800A7558 E4920000 */ swc1 $f18, ($a0) -/* B1E6FC 800A755C C4A40000 */ lwc1 $f4, ($a1) -/* B1E700 800A7560 46002183 */ div.s $f6, $f4, $f0 -/* B1E704 800A7564 E4A60000 */ swc1 $f6, ($a1) -/* B1E708 800A7568 C4880010 */ lwc1 $f8, 0x10($a0) -/* B1E70C 800A756C 46004283 */ div.s $f10, $f8, $f0 -/* B1E710 800A7570 E48A0010 */ swc1 $f10, 0x10($a0) -/* B1E714 800A7574 C4B00010 */ lwc1 $f16, 0x10($a1) -/* B1E718 800A7578 46008483 */ div.s $f18, $f16, $f0 -/* B1E71C 800A757C E4B20010 */ swc1 $f18, 0x10($a1) -/* B1E720 800A7580 C4840020 */ lwc1 $f4, 0x20($a0) -/* B1E724 800A7584 46002183 */ div.s $f6, $f4, $f0 -/* B1E728 800A7588 E4860020 */ swc1 $f6, 0x20($a0) -/* B1E72C 800A758C C4A80020 */ lwc1 $f8, 0x20($a1) -/* B1E730 800A7590 46004283 */ div.s $f10, $f8, $f0 -/* B1E734 800A7594 E4AA0020 */ swc1 $f10, 0x20($a1) -/* B1E738 800A7598 C4900030 */ lwc1 $f16, 0x30($a0) -/* B1E73C 800A759C 46008483 */ div.s $f18, $f16, $f0 -/* B1E740 800A75A0 E4920030 */ swc1 $f18, 0x30($a0) -/* B1E744 800A75A4 C4A40030 */ lwc1 $f4, 0x30($a1) -/* B1E748 800A75A8 46002183 */ div.s $f6, $f4, $f0 -/* B1E74C 800A75AC E4A60030 */ swc1 $f6, 0x30($a1) -.L800A75B0: -/* B1E750 800A75B0 1130002D */ beq $t1, $s0, .L800A7668 -/* B1E754 800A75B4 00094080 */ sll $t0, $t1, 2 -/* B1E758 800A75B8 0168C821 */ addu $t9, $t3, $t0 -/* B1E75C 800A75BC C7200000 */ lwc1 $f0, ($t9) -/* B1E760 800A75C0 C48A0000 */ lwc1 $f10, ($a0) -/* B1E764 800A75C4 02881021 */ addu $v0, $s4, $t0 -/* B1E768 800A75C8 C4480000 */ lwc1 $f8, ($v0) -/* B1E76C 800A75CC 46005402 */ mul.s $f16, $f10, $f0 -/* B1E770 800A75D0 03E81821 */ addu $v1, $ra, $t0 -/* B1E774 800A75D4 46104481 */ sub.s $f18, $f8, $f16 -/* B1E778 800A75D8 E4520000 */ swc1 $f18, ($v0) -/* B1E77C 800A75DC C4A60000 */ lwc1 $f6, ($a1) -/* B1E780 800A75E0 C4640000 */ lwc1 $f4, ($v1) -/* B1E784 800A75E4 46003282 */ mul.s $f10, $f6, $f0 -/* B1E788 800A75E8 460A2201 */ sub.s $f8, $f4, $f10 -/* B1E78C 800A75EC E4680000 */ swc1 $f8, ($v1) -/* B1E790 800A75F0 C4920010 */ lwc1 $f18, 0x10($a0) -/* B1E794 800A75F4 C4500010 */ lwc1 $f16, 0x10($v0) -/* B1E798 800A75F8 46009182 */ mul.s $f6, $f18, $f0 -/* B1E79C 800A75FC 46068101 */ sub.s $f4, $f16, $f6 -/* B1E7A0 800A7600 E4440010 */ swc1 $f4, 0x10($v0) -/* B1E7A4 800A7604 C4A80010 */ lwc1 $f8, 0x10($a1) -/* B1E7A8 800A7608 C46A0010 */ lwc1 $f10, 0x10($v1) -/* B1E7AC 800A760C 46004482 */ mul.s $f18, $f8, $f0 -/* B1E7B0 800A7610 46125401 */ sub.s $f16, $f10, $f18 -/* B1E7B4 800A7614 E4700010 */ swc1 $f16, 0x10($v1) -/* B1E7B8 800A7618 C4840020 */ lwc1 $f4, 0x20($a0) -/* B1E7BC 800A761C C4460020 */ lwc1 $f6, 0x20($v0) -/* B1E7C0 800A7620 46002202 */ mul.s $f8, $f4, $f0 -/* B1E7C4 800A7624 46083281 */ sub.s $f10, $f6, $f8 -/* B1E7C8 800A7628 E44A0020 */ swc1 $f10, 0x20($v0) -/* B1E7CC 800A762C C4B00020 */ lwc1 $f16, 0x20($a1) -/* B1E7D0 800A7630 C4720020 */ lwc1 $f18, 0x20($v1) -/* B1E7D4 800A7634 46008102 */ mul.s $f4, $f16, $f0 -/* B1E7D8 800A7638 46049181 */ sub.s $f6, $f18, $f4 -/* B1E7DC 800A763C E4660020 */ swc1 $f6, 0x20($v1) -/* B1E7E0 800A7640 C48A0030 */ lwc1 $f10, 0x30($a0) -/* B1E7E4 800A7644 C4480030 */ lwc1 $f8, 0x30($v0) -/* B1E7E8 800A7648 46005402 */ mul.s $f16, $f10, $f0 -/* B1E7EC 800A764C 46104481 */ sub.s $f18, $f8, $f16 -/* B1E7F0 800A7650 E4520030 */ swc1 $f18, 0x30($v0) -/* B1E7F4 800A7654 C4A60030 */ lwc1 $f6, 0x30($a1) -/* B1E7F8 800A7658 C4640030 */ lwc1 $f4, 0x30($v1) -/* B1E7FC 800A765C 46003282 */ mul.s $f10, $f6, $f0 -/* B1E800 800A7660 460A2201 */ sub.s $f8, $f4, $f10 -/* B1E804 800A7664 E4680030 */ swc1 $f8, 0x30($v1) -.L800A7668: -/* B1E808 800A7668 25290001 */ addiu $t1, $t1, 1 -/* B1E80C 800A766C 152CFFD0 */ bne $t1, $t4, .L800A75B0 -/* B1E810 800A7670 00000000 */ nop -/* B1E814 800A7674 26100001 */ addiu $s0, $s0, 1 -/* B1E818 800A7678 560CFF6B */ bnel $s0, $t4, .L800A7428 -/* B1E81C 800A767C 2A010004 */ slti $at, $s0, 4 -/* B1E820 800A7680 00001025 */ move $v0, $zero -.L800A7684: -/* B1E824 800A7684 8FBF002C */ lw $ra, 0x2c($sp) -/* B1E828 800A7688 8FB00018 */ lw $s0, 0x18($sp) -/* B1E82C 800A768C 8FB1001C */ lw $s1, 0x1c($sp) -/* B1E830 800A7690 8FB20020 */ lw $s2, 0x20($sp) -/* B1E834 800A7694 8FB30024 */ lw $s3, 0x24($sp) -/* B1E838 800A7698 8FB40028 */ lw $s4, 0x28($sp) -/* B1E83C 800A769C 03E00008 */ jr $ra -/* B1E840 800A76A0 27BD00B8 */ addiu $sp, $sp, 0xb8 - diff --git a/asm/non_matchings/code/z_skin_matrix/func_800A7EC0.s b/asm/non_matchings/code/z_skin_matrix/func_800A7EC0.s deleted file mode 100644 index fc7fc60a1f..0000000000 --- a/asm/non_matchings/code/z_skin_matrix/func_800A7EC0.s +++ /dev/null @@ -1,94 +0,0 @@ -glabel func_800A7EC0 -/* B1F060 800A7EC0 27BDFF98 */ addiu $sp, $sp, -0x68 -/* B1F064 800A7EC4 F7B40010 */ sdc1 $f20, 0x10($sp) -/* B1F068 800A7EC8 4486A000 */ mtc1 $a2, $f20 -/* B1F06C 800A7ECC F7B60018 */ sdc1 $f22, 0x18($sp) -/* B1F070 800A7ED0 4487B000 */ mtc1 $a3, $f22 -/* B1F074 800A7ED4 00803025 */ move $a2, $a0 -/* B1F078 800A7ED8 AFBF0024 */ sw $ra, 0x24($sp) -/* B1F07C 800A7EDC AFA40068 */ sw $a0, 0x68($sp) -/* B1F080 800A7EE0 AFA5006C */ sw $a1, 0x6c($sp) -/* B1F084 800A7EE4 87A4006E */ lh $a0, 0x6e($sp) -/* B1F088 800A7EE8 0C01DE1C */ jal Math_Sins -/* B1F08C 800A7EEC AFA60068 */ sw $a2, 0x68($sp) -/* B1F090 800A7EF0 87A4006E */ lh $a0, 0x6e($sp) -/* B1F094 800A7EF4 0C01DE0D */ jal Math_Coss -/* B1F098 800A7EF8 E7A00064 */ swc1 $f0, 0x64($sp) -/* B1F09C 800A7EFC 4616A302 */ mul.s $f12, $f20, $f22 -/* B1F0A0 800A7F00 C7A40078 */ lwc1 $f4, 0x78($sp) -/* B1F0A4 800A7F04 3C013F80 */ li $at, 0x3F800000 # 0.000000 -/* B1F0A8 800A7F08 44814000 */ mtc1 $at, $f8 -/* B1F0AC 800A7F0C 4604B182 */ mul.s $f6, $f22, $f4 -/* B1F0B0 800A7F10 8FA60068 */ lw $a2, 0x68($sp) -/* B1F0B4 800A7F14 C7B20064 */ lwc1 $f18, 0x64($sp) -/* B1F0B8 800A7F18 4604A382 */ mul.s $f14, $f20, $f4 -/* B1F0BC 800A7F1C E7AC0050 */ swc1 $f12, 0x50($sp) -/* B1F0C0 800A7F20 4614A082 */ mul.s $f2, $f20, $f20 -/* B1F0C4 800A7F24 E7A6004C */ swc1 $f6, 0x4c($sp) -/* B1F0C8 800A7F28 E7AE0048 */ swc1 $f14, 0x48($sp) -/* B1F0CC 800A7F2C 46024281 */ sub.s $f10, $f8, $f2 -/* B1F0D0 800A7F30 44814000 */ mtc1 $at, $f8 -/* B1F0D4 800A7F34 46005182 */ mul.s $f6, $f10, $f0 -/* B1F0D8 800A7F38 46004401 */ sub.s $f16, $f8, $f0 -/* B1F0DC 800A7F3C 46023100 */ add.s $f4, $f6, $f2 -/* B1F0E0 800A7F40 E4C40000 */ swc1 $f4, ($a2) -/* B1F0E4 800A7F44 C7AA0078 */ lwc1 $f10, 0x78($sp) -/* B1F0E8 800A7F48 46125182 */ mul.s $f6, $f10, $f18 -/* B1F0EC 800A7F4C 00000000 */ nop -/* B1F0F0 800A7F50 460C8102 */ mul.s $f4, $f16, $f12 -/* B1F0F4 800A7F54 44806000 */ mtc1 $zero, $f12 -/* B1F0F8 800A7F58 4612B282 */ mul.s $f10, $f22, $f18 -/* B1F0FC 800A7F5C E7A60038 */ swc1 $f6, 0x38($sp) -/* B1F100 800A7F60 46062200 */ add.s $f8, $f4, $f6 -/* B1F104 800A7F64 460E8102 */ mul.s $f4, $f16, $f14 -/* B1F108 800A7F68 E4C80004 */ swc1 $f8, 4($a2) -/* B1F10C 800A7F6C E7AA0034 */ swc1 $f10, 0x34($sp) -/* B1F110 800A7F70 C7A60034 */ lwc1 $f6, 0x34($sp) -/* B1F114 800A7F74 E4CC000C */ swc1 $f12, 0xc($a2) -/* B1F118 800A7F78 46062201 */ sub.s $f8, $f4, $f6 -/* B1F11C 800A7F7C E4C80008 */ swc1 $f8, 8($a2) -/* B1F120 800A7F80 C7AA0050 */ lwc1 $f10, 0x50($sp) -/* B1F124 800A7F84 C7A60038 */ lwc1 $f6, 0x38($sp) -/* B1F128 800A7F88 460A8102 */ mul.s $f4, $f16, $f10 -/* B1F12C 800A7F8C 44815000 */ mtc1 $at, $f10 -/* B1F130 800A7F90 4616B082 */ mul.s $f2, $f22, $f22 -/* B1F134 800A7F94 46062201 */ sub.s $f8, $f4, $f6 -/* B1F138 800A7F98 46025101 */ sub.s $f4, $f10, $f2 -/* B1F13C 800A7F9C E4C80010 */ swc1 $f8, 0x10($a2) -/* B1F140 800A7FA0 46002182 */ mul.s $f6, $f4, $f0 -/* B1F144 800A7FA4 46023200 */ add.s $f8, $f6, $f2 -/* B1F148 800A7FA8 E4C80014 */ swc1 $f8, 0x14($a2) -/* B1F14C 800A7FAC C7AA004C */ lwc1 $f10, 0x4c($sp) -/* B1F150 800A7FB0 460A8102 */ mul.s $f4, $f16, $f10 -/* B1F154 800A7FB4 E7A4002C */ swc1 $f4, 0x2c($sp) -/* B1F158 800A7FB8 4612A382 */ mul.s $f14, $f20, $f18 -/* B1F15C 800A7FBC C7A6002C */ lwc1 $f6, 0x2c($sp) -/* B1F160 800A7FC0 E4CC001C */ swc1 $f12, 0x1c($a2) -/* B1F164 800A7FC4 460E3200 */ add.s $f8, $f6, $f14 -/* B1F168 800A7FC8 E4C80018 */ swc1 $f8, 0x18($a2) -/* B1F16C 800A7FCC C7AA0048 */ lwc1 $f10, 0x48($sp) -/* B1F170 800A7FD0 C7A60034 */ lwc1 $f6, 0x34($sp) -/* B1F174 800A7FD4 460A8102 */ mul.s $f4, $f16, $f10 -/* B1F178 800A7FD8 44818000 */ mtc1 $at, $f16 -/* B1F17C 800A7FDC 46062200 */ add.s $f8, $f4, $f6 -/* B1F180 800A7FE0 E4C80020 */ swc1 $f8, 0x20($a2) -/* B1F184 800A7FE4 C7B20078 */ lwc1 $f18, 0x78($sp) -/* B1F188 800A7FE8 C7AA002C */ lwc1 $f10, 0x2c($sp) -/* B1F18C 800A7FEC E4CC002C */ swc1 $f12, 0x2c($a2) -/* B1F190 800A7FF0 46129082 */ mul.s $f2, $f18, $f18 -/* B1F194 800A7FF4 460E5101 */ sub.s $f4, $f10, $f14 -/* B1F198 800A7FF8 E4CC0030 */ swc1 $f12, 0x30($a2) -/* B1F19C 800A7FFC E4CC0034 */ swc1 $f12, 0x34($a2) -/* B1F1A0 800A8000 E4CC0038 */ swc1 $f12, 0x38($a2) -/* B1F1A4 800A8004 E4C40024 */ swc1 $f4, 0x24($a2) -/* B1F1A8 800A8008 E4D0003C */ swc1 $f16, 0x3c($a2) -/* B1F1AC 800A800C 46028181 */ sub.s $f6, $f16, $f2 -/* B1F1B0 800A8010 46003202 */ mul.s $f8, $f6, $f0 -/* B1F1B4 800A8014 46024280 */ add.s $f10, $f8, $f2 -/* B1F1B8 800A8018 E4CA0028 */ swc1 $f10, 0x28($a2) -/* B1F1BC 800A801C 8FBF0024 */ lw $ra, 0x24($sp) -/* B1F1C0 800A8020 D7B60018 */ ldc1 $f22, 0x18($sp) -/* B1F1C4 800A8024 D7B40010 */ ldc1 $f20, 0x10($sp) -/* B1F1C8 800A8028 03E00008 */ jr $ra -/* B1F1CC 800A802C 27BD0068 */ addiu $sp, $sp, 0x68 - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Attack_Niw/func_809B5670.s b/asm/non_matchings/overlays/actors/ovl_En_Attack_Niw/func_809B5670.s deleted file mode 100644 index b578644f21..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Attack_Niw/func_809B5670.s +++ /dev/null @@ -1,233 +0,0 @@ -.late_rodata -glabel D_809B61D8 - .float 3000.0 -glabel D_809B61DC - .float -0.2 -glabel D_809B61E0 - .float -0.2 -glabel D_809B61E4 - .float -10000 -glabel D_809B61E8 - .float -3000 - -.text -glabel func_809B5670 -/* 00570 809B5670 27BDFFB0 */ addiu $sp, $sp, 0xFFB0 ## $sp = FFFFFFB0 -/* 00574 809B5674 3C014120 */ lui $at, 0x4120 ## $at = 41200000 -/* 00578 809B5678 44812000 */ mtc1 $at, $f4 ## $f4 = 10.00 -/* 0057C 809B567C AFBF0024 */ sw $ra, 0x0024($sp) -/* 00580 809B5680 AFB10020 */ sw $s1, 0x0020($sp) -/* 00584 809B5684 AFB0001C */ sw $s0, 0x001C($sp) -/* 00588 809B5688 E4840068 */ swc1 $f4, 0x0068($a0) ## 00000068 -/* 0058C 809B568C C4A000EC */ lwc1 $f0, 0x00EC($a1) ## 000000EC -/* 00590 809B5690 C4860298 */ lwc1 $f6, 0x0298($a0) ## 00000298 -/* 00594 809B5694 C4B200F0 */ lwc1 $f18, 0x00F0($a1) ## 000000F0 -/* 00598 809B5698 C490029C */ lwc1 $f16, 0x029C($a0) ## 0000029C -/* 0059C 809B569C 46003200 */ add.s $f8, $f6, $f0 -/* 005A0 809B56A0 C4AA00E0 */ lwc1 $f10, 0x00E0($a1) ## 000000E0 -/* 005A4 809B56A4 C4A600E4 */ lwc1 $f6, 0x00E4($a1) ## 000000E4 -/* 005A8 809B56A8 46128100 */ add.s $f4, $f16, $f18 -/* 005AC 809B56AC C4B200E8 */ lwc1 $f18, 0x00E8($a1) ## 000000E8 -/* 005B0 809B56B0 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 005B4 809B56B4 460A4081 */ sub.s $f2, $f8, $f10 -/* 005B8 809B56B8 C4AA00F4 */ lwc1 $f10, 0x00F4($a1) ## 000000F4 -/* 005BC 809B56BC C48802A0 */ lwc1 $f8, 0x02A0($a0) ## 000002A0 -/* 005C0 809B56C0 46062301 */ sub.s $f12, $f4, $f6 -/* 005C4 809B56C4 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 -/* 005C8 809B56C8 24840024 */ addiu $a0, $a0, 0x0024 ## $a0 = 00000024 -/* 005CC 809B56CC 46020100 */ add.s $f4, $f0, $f2 -/* 005D0 809B56D0 460A4400 */ add.s $f16, $f8, $f10 -/* 005D4 809B56D4 E7A40034 */ swc1 $f4, 0x0034($sp) -/* 005D8 809B56D8 C4A600F0 */ lwc1 $f6, 0x00F0($a1) ## 000000F0 -/* 005DC 809B56DC 46128381 */ sub.s $f14, $f16, $f18 -/* 005E0 809B56E0 460C3200 */ add.s $f8, $f6, $f12 -/* 005E4 809B56E4 E7A80038 */ swc1 $f8, 0x0038($sp) -/* 005E8 809B56E8 C4AA00F4 */ lwc1 $f10, 0x00F4($a1) ## 000000F4 -/* 005EC 809B56EC AFA4002C */ sw $a0, 0x002C($sp) -/* 005F0 809B56F0 27A50034 */ addiu $a1, $sp, 0x0034 ## $a1 = FFFFFFE4 -/* 005F4 809B56F4 460E5400 */ add.s $f16, $f10, $f14 -/* 005F8 809B56F8 0C01E01A */ jal Math_Vec3f_Yaw - -/* 005FC 809B56FC E7B0003C */ swc1 $f16, 0x003C($sp) -/* 00600 809B5700 44829000 */ mtc1 $v0, $f18 ## $f18 = 0.00 -/* 00604 809B5704 8FA4002C */ lw $a0, 0x002C($sp) -/* 00608 809B5708 27A50034 */ addiu $a1, $sp, 0x0034 ## $a1 = FFFFFFE4 -/* 0060C 809B570C 46809120 */ cvt.s.w $f4, $f18 -/* 00610 809B5710 0C01E027 */ jal Math_Vec3f_Pitch - -/* 00614 809B5714 E60402D4 */ swc1 $f4, 0x02D4($s0) ## 000002D4 -/* 00618 809B5718 44823000 */ mtc1 $v0, $f6 ## $f6 = 0.00 -/* 0061C 809B571C 3C01BF80 */ lui $at, 0xBF80 ## $at = BF800000 -/* 00620 809B5720 44815000 */ mtc1 $at, $f10 ## $f10 = -1.00 -/* 00624 809B5724 46803220 */ cvt.s.w $f8, $f6 -/* 00628 809B5728 C60602DC */ lwc1 $f6, 0x02DC($s0) ## 000002DC -/* 0062C 809B572C C61202D4 */ lwc1 $f18, 0x02D4($s0) ## 000002D4 -/* 00630 809B5730 26040032 */ addiu $a0, $s0, 0x0032 ## $a0 = 00000032 -/* 00634 809B5734 24060005 */ addiu $a2, $zero, 0x0005 ## $a2 = 00000005 -/* 00638 809B5738 4600910D */ trunc.w.s $f4, $f18 -/* 0063C 809B573C 460A4402 */ mul.s $f16, $f8, $f10 -/* 00640 809B5740 44052000 */ mfc1 $a1, $f4 -/* 00644 809B5744 4600320D */ trunc.w.s $f8, $f6 -/* 00648 809B5748 E61002D0 */ swc1 $f16, 0x02D0($s0) ## 000002D0 -/* 0064C 809B574C 00052C00 */ sll $a1, $a1, 16 -/* 00650 809B5750 00052C03 */ sra $a1, $a1, 16 -/* 00654 809B5754 44074000 */ mfc1 $a3, $f8 -/* 00658 809B5758 AFA00010 */ sw $zero, 0x0010($sp) -/* 0065C 809B575C 00073C00 */ sll $a3, $a3, 16 -/* 00660 809B5760 0C01E1A7 */ jal Math_SmoothScaleMaxMinS - -/* 00664 809B5764 00073C03 */ sra $a3, $a3, 16 -/* 00668 809B5768 C60A02D0 */ lwc1 $f10, 0x02D0($s0) ## 000002D0 -/* 0066C 809B576C C61202DC */ lwc1 $f18, 0x02DC($s0) ## 000002DC -/* 00670 809B5770 AFA00010 */ sw $zero, 0x0010($sp) -/* 00674 809B5774 4600540D */ trunc.w.s $f16, $f10 -/* 00678 809B5778 26040030 */ addiu $a0, $s0, 0x0030 ## $a0 = 00000030 -/* 0067C 809B577C 24060005 */ addiu $a2, $zero, 0x0005 ## $a2 = 00000005 -/* 00680 809B5780 4600910D */ trunc.w.s $f4, $f18 -/* 00684 809B5784 44058000 */ mfc1 $a1, $f16 -/* 00688 809B5788 44072000 */ mfc1 $a3, $f4 -/* 0068C 809B578C 00052C00 */ sll $a1, $a1, 16 -/* 00690 809B5790 00052C03 */ sra $a1, $a1, 16 -/* 00694 809B5794 00073C00 */ sll $a3, $a3, 16 -/* 00698 809B5798 0C01E1A7 */ jal Math_SmoothScaleMaxMinS - -/* 0069C 809B579C 00073C03 */ sra $a3, $a3, 16 -/* 006A0 809B57A0 3C05459C */ lui $a1, 0x459C ## $a1 = 459C0000 -/* 006A4 809B57A4 34A54000 */ ori $a1, $a1, 0x4000 ## $a1 = 459C4000 -/* 006A8 809B57A8 260402DC */ addiu $a0, $s0, 0x02DC ## $a0 = 000002DC -/* 006AC 809B57AC 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000 -/* 006B0 809B57B0 0C01E107 */ jal Math_SmoothScaleMaxF - -/* 006B4 809B57B4 3C0742C8 */ lui $a3, 0x42C8 ## $a3 = 42C80000 -/* 006B8 809B57B8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 006BC 809B57BC 0C00B56E */ jal Actor_SetHeight - -/* 006C0 809B57C0 8E0502E4 */ lw $a1, 0x02E4($s0) ## 000002E4 -/* 006C4 809B57C4 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 006C8 809B57C8 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 006CC 809B57CC 27A6004E */ addiu $a2, $sp, 0x004E ## $a2 = FFFFFFFE -/* 006D0 809B57D0 0C00BCDD */ jal func_8002F374 -/* 006D4 809B57D4 27A7004C */ addiu $a3, $sp, 0x004C ## $a3 = FFFFFFFC -/* 006D8 809B57D8 96020088 */ lhu $v0, 0x0088($s0) ## 00000088 -/* 006DC 809B57DC 30480008 */ andi $t0, $v0, 0x0008 ## $t0 = 00000000 -/* 006E0 809B57E0 51000023 */ beql $t0, $zero, .L809B5870 -/* 006E4 809B57E4 44801000 */ mtc1 $zero, $f2 ## $f2 = 0.00 -/* 006E8 809B57E8 8609008A */ lh $t1, 0x008A($s0) ## 0000008A -/* 006EC 809B57EC 860A0030 */ lh $t2, 0x0030($s0) ## 00000030 -/* 006F0 809B57F0 3C01809B */ lui $at, %hi(D_809B61D8) ## $at = 809B0000 -/* 006F4 809B57F4 44893000 */ mtc1 $t1, $f6 ## $f6 = 0.00 -/* 006F8 809B57F8 448A5000 */ mtc1 $t2, $f10 ## $f10 = 0.00 -/* 006FC 809B57FC 44801000 */ mtc1 $zero, $f2 ## $f2 = 0.00 -/* 00700 809B5800 46803220 */ cvt.s.w $f8, $f6 -/* 00704 809B5804 240B0064 */ addiu $t3, $zero, 0x0064 ## $t3 = 00000064 -/* 00708 809B5808 3C0C809B */ lui $t4, %hi(func_809B59B0) ## $t4 = 809B0000 -/* 0070C 809B580C 258C59B0 */ addiu $t4, $t4, %lo(func_809B59B0) ## $t4 = 809B59B0 -/* 00710 809B5810 46805420 */ cvt.s.w $f16, $f10 -/* 00714 809B5814 E60802D4 */ swc1 $f8, 0x02D4($s0) ## 000002D4 -/* 00718 809B5818 C43261D8 */ lwc1 $f18, %lo(D_809B61D8)($at) -/* 0071C 809B581C A600025A */ sh $zero, 0x025A($s0) ## 0000025A -/* 00720 809B5820 8602025A */ lh $v0, 0x025A($s0) ## 0000025A -/* 00724 809B5824 A60B025C */ sh $t3, 0x025C($s0) ## 0000025C -/* 00728 809B5828 46128101 */ sub.s $f4, $f16, $f18 -/* 0072C 809B582C 3C01809B */ lui $at, %hi(D_809B61DC) ## $at = 809B0000 -/* 00730 809B5830 E60202DC */ swc1 $f2, 0x02DC($s0) ## 000002DC -/* 00734 809B5834 E6020284 */ swc1 $f2, 0x0284($s0) ## 00000284 -/* 00738 809B5838 E60402D0 */ swc1 $f4, 0x02D0($s0) ## 000002D0 -/* 0073C 809B583C E602027C */ swc1 $f2, 0x027C($s0) ## 0000027C -/* 00740 809B5840 A6020258 */ sh $v0, 0x0258($s0) ## 00000258 -/* 00744 809B5844 A6020256 */ sh $v0, 0x0256($s0) ## 00000256 -/* 00748 809B5848 A6020254 */ sh $v0, 0x0254($s0) ## 00000254 -/* 0074C 809B584C C42661DC */ lwc1 $f6, %lo(D_809B61DC)($at) -/* 00750 809B5850 3C0140A0 */ lui $at, 0x40A0 ## $at = 40A00000 -/* 00754 809B5854 44814000 */ mtc1 $at, $f8 ## $f8 = 5.00 -/* 00758 809B5858 AE0C0250 */ sw $t4, 0x0250($s0) ## 00000250 -/* 0075C 809B585C E6020288 */ swc1 $f2, 0x0288($s0) ## 00000288 -/* 00760 809B5860 E606006C */ swc1 $f6, 0x006C($s0) ## 0000006C -/* 00764 809B5864 1000004D */ beq $zero, $zero, .L809B599C -/* 00768 809B5868 E60802E0 */ swc1 $f8, 0x02E0($s0) ## 000002E0 -/* 0076C 809B586C 44801000 */ mtc1 $zero, $f2 ## $f2 = 0.00 -.L809B5870: -/* 00770 809B5870 C60A00EC */ lwc1 $f10, 0x00EC($s0) ## 000000EC -/* 00774 809B5874 C7B00034 */ lwc1 $f16, 0x0034($sp) -/* 00778 809B5878 304D0001 */ andi $t5, $v0, 0x0001 ## $t5 = 00000000 -/* 0077C 809B587C 460A103C */ c.lt.s $f2, $f10 -/* 00780 809B5880 00000000 */ nop -/* 00784 809B5884 4500001A */ bc1f .L809B58F0 -/* 00788 809B5888 00000000 */ nop -/* 0078C 809B588C C6120024 */ lwc1 $f18, 0x0024($s0) ## 00000024 -/* 00790 809B5890 3C014248 */ lui $at, 0x4248 ## $at = 42480000 -/* 00794 809B5894 44816000 */ mtc1 $at, $f12 ## $f12 = 50.00 -/* 00798 809B5898 46128001 */ sub.s $f0, $f16, $f18 -/* 0079C 809B589C C7A40038 */ lwc1 $f4, 0x0038($sp) -/* 007A0 809B58A0 46000005 */ abs.s $f0, $f0 -/* 007A4 809B58A4 460C003C */ c.lt.s $f0, $f12 -/* 007A8 809B58A8 00000000 */ nop -/* 007AC 809B58AC 45000010 */ bc1f .L809B58F0 -/* 007B0 809B58B0 00000000 */ nop -/* 007B4 809B58B4 C6060028 */ lwc1 $f6, 0x0028($s0) ## 00000028 -/* 007B8 809B58B8 C7A8003C */ lwc1 $f8, 0x003C($sp) -/* 007BC 809B58BC 46062001 */ sub.s $f0, $f4, $f6 -/* 007C0 809B58C0 46000005 */ abs.s $f0, $f0 -/* 007C4 809B58C4 460C003C */ c.lt.s $f0, $f12 -/* 007C8 809B58C8 00000000 */ nop -/* 007CC 809B58CC 45000008 */ bc1f .L809B58F0 -/* 007D0 809B58D0 00000000 */ nop -/* 007D4 809B58D4 C60A002C */ lwc1 $f10, 0x002C($s0) ## 0000002C -/* 007D8 809B58D8 460A4001 */ sub.s $f0, $f8, $f10 -/* 007DC 809B58DC 46000005 */ abs.s $f0, $f0 -/* 007E0 809B58E0 460C003C */ c.lt.s $f0, $f12 -/* 007E4 809B58E4 00000000 */ nop -/* 007E8 809B58E8 45030004 */ bc1tl .L809B58FC -/* 007EC 809B58EC 860F0030 */ lh $t7, 0x0030($s0) ## 00000030 -.L809B58F0: -/* 007F0 809B58F0 11A0001F */ beq $t5, $zero, .L809B5970 -/* 007F4 809B58F4 2419000A */ addiu $t9, $zero, 0x000A ## $t9 = 0000000A -/* 007F8 809B58F8 860F0030 */ lh $t7, 0x0030($s0) ## 00000030 -.L809B58FC: -/* 007FC 809B58FC 860E008A */ lh $t6, 0x008A($s0) ## 0000008A -/* 00800 809B5900 3C0144FA */ lui $at, 0x44FA ## $at = 44FA0000 -/* 00804 809B5904 448F2000 */ mtc1 $t7, $f4 ## $f4 = 0.00 -/* 00808 809B5908 448E8000 */ mtc1 $t6, $f16 ## $f16 = 0.00 -/* 0080C 809B590C 44814000 */ mtc1 $at, $f8 ## $f8 = 2000.00 -/* 00810 809B5910 468021A0 */ cvt.s.w $f6, $f4 -/* 00814 809B5914 A600025A */ sh $zero, 0x025A($s0) ## 0000025A -/* 00818 809B5918 8602025A */ lh $v0, 0x025A($s0) ## 0000025A -/* 0081C 809B591C E60202DC */ swc1 $f2, 0x02DC($s0) ## 000002DC -/* 00820 809B5920 E602027C */ swc1 $f2, 0x027C($s0) ## 0000027C -/* 00824 809B5924 468084A0 */ cvt.s.w $f18, $f16 -/* 00828 809B5928 E6020284 */ swc1 $f2, 0x0284($s0) ## 00000284 -/* 0082C 809B592C 3C01809B */ lui $at, %hi(D_809B61E0) ## $at = 809B0000 -/* 00830 809B5930 A6020258 */ sh $v0, 0x0258($s0) ## 00000258 -/* 00834 809B5934 A6020256 */ sh $v0, 0x0256($s0) ## 00000256 -/* 00838 809B5938 46083281 */ sub.s $f10, $f6, $f8 -/* 0083C 809B593C E61202D4 */ swc1 $f18, 0x02D4($s0) ## 000002D4 -/* 00840 809B5940 A6020254 */ sh $v0, 0x0254($s0) ## 00000254 -/* 00844 809B5944 3C18809B */ lui $t8, %hi(func_809B59B0) ## $t8 = 809B0000 -/* 00848 809B5948 E60A02D0 */ swc1 $f10, 0x02D0($s0) ## 000002D0 -/* 0084C 809B594C C43061E0 */ lwc1 $f16, %lo(D_809B61E0)($at) -/* 00850 809B5950 3C0140A0 */ lui $at, 0x40A0 ## $at = 40A00000 -/* 00854 809B5954 44819000 */ mtc1 $at, $f18 ## $f18 = 5.00 -/* 00858 809B5958 271859B0 */ addiu $t8, $t8, %lo(func_809B59B0) ## $t8 = 809B59B0 -/* 0085C 809B595C E6020288 */ swc1 $f2, 0x0288($s0) ## 00000288 -/* 00860 809B5960 AE180250 */ sw $t8, 0x0250($s0) ## 00000250 -/* 00864 809B5964 E610006C */ swc1 $f16, 0x006C($s0) ## 0000006C -/* 00868 809B5968 1000000C */ beq $zero, $zero, .L809B599C -/* 0086C 809B596C E61202E0 */ swc1 $f18, 0x02E0($s0) ## 000002E0 -.L809B5970: -/* 00870 809B5970 A6190254 */ sh $t9, 0x0254($s0) ## 00000254 -/* 00874 809B5974 3C01809B */ lui $at, %hi(D_809B61E4) ## $at = 809B0000 -/* 00878 809B5978 C42461E4 */ lwc1 $f4, %lo(D_809B61E4)($at) -/* 0087C 809B597C 3C01809B */ lui $at, %hi(D_809B61E8) ## $at = 809B0000 -/* 00880 809B5980 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00884 809B5984 E6040264 */ swc1 $f4, 0x0264($s0) ## 00000264 -/* 00888 809B5988 C42661E8 */ lwc1 $f6, %lo(D_809B61E8)($at) -/* 0088C 809B598C 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 -/* 00890 809B5990 24060002 */ addiu $a2, $zero, 0x0002 ## $a2 = 00000002 -/* 00894 809B5994 0C26D49A */ jal func_809B5268 -/* 00898 809B5998 E6060288 */ swc1 $f6, 0x0288($s0) ## 00000288 -.L809B599C: -/* 0089C 809B599C 8FBF0024 */ lw $ra, 0x0024($sp) -/* 008A0 809B59A0 8FB0001C */ lw $s0, 0x001C($sp) -/* 008A4 809B59A4 8FB10020 */ lw $s1, 0x0020($sp) -/* 008A8 809B59A8 03E00008 */ jr $ra -/* 008AC 809B59AC 27BD0050 */ addiu $sp, $sp, 0x0050 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Insect/func_80A7C86C.s b/asm/non_matchings/overlays/actors/ovl_En_Insect/func_80A7C86C.s deleted file mode 100644 index aa0998e132..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Insect/func_80A7C86C.s +++ /dev/null @@ -1,157 +0,0 @@ -.late_rodata -glabel D_80A7DFF4 - .float 0.8 - -glabel D_80A7DFF8 - .float 1.6 - -glabel D_80A7DFFC - .float 1.9 - -.text -glabel func_80A7C86C -/* 00A4C 80A7C86C 27BDFFB8 */ addiu $sp, $sp, 0xFFB8 ## $sp = FFFFFFB8 -/* 00A50 80A7C870 AFBF0024 */ sw $ra, 0x0024($sp) -/* 00A54 80A7C874 AFB00020 */ sw $s0, 0x0020($sp) -/* 00A58 80A7C878 AFA5004C */ sw $a1, 0x004C($sp) -/* 00A5C 80A7C87C 3C014220 */ lui $at, 0x4220 ## $at = 42200000 -/* 00A60 80A7C880 44813000 */ mtc1 $at, $f6 ## $f6 = 40.00 -/* 00A64 80A7C884 C4840090 */ lwc1 $f4, 0x0090($a0) ## 00000090 -/* 00A68 80A7C888 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00A6C 80A7C88C 3C053FE6 */ lui $a1, 0x3FE6 ## $a1 = 3FE60000 -/* 00A70 80A7C890 4606203C */ c.lt.s $f4, $f6 -/* 00A74 80A7C894 00007025 */ or $t6, $zero, $zero ## $t6 = 00000000 -/* 00A78 80A7C898 34A56666 */ ori $a1, $a1, 0x6666 ## $a1 = 3FE66666 -/* 00A7C 80A7C89C 26040068 */ addiu $a0, $s0, 0x0068 ## $a0 = 00000068 -/* 00A80 80A7C8A0 45000002 */ bc1f .L80A7C8AC -/* 00A84 80A7C8A4 3C063DCC */ lui $a2, 0x3DCC ## $a2 = 3DCC0000 -/* 00A88 80A7C8A8 240E0001 */ addiu $t6, $zero, 0x0001 ## $t6 = 00000001 -.L80A7C8AC: -/* 00A8C 80A7C8AC 44804000 */ mtc1 $zero, $f8 ## $f8 = 0.00 -/* 00A90 80A7C8B0 A7AE0038 */ sh $t6, 0x0038($sp) -/* 00A94 80A7C8B4 34C6CCCD */ ori $a2, $a2, 0xCCCD ## $a2 = 3DCCCCCD -/* 00A98 80A7C8B8 3C073F00 */ lui $a3, 0x3F00 ## $a3 = 3F000000 -/* 00A9C 80A7C8BC 0C01E0C4 */ jal Math_SmoothScaleMaxMinF - -/* 00AA0 80A7C8C0 E7A80010 */ swc1 $f8, 0x0010($sp) -/* 00AA4 80A7C8C4 26040024 */ addiu $a0, $s0, 0x0024 ## $a0 = 00000024 -/* 00AA8 80A7C8C8 26050008 */ addiu $a1, $s0, 0x0008 ## $a1 = 00000008 -/* 00AAC 80A7C8CC AFA5002C */ sw $a1, 0x002C($sp) -/* 00AB0 80A7C8D0 0C29EF90 */ jal EnInsect_XZDistanceSquared -/* 00AB4 80A7C8D4 AFA40030 */ sw $a0, 0x0030($sp) -/* 00AB8 80A7C8D8 3C0146C8 */ lui $at, 0x46C8 ## $at = 46C80000 -/* 00ABC 80A7C8DC 44815000 */ mtc1 $at, $f10 ## $f10 = 25600.00 -/* 00AC0 80A7C8E0 8FA40030 */ lw $a0, 0x0030($sp) -/* 00AC4 80A7C8E4 8FA5002C */ lw $a1, 0x002C($sp) -/* 00AC8 80A7C8E8 4600503C */ c.lt.s $f10, $f0 -/* 00ACC 80A7C8EC 00000000 */ nop -/* 00AD0 80A7C8F0 45010006 */ bc1t .L80A7C90C -/* 00AD4 80A7C8F4 00000000 */ nop -/* 00AD8 80A7C8F8 860F031A */ lh $t7, 0x031A($s0) ## 0000031A -/* 00ADC 80A7C8FC 87B80038 */ lh $t8, 0x0038($sp) -/* 00AE0 80A7C900 29E10004 */ slti $at, $t7, 0x0004 -/* 00AE4 80A7C904 1020000A */ beq $at, $zero, .L80A7C930 -/* 00AE8 80A7C908 00000000 */ nop -.L80A7C90C: -/* 00AEC 80A7C90C 0C01E01A */ jal Math_Vec3f_Yaw - -/* 00AF0 80A7C910 00000000 */ nop -/* 00AF4 80A7C914 00022C00 */ sll $a1, $v0, 16 -/* 00AF8 80A7C918 00052C03 */ sra $a1, $a1, 16 -/* 00AFC 80A7C91C 26040032 */ addiu $a0, $s0, 0x0032 ## $a0 = 00000032 -/* 00B00 80A7C920 0C01DE2B */ jal Math_ApproxUpdateScaledS - -/* 00B04 80A7C924 240607D0 */ addiu $a2, $zero, 0x07D0 ## $a2 = 000007D0 -/* 00B08 80A7C928 1000001C */ beq $zero, $zero, .L80A7C99C -/* 00B0C 80A7C92C 860A0032 */ lh $t2, 0x0032($s0) ## 00000032 -.L80A7C930: -/* 00B10 80A7C930 13000019 */ beq $t8, $zero, .L80A7C998 -/* 00B14 80A7C934 8FA3004C */ lw $v1, 0x004C($sp) -/* 00B18 80A7C938 8605008A */ lh $a1, 0x008A($s0) ## 0000008A -/* 00B1C 80A7C93C 8462009E */ lh $v0, 0x009E($v1) ## 0000009E -/* 00B20 80A7C940 34018000 */ ori $at, $zero, 0x8000 ## $at = 00008000 -/* 00B24 80A7C944 00A12821 */ addu $a1, $a1, $at -/* 00B28 80A7C948 00052C00 */ sll $a1, $a1, 16 -/* 00B2C 80A7C94C 30590010 */ andi $t9, $v0, 0x0010 ## $t9 = 00000000 -/* 00B30 80A7C950 13200008 */ beq $t9, $zero, .L80A7C974 -/* 00B34 80A7C954 00052C03 */ sra $a1, $a1, 16 -/* 00B38 80A7C958 30480020 */ andi $t0, $v0, 0x0020 ## $t0 = 00000000 -/* 00B3C 80A7C95C 5100000C */ beql $t0, $zero, .L80A7C990 -/* 00B40 80A7C960 26040032 */ addiu $a0, $s0, 0x0032 ## $a0 = 00000032 -/* 00B44 80A7C964 24A52000 */ addiu $a1, $a1, 0x2000 ## $a1 = 00002000 -/* 00B48 80A7C968 00052C00 */ sll $a1, $a1, 16 -/* 00B4C 80A7C96C 10000007 */ beq $zero, $zero, .L80A7C98C -/* 00B50 80A7C970 00052C03 */ sra $a1, $a1, 16 -.L80A7C974: -/* 00B54 80A7C974 30490020 */ andi $t1, $v0, 0x0020 ## $t1 = 00000000 -/* 00B58 80A7C978 51200005 */ beql $t1, $zero, .L80A7C990 -/* 00B5C 80A7C97C 26040032 */ addiu $a0, $s0, 0x0032 ## $a0 = 00000032 -/* 00B60 80A7C980 24A5E000 */ addiu $a1, $a1, 0xE000 ## $a1 = 00000000 -/* 00B64 80A7C984 00052C00 */ sll $a1, $a1, 16 -/* 00B68 80A7C988 00052C03 */ sra $a1, $a1, 16 -.L80A7C98C: -/* 00B6C 80A7C98C 26040032 */ addiu $a0, $s0, 0x0032 ## $a0 = 00000032 -.L80A7C990: -/* 00B70 80A7C990 0C01DE2B */ jal Math_ApproxUpdateScaledS - -/* 00B74 80A7C994 240607D0 */ addiu $a2, $zero, 0x07D0 ## $a2 = 000007D0 -.L80A7C998: -/* 00B78 80A7C998 860A0032 */ lh $t2, 0x0032($s0) ## 00000032 -.L80A7C99C: -/* 00B7C 80A7C99C 3C0180A8 */ lui $at, %hi(D_80A7DFF4) ## $at = 80A80000 -/* 00B80 80A7C9A0 C422DFF4 */ lwc1 $f2, %lo(D_80A7DFF4)($at) -/* 00B84 80A7C9A4 3C0180A8 */ lui $at, %hi(D_80A7DFF8) ## $at = 80A80000 -/* 00B88 80A7C9A8 A60A00B6 */ sh $t2, 0x00B6($s0) ## 000000B6 -/* 00B8C 80A7C9AC C432DFF8 */ lwc1 $f18, %lo(D_80A7DFF8)($at) -/* 00B90 80A7C9B0 C6100068 */ lwc1 $f16, 0x0068($s0) ## 00000068 -/* 00B94 80A7C9B4 3C0180A8 */ lui $at, %hi(D_80A7DFFC) ## $at = 80A80000 -/* 00B98 80A7C9B8 46128002 */ mul.s $f0, $f16, $f18 -/* 00B9C 80A7C9BC 4602003C */ c.lt.s $f0, $f2 -/* 00BA0 80A7C9C0 00000000 */ nop -/* 00BA4 80A7C9C4 45000003 */ bc1f .L80A7C9D4 -/* 00BA8 80A7C9C8 00000000 */ nop -/* 00BAC 80A7C9CC 1000000A */ beq $zero, $zero, .L80A7C9F8 -/* 00BB0 80A7C9D0 E60201C8 */ swc1 $f2, 0x01C8($s0) ## 000001C8 -.L80A7C9D4: -/* 00BB4 80A7C9D4 C42CDFFC */ lwc1 $f12, %lo(D_80A7DFFC)($at) -/* 00BB8 80A7C9D8 4600603C */ c.lt.s $f12, $f0 -/* 00BBC 80A7C9DC 00000000 */ nop -/* 00BC0 80A7C9E0 45020004 */ bc1fl .L80A7C9F4 -/* 00BC4 80A7C9E4 46000086 */ mov.s $f2, $f0 -/* 00BC8 80A7C9E8 10000002 */ beq $zero, $zero, .L80A7C9F4 -/* 00BCC 80A7C9EC 46006086 */ mov.s $f2, $f12 -/* 00BD0 80A7C9F0 46000086 */ mov.s $f2, $f0 -.L80A7C9F4: -/* 00BD4 80A7C9F4 E60201C8 */ swc1 $f2, 0x01C8($s0) ## 000001C8 -.L80A7C9F8: -/* 00BD8 80A7C9F8 0C02927F */ jal SkelAnime_FrameUpdateMatrix - -/* 00BDC 80A7C9FC 260401AC */ addiu $a0, $s0, 0x01AC ## $a0 = 000001AC -/* 00BE0 80A7CA00 860B031A */ lh $t3, 0x031A($s0) ## 0000031A -/* 00BE4 80A7CA04 87AC0038 */ lh $t4, 0x0038($sp) -/* 00BE8 80A7CA08 19600003 */ blez $t3, .L80A7CA18 -/* 00BEC 80A7CA0C 00000000 */ nop -/* 00BF0 80A7CA10 55800006 */ bnel $t4, $zero, .L80A7CA2C -/* 00BF4 80A7CA14 960D0314 */ lhu $t5, 0x0314($s0) ## 00000314 -.L80A7CA18: -/* 00BF8 80A7CA18 0C29F0E8 */ jal func_80A7C3A0 -/* 00BFC 80A7CA1C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00C00 80A7CA20 1000000C */ beq $zero, $zero, .L80A7CA54 -/* 00C04 80A7CA24 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00C08 80A7CA28 960D0314 */ lhu $t5, 0x0314($s0) ## 00000314 -.L80A7CA2C: -/* 00C0C 80A7CA2C 31AE0001 */ andi $t6, $t5, 0x0001 ## $t6 = 00000000 -/* 00C10 80A7CA30 51C00008 */ beql $t6, $zero, .L80A7CA54 -/* 00C14 80A7CA34 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00C18 80A7CA38 960F0088 */ lhu $t7, 0x0088($s0) ## 00000088 -/* 00C1C 80A7CA3C 31F80040 */ andi $t8, $t7, 0x0040 ## $t8 = 00000000 -/* 00C20 80A7CA40 53000004 */ beql $t8, $zero, .L80A7CA54 -/* 00C24 80A7CA44 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00C28 80A7CA48 0C29F398 */ jal func_80A7CE60 -/* 00C2C 80A7CA4C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00C30 80A7CA50 8FBF0024 */ lw $ra, 0x0024($sp) -.L80A7CA54: -/* 00C34 80A7CA54 8FB00020 */ lw $s0, 0x0020($sp) -/* 00C38 80A7CA58 27BD0048 */ addiu $sp, $sp, 0x0048 ## $sp = 00000000 -/* 00C3C 80A7CA5C 03E00008 */ jr $ra -/* 00C40 80A7CA60 00000000 */ nop diff --git a/data/overlays/actors/z_en_attack_niw.reloc.s b/data/overlays/actors/z_en_attack_niw.reloc.s deleted file mode 100644 index b66f34bc91..0000000000 --- a/data/overlays/actors/z_en_attack_niw.reloc.s +++ /dev/null @@ -1,13 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purpose registers - -.section .rodata - -.balign 16 - -glabel D_809B6200 - .incbin "baserom/ovl_En_Attack_Niw", 0x1100, 0x00000150 diff --git a/data/overlays/actors/z_en_insect.reloc.s b/data/overlays/actors/z_en_insect.reloc.s deleted file mode 100644 index a825ed25d7..0000000000 --- a/data/overlays/actors/z_en_insect.reloc.s +++ /dev/null @@ -1,13 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purpose registers - -.section .rodata - -.balign 16 - -glabel D_80A7E0B0 - .incbin "baserom/ovl_En_Insect", 0x2290, 0x000003B0 diff --git a/include/functions.h b/include/functions.h index 76abefe53c..8bd2e3eccd 100644 --- a/include/functions.h +++ b/include/functions.h @@ -1384,7 +1384,7 @@ void SkelAnime_Free(SkelAnime* skelAnime, GlobalContext* globalCtx); // ? func_800A60D8(?); void func_800A6330(Actor* this, GlobalContext* globalCtx, PSkinAwb*, void* callback, s32); void func_800A63CC(Actor* this, GlobalContext* globalCtx, PSkinAwb*, s32, s32, s32, s32, s32); -void func_800A6408(ColliderJntSphItem* collider, u8 joint, Vec3f*, Vec3f*); +void func_800A6408(PSkinAwb* skin, u8 joint, Vec3f*, Vec3f*); // ? func_800A6460(?); void func_800A663C(GlobalContext* globalCtx, PSkinAwb*, SkeletonHeader*, AnimationHeader*); void func_800A6888(GlobalContext*, PSkinAwb*); diff --git a/spec b/spec index c60ea7d6b7..83f4d7a43f 100644 --- a/spec +++ b/spec @@ -1926,11 +1926,7 @@ endseg beginseg name "ovl_En_Attack_Niw" include "build/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.o" -#ifdef NON_MATCHING include "build/src/overlays/actors/ovl_En_Attack_Niw/ovl_En_Attack_Niw_reloc.o" -#else - include "build/data/overlays/actors/z_en_attack_niw.reloc.o" -#endif endseg beginseg @@ -2581,11 +2577,7 @@ endseg beginseg name "ovl_En_Insect" include "build/src/overlays/actors/ovl_En_Insect/z_en_insect.o" -#ifdef NON_MATCHING include "build/src/overlays/actors/ovl_En_Insect/ovl_En_Insect_reloc.o" -#else - include "build/data/overlays/actors/z_en_insect.reloc.o" -#endif endseg beginseg diff --git a/src/code/z_eff_blure.c b/src/code/z_eff_blure.c index c75eed4f58..d376bbf98b 100644 --- a/src/code/z_eff_blure.c +++ b/src/code/z_eff_blure.c @@ -308,6 +308,7 @@ void EffectBlure_UpdateFlags(EffectBlureElement* elem) { void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3s* vec1, Vec3s* vec2, Color_RGBA8* color1, Color_RGBA8* color2) { Vec3s sp30; + s32 pad; EffectBlureElement* elem; f32 mode4Param; @@ -333,14 +334,14 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3 break; case 3: - ratio = ratio * 0.5f; + ratio /= 2.0f; vec1->x = func_80027E34(elem->p1.x, elem->p2.x, ratio); vec1->y = func_80027E34(elem->p1.y, elem->p2.y, ratio); vec1->z = func_80027E34(elem->p1.z, elem->p2.z, ratio); vec2->x = func_80027E34(elem->p2.x, elem->p1.x, ratio); vec2->y = func_80027E34(elem->p2.y, elem->p1.y, ratio); vec2->z = func_80027E34(elem->p2.z, elem->p1.z, ratio); - ratio = ratio + ratio; + ratio *= 2.0f; break; case 4: @@ -352,9 +353,9 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3 vec1->x = (sp30.x * 0.5f * (mode4Param - 1.0f) * ratio) + elem->p1.x; vec1->y = (sp30.y * 0.5f * (mode4Param - 1.0f) * ratio) + elem->p1.y; vec1->z = (sp30.z * 0.5f * (mode4Param - 1.0f) * ratio) + elem->p1.z; - vec2->x = -(sp30.x * 0.5f * (mode4Param - 1.0f) * ratio) + elem->p2.x; - vec2->y = -(sp30.y * 0.5f * (mode4Param - 1.0f) * ratio) + elem->p2.y; - vec2->z = -(sp30.z * 0.5f * (mode4Param - 1.0f) * ratio) + elem->p2.z; + vec2->x = elem->p2.x - (sp30.x * 0.5f * (mode4Param - 1.0f) * ratio); + vec2->y = elem->p2.y - (sp30.y * 0.5f * (mode4Param - 1.0f) * ratio); + vec2->z = elem->p2.z - (sp30.z * 0.5f * (mode4Param - 1.0f) * ratio); break; case 0: @@ -367,18 +368,10 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3 vec2->z = elem->p2.z; break; } - sp30 = sp30; // Optimized out but seems necessary to match stack usage if (this->flags & 0x10) { - color1->a = 255; - color1->b = 255; - color1->g = 255; - color1->r = 255; - color2->r = 255; - color2->g = 255; - color2->b = 255; - color2->a = 255; + color1->r = color1->g = color1->b = color1->a = color2->r = color2->g = color2->b = color2->a = 255; } else { color1->r = func_80027E84(this->p1StartColor.r, this->p1EndColor.r, ratio); color1->g = func_80027E84(this->p1StartColor.g, this->p1EndColor.g, ratio); diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index a8eda088d5..19aac4ae87 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -730,8 +730,6 @@ Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limb return gfx; } -#ifdef NON_MATCHING -// Function is unused. This is functionally equivilent, misplace andi which caused regalloc s32 func_800A29BC(s32 arg0, s32 arg1, Vec3s* arg2) { s16* temp_t1; s16* temp_a3; @@ -752,6 +750,8 @@ s32 func_800A29BC(s32 arg0, s32 arg1, Vec3s* arg2) { arg2++; temp_a3 += 6; + if (t & 1) {} + if (t > 0) { if (t & 1) { phi_v0++; @@ -781,9 +781,6 @@ s32 func_800A29BC(s32 arg0, s32 arg1, Vec3s* arg2) { ret: return t; } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A29BC.s") -#endif s16 func_800A2DBC(GenericAnimationHeader* animationSeg) { GenericAnimationHeader* animation = SEGMENTED_TO_VIRTUAL(animationSeg); diff --git a/src/code/z_skin_matrix.c b/src/code/z_skin_matrix.c index 62513bc0e1..f299f76c92 100644 --- a/src/code/z_skin_matrix.c +++ b/src/code/z_skin_matrix.c @@ -238,75 +238,62 @@ void SkinMatrix_MtxFCopy(MtxF* src, MtxF* dest) { * returns 0 if successfully inverted * returns 2 if matrix non-invertible (0 determinant) */ -#ifdef NON_MATCHING -// Saved register usage differences and probably regalloc s32 SkinMatrix_Invert(MtxF* src, MtxF* dest) { MtxF mfCopy; s32 i; - s32 k; - f32 temp1; + s32 pad; f32 temp2; - f32 diagElement; + f32 temp1; s32 thisRow; s32 thisCol; - u32 pad; SkinMatrix_MtxFCopy(src, &mfCopy); SkinMatrix_Clear(dest); - for (thisRow = 0; thisRow != 4; thisRow++) { - for (thisCol = thisRow; (thisCol < 4) && (fabsf(mfCopy.mf[thisRow][thisCol]) < 0.0005f); thisCol++) {} + for (thisRow = 0; thisRow < 4; thisRow++) { + thisCol = thisRow; + while ((thisCol < 4) && (fabsf(mfCopy.mf[thisRow][thisCol]) < 0.0005f)) { + thisCol++; + } if (thisCol == 4) { // reaching col = 4 means the row is either all 0 or a duplicate row. // therefore singular matrix (0 determinant). + osSyncPrintf(VT_COL(YELLOW, BLACK)); osSyncPrintf("Skin_Matrix_InverseMatrix():逆行列つくれません\n"); osSyncPrintf(VT_RST); return 2; } - if (thisCol != thisRow) { // responsible for swapping columns if zero on diagonal - for (i = 0; i != 4; i++) { + for (i = 0; i < 4; i++) { temp1 = mfCopy.mf[i][thisCol]; mfCopy.mf[i][thisCol] = mfCopy.mf[i][thisRow]; mfCopy.mf[i][thisRow] = temp1; - temp1 = dest->mf[i][thisCol]; + temp2 = dest->mf[i][thisCol]; dest->mf[i][thisCol] = dest->mf[i][thisRow]; - dest->mf[i][thisRow] = temp1; + dest->mf[i][thisRow] = temp2; } } - diagElement = mfCopy.mf[thisRow][thisRow]; // Scale this whole column s.t. the diag element = 1 - mfCopy.mf[0][thisRow] = mfCopy.mf[0][thisRow] / diagElement; - dest->mf[0][thisRow] = dest->mf[0][thisRow] / diagElement; - mfCopy.mf[1][thisRow] = mfCopy.mf[1][thisRow] / diagElement; - dest->mf[1][thisRow] = dest->mf[1][thisRow] / diagElement; - mfCopy.mf[2][thisRow] = mfCopy.mf[2][thisRow] / diagElement; - dest->mf[2][thisRow] = dest->mf[2][thisRow] / diagElement; - mfCopy.mf[3][thisRow] = mfCopy.mf[3][thisRow] / diagElement; - dest->mf[3][thisRow] = dest->mf[3][thisRow] / diagElement; + temp1 = mfCopy.mf[thisRow][thisRow]; + for (i = 0; i < 4; i++) { + mfCopy.mf[i][thisRow] /= temp1; + dest->mf[i][thisRow] /= temp1; + } - // col i = col i - a * col j - for (k = 0; k != 4; k++) { - if (k != thisRow) { - temp2 = mfCopy.mf[thisRow][k]; - mfCopy.mf[0][k] = mfCopy.mf[0][k] - (mfCopy.mf[0][thisRow] * temp2); - dest->mf[0][k] = dest->mf[0][k] - (dest->mf[0][thisRow] * temp2); - mfCopy.mf[1][k] = mfCopy.mf[1][k] - (mfCopy.mf[1][thisRow] * temp2); - dest->mf[1][k] = dest->mf[1][k] - (dest->mf[1][thisRow] * temp2); - mfCopy.mf[2][k] = mfCopy.mf[2][k] - (mfCopy.mf[2][thisRow] * temp2); - dest->mf[2][k] = dest->mf[2][k] - (dest->mf[2][thisRow] * temp2); - mfCopy.mf[3][k] = mfCopy.mf[3][k] - (mfCopy.mf[3][thisRow] * temp2); - dest->mf[3][k] = dest->mf[3][k] - (dest->mf[3][thisRow] * temp2); + for (thisCol = 0; thisCol < 4; thisCol++) { + if (thisCol != thisRow) { + temp1 = mfCopy.mf[thisRow][thisCol]; + for (i = 0; i < 4; i++) { + mfCopy.mf[i][thisCol] -= mfCopy.mf[i][thisRow] * temp1; + dest->mf[i][thisCol] -= dest->mf[i][thisRow] * temp1; + } } } } return 0; } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skin_matrix/SkinMatrix_Invert.s") -#endif /** * Produces a matrix which scales x,y,z components of vectors or x,y,z rows of matrices (when applied on LHS) @@ -620,63 +607,47 @@ Mtx* SkinMatrix_MtxFToNewMtx(GraphicsContext* gfxCtx, MtxF* src) { } /** - * Produces a matrix which rotates vectors by angle a around the vector with components (x,y,z) + * Produces a matrix which rotates vectors by angle a around a unit vector with components (x,y,z) */ -#ifdef NON_EQUIVALENT -// I think this is functionally correct but I cannot be 100% sure of equivalence because diff output is not very close void func_800A7EC0(MtxF* mf, s16 a, f32 x, f32 y, f32 z) { - f32 sin; - f32 cos; - f32 ct; + f32 sinA; + f32 cosA; f32 xx; f32 yy; f32 zz; f32 xy; - f32 xz; f32 yz; - f32 sx; - f32 sy; - f32 sz; + f32 xz; + f32 pad; - sin = Math_Sins(a); - cos = Math_Coss(a); - - ct = 1.0f - cos; - sx = sin * x; - sy = sin * y; - sz = sin * z; + sinA = Math_Sins(a); + cosA = Math_Coss(a); xx = x * x; - xy = x * y; - xz = x * z; yy = y * y; - yz = y * z; zz = z * z; + xy = x * y; + yz = y * z; + xz = x * z; - mf->xx = (f32)ct * xx + cos; - mf->xy = (f32)((ct * xy) + sz); - mf->xz = (f32)((ct * xz) - sy); + mf->xx = (1.0f - xx) * cosA + xx; + mf->xy = (1.0f - cosA) * xy + z * sinA; + mf->xz = (1.0f - cosA) * xz - y * sinA; mf->xw = 0.0f; - mf->yx = (f32)((ct * (xy)) - sz); - mf->yy = (f32)ct * yy + cos; - mf->yz = (f32)((ct * (yz)) + sx); + mf->yx = (1.0f - cosA) * xy - z * sinA; + mf->yy = (1.0f - yy) * cosA + yy; + mf->yz = (1.0f - cosA) * yz + x * sinA; mf->yw = 0.0f; - mf->zx = (f32)((ct * (xz)) + sy); - mf->zy = (f32)((ct * (yz)) - sx); - mf->zz = (f32)ct * zz + cos; - + mf->zx = (1.0f - cosA) * xz + y * sinA; + mf->zy = (1.0f - cosA) * yz - x * sinA; + mf->zz = (1.0f - zz) * cosA + zz; mf->zw = 0.0f; - mf->wx = 0.0f; - mf->wy = 0.0f; - mf->wz = 0.0f; + mf->wx = mf->wy = mf->wz = 0.0f; mf->ww = 1.0f; } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skin_matrix/func_800A7EC0.s") -#endif void func_800A8030(MtxF* mf, f32* arg1) { f32 n; diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c index 775fe35ca5..78f922eafc 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -30,20 +30,20 @@ ColliderQuadInit sQuadInit = { { 0 }, }; -Vec3f sUnusedVec1 = { 0.0f, 0.5f, 0.0f }; -Vec3f sUnusedVec2 = { 0.0f, 0.5f, 0.0f }; +static Vec3f sUnusedVec1 = { 0.0f, 0.5f, 0.0f }; +static Vec3f sUnusedVec2 = { 0.0f, 0.5f, 0.0f }; -Color_RGB8 sUnusedColors[] = { +static Color_RGB8 sUnusedColors[] = { { 255, 255, 100 }, { 255, 255, 50 }, }; -Vec3f D_80865B70 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_80865B7C = { 0.0f, 0.0f, 900.0f }; -Vec3f D_80865B88 = { 0.0f, 500.0f, -3000.0f }; -Vec3f D_80865B94 = { 0.0f, -500.0f, -3000.0f }; -Vec3f D_80865BA0 = { 0.0f, 500.0f, 1200.0f }; -Vec3f D_80865BAC = { 0.0f, -500.0f, 1200.0f }; +static Vec3f D_80865B70 = { 0.0f, 0.0f, 0.0f }; +static Vec3f D_80865B7C = { 0.0f, 0.0f, 900.0f }; +static Vec3f D_80865B88 = { 0.0f, 500.0f, -3000.0f }; +static Vec3f D_80865B94 = { 0.0f, -500.0f, -3000.0f }; +static Vec3f D_80865BA0 = { 0.0f, 500.0f, 1200.0f }; +static Vec3f D_80865BAC = { 0.0f, -500.0f, 1200.0f }; extern Gfx D_0602B288[]; extern Gfx D_0602AFF0[]; diff --git a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c index c4685dd570..6f7c1c3430 100644 --- a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c +++ b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c @@ -45,7 +45,7 @@ static ColliderCylinderInit sColCylinderInit1 = { { 50, 60, 280, { 0, 0, 0 } }, }; -s16 sHasParent = false; +static s16 sHasParent = false; extern Gfx D_60013500[]; extern UNK_TYPE D_06001DDC; @@ -70,23 +70,23 @@ void BgDodoago_SpawnSparkles(Vec3f* vec, GlobalContext* globalCtx) { } } -static InitChainEntry D_808725BC[] = { +static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneForward, 5000, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneScale, 1000, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneDownward, 800, ICHAIN_STOP), }; -u8 D_808727C0[100]; +static u8 D_808727C0[100]; -s32 D_80872824; +static s32 D_80872824; void BgDodoago_Init(Actor* thisx, GlobalContext* globalCtx) { BgDodoago* this = THIS; s32 pad; s32 localC = 0; - Actor_ProcessInitChain(&this->dyna.actor, D_808725BC); + Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyInfo_SetActorMove(&this->dyna, 0); DynaPolyInfo_Alloc(&D_06001DDC, &localC); this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, localC); diff --git a/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c index 4c476b7894..94608120df 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c @@ -47,7 +47,7 @@ static InitChainEntry sInitChain[] = { static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f }; -Gfx* D_8087B578[] = { 0x06007C00, 0x06002320, 0x060035A0 }; +static Gfx* D_8087B578[] = { 0x06007C00, 0x06002320, 0x060035A0 }; void BgGndSoulmeiro_Init(Actor* thisx, GlobalContext* globalCtx) { BgGndSoulmeiro* this = THIS; diff --git a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c index a9768a0f88..c95d51bd3c 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c @@ -49,13 +49,13 @@ static ColliderTrisItemInit sTrisItemInit[4] = { }, }; -ColliderTrisInit D_80886590 = { +static ColliderTrisInit sTrisInit = { { COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x20, COLSHAPE_TRIS }, 4, sTrisItemInit, }; -InitChainEntry D_808865A0[] = { +static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE), ICHAIN_F32_DIV1000(gravity, 65336, ICHAIN_STOP), }; @@ -70,12 +70,12 @@ void BgHidanDalm_Init(Actor* thisx, GlobalContext* globalCtx) { u32 dynaUnk; dynaUnk = 0; - Actor_ProcessInitChain(thisx, D_808865A0); + Actor_ProcessInitChain(thisx, sInitChain); DynaPolyInfo_SetActorMove(&this->dyna, DPM_UNK); DynaPolyInfo_Alloc(&D_0600DA10, &dynaUnk); this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, dynaUnk); Collider_InitTris(globalCtx, &this->collider); - Collider_SetTris(globalCtx, &this->collider, thisx, &D_80886590, this->colliderItems); + Collider_SetTris(globalCtx, &this->collider, thisx, &sTrisInit, this->colliderItems); this->switchFlag = (thisx->params >> 8) & 0xFF; thisx->params &= 0xFF; diff --git a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c index 1925ef8551..eafb406081 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c @@ -49,7 +49,7 @@ static CollisionCheckInfoInit sColChkInfoInit = { 0xFF, }; -UNK_PTR D_80886D04[] = { +static UNK_PTR D_80886D04[] = { 0x06015D20, 0x06016120, 0x06016520, 0x06016920, 0x06016D20, 0x06017120, 0x06017520, 0x06017920, }; diff --git a/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c b/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c index 2147886e15..bc93c3a057 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c @@ -22,7 +22,7 @@ void func_80889C18(BgHidanKousi* this, GlobalContext* globalCtx); void func_80889C90(BgHidanKousi* this, GlobalContext* globalCtx); void func_80889D28(BgHidanKousi* this, GlobalContext* globalCtx); -f32 D_80889E40[] = { 120.0f, 150.0f, 150.0f }; +static f32 D_80889E40[] = { 120.0f, 150.0f, 150.0f }; const ActorInit Bg_Hidan_Kousi_InitVars = { ACTOR_BG_HIDAN_KOUSI, @@ -40,20 +40,20 @@ static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), }; -UNK_PTR D_80889E70[] = { +static UNK_PTR D_80889E70[] = { 0x0600E2CC, 0x0600E380, 0x0600E430, }; -s16 D_80889E7C[] = { +static s16 D_80889E7C[] = { 0x4000, 0xC000, 0xC000, 0x0000, }; -Gfx* D_80889E84[] = { +static Gfx* D_80889E84[] = { 0x0600C798, 0x0600BFA8, 0x0600BB58, diff --git a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c index b9542da5a4..d29a325315 100644 --- a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c +++ b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c @@ -24,7 +24,7 @@ void func_80892E0C(BgJya1flift* this); void BgJya1flift_ResetMoveDelay(BgJya1flift* this); void BgJya1flift_DelayMove(BgJya1flift* this, GlobalContext* globalCtx); -u8 sHasSpawned = false; +static u8 sHasSpawned = false; const ActorInit Bg_Jya_1flift_InitVars = { ACTOR_BG_JYA_1FLIFT, @@ -44,7 +44,7 @@ static ColliderCylinderInit sCylinderInit = { { 70, 80, -82, { 0, 0, 0 } }, }; -f32 finalPositions[] = { 443.0f, -50.0f }; +static f32 sFinalPositions[] = { 443.0f, -50.0f }; static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE), @@ -116,7 +116,7 @@ void BgJya1flift_Destroy(Actor* thisx, GlobalContext* globalCtx) { void func_80892DB0(BgJya1flift* this) { this->actionFunc = func_80892DCC; - this->dyna.actor.posRot.pos.y = finalPositions[0]; + this->dyna.actor.posRot.pos.y = sFinalPositions[0]; } void func_80892DCC(BgJya1flift* this, GlobalContext* globalCtx) { @@ -127,7 +127,7 @@ void func_80892DCC(BgJya1flift* this, GlobalContext* globalCtx) { void func_80892E0C(BgJya1flift* this) { this->actionFunc = BgJya1flift_DoNothing; - this->dyna.actor.posRot.pos.y = finalPositions[0]; + this->dyna.actor.posRot.pos.y = sFinalPositions[0]; } void BgJya1flift_DoNothing(BgJya1flift* this, GlobalContext* globalCtx) { @@ -148,9 +148,9 @@ void BgJya1flift_Move(BgJya1flift* this, GlobalContext* globalCtx) { } else { tempVelocity = this->dyna.actor.velocity.y; } - if (fabsf(Math_SmoothScaleMaxMinF(&this->dyna.actor.posRot.pos.y, (finalPositions[this->isMovingDown]), 0.5f, + if (fabsf(Math_SmoothScaleMaxMinF(&this->dyna.actor.posRot.pos.y, (sFinalPositions[this->isMovingDown]), 0.5f, tempVelocity, 1.0f)) < 0.001f) { - this->dyna.actor.posRot.pos.y = finalPositions[this->isMovingDown]; + this->dyna.actor.posRot.pos.y = sFinalPositions[this->isMovingDown]; BgJya1flift_ResetMoveDelay(this); Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND); } else { diff --git a/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c b/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c index 1a2bd0b210..c48fb8a35b 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c +++ b/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c @@ -22,7 +22,7 @@ void BgJyaLift_DelayMove(BgJyaLift* this, GlobalContext* globalCtx); void BgJyaLift_SetupMove(BgJyaLift* this); void BgJyaLift_Move(BgJyaLift* this, GlobalContext* globalCtx); -s16 D_8089A020 = 0; +static s16 D_8089A020 = 0; const ActorInit Bg_Jya_Lift_InitVars = { ACTOR_BG_JYA_LIFT, diff --git a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c index 35a5d5e3ea..b1d1757676 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c +++ b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c @@ -68,19 +68,19 @@ static BgJyaMegamiPieceInit sPiecesInit[] = { { { 14.759999f, -125.8f, -44.16f }, 0.2f, 0x0320, 0x0258, 20 }, }; -s16 D_8089B14C[] = { +static s16 D_8089B14C[] = { 0x0005, 0x0008, 0x000B, 0x000E, 0x0011, 0x0014, 0x0017, 0x001A, }; -s16 D_8089B15C[] = { +static s16 D_8089B15C[] = { 0x0012, 0x001A, 0x0022, 0x002A, 0x0032, 0x003C, 0x0046, 0x0050, }; -s16 D_8089B16C[] = { +static s16 D_8089B16C[] = { 0x0030, 0x002A, 0x0024, 0x0020, 0x001C, 0x0018, 0x0014, 0x0010, }; -s16 D_8089B17C[] = { +static s16 D_8089B17C[] = { 0x0001, 0x0003, 0x0007, diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c index fa149001a4..7b7574c589 100644 --- a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c +++ b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c @@ -28,7 +28,7 @@ const ActorInit Bg_Menkuri_Eye_InitVars = { }; extern Gfx D_06002D20[]; -s32 D_8089C1A0; +static s32 D_8089C1A0; static ColliderJntSphItemInit sJntSphItemsInit[1] = { { diff --git a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c index b1b45c2e18..a941eba8b8 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c @@ -37,7 +37,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), }; -Gfx* D_808AC510[] = { 0x06001EB0, 0x06002780, 0x06003078, 0x06001228, 0x06001528 }; +static Gfx* D_808AC510[] = { 0x06001EB0, 0x06002780, 0x06003078, 0x06001228, 0x06001528 }; extern UNK_TYPE D_06001A38; extern UNK_TYPE D_06001C58; diff --git a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c index c7d65c123d..1c624ff255 100644 --- a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c @@ -56,7 +56,7 @@ static ColliderJntSphInit sJntSphInit = { sJntSphItemsInit, }; -Vec3f D_808B08AC[] = { +static Vec3f D_808B08AC[] = { { 0.0f, 116.65f, 50.0f }, { 115.0f, 95.0f, 10.0f }, { -115.0f, 95.0f, 10.0f }, diff --git a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c index dacf0d9ca6..6505ece45f 100644 --- a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c @@ -34,8 +34,8 @@ static ColliderCylinderInit sCylinderInit = { { 40, 80, 0, { 2259, 108, -1580 } }, }; -Vec3f D_808B272C = { 2259.0f, 108.0f, -1550.0f }; -Vec3f D_808B2738 = { 2259.0f, 108.0f, -1550.0f }; +static Vec3f D_808B272C = { 2259.0f, 108.0f, -1550.0f }; +static Vec3f D_808B2738 = { 2259.0f, 108.0f, -1550.0f }; extern UNK_TYPE D_06001A58; extern Gfx D_06001980[]; diff --git a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c index 00f15da908..fd9c5ff689 100644 --- a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c +++ b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c @@ -27,7 +27,7 @@ const ActorInit Bg_Spot11_Oasis_InitVars = { NULL, }; -s16 D_808B2E10[][2] = { +static s16 D_808B2E10[][2] = { { 1260, 2040 }, { 1259, 1947 }, { 1135, 1860 }, { 1087, 1912 }, { 1173, 2044 }, }; @@ -38,7 +38,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP), }; -Vec3f D_808B2E34[] = { +static Vec3f D_808B2E34[] = { { 0.0f, -100.0f, 0.0f }, { 100.0f, -80.0f, -50.0f }, { -50.0f, -80.0f, -100.0f }, { -75.0f, -90.0f, 90.0f }, { 30.0f, -100.0f, 40.0f }, }; diff --git a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c index b869a1b3ad..d58e48b75c 100644 --- a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c +++ b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c @@ -18,7 +18,7 @@ void func_808B44B8(BgSpot15Rrbox* this, GlobalContext* globalCtx); void func_808B4178(BgSpot15Rrbox* this, GlobalContext* globalCtx); void func_808B44CC(BgSpot15Rrbox* this, GlobalContext* globalCtx); -s16 D_808B4590 = 0; +static s16 D_808B4590 = 0; extern UNK_TYPE D_06000348; extern Gfx D_06000180[]; @@ -42,12 +42,12 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP), }; -Vec3f D_808B45C4[] = { +static Vec3f D_808B45C4[] = { { 770.0f, 1490.0f, -299.0f }, { 770.0f, 1550.0f, -299.0f }, }; -Vec3f D_808B45DC[] = { +static Vec3f D_808B45DC[] = { { 29.99f, 0.01f, -29.99f }, { -29.99f, 0.01f, -29.99f }, { -29.99f, 0.01f, 29.99f }, { 29.99f, 0.01f, 29.99f }, { 0.0f, 0.01f, 0.0f }, }; diff --git a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c index 3c73b7a09d..25d539b4ad 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c +++ b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c @@ -27,7 +27,7 @@ static EnBombf* sPlayerBomb = NULL; static s16 sTimer = 0; -s16 D_808B5DD8[][10] = { +static s16 D_808B5DD8[][10] = { { 0x0008, 0x0004, 0x0046, 0x07D0, 0xFCE0, 0x0000, 0x0064, 0x0000, 0x0000, 0x0000 }, { 0x0006, 0x0003, 0x0032, 0x00C8, 0x0A28, 0xC350, 0x005A, 0x0000, 0x0000, 0x0000 }, { 0x0005, 0x0003, 0x0028, 0xF63C, 0x0190, 0x30B0, 0x0032, 0x0000, 0x0000, 0x0000 }, diff --git a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c index b917ef4c9f..f35f77ba3e 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c @@ -42,24 +42,24 @@ const ActorInit Bg_Spot18_Obj_InitVars = { (ActorFunc)BgSpot18Obj_Draw, }; -u8 D_808B90F0[2][2] = { { 0x01, 0x01 }, { 0x01, 0x00 } }; +static u8 D_808B90F0[2][2] = { { 0x01, 0x01 }, { 0x01, 0x00 } }; -f32 D_808B90F4[] = { +static f32 D_808B90F4[] = { 0.1f, 0.1f, }; -UNK_TYPE D_808B90FC[] = { +static UNK_TYPE D_808B90FC[] = { 0x06002FE4, 0x0600261C, }; -u32 D_808B9104[] = { +static u32 D_808B9104[] = { 0, 0, }; -BgSpot18ObjInitFunc D_808B910C[] = { +static BgSpot18ObjInitFunc D_808B910C[] = { func_808B8A98, func_808B8910, func_808B8A5C, @@ -78,7 +78,7 @@ static InitChainEntry sInitChain2[] = { ICHAIN_F32(uncullZoneDownward, 700, ICHAIN_STOP), }; -BgSpot18ObjInitFunc D_808B913C[] = { +static BgSpot18ObjInitFunc D_808B913C[] = { func_808B8BB4, func_808B8C90, }; diff --git a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c index 5768be9f9a..daec715096 100644 --- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c +++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c @@ -48,7 +48,7 @@ static InitChainEntry sInitChain[] = { }; // unused -f32 D_808BD9C4[] = { +static f32 D_808BD9C4[] = { -2746.0f, 545.0f, 4694.0f, -2654.0f, 146.0f, 4534.0f, }; diff --git a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c index 938ce8457d..1f5c1c9cdf 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c @@ -37,7 +37,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), }; -Gfx* D_808BEC24[] = { 0x06007508, 0x06005DE0, 0x06005018 }; +static Gfx* D_808BEC24[] = { 0x06007508, 0x06005DE0, 0x06005018 }; extern UNK_TYPE D_06005780; extern UNK_TYPE D_06007798; diff --git a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c index 1e47b1a7a3..d7d55f88f3 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c @@ -33,7 +33,7 @@ const ActorInit Bg_Ydan_Maruta_InitVars = { (ActorFunc)BgYdanMaruta_Draw, }; -ColliderTrisItemInit D_808BF300[2] = { +static ColliderTrisItemInit sTrisItemInit[2] = { { { 0x00, { 0x20000000, 0x00, 0x04 }, { 0x00000004, 0x00, 0x00 }, 0x11, 0x01, 0x00 }, { { { 220.0f, -10.0f, 0.0f }, { 220.0f, 10.0f, 0.0f }, { -220.0f, 10.0f, 0.0f } } }, @@ -44,13 +44,13 @@ ColliderTrisItemInit D_808BF300[2] = { }, }; -ColliderTrisInit D_808BF378 = { +static ColliderTrisInit sTrisInit = { { COLTYPE_UNK10, 0x11, 0x09, 0x00, 0x20, COLSHAPE_TRIS }, 2, - D_808BF300, + sTrisItemInit, }; -InitChainEntry D_808BF388[] = { +static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), }; @@ -68,18 +68,18 @@ void BgYdanMaruta_Init(Actor* thisx, GlobalContext* globalCtx) { s32 localConst = 0; ColliderTrisItemInit* items; - Actor_ProcessInitChain(thisx, D_808BF388); + Actor_ProcessInitChain(thisx, sInitChain); Collider_InitTris(globalCtx, &this->collider); - Collider_SetTris(globalCtx, &this->collider, thisx, &D_808BF378, &this->colliderItems); + Collider_SetTris(globalCtx, &this->collider, thisx, &sTrisInit, &this->colliderItems); this->unk_168 = thisx->params & 0xFFFF; thisx->params = (thisx->params >> 8) & 0xFF; if (thisx->params == 0) { - items = &D_808BF300[0]; + items = &sTrisItemInit[0]; this->actionFunc = func_808BEFF4; } else { - items = &D_808BF300[1]; + items = &sTrisItemInit[1]; DynaPolyInfo_SetActorMove(&this->dyna, 0); DynaPolyInfo_Alloc(&D_060066A8, &localConst); this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, localConst); diff --git a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c index 4a39e3313f..2c94cb348d 100644 --- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c +++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c @@ -27,13 +27,13 @@ void func_8097D130(DemoGo* this, GlobalContext* globalCtx); void func_8097D290(DemoGo* this, GlobalContext* globalCtx); void func_8097D29C(DemoGo* this, GlobalContext* globalCtx); -UNK_PTR D_8097D440[] = { 0x0600CE80, 0x0600D280, 0x0600D680 }; +static UNK_PTR D_8097D440[] = { 0x0600CE80, 0x0600D280, 0x0600D680 }; -DemoGoActionFunc D_8097D44C[] = { +static DemoGoActionFunc D_8097D44C[] = { func_8097CFDC, func_8097CFFC, func_8097D01C, func_8097D058, func_8097D088, func_8097D0D0, func_8097D130, }; -DemoGoDrawFunc D_8097D468[] = { +static DemoGoDrawFunc D_8097D468[] = { func_8097D290, func_8097D29C, }; diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c index cd4e427921..8a28b70d19 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -51,13 +51,13 @@ void func_80987330(DemoIm* this, GlobalContext* globalCtx); void func_8098764C(DemoIm* this, GlobalContext* globalCtx); void func_80987658(DemoIm* this, GlobalContext* globalCtx); -UNK_PTR D_80987830[] = { +static UNK_PTR D_80987830[] = { 0x06007210, 0x06007D50, 0x06008150, }; -u32 D_8098783C = 0; +static u32 D_8098783C = 0; static ColliderCylinderInit_Set3 sCylinderInit = { { COLTYPE_UNK0, 0x00, 0x00, 0x09, COLSHAPE_CYLINDER }, @@ -75,7 +75,7 @@ static DemoImActionFunc sActionFuncs[] = { func_809872A8, func_809872F0, func_80987330, }; -Vec3f D_809887D8 = { 0.0f, 10.0f, 0.0f }; +static Vec3f D_809887D8 = { 0.0f, 10.0f, 0.0f }; static DemoImDrawFunc sDrawFuncs[] = { func_8098764C, diff --git a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c index bd499a30e8..05ee0ba331 100644 --- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c +++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c @@ -44,15 +44,15 @@ void func_8098FEA8(DemoSa* this, GlobalContext* globalCtx); void func_8098FEB4(DemoSa* this, GlobalContext* globalCtx); void func_8098F1C0(DemoSa* this, GlobalContext* globalCtx); -UNK_PTR D_809900E0[] = { +static UNK_PTR D_809900E0[] = { 0x06002F48, 0x06003C48, 0x06003848, 0x06004848, 0x06004E48, }; -UNK_PTR D_809900F4[] = { +static UNK_PTR D_809900F4[] = { 0x06003588, 0x06004C48, 0x06003348, 0x06004448, 0x06004648, }; -u32 D_80990108 = 0; +static u32 D_80990108 = 0; #include "z_demo_sa_cutscene_data.c" EARLY diff --git a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c index fd5e8ec43b..497849a7f9 100644 --- a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c +++ b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c @@ -38,7 +38,7 @@ static InitChainEntry sInitChain[] = { }; // Draw properties -Gfx D_809AD278[] = { +static Gfx D_809AD278[] = { gsDPPipeSync(), gsDPSetTextureLUT(G_TT_NONE), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), @@ -61,7 +61,7 @@ static Vtx sCylinderVertices[] = { }; // Polygons for cylinder -Gfx D_809AD3B8[] = { +static Gfx D_809AD3B8[] = { gsSPVertex(sCylinderVertices, 16, 0), gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0), gsSP2Triangles(0, 3, 4, 0, 0, 4, 5, 0), gsSP2Triangles(0, 5, 6, 0, 0, 6, 7, 0), gsSP2Triangles(8, 9, 10, 0, 8, 10, 11, 0), gsSP2Triangles(8, 11, 12, 0, 8, 12, 13, 0), @@ -80,7 +80,7 @@ static Vtx sCuboidVertices[] = { }; // Polygons for cuboid -Gfx D_809AD4B8[] = { +static Gfx D_809AD4B8[] = { gsSPVertex(sCuboidVertices, 8, 0), gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0), gsSP2Triangles(4, 5, 6, 0, 4, 6, 7, 0), gsSP2Triangles(0, 1, 4, 0, 1, 4, 5, 0), gsSP2Triangles(1, 2, 5, 0, 2, 5, 6, 0), gsSP2Triangles(2, 3, 6, 0, 3, 6, 7, 0), diff --git a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c index bceb2ff91f..27b386514f 100644 --- a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c +++ b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c @@ -38,7 +38,7 @@ static InitChainEntry sInitChain[] = { }; // Draw properties -Gfx D_809ADC38[] = { +static Gfx D_809ADC38[] = { gsDPPipeSync(), gsDPSetTextureLUT(G_TT_NONE), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), @@ -57,7 +57,7 @@ static Vtx sCuboidVertices[] = { }; // Cuboid polygons -Gfx D_809ADCF8[] = { +static Gfx D_809ADCF8[] = { gsSPVertex(sCuboidVertices, 8, 0), gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0), gsSP2Triangles(4, 5, 6, 0, 4, 6, 7, 0), gsSP2Triangles(0, 1, 4, 0, 1, 4, 5, 0), gsSP2Triangles(1, 2, 5, 0, 2, 5, 6, 0), gsSP2Triangles(2, 3, 6, 0, 3, 6, 7, 0), diff --git a/src/overlays/actors/ovl_En_Ani/z_en_ani.c b/src/overlays/actors/ovl_En_Ani/z_en_ani.c index fc4da1ebb4..803b33899c 100644 --- a/src/overlays/actors/ovl_En_Ani/z_en_ani.c +++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.c @@ -57,7 +57,7 @@ static InitChainEntry sInitChain[] = { static Vec3f sMultVec = { 800.0f, 500.0f, 0.0f }; -UNK_PTR D_809B0F80[] = { +static UNK_PTR D_809B0F80[] = { 0x06000408, 0x06001518, 0x06001D18, diff --git a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c index c54d82f267..1f7a5e5bde 100644 --- a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c +++ b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c @@ -37,7 +37,7 @@ const ActorInit En_Attack_Niw_InitVars = { static InitChainEntry sInitChain[] = { ICHAIN_U8(unk_1F, 1, ICHAIN_CONTINUE), - ICHAIN_F32_DIV1000(gravity, 63536, ICHAIN_CONTINUE), + ICHAIN_F32_DIV1000(gravity, -2000, ICHAIN_CONTINUE), ICHAIN_F32(unk_4C, 0, ICHAIN_STOP), }; @@ -182,8 +182,6 @@ s32 func_809B55EC(EnAttackNiw* this, GlobalContext* globalCtx) { } } -#ifdef NON_MATCHING -// &this->actor.posRot.pos stored at wrong place void func_809B5670(EnAttackNiw* this, GlobalContext* globalCtx) { s16 sp4E; s16 sp4C; @@ -202,7 +200,6 @@ void func_809B5670(EnAttackNiw* this, GlobalContext* globalCtx) { sp34.y = globalCtx->view.lookAt.y + tmpf2; sp34.z = globalCtx->view.lookAt.z + tmpf3; - if (1) {} this->unk_2D4 = Math_Vec3f_Yaw(&this->actor.posRot.pos, &sp34); this->unk_2D0 = Math_Vec3f_Pitch(&this->actor.posRot.pos, &sp34) * -1.0f; @@ -216,7 +213,9 @@ void func_809B5670(EnAttackNiw* this, GlobalContext* globalCtx) { if (this->actor.bgCheckFlags & 8) { this->unk_2D4 = this->actor.yawTowardsLink; this->unk_2D0 = this->actor.posRot.rot.x - 3000.0f; - this->unk_2DC = this->unk_284 = this->unk_27C = 0.0f; + this->unk_2DC = 0.0f; + this->unk_284 = 0.0f; + this->unk_27C = 0.0f; this->unk_254 = this->unk_256 = this->unk_258 = this->unk_25A = 0; this->unk_25C = 0x64; this->actor.gravity = -0.2f; @@ -230,7 +229,9 @@ void func_809B5670(EnAttackNiw* this, GlobalContext* globalCtx) { this->unk_2D4 = this->actor.yawTowardsLink; this->unk_2D0 = this->actor.posRot.rot.x - 2000.0f; - this->unk_284 = this->unk_27C = this->unk_2DC = 0.0f; + this->unk_2DC = 0.0f; + this->unk_27C = 0.0f; + this->unk_284 = 0.0f; this->unk_254 = this->unk_256 = this->unk_258 = this->unk_25A = 0; this->actor.gravity = -0.2f; this->unk_2E0 = 5.0f; @@ -243,9 +244,6 @@ void func_809B5670(EnAttackNiw* this, GlobalContext* globalCtx) { func_809B5268(this, globalCtx, 2); } } -#else -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Attack_Niw/func_809B5670.s") -#endif void func_809B59B0(EnAttackNiw* this, GlobalContext* globalCtx) { if (!func_809B55EC(this, globalCtx)) { diff --git a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c index 9c6e0b945f..840af5d731 100644 --- a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c +++ b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c @@ -39,12 +39,12 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(uncullZoneDownward, 300, ICHAIN_STOP), }; -Gfx D_809C2590[] = { +static Gfx D_809C2590[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_OPA_SURF2), gsSPEndDisplayList(), }; -Gfx D_809C25A0[] = { +static Gfx D_809C25A0[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_SURF2), gsSPEndDisplayList(), }; diff --git a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c index b51e19a504..e1d73cb01f 100644 --- a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c +++ b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c @@ -12,8 +12,8 @@ void EnEncount1_SpawnLeevers(EnEncount1* this, GlobalContext* globalCtx); void EnEncount1_SpawnTektites(EnEncount1* this, GlobalContext* globalCtx); void EnEncount1_SpawnStalchildOrWolfos(EnEncount1* this, GlobalContext* globalCtx); -s16 sLeeverAngles[] = { 0x0000, 0x2710, 0x7148, 0x8EB8, 0xD8F0 }; -f32 sLeeverDists[] = { 200.0f, 170.0f, 120.0f, 120.0f, 170.0f }; +static s16 sLeeverAngles[] = { 0x0000, 0x2710, 0x7148, 0x8EB8, 0xD8F0 }; +static f32 sLeeverDists[] = { 200.0f, 170.0f, 120.0f, 120.0f, 170.0f }; const ActorInit En_Encount1_InitVars = { ACTOR_EN_ENCOUNT1, @@ -141,7 +141,8 @@ void EnEncount1_SpawnLeevers(EnEncount1* this, GlobalContext* globalCtx) { leever = (EnReeba*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_REEBA, spawnPos.x, spawnPos.y, spawnPos.z, 0, 0, 0, spawnParams); - if (1) {} if (1) {} + if (1) {} + if (1) {} if (leever != NULL) { this->curNumSpawn++; leever->unk_280 = this->leeverIndex++; diff --git a/src/overlays/actors/ovl_En_GirlA/z_en_girla.c b/src/overlays/actors/ovl_En_GirlA/z_en_girla.c index d8b52903aa..8041405188 100644 --- a/src/overlays/actors/ovl_En_GirlA/z_en_girla.c +++ b/src/overlays/actors/ovl_En_GirlA/z_en_girla.c @@ -81,7 +81,7 @@ const ActorInit En_GirlA_InitVars = { NULL, }; -char* D_80A3C590[] = { +static char* D_80A3C590[] = { "デクの実×5 ", "矢×30 ", "矢×50 ", "爆弾×5 ", "デクの実×10 ", "デクの棒 ", "爆弾×10 ", "さかな ", "赤クスリ ", "緑クスリ ", "青クスリ ", "巨人のナイフ ", "ハイリアの盾 ", "デクの盾 ", "ゴロンの服 ", "ゾ─ラの服 ", "回復のハート ", "ロンロン牛乳 ", @@ -93,10 +93,10 @@ char* D_80A3C590[] = { "赤クスリ ", "赤クスリ ", }; -s16 D_80A3C658[8] = { ITEM_MASK_KEATON, ITEM_MASK_SPOOKY, ITEM_MASK_SKULL, ITEM_MASK_BUNNY, - ITEM_MASK_TRUTH, ITEM_MASK_ZORA, ITEM_MASK_GORON, ITEM_MASK_GERUDO }; +static s16 D_80A3C658[8] = { ITEM_MASK_KEATON, ITEM_MASK_SPOOKY, ITEM_MASK_SKULL, ITEM_MASK_BUNNY, + ITEM_MASK_TRUTH, ITEM_MASK_ZORA, ITEM_MASK_GORON, ITEM_MASK_GERUDO }; -u16 D_80A3C668[5] = { 0x70B6, 0x70B5, 0x70B4, 0x70B7, 0x70BB }; +static u16 D_80A3C668[5] = { 0x70B6, 0x70B5, 0x70B4, 0x70B7, 0x70BB }; typedef struct { /* 0x00 */ s16 objID; @@ -112,7 +112,7 @@ typedef struct { /* 0x1C */ void (*unk_1C)(GlobalContext*, EnGirlA*); } ShopItemEntry; // size = 0x20 -ShopItemEntry D_80A3C674[] = { +static ShopItemEntry D_80A3C674[] = { { 0x00BB, 0x0011, func_8002ED80, 0x000F, 0x0005, 0x00B2, 0x007F, GI_NUTS_5_2, func_80A3ABF8, func_80A3B714, func_80A3BB6C }, { 0x00D8, 0x0025, func_8002EBCC, 0x003C, 0x001E, 0x00C1, 0x009B, GI_ARROWS_MEDIUM, func_80A3AAA8, func_80A3B634, @@ -210,7 +210,7 @@ ShopItemEntry D_80A3C674[] = { func_80A3BB6C }, }; -s16 D_80A3CCB4[8] = { 0x0005, 0x000A, 0x000F, 0x0014, 0x0019, 0x001E, 0x0023, 0x0028 }; +static s16 D_80A3CCB4[8] = { 0x0005, 0x000A, 0x000F, 0x0014, 0x0019, 0x001E, 0x0023, 0x0028 }; void func_80A3A750(EnGirlA* this, EnGirlAActionFunc func) { this->actionFunc = func; diff --git a/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/src/overlays/actors/ovl_En_Gs/z_en_gs.c index d1b9c005ed..a3d6232a11 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -44,11 +44,11 @@ static ColliderCylinderInit D_80A4FDA0 = { { 21, 48, 0, { 0, 0, 0 } }, }; -CollisionCheckInfoInit2 D_80A4FDCC = { 0x00, 0x0000, 0x0000, 0x0000, 0xFF }; +static CollisionCheckInfoInit2 D_80A4FDCC = { 0, 0, 0, 0, 0xFF }; -DamageTable D_80A4FDD8 = { 0x00, 0x00, 0xE0, 0xC0, 0xE0, 0xE0, 0xD0, 0xE0, 0xF0, 0xF0, 0xF0, - 0xB0, 0xB0, 0xB0, 0x00, 0x00, 0x00, 0xB0, 0xB0, 0xB0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static DamageTable D_80A4FDD8 = { 0x00, 0x00, 0xE0, 0xC0, 0xE0, 0xE0, 0xD0, 0xE0, 0xF0, 0xF0, 0xF0, + 0xB0, 0xB0, 0xB0, 0x00, 0x00, 0x00, 0xB0, 0xB0, 0xB0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), diff --git a/src/overlays/actors/ovl_En_Guest/z_en_guest.c b/src/overlays/actors/ovl_En_Guest/z_en_guest.c index 2250486be3..3e5fcdb35b 100644 --- a/src/overlays/actors/ovl_En_Guest/z_en_guest.c +++ b/src/overlays/actors/ovl_En_Guest/z_en_guest.c @@ -43,7 +43,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(unk_4C, 500, ICHAIN_STOP), }; -UNK_PTR D_80A50BA4[] = { +static UNK_PTR D_80A50BA4[] = { 0x060005FC, 0x060006FC, 0x060007FC, diff --git a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c index 9962446b90..960d1adc91 100644 --- a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c +++ b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c @@ -30,7 +30,7 @@ void EnHeishi1_TurnTowardLink(EnHeishi1* this, GlobalContext* globalCtx); void EnHeishi1_Kick(EnHeishi1* this, GlobalContext* globalCtx); void EnHeishi1_WaitNight(EnHeishi1* this, GlobalContext* globalCtx); -s32 sPlayerIsCaught = false; +static s32 sPlayerIsCaught = false; const ActorInit En_Heishi1_InitVars = { 0, @@ -44,25 +44,25 @@ const ActorInit En_Heishi1_InitVars = { (ActorFunc)EnHeishi1_Draw, }; -f32 sAnimParamsInit[][8] = { +static f32 sAnimParamsInit[][8] = { { 1.0f, -10.0f, 3.0f, 0.5f, 1000.0f, 200.0f, 0.3f, 1000.0f }, { 3.0f, -3.0f, 6.0f, 0.8f, 2000.0f, 400.0f, 0.5f, 2000.0f }, { 1.0f, -10.0f, 3.0f, 0.5f, 1000.0f, 200.0f, 0.3f, 1000.0f }, { 3.0f, -3.0f, 6.0f, 0.8f, 2000.0f, 400.0f, 0.5f, 2000.0f }, }; -s16 sBaseHeadTimers[] = { 20, 10, 20, 10, 13, 0 }; +static s16 sBaseHeadTimers[] = { 20, 10, 20, 10, 13, 0 }; -Vec3f sRupeePositions[] = { +static Vec3f sRupeePositions[] = { { 0.0f, 0.0f, 90.0f }, { -55.0f, 0.0f, 90.0f }, { -55.0f, 0.0f, 30.0f }, { -55.0f, 0.0f, -30.0f }, { 0.0f, 0.0f, -30.0f }, { 55.0f, 0.0f, -30.0f }, { 55.0f, 0.0f, 30.0f }, { 55.0f, 0.0f, 90.0f }, }; -s32 sCamDataIdxs[] = { +static s32 sCamDataIdxs[] = { 7, 7, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 4, 4, 5, 6, }; -s16 sWaypoints[] = { 0, 4, 1, 5, 2, 6, 3, 7 }; +static s16 sWaypoints[] = { 0, 4, 1, 5, 2, 6, 3, 7 }; extern AnimationHeader D_06005880; extern AnimationHeader D_06005C30; diff --git a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c index 72e6b35fd0..f274334832 100644 --- a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c +++ b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c @@ -274,7 +274,7 @@ void EnHorseGanon_Update(Actor* thisx, GlobalContext* globalCtx) { CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->colliderCylinder.base); } -void func_80A68FA8(Actor* thisx, GlobalContext* globalCtx, ColliderJntSphItem* colliderSphereItem) { +void func_80A68FA8(Actor* thisx, GlobalContext* globalCtx, PSkinAwb* skin) { Vec3f sp4C; Vec3f sp40; EnHorseGanon* this = THIS; @@ -285,7 +285,7 @@ void func_80A68FA8(Actor* thisx, GlobalContext* globalCtx, ColliderJntSphItem* c sp4C.y = this->colliderSphere.list[index].dim.modelSphere.center.y; sp4C.z = this->colliderSphere.list[index].dim.modelSphere.center.z; - func_800A6408(colliderSphereItem, this->colliderSphere.list[index].dim.joint, &sp4C, &sp40); + func_800A6408(skin, this->colliderSphere.list[index].dim.joint, &sp4C, &sp40); this->colliderSphere.list[index].dim.worldSphere.center.x = sp40.x; this->colliderSphere.list[index].dim.worldSphere.center.y = sp40.y; diff --git a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c index fdd4cbc095..85cecbd032 100644 --- a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c +++ b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c @@ -545,7 +545,7 @@ void EnHorseLinkChild_Update(Actor* thisx, GlobalContext* globalCtx) { func_80A6948C(this); } -void func_80A6ABF8(Actor* thisx, GlobalContext* globalCtx, ColliderJntSphItem* collider) { +void func_80A6ABF8(Actor* thisx, GlobalContext* globalCtx, PSkinAwb* skin) { Vec3f center; Vec3f newCenter; EnHorseLinkChild* this = THIS; @@ -555,7 +555,7 @@ void func_80A6ABF8(Actor* thisx, GlobalContext* globalCtx, ColliderJntSphItem* c center.x = this->headCollider.list[i].dim.modelSphere.center.x; center.y = this->headCollider.list[i].dim.modelSphere.center.y; center.z = this->headCollider.list[i].dim.modelSphere.center.z; - func_800A6408(collider, this->headCollider.list[i].dim.joint, ¢er, &newCenter); + func_800A6408(skin, this->headCollider.list[i].dim.joint, ¢er, &newCenter); this->headCollider.list[i].dim.worldSphere.center.x = newCenter.x; this->headCollider.list[i].dim.worldSphere.center.y = newCenter.y; this->headCollider.list[i].dim.worldSphere.center.z = newCenter.z; diff --git a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c index fda3836a52..880debd212 100644 --- a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c +++ b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c @@ -556,7 +556,7 @@ void EnHorseNormal_Update(Actor* thisx, GlobalContext* globalCtx) { } } -void func_80A6CAFC(Actor* thisx, GlobalContext* globalCtx, ColliderJntSphItem* collider) { +void func_80A6CAFC(Actor* thisx, GlobalContext* globalCtx, PSkinAwb* skin) { Vec3f sp4C; Vec3f sp40; EnHorseNormal* this = THIS; @@ -566,7 +566,7 @@ void func_80A6CAFC(Actor* thisx, GlobalContext* globalCtx, ColliderJntSphItem* c sp4C.x = this->headCollider.list[i].dim.modelSphere.center.x; sp4C.y = this->headCollider.list[i].dim.modelSphere.center.y; sp4C.z = this->headCollider.list[i].dim.modelSphere.center.z; - func_800A6408(collider, this->headCollider.list[i].dim.joint, &sp4C, &sp40); + func_800A6408(skin, this->headCollider.list[i].dim.joint, &sp4C, &sp40); this->headCollider.list[i].dim.worldSphere.center.x = sp40.x; this->headCollider.list[i].dim.worldSphere.center.y = sp40.y; this->headCollider.list[i].dim.worldSphere.center.z = sp40.z; diff --git a/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/src/overlays/actors/ovl_En_Insect/z_en_insect.c index 302eadb175..f821d1bd12 100644 --- a/src/overlays/actors/ovl_En_Insect/z_en_insect.c +++ b/src/overlays/actors/ovl_En_Insect/z_en_insect.c @@ -29,9 +29,9 @@ void func_80A7D460(EnInsect* this, GlobalContext* globalCtx); extern SkeletonHeader D_04035590; extern AnimationHeader D_040341FC; -f32 D_80A7DEB0 = 0.0f; -s16 D_80A7DEB4 = 0; -s16 D_80A7DEB8 = 0; +static f32 D_80A7DEB0 = 0.0f; +static s16 D_80A7DEB4 = 0; +static s16 D_80A7DEB8 = 0; const ActorInit En_Insect_InitVars = { ACTOR_EN_INSECT, @@ -58,7 +58,7 @@ static ColliderJntSphInit sColliderInit = { sColliderItemInit, }; -u16 D_80A7DF10[] = { 0, 5, 7, 7 }; +static u16 D_80A7DF10[] = { 0, 5, 7, 7 }; static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_CONTINUE), @@ -304,11 +304,10 @@ void func_80A7C818(EnInsect* this) { this->unk_314 |= 0x100; } -#ifdef NON_MATCHING -// regalloc, minor reordering void func_80A7C86C(EnInsect* this, GlobalContext* globalCtx) { - s32 pad[2]; - s16 pad2; + s32 pad1; + s32 pad2; + s16 pad3; s16 frames; s16 yaw; s16 sp38 = this->actor.xzDistFromLink < 40.0f; @@ -332,10 +331,9 @@ void func_80A7C86C(EnInsect* this, GlobalContext* globalCtx) { yaw -= 0x2000; } } - + if (globalCtx) {} Math_ApproxUpdateScaledS(&this->actor.posRot.rot.y, yaw, 2000); } - this->actor.shape.rot.y = this->actor.posRot.rot.y; this->skelAnime.animPlaybackSpeed = CLAMP(this->actor.speedXZ * 1.6f, 0.8f, 1.9f); SkelAnime_FrameUpdateMatrix(&this->skelAnime); @@ -346,9 +344,6 @@ void func_80A7C86C(EnInsect* this, GlobalContext* globalCtx) { func_80A7CE60(this); } } -#else -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Insect/func_80A7C86C.s") -#endif void func_80A7CA64(EnInsect* this) { this->unk_31A = 200; diff --git a/src/overlays/actors/ovl_En_Light/z_en_light.c b/src/overlays/actors/ovl_En_Light/z_en_light.c index a9ea7f52ae..73a7e99790 100644 --- a/src/overlays/actors/ovl_En_Light/z_en_light.c +++ b/src/overlays/actors/ovl_En_Light/z_en_light.c @@ -34,7 +34,7 @@ typedef struct { /* 0x07 */ u8 scale; } FlameParams; -FlameParams D_80A9E840[] = { +static FlameParams D_80A9E840[] = { { { 255, 200, 0, 255 }, { 255, 0, 0 }, 75 }, { { 255, 200, 0, 255 }, { 255, 0, 0 }, 75 }, { { 0, 170, 255, 255 }, { 0, 0, 255 }, 75 }, { { 170, 255, 0, 255 }, { 0, 150, 0 }, 75 }, { { 255, 200, 0, 255 }, { 255, 0, 0 }, 40 }, { { 255, 200, 0, 255 }, { 255, 0, 0 }, 75 }, diff --git a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c index fbe62c2d76..b241324c86 100644 --- a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c +++ b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c @@ -45,26 +45,26 @@ static ColliderCylinderInit sCylinderInit = { { 18, 46, 0, { 0, 0, 0 } }, }; -CollisionCheckInfoInit2 sColChkInfoInit = { +static CollisionCheckInfoInit2 sColChkInfoInit = { 0x00, 0x0000, 0x0000, 0x0000, 0xFF, }; -struct_D_80AA1678 D_80AA1678[] = { +static struct_D_80AA1678 D_80AA1678[] = { { 0x06000820, 1.0f, 0x00, 0.0f }, { 0x06000820, 1.0f, 0x00, -10.0f }, { 0x06008D64, 1.0f, 0x00, 0.0f }, { 0x06008D64, 1.0f, 0x00, -10.0f }, }; -Vec3f D_80AA16B8 = { 800.0f, 0.0f, 0.0f }; +static Vec3f D_80AA16B8 = { 800.0f, 0.0f, 0.0f }; -UNK_PTR D_80AA16C4[] = { +static UNK_PTR D_80AA16C4[] = { 0x06001F18, 0x06002B18, 0x06002F18, }; -UNK_PTR D_80AA16D0[] = { +static UNK_PTR D_80AA16D0[] = { 0x06001B18, 0x06002318, 0x06002718, diff --git a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c index f3f9eb853f..6d19f3d020 100644 --- a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c +++ b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c @@ -40,7 +40,7 @@ static ColliderCylinderInit sCylinderInit = { static Vec3f sConstVec3f = { 0.2f, 0.2f, 0.2f }; -Gfx* D_80AB99D8[] = { 0x06004178, 0x06004978, 0x06005178 }; +static Gfx* D_80AB99D8[] = { 0x06004178, 0x06004978, 0x06005178 }; extern SkeletonHeader D_06009948; extern AnimationHeader D_06000378; diff --git a/src/overlays/actors/ovl_En_Rl/z_en_rl.c b/src/overlays/actors/ovl_En_Rl/z_en_rl.c index c112a2bb69..deb18ac657 100644 --- a/src/overlays/actors/ovl_En_Rl/z_en_rl.c +++ b/src/overlays/actors/ovl_En_Rl/z_en_rl.c @@ -28,7 +28,7 @@ void func_80AE7FD0(EnRl* this, GlobalContext* globalCtx); void func_80AE7FDC(EnRl* this, GlobalContext* globalCtx); void func_80AE7D94(EnRl* this, GlobalContext* globalCtx); -UNK_PTR D_80AE81A0[] = { 0x06003620, 0x06003960, 0x06003B60 }; +static UNK_PTR D_80AE81A0[] = { 0x06003620, 0x06003960, 0x06003B60 }; extern SkeletonHeader D_06007B38; extern AnimationHeader D_06000A3C; @@ -322,7 +322,7 @@ void func_80AE7D94(EnRl* this, GlobalContext* globalCtx) { CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_rl_inKenjyanomaDemo02.c", 331); } -EnRlActionFunc sActionFuncs[] = { +static EnRlActionFunc sActionFuncs[] = { func_80AE7798, func_80AE77B8, func_80AE77F8, func_80AE7838, func_80AE7C64, func_80AE7C94, func_80AE7CE8, func_80AE7D40, }; @@ -370,7 +370,7 @@ void func_80AE7FDC(EnRl* this, GlobalContext* globalCtx) { CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_rl.c", 437); } -EnRlDrawFunc sDrawFuncs[] = { +static EnRlDrawFunc sDrawFuncs[] = { func_80AE7FD0, func_80AE7FDC, func_80AE7D94, diff --git a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c index a74f7cc858..f9f58931f3 100644 --- a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c +++ b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c @@ -33,7 +33,7 @@ const ActorInit En_Wonder_Talk2_InitVars = { NULL, }; -s16 D_80B3A8E0[] = { 6, 0, 1, 2, 3, 4, 5 }; +static s16 D_80B3A8E0[] = { 6, 0, 1, 2, 3, 4, 5 }; void EnWonderTalk2_Destroy(Actor* thisx, GlobalContext* globalCtx) { } diff --git a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c index 2cb37c5e49..6f764872bd 100644 --- a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c +++ b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c @@ -42,7 +42,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(unk_4C, 16, ICHAIN_STOP), }; -UNK_PTR D_80B43F64[] = { 0x06000AF0, 0x06000000 }; +static UNK_PTR D_80B43F64[] = { 0x06000AF0, 0x06000000 }; extern UNK_TYPE D_06000A60; extern Gfx D_06000970[]; diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c index 3f1a74974b..e85cebf309 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -44,8 +44,8 @@ static ColliderCylinderInit sCylinderInit = { { 20, 46, 0, { 0, 0, 0 } }, }; -UNK_PTR D_80B4E61C[] = { 0x06007208, 0x06009848, 0x06009C48, 0x06009848 }; -UNK_PTR D_80B4E62C[] = { 0x06007608 }; +static UNK_PTR D_80B4E61C[] = { 0x06007208, 0x06009848, 0x06009C48, 0x06009848 }; +static UNK_PTR D_80B4E62C[] = { 0x06007608 }; extern AnimationHeader D_06000438; extern UNK_TYPE D_06008848; diff --git a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c index 5c77041ae7..099ea8a236 100644 --- a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c +++ b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c @@ -61,11 +61,11 @@ void func_80B523BC(EnZl2* this, GlobalContext* globalCtx); void func_80B523C8(EnZl2* this, GlobalContext* globalCtx); void func_80B525D4(EnZl2* this, GlobalContext* globalCtx); -UNK_TYPE D_80B52810[] = { +static UNK_TYPE D_80B52810[] = { 0x060030C8, 0x06003C48, 0x06004048, 0x06004548, 0x06004948, 0x06004D48, 0x06005148, 0x06005D48, 0x06006148, }; -UNK_TYPE D_80B52834[] = { +static UNK_TYPE D_80B52834[] = { 0x06003508, 0x06005548, 0x06005948, diff --git a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c index c2c4fc3cdf..ffcab2ef59 100644 --- a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c +++ b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c @@ -35,17 +35,17 @@ const ActorInit Magic_Wind_InitVars = { #include "z_magic_wind_gfx.c" -u8 sTransformRefIdx[] = { +static u8 sTransformRefIdx[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -s16 sCopyValues[] = { +static s16 sCopyValues[] = { 0x0400, 0x0400, 0x0400, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0200, 0x0200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x02CD, 0x02CD, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, }; -TransformData sTransformData[] = { +static TransformData sTransformData[] = { { 0x000C, 0x0001, @@ -76,11 +76,11 @@ TransformData sTransformData[] = { }, }; -TransformUpdateIndex sTransformUpdIdx = { +static TransformUpdateIndex sTransformUpdIdx = { sTransformRefIdx, sTransformData, sCopyValues, 0x0001, 0x0003C, }; -SkelCurveLimb sRootLimb = { +static SkelCurveLimb sRootLimb = { 0x01, 0xFF, { @@ -89,7 +89,7 @@ SkelCurveLimb sRootLimb = { }, }; -SkelCurveLimb sInnerCylinder = { +static SkelCurveLimb sInnerCylinder = { 0xFF, 0x02, { @@ -98,7 +98,7 @@ SkelCurveLimb sInnerCylinder = { }, }; -SkelCurveLimb sOuterCylinder = { +static SkelCurveLimb sOuterCylinder = { 0xFF, 0xFF, { @@ -107,18 +107,18 @@ SkelCurveLimb sOuterCylinder = { }, }; -SkelCurveLimb* sLimbs[] = { +static SkelCurveLimb* sLimbs[] = { &sRootLimb, &sInnerCylinder, &sOuterCylinder, }; -SkelCurveLimbList sLimbList = { +static SkelCurveLimbList sLimbList = { sLimbs, 0x03, }; -u8 sAlphaUpdVals[] = { +static u8 sAlphaUpdVals[] = { 0x00, 0x03, 0x04, 0x07, 0x09, 0x0A, 0x0D, 0x0F, 0x11, 0x12, 0x15, 0x16, 0x19, 0x1B, 0x1C, 0x1F, 0x21, 0x23, }; diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c index 4a4a758bb3..5ec20878ee 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c @@ -33,14 +33,14 @@ const ActorInit Obj_Comb_InitVars = { (ActorFunc)ObjComb_Draw, }; -ColliderJntSphItemInit sJntSphItemsInit[1] = { +static ColliderJntSphItemInit sJntSphItemsInit[1] = { { { 0x00, { 0x00000000, 0x00, 0x00 }, { 0x4001FFFE, 0x00, 0x00 }, 0x00, 0x01, 0x01 }, { 0x00, { { 0, 0, 0 }, 15 }, 100 }, }, }; -ColliderJntSphInit sJntSphInit = { +static ColliderJntSphInit sJntSphInit = { { COLTYPE_UNK10, 0x00, 0x09, 0x09, 0x20, COLSHAPE_JNTSPH }, 1, &sJntSphItemsInit, diff --git a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c index b92ae1d210..96fca2a352 100644 --- a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c +++ b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c @@ -34,7 +34,7 @@ const ActorInit Obj_Hsblock_InitVars = { (ActorFunc)ObjHsblock_Draw, }; -f32 D_80B940C0[] = { 85.0f, 85.0f, 0.0f }; +static f32 D_80B940C0[] = { 85.0f, 85.0f, 0.0f }; static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE), diff --git a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c index 6d75456ed9..fda4403b71 100644 --- a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c +++ b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c @@ -43,11 +43,11 @@ const ActorInit Obj_Oshihiki_InitVars = { (ActorFunc)ObjOshihiki_Draw, }; -f32 sScales[] = { +static f32 sScales[] = { (1 / 10.0f), (1 / 6.0f), (1 / 5.0f), (1 / 3.0f), (1 / 10.0f), (1 / 6.0f), (1 / 5.0f), (1 / 3.0f), }; -Color_RGB8 sColors[][4] = { +static Color_RGB8 sColors[][4] = { { { 110, 86, 40 }, { 110, 86, 40 }, { 110, 86, 40 }, { 110, 86, 40 } }, // deku tree { { 106, 120, 110 }, { 104, 80, 20 }, { 0, 0, 0 }, { 0, 0, 0 } }, // dodongos cavern { { 142, 99, 86 }, { 72, 118, 96 }, { 0, 0, 0 }, { 0, 0, 0 } }, // forest temple @@ -59,7 +59,7 @@ Color_RGB8 sColors[][4] = { { { 232, 210, 176 }, { 232, 210, 176 }, { 232, 210, 176 }, { 232, 210, 176 } }, // gerudo training grounds }; -s16 sScenes[] = { +static s16 sScenes[] = { SCENE_YDAN, SCENE_DDAN, SCENE_BMORI1, SCENE_HIDAN, SCENE_MIZUSIN, SCENE_JYASINZOU, SCENE_HAKADAN, SCENE_GANON, SCENE_MEN, }; @@ -71,19 +71,19 @@ static InitChainEntry sInitChain[] = { }; // The vertices and center of the bottom face -Vec3f sColCheckPoints[5] = { +static Vec3f sColCheckPoints[5] = { { 29.99f, 1.01f, -29.99f }, { -29.99f, 1.01f, -29.99f }, { -29.99f, 1.01f, 29.99f }, { 29.99f, 1.01f, 29.99f }, { 0.0f, 1.01f, 0.0f }, }; -Vec2f sFaceVtx[] = { +static Vec2f sFaceVtx[] = { { -30.0f, 0.0f }, { 30.0f, 0.0f }, { -30.0f, 60.0f }, { 30.0f, 60.0f }, }; -Vec2f sFaceDirection[] = { +static Vec2f sFaceDirection[] = { { 1.0f, 1.0f }, { -1.0f, 1.0f }, { 1.0f, -1.0f },