From eb41485a0a0010d1d169fb0de2d4f674171f2d69 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Mon, 26 Oct 2020 19:10:32 -0400 Subject: [PATCH 01/78] New C file split, many functions decompiled --- .../PlayEffect.s | 0 .../ShowEmote.s | 0 .../ShowSleepBubble.s | 0 .../func_802D7690.s | 0 .../func_802D7BA4.s | 0 .../func_802D7CF8.s | 0 .../func_802D7E08.s | 0 .../func_802D8248.s | 0 .../code_fa4c0_len_3bf0/DropItemEntity.s | 68 ------ .../code_fa4c0_len_3bf0/DropItemEntityB.s | 71 ------ .../code_fa4c0_len_3bf0/FadeInMusic.s | 63 ----- .../code_fa4c0_len_3bf0/MakeItemEntity.s | 68 ------ .../code_fa4c0_len_3bf0/PlaySoundAtF.s | 49 ---- .../code_fa4c0_len_3bf0/RemoveBadge.s | 40 ---- .../code_fa4c0_len_3bf0/SetItemFlags.s | 40 ---- .../code_fa4c0_len_3bf0/ShowGotItem.s | 56 ----- .../code_fa4c0_len_3bf0/func_802D5F28.s | 35 --- .../code_fa4c0_len_3bf0/func_802D5FA4.s | 17 -- .../code_fa4c0_len_3bf0/func_802D5FD8.s | 12 - .../code_fa4c0_len_3bf0/func_802D5FF8.s | 26 --- .../code_fa4c0_len_3bf0/func_802D6050.s | 12 - .../code_fa4c0_len_3bf0/func_802D6070.s | 12 - .../code_fa4c0_len_3bf0/func_802D6090.s | 26 --- .../code_fa4c0_len_3bf0/func_802D721C.s | 27 --- .../code_fa4c0_len_3bf0/func_802D7520.s | 50 ---- .../code_fa4c0_len_3bf0/func_802D75D8.s | 50 ---- include/common_structs.h | 2 +- include/functions.h | 3 + src/code_FBE10.c | 78 +++++++ src/code_b72b0_len_15ed0.c | 5 +- src/code_fa4c0_len_3bf0.c | 218 ++++++++++++------ tools/splat.yaml | 1 + 32 files changed, 228 insertions(+), 801 deletions(-) rename asm/nonmatchings/{code_fa4c0_len_3bf0 => code_FBE10}/PlayEffect.s (100%) rename asm/nonmatchings/{code_fa4c0_len_3bf0 => code_FBE10}/ShowEmote.s (100%) rename asm/nonmatchings/{code_fa4c0_len_3bf0 => code_FBE10}/ShowSleepBubble.s (100%) rename asm/nonmatchings/{code_fa4c0_len_3bf0 => code_FBE10}/func_802D7690.s (100%) rename asm/nonmatchings/{code_fa4c0_len_3bf0 => code_FBE10}/func_802D7BA4.s (100%) rename asm/nonmatchings/{code_fa4c0_len_3bf0 => code_FBE10}/func_802D7CF8.s (100%) rename asm/nonmatchings/{code_fa4c0_len_3bf0 => code_FBE10}/func_802D7E08.s (100%) rename asm/nonmatchings/{code_fa4c0_len_3bf0 => code_FBE10}/func_802D8248.s (100%) delete mode 100644 asm/nonmatchings/code_fa4c0_len_3bf0/DropItemEntity.s delete mode 100644 asm/nonmatchings/code_fa4c0_len_3bf0/DropItemEntityB.s delete mode 100644 asm/nonmatchings/code_fa4c0_len_3bf0/FadeInMusic.s delete mode 100644 asm/nonmatchings/code_fa4c0_len_3bf0/MakeItemEntity.s delete mode 100644 asm/nonmatchings/code_fa4c0_len_3bf0/PlaySoundAtF.s delete mode 100644 asm/nonmatchings/code_fa4c0_len_3bf0/RemoveBadge.s delete mode 100644 asm/nonmatchings/code_fa4c0_len_3bf0/SetItemFlags.s delete mode 100644 asm/nonmatchings/code_fa4c0_len_3bf0/ShowGotItem.s delete mode 100644 asm/nonmatchings/code_fa4c0_len_3bf0/func_802D5F28.s delete mode 100644 asm/nonmatchings/code_fa4c0_len_3bf0/func_802D5FA4.s delete mode 100644 asm/nonmatchings/code_fa4c0_len_3bf0/func_802D5FD8.s delete mode 100644 asm/nonmatchings/code_fa4c0_len_3bf0/func_802D5FF8.s delete mode 100644 asm/nonmatchings/code_fa4c0_len_3bf0/func_802D6050.s delete mode 100644 asm/nonmatchings/code_fa4c0_len_3bf0/func_802D6070.s delete mode 100644 asm/nonmatchings/code_fa4c0_len_3bf0/func_802D6090.s delete mode 100644 asm/nonmatchings/code_fa4c0_len_3bf0/func_802D721C.s delete mode 100644 asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7520.s delete mode 100644 asm/nonmatchings/code_fa4c0_len_3bf0/func_802D75D8.s create mode 100644 src/code_FBE10.c diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/PlayEffect.s b/asm/nonmatchings/code_FBE10/PlayEffect.s similarity index 100% rename from asm/nonmatchings/code_fa4c0_len_3bf0/PlayEffect.s rename to asm/nonmatchings/code_FBE10/PlayEffect.s diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/ShowEmote.s b/asm/nonmatchings/code_FBE10/ShowEmote.s similarity index 100% rename from asm/nonmatchings/code_fa4c0_len_3bf0/ShowEmote.s rename to asm/nonmatchings/code_FBE10/ShowEmote.s diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/ShowSleepBubble.s b/asm/nonmatchings/code_FBE10/ShowSleepBubble.s similarity index 100% rename from asm/nonmatchings/code_fa4c0_len_3bf0/ShowSleepBubble.s rename to asm/nonmatchings/code_FBE10/ShowSleepBubble.s diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7690.s b/asm/nonmatchings/code_FBE10/func_802D7690.s similarity index 100% rename from asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7690.s rename to asm/nonmatchings/code_FBE10/func_802D7690.s diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7BA4.s b/asm/nonmatchings/code_FBE10/func_802D7BA4.s similarity index 100% rename from asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7BA4.s rename to asm/nonmatchings/code_FBE10/func_802D7BA4.s diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7CF8.s b/asm/nonmatchings/code_FBE10/func_802D7CF8.s similarity index 100% rename from asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7CF8.s rename to asm/nonmatchings/code_FBE10/func_802D7CF8.s diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7E08.s b/asm/nonmatchings/code_FBE10/func_802D7E08.s similarity index 100% rename from asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7E08.s rename to asm/nonmatchings/code_FBE10/func_802D7E08.s diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D8248.s b/asm/nonmatchings/code_FBE10/func_802D8248.s similarity index 100% rename from asm/nonmatchings/code_fa4c0_len_3bf0/func_802D8248.s rename to asm/nonmatchings/code_FBE10/func_802D8248.s diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/DropItemEntity.s b/asm/nonmatchings/code_fa4c0_len_3bf0/DropItemEntity.s deleted file mode 100644 index a2146fa4b1..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/DropItemEntity.s +++ /dev/null @@ -1,68 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel DropItemEntity -/* FB770 802D6DC0 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* FB774 802D6DC4 AFB1001C */ sw $s1, 0x1c($sp) -/* FB778 802D6DC8 0080882D */ daddu $s1, $a0, $zero -/* FB77C 802D6DCC AFBF0030 */ sw $ra, 0x30($sp) -/* FB780 802D6DD0 AFB5002C */ sw $s5, 0x2c($sp) -/* FB784 802D6DD4 AFB40028 */ sw $s4, 0x28($sp) -/* FB788 802D6DD8 AFB30024 */ sw $s3, 0x24($sp) -/* FB78C 802D6DDC AFB20020 */ sw $s2, 0x20($sp) -/* FB790 802D6DE0 AFB00018 */ sw $s0, 0x18($sp) -/* FB794 802D6DE4 8E30000C */ lw $s0, 0xc($s1) -/* FB798 802D6DE8 8E050000 */ lw $a1, ($s0) -/* FB79C 802D6DEC 0C0B1EAF */ jal get_variable -/* FB7A0 802D6DF0 26100004 */ addiu $s0, $s0, 4 -/* FB7A4 802D6DF4 8E050000 */ lw $a1, ($s0) -/* FB7A8 802D6DF8 26100004 */ addiu $s0, $s0, 4 -/* FB7AC 802D6DFC 0220202D */ daddu $a0, $s1, $zero -/* FB7B0 802D6E00 0C0B1EAF */ jal get_variable -/* FB7B4 802D6E04 0040A82D */ daddu $s5, $v0, $zero -/* FB7B8 802D6E08 8E050000 */ lw $a1, ($s0) -/* FB7BC 802D6E0C 26100004 */ addiu $s0, $s0, 4 -/* FB7C0 802D6E10 0220202D */ daddu $a0, $s1, $zero -/* FB7C4 802D6E14 0C0B1EAF */ jal get_variable -/* FB7C8 802D6E18 0040A02D */ daddu $s4, $v0, $zero -/* FB7CC 802D6E1C 8E050000 */ lw $a1, ($s0) -/* FB7D0 802D6E20 26100004 */ addiu $s0, $s0, 4 -/* FB7D4 802D6E24 0220202D */ daddu $a0, $s1, $zero -/* FB7D8 802D6E28 0C0B1EAF */ jal get_variable -/* FB7DC 802D6E2C 0040982D */ daddu $s3, $v0, $zero -/* FB7E0 802D6E30 8E050000 */ lw $a1, ($s0) -/* FB7E4 802D6E34 26100004 */ addiu $s0, $s0, 4 -/* FB7E8 802D6E38 0220202D */ daddu $a0, $s1, $zero -/* FB7EC 802D6E3C 0C0B1EAF */ jal get_variable -/* FB7F0 802D6E40 0040902D */ daddu $s2, $v0, $zero -/* FB7F4 802D6E44 0220202D */ daddu $a0, $s1, $zero -/* FB7F8 802D6E48 8E050000 */ lw $a1, ($s0) -/* FB7FC 802D6E4C 0C0B1EAF */ jal get_variable -/* FB800 802D6E50 0040802D */ daddu $s0, $v0, $zero -/* FB804 802D6E54 44940000 */ mtc1 $s4, $f0 -/* FB808 802D6E58 00000000 */ nop -/* FB80C 802D6E5C 46800020 */ cvt.s.w $f0, $f0 -/* FB810 802D6E60 44050000 */ mfc1 $a1, $f0 -/* FB814 802D6E64 44930000 */ mtc1 $s3, $f0 -/* FB818 802D6E68 00000000 */ nop -/* FB81C 802D6E6C 46800020 */ cvt.s.w $f0, $f0 -/* FB820 802D6E70 44060000 */ mfc1 $a2, $f0 -/* FB824 802D6E74 44920000 */ mtc1 $s2, $f0 -/* FB828 802D6E78 00000000 */ nop -/* FB82C 802D6E7C 46800020 */ cvt.s.w $f0, $f0 -/* FB830 802D6E80 44070000 */ mfc1 $a3, $f0 -/* FB834 802D6E84 02A0202D */ daddu $a0, $s5, $zero -/* FB838 802D6E88 AFB00010 */ sw $s0, 0x10($sp) -/* FB83C 802D6E8C 0C04C6A5 */ jal make_item_entity_nodelay -/* FB840 802D6E90 AFA20014 */ sw $v0, 0x14($sp) -/* FB844 802D6E94 AE220084 */ sw $v0, 0x84($s1) -/* FB848 802D6E98 8FBF0030 */ lw $ra, 0x30($sp) -/* FB84C 802D6E9C 8FB5002C */ lw $s5, 0x2c($sp) -/* FB850 802D6EA0 8FB40028 */ lw $s4, 0x28($sp) -/* FB854 802D6EA4 8FB30024 */ lw $s3, 0x24($sp) -/* FB858 802D6EA8 8FB20020 */ lw $s2, 0x20($sp) -/* FB85C 802D6EAC 8FB1001C */ lw $s1, 0x1c($sp) -/* FB860 802D6EB0 8FB00018 */ lw $s0, 0x18($sp) -/* FB864 802D6EB4 24020002 */ addiu $v0, $zero, 2 -/* FB868 802D6EB8 03E00008 */ jr $ra -/* FB86C 802D6EBC 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/DropItemEntityB.s b/asm/nonmatchings/code_fa4c0_len_3bf0/DropItemEntityB.s deleted file mode 100644 index 7afbaf0c99..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/DropItemEntityB.s +++ /dev/null @@ -1,71 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel DropItemEntityB -/* FB870 802D6EC0 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* FB874 802D6EC4 AFB1001C */ sw $s1, 0x1c($sp) -/* FB878 802D6EC8 0080882D */ daddu $s1, $a0, $zero -/* FB87C 802D6ECC AFBF0030 */ sw $ra, 0x30($sp) -/* FB880 802D6ED0 AFB5002C */ sw $s5, 0x2c($sp) -/* FB884 802D6ED4 AFB40028 */ sw $s4, 0x28($sp) -/* FB888 802D6ED8 AFB30024 */ sw $s3, 0x24($sp) -/* FB88C 802D6EDC AFB20020 */ sw $s2, 0x20($sp) -/* FB890 802D6EE0 AFB00018 */ sw $s0, 0x18($sp) -/* FB894 802D6EE4 8E30000C */ lw $s0, 0xc($s1) -/* FB898 802D6EE8 8E050000 */ lw $a1, ($s0) -/* FB89C 802D6EEC 0C0B1EAF */ jal get_variable -/* FB8A0 802D6EF0 26100004 */ addiu $s0, $s0, 4 -/* FB8A4 802D6EF4 8E050000 */ lw $a1, ($s0) -/* FB8A8 802D6EF8 26100004 */ addiu $s0, $s0, 4 -/* FB8AC 802D6EFC 0220202D */ daddu $a0, $s1, $zero -/* FB8B0 802D6F00 0C0B1EAF */ jal get_variable -/* FB8B4 802D6F04 0040A82D */ daddu $s5, $v0, $zero -/* FB8B8 802D6F08 8E050000 */ lw $a1, ($s0) -/* FB8BC 802D6F0C 26100004 */ addiu $s0, $s0, 4 -/* FB8C0 802D6F10 0220202D */ daddu $a0, $s1, $zero -/* FB8C4 802D6F14 0C0B1EAF */ jal get_variable -/* FB8C8 802D6F18 0040A02D */ daddu $s4, $v0, $zero -/* FB8CC 802D6F1C 8E050000 */ lw $a1, ($s0) -/* FB8D0 802D6F20 26100004 */ addiu $s0, $s0, 4 -/* FB8D4 802D6F24 0220202D */ daddu $a0, $s1, $zero -/* FB8D8 802D6F28 0C0B1EAF */ jal get_variable -/* FB8DC 802D6F2C 0040982D */ daddu $s3, $v0, $zero -/* FB8E0 802D6F30 8E050000 */ lw $a1, ($s0) -/* FB8E4 802D6F34 26100004 */ addiu $s0, $s0, 4 -/* FB8E8 802D6F38 0220202D */ daddu $a0, $s1, $zero -/* FB8EC 802D6F3C 0C0B1EAF */ jal get_variable -/* FB8F0 802D6F40 0040902D */ daddu $s2, $v0, $zero -/* FB8F4 802D6F44 0220202D */ daddu $a0, $s1, $zero -/* FB8F8 802D6F48 8E050000 */ lw $a1, ($s0) -/* FB8FC 802D6F4C 0C0B1F6A */ jal get_variable_index -/* FB900 802D6F50 0040802D */ daddu $s0, $v0, $zero -/* FB904 802D6F54 44940000 */ mtc1 $s4, $f0 -/* FB908 802D6F58 00000000 */ nop -/* FB90C 802D6F5C 46800020 */ cvt.s.w $f0, $f0 -/* FB910 802D6F60 44050000 */ mfc1 $a1, $f0 -/* FB914 802D6F64 44930000 */ mtc1 $s3, $f0 -/* FB918 802D6F68 00000000 */ nop -/* FB91C 802D6F6C 46800020 */ cvt.s.w $f0, $f0 -/* FB920 802D6F70 44060000 */ mfc1 $a2, $f0 -/* FB924 802D6F74 44920000 */ mtc1 $s2, $f0 -/* FB928 802D6F78 00000000 */ nop -/* FB92C 802D6F7C 46800020 */ cvt.s.w $f0, $f0 -/* FB930 802D6F80 44070000 */ mfc1 $a3, $f0 -/* FB934 802D6F84 02A0202D */ daddu $a0, $s5, $zero -/* FB938 802D6F88 AFB00010 */ sw $s0, 0x10($sp) -/* FB93C 802D6F8C 0C04C6A5 */ jal make_item_entity_nodelay -/* FB940 802D6F90 AFA20014 */ sw $v0, 0x14($sp) -/* FB944 802D6F94 0040202D */ daddu $a0, $v0, $zero -/* FB948 802D6F98 24054000 */ addiu $a1, $zero, 0x4000 -/* FB94C 802D6F9C 0C04D052 */ jal set_item_entity_flags -/* FB950 802D6FA0 AE240084 */ sw $a0, 0x84($s1) -/* FB954 802D6FA4 8FBF0030 */ lw $ra, 0x30($sp) -/* FB958 802D6FA8 8FB5002C */ lw $s5, 0x2c($sp) -/* FB95C 802D6FAC 8FB40028 */ lw $s4, 0x28($sp) -/* FB960 802D6FB0 8FB30024 */ lw $s3, 0x24($sp) -/* FB964 802D6FB4 8FB20020 */ lw $s2, 0x20($sp) -/* FB968 802D6FB8 8FB1001C */ lw $s1, 0x1c($sp) -/* FB96C 802D6FBC 8FB00018 */ lw $s0, 0x18($sp) -/* FB970 802D6FC0 24020002 */ addiu $v0, $zero, 2 -/* FB974 802D6FC4 03E00008 */ jr $ra -/* FB978 802D6FC8 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/FadeInMusic.s b/asm/nonmatchings/code_fa4c0_len_3bf0/FadeInMusic.s deleted file mode 100644 index 962abd952c..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/FadeInMusic.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel FadeInMusic -/* FA7A4 802D5DF4 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* FA7A8 802D5DF8 AFB1001C */ sw $s1, 0x1c($sp) -/* FA7AC 802D5DFC 0080882D */ daddu $s1, $a0, $zero -/* FA7B0 802D5E00 AFBF0030 */ sw $ra, 0x30($sp) -/* FA7B4 802D5E04 AFB5002C */ sw $s5, 0x2c($sp) -/* FA7B8 802D5E08 AFB40028 */ sw $s4, 0x28($sp) -/* FA7BC 802D5E0C AFB30024 */ sw $s3, 0x24($sp) -/* FA7C0 802D5E10 AFB20020 */ sw $s2, 0x20($sp) -/* FA7C4 802D5E14 AFB00018 */ sw $s0, 0x18($sp) -/* FA7C8 802D5E18 8E30000C */ lw $s0, 0xc($s1) -/* FA7CC 802D5E1C 8E050000 */ lw $a1, ($s0) -/* FA7D0 802D5E20 0C0B1EAF */ jal get_variable -/* FA7D4 802D5E24 26100004 */ addiu $s0, $s0, 4 -/* FA7D8 802D5E28 8E050000 */ lw $a1, ($s0) -/* FA7DC 802D5E2C 26100004 */ addiu $s0, $s0, 4 -/* FA7E0 802D5E30 0220202D */ daddu $a0, $s1, $zero -/* FA7E4 802D5E34 0C0B1EAF */ jal get_variable -/* FA7E8 802D5E38 0040A82D */ daddu $s5, $v0, $zero -/* FA7EC 802D5E3C 8E050000 */ lw $a1, ($s0) -/* FA7F0 802D5E40 26100004 */ addiu $s0, $s0, 4 -/* FA7F4 802D5E44 0220202D */ daddu $a0, $s1, $zero -/* FA7F8 802D5E48 0C0B1EAF */ jal get_variable -/* FA7FC 802D5E4C 0040982D */ daddu $s3, $v0, $zero -/* FA800 802D5E50 8E050000 */ lw $a1, ($s0) -/* FA804 802D5E54 26100004 */ addiu $s0, $s0, 4 -/* FA808 802D5E58 0220202D */ daddu $a0, $s1, $zero -/* FA80C 802D5E5C 0C0B1EAF */ jal get_variable -/* FA810 802D5E60 0040A02D */ daddu $s4, $v0, $zero -/* FA814 802D5E64 8E050000 */ lw $a1, ($s0) -/* FA818 802D5E68 26100004 */ addiu $s0, $s0, 4 -/* FA81C 802D5E6C 0220202D */ daddu $a0, $s1, $zero -/* FA820 802D5E70 0C0B1EAF */ jal get_variable -/* FA824 802D5E74 0040902D */ daddu $s2, $v0, $zero -/* FA828 802D5E78 0220202D */ daddu $a0, $s1, $zero -/* FA82C 802D5E7C 8E050000 */ lw $a1, ($s0) -/* FA830 802D5E80 0C0B1EAF */ jal get_variable -/* FA834 802D5E84 0040802D */ daddu $s0, $v0, $zero -/* FA838 802D5E88 02A0202D */ daddu $a0, $s5, $zero -/* FA83C 802D5E8C 0260282D */ daddu $a1, $s3, $zero -/* FA840 802D5E90 00108400 */ sll $s0, $s0, 0x10 -/* FA844 802D5E94 00108403 */ sra $s0, $s0, 0x10 -/* FA848 802D5E98 00021400 */ sll $v0, $v0, 0x10 -/* FA84C 802D5E9C 00021403 */ sra $v0, $v0, 0x10 -/* FA850 802D5EA0 0280302D */ daddu $a2, $s4, $zero -/* FA854 802D5EA4 0240382D */ daddu $a3, $s2, $zero -/* FA858 802D5EA8 AFB00010 */ sw $s0, 0x10($sp) -/* FA85C 802D5EAC 0C052A59 */ jal func_8014A964 -/* FA860 802D5EB0 AFA20014 */ sw $v0, 0x14($sp) -/* FA864 802D5EB4 0002102B */ sltu $v0, $zero, $v0 -/* FA868 802D5EB8 8FBF0030 */ lw $ra, 0x30($sp) -/* FA86C 802D5EBC 8FB5002C */ lw $s5, 0x2c($sp) -/* FA870 802D5EC0 8FB40028 */ lw $s4, 0x28($sp) -/* FA874 802D5EC4 8FB30024 */ lw $s3, 0x24($sp) -/* FA878 802D5EC8 8FB20020 */ lw $s2, 0x20($sp) -/* FA87C 802D5ECC 8FB1001C */ lw $s1, 0x1c($sp) -/* FA880 802D5ED0 8FB00018 */ lw $s0, 0x18($sp) -/* FA884 802D5ED4 00021040 */ sll $v0, $v0, 1 -/* FA888 802D5ED8 03E00008 */ jr $ra -/* FA88C 802D5EDC 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/MakeItemEntity.s b/asm/nonmatchings/code_fa4c0_len_3bf0/MakeItemEntity.s deleted file mode 100644 index 94cf0e61c6..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/MakeItemEntity.s +++ /dev/null @@ -1,68 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel MakeItemEntity -/* FB670 802D6CC0 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* FB674 802D6CC4 AFB1001C */ sw $s1, 0x1c($sp) -/* FB678 802D6CC8 0080882D */ daddu $s1, $a0, $zero -/* FB67C 802D6CCC AFBF0030 */ sw $ra, 0x30($sp) -/* FB680 802D6CD0 AFB5002C */ sw $s5, 0x2c($sp) -/* FB684 802D6CD4 AFB40028 */ sw $s4, 0x28($sp) -/* FB688 802D6CD8 AFB30024 */ sw $s3, 0x24($sp) -/* FB68C 802D6CDC AFB20020 */ sw $s2, 0x20($sp) -/* FB690 802D6CE0 AFB00018 */ sw $s0, 0x18($sp) -/* FB694 802D6CE4 8E30000C */ lw $s0, 0xc($s1) -/* FB698 802D6CE8 8E050000 */ lw $a1, ($s0) -/* FB69C 802D6CEC 0C0B1EAF */ jal get_variable -/* FB6A0 802D6CF0 26100004 */ addiu $s0, $s0, 4 -/* FB6A4 802D6CF4 8E050000 */ lw $a1, ($s0) -/* FB6A8 802D6CF8 26100004 */ addiu $s0, $s0, 4 -/* FB6AC 802D6CFC 0220202D */ daddu $a0, $s1, $zero -/* FB6B0 802D6D00 0C0B1EAF */ jal get_variable -/* FB6B4 802D6D04 0040A82D */ daddu $s5, $v0, $zero -/* FB6B8 802D6D08 8E050000 */ lw $a1, ($s0) -/* FB6BC 802D6D0C 26100004 */ addiu $s0, $s0, 4 -/* FB6C0 802D6D10 0220202D */ daddu $a0, $s1, $zero -/* FB6C4 802D6D14 0C0B1EAF */ jal get_variable -/* FB6C8 802D6D18 0040A02D */ daddu $s4, $v0, $zero -/* FB6CC 802D6D1C 8E050000 */ lw $a1, ($s0) -/* FB6D0 802D6D20 26100004 */ addiu $s0, $s0, 4 -/* FB6D4 802D6D24 0220202D */ daddu $a0, $s1, $zero -/* FB6D8 802D6D28 0C0B1EAF */ jal get_variable -/* FB6DC 802D6D2C 0040982D */ daddu $s3, $v0, $zero -/* FB6E0 802D6D30 8E050000 */ lw $a1, ($s0) -/* FB6E4 802D6D34 26100004 */ addiu $s0, $s0, 4 -/* FB6E8 802D6D38 0220202D */ daddu $a0, $s1, $zero -/* FB6EC 802D6D3C 0C0B1EAF */ jal get_variable -/* FB6F0 802D6D40 0040902D */ daddu $s2, $v0, $zero -/* FB6F4 802D6D44 0220202D */ daddu $a0, $s1, $zero -/* FB6F8 802D6D48 8E050000 */ lw $a1, ($s0) -/* FB6FC 802D6D4C 0C0B1F6A */ jal get_variable_index -/* FB700 802D6D50 0040802D */ daddu $s0, $v0, $zero -/* FB704 802D6D54 44940000 */ mtc1 $s4, $f0 -/* FB708 802D6D58 00000000 */ nop -/* FB70C 802D6D5C 46800020 */ cvt.s.w $f0, $f0 -/* FB710 802D6D60 44050000 */ mfc1 $a1, $f0 -/* FB714 802D6D64 44930000 */ mtc1 $s3, $f0 -/* FB718 802D6D68 00000000 */ nop -/* FB71C 802D6D6C 46800020 */ cvt.s.w $f0, $f0 -/* FB720 802D6D70 44060000 */ mfc1 $a2, $f0 -/* FB724 802D6D74 44920000 */ mtc1 $s2, $f0 -/* FB728 802D6D78 00000000 */ nop -/* FB72C 802D6D7C 46800020 */ cvt.s.w $f0, $f0 -/* FB730 802D6D80 44070000 */ mfc1 $a3, $f0 -/* FB734 802D6D84 02A0202D */ daddu $a0, $s5, $zero -/* FB738 802D6D88 AFB00010 */ sw $s0, 0x10($sp) -/* FB73C 802D6D8C 0C04C6A5 */ jal make_item_entity_nodelay -/* FB740 802D6D90 AFA20014 */ sw $v0, 0x14($sp) -/* FB744 802D6D94 AE220084 */ sw $v0, 0x84($s1) -/* FB748 802D6D98 8FBF0030 */ lw $ra, 0x30($sp) -/* FB74C 802D6D9C 8FB5002C */ lw $s5, 0x2c($sp) -/* FB750 802D6DA0 8FB40028 */ lw $s4, 0x28($sp) -/* FB754 802D6DA4 8FB30024 */ lw $s3, 0x24($sp) -/* FB758 802D6DA8 8FB20020 */ lw $s2, 0x20($sp) -/* FB75C 802D6DAC 8FB1001C */ lw $s1, 0x1c($sp) -/* FB760 802D6DB0 8FB00018 */ lw $s0, 0x18($sp) -/* FB764 802D6DB4 24020002 */ addiu $v0, $zero, 2 -/* FB768 802D6DB8 03E00008 */ jr $ra -/* FB76C 802D6DBC 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/PlaySoundAtF.s b/asm/nonmatchings/code_fa4c0_len_3bf0/PlaySoundAtF.s deleted file mode 100644 index cd3d089086..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/PlaySoundAtF.s +++ /dev/null @@ -1,49 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel PlaySoundAtF -/* FAD1C 802D636C 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* FAD20 802D6370 AFB1001C */ sw $s1, 0x1c($sp) -/* FAD24 802D6374 0080882D */ daddu $s1, $a0, $zero -/* FAD28 802D6378 AFBF0028 */ sw $ra, 0x28($sp) -/* FAD2C 802D637C AFB30024 */ sw $s3, 0x24($sp) -/* FAD30 802D6380 AFB20020 */ sw $s2, 0x20($sp) -/* FAD34 802D6384 AFB00018 */ sw $s0, 0x18($sp) -/* FAD38 802D6388 F7B60038 */ sdc1 $f22, 0x38($sp) -/* FAD3C 802D638C F7B40030 */ sdc1 $f20, 0x30($sp) -/* FAD40 802D6390 8E30000C */ lw $s0, 0xc($s1) -/* FAD44 802D6394 8E130000 */ lw $s3, ($s0) -/* FAD48 802D6398 26100004 */ addiu $s0, $s0, 4 -/* FAD4C 802D639C 8E050000 */ lw $a1, ($s0) -/* FAD50 802D63A0 0C0B1EAF */ jal get_variable -/* FAD54 802D63A4 26100004 */ addiu $s0, $s0, 4 -/* FAD58 802D63A8 8E050000 */ lw $a1, ($s0) -/* FAD5C 802D63AC 26100004 */ addiu $s0, $s0, 4 -/* FAD60 802D63B0 0220202D */ daddu $a0, $s1, $zero -/* FAD64 802D63B4 0C0B210B */ jal get_float_variable -/* FAD68 802D63B8 0040902D */ daddu $s2, $v0, $zero -/* FAD6C 802D63BC 8E050000 */ lw $a1, ($s0) -/* FAD70 802D63C0 26100004 */ addiu $s0, $s0, 4 -/* FAD74 802D63C4 0220202D */ daddu $a0, $s1, $zero -/* FAD78 802D63C8 0C0B210B */ jal get_float_variable -/* FAD7C 802D63CC 46000586 */ mov.s $f22, $f0 -/* FAD80 802D63D0 0220202D */ daddu $a0, $s1, $zero -/* FAD84 802D63D4 8E050000 */ lw $a1, ($s0) -/* FAD88 802D63D8 0C0B210B */ jal get_float_variable -/* FAD8C 802D63DC 46000506 */ mov.s $f20, $f0 -/* FAD90 802D63E0 0260202D */ daddu $a0, $s3, $zero -/* FAD94 802D63E4 4406B000 */ mfc1 $a2, $f22 -/* FAD98 802D63E8 4407A000 */ mfc1 $a3, $f20 -/* FAD9C 802D63EC 3245FFFF */ andi $a1, $s2, 0xffff -/* FADA0 802D63F0 0C052757 */ jal play_sound_at_position -/* FADA4 802D63F4 E7A00010 */ swc1 $f0, 0x10($sp) -/* FADA8 802D63F8 8FBF0028 */ lw $ra, 0x28($sp) -/* FADAC 802D63FC 8FB30024 */ lw $s3, 0x24($sp) -/* FADB0 802D6400 8FB20020 */ lw $s2, 0x20($sp) -/* FADB4 802D6404 8FB1001C */ lw $s1, 0x1c($sp) -/* FADB8 802D6408 8FB00018 */ lw $s0, 0x18($sp) -/* FADBC 802D640C D7B60038 */ ldc1 $f22, 0x38($sp) -/* FADC0 802D6410 D7B40030 */ ldc1 $f20, 0x30($sp) -/* FADC4 802D6414 24020002 */ addiu $v0, $zero, 2 -/* FADC8 802D6418 03E00008 */ jr $ra -/* FADCC 802D641C 27BD0040 */ addiu $sp, $sp, 0x40 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/RemoveBadge.s b/asm/nonmatchings/code_fa4c0_len_3bf0/RemoveBadge.s deleted file mode 100644 index 3148f922fe..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/RemoveBadge.s +++ /dev/null @@ -1,40 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel RemoveBadge -/* FBA00 802D7050 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* FBA04 802D7054 AFBF0014 */ sw $ra, 0x14($sp) -/* FBA08 802D7058 AFB00010 */ sw $s0, 0x10($sp) -/* FBA0C 802D705C 8C82000C */ lw $v0, 0xc($a0) -/* FBA10 802D7060 0C0B1EAF */ jal get_variable -/* FBA14 802D7064 8C450000 */ lw $a1, ($v0) -/* FBA18 802D7068 0040282D */ daddu $a1, $v0, $zero -/* FBA1C 802D706C 0000202D */ daddu $a0, $zero, $zero -/* FBA20 802D7070 3C108011 */ lui $s0, %hi(gPlayerData) -/* FBA24 802D7074 2610F290 */ addiu $s0, $s0, %lo(gPlayerData) -/* FBA28 802D7078 0200182D */ daddu $v1, $s0, $zero -.L802D707C: -/* FBA2C 802D707C 846200B4 */ lh $v0, 0xb4($v1) -/* FBA30 802D7080 50450001 */ beql $v0, $a1, .L802D7088 -/* FBA34 802D7084 A46000B4 */ sh $zero, 0xb4($v1) -.L802D7088: -/* FBA38 802D7088 24840001 */ addiu $a0, $a0, 1 -/* FBA3C 802D708C 28820080 */ slti $v0, $a0, 0x80 -/* FBA40 802D7090 1440FFFA */ bnez $v0, .L802D707C -/* FBA44 802D7094 24630002 */ addiu $v1, $v1, 2 -/* FBA48 802D7098 0000202D */ daddu $a0, $zero, $zero -/* FBA4C 802D709C 0200182D */ daddu $v1, $s0, $zero -.L802D70A0: -/* FBA50 802D70A0 84620208 */ lh $v0, 0x208($v1) -/* FBA54 802D70A4 50450001 */ beql $v0, $a1, .L802D70AC -/* FBA58 802D70A8 A4600208 */ sh $zero, 0x208($v1) -.L802D70AC: -/* FBA5C 802D70AC 24840001 */ addiu $a0, $a0, 1 -/* FBA60 802D70B0 28820040 */ slti $v0, $a0, 0x40 -/* FBA64 802D70B4 1440FFFA */ bnez $v0, .L802D70A0 -/* FBA68 802D70B8 24630002 */ addiu $v1, $v1, 2 -/* FBA6C 802D70BC 8FBF0014 */ lw $ra, 0x14($sp) -/* FBA70 802D70C0 8FB00010 */ lw $s0, 0x10($sp) -/* FBA74 802D70C4 24020002 */ addiu $v0, $zero, 2 -/* FBA78 802D70C8 03E00008 */ jr $ra -/* FBA7C 802D70CC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/SetItemFlags.s b/asm/nonmatchings/code_fa4c0_len_3bf0/SetItemFlags.s deleted file mode 100644 index b124b24bfa..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/SetItemFlags.s +++ /dev/null @@ -1,40 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel SetItemFlags -/* FBB44 802D7194 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* FBB48 802D7198 AFB10014 */ sw $s1, 0x14($sp) -/* FBB4C 802D719C 0080882D */ daddu $s1, $a0, $zero -/* FBB50 802D71A0 AFBF001C */ sw $ra, 0x1c($sp) -/* FBB54 802D71A4 AFB20018 */ sw $s2, 0x18($sp) -/* FBB58 802D71A8 AFB00010 */ sw $s0, 0x10($sp) -/* FBB5C 802D71AC 8E30000C */ lw $s0, 0xc($s1) -/* FBB60 802D71B0 8E050000 */ lw $a1, ($s0) -/* FBB64 802D71B4 0C0B1EAF */ jal get_variable -/* FBB68 802D71B8 26100004 */ addiu $s0, $s0, 4 -/* FBB6C 802D71BC 0220202D */ daddu $a0, $s1, $zero -/* FBB70 802D71C0 8E050004 */ lw $a1, 4($s0) -/* FBB74 802D71C4 8E120000 */ lw $s2, ($s0) -/* FBB78 802D71C8 0C0B1EAF */ jal get_variable -/* FBB7C 802D71CC 0040882D */ daddu $s1, $v0, $zero -/* FBB80 802D71D0 0220202D */ daddu $a0, $s1, $zero -/* FBB84 802D71D4 0C04C3D6 */ jal get_item_entity -/* FBB88 802D71D8 0040802D */ daddu $s0, $v0, $zero -/* FBB8C 802D71DC 12000004 */ beqz $s0, .L802D71F0 -/* FBB90 802D71E0 0040202D */ daddu $a0, $v0, $zero -/* FBB94 802D71E4 8C820000 */ lw $v0, ($a0) -/* FBB98 802D71E8 080B5C7F */ j .L802D71FC -/* FBB9C 802D71EC 00521025 */ or $v0, $v0, $s2 -.L802D71F0: -/* FBBA0 802D71F0 8C820000 */ lw $v0, ($a0) -/* FBBA4 802D71F4 00121827 */ nor $v1, $zero, $s2 -/* FBBA8 802D71F8 00431024 */ and $v0, $v0, $v1 -.L802D71FC: -/* FBBAC 802D71FC AC820000 */ sw $v0, ($a0) -/* FBBB0 802D7200 8FBF001C */ lw $ra, 0x1c($sp) -/* FBBB4 802D7204 8FB20018 */ lw $s2, 0x18($sp) -/* FBBB8 802D7208 8FB10014 */ lw $s1, 0x14($sp) -/* FBBBC 802D720C 8FB00010 */ lw $s0, 0x10($sp) -/* FBBC0 802D7210 24020002 */ addiu $v0, $zero, 2 -/* FBBC4 802D7214 03E00008 */ jr $ra -/* FBBC8 802D7218 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/ShowGotItem.s b/asm/nonmatchings/code_fa4c0_len_3bf0/ShowGotItem.s deleted file mode 100644 index 4250a9d893..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/ShowGotItem.s +++ /dev/null @@ -1,56 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel ShowGotItem -/* FBD54 802D73A4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* FBD58 802D73A8 AFB20018 */ sw $s2, 0x18($sp) -/* FBD5C 802D73AC 0080902D */ daddu $s2, $a0, $zero -/* FBD60 802D73B0 AFBF001C */ sw $ra, 0x1c($sp) -/* FBD64 802D73B4 AFB10014 */ sw $s1, 0x14($sp) -/* FBD68 802D73B8 AFB00010 */ sw $s0, 0x10($sp) -/* FBD6C 802D73BC 8E51000C */ lw $s1, 0xc($s2) -/* FBD70 802D73C0 54A00001 */ bnel $a1, $zero, .L802D73C8 -/* FBD74 802D73C4 AE400070 */ sw $zero, 0x70($s2) -.L802D73C8: -/* FBD78 802D73C8 8E430070 */ lw $v1, 0x70($s2) -/* FBD7C 802D73CC 10600005 */ beqz $v1, .L802D73E4 -/* FBD80 802D73D0 24020001 */ addiu $v0, $zero, 1 -/* FBD84 802D73D4 10620014 */ beq $v1, $v0, .L802D7428 -/* FBD88 802D73D8 00000000 */ nop -/* FBD8C 802D73DC 080B5D11 */ j .L802D7444 -/* FBD90 802D73E0 0000102D */ daddu $v0, $zero, $zero -.L802D73E4: -/* FBD94 802D73E4 8E250000 */ lw $a1, ($s1) -/* FBD98 802D73E8 26310004 */ addiu $s1, $s1, 4 -/* FBD9C 802D73EC 0C0B1EAF */ jal get_variable -/* FBDA0 802D73F0 0240202D */ daddu $a0, $s2, $zero -/* FBDA4 802D73F4 8E250000 */ lw $a1, ($s1) -/* FBDA8 802D73F8 26310004 */ addiu $s1, $s1, 4 -/* FBDAC 802D73FC 0240202D */ daddu $a0, $s2, $zero -/* FBDB0 802D7400 0C0B1EAF */ jal get_variable -/* FBDB4 802D7404 0040802D */ daddu $s0, $v0, $zero -/* FBDB8 802D7408 0200202D */ daddu $a0, $s0, $zero -/* FBDBC 802D740C 8E260000 */ lw $a2, ($s1) -/* FBDC0 802D7410 0C04C6C0 */ jal init_got_item -/* FBDC4 802D7414 0040282D */ daddu $a1, $v0, $zero -/* FBDC8 802D7418 AE420074 */ sw $v0, 0x74($s2) -/* FBDCC 802D741C 24020001 */ addiu $v0, $zero, 1 -/* FBDD0 802D7420 080B5D10 */ j .L802D7440 -/* FBDD4 802D7424 AE420070 */ sw $v0, 0x70($s2) -.L802D7428: -/* FBDD8 802D7428 8E440074 */ lw $a0, 0x74($s2) -/* FBDDC 802D742C 0C04C3D6 */ jal get_item_entity -/* FBDE0 802D7430 00000000 */ nop -/* FBDE4 802D7434 0040182D */ daddu $v1, $v0, $zero -/* FBDE8 802D7438 10600002 */ beqz $v1, .L802D7444 -/* FBDEC 802D743C 24020002 */ addiu $v0, $zero, 2 -.L802D7440: -/* FBDF0 802D7440 0000102D */ daddu $v0, $zero, $zero -.L802D7444: -/* FBDF4 802D7444 8FBF001C */ lw $ra, 0x1c($sp) -/* FBDF8 802D7448 8FB20018 */ lw $s2, 0x18($sp) -/* FBDFC 802D744C 8FB10014 */ lw $s1, 0x14($sp) -/* FBE00 802D7450 8FB00010 */ lw $s0, 0x10($sp) -/* FBE04 802D7454 03E00008 */ jr $ra -/* FBE08 802D7458 27BD0020 */ addiu $sp, $sp, 0x20 -/* FBE0C 802D745C 00000000 */ nop diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D5F28.s b/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D5F28.s deleted file mode 100644 index 46a6c29b96..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D5F28.s +++ /dev/null @@ -1,35 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D5F28 -/* FA8D8 802D5F28 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* FA8DC 802D5F2C AFB10014 */ sw $s1, 0x14($sp) -/* FA8E0 802D5F30 0080882D */ daddu $s1, $a0, $zero -/* FA8E4 802D5F34 AFBF001C */ sw $ra, 0x1c($sp) -/* FA8E8 802D5F38 AFB20018 */ sw $s2, 0x18($sp) -/* FA8EC 802D5F3C AFB00010 */ sw $s0, 0x10($sp) -/* FA8F0 802D5F40 8E30000C */ lw $s0, 0xc($s1) -/* FA8F4 802D5F44 8E050000 */ lw $a1, ($s0) -/* FA8F8 802D5F48 0C0B1EAF */ jal get_variable -/* FA8FC 802D5F4C 26100004 */ addiu $s0, $s0, 4 -/* FA900 802D5F50 8E050000 */ lw $a1, ($s0) -/* FA904 802D5F54 26100004 */ addiu $s0, $s0, 4 -/* FA908 802D5F58 0220202D */ daddu $a0, $s1, $zero -/* FA90C 802D5F5C 0C0B1EAF */ jal get_variable -/* FA910 802D5F60 0040902D */ daddu $s2, $v0, $zero -/* FA914 802D5F64 0220202D */ daddu $a0, $s1, $zero -/* FA918 802D5F68 8E050000 */ lw $a1, ($s0) -/* FA91C 802D5F6C 0C0B1EAF */ jal get_variable -/* FA920 802D5F70 0040802D */ daddu $s0, $v0, $zero -/* FA924 802D5F74 0240202D */ daddu $a0, $s2, $zero -/* FA928 802D5F78 0200282D */ daddu $a1, $s0, $zero -/* FA92C 802D5F7C 00021400 */ sll $v0, $v0, 0x10 -/* FA930 802D5F80 0C052A95 */ jal func_8014AA54 -/* FA934 802D5F84 00023403 */ sra $a2, $v0, 0x10 -/* FA938 802D5F88 8FBF001C */ lw $ra, 0x1c($sp) -/* FA93C 802D5F8C 8FB20018 */ lw $s2, 0x18($sp) -/* FA940 802D5F90 8FB10014 */ lw $s1, 0x14($sp) -/* FA944 802D5F94 8FB00010 */ lw $s0, 0x10($sp) -/* FA948 802D5F98 24020002 */ addiu $v0, $zero, 2 -/* FA94C 802D5F9C 03E00008 */ jr $ra -/* FA950 802D5FA0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D5FA4.s b/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D5FA4.s deleted file mode 100644 index 8ae28c2e64..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D5FA4.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D5FA4 -/* FA954 802D5FA4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* FA958 802D5FA8 AFBF0010 */ sw $ra, 0x10($sp) -/* FA95C 802D5FAC 8C82000C */ lw $v0, 0xc($a0) -/* FA960 802D5FB0 0C0B1EAF */ jal get_variable -/* FA964 802D5FB4 8C450000 */ lw $a1, ($v0) -/* FA968 802D5FB8 0000202D */ daddu $a0, $zero, $zero -/* FA96C 802D5FBC 00021400 */ sll $v0, $v0, 0x10 -/* FA970 802D5FC0 0C052AC3 */ jal func_8014AB0C -/* FA974 802D5FC4 00022C03 */ sra $a1, $v0, 0x10 -/* FA978 802D5FC8 8FBF0010 */ lw $ra, 0x10($sp) -/* FA97C 802D5FCC 24020002 */ addiu $v0, $zero, 2 -/* FA980 802D5FD0 03E00008 */ jr $ra -/* FA984 802D5FD4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D5FD8.s b/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D5FD8.s deleted file mode 100644 index b67d14c34e..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D5FD8.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D5FD8 -/* FA988 802D5FD8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* FA98C 802D5FDC AFBF0010 */ sw $ra, 0x10($sp) -/* FA990 802D5FE0 0C052B69 */ jal func_8014ADA4 -/* FA994 802D5FE4 00000000 */ nop -/* FA998 802D5FE8 8FBF0010 */ lw $ra, 0x10($sp) -/* FA99C 802D5FEC 24020002 */ addiu $v0, $zero, 2 -/* FA9A0 802D5FF0 03E00008 */ jr $ra -/* FA9A4 802D5FF4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D5FF8.s b/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D5FF8.s deleted file mode 100644 index f0f9869b8f..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D5FF8.s +++ /dev/null @@ -1,26 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D5FF8 -/* FA9A8 802D5FF8 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* FA9AC 802D5FFC AFB10014 */ sw $s1, 0x14($sp) -/* FA9B0 802D6000 0080882D */ daddu $s1, $a0, $zero -/* FA9B4 802D6004 AFBF0018 */ sw $ra, 0x18($sp) -/* FA9B8 802D6008 AFB00010 */ sw $s0, 0x10($sp) -/* FA9BC 802D600C 8E30000C */ lw $s0, 0xc($s1) -/* FA9C0 802D6010 8E050000 */ lw $a1, ($s0) -/* FA9C4 802D6014 0C0B1EAF */ jal get_variable -/* FA9C8 802D6018 26100004 */ addiu $s0, $s0, 4 -/* FA9CC 802D601C 0220202D */ daddu $a0, $s1, $zero -/* FA9D0 802D6020 8E050000 */ lw $a1, ($s0) -/* FA9D4 802D6024 0C0B1EAF */ jal get_variable -/* FA9D8 802D6028 0040802D */ daddu $s0, $v0, $zero -/* FA9DC 802D602C 0200202D */ daddu $a0, $s0, $zero -/* FA9E0 802D6030 0C052B7E */ jal func_8014ADF8 -/* FA9E4 802D6034 0040282D */ daddu $a1, $v0, $zero -/* FA9E8 802D6038 8FBF0018 */ lw $ra, 0x18($sp) -/* FA9EC 802D603C 8FB10014 */ lw $s1, 0x14($sp) -/* FA9F0 802D6040 8FB00010 */ lw $s0, 0x10($sp) -/* FA9F4 802D6044 24020002 */ addiu $v0, $zero, 2 -/* FA9F8 802D6048 03E00008 */ jr $ra -/* FA9FC 802D604C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D6050.s b/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D6050.s deleted file mode 100644 index 491d3b7e1c..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D6050.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D6050 -/* FAA00 802D6050 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* FAA04 802D6054 AFBF0010 */ sw $ra, 0x10($sp) -/* FAA08 802D6058 0C052B9B */ jal func_8014AE6C -/* FAA0C 802D605C 00000000 */ nop -/* FAA10 802D6060 8FBF0010 */ lw $ra, 0x10($sp) -/* FAA14 802D6064 24020002 */ addiu $v0, $zero, 2 -/* FAA18 802D6068 03E00008 */ jr $ra -/* FAA1C 802D606C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D6070.s b/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D6070.s deleted file mode 100644 index 9790dd0463..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D6070.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D6070 -/* FAA20 802D6070 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* FAA24 802D6074 AFBF0010 */ sw $ra, 0x10($sp) -/* FAA28 802D6078 0C052BBE */ jal func_8014AEF8 -/* FAA2C 802D607C 00000000 */ nop -/* FAA30 802D6080 8FBF0010 */ lw $ra, 0x10($sp) -/* FAA34 802D6084 24020002 */ addiu $v0, $zero, 2 -/* FAA38 802D6088 03E00008 */ jr $ra -/* FAA3C 802D608C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D6090.s b/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D6090.s deleted file mode 100644 index 6308bc6003..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D6090.s +++ /dev/null @@ -1,26 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D6090 -/* FAA40 802D6090 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* FAA44 802D6094 AFB10014 */ sw $s1, 0x14($sp) -/* FAA48 802D6098 0080882D */ daddu $s1, $a0, $zero -/* FAA4C 802D609C AFBF0018 */ sw $ra, 0x18($sp) -/* FAA50 802D60A0 AFB00010 */ sw $s0, 0x10($sp) -/* FAA54 802D60A4 8E30000C */ lw $s0, 0xc($s1) -/* FAA58 802D60A8 8E050000 */ lw $a1, ($s0) -/* FAA5C 802D60AC 0C0B1EAF */ jal get_variable -/* FAA60 802D60B0 26100004 */ addiu $s0, $s0, 4 -/* FAA64 802D60B4 0220202D */ daddu $a0, $s1, $zero -/* FAA68 802D60B8 8E050000 */ lw $a1, ($s0) -/* FAA6C 802D60BC 0C0B1EAF */ jal get_variable -/* FAA70 802D60C0 0040802D */ daddu $s0, $v0, $zero -/* FAA74 802D60C4 0200202D */ daddu $a0, $s0, $zero -/* FAA78 802D60C8 0C052BE3 */ jal func_8014AF8C -/* FAA7C 802D60CC 0040282D */ daddu $a1, $v0, $zero -/* FAA80 802D60D0 8FBF0018 */ lw $ra, 0x18($sp) -/* FAA84 802D60D4 8FB10014 */ lw $s1, 0x14($sp) -/* FAA88 802D60D8 8FB00010 */ lw $s0, 0x10($sp) -/* FAA8C 802D60DC 24020002 */ addiu $v0, $zero, 2 -/* FAA90 802D60E0 03E00008 */ jr $ra -/* FAA94 802D60E4 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D721C.s b/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D721C.s deleted file mode 100644 index e39a3e7111..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D721C.s +++ /dev/null @@ -1,27 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D721C -/* FBBCC 802D721C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* FBBD0 802D7220 AFB10014 */ sw $s1, 0x14($sp) -/* FBBD4 802D7224 0080882D */ daddu $s1, $a0, $zero -/* FBBD8 802D7228 AFBF0018 */ sw $ra, 0x18($sp) -/* FBBDC 802D722C AFB00010 */ sw $s0, 0x10($sp) -/* FBBE0 802D7230 8E30000C */ lw $s0, 0xc($s1) -/* FBBE4 802D7234 8E050000 */ lw $a1, ($s0) -/* FBBE8 802D7238 0C0B1EAF */ jal get_variable -/* FBBEC 802D723C 26100004 */ addiu $s0, $s0, 4 -/* FBBF0 802D7240 0220202D */ daddu $a0, $s1, $zero -/* FBBF4 802D7244 8E050000 */ lw $a1, ($s0) -/* FBBF8 802D7248 0C0B1EAF */ jal get_variable -/* FBBFC 802D724C 0040802D */ daddu $s0, $v0, $zero -/* FBC00 802D7250 0200202D */ daddu $a0, $s0, $zero -/* FBC04 802D7254 0C04C3D6 */ jal get_item_entity -/* FBC08 802D7258 0040802D */ daddu $s0, $v0, $zero -/* FBC0C 802D725C A050002F */ sb $s0, 0x2f($v0) -/* FBC10 802D7260 8FBF0018 */ lw $ra, 0x18($sp) -/* FBC14 802D7264 8FB10014 */ lw $s1, 0x14($sp) -/* FBC18 802D7268 8FB00010 */ lw $s0, 0x10($sp) -/* FBC1C 802D726C 24020002 */ addiu $v0, $zero, 2 -/* FBC20 802D7270 03E00008 */ jr $ra -/* FBC24 802D7274 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7520.s b/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7520.s deleted file mode 100644 index 5e0d3b536d..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7520.s +++ /dev/null @@ -1,50 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D7520 -/* FBED0 802D7520 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* FBED4 802D7524 AFB1001C */ sw $s1, 0x1c($sp) -/* FBED8 802D7528 0080882D */ daddu $s1, $a0, $zero -/* FBEDC 802D752C AFBF0020 */ sw $ra, 0x20($sp) -/* FBEE0 802D7530 AFB00018 */ sw $s0, 0x18($sp) -/* FBEE4 802D7534 F7B80038 */ sdc1 $f24, 0x38($sp) -/* FBEE8 802D7538 F7B60030 */ sdc1 $f22, 0x30($sp) -/* FBEEC 802D753C F7B40028 */ sdc1 $f20, 0x28($sp) -/* FBEF0 802D7540 8E30000C */ lw $s0, 0xc($s1) -/* FBEF4 802D7544 8E050000 */ lw $a1, ($s0) -/* FBEF8 802D7548 0C0B210B */ jal get_float_variable -/* FBEFC 802D754C 26100004 */ addiu $s0, $s0, 4 -/* FBF00 802D7550 8E050000 */ lw $a1, ($s0) -/* FBF04 802D7554 26100004 */ addiu $s0, $s0, 4 -/* FBF08 802D7558 0220202D */ daddu $a0, $s1, $zero -/* FBF0C 802D755C 0C0B210B */ jal get_float_variable -/* FBF10 802D7560 46000606 */ mov.s $f24, $f0 -/* FBF14 802D7564 8E050000 */ lw $a1, ($s0) -/* FBF18 802D7568 26100004 */ addiu $s0, $s0, 4 -/* FBF1C 802D756C 0220202D */ daddu $a0, $s1, $zero -/* FBF20 802D7570 0C0B210B */ jal get_float_variable -/* FBF24 802D7574 46000586 */ mov.s $f22, $f0 -/* FBF28 802D7578 0220202D */ daddu $a0, $s1, $zero -/* FBF2C 802D757C 8E050000 */ lw $a1, ($s0) -/* FBF30 802D7580 0C0B1EAF */ jal get_variable -/* FBF34 802D7584 46000506 */ mov.s $f20, $f0 -/* FBF38 802D7588 0040382D */ daddu $a3, $v0, $zero -/* FBF3C 802D758C 4600C306 */ mov.s $f12, $f24 -/* FBF40 802D7590 4406A000 */ mfc1 $a2, $f20 -/* FBF44 802D7594 0C0B5D18 */ jal func_802D7460 -/* FBF48 802D7598 4600B386 */ mov.s $f14, $f22 -/* FBF4C 802D759C 24042055 */ addiu $a0, $zero, 0x2055 -/* FBF50 802D75A0 4406C000 */ mfc1 $a2, $f24 -/* FBF54 802D75A4 4407B000 */ mfc1 $a3, $f22 -/* FBF58 802D75A8 0000282D */ daddu $a1, $zero, $zero -/* FBF5C 802D75AC 0C052757 */ jal play_sound_at_position -/* FBF60 802D75B0 E7B40010 */ swc1 $f20, 0x10($sp) -/* FBF64 802D75B4 8FBF0020 */ lw $ra, 0x20($sp) -/* FBF68 802D75B8 8FB1001C */ lw $s1, 0x1c($sp) -/* FBF6C 802D75BC 8FB00018 */ lw $s0, 0x18($sp) -/* FBF70 802D75C0 D7B80038 */ ldc1 $f24, 0x38($sp) -/* FBF74 802D75C4 D7B60030 */ ldc1 $f22, 0x30($sp) -/* FBF78 802D75C8 D7B40028 */ ldc1 $f20, 0x28($sp) -/* FBF7C 802D75CC 24020002 */ addiu $v0, $zero, 2 -/* FBF80 802D75D0 03E00008 */ jr $ra -/* FBF84 802D75D4 27BD0040 */ addiu $sp, $sp, 0x40 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D75D8.s b/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D75D8.s deleted file mode 100644 index 7d566eda92..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D75D8.s +++ /dev/null @@ -1,50 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D75D8 -/* FBF88 802D75D8 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* FBF8C 802D75DC AFB1001C */ sw $s1, 0x1c($sp) -/* FBF90 802D75E0 0080882D */ daddu $s1, $a0, $zero -/* FBF94 802D75E4 AFBF0020 */ sw $ra, 0x20($sp) -/* FBF98 802D75E8 AFB00018 */ sw $s0, 0x18($sp) -/* FBF9C 802D75EC F7B80038 */ sdc1 $f24, 0x38($sp) -/* FBFA0 802D75F0 F7B60030 */ sdc1 $f22, 0x30($sp) -/* FBFA4 802D75F4 F7B40028 */ sdc1 $f20, 0x28($sp) -/* FBFA8 802D75F8 8E30000C */ lw $s0, 0xc($s1) -/* FBFAC 802D75FC 8E050000 */ lw $a1, ($s0) -/* FBFB0 802D7600 0C0B210B */ jal get_float_variable -/* FBFB4 802D7604 26100004 */ addiu $s0, $s0, 4 -/* FBFB8 802D7608 8E050000 */ lw $a1, ($s0) -/* FBFBC 802D760C 26100004 */ addiu $s0, $s0, 4 -/* FBFC0 802D7610 0220202D */ daddu $a0, $s1, $zero -/* FBFC4 802D7614 0C0B210B */ jal get_float_variable -/* FBFC8 802D7618 46000606 */ mov.s $f24, $f0 -/* FBFCC 802D761C 8E050000 */ lw $a1, ($s0) -/* FBFD0 802D7620 26100004 */ addiu $s0, $s0, 4 -/* FBFD4 802D7624 0220202D */ daddu $a0, $s1, $zero -/* FBFD8 802D7628 0C0B210B */ jal get_float_variable -/* FBFDC 802D762C 46000586 */ mov.s $f22, $f0 -/* FBFE0 802D7630 0220202D */ daddu $a0, $s1, $zero -/* FBFE4 802D7634 8E050000 */ lw $a1, ($s0) -/* FBFE8 802D7638 0C0B1EAF */ jal get_variable -/* FBFEC 802D763C 46000506 */ mov.s $f20, $f0 -/* FBFF0 802D7640 0040382D */ daddu $a3, $v0, $zero -/* FBFF4 802D7644 4600C306 */ mov.s $f12, $f24 -/* FBFF8 802D7648 4406A000 */ mfc1 $a2, $f20 -/* FBFFC 802D764C 0C0B5D30 */ jal func_802D74C0 -/* FC000 802D7650 4600B386 */ mov.s $f14, $f22 -/* FC004 802D7654 24040378 */ addiu $a0, $zero, 0x378 -/* FC008 802D7658 4406C000 */ mfc1 $a2, $f24 -/* FC00C 802D765C 4407B000 */ mfc1 $a3, $f22 -/* FC010 802D7660 0000282D */ daddu $a1, $zero, $zero -/* FC014 802D7664 0C052757 */ jal play_sound_at_position -/* FC018 802D7668 E7B40010 */ swc1 $f20, 0x10($sp) -/* FC01C 802D766C 8FBF0020 */ lw $ra, 0x20($sp) -/* FC020 802D7670 8FB1001C */ lw $s1, 0x1c($sp) -/* FC024 802D7674 8FB00018 */ lw $s0, 0x18($sp) -/* FC028 802D7678 D7B80038 */ ldc1 $f24, 0x38($sp) -/* FC02C 802D767C D7B60030 */ ldc1 $f22, 0x30($sp) -/* FC030 802D7680 D7B40028 */ ldc1 $f20, 0x28($sp) -/* FC034 802D7684 24020002 */ addiu $v0, $zero, 2 -/* FC038 802D7688 03E00008 */ jr $ra -/* FC03C 802D768C 27BD0040 */ addiu $sp, $sp, 0x40 diff --git a/include/common_structs.h b/include/common_structs.h index 844512d262..007d2052f5 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -779,7 +779,7 @@ typedef struct ItemEntity { /* 0x28 */ u32* savedReadPos; /* 0x2C */ char unk_2C[2]; /* 0x2E */ u8 unkCounter; - /* 0x2F */ char unk_2F; + /* 0x2F */ s8 unk_2F; /* 0x30 */ f32 scale; /* 0x34 */ char unk_34[40]; } ItemEntity; // size = 0x5C diff --git a/include/functions.h b/include/functions.h index c7e10897e3..f82f6ddd45 100644 --- a/include/functions.h +++ b/include/functions.h @@ -92,6 +92,9 @@ f32 update_lerp(Easing easing, f32 start, f32 end, s32 elapsed, s32 duration); void make_item_entity_delayed(s32 itemID, f32 x, f32 y, f32 z, s32 unk1, s32 unk2, s32 unk3); void set_item_entity_position(s32 itemEntityIndex, f32 x, f32 y, f32 z); +ItemEntity* get_item_entity(s32 itemEntityIndex); +s32 make_item_entity_nodelay(s32 itemID, f32 x, f32 y, f32 z, ItemSpawnMode itemSpawnMode, s32 pickupVar); + void set_cam_viewport(s16 id, s16 x, s16 y, s16 width, s16 height); diff --git a/src/code_FBE10.c b/src/code_FBE10.c new file mode 100644 index 0000000000..559197088e --- /dev/null +++ b/src/code_FBE10.c @@ -0,0 +1,78 @@ +#include "common.h" + +void func_802D7460(f32 x, f32 y, f32 z, s32 arg3); +INCLUDE_ASM(void, "code_fa4c0_len_3bf0", func_802D7460, f32 x, f32 y, f32 z, s32 arg3); + +void func_802D74C0(f32 x, f32 y, f32 z, s32 arg3); +INCLUDE_ASM(void, "code_fa4c0_len_3bf0", func_802D74C0, f32 x, f32 y, f32 z, s32 arg3); + +ApiStatus func_802D7520(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + f32 x = get_float_variable(script, *args++); + f32 y = get_float_variable(script, *args++); + f32 z = get_float_variable(script, *args++); + + func_802D7460(x, y, z, get_variable(script, *args++)); + play_sound_at_position(0x2055, 0, x, y, z); + return ApiStatus_DONE2; +} + +ApiStatus func_802D75D8(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + f32 x = get_float_variable(script, *args++); + f32 y = get_float_variable(script, *args++); + f32 z = get_float_variable(script, *args++); + + func_802D74C0(x, y, z, get_variable(script, *args++)); + play_sound_at_position(0x378, 0, x, y, z); + return ApiStatus_DONE2; +} + +INCLUDE_ASM(s32, "code_FBE10", func_802D7690); + +INCLUDE_ASM(s32, "code_FBE10", ShowEmote, ScriptInstance* script, s32 isInitialCall); + +ApiStatus RemoveEffect(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + + remove_effect(get_variable(script, *args++)); + return ApiStatus_DONE2; +} + +ApiStatus func_802D7B10(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32* ptrValue = get_variable(script, *args++); + + *ptrValue |= 0x10; + return ApiStatus_DONE2; +} + +ApiStatus func_802D7B44(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32* ptrValue = get_variable(script, *args++); + s32* ptrTemp = ptrValue[3]; + + ptrTemp[5] = 10; + return ApiStatus_DONE2; +} + +ApiStatus func_802D7B74(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32* ptrValue = get_variable(script, *args++); + s32* ptrTemp = ptrValue[3]; + + ptrTemp[12] = 5; + return ApiStatus_DONE2; +} + +INCLUDE_ASM(s32, "code_FBE10", func_802D7BA4); + +INCLUDE_ASM(s32, "code_FBE10", func_802D7CF8); + +INCLUDE_ASM(s32, "code_FBE10", func_802D7E08); + +INCLUDE_ASM(s32, "code_FBE10", ShowSleepBubble); + +INCLUDE_ASM(s32, "code_FBE10", func_802D8248); + +INCLUDE_ASM(s32, "code_FBE10", PlayEffect); diff --git a/src/code_b72b0_len_15ed0.c b/src/code_b72b0_len_15ed0.c index c024268e53..035599feaf 100644 --- a/src/code_b72b0_len_15ed0.c +++ b/src/code_b72b0_len_15ed0.c @@ -187,7 +187,7 @@ INCLUDE_ASM(s32, "code_b72b0_len_15ed0", func_80130ACC); INCLUDE_ASM(s32, "code_b72b0_len_15ed0", draw_coin_sparkles); -INCLUDE_ASM(s32, "code_b72b0_len_15ed0", get_item_entity); +INCLUDE_ASM(ItemEntity*, "code_b72b0_len_15ed0", get_item_entity, s32 itemEntityIndex); INCLUDE_ASM(s32, "code_b72b0_len_15ed0", func_80130F70); @@ -201,7 +201,8 @@ INCLUDE_ASM(s32, "code_b72b0_len_15ed0", func_80131128); INCLUDE_ASM(s32, "code_b72b0_len_15ed0", make_item_entity); -INCLUDE_ASM(s32, "code_b72b0_len_15ed0", make_item_entity_nodelay); +INCLUDE_ASM(s32, "code_b72b0_len_15ed0", make_item_entity_nodelay, s32 itemID, f32 x, f32 y, f32 z, + ItemSpawnMode itemSpawnMode, s32 pickupVar); INCLUDE_ASM(void, "code_b72b0_len_15ed0", make_item_entity_delayed, s32 itemID, f32 x, f32 y, f32 z, s32 unk1, s32 unk2, diff --git a/src/code_fa4c0_len_3bf0.c b/src/code_fa4c0_len_3bf0.c index a3f68de5e9..f01862a7a4 100644 --- a/src/code_fa4c0_len_3bf0.c +++ b/src/code_fa4c0_len_3bf0.c @@ -22,23 +22,60 @@ ApiStatus SetMusicTrack(ScriptInstance* script, s32 isInitialCall) { return (set_music_track(musicPlayer, songID, variation, 0x1F4, volume) != 0) * 2; } -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", FadeInMusic, ScriptInstance* script, s32 isInitialCall); +ApiStatus FadeInMusic(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 var0 = get_variable(script, *args++); + s32 var1 = get_variable(script, *args++); + s32 var2 = get_variable(script, *args++); + s32 var3 = get_variable(script, *args++); + s16 var4 = get_variable(script, *args++); + s16 var5 = get_variable(script, *args++); + + return (func_8014A964(var0, var1, var2, var3, var4, var5) != 0) * 2; +} INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D5EE0); -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D5F28); +ApiStatus func_802D5F28(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D5FA4); + func_8014AA54(get_variable(script, *args++), get_variable(script, *args++), (s16)get_variable(script, *args++)); + return ApiStatus_DONE2; +} -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D5FD8); +ApiStatus func_802D5FA4(ScriptInstance* script, s32 isInitialCall) { + func_8014AB0C(0, (s16)get_variable(script, *script->ptrReadPos)); + return ApiStatus_DONE2; +} -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D5FF8); +ApiStatus func_802D5FD8(ScriptInstance* script, s32 isInitialCall) { + func_8014ADA4(); + return ApiStatus_DONE2; +} -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D6050); +ApiStatus func_802D5FF8(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D6070); + func_8014ADF8(get_variable(script, *args++), get_variable(script, *args++)); + return ApiStatus_DONE2; +} -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D6090); +ApiStatus func_802D6050(ScriptInstance* script, s32 isInitialCall) { + func_8014AE6C(); + return ApiStatus_DONE2; +} + +ApiStatus func_802D6070(ScriptInstance* script, s32 isInitialCall) { + func_8014AEF8(); + return ApiStatus_DONE2; +} + +ApiStatus func_802D6090(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + + func_8014AF8C(get_variable(script, *args++), get_variable(script, *args++)); + return ApiStatus_DONE2; +} //INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", ClearAmbientSounds); ApiStatus ClearAmbientSounds(ScriptInstance* script, s32 isInitialCall) { @@ -112,7 +149,17 @@ ApiStatus func_802D6340(ScriptInstance* script, s32 initialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", PlaySoundAtF, ScriptInstance* script, s32 isInitialCall); +ApiStatus PlaySoundAtF(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + Bytecode soundID = *args++; + u16 value2 = get_variable(script, *args++); + f32 x = get_float_variable(script, *args++); + f32 y = get_float_variable(script, *args++); + f32 z = get_float_variable(script, *args++); + + play_sound_at_position(soundID, value2, x, y, z); + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D6420); @@ -289,13 +336,32 @@ ApiStatus RemoveFortressKeys(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", MakeItemEntity, ScriptInstance* script, s32 isInitialCall); +ApiStatus MakeItemEntity(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 itemID = get_variable(script, *args++); + s32 x = get_variable(script, *args++); + s32 y = get_variable(script, *args++); + s32 z = get_variable(script, *args++); + s32 itemSpawnMode = get_variable(script, *args++); + s32 pickupVar = get_variable_index(script, *args++); -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", DropItemEntity, ScriptInstance* script, s32 isInitialCall); + script->varTable[0] = make_item_entity_nodelay(itemID, x, y, z, itemSpawnMode, pickupVar); + return ApiStatus_DONE2; +} + +ApiStatus DropItemEntity(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 itemID = get_variable(script, *args++); + s32 x = get_variable(script, *args++); + s32 y = get_variable(script, *args++); + s32 z = get_variable(script, *args++); + s32 itemSpawnMode = get_variable(script, *args++); + s32 pickupVar = get_variable(script, *args++); + + script->varTable[0] = make_item_entity_nodelay(itemID, x, y, z, itemSpawnMode, pickupVar); + return ApiStatus_DONE2; +} -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", DropItemEntityB, ScriptInstance* script, s32 isInitialCall); -/* -// Close to working ApiStatus DropItemEntityB(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 itemID = get_variable(script, *args++); @@ -303,13 +369,12 @@ ApiStatus DropItemEntityB(ScriptInstance* script, s32 isInitialCall) { s32 y = get_variable(script, *args++); s32 z = get_variable(script, *args++); s32 itemSpawnMode = get_variable(script, *args++); - s32 pickupFlag = get_variable(script, *args++); + s32 pickupVar = get_variable_index(script, *args++); - script->varTable[0] = make_item_entity_nodelay(itemID, x, y, z); - set_item_entity_flags(script, 0x4000); + script->varTable[0] = make_item_entity_nodelay(itemID, x, y, z, itemSpawnMode, pickupVar); + set_item_entity_flags(script->varTable[0], 0x4000); return ApiStatus_DONE2; } -*/ ApiStatus RemoveItemEntity(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; @@ -328,7 +393,25 @@ ApiStatus AddBadge(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", RemoveBadge, ScriptInstance* script, s32 isInitialCall); +ApiStatus RemoveBadge(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + PlayerData* playerData = PLAYER_DATA; + s32 badge = get_variable(script, *args++); + s32 i; + + for (i = 0; i < ARRAY_COUNT(playerData->badges); i++) { + if (playerData->badges[i] == badge) { + playerData->badges[i] = 0; + } + } + + for (i = 0; i < ARRAY_COUNT(playerData->equippedBadges); i++) { + if (playerData->equippedBadges[i] == badge) { + playerData->equippedBadges[i] = 0; + } + } + return ApiStatus_DONE2; +} ApiStatus SetItemPos(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; @@ -348,9 +431,30 @@ ApiStatus SetItemPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", SetItemFlags, ScriptInstance* script, s32 isInitialCall); +ApiStatus SetItemFlags(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 itemEntityIndex = get_variable(script, *args++); + s32 flagBits = *args++; + s32 var2 = get_variable(script, *args++); + ItemEntity* itemEntity = get_item_entity(itemEntityIndex); -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D721C); + if (var2 != 0) { + itemEntity->flags |= flagBits; + } else { + itemEntity->flags &= ~flagBits; + } + return ApiStatus_DONE2; +} +; +ApiStatus func_802D721C(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 itemEntityIndex = get_variable(script, *args++); + s32 var2 = get_variable(script, *args++); + ItemEntity* itemEntity = get_item_entity(itemEntityIndex); + + itemEntity->unk_2F = var2; + return ApiStatus_DONE2; +} ApiStatus AddCoin(ScriptInstance* script, s32 isInitialCall) { script->varTable[0] = add_coins(get_variable(script, *script->ptrReadPos)); @@ -378,61 +482,23 @@ ApiStatus GetItemPower(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", ShowGotItem, ScriptInstance* script, s32 isInitialCall); - -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D7460); - -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D74C0); - -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D7520); - -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D75D8); - -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D7690); - -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", ShowEmote, ScriptInstance* script, s32 isInitialCall); - -ApiStatus RemoveEffect(ScriptInstance* script, s32 isInitialCall) { +ApiStatus ShowGotItem(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; + ItemEntity* e; - remove_effect(get_variable(script, *args++)); - return ApiStatus_DONE2; + if (isInitialCall) { + script->functionTemp[0].s = 0; + } + + switch (script->functionTemp[0].s) { + case 0: + script->functionTemp[1].s = init_got_item(get_variable(script, *args++), get_variable(script, *args++), *args++); + script->functionTemp[0].s = 1; + break; + case 1: + if (get_item_entity(script->functionTemp[1].s) == NULL) { + return ApiStatus_DONE2; + } + } + return ApiStatus_BLOCK; } - -ApiStatus func_802D7B10(ScriptInstance* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32* ptrValue = get_variable(script, *args++); - - *ptrValue |= 0x10; - return ApiStatus_DONE2; -} - -ApiStatus func_802D7B44(ScriptInstance* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32* ptrValue = get_variable(script, *args++); - s32* ptrTemp = ptrValue[3]; - - ptrTemp[5] = 10; - return ApiStatus_DONE2; -} - -ApiStatus func_802D7B74(ScriptInstance* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32* ptrValue = get_variable(script, *args++); - s32* ptrTemp = ptrValue[3]; - - ptrTemp[12] = 5; - return ApiStatus_DONE2; -} - -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D7BA4); - -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D7CF8); - -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D7E08); - -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", ShowSleepBubble); - -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D8248); - -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", PlayEffect); diff --git a/tools/splat.yaml b/tools/splat.yaml index aa6a048f39..1352b2dab6 100644 --- a/tools/splat.yaml +++ b/tools/splat.yaml @@ -248,6 +248,7 @@ segments: - [0xf5750, "c", "code_F5750"] - [0xf8f60, "c", "code_f8f60_len_1560"] - [0xfa4c0, "c", "code_fa4c0_len_3bf0"] + - [0xFBE10, "c"] - [0xfe0b0, "c", "code_fe0b0_len_5a0"] - [0xFE650, ".data", "code_e79b0_len_1920"] - [0xFE660, "bin"] From 2d215e694347e3cdabdb8bee30959462f6a2db63 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Mon, 26 Oct 2020 23:31:40 -0400 Subject: [PATCH 02/78] Some 1A5830 funcs --- .../code_1A5830/BindHandleEvent.s | 34 -- asm/nonmatchings/code_1A5830/BindNextTurn.s | 34 -- asm/nonmatchings/code_1A5830/BindTakeTurn.s | 34 -- asm/nonmatchings/code_1A5830/DispatchEvent.s | 34 -- .../code_1A5830/EnableActorBlur.s | 51 --- asm/nonmatchings/code_1A5830/GetActorSize.s | 41 --- .../code_1A5830/GetCurrentActorType.s | 31 -- .../code_1A5830/GetEncounterState.s | 15 - asm/nonmatchings/code_1A5830/GetEnemyMaxHP.s | 31 -- asm/nonmatchings/code_1A5830/GetLastDamage.s | 31 -- asm/nonmatchings/code_1A5830/GetLastEvent.s | 31 -- .../code_1A5830/GetOriginalActorType.s | 32 -- asm/nonmatchings/code_1A5830/PauseTakeTurn.s | 35 -- asm/nonmatchings/code_1A5830/ResumeTakeTurn.s | 35 -- .../code_1A5830/SetDefenseTable.s | 42 --- .../code_1A5830/SetIdleAnimations.s | 42 --- asm/nonmatchings/code_1A5830/SetStatusTable.s | 34 -- asm/nonmatchings/code_1A5830/SetTargetActor.s | 37 --- asm/nonmatchings/code_1A5830/YieldTurn.s | 12 - asm/nonmatchings/code_1A5830/func_8027D2D8.s | 26 -- asm/nonmatchings/code_1A5830/func_8027D32C.s | 26 -- asm/nonmatchings/code_1A5830/func_8027D628.s | 26 -- asm/nonmatchings/code_1A5830/func_8027D75C.s | 31 -- .../code_1a1f0_len_5390/func_8003EE98.s | 18 -- .../code_1a1f0_len_5390/func_8003EECC.s | 18 -- .../code_1a1f0_len_5390/func_8003F018.s | 33 -- include/common_structs.h | 11 +- src/code_1A5830.c | 306 ++++++++++++++++-- src/code_1a1f0_len_5390.c | 31 +- 29 files changed, 318 insertions(+), 844 deletions(-) delete mode 100644 asm/nonmatchings/code_1A5830/BindHandleEvent.s delete mode 100644 asm/nonmatchings/code_1A5830/BindNextTurn.s delete mode 100644 asm/nonmatchings/code_1A5830/BindTakeTurn.s delete mode 100644 asm/nonmatchings/code_1A5830/DispatchEvent.s delete mode 100644 asm/nonmatchings/code_1A5830/EnableActorBlur.s delete mode 100644 asm/nonmatchings/code_1A5830/GetActorSize.s delete mode 100644 asm/nonmatchings/code_1A5830/GetCurrentActorType.s delete mode 100644 asm/nonmatchings/code_1A5830/GetEncounterState.s delete mode 100644 asm/nonmatchings/code_1A5830/GetEnemyMaxHP.s delete mode 100644 asm/nonmatchings/code_1A5830/GetLastDamage.s delete mode 100644 asm/nonmatchings/code_1A5830/GetLastEvent.s delete mode 100644 asm/nonmatchings/code_1A5830/GetOriginalActorType.s delete mode 100644 asm/nonmatchings/code_1A5830/PauseTakeTurn.s delete mode 100644 asm/nonmatchings/code_1A5830/ResumeTakeTurn.s delete mode 100644 asm/nonmatchings/code_1A5830/SetDefenseTable.s delete mode 100644 asm/nonmatchings/code_1A5830/SetIdleAnimations.s delete mode 100644 asm/nonmatchings/code_1A5830/SetStatusTable.s delete mode 100644 asm/nonmatchings/code_1A5830/SetTargetActor.s delete mode 100644 asm/nonmatchings/code_1A5830/YieldTurn.s delete mode 100644 asm/nonmatchings/code_1A5830/func_8027D2D8.s delete mode 100644 asm/nonmatchings/code_1A5830/func_8027D32C.s delete mode 100644 asm/nonmatchings/code_1A5830/func_8027D628.s delete mode 100644 asm/nonmatchings/code_1A5830/func_8027D75C.s delete mode 100644 asm/nonmatchings/code_1a1f0_len_5390/func_8003EE98.s delete mode 100644 asm/nonmatchings/code_1a1f0_len_5390/func_8003EECC.s delete mode 100644 asm/nonmatchings/code_1a1f0_len_5390/func_8003F018.s diff --git a/asm/nonmatchings/code_1A5830/BindHandleEvent.s b/asm/nonmatchings/code_1A5830/BindHandleEvent.s deleted file mode 100644 index 2fb246be45..0000000000 --- a/asm/nonmatchings/code_1A5830/BindHandleEvent.s +++ /dev/null @@ -1,34 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel BindHandleEvent -/* 1A7500 80278C20 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1A7504 80278C24 AFB20018 */ sw $s2, 0x18($sp) -/* 1A7508 80278C28 0080902D */ daddu $s2, $a0, $zero -/* 1A750C 80278C2C AFBF001C */ sw $ra, 0x1c($sp) -/* 1A7510 80278C30 AFB10014 */ sw $s1, 0x14($sp) -/* 1A7514 80278C34 AFB00010 */ sw $s0, 0x10($sp) -/* 1A7518 80278C38 8E51000C */ lw $s1, 0xc($s2) -/* 1A751C 80278C3C 8E250000 */ lw $a1, ($s1) -/* 1A7520 80278C40 0C0B1EAF */ jal get_variable -/* 1A7524 80278C44 26310004 */ addiu $s1, $s1, 4 -/* 1A7528 80278C48 0040802D */ daddu $s0, $v0, $zero -/* 1A752C 80278C4C 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1A7530 80278C50 16020002 */ bne $s0, $v0, .L80278C5C -/* 1A7534 80278C54 00000000 */ nop -/* 1A7538 80278C58 8E500148 */ lw $s0, 0x148($s2) -.L80278C5C: -/* 1A753C 80278C5C 8E250000 */ lw $a1, ($s1) -/* 1A7540 80278C60 0C0B1EAF */ jal get_variable -/* 1A7544 80278C64 0240202D */ daddu $a0, $s2, $zero -/* 1A7548 80278C68 0200202D */ daddu $a0, $s0, $zero -/* 1A754C 80278C6C 0C09A75B */ jal get_actor -/* 1A7550 80278C70 0040802D */ daddu $s0, $v0, $zero -/* 1A7554 80278C74 AC5001C8 */ sw $s0, 0x1c8($v0) -/* 1A7558 80278C78 8FBF001C */ lw $ra, 0x1c($sp) -/* 1A755C 80278C7C 8FB20018 */ lw $s2, 0x18($sp) -/* 1A7560 80278C80 8FB10014 */ lw $s1, 0x14($sp) -/* 1A7564 80278C84 8FB00010 */ lw $s0, 0x10($sp) -/* 1A7568 80278C88 24020002 */ addiu $v0, $zero, 2 -/* 1A756C 80278C8C 03E00008 */ jr $ra -/* 1A7570 80278C90 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_1A5830/BindNextTurn.s b/asm/nonmatchings/code_1A5830/BindNextTurn.s deleted file mode 100644 index e64868d381..0000000000 --- a/asm/nonmatchings/code_1A5830/BindNextTurn.s +++ /dev/null @@ -1,34 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel BindNextTurn -/* 1A7574 80278C94 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1A7578 80278C98 AFB20018 */ sw $s2, 0x18($sp) -/* 1A757C 80278C9C 0080902D */ daddu $s2, $a0, $zero -/* 1A7580 80278CA0 AFBF001C */ sw $ra, 0x1c($sp) -/* 1A7584 80278CA4 AFB10014 */ sw $s1, 0x14($sp) -/* 1A7588 80278CA8 AFB00010 */ sw $s0, 0x10($sp) -/* 1A758C 80278CAC 8E51000C */ lw $s1, 0xc($s2) -/* 1A7590 80278CB0 8E250000 */ lw $a1, ($s1) -/* 1A7594 80278CB4 0C0B1EAF */ jal get_variable -/* 1A7598 80278CB8 26310004 */ addiu $s1, $s1, 4 -/* 1A759C 80278CBC 0040802D */ daddu $s0, $v0, $zero -/* 1A75A0 80278CC0 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1A75A4 80278CC4 16020002 */ bne $s0, $v0, .L80278CD0 -/* 1A75A8 80278CC8 00000000 */ nop -/* 1A75AC 80278CCC 8E500148 */ lw $s0, 0x148($s2) -.L80278CD0: -/* 1A75B0 80278CD0 8E250000 */ lw $a1, ($s1) -/* 1A75B4 80278CD4 0C0B1EAF */ jal get_variable -/* 1A75B8 80278CD8 0240202D */ daddu $a0, $s2, $zero -/* 1A75BC 80278CDC 0200202D */ daddu $a0, $s0, $zero -/* 1A75C0 80278CE0 0C09A75B */ jal get_actor -/* 1A75C4 80278CE4 0040802D */ daddu $s0, $v0, $zero -/* 1A75C8 80278CE8 AC5001CC */ sw $s0, 0x1cc($v0) -/* 1A75CC 80278CEC 8FBF001C */ lw $ra, 0x1c($sp) -/* 1A75D0 80278CF0 8FB20018 */ lw $s2, 0x18($sp) -/* 1A75D4 80278CF4 8FB10014 */ lw $s1, 0x14($sp) -/* 1A75D8 80278CF8 8FB00010 */ lw $s0, 0x10($sp) -/* 1A75DC 80278CFC 24020002 */ addiu $v0, $zero, 2 -/* 1A75E0 80278D00 03E00008 */ jr $ra -/* 1A75E4 80278D04 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_1A5830/BindTakeTurn.s b/asm/nonmatchings/code_1A5830/BindTakeTurn.s deleted file mode 100644 index c2ab56e31b..0000000000 --- a/asm/nonmatchings/code_1A5830/BindTakeTurn.s +++ /dev/null @@ -1,34 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel BindTakeTurn -/* 1A7210 80278930 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1A7214 80278934 AFB20018 */ sw $s2, 0x18($sp) -/* 1A7218 80278938 0080902D */ daddu $s2, $a0, $zero -/* 1A721C 8027893C AFBF001C */ sw $ra, 0x1c($sp) -/* 1A7220 80278940 AFB10014 */ sw $s1, 0x14($sp) -/* 1A7224 80278944 AFB00010 */ sw $s0, 0x10($sp) -/* 1A7228 80278948 8E51000C */ lw $s1, 0xc($s2) -/* 1A722C 8027894C 8E250000 */ lw $a1, ($s1) -/* 1A7230 80278950 0C0B1EAF */ jal get_variable -/* 1A7234 80278954 26310004 */ addiu $s1, $s1, 4 -/* 1A7238 80278958 0040802D */ daddu $s0, $v0, $zero -/* 1A723C 8027895C 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1A7240 80278960 16020002 */ bne $s0, $v0, .L8027896C -/* 1A7244 80278964 00000000 */ nop -/* 1A7248 80278968 8E500148 */ lw $s0, 0x148($s2) -.L8027896C: -/* 1A724C 8027896C 8E250000 */ lw $a1, ($s1) -/* 1A7250 80278970 0C0B1EAF */ jal get_variable -/* 1A7254 80278974 0240202D */ daddu $a0, $s2, $zero -/* 1A7258 80278978 0200202D */ daddu $a0, $s0, $zero -/* 1A725C 8027897C 0C09A75B */ jal get_actor -/* 1A7260 80278980 0040802D */ daddu $s0, $v0, $zero -/* 1A7264 80278984 AC5001C4 */ sw $s0, 0x1c4($v0) -/* 1A7268 80278988 8FBF001C */ lw $ra, 0x1c($sp) -/* 1A726C 8027898C 8FB20018 */ lw $s2, 0x18($sp) -/* 1A7270 80278990 8FB10014 */ lw $s1, 0x14($sp) -/* 1A7274 80278994 8FB00010 */ lw $s0, 0x10($sp) -/* 1A7278 80278998 24020002 */ addiu $v0, $zero, 2 -/* 1A727C 8027899C 03E00008 */ jr $ra -/* 1A7280 802789A0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_1A5830/DispatchEvent.s b/asm/nonmatchings/code_1A5830/DispatchEvent.s deleted file mode 100644 index b5a80b333c..0000000000 --- a/asm/nonmatchings/code_1A5830/DispatchEvent.s +++ /dev/null @@ -1,34 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel DispatchEvent -/* 1ABB44 8027D264 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1ABB48 8027D268 AFB10014 */ sw $s1, 0x14($sp) -/* 1ABB4C 8027D26C 0080882D */ daddu $s1, $a0, $zero -/* 1ABB50 8027D270 AFBF0018 */ sw $ra, 0x18($sp) -/* 1ABB54 8027D274 AFB00010 */ sw $s0, 0x10($sp) -/* 1ABB58 8027D278 8E30000C */ lw $s0, 0xc($s1) -/* 1ABB5C 8027D27C 8E050000 */ lw $a1, ($s0) -/* 1ABB60 8027D280 0C0B1EAF */ jal get_variable -/* 1ABB64 8027D284 26100004 */ addiu $s0, $s0, 4 -/* 1ABB68 8027D288 0040202D */ daddu $a0, $v0, $zero -/* 1ABB6C 8027D28C 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1ABB70 8027D290 14820002 */ bne $a0, $v0, .L8027D29C -/* 1ABB74 8027D294 00000000 */ nop -/* 1ABB78 8027D298 8E240148 */ lw $a0, 0x148($s1) -.L8027D29C: -/* 1ABB7C 8027D29C 0C09A75B */ jal get_actor -/* 1ABB80 8027D2A0 00000000 */ nop -/* 1ABB84 8027D2A4 0220202D */ daddu $a0, $s1, $zero -/* 1ABB88 8027D2A8 8E050000 */ lw $a1, ($s0) -/* 1ABB8C 8027D2AC 0C0B1EAF */ jal get_variable -/* 1ABB90 8027D2B0 0040802D */ daddu $s0, $v0, $zero -/* 1ABB94 8027D2B4 0200202D */ daddu $a0, $s0, $zero -/* 1ABB98 8027D2B8 0C09DC58 */ jal dispatch_event_actor -/* 1ABB9C 8027D2BC 0040282D */ daddu $a1, $v0, $zero -/* 1ABBA0 8027D2C0 8FBF0018 */ lw $ra, 0x18($sp) -/* 1ABBA4 8027D2C4 8FB10014 */ lw $s1, 0x14($sp) -/* 1ABBA8 8027D2C8 8FB00010 */ lw $s0, 0x10($sp) -/* 1ABBAC 8027D2CC 24020002 */ addiu $v0, $zero, 2 -/* 1ABBB0 8027D2D0 03E00008 */ jr $ra -/* 1ABBB4 8027D2D4 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_1A5830/EnableActorBlur.s b/asm/nonmatchings/code_1A5830/EnableActorBlur.s deleted file mode 100644 index e576d3c673..0000000000 --- a/asm/nonmatchings/code_1A5830/EnableActorBlur.s +++ /dev/null @@ -1,51 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel EnableActorBlur -/* 1ABE5C 8027D57C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1ABE60 8027D580 AFB20018 */ sw $s2, 0x18($sp) -/* 1ABE64 8027D584 0080902D */ daddu $s2, $a0, $zero -/* 1ABE68 8027D588 AFBF001C */ sw $ra, 0x1c($sp) -/* 1ABE6C 8027D58C AFB10014 */ sw $s1, 0x14($sp) -/* 1ABE70 8027D590 AFB00010 */ sw $s0, 0x10($sp) -/* 1ABE74 8027D594 8E50000C */ lw $s0, 0xc($s2) -/* 1ABE78 8027D598 8E050000 */ lw $a1, ($s0) -/* 1ABE7C 8027D59C 0C0B1EAF */ jal get_variable -/* 1ABE80 8027D5A0 26100004 */ addiu $s0, $s0, 4 -/* 1ABE84 8027D5A4 0040882D */ daddu $s1, $v0, $zero -/* 1ABE88 8027D5A8 8E050000 */ lw $a1, ($s0) -/* 1ABE8C 8027D5AC 0C0B1EAF */ jal get_variable -/* 1ABE90 8027D5B0 0240202D */ daddu $a0, $s2, $zero -/* 1ABE94 8027D5B4 0040802D */ daddu $s0, $v0, $zero -/* 1ABE98 8027D5B8 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1ABE9C 8027D5BC 16220002 */ bne $s1, $v0, .L8027D5C8 -/* 1ABEA0 8027D5C0 00000000 */ nop -/* 1ABEA4 8027D5C4 8E510148 */ lw $s1, 0x148($s2) -.L8027D5C8: -/* 1ABEA8 8027D5C8 0C09A75B */ jal get_actor -/* 1ABEAC 8027D5CC 0220202D */ daddu $a0, $s1, $zero -/* 1ABEB0 8027D5D0 16000005 */ bnez $s0, .L8027D5E8 -/* 1ABEB4 8027D5D4 0040202D */ daddu $a0, $v0, $zero -/* 1ABEB8 8027D5D8 0C095157 */ jal disable_actor_blur -/* 1ABEBC 8027D5DC 00000000 */ nop -/* 1ABEC0 8027D5E0 0809F583 */ j .L8027D60C -/* 1ABEC4 8027D5E4 00000000 */ nop -.L8027D5E8: -/* 1ABEC8 8027D5E8 24020001 */ addiu $v0, $zero, 1 -/* 1ABECC 8027D5EC 16020005 */ bne $s0, $v0, .L8027D604 -/* 1ABED0 8027D5F0 00000000 */ nop -/* 1ABED4 8027D5F4 0C0950B3 */ jal enable_actor_blur -/* 1ABED8 8027D5F8 00000000 */ nop -/* 1ABEDC 8027D5FC 0809F583 */ j .L8027D60C -/* 1ABEE0 8027D600 00000000 */ nop -.L8027D604: -/* 1ABEE4 8027D604 0C09516B */ jal reset_actor_blur -/* 1ABEE8 8027D608 00000000 */ nop -.L8027D60C: -/* 1ABEEC 8027D60C 8FBF001C */ lw $ra, 0x1c($sp) -/* 1ABEF0 8027D610 8FB20018 */ lw $s2, 0x18($sp) -/* 1ABEF4 8027D614 8FB10014 */ lw $s1, 0x14($sp) -/* 1ABEF8 8027D618 8FB00010 */ lw $s0, 0x10($sp) -/* 1ABEFC 8027D61C 24020002 */ addiu $v0, $zero, 2 -/* 1ABF00 8027D620 03E00008 */ jr $ra -/* 1ABF04 8027D624 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_1A5830/GetActorSize.s b/asm/nonmatchings/code_1A5830/GetActorSize.s deleted file mode 100644 index 436917a4a2..0000000000 --- a/asm/nonmatchings/code_1A5830/GetActorSize.s +++ /dev/null @@ -1,41 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel GetActorSize -/* 1AC1C0 8027D8E0 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 1AC1C4 8027D8E4 AFB10014 */ sw $s1, 0x14($sp) -/* 1AC1C8 8027D8E8 0080882D */ daddu $s1, $a0, $zero -/* 1AC1CC 8027D8EC AFBF0020 */ sw $ra, 0x20($sp) -/* 1AC1D0 8027D8F0 AFB3001C */ sw $s3, 0x1c($sp) -/* 1AC1D4 8027D8F4 AFB20018 */ sw $s2, 0x18($sp) -/* 1AC1D8 8027D8F8 AFB00010 */ sw $s0, 0x10($sp) -/* 1AC1DC 8027D8FC 8E30000C */ lw $s0, 0xc($s1) -/* 1AC1E0 8027D900 8E050000 */ lw $a1, ($s0) -/* 1AC1E4 8027D904 0C0B1EAF */ jal get_variable -/* 1AC1E8 8027D908 26100004 */ addiu $s0, $s0, 4 -/* 1AC1EC 8027D90C 0040202D */ daddu $a0, $v0, $zero -/* 1AC1F0 8027D910 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1AC1F4 8027D914 8E120000 */ lw $s2, ($s0) -/* 1AC1F8 8027D918 14820002 */ bne $a0, $v0, .L8027D924 -/* 1AC1FC 8027D91C 8E130004 */ lw $s3, 4($s0) -/* 1AC200 8027D920 8E240148 */ lw $a0, 0x148($s1) -.L8027D924: -/* 1AC204 8027D924 0C09A75B */ jal get_actor -/* 1AC208 8027D928 00000000 */ nop -/* 1AC20C 8027D92C 0220202D */ daddu $a0, $s1, $zero -/* 1AC210 8027D930 0040802D */ daddu $s0, $v0, $zero -/* 1AC214 8027D934 92060191 */ lbu $a2, 0x191($s0) -/* 1AC218 8027D938 0C0B2026 */ jal set_variable -/* 1AC21C 8027D93C 0240282D */ daddu $a1, $s2, $zero -/* 1AC220 8027D940 0220202D */ daddu $a0, $s1, $zero -/* 1AC224 8027D944 92060190 */ lbu $a2, 0x190($s0) -/* 1AC228 8027D948 0C0B2026 */ jal set_variable -/* 1AC22C 8027D94C 0260282D */ daddu $a1, $s3, $zero -/* 1AC230 8027D950 8FBF0020 */ lw $ra, 0x20($sp) -/* 1AC234 8027D954 8FB3001C */ lw $s3, 0x1c($sp) -/* 1AC238 8027D958 8FB20018 */ lw $s2, 0x18($sp) -/* 1AC23C 8027D95C 8FB10014 */ lw $s1, 0x14($sp) -/* 1AC240 8027D960 8FB00010 */ lw $s0, 0x10($sp) -/* 1AC244 8027D964 24020002 */ addiu $v0, $zero, 2 -/* 1AC248 8027D968 03E00008 */ jr $ra -/* 1AC24C 8027D96C 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/code_1A5830/GetCurrentActorType.s b/asm/nonmatchings/code_1A5830/GetCurrentActorType.s deleted file mode 100644 index 9815b930fa..0000000000 --- a/asm/nonmatchings/code_1A5830/GetCurrentActorType.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel GetCurrentActorType -/* 1AC3B4 8027DAD4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1AC3B8 8027DAD8 AFB10014 */ sw $s1, 0x14($sp) -/* 1AC3BC 8027DADC 0080882D */ daddu $s1, $a0, $zero -/* 1AC3C0 8027DAE0 AFBF0018 */ sw $ra, 0x18($sp) -/* 1AC3C4 8027DAE4 AFB00010 */ sw $s0, 0x10($sp) -/* 1AC3C8 8027DAE8 8E30000C */ lw $s0, 0xc($s1) -/* 1AC3CC 8027DAEC 8E050000 */ lw $a1, ($s0) -/* 1AC3D0 8027DAF0 0C0B1EAF */ jal get_variable -/* 1AC3D4 8027DAF4 26100004 */ addiu $s0, $s0, 4 -/* 1AC3D8 8027DAF8 0040202D */ daddu $a0, $v0, $zero -/* 1AC3DC 8027DAFC 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1AC3E0 8027DB00 14820002 */ bne $a0, $v0, .L8027DB0C -/* 1AC3E4 8027DB04 8E100000 */ lw $s0, ($s0) -/* 1AC3E8 8027DB08 8E240148 */ lw $a0, 0x148($s1) -.L8027DB0C: -/* 1AC3EC 8027DB0C 0C09A75B */ jal get_actor -/* 1AC3F0 8027DB10 00000000 */ nop -/* 1AC3F4 8027DB14 0220202D */ daddu $a0, $s1, $zero -/* 1AC3F8 8027DB18 90460136 */ lbu $a2, 0x136($v0) -/* 1AC3FC 8027DB1C 0C0B2026 */ jal set_variable -/* 1AC400 8027DB20 0200282D */ daddu $a1, $s0, $zero -/* 1AC404 8027DB24 8FBF0018 */ lw $ra, 0x18($sp) -/* 1AC408 8027DB28 8FB10014 */ lw $s1, 0x14($sp) -/* 1AC40C 8027DB2C 8FB00010 */ lw $s0, 0x10($sp) -/* 1AC410 8027DB30 24020002 */ addiu $v0, $zero, 2 -/* 1AC414 8027DB34 03E00008 */ jr $ra -/* 1AC418 8027DB38 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_1A5830/GetEncounterState.s b/asm/nonmatchings/code_1A5830/GetEncounterState.s deleted file mode 100644 index d8eda0f147..0000000000 --- a/asm/nonmatchings/code_1A5830/GetEncounterState.s +++ /dev/null @@ -1,15 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel GetEncounterState -/* 1AC0A4 8027D7C4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 1AC0A8 8027D7C8 AFBF0010 */ sw $ra, 0x10($sp) -/* 1AC0AC 8027D7CC 8C82000C */ lw $v0, 0xc($a0) -/* 1AC0B0 8027D7D0 3C06800B */ lui $a2, 0x800b -/* 1AC0B4 8027D7D4 80C60F15 */ lb $a2, 0xf15($a2) -/* 1AC0B8 8027D7D8 0C0B2026 */ jal set_variable -/* 1AC0BC 8027D7DC 8C450000 */ lw $a1, ($v0) -/* 1AC0C0 8027D7E0 8FBF0010 */ lw $ra, 0x10($sp) -/* 1AC0C4 8027D7E4 24020002 */ addiu $v0, $zero, 2 -/* 1AC0C8 8027D7E8 03E00008 */ jr $ra -/* 1AC0CC 8027D7EC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_1A5830/GetEnemyMaxHP.s b/asm/nonmatchings/code_1A5830/GetEnemyMaxHP.s deleted file mode 100644 index 6ccc453eb3..0000000000 --- a/asm/nonmatchings/code_1A5830/GetEnemyMaxHP.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel GetEnemyMaxHP -/* 1AB028 8027C748 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1AB02C 8027C74C AFB10014 */ sw $s1, 0x14($sp) -/* 1AB030 8027C750 0080882D */ daddu $s1, $a0, $zero -/* 1AB034 8027C754 AFBF0018 */ sw $ra, 0x18($sp) -/* 1AB038 8027C758 AFB00010 */ sw $s0, 0x10($sp) -/* 1AB03C 8027C75C 8E30000C */ lw $s0, 0xc($s1) -/* 1AB040 8027C760 8E050000 */ lw $a1, ($s0) -/* 1AB044 8027C764 0C0B1EAF */ jal get_variable -/* 1AB048 8027C768 26100004 */ addiu $s0, $s0, 4 -/* 1AB04C 8027C76C 0040202D */ daddu $a0, $v0, $zero -/* 1AB050 8027C770 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1AB054 8027C774 14820002 */ bne $a0, $v0, .L8027C780 -/* 1AB058 8027C778 00000000 */ nop -/* 1AB05C 8027C77C 8E240148 */ lw $a0, 0x148($s1) -.L8027C780: -/* 1AB060 8027C780 0C09A75B */ jal get_actor -/* 1AB064 8027C784 8E100000 */ lw $s0, ($s0) -/* 1AB068 8027C788 0220202D */ daddu $a0, $s1, $zero -/* 1AB06C 8027C78C 804601B9 */ lb $a2, 0x1b9($v0) -/* 1AB070 8027C790 0C0B2026 */ jal set_variable -/* 1AB074 8027C794 0200282D */ daddu $a1, $s0, $zero -/* 1AB078 8027C798 8FBF0018 */ lw $ra, 0x18($sp) -/* 1AB07C 8027C79C 8FB10014 */ lw $s1, 0x14($sp) -/* 1AB080 8027C7A0 8FB00010 */ lw $s0, 0x10($sp) -/* 1AB084 8027C7A4 24020002 */ addiu $v0, $zero, 2 -/* 1AB088 8027C7A8 03E00008 */ jr $ra -/* 1AB08C 8027C7AC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_1A5830/GetLastDamage.s b/asm/nonmatchings/code_1A5830/GetLastDamage.s deleted file mode 100644 index e1e2191470..0000000000 --- a/asm/nonmatchings/code_1A5830/GetLastDamage.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel GetLastDamage -/* 1AC41C 8027DB3C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1AC420 8027DB40 AFB10014 */ sw $s1, 0x14($sp) -/* 1AC424 8027DB44 0080882D */ daddu $s1, $a0, $zero -/* 1AC428 8027DB48 AFBF0018 */ sw $ra, 0x18($sp) -/* 1AC42C 8027DB4C AFB00010 */ sw $s0, 0x10($sp) -/* 1AC430 8027DB50 8E30000C */ lw $s0, 0xc($s1) -/* 1AC434 8027DB54 8E050000 */ lw $a1, ($s0) -/* 1AC438 8027DB58 0C0B1EAF */ jal get_variable -/* 1AC43C 8027DB5C 26100004 */ addiu $s0, $s0, 4 -/* 1AC440 8027DB60 0040202D */ daddu $a0, $v0, $zero -/* 1AC444 8027DB64 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1AC448 8027DB68 14820002 */ bne $a0, $v0, .L8027DB74 -/* 1AC44C 8027DB6C 00000000 */ nop -/* 1AC450 8027DB70 8E240148 */ lw $a0, 0x148($s1) -.L8027DB74: -/* 1AC454 8027DB74 0C09A75B */ jal get_actor -/* 1AC458 8027DB78 8E100000 */ lw $s0, ($s0) -/* 1AC45C 8027DB7C 0220202D */ daddu $a0, $s1, $zero -/* 1AC460 8027DB80 844601F8 */ lh $a2, 0x1f8($v0) -/* 1AC464 8027DB84 0C0B2026 */ jal set_variable -/* 1AC468 8027DB88 0200282D */ daddu $a1, $s0, $zero -/* 1AC46C 8027DB8C 8FBF0018 */ lw $ra, 0x18($sp) -/* 1AC470 8027DB90 8FB10014 */ lw $s1, 0x14($sp) -/* 1AC474 8027DB94 8FB00010 */ lw $s0, 0x10($sp) -/* 1AC478 8027DB98 24020002 */ addiu $v0, $zero, 2 -/* 1AC47C 8027DB9C 03E00008 */ jr $ra -/* 1AC480 8027DBA0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_1A5830/GetLastEvent.s b/asm/nonmatchings/code_1A5830/GetLastEvent.s deleted file mode 100644 index 9454a42400..0000000000 --- a/asm/nonmatchings/code_1A5830/GetLastEvent.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel GetLastEvent -/* 1AADC0 8027C4E0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1AADC4 8027C4E4 AFB10014 */ sw $s1, 0x14($sp) -/* 1AADC8 8027C4E8 0080882D */ daddu $s1, $a0, $zero -/* 1AADCC 8027C4EC AFBF0018 */ sw $ra, 0x18($sp) -/* 1AADD0 8027C4F0 AFB00010 */ sw $s0, 0x10($sp) -/* 1AADD4 8027C4F4 8E30000C */ lw $s0, 0xc($s1) -/* 1AADD8 8027C4F8 8E050000 */ lw $a1, ($s0) -/* 1AADDC 8027C4FC 0C0B1EAF */ jal get_variable -/* 1AADE0 8027C500 26100004 */ addiu $s0, $s0, 4 -/* 1AADE4 8027C504 0040202D */ daddu $a0, $v0, $zero -/* 1AADE8 8027C508 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1AADEC 8027C50C 14820002 */ bne $a0, $v0, .L8027C518 -/* 1AADF0 8027C510 00000000 */ nop -/* 1AADF4 8027C514 8E240148 */ lw $a0, 0x148($s1) -.L8027C518: -/* 1AADF8 8027C518 0C09A75B */ jal get_actor -/* 1AADFC 8027C51C 8E100000 */ lw $s0, ($s0) -/* 1AAE00 8027C520 0220202D */ daddu $a0, $s1, $zero -/* 1AAE04 8027C524 804601F0 */ lb $a2, 0x1f0($v0) -/* 1AAE08 8027C528 0C0B2026 */ jal set_variable -/* 1AAE0C 8027C52C 0200282D */ daddu $a1, $s0, $zero -/* 1AAE10 8027C530 8FBF0018 */ lw $ra, 0x18($sp) -/* 1AAE14 8027C534 8FB10014 */ lw $s1, 0x14($sp) -/* 1AAE18 8027C538 8FB00010 */ lw $s0, 0x10($sp) -/* 1AAE1C 8027C53C 24020002 */ addiu $v0, $zero, 2 -/* 1AAE20 8027C540 03E00008 */ jr $ra -/* 1AAE24 8027C544 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_1A5830/GetOriginalActorType.s b/asm/nonmatchings/code_1A5830/GetOriginalActorType.s deleted file mode 100644 index 8371c82970..0000000000 --- a/asm/nonmatchings/code_1A5830/GetOriginalActorType.s +++ /dev/null @@ -1,32 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel GetOriginalActorType -/* 1AC348 8027DA68 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1AC34C 8027DA6C AFB10014 */ sw $s1, 0x14($sp) -/* 1AC350 8027DA70 0080882D */ daddu $s1, $a0, $zero -/* 1AC354 8027DA74 AFBF0018 */ sw $ra, 0x18($sp) -/* 1AC358 8027DA78 AFB00010 */ sw $s0, 0x10($sp) -/* 1AC35C 8027DA7C 8E30000C */ lw $s0, 0xc($s1) -/* 1AC360 8027DA80 8E050000 */ lw $a1, ($s0) -/* 1AC364 8027DA84 0C0B1EAF */ jal get_variable -/* 1AC368 8027DA88 26100004 */ addiu $s0, $s0, 4 -/* 1AC36C 8027DA8C 0040202D */ daddu $a0, $v0, $zero -/* 1AC370 8027DA90 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1AC374 8027DA94 14820002 */ bne $a0, $v0, .L8027DAA0 -/* 1AC378 8027DA98 8E100000 */ lw $s0, ($s0) -/* 1AC37C 8027DA9C 8E240148 */ lw $a0, 0x148($s1) -.L8027DAA0: -/* 1AC380 8027DAA0 0C09A75B */ jal get_actor -/* 1AC384 8027DAA4 00000000 */ nop -/* 1AC388 8027DAA8 8C420008 */ lw $v0, 8($v0) -/* 1AC38C 8027DAAC 0220202D */ daddu $a0, $s1, $zero -/* 1AC390 8027DAB0 90460005 */ lbu $a2, 5($v0) -/* 1AC394 8027DAB4 0C0B2026 */ jal set_variable -/* 1AC398 8027DAB8 0200282D */ daddu $a1, $s0, $zero -/* 1AC39C 8027DABC 8FBF0018 */ lw $ra, 0x18($sp) -/* 1AC3A0 8027DAC0 8FB10014 */ lw $s1, 0x14($sp) -/* 1AC3A4 8027DAC4 8FB00010 */ lw $s0, 0x10($sp) -/* 1AC3A8 8027DAC8 24020002 */ addiu $v0, $zero, 2 -/* 1AC3AC 8027DACC 03E00008 */ jr $ra -/* 1AC3B0 8027DAD0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_1A5830/PauseTakeTurn.s b/asm/nonmatchings/code_1A5830/PauseTakeTurn.s deleted file mode 100644 index 409d4ff13d..0000000000 --- a/asm/nonmatchings/code_1A5830/PauseTakeTurn.s +++ /dev/null @@ -1,35 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel PauseTakeTurn -/* 1A7284 802789A4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1A7288 802789A8 AFB20018 */ sw $s2, 0x18($sp) -/* 1A728C 802789AC 0080902D */ daddu $s2, $a0, $zero -/* 1A7290 802789B0 AFBF001C */ sw $ra, 0x1c($sp) -/* 1A7294 802789B4 AFB10014 */ sw $s1, 0x14($sp) -/* 1A7298 802789B8 AFB00010 */ sw $s0, 0x10($sp) -/* 1A729C 802789BC 8E51000C */ lw $s1, 0xc($s2) -/* 1A72A0 802789C0 8E250000 */ lw $a1, ($s1) -/* 1A72A4 802789C4 0C0B1EAF */ jal get_variable -/* 1A72A8 802789C8 26310004 */ addiu $s1, $s1, 4 -/* 1A72AC 802789CC 0040802D */ daddu $s0, $v0, $zero -/* 1A72B0 802789D0 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1A72B4 802789D4 16020002 */ bne $s0, $v0, .L802789E0 -/* 1A72B8 802789D8 00000000 */ nop -/* 1A72BC 802789DC 8E500148 */ lw $s0, 0x148($s2) -.L802789E0: -/* 1A72C0 802789E0 8E250000 */ lw $a1, ($s1) -/* 1A72C4 802789E4 0C0B1EAF */ jal get_variable -/* 1A72C8 802789E8 0240202D */ daddu $a0, $s2, $zero -/* 1A72CC 802789EC 0C09A75B */ jal get_actor -/* 1A72D0 802789F0 0200202D */ daddu $a0, $s0, $zero -/* 1A72D4 802789F4 8C4401E4 */ lw $a0, 0x1e4($v0) -/* 1A72D8 802789F8 0C0B1108 */ jal suspend_all_script -/* 1A72DC 802789FC 00000000 */ nop -/* 1A72E0 80278A00 8FBF001C */ lw $ra, 0x1c($sp) -/* 1A72E4 80278A04 8FB20018 */ lw $s2, 0x18($sp) -/* 1A72E8 80278A08 8FB10014 */ lw $s1, 0x14($sp) -/* 1A72EC 80278A0C 8FB00010 */ lw $s0, 0x10($sp) -/* 1A72F0 80278A10 24020002 */ addiu $v0, $zero, 2 -/* 1A72F4 80278A14 03E00008 */ jr $ra -/* 1A72F8 80278A18 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_1A5830/ResumeTakeTurn.s b/asm/nonmatchings/code_1A5830/ResumeTakeTurn.s deleted file mode 100644 index 3fbb90c865..0000000000 --- a/asm/nonmatchings/code_1A5830/ResumeTakeTurn.s +++ /dev/null @@ -1,35 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel ResumeTakeTurn -/* 1A72FC 80278A1C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1A7300 80278A20 AFB20018 */ sw $s2, 0x18($sp) -/* 1A7304 80278A24 0080902D */ daddu $s2, $a0, $zero -/* 1A7308 80278A28 AFBF001C */ sw $ra, 0x1c($sp) -/* 1A730C 80278A2C AFB10014 */ sw $s1, 0x14($sp) -/* 1A7310 80278A30 AFB00010 */ sw $s0, 0x10($sp) -/* 1A7314 80278A34 8E51000C */ lw $s1, 0xc($s2) -/* 1A7318 80278A38 8E250000 */ lw $a1, ($s1) -/* 1A731C 80278A3C 0C0B1EAF */ jal get_variable -/* 1A7320 80278A40 26310004 */ addiu $s1, $s1, 4 -/* 1A7324 80278A44 0040802D */ daddu $s0, $v0, $zero -/* 1A7328 80278A48 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1A732C 80278A4C 16020002 */ bne $s0, $v0, .L80278A58 -/* 1A7330 80278A50 00000000 */ nop -/* 1A7334 80278A54 8E500148 */ lw $s0, 0x148($s2) -.L80278A58: -/* 1A7338 80278A58 8E250000 */ lw $a1, ($s1) -/* 1A733C 80278A5C 0C0B1EAF */ jal get_variable -/* 1A7340 80278A60 0240202D */ daddu $a0, $s2, $zero -/* 1A7344 80278A64 0C09A75B */ jal get_actor -/* 1A7348 80278A68 0200202D */ daddu $a0, $s0, $zero -/* 1A734C 80278A6C 8C4401E4 */ lw $a0, 0x1e4($v0) -/* 1A7350 80278A70 0C0B1123 */ jal resume_all_script -/* 1A7354 80278A74 00000000 */ nop -/* 1A7358 80278A78 8FBF001C */ lw $ra, 0x1c($sp) -/* 1A735C 80278A7C 8FB20018 */ lw $s2, 0x18($sp) -/* 1A7360 80278A80 8FB10014 */ lw $s1, 0x14($sp) -/* 1A7364 80278A84 8FB00010 */ lw $s0, 0x10($sp) -/* 1A7368 80278A88 24020002 */ addiu $v0, $zero, 2 -/* 1A736C 80278A8C 03E00008 */ jr $ra -/* 1A7370 80278A90 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_1A5830/SetDefenseTable.s b/asm/nonmatchings/code_1A5830/SetDefenseTable.s deleted file mode 100644 index 51825b4309..0000000000 --- a/asm/nonmatchings/code_1A5830/SetDefenseTable.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel SetDefenseTable -/* 1AB354 8027CA74 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1AB358 8027CA78 AFB10014 */ sw $s1, 0x14($sp) -/* 1AB35C 8027CA7C 0080882D */ daddu $s1, $a0, $zero -/* 1AB360 8027CA80 AFBF001C */ sw $ra, 0x1c($sp) -/* 1AB364 8027CA84 AFB20018 */ sw $s2, 0x18($sp) -/* 1AB368 8027CA88 AFB00010 */ sw $s0, 0x10($sp) -/* 1AB36C 8027CA8C 8E30000C */ lw $s0, 0xc($s1) -/* 1AB370 8027CA90 8E050000 */ lw $a1, ($s0) -/* 1AB374 8027CA94 0C0B1EAF */ jal get_variable -/* 1AB378 8027CA98 26100004 */ addiu $s0, $s0, 4 -/* 1AB37C 8027CA9C 0040902D */ daddu $s2, $v0, $zero -/* 1AB380 8027CAA0 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1AB384 8027CAA4 16420002 */ bne $s2, $v0, .L8027CAB0 -/* 1AB388 8027CAA8 00000000 */ nop -/* 1AB38C 8027CAAC 8E320148 */ lw $s2, 0x148($s1) -.L8027CAB0: -/* 1AB390 8027CAB0 8E050000 */ lw $a1, ($s0) -/* 1AB394 8027CAB4 26100004 */ addiu $s0, $s0, 4 -/* 1AB398 8027CAB8 0C0B1EAF */ jal get_variable -/* 1AB39C 8027CABC 0220202D */ daddu $a0, $s1, $zero -/* 1AB3A0 8027CAC0 0220202D */ daddu $a0, $s1, $zero -/* 1AB3A4 8027CAC4 8E050000 */ lw $a1, ($s0) -/* 1AB3A8 8027CAC8 0C0B1EAF */ jal get_variable -/* 1AB3AC 8027CACC 0040882D */ daddu $s1, $v0, $zero -/* 1AB3B0 8027CAD0 0240202D */ daddu $a0, $s2, $zero -/* 1AB3B4 8027CAD4 0C09A75B */ jal get_actor -/* 1AB3B8 8027CAD8 0040802D */ daddu $s0, $v0, $zero -/* 1AB3BC 8027CADC 0040202D */ daddu $a0, $v0, $zero -/* 1AB3C0 8027CAE0 0C099117 */ jal get_actor_part -/* 1AB3C4 8027CAE4 0220282D */ daddu $a1, $s1, $zero -/* 1AB3C8 8027CAE8 AC500078 */ sw $s0, 0x78($v0) -/* 1AB3CC 8027CAEC 8FBF001C */ lw $ra, 0x1c($sp) -/* 1AB3D0 8027CAF0 8FB20018 */ lw $s2, 0x18($sp) -/* 1AB3D4 8027CAF4 8FB10014 */ lw $s1, 0x14($sp) -/* 1AB3D8 8027CAF8 8FB00010 */ lw $s0, 0x10($sp) -/* 1AB3DC 8027CAFC 24020002 */ addiu $v0, $zero, 2 -/* 1AB3E0 8027CB00 03E00008 */ jr $ra -/* 1AB3E4 8027CB04 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_1A5830/SetIdleAnimations.s b/asm/nonmatchings/code_1A5830/SetIdleAnimations.s deleted file mode 100644 index bce9dcc939..0000000000 --- a/asm/nonmatchings/code_1A5830/SetIdleAnimations.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel SetIdleAnimations -/* 1AB45C 8027CB7C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1AB460 8027CB80 AFB10014 */ sw $s1, 0x14($sp) -/* 1AB464 8027CB84 0080882D */ daddu $s1, $a0, $zero -/* 1AB468 8027CB88 AFBF001C */ sw $ra, 0x1c($sp) -/* 1AB46C 8027CB8C AFB20018 */ sw $s2, 0x18($sp) -/* 1AB470 8027CB90 AFB00010 */ sw $s0, 0x10($sp) -/* 1AB474 8027CB94 8E30000C */ lw $s0, 0xc($s1) -/* 1AB478 8027CB98 8E050000 */ lw $a1, ($s0) -/* 1AB47C 8027CB9C 0C0B1EAF */ jal get_variable -/* 1AB480 8027CBA0 26100004 */ addiu $s0, $s0, 4 -/* 1AB484 8027CBA4 0040902D */ daddu $s2, $v0, $zero -/* 1AB488 8027CBA8 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1AB48C 8027CBAC 16420002 */ bne $s2, $v0, .L8027CBB8 -/* 1AB490 8027CBB0 00000000 */ nop -/* 1AB494 8027CBB4 8E320148 */ lw $s2, 0x148($s1) -.L8027CBB8: -/* 1AB498 8027CBB8 8E050000 */ lw $a1, ($s0) -/* 1AB49C 8027CBBC 26100004 */ addiu $s0, $s0, 4 -/* 1AB4A0 8027CBC0 0C0B1EAF */ jal get_variable -/* 1AB4A4 8027CBC4 0220202D */ daddu $a0, $s1, $zero -/* 1AB4A8 8027CBC8 0220202D */ daddu $a0, $s1, $zero -/* 1AB4AC 8027CBCC 8E050000 */ lw $a1, ($s0) -/* 1AB4B0 8027CBD0 0C0B1EAF */ jal get_variable -/* 1AB4B4 8027CBD4 0040882D */ daddu $s1, $v0, $zero -/* 1AB4B8 8027CBD8 0240202D */ daddu $a0, $s2, $zero -/* 1AB4BC 8027CBDC 0C09A75B */ jal get_actor -/* 1AB4C0 8027CBE0 0040802D */ daddu $s0, $v0, $zero -/* 1AB4C4 8027CBE4 0040202D */ daddu $a0, $v0, $zero -/* 1AB4C8 8027CBE8 0C099117 */ jal get_actor_part -/* 1AB4CC 8027CBEC 0220282D */ daddu $a1, $s1, $zero -/* 1AB4D0 8027CBF0 AC500094 */ sw $s0, 0x94($v0) -/* 1AB4D4 8027CBF4 8FBF001C */ lw $ra, 0x1c($sp) -/* 1AB4D8 8027CBF8 8FB20018 */ lw $s2, 0x18($sp) -/* 1AB4DC 8027CBFC 8FB10014 */ lw $s1, 0x14($sp) -/* 1AB4E0 8027CC00 8FB00010 */ lw $s0, 0x10($sp) -/* 1AB4E4 8027CC04 24020002 */ addiu $v0, $zero, 2 -/* 1AB4E8 8027CC08 03E00008 */ jr $ra -/* 1AB4EC 8027CC0C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_1A5830/SetStatusTable.s b/asm/nonmatchings/code_1A5830/SetStatusTable.s deleted file mode 100644 index c3e737059e..0000000000 --- a/asm/nonmatchings/code_1A5830/SetStatusTable.s +++ /dev/null @@ -1,34 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel SetStatusTable -/* 1AB3E8 8027CB08 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1AB3EC 8027CB0C AFB20018 */ sw $s2, 0x18($sp) -/* 1AB3F0 8027CB10 0080902D */ daddu $s2, $a0, $zero -/* 1AB3F4 8027CB14 AFBF001C */ sw $ra, 0x1c($sp) -/* 1AB3F8 8027CB18 AFB10014 */ sw $s1, 0x14($sp) -/* 1AB3FC 8027CB1C AFB00010 */ sw $s0, 0x10($sp) -/* 1AB400 8027CB20 8E51000C */ lw $s1, 0xc($s2) -/* 1AB404 8027CB24 8E250000 */ lw $a1, ($s1) -/* 1AB408 8027CB28 0C0B1EAF */ jal get_variable -/* 1AB40C 8027CB2C 26310004 */ addiu $s1, $s1, 4 -/* 1AB410 8027CB30 0040802D */ daddu $s0, $v0, $zero -/* 1AB414 8027CB34 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1AB418 8027CB38 16020002 */ bne $s0, $v0, .L8027CB44 -/* 1AB41C 8027CB3C 00000000 */ nop -/* 1AB420 8027CB40 8E500148 */ lw $s0, 0x148($s2) -.L8027CB44: -/* 1AB424 8027CB44 8E250000 */ lw $a1, ($s1) -/* 1AB428 8027CB48 0C0B1EAF */ jal get_variable -/* 1AB42C 8027CB4C 0240202D */ daddu $a0, $s2, $zero -/* 1AB430 8027CB50 0200202D */ daddu $a0, $s0, $zero -/* 1AB434 8027CB54 0C09A75B */ jal get_actor -/* 1AB438 8027CB58 0040802D */ daddu $s0, $v0, $zero -/* 1AB43C 8027CB5C AC50020C */ sw $s0, 0x20c($v0) -/* 1AB440 8027CB60 8FBF001C */ lw $ra, 0x1c($sp) -/* 1AB444 8027CB64 8FB20018 */ lw $s2, 0x18($sp) -/* 1AB448 8027CB68 8FB10014 */ lw $s1, 0x14($sp) -/* 1AB44C 8027CB6C 8FB00010 */ lw $s0, 0x10($sp) -/* 1AB450 8027CB70 24020002 */ addiu $v0, $zero, 2 -/* 1AB454 8027CB74 03E00008 */ jr $ra -/* 1AB458 8027CB78 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_1A5830/SetTargetActor.s b/asm/nonmatchings/code_1A5830/SetTargetActor.s deleted file mode 100644 index 63ab17840d..0000000000 --- a/asm/nonmatchings/code_1A5830/SetTargetActor.s +++ /dev/null @@ -1,37 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel SetTargetActor -/* 1AAE28 8027C548 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1AAE2C 8027C54C AFB20018 */ sw $s2, 0x18($sp) -/* 1AAE30 8027C550 0080902D */ daddu $s2, $a0, $zero -/* 1AAE34 8027C554 AFBF001C */ sw $ra, 0x1c($sp) -/* 1AAE38 8027C558 AFB10014 */ sw $s1, 0x14($sp) -/* 1AAE3C 8027C55C AFB00010 */ sw $s0, 0x10($sp) -/* 1AAE40 8027C560 8E51000C */ lw $s1, 0xc($s2) -/* 1AAE44 8027C564 8E250000 */ lw $a1, ($s1) -/* 1AAE48 8027C568 0C0B1EAF */ jal get_variable -/* 1AAE4C 8027C56C 26310004 */ addiu $s1, $s1, 4 -/* 1AAE50 8027C570 0040802D */ daddu $s0, $v0, $zero -/* 1AAE54 8027C574 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1AAE58 8027C578 16020002 */ bne $s0, $v0, .L8027C584 -/* 1AAE5C 8027C57C 00000000 */ nop -/* 1AAE60 8027C580 8E500148 */ lw $s0, 0x148($s2) -.L8027C584: -/* 1AAE64 8027C584 8E250000 */ lw $a1, ($s1) -/* 1AAE68 8027C588 0C0B1EAF */ jal get_variable -/* 1AAE6C 8027C58C 0240202D */ daddu $a0, $s2, $zero -/* 1AAE70 8027C590 0200202D */ daddu $a0, $s0, $zero -/* 1AAE74 8027C594 0C09A75B */ jal get_actor -/* 1AAE78 8027C598 0040802D */ daddu $s0, $v0, $zero -/* 1AAE7C 8027C59C 0040202D */ daddu $a0, $v0, $zero -/* 1AAE80 8027C5A0 24030001 */ addiu $v1, $zero, 1 -/* 1AAE84 8027C5A4 A4900428 */ sh $s0, 0x428($a0) -/* 1AAE88 8027C5A8 A0830426 */ sb $v1, 0x426($a0) -/* 1AAE8C 8027C5AC 8FBF001C */ lw $ra, 0x1c($sp) -/* 1AAE90 8027C5B0 8FB20018 */ lw $s2, 0x18($sp) -/* 1AAE94 8027C5B4 8FB10014 */ lw $s1, 0x14($sp) -/* 1AAE98 8027C5B8 8FB00010 */ lw $s0, 0x10($sp) -/* 1AAE9C 8027C5BC 24020002 */ addiu $v0, $zero, 2 -/* 1AAEA0 8027C5C0 03E00008 */ jr $ra -/* 1AAEA4 8027C5C4 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_1A5830/YieldTurn.s b/asm/nonmatchings/code_1A5830/YieldTurn.s deleted file mode 100644 index 992efb7cff..0000000000 --- a/asm/nonmatchings/code_1A5830/YieldTurn.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel YieldTurn -/* 1AC0D0 8027D7F0 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 1AC0D4 8027D7F4 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) -/* 1AC0D8 8027D7F8 8C430000 */ lw $v1, ($v0) -/* 1AC0DC 8027D7FC 3C040020 */ lui $a0, 0x20 -/* 1AC0E0 8027D800 00641825 */ or $v1, $v1, $a0 -/* 1AC0E4 8027D804 AC430000 */ sw $v1, ($v0) -/* 1AC0E8 8027D808 03E00008 */ jr $ra -/* 1AC0EC 8027D80C 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/code_1A5830/func_8027D2D8.s b/asm/nonmatchings/code_1A5830/func_8027D2D8.s deleted file mode 100644 index 829c5faf66..0000000000 --- a/asm/nonmatchings/code_1A5830/func_8027D2D8.s +++ /dev/null @@ -1,26 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8027D2D8 -/* 1ABBB8 8027D2D8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 1ABBBC 8027D2DC AFB00010 */ sw $s0, 0x10($sp) -/* 1ABBC0 8027D2E0 0080802D */ daddu $s0, $a0, $zero -/* 1ABBC4 8027D2E4 AFBF0014 */ sw $ra, 0x14($sp) -/* 1ABBC8 8027D2E8 8E02000C */ lw $v0, 0xc($s0) -/* 1ABBCC 8027D2EC 0C0B1EAF */ jal get_variable -/* 1ABBD0 8027D2F0 8C450000 */ lw $a1, ($v0) -/* 1ABBD4 8027D2F4 0040202D */ daddu $a0, $v0, $zero -/* 1ABBD8 8027D2F8 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1ABBDC 8027D2FC 14820002 */ bne $a0, $v0, .L8027D308 -/* 1ABBE0 8027D300 00000000 */ nop -/* 1ABBE4 8027D304 8E040148 */ lw $a0, 0x148($s0) -.L8027D308: -/* 1ABBE8 8027D308 0C09A75B */ jal get_actor -/* 1ABBEC 8027D30C 00000000 */ nop -/* 1ABBF0 8027D310 0C099AB7 */ jal func_80266ADC -/* 1ABBF4 8027D314 0040202D */ daddu $a0, $v0, $zero -/* 1ABBF8 8027D318 8FBF0014 */ lw $ra, 0x14($sp) -/* 1ABBFC 8027D31C 8FB00010 */ lw $s0, 0x10($sp) -/* 1ABC00 8027D320 24020002 */ addiu $v0, $zero, 2 -/* 1ABC04 8027D324 03E00008 */ jr $ra -/* 1ABC08 8027D328 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_1A5830/func_8027D32C.s b/asm/nonmatchings/code_1A5830/func_8027D32C.s deleted file mode 100644 index 328559294f..0000000000 --- a/asm/nonmatchings/code_1A5830/func_8027D32C.s +++ /dev/null @@ -1,26 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8027D32C -/* 1ABC0C 8027D32C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 1ABC10 8027D330 AFB00010 */ sw $s0, 0x10($sp) -/* 1ABC14 8027D334 0080802D */ daddu $s0, $a0, $zero -/* 1ABC18 8027D338 AFBF0014 */ sw $ra, 0x14($sp) -/* 1ABC1C 8027D33C 8E02000C */ lw $v0, 0xc($s0) -/* 1ABC20 8027D340 0C0B1EAF */ jal get_variable -/* 1ABC24 8027D344 8C450000 */ lw $a1, ($v0) -/* 1ABC28 8027D348 0040202D */ daddu $a0, $v0, $zero -/* 1ABC2C 8027D34C 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1ABC30 8027D350 14820002 */ bne $a0, $v0, .L8027D35C -/* 1ABC34 8027D354 00000000 */ nop -/* 1ABC38 8027D358 8E040148 */ lw $a0, 0x148($s0) -.L8027D35C: -/* 1ABC3C 8027D35C 0C09A75B */ jal get_actor -/* 1ABC40 8027D360 00000000 */ nop -/* 1ABC44 8027D364 0C099ABE */ jal func_80266AF8 -/* 1ABC48 8027D368 0040202D */ daddu $a0, $v0, $zero -/* 1ABC4C 8027D36C 8FBF0014 */ lw $ra, 0x14($sp) -/* 1ABC50 8027D370 8FB00010 */ lw $s0, 0x10($sp) -/* 1ABC54 8027D374 24020002 */ addiu $v0, $zero, 2 -/* 1ABC58 8027D378 03E00008 */ jr $ra -/* 1ABC5C 8027D37C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_1A5830/func_8027D628.s b/asm/nonmatchings/code_1A5830/func_8027D628.s deleted file mode 100644 index fe5b4137b0..0000000000 --- a/asm/nonmatchings/code_1A5830/func_8027D628.s +++ /dev/null @@ -1,26 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8027D628 -/* 1ABF08 8027D628 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 1ABF0C 8027D62C AFB00010 */ sw $s0, 0x10($sp) -/* 1ABF10 8027D630 0080802D */ daddu $s0, $a0, $zero -/* 1ABF14 8027D634 AFBF0014 */ sw $ra, 0x14($sp) -/* 1ABF18 8027D638 8E02000C */ lw $v0, 0xc($s0) -/* 1ABF1C 8027D63C 0C0B1EAF */ jal get_variable -/* 1ABF20 8027D640 8C450000 */ lw $a1, ($v0) -/* 1ABF24 8027D644 0040202D */ daddu $a0, $v0, $zero -/* 1ABF28 8027D648 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1ABF2C 8027D64C 14820002 */ bne $a0, $v0, .L8027D658 -/* 1ABF30 8027D650 00000000 */ nop -/* 1ABF34 8027D654 8E040148 */ lw $a0, 0x148($s0) -.L8027D658: -/* 1ABF38 8027D658 0C09A75B */ jal get_actor -/* 1ABF3C 8027D65C 00000000 */ nop -/* 1ABF40 8027D660 0C095184 */ jal func_80254610 -/* 1ABF44 8027D664 0040202D */ daddu $a0, $v0, $zero -/* 1ABF48 8027D668 8FBF0014 */ lw $ra, 0x14($sp) -/* 1ABF4C 8027D66C 8FB00010 */ lw $s0, 0x10($sp) -/* 1ABF50 8027D670 24020002 */ addiu $v0, $zero, 2 -/* 1ABF54 8027D674 03E00008 */ jr $ra -/* 1ABF58 8027D678 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_1A5830/func_8027D75C.s b/asm/nonmatchings/code_1A5830/func_8027D75C.s deleted file mode 100644 index 3b9a5ae834..0000000000 --- a/asm/nonmatchings/code_1A5830/func_8027D75C.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8027D75C -/* 1AC03C 8027D75C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1AC040 8027D760 AFB10014 */ sw $s1, 0x14($sp) -/* 1AC044 8027D764 0080882D */ daddu $s1, $a0, $zero -/* 1AC048 8027D768 AFBF0018 */ sw $ra, 0x18($sp) -/* 1AC04C 8027D76C AFB00010 */ sw $s0, 0x10($sp) -/* 1AC050 8027D770 8E30000C */ lw $s0, 0xc($s1) -/* 1AC054 8027D774 8E050000 */ lw $a1, ($s0) -/* 1AC058 8027D778 0C0B1EAF */ jal get_variable -/* 1AC05C 8027D77C 26100004 */ addiu $s0, $s0, 4 -/* 1AC060 8027D780 0040202D */ daddu $a0, $v0, $zero -/* 1AC064 8027D784 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1AC068 8027D788 14820002 */ bne $a0, $v0, .L8027D794 -/* 1AC06C 8027D78C 8E100000 */ lw $s0, ($s0) -/* 1AC070 8027D790 8E240148 */ lw $a0, 0x148($s1) -.L8027D794: -/* 1AC074 8027D794 0C09A75B */ jal get_actor -/* 1AC078 8027D798 00000000 */ nop -/* 1AC07C 8027D79C 0220202D */ daddu $a0, $s1, $zero -/* 1AC080 8027D7A0 80460208 */ lb $a2, 0x208($v0) -/* 1AC084 8027D7A4 0C0B2026 */ jal set_variable -/* 1AC088 8027D7A8 0200282D */ daddu $a1, $s0, $zero -/* 1AC08C 8027D7AC 8FBF0018 */ lw $ra, 0x18($sp) -/* 1AC090 8027D7B0 8FB10014 */ lw $s1, 0x14($sp) -/* 1AC094 8027D7B4 8FB00010 */ lw $s0, 0x10($sp) -/* 1AC098 8027D7B8 24020002 */ addiu $v0, $zero, 2 -/* 1AC09C 8027D7BC 03E00008 */ jr $ra -/* 1AC0A0 8027D7C0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_1a1f0_len_5390/func_8003EE98.s b/asm/nonmatchings/code_1a1f0_len_5390/func_8003EE98.s deleted file mode 100644 index 89cbcd4459..0000000000 --- a/asm/nonmatchings/code_1a1f0_len_5390/func_8003EE98.s +++ /dev/null @@ -1,18 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8003EE98 -/* 1A298 8003EE98 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 1A29C 8003EE9C 10A00004 */ beqz $a1, .L8003EEB0 -/* 1A2A0 8003EEA0 AFBF0010 */ sw $ra, 0x10($sp) -/* 1A2A4 8003EEA4 0000202D */ daddu $a0, $zero, $zero -/* 1A2A8 8003EEA8 0C011740 */ jal func_80045D00 -/* 1A2AC 8003EEAC 2405003C */ addiu $a1, $zero, 0x3c -.L8003EEB0: -/* 1A2B0 8003EEB0 0C0117E9 */ jal func_80045FA4 -/* 1A2B4 8003EEB4 00000000 */ nop -/* 1A2B8 8003EEB8 2C420001 */ sltiu $v0, $v0, 1 -/* 1A2BC 8003EEBC 8FBF0010 */ lw $ra, 0x10($sp) -/* 1A2C0 8003EEC0 00021040 */ sll $v0, $v0, 1 -/* 1A2C4 8003EEC4 03E00008 */ jr $ra -/* 1A2C8 8003EEC8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_1a1f0_len_5390/func_8003EECC.s b/asm/nonmatchings/code_1a1f0_len_5390/func_8003EECC.s deleted file mode 100644 index ab8c1c717a..0000000000 --- a/asm/nonmatchings/code_1a1f0_len_5390/func_8003EECC.s +++ /dev/null @@ -1,18 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8003EECC -/* 1A2CC 8003EECC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 1A2D0 8003EED0 10A00004 */ beqz $a1, .L8003EEE4 -/* 1A2D4 8003EED4 AFBF0010 */ sw $ra, 0x10($sp) -/* 1A2D8 8003EED8 24040001 */ addiu $a0, $zero, 1 -/* 1A2DC 8003EEDC 0C011740 */ jal func_80045D00 -/* 1A2E0 8003EEE0 2405003C */ addiu $a1, $zero, 0x3c -.L8003EEE4: -/* 1A2E4 8003EEE4 0C0117E9 */ jal func_80045FA4 -/* 1A2E8 8003EEE8 00000000 */ nop -/* 1A2EC 8003EEEC 2C420001 */ sltiu $v0, $v0, 1 -/* 1A2F0 8003EEF0 8FBF0010 */ lw $ra, 0x10($sp) -/* 1A2F4 8003EEF4 00021040 */ sll $v0, $v0, 1 -/* 1A2F8 8003EEF8 03E00008 */ jr $ra -/* 1A2FC 8003EEFC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_1a1f0_len_5390/func_8003F018.s b/asm/nonmatchings/code_1a1f0_len_5390/func_8003F018.s deleted file mode 100644 index e7a14ad239..0000000000 --- a/asm/nonmatchings/code_1a1f0_len_5390/func_8003F018.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8003F018 -/* 1A418 8003F018 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1A41C 8003F01C AFB00010 */ sw $s0, 0x10($sp) -/* 1A420 8003F020 00A0802D */ daddu $s0, $a1, $zero -/* 1A424 8003F024 2404FFF6 */ addiu $a0, $zero, -0xa -/* 1A428 8003F028 AFBF0018 */ sw $ra, 0x18($sp) -/* 1A42C 8003F02C 0C00EABB */ jal get_npc_unsafe -/* 1A430 8003F030 AFB10014 */ sw $s1, 0x14($sp) -/* 1A434 8003F034 12000004 */ beqz $s0, .L8003F048 -/* 1A438 8003F038 0040882D */ daddu $s1, $v0, $zero -/* 1A43C 8003F03C 0C05272D */ jal play_sound -/* 1A440 8003F040 2404024B */ addiu $a0, $zero, 0x24b -/* 1A444 8003F044 A22000AC */ sb $zero, 0xac($s1) -.L8003F048: -/* 1A448 8003F048 922200AC */ lbu $v0, 0xac($s1) -/* 1A44C 8003F04C 24420011 */ addiu $v0, $v0, 0x11 -/* 1A450 8003F050 A22200AC */ sb $v0, 0xac($s1) -/* 1A454 8003F054 304200FF */ andi $v0, $v0, 0xff -/* 1A458 8003F058 2C4200FF */ sltiu $v0, $v0, 0xff -/* 1A45C 8003F05C 14400004 */ bnez $v0, .L8003F070 -/* 1A460 8003F060 0000102D */ daddu $v0, $zero, $zero -/* 1A464 8003F064 240200FF */ addiu $v0, $zero, 0xff -/* 1A468 8003F068 A22200AC */ sb $v0, 0xac($s1) -/* 1A46C 8003F06C 24020001 */ addiu $v0, $zero, 1 -.L8003F070: -/* 1A470 8003F070 8FBF0018 */ lw $ra, 0x18($sp) -/* 1A474 8003F074 8FB10014 */ lw $s1, 0x14($sp) -/* 1A478 8003F078 8FB00010 */ lw $s0, 0x10($sp) -/* 1A47C 8003F07C 03E00008 */ jr $ra -/* 1A480 8003F080 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/include/common_structs.h b/include/common_structs.h index 007d2052f5..964fa398e2 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -112,7 +112,9 @@ typedef struct Npc { /* 0x0A6 */ s16 collisionRadius; /* 0x0A8 */ s16 collisionHeight; /* 0x0AA */ u8 renderMode; - /* 0x0AB */ char unk_AB[661]; + /* 0x0AB */ char unk_AB; + /* 0x0AC */ u8 unk_AC; + /* 0x0AD */ char unk_AD[659]; } Npc; // size = 0x340 typedef Npc* NpcList[MAX_NPCS]; @@ -1234,7 +1236,7 @@ typedef struct Actor { /* 0x19C */ s32 actorTypeData1[6]; /* 4 = jump sound */ /* 0x1B4 */ s16 actorTypeData1b[2]; /* 0x1B8 */ u8 currentHP; - /* 0x1B9 */ u8 maxHP; + /* 0x1B9 */ s8 maxHP; /* 0x1BA */ char unk_1BA[2]; /* 0x1BC */ u8 hpFraction; /* used to render HP bar */ /* 0x1BD */ char unk_1BD[3]; @@ -1250,7 +1252,7 @@ typedef struct Actor { /* 0x1E4 */ ScriptID takeTurnID; /* 0x1E8 */ ScriptID onHitID; /* 0x1EC */ ScriptID onTurnChangeID; - /* 0x1F0 */ u8 lastEventType; + /* 0x1F0 */ s8 lastEventType; /* 0x1F1 */ u8 turnPriority; /* 0x1F2 */ u8 enemyIndex; /* actorID = this | 200 */ /* 0x1F3 */ u8 numParts; @@ -1260,7 +1262,8 @@ typedef struct Actor { /* 0x1FC */ s16 damageCounter; /* 0x1FE */ char unk_1FE[9]; /* 0x207 */ u8 extraCoinBonus; - /* 0x208 */ char unk_208[4]; + /* 0x208 */ s8 unk_208; + /* 0x209 */ char unk_209[3]; /* 0x20C */ u32* statusTable; /* 0x210 */ u8 debuff; /* 0x211 */ s8 debuffDuration; diff --git a/src/code_1A5830.c b/src/code_1A5830.c index 673fe07dc7..951d3c4ba7 100644 --- a/src/code_1A5830.c +++ b/src/code_1A5830.c @@ -18,19 +18,77 @@ INCLUDE_ASM(s32, "code_1A5830", dispatch_damage_event_actor_0); INCLUDE_ASM(s32, "code_1A5830", dispatch_damage_event_actor_1); -INCLUDE_ASM(s32, "code_1A5830", BindTakeTurn); +ApiStatus BindTakeTurn(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorId actorID = get_variable(script, *args++); + s32 var1; -INCLUDE_ASM(s32, "code_1A5830", PauseTakeTurn); + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } -INCLUDE_ASM(s32, "code_1A5830", ResumeTakeTurn); + var1 = get_variable(script, *args++); + get_actor(actorID)->takeTurnCode = var1; + return ApiStatus_DONE2; +} + +ApiStatus PauseTakeTurn(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorId actorID = get_variable(script, *args++); + + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } + + get_variable(script, *args++); + suspend_all_script(get_actor(actorID)->takeTurnID); + return ApiStatus_DONE2; +} + +ApiStatus ResumeTakeTurn(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorId actorID = get_variable(script, *args++); + + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } + + get_variable(script, *args++); + resume_all_script(get_actor(actorID)->takeTurnID); + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_1A5830", BindIdle); INCLUDE_ASM(s32, "code_1A5830", EnableIdleScript); -INCLUDE_ASM(s32, "code_1A5830", BindHandleEvent); +ApiStatus BindHandleEvent(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorId actorID = get_variable(script, *args++); + s32 var1; -INCLUDE_ASM(s32, "code_1A5830", BindNextTurn); + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } + + var1 = get_variable(script, *args++); + get_actor(actorID)->onHitCode = var1; + return ApiStatus_DONE2; +} + +ApiStatus BindNextTurn(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorId actorID = get_variable(script, *args++); + s32 var1; + + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } + + var1 = get_variable(script, *args++); + get_actor(actorID)->onTurnChangeCode = var1; + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_1A5830", JumpToGoal); @@ -64,25 +122,104 @@ INCLUDE_ASM(s32, "code_1A5830", IdleFlyToGoal); INCLUDE_ASM(s32, "code_1A5830", FlyPartTo); -INCLUDE_ASM(s32, "code_1A5830", GetLastEvent); +ApiStatus GetLastEvent(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorId actorID = get_variable(script, *args++); + s32 outVar; -INCLUDE_ASM(s32, "code_1A5830", SetTargetActor); + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } + + outVar = *args++; + set_variable(script, outVar, get_actor(actorID)->lastEventType); + return ApiStatus_DONE2; +} + +ApiStatus SetTargetActor(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorId actorID = get_variable(script, *args++); + s32 targetActorID; + Actor* actor; + + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } + + targetActorID = get_variable(script, *args++); + actor = get_actor(actorID); + actor->targetActorID = targetActorID; + actor->targetPartIndex = 1; + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_1A5830", SetEnemyHP); INCLUDE_ASM(s32, "code_1A5830", GetActorHP); -INCLUDE_ASM(s32, "code_1A5830", GetEnemyMaxHP); +ApiStatus GetEnemyMaxHP(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorId actorID = get_variable(script, *args++); + s32 outVar; + + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } + + outVar = *args++; + set_variable(script, outVar, get_actor(actorID)->maxHP); + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_1A5830", RemoveActor); INCLUDE_ASM(s32, "code_1A5830", DropStarPoints); -INCLUDE_ASM(s32, "code_1A5830", SetDefenseTable); +ApiStatus SetDefenseTable(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorId actorID = get_variable(script, *args++); + s32 var1; + s32 var2; -INCLUDE_ASM(s32, "code_1A5830", SetStatusTable); + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } -INCLUDE_ASM(s32, "code_1A5830", SetIdleAnimations); + var1 = get_variable(script, *args++); + var2 = get_variable(script, *args++); + get_actor_part(get_actor(actorID), var1)->defenseTable = var2; + return ApiStatus_DONE2; +} + +ApiStatus SetStatusTable(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorId actorID = get_variable(script, *args++); + s32 var1; + + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } + + var1 = get_variable(script, *args++); + get_actor(actorID)->statusTable = var1; + return ApiStatus_DONE2; +} + +ApiStatus SetIdleAnimations(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorId actorID = get_variable(script, *args++); + s32 var1; + s32 var2; + + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } + + var1 = get_variable(script, *args++); + var2 = get_variable(script, *args++); + get_actor_part(get_actor(actorID), var1)->idleAnimations = var2; + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_1A5830", func_8027CC10); @@ -94,11 +231,39 @@ INCLUDE_ASM(s32, "code_1A5830", EnemyTestTarget); INCLUDE_ASM(s32, "code_1A5830", DispatchDamageEvent); -INCLUDE_ASM(s32, "code_1A5830", DispatchEvent); +ApiStatus DispatchEvent(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorId actorID = get_variable(script, *args++); -INCLUDE_ASM(s32, "code_1A5830", func_8027D2D8); + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } -INCLUDE_ASM(s32, "code_1A5830", func_8027D32C); + dispatch_event_actor(get_actor(actorID), get_variable(script, *args++)); + return ApiStatus_DONE2; +} + +ApiStatus func_8027D2D8(ScriptInstance* script, s32 isInitialCall) { + ActorId actorID = get_variable(script, *script->ptrReadPos); + + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } + + func_80266ADC(get_actor(actorID)); + return ApiStatus_DONE2; +} + +ApiStatus func_8027D32C(ScriptInstance* script, s32 isInitialCall) { + ActorId actorID = get_variable(script, *script->ptrReadPos); + + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } + + func_80266AF8(get_actor(actorID)); + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_1A5830", SetTargetOffset); @@ -106,29 +271,124 @@ INCLUDE_ASM(s32, "code_1A5830", func_8027D434); INCLUDE_ASM(s32, "code_1A5830", func_8027D4C8); -INCLUDE_ASM(s32, "code_1A5830", EnableActorBlur); +ApiStatus EnableActorBlur(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorId actorID = get_variable(script, *args++); + s32 var1 = get_variable(script, *args++); + Actor* actor; -INCLUDE_ASM(s32, "code_1A5830", func_8027D628); + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } + + actor = get_actor(actorID); + + if (var1 == 0) { + disable_actor_blur(actor); + } else if (var1 == 1) { + enable_actor_blur(actor); + } else { + reset_actor_blur(actor); + } + return ApiStatus_DONE2; +} + +ApiStatus func_8027D628(ScriptInstance* script, s32 isInitialCall) { + ActorId actorID = get_variable(script, *script->ptrReadPos); + + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } + + func_80254610(get_actor(actorID)); + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_1A5830", AfflictActor); -INCLUDE_ASM(s32, "code_1A5830", func_8027D75C); +ApiStatus func_8027D75C(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorId actorID = get_variable(script, *args++); + s32 outVar = *args++; -INCLUDE_ASM(s32, "code_1A5830", GetEncounterState); + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } -INCLUDE_ASM(s32, "code_1A5830", YieldTurn); + set_variable(script, outVar, get_actor(actorID)->unk_208); + return ApiStatus_DONE2; +} + +ApiStatus GetEncounterState(ScriptInstance* script, s32 isInitialCall) { + set_variable(script, *script->ptrReadPos, gCurrentEncounter.hitType); + return ApiStatus_DONE2; +} + +ApiStatus YieldTurn(ScriptInstance* script, s32 isInitialCall) { + gBattleStatus.flags1 |= 0x200000; + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_1A5830", SetActorSize); -INCLUDE_ASM(s32, "code_1A5830", GetActorSize); +ApiStatus GetActorSize(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorId actorID = get_variable(script, *args++); + s32 outY = *args++; + s32 outX = *args++; + Actor* actor; + + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } + + actor = get_actor(actorID); + set_variable(script, outY, actor->size.y); + set_variable(script, outX, actor->size.x); + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_1A5830", SetPartSize); -INCLUDE_ASM(s32, "code_1A5830", GetOriginalActorType); +ApiStatus GetOriginalActorType(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorId actorID = get_variable(script, *args++); + s32 outVar = *args++; -INCLUDE_ASM(s32, "code_1A5830", GetCurrentActorType); + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } -INCLUDE_ASM(s32, "code_1A5830", GetLastDamage); + set_variable(script, outVar, get_actor(actorID)->staticActorData->type); + return ApiStatus_DONE2; +} + +ApiStatus GetCurrentActorType(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorId actorID = get_variable(script, *args++); + s32 outVar = *args++; + + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } + + set_variable(script, outVar, get_actor(actorID)->actorType); + return ApiStatus_DONE2; +} + +ApiStatus GetLastDamage(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorId actorID = get_variable(script, *args++); + s32 outVar; + + if (actorID == ActorId_SELF) { + actorID = script->owner1.actorID; + } + outVar = *args++; + + set_variable(script, outVar, get_actor(actorID)->lastDamageTaken); + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_1A5830", EnableActorGlow); diff --git a/src/code_1a1f0_len_5390.c b/src/code_1a1f0_len_5390.c index 99178293ae..ea3e0e9fe9 100644 --- a/src/code_1a1f0_len_5390.c +++ b/src/code_1a1f0_len_5390.c @@ -27,9 +27,19 @@ void set_defeated(s32 mapID, s32 encounterID) { currentEncounter->defeatFlags[mapID][encounterIdx] |= (1 << encounterShift);*/ } -INCLUDE_ASM(s32, "code_1a1f0_len_5390", func_8003EE98); +ApiStatus func_8003EE98(ScriptInstance* script, s32 isInitialCall) { + if (isInitialCall) { + func_80045D00(0, 60); + } + return (func_80045FA4() == 0) * 2; +} -INCLUDE_ASM(s32, "code_1a1f0_len_5390", func_8003EECC); +ApiStatus func_8003EECC(ScriptInstance* script, s32 isInitialCall) { + if (isInitialCall) { + func_80045D00(1, 60); + } + return (func_80045FA4() == 0) * 2; +} INCLUDE_ASM(s32, "code_1a1f0_len_5390", FadeBackgroundToBlack); @@ -49,7 +59,22 @@ ApiStatus UnfadeBackgroundFromBlack(ScriptInstance* script, s32 isInitialCall) { } } -INCLUDE_ASM(s32, "code_1a1f0_len_5390", func_8003F018); +ApiStatus func_8003F018(ScriptInstance* script, s32 isInitialCall) { + Npc* npc = get_npc_unsafe(-0xA); + + if (isInitialCall) { + play_sound(0x24B); + npc->unk_AC = 0; + } + + npc->unk_AC += 17; + + if ((u32)(npc->unk_AC & 0xFF) >= 0xFF) { + npc->unk_AC = 0xFF; + return ApiStatus_DONE1; + } + return ApiStatus_BLOCK; +} INCLUDE_ASM(s32, "code_1a1f0_len_5390", func_8003F084); From 2ad6bb167745288afff86655468409fa9eeb577a Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 27 Oct 2020 23:15:10 -0400 Subject: [PATCH 03/78] PR comments --- src/code_1A5830.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/code_1A5830.c b/src/code_1A5830.c index 951d3c4ba7..6cac876305 100644 --- a/src/code_1A5830.c +++ b/src/code_1A5830.c @@ -274,7 +274,7 @@ INCLUDE_ASM(s32, "code_1A5830", func_8027D4C8); ApiStatus EnableActorBlur(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; ActorId actorID = get_variable(script, *args++); - s32 var1 = get_variable(script, *args++); + s32 enable = get_variable(script, *args++); Actor* actor; if (actorID == ActorId_SELF) { @@ -283,9 +283,9 @@ ApiStatus EnableActorBlur(ScriptInstance* script, s32 isInitialCall) { actor = get_actor(actorID); - if (var1 == 0) { + if (enable == 0) { disable_actor_blur(actor); - } else if (var1 == 1) { + } else if (enable == 1) { enable_actor_blur(actor); } else { reset_actor_blur(actor); From 90e7a9acaba3b5780bacc917335751e2b9976ca2 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Wed, 28 Oct 2020 02:42:14 -0400 Subject: [PATCH 04/78] Assorted functions --- asm/nonmatchings/code_F5750/func_802D24F4.s | 9 -- .../code_f2470_len_27f0/func_802CFD30.s | 68 -------------- .../code_f2470_len_27f0/func_802CFEEC.s | 58 ------------ .../code_f2470_len_27f0/func_802CFFC0.s | 91 ------------------- .../code_f270_len_1190/func_80034388.s | 11 --- .../code_f270_len_1190/func_80034FF0.s | 8 -- .../gv_01/E1E460/func_802405EC_E1EA4C.s | 45 --------- .../mac_00/7EAD10/func_802405EC_7EB2FC.s | 18 ---- .../mac_00/7EAD10/func_80240624_7EB334.s | 7 -- include/common_structs.h | 4 +- include/functions.h | 3 + src/code_1AC760.c | 2 +- src/code_F5750.c | 4 +- src/code_f2470_len_27f0.c | 83 ++++++++++++++++- src/code_f270_len_1190.c | 11 ++- src/code_fa4c0_len_3bf0.c | 1 - src/world/area_gv/gv_01/E1E460.c | 18 +++- src/world/area_mac/mac_00/7EAD10.c | 39 +++++++- 18 files changed, 150 insertions(+), 330 deletions(-) delete mode 100644 asm/nonmatchings/code_F5750/func_802D24F4.s delete mode 100644 asm/nonmatchings/code_f2470_len_27f0/func_802CFD30.s delete mode 100644 asm/nonmatchings/code_f2470_len_27f0/func_802CFEEC.s delete mode 100644 asm/nonmatchings/code_f2470_len_27f0/func_802CFFC0.s delete mode 100644 asm/nonmatchings/code_f270_len_1190/func_80034388.s delete mode 100644 asm/nonmatchings/code_f270_len_1190/func_80034FF0.s delete mode 100644 asm/nonmatchings/world/area_gv/gv_01/E1E460/func_802405EC_E1EA4C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_00/7EAD10/func_802405EC_7EB2FC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_00/7EAD10/func_80240624_7EB334.s diff --git a/asm/nonmatchings/code_F5750/func_802D24F4.s b/asm/nonmatchings/code_F5750/func_802D24F4.s deleted file mode 100644 index a1f26a0767..0000000000 --- a/asm/nonmatchings/code_F5750/func_802D24F4.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D24F4 -/* F6EA4 802D24F4 3C028011 */ lui $v0, 0x8011 -/* F6EA8 802D24F8 8442EFDA */ lh $v0, -0x1026($v0) -/* F6EAC 802D24FC 2C420001 */ sltiu $v0, $v0, 1 -/* F6EB0 802D2500 03E00008 */ jr $ra -/* F6EB4 802D2504 00021040 */ sll $v0, $v0, 1 diff --git a/asm/nonmatchings/code_f2470_len_27f0/func_802CFD30.s b/asm/nonmatchings/code_f2470_len_27f0/func_802CFD30.s deleted file mode 100644 index b924243159..0000000000 --- a/asm/nonmatchings/code_f2470_len_27f0/func_802CFD30.s +++ /dev/null @@ -1,68 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802CFD30 -/* F46E0 802CFD30 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* F46E4 802CFD34 AFB10024 */ sw $s1, 0x24($sp) -/* F46E8 802CFD38 0080882D */ daddu $s1, $a0, $zero -/* F46EC 802CFD3C AFBF003C */ sw $ra, 0x3c($sp) -/* F46F0 802CFD40 AFB60038 */ sw $s6, 0x38($sp) -/* F46F4 802CFD44 AFB50034 */ sw $s5, 0x34($sp) -/* F46F8 802CFD48 AFB40030 */ sw $s4, 0x30($sp) -/* F46FC 802CFD4C AFB3002C */ sw $s3, 0x2c($sp) -/* F4700 802CFD50 AFB20028 */ sw $s2, 0x28($sp) -/* F4704 802CFD54 AFB00020 */ sw $s0, 0x20($sp) -/* F4708 802CFD58 8E30000C */ lw $s0, 0xc($s1) -/* F470C 802CFD5C 8E050000 */ lw $a1, ($s0) -/* F4710 802CFD60 0C0B1EAF */ jal get_variable -/* F4714 802CFD64 26100004 */ addiu $s0, $s0, 4 -/* F4718 802CFD68 8E050000 */ lw $a1, ($s0) -/* F471C 802CFD6C 26100004 */ addiu $s0, $s0, 4 -/* F4720 802CFD70 0220202D */ daddu $a0, $s1, $zero -/* F4724 802CFD74 0C0B1EAF */ jal get_variable -/* F4728 802CFD78 0040902D */ daddu $s2, $v0, $zero -/* F472C 802CFD7C 8E050000 */ lw $a1, ($s0) -/* F4730 802CFD80 26100004 */ addiu $s0, $s0, 4 -/* F4734 802CFD84 0220202D */ daddu $a0, $s1, $zero -/* F4738 802CFD88 0C0B1EAF */ jal get_variable -/* F473C 802CFD8C 0040B02D */ daddu $s6, $v0, $zero -/* F4740 802CFD90 8E050000 */ lw $a1, ($s0) -/* F4744 802CFD94 26100004 */ addiu $s0, $s0, 4 -/* F4748 802CFD98 0220202D */ daddu $a0, $s1, $zero -/* F474C 802CFD9C 0C0B1EAF */ jal get_variable -/* F4750 802CFDA0 0040A82D */ daddu $s5, $v0, $zero -/* F4754 802CFDA4 8E050000 */ lw $a1, ($s0) -/* F4758 802CFDA8 26100004 */ addiu $s0, $s0, 4 -/* F475C 802CFDAC 0220202D */ daddu $a0, $s1, $zero -/* F4760 802CFDB0 0C0B1EAF */ jal get_variable -/* F4764 802CFDB4 0040A02D */ daddu $s4, $v0, $zero -/* F4768 802CFDB8 0220202D */ daddu $a0, $s1, $zero -/* F476C 802CFDBC 8E050000 */ lw $a1, ($s0) -/* F4770 802CFDC0 0C0B1EAF */ jal get_variable -/* F4774 802CFDC4 0040982D */ daddu $s3, $v0, $zero -/* F4778 802CFDC8 0220202D */ daddu $a0, $s1, $zero -/* F477C 802CFDCC 0240282D */ daddu $a1, $s2, $zero -/* F4780 802CFDD0 0C0B36B0 */ jal resolve_npc -/* F4784 802CFDD4 0040802D */ daddu $s0, $v0, $zero -/* F4788 802CFDD8 10400009 */ beqz $v0, .L802CFE00 -/* F478C 802CFDDC 0040202D */ daddu $a0, $v0, $zero -/* F4790 802CFDE0 02C0282D */ daddu $a1, $s6, $zero -/* F4794 802CFDE4 02A0302D */ daddu $a2, $s5, $zero -/* F4798 802CFDE8 AFB30010 */ sw $s3, 0x10($sp) -/* F479C 802CFDEC AFB00014 */ sw $s0, 0x14($sp) -/* F47A0 802CFDF0 948200A2 */ lhu $v0, 0xa2($a0) -/* F47A4 802CFDF4 0280382D */ daddu $a3, $s4, $zero -/* F47A8 802CFDF8 0C00F589 */ jal func_8003D624 -/* F47AC 802CFDFC AFA20018 */ sw $v0, 0x18($sp) -.L802CFE00: -/* F47B0 802CFE00 24020002 */ addiu $v0, $zero, 2 -/* F47B4 802CFE04 8FBF003C */ lw $ra, 0x3c($sp) -/* F47B8 802CFE08 8FB60038 */ lw $s6, 0x38($sp) -/* F47BC 802CFE0C 8FB50034 */ lw $s5, 0x34($sp) -/* F47C0 802CFE10 8FB40030 */ lw $s4, 0x30($sp) -/* F47C4 802CFE14 8FB3002C */ lw $s3, 0x2c($sp) -/* F47C8 802CFE18 8FB20028 */ lw $s2, 0x28($sp) -/* F47CC 802CFE1C 8FB10024 */ lw $s1, 0x24($sp) -/* F47D0 802CFE20 8FB00020 */ lw $s0, 0x20($sp) -/* F47D4 802CFE24 03E00008 */ jr $ra -/* F47D8 802CFE28 27BD0040 */ addiu $sp, $sp, 0x40 diff --git a/asm/nonmatchings/code_f2470_len_27f0/func_802CFEEC.s b/asm/nonmatchings/code_f2470_len_27f0/func_802CFEEC.s deleted file mode 100644 index 3b6fbfedd8..0000000000 --- a/asm/nonmatchings/code_f2470_len_27f0/func_802CFEEC.s +++ /dev/null @@ -1,58 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802CFEEC -/* F489C 802CFEEC 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* F48A0 802CFEF0 AFB1001C */ sw $s1, 0x1c($sp) -/* F48A4 802CFEF4 0080882D */ daddu $s1, $a0, $zero -/* F48A8 802CFEF8 AFBF0030 */ sw $ra, 0x30($sp) -/* F48AC 802CFEFC AFB5002C */ sw $s5, 0x2c($sp) -/* F48B0 802CFF00 AFB40028 */ sw $s4, 0x28($sp) -/* F48B4 802CFF04 AFB30024 */ sw $s3, 0x24($sp) -/* F48B8 802CFF08 AFB20020 */ sw $s2, 0x20($sp) -/* F48BC 802CFF0C AFB00018 */ sw $s0, 0x18($sp) -/* F48C0 802CFF10 8E30000C */ lw $s0, 0xc($s1) -/* F48C4 802CFF14 8E050000 */ lw $a1, ($s0) -/* F48C8 802CFF18 0C0B1EAF */ jal get_variable -/* F48CC 802CFF1C 26100004 */ addiu $s0, $s0, 4 -/* F48D0 802CFF20 8E050000 */ lw $a1, ($s0) -/* F48D4 802CFF24 26100004 */ addiu $s0, $s0, 4 -/* F48D8 802CFF28 0220202D */ daddu $a0, $s1, $zero -/* F48DC 802CFF2C 0C0B1EAF */ jal get_variable -/* F48E0 802CFF30 0040902D */ daddu $s2, $v0, $zero -/* F48E4 802CFF34 8E050000 */ lw $a1, ($s0) -/* F48E8 802CFF38 26100004 */ addiu $s0, $s0, 4 -/* F48EC 802CFF3C 0220202D */ daddu $a0, $s1, $zero -/* F48F0 802CFF40 0C0B1EAF */ jal get_variable -/* F48F4 802CFF44 0040A82D */ daddu $s5, $v0, $zero -/* F48F8 802CFF48 8E050000 */ lw $a1, ($s0) -/* F48FC 802CFF4C 26100004 */ addiu $s0, $s0, 4 -/* F4900 802CFF50 0220202D */ daddu $a0, $s1, $zero -/* F4904 802CFF54 0C0B1EAF */ jal get_variable -/* F4908 802CFF58 0040A02D */ daddu $s4, $v0, $zero -/* F490C 802CFF5C 0220202D */ daddu $a0, $s1, $zero -/* F4910 802CFF60 8E050000 */ lw $a1, ($s0) -/* F4914 802CFF64 0C0B1EAF */ jal get_variable -/* F4918 802CFF68 0040982D */ daddu $s3, $v0, $zero -/* F491C 802CFF6C 0220202D */ daddu $a0, $s1, $zero -/* F4920 802CFF70 0240282D */ daddu $a1, $s2, $zero -/* F4924 802CFF74 0C0B36B0 */ jal resolve_npc -/* F4928 802CFF78 0040802D */ daddu $s0, $v0, $zero -/* F492C 802CFF7C 10400006 */ beqz $v0, .L802CFF98 -/* F4930 802CFF80 0040202D */ daddu $a0, $v0, $zero -/* F4934 802CFF84 AFB00010 */ sw $s0, 0x10($sp) -/* F4938 802CFF88 02A0282D */ daddu $a1, $s5, $zero -/* F493C 802CFF8C 0280302D */ daddu $a2, $s4, $zero -/* F4940 802CFF90 0C00ED13 */ jal func_8003B44C -/* F4944 802CFF94 0260382D */ daddu $a3, $s3, $zero -.L802CFF98: -/* F4948 802CFF98 24020002 */ addiu $v0, $zero, 2 -/* F494C 802CFF9C 8FBF0030 */ lw $ra, 0x30($sp) -/* F4950 802CFFA0 8FB5002C */ lw $s5, 0x2c($sp) -/* F4954 802CFFA4 8FB40028 */ lw $s4, 0x28($sp) -/* F4958 802CFFA8 8FB30024 */ lw $s3, 0x24($sp) -/* F495C 802CFFAC 8FB20020 */ lw $s2, 0x20($sp) -/* F4960 802CFFB0 8FB1001C */ lw $s1, 0x1c($sp) -/* F4964 802CFFB4 8FB00018 */ lw $s0, 0x18($sp) -/* F4968 802CFFB8 03E00008 */ jr $ra -/* F496C 802CFFBC 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/asm/nonmatchings/code_f2470_len_27f0/func_802CFFC0.s b/asm/nonmatchings/code_f2470_len_27f0/func_802CFFC0.s deleted file mode 100644 index 1ec8e0a378..0000000000 --- a/asm/nonmatchings/code_f2470_len_27f0/func_802CFFC0.s +++ /dev/null @@ -1,91 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802CFFC0 -/* F4970 802CFFC0 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* F4974 802CFFC4 AFB10024 */ sw $s1, 0x24($sp) -/* F4978 802CFFC8 0080882D */ daddu $s1, $a0, $zero -/* F497C 802CFFCC AFBF0044 */ sw $ra, 0x44($sp) -/* F4980 802CFFD0 AFBE0040 */ sw $fp, 0x40($sp) -/* F4984 802CFFD4 AFB7003C */ sw $s7, 0x3c($sp) -/* F4988 802CFFD8 AFB60038 */ sw $s6, 0x38($sp) -/* F498C 802CFFDC AFB50034 */ sw $s5, 0x34($sp) -/* F4990 802CFFE0 AFB40030 */ sw $s4, 0x30($sp) -/* F4994 802CFFE4 AFB3002C */ sw $s3, 0x2c($sp) -/* F4998 802CFFE8 AFB20028 */ sw $s2, 0x28($sp) -/* F499C 802CFFEC AFB00020 */ sw $s0, 0x20($sp) -/* F49A0 802CFFF0 8E30000C */ lw $s0, 0xc($s1) -/* F49A4 802CFFF4 8E050000 */ lw $a1, ($s0) -/* F49A8 802CFFF8 0C0B1EAF */ jal get_variable -/* F49AC 802CFFFC 26100004 */ addiu $s0, $s0, 4 -/* F49B0 802D0000 8E050000 */ lw $a1, ($s0) -/* F49B4 802D0004 26100004 */ addiu $s0, $s0, 4 -/* F49B8 802D0008 0220202D */ daddu $a0, $s1, $zero -/* F49BC 802D000C 0C0B1EAF */ jal get_variable -/* F49C0 802D0010 0040902D */ daddu $s2, $v0, $zero -/* F49C4 802D0014 8E050000 */ lw $a1, ($s0) -/* F49C8 802D0018 26100004 */ addiu $s0, $s0, 4 -/* F49CC 802D001C 0220202D */ daddu $a0, $s1, $zero -/* F49D0 802D0020 0C0B1EAF */ jal get_variable -/* F49D4 802D0024 AFA20018 */ sw $v0, 0x18($sp) -/* F49D8 802D0028 8E050000 */ lw $a1, ($s0) -/* F49DC 802D002C 26100004 */ addiu $s0, $s0, 4 -/* F49E0 802D0030 0220202D */ daddu $a0, $s1, $zero -/* F49E4 802D0034 0C0B1EAF */ jal get_variable -/* F49E8 802D0038 0040F02D */ daddu $fp, $v0, $zero -/* F49EC 802D003C 8E050000 */ lw $a1, ($s0) -/* F49F0 802D0040 26100004 */ addiu $s0, $s0, 4 -/* F49F4 802D0044 0220202D */ daddu $a0, $s1, $zero -/* F49F8 802D0048 0C0B1EAF */ jal get_variable -/* F49FC 802D004C 0040B82D */ daddu $s7, $v0, $zero -/* F4A00 802D0050 8E050000 */ lw $a1, ($s0) -/* F4A04 802D0054 26100004 */ addiu $s0, $s0, 4 -/* F4A08 802D0058 0220202D */ daddu $a0, $s1, $zero -/* F4A0C 802D005C 0C0B1EAF */ jal get_variable -/* F4A10 802D0060 0040B02D */ daddu $s6, $v0, $zero -/* F4A14 802D0064 8E050000 */ lw $a1, ($s0) -/* F4A18 802D0068 26100004 */ addiu $s0, $s0, 4 -/* F4A1C 802D006C 0220202D */ daddu $a0, $s1, $zero -/* F4A20 802D0070 0C0B1EAF */ jal get_variable -/* F4A24 802D0074 0040A82D */ daddu $s5, $v0, $zero -/* F4A28 802D0078 8E050000 */ lw $a1, ($s0) -/* F4A2C 802D007C 26100004 */ addiu $s0, $s0, 4 -/* F4A30 802D0080 0220202D */ daddu $a0, $s1, $zero -/* F4A34 802D0084 0C0B1EAF */ jal get_variable -/* F4A38 802D0088 0040A02D */ daddu $s4, $v0, $zero -/* F4A3C 802D008C 0220202D */ daddu $a0, $s1, $zero -/* F4A40 802D0090 8E050000 */ lw $a1, ($s0) -/* F4A44 802D0094 0C0B1EAF */ jal get_variable -/* F4A48 802D0098 0040982D */ daddu $s3, $v0, $zero -/* F4A4C 802D009C 0220202D */ daddu $a0, $s1, $zero -/* F4A50 802D00A0 0240282D */ daddu $a1, $s2, $zero -/* F4A54 802D00A4 0C0B36B0 */ jal resolve_npc -/* F4A58 802D00A8 0040882D */ daddu $s1, $v0, $zero -/* F4A5C 802D00AC 0040802D */ daddu $s0, $v0, $zero -/* F4A60 802D00B0 1200000C */ beqz $s0, .L802D00E4 -/* F4A64 802D00B4 0200202D */ daddu $a0, $s0, $zero -/* F4A68 802D00B8 03C0302D */ daddu $a2, $fp, $zero -/* F4A6C 802D00BC 8FA50018 */ lw $a1, 0x18($sp) -/* F4A70 802D00C0 02E0382D */ daddu $a3, $s7, $zero -/* F4A74 802D00C4 0C00ED13 */ jal func_8003B44C -/* F4A78 802D00C8 AFB60010 */ sw $s6, 0x10($sp) -/* F4A7C 802D00CC 0200202D */ daddu $a0, $s0, $zero -/* F4A80 802D00D0 02A0282D */ daddu $a1, $s5, $zero -/* F4A84 802D00D4 0280302D */ daddu $a2, $s4, $zero -/* F4A88 802D00D8 0260382D */ daddu $a3, $s3, $zero -/* F4A8C 802D00DC 0C00ED19 */ jal func_8003B464 -/* F4A90 802D00E0 AFB10010 */ sw $s1, 0x10($sp) -.L802D00E4: -/* F4A94 802D00E4 24020002 */ addiu $v0, $zero, 2 -/* F4A98 802D00E8 8FBF0044 */ lw $ra, 0x44($sp) -/* F4A9C 802D00EC 8FBE0040 */ lw $fp, 0x40($sp) -/* F4AA0 802D00F0 8FB7003C */ lw $s7, 0x3c($sp) -/* F4AA4 802D00F4 8FB60038 */ lw $s6, 0x38($sp) -/* F4AA8 802D00F8 8FB50034 */ lw $s5, 0x34($sp) -/* F4AAC 802D00FC 8FB40030 */ lw $s4, 0x30($sp) -/* F4AB0 802D0100 8FB3002C */ lw $s3, 0x2c($sp) -/* F4AB4 802D0104 8FB20028 */ lw $s2, 0x28($sp) -/* F4AB8 802D0108 8FB10024 */ lw $s1, 0x24($sp) -/* F4ABC 802D010C 8FB00020 */ lw $s0, 0x20($sp) -/* F4AC0 802D0110 03E00008 */ jr $ra -/* F4AC4 802D0114 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/nonmatchings/code_f270_len_1190/func_80034388.s b/asm/nonmatchings/code_f270_len_1190/func_80034388.s deleted file mode 100644 index 1da30cd6c7..0000000000 --- a/asm/nonmatchings/code_f270_len_1190/func_80034388.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80034388 -/* F788 80034388 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* F78C 8003438C AFBF0010 */ sw $ra, 0x10($sp) -/* F790 80034390 0C00D0E9 */ jal func_800343A4 -/* F794 80034394 00000000 */ nop -/* F798 80034398 8FBF0010 */ lw $ra, 0x10($sp) -/* F79C 8003439C 03E00008 */ jr $ra -/* F7A0 800343A0 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_f270_len_1190/func_80034FF0.s b/asm/nonmatchings/code_f270_len_1190/func_80034FF0.s deleted file mode 100644 index b2f018e67b..0000000000 --- a/asm/nonmatchings/code_f270_len_1190/func_80034FF0.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80034FF0 -/* 103F0 80034FF0 03E00008 */ jr $ra -/* 103F4 80034FF4 00000000 */ nop -/* 103F8 80034FF8 00000000 */ nop -/* 103FC 80034FFC 00000000 */ nop diff --git a/asm/nonmatchings/world/area_gv/gv_01/E1E460/func_802405EC_E1EA4C.s b/asm/nonmatchings/world/area_gv/gv_01/E1E460/func_802405EC_E1EA4C.s deleted file mode 100644 index 6a5ea4103e..0000000000 --- a/asm/nonmatchings/world/area_gv/gv_01/E1E460/func_802405EC_E1EA4C.s +++ /dev/null @@ -1,45 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802405EC_E1EA4C -/* E1EA4C 802405EC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* E1EA50 802405F0 AFB00010 */ sw $s0, 0x10($sp) -/* E1EA54 802405F4 0080802D */ daddu $s0, $a0, $zero -/* E1EA58 802405F8 10A00008 */ beqz $a1, .L8024061C -/* E1EA5C 802405FC AFBF0014 */ sw $ra, 0x14($sp) -/* E1EA60 80240600 3C013F80 */ lui $at, 0x3f80 -/* E1EA64 80240604 44816000 */ mtc1 $at, $f12 -/* E1EA68 80240608 0C00AFB7 */ jal set_curtain_scale_goal -/* E1EA6C 8024060C AE000070 */ sw $zero, 0x70($s0) -/* E1EA70 80240610 44806000 */ mtc1 $zero, $f12 -/* E1EA74 80240614 0C00AFC9 */ jal set_curtain_fade -/* E1EA78 80240618 00000000 */ nop -.L8024061C: -/* E1EA7C 8024061C 8E020070 */ lw $v0, 0x70($s0) -/* E1EA80 80240620 24420005 */ addiu $v0, $v0, 5 -/* E1EA84 80240624 AE020070 */ sw $v0, 0x70($s0) -/* E1EA88 80240628 28420100 */ slti $v0, $v0, 0x100 -/* E1EA8C 8024062C 14400003 */ bnez $v0, .L8024063C -/* E1EA90 80240630 24040001 */ addiu $a0, $zero, 1 -/* E1EA94 80240634 240200FF */ addiu $v0, $zero, 0xff -/* E1EA98 80240638 AE020070 */ sw $v0, 0x70($s0) -.L8024063C: -/* E1EA9C 8024063C 240500D0 */ addiu $a1, $zero, 0xd0 -/* E1EAA0 80240640 00A0302D */ daddu $a2, $a1, $zero -/* E1EAA4 80240644 0C04DF84 */ jal func_80137E10 -/* E1EAA8 80240648 00A0382D */ daddu $a3, $a1, $zero -/* E1EAAC 8024064C C6000070 */ lwc1 $f0, 0x70($s0) -/* E1EAB0 80240650 46800020 */ cvt.s.w $f0, $f0 -/* E1EAB4 80240654 44050000 */ mfc1 $a1, $f0 -/* E1EAB8 80240658 0C04DF69 */ jal func_80137DA4 -/* E1EABC 8024065C 0000202D */ daddu $a0, $zero, $zero -/* E1EAC0 80240660 24040001 */ addiu $a0, $zero, 1 -/* E1EAC4 80240664 0C04E035 */ jal func_801380D4 -/* E1EAC8 80240668 0000282D */ daddu $a1, $zero, $zero -/* E1EACC 8024066C 8E020070 */ lw $v0, 0x70($s0) -/* E1EAD0 80240670 8FBF0014 */ lw $ra, 0x14($sp) -/* E1EAD4 80240674 8FB00010 */ lw $s0, 0x10($sp) -/* E1EAD8 80240678 384200FF */ xori $v0, $v0, 0xff -/* E1EADC 8024067C 2C420001 */ sltiu $v0, $v0, 1 -/* E1EAE0 80240680 03E00008 */ jr $ra -/* E1EAE4 80240684 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_00/7EAD10/func_802405EC_7EB2FC.s b/asm/nonmatchings/world/area_mac/mac_00/7EAD10/func_802405EC_7EB2FC.s deleted file mode 100644 index f9ea8fdf07..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_00/7EAD10/func_802405EC_7EB2FC.s +++ /dev/null @@ -1,18 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802405EC_7EB2FC -/* 7EB2FC 802405EC 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 7EB300 802405F0 AFBF0020 */ sw $ra, 0x20($sp) -/* 7EB304 802405F4 8C82000C */ lw $v0, 0xc($a0) -/* 7EB308 802405F8 0C0B1EAF */ jal get_variable -/* 7EB30C 802405FC 8C450000 */ lw $a1, ($v0) -/* 7EB310 80240600 0040202D */ daddu $a0, $v0, $zero -/* 7EB314 80240604 27A50010 */ addiu $a1, $sp, 0x10 -/* 7EB318 80240608 27A60014 */ addiu $a2, $sp, 0x14 -/* 7EB31C 8024060C 0C016F84 */ jal get_collider_center -/* 7EB320 80240610 27A70018 */ addiu $a3, $sp, 0x18 -/* 7EB324 80240614 8FBF0020 */ lw $ra, 0x20($sp) -/* 7EB328 80240618 24020002 */ addiu $v0, $zero, 2 -/* 7EB32C 8024061C 03E00008 */ jr $ra -/* 7EB330 80240620 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/world/area_mac/mac_00/7EAD10/func_80240624_7EB334.s b/asm/nonmatchings/world/area_mac/mac_00/7EAD10/func_80240624_7EB334.s deleted file mode 100644 index 36555f109c..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_00/7EAD10/func_80240624_7EB334.s +++ /dev/null @@ -1,7 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240624_7EB334 -/* 7EB334 80240624 03E00008 */ jr $ra -/* 7EB338 80240628 24020002 */ addiu $v0, $zero, 2 -/* 7EB33C 8024062C 00000000 */ nop diff --git a/include/common_structs.h b/include/common_structs.h index 964fa398e2..56eb064d23 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -106,7 +106,7 @@ typedef struct Npc { /* 0x08E */ s16 duration; /* formerly interp_counter */ /* 0x090 */ Vec3s homePos; /* 0x096 */ char unk_96[12]; - /* 0x0A2 */ s16 unk_A2; + /* 0x0A2 */ u16 unk_A2; /* 0x0A4 */ u8 npcID; /* 0x0A5 */ char unk_A5; /* 0x0A6 */ s16 collisionRadius; @@ -862,7 +862,7 @@ typedef struct GameStatus { /* 0x040 */ s8 stickX; /* with deadzone */ /* 0x041 */ u8 altStickX; /* input used for batte when flag 80000 set */ /* 0x042 */ char unk_42[2]; - /* 0x044 */ u8 stickY; /* with deadzone */ + /* 0x044 */ s8 stickY; /* with deadzone */ /* 0x045 */ u8 altStickY; /* input used for batte when flag 80000 set */ /* 0x046 */ char unk_46[2]; /* 0x048 */ s16 unk_48[4]; diff --git a/include/functions.h b/include/functions.h index f82f6ddd45..5805a0790a 100644 --- a/include/functions.h +++ b/include/functions.h @@ -65,6 +65,9 @@ s32 func_800554E8(s32, s32); s32 func_800555E4(s32); s32 osGetId(); +void set_curtain_scale_goal(f32 scale); +void set_curtain_fade(f32 scale); + void fx_walk_normal(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4, s32 arg5); // Partner diff --git a/src/code_1AC760.c b/src/code_1AC760.c index fafdcec8c8..6697da5fff 100644 --- a/src/code_1AC760.c +++ b/src/code_1AC760.c @@ -23,7 +23,7 @@ ApiStatus GetActorLevel(ScriptInstance* script, s32 isInitialCall) { s32 actorID = get_variable(script, *args++); Bytecode* outVar; - if (actorID == -0x7F) { + if (actorID == ActorId_SELF) { actorID = script->owner1.enemyID; } diff --git a/src/code_F5750.c b/src/code_F5750.c index ed27cdf682..558a6bdf71 100644 --- a/src/code_F5750.c +++ b/src/code_F5750.c @@ -238,7 +238,9 @@ INCLUDE_ASM(s32, "code_F5750", func_802D2484); INCLUDE_ASM(s32, "code_F5750", func_802D249C); -INCLUDE_ASM(s32, "code_F5750", func_802D24F4); +ApiStatus func_802D24F4(ScriptInstance* script, s32 isInitialCall) { + return (gPlayerStatus.moveFrames == 0) * 2; +} INCLUDE_ASM(s32, "code_F5750", func_802D2508); diff --git a/src/code_f2470_len_27f0.c b/src/code_f2470_len_27f0.c index 98d03b6ea1..1bf62ec95c 100644 --- a/src/code_f2470_len_27f0.c +++ b/src/code_f2470_len_27f0.c @@ -35,11 +35,35 @@ ApiStatus GetNpcPointer(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } +#ifdef NON_MATCHING +ApiStatus SetNpcPos(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + NpcId npcID = get_variable(script, *args++); + f32 x = get_variable(script, *args++); + f32 y = get_variable(script, *args++); + f32 z = get_variable(script, *args++); + Npc* npc = resolve_npc(script, npcID); + + if (npc == NULL) { + return ApiStatus_DONE2; + } + + npc->pos.x = x; + npc->pos.y = y; + npc->pos.z = z; + npc->colliderPos.x = x; + npc->colliderPos.y = y; + npc->colliderPos.z = z; + npc->flags |= 0x10000; + return ApiStatus_DONE2; +} +#else INCLUDE_ASM(s32, "code_f2470_len_27f0", SetNpcPos, ScriptInstance* script, s32 isInitialCall); +#endif ApiStatus SetNpcRotation(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - s32 npcID = get_variable(script, *args++); + NpcId npcID = get_variable(script, *args++); f32 rotX = get_float_variable(script, *args++); f32 rotY = get_float_variable(script, *args++); f32 rotZ = get_float_variable(script, *args++); @@ -404,7 +428,23 @@ ApiStatus PartnerIsFlying(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "code_f2470_len_27f0", func_802CFD30); +ApiStatus func_802CFD30(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + NpcId npcId = get_variable(script, *args++); + Bytecode var1 = get_variable(script, *args++); + Bytecode var2 = get_variable(script, *args++); + Bytecode var3 = get_variable(script, *args++); + Bytecode var4 = get_variable(script, *args++); + Bytecode var5 = get_variable(script, *args++); + Npc* npc = resolve_npc(script, npcId); + + if (npc == NULL) { + return ApiStatus_DONE2; + } + + func_8003D624(npc, var1, var2, var3, var4, var5, npc->unk_A2); + return ApiStatus_DONE2; +} ApiStatus func_802CFE2C(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; @@ -434,9 +474,44 @@ ApiStatus func_802CFE80(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "code_f2470_len_27f0", func_802CFEEC); +ApiStatus func_802CFEEC(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + NpcId npcId = get_variable(script, *args++); + Bytecode var1 = get_variable(script, *args++); + Bytecode var2 = get_variable(script, *args++); + Bytecode var3 = get_variable(script, *args++); + Bytecode var4 = get_variable(script, *args++); + Npc* npc = resolve_npc(script, npcId); -INCLUDE_ASM(s32, "code_f2470_len_27f0", func_802CFFC0); + if (npc == NULL) { + return ApiStatus_DONE2; + } + + func_8003B44C(npc, var1, var2, var3, var4); + return ApiStatus_DONE2; +} + +ApiStatus func_802CFFC0(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + NpcId npcId = get_variable(script, *args++); + Bytecode var1 = get_variable(script, *args++); + Bytecode var2 = get_variable(script, *args++); + Bytecode var3 = get_variable(script, *args++); + Bytecode var4 = get_variable(script, *args++); + Bytecode var5 = get_variable(script, *args++); + Bytecode var6 = get_variable(script, *args++); + Bytecode var7 = get_variable(script, *args++); + Bytecode var8 = get_variable(script, *args++); + Npc* npc = resolve_npc(script, npcId); + + if (npc == NULL) { + return ApiStatus_DONE2; + } + + func_8003B44C(npc, var1, var2, var3, var4); + func_8003B464(npc, var5, var6, var7, var8); + return ApiStatus_DONE2; +} ApiStatus SetNpcEffect(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; diff --git a/src/code_f270_len_1190.c b/src/code_f270_len_1190.c index d75c92cc3e..a5bcd91aab 100644 --- a/src/code_f270_len_1190.c +++ b/src/code_f270_len_1190.c @@ -1,12 +1,16 @@ #include "common.h" +void func_800343A4(); + INCLUDE_ASM(s32, "code_f270_len_1190", begin_state_logos); INCLUDE_ASM(s32, "code_f270_len_1190", step_logos); -INCLUDE_ASM(s32, "code_f270_len_1190", func_80034388); +void func_80034388(void) { + func_800343A4(); +} -INCLUDE_ASM(s32, "code_f270_len_1190", func_800343A4); +INCLUDE_ASM(void, "code_f270_len_1190", func_800343A4); INCLUDE_ASM(s32, "code_f270_len_1190", begin_state_pause_menu); @@ -19,4 +23,5 @@ INCLUDE_ASM(s32, "code_f270_len_1190", func_80034BFC); INCLUDE_ASM(s32, "code_f270_len_1190", func_80034C3C); -INCLUDE_ASM(s32, "code_f270_len_1190", func_80034FF0); +void func_80034FF0(void) { +} diff --git a/src/code_fa4c0_len_3bf0.c b/src/code_fa4c0_len_3bf0.c index f01862a7a4..d11deec992 100644 --- a/src/code_fa4c0_len_3bf0.c +++ b/src/code_fa4c0_len_3bf0.c @@ -77,7 +77,6 @@ ApiStatus func_802D6090(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -//INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", ClearAmbientSounds); ApiStatus ClearAmbientSounds(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 flags = get_variable(script, *args++); diff --git a/src/world/area_gv/gv_01/E1E460.c b/src/world/area_gv/gv_01/E1E460.c index 24b26d6f94..4f18eece47 100644 --- a/src/world/area_gv/gv_01/E1E460.c +++ b/src/world/area_gv/gv_01/E1E460.c @@ -16,6 +16,22 @@ INCLUDE_ASM(s32, "world/area_gv/gv_01/E1E460", func_8024023C_E1E69C); #include "world/common/UnkTexturePanFunc2.inc.c" -INCLUDE_ASM(s32, "world/area_gv/gv_01/E1E460", func_802405EC_E1EA4C); +ApiStatus func_802405EC_E1EA4C(ScriptInstance* script, s32 isInitialCall) { + if (isInitialCall) { + script->functionTemp[0].s = 0; + set_curtain_scale_goal(1.0); + set_curtain_fade(0); + } + + script->functionTemp[0].s += 5; + if (script->functionTemp[0].s > 255) { + script->functionTemp[0].s = 255; + } + + func_80137E10(1, 208, 208, 208); + func_80137DA4(0, script->functionTemp[0].s); + func_801380D4(1, 0); + return script->functionTemp[0].s == 255; +} INCLUDE_ASM(s32, "world/area_gv/gv_01/E1E460", func_80240688_E1EAE8); diff --git a/src/world/area_mac/mac_00/7EAD10.c b/src/world/area_mac/mac_00/7EAD10.c index 8ab6d92dc1..614f0395f5 100644 --- a/src/world/area_mac/mac_00/7EAD10.c +++ b/src/world/area_mac/mac_00/7EAD10.c @@ -4,7 +4,33 @@ #include "world/common/GetCurrentFloor.inc.c" +#ifdef NON_MATCHING +ApiStatus func_80240034_7EAD44(ScriptInstance* script, s32 isInitialCall) { + s32 stickY; + s32 stickX; + + if (gCollisionStatus.currentFloor != script->varTable[11]) { + script->varTable[0] = 0; + return ApiStatus_DONE2; + } + + stickX = GAME_STATUS->stickX; + stickY = GAME_STATUS->stickY; + if (stickX < 0) { + stickX = -stickX; + } + + if ((stickX != 0) || (stickY != 0)) { + if (atan2(0.0f, 0.0f, stickX, stickY) < 60.0f) { + script->varTable[0] = 1; + return ApiStatus_DONE2; + } + } + return ApiStatus_BLOCK; +} +#else INCLUDE_ASM(s32, "world/area_mac/mac_00/7EAD10", func_80240034_7EAD44); +#endif INCLUDE_ASM(s32, "world/area_mac/mac_00/7EAD10", func_802400F0_7EAE00); @@ -16,6 +42,15 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7EAD10", func_8024023C_7EAF4C); #include "world/common/UnkTexturePanFunc2.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_00/7EAD10", func_802405EC_7EB2FC); +ApiStatus func_802405EC_7EB2FC(ScriptInstance* script, s32 isInitialCall) { + f32 x; + f32 y; + f32 z; -INCLUDE_ASM(s32, "world/area_mac/mac_00/7EAD10", func_80240624_7EB334); + get_collider_center(get_variable(script, *script->ptrReadPos), &x, &y, &z); + return ApiStatus_DONE2; +} + +ApiStatus func_80240624_7EB334(ScriptInstance* script, s32 isInitialCall) { + return ApiStatus_DONE2; +} From ee172650648f1741b88f51ef891d6b2b16833b8b Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Wed, 28 Oct 2020 13:34:02 -0400 Subject: [PATCH 05/78] PR comments --- src/code_1a1f0_len_5390.c | 4 ++-- src/code_fa4c0_len_3bf0.c | 12 +++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/code_1a1f0_len_5390.c b/src/code_1a1f0_len_5390.c index ea3e0e9fe9..44bcc7e2d9 100644 --- a/src/code_1a1f0_len_5390.c +++ b/src/code_1a1f0_len_5390.c @@ -31,14 +31,14 @@ ApiStatus func_8003EE98(ScriptInstance* script, s32 isInitialCall) { if (isInitialCall) { func_80045D00(0, 60); } - return (func_80045FA4() == 0) * 2; + return (func_80045FA4() == 0) * ApiStatus_DONE2; } ApiStatus func_8003EECC(ScriptInstance* script, s32 isInitialCall) { if (isInitialCall) { func_80045D00(1, 60); } - return (func_80045FA4() == 0) * 2; + return (func_80045FA4() == 0) * ApiStatus_DONE2; } INCLUDE_ASM(s32, "code_1a1f0_len_5390", FadeBackgroundToBlack); diff --git a/src/code_fa4c0_len_3bf0.c b/src/code_fa4c0_len_3bf0.c index f01862a7a4..049cdfdfbc 100644 --- a/src/code_fa4c0_len_3bf0.c +++ b/src/code_fa4c0_len_3bf0.c @@ -9,7 +9,7 @@ ApiStatus FadeOutMusic(ScriptInstance* script, s32 isInitialCall) { s32 itemID = get_variable(script, *args++); s32* ptrNextPos = args++; - return (set_music_track(itemID, -1, 0, get_variable(script, *ptrNextPos++), 8) != 0) * 2; + return (set_music_track(itemID, -1, 0, get_variable(script, *ptrNextPos++), 8) != 0) * ApiStatus_DONE2; } ApiStatus SetMusicTrack(ScriptInstance* script, s32 isInitialCall) { @@ -19,7 +19,7 @@ ApiStatus SetMusicTrack(ScriptInstance* script, s32 isInitialCall) { s32 variation = get_variable(script, *args++); s16 volume = get_variable(script, *args++); - return (set_music_track(musicPlayer, songID, variation, 0x1F4, volume) != 0) * 2; + return (set_music_track(musicPlayer, songID, variation, 0x1F4, volume) != 0) * ApiStatus_DONE2; } ApiStatus FadeInMusic(ScriptInstance* script, s32 isInitialCall) { @@ -31,7 +31,7 @@ ApiStatus FadeInMusic(ScriptInstance* script, s32 isInitialCall) { s16 var4 = get_variable(script, *args++); s16 var5 = get_variable(script, *args++); - return (func_8014A964(var0, var1, var2, var3, var4, var5) != 0) * 2; + return (func_8014A964(var0, var1, var2, var3, var4, var5) != 0) * ApiStatus_DONE2; } INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D5EE0); @@ -77,19 +77,18 @@ ApiStatus func_802D6090(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -//INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", ClearAmbientSounds); ApiStatus ClearAmbientSounds(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 flags = get_variable(script, *args++); - return (play_ambient_sounds(-1, flags) != 0) * 2; + return (play_ambient_sounds(-1, flags) != 0) * ApiStatus_DONE2; } ApiStatus PlayAmbientSounds(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 soundID = get_variable(script, *args++); - return (play_ambient_sounds(soundID, 0xFA) != 0) * 2; + return (play_ambient_sounds(soundID, 0xFA) != 0) * ApiStatus_DONE2; } ApiStatus PlaySound(ScriptInstance* script, s32 isInitialCall) { @@ -484,7 +483,6 @@ ApiStatus GetItemPower(ScriptInstance* script, s32 isInitialCall) { ApiStatus ShowGotItem(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - ItemEntity* e; if (isInitialCall) { script->functionTemp[0].s = 0; From 9a10bd2677e364137a5cdaed12dbb742ec1c39c1 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Wed, 28 Oct 2020 15:06:49 -0400 Subject: [PATCH 06/78] start_script_in_group --- .../start_script_in_group.s | 140 ------------------ include/functions.h | 2 +- src/code_e79b0_len_1920.c | 91 ++++++------ 3 files changed, 47 insertions(+), 186 deletions(-) delete mode 100644 asm/nonmatchings/code_e79b0_len_1920/start_script_in_group.s diff --git a/asm/nonmatchings/code_e79b0_len_1920/start_script_in_group.s b/asm/nonmatchings/code_e79b0_len_1920/start_script_in_group.s deleted file mode 100644 index 70e977f9ea..0000000000 --- a/asm/nonmatchings/code_e79b0_len_1920/start_script_in_group.s +++ /dev/null @@ -1,140 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel start_script_in_group -/* E7F80 802C35D0 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* E7F84 802C35D4 AFB10014 */ sw $s1, 0x14($sp) -/* E7F88 802C35D8 0080882D */ daddu $s1, $a0, $zero -/* E7F8C 802C35DC AFB40020 */ sw $s4, 0x20($sp) -/* E7F90 802C35E0 00A0A02D */ daddu $s4, $a1, $zero -/* E7F94 802C35E4 AFB3001C */ sw $s3, 0x1c($sp) -/* E7F98 802C35E8 00C0982D */ daddu $s3, $a2, $zero -/* E7F9C 802C35EC AFB50024 */ sw $s5, 0x24($sp) -/* E7FA0 802C35F0 00E0A82D */ daddu $s5, $a3, $zero -/* E7FA4 802C35F4 3C03802E */ lui $v1, %hi(gCurrentScriptListPtr) -/* E7FA8 802C35F8 8C63A890 */ lw $v1, %lo(gCurrentScriptListPtr)($v1) -/* E7FAC 802C35FC 0000282D */ daddu $a1, $zero, $zero -/* E7FB0 802C3600 AFBF0028 */ sw $ra, 0x28($sp) -/* E7FB4 802C3604 AFB20018 */ sw $s2, 0x18($sp) -/* E7FB8 802C3608 AFB00010 */ sw $s0, 0x10($sp) -.L802C360C: -/* E7FBC 802C360C 8C620000 */ lw $v0, ($v1) -/* E7FC0 802C3610 10400006 */ beqz $v0, .L802C362C -/* E7FC4 802C3614 28A20080 */ slti $v0, $a1, 0x80 -/* E7FC8 802C3618 24A50001 */ addiu $a1, $a1, 1 -/* E7FCC 802C361C 28A20080 */ slti $v0, $a1, 0x80 -/* E7FD0 802C3620 1440FFFA */ bnez $v0, .L802C360C -/* E7FD4 802C3624 24630004 */ addiu $v1, $v1, 4 -/* E7FD8 802C3628 28A20080 */ slti $v0, $a1, 0x80 -.L802C362C: -/* E7FDC 802C362C 14400003 */ bnez $v0, .L802C363C -/* E7FE0 802C3630 24040168 */ addiu $a0, $zero, 0x168 -.L802C3634: -/* E7FE4 802C3634 080B0D8D */ j .L802C3634 -/* E7FE8 802C3638 00000000 */ nop -.L802C363C: -/* E7FEC 802C363C 0C00AB39 */ jal heap_malloc -/* E7FF0 802C3640 00A0902D */ daddu $s2, $a1, $zero -/* E7FF4 802C3644 00122080 */ sll $a0, $s2, 2 -/* E7FF8 802C3648 3C03802E */ lui $v1, %hi(gCurrentScriptListPtr) -/* E7FFC 802C364C 8C63A890 */ lw $v1, %lo(gCurrentScriptListPtr)($v1) -/* E8000 802C3650 3C05802E */ lui $a1, %hi(gNumScripts) -/* E8004 802C3654 24A5A488 */ addiu $a1, $a1, %lo(gNumScripts) -/* E8008 802C3658 00832021 */ addu $a0, $a0, $v1 -/* E800C 802C365C 8CA30000 */ lw $v1, ($a1) -/* E8010 802C3660 0040802D */ daddu $s0, $v0, $zero -/* E8014 802C3664 AC900000 */ sw $s0, ($a0) -/* E8018 802C3668 24630001 */ addiu $v1, $v1, 1 -/* E801C 802C366C 16000003 */ bnez $s0, .L802C367C -/* E8020 802C3670 ACA30000 */ sw $v1, ($a1) -.L802C3674: -/* E8024 802C3674 080B0D9D */ j .L802C3674 -/* E8028 802C3678 00000000 */ nop -.L802C367C: -/* E802C 802C367C 36620001 */ ori $v0, $s3, 1 -/* E8030 802C3680 3C03802E */ lui $v1, %hi(gStaticScriptCounter) -/* E8034 802C3684 24639CA0 */ addiu $v1, $v1, %lo(gStaticScriptCounter) -/* E8038 802C3688 A2020000 */ sb $v0, ($s0) -/* E803C 802C368C A2000002 */ sb $zero, 2($s0) -/* E8040 802C3690 A2140003 */ sb $s4, 3($s0) -/* E8044 802C3694 8C620000 */ lw $v0, ($v1) -/* E8048 802C3698 2405000F */ addiu $a1, $zero, 0xf -/* E804C 802C369C AE020144 */ sw $v0, 0x144($s0) -/* E8050 802C36A0 24420001 */ addiu $v0, $v0, 1 -/* E8054 802C36A4 AC620000 */ sw $v0, ($v1) -/* E8058 802C36A8 2402FFFF */ addiu $v0, $zero, -1 -/* E805C 802C36AC A2020006 */ sb $v0, 6($s0) -/* E8060 802C36B0 A2020007 */ sb $v0, 7($s0) -/* E8064 802C36B4 A2150004 */ sb $s5, 4($s0) -/* E8068 802C36B8 3C01802E */ lui $at, 0x802e -/* E806C 802C36BC C4209CA8 */ lwc1 $f0, -0x6358($at) -/* E8070 802C36C0 2603003C */ addiu $v1, $s0, 0x3c -/* E8074 802C36C4 AE110008 */ sw $s1, 8($s0) -/* E8078 802C36C8 AE11015C */ sw $s1, 0x15c($s0) -/* E807C 802C36CC AE110164 */ sw $s1, 0x164($s0) -/* E8080 802C36D0 AE000060 */ sw $zero, 0x60($s0) -/* E8084 802C36D4 AE000064 */ sw $zero, 0x64($s0) -/* E8088 802C36D8 AE000068 */ sw $zero, 0x68($s0) -/* E808C 802C36DC AE00006C */ sw $zero, 0x6c($s0) -/* E8090 802C36E0 AE020148 */ sw $v0, 0x148($s0) -/* E8094 802C36E4 AE02014C */ sw $v0, 0x14c($s0) -/* E8098 802C36E8 AE000160 */ sw $zero, 0x160($s0) -/* E809C 802C36EC AE000154 */ sw $zero, 0x154($s0) -/* E80A0 802C36F0 AE000158 */ sw $zero, 0x158($s0) -/* E80A4 802C36F4 E6000150 */ swc1 $f0, 0x150($s0) -.L802C36F8: -/* E80A8 802C36F8 AC600084 */ sw $zero, 0x84($v1) -/* E80AC 802C36FC 24A5FFFF */ addiu $a1, $a1, -1 -/* E80B0 802C3700 04A1FFFD */ bgez $a1, .L802C36F8 -/* E80B4 802C3704 2463FFFC */ addiu $v1, $v1, -4 -/* E80B8 802C3708 24050002 */ addiu $a1, $zero, 2 -/* E80BC 802C370C 26020008 */ addiu $v0, $s0, 8 -.L802C3710: -/* E80C0 802C3710 AC4000C4 */ sw $zero, 0xc4($v0) -/* E80C4 802C3714 24A5FFFF */ addiu $a1, $a1, -1 -/* E80C8 802C3718 04A1FFFD */ bgez $a1, .L802C3710 -/* E80CC 802C371C 2442FFFC */ addiu $v0, $v0, -4 -/* E80D0 802C3720 0C0B0C52 */ jal find_script_labels -/* E80D4 802C3724 0200202D */ daddu $a0, $s0, $zero -/* E80D8 802C3728 3C02802E */ lui $v0, %hi(D_802D9CA4) -/* E80DC 802C372C 8C429CA4 */ lw $v0, %lo(D_802D9CA4)($v0) -/* E80E0 802C3730 10400012 */ beqz $v0, .L802C377C -/* E80E4 802C3734 00000000 */ nop -/* E80E8 802C3738 92020000 */ lbu $v0, ($s0) -/* E80EC 802C373C 30420020 */ andi $v0, $v0, 0x20 -/* E80F0 802C3740 1040000E */ beqz $v0, .L802C377C -/* E80F4 802C3744 00000000 */ nop -/* E80F8 802C3748 3C05802E */ lui $a1, %hi(gScriptListCount) -/* E80FC 802C374C 24A5AC98 */ addiu $a1, $a1, %lo(gScriptListCount) -/* E8100 802C3750 8CA20000 */ lw $v0, ($a1) -/* E8104 802C3754 00022080 */ sll $a0, $v0, 2 -/* E8108 802C3758 3C01802E */ lui $at, %hi(gScriptIndexList) -/* E810C 802C375C 00240821 */ addu $at, $at, $a0 -/* E8110 802C3760 AC32A898 */ sw $s2, %lo(gScriptIndexList)($at) -/* E8114 802C3764 8E030144 */ lw $v1, 0x144($s0) -/* E8118 802C3768 24420001 */ addiu $v0, $v0, 1 -/* E811C 802C376C ACA20000 */ sw $v0, ($a1) -/* E8120 802C3770 3C01802E */ lui $at, %hi(gScriptIdList) -/* E8124 802C3774 00240821 */ addu $at, $at, $a0 -/* E8128 802C3778 AC23AA98 */ sw $v1, %lo(gScriptIdList)($at) -.L802C377C: -/* E812C 802C377C 0C0B0CE4 */ jal func_802C3390 -/* E8130 802C3780 0200202D */ daddu $a0, $s0, $zero -/* E8134 802C3784 3C03802E */ lui $v1, %hi(gStaticScriptCounter) -/* E8138 802C3788 24639CA0 */ addiu $v1, $v1, %lo(gStaticScriptCounter) -/* E813C 802C378C 8C620000 */ lw $v0, ($v1) -/* E8140 802C3790 14400004 */ bnez $v0, .L802C37A4 -/* E8144 802C3794 0200102D */ daddu $v0, $s0, $zero -/* E8148 802C3798 24020001 */ addiu $v0, $zero, 1 -/* E814C 802C379C AC620000 */ sw $v0, ($v1) -/* E8150 802C37A0 0200102D */ daddu $v0, $s0, $zero -.L802C37A4: -/* E8154 802C37A4 8FBF0028 */ lw $ra, 0x28($sp) -/* E8158 802C37A8 8FB50024 */ lw $s5, 0x24($sp) -/* E815C 802C37AC 8FB40020 */ lw $s4, 0x20($sp) -/* E8160 802C37B0 8FB3001C */ lw $s3, 0x1c($sp) -/* E8164 802C37B4 8FB20018 */ lw $s2, 0x18($sp) -/* E8168 802C37B8 8FB10014 */ lw $s1, 0x14($sp) -/* E816C 802C37BC 8FB00010 */ lw $s0, 0x10($sp) -/* E8170 802C37C0 03E00008 */ jr $ra -/* E8174 802C37C4 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/include/functions.h b/include/functions.h index 5805a0790a..033f72bb6e 100644 --- a/include/functions.h +++ b/include/functions.h @@ -81,7 +81,7 @@ void func_800ED5D0(Npc* partner); s32 func_800EF394(f32); s32 does_script_exist(s32 id); ScriptInstance* start_script(Bytecode* initialLine, s32 priority, s32 initialState); -ScriptInstance* start_script_in_group(Bytecode* initialLine, u8 priority, s32 initialState, u8 groupFlags); +ScriptInstance* start_script_in_group(Bytecode* initialLine, u8 priority, u8 initialState, u8 groupFlags); void func_8011B7C0(u16, s32, s32); void func_80137D88(s32, f32); diff --git a/src/code_e79b0_len_1920.c b/src/code_e79b0_len_1920.c index 9d45cb4c73..aa25db64af 100644 --- a/src/code_e79b0_len_1920.c +++ b/src/code_e79b0_len_1920.c @@ -231,13 +231,13 @@ INCLUDE_ASM(ScriptInstance*, "code_e79b0_len_1920", start_script, Bytecode* init s32 initialState); #endif -#ifdef NON_MATCHING -ScriptInstance* start_script_in_group(Bytecode* initialLine, u8 priority, s32 initialState, u8 groupFlags) { +ScriptInstance* start_script_in_group(Bytecode* initialLine, u8 priority, u8 initialState, u8 groupFlags) { ScriptInstance* newScript; s32 scriptListCount; s32 i; s32 curScriptIndex; - s32* tempCounter = &gStaticScriptCounter; + s32* tempCounter; + s32* numScripts; for (i = 0; i < MAX_SCRIPTS; i++) { if ((*gCurrentScriptListPtr)[i] == NULL) { @@ -248,59 +248,60 @@ ScriptInstance* start_script_in_group(Bytecode* initialLine, u8 priority, s32 in ASSERT(i < MAX_SCRIPTS); curScriptIndex = i; - SCRIPT_ALLOC(newScript, curScriptIndex); + (*gCurrentScriptListPtr)[curScriptIndex] = newScript = heap_malloc(sizeof(ScriptInstance)); + numScripts = &gNumScripts; + (*numScripts)++; + ASSERT(newScript != NULL); - newScript->state = (initialState | 1); - newScript->ptrNextLine = initialLine; - newScript->ptrFirstLine = initialLine; - newScript->ptrCurrentLine = initialLine; - newScript->currentOpcode = 0; - newScript->priority = priority; - newScript->unk_60 = NULL; - newScript->blockingParent = NULL; - newScript->childScript = NULL; - newScript->parentScript = NULL; - newScript->id = gStaticScriptCounter++; - newScript->owner1.actorID = -1; - newScript->owner2.npcID = -1; - newScript->loopDepth = -1; - newScript->switchDepth = -1; - newScript->groupFlags = groupFlags; - newScript->ptrSavedPosition = NULL; - newScript->frameCounter = 0.0f; - newScript->unk_158 = 0; - newScript->timeScale = gGlobalTimeSpace; + // Some of this function is surely macros. I think we'll learn more as we do others in this file. -Ethan + do { + newScript->state = initialState | 1; + newScript->currentOpcode = 0; + newScript->priority = priority; + newScript->id = gStaticScriptCounter++; + newScript->ptrNextLine = initialLine; + newScript->ptrFirstLine = initialLine; + newScript->ptrCurrentLine = initialLine; + newScript->unk_60 = 0; + newScript->blockingParent = 0; + newScript->childScript = 0; + newScript->parentScript = 0; + newScript->owner1.actorID = -1; + newScript->owner2.npcID = -1; + newScript->loopDepth = -1; + newScript->switchDepth = -1; + newScript->groupFlags = groupFlags; + newScript->ptrSavedPosition = 0; + newScript->frameCounter = 0.0f; + newScript->unk_158 = 0; + newScript->timeScale = gGlobalTimeSpace; + scriptListCount = 0; - scriptListCount = 0; + for (i = 0; i < ((s32)((sizeof(newScript->varTable)) / (sizeof(newScript->varTable[0])))); i++) { + newScript->varTable[i] = 0; + } + for (i = 0; i < ((s32)((sizeof(newScript->varFlags)) / (sizeof(newScript->varFlags[0])))); i++) { + newScript->varFlags[i] = 0; + } - for (i = 0; i < 16; i++) { - newScript->varTable[i] = 0; - } + find_script_labels(newScript); - for (i = 0; i < 3; i++) { - newScript->varFlags[i] = 0; - } - - find_script_labels(newScript); - - if ((D_802D9CA4 != 0) && ((newScript->state & 0x20) != 0)) { - scriptListCount = gScriptListCount++; - gScriptIndexList[scriptListCount] = curScriptIndex; - gScriptIdList[scriptListCount] = newScript->id; - } + if ((D_802D9CA4 != 0) && (newScript->state & 0x20)) { + scriptListCount = gScriptListCount++; + gScriptIndexList[scriptListCount] = curScriptIndex; + gScriptIdList[scriptListCount] = newScript->id; + } + } while (0); func_802C3390(newScript); + + tempCounter = &gStaticScriptCounter; if (*tempCounter == 0) { *tempCounter = 1; } -} -return newScript; + return newScript; } -#else -INCLUDE_ASM(ScriptInstance*, "code_e79b0_len_1920", start_script_in_group, Bytecode* initialLine, u8 priority, - s32 initialState, u8 groupFlags); -#endif INCLUDE_ASM(s32, "code_e79b0_len_1920", start_child_script); From 6c5e959a75bf9608a9972505039410073b9e3cdc Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Wed, 28 Oct 2020 15:11:05 -0400 Subject: [PATCH 07/78] cleanup --- src/code_F5750.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/code_F5750.c b/src/code_F5750.c index 558a6bdf71..02b1382646 100644 --- a/src/code_F5750.c +++ b/src/code_F5750.c @@ -239,7 +239,7 @@ INCLUDE_ASM(s32, "code_F5750", func_802D2484); INCLUDE_ASM(s32, "code_F5750", func_802D249C); ApiStatus func_802D24F4(ScriptInstance* script, s32 isInitialCall) { - return (gPlayerStatus.moveFrames == 0) * 2; + return (gPlayerStatus.moveFrames == 0) * ApiStatus_DONE2; } INCLUDE_ASM(s32, "code_F5750", func_802D2508); From 5961098ef9738f67e28659f2e046847f14da709b Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Wed, 28 Oct 2020 15:52:09 -0400 Subject: [PATCH 08/78] PR comments, match SetNpcPos --- src/code_f2470_len_27f0.c | 11 ++++------- src/world/area_mac/mac_00/7EAD10.c | 1 + 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/code_f2470_len_27f0.c b/src/code_f2470_len_27f0.c index 1bf62ec95c..11f538088f 100644 --- a/src/code_f2470_len_27f0.c +++ b/src/code_f2470_len_27f0.c @@ -35,7 +35,6 @@ ApiStatus GetNpcPointer(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -#ifdef NON_MATCHING ApiStatus SetNpcPos(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; NpcId npcID = get_variable(script, *args++); @@ -51,15 +50,13 @@ ApiStatus SetNpcPos(ScriptInstance* script, s32 isInitialCall) { npc->pos.x = x; npc->pos.y = y; npc->pos.z = z; - npc->colliderPos.x = x; - npc->colliderPos.y = y; - npc->colliderPos.z = z; + npc->colliderPos.x = npc->pos.x; + npc->colliderPos.y = npc->pos.y; + npc->colliderPos.z = npc->pos.z; npc->flags |= 0x10000; + return ApiStatus_DONE2; } -#else -INCLUDE_ASM(s32, "code_f2470_len_27f0", SetNpcPos, ScriptInstance* script, s32 isInitialCall); -#endif ApiStatus SetNpcRotation(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/world/area_mac/mac_00/7EAD10.c b/src/world/area_mac/mac_00/7EAD10.c index 614f0395f5..efed318073 100644 --- a/src/world/area_mac/mac_00/7EAD10.c +++ b/src/world/area_mac/mac_00/7EAD10.c @@ -26,6 +26,7 @@ ApiStatus func_80240034_7EAD44(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } } + return ApiStatus_BLOCK; } #else From b68eea5d666e40dfa16ed87f089320de45540c8e Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Wed, 28 Oct 2020 16:00:45 -0400 Subject: [PATCH 09/78] cleanup 2 --- .../code_f2470_len_27f0/SetNpcPos.s | 70 ------------------- src/code_f2470_len_27f0.c | 2 +- src/world/area_mac/mac_00/7EAD10.c | 2 +- 3 files changed, 2 insertions(+), 72 deletions(-) delete mode 100644 asm/nonmatchings/code_f2470_len_27f0/SetNpcPos.s diff --git a/asm/nonmatchings/code_f2470_len_27f0/SetNpcPos.s b/asm/nonmatchings/code_f2470_len_27f0/SetNpcPos.s deleted file mode 100644 index b3e899c07c..0000000000 --- a/asm/nonmatchings/code_f2470_len_27f0/SetNpcPos.s +++ /dev/null @@ -1,70 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel SetNpcPos -/* F2660 802CDCB0 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* F2664 802CDCB4 AFB10014 */ sw $s1, 0x14($sp) -/* F2668 802CDCB8 0080882D */ daddu $s1, $a0, $zero -/* F266C 802CDCBC AFBF001C */ sw $ra, 0x1c($sp) -/* F2670 802CDCC0 AFB20018 */ sw $s2, 0x18($sp) -/* F2674 802CDCC4 AFB00010 */ sw $s0, 0x10($sp) -/* F2678 802CDCC8 F7B80030 */ sdc1 $f24, 0x30($sp) -/* F267C 802CDCCC F7B60028 */ sdc1 $f22, 0x28($sp) -/* F2680 802CDCD0 F7B40020 */ sdc1 $f20, 0x20($sp) -/* F2684 802CDCD4 8E30000C */ lw $s0, 0xc($s1) -/* F2688 802CDCD8 8E050000 */ lw $a1, ($s0) -/* F268C 802CDCDC 0C0B1EAF */ jal get_variable -/* F2690 802CDCE0 26100004 */ addiu $s0, $s0, 4 -/* F2694 802CDCE4 8E050000 */ lw $a1, ($s0) -/* F2698 802CDCE8 26100004 */ addiu $s0, $s0, 4 -/* F269C 802CDCEC 0220202D */ daddu $a0, $s1, $zero -/* F26A0 802CDCF0 0C0B1EAF */ jal get_variable -/* F26A4 802CDCF4 0040902D */ daddu $s2, $v0, $zero -/* F26A8 802CDCF8 8E050000 */ lw $a1, ($s0) -/* F26AC 802CDCFC 26100004 */ addiu $s0, $s0, 4 -/* F26B0 802CDD00 4482C000 */ mtc1 $v0, $f24 -/* F26B4 802CDD04 00000000 */ nop -/* F26B8 802CDD08 4680C620 */ cvt.s.w $f24, $f24 -/* F26BC 802CDD0C 0C0B1EAF */ jal get_variable -/* F26C0 802CDD10 0220202D */ daddu $a0, $s1, $zero -/* F26C4 802CDD14 8E050000 */ lw $a1, ($s0) -/* F26C8 802CDD18 4482B000 */ mtc1 $v0, $f22 -/* F26CC 802CDD1C 00000000 */ nop -/* F26D0 802CDD20 4680B5A0 */ cvt.s.w $f22, $f22 -/* F26D4 802CDD24 0C0B1EAF */ jal get_variable -/* F26D8 802CDD28 0220202D */ daddu $a0, $s1, $zero -/* F26DC 802CDD2C 0220202D */ daddu $a0, $s1, $zero -/* F26E0 802CDD30 4482A000 */ mtc1 $v0, $f20 -/* F26E4 802CDD34 00000000 */ nop -/* F26E8 802CDD38 4680A520 */ cvt.s.w $f20, $f20 -/* F26EC 802CDD3C 0C0B36B0 */ jal resolve_npc -/* F26F0 802CDD40 0240282D */ daddu $a1, $s2, $zero -/* F26F4 802CDD44 0040282D */ daddu $a1, $v0, $zero -/* F26F8 802CDD48 10A0000F */ beqz $a1, .L802CDD88 -/* F26FC 802CDD4C 4600C006 */ mov.s $f0, $f24 -/* F2700 802CDD50 E4B80038 */ swc1 $f24, 0x38($a1) -/* F2704 802CDD54 E4B6003C */ swc1 $f22, 0x3c($a1) -/* F2708 802CDD58 4600B086 */ mov.s $f2, $f22 -/* F270C 802CDD5C E4B40040 */ swc1 $f20, 0x40($a1) -/* F2710 802CDD60 4600A106 */ mov.s $f4, $f20 -/* F2714 802CDD64 24020002 */ addiu $v0, $zero, 2 -/* F2718 802CDD68 8CA30000 */ lw $v1, ($a1) -/* F271C 802CDD6C 3C040001 */ lui $a0, 1 -/* F2720 802CDD70 E4A0006C */ swc1 $f0, 0x6c($a1) -/* F2724 802CDD74 E4A20070 */ swc1 $f2, 0x70($a1) -/* F2728 802CDD78 E4A40074 */ swc1 $f4, 0x74($a1) -/* F272C 802CDD7C 00641825 */ or $v1, $v1, $a0 -/* F2730 802CDD80 080B3763 */ j .L802CDD8C -/* F2734 802CDD84 ACA30000 */ sw $v1, ($a1) -.L802CDD88: -/* F2738 802CDD88 24020002 */ addiu $v0, $zero, 2 -.L802CDD8C: -/* F273C 802CDD8C 8FBF001C */ lw $ra, 0x1c($sp) -/* F2740 802CDD90 8FB20018 */ lw $s2, 0x18($sp) -/* F2744 802CDD94 8FB10014 */ lw $s1, 0x14($sp) -/* F2748 802CDD98 8FB00010 */ lw $s0, 0x10($sp) -/* F274C 802CDD9C D7B80030 */ ldc1 $f24, 0x30($sp) -/* F2750 802CDDA0 D7B60028 */ ldc1 $f22, 0x28($sp) -/* F2754 802CDDA4 D7B40020 */ ldc1 $f20, 0x20($sp) -/* F2758 802CDDA8 03E00008 */ jr $ra -/* F275C 802CDDAC 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/src/code_f2470_len_27f0.c b/src/code_f2470_len_27f0.c index 11f538088f..1bfc9e392e 100644 --- a/src/code_f2470_len_27f0.c +++ b/src/code_f2470_len_27f0.c @@ -54,7 +54,7 @@ ApiStatus SetNpcPos(ScriptInstance* script, s32 isInitialCall) { npc->colliderPos.y = npc->pos.y; npc->colliderPos.z = npc->pos.z; npc->flags |= 0x10000; - + return ApiStatus_DONE2; } diff --git a/src/world/area_mac/mac_00/7EAD10.c b/src/world/area_mac/mac_00/7EAD10.c index efed318073..fe29e1f8c2 100644 --- a/src/world/area_mac/mac_00/7EAD10.c +++ b/src/world/area_mac/mac_00/7EAD10.c @@ -26,7 +26,7 @@ ApiStatus func_80240034_7EAD44(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } } - + return ApiStatus_BLOCK; } #else From ea2f64830cef7deb828ccb060c7f9de5f57d4d78 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Wed, 28 Oct 2020 16:23:17 -0400 Subject: [PATCH 10/78] ASM refresh --- asm/nonmatchings/code_317E50/func_802BD758.s | 4 +-- asm/nonmatchings/code_319670/func_802BD660.s | 4 +-- asm/nonmatchings/code_31B120/func_802BD638.s | 4 +-- asm/nonmatchings/code_31DE70/func_802BD368.s | 4 +-- asm/nonmatchings/code_31DE70/func_802BD414.s | 4 +-- asm/nonmatchings/code_31DE70/func_802BE3A4.s | 4 +-- asm/nonmatchings/code_320C50/func_802BDDD8.s | 4 +-- asm/nonmatchings/code_323A50/func_802BD694.s | 4 +-- .../code_759b0_len_61b0/func_800E0818.s | 4 +-- .../code_759b0_len_61b0/update_player.s | 4 +-- asm/nonmatchings/code_7E3700/func_80282E30.s | 4 +-- asm/nonmatchings/code_7E3700/func_80283174.s | 4 +-- .../code_7bb60_len_41b0/check_input_jump.s | 4 +-- .../collision_main_above.s | 4 +-- .../collision_main_lateral.s | 4 +-- .../code_7bb60_len_41b0/func_800E3514.s | 4 +-- .../code_7bb60_len_41b0/func_800E4744.s | 4 +-- .../code_7bb60_len_41b0/phys_player_land.s | 4 +-- asm/nonmatchings/code_ED510/ResetFromLava.s | 4 +-- asm/nonmatchings/code_FBE10/func_802D7460.s | 28 +++++++++++++++++++ asm/nonmatchings/code_FBE10/func_802D74C0.s | 28 +++++++++++++++++++ .../entity_get_collision_flags.s | 4 +-- .../code_dbd70_len_700/clear_trigger_data.s | 4 +-- .../code_dbd70_len_700/update_triggers.s | 4 +-- .../dgb_03/C314E0/func_80240000_C314E0.s | 4 +-- .../kpa_04/A4BF60/func_80240000_A4BF60.s | 4 +-- .../kpa_111/A99590/func_80240000_A99590.s | 4 +-- .../kpa_113/A9CC70/func_80240040_A9CC70.s | 4 +-- .../kpa_115/A9ED40/func_80240000_A9ED40.s | 4 +-- .../kpa_12/A54CA0/func_8024037C_A54CCC.s | 4 +-- .../kpa_13/A56270/func_8024037C_A5629C.s | 4 +-- .../kpa_14/A57830/func_8024073C_A57BEC.s | 4 +-- .../kzn_02/C5AA50/func_802403DC_C5AB1C.s | 4 +-- .../kzn_11/C804B0/func_80240310_C804B0.s | 4 +-- .../obk_03/BC4B50/func_802408D0_BC4B50.s | 4 +-- .../obk_05/BCD060/func_80240050_BCD0B0.s | 4 +-- .../omo_09/DCCCD0/func_80240078_DCCD48.s | 4 +-- .../pra_22/D788A0/func_80240020_D788A0.s | 4 +-- .../pra_31/D7F270/func_80240FF0_D7FD50.s | 4 +-- .../pra_33/D89700/func_80240F20_D8A600.s | 4 +-- .../sam_11/D3ADA0/func_80241FB0_D3C580.s | 4 +-- 41 files changed, 134 insertions(+), 78 deletions(-) create mode 100644 asm/nonmatchings/code_FBE10/func_802D7460.s create mode 100644 asm/nonmatchings/code_FBE10/func_802D74C0.s diff --git a/asm/nonmatchings/code_317E50/func_802BD758.s b/asm/nonmatchings/code_317E50/func_802BD758.s index 66429a51fa..96df531688 100644 --- a/asm/nonmatchings/code_317E50/func_802BD758.s +++ b/asm/nonmatchings/code_317E50/func_802BD758.s @@ -11,8 +11,8 @@ glabel func_802BD758 /* 3184C0 802BD770 3C138011 */ lui $s3, %hi(gPlayerStatus) /* 3184C4 802BD774 2673EFC8 */ addiu $s3, $s3, %lo(gPlayerStatus) /* 3184C8 802BD778 AFB40040 */ sw $s4, 0x40($sp) -/* 3184CC 802BD77C 3C148016 */ lui $s4, 0x8016 -/* 3184D0 802BD780 2694A550 */ addiu $s4, $s4, -0x5ab0 +/* 3184CC 802BD77C 3C148016 */ lui $s4, %hi(gCollisionStatus) +/* 3184D0 802BD780 2694A550 */ addiu $s4, $s4, %lo(gCollisionStatus) /* 3184D4 802BD784 AFB50044 */ sw $s5, 0x44($sp) /* 3184D8 802BD788 3C158011 */ lui $s5, %hi(D_8010EBB0) /* 3184DC 802BD78C 26B5EBB0 */ addiu $s5, $s5, %lo(D_8010EBB0) diff --git a/asm/nonmatchings/code_319670/func_802BD660.s b/asm/nonmatchings/code_319670/func_802BD660.s index a6809fd67e..60464d1e94 100644 --- a/asm/nonmatchings/code_319670/func_802BD660.s +++ b/asm/nonmatchings/code_319670/func_802BD660.s @@ -298,8 +298,8 @@ glabel func_802BD660 /* 31A030 802BDAC0 0000282D */ daddu $a1, $zero, $zero /* 31A034 802BDAC4 0C052742 */ jal play_sound_at_npc /* 31A038 802BDAC8 2406FFFC */ addiu $a2, $zero, -4 -/* 31A03C 802BDACC 3C038016 */ lui $v1, 0x8016 -/* 31A040 802BDAD0 2463A550 */ addiu $v1, $v1, -0x5ab0 +/* 31A03C 802BDACC 3C038016 */ lui $v1, %hi(gCollisionStatus) +/* 31A040 802BDAD0 2463A550 */ addiu $v1, $v1, %lo(gCollisionStatus) /* 31A044 802BDAD4 2402FFFF */ addiu $v0, $zero, -1 /* 31A048 802BDAD8 A4620004 */ sh $v0, 4($v1) /* 31A04C 802BDADC A4620002 */ sh $v0, 2($v1) diff --git a/asm/nonmatchings/code_31B120/func_802BD638.s b/asm/nonmatchings/code_31B120/func_802BD638.s index f1ee71ce5c..5790f6fb82 100644 --- a/asm/nonmatchings/code_31B120/func_802BD638.s +++ b/asm/nonmatchings/code_31B120/func_802BD638.s @@ -379,8 +379,8 @@ glabel func_802BD638 /* 31BBFC 802BDBDC 00000000 */ nop /* 31BC00 802BDBE0 46800020 */ cvt.s.w $f0, $f0 /* 31BC04 802BDBE4 46001081 */ sub.s $f2, $f2, $f0 -/* 31BC08 802BDBE8 3C028016 */ lui $v0, 0x8016 -/* 31BC0C 802BDBEC 2442A550 */ addiu $v0, $v0, -0x5ab0 +/* 31BC08 802BDBE8 3C028016 */ lui $v0, %hi(gCollisionStatus) +/* 31BC0C 802BDBEC 2442A550 */ addiu $v0, $v0, %lo(gCollisionStatus) /* 31BC10 802BDBF0 A4430008 */ sh $v1, 8($v0) /* 31BC14 802BDBF4 0C0AF451 */ jal func_802BD144 /* 31BC18 802BDBF8 E682002C */ swc1 $f2, 0x2c($s4) diff --git a/asm/nonmatchings/code_31DE70/func_802BD368.s b/asm/nonmatchings/code_31DE70/func_802BD368.s index 62dd04e912..a689be4320 100644 --- a/asm/nonmatchings/code_31DE70/func_802BD368.s +++ b/asm/nonmatchings/code_31DE70/func_802BD368.s @@ -10,8 +10,8 @@ glabel func_802BD368 /* 31E0EC 802BD37C C7A6004C */ lwc1 $f6, 0x4c($sp) /* 31E0F0 802BD380 27A20020 */ addiu $v0, $sp, 0x20 /* 31E0F4 802BD384 AFB00028 */ sw $s0, 0x28($sp) -/* 31E0F8 802BD388 3C108016 */ lui $s0, 0x8016 -/* 31E0FC 802BD38C 2610A550 */ addiu $s0, $s0, -0x5ab0 +/* 31E0F8 802BD388 3C108016 */ lui $s0, %hi(gCollisionStatus) +/* 31E0FC 802BD38C 2610A550 */ addiu $s0, $s0, %lo(gCollisionStatus) /* 31E100 802BD390 AFB1002C */ sw $s1, 0x2c($sp) /* 31E104 802BD394 0200882D */ daddu $s1, $s0, $zero /* 31E108 802BD398 AFA5003C */ sw $a1, 0x3c($sp) diff --git a/asm/nonmatchings/code_31DE70/func_802BD414.s b/asm/nonmatchings/code_31DE70/func_802BD414.s index e02d2dda93..c15198b87d 100644 --- a/asm/nonmatchings/code_31DE70/func_802BD414.s +++ b/asm/nonmatchings/code_31DE70/func_802BD414.s @@ -22,8 +22,8 @@ glabel func_802BD414 /* 31E1C8 802BD458 2694EFC8 */ addiu $s4, $s4, %lo(gPlayerStatus) /* 31E1CC 802BD45C 3C158011 */ lui $s5, %hi(D_8010EBB0) /* 31E1D0 802BD460 26B5EBB0 */ addiu $s5, $s5, %lo(D_8010EBB0) -/* 31E1D4 802BD464 3C118016 */ lui $s1, 0x8016 -/* 31E1D8 802BD468 2631A550 */ addiu $s1, $s1, -0x5ab0 +/* 31E1D4 802BD464 3C118016 */ lui $s1, %hi(gCollisionStatus) +/* 31E1D8 802BD468 2631A550 */ addiu $s1, $s1, %lo(gCollisionStatus) /* 31E1DC 802BD46C 3C02802C */ lui $v0, 0x802c /* 31E1E0 802BD470 8C42FEE4 */ lw $v0, -0x11c($v0) /* 31E1E4 802BD474 3C014200 */ lui $at, 0x4200 diff --git a/asm/nonmatchings/code_31DE70/func_802BE3A4.s b/asm/nonmatchings/code_31DE70/func_802BE3A4.s index 29495b12e1..763a1cf6e9 100644 --- a/asm/nonmatchings/code_31DE70/func_802BE3A4.s +++ b/asm/nonmatchings/code_31DE70/func_802BE3A4.s @@ -12,8 +12,8 @@ glabel func_802BE3A4 /* 31F130 802BE3C0 3C108011 */ lui $s0, %hi(gPlayerData) /* 31F134 802BE3C4 2610F290 */ addiu $s0, $s0, %lo(gPlayerData) /* 31F138 802BE3C8 AFB60060 */ sw $s6, 0x60($sp) -/* 31F13C 802BE3CC 3C168016 */ lui $s6, 0x8016 -/* 31F140 802BE3D0 26D6A550 */ addiu $s6, $s6, -0x5ab0 +/* 31F13C 802BE3CC 3C168016 */ lui $s6, %hi(gCollisionStatus) +/* 31F140 802BE3D0 26D6A550 */ addiu $s6, $s6, %lo(gCollisionStatus) /* 31F144 802BE3D4 AFB40058 */ sw $s4, 0x58($sp) /* 31F148 802BE3D8 3C148011 */ lui $s4, %hi(D_8010EBB0) /* 31F14C 802BE3DC 2694EBB0 */ addiu $s4, $s4, %lo(D_8010EBB0) diff --git a/asm/nonmatchings/code_320C50/func_802BDDD8.s b/asm/nonmatchings/code_320C50/func_802BDDD8.s index 30e252d063..8b1ceab8f5 100644 --- a/asm/nonmatchings/code_320C50/func_802BDDD8.s +++ b/asm/nonmatchings/code_320C50/func_802BDDD8.s @@ -23,8 +23,8 @@ glabel func_802BDDD8 /* 321970 802BDE20 00000000 */ nop /* 321974 802BDE24 3C148011 */ lui $s4, %hi(gPlayerStatus) /* 321978 802BDE28 2694EFC8 */ addiu $s4, $s4, %lo(gPlayerStatus) -/* 32197C 802BDE2C 3C158016 */ lui $s5, 0x8016 -/* 321980 802BDE30 26B5A550 */ addiu $s5, $s5, -0x5ab0 +/* 32197C 802BDE2C 3C158016 */ lui $s5, %hi(gCollisionStatus) +/* 321980 802BDE30 26B5A550 */ addiu $s5, $s5, %lo(gCollisionStatus) /* 321984 802BDE34 304200FF */ andi $v0, $v0, 0xff /* 321988 802BDE38 24030003 */ addiu $v1, $zero, 3 /* 32198C 802BDE3C 14430008 */ bne $v0, $v1, .L802BDE60 diff --git a/asm/nonmatchings/code_323A50/func_802BD694.s b/asm/nonmatchings/code_323A50/func_802BD694.s index abb68ebb57..d4e9227bfd 100644 --- a/asm/nonmatchings/code_323A50/func_802BD694.s +++ b/asm/nonmatchings/code_323A50/func_802BD694.s @@ -12,8 +12,8 @@ glabel func_802BD694 /* 324000 802BD6B0 3C158011 */ lui $s5, %hi(D_8010EBB0) /* 324004 802BD6B4 26B5EBB0 */ addiu $s5, $s5, %lo(D_8010EBB0) /* 324008 802BD6B8 AFB10024 */ sw $s1, 0x24($sp) -/* 32400C 802BD6BC 3C118016 */ lui $s1, 0x8016 -/* 324010 802BD6C0 2631A550 */ addiu $s1, $s1, -0x5ab0 +/* 32400C 802BD6BC 3C118016 */ lui $s1, %hi(gCollisionStatus) +/* 324010 802BD6C0 2631A550 */ addiu $s1, $s1, %lo(gCollisionStatus) /* 324014 802BD6C4 AFBF0038 */ sw $ra, 0x38($sp) /* 324018 802BD6C8 AFB20028 */ sw $s2, 0x28($sp) /* 32401C 802BD6CC AFB00020 */ sw $s0, 0x20($sp) diff --git a/asm/nonmatchings/code_759b0_len_61b0/func_800E0818.s b/asm/nonmatchings/code_759b0_len_61b0/func_800E0818.s index 2f766f2b06..9daa6867db 100644 --- a/asm/nonmatchings/code_759b0_len_61b0/func_800E0818.s +++ b/asm/nonmatchings/code_759b0_len_61b0/func_800E0818.s @@ -27,8 +27,8 @@ glabel func_800E0818 /* 79D20 800E0870 8C42C958 */ lw $v0, -0x36a8($v0) /* 79D24 800E0874 14400073 */ bnez $v0, .L800E0A44 /* 79D28 800E0878 00000000 */ nop -/* 79D2C 800E087C 3C038016 */ lui $v1, 0x8016 -/* 79D30 800E0880 2463A550 */ addiu $v1, $v1, -0x5ab0 +/* 79D2C 800E087C 3C038016 */ lui $v1, %hi(gCollisionStatus) +/* 79D30 800E0880 2463A550 */ addiu $v1, $v1, %lo(gCollisionStatus) /* 79D34 800E0884 82220015 */ lb $v0, 0x15($s1) /* 79D38 800E0888 10400006 */ beqz $v0, .L800E08A4 /* 79D3C 800E088C 84700012 */ lh $s0, 0x12($v1) diff --git a/asm/nonmatchings/code_759b0_len_61b0/update_player.s b/asm/nonmatchings/code_759b0_len_61b0/update_player.s index 444f6f327d..1d834849ba 100644 --- a/asm/nonmatchings/code_759b0_len_61b0/update_player.s +++ b/asm/nonmatchings/code_759b0_len_61b0/update_player.s @@ -10,8 +10,8 @@ glabel update_player /* 78C04 800DF754 3C108011 */ lui $s0, %hi(gPlayerStatus) /* 78C08 800DF758 2610EFC8 */ addiu $s0, $s0, %lo(gPlayerStatus) /* 78C0C 800DF75C 860200C0 */ lh $v0, 0xc0($s0) -/* 78C10 800DF760 3C118016 */ lui $s1, 0x8016 -/* 78C14 800DF764 2631A550 */ addiu $s1, $s1, -0x5ab0 +/* 78C10 800DF760 3C118016 */ lui $s1, %hi(gCollisionStatus) +/* 78C14 800DF764 2631A550 */ addiu $s1, $s1, %lo(gCollisionStatus) /* 78C18 800DF768 28420065 */ slti $v0, $v0, 0x65 /* 78C1C 800DF76C 10400009 */ beqz $v0, .L800DF794 /* 78C20 800DF770 00000000 */ nop diff --git a/asm/nonmatchings/code_7E3700/func_80282E30.s b/asm/nonmatchings/code_7E3700/func_80282E30.s index 72066f8e25..c76b40eceb 100644 --- a/asm/nonmatchings/code_7E3700/func_80282E30.s +++ b/asm/nonmatchings/code_7E3700/func_80282E30.s @@ -141,8 +141,8 @@ glabel func_80282E30 /* 7E3EBC 8028303C 90420000 */ lbu $v0, ($v0) /* 7E3EC0 80283040 14400008 */ bnez $v0, .L80283064 /* 7E3EC4 80283044 24020001 */ addiu $v0, $zero, 1 -/* 7E3EC8 80283048 3C038016 */ lui $v1, 0x8016 -/* 7E3ECC 8028304C 8463A550 */ lh $v1, -0x5ab0($v1) +/* 7E3EC8 80283048 3C038016 */ lui $v1, %hi(gCollisionStatus) +/* 7E3ECC 8028304C 8463A550 */ lh $v1, %lo(gCollisionStatus)($v1) /* 7E3ED0 80283050 2402FFFF */ addiu $v0, $zero, -1 /* 7E3ED4 80283054 10620003 */ beq $v1, $v0, .L80283064 /* 7E3ED8 80283058 24020001 */ addiu $v0, $zero, 1 diff --git a/asm/nonmatchings/code_7E3700/func_80283174.s b/asm/nonmatchings/code_7E3700/func_80283174.s index 8f27dab64f..9ba84c5043 100644 --- a/asm/nonmatchings/code_7E3700/func_80283174.s +++ b/asm/nonmatchings/code_7E3700/func_80283174.s @@ -5,8 +5,8 @@ glabel func_80283174 /* 7E3FF4 80283174 3C058011 */ lui $a1, %hi(gPlayerStatus) /* 7E3FF8 80283178 24A5EFC8 */ addiu $a1, $a1, %lo(gPlayerStatus) /* 7E3FFC 8028317C 8C8200B0 */ lw $v0, 0xb0($a0) -/* 7E4000 80283180 3C038016 */ lui $v1, 0x8016 -/* 7E4004 80283184 8463A550 */ lh $v1, -0x5ab0($v1) +/* 7E4000 80283180 3C038016 */ lui $v1, %hi(gCollisionStatus) +/* 7E4004 80283184 8463A550 */ lh $v1, %lo(gCollisionStatus)($v1) /* 7E4008 80283188 24424000 */ addiu $v0, $v0, 0x4000 /* 7E400C 8028318C 5462000F */ bnel $v1, $v0, .L802831CC /* 7E4010 80283190 AC8000B8 */ sw $zero, 0xb8($a0) diff --git a/asm/nonmatchings/code_7bb60_len_41b0/check_input_jump.s b/asm/nonmatchings/code_7bb60_len_41b0/check_input_jump.s index 29d8d1bc59..e1924850a0 100644 --- a/asm/nonmatchings/code_7bb60_len_41b0/check_input_jump.s +++ b/asm/nonmatchings/code_7bb60_len_41b0/check_input_jump.s @@ -9,8 +9,8 @@ glabel check_input_jump /* 7F620 800E6170 AFBF0018 */ sw $ra, 0x18($sp) /* 7F624 800E6174 AFB00010 */ sw $s0, 0x10($sp) /* 7F628 800E6178 8E2200E0 */ lw $v0, 0xe0($s1) -/* 7F62C 800E617C 3C108016 */ lui $s0, 0x8016 -/* 7F630 800E6180 2610A550 */ addiu $s0, $s0, -0x5ab0 +/* 7F62C 800E617C 3C108016 */ lui $s0, %hi(gCollisionStatus) +/* 7F630 800E6180 2610A550 */ addiu $s0, $s0, %lo(gCollisionStatus) /* 7F634 800E6184 30428000 */ andi $v0, $v0, 0x8000 /* 7F638 800E6188 10400032 */ beqz $v0, .L800E6254 /* 7F63C 800E618C 0000102D */ daddu $v0, $zero, $zero diff --git a/asm/nonmatchings/code_7bb60_len_41b0/collision_main_above.s b/asm/nonmatchings/code_7bb60_len_41b0/collision_main_above.s index 7c68455b71..7425538c46 100644 --- a/asm/nonmatchings/code_7bb60_len_41b0/collision_main_above.s +++ b/asm/nonmatchings/code_7bb60_len_41b0/collision_main_above.s @@ -32,8 +32,8 @@ glabel collision_main_above /* 7BCFC 800E284C E7A00024 */ swc1 $f0, 0x24($sp) /* 7BD00 800E2850 C7A2001C */ lwc1 $f2, 0x1c($sp) /* 7BD04 800E2854 44800000 */ mtc1 $zero, $f0 -/* 7BD08 800E2858 3C128016 */ lui $s2, 0x8016 -/* 7BD0C 800E285C 2652A550 */ addiu $s2, $s2, -0x5ab0 +/* 7BD08 800E2858 3C128016 */ lui $s2, %hi(gCollisionStatus) +/* 7BD0C 800E285C 2652A550 */ addiu $s2, $s2, %lo(gCollisionStatus) /* 7BD10 800E2860 46001032 */ c.eq.s $f2, $f0 /* 7BD14 800E2864 00000000 */ nop /* 7BD18 800E2868 45010004 */ bc1t .L800E287C diff --git a/asm/nonmatchings/code_7bb60_len_41b0/collision_main_lateral.s b/asm/nonmatchings/code_7bb60_len_41b0/collision_main_lateral.s index 2b3397af58..9f7db66963 100644 --- a/asm/nonmatchings/code_7bb60_len_41b0/collision_main_lateral.s +++ b/asm/nonmatchings/code_7bb60_len_41b0/collision_main_lateral.s @@ -7,8 +7,8 @@ glabel collision_main_lateral /* 7CAF4 800E3644 3C118011 */ lui $s1, %hi(gPlayerStatus) /* 7CAF8 800E3648 2631EFC8 */ addiu $s1, $s1, %lo(gPlayerStatus) /* 7CAFC 800E364C AFB40068 */ sw $s4, 0x68($sp) -/* 7CB00 800E3650 3C148016 */ lui $s4, 0x8016 -/* 7CB04 800E3654 2694A550 */ addiu $s4, $s4, -0x5ab0 +/* 7CB00 800E3650 3C148016 */ lui $s4, %hi(gCollisionStatus) +/* 7CB04 800E3654 2694A550 */ addiu $s4, $s4, %lo(gCollisionStatus) /* 7CB08 800E3658 AFBF006C */ sw $ra, 0x6c($sp) /* 7CB0C 800E365C AFB30064 */ sw $s3, 0x64($sp) /* 7CB10 800E3660 AFB20060 */ sw $s2, 0x60($sp) diff --git a/asm/nonmatchings/code_7bb60_len_41b0/func_800E3514.s b/asm/nonmatchings/code_7bb60_len_41b0/func_800E3514.s index 7ae758016b..5961d95f45 100644 --- a/asm/nonmatchings/code_7bb60_len_41b0/func_800E3514.s +++ b/asm/nonmatchings/code_7bb60_len_41b0/func_800E3514.s @@ -45,8 +45,8 @@ glabel func_800E3514 /* 7CA64 800E35B4 27A20044 */ addiu $v0, $sp, 0x44 /* 7CA68 800E35B8 0C03791B */ jal func_800DE46C /* 7CA6C 800E35BC AFA20020 */ sw $v0, 0x20($sp) -/* 7CA70 800E35C0 3C128016 */ lui $s2, 0x8016 -/* 7CA74 800E35C4 2652A550 */ addiu $s2, $s2, -0x5ab0 +/* 7CA70 800E35C0 3C128016 */ lui $s2, %hi(gCollisionStatus) +/* 7CA74 800E35C4 2652A550 */ addiu $s2, $s2, %lo(gCollisionStatus) /* 7CA78 800E35C8 AE020000 */ sw $v0, ($s0) /* 7CA7C 800E35CC 04410010 */ bgez $v0, .L800E3610 /* 7CA80 800E35D0 0240802D */ daddu $s0, $s2, $zero diff --git a/asm/nonmatchings/code_7bb60_len_41b0/func_800E4744.s b/asm/nonmatchings/code_7bb60_len_41b0/func_800E4744.s index aa2d0cd990..bbadc4fa92 100644 --- a/asm/nonmatchings/code_7bb60_len_41b0/func_800E4744.s +++ b/asm/nonmatchings/code_7bb60_len_41b0/func_800E4744.s @@ -57,8 +57,8 @@ glabel func_800E4744 /* 7DCC4 800E4814 2673EBB0 */ addiu $s3, $s3, %lo(D_8010EBB0) /* 7DCC8 800E4818 C7A20034 */ lwc1 $f2, 0x34($sp) /* 7DCCC 800E481C 4614B500 */ add.s $f20, $f22, $f20 -/* 7DCD0 800E4820 3C148016 */ lui $s4, 0x8016 -/* 7DCD4 800E4824 2694A550 */ addiu $s4, $s4, -0x5ab0 +/* 7DCD0 800E4820 3C148016 */ lui $s4, %hi(gCollisionStatus) +/* 7DCD4 800E4824 2694A550 */ addiu $s4, $s4, %lo(gCollisionStatus) /* 7DCD8 800E4828 4602A03C */ c.lt.s $f20, $f2 /* 7DCDC 800E482C 00000000 */ nop /* 7DCE0 800E4830 45000002 */ bc1f .L800E483C diff --git a/asm/nonmatchings/code_7bb60_len_41b0/phys_player_land.s b/asm/nonmatchings/code_7bb60_len_41b0/phys_player_land.s index b9cac8954e..48dff095ef 100644 --- a/asm/nonmatchings/code_7bb60_len_41b0/phys_player_land.s +++ b/asm/nonmatchings/code_7bb60_len_41b0/phys_player_land.s @@ -25,8 +25,8 @@ glabel phys_player_land /* 7C778 800E32C8 E6020048 */ swc1 $f2, 0x48($s0) /* 7C77C 800E32CC 0C052736 */ jal play_sound_at_player /* 7C780 800E32D0 AE030000 */ sw $v1, ($s0) -/* 7C784 800E32D4 3C038016 */ lui $v1, 0x8016 -/* 7C788 800E32D8 2463A550 */ addiu $v1, $v1, -0x5ab0 +/* 7C784 800E32D4 3C038016 */ lui $v1, %hi(gCollisionStatus) +/* 7C788 800E32D8 2463A550 */ addiu $v1, $v1, %lo(gCollisionStatus) /* 7C78C 800E32DC 94620002 */ lhu $v0, 2($v1) /* 7C790 800E32E0 30424000 */ andi $v0, $v0, 0x4000 /* 7C794 800E32E4 14400003 */ bnez $v0, .L800E32F4 diff --git a/asm/nonmatchings/code_ED510/ResetFromLava.s b/asm/nonmatchings/code_ED510/ResetFromLava.s index dea3bba74b..36aad51e0f 100644 --- a/asm/nonmatchings/code_ED510/ResetFromLava.s +++ b/asm/nonmatchings/code_ED510/ResetFromLava.s @@ -42,8 +42,8 @@ glabel ResetFromLava /* EE910 802C9F60 3C01802E */ lui $at, 0x802e /* EE914 802C9F64 AC22ADA4 */ sw $v0, -0x525c($at) .L802C9F68: -/* EE918 802C9F68 3C028016 */ lui $v0, 0x8016 -/* EE91C 802C9F6C 2442A550 */ addiu $v0, $v0, -0x5ab0 +/* EE918 802C9F68 3C028016 */ lui $v0, %hi(gCollisionStatus) +/* EE91C 802C9F6C 2442A550 */ addiu $v0, $v0, %lo(gCollisionStatus) /* EE920 802C9F70 94430002 */ lhu $v1, 2($v0) /* EE924 802C9F74 30624000 */ andi $v0, $v1, 0x4000 /* EE928 802C9F78 1440000F */ bnez $v0, .L802C9FB8 diff --git a/asm/nonmatchings/code_FBE10/func_802D7460.s b/asm/nonmatchings/code_FBE10/func_802D7460.s new file mode 100644 index 0000000000..a7d880f6d7 --- /dev/null +++ b/asm/nonmatchings/code_FBE10/func_802D7460.s @@ -0,0 +1,28 @@ +.set noat # allow manual use of $at +.set noreorder # don't insert nops after branches + +glabel func_802D7460 +/* FBE10 802D7460 27BDFFD8 */ addiu $sp, $sp, -0x28 +/* FBE14 802D7464 24E2001E */ addiu $v0, $a3, 0x1e +/* FBE18 802D7468 44820000 */ mtc1 $v0, $f0 +/* FBE1C 802D746C 00000000 */ nop +/* FBE20 802D7470 46800020 */ cvt.s.w $f0, $f0 +/* FBE24 802D7474 000717C2 */ srl $v0, $a3, 0x1f +/* FBE28 802D7478 00E23821 */ addu $a3, $a3, $v0 +/* FBE2C 802D747C 00073843 */ sra $a3, $a3, 1 +/* FBE30 802D7480 24E7000A */ addiu $a3, $a3, 0xa +/* FBE34 802D7484 44861000 */ mtc1 $a2, $f2 +/* FBE38 802D7488 44056000 */ mfc1 $a1, $f12 +/* FBE3C 802D748C 44067000 */ mfc1 $a2, $f14 +/* FBE40 802D7490 2402001E */ addiu $v0, $zero, 0x1e +/* FBE44 802D7494 AFA70018 */ sw $a3, 0x18($sp) +/* FBE48 802D7498 44071000 */ mfc1 $a3, $f2 +/* FBE4C 802D749C 24040001 */ addiu $a0, $zero, 1 +/* FBE50 802D74A0 AFBF0020 */ sw $ra, 0x20($sp) +/* FBE54 802D74A4 E7A00010 */ swc1 $f0, 0x10($sp) +/* FBE58 802D74A8 E7A00014 */ swc1 $f0, 0x14($sp) +/* FBE5C 802D74AC 0C01C154 */ jal func_80070550 +/* FBE60 802D74B0 AFA2001C */ sw $v0, 0x1c($sp) +/* FBE64 802D74B4 8FBF0020 */ lw $ra, 0x20($sp) +/* FBE68 802D74B8 03E00008 */ jr $ra +/* FBE6C 802D74BC 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/code_FBE10/func_802D74C0.s b/asm/nonmatchings/code_FBE10/func_802D74C0.s new file mode 100644 index 0000000000..3a7037aa26 --- /dev/null +++ b/asm/nonmatchings/code_FBE10/func_802D74C0.s @@ -0,0 +1,28 @@ +.set noat # allow manual use of $at +.set noreorder # don't insert nops after branches + +glabel func_802D74C0 +/* FBE70 802D74C0 27BDFFD8 */ addiu $sp, $sp, -0x28 +/* FBE74 802D74C4 24E2001E */ addiu $v0, $a3, 0x1e +/* FBE78 802D74C8 44820000 */ mtc1 $v0, $f0 +/* FBE7C 802D74CC 00000000 */ nop +/* FBE80 802D74D0 46800020 */ cvt.s.w $f0, $f0 +/* FBE84 802D74D4 000717C2 */ srl $v0, $a3, 0x1f +/* FBE88 802D74D8 00E23821 */ addu $a3, $a3, $v0 +/* FBE8C 802D74DC 00073843 */ sra $a3, $a3, 1 +/* FBE90 802D74E0 24E7000A */ addiu $a3, $a3, 0xa +/* FBE94 802D74E4 44861000 */ mtc1 $a2, $f2 +/* FBE98 802D74E8 44056000 */ mfc1 $a1, $f12 +/* FBE9C 802D74EC 44067000 */ mfc1 $a2, $f14 +/* FBEA0 802D74F0 2402001E */ addiu $v0, $zero, 0x1e +/* FBEA4 802D74F4 AFA70018 */ sw $a3, 0x18($sp) +/* FBEA8 802D74F8 44071000 */ mfc1 $a3, $f2 +/* FBEAC 802D74FC 24040002 */ addiu $a0, $zero, 2 +/* FBEB0 802D7500 AFBF0020 */ sw $ra, 0x20($sp) +/* FBEB4 802D7504 E7A00010 */ swc1 $f0, 0x10($sp) +/* FBEB8 802D7508 E7A00014 */ swc1 $f0, 0x14($sp) +/* FBEBC 802D750C 0C01C154 */ jal func_80070550 +/* FBEC0 802D7510 AFA2001C */ sw $v0, 0x1c($sp) +/* FBEC4 802D7514 8FBF0020 */ lw $ra, 0x20($sp) +/* FBEC8 802D7518 03E00008 */ jr $ra +/* FBECC 802D751C 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/entity_get_collision_flags.s b/asm/nonmatchings/code_a5dd0_len_114e0/entity_get_collision_flags.s index e610153ced..76d64f0484 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/entity_get_collision_flags.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/entity_get_collision_flags.s @@ -44,8 +44,8 @@ glabel entity_get_collision_flags /* A7048 80110948 50C20001 */ beql $a2, $v0, .L80110950 /* A704C 8011094C 34A50004 */ ori $a1, $a1, 4 .L80110950: -/* A7050 80110950 3C038016 */ lui $v1, 0x8016 -/* A7054 80110954 8463A550 */ lh $v1, -0x5ab0($v1) +/* A7050 80110950 3C038016 */ lui $v1, %hi(gCollisionStatus) +/* A7054 80110954 8463A550 */ lh $v1, %lo(gCollisionStatus)($v1) /* A7058 80110958 2402FFFF */ addiu $v0, $zero, -1 /* A705C 8011095C 10620005 */ beq $v1, $v0, .L80110974 /* A7060 80110960 30624000 */ andi $v0, $v1, 0x4000 diff --git a/asm/nonmatchings/code_dbd70_len_700/clear_trigger_data.s b/asm/nonmatchings/code_dbd70_len_700/clear_trigger_data.s index a8451cc203..bf3cecc2dc 100644 --- a/asm/nonmatchings/code_dbd70_len_700/clear_trigger_data.s +++ b/asm/nonmatchings/code_dbd70_len_700/clear_trigger_data.s @@ -5,8 +5,8 @@ glabel clear_trigger_data /* DBD80 80145680 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* DBD84 80145684 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* DBD88 80145688 80420070 */ lb $v0, 0x70($v0) -/* DBD8C 8014568C 3C048016 */ lui $a0, 0x8016 -/* DBD90 80145690 2484A550 */ addiu $a0, $a0, -0x5ab0 +/* DBD8C 8014568C 3C048016 */ lui $a0, %hi(gCollisionStatus) +/* DBD90 80145690 2484A550 */ addiu $a0, $a0, %lo(gCollisionStatus) /* DBD94 80145694 14400005 */ bnez $v0, .L801456AC /* DBD98 80145698 00000000 */ nop /* DBD9C 8014569C 3C028016 */ lui $v0, %hi(gTriggerList1) diff --git a/asm/nonmatchings/code_dbd70_len_700/update_triggers.s b/asm/nonmatchings/code_dbd70_len_700/update_triggers.s index 728a45e557..471505641d 100644 --- a/asm/nonmatchings/code_dbd70_len_700/update_triggers.s +++ b/asm/nonmatchings/code_dbd70_len_700/update_triggers.s @@ -4,8 +4,8 @@ glabel update_triggers /* DBF60 80145860 27BDFFD0 */ addiu $sp, $sp, -0x30 /* DBF64 80145864 AFB20020 */ sw $s2, 0x20($sp) -/* DBF68 80145868 3C128016 */ lui $s2, 0x8016 -/* DBF6C 8014586C 2652A550 */ addiu $s2, $s2, -0x5ab0 +/* DBF68 80145868 3C128016 */ lui $s2, %hi(gCollisionStatus) +/* DBF6C 8014586C 2652A550 */ addiu $s2, $s2, %lo(gCollisionStatus) /* DBF70 80145870 AFB30024 */ sw $s3, 0x24($sp) /* DBF74 80145874 0000982D */ daddu $s3, $zero, $zero /* DBF78 80145878 AFBF0028 */ sw $ra, 0x28($sp) diff --git a/asm/nonmatchings/world/area_dgb/dgb_03/C314E0/func_80240000_C314E0.s b/asm/nonmatchings/world/area_dgb/dgb_03/C314E0/func_80240000_C314E0.s index 1612e45740..e229730845 100644 --- a/asm/nonmatchings/world/area_dgb/dgb_03/C314E0/func_80240000_C314E0.s +++ b/asm/nonmatchings/world/area_dgb/dgb_03/C314E0/func_80240000_C314E0.s @@ -10,8 +10,8 @@ glabel func_80240000_C314E0 /* C314F4 80240014 0C0B1EAF */ jal get_variable /* C314F8 80240018 8C450000 */ lw $a1, ($v0) /* C314FC 8024001C 0040302D */ daddu $a2, $v0, $zero -/* C31500 80240020 3C058016 */ lui $a1, 0x8016 -/* C31504 80240024 84A5A550 */ lh $a1, -0x5ab0($a1) +/* C31500 80240020 3C058016 */ lui $a1, %hi(gCollisionStatus) +/* C31504 80240024 84A5A550 */ lh $a1, %lo(gCollisionStatus)($a1) /* C31508 80240028 3C048011 */ lui $a0, %hi(gPlayerStatus) /* C3150C 8024002C 2484EFC8 */ addiu $a0, $a0, %lo(gPlayerStatus) /* C31510 80240030 10A60004 */ beq $a1, $a2, .L80240044 diff --git a/asm/nonmatchings/world/area_kpa/kpa_04/A4BF60/func_80240000_A4BF60.s b/asm/nonmatchings/world/area_kpa/kpa_04/A4BF60/func_80240000_A4BF60.s index 409a22f6cf..109fa32fcb 100644 --- a/asm/nonmatchings/world/area_kpa/kpa_04/A4BF60/func_80240000_A4BF60.s +++ b/asm/nonmatchings/world/area_kpa/kpa_04/A4BF60/func_80240000_A4BF60.s @@ -10,8 +10,8 @@ glabel func_80240000_A4BF60 /* A4BF74 80240014 0C0B1EAF */ jal get_variable /* A4BF78 80240018 8C450000 */ lw $a1, ($v0) /* A4BF7C 8024001C 0040302D */ daddu $a2, $v0, $zero -/* A4BF80 80240020 3C058016 */ lui $a1, 0x8016 -/* A4BF84 80240024 84A5A550 */ lh $a1, -0x5ab0($a1) +/* A4BF80 80240020 3C058016 */ lui $a1, %hi(gCollisionStatus) +/* A4BF84 80240024 84A5A550 */ lh $a1, %lo(gCollisionStatus)($a1) /* A4BF88 80240028 3C048011 */ lui $a0, %hi(gPlayerStatus) /* A4BF8C 8024002C 2484EFC8 */ addiu $a0, $a0, %lo(gPlayerStatus) /* A4BF90 80240030 10A60004 */ beq $a1, $a2, .L80240044 diff --git a/asm/nonmatchings/world/area_kpa/kpa_111/A99590/func_80240000_A99590.s b/asm/nonmatchings/world/area_kpa/kpa_111/A99590/func_80240000_A99590.s index 4dbc72d3df..75aa9096e3 100644 --- a/asm/nonmatchings/world/area_kpa/kpa_111/A99590/func_80240000_A99590.s +++ b/asm/nonmatchings/world/area_kpa/kpa_111/A99590/func_80240000_A99590.s @@ -10,8 +10,8 @@ glabel func_80240000_A99590 /* A995A4 80240014 0C0B1EAF */ jal get_variable /* A995A8 80240018 8C450000 */ lw $a1, ($v0) /* A995AC 8024001C 0040302D */ daddu $a2, $v0, $zero -/* A995B0 80240020 3C058016 */ lui $a1, 0x8016 -/* A995B4 80240024 84A5A550 */ lh $a1, -0x5ab0($a1) +/* A995B0 80240020 3C058016 */ lui $a1, %hi(gCollisionStatus) +/* A995B4 80240024 84A5A550 */ lh $a1, %lo(gCollisionStatus)($a1) /* A995B8 80240028 3C048011 */ lui $a0, %hi(gPlayerStatus) /* A995BC 8024002C 2484EFC8 */ addiu $a0, $a0, %lo(gPlayerStatus) /* A995C0 80240030 10A60004 */ beq $a1, $a2, .L80240044 diff --git a/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_80240040_A9CC70.s b/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_80240040_A9CC70.s index da511dff13..3b5f5c478f 100644 --- a/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_80240040_A9CC70.s +++ b/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_80240040_A9CC70.s @@ -10,8 +10,8 @@ glabel func_80240040_A9CC70 /* A9CC84 80240054 0C0B1EAF */ jal get_variable /* A9CC88 80240058 8C450000 */ lw $a1, ($v0) /* A9CC8C 8024005C 0040302D */ daddu $a2, $v0, $zero -/* A9CC90 80240060 3C058016 */ lui $a1, 0x8016 -/* A9CC94 80240064 84A5A550 */ lh $a1, -0x5ab0($a1) +/* A9CC90 80240060 3C058016 */ lui $a1, %hi(gCollisionStatus) +/* A9CC94 80240064 84A5A550 */ lh $a1, %lo(gCollisionStatus)($a1) /* A9CC98 80240068 3C048011 */ lui $a0, %hi(gPlayerStatus) /* A9CC9C 8024006C 2484EFC8 */ addiu $a0, $a0, %lo(gPlayerStatus) /* A9CCA0 80240070 10A60004 */ beq $a1, $a2, .L80240084 diff --git a/asm/nonmatchings/world/area_kpa/kpa_115/A9ED40/func_80240000_A9ED40.s b/asm/nonmatchings/world/area_kpa/kpa_115/A9ED40/func_80240000_A9ED40.s index f9602a02c8..9e2a118cbe 100644 --- a/asm/nonmatchings/world/area_kpa/kpa_115/A9ED40/func_80240000_A9ED40.s +++ b/asm/nonmatchings/world/area_kpa/kpa_115/A9ED40/func_80240000_A9ED40.s @@ -10,8 +10,8 @@ glabel func_80240000_A9ED40 /* A9ED54 80240014 0C0B1EAF */ jal get_variable /* A9ED58 80240018 8C450000 */ lw $a1, ($v0) /* A9ED5C 8024001C 0040302D */ daddu $a2, $v0, $zero -/* A9ED60 80240020 3C058016 */ lui $a1, 0x8016 -/* A9ED64 80240024 84A5A550 */ lh $a1, -0x5ab0($a1) +/* A9ED60 80240020 3C058016 */ lui $a1, %hi(gCollisionStatus) +/* A9ED64 80240024 84A5A550 */ lh $a1, %lo(gCollisionStatus)($a1) /* A9ED68 80240028 3C048011 */ lui $a0, %hi(gPlayerStatus) /* A9ED6C 8024002C 2484EFC8 */ addiu $a0, $a0, %lo(gPlayerStatus) /* A9ED70 80240030 10A60004 */ beq $a1, $a2, .L80240044 diff --git a/asm/nonmatchings/world/area_kpa/kpa_12/A54CA0/func_8024037C_A54CCC.s b/asm/nonmatchings/world/area_kpa/kpa_12/A54CA0/func_8024037C_A54CCC.s index 21ac85499f..e3900f6019 100644 --- a/asm/nonmatchings/world/area_kpa/kpa_12/A54CA0/func_8024037C_A54CCC.s +++ b/asm/nonmatchings/world/area_kpa/kpa_12/A54CA0/func_8024037C_A54CCC.s @@ -16,8 +16,8 @@ glabel func_8024037C_A54CCC /* A54CF8 802403A8 0C0B1EAF */ jal get_variable /* A54CFC 802403AC 0040882D */ daddu $s1, $v0, $zero /* A54D00 802403B0 0040802D */ daddu $s0, $v0, $zero -/* A54D04 802403B4 3C038016 */ lui $v1, 0x8016 -/* A54D08 802403B8 2463A550 */ addiu $v1, $v1, -0x5ab0 +/* A54D04 802403B4 3C038016 */ lui $v1, %hi(gCollisionStatus) +/* A54D08 802403B8 2463A550 */ addiu $v1, $v1, %lo(gCollisionStatus) /* A54D0C 802403BC 84620002 */ lh $v0, 2($v1) /* A54D10 802403C0 10500004 */ beq $v0, $s0, .L802403D4 /* A54D14 802403C4 00000000 */ nop diff --git a/asm/nonmatchings/world/area_kpa/kpa_13/A56270/func_8024037C_A5629C.s b/asm/nonmatchings/world/area_kpa/kpa_13/A56270/func_8024037C_A5629C.s index 50ec5cea98..986383060d 100644 --- a/asm/nonmatchings/world/area_kpa/kpa_13/A56270/func_8024037C_A5629C.s +++ b/asm/nonmatchings/world/area_kpa/kpa_13/A56270/func_8024037C_A5629C.s @@ -16,8 +16,8 @@ glabel func_8024037C_A5629C /* A562C8 802403A8 0C0B1EAF */ jal get_variable /* A562CC 802403AC 0040882D */ daddu $s1, $v0, $zero /* A562D0 802403B0 0040802D */ daddu $s0, $v0, $zero -/* A562D4 802403B4 3C038016 */ lui $v1, 0x8016 -/* A562D8 802403B8 2463A550 */ addiu $v1, $v1, -0x5ab0 +/* A562D4 802403B4 3C038016 */ lui $v1, %hi(gCollisionStatus) +/* A562D8 802403B8 2463A550 */ addiu $v1, $v1, %lo(gCollisionStatus) /* A562DC 802403BC 84620002 */ lh $v0, 2($v1) /* A562E0 802403C0 10500004 */ beq $v0, $s0, .L802403D4 /* A562E4 802403C4 00000000 */ nop diff --git a/asm/nonmatchings/world/area_kpa/kpa_14/A57830/func_8024073C_A57BEC.s b/asm/nonmatchings/world/area_kpa/kpa_14/A57830/func_8024073C_A57BEC.s index 146abb0384..58774ad020 100644 --- a/asm/nonmatchings/world/area_kpa/kpa_14/A57830/func_8024073C_A57BEC.s +++ b/asm/nonmatchings/world/area_kpa/kpa_14/A57830/func_8024073C_A57BEC.s @@ -22,8 +22,8 @@ glabel func_8024073C_A57BEC /* A57C30 80240780 0C0B1EAF */ jal get_variable /* A57C34 80240784 0040802D */ daddu $s0, $v0, $zero /* A57C38 80240788 0040202D */ daddu $a0, $v0, $zero -/* A57C3C 8024078C 3C038016 */ lui $v1, 0x8016 -/* A57C40 80240790 2463A550 */ addiu $v1, $v1, -0x5ab0 +/* A57C3C 8024078C 3C038016 */ lui $v1, %hi(gCollisionStatus) +/* A57C40 80240790 2463A550 */ addiu $v1, $v1, %lo(gCollisionStatus) /* A57C44 80240794 84620002 */ lh $v0, 2($v1) /* A57C48 80240798 3C058011 */ lui $a1, %hi(gPlayerStatus) /* A57C4C 8024079C 24A5EFC8 */ addiu $a1, $a1, %lo(gPlayerStatus) diff --git a/asm/nonmatchings/world/area_kzn/kzn_02/C5AA50/func_802403DC_C5AB1C.s b/asm/nonmatchings/world/area_kzn/kzn_02/C5AA50/func_802403DC_C5AB1C.s index a79f734ef2..80c68ebcfc 100644 --- a/asm/nonmatchings/world/area_kzn/kzn_02/C5AA50/func_802403DC_C5AB1C.s +++ b/asm/nonmatchings/world/area_kzn/kzn_02/C5AA50/func_802403DC_C5AB1C.s @@ -22,8 +22,8 @@ glabel func_802403DC_C5AB1C /* C5AB60 80240420 0C0B1EAF */ jal get_variable /* C5AB64 80240424 0040882D */ daddu $s1, $v0, $zero /* C5AB68 80240428 0040802D */ daddu $s0, $v0, $zero -/* C5AB6C 8024042C 3C028016 */ lui $v0, 0x8016 -/* C5AB70 80240430 2442A550 */ addiu $v0, $v0, -0x5ab0 +/* C5AB6C 8024042C 3C028016 */ lui $v0, %hi(gCollisionStatus) +/* C5AB70 80240430 2442A550 */ addiu $v0, $v0, %lo(gCollisionStatus) /* C5AB74 80240434 84430002 */ lh $v1, 2($v0) /* C5AB78 80240438 10710008 */ beq $v1, $s1, .L8024045C /* C5AB7C 8024043C 00000000 */ nop diff --git a/asm/nonmatchings/world/area_kzn/kzn_11/C804B0/func_80240310_C804B0.s b/asm/nonmatchings/world/area_kzn/kzn_11/C804B0/func_80240310_C804B0.s index d86f659df5..5fc4cae48e 100644 --- a/asm/nonmatchings/world/area_kzn/kzn_11/C804B0/func_80240310_C804B0.s +++ b/asm/nonmatchings/world/area_kzn/kzn_11/C804B0/func_80240310_C804B0.s @@ -22,8 +22,8 @@ glabel func_80240310_C804B0 /* C804F4 80240354 0C0B1EAF */ jal get_variable /* C804F8 80240358 0040882D */ daddu $s1, $v0, $zero /* C804FC 8024035C 0040802D */ daddu $s0, $v0, $zero -/* C80500 80240360 3C028016 */ lui $v0, 0x8016 -/* C80504 80240364 2442A550 */ addiu $v0, $v0, -0x5ab0 +/* C80500 80240360 3C028016 */ lui $v0, %hi(gCollisionStatus) +/* C80504 80240364 2442A550 */ addiu $v0, $v0, %lo(gCollisionStatus) /* C80508 80240368 84430002 */ lh $v1, 2($v0) /* C8050C 8024036C 10710008 */ beq $v1, $s1, .L80240390 /* C80510 80240370 00000000 */ nop diff --git a/asm/nonmatchings/world/area_obk/obk_03/BC4B50/func_802408D0_BC4B50.s b/asm/nonmatchings/world/area_obk/obk_03/BC4B50/func_802408D0_BC4B50.s index 0ed6a6321d..42b80e873c 100644 --- a/asm/nonmatchings/world/area_obk/obk_03/BC4B50/func_802408D0_BC4B50.s +++ b/asm/nonmatchings/world/area_obk/obk_03/BC4B50/func_802408D0_BC4B50.s @@ -8,8 +8,8 @@ glabel func_802408D0_BC4B50 /* BC4B5C 802408DC 3C138011 */ lui $s3, %hi(gPlayerStatus) /* BC4B60 802408E0 2673EFC8 */ addiu $s3, $s3, %lo(gPlayerStatus) /* BC4B64 802408E4 AFB00068 */ sw $s0, 0x68($sp) -/* BC4B68 802408E8 3C108016 */ lui $s0, 0x8016 -/* BC4B6C 802408EC 2610A550 */ addiu $s0, $s0, -0x5ab0 +/* BC4B68 802408E8 3C108016 */ lui $s0, %hi(gCollisionStatus) +/* BC4B6C 802408EC 2610A550 */ addiu $s0, $s0, %lo(gCollisionStatus) /* BC4B70 802408F0 AFBF0078 */ sw $ra, 0x78($sp) /* BC4B74 802408F4 AFB1006C */ sw $s1, 0x6c($sp) /* BC4B78 802408F8 F7B60088 */ sdc1 $f22, 0x88($sp) diff --git a/asm/nonmatchings/world/area_obk/obk_05/BCD060/func_80240050_BCD0B0.s b/asm/nonmatchings/world/area_obk/obk_05/BCD060/func_80240050_BCD0B0.s index 8b6a94c0f2..5c06e557f2 100644 --- a/asm/nonmatchings/world/area_obk/obk_05/BCD060/func_80240050_BCD0B0.s +++ b/asm/nonmatchings/world/area_obk/obk_05/BCD060/func_80240050_BCD0B0.s @@ -8,8 +8,8 @@ glabel func_80240050_BCD0B0 /* BCD0BC 8024005C 3C138011 */ lui $s3, %hi(gPlayerStatus) /* BCD0C0 80240060 2673EFC8 */ addiu $s3, $s3, %lo(gPlayerStatus) /* BCD0C4 80240064 AFB00068 */ sw $s0, 0x68($sp) -/* BCD0C8 80240068 3C108016 */ lui $s0, 0x8016 -/* BCD0CC 8024006C 2610A550 */ addiu $s0, $s0, -0x5ab0 +/* BCD0C8 80240068 3C108016 */ lui $s0, %hi(gCollisionStatus) +/* BCD0CC 8024006C 2610A550 */ addiu $s0, $s0, %lo(gCollisionStatus) /* BCD0D0 80240070 AFBF0078 */ sw $ra, 0x78($sp) /* BCD0D4 80240074 AFB1006C */ sw $s1, 0x6c($sp) /* BCD0D8 80240078 F7B60088 */ sdc1 $f22, 0x88($sp) diff --git a/asm/nonmatchings/world/area_omo/omo_09/DCCCD0/func_80240078_DCCD48.s b/asm/nonmatchings/world/area_omo/omo_09/DCCCD0/func_80240078_DCCD48.s index e438d4072e..74d6e38726 100644 --- a/asm/nonmatchings/world/area_omo/omo_09/DCCCD0/func_80240078_DCCD48.s +++ b/asm/nonmatchings/world/area_omo/omo_09/DCCCD0/func_80240078_DCCD48.s @@ -96,8 +96,8 @@ glabel func_80240078_DCCD48 /* DCCEA0 802401D0 14400032 */ bnez $v0, .L8024029C /* DCCEA4 802401D4 24020002 */ addiu $v0, $zero, 2 .L802401D8: -/* DCCEA8 802401D8 3C178016 */ lui $s7, 0x8016 -/* DCCEAC 802401DC 26F7A550 */ addiu $s7, $s7, -0x5ab0 +/* DCCEA8 802401D8 3C178016 */ lui $s7, %hi(gCollisionStatus) +/* DCCEAC 802401DC 26F7A550 */ addiu $s7, $s7, %lo(gCollisionStatus) /* DCCEB0 802401E0 24120004 */ addiu $s2, $zero, 4 /* DCCEB4 802401E4 3C168024 */ lui $s6, 0x8024 /* DCCEB8 802401E8 26D63A90 */ addiu $s6, $s6, 0x3a90 diff --git a/asm/nonmatchings/world/area_pra/pra_22/D788A0/func_80240020_D788A0.s b/asm/nonmatchings/world/area_pra/pra_22/D788A0/func_80240020_D788A0.s index 1d50ec83ec..de7b707978 100644 --- a/asm/nonmatchings/world/area_pra/pra_22/D788A0/func_80240020_D788A0.s +++ b/asm/nonmatchings/world/area_pra/pra_22/D788A0/func_80240020_D788A0.s @@ -10,8 +10,8 @@ glabel func_80240020_D788A0 /* D788B4 80240034 0C0B1EAF */ jal get_variable /* D788B8 80240038 8C450000 */ lw $a1, ($v0) /* D788BC 8024003C 0040302D */ daddu $a2, $v0, $zero -/* D788C0 80240040 3C058016 */ lui $a1, 0x8016 -/* D788C4 80240044 84A5A550 */ lh $a1, -0x5ab0($a1) +/* D788C0 80240040 3C058016 */ lui $a1, %hi(gCollisionStatus) +/* D788C4 80240044 84A5A550 */ lh $a1, %lo(gCollisionStatus)($a1) /* D788C8 80240048 3C048011 */ lui $a0, %hi(gPlayerStatus) /* D788CC 8024004C 2484EFC8 */ addiu $a0, $a0, %lo(gPlayerStatus) /* D788D0 80240050 10A60004 */ beq $a1, $a2, .L80240064 diff --git a/asm/nonmatchings/world/area_pra/pra_31/D7F270/func_80240FF0_D7FD50.s b/asm/nonmatchings/world/area_pra/pra_31/D7F270/func_80240FF0_D7FD50.s index 84c73a3764..4098c34351 100644 --- a/asm/nonmatchings/world/area_pra/pra_31/D7F270/func_80240FF0_D7FD50.s +++ b/asm/nonmatchings/world/area_pra/pra_31/D7F270/func_80240FF0_D7FD50.s @@ -10,8 +10,8 @@ glabel func_80240FF0_D7FD50 /* D7FD64 80241004 0C0B1EAF */ jal get_variable /* D7FD68 80241008 8C450000 */ lw $a1, ($v0) /* D7FD6C 8024100C 0040302D */ daddu $a2, $v0, $zero -/* D7FD70 80241010 3C058016 */ lui $a1, 0x8016 -/* D7FD74 80241014 84A5A550 */ lh $a1, -0x5ab0($a1) +/* D7FD70 80241010 3C058016 */ lui $a1, %hi(gCollisionStatus) +/* D7FD74 80241014 84A5A550 */ lh $a1, %lo(gCollisionStatus)($a1) /* D7FD78 80241018 3C048011 */ lui $a0, %hi(gPlayerStatus) /* D7FD7C 8024101C 2484EFC8 */ addiu $a0, $a0, %lo(gPlayerStatus) /* D7FD80 80241020 10A60004 */ beq $a1, $a2, .L80241034 diff --git a/asm/nonmatchings/world/area_pra/pra_33/D89700/func_80240F20_D8A600.s b/asm/nonmatchings/world/area_pra/pra_33/D89700/func_80240F20_D8A600.s index 056ae74214..0b74983b59 100644 --- a/asm/nonmatchings/world/area_pra/pra_33/D89700/func_80240F20_D8A600.s +++ b/asm/nonmatchings/world/area_pra/pra_33/D89700/func_80240F20_D8A600.s @@ -2,8 +2,8 @@ .set noreorder # don't insert nops after branches glabel func_80240F20_D8A600 -/* D8A600 80240F20 3C058016 */ lui $a1, 0x8016 -/* D8A604 80240F24 24A5A550 */ addiu $a1, $a1, -0x5ab0 +/* D8A600 80240F20 3C058016 */ lui $a1, %hi(gCollisionStatus) +/* D8A604 80240F24 24A5A550 */ addiu $a1, $a1, %lo(gCollisionStatus) /* D8A608 80240F28 AC8000AC */ sw $zero, 0xac($a0) /* D8A60C 80240F2C 84A20002 */ lh $v0, 2($a1) /* D8A610 80240F30 2403001C */ addiu $v1, $zero, 0x1c diff --git a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_80241FB0_D3C580.s b/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_80241FB0_D3C580.s index dce4d0c19a..9a8b632b15 100644 --- a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_80241FB0_D3C580.s +++ b/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_80241FB0_D3C580.s @@ -2,8 +2,8 @@ .set noreorder # don't insert nops after branches glabel func_80241FB0_D3C580 -/* D3C580 80241FB0 3C058016 */ lui $a1, 0x8016 -/* D3C584 80241FB4 24A5A550 */ addiu $a1, $a1, -0x5ab0 +/* D3C580 80241FB0 3C058016 */ lui $a1, %hi(gCollisionStatus) +/* D3C584 80241FB4 24A5A550 */ addiu $a1, $a1, %lo(gCollisionStatus) /* D3C588 80241FB8 AC8000AC */ sw $zero, 0xac($a0) /* D3C58C 80241FBC 84A20002 */ lh $v0, 2($a1) /* D3C590 80241FC0 24030040 */ addiu $v1, $zero, 0x40 From 5ddfce7824e951c8c585898e3788479e9ca28b0f Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Wed, 28 Oct 2020 20:57:00 +0000 Subject: [PATCH 11/78] improve ld script & asset building makefile go brrrr --- .gitignore | 6 +- .vscode/c_cpp_properties.json | 7 + .vscode/settings.json | 4 + Makefile | 180 ++++++------ diff_settings.py | 1 + sources.mk | 86 +++--- ...build_assets_fs.py => build_assets_bin.py} | 69 ++--- tools/compile_dsl_macros.py | 184 ++++++------ tools/n64splat | 2 +- tools/splat.yaml | 268 ++++++------------ 10 files changed, 355 insertions(+), 452 deletions(-) rename tools/{build_assets_fs.py => build_assets_bin.py} (52%) diff --git a/.gitignore b/.gitignore index 067dfa0e19..6a3e95e0df 100644 --- a/.gitignore +++ b/.gitignore @@ -9,15 +9,15 @@ venv/ ctx.c expected/ -# Assets -assets - # Build artifacts *.ld *.z64 *.bin +*.i +*.Yay0 bin/ build/ docs/doxygen/ +include/ld_addrs.h .vscode/launch.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 4ad1bf0a99..34ede7fb44 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -3,6 +3,13 @@ "configurations": [ { "name": "papermario", + "browse": { + "limitSymbolsToIncludedHeaders": true, + "path": [ + "${workspaceFolder}/include", + "${workspaceFolder}/src" + ] + }, "includePath": [ "${workspaceFolder}/include", "${workspaceFolder}/src" diff --git a/.vscode/settings.json b/.vscode/settings.json index 2ee09d6a34..b9a9ded7bd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,4 +12,8 @@ ], "python.pythonPath": "/usr/bin/python3", "git.ignoreLimitWarning": true, + "search.exclude": { + "build": true, + "docs/doxygen": true, + }, } diff --git a/Makefile b/Makefile index f73c870e2d..fcb3e3c78f 100644 --- a/Makefile +++ b/Makefile @@ -14,33 +14,29 @@ ifeq ($(wildcard $(BASEROM)),) $(error Baserom `$(BASEROM)' not found.) endif - -### Sources ### - -include sources.mk +# NON_MATCHING=1 implies COMPARE=0 +ifeq ($(NON_MATCHING),1) +override COMPARE=0 +endif ### Output ### -BUILD_DIR = build -ROM = $(TARGET).z64 -ELF = $(BUILD_DIR)/$(TARGET).elf -LD_SCRIPT = $(TARGET).ld -LD_MAP = $(BUILD_DIR)/$(TARGET).map - -ifdef ASSETS_FS -ASSETS_FS_OBJ = $(BUILD_DIR)/$(ASSETS_FS).o -endif +BUILD_DIR := build +ROM := $(TARGET).z64 +ELF := $(BUILD_DIR)/$(TARGET).elf +LD_SCRIPT := $(TARGET).ld +LD_MAP := $(BUILD_DIR)/$(TARGET).map +ASSETS_BIN := $(BUILD_DIR)/bin/assets/assets.bin ### Tools ### -PYTHON = python3 -N64CKSUM = tools/n64crc -SPLAT_YAML = tools/splat.yaml +PYTHON := python3 +N64CKSUM := tools/n64crc +SPLAT_YAML := tools/splat.yaml SPLAT = $(PYTHON) tools/n64splat/split.py $(BASEROM) $(SPLAT_YAML) . YAY0COMPRESS = tools/Yay0compress -BUILD_ASSETS_FS := $(PYTHON) tools/build_assets_fs.py $(ASSETS_FS) $(BUILD_DIR)/$(ASSETS_FS) ifndef EMULATOR ifneq ($(shell which mupen64plus-gui),) @@ -53,25 +49,30 @@ endif ### Compiler Options ### -CROSS = mips-linux-gnu- -AS = $(CROSS)as -OLD_AS = tools/mips-nintendo-nu64-as -CC = tools/cc1 -CPP = cpp -LD = $(CROSS)ld -OBJCOPY = $(CROSS)objcopy +CROSS := mips-linux-gnu- +AS := $(CROSS)as +OLD_AS := tools/mips-nintendo-nu64-as +CC := tools/cc1 +CPP := cpp +LD := $(CROSS)ld +OBJCOPY := $(CROSS)objcopy -CPPFLAGS = -Iinclude -Isrc -D _LANGUAGE_C -ffreestanding -DF3DEX_GBI_2 -ASFLAGS = -EB -Iinclude -march=vr4300 -mtune=vr4300 -OLDASFLAGS = -EB -Iinclude -G 0 -CFLAGS = -O2 -quiet -G 0 -mcpu=vr4300 -mfix4300 -mips3 -mgp32 -mfp32 -Wimplicit -Wuninitialized -Wshadow -LDFLAGS = -T undefined_syms.txt -T undefined_funcs.txt -T $(LD_SCRIPT) -Map $(LD_MAP) --no-check-sections +CPPFLAGS := -Iinclude -Isrc -D _LANGUAGE_C -ffreestanding -DF3DEX_GBI_2 -D_MIPS_SZLONG=0 -Wundef -Wcomment +ASFLAGS := -EB -Iinclude -march=vr4300 -mtune=vr4300 +OLDASFLAGS := -EB -Iinclude -G 0 +CFLAGS := -O2 -quiet -G 0 -mcpu=vr4300 -mfix4300 -mips3 -mgp32 -mfp32 -Wimplicit -Wuninitialized -Wshadow +LDFLAGS := -T undefined_syms.txt -T undefined_funcs.txt -T $(BUILD_DIR)/$(LD_SCRIPT) -Map $(LD_MAP) --no-check-sections ifeq ($(NON_MATCHING),1) CPPFLAGS += -DNON_MATCHING endif +### Sources ### + +include sources.mk + + ### Targets ### clean: @@ -87,11 +88,14 @@ submodules: git submodule update --init --recursive split: - rm -rf bin assets + rm -rf bin $(SPLAT) --modes ld bin Yay0 PaperMarioMapFS +split-bin: + $(SPLAT) --modes ld bin + split-all: - rm -rf bin assets + rm -rf bin $(SPLAT) --modes all test: $(ROM) @@ -101,9 +105,61 @@ else @echo "N64 emulator not detected." && false endif +# Compressed files +%.Yay0: % + @mkdir -p $(shell dirname $@) + $(YAY0COMPRESS) $< $@ +$(BUILD_DIR)/%.bin.Yay0: %.bin + @mkdir -p $(shell dirname $@) + $(YAY0COMPRESS) $< $@ + +# Data objects +$(BUILD_DIR)/%.bin.o: %.bin + @mkdir -p $(shell dirname $@) + $(LD) -r -b binary -o $@ $< + +# Compressed data objects +$(BUILD_DIR)/%.Yay0.o: $(BUILD_DIR)/%.bin.Yay0 + @mkdir -p $(shell dirname $@) + $(LD) -r -b binary -o $@ $< + +# Compile C files +$(BUILD_DIR)/%.c.o: %.c + @mkdir -p $(shell dirname $@) + $(CPP) $(CPPFLAGS) -o - $< | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - + +# Compile C files (with DSL macros) +$(foreach cfile, $(DSL_C_FILES), $(BUILD_DIR)/$(cfile).o): $(BUILD_DIR)/%.c.o: %.c + @mkdir -p $(shell dirname $@) + $(CPP) $(CPPFLAGS) -o - $< | tools/compile_dsl_macros.py | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - + +# Assemble handwritten ASM +$(BUILD_DIR)/%.s.o: %.s + @mkdir -p $(shell dirname $@) + $(AS) $(ASFLAGS) -o $@ $< + +ASSET_FILES := $(foreach asset, $(ASSETS), $(BUILD_DIR)/bin/assets/$(asset)) +YAY0_ASSET_FILES := $(foreach asset, $(filter-out %_tex, $(ASSET_FILES)), $(asset).Yay0) + +$(BUILD_DIR)/bin/assets/%: bin/assets/%.bin + @mkdir -p $(shell dirname $@) + @cp $< $@ + +$(ASSETS_BIN): $(ASSET_FILES) $(YAY0_ASSET_FILES) + @mkdir -p $(shell dirname $@) + @echo "building $@" + @$(PYTHON) tools/build_assets_bin.py $@ $(ASSET_FILES) + +$(ASSETS_BIN:.bin=.o): $(ASSETS_BIN) + $(LD) -r -b binary -o $@ $< + $(LD_SCRIPT): $(SPLAT_YAML) $(SPLAT) --modes ld +$(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT) + @mkdir -p $(shell dirname $@) + $(CPP) -P -DBUILD_DIR=$(BUILD_DIR) -o $@ $< + $(ROM): $(BUILD_DIR)/$(TARGET).bin @cp $< $@ ifeq ($(COMPARE),1) @@ -113,70 +169,16 @@ endif $(BUILD_DIR)/$(TARGET).bin: $(BUILD_DIR)/$(TARGET).elf $(OBJCOPY) $< $@ -O binary -$(BUILD_DIR)/$(TARGET).elf: $(LD_SCRIPT) $(OBJECTS) $(ASSETS_FS_OBJ) +$(BUILD_DIR)/$(TARGET).elf: $(BUILD_DIR)/$(LD_SCRIPT) $(OBJECTS) $(LD) $(LDFLAGS) -o $@ -# `make print-VARNAME' to print the value of $(VARNAME) -print-%: ; $(info $* is a $(flavor $*) variable set to [$($*)]) @true - - -### Object Targets (see sources.mk) ### - -ifndef OBJECTS -$(warning OBJECTS is not defined by `sources.mk'.) -else - -# C -$(filter %.c.o,$(OBJECTS)): $(BUILD_DIR)/%.c.o: %.c - @mkdir -p $(shell dirname $@) - - cpp $(CPPFLAGS) $< > $(BUILD_DIR)/$*.i - @grep -cF "SCRIPT(" $(BUILD_DIR)/$*.i | tools/compile_dsl_macros.py $(BUILD_DIR)/$*.i - $(CC) $(CFLAGS) -o - $(BUILD_DIR)/$*.i | $(OLD_AS) $(OLDASFLAGS) - -o $@ - -# Assembly -$(filter %.s.o,$(OBJECTS)): $(BUILD_DIR)/%.s.o: %.s - @mkdir -p $(shell dirname $@) - $(AS) $(ASFLAGS) -o $@ $< - -# Uncompressed data -$(filter %.bin.o,$(OBJECTS)): $(BUILD_DIR)/%.bin.o: %.bin - @mkdir -p $(shell dirname $@) - $(LD) -r -b binary -o $@ $< - -# Compressed data -$(filter %.Yay0.o,$(OBJECTS)): $(BUILD_DIR)/%.Yay0.o: %.bin - @mkdir -p $(shell dirname $@) - $(YAY0COMPRESS) $< $(BUILD_DIR)/$*.Yay0 - $(LD) -r -b binary -o $@ $(BUILD_DIR)/$*.Yay0 - -endif - - -### Asset Filesystem (see sources.mk) ### - -# Complain if ASSETS_FS_SOURCES is undefined but ASSETS_FS is. -ifndef ASSETS_FS_SOURCES -ifdef ASSETS_FS -$(warning ASSETS_FS_SOURCES is not defined by `sources.mk' but ASSETS_FS is.) -endif -else - -$(BUILD_DIR)/$(ASSETS_FS)/%: $(ASSETS_FS)/% - @mkdir -p $(shell dirname $@) - @rm -f $@ - $(BUILD_ASSETS_FS) $* - -$(ASSETS_FS_OBJ): $(ASSETS_FS).json $(foreach file,$(ASSETS_FS_SOURCES),$(BUILD_DIR)/$(file)) - $(BUILD_ASSETS_FS) - $(LD) -r -b binary -o $@ $(BUILD_DIR)/$(ASSETS_FS).bin - -endif - ### Make Settings ### .PHONY: clean test setup submodules split $(ROM) +.DELETE_ON_ERROR: +.SECONDARY: +.PRECIOUS: $(ROM) %.Yay0 .DEFAULT_GOAL := $(ROM) # Remove built-in implicit rules to improve performance diff --git a/diff_settings.py b/diff_settings.py index 9a3533337a..eb14aca999 100644 --- a/diff_settings.py +++ b/diff_settings.py @@ -5,3 +5,4 @@ def apply(config, args): config['myimg'] = 'papermario.z64' config['mapfile'] = 'build/papermario.map' config['source_directories'] = ['.'] + config['makeflags'] = ['COMPARE=0'] diff --git a/sources.mk b/sources.mk index 9706dbe917..47d7169a4c 100644 --- a/sources.mk +++ b/sources.mk @@ -1,35 +1,57 @@ -### ASSETS_FS and ASSETS_FS_SOURCES ### +OBJECTS := $(subst BUILD_DIR, $(BUILD_DIR), $(shell grep -E 'BUILD_DIR.+\.o' papermario.ld -o)) -# The asset filesystem path. -ASSETS_FS = assets/fs +DSL_C_FILES := $(shell grep -lrF "SCRIPT" src) -# Source files to build the asset filesystem with. Each of these must be configured in `assets/fs.json'. -ASSETS_FS_SOURCES = $(wildcard $(ASSETS_FS)/*.bin) +MAPS := \ + dro_01 dro_02 \ + hos_00 hos_01 hos_02 hos_03 hos_04 hos_05 hos_06 hos_10 hos_20 \ + isk_01 isk_02 isk_03 isk_04 isk_05 isk_06 isk_07 isk_08 isk_09 isk_10 isk_11 isk_12 isk_13 isk_14 isk_16 isk_18 isk_19 \ + iwa_00 iwa_01 iwa_02 iwa_03 iwa_04 iwa_10 iwa_11 \ + osr_00 osr_01 osr_02 osr_03 kkj_00 kkj_01 kkj_02 kkj_03 kkj_10 kkj_11 kkj_12 kkj_13 kkj_14 kkj_15 kkj_16 kkj_17 kkj_18 kkj_19 kkj_20 kkj_21 kkj_22 kkj_23 kkj_24 kkj_25 kkj_26 kkj_27 kkj_28 kkj_29 \ + kmr_00 kmr_02 kmr_03 kmr_04 kmr_05 kmr_06 kmr_07 kmr_09 kmr_10 kmr_11 kmr_12 kmr_20 kmr_30 \ + kpa_01 kpa_03 kpa_04 kpa_08 kpa_09 kpa_10 kpa_11 kpa_12 kpa_13 kpa_14 kpa_15 kpa_16 kpa_17 kpa_32 kpa_33 kpa_40 kpa_41 kpa_50 kpa_52 kpa_60 kpa_61 kpa_62 kpa_63 kpa_70 kpa_80 kpa_90 kpa_91 kpa_94 kpa_95 kpa_96 kpa_102 kpa_111 kpa_112 kpa_113 kpa_115 kpa_116 kpa_117 kpa_118 kpa_119 kpa_121 kpa_130 kpa_133 kpa_134 \ + machi mac_00 mac_01 mac_02 mac_03 mac_04 mac_05 mac_06 \ + tik_01 tik_02 tik_03 tik_04 tik_05 tik_06 tik_07 tik_08 tik_09 tik_10 tik_12 tik_14 tik_15 tik_17 tik_18 tik_19 tik_20 tik_21 tik_22 tik_23 tik_25 \ + kgr_01 kgr_02 \ + nok_01 nok_02 nok_03 nok_04 nok_11 nok_12 nok_13 nok_14 nok_15 \ + sbk_00 sbk_01 sbk_02 sbk_03 sbk_04 sbk_05 sbk_06 sbk_10 sbk_11 sbk_12 sbk_13 sbk_14 sbk_15 sbk_16 sbk_20 sbk_21 sbk_22 sbk_23 sbk_24 sbk_25 sbk_26 sbk_30 sbk_31 sbk_32 sbk_33 sbk_34 sbk_35 sbk_36 sbk_40 sbk_41 sbk_42 sbk_43 sbk_44 sbk_45 sbk_46 sbk_50 sbk_51 sbk_52 sbk_53 sbk_54 sbk_55 sbk_56 sbk_60 sbk_61 sbk_62 sbk_63 sbk_64 sbk_65 sbk_66 sbk_99 \ + trd_00 trd_01 trd_02 trd_03 trd_04 trd_05 trd_06 trd_07 trd_08 trd_09 trd_10 \ + tst_01 tst_02 tst_03 tst_04 tst_10 tst_11 tst_12 tst_13 tst_20 \ + jan_00 jan_01 jan_02 jan_03 jan_04 jan_05 jan_06 jan_07 jan_08 jan_09 jan_10 jan_11 jan_12 jan_13 jan_14 jan_15 jan_16 jan_17 jan_18 jan_19 jan_22 jan_23 \ + mim_01 mim_02 mim_03 mim_04 mim_05 mim_06 mim_07 mim_08 mim_09 mim_10 mim_11 mim_12 \ + obk_01 obk_02 obk_03 obk_04 obk_05 obk_06 obk_07 obk_08 obk_09 \ + arn_02 arn_03 arn_04 arn_05 arn_07 arn_08 arn_09 arn_10 arn_11 arn_12 arn_13 arn_20 \ + dgb_01 dgb_02 dgb_03 dgb_04 dgb_05 dgb_06 dgb_07 dgb_08 dgb_09 dgb_10 dgb_11 dgb_12 dgb_13 dgb_14 dgb_15 dgb_16 dgb_17 dgb_18 \ + kzn_01 kzn_02 kzn_03 kzn_04 kzn_05 kzn_06 kzn_07 kzn_08 kzn_09 kzn_10 kzn_11 kzn_17 kzn_18 kzn_19 kzn_20 kzn_22 kzn_23 \ + flo_00 flo_03 flo_07 flo_08 flo_09 flo_10 flo_11 flo_12 flo_13 flo_14 flo_15 flo_16 flo_17 flo_18 flo_19 flo_21 flo_22 flo_23 flo_24 flo_25 \ + sam_01 sam_02 sam_03 sam_04 sam_05 sam_06 sam_07 sam_08 sam_09 sam_10 sam_11 sam_12 \ + pra_01 pra_02 pra_03 pra_04 pra_05 pra_09 pra_10 pra_11 pra_13 pra_14 pra_15 pra_16 pra_18 pra_19 pra_20 pra_21 pra_22 pra_29 pra_31 pra_32 pra_33 pra_34 pra_35 pra_40 \ + omo_01 omo_02 omo_03 omo_04 omo_05 omo_06 omo_07 omo_08 omo_09 omo_10 omo_11 omo_12 omo_13 omo_14 omo_15 omo_16 omo_17 \ + end_00 end_01 \ + mgm_00 mgm_01 mgm_02 mgm_03 \ + gv_01 \ + kmr_bt03 kmr_bt04 kmr_bt05 kmr_bt06 \ + nok_bt01 nok_bt02 nok_bt03 nok_bt04 \ + trd_bt00 trd_bt01 trd_bt02 trd_bt03 trd_bt04 trd_bt05 \ + iwa_bt01 iwa_bt02 \ + sbk_bt02 \ + isk_bt01 isk_bt02 isk_bt03 isk_bt04 isk_bt05 isk_bt06 isk_bt07 isk_bt08 \ + arn_bt01 arn_bt02 arn_bt03 arn_bt04 arn_bt05 arn_bt06 \ + dgb_bt01 dgb_bt02 dgb_bt03 dgb_bt04 dgb_bt05 \ + mim_bt01 \ + omo_bt01 omo_bt02 omo_bt03 omo_bt04 omo_bt05 omo_bt06 omo_bt07 \ + kgr_bt01 flo_bt01 flo_bt02 flo_bt03 flo_bt04 flo_bt05 flo_bt06 \ + jan_bt00 jan_bt01 jan_bt02 jan_bt03 jan_bt04 \ + kzn_bt01 kzn_bt02 kzn_bt04 kzn_bt05 sam_bt01 sam_bt02 sam_bt03 sam_bt04 \ + tik_bt01 tik_bt02 tik_bt03 tik_bt04 tik_bt05 \ + pra_bt01 pra_bt02 pra_bt03 pra_bt04 mac_bt01 mac_bt02 \ + kpa_bt01 kpa_bt02 kpa_bt03 kpa_bt04 kpa_bt05 kpa_bt07 kpa_bt08 kpa_bt09 kpa_bt11 kpa_bt13 kpa_bt14 \ + hos_bt01 hos_bt02 \ + kkj_bt01 kkj_bt02 - -### OBJECTS ### - -C_FILES = $(shell find src -type f -name "*.c" -not -name "*.inc.c") -S_FILES = $(wildcard asm/*.s asm/os/*.s) - -BIN_FILES = $(foreach dir, $(shell mkdir -p bin && find bin -type d -not -name Yay0), $(wildcard $(dir)/*.bin)) -COMPRESSED_BIN_FILES = $(wildcard bin/Yay0/*.bin) - -# The OBJECTS variable holds the filenames of all object files to be linked. -# Each of these objects should appear in `papermario.ld' (generated by n64splat). -# -# The extension of each object file specifies its source type (and, therefore, how it should be built): -# -# Object ext | Source ext | Description -# ------------+------------+------------- -# .o | | Special; must have build steps declared here -# .c.o | .c | C sourcecode -# .s.o | .s | Assembly (built with modern assembler) -# .bin.o | .bin | Uncompressed data -# .Yay0.o | .bin | Compressed data -# -# Note that ASSETS_FS is linked implicitly and does not need to be listed here. - -OBJECTS = \ - $(foreach file, $(C_FILES) $(S_FILES) $(BIN_FILES), $(BUILD_DIR)/$(file).o) \ - $(foreach file, $(COMPRESSED_BIN_FILES), $(BUILD_DIR)/$(file:.bin=.Yay0.o)) +ASSETS := \ + $(foreach map, $(MAPS), $(map)_shape $(map)_hit) \ + mac_tex tik_tex kgr_tex kmr_tex iwa_tex sbk_tex dro_tex isk_tex trd_tex nok_tex hos_tex kpa_tex osr_tex kkj_tex tst_tex jan_tex mim_tex obk_tex arn_tex dgb_tex kzn_tex flo_tex sam_tex pra_tex omo_tex end_tex mgm_tex gv__tex \ + kmr_bg nok_bg sbk_bg sbk3_bg iwa_bg hos_bg arn_bg obk_bg omo_bg yos_bg jan_bg fla_bg flb_bg sra_bg yki_bg sam_bg kpa_bg title_bg \ + title_data \ + party_kurio party_kameki party_pinki party_pareta party_resa party_akari party_opuku party_pokopi diff --git a/tools/build_assets_fs.py b/tools/build_assets_bin.py similarity index 52% rename from tools/build_assets_fs.py rename to tools/build_assets_bin.py index 2830691963..cd986890fc 100755 --- a/tools/build_assets_fs.py +++ b/tools/build_assets_bin.py @@ -1,43 +1,40 @@ #! /usr/bin/python3 import os -import json -import sys -from subprocess import call +from sys import argv from pathlib import Path -import shutil - -tools_dir = Path(__file__).parent.absolute() def next_multiple(pos, multiple): return pos + pos % multiple -def build_mapfs(src_dir, build_dir, out_bin): - with open(src_dir + ".json", "r") as f: - config = json.loads(f.read()) - +def build_mapfs(out_bin, assets): # every TOC entry's name field has data after the null terminator made up from all the previous name fields. # we probably don't have to do this for the game to read the data properly (it doesn't read past the null terminator # of `string`), but the original devs' equivalent to build_assets_fs.py had this bug so we need to replicate it to match. written_names = [] with open(out_bin, "wb") as f: - f.write(config["title"].encode("ascii")) + f.write("Map Ver.00/11/07 15:36".encode("ascii")) - next_data_pos = (len(config["assets"]) + 1) * 0x1C + next_data_pos = (len(assets) + 1) * 0x1C asset_idx = 0 - for asset in config["assets"]: + for decompressed in assets: toc_entry_pos = 0x20 + asset_idx * 0x1C - src_path = Path(src_dir, asset["path"]) - build_path = Path(build_dir, asset["path"]) + decompressed = Path(decompressed) + compressed = decompressed.with_suffix(".Yay0") + + # non-texture assets should be compressed + if not decompressed.stem.endswith("_tex") and not compressed.exists(): + print(f"uncompressed asset: {decompressed} (expected {compressed} to exist)") + exit(1) # data for TOC entry - name = asset["name"] + "\0" + name = decompressed.stem + "\0" offset = next_data_pos - size = next_multiple(build_path.stat().st_size, 2) - decompressed_size = src_path.stat().st_size + decompressed_size = decompressed.stat().st_size + size = next_multiple(compressed.stat().st_size, 2) if compressed.exists() else decompressed_size #print(f"{name} {offset:08X} {size:08X} {decompressed_size:08X}") @@ -55,7 +52,7 @@ def build_mapfs(src_dir, build_dir, out_bin): # write data. f.seek(0x20 + next_data_pos) - f.write(build_path.read_bytes()) + f.write(compressed.read_bytes() if compressed.exists() else decompressed.read_bytes()) next_data_pos += size asset_idx += 1 @@ -71,36 +68,8 @@ def build_mapfs(src_dir, build_dir, out_bin): f.seek(toc_entry_pos + 0x18) f.write((0x903F0000).to_bytes(4, byteorder="big")) # TODO: figure out purpose -def build_file(src_dir, out_dir, filename): - with open(src_dir + ".json", "r") as f: - config = json.loads(f.read()) - - asset = None - for a in config["assets"]: - if (a["path"] == filename): - asset = a - - if not asset: - print("asset not configured in {}.json".format(src_dir)) - exit(1) - - src_path = Path(src_dir, filename) - out_path = Path(out_dir, filename) - - if asset["compress"]: - call([f"{tools_dir}/Yay0compress", src_path, out_path]) - else: - shutil.copy(src_path, out_path) - if __name__ == "__main__": - sys.argv.pop(0) - src = sys.argv.pop(0) - dest = sys.argv.pop(0) + argv.pop(0) # python3 + out = argv.pop(0) - if len(sys.argv) > 0: - # copy (and compress if required) the given file(s) - while len(sys.argv) > 0: - build_file(src, dest, sys.argv.pop()) - else: - # build the aggregate file - build_mapfs(src, dest, dest + ".bin") + build_mapfs(out, argv) diff --git a/tools/compile_dsl_macros.py b/tools/compile_dsl_macros.py index de4976a835..d62cab7d29 100755 --- a/tools/compile_dsl_macros.py +++ b/tools/compile_dsl_macros.py @@ -8,11 +8,11 @@ import traceback def eprint(*args, **kwargs): print(*args, file=stderr, **kwargs) -write_buf = "" +#write_buf = "" def write(s): - global write_buf - write_buf += s - #print(s, end="") + #global write_buf + #write_buf += s + print(s, end="") ANSI_RED = "\033[1;31;40m" ANSI_RESET = "\u001b[0m" @@ -436,7 +436,7 @@ def read_until_closing_paren(depth=1, lex_strings=False): string_escape = False while True: - char = f.read(1) + char = stdin.read(1) if len(char) == 0: # EOF @@ -463,7 +463,7 @@ def read_line(): line = "" while True: - char = f.read(1) + char = stdin.read(1) if len(char) == 0: # EOF @@ -501,115 +501,107 @@ if __name__ == "__main__": file_info = [] error = False - num_scripts = int(stdin.read()) - if num_scripts == 0: - exit(0) - print(f"compiling {num_scripts} scripts") + macro_name = "" # captures recent UPPER_CASE identifier + prev_char = "" + while True: + char = stdin.read(1) - with open(argv[1], 'r') as f: - macro_name = "" # captures recent UPPER_CASE identifier - prev_char = "" - while True: - char = f.read(1) + if len(char) == 0: + # EOF + write(macro_name) + break - if len(char) == 0: - # EOF - write(macro_name) - break + if char == "#" and (prev_char == "\n" or prev_char == ""): + # cpp line/file marker + line = read_line() + line_split = line[1:].split(" ") - if char == "#" and (prev_char == "\n" or prev_char == ""): - # cpp line/file marker - line = read_line() - line_split = line[1:].split(" ") + line_no = int(line_split[0]) + file_info = line_split[1:] - line_no = int(line_split[0]) - file_info = line_split[1:] + write("#" + line + "\n") + elif char == "(": + filename = file_info[0][1:-1] - write("#" + line + "\n") - elif char == "(": - filename = file_info[0][1:-1] + # SCRIPT(...) + if macro_name == "SCRIPT": + script_source, line_map = gen_line_map(read_until_closing_paren(lex_strings=True), source_line_no=line_no) - # SCRIPT(...) - if macro_name == "SCRIPT": - script_source, line_map = gen_line_map(read_until_closing_paren(lex_strings=True), source_line_no=line_no) + try: + commands = compile_script(script_source) - try: - commands = compile_script(script_source) + write("{\n") + for command in commands: + if command.meta: + write(f"# {line_map[command.meta.line]} {file_info[0]}\n") + write(" ") + for word in command.to_bytecode(): + if type(word) == str: + write(word) + elif type(word) == int: + write(f"0x{word & 0xFFFFFFFF:X}") + else: + raise Exception(f"{command}.to_bytecode() gave {type(word)} {word}") + write(", ") + write("\n") + write("}") + except exceptions.UnexpectedEOF as e: + eprint(f"{filename}:{line_no}: {ANSI_RED}error{ANSI_RESET}: unterminated SCRIPT(...) macro") + error = True + except exceptions.UnexpectedCharacters as e: + line = line_map[e.line] + char = script_source[e.pos_in_stream] + allowed = e.allowed - write("{\n") - for command in commands: - if command.meta: - write(f"# {line_map[command.meta.line]} {file_info[0]}\n") - write(" ") - for word in command.to_bytecode(): - if type(word) == str: - write(word) - elif type(word) == int: - write(f"0x{word & 0xFFFFFFFF:X}") - else: - raise Exception(f"{command}.to_bytecode() gave {type(word)} {word}") - write(", ") - write("\n") - write("}") - except exceptions.UnexpectedEOF as e: - eprint(f"{filename}:{line_no}: {ANSI_RED}error{ANSI_RESET}: unterminated SCRIPT(...) macro") - error = True - except exceptions.UnexpectedCharacters as e: - line = line_map[e.line] - char = script_source[e.pos_in_stream] - allowed = e.allowed + eprint(f"{filename}:{line}: {ANSI_RED}script parse error{ANSI_RESET}: unexpected `{char}', expected {' or '.join(allowed)}") + eprint(e.get_context(script_source)) - eprint(f"{filename}:{line}: {ANSI_RED}script parse error{ANSI_RESET}: unexpected `{char}', expected {' or '.join(allowed)}") - eprint(e.get_context(script_source)) + error = True + except exceptions.UnexpectedToken as e: + line = line_map[e.line] - error = True - except exceptions.UnexpectedToken as e: - line = line_map[e.line] + eprint(f"{filename}:{line}: {ANSI_RED}script parse error{ANSI_RESET}: unexpected `{e.token}'") + eprint(e.get_context(script_source)) - eprint(f"{filename}:{line}: {ANSI_RED}script parse error{ANSI_RESET}: unexpected `{e.token}'") - eprint(e.get_context(script_source)) - - error = True - except exceptions.VisitError as e: - if type(e.orig_exc) == CompileError: - line = line_map[e.orig_exc.meta.line] - eprint(f"{filename}:{line}: {ANSI_RED}script compile error{ANSI_RESET}: {e.orig_exc}") - else: - eprint(f"{filename}:{line_no}: {ANSI_RED}internal script transform error{ANSI_RESET}") - traceback.print_exc() - error = True - except CompileError as e: - line = line_map[e.meta.line] - eprint(f"{filename}:{line}: {ANSI_RED}script compile error{ANSI_RESET}: {e}") - error = True - except Exception as e: - eprint(f"{filename}:{line_no}: {ANSI_RED}internal script compilation error{ANSI_RESET}") + error = True + except exceptions.VisitError as e: + if type(e.orig_exc) == CompileError: + line = line_map[e.orig_exc.meta.line] + eprint(f"{filename}:{line}: {ANSI_RED}script compile error{ANSI_RESET}: {e.orig_exc}") + else: + eprint(f"{filename}:{line_no}: {ANSI_RED}internal script transform error{ANSI_RESET}") traceback.print_exc() - error = True + error = True + except CompileError as e: + line = line_map[e.meta.line] + eprint(f"{filename}:{line}: {ANSI_RED}script compile error{ANSI_RESET}: {e}") + error = True + except Exception as e: + eprint(f"{filename}:{line_no}: {ANSI_RED}internal script compilation error{ANSI_RESET}") + traceback.print_exc() + error = True - line_no += script_source.count("\n") - write(f"\n# {line_no} {file_info[0]}\n") - else: - # leave non-macro in source - write(macro_name + char) - - macro_name = "" - elif char == "_" or (char >= 'A' and char <= 'Z'): - macro_name += char + line_no += script_source.count("\n") + write(f"\n# {line_no} {file_info[0]}\n") else: + # leave non-macro in source write(macro_name + char) - macro_name = "" - if char == "\n": - char_no = 0 - line_no += 1 + macro_name = "" + elif char == "_" or (char >= 'A' and char <= 'Z'): + macro_name += char + else: + write(macro_name + char) + macro_name = "" - char_no += 1 - prev_char = char + if char == "\n": + char_no = 0 + line_no += 1 + + char_no += 1 + prev_char = char if error: exit(1) else: - with open(argv[1], "w") as f: - f.write(write_buf) exit(0) diff --git a/tools/n64splat b/tools/n64splat index 895abeff31..2e2ba8632c 160000 --- a/tools/n64splat +++ b/tools/n64splat @@ -1 +1 @@ -Subproject commit 895abeff31cc0bd5de3a05a55715d3457f8425eb +Subproject commit 2e2ba8632c604aadb8055905340962c0182f844e diff --git a/tools/splat.yaml b/tools/splat.yaml index 2413914564..08c81831a5 100644 --- a/tools/splat.yaml +++ b/tools/splat.yaml @@ -4,7 +4,8 @@ options: find-file-boundaries: True compiler: "GCC" mnemonic_ljust: 10 - ld_o_replace_extension: no + ld_o_replace_extension: False + ld_addrs_header: include/ld_addrs.h segments: - name: header type: header @@ -19,8 +20,7 @@ segments: files: - [0x0040, "asm", "boot"] - [0x0B70, "bin", "bootcode_font"] - - name: code - type: code + - type: code start: 0x1000 vram: 0x80025C00 files: @@ -198,8 +198,7 @@ segments: - [0x4ac90, "c", "os/code_4ac90_len_3910"] - [0x4E5A0, "bin"] - [0x6E8F0, "bin", "world/area_table"] - - name: code - type: code + - type: code start: 0x759B0 vram: 0x800DC500 files: @@ -213,8 +212,7 @@ segments: - [0x8a860, "c", "code_8a860_len_3f30"] - [0x8e790, "c", "code_8e790_len_2850"] - [0x90fe0, "bin"] - - name: code - type: code + - type: code start: 0xA5DD0 vram: 0x8010F6D0 files: @@ -233,8 +231,7 @@ segments: - [0xe16b0, "bin"] - [0xE5820, ".data", "code_dc470_len_14c0"] - [0xE5830, "bin"] - - name: code - type: code + - type: code start: 0xE79B0 vram: 0x802C3000 files: @@ -253,16 +250,14 @@ segments: - [0xFE660, "bin"] - [0xFE730, ".rodata", "code_e79b0_len_1920"] - [0xFE748, "bin"] # rodata chunk for above overlay; here to avoid the 0x10 alignment - - name: code - type: code + - type: code start: 0xFEE30 vram: 0x802DBD40 files: - [0xfee30, "c", "code_fee30_len_2d60"] - [0x101b90, "c", "code_101b90_len_8f0"] - [0x102480, "bin"] - - name: code - type: code + - type: code start: 0x102610 vram: 0x802E0D90 files: @@ -275,8 +270,7 @@ segments: - [0x10A8D0, "c", "code_10A8D0"] - [0x10A9F0, "bin"] # todo split this further - [0x131340, "bin"] # 0x8023E000 - - name: code - type: code + - type: code start: 0x135EE0 vram: 0x80242BA0 files: @@ -286,8 +280,7 @@ segments: - [0x140C70, "c"] - [0x1421C0, "c"] - [0x1422A0, "bin"] - - name: code - type: code + - type: code start: 0x163400 vram: 0x80242BA0 files: @@ -297,8 +290,7 @@ segments: - [0x168590, "c"] - [0x169BE0, "c"] - [0x16A3E0, "bin"] - - name: code - type: code + - type: code start: 0x16C8E0 vram: 0x8023E000 files: @@ -321,112 +313,96 @@ segments: - [0x1AF230, "c"] - [0x1AF2D0, "bin"] - [0x1CC310, "bin"] # icon images and palettes, vram unknown - - name: code - type: code + - type: code start: 0x3169F0 vram: 0x80200000 files: - [0x3169f0, "c", "code_3169f0"] - [0x316a70, "c", "code_316a70"] - [0x316c00, "bin"] # 0x802AE000 - - name: code - type: code + - type: code start: 0x316D90 vram: 0x802AE000 files: - [0x316d90, "c", "code_316d90"] - - name: code - type: code + - type: code start: 0x316f30 vram: 0x802B2000 files: - [0x316f30, "c", "code_316f30"] - - name: code - type: code + - type: code start: 0x317020 vram: 0x802BD100 files: - [0x317020, "c"] - [0x317b60, "bin"] - - name: code - type: code + - type: code start: 0x317e50 vram: 0x802BD100 files: - [0x317e50, "c"] - [0x3195d0, "bin"] - - name: code - type: code + - type: code start: 0x319670 vram: 0x802BD100 files: - [0x319670, "c"] - [0x31b000, "bin"] - - name: code - type: code + - type: code start: 0x31b120 vram: 0x802BD100 files: - [0x31b120, "c"] - [0x31cb60, "bin"] - - name: code - type: code + - type: code start: 0x31cc70 vram: 0x802BD100 files: - [0x31cc70, "c"] - [0x31ddc0, "bin"] - - name: code - type: code + - type: code start: 0x31de70 vram: 0x802BD100 files: - [0x31de70, "c"] - [0x320b20, "bin"] - - name: code - type: code + - type: code start: 0x320c50 vram: 0x802BD100 files: - [0x320c50, "c"] - [0x3239b0, "bin"] - - name: code - type: code + - type: code start: 0x323A50 vram: 0x802BD100 files: - [0x323A50, "c"] - [0x324930, "bin"] - - name: code - type: code + - type: code start: 0x324a10 vram: 0x802BD100 files: - [0x324a10, "c", "world_goompa"] - [0x324e80, "bin"] - - name: code - type: code + - type: code start: 0x324f10 vram: 0x802BD100 files: - [0x324f10, "c", "world_goombaria"] - [0x325000, "bin"] - - name: code - type: code + - type: code start: 0x325070 vram: 0x802BD100 files: - [0x325070, "c", "world_twink"] - [0x325160, "bin"] - - name: code - type: code + - type: code start: 0x3251d0 vram: 0x802BD100 files: - [0x3251d0, "c"] - [0x3255e0, "bin"] - - name: code - type: code + - type: code start: 0x325ad0 vram: 0xE0200000 files: @@ -434,23 +410,20 @@ segments: - [0x325ee0, "c"] - [0x326160, "bin"] - [0x326410, "bin"] - - name: code - type: code + - type: code start: 0x3278f0 vram: 0xE0002000 files: - [0x3278f0, "c"] - [0x328050, "bin"] - - name: code - type: code + - type: code start: 0x328110 vram: 0xE000C000 files: - [0x328110, "c"] - [0x328d20, "bin"] - [0x328EA0, "bin"] - - name: code - type: code + - type: code start: 0x32C110 vram: 0xE000E000 files: @@ -468,179 +441,156 @@ segments: - [0x330440, "bin"] # data/rodata section for above. - [0x330910, "bin"] # code, unknown VRAM addr. Leaving as bin for now. - [0x330ef0, "bin"] # data/rodata section for above. - - name: code - type: code + - type: code start: 0x331940 vram: 0xE001E000 files: - [0x331940, "c"] - [0x332690, "bin"] - [0x3326A0, "bin"] - - name: code - type: code + - type: code start: 0x333ec0 vram: 0xE0020000 files: - [0x333ec0, "c"] - [0x334b50, "bin"] - [0x334C70, "bin"] - - name: code - type: code + - type: code start: 0x337240 vram: 0xE0022000 files: - [0x337240, "c"] - [0x337f10, "bin"] - [0x337FC0, "bin"] - - name: code - type: code + - type: code start: 0x339250 vram: 0xE0024000 files: - [0x339250, "c"] - [0x339f10, "bin"] - [0x339F60, "bin"] - - name: code - type: code + - type: code start: 0x33B180 vram: 0xE0026000 files: - [0x33B180, "c"] - [0x33bb70, "bin"] - [0x33BBD0, "bin"] - - name: code - type: code + - type: code start: 0x33CDF0 vram: 0xE0028000 files: - [0x33CDF0, "c"] - [0x33d5d0, "bin"] - - name: code - type: code + - type: code start: 0x33E8C0 vram: 0xE002A000 files: - [0x33E8C0, "c"] - [0x33efe0, "bin"] - [0x33D610, "bin"] - - name: code - type: code + - type: code start: 0x33FE80 vram: 0xE002C000 files: - [0x33FE80, "c"] - [0x3407c0, "bin"] - [0x340880, "bin"] - - name: code - type: code + - type: code start: 0x3419E0 vram: 0xE002E000 files: - [0x3419E0, "c"] - [0x342120, "bin"] - - name: code - type: code + - type: code start: 0x342140 vram: 0xE0030000 files: - [0x342140, "c"] - [0x342fd0, "bin"] - [0x343040, "bin"] - - name: code - type: code + - type: code start: 0x343680 vram: 0xE0032000 files: - [0x343680, "c"] - [0x343f30, "bin"] - [0x343F70, "bin"] - - name: code - type: code + - type: code start: 0x344a10 vram: 0xE0034000 files: - [0x344a10, "c"] - [0x345190, "bin"] - [0x3451E0, "bin"] - - name: code - type: code + - type: code start: 0x3454E0 vram: 0xE0036000 files: - [0x3454E0, "c"] - [0x345b10, "bin"] - [0x345B40, "bin"] - - name: code - type: code + - type: code start: 0x34EC80 vram: 0xE003A000 files: - [0x34EC80, "c"] - [0x34f480, "bin"] - - name: code - type: code + - type: code start: 0x34F4C0 vram: 0xE003C000 files: - [0x34F4C0, "c"] - [0x350160, "bin"] - [0x350220, "bin"] - - name: code - type: code + - type: code start: 0x352440 vram: 0xE003E000 files: - [0x352440, "c"] - [0x352cb0, "bin"] - [0x352CE0, "bin"] - - name: code - type: code + - type: code start: 0x354F60 vram: 0xE0044000 files: - [0x354F60, "c"] - [0x355d10, "bin"] - - name: code - type: code + - type: code start: 0x355EE0 vram: 0xE0046000 files: - [0x355EE0, "c"] - [0x3564e0, "bin"] - [0x356530, "bin"] - - name: code - type: code + - type: code start: 0x356980 vram: 0xE0048000 files: - [0x356980, "c"] - [0x357380, "bin"] - [0x3573A0, "bin"] - - name: code - type: code + - type: code start: 0x3584C0 vram: 0xE004A000 files: - [0x3584C0, "c"] - [0x359320, "bin"] - [0x3593B0, "bin"] - - name: code - type: code + - type: code start: 0x35B9D0 vram: 0xE004E000 files: - [0x35B9D0, "c"] - [0x35bfb0, "bin"] - - name: code - type: code + - type: code start: 0x35BFD0 vram: 0xE0050000 files: - [0x35BFD0, "c"] - [0x35c530, "bin"] - [0x35C550, "bin"] - - name: code - type: code + - type: code start: 0x3602C0 vram: 0xE005A000 files: @@ -657,78 +607,68 @@ segments: - [0x364bc0, "bin"] # data/rodata for the above, and some extra unknown data. - [0x364f10, "bin"] # code, unknown VRAM addr. Leaving as bin for now. - [0x365970, "bin"] # data/rodata for the above, and some extra unknown data. - - name: code - type: code + - type: code start: 0x366030 vram: 0xE0066000 files: - [0x366030, "c"] - [0x366c80, "bin"] - [0x366D60, "bin"] - - name: code - type: code + - type: code start: 0x36A8D0 vram: 0xE0068000 files: - [0x36A8D0, "c"] - [0x36ae80, "bin"] - [0x36AEE0, "bin"] - - name: code - type: code + - type: code start: 0x36D020 vram: 0xE006A000 files: - [0x36D020, "c"] - [0x36de10, "bin"] - [0x36DF90, "bin"] - - name: code - type: code + - type: code start: 0x36E1D0 vram: 0xE006C000 files: - [0x36E1D0, "c"] - [0x36ed30, "bin"] - [0x36ED60, "bin"] - - name: code - type: code + - type: code start: 0x372790 vram: 0xE006E000 files: - [0x372790, "c"] - [0x373390, "bin"] - [0x3733E0, "bin"] - - name: code - type: code + - type: code start: 0x3740B0 vram: 0xE0070000 files: - [0x3740B0, "c"] - [0x374d80, "bin"] - - name: code - type: code + - type: code start: 0x374E50 vram: 0xE0072000 files: - [0x374E50, "c"] - [0x375500, "bin"] - [0x375510, "bin"] - - name: code - type: code + - type: code start: 0x376460 vram: 0xE0074000 files: - [0x376460, "c"] - [0x376fc0, "bin"] - - name: code - type: code + - type: code start: 0x377070 vram: 0xE0076000 files: - [0x377070, "c"] - [0x377f00, "bin"] - [0x377F80, "bin"] - - name: code - type: code + - type: code start: 0x37A3F0 vram: 0xE0078000 files: @@ -736,79 +676,69 @@ segments: - [0x37acf0, "bin"] - [0x37ADD0, "bin"] - [0x37D9D0, "bin"] - - name: code - type: code + - type: code start: 0x37F720 vram: 0xE007E000 files: - [0x37F720, "c"] - [0x380350, "bin"] - [0x3803A0, "bin"] - - name: code - type: code + - type: code start: 0x3812C0 vram: 0xE0080000 files: - [0x3812C0, "c"] - [0x381d80, "bin"] - [0x381E00, "bin"] - - name: code - type: code + - type: code start: 0x385640 vram: 0xE0082000 files: - [0x385640, "c"] - [0x386340, "bin"] - [0x3863B0, "bin"] - - name: code - type: code + - type: code start: 0x3889D0 vram: 0xE0084000 files: - [0x3889D0, "c"] - [0x3897e0, "bin"] - - name: code - type: code + - type: code start: 0x389850 vram: 0xE0086000 files: - [0x389850, "c"] - [0x38a2f0, "bin"] - [0x38A350, "bin"] - - name: code - type: code + - type: code start: 0x38ADF0 vram: 0xE0088000 files: - [0x38ADF0, "c"] - [0x38bab0, "bin"] - [0x38BBA0, "bin"] - - name: code - type: code + - type: code start: 0x38EE60 vram: 0xE008E000 files: - [0x38EE60, "c"] - [0x38f6f0, "bin"] - [0x38F710, "bin"] - - name: code - type: code + - type: code start: 0x38F900 vram: 0xE0090000 files: - [0x38F900, "c"] - [0x390340, "bin"] - [0x3903D0, "bin"] - - name: code - type: code + - type: code start: 0x391D30 vram: 0xE0092000 files: - [0x391D30, "c"] - [0x3923c0, "bin"] - [0x392440, "bin"] - - name: code - type: code + - type: code start: 0x3928D0 vram: 0xE0094000 files: @@ -829,78 +759,68 @@ segments: - [0x3a2440, "bin"] # data/rodata for the above, and some extra unknown data. - [0x3a2990, "bin"] # code, unknown VRAM addr. Leaving as bin for now. - [0x3a3360, "bin"] # data/rodata for the above, and some extra unknown data. - - name: code - type: code + - type: code start: 0x3A37E0 vram: 0xE00A4000 files: - [0x3A37E0, "c"] - [0x3a42b0, "bin"] - [0x3A4320, "bin"] - - name: code - type: code + - type: code start: 0x3A70F0 vram: 0xE00A8000 files: - [0x3A70F0, "c"] - [0x3A7710, "bin"] - [0x3A77A0, "bin"] # split further - - name: code - type: code + - type: code start: 0x3AA920 vram: 0xE00AA000 files: - [0x3AA920, "c"] - [0x3AAFE0, "bin"] - [0x3AB030, "bin"] # todo split this further - - name: code - type: code + - type: code start: 0x3AEE20 vram: 0xE00AC000 files: - [0x3AEE20, "c"] - [0x3AF5D0, "bin"] - [0x3AF700, "bin"] # todo split this further - - name: code - type: code + - type: code start: 0x3B2350 vram: 0xE00AE000 files: - [0x3B2350, "c"] - [0x3B2D90, "bin"] # todo split this further - - name: code - type: code + - type: code start: 0x3B3EB0 vram: 0xE00B0000 files: - [0x3B3EB0, "c"] - [0x3B4690, "bin"] - [0x3B46A0, "bin"] # todo split this further - - name: code - type: code + - type: code start: 0x3B7B80 vram: 0xE00B8000 files: - [0x3B7B80, "c"] - [0x3B8470, "bin"] - [0x3B8860, "bin"] # todo split this further - - name: code - type: code + - type: code start: 0x3BA030 vram: 0xE00BC000 files: - [0x3BA030, "c"] - [0x3BAC60, "bin"] - [0x3BAEA0, "bin"] # todo split this further ADD STUFF AFTER HERE - - name: code - type: code + - type: code start: 0x415D90 vram: 0x802A1000 files: - [0x415D90, "c"] - [0x4200C0, "bin"] # todo split this further - - name: code - type: code + - type: code start: 0x7E0E80 vram: 0x80280000 files: @@ -909,6 +829,7 @@ segments: - [0x7E3700, "c"] - [0x7e4d00, "bin"] - name: world/area_mac/machi/ + ld_name: machi type: code overlay: True start: 0x7E73A0 @@ -4031,17 +3952,6 @@ segments: - [0xB13500, "bin"] - [0xB13A40, "bin"] - [0xB13D50, "bin"] # rodata - - name: world/area_kkj/kkj_26/ - type: code - overlay: True - start: 0xB13120 - vram: 0x80240000 - files: - - [0xB13120, "c"] - - [0xB13150, "bin"] - - [0xB13500, "bin"] - - [0xB13A40, "bin"] - - [0xB13D50, "bin"] # rodata - name: world/area_kkj/kkj_27/ type: code overlay: True @@ -6590,16 +6500,14 @@ segments: - [0xE1E460, "c"] - [0xE1EC20, "bin"] - [0xE20110, "bin"] - - name: code - type: code + - type: code overlay: True start: 0xE20EB0 vram: 0x802B7000 files: - [0xe20eb0, "c", "code_e20eb0"] - [0xE215C0, "bin"] - - name: code - type: code + - type: code overlay: True start: 0xE21870 vram: 0x802B7000 @@ -6999,8 +6907,6 @@ segments: - [0x1B81E88, "Yay0"] - [0x1B82058, "Yay0"] - [0x1B82202, "bin"] - - name: assets/fs - type: PaperMarioMapFS - start: 0x1E40000 + - [0x1E40000, "PaperMarioMapFS"] - [0x27FEE22, "bin"] - [0x2800000] From 83ab93ae747d3e8572ed0e73abaefbe294cf0969 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Wed, 28 Oct 2020 17:13:22 -0400 Subject: [PATCH 12/78] Update README.md Rewrite FAQ to Troubleshooting --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5f375e3b78..c2f9702ab2 100644 --- a/README.md +++ b/README.md @@ -129,9 +129,9 @@ $ ./format.sh If `format.sh` has any problems with your code, go and fix the issues. If you can't fix a warning without making the function not match anymore, append `// NOLINT` to the offending line. -## FAQ +## Troubleshooting -* If you received the following error when running `make`: +* If you are using Windows, you may encounter the following when you run `make`: ``` sha1sum -c checksum.sha1 sha1sum: 'papermario.z64'$'\r': No such file or directory @@ -141,5 +141,4 @@ Makefile:118: recipe for target 'verify' failed make: *** [verify] Error 1 ``` > 💡 Solution -> -> This is a Windows line ending issue run `git checkout checksum.sha1` to fix it. +> Run `git checkout checksum.sha1` and retry building. Windows messwes with line endings, causing some of our tools to break. From c1043f9a44facb1a08bf26c13f6a461f0b6ebf61 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Wed, 28 Oct 2020 17:13:38 -0400 Subject: [PATCH 13/78] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c2f9702ab2..71c3069611 100644 --- a/README.md +++ b/README.md @@ -141,4 +141,4 @@ Makefile:118: recipe for target 'verify' failed make: *** [verify] Error 1 ``` > 💡 Solution -> Run `git checkout checksum.sha1` and retry building. Windows messwes with line endings, causing some of our tools to break. +Run `git checkout checksum.sha1` and retry building. Windows messwes with line endings, causing some of our tools to break. From a27dfcb7de8b4c931cbc085e4bc3fdc8fd0c5685 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Wed, 28 Oct 2020 17:14:10 -0400 Subject: [PATCH 14/78] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 71c3069611..8bd8e5d44f 100644 --- a/README.md +++ b/README.md @@ -141,4 +141,5 @@ Makefile:118: recipe for target 'verify' failed make: *** [verify] Error 1 ``` > 💡 Solution + Run `git checkout checksum.sha1` and retry building. Windows messwes with line endings, causing some of our tools to break. From 0cf279f456ee5bfbe47f19760c256bc1a9a162e8 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Wed, 28 Oct 2020 17:15:58 -0400 Subject: [PATCH 15/78] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8bd8e5d44f..99848b732f 100644 --- a/README.md +++ b/README.md @@ -142,4 +142,4 @@ make: *** [verify] Error 1 ``` > 💡 Solution -Run `git checkout checksum.sha1` and retry building. Windows messwes with line endings, causing some of our tools to break. +> Run `git checkout checksum.sha1` and retry building. Windows has different line endings than Linux, causing some of our tools to break. From 5c6c5c0fe48f69770fb9b446ca5931217fc26ab4 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Wed, 28 Oct 2020 21:34:04 +0000 Subject: [PATCH 16/78] watch includes --- Makefile | 11 ++++++++--- README.md | 6 ------ diff_settings.py | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index fcb3e3c78f..29e352d8ee 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ BASEROM = baserom.z64 TARGET = papermario COMPARE = 1 NON_MATCHING = 0 +WATCH_INCLUDES = 1 -include settings.mk @@ -57,7 +58,7 @@ CPP := cpp LD := $(CROSS)ld OBJCOPY := $(CROSS)objcopy -CPPFLAGS := -Iinclude -Isrc -D _LANGUAGE_C -ffreestanding -DF3DEX_GBI_2 -D_MIPS_SZLONG=0 -Wundef -Wcomment +CPPFLAGS := -Iinclude -Isrc -D _LANGUAGE_C -ffreestanding -DF3DEX_GBI_2 -D_MIPS_SZLONG=0 -Wundef -Wcomment -MM -MP ASFLAGS := -EB -Iinclude -march=vr4300 -mtune=vr4300 OLDASFLAGS := -EB -Iinclude -G 0 CFLAGS := -O2 -quiet -G 0 -mcpu=vr4300 -mfix4300 -mips3 -mgp32 -mfp32 -Wimplicit -Wuninitialized -Wshadow @@ -72,6 +73,10 @@ endif include sources.mk +ifeq ($(WATCH_INCLUDES),1) +-include $(foreach $(obj), $(OBJECTS), $(BUILD_DIR)/$(obj).mk) +endif + ### Targets ### @@ -126,12 +131,12 @@ $(BUILD_DIR)/%.Yay0.o: $(BUILD_DIR)/%.bin.Yay0 # Compile C files $(BUILD_DIR)/%.c.o: %.c @mkdir -p $(shell dirname $@) - $(CPP) $(CPPFLAGS) -o - $< | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - + $(CPP) $(CPPFLAGS) -MF $@.mk -MT $< -o - $< | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - # Compile C files (with DSL macros) $(foreach cfile, $(DSL_C_FILES), $(BUILD_DIR)/$(cfile).o): $(BUILD_DIR)/%.c.o: %.c @mkdir -p $(shell dirname $@) - $(CPP) $(CPPFLAGS) -o - $< | tools/compile_dsl_macros.py | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - + $(CPP) $(CPPFLAGS) -MF $@.mk -MT $< -o - $< | tools/compile_dsl_macros.py | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - # Assemble handwritten ASM $(BUILD_DIR)/%.s.o: %.s diff --git a/README.md b/README.md index 5f375e3b78..2bdc2c9a1b 100644 --- a/README.md +++ b/README.md @@ -54,12 +54,6 @@ We provide [windows_terminal.bat](tools/windows_terminal.bat) to open a [Windows ### Rebuilding -Setting the `PM_HEADER_REBUILD` environment variable will cause `make` to rebuild all `.c` files whenever a `.h` file is modified. - -```sh -$ PM_HEADER_REBUILD=1 make -``` - If you use Visual Studio Code, you can use _Run Build Task_ (Ctrl+Shift+B) to run `make`. Any errors or warnings generated by the compiler will show up in the _Problems_ tab. ### Matching a function diff --git a/diff_settings.py b/diff_settings.py index eb14aca999..52c1cfe713 100644 --- a/diff_settings.py +++ b/diff_settings.py @@ -5,4 +5,4 @@ def apply(config, args): config['myimg'] = 'papermario.z64' config['mapfile'] = 'build/papermario.map' config['source_directories'] = ['.'] - config['makeflags'] = ['COMPARE=0'] + config['makeflags'] = ['COMPARE=0', 'WATCH_INCLUDES=0'] From 405c3277cf9936a429cf47b24c36317287a5552a Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Wed, 28 Oct 2020 22:08:14 +0000 Subject: [PATCH 17/78] fix build --- Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 29e352d8ee..0bb9ba311e 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,7 @@ CPP := cpp LD := $(CROSS)ld OBJCOPY := $(CROSS)objcopy -CPPFLAGS := -Iinclude -Isrc -D _LANGUAGE_C -ffreestanding -DF3DEX_GBI_2 -D_MIPS_SZLONG=0 -Wundef -Wcomment -MM -MP +CPPFLAGS := -Iinclude -Isrc -D _LANGUAGE_C -ffreestanding -DF3DEX_GBI_2 -D_MIPS_SZLONG=32 -Wundef -Wcomment -MP -MD ASFLAGS := -EB -Iinclude -march=vr4300 -mtune=vr4300 OLDASFLAGS := -EB -Iinclude -G 0 CFLAGS := -O2 -quiet -G 0 -mcpu=vr4300 -mfix4300 -mips3 -mgp32 -mfp32 -Wimplicit -Wuninitialized -Wshadow @@ -73,8 +73,10 @@ endif include sources.mk +%.d: ; + ifeq ($(WATCH_INCLUDES),1) --include $(foreach $(obj), $(OBJECTS), $(BUILD_DIR)/$(obj).mk) +-include $(foreach obj, $(OBJECTS), $(obj).mk) endif @@ -129,14 +131,14 @@ $(BUILD_DIR)/%.Yay0.o: $(BUILD_DIR)/%.bin.Yay0 $(LD) -r -b binary -o $@ $< # Compile C files -$(BUILD_DIR)/%.c.o: %.c +$(BUILD_DIR)/%.c.o: %.c $(BUILD_DIR)/%.d @mkdir -p $(shell dirname $@) - $(CPP) $(CPPFLAGS) -MF $@.mk -MT $< -o - $< | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - + $(CPP) $(CPPFLAGS) -o - $< -MF $@.mk -MT $(BUILD_DIR)/$*.d | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - # Compile C files (with DSL macros) -$(foreach cfile, $(DSL_C_FILES), $(BUILD_DIR)/$(cfile).o): $(BUILD_DIR)/%.c.o: %.c +$(foreach cfile, $(DSL_C_FILES), $(BUILD_DIR)/$(cfile).o): $(BUILD_DIR)/%.c.o: %.c $(BUILD_DIR)/%.d @mkdir -p $(shell dirname $@) - $(CPP) $(CPPFLAGS) -MF $@.mk -MT $< -o - $< | tools/compile_dsl_macros.py | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - + $(CPP) $(CPPFLAGS) -o - $< -MF $@.mk -MT $(BUILD_DIR)/$*.d | tools/compile_dsl_macros.py | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - # Assemble handwritten ASM $(BUILD_DIR)/%.s.o: %.s From 80dc887bfa7edcddf92b1084154930288b5e0021 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Wed, 28 Oct 2020 22:09:57 +0000 Subject: [PATCH 18/78] bump splat --- tools/n64splat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/n64splat b/tools/n64splat index 2e2ba8632c..037d80e00c 160000 --- a/tools/n64splat +++ b/tools/n64splat @@ -1 +1 @@ -Subproject commit 2e2ba8632c604aadb8055905340962c0182f844e +Subproject commit 037d80e00cb3aeae37bdad77bfac871036982456 From 1982b25ff8ca1bbb817b12480eadafa9ab46f9c6 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Wed, 28 Oct 2020 22:10:23 +0000 Subject: [PATCH 19/78] remove ld_name --- tools/splat.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/splat.yaml b/tools/splat.yaml index 08c81831a5..68395935ff 100644 --- a/tools/splat.yaml +++ b/tools/splat.yaml @@ -829,7 +829,6 @@ segments: - [0x7E3700, "c"] - [0x7e4d00, "bin"] - name: world/area_mac/machi/ - ld_name: machi type: code overlay: True start: 0x7E73A0 From ce678310835f6cbee71ccbaa73bca13b824cbea0 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Wed, 28 Oct 2020 22:18:20 +0000 Subject: [PATCH 20/78] fix hasm sections --- asm/boot.s | 102 ++++++++++++++--------------- asm/os/code_45df0_len_970.s | 126 ++++++++++++++++++------------------ 2 files changed, 114 insertions(+), 114 deletions(-) diff --git a/asm/boot.s b/asm/boot.s index ef7ab17def..e78799c793 100644 --- a/asm/boot.s +++ b/asm/boot.s @@ -5,7 +5,7 @@ .set noreorder # don't insert nops after branches .set gp=64 # allow use of 64-bit general purpose registers -.section .text_40, "ax" +.section .text, "ax" glabel func_A4000040 /* 40 A4000040 40806800 */ mtc0 $zero, $13 @@ -15,7 +15,7 @@ glabel func_A4000040 /* 50 A4000050 25080000 */ addiu $t0, $t0, 0 /* 54 A4000054 8D09000C */ lw $t1, 0xc($t0) /* 58 A4000058 152000ED */ bnez $t1, .LA4000410 -/* 5C A400005C 00000000 */ nop +/* 5C A400005C 00000000 */ nop /* 60 A4000060 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 64 A4000064 AFB30000 */ sw $s3, ($sp) /* 68 A4000068 AFB40004 */ sw $s4, 4($sp) @@ -32,20 +32,20 @@ glabel func_A4000040 /* 94 A4000094 AD090004 */ sw $t1, 4($t0) /* 98 A4000098 24112260 */ addiu $s1, $zero, 0x2260 .LA400009C: -/* 9C A400009C 00000000 */ nop +/* 9C A400009C 00000000 */ nop /* A0 A40000A0 2231FFFF */ addi $s1, $s1, -1 /* A4 A40000A4 1620FFFD */ bnez $s1, .LA400009C -/* A8 A40000A8 00000000 */ nop +/* A8 A40000A8 00000000 */ nop /* AC A40000AC AD000008 */ sw $zero, 8($t0) /* B0 A40000B0 34090014 */ ori $t1, $zero, 0x14 /* B4 A40000B4 AD09000C */ sw $t1, 0xc($t0) /* B8 A40000B8 AD000000 */ sw $zero, ($t0) /* BC A40000BC 24110004 */ addiu $s1, $zero, 4 .LA40000C0: -/* C0 A40000C0 00000000 */ nop +/* C0 A40000C0 00000000 */ nop /* C4 A40000C4 2231FFFF */ addi $s1, $s1, -1 /* C8 A40000C8 1620FFFD */ bnez $s1, .LA40000C0 -/* CC A40000CC 00000000 */ nop +/* CC A40000CC 00000000 */ nop /* D0 A40000D0 3409000E */ ori $t1, $zero, 0xe /* D4 A40000D4 AD090000 */ sw $t1, ($t0) /* D8 A40000D8 24110020 */ addiu $s1, $zero, 0x20 @@ -78,11 +78,11 @@ glabel func_A4000040 /* 140 A4000140 3C110101 */ lui $s1, 0x101 /* 144 A4000144 26310101 */ addiu $s1, $s1, 0x101 /* 148 A4000148 16110005 */ bne $s0, $s1, .LA4000160 -/* 14C A400014C 00000000 */ nop +/* 14C A400014C 00000000 */ nop /* 150 A4000150 24100200 */ addiu $s0, $zero, 0x200 /* 154 A4000154 35714000 */ ori $s1, $t3, 0x4000 /* 158 A4000158 10000003 */ b .LA4000168 -/* 15C A400015C 00000000 */ nop +/* 15C A400015C 00000000 */ nop .LA4000160: /* 160 A4000160 24100400 */ addiu $s0, $zero, 0x400 /* 164 A4000164 35718000 */ ori $s1, $t3, 0x8000 @@ -90,9 +90,9 @@ glabel func_A4000040 /* 168 A4000168 AE2E0004 */ sw $t6, 4($s1) /* 16C A400016C 25F5000C */ addiu $s5, $t7, 0xc /* 170 A4000170 0D0001DB */ jal func_A400076C -/* 174 A4000174 00000000 */ nop +/* 174 A4000174 00000000 */ nop /* 178 A4000178 10400038 */ beqz $v0, .LA400025C -/* 17C A400017C 00000000 */ nop +/* 17C A400017C 00000000 */ nop /* 180 A4000180 AFA20000 */ sw $v0, ($sp) /* 184 A4000184 24092000 */ addiu $t1, $zero, 0x2000 /* 188 A4000188 AD890000 */ sw $t1, ($t4) @@ -105,7 +105,7 @@ glabel func_A4000040 /* 1A4 A40001A4 AD890000 */ sw $t1, ($t4) /* 1A8 A40001A8 3C08B019 */ lui $t0, 0xb019 /* 1AC A40001AC 1568000C */ bne $t3, $t0, .LA40001E0 -/* 1B0 A40001B0 00000000 */ nop +/* 1B0 A40001B0 00000000 */ nop /* 1B4 A40001B4 3C080800 */ lui $t0, 0x800 /* 1B8 A40001B8 0308C020 */ add $t8, $t8, $t0 /* 1BC A40001BC 0330C820 */ add $t9, $t9, $s0 @@ -116,7 +116,7 @@ glabel func_A4000040 /* 1D0 A40001D0 00129040 */ sll $s2, $s2, 1 /* 1D4 A40001D4 22520001 */ addi $s2, $s2, 1 /* 1D8 A40001D8 10000003 */ b .LA40001E8 -/* 1DC A40001DC 00000000 */ nop +/* 1DC A40001DC 00000000 */ nop .LA40001E0: /* 1E0 A40001E0 3C080010 */ lui $t0, 0x10 /* 1E4 A40001E4 0288A020 */ add $s4, $s4, $t0 @@ -130,11 +130,11 @@ glabel func_A4000040 /* 200 A4000200 3129FFFF */ andi $t1, $t1, 0xffff /* 204 A4000204 24080500 */ addiu $t0, $zero, 0x500 /* 208 A4000208 15280009 */ bne $t1, $t0, .LA4000230 -/* 20C A400020C 00000000 */ nop +/* 20C A400020C 00000000 */ nop /* 210 A4000210 3C1B0100 */ lui $k1, 0x100 /* 214 A4000214 035BD024 */ and $k0, $k0, $k1 /* 218 A4000218 17400005 */ bnez $k0, .LA4000230 -/* 21C A400021C 00000000 */ nop +/* 21C A400021C 00000000 */ nop /* 220 A4000220 3C08101C */ lui $t0, 0x101c /* 224 A4000224 35080A04 */ ori $t0, $t0, 0xa04 /* 228 A4000228 ADE80018 */ sw $t0, 0x18($t7) @@ -151,7 +151,7 @@ glabel func_A4000040 /* 24C A400024C 25AD0001 */ addiu $t5, $t5, 1 /* 250 A4000250 2DA80008 */ sltiu $t0, $t5, 8 /* 254 A4000254 1500FFC4 */ bnez $t0, .LA4000168 -/* 258 A4000258 00000000 */ nop +/* 258 A4000258 00000000 */ nop .LA400025C: /* 25C A400025C 3C08C400 */ lui $t0, 0xc400 /* 260 A4000260 AD48000C */ sw $t0, 0xc($t2) @@ -163,14 +163,14 @@ glabel func_A4000040 /* 274 A4000274 8FA90004 */ lw $t1, 4($sp) /* 278 A4000278 3C08B009 */ lui $t0, 0xb009 /* 27C A400027C 15280016 */ bne $t1, $t0, .LA40002D8 -/* 280 A4000280 00000000 */ nop +/* 280 A4000280 00000000 */ nop /* 284 A4000284 AE380004 */ sw $t8, 4($s1) /* 288 A4000288 2735000C */ addiu $s5, $t9, 0xc /* 28C A400028C 8FA40000 */ lw $a0, ($sp) /* 290 A4000290 23BD0008 */ addi $sp, $sp, 8 /* 294 A4000294 24050001 */ addiu $a1, $zero, 1 /* 298 A4000298 0D00028D */ jal func_A4000A34 -/* 29C A400029C 00000000 */ nop +/* 29C A400029C 00000000 */ nop /* 2A0 A40002A0 8EC80000 */ lw $t0, ($s6) /* 2A4 A40002A4 3C080008 */ lui $t0, 8 /* 2A8 A40002A8 01164020 */ add $t0, $t0, $s6 @@ -192,7 +192,7 @@ glabel func_A4000040 /* 2E4 A40002E4 23BD0008 */ addi $sp, $sp, 8 /* 2E8 A40002E8 24050001 */ addiu $a1, $zero, 1 /* 2EC A40002EC 0D00028D */ jal func_A4000A34 -/* 2F0 A40002F0 00000000 */ nop +/* 2F0 A40002F0 00000000 */ nop /* 2F4 A40002F4 8CE80000 */ lw $t0, ($a3) /* 2F8 A40002F8 3C080008 */ lui $t0, 8 /* 2FC A40002FC 01074020 */ add $t0, $t0, $a3 @@ -223,7 +223,7 @@ glabel func_A4000040 /* 35C A400035C 24630001 */ addiu $v1, $v1, 1 /* 360 A4000360 006D402A */ slt $t0, $v1, $t5 /* 364 A4000364 1500FFC3 */ bnez $t0, .LA4000274 -/* 368 A4000368 00000000 */ nop +/* 368 A4000368 00000000 */ nop /* 36C A400036C 3C0AA470 */ lui $t2, 0xa470 /* 370 A4000370 001294C0 */ sll $s2, $s2, 0x13 /* 374 A4000374 3C090006 */ lui $t1, 6 @@ -266,7 +266,7 @@ glabel func_A4000040 /* 400 A4000400 1420FFFD */ bnez $at, .LA40003F8 /* 404 A4000404 25080010 */ addiu $t0, $t0, 0x10 /* 408 A4000408 10000013 */ b .LA4000458 -/* 40C A400040C 00000000 */ nop +/* 40C A400040C 00000000 */ nop .LA4000410: /* 410 A4000410 3C088000 */ lui $t0, 0x8000 /* 414 A4000414 25080000 */ addiu $t0, $t0, 0 @@ -315,7 +315,7 @@ glabel func_A4000040 /* 4B0 A40004B0 3C0C8000 */ lui $t4, 0x8000 /* 4B4 A40004B4 258C0000 */ addiu $t4, $t4, 0 /* 4B8 A40004B8 01800008 */ jr $t4 -/* 4BC A40004BC 00000000 */ nop +/* 4BC A40004BC 00000000 */ nop glabel func_A40004C0 /* 4C0 A40004C0 3C0BB000 */ lui $t3, 0xb000 @@ -343,23 +343,23 @@ glabel func_A40004C0 /* 514 A4000514 3C01A460 */ lui $at, 0xa460 /* 518 A4000518 AC2A000C */ sw $t2, 0xc($at) .LA400051C: -/* 51C A400051C 00000000 */ nop -/* 520 A4000520 00000000 */ nop -/* 524 A4000524 00000000 */ nop -/* 528 A4000528 00000000 */ nop -/* 52C A400052C 00000000 */ nop -/* 530 A4000530 00000000 */ nop -/* 534 A4000534 00000000 */ nop -/* 538 A4000538 00000000 */ nop -/* 53C A400053C 00000000 */ nop -/* 540 A4000540 00000000 */ nop -/* 544 A4000544 00000000 */ nop -/* 548 A4000548 00000000 */ nop +/* 51C A400051C 00000000 */ nop +/* 520 A4000520 00000000 */ nop +/* 524 A4000524 00000000 */ nop +/* 528 A4000528 00000000 */ nop +/* 52C A400052C 00000000 */ nop +/* 530 A4000530 00000000 */ nop +/* 534 A4000534 00000000 */ nop +/* 538 A4000538 00000000 */ nop +/* 53C A400053C 00000000 */ nop +/* 540 A4000540 00000000 */ nop +/* 544 A4000544 00000000 */ nop +/* 548 A4000548 00000000 */ nop /* 54C A400054C 3C0BA460 */ lui $t3, 0xa460 /* 550 A4000550 8D6B0010 */ lw $t3, 0x10($t3) /* 554 A4000554 316B0001 */ andi $t3, $t3, 1 /* 558 A4000558 1560FFF0 */ bnez $t3, .LA400051C -/* 55C A400055C 00000000 */ nop +/* 55C A400055C 00000000 */ nop /* 560 A4000560 3C0BB000 */ lui $t3, 0xb000 /* 564 A4000564 8D640008 */ lw $a0, 8($t3) /* 568 A4000568 3C010010 */ lui $at, 0x10 @@ -420,15 +420,15 @@ glabel func_A40004C0 /* 634 A4000634 3C0BB000 */ lui $t3, 0xb000 /* 638 A4000638 8D680010 */ lw $t0, 0x10($t3) /* 63C A400063C 14E80006 */ bne $a3, $t0, .LA4000658 -/* 640 A4000640 00000000 */ nop +/* 640 A4000640 00000000 */ nop /* 644 A4000644 8D680014 */ lw $t0, 0x14($t3) /* 648 A4000648 16080003 */ bne $s0, $t0, .LA4000658 -/* 64C A400064C 00000000 */ nop +/* 64C A400064C 00000000 */ nop /* 650 A4000650 04110003 */ bal .LA4000660 -/* 654 A4000654 00000000 */ nop +/* 654 A4000654 00000000 */ nop .LA4000658: /* 658 A4000658 0411FFFF */ bal .LA4000658 -/* 65C A400065C 00000000 */ nop +/* 65C A400065C 00000000 */ nop .LA4000660: /* 660 A4000660 3C09A408 */ lui $t1, 0xa408 /* 664 A4000664 8D290000 */ lw $t1, ($t1) @@ -500,8 +500,8 @@ glabel func_A40004C0 /* 758 A4000758 3C010010 */ lui $at, 0x10 /* 75C A400075C 01214823 */ subu $t1, $t1, $at /* 760 A4000760 01200008 */ jr $t1 -/* 764 A4000764 00000000 */ nop -/* 768 A4000768 00000000 */ nop +/* 764 A4000764 00000000 */ nop +/* 768 A4000768 00000000 */ nop glabel func_A400076C /* 76C A400076C 27BDFF60 */ addiu $sp, $sp, -0xa0 @@ -535,7 +535,7 @@ glabel func_A400076C /* 7DC A40007DC AFBF0064 */ sw $ra, 0x64($sp) .LA40007E0: /* 7E0 A40007E0 0D00021D */ jal func_A4000874 -/* 7E4 A40007E4 00000000 */ nop +/* 7E4 A40007E4 00000000 */ nop /* 7E8 A40007E8 26100001 */ addiu $s0, $s0, 1 /* 7EC A40007EC 2A090004 */ slti $t1, $s0, 4 /* 7F0 A40007F0 1520FFFB */ bnez $t1, .LA40007E0 @@ -591,7 +591,7 @@ glabel func_A4000874 /* 8AC A40008AC 00404825 */ or $t1, $v0, $zero /* 8B0 A40008B0 0000D012 */ mflo $k0 /* 8B4 A40008B4 017A5821 */ addu $t3, $t3, $k0 -/* 8B8 A40008B8 00000000 */ nop +/* 8B8 A40008B8 00000000 */ nop /* 8BC A40008BC 293A0050 */ slti $k0, $t1, 0x50 .LA40008C0: /* 8C0 A40008C0 1740FFF1 */ bnez $k0, .LA4000888 @@ -611,7 +611,7 @@ glabel func_A4000874 .LA40008F4: /* 8F4 A40008F4 27BD0020 */ addiu $sp, $sp, 0x20 /* 8F8 A40008F8 03E00008 */ jr $ra -/* 8FC A40008FC 00000000 */ nop +/* 8FC A40008FC 00000000 */ nop glabel func_A4000900 /* 900 A4000900 27BDFFD8 */ addiu $sp, $sp, -0x28 @@ -645,7 +645,7 @@ glabel func_A4000900 /* 964 A4000964 8FBF001C */ lw $ra, 0x1c($sp) /* 968 A4000968 27BD0028 */ addiu $sp, $sp, 0x28 /* 96C A400096C 03E00008 */ jr $ra -/* 970 A4000970 00000000 */ nop +/* 970 A4000970 00000000 */ nop glabel func_A4000974 /* 974 A4000974 27BDFFD8 */ addiu $sp, $sp, -0x28 @@ -701,7 +701,7 @@ glabel func_A4000974 /* A24 A4000A24 8FBF001C */ lw $ra, 0x1c($sp) /* A28 A4000A28 27BD0028 */ addiu $sp, $sp, 0x28 /* A2C A4000A2C 03E00008 */ jr $ra -/* A30 A4000A30 00000000 */ nop +/* A30 A4000A30 00000000 */ nop glabel func_A4000A34 /* A34 A4000A34 27BDFFD8 */ addiu $sp, $sp, -0x28 @@ -741,7 +741,7 @@ glabel func_A4000A34 /* AB4 A4000AB4 8FBF001C */ lw $ra, 0x1c($sp) /* AB8 A4000AB8 27BD0028 */ addiu $sp, $sp, 0x28 /* ABC A4000ABC 03E00008 */ jr $ra -/* AC0 A4000AC0 00000000 */ nop +/* AC0 A4000AC0 00000000 */ nop glabel func_A4000AC4 /* AC4 A4000AC4 27BDFFD8 */ addiu $sp, $sp, -0x28 @@ -782,8 +782,8 @@ glabel func_A4000AC4 /* B50 A4000B50 8FBF001C */ lw $ra, 0x1c($sp) /* B54 A4000B54 27BD0028 */ addiu $sp, $sp, 0x28 /* B58 A4000B58 03E00008 */ jr $ra -/* B5C A4000B5C 00000000 */ nop -/* B60 A4000B60 00000000 */ nop -/* B64 A4000B64 00000000 */ nop -/* B68 A4000B68 00000000 */ nop -/* B6C A4000B6C 00000000 */ nop +/* B5C A4000B5C 00000000 */ nop +/* B60 A4000B60 00000000 */ nop +/* B64 A4000B64 00000000 */ nop +/* B68 A4000B68 00000000 */ nop +/* B6C A4000B6C 00000000 */ nop diff --git a/asm/os/code_45df0_len_970.s b/asm/os/code_45df0_len_970.s index e86d69c867..4d7d315b0f 100644 --- a/asm/os/code_45df0_len_970.s +++ b/asm/os/code_45df0_len_970.s @@ -5,13 +5,13 @@ .set noreorder # don't insert nops after branches .set gp=64 # allow use of 64-bit general purpose registers -.section .text_1000, "ax" +.section .text, "ax" glabel func_8006A9F0 /* 45DF0 8006A9F0 3C1A8007 */ lui $k0, 0x8007 /* 45DF4 8006A9F4 275AAA00 */ addiu $k0, $k0, -0x5600 /* 45DF8 8006A9F8 03400008 */ jr $k0 -/* 45DFC 8006A9FC 00000000 */ nop +/* 45DFC 8006A9FC 00000000 */ nop glabel osExceptionPreamble /* 45E00 8006AA00 3C1A800B */ lui $k0, 0x800b @@ -74,7 +74,7 @@ glabel func_8006AA34 /* 45EDC 8006AADC 8F5B0118 */ lw $k1, 0x118($k0) /* 45EE0 8006AAE0 3369FF00 */ andi $t1, $k1, 0xff00 /* 45EE4 8006AAE4 11200013 */ beqz $t1, .L8006AB34 -/* 45EE8 8006AAE8 00000000 */ nop +/* 45EE8 8006AAE8 00000000 */ nop /* 45EEC 8006AAEC 3C088009 */ lui $t0, 0x8009 /* 45EF0 8006AAF0 25085900 */ addiu $t0, $t0, 0x5900 /* 45EF4 8006AAF4 8D080000 */ lw $t0, ($t0) @@ -97,7 +97,7 @@ glabel func_8006AA34 /* 45F34 8006AB34 3C09A430 */ lui $t1, 0xa430 /* 45F38 8006AB38 8D29000C */ lw $t1, 0xc($t1) /* 45F3C 8006AB3C 1120000B */ beqz $t1, .L8006AB6C -/* 45F40 8006AB40 00000000 */ nop +/* 45F40 8006AB40 00000000 */ nop /* 45F44 8006AB44 3C088009 */ lui $t0, 0x8009 /* 45F48 8006AB48 25085900 */ addiu $t0, $t0, 0x5900 /* 45F4C 8006AB4C 8D080000 */ lw $t0, ($t0) @@ -114,9 +114,9 @@ glabel func_8006AA34 /* 45F74 8006AB74 AF48011C */ sw $t0, 0x11c($k0) /* 45F78 8006AB78 8F480018 */ lw $t0, 0x18($k0) /* 45F7C 8006AB7C 11000014 */ beqz $t0, .L8006ABD0 -/* 45F80 8006AB80 00000000 */ nop +/* 45F80 8006AB80 00000000 */ nop /* 45F84 8006AB84 4448F800 */ cfc1 $t0, $31 -/* 45F88 8006AB88 00000000 */ nop +/* 45F88 8006AB88 00000000 */ nop /* 45F8C 8006AB8C AF48012C */ sw $t0, 0x12c($k0) /* 45F90 8006AB90 F7400130 */ sdc1 $f0, 0x130($k0) /* 45F94 8006AB94 F7420138 */ sdc1 $f2, 0x138($k0) @@ -142,19 +142,19 @@ glabel func_8006AA34 /* 45FE0 8006ABE0 3109007C */ andi $t1, $t0, 0x7c /* 45FE4 8006ABE4 240A0024 */ addiu $t2, $zero, 0x24 /* 45FE8 8006ABE8 112A00BF */ beq $t1, $t2, .L8006AEE8 -/* 45FEC 8006ABEC 00000000 */ nop +/* 45FEC 8006ABEC 00000000 */ nop /* 45FF0 8006ABF0 240A002C */ addiu $t2, $zero, 0x2c /* 45FF4 8006ABF4 112A0110 */ beq $t1, $t2, handle_CPU -/* 45FF8 8006ABF8 00000000 */ nop +/* 45FF8 8006ABF8 00000000 */ nop /* 45FFC 8006ABFC 240A0000 */ addiu $t2, $zero, 0 /* 46000 8006AC00 152A00D2 */ bne $t1, $t2, .L8006AF4C -/* 46004 8006AC04 00000000 */ nop +/* 46004 8006AC04 00000000 */ nop /* 46008 8006AC08 03688024 */ and $s0, $k1, $t0 .L8006AC0C: /* 4600C 8006AC0C 3209FF00 */ andi $t1, $s0, 0xff00 /* 46010 8006AC10 00095302 */ srl $t2, $t1, 0xc /* 46014 8006AC14 15400003 */ bnez $t2, .L8006AC24 -/* 46018 8006AC18 00000000 */ nop +/* 46018 8006AC18 00000000 */ nop /* 4601C 8006AC1C 00095202 */ srl $t2, $t1, 8 /* 46020 8006AC20 214A0010 */ addi $t2, $t2, 0x10 .L8006AC24: @@ -165,7 +165,7 @@ glabel func_8006AA34 /* 46034 8006AC34 002A0821 */ addu $at, $at, $t2 /* 46038 8006AC38 8C2A9DA0 */ lw $t2, -0x6260($at) /* 4603C 8006AC3C 01400008 */ jr $t2 -/* 46040 8006AC40 00000000 */ nop +/* 46040 8006AC40 00000000 */ nop /* 46044 8006AC44 2401DFFF */ addiu $at, $zero, -0x2001 /* 46048 8006AC48 1000FFF0 */ b .L8006AC0C /* 4604C 8006AC4C 02018024 */ and $s0, $s0, $at @@ -176,7 +176,7 @@ glabel func_8006AA34 /* 46060 8006AC60 40895800 */ mtc0 $t1, $11 /* 46064 8006AC64 24040018 */ addiu $a0, $zero, 0x18 /* 46068 8006AC68 0C01ABDF */ jal send_mesg -/* 4606C 8006AC6C 00000000 */ nop +/* 4606C 8006AC6C 00000000 */ nop /* 46070 8006AC70 3C01FFFF */ lui $at, 0xffff /* 46074 8006AC74 34217FFF */ ori $at, $at, 0x7fff /* 46078 8006AC78 1000FFE4 */ b .L8006AC0C @@ -188,18 +188,18 @@ glabel func_8006AA34 /* 46090 8006AC90 21290008 */ addi $t1, $t1, 8 /* 46094 8006AC94 8D2A0000 */ lw $t2, ($t1) /* 46098 8006AC98 11400007 */ beqz $t2, .L8006ACB8 -/* 4609C 8006AC9C 00000000 */ nop +/* 4609C 8006AC9C 00000000 */ nop /* 460A0 8006ACA0 0140F809 */ jalr $t2 /* 460A4 8006ACA4 8D3D0004 */ lw $sp, 4($t1) /* 460A8 8006ACA8 10400003 */ beqz $v0, .L8006ACB8 -/* 460AC 8006ACAC 00000000 */ nop +/* 460AC 8006ACAC 00000000 */ nop /* 460B0 8006ACB0 10000093 */ b .L8006AF00 -/* 460B4 8006ACB4 00000000 */ nop +/* 460B4 8006ACB4 00000000 */ nop .L8006ACB8: /* 460B8 8006ACB8 0C01ABDF */ jal send_mesg /* 460BC 8006ACBC 24040010 */ addiu $a0, $zero, 0x10 /* 460C0 8006ACC0 1000FFD2 */ b .L8006AC0C -/* 460C4 8006ACC4 00000000 */ nop +/* 460C4 8006ACC4 00000000 */ nop /* 460C8 8006ACC8 3C11A430 */ lui $s1, 0xa430 /* 460CC 8006ACCC 8E310008 */ lw $s1, 8($s1) /* 460D0 8006ACD0 3C088009 */ lui $t0, 0x8009 @@ -209,7 +209,7 @@ glabel func_8006AA34 /* 460E0 8006ACE0 02288824 */ and $s1, $s1, $t0 /* 460E4 8006ACE4 32290001 */ andi $t1, $s1, 1 /* 460E8 8006ACE8 11200014 */ beqz $t1, .L8006AD3C -/* 460EC 8006ACEC 00000000 */ nop +/* 460EC 8006ACEC 00000000 */ nop /* 460F0 8006ACF0 3231003E */ andi $s1, $s1, 0x3e /* 460F4 8006ACF4 3C0CA404 */ lui $t4, 0xa404 /* 460F8 8006ACF8 8D8C0010 */ lw $t4, 0x10($t4) @@ -218,33 +218,33 @@ glabel func_8006AA34 /* 46104 8006AD04 AC290010 */ sw $t1, 0x10($at) /* 46108 8006AD08 318C0300 */ andi $t4, $t4, 0x300 /* 4610C 8006AD0C 11800007 */ beqz $t4, .L8006AD2C -/* 46110 8006AD10 00000000 */ nop +/* 46110 8006AD10 00000000 */ nop /* 46114 8006AD14 0C01ABDF */ jal send_mesg /* 46118 8006AD18 24040020 */ addiu $a0, $zero, 0x20 /* 4611C 8006AD1C 12200044 */ beqz $s1, .L8006AE30 -/* 46120 8006AD20 00000000 */ nop +/* 46120 8006AD20 00000000 */ nop /* 46124 8006AD24 10000005 */ b .L8006AD3C -/* 46128 8006AD28 00000000 */ nop +/* 46128 8006AD28 00000000 */ nop .L8006AD2C: /* 4612C 8006AD2C 0C01ABDF */ jal send_mesg /* 46130 8006AD30 24040058 */ addiu $a0, $zero, 0x58 /* 46134 8006AD34 1220003E */ beqz $s1, .L8006AE30 -/* 46138 8006AD38 00000000 */ nop +/* 46138 8006AD38 00000000 */ nop .L8006AD3C: /* 4613C 8006AD3C 32290008 */ andi $t1, $s1, 8 /* 46140 8006AD40 11200008 */ beqz $t1, .L8006AD64 -/* 46144 8006AD44 00000000 */ nop +/* 46144 8006AD44 00000000 */ nop /* 46148 8006AD48 32310037 */ andi $s1, $s1, 0x37 /* 4614C 8006AD4C 3C01A440 */ lui $at, 0xa440 /* 46150 8006AD50 AC200010 */ sw $zero, 0x10($at) /* 46154 8006AD54 0C01ABDF */ jal send_mesg /* 46158 8006AD58 24040038 */ addiu $a0, $zero, 0x38 /* 4615C 8006AD5C 12200034 */ beqz $s1, .L8006AE30 -/* 46160 8006AD60 00000000 */ nop +/* 46160 8006AD60 00000000 */ nop .L8006AD64: /* 46164 8006AD64 32290004 */ andi $t1, $s1, 4 /* 46168 8006AD68 11200009 */ beqz $t1, .L8006AD90 -/* 4616C 8006AD6C 00000000 */ nop +/* 4616C 8006AD6C 00000000 */ nop /* 46170 8006AD70 3231003B */ andi $s1, $s1, 0x3b /* 46174 8006AD74 24090001 */ addiu $t1, $zero, 1 /* 46178 8006AD78 3C01A450 */ lui $at, 0xa450 @@ -252,22 +252,22 @@ glabel func_8006AA34 /* 46180 8006AD80 0C01ABDF */ jal send_mesg /* 46184 8006AD84 24040030 */ addiu $a0, $zero, 0x30 /* 46188 8006AD88 12200029 */ beqz $s1, .L8006AE30 -/* 4618C 8006AD8C 00000000 */ nop +/* 4618C 8006AD8C 00000000 */ nop .L8006AD90: /* 46190 8006AD90 32290002 */ andi $t1, $s1, 2 /* 46194 8006AD94 11200008 */ beqz $t1, .L8006ADB8 -/* 46198 8006AD98 00000000 */ nop +/* 46198 8006AD98 00000000 */ nop /* 4619C 8006AD9C 3231003D */ andi $s1, $s1, 0x3d /* 461A0 8006ADA0 3C01A480 */ lui $at, 0xa480 /* 461A4 8006ADA4 AC200018 */ sw $zero, 0x18($at) /* 461A8 8006ADA8 0C01ABDF */ jal send_mesg /* 461AC 8006ADAC 24040028 */ addiu $a0, $zero, 0x28 /* 461B0 8006ADB0 1220001F */ beqz $s1, .L8006AE30 -/* 461B4 8006ADB4 00000000 */ nop +/* 461B4 8006ADB4 00000000 */ nop .L8006ADB8: /* 461B8 8006ADB8 32290010 */ andi $t1, $s1, 0x10 /* 461BC 8006ADBC 11200013 */ beqz $t1, .L8006AE0C -/* 461C0 8006ADC0 00000000 */ nop +/* 461C0 8006ADC0 00000000 */ nop /* 461C4 8006ADC4 3231002F */ andi $s1, $s1, 0x2f /* 461C8 8006ADC8 24090002 */ addiu $t1, $zero, 2 /* 461CC 8006ADCC 3C01A460 */ lui $at, 0xa460 @@ -276,22 +276,22 @@ glabel func_8006AA34 /* 461D8 8006ADD8 25295938 */ addiu $t1, $t1, 0x5938 /* 461DC 8006ADDC 8D2A0000 */ lw $t2, ($t1) /* 461E0 8006ADE0 11400006 */ beqz $t2, .L8006ADFC -/* 461E4 8006ADE4 00000000 */ nop +/* 461E4 8006ADE4 00000000 */ nop /* 461E8 8006ADE8 8D3D0004 */ lw $sp, 4($t1) /* 461EC 8006ADEC 0140F809 */ jalr $t2 /* 461F0 8006ADF0 00402021 */ addu $a0, $v0, $zero /* 461F4 8006ADF4 14400003 */ bnez $v0, .L8006AE04 -/* 461F8 8006ADF8 00000000 */ nop +/* 461F8 8006ADF8 00000000 */ nop .L8006ADFC: /* 461FC 8006ADFC 0C01ABDF */ jal send_mesg /* 46200 8006AE00 24040040 */ addiu $a0, $zero, 0x40 .L8006AE04: /* 46204 8006AE04 1220000A */ beqz $s1, .L8006AE30 -/* 46208 8006AE08 00000000 */ nop +/* 46208 8006AE08 00000000 */ nop .L8006AE0C: /* 4620C 8006AE0C 32290020 */ andi $t1, $s1, 0x20 /* 46210 8006AE10 11200007 */ beqz $t1, .L8006AE30 -/* 46214 8006AE14 00000000 */ nop +/* 46214 8006AE14 00000000 */ nop /* 46218 8006AE18 3231001F */ andi $s1, $s1, 0x1f /* 4621C 8006AE1C 24090800 */ addiu $t1, $zero, 0x800 /* 46220 8006AE20 3C01A430 */ lui $at, 0xa430 @@ -310,7 +310,7 @@ glabel func_8006AA34 /* 46250 8006AE50 252958FC */ addiu $t1, $t1, 0x58fc /* 46254 8006AE54 8D2A0000 */ lw $t2, ($t1) /* 46258 8006AE58 11400004 */ beqz $t2, .L8006AE6C -/* 4625C 8006AE5C 00000000 */ nop +/* 4625C 8006AE5C 00000000 */ nop /* 46260 8006AE60 2401EFFF */ addiu $at, $zero, -0x1001 /* 46264 8006AE64 10000026 */ b .L8006AF00 /* 46268 8006AE68 02018024 */ and $s0, $s0, $at @@ -333,7 +333,7 @@ glabel func_8006AA34 /* 462A8 8006AEA8 40886800 */ mtc0 $t0, $13 /* 462AC 8006AEAC 24040008 */ addiu $a0, $zero, 8 /* 462B0 8006AEB0 0C01ABDF */ jal send_mesg -/* 462B4 8006AEB4 00000000 */ nop +/* 462B4 8006AEB4 00000000 */ nop /* 462B8 8006AEB8 2401FDFF */ addiu $at, $zero, -0x201 /* 462BC 8006AEBC 1000FF53 */ b .L8006AC0C /* 462C0 8006AEC0 02018024 */ and $s0, $s0, $at @@ -342,7 +342,7 @@ glabel func_8006AA34 /* 462CC 8006AECC 40886800 */ mtc0 $t0, $13 /* 462D0 8006AED0 24040000 */ addiu $a0, $zero, 0 /* 462D4 8006AED4 0C01ABDF */ jal send_mesg -/* 462D8 8006AED8 00000000 */ nop +/* 462D8 8006AED8 00000000 */ nop /* 462DC 8006AEDC 2401FEFF */ addiu $at, $zero, -0x101 /* 462E0 8006AEE0 1000FF4A */ b .L8006AC0C /* 462E4 8006AEE4 02018024 */ and $s0, $s0, $at @@ -352,7 +352,7 @@ glabel func_8006AA34 /* 462F0 8006AEF0 0C01ABDF */ jal send_mesg /* 462F4 8006AEF4 24040050 */ addiu $a0, $zero, 0x50 /* 462F8 8006AEF8 10000001 */ b .L8006AF00 -/* 462FC 8006AEFC 00000000 */ nop +/* 462FC 8006AEFC 00000000 */ nop .L8006AF00: /* 46300 8006AF00 8F490004 */ lw $t1, 4($k0) /* 46304 8006AF04 3C0A8009 */ lui $t2, 0x8009 @@ -360,13 +360,13 @@ glabel func_8006AA34 /* 4630C 8006AF0C 8D4B0004 */ lw $t3, 4($t2) /* 46310 8006AF10 012B082A */ slt $at, $t1, $t3 /* 46314 8006AF14 10200007 */ beqz $at, .L8006AF34 -/* 46318 8006AF18 00000000 */ nop +/* 46318 8006AF18 00000000 */ nop /* 4631C 8006AF1C 03402821 */ addu $a1, $k0, $zero /* 46320 8006AF20 3C048009 */ lui $a0, 0x8009 /* 46324 8006AF24 0C01AC5D */ jal osEnqueueThread /* 46328 8006AF28 24844658 */ addiu $a0, $a0, 0x4658 /* 4632C 8006AF2C 0801AC75 */ j osDispatchThread -/* 46330 8006AF30 00000000 */ nop +/* 46330 8006AF30 00000000 */ nop .L8006AF34: /* 46334 8006AF34 3C098009 */ lui $t1, 0x8009 /* 46338 8006AF38 25294658 */ addiu $t1, $t1, 0x4658 @@ -386,7 +386,7 @@ glabel func_8006AA34 /* 4636C 8006AF6C 0C01ABDF */ jal send_mesg /* 46370 8006AF70 24040060 */ addiu $a0, $zero, 0x60 /* 46374 8006AF74 0801AC75 */ j osDispatchThread -/* 46378 8006AF78 00000000 */ nop +/* 46378 8006AF78 00000000 */ nop glabel send_mesg /* 4637C 8006AF7C 03E09021 */ addu $s2, $ra, $zero @@ -395,24 +395,24 @@ glabel send_mesg /* 46388 8006AF88 01445021 */ addu $t2, $t2, $a0 /* 4638C 8006AF8C 8D490000 */ lw $t1, ($t2) /* 46390 8006AF90 11200027 */ beqz $t1, .L8006B030 -/* 46394 8006AF94 00000000 */ nop +/* 46394 8006AF94 00000000 */ nop /* 46398 8006AF98 8D2B0008 */ lw $t3, 8($t1) /* 4639C 8006AF9C 8D2C0010 */ lw $t4, 0x10($t1) /* 463A0 8006AFA0 016C082A */ slt $at, $t3, $t4 /* 463A4 8006AFA4 10200022 */ beqz $at, .L8006B030 -/* 463A8 8006AFA8 00000000 */ nop +/* 463A8 8006AFA8 00000000 */ nop /* 463AC 8006AFAC 8D2D000C */ lw $t5, 0xc($t1) /* 463B0 8006AFB0 01AB6821 */ addu $t5, $t5, $t3 /* 463B4 8006AFB4 01AC001A */ div $zero, $t5, $t4 /* 463B8 8006AFB8 15800002 */ bnez $t4, .L8006AFC4 -/* 463BC 8006AFBC 00000000 */ nop +/* 463BC 8006AFBC 00000000 */ nop /* 463C0 8006AFC0 0007000D */ break 7 .L8006AFC4: /* 463C4 8006AFC4 2401FFFF */ addiu $at, $zero, -1 /* 463C8 8006AFC8 15810004 */ bne $t4, $at, .L8006AFDC /* 463CC 8006AFCC 3C018000 */ lui $at, 0x8000 /* 463D0 8006AFD0 15A10002 */ bne $t5, $at, .L8006AFDC -/* 463D4 8006AFD4 00000000 */ nop +/* 463D4 8006AFD4 00000000 */ nop /* 463D8 8006AFD8 0006000D */ break 6 .L8006AFDC: /* 463DC 8006AFDC 00006810 */ mfhi $t5 @@ -428,7 +428,7 @@ glabel send_mesg /* 46404 8006B004 8D2A0000 */ lw $t2, ($t1) /* 46408 8006B008 8D4B0000 */ lw $t3, ($t2) /* 4640C 8006B00C 11600008 */ beqz $t3, .L8006B030 -/* 46410 8006B010 00000000 */ nop +/* 46410 8006B010 00000000 */ nop /* 46414 8006B014 0C01AC6F */ jal osPopThread /* 46418 8006B018 01202021 */ addu $a0, $t1, $zero /* 4641C 8006B01C 00405021 */ addu $t2, $v0, $zero @@ -438,7 +438,7 @@ glabel send_mesg /* 4642C 8006B02C 24844658 */ addiu $a0, $a0, 0x4658 .L8006B030: /* 46430 8006B030 02400008 */ jr $s2 -/* 46434 8006B034 00000000 */ nop +/* 46434 8006B034 00000000 */ nop glabel handle_CPU /* 46438 8006B038 3C013000 */ lui $at, 0x3000 @@ -446,7 +446,7 @@ glabel handle_CPU /* 46440 8006B040 00094F02 */ srl $t1, $t1, 0x1c /* 46444 8006B044 240A0001 */ addiu $t2, $zero, 1 /* 46448 8006B048 152AFFC0 */ bne $t1, $t2, .L8006AF4C -/* 4644C 8006B04C 00000000 */ nop +/* 4644C 8006B04C 00000000 */ nop /* 46450 8006B050 24090001 */ addiu $t1, $zero, 1 /* 46454 8006B054 AF490018 */ sw $t1, 0x18($k0) /* 46458 8006B058 8F5B0118 */ lw $k1, 0x118($k0) @@ -476,9 +476,9 @@ glabel osEnqueueAndYield /* 464B0 8006B0B0 ACBF011C */ sw $ra, 0x11c($a1) /* 464B4 8006B0B4 8CBB0018 */ lw $k1, 0x18($a1) /* 464B8 8006B0B8 1360000A */ beqz $k1, .L8006B0E4 -/* 464BC 8006B0BC 00000000 */ nop +/* 464BC 8006B0BC 00000000 */ nop /* 464C0 8006B0C0 445BF800 */ cfc1 $k1, $31 -/* 464C4 8006B0C4 00000000 */ nop +/* 464C4 8006B0C4 00000000 */ nop /* 464C8 8006B0C8 ACBB012C */ sw $k1, 0x12c($a1) /* 464CC 8006B0CC F4B40180 */ sdc1 $f20, 0x180($a1) /* 464D0 8006B0D0 F4B60188 */ sdc1 $f22, 0x188($a1) @@ -490,7 +490,7 @@ glabel osEnqueueAndYield /* 464E4 8006B0E4 8CBB0118 */ lw $k1, 0x118($a1) /* 464E8 8006B0E8 3369FF00 */ andi $t1, $k1, 0xff00 /* 464EC 8006B0EC 1120000D */ beqz $t1, .L8006B124 -/* 464F0 8006B0F0 00000000 */ nop +/* 464F0 8006B0F0 00000000 */ nop /* 464F4 8006B0F4 3C088009 */ lui $t0, 0x8009 /* 464F8 8006B0F8 25085900 */ addiu $t0, $t0, 0x5900 /* 464FC 8006B0FC 8D080000 */ lw $t0, ($t0) @@ -507,7 +507,7 @@ glabel osEnqueueAndYield /* 46524 8006B124 3C1BA430 */ lui $k1, 0xa430 /* 46528 8006B128 8F7B000C */ lw $k1, 0xc($k1) /* 4652C 8006B12C 1360000B */ beqz $k1, .L8006B15C -/* 46530 8006B130 00000000 */ nop +/* 46530 8006B130 00000000 */ nop /* 46534 8006B134 3C1A8009 */ lui $k0, 0x8009 /* 46538 8006B138 275A5900 */ addiu $k0, $k0, 0x5900 /* 4653C 8006B13C 8F5A0000 */ lw $k0, ($k0) @@ -522,10 +522,10 @@ glabel osEnqueueAndYield /* 4655C 8006B15C 10800003 */ beqz $a0, .L8006B16C /* 46560 8006B160 ACBB0128 */ sw $k1, 0x128($a1) /* 46564 8006B164 0C01AC5D */ jal osEnqueueThread -/* 46568 8006B168 00000000 */ nop +/* 46568 8006B168 00000000 */ nop .L8006B16C: /* 4656C 8006B16C 0801AC75 */ j osDispatchThread -/* 46570 8006B170 00000000 */ nop +/* 46570 8006B170 00000000 */ nop glabel osEnqueueThread /* 46574 8006B174 0080C821 */ addu $t9, $a0, $zero @@ -534,14 +534,14 @@ glabel osEnqueueThread /* 46580 8006B180 8F0E0004 */ lw $t6, 4($t8) /* 46584 8006B184 01CF082A */ slt $at, $t6, $t7 /* 46588 8006B188 14200007 */ bnez $at, .L8006B1A8 -/* 4658C 8006B18C 00000000 */ nop +/* 4658C 8006B18C 00000000 */ nop .L8006B190: /* 46590 8006B190 0300C821 */ addu $t9, $t8, $zero /* 46594 8006B194 8F180000 */ lw $t8, ($t8) /* 46598 8006B198 8F0E0004 */ lw $t6, 4($t8) /* 4659C 8006B19C 01CF082A */ slt $at, $t6, $t7 /* 465A0 8006B1A0 1020FFFB */ beqz $at, .L8006B190 -/* 465A4 8006B1A4 00000000 */ nop +/* 465A4 8006B1A4 00000000 */ nop .L8006B1A8: /* 465A8 8006B1A8 8F380000 */ lw $t8, ($t9) /* 465AC 8006B1AC ACB80000 */ sw $t8, ($a1) @@ -555,7 +555,7 @@ glabel osPopThread /* 465C4 8006B1C4 03E00008 */ jr $ra /* 465C8 8006B1C8 AC990000 */ sw $t9, ($a0) /* 465CC 8006B1CC 03E00008 */ jr $ra -/* 465D0 8006B1D0 00000000 */ nop +/* 465D0 8006B1D0 00000000 */ nop glabel osDispatchThread /* 465D4 8006B1D4 3C048009 */ lui $a0, 0x8009 @@ -615,7 +615,7 @@ glabel osDispatchThread /* 466AC 8006B2AC 409B7000 */ mtc0 $k1, $14 /* 466B0 8006B2B0 8F5B0018 */ lw $k1, 0x18($k0) /* 466B4 8006B2B4 13600013 */ beqz $k1, .L8006B304 -/* 466B8 8006B2B8 00000000 */ nop +/* 466B8 8006B2B8 00000000 */ nop /* 466BC 8006B2BC 8F5B012C */ lw $k1, 0x12c($k0) /* 466C0 8006B2C0 44DBF800 */ ctc1 $k1, $31 /* 466C4 8006B2C4 D7400130 */ ldc1 $f0, 0x130($k0) @@ -649,12 +649,12 @@ glabel osDispatchThread /* 46730 8006B330 3C1AA430 */ lui $k0, 0xa430 /* 46734 8006B334 375A000C */ ori $k0, $k0, 0xc /* 46738 8006B338 AF5B0000 */ sw $k1, ($k0) -/* 4673C 8006B33C 00000000 */ nop -/* 46740 8006B340 00000000 */ nop -/* 46744 8006B344 00000000 */ nop -/* 46748 8006B348 00000000 */ nop -/* 4674C 8006B34C 42000018 */ eret +/* 4673C 8006B33C 00000000 */ nop +/* 46740 8006B340 00000000 */ nop +/* 46744 8006B344 00000000 */ nop +/* 46748 8006B348 00000000 */ nop +/* 4674C 8006B34C 42000018 */ eret /* 46750 8006B350 00002021 */ addu $a0, $zero, $zero /* 46754 8006B354 0C01B254 */ jal osDestroyThread -/* 46758 8006B358 00000000 */ nop -/* 4675C 8006B35C 00000000 */ nop +/* 46758 8006B358 00000000 */ nop +/* 4675C 8006B35C 00000000 */ nop From 4fe1f2758456c594d176727e15227ba37c476e86 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Wed, 28 Oct 2020 22:28:15 +0000 Subject: [PATCH 21/78] ignore settings.mk --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6a3e95e0df..e08969475e 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ venv/ .DS_Store ctx.c expected/ +settings.mk # Build artifacts *.ld From 85f7331004e944942e49ea90e483f7402a7258e5 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Thu, 29 Oct 2020 00:29:30 +0000 Subject: [PATCH 22/78] match func_80055050 --- src/code_303c0_len_3e10.c | 11 +++++++++++ tools/symbol_addrs.txt | 2 ++ undefined_syms.txt | 3 +++ 3 files changed, 16 insertions(+) diff --git a/src/code_303c0_len_3e10.c b/src/code_303c0_len_3e10.c index d0fef616f3..24dc1e3abf 100644 --- a/src/code_303c0_len_3e10.c +++ b/src/code_303c0_len_3e10.c @@ -2,7 +2,18 @@ INCLUDE_ASM(s32, "code_303c0_len_3e10", al_LoadBKHeaders); +#ifdef NON_MATCHING +// Needs rodata +extern s32 D_80078DB0; +extern u16 D_80078DB4; + +void func_80055050(void) { + D_80078DB4 = 1; + D_80078DB0 = 0; +} +#else INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055050); +#endif INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055068); diff --git a/tools/symbol_addrs.txt b/tools/symbol_addrs.txt index 57d0da9329..1600940500 100644 --- a/tools/symbol_addrs.txt +++ b/tools/symbol_addrs.txt @@ -1897,3 +1897,5 @@ gSpeakingActorPart;0x8029FA78 EnterWalk;0x80285960 EnemyNpcHit;0x80077F70 EnemyNpcDefeat;0x8007809C +D_80078DB0;0x80078DB0 +D_80078DB4;0x80078DB4 diff --git a/undefined_syms.txt b/undefined_syms.txt index 6f335270e1..cb04c32ef6 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -260,3 +260,6 @@ ShakeCamX = 0x802D9CE8; EnemyNpcHit = 0x80077F70; EnemyNpcDefeat = 0x8007809C; + +D_80078DB0 = 0x80078DB0; +D_80078DB4 = 0x80078DB4; From 9eef0b027310e27908a49de33176f8ffc200ded2 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Thu, 29 Oct 2020 01:05:40 +0000 Subject: [PATCH 23/78] match set_music_track rewrite flag as NOT clean up set_music_track temps --- .../code_e0b30_len_b80/set_music_track.s | 23 ------------------- include/common_structs.h | 2 +- include/functions.h | 2 +- include/variables.h | 2 ++ src/code_303c0_len_3e10.c | 13 ++++++----- src/code_e0b30_len_b80.c | 10 +++++--- tools/symbol_addrs.txt | 1 + undefined_syms.txt | 2 ++ 8 files changed, 21 insertions(+), 34 deletions(-) delete mode 100644 asm/nonmatchings/code_e0b30_len_b80/set_music_track.s diff --git a/asm/nonmatchings/code_e0b30_len_b80/set_music_track.s b/asm/nonmatchings/code_e0b30_len_b80/set_music_track.s deleted file mode 100644 index ec472a1a63..0000000000 --- a/asm/nonmatchings/code_e0b30_len_b80/set_music_track.s +++ /dev/null @@ -1,23 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel set_music_track -/* E1018 8014A918 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* E101C 8014A91C 3C038016 */ lui $v1, 0x8016 -/* E1020 8014A920 24639AF0 */ addiu $v1, $v1, -0x6510 -/* E1024 8014A924 00041040 */ sll $v0, $a0, 1 -/* E1028 8014A928 00441021 */ addu $v0, $v0, $a0 -/* E102C 8014A92C 00021100 */ sll $v0, $v0, 4 -/* E1030 8014A930 00431021 */ addu $v0, $v0, $v1 -/* E1034 8014A934 AFBF0018 */ sw $ra, 0x18($sp) -/* E1038 8014A938 94430000 */ lhu $v1, ($v0) -/* E103C 8014A93C 8FA80030 */ lw $t0, 0x30($sp) -/* E1040 8014A940 3063FFF7 */ andi $v1, $v1, 0xfff7 -/* E1044 8014A944 00084400 */ sll $t0, $t0, 0x10 -/* E1048 8014A948 00084403 */ sra $t0, $t0, 0x10 -/* E104C 8014A94C A4430000 */ sh $v1, ($v0) -/* E1050 8014A950 0C0529F8 */ jal _set_music_track -/* E1054 8014A954 AFA80010 */ sw $t0, 0x10($sp) -/* E1058 8014A958 8FBF0018 */ lw $ra, 0x18($sp) -/* E105C 8014A95C 03E00008 */ jr $ra -/* E1060 8014A960 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/include/common_structs.h b/include/common_structs.h index 56eb064d23..e11bee5283 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -307,7 +307,7 @@ typedef struct StaticEntityData { } StaticEntityData; // size = 0x24 typedef struct MusicPlayer { - /* 0x00 */ s16 unkFlags; + /* 0x00 */ u16 unkFlags; /* 0x02 */ char unk_02[2]; /* 0x04 */ s32 fadeOutTime; /* 0x08 */ s32 fadeInTime; diff --git a/include/functions.h b/include/functions.h index 033f72bb6e..4d275b8495 100644 --- a/include/functions.h +++ b/include/functions.h @@ -113,7 +113,7 @@ f32 dist3D(f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz); void add_vec2D_polar(f32* x, f32* y, f32 r, f32 theta); s32 play_sound_at_position(s32 soundID, s32 value2, f32 posX, f32 posY, f32 posZ); -s32 set_music_track(s32 musicPlayer, s32 songID, s32 variation, s32 unk, s32 volume); +void set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 unk, s16 volume); ScriptInstance* get_script_by_index(s32 index); diff --git a/include/variables.h b/include/variables.h index ccdc405f99..9e6d483bd2 100644 --- a/include/variables.h +++ b/include/variables.h @@ -165,4 +165,6 @@ extern Bytecode* SCRIPT_NpcDefeat; extern Bytecode* ShakeCam1; extern Bytecode* ShakeCamX; +extern MusicPlayer gMusicPlayers[]; + #endif diff --git a/src/code_303c0_len_3e10.c b/src/code_303c0_len_3e10.c index 24dc1e3abf..357c8a3faf 100644 --- a/src/code_303c0_len_3e10.c +++ b/src/code_303c0_len_3e10.c @@ -1,21 +1,22 @@ #include "common.h" +// TODO: rodata +extern s32 D_80078DB0; +extern u16 D_80078DB4; + INCLUDE_ASM(s32, "code_303c0_len_3e10", al_LoadBKHeaders); #ifdef NON_MATCHING -// Needs rodata -extern s32 D_80078DB0; -extern u16 D_80078DB4; - +// Delay slot (probably needs rodata) void func_80055050(void) { D_80078DB4 = 1; D_80078DB0 = 0; } #else -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055050); +INCLUDE_ASM(void, "code_303c0_len_3e10", func_80055050, void); #endif -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055068); +INCLUDE_ASM(void, "code_303c0_len_3e10", func_80055068, u32 arg0); INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055110); diff --git a/src/code_e0b30_len_b80.c b/src/code_e0b30_len_b80.c index 40acc5fde5..13931dd072 100644 --- a/src/code_e0b30_len_b80.c +++ b/src/code_e0b30_len_b80.c @@ -11,10 +11,14 @@ void func_8014A52C(void) { INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014A548); -INCLUDE_ASM(s32, "code_e0b30_len_b80", _set_music_track); +INCLUDE_ASM(s32, "code_e0b30_len_b80", _set_music_track, s32 playerIndex, s32 songID, s32 variation, s32 unk, s16 volume); -INCLUDE_ASM(s32, "code_e0b30_len_b80", set_music_track, s32 musicPlayer, s32 songID, s32 variation, s32 unk, - s32 volume); +void set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 unk, s16 volume) { + MusicPlayer* musicPlayers = &gMusicPlayers; + musicPlayers[playerIndex].unkFlags &= ~8; + + _set_music_track(playerIndex, songID, variation, unk, volume); +} INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014A964); diff --git a/tools/symbol_addrs.txt b/tools/symbol_addrs.txt index 1600940500..198f34f9cf 100644 --- a/tools/symbol_addrs.txt +++ b/tools/symbol_addrs.txt @@ -1899,3 +1899,4 @@ EnemyNpcHit;0x80077F70 EnemyNpcDefeat;0x8007809C D_80078DB0;0x80078DB0 D_80078DB4;0x80078DB4 +gMusicPlayers;0x80159AF0 diff --git a/undefined_syms.txt b/undefined_syms.txt index cb04c32ef6..c915c7faf3 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -263,3 +263,5 @@ EnemyNpcDefeat = 0x8007809C; D_80078DB0 = 0x80078DB0; D_80078DB4 = 0x80078DB4; + +gMusicPlayers = 0x80159AF0; From e0c810854399d335de7b4263ce3b0697e6d420cc Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Thu, 29 Oct 2020 01:33:45 +0000 Subject: [PATCH 24/78] match _set_music_track --- .../code_e0b30_len_b80/_set_music_track.s | 88 ------------------- include/common_structs.h | 5 +- include/variables.h | 1 + src/code_e0b30_len_b80.c | 49 ++++++++++- tools/symbol_addrs.txt | 1 + undefined_syms.txt | 1 + 6 files changed, 53 insertions(+), 92 deletions(-) delete mode 100644 asm/nonmatchings/code_e0b30_len_b80/_set_music_track.s diff --git a/asm/nonmatchings/code_e0b30_len_b80/_set_music_track.s b/asm/nonmatchings/code_e0b30_len_b80/_set_music_track.s deleted file mode 100644 index 12aff6540b..0000000000 --- a/asm/nonmatchings/code_e0b30_len_b80/_set_music_track.s +++ /dev/null @@ -1,88 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel _set_music_track -/* E0EE0 8014A7E0 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* E0EE4 8014A7E4 AFB20018 */ sw $s2, 0x18($sp) -/* E0EE8 8014A7E8 00A0902D */ daddu $s2, $a1, $zero -/* E0EEC 8014A7EC 3C058007 */ lui $a1, %hi(gGameStatusPtr) -/* E0EF0 8014A7F0 8CA5419C */ lw $a1, %lo(gGameStatusPtr)($a1) -/* E0EF4 8014A7F4 AFB3001C */ sw $s3, 0x1c($sp) -/* E0EF8 8014A7F8 8FB30040 */ lw $s3, 0x40($sp) -/* E0EFC 8014A7FC AFB10014 */ sw $s1, 0x14($sp) -/* E0F00 8014A800 00C0882D */ daddu $s1, $a2, $zero -/* E0F04 8014A804 AFB50024 */ sw $s5, 0x24($sp) -/* E0F08 8014A808 00E0A82D */ daddu $s5, $a3, $zero -/* E0F0C 8014A80C AFBF0028 */ sw $ra, 0x28($sp) -/* E0F10 8014A810 AFB40020 */ sw $s4, 0x20($sp) -/* E0F14 8014A814 AFB00010 */ sw $s0, 0x10($sp) -/* E0F18 8014A818 80A20071 */ lb $v0, 0x71($a1) -/* E0F1C 8014A81C 10400003 */ beqz $v0, .L8014A82C -/* E0F20 8014A820 0260A02D */ daddu $s4, $s3, $zero -/* E0F24 8014A824 08052A3D */ j .L8014A8F4 -/* E0F28 8014A828 24020001 */ addiu $v0, $zero, 1 -.L8014A82C: -/* E0F2C 8014A82C 3C028016 */ lui $v0, 0x8016 -/* E0F30 8014A830 24429AF0 */ addiu $v0, $v0, -0x6510 -/* E0F34 8014A834 00041840 */ sll $v1, $a0, 1 -/* E0F38 8014A838 00641821 */ addu $v1, $v1, $a0 -/* E0F3C 8014A83C 00031900 */ sll $v1, $v1, 4 -/* E0F40 8014A840 80A4007A */ lb $a0, 0x7a($a1) -/* E0F44 8014A844 14800008 */ bnez $a0, .L8014A868 -/* E0F48 8014A848 00628021 */ addu $s0, $v1, $v0 -/* E0F4C 8014A84C 8E040018 */ lw $a0, 0x18($s0) -/* E0F50 8014A850 0C015671 */ jal func_800559C4 -/* E0F54 8014A854 00000000 */ nop -/* E0F58 8014A858 96030000 */ lhu $v1, ($s0) -/* E0F5C 8014A85C 24020001 */ addiu $v0, $zero, 1 -/* E0F60 8014A860 08052A3C */ j .L8014A8F0 -/* E0F64 8014A864 3063FFFE */ andi $v1, $v1, 0xfffe -.L8014A868: -/* E0F68 8014A868 0C05290C */ jal get_default_variation_for_song -/* E0F6C 8014A86C 0240202D */ daddu $a0, $s2, $zero -/* E0F70 8014A870 04430001 */ bgezl $v0, .L8014A878 -/* E0F74 8014A874 0040882D */ daddu $s1, $v0, $zero -.L8014A878: -/* E0F78 8014A878 8E020010 */ lw $v0, 0x10($s0) -/* E0F7C 8014A87C 14520013 */ bne $v0, $s2, .L8014A8CC -/* E0F80 8014A880 24020001 */ addiu $v0, $zero, 1 -/* E0F84 8014A884 8E020014 */ lw $v0, 0x14($s0) -/* E0F88 8014A888 14510010 */ bne $v0, $s1, .L8014A8CC -/* E0F8C 8014A88C 24020001 */ addiu $v0, $zero, 1 -/* E0F90 8014A890 00132400 */ sll $a0, $s3, 0x10 -/* E0F94 8014A894 0C052B21 */ jal func_8014AC84 -/* E0F98 8014A898 00042403 */ sra $a0, $a0, 0x10 -/* E0F9C 8014A89C 96020000 */ lhu $v0, ($s0) -/* E0FA0 8014A8A0 30420004 */ andi $v0, $v0, 4 -/* E0FA4 8014A8A4 50400013 */ beql $v0, $zero, .L8014A8F4 -/* E0FA8 8014A8A8 24020002 */ addiu $v0, $zero, 2 -/* E0FAC 8014A8AC 8E040018 */ lw $a0, 0x18($s0) -/* E0FB0 8014A8B0 0C0156E0 */ jal func_80055B80 -/* E0FB4 8014A8B4 00000000 */ nop -/* E0FB8 8014A8B8 96020000 */ lhu $v0, ($s0) -/* E0FBC 8014A8BC 3042FFFB */ andi $v0, $v0, 0xfffb -/* E0FC0 8014A8C0 A6020000 */ sh $v0, ($s0) -/* E0FC4 8014A8C4 08052A3D */ j .L8014A8F4 -/* E0FC8 8014A8C8 24020002 */ addiu $v0, $zero, 2 -.L8014A8CC: -/* E0FCC 8014A8CC 96030000 */ lhu $v1, ($s0) -/* E0FD0 8014A8D0 0040202D */ daddu $a0, $v0, $zero -/* E0FD4 8014A8D4 3C018016 */ lui $at, 0x8016 -/* E0FD8 8014A8D8 A4349AE0 */ sh $s4, -0x6520($at) -/* E0FDC 8014A8DC AE120010 */ sw $s2, 0x10($s0) -/* E0FE0 8014A8E0 AE110014 */ sw $s1, 0x14($s0) -/* E0FE4 8014A8E4 AE150004 */ sw $s5, 4($s0) -/* E0FE8 8014A8E8 A6040002 */ sh $a0, 2($s0) -/* E0FEC 8014A8EC 3063FFFD */ andi $v1, $v1, 0xfffd -.L8014A8F0: -/* E0FF0 8014A8F0 A6030000 */ sh $v1, ($s0) -.L8014A8F4: -/* E0FF4 8014A8F4 8FBF0028 */ lw $ra, 0x28($sp) -/* E0FF8 8014A8F8 8FB50024 */ lw $s5, 0x24($sp) -/* E0FFC 8014A8FC 8FB40020 */ lw $s4, 0x20($sp) -/* E1000 8014A900 8FB3001C */ lw $s3, 0x1c($sp) -/* E1004 8014A904 8FB20018 */ lw $s2, 0x18($sp) -/* E1008 8014A908 8FB10014 */ lw $s1, 0x14($sp) -/* E100C 8014A90C 8FB00010 */ lw $s0, 0x10($sp) -/* E1010 8014A910 03E00008 */ jr $ra -/* E1014 8014A914 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/include/common_structs.h b/include/common_structs.h index e11bee5283..30d69e351a 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -308,13 +308,14 @@ typedef struct StaticEntityData { typedef struct MusicPlayer { /* 0x00 */ u16 unkFlags; - /* 0x02 */ char unk_02[2]; + /* 0x02 */ u16 unk_02; /* 0x04 */ s32 fadeOutTime; /* 0x08 */ s32 fadeInTime; /* 0x0C */ char unk_0C[4]; /* 0x10 */ s32 songID; /* 0x14 */ s32 variation; - /* 0x18 */ char unk_18[24]; + /* 0x18 */ s32 unk_18; + /* 0x1C */ char unk_1C[20]; } MusicPlayer; // size = 0x30 typedef struct MenuIcon { diff --git a/include/variables.h b/include/variables.h index 9e6d483bd2..fcc0de30f5 100644 --- a/include/variables.h +++ b/include/variables.h @@ -165,6 +165,7 @@ extern Bytecode* SCRIPT_NpcDefeat; extern Bytecode* ShakeCam1; extern Bytecode* ShakeCamX; +extern s16 gMusicVolume; extern MusicPlayer gMusicPlayers[]; #endif diff --git a/src/code_e0b30_len_b80.c b/src/code_e0b30_len_b80.c index 13931dd072..d0aae4452e 100644 --- a/src/code_e0b30_len_b80.c +++ b/src/code_e0b30_len_b80.c @@ -1,5 +1,8 @@ #include "common.h" + +void func_8014AC84(s16 volume); + INCLUDE_ASM(s32, "code_e0b30_len_b80", get_default_variation_for_song); INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014A498); @@ -11,10 +14,52 @@ void func_8014A52C(void) { INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014A548); -INCLUDE_ASM(s32, "code_e0b30_len_b80", _set_music_track, s32 playerIndex, s32 songID, s32 variation, s32 unk, s16 volume); +s32 _set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 unk, s16 volume) { + GameStatus* gameStatus = GAME_STATUS; + + if (gameStatus->demoState != 0) { + return 1; + } else { + MusicPlayer* musicPlayers = &gMusicPlayers; + MusicPlayer* musicPlayer = &musicPlayers[playerIndex]; + + if (!gameStatus->musicEnabled) { + func_800559C4(musicPlayer->unk_18); + musicPlayer->unkFlags &= ~1; + + return 1; + } else { + s32 defaultVariation = get_default_variation_for_song(songID); + if (defaultVariation >= 0) { + variation = defaultVariation; + } + + if (musicPlayer->songID == songID && musicPlayer->variation == variation) { + func_8014AC84(volume); // transition volume to? + + if (musicPlayer->unkFlags & 4) { + func_80055B80(musicPlayer->unk_18); + musicPlayer->unkFlags &= ~4; + } + + return 2; + } + + gMusicVolume = volume; + musicPlayer->songID = songID; + musicPlayer->variation = variation; + musicPlayer->fadeOutTime = unk; + musicPlayer->unk_02 = 1; + musicPlayer->unkFlags &= ~2; + + return 1; + } + } +} void set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 unk, s16 volume) { MusicPlayer* musicPlayers = &gMusicPlayers; + musicPlayers[playerIndex].unkFlags &= ~8; _set_music_track(playerIndex, songID, variation, unk, volume); @@ -36,7 +81,7 @@ INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AC5C); INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AC70); -INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AC84); +INCLUDE_ASM(void, "code_e0b30_len_b80", func_8014AC84, s16 volume); INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AC94); diff --git a/tools/symbol_addrs.txt b/tools/symbol_addrs.txt index 198f34f9cf..12db0921df 100644 --- a/tools/symbol_addrs.txt +++ b/tools/symbol_addrs.txt @@ -1899,4 +1899,5 @@ EnemyNpcHit;0x80077F70 EnemyNpcDefeat;0x8007809C D_80078DB0;0x80078DB0 D_80078DB4;0x80078DB4 +gMusicVolume;0x80159AE0 gMusicPlayers;0x80159AF0 diff --git a/undefined_syms.txt b/undefined_syms.txt index c915c7faf3..5727b9abe2 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -264,4 +264,5 @@ EnemyNpcDefeat = 0x8007809C; D_80078DB0 = 0x80078DB0; D_80078DB4 = 0x80078DB4; +gMusicVolume = 0x80159AE0; gMusicPlayers = 0x80159AF0; From 1a6b1f5fcdc0226c80d920714af9560a00547fde Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Thu, 29 Oct 2020 01:35:05 +0000 Subject: [PATCH 25/78] rename MusicPlayer unkFlags to flags --- include/common_structs.h | 2 +- src/code_e0b30_len_b80.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/common_structs.h b/include/common_structs.h index 30d69e351a..ef6c39c281 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -307,7 +307,7 @@ typedef struct StaticEntityData { } StaticEntityData; // size = 0x24 typedef struct MusicPlayer { - /* 0x00 */ u16 unkFlags; + /* 0x00 */ u16 flags; /* 0x02 */ u16 unk_02; /* 0x04 */ s32 fadeOutTime; /* 0x08 */ s32 fadeInTime; diff --git a/src/code_e0b30_len_b80.c b/src/code_e0b30_len_b80.c index d0aae4452e..14f5df0b64 100644 --- a/src/code_e0b30_len_b80.c +++ b/src/code_e0b30_len_b80.c @@ -25,7 +25,7 @@ s32 _set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 unk, s16 vo if (!gameStatus->musicEnabled) { func_800559C4(musicPlayer->unk_18); - musicPlayer->unkFlags &= ~1; + musicPlayer->flags &= ~1; return 1; } else { @@ -37,9 +37,9 @@ s32 _set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 unk, s16 vo if (musicPlayer->songID == songID && musicPlayer->variation == variation) { func_8014AC84(volume); // transition volume to? - if (musicPlayer->unkFlags & 4) { + if (musicPlayer->flags & 4) { func_80055B80(musicPlayer->unk_18); - musicPlayer->unkFlags &= ~4; + musicPlayer->flags &= ~4; } return 2; @@ -50,7 +50,7 @@ s32 _set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 unk, s16 vo musicPlayer->variation = variation; musicPlayer->fadeOutTime = unk; musicPlayer->unk_02 = 1; - musicPlayer->unkFlags &= ~2; + musicPlayer->flags &= ~2; return 1; } @@ -60,7 +60,7 @@ s32 _set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 unk, s16 vo void set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 unk, s16 volume) { MusicPlayer* musicPlayers = &gMusicPlayers; - musicPlayers[playerIndex].unkFlags &= ~8; + musicPlayers[playerIndex].flags &= ~8; _set_music_track(playerIndex, songID, variation, unk, volume); } From 322932c295e43aa3e594f71d00659bab6535632d Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Thu, 29 Oct 2020 01:36:53 +0000 Subject: [PATCH 26/78] name set_music_track arg3 --- include/functions.h | 2 +- src/code_e0b30_len_b80.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/functions.h b/include/functions.h index 4d275b8495..1ab3425f04 100644 --- a/include/functions.h +++ b/include/functions.h @@ -113,7 +113,7 @@ f32 dist3D(f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz); void add_vec2D_polar(f32* x, f32* y, f32 r, f32 theta); s32 play_sound_at_position(s32 soundID, s32 value2, f32 posX, f32 posY, f32 posZ); -void set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 unk, s16 volume); +void set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume); ScriptInstance* get_script_by_index(s32 index); diff --git a/src/code_e0b30_len_b80.c b/src/code_e0b30_len_b80.c index 14f5df0b64..d89dd4953f 100644 --- a/src/code_e0b30_len_b80.c +++ b/src/code_e0b30_len_b80.c @@ -14,7 +14,7 @@ void func_8014A52C(void) { INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014A548); -s32 _set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 unk, s16 volume) { +s32 _set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume) { GameStatus* gameStatus = GAME_STATUS; if (gameStatus->demoState != 0) { @@ -48,7 +48,7 @@ s32 _set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 unk, s16 vo gMusicVolume = volume; musicPlayer->songID = songID; musicPlayer->variation = variation; - musicPlayer->fadeOutTime = unk; + musicPlayer->fadeOutTime = fadeOutTime; musicPlayer->unk_02 = 1; musicPlayer->flags &= ~2; @@ -57,12 +57,12 @@ s32 _set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 unk, s16 vo } } -void set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 unk, s16 volume) { +void set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume) { MusicPlayer* musicPlayers = &gMusicPlayers; musicPlayers[playerIndex].flags &= ~8; - _set_music_track(playerIndex, songID, variation, unk, volume); + _set_music_track(playerIndex, songID, variation, fadeOutTime, volume); } INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014A964); From d9d65955812269a1e86416daed06ff847e22ee6e Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Thu, 29 Oct 2020 01:38:25 +0000 Subject: [PATCH 27/78] make set_music_track non-void Still matches; its return value is used in SetMusicTrack --- include/functions.h | 2 +- src/code_e0b30_len_b80.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/functions.h b/include/functions.h index 1ab3425f04..2e2fcd7851 100644 --- a/include/functions.h +++ b/include/functions.h @@ -113,7 +113,7 @@ f32 dist3D(f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz); void add_vec2D_polar(f32* x, f32* y, f32 r, f32 theta); s32 play_sound_at_position(s32 soundID, s32 value2, f32 posX, f32 posY, f32 posZ); -void set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume); +s32 set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume); ScriptInstance* get_script_by_index(s32 index); diff --git a/src/code_e0b30_len_b80.c b/src/code_e0b30_len_b80.c index d89dd4953f..3ca5fced0d 100644 --- a/src/code_e0b30_len_b80.c +++ b/src/code_e0b30_len_b80.c @@ -57,12 +57,12 @@ s32 _set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime } } -void set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume) { +s32 set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume) { MusicPlayer* musicPlayers = &gMusicPlayers; musicPlayers[playerIndex].flags &= ~8; - _set_music_track(playerIndex, songID, variation, fadeOutTime, volume); + return _set_music_track(playerIndex, songID, variation, fadeOutTime, volume); } INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014A964); From a2329fc84a993177d46e6afb8ac0b79d42955db5 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Thu, 29 Oct 2020 02:17:11 +0000 Subject: [PATCH 28/78] match func_8014A964, func_8014AC84 --- .../code_e0b30_len_b80/func_8014A964.s | 69 ------------------- .../code_e0b30_len_b80/func_8014AC84.s | 8 --- include/common_structs.h | 3 +- include/variables.h | 2 +- src/code_e0b30_len_b80.c | 38 +++++++++- 5 files changed, 39 insertions(+), 81 deletions(-) delete mode 100644 asm/nonmatchings/code_e0b30_len_b80/func_8014A964.s delete mode 100644 asm/nonmatchings/code_e0b30_len_b80/func_8014AC84.s diff --git a/asm/nonmatchings/code_e0b30_len_b80/func_8014A964.s b/asm/nonmatchings/code_e0b30_len_b80/func_8014A964.s deleted file mode 100644 index 727dc8afaa..0000000000 --- a/asm/nonmatchings/code_e0b30_len_b80/func_8014A964.s +++ /dev/null @@ -1,69 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8014A964 -/* E1064 8014A964 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* E1068 8014A968 AFB40020 */ sw $s4, 0x20($sp) -/* E106C 8014A96C 00A0A02D */ daddu $s4, $a1, $zero -/* E1070 8014A970 3C058007 */ lui $a1, %hi(gGameStatusPtr) -/* E1074 8014A974 8CA5419C */ lw $a1, %lo(gGameStatusPtr)($a1) -/* E1078 8014A978 AFB3001C */ sw $s3, 0x1c($sp) -/* E107C 8014A97C 8FB30040 */ lw $s3, 0x40($sp) -/* E1080 8014A980 AFB10014 */ sw $s1, 0x14($sp) -/* E1084 8014A984 00C0882D */ daddu $s1, $a2, $zero -/* E1088 8014A988 AFB50024 */ sw $s5, 0x24($sp) -/* E108C 8014A98C AFBF0028 */ sw $ra, 0x28($sp) -/* E1090 8014A990 AFB20018 */ sw $s2, 0x18($sp) -/* E1094 8014A994 AFB00010 */ sw $s0, 0x10($sp) -/* E1098 8014A998 80A20071 */ lb $v0, 0x71($a1) -/* E109C 8014A99C 8FB20044 */ lw $s2, 0x44($sp) -/* E10A0 8014A9A0 10400003 */ beqz $v0, .L8014A9B0 -/* E10A4 8014A9A4 00E0A82D */ daddu $s5, $a3, $zero -/* E10A8 8014A9A8 08052A8C */ j .L8014AA30 -/* E10AC 8014A9AC 24020001 */ addiu $v0, $zero, 1 -.L8014A9B0: -/* E10B0 8014A9B0 3C028016 */ lui $v0, 0x8016 -/* E10B4 8014A9B4 24429AF0 */ addiu $v0, $v0, -0x6510 -/* E10B8 8014A9B8 00041840 */ sll $v1, $a0, 1 -/* E10BC 8014A9BC 00641821 */ addu $v1, $v1, $a0 -/* E10C0 8014A9C0 00031900 */ sll $v1, $v1, 4 -/* E10C4 8014A9C4 80A4007A */ lb $a0, 0x7a($a1) -/* E10C8 8014A9C8 14800008 */ bnez $a0, .L8014A9EC -/* E10CC 8014A9CC 00628021 */ addu $s0, $v1, $v0 -/* E10D0 8014A9D0 8E040018 */ lw $a0, 0x18($s0) -/* E10D4 8014A9D4 0C015671 */ jal func_800559C4 -/* E10D8 8014A9D8 00000000 */ nop -/* E10DC 8014A9DC 96030000 */ lhu $v1, ($s0) -/* E10E0 8014A9E0 24020001 */ addiu $v0, $zero, 1 -/* E10E4 8014A9E4 08052A8B */ j .L8014AA2C -/* E10E8 8014A9E8 3063FFFE */ andi $v1, $v1, 0xfffe -.L8014A9EC: -/* E10EC 8014A9EC 0C05290C */ jal get_default_variation_for_song -/* E10F0 8014A9F0 0280202D */ daddu $a0, $s4, $zero -/* E10F4 8014A9F4 04430001 */ bgezl $v0, .L8014A9FC -/* E10F8 8014A9F8 0040882D */ daddu $s1, $v0, $zero -.L8014A9FC: -/* E10FC 8014A9FC 24020001 */ addiu $v0, $zero, 1 -/* E1100 8014AA00 96030000 */ lhu $v1, ($s0) -/* E1104 8014AA04 0040202D */ daddu $a0, $v0, $zero -/* E1108 8014AA08 AE150008 */ sw $s5, 8($s0) -/* E110C 8014AA0C A613000C */ sh $s3, 0xc($s0) -/* E1110 8014AA10 A612000E */ sh $s2, 0xe($s0) -/* E1114 8014AA14 AE140010 */ sw $s4, 0x10($s0) -/* E1118 8014AA18 AE110014 */ sw $s1, 0x14($s0) -/* E111C 8014AA1C A6040002 */ sh $a0, 2($s0) -/* E1120 8014AA20 34630020 */ ori $v1, $v1, 0x20 -/* E1124 8014AA24 A6030000 */ sh $v1, ($s0) -/* E1128 8014AA28 3063FFFD */ andi $v1, $v1, 0xfffd -.L8014AA2C: -/* E112C 8014AA2C A6030000 */ sh $v1, ($s0) -.L8014AA30: -/* E1130 8014AA30 8FBF0028 */ lw $ra, 0x28($sp) -/* E1134 8014AA34 8FB50024 */ lw $s5, 0x24($sp) -/* E1138 8014AA38 8FB40020 */ lw $s4, 0x20($sp) -/* E113C 8014AA3C 8FB3001C */ lw $s3, 0x1c($sp) -/* E1140 8014AA40 8FB20018 */ lw $s2, 0x18($sp) -/* E1144 8014AA44 8FB10014 */ lw $s1, 0x14($sp) -/* E1148 8014AA48 8FB00010 */ lw $s0, 0x10($sp) -/* E114C 8014AA4C 03E00008 */ jr $ra -/* E1150 8014AA50 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/asm/nonmatchings/code_e0b30_len_b80/func_8014AC84.s b/asm/nonmatchings/code_e0b30_len_b80/func_8014AC84.s deleted file mode 100644 index 8a219c2e58..0000000000 --- a/asm/nonmatchings/code_e0b30_len_b80/func_8014AC84.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8014AC84 -/* E1384 8014AC84 3C018016 */ lui $at, %hi(D_80159AE2) -/* E1388 8014AC88 A4249AE2 */ sh $a0, %lo(D_80159AE2)($at) -/* E138C 8014AC8C 03E00008 */ jr $ra -/* E1390 8014AC90 00000000 */ nop diff --git a/include/common_structs.h b/include/common_structs.h index ef6c39c281..74516f195e 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -311,7 +311,8 @@ typedef struct MusicPlayer { /* 0x02 */ u16 unk_02; /* 0x04 */ s32 fadeOutTime; /* 0x08 */ s32 fadeInTime; - /* 0x0C */ char unk_0C[4]; + /* 0x0C */ s16 unk_0C; + /* 0x0E */ s16 unk_0E; /* 0x10 */ s32 songID; /* 0x14 */ s32 variation; /* 0x18 */ s32 unk_18; diff --git a/include/variables.h b/include/variables.h index fcc0de30f5..871adf2067 100644 --- a/include/variables.h +++ b/include/variables.h @@ -80,7 +80,7 @@ extern s32 D_8010CD20; extern s32 D_8010EF08; extern s32 D_8010F094; // player shadow index? extern s32 D_801595A0; -extern s16 D_80159AE2; +extern s16 D_80159AE2; // music target volume? extern s16 D_80159AE4; extern BackgroundHeader gBackgroundImage; diff --git a/src/code_e0b30_len_b80.c b/src/code_e0b30_len_b80.c index 3ca5fced0d..35a9193232 100644 --- a/src/code_e0b30_len_b80.c +++ b/src/code_e0b30_len_b80.c @@ -65,7 +65,39 @@ s32 set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, return _set_music_track(playerIndex, songID, variation, fadeOutTime, volume); } -INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014A964); +s32 func_8014A964(s32 playerIndex, s32 songID, s32 variation, s32 fadeInTime, s16 arg4, s16 arg5) { + GameStatus* gameStatus = GAME_STATUS; + + if (gameStatus->demoState != 0) { + return 1; + } else { + MusicPlayer* musicPlayers = &gMusicPlayers; + MusicPlayer* musicPlayer = &musicPlayers[playerIndex]; + + if (!gameStatus->musicEnabled) { + func_800559C4(musicPlayer->unk_18); + musicPlayer->flags &= ~1; + + return 1; + } else { + s32 defaultVariation = get_default_variation_for_song(songID); + if (defaultVariation >= 0) { + variation = defaultVariation; + } + + musicPlayer->fadeInTime = fadeInTime; + musicPlayer->unk_0C = arg4; + musicPlayer->unk_0E = arg5; + musicPlayer->songID = songID; + musicPlayer->variation = variation; + musicPlayer->flags |= 0x20; + musicPlayer->unk_02 = 1; + musicPlayer->flags &= ~2; + + return 1; + } + } +} INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AA54); @@ -81,7 +113,9 @@ INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AC5C); INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AC70); -INCLUDE_ASM(void, "code_e0b30_len_b80", func_8014AC84, s16 volume); +void func_8014AC84(s16 volume) { + D_80159AE2 = volume; +} INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AC94); From 9c5338c04b2ee4ce036926d22bf1a69aa1c9c1ac Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Thu, 29 Oct 2020 02:54:01 +0000 Subject: [PATCH 29/78] match func_8014AA54 --- .../code_e0b30_len_b80/func_8014AA54.s | 57 ------------------- include/variables.h | 4 +- src/code_e0b30_len_b80.c | 29 +++++++++- tools/symbol_addrs.txt | 4 +- undefined_syms.txt | 4 +- 5 files changed, 36 insertions(+), 62 deletions(-) delete mode 100644 asm/nonmatchings/code_e0b30_len_b80/func_8014AA54.s diff --git a/asm/nonmatchings/code_e0b30_len_b80/func_8014AA54.s b/asm/nonmatchings/code_e0b30_len_b80/func_8014AA54.s deleted file mode 100644 index 9141c6f751..0000000000 --- a/asm/nonmatchings/code_e0b30_len_b80/func_8014AA54.s +++ /dev/null @@ -1,57 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8014AA54 -/* E1154 8014AA54 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* E1158 8014AA58 3C028016 */ lui $v0, 0x8016 -/* E115C 8014AA5C 24429AF0 */ addiu $v0, $v0, -0x6510 -/* E1160 8014AA60 00041840 */ sll $v1, $a0, 1 -/* E1164 8014AA64 00641821 */ addu $v1, $v1, $a0 -/* E1168 8014AA68 00031900 */ sll $v1, $v1, 4 -/* E116C 8014AA6C 00621821 */ addu $v1, $v1, $v0 -/* E1170 8014AA70 AFBF0010 */ sw $ra, 0x10($sp) -/* E1174 8014AA74 94640000 */ lhu $a0, ($v1) -/* E1178 8014AA78 30820001 */ andi $v0, $a0, 1 -/* E117C 8014AA7C 10400003 */ beqz $v0, .L8014AA8C -/* E1180 8014AA80 30820002 */ andi $v0, $a0, 2 -/* E1184 8014AA84 14400003 */ bnez $v0, .L8014AA94 -/* E1188 8014AA88 00061400 */ sll $v0, $a2, 0x10 -.L8014AA8C: -/* E118C 8014AA8C 08052AC0 */ j .L8014AB00 -/* E1190 8014AA90 0000102D */ daddu $v0, $zero, $zero -.L8014AA94: -/* E1194 8014AA94 00022403 */ sra $a0, $v0, 0x10 -/* E1198 8014AA98 24020001 */ addiu $v0, $zero, 1 -/* E119C 8014AA9C 1082000F */ beq $a0, $v0, .L8014AADC -/* E11A0 8014AAA0 28820002 */ slti $v0, $a0, 2 -/* E11A4 8014AAA4 10400005 */ beqz $v0, .L8014AABC -/* E11A8 8014AAA8 24020002 */ addiu $v0, $zero, 2 -/* E11AC 8014AAAC 10800007 */ beqz $a0, .L8014AACC -/* E11B0 8014AAB0 24020001 */ addiu $v0, $zero, 1 -/* E11B4 8014AAB4 08052AC0 */ j .L8014AB00 -/* E11B8 8014AAB8 00000000 */ nop -.L8014AABC: -/* E11BC 8014AABC 1082000C */ beq $a0, $v0, .L8014AAF0 -/* E11C0 8014AAC0 24020001 */ addiu $v0, $zero, 1 -/* E11C4 8014AAC4 08052AC0 */ j .L8014AB00 -/* E11C8 8014AAC8 00000000 */ nop -.L8014AACC: -/* E11CC 8014AACC 0C01580A */ jal func_80056028 -/* E11D0 8014AAD0 8C640018 */ lw $a0, 0x18($v1) -/* E11D4 8014AAD4 08052AC0 */ j .L8014AB00 -/* E11D8 8014AAD8 24020001 */ addiu $v0, $zero, 1 -.L8014AADC: -/* E11DC 8014AADC 8C640018 */ lw $a0, 0x18($v1) -/* E11E0 8014AAE0 0C015811 */ jal func_80056044 -/* E11E4 8014AAE4 00000000 */ nop -/* E11E8 8014AAE8 08052AC0 */ j .L8014AB00 -/* E11EC 8014AAEC 24020001 */ addiu $v0, $zero, 1 -.L8014AAF0: -/* E11F0 8014AAF0 8C640018 */ lw $a0, 0x18($v1) -/* E11F4 8014AAF4 0C01581A */ jal func_80056068 -/* E11F8 8014AAF8 00000000 */ nop -/* E11FC 8014AAFC 24020001 */ addiu $v0, $zero, 1 -.L8014AB00: -/* E1200 8014AB00 8FBF0010 */ lw $ra, 0x10($sp) -/* E1204 8014AB04 03E00008 */ jr $ra -/* E1208 8014AB08 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/include/variables.h b/include/variables.h index 871adf2067..dff7fd36a2 100644 --- a/include/variables.h +++ b/include/variables.h @@ -165,7 +165,9 @@ extern Bytecode* SCRIPT_NpcDefeat; extern Bytecode* ShakeCam1; extern Bytecode* ShakeCamX; -extern s16 gMusicVolume; +extern s16 gMusicUnkVolume; +extern s16 gMusicCurrentVolume; +extern s16 gMusicTargetVolume; extern MusicPlayer gMusicPlayers[]; #endif diff --git a/src/code_e0b30_len_b80.c b/src/code_e0b30_len_b80.c index 35a9193232..0e24ebc7df 100644 --- a/src/code_e0b30_len_b80.c +++ b/src/code_e0b30_len_b80.c @@ -45,7 +45,7 @@ s32 _set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime return 2; } - gMusicVolume = volume; + gMusicUnkVolume = volume; musicPlayer->songID = songID; musicPlayer->variation = variation; musicPlayer->fadeOutTime = fadeOutTime; @@ -99,7 +99,32 @@ s32 func_8014A964(s32 playerIndex, s32 songID, s32 variation, s32 fadeInTime, s1 } } -INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AA54); +s32 func_8014AA54(s32 playerIndex, s32 arg1, s16 arg2) { + MusicPlayer* musicPlayers = &gMusicPlayers; + MusicPlayer* musicPlayer = &musicPlayers[playerIndex]; + + if (!(musicPlayer->flags & 1)) { + return 0; + } + + if (!(musicPlayer->flags & 2)) { + return 0; + } + + switch (arg2) { + case 0: + func_80056028(musicPlayer->unk_18, arg1); + break; + case 1: + func_80056044(musicPlayer->unk_18, arg1); + break; + case 2: + func_80056068(musicPlayer->unk_18, arg1); + break; + } + + return 1; +} INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AB0C); diff --git a/tools/symbol_addrs.txt b/tools/symbol_addrs.txt index 12db0921df..c83ba8dce3 100644 --- a/tools/symbol_addrs.txt +++ b/tools/symbol_addrs.txt @@ -1899,5 +1899,7 @@ EnemyNpcHit;0x80077F70 EnemyNpcDefeat;0x8007809C D_80078DB0;0x80078DB0 D_80078DB4;0x80078DB4 -gMusicVolume;0x80159AE0 gMusicPlayers;0x80159AF0 +gMusicUnkVolume;0x80159AE0 +gMusicTargetVolume;0x80159AE2 +gMusicCurVolume;0x80159AE6 diff --git a/undefined_syms.txt b/undefined_syms.txt index 5727b9abe2..ba19514be9 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -264,5 +264,7 @@ EnemyNpcDefeat = 0x8007809C; D_80078DB0 = 0x80078DB0; D_80078DB4 = 0x80078DB4; -gMusicVolume = 0x80159AE0; +gMusicUnkVolume = 0x80159AE0; +gMusicTargetVolume = 0x80159AE2; +gMusicCurVolume = 0x80159AE6; gMusicPlayers = 0x80159AF0; From 631afbe47798c153dd4e4c347e5eef6d5389cba3 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Thu, 29 Oct 2020 03:43:58 +0000 Subject: [PATCH 30/78] match many small funcs, rename symbols --- .../code_e0b30_len_b80/func_8014A498.s | 8 +-- .../code_e0b30_len_b80/func_8014AB0C.s | 27 -------- .../code_e0b30_len_b80/func_8014AB60.s | 27 -------- .../code_e0b30_len_b80/func_8014ABB4.s | 27 -------- .../code_e0b30_len_b80/func_8014AC08.s | 25 -------- .../code_e0b30_len_b80/func_8014AC5C.s | 9 --- .../code_e0b30_len_b80/func_8014AC70.s | 9 --- .../code_e0b30_len_b80/func_8014AC94.s | 18 +++--- .../code_e0b30_len_b80/func_8014AF8C.s | 9 --- include/common_structs.h | 4 +- include/variables.h | 3 +- src/code_e0b30_len_b80.c | 61 +++++++++++++++---- tools/symbol_addrs.txt | 1 + undefined_syms.txt | 13 ++-- 14 files changed, 74 insertions(+), 167 deletions(-) delete mode 100644 asm/nonmatchings/code_e0b30_len_b80/func_8014AB0C.s delete mode 100644 asm/nonmatchings/code_e0b30_len_b80/func_8014AB60.s delete mode 100644 asm/nonmatchings/code_e0b30_len_b80/func_8014ABB4.s delete mode 100644 asm/nonmatchings/code_e0b30_len_b80/func_8014AC08.s delete mode 100644 asm/nonmatchings/code_e0b30_len_b80/func_8014AC5C.s delete mode 100644 asm/nonmatchings/code_e0b30_len_b80/func_8014AC70.s delete mode 100644 asm/nonmatchings/code_e0b30_len_b80/func_8014AF8C.s diff --git a/asm/nonmatchings/code_e0b30_len_b80/func_8014A498.s b/asm/nonmatchings/code_e0b30_len_b80/func_8014A498.s index 013083418f..69f5b7c302 100644 --- a/asm/nonmatchings/code_e0b30_len_b80/func_8014A498.s +++ b/asm/nonmatchings/code_e0b30_len_b80/func_8014A498.s @@ -30,10 +30,10 @@ glabel func_8014A498 /* E0BF4 8014A4F4 1440FFF0 */ bnez $v0, .L8014A4B8 /* E0BF8 8014A4F8 24840030 */ addiu $a0, $a0, 0x30 /* E0BFC 8014A4FC 24020008 */ addiu $v0, $zero, 8 -/* E0C00 8014A500 3C018016 */ lui $at, %hi(D_80159AE2) -/* E0C04 8014A504 A4229AE2 */ sh $v0, %lo(D_80159AE2)($at) -/* E0C08 8014A508 3C018016 */ lui $at, %hi(D_80159AE4) -/* E0C0C 8014A50C A4229AE4 */ sh $v0, %lo(D_80159AE4)($at) +/* E0C00 8014A500 3C018016 */ lui $at, %hi(gMusicTargetVolume) +/* E0C04 8014A504 A4229AE2 */ sh $v0, %lo(gMusicTargetVolume)($at) +/* E0C08 8014A508 3C018016 */ lui $at, %hi(gMusicUnkVolume2) +/* E0C0C 8014A50C A4229AE4 */ sh $v0, %lo(gMusicUnkVolume2)($at) /* E0C10 8014A510 3C018016 */ lui $at, 0x8016 /* E0C14 8014A514 A4229AE6 */ sh $v0, -0x651a($at) /* E0C18 8014A518 0C015869 */ jal func_800561A4 diff --git a/asm/nonmatchings/code_e0b30_len_b80/func_8014AB0C.s b/asm/nonmatchings/code_e0b30_len_b80/func_8014AB0C.s deleted file mode 100644 index 8f8d3ba207..0000000000 --- a/asm/nonmatchings/code_e0b30_len_b80/func_8014AB0C.s +++ /dev/null @@ -1,27 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8014AB0C -/* E120C 8014AB0C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* E1210 8014AB10 3C028016 */ lui $v0, 0x8016 -/* E1214 8014AB14 24429AF0 */ addiu $v0, $v0, -0x6510 -/* E1218 8014AB18 00041840 */ sll $v1, $a0, 1 -/* E121C 8014AB1C 00641821 */ addu $v1, $v1, $a0 -/* E1220 8014AB20 00031900 */ sll $v1, $v1, 4 -/* E1224 8014AB24 00621821 */ addu $v1, $v1, $v0 -/* E1228 8014AB28 AFBF0010 */ sw $ra, 0x10($sp) -/* E122C 8014AB2C 94620000 */ lhu $v0, ($v1) -/* E1230 8014AB30 30420001 */ andi $v0, $v0, 1 -/* E1234 8014AB34 10400006 */ beqz $v0, .L8014AB50 -/* E1238 8014AB38 00052C00 */ sll $a1, $a1, 0x10 -/* E123C 8014AB3C 8C640018 */ lw $a0, 0x18($v1) -/* E1240 8014AB40 0C015777 */ jal func_80055DDC -/* E1244 8014AB44 00052C03 */ sra $a1, $a1, 0x10 -/* E1248 8014AB48 08052AD5 */ j .L8014AB54 -/* E124C 8014AB4C 00000000 */ nop -.L8014AB50: -/* E1250 8014AB50 0000102D */ daddu $v0, $zero, $zero -.L8014AB54: -/* E1254 8014AB54 8FBF0010 */ lw $ra, 0x10($sp) -/* E1258 8014AB58 03E00008 */ jr $ra -/* E125C 8014AB5C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_e0b30_len_b80/func_8014AB60.s b/asm/nonmatchings/code_e0b30_len_b80/func_8014AB60.s deleted file mode 100644 index 46042b52a4..0000000000 --- a/asm/nonmatchings/code_e0b30_len_b80/func_8014AB60.s +++ /dev/null @@ -1,27 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8014AB60 -/* E1260 8014AB60 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* E1264 8014AB64 3C028016 */ lui $v0, 0x8016 -/* E1268 8014AB68 24429AF0 */ addiu $v0, $v0, -0x6510 -/* E126C 8014AB6C 00041840 */ sll $v1, $a0, 1 -/* E1270 8014AB70 00641821 */ addu $v1, $v1, $a0 -/* E1274 8014AB74 00031900 */ sll $v1, $v1, 4 -/* E1278 8014AB78 00621821 */ addu $v1, $v1, $v0 -/* E127C 8014AB7C AFBF0010 */ sw $ra, 0x10($sp) -/* E1280 8014AB80 94620000 */ lhu $v0, ($v1) -/* E1284 8014AB84 30420001 */ andi $v0, $v0, 1 -/* E1288 8014AB88 10400006 */ beqz $v0, .L8014ABA4 -/* E128C 8014AB8C 00052C00 */ sll $a1, $a1, 0x10 -/* E1290 8014AB90 8C640018 */ lw $a0, 0x18($v1) -/* E1294 8014AB94 0C015792 */ jal func_80055E48 -/* E1298 8014AB98 00052C03 */ sra $a1, $a1, 0x10 -/* E129C 8014AB9C 08052AEA */ j .L8014ABA8 -/* E12A0 8014ABA0 00000000 */ nop -.L8014ABA4: -/* E12A4 8014ABA4 0000102D */ daddu $v0, $zero, $zero -.L8014ABA8: -/* E12A8 8014ABA8 8FBF0010 */ lw $ra, 0x10($sp) -/* E12AC 8014ABAC 03E00008 */ jr $ra -/* E12B0 8014ABB0 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_e0b30_len_b80/func_8014ABB4.s b/asm/nonmatchings/code_e0b30_len_b80/func_8014ABB4.s deleted file mode 100644 index 1899e95433..0000000000 --- a/asm/nonmatchings/code_e0b30_len_b80/func_8014ABB4.s +++ /dev/null @@ -1,27 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8014ABB4 -/* E12B4 8014ABB4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* E12B8 8014ABB8 3C028016 */ lui $v0, 0x8016 -/* E12BC 8014ABBC 24429AF0 */ addiu $v0, $v0, -0x6510 -/* E12C0 8014ABC0 00041840 */ sll $v1, $a0, 1 -/* E12C4 8014ABC4 00641821 */ addu $v1, $v1, $a0 -/* E12C8 8014ABC8 00031900 */ sll $v1, $v1, 4 -/* E12CC 8014ABCC 00621821 */ addu $v1, $v1, $v0 -/* E12D0 8014ABD0 AFBF0010 */ sw $ra, 0x10($sp) -/* E12D4 8014ABD4 94620000 */ lhu $v0, ($v1) -/* E12D8 8014ABD8 30420001 */ andi $v0, $v0, 1 -/* E12DC 8014ABDC 10400006 */ beqz $v0, .L8014ABF8 -/* E12E0 8014ABE0 00052C00 */ sll $a1, $a1, 0x10 -/* E12E4 8014ABE4 8C640018 */ lw $a0, 0x18($v1) -/* E12E8 8014ABE8 0C015731 */ jal func_80055CC4 -/* E12EC 8014ABEC 00052C03 */ sra $a1, $a1, 0x10 -/* E12F0 8014ABF0 08052AFF */ j .L8014ABFC -/* E12F4 8014ABF4 00000000 */ nop -.L8014ABF8: -/* E12F8 8014ABF8 0000102D */ daddu $v0, $zero, $zero -.L8014ABFC: -/* E12FC 8014ABFC 8FBF0010 */ lw $ra, 0x10($sp) -/* E1300 8014AC00 03E00008 */ jr $ra -/* E1304 8014AC04 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_e0b30_len_b80/func_8014AC08.s b/asm/nonmatchings/code_e0b30_len_b80/func_8014AC08.s deleted file mode 100644 index 0b64c7e4d2..0000000000 --- a/asm/nonmatchings/code_e0b30_len_b80/func_8014AC08.s +++ /dev/null @@ -1,25 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8014AC08 -/* E1308 8014AC08 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* E130C 8014AC0C 0000202D */ daddu $a0, $zero, $zero -/* E1310 8014AC10 2405FFFF */ addiu $a1, $zero, -1 -/* E1314 8014AC14 0080302D */ daddu $a2, $a0, $zero -/* E1318 8014AC18 240700FA */ addiu $a3, $zero, 0xfa -/* E131C 8014AC1C AFB00018 */ sw $s0, 0x18($sp) -/* E1320 8014AC20 24100008 */ addiu $s0, $zero, 8 -/* E1324 8014AC24 AFBF001C */ sw $ra, 0x1c($sp) -/* E1328 8014AC28 0C052A46 */ jal set_music_track -/* E132C 8014AC2C AFB00010 */ sw $s0, 0x10($sp) -/* E1330 8014AC30 24040001 */ addiu $a0, $zero, 1 -/* E1334 8014AC34 2405FFFF */ addiu $a1, $zero, -1 -/* E1338 8014AC38 0000302D */ daddu $a2, $zero, $zero -/* E133C 8014AC3C 240700FA */ addiu $a3, $zero, 0xfa -/* E1340 8014AC40 0C052A46 */ jal set_music_track -/* E1344 8014AC44 AFB00010 */ sw $s0, 0x10($sp) -/* E1348 8014AC48 8FBF001C */ lw $ra, 0x1c($sp) -/* E134C 8014AC4C 8FB00018 */ lw $s0, 0x18($sp) -/* E1350 8014AC50 24020001 */ addiu $v0, $zero, 1 -/* E1354 8014AC54 03E00008 */ jr $ra -/* E1358 8014AC58 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_e0b30_len_b80/func_8014AC5C.s b/asm/nonmatchings/code_e0b30_len_b80/func_8014AC5C.s deleted file mode 100644 index 3bc632238a..0000000000 --- a/asm/nonmatchings/code_e0b30_len_b80/func_8014AC5C.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8014AC5C -/* E135C 8014AC5C 24020004 */ addiu $v0, $zero, 4 -/* E1360 8014AC60 3C018016 */ lui $at, %hi(D_80159AE4) -/* E1364 8014AC64 A4229AE4 */ sh $v0, %lo(D_80159AE4)($at) -/* E1368 8014AC68 03E00008 */ jr $ra -/* E136C 8014AC6C 00000000 */ nop diff --git a/asm/nonmatchings/code_e0b30_len_b80/func_8014AC70.s b/asm/nonmatchings/code_e0b30_len_b80/func_8014AC70.s deleted file mode 100644 index 9b0abe19a3..0000000000 --- a/asm/nonmatchings/code_e0b30_len_b80/func_8014AC70.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8014AC70 -/* E1370 8014AC70 24020008 */ addiu $v0, $zero, 8 -/* E1374 8014AC74 3C018016 */ lui $at, %hi(D_80159AE4) -/* E1378 8014AC78 A4229AE4 */ sh $v0, %lo(D_80159AE4)($at) -/* E137C 8014AC7C 03E00008 */ jr $ra -/* E1380 8014AC80 00000000 */ nop diff --git a/asm/nonmatchings/code_e0b30_len_b80/func_8014AC94.s b/asm/nonmatchings/code_e0b30_len_b80/func_8014AC94.s index 3428a38914..f1b97ef67a 100644 --- a/asm/nonmatchings/code_e0b30_len_b80/func_8014AC94.s +++ b/asm/nonmatchings/code_e0b30_len_b80/func_8014AC94.s @@ -13,15 +13,15 @@ glabel func_8014AC94 /* E13B4 8014ACB4 08052B4D */ j .L8014AD34 /* E13B8 8014ACB8 A4820000 */ sh $v0, ($a0) .L8014ACBC: -/* E13BC 8014ACBC 3C038016 */ lui $v1, %hi(D_80159AE2) -/* E13C0 8014ACC0 84639AE2 */ lh $v1, %lo(D_80159AE2)($v1) -/* E13C4 8014ACC4 3C028016 */ lui $v0, %hi(D_80159AE4) -/* E13C8 8014ACC8 84429AE4 */ lh $v0, %lo(D_80159AE4)($v0) -/* E13CC 8014ACCC 3C048016 */ lui $a0, %hi(D_80159AE2) -/* E13D0 8014ACD0 94849AE2 */ lhu $a0, %lo(D_80159AE2)($a0) +/* E13BC 8014ACBC 3C038016 */ lui $v1, %hi(gMusicTargetVolume) +/* E13C0 8014ACC0 84639AE2 */ lh $v1, %lo(gMusicTargetVolume)($v1) +/* E13C4 8014ACC4 3C028016 */ lui $v0, %hi(gMusicUnkVolume2) +/* E13C8 8014ACC8 84429AE4 */ lh $v0, %lo(gMusicUnkVolume2)($v0) +/* E13CC 8014ACCC 3C048016 */ lui $a0, %hi(gMusicTargetVolume) +/* E13D0 8014ACD0 94849AE2 */ lhu $a0, %lo(gMusicTargetVolume)($a0) /* E13D4 8014ACD4 0043102A */ slt $v0, $v0, $v1 -/* E13D8 8014ACD8 3C038016 */ lui $v1, %hi(D_80159AE4) -/* E13DC 8014ACDC 94639AE4 */ lhu $v1, %lo(D_80159AE4)($v1) +/* E13D8 8014ACD8 3C038016 */ lui $v1, %hi(gMusicUnkVolume2) +/* E13DC 8014ACDC 94639AE4 */ lhu $v1, %lo(gMusicUnkVolume2)($v1) /* E13E0 8014ACE0 54400001 */ bnel $v0, $zero, .L8014ACE8 /* E13E4 8014ACE4 0060202D */ daddu $a0, $v1, $zero .L8014ACE8: @@ -41,7 +41,7 @@ glabel func_8014AC94 /* E1418 8014AD18 3C048016 */ lui $a0, 0x8016 /* E141C 8014AD1C 84849AE6 */ lh $a0, -0x651a($a0) /* E1420 8014AD20 0C015869 */ jal func_800561A4 -/* E1424 8014AD24 00000000 */ nop +/* E1424 8014AD24 00000000 */ nop /* E1428 8014AD28 24020003 */ addiu $v0, $zero, 3 /* E142C 8014AD2C 3C018015 */ lui $at, 0x8015 /* E1430 8014AD30 A422F738 */ sh $v0, -0x8c8($at) diff --git a/asm/nonmatchings/code_e0b30_len_b80/func_8014AF8C.s b/asm/nonmatchings/code_e0b30_len_b80/func_8014AF8C.s deleted file mode 100644 index d105d8a217..0000000000 --- a/asm/nonmatchings/code_e0b30_len_b80/func_8014AF8C.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8014AF8C -/* E168C 8014AF8C 3C028016 */ lui $v0, 0x8016 -/* E1690 8014AF90 24429AF0 */ addiu $v0, $v0, -0x6510 -/* E1694 8014AF94 AC44001C */ sw $a0, 0x1c($v0) -/* E1698 8014AF98 03E00008 */ jr $ra -/* E169C 8014AF9C AC450020 */ sw $a1, 0x20($v0) diff --git a/include/common_structs.h b/include/common_structs.h index 74516f195e..3034c2317c 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -316,7 +316,9 @@ typedef struct MusicPlayer { /* 0x10 */ s32 songID; /* 0x14 */ s32 variation; /* 0x18 */ s32 unk_18; - /* 0x1C */ char unk_1C[20]; + /* 0x1C */ s32 unk_1C; + /* 0x20 */ s32 unk_20; + /* 0x24 */ char unk_24[12]; } MusicPlayer; // size = 0x30 typedef struct MenuIcon { diff --git a/include/variables.h b/include/variables.h index dff7fd36a2..0d6ce235df 100644 --- a/include/variables.h +++ b/include/variables.h @@ -80,8 +80,6 @@ extern s32 D_8010CD20; extern s32 D_8010EF08; extern s32 D_8010F094; // player shadow index? extern s32 D_801595A0; -extern s16 D_80159AE2; // music target volume? -extern s16 D_80159AE4; extern BackgroundHeader gBackgroundImage; extern PrintContext* gCurrentPrintContext; @@ -166,6 +164,7 @@ extern Bytecode* ShakeCam1; extern Bytecode* ShakeCamX; extern s16 gMusicUnkVolume; +extern s16 gMusicUnkVolume2; extern s16 gMusicCurrentVolume; extern s16 gMusicTargetVolume; extern MusicPlayer gMusicPlayers[]; diff --git a/src/code_e0b30_len_b80.c b/src/code_e0b30_len_b80.c index 0e24ebc7df..f186d032a8 100644 --- a/src/code_e0b30_len_b80.c +++ b/src/code_e0b30_len_b80.c @@ -1,6 +1,5 @@ #include "common.h" - void func_8014AC84(s16 volume); INCLUDE_ASM(s32, "code_e0b30_len_b80", get_default_variation_for_song); @@ -8,8 +7,8 @@ INCLUDE_ASM(s32, "code_e0b30_len_b80", get_default_variation_for_song); INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014A498); void func_8014A52C(void) { - D_80159AE2 = 0x08; - D_80159AE4 = 0x08; + gMusicTargetVolume = 8; + gMusicUnkVolume2 = 8; } INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014A548); @@ -126,20 +125,56 @@ s32 func_8014AA54(s32 playerIndex, s32 arg1, s16 arg2) { return 1; } -INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AB0C); +s32 func_8014AB0C(s32 playerIndex, s16 arg1) { + MusicPlayer* musicPlayers = &gMusicPlayers; + MusicPlayer* musicPlayer = &musicPlayers[playerIndex]; -INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AB60); + if (!(musicPlayer->flags & 1)) { + return 0; + } -INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014ABB4); + return func_80055DDC(musicPlayer->unk_18, arg1); +} -INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AC08); +s32 func_8014AB60(s32 playerIndex, s16 arg1) { + MusicPlayer* musicPlayers = &gMusicPlayers; + MusicPlayer* musicPlayer = &musicPlayers[playerIndex]; -INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AC5C); + if (!(musicPlayer->flags & 1)) { + return 0; + } -INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AC70); + return func_80055E48(musicPlayer->unk_18, arg1); +} + +s32 func_8014ABB4(s32 playerIndex, s16 arg1) { + MusicPlayer* musicPlayers = &gMusicPlayers; + MusicPlayer* musicPlayer = &musicPlayers[playerIndex]; + + if (!(musicPlayer->flags & 1)) { + return 0; + } + + return func_80055CC4(musicPlayer->unk_18, arg1); +} + +s32 func_8014AC08(void) { + set_music_track(0, -1, 0, 250, 8); + set_music_track(1, -1, 0, 250, 8); + + return 1; +} + +void func_8014AC5C(void) { + gMusicUnkVolume2 = 4; +} + +void func_8014AC70(void) { + gMusicUnkVolume2 = 8; +} void func_8014AC84(s16 volume) { - D_80159AE2 = volume; + gMusicTargetVolume = volume; } INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AC94); @@ -154,7 +189,11 @@ INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AE6C); INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AEF8); -INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AF8C); +void func_8014AF8C(s32 arg0, s32 arg1) { + MusicPlayer* musicPlayer = &gMusicPlayers[0]; + musicPlayer->unk_1C = arg0; + musicPlayer->unk_20 = arg1; +} void func_8014AFA0(void) { } diff --git a/tools/symbol_addrs.txt b/tools/symbol_addrs.txt index c83ba8dce3..27ca6bc9e6 100644 --- a/tools/symbol_addrs.txt +++ b/tools/symbol_addrs.txt @@ -1901,5 +1901,6 @@ D_80078DB0;0x80078DB0 D_80078DB4;0x80078DB4 gMusicPlayers;0x80159AF0 gMusicUnkVolume;0x80159AE0 +gMusicUnkVolume2;0x80159AE4 gMusicTargetVolume;0x80159AE2 gMusicCurVolume;0x80159AE6 diff --git a/undefined_syms.txt b/undefined_syms.txt index ba19514be9..0442c35f66 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -179,8 +179,12 @@ gTriggerList2 = 0x80159290; gCurrentTriggerListPtr = 0x80159390; D_801595A0 = 0x801595A0; -D_80159AE2 = 0x80159AE2; -D_80159AE4 = 0x80159AE4; +gMusicUnkVolume = 0x80159AE0; +gMusicTargetVolume = 0x80159AE2; +gMusicUnkVolume2 = 0x80159AE4; +gMusicCurVolume = 0x80159AE6; +gMusicPlayers = 0x80159AF0; + gCollisionStatus = 0x8015A550; D_8015C7C0 = 0x8015C7C0; gLastCreatedEntityIndex = 0x801512EC; @@ -263,8 +267,3 @@ EnemyNpcDefeat = 0x8007809C; D_80078DB0 = 0x80078DB0; D_80078DB4 = 0x80078DB4; - -gMusicUnkVolume = 0x80159AE0; -gMusicTargetVolume = 0x80159AE2; -gMusicCurVolume = 0x80159AE6; -gMusicPlayers = 0x80159AF0; From 7376b736d01e4f7625ca0022a463b67d3106ae20 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 29 Oct 2020 12:08:00 -0400 Subject: [PATCH 31/78] a couple --- Makefile | 6 +- asm/nonmatchings/code_F5750/PlayerMoveTo.s | 86 --------------------- asm/nonmatchings/code_F5750/func_802D249C.s | 27 ------- include/functions.h | 1 + src/code_7bb60_len_41b0.c | 2 +- src/code_F5750.c | 38 ++++++++- 6 files changed, 41 insertions(+), 119 deletions(-) delete mode 100644 asm/nonmatchings/code_F5750/PlayerMoveTo.s delete mode 100644 asm/nonmatchings/code_F5750/func_802D249C.s diff --git a/Makefile b/Makefile index 0bb9ba311e..f838e6f178 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,7 @@ CPP := cpp LD := $(CROSS)ld OBJCOPY := $(CROSS)objcopy -CPPFLAGS := -Iinclude -Isrc -D _LANGUAGE_C -ffreestanding -DF3DEX_GBI_2 -D_MIPS_SZLONG=32 -Wundef -Wcomment -MP -MD +CPPFLAGS := -Iinclude -Isrc -D _LANGUAGE_C -ffreestanding -DF3DEX_GBI_2 -D_MIPS_SZLONG=32 -Wundef -Wcomment ASFLAGS := -EB -Iinclude -march=vr4300 -mtune=vr4300 OLDASFLAGS := -EB -Iinclude -G 0 CFLAGS := -O2 -quiet -G 0 -mcpu=vr4300 -mfix4300 -mips3 -mgp32 -mfp32 -Wimplicit -Wuninitialized -Wshadow @@ -133,12 +133,12 @@ $(BUILD_DIR)/%.Yay0.o: $(BUILD_DIR)/%.bin.Yay0 # Compile C files $(BUILD_DIR)/%.c.o: %.c $(BUILD_DIR)/%.d @mkdir -p $(shell dirname $@) - $(CPP) $(CPPFLAGS) -o - $< -MF $@.mk -MT $(BUILD_DIR)/$*.d | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - + $(CPP) $(CPPFLAGS) -MP -MD -o - $< -MF $@.mk -MT $(BUILD_DIR)/$*.d | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - # Compile C files (with DSL macros) $(foreach cfile, $(DSL_C_FILES), $(BUILD_DIR)/$(cfile).o): $(BUILD_DIR)/%.c.o: %.c $(BUILD_DIR)/%.d @mkdir -p $(shell dirname $@) - $(CPP) $(CPPFLAGS) -o - $< -MF $@.mk -MT $(BUILD_DIR)/$*.d | tools/compile_dsl_macros.py | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - + $(CPP) $(CPPFLAGS) -MP -MD -o - $< -MF $@.mk -MT $(BUILD_DIR)/$*.d | tools/compile_dsl_macros.py | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - # Assemble handwritten ASM $(BUILD_DIR)/%.s.o: %.s diff --git a/asm/nonmatchings/code_F5750/PlayerMoveTo.s b/asm/nonmatchings/code_F5750/PlayerMoveTo.s deleted file mode 100644 index 50896c8d7a..0000000000 --- a/asm/nonmatchings/code_F5750/PlayerMoveTo.s +++ /dev/null @@ -1,86 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel PlayerMoveTo -/* F5AE4 802D1134 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* F5AE8 802D1138 AFB10014 */ sw $s1, 0x14($sp) -/* F5AEC 802D113C 0080882D */ daddu $s1, $a0, $zero -/* F5AF0 802D1140 AFB20018 */ sw $s2, 0x18($sp) -/* F5AF4 802D1144 3C128011 */ lui $s2, %hi(gPlayerStatus) -/* F5AF8 802D1148 2652EFC8 */ addiu $s2, $s2, %lo(gPlayerStatus) -/* F5AFC 802D114C AFBF001C */ sw $ra, 0x1c($sp) -/* F5B00 802D1150 AFB00010 */ sw $s0, 0x10($sp) -/* F5B04 802D1154 F7B60028 */ sdc1 $f22, 0x28($sp) -/* F5B08 802D1158 F7B40020 */ sdc1 $f20, 0x20($sp) -/* F5B0C 802D115C 10A00038 */ beqz $a1, .L802D1240 -/* F5B10 802D1160 8E30000C */ lw $s0, 0xc($s1) -/* F5B14 802D1164 8E050000 */ lw $a1, ($s0) -/* F5B18 802D1168 0C0B1EAF */ jal get_variable -/* F5B1C 802D116C 26100004 */ addiu $s0, $s0, 4 -/* F5B20 802D1170 8E050000 */ lw $a1, ($s0) -/* F5B24 802D1174 26100004 */ addiu $s0, $s0, 4 -/* F5B28 802D1178 4482B000 */ mtc1 $v0, $f22 -/* F5B2C 802D117C 00000000 */ nop -/* F5B30 802D1180 4680B5A0 */ cvt.s.w $f22, $f22 -/* F5B34 802D1184 0C0B1EAF */ jal get_variable -/* F5B38 802D1188 0220202D */ daddu $a0, $s1, $zero -/* F5B3C 802D118C 8E050000 */ lw $a1, ($s0) -/* F5B40 802D1190 4482A000 */ mtc1 $v0, $f20 -/* F5B44 802D1194 00000000 */ nop -/* F5B48 802D1198 4680A520 */ cvt.s.w $f20, $f20 -/* F5B4C 802D119C 0C0B1EAF */ jal get_variable -/* F5B50 802D11A0 0220202D */ daddu $a0, $s1, $zero -/* F5B54 802D11A4 AE220070 */ sw $v0, 0x70($s1) -/* F5B58 802D11A8 C64C0028 */ lwc1 $f12, 0x28($s2) -/* F5B5C 802D11AC C64E0030 */ lwc1 $f14, 0x30($s2) -/* F5B60 802D11B0 4406B000 */ mfc1 $a2, $f22 -/* F5B64 802D11B4 4407A000 */ mfc1 $a3, $f20 -/* F5B68 802D11B8 0C00A720 */ jal atan2 -/* F5B6C 802D11BC 00000000 */ nop -/* F5B70 802D11C0 E6400080 */ swc1 $f0, 0x80($s2) -/* F5B74 802D11C4 8E220070 */ lw $v0, 0x70($s1) -/* F5B78 802D11C8 1440000F */ bnez $v0, .L802D1208 -/* F5B7C 802D11CC 00000000 */ nop -/* F5B80 802D11D0 C64C0028 */ lwc1 $f12, 0x28($s2) -/* F5B84 802D11D4 C64E0030 */ lwc1 $f14, 0x30($s2) -/* F5B88 802D11D8 4406B000 */ mfc1 $a2, $f22 -/* F5B8C 802D11DC 4407A000 */ mfc1 $a3, $f20 -/* F5B90 802D11E0 0C00A7B5 */ jal dist2D -/* F5B94 802D11E4 00000000 */ nop -/* F5B98 802D11E8 3C02802E */ lui $v0, %hi(gPlayerNpcPtr) -/* F5B9C 802D11EC 8C429D20 */ lw $v0, %lo(gPlayerNpcPtr)($v0) -/* F5BA0 802D11F0 C4420018 */ lwc1 $f2, 0x18($v0) -/* F5BA4 802D11F4 46020003 */ div.s $f0, $f0, $f2 -/* F5BA8 802D11F8 4600010D */ trunc.w.s $f4, $f0 -/* F5BAC 802D11FC E6240070 */ swc1 $f4, 0x70($s1) -/* F5BB0 802D1200 080B448B */ j .L802D122C -/* F5BB4 802D1204 C4400018 */ lwc1 $f0, 0x18($v0) -.L802D1208: -/* F5BB8 802D1208 C64C0028 */ lwc1 $f12, 0x28($s2) -/* F5BBC 802D120C C64E0030 */ lwc1 $f14, 0x30($s2) -/* F5BC0 802D1210 4406B000 */ mfc1 $a2, $f22 -/* F5BC4 802D1214 4407A000 */ mfc1 $a3, $f20 -/* F5BC8 802D1218 0C00A7B5 */ jal dist2D -/* F5BCC 802D121C 00000000 */ nop -/* F5BD0 802D1220 C6220070 */ lwc1 $f2, 0x70($s1) -/* F5BD4 802D1224 468010A0 */ cvt.s.w $f2, $f2 -/* F5BD8 802D1228 46020003 */ div.s $f0, $f0, $f2 -.L802D122C: -/* F5BDC 802D122C 8E240070 */ lw $a0, 0x70($s1) -/* F5BE0 802D1230 8E450080 */ lw $a1, 0x80($s2) -/* F5BE4 802D1234 44060000 */ mfc1 $a2, $f0 -/* F5BE8 802D1238 0C0389DE */ jal move_player -/* F5BEC 802D123C 00000000 */ nop -.L802D1240: -/* F5BF0 802D1240 8E230070 */ lw $v1, 0x70($s1) -/* F5BF4 802D1244 2463FFFF */ addiu $v1, $v1, -1 -/* F5BF8 802D1248 AE230070 */ sw $v1, 0x70($s1) -/* F5BFC 802D124C 8FBF001C */ lw $ra, 0x1c($sp) -/* F5C00 802D1250 8FB20018 */ lw $s2, 0x18($sp) -/* F5C04 802D1254 8FB10014 */ lw $s1, 0x14($sp) -/* F5C08 802D1258 8FB00010 */ lw $s0, 0x10($sp) -/* F5C0C 802D125C D7B60028 */ ldc1 $f22, 0x28($sp) -/* F5C10 802D1260 D7B40020 */ ldc1 $f20, 0x20($sp) -/* F5C14 802D1264 000317C2 */ srl $v0, $v1, 0x1f -/* F5C18 802D1268 03E00008 */ jr $ra -/* F5C1C 802D126C 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/asm/nonmatchings/code_F5750/func_802D249C.s b/asm/nonmatchings/code_F5750/func_802D249C.s deleted file mode 100644 index 7202fe94dc..0000000000 --- a/asm/nonmatchings/code_F5750/func_802D249C.s +++ /dev/null @@ -1,27 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D249C -/* F6E4C 802D249C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* F6E50 802D24A0 AFB10014 */ sw $s1, 0x14($sp) -/* F6E54 802D24A4 0080882D */ daddu $s1, $a0, $zero -/* F6E58 802D24A8 3C028016 */ lui $v0, 0x8016 -/* F6E5C 802D24AC 8442A552 */ lh $v0, -0x5aae($v0) -/* F6E60 802D24B0 AFBF0018 */ sw $ra, 0x18($sp) -/* F6E64 802D24B4 AFB00010 */ sw $s0, 0x10($sp) -/* F6E68 802D24B8 8E30000C */ lw $s0, 0xc($s1) -/* F6E6C 802D24BC 04400004 */ bltz $v0, .L802D24D0 -/* F6E70 802D24C0 0000302D */ daddu $a2, $zero, $zero -/* F6E74 802D24C4 0C0B48FE */ jal func_802D23F8 -/* F6E78 802D24C8 00000000 */ nop -/* F6E7C 802D24CC 0002302B */ sltu $a2, $zero, $v0 -.L802D24D0: -/* F6E80 802D24D0 8E050000 */ lw $a1, ($s0) -/* F6E84 802D24D4 0C0B2026 */ jal set_variable -/* F6E88 802D24D8 0220202D */ daddu $a0, $s1, $zero -/* F6E8C 802D24DC 8FBF0018 */ lw $ra, 0x18($sp) -/* F6E90 802D24E0 8FB10014 */ lw $s1, 0x14($sp) -/* F6E94 802D24E4 8FB00010 */ lw $s0, 0x10($sp) -/* F6E98 802D24E8 24020002 */ addiu $v0, $zero, 2 -/* F6E9C 802D24EC 03E00008 */ jr $ra -/* F6EA0 802D24F0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/include/functions.h b/include/functions.h index 033f72bb6e..c4333481bb 100644 --- a/include/functions.h +++ b/include/functions.h @@ -102,6 +102,7 @@ s32 make_item_entity_nodelay(s32 itemID, f32 x, f32 y, f32 z, ItemSpawnMode item void set_cam_viewport(s16 id, s16 x, s16 y, s16 width, s16 height); void disable_player_shadow(void); +void move_player(s32 duration, f32 heading, f32 speed); Npc* get_npc_safe(NpcId npcId); Npc* get_npc_unsafe(NpcId npcId); diff --git a/src/code_7bb60_len_41b0.c b/src/code_7bb60_len_41b0.c index 35841f3fcf..7becacbe3f 100644 --- a/src/code_7bb60_len_41b0.c +++ b/src/code_7bb60_len_41b0.c @@ -10,7 +10,7 @@ INCLUDE_ASM(s32, "code_7bb60_len_41b0", func_800E26C4); void set_action_state(s32 actionState); -void move_player(s16 duration, f32 heading, f32 speed) { +void move_player(s32 duration, f32 heading, f32 speed) { PlayerStatus* playerStatus = &gPlayerStatus; playerStatus->flags |= 0x4000; diff --git a/src/code_F5750.c b/src/code_F5750.c index 02b1382646..2654cfc464 100644 --- a/src/code_F5750.c +++ b/src/code_F5750.c @@ -122,7 +122,32 @@ ApiStatus SetPlayerAnimationSpeed(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "code_F5750", PlayerMoveTo, ScriptInstance* script, s32 isInitialCall); +ApiStatus PlayerMoveTo(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + PlayerStatus* playerStatus = PLAYER_STATUS; + f32 var0; + f32 var1; + f32 moveSpeed; + + if (isInitialCall) { + var1 = get_variable(script, *args++); + var0 = get_variable(script, *args++); + script->functionTemp[0].s = get_variable(script, *args++); + playerStatus->targetYaw = atan2(playerStatus->position.x, playerStatus->position.z, var1, var0); + + if (script->functionTemp[0].s == 0) { + script->functionTemp[0].s = (dist2D(playerStatus->position.x, playerStatus->position.z, var1, + var0) / gPlayerNpcPtr->moveSpeed); + moveSpeed = gPlayerNpcPtr->moveSpeed; + } else { + moveSpeed = dist2D(playerStatus->position.x, playerStatus->position.z, var1, var0) / script->functionTemp[0].s; + } + move_player(script->functionTemp[0].s, playerStatus->targetYaw, moveSpeed); + } + + script->functionTemp[0].s--; + return script->functionTemp[0].s < 0; +} INCLUDE_ASM(s32, "code_F5750", func_802D1270); @@ -236,7 +261,16 @@ INCLUDE_ASM(s32, "code_F5750", func_802D244C); INCLUDE_ASM(s32, "code_F5750", func_802D2484); -INCLUDE_ASM(s32, "code_F5750", func_802D249C); +ApiStatus func_802D249C(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 val = 0; + if (gCollisionStatus.currentFloor >= 0) { + val = func_802D23F8() != 0; + } + set_variable(script, *args, val); + + return ApiStatus_DONE2; +} ApiStatus func_802D24F4(ScriptInstance* script, s32 isInitialCall) { return (gPlayerStatus.moveFrames == 0) * ApiStatus_DONE2; From 13d3c64295192851d04541a5ff0823ddcb24bdf4 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Thu, 29 Oct 2020 17:45:40 +0000 Subject: [PATCH 32/78] fix WATCH_INCLUDES=0 and pipefail --- Makefile | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index 0bb9ba311e..8e9c2e466d 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,11 @@ ifeq ($(NON_MATCHING),1) override COMPARE=0 endif +# PERMUTER=1 implies WATCH_INCLUDES=0 +ifeq ($(PERMUTER),1) +override WATCH_INCLUDES=0 +endif + ### Output ### @@ -38,14 +43,7 @@ N64CKSUM := tools/n64crc SPLAT_YAML := tools/splat.yaml SPLAT = $(PYTHON) tools/n64splat/split.py $(BASEROM) $(SPLAT_YAML) . YAY0COMPRESS = tools/Yay0compress - -ifndef EMULATOR -ifneq ($(shell which mupen64plus-gui),) -EMULATOR = mupen64plus-gui -else EMULATOR = mupen64plus -endif -endif ### Compiler Options ### @@ -58,12 +56,17 @@ CPP := cpp LD := $(CROSS)ld OBJCOPY := $(CROSS)objcopy -CPPFLAGS := -Iinclude -Isrc -D _LANGUAGE_C -ffreestanding -DF3DEX_GBI_2 -D_MIPS_SZLONG=32 -Wundef -Wcomment -MP -MD +CPPFLAGS := -Iinclude -Isrc -D _LANGUAGE_C -ffreestanding -DF3DEX_GBI_2 -D_MIPS_SZLONG=32 -Wundef -Wcomment ASFLAGS := -EB -Iinclude -march=vr4300 -mtune=vr4300 OLDASFLAGS := -EB -Iinclude -G 0 CFLAGS := -O2 -quiet -G 0 -mcpu=vr4300 -mfix4300 -mips3 -mgp32 -mfp32 -Wimplicit -Wuninitialized -Wshadow LDFLAGS := -T undefined_syms.txt -T undefined_funcs.txt -T $(BUILD_DIR)/$(LD_SCRIPT) -Map $(LD_MAP) --no-check-sections +ifeq ($(WATCH_INCLUDES),1) +CPPMFLAGS = -MP -MD -MF $@.mk -MT $(BUILD_DIR)/$*.d +MDEPS = $(BUILD_DIR)/%.d +endif + ifeq ($(NON_MATCHING),1) CPPFLAGS += -DNON_MATCHING endif @@ -106,11 +109,7 @@ split-all: $(SPLAT) --modes all test: $(ROM) -ifdef EMULATOR $(EMULATOR) $< -else - @echo "N64 emulator not detected." && false -endif # Compressed files %.Yay0: % @@ -131,14 +130,14 @@ $(BUILD_DIR)/%.Yay0.o: $(BUILD_DIR)/%.bin.Yay0 $(LD) -r -b binary -o $@ $< # Compile C files -$(BUILD_DIR)/%.c.o: %.c $(BUILD_DIR)/%.d +$(BUILD_DIR)/%.c.o: %.c $(MDEPS) @mkdir -p $(shell dirname $@) - $(CPP) $(CPPFLAGS) -o - $< -MF $@.mk -MT $(BUILD_DIR)/$*.d | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - + $(CPP) $(CPPFLAGS) -o - $< $(CPPMFLAGS) | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - # Compile C files (with DSL macros) -$(foreach cfile, $(DSL_C_FILES), $(BUILD_DIR)/$(cfile).o): $(BUILD_DIR)/%.c.o: %.c $(BUILD_DIR)/%.d +$(foreach cfile, $(DSL_C_FILES), $(BUILD_DIR)/$(cfile).o): $(BUILD_DIR)/%.c.o: %.c $(MDEPS) @mkdir -p $(shell dirname $@) - $(CPP) $(CPPFLAGS) -o - $< -MF $@.mk -MT $(BUILD_DIR)/$*.d | tools/compile_dsl_macros.py | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - + $(CPP) $(CPPFLAGS) -o - $< $(CPPMFLAGS) | tools/compile_dsl_macros.py | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - # Assemble handwritten ASM $(BUILD_DIR)/%.s.o: %.s @@ -173,12 +172,12 @@ ifeq ($(COMPARE),1) @sha1sum -c checksum.sha1 || (echo 'The build succeeded, but did not match the base ROM. This is expected if you are making changes to the game. To skip this check, use "make COMPARE=0".' && false) endif -$(BUILD_DIR)/$(TARGET).bin: $(BUILD_DIR)/$(TARGET).elf - $(OBJCOPY) $< $@ -O binary - $(BUILD_DIR)/$(TARGET).elf: $(BUILD_DIR)/$(LD_SCRIPT) $(OBJECTS) $(LD) $(LDFLAGS) -o $@ +$(BUILD_DIR)/$(TARGET).bin: $(BUILD_DIR)/$(TARGET).elf + $(OBJCOPY) $< $@ -O binary + ### Make Settings ### @@ -190,3 +189,6 @@ $(BUILD_DIR)/$(TARGET).elf: $(BUILD_DIR)/$(LD_SCRIPT) $(OBJECTS) # Remove built-in implicit rules to improve performance MAKEFLAGS += --no-builtin-rules + +# Fail targets if any command in the pipe exits with error +SHELL = /bin/bash -e -o pipefail From 18e8c3ca6859af5016232ba4808fe566aaa21e53 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Thu, 29 Oct 2020 18:04:11 +0000 Subject: [PATCH 33/78] fix permuter --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8e9c2e466d..ece296eab5 100644 --- a/Makefile +++ b/Makefile @@ -132,12 +132,12 @@ $(BUILD_DIR)/%.Yay0.o: $(BUILD_DIR)/%.bin.Yay0 # Compile C files $(BUILD_DIR)/%.c.o: %.c $(MDEPS) @mkdir -p $(shell dirname $@) - $(CPP) $(CPPFLAGS) -o - $< $(CPPMFLAGS) | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - + $(CPP) $(CPPFLAGS) -o - $< $(CPPMFLAGS) | $(CC) $(CFLAGS) -o - | $(OLD_AS) $(OLDASFLAGS) -o $@ - # Compile C files (with DSL macros) $(foreach cfile, $(DSL_C_FILES), $(BUILD_DIR)/$(cfile).o): $(BUILD_DIR)/%.c.o: %.c $(MDEPS) @mkdir -p $(shell dirname $@) - $(CPP) $(CPPFLAGS) -o - $< $(CPPMFLAGS) | tools/compile_dsl_macros.py | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - + $(CPP) $(CPPFLAGS) -o - $< $(CPPMFLAGS) | tools/compile_dsl_macros.py | $(CC) $(CFLAGS) -o - | $(OLD_AS) $(OLDASFLAGS) -o $@ - # Assemble handwritten ASM $(BUILD_DIR)/%.s.o: %.s From 977fa7117d092043348b280f8c7f12a62361cbde Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 29 Oct 2020 15:56:58 -0400 Subject: [PATCH 34/78] InterpPlayerYaw --- asm/nonmatchings/code_F5750/InterpPlayerYaw.s | 122 ------------------ src/code_F5750.c | 42 +++++- 2 files changed, 41 insertions(+), 123 deletions(-) delete mode 100644 asm/nonmatchings/code_F5750/InterpPlayerYaw.s diff --git a/asm/nonmatchings/code_F5750/InterpPlayerYaw.s b/asm/nonmatchings/code_F5750/InterpPlayerYaw.s deleted file mode 100644 index 4cb76428ce..0000000000 --- a/asm/nonmatchings/code_F5750/InterpPlayerYaw.s +++ /dev/null @@ -1,122 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel InterpPlayerYaw -/* F62EC 802D193C 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* F62F0 802D1940 AFB10014 */ sw $s1, 0x14($sp) -/* F62F4 802D1944 0080882D */ daddu $s1, $a0, $zero -/* F62F8 802D1948 AFB50024 */ sw $s5, 0x24($sp) -/* F62FC 802D194C 3C158011 */ lui $s5, %hi(gPlayerStatus) -/* F6300 802D1950 26B5EFC8 */ addiu $s5, $s5, %lo(gPlayerStatus) -/* F6304 802D1954 AFB60028 */ sw $s6, 0x28($sp) -/* F6308 802D1958 26360074 */ addiu $s6, $s1, 0x74 -/* F630C 802D195C AFB40020 */ sw $s4, 0x20($sp) -/* F6310 802D1960 26340078 */ addiu $s4, $s1, 0x78 -/* F6314 802D1964 AFB3001C */ sw $s3, 0x1c($sp) -/* F6318 802D1968 AFBF002C */ sw $ra, 0x2c($sp) -/* F631C 802D196C AFB20018 */ sw $s2, 0x18($sp) -/* F6320 802D1970 AFB00010 */ sw $s0, 0x10($sp) -/* F6324 802D1974 8E32000C */ lw $s2, 0xc($s1) -/* F6328 802D1978 10A0002C */ beqz $a1, .L802D1A2C -/* F632C 802D197C 2633007C */ addiu $s3, $s1, 0x7c -/* F6330 802D1980 3C10802E */ lui $s0, %hi(gPlayerNpcPtr) -/* F6334 802D1984 26109D20 */ addiu $s0, $s0, %lo(gPlayerNpcPtr) -/* F6338 802D1988 8E020000 */ lw $v0, ($s0) -/* F633C 802D198C C6A00080 */ lwc1 $f0, 0x80($s5) -/* F6340 802D1990 E440000C */ swc1 $f0, 0xc($v0) -/* F6344 802D1994 E6200074 */ swc1 $f0, 0x74($s1) -/* F6348 802D1998 8E450000 */ lw $a1, ($s2) -/* F634C 802D199C 0C0B210B */ jal get_float_variable -/* F6350 802D19A0 26520004 */ addiu $s2, $s2, 4 -/* F6354 802D19A4 C6220074 */ lwc1 $f2, 0x74($s1) -/* F6358 802D19A8 46020001 */ sub.s $f0, $f0, $f2 -/* F635C 802D19AC E6200078 */ swc1 $f0, 0x78($s1) -/* F6360 802D19B0 8E450000 */ lw $a1, ($s2) -/* F6364 802D19B4 0C0B1EAF */ jal get_variable -/* F6368 802D19B8 0220202D */ daddu $a0, $s1, $zero -/* F636C 802D19BC AE22007C */ sw $v0, 0x7c($s1) -/* F6370 802D19C0 8E020000 */ lw $v0, ($s0) -/* F6374 802D19C4 3C01C334 */ lui $at, 0xc334 -/* F6378 802D19C8 44810000 */ mtc1 $at, $f0 -/* F637C 802D19CC A440008E */ sh $zero, 0x8e($v0) -/* F6380 802D19D0 C6220078 */ lwc1 $f2, 0x78($s1) -/* F6384 802D19D4 4600103C */ c.lt.s $f2, $f0 -/* F6388 802D19D8 00000000 */ nop -/* F638C 802D19DC 45000007 */ bc1f .L802D19FC -/* F6390 802D19E0 00000000 */ nop -/* F6394 802D19E4 3C0143B4 */ lui $at, 0x43b4 -/* F6398 802D19E8 44810000 */ mtc1 $at, $f0 -/* F639C 802D19EC 00000000 */ nop -/* F63A0 802D19F0 46001000 */ add.s $f0, $f2, $f0 -/* F63A4 802D19F4 E6200078 */ swc1 $f0, 0x78($s1) -/* F63A8 802D19F8 C6220078 */ lwc1 $f2, 0x78($s1) -.L802D19FC: -/* F63AC 802D19FC 3C014334 */ lui $at, 0x4334 -/* F63B0 802D1A00 44810000 */ mtc1 $at, $f0 -/* F63B4 802D1A04 00000000 */ nop -/* F63B8 802D1A08 4602003C */ c.lt.s $f0, $f2 -/* F63BC 802D1A0C 00000000 */ nop -/* F63C0 802D1A10 45000006 */ bc1f .L802D1A2C -/* F63C4 802D1A14 00000000 */ nop -/* F63C8 802D1A18 3C0143B4 */ lui $at, 0x43b4 -/* F63CC 802D1A1C 44810000 */ mtc1 $at, $f0 -/* F63D0 802D1A20 00000000 */ nop -/* F63D4 802D1A24 46001001 */ sub.s $f0, $f2, $f0 -/* F63D8 802D1A28 E6200078 */ swc1 $f0, 0x78($s1) -.L802D1A2C: -/* F63DC 802D1A2C 8E620000 */ lw $v0, ($s3) -/* F63E0 802D1A30 1C40000E */ bgtz $v0, .L802D1A6C -/* F63E4 802D1A34 00000000 */ nop -/* F63E8 802D1A38 3C10802E */ lui $s0, %hi(gPlayerNpcPtr) -/* F63EC 802D1A3C 26109D20 */ addiu $s0, $s0, %lo(gPlayerNpcPtr) -/* F63F0 802D1A40 8E020000 */ lw $v0, ($s0) -/* F63F4 802D1A44 C6800000 */ lwc1 $f0, ($s4) -/* F63F8 802D1A48 C44C000C */ lwc1 $f12, 0xc($v0) -/* F63FC 802D1A4C 46006300 */ add.s $f12, $f12, $f0 -/* F6400 802D1A50 0C00A6C9 */ jal clamp_angle -/* F6404 802D1A54 E44C000C */ swc1 $f12, 0xc($v0) -/* F6408 802D1A58 8E030000 */ lw $v1, ($s0) -/* F640C 802D1A5C 24020002 */ addiu $v0, $zero, 2 -/* F6410 802D1A60 E460000C */ swc1 $f0, 0xc($v1) -/* F6414 802D1A64 080B46B7 */ j .L802D1ADC -/* F6418 802D1A68 E6A00080 */ swc1 $f0, 0x80($s5) -.L802D1A6C: -/* F641C 802D1A6C 3C10802E */ lui $s0, %hi(gPlayerNpcPtr) -/* F6420 802D1A70 26109D20 */ addiu $s0, $s0, %lo(gPlayerNpcPtr) -/* F6424 802D1A74 8E030000 */ lw $v1, ($s0) -/* F6428 802D1A78 9462008E */ lhu $v0, 0x8e($v1) -/* F642C 802D1A7C 24420001 */ addiu $v0, $v0, 1 -/* F6430 802D1A80 A462008E */ sh $v0, 0x8e($v1) -/* F6434 802D1A84 00021400 */ sll $v0, $v0, 0x10 -/* F6438 802D1A88 00021403 */ sra $v0, $v0, 0x10 -/* F643C 802D1A8C C6800000 */ lwc1 $f0, ($s4) -/* F6440 802D1A90 44821000 */ mtc1 $v0, $f2 -/* F6444 802D1A94 00000000 */ nop -/* F6448 802D1A98 468010A0 */ cvt.s.w $f2, $f2 -/* F644C 802D1A9C 46020002 */ mul.s $f0, $f0, $f2 -/* F6450 802D1AA0 00000000 */ nop -/* F6454 802D1AA4 C6CC0000 */ lwc1 $f12, ($s6) -/* F6458 802D1AA8 C6620000 */ lwc1 $f2, ($s3) -/* F645C 802D1AAC 468010A0 */ cvt.s.w $f2, $f2 -/* F6460 802D1AB0 46020003 */ div.s $f0, $f0, $f2 -/* F6464 802D1AB4 46006300 */ add.s $f12, $f12, $f0 -/* F6468 802D1AB8 0C00A6C9 */ jal clamp_angle -/* F646C 802D1ABC E46C000C */ swc1 $f12, 0xc($v1) -/* F6470 802D1AC0 8E020000 */ lw $v0, ($s0) -/* F6474 802D1AC4 E440000C */ swc1 $f0, 0xc($v0) -/* F6478 802D1AC8 E6A00080 */ swc1 $f0, 0x80($s5) -/* F647C 802D1ACC 8442008E */ lh $v0, 0x8e($v0) -/* F6480 802D1AD0 8E630000 */ lw $v1, ($s3) -/* F6484 802D1AD4 0043102A */ slt $v0, $v0, $v1 -/* F6488 802D1AD8 38420001 */ xori $v0, $v0, 1 -.L802D1ADC: -/* F648C 802D1ADC 8FBF002C */ lw $ra, 0x2c($sp) -/* F6490 802D1AE0 8FB60028 */ lw $s6, 0x28($sp) -/* F6494 802D1AE4 8FB50024 */ lw $s5, 0x24($sp) -/* F6498 802D1AE8 8FB40020 */ lw $s4, 0x20($sp) -/* F649C 802D1AEC 8FB3001C */ lw $s3, 0x1c($sp) -/* F64A0 802D1AF0 8FB20018 */ lw $s2, 0x18($sp) -/* F64A4 802D1AF4 8FB10014 */ lw $s1, 0x14($sp) -/* F64A8 802D1AF8 8FB00010 */ lw $s0, 0x10($sp) -/* F64AC 802D1AFC 03E00008 */ jr $ra -/* F64B0 802D1B00 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/src/code_F5750.c b/src/code_F5750.c index 2654cfc464..e473f39c32 100644 --- a/src/code_F5750.c +++ b/src/code_F5750.c @@ -167,7 +167,47 @@ void PlayerJump2(ScriptInstance* script, s32 isInitialCall) { player_jump(script, isInitialCall, 2); } -INCLUDE_ASM(s32, "code_F5750", InterpPlayerYaw, ScriptInstance* script, s32 isInitialCall); +ApiStatus InterpPlayerYaw(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + PlayerStatus* playerStatus = PLAYER_STATUS; + f32* t1 = &script->functionTemp[1].f; + f32* t2 = &script->functionTemp[2].f; + s32* t3 = &script->functionTemp[3].s; + + if (isInitialCall) { + Npc** player = &gPlayerNpcPtr; + + (*player)->yaw = playerStatus->targetYaw; + *t1 = (*player)->yaw; + *t2 = get_float_variable(script, *args++) - *t1; + *t3 = get_variable(script, *args++); + (*player)->duration = 0; + + if (*t2 < -180.0f) { + *t2 += 360.0f; + } + if (*t2 > 180.0f) { + *t2 -= 360.0f; + } + } + + if (*t3 > 0) { + Npc** player = &gPlayerNpcPtr; + + (*player)->duration++; + (*player)->yaw = *t1 + ((*t2 * (*player)->duration) / *t3); + (*player)->yaw = clamp_angle((*player)->yaw); + playerStatus->targetYaw = (*player)->yaw; + return ((*player)->duration < *t3) ^ 1; + } else { + Npc** player = &gPlayerNpcPtr; + + (*player)->yaw += *t2; + (*player)->yaw = clamp_angle((*player)->yaw);; + playerStatus->targetYaw = (*player)->yaw; + return ApiStatus_DONE2; + } +} INCLUDE_ASM(s32, "code_F5750", PlayerFaceNpc, ScriptInstance* script, s32 isInitialCall); From d0d833cd1d5fbe0dffe6773190692bbbbb57a969 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 29 Oct 2020 16:16:39 -0400 Subject: [PATCH 35/78] LoadPath --- .../code_f8f60_len_1560/LoadPath.s | 65 --------------- include/common_structs.h | 82 +++++++++++-------- src/code_f8f60_len_1560.c | 22 ++++- 3 files changed, 67 insertions(+), 102 deletions(-) delete mode 100644 asm/nonmatchings/code_f8f60_len_1560/LoadPath.s diff --git a/asm/nonmatchings/code_f8f60_len_1560/LoadPath.s b/asm/nonmatchings/code_f8f60_len_1560/LoadPath.s deleted file mode 100644 index 27425f3455..0000000000 --- a/asm/nonmatchings/code_f8f60_len_1560/LoadPath.s +++ /dev/null @@ -1,65 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel LoadPath -/* F9DE0 802D5430 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* F9DE4 802D5434 AFB20018 */ sw $s2, 0x18($sp) -/* F9DE8 802D5438 0080902D */ daddu $s2, $a0, $zero -/* F9DEC 802D543C AFBF0028 */ sw $ra, 0x28($sp) -/* F9DF0 802D5440 AFB50024 */ sw $s5, 0x24($sp) -/* F9DF4 802D5444 AFB40020 */ sw $s4, 0x20($sp) -/* F9DF8 802D5448 AFB3001C */ sw $s3, 0x1c($sp) -/* F9DFC 802D544C AFB10014 */ sw $s1, 0x14($sp) -/* F9E00 802D5450 AFB00010 */ sw $s0, 0x10($sp) -/* F9E04 802D5454 8E50000C */ lw $s0, 0xc($s2) -/* F9E08 802D5458 8E050000 */ lw $a1, ($s0) -/* F9E0C 802D545C 0C0B1EAF */ jal get_variable -/* F9E10 802D5460 26100004 */ addiu $s0, $s0, 4 -/* F9E14 802D5464 8E050000 */ lw $a1, ($s0) -/* F9E18 802D5468 26100004 */ addiu $s0, $s0, 4 -/* F9E1C 802D546C 0240202D */ daddu $a0, $s2, $zero -/* F9E20 802D5470 0C0B1EAF */ jal get_variable -/* F9E24 802D5474 0040982D */ daddu $s3, $v0, $zero -/* F9E28 802D5478 8E050000 */ lw $a1, ($s0) -/* F9E2C 802D547C 26100004 */ addiu $s0, $s0, 4 -/* F9E30 802D5480 0240202D */ daddu $a0, $s2, $zero -/* F9E34 802D5484 0C0B1EAF */ jal get_variable -/* F9E38 802D5488 0040A02D */ daddu $s4, $v0, $zero -/* F9E3C 802D548C 0240202D */ daddu $a0, $s2, $zero -/* F9E40 802D5490 8E050000 */ lw $a1, ($s0) -/* F9E44 802D5494 0C0B1EAF */ jal get_variable -/* F9E48 802D5498 0040882D */ daddu $s1, $v0, $zero -/* F9E4C 802D549C 2404001C */ addiu $a0, $zero, 0x1c -/* F9E50 802D54A0 0C00AB39 */ jal heap_malloc -/* F9E54 802D54A4 0040A82D */ daddu $s5, $v0, $zero -/* F9E58 802D54A8 00112080 */ sll $a0, $s1, 2 -/* F9E5C 802D54AC 0040802D */ daddu $s0, $v0, $zero -/* F9E60 802D54B0 AE5000C0 */ sw $s0, 0xc0($s2) -/* F9E64 802D54B4 0C00AB39 */ jal heap_malloc -/* F9E68 802D54B8 AE110000 */ sw $s1, ($s0) -/* F9E6C 802D54BC 00112040 */ sll $a0, $s1, 1 -/* F9E70 802D54C0 00912021 */ addu $a0, $a0, $s1 -/* F9E74 802D54C4 00042080 */ sll $a0, $a0, 2 -/* F9E78 802D54C8 AE020004 */ sw $v0, 4($s0) -/* F9E7C 802D54CC 0C00AB39 */ jal heap_malloc -/* F9E80 802D54D0 AE140008 */ sw $s4, 8($s0) -/* F9E84 802D54D4 8E040000 */ lw $a0, ($s0) -/* F9E88 802D54D8 8E050004 */ lw $a1, 4($s0) -/* F9E8C 802D54DC 8E060008 */ lw $a2, 8($s0) -/* F9E90 802D54E0 0040382D */ daddu $a3, $v0, $zero -/* F9E94 802D54E4 0C0B536B */ jal setup_path_data -/* F9E98 802D54E8 AE02000C */ sw $v0, 0xc($s0) -/* F9E9C 802D54EC 2673FFFF */ addiu $s3, $s3, -1 -/* F9EA0 802D54F0 AE000010 */ sw $zero, 0x10($s0) -/* F9EA4 802D54F4 AE130014 */ sw $s3, 0x14($s0) -/* F9EA8 802D54F8 AE150018 */ sw $s5, 0x18($s0) -/* F9EAC 802D54FC 8FBF0028 */ lw $ra, 0x28($sp) -/* F9EB0 802D5500 8FB50024 */ lw $s5, 0x24($sp) -/* F9EB4 802D5504 8FB40020 */ lw $s4, 0x20($sp) -/* F9EB8 802D5508 8FB3001C */ lw $s3, 0x1c($sp) -/* F9EBC 802D550C 8FB20018 */ lw $s2, 0x18($sp) -/* F9EC0 802D5510 8FB10014 */ lw $s1, 0x14($sp) -/* F9EC4 802D5514 8FB00010 */ lw $s0, 0x10($sp) -/* F9EC8 802D5518 24020002 */ addiu $v0, $zero, 2 -/* F9ECC 802D551C 03E00008 */ jr $ra -/* F9ED0 802D5520 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/include/common_structs.h b/include/common_structs.h index 56eb064d23..c2c2be9b11 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -49,7 +49,7 @@ typedef struct CamPosSettings { /* 0x04 */ f32 boomLength; /* 0x08 */ f32 boomPitch; /* 0x0C */ f32 viewPitch; - /* 0x10 */ struct Vec3f position; + /* 0x10 */ Vec3f position; } CamPosSettings; // size = 0x1C typedef struct PartnerData { @@ -90,12 +90,12 @@ typedef struct Npc { /* 0x02C */ char unk_2C[4]; /* 0x030 */ f32 animationSpeed; /* 0x034 */ char unk_34[4]; - /* 0x038 */ struct Vec3f pos; - /* 0x044 */ struct Vec3f rotation; + /* 0x038 */ Vec3f pos; + /* 0x044 */ Vec3f rotation; /* 0x050 */ f32 unk_50; - /* 0x054 */ struct Vec3f scale; - /* 0x060 */ struct Vec3f moveToPos; - /* 0x06C */ struct Vec3f colliderPos; /* used during collision with player */ + /* 0x054 */ Vec3f scale; + /* 0x060 */ Vec3f moveToPos; + /* 0x06C */ Vec3f colliderPos; /* used during collision with player */ /* 0x078 */ s32 shadowIndex; /* 0x07C */ f32 shadowScale; /* 0x080 */ s32 unk_80; @@ -431,7 +431,7 @@ typedef struct Camera { /* 0x054 */ f32 unk_54; /* 0x058 */ f32 unk_58; /* 0x05C */ f32 unk_5C; - /* 0x060 */ struct Vec3f targetPos; + /* 0x060 */ Vec3f targetPos; /* 0x06C */ f32 currentYaw; /* 0x070 */ char unk_70[4]; /* 0x074 */ f32 currentBoomYaw; @@ -458,13 +458,13 @@ typedef struct Camera { /* 0x48C */ f32 linearInterpScale; /* 3.0? */ /* 0x490 */ f32 moveSpeed; /* 0x494 */ char unk_494[28]; - /* 0x4B0 */ struct Vec3f movePos; + /* 0x4B0 */ Vec3f movePos; /* 0x4BC */ char unk_4BC[28]; /* 0x4D8 */ s32 controllerType; /* 0x4DC */ f32 controllerBoomLen; /* 0x4E0 */ f32 controllerBoomPitch; - /* 0x4E4 */ struct Vec3f posA; - /* 0x4F0 */ struct Vec3f posB; + /* 0x4E4 */ Vec3f posA; + /* 0x4F0 */ Vec3f posB; /* 0x4FC */ f32 controllerViewPitch; /* 0x500 */ s32 unk_500; /* 0x504 */ s16 boolTargetPlayer; @@ -767,7 +767,7 @@ typedef struct ItemEntity { /* 0x00 */ s32 flags; /* 0x04 */ s16 boundVar; /* see make_item_entity */ /* 0x06 */ char unk_06[2]; - /* 0x08 */ struct Vec3f position; + /* 0x08 */ Vec3f position; /* 0x14 */ struct ItemEntityPhysicsData* physicsData; /* 0x18 */ s16 itemID; /* into item table, also worldIconID */ /* 0x1A */ u8 state; @@ -806,10 +806,10 @@ typedef struct SpriteComponent { /* 0x10 */ s32 loopCounter; /* 0x14 */ s32 currentRaster; /* 0x18 */ s32 currentPalette; - /* 0x1C */ struct Vec3f posOffset; - /* 0x28 */ struct Vec3f compPos; - /* 0x34 */ struct Vec3f rotation; - /* 0x40 */ struct Vec3f scale; + /* 0x1C */ Vec3f posOffset; + /* 0x28 */ Vec3f compPos; + /* 0x34 */ Vec3f rotation; + /* 0x40 */ Vec3f scale; /* 0x4C */ char unk_4C[4]; } SpriteComponent; // size = 0x50 @@ -897,7 +897,7 @@ typedef struct GameStatus { /* 0x08E */ s16 entryID; /* 0x090 */ char unk_90[4]; /* 0x094 */ f32 exitAngle; - /* 0x098 */ struct Vec3f playerPos; + /* 0x098 */ Vec3f playerPos; /* 0x0A4 */ f32 playerYaw; /* 0x0A8 */ s8 unk_A8; /* 0x0A9 */ s8 unk_A9; @@ -942,8 +942,8 @@ typedef struct PartnerAnimations { typedef struct Shadow { /* 0x00 */ s32 flags; /* 0x04 */ char unk_04[12]; - /* 0x10 */ struct Vec3f position; - /* 0x1C */ struct Vec3f scale; + /* 0x10 */ Vec3f position; + /* 0x1C */ Vec3f scale; /* 0x28 */ char unk_28[80]; } Shadow; // size = 0x78 @@ -1005,13 +1005,13 @@ typedef struct ActorPart { /* 0x10 */ struct ActorPartMovement* movement; /* 0x14 */ s16 partOffset[3]; /* 0x1A */ s16 visualOffset[3]; - /* 0x20 */ struct Vec3f partOffsetFloat; - /* 0x2C */ struct Vec3f absolutePosition; - /* 0x38 */ struct Vec3f rotation; + /* 0x20 */ Vec3f partOffsetFloat; + /* 0x2C */ Vec3f absolutePosition; + /* 0x38 */ Vec3f rotation; /* 0x44 */ s16 rotationPivotOffset[3]; /* 0x4A */ char unk_4A[2]; /* 0x4C */ f32 scale[3]; - /* 0x58 */ struct Vec3f currentPos; + /* 0x58 */ Vec3f currentPos; /* 0x64 */ f32 yaw; /* 0x68 */ s16 unkOffset[2]; /* 0x6C */ s16 targetOffset[2]; @@ -1142,14 +1142,14 @@ typedef struct Encounter { typedef struct PlayerPathElement { /* 0x00 */ char unk_00[4]; - /* 0x04 */ struct Vec3f pos; + /* 0x04 */ Vec3f pos; } PlayerPathElement; // size = 0x10 typedef struct AnimatedModel { /* 0x00 */ s32 animModelID; - /* 0x04 */ struct Vec3f pos; /* Created by retype action */ - /* 0x10 */ struct Vec3f rot; - /* 0x1C */ struct Vec3f scale; + /* 0x04 */ Vec3f pos; /* Created by retype action */ + /* 0x10 */ Vec3f rot; + /* 0x1C */ Vec3f scale; /* 0x28 */ struct Matrix4s* mtx; /* 0x2C */ char unk_2C[60]; /* 0x68 */ u32 currentAnimData; @@ -1182,9 +1182,9 @@ typedef struct Actor { /* 0x000 */ s32 flags; /* 0x004 */ char unk_04[4]; /* 0x008 */ struct StaticActorData* staticActorData; - /* 0x00C */ struct Vec3f moveCurrentPos; - /* 0x018 */ struct Vec3f moveGoalPos; - /* 0x024 */ struct Vec3f moveEndPos; /* where other actors should target this one at. saved before partner switching */ + /* 0x00C */ Vec3f moveCurrentPos; + /* 0x018 */ Vec3f moveGoalPos; + /* 0x024 */ Vec3f moveEndPos; /* where other actors should target this one at. saved before partner switching */ /* 0x030 */ char unk_30[24]; /* 0x048 */ f32 jumpAccel; /* 0x04C */ f32 moveSpeed; @@ -1202,9 +1202,9 @@ typedef struct Actor { /* 0x077 */ u8 jumpPartIndex; /* 0x078 */ char unk_78[16]; /* 0x088 */ s32 varTable[16]; - /* 0x0C8 */ struct Vec3f flyCurrentPos; - /* 0x0D4 */ struct Vec3f flyGoalPos; - /* 0x0E0 */ struct Vec3f flyTempPos; /* used for start in fly functions, end in flyrun functions */ + /* 0x0C8 */ Vec3f flyCurrentPos; + /* 0x0D4 */ Vec3f flyGoalPos; + /* 0x0E0 */ Vec3f flyTempPos; /* used for start in fly functions, end in flyrun functions */ /* 0x0EC */ char unk_EC[24]; /* 0x104 */ f32 flyJumpAccel; /* 0x108 */ f32 flySpeed; @@ -1219,8 +1219,8 @@ typedef struct Actor { /* 0x135 */ u8 footStepCounter; /* 0x136 */ u8 actorType; /* 0x137 */ char unk_137; - /* 0x138 */ struct Vec3f homePos; - /* 0x144 */ struct Vec3f currentPos; + /* 0x138 */ Vec3f homePos; + /* 0x144 */ Vec3f currentPos; /* 0x150 */ Vec3s headOffset; /* 0x156 */ s16 healthBarPosition[3]; /* 0x15C */ f32 rotation[3]; @@ -1382,8 +1382,8 @@ typedef struct PlayerStatus { /* 0x014 */ s8 enableCollisionOverlapsCheck; /* 0x015 */ s8 statusMenuCounterinputEnabledCounter; /* whether the C-up menu can appear */ /* 0x016 */ Vec3s lastGoodPosition; - /* 0x01C */ struct Vec3f extraVelocity; - /* 0x028 */ struct Vec3f position; + /* 0x01C */ Vec3f extraVelocity; + /* 0x028 */ Vec3f position; /* 0x034 */ char unk_34[16]; /* 0x044 */ f32 decorationPos[2]; /* 0x04C */ char unk_4C[4]; @@ -1501,4 +1501,14 @@ typedef struct SaveData { /* 0x1304 */ char unk_1304[0x7C]; } SaveData; // size = 0x1380 +typedef struct { + /* 0x00 */ s32 numVectors; + /* 0x04 */ s32 unk_04; + /* 0x08 */ Vec3f* staticVectorList; + /* 0x0C */ Vec3f* vectors; + /* 0x10 */ s32 timeElapsed; + /* 0x14 */ s32 timeLeft; + /* 0x18 */ s32 easingType; +} Path; // size = 0x1C + #endif diff --git a/src/code_f8f60_len_1560.c b/src/code_f8f60_len_1560.c index 92191c1926..a369e6073a 100644 --- a/src/code_f8f60_len_1560.c +++ b/src/code_f8f60_len_1560.c @@ -351,7 +351,27 @@ INCLUDE_ASM(s32, "code_f8f60_len_1560", setup_path_data); INCLUDE_ASM(s32, "code_f8f60_len_1560", func_802D5270); -INCLUDE_ASM(s32, "code_f8f60_len_1560", LoadPath, ScriptInstance* script, s32 isInitialCall); +s32 LoadPath(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 time = get_variable(script, *args++); + s32 vectorList = get_variable(script, *args++); + s32 numVectors = get_variable(script, *args++); + s32 easingType = get_variable(script, *args++); + Path* path = heap_malloc(sizeof(Path)); + + script->varTable[15] = path; + path->numVectors = numVectors; + path->unk_04 = heap_malloc(numVectors * sizeof(f32)); + path->staticVectorList = vectorList; + path->vectors = heap_malloc(numVectors * sizeof(Vec3f)); + setup_path_data(path->numVectors, path->unk_04, path->staticVectorList, path->vectors); + + path->timeElapsed = 0; + path->timeLeft = time - 1; + path->easingType = easingType; + + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_f8f60_len_1560", GetNextPathPos, ScriptInstance* script, s32 isInitialCall); From 0fb1e1ab307819a076de7c853bea188475b089cc Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 29 Oct 2020 16:58:34 -0400 Subject: [PATCH 36/78] :dog: --- Makefile | 6 +- asm/nonmatchings/code_FBE10/func_802D7CF8.s | 72 --------------------- include/variables.h | 1 + src/code_FBE10.c | 22 ++++++- tools/symbol_addrs.txt | 1 + undefined_syms.txt | 2 + 6 files changed, 28 insertions(+), 76 deletions(-) delete mode 100644 asm/nonmatchings/code_FBE10/func_802D7CF8.s diff --git a/Makefile b/Makefile index f838e6f178..0bb9ba311e 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,7 @@ CPP := cpp LD := $(CROSS)ld OBJCOPY := $(CROSS)objcopy -CPPFLAGS := -Iinclude -Isrc -D _LANGUAGE_C -ffreestanding -DF3DEX_GBI_2 -D_MIPS_SZLONG=32 -Wundef -Wcomment +CPPFLAGS := -Iinclude -Isrc -D _LANGUAGE_C -ffreestanding -DF3DEX_GBI_2 -D_MIPS_SZLONG=32 -Wundef -Wcomment -MP -MD ASFLAGS := -EB -Iinclude -march=vr4300 -mtune=vr4300 OLDASFLAGS := -EB -Iinclude -G 0 CFLAGS := -O2 -quiet -G 0 -mcpu=vr4300 -mfix4300 -mips3 -mgp32 -mfp32 -Wimplicit -Wuninitialized -Wshadow @@ -133,12 +133,12 @@ $(BUILD_DIR)/%.Yay0.o: $(BUILD_DIR)/%.bin.Yay0 # Compile C files $(BUILD_DIR)/%.c.o: %.c $(BUILD_DIR)/%.d @mkdir -p $(shell dirname $@) - $(CPP) $(CPPFLAGS) -MP -MD -o - $< -MF $@.mk -MT $(BUILD_DIR)/$*.d | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - + $(CPP) $(CPPFLAGS) -o - $< -MF $@.mk -MT $(BUILD_DIR)/$*.d | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - # Compile C files (with DSL macros) $(foreach cfile, $(DSL_C_FILES), $(BUILD_DIR)/$(cfile).o): $(BUILD_DIR)/%.c.o: %.c $(BUILD_DIR)/%.d @mkdir -p $(shell dirname $@) - $(CPP) $(CPPFLAGS) -MP -MD -o - $< -MF $@.mk -MT $(BUILD_DIR)/$*.d | tools/compile_dsl_macros.py | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - + $(CPP) $(CPPFLAGS) -o - $< -MF $@.mk -MT $(BUILD_DIR)/$*.d | tools/compile_dsl_macros.py | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ - # Assemble handwritten ASM $(BUILD_DIR)/%.s.o: %.s diff --git a/asm/nonmatchings/code_FBE10/func_802D7CF8.s b/asm/nonmatchings/code_FBE10/func_802D7CF8.s deleted file mode 100644 index 508e87c920..0000000000 --- a/asm/nonmatchings/code_FBE10/func_802D7CF8.s +++ /dev/null @@ -1,72 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D7CF8 -/* FC6A8 802D7CF8 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* FC6AC 802D7CFC AFB10014 */ sw $s1, 0x14($sp) -/* FC6B0 802D7D00 0080882D */ daddu $s1, $a0, $zero -/* FC6B4 802D7D04 AFBF002C */ sw $ra, 0x2c($sp) -/* FC6B8 802D7D08 AFB60028 */ sw $s6, 0x28($sp) -/* FC6BC 802D7D0C AFB50024 */ sw $s5, 0x24($sp) -/* FC6C0 802D7D10 AFB40020 */ sw $s4, 0x20($sp) -/* FC6C4 802D7D14 AFB3001C */ sw $s3, 0x1c($sp) -/* FC6C8 802D7D18 AFB20018 */ sw $s2, 0x18($sp) -/* FC6CC 802D7D1C AFB00010 */ sw $s0, 0x10($sp) -/* FC6D0 802D7D20 8E30000C */ lw $s0, 0xc($s1) -/* FC6D4 802D7D24 8E050000 */ lw $a1, ($s0) -/* FC6D8 802D7D28 0C0B1EAF */ jal get_variable -/* FC6DC 802D7D2C 26100004 */ addiu $s0, $s0, 4 -/* FC6E0 802D7D30 8E050000 */ lw $a1, ($s0) -/* FC6E4 802D7D34 26100004 */ addiu $s0, $s0, 4 -/* FC6E8 802D7D38 0220202D */ daddu $a0, $s1, $zero -/* FC6EC 802D7D3C 0C0B1EAF */ jal get_variable -/* FC6F0 802D7D40 0040B02D */ daddu $s6, $v0, $zero -/* FC6F4 802D7D44 8E050000 */ lw $a1, ($s0) -/* FC6F8 802D7D48 26100004 */ addiu $s0, $s0, 4 -/* FC6FC 802D7D4C 0220202D */ daddu $a0, $s1, $zero -/* FC700 802D7D50 0C0B1EAF */ jal get_variable -/* FC704 802D7D54 0040A82D */ daddu $s5, $v0, $zero -/* FC708 802D7D58 8E050000 */ lw $a1, ($s0) -/* FC70C 802D7D5C 26100004 */ addiu $s0, $s0, 4 -/* FC710 802D7D60 0220202D */ daddu $a0, $s1, $zero -/* FC714 802D7D64 0C0B1EAF */ jal get_variable -/* FC718 802D7D68 0040A02D */ daddu $s4, $v0, $zero -/* FC71C 802D7D6C 8E050000 */ lw $a1, ($s0) -/* FC720 802D7D70 26100004 */ addiu $s0, $s0, 4 -/* FC724 802D7D74 0220202D */ daddu $a0, $s1, $zero -/* FC728 802D7D78 0C0B1EAF */ jal get_variable -/* FC72C 802D7D7C 0040982D */ daddu $s3, $v0, $zero -/* FC730 802D7D80 8E050000 */ lw $a1, ($s0) -/* FC734 802D7D84 26100004 */ addiu $s0, $s0, 4 -/* FC738 802D7D88 0220202D */ daddu $a0, $s1, $zero -/* FC73C 802D7D8C 0C0B1EAF */ jal get_variable -/* FC740 802D7D90 0040902D */ daddu $s2, $v0, $zero -/* FC744 802D7D94 0220202D */ daddu $a0, $s1, $zero -/* FC748 802D7D98 8E050000 */ lw $a1, ($s0) -/* FC74C 802D7D9C 0C0B1EAF */ jal get_variable -/* FC750 802D7DA0 0040882D */ daddu $s1, $v0, $zero -/* FC754 802D7DA4 3C04802E */ lui $a0, 0x802e -/* FC758 802D7DA8 24849D50 */ addiu $a0, $a0, -0x62b0 -/* FC75C 802D7DAC 24050001 */ addiu $a1, $zero, 1 -/* FC760 802D7DB0 0040802D */ daddu $s0, $v0, $zero -/* FC764 802D7DB4 0C0B0CF8 */ jal start_script -/* FC768 802D7DB8 0000302D */ daddu $a2, $zero, $zero -/* FC76C 802D7DBC 0040182D */ daddu $v1, $v0, $zero -/* FC770 802D7DC0 AC760084 */ sw $s6, 0x84($v1) -/* FC774 802D7DC4 AC750088 */ sw $s5, 0x88($v1) -/* FC778 802D7DC8 AC74008C */ sw $s4, 0x8c($v1) -/* FC77C 802D7DCC AC730090 */ sw $s3, 0x90($v1) -/* FC780 802D7DD0 AC720094 */ sw $s2, 0x94($v1) -/* FC784 802D7DD4 AC710098 */ sw $s1, 0x98($v1) -/* FC788 802D7DD8 AC70009C */ sw $s0, 0x9c($v1) -/* FC78C 802D7DDC 8FBF002C */ lw $ra, 0x2c($sp) -/* FC790 802D7DE0 8FB60028 */ lw $s6, 0x28($sp) -/* FC794 802D7DE4 8FB50024 */ lw $s5, 0x24($sp) -/* FC798 802D7DE8 8FB40020 */ lw $s4, 0x20($sp) -/* FC79C 802D7DEC 8FB3001C */ lw $s3, 0x1c($sp) -/* FC7A0 802D7DF0 8FB20018 */ lw $s2, 0x18($sp) -/* FC7A4 802D7DF4 8FB10014 */ lw $s1, 0x14($sp) -/* FC7A8 802D7DF8 8FB00010 */ lw $s0, 0x10($sp) -/* FC7AC 802D7DFC 24020002 */ addiu $v0, $zero, 2 -/* FC7B0 802D7E00 03E00008 */ jr $ra -/* FC7B4 802D7E04 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/include/variables.h b/include/variables.h index ccdc405f99..1adaf1c1ef 100644 --- a/include/variables.h +++ b/include/variables.h @@ -164,5 +164,6 @@ extern s32 mapScriptLibVram; extern Bytecode* SCRIPT_NpcDefeat; extern Bytecode* ShakeCam1; extern Bytecode* ShakeCamX; +extern Bytecode* D_802D9D50; #endif diff --git a/src/code_FBE10.c b/src/code_FBE10.c index 559197088e..c2ee2333cc 100644 --- a/src/code_FBE10.c +++ b/src/code_FBE10.c @@ -67,7 +67,27 @@ ApiStatus func_802D7B74(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "code_FBE10", func_802D7BA4); -INCLUDE_ASM(s32, "code_FBE10", func_802D7CF8); +ApiStatus func_802D7CF8(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 var0 = get_variable(script, *args++); + s32 var1 = get_variable(script, *args++); + s32 var2 = get_variable(script, *args++); + s32 var3 = get_variable(script, *args++); + s32 var4 = get_variable(script, *args++); + s32 var5 = get_variable(script, *args++); + s32 var6 = get_variable(script, *args++); + ScriptInstance* newScript = start_script(&D_802D9D50, 1, 0); + + newScript->varTable[0] = var0; + newScript->varTable[1] = var1; + newScript->varTable[2] = var2; + newScript->varTable[3] = var3; + newScript->varTable[4] = var4; + newScript->varTable[5] = var5; + newScript->varTable[6] = var6; + + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_FBE10", func_802D7E08); diff --git a/tools/symbol_addrs.txt b/tools/symbol_addrs.txt index 57d0da9329..b78c0e7827 100644 --- a/tools/symbol_addrs.txt +++ b/tools/symbol_addrs.txt @@ -1897,3 +1897,4 @@ gSpeakingActorPart;0x8029FA78 EnterWalk;0x80285960 EnemyNpcHit;0x80077F70 EnemyNpcDefeat;0x8007809C +D_802D9D50;0x802D9D50 diff --git a/undefined_syms.txt b/undefined_syms.txt index 6f335270e1..1574ba51ba 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -214,6 +214,8 @@ gWorldDynamicEntityList = 0x801543A0; gBattleDynamicEntityList = 0x801543E0; gCurrentDynamicEntityListPtr = 0x80154420; +D_802D9D50 = 0x802D9D50; + gScriptIndexList = 0x802DA898; gScriptIdList = 0x802DAA98; gScriptListCount = 0x802DAC98; From c1df09dba870bf4412d71371c5e506624a0e1081 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Thu, 29 Oct 2020 21:35:59 +0000 Subject: [PATCH 37/78] match some cursed funcs + cleanup --- .../code_28910_len_5090/func_8004DA0C.s | 33 ----------------- .../code_303c0_len_3e10/func_800559C4.s | 11 ------ include/variables.h | 2 +- src/code_28910_len_5090.c | 36 +++++++++++++++++-- src/code_28910_len_5090.h | 22 ++++++++++++ src/code_2e230_len_2190.c | 8 +++-- src/code_2e230_len_2190.h | 17 +++++++++ src/code_303c0_len_3e10.c | 4 ++- src/code_e0b30_len_b80.c | 15 ++++---- 9 files changed, 90 insertions(+), 58 deletions(-) delete mode 100644 asm/nonmatchings/code_28910_len_5090/func_8004DA0C.s delete mode 100644 asm/nonmatchings/code_303c0_len_3e10/func_800559C4.s create mode 100644 src/code_28910_len_5090.h create mode 100644 src/code_2e230_len_2190.h diff --git a/asm/nonmatchings/code_28910_len_5090/func_8004DA0C.s b/asm/nonmatchings/code_28910_len_5090/func_8004DA0C.s deleted file mode 100644 index 823f6ef476..0000000000 --- a/asm/nonmatchings/code_28910_len_5090/func_8004DA0C.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8004DA0C -/* 28E0C 8004DA0C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 28E10 8004DA10 AFB10014 */ sw $s1, 0x14($sp) -/* 28E14 8004DA14 0080882D */ daddu $s1, $a0, $zero -/* 28E18 8004DA18 AFB00010 */ sw $s0, 0x10($sp) -/* 28E1C 8004DA1C 0000802D */ daddu $s0, $zero, $zero -/* 28E20 8004DA20 1220000D */ beqz $s1, .L8004DA58 -/* 28E24 8004DA24 AFBF0018 */ sw $ra, 0x18($sp) -/* 28E28 8004DA28 0C0135E5 */ jal func_8004D794 -/* 28E2C 8004DA2C 00000000 */ nop -/* 28E30 8004DA30 0040202D */ daddu $a0, $v0, $zero -/* 28E34 8004DA34 50800009 */ beql $a0, $zero, .L8004DA5C -/* 28E38 8004DA38 24100002 */ addiu $s0, $zero, 2 -/* 28E3C 8004DA3C 8C82001C */ lw $v0, 0x1c($a0) -/* 28E40 8004DA40 16220007 */ bne $s1, $v0, .L8004DA60 -/* 28E44 8004DA44 0200102D */ daddu $v0, $s0, $zero -/* 28E48 8004DA48 0C0136AA */ jal func_8004DAA8 -/* 28E4C 8004DA4C 00000000 */ nop -/* 28E50 8004DA50 08013698 */ j .L8004DA60 -/* 28E54 8004DA54 0200102D */ daddu $v0, $s0, $zero -.L8004DA58: -/* 28E58 8004DA58 24100003 */ addiu $s0, $zero, 3 -.L8004DA5C: -/* 28E5C 8004DA5C 0200102D */ daddu $v0, $s0, $zero -.L8004DA60: -/* 28E60 8004DA60 8FBF0018 */ lw $ra, 0x18($sp) -/* 28E64 8004DA64 8FB10014 */ lw $s1, 0x14($sp) -/* 28E68 8004DA68 8FB00010 */ lw $s0, 0x10($sp) -/* 28E6C 8004DA6C 03E00008 */ jr $ra -/* 28E70 8004DA70 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_800559C4.s b/asm/nonmatchings/code_303c0_len_3e10/func_800559C4.s deleted file mode 100644 index c0e9dfc395..0000000000 --- a/asm/nonmatchings/code_303c0_len_3e10/func_800559C4.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_800559C4 -/* 30DC4 800559C4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 30DC8 800559C8 AFBF0010 */ sw $ra, 0x10($sp) -/* 30DCC 800559CC 0C013683 */ jal func_8004DA0C -/* 30DD0 800559D0 00000000 */ nop -/* 30DD4 800559D4 8FBF0010 */ lw $ra, 0x10($sp) -/* 30DD8 800559D8 03E00008 */ jr $ra -/* 30DDC 800559DC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/include/variables.h b/include/variables.h index 0d6ce235df..d892d99244 100644 --- a/include/variables.h +++ b/include/variables.h @@ -167,6 +167,6 @@ extern s16 gMusicUnkVolume; extern s16 gMusicUnkVolume2; extern s16 gMusicCurrentVolume; extern s16 gMusicTargetVolume; -extern MusicPlayer gMusicPlayers[]; +extern MusicPlayer gMusicPlayers[]; // TODO: how many? #endif diff --git a/src/code_28910_len_5090.c b/src/code_28910_len_5090.c index 9ea3bbb779..62fe271554 100644 --- a/src/code_28910_len_5090.c +++ b/src/code_28910_len_5090.c @@ -1,4 +1,4 @@ -#include "common.h" +#include "code_28910_len_5090.h" INCLUDE_ASM(s32, "code_28910_len_5090", func_8004D510); @@ -6,11 +6,41 @@ INCLUDE_ASM(s32, "code_28910_len_5090", func_8004D794); INCLUDE_ASM(s32, "code_28910_len_5090", func_8004D7E0); -INCLUDE_ASM(s32, "code_28910_len_5090", func_8004DA0C); +s32 func_8004DA0C(UNK_TYPE arg0) { + s32 ret = 0; + + if (arg0 != 0) { + UnkStructFor8004DAA8* unknown; + + do { + unknown = func_8004D794(); + } while (0); + + do { + if (unknown == NULL) { + ret = 2; + } else if (arg0 == unknown->unk_01C) { + func_8004DAA8(unknown); + ret = 0; + } + } while (0); + } else { + ret = 3; + } + + return ret; +} INCLUDE_ASM(s32, "code_28910_len_5090", func_8004DA74); -INCLUDE_ASM(s32, "code_28910_len_5090", func_8004DAA8); +void func_8004DAA8(UnkStructFor8004DAA8 *arg0) { + if (arg0->unk_221 != 0) { + arg0->unk_221 = 4; + arg0->unk_010 = 1; + arg0->unk_008 = 1; + func_80053A18(&arg0->unk_02C); + } +} INCLUDE_ASM(s32, "code_28910_len_5090", func_8004DAE0); diff --git a/src/code_28910_len_5090.h b/src/code_28910_len_5090.h new file mode 100644 index 0000000000..1aa5bb7712 --- /dev/null +++ b/src/code_28910_len_5090.h @@ -0,0 +1,22 @@ +#ifndef _CODE_28910_LEN_5090_H_ +#define _CODE_28910_LEN_5090_H_ + +#include "common.h" +#include "code_2e230_len_2190.h" + +typedef struct { + /* 0x000 */ char unk_000[8]; + /* 0x008 */ s32 unk_008; + /* 0x00C */ char unk_00C[4]; + /* 0x010 */ s32 unk_010; + /* 0x014 */ char unk_014[8]; + /* 0x01C */ UNK_TYPE unk_01C; + /* 0x020 */ char unk_020[0xC]; + /* 0x02C */ UnkStructFor80053A18 unk_02C; + /* 0x03C */ char unk_03C[0x1E5]; + /* 0x221 */ u8 unk_221; +} UnkStructFor8004DAA8; // size unknown + +void func_8004DAA8(UnkStructFor8004DAA8* arg0); + +#endif diff --git a/src/code_2e230_len_2190.c b/src/code_2e230_len_2190.c index 7716dc523f..d97c70f1b3 100644 --- a/src/code_2e230_len_2190.c +++ b/src/code_2e230_len_2190.c @@ -1,4 +1,4 @@ -#include "common.h" +#include "code_2e230_len_2190.h" INCLUDE_ASM(s32, "code_2e230_len_2190", func_80052E30); @@ -24,7 +24,11 @@ INCLUDE_ASM(s32, "code_2e230_len_2190", func_800538F8); INCLUDE_ASM(s32, "code_2e230_len_2190", func_80053974); -INCLUDE_ASM(s32, "code_2e230_len_2190", func_80053A18); +void func_80053A18(UnkStructFor80053A18* arg0) { + arg0->unk_0A = 0; + arg0->unk_04 = 0; + arg0->unk_0C = 0; +} INCLUDE_ASM(s32, "code_2e230_len_2190", func_80053A28); diff --git a/src/code_2e230_len_2190.h b/src/code_2e230_len_2190.h new file mode 100644 index 0000000000..5b3dc33da0 --- /dev/null +++ b/src/code_2e230_len_2190.h @@ -0,0 +1,17 @@ +#ifndef _CODE_2E230_LEN_2190_H_ +#define _CODE_2E230_LEN_2190_H_ + +#include "common.h" + +// Probably some libultra audio thing +typedef struct UnkStructFor80053A18 { + /* 0x00 */ UNK_TYPE unk_00; + /* 0x04 */ s32 unk_04; + /* 0x08 */ char unk_08[2]; + /* 0x0A */ u16 unk_0A; + /* 0x0C */ s32 unk_0C; +} UnkStructFor80053A18; // size unknown + +void func_80053A18(UnkStructFor80053A18* arg0); + +#endif diff --git a/src/code_303c0_len_3e10.c b/src/code_303c0_len_3e10.c index 357c8a3faf..0fb5eb1c82 100644 --- a/src/code_303c0_len_3e10.c +++ b/src/code_303c0_len_3e10.c @@ -70,7 +70,9 @@ INCLUDE_ASM(s32, "code_303c0_len_3e10", func_8005591C); INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055970); -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_800559C4); +s32 func_800559C4(UNK_TYPE arg0) { + return func_8004DA0C(arg0); +} INCLUDE_ASM(s32, "code_303c0_len_3e10", func_800559E0); diff --git a/src/code_e0b30_len_b80.c b/src/code_e0b30_len_b80.c index f186d032a8..f7be58427b 100644 --- a/src/code_e0b30_len_b80.c +++ b/src/code_e0b30_len_b80.c @@ -19,7 +19,8 @@ s32 _set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime if (gameStatus->demoState != 0) { return 1; } else { - MusicPlayer* musicPlayers = &gMusicPlayers; + // TODO: these two lines likely a MUSIC_PLAYER(idx) macro + MusicPlayer* musicPlayers = gMusicPlayers; MusicPlayer* musicPlayer = &musicPlayers[playerIndex]; if (!gameStatus->musicEnabled) { @@ -57,7 +58,7 @@ s32 _set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime } s32 set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume) { - MusicPlayer* musicPlayers = &gMusicPlayers; + MusicPlayer* musicPlayers = gMusicPlayers; musicPlayers[playerIndex].flags &= ~8; @@ -70,7 +71,7 @@ s32 func_8014A964(s32 playerIndex, s32 songID, s32 variation, s32 fadeInTime, s1 if (gameStatus->demoState != 0) { return 1; } else { - MusicPlayer* musicPlayers = &gMusicPlayers; + MusicPlayer* musicPlayers = gMusicPlayers; MusicPlayer* musicPlayer = &musicPlayers[playerIndex]; if (!gameStatus->musicEnabled) { @@ -99,7 +100,7 @@ s32 func_8014A964(s32 playerIndex, s32 songID, s32 variation, s32 fadeInTime, s1 } s32 func_8014AA54(s32 playerIndex, s32 arg1, s16 arg2) { - MusicPlayer* musicPlayers = &gMusicPlayers; + MusicPlayer* musicPlayers = gMusicPlayers; MusicPlayer* musicPlayer = &musicPlayers[playerIndex]; if (!(musicPlayer->flags & 1)) { @@ -126,7 +127,7 @@ s32 func_8014AA54(s32 playerIndex, s32 arg1, s16 arg2) { } s32 func_8014AB0C(s32 playerIndex, s16 arg1) { - MusicPlayer* musicPlayers = &gMusicPlayers; + MusicPlayer* musicPlayers = gMusicPlayers; MusicPlayer* musicPlayer = &musicPlayers[playerIndex]; if (!(musicPlayer->flags & 1)) { @@ -137,7 +138,7 @@ s32 func_8014AB0C(s32 playerIndex, s16 arg1) { } s32 func_8014AB60(s32 playerIndex, s16 arg1) { - MusicPlayer* musicPlayers = &gMusicPlayers; + MusicPlayer* musicPlayers = gMusicPlayers; MusicPlayer* musicPlayer = &musicPlayers[playerIndex]; if (!(musicPlayer->flags & 1)) { @@ -148,7 +149,7 @@ s32 func_8014AB60(s32 playerIndex, s16 arg1) { } s32 func_8014ABB4(s32 playerIndex, s16 arg1) { - MusicPlayer* musicPlayers = &gMusicPlayers; + MusicPlayer* musicPlayers = gMusicPlayers; MusicPlayer* musicPlayer = &musicPlayers[playerIndex]; if (!(musicPlayer->flags & 1)) { From db1ee14d8f90d431a9d7b597421bb7e287c958f8 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Thu, 29 Oct 2020 22:41:43 +0000 Subject: [PATCH 38/78] match get_song_variation_override_for_cur_map This was previously called get_default_variation_for_song, but its more of an override than a default. --- .../code_28910_len_5090/func_8004DAA8.s | 19 ---------- .../code_2e230_len_2190/func_80053A18.s | 8 ---- .../get_default_variation_for_song.s | 32 ---------------- include/enums.h | 2 +- include/map.h | 38 ++++++++++++++++++- src/code_e0b30_len_b80.c | 38 +++++++++++++++---- tools/symbol_addrs.txt | 2 + undefined_syms.txt | 3 ++ 8 files changed, 72 insertions(+), 70 deletions(-) delete mode 100644 asm/nonmatchings/code_28910_len_5090/func_8004DAA8.s delete mode 100644 asm/nonmatchings/code_2e230_len_2190/func_80053A18.s delete mode 100644 asm/nonmatchings/code_e0b30_len_b80/get_default_variation_for_song.s diff --git a/asm/nonmatchings/code_28910_len_5090/func_8004DAA8.s b/asm/nonmatchings/code_28910_len_5090/func_8004DAA8.s deleted file mode 100644 index 5f5c5bc996..0000000000 --- a/asm/nonmatchings/code_28910_len_5090/func_8004DAA8.s +++ /dev/null @@ -1,19 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8004DAA8 -/* 28EA8 8004DAA8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 28EAC 8004DAAC AFBF0010 */ sw $ra, 0x10($sp) -/* 28EB0 8004DAB0 90820221 */ lbu $v0, 0x221($a0) -/* 28EB4 8004DAB4 10400007 */ beqz $v0, .L8004DAD4 -/* 28EB8 8004DAB8 24020004 */ addiu $v0, $zero, 4 -/* 28EBC 8004DABC A0820221 */ sb $v0, 0x221($a0) -/* 28EC0 8004DAC0 24020001 */ addiu $v0, $zero, 1 -/* 28EC4 8004DAC4 AC820010 */ sw $v0, 0x10($a0) -/* 28EC8 8004DAC8 AC820008 */ sw $v0, 8($a0) -/* 28ECC 8004DACC 0C014E86 */ jal func_80053A18 -/* 28ED0 8004DAD0 2484002C */ addiu $a0, $a0, 0x2c -.L8004DAD4: -/* 28ED4 8004DAD4 8FBF0010 */ lw $ra, 0x10($sp) -/* 28ED8 8004DAD8 03E00008 */ jr $ra -/* 28EDC 8004DADC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_2e230_len_2190/func_80053A18.s b/asm/nonmatchings/code_2e230_len_2190/func_80053A18.s deleted file mode 100644 index 6c3a79075d..0000000000 --- a/asm/nonmatchings/code_2e230_len_2190/func_80053A18.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80053A18 -/* 2EE18 80053A18 A480000A */ sh $zero, 0xa($a0) -/* 2EE1C 80053A1C AC800004 */ sw $zero, 4($a0) -/* 2EE20 80053A20 03E00008 */ jr $ra -/* 2EE24 80053A24 AC80000C */ sw $zero, 0xc($a0) diff --git a/asm/nonmatchings/code_e0b30_len_b80/get_default_variation_for_song.s b/asm/nonmatchings/code_e0b30_len_b80/get_default_variation_for_song.s deleted file mode 100644 index 4a660c6f77..0000000000 --- a/asm/nonmatchings/code_e0b30_len_b80/get_default_variation_for_song.s +++ /dev/null @@ -1,32 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel get_default_variation_for_song -/* E0B30 8014A430 0000302D */ daddu $a2, $zero, $zero -/* E0B34 8014A434 3C078009 */ lui $a3, 0x8009 -/* E0B38 8014A438 24E734F0 */ addiu $a3, $a3, 0x34f0 -/* E0B3C 8014A43C 3C038007 */ lui $v1, %hi(gGameStatusPtr) -/* E0B40 8014A440 2463419C */ addiu $v1, $v1, %lo(gGameStatusPtr) -/* E0B44 8014A444 3C058015 */ lui $a1, 0x8015 -/* E0B48 8014A448 24A5F720 */ addiu $a1, $a1, -0x8e0 -.L8014A44C: -/* E0B4C 8014A44C 8CA20000 */ lw $v0, ($a1) -/* E0B50 8014A450 1444000C */ bne $v0, $a0, .L8014A484 -/* E0B54 8014A454 24C60001 */ addiu $a2, $a2, 1 -/* E0B58 8014A458 8C630000 */ lw $v1, ($v1) -/* E0B5C 8014A45C 84620086 */ lh $v0, 0x86($v1) -/* E0B60 8014A460 8463008C */ lh $v1, 0x8c($v1) -/* E0B64 8014A464 00021100 */ sll $v0, $v0, 4 -/* E0B68 8014A468 00471021 */ addu $v0, $v0, $a3 -/* E0B6C 8014A46C 8C420004 */ lw $v0, 4($v0) -/* E0B70 8014A470 00031940 */ sll $v1, $v1, 5 -/* E0B74 8014A474 00431021 */ addu $v0, $v0, $v1 -/* E0B78 8014A478 9042001E */ lbu $v0, 0x1e($v0) -/* E0B7C 8014A47C 03E00008 */ jr $ra -/* E0B80 8014A480 30420001 */ andi $v0, $v0, 1 -.L8014A484: -/* E0B84 8014A484 2CC20006 */ sltiu $v0, $a2, 6 -/* E0B88 8014A488 1440FFF0 */ bnez $v0, .L8014A44C -/* E0B8C 8014A48C 24A50004 */ addiu $a1, $a1, 4 -/* E0B90 8014A490 03E00008 */ jr $ra -/* E0B94 8014A494 2402FFFF */ addiu $v0, $zero, -1 diff --git a/include/enums.h b/include/enums.h index 8b669f3116..4669f119bf 100644 --- a/include/enums.h +++ b/include/enums.h @@ -260,7 +260,7 @@ typedef UNK_TYPE SpriteId; #define SpriteId_PARADE_TWINK 0x000000E8 #define SpriteId_LEAF 0x000000E9 -typedef UNK_TYPE Song; +typedef s32 SongID; #define Song_TOAD_TOWN 0x00000000 #define Song_NORMAL_BATTLE 0x00000002 #define Song_SPECIAL_BATTLE 0x00000003 diff --git a/include/map.h b/include/map.h index 594850b6f6..f40c65c2b9 100644 --- a/include/map.h +++ b/include/map.h @@ -13,12 +13,19 @@ typedef Vec4f EntryList[]; +/// Fields other than main, entryList, entryCount, background, and tattle are initialised when the map loads. typedef struct MapConfig { - /* 0x00 */ char unk_00[0x10]; + /* 0x00 */ ModelNode* modelTreeRoot; + /* 0x04 */ UNK_PTR collision; + /* 0x08 */ char unk_08[8]; /* 0x10 */ Script* main; /* 0x14 */ EntryList* entryList; /* 0x18 */ s32 entryCount; - /* 0x1C */ char unk_1C[0x1C]; + /* 0x1C */ char unk_1C[12]; + /* 0x28 */ char** modelNameList; + /* 0x2C */ char** colliderNameList; + /* 0x30 */ char** zoneNameList; + /* 0x34 */ char unk_34[4]; /* 0x38 */ BackgroundHeader* background; /* 0x3C */ union { MessageID msgID; @@ -26,6 +33,26 @@ typedef struct MapConfig { } tattle; } MapConfig; // size = 0x40 +#define MAP_ID_MAX_LEN 7 ///< "xxx_yyy" excluding null terminator. +typedef struct Map { + /* 0x00 */ char* id; ///< @see MAP_ID_MAX_LEN + /* 0x04 */ MapConfig* config; + /* 0x08 */ void* dmaStart; + /* 0x0C */ void* dmaEnd; + /* 0x10 */ void* dmaDest; + /* 0x14 */ char* bgName; + /* 0x18 */ s32 (*init)(void); ///< Return TRUE to skip normal asset (shape/hit/bg/tex) loading. + /* 0x1C */ s16 flags1; + /* 0x1E */ s8 flags2; + /* 0x1F */ s8 flags3; +} Map; // size = 0x20 + +typedef struct Area { + /* 0x00 */ s32 mapCount; + /* 0x04 */ Map* maps; + /* 0x08 */ char* id; ///< "area_xxx" + /* 0x0C */ char* name; ///< JP debug name. +} Area; // size = 0x10 typedef struct NpcAISettings { /* 0x00 */ f32 moveSpeed; /* 0x04 */ s32 moveTime; @@ -218,4 +245,11 @@ typedef struct { Enemy* get_enemy(NpcId npcId); +/// Zero-terminated. +extern Area gAreas[]; + +/// Lists the songs that are forced to use the variation determined by `map.flags2 & 1`. +/// @see get_song_variation_override_for_cur_map +extern SongID gSongsUsingVariationFlag[6]; + #endif diff --git a/src/code_e0b30_len_b80.c b/src/code_e0b30_len_b80.c index f7be58427b..bd04bf4db9 100644 --- a/src/code_e0b30_len_b80.c +++ b/src/code_e0b30_len_b80.c @@ -1,8 +1,30 @@ #include "common.h" +#include "map.h" void func_8014AC84(s16 volume); -INCLUDE_ASM(s32, "code_e0b30_len_b80", get_default_variation_for_song); +/// If the given song ID is present in gSongsUsingVariationFlag, returns the current +/// map's `flags2 & 1` value. Otherwise, returns -1. +/// +/// @see gSongsUsingVariationFlag +/// @returns -1: no override; 0: override to variation 0; 1 override to variation 1 +s32 get_song_variation_override_for_cur_map(SongID songID) { + u32 i = 0; + Area* areas = gAreas; + SongID* allowed = gSongsUsingVariationFlag; + GameStatus** gameStatusPtr = gGameStatusPtr; + + for (i = 0; i < ARRAY_COUNT(gSongsUsingVariationFlag); i++) { + if (allowed[i] == songID) { + GameStatus* gameStatus = *gameStatusPtr; + Map* map = &areas[gameStatus->areaID].maps[gameStatus->mapID]; + + return map->flags2 & 1; + } + } + + return -1; +} INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014A498); @@ -13,7 +35,7 @@ void func_8014A52C(void) { INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014A548); -s32 _set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume) { +s32 _set_music_track(s32 playerIndex, SongID songID, s32 variation, s32 fadeOutTime, s16 volume) { GameStatus* gameStatus = GAME_STATUS; if (gameStatus->demoState != 0) { @@ -29,9 +51,9 @@ s32 _set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime return 1; } else { - s32 defaultVariation = get_default_variation_for_song(songID); - if (defaultVariation >= 0) { - variation = defaultVariation; + s32 override = get_song_variation_override_for_cur_map(songID); + if (override >= 0) { + variation = override; } if (musicPlayer->songID == songID && musicPlayer->variation == variation) { @@ -57,7 +79,7 @@ s32 _set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime } } -s32 set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume) { +s32 set_music_track(s32 playerIndex, SongID songID, s32 variation, s32 fadeOutTime, s16 volume) { MusicPlayer* musicPlayers = gMusicPlayers; musicPlayers[playerIndex].flags &= ~8; @@ -65,7 +87,7 @@ s32 set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, return _set_music_track(playerIndex, songID, variation, fadeOutTime, volume); } -s32 func_8014A964(s32 playerIndex, s32 songID, s32 variation, s32 fadeInTime, s16 arg4, s16 arg5) { +s32 func_8014A964(s32 playerIndex, SongID songID, s32 variation, s32 fadeInTime, s16 arg4, s16 arg5) { GameStatus* gameStatus = GAME_STATUS; if (gameStatus->demoState != 0) { @@ -80,7 +102,7 @@ s32 func_8014A964(s32 playerIndex, s32 songID, s32 variation, s32 fadeInTime, s1 return 1; } else { - s32 defaultVariation = get_default_variation_for_song(songID); + s32 defaultVariation = get_song_variation_override_for_cur_map(songID); if (defaultVariation >= 0) { variation = defaultVariation; } diff --git a/tools/symbol_addrs.txt b/tools/symbol_addrs.txt index 27ca6bc9e6..a82b45a98d 100644 --- a/tools/symbol_addrs.txt +++ b/tools/symbol_addrs.txt @@ -1904,3 +1904,5 @@ gMusicUnkVolume;0x80159AE0 gMusicUnkVolume2;0x80159AE4 gMusicTargetVolume;0x80159AE2 gMusicCurVolume;0x80159AE6 +gAreas;0x800934F0 +gSongArray;0x8014F720 diff --git a/undefined_syms.txt b/undefined_syms.txt index 0442c35f66..cf1496998c 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -267,3 +267,6 @@ EnemyNpcDefeat = 0x8007809C; D_80078DB0 = 0x80078DB0; D_80078DB4 = 0x80078DB4; + +gAreas = 0x800934F0; +gSongsUsingVariationFlag = 0x8014F720; From 484fba8d4d62b7e5e0feb2f06cbe6893bb9f8e03 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Thu, 29 Oct 2020 22:42:34 +0000 Subject: [PATCH 39/78] name transition_music_volume_to --- .../code_e0b30_len_b80/func_8014A548.s | 28 +++++++++---------- src/code_e0b30_len_b80.c | 6 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/asm/nonmatchings/code_e0b30_len_b80/func_8014A548.s b/asm/nonmatchings/code_e0b30_len_b80/func_8014A548.s index 5c779984ab..c9dbd5c772 100644 --- a/asm/nonmatchings/code_e0b30_len_b80/func_8014A548.s +++ b/asm/nonmatchings/code_e0b30_len_b80/func_8014A548.s @@ -27,7 +27,7 @@ glabel func_8014A548 /* E0C9C 8014A59C 00220821 */ addu $at, $at, $v0 /* E0CA0 8014A5A0 8C221290 */ lw $v0, 0x1290($at) /* E0CA4 8014A5A4 00400008 */ jr $v0 -/* E0CA8 8014A5A8 00000000 */ nop +/* E0CA8 8014A5A8 00000000 */ nop /* E0CAC 8014A5AC 96230000 */ lhu $v1, ($s1) /* E0CB0 8014A5B0 30620001 */ andi $v0, $v1, 1 /* E0CB4 8014A5B4 1040001D */ beqz $v0, .L8014A62C @@ -37,24 +37,24 @@ glabel func_8014A548 /* E0CC4 8014A5C4 1040000B */ beqz $v0, .L8014A5F4 /* E0CC8 8014A5C8 30620004 */ andi $v0, $v1, 4 /* E0CCC 8014A5CC 14400005 */ bnez $v0, .L8014A5E4 -/* E0CD0 8014A5D0 00000000 */ nop +/* E0CD0 8014A5D0 00000000 */ nop /* E0CD4 8014A5D4 0C015671 */ jal func_800559C4 /* E0CD8 8014A5D8 8E040016 */ lw $a0, 0x16($s0) /* E0CDC 8014A5DC 08052987 */ j .L8014A61C -/* E0CE0 8014A5E0 00000000 */ nop +/* E0CE0 8014A5E0 00000000 */ nop .L8014A5E4: /* E0CE4 8014A5E4 0C0156BC */ jal func_80055AF0 /* E0CE8 8014A5E8 8E040016 */ lw $a0, 0x16($s0) /* E0CEC 8014A5EC 08052987 */ j .L8014A61C -/* E0CF0 8014A5F0 00000000 */ nop +/* E0CF0 8014A5F0 00000000 */ nop .L8014A5F4: /* E0CF4 8014A5F4 14400006 */ bnez $v0, .L8014A610 -/* E0CF8 8014A5F8 00000000 */ nop +/* E0CF8 8014A5F8 00000000 */ nop /* E0CFC 8014A5FC 8E040016 */ lw $a0, 0x16($s0) /* E0D00 8014A600 0C0156AF */ jal func_80055ABC /* E0D04 8014A604 0000302D */ daddu $a2, $zero, $zero /* E0D08 8014A608 08052987 */ j .L8014A61C -/* E0D0C 8014A60C 00000000 */ nop +/* E0D0C 8014A60C 00000000 */ nop .L8014A610: /* E0D10 8014A610 8E040016 */ lw $a0, 0x16($s0) /* E0D14 8014A614 0C0156EE */ jal func_80055BB8 @@ -82,7 +82,7 @@ glabel func_8014A548 /* E0D5C 8014A65C A6220000 */ sh $v0, ($s1) /* E0D60 8014A660 8E040016 */ lw $a0, 0x16($s0) /* E0D64 8014A664 0C01567F */ jal func_800559FC -/* E0D68 8014A668 00000000 */ nop +/* E0D68 8014A668 00000000 */ nop /* E0D6C 8014A66C 5440004D */ bnel $v0, $zero, .L8014A7A4 /* E0D70 8014A670 26520001 */ addiu $s2, $s2, 1 /* E0D74 8014A674 96220000 */ lhu $v0, ($s1) @@ -100,7 +100,7 @@ glabel func_8014A548 /* E0DA4 8014A6A4 30620010 */ andi $v0, $v1, 0x10 /* E0DA8 8014A6A8 8E04000E */ lw $a0, 0xe($s0) /* E0DAC 8014A6AC 04810003 */ bgez $a0, .L8014A6BC -/* E0DB0 8014A6B0 00000000 */ nop +/* E0DB0 8014A6B0 00000000 */ nop /* E0DB4 8014A6B4 080529E8 */ j .L8014A7A0 /* E0DB8 8014A6B8 A6000000 */ sh $zero, ($s0) .L8014A6BC: @@ -113,7 +113,7 @@ glabel func_8014A548 /* E0DD4 8014A6D4 96220000 */ lhu $v0, ($s1) /* E0DD8 8014A6D8 30420020 */ andi $v0, $v0, 0x20 /* E0DDC 8014A6DC 1040000C */ beqz $v0, .L8014A710 -/* E0DE0 8014A6E0 00000000 */ nop +/* E0DE0 8014A6E0 00000000 */ nop /* E0DE4 8014A6E4 8602000C */ lh $v0, 0xc($s0) /* E0DE8 8014A6E8 8607000A */ lh $a3, 0xa($s0) /* E0DEC 8014A6EC AFA20010 */ sw $v0, 0x10($sp) @@ -128,8 +128,8 @@ glabel func_8014A548 .L8014A710: /* E0E10 8014A710 3C048016 */ lui $a0, 0x8016 /* E0E14 8014A714 84849AE0 */ lh $a0, -0x6520($a0) -/* E0E18 8014A718 0C052B21 */ jal func_8014AC84 -/* E0E1C 8014A71C 00000000 */ nop +/* E0E18 8014A718 0C052B21 */ jal transition_music_volume_to +/* E0E1C 8014A71C 00000000 */ nop .L8014A720: /* E0E20 8014A720 8E040016 */ lw $a0, 0x16($s0) /* E0E24 8014A724 0C01565C */ jal func_80055970 @@ -143,7 +143,7 @@ glabel func_8014A548 /* E0E44 8014A744 A6000000 */ sh $zero, ($s0) .L8014A748: /* E0E48 8014A748 10400005 */ beqz $v0, .L8014A760 -/* E0E4C 8014A74C 00000000 */ nop +/* E0E4C 8014A74C 00000000 */ nop /* E0E50 8014A750 A6000000 */ sh $zero, ($s0) /* E0E54 8014A754 96220000 */ lhu $v0, ($s1) /* E0E58 8014A758 080529E7 */ j .L8014A79C @@ -151,7 +151,7 @@ glabel func_8014A548 .L8014A760: /* E0E60 8014A760 8E04002A */ lw $a0, 0x2a($s0) /* E0E64 8014A764 0C0156CA */ jal func_80055B28 -/* E0E68 8014A768 00000000 */ nop +/* E0E68 8014A768 00000000 */ nop /* E0E6C 8014A76C 5440000D */ bnel $v0, $zero, .L8014A7A4 /* E0E70 8014A770 26520001 */ addiu $s2, $s2, 1 /* E0E74 8014A774 8E020022 */ lw $v0, 0x22($s0) @@ -174,7 +174,7 @@ glabel func_8014A548 /* E0EAC 8014A7AC 1440FF75 */ bnez $v0, .L8014A584 /* E0EB0 8014A7B0 26310030 */ addiu $s1, $s1, 0x30 /* E0EB4 8014A7B4 0C052B25 */ jal func_8014AC94 -/* E0EB8 8014A7B8 00000000 */ nop +/* E0EB8 8014A7B8 00000000 */ nop /* E0EBC 8014A7BC 8FBF0030 */ lw $ra, 0x30($sp) /* E0EC0 8014A7C0 8FB5002C */ lw $s5, 0x2c($sp) /* E0EC4 8014A7C4 8FB40028 */ lw $s4, 0x28($sp) diff --git a/src/code_e0b30_len_b80.c b/src/code_e0b30_len_b80.c index bd04bf4db9..1aff819a74 100644 --- a/src/code_e0b30_len_b80.c +++ b/src/code_e0b30_len_b80.c @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -void func_8014AC84(s16 volume); +void transition_music_volume_to(s16 volume); /// If the given song ID is present in gSongsUsingVariationFlag, returns the current /// map's `flags2 & 1` value. Otherwise, returns -1. @@ -57,7 +57,7 @@ s32 _set_music_track(s32 playerIndex, SongID songID, s32 variation, s32 fadeOutT } if (musicPlayer->songID == songID && musicPlayer->variation == variation) { - func_8014AC84(volume); // transition volume to? + transition_music_volume_to(volume); if (musicPlayer->flags & 4) { func_80055B80(musicPlayer->unk_18); @@ -196,7 +196,7 @@ void func_8014AC70(void) { gMusicUnkVolume2 = 8; } -void func_8014AC84(s16 volume) { +void transition_music_volume_to(s16 volume) { gMusicTargetVolume = volume; } From 9193d0a4ca81622ec1e13c303240af88c31af152 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 29 Oct 2020 19:23:22 -0400 Subject: [PATCH 40/78] PR comments --- src/code_F5750.c | 50 +++++++++++++++++++++++++----------------------- src/code_FBE10.c | 2 +- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/src/code_F5750.c b/src/code_F5750.c index e473f39c32..6e1ee4993a 100644 --- a/src/code_F5750.c +++ b/src/code_F5750.c @@ -125,26 +125,26 @@ ApiStatus SetPlayerAnimationSpeed(ScriptInstance* script, s32 isInitialCall) { ApiStatus PlayerMoveTo(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerStatus* playerStatus = PLAYER_STATUS; - f32 var0; - f32 var1; - f32 moveSpeed; if (isInitialCall) { - var1 = get_variable(script, *args++); - var0 = get_variable(script, *args++); + f32 targetX = get_variable(script, *args++); + f32 targetZ = get_variable(script, *args++); + f32 moveSpeed; + script->functionTemp[0].s = get_variable(script, *args++); - playerStatus->targetYaw = atan2(playerStatus->position.x, playerStatus->position.z, var1, var0); + playerStatus->targetYaw = atan2(playerStatus->position.x, playerStatus->position.z, targetX, targetZ); if (script->functionTemp[0].s == 0) { - script->functionTemp[0].s = (dist2D(playerStatus->position.x, playerStatus->position.z, var1, - var0) / gPlayerNpcPtr->moveSpeed); + script->functionTemp[0].s = dist2D(playerStatus->position.x, playerStatus->position.z, targetX, + targetZ) / gPlayerNpcPtr->moveSpeed; moveSpeed = gPlayerNpcPtr->moveSpeed; } else { - moveSpeed = dist2D(playerStatus->position.x, playerStatus->position.z, var1, var0) / script->functionTemp[0].s; + moveSpeed = dist2D(playerStatus->position.x, playerStatus->position.z, targetX, targetZ) / script->functionTemp[0].s; } move_player(script->functionTemp[0].s, playerStatus->targetYaw, moveSpeed); } + // functionTemp 0 is the time left script->functionTemp[0].s--; return script->functionTemp[0].s < 0; } @@ -170,41 +170,43 @@ void PlayerJump2(ScriptInstance* script, s32 isInitialCall) { ApiStatus InterpPlayerYaw(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerStatus* playerStatus = PLAYER_STATUS; - f32* t1 = &script->functionTemp[1].f; - f32* t2 = &script->functionTemp[2].f; - s32* t3 = &script->functionTemp[3].s; + f32* initialYaw = &script->functionTemp[1].f; + f32* deltaYaw = &script->functionTemp[2].f; + s32* time = &script->functionTemp[3].s; if (isInitialCall) { Npc** player = &gPlayerNpcPtr; (*player)->yaw = playerStatus->targetYaw; - *t1 = (*player)->yaw; - *t2 = get_float_variable(script, *args++) - *t1; - *t3 = get_variable(script, *args++); + *initialYaw = (*player)->yaw; + *deltaYaw = get_float_variable(script, *args++) - *initialYaw; + *time = get_variable(script, *args++); (*player)->duration = 0; - if (*t2 < -180.0f) { - *t2 += 360.0f; + if (*deltaYaw < -180.0f) { + *deltaYaw += 360.0f; } - if (*t2 > 180.0f) { - *t2 -= 360.0f; + if (*deltaYaw > 180.0f) { + *deltaYaw -= 360.0f; } } - if (*t3 > 0) { + if (*time > 0) { Npc** player = &gPlayerNpcPtr; (*player)->duration++; - (*player)->yaw = *t1 + ((*t2 * (*player)->duration) / *t3); + (*player)->yaw = *initialYaw + ((*deltaYaw * (*player)->duration) / *time); (*player)->yaw = clamp_angle((*player)->yaw); playerStatus->targetYaw = (*player)->yaw; - return ((*player)->duration < *t3) ^ 1; + + return !((*player)->duration < *time); } else { Npc** player = &gPlayerNpcPtr; - (*player)->yaw += *t2; - (*player)->yaw = clamp_angle((*player)->yaw);; + (*player)->yaw += *deltaYaw; + (*player)->yaw = clamp_angle((*player)->yaw); playerStatus->targetYaw = (*player)->yaw; + return ApiStatus_DONE2; } } diff --git a/src/code_FBE10.c b/src/code_FBE10.c index c2ee2333cc..4b8ec5e185 100644 --- a/src/code_FBE10.c +++ b/src/code_FBE10.c @@ -67,7 +67,7 @@ ApiStatus func_802D7B74(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "code_FBE10", func_802D7BA4); -ApiStatus func_802D7CF8(ScriptInstance* script, s32 isInitialCall) { +ApiStatus Spawn802D9D50(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 var0 = get_variable(script, *args++); s32 var1 = get_variable(script, *args++); From e8ba79a88c5e2d52bc34bc3e0bff98e1ee37fc11 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 29 Oct 2020 19:27:23 -0400 Subject: [PATCH 41/78] PR comment ;( --- src/code_FBE10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/code_FBE10.c b/src/code_FBE10.c index 4b8ec5e185..374adb7b5c 100644 --- a/src/code_FBE10.c +++ b/src/code_FBE10.c @@ -76,8 +76,8 @@ ApiStatus Spawn802D9D50(ScriptInstance* script, s32 isInitialCall) { s32 var4 = get_variable(script, *args++); s32 var5 = get_variable(script, *args++); s32 var6 = get_variable(script, *args++); - ScriptInstance* newScript = start_script(&D_802D9D50, 1, 0); + ScriptInstance* newScript = start_script(&D_802D9D50, 1, 0); newScript->varTable[0] = var0; newScript->varTable[1] = var1; newScript->varTable[2] = var2; From cce065d5299e257be21b0ea609d82bf35c70c313 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Thu, 29 Oct 2020 23:52:24 +0000 Subject: [PATCH 42/78] badly match func_8014A498 --- include/variables.h | 3 ++- src/code_e0b30_len_b80.c | 16 +++++++++++++++- tools/symbol_addrs.txt | 2 +- undefined_syms.txt | 3 ++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/include/variables.h b/include/variables.h index d892d99244..753be45c0d 100644 --- a/include/variables.h +++ b/include/variables.h @@ -167,6 +167,7 @@ extern s16 gMusicUnkVolume; extern s16 gMusicUnkVolume2; extern s16 gMusicCurrentVolume; extern s16 gMusicTargetVolume; -extern MusicPlayer gMusicPlayers[]; // TODO: how many? +extern MusicPlayer gMusicPlayers[4]; +extern MusicPlayer D_8014F6F0; #endif diff --git a/src/code_e0b30_len_b80.c b/src/code_e0b30_len_b80.c index 1aff819a74..0b81071ac3 100644 --- a/src/code_e0b30_len_b80.c +++ b/src/code_e0b30_len_b80.c @@ -26,7 +26,21 @@ s32 get_song_variation_override_for_cur_map(SongID songID) { return -1; } -INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014A498); +//INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014A498); +void func_8014A498(void) { + MusicPlayer* src; + s32 i; + + for (i = 0; i < 2; i++) { + MusicPlayer *musicPlayers = gMusicPlayers; + musicPlayers[i] = *(src = &D_8014F6F0); + } + + gMusicTargetVolume = 8; + gMusicUnkVolume2 = 8; + gMusicCurrentVolume = 8; + func_800561A4(8); +} void func_8014A52C(void) { gMusicTargetVolume = 8; diff --git a/tools/symbol_addrs.txt b/tools/symbol_addrs.txt index a82b45a98d..a88c409173 100644 --- a/tools/symbol_addrs.txt +++ b/tools/symbol_addrs.txt @@ -1903,6 +1903,6 @@ gMusicPlayers;0x80159AF0 gMusicUnkVolume;0x80159AE0 gMusicUnkVolume2;0x80159AE4 gMusicTargetVolume;0x80159AE2 -gMusicCurVolume;0x80159AE6 +gMusicCurrentVolume;0x80159AE6 gAreas;0x800934F0 gSongArray;0x8014F720 diff --git a/undefined_syms.txt b/undefined_syms.txt index cf1496998c..fa88c9a7e9 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -182,8 +182,9 @@ D_801595A0 = 0x801595A0; gMusicUnkVolume = 0x80159AE0; gMusicTargetVolume = 0x80159AE2; gMusicUnkVolume2 = 0x80159AE4; -gMusicCurVolume = 0x80159AE6; +gMusicCurrentVolume = 0x80159AE6; gMusicPlayers = 0x80159AF0; +D_8014F6F0 = 0x8014F6F0; gCollisionStatus = 0x8015A550; D_8015C7C0 = 0x8015C7C0; From 0f4b4f8db073e16ecdf8a31006460875af742f1c Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Fri, 30 Oct 2020 00:01:11 +0000 Subject: [PATCH 43/78] add comment about .data --- src/code_e0b30_len_b80.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/code_e0b30_len_b80.c b/src/code_e0b30_len_b80.c index 0b81071ac3..c9a96443c1 100644 --- a/src/code_e0b30_len_b80.c +++ b/src/code_e0b30_len_b80.c @@ -26,9 +26,8 @@ s32 get_song_variation_override_for_cur_map(SongID songID) { return -1; } -//INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014A498); void func_8014A498(void) { - MusicPlayer* src; + MusicPlayer* src; // TODO: remove this temp when .data section for this file (incl. D_8014F6F0) is set up s32 i; for (i = 0; i < 2; i++) { From f94c542a9df21329a66da13f0310ee9bd07d681a Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 29 Oct 2020 22:15:51 -0400 Subject: [PATCH 44/78] Set80151310_0 --- .../dro_01/95B7E0/func_8024159C_95C79C.s | 8 ---- .../dro_02/9694C0/func_8024042C_9695EC.s | 8 ---- .../hos_03/A1BDB0/func_802425D0_A1D6D0.s | 8 ---- .../jan_02/B2C8A0/func_80241740_B2DBB0.s | 8 ---- .../jan_03/B34BD0/func_80241CC8_B36898.s | 8 ---- .../kmr_02/8B0070/func_802404BC_8B052C.s | 8 ---- .../mac_00/7EB340/func_8024075C_7EB46C.s | 8 ---- .../mac_01/800880/func_80240000_800880.s | 21 ----------- .../mac_01/800880/func_80240044_8008C4.s | 37 ------------------- .../mac_01/8017D0/func_8024203C_8028BC.s | 8 ---- .../mac_01/8017D0/func_80243AA0_804320.s | 6 --- .../mac_02/823BF0/func_802418EC_824BAC.s | 8 ---- .../mac_03/831B20/func_802405DC_831DDC.s | 8 ---- .../mac_04/843030/func_8024058C_84315C.s | 8 ---- .../mac_05/852170/func_8024144C_8535BC.s | 8 ---- .../nok_01/9C53E0/func_80240E94_9C6274.s | 8 ---- .../nok_02/9D7AA0/func_80241A3C_9D8A5C.s | 8 ---- .../sam_01/CF7E80/func_8024082C_CF839C.s | 8 ---- .../sam_02/D05F60/func_80240C58_D06388.s | 8 ---- .../sam_11/D3A930/func_80240554_D3AB24.s | 8 ---- .../sam_11/D3ADA0/func_802408FC_D3AECC.s | 8 ---- include/common_structs.h | 2 +- include/functions.h | 2 +- src/code_7E2AA0.c | 1 + src/code_b72b0_len_15ed0.c | 2 +- src/world/area_dro/dro_01/95B7E0.c | 2 +- src/world/area_dro/dro_02/9694C0.c | 2 +- src/world/area_hos/hos_03/A1BDB0.c | 2 +- src/world/area_jan/jan_02/B2C8A0.c | 2 +- src/world/area_jan/jan_03/B34BD0.c | 2 +- src/world/area_kmr/kmr_02/8B0070.c | 2 +- src/world/area_mac/mac_00/7EB340.c | 2 +- src/world/area_mac/mac_01/800880.c | 16 +++++++- src/world/area_mac/mac_01/8017D0.c | 6 ++- src/world/area_mac/mac_02/823BF0.c | 2 +- src/world/area_mac/mac_03/831B20.c | 2 +- src/world/area_mac/mac_04/843030.c | 2 +- src/world/area_mac/mac_05/852170.c | 2 +- src/world/area_nok/nok_01/9C53E0.c | 2 +- src/world/area_nok/nok_02/9D7AA0.c | 2 +- src/world/area_sam/sam_01/CF7E80.c | 2 +- src/world/area_sam/sam_02/D05F60.c | 2 +- src/world/area_sam/sam_11/D3A930.c | 2 +- src/world/area_sam/sam_11/D3ADA0.c | 2 +- src/world/common/Set80151310_0.inc.c | 6 +++ 45 files changed, 45 insertions(+), 232 deletions(-) delete mode 100644 asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_8024159C_95C79C.s delete mode 100644 asm/nonmatchings/world/area_dro/dro_02/9694C0/func_8024042C_9695EC.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802425D0_A1D6D0.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80241740_B2DBB0.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241CC8_B36898.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802404BC_8B052C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024075C_7EB46C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/800880/func_80240000_800880.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/800880/func_80240044_8008C4.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_8024203C_8028BC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243AA0_804320.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802418EC_824BAC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_03/831B20/func_802405DC_831DDC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_04/843030/func_8024058C_84315C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_05/852170/func_8024144C_8535BC.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240E94_9C6274.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80241A3C_9D8A5C.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024082C_CF839C.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240C58_D06388.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240554_D3AB24.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802408FC_D3AECC.s create mode 100644 src/world/common/Set80151310_0.inc.c diff --git a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_8024159C_95C79C.s b/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_8024159C_95C79C.s deleted file mode 100644 index a09e694f23..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_8024159C_95C79C.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024159C_95C79C -/* 95C79C 8024159C 3C018015 */ lui $at, %hi(D_80151310) -/* 95C7A0 802415A0 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 95C7A4 802415A4 03E00008 */ jr $ra -/* 95C7A8 802415A8 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_8024042C_9695EC.s b/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_8024042C_9695EC.s deleted file mode 100644 index 67a3458f14..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_8024042C_9695EC.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024042C_9695EC -/* 9695EC 8024042C 3C018015 */ lui $at, %hi(D_80151310) -/* 9695F0 80240430 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 9695F4 80240434 03E00008 */ jr $ra -/* 9695F8 80240438 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802425D0_A1D6D0.s b/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802425D0_A1D6D0.s deleted file mode 100644 index 67421acd62..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802425D0_A1D6D0.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802425D0_A1D6D0 -/* A1D6D0 802425D0 3C018015 */ lui $at, %hi(D_80151310) -/* A1D6D4 802425D4 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* A1D6D8 802425D8 03E00008 */ jr $ra -/* A1D6DC 802425DC 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80241740_B2DBB0.s b/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80241740_B2DBB0.s deleted file mode 100644 index 25e083dfc7..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80241740_B2DBB0.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241740_B2DBB0 -/* B2DBB0 80241740 3C018015 */ lui $at, %hi(D_80151310) -/* B2DBB4 80241744 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* B2DBB8 80241748 03E00008 */ jr $ra -/* B2DBBC 8024174C 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241CC8_B36898.s b/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241CC8_B36898.s deleted file mode 100644 index 4d608bced3..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241CC8_B36898.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241CC8_B36898 -/* B36898 80241CC8 3C018015 */ lui $at, %hi(D_80151310) -/* B3689C 80241CCC AC201310 */ sw $zero, %lo(D_80151310)($at) -/* B368A0 80241CD0 03E00008 */ jr $ra -/* B368A4 80241CD4 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802404BC_8B052C.s b/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802404BC_8B052C.s deleted file mode 100644 index 1d8f1385f5..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802404BC_8B052C.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802404BC_8B052C -/* 8B052C 802404BC 3C018015 */ lui $at, %hi(D_80151310) -/* 8B0530 802404C0 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 8B0534 802404C4 03E00008 */ jr $ra -/* 8B0538 802404C8 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024075C_7EB46C.s b/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024075C_7EB46C.s deleted file mode 100644 index ab1858da37..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024075C_7EB46C.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024075C_7EB46C -/* 7EB46C 8024075C 3C018015 */ lui $at, %hi(D_80151310) -/* 7EB470 80240760 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 7EB474 80240764 03E00008 */ jr $ra -/* 7EB478 80240768 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_01/800880/func_80240000_800880.s b/asm/nonmatchings/world/area_mac/mac_01/800880/func_80240000_800880.s deleted file mode 100644 index 00ed9945be..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/800880/func_80240000_800880.s +++ /dev/null @@ -1,21 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_800880 -/* 800880 80240000 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 800884 80240004 AFBF0010 */ sw $ra, 0x10($sp) -/* 800888 80240008 8C82000C */ lw $v0, 0xc($a0) -/* 80088C 8024000C 0C0B1EAF */ jal get_variable -/* 800890 80240010 8C450000 */ lw $a1, ($v0) -/* 800894 80240014 3C038007 */ lui $v1, %hi(gGameStatusPtr) -/* 800898 80240018 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) -/* 80089C 8024001C 8C630140 */ lw $v1, 0x140($v1) -/* 8008A0 80240020 00021100 */ sll $v0, $v0, 4 -/* 8008A4 80240024 00431021 */ addu $v0, $v0, $v1 -/* 8008A8 80240028 8C440000 */ lw $a0, ($v0) -/* 8008AC 8024002C 0C04D052 */ jal set_item_entity_flags -/* 8008B0 80240030 24050040 */ addiu $a1, $zero, 0x40 -/* 8008B4 80240034 8FBF0010 */ lw $ra, 0x10($sp) -/* 8008B8 80240038 24020002 */ addiu $v0, $zero, 2 -/* 8008BC 8024003C 03E00008 */ jr $ra -/* 8008C0 80240040 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_01/800880/func_80240044_8008C4.s b/asm/nonmatchings/world/area_mac/mac_01/800880/func_80240044_8008C4.s deleted file mode 100644 index feadb69b5c..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/800880/func_80240044_8008C4.s +++ /dev/null @@ -1,37 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240044_8008C4 -/* 8008C4 80240044 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 8008C8 80240048 AFBF0018 */ sw $ra, 0x18($sp) -/* 8008CC 8024004C AFB10014 */ sw $s1, 0x14($sp) -/* 8008D0 80240050 AFB00010 */ sw $s0, 0x10($sp) -/* 8008D4 80240054 8C82000C */ lw $v0, 0xc($a0) -/* 8008D8 80240058 0C0B1EAF */ jal get_variable -/* 8008DC 8024005C 8C450000 */ lw $a1, ($v0) -/* 8008E0 80240060 0000202D */ daddu $a0, $zero, $zero -/* 8008E4 80240064 3C05FD05 */ lui $a1, 0xfd05 -/* 8008E8 80240068 34A50F82 */ ori $a1, $a1, 0xf82 -/* 8008EC 8024006C 0C0B1EAF */ jal get_variable -/* 8008F0 80240070 0040802D */ daddu $s0, $v0, $zero -/* 8008F4 80240074 3C038007 */ lui $v1, %hi(gGameStatusPtr) -/* 8008F8 80240078 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) -/* 8008FC 8024007C 24050040 */ addiu $a1, $zero, 0x40 -/* 800900 80240080 8C640140 */ lw $a0, 0x140($v1) -/* 800904 80240084 00101900 */ sll $v1, $s0, 4 -/* 800908 80240088 00641821 */ addu $v1, $v1, $a0 -/* 80090C 8024008C 8C640000 */ lw $a0, ($v1) -/* 800910 80240090 0C04D052 */ jal set_item_entity_flags -/* 800914 80240094 0040882D */ daddu $s1, $v0, $zero -/* 800918 80240098 0000202D */ daddu $a0, $zero, $zero -/* 80091C 8024009C 00108080 */ sll $s0, $s0, 2 -/* 800920 802400A0 02118021 */ addu $s0, $s0, $s1 -/* 800924 802400A4 8E050000 */ lw $a1, ($s0) -/* 800928 802400A8 0C0B2026 */ jal set_variable -/* 80092C 802400AC 24060001 */ addiu $a2, $zero, 1 -/* 800930 802400B0 8FBF0018 */ lw $ra, 0x18($sp) -/* 800934 802400B4 8FB10014 */ lw $s1, 0x14($sp) -/* 800938 802400B8 8FB00010 */ lw $s0, 0x10($sp) -/* 80093C 802400BC 24020002 */ addiu $v0, $zero, 2 -/* 800940 802400C0 03E00008 */ jr $ra -/* 800944 802400C4 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_8024203C_8028BC.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_8024203C_8028BC.s deleted file mode 100644 index d88bf7c134..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_8024203C_8028BC.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024203C_8028BC -/* 8028BC 8024203C 3C018015 */ lui $at, %hi(D_80151310) -/* 8028C0 80242040 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 8028C4 80242044 03E00008 */ jr $ra -/* 8028C8 80242048 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243AA0_804320.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243AA0_804320.s deleted file mode 100644 index 6db024c51e..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243AA0_804320.s +++ /dev/null @@ -1,6 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243AA0_804320 -/* 804320 80243AA0 03E00008 */ jr $ra -/* 804324 80243AA4 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802418EC_824BAC.s b/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802418EC_824BAC.s deleted file mode 100644 index f5aeb9f695..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802418EC_824BAC.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802418EC_824BAC -/* 824BAC 802418EC 3C018015 */ lui $at, %hi(D_80151310) -/* 824BB0 802418F0 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 824BB4 802418F4 03E00008 */ jr $ra -/* 824BB8 802418F8 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_802405DC_831DDC.s b/asm/nonmatchings/world/area_mac/mac_03/831B20/func_802405DC_831DDC.s deleted file mode 100644 index e57f03e92f..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_802405DC_831DDC.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802405DC_831DDC -/* 831DDC 802405DC 3C018015 */ lui $at, %hi(D_80151310) -/* 831DE0 802405E0 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 831DE4 802405E4 03E00008 */ jr $ra -/* 831DE8 802405E8 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_04/843030/func_8024058C_84315C.s b/asm/nonmatchings/world/area_mac/mac_04/843030/func_8024058C_84315C.s deleted file mode 100644 index 4a79b1c634..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_04/843030/func_8024058C_84315C.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024058C_84315C -/* 84315C 8024058C 3C018015 */ lui $at, %hi(D_80151310) -/* 843160 80240590 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 843164 80240594 03E00008 */ jr $ra -/* 843168 80240598 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_05/852170/func_8024144C_8535BC.s b/asm/nonmatchings/world/area_mac/mac_05/852170/func_8024144C_8535BC.s deleted file mode 100644 index fb3ec316b1..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_05/852170/func_8024144C_8535BC.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024144C_8535BC -/* 8535BC 8024144C 3C018015 */ lui $at, %hi(D_80151310) -/* 8535C0 80241450 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 8535C4 80241454 03E00008 */ jr $ra -/* 8535C8 80241458 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240E94_9C6274.s b/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240E94_9C6274.s deleted file mode 100644 index 1c38b3a255..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240E94_9C6274.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240E94_9C6274 -/* 9C6274 80240E94 3C018015 */ lui $at, %hi(D_80151310) -/* 9C6278 80240E98 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 9C627C 80240E9C 03E00008 */ jr $ra -/* 9C6280 80240EA0 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80241A3C_9D8A5C.s b/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80241A3C_9D8A5C.s deleted file mode 100644 index 37af635b84..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80241A3C_9D8A5C.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241A3C_9D8A5C -/* 9D8A5C 80241A3C 3C018015 */ lui $at, %hi(D_80151310) -/* 9D8A60 80241A40 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* 9D8A64 80241A44 03E00008 */ jr $ra -/* 9D8A68 80241A48 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024082C_CF839C.s b/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024082C_CF839C.s deleted file mode 100644 index 3aa0d280ba..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024082C_CF839C.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024082C_CF839C -/* CF839C 8024082C 3C018015 */ lui $at, %hi(D_80151310) -/* CF83A0 80240830 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* CF83A4 80240834 03E00008 */ jr $ra -/* CF83A8 80240838 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240C58_D06388.s b/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240C58_D06388.s deleted file mode 100644 index 478c4497ba..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240C58_D06388.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240C58_D06388 -/* D06388 80240C58 3C018015 */ lui $at, %hi(D_80151310) -/* D0638C 80240C5C AC201310 */ sw $zero, %lo(D_80151310)($at) -/* D06390 80240C60 03E00008 */ jr $ra -/* D06394 80240C64 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240554_D3AB24.s b/asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240554_D3AB24.s deleted file mode 100644 index 8fb3711d85..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240554_D3AB24.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240554_D3AB24 -/* D3AB24 80240554 3C018015 */ lui $at, %hi(D_80151310) -/* D3AB28 80240558 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* D3AB2C 8024055C 03E00008 */ jr $ra -/* D3AB30 80240560 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802408FC_D3AECC.s b/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802408FC_D3AECC.s deleted file mode 100644 index 602720afe0..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802408FC_D3AECC.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802408FC_D3AECC -/* D3AECC 802408FC 3C018015 */ lui $at, %hi(D_80151310) -/* D3AED0 80240900 AC201310 */ sw $zero, %lo(D_80151310)($at) -/* D3AED4 80240904 03E00008 */ jr $ra -/* D3AED8 80240908 24020002 */ addiu $v0, $zero, 2 diff --git a/include/common_structs.h b/include/common_structs.h index c2c2be9b11..a10f482c20 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -916,7 +916,7 @@ typedef struct GameStatus { /* 0x136 */ char unk_136[2]; /* 0x138 */ s32 nextRNG; /* 0x13C */ char unk_13C[4]; - /* 0x140 */ UNK_PTR shopItemData; + /* 0x140 */ s32* shopItemData; /* 0x144 */ struct Shop* mapShop; /* 0x148 */ s16 enableBackground; /* (bit 2 is also used for something) */ /* 0x14A */ s16 backgroundMinW; diff --git a/include/functions.h b/include/functions.h index c4333481bb..0b63c6b884 100644 --- a/include/functions.h +++ b/include/functions.h @@ -97,7 +97,7 @@ void make_item_entity_delayed(s32 itemID, f32 x, f32 y, f32 z, s32 unk1, s32 unk void set_item_entity_position(s32 itemEntityIndex, f32 x, f32 y, f32 z); ItemEntity* get_item_entity(s32 itemEntityIndex); s32 make_item_entity_nodelay(s32 itemID, f32 x, f32 y, f32 z, ItemSpawnMode itemSpawnMode, s32 pickupVar); - +void set_item_entity_flags(s32 itemEntityIndex, s32 flag); void set_cam_viewport(s16 id, s16 x, s16 y, s16 width, s16 height); diff --git a/src/code_7E2AA0.c b/src/code_7E2AA0.c index 7b711c0be3..339305f3b6 100644 --- a/src/code_7E2AA0.c +++ b/src/code_7E2AA0.c @@ -96,6 +96,7 @@ ApiStatus func_80282610(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } +// common probably ApiStatus func_80282624(ScriptInstance* script, s32 isInitialCall) { D_80151310 = 0; return ApiStatus_DONE2; diff --git a/src/code_b72b0_len_15ed0.c b/src/code_b72b0_len_15ed0.c index 035599feaf..32148743d3 100644 --- a/src/code_b72b0_len_15ed0.c +++ b/src/code_b72b0_len_15ed0.c @@ -232,7 +232,7 @@ INCLUDE_ASM(s32, "code_b72b0_len_15ed0", test_item_player_collision); INCLUDE_ASM(s32, "code_b72b0_len_15ed0", func_80133FC8); -INCLUDE_ASM(s32, "code_b72b0_len_15ed0", set_item_entity_flags); +INCLUDE_ASM(void, "code_b72b0_len_15ed0", set_item_entity_flags, s32 itemEntityIndex, s32 flag); INCLUDE_ASM(s32, "code_b72b0_len_15ed0", clear_item_entity_flags); diff --git a/src/world/area_dro/dro_01/95B7E0.c b/src/world/area_dro/dro_01/95B7E0.c index 5a3ae9fb82..07cc068199 100644 --- a/src/world/area_dro/dro_01/95B7E0.c +++ b/src/world/area_dro/dro_01/95B7E0.c @@ -30,7 +30,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80241470_95C670); INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80241588_95C788); -INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_8024159C_95C79C); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_802415AC_95C7AC); diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index 29d999086e..f1b83904dc 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80240300_9694C0); INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80240418_9695D8); -INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_8024042C_9695EC); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_8024043C_9695FC); diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index 3b7df30ad8..7cb60e96ea 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -52,7 +52,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802424A4_A1D5A4); INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802425BC_A1D6BC); -INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802425D0_A1D6D0); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802425E0_A1D6E0); diff --git a/src/world/area_jan/jan_02/B2C8A0.c b/src/world/area_jan/jan_02/B2C8A0.c index 6463b1417d..5e4e1bdb84 100644 --- a/src/world/area_jan/jan_02/B2C8A0.c +++ b/src/world/area_jan/jan_02/B2C8A0.c @@ -40,7 +40,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241614_B2DA84); INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_8024172C_B2DB9C); -INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241740_B2DBB0); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241750_B2DBC0); diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index 57041180db..24c7350a8c 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -84,7 +84,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241B9C_B3676C); INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241CB4_B36884); -INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241CC8_B36898); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241CD8_B368A8); diff --git a/src/world/area_kmr/kmr_02/8B0070.c b/src/world/area_kmr/kmr_02/8B0070.c index 9d942f4147..5a9849bd69 100644 --- a/src/world/area_kmr/kmr_02/8B0070.c +++ b/src/world/area_kmr/kmr_02/8B0070.c @@ -22,7 +22,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240390_8B0400); INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802404A8_8B0518); -INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802404BC_8B052C); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802404CC_8B053C); diff --git a/src/world/area_mac/mac_00/7EB340.c b/src/world/area_mac/mac_00/7EB340.c index 8417e2cb9a..658037b61e 100644 --- a/src/world/area_mac/mac_00/7EB340.c +++ b/src/world/area_mac/mac_00/7EB340.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80240630_7EB340); INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80240748_7EB458); -INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_8024075C_7EB46C); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_8024076C_7EB47C); diff --git a/src/world/area_mac/mac_01/800880.c b/src/world/area_mac/mac_01/800880.c index 775a7760db..308033f505 100644 --- a/src/world/area_mac/mac_01/800880.c +++ b/src/world/area_mac/mac_01/800880.c @@ -1,7 +1,19 @@ #include "mac_01.h" -INCLUDE_ASM(s32, "world/area_mac/mac_01/800880", func_80240000_800880); +ApiStatus func_80240000_800880(ScriptInstance* script, s32 isInitialCall) { + s32 itemIndex = get_variable(script, *script->ptrReadPos); -INCLUDE_ASM(s32, "world/area_mac/mac_01/800880", func_80240044_8008C4); + set_item_entity_flags(GAME_STATUS->shopItemData[itemIndex * 4], 0x40); + return ApiStatus_DONE2; +} + +ApiStatus func_80240044_8008C4(ScriptInstance* script, s32 isInitialCall) { + s32 itemIndex = get_variable(script, *script->ptrReadPos); + s32* var1 = get_variable(NULL, SI_MAP_VAR(2)); + + set_item_entity_flags(GAME_STATUS->shopItemData[itemIndex * 4], 0x40); + set_variable(NULL, var1[itemIndex], 1); + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "world/area_mac/mac_01/800880", func_802400C8_800948); diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index 5505145b5f..0e381f6894 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -32,7 +32,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80241F10_802790); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242028_8028A8); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_8024203C_8028BC); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_8024204C_8028CC); @@ -116,7 +116,9 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243A3C_8042BC); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243A70_8042F0); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243AA0_804320); +ApiStatus func_80243AA0_804320(ScriptInstance* script, s32 isInitialCall) { + return ApiStatus_DONE2; +} #include "world/common/GetNpcCollisionHeight.inc.c" diff --git a/src/world/area_mac/mac_02/823BF0.c b/src/world/area_mac/mac_02/823BF0.c index 21d7a537f0..ff42fb2076 100644 --- a/src/world/area_mac/mac_02/823BF0.c +++ b/src/world/area_mac/mac_02/823BF0.c @@ -30,7 +30,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802417C0_824A80); INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802418D8_824B98); -INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802418EC_824BAC); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802418FC_824BBC); diff --git a/src/world/area_mac/mac_03/831B20.c b/src/world/area_mac/mac_03/831B20.c index 9091489de7..7f58c90beb 100644 --- a/src/world/area_mac/mac_03/831B20.c +++ b/src/world/area_mac/mac_03/831B20.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802404B0_831CB0); INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802405C8_831DC8); -INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802405DC_831DDC); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802405EC_831DEC); diff --git a/src/world/area_mac/mac_04/843030.c b/src/world/area_mac/mac_04/843030.c index a2a0da5d38..bedafef124 100644 --- a/src/world/area_mac/mac_04/843030.c +++ b/src/world/area_mac/mac_04/843030.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240460_843030); INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240578_843148); -INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_8024058C_84315C); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_8024059C_84316C); diff --git a/src/world/area_mac/mac_05/852170.c b/src/world/area_mac/mac_05/852170.c index f6ae4a2a04..e9436ae700 100644 --- a/src/world/area_mac/mac_05/852170.c +++ b/src/world/area_mac/mac_05/852170.c @@ -38,7 +38,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241320_853490); INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241438_8535A8); -INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_8024144C_8535BC); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_8024145C_8535CC); diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index 3b6c77494e..da63e5ea1b 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -50,7 +50,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", delete_player_actor_9C6148); INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240E80_9C6260); -INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240E94_9C6274); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240EA4_9C6284); diff --git a/src/world/area_nok/nok_02/9D7AA0.c b/src/world/area_nok/nok_02/9D7AA0.c index ca0701e2b8..dd4613d90e 100644 --- a/src/world/area_nok/nok_02/9D7AA0.c +++ b/src/world/area_nok/nok_02/9D7AA0.c @@ -30,7 +30,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241910_9D8930); INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241A28_9D8A48); -INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241A3C_9D8A5C); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241A4C_9D8A6C); diff --git a/src/world/area_sam/sam_01/CF7E80.c b/src/world/area_sam/sam_01/CF7E80.c index 7f842bc9bd..78f0cd4ac7 100644 --- a/src/world/area_sam/sam_01/CF7E80.c +++ b/src/world/area_sam/sam_01/CF7E80.c @@ -18,7 +18,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80240700_CF8270); INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80240818_CF8388); -INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_8024082C_CF839C); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_8024083C_CF83AC); diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index 929ed9196e..8ddd53f427 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -30,7 +30,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240B2C_D0625C); INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240C44_D06374); -INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240C58_D06388); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240C68_D06398); diff --git a/src/world/area_sam/sam_11/D3A930.c b/src/world/area_sam/sam_11/D3A930.c index 2f47758e38..9496af1550 100644 --- a/src/world/area_sam/sam_11/D3A930.c +++ b/src/world/area_sam/sam_11/D3A930.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_8024052C_D3AAFC); INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_80240540_D3AB10); -INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_80240554_D3AB24); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_80240564_D3AB34); diff --git a/src/world/area_sam/sam_11/D3ADA0.c b/src/world/area_sam/sam_11/D3ADA0.c index 93d62f51de..2367a47ff8 100644 --- a/src/world/area_sam/sam_11/D3ADA0.c +++ b/src/world/area_sam/sam_11/D3ADA0.c @@ -6,7 +6,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802407D0_D3ADA0); INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802408E8_D3AEB8); -INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802408FC_D3AECC); +#include "world/common/Set80151310_0.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_8024090C_D3AEDC); diff --git a/src/world/common/Set80151310_0.inc.c b/src/world/common/Set80151310_0.inc.c new file mode 100644 index 0000000000..953e1f4232 --- /dev/null +++ b/src/world/common/Set80151310_0.inc.c @@ -0,0 +1,6 @@ +#include "common.h" + +static ApiStatus Set80151310_0(ScriptInstance* script, s32 isInitialCall) { + D_80151310 = 0; + return ApiStatus_DONE2; +} From ba35048ab208a65a6504d17de0e0b7c658553323 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 29 Oct 2020 22:20:45 -0400 Subject: [PATCH 45/78] GetPlayerCoins --- .../world/area_mac/mac_01/8017D0/func_802440E8_804968.s | 9 --------- .../world/area_mac/mac_03/833740/func_80241F6C_83376C.s | 9 --------- .../world/area_mac/mac_04/843030/func_802419D0_8445A0.s | 9 --------- src/world/area_mac/mac_01/8017D0.c | 2 +- src/world/area_mac/mac_03/833740.c | 2 +- src/world/area_mac/mac_04/843030.c | 2 +- src/world/common/GetPlayerCoins.inc.c | 6 ++++++ 7 files changed, 9 insertions(+), 30 deletions(-) delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802440E8_804968.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_03/833740/func_80241F6C_83376C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_04/843030/func_802419D0_8445A0.s create mode 100644 src/world/common/GetPlayerCoins.inc.c diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802440E8_804968.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802440E8_804968.s deleted file mode 100644 index 198bddddb5..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802440E8_804968.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802440E8_804968 -/* 804968 802440E8 3C028011 */ lui $v0, 0x8011 -/* 80496C 802440EC 8442F29C */ lh $v0, -0xd64($v0) -/* 804970 802440F0 AC820084 */ sw $v0, 0x84($a0) -/* 804974 802440F4 03E00008 */ jr $ra -/* 804978 802440F8 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_03/833740/func_80241F6C_83376C.s b/asm/nonmatchings/world/area_mac/mac_03/833740/func_80241F6C_83376C.s deleted file mode 100644 index f8b4208bfe..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_03/833740/func_80241F6C_83376C.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241F6C_83376C -/* 83376C 80241F6C 3C028011 */ lui $v0, 0x8011 -/* 833770 80241F70 8442F29C */ lh $v0, -0xd64($v0) -/* 833774 80241F74 AC820084 */ sw $v0, 0x84($a0) -/* 833778 80241F78 03E00008 */ jr $ra -/* 83377C 80241F7C 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_04/843030/func_802419D0_8445A0.s b/asm/nonmatchings/world/area_mac/mac_04/843030/func_802419D0_8445A0.s deleted file mode 100644 index d61c2be71c..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_04/843030/func_802419D0_8445A0.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802419D0_8445A0 -/* 8445A0 802419D0 3C028011 */ lui $v0, 0x8011 -/* 8445A4 802419D4 8442F29C */ lh $v0, -0xd64($v0) -/* 8445A8 802419D8 AC820084 */ sw $v0, 0x84($a0) -/* 8445AC 802419DC 03E00008 */ jr $ra -/* 8445B0 802419E0 24020002 */ addiu $v0, $zero, 2 diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index 0e381f6894..cd2278afa4 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -138,7 +138,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80244078_8048F8); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802440BC_80493C); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802440E8_804968); +#include "world/common/GetPlayerCoins.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802440FC_80497C); diff --git a/src/world/area_mac/mac_03/833740.c b/src/world/area_mac/mac_03/833740.c index 57156e2697..c2d5f59a26 100644 --- a/src/world/area_mac/mac_03/833740.c +++ b/src/world/area_mac/mac_03/833740.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_03/833740", func_80241F40_833740); -INCLUDE_ASM(s32, "world/area_mac/mac_03/833740", func_80241F6C_83376C); +#include "world/common/GetPlayerCoins.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_03/833740", func_80241F80_833780); diff --git a/src/world/area_mac/mac_04/843030.c b/src/world/area_mac/mac_04/843030.c index bedafef124..f0c1cf813b 100644 --- a/src/world/area_mac/mac_04/843030.c +++ b/src/world/area_mac/mac_04/843030.c @@ -82,7 +82,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80241980_844550); INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_802419AC_84457C); -INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_802419D0_8445A0); +#include "world/common/GetPlayerCoins.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_802419E4_8445B4); diff --git a/src/world/common/GetPlayerCoins.inc.c b/src/world/common/GetPlayerCoins.inc.c new file mode 100644 index 0000000000..68b3ffec3b --- /dev/null +++ b/src/world/common/GetPlayerCoins.inc.c @@ -0,0 +1,6 @@ +#include "common.h" + +static ApiStatus GetPlayerCoins(ScriptInstance* script, s32 isInitialCall) { + script->varTable[0] = gPlayerData.coins; + return ApiStatus_DONE2; +} From 4a1f26c6eaf624176fd026151215611a906509f0 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 29 Oct 2020 22:33:01 -0400 Subject: [PATCH 46/78] Set80151310 --- .../area_dro/dro_01/95B7E0/func_80241588_95C788.s | 9 --------- .../area_dro/dro_02/9694C0/func_80240418_9695D8.s | 9 --------- .../area_hos/hos_03/A1BDB0/func_802425BC_A1D6BC.s | 9 --------- .../area_jan/jan_02/B2C8A0/func_8024172C_B2DB9C.s | 9 --------- .../area_jan/jan_03/B34BD0/func_80241CB4_B36884.s | 9 --------- .../area_kmr/kmr_02/8B0070/func_802404A8_8B0518.s | 9 --------- .../area_mac/mac_00/7EB340/func_80240748_7EB458.s | 9 --------- .../area_mac/mac_01/8017D0/func_80242028_8028A8.s | 9 --------- .../area_mac/mac_02/823BF0/func_802418D8_824B98.s | 9 --------- .../area_mac/mac_03/831B20/func_802405C8_831DC8.s | 9 --------- .../area_mac/mac_04/843030/func_80240578_843148.s | 9 --------- .../area_mac/mac_05/852170/func_80241438_8535A8.s | 9 --------- .../area_nok/nok_01/9C53E0/func_80240E80_9C6260.s | 9 --------- .../area_nok/nok_02/9D7AA0/func_80241A28_9D8A48.s | 9 --------- .../area_sam/sam_01/CF7E80/func_80240818_CF8388.s | 9 --------- .../area_sam/sam_02/D05F60/func_80240C44_D06374.s | 9 --------- .../area_sam/sam_11/D3A930/func_80240540_D3AB10.s | 9 --------- .../area_sam/sam_11/D3ADA0/func_802408E8_D3AEB8.s | 9 --------- src/world/area_dro/dro_01/95B7E0.c | 4 +--- src/world/area_dro/dro_02/9694C0.c | 4 +--- src/world/area_hos/hos_03/A1BDB0.c | 4 +--- src/world/area_jan/jan_02/B2C8A0.c | 4 +--- src/world/area_jan/jan_03/B34BD0.c | 4 +--- src/world/area_kmr/kmr_02/8B0070.c | 4 +--- src/world/area_mac/mac_00/7EB340.c | 4 +--- src/world/area_mac/mac_01/8017D0.c | 4 +--- src/world/area_mac/mac_02/823BF0.c | 4 +--- src/world/area_mac/mac_03/831B20.c | 4 +--- src/world/area_mac/mac_04/843030.c | 4 +--- src/world/area_mac/mac_05/852170.c | 4 +--- src/world/area_nok/nok_01/9C53E0.c | 4 +--- src/world/area_nok/nok_02/9D7AA0.c | 4 +--- src/world/area_sam/sam_01/CF7E80.c | 4 +--- src/world/area_sam/sam_02/D05F60.c | 4 +--- src/world/area_sam/sam_11/D3A930.c | 11 +++++++++-- src/world/area_sam/sam_11/D3ADA0.c | 4 +--- .../common/{Set80151310_0.inc.c => Set80151310.inc.c} | 5 +++++ 37 files changed, 31 insertions(+), 215 deletions(-) delete mode 100644 asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80241588_95C788.s delete mode 100644 asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240418_9695D8.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802425BC_A1D6BC.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_8024172C_B2DB9C.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241CB4_B36884.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802404A8_8B0518.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80240748_7EB458.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242028_8028A8.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802418D8_824B98.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_03/831B20/func_802405C8_831DC8.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_04/843030/func_80240578_843148.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_05/852170/func_80241438_8535A8.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240E80_9C6260.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80241A28_9D8A48.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80240818_CF8388.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240C44_D06374.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240540_D3AB10.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802408E8_D3AEB8.s rename src/world/common/{Set80151310_0.inc.c => Set80151310.inc.c} (53%) diff --git a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80241588_95C788.s b/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80241588_95C788.s deleted file mode 100644 index b1c7c9d842..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80241588_95C788.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241588_95C788 -/* 95C788 80241588 24020001 */ addiu $v0, $zero, 1 -/* 95C78C 8024158C 3C018015 */ lui $at, %hi(D_80151310) -/* 95C790 80241590 AC221310 */ sw $v0, %lo(D_80151310)($at) -/* 95C794 80241594 03E00008 */ jr $ra -/* 95C798 80241598 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240418_9695D8.s b/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240418_9695D8.s deleted file mode 100644 index a2c503ecc0..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240418_9695D8.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240418_9695D8 -/* 9695D8 80240418 24020001 */ addiu $v0, $zero, 1 -/* 9695DC 8024041C 3C018015 */ lui $at, %hi(D_80151310) -/* 9695E0 80240420 AC221310 */ sw $v0, %lo(D_80151310)($at) -/* 9695E4 80240424 03E00008 */ jr $ra -/* 9695E8 80240428 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802425BC_A1D6BC.s b/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802425BC_A1D6BC.s deleted file mode 100644 index 17f8a0fa7b..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802425BC_A1D6BC.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802425BC_A1D6BC -/* A1D6BC 802425BC 24020001 */ addiu $v0, $zero, 1 -/* A1D6C0 802425C0 3C018015 */ lui $at, %hi(D_80151310) -/* A1D6C4 802425C4 AC221310 */ sw $v0, %lo(D_80151310)($at) -/* A1D6C8 802425C8 03E00008 */ jr $ra -/* A1D6CC 802425CC 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_8024172C_B2DB9C.s b/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_8024172C_B2DB9C.s deleted file mode 100644 index 85143edf50..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_8024172C_B2DB9C.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024172C_B2DB9C -/* B2DB9C 8024172C 24020001 */ addiu $v0, $zero, 1 -/* B2DBA0 80241730 3C018015 */ lui $at, %hi(D_80151310) -/* B2DBA4 80241734 AC221310 */ sw $v0, %lo(D_80151310)($at) -/* B2DBA8 80241738 03E00008 */ jr $ra -/* B2DBAC 8024173C 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241CB4_B36884.s b/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241CB4_B36884.s deleted file mode 100644 index 09ed36b550..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241CB4_B36884.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241CB4_B36884 -/* B36884 80241CB4 24020001 */ addiu $v0, $zero, 1 -/* B36888 80241CB8 3C018015 */ lui $at, %hi(D_80151310) -/* B3688C 80241CBC AC221310 */ sw $v0, %lo(D_80151310)($at) -/* B36890 80241CC0 03E00008 */ jr $ra -/* B36894 80241CC4 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802404A8_8B0518.s b/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802404A8_8B0518.s deleted file mode 100644 index 9b149d8e42..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802404A8_8B0518.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802404A8_8B0518 -/* 8B0518 802404A8 24020001 */ addiu $v0, $zero, 1 -/* 8B051C 802404AC 3C018015 */ lui $at, %hi(D_80151310) -/* 8B0520 802404B0 AC221310 */ sw $v0, %lo(D_80151310)($at) -/* 8B0524 802404B4 03E00008 */ jr $ra -/* 8B0528 802404B8 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80240748_7EB458.s b/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80240748_7EB458.s deleted file mode 100644 index ad4d76513b..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80240748_7EB458.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240748_7EB458 -/* 7EB458 80240748 24020001 */ addiu $v0, $zero, 1 -/* 7EB45C 8024074C 3C018015 */ lui $at, %hi(D_80151310) -/* 7EB460 80240750 AC221310 */ sw $v0, %lo(D_80151310)($at) -/* 7EB464 80240754 03E00008 */ jr $ra -/* 7EB468 80240758 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242028_8028A8.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242028_8028A8.s deleted file mode 100644 index dee90ec51a..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242028_8028A8.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242028_8028A8 -/* 8028A8 80242028 24020001 */ addiu $v0, $zero, 1 -/* 8028AC 8024202C 3C018015 */ lui $at, %hi(D_80151310) -/* 8028B0 80242030 AC221310 */ sw $v0, %lo(D_80151310)($at) -/* 8028B4 80242034 03E00008 */ jr $ra -/* 8028B8 80242038 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802418D8_824B98.s b/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802418D8_824B98.s deleted file mode 100644 index 1564a3e7d0..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802418D8_824B98.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802418D8_824B98 -/* 824B98 802418D8 24020001 */ addiu $v0, $zero, 1 -/* 824B9C 802418DC 3C018015 */ lui $at, %hi(D_80151310) -/* 824BA0 802418E0 AC221310 */ sw $v0, %lo(D_80151310)($at) -/* 824BA4 802418E4 03E00008 */ jr $ra -/* 824BA8 802418E8 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_802405C8_831DC8.s b/asm/nonmatchings/world/area_mac/mac_03/831B20/func_802405C8_831DC8.s deleted file mode 100644 index 0d0b173707..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_802405C8_831DC8.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802405C8_831DC8 -/* 831DC8 802405C8 24020001 */ addiu $v0, $zero, 1 -/* 831DCC 802405CC 3C018015 */ lui $at, %hi(D_80151310) -/* 831DD0 802405D0 AC221310 */ sw $v0, %lo(D_80151310)($at) -/* 831DD4 802405D4 03E00008 */ jr $ra -/* 831DD8 802405D8 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_04/843030/func_80240578_843148.s b/asm/nonmatchings/world/area_mac/mac_04/843030/func_80240578_843148.s deleted file mode 100644 index a1fe2bd8db..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_04/843030/func_80240578_843148.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240578_843148 -/* 843148 80240578 24020001 */ addiu $v0, $zero, 1 -/* 84314C 8024057C 3C018015 */ lui $at, %hi(D_80151310) -/* 843150 80240580 AC221310 */ sw $v0, %lo(D_80151310)($at) -/* 843154 80240584 03E00008 */ jr $ra -/* 843158 80240588 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_05/852170/func_80241438_8535A8.s b/asm/nonmatchings/world/area_mac/mac_05/852170/func_80241438_8535A8.s deleted file mode 100644 index 7bfa348ac9..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_05/852170/func_80241438_8535A8.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241438_8535A8 -/* 8535A8 80241438 24020001 */ addiu $v0, $zero, 1 -/* 8535AC 8024143C 3C018015 */ lui $at, %hi(D_80151310) -/* 8535B0 80241440 AC221310 */ sw $v0, %lo(D_80151310)($at) -/* 8535B4 80241444 03E00008 */ jr $ra -/* 8535B8 80241448 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240E80_9C6260.s b/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240E80_9C6260.s deleted file mode 100644 index cf6b163608..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240E80_9C6260.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240E80_9C6260 -/* 9C6260 80240E80 24020001 */ addiu $v0, $zero, 1 -/* 9C6264 80240E84 3C018015 */ lui $at, %hi(D_80151310) -/* 9C6268 80240E88 AC221310 */ sw $v0, %lo(D_80151310)($at) -/* 9C626C 80240E8C 03E00008 */ jr $ra -/* 9C6270 80240E90 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80241A28_9D8A48.s b/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80241A28_9D8A48.s deleted file mode 100644 index 561e80d2a0..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80241A28_9D8A48.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241A28_9D8A48 -/* 9D8A48 80241A28 24020001 */ addiu $v0, $zero, 1 -/* 9D8A4C 80241A2C 3C018015 */ lui $at, %hi(D_80151310) -/* 9D8A50 80241A30 AC221310 */ sw $v0, %lo(D_80151310)($at) -/* 9D8A54 80241A34 03E00008 */ jr $ra -/* 9D8A58 80241A38 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80240818_CF8388.s b/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80240818_CF8388.s deleted file mode 100644 index dadba2d8a8..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80240818_CF8388.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240818_CF8388 -/* CF8388 80240818 24020001 */ addiu $v0, $zero, 1 -/* CF838C 8024081C 3C018015 */ lui $at, %hi(D_80151310) -/* CF8390 80240820 AC221310 */ sw $v0, %lo(D_80151310)($at) -/* CF8394 80240824 03E00008 */ jr $ra -/* CF8398 80240828 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240C44_D06374.s b/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240C44_D06374.s deleted file mode 100644 index e90f8d35f5..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240C44_D06374.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240C44_D06374 -/* D06374 80240C44 24020001 */ addiu $v0, $zero, 1 -/* D06378 80240C48 3C018015 */ lui $at, %hi(D_80151310) -/* D0637C 80240C4C AC221310 */ sw $v0, %lo(D_80151310)($at) -/* D06380 80240C50 03E00008 */ jr $ra -/* D06384 80240C54 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240540_D3AB10.s b/asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240540_D3AB10.s deleted file mode 100644 index ffe44ebffd..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240540_D3AB10.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240540_D3AB10 -/* D3AB10 80240540 24020002 */ addiu $v0, $zero, 2 -/* D3AB14 80240544 3C018015 */ lui $at, %hi(D_80151310) -/* D3AB18 80240548 AC221310 */ sw $v0, %lo(D_80151310)($at) -/* D3AB1C 8024054C 03E00008 */ jr $ra -/* D3AB20 80240550 00000000 */ nop diff --git a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802408E8_D3AEB8.s b/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802408E8_D3AEB8.s deleted file mode 100644 index 8b351f5459..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802408E8_D3AEB8.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802408E8_D3AEB8 -/* D3AEB8 802408E8 24020001 */ addiu $v0, $zero, 1 -/* D3AEBC 802408EC 3C018015 */ lui $at, %hi(D_80151310) -/* D3AEC0 802408F0 AC221310 */ sw $v0, %lo(D_80151310)($at) -/* D3AEC4 802408F4 03E00008 */ jr $ra -/* D3AEC8 802408F8 24020002 */ addiu $v0, $zero, 2 diff --git a/src/world/area_dro/dro_01/95B7E0.c b/src/world/area_dro/dro_01/95B7E0.c index 07cc068199..567019d605 100644 --- a/src/world/area_dro/dro_01/95B7E0.c +++ b/src/world/area_dro/dro_01/95B7E0.c @@ -28,9 +28,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80241470_95C670); #include "world/common/GetItemName.inc.c" -INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80241588_95C788); - -#include "world/common/Set80151310_0.inc.c" +#include "world/common/Set80151310.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_802415AC_95C7AC); diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index f1b83904dc..b09cc58c04 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -4,9 +4,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80240300_9694C0); #include "world/common/GetItemName.inc.c" -INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80240418_9695D8); - -#include "world/common/Set80151310_0.inc.c" +#include "world/common/Set80151310.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_8024043C_9695FC); diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index 7cb60e96ea..5acb918d18 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -50,9 +50,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802424A4_A1D5A4); #include "world/common/GetItemName.inc.c" -INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802425BC_A1D6BC); - -#include "world/common/Set80151310_0.inc.c" +#include "world/common/Set80151310.inc.c" INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802425E0_A1D6E0); diff --git a/src/world/area_jan/jan_02/B2C8A0.c b/src/world/area_jan/jan_02/B2C8A0.c index 5e4e1bdb84..4c0ff535b8 100644 --- a/src/world/area_jan/jan_02/B2C8A0.c +++ b/src/world/area_jan/jan_02/B2C8A0.c @@ -38,9 +38,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241614_B2DA84); #include "world/common/GetItemName.inc.c" -INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_8024172C_B2DB9C); - -#include "world/common/Set80151310_0.inc.c" +#include "world/common/Set80151310.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241750_B2DBC0); diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index 24c7350a8c..8c4248f91c 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -82,9 +82,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241B9C_B3676C); #include "world/common/GetItemName.inc.c" -INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241CB4_B36884); - -#include "world/common/Set80151310_0.inc.c" +#include "world/common/Set80151310.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241CD8_B368A8); diff --git a/src/world/area_kmr/kmr_02/8B0070.c b/src/world/area_kmr/kmr_02/8B0070.c index 5a9849bd69..a4c1bb554c 100644 --- a/src/world/area_kmr/kmr_02/8B0070.c +++ b/src/world/area_kmr/kmr_02/8B0070.c @@ -20,9 +20,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240390_8B0400); #include "world/common/GetItemName.inc.c" -INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802404A8_8B0518); - -#include "world/common/Set80151310_0.inc.c" +#include "world/common/Set80151310.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802404CC_8B053C); diff --git a/src/world/area_mac/mac_00/7EB340.c b/src/world/area_mac/mac_00/7EB340.c index 658037b61e..3e66a781e0 100644 --- a/src/world/area_mac/mac_00/7EB340.c +++ b/src/world/area_mac/mac_00/7EB340.c @@ -4,9 +4,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80240630_7EB340); #include "world/common/GetItemName.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80240748_7EB458); - -#include "world/common/Set80151310_0.inc.c" +#include "world/common/Set80151310.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_8024076C_7EB47C); diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index cd2278afa4..ac8052fe96 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -30,9 +30,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80241F10_802790); #include "world/common/GetItemName.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242028_8028A8); - -#include "world/common/Set80151310_0.inc.c" +#include "world/common/Set80151310.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_8024204C_8028CC); diff --git a/src/world/area_mac/mac_02/823BF0.c b/src/world/area_mac/mac_02/823BF0.c index ff42fb2076..f5f17d7151 100644 --- a/src/world/area_mac/mac_02/823BF0.c +++ b/src/world/area_mac/mac_02/823BF0.c @@ -28,9 +28,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802417C0_824A80); #include "world/common/GetItemName.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802418D8_824B98); - -#include "world/common/Set80151310_0.inc.c" +#include "world/common/Set80151310.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802418FC_824BBC); diff --git a/src/world/area_mac/mac_03/831B20.c b/src/world/area_mac/mac_03/831B20.c index 7f58c90beb..1d11fd62e9 100644 --- a/src/world/area_mac/mac_03/831B20.c +++ b/src/world/area_mac/mac_03/831B20.c @@ -6,9 +6,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802404B0_831CB0); #include "world/common/GetItemName.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802405C8_831DC8); - -#include "world/common/Set80151310_0.inc.c" +#include "world/common/Set80151310.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802405EC_831DEC); diff --git a/src/world/area_mac/mac_04/843030.c b/src/world/area_mac/mac_04/843030.c index f0c1cf813b..c1411631b0 100644 --- a/src/world/area_mac/mac_04/843030.c +++ b/src/world/area_mac/mac_04/843030.c @@ -4,9 +4,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240460_843030); #include "world/common/GetItemName.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240578_843148); - -#include "world/common/Set80151310_0.inc.c" +#include "world/common/Set80151310.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_8024059C_84316C); diff --git a/src/world/area_mac/mac_05/852170.c b/src/world/area_mac/mac_05/852170.c index e9436ae700..44b24bb640 100644 --- a/src/world/area_mac/mac_05/852170.c +++ b/src/world/area_mac/mac_05/852170.c @@ -36,9 +36,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241320_853490); #include "world/common/GetItemName.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241438_8535A8); - -#include "world/common/Set80151310_0.inc.c" +#include "world/common/Set80151310.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_8024145C_8535CC); diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index da63e5ea1b..747ceb53e7 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -48,9 +48,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", delete_player_actor_9C6148); #include "world/common/GetItemName.inc.c" -INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240E80_9C6260); - -#include "world/common/Set80151310_0.inc.c" +#include "world/common/Set80151310.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240EA4_9C6284); diff --git a/src/world/area_nok/nok_02/9D7AA0.c b/src/world/area_nok/nok_02/9D7AA0.c index dd4613d90e..efaed89d54 100644 --- a/src/world/area_nok/nok_02/9D7AA0.c +++ b/src/world/area_nok/nok_02/9D7AA0.c @@ -28,9 +28,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241910_9D8930); #include "world/common/GetItemName.inc.c" -INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241A28_9D8A48); - -#include "world/common/Set80151310_0.inc.c" +#include "world/common/Set80151310.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241A4C_9D8A6C); diff --git a/src/world/area_sam/sam_01/CF7E80.c b/src/world/area_sam/sam_01/CF7E80.c index 78f0cd4ac7..446e390df9 100644 --- a/src/world/area_sam/sam_01/CF7E80.c +++ b/src/world/area_sam/sam_01/CF7E80.c @@ -16,9 +16,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80240700_CF8270); #include "world/common/GetItemName.inc.c" -INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80240818_CF8388); - -#include "world/common/Set80151310_0.inc.c" +#include "world/common/Set80151310.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_8024083C_CF83AC); diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index 8ddd53f427..9f4b58cb6b 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -28,9 +28,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240B2C_D0625C); #include "world/common/GetItemName.inc.c" -INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240C44_D06374); - -#include "world/common/Set80151310_0.inc.c" +#include "world/common/Set80151310.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240C68_D06398); diff --git a/src/world/area_sam/sam_11/D3A930.c b/src/world/area_sam/sam_11/D3A930.c index 9496af1550..33450ec0ed 100644 --- a/src/world/area_sam/sam_11/D3A930.c +++ b/src/world/area_sam/sam_11/D3A930.c @@ -4,9 +4,16 @@ INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_80240360_D3A930); INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_8024052C_D3AAFC); -INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_80240540_D3AB10); +// Almost the same as Set80151310, but we're setting it to 2 in the first func instead of 1 +static ApiStatus Set80151310_2(ScriptInstance* script, s32 isInitialCall) { + D_80151310 = 2; + return ApiStatus_DONE2; +} -#include "world/common/Set80151310_0.inc.c" +static ApiStatus Set80151310_0(ScriptInstance* script, s32 isInitialCall) { + D_80151310 = 0; + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_80240564_D3AB34); diff --git a/src/world/area_sam/sam_11/D3ADA0.c b/src/world/area_sam/sam_11/D3ADA0.c index 2367a47ff8..b014d1b7b8 100644 --- a/src/world/area_sam/sam_11/D3ADA0.c +++ b/src/world/area_sam/sam_11/D3ADA0.c @@ -4,9 +4,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802407D0_D3ADA0); #include "world/common/GetItemName.inc.c" -INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802408E8_D3AEB8); - -#include "world/common/Set80151310_0.inc.c" +#include "world/common/Set80151310.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_8024090C_D3AEDC); diff --git a/src/world/common/Set80151310_0.inc.c b/src/world/common/Set80151310.inc.c similarity index 53% rename from src/world/common/Set80151310_0.inc.c rename to src/world/common/Set80151310.inc.c index 953e1f4232..2223ab43f6 100644 --- a/src/world/common/Set80151310_0.inc.c +++ b/src/world/common/Set80151310.inc.c @@ -1,5 +1,10 @@ #include "common.h" +static ApiStatus Set80151310_1(ScriptInstance* script, s32 isInitialCall) { + D_80151310 = 1; + return ApiStatus_DONE2; +} + static ApiStatus Set80151310_0(ScriptInstance* script, s32 isInitialCall) { D_80151310 = 0; return ApiStatus_DONE2; From bef10dd44e7f7399fa172cc4555a297b8c334974 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 29 Oct 2020 22:40:04 -0400 Subject: [PATCH 47/78] Call800E9894 --- .../area_dro/dro_02/9694C0/func_80243484_96C644.s | 12 ------------ .../area_hos/hos_03/A1BDB0/func_802421A8_A1D2A8.s | 12 ------------ .../area_jan/jan_03/B34BD0/func_802414B0_B36080.s | 12 ------------ .../area_kkj/kkj_20/AFDE00/func_802402C0_AFDE00.s | 12 ------------ .../area_kmr/kmr_02/8B30E0/func_80243070_8B30E0.s | 12 ------------ .../area_kmr/kmr_20/8ED0C0/func_802412A0_8ED0C0.s | 12 ------------ .../area_kpa/kpa_91/A86A50/func_80241528_A87F78.s | 12 ------------ .../area_kpa/kpa_95/A8CB60/func_80241608_A8E088.s | 12 ------------ .../area_mac/mac_01/8017D0/func_802437AC_80402C.s | 12 ------------ .../area_mac/mac_04/843030/func_80241C20_8447F0.s | 12 ------------ .../area_nok/nok_01/9C53E0/func_80240A6C_9C5E4C.s | 12 ------------ .../area_sam/sam_02/D05F60/func_80240830_D05F60.s | 12 ------------ .../area_sam/sam_06/D203E0/func_80241F50_D21DE0.s | 12 ------------ src/world/area_dro/dro_02/9694C0.c | 2 +- src/world/area_hos/hos_03/A1BDB0.c | 2 +- src/world/area_jan/jan_03/B34BD0.c | 2 +- src/world/area_kkj/kkj_20/AFDE00.c | 2 +- src/world/area_kmr/kmr_02/8B30E0.c | 2 +- src/world/area_kmr/kmr_20/8ED0C0.c | 2 +- src/world/area_kpa/kpa_91/A86A50.c | 2 +- src/world/area_kpa/kpa_95/A8CB60.c | 2 +- src/world/area_mac/mac_01/8017D0.c | 2 +- src/world/area_mac/mac_04/843030.c | 2 +- src/world/area_nok/nok_01/9C53E0.c | 2 +- src/world/area_sam/sam_02/D05F60.c | 2 +- src/world/area_sam/sam_06/D203E0.c | 2 +- src/world/common/Call800E9894.inc.c | 6 ++++++ 27 files changed, 19 insertions(+), 169 deletions(-) delete mode 100644 asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80243484_96C644.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802421A8_A1D2A8.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802414B0_B36080.s delete mode 100644 asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_802402C0_AFDE00.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243070_8B30E0.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_802412A0_8ED0C0.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_80241528_A87F78.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_80241608_A8E088.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802437AC_80402C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_04/843030/func_80241C20_8447F0.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240A6C_9C5E4C.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240830_D05F60.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_06/D203E0/func_80241F50_D21DE0.s create mode 100644 src/world/common/Call800E9894.inc.c diff --git a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80243484_96C644.s b/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80243484_96C644.s deleted file mode 100644 index 80d6c097f8..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80243484_96C644.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243484_96C644 -/* 96C644 80243484 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 96C648 80243488 AFBF0010 */ sw $ra, 0x10($sp) -/* 96C64C 8024348C 0C03A625 */ jal func_800E9894 -/* 96C650 80243490 00000000 */ nop -/* 96C654 80243494 8FBF0010 */ lw $ra, 0x10($sp) -/* 96C658 80243498 24020002 */ addiu $v0, $zero, 2 -/* 96C65C 8024349C 03E00008 */ jr $ra -/* 96C660 802434A0 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802421A8_A1D2A8.s b/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802421A8_A1D2A8.s deleted file mode 100644 index 347f95c415..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802421A8_A1D2A8.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802421A8_A1D2A8 -/* A1D2A8 802421A8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A1D2AC 802421AC AFBF0010 */ sw $ra, 0x10($sp) -/* A1D2B0 802421B0 0C03A625 */ jal func_800E9894 -/* A1D2B4 802421B4 00000000 */ nop -/* A1D2B8 802421B8 8FBF0010 */ lw $ra, 0x10($sp) -/* A1D2BC 802421BC 24020002 */ addiu $v0, $zero, 2 -/* A1D2C0 802421C0 03E00008 */ jr $ra -/* A1D2C4 802421C4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802414B0_B36080.s b/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802414B0_B36080.s deleted file mode 100644 index 5c822db0c3..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802414B0_B36080.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802414B0_B36080 -/* B36080 802414B0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B36084 802414B4 AFBF0010 */ sw $ra, 0x10($sp) -/* B36088 802414B8 0C03A625 */ jal func_800E9894 -/* B3608C 802414BC 00000000 */ nop -/* B36090 802414C0 8FBF0010 */ lw $ra, 0x10($sp) -/* B36094 802414C4 24020002 */ addiu $v0, $zero, 2 -/* B36098 802414C8 03E00008 */ jr $ra -/* B3609C 802414CC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_802402C0_AFDE00.s b/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_802402C0_AFDE00.s deleted file mode 100644 index edab8c1754..0000000000 --- a/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_802402C0_AFDE00.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802402C0_AFDE00 -/* AFDE00 802402C0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* AFDE04 802402C4 AFBF0010 */ sw $ra, 0x10($sp) -/* AFDE08 802402C8 0C03A625 */ jal func_800E9894 -/* AFDE0C 802402CC 00000000 */ nop -/* AFDE10 802402D0 8FBF0010 */ lw $ra, 0x10($sp) -/* AFDE14 802402D4 24020002 */ addiu $v0, $zero, 2 -/* AFDE18 802402D8 03E00008 */ jr $ra -/* AFDE1C 802402DC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243070_8B30E0.s b/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243070_8B30E0.s deleted file mode 100644 index 0618959d77..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243070_8B30E0.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243070_8B30E0 -/* 8B30E0 80243070 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8B30E4 80243074 AFBF0010 */ sw $ra, 0x10($sp) -/* 8B30E8 80243078 0C03A625 */ jal func_800E9894 -/* 8B30EC 8024307C 00000000 */ nop -/* 8B30F0 80243080 8FBF0010 */ lw $ra, 0x10($sp) -/* 8B30F4 80243084 24020002 */ addiu $v0, $zero, 2 -/* 8B30F8 80243088 03E00008 */ jr $ra -/* 8B30FC 8024308C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_802412A0_8ED0C0.s b/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_802412A0_8ED0C0.s deleted file mode 100644 index 59c2adb5fb..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_802412A0_8ED0C0.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802412A0_8ED0C0 -/* 8ED0C0 802412A0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8ED0C4 802412A4 AFBF0010 */ sw $ra, 0x10($sp) -/* 8ED0C8 802412A8 0C03A625 */ jal func_800E9894 -/* 8ED0CC 802412AC 00000000 */ nop -/* 8ED0D0 802412B0 8FBF0010 */ lw $ra, 0x10($sp) -/* 8ED0D4 802412B4 24020002 */ addiu $v0, $zero, 2 -/* 8ED0D8 802412B8 03E00008 */ jr $ra -/* 8ED0DC 802412BC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_80241528_A87F78.s b/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_80241528_A87F78.s deleted file mode 100644 index 6bb6d6c785..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_80241528_A87F78.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241528_A87F78 -/* A87F78 80241528 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A87F7C 8024152C AFBF0010 */ sw $ra, 0x10($sp) -/* A87F80 80241530 0C03A625 */ jal func_800E9894 -/* A87F84 80241534 00000000 */ nop -/* A87F88 80241538 8FBF0010 */ lw $ra, 0x10($sp) -/* A87F8C 8024153C 24020002 */ addiu $v0, $zero, 2 -/* A87F90 80241540 03E00008 */ jr $ra -/* A87F94 80241544 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_80241608_A8E088.s b/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_80241608_A8E088.s deleted file mode 100644 index 47400bd37f..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_80241608_A8E088.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241608_A8E088 -/* A8E088 80241608 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A8E08C 8024160C AFBF0010 */ sw $ra, 0x10($sp) -/* A8E090 80241610 0C03A625 */ jal func_800E9894 -/* A8E094 80241614 00000000 */ nop -/* A8E098 80241618 8FBF0010 */ lw $ra, 0x10($sp) -/* A8E09C 8024161C 24020002 */ addiu $v0, $zero, 2 -/* A8E0A0 80241620 03E00008 */ jr $ra -/* A8E0A4 80241624 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802437AC_80402C.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802437AC_80402C.s deleted file mode 100644 index 6f7e6b9fce..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802437AC_80402C.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802437AC_80402C -/* 80402C 802437AC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 804030 802437B0 AFBF0010 */ sw $ra, 0x10($sp) -/* 804034 802437B4 0C03A625 */ jal func_800E9894 -/* 804038 802437B8 00000000 */ nop -/* 80403C 802437BC 8FBF0010 */ lw $ra, 0x10($sp) -/* 804040 802437C0 24020002 */ addiu $v0, $zero, 2 -/* 804044 802437C4 03E00008 */ jr $ra -/* 804048 802437C8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_04/843030/func_80241C20_8447F0.s b/asm/nonmatchings/world/area_mac/mac_04/843030/func_80241C20_8447F0.s deleted file mode 100644 index d7340f5175..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_04/843030/func_80241C20_8447F0.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241C20_8447F0 -/* 8447F0 80241C20 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8447F4 80241C24 AFBF0010 */ sw $ra, 0x10($sp) -/* 8447F8 80241C28 0C03A625 */ jal func_800E9894 -/* 8447FC 80241C2C 00000000 */ nop -/* 844800 80241C30 8FBF0010 */ lw $ra, 0x10($sp) -/* 844804 80241C34 24020002 */ addiu $v0, $zero, 2 -/* 844808 80241C38 03E00008 */ jr $ra -/* 84480C 80241C3C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240A6C_9C5E4C.s b/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240A6C_9C5E4C.s deleted file mode 100644 index f088194dcb..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240A6C_9C5E4C.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240A6C_9C5E4C -/* 9C5E4C 80240A6C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 9C5E50 80240A70 AFBF0010 */ sw $ra, 0x10($sp) -/* 9C5E54 80240A74 0C03A625 */ jal func_800E9894 -/* 9C5E58 80240A78 00000000 */ nop -/* 9C5E5C 80240A7C 8FBF0010 */ lw $ra, 0x10($sp) -/* 9C5E60 80240A80 24020002 */ addiu $v0, $zero, 2 -/* 9C5E64 80240A84 03E00008 */ jr $ra -/* 9C5E68 80240A88 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240830_D05F60.s b/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240830_D05F60.s deleted file mode 100644 index 28763cfcd6..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240830_D05F60.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240830_D05F60 -/* D05F60 80240830 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D05F64 80240834 AFBF0010 */ sw $ra, 0x10($sp) -/* D05F68 80240838 0C03A625 */ jal func_800E9894 -/* D05F6C 8024083C 00000000 */ nop -/* D05F70 80240840 8FBF0010 */ lw $ra, 0x10($sp) -/* D05F74 80240844 24020002 */ addiu $v0, $zero, 2 -/* D05F78 80240848 03E00008 */ jr $ra -/* D05F7C 8024084C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_80241F50_D21DE0.s b/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_80241F50_D21DE0.s deleted file mode 100644 index 4d2f754750..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_80241F50_D21DE0.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241F50_D21DE0 -/* D21DE0 80241F50 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D21DE4 80241F54 AFBF0010 */ sw $ra, 0x10($sp) -/* D21DE8 80241F58 0C03A625 */ jal func_800E9894 -/* D21DEC 80241F5C 00000000 */ nop -/* D21DF0 80241F60 8FBF0010 */ lw $ra, 0x10($sp) -/* D21DF4 80241F64 24020002 */ addiu $v0, $zero, 2 -/* D21DF8 80241F68 03E00008 */ jr $ra -/* D21DFC 80241F6C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index b09cc58c04..4eb91270f0 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -86,7 +86,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_8024334C_96C50C); INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_802433E8_96C5A8); -INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80243484_96C644); +#include "world/common/Call800E9894.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_802434A4_96C664); diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index 5acb918d18..048fd17804 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -22,7 +22,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80241E98_A1CF98); INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80241FBC_A1D0BC); -INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802421A8_A1D2A8); +#include "world/common/Call800E9894.inc.c" INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802421C8_A1D2C8); diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index 8c4248f91c..a6a26446b5 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -42,7 +42,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802410F4_B35CC4); INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802411B4_B35D84); -INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802414B0_B36080); +#include "world/common/Call800E9894.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802414D0_B360A0); diff --git a/src/world/area_kkj/kkj_20/AFDE00.c b/src/world/area_kkj/kkj_20/AFDE00.c index c3556b54d0..f7b897aa31 100644 --- a/src/world/area_kkj/kkj_20/AFDE00.c +++ b/src/world/area_kkj/kkj_20/AFDE00.c @@ -1,6 +1,6 @@ #include "kkj_20.h" -INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_802402C0_AFDE00); +#include "world/common/Call800E9894.inc.c" INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_802402E0_AFDE20); diff --git a/src/world/area_kmr/kmr_02/8B30E0.c b/src/world/area_kmr/kmr_02/8B30E0.c index d58867fb6b..9ffcee5159 100644 --- a/src/world/area_kmr/kmr_02/8B30E0.c +++ b/src/world/area_kmr/kmr_02/8B30E0.c @@ -1,6 +1,6 @@ #include "kmr_02.h" -INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_80243070_8B30E0); +#include "world/common/Call800E9894.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_80243090_8B3100); diff --git a/src/world/area_kmr/kmr_20/8ED0C0.c b/src/world/area_kmr/kmr_20/8ED0C0.c index eefa891c4f..86177005f7 100644 --- a/src/world/area_kmr/kmr_20/8ED0C0.c +++ b/src/world/area_kmr/kmr_20/8ED0C0.c @@ -1,6 +1,6 @@ #include "kmr_20.h" -INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_802412A0_8ED0C0); +#include "world/common/Call800E9894.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_802412C0_8ED0E0); diff --git a/src/world/area_kpa/kpa_91/A86A50.c b/src/world/area_kpa/kpa_91/A86A50.c index afa9bdfee4..c84dd51ff4 100644 --- a/src/world/area_kpa/kpa_91/A86A50.c +++ b/src/world/area_kpa/kpa_91/A86A50.c @@ -34,7 +34,7 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_802411A4_A87BF4); INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_80241224_A87C74); -INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_80241528_A87F78); +#include "world/common/Call800E9894.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_80241548_A87F98); diff --git a/src/world/area_kpa/kpa_95/A8CB60.c b/src/world/area_kpa/kpa_95/A8CB60.c index 335f400bc3..63d71a56a1 100644 --- a/src/world/area_kpa/kpa_95/A8CB60.c +++ b/src/world/area_kpa/kpa_95/A8CB60.c @@ -34,7 +34,7 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_80241284_A8DD04); INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_80241304_A8DD84); -INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_80241608_A8E088); +#include "world/common/Call800E9894.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_80241628_A8E0A8); diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index ac8052fe96..91ae25bf5d 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -92,7 +92,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243680_803F00); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243740_803FC0); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802437AC_80402C); +#include "world/common/Call800E9894.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802437CC_80404C); diff --git a/src/world/area_mac/mac_04/843030.c b/src/world/area_mac/mac_04/843030.c index c1411631b0..59073d8f5e 100644 --- a/src/world/area_mac/mac_04/843030.c +++ b/src/world/area_mac/mac_04/843030.c @@ -90,7 +90,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80241B90_844760); INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80241BB8_844788); -INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80241C20_8447F0); +#include "world/common/Call800E9894.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80241C40_844810); diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index 747ceb53e7..36d95b9d93 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -20,7 +20,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_802405EC_9C59CC); INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_802407F4_9C5BD4); -INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240A6C_9C5E4C); +#include "world/common/Call800E9894.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240A8C_9C5E6C); diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index 9f4b58cb6b..d1ae4a06a1 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -1,6 +1,6 @@ #include "sam_02.h" -INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240830_D05F60); +#include "world/common/Call800E9894.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240850_D05F80); diff --git a/src/world/area_sam/sam_06/D203E0.c b/src/world/area_sam/sam_06/D203E0.c index d1635388ee..2e87ca9e37 100644 --- a/src/world/area_sam/sam_06/D203E0.c +++ b/src/world/area_sam/sam_06/D203E0.c @@ -38,7 +38,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80241E18_D21CA8); INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80241EB4_D21D44); -INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80241F50_D21DE0); +#include "world/common/Call800E9894.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80241F70_D21E00); diff --git a/src/world/common/Call800E9894.inc.c b/src/world/common/Call800E9894.inc.c new file mode 100644 index 0000000000..9962016b2d --- /dev/null +++ b/src/world/common/Call800E9894.inc.c @@ -0,0 +1,6 @@ +#include "common.h" + +static ApiStatus Call800E9894(ScriptInstance* script, s32 isInitialCall) { + func_800E9894(); + return ApiStatus_DONE2; +} From 19a34fe4bf105acc8e0d12a0c4106118c32e8d35 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 29 Oct 2020 22:49:54 -0400 Subject: [PATCH 48/78] GetNpcUnsafeOwner2 --- .../area_dro/dro_01/95B7E0/func_8024181C_95CA1C.s | 12 ------------ .../area_dro/dro_02/9694C0/func_802406AC_96986C.s | 12 ------------ .../area_hos/hos_03/A1BDB0/func_80242850_A1D950.s | 12 ------------ .../area_jan/jan_02/B2C8A0/func_802419C0_B2DE30.s | 12 ------------ .../area_jan/jan_03/B34BD0/func_80241F48_B36B18.s | 12 ------------ .../area_kmr/kmr_02/8B0070/func_8024073C_8B07AC.s | 12 ------------ .../area_mac/mac_00/7EB340/func_802409DC_7EB6EC.s | 12 ------------ .../area_mac/mac_01/8017D0/func_802422BC_802B3C.s | 12 ------------ .../area_mac/mac_01/8017D0/func_8024394C_8041CC.s | 12 ------------ .../area_mac/mac_02/823BF0/func_80241B6C_824E2C.s | 12 ------------ .../area_mac/mac_03/831B20/func_8024085C_83205C.s | 12 ------------ .../area_mac/mac_04/843030/func_8024080C_8433DC.s | 12 ------------ .../area_mac/mac_05/852170/func_802416CC_85383C.s | 12 ------------ .../area_nok/nok_01/9C53E0/func_80241114_9C64F4.s | 12 ------------ .../area_nok/nok_02/9D7AA0/func_80241CBC_9D8CDC.s | 12 ------------ .../area_sam/sam_01/CF7E80/func_80240AAC_CF861C.s | 12 ------------ .../area_sam/sam_02/D05F60/func_80240ED8_D06608.s | 12 ------------ .../area_sam/sam_11/D3ADA0/func_80240B7C_D3B14C.s | 12 ------------ src/world/area_dro/dro_01/95B7E0.c | 2 +- src/world/area_dro/dro_02/9694C0.c | 2 +- src/world/area_hos/hos_03/A1BDB0.c | 2 +- src/world/area_jan/jan_02/B2C8A0.c | 2 +- src/world/area_jan/jan_03/B34BD0.c | 2 +- src/world/area_kmr/kmr_02/8B0070.c | 2 +- src/world/area_mac/mac_00/7EB340.c | 2 +- src/world/area_mac/mac_01/8017D0.c | 7 +++++-- src/world/area_mac/mac_02/823BF0.c | 2 +- src/world/area_mac/mac_03/831B20.c | 2 +- src/world/area_mac/mac_04/843030.c | 2 +- src/world/area_mac/mac_05/852170.c | 2 +- src/world/area_nok/nok_01/9C53E0.c | 2 +- src/world/area_nok/nok_02/9D7AA0.c | 2 +- src/world/area_sam/sam_01/CF7E80.c | 2 +- src/world/area_sam/sam_02/D05F60.c | 2 +- src/world/area_sam/sam_11/D3ADA0.c | 2 +- src/world/common/GetNpcUnsafeOwner2.inc.c | 6 ++++++ 36 files changed, 27 insertions(+), 234 deletions(-) delete mode 100644 asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_8024181C_95CA1C.s delete mode 100644 asm/nonmatchings/world/area_dro/dro_02/9694C0/func_802406AC_96986C.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80242850_A1D950.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_802419C0_B2DE30.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241F48_B36B18.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_8024073C_8B07AC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_00/7EB340/func_802409DC_7EB6EC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802422BC_802B3C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_8024394C_8041CC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_02/823BF0/func_80241B6C_824E2C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_03/831B20/func_8024085C_83205C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_04/843030/func_8024080C_8433DC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_05/852170/func_802416CC_85383C.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241114_9C64F4.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80241CBC_9D8CDC.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80240AAC_CF861C.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240ED8_D06608.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_80240B7C_D3B14C.s create mode 100644 src/world/common/GetNpcUnsafeOwner2.inc.c diff --git a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_8024181C_95CA1C.s b/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_8024181C_95CA1C.s deleted file mode 100644 index 3e7e7a1a70..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_8024181C_95CA1C.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024181C_95CA1C -/* 95CA1C 8024181C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 95CA20 80241820 AFBF0010 */ sw $ra, 0x10($sp) -/* 95CA24 80241824 0C00EABB */ jal get_npc_unsafe -/* 95CA28 80241828 8C84014C */ lw $a0, 0x14c($a0) -/* 95CA2C 8024182C 8FBF0010 */ lw $ra, 0x10($sp) -/* 95CA30 80241830 0000102D */ daddu $v0, $zero, $zero -/* 95CA34 80241834 03E00008 */ jr $ra -/* 95CA38 80241838 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_802406AC_96986C.s b/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_802406AC_96986C.s deleted file mode 100644 index 5726597c6e..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_802406AC_96986C.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802406AC_96986C -/* 96986C 802406AC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 969870 802406B0 AFBF0010 */ sw $ra, 0x10($sp) -/* 969874 802406B4 0C00EABB */ jal get_npc_unsafe -/* 969878 802406B8 8C84014C */ lw $a0, 0x14c($a0) -/* 96987C 802406BC 8FBF0010 */ lw $ra, 0x10($sp) -/* 969880 802406C0 0000102D */ daddu $v0, $zero, $zero -/* 969884 802406C4 03E00008 */ jr $ra -/* 969888 802406C8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80242850_A1D950.s b/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80242850_A1D950.s deleted file mode 100644 index ae0d9174b2..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80242850_A1D950.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242850_A1D950 -/* A1D950 80242850 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A1D954 80242854 AFBF0010 */ sw $ra, 0x10($sp) -/* A1D958 80242858 0C00EABB */ jal get_npc_unsafe -/* A1D95C 8024285C 8C84014C */ lw $a0, 0x14c($a0) -/* A1D960 80242860 8FBF0010 */ lw $ra, 0x10($sp) -/* A1D964 80242864 0000102D */ daddu $v0, $zero, $zero -/* A1D968 80242868 03E00008 */ jr $ra -/* A1D96C 8024286C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_802419C0_B2DE30.s b/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_802419C0_B2DE30.s deleted file mode 100644 index 216750a4e5..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_802419C0_B2DE30.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802419C0_B2DE30 -/* B2DE30 802419C0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B2DE34 802419C4 AFBF0010 */ sw $ra, 0x10($sp) -/* B2DE38 802419C8 0C00EABB */ jal get_npc_unsafe -/* B2DE3C 802419CC 8C84014C */ lw $a0, 0x14c($a0) -/* B2DE40 802419D0 8FBF0010 */ lw $ra, 0x10($sp) -/* B2DE44 802419D4 0000102D */ daddu $v0, $zero, $zero -/* B2DE48 802419D8 03E00008 */ jr $ra -/* B2DE4C 802419DC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241F48_B36B18.s b/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241F48_B36B18.s deleted file mode 100644 index 8be9f67b52..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241F48_B36B18.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241F48_B36B18 -/* B36B18 80241F48 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B36B1C 80241F4C AFBF0010 */ sw $ra, 0x10($sp) -/* B36B20 80241F50 0C00EABB */ jal get_npc_unsafe -/* B36B24 80241F54 8C84014C */ lw $a0, 0x14c($a0) -/* B36B28 80241F58 8FBF0010 */ lw $ra, 0x10($sp) -/* B36B2C 80241F5C 0000102D */ daddu $v0, $zero, $zero -/* B36B30 80241F60 03E00008 */ jr $ra -/* B36B34 80241F64 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_8024073C_8B07AC.s b/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_8024073C_8B07AC.s deleted file mode 100644 index 1dad685eca..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_8024073C_8B07AC.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024073C_8B07AC -/* 8B07AC 8024073C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8B07B0 80240740 AFBF0010 */ sw $ra, 0x10($sp) -/* 8B07B4 80240744 0C00EABB */ jal get_npc_unsafe -/* 8B07B8 80240748 8C84014C */ lw $a0, 0x14c($a0) -/* 8B07BC 8024074C 8FBF0010 */ lw $ra, 0x10($sp) -/* 8B07C0 80240750 0000102D */ daddu $v0, $zero, $zero -/* 8B07C4 80240754 03E00008 */ jr $ra -/* 8B07C8 80240758 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_802409DC_7EB6EC.s b/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_802409DC_7EB6EC.s deleted file mode 100644 index fbb4a7a24c..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_802409DC_7EB6EC.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802409DC_7EB6EC -/* 7EB6EC 802409DC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 7EB6F0 802409E0 AFBF0010 */ sw $ra, 0x10($sp) -/* 7EB6F4 802409E4 0C00EABB */ jal get_npc_unsafe -/* 7EB6F8 802409E8 8C84014C */ lw $a0, 0x14c($a0) -/* 7EB6FC 802409EC 8FBF0010 */ lw $ra, 0x10($sp) -/* 7EB700 802409F0 0000102D */ daddu $v0, $zero, $zero -/* 7EB704 802409F4 03E00008 */ jr $ra -/* 7EB708 802409F8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802422BC_802B3C.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802422BC_802B3C.s deleted file mode 100644 index 807a032753..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802422BC_802B3C.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802422BC_802B3C -/* 802B3C 802422BC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 802B40 802422C0 AFBF0010 */ sw $ra, 0x10($sp) -/* 802B44 802422C4 0C00EABB */ jal get_npc_unsafe -/* 802B48 802422C8 8C84014C */ lw $a0, 0x14c($a0) -/* 802B4C 802422CC 8FBF0010 */ lw $ra, 0x10($sp) -/* 802B50 802422D0 0000102D */ daddu $v0, $zero, $zero -/* 802B54 802422D4 03E00008 */ jr $ra -/* 802B58 802422D8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_8024394C_8041CC.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_8024394C_8041CC.s deleted file mode 100644 index d35da2544a..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_8024394C_8041CC.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024394C_8041CC -/* 8041CC 8024394C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8041D0 80243950 AFBF0010 */ sw $ra, 0x10($sp) -/* 8041D4 80243954 0C03AE18 */ jal partner_resume_ability_script -/* 8041D8 80243958 00000000 */ nop -/* 8041DC 8024395C 8FBF0010 */ lw $ra, 0x10($sp) -/* 8041E0 80243960 24020002 */ addiu $v0, $zero, 2 -/* 8041E4 80243964 03E00008 */ jr $ra -/* 8041E8 80243968 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_80241B6C_824E2C.s b/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_80241B6C_824E2C.s deleted file mode 100644 index baac1be28c..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_80241B6C_824E2C.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241B6C_824E2C -/* 824E2C 80241B6C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 824E30 80241B70 AFBF0010 */ sw $ra, 0x10($sp) -/* 824E34 80241B74 0C00EABB */ jal get_npc_unsafe -/* 824E38 80241B78 8C84014C */ lw $a0, 0x14c($a0) -/* 824E3C 80241B7C 8FBF0010 */ lw $ra, 0x10($sp) -/* 824E40 80241B80 0000102D */ daddu $v0, $zero, $zero -/* 824E44 80241B84 03E00008 */ jr $ra -/* 824E48 80241B88 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_8024085C_83205C.s b/asm/nonmatchings/world/area_mac/mac_03/831B20/func_8024085C_83205C.s deleted file mode 100644 index db0206c019..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_8024085C_83205C.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024085C_83205C -/* 83205C 8024085C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 832060 80240860 AFBF0010 */ sw $ra, 0x10($sp) -/* 832064 80240864 0C00EABB */ jal get_npc_unsafe -/* 832068 80240868 8C84014C */ lw $a0, 0x14c($a0) -/* 83206C 8024086C 8FBF0010 */ lw $ra, 0x10($sp) -/* 832070 80240870 0000102D */ daddu $v0, $zero, $zero -/* 832074 80240874 03E00008 */ jr $ra -/* 832078 80240878 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_04/843030/func_8024080C_8433DC.s b/asm/nonmatchings/world/area_mac/mac_04/843030/func_8024080C_8433DC.s deleted file mode 100644 index c28c31c70b..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_04/843030/func_8024080C_8433DC.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024080C_8433DC -/* 8433DC 8024080C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8433E0 80240810 AFBF0010 */ sw $ra, 0x10($sp) -/* 8433E4 80240814 0C00EABB */ jal get_npc_unsafe -/* 8433E8 80240818 8C84014C */ lw $a0, 0x14c($a0) -/* 8433EC 8024081C 8FBF0010 */ lw $ra, 0x10($sp) -/* 8433F0 80240820 0000102D */ daddu $v0, $zero, $zero -/* 8433F4 80240824 03E00008 */ jr $ra -/* 8433F8 80240828 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_05/852170/func_802416CC_85383C.s b/asm/nonmatchings/world/area_mac/mac_05/852170/func_802416CC_85383C.s deleted file mode 100644 index 2b150ccfd3..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_05/852170/func_802416CC_85383C.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802416CC_85383C -/* 85383C 802416CC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 853840 802416D0 AFBF0010 */ sw $ra, 0x10($sp) -/* 853844 802416D4 0C00EABB */ jal get_npc_unsafe -/* 853848 802416D8 8C84014C */ lw $a0, 0x14c($a0) -/* 85384C 802416DC 8FBF0010 */ lw $ra, 0x10($sp) -/* 853850 802416E0 0000102D */ daddu $v0, $zero, $zero -/* 853854 802416E4 03E00008 */ jr $ra -/* 853858 802416E8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241114_9C64F4.s b/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241114_9C64F4.s deleted file mode 100644 index c442e04124..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241114_9C64F4.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241114_9C64F4 -/* 9C64F4 80241114 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 9C64F8 80241118 AFBF0010 */ sw $ra, 0x10($sp) -/* 9C64FC 8024111C 0C00EABB */ jal get_npc_unsafe -/* 9C6500 80241120 8C84014C */ lw $a0, 0x14c($a0) -/* 9C6504 80241124 8FBF0010 */ lw $ra, 0x10($sp) -/* 9C6508 80241128 0000102D */ daddu $v0, $zero, $zero -/* 9C650C 8024112C 03E00008 */ jr $ra -/* 9C6510 80241130 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80241CBC_9D8CDC.s b/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80241CBC_9D8CDC.s deleted file mode 100644 index 7a943321ac..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80241CBC_9D8CDC.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241CBC_9D8CDC -/* 9D8CDC 80241CBC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 9D8CE0 80241CC0 AFBF0010 */ sw $ra, 0x10($sp) -/* 9D8CE4 80241CC4 0C00EABB */ jal get_npc_unsafe -/* 9D8CE8 80241CC8 8C84014C */ lw $a0, 0x14c($a0) -/* 9D8CEC 80241CCC 8FBF0010 */ lw $ra, 0x10($sp) -/* 9D8CF0 80241CD0 0000102D */ daddu $v0, $zero, $zero -/* 9D8CF4 80241CD4 03E00008 */ jr $ra -/* 9D8CF8 80241CD8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80240AAC_CF861C.s b/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80240AAC_CF861C.s deleted file mode 100644 index da8920679c..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80240AAC_CF861C.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240AAC_CF861C -/* CF861C 80240AAC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* CF8620 80240AB0 AFBF0010 */ sw $ra, 0x10($sp) -/* CF8624 80240AB4 0C00EABB */ jal get_npc_unsafe -/* CF8628 80240AB8 8C84014C */ lw $a0, 0x14c($a0) -/* CF862C 80240ABC 8FBF0010 */ lw $ra, 0x10($sp) -/* CF8630 80240AC0 0000102D */ daddu $v0, $zero, $zero -/* CF8634 80240AC4 03E00008 */ jr $ra -/* CF8638 80240AC8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240ED8_D06608.s b/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240ED8_D06608.s deleted file mode 100644 index 3850de84f6..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240ED8_D06608.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240ED8_D06608 -/* D06608 80240ED8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D0660C 80240EDC AFBF0010 */ sw $ra, 0x10($sp) -/* D06610 80240EE0 0C00EABB */ jal get_npc_unsafe -/* D06614 80240EE4 8C84014C */ lw $a0, 0x14c($a0) -/* D06618 80240EE8 8FBF0010 */ lw $ra, 0x10($sp) -/* D0661C 80240EEC 0000102D */ daddu $v0, $zero, $zero -/* D06620 80240EF0 03E00008 */ jr $ra -/* D06624 80240EF4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_80240B7C_D3B14C.s b/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_80240B7C_D3B14C.s deleted file mode 100644 index d9ad763d88..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_80240B7C_D3B14C.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240B7C_D3B14C -/* D3B14C 80240B7C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D3B150 80240B80 AFBF0010 */ sw $ra, 0x10($sp) -/* D3B154 80240B84 0C00EABB */ jal get_npc_unsafe -/* D3B158 80240B88 8C84014C */ lw $a0, 0x14c($a0) -/* D3B15C 80240B8C 8FBF0010 */ lw $ra, 0x10($sp) -/* D3B160 80240B90 0000102D */ daddu $v0, $zero, $zero -/* D3B164 80240B94 03E00008 */ jr $ra -/* D3B168 80240B98 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/src/world/area_dro/dro_01/95B7E0.c b/src/world/area_dro/dro_01/95B7E0.c index 567019d605..e3efb1148d 100644 --- a/src/world/area_dro/dro_01/95B7E0.c +++ b/src/world/area_dro/dro_01/95B7E0.c @@ -34,7 +34,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_802415AC_95C7AC); INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_802417D0_95C9D0); -INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_8024181C_95CA1C); +#include "world/common/GetNpcUnsafeOwner2.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_8024183C_95CA3C); diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index 4eb91270f0..b83f6531db 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -10,7 +10,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_8024043C_9695FC); INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80240660_969820); -INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_802406AC_96986C); +#include "world/common/GetNpcUnsafeOwner2.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_802406CC_96988C); diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index 048fd17804..e114a963e1 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -56,7 +56,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802425E0_A1D6E0); INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242804_A1D904); -INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242850_A1D950); +#include "world/common/GetNpcUnsafeOwner2.inc.c" INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242870_A1D970); diff --git a/src/world/area_jan/jan_02/B2C8A0.c b/src/world/area_jan/jan_02/B2C8A0.c index 4c0ff535b8..5b4e06e2c4 100644 --- a/src/world/area_jan/jan_02/B2C8A0.c +++ b/src/world/area_jan/jan_02/B2C8A0.c @@ -44,7 +44,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241750_B2DBC0); INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241974_B2DDE4); -INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_802419C0_B2DE30); +#include "world/common/GetNpcUnsafeOwner2.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_802419E0_B2DE50); diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index a6a26446b5..68be87c175 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -88,7 +88,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241CD8_B368A8); INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241EFC_B36ACC); -INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241F48_B36B18); +#include "world/common/GetNpcUnsafeOwner2.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241F68_B36B38); diff --git a/src/world/area_kmr/kmr_02/8B0070.c b/src/world/area_kmr/kmr_02/8B0070.c index a4c1bb554c..8d220bd67d 100644 --- a/src/world/area_kmr/kmr_02/8B0070.c +++ b/src/world/area_kmr/kmr_02/8B0070.c @@ -26,7 +26,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802404CC_8B053C); INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802406F0_8B0760); -INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_8024073C_8B07AC); +#include "world/common/GetNpcUnsafeOwner2.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_8024075C_8B07CC); diff --git a/src/world/area_mac/mac_00/7EB340.c b/src/world/area_mac/mac_00/7EB340.c index 3e66a781e0..cc917dc914 100644 --- a/src/world/area_mac/mac_00/7EB340.c +++ b/src/world/area_mac/mac_00/7EB340.c @@ -10,7 +10,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_8024076C_7EB47C); INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80240990_7EB6A0); -INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_802409DC_7EB6EC); +#include "world/common/GetNpcUnsafeOwner2.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_802409FC_7EB70C); diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index 91ae25bf5d..342f3881ba 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -36,7 +36,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_8024204C_8028CC); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242270_802AF0); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802422BC_802B3C); +#include "world/common/GetNpcUnsafeOwner2.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802422DC_802B5C); @@ -104,7 +104,10 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802438F0_804170); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243920_8041A0); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_8024394C_8041CC); +ApiStatus PartnerResumeAbilityScript(ScriptInstance* script, s32 isInitialCall) { + partner_resume_ability_script(); + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_8024396C_8041EC); diff --git a/src/world/area_mac/mac_02/823BF0.c b/src/world/area_mac/mac_02/823BF0.c index f5f17d7151..27384dfcc6 100644 --- a/src/world/area_mac/mac_02/823BF0.c +++ b/src/world/area_mac/mac_02/823BF0.c @@ -34,7 +34,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802418FC_824BBC); INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_80241B20_824DE0); -INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_80241B6C_824E2C); +#include "world/common/GetNpcUnsafeOwner2.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_80241B8C_824E4C); diff --git a/src/world/area_mac/mac_03/831B20.c b/src/world/area_mac/mac_03/831B20.c index 1d11fd62e9..9cfe529fe9 100644 --- a/src/world/area_mac/mac_03/831B20.c +++ b/src/world/area_mac/mac_03/831B20.c @@ -12,7 +12,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802405EC_831DEC); INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80240810_832010); -INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_8024085C_83205C); +#include "world/common/GetNpcUnsafeOwner2.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_8024087C_83207C); diff --git a/src/world/area_mac/mac_04/843030.c b/src/world/area_mac/mac_04/843030.c index 59073d8f5e..ead724658c 100644 --- a/src/world/area_mac/mac_04/843030.c +++ b/src/world/area_mac/mac_04/843030.c @@ -10,7 +10,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_8024059C_84316C); INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_802407C0_843390); -INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_8024080C_8433DC); +#include "world/common/GetNpcUnsafeOwner2.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_8024082C_8433FC); diff --git a/src/world/area_mac/mac_05/852170.c b/src/world/area_mac/mac_05/852170.c index 44b24bb640..aec6a9d2da 100644 --- a/src/world/area_mac/mac_05/852170.c +++ b/src/world/area_mac/mac_05/852170.c @@ -42,7 +42,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_8024145C_8535CC); INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241680_8537F0); -INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_802416CC_85383C); +#include "world/common/GetNpcUnsafeOwner2.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_802416EC_85385C); diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index 36d95b9d93..f3d8467455 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -54,7 +54,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240EA4_9C6284); INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_802410C8_9C64A8); -INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80241114_9C64F4); +#include "world/common/GetNpcUnsafeOwner2.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80241134_9C6514); diff --git a/src/world/area_nok/nok_02/9D7AA0.c b/src/world/area_nok/nok_02/9D7AA0.c index efaed89d54..573f2ad2ad 100644 --- a/src/world/area_nok/nok_02/9D7AA0.c +++ b/src/world/area_nok/nok_02/9D7AA0.c @@ -34,7 +34,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241A4C_9D8A6C); INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241C70_9D8C90); -INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241CBC_9D8CDC); +#include "world/common/GetNpcUnsafeOwner2.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241CDC_9D8CFC); diff --git a/src/world/area_sam/sam_01/CF7E80.c b/src/world/area_sam/sam_01/CF7E80.c index 446e390df9..0869a20d70 100644 --- a/src/world/area_sam/sam_01/CF7E80.c +++ b/src/world/area_sam/sam_01/CF7E80.c @@ -22,7 +22,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_8024083C_CF83AC); INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80240A60_CF85D0); -INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80240AAC_CF861C); +#include "world/common/GetNpcUnsafeOwner2.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80240ACC_CF863C); diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index d1ae4a06a1..670a7c10e5 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -34,7 +34,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240C68_D06398); INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240E8C_D065BC); -INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240ED8_D06608); +#include "world/common/GetNpcUnsafeOwner2.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240EF8_D06628); diff --git a/src/world/area_sam/sam_11/D3ADA0.c b/src/world/area_sam/sam_11/D3ADA0.c index b014d1b7b8..e355401aea 100644 --- a/src/world/area_sam/sam_11/D3ADA0.c +++ b/src/world/area_sam/sam_11/D3ADA0.c @@ -10,7 +10,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_8024090C_D3AEDC); INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_80240B30_D3B100); -INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_80240B7C_D3B14C); +#include "world/common/GetNpcUnsafeOwner2.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_80240B9C_D3B16C); diff --git a/src/world/common/GetNpcUnsafeOwner2.inc.c b/src/world/common/GetNpcUnsafeOwner2.inc.c new file mode 100644 index 0000000000..d6e8b0f867 --- /dev/null +++ b/src/world/common/GetNpcUnsafeOwner2.inc.c @@ -0,0 +1,6 @@ +#include "common.h" + +static ApiStatus GetNpcUnsafeOwner2(ScriptInstance* script, s32 isInitialCall) { + get_npc_unsafe(script->owner2.npc); + return ApiStatus_BLOCK; +} From 3a53233b1d1cd666ecd70dad121f5b6681ae9dbe Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 29 Oct 2020 23:37:25 -0400 Subject: [PATCH 49/78] Unk800E98C4SyncStatusMenu --- .../area_dro/dro_02/9694C0/func_802434A4_96C664.s | 14 -------------- .../area_hos/hos_03/A1BDB0/func_802421C8_A1D2C8.s | 14 -------------- .../area_jan/jan_03/B34BD0/func_802414D0_B360A0.s | 14 -------------- .../area_kkj/kkj_20/AFDE00/func_802402E0_AFDE20.s | 14 -------------- .../area_kmr/kmr_02/8B30E0/func_80243090_8B3100.s | 14 -------------- .../area_kmr/kmr_20/8ED0C0/func_802412C0_8ED0E0.s | 14 -------------- .../area_kpa/kpa_91/A86A50/func_80241548_A87F98.s | 14 -------------- .../area_kpa/kpa_95/A8CB60/func_80241628_A8E0A8.s | 14 -------------- .../area_mac/mac_01/8017D0/func_802437CC_80404C.s | 14 -------------- .../area_mac/mac_01/8017D0/func_8024552C_805DAC.s | 13 ------------- .../area_nok/nok_01/9C53E0/func_80240A8C_9C5E6C.s | 14 -------------- .../area_sam/sam_02/D05F60/func_80240850_D05F80.s | 14 -------------- .../area_sam/sam_06/D203E0/func_80241F70_D21E00.s | 14 -------------- src/world/area_dro/dro_02/9694C0.c | 2 +- src/world/area_hos/hos_03/A1BDB0.c | 2 +- src/world/area_jan/jan_03/B34BD0.c | 2 +- src/world/area_kkj/kkj_20/AFDE00.c | 2 +- src/world/area_kmr/kmr_02/8B30E0.c | 2 +- src/world/area_kmr/kmr_20/8ED0C0.c | 2 +- src/world/area_kpa/kpa_91/A86A50.c | 2 +- src/world/area_kpa/kpa_95/A8CB60.c | 2 +- src/world/area_mac/mac_01/8017D0.c | 7 +++++-- src/world/area_nok/nok_01/9C53E0.c | 2 +- src/world/area_sam/sam_02/D05F60.c | 2 +- src/world/area_sam/sam_06/D203E0.c | 2 +- src/world/common/Unk800E98C4SyncStatusMenu.inc.c | 7 +++++++ 26 files changed, 23 insertions(+), 194 deletions(-) delete mode 100644 asm/nonmatchings/world/area_dro/dro_02/9694C0/func_802434A4_96C664.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802421C8_A1D2C8.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802414D0_B360A0.s delete mode 100644 asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_802402E0_AFDE20.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243090_8B3100.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_802412C0_8ED0E0.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_80241548_A87F98.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_80241628_A8E0A8.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802437CC_80404C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_8024552C_805DAC.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240A8C_9C5E6C.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240850_D05F80.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_06/D203E0/func_80241F70_D21E00.s create mode 100644 src/world/common/Unk800E98C4SyncStatusMenu.inc.c diff --git a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_802434A4_96C664.s b/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_802434A4_96C664.s deleted file mode 100644 index 8c4bc6cba2..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_802434A4_96C664.s +++ /dev/null @@ -1,14 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802434A4_96C664 -/* 96C664 802434A4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 96C668 802434A8 AFBF0010 */ sw $ra, 0x10($sp) -/* 96C66C 802434AC 0C03A631 */ jal func_800E98C4 -/* 96C670 802434B0 00000000 */ nop -/* 96C674 802434B4 0C03A6DB */ jal sync_status_menu -/* 96C678 802434B8 00000000 */ nop -/* 96C67C 802434BC 8FBF0010 */ lw $ra, 0x10($sp) -/* 96C680 802434C0 24020002 */ addiu $v0, $zero, 2 -/* 96C684 802434C4 03E00008 */ jr $ra -/* 96C688 802434C8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802421C8_A1D2C8.s b/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802421C8_A1D2C8.s deleted file mode 100644 index 3db6a153dc..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802421C8_A1D2C8.s +++ /dev/null @@ -1,14 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802421C8_A1D2C8 -/* A1D2C8 802421C8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A1D2CC 802421CC AFBF0010 */ sw $ra, 0x10($sp) -/* A1D2D0 802421D0 0C03A631 */ jal func_800E98C4 -/* A1D2D4 802421D4 00000000 */ nop -/* A1D2D8 802421D8 0C03A6DB */ jal sync_status_menu -/* A1D2DC 802421DC 00000000 */ nop -/* A1D2E0 802421E0 8FBF0010 */ lw $ra, 0x10($sp) -/* A1D2E4 802421E4 24020002 */ addiu $v0, $zero, 2 -/* A1D2E8 802421E8 03E00008 */ jr $ra -/* A1D2EC 802421EC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802414D0_B360A0.s b/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802414D0_B360A0.s deleted file mode 100644 index bc22b1c1ed..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802414D0_B360A0.s +++ /dev/null @@ -1,14 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802414D0_B360A0 -/* B360A0 802414D0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B360A4 802414D4 AFBF0010 */ sw $ra, 0x10($sp) -/* B360A8 802414D8 0C03A631 */ jal func_800E98C4 -/* B360AC 802414DC 00000000 */ nop -/* B360B0 802414E0 0C03A6DB */ jal sync_status_menu -/* B360B4 802414E4 00000000 */ nop -/* B360B8 802414E8 8FBF0010 */ lw $ra, 0x10($sp) -/* B360BC 802414EC 24020002 */ addiu $v0, $zero, 2 -/* B360C0 802414F0 03E00008 */ jr $ra -/* B360C4 802414F4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_802402E0_AFDE20.s b/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_802402E0_AFDE20.s deleted file mode 100644 index d12c22dc00..0000000000 --- a/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_802402E0_AFDE20.s +++ /dev/null @@ -1,14 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802402E0_AFDE20 -/* AFDE20 802402E0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* AFDE24 802402E4 AFBF0010 */ sw $ra, 0x10($sp) -/* AFDE28 802402E8 0C03A631 */ jal func_800E98C4 -/* AFDE2C 802402EC 00000000 */ nop -/* AFDE30 802402F0 0C03A6DB */ jal sync_status_menu -/* AFDE34 802402F4 00000000 */ nop -/* AFDE38 802402F8 8FBF0010 */ lw $ra, 0x10($sp) -/* AFDE3C 802402FC 24020002 */ addiu $v0, $zero, 2 -/* AFDE40 80240300 03E00008 */ jr $ra -/* AFDE44 80240304 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243090_8B3100.s b/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243090_8B3100.s deleted file mode 100644 index 148f155323..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243090_8B3100.s +++ /dev/null @@ -1,14 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243090_8B3100 -/* 8B3100 80243090 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8B3104 80243094 AFBF0010 */ sw $ra, 0x10($sp) -/* 8B3108 80243098 0C03A631 */ jal func_800E98C4 -/* 8B310C 8024309C 00000000 */ nop -/* 8B3110 802430A0 0C03A6DB */ jal sync_status_menu -/* 8B3114 802430A4 00000000 */ nop -/* 8B3118 802430A8 8FBF0010 */ lw $ra, 0x10($sp) -/* 8B311C 802430AC 24020002 */ addiu $v0, $zero, 2 -/* 8B3120 802430B0 03E00008 */ jr $ra -/* 8B3124 802430B4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_802412C0_8ED0E0.s b/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_802412C0_8ED0E0.s deleted file mode 100644 index f55916e467..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_802412C0_8ED0E0.s +++ /dev/null @@ -1,14 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802412C0_8ED0E0 -/* 8ED0E0 802412C0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8ED0E4 802412C4 AFBF0010 */ sw $ra, 0x10($sp) -/* 8ED0E8 802412C8 0C03A631 */ jal func_800E98C4 -/* 8ED0EC 802412CC 00000000 */ nop -/* 8ED0F0 802412D0 0C03A6DB */ jal sync_status_menu -/* 8ED0F4 802412D4 00000000 */ nop -/* 8ED0F8 802412D8 8FBF0010 */ lw $ra, 0x10($sp) -/* 8ED0FC 802412DC 24020002 */ addiu $v0, $zero, 2 -/* 8ED100 802412E0 03E00008 */ jr $ra -/* 8ED104 802412E4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_80241548_A87F98.s b/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_80241548_A87F98.s deleted file mode 100644 index a19bca4574..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_80241548_A87F98.s +++ /dev/null @@ -1,14 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241548_A87F98 -/* A87F98 80241548 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A87F9C 8024154C AFBF0010 */ sw $ra, 0x10($sp) -/* A87FA0 80241550 0C03A631 */ jal func_800E98C4 -/* A87FA4 80241554 00000000 */ nop -/* A87FA8 80241558 0C03A6DB */ jal sync_status_menu -/* A87FAC 8024155C 00000000 */ nop -/* A87FB0 80241560 8FBF0010 */ lw $ra, 0x10($sp) -/* A87FB4 80241564 24020002 */ addiu $v0, $zero, 2 -/* A87FB8 80241568 03E00008 */ jr $ra -/* A87FBC 8024156C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_80241628_A8E0A8.s b/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_80241628_A8E0A8.s deleted file mode 100644 index 4076386945..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_80241628_A8E0A8.s +++ /dev/null @@ -1,14 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241628_A8E0A8 -/* A8E0A8 80241628 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A8E0AC 8024162C AFBF0010 */ sw $ra, 0x10($sp) -/* A8E0B0 80241630 0C03A631 */ jal func_800E98C4 -/* A8E0B4 80241634 00000000 */ nop -/* A8E0B8 80241638 0C03A6DB */ jal sync_status_menu -/* A8E0BC 8024163C 00000000 */ nop -/* A8E0C0 80241640 8FBF0010 */ lw $ra, 0x10($sp) -/* A8E0C4 80241644 24020002 */ addiu $v0, $zero, 2 -/* A8E0C8 80241648 03E00008 */ jr $ra -/* A8E0CC 8024164C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802437CC_80404C.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802437CC_80404C.s deleted file mode 100644 index f08b379a6a..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802437CC_80404C.s +++ /dev/null @@ -1,14 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802437CC_80404C -/* 80404C 802437CC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 804050 802437D0 AFBF0010 */ sw $ra, 0x10($sp) -/* 804054 802437D4 0C03A631 */ jal func_800E98C4 -/* 804058 802437D8 00000000 */ nop -/* 80405C 802437DC 0C03A6DB */ jal sync_status_menu -/* 804060 802437E0 00000000 */ nop -/* 804064 802437E4 8FBF0010 */ lw $ra, 0x10($sp) -/* 804068 802437E8 24020002 */ addiu $v0, $zero, 2 -/* 80406C 802437EC 03E00008 */ jr $ra -/* 804070 802437F0 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_8024552C_805DAC.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_8024552C_805DAC.s deleted file mode 100644 index 0bc23d492d..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_8024552C_805DAC.s +++ /dev/null @@ -1,13 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024552C_805DAC -/* 805DAC 8024552C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 805DB0 80245530 AFBF0010 */ sw $ra, 0x10($sp) -/* 805DB4 80245534 0C03BCE9 */ jal func_800EF3A4 -/* 805DB8 80245538 00000000 */ nop -/* 805DBC 8024553C 8FBF0010 */ lw $ra, 0x10($sp) -/* 805DC0 80245540 24020002 */ addiu $v0, $zero, 2 -/* 805DC4 80245544 03E00008 */ jr $ra -/* 805DC8 80245548 27BD0018 */ addiu $sp, $sp, 0x18 -/* 805DCC 8024554C 00000000 */ nop diff --git a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240A8C_9C5E6C.s b/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240A8C_9C5E6C.s deleted file mode 100644 index 98cc382f6f..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240A8C_9C5E6C.s +++ /dev/null @@ -1,14 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240A8C_9C5E6C -/* 9C5E6C 80240A8C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 9C5E70 80240A90 AFBF0010 */ sw $ra, 0x10($sp) -/* 9C5E74 80240A94 0C03A631 */ jal func_800E98C4 -/* 9C5E78 80240A98 00000000 */ nop -/* 9C5E7C 80240A9C 0C03A6DB */ jal sync_status_menu -/* 9C5E80 80240AA0 00000000 */ nop -/* 9C5E84 80240AA4 8FBF0010 */ lw $ra, 0x10($sp) -/* 9C5E88 80240AA8 24020002 */ addiu $v0, $zero, 2 -/* 9C5E8C 80240AAC 03E00008 */ jr $ra -/* 9C5E90 80240AB0 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240850_D05F80.s b/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240850_D05F80.s deleted file mode 100644 index 79f4dca6c4..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240850_D05F80.s +++ /dev/null @@ -1,14 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240850_D05F80 -/* D05F80 80240850 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D05F84 80240854 AFBF0010 */ sw $ra, 0x10($sp) -/* D05F88 80240858 0C03A631 */ jal func_800E98C4 -/* D05F8C 8024085C 00000000 */ nop -/* D05F90 80240860 0C03A6DB */ jal sync_status_menu -/* D05F94 80240864 00000000 */ nop -/* D05F98 80240868 8FBF0010 */ lw $ra, 0x10($sp) -/* D05F9C 8024086C 24020002 */ addiu $v0, $zero, 2 -/* D05FA0 80240870 03E00008 */ jr $ra -/* D05FA4 80240874 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_80241F70_D21E00.s b/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_80241F70_D21E00.s deleted file mode 100644 index ab125b4731..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_80241F70_D21E00.s +++ /dev/null @@ -1,14 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241F70_D21E00 -/* D21E00 80241F70 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D21E04 80241F74 AFBF0010 */ sw $ra, 0x10($sp) -/* D21E08 80241F78 0C03A631 */ jal func_800E98C4 -/* D21E0C 80241F7C 00000000 */ nop -/* D21E10 80241F80 0C03A6DB */ jal sync_status_menu -/* D21E14 80241F84 00000000 */ nop -/* D21E18 80241F88 8FBF0010 */ lw $ra, 0x10($sp) -/* D21E1C 80241F8C 24020002 */ addiu $v0, $zero, 2 -/* D21E20 80241F90 03E00008 */ jr $ra -/* D21E24 80241F94 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index b83f6531db..80a476decc 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -88,7 +88,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_802433E8_96C5A8); #include "world/common/Call800E9894.inc.c" -INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_802434A4_96C664); +#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_802434CC_96C68C); diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index e114a963e1..deae16f636 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -24,7 +24,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80241FBC_A1D0BC); #include "world/common/Call800E9894.inc.c" -INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802421C8_A1D2C8); +#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802421F0_A1D2F0); diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index 68be87c175..a6dba2e1a9 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -44,7 +44,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802411B4_B35D84); #include "world/common/Call800E9894.inc.c" -INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802414D0_B360A0); +#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802414F8_B360C8); diff --git a/src/world/area_kkj/kkj_20/AFDE00.c b/src/world/area_kkj/kkj_20/AFDE00.c index f7b897aa31..65a0137d53 100644 --- a/src/world/area_kkj/kkj_20/AFDE00.c +++ b/src/world/area_kkj/kkj_20/AFDE00.c @@ -2,7 +2,7 @@ #include "world/common/Call800E9894.inc.c" -INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_802402E0_AFDE20); +#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_80240308_AFDE48); diff --git a/src/world/area_kmr/kmr_02/8B30E0.c b/src/world/area_kmr/kmr_02/8B30E0.c index 9ffcee5159..90ab04e118 100644 --- a/src/world/area_kmr/kmr_02/8B30E0.c +++ b/src/world/area_kmr/kmr_02/8B30E0.c @@ -2,7 +2,7 @@ #include "world/common/Call800E9894.inc.c" -INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_80243090_8B3100); +#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_802430B8_8B3128); diff --git a/src/world/area_kmr/kmr_20/8ED0C0.c b/src/world/area_kmr/kmr_20/8ED0C0.c index 86177005f7..591ef2d39c 100644 --- a/src/world/area_kmr/kmr_20/8ED0C0.c +++ b/src/world/area_kmr/kmr_20/8ED0C0.c @@ -2,7 +2,7 @@ #include "world/common/Call800E9894.inc.c" -INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_802412C0_8ED0E0); +#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_802412E8_8ED108); diff --git a/src/world/area_kpa/kpa_91/A86A50.c b/src/world/area_kpa/kpa_91/A86A50.c index c84dd51ff4..db6b873542 100644 --- a/src/world/area_kpa/kpa_91/A86A50.c +++ b/src/world/area_kpa/kpa_91/A86A50.c @@ -36,7 +36,7 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_80241224_A87C74); #include "world/common/Call800E9894.inc.c" -INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_80241548_A87F98); +#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_80241570_A87FC0); diff --git a/src/world/area_kpa/kpa_95/A8CB60.c b/src/world/area_kpa/kpa_95/A8CB60.c index 63d71a56a1..a94ad62287 100644 --- a/src/world/area_kpa/kpa_95/A8CB60.c +++ b/src/world/area_kpa/kpa_95/A8CB60.c @@ -36,7 +36,7 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_80241304_A8DD84); #include "world/common/Call800E9894.inc.c" -INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_80241628_A8E0A8); +#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_80241650_A8E0D0); diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index 342f3881ba..a2816f87f5 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -94,7 +94,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243740_803FC0); #include "world/common/Call800E9894.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802437CC_80404C); +#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", pause_tutorial_draw_contents_804074); @@ -189,4 +189,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802454B4_805D34); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80245504_805D84); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_8024552C_805DAC); +ApiStatus func_8024552C_805DAC(ScriptInstance* script, s32 isInitialCall) { + func_800EF3A4(); + return ApiStatus_DONE2; +} diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index f3d8467455..bdc56984a6 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -22,7 +22,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_802407F4_9C5BD4); #include "world/common/Call800E9894.inc.c" -INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240A8C_9C5E6C); +#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240AB4_9C5E94); diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index 670a7c10e5..f611159bfe 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -2,7 +2,7 @@ #include "world/common/Call800E9894.inc.c" -INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240850_D05F80); +#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240878_D05FA8); diff --git a/src/world/area_sam/sam_06/D203E0.c b/src/world/area_sam/sam_06/D203E0.c index 2e87ca9e37..8e573c3ed6 100644 --- a/src/world/area_sam/sam_06/D203E0.c +++ b/src/world/area_sam/sam_06/D203E0.c @@ -40,7 +40,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80241EB4_D21D44); #include "world/common/Call800E9894.inc.c" -INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80241F70_D21E00); +#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80241F98_D21E28); diff --git a/src/world/common/Unk800E98C4SyncStatusMenu.inc.c b/src/world/common/Unk800E98C4SyncStatusMenu.inc.c new file mode 100644 index 0000000000..90e4efc6a3 --- /dev/null +++ b/src/world/common/Unk800E98C4SyncStatusMenu.inc.c @@ -0,0 +1,7 @@ +#include "common.h" + +static ApiStatus Unk800E98C4SyncStatusMenu(ScriptInstance* script, s32 isInitialCall) { + func_800E98C4(); + sync_status_menu(); + return ApiStatus_DONE2; +} From 8dc783bf5bd8e8e10480a935ab770d8e1a56d9d5 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 29 Oct 2020 23:47:20 -0400 Subject: [PATCH 50/78] PartnerToggleAbilityScript --- .../dro_02/9694C0/func_802435F8_96C7B8.s | 16 ---------------- .../dro_02/9694C0/func_80243624_96C7E4.s | 12 ------------ .../hos_03/A1BDB0/func_8024231C_A1D41C.s | 16 ---------------- .../hos_03/A1BDB0/func_80242348_A1D448.s | 12 ------------ .../jan_03/B34BD0/func_80241624_B361F4.s | 16 ---------------- .../jan_03/B34BD0/func_80241650_B36220.s | 12 ------------ .../kkj_20/AFDE00/func_80240434_AFDF74.s | 16 ---------------- .../kkj_20/AFDE00/func_80240460_AFDFA0.s | 12 ------------ .../kmr_02/8B30E0/func_802431E4_8B3254.s | 16 ---------------- .../kmr_02/8B30E0/func_80243210_8B3280.s | 12 ------------ .../kmr_20/8ED0C0/func_80241414_8ED234.s | 16 ---------------- .../kmr_20/8ED0C0/func_80241440_8ED260.s | 12 ------------ .../kpa_91/A86A50/func_8024169C_A880EC.s | 16 ---------------- .../kpa_91/A86A50/func_802416C8_A88118.s | 12 ------------ .../kpa_95/A8CB60/func_8024177C_A8E1FC.s | 16 ---------------- .../kpa_95/A8CB60/func_802417A8_A8E228.s | 12 ------------ .../mac_01/8017D0/func_80243920_8041A0.s | 16 ---------------- .../mac_01/8017D0/func_80245504_805D84.s | 14 -------------- .../nok_01/9C53E0/func_80240BE0_9C5FC0.s | 16 ---------------- .../nok_01/9C53E0/func_80240C0C_9C5FEC.s | 12 ------------ .../sam_02/D05F60/func_802409A4_D060D4.s | 16 ---------------- .../sam_02/D05F60/func_802409D0_D06100.s | 12 ------------ .../sam_06/D203E0/func_802420C4_D21F54.s | 16 ---------------- .../sam_06/D203E0/func_802420F0_D21F80.s | 12 ------------ src/world/area_dro/dro_02/9694C0.c | 4 +--- src/world/area_hos/hos_03/A1BDB0.c | 4 +--- src/world/area_jan/jan_03/B34BD0.c | 4 +--- src/world/area_kkj/kkj_20/AFDE00.c | 4 +--- src/world/area_kmr/kmr_02/8B30E0.c | 4 +--- src/world/area_kmr/kmr_20/8ED0C0.c | 4 +--- src/world/area_kpa/kpa_91/A86A50.c | 4 +--- src/world/area_kpa/kpa_95/A8CB60.c | 4 +--- src/world/area_mac/mac_01/8017D0.c | 12 +++++------- src/world/area_nok/nok_01/9C53E0.c | 4 +--- src/world/area_sam/sam_02/D05F60.c | 4 +--- src/world/area_sam/sam_06/D203E0.c | 4 +--- .../common/PartnerToggleAbilityScript.inc.c | 14 ++++++++++++++ 37 files changed, 30 insertions(+), 378 deletions(-) delete mode 100644 asm/nonmatchings/world/area_dro/dro_02/9694C0/func_802435F8_96C7B8.s delete mode 100644 asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80243624_96C7E4.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_8024231C_A1D41C.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80242348_A1D448.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241624_B361F4.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241650_B36220.s delete mode 100644 asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240434_AFDF74.s delete mode 100644 asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240460_AFDFA0.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_802431E4_8B3254.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243210_8B3280.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_80241414_8ED234.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_80241440_8ED260.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_8024169C_A880EC.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_802416C8_A88118.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_8024177C_A8E1FC.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_802417A8_A8E228.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243920_8041A0.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80245504_805D84.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240BE0_9C5FC0.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240C0C_9C5FEC.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_02/D05F60/func_802409A4_D060D4.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_02/D05F60/func_802409D0_D06100.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_06/D203E0/func_802420C4_D21F54.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_06/D203E0/func_802420F0_D21F80.s create mode 100644 src/world/common/PartnerToggleAbilityScript.inc.c diff --git a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_802435F8_96C7B8.s b/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_802435F8_96C7B8.s deleted file mode 100644 index cf62591195..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_802435F8_96C7B8.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802435F8_96C7B8 -/* 96C7B8 802435F8 3C028011 */ lui $v0, 0x8011 -/* 96C7BC 802435FC 8042F2A2 */ lb $v0, -0xd5e($v0) -/* 96C7C0 80243600 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 96C7C4 80243604 10400003 */ beqz $v0, .L80243614 -/* 96C7C8 80243608 AFBF0010 */ sw $ra, 0x10($sp) -/* 96C7CC 8024360C 0C03AE06 */ jal partner_suspend_ability_script -/* 96C7D0 80243610 00000000 */ nop -.L80243614: -/* 96C7D4 80243614 24020002 */ addiu $v0, $zero, 2 -/* 96C7D8 80243618 8FBF0010 */ lw $ra, 0x10($sp) -/* 96C7DC 8024361C 03E00008 */ jr $ra -/* 96C7E0 80243620 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80243624_96C7E4.s b/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80243624_96C7E4.s deleted file mode 100644 index c19416d262..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80243624_96C7E4.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243624_96C7E4 -/* 96C7E4 80243624 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 96C7E8 80243628 AFBF0010 */ sw $ra, 0x10($sp) -/* 96C7EC 8024362C 0C03AE18 */ jal partner_resume_ability_script -/* 96C7F0 80243630 00000000 */ nop -/* 96C7F4 80243634 8FBF0010 */ lw $ra, 0x10($sp) -/* 96C7F8 80243638 24020002 */ addiu $v0, $zero, 2 -/* 96C7FC 8024363C 03E00008 */ jr $ra -/* 96C800 80243640 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_8024231C_A1D41C.s b/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_8024231C_A1D41C.s deleted file mode 100644 index 0fef1c1081..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_8024231C_A1D41C.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024231C_A1D41C -/* A1D41C 8024231C 3C028011 */ lui $v0, 0x8011 -/* A1D420 80242320 8042F2A2 */ lb $v0, -0xd5e($v0) -/* A1D424 80242324 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A1D428 80242328 10400003 */ beqz $v0, .L80242338 -/* A1D42C 8024232C AFBF0010 */ sw $ra, 0x10($sp) -/* A1D430 80242330 0C03AE06 */ jal partner_suspend_ability_script -/* A1D434 80242334 00000000 */ nop -.L80242338: -/* A1D438 80242338 24020002 */ addiu $v0, $zero, 2 -/* A1D43C 8024233C 8FBF0010 */ lw $ra, 0x10($sp) -/* A1D440 80242340 03E00008 */ jr $ra -/* A1D444 80242344 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80242348_A1D448.s b/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80242348_A1D448.s deleted file mode 100644 index d5befc3f78..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80242348_A1D448.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242348_A1D448 -/* A1D448 80242348 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A1D44C 8024234C AFBF0010 */ sw $ra, 0x10($sp) -/* A1D450 80242350 0C03AE18 */ jal partner_resume_ability_script -/* A1D454 80242354 00000000 */ nop -/* A1D458 80242358 8FBF0010 */ lw $ra, 0x10($sp) -/* A1D45C 8024235C 24020002 */ addiu $v0, $zero, 2 -/* A1D460 80242360 03E00008 */ jr $ra -/* A1D464 80242364 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241624_B361F4.s b/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241624_B361F4.s deleted file mode 100644 index 26f5f5a757..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241624_B361F4.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241624_B361F4 -/* B361F4 80241624 3C028011 */ lui $v0, 0x8011 -/* B361F8 80241628 8042F2A2 */ lb $v0, -0xd5e($v0) -/* B361FC 8024162C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B36200 80241630 10400003 */ beqz $v0, .L80241640 -/* B36204 80241634 AFBF0010 */ sw $ra, 0x10($sp) -/* B36208 80241638 0C03AE06 */ jal partner_suspend_ability_script -/* B3620C 8024163C 00000000 */ nop -.L80241640: -/* B36210 80241640 24020002 */ addiu $v0, $zero, 2 -/* B36214 80241644 8FBF0010 */ lw $ra, 0x10($sp) -/* B36218 80241648 03E00008 */ jr $ra -/* B3621C 8024164C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241650_B36220.s b/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241650_B36220.s deleted file mode 100644 index af5b8f82cd..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241650_B36220.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241650_B36220 -/* B36220 80241650 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B36224 80241654 AFBF0010 */ sw $ra, 0x10($sp) -/* B36228 80241658 0C03AE18 */ jal partner_resume_ability_script -/* B3622C 8024165C 00000000 */ nop -/* B36230 80241660 8FBF0010 */ lw $ra, 0x10($sp) -/* B36234 80241664 24020002 */ addiu $v0, $zero, 2 -/* B36238 80241668 03E00008 */ jr $ra -/* B3623C 8024166C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240434_AFDF74.s b/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240434_AFDF74.s deleted file mode 100644 index b4625fd8d0..0000000000 --- a/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240434_AFDF74.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240434_AFDF74 -/* AFDF74 80240434 3C028011 */ lui $v0, 0x8011 -/* AFDF78 80240438 8042F2A2 */ lb $v0, -0xd5e($v0) -/* AFDF7C 8024043C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* AFDF80 80240440 10400003 */ beqz $v0, .L80240450 -/* AFDF84 80240444 AFBF0010 */ sw $ra, 0x10($sp) -/* AFDF88 80240448 0C03AE06 */ jal partner_suspend_ability_script -/* AFDF8C 8024044C 00000000 */ nop -.L80240450: -/* AFDF90 80240450 24020002 */ addiu $v0, $zero, 2 -/* AFDF94 80240454 8FBF0010 */ lw $ra, 0x10($sp) -/* AFDF98 80240458 03E00008 */ jr $ra -/* AFDF9C 8024045C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240460_AFDFA0.s b/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240460_AFDFA0.s deleted file mode 100644 index c95e2d2802..0000000000 --- a/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240460_AFDFA0.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240460_AFDFA0 -/* AFDFA0 80240460 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* AFDFA4 80240464 AFBF0010 */ sw $ra, 0x10($sp) -/* AFDFA8 80240468 0C03AE18 */ jal partner_resume_ability_script -/* AFDFAC 8024046C 00000000 */ nop -/* AFDFB0 80240470 8FBF0010 */ lw $ra, 0x10($sp) -/* AFDFB4 80240474 24020002 */ addiu $v0, $zero, 2 -/* AFDFB8 80240478 03E00008 */ jr $ra -/* AFDFBC 8024047C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_802431E4_8B3254.s b/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_802431E4_8B3254.s deleted file mode 100644 index a1ad5c51b5..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_802431E4_8B3254.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802431E4_8B3254 -/* 8B3254 802431E4 3C028011 */ lui $v0, 0x8011 -/* 8B3258 802431E8 8042F2A2 */ lb $v0, -0xd5e($v0) -/* 8B325C 802431EC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8B3260 802431F0 10400003 */ beqz $v0, .L80243200 -/* 8B3264 802431F4 AFBF0010 */ sw $ra, 0x10($sp) -/* 8B3268 802431F8 0C03AE06 */ jal partner_suspend_ability_script -/* 8B326C 802431FC 00000000 */ nop -.L80243200: -/* 8B3270 80243200 24020002 */ addiu $v0, $zero, 2 -/* 8B3274 80243204 8FBF0010 */ lw $ra, 0x10($sp) -/* 8B3278 80243208 03E00008 */ jr $ra -/* 8B327C 8024320C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243210_8B3280.s b/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243210_8B3280.s deleted file mode 100644 index 31b714dbf7..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243210_8B3280.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243210_8B3280 -/* 8B3280 80243210 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8B3284 80243214 AFBF0010 */ sw $ra, 0x10($sp) -/* 8B3288 80243218 0C03AE18 */ jal partner_resume_ability_script -/* 8B328C 8024321C 00000000 */ nop -/* 8B3290 80243220 8FBF0010 */ lw $ra, 0x10($sp) -/* 8B3294 80243224 24020002 */ addiu $v0, $zero, 2 -/* 8B3298 80243228 03E00008 */ jr $ra -/* 8B329C 8024322C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_80241414_8ED234.s b/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_80241414_8ED234.s deleted file mode 100644 index 633f211abf..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_80241414_8ED234.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241414_8ED234 -/* 8ED234 80241414 3C028011 */ lui $v0, 0x8011 -/* 8ED238 80241418 8042F2A2 */ lb $v0, -0xd5e($v0) -/* 8ED23C 8024141C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8ED240 80241420 10400003 */ beqz $v0, .L80241430 -/* 8ED244 80241424 AFBF0010 */ sw $ra, 0x10($sp) -/* 8ED248 80241428 0C03AE06 */ jal partner_suspend_ability_script -/* 8ED24C 8024142C 00000000 */ nop -.L80241430: -/* 8ED250 80241430 24020002 */ addiu $v0, $zero, 2 -/* 8ED254 80241434 8FBF0010 */ lw $ra, 0x10($sp) -/* 8ED258 80241438 03E00008 */ jr $ra -/* 8ED25C 8024143C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_80241440_8ED260.s b/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_80241440_8ED260.s deleted file mode 100644 index 1b754b3e3b..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_80241440_8ED260.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241440_8ED260 -/* 8ED260 80241440 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8ED264 80241444 AFBF0010 */ sw $ra, 0x10($sp) -/* 8ED268 80241448 0C03AE18 */ jal partner_resume_ability_script -/* 8ED26C 8024144C 00000000 */ nop -/* 8ED270 80241450 8FBF0010 */ lw $ra, 0x10($sp) -/* 8ED274 80241454 24020002 */ addiu $v0, $zero, 2 -/* 8ED278 80241458 03E00008 */ jr $ra -/* 8ED27C 8024145C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_8024169C_A880EC.s b/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_8024169C_A880EC.s deleted file mode 100644 index 5733b7c686..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_8024169C_A880EC.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024169C_A880EC -/* A880EC 8024169C 3C028011 */ lui $v0, 0x8011 -/* A880F0 802416A0 8042F2A2 */ lb $v0, -0xd5e($v0) -/* A880F4 802416A4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A880F8 802416A8 10400003 */ beqz $v0, .L802416B8 -/* A880FC 802416AC AFBF0010 */ sw $ra, 0x10($sp) -/* A88100 802416B0 0C03AE06 */ jal partner_suspend_ability_script -/* A88104 802416B4 00000000 */ nop -.L802416B8: -/* A88108 802416B8 24020002 */ addiu $v0, $zero, 2 -/* A8810C 802416BC 8FBF0010 */ lw $ra, 0x10($sp) -/* A88110 802416C0 03E00008 */ jr $ra -/* A88114 802416C4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_802416C8_A88118.s b/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_802416C8_A88118.s deleted file mode 100644 index 50df82f11a..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_802416C8_A88118.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802416C8_A88118 -/* A88118 802416C8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A8811C 802416CC AFBF0010 */ sw $ra, 0x10($sp) -/* A88120 802416D0 0C03AE18 */ jal partner_resume_ability_script -/* A88124 802416D4 00000000 */ nop -/* A88128 802416D8 8FBF0010 */ lw $ra, 0x10($sp) -/* A8812C 802416DC 24020002 */ addiu $v0, $zero, 2 -/* A88130 802416E0 03E00008 */ jr $ra -/* A88134 802416E4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_8024177C_A8E1FC.s b/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_8024177C_A8E1FC.s deleted file mode 100644 index 6bf87bbc8f..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_8024177C_A8E1FC.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024177C_A8E1FC -/* A8E1FC 8024177C 3C028011 */ lui $v0, 0x8011 -/* A8E200 80241780 8042F2A2 */ lb $v0, -0xd5e($v0) -/* A8E204 80241784 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A8E208 80241788 10400003 */ beqz $v0, .L80241798 -/* A8E20C 8024178C AFBF0010 */ sw $ra, 0x10($sp) -/* A8E210 80241790 0C03AE06 */ jal partner_suspend_ability_script -/* A8E214 80241794 00000000 */ nop -.L80241798: -/* A8E218 80241798 24020002 */ addiu $v0, $zero, 2 -/* A8E21C 8024179C 8FBF0010 */ lw $ra, 0x10($sp) -/* A8E220 802417A0 03E00008 */ jr $ra -/* A8E224 802417A4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_802417A8_A8E228.s b/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_802417A8_A8E228.s deleted file mode 100644 index e249e3c001..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_802417A8_A8E228.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802417A8_A8E228 -/* A8E228 802417A8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A8E22C 802417AC AFBF0010 */ sw $ra, 0x10($sp) -/* A8E230 802417B0 0C03AE18 */ jal partner_resume_ability_script -/* A8E234 802417B4 00000000 */ nop -/* A8E238 802417B8 8FBF0010 */ lw $ra, 0x10($sp) -/* A8E23C 802417BC 24020002 */ addiu $v0, $zero, 2 -/* A8E240 802417C0 03E00008 */ jr $ra -/* A8E244 802417C4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243920_8041A0.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243920_8041A0.s deleted file mode 100644 index a8c07f81d2..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243920_8041A0.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243920_8041A0 -/* 8041A0 80243920 3C028011 */ lui $v0, 0x8011 -/* 8041A4 80243924 8042F2A2 */ lb $v0, -0xd5e($v0) -/* 8041A8 80243928 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8041AC 8024392C 10400003 */ beqz $v0, .L8024393C -/* 8041B0 80243930 AFBF0010 */ sw $ra, 0x10($sp) -/* 8041B4 80243934 0C03AE06 */ jal partner_suspend_ability_script -/* 8041B8 80243938 00000000 */ nop -.L8024393C: -/* 8041BC 8024393C 24020002 */ addiu $v0, $zero, 2 -/* 8041C0 80243940 8FBF0010 */ lw $ra, 0x10($sp) -/* 8041C4 80243944 03E00008 */ jr $ra -/* 8041C8 80243948 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80245504_805D84.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80245504_805D84.s deleted file mode 100644 index 3ff47e1923..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80245504_805D84.s +++ /dev/null @@ -1,14 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80245504_805D84 -/* 805D84 80245504 3C0141A0 */ lui $at, 0x41a0 -/* 805D88 80245508 44816000 */ mtc1 $at, $f12 -/* 805D8C 8024550C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 805D90 80245510 AFBF0010 */ sw $ra, 0x10($sp) -/* 805D94 80245514 0C03BCE5 */ jal func_800EF394 -/* 805D98 80245518 00000000 */ nop -/* 805D9C 8024551C 8FBF0010 */ lw $ra, 0x10($sp) -/* 805DA0 80245520 24020002 */ addiu $v0, $zero, 2 -/* 805DA4 80245524 03E00008 */ jr $ra -/* 805DA8 80245528 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240BE0_9C5FC0.s b/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240BE0_9C5FC0.s deleted file mode 100644 index 16b30d3430..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240BE0_9C5FC0.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240BE0_9C5FC0 -/* 9C5FC0 80240BE0 3C028011 */ lui $v0, 0x8011 -/* 9C5FC4 80240BE4 8042F2A2 */ lb $v0, -0xd5e($v0) -/* 9C5FC8 80240BE8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 9C5FCC 80240BEC 10400003 */ beqz $v0, .L80240BFC -/* 9C5FD0 80240BF0 AFBF0010 */ sw $ra, 0x10($sp) -/* 9C5FD4 80240BF4 0C03AE06 */ jal partner_suspend_ability_script -/* 9C5FD8 80240BF8 00000000 */ nop -.L80240BFC: -/* 9C5FDC 80240BFC 24020002 */ addiu $v0, $zero, 2 -/* 9C5FE0 80240C00 8FBF0010 */ lw $ra, 0x10($sp) -/* 9C5FE4 80240C04 03E00008 */ jr $ra -/* 9C5FE8 80240C08 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240C0C_9C5FEC.s b/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240C0C_9C5FEC.s deleted file mode 100644 index 40d7fa4df1..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240C0C_9C5FEC.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240C0C_9C5FEC -/* 9C5FEC 80240C0C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 9C5FF0 80240C10 AFBF0010 */ sw $ra, 0x10($sp) -/* 9C5FF4 80240C14 0C03AE18 */ jal partner_resume_ability_script -/* 9C5FF8 80240C18 00000000 */ nop -/* 9C5FFC 80240C1C 8FBF0010 */ lw $ra, 0x10($sp) -/* 9C6000 80240C20 24020002 */ addiu $v0, $zero, 2 -/* 9C6004 80240C24 03E00008 */ jr $ra -/* 9C6008 80240C28 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_802409A4_D060D4.s b/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_802409A4_D060D4.s deleted file mode 100644 index 5e228d9dc5..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_802409A4_D060D4.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802409A4_D060D4 -/* D060D4 802409A4 3C028011 */ lui $v0, 0x8011 -/* D060D8 802409A8 8042F2A2 */ lb $v0, -0xd5e($v0) -/* D060DC 802409AC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D060E0 802409B0 10400003 */ beqz $v0, .L802409C0 -/* D060E4 802409B4 AFBF0010 */ sw $ra, 0x10($sp) -/* D060E8 802409B8 0C03AE06 */ jal partner_suspend_ability_script -/* D060EC 802409BC 00000000 */ nop -.L802409C0: -/* D060F0 802409C0 24020002 */ addiu $v0, $zero, 2 -/* D060F4 802409C4 8FBF0010 */ lw $ra, 0x10($sp) -/* D060F8 802409C8 03E00008 */ jr $ra -/* D060FC 802409CC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_802409D0_D06100.s b/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_802409D0_D06100.s deleted file mode 100644 index 6f9347d460..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_802409D0_D06100.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802409D0_D06100 -/* D06100 802409D0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D06104 802409D4 AFBF0010 */ sw $ra, 0x10($sp) -/* D06108 802409D8 0C03AE18 */ jal partner_resume_ability_script -/* D0610C 802409DC 00000000 */ nop -/* D06110 802409E0 8FBF0010 */ lw $ra, 0x10($sp) -/* D06114 802409E4 24020002 */ addiu $v0, $zero, 2 -/* D06118 802409E8 03E00008 */ jr $ra -/* D0611C 802409EC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_802420C4_D21F54.s b/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_802420C4_D21F54.s deleted file mode 100644 index 09a4660d84..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_802420C4_D21F54.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802420C4_D21F54 -/* D21F54 802420C4 3C028011 */ lui $v0, 0x8011 -/* D21F58 802420C8 8042F2A2 */ lb $v0, -0xd5e($v0) -/* D21F5C 802420CC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D21F60 802420D0 10400003 */ beqz $v0, .L802420E0 -/* D21F64 802420D4 AFBF0010 */ sw $ra, 0x10($sp) -/* D21F68 802420D8 0C03AE06 */ jal partner_suspend_ability_script -/* D21F6C 802420DC 00000000 */ nop -.L802420E0: -/* D21F70 802420E0 24020002 */ addiu $v0, $zero, 2 -/* D21F74 802420E4 8FBF0010 */ lw $ra, 0x10($sp) -/* D21F78 802420E8 03E00008 */ jr $ra -/* D21F7C 802420EC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_802420F0_D21F80.s b/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_802420F0_D21F80.s deleted file mode 100644 index 0ae571f005..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_802420F0_D21F80.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802420F0_D21F80 -/* D21F80 802420F0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D21F84 802420F4 AFBF0010 */ sw $ra, 0x10($sp) -/* D21F88 802420F8 0C03AE18 */ jal partner_resume_ability_script -/* D21F8C 802420FC 00000000 */ nop -/* D21F90 80242100 8FBF0010 */ lw $ra, 0x10($sp) -/* D21F94 80242104 24020002 */ addiu $v0, $zero, 2 -/* D21F98 80242108 03E00008 */ jr $ra -/* D21F9C 8024210C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index 80a476decc..00d0e04206 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -96,9 +96,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80243548_96C708); INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_802435C8_96C788); -INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_802435F8_96C7B8); - -INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80243624_96C7E4); +#include "world/common/PartnerToggleAbilityScript.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80243644_96C804); diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index deae16f636..0615515cb2 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -32,9 +32,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_8024226C_A1D36C); INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802422EC_A1D3EC); -INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_8024231C_A1D41C); - -INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242348_A1D448); +#include "world/common/PartnerToggleAbilityScript.inc.c" INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242368_A1D468); diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index a6dba2e1a9..b693e85636 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -52,9 +52,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241574_B36144); INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802415F4_B361C4); -INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241624_B361F4); - -INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241650_B36220); +#include "world/common/PartnerToggleAbilityScript.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241670_B36240); diff --git a/src/world/area_kkj/kkj_20/AFDE00.c b/src/world/area_kkj/kkj_20/AFDE00.c index 65a0137d53..2eef9988ec 100644 --- a/src/world/area_kkj/kkj_20/AFDE00.c +++ b/src/world/area_kkj/kkj_20/AFDE00.c @@ -10,9 +10,7 @@ INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_80240384_AFDEC4); INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_80240404_AFDF44); -INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_80240434_AFDF74); - -INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_80240460_AFDFA0); +#include "world/common/PartnerToggleAbilityScript.inc.c" INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_80240480_AFDFC0); diff --git a/src/world/area_kmr/kmr_02/8B30E0.c b/src/world/area_kmr/kmr_02/8B30E0.c index 90ab04e118..a9f3c35823 100644 --- a/src/world/area_kmr/kmr_02/8B30E0.c +++ b/src/world/area_kmr/kmr_02/8B30E0.c @@ -10,9 +10,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_80243134_8B31A4); INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_802431B4_8B3224); -INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_802431E4_8B3254); - -INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_80243210_8B3280); +#include "world/common/PartnerToggleAbilityScript.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_80243230_8B32A0); diff --git a/src/world/area_kmr/kmr_20/8ED0C0.c b/src/world/area_kmr/kmr_20/8ED0C0.c index 591ef2d39c..e4fbb0c751 100644 --- a/src/world/area_kmr/kmr_20/8ED0C0.c +++ b/src/world/area_kmr/kmr_20/8ED0C0.c @@ -10,9 +10,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_80241364_8ED184); INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_802413E4_8ED204); -INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_80241414_8ED234); - -INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_80241440_8ED260); +#include "world/common/PartnerToggleAbilityScript.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_80241460_8ED280); diff --git a/src/world/area_kpa/kpa_91/A86A50.c b/src/world/area_kpa/kpa_91/A86A50.c index db6b873542..273018611d 100644 --- a/src/world/area_kpa/kpa_91/A86A50.c +++ b/src/world/area_kpa/kpa_91/A86A50.c @@ -44,9 +44,7 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_802415EC_A8803C); INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_8024166C_A880BC); -INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_8024169C_A880EC); - -INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_802416C8_A88118); +#include "world/common/PartnerToggleAbilityScript.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_802416E8_A88138); diff --git a/src/world/area_kpa/kpa_95/A8CB60.c b/src/world/area_kpa/kpa_95/A8CB60.c index a94ad62287..c2b28adcd5 100644 --- a/src/world/area_kpa/kpa_95/A8CB60.c +++ b/src/world/area_kpa/kpa_95/A8CB60.c @@ -44,9 +44,7 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_802416CC_A8E14C); INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_8024174C_A8E1CC); -INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_8024177C_A8E1FC); - -INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_802417A8_A8E228); +#include "world/common/PartnerToggleAbilityScript.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_802417C8_A8E248); diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index a2816f87f5..8652153fbb 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -102,12 +102,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243870_8040F0); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802438F0_804170); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243920_8041A0); - -ApiStatus PartnerResumeAbilityScript(ScriptInstance* script, s32 isInitialCall) { - partner_resume_ability_script(); - return ApiStatus_DONE2; -} +#include "world/common/PartnerToggleAbilityScript.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_8024396C_8041EC); @@ -187,7 +182,10 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80245488_805D08); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802454B4_805D34); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80245504_805D84); +ApiStatus func_80245504_805D84(ScriptInstance* script, s32 isInitialCall) { + func_800EF394(20.0f); + return ApiStatus_DONE2; +} ApiStatus func_8024552C_805DAC(ScriptInstance* script, s32 isInitialCall) { func_800EF3A4(); diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index bdc56984a6..9aabd27060 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -30,9 +30,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240B30_9C5F10); INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240BB0_9C5F90); -INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240BE0_9C5FC0); - -INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240C0C_9C5FEC); +#include "world/common/PartnerToggleAbilityScript.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240C2C_9C600C); diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index f611159bfe..1f64709ca6 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -10,9 +10,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_802408F4_D06024); INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240974_D060A4); -INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_802409A4_D060D4); - -INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_802409D0_D06100); +#include "world/common/PartnerToggleAbilityScript.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_802409F0_D06120); diff --git a/src/world/area_sam/sam_06/D203E0.c b/src/world/area_sam/sam_06/D203E0.c index 8e573c3ed6..58d61fa64e 100644 --- a/src/world/area_sam/sam_06/D203E0.c +++ b/src/world/area_sam/sam_06/D203E0.c @@ -48,9 +48,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80242014_D21EA4); INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80242094_D21F24); -INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_802420C4_D21F54); - -INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_802420F0_D21F80); +#include "world/common/PartnerToggleAbilityScript.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80242110_D21FA0); diff --git a/src/world/common/PartnerToggleAbilityScript.inc.c b/src/world/common/PartnerToggleAbilityScript.inc.c new file mode 100644 index 0000000000..a20b7f45de --- /dev/null +++ b/src/world/common/PartnerToggleAbilityScript.inc.c @@ -0,0 +1,14 @@ +#include "common.h" + +static ApiStatus PartnerSuspendAbilityScript(ScriptInstance* script, s32 isInitialCall) { + if (gPlayerData.currentPartner == PartnerId_NONE) { + return ApiStatus_DONE2; + } + partner_suspend_ability_script(); + return ApiStatus_DONE2; +} + +static ApiStatus PartnerResumeAbilityScript(ScriptInstance* script, s32 isInitialCall) { + partner_resume_ability_script(); + return ApiStatus_DONE2; +} From 7717a96628be9c767509d6d149f88cfcd8794a2f Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 29 Oct 2020 23:56:54 -0400 Subject: [PATCH 51/78] Call800EB168 --- .../dro_02/9694C0/func_80243748_96C908.s | 16 ---------------- .../hos_03/A1BDB0/func_8024246C_A1D56C.s | 16 ---------------- .../jan_03/B34BD0/func_80241774_B36344.s | 16 ---------------- .../kkj_20/AFDE00/func_80240584_AFE0C4.s | 16 ---------------- .../kmr_02/8B30E0/func_80243334_8B33A4.s | 16 ---------------- .../kmr_20/8ED0C0/func_80241564_8ED384.s | 16 ---------------- .../kpa_91/A86A50/func_802417EC_A8823C.s | 16 ---------------- .../kpa_95/A8CB60/func_802418CC_A8E34C.s | 16 ---------------- .../mac_01/8017D0/func_80243A70_8042F0.s | 16 ---------------- .../nok_01/9C53E0/func_80240D30_9C6110.s | 16 ---------------- .../sam_02/D05F60/func_80240AF4_D06224.s | 16 ---------------- .../sam_06/D203E0/func_80242214_D220A4.s | 16 ---------------- include/functions.h | 2 ++ src/code_838b0_len_5900.c | 2 +- src/world/area_dro/dro_02/9694C0.c | 2 +- src/world/area_hos/hos_03/A1BDB0.c | 2 +- src/world/area_jan/jan_03/B34BD0.c | 2 +- src/world/area_kkj/kkj_20/AFDE00.c | 2 +- src/world/area_kmr/kmr_02/8B30E0.c | 2 +- src/world/area_kmr/kmr_20/8ED0C0.c | 2 +- src/world/area_kpa/kpa_91/A86A50.c | 2 +- src/world/area_kpa/kpa_95/A8CB60.c | 2 +- src/world/area_mac/mac_01/8017D0.c | 2 +- src/world/area_nok/nok_01/9C53E0.c | 2 +- src/world/area_sam/sam_02/D05F60.c | 2 +- src/world/area_sam/sam_06/D203E0.c | 2 +- src/world/common/Call800EB168.inc.c | 6 ++++++ 27 files changed, 21 insertions(+), 205 deletions(-) delete mode 100644 asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80243748_96C908.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_8024246C_A1D56C.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241774_B36344.s delete mode 100644 asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240584_AFE0C4.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243334_8B33A4.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_80241564_8ED384.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_802417EC_A8823C.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_802418CC_A8E34C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243A70_8042F0.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240D30_9C6110.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240AF4_D06224.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_06/D203E0/func_80242214_D220A4.s create mode 100644 src/world/common/Call800EB168.inc.c diff --git a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80243748_96C908.s b/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80243748_96C908.s deleted file mode 100644 index f39a0a6e35..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80243748_96C908.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243748_96C908 -/* 96C908 80243748 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 96C90C 8024374C AFBF0010 */ sw $ra, 0x10($sp) -/* 96C910 80243750 8C82000C */ lw $v0, 0xc($a0) -/* 96C914 80243754 0C0B1EAF */ jal get_variable -/* 96C918 80243758 8C450000 */ lw $a1, ($v0) -/* 96C91C 8024375C 00021600 */ sll $v0, $v0, 0x18 -/* 96C920 80243760 0C03AC5A */ jal func_800EB168 -/* 96C924 80243764 00022603 */ sra $a0, $v0, 0x18 -/* 96C928 80243768 8FBF0010 */ lw $ra, 0x10($sp) -/* 96C92C 8024376C 24020002 */ addiu $v0, $zero, 2 -/* 96C930 80243770 03E00008 */ jr $ra -/* 96C934 80243774 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_8024246C_A1D56C.s b/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_8024246C_A1D56C.s deleted file mode 100644 index 940aeaa07f..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_8024246C_A1D56C.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024246C_A1D56C -/* A1D56C 8024246C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A1D570 80242470 AFBF0010 */ sw $ra, 0x10($sp) -/* A1D574 80242474 8C82000C */ lw $v0, 0xc($a0) -/* A1D578 80242478 0C0B1EAF */ jal get_variable -/* A1D57C 8024247C 8C450000 */ lw $a1, ($v0) -/* A1D580 80242480 00021600 */ sll $v0, $v0, 0x18 -/* A1D584 80242484 0C03AC5A */ jal func_800EB168 -/* A1D588 80242488 00022603 */ sra $a0, $v0, 0x18 -/* A1D58C 8024248C 8FBF0010 */ lw $ra, 0x10($sp) -/* A1D590 80242490 24020002 */ addiu $v0, $zero, 2 -/* A1D594 80242494 03E00008 */ jr $ra -/* A1D598 80242498 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241774_B36344.s b/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241774_B36344.s deleted file mode 100644 index cf4e2e0fa6..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241774_B36344.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241774_B36344 -/* B36344 80241774 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B36348 80241778 AFBF0010 */ sw $ra, 0x10($sp) -/* B3634C 8024177C 8C82000C */ lw $v0, 0xc($a0) -/* B36350 80241780 0C0B1EAF */ jal get_variable -/* B36354 80241784 8C450000 */ lw $a1, ($v0) -/* B36358 80241788 00021600 */ sll $v0, $v0, 0x18 -/* B3635C 8024178C 0C03AC5A */ jal func_800EB168 -/* B36360 80241790 00022603 */ sra $a0, $v0, 0x18 -/* B36364 80241794 8FBF0010 */ lw $ra, 0x10($sp) -/* B36368 80241798 24020002 */ addiu $v0, $zero, 2 -/* B3636C 8024179C 03E00008 */ jr $ra -/* B36370 802417A0 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240584_AFE0C4.s b/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240584_AFE0C4.s deleted file mode 100644 index 92fdbef2d6..0000000000 --- a/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240584_AFE0C4.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240584_AFE0C4 -/* AFE0C4 80240584 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* AFE0C8 80240588 AFBF0010 */ sw $ra, 0x10($sp) -/* AFE0CC 8024058C 8C82000C */ lw $v0, 0xc($a0) -/* AFE0D0 80240590 0C0B1EAF */ jal get_variable -/* AFE0D4 80240594 8C450000 */ lw $a1, ($v0) -/* AFE0D8 80240598 00021600 */ sll $v0, $v0, 0x18 -/* AFE0DC 8024059C 0C03AC5A */ jal func_800EB168 -/* AFE0E0 802405A0 00022603 */ sra $a0, $v0, 0x18 -/* AFE0E4 802405A4 8FBF0010 */ lw $ra, 0x10($sp) -/* AFE0E8 802405A8 24020002 */ addiu $v0, $zero, 2 -/* AFE0EC 802405AC 03E00008 */ jr $ra -/* AFE0F0 802405B0 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243334_8B33A4.s b/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243334_8B33A4.s deleted file mode 100644 index 6bd5963e90..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243334_8B33A4.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243334_8B33A4 -/* 8B33A4 80243334 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8B33A8 80243338 AFBF0010 */ sw $ra, 0x10($sp) -/* 8B33AC 8024333C 8C82000C */ lw $v0, 0xc($a0) -/* 8B33B0 80243340 0C0B1EAF */ jal get_variable -/* 8B33B4 80243344 8C450000 */ lw $a1, ($v0) -/* 8B33B8 80243348 00021600 */ sll $v0, $v0, 0x18 -/* 8B33BC 8024334C 0C03AC5A */ jal func_800EB168 -/* 8B33C0 80243350 00022603 */ sra $a0, $v0, 0x18 -/* 8B33C4 80243354 8FBF0010 */ lw $ra, 0x10($sp) -/* 8B33C8 80243358 24020002 */ addiu $v0, $zero, 2 -/* 8B33CC 8024335C 03E00008 */ jr $ra -/* 8B33D0 80243360 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_80241564_8ED384.s b/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_80241564_8ED384.s deleted file mode 100644 index 3f8a50f883..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_80241564_8ED384.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241564_8ED384 -/* 8ED384 80241564 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8ED388 80241568 AFBF0010 */ sw $ra, 0x10($sp) -/* 8ED38C 8024156C 8C82000C */ lw $v0, 0xc($a0) -/* 8ED390 80241570 0C0B1EAF */ jal get_variable -/* 8ED394 80241574 8C450000 */ lw $a1, ($v0) -/* 8ED398 80241578 00021600 */ sll $v0, $v0, 0x18 -/* 8ED39C 8024157C 0C03AC5A */ jal func_800EB168 -/* 8ED3A0 80241580 00022603 */ sra $a0, $v0, 0x18 -/* 8ED3A4 80241584 8FBF0010 */ lw $ra, 0x10($sp) -/* 8ED3A8 80241588 24020002 */ addiu $v0, $zero, 2 -/* 8ED3AC 8024158C 03E00008 */ jr $ra -/* 8ED3B0 80241590 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_802417EC_A8823C.s b/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_802417EC_A8823C.s deleted file mode 100644 index fc06affc8f..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_802417EC_A8823C.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802417EC_A8823C -/* A8823C 802417EC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A88240 802417F0 AFBF0010 */ sw $ra, 0x10($sp) -/* A88244 802417F4 8C82000C */ lw $v0, 0xc($a0) -/* A88248 802417F8 0C0B1EAF */ jal get_variable -/* A8824C 802417FC 8C450000 */ lw $a1, ($v0) -/* A88250 80241800 00021600 */ sll $v0, $v0, 0x18 -/* A88254 80241804 0C03AC5A */ jal func_800EB168 -/* A88258 80241808 00022603 */ sra $a0, $v0, 0x18 -/* A8825C 8024180C 8FBF0010 */ lw $ra, 0x10($sp) -/* A88260 80241810 24020002 */ addiu $v0, $zero, 2 -/* A88264 80241814 03E00008 */ jr $ra -/* A88268 80241818 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_802418CC_A8E34C.s b/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_802418CC_A8E34C.s deleted file mode 100644 index 353115d95f..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_802418CC_A8E34C.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802418CC_A8E34C -/* A8E34C 802418CC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A8E350 802418D0 AFBF0010 */ sw $ra, 0x10($sp) -/* A8E354 802418D4 8C82000C */ lw $v0, 0xc($a0) -/* A8E358 802418D8 0C0B1EAF */ jal get_variable -/* A8E35C 802418DC 8C450000 */ lw $a1, ($v0) -/* A8E360 802418E0 00021600 */ sll $v0, $v0, 0x18 -/* A8E364 802418E4 0C03AC5A */ jal func_800EB168 -/* A8E368 802418E8 00022603 */ sra $a0, $v0, 0x18 -/* A8E36C 802418EC 8FBF0010 */ lw $ra, 0x10($sp) -/* A8E370 802418F0 24020002 */ addiu $v0, $zero, 2 -/* A8E374 802418F4 03E00008 */ jr $ra -/* A8E378 802418F8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243A70_8042F0.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243A70_8042F0.s deleted file mode 100644 index 1defd7a02d..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243A70_8042F0.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243A70_8042F0 -/* 8042F0 80243A70 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8042F4 80243A74 AFBF0010 */ sw $ra, 0x10($sp) -/* 8042F8 80243A78 8C82000C */ lw $v0, 0xc($a0) -/* 8042FC 80243A7C 0C0B1EAF */ jal get_variable -/* 804300 80243A80 8C450000 */ lw $a1, ($v0) -/* 804304 80243A84 00021600 */ sll $v0, $v0, 0x18 -/* 804308 80243A88 0C03AC5A */ jal func_800EB168 -/* 80430C 80243A8C 00022603 */ sra $a0, $v0, 0x18 -/* 804310 80243A90 8FBF0010 */ lw $ra, 0x10($sp) -/* 804314 80243A94 24020002 */ addiu $v0, $zero, 2 -/* 804318 80243A98 03E00008 */ jr $ra -/* 80431C 80243A9C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240D30_9C6110.s b/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240D30_9C6110.s deleted file mode 100644 index 393eda7a34..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240D30_9C6110.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240D30_9C6110 -/* 9C6110 80240D30 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 9C6114 80240D34 AFBF0010 */ sw $ra, 0x10($sp) -/* 9C6118 80240D38 8C82000C */ lw $v0, 0xc($a0) -/* 9C611C 80240D3C 0C0B1EAF */ jal get_variable -/* 9C6120 80240D40 8C450000 */ lw $a1, ($v0) -/* 9C6124 80240D44 00021600 */ sll $v0, $v0, 0x18 -/* 9C6128 80240D48 0C03AC5A */ jal func_800EB168 -/* 9C612C 80240D4C 00022603 */ sra $a0, $v0, 0x18 -/* 9C6130 80240D50 8FBF0010 */ lw $ra, 0x10($sp) -/* 9C6134 80240D54 24020002 */ addiu $v0, $zero, 2 -/* 9C6138 80240D58 03E00008 */ jr $ra -/* 9C613C 80240D5C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240AF4_D06224.s b/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240AF4_D06224.s deleted file mode 100644 index 77d1ce5032..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240AF4_D06224.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240AF4_D06224 -/* D06224 80240AF4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D06228 80240AF8 AFBF0010 */ sw $ra, 0x10($sp) -/* D0622C 80240AFC 8C82000C */ lw $v0, 0xc($a0) -/* D06230 80240B00 0C0B1EAF */ jal get_variable -/* D06234 80240B04 8C450000 */ lw $a1, ($v0) -/* D06238 80240B08 00021600 */ sll $v0, $v0, 0x18 -/* D0623C 80240B0C 0C03AC5A */ jal func_800EB168 -/* D06240 80240B10 00022603 */ sra $a0, $v0, 0x18 -/* D06244 80240B14 8FBF0010 */ lw $ra, 0x10($sp) -/* D06248 80240B18 24020002 */ addiu $v0, $zero, 2 -/* D0624C 80240B1C 03E00008 */ jr $ra -/* D06250 80240B20 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_80242214_D220A4.s b/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_80242214_D220A4.s deleted file mode 100644 index 75756157e8..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_80242214_D220A4.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242214_D220A4 -/* D220A4 80242214 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D220A8 80242218 AFBF0010 */ sw $ra, 0x10($sp) -/* D220AC 8024221C 8C82000C */ lw $v0, 0xc($a0) -/* D220B0 80242220 0C0B1EAF */ jal get_variable -/* D220B4 80242224 8C450000 */ lw $a1, ($v0) -/* D220B8 80242228 00021600 */ sll $v0, $v0, 0x18 -/* D220BC 8024222C 0C03AC5A */ jal func_800EB168 -/* D220C0 80242230 00022603 */ sra $a0, $v0, 0x18 -/* D220C4 80242234 8FBF0010 */ lw $ra, 0x10($sp) -/* D220C8 80242238 24020002 */ addiu $v0, $zero, 2 -/* D220CC 8024223C 03E00008 */ jr $ra -/* D220D0 80242240 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/include/functions.h b/include/functions.h index 0b63c6b884..abc8ebebd0 100644 --- a/include/functions.h +++ b/include/functions.h @@ -70,6 +70,8 @@ void set_curtain_fade(f32 scale); void fx_walk_normal(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4, s32 arg5); +s32 func_800EB168(s8); + // Partner void func_800EBA3C(Npc* partner); void func_800EBB40(Npc* partner); diff --git a/src/code_838b0_len_5900.c b/src/code_838b0_len_5900.c index 81ce3b95d3..a5c09f35ed 100644 --- a/src/code_838b0_len_5900.c +++ b/src/code_838b0_len_5900.c @@ -27,7 +27,7 @@ INCLUDE_ASM(s32, "code_838b0_len_5900", func_800EA6A8); INCLUDE_ASM(s32, "code_838b0_len_5900", func_800EA6CC); -INCLUDE_ASM(s32, "code_838b0_len_5900", func_800EB168); +INCLUDE_ASM(s32, "code_838b0_len_5900", func_800EB168, s8 arg0); INCLUDE_ASM(s32, "code_838b0_len_5900", func_800EB200); diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index 00d0e04206..3aa40148ca 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -104,7 +104,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80243698_96C858); INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80243714_96C8D4); -INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80243748_96C908); +#include "world/common/Call800EB168.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80243778_96C938); diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index 0615515cb2..eedf563a06 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -40,7 +40,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802423BC_A1D4BC); INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242438_A1D538); -INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_8024246C_A1D56C); +#include "world/common/Call800EB168.inc.c" INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_8024249C_A1D59C); diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index b693e85636..009935db8d 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -60,7 +60,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802416C4_B36294); INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241740_B36310); -INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241774_B36344); +#include "world/common/Call800EB168.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802417A4_B36374); diff --git a/src/world/area_kkj/kkj_20/AFDE00.c b/src/world/area_kkj/kkj_20/AFDE00.c index 2eef9988ec..e7148b9e94 100644 --- a/src/world/area_kkj/kkj_20/AFDE00.c +++ b/src/world/area_kkj/kkj_20/AFDE00.c @@ -18,7 +18,7 @@ INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_802404D4_AFE014); INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_80240550_AFE090); -INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_80240584_AFE0C4); +#include "world/common/Call800EB168.inc.c" INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_802405B4_AFE0F4); diff --git a/src/world/area_kmr/kmr_02/8B30E0.c b/src/world/area_kmr/kmr_02/8B30E0.c index a9f3c35823..084612b528 100644 --- a/src/world/area_kmr/kmr_02/8B30E0.c +++ b/src/world/area_kmr/kmr_02/8B30E0.c @@ -18,7 +18,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_80243284_8B32F4); INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_80243300_8B3370); -INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_80243334_8B33A4); +#include "world/common/Call800EB168.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_80243364_8B33D4); diff --git a/src/world/area_kmr/kmr_20/8ED0C0.c b/src/world/area_kmr/kmr_20/8ED0C0.c index e4fbb0c751..e5f3122e66 100644 --- a/src/world/area_kmr/kmr_20/8ED0C0.c +++ b/src/world/area_kmr/kmr_20/8ED0C0.c @@ -18,7 +18,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_802414B4_8ED2D4); INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_80241530_8ED350); -INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_80241564_8ED384); +#include "world/common/Call800EB168.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_80241594_8ED3B4); diff --git a/src/world/area_kpa/kpa_91/A86A50.c b/src/world/area_kpa/kpa_91/A86A50.c index 273018611d..8b0d639bbe 100644 --- a/src/world/area_kpa/kpa_91/A86A50.c +++ b/src/world/area_kpa/kpa_91/A86A50.c @@ -52,6 +52,6 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_8024173C_A8818C); INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_802417B8_A88208); -INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_802417EC_A8823C); +#include "world/common/Call800EB168.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_8024181C_A8826C); diff --git a/src/world/area_kpa/kpa_95/A8CB60.c b/src/world/area_kpa/kpa_95/A8CB60.c index c2b28adcd5..a2adfc8a57 100644 --- a/src/world/area_kpa/kpa_95/A8CB60.c +++ b/src/world/area_kpa/kpa_95/A8CB60.c @@ -52,6 +52,6 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_8024181C_A8E29C); INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_80241898_A8E318); -INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_802418CC_A8E34C); +#include "world/common/Call800EB168.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_802418FC_A8E37C); diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index 8652153fbb..eb8f845ec4 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -110,7 +110,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802439C0_804240); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243A3C_8042BC); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243A70_8042F0); +#include "world/common/Call800EB168.inc.c" ApiStatus func_80243AA0_804320(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index 9aabd27060..f7b71c1b6b 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -38,7 +38,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240C80_9C6060); INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240CFC_9C60DC); -INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240D30_9C6110); +#include "world/common/Call800EB168.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240D60_9C6140); diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index 1f64709ca6..4b718caf18 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -18,7 +18,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240A44_D06174); INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240AC0_D061F0); -INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240AF4_D06224); +#include "world/common/Call800EB168.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240B24_D06254); diff --git a/src/world/area_sam/sam_06/D203E0.c b/src/world/area_sam/sam_06/D203E0.c index 58d61fa64e..e16fd8d903 100644 --- a/src/world/area_sam/sam_06/D203E0.c +++ b/src/world/area_sam/sam_06/D203E0.c @@ -56,7 +56,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80242164_D21FF4); INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_802421E0_D22070); -INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80242214_D220A4); +#include "world/common/Call800EB168.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80242244_D220D4); diff --git a/src/world/common/Call800EB168.inc.c b/src/world/common/Call800EB168.inc.c new file mode 100644 index 0000000000..0d80634214 --- /dev/null +++ b/src/world/common/Call800EB168.inc.c @@ -0,0 +1,6 @@ +#include "common.h" + +static ApiStatus Call800EB168(ScriptInstance* script, s32 isInitialCall) { + func_800EB168(get_variable(script, *script->ptrReadPos)); + return ApiStatus_DONE2; +} From 3848319469fbd7e0862fcb07e143c003bf58d7c4 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 30 Oct 2020 00:01:25 -0400 Subject: [PATCH 52/78] NotDoesScriptExist --- .../dro_02/9694C0/func_802435C8_96C788.s | 16 ---------------- .../hos_03/A1BDB0/func_802422EC_A1D3EC.s | 16 ---------------- .../jan_03/B34BD0/func_802415F4_B361C4.s | 16 ---------------- .../kkj_20/AFDE00/func_80240404_AFDF44.s | 16 ---------------- .../kmr_02/8B30E0/func_802431B4_8B3224.s | 16 ---------------- .../kmr_20/8ED0C0/func_802413E4_8ED204.s | 16 ---------------- .../kpa_91/A86A50/func_8024166C_A880BC.s | 16 ---------------- .../kpa_95/A8CB60/func_8024174C_A8E1CC.s | 16 ---------------- .../mac_01/8017D0/func_802438F0_804170.s | 16 ---------------- .../nok_01/9C53E0/func_80240BB0_9C5F90.s | 16 ---------------- .../sam_02/D05F60/func_80240974_D060A4.s | 16 ---------------- .../sam_06/D203E0/func_80242094_D21F24.s | 16 ---------------- src/world/area_dro/dro_02/9694C0.c | 2 +- src/world/area_hos/hos_03/A1BDB0.c | 2 +- src/world/area_jan/jan_03/B34BD0.c | 2 +- src/world/area_kkj/kkj_20/AFDE00.c | 2 +- src/world/area_kmr/kmr_02/8B30E0.c | 2 +- src/world/area_kmr/kmr_20/8ED0C0.c | 2 +- src/world/area_kpa/kpa_91/A86A50.c | 2 +- src/world/area_kpa/kpa_95/A8CB60.c | 2 +- src/world/area_mac/mac_01/8017D0.c | 2 +- src/world/area_nok/nok_01/9C53E0.c | 2 +- src/world/area_sam/sam_02/D05F60.c | 2 +- src/world/area_sam/sam_06/D203E0.c | 2 +- src/world/common/NotDoesScriptExist.inc.c | 5 +++++ 25 files changed, 17 insertions(+), 204 deletions(-) delete mode 100644 asm/nonmatchings/world/area_dro/dro_02/9694C0/func_802435C8_96C788.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802422EC_A1D3EC.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802415F4_B361C4.s delete mode 100644 asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240404_AFDF44.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_802431B4_8B3224.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_802413E4_8ED204.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_8024166C_A880BC.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_8024174C_A8E1CC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802438F0_804170.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240BB0_9C5F90.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240974_D060A4.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_06/D203E0/func_80242094_D21F24.s create mode 100644 src/world/common/NotDoesScriptExist.inc.c diff --git a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_802435C8_96C788.s b/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_802435C8_96C788.s deleted file mode 100644 index ea148d4bf8..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_802435C8_96C788.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802435C8_96C788 -/* 96C788 802435C8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 96C78C 802435CC AFBF0010 */ sw $ra, 0x10($sp) -/* 96C790 802435D0 8C82000C */ lw $v0, 0xc($a0) -/* 96C794 802435D4 0C0B1EAF */ jal get_variable -/* 96C798 802435D8 8C450000 */ lw $a1, ($v0) -/* 96C79C 802435DC 0C0B1059 */ jal does_script_exist -/* 96C7A0 802435E0 0040202D */ daddu $a0, $v0, $zero -/* 96C7A4 802435E4 2C420001 */ sltiu $v0, $v0, 1 -/* 96C7A8 802435E8 8FBF0010 */ lw $ra, 0x10($sp) -/* 96C7AC 802435EC 00021040 */ sll $v0, $v0, 1 -/* 96C7B0 802435F0 03E00008 */ jr $ra -/* 96C7B4 802435F4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802422EC_A1D3EC.s b/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802422EC_A1D3EC.s deleted file mode 100644 index c9f8d55b7c..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802422EC_A1D3EC.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802422EC_A1D3EC -/* A1D3EC 802422EC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A1D3F0 802422F0 AFBF0010 */ sw $ra, 0x10($sp) -/* A1D3F4 802422F4 8C82000C */ lw $v0, 0xc($a0) -/* A1D3F8 802422F8 0C0B1EAF */ jal get_variable -/* A1D3FC 802422FC 8C450000 */ lw $a1, ($v0) -/* A1D400 80242300 0C0B1059 */ jal does_script_exist -/* A1D404 80242304 0040202D */ daddu $a0, $v0, $zero -/* A1D408 80242308 2C420001 */ sltiu $v0, $v0, 1 -/* A1D40C 8024230C 8FBF0010 */ lw $ra, 0x10($sp) -/* A1D410 80242310 00021040 */ sll $v0, $v0, 1 -/* A1D414 80242314 03E00008 */ jr $ra -/* A1D418 80242318 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802415F4_B361C4.s b/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802415F4_B361C4.s deleted file mode 100644 index c25aeba348..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802415F4_B361C4.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802415F4_B361C4 -/* B361C4 802415F4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B361C8 802415F8 AFBF0010 */ sw $ra, 0x10($sp) -/* B361CC 802415FC 8C82000C */ lw $v0, 0xc($a0) -/* B361D0 80241600 0C0B1EAF */ jal get_variable -/* B361D4 80241604 8C450000 */ lw $a1, ($v0) -/* B361D8 80241608 0C0B1059 */ jal does_script_exist -/* B361DC 8024160C 0040202D */ daddu $a0, $v0, $zero -/* B361E0 80241610 2C420001 */ sltiu $v0, $v0, 1 -/* B361E4 80241614 8FBF0010 */ lw $ra, 0x10($sp) -/* B361E8 80241618 00021040 */ sll $v0, $v0, 1 -/* B361EC 8024161C 03E00008 */ jr $ra -/* B361F0 80241620 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240404_AFDF44.s b/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240404_AFDF44.s deleted file mode 100644 index e35648e20f..0000000000 --- a/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240404_AFDF44.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240404_AFDF44 -/* AFDF44 80240404 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* AFDF48 80240408 AFBF0010 */ sw $ra, 0x10($sp) -/* AFDF4C 8024040C 8C82000C */ lw $v0, 0xc($a0) -/* AFDF50 80240410 0C0B1EAF */ jal get_variable -/* AFDF54 80240414 8C450000 */ lw $a1, ($v0) -/* AFDF58 80240418 0C0B1059 */ jal does_script_exist -/* AFDF5C 8024041C 0040202D */ daddu $a0, $v0, $zero -/* AFDF60 80240420 2C420001 */ sltiu $v0, $v0, 1 -/* AFDF64 80240424 8FBF0010 */ lw $ra, 0x10($sp) -/* AFDF68 80240428 00021040 */ sll $v0, $v0, 1 -/* AFDF6C 8024042C 03E00008 */ jr $ra -/* AFDF70 80240430 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_802431B4_8B3224.s b/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_802431B4_8B3224.s deleted file mode 100644 index d21815dd5f..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_802431B4_8B3224.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802431B4_8B3224 -/* 8B3224 802431B4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8B3228 802431B8 AFBF0010 */ sw $ra, 0x10($sp) -/* 8B322C 802431BC 8C82000C */ lw $v0, 0xc($a0) -/* 8B3230 802431C0 0C0B1EAF */ jal get_variable -/* 8B3234 802431C4 8C450000 */ lw $a1, ($v0) -/* 8B3238 802431C8 0C0B1059 */ jal does_script_exist -/* 8B323C 802431CC 0040202D */ daddu $a0, $v0, $zero -/* 8B3240 802431D0 2C420001 */ sltiu $v0, $v0, 1 -/* 8B3244 802431D4 8FBF0010 */ lw $ra, 0x10($sp) -/* 8B3248 802431D8 00021040 */ sll $v0, $v0, 1 -/* 8B324C 802431DC 03E00008 */ jr $ra -/* 8B3250 802431E0 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_802413E4_8ED204.s b/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_802413E4_8ED204.s deleted file mode 100644 index 67794efeef..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_802413E4_8ED204.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802413E4_8ED204 -/* 8ED204 802413E4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8ED208 802413E8 AFBF0010 */ sw $ra, 0x10($sp) -/* 8ED20C 802413EC 8C82000C */ lw $v0, 0xc($a0) -/* 8ED210 802413F0 0C0B1EAF */ jal get_variable -/* 8ED214 802413F4 8C450000 */ lw $a1, ($v0) -/* 8ED218 802413F8 0C0B1059 */ jal does_script_exist -/* 8ED21C 802413FC 0040202D */ daddu $a0, $v0, $zero -/* 8ED220 80241400 2C420001 */ sltiu $v0, $v0, 1 -/* 8ED224 80241404 8FBF0010 */ lw $ra, 0x10($sp) -/* 8ED228 80241408 00021040 */ sll $v0, $v0, 1 -/* 8ED22C 8024140C 03E00008 */ jr $ra -/* 8ED230 80241410 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_8024166C_A880BC.s b/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_8024166C_A880BC.s deleted file mode 100644 index 1333a5a1b3..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_8024166C_A880BC.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024166C_A880BC -/* A880BC 8024166C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A880C0 80241670 AFBF0010 */ sw $ra, 0x10($sp) -/* A880C4 80241674 8C82000C */ lw $v0, 0xc($a0) -/* A880C8 80241678 0C0B1EAF */ jal get_variable -/* A880CC 8024167C 8C450000 */ lw $a1, ($v0) -/* A880D0 80241680 0C0B1059 */ jal does_script_exist -/* A880D4 80241684 0040202D */ daddu $a0, $v0, $zero -/* A880D8 80241688 2C420001 */ sltiu $v0, $v0, 1 -/* A880DC 8024168C 8FBF0010 */ lw $ra, 0x10($sp) -/* A880E0 80241690 00021040 */ sll $v0, $v0, 1 -/* A880E4 80241694 03E00008 */ jr $ra -/* A880E8 80241698 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_8024174C_A8E1CC.s b/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_8024174C_A8E1CC.s deleted file mode 100644 index 2998e1e7aa..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_8024174C_A8E1CC.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024174C_A8E1CC -/* A8E1CC 8024174C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A8E1D0 80241750 AFBF0010 */ sw $ra, 0x10($sp) -/* A8E1D4 80241754 8C82000C */ lw $v0, 0xc($a0) -/* A8E1D8 80241758 0C0B1EAF */ jal get_variable -/* A8E1DC 8024175C 8C450000 */ lw $a1, ($v0) -/* A8E1E0 80241760 0C0B1059 */ jal does_script_exist -/* A8E1E4 80241764 0040202D */ daddu $a0, $v0, $zero -/* A8E1E8 80241768 2C420001 */ sltiu $v0, $v0, 1 -/* A8E1EC 8024176C 8FBF0010 */ lw $ra, 0x10($sp) -/* A8E1F0 80241770 00021040 */ sll $v0, $v0, 1 -/* A8E1F4 80241774 03E00008 */ jr $ra -/* A8E1F8 80241778 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802438F0_804170.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802438F0_804170.s deleted file mode 100644 index 6e3b37c95c..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802438F0_804170.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802438F0_804170 -/* 804170 802438F0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 804174 802438F4 AFBF0010 */ sw $ra, 0x10($sp) -/* 804178 802438F8 8C82000C */ lw $v0, 0xc($a0) -/* 80417C 802438FC 0C0B1EAF */ jal get_variable -/* 804180 80243900 8C450000 */ lw $a1, ($v0) -/* 804184 80243904 0C0B1059 */ jal does_script_exist -/* 804188 80243908 0040202D */ daddu $a0, $v0, $zero -/* 80418C 8024390C 2C420001 */ sltiu $v0, $v0, 1 -/* 804190 80243910 8FBF0010 */ lw $ra, 0x10($sp) -/* 804194 80243914 00021040 */ sll $v0, $v0, 1 -/* 804198 80243918 03E00008 */ jr $ra -/* 80419C 8024391C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240BB0_9C5F90.s b/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240BB0_9C5F90.s deleted file mode 100644 index 6350b38660..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240BB0_9C5F90.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240BB0_9C5F90 -/* 9C5F90 80240BB0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 9C5F94 80240BB4 AFBF0010 */ sw $ra, 0x10($sp) -/* 9C5F98 80240BB8 8C82000C */ lw $v0, 0xc($a0) -/* 9C5F9C 80240BBC 0C0B1EAF */ jal get_variable -/* 9C5FA0 80240BC0 8C450000 */ lw $a1, ($v0) -/* 9C5FA4 80240BC4 0C0B1059 */ jal does_script_exist -/* 9C5FA8 80240BC8 0040202D */ daddu $a0, $v0, $zero -/* 9C5FAC 80240BCC 2C420001 */ sltiu $v0, $v0, 1 -/* 9C5FB0 80240BD0 8FBF0010 */ lw $ra, 0x10($sp) -/* 9C5FB4 80240BD4 00021040 */ sll $v0, $v0, 1 -/* 9C5FB8 80240BD8 03E00008 */ jr $ra -/* 9C5FBC 80240BDC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240974_D060A4.s b/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240974_D060A4.s deleted file mode 100644 index 2eaaf35507..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240974_D060A4.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240974_D060A4 -/* D060A4 80240974 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D060A8 80240978 AFBF0010 */ sw $ra, 0x10($sp) -/* D060AC 8024097C 8C82000C */ lw $v0, 0xc($a0) -/* D060B0 80240980 0C0B1EAF */ jal get_variable -/* D060B4 80240984 8C450000 */ lw $a1, ($v0) -/* D060B8 80240988 0C0B1059 */ jal does_script_exist -/* D060BC 8024098C 0040202D */ daddu $a0, $v0, $zero -/* D060C0 80240990 2C420001 */ sltiu $v0, $v0, 1 -/* D060C4 80240994 8FBF0010 */ lw $ra, 0x10($sp) -/* D060C8 80240998 00021040 */ sll $v0, $v0, 1 -/* D060CC 8024099C 03E00008 */ jr $ra -/* D060D0 802409A0 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_80242094_D21F24.s b/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_80242094_D21F24.s deleted file mode 100644 index cdb5372ebc..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_80242094_D21F24.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242094_D21F24 -/* D21F24 80242094 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D21F28 80242098 AFBF0010 */ sw $ra, 0x10($sp) -/* D21F2C 8024209C 8C82000C */ lw $v0, 0xc($a0) -/* D21F30 802420A0 0C0B1EAF */ jal get_variable -/* D21F34 802420A4 8C450000 */ lw $a1, ($v0) -/* D21F38 802420A8 0C0B1059 */ jal does_script_exist -/* D21F3C 802420AC 0040202D */ daddu $a0, $v0, $zero -/* D21F40 802420B0 2C420001 */ sltiu $v0, $v0, 1 -/* D21F44 802420B4 8FBF0010 */ lw $ra, 0x10($sp) -/* D21F48 802420B8 00021040 */ sll $v0, $v0, 1 -/* D21F4C 802420BC 03E00008 */ jr $ra -/* D21F50 802420C0 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index 3aa40148ca..83149e5e4e 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -94,7 +94,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_802434CC_96C68C); INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80243548_96C708); -INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_802435C8_96C788); +#include "world/common/NotDoesScriptExist.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index eedf563a06..df7a2a10f6 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -30,7 +30,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802421F0_A1D2F0); INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_8024226C_A1D36C); -INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802422EC_A1D3EC); +#include "world/common/NotDoesScriptExist.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index 009935db8d..fe533e2b8a 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -50,7 +50,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802414F8_B360C8); INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241574_B36144); -INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802415F4_B361C4); +#include "world/common/NotDoesScriptExist.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_kkj/kkj_20/AFDE00.c b/src/world/area_kkj/kkj_20/AFDE00.c index e7148b9e94..9e5f6305d4 100644 --- a/src/world/area_kkj/kkj_20/AFDE00.c +++ b/src/world/area_kkj/kkj_20/AFDE00.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_80240308_AFDE48); INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_80240384_AFDEC4); -INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_80240404_AFDF44); +#include "world/common/NotDoesScriptExist.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_kmr/kmr_02/8B30E0.c b/src/world/area_kmr/kmr_02/8B30E0.c index 084612b528..c5f6ac31b4 100644 --- a/src/world/area_kmr/kmr_02/8B30E0.c +++ b/src/world/area_kmr/kmr_02/8B30E0.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_802430B8_8B3128); INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_80243134_8B31A4); -INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_802431B4_8B3224); +#include "world/common/NotDoesScriptExist.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_kmr/kmr_20/8ED0C0.c b/src/world/area_kmr/kmr_20/8ED0C0.c index e5f3122e66..e978d116de 100644 --- a/src/world/area_kmr/kmr_20/8ED0C0.c +++ b/src/world/area_kmr/kmr_20/8ED0C0.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_802412E8_8ED108); INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_80241364_8ED184); -INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_802413E4_8ED204); +#include "world/common/NotDoesScriptExist.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_kpa/kpa_91/A86A50.c b/src/world/area_kpa/kpa_91/A86A50.c index 8b0d639bbe..9cbdbda024 100644 --- a/src/world/area_kpa/kpa_91/A86A50.c +++ b/src/world/area_kpa/kpa_91/A86A50.c @@ -42,7 +42,7 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_80241570_A87FC0); INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_802415EC_A8803C); -INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_8024166C_A880BC); +#include "world/common/NotDoesScriptExist.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_kpa/kpa_95/A8CB60.c b/src/world/area_kpa/kpa_95/A8CB60.c index a2adfc8a57..07812c57d7 100644 --- a/src/world/area_kpa/kpa_95/A8CB60.c +++ b/src/world/area_kpa/kpa_95/A8CB60.c @@ -42,7 +42,7 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_80241650_A8E0D0); INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_802416CC_A8E14C); -INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_8024174C_A8E1CC); +#include "world/common/NotDoesScriptExist.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index eb8f845ec4..03af03a6ac 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -100,7 +100,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", pause_tutorial_draw_contents_80 INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243870_8040F0); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802438F0_804170); +#include "world/common/NotDoesScriptExist.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index f7b71c1b6b..c4e92f65f6 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -28,7 +28,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240AB4_9C5E94); INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240B30_9C5F10); -INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240BB0_9C5F90); +#include "world/common/NotDoesScriptExist.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index 4b718caf18..5affe1f3de 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240878_D05FA8); INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_802408F4_D06024); -INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240974_D060A4); +#include "world/common/NotDoesScriptExist.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_sam/sam_06/D203E0.c b/src/world/area_sam/sam_06/D203E0.c index e16fd8d903..0a460e3c95 100644 --- a/src/world/area_sam/sam_06/D203E0.c +++ b/src/world/area_sam/sam_06/D203E0.c @@ -46,7 +46,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80241F98_D21E28); INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80242014_D21EA4); -INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80242094_D21F24); +#include "world/common/NotDoesScriptExist.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/common/NotDoesScriptExist.inc.c b/src/world/common/NotDoesScriptExist.inc.c new file mode 100644 index 0000000000..cdd6ce8750 --- /dev/null +++ b/src/world/common/NotDoesScriptExist.inc.c @@ -0,0 +1,5 @@ +#include "common.h" + +static ApiStatus NotDoesScriptExist(ScriptInstance* script, s32 isInitialCall) { + return (!does_script_exist(get_variable(script, *script->ptrReadPos))) * ApiStatus_DONE2; +} From da058dc0950e151abdedf6f0825368d62415d908 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 30 Oct 2020 00:07:11 -0400 Subject: [PATCH 53/78] GetGameStatus75 --- .../dro_01/95B7E0/func_80241FAC_95D1AC.s | 16 ---------------- .../dro_02/9694C0/func_80240E3C_969FFC.s | 16 ---------------- .../hos_03/A1BDB0/func_80242FE0_A1E0E0.s | 16 ---------------- .../jan_02/B2C8A0/func_80242150_B2E5C0.s | 16 ---------------- .../jan_03/B34BD0/func_802426D8_B372A8.s | 16 ---------------- .../kmr_02/8B0070/func_80240ECC_8B0F3C.s | 16 ---------------- .../mac_00/7EB340/func_8024116C_7EBE7C.s | 16 ---------------- .../mac_01/8017D0/func_80242A4C_8032CC.s | 16 ---------------- .../mac_02/823BF0/func_802422FC_8255BC.s | 16 ---------------- .../mac_03/831B20/func_80240FEC_8327EC.s | 16 ---------------- .../mac_04/843030/func_80240F9C_843B6C.s | 16 ---------------- .../mac_05/852170/func_80241E5C_853FCC.s | 16 ---------------- .../nok_01/9C53E0/func_802418A4_9C6C84.s | 16 ---------------- .../nok_02/9D7AA0/func_8024244C_9D946C.s | 16 ---------------- .../sam_01/CF7E80/func_8024123C_CF8DAC.s | 16 ---------------- .../sam_02/D05F60/func_80241668_D06D98.s | 16 ---------------- .../sam_11/D3ADA0/func_8024130C_D3B8DC.s | 16 ---------------- include/common_structs.h | 3 ++- src/world/area_dro/dro_01/95B7E0.c | 2 +- src/world/area_dro/dro_02/9694C0.c | 2 +- src/world/area_hos/hos_03/A1BDB0.c | 2 +- src/world/area_jan/jan_02/B2C8A0.c | 2 +- src/world/area_jan/jan_03/B34BD0.c | 2 +- src/world/area_kmr/kmr_02/8B0070.c | 2 +- src/world/area_mac/mac_00/7EB340.c | 2 +- src/world/area_mac/mac_01/8017D0.c | 2 +- src/world/area_mac/mac_02/823BF0.c | 2 +- src/world/area_mac/mac_03/831B20.c | 2 +- src/world/area_mac/mac_04/843030.c | 2 +- src/world/area_mac/mac_05/852170.c | 2 +- src/world/area_nok/nok_01/9C53E0.c | 2 +- src/world/area_nok/nok_02/9D7AA0.c | 2 +- src/world/area_sam/sam_01/CF7E80.c | 2 +- src/world/area_sam/sam_02/D05F60.c | 2 +- src/world/area_sam/sam_11/D3ADA0.c | 2 +- src/world/common/GetGameStatus75.inc.c | 6 ++++++ 36 files changed, 25 insertions(+), 290 deletions(-) delete mode 100644 asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80241FAC_95D1AC.s delete mode 100644 asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240E3C_969FFC.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80242FE0_A1E0E0.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242150_B2E5C0.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802426D8_B372A8.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80240ECC_8B0F3C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024116C_7EBE7C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242A4C_8032CC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802422FC_8255BC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_03/831B20/func_80240FEC_8327EC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_04/843030/func_80240F9C_843B6C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_05/852170/func_80241E5C_853FCC.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_802418A4_9C6C84.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_8024244C_9D946C.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024123C_CF8DAC.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80241668_D06D98.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_8024130C_D3B8DC.s create mode 100644 src/world/common/GetGameStatus75.inc.c diff --git a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80241FAC_95D1AC.s b/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80241FAC_95D1AC.s deleted file mode 100644 index 2c1668a23a..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80241FAC_95D1AC.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241FAC_95D1AC -/* 95D1AC 80241FAC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 95D1B0 80241FB0 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 95D1B4 80241FB4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 95D1B8 80241FB8 3C05FE36 */ lui $a1, 0xfe36 -/* 95D1BC 80241FBC AFBF0010 */ sw $ra, 0x10($sp) -/* 95D1C0 80241FC0 80460075 */ lb $a2, 0x75($v0) -/* 95D1C4 80241FC4 0C0B2026 */ jal set_variable -/* 95D1C8 80241FC8 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 95D1CC 80241FCC 8FBF0010 */ lw $ra, 0x10($sp) -/* 95D1D0 80241FD0 24020002 */ addiu $v0, $zero, 2 -/* 95D1D4 80241FD4 03E00008 */ jr $ra -/* 95D1D8 80241FD8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240E3C_969FFC.s b/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240E3C_969FFC.s deleted file mode 100644 index 14fe34bfc1..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240E3C_969FFC.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240E3C_969FFC -/* 969FFC 80240E3C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 96A000 80240E40 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 96A004 80240E44 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 96A008 80240E48 3C05FE36 */ lui $a1, 0xfe36 -/* 96A00C 80240E4C AFBF0010 */ sw $ra, 0x10($sp) -/* 96A010 80240E50 80460075 */ lb $a2, 0x75($v0) -/* 96A014 80240E54 0C0B2026 */ jal set_variable -/* 96A018 80240E58 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 96A01C 80240E5C 8FBF0010 */ lw $ra, 0x10($sp) -/* 96A020 80240E60 24020002 */ addiu $v0, $zero, 2 -/* 96A024 80240E64 03E00008 */ jr $ra -/* 96A028 80240E68 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80242FE0_A1E0E0.s b/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80242FE0_A1E0E0.s deleted file mode 100644 index b17c26eeea..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80242FE0_A1E0E0.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242FE0_A1E0E0 -/* A1E0E0 80242FE0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A1E0E4 80242FE4 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* A1E0E8 80242FE8 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* A1E0EC 80242FEC 3C05FE36 */ lui $a1, 0xfe36 -/* A1E0F0 80242FF0 AFBF0010 */ sw $ra, 0x10($sp) -/* A1E0F4 80242FF4 80460075 */ lb $a2, 0x75($v0) -/* A1E0F8 80242FF8 0C0B2026 */ jal set_variable -/* A1E0FC 80242FFC 34A53C80 */ ori $a1, $a1, 0x3c80 -/* A1E100 80243000 8FBF0010 */ lw $ra, 0x10($sp) -/* A1E104 80243004 24020002 */ addiu $v0, $zero, 2 -/* A1E108 80243008 03E00008 */ jr $ra -/* A1E10C 8024300C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242150_B2E5C0.s b/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242150_B2E5C0.s deleted file mode 100644 index d52189f12e..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242150_B2E5C0.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242150_B2E5C0 -/* B2E5C0 80242150 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B2E5C4 80242154 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* B2E5C8 80242158 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* B2E5CC 8024215C 3C05FE36 */ lui $a1, 0xfe36 -/* B2E5D0 80242160 AFBF0010 */ sw $ra, 0x10($sp) -/* B2E5D4 80242164 80460075 */ lb $a2, 0x75($v0) -/* B2E5D8 80242168 0C0B2026 */ jal set_variable -/* B2E5DC 8024216C 34A53C80 */ ori $a1, $a1, 0x3c80 -/* B2E5E0 80242170 8FBF0010 */ lw $ra, 0x10($sp) -/* B2E5E4 80242174 24020002 */ addiu $v0, $zero, 2 -/* B2E5E8 80242178 03E00008 */ jr $ra -/* B2E5EC 8024217C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802426D8_B372A8.s b/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802426D8_B372A8.s deleted file mode 100644 index 764671914f..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802426D8_B372A8.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802426D8_B372A8 -/* B372A8 802426D8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B372AC 802426DC 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* B372B0 802426E0 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* B372B4 802426E4 3C05FE36 */ lui $a1, 0xfe36 -/* B372B8 802426E8 AFBF0010 */ sw $ra, 0x10($sp) -/* B372BC 802426EC 80460075 */ lb $a2, 0x75($v0) -/* B372C0 802426F0 0C0B2026 */ jal set_variable -/* B372C4 802426F4 34A53C80 */ ori $a1, $a1, 0x3c80 -/* B372C8 802426F8 8FBF0010 */ lw $ra, 0x10($sp) -/* B372CC 802426FC 24020002 */ addiu $v0, $zero, 2 -/* B372D0 80242700 03E00008 */ jr $ra -/* B372D4 80242704 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80240ECC_8B0F3C.s b/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80240ECC_8B0F3C.s deleted file mode 100644 index c12dac7408..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80240ECC_8B0F3C.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240ECC_8B0F3C -/* 8B0F3C 80240ECC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8B0F40 80240ED0 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 8B0F44 80240ED4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 8B0F48 80240ED8 3C05FE36 */ lui $a1, 0xfe36 -/* 8B0F4C 80240EDC AFBF0010 */ sw $ra, 0x10($sp) -/* 8B0F50 80240EE0 80460075 */ lb $a2, 0x75($v0) -/* 8B0F54 80240EE4 0C0B2026 */ jal set_variable -/* 8B0F58 80240EE8 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 8B0F5C 80240EEC 8FBF0010 */ lw $ra, 0x10($sp) -/* 8B0F60 80240EF0 24020002 */ addiu $v0, $zero, 2 -/* 8B0F64 80240EF4 03E00008 */ jr $ra -/* 8B0F68 80240EF8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024116C_7EBE7C.s b/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024116C_7EBE7C.s deleted file mode 100644 index d7ffbd5013..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024116C_7EBE7C.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024116C_7EBE7C -/* 7EBE7C 8024116C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 7EBE80 80241170 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 7EBE84 80241174 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 7EBE88 80241178 3C05FE36 */ lui $a1, 0xfe36 -/* 7EBE8C 8024117C AFBF0010 */ sw $ra, 0x10($sp) -/* 7EBE90 80241180 80460075 */ lb $a2, 0x75($v0) -/* 7EBE94 80241184 0C0B2026 */ jal set_variable -/* 7EBE98 80241188 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 7EBE9C 8024118C 8FBF0010 */ lw $ra, 0x10($sp) -/* 7EBEA0 80241190 24020002 */ addiu $v0, $zero, 2 -/* 7EBEA4 80241194 03E00008 */ jr $ra -/* 7EBEA8 80241198 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242A4C_8032CC.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242A4C_8032CC.s deleted file mode 100644 index 883819a6bd..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242A4C_8032CC.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242A4C_8032CC -/* 8032CC 80242A4C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8032D0 80242A50 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 8032D4 80242A54 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 8032D8 80242A58 3C05FE36 */ lui $a1, 0xfe36 -/* 8032DC 80242A5C AFBF0010 */ sw $ra, 0x10($sp) -/* 8032E0 80242A60 80460075 */ lb $a2, 0x75($v0) -/* 8032E4 80242A64 0C0B2026 */ jal set_variable -/* 8032E8 80242A68 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 8032EC 80242A6C 8FBF0010 */ lw $ra, 0x10($sp) -/* 8032F0 80242A70 24020002 */ addiu $v0, $zero, 2 -/* 8032F4 80242A74 03E00008 */ jr $ra -/* 8032F8 80242A78 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802422FC_8255BC.s b/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802422FC_8255BC.s deleted file mode 100644 index 5725780ba2..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802422FC_8255BC.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802422FC_8255BC -/* 8255BC 802422FC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8255C0 80242300 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 8255C4 80242304 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 8255C8 80242308 3C05FE36 */ lui $a1, 0xfe36 -/* 8255CC 8024230C AFBF0010 */ sw $ra, 0x10($sp) -/* 8255D0 80242310 80460075 */ lb $a2, 0x75($v0) -/* 8255D4 80242314 0C0B2026 */ jal set_variable -/* 8255D8 80242318 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 8255DC 8024231C 8FBF0010 */ lw $ra, 0x10($sp) -/* 8255E0 80242320 24020002 */ addiu $v0, $zero, 2 -/* 8255E4 80242324 03E00008 */ jr $ra -/* 8255E8 80242328 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_80240FEC_8327EC.s b/asm/nonmatchings/world/area_mac/mac_03/831B20/func_80240FEC_8327EC.s deleted file mode 100644 index 4949f1e384..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_80240FEC_8327EC.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240FEC_8327EC -/* 8327EC 80240FEC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8327F0 80240FF0 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 8327F4 80240FF4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 8327F8 80240FF8 3C05FE36 */ lui $a1, 0xfe36 -/* 8327FC 80240FFC AFBF0010 */ sw $ra, 0x10($sp) -/* 832800 80241000 80460075 */ lb $a2, 0x75($v0) -/* 832804 80241004 0C0B2026 */ jal set_variable -/* 832808 80241008 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 83280C 8024100C 8FBF0010 */ lw $ra, 0x10($sp) -/* 832810 80241010 24020002 */ addiu $v0, $zero, 2 -/* 832814 80241014 03E00008 */ jr $ra -/* 832818 80241018 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_04/843030/func_80240F9C_843B6C.s b/asm/nonmatchings/world/area_mac/mac_04/843030/func_80240F9C_843B6C.s deleted file mode 100644 index c9949efe6f..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_04/843030/func_80240F9C_843B6C.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240F9C_843B6C -/* 843B6C 80240F9C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 843B70 80240FA0 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 843B74 80240FA4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 843B78 80240FA8 3C05FE36 */ lui $a1, 0xfe36 -/* 843B7C 80240FAC AFBF0010 */ sw $ra, 0x10($sp) -/* 843B80 80240FB0 80460075 */ lb $a2, 0x75($v0) -/* 843B84 80240FB4 0C0B2026 */ jal set_variable -/* 843B88 80240FB8 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 843B8C 80240FBC 8FBF0010 */ lw $ra, 0x10($sp) -/* 843B90 80240FC0 24020002 */ addiu $v0, $zero, 2 -/* 843B94 80240FC4 03E00008 */ jr $ra -/* 843B98 80240FC8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_05/852170/func_80241E5C_853FCC.s b/asm/nonmatchings/world/area_mac/mac_05/852170/func_80241E5C_853FCC.s deleted file mode 100644 index 2448ab78c2..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_05/852170/func_80241E5C_853FCC.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241E5C_853FCC -/* 853FCC 80241E5C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 853FD0 80241E60 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 853FD4 80241E64 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 853FD8 80241E68 3C05FE36 */ lui $a1, 0xfe36 -/* 853FDC 80241E6C AFBF0010 */ sw $ra, 0x10($sp) -/* 853FE0 80241E70 80460075 */ lb $a2, 0x75($v0) -/* 853FE4 80241E74 0C0B2026 */ jal set_variable -/* 853FE8 80241E78 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 853FEC 80241E7C 8FBF0010 */ lw $ra, 0x10($sp) -/* 853FF0 80241E80 24020002 */ addiu $v0, $zero, 2 -/* 853FF4 80241E84 03E00008 */ jr $ra -/* 853FF8 80241E88 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_802418A4_9C6C84.s b/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_802418A4_9C6C84.s deleted file mode 100644 index 77956f0cbe..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_802418A4_9C6C84.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802418A4_9C6C84 -/* 9C6C84 802418A4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 9C6C88 802418A8 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 9C6C8C 802418AC 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 9C6C90 802418B0 3C05FE36 */ lui $a1, 0xfe36 -/* 9C6C94 802418B4 AFBF0010 */ sw $ra, 0x10($sp) -/* 9C6C98 802418B8 80460075 */ lb $a2, 0x75($v0) -/* 9C6C9C 802418BC 0C0B2026 */ jal set_variable -/* 9C6CA0 802418C0 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 9C6CA4 802418C4 8FBF0010 */ lw $ra, 0x10($sp) -/* 9C6CA8 802418C8 24020002 */ addiu $v0, $zero, 2 -/* 9C6CAC 802418CC 03E00008 */ jr $ra -/* 9C6CB0 802418D0 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_8024244C_9D946C.s b/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_8024244C_9D946C.s deleted file mode 100644 index 0cbfc43145..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_8024244C_9D946C.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024244C_9D946C -/* 9D946C 8024244C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 9D9470 80242450 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 9D9474 80242454 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 9D9478 80242458 3C05FE36 */ lui $a1, 0xfe36 -/* 9D947C 8024245C AFBF0010 */ sw $ra, 0x10($sp) -/* 9D9480 80242460 80460075 */ lb $a2, 0x75($v0) -/* 9D9484 80242464 0C0B2026 */ jal set_variable -/* 9D9488 80242468 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 9D948C 8024246C 8FBF0010 */ lw $ra, 0x10($sp) -/* 9D9490 80242470 24020002 */ addiu $v0, $zero, 2 -/* 9D9494 80242474 03E00008 */ jr $ra -/* 9D9498 80242478 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024123C_CF8DAC.s b/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024123C_CF8DAC.s deleted file mode 100644 index ab47e3b9d1..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024123C_CF8DAC.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024123C_CF8DAC -/* CF8DAC 8024123C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* CF8DB0 80241240 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* CF8DB4 80241244 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* CF8DB8 80241248 3C05FE36 */ lui $a1, 0xfe36 -/* CF8DBC 8024124C AFBF0010 */ sw $ra, 0x10($sp) -/* CF8DC0 80241250 80460075 */ lb $a2, 0x75($v0) -/* CF8DC4 80241254 0C0B2026 */ jal set_variable -/* CF8DC8 80241258 34A53C80 */ ori $a1, $a1, 0x3c80 -/* CF8DCC 8024125C 8FBF0010 */ lw $ra, 0x10($sp) -/* CF8DD0 80241260 24020002 */ addiu $v0, $zero, 2 -/* CF8DD4 80241264 03E00008 */ jr $ra -/* CF8DD8 80241268 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80241668_D06D98.s b/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80241668_D06D98.s deleted file mode 100644 index 05d98f2420..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80241668_D06D98.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241668_D06D98 -/* D06D98 80241668 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D06D9C 8024166C 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* D06DA0 80241670 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* D06DA4 80241674 3C05FE36 */ lui $a1, 0xfe36 -/* D06DA8 80241678 AFBF0010 */ sw $ra, 0x10($sp) -/* D06DAC 8024167C 80460075 */ lb $a2, 0x75($v0) -/* D06DB0 80241680 0C0B2026 */ jal set_variable -/* D06DB4 80241684 34A53C80 */ ori $a1, $a1, 0x3c80 -/* D06DB8 80241688 8FBF0010 */ lw $ra, 0x10($sp) -/* D06DBC 8024168C 24020002 */ addiu $v0, $zero, 2 -/* D06DC0 80241690 03E00008 */ jr $ra -/* D06DC4 80241694 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_8024130C_D3B8DC.s b/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_8024130C_D3B8DC.s deleted file mode 100644 index 1c74a349fd..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_8024130C_D3B8DC.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024130C_D3B8DC -/* D3B8DC 8024130C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D3B8E0 80241310 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* D3B8E4 80241314 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* D3B8E8 80241318 3C05FE36 */ lui $a1, 0xfe36 -/* D3B8EC 8024131C AFBF0010 */ sw $ra, 0x10($sp) -/* D3B8F0 80241320 80460075 */ lb $a2, 0x75($v0) -/* D3B8F4 80241324 0C0B2026 */ jal set_variable -/* D3B8F8 80241328 34A53C80 */ ori $a1, $a1, 0x3c80 -/* D3B8FC 8024132C 8FBF0010 */ lw $ra, 0x10($sp) -/* D3B900 80241330 24020002 */ addiu $v0, $zero, 2 -/* D3B904 80241334 03E00008 */ jr $ra -/* D3B908 80241338 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/include/common_structs.h b/include/common_structs.h index a10f482c20..ddba0e53cd 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -879,7 +879,8 @@ typedef struct GameStatus { /* 0x071 */ s8 demoState; /* (0 = not demo, 1 = map demo, 2 = demo map changing) */ /* 0x072 */ u8 nextDemoScene; /* which part of the demo to play next */ /* 0x073 */ u8 contBitPattern; - /* 0x074 */ char unk_74[2]; + /* 0x074 */ char unk_74; + /* 0x075 */ s8 unk_75; /* 0x076 */ s8 unk_76; /* 0x077 */ char unk_77; /* 0x078 */ s8 disableScripts; diff --git a/src/world/area_dro/dro_01/95B7E0.c b/src/world/area_dro/dro_01/95B7E0.c index e3efb1148d..22ec45c565 100644 --- a/src/world/area_dro/dro_01/95B7E0.c +++ b/src/world/area_dro/dro_01/95B7E0.c @@ -58,7 +58,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80241F78_95D178); INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80241F94_95D194); -INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80241FAC_95D1AC); +#include "world/common/GetGameStatus75.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80241FDC_95D1DC); diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index 83149e5e4e..a9474f9dd1 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -34,7 +34,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80240E08_969FC8); INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80240E24_969FE4); -INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80240E3C_969FFC); +#include "world/common/GetGameStatus75.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80240E6C_96A02C); diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index df7a2a10f6..38a86a3bdf 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -78,7 +78,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242FAC_A1E0AC); INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242FC8_A1E0C8); -INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242FE0_A1E0E0); +#include "world/common/GetGameStatus75.inc.c" INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80243010_A1E110); diff --git a/src/world/area_jan/jan_02/B2C8A0.c b/src/world/area_jan/jan_02/B2C8A0.c index 5b4e06e2c4..3b851deac3 100644 --- a/src/world/area_jan/jan_02/B2C8A0.c +++ b/src/world/area_jan/jan_02/B2C8A0.c @@ -68,7 +68,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_8024211C_B2E58C); INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80242138_B2E5A8); -INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80242150_B2E5C0); +#include "world/common/GetGameStatus75.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80242180_B2E5F0); diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index fe533e2b8a..a3c05adbbb 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -110,7 +110,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802426A4_B37274); INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802426C0_B37290); -INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802426D8_B372A8); +#include "world/common/GetGameStatus75.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80242708_B372D8); diff --git a/src/world/area_kmr/kmr_02/8B0070.c b/src/world/area_kmr/kmr_02/8B0070.c index 8d220bd67d..4bd0517de5 100644 --- a/src/world/area_kmr/kmr_02/8B0070.c +++ b/src/world/area_kmr/kmr_02/8B0070.c @@ -50,7 +50,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240E98_8B0F08); INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240EB4_8B0F24); -INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240ECC_8B0F3C); +#include "world/common/GetGameStatus75.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240EFC_8B0F6C); diff --git a/src/world/area_mac/mac_00/7EB340.c b/src/world/area_mac/mac_00/7EB340.c index cc917dc914..ff665da249 100644 --- a/src/world/area_mac/mac_00/7EB340.c +++ b/src/world/area_mac/mac_00/7EB340.c @@ -34,7 +34,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241138_7EBE48); INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241154_7EBE64); -INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_8024116C_7EBE7C); +#include "world/common/GetGameStatus75.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_8024119C_7EBEAC); diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index 03af03a6ac..6f9f9137e3 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -60,7 +60,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242A18_803298); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242A34_8032B4); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242A4C_8032CC); +#include "world/common/GetGameStatus75.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242A7C_8032FC); diff --git a/src/world/area_mac/mac_02/823BF0.c b/src/world/area_mac/mac_02/823BF0.c index 27384dfcc6..bcd3e2f306 100644 --- a/src/world/area_mac/mac_02/823BF0.c +++ b/src/world/area_mac/mac_02/823BF0.c @@ -58,7 +58,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802422C8_825588); INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802422E4_8255A4); -INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802422FC_8255BC); +#include "world/common/GetGameStatus75.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_8024232C_8255EC); diff --git a/src/world/area_mac/mac_03/831B20.c b/src/world/area_mac/mac_03/831B20.c index 9cfe529fe9..570b5a783d 100644 --- a/src/world/area_mac/mac_03/831B20.c +++ b/src/world/area_mac/mac_03/831B20.c @@ -36,7 +36,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80240FB8_8327B8); INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80240FD4_8327D4); -INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80240FEC_8327EC); +#include "world/common/GetGameStatus75.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_8024101C_83281C); diff --git a/src/world/area_mac/mac_04/843030.c b/src/world/area_mac/mac_04/843030.c index ead724658c..6b8e166615 100644 --- a/src/world/area_mac/mac_04/843030.c +++ b/src/world/area_mac/mac_04/843030.c @@ -34,7 +34,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240F68_843B38); INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240F84_843B54); -INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240F9C_843B6C); +#include "world/common/GetGameStatus75.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240FCC_843B9C); diff --git a/src/world/area_mac/mac_05/852170.c b/src/world/area_mac/mac_05/852170.c index aec6a9d2da..4d8d5c54b7 100644 --- a/src/world/area_mac/mac_05/852170.c +++ b/src/world/area_mac/mac_05/852170.c @@ -66,7 +66,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241E28_853F98); INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241E44_853FB4); -INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241E5C_853FCC); +#include "world/common/GetGameStatus75.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241E8C_853FFC); diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index c4e92f65f6..535dc3b510 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -76,7 +76,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80241870_9C6C50); INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_8024188C_9C6C6C); -INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_802418A4_9C6C84); +#include "world/common/GetGameStatus75.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_802418D4_9C6CB4); diff --git a/src/world/area_nok/nok_02/9D7AA0.c b/src/world/area_nok/nok_02/9D7AA0.c index 573f2ad2ad..664291827c 100644 --- a/src/world/area_nok/nok_02/9D7AA0.c +++ b/src/world/area_nok/nok_02/9D7AA0.c @@ -58,7 +58,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242418_9D9438); INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242434_9D9454); -INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_8024244C_9D946C); +#include "world/common/GetGameStatus75.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_8024247C_9D949C); diff --git a/src/world/area_sam/sam_01/CF7E80.c b/src/world/area_sam/sam_01/CF7E80.c index 0869a20d70..69254b3d83 100644 --- a/src/world/area_sam/sam_01/CF7E80.c +++ b/src/world/area_sam/sam_01/CF7E80.c @@ -46,7 +46,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80241208_CF8D78); INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80241224_CF8D94); -INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_8024123C_CF8DAC); +#include "world/common/GetGameStatus75.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_8024126C_CF8DDC); diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index 5affe1f3de..3ddca1dd30 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -56,7 +56,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80241634_D06D64); INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80241650_D06D80); -INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80241668_D06D98); +#include "world/common/GetGameStatus75.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80241698_D06DC8); diff --git a/src/world/area_sam/sam_11/D3ADA0.c b/src/world/area_sam/sam_11/D3ADA0.c index e355401aea..19820e5db8 100644 --- a/src/world/area_sam/sam_11/D3ADA0.c +++ b/src/world/area_sam/sam_11/D3ADA0.c @@ -34,7 +34,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802412D8_D3B8A8); INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802412F4_D3B8C4); -INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_8024130C_D3B8DC); +#include "world/common/GetGameStatus75.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_8024133C_D3B90C); diff --git a/src/world/common/GetGameStatus75.inc.c b/src/world/common/GetGameStatus75.inc.c new file mode 100644 index 0000000000..952ed80cde --- /dev/null +++ b/src/world/common/GetGameStatus75.inc.c @@ -0,0 +1,6 @@ +#include "common.h" + +static ApiStatus GetGameStatus75(ScriptInstance* script, s32 isInitialCall) { + set_variable(script, SI_VAR(0), GAME_STATUS->unk_75); + return ApiStatus_DONE2; +} From 83a5d82fbd380458762bfb7666c65a963486e5e0 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 30 Oct 2020 00:15:44 -0400 Subject: [PATCH 54/78] GetPartnerCall800EB168 --- .../dro_02/9694C0/func_80243714_96C8D4.s | 17 ----------------- .../hos_03/A1BDB0/func_80242438_A1D538.s | 17 ----------------- .../jan_03/B34BD0/func_80241740_B36310.s | 17 ----------------- .../kkj_20/AFDE00/func_80240550_AFE090.s | 17 ----------------- .../kmr_02/8B30E0/func_80243300_8B3370.s | 17 ----------------- .../kmr_20/8ED0C0/func_80241530_8ED350.s | 17 ----------------- .../kpa_91/A86A50/func_802417B8_A88208.s | 17 ----------------- .../kpa_95/A8CB60/func_80241898_A8E318.s | 17 ----------------- .../mac_01/8017D0/func_80243A3C_8042BC.s | 17 ----------------- .../nok_01/9C53E0/func_80240CFC_9C60DC.s | 17 ----------------- .../sam_02/D05F60/func_80240AC0_D061F0.s | 17 ----------------- .../sam_06/D203E0/func_802421E0_D22070.s | 17 ----------------- src/world/area_dro/dro_02/9694C0.c | 4 +--- src/world/area_hos/hos_03/A1BDB0.c | 4 +--- src/world/area_jan/jan_03/B34BD0.c | 4 +--- src/world/area_kkj/kkj_20/AFDE00.c | 4 +--- src/world/area_kmr/kmr_02/8B30E0.c | 4 +--- src/world/area_kmr/kmr_20/8ED0C0.c | 4 +--- src/world/area_kpa/kpa_91/A86A50.c | 4 +--- src/world/area_kpa/kpa_95/A8CB60.c | 4 +--- src/world/area_mac/mac_01/8017D0.c | 4 +--- src/world/area_nok/nok_01/9C53E0.c | 4 +--- src/world/area_sam/sam_02/D05F60.c | 4 +--- src/world/area_sam/sam_06/D203E0.c | 4 +--- src/world/common/Call800EB168.inc.c | 6 ------ src/world/common/GetPartnerCall800EB168.inc.c | 12 ++++++++++++ 26 files changed, 24 insertions(+), 246 deletions(-) delete mode 100644 asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80243714_96C8D4.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80242438_A1D538.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241740_B36310.s delete mode 100644 asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240550_AFE090.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243300_8B3370.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_80241530_8ED350.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_802417B8_A88208.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_80241898_A8E318.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243A3C_8042BC.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240CFC_9C60DC.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240AC0_D061F0.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_06/D203E0/func_802421E0_D22070.s delete mode 100644 src/world/common/Call800EB168.inc.c create mode 100644 src/world/common/GetPartnerCall800EB168.inc.c diff --git a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80243714_96C8D4.s b/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80243714_96C8D4.s deleted file mode 100644 index 1176828dd0..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80243714_96C8D4.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243714_96C8D4 -/* 96C8D4 80243714 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 96C8D8 80243718 AFBF0010 */ sw $ra, 0x10($sp) -/* 96C8DC 8024371C 8C82000C */ lw $v0, 0xc($a0) -/* 96C8E0 80243720 3C068011 */ lui $a2, 0x8011 -/* 96C8E4 80243724 80C6F2A2 */ lb $a2, -0xd5e($a2) -/* 96C8E8 80243728 0C0B2026 */ jal set_variable -/* 96C8EC 8024372C 8C450000 */ lw $a1, ($v0) -/* 96C8F0 80243730 0C03AC5A */ jal func_800EB168 -/* 96C8F4 80243734 0000202D */ daddu $a0, $zero, $zero -/* 96C8F8 80243738 8FBF0010 */ lw $ra, 0x10($sp) -/* 96C8FC 8024373C 24020002 */ addiu $v0, $zero, 2 -/* 96C900 80243740 03E00008 */ jr $ra -/* 96C904 80243744 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80242438_A1D538.s b/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80242438_A1D538.s deleted file mode 100644 index 35bd20a86d..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80242438_A1D538.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242438_A1D538 -/* A1D538 80242438 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A1D53C 8024243C AFBF0010 */ sw $ra, 0x10($sp) -/* A1D540 80242440 8C82000C */ lw $v0, 0xc($a0) -/* A1D544 80242444 3C068011 */ lui $a2, 0x8011 -/* A1D548 80242448 80C6F2A2 */ lb $a2, -0xd5e($a2) -/* A1D54C 8024244C 0C0B2026 */ jal set_variable -/* A1D550 80242450 8C450000 */ lw $a1, ($v0) -/* A1D554 80242454 0C03AC5A */ jal func_800EB168 -/* A1D558 80242458 0000202D */ daddu $a0, $zero, $zero -/* A1D55C 8024245C 8FBF0010 */ lw $ra, 0x10($sp) -/* A1D560 80242460 24020002 */ addiu $v0, $zero, 2 -/* A1D564 80242464 03E00008 */ jr $ra -/* A1D568 80242468 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241740_B36310.s b/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241740_B36310.s deleted file mode 100644 index e6fbcb7c61..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80241740_B36310.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241740_B36310 -/* B36310 80241740 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* B36314 80241744 AFBF0010 */ sw $ra, 0x10($sp) -/* B36318 80241748 8C82000C */ lw $v0, 0xc($a0) -/* B3631C 8024174C 3C068011 */ lui $a2, 0x8011 -/* B36320 80241750 80C6F2A2 */ lb $a2, -0xd5e($a2) -/* B36324 80241754 0C0B2026 */ jal set_variable -/* B36328 80241758 8C450000 */ lw $a1, ($v0) -/* B3632C 8024175C 0C03AC5A */ jal func_800EB168 -/* B36330 80241760 0000202D */ daddu $a0, $zero, $zero -/* B36334 80241764 8FBF0010 */ lw $ra, 0x10($sp) -/* B36338 80241768 24020002 */ addiu $v0, $zero, 2 -/* B3633C 8024176C 03E00008 */ jr $ra -/* B36340 80241770 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240550_AFE090.s b/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240550_AFE090.s deleted file mode 100644 index 7560858316..0000000000 --- a/asm/nonmatchings/world/area_kkj/kkj_20/AFDE00/func_80240550_AFE090.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240550_AFE090 -/* AFE090 80240550 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* AFE094 80240554 AFBF0010 */ sw $ra, 0x10($sp) -/* AFE098 80240558 8C82000C */ lw $v0, 0xc($a0) -/* AFE09C 8024055C 3C068011 */ lui $a2, 0x8011 -/* AFE0A0 80240560 80C6F2A2 */ lb $a2, -0xd5e($a2) -/* AFE0A4 80240564 0C0B2026 */ jal set_variable -/* AFE0A8 80240568 8C450000 */ lw $a1, ($v0) -/* AFE0AC 8024056C 0C03AC5A */ jal func_800EB168 -/* AFE0B0 80240570 0000202D */ daddu $a0, $zero, $zero -/* AFE0B4 80240574 8FBF0010 */ lw $ra, 0x10($sp) -/* AFE0B8 80240578 24020002 */ addiu $v0, $zero, 2 -/* AFE0BC 8024057C 03E00008 */ jr $ra -/* AFE0C0 80240580 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243300_8B3370.s b/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243300_8B3370.s deleted file mode 100644 index ccad403851..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_02/8B30E0/func_80243300_8B3370.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243300_8B3370 -/* 8B3370 80243300 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8B3374 80243304 AFBF0010 */ sw $ra, 0x10($sp) -/* 8B3378 80243308 8C82000C */ lw $v0, 0xc($a0) -/* 8B337C 8024330C 3C068011 */ lui $a2, 0x8011 -/* 8B3380 80243310 80C6F2A2 */ lb $a2, -0xd5e($a2) -/* 8B3384 80243314 0C0B2026 */ jal set_variable -/* 8B3388 80243318 8C450000 */ lw $a1, ($v0) -/* 8B338C 8024331C 0C03AC5A */ jal func_800EB168 -/* 8B3390 80243320 0000202D */ daddu $a0, $zero, $zero -/* 8B3394 80243324 8FBF0010 */ lw $ra, 0x10($sp) -/* 8B3398 80243328 24020002 */ addiu $v0, $zero, 2 -/* 8B339C 8024332C 03E00008 */ jr $ra -/* 8B33A0 80243330 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_80241530_8ED350.s b/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_80241530_8ED350.s deleted file mode 100644 index 19cf43f203..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_20/8ED0C0/func_80241530_8ED350.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241530_8ED350 -/* 8ED350 80241530 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8ED354 80241534 AFBF0010 */ sw $ra, 0x10($sp) -/* 8ED358 80241538 8C82000C */ lw $v0, 0xc($a0) -/* 8ED35C 8024153C 3C068011 */ lui $a2, 0x8011 -/* 8ED360 80241540 80C6F2A2 */ lb $a2, -0xd5e($a2) -/* 8ED364 80241544 0C0B2026 */ jal set_variable -/* 8ED368 80241548 8C450000 */ lw $a1, ($v0) -/* 8ED36C 8024154C 0C03AC5A */ jal func_800EB168 -/* 8ED370 80241550 0000202D */ daddu $a0, $zero, $zero -/* 8ED374 80241554 8FBF0010 */ lw $ra, 0x10($sp) -/* 8ED378 80241558 24020002 */ addiu $v0, $zero, 2 -/* 8ED37C 8024155C 03E00008 */ jr $ra -/* 8ED380 80241560 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_802417B8_A88208.s b/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_802417B8_A88208.s deleted file mode 100644 index d967f519bb..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_91/A86A50/func_802417B8_A88208.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802417B8_A88208 -/* A88208 802417B8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A8820C 802417BC AFBF0010 */ sw $ra, 0x10($sp) -/* A88210 802417C0 8C82000C */ lw $v0, 0xc($a0) -/* A88214 802417C4 3C068011 */ lui $a2, 0x8011 -/* A88218 802417C8 80C6F2A2 */ lb $a2, -0xd5e($a2) -/* A8821C 802417CC 0C0B2026 */ jal set_variable -/* A88220 802417D0 8C450000 */ lw $a1, ($v0) -/* A88224 802417D4 0C03AC5A */ jal func_800EB168 -/* A88228 802417D8 0000202D */ daddu $a0, $zero, $zero -/* A8822C 802417DC 8FBF0010 */ lw $ra, 0x10($sp) -/* A88230 802417E0 24020002 */ addiu $v0, $zero, 2 -/* A88234 802417E4 03E00008 */ jr $ra -/* A88238 802417E8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_80241898_A8E318.s b/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_80241898_A8E318.s deleted file mode 100644 index 5a7bda3260..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_95/A8CB60/func_80241898_A8E318.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241898_A8E318 -/* A8E318 80241898 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A8E31C 8024189C AFBF0010 */ sw $ra, 0x10($sp) -/* A8E320 802418A0 8C82000C */ lw $v0, 0xc($a0) -/* A8E324 802418A4 3C068011 */ lui $a2, 0x8011 -/* A8E328 802418A8 80C6F2A2 */ lb $a2, -0xd5e($a2) -/* A8E32C 802418AC 0C0B2026 */ jal set_variable -/* A8E330 802418B0 8C450000 */ lw $a1, ($v0) -/* A8E334 802418B4 0C03AC5A */ jal func_800EB168 -/* A8E338 802418B8 0000202D */ daddu $a0, $zero, $zero -/* A8E33C 802418BC 8FBF0010 */ lw $ra, 0x10($sp) -/* A8E340 802418C0 24020002 */ addiu $v0, $zero, 2 -/* A8E344 802418C4 03E00008 */ jr $ra -/* A8E348 802418C8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243A3C_8042BC.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243A3C_8042BC.s deleted file mode 100644 index da4540da2d..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80243A3C_8042BC.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243A3C_8042BC -/* 8042BC 80243A3C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8042C0 80243A40 AFBF0010 */ sw $ra, 0x10($sp) -/* 8042C4 80243A44 8C82000C */ lw $v0, 0xc($a0) -/* 8042C8 80243A48 3C068011 */ lui $a2, 0x8011 -/* 8042CC 80243A4C 80C6F2A2 */ lb $a2, -0xd5e($a2) -/* 8042D0 80243A50 0C0B2026 */ jal set_variable -/* 8042D4 80243A54 8C450000 */ lw $a1, ($v0) -/* 8042D8 80243A58 0C03AC5A */ jal func_800EB168 -/* 8042DC 80243A5C 0000202D */ daddu $a0, $zero, $zero -/* 8042E0 80243A60 8FBF0010 */ lw $ra, 0x10($sp) -/* 8042E4 80243A64 24020002 */ addiu $v0, $zero, 2 -/* 8042E8 80243A68 03E00008 */ jr $ra -/* 8042EC 80243A6C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240CFC_9C60DC.s b/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240CFC_9C60DC.s deleted file mode 100644 index fff7263a9d..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80240CFC_9C60DC.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240CFC_9C60DC -/* 9C60DC 80240CFC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 9C60E0 80240D00 AFBF0010 */ sw $ra, 0x10($sp) -/* 9C60E4 80240D04 8C82000C */ lw $v0, 0xc($a0) -/* 9C60E8 80240D08 3C068011 */ lui $a2, 0x8011 -/* 9C60EC 80240D0C 80C6F2A2 */ lb $a2, -0xd5e($a2) -/* 9C60F0 80240D10 0C0B2026 */ jal set_variable -/* 9C60F4 80240D14 8C450000 */ lw $a1, ($v0) -/* 9C60F8 80240D18 0C03AC5A */ jal func_800EB168 -/* 9C60FC 80240D1C 0000202D */ daddu $a0, $zero, $zero -/* 9C6100 80240D20 8FBF0010 */ lw $ra, 0x10($sp) -/* 9C6104 80240D24 24020002 */ addiu $v0, $zero, 2 -/* 9C6108 80240D28 03E00008 */ jr $ra -/* 9C610C 80240D2C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240AC0_D061F0.s b/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240AC0_D061F0.s deleted file mode 100644 index fa91a1cdfa..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80240AC0_D061F0.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240AC0_D061F0 -/* D061F0 80240AC0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D061F4 80240AC4 AFBF0010 */ sw $ra, 0x10($sp) -/* D061F8 80240AC8 8C82000C */ lw $v0, 0xc($a0) -/* D061FC 80240ACC 3C068011 */ lui $a2, 0x8011 -/* D06200 80240AD0 80C6F2A2 */ lb $a2, -0xd5e($a2) -/* D06204 80240AD4 0C0B2026 */ jal set_variable -/* D06208 80240AD8 8C450000 */ lw $a1, ($v0) -/* D0620C 80240ADC 0C03AC5A */ jal func_800EB168 -/* D06210 80240AE0 0000202D */ daddu $a0, $zero, $zero -/* D06214 80240AE4 8FBF0010 */ lw $ra, 0x10($sp) -/* D06218 80240AE8 24020002 */ addiu $v0, $zero, 2 -/* D0621C 80240AEC 03E00008 */ jr $ra -/* D06220 80240AF0 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_802421E0_D22070.s b/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_802421E0_D22070.s deleted file mode 100644 index f3a6d4f68c..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_06/D203E0/func_802421E0_D22070.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802421E0_D22070 -/* D22070 802421E0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* D22074 802421E4 AFBF0010 */ sw $ra, 0x10($sp) -/* D22078 802421E8 8C82000C */ lw $v0, 0xc($a0) -/* D2207C 802421EC 3C068011 */ lui $a2, 0x8011 -/* D22080 802421F0 80C6F2A2 */ lb $a2, -0xd5e($a2) -/* D22084 802421F4 0C0B2026 */ jal set_variable -/* D22088 802421F8 8C450000 */ lw $a1, ($v0) -/* D2208C 802421FC 0C03AC5A */ jal func_800EB168 -/* D22090 80242200 0000202D */ daddu $a0, $zero, $zero -/* D22094 80242204 8FBF0010 */ lw $ra, 0x10($sp) -/* D22098 80242208 24020002 */ addiu $v0, $zero, 2 -/* D2209C 8024220C 03E00008 */ jr $ra -/* D220A0 80242210 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index a9474f9dd1..4c8bdffcad 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -102,9 +102,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80243644_96C804); INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80243698_96C858); -INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80243714_96C8D4); - -#include "world/common/Call800EB168.inc.c" +#include "world/common/GetPartnerCall800EB168.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80243778_96C938); diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index 38a86a3bdf..986867485f 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -38,9 +38,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242368_A1D468); INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802423BC_A1D4BC); -INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242438_A1D538); - -#include "world/common/Call800EB168.inc.c" +#include "world/common/GetPartnerCall800EB168.inc.c" INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_8024249C_A1D59C); diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index a3c05adbbb..dfac9edc8f 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -58,9 +58,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241670_B36240); INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802416C4_B36294); -INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241740_B36310); - -#include "world/common/Call800EB168.inc.c" +#include "world/common/GetPartnerCall800EB168.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802417A4_B36374); diff --git a/src/world/area_kkj/kkj_20/AFDE00.c b/src/world/area_kkj/kkj_20/AFDE00.c index 9e5f6305d4..3d57f7cb62 100644 --- a/src/world/area_kkj/kkj_20/AFDE00.c +++ b/src/world/area_kkj/kkj_20/AFDE00.c @@ -16,9 +16,7 @@ INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_80240480_AFDFC0); INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_802404D4_AFE014); -INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_80240550_AFE090); - -#include "world/common/Call800EB168.inc.c" +#include "world/common/GetPartnerCall800EB168.inc.c" INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_802405B4_AFE0F4); diff --git a/src/world/area_kmr/kmr_02/8B30E0.c b/src/world/area_kmr/kmr_02/8B30E0.c index c5f6ac31b4..de4ed0600c 100644 --- a/src/world/area_kmr/kmr_02/8B30E0.c +++ b/src/world/area_kmr/kmr_02/8B30E0.c @@ -16,9 +16,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_80243230_8B32A0); INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_80243284_8B32F4); -INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_80243300_8B3370); - -#include "world/common/Call800EB168.inc.c" +#include "world/common/GetPartnerCall800EB168.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_80243364_8B33D4); diff --git a/src/world/area_kmr/kmr_20/8ED0C0.c b/src/world/area_kmr/kmr_20/8ED0C0.c index e978d116de..49d7b27bdf 100644 --- a/src/world/area_kmr/kmr_20/8ED0C0.c +++ b/src/world/area_kmr/kmr_20/8ED0C0.c @@ -16,9 +16,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_80241460_8ED280); INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_802414B4_8ED2D4); -INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_80241530_8ED350); - -#include "world/common/Call800EB168.inc.c" +#include "world/common/GetPartnerCall800EB168.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_80241594_8ED3B4); diff --git a/src/world/area_kpa/kpa_91/A86A50.c b/src/world/area_kpa/kpa_91/A86A50.c index 9cbdbda024..c764b65e4a 100644 --- a/src/world/area_kpa/kpa_91/A86A50.c +++ b/src/world/area_kpa/kpa_91/A86A50.c @@ -50,8 +50,6 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_802416E8_A88138); INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_8024173C_A8818C); -INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_802417B8_A88208); - -#include "world/common/Call800EB168.inc.c" +#include "world/common/GetPartnerCall800EB168.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_8024181C_A8826C); diff --git a/src/world/area_kpa/kpa_95/A8CB60.c b/src/world/area_kpa/kpa_95/A8CB60.c index 07812c57d7..a21a3de683 100644 --- a/src/world/area_kpa/kpa_95/A8CB60.c +++ b/src/world/area_kpa/kpa_95/A8CB60.c @@ -50,8 +50,6 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_802417C8_A8E248); INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_8024181C_A8E29C); -INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_80241898_A8E318); - -#include "world/common/Call800EB168.inc.c" +#include "world/common/GetPartnerCall800EB168.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_802418FC_A8E37C); diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index 6f9f9137e3..9a9b09cab2 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -108,9 +108,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_8024396C_8041EC); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802439C0_804240); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243A3C_8042BC); - -#include "world/common/Call800EB168.inc.c" +#include "world/common/GetPartnerCall800EB168.inc.c" ApiStatus func_80243AA0_804320(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index 535dc3b510..47b559c19d 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -36,9 +36,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240C2C_9C600C); INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240C80_9C6060); -INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240CFC_9C60DC); - -#include "world/common/Call800EB168.inc.c" +#include "world/common/GetPartnerCall800EB168.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240D60_9C6140); diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index 3ddca1dd30..ab35caf081 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -16,9 +16,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_802409F0_D06120); INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240A44_D06174); -INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240AC0_D061F0); - -#include "world/common/Call800EB168.inc.c" +#include "world/common/GetPartnerCall800EB168.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240B24_D06254); diff --git a/src/world/area_sam/sam_06/D203E0.c b/src/world/area_sam/sam_06/D203E0.c index 0a460e3c95..f1467f9a0a 100644 --- a/src/world/area_sam/sam_06/D203E0.c +++ b/src/world/area_sam/sam_06/D203E0.c @@ -54,9 +54,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80242110_D21FA0); INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80242164_D21FF4); -INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_802421E0_D22070); - -#include "world/common/Call800EB168.inc.c" +#include "world/common/GetPartnerCall800EB168.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80242244_D220D4); diff --git a/src/world/common/Call800EB168.inc.c b/src/world/common/Call800EB168.inc.c deleted file mode 100644 index 0d80634214..0000000000 --- a/src/world/common/Call800EB168.inc.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "common.h" - -static ApiStatus Call800EB168(ScriptInstance* script, s32 isInitialCall) { - func_800EB168(get_variable(script, *script->ptrReadPos)); - return ApiStatus_DONE2; -} diff --git a/src/world/common/GetPartnerCall800EB168.inc.c b/src/world/common/GetPartnerCall800EB168.inc.c new file mode 100644 index 0000000000..c7b85eb2c6 --- /dev/null +++ b/src/world/common/GetPartnerCall800EB168.inc.c @@ -0,0 +1,12 @@ +#include "common.h" + +static ApiStatus GetPartnerCall800EB168(ScriptInstance* script, s32 isInitialCall) { + set_variable(script, *script->ptrReadPos, PLAYER_DATA->currentPartner); + func_800EB168(0); + return ApiStatus_DONE2; +} + +static ApiStatus Call800EB168(ScriptInstance* script, s32 isInitialCall) { + func_800EB168(get_variable(script, *script->ptrReadPos)); + return ApiStatus_DONE2; +} From 0b04520f257311fcf8019bfa8d78de37419aa06c Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 30 Oct 2020 00:32:25 -0400 Subject: [PATCH 55/78] 1 more --- .../mac_01/8017D0/func_80245440_805CC0.s | 23 ------------------- include/functions.h | 2 +- src/code_838b0_len_5900.c | 2 +- src/world/area_mac/mac_01/8017D0.c | 11 ++++++++- src/world/common/GetPartnerCall800EB168.inc.c | 2 +- 5 files changed, 13 insertions(+), 27 deletions(-) delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80245440_805CC0.s diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80245440_805CC0.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80245440_805CC0.s deleted file mode 100644 index fd0bbefcb5..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80245440_805CC0.s +++ /dev/null @@ -1,23 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80245440_805CC0 -/* 805CC0 80245440 3C028011 */ lui $v0, 0x8011 -/* 805CC4 80245444 8042F2A2 */ lb $v0, -0xd5e($v0) -/* 805CC8 80245448 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 805CCC 8024544C AFB00010 */ sw $s0, 0x10($sp) -/* 805CD0 80245450 0080802D */ daddu $s0, $a0, $zero -/* 805CD4 80245454 AFBF0014 */ sw $ra, 0x14($sp) -/* 805CD8 80245458 8E0400AC */ lw $a0, 0xac($s0) -/* 805CDC 8024545C 50440005 */ beql $v0, $a0, .L80245474 -/* 805CE0 80245460 AE000088 */ sw $zero, 0x88($s0) -/* 805CE4 80245464 0C03AC5A */ jal func_800EB168 -/* 805CE8 80245468 00000000 */ nop -/* 805CEC 8024546C 24020001 */ addiu $v0, $zero, 1 -/* 805CF0 80245470 AE020088 */ sw $v0, 0x88($s0) -.L80245474: -/* 805CF4 80245474 24020002 */ addiu $v0, $zero, 2 -/* 805CF8 80245478 8FBF0014 */ lw $ra, 0x14($sp) -/* 805CFC 8024547C 8FB00010 */ lw $s0, 0x10($sp) -/* 805D00 80245480 03E00008 */ jr $ra -/* 805D04 80245484 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/include/functions.h b/include/functions.h index abc8ebebd0..7a6b9ed69c 100644 --- a/include/functions.h +++ b/include/functions.h @@ -70,7 +70,7 @@ void set_curtain_fade(f32 scale); void fx_walk_normal(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4, s32 arg5); -s32 func_800EB168(s8); +s32 func_800EB168(s32); // Partner void func_800EBA3C(Npc* partner); diff --git a/src/code_838b0_len_5900.c b/src/code_838b0_len_5900.c index a5c09f35ed..e55f7cbc49 100644 --- a/src/code_838b0_len_5900.c +++ b/src/code_838b0_len_5900.c @@ -27,7 +27,7 @@ INCLUDE_ASM(s32, "code_838b0_len_5900", func_800EA6A8); INCLUDE_ASM(s32, "code_838b0_len_5900", func_800EA6CC); -INCLUDE_ASM(s32, "code_838b0_len_5900", func_800EB168, s8 arg0); +INCLUDE_ASM(s32, "code_838b0_len_5900", func_800EB168, s32 arg0); INCLUDE_ASM(s32, "code_838b0_len_5900", func_800EB200); diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index 9a9b09cab2..2e61f7ff5b 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -174,7 +174,16 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80245028_8058A8); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_8024522C_805AAC); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80245440_805CC0); +ApiStatus func_80245440_805CC0(ScriptInstance* script, s32 isInitialCall) { + if (PLAYER_DATA->currentPartner == script->varTable[10]) { + script->varTable[1] = 0; + return ApiStatus_DONE2; + } + + func_800EB168(script->varTable[10]); + script->varTable[1] = 1; + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80245488_805D08); diff --git a/src/world/common/GetPartnerCall800EB168.inc.c b/src/world/common/GetPartnerCall800EB168.inc.c index c7b85eb2c6..97c821c33a 100644 --- a/src/world/common/GetPartnerCall800EB168.inc.c +++ b/src/world/common/GetPartnerCall800EB168.inc.c @@ -7,6 +7,6 @@ static ApiStatus GetPartnerCall800EB168(ScriptInstance* script, s32 isInitialCal } static ApiStatus Call800EB168(ScriptInstance* script, s32 isInitialCall) { - func_800EB168(get_variable(script, *script->ptrReadPos)); + func_800EB168((s8)get_variable(script, *script->ptrReadPos)); return ApiStatus_DONE2; } From a61be9ab779b987d1c31edbd1abce30f6817657b Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 30 Oct 2020 00:43:23 -0400 Subject: [PATCH 56/78] rename --- src/world/area_dro/dro_02/9694C0.c | 2 +- src/world/area_hos/hos_03/A1BDB0.c | 2 +- src/world/area_jan/jan_03/B34BD0.c | 2 +- src/world/area_kkj/kkj_20/AFDE00.c | 2 +- src/world/area_kmr/kmr_02/8B30E0.c | 2 +- src/world/area_kmr/kmr_20/8ED0C0.c | 2 +- src/world/area_kpa/kpa_91/A86A50.c | 2 +- src/world/area_kpa/kpa_95/A8CB60.c | 2 +- src/world/area_mac/mac_01/8017D0.c | 2 +- src/world/area_nok/nok_01/9C53E0.c | 2 +- src/world/area_sam/sam_02/D05F60.c | 2 +- src/world/area_sam/sam_06/D203E0.c | 2 +- ...8C4SyncStatusMenu.inc.c => Call800E98C4SyncStatusMenu.inc.c} | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) rename src/world/common/{Unk800E98C4SyncStatusMenu.inc.c => Call800E98C4SyncStatusMenu.inc.c} (51%) diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index 4c8bdffcad..7faca769c7 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -88,7 +88,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_802433E8_96C5A8); #include "world/common/Call800E9894.inc.c" -#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" +#include "world/common/Call800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_802434CC_96C68C); diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index 986867485f..7ace53be75 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -24,7 +24,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80241FBC_A1D0BC); #include "world/common/Call800E9894.inc.c" -#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" +#include "world/common/Call800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802421F0_A1D2F0); diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index dfac9edc8f..dc4d3968e3 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -44,7 +44,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802411B4_B35D84); #include "world/common/Call800E9894.inc.c" -#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" +#include "world/common/Call800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802414F8_B360C8); diff --git a/src/world/area_kkj/kkj_20/AFDE00.c b/src/world/area_kkj/kkj_20/AFDE00.c index 3d57f7cb62..5ec4549dae 100644 --- a/src/world/area_kkj/kkj_20/AFDE00.c +++ b/src/world/area_kkj/kkj_20/AFDE00.c @@ -2,7 +2,7 @@ #include "world/common/Call800E9894.inc.c" -#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" +#include "world/common/Call800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_80240308_AFDE48); diff --git a/src/world/area_kmr/kmr_02/8B30E0.c b/src/world/area_kmr/kmr_02/8B30E0.c index de4ed0600c..894052300a 100644 --- a/src/world/area_kmr/kmr_02/8B30E0.c +++ b/src/world/area_kmr/kmr_02/8B30E0.c @@ -2,7 +2,7 @@ #include "world/common/Call800E9894.inc.c" -#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" +#include "world/common/Call800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_802430B8_8B3128); diff --git a/src/world/area_kmr/kmr_20/8ED0C0.c b/src/world/area_kmr/kmr_20/8ED0C0.c index 49d7b27bdf..a273cad41b 100644 --- a/src/world/area_kmr/kmr_20/8ED0C0.c +++ b/src/world/area_kmr/kmr_20/8ED0C0.c @@ -2,7 +2,7 @@ #include "world/common/Call800E9894.inc.c" -#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" +#include "world/common/Call800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_802412E8_8ED108); diff --git a/src/world/area_kpa/kpa_91/A86A50.c b/src/world/area_kpa/kpa_91/A86A50.c index c764b65e4a..f7bdac79c3 100644 --- a/src/world/area_kpa/kpa_91/A86A50.c +++ b/src/world/area_kpa/kpa_91/A86A50.c @@ -36,7 +36,7 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_80241224_A87C74); #include "world/common/Call800E9894.inc.c" -#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" +#include "world/common/Call800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_80241570_A87FC0); diff --git a/src/world/area_kpa/kpa_95/A8CB60.c b/src/world/area_kpa/kpa_95/A8CB60.c index a21a3de683..44daaa48f2 100644 --- a/src/world/area_kpa/kpa_95/A8CB60.c +++ b/src/world/area_kpa/kpa_95/A8CB60.c @@ -36,7 +36,7 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_80241304_A8DD84); #include "world/common/Call800E9894.inc.c" -#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" +#include "world/common/Call800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_80241650_A8E0D0); diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index 2e61f7ff5b..b6d4d62a6e 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -94,7 +94,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243740_803FC0); #include "world/common/Call800E9894.inc.c" -#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" +#include "world/common/Call800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", pause_tutorial_draw_contents_804074); diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index 47b559c19d..af5f8a1f64 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -22,7 +22,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_802407F4_9C5BD4); #include "world/common/Call800E9894.inc.c" -#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" +#include "world/common/Call800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240AB4_9C5E94); diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index ab35caf081..add231fef5 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -2,7 +2,7 @@ #include "world/common/Call800E9894.inc.c" -#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" +#include "world/common/Call800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240878_D05FA8); diff --git a/src/world/area_sam/sam_06/D203E0.c b/src/world/area_sam/sam_06/D203E0.c index f1467f9a0a..699d01bcfe 100644 --- a/src/world/area_sam/sam_06/D203E0.c +++ b/src/world/area_sam/sam_06/D203E0.c @@ -40,7 +40,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80241EB4_D21D44); #include "world/common/Call800E9894.inc.c" -#include "world/common/Unk800E98C4SyncStatusMenu.inc.c" +#include "world/common/Call800E98C4SyncStatusMenu.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80241F98_D21E28); diff --git a/src/world/common/Unk800E98C4SyncStatusMenu.inc.c b/src/world/common/Call800E98C4SyncStatusMenu.inc.c similarity index 51% rename from src/world/common/Unk800E98C4SyncStatusMenu.inc.c rename to src/world/common/Call800E98C4SyncStatusMenu.inc.c index 90e4efc6a3..9609cf7f35 100644 --- a/src/world/common/Unk800E98C4SyncStatusMenu.inc.c +++ b/src/world/common/Call800E98C4SyncStatusMenu.inc.c @@ -1,6 +1,6 @@ #include "common.h" -static ApiStatus Unk800E98C4SyncStatusMenu(ScriptInstance* script, s32 isInitialCall) { +static ApiStatus Call800E98C4SyncStatusMenu(ScriptInstance* script, s32 isInitialCall) { func_800E98C4(); sync_status_menu(); return ApiStatus_DONE2; From 97121d2c50703e04242d2f321f4019e613b75340 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 30 Oct 2020 13:43:45 -0400 Subject: [PATCH 57/78] UnkCameraFunc --- .../dro_01/95B7E0/func_802420F0_95D2F0.s | 107 ------------------ .../dro_02/9694C0/func_80240F80_96A140.s | 107 ------------------ .../hos_03/A1BDB0/func_80243124_A1E224.s | 107 ------------------ .../jan_02/B2C8A0/func_80242294_B2E704.s | 107 ------------------ .../jan_03/B34BD0/func_8024281C_B373EC.s | 107 ------------------ .../kmr_02/8B0070/func_80241010_8B1080.s | 107 ------------------ .../mac_00/7EB340/func_802412B0_7EBFC0.s | 107 ------------------ .../mac_01/8017D0/func_80242B90_803410.s | 107 ------------------ .../mac_02/823BF0/func_80242440_825700.s | 107 ------------------ .../mac_03/831B20/func_80241130_832930.s | 107 ------------------ .../mac_04/843030/func_802410E0_843CB0.s | 107 ------------------ .../mac_05/852170/func_80241FA0_854110.s | 107 ------------------ .../nok_01/9C53E0/func_802419E8_9C6DC8.s | 107 ------------------ .../nok_02/9D7AA0/func_80242590_9D95B0.s | 107 ------------------ .../sam_01/CF7E80/func_80241380_CF8EF0.s | 107 ------------------ .../sam_02/D05F60/func_802417AC_D06EDC.s | 107 ------------------ .../sam_11/D3ADA0/func_80241450_D3BA20.s | 107 ------------------ src/world/area_dro/dro_01/95B7E0.c | 2 +- src/world/area_dro/dro_02/9694C0.c | 2 +- src/world/area_hos/hos_03/A1BDB0.c | 2 +- src/world/area_jan/jan_02/B2C8A0.c | 2 +- src/world/area_jan/jan_03/B34BD0.c | 2 +- src/world/area_kmr/kmr_02/8B0070.c | 2 +- src/world/area_mac/mac_00/7EB340.c | 2 +- src/world/area_mac/mac_01/8017D0.c | 2 +- src/world/area_mac/mac_02/823BF0.c | 2 +- src/world/area_mac/mac_03/831B20.c | 2 +- src/world/area_mac/mac_04/843030.c | 2 +- src/world/area_mac/mac_05/852170.c | 2 +- src/world/area_nok/nok_01/9C53E0.c | 2 +- src/world/area_nok/nok_02/9D7AA0.c | 2 +- src/world/area_sam/sam_01/CF7E80.c | 2 +- src/world/area_sam/sam_02/D05F60.c | 2 +- src/world/area_sam/sam_11/D3ADA0.c | 2 +- src/world/common/UnkCameraFunc.inc.c | 21 ++++ 35 files changed, 38 insertions(+), 1836 deletions(-) delete mode 100644 asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_802420F0_95D2F0.s delete mode 100644 asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240F80_96A140.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80243124_A1E224.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242294_B2E704.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_8024281C_B373EC.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80241010_8B1080.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_00/7EB340/func_802412B0_7EBFC0.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242B90_803410.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_02/823BF0/func_80242440_825700.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_03/831B20/func_80241130_832930.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_04/843030/func_802410E0_843CB0.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_05/852170/func_80241FA0_854110.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_802419E8_9C6DC8.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80242590_9D95B0.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80241380_CF8EF0.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_02/D05F60/func_802417AC_D06EDC.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_80241450_D3BA20.s create mode 100644 src/world/common/UnkCameraFunc.inc.c diff --git a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_802420F0_95D2F0.s b/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_802420F0_95D2F0.s deleted file mode 100644 index 5537574bea..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_802420F0_95D2F0.s +++ /dev/null @@ -1,107 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802420F0_95D2F0 -/* 95D2F0 802420F0 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 95D2F4 802420F4 AFB20018 */ sw $s2, 0x18($sp) -/* 95D2F8 802420F8 0080902D */ daddu $s2, $a0, $zero -/* 95D2FC 802420FC AFBF0030 */ sw $ra, 0x30($sp) -/* 95D300 80242100 AFB7002C */ sw $s7, 0x2c($sp) -/* 95D304 80242104 AFB60028 */ sw $s6, 0x28($sp) -/* 95D308 80242108 AFB50024 */ sw $s5, 0x24($sp) -/* 95D30C 8024210C AFB40020 */ sw $s4, 0x20($sp) -/* 95D310 80242110 AFB3001C */ sw $s3, 0x1c($sp) -/* 95D314 80242114 AFB10014 */ sw $s1, 0x14($sp) -/* 95D318 80242118 AFB00010 */ sw $s0, 0x10($sp) -/* 95D31C 8024211C F7B60040 */ sdc1 $f22, 0x40($sp) -/* 95D320 80242120 F7B40038 */ sdc1 $f20, 0x38($sp) -/* 95D324 80242124 8E50000C */ lw $s0, 0xc($s2) -/* 95D328 80242128 8E050000 */ lw $a1, ($s0) -/* 95D32C 8024212C 0C0B1EAF */ jal get_variable -/* 95D330 80242130 26100004 */ addiu $s0, $s0, 4 -/* 95D334 80242134 8E050000 */ lw $a1, ($s0) -/* 95D338 80242138 26100004 */ addiu $s0, $s0, 4 -/* 95D33C 8024213C 0240202D */ daddu $a0, $s2, $zero -/* 95D340 80242140 0C0B1EAF */ jal get_variable -/* 95D344 80242144 0040B82D */ daddu $s7, $v0, $zero -/* 95D348 80242148 8E050000 */ lw $a1, ($s0) -/* 95D34C 8024214C 26100004 */ addiu $s0, $s0, 4 -/* 95D350 80242150 0240202D */ daddu $a0, $s2, $zero -/* 95D354 80242154 0C0B1EAF */ jal get_variable -/* 95D358 80242158 0040B02D */ daddu $s6, $v0, $zero -/* 95D35C 8024215C 0240202D */ daddu $a0, $s2, $zero -/* 95D360 80242160 3C05F4AC */ lui $a1, 0xf4ac -/* 95D364 80242164 34A5D481 */ ori $a1, $a1, 0xd481 -/* 95D368 80242168 3C068007 */ lui $a2, %hi(gCurrentCameraID) -/* 95D36C 8024216C 8CC67410 */ lw $a2, %lo(gCurrentCameraID)($a2) -/* 95D370 80242170 8E140000 */ lw $s4, ($s0) -/* 95D374 80242174 00061880 */ sll $v1, $a2, 2 -/* 95D378 80242178 00661821 */ addu $v1, $v1, $a2 -/* 95D37C 8024217C 00031880 */ sll $v1, $v1, 2 -/* 95D380 80242180 00661823 */ subu $v1, $v1, $a2 -/* 95D384 80242184 000330C0 */ sll $a2, $v1, 3 -/* 95D388 80242188 00661821 */ addu $v1, $v1, $a2 -/* 95D38C 8024218C 000318C0 */ sll $v1, $v1, 3 -/* 95D390 80242190 3C01800B */ lui $at, 0x800b -/* 95D394 80242194 00230821 */ addu $at, $at, $v1 -/* 95D398 80242198 C4201DEC */ lwc1 $f0, 0x1dec($at) -/* 95D39C 8024219C 8E150004 */ lw $s5, 4($s0) -/* 95D3A0 802421A0 4600010D */ trunc.w.s $f4, $f0 -/* 95D3A4 802421A4 44112000 */ mfc1 $s1, $f4 -/* 95D3A8 802421A8 0C0B1EAF */ jal get_variable -/* 95D3AC 802421AC 0040982D */ daddu $s3, $v0, $zero -/* 95D3B0 802421B0 4491B000 */ mtc1 $s1, $f22 -/* 95D3B4 802421B4 00000000 */ nop -/* 95D3B8 802421B8 4680B5A0 */ cvt.s.w $f22, $f22 -/* 95D3BC 802421BC 4600B306 */ mov.s $f12, $f22 -/* 95D3C0 802421C0 0C00A8D4 */ jal cos_deg -/* 95D3C4 802421C4 0040802D */ daddu $s0, $v0, $zero -/* 95D3C8 802421C8 4493A000 */ mtc1 $s3, $f20 -/* 95D3CC 802421CC 00000000 */ nop -/* 95D3D0 802421D0 4680A520 */ cvt.s.w $f20, $f20 -/* 95D3D4 802421D4 4600A002 */ mul.s $f0, $f20, $f0 -/* 95D3D8 802421D8 00000000 */ nop -/* 95D3DC 802421DC 0240202D */ daddu $a0, $s2, $zero -/* 95D3E0 802421E0 44901000 */ mtc1 $s0, $f2 -/* 95D3E4 802421E4 00000000 */ nop -/* 95D3E8 802421E8 468010A0 */ cvt.s.w $f2, $f2 -/* 95D3EC 802421EC 46001081 */ sub.s $f2, $f2, $f0 -/* 95D3F0 802421F0 3C05F4AC */ lui $a1, 0xf4ac -/* 95D3F4 802421F4 4600110D */ trunc.w.s $f4, $f2 -/* 95D3F8 802421F8 44102000 */ mfc1 $s0, $f4 -/* 95D3FC 802421FC 0C0B1EAF */ jal get_variable -/* 95D400 80242200 34A5D483 */ ori $a1, $a1, 0xd483 -/* 95D404 80242204 4600B306 */ mov.s $f12, $f22 -/* 95D408 80242208 0C00A8BB */ jal sin_deg -/* 95D40C 8024220C 0040882D */ daddu $s1, $v0, $zero -/* 95D410 80242210 4600A502 */ mul.s $f20, $f20, $f0 -/* 95D414 80242214 00000000 */ nop -/* 95D418 80242218 0240202D */ daddu $a0, $s2, $zero -/* 95D41C 8024221C 44910000 */ mtc1 $s1, $f0 -/* 95D420 80242220 00000000 */ nop -/* 95D424 80242224 46800020 */ cvt.s.w $f0, $f0 -/* 95D428 80242228 46140001 */ sub.s $f0, $f0, $f20 -/* 95D42C 8024222C 0280282D */ daddu $a1, $s4, $zero -/* 95D430 80242230 02173023 */ subu $a2, $s0, $s7 -/* 95D434 80242234 4600010D */ trunc.w.s $f4, $f0 -/* 95D438 80242238 44102000 */ mfc1 $s0, $f4 -/* 95D43C 8024223C 0C0B2026 */ jal set_variable -/* 95D440 80242240 02168023 */ subu $s0, $s0, $s6 -/* 95D444 80242244 0240202D */ daddu $a0, $s2, $zero -/* 95D448 80242248 02A0282D */ daddu $a1, $s5, $zero -/* 95D44C 8024224C 0C0B2026 */ jal set_variable -/* 95D450 80242250 0200302D */ daddu $a2, $s0, $zero -/* 95D454 80242254 8FBF0030 */ lw $ra, 0x30($sp) -/* 95D458 80242258 8FB7002C */ lw $s7, 0x2c($sp) -/* 95D45C 8024225C 8FB60028 */ lw $s6, 0x28($sp) -/* 95D460 80242260 8FB50024 */ lw $s5, 0x24($sp) -/* 95D464 80242264 8FB40020 */ lw $s4, 0x20($sp) -/* 95D468 80242268 8FB3001C */ lw $s3, 0x1c($sp) -/* 95D46C 8024226C 8FB20018 */ lw $s2, 0x18($sp) -/* 95D470 80242270 8FB10014 */ lw $s1, 0x14($sp) -/* 95D474 80242274 8FB00010 */ lw $s0, 0x10($sp) -/* 95D478 80242278 D7B60040 */ ldc1 $f22, 0x40($sp) -/* 95D47C 8024227C D7B40038 */ ldc1 $f20, 0x38($sp) -/* 95D480 80242280 24020002 */ addiu $v0, $zero, 2 -/* 95D484 80242284 03E00008 */ jr $ra -/* 95D488 80242288 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240F80_96A140.s b/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240F80_96A140.s deleted file mode 100644 index ad96c5c26f..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240F80_96A140.s +++ /dev/null @@ -1,107 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240F80_96A140 -/* 96A140 80240F80 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 96A144 80240F84 AFB20018 */ sw $s2, 0x18($sp) -/* 96A148 80240F88 0080902D */ daddu $s2, $a0, $zero -/* 96A14C 80240F8C AFBF0030 */ sw $ra, 0x30($sp) -/* 96A150 80240F90 AFB7002C */ sw $s7, 0x2c($sp) -/* 96A154 80240F94 AFB60028 */ sw $s6, 0x28($sp) -/* 96A158 80240F98 AFB50024 */ sw $s5, 0x24($sp) -/* 96A15C 80240F9C AFB40020 */ sw $s4, 0x20($sp) -/* 96A160 80240FA0 AFB3001C */ sw $s3, 0x1c($sp) -/* 96A164 80240FA4 AFB10014 */ sw $s1, 0x14($sp) -/* 96A168 80240FA8 AFB00010 */ sw $s0, 0x10($sp) -/* 96A16C 80240FAC F7B60040 */ sdc1 $f22, 0x40($sp) -/* 96A170 80240FB0 F7B40038 */ sdc1 $f20, 0x38($sp) -/* 96A174 80240FB4 8E50000C */ lw $s0, 0xc($s2) -/* 96A178 80240FB8 8E050000 */ lw $a1, ($s0) -/* 96A17C 80240FBC 0C0B1EAF */ jal get_variable -/* 96A180 80240FC0 26100004 */ addiu $s0, $s0, 4 -/* 96A184 80240FC4 8E050000 */ lw $a1, ($s0) -/* 96A188 80240FC8 26100004 */ addiu $s0, $s0, 4 -/* 96A18C 80240FCC 0240202D */ daddu $a0, $s2, $zero -/* 96A190 80240FD0 0C0B1EAF */ jal get_variable -/* 96A194 80240FD4 0040B82D */ daddu $s7, $v0, $zero -/* 96A198 80240FD8 8E050000 */ lw $a1, ($s0) -/* 96A19C 80240FDC 26100004 */ addiu $s0, $s0, 4 -/* 96A1A0 80240FE0 0240202D */ daddu $a0, $s2, $zero -/* 96A1A4 80240FE4 0C0B1EAF */ jal get_variable -/* 96A1A8 80240FE8 0040B02D */ daddu $s6, $v0, $zero -/* 96A1AC 80240FEC 0240202D */ daddu $a0, $s2, $zero -/* 96A1B0 80240FF0 3C05F4AC */ lui $a1, 0xf4ac -/* 96A1B4 80240FF4 34A5D481 */ ori $a1, $a1, 0xd481 -/* 96A1B8 80240FF8 3C068007 */ lui $a2, %hi(gCurrentCameraID) -/* 96A1BC 80240FFC 8CC67410 */ lw $a2, %lo(gCurrentCameraID)($a2) -/* 96A1C0 80241000 8E140000 */ lw $s4, ($s0) -/* 96A1C4 80241004 00061880 */ sll $v1, $a2, 2 -/* 96A1C8 80241008 00661821 */ addu $v1, $v1, $a2 -/* 96A1CC 8024100C 00031880 */ sll $v1, $v1, 2 -/* 96A1D0 80241010 00661823 */ subu $v1, $v1, $a2 -/* 96A1D4 80241014 000330C0 */ sll $a2, $v1, 3 -/* 96A1D8 80241018 00661821 */ addu $v1, $v1, $a2 -/* 96A1DC 8024101C 000318C0 */ sll $v1, $v1, 3 -/* 96A1E0 80241020 3C01800B */ lui $at, 0x800b -/* 96A1E4 80241024 00230821 */ addu $at, $at, $v1 -/* 96A1E8 80241028 C4201DEC */ lwc1 $f0, 0x1dec($at) -/* 96A1EC 8024102C 8E150004 */ lw $s5, 4($s0) -/* 96A1F0 80241030 4600010D */ trunc.w.s $f4, $f0 -/* 96A1F4 80241034 44112000 */ mfc1 $s1, $f4 -/* 96A1F8 80241038 0C0B1EAF */ jal get_variable -/* 96A1FC 8024103C 0040982D */ daddu $s3, $v0, $zero -/* 96A200 80241040 4491B000 */ mtc1 $s1, $f22 -/* 96A204 80241044 00000000 */ nop -/* 96A208 80241048 4680B5A0 */ cvt.s.w $f22, $f22 -/* 96A20C 8024104C 4600B306 */ mov.s $f12, $f22 -/* 96A210 80241050 0C00A8D4 */ jal cos_deg -/* 96A214 80241054 0040802D */ daddu $s0, $v0, $zero -/* 96A218 80241058 4493A000 */ mtc1 $s3, $f20 -/* 96A21C 8024105C 00000000 */ nop -/* 96A220 80241060 4680A520 */ cvt.s.w $f20, $f20 -/* 96A224 80241064 4600A002 */ mul.s $f0, $f20, $f0 -/* 96A228 80241068 00000000 */ nop -/* 96A22C 8024106C 0240202D */ daddu $a0, $s2, $zero -/* 96A230 80241070 44901000 */ mtc1 $s0, $f2 -/* 96A234 80241074 00000000 */ nop -/* 96A238 80241078 468010A0 */ cvt.s.w $f2, $f2 -/* 96A23C 8024107C 46001081 */ sub.s $f2, $f2, $f0 -/* 96A240 80241080 3C05F4AC */ lui $a1, 0xf4ac -/* 96A244 80241084 4600110D */ trunc.w.s $f4, $f2 -/* 96A248 80241088 44102000 */ mfc1 $s0, $f4 -/* 96A24C 8024108C 0C0B1EAF */ jal get_variable -/* 96A250 80241090 34A5D483 */ ori $a1, $a1, 0xd483 -/* 96A254 80241094 4600B306 */ mov.s $f12, $f22 -/* 96A258 80241098 0C00A8BB */ jal sin_deg -/* 96A25C 8024109C 0040882D */ daddu $s1, $v0, $zero -/* 96A260 802410A0 4600A502 */ mul.s $f20, $f20, $f0 -/* 96A264 802410A4 00000000 */ nop -/* 96A268 802410A8 0240202D */ daddu $a0, $s2, $zero -/* 96A26C 802410AC 44910000 */ mtc1 $s1, $f0 -/* 96A270 802410B0 00000000 */ nop -/* 96A274 802410B4 46800020 */ cvt.s.w $f0, $f0 -/* 96A278 802410B8 46140001 */ sub.s $f0, $f0, $f20 -/* 96A27C 802410BC 0280282D */ daddu $a1, $s4, $zero -/* 96A280 802410C0 02173023 */ subu $a2, $s0, $s7 -/* 96A284 802410C4 4600010D */ trunc.w.s $f4, $f0 -/* 96A288 802410C8 44102000 */ mfc1 $s0, $f4 -/* 96A28C 802410CC 0C0B2026 */ jal set_variable -/* 96A290 802410D0 02168023 */ subu $s0, $s0, $s6 -/* 96A294 802410D4 0240202D */ daddu $a0, $s2, $zero -/* 96A298 802410D8 02A0282D */ daddu $a1, $s5, $zero -/* 96A29C 802410DC 0C0B2026 */ jal set_variable -/* 96A2A0 802410E0 0200302D */ daddu $a2, $s0, $zero -/* 96A2A4 802410E4 8FBF0030 */ lw $ra, 0x30($sp) -/* 96A2A8 802410E8 8FB7002C */ lw $s7, 0x2c($sp) -/* 96A2AC 802410EC 8FB60028 */ lw $s6, 0x28($sp) -/* 96A2B0 802410F0 8FB50024 */ lw $s5, 0x24($sp) -/* 96A2B4 802410F4 8FB40020 */ lw $s4, 0x20($sp) -/* 96A2B8 802410F8 8FB3001C */ lw $s3, 0x1c($sp) -/* 96A2BC 802410FC 8FB20018 */ lw $s2, 0x18($sp) -/* 96A2C0 80241100 8FB10014 */ lw $s1, 0x14($sp) -/* 96A2C4 80241104 8FB00010 */ lw $s0, 0x10($sp) -/* 96A2C8 80241108 D7B60040 */ ldc1 $f22, 0x40($sp) -/* 96A2CC 8024110C D7B40038 */ ldc1 $f20, 0x38($sp) -/* 96A2D0 80241110 24020002 */ addiu $v0, $zero, 2 -/* 96A2D4 80241114 03E00008 */ jr $ra -/* 96A2D8 80241118 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80243124_A1E224.s b/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80243124_A1E224.s deleted file mode 100644 index a559277c47..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80243124_A1E224.s +++ /dev/null @@ -1,107 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243124_A1E224 -/* A1E224 80243124 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* A1E228 80243128 AFB20018 */ sw $s2, 0x18($sp) -/* A1E22C 8024312C 0080902D */ daddu $s2, $a0, $zero -/* A1E230 80243130 AFBF0030 */ sw $ra, 0x30($sp) -/* A1E234 80243134 AFB7002C */ sw $s7, 0x2c($sp) -/* A1E238 80243138 AFB60028 */ sw $s6, 0x28($sp) -/* A1E23C 8024313C AFB50024 */ sw $s5, 0x24($sp) -/* A1E240 80243140 AFB40020 */ sw $s4, 0x20($sp) -/* A1E244 80243144 AFB3001C */ sw $s3, 0x1c($sp) -/* A1E248 80243148 AFB10014 */ sw $s1, 0x14($sp) -/* A1E24C 8024314C AFB00010 */ sw $s0, 0x10($sp) -/* A1E250 80243150 F7B60040 */ sdc1 $f22, 0x40($sp) -/* A1E254 80243154 F7B40038 */ sdc1 $f20, 0x38($sp) -/* A1E258 80243158 8E50000C */ lw $s0, 0xc($s2) -/* A1E25C 8024315C 8E050000 */ lw $a1, ($s0) -/* A1E260 80243160 0C0B1EAF */ jal get_variable -/* A1E264 80243164 26100004 */ addiu $s0, $s0, 4 -/* A1E268 80243168 8E050000 */ lw $a1, ($s0) -/* A1E26C 8024316C 26100004 */ addiu $s0, $s0, 4 -/* A1E270 80243170 0240202D */ daddu $a0, $s2, $zero -/* A1E274 80243174 0C0B1EAF */ jal get_variable -/* A1E278 80243178 0040B82D */ daddu $s7, $v0, $zero -/* A1E27C 8024317C 8E050000 */ lw $a1, ($s0) -/* A1E280 80243180 26100004 */ addiu $s0, $s0, 4 -/* A1E284 80243184 0240202D */ daddu $a0, $s2, $zero -/* A1E288 80243188 0C0B1EAF */ jal get_variable -/* A1E28C 8024318C 0040B02D */ daddu $s6, $v0, $zero -/* A1E290 80243190 0240202D */ daddu $a0, $s2, $zero -/* A1E294 80243194 3C05F4AC */ lui $a1, 0xf4ac -/* A1E298 80243198 34A5D481 */ ori $a1, $a1, 0xd481 -/* A1E29C 8024319C 3C068007 */ lui $a2, %hi(gCurrentCameraID) -/* A1E2A0 802431A0 8CC67410 */ lw $a2, %lo(gCurrentCameraID)($a2) -/* A1E2A4 802431A4 8E140000 */ lw $s4, ($s0) -/* A1E2A8 802431A8 00061880 */ sll $v1, $a2, 2 -/* A1E2AC 802431AC 00661821 */ addu $v1, $v1, $a2 -/* A1E2B0 802431B0 00031880 */ sll $v1, $v1, 2 -/* A1E2B4 802431B4 00661823 */ subu $v1, $v1, $a2 -/* A1E2B8 802431B8 000330C0 */ sll $a2, $v1, 3 -/* A1E2BC 802431BC 00661821 */ addu $v1, $v1, $a2 -/* A1E2C0 802431C0 000318C0 */ sll $v1, $v1, 3 -/* A1E2C4 802431C4 3C01800B */ lui $at, 0x800b -/* A1E2C8 802431C8 00230821 */ addu $at, $at, $v1 -/* A1E2CC 802431CC C4201DEC */ lwc1 $f0, 0x1dec($at) -/* A1E2D0 802431D0 8E150004 */ lw $s5, 4($s0) -/* A1E2D4 802431D4 4600010D */ trunc.w.s $f4, $f0 -/* A1E2D8 802431D8 44112000 */ mfc1 $s1, $f4 -/* A1E2DC 802431DC 0C0B1EAF */ jal get_variable -/* A1E2E0 802431E0 0040982D */ daddu $s3, $v0, $zero -/* A1E2E4 802431E4 4491B000 */ mtc1 $s1, $f22 -/* A1E2E8 802431E8 00000000 */ nop -/* A1E2EC 802431EC 4680B5A0 */ cvt.s.w $f22, $f22 -/* A1E2F0 802431F0 4600B306 */ mov.s $f12, $f22 -/* A1E2F4 802431F4 0C00A8D4 */ jal cos_deg -/* A1E2F8 802431F8 0040802D */ daddu $s0, $v0, $zero -/* A1E2FC 802431FC 4493A000 */ mtc1 $s3, $f20 -/* A1E300 80243200 00000000 */ nop -/* A1E304 80243204 4680A520 */ cvt.s.w $f20, $f20 -/* A1E308 80243208 4600A002 */ mul.s $f0, $f20, $f0 -/* A1E30C 8024320C 00000000 */ nop -/* A1E310 80243210 0240202D */ daddu $a0, $s2, $zero -/* A1E314 80243214 44901000 */ mtc1 $s0, $f2 -/* A1E318 80243218 00000000 */ nop -/* A1E31C 8024321C 468010A0 */ cvt.s.w $f2, $f2 -/* A1E320 80243220 46001081 */ sub.s $f2, $f2, $f0 -/* A1E324 80243224 3C05F4AC */ lui $a1, 0xf4ac -/* A1E328 80243228 4600110D */ trunc.w.s $f4, $f2 -/* A1E32C 8024322C 44102000 */ mfc1 $s0, $f4 -/* A1E330 80243230 0C0B1EAF */ jal get_variable -/* A1E334 80243234 34A5D483 */ ori $a1, $a1, 0xd483 -/* A1E338 80243238 4600B306 */ mov.s $f12, $f22 -/* A1E33C 8024323C 0C00A8BB */ jal sin_deg -/* A1E340 80243240 0040882D */ daddu $s1, $v0, $zero -/* A1E344 80243244 4600A502 */ mul.s $f20, $f20, $f0 -/* A1E348 80243248 00000000 */ nop -/* A1E34C 8024324C 0240202D */ daddu $a0, $s2, $zero -/* A1E350 80243250 44910000 */ mtc1 $s1, $f0 -/* A1E354 80243254 00000000 */ nop -/* A1E358 80243258 46800020 */ cvt.s.w $f0, $f0 -/* A1E35C 8024325C 46140001 */ sub.s $f0, $f0, $f20 -/* A1E360 80243260 0280282D */ daddu $a1, $s4, $zero -/* A1E364 80243264 02173023 */ subu $a2, $s0, $s7 -/* A1E368 80243268 4600010D */ trunc.w.s $f4, $f0 -/* A1E36C 8024326C 44102000 */ mfc1 $s0, $f4 -/* A1E370 80243270 0C0B2026 */ jal set_variable -/* A1E374 80243274 02168023 */ subu $s0, $s0, $s6 -/* A1E378 80243278 0240202D */ daddu $a0, $s2, $zero -/* A1E37C 8024327C 02A0282D */ daddu $a1, $s5, $zero -/* A1E380 80243280 0C0B2026 */ jal set_variable -/* A1E384 80243284 0200302D */ daddu $a2, $s0, $zero -/* A1E388 80243288 8FBF0030 */ lw $ra, 0x30($sp) -/* A1E38C 8024328C 8FB7002C */ lw $s7, 0x2c($sp) -/* A1E390 80243290 8FB60028 */ lw $s6, 0x28($sp) -/* A1E394 80243294 8FB50024 */ lw $s5, 0x24($sp) -/* A1E398 80243298 8FB40020 */ lw $s4, 0x20($sp) -/* A1E39C 8024329C 8FB3001C */ lw $s3, 0x1c($sp) -/* A1E3A0 802432A0 8FB20018 */ lw $s2, 0x18($sp) -/* A1E3A4 802432A4 8FB10014 */ lw $s1, 0x14($sp) -/* A1E3A8 802432A8 8FB00010 */ lw $s0, 0x10($sp) -/* A1E3AC 802432AC D7B60040 */ ldc1 $f22, 0x40($sp) -/* A1E3B0 802432B0 D7B40038 */ ldc1 $f20, 0x38($sp) -/* A1E3B4 802432B4 24020002 */ addiu $v0, $zero, 2 -/* A1E3B8 802432B8 03E00008 */ jr $ra -/* A1E3BC 802432BC 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242294_B2E704.s b/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242294_B2E704.s deleted file mode 100644 index 9bbecdde90..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242294_B2E704.s +++ /dev/null @@ -1,107 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242294_B2E704 -/* B2E704 80242294 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* B2E708 80242298 AFB20018 */ sw $s2, 0x18($sp) -/* B2E70C 8024229C 0080902D */ daddu $s2, $a0, $zero -/* B2E710 802422A0 AFBF0030 */ sw $ra, 0x30($sp) -/* B2E714 802422A4 AFB7002C */ sw $s7, 0x2c($sp) -/* B2E718 802422A8 AFB60028 */ sw $s6, 0x28($sp) -/* B2E71C 802422AC AFB50024 */ sw $s5, 0x24($sp) -/* B2E720 802422B0 AFB40020 */ sw $s4, 0x20($sp) -/* B2E724 802422B4 AFB3001C */ sw $s3, 0x1c($sp) -/* B2E728 802422B8 AFB10014 */ sw $s1, 0x14($sp) -/* B2E72C 802422BC AFB00010 */ sw $s0, 0x10($sp) -/* B2E730 802422C0 F7B60040 */ sdc1 $f22, 0x40($sp) -/* B2E734 802422C4 F7B40038 */ sdc1 $f20, 0x38($sp) -/* B2E738 802422C8 8E50000C */ lw $s0, 0xc($s2) -/* B2E73C 802422CC 8E050000 */ lw $a1, ($s0) -/* B2E740 802422D0 0C0B1EAF */ jal get_variable -/* B2E744 802422D4 26100004 */ addiu $s0, $s0, 4 -/* B2E748 802422D8 8E050000 */ lw $a1, ($s0) -/* B2E74C 802422DC 26100004 */ addiu $s0, $s0, 4 -/* B2E750 802422E0 0240202D */ daddu $a0, $s2, $zero -/* B2E754 802422E4 0C0B1EAF */ jal get_variable -/* B2E758 802422E8 0040B82D */ daddu $s7, $v0, $zero -/* B2E75C 802422EC 8E050000 */ lw $a1, ($s0) -/* B2E760 802422F0 26100004 */ addiu $s0, $s0, 4 -/* B2E764 802422F4 0240202D */ daddu $a0, $s2, $zero -/* B2E768 802422F8 0C0B1EAF */ jal get_variable -/* B2E76C 802422FC 0040B02D */ daddu $s6, $v0, $zero -/* B2E770 80242300 0240202D */ daddu $a0, $s2, $zero -/* B2E774 80242304 3C05F4AC */ lui $a1, 0xf4ac -/* B2E778 80242308 34A5D481 */ ori $a1, $a1, 0xd481 -/* B2E77C 8024230C 3C068007 */ lui $a2, %hi(gCurrentCameraID) -/* B2E780 80242310 8CC67410 */ lw $a2, %lo(gCurrentCameraID)($a2) -/* B2E784 80242314 8E140000 */ lw $s4, ($s0) -/* B2E788 80242318 00061880 */ sll $v1, $a2, 2 -/* B2E78C 8024231C 00661821 */ addu $v1, $v1, $a2 -/* B2E790 80242320 00031880 */ sll $v1, $v1, 2 -/* B2E794 80242324 00661823 */ subu $v1, $v1, $a2 -/* B2E798 80242328 000330C0 */ sll $a2, $v1, 3 -/* B2E79C 8024232C 00661821 */ addu $v1, $v1, $a2 -/* B2E7A0 80242330 000318C0 */ sll $v1, $v1, 3 -/* B2E7A4 80242334 3C01800B */ lui $at, 0x800b -/* B2E7A8 80242338 00230821 */ addu $at, $at, $v1 -/* B2E7AC 8024233C C4201DEC */ lwc1 $f0, 0x1dec($at) -/* B2E7B0 80242340 8E150004 */ lw $s5, 4($s0) -/* B2E7B4 80242344 4600010D */ trunc.w.s $f4, $f0 -/* B2E7B8 80242348 44112000 */ mfc1 $s1, $f4 -/* B2E7BC 8024234C 0C0B1EAF */ jal get_variable -/* B2E7C0 80242350 0040982D */ daddu $s3, $v0, $zero -/* B2E7C4 80242354 4491B000 */ mtc1 $s1, $f22 -/* B2E7C8 80242358 00000000 */ nop -/* B2E7CC 8024235C 4680B5A0 */ cvt.s.w $f22, $f22 -/* B2E7D0 80242360 4600B306 */ mov.s $f12, $f22 -/* B2E7D4 80242364 0C00A8D4 */ jal cos_deg -/* B2E7D8 80242368 0040802D */ daddu $s0, $v0, $zero -/* B2E7DC 8024236C 4493A000 */ mtc1 $s3, $f20 -/* B2E7E0 80242370 00000000 */ nop -/* B2E7E4 80242374 4680A520 */ cvt.s.w $f20, $f20 -/* B2E7E8 80242378 4600A002 */ mul.s $f0, $f20, $f0 -/* B2E7EC 8024237C 00000000 */ nop -/* B2E7F0 80242380 0240202D */ daddu $a0, $s2, $zero -/* B2E7F4 80242384 44901000 */ mtc1 $s0, $f2 -/* B2E7F8 80242388 00000000 */ nop -/* B2E7FC 8024238C 468010A0 */ cvt.s.w $f2, $f2 -/* B2E800 80242390 46001081 */ sub.s $f2, $f2, $f0 -/* B2E804 80242394 3C05F4AC */ lui $a1, 0xf4ac -/* B2E808 80242398 4600110D */ trunc.w.s $f4, $f2 -/* B2E80C 8024239C 44102000 */ mfc1 $s0, $f4 -/* B2E810 802423A0 0C0B1EAF */ jal get_variable -/* B2E814 802423A4 34A5D483 */ ori $a1, $a1, 0xd483 -/* B2E818 802423A8 4600B306 */ mov.s $f12, $f22 -/* B2E81C 802423AC 0C00A8BB */ jal sin_deg -/* B2E820 802423B0 0040882D */ daddu $s1, $v0, $zero -/* B2E824 802423B4 4600A502 */ mul.s $f20, $f20, $f0 -/* B2E828 802423B8 00000000 */ nop -/* B2E82C 802423BC 0240202D */ daddu $a0, $s2, $zero -/* B2E830 802423C0 44910000 */ mtc1 $s1, $f0 -/* B2E834 802423C4 00000000 */ nop -/* B2E838 802423C8 46800020 */ cvt.s.w $f0, $f0 -/* B2E83C 802423CC 46140001 */ sub.s $f0, $f0, $f20 -/* B2E840 802423D0 0280282D */ daddu $a1, $s4, $zero -/* B2E844 802423D4 02173023 */ subu $a2, $s0, $s7 -/* B2E848 802423D8 4600010D */ trunc.w.s $f4, $f0 -/* B2E84C 802423DC 44102000 */ mfc1 $s0, $f4 -/* B2E850 802423E0 0C0B2026 */ jal set_variable -/* B2E854 802423E4 02168023 */ subu $s0, $s0, $s6 -/* B2E858 802423E8 0240202D */ daddu $a0, $s2, $zero -/* B2E85C 802423EC 02A0282D */ daddu $a1, $s5, $zero -/* B2E860 802423F0 0C0B2026 */ jal set_variable -/* B2E864 802423F4 0200302D */ daddu $a2, $s0, $zero -/* B2E868 802423F8 8FBF0030 */ lw $ra, 0x30($sp) -/* B2E86C 802423FC 8FB7002C */ lw $s7, 0x2c($sp) -/* B2E870 80242400 8FB60028 */ lw $s6, 0x28($sp) -/* B2E874 80242404 8FB50024 */ lw $s5, 0x24($sp) -/* B2E878 80242408 8FB40020 */ lw $s4, 0x20($sp) -/* B2E87C 8024240C 8FB3001C */ lw $s3, 0x1c($sp) -/* B2E880 80242410 8FB20018 */ lw $s2, 0x18($sp) -/* B2E884 80242414 8FB10014 */ lw $s1, 0x14($sp) -/* B2E888 80242418 8FB00010 */ lw $s0, 0x10($sp) -/* B2E88C 8024241C D7B60040 */ ldc1 $f22, 0x40($sp) -/* B2E890 80242420 D7B40038 */ ldc1 $f20, 0x38($sp) -/* B2E894 80242424 24020002 */ addiu $v0, $zero, 2 -/* B2E898 80242428 03E00008 */ jr $ra -/* B2E89C 8024242C 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_8024281C_B373EC.s b/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_8024281C_B373EC.s deleted file mode 100644 index 02b7b41c13..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_8024281C_B373EC.s +++ /dev/null @@ -1,107 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024281C_B373EC -/* B373EC 8024281C 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* B373F0 80242820 AFB20018 */ sw $s2, 0x18($sp) -/* B373F4 80242824 0080902D */ daddu $s2, $a0, $zero -/* B373F8 80242828 AFBF0030 */ sw $ra, 0x30($sp) -/* B373FC 8024282C AFB7002C */ sw $s7, 0x2c($sp) -/* B37400 80242830 AFB60028 */ sw $s6, 0x28($sp) -/* B37404 80242834 AFB50024 */ sw $s5, 0x24($sp) -/* B37408 80242838 AFB40020 */ sw $s4, 0x20($sp) -/* B3740C 8024283C AFB3001C */ sw $s3, 0x1c($sp) -/* B37410 80242840 AFB10014 */ sw $s1, 0x14($sp) -/* B37414 80242844 AFB00010 */ sw $s0, 0x10($sp) -/* B37418 80242848 F7B60040 */ sdc1 $f22, 0x40($sp) -/* B3741C 8024284C F7B40038 */ sdc1 $f20, 0x38($sp) -/* B37420 80242850 8E50000C */ lw $s0, 0xc($s2) -/* B37424 80242854 8E050000 */ lw $a1, ($s0) -/* B37428 80242858 0C0B1EAF */ jal get_variable -/* B3742C 8024285C 26100004 */ addiu $s0, $s0, 4 -/* B37430 80242860 8E050000 */ lw $a1, ($s0) -/* B37434 80242864 26100004 */ addiu $s0, $s0, 4 -/* B37438 80242868 0240202D */ daddu $a0, $s2, $zero -/* B3743C 8024286C 0C0B1EAF */ jal get_variable -/* B37440 80242870 0040B82D */ daddu $s7, $v0, $zero -/* B37444 80242874 8E050000 */ lw $a1, ($s0) -/* B37448 80242878 26100004 */ addiu $s0, $s0, 4 -/* B3744C 8024287C 0240202D */ daddu $a0, $s2, $zero -/* B37450 80242880 0C0B1EAF */ jal get_variable -/* B37454 80242884 0040B02D */ daddu $s6, $v0, $zero -/* B37458 80242888 0240202D */ daddu $a0, $s2, $zero -/* B3745C 8024288C 3C05F4AC */ lui $a1, 0xf4ac -/* B37460 80242890 34A5D481 */ ori $a1, $a1, 0xd481 -/* B37464 80242894 3C068007 */ lui $a2, %hi(gCurrentCameraID) -/* B37468 80242898 8CC67410 */ lw $a2, %lo(gCurrentCameraID)($a2) -/* B3746C 8024289C 8E140000 */ lw $s4, ($s0) -/* B37470 802428A0 00061880 */ sll $v1, $a2, 2 -/* B37474 802428A4 00661821 */ addu $v1, $v1, $a2 -/* B37478 802428A8 00031880 */ sll $v1, $v1, 2 -/* B3747C 802428AC 00661823 */ subu $v1, $v1, $a2 -/* B37480 802428B0 000330C0 */ sll $a2, $v1, 3 -/* B37484 802428B4 00661821 */ addu $v1, $v1, $a2 -/* B37488 802428B8 000318C0 */ sll $v1, $v1, 3 -/* B3748C 802428BC 3C01800B */ lui $at, 0x800b -/* B37490 802428C0 00230821 */ addu $at, $at, $v1 -/* B37494 802428C4 C4201DEC */ lwc1 $f0, 0x1dec($at) -/* B37498 802428C8 8E150004 */ lw $s5, 4($s0) -/* B3749C 802428CC 4600010D */ trunc.w.s $f4, $f0 -/* B374A0 802428D0 44112000 */ mfc1 $s1, $f4 -/* B374A4 802428D4 0C0B1EAF */ jal get_variable -/* B374A8 802428D8 0040982D */ daddu $s3, $v0, $zero -/* B374AC 802428DC 4491B000 */ mtc1 $s1, $f22 -/* B374B0 802428E0 00000000 */ nop -/* B374B4 802428E4 4680B5A0 */ cvt.s.w $f22, $f22 -/* B374B8 802428E8 4600B306 */ mov.s $f12, $f22 -/* B374BC 802428EC 0C00A8D4 */ jal cos_deg -/* B374C0 802428F0 0040802D */ daddu $s0, $v0, $zero -/* B374C4 802428F4 4493A000 */ mtc1 $s3, $f20 -/* B374C8 802428F8 00000000 */ nop -/* B374CC 802428FC 4680A520 */ cvt.s.w $f20, $f20 -/* B374D0 80242900 4600A002 */ mul.s $f0, $f20, $f0 -/* B374D4 80242904 00000000 */ nop -/* B374D8 80242908 0240202D */ daddu $a0, $s2, $zero -/* B374DC 8024290C 44901000 */ mtc1 $s0, $f2 -/* B374E0 80242910 00000000 */ nop -/* B374E4 80242914 468010A0 */ cvt.s.w $f2, $f2 -/* B374E8 80242918 46001081 */ sub.s $f2, $f2, $f0 -/* B374EC 8024291C 3C05F4AC */ lui $a1, 0xf4ac -/* B374F0 80242920 4600110D */ trunc.w.s $f4, $f2 -/* B374F4 80242924 44102000 */ mfc1 $s0, $f4 -/* B374F8 80242928 0C0B1EAF */ jal get_variable -/* B374FC 8024292C 34A5D483 */ ori $a1, $a1, 0xd483 -/* B37500 80242930 4600B306 */ mov.s $f12, $f22 -/* B37504 80242934 0C00A8BB */ jal sin_deg -/* B37508 80242938 0040882D */ daddu $s1, $v0, $zero -/* B3750C 8024293C 4600A502 */ mul.s $f20, $f20, $f0 -/* B37510 80242940 00000000 */ nop -/* B37514 80242944 0240202D */ daddu $a0, $s2, $zero -/* B37518 80242948 44910000 */ mtc1 $s1, $f0 -/* B3751C 8024294C 00000000 */ nop -/* B37520 80242950 46800020 */ cvt.s.w $f0, $f0 -/* B37524 80242954 46140001 */ sub.s $f0, $f0, $f20 -/* B37528 80242958 0280282D */ daddu $a1, $s4, $zero -/* B3752C 8024295C 02173023 */ subu $a2, $s0, $s7 -/* B37530 80242960 4600010D */ trunc.w.s $f4, $f0 -/* B37534 80242964 44102000 */ mfc1 $s0, $f4 -/* B37538 80242968 0C0B2026 */ jal set_variable -/* B3753C 8024296C 02168023 */ subu $s0, $s0, $s6 -/* B37540 80242970 0240202D */ daddu $a0, $s2, $zero -/* B37544 80242974 02A0282D */ daddu $a1, $s5, $zero -/* B37548 80242978 0C0B2026 */ jal set_variable -/* B3754C 8024297C 0200302D */ daddu $a2, $s0, $zero -/* B37550 80242980 8FBF0030 */ lw $ra, 0x30($sp) -/* B37554 80242984 8FB7002C */ lw $s7, 0x2c($sp) -/* B37558 80242988 8FB60028 */ lw $s6, 0x28($sp) -/* B3755C 8024298C 8FB50024 */ lw $s5, 0x24($sp) -/* B37560 80242990 8FB40020 */ lw $s4, 0x20($sp) -/* B37564 80242994 8FB3001C */ lw $s3, 0x1c($sp) -/* B37568 80242998 8FB20018 */ lw $s2, 0x18($sp) -/* B3756C 8024299C 8FB10014 */ lw $s1, 0x14($sp) -/* B37570 802429A0 8FB00010 */ lw $s0, 0x10($sp) -/* B37574 802429A4 D7B60040 */ ldc1 $f22, 0x40($sp) -/* B37578 802429A8 D7B40038 */ ldc1 $f20, 0x38($sp) -/* B3757C 802429AC 24020002 */ addiu $v0, $zero, 2 -/* B37580 802429B0 03E00008 */ jr $ra -/* B37584 802429B4 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80241010_8B1080.s b/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80241010_8B1080.s deleted file mode 100644 index 92e2eb8a40..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80241010_8B1080.s +++ /dev/null @@ -1,107 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241010_8B1080 -/* 8B1080 80241010 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 8B1084 80241014 AFB20018 */ sw $s2, 0x18($sp) -/* 8B1088 80241018 0080902D */ daddu $s2, $a0, $zero -/* 8B108C 8024101C AFBF0030 */ sw $ra, 0x30($sp) -/* 8B1090 80241020 AFB7002C */ sw $s7, 0x2c($sp) -/* 8B1094 80241024 AFB60028 */ sw $s6, 0x28($sp) -/* 8B1098 80241028 AFB50024 */ sw $s5, 0x24($sp) -/* 8B109C 8024102C AFB40020 */ sw $s4, 0x20($sp) -/* 8B10A0 80241030 AFB3001C */ sw $s3, 0x1c($sp) -/* 8B10A4 80241034 AFB10014 */ sw $s1, 0x14($sp) -/* 8B10A8 80241038 AFB00010 */ sw $s0, 0x10($sp) -/* 8B10AC 8024103C F7B60040 */ sdc1 $f22, 0x40($sp) -/* 8B10B0 80241040 F7B40038 */ sdc1 $f20, 0x38($sp) -/* 8B10B4 80241044 8E50000C */ lw $s0, 0xc($s2) -/* 8B10B8 80241048 8E050000 */ lw $a1, ($s0) -/* 8B10BC 8024104C 0C0B1EAF */ jal get_variable -/* 8B10C0 80241050 26100004 */ addiu $s0, $s0, 4 -/* 8B10C4 80241054 8E050000 */ lw $a1, ($s0) -/* 8B10C8 80241058 26100004 */ addiu $s0, $s0, 4 -/* 8B10CC 8024105C 0240202D */ daddu $a0, $s2, $zero -/* 8B10D0 80241060 0C0B1EAF */ jal get_variable -/* 8B10D4 80241064 0040B82D */ daddu $s7, $v0, $zero -/* 8B10D8 80241068 8E050000 */ lw $a1, ($s0) -/* 8B10DC 8024106C 26100004 */ addiu $s0, $s0, 4 -/* 8B10E0 80241070 0240202D */ daddu $a0, $s2, $zero -/* 8B10E4 80241074 0C0B1EAF */ jal get_variable -/* 8B10E8 80241078 0040B02D */ daddu $s6, $v0, $zero -/* 8B10EC 8024107C 0240202D */ daddu $a0, $s2, $zero -/* 8B10F0 80241080 3C05F4AC */ lui $a1, 0xf4ac -/* 8B10F4 80241084 34A5D481 */ ori $a1, $a1, 0xd481 -/* 8B10F8 80241088 3C068007 */ lui $a2, %hi(gCurrentCameraID) -/* 8B10FC 8024108C 8CC67410 */ lw $a2, %lo(gCurrentCameraID)($a2) -/* 8B1100 80241090 8E140000 */ lw $s4, ($s0) -/* 8B1104 80241094 00061880 */ sll $v1, $a2, 2 -/* 8B1108 80241098 00661821 */ addu $v1, $v1, $a2 -/* 8B110C 8024109C 00031880 */ sll $v1, $v1, 2 -/* 8B1110 802410A0 00661823 */ subu $v1, $v1, $a2 -/* 8B1114 802410A4 000330C0 */ sll $a2, $v1, 3 -/* 8B1118 802410A8 00661821 */ addu $v1, $v1, $a2 -/* 8B111C 802410AC 000318C0 */ sll $v1, $v1, 3 -/* 8B1120 802410B0 3C01800B */ lui $at, 0x800b -/* 8B1124 802410B4 00230821 */ addu $at, $at, $v1 -/* 8B1128 802410B8 C4201DEC */ lwc1 $f0, 0x1dec($at) -/* 8B112C 802410BC 8E150004 */ lw $s5, 4($s0) -/* 8B1130 802410C0 4600010D */ trunc.w.s $f4, $f0 -/* 8B1134 802410C4 44112000 */ mfc1 $s1, $f4 -/* 8B1138 802410C8 0C0B1EAF */ jal get_variable -/* 8B113C 802410CC 0040982D */ daddu $s3, $v0, $zero -/* 8B1140 802410D0 4491B000 */ mtc1 $s1, $f22 -/* 8B1144 802410D4 00000000 */ nop -/* 8B1148 802410D8 4680B5A0 */ cvt.s.w $f22, $f22 -/* 8B114C 802410DC 4600B306 */ mov.s $f12, $f22 -/* 8B1150 802410E0 0C00A8D4 */ jal cos_deg -/* 8B1154 802410E4 0040802D */ daddu $s0, $v0, $zero -/* 8B1158 802410E8 4493A000 */ mtc1 $s3, $f20 -/* 8B115C 802410EC 00000000 */ nop -/* 8B1160 802410F0 4680A520 */ cvt.s.w $f20, $f20 -/* 8B1164 802410F4 4600A002 */ mul.s $f0, $f20, $f0 -/* 8B1168 802410F8 00000000 */ nop -/* 8B116C 802410FC 0240202D */ daddu $a0, $s2, $zero -/* 8B1170 80241100 44901000 */ mtc1 $s0, $f2 -/* 8B1174 80241104 00000000 */ nop -/* 8B1178 80241108 468010A0 */ cvt.s.w $f2, $f2 -/* 8B117C 8024110C 46001081 */ sub.s $f2, $f2, $f0 -/* 8B1180 80241110 3C05F4AC */ lui $a1, 0xf4ac -/* 8B1184 80241114 4600110D */ trunc.w.s $f4, $f2 -/* 8B1188 80241118 44102000 */ mfc1 $s0, $f4 -/* 8B118C 8024111C 0C0B1EAF */ jal get_variable -/* 8B1190 80241120 34A5D483 */ ori $a1, $a1, 0xd483 -/* 8B1194 80241124 4600B306 */ mov.s $f12, $f22 -/* 8B1198 80241128 0C00A8BB */ jal sin_deg -/* 8B119C 8024112C 0040882D */ daddu $s1, $v0, $zero -/* 8B11A0 80241130 4600A502 */ mul.s $f20, $f20, $f0 -/* 8B11A4 80241134 00000000 */ nop -/* 8B11A8 80241138 0240202D */ daddu $a0, $s2, $zero -/* 8B11AC 8024113C 44910000 */ mtc1 $s1, $f0 -/* 8B11B0 80241140 00000000 */ nop -/* 8B11B4 80241144 46800020 */ cvt.s.w $f0, $f0 -/* 8B11B8 80241148 46140001 */ sub.s $f0, $f0, $f20 -/* 8B11BC 8024114C 0280282D */ daddu $a1, $s4, $zero -/* 8B11C0 80241150 02173023 */ subu $a2, $s0, $s7 -/* 8B11C4 80241154 4600010D */ trunc.w.s $f4, $f0 -/* 8B11C8 80241158 44102000 */ mfc1 $s0, $f4 -/* 8B11CC 8024115C 0C0B2026 */ jal set_variable -/* 8B11D0 80241160 02168023 */ subu $s0, $s0, $s6 -/* 8B11D4 80241164 0240202D */ daddu $a0, $s2, $zero -/* 8B11D8 80241168 02A0282D */ daddu $a1, $s5, $zero -/* 8B11DC 8024116C 0C0B2026 */ jal set_variable -/* 8B11E0 80241170 0200302D */ daddu $a2, $s0, $zero -/* 8B11E4 80241174 8FBF0030 */ lw $ra, 0x30($sp) -/* 8B11E8 80241178 8FB7002C */ lw $s7, 0x2c($sp) -/* 8B11EC 8024117C 8FB60028 */ lw $s6, 0x28($sp) -/* 8B11F0 80241180 8FB50024 */ lw $s5, 0x24($sp) -/* 8B11F4 80241184 8FB40020 */ lw $s4, 0x20($sp) -/* 8B11F8 80241188 8FB3001C */ lw $s3, 0x1c($sp) -/* 8B11FC 8024118C 8FB20018 */ lw $s2, 0x18($sp) -/* 8B1200 80241190 8FB10014 */ lw $s1, 0x14($sp) -/* 8B1204 80241194 8FB00010 */ lw $s0, 0x10($sp) -/* 8B1208 80241198 D7B60040 */ ldc1 $f22, 0x40($sp) -/* 8B120C 8024119C D7B40038 */ ldc1 $f20, 0x38($sp) -/* 8B1210 802411A0 24020002 */ addiu $v0, $zero, 2 -/* 8B1214 802411A4 03E00008 */ jr $ra -/* 8B1218 802411A8 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_802412B0_7EBFC0.s b/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_802412B0_7EBFC0.s deleted file mode 100644 index 1eced077b2..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_802412B0_7EBFC0.s +++ /dev/null @@ -1,107 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802412B0_7EBFC0 -/* 7EBFC0 802412B0 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 7EBFC4 802412B4 AFB20018 */ sw $s2, 0x18($sp) -/* 7EBFC8 802412B8 0080902D */ daddu $s2, $a0, $zero -/* 7EBFCC 802412BC AFBF0030 */ sw $ra, 0x30($sp) -/* 7EBFD0 802412C0 AFB7002C */ sw $s7, 0x2c($sp) -/* 7EBFD4 802412C4 AFB60028 */ sw $s6, 0x28($sp) -/* 7EBFD8 802412C8 AFB50024 */ sw $s5, 0x24($sp) -/* 7EBFDC 802412CC AFB40020 */ sw $s4, 0x20($sp) -/* 7EBFE0 802412D0 AFB3001C */ sw $s3, 0x1c($sp) -/* 7EBFE4 802412D4 AFB10014 */ sw $s1, 0x14($sp) -/* 7EBFE8 802412D8 AFB00010 */ sw $s0, 0x10($sp) -/* 7EBFEC 802412DC F7B60040 */ sdc1 $f22, 0x40($sp) -/* 7EBFF0 802412E0 F7B40038 */ sdc1 $f20, 0x38($sp) -/* 7EBFF4 802412E4 8E50000C */ lw $s0, 0xc($s2) -/* 7EBFF8 802412E8 8E050000 */ lw $a1, ($s0) -/* 7EBFFC 802412EC 0C0B1EAF */ jal get_variable -/* 7EC000 802412F0 26100004 */ addiu $s0, $s0, 4 -/* 7EC004 802412F4 8E050000 */ lw $a1, ($s0) -/* 7EC008 802412F8 26100004 */ addiu $s0, $s0, 4 -/* 7EC00C 802412FC 0240202D */ daddu $a0, $s2, $zero -/* 7EC010 80241300 0C0B1EAF */ jal get_variable -/* 7EC014 80241304 0040B82D */ daddu $s7, $v0, $zero -/* 7EC018 80241308 8E050000 */ lw $a1, ($s0) -/* 7EC01C 8024130C 26100004 */ addiu $s0, $s0, 4 -/* 7EC020 80241310 0240202D */ daddu $a0, $s2, $zero -/* 7EC024 80241314 0C0B1EAF */ jal get_variable -/* 7EC028 80241318 0040B02D */ daddu $s6, $v0, $zero -/* 7EC02C 8024131C 0240202D */ daddu $a0, $s2, $zero -/* 7EC030 80241320 3C05F4AC */ lui $a1, 0xf4ac -/* 7EC034 80241324 34A5D481 */ ori $a1, $a1, 0xd481 -/* 7EC038 80241328 3C068007 */ lui $a2, %hi(gCurrentCameraID) -/* 7EC03C 8024132C 8CC67410 */ lw $a2, %lo(gCurrentCameraID)($a2) -/* 7EC040 80241330 8E140000 */ lw $s4, ($s0) -/* 7EC044 80241334 00061880 */ sll $v1, $a2, 2 -/* 7EC048 80241338 00661821 */ addu $v1, $v1, $a2 -/* 7EC04C 8024133C 00031880 */ sll $v1, $v1, 2 -/* 7EC050 80241340 00661823 */ subu $v1, $v1, $a2 -/* 7EC054 80241344 000330C0 */ sll $a2, $v1, 3 -/* 7EC058 80241348 00661821 */ addu $v1, $v1, $a2 -/* 7EC05C 8024134C 000318C0 */ sll $v1, $v1, 3 -/* 7EC060 80241350 3C01800B */ lui $at, 0x800b -/* 7EC064 80241354 00230821 */ addu $at, $at, $v1 -/* 7EC068 80241358 C4201DEC */ lwc1 $f0, 0x1dec($at) -/* 7EC06C 8024135C 8E150004 */ lw $s5, 4($s0) -/* 7EC070 80241360 4600010D */ trunc.w.s $f4, $f0 -/* 7EC074 80241364 44112000 */ mfc1 $s1, $f4 -/* 7EC078 80241368 0C0B1EAF */ jal get_variable -/* 7EC07C 8024136C 0040982D */ daddu $s3, $v0, $zero -/* 7EC080 80241370 4491B000 */ mtc1 $s1, $f22 -/* 7EC084 80241374 00000000 */ nop -/* 7EC088 80241378 4680B5A0 */ cvt.s.w $f22, $f22 -/* 7EC08C 8024137C 4600B306 */ mov.s $f12, $f22 -/* 7EC090 80241380 0C00A8D4 */ jal cos_deg -/* 7EC094 80241384 0040802D */ daddu $s0, $v0, $zero -/* 7EC098 80241388 4493A000 */ mtc1 $s3, $f20 -/* 7EC09C 8024138C 00000000 */ nop -/* 7EC0A0 80241390 4680A520 */ cvt.s.w $f20, $f20 -/* 7EC0A4 80241394 4600A002 */ mul.s $f0, $f20, $f0 -/* 7EC0A8 80241398 00000000 */ nop -/* 7EC0AC 8024139C 0240202D */ daddu $a0, $s2, $zero -/* 7EC0B0 802413A0 44901000 */ mtc1 $s0, $f2 -/* 7EC0B4 802413A4 00000000 */ nop -/* 7EC0B8 802413A8 468010A0 */ cvt.s.w $f2, $f2 -/* 7EC0BC 802413AC 46001081 */ sub.s $f2, $f2, $f0 -/* 7EC0C0 802413B0 3C05F4AC */ lui $a1, 0xf4ac -/* 7EC0C4 802413B4 4600110D */ trunc.w.s $f4, $f2 -/* 7EC0C8 802413B8 44102000 */ mfc1 $s0, $f4 -/* 7EC0CC 802413BC 0C0B1EAF */ jal get_variable -/* 7EC0D0 802413C0 34A5D483 */ ori $a1, $a1, 0xd483 -/* 7EC0D4 802413C4 4600B306 */ mov.s $f12, $f22 -/* 7EC0D8 802413C8 0C00A8BB */ jal sin_deg -/* 7EC0DC 802413CC 0040882D */ daddu $s1, $v0, $zero -/* 7EC0E0 802413D0 4600A502 */ mul.s $f20, $f20, $f0 -/* 7EC0E4 802413D4 00000000 */ nop -/* 7EC0E8 802413D8 0240202D */ daddu $a0, $s2, $zero -/* 7EC0EC 802413DC 44910000 */ mtc1 $s1, $f0 -/* 7EC0F0 802413E0 00000000 */ nop -/* 7EC0F4 802413E4 46800020 */ cvt.s.w $f0, $f0 -/* 7EC0F8 802413E8 46140001 */ sub.s $f0, $f0, $f20 -/* 7EC0FC 802413EC 0280282D */ daddu $a1, $s4, $zero -/* 7EC100 802413F0 02173023 */ subu $a2, $s0, $s7 -/* 7EC104 802413F4 4600010D */ trunc.w.s $f4, $f0 -/* 7EC108 802413F8 44102000 */ mfc1 $s0, $f4 -/* 7EC10C 802413FC 0C0B2026 */ jal set_variable -/* 7EC110 80241400 02168023 */ subu $s0, $s0, $s6 -/* 7EC114 80241404 0240202D */ daddu $a0, $s2, $zero -/* 7EC118 80241408 02A0282D */ daddu $a1, $s5, $zero -/* 7EC11C 8024140C 0C0B2026 */ jal set_variable -/* 7EC120 80241410 0200302D */ daddu $a2, $s0, $zero -/* 7EC124 80241414 8FBF0030 */ lw $ra, 0x30($sp) -/* 7EC128 80241418 8FB7002C */ lw $s7, 0x2c($sp) -/* 7EC12C 8024141C 8FB60028 */ lw $s6, 0x28($sp) -/* 7EC130 80241420 8FB50024 */ lw $s5, 0x24($sp) -/* 7EC134 80241424 8FB40020 */ lw $s4, 0x20($sp) -/* 7EC138 80241428 8FB3001C */ lw $s3, 0x1c($sp) -/* 7EC13C 8024142C 8FB20018 */ lw $s2, 0x18($sp) -/* 7EC140 80241430 8FB10014 */ lw $s1, 0x14($sp) -/* 7EC144 80241434 8FB00010 */ lw $s0, 0x10($sp) -/* 7EC148 80241438 D7B60040 */ ldc1 $f22, 0x40($sp) -/* 7EC14C 8024143C D7B40038 */ ldc1 $f20, 0x38($sp) -/* 7EC150 80241440 24020002 */ addiu $v0, $zero, 2 -/* 7EC154 80241444 03E00008 */ jr $ra -/* 7EC158 80241448 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242B90_803410.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242B90_803410.s deleted file mode 100644 index 536996d9dc..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242B90_803410.s +++ /dev/null @@ -1,107 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242B90_803410 -/* 803410 80242B90 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 803414 80242B94 AFB20018 */ sw $s2, 0x18($sp) -/* 803418 80242B98 0080902D */ daddu $s2, $a0, $zero -/* 80341C 80242B9C AFBF0030 */ sw $ra, 0x30($sp) -/* 803420 80242BA0 AFB7002C */ sw $s7, 0x2c($sp) -/* 803424 80242BA4 AFB60028 */ sw $s6, 0x28($sp) -/* 803428 80242BA8 AFB50024 */ sw $s5, 0x24($sp) -/* 80342C 80242BAC AFB40020 */ sw $s4, 0x20($sp) -/* 803430 80242BB0 AFB3001C */ sw $s3, 0x1c($sp) -/* 803434 80242BB4 AFB10014 */ sw $s1, 0x14($sp) -/* 803438 80242BB8 AFB00010 */ sw $s0, 0x10($sp) -/* 80343C 80242BBC F7B60040 */ sdc1 $f22, 0x40($sp) -/* 803440 80242BC0 F7B40038 */ sdc1 $f20, 0x38($sp) -/* 803444 80242BC4 8E50000C */ lw $s0, 0xc($s2) -/* 803448 80242BC8 8E050000 */ lw $a1, ($s0) -/* 80344C 80242BCC 0C0B1EAF */ jal get_variable -/* 803450 80242BD0 26100004 */ addiu $s0, $s0, 4 -/* 803454 80242BD4 8E050000 */ lw $a1, ($s0) -/* 803458 80242BD8 26100004 */ addiu $s0, $s0, 4 -/* 80345C 80242BDC 0240202D */ daddu $a0, $s2, $zero -/* 803460 80242BE0 0C0B1EAF */ jal get_variable -/* 803464 80242BE4 0040B82D */ daddu $s7, $v0, $zero -/* 803468 80242BE8 8E050000 */ lw $a1, ($s0) -/* 80346C 80242BEC 26100004 */ addiu $s0, $s0, 4 -/* 803470 80242BF0 0240202D */ daddu $a0, $s2, $zero -/* 803474 80242BF4 0C0B1EAF */ jal get_variable -/* 803478 80242BF8 0040B02D */ daddu $s6, $v0, $zero -/* 80347C 80242BFC 0240202D */ daddu $a0, $s2, $zero -/* 803480 80242C00 3C05F4AC */ lui $a1, 0xf4ac -/* 803484 80242C04 34A5D481 */ ori $a1, $a1, 0xd481 -/* 803488 80242C08 3C068007 */ lui $a2, %hi(gCurrentCameraID) -/* 80348C 80242C0C 8CC67410 */ lw $a2, %lo(gCurrentCameraID)($a2) -/* 803490 80242C10 8E140000 */ lw $s4, ($s0) -/* 803494 80242C14 00061880 */ sll $v1, $a2, 2 -/* 803498 80242C18 00661821 */ addu $v1, $v1, $a2 -/* 80349C 80242C1C 00031880 */ sll $v1, $v1, 2 -/* 8034A0 80242C20 00661823 */ subu $v1, $v1, $a2 -/* 8034A4 80242C24 000330C0 */ sll $a2, $v1, 3 -/* 8034A8 80242C28 00661821 */ addu $v1, $v1, $a2 -/* 8034AC 80242C2C 000318C0 */ sll $v1, $v1, 3 -/* 8034B0 80242C30 3C01800B */ lui $at, 0x800b -/* 8034B4 80242C34 00230821 */ addu $at, $at, $v1 -/* 8034B8 80242C38 C4201DEC */ lwc1 $f0, 0x1dec($at) -/* 8034BC 80242C3C 8E150004 */ lw $s5, 4($s0) -/* 8034C0 80242C40 4600010D */ trunc.w.s $f4, $f0 -/* 8034C4 80242C44 44112000 */ mfc1 $s1, $f4 -/* 8034C8 80242C48 0C0B1EAF */ jal get_variable -/* 8034CC 80242C4C 0040982D */ daddu $s3, $v0, $zero -/* 8034D0 80242C50 4491B000 */ mtc1 $s1, $f22 -/* 8034D4 80242C54 00000000 */ nop -/* 8034D8 80242C58 4680B5A0 */ cvt.s.w $f22, $f22 -/* 8034DC 80242C5C 4600B306 */ mov.s $f12, $f22 -/* 8034E0 80242C60 0C00A8D4 */ jal cos_deg -/* 8034E4 80242C64 0040802D */ daddu $s0, $v0, $zero -/* 8034E8 80242C68 4493A000 */ mtc1 $s3, $f20 -/* 8034EC 80242C6C 00000000 */ nop -/* 8034F0 80242C70 4680A520 */ cvt.s.w $f20, $f20 -/* 8034F4 80242C74 4600A002 */ mul.s $f0, $f20, $f0 -/* 8034F8 80242C78 00000000 */ nop -/* 8034FC 80242C7C 0240202D */ daddu $a0, $s2, $zero -/* 803500 80242C80 44901000 */ mtc1 $s0, $f2 -/* 803504 80242C84 00000000 */ nop -/* 803508 80242C88 468010A0 */ cvt.s.w $f2, $f2 -/* 80350C 80242C8C 46001081 */ sub.s $f2, $f2, $f0 -/* 803510 80242C90 3C05F4AC */ lui $a1, 0xf4ac -/* 803514 80242C94 4600110D */ trunc.w.s $f4, $f2 -/* 803518 80242C98 44102000 */ mfc1 $s0, $f4 -/* 80351C 80242C9C 0C0B1EAF */ jal get_variable -/* 803520 80242CA0 34A5D483 */ ori $a1, $a1, 0xd483 -/* 803524 80242CA4 4600B306 */ mov.s $f12, $f22 -/* 803528 80242CA8 0C00A8BB */ jal sin_deg -/* 80352C 80242CAC 0040882D */ daddu $s1, $v0, $zero -/* 803530 80242CB0 4600A502 */ mul.s $f20, $f20, $f0 -/* 803534 80242CB4 00000000 */ nop -/* 803538 80242CB8 0240202D */ daddu $a0, $s2, $zero -/* 80353C 80242CBC 44910000 */ mtc1 $s1, $f0 -/* 803540 80242CC0 00000000 */ nop -/* 803544 80242CC4 46800020 */ cvt.s.w $f0, $f0 -/* 803548 80242CC8 46140001 */ sub.s $f0, $f0, $f20 -/* 80354C 80242CCC 0280282D */ daddu $a1, $s4, $zero -/* 803550 80242CD0 02173023 */ subu $a2, $s0, $s7 -/* 803554 80242CD4 4600010D */ trunc.w.s $f4, $f0 -/* 803558 80242CD8 44102000 */ mfc1 $s0, $f4 -/* 80355C 80242CDC 0C0B2026 */ jal set_variable -/* 803560 80242CE0 02168023 */ subu $s0, $s0, $s6 -/* 803564 80242CE4 0240202D */ daddu $a0, $s2, $zero -/* 803568 80242CE8 02A0282D */ daddu $a1, $s5, $zero -/* 80356C 80242CEC 0C0B2026 */ jal set_variable -/* 803570 80242CF0 0200302D */ daddu $a2, $s0, $zero -/* 803574 80242CF4 8FBF0030 */ lw $ra, 0x30($sp) -/* 803578 80242CF8 8FB7002C */ lw $s7, 0x2c($sp) -/* 80357C 80242CFC 8FB60028 */ lw $s6, 0x28($sp) -/* 803580 80242D00 8FB50024 */ lw $s5, 0x24($sp) -/* 803584 80242D04 8FB40020 */ lw $s4, 0x20($sp) -/* 803588 80242D08 8FB3001C */ lw $s3, 0x1c($sp) -/* 80358C 80242D0C 8FB20018 */ lw $s2, 0x18($sp) -/* 803590 80242D10 8FB10014 */ lw $s1, 0x14($sp) -/* 803594 80242D14 8FB00010 */ lw $s0, 0x10($sp) -/* 803598 80242D18 D7B60040 */ ldc1 $f22, 0x40($sp) -/* 80359C 80242D1C D7B40038 */ ldc1 $f20, 0x38($sp) -/* 8035A0 80242D20 24020002 */ addiu $v0, $zero, 2 -/* 8035A4 80242D24 03E00008 */ jr $ra -/* 8035A8 80242D28 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_80242440_825700.s b/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_80242440_825700.s deleted file mode 100644 index dcba1d6f43..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_80242440_825700.s +++ /dev/null @@ -1,107 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242440_825700 -/* 825700 80242440 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 825704 80242444 AFB20018 */ sw $s2, 0x18($sp) -/* 825708 80242448 0080902D */ daddu $s2, $a0, $zero -/* 82570C 8024244C AFBF0030 */ sw $ra, 0x30($sp) -/* 825710 80242450 AFB7002C */ sw $s7, 0x2c($sp) -/* 825714 80242454 AFB60028 */ sw $s6, 0x28($sp) -/* 825718 80242458 AFB50024 */ sw $s5, 0x24($sp) -/* 82571C 8024245C AFB40020 */ sw $s4, 0x20($sp) -/* 825720 80242460 AFB3001C */ sw $s3, 0x1c($sp) -/* 825724 80242464 AFB10014 */ sw $s1, 0x14($sp) -/* 825728 80242468 AFB00010 */ sw $s0, 0x10($sp) -/* 82572C 8024246C F7B60040 */ sdc1 $f22, 0x40($sp) -/* 825730 80242470 F7B40038 */ sdc1 $f20, 0x38($sp) -/* 825734 80242474 8E50000C */ lw $s0, 0xc($s2) -/* 825738 80242478 8E050000 */ lw $a1, ($s0) -/* 82573C 8024247C 0C0B1EAF */ jal get_variable -/* 825740 80242480 26100004 */ addiu $s0, $s0, 4 -/* 825744 80242484 8E050000 */ lw $a1, ($s0) -/* 825748 80242488 26100004 */ addiu $s0, $s0, 4 -/* 82574C 8024248C 0240202D */ daddu $a0, $s2, $zero -/* 825750 80242490 0C0B1EAF */ jal get_variable -/* 825754 80242494 0040B82D */ daddu $s7, $v0, $zero -/* 825758 80242498 8E050000 */ lw $a1, ($s0) -/* 82575C 8024249C 26100004 */ addiu $s0, $s0, 4 -/* 825760 802424A0 0240202D */ daddu $a0, $s2, $zero -/* 825764 802424A4 0C0B1EAF */ jal get_variable -/* 825768 802424A8 0040B02D */ daddu $s6, $v0, $zero -/* 82576C 802424AC 0240202D */ daddu $a0, $s2, $zero -/* 825770 802424B0 3C05F4AC */ lui $a1, 0xf4ac -/* 825774 802424B4 34A5D481 */ ori $a1, $a1, 0xd481 -/* 825778 802424B8 3C068007 */ lui $a2, %hi(gCurrentCameraID) -/* 82577C 802424BC 8CC67410 */ lw $a2, %lo(gCurrentCameraID)($a2) -/* 825780 802424C0 8E140000 */ lw $s4, ($s0) -/* 825784 802424C4 00061880 */ sll $v1, $a2, 2 -/* 825788 802424C8 00661821 */ addu $v1, $v1, $a2 -/* 82578C 802424CC 00031880 */ sll $v1, $v1, 2 -/* 825790 802424D0 00661823 */ subu $v1, $v1, $a2 -/* 825794 802424D4 000330C0 */ sll $a2, $v1, 3 -/* 825798 802424D8 00661821 */ addu $v1, $v1, $a2 -/* 82579C 802424DC 000318C0 */ sll $v1, $v1, 3 -/* 8257A0 802424E0 3C01800B */ lui $at, 0x800b -/* 8257A4 802424E4 00230821 */ addu $at, $at, $v1 -/* 8257A8 802424E8 C4201DEC */ lwc1 $f0, 0x1dec($at) -/* 8257AC 802424EC 8E150004 */ lw $s5, 4($s0) -/* 8257B0 802424F0 4600010D */ trunc.w.s $f4, $f0 -/* 8257B4 802424F4 44112000 */ mfc1 $s1, $f4 -/* 8257B8 802424F8 0C0B1EAF */ jal get_variable -/* 8257BC 802424FC 0040982D */ daddu $s3, $v0, $zero -/* 8257C0 80242500 4491B000 */ mtc1 $s1, $f22 -/* 8257C4 80242504 00000000 */ nop -/* 8257C8 80242508 4680B5A0 */ cvt.s.w $f22, $f22 -/* 8257CC 8024250C 4600B306 */ mov.s $f12, $f22 -/* 8257D0 80242510 0C00A8D4 */ jal cos_deg -/* 8257D4 80242514 0040802D */ daddu $s0, $v0, $zero -/* 8257D8 80242518 4493A000 */ mtc1 $s3, $f20 -/* 8257DC 8024251C 00000000 */ nop -/* 8257E0 80242520 4680A520 */ cvt.s.w $f20, $f20 -/* 8257E4 80242524 4600A002 */ mul.s $f0, $f20, $f0 -/* 8257E8 80242528 00000000 */ nop -/* 8257EC 8024252C 0240202D */ daddu $a0, $s2, $zero -/* 8257F0 80242530 44901000 */ mtc1 $s0, $f2 -/* 8257F4 80242534 00000000 */ nop -/* 8257F8 80242538 468010A0 */ cvt.s.w $f2, $f2 -/* 8257FC 8024253C 46001081 */ sub.s $f2, $f2, $f0 -/* 825800 80242540 3C05F4AC */ lui $a1, 0xf4ac -/* 825804 80242544 4600110D */ trunc.w.s $f4, $f2 -/* 825808 80242548 44102000 */ mfc1 $s0, $f4 -/* 82580C 8024254C 0C0B1EAF */ jal get_variable -/* 825810 80242550 34A5D483 */ ori $a1, $a1, 0xd483 -/* 825814 80242554 4600B306 */ mov.s $f12, $f22 -/* 825818 80242558 0C00A8BB */ jal sin_deg -/* 82581C 8024255C 0040882D */ daddu $s1, $v0, $zero -/* 825820 80242560 4600A502 */ mul.s $f20, $f20, $f0 -/* 825824 80242564 00000000 */ nop -/* 825828 80242568 0240202D */ daddu $a0, $s2, $zero -/* 82582C 8024256C 44910000 */ mtc1 $s1, $f0 -/* 825830 80242570 00000000 */ nop -/* 825834 80242574 46800020 */ cvt.s.w $f0, $f0 -/* 825838 80242578 46140001 */ sub.s $f0, $f0, $f20 -/* 82583C 8024257C 0280282D */ daddu $a1, $s4, $zero -/* 825840 80242580 02173023 */ subu $a2, $s0, $s7 -/* 825844 80242584 4600010D */ trunc.w.s $f4, $f0 -/* 825848 80242588 44102000 */ mfc1 $s0, $f4 -/* 82584C 8024258C 0C0B2026 */ jal set_variable -/* 825850 80242590 02168023 */ subu $s0, $s0, $s6 -/* 825854 80242594 0240202D */ daddu $a0, $s2, $zero -/* 825858 80242598 02A0282D */ daddu $a1, $s5, $zero -/* 82585C 8024259C 0C0B2026 */ jal set_variable -/* 825860 802425A0 0200302D */ daddu $a2, $s0, $zero -/* 825864 802425A4 8FBF0030 */ lw $ra, 0x30($sp) -/* 825868 802425A8 8FB7002C */ lw $s7, 0x2c($sp) -/* 82586C 802425AC 8FB60028 */ lw $s6, 0x28($sp) -/* 825870 802425B0 8FB50024 */ lw $s5, 0x24($sp) -/* 825874 802425B4 8FB40020 */ lw $s4, 0x20($sp) -/* 825878 802425B8 8FB3001C */ lw $s3, 0x1c($sp) -/* 82587C 802425BC 8FB20018 */ lw $s2, 0x18($sp) -/* 825880 802425C0 8FB10014 */ lw $s1, 0x14($sp) -/* 825884 802425C4 8FB00010 */ lw $s0, 0x10($sp) -/* 825888 802425C8 D7B60040 */ ldc1 $f22, 0x40($sp) -/* 82588C 802425CC D7B40038 */ ldc1 $f20, 0x38($sp) -/* 825890 802425D0 24020002 */ addiu $v0, $zero, 2 -/* 825894 802425D4 03E00008 */ jr $ra -/* 825898 802425D8 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_80241130_832930.s b/asm/nonmatchings/world/area_mac/mac_03/831B20/func_80241130_832930.s deleted file mode 100644 index 4806014e37..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_80241130_832930.s +++ /dev/null @@ -1,107 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241130_832930 -/* 832930 80241130 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 832934 80241134 AFB20018 */ sw $s2, 0x18($sp) -/* 832938 80241138 0080902D */ daddu $s2, $a0, $zero -/* 83293C 8024113C AFBF0030 */ sw $ra, 0x30($sp) -/* 832940 80241140 AFB7002C */ sw $s7, 0x2c($sp) -/* 832944 80241144 AFB60028 */ sw $s6, 0x28($sp) -/* 832948 80241148 AFB50024 */ sw $s5, 0x24($sp) -/* 83294C 8024114C AFB40020 */ sw $s4, 0x20($sp) -/* 832950 80241150 AFB3001C */ sw $s3, 0x1c($sp) -/* 832954 80241154 AFB10014 */ sw $s1, 0x14($sp) -/* 832958 80241158 AFB00010 */ sw $s0, 0x10($sp) -/* 83295C 8024115C F7B60040 */ sdc1 $f22, 0x40($sp) -/* 832960 80241160 F7B40038 */ sdc1 $f20, 0x38($sp) -/* 832964 80241164 8E50000C */ lw $s0, 0xc($s2) -/* 832968 80241168 8E050000 */ lw $a1, ($s0) -/* 83296C 8024116C 0C0B1EAF */ jal get_variable -/* 832970 80241170 26100004 */ addiu $s0, $s0, 4 -/* 832974 80241174 8E050000 */ lw $a1, ($s0) -/* 832978 80241178 26100004 */ addiu $s0, $s0, 4 -/* 83297C 8024117C 0240202D */ daddu $a0, $s2, $zero -/* 832980 80241180 0C0B1EAF */ jal get_variable -/* 832984 80241184 0040B82D */ daddu $s7, $v0, $zero -/* 832988 80241188 8E050000 */ lw $a1, ($s0) -/* 83298C 8024118C 26100004 */ addiu $s0, $s0, 4 -/* 832990 80241190 0240202D */ daddu $a0, $s2, $zero -/* 832994 80241194 0C0B1EAF */ jal get_variable -/* 832998 80241198 0040B02D */ daddu $s6, $v0, $zero -/* 83299C 8024119C 0240202D */ daddu $a0, $s2, $zero -/* 8329A0 802411A0 3C05F4AC */ lui $a1, 0xf4ac -/* 8329A4 802411A4 34A5D481 */ ori $a1, $a1, 0xd481 -/* 8329A8 802411A8 3C068007 */ lui $a2, %hi(gCurrentCameraID) -/* 8329AC 802411AC 8CC67410 */ lw $a2, %lo(gCurrentCameraID)($a2) -/* 8329B0 802411B0 8E140000 */ lw $s4, ($s0) -/* 8329B4 802411B4 00061880 */ sll $v1, $a2, 2 -/* 8329B8 802411B8 00661821 */ addu $v1, $v1, $a2 -/* 8329BC 802411BC 00031880 */ sll $v1, $v1, 2 -/* 8329C0 802411C0 00661823 */ subu $v1, $v1, $a2 -/* 8329C4 802411C4 000330C0 */ sll $a2, $v1, 3 -/* 8329C8 802411C8 00661821 */ addu $v1, $v1, $a2 -/* 8329CC 802411CC 000318C0 */ sll $v1, $v1, 3 -/* 8329D0 802411D0 3C01800B */ lui $at, 0x800b -/* 8329D4 802411D4 00230821 */ addu $at, $at, $v1 -/* 8329D8 802411D8 C4201DEC */ lwc1 $f0, 0x1dec($at) -/* 8329DC 802411DC 8E150004 */ lw $s5, 4($s0) -/* 8329E0 802411E0 4600010D */ trunc.w.s $f4, $f0 -/* 8329E4 802411E4 44112000 */ mfc1 $s1, $f4 -/* 8329E8 802411E8 0C0B1EAF */ jal get_variable -/* 8329EC 802411EC 0040982D */ daddu $s3, $v0, $zero -/* 8329F0 802411F0 4491B000 */ mtc1 $s1, $f22 -/* 8329F4 802411F4 00000000 */ nop -/* 8329F8 802411F8 4680B5A0 */ cvt.s.w $f22, $f22 -/* 8329FC 802411FC 4600B306 */ mov.s $f12, $f22 -/* 832A00 80241200 0C00A8D4 */ jal cos_deg -/* 832A04 80241204 0040802D */ daddu $s0, $v0, $zero -/* 832A08 80241208 4493A000 */ mtc1 $s3, $f20 -/* 832A0C 8024120C 00000000 */ nop -/* 832A10 80241210 4680A520 */ cvt.s.w $f20, $f20 -/* 832A14 80241214 4600A002 */ mul.s $f0, $f20, $f0 -/* 832A18 80241218 00000000 */ nop -/* 832A1C 8024121C 0240202D */ daddu $a0, $s2, $zero -/* 832A20 80241220 44901000 */ mtc1 $s0, $f2 -/* 832A24 80241224 00000000 */ nop -/* 832A28 80241228 468010A0 */ cvt.s.w $f2, $f2 -/* 832A2C 8024122C 46001081 */ sub.s $f2, $f2, $f0 -/* 832A30 80241230 3C05F4AC */ lui $a1, 0xf4ac -/* 832A34 80241234 4600110D */ trunc.w.s $f4, $f2 -/* 832A38 80241238 44102000 */ mfc1 $s0, $f4 -/* 832A3C 8024123C 0C0B1EAF */ jal get_variable -/* 832A40 80241240 34A5D483 */ ori $a1, $a1, 0xd483 -/* 832A44 80241244 4600B306 */ mov.s $f12, $f22 -/* 832A48 80241248 0C00A8BB */ jal sin_deg -/* 832A4C 8024124C 0040882D */ daddu $s1, $v0, $zero -/* 832A50 80241250 4600A502 */ mul.s $f20, $f20, $f0 -/* 832A54 80241254 00000000 */ nop -/* 832A58 80241258 0240202D */ daddu $a0, $s2, $zero -/* 832A5C 8024125C 44910000 */ mtc1 $s1, $f0 -/* 832A60 80241260 00000000 */ nop -/* 832A64 80241264 46800020 */ cvt.s.w $f0, $f0 -/* 832A68 80241268 46140001 */ sub.s $f0, $f0, $f20 -/* 832A6C 8024126C 0280282D */ daddu $a1, $s4, $zero -/* 832A70 80241270 02173023 */ subu $a2, $s0, $s7 -/* 832A74 80241274 4600010D */ trunc.w.s $f4, $f0 -/* 832A78 80241278 44102000 */ mfc1 $s0, $f4 -/* 832A7C 8024127C 0C0B2026 */ jal set_variable -/* 832A80 80241280 02168023 */ subu $s0, $s0, $s6 -/* 832A84 80241284 0240202D */ daddu $a0, $s2, $zero -/* 832A88 80241288 02A0282D */ daddu $a1, $s5, $zero -/* 832A8C 8024128C 0C0B2026 */ jal set_variable -/* 832A90 80241290 0200302D */ daddu $a2, $s0, $zero -/* 832A94 80241294 8FBF0030 */ lw $ra, 0x30($sp) -/* 832A98 80241298 8FB7002C */ lw $s7, 0x2c($sp) -/* 832A9C 8024129C 8FB60028 */ lw $s6, 0x28($sp) -/* 832AA0 802412A0 8FB50024 */ lw $s5, 0x24($sp) -/* 832AA4 802412A4 8FB40020 */ lw $s4, 0x20($sp) -/* 832AA8 802412A8 8FB3001C */ lw $s3, 0x1c($sp) -/* 832AAC 802412AC 8FB20018 */ lw $s2, 0x18($sp) -/* 832AB0 802412B0 8FB10014 */ lw $s1, 0x14($sp) -/* 832AB4 802412B4 8FB00010 */ lw $s0, 0x10($sp) -/* 832AB8 802412B8 D7B60040 */ ldc1 $f22, 0x40($sp) -/* 832ABC 802412BC D7B40038 */ ldc1 $f20, 0x38($sp) -/* 832AC0 802412C0 24020002 */ addiu $v0, $zero, 2 -/* 832AC4 802412C4 03E00008 */ jr $ra -/* 832AC8 802412C8 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/nonmatchings/world/area_mac/mac_04/843030/func_802410E0_843CB0.s b/asm/nonmatchings/world/area_mac/mac_04/843030/func_802410E0_843CB0.s deleted file mode 100644 index 4e17291946..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_04/843030/func_802410E0_843CB0.s +++ /dev/null @@ -1,107 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802410E0_843CB0 -/* 843CB0 802410E0 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 843CB4 802410E4 AFB20018 */ sw $s2, 0x18($sp) -/* 843CB8 802410E8 0080902D */ daddu $s2, $a0, $zero -/* 843CBC 802410EC AFBF0030 */ sw $ra, 0x30($sp) -/* 843CC0 802410F0 AFB7002C */ sw $s7, 0x2c($sp) -/* 843CC4 802410F4 AFB60028 */ sw $s6, 0x28($sp) -/* 843CC8 802410F8 AFB50024 */ sw $s5, 0x24($sp) -/* 843CCC 802410FC AFB40020 */ sw $s4, 0x20($sp) -/* 843CD0 80241100 AFB3001C */ sw $s3, 0x1c($sp) -/* 843CD4 80241104 AFB10014 */ sw $s1, 0x14($sp) -/* 843CD8 80241108 AFB00010 */ sw $s0, 0x10($sp) -/* 843CDC 8024110C F7B60040 */ sdc1 $f22, 0x40($sp) -/* 843CE0 80241110 F7B40038 */ sdc1 $f20, 0x38($sp) -/* 843CE4 80241114 8E50000C */ lw $s0, 0xc($s2) -/* 843CE8 80241118 8E050000 */ lw $a1, ($s0) -/* 843CEC 8024111C 0C0B1EAF */ jal get_variable -/* 843CF0 80241120 26100004 */ addiu $s0, $s0, 4 -/* 843CF4 80241124 8E050000 */ lw $a1, ($s0) -/* 843CF8 80241128 26100004 */ addiu $s0, $s0, 4 -/* 843CFC 8024112C 0240202D */ daddu $a0, $s2, $zero -/* 843D00 80241130 0C0B1EAF */ jal get_variable -/* 843D04 80241134 0040B82D */ daddu $s7, $v0, $zero -/* 843D08 80241138 8E050000 */ lw $a1, ($s0) -/* 843D0C 8024113C 26100004 */ addiu $s0, $s0, 4 -/* 843D10 80241140 0240202D */ daddu $a0, $s2, $zero -/* 843D14 80241144 0C0B1EAF */ jal get_variable -/* 843D18 80241148 0040B02D */ daddu $s6, $v0, $zero -/* 843D1C 8024114C 0240202D */ daddu $a0, $s2, $zero -/* 843D20 80241150 3C05F4AC */ lui $a1, 0xf4ac -/* 843D24 80241154 34A5D481 */ ori $a1, $a1, 0xd481 -/* 843D28 80241158 3C068007 */ lui $a2, %hi(gCurrentCameraID) -/* 843D2C 8024115C 8CC67410 */ lw $a2, %lo(gCurrentCameraID)($a2) -/* 843D30 80241160 8E140000 */ lw $s4, ($s0) -/* 843D34 80241164 00061880 */ sll $v1, $a2, 2 -/* 843D38 80241168 00661821 */ addu $v1, $v1, $a2 -/* 843D3C 8024116C 00031880 */ sll $v1, $v1, 2 -/* 843D40 80241170 00661823 */ subu $v1, $v1, $a2 -/* 843D44 80241174 000330C0 */ sll $a2, $v1, 3 -/* 843D48 80241178 00661821 */ addu $v1, $v1, $a2 -/* 843D4C 8024117C 000318C0 */ sll $v1, $v1, 3 -/* 843D50 80241180 3C01800B */ lui $at, 0x800b -/* 843D54 80241184 00230821 */ addu $at, $at, $v1 -/* 843D58 80241188 C4201DEC */ lwc1 $f0, 0x1dec($at) -/* 843D5C 8024118C 8E150004 */ lw $s5, 4($s0) -/* 843D60 80241190 4600010D */ trunc.w.s $f4, $f0 -/* 843D64 80241194 44112000 */ mfc1 $s1, $f4 -/* 843D68 80241198 0C0B1EAF */ jal get_variable -/* 843D6C 8024119C 0040982D */ daddu $s3, $v0, $zero -/* 843D70 802411A0 4491B000 */ mtc1 $s1, $f22 -/* 843D74 802411A4 00000000 */ nop -/* 843D78 802411A8 4680B5A0 */ cvt.s.w $f22, $f22 -/* 843D7C 802411AC 4600B306 */ mov.s $f12, $f22 -/* 843D80 802411B0 0C00A8D4 */ jal cos_deg -/* 843D84 802411B4 0040802D */ daddu $s0, $v0, $zero -/* 843D88 802411B8 4493A000 */ mtc1 $s3, $f20 -/* 843D8C 802411BC 00000000 */ nop -/* 843D90 802411C0 4680A520 */ cvt.s.w $f20, $f20 -/* 843D94 802411C4 4600A002 */ mul.s $f0, $f20, $f0 -/* 843D98 802411C8 00000000 */ nop -/* 843D9C 802411CC 0240202D */ daddu $a0, $s2, $zero -/* 843DA0 802411D0 44901000 */ mtc1 $s0, $f2 -/* 843DA4 802411D4 00000000 */ nop -/* 843DA8 802411D8 468010A0 */ cvt.s.w $f2, $f2 -/* 843DAC 802411DC 46001081 */ sub.s $f2, $f2, $f0 -/* 843DB0 802411E0 3C05F4AC */ lui $a1, 0xf4ac -/* 843DB4 802411E4 4600110D */ trunc.w.s $f4, $f2 -/* 843DB8 802411E8 44102000 */ mfc1 $s0, $f4 -/* 843DBC 802411EC 0C0B1EAF */ jal get_variable -/* 843DC0 802411F0 34A5D483 */ ori $a1, $a1, 0xd483 -/* 843DC4 802411F4 4600B306 */ mov.s $f12, $f22 -/* 843DC8 802411F8 0C00A8BB */ jal sin_deg -/* 843DCC 802411FC 0040882D */ daddu $s1, $v0, $zero -/* 843DD0 80241200 4600A502 */ mul.s $f20, $f20, $f0 -/* 843DD4 80241204 00000000 */ nop -/* 843DD8 80241208 0240202D */ daddu $a0, $s2, $zero -/* 843DDC 8024120C 44910000 */ mtc1 $s1, $f0 -/* 843DE0 80241210 00000000 */ nop -/* 843DE4 80241214 46800020 */ cvt.s.w $f0, $f0 -/* 843DE8 80241218 46140001 */ sub.s $f0, $f0, $f20 -/* 843DEC 8024121C 0280282D */ daddu $a1, $s4, $zero -/* 843DF0 80241220 02173023 */ subu $a2, $s0, $s7 -/* 843DF4 80241224 4600010D */ trunc.w.s $f4, $f0 -/* 843DF8 80241228 44102000 */ mfc1 $s0, $f4 -/* 843DFC 8024122C 0C0B2026 */ jal set_variable -/* 843E00 80241230 02168023 */ subu $s0, $s0, $s6 -/* 843E04 80241234 0240202D */ daddu $a0, $s2, $zero -/* 843E08 80241238 02A0282D */ daddu $a1, $s5, $zero -/* 843E0C 8024123C 0C0B2026 */ jal set_variable -/* 843E10 80241240 0200302D */ daddu $a2, $s0, $zero -/* 843E14 80241244 8FBF0030 */ lw $ra, 0x30($sp) -/* 843E18 80241248 8FB7002C */ lw $s7, 0x2c($sp) -/* 843E1C 8024124C 8FB60028 */ lw $s6, 0x28($sp) -/* 843E20 80241250 8FB50024 */ lw $s5, 0x24($sp) -/* 843E24 80241254 8FB40020 */ lw $s4, 0x20($sp) -/* 843E28 80241258 8FB3001C */ lw $s3, 0x1c($sp) -/* 843E2C 8024125C 8FB20018 */ lw $s2, 0x18($sp) -/* 843E30 80241260 8FB10014 */ lw $s1, 0x14($sp) -/* 843E34 80241264 8FB00010 */ lw $s0, 0x10($sp) -/* 843E38 80241268 D7B60040 */ ldc1 $f22, 0x40($sp) -/* 843E3C 8024126C D7B40038 */ ldc1 $f20, 0x38($sp) -/* 843E40 80241270 24020002 */ addiu $v0, $zero, 2 -/* 843E44 80241274 03E00008 */ jr $ra -/* 843E48 80241278 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/nonmatchings/world/area_mac/mac_05/852170/func_80241FA0_854110.s b/asm/nonmatchings/world/area_mac/mac_05/852170/func_80241FA0_854110.s deleted file mode 100644 index 07ecacde2e..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_05/852170/func_80241FA0_854110.s +++ /dev/null @@ -1,107 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241FA0_854110 -/* 854110 80241FA0 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 854114 80241FA4 AFB20018 */ sw $s2, 0x18($sp) -/* 854118 80241FA8 0080902D */ daddu $s2, $a0, $zero -/* 85411C 80241FAC AFBF0030 */ sw $ra, 0x30($sp) -/* 854120 80241FB0 AFB7002C */ sw $s7, 0x2c($sp) -/* 854124 80241FB4 AFB60028 */ sw $s6, 0x28($sp) -/* 854128 80241FB8 AFB50024 */ sw $s5, 0x24($sp) -/* 85412C 80241FBC AFB40020 */ sw $s4, 0x20($sp) -/* 854130 80241FC0 AFB3001C */ sw $s3, 0x1c($sp) -/* 854134 80241FC4 AFB10014 */ sw $s1, 0x14($sp) -/* 854138 80241FC8 AFB00010 */ sw $s0, 0x10($sp) -/* 85413C 80241FCC F7B60040 */ sdc1 $f22, 0x40($sp) -/* 854140 80241FD0 F7B40038 */ sdc1 $f20, 0x38($sp) -/* 854144 80241FD4 8E50000C */ lw $s0, 0xc($s2) -/* 854148 80241FD8 8E050000 */ lw $a1, ($s0) -/* 85414C 80241FDC 0C0B1EAF */ jal get_variable -/* 854150 80241FE0 26100004 */ addiu $s0, $s0, 4 -/* 854154 80241FE4 8E050000 */ lw $a1, ($s0) -/* 854158 80241FE8 26100004 */ addiu $s0, $s0, 4 -/* 85415C 80241FEC 0240202D */ daddu $a0, $s2, $zero -/* 854160 80241FF0 0C0B1EAF */ jal get_variable -/* 854164 80241FF4 0040B82D */ daddu $s7, $v0, $zero -/* 854168 80241FF8 8E050000 */ lw $a1, ($s0) -/* 85416C 80241FFC 26100004 */ addiu $s0, $s0, 4 -/* 854170 80242000 0240202D */ daddu $a0, $s2, $zero -/* 854174 80242004 0C0B1EAF */ jal get_variable -/* 854178 80242008 0040B02D */ daddu $s6, $v0, $zero -/* 85417C 8024200C 0240202D */ daddu $a0, $s2, $zero -/* 854180 80242010 3C05F4AC */ lui $a1, 0xf4ac -/* 854184 80242014 34A5D481 */ ori $a1, $a1, 0xd481 -/* 854188 80242018 3C068007 */ lui $a2, %hi(gCurrentCameraID) -/* 85418C 8024201C 8CC67410 */ lw $a2, %lo(gCurrentCameraID)($a2) -/* 854190 80242020 8E140000 */ lw $s4, ($s0) -/* 854194 80242024 00061880 */ sll $v1, $a2, 2 -/* 854198 80242028 00661821 */ addu $v1, $v1, $a2 -/* 85419C 8024202C 00031880 */ sll $v1, $v1, 2 -/* 8541A0 80242030 00661823 */ subu $v1, $v1, $a2 -/* 8541A4 80242034 000330C0 */ sll $a2, $v1, 3 -/* 8541A8 80242038 00661821 */ addu $v1, $v1, $a2 -/* 8541AC 8024203C 000318C0 */ sll $v1, $v1, 3 -/* 8541B0 80242040 3C01800B */ lui $at, 0x800b -/* 8541B4 80242044 00230821 */ addu $at, $at, $v1 -/* 8541B8 80242048 C4201DEC */ lwc1 $f0, 0x1dec($at) -/* 8541BC 8024204C 8E150004 */ lw $s5, 4($s0) -/* 8541C0 80242050 4600010D */ trunc.w.s $f4, $f0 -/* 8541C4 80242054 44112000 */ mfc1 $s1, $f4 -/* 8541C8 80242058 0C0B1EAF */ jal get_variable -/* 8541CC 8024205C 0040982D */ daddu $s3, $v0, $zero -/* 8541D0 80242060 4491B000 */ mtc1 $s1, $f22 -/* 8541D4 80242064 00000000 */ nop -/* 8541D8 80242068 4680B5A0 */ cvt.s.w $f22, $f22 -/* 8541DC 8024206C 4600B306 */ mov.s $f12, $f22 -/* 8541E0 80242070 0C00A8D4 */ jal cos_deg -/* 8541E4 80242074 0040802D */ daddu $s0, $v0, $zero -/* 8541E8 80242078 4493A000 */ mtc1 $s3, $f20 -/* 8541EC 8024207C 00000000 */ nop -/* 8541F0 80242080 4680A520 */ cvt.s.w $f20, $f20 -/* 8541F4 80242084 4600A002 */ mul.s $f0, $f20, $f0 -/* 8541F8 80242088 00000000 */ nop -/* 8541FC 8024208C 0240202D */ daddu $a0, $s2, $zero -/* 854200 80242090 44901000 */ mtc1 $s0, $f2 -/* 854204 80242094 00000000 */ nop -/* 854208 80242098 468010A0 */ cvt.s.w $f2, $f2 -/* 85420C 8024209C 46001081 */ sub.s $f2, $f2, $f0 -/* 854210 802420A0 3C05F4AC */ lui $a1, 0xf4ac -/* 854214 802420A4 4600110D */ trunc.w.s $f4, $f2 -/* 854218 802420A8 44102000 */ mfc1 $s0, $f4 -/* 85421C 802420AC 0C0B1EAF */ jal get_variable -/* 854220 802420B0 34A5D483 */ ori $a1, $a1, 0xd483 -/* 854224 802420B4 4600B306 */ mov.s $f12, $f22 -/* 854228 802420B8 0C00A8BB */ jal sin_deg -/* 85422C 802420BC 0040882D */ daddu $s1, $v0, $zero -/* 854230 802420C0 4600A502 */ mul.s $f20, $f20, $f0 -/* 854234 802420C4 00000000 */ nop -/* 854238 802420C8 0240202D */ daddu $a0, $s2, $zero -/* 85423C 802420CC 44910000 */ mtc1 $s1, $f0 -/* 854240 802420D0 00000000 */ nop -/* 854244 802420D4 46800020 */ cvt.s.w $f0, $f0 -/* 854248 802420D8 46140001 */ sub.s $f0, $f0, $f20 -/* 85424C 802420DC 0280282D */ daddu $a1, $s4, $zero -/* 854250 802420E0 02173023 */ subu $a2, $s0, $s7 -/* 854254 802420E4 4600010D */ trunc.w.s $f4, $f0 -/* 854258 802420E8 44102000 */ mfc1 $s0, $f4 -/* 85425C 802420EC 0C0B2026 */ jal set_variable -/* 854260 802420F0 02168023 */ subu $s0, $s0, $s6 -/* 854264 802420F4 0240202D */ daddu $a0, $s2, $zero -/* 854268 802420F8 02A0282D */ daddu $a1, $s5, $zero -/* 85426C 802420FC 0C0B2026 */ jal set_variable -/* 854270 80242100 0200302D */ daddu $a2, $s0, $zero -/* 854274 80242104 8FBF0030 */ lw $ra, 0x30($sp) -/* 854278 80242108 8FB7002C */ lw $s7, 0x2c($sp) -/* 85427C 8024210C 8FB60028 */ lw $s6, 0x28($sp) -/* 854280 80242110 8FB50024 */ lw $s5, 0x24($sp) -/* 854284 80242114 8FB40020 */ lw $s4, 0x20($sp) -/* 854288 80242118 8FB3001C */ lw $s3, 0x1c($sp) -/* 85428C 8024211C 8FB20018 */ lw $s2, 0x18($sp) -/* 854290 80242120 8FB10014 */ lw $s1, 0x14($sp) -/* 854294 80242124 8FB00010 */ lw $s0, 0x10($sp) -/* 854298 80242128 D7B60040 */ ldc1 $f22, 0x40($sp) -/* 85429C 8024212C D7B40038 */ ldc1 $f20, 0x38($sp) -/* 8542A0 80242130 24020002 */ addiu $v0, $zero, 2 -/* 8542A4 80242134 03E00008 */ jr $ra -/* 8542A8 80242138 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_802419E8_9C6DC8.s b/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_802419E8_9C6DC8.s deleted file mode 100644 index abdcd550d0..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_802419E8_9C6DC8.s +++ /dev/null @@ -1,107 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802419E8_9C6DC8 -/* 9C6DC8 802419E8 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 9C6DCC 802419EC AFB20018 */ sw $s2, 0x18($sp) -/* 9C6DD0 802419F0 0080902D */ daddu $s2, $a0, $zero -/* 9C6DD4 802419F4 AFBF0030 */ sw $ra, 0x30($sp) -/* 9C6DD8 802419F8 AFB7002C */ sw $s7, 0x2c($sp) -/* 9C6DDC 802419FC AFB60028 */ sw $s6, 0x28($sp) -/* 9C6DE0 80241A00 AFB50024 */ sw $s5, 0x24($sp) -/* 9C6DE4 80241A04 AFB40020 */ sw $s4, 0x20($sp) -/* 9C6DE8 80241A08 AFB3001C */ sw $s3, 0x1c($sp) -/* 9C6DEC 80241A0C AFB10014 */ sw $s1, 0x14($sp) -/* 9C6DF0 80241A10 AFB00010 */ sw $s0, 0x10($sp) -/* 9C6DF4 80241A14 F7B60040 */ sdc1 $f22, 0x40($sp) -/* 9C6DF8 80241A18 F7B40038 */ sdc1 $f20, 0x38($sp) -/* 9C6DFC 80241A1C 8E50000C */ lw $s0, 0xc($s2) -/* 9C6E00 80241A20 8E050000 */ lw $a1, ($s0) -/* 9C6E04 80241A24 0C0B1EAF */ jal get_variable -/* 9C6E08 80241A28 26100004 */ addiu $s0, $s0, 4 -/* 9C6E0C 80241A2C 8E050000 */ lw $a1, ($s0) -/* 9C6E10 80241A30 26100004 */ addiu $s0, $s0, 4 -/* 9C6E14 80241A34 0240202D */ daddu $a0, $s2, $zero -/* 9C6E18 80241A38 0C0B1EAF */ jal get_variable -/* 9C6E1C 80241A3C 0040B82D */ daddu $s7, $v0, $zero -/* 9C6E20 80241A40 8E050000 */ lw $a1, ($s0) -/* 9C6E24 80241A44 26100004 */ addiu $s0, $s0, 4 -/* 9C6E28 80241A48 0240202D */ daddu $a0, $s2, $zero -/* 9C6E2C 80241A4C 0C0B1EAF */ jal get_variable -/* 9C6E30 80241A50 0040B02D */ daddu $s6, $v0, $zero -/* 9C6E34 80241A54 0240202D */ daddu $a0, $s2, $zero -/* 9C6E38 80241A58 3C05F4AC */ lui $a1, 0xf4ac -/* 9C6E3C 80241A5C 34A5D481 */ ori $a1, $a1, 0xd481 -/* 9C6E40 80241A60 3C068007 */ lui $a2, %hi(gCurrentCameraID) -/* 9C6E44 80241A64 8CC67410 */ lw $a2, %lo(gCurrentCameraID)($a2) -/* 9C6E48 80241A68 8E140000 */ lw $s4, ($s0) -/* 9C6E4C 80241A6C 00061880 */ sll $v1, $a2, 2 -/* 9C6E50 80241A70 00661821 */ addu $v1, $v1, $a2 -/* 9C6E54 80241A74 00031880 */ sll $v1, $v1, 2 -/* 9C6E58 80241A78 00661823 */ subu $v1, $v1, $a2 -/* 9C6E5C 80241A7C 000330C0 */ sll $a2, $v1, 3 -/* 9C6E60 80241A80 00661821 */ addu $v1, $v1, $a2 -/* 9C6E64 80241A84 000318C0 */ sll $v1, $v1, 3 -/* 9C6E68 80241A88 3C01800B */ lui $at, 0x800b -/* 9C6E6C 80241A8C 00230821 */ addu $at, $at, $v1 -/* 9C6E70 80241A90 C4201DEC */ lwc1 $f0, 0x1dec($at) -/* 9C6E74 80241A94 8E150004 */ lw $s5, 4($s0) -/* 9C6E78 80241A98 4600010D */ trunc.w.s $f4, $f0 -/* 9C6E7C 80241A9C 44112000 */ mfc1 $s1, $f4 -/* 9C6E80 80241AA0 0C0B1EAF */ jal get_variable -/* 9C6E84 80241AA4 0040982D */ daddu $s3, $v0, $zero -/* 9C6E88 80241AA8 4491B000 */ mtc1 $s1, $f22 -/* 9C6E8C 80241AAC 00000000 */ nop -/* 9C6E90 80241AB0 4680B5A0 */ cvt.s.w $f22, $f22 -/* 9C6E94 80241AB4 4600B306 */ mov.s $f12, $f22 -/* 9C6E98 80241AB8 0C00A8D4 */ jal cos_deg -/* 9C6E9C 80241ABC 0040802D */ daddu $s0, $v0, $zero -/* 9C6EA0 80241AC0 4493A000 */ mtc1 $s3, $f20 -/* 9C6EA4 80241AC4 00000000 */ nop -/* 9C6EA8 80241AC8 4680A520 */ cvt.s.w $f20, $f20 -/* 9C6EAC 80241ACC 4600A002 */ mul.s $f0, $f20, $f0 -/* 9C6EB0 80241AD0 00000000 */ nop -/* 9C6EB4 80241AD4 0240202D */ daddu $a0, $s2, $zero -/* 9C6EB8 80241AD8 44901000 */ mtc1 $s0, $f2 -/* 9C6EBC 80241ADC 00000000 */ nop -/* 9C6EC0 80241AE0 468010A0 */ cvt.s.w $f2, $f2 -/* 9C6EC4 80241AE4 46001081 */ sub.s $f2, $f2, $f0 -/* 9C6EC8 80241AE8 3C05F4AC */ lui $a1, 0xf4ac -/* 9C6ECC 80241AEC 4600110D */ trunc.w.s $f4, $f2 -/* 9C6ED0 80241AF0 44102000 */ mfc1 $s0, $f4 -/* 9C6ED4 80241AF4 0C0B1EAF */ jal get_variable -/* 9C6ED8 80241AF8 34A5D483 */ ori $a1, $a1, 0xd483 -/* 9C6EDC 80241AFC 4600B306 */ mov.s $f12, $f22 -/* 9C6EE0 80241B00 0C00A8BB */ jal sin_deg -/* 9C6EE4 80241B04 0040882D */ daddu $s1, $v0, $zero -/* 9C6EE8 80241B08 4600A502 */ mul.s $f20, $f20, $f0 -/* 9C6EEC 80241B0C 00000000 */ nop -/* 9C6EF0 80241B10 0240202D */ daddu $a0, $s2, $zero -/* 9C6EF4 80241B14 44910000 */ mtc1 $s1, $f0 -/* 9C6EF8 80241B18 00000000 */ nop -/* 9C6EFC 80241B1C 46800020 */ cvt.s.w $f0, $f0 -/* 9C6F00 80241B20 46140001 */ sub.s $f0, $f0, $f20 -/* 9C6F04 80241B24 0280282D */ daddu $a1, $s4, $zero -/* 9C6F08 80241B28 02173023 */ subu $a2, $s0, $s7 -/* 9C6F0C 80241B2C 4600010D */ trunc.w.s $f4, $f0 -/* 9C6F10 80241B30 44102000 */ mfc1 $s0, $f4 -/* 9C6F14 80241B34 0C0B2026 */ jal set_variable -/* 9C6F18 80241B38 02168023 */ subu $s0, $s0, $s6 -/* 9C6F1C 80241B3C 0240202D */ daddu $a0, $s2, $zero -/* 9C6F20 80241B40 02A0282D */ daddu $a1, $s5, $zero -/* 9C6F24 80241B44 0C0B2026 */ jal set_variable -/* 9C6F28 80241B48 0200302D */ daddu $a2, $s0, $zero -/* 9C6F2C 80241B4C 8FBF0030 */ lw $ra, 0x30($sp) -/* 9C6F30 80241B50 8FB7002C */ lw $s7, 0x2c($sp) -/* 9C6F34 80241B54 8FB60028 */ lw $s6, 0x28($sp) -/* 9C6F38 80241B58 8FB50024 */ lw $s5, 0x24($sp) -/* 9C6F3C 80241B5C 8FB40020 */ lw $s4, 0x20($sp) -/* 9C6F40 80241B60 8FB3001C */ lw $s3, 0x1c($sp) -/* 9C6F44 80241B64 8FB20018 */ lw $s2, 0x18($sp) -/* 9C6F48 80241B68 8FB10014 */ lw $s1, 0x14($sp) -/* 9C6F4C 80241B6C 8FB00010 */ lw $s0, 0x10($sp) -/* 9C6F50 80241B70 D7B60040 */ ldc1 $f22, 0x40($sp) -/* 9C6F54 80241B74 D7B40038 */ ldc1 $f20, 0x38($sp) -/* 9C6F58 80241B78 24020002 */ addiu $v0, $zero, 2 -/* 9C6F5C 80241B7C 03E00008 */ jr $ra -/* 9C6F60 80241B80 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80242590_9D95B0.s b/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80242590_9D95B0.s deleted file mode 100644 index 9de74ff0f4..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80242590_9D95B0.s +++ /dev/null @@ -1,107 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242590_9D95B0 -/* 9D95B0 80242590 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 9D95B4 80242594 AFB20018 */ sw $s2, 0x18($sp) -/* 9D95B8 80242598 0080902D */ daddu $s2, $a0, $zero -/* 9D95BC 8024259C AFBF0030 */ sw $ra, 0x30($sp) -/* 9D95C0 802425A0 AFB7002C */ sw $s7, 0x2c($sp) -/* 9D95C4 802425A4 AFB60028 */ sw $s6, 0x28($sp) -/* 9D95C8 802425A8 AFB50024 */ sw $s5, 0x24($sp) -/* 9D95CC 802425AC AFB40020 */ sw $s4, 0x20($sp) -/* 9D95D0 802425B0 AFB3001C */ sw $s3, 0x1c($sp) -/* 9D95D4 802425B4 AFB10014 */ sw $s1, 0x14($sp) -/* 9D95D8 802425B8 AFB00010 */ sw $s0, 0x10($sp) -/* 9D95DC 802425BC F7B60040 */ sdc1 $f22, 0x40($sp) -/* 9D95E0 802425C0 F7B40038 */ sdc1 $f20, 0x38($sp) -/* 9D95E4 802425C4 8E50000C */ lw $s0, 0xc($s2) -/* 9D95E8 802425C8 8E050000 */ lw $a1, ($s0) -/* 9D95EC 802425CC 0C0B1EAF */ jal get_variable -/* 9D95F0 802425D0 26100004 */ addiu $s0, $s0, 4 -/* 9D95F4 802425D4 8E050000 */ lw $a1, ($s0) -/* 9D95F8 802425D8 26100004 */ addiu $s0, $s0, 4 -/* 9D95FC 802425DC 0240202D */ daddu $a0, $s2, $zero -/* 9D9600 802425E0 0C0B1EAF */ jal get_variable -/* 9D9604 802425E4 0040B82D */ daddu $s7, $v0, $zero -/* 9D9608 802425E8 8E050000 */ lw $a1, ($s0) -/* 9D960C 802425EC 26100004 */ addiu $s0, $s0, 4 -/* 9D9610 802425F0 0240202D */ daddu $a0, $s2, $zero -/* 9D9614 802425F4 0C0B1EAF */ jal get_variable -/* 9D9618 802425F8 0040B02D */ daddu $s6, $v0, $zero -/* 9D961C 802425FC 0240202D */ daddu $a0, $s2, $zero -/* 9D9620 80242600 3C05F4AC */ lui $a1, 0xf4ac -/* 9D9624 80242604 34A5D481 */ ori $a1, $a1, 0xd481 -/* 9D9628 80242608 3C068007 */ lui $a2, %hi(gCurrentCameraID) -/* 9D962C 8024260C 8CC67410 */ lw $a2, %lo(gCurrentCameraID)($a2) -/* 9D9630 80242610 8E140000 */ lw $s4, ($s0) -/* 9D9634 80242614 00061880 */ sll $v1, $a2, 2 -/* 9D9638 80242618 00661821 */ addu $v1, $v1, $a2 -/* 9D963C 8024261C 00031880 */ sll $v1, $v1, 2 -/* 9D9640 80242620 00661823 */ subu $v1, $v1, $a2 -/* 9D9644 80242624 000330C0 */ sll $a2, $v1, 3 -/* 9D9648 80242628 00661821 */ addu $v1, $v1, $a2 -/* 9D964C 8024262C 000318C0 */ sll $v1, $v1, 3 -/* 9D9650 80242630 3C01800B */ lui $at, 0x800b -/* 9D9654 80242634 00230821 */ addu $at, $at, $v1 -/* 9D9658 80242638 C4201DEC */ lwc1 $f0, 0x1dec($at) -/* 9D965C 8024263C 8E150004 */ lw $s5, 4($s0) -/* 9D9660 80242640 4600010D */ trunc.w.s $f4, $f0 -/* 9D9664 80242644 44112000 */ mfc1 $s1, $f4 -/* 9D9668 80242648 0C0B1EAF */ jal get_variable -/* 9D966C 8024264C 0040982D */ daddu $s3, $v0, $zero -/* 9D9670 80242650 4491B000 */ mtc1 $s1, $f22 -/* 9D9674 80242654 00000000 */ nop -/* 9D9678 80242658 4680B5A0 */ cvt.s.w $f22, $f22 -/* 9D967C 8024265C 4600B306 */ mov.s $f12, $f22 -/* 9D9680 80242660 0C00A8D4 */ jal cos_deg -/* 9D9684 80242664 0040802D */ daddu $s0, $v0, $zero -/* 9D9688 80242668 4493A000 */ mtc1 $s3, $f20 -/* 9D968C 8024266C 00000000 */ nop -/* 9D9690 80242670 4680A520 */ cvt.s.w $f20, $f20 -/* 9D9694 80242674 4600A002 */ mul.s $f0, $f20, $f0 -/* 9D9698 80242678 00000000 */ nop -/* 9D969C 8024267C 0240202D */ daddu $a0, $s2, $zero -/* 9D96A0 80242680 44901000 */ mtc1 $s0, $f2 -/* 9D96A4 80242684 00000000 */ nop -/* 9D96A8 80242688 468010A0 */ cvt.s.w $f2, $f2 -/* 9D96AC 8024268C 46001081 */ sub.s $f2, $f2, $f0 -/* 9D96B0 80242690 3C05F4AC */ lui $a1, 0xf4ac -/* 9D96B4 80242694 4600110D */ trunc.w.s $f4, $f2 -/* 9D96B8 80242698 44102000 */ mfc1 $s0, $f4 -/* 9D96BC 8024269C 0C0B1EAF */ jal get_variable -/* 9D96C0 802426A0 34A5D483 */ ori $a1, $a1, 0xd483 -/* 9D96C4 802426A4 4600B306 */ mov.s $f12, $f22 -/* 9D96C8 802426A8 0C00A8BB */ jal sin_deg -/* 9D96CC 802426AC 0040882D */ daddu $s1, $v0, $zero -/* 9D96D0 802426B0 4600A502 */ mul.s $f20, $f20, $f0 -/* 9D96D4 802426B4 00000000 */ nop -/* 9D96D8 802426B8 0240202D */ daddu $a0, $s2, $zero -/* 9D96DC 802426BC 44910000 */ mtc1 $s1, $f0 -/* 9D96E0 802426C0 00000000 */ nop -/* 9D96E4 802426C4 46800020 */ cvt.s.w $f0, $f0 -/* 9D96E8 802426C8 46140001 */ sub.s $f0, $f0, $f20 -/* 9D96EC 802426CC 0280282D */ daddu $a1, $s4, $zero -/* 9D96F0 802426D0 02173023 */ subu $a2, $s0, $s7 -/* 9D96F4 802426D4 4600010D */ trunc.w.s $f4, $f0 -/* 9D96F8 802426D8 44102000 */ mfc1 $s0, $f4 -/* 9D96FC 802426DC 0C0B2026 */ jal set_variable -/* 9D9700 802426E0 02168023 */ subu $s0, $s0, $s6 -/* 9D9704 802426E4 0240202D */ daddu $a0, $s2, $zero -/* 9D9708 802426E8 02A0282D */ daddu $a1, $s5, $zero -/* 9D970C 802426EC 0C0B2026 */ jal set_variable -/* 9D9710 802426F0 0200302D */ daddu $a2, $s0, $zero -/* 9D9714 802426F4 8FBF0030 */ lw $ra, 0x30($sp) -/* 9D9718 802426F8 8FB7002C */ lw $s7, 0x2c($sp) -/* 9D971C 802426FC 8FB60028 */ lw $s6, 0x28($sp) -/* 9D9720 80242700 8FB50024 */ lw $s5, 0x24($sp) -/* 9D9724 80242704 8FB40020 */ lw $s4, 0x20($sp) -/* 9D9728 80242708 8FB3001C */ lw $s3, 0x1c($sp) -/* 9D972C 8024270C 8FB20018 */ lw $s2, 0x18($sp) -/* 9D9730 80242710 8FB10014 */ lw $s1, 0x14($sp) -/* 9D9734 80242714 8FB00010 */ lw $s0, 0x10($sp) -/* 9D9738 80242718 D7B60040 */ ldc1 $f22, 0x40($sp) -/* 9D973C 8024271C D7B40038 */ ldc1 $f20, 0x38($sp) -/* 9D9740 80242720 24020002 */ addiu $v0, $zero, 2 -/* 9D9744 80242724 03E00008 */ jr $ra -/* 9D9748 80242728 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80241380_CF8EF0.s b/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80241380_CF8EF0.s deleted file mode 100644 index 366f4cab7e..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80241380_CF8EF0.s +++ /dev/null @@ -1,107 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241380_CF8EF0 -/* CF8EF0 80241380 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* CF8EF4 80241384 AFB20018 */ sw $s2, 0x18($sp) -/* CF8EF8 80241388 0080902D */ daddu $s2, $a0, $zero -/* CF8EFC 8024138C AFBF0030 */ sw $ra, 0x30($sp) -/* CF8F00 80241390 AFB7002C */ sw $s7, 0x2c($sp) -/* CF8F04 80241394 AFB60028 */ sw $s6, 0x28($sp) -/* CF8F08 80241398 AFB50024 */ sw $s5, 0x24($sp) -/* CF8F0C 8024139C AFB40020 */ sw $s4, 0x20($sp) -/* CF8F10 802413A0 AFB3001C */ sw $s3, 0x1c($sp) -/* CF8F14 802413A4 AFB10014 */ sw $s1, 0x14($sp) -/* CF8F18 802413A8 AFB00010 */ sw $s0, 0x10($sp) -/* CF8F1C 802413AC F7B60040 */ sdc1 $f22, 0x40($sp) -/* CF8F20 802413B0 F7B40038 */ sdc1 $f20, 0x38($sp) -/* CF8F24 802413B4 8E50000C */ lw $s0, 0xc($s2) -/* CF8F28 802413B8 8E050000 */ lw $a1, ($s0) -/* CF8F2C 802413BC 0C0B1EAF */ jal get_variable -/* CF8F30 802413C0 26100004 */ addiu $s0, $s0, 4 -/* CF8F34 802413C4 8E050000 */ lw $a1, ($s0) -/* CF8F38 802413C8 26100004 */ addiu $s0, $s0, 4 -/* CF8F3C 802413CC 0240202D */ daddu $a0, $s2, $zero -/* CF8F40 802413D0 0C0B1EAF */ jal get_variable -/* CF8F44 802413D4 0040B82D */ daddu $s7, $v0, $zero -/* CF8F48 802413D8 8E050000 */ lw $a1, ($s0) -/* CF8F4C 802413DC 26100004 */ addiu $s0, $s0, 4 -/* CF8F50 802413E0 0240202D */ daddu $a0, $s2, $zero -/* CF8F54 802413E4 0C0B1EAF */ jal get_variable -/* CF8F58 802413E8 0040B02D */ daddu $s6, $v0, $zero -/* CF8F5C 802413EC 0240202D */ daddu $a0, $s2, $zero -/* CF8F60 802413F0 3C05F4AC */ lui $a1, 0xf4ac -/* CF8F64 802413F4 34A5D481 */ ori $a1, $a1, 0xd481 -/* CF8F68 802413F8 3C068007 */ lui $a2, %hi(gCurrentCameraID) -/* CF8F6C 802413FC 8CC67410 */ lw $a2, %lo(gCurrentCameraID)($a2) -/* CF8F70 80241400 8E140000 */ lw $s4, ($s0) -/* CF8F74 80241404 00061880 */ sll $v1, $a2, 2 -/* CF8F78 80241408 00661821 */ addu $v1, $v1, $a2 -/* CF8F7C 8024140C 00031880 */ sll $v1, $v1, 2 -/* CF8F80 80241410 00661823 */ subu $v1, $v1, $a2 -/* CF8F84 80241414 000330C0 */ sll $a2, $v1, 3 -/* CF8F88 80241418 00661821 */ addu $v1, $v1, $a2 -/* CF8F8C 8024141C 000318C0 */ sll $v1, $v1, 3 -/* CF8F90 80241420 3C01800B */ lui $at, 0x800b -/* CF8F94 80241424 00230821 */ addu $at, $at, $v1 -/* CF8F98 80241428 C4201DEC */ lwc1 $f0, 0x1dec($at) -/* CF8F9C 8024142C 8E150004 */ lw $s5, 4($s0) -/* CF8FA0 80241430 4600010D */ trunc.w.s $f4, $f0 -/* CF8FA4 80241434 44112000 */ mfc1 $s1, $f4 -/* CF8FA8 80241438 0C0B1EAF */ jal get_variable -/* CF8FAC 8024143C 0040982D */ daddu $s3, $v0, $zero -/* CF8FB0 80241440 4491B000 */ mtc1 $s1, $f22 -/* CF8FB4 80241444 00000000 */ nop -/* CF8FB8 80241448 4680B5A0 */ cvt.s.w $f22, $f22 -/* CF8FBC 8024144C 4600B306 */ mov.s $f12, $f22 -/* CF8FC0 80241450 0C00A8D4 */ jal cos_deg -/* CF8FC4 80241454 0040802D */ daddu $s0, $v0, $zero -/* CF8FC8 80241458 4493A000 */ mtc1 $s3, $f20 -/* CF8FCC 8024145C 00000000 */ nop -/* CF8FD0 80241460 4680A520 */ cvt.s.w $f20, $f20 -/* CF8FD4 80241464 4600A002 */ mul.s $f0, $f20, $f0 -/* CF8FD8 80241468 00000000 */ nop -/* CF8FDC 8024146C 0240202D */ daddu $a0, $s2, $zero -/* CF8FE0 80241470 44901000 */ mtc1 $s0, $f2 -/* CF8FE4 80241474 00000000 */ nop -/* CF8FE8 80241478 468010A0 */ cvt.s.w $f2, $f2 -/* CF8FEC 8024147C 46001081 */ sub.s $f2, $f2, $f0 -/* CF8FF0 80241480 3C05F4AC */ lui $a1, 0xf4ac -/* CF8FF4 80241484 4600110D */ trunc.w.s $f4, $f2 -/* CF8FF8 80241488 44102000 */ mfc1 $s0, $f4 -/* CF8FFC 8024148C 0C0B1EAF */ jal get_variable -/* CF9000 80241490 34A5D483 */ ori $a1, $a1, 0xd483 -/* CF9004 80241494 4600B306 */ mov.s $f12, $f22 -/* CF9008 80241498 0C00A8BB */ jal sin_deg -/* CF900C 8024149C 0040882D */ daddu $s1, $v0, $zero -/* CF9010 802414A0 4600A502 */ mul.s $f20, $f20, $f0 -/* CF9014 802414A4 00000000 */ nop -/* CF9018 802414A8 0240202D */ daddu $a0, $s2, $zero -/* CF901C 802414AC 44910000 */ mtc1 $s1, $f0 -/* CF9020 802414B0 00000000 */ nop -/* CF9024 802414B4 46800020 */ cvt.s.w $f0, $f0 -/* CF9028 802414B8 46140001 */ sub.s $f0, $f0, $f20 -/* CF902C 802414BC 0280282D */ daddu $a1, $s4, $zero -/* CF9030 802414C0 02173023 */ subu $a2, $s0, $s7 -/* CF9034 802414C4 4600010D */ trunc.w.s $f4, $f0 -/* CF9038 802414C8 44102000 */ mfc1 $s0, $f4 -/* CF903C 802414CC 0C0B2026 */ jal set_variable -/* CF9040 802414D0 02168023 */ subu $s0, $s0, $s6 -/* CF9044 802414D4 0240202D */ daddu $a0, $s2, $zero -/* CF9048 802414D8 02A0282D */ daddu $a1, $s5, $zero -/* CF904C 802414DC 0C0B2026 */ jal set_variable -/* CF9050 802414E0 0200302D */ daddu $a2, $s0, $zero -/* CF9054 802414E4 8FBF0030 */ lw $ra, 0x30($sp) -/* CF9058 802414E8 8FB7002C */ lw $s7, 0x2c($sp) -/* CF905C 802414EC 8FB60028 */ lw $s6, 0x28($sp) -/* CF9060 802414F0 8FB50024 */ lw $s5, 0x24($sp) -/* CF9064 802414F4 8FB40020 */ lw $s4, 0x20($sp) -/* CF9068 802414F8 8FB3001C */ lw $s3, 0x1c($sp) -/* CF906C 802414FC 8FB20018 */ lw $s2, 0x18($sp) -/* CF9070 80241500 8FB10014 */ lw $s1, 0x14($sp) -/* CF9074 80241504 8FB00010 */ lw $s0, 0x10($sp) -/* CF9078 80241508 D7B60040 */ ldc1 $f22, 0x40($sp) -/* CF907C 8024150C D7B40038 */ ldc1 $f20, 0x38($sp) -/* CF9080 80241510 24020002 */ addiu $v0, $zero, 2 -/* CF9084 80241514 03E00008 */ jr $ra -/* CF9088 80241518 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_802417AC_D06EDC.s b/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_802417AC_D06EDC.s deleted file mode 100644 index 26ee6de3ae..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_802417AC_D06EDC.s +++ /dev/null @@ -1,107 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802417AC_D06EDC -/* D06EDC 802417AC 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* D06EE0 802417B0 AFB20018 */ sw $s2, 0x18($sp) -/* D06EE4 802417B4 0080902D */ daddu $s2, $a0, $zero -/* D06EE8 802417B8 AFBF0030 */ sw $ra, 0x30($sp) -/* D06EEC 802417BC AFB7002C */ sw $s7, 0x2c($sp) -/* D06EF0 802417C0 AFB60028 */ sw $s6, 0x28($sp) -/* D06EF4 802417C4 AFB50024 */ sw $s5, 0x24($sp) -/* D06EF8 802417C8 AFB40020 */ sw $s4, 0x20($sp) -/* D06EFC 802417CC AFB3001C */ sw $s3, 0x1c($sp) -/* D06F00 802417D0 AFB10014 */ sw $s1, 0x14($sp) -/* D06F04 802417D4 AFB00010 */ sw $s0, 0x10($sp) -/* D06F08 802417D8 F7B60040 */ sdc1 $f22, 0x40($sp) -/* D06F0C 802417DC F7B40038 */ sdc1 $f20, 0x38($sp) -/* D06F10 802417E0 8E50000C */ lw $s0, 0xc($s2) -/* D06F14 802417E4 8E050000 */ lw $a1, ($s0) -/* D06F18 802417E8 0C0B1EAF */ jal get_variable -/* D06F1C 802417EC 26100004 */ addiu $s0, $s0, 4 -/* D06F20 802417F0 8E050000 */ lw $a1, ($s0) -/* D06F24 802417F4 26100004 */ addiu $s0, $s0, 4 -/* D06F28 802417F8 0240202D */ daddu $a0, $s2, $zero -/* D06F2C 802417FC 0C0B1EAF */ jal get_variable -/* D06F30 80241800 0040B82D */ daddu $s7, $v0, $zero -/* D06F34 80241804 8E050000 */ lw $a1, ($s0) -/* D06F38 80241808 26100004 */ addiu $s0, $s0, 4 -/* D06F3C 8024180C 0240202D */ daddu $a0, $s2, $zero -/* D06F40 80241810 0C0B1EAF */ jal get_variable -/* D06F44 80241814 0040B02D */ daddu $s6, $v0, $zero -/* D06F48 80241818 0240202D */ daddu $a0, $s2, $zero -/* D06F4C 8024181C 3C05F4AC */ lui $a1, 0xf4ac -/* D06F50 80241820 34A5D481 */ ori $a1, $a1, 0xd481 -/* D06F54 80241824 3C068007 */ lui $a2, %hi(gCurrentCameraID) -/* D06F58 80241828 8CC67410 */ lw $a2, %lo(gCurrentCameraID)($a2) -/* D06F5C 8024182C 8E140000 */ lw $s4, ($s0) -/* D06F60 80241830 00061880 */ sll $v1, $a2, 2 -/* D06F64 80241834 00661821 */ addu $v1, $v1, $a2 -/* D06F68 80241838 00031880 */ sll $v1, $v1, 2 -/* D06F6C 8024183C 00661823 */ subu $v1, $v1, $a2 -/* D06F70 80241840 000330C0 */ sll $a2, $v1, 3 -/* D06F74 80241844 00661821 */ addu $v1, $v1, $a2 -/* D06F78 80241848 000318C0 */ sll $v1, $v1, 3 -/* D06F7C 8024184C 3C01800B */ lui $at, 0x800b -/* D06F80 80241850 00230821 */ addu $at, $at, $v1 -/* D06F84 80241854 C4201DEC */ lwc1 $f0, 0x1dec($at) -/* D06F88 80241858 8E150004 */ lw $s5, 4($s0) -/* D06F8C 8024185C 4600010D */ trunc.w.s $f4, $f0 -/* D06F90 80241860 44112000 */ mfc1 $s1, $f4 -/* D06F94 80241864 0C0B1EAF */ jal get_variable -/* D06F98 80241868 0040982D */ daddu $s3, $v0, $zero -/* D06F9C 8024186C 4491B000 */ mtc1 $s1, $f22 -/* D06FA0 80241870 00000000 */ nop -/* D06FA4 80241874 4680B5A0 */ cvt.s.w $f22, $f22 -/* D06FA8 80241878 4600B306 */ mov.s $f12, $f22 -/* D06FAC 8024187C 0C00A8D4 */ jal cos_deg -/* D06FB0 80241880 0040802D */ daddu $s0, $v0, $zero -/* D06FB4 80241884 4493A000 */ mtc1 $s3, $f20 -/* D06FB8 80241888 00000000 */ nop -/* D06FBC 8024188C 4680A520 */ cvt.s.w $f20, $f20 -/* D06FC0 80241890 4600A002 */ mul.s $f0, $f20, $f0 -/* D06FC4 80241894 00000000 */ nop -/* D06FC8 80241898 0240202D */ daddu $a0, $s2, $zero -/* D06FCC 8024189C 44901000 */ mtc1 $s0, $f2 -/* D06FD0 802418A0 00000000 */ nop -/* D06FD4 802418A4 468010A0 */ cvt.s.w $f2, $f2 -/* D06FD8 802418A8 46001081 */ sub.s $f2, $f2, $f0 -/* D06FDC 802418AC 3C05F4AC */ lui $a1, 0xf4ac -/* D06FE0 802418B0 4600110D */ trunc.w.s $f4, $f2 -/* D06FE4 802418B4 44102000 */ mfc1 $s0, $f4 -/* D06FE8 802418B8 0C0B1EAF */ jal get_variable -/* D06FEC 802418BC 34A5D483 */ ori $a1, $a1, 0xd483 -/* D06FF0 802418C0 4600B306 */ mov.s $f12, $f22 -/* D06FF4 802418C4 0C00A8BB */ jal sin_deg -/* D06FF8 802418C8 0040882D */ daddu $s1, $v0, $zero -/* D06FFC 802418CC 4600A502 */ mul.s $f20, $f20, $f0 -/* D07000 802418D0 00000000 */ nop -/* D07004 802418D4 0240202D */ daddu $a0, $s2, $zero -/* D07008 802418D8 44910000 */ mtc1 $s1, $f0 -/* D0700C 802418DC 00000000 */ nop -/* D07010 802418E0 46800020 */ cvt.s.w $f0, $f0 -/* D07014 802418E4 46140001 */ sub.s $f0, $f0, $f20 -/* D07018 802418E8 0280282D */ daddu $a1, $s4, $zero -/* D0701C 802418EC 02173023 */ subu $a2, $s0, $s7 -/* D07020 802418F0 4600010D */ trunc.w.s $f4, $f0 -/* D07024 802418F4 44102000 */ mfc1 $s0, $f4 -/* D07028 802418F8 0C0B2026 */ jal set_variable -/* D0702C 802418FC 02168023 */ subu $s0, $s0, $s6 -/* D07030 80241900 0240202D */ daddu $a0, $s2, $zero -/* D07034 80241904 02A0282D */ daddu $a1, $s5, $zero -/* D07038 80241908 0C0B2026 */ jal set_variable -/* D0703C 8024190C 0200302D */ daddu $a2, $s0, $zero -/* D07040 80241910 8FBF0030 */ lw $ra, 0x30($sp) -/* D07044 80241914 8FB7002C */ lw $s7, 0x2c($sp) -/* D07048 80241918 8FB60028 */ lw $s6, 0x28($sp) -/* D0704C 8024191C 8FB50024 */ lw $s5, 0x24($sp) -/* D07050 80241920 8FB40020 */ lw $s4, 0x20($sp) -/* D07054 80241924 8FB3001C */ lw $s3, 0x1c($sp) -/* D07058 80241928 8FB20018 */ lw $s2, 0x18($sp) -/* D0705C 8024192C 8FB10014 */ lw $s1, 0x14($sp) -/* D07060 80241930 8FB00010 */ lw $s0, 0x10($sp) -/* D07064 80241934 D7B60040 */ ldc1 $f22, 0x40($sp) -/* D07068 80241938 D7B40038 */ ldc1 $f20, 0x38($sp) -/* D0706C 8024193C 24020002 */ addiu $v0, $zero, 2 -/* D07070 80241940 03E00008 */ jr $ra -/* D07074 80241944 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_80241450_D3BA20.s b/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_80241450_D3BA20.s deleted file mode 100644 index 546c2ed5db..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_80241450_D3BA20.s +++ /dev/null @@ -1,107 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241450_D3BA20 -/* D3BA20 80241450 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* D3BA24 80241454 AFB20018 */ sw $s2, 0x18($sp) -/* D3BA28 80241458 0080902D */ daddu $s2, $a0, $zero -/* D3BA2C 8024145C AFBF0030 */ sw $ra, 0x30($sp) -/* D3BA30 80241460 AFB7002C */ sw $s7, 0x2c($sp) -/* D3BA34 80241464 AFB60028 */ sw $s6, 0x28($sp) -/* D3BA38 80241468 AFB50024 */ sw $s5, 0x24($sp) -/* D3BA3C 8024146C AFB40020 */ sw $s4, 0x20($sp) -/* D3BA40 80241470 AFB3001C */ sw $s3, 0x1c($sp) -/* D3BA44 80241474 AFB10014 */ sw $s1, 0x14($sp) -/* D3BA48 80241478 AFB00010 */ sw $s0, 0x10($sp) -/* D3BA4C 8024147C F7B60040 */ sdc1 $f22, 0x40($sp) -/* D3BA50 80241480 F7B40038 */ sdc1 $f20, 0x38($sp) -/* D3BA54 80241484 8E50000C */ lw $s0, 0xc($s2) -/* D3BA58 80241488 8E050000 */ lw $a1, ($s0) -/* D3BA5C 8024148C 0C0B1EAF */ jal get_variable -/* D3BA60 80241490 26100004 */ addiu $s0, $s0, 4 -/* D3BA64 80241494 8E050000 */ lw $a1, ($s0) -/* D3BA68 80241498 26100004 */ addiu $s0, $s0, 4 -/* D3BA6C 8024149C 0240202D */ daddu $a0, $s2, $zero -/* D3BA70 802414A0 0C0B1EAF */ jal get_variable -/* D3BA74 802414A4 0040B82D */ daddu $s7, $v0, $zero -/* D3BA78 802414A8 8E050000 */ lw $a1, ($s0) -/* D3BA7C 802414AC 26100004 */ addiu $s0, $s0, 4 -/* D3BA80 802414B0 0240202D */ daddu $a0, $s2, $zero -/* D3BA84 802414B4 0C0B1EAF */ jal get_variable -/* D3BA88 802414B8 0040B02D */ daddu $s6, $v0, $zero -/* D3BA8C 802414BC 0240202D */ daddu $a0, $s2, $zero -/* D3BA90 802414C0 3C05F4AC */ lui $a1, 0xf4ac -/* D3BA94 802414C4 34A5D481 */ ori $a1, $a1, 0xd481 -/* D3BA98 802414C8 3C068007 */ lui $a2, %hi(gCurrentCameraID) -/* D3BA9C 802414CC 8CC67410 */ lw $a2, %lo(gCurrentCameraID)($a2) -/* D3BAA0 802414D0 8E140000 */ lw $s4, ($s0) -/* D3BAA4 802414D4 00061880 */ sll $v1, $a2, 2 -/* D3BAA8 802414D8 00661821 */ addu $v1, $v1, $a2 -/* D3BAAC 802414DC 00031880 */ sll $v1, $v1, 2 -/* D3BAB0 802414E0 00661823 */ subu $v1, $v1, $a2 -/* D3BAB4 802414E4 000330C0 */ sll $a2, $v1, 3 -/* D3BAB8 802414E8 00661821 */ addu $v1, $v1, $a2 -/* D3BABC 802414EC 000318C0 */ sll $v1, $v1, 3 -/* D3BAC0 802414F0 3C01800B */ lui $at, 0x800b -/* D3BAC4 802414F4 00230821 */ addu $at, $at, $v1 -/* D3BAC8 802414F8 C4201DEC */ lwc1 $f0, 0x1dec($at) -/* D3BACC 802414FC 8E150004 */ lw $s5, 4($s0) -/* D3BAD0 80241500 4600010D */ trunc.w.s $f4, $f0 -/* D3BAD4 80241504 44112000 */ mfc1 $s1, $f4 -/* D3BAD8 80241508 0C0B1EAF */ jal get_variable -/* D3BADC 8024150C 0040982D */ daddu $s3, $v0, $zero -/* D3BAE0 80241510 4491B000 */ mtc1 $s1, $f22 -/* D3BAE4 80241514 00000000 */ nop -/* D3BAE8 80241518 4680B5A0 */ cvt.s.w $f22, $f22 -/* D3BAEC 8024151C 4600B306 */ mov.s $f12, $f22 -/* D3BAF0 80241520 0C00A8D4 */ jal cos_deg -/* D3BAF4 80241524 0040802D */ daddu $s0, $v0, $zero -/* D3BAF8 80241528 4493A000 */ mtc1 $s3, $f20 -/* D3BAFC 8024152C 00000000 */ nop -/* D3BB00 80241530 4680A520 */ cvt.s.w $f20, $f20 -/* D3BB04 80241534 4600A002 */ mul.s $f0, $f20, $f0 -/* D3BB08 80241538 00000000 */ nop -/* D3BB0C 8024153C 0240202D */ daddu $a0, $s2, $zero -/* D3BB10 80241540 44901000 */ mtc1 $s0, $f2 -/* D3BB14 80241544 00000000 */ nop -/* D3BB18 80241548 468010A0 */ cvt.s.w $f2, $f2 -/* D3BB1C 8024154C 46001081 */ sub.s $f2, $f2, $f0 -/* D3BB20 80241550 3C05F4AC */ lui $a1, 0xf4ac -/* D3BB24 80241554 4600110D */ trunc.w.s $f4, $f2 -/* D3BB28 80241558 44102000 */ mfc1 $s0, $f4 -/* D3BB2C 8024155C 0C0B1EAF */ jal get_variable -/* D3BB30 80241560 34A5D483 */ ori $a1, $a1, 0xd483 -/* D3BB34 80241564 4600B306 */ mov.s $f12, $f22 -/* D3BB38 80241568 0C00A8BB */ jal sin_deg -/* D3BB3C 8024156C 0040882D */ daddu $s1, $v0, $zero -/* D3BB40 80241570 4600A502 */ mul.s $f20, $f20, $f0 -/* D3BB44 80241574 00000000 */ nop -/* D3BB48 80241578 0240202D */ daddu $a0, $s2, $zero -/* D3BB4C 8024157C 44910000 */ mtc1 $s1, $f0 -/* D3BB50 80241580 00000000 */ nop -/* D3BB54 80241584 46800020 */ cvt.s.w $f0, $f0 -/* D3BB58 80241588 46140001 */ sub.s $f0, $f0, $f20 -/* D3BB5C 8024158C 0280282D */ daddu $a1, $s4, $zero -/* D3BB60 80241590 02173023 */ subu $a2, $s0, $s7 -/* D3BB64 80241594 4600010D */ trunc.w.s $f4, $f0 -/* D3BB68 80241598 44102000 */ mfc1 $s0, $f4 -/* D3BB6C 8024159C 0C0B2026 */ jal set_variable -/* D3BB70 802415A0 02168023 */ subu $s0, $s0, $s6 -/* D3BB74 802415A4 0240202D */ daddu $a0, $s2, $zero -/* D3BB78 802415A8 02A0282D */ daddu $a1, $s5, $zero -/* D3BB7C 802415AC 0C0B2026 */ jal set_variable -/* D3BB80 802415B0 0200302D */ daddu $a2, $s0, $zero -/* D3BB84 802415B4 8FBF0030 */ lw $ra, 0x30($sp) -/* D3BB88 802415B8 8FB7002C */ lw $s7, 0x2c($sp) -/* D3BB8C 802415BC 8FB60028 */ lw $s6, 0x28($sp) -/* D3BB90 802415C0 8FB50024 */ lw $s5, 0x24($sp) -/* D3BB94 802415C4 8FB40020 */ lw $s4, 0x20($sp) -/* D3BB98 802415C8 8FB3001C */ lw $s3, 0x1c($sp) -/* D3BB9C 802415CC 8FB20018 */ lw $s2, 0x18($sp) -/* D3BBA0 802415D0 8FB10014 */ lw $s1, 0x14($sp) -/* D3BBA4 802415D4 8FB00010 */ lw $s0, 0x10($sp) -/* D3BBA8 802415D8 D7B60040 */ ldc1 $f22, 0x40($sp) -/* D3BBAC 802415DC D7B40038 */ ldc1 $f20, 0x38($sp) -/* D3BBB0 802415E0 24020002 */ addiu $v0, $zero, 2 -/* D3BBB4 802415E4 03E00008 */ jr $ra -/* D3BBB8 802415E8 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/src/world/area_dro/dro_01/95B7E0.c b/src/world/area_dro/dro_01/95B7E0.c index 22ec45c565..6c830f1a9b 100644 --- a/src/world/area_dro/dro_01/95B7E0.c +++ b/src/world/area_dro/dro_01/95B7E0.c @@ -64,7 +64,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80241FDC_95D1DC); INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80242050_95D250); -INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_802420F0_95D2F0); +#include "world/common/UnkCameraFunc.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_8024228C_95D48C); diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index 7faca769c7..79119f7cc0 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -40,7 +40,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80240E6C_96A02C); INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80240EE0_96A0A0); -INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80240F80_96A140); +#include "world/common/UnkCameraFunc.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_8024111C_96A2DC); diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index 7ace53be75..39e7b1af09 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -82,7 +82,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80243010_A1E110); INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80243084_A1E184); -INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80243124_A1E224); +#include "world/common/UnkCameraFunc.inc.c" INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802432C0_A1E3C0); diff --git a/src/world/area_jan/jan_02/B2C8A0.c b/src/world/area_jan/jan_02/B2C8A0.c index 3b851deac3..ffbcd5fa49 100644 --- a/src/world/area_jan/jan_02/B2C8A0.c +++ b/src/world/area_jan/jan_02/B2C8A0.c @@ -74,7 +74,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80242180_B2E5F0); INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_802421F4_B2E664); -INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80242294_B2E704); +#include "world/common/UnkCameraFunc.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80242430_B2E8A0); diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index dc4d3968e3..42110a0238 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -114,7 +114,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80242708_B372D8); INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_8024277C_B3734C); -INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_8024281C_B373EC); +#include "world/common/UnkCameraFunc.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802429B8_B37588); diff --git a/src/world/area_kmr/kmr_02/8B0070.c b/src/world/area_kmr/kmr_02/8B0070.c index 4bd0517de5..dabb7538d5 100644 --- a/src/world/area_kmr/kmr_02/8B0070.c +++ b/src/world/area_kmr/kmr_02/8B0070.c @@ -56,7 +56,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240EFC_8B0F6C); INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240F70_8B0FE0); -INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80241010_8B1080); +#include "world/common/UnkCameraFunc.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802411AC_8B121C); diff --git a/src/world/area_mac/mac_00/7EB340.c b/src/world/area_mac/mac_00/7EB340.c index ff665da249..fab9255b53 100644 --- a/src/world/area_mac/mac_00/7EB340.c +++ b/src/world/area_mac/mac_00/7EB340.c @@ -40,7 +40,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_8024119C_7EBEAC); INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241210_7EBF20); -INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_802412B0_7EBFC0); +#include "world/common/UnkCameraFunc.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_8024144C_7EC15C); diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index b6d4d62a6e..a58a831e4e 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -66,7 +66,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242A7C_8032FC); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242AF0_803370); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242B90_803410); +#include "world/common/UnkCameraFunc.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242D2C_8035AC); diff --git a/src/world/area_mac/mac_02/823BF0.c b/src/world/area_mac/mac_02/823BF0.c index bcd3e2f306..743a8f3e88 100644 --- a/src/world/area_mac/mac_02/823BF0.c +++ b/src/world/area_mac/mac_02/823BF0.c @@ -64,7 +64,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_8024232C_8255EC); INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802423A0_825660); -INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_80242440_825700); +#include "world/common/UnkCameraFunc.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802425DC_82589C); diff --git a/src/world/area_mac/mac_03/831B20.c b/src/world/area_mac/mac_03/831B20.c index 570b5a783d..d9ecc7e362 100644 --- a/src/world/area_mac/mac_03/831B20.c +++ b/src/world/area_mac/mac_03/831B20.c @@ -42,7 +42,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_8024101C_83281C); INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80241090_832890); -INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80241130_832930); +#include "world/common/UnkCameraFunc.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802412CC_832ACC); diff --git a/src/world/area_mac/mac_04/843030.c b/src/world/area_mac/mac_04/843030.c index 6b8e166615..720e4bb115 100644 --- a/src/world/area_mac/mac_04/843030.c +++ b/src/world/area_mac/mac_04/843030.c @@ -40,7 +40,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240FCC_843B9C); INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80241040_843C10); -INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_802410E0_843CB0); +#include "world/common/UnkCameraFunc.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_8024127C_843E4C); diff --git a/src/world/area_mac/mac_05/852170.c b/src/world/area_mac/mac_05/852170.c index 4d8d5c54b7..988afe6e52 100644 --- a/src/world/area_mac/mac_05/852170.c +++ b/src/world/area_mac/mac_05/852170.c @@ -72,7 +72,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241E8C_853FFC); INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241F00_854070); -INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241FA0_854110); +#include "world/common/UnkCameraFunc.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_8024213C_8542AC); diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index af5f8a1f64..7d13ba69b1 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -80,7 +80,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_802418D4_9C6CB4); INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80241948_9C6D28); -INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_802419E8_9C6DC8); +#include "world/common/UnkCameraFunc.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80241B84_9C6F64); diff --git a/src/world/area_nok/nok_02/9D7AA0.c b/src/world/area_nok/nok_02/9D7AA0.c index 664291827c..5a0850fdad 100644 --- a/src/world/area_nok/nok_02/9D7AA0.c +++ b/src/world/area_nok/nok_02/9D7AA0.c @@ -64,7 +64,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_8024247C_9D949C); INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_802424F0_9D9510); -INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242590_9D95B0); +#include "world/common/UnkCameraFunc.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_8024272C_9D974C); diff --git a/src/world/area_sam/sam_01/CF7E80.c b/src/world/area_sam/sam_01/CF7E80.c index 69254b3d83..b71f92c9ac 100644 --- a/src/world/area_sam/sam_01/CF7E80.c +++ b/src/world/area_sam/sam_01/CF7E80.c @@ -52,7 +52,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_8024126C_CF8DDC); INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_802412E0_CF8E50); -INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80241380_CF8EF0); +#include "world/common/UnkCameraFunc.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_8024151C_CF908C); diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index add231fef5..76ec88b1d9 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -60,7 +60,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80241698_D06DC8); INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_8024170C_D06E3C); -INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_802417AC_D06EDC); +#include "world/common/UnkCameraFunc.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80241948_D07078); diff --git a/src/world/area_sam/sam_11/D3ADA0.c b/src/world/area_sam/sam_11/D3ADA0.c index 19820e5db8..841f1b7b7f 100644 --- a/src/world/area_sam/sam_11/D3ADA0.c +++ b/src/world/area_sam/sam_11/D3ADA0.c @@ -40,7 +40,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_8024133C_D3B90C); INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802413B0_D3B980); -INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_80241450_D3BA20); +#include "world/common/UnkCameraFunc.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802415EC_D3BBBC); diff --git a/src/world/common/UnkCameraFunc.inc.c b/src/world/common/UnkCameraFunc.inc.c new file mode 100644 index 0000000000..e20d04f1cd --- /dev/null +++ b/src/world/common/UnkCameraFunc.inc.c @@ -0,0 +1,21 @@ +#include "common.h" + +static ApiStatus UnkCameraFunc(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 var0 = get_variable(script, *args++); + s32 var1 = get_variable(script, *args++); + s32 var2 = get_variable(script, *args++); + Bytecode out1 = *args++; + Bytecode out2 = *args++; + s32 cameraYaw = gCameras[gCurrentCameraID].currentYaw; + s32 outVal1 = get_variable(script, SI_ARRAY(1)) - (var2 * cos_deg(cameraYaw)); + s32 outVal2 = get_variable(script, SI_ARRAY(3)) - (var2 * sin_deg(cameraYaw)); + + outVal1 -= var0; + outVal2 -= var1; + + set_variable(script, out1, outVal1); + set_variable(script, out2, outVal2); + + return ApiStatus_DONE2; +} From 2a1c35a80ced96622222398a3ce05ae64f8003df Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Fri, 30 Oct 2020 17:50:58 +0000 Subject: [PATCH 58/78] lint --- .../code_e0b30_len_b80/func_8014A498.s | 43 ------------------- include/map.h | 2 +- src/code_28910_len_5090.c | 2 +- src/code_e0b30_len_b80.c | 2 +- 4 files changed, 3 insertions(+), 46 deletions(-) delete mode 100644 asm/nonmatchings/code_e0b30_len_b80/func_8014A498.s diff --git a/asm/nonmatchings/code_e0b30_len_b80/func_8014A498.s b/asm/nonmatchings/code_e0b30_len_b80/func_8014A498.s deleted file mode 100644 index 69f5b7c302..0000000000 --- a/asm/nonmatchings/code_e0b30_len_b80/func_8014A498.s +++ /dev/null @@ -1,43 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8014A498 -/* E0B98 8014A498 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* E0B9C 8014A49C AFBF0010 */ sw $ra, 0x10($sp) -/* E0BA0 8014A4A0 0000282D */ daddu $a1, $zero, $zero -/* E0BA4 8014A4A4 3C068015 */ lui $a2, 0x8015 -/* E0BA8 8014A4A8 24C6F6F0 */ addiu $a2, $a2, -0x910 -/* E0BAC 8014A4AC 24C70030 */ addiu $a3, $a2, 0x30 -/* E0BB0 8014A4B0 3C048016 */ lui $a0, 0x8016 -/* E0BB4 8014A4B4 24849AF0 */ addiu $a0, $a0, -0x6510 -.L8014A4B8: -/* E0BB8 8014A4B8 0080182D */ daddu $v1, $a0, $zero -/* E0BBC 8014A4BC 00C0102D */ daddu $v0, $a2, $zero -.L8014A4C0: -/* E0BC0 8014A4C0 8C480000 */ lw $t0, ($v0) -/* E0BC4 8014A4C4 8C490004 */ lw $t1, 4($v0) -/* E0BC8 8014A4C8 8C4A0008 */ lw $t2, 8($v0) -/* E0BCC 8014A4CC 8C4B000C */ lw $t3, 0xc($v0) -/* E0BD0 8014A4D0 AC680000 */ sw $t0, ($v1) -/* E0BD4 8014A4D4 AC690004 */ sw $t1, 4($v1) -/* E0BD8 8014A4D8 AC6A0008 */ sw $t2, 8($v1) -/* E0BDC 8014A4DC AC6B000C */ sw $t3, 0xc($v1) -/* E0BE0 8014A4E0 24420010 */ addiu $v0, $v0, 0x10 -/* E0BE4 8014A4E4 1447FFF6 */ bne $v0, $a3, .L8014A4C0 -/* E0BE8 8014A4E8 24630010 */ addiu $v1, $v1, 0x10 -/* E0BEC 8014A4EC 24A50001 */ addiu $a1, $a1, 1 -/* E0BF0 8014A4F0 28A20002 */ slti $v0, $a1, 2 -/* E0BF4 8014A4F4 1440FFF0 */ bnez $v0, .L8014A4B8 -/* E0BF8 8014A4F8 24840030 */ addiu $a0, $a0, 0x30 -/* E0BFC 8014A4FC 24020008 */ addiu $v0, $zero, 8 -/* E0C00 8014A500 3C018016 */ lui $at, %hi(gMusicTargetVolume) -/* E0C04 8014A504 A4229AE2 */ sh $v0, %lo(gMusicTargetVolume)($at) -/* E0C08 8014A508 3C018016 */ lui $at, %hi(gMusicUnkVolume2) -/* E0C0C 8014A50C A4229AE4 */ sh $v0, %lo(gMusicUnkVolume2)($at) -/* E0C10 8014A510 3C018016 */ lui $at, 0x8016 -/* E0C14 8014A514 A4229AE6 */ sh $v0, -0x651a($at) -/* E0C18 8014A518 0C015869 */ jal func_800561A4 -/* E0C1C 8014A51C 24040008 */ addiu $a0, $zero, 8 -/* E0C20 8014A520 8FBF0010 */ lw $ra, 0x10($sp) -/* E0C24 8014A524 03E00008 */ jr $ra -/* E0C28 8014A528 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/include/map.h b/include/map.h index f40c65c2b9..b06d236645 100644 --- a/include/map.h +++ b/include/map.h @@ -41,7 +41,7 @@ typedef struct Map { /* 0x0C */ void* dmaEnd; /* 0x10 */ void* dmaDest; /* 0x14 */ char* bgName; - /* 0x18 */ s32 (*init)(void); ///< Return TRUE to skip normal asset (shape/hit/bg/tex) loading. + /* 0x18 */ s32(*init)(void); ///< Return TRUE to skip normal asset (shape/hit/bg/tex) loading. /* 0x1C */ s16 flags1; /* 0x1E */ s8 flags2; /* 0x1F */ s8 flags3; diff --git a/src/code_28910_len_5090.c b/src/code_28910_len_5090.c index 62fe271554..40274bd6f0 100644 --- a/src/code_28910_len_5090.c +++ b/src/code_28910_len_5090.c @@ -33,7 +33,7 @@ s32 func_8004DA0C(UNK_TYPE arg0) { INCLUDE_ASM(s32, "code_28910_len_5090", func_8004DA74); -void func_8004DAA8(UnkStructFor8004DAA8 *arg0) { +void func_8004DAA8(UnkStructFor8004DAA8* arg0) { if (arg0->unk_221 != 0) { arg0->unk_221 = 4; arg0->unk_010 = 1; diff --git a/src/code_e0b30_len_b80.c b/src/code_e0b30_len_b80.c index c9a96443c1..3592d23ed6 100644 --- a/src/code_e0b30_len_b80.c +++ b/src/code_e0b30_len_b80.c @@ -31,7 +31,7 @@ void func_8014A498(void) { s32 i; for (i = 0; i < 2; i++) { - MusicPlayer *musicPlayers = gMusicPlayers; + MusicPlayer* musicPlayers = gMusicPlayers; musicPlayers[i] = *(src = &D_8014F6F0); } From 7fa97805b921ab0367db0a7aedee8ff1b2d3ed74 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Fri, 30 Oct 2020 19:19:17 +0000 Subject: [PATCH 59/78] clean up get_song_variation_override_for_cur_map --- src/code_e0b30_len_b80.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/code_e0b30_len_b80.c b/src/code_e0b30_len_b80.c index 3592d23ed6..4cf4fdfe38 100644 --- a/src/code_e0b30_len_b80.c +++ b/src/code_e0b30_len_b80.c @@ -12,12 +12,10 @@ s32 get_song_variation_override_for_cur_map(SongID songID) { u32 i = 0; Area* areas = gAreas; SongID* allowed = gSongsUsingVariationFlag; - GameStatus** gameStatusPtr = gGameStatusPtr; for (i = 0; i < ARRAY_COUNT(gSongsUsingVariationFlag); i++) { if (allowed[i] == songID) { - GameStatus* gameStatus = *gameStatusPtr; - Map* map = &areas[gameStatus->areaID].maps[gameStatus->mapID]; + Map* map = &areas[GAME_STATUS->areaID].maps[GAME_STATUS->mapID]; return map->flags2 & 1; } From 8ee2bf4522ae51b870845320232befa7929584af Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 30 Oct 2020 16:23:23 -0400 Subject: [PATCH 60/78] UnkMoveNpc --- .../dro_01/95B7E0/func_80242380_95D580.s | 63 ----------------- .../dro_02/9694C0/func_80241210_96A3D0.s | 63 ----------------- .../hos_03/A1BDB0/func_802433B4_A1E4B4.s | 63 ----------------- .../jan_02/B2C8A0/func_80242524_B2E994.s | 63 ----------------- .../jan_03/B34BD0/func_80242AAC_B3767C.s | 63 ----------------- .../kmr_02/8B0070/func_802412A0_8B1310.s | 63 ----------------- .../mac_00/7EB340/func_80241540_7EC250.s | 63 ----------------- .../mac_00/7EB340/func_80242078_7ECD88.s | 70 ------------------- .../mac_01/8017D0/func_80242E20_8036A0.s | 63 ----------------- .../mac_02/823BF0/func_802426D0_825990.s | 63 ----------------- .../mac_03/831B20/func_802413C0_832BC0.s | 63 ----------------- .../mac_04/843030/func_80241370_843F40.s | 63 ----------------- .../mac_05/852170/func_80242230_8543A0.s | 63 ----------------- .../nok_01/9C53E0/func_80241C78_9C7058.s | 63 ----------------- .../nok_02/9D7AA0/func_80242820_9D9840.s | 63 ----------------- .../sam_01/CF7E80/func_80241610_CF9180.s | 63 ----------------- .../sam_02/D05F60/func_80241A3C_D0716C.s | 63 ----------------- .../sam_11/D3ADA0/func_802416E0_D3BCB0.s | 63 ----------------- src/world/area_dro/dro_01/95B7E0.c | 2 +- src/world/area_dro/dro_02/9694C0.c | 2 +- src/world/area_hos/hos_03/A1BDB0.c | 2 +- src/world/area_jan/jan_02/B2C8A0.c | 2 +- src/world/area_jan/jan_03/B34BD0.c | 2 +- src/world/area_kmr/kmr_02/8B0070.c | 2 +- src/world/area_mac/mac_00/7EB340.c | 24 ++++++- src/world/area_mac/mac_01/8017D0.c | 2 +- src/world/area_mac/mac_02/823BF0.c | 2 +- src/world/area_mac/mac_03/831B20.c | 2 +- src/world/area_mac/mac_04/843030.c | 2 +- src/world/area_mac/mac_05/852170.c | 2 +- src/world/area_nok/nok_01/9C53E0.c | 2 +- src/world/area_nok/nok_02/9D7AA0.c | 2 +- src/world/area_sam/sam_01/CF7E80.c | 2 +- src/world/area_sam/sam_02/D05F60.c | 2 +- src/world/area_sam/sam_11/D3ADA0.c | 2 +- src/world/common/UnkMoveNpc.inc.c | 19 +++++ tools/m2ctx.py | 4 +- 37 files changed, 58 insertions(+), 1162 deletions(-) delete mode 100644 asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80242380_95D580.s delete mode 100644 asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80241210_96A3D0.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802433B4_A1E4B4.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242524_B2E994.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80242AAC_B3767C.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802412A0_8B1310.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80241540_7EC250.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80242078_7ECD88.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242E20_8036A0.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802426D0_825990.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_03/831B20/func_802413C0_832BC0.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_04/843030/func_80241370_843F40.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_05/852170/func_80242230_8543A0.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241C78_9C7058.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80242820_9D9840.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80241610_CF9180.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80241A3C_D0716C.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802416E0_D3BCB0.s create mode 100644 src/world/common/UnkMoveNpc.inc.c diff --git a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80242380_95D580.s b/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80242380_95D580.s deleted file mode 100644 index 89d307f487..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80242380_95D580.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242380_95D580 -/* 95D580 80242380 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 95D584 80242384 AFB10014 */ sw $s1, 0x14($sp) -/* 95D588 80242388 0080882D */ daddu $s1, $a0, $zero -/* 95D58C 8024238C AFB00010 */ sw $s0, 0x10($sp) -/* 95D590 80242390 00A0802D */ daddu $s0, $a1, $zero -/* 95D594 80242394 AFBF001C */ sw $ra, 0x1c($sp) -/* 95D598 80242398 AFB20018 */ sw $s2, 0x18($sp) -/* 95D59C 8024239C F7B40020 */ sdc1 $f20, 0x20($sp) -/* 95D5A0 802423A0 0C00EABB */ jal get_npc_unsafe -/* 95D5A4 802423A4 2404FFFC */ addiu $a0, $zero, -4 -/* 95D5A8 802423A8 12000017 */ beqz $s0, .L80242408 -/* 95D5AC 802423AC 0040902D */ daddu $s2, $v0, $zero -/* 95D5B0 802423B0 0220202D */ daddu $a0, $s1, $zero -/* 95D5B4 802423B4 3C05FE36 */ lui $a1, 0xfe36 -/* 95D5B8 802423B8 0C0B210B */ jal get_float_variable -/* 95D5BC 802423BC 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 95D5C0 802423C0 0220202D */ daddu $a0, $s1, $zero -/* 95D5C4 802423C4 3C05FE36 */ lui $a1, 0xfe36 -/* 95D5C8 802423C8 3C014270 */ lui $at, 0x4270 -/* 95D5CC 802423CC 4481A000 */ mtc1 $at, $f20 -/* 95D5D0 802423D0 34A53C85 */ ori $a1, $a1, 0x3c85 -/* 95D5D4 802423D4 46140003 */ div.s $f0, $f0, $f20 -/* 95D5D8 802423D8 0C0B210B */ jal get_float_variable -/* 95D5DC 802423DC E6200074 */ swc1 $f0, 0x74($s1) -/* 95D5E0 802423E0 0220202D */ daddu $a0, $s1, $zero -/* 95D5E4 802423E4 3C05FE36 */ lui $a1, 0xfe36 -/* 95D5E8 802423E8 34A53C81 */ ori $a1, $a1, 0x3c81 -/* 95D5EC 802423EC 46140003 */ div.s $f0, $f0, $f20 -/* 95D5F0 802423F0 0C0B210B */ jal get_float_variable -/* 95D5F4 802423F4 E6200078 */ swc1 $f0, 0x78($s1) -/* 95D5F8 802423F8 46140003 */ div.s $f0, $f0, $f20 -/* 95D5FC 802423FC 2402003C */ addiu $v0, $zero, 0x3c -/* 95D600 80242400 E620007C */ swc1 $f0, 0x7c($s1) -/* 95D604 80242404 AE220070 */ sw $v0, 0x70($s1) -.L80242408: -/* 95D608 80242408 C6400038 */ lwc1 $f0, 0x38($s2) -/* 95D60C 8024240C C6220074 */ lwc1 $f2, 0x74($s1) -/* 95D610 80242410 46020000 */ add.s $f0, $f0, $f2 -/* 95D614 80242414 E6400038 */ swc1 $f0, 0x38($s2) -/* 95D618 80242418 C640003C */ lwc1 $f0, 0x3c($s2) -/* 95D61C 8024241C C6220078 */ lwc1 $f2, 0x78($s1) -/* 95D620 80242420 46020000 */ add.s $f0, $f0, $f2 -/* 95D624 80242424 E640003C */ swc1 $f0, 0x3c($s2) -/* 95D628 80242428 C6400040 */ lwc1 $f0, 0x40($s2) -/* 95D62C 8024242C C622007C */ lwc1 $f2, 0x7c($s1) -/* 95D630 80242430 46020000 */ add.s $f0, $f0, $f2 -/* 95D634 80242434 E6400040 */ swc1 $f0, 0x40($s2) -/* 95D638 80242438 8E230070 */ lw $v1, 0x70($s1) -/* 95D63C 8024243C 2463FFFF */ addiu $v1, $v1, -1 -/* 95D640 80242440 2C620001 */ sltiu $v0, $v1, 1 -/* 95D644 80242444 AE230070 */ sw $v1, 0x70($s1) -/* 95D648 80242448 8FBF001C */ lw $ra, 0x1c($sp) -/* 95D64C 8024244C 8FB20018 */ lw $s2, 0x18($sp) -/* 95D650 80242450 8FB10014 */ lw $s1, 0x14($sp) -/* 95D654 80242454 8FB00010 */ lw $s0, 0x10($sp) -/* 95D658 80242458 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 95D65C 8024245C 00021040 */ sll $v0, $v0, 1 -/* 95D660 80242460 03E00008 */ jr $ra -/* 95D664 80242464 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80241210_96A3D0.s b/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80241210_96A3D0.s deleted file mode 100644 index 1311c901c0..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80241210_96A3D0.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241210_96A3D0 -/* 96A3D0 80241210 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 96A3D4 80241214 AFB10014 */ sw $s1, 0x14($sp) -/* 96A3D8 80241218 0080882D */ daddu $s1, $a0, $zero -/* 96A3DC 8024121C AFB00010 */ sw $s0, 0x10($sp) -/* 96A3E0 80241220 00A0802D */ daddu $s0, $a1, $zero -/* 96A3E4 80241224 AFBF001C */ sw $ra, 0x1c($sp) -/* 96A3E8 80241228 AFB20018 */ sw $s2, 0x18($sp) -/* 96A3EC 8024122C F7B40020 */ sdc1 $f20, 0x20($sp) -/* 96A3F0 80241230 0C00EABB */ jal get_npc_unsafe -/* 96A3F4 80241234 2404FFFC */ addiu $a0, $zero, -4 -/* 96A3F8 80241238 12000017 */ beqz $s0, .L80241298 -/* 96A3FC 8024123C 0040902D */ daddu $s2, $v0, $zero -/* 96A400 80241240 0220202D */ daddu $a0, $s1, $zero -/* 96A404 80241244 3C05FE36 */ lui $a1, 0xfe36 -/* 96A408 80241248 0C0B210B */ jal get_float_variable -/* 96A40C 8024124C 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 96A410 80241250 0220202D */ daddu $a0, $s1, $zero -/* 96A414 80241254 3C05FE36 */ lui $a1, 0xfe36 -/* 96A418 80241258 3C014270 */ lui $at, 0x4270 -/* 96A41C 8024125C 4481A000 */ mtc1 $at, $f20 -/* 96A420 80241260 34A53C85 */ ori $a1, $a1, 0x3c85 -/* 96A424 80241264 46140003 */ div.s $f0, $f0, $f20 -/* 96A428 80241268 0C0B210B */ jal get_float_variable -/* 96A42C 8024126C E6200074 */ swc1 $f0, 0x74($s1) -/* 96A430 80241270 0220202D */ daddu $a0, $s1, $zero -/* 96A434 80241274 3C05FE36 */ lui $a1, 0xfe36 -/* 96A438 80241278 34A53C81 */ ori $a1, $a1, 0x3c81 -/* 96A43C 8024127C 46140003 */ div.s $f0, $f0, $f20 -/* 96A440 80241280 0C0B210B */ jal get_float_variable -/* 96A444 80241284 E6200078 */ swc1 $f0, 0x78($s1) -/* 96A448 80241288 46140003 */ div.s $f0, $f0, $f20 -/* 96A44C 8024128C 2402003C */ addiu $v0, $zero, 0x3c -/* 96A450 80241290 E620007C */ swc1 $f0, 0x7c($s1) -/* 96A454 80241294 AE220070 */ sw $v0, 0x70($s1) -.L80241298: -/* 96A458 80241298 C6400038 */ lwc1 $f0, 0x38($s2) -/* 96A45C 8024129C C6220074 */ lwc1 $f2, 0x74($s1) -/* 96A460 802412A0 46020000 */ add.s $f0, $f0, $f2 -/* 96A464 802412A4 E6400038 */ swc1 $f0, 0x38($s2) -/* 96A468 802412A8 C640003C */ lwc1 $f0, 0x3c($s2) -/* 96A46C 802412AC C6220078 */ lwc1 $f2, 0x78($s1) -/* 96A470 802412B0 46020000 */ add.s $f0, $f0, $f2 -/* 96A474 802412B4 E640003C */ swc1 $f0, 0x3c($s2) -/* 96A478 802412B8 C6400040 */ lwc1 $f0, 0x40($s2) -/* 96A47C 802412BC C622007C */ lwc1 $f2, 0x7c($s1) -/* 96A480 802412C0 46020000 */ add.s $f0, $f0, $f2 -/* 96A484 802412C4 E6400040 */ swc1 $f0, 0x40($s2) -/* 96A488 802412C8 8E230070 */ lw $v1, 0x70($s1) -/* 96A48C 802412CC 2463FFFF */ addiu $v1, $v1, -1 -/* 96A490 802412D0 2C620001 */ sltiu $v0, $v1, 1 -/* 96A494 802412D4 AE230070 */ sw $v1, 0x70($s1) -/* 96A498 802412D8 8FBF001C */ lw $ra, 0x1c($sp) -/* 96A49C 802412DC 8FB20018 */ lw $s2, 0x18($sp) -/* 96A4A0 802412E0 8FB10014 */ lw $s1, 0x14($sp) -/* 96A4A4 802412E4 8FB00010 */ lw $s0, 0x10($sp) -/* 96A4A8 802412E8 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 96A4AC 802412EC 00021040 */ sll $v0, $v0, 1 -/* 96A4B0 802412F0 03E00008 */ jr $ra -/* 96A4B4 802412F4 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802433B4_A1E4B4.s b/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802433B4_A1E4B4.s deleted file mode 100644 index bad058ad7d..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802433B4_A1E4B4.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802433B4_A1E4B4 -/* A1E4B4 802433B4 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* A1E4B8 802433B8 AFB10014 */ sw $s1, 0x14($sp) -/* A1E4BC 802433BC 0080882D */ daddu $s1, $a0, $zero -/* A1E4C0 802433C0 AFB00010 */ sw $s0, 0x10($sp) -/* A1E4C4 802433C4 00A0802D */ daddu $s0, $a1, $zero -/* A1E4C8 802433C8 AFBF001C */ sw $ra, 0x1c($sp) -/* A1E4CC 802433CC AFB20018 */ sw $s2, 0x18($sp) -/* A1E4D0 802433D0 F7B40020 */ sdc1 $f20, 0x20($sp) -/* A1E4D4 802433D4 0C00EABB */ jal get_npc_unsafe -/* A1E4D8 802433D8 2404FFFC */ addiu $a0, $zero, -4 -/* A1E4DC 802433DC 12000017 */ beqz $s0, .L8024343C -/* A1E4E0 802433E0 0040902D */ daddu $s2, $v0, $zero -/* A1E4E4 802433E4 0220202D */ daddu $a0, $s1, $zero -/* A1E4E8 802433E8 3C05FE36 */ lui $a1, 0xfe36 -/* A1E4EC 802433EC 0C0B210B */ jal get_float_variable -/* A1E4F0 802433F0 34A53C80 */ ori $a1, $a1, 0x3c80 -/* A1E4F4 802433F4 0220202D */ daddu $a0, $s1, $zero -/* A1E4F8 802433F8 3C05FE36 */ lui $a1, 0xfe36 -/* A1E4FC 802433FC 3C014270 */ lui $at, 0x4270 -/* A1E500 80243400 4481A000 */ mtc1 $at, $f20 -/* A1E504 80243404 34A53C85 */ ori $a1, $a1, 0x3c85 -/* A1E508 80243408 46140003 */ div.s $f0, $f0, $f20 -/* A1E50C 8024340C 0C0B210B */ jal get_float_variable -/* A1E510 80243410 E6200074 */ swc1 $f0, 0x74($s1) -/* A1E514 80243414 0220202D */ daddu $a0, $s1, $zero -/* A1E518 80243418 3C05FE36 */ lui $a1, 0xfe36 -/* A1E51C 8024341C 34A53C81 */ ori $a1, $a1, 0x3c81 -/* A1E520 80243420 46140003 */ div.s $f0, $f0, $f20 -/* A1E524 80243424 0C0B210B */ jal get_float_variable -/* A1E528 80243428 E6200078 */ swc1 $f0, 0x78($s1) -/* A1E52C 8024342C 46140003 */ div.s $f0, $f0, $f20 -/* A1E530 80243430 2402003C */ addiu $v0, $zero, 0x3c -/* A1E534 80243434 E620007C */ swc1 $f0, 0x7c($s1) -/* A1E538 80243438 AE220070 */ sw $v0, 0x70($s1) -.L8024343C: -/* A1E53C 8024343C C6400038 */ lwc1 $f0, 0x38($s2) -/* A1E540 80243440 C6220074 */ lwc1 $f2, 0x74($s1) -/* A1E544 80243444 46020000 */ add.s $f0, $f0, $f2 -/* A1E548 80243448 E6400038 */ swc1 $f0, 0x38($s2) -/* A1E54C 8024344C C640003C */ lwc1 $f0, 0x3c($s2) -/* A1E550 80243450 C6220078 */ lwc1 $f2, 0x78($s1) -/* A1E554 80243454 46020000 */ add.s $f0, $f0, $f2 -/* A1E558 80243458 E640003C */ swc1 $f0, 0x3c($s2) -/* A1E55C 8024345C C6400040 */ lwc1 $f0, 0x40($s2) -/* A1E560 80243460 C622007C */ lwc1 $f2, 0x7c($s1) -/* A1E564 80243464 46020000 */ add.s $f0, $f0, $f2 -/* A1E568 80243468 E6400040 */ swc1 $f0, 0x40($s2) -/* A1E56C 8024346C 8E230070 */ lw $v1, 0x70($s1) -/* A1E570 80243470 2463FFFF */ addiu $v1, $v1, -1 -/* A1E574 80243474 2C620001 */ sltiu $v0, $v1, 1 -/* A1E578 80243478 AE230070 */ sw $v1, 0x70($s1) -/* A1E57C 8024347C 8FBF001C */ lw $ra, 0x1c($sp) -/* A1E580 80243480 8FB20018 */ lw $s2, 0x18($sp) -/* A1E584 80243484 8FB10014 */ lw $s1, 0x14($sp) -/* A1E588 80243488 8FB00010 */ lw $s0, 0x10($sp) -/* A1E58C 8024348C D7B40020 */ ldc1 $f20, 0x20($sp) -/* A1E590 80243490 00021040 */ sll $v0, $v0, 1 -/* A1E594 80243494 03E00008 */ jr $ra -/* A1E598 80243498 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242524_B2E994.s b/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242524_B2E994.s deleted file mode 100644 index 2da5e2cd12..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242524_B2E994.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242524_B2E994 -/* B2E994 80242524 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* B2E998 80242528 AFB10014 */ sw $s1, 0x14($sp) -/* B2E99C 8024252C 0080882D */ daddu $s1, $a0, $zero -/* B2E9A0 80242530 AFB00010 */ sw $s0, 0x10($sp) -/* B2E9A4 80242534 00A0802D */ daddu $s0, $a1, $zero -/* B2E9A8 80242538 AFBF001C */ sw $ra, 0x1c($sp) -/* B2E9AC 8024253C AFB20018 */ sw $s2, 0x18($sp) -/* B2E9B0 80242540 F7B40020 */ sdc1 $f20, 0x20($sp) -/* B2E9B4 80242544 0C00EABB */ jal get_npc_unsafe -/* B2E9B8 80242548 2404FFFC */ addiu $a0, $zero, -4 -/* B2E9BC 8024254C 12000017 */ beqz $s0, .L802425AC -/* B2E9C0 80242550 0040902D */ daddu $s2, $v0, $zero -/* B2E9C4 80242554 0220202D */ daddu $a0, $s1, $zero -/* B2E9C8 80242558 3C05FE36 */ lui $a1, 0xfe36 -/* B2E9CC 8024255C 0C0B210B */ jal get_float_variable -/* B2E9D0 80242560 34A53C80 */ ori $a1, $a1, 0x3c80 -/* B2E9D4 80242564 0220202D */ daddu $a0, $s1, $zero -/* B2E9D8 80242568 3C05FE36 */ lui $a1, 0xfe36 -/* B2E9DC 8024256C 3C014270 */ lui $at, 0x4270 -/* B2E9E0 80242570 4481A000 */ mtc1 $at, $f20 -/* B2E9E4 80242574 34A53C85 */ ori $a1, $a1, 0x3c85 -/* B2E9E8 80242578 46140003 */ div.s $f0, $f0, $f20 -/* B2E9EC 8024257C 0C0B210B */ jal get_float_variable -/* B2E9F0 80242580 E6200074 */ swc1 $f0, 0x74($s1) -/* B2E9F4 80242584 0220202D */ daddu $a0, $s1, $zero -/* B2E9F8 80242588 3C05FE36 */ lui $a1, 0xfe36 -/* B2E9FC 8024258C 34A53C81 */ ori $a1, $a1, 0x3c81 -/* B2EA00 80242590 46140003 */ div.s $f0, $f0, $f20 -/* B2EA04 80242594 0C0B210B */ jal get_float_variable -/* B2EA08 80242598 E6200078 */ swc1 $f0, 0x78($s1) -/* B2EA0C 8024259C 46140003 */ div.s $f0, $f0, $f20 -/* B2EA10 802425A0 2402003C */ addiu $v0, $zero, 0x3c -/* B2EA14 802425A4 E620007C */ swc1 $f0, 0x7c($s1) -/* B2EA18 802425A8 AE220070 */ sw $v0, 0x70($s1) -.L802425AC: -/* B2EA1C 802425AC C6400038 */ lwc1 $f0, 0x38($s2) -/* B2EA20 802425B0 C6220074 */ lwc1 $f2, 0x74($s1) -/* B2EA24 802425B4 46020000 */ add.s $f0, $f0, $f2 -/* B2EA28 802425B8 E6400038 */ swc1 $f0, 0x38($s2) -/* B2EA2C 802425BC C640003C */ lwc1 $f0, 0x3c($s2) -/* B2EA30 802425C0 C6220078 */ lwc1 $f2, 0x78($s1) -/* B2EA34 802425C4 46020000 */ add.s $f0, $f0, $f2 -/* B2EA38 802425C8 E640003C */ swc1 $f0, 0x3c($s2) -/* B2EA3C 802425CC C6400040 */ lwc1 $f0, 0x40($s2) -/* B2EA40 802425D0 C622007C */ lwc1 $f2, 0x7c($s1) -/* B2EA44 802425D4 46020000 */ add.s $f0, $f0, $f2 -/* B2EA48 802425D8 E6400040 */ swc1 $f0, 0x40($s2) -/* B2EA4C 802425DC 8E230070 */ lw $v1, 0x70($s1) -/* B2EA50 802425E0 2463FFFF */ addiu $v1, $v1, -1 -/* B2EA54 802425E4 2C620001 */ sltiu $v0, $v1, 1 -/* B2EA58 802425E8 AE230070 */ sw $v1, 0x70($s1) -/* B2EA5C 802425EC 8FBF001C */ lw $ra, 0x1c($sp) -/* B2EA60 802425F0 8FB20018 */ lw $s2, 0x18($sp) -/* B2EA64 802425F4 8FB10014 */ lw $s1, 0x14($sp) -/* B2EA68 802425F8 8FB00010 */ lw $s0, 0x10($sp) -/* B2EA6C 802425FC D7B40020 */ ldc1 $f20, 0x20($sp) -/* B2EA70 80242600 00021040 */ sll $v0, $v0, 1 -/* B2EA74 80242604 03E00008 */ jr $ra -/* B2EA78 80242608 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80242AAC_B3767C.s b/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80242AAC_B3767C.s deleted file mode 100644 index 2378ae9c8f..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80242AAC_B3767C.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242AAC_B3767C -/* B3767C 80242AAC 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* B37680 80242AB0 AFB10014 */ sw $s1, 0x14($sp) -/* B37684 80242AB4 0080882D */ daddu $s1, $a0, $zero -/* B37688 80242AB8 AFB00010 */ sw $s0, 0x10($sp) -/* B3768C 80242ABC 00A0802D */ daddu $s0, $a1, $zero -/* B37690 80242AC0 AFBF001C */ sw $ra, 0x1c($sp) -/* B37694 80242AC4 AFB20018 */ sw $s2, 0x18($sp) -/* B37698 80242AC8 F7B40020 */ sdc1 $f20, 0x20($sp) -/* B3769C 80242ACC 0C00EABB */ jal get_npc_unsafe -/* B376A0 80242AD0 2404FFFC */ addiu $a0, $zero, -4 -/* B376A4 80242AD4 12000017 */ beqz $s0, .L80242B34 -/* B376A8 80242AD8 0040902D */ daddu $s2, $v0, $zero -/* B376AC 80242ADC 0220202D */ daddu $a0, $s1, $zero -/* B376B0 80242AE0 3C05FE36 */ lui $a1, 0xfe36 -/* B376B4 80242AE4 0C0B210B */ jal get_float_variable -/* B376B8 80242AE8 34A53C80 */ ori $a1, $a1, 0x3c80 -/* B376BC 80242AEC 0220202D */ daddu $a0, $s1, $zero -/* B376C0 80242AF0 3C05FE36 */ lui $a1, 0xfe36 -/* B376C4 80242AF4 3C014270 */ lui $at, 0x4270 -/* B376C8 80242AF8 4481A000 */ mtc1 $at, $f20 -/* B376CC 80242AFC 34A53C85 */ ori $a1, $a1, 0x3c85 -/* B376D0 80242B00 46140003 */ div.s $f0, $f0, $f20 -/* B376D4 80242B04 0C0B210B */ jal get_float_variable -/* B376D8 80242B08 E6200074 */ swc1 $f0, 0x74($s1) -/* B376DC 80242B0C 0220202D */ daddu $a0, $s1, $zero -/* B376E0 80242B10 3C05FE36 */ lui $a1, 0xfe36 -/* B376E4 80242B14 34A53C81 */ ori $a1, $a1, 0x3c81 -/* B376E8 80242B18 46140003 */ div.s $f0, $f0, $f20 -/* B376EC 80242B1C 0C0B210B */ jal get_float_variable -/* B376F0 80242B20 E6200078 */ swc1 $f0, 0x78($s1) -/* B376F4 80242B24 46140003 */ div.s $f0, $f0, $f20 -/* B376F8 80242B28 2402003C */ addiu $v0, $zero, 0x3c -/* B376FC 80242B2C E620007C */ swc1 $f0, 0x7c($s1) -/* B37700 80242B30 AE220070 */ sw $v0, 0x70($s1) -.L80242B34: -/* B37704 80242B34 C6400038 */ lwc1 $f0, 0x38($s2) -/* B37708 80242B38 C6220074 */ lwc1 $f2, 0x74($s1) -/* B3770C 80242B3C 46020000 */ add.s $f0, $f0, $f2 -/* B37710 80242B40 E6400038 */ swc1 $f0, 0x38($s2) -/* B37714 80242B44 C640003C */ lwc1 $f0, 0x3c($s2) -/* B37718 80242B48 C6220078 */ lwc1 $f2, 0x78($s1) -/* B3771C 80242B4C 46020000 */ add.s $f0, $f0, $f2 -/* B37720 80242B50 E640003C */ swc1 $f0, 0x3c($s2) -/* B37724 80242B54 C6400040 */ lwc1 $f0, 0x40($s2) -/* B37728 80242B58 C622007C */ lwc1 $f2, 0x7c($s1) -/* B3772C 80242B5C 46020000 */ add.s $f0, $f0, $f2 -/* B37730 80242B60 E6400040 */ swc1 $f0, 0x40($s2) -/* B37734 80242B64 8E230070 */ lw $v1, 0x70($s1) -/* B37738 80242B68 2463FFFF */ addiu $v1, $v1, -1 -/* B3773C 80242B6C 2C620001 */ sltiu $v0, $v1, 1 -/* B37740 80242B70 AE230070 */ sw $v1, 0x70($s1) -/* B37744 80242B74 8FBF001C */ lw $ra, 0x1c($sp) -/* B37748 80242B78 8FB20018 */ lw $s2, 0x18($sp) -/* B3774C 80242B7C 8FB10014 */ lw $s1, 0x14($sp) -/* B37750 80242B80 8FB00010 */ lw $s0, 0x10($sp) -/* B37754 80242B84 D7B40020 */ ldc1 $f20, 0x20($sp) -/* B37758 80242B88 00021040 */ sll $v0, $v0, 1 -/* B3775C 80242B8C 03E00008 */ jr $ra -/* B37760 80242B90 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802412A0_8B1310.s b/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802412A0_8B1310.s deleted file mode 100644 index a5efd31cb6..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802412A0_8B1310.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802412A0_8B1310 -/* 8B1310 802412A0 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 8B1314 802412A4 AFB10014 */ sw $s1, 0x14($sp) -/* 8B1318 802412A8 0080882D */ daddu $s1, $a0, $zero -/* 8B131C 802412AC AFB00010 */ sw $s0, 0x10($sp) -/* 8B1320 802412B0 00A0802D */ daddu $s0, $a1, $zero -/* 8B1324 802412B4 AFBF001C */ sw $ra, 0x1c($sp) -/* 8B1328 802412B8 AFB20018 */ sw $s2, 0x18($sp) -/* 8B132C 802412BC F7B40020 */ sdc1 $f20, 0x20($sp) -/* 8B1330 802412C0 0C00EABB */ jal get_npc_unsafe -/* 8B1334 802412C4 2404FFFC */ addiu $a0, $zero, -4 -/* 8B1338 802412C8 12000017 */ beqz $s0, .L80241328 -/* 8B133C 802412CC 0040902D */ daddu $s2, $v0, $zero -/* 8B1340 802412D0 0220202D */ daddu $a0, $s1, $zero -/* 8B1344 802412D4 3C05FE36 */ lui $a1, 0xfe36 -/* 8B1348 802412D8 0C0B210B */ jal get_float_variable -/* 8B134C 802412DC 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 8B1350 802412E0 0220202D */ daddu $a0, $s1, $zero -/* 8B1354 802412E4 3C05FE36 */ lui $a1, 0xfe36 -/* 8B1358 802412E8 3C014270 */ lui $at, 0x4270 -/* 8B135C 802412EC 4481A000 */ mtc1 $at, $f20 -/* 8B1360 802412F0 34A53C85 */ ori $a1, $a1, 0x3c85 -/* 8B1364 802412F4 46140003 */ div.s $f0, $f0, $f20 -/* 8B1368 802412F8 0C0B210B */ jal get_float_variable -/* 8B136C 802412FC E6200074 */ swc1 $f0, 0x74($s1) -/* 8B1370 80241300 0220202D */ daddu $a0, $s1, $zero -/* 8B1374 80241304 3C05FE36 */ lui $a1, 0xfe36 -/* 8B1378 80241308 34A53C81 */ ori $a1, $a1, 0x3c81 -/* 8B137C 8024130C 46140003 */ div.s $f0, $f0, $f20 -/* 8B1380 80241310 0C0B210B */ jal get_float_variable -/* 8B1384 80241314 E6200078 */ swc1 $f0, 0x78($s1) -/* 8B1388 80241318 46140003 */ div.s $f0, $f0, $f20 -/* 8B138C 8024131C 2402003C */ addiu $v0, $zero, 0x3c -/* 8B1390 80241320 E620007C */ swc1 $f0, 0x7c($s1) -/* 8B1394 80241324 AE220070 */ sw $v0, 0x70($s1) -.L80241328: -/* 8B1398 80241328 C6400038 */ lwc1 $f0, 0x38($s2) -/* 8B139C 8024132C C6220074 */ lwc1 $f2, 0x74($s1) -/* 8B13A0 80241330 46020000 */ add.s $f0, $f0, $f2 -/* 8B13A4 80241334 E6400038 */ swc1 $f0, 0x38($s2) -/* 8B13A8 80241338 C640003C */ lwc1 $f0, 0x3c($s2) -/* 8B13AC 8024133C C6220078 */ lwc1 $f2, 0x78($s1) -/* 8B13B0 80241340 46020000 */ add.s $f0, $f0, $f2 -/* 8B13B4 80241344 E640003C */ swc1 $f0, 0x3c($s2) -/* 8B13B8 80241348 C6400040 */ lwc1 $f0, 0x40($s2) -/* 8B13BC 8024134C C622007C */ lwc1 $f2, 0x7c($s1) -/* 8B13C0 80241350 46020000 */ add.s $f0, $f0, $f2 -/* 8B13C4 80241354 E6400040 */ swc1 $f0, 0x40($s2) -/* 8B13C8 80241358 8E230070 */ lw $v1, 0x70($s1) -/* 8B13CC 8024135C 2463FFFF */ addiu $v1, $v1, -1 -/* 8B13D0 80241360 2C620001 */ sltiu $v0, $v1, 1 -/* 8B13D4 80241364 AE230070 */ sw $v1, 0x70($s1) -/* 8B13D8 80241368 8FBF001C */ lw $ra, 0x1c($sp) -/* 8B13DC 8024136C 8FB20018 */ lw $s2, 0x18($sp) -/* 8B13E0 80241370 8FB10014 */ lw $s1, 0x14($sp) -/* 8B13E4 80241374 8FB00010 */ lw $s0, 0x10($sp) -/* 8B13E8 80241378 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 8B13EC 8024137C 00021040 */ sll $v0, $v0, 1 -/* 8B13F0 80241380 03E00008 */ jr $ra -/* 8B13F4 80241384 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80241540_7EC250.s b/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80241540_7EC250.s deleted file mode 100644 index 6bf81c6c08..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80241540_7EC250.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241540_7EC250 -/* 7EC250 80241540 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 7EC254 80241544 AFB10014 */ sw $s1, 0x14($sp) -/* 7EC258 80241548 0080882D */ daddu $s1, $a0, $zero -/* 7EC25C 8024154C AFB00010 */ sw $s0, 0x10($sp) -/* 7EC260 80241550 00A0802D */ daddu $s0, $a1, $zero -/* 7EC264 80241554 AFBF001C */ sw $ra, 0x1c($sp) -/* 7EC268 80241558 AFB20018 */ sw $s2, 0x18($sp) -/* 7EC26C 8024155C F7B40020 */ sdc1 $f20, 0x20($sp) -/* 7EC270 80241560 0C00EABB */ jal get_npc_unsafe -/* 7EC274 80241564 2404FFFC */ addiu $a0, $zero, -4 -/* 7EC278 80241568 12000017 */ beqz $s0, .L802415C8 -/* 7EC27C 8024156C 0040902D */ daddu $s2, $v0, $zero -/* 7EC280 80241570 0220202D */ daddu $a0, $s1, $zero -/* 7EC284 80241574 3C05FE36 */ lui $a1, 0xfe36 -/* 7EC288 80241578 0C0B210B */ jal get_float_variable -/* 7EC28C 8024157C 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 7EC290 80241580 0220202D */ daddu $a0, $s1, $zero -/* 7EC294 80241584 3C05FE36 */ lui $a1, 0xfe36 -/* 7EC298 80241588 3C014270 */ lui $at, 0x4270 -/* 7EC29C 8024158C 4481A000 */ mtc1 $at, $f20 -/* 7EC2A0 80241590 34A53C85 */ ori $a1, $a1, 0x3c85 -/* 7EC2A4 80241594 46140003 */ div.s $f0, $f0, $f20 -/* 7EC2A8 80241598 0C0B210B */ jal get_float_variable -/* 7EC2AC 8024159C E6200074 */ swc1 $f0, 0x74($s1) -/* 7EC2B0 802415A0 0220202D */ daddu $a0, $s1, $zero -/* 7EC2B4 802415A4 3C05FE36 */ lui $a1, 0xfe36 -/* 7EC2B8 802415A8 34A53C81 */ ori $a1, $a1, 0x3c81 -/* 7EC2BC 802415AC 46140003 */ div.s $f0, $f0, $f20 -/* 7EC2C0 802415B0 0C0B210B */ jal get_float_variable -/* 7EC2C4 802415B4 E6200078 */ swc1 $f0, 0x78($s1) -/* 7EC2C8 802415B8 46140003 */ div.s $f0, $f0, $f20 -/* 7EC2CC 802415BC 2402003C */ addiu $v0, $zero, 0x3c -/* 7EC2D0 802415C0 E620007C */ swc1 $f0, 0x7c($s1) -/* 7EC2D4 802415C4 AE220070 */ sw $v0, 0x70($s1) -.L802415C8: -/* 7EC2D8 802415C8 C6400038 */ lwc1 $f0, 0x38($s2) -/* 7EC2DC 802415CC C6220074 */ lwc1 $f2, 0x74($s1) -/* 7EC2E0 802415D0 46020000 */ add.s $f0, $f0, $f2 -/* 7EC2E4 802415D4 E6400038 */ swc1 $f0, 0x38($s2) -/* 7EC2E8 802415D8 C640003C */ lwc1 $f0, 0x3c($s2) -/* 7EC2EC 802415DC C6220078 */ lwc1 $f2, 0x78($s1) -/* 7EC2F0 802415E0 46020000 */ add.s $f0, $f0, $f2 -/* 7EC2F4 802415E4 E640003C */ swc1 $f0, 0x3c($s2) -/* 7EC2F8 802415E8 C6400040 */ lwc1 $f0, 0x40($s2) -/* 7EC2FC 802415EC C622007C */ lwc1 $f2, 0x7c($s1) -/* 7EC300 802415F0 46020000 */ add.s $f0, $f0, $f2 -/* 7EC304 802415F4 E6400040 */ swc1 $f0, 0x40($s2) -/* 7EC308 802415F8 8E230070 */ lw $v1, 0x70($s1) -/* 7EC30C 802415FC 2463FFFF */ addiu $v1, $v1, -1 -/* 7EC310 80241600 2C620001 */ sltiu $v0, $v1, 1 -/* 7EC314 80241604 AE230070 */ sw $v1, 0x70($s1) -/* 7EC318 80241608 8FBF001C */ lw $ra, 0x1c($sp) -/* 7EC31C 8024160C 8FB20018 */ lw $s2, 0x18($sp) -/* 7EC320 80241610 8FB10014 */ lw $s1, 0x14($sp) -/* 7EC324 80241614 8FB00010 */ lw $s0, 0x10($sp) -/* 7EC328 80241618 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 7EC32C 8024161C 00021040 */ sll $v0, $v0, 1 -/* 7EC330 80241620 03E00008 */ jr $ra -/* 7EC334 80241624 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80242078_7ECD88.s b/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80242078_7ECD88.s deleted file mode 100644 index 5592ea8fd1..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80242078_7ECD88.s +++ /dev/null @@ -1,70 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242078_7ECD88 -/* 7ECD88 80242078 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 7ECD8C 8024207C AFB10014 */ sw $s1, 0x14($sp) -/* 7ECD90 80242080 0080882D */ daddu $s1, $a0, $zero -/* 7ECD94 80242084 AFBF0018 */ sw $ra, 0x18($sp) -/* 7ECD98 80242088 AFB00010 */ sw $s0, 0x10($sp) -/* 7ECD9C 8024208C F7B80030 */ sdc1 $f24, 0x30($sp) -/* 7ECDA0 80242090 F7B60028 */ sdc1 $f22, 0x28($sp) -/* 7ECDA4 80242094 F7B40020 */ sdc1 $f20, 0x20($sp) -/* 7ECDA8 80242098 8E30000C */ lw $s0, 0xc($s1) -/* 7ECDAC 8024209C 8E050000 */ lw $a1, ($s0) -/* 7ECDB0 802420A0 0C0B1EAF */ jal get_variable -/* 7ECDB4 802420A4 26100004 */ addiu $s0, $s0, 4 -/* 7ECDB8 802420A8 8E050000 */ lw $a1, ($s0) -/* 7ECDBC 802420AC 26100004 */ addiu $s0, $s0, 4 -/* 7ECDC0 802420B0 4482C000 */ mtc1 $v0, $f24 -/* 7ECDC4 802420B4 00000000 */ nop -/* 7ECDC8 802420B8 4680C620 */ cvt.s.w $f24, $f24 -/* 7ECDCC 802420BC 0C0B1EAF */ jal get_variable -/* 7ECDD0 802420C0 0220202D */ daddu $a0, $s1, $zero -/* 7ECDD4 802420C4 8E050000 */ lw $a1, ($s0) -/* 7ECDD8 802420C8 26100004 */ addiu $s0, $s0, 4 -/* 7ECDDC 802420CC 4482B000 */ mtc1 $v0, $f22 -/* 7ECDE0 802420D0 00000000 */ nop -/* 7ECDE4 802420D4 4680B5A0 */ cvt.s.w $f22, $f22 -/* 7ECDE8 802420D8 0C0B1EAF */ jal get_variable -/* 7ECDEC 802420DC 0220202D */ daddu $a0, $s1, $zero -/* 7ECDF0 802420E0 8E050000 */ lw $a1, ($s0) -/* 7ECDF4 802420E4 4482A000 */ mtc1 $v0, $f20 -/* 7ECDF8 802420E8 00000000 */ nop -/* 7ECDFC 802420EC 4680A520 */ cvt.s.w $f20, $f20 -/* 7ECE00 802420F0 0C0B1EAF */ jal get_variable -/* 7ECE04 802420F4 0220202D */ daddu $a0, $s1, $zero -/* 7ECE08 802420F8 44820000 */ mtc1 $v0, $f0 -/* 7ECE0C 802420FC 00000000 */ nop -/* 7ECE10 80242100 46800020 */ cvt.s.w $f0, $f0 -/* 7ECE14 80242104 46160001 */ sub.s $f0, $f0, $f22 -/* 7ECE18 80242108 4618A501 */ sub.s $f20, $f20, $f24 -/* 7ECE1C 8024210C 46140003 */ div.s $f0, $f0, $f20 -/* 7ECE20 80242110 46180602 */ mul.s $f24, $f0, $f24 -/* 7ECE24 80242114 00000000 */ nop -/* 7ECE28 80242118 3C028011 */ lui $v0, %hi(gPlayerStatus) -/* 7ECE2C 8024211C 2442EFC8 */ addiu $v0, $v0, %lo(gPlayerStatus) -/* 7ECE30 80242120 C4420028 */ lwc1 $f2, 0x28($v0) -/* 7ECE34 80242124 46020002 */ mul.s $f0, $f0, $f2 -/* 7ECE38 80242128 00000000 */ nop -/* 7ECE3C 8024212C 4618B581 */ sub.s $f22, $f22, $f24 -/* 7ECE40 80242130 46160000 */ add.s $f0, $f0, $f22 -/* 7ECE44 80242134 C4420030 */ lwc1 $f2, 0x30($v0) -/* 7ECE48 80242138 4600103C */ c.lt.s $f2, $f0 -/* 7ECE4C 8024213C 00000000 */ nop -/* 7ECE50 80242140 45000003 */ bc1f .L80242150 -/* 7ECE54 80242144 24020001 */ addiu $v0, $zero, 1 -/* 7ECE58 80242148 08090855 */ j .L80242154 -/* 7ECE5C 8024214C AE200084 */ sw $zero, 0x84($s1) -.L80242150: -/* 7ECE60 80242150 AE220084 */ sw $v0, 0x84($s1) -.L80242154: -/* 7ECE64 80242154 8FBF0018 */ lw $ra, 0x18($sp) -/* 7ECE68 80242158 8FB10014 */ lw $s1, 0x14($sp) -/* 7ECE6C 8024215C 8FB00010 */ lw $s0, 0x10($sp) -/* 7ECE70 80242160 D7B80030 */ ldc1 $f24, 0x30($sp) -/* 7ECE74 80242164 D7B60028 */ ldc1 $f22, 0x28($sp) -/* 7ECE78 80242168 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 7ECE7C 8024216C 24020002 */ addiu $v0, $zero, 2 -/* 7ECE80 80242170 03E00008 */ jr $ra -/* 7ECE84 80242174 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242E20_8036A0.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242E20_8036A0.s deleted file mode 100644 index 7dedd216dc..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242E20_8036A0.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242E20_8036A0 -/* 8036A0 80242E20 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 8036A4 80242E24 AFB10014 */ sw $s1, 0x14($sp) -/* 8036A8 80242E28 0080882D */ daddu $s1, $a0, $zero -/* 8036AC 80242E2C AFB00010 */ sw $s0, 0x10($sp) -/* 8036B0 80242E30 00A0802D */ daddu $s0, $a1, $zero -/* 8036B4 80242E34 AFBF001C */ sw $ra, 0x1c($sp) -/* 8036B8 80242E38 AFB20018 */ sw $s2, 0x18($sp) -/* 8036BC 80242E3C F7B40020 */ sdc1 $f20, 0x20($sp) -/* 8036C0 80242E40 0C00EABB */ jal get_npc_unsafe -/* 8036C4 80242E44 2404FFFC */ addiu $a0, $zero, -4 -/* 8036C8 80242E48 12000017 */ beqz $s0, .L80242EA8 -/* 8036CC 80242E4C 0040902D */ daddu $s2, $v0, $zero -/* 8036D0 80242E50 0220202D */ daddu $a0, $s1, $zero -/* 8036D4 80242E54 3C05FE36 */ lui $a1, 0xfe36 -/* 8036D8 80242E58 0C0B210B */ jal get_float_variable -/* 8036DC 80242E5C 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 8036E0 80242E60 0220202D */ daddu $a0, $s1, $zero -/* 8036E4 80242E64 3C05FE36 */ lui $a1, 0xfe36 -/* 8036E8 80242E68 3C014270 */ lui $at, 0x4270 -/* 8036EC 80242E6C 4481A000 */ mtc1 $at, $f20 -/* 8036F0 80242E70 34A53C85 */ ori $a1, $a1, 0x3c85 -/* 8036F4 80242E74 46140003 */ div.s $f0, $f0, $f20 -/* 8036F8 80242E78 0C0B210B */ jal get_float_variable -/* 8036FC 80242E7C E6200074 */ swc1 $f0, 0x74($s1) -/* 803700 80242E80 0220202D */ daddu $a0, $s1, $zero -/* 803704 80242E84 3C05FE36 */ lui $a1, 0xfe36 -/* 803708 80242E88 34A53C81 */ ori $a1, $a1, 0x3c81 -/* 80370C 80242E8C 46140003 */ div.s $f0, $f0, $f20 -/* 803710 80242E90 0C0B210B */ jal get_float_variable -/* 803714 80242E94 E6200078 */ swc1 $f0, 0x78($s1) -/* 803718 80242E98 46140003 */ div.s $f0, $f0, $f20 -/* 80371C 80242E9C 2402003C */ addiu $v0, $zero, 0x3c -/* 803720 80242EA0 E620007C */ swc1 $f0, 0x7c($s1) -/* 803724 80242EA4 AE220070 */ sw $v0, 0x70($s1) -.L80242EA8: -/* 803728 80242EA8 C6400038 */ lwc1 $f0, 0x38($s2) -/* 80372C 80242EAC C6220074 */ lwc1 $f2, 0x74($s1) -/* 803730 80242EB0 46020000 */ add.s $f0, $f0, $f2 -/* 803734 80242EB4 E6400038 */ swc1 $f0, 0x38($s2) -/* 803738 80242EB8 C640003C */ lwc1 $f0, 0x3c($s2) -/* 80373C 80242EBC C6220078 */ lwc1 $f2, 0x78($s1) -/* 803740 80242EC0 46020000 */ add.s $f0, $f0, $f2 -/* 803744 80242EC4 E640003C */ swc1 $f0, 0x3c($s2) -/* 803748 80242EC8 C6400040 */ lwc1 $f0, 0x40($s2) -/* 80374C 80242ECC C622007C */ lwc1 $f2, 0x7c($s1) -/* 803750 80242ED0 46020000 */ add.s $f0, $f0, $f2 -/* 803754 80242ED4 E6400040 */ swc1 $f0, 0x40($s2) -/* 803758 80242ED8 8E230070 */ lw $v1, 0x70($s1) -/* 80375C 80242EDC 2463FFFF */ addiu $v1, $v1, -1 -/* 803760 80242EE0 2C620001 */ sltiu $v0, $v1, 1 -/* 803764 80242EE4 AE230070 */ sw $v1, 0x70($s1) -/* 803768 80242EE8 8FBF001C */ lw $ra, 0x1c($sp) -/* 80376C 80242EEC 8FB20018 */ lw $s2, 0x18($sp) -/* 803770 80242EF0 8FB10014 */ lw $s1, 0x14($sp) -/* 803774 80242EF4 8FB00010 */ lw $s0, 0x10($sp) -/* 803778 80242EF8 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 80377C 80242EFC 00021040 */ sll $v0, $v0, 1 -/* 803780 80242F00 03E00008 */ jr $ra -/* 803784 80242F04 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802426D0_825990.s b/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802426D0_825990.s deleted file mode 100644 index f7c22a373e..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802426D0_825990.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802426D0_825990 -/* 825990 802426D0 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 825994 802426D4 AFB10014 */ sw $s1, 0x14($sp) -/* 825998 802426D8 0080882D */ daddu $s1, $a0, $zero -/* 82599C 802426DC AFB00010 */ sw $s0, 0x10($sp) -/* 8259A0 802426E0 00A0802D */ daddu $s0, $a1, $zero -/* 8259A4 802426E4 AFBF001C */ sw $ra, 0x1c($sp) -/* 8259A8 802426E8 AFB20018 */ sw $s2, 0x18($sp) -/* 8259AC 802426EC F7B40020 */ sdc1 $f20, 0x20($sp) -/* 8259B0 802426F0 0C00EABB */ jal get_npc_unsafe -/* 8259B4 802426F4 2404FFFC */ addiu $a0, $zero, -4 -/* 8259B8 802426F8 12000017 */ beqz $s0, .L80242758 -/* 8259BC 802426FC 0040902D */ daddu $s2, $v0, $zero -/* 8259C0 80242700 0220202D */ daddu $a0, $s1, $zero -/* 8259C4 80242704 3C05FE36 */ lui $a1, 0xfe36 -/* 8259C8 80242708 0C0B210B */ jal get_float_variable -/* 8259CC 8024270C 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 8259D0 80242710 0220202D */ daddu $a0, $s1, $zero -/* 8259D4 80242714 3C05FE36 */ lui $a1, 0xfe36 -/* 8259D8 80242718 3C014270 */ lui $at, 0x4270 -/* 8259DC 8024271C 4481A000 */ mtc1 $at, $f20 -/* 8259E0 80242720 34A53C85 */ ori $a1, $a1, 0x3c85 -/* 8259E4 80242724 46140003 */ div.s $f0, $f0, $f20 -/* 8259E8 80242728 0C0B210B */ jal get_float_variable -/* 8259EC 8024272C E6200074 */ swc1 $f0, 0x74($s1) -/* 8259F0 80242730 0220202D */ daddu $a0, $s1, $zero -/* 8259F4 80242734 3C05FE36 */ lui $a1, 0xfe36 -/* 8259F8 80242738 34A53C81 */ ori $a1, $a1, 0x3c81 -/* 8259FC 8024273C 46140003 */ div.s $f0, $f0, $f20 -/* 825A00 80242740 0C0B210B */ jal get_float_variable -/* 825A04 80242744 E6200078 */ swc1 $f0, 0x78($s1) -/* 825A08 80242748 46140003 */ div.s $f0, $f0, $f20 -/* 825A0C 8024274C 2402003C */ addiu $v0, $zero, 0x3c -/* 825A10 80242750 E620007C */ swc1 $f0, 0x7c($s1) -/* 825A14 80242754 AE220070 */ sw $v0, 0x70($s1) -.L80242758: -/* 825A18 80242758 C6400038 */ lwc1 $f0, 0x38($s2) -/* 825A1C 8024275C C6220074 */ lwc1 $f2, 0x74($s1) -/* 825A20 80242760 46020000 */ add.s $f0, $f0, $f2 -/* 825A24 80242764 E6400038 */ swc1 $f0, 0x38($s2) -/* 825A28 80242768 C640003C */ lwc1 $f0, 0x3c($s2) -/* 825A2C 8024276C C6220078 */ lwc1 $f2, 0x78($s1) -/* 825A30 80242770 46020000 */ add.s $f0, $f0, $f2 -/* 825A34 80242774 E640003C */ swc1 $f0, 0x3c($s2) -/* 825A38 80242778 C6400040 */ lwc1 $f0, 0x40($s2) -/* 825A3C 8024277C C622007C */ lwc1 $f2, 0x7c($s1) -/* 825A40 80242780 46020000 */ add.s $f0, $f0, $f2 -/* 825A44 80242784 E6400040 */ swc1 $f0, 0x40($s2) -/* 825A48 80242788 8E230070 */ lw $v1, 0x70($s1) -/* 825A4C 8024278C 2463FFFF */ addiu $v1, $v1, -1 -/* 825A50 80242790 2C620001 */ sltiu $v0, $v1, 1 -/* 825A54 80242794 AE230070 */ sw $v1, 0x70($s1) -/* 825A58 80242798 8FBF001C */ lw $ra, 0x1c($sp) -/* 825A5C 8024279C 8FB20018 */ lw $s2, 0x18($sp) -/* 825A60 802427A0 8FB10014 */ lw $s1, 0x14($sp) -/* 825A64 802427A4 8FB00010 */ lw $s0, 0x10($sp) -/* 825A68 802427A8 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 825A6C 802427AC 00021040 */ sll $v0, $v0, 1 -/* 825A70 802427B0 03E00008 */ jr $ra -/* 825A74 802427B4 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_802413C0_832BC0.s b/asm/nonmatchings/world/area_mac/mac_03/831B20/func_802413C0_832BC0.s deleted file mode 100644 index 63ba3c5753..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_802413C0_832BC0.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802413C0_832BC0 -/* 832BC0 802413C0 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 832BC4 802413C4 AFB10014 */ sw $s1, 0x14($sp) -/* 832BC8 802413C8 0080882D */ daddu $s1, $a0, $zero -/* 832BCC 802413CC AFB00010 */ sw $s0, 0x10($sp) -/* 832BD0 802413D0 00A0802D */ daddu $s0, $a1, $zero -/* 832BD4 802413D4 AFBF001C */ sw $ra, 0x1c($sp) -/* 832BD8 802413D8 AFB20018 */ sw $s2, 0x18($sp) -/* 832BDC 802413DC F7B40020 */ sdc1 $f20, 0x20($sp) -/* 832BE0 802413E0 0C00EABB */ jal get_npc_unsafe -/* 832BE4 802413E4 2404FFFC */ addiu $a0, $zero, -4 -/* 832BE8 802413E8 12000017 */ beqz $s0, .L80241448 -/* 832BEC 802413EC 0040902D */ daddu $s2, $v0, $zero -/* 832BF0 802413F0 0220202D */ daddu $a0, $s1, $zero -/* 832BF4 802413F4 3C05FE36 */ lui $a1, 0xfe36 -/* 832BF8 802413F8 0C0B210B */ jal get_float_variable -/* 832BFC 802413FC 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 832C00 80241400 0220202D */ daddu $a0, $s1, $zero -/* 832C04 80241404 3C05FE36 */ lui $a1, 0xfe36 -/* 832C08 80241408 3C014270 */ lui $at, 0x4270 -/* 832C0C 8024140C 4481A000 */ mtc1 $at, $f20 -/* 832C10 80241410 34A53C85 */ ori $a1, $a1, 0x3c85 -/* 832C14 80241414 46140003 */ div.s $f0, $f0, $f20 -/* 832C18 80241418 0C0B210B */ jal get_float_variable -/* 832C1C 8024141C E6200074 */ swc1 $f0, 0x74($s1) -/* 832C20 80241420 0220202D */ daddu $a0, $s1, $zero -/* 832C24 80241424 3C05FE36 */ lui $a1, 0xfe36 -/* 832C28 80241428 34A53C81 */ ori $a1, $a1, 0x3c81 -/* 832C2C 8024142C 46140003 */ div.s $f0, $f0, $f20 -/* 832C30 80241430 0C0B210B */ jal get_float_variable -/* 832C34 80241434 E6200078 */ swc1 $f0, 0x78($s1) -/* 832C38 80241438 46140003 */ div.s $f0, $f0, $f20 -/* 832C3C 8024143C 2402003C */ addiu $v0, $zero, 0x3c -/* 832C40 80241440 E620007C */ swc1 $f0, 0x7c($s1) -/* 832C44 80241444 AE220070 */ sw $v0, 0x70($s1) -.L80241448: -/* 832C48 80241448 C6400038 */ lwc1 $f0, 0x38($s2) -/* 832C4C 8024144C C6220074 */ lwc1 $f2, 0x74($s1) -/* 832C50 80241450 46020000 */ add.s $f0, $f0, $f2 -/* 832C54 80241454 E6400038 */ swc1 $f0, 0x38($s2) -/* 832C58 80241458 C640003C */ lwc1 $f0, 0x3c($s2) -/* 832C5C 8024145C C6220078 */ lwc1 $f2, 0x78($s1) -/* 832C60 80241460 46020000 */ add.s $f0, $f0, $f2 -/* 832C64 80241464 E640003C */ swc1 $f0, 0x3c($s2) -/* 832C68 80241468 C6400040 */ lwc1 $f0, 0x40($s2) -/* 832C6C 8024146C C622007C */ lwc1 $f2, 0x7c($s1) -/* 832C70 80241470 46020000 */ add.s $f0, $f0, $f2 -/* 832C74 80241474 E6400040 */ swc1 $f0, 0x40($s2) -/* 832C78 80241478 8E230070 */ lw $v1, 0x70($s1) -/* 832C7C 8024147C 2463FFFF */ addiu $v1, $v1, -1 -/* 832C80 80241480 2C620001 */ sltiu $v0, $v1, 1 -/* 832C84 80241484 AE230070 */ sw $v1, 0x70($s1) -/* 832C88 80241488 8FBF001C */ lw $ra, 0x1c($sp) -/* 832C8C 8024148C 8FB20018 */ lw $s2, 0x18($sp) -/* 832C90 80241490 8FB10014 */ lw $s1, 0x14($sp) -/* 832C94 80241494 8FB00010 */ lw $s0, 0x10($sp) -/* 832C98 80241498 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 832C9C 8024149C 00021040 */ sll $v0, $v0, 1 -/* 832CA0 802414A0 03E00008 */ jr $ra -/* 832CA4 802414A4 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/world/area_mac/mac_04/843030/func_80241370_843F40.s b/asm/nonmatchings/world/area_mac/mac_04/843030/func_80241370_843F40.s deleted file mode 100644 index 43bf452bf7..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_04/843030/func_80241370_843F40.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241370_843F40 -/* 843F40 80241370 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 843F44 80241374 AFB10014 */ sw $s1, 0x14($sp) -/* 843F48 80241378 0080882D */ daddu $s1, $a0, $zero -/* 843F4C 8024137C AFB00010 */ sw $s0, 0x10($sp) -/* 843F50 80241380 00A0802D */ daddu $s0, $a1, $zero -/* 843F54 80241384 AFBF001C */ sw $ra, 0x1c($sp) -/* 843F58 80241388 AFB20018 */ sw $s2, 0x18($sp) -/* 843F5C 8024138C F7B40020 */ sdc1 $f20, 0x20($sp) -/* 843F60 80241390 0C00EABB */ jal get_npc_unsafe -/* 843F64 80241394 2404FFFC */ addiu $a0, $zero, -4 -/* 843F68 80241398 12000017 */ beqz $s0, .L802413F8 -/* 843F6C 8024139C 0040902D */ daddu $s2, $v0, $zero -/* 843F70 802413A0 0220202D */ daddu $a0, $s1, $zero -/* 843F74 802413A4 3C05FE36 */ lui $a1, 0xfe36 -/* 843F78 802413A8 0C0B210B */ jal get_float_variable -/* 843F7C 802413AC 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 843F80 802413B0 0220202D */ daddu $a0, $s1, $zero -/* 843F84 802413B4 3C05FE36 */ lui $a1, 0xfe36 -/* 843F88 802413B8 3C014270 */ lui $at, 0x4270 -/* 843F8C 802413BC 4481A000 */ mtc1 $at, $f20 -/* 843F90 802413C0 34A53C85 */ ori $a1, $a1, 0x3c85 -/* 843F94 802413C4 46140003 */ div.s $f0, $f0, $f20 -/* 843F98 802413C8 0C0B210B */ jal get_float_variable -/* 843F9C 802413CC E6200074 */ swc1 $f0, 0x74($s1) -/* 843FA0 802413D0 0220202D */ daddu $a0, $s1, $zero -/* 843FA4 802413D4 3C05FE36 */ lui $a1, 0xfe36 -/* 843FA8 802413D8 34A53C81 */ ori $a1, $a1, 0x3c81 -/* 843FAC 802413DC 46140003 */ div.s $f0, $f0, $f20 -/* 843FB0 802413E0 0C0B210B */ jal get_float_variable -/* 843FB4 802413E4 E6200078 */ swc1 $f0, 0x78($s1) -/* 843FB8 802413E8 46140003 */ div.s $f0, $f0, $f20 -/* 843FBC 802413EC 2402003C */ addiu $v0, $zero, 0x3c -/* 843FC0 802413F0 E620007C */ swc1 $f0, 0x7c($s1) -/* 843FC4 802413F4 AE220070 */ sw $v0, 0x70($s1) -.L802413F8: -/* 843FC8 802413F8 C6400038 */ lwc1 $f0, 0x38($s2) -/* 843FCC 802413FC C6220074 */ lwc1 $f2, 0x74($s1) -/* 843FD0 80241400 46020000 */ add.s $f0, $f0, $f2 -/* 843FD4 80241404 E6400038 */ swc1 $f0, 0x38($s2) -/* 843FD8 80241408 C640003C */ lwc1 $f0, 0x3c($s2) -/* 843FDC 8024140C C6220078 */ lwc1 $f2, 0x78($s1) -/* 843FE0 80241410 46020000 */ add.s $f0, $f0, $f2 -/* 843FE4 80241414 E640003C */ swc1 $f0, 0x3c($s2) -/* 843FE8 80241418 C6400040 */ lwc1 $f0, 0x40($s2) -/* 843FEC 8024141C C622007C */ lwc1 $f2, 0x7c($s1) -/* 843FF0 80241420 46020000 */ add.s $f0, $f0, $f2 -/* 843FF4 80241424 E6400040 */ swc1 $f0, 0x40($s2) -/* 843FF8 80241428 8E230070 */ lw $v1, 0x70($s1) -/* 843FFC 8024142C 2463FFFF */ addiu $v1, $v1, -1 -/* 844000 80241430 2C620001 */ sltiu $v0, $v1, 1 -/* 844004 80241434 AE230070 */ sw $v1, 0x70($s1) -/* 844008 80241438 8FBF001C */ lw $ra, 0x1c($sp) -/* 84400C 8024143C 8FB20018 */ lw $s2, 0x18($sp) -/* 844010 80241440 8FB10014 */ lw $s1, 0x14($sp) -/* 844014 80241444 8FB00010 */ lw $s0, 0x10($sp) -/* 844018 80241448 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 84401C 8024144C 00021040 */ sll $v0, $v0, 1 -/* 844020 80241450 03E00008 */ jr $ra -/* 844024 80241454 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/world/area_mac/mac_05/852170/func_80242230_8543A0.s b/asm/nonmatchings/world/area_mac/mac_05/852170/func_80242230_8543A0.s deleted file mode 100644 index 0cb1bb647a..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_05/852170/func_80242230_8543A0.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242230_8543A0 -/* 8543A0 80242230 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 8543A4 80242234 AFB10014 */ sw $s1, 0x14($sp) -/* 8543A8 80242238 0080882D */ daddu $s1, $a0, $zero -/* 8543AC 8024223C AFB00010 */ sw $s0, 0x10($sp) -/* 8543B0 80242240 00A0802D */ daddu $s0, $a1, $zero -/* 8543B4 80242244 AFBF001C */ sw $ra, 0x1c($sp) -/* 8543B8 80242248 AFB20018 */ sw $s2, 0x18($sp) -/* 8543BC 8024224C F7B40020 */ sdc1 $f20, 0x20($sp) -/* 8543C0 80242250 0C00EABB */ jal get_npc_unsafe -/* 8543C4 80242254 2404FFFC */ addiu $a0, $zero, -4 -/* 8543C8 80242258 12000017 */ beqz $s0, .L802422B8 -/* 8543CC 8024225C 0040902D */ daddu $s2, $v0, $zero -/* 8543D0 80242260 0220202D */ daddu $a0, $s1, $zero -/* 8543D4 80242264 3C05FE36 */ lui $a1, 0xfe36 -/* 8543D8 80242268 0C0B210B */ jal get_float_variable -/* 8543DC 8024226C 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 8543E0 80242270 0220202D */ daddu $a0, $s1, $zero -/* 8543E4 80242274 3C05FE36 */ lui $a1, 0xfe36 -/* 8543E8 80242278 3C014270 */ lui $at, 0x4270 -/* 8543EC 8024227C 4481A000 */ mtc1 $at, $f20 -/* 8543F0 80242280 34A53C85 */ ori $a1, $a1, 0x3c85 -/* 8543F4 80242284 46140003 */ div.s $f0, $f0, $f20 -/* 8543F8 80242288 0C0B210B */ jal get_float_variable -/* 8543FC 8024228C E6200074 */ swc1 $f0, 0x74($s1) -/* 854400 80242290 0220202D */ daddu $a0, $s1, $zero -/* 854404 80242294 3C05FE36 */ lui $a1, 0xfe36 -/* 854408 80242298 34A53C81 */ ori $a1, $a1, 0x3c81 -/* 85440C 8024229C 46140003 */ div.s $f0, $f0, $f20 -/* 854410 802422A0 0C0B210B */ jal get_float_variable -/* 854414 802422A4 E6200078 */ swc1 $f0, 0x78($s1) -/* 854418 802422A8 46140003 */ div.s $f0, $f0, $f20 -/* 85441C 802422AC 2402003C */ addiu $v0, $zero, 0x3c -/* 854420 802422B0 E620007C */ swc1 $f0, 0x7c($s1) -/* 854424 802422B4 AE220070 */ sw $v0, 0x70($s1) -.L802422B8: -/* 854428 802422B8 C6400038 */ lwc1 $f0, 0x38($s2) -/* 85442C 802422BC C6220074 */ lwc1 $f2, 0x74($s1) -/* 854430 802422C0 46020000 */ add.s $f0, $f0, $f2 -/* 854434 802422C4 E6400038 */ swc1 $f0, 0x38($s2) -/* 854438 802422C8 C640003C */ lwc1 $f0, 0x3c($s2) -/* 85443C 802422CC C6220078 */ lwc1 $f2, 0x78($s1) -/* 854440 802422D0 46020000 */ add.s $f0, $f0, $f2 -/* 854444 802422D4 E640003C */ swc1 $f0, 0x3c($s2) -/* 854448 802422D8 C6400040 */ lwc1 $f0, 0x40($s2) -/* 85444C 802422DC C622007C */ lwc1 $f2, 0x7c($s1) -/* 854450 802422E0 46020000 */ add.s $f0, $f0, $f2 -/* 854454 802422E4 E6400040 */ swc1 $f0, 0x40($s2) -/* 854458 802422E8 8E230070 */ lw $v1, 0x70($s1) -/* 85445C 802422EC 2463FFFF */ addiu $v1, $v1, -1 -/* 854460 802422F0 2C620001 */ sltiu $v0, $v1, 1 -/* 854464 802422F4 AE230070 */ sw $v1, 0x70($s1) -/* 854468 802422F8 8FBF001C */ lw $ra, 0x1c($sp) -/* 85446C 802422FC 8FB20018 */ lw $s2, 0x18($sp) -/* 854470 80242300 8FB10014 */ lw $s1, 0x14($sp) -/* 854474 80242304 8FB00010 */ lw $s0, 0x10($sp) -/* 854478 80242308 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 85447C 8024230C 00021040 */ sll $v0, $v0, 1 -/* 854480 80242310 03E00008 */ jr $ra -/* 854484 80242314 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241C78_9C7058.s b/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241C78_9C7058.s deleted file mode 100644 index 1d6636bac3..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241C78_9C7058.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241C78_9C7058 -/* 9C7058 80241C78 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 9C705C 80241C7C AFB10014 */ sw $s1, 0x14($sp) -/* 9C7060 80241C80 0080882D */ daddu $s1, $a0, $zero -/* 9C7064 80241C84 AFB00010 */ sw $s0, 0x10($sp) -/* 9C7068 80241C88 00A0802D */ daddu $s0, $a1, $zero -/* 9C706C 80241C8C AFBF001C */ sw $ra, 0x1c($sp) -/* 9C7070 80241C90 AFB20018 */ sw $s2, 0x18($sp) -/* 9C7074 80241C94 F7B40020 */ sdc1 $f20, 0x20($sp) -/* 9C7078 80241C98 0C00EABB */ jal get_npc_unsafe -/* 9C707C 80241C9C 2404FFFC */ addiu $a0, $zero, -4 -/* 9C7080 80241CA0 12000017 */ beqz $s0, .L80241D00 -/* 9C7084 80241CA4 0040902D */ daddu $s2, $v0, $zero -/* 9C7088 80241CA8 0220202D */ daddu $a0, $s1, $zero -/* 9C708C 80241CAC 3C05FE36 */ lui $a1, 0xfe36 -/* 9C7090 80241CB0 0C0B210B */ jal get_float_variable -/* 9C7094 80241CB4 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 9C7098 80241CB8 0220202D */ daddu $a0, $s1, $zero -/* 9C709C 80241CBC 3C05FE36 */ lui $a1, 0xfe36 -/* 9C70A0 80241CC0 3C014270 */ lui $at, 0x4270 -/* 9C70A4 80241CC4 4481A000 */ mtc1 $at, $f20 -/* 9C70A8 80241CC8 34A53C85 */ ori $a1, $a1, 0x3c85 -/* 9C70AC 80241CCC 46140003 */ div.s $f0, $f0, $f20 -/* 9C70B0 80241CD0 0C0B210B */ jal get_float_variable -/* 9C70B4 80241CD4 E6200074 */ swc1 $f0, 0x74($s1) -/* 9C70B8 80241CD8 0220202D */ daddu $a0, $s1, $zero -/* 9C70BC 80241CDC 3C05FE36 */ lui $a1, 0xfe36 -/* 9C70C0 80241CE0 34A53C81 */ ori $a1, $a1, 0x3c81 -/* 9C70C4 80241CE4 46140003 */ div.s $f0, $f0, $f20 -/* 9C70C8 80241CE8 0C0B210B */ jal get_float_variable -/* 9C70CC 80241CEC E6200078 */ swc1 $f0, 0x78($s1) -/* 9C70D0 80241CF0 46140003 */ div.s $f0, $f0, $f20 -/* 9C70D4 80241CF4 2402003C */ addiu $v0, $zero, 0x3c -/* 9C70D8 80241CF8 E620007C */ swc1 $f0, 0x7c($s1) -/* 9C70DC 80241CFC AE220070 */ sw $v0, 0x70($s1) -.L80241D00: -/* 9C70E0 80241D00 C6400038 */ lwc1 $f0, 0x38($s2) -/* 9C70E4 80241D04 C6220074 */ lwc1 $f2, 0x74($s1) -/* 9C70E8 80241D08 46020000 */ add.s $f0, $f0, $f2 -/* 9C70EC 80241D0C E6400038 */ swc1 $f0, 0x38($s2) -/* 9C70F0 80241D10 C640003C */ lwc1 $f0, 0x3c($s2) -/* 9C70F4 80241D14 C6220078 */ lwc1 $f2, 0x78($s1) -/* 9C70F8 80241D18 46020000 */ add.s $f0, $f0, $f2 -/* 9C70FC 80241D1C E640003C */ swc1 $f0, 0x3c($s2) -/* 9C7100 80241D20 C6400040 */ lwc1 $f0, 0x40($s2) -/* 9C7104 80241D24 C622007C */ lwc1 $f2, 0x7c($s1) -/* 9C7108 80241D28 46020000 */ add.s $f0, $f0, $f2 -/* 9C710C 80241D2C E6400040 */ swc1 $f0, 0x40($s2) -/* 9C7110 80241D30 8E230070 */ lw $v1, 0x70($s1) -/* 9C7114 80241D34 2463FFFF */ addiu $v1, $v1, -1 -/* 9C7118 80241D38 2C620001 */ sltiu $v0, $v1, 1 -/* 9C711C 80241D3C AE230070 */ sw $v1, 0x70($s1) -/* 9C7120 80241D40 8FBF001C */ lw $ra, 0x1c($sp) -/* 9C7124 80241D44 8FB20018 */ lw $s2, 0x18($sp) -/* 9C7128 80241D48 8FB10014 */ lw $s1, 0x14($sp) -/* 9C712C 80241D4C 8FB00010 */ lw $s0, 0x10($sp) -/* 9C7130 80241D50 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 9C7134 80241D54 00021040 */ sll $v0, $v0, 1 -/* 9C7138 80241D58 03E00008 */ jr $ra -/* 9C713C 80241D5C 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80242820_9D9840.s b/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80242820_9D9840.s deleted file mode 100644 index f1ec2096ef..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80242820_9D9840.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242820_9D9840 -/* 9D9840 80242820 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 9D9844 80242824 AFB10014 */ sw $s1, 0x14($sp) -/* 9D9848 80242828 0080882D */ daddu $s1, $a0, $zero -/* 9D984C 8024282C AFB00010 */ sw $s0, 0x10($sp) -/* 9D9850 80242830 00A0802D */ daddu $s0, $a1, $zero -/* 9D9854 80242834 AFBF001C */ sw $ra, 0x1c($sp) -/* 9D9858 80242838 AFB20018 */ sw $s2, 0x18($sp) -/* 9D985C 8024283C F7B40020 */ sdc1 $f20, 0x20($sp) -/* 9D9860 80242840 0C00EABB */ jal get_npc_unsafe -/* 9D9864 80242844 2404FFFC */ addiu $a0, $zero, -4 -/* 9D9868 80242848 12000017 */ beqz $s0, .L802428A8 -/* 9D986C 8024284C 0040902D */ daddu $s2, $v0, $zero -/* 9D9870 80242850 0220202D */ daddu $a0, $s1, $zero -/* 9D9874 80242854 3C05FE36 */ lui $a1, 0xfe36 -/* 9D9878 80242858 0C0B210B */ jal get_float_variable -/* 9D987C 8024285C 34A53C80 */ ori $a1, $a1, 0x3c80 -/* 9D9880 80242860 0220202D */ daddu $a0, $s1, $zero -/* 9D9884 80242864 3C05FE36 */ lui $a1, 0xfe36 -/* 9D9888 80242868 3C014270 */ lui $at, 0x4270 -/* 9D988C 8024286C 4481A000 */ mtc1 $at, $f20 -/* 9D9890 80242870 34A53C85 */ ori $a1, $a1, 0x3c85 -/* 9D9894 80242874 46140003 */ div.s $f0, $f0, $f20 -/* 9D9898 80242878 0C0B210B */ jal get_float_variable -/* 9D989C 8024287C E6200074 */ swc1 $f0, 0x74($s1) -/* 9D98A0 80242880 0220202D */ daddu $a0, $s1, $zero -/* 9D98A4 80242884 3C05FE36 */ lui $a1, 0xfe36 -/* 9D98A8 80242888 34A53C81 */ ori $a1, $a1, 0x3c81 -/* 9D98AC 8024288C 46140003 */ div.s $f0, $f0, $f20 -/* 9D98B0 80242890 0C0B210B */ jal get_float_variable -/* 9D98B4 80242894 E6200078 */ swc1 $f0, 0x78($s1) -/* 9D98B8 80242898 46140003 */ div.s $f0, $f0, $f20 -/* 9D98BC 8024289C 2402003C */ addiu $v0, $zero, 0x3c -/* 9D98C0 802428A0 E620007C */ swc1 $f0, 0x7c($s1) -/* 9D98C4 802428A4 AE220070 */ sw $v0, 0x70($s1) -.L802428A8: -/* 9D98C8 802428A8 C6400038 */ lwc1 $f0, 0x38($s2) -/* 9D98CC 802428AC C6220074 */ lwc1 $f2, 0x74($s1) -/* 9D98D0 802428B0 46020000 */ add.s $f0, $f0, $f2 -/* 9D98D4 802428B4 E6400038 */ swc1 $f0, 0x38($s2) -/* 9D98D8 802428B8 C640003C */ lwc1 $f0, 0x3c($s2) -/* 9D98DC 802428BC C6220078 */ lwc1 $f2, 0x78($s1) -/* 9D98E0 802428C0 46020000 */ add.s $f0, $f0, $f2 -/* 9D98E4 802428C4 E640003C */ swc1 $f0, 0x3c($s2) -/* 9D98E8 802428C8 C6400040 */ lwc1 $f0, 0x40($s2) -/* 9D98EC 802428CC C622007C */ lwc1 $f2, 0x7c($s1) -/* 9D98F0 802428D0 46020000 */ add.s $f0, $f0, $f2 -/* 9D98F4 802428D4 E6400040 */ swc1 $f0, 0x40($s2) -/* 9D98F8 802428D8 8E230070 */ lw $v1, 0x70($s1) -/* 9D98FC 802428DC 2463FFFF */ addiu $v1, $v1, -1 -/* 9D9900 802428E0 2C620001 */ sltiu $v0, $v1, 1 -/* 9D9904 802428E4 AE230070 */ sw $v1, 0x70($s1) -/* 9D9908 802428E8 8FBF001C */ lw $ra, 0x1c($sp) -/* 9D990C 802428EC 8FB20018 */ lw $s2, 0x18($sp) -/* 9D9910 802428F0 8FB10014 */ lw $s1, 0x14($sp) -/* 9D9914 802428F4 8FB00010 */ lw $s0, 0x10($sp) -/* 9D9918 802428F8 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 9D991C 802428FC 00021040 */ sll $v0, $v0, 1 -/* 9D9920 80242900 03E00008 */ jr $ra -/* 9D9924 80242904 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80241610_CF9180.s b/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80241610_CF9180.s deleted file mode 100644 index ada9d7a6c1..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80241610_CF9180.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241610_CF9180 -/* CF9180 80241610 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* CF9184 80241614 AFB10014 */ sw $s1, 0x14($sp) -/* CF9188 80241618 0080882D */ daddu $s1, $a0, $zero -/* CF918C 8024161C AFB00010 */ sw $s0, 0x10($sp) -/* CF9190 80241620 00A0802D */ daddu $s0, $a1, $zero -/* CF9194 80241624 AFBF001C */ sw $ra, 0x1c($sp) -/* CF9198 80241628 AFB20018 */ sw $s2, 0x18($sp) -/* CF919C 8024162C F7B40020 */ sdc1 $f20, 0x20($sp) -/* CF91A0 80241630 0C00EABB */ jal get_npc_unsafe -/* CF91A4 80241634 2404FFFC */ addiu $a0, $zero, -4 -/* CF91A8 80241638 12000017 */ beqz $s0, .L80241698 -/* CF91AC 8024163C 0040902D */ daddu $s2, $v0, $zero -/* CF91B0 80241640 0220202D */ daddu $a0, $s1, $zero -/* CF91B4 80241644 3C05FE36 */ lui $a1, 0xfe36 -/* CF91B8 80241648 0C0B210B */ jal get_float_variable -/* CF91BC 8024164C 34A53C80 */ ori $a1, $a1, 0x3c80 -/* CF91C0 80241650 0220202D */ daddu $a0, $s1, $zero -/* CF91C4 80241654 3C05FE36 */ lui $a1, 0xfe36 -/* CF91C8 80241658 3C014270 */ lui $at, 0x4270 -/* CF91CC 8024165C 4481A000 */ mtc1 $at, $f20 -/* CF91D0 80241660 34A53C85 */ ori $a1, $a1, 0x3c85 -/* CF91D4 80241664 46140003 */ div.s $f0, $f0, $f20 -/* CF91D8 80241668 0C0B210B */ jal get_float_variable -/* CF91DC 8024166C E6200074 */ swc1 $f0, 0x74($s1) -/* CF91E0 80241670 0220202D */ daddu $a0, $s1, $zero -/* CF91E4 80241674 3C05FE36 */ lui $a1, 0xfe36 -/* CF91E8 80241678 34A53C81 */ ori $a1, $a1, 0x3c81 -/* CF91EC 8024167C 46140003 */ div.s $f0, $f0, $f20 -/* CF91F0 80241680 0C0B210B */ jal get_float_variable -/* CF91F4 80241684 E6200078 */ swc1 $f0, 0x78($s1) -/* CF91F8 80241688 46140003 */ div.s $f0, $f0, $f20 -/* CF91FC 8024168C 2402003C */ addiu $v0, $zero, 0x3c -/* CF9200 80241690 E620007C */ swc1 $f0, 0x7c($s1) -/* CF9204 80241694 AE220070 */ sw $v0, 0x70($s1) -.L80241698: -/* CF9208 80241698 C6400038 */ lwc1 $f0, 0x38($s2) -/* CF920C 8024169C C6220074 */ lwc1 $f2, 0x74($s1) -/* CF9210 802416A0 46020000 */ add.s $f0, $f0, $f2 -/* CF9214 802416A4 E6400038 */ swc1 $f0, 0x38($s2) -/* CF9218 802416A8 C640003C */ lwc1 $f0, 0x3c($s2) -/* CF921C 802416AC C6220078 */ lwc1 $f2, 0x78($s1) -/* CF9220 802416B0 46020000 */ add.s $f0, $f0, $f2 -/* CF9224 802416B4 E640003C */ swc1 $f0, 0x3c($s2) -/* CF9228 802416B8 C6400040 */ lwc1 $f0, 0x40($s2) -/* CF922C 802416BC C622007C */ lwc1 $f2, 0x7c($s1) -/* CF9230 802416C0 46020000 */ add.s $f0, $f0, $f2 -/* CF9234 802416C4 E6400040 */ swc1 $f0, 0x40($s2) -/* CF9238 802416C8 8E230070 */ lw $v1, 0x70($s1) -/* CF923C 802416CC 2463FFFF */ addiu $v1, $v1, -1 -/* CF9240 802416D0 2C620001 */ sltiu $v0, $v1, 1 -/* CF9244 802416D4 AE230070 */ sw $v1, 0x70($s1) -/* CF9248 802416D8 8FBF001C */ lw $ra, 0x1c($sp) -/* CF924C 802416DC 8FB20018 */ lw $s2, 0x18($sp) -/* CF9250 802416E0 8FB10014 */ lw $s1, 0x14($sp) -/* CF9254 802416E4 8FB00010 */ lw $s0, 0x10($sp) -/* CF9258 802416E8 D7B40020 */ ldc1 $f20, 0x20($sp) -/* CF925C 802416EC 00021040 */ sll $v0, $v0, 1 -/* CF9260 802416F0 03E00008 */ jr $ra -/* CF9264 802416F4 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80241A3C_D0716C.s b/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80241A3C_D0716C.s deleted file mode 100644 index 60094ee900..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80241A3C_D0716C.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241A3C_D0716C -/* D0716C 80241A3C 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* D07170 80241A40 AFB10014 */ sw $s1, 0x14($sp) -/* D07174 80241A44 0080882D */ daddu $s1, $a0, $zero -/* D07178 80241A48 AFB00010 */ sw $s0, 0x10($sp) -/* D0717C 80241A4C 00A0802D */ daddu $s0, $a1, $zero -/* D07180 80241A50 AFBF001C */ sw $ra, 0x1c($sp) -/* D07184 80241A54 AFB20018 */ sw $s2, 0x18($sp) -/* D07188 80241A58 F7B40020 */ sdc1 $f20, 0x20($sp) -/* D0718C 80241A5C 0C00EABB */ jal get_npc_unsafe -/* D07190 80241A60 2404FFFC */ addiu $a0, $zero, -4 -/* D07194 80241A64 12000017 */ beqz $s0, .L80241AC4 -/* D07198 80241A68 0040902D */ daddu $s2, $v0, $zero -/* D0719C 80241A6C 0220202D */ daddu $a0, $s1, $zero -/* D071A0 80241A70 3C05FE36 */ lui $a1, 0xfe36 -/* D071A4 80241A74 0C0B210B */ jal get_float_variable -/* D071A8 80241A78 34A53C80 */ ori $a1, $a1, 0x3c80 -/* D071AC 80241A7C 0220202D */ daddu $a0, $s1, $zero -/* D071B0 80241A80 3C05FE36 */ lui $a1, 0xfe36 -/* D071B4 80241A84 3C014270 */ lui $at, 0x4270 -/* D071B8 80241A88 4481A000 */ mtc1 $at, $f20 -/* D071BC 80241A8C 34A53C85 */ ori $a1, $a1, 0x3c85 -/* D071C0 80241A90 46140003 */ div.s $f0, $f0, $f20 -/* D071C4 80241A94 0C0B210B */ jal get_float_variable -/* D071C8 80241A98 E6200074 */ swc1 $f0, 0x74($s1) -/* D071CC 80241A9C 0220202D */ daddu $a0, $s1, $zero -/* D071D0 80241AA0 3C05FE36 */ lui $a1, 0xfe36 -/* D071D4 80241AA4 34A53C81 */ ori $a1, $a1, 0x3c81 -/* D071D8 80241AA8 46140003 */ div.s $f0, $f0, $f20 -/* D071DC 80241AAC 0C0B210B */ jal get_float_variable -/* D071E0 80241AB0 E6200078 */ swc1 $f0, 0x78($s1) -/* D071E4 80241AB4 46140003 */ div.s $f0, $f0, $f20 -/* D071E8 80241AB8 2402003C */ addiu $v0, $zero, 0x3c -/* D071EC 80241ABC E620007C */ swc1 $f0, 0x7c($s1) -/* D071F0 80241AC0 AE220070 */ sw $v0, 0x70($s1) -.L80241AC4: -/* D071F4 80241AC4 C6400038 */ lwc1 $f0, 0x38($s2) -/* D071F8 80241AC8 C6220074 */ lwc1 $f2, 0x74($s1) -/* D071FC 80241ACC 46020000 */ add.s $f0, $f0, $f2 -/* D07200 80241AD0 E6400038 */ swc1 $f0, 0x38($s2) -/* D07204 80241AD4 C640003C */ lwc1 $f0, 0x3c($s2) -/* D07208 80241AD8 C6220078 */ lwc1 $f2, 0x78($s1) -/* D0720C 80241ADC 46020000 */ add.s $f0, $f0, $f2 -/* D07210 80241AE0 E640003C */ swc1 $f0, 0x3c($s2) -/* D07214 80241AE4 C6400040 */ lwc1 $f0, 0x40($s2) -/* D07218 80241AE8 C622007C */ lwc1 $f2, 0x7c($s1) -/* D0721C 80241AEC 46020000 */ add.s $f0, $f0, $f2 -/* D07220 80241AF0 E6400040 */ swc1 $f0, 0x40($s2) -/* D07224 80241AF4 8E230070 */ lw $v1, 0x70($s1) -/* D07228 80241AF8 2463FFFF */ addiu $v1, $v1, -1 -/* D0722C 80241AFC 2C620001 */ sltiu $v0, $v1, 1 -/* D07230 80241B00 AE230070 */ sw $v1, 0x70($s1) -/* D07234 80241B04 8FBF001C */ lw $ra, 0x1c($sp) -/* D07238 80241B08 8FB20018 */ lw $s2, 0x18($sp) -/* D0723C 80241B0C 8FB10014 */ lw $s1, 0x14($sp) -/* D07240 80241B10 8FB00010 */ lw $s0, 0x10($sp) -/* D07244 80241B14 D7B40020 */ ldc1 $f20, 0x20($sp) -/* D07248 80241B18 00021040 */ sll $v0, $v0, 1 -/* D0724C 80241B1C 03E00008 */ jr $ra -/* D07250 80241B20 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802416E0_D3BCB0.s b/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802416E0_D3BCB0.s deleted file mode 100644 index 9fc9db0881..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802416E0_D3BCB0.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802416E0_D3BCB0 -/* D3BCB0 802416E0 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* D3BCB4 802416E4 AFB10014 */ sw $s1, 0x14($sp) -/* D3BCB8 802416E8 0080882D */ daddu $s1, $a0, $zero -/* D3BCBC 802416EC AFB00010 */ sw $s0, 0x10($sp) -/* D3BCC0 802416F0 00A0802D */ daddu $s0, $a1, $zero -/* D3BCC4 802416F4 AFBF001C */ sw $ra, 0x1c($sp) -/* D3BCC8 802416F8 AFB20018 */ sw $s2, 0x18($sp) -/* D3BCCC 802416FC F7B40020 */ sdc1 $f20, 0x20($sp) -/* D3BCD0 80241700 0C00EABB */ jal get_npc_unsafe -/* D3BCD4 80241704 2404FFFC */ addiu $a0, $zero, -4 -/* D3BCD8 80241708 12000017 */ beqz $s0, .L80241768 -/* D3BCDC 8024170C 0040902D */ daddu $s2, $v0, $zero -/* D3BCE0 80241710 0220202D */ daddu $a0, $s1, $zero -/* D3BCE4 80241714 3C05FE36 */ lui $a1, 0xfe36 -/* D3BCE8 80241718 0C0B210B */ jal get_float_variable -/* D3BCEC 8024171C 34A53C80 */ ori $a1, $a1, 0x3c80 -/* D3BCF0 80241720 0220202D */ daddu $a0, $s1, $zero -/* D3BCF4 80241724 3C05FE36 */ lui $a1, 0xfe36 -/* D3BCF8 80241728 3C014270 */ lui $at, 0x4270 -/* D3BCFC 8024172C 4481A000 */ mtc1 $at, $f20 -/* D3BD00 80241730 34A53C85 */ ori $a1, $a1, 0x3c85 -/* D3BD04 80241734 46140003 */ div.s $f0, $f0, $f20 -/* D3BD08 80241738 0C0B210B */ jal get_float_variable -/* D3BD0C 8024173C E6200074 */ swc1 $f0, 0x74($s1) -/* D3BD10 80241740 0220202D */ daddu $a0, $s1, $zero -/* D3BD14 80241744 3C05FE36 */ lui $a1, 0xfe36 -/* D3BD18 80241748 34A53C81 */ ori $a1, $a1, 0x3c81 -/* D3BD1C 8024174C 46140003 */ div.s $f0, $f0, $f20 -/* D3BD20 80241750 0C0B210B */ jal get_float_variable -/* D3BD24 80241754 E6200078 */ swc1 $f0, 0x78($s1) -/* D3BD28 80241758 46140003 */ div.s $f0, $f0, $f20 -/* D3BD2C 8024175C 2402003C */ addiu $v0, $zero, 0x3c -/* D3BD30 80241760 E620007C */ swc1 $f0, 0x7c($s1) -/* D3BD34 80241764 AE220070 */ sw $v0, 0x70($s1) -.L80241768: -/* D3BD38 80241768 C6400038 */ lwc1 $f0, 0x38($s2) -/* D3BD3C 8024176C C6220074 */ lwc1 $f2, 0x74($s1) -/* D3BD40 80241770 46020000 */ add.s $f0, $f0, $f2 -/* D3BD44 80241774 E6400038 */ swc1 $f0, 0x38($s2) -/* D3BD48 80241778 C640003C */ lwc1 $f0, 0x3c($s2) -/* D3BD4C 8024177C C6220078 */ lwc1 $f2, 0x78($s1) -/* D3BD50 80241780 46020000 */ add.s $f0, $f0, $f2 -/* D3BD54 80241784 E640003C */ swc1 $f0, 0x3c($s2) -/* D3BD58 80241788 C6400040 */ lwc1 $f0, 0x40($s2) -/* D3BD5C 8024178C C622007C */ lwc1 $f2, 0x7c($s1) -/* D3BD60 80241790 46020000 */ add.s $f0, $f0, $f2 -/* D3BD64 80241794 E6400040 */ swc1 $f0, 0x40($s2) -/* D3BD68 80241798 8E230070 */ lw $v1, 0x70($s1) -/* D3BD6C 8024179C 2463FFFF */ addiu $v1, $v1, -1 -/* D3BD70 802417A0 2C620001 */ sltiu $v0, $v1, 1 -/* D3BD74 802417A4 AE230070 */ sw $v1, 0x70($s1) -/* D3BD78 802417A8 8FBF001C */ lw $ra, 0x1c($sp) -/* D3BD7C 802417AC 8FB20018 */ lw $s2, 0x18($sp) -/* D3BD80 802417B0 8FB10014 */ lw $s1, 0x14($sp) -/* D3BD84 802417B4 8FB00010 */ lw $s0, 0x10($sp) -/* D3BD88 802417B8 D7B40020 */ ldc1 $f20, 0x20($sp) -/* D3BD8C 802417BC 00021040 */ sll $v0, $v0, 1 -/* D3BD90 802417C0 03E00008 */ jr $ra -/* D3BD94 802417C4 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/src/world/area_dro/dro_01/95B7E0.c b/src/world/area_dro/dro_01/95B7E0.c index 6c830f1a9b..c6c01e1fc7 100644 --- a/src/world/area_dro/dro_01/95B7E0.c +++ b/src/world/area_dro/dro_01/95B7E0.c @@ -70,7 +70,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_8024228C_95D48C); INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_802422F0_95D4F0); -INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80242380_95D580); +#include "world/common/UnkMoveNpc.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80242468_95D668); diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index 79119f7cc0..5dc8d5f6cd 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -46,7 +46,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_8024111C_96A2DC); INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80241180_96A340); -INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80241210_96A3D0); +#include "world/common/UnkMoveNpc.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_802412F8_96A4B8); diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index 39e7b1af09..09ebdc0fa9 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -88,7 +88,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802432C0_A1E3C0); INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80243324_A1E424); -INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802433B4_A1E4B4); +#include "world/common/UnkMoveNpc.inc.c" INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_8024349C_A1E59C); diff --git a/src/world/area_jan/jan_02/B2C8A0.c b/src/world/area_jan/jan_02/B2C8A0.c index ffbcd5fa49..3f6a1212bc 100644 --- a/src/world/area_jan/jan_02/B2C8A0.c +++ b/src/world/area_jan/jan_02/B2C8A0.c @@ -80,7 +80,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80242430_B2E8A0); INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80242494_B2E904); -INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80242524_B2E994); +#include "world/common/UnkMoveNpc.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_8024260C_B2EA7C); diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index 42110a0238..fb4a6ad2a2 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -120,7 +120,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802429B8_B37588); INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80242A1C_B375EC); -INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80242AAC_B3767C); +#include "world/common/UnkMoveNpc.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80242B94_B37764); diff --git a/src/world/area_kmr/kmr_02/8B0070.c b/src/world/area_kmr/kmr_02/8B0070.c index dabb7538d5..126fc7b1eb 100644 --- a/src/world/area_kmr/kmr_02/8B0070.c +++ b/src/world/area_kmr/kmr_02/8B0070.c @@ -62,7 +62,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802411AC_8B121C); INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80241210_8B1280); -INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802412A0_8B1310); +#include "world/common/UnkMoveNpc.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80241388_8B13F8); diff --git a/src/world/area_mac/mac_00/7EB340.c b/src/world/area_mac/mac_00/7EB340.c index fab9255b53..947070a15b 100644 --- a/src/world/area_mac/mac_00/7EB340.c +++ b/src/world/area_mac/mac_00/7EB340.c @@ -46,7 +46,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_8024144C_7EC15C); INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_802414B0_7EC1C0); -INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241540_7EC250); +#include "world/common/UnkMoveNpc.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241628_7EC338); @@ -66,7 +66,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241A18_7EC728); #include "world/common/SetManyVars.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241BA4_7EC8B4); +INCLUDE_ASM(ApiStatus, "world/area_mac/mac_00/7EB340", func_80241BA4_7EC8B4, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241D30_7ECA40); @@ -80,7 +80,25 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241E80_7ECB90); INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241FF0_7ECD00); -INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80242078_7ECD88); +ApiStatus func_80242078_7ECD88(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + PlayerStatus* playerStatus = PLAYER_STATUS; + f32 var0 = get_variable(script, *args++); + f32 var1 = get_variable(script, *args++); + f32 var2 = get_variable(script, *args++); + f32 var3 = get_variable(script, *args++); + f32 temp; + + temp = (var3 - var1) / (var2 - var0); + + if (playerStatus->position.z < ((temp * playerStatus->position.x) + (var1 - (temp * var0)))) { + script->varTable[0] = 0; + } else { + script->varTable[0] = 1; + } + + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80242178_7ECE88); diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index a58a831e4e..1c6e82fb0c 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -72,7 +72,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242D2C_8035AC); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242D90_803610); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242E20_8036A0); +#include "world/common/UnkMoveNpc.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242F08_803788); diff --git a/src/world/area_mac/mac_02/823BF0.c b/src/world/area_mac/mac_02/823BF0.c index 743a8f3e88..2f9dab34c7 100644 --- a/src/world/area_mac/mac_02/823BF0.c +++ b/src/world/area_mac/mac_02/823BF0.c @@ -70,7 +70,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802425DC_82589C); INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_80242640_825900); -INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802426D0_825990); +#include "world/common/UnkMoveNpc.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802427B8_825A78); diff --git a/src/world/area_mac/mac_03/831B20.c b/src/world/area_mac/mac_03/831B20.c index d9ecc7e362..cd479148d1 100644 --- a/src/world/area_mac/mac_03/831B20.c +++ b/src/world/area_mac/mac_03/831B20.c @@ -48,7 +48,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802412CC_832ACC); INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80241330_832B30); -INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802413C0_832BC0); +#include "world/common/UnkMoveNpc.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802414A8_832CA8); diff --git a/src/world/area_mac/mac_04/843030.c b/src/world/area_mac/mac_04/843030.c index 720e4bb115..db3265f824 100644 --- a/src/world/area_mac/mac_04/843030.c +++ b/src/world/area_mac/mac_04/843030.c @@ -46,7 +46,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_8024127C_843E4C); INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_802412E0_843EB0); -INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80241370_843F40); +#include "world/common/UnkMoveNpc.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80241458_844028); diff --git a/src/world/area_mac/mac_05/852170.c b/src/world/area_mac/mac_05/852170.c index 988afe6e52..e9195bf47e 100644 --- a/src/world/area_mac/mac_05/852170.c +++ b/src/world/area_mac/mac_05/852170.c @@ -78,7 +78,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_8024213C_8542AC); INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_802421A0_854310); -INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80242230_8543A0); +#include "world/common/UnkMoveNpc.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80242318_854488); diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index 7d13ba69b1..cc74b3b3b1 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -86,7 +86,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80241B84_9C6F64); INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80241BE8_9C6FC8); -INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80241C78_9C7058); +#include "world/common/UnkMoveNpc.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80241D60_9C7140); diff --git a/src/world/area_nok/nok_02/9D7AA0.c b/src/world/area_nok/nok_02/9D7AA0.c index 5a0850fdad..ad4f99f871 100644 --- a/src/world/area_nok/nok_02/9D7AA0.c +++ b/src/world/area_nok/nok_02/9D7AA0.c @@ -70,7 +70,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_8024272C_9D974C); INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242790_9D97B0); -INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242820_9D9840); +#include "world/common/UnkMoveNpc.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242908_9D9928); diff --git a/src/world/area_sam/sam_01/CF7E80.c b/src/world/area_sam/sam_01/CF7E80.c index b71f92c9ac..07aef28454 100644 --- a/src/world/area_sam/sam_01/CF7E80.c +++ b/src/world/area_sam/sam_01/CF7E80.c @@ -58,7 +58,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_8024151C_CF908C); INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80241580_CF90F0); -INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80241610_CF9180); +#include "world/common/UnkMoveNpc.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_802416F8_CF9268); diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index 76ec88b1d9..1cad9e8f54 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -66,7 +66,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80241948_D07078); INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_802419AC_D070DC); -INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80241A3C_D0716C); +#include "world/common/UnkMoveNpc.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80241B24_D07254); diff --git a/src/world/area_sam/sam_11/D3ADA0.c b/src/world/area_sam/sam_11/D3ADA0.c index 841f1b7b7f..184b1b44f0 100644 --- a/src/world/area_sam/sam_11/D3ADA0.c +++ b/src/world/area_sam/sam_11/D3ADA0.c @@ -46,7 +46,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802415EC_D3BBBC); INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_80241650_D3BC20); -INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802416E0_D3BCB0); +#include "world/common/UnkMoveNpc.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802417C8_D3BD98); diff --git a/src/world/common/UnkMoveNpc.inc.c b/src/world/common/UnkMoveNpc.inc.c new file mode 100644 index 0000000000..e77ac52f90 --- /dev/null +++ b/src/world/common/UnkMoveNpc.inc.c @@ -0,0 +1,19 @@ +#include "common.h" + +static ApiStatus UnkMoveNpc(ScriptInstance* script, s32 isInitialCall) { + Npc* npc = get_npc_unsafe(NpcId_PARTNER); + + if (isInitialCall) { + script->functionTemp[1].f = get_float_variable(script, SI_VAR(0)) / 60.0f; + script->functionTemp[2].f = get_float_variable(script, SI_VAR(5)) / 60.0f; + script->functionTemp[3].f = get_float_variable(script, SI_VAR(1)) / 60.0f; + script->functionTemp[0].s = 60; + } + + npc->pos.x += script->functionTemp[1].f; + npc->pos.y += script->functionTemp[2].f; + npc->pos.z += script->functionTemp[3].f; + script->functionTemp[0].s--; + + return (script->functionTemp[0].s == 0) * ApiStatus_DONE2; +} diff --git a/tools/m2ctx.py b/tools/m2ctx.py index f6c477f0eb..59821b9c5c 100755 --- a/tools/m2ctx.py +++ b/tools/m2ctx.py @@ -26,7 +26,7 @@ def get_c_file(directory): def import_c_file(in_file): in_file = os.path.relpath(in_file, root_dir) - cpp_command = ["gcc", "-E", "-P", "-Iinclude", "-D_LANGUAGE_C", "-ffreestanding", "-DF3DEX_GBI_2", in_file] + cpp_command = ["gcc", "-E", "-P", "-Iinclude", "-Isrc", "-D_LANGUAGE_C", "-ffreestanding", "-DF3DEX_GBI_2", in_file] try: return subprocess.check_output(cpp_command, cwd=root_dir, encoding="utf-8") except subprocess.CalledProcessError: @@ -53,7 +53,7 @@ def main(): sys.exit("Cannot find appropriate c file dir. In argumentless mode, run this script from the c file's corresponding asm dir.") c_file = get_c_file(c_dir_path) c_file_path = os.path.join(c_dir_path, c_file) - + processed = import_c_file(c_file_path) processed_lines = processed.split("\n") output = [] From 984b7667ca7512c082bd18c6e643c74b80b8e2ed Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Fri, 30 Oct 2020 20:33:06 +0000 Subject: [PATCH 61/78] install python-setuptools Requirement of PyYAML --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index efbc4324cc..472281d052 100755 --- a/install.sh +++ b/install.sh @@ -4,7 +4,7 @@ if command -v apt &> /dev/null; then echo "Installing packages for Ubuntu (apt)" - sudo apt install -y git python3 python3-pip build-essential binutils-mips-linux-gnu zlib1g-dev libyaml-dev || exit 1 + sudo apt install -y git python3 python3-pip python3-setuptools build-essential binutils-mips-linux-gnu zlib1g-dev libyaml-dev || exit 1 python3 -m pip install -U -r requirements.txt if [[ $1 == "--extra" ]]; then @@ -25,7 +25,7 @@ if command -v pacman &> /dev/null; then sudo pacman -Syu || exit 1 # Install dependencies - sudo pacman -S --noconfirm --needed git python python-pip base-devel zlib libyaml || exit 1 + sudo pacman -S --noconfirm --needed git python python-pip python-setuptools base-devel zlib libyaml || exit 1 python3 -m pip install -U -r requirements.txt # Install binutils if required @@ -62,7 +62,7 @@ fi if command -v zypper &> /dev/null; then echo "Installing packages for openSUSE (zypper)" - sudo zypper -n install git python3 python3-devel python3-pip gcc gcc-c++ glibc-devel make cross-mips-binutils zlib-devel libyaml-devel + sudo zypper -n install git python3 python3-devel python3-pip python3-setuptools gcc gcc-c++ glibc-devel make cross-mips-binutils zlib-devel libyaml-devel # Link the openSUSE locations for binutils tools to their usual GNU locations sudo ln -s /usr/bin/mips-suse-linux-addr2line /usr/bin/mips-linux-gnu-addr2line From 31fc3ab212820db6ba30996001c738c8b57a0932 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 30 Oct 2020 17:50:48 -0400 Subject: [PATCH 62/78] UnkPartnerFuncs --- .../dro_01/95B7E0/func_802422F0_95D4F0.s | 42 ------------------- .../dro_02/9694C0/func_80241180_96A340.s | 42 ------------------- .../hos_03/A1BDB0/func_80243324_A1E424.s | 42 ------------------- .../jan_02/B2C8A0/func_80242494_B2E904.s | 42 ------------------- .../jan_03/B34BD0/func_80242A1C_B375EC.s | 42 ------------------- .../kmr_02/8B0070/func_80241210_8B1280.s | 42 ------------------- .../mac_00/7EB340/func_802414B0_7EC1C0.s | 42 ------------------- .../mac_01/8017D0/func_80242D90_803610.s | 42 ------------------- .../mac_02/823BF0/func_80242640_825900.s | 42 ------------------- .../mac_03/831B20/func_80241330_832B30.s | 42 ------------------- .../mac_04/843030/func_802412E0_843EB0.s | 42 ------------------- .../mac_05/852170/func_802421A0_854310.s | 42 ------------------- .../nok_01/9C53E0/func_80241BE8_9C6FC8.s | 42 ------------------- .../nok_02/9D7AA0/func_80242790_9D97B0.s | 42 ------------------- .../sam_01/CF7E80/func_80241580_CF90F0.s | 42 ------------------- .../sam_02/D05F60/func_802419AC_D070DC.s | 42 ------------------- .../sam_11/D3ADA0/func_80241650_D3BC20.s | 42 ------------------- src/world/area_dro/dro_01/95B7E0.c | 4 +- src/world/area_dro/dro_02/9694C0.c | 4 +- src/world/area_hos/hos_03/A1BDB0.c | 4 +- src/world/area_jan/jan_02/B2C8A0.c | 4 +- src/world/area_jan/jan_03/B34BD0.c | 4 +- src/world/area_kmr/kmr_02/8B0070.c | 4 +- src/world/area_mac/mac_00/7EB340.c | 4 +- src/world/area_mac/mac_01/8017D0.c | 4 +- src/world/area_mac/mac_02/823BF0.c | 4 +- src/world/area_mac/mac_03/831B20.c | 4 +- src/world/area_mac/mac_04/843030.c | 4 +- src/world/area_mac/mac_05/852170.c | 4 +- src/world/area_nok/nok_01/9C53E0.c | 4 +- src/world/area_nok/nok_02/9D7AA0.c | 4 +- src/world/area_sam/sam_01/CF7E80.c | 4 +- src/world/area_sam/sam_02/D05F60.c | 4 +- src/world/area_sam/sam_11/D3ADA0.c | 4 +- ...UnkMoveNpc.inc.c => UnkPartnerFuncs.inc.c} | 20 ++++++++- 35 files changed, 36 insertions(+), 766 deletions(-) delete mode 100644 asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_802422F0_95D4F0.s delete mode 100644 asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80241180_96A340.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80243324_A1E424.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242494_B2E904.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80242A1C_B375EC.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80241210_8B1280.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_00/7EB340/func_802414B0_7EC1C0.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242D90_803610.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_02/823BF0/func_80242640_825900.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_03/831B20/func_80241330_832B30.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_04/843030/func_802412E0_843EB0.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_05/852170/func_802421A0_854310.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241BE8_9C6FC8.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80242790_9D97B0.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80241580_CF90F0.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_02/D05F60/func_802419AC_D070DC.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_80241650_D3BC20.s rename src/world/common/{UnkMoveNpc.inc.c => UnkPartnerFuncs.inc.c} (56%) diff --git a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_802422F0_95D4F0.s b/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_802422F0_95D4F0.s deleted file mode 100644 index d8dccf460e..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_802422F0_95D4F0.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802422F0_95D4F0 -/* 95D4F0 802422F0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 95D4F4 802422F4 AFB10014 */ sw $s1, 0x14($sp) -/* 95D4F8 802422F8 0080882D */ daddu $s1, $a0, $zero -/* 95D4FC 802422FC AFB00010 */ sw $s0, 0x10($sp) -/* 95D500 80242300 00A0802D */ daddu $s0, $a1, $zero -/* 95D504 80242304 AFBF0018 */ sw $ra, 0x18($sp) -/* 95D508 80242308 0C00EABB */ jal get_npc_unsafe -/* 95D50C 8024230C 2404FFFC */ addiu $a0, $zero, -4 -/* 95D510 80242310 12000003 */ beqz $s0, .L80242320 -/* 95D514 80242314 0040182D */ daddu $v1, $v0, $zero -/* 95D518 80242318 2402003C */ addiu $v0, $zero, 0x3c -/* 95D51C 8024231C AE220070 */ sw $v0, 0x70($s1) -.L80242320: -/* 95D520 80242320 C462000C */ lwc1 $f2, 0xc($v1) -/* 95D524 80242324 3C0141F0 */ lui $at, 0x41f0 -/* 95D528 80242328 44810000 */ mtc1 $at, $f0 -/* 95D52C 8024232C 00000000 */ nop -/* 95D530 80242330 46001000 */ add.s $f0, $f2, $f0 -/* 95D534 80242334 3C0143B4 */ lui $at, 0x43b4 -/* 95D538 80242338 44811000 */ mtc1 $at, $f2 -/* 95D53C 8024233C 00000000 */ nop -/* 95D540 80242340 4600103E */ c.le.s $f2, $f0 -/* 95D544 80242344 00000000 */ nop -/* 95D548 80242348 45000003 */ bc1f .L80242358 -/* 95D54C 8024234C E460000C */ swc1 $f0, 0xc($v1) -/* 95D550 80242350 46020001 */ sub.s $f0, $f0, $f2 -/* 95D554 80242354 E460000C */ swc1 $f0, 0xc($v1) -.L80242358: -/* 95D558 80242358 8E230070 */ lw $v1, 0x70($s1) -/* 95D55C 8024235C 2463FFFF */ addiu $v1, $v1, -1 -/* 95D560 80242360 000317C3 */ sra $v0, $v1, 0x1f -/* 95D564 80242364 AE230070 */ sw $v1, 0x70($s1) -/* 95D568 80242368 8FBF0018 */ lw $ra, 0x18($sp) -/* 95D56C 8024236C 8FB10014 */ lw $s1, 0x14($sp) -/* 95D570 80242370 8FB00010 */ lw $s0, 0x10($sp) -/* 95D574 80242374 30420002 */ andi $v0, $v0, 2 -/* 95D578 80242378 03E00008 */ jr $ra -/* 95D57C 8024237C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80241180_96A340.s b/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80241180_96A340.s deleted file mode 100644 index 52ec3dd2d2..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80241180_96A340.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241180_96A340 -/* 96A340 80241180 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 96A344 80241184 AFB10014 */ sw $s1, 0x14($sp) -/* 96A348 80241188 0080882D */ daddu $s1, $a0, $zero -/* 96A34C 8024118C AFB00010 */ sw $s0, 0x10($sp) -/* 96A350 80241190 00A0802D */ daddu $s0, $a1, $zero -/* 96A354 80241194 AFBF0018 */ sw $ra, 0x18($sp) -/* 96A358 80241198 0C00EABB */ jal get_npc_unsafe -/* 96A35C 8024119C 2404FFFC */ addiu $a0, $zero, -4 -/* 96A360 802411A0 12000003 */ beqz $s0, .L802411B0 -/* 96A364 802411A4 0040182D */ daddu $v1, $v0, $zero -/* 96A368 802411A8 2402003C */ addiu $v0, $zero, 0x3c -/* 96A36C 802411AC AE220070 */ sw $v0, 0x70($s1) -.L802411B0: -/* 96A370 802411B0 C462000C */ lwc1 $f2, 0xc($v1) -/* 96A374 802411B4 3C0141F0 */ lui $at, 0x41f0 -/* 96A378 802411B8 44810000 */ mtc1 $at, $f0 -/* 96A37C 802411BC 00000000 */ nop -/* 96A380 802411C0 46001000 */ add.s $f0, $f2, $f0 -/* 96A384 802411C4 3C0143B4 */ lui $at, 0x43b4 -/* 96A388 802411C8 44811000 */ mtc1 $at, $f2 -/* 96A38C 802411CC 00000000 */ nop -/* 96A390 802411D0 4600103E */ c.le.s $f2, $f0 -/* 96A394 802411D4 00000000 */ nop -/* 96A398 802411D8 45000003 */ bc1f .L802411E8 -/* 96A39C 802411DC E460000C */ swc1 $f0, 0xc($v1) -/* 96A3A0 802411E0 46020001 */ sub.s $f0, $f0, $f2 -/* 96A3A4 802411E4 E460000C */ swc1 $f0, 0xc($v1) -.L802411E8: -/* 96A3A8 802411E8 8E230070 */ lw $v1, 0x70($s1) -/* 96A3AC 802411EC 2463FFFF */ addiu $v1, $v1, -1 -/* 96A3B0 802411F0 000317C3 */ sra $v0, $v1, 0x1f -/* 96A3B4 802411F4 AE230070 */ sw $v1, 0x70($s1) -/* 96A3B8 802411F8 8FBF0018 */ lw $ra, 0x18($sp) -/* 96A3BC 802411FC 8FB10014 */ lw $s1, 0x14($sp) -/* 96A3C0 80241200 8FB00010 */ lw $s0, 0x10($sp) -/* 96A3C4 80241204 30420002 */ andi $v0, $v0, 2 -/* 96A3C8 80241208 03E00008 */ jr $ra -/* 96A3CC 8024120C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80243324_A1E424.s b/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80243324_A1E424.s deleted file mode 100644 index 142902f789..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80243324_A1E424.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243324_A1E424 -/* A1E424 80243324 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* A1E428 80243328 AFB10014 */ sw $s1, 0x14($sp) -/* A1E42C 8024332C 0080882D */ daddu $s1, $a0, $zero -/* A1E430 80243330 AFB00010 */ sw $s0, 0x10($sp) -/* A1E434 80243334 00A0802D */ daddu $s0, $a1, $zero -/* A1E438 80243338 AFBF0018 */ sw $ra, 0x18($sp) -/* A1E43C 8024333C 0C00EABB */ jal get_npc_unsafe -/* A1E440 80243340 2404FFFC */ addiu $a0, $zero, -4 -/* A1E444 80243344 12000003 */ beqz $s0, .L80243354 -/* A1E448 80243348 0040182D */ daddu $v1, $v0, $zero -/* A1E44C 8024334C 2402003C */ addiu $v0, $zero, 0x3c -/* A1E450 80243350 AE220070 */ sw $v0, 0x70($s1) -.L80243354: -/* A1E454 80243354 C462000C */ lwc1 $f2, 0xc($v1) -/* A1E458 80243358 3C0141F0 */ lui $at, 0x41f0 -/* A1E45C 8024335C 44810000 */ mtc1 $at, $f0 -/* A1E460 80243360 00000000 */ nop -/* A1E464 80243364 46001000 */ add.s $f0, $f2, $f0 -/* A1E468 80243368 3C0143B4 */ lui $at, 0x43b4 -/* A1E46C 8024336C 44811000 */ mtc1 $at, $f2 -/* A1E470 80243370 00000000 */ nop -/* A1E474 80243374 4600103E */ c.le.s $f2, $f0 -/* A1E478 80243378 00000000 */ nop -/* A1E47C 8024337C 45000003 */ bc1f .L8024338C -/* A1E480 80243380 E460000C */ swc1 $f0, 0xc($v1) -/* A1E484 80243384 46020001 */ sub.s $f0, $f0, $f2 -/* A1E488 80243388 E460000C */ swc1 $f0, 0xc($v1) -.L8024338C: -/* A1E48C 8024338C 8E230070 */ lw $v1, 0x70($s1) -/* A1E490 80243390 2463FFFF */ addiu $v1, $v1, -1 -/* A1E494 80243394 000317C3 */ sra $v0, $v1, 0x1f -/* A1E498 80243398 AE230070 */ sw $v1, 0x70($s1) -/* A1E49C 8024339C 8FBF0018 */ lw $ra, 0x18($sp) -/* A1E4A0 802433A0 8FB10014 */ lw $s1, 0x14($sp) -/* A1E4A4 802433A4 8FB00010 */ lw $s0, 0x10($sp) -/* A1E4A8 802433A8 30420002 */ andi $v0, $v0, 2 -/* A1E4AC 802433AC 03E00008 */ jr $ra -/* A1E4B0 802433B0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242494_B2E904.s b/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242494_B2E904.s deleted file mode 100644 index da066920cb..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242494_B2E904.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242494_B2E904 -/* B2E904 80242494 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B2E908 80242498 AFB10014 */ sw $s1, 0x14($sp) -/* B2E90C 8024249C 0080882D */ daddu $s1, $a0, $zero -/* B2E910 802424A0 AFB00010 */ sw $s0, 0x10($sp) -/* B2E914 802424A4 00A0802D */ daddu $s0, $a1, $zero -/* B2E918 802424A8 AFBF0018 */ sw $ra, 0x18($sp) -/* B2E91C 802424AC 0C00EABB */ jal get_npc_unsafe -/* B2E920 802424B0 2404FFFC */ addiu $a0, $zero, -4 -/* B2E924 802424B4 12000003 */ beqz $s0, .L802424C4 -/* B2E928 802424B8 0040182D */ daddu $v1, $v0, $zero -/* B2E92C 802424BC 2402003C */ addiu $v0, $zero, 0x3c -/* B2E930 802424C0 AE220070 */ sw $v0, 0x70($s1) -.L802424C4: -/* B2E934 802424C4 C462000C */ lwc1 $f2, 0xc($v1) -/* B2E938 802424C8 3C0141F0 */ lui $at, 0x41f0 -/* B2E93C 802424CC 44810000 */ mtc1 $at, $f0 -/* B2E940 802424D0 00000000 */ nop -/* B2E944 802424D4 46001000 */ add.s $f0, $f2, $f0 -/* B2E948 802424D8 3C0143B4 */ lui $at, 0x43b4 -/* B2E94C 802424DC 44811000 */ mtc1 $at, $f2 -/* B2E950 802424E0 00000000 */ nop -/* B2E954 802424E4 4600103E */ c.le.s $f2, $f0 -/* B2E958 802424E8 00000000 */ nop -/* B2E95C 802424EC 45000003 */ bc1f .L802424FC -/* B2E960 802424F0 E460000C */ swc1 $f0, 0xc($v1) -/* B2E964 802424F4 46020001 */ sub.s $f0, $f0, $f2 -/* B2E968 802424F8 E460000C */ swc1 $f0, 0xc($v1) -.L802424FC: -/* B2E96C 802424FC 8E230070 */ lw $v1, 0x70($s1) -/* B2E970 80242500 2463FFFF */ addiu $v1, $v1, -1 -/* B2E974 80242504 000317C3 */ sra $v0, $v1, 0x1f -/* B2E978 80242508 AE230070 */ sw $v1, 0x70($s1) -/* B2E97C 8024250C 8FBF0018 */ lw $ra, 0x18($sp) -/* B2E980 80242510 8FB10014 */ lw $s1, 0x14($sp) -/* B2E984 80242514 8FB00010 */ lw $s0, 0x10($sp) -/* B2E988 80242518 30420002 */ andi $v0, $v0, 2 -/* B2E98C 8024251C 03E00008 */ jr $ra -/* B2E990 80242520 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80242A1C_B375EC.s b/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80242A1C_B375EC.s deleted file mode 100644 index e7d25b3e55..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80242A1C_B375EC.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242A1C_B375EC -/* B375EC 80242A1C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B375F0 80242A20 AFB10014 */ sw $s1, 0x14($sp) -/* B375F4 80242A24 0080882D */ daddu $s1, $a0, $zero -/* B375F8 80242A28 AFB00010 */ sw $s0, 0x10($sp) -/* B375FC 80242A2C 00A0802D */ daddu $s0, $a1, $zero -/* B37600 80242A30 AFBF0018 */ sw $ra, 0x18($sp) -/* B37604 80242A34 0C00EABB */ jal get_npc_unsafe -/* B37608 80242A38 2404FFFC */ addiu $a0, $zero, -4 -/* B3760C 80242A3C 12000003 */ beqz $s0, .L80242A4C -/* B37610 80242A40 0040182D */ daddu $v1, $v0, $zero -/* B37614 80242A44 2402003C */ addiu $v0, $zero, 0x3c -/* B37618 80242A48 AE220070 */ sw $v0, 0x70($s1) -.L80242A4C: -/* B3761C 80242A4C C462000C */ lwc1 $f2, 0xc($v1) -/* B37620 80242A50 3C0141F0 */ lui $at, 0x41f0 -/* B37624 80242A54 44810000 */ mtc1 $at, $f0 -/* B37628 80242A58 00000000 */ nop -/* B3762C 80242A5C 46001000 */ add.s $f0, $f2, $f0 -/* B37630 80242A60 3C0143B4 */ lui $at, 0x43b4 -/* B37634 80242A64 44811000 */ mtc1 $at, $f2 -/* B37638 80242A68 00000000 */ nop -/* B3763C 80242A6C 4600103E */ c.le.s $f2, $f0 -/* B37640 80242A70 00000000 */ nop -/* B37644 80242A74 45000003 */ bc1f .L80242A84 -/* B37648 80242A78 E460000C */ swc1 $f0, 0xc($v1) -/* B3764C 80242A7C 46020001 */ sub.s $f0, $f0, $f2 -/* B37650 80242A80 E460000C */ swc1 $f0, 0xc($v1) -.L80242A84: -/* B37654 80242A84 8E230070 */ lw $v1, 0x70($s1) -/* B37658 80242A88 2463FFFF */ addiu $v1, $v1, -1 -/* B3765C 80242A8C 000317C3 */ sra $v0, $v1, 0x1f -/* B37660 80242A90 AE230070 */ sw $v1, 0x70($s1) -/* B37664 80242A94 8FBF0018 */ lw $ra, 0x18($sp) -/* B37668 80242A98 8FB10014 */ lw $s1, 0x14($sp) -/* B3766C 80242A9C 8FB00010 */ lw $s0, 0x10($sp) -/* B37670 80242AA0 30420002 */ andi $v0, $v0, 2 -/* B37674 80242AA4 03E00008 */ jr $ra -/* B37678 80242AA8 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80241210_8B1280.s b/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80241210_8B1280.s deleted file mode 100644 index d18cd9c7cf..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80241210_8B1280.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241210_8B1280 -/* 8B1280 80241210 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 8B1284 80241214 AFB10014 */ sw $s1, 0x14($sp) -/* 8B1288 80241218 0080882D */ daddu $s1, $a0, $zero -/* 8B128C 8024121C AFB00010 */ sw $s0, 0x10($sp) -/* 8B1290 80241220 00A0802D */ daddu $s0, $a1, $zero -/* 8B1294 80241224 AFBF0018 */ sw $ra, 0x18($sp) -/* 8B1298 80241228 0C00EABB */ jal get_npc_unsafe -/* 8B129C 8024122C 2404FFFC */ addiu $a0, $zero, -4 -/* 8B12A0 80241230 12000003 */ beqz $s0, .L80241240 -/* 8B12A4 80241234 0040182D */ daddu $v1, $v0, $zero -/* 8B12A8 80241238 2402003C */ addiu $v0, $zero, 0x3c -/* 8B12AC 8024123C AE220070 */ sw $v0, 0x70($s1) -.L80241240: -/* 8B12B0 80241240 C462000C */ lwc1 $f2, 0xc($v1) -/* 8B12B4 80241244 3C0141F0 */ lui $at, 0x41f0 -/* 8B12B8 80241248 44810000 */ mtc1 $at, $f0 -/* 8B12BC 8024124C 00000000 */ nop -/* 8B12C0 80241250 46001000 */ add.s $f0, $f2, $f0 -/* 8B12C4 80241254 3C0143B4 */ lui $at, 0x43b4 -/* 8B12C8 80241258 44811000 */ mtc1 $at, $f2 -/* 8B12CC 8024125C 00000000 */ nop -/* 8B12D0 80241260 4600103E */ c.le.s $f2, $f0 -/* 8B12D4 80241264 00000000 */ nop -/* 8B12D8 80241268 45000003 */ bc1f .L80241278 -/* 8B12DC 8024126C E460000C */ swc1 $f0, 0xc($v1) -/* 8B12E0 80241270 46020001 */ sub.s $f0, $f0, $f2 -/* 8B12E4 80241274 E460000C */ swc1 $f0, 0xc($v1) -.L80241278: -/* 8B12E8 80241278 8E230070 */ lw $v1, 0x70($s1) -/* 8B12EC 8024127C 2463FFFF */ addiu $v1, $v1, -1 -/* 8B12F0 80241280 000317C3 */ sra $v0, $v1, 0x1f -/* 8B12F4 80241284 AE230070 */ sw $v1, 0x70($s1) -/* 8B12F8 80241288 8FBF0018 */ lw $ra, 0x18($sp) -/* 8B12FC 8024128C 8FB10014 */ lw $s1, 0x14($sp) -/* 8B1300 80241290 8FB00010 */ lw $s0, 0x10($sp) -/* 8B1304 80241294 30420002 */ andi $v0, $v0, 2 -/* 8B1308 80241298 03E00008 */ jr $ra -/* 8B130C 8024129C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_802414B0_7EC1C0.s b/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_802414B0_7EC1C0.s deleted file mode 100644 index 7cf24cd05d..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_802414B0_7EC1C0.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802414B0_7EC1C0 -/* 7EC1C0 802414B0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 7EC1C4 802414B4 AFB10014 */ sw $s1, 0x14($sp) -/* 7EC1C8 802414B8 0080882D */ daddu $s1, $a0, $zero -/* 7EC1CC 802414BC AFB00010 */ sw $s0, 0x10($sp) -/* 7EC1D0 802414C0 00A0802D */ daddu $s0, $a1, $zero -/* 7EC1D4 802414C4 AFBF0018 */ sw $ra, 0x18($sp) -/* 7EC1D8 802414C8 0C00EABB */ jal get_npc_unsafe -/* 7EC1DC 802414CC 2404FFFC */ addiu $a0, $zero, -4 -/* 7EC1E0 802414D0 12000003 */ beqz $s0, .L802414E0 -/* 7EC1E4 802414D4 0040182D */ daddu $v1, $v0, $zero -/* 7EC1E8 802414D8 2402003C */ addiu $v0, $zero, 0x3c -/* 7EC1EC 802414DC AE220070 */ sw $v0, 0x70($s1) -.L802414E0: -/* 7EC1F0 802414E0 C462000C */ lwc1 $f2, 0xc($v1) -/* 7EC1F4 802414E4 3C0141F0 */ lui $at, 0x41f0 -/* 7EC1F8 802414E8 44810000 */ mtc1 $at, $f0 -/* 7EC1FC 802414EC 00000000 */ nop -/* 7EC200 802414F0 46001000 */ add.s $f0, $f2, $f0 -/* 7EC204 802414F4 3C0143B4 */ lui $at, 0x43b4 -/* 7EC208 802414F8 44811000 */ mtc1 $at, $f2 -/* 7EC20C 802414FC 00000000 */ nop -/* 7EC210 80241500 4600103E */ c.le.s $f2, $f0 -/* 7EC214 80241504 00000000 */ nop -/* 7EC218 80241508 45000003 */ bc1f .L80241518 -/* 7EC21C 8024150C E460000C */ swc1 $f0, 0xc($v1) -/* 7EC220 80241510 46020001 */ sub.s $f0, $f0, $f2 -/* 7EC224 80241514 E460000C */ swc1 $f0, 0xc($v1) -.L80241518: -/* 7EC228 80241518 8E230070 */ lw $v1, 0x70($s1) -/* 7EC22C 8024151C 2463FFFF */ addiu $v1, $v1, -1 -/* 7EC230 80241520 000317C3 */ sra $v0, $v1, 0x1f -/* 7EC234 80241524 AE230070 */ sw $v1, 0x70($s1) -/* 7EC238 80241528 8FBF0018 */ lw $ra, 0x18($sp) -/* 7EC23C 8024152C 8FB10014 */ lw $s1, 0x14($sp) -/* 7EC240 80241530 8FB00010 */ lw $s0, 0x10($sp) -/* 7EC244 80241534 30420002 */ andi $v0, $v0, 2 -/* 7EC248 80241538 03E00008 */ jr $ra -/* 7EC24C 8024153C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242D90_803610.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242D90_803610.s deleted file mode 100644 index 9d627a7f31..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242D90_803610.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242D90_803610 -/* 803610 80242D90 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 803614 80242D94 AFB10014 */ sw $s1, 0x14($sp) -/* 803618 80242D98 0080882D */ daddu $s1, $a0, $zero -/* 80361C 80242D9C AFB00010 */ sw $s0, 0x10($sp) -/* 803620 80242DA0 00A0802D */ daddu $s0, $a1, $zero -/* 803624 80242DA4 AFBF0018 */ sw $ra, 0x18($sp) -/* 803628 80242DA8 0C00EABB */ jal get_npc_unsafe -/* 80362C 80242DAC 2404FFFC */ addiu $a0, $zero, -4 -/* 803630 80242DB0 12000003 */ beqz $s0, .L80242DC0 -/* 803634 80242DB4 0040182D */ daddu $v1, $v0, $zero -/* 803638 80242DB8 2402003C */ addiu $v0, $zero, 0x3c -/* 80363C 80242DBC AE220070 */ sw $v0, 0x70($s1) -.L80242DC0: -/* 803640 80242DC0 C462000C */ lwc1 $f2, 0xc($v1) -/* 803644 80242DC4 3C0141F0 */ lui $at, 0x41f0 -/* 803648 80242DC8 44810000 */ mtc1 $at, $f0 -/* 80364C 80242DCC 00000000 */ nop -/* 803650 80242DD0 46001000 */ add.s $f0, $f2, $f0 -/* 803654 80242DD4 3C0143B4 */ lui $at, 0x43b4 -/* 803658 80242DD8 44811000 */ mtc1 $at, $f2 -/* 80365C 80242DDC 00000000 */ nop -/* 803660 80242DE0 4600103E */ c.le.s $f2, $f0 -/* 803664 80242DE4 00000000 */ nop -/* 803668 80242DE8 45000003 */ bc1f .L80242DF8 -/* 80366C 80242DEC E460000C */ swc1 $f0, 0xc($v1) -/* 803670 80242DF0 46020001 */ sub.s $f0, $f0, $f2 -/* 803674 80242DF4 E460000C */ swc1 $f0, 0xc($v1) -.L80242DF8: -/* 803678 80242DF8 8E230070 */ lw $v1, 0x70($s1) -/* 80367C 80242DFC 2463FFFF */ addiu $v1, $v1, -1 -/* 803680 80242E00 000317C3 */ sra $v0, $v1, 0x1f -/* 803684 80242E04 AE230070 */ sw $v1, 0x70($s1) -/* 803688 80242E08 8FBF0018 */ lw $ra, 0x18($sp) -/* 80368C 80242E0C 8FB10014 */ lw $s1, 0x14($sp) -/* 803690 80242E10 8FB00010 */ lw $s0, 0x10($sp) -/* 803694 80242E14 30420002 */ andi $v0, $v0, 2 -/* 803698 80242E18 03E00008 */ jr $ra -/* 80369C 80242E1C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_80242640_825900.s b/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_80242640_825900.s deleted file mode 100644 index e150f1fbd5..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_80242640_825900.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242640_825900 -/* 825900 80242640 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 825904 80242644 AFB10014 */ sw $s1, 0x14($sp) -/* 825908 80242648 0080882D */ daddu $s1, $a0, $zero -/* 82590C 8024264C AFB00010 */ sw $s0, 0x10($sp) -/* 825910 80242650 00A0802D */ daddu $s0, $a1, $zero -/* 825914 80242654 AFBF0018 */ sw $ra, 0x18($sp) -/* 825918 80242658 0C00EABB */ jal get_npc_unsafe -/* 82591C 8024265C 2404FFFC */ addiu $a0, $zero, -4 -/* 825920 80242660 12000003 */ beqz $s0, .L80242670 -/* 825924 80242664 0040182D */ daddu $v1, $v0, $zero -/* 825928 80242668 2402003C */ addiu $v0, $zero, 0x3c -/* 82592C 8024266C AE220070 */ sw $v0, 0x70($s1) -.L80242670: -/* 825930 80242670 C462000C */ lwc1 $f2, 0xc($v1) -/* 825934 80242674 3C0141F0 */ lui $at, 0x41f0 -/* 825938 80242678 44810000 */ mtc1 $at, $f0 -/* 82593C 8024267C 00000000 */ nop -/* 825940 80242680 46001000 */ add.s $f0, $f2, $f0 -/* 825944 80242684 3C0143B4 */ lui $at, 0x43b4 -/* 825948 80242688 44811000 */ mtc1 $at, $f2 -/* 82594C 8024268C 00000000 */ nop -/* 825950 80242690 4600103E */ c.le.s $f2, $f0 -/* 825954 80242694 00000000 */ nop -/* 825958 80242698 45000003 */ bc1f .L802426A8 -/* 82595C 8024269C E460000C */ swc1 $f0, 0xc($v1) -/* 825960 802426A0 46020001 */ sub.s $f0, $f0, $f2 -/* 825964 802426A4 E460000C */ swc1 $f0, 0xc($v1) -.L802426A8: -/* 825968 802426A8 8E230070 */ lw $v1, 0x70($s1) -/* 82596C 802426AC 2463FFFF */ addiu $v1, $v1, -1 -/* 825970 802426B0 000317C3 */ sra $v0, $v1, 0x1f -/* 825974 802426B4 AE230070 */ sw $v1, 0x70($s1) -/* 825978 802426B8 8FBF0018 */ lw $ra, 0x18($sp) -/* 82597C 802426BC 8FB10014 */ lw $s1, 0x14($sp) -/* 825980 802426C0 8FB00010 */ lw $s0, 0x10($sp) -/* 825984 802426C4 30420002 */ andi $v0, $v0, 2 -/* 825988 802426C8 03E00008 */ jr $ra -/* 82598C 802426CC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_80241330_832B30.s b/asm/nonmatchings/world/area_mac/mac_03/831B20/func_80241330_832B30.s deleted file mode 100644 index 4f4864ebad..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_80241330_832B30.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241330_832B30 -/* 832B30 80241330 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 832B34 80241334 AFB10014 */ sw $s1, 0x14($sp) -/* 832B38 80241338 0080882D */ daddu $s1, $a0, $zero -/* 832B3C 8024133C AFB00010 */ sw $s0, 0x10($sp) -/* 832B40 80241340 00A0802D */ daddu $s0, $a1, $zero -/* 832B44 80241344 AFBF0018 */ sw $ra, 0x18($sp) -/* 832B48 80241348 0C00EABB */ jal get_npc_unsafe -/* 832B4C 8024134C 2404FFFC */ addiu $a0, $zero, -4 -/* 832B50 80241350 12000003 */ beqz $s0, .L80241360 -/* 832B54 80241354 0040182D */ daddu $v1, $v0, $zero -/* 832B58 80241358 2402003C */ addiu $v0, $zero, 0x3c -/* 832B5C 8024135C AE220070 */ sw $v0, 0x70($s1) -.L80241360: -/* 832B60 80241360 C462000C */ lwc1 $f2, 0xc($v1) -/* 832B64 80241364 3C0141F0 */ lui $at, 0x41f0 -/* 832B68 80241368 44810000 */ mtc1 $at, $f0 -/* 832B6C 8024136C 00000000 */ nop -/* 832B70 80241370 46001000 */ add.s $f0, $f2, $f0 -/* 832B74 80241374 3C0143B4 */ lui $at, 0x43b4 -/* 832B78 80241378 44811000 */ mtc1 $at, $f2 -/* 832B7C 8024137C 00000000 */ nop -/* 832B80 80241380 4600103E */ c.le.s $f2, $f0 -/* 832B84 80241384 00000000 */ nop -/* 832B88 80241388 45000003 */ bc1f .L80241398 -/* 832B8C 8024138C E460000C */ swc1 $f0, 0xc($v1) -/* 832B90 80241390 46020001 */ sub.s $f0, $f0, $f2 -/* 832B94 80241394 E460000C */ swc1 $f0, 0xc($v1) -.L80241398: -/* 832B98 80241398 8E230070 */ lw $v1, 0x70($s1) -/* 832B9C 8024139C 2463FFFF */ addiu $v1, $v1, -1 -/* 832BA0 802413A0 000317C3 */ sra $v0, $v1, 0x1f -/* 832BA4 802413A4 AE230070 */ sw $v1, 0x70($s1) -/* 832BA8 802413A8 8FBF0018 */ lw $ra, 0x18($sp) -/* 832BAC 802413AC 8FB10014 */ lw $s1, 0x14($sp) -/* 832BB0 802413B0 8FB00010 */ lw $s0, 0x10($sp) -/* 832BB4 802413B4 30420002 */ andi $v0, $v0, 2 -/* 832BB8 802413B8 03E00008 */ jr $ra -/* 832BBC 802413BC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_04/843030/func_802412E0_843EB0.s b/asm/nonmatchings/world/area_mac/mac_04/843030/func_802412E0_843EB0.s deleted file mode 100644 index 162d8949bb..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_04/843030/func_802412E0_843EB0.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802412E0_843EB0 -/* 843EB0 802412E0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 843EB4 802412E4 AFB10014 */ sw $s1, 0x14($sp) -/* 843EB8 802412E8 0080882D */ daddu $s1, $a0, $zero -/* 843EBC 802412EC AFB00010 */ sw $s0, 0x10($sp) -/* 843EC0 802412F0 00A0802D */ daddu $s0, $a1, $zero -/* 843EC4 802412F4 AFBF0018 */ sw $ra, 0x18($sp) -/* 843EC8 802412F8 0C00EABB */ jal get_npc_unsafe -/* 843ECC 802412FC 2404FFFC */ addiu $a0, $zero, -4 -/* 843ED0 80241300 12000003 */ beqz $s0, .L80241310 -/* 843ED4 80241304 0040182D */ daddu $v1, $v0, $zero -/* 843ED8 80241308 2402003C */ addiu $v0, $zero, 0x3c -/* 843EDC 8024130C AE220070 */ sw $v0, 0x70($s1) -.L80241310: -/* 843EE0 80241310 C462000C */ lwc1 $f2, 0xc($v1) -/* 843EE4 80241314 3C0141F0 */ lui $at, 0x41f0 -/* 843EE8 80241318 44810000 */ mtc1 $at, $f0 -/* 843EEC 8024131C 00000000 */ nop -/* 843EF0 80241320 46001000 */ add.s $f0, $f2, $f0 -/* 843EF4 80241324 3C0143B4 */ lui $at, 0x43b4 -/* 843EF8 80241328 44811000 */ mtc1 $at, $f2 -/* 843EFC 8024132C 00000000 */ nop -/* 843F00 80241330 4600103E */ c.le.s $f2, $f0 -/* 843F04 80241334 00000000 */ nop -/* 843F08 80241338 45000003 */ bc1f .L80241348 -/* 843F0C 8024133C E460000C */ swc1 $f0, 0xc($v1) -/* 843F10 80241340 46020001 */ sub.s $f0, $f0, $f2 -/* 843F14 80241344 E460000C */ swc1 $f0, 0xc($v1) -.L80241348: -/* 843F18 80241348 8E230070 */ lw $v1, 0x70($s1) -/* 843F1C 8024134C 2463FFFF */ addiu $v1, $v1, -1 -/* 843F20 80241350 000317C3 */ sra $v0, $v1, 0x1f -/* 843F24 80241354 AE230070 */ sw $v1, 0x70($s1) -/* 843F28 80241358 8FBF0018 */ lw $ra, 0x18($sp) -/* 843F2C 8024135C 8FB10014 */ lw $s1, 0x14($sp) -/* 843F30 80241360 8FB00010 */ lw $s0, 0x10($sp) -/* 843F34 80241364 30420002 */ andi $v0, $v0, 2 -/* 843F38 80241368 03E00008 */ jr $ra -/* 843F3C 8024136C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_05/852170/func_802421A0_854310.s b/asm/nonmatchings/world/area_mac/mac_05/852170/func_802421A0_854310.s deleted file mode 100644 index 5b145b0814..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_05/852170/func_802421A0_854310.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802421A0_854310 -/* 854310 802421A0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 854314 802421A4 AFB10014 */ sw $s1, 0x14($sp) -/* 854318 802421A8 0080882D */ daddu $s1, $a0, $zero -/* 85431C 802421AC AFB00010 */ sw $s0, 0x10($sp) -/* 854320 802421B0 00A0802D */ daddu $s0, $a1, $zero -/* 854324 802421B4 AFBF0018 */ sw $ra, 0x18($sp) -/* 854328 802421B8 0C00EABB */ jal get_npc_unsafe -/* 85432C 802421BC 2404FFFC */ addiu $a0, $zero, -4 -/* 854330 802421C0 12000003 */ beqz $s0, .L802421D0 -/* 854334 802421C4 0040182D */ daddu $v1, $v0, $zero -/* 854338 802421C8 2402003C */ addiu $v0, $zero, 0x3c -/* 85433C 802421CC AE220070 */ sw $v0, 0x70($s1) -.L802421D0: -/* 854340 802421D0 C462000C */ lwc1 $f2, 0xc($v1) -/* 854344 802421D4 3C0141F0 */ lui $at, 0x41f0 -/* 854348 802421D8 44810000 */ mtc1 $at, $f0 -/* 85434C 802421DC 00000000 */ nop -/* 854350 802421E0 46001000 */ add.s $f0, $f2, $f0 -/* 854354 802421E4 3C0143B4 */ lui $at, 0x43b4 -/* 854358 802421E8 44811000 */ mtc1 $at, $f2 -/* 85435C 802421EC 00000000 */ nop -/* 854360 802421F0 4600103E */ c.le.s $f2, $f0 -/* 854364 802421F4 00000000 */ nop -/* 854368 802421F8 45000003 */ bc1f .L80242208 -/* 85436C 802421FC E460000C */ swc1 $f0, 0xc($v1) -/* 854370 80242200 46020001 */ sub.s $f0, $f0, $f2 -/* 854374 80242204 E460000C */ swc1 $f0, 0xc($v1) -.L80242208: -/* 854378 80242208 8E230070 */ lw $v1, 0x70($s1) -/* 85437C 8024220C 2463FFFF */ addiu $v1, $v1, -1 -/* 854380 80242210 000317C3 */ sra $v0, $v1, 0x1f -/* 854384 80242214 AE230070 */ sw $v1, 0x70($s1) -/* 854388 80242218 8FBF0018 */ lw $ra, 0x18($sp) -/* 85438C 8024221C 8FB10014 */ lw $s1, 0x14($sp) -/* 854390 80242220 8FB00010 */ lw $s0, 0x10($sp) -/* 854394 80242224 30420002 */ andi $v0, $v0, 2 -/* 854398 80242228 03E00008 */ jr $ra -/* 85439C 8024222C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241BE8_9C6FC8.s b/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241BE8_9C6FC8.s deleted file mode 100644 index 26e45f88ed..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241BE8_9C6FC8.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241BE8_9C6FC8 -/* 9C6FC8 80241BE8 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 9C6FCC 80241BEC AFB10014 */ sw $s1, 0x14($sp) -/* 9C6FD0 80241BF0 0080882D */ daddu $s1, $a0, $zero -/* 9C6FD4 80241BF4 AFB00010 */ sw $s0, 0x10($sp) -/* 9C6FD8 80241BF8 00A0802D */ daddu $s0, $a1, $zero -/* 9C6FDC 80241BFC AFBF0018 */ sw $ra, 0x18($sp) -/* 9C6FE0 80241C00 0C00EABB */ jal get_npc_unsafe -/* 9C6FE4 80241C04 2404FFFC */ addiu $a0, $zero, -4 -/* 9C6FE8 80241C08 12000003 */ beqz $s0, .L80241C18 -/* 9C6FEC 80241C0C 0040182D */ daddu $v1, $v0, $zero -/* 9C6FF0 80241C10 2402003C */ addiu $v0, $zero, 0x3c -/* 9C6FF4 80241C14 AE220070 */ sw $v0, 0x70($s1) -.L80241C18: -/* 9C6FF8 80241C18 C462000C */ lwc1 $f2, 0xc($v1) -/* 9C6FFC 80241C1C 3C0141F0 */ lui $at, 0x41f0 -/* 9C7000 80241C20 44810000 */ mtc1 $at, $f0 -/* 9C7004 80241C24 00000000 */ nop -/* 9C7008 80241C28 46001000 */ add.s $f0, $f2, $f0 -/* 9C700C 80241C2C 3C0143B4 */ lui $at, 0x43b4 -/* 9C7010 80241C30 44811000 */ mtc1 $at, $f2 -/* 9C7014 80241C34 00000000 */ nop -/* 9C7018 80241C38 4600103E */ c.le.s $f2, $f0 -/* 9C701C 80241C3C 00000000 */ nop -/* 9C7020 80241C40 45000003 */ bc1f .L80241C50 -/* 9C7024 80241C44 E460000C */ swc1 $f0, 0xc($v1) -/* 9C7028 80241C48 46020001 */ sub.s $f0, $f0, $f2 -/* 9C702C 80241C4C E460000C */ swc1 $f0, 0xc($v1) -.L80241C50: -/* 9C7030 80241C50 8E230070 */ lw $v1, 0x70($s1) -/* 9C7034 80241C54 2463FFFF */ addiu $v1, $v1, -1 -/* 9C7038 80241C58 000317C3 */ sra $v0, $v1, 0x1f -/* 9C703C 80241C5C AE230070 */ sw $v1, 0x70($s1) -/* 9C7040 80241C60 8FBF0018 */ lw $ra, 0x18($sp) -/* 9C7044 80241C64 8FB10014 */ lw $s1, 0x14($sp) -/* 9C7048 80241C68 8FB00010 */ lw $s0, 0x10($sp) -/* 9C704C 80241C6C 30420002 */ andi $v0, $v0, 2 -/* 9C7050 80241C70 03E00008 */ jr $ra -/* 9C7054 80241C74 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80242790_9D97B0.s b/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80242790_9D97B0.s deleted file mode 100644 index 0b09a0ed76..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_80242790_9D97B0.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242790_9D97B0 -/* 9D97B0 80242790 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 9D97B4 80242794 AFB10014 */ sw $s1, 0x14($sp) -/* 9D97B8 80242798 0080882D */ daddu $s1, $a0, $zero -/* 9D97BC 8024279C AFB00010 */ sw $s0, 0x10($sp) -/* 9D97C0 802427A0 00A0802D */ daddu $s0, $a1, $zero -/* 9D97C4 802427A4 AFBF0018 */ sw $ra, 0x18($sp) -/* 9D97C8 802427A8 0C00EABB */ jal get_npc_unsafe -/* 9D97CC 802427AC 2404FFFC */ addiu $a0, $zero, -4 -/* 9D97D0 802427B0 12000003 */ beqz $s0, .L802427C0 -/* 9D97D4 802427B4 0040182D */ daddu $v1, $v0, $zero -/* 9D97D8 802427B8 2402003C */ addiu $v0, $zero, 0x3c -/* 9D97DC 802427BC AE220070 */ sw $v0, 0x70($s1) -.L802427C0: -/* 9D97E0 802427C0 C462000C */ lwc1 $f2, 0xc($v1) -/* 9D97E4 802427C4 3C0141F0 */ lui $at, 0x41f0 -/* 9D97E8 802427C8 44810000 */ mtc1 $at, $f0 -/* 9D97EC 802427CC 00000000 */ nop -/* 9D97F0 802427D0 46001000 */ add.s $f0, $f2, $f0 -/* 9D97F4 802427D4 3C0143B4 */ lui $at, 0x43b4 -/* 9D97F8 802427D8 44811000 */ mtc1 $at, $f2 -/* 9D97FC 802427DC 00000000 */ nop -/* 9D9800 802427E0 4600103E */ c.le.s $f2, $f0 -/* 9D9804 802427E4 00000000 */ nop -/* 9D9808 802427E8 45000003 */ bc1f .L802427F8 -/* 9D980C 802427EC E460000C */ swc1 $f0, 0xc($v1) -/* 9D9810 802427F0 46020001 */ sub.s $f0, $f0, $f2 -/* 9D9814 802427F4 E460000C */ swc1 $f0, 0xc($v1) -.L802427F8: -/* 9D9818 802427F8 8E230070 */ lw $v1, 0x70($s1) -/* 9D981C 802427FC 2463FFFF */ addiu $v1, $v1, -1 -/* 9D9820 80242800 000317C3 */ sra $v0, $v1, 0x1f -/* 9D9824 80242804 AE230070 */ sw $v1, 0x70($s1) -/* 9D9828 80242808 8FBF0018 */ lw $ra, 0x18($sp) -/* 9D982C 8024280C 8FB10014 */ lw $s1, 0x14($sp) -/* 9D9830 80242810 8FB00010 */ lw $s0, 0x10($sp) -/* 9D9834 80242814 30420002 */ andi $v0, $v0, 2 -/* 9D9838 80242818 03E00008 */ jr $ra -/* 9D983C 8024281C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80241580_CF90F0.s b/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80241580_CF90F0.s deleted file mode 100644 index d9ad39c33f..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_80241580_CF90F0.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241580_CF90F0 -/* CF90F0 80241580 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* CF90F4 80241584 AFB10014 */ sw $s1, 0x14($sp) -/* CF90F8 80241588 0080882D */ daddu $s1, $a0, $zero -/* CF90FC 8024158C AFB00010 */ sw $s0, 0x10($sp) -/* CF9100 80241590 00A0802D */ daddu $s0, $a1, $zero -/* CF9104 80241594 AFBF0018 */ sw $ra, 0x18($sp) -/* CF9108 80241598 0C00EABB */ jal get_npc_unsafe -/* CF910C 8024159C 2404FFFC */ addiu $a0, $zero, -4 -/* CF9110 802415A0 12000003 */ beqz $s0, .L802415B0 -/* CF9114 802415A4 0040182D */ daddu $v1, $v0, $zero -/* CF9118 802415A8 2402003C */ addiu $v0, $zero, 0x3c -/* CF911C 802415AC AE220070 */ sw $v0, 0x70($s1) -.L802415B0: -/* CF9120 802415B0 C462000C */ lwc1 $f2, 0xc($v1) -/* CF9124 802415B4 3C0141F0 */ lui $at, 0x41f0 -/* CF9128 802415B8 44810000 */ mtc1 $at, $f0 -/* CF912C 802415BC 00000000 */ nop -/* CF9130 802415C0 46001000 */ add.s $f0, $f2, $f0 -/* CF9134 802415C4 3C0143B4 */ lui $at, 0x43b4 -/* CF9138 802415C8 44811000 */ mtc1 $at, $f2 -/* CF913C 802415CC 00000000 */ nop -/* CF9140 802415D0 4600103E */ c.le.s $f2, $f0 -/* CF9144 802415D4 00000000 */ nop -/* CF9148 802415D8 45000003 */ bc1f .L802415E8 -/* CF914C 802415DC E460000C */ swc1 $f0, 0xc($v1) -/* CF9150 802415E0 46020001 */ sub.s $f0, $f0, $f2 -/* CF9154 802415E4 E460000C */ swc1 $f0, 0xc($v1) -.L802415E8: -/* CF9158 802415E8 8E230070 */ lw $v1, 0x70($s1) -/* CF915C 802415EC 2463FFFF */ addiu $v1, $v1, -1 -/* CF9160 802415F0 000317C3 */ sra $v0, $v1, 0x1f -/* CF9164 802415F4 AE230070 */ sw $v1, 0x70($s1) -/* CF9168 802415F8 8FBF0018 */ lw $ra, 0x18($sp) -/* CF916C 802415FC 8FB10014 */ lw $s1, 0x14($sp) -/* CF9170 80241600 8FB00010 */ lw $s0, 0x10($sp) -/* CF9174 80241604 30420002 */ andi $v0, $v0, 2 -/* CF9178 80241608 03E00008 */ jr $ra -/* CF917C 8024160C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_802419AC_D070DC.s b/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_802419AC_D070DC.s deleted file mode 100644 index d6e0afad60..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_802419AC_D070DC.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802419AC_D070DC -/* D070DC 802419AC 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* D070E0 802419B0 AFB10014 */ sw $s1, 0x14($sp) -/* D070E4 802419B4 0080882D */ daddu $s1, $a0, $zero -/* D070E8 802419B8 AFB00010 */ sw $s0, 0x10($sp) -/* D070EC 802419BC 00A0802D */ daddu $s0, $a1, $zero -/* D070F0 802419C0 AFBF0018 */ sw $ra, 0x18($sp) -/* D070F4 802419C4 0C00EABB */ jal get_npc_unsafe -/* D070F8 802419C8 2404FFFC */ addiu $a0, $zero, -4 -/* D070FC 802419CC 12000003 */ beqz $s0, .L802419DC -/* D07100 802419D0 0040182D */ daddu $v1, $v0, $zero -/* D07104 802419D4 2402003C */ addiu $v0, $zero, 0x3c -/* D07108 802419D8 AE220070 */ sw $v0, 0x70($s1) -.L802419DC: -/* D0710C 802419DC C462000C */ lwc1 $f2, 0xc($v1) -/* D07110 802419E0 3C0141F0 */ lui $at, 0x41f0 -/* D07114 802419E4 44810000 */ mtc1 $at, $f0 -/* D07118 802419E8 00000000 */ nop -/* D0711C 802419EC 46001000 */ add.s $f0, $f2, $f0 -/* D07120 802419F0 3C0143B4 */ lui $at, 0x43b4 -/* D07124 802419F4 44811000 */ mtc1 $at, $f2 -/* D07128 802419F8 00000000 */ nop -/* D0712C 802419FC 4600103E */ c.le.s $f2, $f0 -/* D07130 80241A00 00000000 */ nop -/* D07134 80241A04 45000003 */ bc1f .L80241A14 -/* D07138 80241A08 E460000C */ swc1 $f0, 0xc($v1) -/* D0713C 80241A0C 46020001 */ sub.s $f0, $f0, $f2 -/* D07140 80241A10 E460000C */ swc1 $f0, 0xc($v1) -.L80241A14: -/* D07144 80241A14 8E230070 */ lw $v1, 0x70($s1) -/* D07148 80241A18 2463FFFF */ addiu $v1, $v1, -1 -/* D0714C 80241A1C 000317C3 */ sra $v0, $v1, 0x1f -/* D07150 80241A20 AE230070 */ sw $v1, 0x70($s1) -/* D07154 80241A24 8FBF0018 */ lw $ra, 0x18($sp) -/* D07158 80241A28 8FB10014 */ lw $s1, 0x14($sp) -/* D0715C 80241A2C 8FB00010 */ lw $s0, 0x10($sp) -/* D07160 80241A30 30420002 */ andi $v0, $v0, 2 -/* D07164 80241A34 03E00008 */ jr $ra -/* D07168 80241A38 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_80241650_D3BC20.s b/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_80241650_D3BC20.s deleted file mode 100644 index 1c705acb9e..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_80241650_D3BC20.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241650_D3BC20 -/* D3BC20 80241650 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* D3BC24 80241654 AFB10014 */ sw $s1, 0x14($sp) -/* D3BC28 80241658 0080882D */ daddu $s1, $a0, $zero -/* D3BC2C 8024165C AFB00010 */ sw $s0, 0x10($sp) -/* D3BC30 80241660 00A0802D */ daddu $s0, $a1, $zero -/* D3BC34 80241664 AFBF0018 */ sw $ra, 0x18($sp) -/* D3BC38 80241668 0C00EABB */ jal get_npc_unsafe -/* D3BC3C 8024166C 2404FFFC */ addiu $a0, $zero, -4 -/* D3BC40 80241670 12000003 */ beqz $s0, .L80241680 -/* D3BC44 80241674 0040182D */ daddu $v1, $v0, $zero -/* D3BC48 80241678 2402003C */ addiu $v0, $zero, 0x3c -/* D3BC4C 8024167C AE220070 */ sw $v0, 0x70($s1) -.L80241680: -/* D3BC50 80241680 C462000C */ lwc1 $f2, 0xc($v1) -/* D3BC54 80241684 3C0141F0 */ lui $at, 0x41f0 -/* D3BC58 80241688 44810000 */ mtc1 $at, $f0 -/* D3BC5C 8024168C 00000000 */ nop -/* D3BC60 80241690 46001000 */ add.s $f0, $f2, $f0 -/* D3BC64 80241694 3C0143B4 */ lui $at, 0x43b4 -/* D3BC68 80241698 44811000 */ mtc1 $at, $f2 -/* D3BC6C 8024169C 00000000 */ nop -/* D3BC70 802416A0 4600103E */ c.le.s $f2, $f0 -/* D3BC74 802416A4 00000000 */ nop -/* D3BC78 802416A8 45000003 */ bc1f .L802416B8 -/* D3BC7C 802416AC E460000C */ swc1 $f0, 0xc($v1) -/* D3BC80 802416B0 46020001 */ sub.s $f0, $f0, $f2 -/* D3BC84 802416B4 E460000C */ swc1 $f0, 0xc($v1) -.L802416B8: -/* D3BC88 802416B8 8E230070 */ lw $v1, 0x70($s1) -/* D3BC8C 802416BC 2463FFFF */ addiu $v1, $v1, -1 -/* D3BC90 802416C0 000317C3 */ sra $v0, $v1, 0x1f -/* D3BC94 802416C4 AE230070 */ sw $v1, 0x70($s1) -/* D3BC98 802416C8 8FBF0018 */ lw $ra, 0x18($sp) -/* D3BC9C 802416CC 8FB10014 */ lw $s1, 0x14($sp) -/* D3BCA0 802416D0 8FB00010 */ lw $s0, 0x10($sp) -/* D3BCA4 802416D4 30420002 */ andi $v0, $v0, 2 -/* D3BCA8 802416D8 03E00008 */ jr $ra -/* D3BCAC 802416DC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/src/world/area_dro/dro_01/95B7E0.c b/src/world/area_dro/dro_01/95B7E0.c index c6c01e1fc7..fd258c68ec 100644 --- a/src/world/area_dro/dro_01/95B7E0.c +++ b/src/world/area_dro/dro_01/95B7E0.c @@ -68,9 +68,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80242050_95D250); INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_8024228C_95D48C); -INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_802422F0_95D4F0); - -#include "world/common/UnkMoveNpc.inc.c" +#include "world/common/UnkPartnerFuncs.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80242468_95D668); diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index 5dc8d5f6cd..95df3d4b0f 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -44,9 +44,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80240EE0_96A0A0); INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_8024111C_96A2DC); -INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80241180_96A340); - -#include "world/common/UnkMoveNpc.inc.c" +#include "world/common/UnkPartnerFuncs.inc.c" INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_802412F8_96A4B8); diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index 09ebdc0fa9..e6cb55f900 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -86,9 +86,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80243084_A1E184); INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802432C0_A1E3C0); -INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80243324_A1E424); - -#include "world/common/UnkMoveNpc.inc.c" +#include "world/common/UnkPartnerFuncs.inc.c" INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_8024349C_A1E59C); diff --git a/src/world/area_jan/jan_02/B2C8A0.c b/src/world/area_jan/jan_02/B2C8A0.c index 3f6a1212bc..df6da359fe 100644 --- a/src/world/area_jan/jan_02/B2C8A0.c +++ b/src/world/area_jan/jan_02/B2C8A0.c @@ -78,9 +78,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_802421F4_B2E664); INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80242430_B2E8A0); -INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80242494_B2E904); - -#include "world/common/UnkMoveNpc.inc.c" +#include "world/common/UnkPartnerFuncs.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_8024260C_B2EA7C); diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index fb4a6ad2a2..184667f85b 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -118,9 +118,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_8024277C_B3734C); INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802429B8_B37588); -INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80242A1C_B375EC); - -#include "world/common/UnkMoveNpc.inc.c" +#include "world/common/UnkPartnerFuncs.inc.c" INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80242B94_B37764); diff --git a/src/world/area_kmr/kmr_02/8B0070.c b/src/world/area_kmr/kmr_02/8B0070.c index 126fc7b1eb..c2a864f722 100644 --- a/src/world/area_kmr/kmr_02/8B0070.c +++ b/src/world/area_kmr/kmr_02/8B0070.c @@ -60,9 +60,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240F70_8B0FE0); INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802411AC_8B121C); -INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80241210_8B1280); - -#include "world/common/UnkMoveNpc.inc.c" +#include "world/common/UnkPartnerFuncs.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80241388_8B13F8); diff --git a/src/world/area_mac/mac_00/7EB340.c b/src/world/area_mac/mac_00/7EB340.c index 947070a15b..a50c4fba79 100644 --- a/src/world/area_mac/mac_00/7EB340.c +++ b/src/world/area_mac/mac_00/7EB340.c @@ -44,9 +44,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241210_7EBF20); INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_8024144C_7EC15C); -INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_802414B0_7EC1C0); - -#include "world/common/UnkMoveNpc.inc.c" +#include "world/common/UnkPartnerFuncs.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241628_7EC338); diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index 1c6e82fb0c..4f871cc5a3 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -70,9 +70,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242AF0_803370); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242D2C_8035AC); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242D90_803610); - -#include "world/common/UnkMoveNpc.inc.c" +#include "world/common/UnkPartnerFuncs.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242F08_803788); diff --git a/src/world/area_mac/mac_02/823BF0.c b/src/world/area_mac/mac_02/823BF0.c index 2f9dab34c7..bbd39460fc 100644 --- a/src/world/area_mac/mac_02/823BF0.c +++ b/src/world/area_mac/mac_02/823BF0.c @@ -68,9 +68,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802423A0_825660); INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802425DC_82589C); -INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_80242640_825900); - -#include "world/common/UnkMoveNpc.inc.c" +#include "world/common/UnkPartnerFuncs.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802427B8_825A78); diff --git a/src/world/area_mac/mac_03/831B20.c b/src/world/area_mac/mac_03/831B20.c index cd479148d1..935c165abb 100644 --- a/src/world/area_mac/mac_03/831B20.c +++ b/src/world/area_mac/mac_03/831B20.c @@ -46,9 +46,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80241090_832890); INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802412CC_832ACC); -INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80241330_832B30); - -#include "world/common/UnkMoveNpc.inc.c" +#include "world/common/UnkPartnerFuncs.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802414A8_832CA8); diff --git a/src/world/area_mac/mac_04/843030.c b/src/world/area_mac/mac_04/843030.c index db3265f824..33868e1f5c 100644 --- a/src/world/area_mac/mac_04/843030.c +++ b/src/world/area_mac/mac_04/843030.c @@ -44,9 +44,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80241040_843C10); INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_8024127C_843E4C); -INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_802412E0_843EB0); - -#include "world/common/UnkMoveNpc.inc.c" +#include "world/common/UnkPartnerFuncs.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80241458_844028); diff --git a/src/world/area_mac/mac_05/852170.c b/src/world/area_mac/mac_05/852170.c index e9195bf47e..ac73e21084 100644 --- a/src/world/area_mac/mac_05/852170.c +++ b/src/world/area_mac/mac_05/852170.c @@ -76,9 +76,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241F00_854070); INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_8024213C_8542AC); -INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_802421A0_854310); - -#include "world/common/UnkMoveNpc.inc.c" +#include "world/common/UnkPartnerFuncs.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80242318_854488); diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index cc74b3b3b1..04af4c9b9b 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -84,9 +84,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80241948_9C6D28); INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80241B84_9C6F64); -INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80241BE8_9C6FC8); - -#include "world/common/UnkMoveNpc.inc.c" +#include "world/common/UnkPartnerFuncs.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80241D60_9C7140); diff --git a/src/world/area_nok/nok_02/9D7AA0.c b/src/world/area_nok/nok_02/9D7AA0.c index ad4f99f871..ff2304cfef 100644 --- a/src/world/area_nok/nok_02/9D7AA0.c +++ b/src/world/area_nok/nok_02/9D7AA0.c @@ -68,9 +68,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_802424F0_9D9510); INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_8024272C_9D974C); -INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242790_9D97B0); - -#include "world/common/UnkMoveNpc.inc.c" +#include "world/common/UnkPartnerFuncs.inc.c" INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242908_9D9928); diff --git a/src/world/area_sam/sam_01/CF7E80.c b/src/world/area_sam/sam_01/CF7E80.c index 07aef28454..f9daf86071 100644 --- a/src/world/area_sam/sam_01/CF7E80.c +++ b/src/world/area_sam/sam_01/CF7E80.c @@ -56,9 +56,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_802412E0_CF8E50); INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_8024151C_CF908C); -INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80241580_CF90F0); - -#include "world/common/UnkMoveNpc.inc.c" +#include "world/common/UnkPartnerFuncs.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_802416F8_CF9268); diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index 1cad9e8f54..775fd06542 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -64,9 +64,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_8024170C_D06E3C); INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80241948_D07078); -INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_802419AC_D070DC); - -#include "world/common/UnkMoveNpc.inc.c" +#include "world/common/UnkPartnerFuncs.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80241B24_D07254); diff --git a/src/world/area_sam/sam_11/D3ADA0.c b/src/world/area_sam/sam_11/D3ADA0.c index 184b1b44f0..df17fb25c7 100644 --- a/src/world/area_sam/sam_11/D3ADA0.c +++ b/src/world/area_sam/sam_11/D3ADA0.c @@ -44,9 +44,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802413B0_D3B980); INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802415EC_D3BBBC); -INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_80241650_D3BC20); - -#include "world/common/UnkMoveNpc.inc.c" +#include "world/common/UnkPartnerFuncs.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802417C8_D3BD98); diff --git a/src/world/common/UnkMoveNpc.inc.c b/src/world/common/UnkPartnerFuncs.inc.c similarity index 56% rename from src/world/common/UnkMoveNpc.inc.c rename to src/world/common/UnkPartnerFuncs.inc.c index e77ac52f90..b7f2e7584d 100644 --- a/src/world/common/UnkMoveNpc.inc.c +++ b/src/world/common/UnkPartnerFuncs.inc.c @@ -1,6 +1,24 @@ #include "common.h" -static ApiStatus UnkMoveNpc(ScriptInstance* script, s32 isInitialCall) { +static ApiStatus UnkRotatePartner(ScriptInstance* script, s32 isInitialCall) { + Npc* partner = get_npc_unsafe(NpcId_PARTNER); + + if (isInitialCall) { + script->functionTemp[0].s = 60; + } + + partner->yaw += 30.0f; + if (partner->yaw >= 360.0f) { + partner->yaw -= 360.0f; + } + + script->functionTemp[0].s--; + + return (script->functionTemp[0].s >> 0x1F) & ApiStatus_DONE2; +} + + +static ApiStatus UnkMovePartner(ScriptInstance* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(NpcId_PARTNER); if (isInitialCall) { From b0d5e8ee62cb2f1fb6dc5cb77dacad7b30fa7a9d Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 30 Oct 2020 18:41:04 -0400 Subject: [PATCH 63/78] 3 more --- .../dro_01/95B7E0/func_80241FDC_95D1DC.s | 33 -------------- .../dro_01/95B7E0/func_80242050_95D250.s | 44 ------------------- .../dro_01/95B7E0/func_8024228C_95D48C.s | 31 ------------- .../dro_02/9694C0/func_80240E6C_96A02C.s | 33 -------------- .../dro_02/9694C0/func_80240EE0_96A0A0.s | 44 ------------------- .../dro_02/9694C0/func_8024111C_96A2DC.s | 31 ------------- .../hos_03/A1BDB0/func_80243010_A1E110.s | 33 -------------- .../hos_03/A1BDB0/func_80243084_A1E184.s | 44 ------------------- .../hos_03/A1BDB0/func_802432C0_A1E3C0.s | 31 ------------- .../hos_04/A274B0/func_802405E0_A274B0.s | 33 -------------- .../jan_02/B2C8A0/func_80242180_B2E5F0.s | 33 -------------- .../jan_02/B2C8A0/func_802421F4_B2E664.s | 44 ------------------- .../jan_02/B2C8A0/func_80242430_B2E8A0.s | 31 ------------- .../jan_03/B34BD0/func_80242708_B372D8.s | 33 -------------- .../jan_03/B34BD0/func_8024277C_B3734C.s | 44 ------------------- .../jan_03/B34BD0/func_802429B8_B37588.s | 31 ------------- .../kmr_02/8B0070/func_80240EFC_8B0F6C.s | 33 -------------- .../kmr_02/8B0070/func_80240F70_8B0FE0.s | 44 ------------------- .../kmr_02/8B0070/func_802411AC_8B121C.s | 31 ------------- .../mac_00/7EB340/func_8024119C_7EBEAC.s | 33 -------------- .../mac_00/7EB340/func_80241210_7EBF20.s | 44 ------------------- .../mac_00/7EB340/func_8024144C_7EC15C.s | 31 ------------- .../mac_01/8017D0/func_80242A7C_8032FC.s | 33 -------------- .../mac_01/8017D0/func_80242AF0_803370.s | 44 ------------------- .../mac_01/8017D0/func_80242D2C_8035AC.s | 31 ------------- .../mac_02/823BF0/func_8024232C_8255EC.s | 33 -------------- .../mac_02/823BF0/func_802423A0_825660.s | 44 ------------------- .../mac_02/823BF0/func_802425DC_82589C.s | 31 ------------- .../mac_03/831B20/func_8024101C_83281C.s | 33 -------------- .../mac_03/831B20/func_80241090_832890.s | 44 ------------------- .../mac_03/831B20/func_802412CC_832ACC.s | 31 ------------- .../mac_04/843030/func_80240FCC_843B9C.s | 33 -------------- .../mac_04/843030/func_80241040_843C10.s | 44 ------------------- .../mac_04/843030/func_8024127C_843E4C.s | 31 ------------- .../mac_05/852170/func_80241E8C_853FFC.s | 33 -------------- .../mac_05/852170/func_80241F00_854070.s | 44 ------------------- .../mac_05/852170/func_8024213C_8542AC.s | 31 ------------- .../nok_01/9C53E0/func_802418D4_9C6CB4.s | 33 -------------- .../nok_01/9C53E0/func_80241948_9C6D28.s | 44 ------------------- .../nok_01/9C53E0/func_80241B84_9C6F64.s | 31 ------------- .../nok_02/9D7AA0/func_8024247C_9D949C.s | 33 -------------- .../nok_02/9D7AA0/func_802424F0_9D9510.s | 44 ------------------- .../nok_02/9D7AA0/func_8024272C_9D974C.s | 31 ------------- .../sam_01/CF7E80/func_8024126C_CF8DDC.s | 33 -------------- .../sam_01/CF7E80/func_802412E0_CF8E50.s | 44 ------------------- .../sam_01/CF7E80/func_8024151C_CF908C.s | 31 ------------- .../sam_02/D05F60/func_80241698_D06DC8.s | 33 -------------- .../sam_02/D05F60/func_8024170C_D06E3C.s | 44 ------------------- .../sam_02/D05F60/func_80241948_D07078.s | 31 ------------- .../sam_11/D3ADA0/func_8024133C_D3B90C.s | 33 -------------- .../sam_11/D3ADA0/func_802413B0_D3B980.s | 44 ------------------- .../sam_11/D3ADA0/func_802415EC_D3BBBC.s | 31 ------------- include/si.h | 2 +- src/world/area_dro/dro_01/95B7E0.c | 6 +-- src/world/area_dro/dro_02/9694C0.c | 6 +-- src/world/area_hos/hos_03/A1BDB0.c | 6 +-- src/world/area_hos/hos_04/A274B0.c | 2 +- src/world/area_jan/jan_02/B2C8A0.c | 6 +-- src/world/area_jan/jan_03/B34BD0.c | 6 +-- src/world/area_kmr/kmr_02/8B0070.c | 6 +-- src/world/area_mac/mac_00/7EB340.c | 6 +-- src/world/area_mac/mac_01/8017D0.c | 6 +-- src/world/area_mac/mac_02/823BF0.c | 6 +-- src/world/area_mac/mac_03/831B20.c | 6 +-- src/world/area_mac/mac_04/843030.c | 6 +-- src/world/area_mac/mac_05/852170.c | 6 +-- src/world/area_nok/nok_01/9C53E0.c | 6 +-- src/world/area_nok/nok_02/9D7AA0.c | 6 +-- src/world/area_sam/sam_01/CF7E80.c | 6 +-- src/world/area_sam/sam_02/D05F60.c | 6 +-- src/world/area_sam/sam_11/D3ADA0.c | 6 +-- src/world/common/GetCamVfov.inc.c | 10 +++++ src/world/common/SetCamVfov.inc.c | 10 +++++ src/world/common/UnkPartnerFuncs.inc.c | 1 - src/world/common/UnkRotatePlayer.inc.c | 18 ++++++++ 75 files changed, 91 insertions(+), 1923 deletions(-) delete mode 100644 asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80241FDC_95D1DC.s delete mode 100644 asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80242050_95D250.s delete mode 100644 asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_8024228C_95D48C.s delete mode 100644 asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240E6C_96A02C.s delete mode 100644 asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240EE0_96A0A0.s delete mode 100644 asm/nonmatchings/world/area_dro/dro_02/9694C0/func_8024111C_96A2DC.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80243010_A1E110.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80243084_A1E184.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802432C0_A1E3C0.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_04/A274B0/func_802405E0_A274B0.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242180_B2E5F0.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_802421F4_B2E664.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242430_B2E8A0.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80242708_B372D8.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_8024277C_B3734C.s delete mode 100644 asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802429B8_B37588.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80240EFC_8B0F6C.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80240F70_8B0FE0.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802411AC_8B121C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024119C_7EBEAC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80241210_7EBF20.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024144C_7EC15C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242A7C_8032FC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242AF0_803370.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242D2C_8035AC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_02/823BF0/func_8024232C_8255EC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802423A0_825660.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802425DC_82589C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_03/831B20/func_8024101C_83281C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_03/831B20/func_80241090_832890.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_03/831B20/func_802412CC_832ACC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_04/843030/func_80240FCC_843B9C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_04/843030/func_80241040_843C10.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_04/843030/func_8024127C_843E4C.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_05/852170/func_80241E8C_853FFC.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_05/852170/func_80241F00_854070.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_05/852170/func_8024213C_8542AC.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_802418D4_9C6CB4.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241948_9C6D28.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241B84_9C6F64.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_8024247C_9D949C.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_802424F0_9D9510.s delete mode 100644 asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_8024272C_9D974C.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024126C_CF8DDC.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_802412E0_CF8E50.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024151C_CF908C.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80241698_D06DC8.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_02/D05F60/func_8024170C_D06E3C.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80241948_D07078.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_8024133C_D3B90C.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802413B0_D3B980.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802415EC_D3BBBC.s create mode 100644 src/world/common/GetCamVfov.inc.c create mode 100644 src/world/common/SetCamVfov.inc.c create mode 100644 src/world/common/UnkRotatePlayer.inc.c diff --git a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80241FDC_95D1DC.s b/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80241FDC_95D1DC.s deleted file mode 100644 index 09c67d9c69..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80241FDC_95D1DC.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241FDC_95D1DC -/* 95D1DC 80241FDC 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 95D1E0 80241FE0 AFB10014 */ sw $s1, 0x14($sp) -/* 95D1E4 80241FE4 0080882D */ daddu $s1, $a0, $zero -/* 95D1E8 80241FE8 AFBF0018 */ sw $ra, 0x18($sp) -/* 95D1EC 80241FEC AFB00010 */ sw $s0, 0x10($sp) -/* 95D1F0 80241FF0 8E30000C */ lw $s0, 0xc($s1) -/* 95D1F4 80241FF4 8E050000 */ lw $a1, ($s0) -/* 95D1F8 80241FF8 0C0B1EAF */ jal get_variable -/* 95D1FC 80241FFC 26100004 */ addiu $s0, $s0, 4 -/* 95D200 80242000 0220202D */ daddu $a0, $s1, $zero -/* 95D204 80242004 8E050000 */ lw $a1, ($s0) -/* 95D208 80242008 0C0B210B */ jal get_float_variable -/* 95D20C 8024200C 0040802D */ daddu $s0, $v0, $zero -/* 95D210 80242010 24020002 */ addiu $v0, $zero, 2 -/* 95D214 80242014 00501804 */ sllv $v1, $s0, $v0 -/* 95D218 80242018 00701821 */ addu $v1, $v1, $s0 -/* 95D21C 8024201C 00431804 */ sllv $v1, $v1, $v0 -/* 95D220 80242020 00701823 */ subu $v1, $v1, $s0 -/* 95D224 80242024 000320C0 */ sll $a0, $v1, 3 -/* 95D228 80242028 00641821 */ addu $v1, $v1, $a0 -/* 95D22C 8024202C 000318C0 */ sll $v1, $v1, 3 -/* 95D230 80242030 3C01800B */ lui $at, 0x800b -/* 95D234 80242034 00230821 */ addu $at, $at, $v1 -/* 95D238 80242038 E4201D98 */ swc1 $f0, 0x1d98($at) -/* 95D23C 8024203C 8FBF0018 */ lw $ra, 0x18($sp) -/* 95D240 80242040 8FB10014 */ lw $s1, 0x14($sp) -/* 95D244 80242044 8FB00010 */ lw $s0, 0x10($sp) -/* 95D248 80242048 03E00008 */ jr $ra -/* 95D24C 8024204C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80242050_95D250.s b/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80242050_95D250.s deleted file mode 100644 index 173827e43f..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_80242050_95D250.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242050_95D250 -/* 95D250 80242050 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 95D254 80242054 AFB10014 */ sw $s1, 0x14($sp) -/* 95D258 80242058 0080882D */ daddu $s1, $a0, $zero -/* 95D25C 8024205C AFBF0018 */ sw $ra, 0x18($sp) -/* 95D260 80242060 AFB00010 */ sw $s0, 0x10($sp) -/* 95D264 80242064 8E30000C */ lw $s0, 0xc($s1) -/* 95D268 80242068 8E050000 */ lw $a1, ($s0) -/* 95D26C 8024206C 0C0B1EAF */ jal get_variable -/* 95D270 80242070 26100004 */ addiu $s0, $s0, 4 -/* 95D274 80242074 00021880 */ sll $v1, $v0, 2 -/* 95D278 80242078 00621821 */ addu $v1, $v1, $v0 -/* 95D27C 8024207C 00031880 */ sll $v1, $v1, 2 -/* 95D280 80242080 00621823 */ subu $v1, $v1, $v0 -/* 95D284 80242084 000310C0 */ sll $v0, $v1, 3 -/* 95D288 80242088 00621821 */ addu $v1, $v1, $v0 -/* 95D28C 8024208C 000318C0 */ sll $v1, $v1, 3 -/* 95D290 80242090 3C01800B */ lui $at, 0x800b -/* 95D294 80242094 00230821 */ addu $at, $at, $v1 -/* 95D298 80242098 C4221D98 */ lwc1 $f2, 0x1d98($at) -/* 95D29C 8024209C 3C014480 */ lui $at, 0x4480 -/* 95D2A0 802420A0 44810000 */ mtc1 $at, $f0 -/* 95D2A4 802420A4 00000000 */ nop -/* 95D2A8 802420A8 46001082 */ mul.s $f2, $f2, $f0 -/* 95D2AC 802420AC 00000000 */ nop -/* 95D2B0 802420B0 3C01CD5B */ lui $at, 0xcd5b -/* 95D2B4 802420B4 34215858 */ ori $at, $at, 0x5858 -/* 95D2B8 802420B8 44810000 */ mtc1 $at, $f0 -/* 95D2BC 802420BC 00000000 */ nop -/* 95D2C0 802420C0 46001080 */ add.s $f2, $f2, $f0 -/* 95D2C4 802420C4 8E050000 */ lw $a1, ($s0) -/* 95D2C8 802420C8 4600110D */ trunc.w.s $f4, $f2 -/* 95D2CC 802420CC 44062000 */ mfc1 $a2, $f4 -/* 95D2D0 802420D0 0C0B2026 */ jal set_variable -/* 95D2D4 802420D4 0220202D */ daddu $a0, $s1, $zero -/* 95D2D8 802420D8 8FBF0018 */ lw $ra, 0x18($sp) -/* 95D2DC 802420DC 8FB10014 */ lw $s1, 0x14($sp) -/* 95D2E0 802420E0 8FB00010 */ lw $s0, 0x10($sp) -/* 95D2E4 802420E4 24020002 */ addiu $v0, $zero, 2 -/* 95D2E8 802420E8 03E00008 */ jr $ra -/* 95D2EC 802420EC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_8024228C_95D48C.s b/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_8024228C_95D48C.s deleted file mode 100644 index 7cffdb15ba..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_01/95B7E0/func_8024228C_95D48C.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024228C_95D48C -/* 95D48C 8024228C 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* 95D490 80242290 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* 95D494 80242294 10A00002 */ beqz $a1, .L802422A0 -/* 95D498 80242298 2402003C */ addiu $v0, $zero, 0x3c -/* 95D49C 8024229C AC820070 */ sw $v0, 0x70($a0) -.L802422A0: -/* 95D4A0 802422A0 C4620080 */ lwc1 $f2, 0x80($v1) -/* 95D4A4 802422A4 3C0141F0 */ lui $at, 0x41f0 -/* 95D4A8 802422A8 44810000 */ mtc1 $at, $f0 -/* 95D4AC 802422AC 00000000 */ nop -/* 95D4B0 802422B0 46001000 */ add.s $f0, $f2, $f0 -/* 95D4B4 802422B4 3C0143B4 */ lui $at, 0x43b4 -/* 95D4B8 802422B8 44811000 */ mtc1 $at, $f2 -/* 95D4BC 802422BC 00000000 */ nop -/* 95D4C0 802422C0 4600103E */ c.le.s $f2, $f0 -/* 95D4C4 802422C4 00000000 */ nop -/* 95D4C8 802422C8 45000003 */ bc1f .L802422D8 -/* 95D4CC 802422CC E4600080 */ swc1 $f0, 0x80($v1) -/* 95D4D0 802422D0 46020001 */ sub.s $f0, $f0, $f2 -/* 95D4D4 802422D4 E4600080 */ swc1 $f0, 0x80($v1) -.L802422D8: -/* 95D4D8 802422D8 8C820070 */ lw $v0, 0x70($a0) -/* 95D4DC 802422DC 2442FFFF */ addiu $v0, $v0, -1 -/* 95D4E0 802422E0 AC820070 */ sw $v0, 0x70($a0) -/* 95D4E4 802422E4 000217C3 */ sra $v0, $v0, 0x1f -/* 95D4E8 802422E8 03E00008 */ jr $ra -/* 95D4EC 802422EC 30420002 */ andi $v0, $v0, 2 diff --git a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240E6C_96A02C.s b/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240E6C_96A02C.s deleted file mode 100644 index 00eb172992..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240E6C_96A02C.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240E6C_96A02C -/* 96A02C 80240E6C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 96A030 80240E70 AFB10014 */ sw $s1, 0x14($sp) -/* 96A034 80240E74 0080882D */ daddu $s1, $a0, $zero -/* 96A038 80240E78 AFBF0018 */ sw $ra, 0x18($sp) -/* 96A03C 80240E7C AFB00010 */ sw $s0, 0x10($sp) -/* 96A040 80240E80 8E30000C */ lw $s0, 0xc($s1) -/* 96A044 80240E84 8E050000 */ lw $a1, ($s0) -/* 96A048 80240E88 0C0B1EAF */ jal get_variable -/* 96A04C 80240E8C 26100004 */ addiu $s0, $s0, 4 -/* 96A050 80240E90 0220202D */ daddu $a0, $s1, $zero -/* 96A054 80240E94 8E050000 */ lw $a1, ($s0) -/* 96A058 80240E98 0C0B210B */ jal get_float_variable -/* 96A05C 80240E9C 0040802D */ daddu $s0, $v0, $zero -/* 96A060 80240EA0 24020002 */ addiu $v0, $zero, 2 -/* 96A064 80240EA4 00501804 */ sllv $v1, $s0, $v0 -/* 96A068 80240EA8 00701821 */ addu $v1, $v1, $s0 -/* 96A06C 80240EAC 00431804 */ sllv $v1, $v1, $v0 -/* 96A070 80240EB0 00701823 */ subu $v1, $v1, $s0 -/* 96A074 80240EB4 000320C0 */ sll $a0, $v1, 3 -/* 96A078 80240EB8 00641821 */ addu $v1, $v1, $a0 -/* 96A07C 80240EBC 000318C0 */ sll $v1, $v1, 3 -/* 96A080 80240EC0 3C01800B */ lui $at, 0x800b -/* 96A084 80240EC4 00230821 */ addu $at, $at, $v1 -/* 96A088 80240EC8 E4201D98 */ swc1 $f0, 0x1d98($at) -/* 96A08C 80240ECC 8FBF0018 */ lw $ra, 0x18($sp) -/* 96A090 80240ED0 8FB10014 */ lw $s1, 0x14($sp) -/* 96A094 80240ED4 8FB00010 */ lw $s0, 0x10($sp) -/* 96A098 80240ED8 03E00008 */ jr $ra -/* 96A09C 80240EDC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240EE0_96A0A0.s b/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240EE0_96A0A0.s deleted file mode 100644 index 59a220d8ac..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_80240EE0_96A0A0.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240EE0_96A0A0 -/* 96A0A0 80240EE0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 96A0A4 80240EE4 AFB10014 */ sw $s1, 0x14($sp) -/* 96A0A8 80240EE8 0080882D */ daddu $s1, $a0, $zero -/* 96A0AC 80240EEC AFBF0018 */ sw $ra, 0x18($sp) -/* 96A0B0 80240EF0 AFB00010 */ sw $s0, 0x10($sp) -/* 96A0B4 80240EF4 8E30000C */ lw $s0, 0xc($s1) -/* 96A0B8 80240EF8 8E050000 */ lw $a1, ($s0) -/* 96A0BC 80240EFC 0C0B1EAF */ jal get_variable -/* 96A0C0 80240F00 26100004 */ addiu $s0, $s0, 4 -/* 96A0C4 80240F04 00021880 */ sll $v1, $v0, 2 -/* 96A0C8 80240F08 00621821 */ addu $v1, $v1, $v0 -/* 96A0CC 80240F0C 00031880 */ sll $v1, $v1, 2 -/* 96A0D0 80240F10 00621823 */ subu $v1, $v1, $v0 -/* 96A0D4 80240F14 000310C0 */ sll $v0, $v1, 3 -/* 96A0D8 80240F18 00621821 */ addu $v1, $v1, $v0 -/* 96A0DC 80240F1C 000318C0 */ sll $v1, $v1, 3 -/* 96A0E0 80240F20 3C01800B */ lui $at, 0x800b -/* 96A0E4 80240F24 00230821 */ addu $at, $at, $v1 -/* 96A0E8 80240F28 C4221D98 */ lwc1 $f2, 0x1d98($at) -/* 96A0EC 80240F2C 3C014480 */ lui $at, 0x4480 -/* 96A0F0 80240F30 44810000 */ mtc1 $at, $f0 -/* 96A0F4 80240F34 00000000 */ nop -/* 96A0F8 80240F38 46001082 */ mul.s $f2, $f2, $f0 -/* 96A0FC 80240F3C 00000000 */ nop -/* 96A100 80240F40 3C01CD5B */ lui $at, 0xcd5b -/* 96A104 80240F44 34215858 */ ori $at, $at, 0x5858 -/* 96A108 80240F48 44810000 */ mtc1 $at, $f0 -/* 96A10C 80240F4C 00000000 */ nop -/* 96A110 80240F50 46001080 */ add.s $f2, $f2, $f0 -/* 96A114 80240F54 8E050000 */ lw $a1, ($s0) -/* 96A118 80240F58 4600110D */ trunc.w.s $f4, $f2 -/* 96A11C 80240F5C 44062000 */ mfc1 $a2, $f4 -/* 96A120 80240F60 0C0B2026 */ jal set_variable -/* 96A124 80240F64 0220202D */ daddu $a0, $s1, $zero -/* 96A128 80240F68 8FBF0018 */ lw $ra, 0x18($sp) -/* 96A12C 80240F6C 8FB10014 */ lw $s1, 0x14($sp) -/* 96A130 80240F70 8FB00010 */ lw $s0, 0x10($sp) -/* 96A134 80240F74 24020002 */ addiu $v0, $zero, 2 -/* 96A138 80240F78 03E00008 */ jr $ra -/* 96A13C 80240F7C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_8024111C_96A2DC.s b/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_8024111C_96A2DC.s deleted file mode 100644 index 5e2e262fae..0000000000 --- a/asm/nonmatchings/world/area_dro/dro_02/9694C0/func_8024111C_96A2DC.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024111C_96A2DC -/* 96A2DC 8024111C 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* 96A2E0 80241120 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* 96A2E4 80241124 10A00002 */ beqz $a1, .L80241130 -/* 96A2E8 80241128 2402003C */ addiu $v0, $zero, 0x3c -/* 96A2EC 8024112C AC820070 */ sw $v0, 0x70($a0) -.L80241130: -/* 96A2F0 80241130 C4620080 */ lwc1 $f2, 0x80($v1) -/* 96A2F4 80241134 3C0141F0 */ lui $at, 0x41f0 -/* 96A2F8 80241138 44810000 */ mtc1 $at, $f0 -/* 96A2FC 8024113C 00000000 */ nop -/* 96A300 80241140 46001000 */ add.s $f0, $f2, $f0 -/* 96A304 80241144 3C0143B4 */ lui $at, 0x43b4 -/* 96A308 80241148 44811000 */ mtc1 $at, $f2 -/* 96A30C 8024114C 00000000 */ nop -/* 96A310 80241150 4600103E */ c.le.s $f2, $f0 -/* 96A314 80241154 00000000 */ nop -/* 96A318 80241158 45000003 */ bc1f .L80241168 -/* 96A31C 8024115C E4600080 */ swc1 $f0, 0x80($v1) -/* 96A320 80241160 46020001 */ sub.s $f0, $f0, $f2 -/* 96A324 80241164 E4600080 */ swc1 $f0, 0x80($v1) -.L80241168: -/* 96A328 80241168 8C820070 */ lw $v0, 0x70($a0) -/* 96A32C 8024116C 2442FFFF */ addiu $v0, $v0, -1 -/* 96A330 80241170 AC820070 */ sw $v0, 0x70($a0) -/* 96A334 80241174 000217C3 */ sra $v0, $v0, 0x1f -/* 96A338 80241178 03E00008 */ jr $ra -/* 96A33C 8024117C 30420002 */ andi $v0, $v0, 2 diff --git a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80243010_A1E110.s b/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80243010_A1E110.s deleted file mode 100644 index f5f24adf59..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80243010_A1E110.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243010_A1E110 -/* A1E110 80243010 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* A1E114 80243014 AFB10014 */ sw $s1, 0x14($sp) -/* A1E118 80243018 0080882D */ daddu $s1, $a0, $zero -/* A1E11C 8024301C AFBF0018 */ sw $ra, 0x18($sp) -/* A1E120 80243020 AFB00010 */ sw $s0, 0x10($sp) -/* A1E124 80243024 8E30000C */ lw $s0, 0xc($s1) -/* A1E128 80243028 8E050000 */ lw $a1, ($s0) -/* A1E12C 8024302C 0C0B1EAF */ jal get_variable -/* A1E130 80243030 26100004 */ addiu $s0, $s0, 4 -/* A1E134 80243034 0220202D */ daddu $a0, $s1, $zero -/* A1E138 80243038 8E050000 */ lw $a1, ($s0) -/* A1E13C 8024303C 0C0B210B */ jal get_float_variable -/* A1E140 80243040 0040802D */ daddu $s0, $v0, $zero -/* A1E144 80243044 24020002 */ addiu $v0, $zero, 2 -/* A1E148 80243048 00501804 */ sllv $v1, $s0, $v0 -/* A1E14C 8024304C 00701821 */ addu $v1, $v1, $s0 -/* A1E150 80243050 00431804 */ sllv $v1, $v1, $v0 -/* A1E154 80243054 00701823 */ subu $v1, $v1, $s0 -/* A1E158 80243058 000320C0 */ sll $a0, $v1, 3 -/* A1E15C 8024305C 00641821 */ addu $v1, $v1, $a0 -/* A1E160 80243060 000318C0 */ sll $v1, $v1, 3 -/* A1E164 80243064 3C01800B */ lui $at, 0x800b -/* A1E168 80243068 00230821 */ addu $at, $at, $v1 -/* A1E16C 8024306C E4201D98 */ swc1 $f0, 0x1d98($at) -/* A1E170 80243070 8FBF0018 */ lw $ra, 0x18($sp) -/* A1E174 80243074 8FB10014 */ lw $s1, 0x14($sp) -/* A1E178 80243078 8FB00010 */ lw $s0, 0x10($sp) -/* A1E17C 8024307C 03E00008 */ jr $ra -/* A1E180 80243080 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80243084_A1E184.s b/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80243084_A1E184.s deleted file mode 100644 index 67116b2bc8..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_80243084_A1E184.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243084_A1E184 -/* A1E184 80243084 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* A1E188 80243088 AFB10014 */ sw $s1, 0x14($sp) -/* A1E18C 8024308C 0080882D */ daddu $s1, $a0, $zero -/* A1E190 80243090 AFBF0018 */ sw $ra, 0x18($sp) -/* A1E194 80243094 AFB00010 */ sw $s0, 0x10($sp) -/* A1E198 80243098 8E30000C */ lw $s0, 0xc($s1) -/* A1E19C 8024309C 8E050000 */ lw $a1, ($s0) -/* A1E1A0 802430A0 0C0B1EAF */ jal get_variable -/* A1E1A4 802430A4 26100004 */ addiu $s0, $s0, 4 -/* A1E1A8 802430A8 00021880 */ sll $v1, $v0, 2 -/* A1E1AC 802430AC 00621821 */ addu $v1, $v1, $v0 -/* A1E1B0 802430B0 00031880 */ sll $v1, $v1, 2 -/* A1E1B4 802430B4 00621823 */ subu $v1, $v1, $v0 -/* A1E1B8 802430B8 000310C0 */ sll $v0, $v1, 3 -/* A1E1BC 802430BC 00621821 */ addu $v1, $v1, $v0 -/* A1E1C0 802430C0 000318C0 */ sll $v1, $v1, 3 -/* A1E1C4 802430C4 3C01800B */ lui $at, 0x800b -/* A1E1C8 802430C8 00230821 */ addu $at, $at, $v1 -/* A1E1CC 802430CC C4221D98 */ lwc1 $f2, 0x1d98($at) -/* A1E1D0 802430D0 3C014480 */ lui $at, 0x4480 -/* A1E1D4 802430D4 44810000 */ mtc1 $at, $f0 -/* A1E1D8 802430D8 00000000 */ nop -/* A1E1DC 802430DC 46001082 */ mul.s $f2, $f2, $f0 -/* A1E1E0 802430E0 00000000 */ nop -/* A1E1E4 802430E4 3C01CD5B */ lui $at, 0xcd5b -/* A1E1E8 802430E8 34215858 */ ori $at, $at, 0x5858 -/* A1E1EC 802430EC 44810000 */ mtc1 $at, $f0 -/* A1E1F0 802430F0 00000000 */ nop -/* A1E1F4 802430F4 46001080 */ add.s $f2, $f2, $f0 -/* A1E1F8 802430F8 8E050000 */ lw $a1, ($s0) -/* A1E1FC 802430FC 4600110D */ trunc.w.s $f4, $f2 -/* A1E200 80243100 44062000 */ mfc1 $a2, $f4 -/* A1E204 80243104 0C0B2026 */ jal set_variable -/* A1E208 80243108 0220202D */ daddu $a0, $s1, $zero -/* A1E20C 8024310C 8FBF0018 */ lw $ra, 0x18($sp) -/* A1E210 80243110 8FB10014 */ lw $s1, 0x14($sp) -/* A1E214 80243114 8FB00010 */ lw $s0, 0x10($sp) -/* A1E218 80243118 24020002 */ addiu $v0, $zero, 2 -/* A1E21C 8024311C 03E00008 */ jr $ra -/* A1E220 80243120 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802432C0_A1E3C0.s b/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802432C0_A1E3C0.s deleted file mode 100644 index ee127bf8d8..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_03/A1BDB0/func_802432C0_A1E3C0.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802432C0_A1E3C0 -/* A1E3C0 802432C0 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* A1E3C4 802432C4 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* A1E3C8 802432C8 10A00002 */ beqz $a1, .L802432D4 -/* A1E3CC 802432CC 2402003C */ addiu $v0, $zero, 0x3c -/* A1E3D0 802432D0 AC820070 */ sw $v0, 0x70($a0) -.L802432D4: -/* A1E3D4 802432D4 C4620080 */ lwc1 $f2, 0x80($v1) -/* A1E3D8 802432D8 3C0141F0 */ lui $at, 0x41f0 -/* A1E3DC 802432DC 44810000 */ mtc1 $at, $f0 -/* A1E3E0 802432E0 00000000 */ nop -/* A1E3E4 802432E4 46001000 */ add.s $f0, $f2, $f0 -/* A1E3E8 802432E8 3C0143B4 */ lui $at, 0x43b4 -/* A1E3EC 802432EC 44811000 */ mtc1 $at, $f2 -/* A1E3F0 802432F0 00000000 */ nop -/* A1E3F4 802432F4 4600103E */ c.le.s $f2, $f0 -/* A1E3F8 802432F8 00000000 */ nop -/* A1E3FC 802432FC 45000003 */ bc1f .L8024330C -/* A1E400 80243300 E4600080 */ swc1 $f0, 0x80($v1) -/* A1E404 80243304 46020001 */ sub.s $f0, $f0, $f2 -/* A1E408 80243308 E4600080 */ swc1 $f0, 0x80($v1) -.L8024330C: -/* A1E40C 8024330C 8C820070 */ lw $v0, 0x70($a0) -/* A1E410 80243310 2442FFFF */ addiu $v0, $v0, -1 -/* A1E414 80243314 AC820070 */ sw $v0, 0x70($a0) -/* A1E418 80243318 000217C3 */ sra $v0, $v0, 0x1f -/* A1E41C 8024331C 03E00008 */ jr $ra -/* A1E420 80243320 30420002 */ andi $v0, $v0, 2 diff --git a/asm/nonmatchings/world/area_hos/hos_04/A274B0/func_802405E0_A274B0.s b/asm/nonmatchings/world/area_hos/hos_04/A274B0/func_802405E0_A274B0.s deleted file mode 100644 index ac1e88224b..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_04/A274B0/func_802405E0_A274B0.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802405E0_A274B0 -/* A274B0 802405E0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* A274B4 802405E4 AFB10014 */ sw $s1, 0x14($sp) -/* A274B8 802405E8 0080882D */ daddu $s1, $a0, $zero -/* A274BC 802405EC AFBF0018 */ sw $ra, 0x18($sp) -/* A274C0 802405F0 AFB00010 */ sw $s0, 0x10($sp) -/* A274C4 802405F4 8E30000C */ lw $s0, 0xc($s1) -/* A274C8 802405F8 8E050000 */ lw $a1, ($s0) -/* A274CC 802405FC 0C0B1EAF */ jal get_variable -/* A274D0 80240600 26100004 */ addiu $s0, $s0, 4 -/* A274D4 80240604 0220202D */ daddu $a0, $s1, $zero -/* A274D8 80240608 8E050000 */ lw $a1, ($s0) -/* A274DC 8024060C 0C0B210B */ jal get_float_variable -/* A274E0 80240610 0040802D */ daddu $s0, $v0, $zero -/* A274E4 80240614 24020002 */ addiu $v0, $zero, 2 -/* A274E8 80240618 00501804 */ sllv $v1, $s0, $v0 -/* A274EC 8024061C 00701821 */ addu $v1, $v1, $s0 -/* A274F0 80240620 00431804 */ sllv $v1, $v1, $v0 -/* A274F4 80240624 00701823 */ subu $v1, $v1, $s0 -/* A274F8 80240628 000320C0 */ sll $a0, $v1, 3 -/* A274FC 8024062C 00641821 */ addu $v1, $v1, $a0 -/* A27500 80240630 000318C0 */ sll $v1, $v1, 3 -/* A27504 80240634 3C01800B */ lui $at, 0x800b -/* A27508 80240638 00230821 */ addu $at, $at, $v1 -/* A2750C 8024063C E4201D98 */ swc1 $f0, 0x1d98($at) -/* A27510 80240640 8FBF0018 */ lw $ra, 0x18($sp) -/* A27514 80240644 8FB10014 */ lw $s1, 0x14($sp) -/* A27518 80240648 8FB00010 */ lw $s0, 0x10($sp) -/* A2751C 8024064C 03E00008 */ jr $ra -/* A27520 80240650 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242180_B2E5F0.s b/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242180_B2E5F0.s deleted file mode 100644 index c74d8c0277..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242180_B2E5F0.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242180_B2E5F0 -/* B2E5F0 80242180 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B2E5F4 80242184 AFB10014 */ sw $s1, 0x14($sp) -/* B2E5F8 80242188 0080882D */ daddu $s1, $a0, $zero -/* B2E5FC 8024218C AFBF0018 */ sw $ra, 0x18($sp) -/* B2E600 80242190 AFB00010 */ sw $s0, 0x10($sp) -/* B2E604 80242194 8E30000C */ lw $s0, 0xc($s1) -/* B2E608 80242198 8E050000 */ lw $a1, ($s0) -/* B2E60C 8024219C 0C0B1EAF */ jal get_variable -/* B2E610 802421A0 26100004 */ addiu $s0, $s0, 4 -/* B2E614 802421A4 0220202D */ daddu $a0, $s1, $zero -/* B2E618 802421A8 8E050000 */ lw $a1, ($s0) -/* B2E61C 802421AC 0C0B210B */ jal get_float_variable -/* B2E620 802421B0 0040802D */ daddu $s0, $v0, $zero -/* B2E624 802421B4 24020002 */ addiu $v0, $zero, 2 -/* B2E628 802421B8 00501804 */ sllv $v1, $s0, $v0 -/* B2E62C 802421BC 00701821 */ addu $v1, $v1, $s0 -/* B2E630 802421C0 00431804 */ sllv $v1, $v1, $v0 -/* B2E634 802421C4 00701823 */ subu $v1, $v1, $s0 -/* B2E638 802421C8 000320C0 */ sll $a0, $v1, 3 -/* B2E63C 802421CC 00641821 */ addu $v1, $v1, $a0 -/* B2E640 802421D0 000318C0 */ sll $v1, $v1, 3 -/* B2E644 802421D4 3C01800B */ lui $at, 0x800b -/* B2E648 802421D8 00230821 */ addu $at, $at, $v1 -/* B2E64C 802421DC E4201D98 */ swc1 $f0, 0x1d98($at) -/* B2E650 802421E0 8FBF0018 */ lw $ra, 0x18($sp) -/* B2E654 802421E4 8FB10014 */ lw $s1, 0x14($sp) -/* B2E658 802421E8 8FB00010 */ lw $s0, 0x10($sp) -/* B2E65C 802421EC 03E00008 */ jr $ra -/* B2E660 802421F0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_802421F4_B2E664.s b/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_802421F4_B2E664.s deleted file mode 100644 index cd84825001..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_802421F4_B2E664.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802421F4_B2E664 -/* B2E664 802421F4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B2E668 802421F8 AFB10014 */ sw $s1, 0x14($sp) -/* B2E66C 802421FC 0080882D */ daddu $s1, $a0, $zero -/* B2E670 80242200 AFBF0018 */ sw $ra, 0x18($sp) -/* B2E674 80242204 AFB00010 */ sw $s0, 0x10($sp) -/* B2E678 80242208 8E30000C */ lw $s0, 0xc($s1) -/* B2E67C 8024220C 8E050000 */ lw $a1, ($s0) -/* B2E680 80242210 0C0B1EAF */ jal get_variable -/* B2E684 80242214 26100004 */ addiu $s0, $s0, 4 -/* B2E688 80242218 00021880 */ sll $v1, $v0, 2 -/* B2E68C 8024221C 00621821 */ addu $v1, $v1, $v0 -/* B2E690 80242220 00031880 */ sll $v1, $v1, 2 -/* B2E694 80242224 00621823 */ subu $v1, $v1, $v0 -/* B2E698 80242228 000310C0 */ sll $v0, $v1, 3 -/* B2E69C 8024222C 00621821 */ addu $v1, $v1, $v0 -/* B2E6A0 80242230 000318C0 */ sll $v1, $v1, 3 -/* B2E6A4 80242234 3C01800B */ lui $at, 0x800b -/* B2E6A8 80242238 00230821 */ addu $at, $at, $v1 -/* B2E6AC 8024223C C4221D98 */ lwc1 $f2, 0x1d98($at) -/* B2E6B0 80242240 3C014480 */ lui $at, 0x4480 -/* B2E6B4 80242244 44810000 */ mtc1 $at, $f0 -/* B2E6B8 80242248 00000000 */ nop -/* B2E6BC 8024224C 46001082 */ mul.s $f2, $f2, $f0 -/* B2E6C0 80242250 00000000 */ nop -/* B2E6C4 80242254 3C01CD5B */ lui $at, 0xcd5b -/* B2E6C8 80242258 34215858 */ ori $at, $at, 0x5858 -/* B2E6CC 8024225C 44810000 */ mtc1 $at, $f0 -/* B2E6D0 80242260 00000000 */ nop -/* B2E6D4 80242264 46001080 */ add.s $f2, $f2, $f0 -/* B2E6D8 80242268 8E050000 */ lw $a1, ($s0) -/* B2E6DC 8024226C 4600110D */ trunc.w.s $f4, $f2 -/* B2E6E0 80242270 44062000 */ mfc1 $a2, $f4 -/* B2E6E4 80242274 0C0B2026 */ jal set_variable -/* B2E6E8 80242278 0220202D */ daddu $a0, $s1, $zero -/* B2E6EC 8024227C 8FBF0018 */ lw $ra, 0x18($sp) -/* B2E6F0 80242280 8FB10014 */ lw $s1, 0x14($sp) -/* B2E6F4 80242284 8FB00010 */ lw $s0, 0x10($sp) -/* B2E6F8 80242288 24020002 */ addiu $v0, $zero, 2 -/* B2E6FC 8024228C 03E00008 */ jr $ra -/* B2E700 80242290 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242430_B2E8A0.s b/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242430_B2E8A0.s deleted file mode 100644 index 815c0eddc5..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_02/B2C8A0/func_80242430_B2E8A0.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242430_B2E8A0 -/* B2E8A0 80242430 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* B2E8A4 80242434 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* B2E8A8 80242438 10A00002 */ beqz $a1, .L80242444 -/* B2E8AC 8024243C 2402003C */ addiu $v0, $zero, 0x3c -/* B2E8B0 80242440 AC820070 */ sw $v0, 0x70($a0) -.L80242444: -/* B2E8B4 80242444 C4620080 */ lwc1 $f2, 0x80($v1) -/* B2E8B8 80242448 3C0141F0 */ lui $at, 0x41f0 -/* B2E8BC 8024244C 44810000 */ mtc1 $at, $f0 -/* B2E8C0 80242450 00000000 */ nop -/* B2E8C4 80242454 46001000 */ add.s $f0, $f2, $f0 -/* B2E8C8 80242458 3C0143B4 */ lui $at, 0x43b4 -/* B2E8CC 8024245C 44811000 */ mtc1 $at, $f2 -/* B2E8D0 80242460 00000000 */ nop -/* B2E8D4 80242464 4600103E */ c.le.s $f2, $f0 -/* B2E8D8 80242468 00000000 */ nop -/* B2E8DC 8024246C 45000003 */ bc1f .L8024247C -/* B2E8E0 80242470 E4600080 */ swc1 $f0, 0x80($v1) -/* B2E8E4 80242474 46020001 */ sub.s $f0, $f0, $f2 -/* B2E8E8 80242478 E4600080 */ swc1 $f0, 0x80($v1) -.L8024247C: -/* B2E8EC 8024247C 8C820070 */ lw $v0, 0x70($a0) -/* B2E8F0 80242480 2442FFFF */ addiu $v0, $v0, -1 -/* B2E8F4 80242484 AC820070 */ sw $v0, 0x70($a0) -/* B2E8F8 80242488 000217C3 */ sra $v0, $v0, 0x1f -/* B2E8FC 8024248C 03E00008 */ jr $ra -/* B2E900 80242490 30420002 */ andi $v0, $v0, 2 diff --git a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80242708_B372D8.s b/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80242708_B372D8.s deleted file mode 100644 index a050d494b2..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_80242708_B372D8.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242708_B372D8 -/* B372D8 80242708 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B372DC 8024270C AFB10014 */ sw $s1, 0x14($sp) -/* B372E0 80242710 0080882D */ daddu $s1, $a0, $zero -/* B372E4 80242714 AFBF0018 */ sw $ra, 0x18($sp) -/* B372E8 80242718 AFB00010 */ sw $s0, 0x10($sp) -/* B372EC 8024271C 8E30000C */ lw $s0, 0xc($s1) -/* B372F0 80242720 8E050000 */ lw $a1, ($s0) -/* B372F4 80242724 0C0B1EAF */ jal get_variable -/* B372F8 80242728 26100004 */ addiu $s0, $s0, 4 -/* B372FC 8024272C 0220202D */ daddu $a0, $s1, $zero -/* B37300 80242730 8E050000 */ lw $a1, ($s0) -/* B37304 80242734 0C0B210B */ jal get_float_variable -/* B37308 80242738 0040802D */ daddu $s0, $v0, $zero -/* B3730C 8024273C 24020002 */ addiu $v0, $zero, 2 -/* B37310 80242740 00501804 */ sllv $v1, $s0, $v0 -/* B37314 80242744 00701821 */ addu $v1, $v1, $s0 -/* B37318 80242748 00431804 */ sllv $v1, $v1, $v0 -/* B3731C 8024274C 00701823 */ subu $v1, $v1, $s0 -/* B37320 80242750 000320C0 */ sll $a0, $v1, 3 -/* B37324 80242754 00641821 */ addu $v1, $v1, $a0 -/* B37328 80242758 000318C0 */ sll $v1, $v1, 3 -/* B3732C 8024275C 3C01800B */ lui $at, 0x800b -/* B37330 80242760 00230821 */ addu $at, $at, $v1 -/* B37334 80242764 E4201D98 */ swc1 $f0, 0x1d98($at) -/* B37338 80242768 8FBF0018 */ lw $ra, 0x18($sp) -/* B3733C 8024276C 8FB10014 */ lw $s1, 0x14($sp) -/* B37340 80242770 8FB00010 */ lw $s0, 0x10($sp) -/* B37344 80242774 03E00008 */ jr $ra -/* B37348 80242778 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_8024277C_B3734C.s b/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_8024277C_B3734C.s deleted file mode 100644 index 2e575aa820..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_8024277C_B3734C.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024277C_B3734C -/* B3734C 8024277C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B37350 80242780 AFB10014 */ sw $s1, 0x14($sp) -/* B37354 80242784 0080882D */ daddu $s1, $a0, $zero -/* B37358 80242788 AFBF0018 */ sw $ra, 0x18($sp) -/* B3735C 8024278C AFB00010 */ sw $s0, 0x10($sp) -/* B37360 80242790 8E30000C */ lw $s0, 0xc($s1) -/* B37364 80242794 8E050000 */ lw $a1, ($s0) -/* B37368 80242798 0C0B1EAF */ jal get_variable -/* B3736C 8024279C 26100004 */ addiu $s0, $s0, 4 -/* B37370 802427A0 00021880 */ sll $v1, $v0, 2 -/* B37374 802427A4 00621821 */ addu $v1, $v1, $v0 -/* B37378 802427A8 00031880 */ sll $v1, $v1, 2 -/* B3737C 802427AC 00621823 */ subu $v1, $v1, $v0 -/* B37380 802427B0 000310C0 */ sll $v0, $v1, 3 -/* B37384 802427B4 00621821 */ addu $v1, $v1, $v0 -/* B37388 802427B8 000318C0 */ sll $v1, $v1, 3 -/* B3738C 802427BC 3C01800B */ lui $at, 0x800b -/* B37390 802427C0 00230821 */ addu $at, $at, $v1 -/* B37394 802427C4 C4221D98 */ lwc1 $f2, 0x1d98($at) -/* B37398 802427C8 3C014480 */ lui $at, 0x4480 -/* B3739C 802427CC 44810000 */ mtc1 $at, $f0 -/* B373A0 802427D0 00000000 */ nop -/* B373A4 802427D4 46001082 */ mul.s $f2, $f2, $f0 -/* B373A8 802427D8 00000000 */ nop -/* B373AC 802427DC 3C01CD5B */ lui $at, 0xcd5b -/* B373B0 802427E0 34215858 */ ori $at, $at, 0x5858 -/* B373B4 802427E4 44810000 */ mtc1 $at, $f0 -/* B373B8 802427E8 00000000 */ nop -/* B373BC 802427EC 46001080 */ add.s $f2, $f2, $f0 -/* B373C0 802427F0 8E050000 */ lw $a1, ($s0) -/* B373C4 802427F4 4600110D */ trunc.w.s $f4, $f2 -/* B373C8 802427F8 44062000 */ mfc1 $a2, $f4 -/* B373CC 802427FC 0C0B2026 */ jal set_variable -/* B373D0 80242800 0220202D */ daddu $a0, $s1, $zero -/* B373D4 80242804 8FBF0018 */ lw $ra, 0x18($sp) -/* B373D8 80242808 8FB10014 */ lw $s1, 0x14($sp) -/* B373DC 8024280C 8FB00010 */ lw $s0, 0x10($sp) -/* B373E0 80242810 24020002 */ addiu $v0, $zero, 2 -/* B373E4 80242814 03E00008 */ jr $ra -/* B373E8 80242818 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802429B8_B37588.s b/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802429B8_B37588.s deleted file mode 100644 index b6a329e9bc..0000000000 --- a/asm/nonmatchings/world/area_jan/jan_03/B34BD0/func_802429B8_B37588.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802429B8_B37588 -/* B37588 802429B8 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* B3758C 802429BC 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* B37590 802429C0 10A00002 */ beqz $a1, .L802429CC -/* B37594 802429C4 2402003C */ addiu $v0, $zero, 0x3c -/* B37598 802429C8 AC820070 */ sw $v0, 0x70($a0) -.L802429CC: -/* B3759C 802429CC C4620080 */ lwc1 $f2, 0x80($v1) -/* B375A0 802429D0 3C0141F0 */ lui $at, 0x41f0 -/* B375A4 802429D4 44810000 */ mtc1 $at, $f0 -/* B375A8 802429D8 00000000 */ nop -/* B375AC 802429DC 46001000 */ add.s $f0, $f2, $f0 -/* B375B0 802429E0 3C0143B4 */ lui $at, 0x43b4 -/* B375B4 802429E4 44811000 */ mtc1 $at, $f2 -/* B375B8 802429E8 00000000 */ nop -/* B375BC 802429EC 4600103E */ c.le.s $f2, $f0 -/* B375C0 802429F0 00000000 */ nop -/* B375C4 802429F4 45000003 */ bc1f .L80242A04 -/* B375C8 802429F8 E4600080 */ swc1 $f0, 0x80($v1) -/* B375CC 802429FC 46020001 */ sub.s $f0, $f0, $f2 -/* B375D0 80242A00 E4600080 */ swc1 $f0, 0x80($v1) -.L80242A04: -/* B375D4 80242A04 8C820070 */ lw $v0, 0x70($a0) -/* B375D8 80242A08 2442FFFF */ addiu $v0, $v0, -1 -/* B375DC 80242A0C AC820070 */ sw $v0, 0x70($a0) -/* B375E0 80242A10 000217C3 */ sra $v0, $v0, 0x1f -/* B375E4 80242A14 03E00008 */ jr $ra -/* B375E8 80242A18 30420002 */ andi $v0, $v0, 2 diff --git a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80240EFC_8B0F6C.s b/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80240EFC_8B0F6C.s deleted file mode 100644 index 136a29d051..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80240EFC_8B0F6C.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240EFC_8B0F6C -/* 8B0F6C 80240EFC 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 8B0F70 80240F00 AFB10014 */ sw $s1, 0x14($sp) -/* 8B0F74 80240F04 0080882D */ daddu $s1, $a0, $zero -/* 8B0F78 80240F08 AFBF0018 */ sw $ra, 0x18($sp) -/* 8B0F7C 80240F0C AFB00010 */ sw $s0, 0x10($sp) -/* 8B0F80 80240F10 8E30000C */ lw $s0, 0xc($s1) -/* 8B0F84 80240F14 8E050000 */ lw $a1, ($s0) -/* 8B0F88 80240F18 0C0B1EAF */ jal get_variable -/* 8B0F8C 80240F1C 26100004 */ addiu $s0, $s0, 4 -/* 8B0F90 80240F20 0220202D */ daddu $a0, $s1, $zero -/* 8B0F94 80240F24 8E050000 */ lw $a1, ($s0) -/* 8B0F98 80240F28 0C0B210B */ jal get_float_variable -/* 8B0F9C 80240F2C 0040802D */ daddu $s0, $v0, $zero -/* 8B0FA0 80240F30 24020002 */ addiu $v0, $zero, 2 -/* 8B0FA4 80240F34 00501804 */ sllv $v1, $s0, $v0 -/* 8B0FA8 80240F38 00701821 */ addu $v1, $v1, $s0 -/* 8B0FAC 80240F3C 00431804 */ sllv $v1, $v1, $v0 -/* 8B0FB0 80240F40 00701823 */ subu $v1, $v1, $s0 -/* 8B0FB4 80240F44 000320C0 */ sll $a0, $v1, 3 -/* 8B0FB8 80240F48 00641821 */ addu $v1, $v1, $a0 -/* 8B0FBC 80240F4C 000318C0 */ sll $v1, $v1, 3 -/* 8B0FC0 80240F50 3C01800B */ lui $at, 0x800b -/* 8B0FC4 80240F54 00230821 */ addu $at, $at, $v1 -/* 8B0FC8 80240F58 E4201D98 */ swc1 $f0, 0x1d98($at) -/* 8B0FCC 80240F5C 8FBF0018 */ lw $ra, 0x18($sp) -/* 8B0FD0 80240F60 8FB10014 */ lw $s1, 0x14($sp) -/* 8B0FD4 80240F64 8FB00010 */ lw $s0, 0x10($sp) -/* 8B0FD8 80240F68 03E00008 */ jr $ra -/* 8B0FDC 80240F6C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80240F70_8B0FE0.s b/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80240F70_8B0FE0.s deleted file mode 100644 index c991f90716..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80240F70_8B0FE0.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240F70_8B0FE0 -/* 8B0FE0 80240F70 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 8B0FE4 80240F74 AFB10014 */ sw $s1, 0x14($sp) -/* 8B0FE8 80240F78 0080882D */ daddu $s1, $a0, $zero -/* 8B0FEC 80240F7C AFBF0018 */ sw $ra, 0x18($sp) -/* 8B0FF0 80240F80 AFB00010 */ sw $s0, 0x10($sp) -/* 8B0FF4 80240F84 8E30000C */ lw $s0, 0xc($s1) -/* 8B0FF8 80240F88 8E050000 */ lw $a1, ($s0) -/* 8B0FFC 80240F8C 0C0B1EAF */ jal get_variable -/* 8B1000 80240F90 26100004 */ addiu $s0, $s0, 4 -/* 8B1004 80240F94 00021880 */ sll $v1, $v0, 2 -/* 8B1008 80240F98 00621821 */ addu $v1, $v1, $v0 -/* 8B100C 80240F9C 00031880 */ sll $v1, $v1, 2 -/* 8B1010 80240FA0 00621823 */ subu $v1, $v1, $v0 -/* 8B1014 80240FA4 000310C0 */ sll $v0, $v1, 3 -/* 8B1018 80240FA8 00621821 */ addu $v1, $v1, $v0 -/* 8B101C 80240FAC 000318C0 */ sll $v1, $v1, 3 -/* 8B1020 80240FB0 3C01800B */ lui $at, 0x800b -/* 8B1024 80240FB4 00230821 */ addu $at, $at, $v1 -/* 8B1028 80240FB8 C4221D98 */ lwc1 $f2, 0x1d98($at) -/* 8B102C 80240FBC 3C014480 */ lui $at, 0x4480 -/* 8B1030 80240FC0 44810000 */ mtc1 $at, $f0 -/* 8B1034 80240FC4 00000000 */ nop -/* 8B1038 80240FC8 46001082 */ mul.s $f2, $f2, $f0 -/* 8B103C 80240FCC 00000000 */ nop -/* 8B1040 80240FD0 3C01CD5B */ lui $at, 0xcd5b -/* 8B1044 80240FD4 34215858 */ ori $at, $at, 0x5858 -/* 8B1048 80240FD8 44810000 */ mtc1 $at, $f0 -/* 8B104C 80240FDC 00000000 */ nop -/* 8B1050 80240FE0 46001080 */ add.s $f2, $f2, $f0 -/* 8B1054 80240FE4 8E050000 */ lw $a1, ($s0) -/* 8B1058 80240FE8 4600110D */ trunc.w.s $f4, $f2 -/* 8B105C 80240FEC 44062000 */ mfc1 $a2, $f4 -/* 8B1060 80240FF0 0C0B2026 */ jal set_variable -/* 8B1064 80240FF4 0220202D */ daddu $a0, $s1, $zero -/* 8B1068 80240FF8 8FBF0018 */ lw $ra, 0x18($sp) -/* 8B106C 80240FFC 8FB10014 */ lw $s1, 0x14($sp) -/* 8B1070 80241000 8FB00010 */ lw $s0, 0x10($sp) -/* 8B1074 80241004 24020002 */ addiu $v0, $zero, 2 -/* 8B1078 80241008 03E00008 */ jr $ra -/* 8B107C 8024100C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802411AC_8B121C.s b/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802411AC_8B121C.s deleted file mode 100644 index 19895d4bc0..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_802411AC_8B121C.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802411AC_8B121C -/* 8B121C 802411AC 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* 8B1220 802411B0 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* 8B1224 802411B4 10A00002 */ beqz $a1, .L802411C0 -/* 8B1228 802411B8 2402003C */ addiu $v0, $zero, 0x3c -/* 8B122C 802411BC AC820070 */ sw $v0, 0x70($a0) -.L802411C0: -/* 8B1230 802411C0 C4620080 */ lwc1 $f2, 0x80($v1) -/* 8B1234 802411C4 3C0141F0 */ lui $at, 0x41f0 -/* 8B1238 802411C8 44810000 */ mtc1 $at, $f0 -/* 8B123C 802411CC 00000000 */ nop -/* 8B1240 802411D0 46001000 */ add.s $f0, $f2, $f0 -/* 8B1244 802411D4 3C0143B4 */ lui $at, 0x43b4 -/* 8B1248 802411D8 44811000 */ mtc1 $at, $f2 -/* 8B124C 802411DC 00000000 */ nop -/* 8B1250 802411E0 4600103E */ c.le.s $f2, $f0 -/* 8B1254 802411E4 00000000 */ nop -/* 8B1258 802411E8 45000003 */ bc1f .L802411F8 -/* 8B125C 802411EC E4600080 */ swc1 $f0, 0x80($v1) -/* 8B1260 802411F0 46020001 */ sub.s $f0, $f0, $f2 -/* 8B1264 802411F4 E4600080 */ swc1 $f0, 0x80($v1) -.L802411F8: -/* 8B1268 802411F8 8C820070 */ lw $v0, 0x70($a0) -/* 8B126C 802411FC 2442FFFF */ addiu $v0, $v0, -1 -/* 8B1270 80241200 AC820070 */ sw $v0, 0x70($a0) -/* 8B1274 80241204 000217C3 */ sra $v0, $v0, 0x1f -/* 8B1278 80241208 03E00008 */ jr $ra -/* 8B127C 8024120C 30420002 */ andi $v0, $v0, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024119C_7EBEAC.s b/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024119C_7EBEAC.s deleted file mode 100644 index eb859083fc..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024119C_7EBEAC.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024119C_7EBEAC -/* 7EBEAC 8024119C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 7EBEB0 802411A0 AFB10014 */ sw $s1, 0x14($sp) -/* 7EBEB4 802411A4 0080882D */ daddu $s1, $a0, $zero -/* 7EBEB8 802411A8 AFBF0018 */ sw $ra, 0x18($sp) -/* 7EBEBC 802411AC AFB00010 */ sw $s0, 0x10($sp) -/* 7EBEC0 802411B0 8E30000C */ lw $s0, 0xc($s1) -/* 7EBEC4 802411B4 8E050000 */ lw $a1, ($s0) -/* 7EBEC8 802411B8 0C0B1EAF */ jal get_variable -/* 7EBECC 802411BC 26100004 */ addiu $s0, $s0, 4 -/* 7EBED0 802411C0 0220202D */ daddu $a0, $s1, $zero -/* 7EBED4 802411C4 8E050000 */ lw $a1, ($s0) -/* 7EBED8 802411C8 0C0B210B */ jal get_float_variable -/* 7EBEDC 802411CC 0040802D */ daddu $s0, $v0, $zero -/* 7EBEE0 802411D0 24020002 */ addiu $v0, $zero, 2 -/* 7EBEE4 802411D4 00501804 */ sllv $v1, $s0, $v0 -/* 7EBEE8 802411D8 00701821 */ addu $v1, $v1, $s0 -/* 7EBEEC 802411DC 00431804 */ sllv $v1, $v1, $v0 -/* 7EBEF0 802411E0 00701823 */ subu $v1, $v1, $s0 -/* 7EBEF4 802411E4 000320C0 */ sll $a0, $v1, 3 -/* 7EBEF8 802411E8 00641821 */ addu $v1, $v1, $a0 -/* 7EBEFC 802411EC 000318C0 */ sll $v1, $v1, 3 -/* 7EBF00 802411F0 3C01800B */ lui $at, 0x800b -/* 7EBF04 802411F4 00230821 */ addu $at, $at, $v1 -/* 7EBF08 802411F8 E4201D98 */ swc1 $f0, 0x1d98($at) -/* 7EBF0C 802411FC 8FBF0018 */ lw $ra, 0x18($sp) -/* 7EBF10 80241200 8FB10014 */ lw $s1, 0x14($sp) -/* 7EBF14 80241204 8FB00010 */ lw $s0, 0x10($sp) -/* 7EBF18 80241208 03E00008 */ jr $ra -/* 7EBF1C 8024120C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80241210_7EBF20.s b/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80241210_7EBF20.s deleted file mode 100644 index 7548e188d1..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80241210_7EBF20.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241210_7EBF20 -/* 7EBF20 80241210 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 7EBF24 80241214 AFB10014 */ sw $s1, 0x14($sp) -/* 7EBF28 80241218 0080882D */ daddu $s1, $a0, $zero -/* 7EBF2C 8024121C AFBF0018 */ sw $ra, 0x18($sp) -/* 7EBF30 80241220 AFB00010 */ sw $s0, 0x10($sp) -/* 7EBF34 80241224 8E30000C */ lw $s0, 0xc($s1) -/* 7EBF38 80241228 8E050000 */ lw $a1, ($s0) -/* 7EBF3C 8024122C 0C0B1EAF */ jal get_variable -/* 7EBF40 80241230 26100004 */ addiu $s0, $s0, 4 -/* 7EBF44 80241234 00021880 */ sll $v1, $v0, 2 -/* 7EBF48 80241238 00621821 */ addu $v1, $v1, $v0 -/* 7EBF4C 8024123C 00031880 */ sll $v1, $v1, 2 -/* 7EBF50 80241240 00621823 */ subu $v1, $v1, $v0 -/* 7EBF54 80241244 000310C0 */ sll $v0, $v1, 3 -/* 7EBF58 80241248 00621821 */ addu $v1, $v1, $v0 -/* 7EBF5C 8024124C 000318C0 */ sll $v1, $v1, 3 -/* 7EBF60 80241250 3C01800B */ lui $at, 0x800b -/* 7EBF64 80241254 00230821 */ addu $at, $at, $v1 -/* 7EBF68 80241258 C4221D98 */ lwc1 $f2, 0x1d98($at) -/* 7EBF6C 8024125C 3C014480 */ lui $at, 0x4480 -/* 7EBF70 80241260 44810000 */ mtc1 $at, $f0 -/* 7EBF74 80241264 00000000 */ nop -/* 7EBF78 80241268 46001082 */ mul.s $f2, $f2, $f0 -/* 7EBF7C 8024126C 00000000 */ nop -/* 7EBF80 80241270 3C01CD5B */ lui $at, 0xcd5b -/* 7EBF84 80241274 34215858 */ ori $at, $at, 0x5858 -/* 7EBF88 80241278 44810000 */ mtc1 $at, $f0 -/* 7EBF8C 8024127C 00000000 */ nop -/* 7EBF90 80241280 46001080 */ add.s $f2, $f2, $f0 -/* 7EBF94 80241284 8E050000 */ lw $a1, ($s0) -/* 7EBF98 80241288 4600110D */ trunc.w.s $f4, $f2 -/* 7EBF9C 8024128C 44062000 */ mfc1 $a2, $f4 -/* 7EBFA0 80241290 0C0B2026 */ jal set_variable -/* 7EBFA4 80241294 0220202D */ daddu $a0, $s1, $zero -/* 7EBFA8 80241298 8FBF0018 */ lw $ra, 0x18($sp) -/* 7EBFAC 8024129C 8FB10014 */ lw $s1, 0x14($sp) -/* 7EBFB0 802412A0 8FB00010 */ lw $s0, 0x10($sp) -/* 7EBFB4 802412A4 24020002 */ addiu $v0, $zero, 2 -/* 7EBFB8 802412A8 03E00008 */ jr $ra -/* 7EBFBC 802412AC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024144C_7EC15C.s b/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024144C_7EC15C.s deleted file mode 100644 index 7d0fd6b7af..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_8024144C_7EC15C.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024144C_7EC15C -/* 7EC15C 8024144C 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* 7EC160 80241450 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* 7EC164 80241454 10A00002 */ beqz $a1, .L80241460 -/* 7EC168 80241458 2402003C */ addiu $v0, $zero, 0x3c -/* 7EC16C 8024145C AC820070 */ sw $v0, 0x70($a0) -.L80241460: -/* 7EC170 80241460 C4620080 */ lwc1 $f2, 0x80($v1) -/* 7EC174 80241464 3C0141F0 */ lui $at, 0x41f0 -/* 7EC178 80241468 44810000 */ mtc1 $at, $f0 -/* 7EC17C 8024146C 00000000 */ nop -/* 7EC180 80241470 46001000 */ add.s $f0, $f2, $f0 -/* 7EC184 80241474 3C0143B4 */ lui $at, 0x43b4 -/* 7EC188 80241478 44811000 */ mtc1 $at, $f2 -/* 7EC18C 8024147C 00000000 */ nop -/* 7EC190 80241480 4600103E */ c.le.s $f2, $f0 -/* 7EC194 80241484 00000000 */ nop -/* 7EC198 80241488 45000003 */ bc1f .L80241498 -/* 7EC19C 8024148C E4600080 */ swc1 $f0, 0x80($v1) -/* 7EC1A0 80241490 46020001 */ sub.s $f0, $f0, $f2 -/* 7EC1A4 80241494 E4600080 */ swc1 $f0, 0x80($v1) -.L80241498: -/* 7EC1A8 80241498 8C820070 */ lw $v0, 0x70($a0) -/* 7EC1AC 8024149C 2442FFFF */ addiu $v0, $v0, -1 -/* 7EC1B0 802414A0 AC820070 */ sw $v0, 0x70($a0) -/* 7EC1B4 802414A4 000217C3 */ sra $v0, $v0, 0x1f -/* 7EC1B8 802414A8 03E00008 */ jr $ra -/* 7EC1BC 802414AC 30420002 */ andi $v0, $v0, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242A7C_8032FC.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242A7C_8032FC.s deleted file mode 100644 index ce062d8b5f..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242A7C_8032FC.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242A7C_8032FC -/* 8032FC 80242A7C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 803300 80242A80 AFB10014 */ sw $s1, 0x14($sp) -/* 803304 80242A84 0080882D */ daddu $s1, $a0, $zero -/* 803308 80242A88 AFBF0018 */ sw $ra, 0x18($sp) -/* 80330C 80242A8C AFB00010 */ sw $s0, 0x10($sp) -/* 803310 80242A90 8E30000C */ lw $s0, 0xc($s1) -/* 803314 80242A94 8E050000 */ lw $a1, ($s0) -/* 803318 80242A98 0C0B1EAF */ jal get_variable -/* 80331C 80242A9C 26100004 */ addiu $s0, $s0, 4 -/* 803320 80242AA0 0220202D */ daddu $a0, $s1, $zero -/* 803324 80242AA4 8E050000 */ lw $a1, ($s0) -/* 803328 80242AA8 0C0B210B */ jal get_float_variable -/* 80332C 80242AAC 0040802D */ daddu $s0, $v0, $zero -/* 803330 80242AB0 24020002 */ addiu $v0, $zero, 2 -/* 803334 80242AB4 00501804 */ sllv $v1, $s0, $v0 -/* 803338 80242AB8 00701821 */ addu $v1, $v1, $s0 -/* 80333C 80242ABC 00431804 */ sllv $v1, $v1, $v0 -/* 803340 80242AC0 00701823 */ subu $v1, $v1, $s0 -/* 803344 80242AC4 000320C0 */ sll $a0, $v1, 3 -/* 803348 80242AC8 00641821 */ addu $v1, $v1, $a0 -/* 80334C 80242ACC 000318C0 */ sll $v1, $v1, 3 -/* 803350 80242AD0 3C01800B */ lui $at, 0x800b -/* 803354 80242AD4 00230821 */ addu $at, $at, $v1 -/* 803358 80242AD8 E4201D98 */ swc1 $f0, 0x1d98($at) -/* 80335C 80242ADC 8FBF0018 */ lw $ra, 0x18($sp) -/* 803360 80242AE0 8FB10014 */ lw $s1, 0x14($sp) -/* 803364 80242AE4 8FB00010 */ lw $s0, 0x10($sp) -/* 803368 80242AE8 03E00008 */ jr $ra -/* 80336C 80242AEC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242AF0_803370.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242AF0_803370.s deleted file mode 100644 index fc08cf671d..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242AF0_803370.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242AF0_803370 -/* 803370 80242AF0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 803374 80242AF4 AFB10014 */ sw $s1, 0x14($sp) -/* 803378 80242AF8 0080882D */ daddu $s1, $a0, $zero -/* 80337C 80242AFC AFBF0018 */ sw $ra, 0x18($sp) -/* 803380 80242B00 AFB00010 */ sw $s0, 0x10($sp) -/* 803384 80242B04 8E30000C */ lw $s0, 0xc($s1) -/* 803388 80242B08 8E050000 */ lw $a1, ($s0) -/* 80338C 80242B0C 0C0B1EAF */ jal get_variable -/* 803390 80242B10 26100004 */ addiu $s0, $s0, 4 -/* 803394 80242B14 00021880 */ sll $v1, $v0, 2 -/* 803398 80242B18 00621821 */ addu $v1, $v1, $v0 -/* 80339C 80242B1C 00031880 */ sll $v1, $v1, 2 -/* 8033A0 80242B20 00621823 */ subu $v1, $v1, $v0 -/* 8033A4 80242B24 000310C0 */ sll $v0, $v1, 3 -/* 8033A8 80242B28 00621821 */ addu $v1, $v1, $v0 -/* 8033AC 80242B2C 000318C0 */ sll $v1, $v1, 3 -/* 8033B0 80242B30 3C01800B */ lui $at, 0x800b -/* 8033B4 80242B34 00230821 */ addu $at, $at, $v1 -/* 8033B8 80242B38 C4221D98 */ lwc1 $f2, 0x1d98($at) -/* 8033BC 80242B3C 3C014480 */ lui $at, 0x4480 -/* 8033C0 80242B40 44810000 */ mtc1 $at, $f0 -/* 8033C4 80242B44 00000000 */ nop -/* 8033C8 80242B48 46001082 */ mul.s $f2, $f2, $f0 -/* 8033CC 80242B4C 00000000 */ nop -/* 8033D0 80242B50 3C01CD5B */ lui $at, 0xcd5b -/* 8033D4 80242B54 34215858 */ ori $at, $at, 0x5858 -/* 8033D8 80242B58 44810000 */ mtc1 $at, $f0 -/* 8033DC 80242B5C 00000000 */ nop -/* 8033E0 80242B60 46001080 */ add.s $f2, $f2, $f0 -/* 8033E4 80242B64 8E050000 */ lw $a1, ($s0) -/* 8033E8 80242B68 4600110D */ trunc.w.s $f4, $f2 -/* 8033EC 80242B6C 44062000 */ mfc1 $a2, $f4 -/* 8033F0 80242B70 0C0B2026 */ jal set_variable -/* 8033F4 80242B74 0220202D */ daddu $a0, $s1, $zero -/* 8033F8 80242B78 8FBF0018 */ lw $ra, 0x18($sp) -/* 8033FC 80242B7C 8FB10014 */ lw $s1, 0x14($sp) -/* 803400 80242B80 8FB00010 */ lw $s0, 0x10($sp) -/* 803404 80242B84 24020002 */ addiu $v0, $zero, 2 -/* 803408 80242B88 03E00008 */ jr $ra -/* 80340C 80242B8C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242D2C_8035AC.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242D2C_8035AC.s deleted file mode 100644 index bde9819489..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_80242D2C_8035AC.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242D2C_8035AC -/* 8035AC 80242D2C 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* 8035B0 80242D30 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* 8035B4 80242D34 10A00002 */ beqz $a1, .L80242D40 -/* 8035B8 80242D38 2402003C */ addiu $v0, $zero, 0x3c -/* 8035BC 80242D3C AC820070 */ sw $v0, 0x70($a0) -.L80242D40: -/* 8035C0 80242D40 C4620080 */ lwc1 $f2, 0x80($v1) -/* 8035C4 80242D44 3C0141F0 */ lui $at, 0x41f0 -/* 8035C8 80242D48 44810000 */ mtc1 $at, $f0 -/* 8035CC 80242D4C 00000000 */ nop -/* 8035D0 80242D50 46001000 */ add.s $f0, $f2, $f0 -/* 8035D4 80242D54 3C0143B4 */ lui $at, 0x43b4 -/* 8035D8 80242D58 44811000 */ mtc1 $at, $f2 -/* 8035DC 80242D5C 00000000 */ nop -/* 8035E0 80242D60 4600103E */ c.le.s $f2, $f0 -/* 8035E4 80242D64 00000000 */ nop -/* 8035E8 80242D68 45000003 */ bc1f .L80242D78 -/* 8035EC 80242D6C E4600080 */ swc1 $f0, 0x80($v1) -/* 8035F0 80242D70 46020001 */ sub.s $f0, $f0, $f2 -/* 8035F4 80242D74 E4600080 */ swc1 $f0, 0x80($v1) -.L80242D78: -/* 8035F8 80242D78 8C820070 */ lw $v0, 0x70($a0) -/* 8035FC 80242D7C 2442FFFF */ addiu $v0, $v0, -1 -/* 803600 80242D80 AC820070 */ sw $v0, 0x70($a0) -/* 803604 80242D84 000217C3 */ sra $v0, $v0, 0x1f -/* 803608 80242D88 03E00008 */ jr $ra -/* 80360C 80242D8C 30420002 */ andi $v0, $v0, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_8024232C_8255EC.s b/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_8024232C_8255EC.s deleted file mode 100644 index 55cf81c536..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_8024232C_8255EC.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024232C_8255EC -/* 8255EC 8024232C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 8255F0 80242330 AFB10014 */ sw $s1, 0x14($sp) -/* 8255F4 80242334 0080882D */ daddu $s1, $a0, $zero -/* 8255F8 80242338 AFBF0018 */ sw $ra, 0x18($sp) -/* 8255FC 8024233C AFB00010 */ sw $s0, 0x10($sp) -/* 825600 80242340 8E30000C */ lw $s0, 0xc($s1) -/* 825604 80242344 8E050000 */ lw $a1, ($s0) -/* 825608 80242348 0C0B1EAF */ jal get_variable -/* 82560C 8024234C 26100004 */ addiu $s0, $s0, 4 -/* 825610 80242350 0220202D */ daddu $a0, $s1, $zero -/* 825614 80242354 8E050000 */ lw $a1, ($s0) -/* 825618 80242358 0C0B210B */ jal get_float_variable -/* 82561C 8024235C 0040802D */ daddu $s0, $v0, $zero -/* 825620 80242360 24020002 */ addiu $v0, $zero, 2 -/* 825624 80242364 00501804 */ sllv $v1, $s0, $v0 -/* 825628 80242368 00701821 */ addu $v1, $v1, $s0 -/* 82562C 8024236C 00431804 */ sllv $v1, $v1, $v0 -/* 825630 80242370 00701823 */ subu $v1, $v1, $s0 -/* 825634 80242374 000320C0 */ sll $a0, $v1, 3 -/* 825638 80242378 00641821 */ addu $v1, $v1, $a0 -/* 82563C 8024237C 000318C0 */ sll $v1, $v1, 3 -/* 825640 80242380 3C01800B */ lui $at, 0x800b -/* 825644 80242384 00230821 */ addu $at, $at, $v1 -/* 825648 80242388 E4201D98 */ swc1 $f0, 0x1d98($at) -/* 82564C 8024238C 8FBF0018 */ lw $ra, 0x18($sp) -/* 825650 80242390 8FB10014 */ lw $s1, 0x14($sp) -/* 825654 80242394 8FB00010 */ lw $s0, 0x10($sp) -/* 825658 80242398 03E00008 */ jr $ra -/* 82565C 8024239C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802423A0_825660.s b/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802423A0_825660.s deleted file mode 100644 index 2c32392843..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802423A0_825660.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802423A0_825660 -/* 825660 802423A0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 825664 802423A4 AFB10014 */ sw $s1, 0x14($sp) -/* 825668 802423A8 0080882D */ daddu $s1, $a0, $zero -/* 82566C 802423AC AFBF0018 */ sw $ra, 0x18($sp) -/* 825670 802423B0 AFB00010 */ sw $s0, 0x10($sp) -/* 825674 802423B4 8E30000C */ lw $s0, 0xc($s1) -/* 825678 802423B8 8E050000 */ lw $a1, ($s0) -/* 82567C 802423BC 0C0B1EAF */ jal get_variable -/* 825680 802423C0 26100004 */ addiu $s0, $s0, 4 -/* 825684 802423C4 00021880 */ sll $v1, $v0, 2 -/* 825688 802423C8 00621821 */ addu $v1, $v1, $v0 -/* 82568C 802423CC 00031880 */ sll $v1, $v1, 2 -/* 825690 802423D0 00621823 */ subu $v1, $v1, $v0 -/* 825694 802423D4 000310C0 */ sll $v0, $v1, 3 -/* 825698 802423D8 00621821 */ addu $v1, $v1, $v0 -/* 82569C 802423DC 000318C0 */ sll $v1, $v1, 3 -/* 8256A0 802423E0 3C01800B */ lui $at, 0x800b -/* 8256A4 802423E4 00230821 */ addu $at, $at, $v1 -/* 8256A8 802423E8 C4221D98 */ lwc1 $f2, 0x1d98($at) -/* 8256AC 802423EC 3C014480 */ lui $at, 0x4480 -/* 8256B0 802423F0 44810000 */ mtc1 $at, $f0 -/* 8256B4 802423F4 00000000 */ nop -/* 8256B8 802423F8 46001082 */ mul.s $f2, $f2, $f0 -/* 8256BC 802423FC 00000000 */ nop -/* 8256C0 80242400 3C01CD5B */ lui $at, 0xcd5b -/* 8256C4 80242404 34215858 */ ori $at, $at, 0x5858 -/* 8256C8 80242408 44810000 */ mtc1 $at, $f0 -/* 8256CC 8024240C 00000000 */ nop -/* 8256D0 80242410 46001080 */ add.s $f2, $f2, $f0 -/* 8256D4 80242414 8E050000 */ lw $a1, ($s0) -/* 8256D8 80242418 4600110D */ trunc.w.s $f4, $f2 -/* 8256DC 8024241C 44062000 */ mfc1 $a2, $f4 -/* 8256E0 80242420 0C0B2026 */ jal set_variable -/* 8256E4 80242424 0220202D */ daddu $a0, $s1, $zero -/* 8256E8 80242428 8FBF0018 */ lw $ra, 0x18($sp) -/* 8256EC 8024242C 8FB10014 */ lw $s1, 0x14($sp) -/* 8256F0 80242430 8FB00010 */ lw $s0, 0x10($sp) -/* 8256F4 80242434 24020002 */ addiu $v0, $zero, 2 -/* 8256F8 80242438 03E00008 */ jr $ra -/* 8256FC 8024243C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802425DC_82589C.s b/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802425DC_82589C.s deleted file mode 100644 index 3f8c3cae87..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_02/823BF0/func_802425DC_82589C.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802425DC_82589C -/* 82589C 802425DC 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* 8258A0 802425E0 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* 8258A4 802425E4 10A00002 */ beqz $a1, .L802425F0 -/* 8258A8 802425E8 2402003C */ addiu $v0, $zero, 0x3c -/* 8258AC 802425EC AC820070 */ sw $v0, 0x70($a0) -.L802425F0: -/* 8258B0 802425F0 C4620080 */ lwc1 $f2, 0x80($v1) -/* 8258B4 802425F4 3C0141F0 */ lui $at, 0x41f0 -/* 8258B8 802425F8 44810000 */ mtc1 $at, $f0 -/* 8258BC 802425FC 00000000 */ nop -/* 8258C0 80242600 46001000 */ add.s $f0, $f2, $f0 -/* 8258C4 80242604 3C0143B4 */ lui $at, 0x43b4 -/* 8258C8 80242608 44811000 */ mtc1 $at, $f2 -/* 8258CC 8024260C 00000000 */ nop -/* 8258D0 80242610 4600103E */ c.le.s $f2, $f0 -/* 8258D4 80242614 00000000 */ nop -/* 8258D8 80242618 45000003 */ bc1f .L80242628 -/* 8258DC 8024261C E4600080 */ swc1 $f0, 0x80($v1) -/* 8258E0 80242620 46020001 */ sub.s $f0, $f0, $f2 -/* 8258E4 80242624 E4600080 */ swc1 $f0, 0x80($v1) -.L80242628: -/* 8258E8 80242628 8C820070 */ lw $v0, 0x70($a0) -/* 8258EC 8024262C 2442FFFF */ addiu $v0, $v0, -1 -/* 8258F0 80242630 AC820070 */ sw $v0, 0x70($a0) -/* 8258F4 80242634 000217C3 */ sra $v0, $v0, 0x1f -/* 8258F8 80242638 03E00008 */ jr $ra -/* 8258FC 8024263C 30420002 */ andi $v0, $v0, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_8024101C_83281C.s b/asm/nonmatchings/world/area_mac/mac_03/831B20/func_8024101C_83281C.s deleted file mode 100644 index 3a04e9fd08..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_8024101C_83281C.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024101C_83281C -/* 83281C 8024101C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 832820 80241020 AFB10014 */ sw $s1, 0x14($sp) -/* 832824 80241024 0080882D */ daddu $s1, $a0, $zero -/* 832828 80241028 AFBF0018 */ sw $ra, 0x18($sp) -/* 83282C 8024102C AFB00010 */ sw $s0, 0x10($sp) -/* 832830 80241030 8E30000C */ lw $s0, 0xc($s1) -/* 832834 80241034 8E050000 */ lw $a1, ($s0) -/* 832838 80241038 0C0B1EAF */ jal get_variable -/* 83283C 8024103C 26100004 */ addiu $s0, $s0, 4 -/* 832840 80241040 0220202D */ daddu $a0, $s1, $zero -/* 832844 80241044 8E050000 */ lw $a1, ($s0) -/* 832848 80241048 0C0B210B */ jal get_float_variable -/* 83284C 8024104C 0040802D */ daddu $s0, $v0, $zero -/* 832850 80241050 24020002 */ addiu $v0, $zero, 2 -/* 832854 80241054 00501804 */ sllv $v1, $s0, $v0 -/* 832858 80241058 00701821 */ addu $v1, $v1, $s0 -/* 83285C 8024105C 00431804 */ sllv $v1, $v1, $v0 -/* 832860 80241060 00701823 */ subu $v1, $v1, $s0 -/* 832864 80241064 000320C0 */ sll $a0, $v1, 3 -/* 832868 80241068 00641821 */ addu $v1, $v1, $a0 -/* 83286C 8024106C 000318C0 */ sll $v1, $v1, 3 -/* 832870 80241070 3C01800B */ lui $at, 0x800b -/* 832874 80241074 00230821 */ addu $at, $at, $v1 -/* 832878 80241078 E4201D98 */ swc1 $f0, 0x1d98($at) -/* 83287C 8024107C 8FBF0018 */ lw $ra, 0x18($sp) -/* 832880 80241080 8FB10014 */ lw $s1, 0x14($sp) -/* 832884 80241084 8FB00010 */ lw $s0, 0x10($sp) -/* 832888 80241088 03E00008 */ jr $ra -/* 83288C 8024108C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_80241090_832890.s b/asm/nonmatchings/world/area_mac/mac_03/831B20/func_80241090_832890.s deleted file mode 100644 index 80edc7ca7c..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_80241090_832890.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241090_832890 -/* 832890 80241090 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 832894 80241094 AFB10014 */ sw $s1, 0x14($sp) -/* 832898 80241098 0080882D */ daddu $s1, $a0, $zero -/* 83289C 8024109C AFBF0018 */ sw $ra, 0x18($sp) -/* 8328A0 802410A0 AFB00010 */ sw $s0, 0x10($sp) -/* 8328A4 802410A4 8E30000C */ lw $s0, 0xc($s1) -/* 8328A8 802410A8 8E050000 */ lw $a1, ($s0) -/* 8328AC 802410AC 0C0B1EAF */ jal get_variable -/* 8328B0 802410B0 26100004 */ addiu $s0, $s0, 4 -/* 8328B4 802410B4 00021880 */ sll $v1, $v0, 2 -/* 8328B8 802410B8 00621821 */ addu $v1, $v1, $v0 -/* 8328BC 802410BC 00031880 */ sll $v1, $v1, 2 -/* 8328C0 802410C0 00621823 */ subu $v1, $v1, $v0 -/* 8328C4 802410C4 000310C0 */ sll $v0, $v1, 3 -/* 8328C8 802410C8 00621821 */ addu $v1, $v1, $v0 -/* 8328CC 802410CC 000318C0 */ sll $v1, $v1, 3 -/* 8328D0 802410D0 3C01800B */ lui $at, 0x800b -/* 8328D4 802410D4 00230821 */ addu $at, $at, $v1 -/* 8328D8 802410D8 C4221D98 */ lwc1 $f2, 0x1d98($at) -/* 8328DC 802410DC 3C014480 */ lui $at, 0x4480 -/* 8328E0 802410E0 44810000 */ mtc1 $at, $f0 -/* 8328E4 802410E4 00000000 */ nop -/* 8328E8 802410E8 46001082 */ mul.s $f2, $f2, $f0 -/* 8328EC 802410EC 00000000 */ nop -/* 8328F0 802410F0 3C01CD5B */ lui $at, 0xcd5b -/* 8328F4 802410F4 34215858 */ ori $at, $at, 0x5858 -/* 8328F8 802410F8 44810000 */ mtc1 $at, $f0 -/* 8328FC 802410FC 00000000 */ nop -/* 832900 80241100 46001080 */ add.s $f2, $f2, $f0 -/* 832904 80241104 8E050000 */ lw $a1, ($s0) -/* 832908 80241108 4600110D */ trunc.w.s $f4, $f2 -/* 83290C 8024110C 44062000 */ mfc1 $a2, $f4 -/* 832910 80241110 0C0B2026 */ jal set_variable -/* 832914 80241114 0220202D */ daddu $a0, $s1, $zero -/* 832918 80241118 8FBF0018 */ lw $ra, 0x18($sp) -/* 83291C 8024111C 8FB10014 */ lw $s1, 0x14($sp) -/* 832920 80241120 8FB00010 */ lw $s0, 0x10($sp) -/* 832924 80241124 24020002 */ addiu $v0, $zero, 2 -/* 832928 80241128 03E00008 */ jr $ra -/* 83292C 8024112C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_802412CC_832ACC.s b/asm/nonmatchings/world/area_mac/mac_03/831B20/func_802412CC_832ACC.s deleted file mode 100644 index 57be333cb8..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_03/831B20/func_802412CC_832ACC.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802412CC_832ACC -/* 832ACC 802412CC 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* 832AD0 802412D0 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* 832AD4 802412D4 10A00002 */ beqz $a1, .L802412E0 -/* 832AD8 802412D8 2402003C */ addiu $v0, $zero, 0x3c -/* 832ADC 802412DC AC820070 */ sw $v0, 0x70($a0) -.L802412E0: -/* 832AE0 802412E0 C4620080 */ lwc1 $f2, 0x80($v1) -/* 832AE4 802412E4 3C0141F0 */ lui $at, 0x41f0 -/* 832AE8 802412E8 44810000 */ mtc1 $at, $f0 -/* 832AEC 802412EC 00000000 */ nop -/* 832AF0 802412F0 46001000 */ add.s $f0, $f2, $f0 -/* 832AF4 802412F4 3C0143B4 */ lui $at, 0x43b4 -/* 832AF8 802412F8 44811000 */ mtc1 $at, $f2 -/* 832AFC 802412FC 00000000 */ nop -/* 832B00 80241300 4600103E */ c.le.s $f2, $f0 -/* 832B04 80241304 00000000 */ nop -/* 832B08 80241308 45000003 */ bc1f .L80241318 -/* 832B0C 8024130C E4600080 */ swc1 $f0, 0x80($v1) -/* 832B10 80241310 46020001 */ sub.s $f0, $f0, $f2 -/* 832B14 80241314 E4600080 */ swc1 $f0, 0x80($v1) -.L80241318: -/* 832B18 80241318 8C820070 */ lw $v0, 0x70($a0) -/* 832B1C 8024131C 2442FFFF */ addiu $v0, $v0, -1 -/* 832B20 80241320 AC820070 */ sw $v0, 0x70($a0) -/* 832B24 80241324 000217C3 */ sra $v0, $v0, 0x1f -/* 832B28 80241328 03E00008 */ jr $ra -/* 832B2C 8024132C 30420002 */ andi $v0, $v0, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_04/843030/func_80240FCC_843B9C.s b/asm/nonmatchings/world/area_mac/mac_04/843030/func_80240FCC_843B9C.s deleted file mode 100644 index c6b64fd369..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_04/843030/func_80240FCC_843B9C.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240FCC_843B9C -/* 843B9C 80240FCC 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 843BA0 80240FD0 AFB10014 */ sw $s1, 0x14($sp) -/* 843BA4 80240FD4 0080882D */ daddu $s1, $a0, $zero -/* 843BA8 80240FD8 AFBF0018 */ sw $ra, 0x18($sp) -/* 843BAC 80240FDC AFB00010 */ sw $s0, 0x10($sp) -/* 843BB0 80240FE0 8E30000C */ lw $s0, 0xc($s1) -/* 843BB4 80240FE4 8E050000 */ lw $a1, ($s0) -/* 843BB8 80240FE8 0C0B1EAF */ jal get_variable -/* 843BBC 80240FEC 26100004 */ addiu $s0, $s0, 4 -/* 843BC0 80240FF0 0220202D */ daddu $a0, $s1, $zero -/* 843BC4 80240FF4 8E050000 */ lw $a1, ($s0) -/* 843BC8 80240FF8 0C0B210B */ jal get_float_variable -/* 843BCC 80240FFC 0040802D */ daddu $s0, $v0, $zero -/* 843BD0 80241000 24020002 */ addiu $v0, $zero, 2 -/* 843BD4 80241004 00501804 */ sllv $v1, $s0, $v0 -/* 843BD8 80241008 00701821 */ addu $v1, $v1, $s0 -/* 843BDC 8024100C 00431804 */ sllv $v1, $v1, $v0 -/* 843BE0 80241010 00701823 */ subu $v1, $v1, $s0 -/* 843BE4 80241014 000320C0 */ sll $a0, $v1, 3 -/* 843BE8 80241018 00641821 */ addu $v1, $v1, $a0 -/* 843BEC 8024101C 000318C0 */ sll $v1, $v1, 3 -/* 843BF0 80241020 3C01800B */ lui $at, 0x800b -/* 843BF4 80241024 00230821 */ addu $at, $at, $v1 -/* 843BF8 80241028 E4201D98 */ swc1 $f0, 0x1d98($at) -/* 843BFC 8024102C 8FBF0018 */ lw $ra, 0x18($sp) -/* 843C00 80241030 8FB10014 */ lw $s1, 0x14($sp) -/* 843C04 80241034 8FB00010 */ lw $s0, 0x10($sp) -/* 843C08 80241038 03E00008 */ jr $ra -/* 843C0C 8024103C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_04/843030/func_80241040_843C10.s b/asm/nonmatchings/world/area_mac/mac_04/843030/func_80241040_843C10.s deleted file mode 100644 index be23cbb05e..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_04/843030/func_80241040_843C10.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241040_843C10 -/* 843C10 80241040 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 843C14 80241044 AFB10014 */ sw $s1, 0x14($sp) -/* 843C18 80241048 0080882D */ daddu $s1, $a0, $zero -/* 843C1C 8024104C AFBF0018 */ sw $ra, 0x18($sp) -/* 843C20 80241050 AFB00010 */ sw $s0, 0x10($sp) -/* 843C24 80241054 8E30000C */ lw $s0, 0xc($s1) -/* 843C28 80241058 8E050000 */ lw $a1, ($s0) -/* 843C2C 8024105C 0C0B1EAF */ jal get_variable -/* 843C30 80241060 26100004 */ addiu $s0, $s0, 4 -/* 843C34 80241064 00021880 */ sll $v1, $v0, 2 -/* 843C38 80241068 00621821 */ addu $v1, $v1, $v0 -/* 843C3C 8024106C 00031880 */ sll $v1, $v1, 2 -/* 843C40 80241070 00621823 */ subu $v1, $v1, $v0 -/* 843C44 80241074 000310C0 */ sll $v0, $v1, 3 -/* 843C48 80241078 00621821 */ addu $v1, $v1, $v0 -/* 843C4C 8024107C 000318C0 */ sll $v1, $v1, 3 -/* 843C50 80241080 3C01800B */ lui $at, 0x800b -/* 843C54 80241084 00230821 */ addu $at, $at, $v1 -/* 843C58 80241088 C4221D98 */ lwc1 $f2, 0x1d98($at) -/* 843C5C 8024108C 3C014480 */ lui $at, 0x4480 -/* 843C60 80241090 44810000 */ mtc1 $at, $f0 -/* 843C64 80241094 00000000 */ nop -/* 843C68 80241098 46001082 */ mul.s $f2, $f2, $f0 -/* 843C6C 8024109C 00000000 */ nop -/* 843C70 802410A0 3C01CD5B */ lui $at, 0xcd5b -/* 843C74 802410A4 34215858 */ ori $at, $at, 0x5858 -/* 843C78 802410A8 44810000 */ mtc1 $at, $f0 -/* 843C7C 802410AC 00000000 */ nop -/* 843C80 802410B0 46001080 */ add.s $f2, $f2, $f0 -/* 843C84 802410B4 8E050000 */ lw $a1, ($s0) -/* 843C88 802410B8 4600110D */ trunc.w.s $f4, $f2 -/* 843C8C 802410BC 44062000 */ mfc1 $a2, $f4 -/* 843C90 802410C0 0C0B2026 */ jal set_variable -/* 843C94 802410C4 0220202D */ daddu $a0, $s1, $zero -/* 843C98 802410C8 8FBF0018 */ lw $ra, 0x18($sp) -/* 843C9C 802410CC 8FB10014 */ lw $s1, 0x14($sp) -/* 843CA0 802410D0 8FB00010 */ lw $s0, 0x10($sp) -/* 843CA4 802410D4 24020002 */ addiu $v0, $zero, 2 -/* 843CA8 802410D8 03E00008 */ jr $ra -/* 843CAC 802410DC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_04/843030/func_8024127C_843E4C.s b/asm/nonmatchings/world/area_mac/mac_04/843030/func_8024127C_843E4C.s deleted file mode 100644 index 8d546c52ff..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_04/843030/func_8024127C_843E4C.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024127C_843E4C -/* 843E4C 8024127C 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* 843E50 80241280 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* 843E54 80241284 10A00002 */ beqz $a1, .L80241290 -/* 843E58 80241288 2402003C */ addiu $v0, $zero, 0x3c -/* 843E5C 8024128C AC820070 */ sw $v0, 0x70($a0) -.L80241290: -/* 843E60 80241290 C4620080 */ lwc1 $f2, 0x80($v1) -/* 843E64 80241294 3C0141F0 */ lui $at, 0x41f0 -/* 843E68 80241298 44810000 */ mtc1 $at, $f0 -/* 843E6C 8024129C 00000000 */ nop -/* 843E70 802412A0 46001000 */ add.s $f0, $f2, $f0 -/* 843E74 802412A4 3C0143B4 */ lui $at, 0x43b4 -/* 843E78 802412A8 44811000 */ mtc1 $at, $f2 -/* 843E7C 802412AC 00000000 */ nop -/* 843E80 802412B0 4600103E */ c.le.s $f2, $f0 -/* 843E84 802412B4 00000000 */ nop -/* 843E88 802412B8 45000003 */ bc1f .L802412C8 -/* 843E8C 802412BC E4600080 */ swc1 $f0, 0x80($v1) -/* 843E90 802412C0 46020001 */ sub.s $f0, $f0, $f2 -/* 843E94 802412C4 E4600080 */ swc1 $f0, 0x80($v1) -.L802412C8: -/* 843E98 802412C8 8C820070 */ lw $v0, 0x70($a0) -/* 843E9C 802412CC 2442FFFF */ addiu $v0, $v0, -1 -/* 843EA0 802412D0 AC820070 */ sw $v0, 0x70($a0) -/* 843EA4 802412D4 000217C3 */ sra $v0, $v0, 0x1f -/* 843EA8 802412D8 03E00008 */ jr $ra -/* 843EAC 802412DC 30420002 */ andi $v0, $v0, 2 diff --git a/asm/nonmatchings/world/area_mac/mac_05/852170/func_80241E8C_853FFC.s b/asm/nonmatchings/world/area_mac/mac_05/852170/func_80241E8C_853FFC.s deleted file mode 100644 index 20106558e2..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_05/852170/func_80241E8C_853FFC.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241E8C_853FFC -/* 853FFC 80241E8C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 854000 80241E90 AFB10014 */ sw $s1, 0x14($sp) -/* 854004 80241E94 0080882D */ daddu $s1, $a0, $zero -/* 854008 80241E98 AFBF0018 */ sw $ra, 0x18($sp) -/* 85400C 80241E9C AFB00010 */ sw $s0, 0x10($sp) -/* 854010 80241EA0 8E30000C */ lw $s0, 0xc($s1) -/* 854014 80241EA4 8E050000 */ lw $a1, ($s0) -/* 854018 80241EA8 0C0B1EAF */ jal get_variable -/* 85401C 80241EAC 26100004 */ addiu $s0, $s0, 4 -/* 854020 80241EB0 0220202D */ daddu $a0, $s1, $zero -/* 854024 80241EB4 8E050000 */ lw $a1, ($s0) -/* 854028 80241EB8 0C0B210B */ jal get_float_variable -/* 85402C 80241EBC 0040802D */ daddu $s0, $v0, $zero -/* 854030 80241EC0 24020002 */ addiu $v0, $zero, 2 -/* 854034 80241EC4 00501804 */ sllv $v1, $s0, $v0 -/* 854038 80241EC8 00701821 */ addu $v1, $v1, $s0 -/* 85403C 80241ECC 00431804 */ sllv $v1, $v1, $v0 -/* 854040 80241ED0 00701823 */ subu $v1, $v1, $s0 -/* 854044 80241ED4 000320C0 */ sll $a0, $v1, 3 -/* 854048 80241ED8 00641821 */ addu $v1, $v1, $a0 -/* 85404C 80241EDC 000318C0 */ sll $v1, $v1, 3 -/* 854050 80241EE0 3C01800B */ lui $at, 0x800b -/* 854054 80241EE4 00230821 */ addu $at, $at, $v1 -/* 854058 80241EE8 E4201D98 */ swc1 $f0, 0x1d98($at) -/* 85405C 80241EEC 8FBF0018 */ lw $ra, 0x18($sp) -/* 854060 80241EF0 8FB10014 */ lw $s1, 0x14($sp) -/* 854064 80241EF4 8FB00010 */ lw $s0, 0x10($sp) -/* 854068 80241EF8 03E00008 */ jr $ra -/* 85406C 80241EFC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_05/852170/func_80241F00_854070.s b/asm/nonmatchings/world/area_mac/mac_05/852170/func_80241F00_854070.s deleted file mode 100644 index d757ecc223..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_05/852170/func_80241F00_854070.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241F00_854070 -/* 854070 80241F00 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 854074 80241F04 AFB10014 */ sw $s1, 0x14($sp) -/* 854078 80241F08 0080882D */ daddu $s1, $a0, $zero -/* 85407C 80241F0C AFBF0018 */ sw $ra, 0x18($sp) -/* 854080 80241F10 AFB00010 */ sw $s0, 0x10($sp) -/* 854084 80241F14 8E30000C */ lw $s0, 0xc($s1) -/* 854088 80241F18 8E050000 */ lw $a1, ($s0) -/* 85408C 80241F1C 0C0B1EAF */ jal get_variable -/* 854090 80241F20 26100004 */ addiu $s0, $s0, 4 -/* 854094 80241F24 00021880 */ sll $v1, $v0, 2 -/* 854098 80241F28 00621821 */ addu $v1, $v1, $v0 -/* 85409C 80241F2C 00031880 */ sll $v1, $v1, 2 -/* 8540A0 80241F30 00621823 */ subu $v1, $v1, $v0 -/* 8540A4 80241F34 000310C0 */ sll $v0, $v1, 3 -/* 8540A8 80241F38 00621821 */ addu $v1, $v1, $v0 -/* 8540AC 80241F3C 000318C0 */ sll $v1, $v1, 3 -/* 8540B0 80241F40 3C01800B */ lui $at, 0x800b -/* 8540B4 80241F44 00230821 */ addu $at, $at, $v1 -/* 8540B8 80241F48 C4221D98 */ lwc1 $f2, 0x1d98($at) -/* 8540BC 80241F4C 3C014480 */ lui $at, 0x4480 -/* 8540C0 80241F50 44810000 */ mtc1 $at, $f0 -/* 8540C4 80241F54 00000000 */ nop -/* 8540C8 80241F58 46001082 */ mul.s $f2, $f2, $f0 -/* 8540CC 80241F5C 00000000 */ nop -/* 8540D0 80241F60 3C01CD5B */ lui $at, 0xcd5b -/* 8540D4 80241F64 34215858 */ ori $at, $at, 0x5858 -/* 8540D8 80241F68 44810000 */ mtc1 $at, $f0 -/* 8540DC 80241F6C 00000000 */ nop -/* 8540E0 80241F70 46001080 */ add.s $f2, $f2, $f0 -/* 8540E4 80241F74 8E050000 */ lw $a1, ($s0) -/* 8540E8 80241F78 4600110D */ trunc.w.s $f4, $f2 -/* 8540EC 80241F7C 44062000 */ mfc1 $a2, $f4 -/* 8540F0 80241F80 0C0B2026 */ jal set_variable -/* 8540F4 80241F84 0220202D */ daddu $a0, $s1, $zero -/* 8540F8 80241F88 8FBF0018 */ lw $ra, 0x18($sp) -/* 8540FC 80241F8C 8FB10014 */ lw $s1, 0x14($sp) -/* 854100 80241F90 8FB00010 */ lw $s0, 0x10($sp) -/* 854104 80241F94 24020002 */ addiu $v0, $zero, 2 -/* 854108 80241F98 03E00008 */ jr $ra -/* 85410C 80241F9C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_mac/mac_05/852170/func_8024213C_8542AC.s b/asm/nonmatchings/world/area_mac/mac_05/852170/func_8024213C_8542AC.s deleted file mode 100644 index bca1515ff1..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_05/852170/func_8024213C_8542AC.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024213C_8542AC -/* 8542AC 8024213C 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* 8542B0 80242140 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* 8542B4 80242144 10A00002 */ beqz $a1, .L80242150 -/* 8542B8 80242148 2402003C */ addiu $v0, $zero, 0x3c -/* 8542BC 8024214C AC820070 */ sw $v0, 0x70($a0) -.L80242150: -/* 8542C0 80242150 C4620080 */ lwc1 $f2, 0x80($v1) -/* 8542C4 80242154 3C0141F0 */ lui $at, 0x41f0 -/* 8542C8 80242158 44810000 */ mtc1 $at, $f0 -/* 8542CC 8024215C 00000000 */ nop -/* 8542D0 80242160 46001000 */ add.s $f0, $f2, $f0 -/* 8542D4 80242164 3C0143B4 */ lui $at, 0x43b4 -/* 8542D8 80242168 44811000 */ mtc1 $at, $f2 -/* 8542DC 8024216C 00000000 */ nop -/* 8542E0 80242170 4600103E */ c.le.s $f2, $f0 -/* 8542E4 80242174 00000000 */ nop -/* 8542E8 80242178 45000003 */ bc1f .L80242188 -/* 8542EC 8024217C E4600080 */ swc1 $f0, 0x80($v1) -/* 8542F0 80242180 46020001 */ sub.s $f0, $f0, $f2 -/* 8542F4 80242184 E4600080 */ swc1 $f0, 0x80($v1) -.L80242188: -/* 8542F8 80242188 8C820070 */ lw $v0, 0x70($a0) -/* 8542FC 8024218C 2442FFFF */ addiu $v0, $v0, -1 -/* 854300 80242190 AC820070 */ sw $v0, 0x70($a0) -/* 854304 80242194 000217C3 */ sra $v0, $v0, 0x1f -/* 854308 80242198 03E00008 */ jr $ra -/* 85430C 8024219C 30420002 */ andi $v0, $v0, 2 diff --git a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_802418D4_9C6CB4.s b/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_802418D4_9C6CB4.s deleted file mode 100644 index 295e73c133..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_802418D4_9C6CB4.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802418D4_9C6CB4 -/* 9C6CB4 802418D4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 9C6CB8 802418D8 AFB10014 */ sw $s1, 0x14($sp) -/* 9C6CBC 802418DC 0080882D */ daddu $s1, $a0, $zero -/* 9C6CC0 802418E0 AFBF0018 */ sw $ra, 0x18($sp) -/* 9C6CC4 802418E4 AFB00010 */ sw $s0, 0x10($sp) -/* 9C6CC8 802418E8 8E30000C */ lw $s0, 0xc($s1) -/* 9C6CCC 802418EC 8E050000 */ lw $a1, ($s0) -/* 9C6CD0 802418F0 0C0B1EAF */ jal get_variable -/* 9C6CD4 802418F4 26100004 */ addiu $s0, $s0, 4 -/* 9C6CD8 802418F8 0220202D */ daddu $a0, $s1, $zero -/* 9C6CDC 802418FC 8E050000 */ lw $a1, ($s0) -/* 9C6CE0 80241900 0C0B210B */ jal get_float_variable -/* 9C6CE4 80241904 0040802D */ daddu $s0, $v0, $zero -/* 9C6CE8 80241908 24020002 */ addiu $v0, $zero, 2 -/* 9C6CEC 8024190C 00501804 */ sllv $v1, $s0, $v0 -/* 9C6CF0 80241910 00701821 */ addu $v1, $v1, $s0 -/* 9C6CF4 80241914 00431804 */ sllv $v1, $v1, $v0 -/* 9C6CF8 80241918 00701823 */ subu $v1, $v1, $s0 -/* 9C6CFC 8024191C 000320C0 */ sll $a0, $v1, 3 -/* 9C6D00 80241920 00641821 */ addu $v1, $v1, $a0 -/* 9C6D04 80241924 000318C0 */ sll $v1, $v1, 3 -/* 9C6D08 80241928 3C01800B */ lui $at, 0x800b -/* 9C6D0C 8024192C 00230821 */ addu $at, $at, $v1 -/* 9C6D10 80241930 E4201D98 */ swc1 $f0, 0x1d98($at) -/* 9C6D14 80241934 8FBF0018 */ lw $ra, 0x18($sp) -/* 9C6D18 80241938 8FB10014 */ lw $s1, 0x14($sp) -/* 9C6D1C 8024193C 8FB00010 */ lw $s0, 0x10($sp) -/* 9C6D20 80241940 03E00008 */ jr $ra -/* 9C6D24 80241944 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241948_9C6D28.s b/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241948_9C6D28.s deleted file mode 100644 index e693a7580c..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241948_9C6D28.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241948_9C6D28 -/* 9C6D28 80241948 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 9C6D2C 8024194C AFB10014 */ sw $s1, 0x14($sp) -/* 9C6D30 80241950 0080882D */ daddu $s1, $a0, $zero -/* 9C6D34 80241954 AFBF0018 */ sw $ra, 0x18($sp) -/* 9C6D38 80241958 AFB00010 */ sw $s0, 0x10($sp) -/* 9C6D3C 8024195C 8E30000C */ lw $s0, 0xc($s1) -/* 9C6D40 80241960 8E050000 */ lw $a1, ($s0) -/* 9C6D44 80241964 0C0B1EAF */ jal get_variable -/* 9C6D48 80241968 26100004 */ addiu $s0, $s0, 4 -/* 9C6D4C 8024196C 00021880 */ sll $v1, $v0, 2 -/* 9C6D50 80241970 00621821 */ addu $v1, $v1, $v0 -/* 9C6D54 80241974 00031880 */ sll $v1, $v1, 2 -/* 9C6D58 80241978 00621823 */ subu $v1, $v1, $v0 -/* 9C6D5C 8024197C 000310C0 */ sll $v0, $v1, 3 -/* 9C6D60 80241980 00621821 */ addu $v1, $v1, $v0 -/* 9C6D64 80241984 000318C0 */ sll $v1, $v1, 3 -/* 9C6D68 80241988 3C01800B */ lui $at, 0x800b -/* 9C6D6C 8024198C 00230821 */ addu $at, $at, $v1 -/* 9C6D70 80241990 C4221D98 */ lwc1 $f2, 0x1d98($at) -/* 9C6D74 80241994 3C014480 */ lui $at, 0x4480 -/* 9C6D78 80241998 44810000 */ mtc1 $at, $f0 -/* 9C6D7C 8024199C 00000000 */ nop -/* 9C6D80 802419A0 46001082 */ mul.s $f2, $f2, $f0 -/* 9C6D84 802419A4 00000000 */ nop -/* 9C6D88 802419A8 3C01CD5B */ lui $at, 0xcd5b -/* 9C6D8C 802419AC 34215858 */ ori $at, $at, 0x5858 -/* 9C6D90 802419B0 44810000 */ mtc1 $at, $f0 -/* 9C6D94 802419B4 00000000 */ nop -/* 9C6D98 802419B8 46001080 */ add.s $f2, $f2, $f0 -/* 9C6D9C 802419BC 8E050000 */ lw $a1, ($s0) -/* 9C6DA0 802419C0 4600110D */ trunc.w.s $f4, $f2 -/* 9C6DA4 802419C4 44062000 */ mfc1 $a2, $f4 -/* 9C6DA8 802419C8 0C0B2026 */ jal set_variable -/* 9C6DAC 802419CC 0220202D */ daddu $a0, $s1, $zero -/* 9C6DB0 802419D0 8FBF0018 */ lw $ra, 0x18($sp) -/* 9C6DB4 802419D4 8FB10014 */ lw $s1, 0x14($sp) -/* 9C6DB8 802419D8 8FB00010 */ lw $s0, 0x10($sp) -/* 9C6DBC 802419DC 24020002 */ addiu $v0, $zero, 2 -/* 9C6DC0 802419E0 03E00008 */ jr $ra -/* 9C6DC4 802419E4 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241B84_9C6F64.s b/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241B84_9C6F64.s deleted file mode 100644 index e2b0f233ea..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_01/9C53E0/func_80241B84_9C6F64.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241B84_9C6F64 -/* 9C6F64 80241B84 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* 9C6F68 80241B88 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* 9C6F6C 80241B8C 10A00002 */ beqz $a1, .L80241B98 -/* 9C6F70 80241B90 2402003C */ addiu $v0, $zero, 0x3c -/* 9C6F74 80241B94 AC820070 */ sw $v0, 0x70($a0) -.L80241B98: -/* 9C6F78 80241B98 C4620080 */ lwc1 $f2, 0x80($v1) -/* 9C6F7C 80241B9C 3C0141F0 */ lui $at, 0x41f0 -/* 9C6F80 80241BA0 44810000 */ mtc1 $at, $f0 -/* 9C6F84 80241BA4 00000000 */ nop -/* 9C6F88 80241BA8 46001000 */ add.s $f0, $f2, $f0 -/* 9C6F8C 80241BAC 3C0143B4 */ lui $at, 0x43b4 -/* 9C6F90 80241BB0 44811000 */ mtc1 $at, $f2 -/* 9C6F94 80241BB4 00000000 */ nop -/* 9C6F98 80241BB8 4600103E */ c.le.s $f2, $f0 -/* 9C6F9C 80241BBC 00000000 */ nop -/* 9C6FA0 80241BC0 45000003 */ bc1f .L80241BD0 -/* 9C6FA4 80241BC4 E4600080 */ swc1 $f0, 0x80($v1) -/* 9C6FA8 80241BC8 46020001 */ sub.s $f0, $f0, $f2 -/* 9C6FAC 80241BCC E4600080 */ swc1 $f0, 0x80($v1) -.L80241BD0: -/* 9C6FB0 80241BD0 8C820070 */ lw $v0, 0x70($a0) -/* 9C6FB4 80241BD4 2442FFFF */ addiu $v0, $v0, -1 -/* 9C6FB8 80241BD8 AC820070 */ sw $v0, 0x70($a0) -/* 9C6FBC 80241BDC 000217C3 */ sra $v0, $v0, 0x1f -/* 9C6FC0 80241BE0 03E00008 */ jr $ra -/* 9C6FC4 80241BE4 30420002 */ andi $v0, $v0, 2 diff --git a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_8024247C_9D949C.s b/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_8024247C_9D949C.s deleted file mode 100644 index ca72344204..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_8024247C_9D949C.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024247C_9D949C -/* 9D949C 8024247C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 9D94A0 80242480 AFB10014 */ sw $s1, 0x14($sp) -/* 9D94A4 80242484 0080882D */ daddu $s1, $a0, $zero -/* 9D94A8 80242488 AFBF0018 */ sw $ra, 0x18($sp) -/* 9D94AC 8024248C AFB00010 */ sw $s0, 0x10($sp) -/* 9D94B0 80242490 8E30000C */ lw $s0, 0xc($s1) -/* 9D94B4 80242494 8E050000 */ lw $a1, ($s0) -/* 9D94B8 80242498 0C0B1EAF */ jal get_variable -/* 9D94BC 8024249C 26100004 */ addiu $s0, $s0, 4 -/* 9D94C0 802424A0 0220202D */ daddu $a0, $s1, $zero -/* 9D94C4 802424A4 8E050000 */ lw $a1, ($s0) -/* 9D94C8 802424A8 0C0B210B */ jal get_float_variable -/* 9D94CC 802424AC 0040802D */ daddu $s0, $v0, $zero -/* 9D94D0 802424B0 24020002 */ addiu $v0, $zero, 2 -/* 9D94D4 802424B4 00501804 */ sllv $v1, $s0, $v0 -/* 9D94D8 802424B8 00701821 */ addu $v1, $v1, $s0 -/* 9D94DC 802424BC 00431804 */ sllv $v1, $v1, $v0 -/* 9D94E0 802424C0 00701823 */ subu $v1, $v1, $s0 -/* 9D94E4 802424C4 000320C0 */ sll $a0, $v1, 3 -/* 9D94E8 802424C8 00641821 */ addu $v1, $v1, $a0 -/* 9D94EC 802424CC 000318C0 */ sll $v1, $v1, 3 -/* 9D94F0 802424D0 3C01800B */ lui $at, 0x800b -/* 9D94F4 802424D4 00230821 */ addu $at, $at, $v1 -/* 9D94F8 802424D8 E4201D98 */ swc1 $f0, 0x1d98($at) -/* 9D94FC 802424DC 8FBF0018 */ lw $ra, 0x18($sp) -/* 9D9500 802424E0 8FB10014 */ lw $s1, 0x14($sp) -/* 9D9504 802424E4 8FB00010 */ lw $s0, 0x10($sp) -/* 9D9508 802424E8 03E00008 */ jr $ra -/* 9D950C 802424EC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_802424F0_9D9510.s b/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_802424F0_9D9510.s deleted file mode 100644 index 8de678506b..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_802424F0_9D9510.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802424F0_9D9510 -/* 9D9510 802424F0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 9D9514 802424F4 AFB10014 */ sw $s1, 0x14($sp) -/* 9D9518 802424F8 0080882D */ daddu $s1, $a0, $zero -/* 9D951C 802424FC AFBF0018 */ sw $ra, 0x18($sp) -/* 9D9520 80242500 AFB00010 */ sw $s0, 0x10($sp) -/* 9D9524 80242504 8E30000C */ lw $s0, 0xc($s1) -/* 9D9528 80242508 8E050000 */ lw $a1, ($s0) -/* 9D952C 8024250C 0C0B1EAF */ jal get_variable -/* 9D9530 80242510 26100004 */ addiu $s0, $s0, 4 -/* 9D9534 80242514 00021880 */ sll $v1, $v0, 2 -/* 9D9538 80242518 00621821 */ addu $v1, $v1, $v0 -/* 9D953C 8024251C 00031880 */ sll $v1, $v1, 2 -/* 9D9540 80242520 00621823 */ subu $v1, $v1, $v0 -/* 9D9544 80242524 000310C0 */ sll $v0, $v1, 3 -/* 9D9548 80242528 00621821 */ addu $v1, $v1, $v0 -/* 9D954C 8024252C 000318C0 */ sll $v1, $v1, 3 -/* 9D9550 80242530 3C01800B */ lui $at, 0x800b -/* 9D9554 80242534 00230821 */ addu $at, $at, $v1 -/* 9D9558 80242538 C4221D98 */ lwc1 $f2, 0x1d98($at) -/* 9D955C 8024253C 3C014480 */ lui $at, 0x4480 -/* 9D9560 80242540 44810000 */ mtc1 $at, $f0 -/* 9D9564 80242544 00000000 */ nop -/* 9D9568 80242548 46001082 */ mul.s $f2, $f2, $f0 -/* 9D956C 8024254C 00000000 */ nop -/* 9D9570 80242550 3C01CD5B */ lui $at, 0xcd5b -/* 9D9574 80242554 34215858 */ ori $at, $at, 0x5858 -/* 9D9578 80242558 44810000 */ mtc1 $at, $f0 -/* 9D957C 8024255C 00000000 */ nop -/* 9D9580 80242560 46001080 */ add.s $f2, $f2, $f0 -/* 9D9584 80242564 8E050000 */ lw $a1, ($s0) -/* 9D9588 80242568 4600110D */ trunc.w.s $f4, $f2 -/* 9D958C 8024256C 44062000 */ mfc1 $a2, $f4 -/* 9D9590 80242570 0C0B2026 */ jal set_variable -/* 9D9594 80242574 0220202D */ daddu $a0, $s1, $zero -/* 9D9598 80242578 8FBF0018 */ lw $ra, 0x18($sp) -/* 9D959C 8024257C 8FB10014 */ lw $s1, 0x14($sp) -/* 9D95A0 80242580 8FB00010 */ lw $s0, 0x10($sp) -/* 9D95A4 80242584 24020002 */ addiu $v0, $zero, 2 -/* 9D95A8 80242588 03E00008 */ jr $ra -/* 9D95AC 8024258C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_8024272C_9D974C.s b/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_8024272C_9D974C.s deleted file mode 100644 index d25b5fb38c..0000000000 --- a/asm/nonmatchings/world/area_nok/nok_02/9D7AA0/func_8024272C_9D974C.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024272C_9D974C -/* 9D974C 8024272C 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* 9D9750 80242730 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* 9D9754 80242734 10A00002 */ beqz $a1, .L80242740 -/* 9D9758 80242738 2402003C */ addiu $v0, $zero, 0x3c -/* 9D975C 8024273C AC820070 */ sw $v0, 0x70($a0) -.L80242740: -/* 9D9760 80242740 C4620080 */ lwc1 $f2, 0x80($v1) -/* 9D9764 80242744 3C0141F0 */ lui $at, 0x41f0 -/* 9D9768 80242748 44810000 */ mtc1 $at, $f0 -/* 9D976C 8024274C 00000000 */ nop -/* 9D9770 80242750 46001000 */ add.s $f0, $f2, $f0 -/* 9D9774 80242754 3C0143B4 */ lui $at, 0x43b4 -/* 9D9778 80242758 44811000 */ mtc1 $at, $f2 -/* 9D977C 8024275C 00000000 */ nop -/* 9D9780 80242760 4600103E */ c.le.s $f2, $f0 -/* 9D9784 80242764 00000000 */ nop -/* 9D9788 80242768 45000003 */ bc1f .L80242778 -/* 9D978C 8024276C E4600080 */ swc1 $f0, 0x80($v1) -/* 9D9790 80242770 46020001 */ sub.s $f0, $f0, $f2 -/* 9D9794 80242774 E4600080 */ swc1 $f0, 0x80($v1) -.L80242778: -/* 9D9798 80242778 8C820070 */ lw $v0, 0x70($a0) -/* 9D979C 8024277C 2442FFFF */ addiu $v0, $v0, -1 -/* 9D97A0 80242780 AC820070 */ sw $v0, 0x70($a0) -/* 9D97A4 80242784 000217C3 */ sra $v0, $v0, 0x1f -/* 9D97A8 80242788 03E00008 */ jr $ra -/* 9D97AC 8024278C 30420002 */ andi $v0, $v0, 2 diff --git a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024126C_CF8DDC.s b/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024126C_CF8DDC.s deleted file mode 100644 index 5c5430a400..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024126C_CF8DDC.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024126C_CF8DDC -/* CF8DDC 8024126C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* CF8DE0 80241270 AFB10014 */ sw $s1, 0x14($sp) -/* CF8DE4 80241274 0080882D */ daddu $s1, $a0, $zero -/* CF8DE8 80241278 AFBF0018 */ sw $ra, 0x18($sp) -/* CF8DEC 8024127C AFB00010 */ sw $s0, 0x10($sp) -/* CF8DF0 80241280 8E30000C */ lw $s0, 0xc($s1) -/* CF8DF4 80241284 8E050000 */ lw $a1, ($s0) -/* CF8DF8 80241288 0C0B1EAF */ jal get_variable -/* CF8DFC 8024128C 26100004 */ addiu $s0, $s0, 4 -/* CF8E00 80241290 0220202D */ daddu $a0, $s1, $zero -/* CF8E04 80241294 8E050000 */ lw $a1, ($s0) -/* CF8E08 80241298 0C0B210B */ jal get_float_variable -/* CF8E0C 8024129C 0040802D */ daddu $s0, $v0, $zero -/* CF8E10 802412A0 24020002 */ addiu $v0, $zero, 2 -/* CF8E14 802412A4 00501804 */ sllv $v1, $s0, $v0 -/* CF8E18 802412A8 00701821 */ addu $v1, $v1, $s0 -/* CF8E1C 802412AC 00431804 */ sllv $v1, $v1, $v0 -/* CF8E20 802412B0 00701823 */ subu $v1, $v1, $s0 -/* CF8E24 802412B4 000320C0 */ sll $a0, $v1, 3 -/* CF8E28 802412B8 00641821 */ addu $v1, $v1, $a0 -/* CF8E2C 802412BC 000318C0 */ sll $v1, $v1, 3 -/* CF8E30 802412C0 3C01800B */ lui $at, 0x800b -/* CF8E34 802412C4 00230821 */ addu $at, $at, $v1 -/* CF8E38 802412C8 E4201D98 */ swc1 $f0, 0x1d98($at) -/* CF8E3C 802412CC 8FBF0018 */ lw $ra, 0x18($sp) -/* CF8E40 802412D0 8FB10014 */ lw $s1, 0x14($sp) -/* CF8E44 802412D4 8FB00010 */ lw $s0, 0x10($sp) -/* CF8E48 802412D8 03E00008 */ jr $ra -/* CF8E4C 802412DC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_802412E0_CF8E50.s b/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_802412E0_CF8E50.s deleted file mode 100644 index 06fac4e40f..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_802412E0_CF8E50.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802412E0_CF8E50 -/* CF8E50 802412E0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* CF8E54 802412E4 AFB10014 */ sw $s1, 0x14($sp) -/* CF8E58 802412E8 0080882D */ daddu $s1, $a0, $zero -/* CF8E5C 802412EC AFBF0018 */ sw $ra, 0x18($sp) -/* CF8E60 802412F0 AFB00010 */ sw $s0, 0x10($sp) -/* CF8E64 802412F4 8E30000C */ lw $s0, 0xc($s1) -/* CF8E68 802412F8 8E050000 */ lw $a1, ($s0) -/* CF8E6C 802412FC 0C0B1EAF */ jal get_variable -/* CF8E70 80241300 26100004 */ addiu $s0, $s0, 4 -/* CF8E74 80241304 00021880 */ sll $v1, $v0, 2 -/* CF8E78 80241308 00621821 */ addu $v1, $v1, $v0 -/* CF8E7C 8024130C 00031880 */ sll $v1, $v1, 2 -/* CF8E80 80241310 00621823 */ subu $v1, $v1, $v0 -/* CF8E84 80241314 000310C0 */ sll $v0, $v1, 3 -/* CF8E88 80241318 00621821 */ addu $v1, $v1, $v0 -/* CF8E8C 8024131C 000318C0 */ sll $v1, $v1, 3 -/* CF8E90 80241320 3C01800B */ lui $at, 0x800b -/* CF8E94 80241324 00230821 */ addu $at, $at, $v1 -/* CF8E98 80241328 C4221D98 */ lwc1 $f2, 0x1d98($at) -/* CF8E9C 8024132C 3C014480 */ lui $at, 0x4480 -/* CF8EA0 80241330 44810000 */ mtc1 $at, $f0 -/* CF8EA4 80241334 00000000 */ nop -/* CF8EA8 80241338 46001082 */ mul.s $f2, $f2, $f0 -/* CF8EAC 8024133C 00000000 */ nop -/* CF8EB0 80241340 3C01CD5B */ lui $at, 0xcd5b -/* CF8EB4 80241344 34215858 */ ori $at, $at, 0x5858 -/* CF8EB8 80241348 44810000 */ mtc1 $at, $f0 -/* CF8EBC 8024134C 00000000 */ nop -/* CF8EC0 80241350 46001080 */ add.s $f2, $f2, $f0 -/* CF8EC4 80241354 8E050000 */ lw $a1, ($s0) -/* CF8EC8 80241358 4600110D */ trunc.w.s $f4, $f2 -/* CF8ECC 8024135C 44062000 */ mfc1 $a2, $f4 -/* CF8ED0 80241360 0C0B2026 */ jal set_variable -/* CF8ED4 80241364 0220202D */ daddu $a0, $s1, $zero -/* CF8ED8 80241368 8FBF0018 */ lw $ra, 0x18($sp) -/* CF8EDC 8024136C 8FB10014 */ lw $s1, 0x14($sp) -/* CF8EE0 80241370 8FB00010 */ lw $s0, 0x10($sp) -/* CF8EE4 80241374 24020002 */ addiu $v0, $zero, 2 -/* CF8EE8 80241378 03E00008 */ jr $ra -/* CF8EEC 8024137C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024151C_CF908C.s b/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024151C_CF908C.s deleted file mode 100644 index 50b2d10126..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_01/CF7E80/func_8024151C_CF908C.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024151C_CF908C -/* CF908C 8024151C 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* CF9090 80241520 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* CF9094 80241524 10A00002 */ beqz $a1, .L80241530 -/* CF9098 80241528 2402003C */ addiu $v0, $zero, 0x3c -/* CF909C 8024152C AC820070 */ sw $v0, 0x70($a0) -.L80241530: -/* CF90A0 80241530 C4620080 */ lwc1 $f2, 0x80($v1) -/* CF90A4 80241534 3C0141F0 */ lui $at, 0x41f0 -/* CF90A8 80241538 44810000 */ mtc1 $at, $f0 -/* CF90AC 8024153C 00000000 */ nop -/* CF90B0 80241540 46001000 */ add.s $f0, $f2, $f0 -/* CF90B4 80241544 3C0143B4 */ lui $at, 0x43b4 -/* CF90B8 80241548 44811000 */ mtc1 $at, $f2 -/* CF90BC 8024154C 00000000 */ nop -/* CF90C0 80241550 4600103E */ c.le.s $f2, $f0 -/* CF90C4 80241554 00000000 */ nop -/* CF90C8 80241558 45000003 */ bc1f .L80241568 -/* CF90CC 8024155C E4600080 */ swc1 $f0, 0x80($v1) -/* CF90D0 80241560 46020001 */ sub.s $f0, $f0, $f2 -/* CF90D4 80241564 E4600080 */ swc1 $f0, 0x80($v1) -.L80241568: -/* CF90D8 80241568 8C820070 */ lw $v0, 0x70($a0) -/* CF90DC 8024156C 2442FFFF */ addiu $v0, $v0, -1 -/* CF90E0 80241570 AC820070 */ sw $v0, 0x70($a0) -/* CF90E4 80241574 000217C3 */ sra $v0, $v0, 0x1f -/* CF90E8 80241578 03E00008 */ jr $ra -/* CF90EC 8024157C 30420002 */ andi $v0, $v0, 2 diff --git a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80241698_D06DC8.s b/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80241698_D06DC8.s deleted file mode 100644 index 7db5c1eb2d..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80241698_D06DC8.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241698_D06DC8 -/* D06DC8 80241698 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* D06DCC 8024169C AFB10014 */ sw $s1, 0x14($sp) -/* D06DD0 802416A0 0080882D */ daddu $s1, $a0, $zero -/* D06DD4 802416A4 AFBF0018 */ sw $ra, 0x18($sp) -/* D06DD8 802416A8 AFB00010 */ sw $s0, 0x10($sp) -/* D06DDC 802416AC 8E30000C */ lw $s0, 0xc($s1) -/* D06DE0 802416B0 8E050000 */ lw $a1, ($s0) -/* D06DE4 802416B4 0C0B1EAF */ jal get_variable -/* D06DE8 802416B8 26100004 */ addiu $s0, $s0, 4 -/* D06DEC 802416BC 0220202D */ daddu $a0, $s1, $zero -/* D06DF0 802416C0 8E050000 */ lw $a1, ($s0) -/* D06DF4 802416C4 0C0B210B */ jal get_float_variable -/* D06DF8 802416C8 0040802D */ daddu $s0, $v0, $zero -/* D06DFC 802416CC 24020002 */ addiu $v0, $zero, 2 -/* D06E00 802416D0 00501804 */ sllv $v1, $s0, $v0 -/* D06E04 802416D4 00701821 */ addu $v1, $v1, $s0 -/* D06E08 802416D8 00431804 */ sllv $v1, $v1, $v0 -/* D06E0C 802416DC 00701823 */ subu $v1, $v1, $s0 -/* D06E10 802416E0 000320C0 */ sll $a0, $v1, 3 -/* D06E14 802416E4 00641821 */ addu $v1, $v1, $a0 -/* D06E18 802416E8 000318C0 */ sll $v1, $v1, 3 -/* D06E1C 802416EC 3C01800B */ lui $at, 0x800b -/* D06E20 802416F0 00230821 */ addu $at, $at, $v1 -/* D06E24 802416F4 E4201D98 */ swc1 $f0, 0x1d98($at) -/* D06E28 802416F8 8FBF0018 */ lw $ra, 0x18($sp) -/* D06E2C 802416FC 8FB10014 */ lw $s1, 0x14($sp) -/* D06E30 80241700 8FB00010 */ lw $s0, 0x10($sp) -/* D06E34 80241704 03E00008 */ jr $ra -/* D06E38 80241708 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_8024170C_D06E3C.s b/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_8024170C_D06E3C.s deleted file mode 100644 index ec1da9607d..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_8024170C_D06E3C.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024170C_D06E3C -/* D06E3C 8024170C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* D06E40 80241710 AFB10014 */ sw $s1, 0x14($sp) -/* D06E44 80241714 0080882D */ daddu $s1, $a0, $zero -/* D06E48 80241718 AFBF0018 */ sw $ra, 0x18($sp) -/* D06E4C 8024171C AFB00010 */ sw $s0, 0x10($sp) -/* D06E50 80241720 8E30000C */ lw $s0, 0xc($s1) -/* D06E54 80241724 8E050000 */ lw $a1, ($s0) -/* D06E58 80241728 0C0B1EAF */ jal get_variable -/* D06E5C 8024172C 26100004 */ addiu $s0, $s0, 4 -/* D06E60 80241730 00021880 */ sll $v1, $v0, 2 -/* D06E64 80241734 00621821 */ addu $v1, $v1, $v0 -/* D06E68 80241738 00031880 */ sll $v1, $v1, 2 -/* D06E6C 8024173C 00621823 */ subu $v1, $v1, $v0 -/* D06E70 80241740 000310C0 */ sll $v0, $v1, 3 -/* D06E74 80241744 00621821 */ addu $v1, $v1, $v0 -/* D06E78 80241748 000318C0 */ sll $v1, $v1, 3 -/* D06E7C 8024174C 3C01800B */ lui $at, 0x800b -/* D06E80 80241750 00230821 */ addu $at, $at, $v1 -/* D06E84 80241754 C4221D98 */ lwc1 $f2, 0x1d98($at) -/* D06E88 80241758 3C014480 */ lui $at, 0x4480 -/* D06E8C 8024175C 44810000 */ mtc1 $at, $f0 -/* D06E90 80241760 00000000 */ nop -/* D06E94 80241764 46001082 */ mul.s $f2, $f2, $f0 -/* D06E98 80241768 00000000 */ nop -/* D06E9C 8024176C 3C01CD5B */ lui $at, 0xcd5b -/* D06EA0 80241770 34215858 */ ori $at, $at, 0x5858 -/* D06EA4 80241774 44810000 */ mtc1 $at, $f0 -/* D06EA8 80241778 00000000 */ nop -/* D06EAC 8024177C 46001080 */ add.s $f2, $f2, $f0 -/* D06EB0 80241780 8E050000 */ lw $a1, ($s0) -/* D06EB4 80241784 4600110D */ trunc.w.s $f4, $f2 -/* D06EB8 80241788 44062000 */ mfc1 $a2, $f4 -/* D06EBC 8024178C 0C0B2026 */ jal set_variable -/* D06EC0 80241790 0220202D */ daddu $a0, $s1, $zero -/* D06EC4 80241794 8FBF0018 */ lw $ra, 0x18($sp) -/* D06EC8 80241798 8FB10014 */ lw $s1, 0x14($sp) -/* D06ECC 8024179C 8FB00010 */ lw $s0, 0x10($sp) -/* D06ED0 802417A0 24020002 */ addiu $v0, $zero, 2 -/* D06ED4 802417A4 03E00008 */ jr $ra -/* D06ED8 802417A8 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80241948_D07078.s b/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80241948_D07078.s deleted file mode 100644 index 82bc1f8e14..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_02/D05F60/func_80241948_D07078.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241948_D07078 -/* D07078 80241948 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* D0707C 8024194C 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* D07080 80241950 10A00002 */ beqz $a1, .L8024195C -/* D07084 80241954 2402003C */ addiu $v0, $zero, 0x3c -/* D07088 80241958 AC820070 */ sw $v0, 0x70($a0) -.L8024195C: -/* D0708C 8024195C C4620080 */ lwc1 $f2, 0x80($v1) -/* D07090 80241960 3C0141F0 */ lui $at, 0x41f0 -/* D07094 80241964 44810000 */ mtc1 $at, $f0 -/* D07098 80241968 00000000 */ nop -/* D0709C 8024196C 46001000 */ add.s $f0, $f2, $f0 -/* D070A0 80241970 3C0143B4 */ lui $at, 0x43b4 -/* D070A4 80241974 44811000 */ mtc1 $at, $f2 -/* D070A8 80241978 00000000 */ nop -/* D070AC 8024197C 4600103E */ c.le.s $f2, $f0 -/* D070B0 80241980 00000000 */ nop -/* D070B4 80241984 45000003 */ bc1f .L80241994 -/* D070B8 80241988 E4600080 */ swc1 $f0, 0x80($v1) -/* D070BC 8024198C 46020001 */ sub.s $f0, $f0, $f2 -/* D070C0 80241990 E4600080 */ swc1 $f0, 0x80($v1) -.L80241994: -/* D070C4 80241994 8C820070 */ lw $v0, 0x70($a0) -/* D070C8 80241998 2442FFFF */ addiu $v0, $v0, -1 -/* D070CC 8024199C AC820070 */ sw $v0, 0x70($a0) -/* D070D0 802419A0 000217C3 */ sra $v0, $v0, 0x1f -/* D070D4 802419A4 03E00008 */ jr $ra -/* D070D8 802419A8 30420002 */ andi $v0, $v0, 2 diff --git a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_8024133C_D3B90C.s b/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_8024133C_D3B90C.s deleted file mode 100644 index 5f6c8e24cb..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_8024133C_D3B90C.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024133C_D3B90C -/* D3B90C 8024133C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* D3B910 80241340 AFB10014 */ sw $s1, 0x14($sp) -/* D3B914 80241344 0080882D */ daddu $s1, $a0, $zero -/* D3B918 80241348 AFBF0018 */ sw $ra, 0x18($sp) -/* D3B91C 8024134C AFB00010 */ sw $s0, 0x10($sp) -/* D3B920 80241350 8E30000C */ lw $s0, 0xc($s1) -/* D3B924 80241354 8E050000 */ lw $a1, ($s0) -/* D3B928 80241358 0C0B1EAF */ jal get_variable -/* D3B92C 8024135C 26100004 */ addiu $s0, $s0, 4 -/* D3B930 80241360 0220202D */ daddu $a0, $s1, $zero -/* D3B934 80241364 8E050000 */ lw $a1, ($s0) -/* D3B938 80241368 0C0B210B */ jal get_float_variable -/* D3B93C 8024136C 0040802D */ daddu $s0, $v0, $zero -/* D3B940 80241370 24020002 */ addiu $v0, $zero, 2 -/* D3B944 80241374 00501804 */ sllv $v1, $s0, $v0 -/* D3B948 80241378 00701821 */ addu $v1, $v1, $s0 -/* D3B94C 8024137C 00431804 */ sllv $v1, $v1, $v0 -/* D3B950 80241380 00701823 */ subu $v1, $v1, $s0 -/* D3B954 80241384 000320C0 */ sll $a0, $v1, 3 -/* D3B958 80241388 00641821 */ addu $v1, $v1, $a0 -/* D3B95C 8024138C 000318C0 */ sll $v1, $v1, 3 -/* D3B960 80241390 3C01800B */ lui $at, 0x800b -/* D3B964 80241394 00230821 */ addu $at, $at, $v1 -/* D3B968 80241398 E4201D98 */ swc1 $f0, 0x1d98($at) -/* D3B96C 8024139C 8FBF0018 */ lw $ra, 0x18($sp) -/* D3B970 802413A0 8FB10014 */ lw $s1, 0x14($sp) -/* D3B974 802413A4 8FB00010 */ lw $s0, 0x10($sp) -/* D3B978 802413A8 03E00008 */ jr $ra -/* D3B97C 802413AC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802413B0_D3B980.s b/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802413B0_D3B980.s deleted file mode 100644 index 8f479509d9..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802413B0_D3B980.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802413B0_D3B980 -/* D3B980 802413B0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* D3B984 802413B4 AFB10014 */ sw $s1, 0x14($sp) -/* D3B988 802413B8 0080882D */ daddu $s1, $a0, $zero -/* D3B98C 802413BC AFBF0018 */ sw $ra, 0x18($sp) -/* D3B990 802413C0 AFB00010 */ sw $s0, 0x10($sp) -/* D3B994 802413C4 8E30000C */ lw $s0, 0xc($s1) -/* D3B998 802413C8 8E050000 */ lw $a1, ($s0) -/* D3B99C 802413CC 0C0B1EAF */ jal get_variable -/* D3B9A0 802413D0 26100004 */ addiu $s0, $s0, 4 -/* D3B9A4 802413D4 00021880 */ sll $v1, $v0, 2 -/* D3B9A8 802413D8 00621821 */ addu $v1, $v1, $v0 -/* D3B9AC 802413DC 00031880 */ sll $v1, $v1, 2 -/* D3B9B0 802413E0 00621823 */ subu $v1, $v1, $v0 -/* D3B9B4 802413E4 000310C0 */ sll $v0, $v1, 3 -/* D3B9B8 802413E8 00621821 */ addu $v1, $v1, $v0 -/* D3B9BC 802413EC 000318C0 */ sll $v1, $v1, 3 -/* D3B9C0 802413F0 3C01800B */ lui $at, 0x800b -/* D3B9C4 802413F4 00230821 */ addu $at, $at, $v1 -/* D3B9C8 802413F8 C4221D98 */ lwc1 $f2, 0x1d98($at) -/* D3B9CC 802413FC 3C014480 */ lui $at, 0x4480 -/* D3B9D0 80241400 44810000 */ mtc1 $at, $f0 -/* D3B9D4 80241404 00000000 */ nop -/* D3B9D8 80241408 46001082 */ mul.s $f2, $f2, $f0 -/* D3B9DC 8024140C 00000000 */ nop -/* D3B9E0 80241410 3C01CD5B */ lui $at, 0xcd5b -/* D3B9E4 80241414 34215858 */ ori $at, $at, 0x5858 -/* D3B9E8 80241418 44810000 */ mtc1 $at, $f0 -/* D3B9EC 8024141C 00000000 */ nop -/* D3B9F0 80241420 46001080 */ add.s $f2, $f2, $f0 -/* D3B9F4 80241424 8E050000 */ lw $a1, ($s0) -/* D3B9F8 80241428 4600110D */ trunc.w.s $f4, $f2 -/* D3B9FC 8024142C 44062000 */ mfc1 $a2, $f4 -/* D3BA00 80241430 0C0B2026 */ jal set_variable -/* D3BA04 80241434 0220202D */ daddu $a0, $s1, $zero -/* D3BA08 80241438 8FBF0018 */ lw $ra, 0x18($sp) -/* D3BA0C 8024143C 8FB10014 */ lw $s1, 0x14($sp) -/* D3BA10 80241440 8FB00010 */ lw $s0, 0x10($sp) -/* D3BA14 80241444 24020002 */ addiu $v0, $zero, 2 -/* D3BA18 80241448 03E00008 */ jr $ra -/* D3BA1C 8024144C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802415EC_D3BBBC.s b/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802415EC_D3BBBC.s deleted file mode 100644 index 158301533b..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_11/D3ADA0/func_802415EC_D3BBBC.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802415EC_D3BBBC -/* D3BBBC 802415EC 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* D3BBC0 802415F0 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* D3BBC4 802415F4 10A00002 */ beqz $a1, .L80241600 -/* D3BBC8 802415F8 2402003C */ addiu $v0, $zero, 0x3c -/* D3BBCC 802415FC AC820070 */ sw $v0, 0x70($a0) -.L80241600: -/* D3BBD0 80241600 C4620080 */ lwc1 $f2, 0x80($v1) -/* D3BBD4 80241604 3C0141F0 */ lui $at, 0x41f0 -/* D3BBD8 80241608 44810000 */ mtc1 $at, $f0 -/* D3BBDC 8024160C 00000000 */ nop -/* D3BBE0 80241610 46001000 */ add.s $f0, $f2, $f0 -/* D3BBE4 80241614 3C0143B4 */ lui $at, 0x43b4 -/* D3BBE8 80241618 44811000 */ mtc1 $at, $f2 -/* D3BBEC 8024161C 00000000 */ nop -/* D3BBF0 80241620 4600103E */ c.le.s $f2, $f0 -/* D3BBF4 80241624 00000000 */ nop -/* D3BBF8 80241628 45000003 */ bc1f .L80241638 -/* D3BBFC 8024162C E4600080 */ swc1 $f0, 0x80($v1) -/* D3BC00 80241630 46020001 */ sub.s $f0, $f0, $f2 -/* D3BC04 80241634 E4600080 */ swc1 $f0, 0x80($v1) -.L80241638: -/* D3BC08 80241638 8C820070 */ lw $v0, 0x70($a0) -/* D3BC0C 8024163C 2442FFFF */ addiu $v0, $v0, -1 -/* D3BC10 80241640 AC820070 */ sw $v0, 0x70($a0) -/* D3BC14 80241644 000217C3 */ sra $v0, $v0, 0x1f -/* D3BC18 80241648 03E00008 */ jr $ra -/* D3BC1C 8024164C 30420002 */ andi $v0, $v0, 2 diff --git a/include/si.h b/include/si.h index 6f34ed928b..9fab7e9dae 100644 --- a/include/si.h +++ b/include/si.h @@ -16,7 +16,7 @@ typedef s32 ScriptID; #define SI_SAVE_VAR(v) (v - 170000000) #define SI_ARRAY(v) (v - 190000000) #define SI_ARRAY_FLAG(v) (v - 210000000) -#define SI_FIXED(v) ((s32)(v * 1024.0f) - 230000000) // See float_to_fixed_var +#define SI_FIXED(v) ((v * 1024.0f) + -230000000) // See float_to_fixed_var /* Return type of si_execute_next_command */ #define SI_CONTINUE 0 /* Continue to next command */ diff --git a/src/world/area_dro/dro_01/95B7E0.c b/src/world/area_dro/dro_01/95B7E0.c index fd258c68ec..e932d8d5aa 100644 --- a/src/world/area_dro/dro_01/95B7E0.c +++ b/src/world/area_dro/dro_01/95B7E0.c @@ -60,13 +60,13 @@ INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80241F94_95D194); #include "world/common/GetGameStatus75.inc.c" -INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80241FDC_95D1DC); +#include "world/common/SetCamVfov.inc.c" -INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80242050_95D250); +#include "world/common/GetCamVfov.inc.c" #include "world/common/UnkCameraFunc.inc.c" -INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_8024228C_95D48C); +#include "world/common/UnkRotatePlayer.inc.c" #include "world/common/UnkPartnerFuncs.inc.c" diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index 95df3d4b0f..cb9c9474cb 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -36,13 +36,13 @@ INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80240E24_969FE4); #include "world/common/GetGameStatus75.inc.c" -INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80240E6C_96A02C); +#include "world/common/SetCamVfov.inc.c" -INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80240EE0_96A0A0); +#include "world/common/GetCamVfov.inc.c" #include "world/common/UnkCameraFunc.inc.c" -INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_8024111C_96A2DC); +#include "world/common/UnkRotatePlayer.inc.c" #include "world/common/UnkPartnerFuncs.inc.c" diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index e6cb55f900..5480bb6c0b 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -78,13 +78,13 @@ INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80242FC8_A1E0C8); #include "world/common/GetGameStatus75.inc.c" -INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80243010_A1E110); +#include "world/common/SetCamVfov.inc.c" -INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_80243084_A1E184); +#include "world/common/GetCamVfov.inc.c" #include "world/common/UnkCameraFunc.inc.c" -INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802432C0_A1E3C0); +#include "world/common/UnkRotatePlayer.inc.c" #include "world/common/UnkPartnerFuncs.inc.c" diff --git a/src/world/area_hos/hos_04/A274B0.c b/src/world/area_hos/hos_04/A274B0.c index 9b8e226f14..0811b81fc3 100644 --- a/src/world/area_hos/hos_04/A274B0.c +++ b/src/world/area_hos/hos_04/A274B0.c @@ -1,6 +1,6 @@ #include "hos_04.h" -INCLUDE_ASM(s32, "world/area_hos/hos_04/A274B0", func_802405E0_A274B0); +#include "world/common/SetCamVfov.inc.c" INCLUDE_ASM(s32, "world/area_hos/hos_04/A274B0", func_80240654_A27524); diff --git a/src/world/area_jan/jan_02/B2C8A0.c b/src/world/area_jan/jan_02/B2C8A0.c index df6da359fe..1454a92b7a 100644 --- a/src/world/area_jan/jan_02/B2C8A0.c +++ b/src/world/area_jan/jan_02/B2C8A0.c @@ -70,13 +70,13 @@ INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80242138_B2E5A8); #include "world/common/GetGameStatus75.inc.c" -INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80242180_B2E5F0); +#include "world/common/SetCamVfov.inc.c" -INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_802421F4_B2E664); +#include "world/common/GetCamVfov.inc.c" #include "world/common/UnkCameraFunc.inc.c" -INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80242430_B2E8A0); +#include "world/common/UnkRotatePlayer.inc.c" #include "world/common/UnkPartnerFuncs.inc.c" diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index 184667f85b..2a9c7477b3 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -110,13 +110,13 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802426C0_B37290); #include "world/common/GetGameStatus75.inc.c" -INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80242708_B372D8); +#include "world/common/SetCamVfov.inc.c" -INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_8024277C_B3734C); +#include "world/common/GetCamVfov.inc.c" #include "world/common/UnkCameraFunc.inc.c" -INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802429B8_B37588); +#include "world/common/UnkRotatePlayer.inc.c" #include "world/common/UnkPartnerFuncs.inc.c" diff --git a/src/world/area_kmr/kmr_02/8B0070.c b/src/world/area_kmr/kmr_02/8B0070.c index c2a864f722..36c5e9da8e 100644 --- a/src/world/area_kmr/kmr_02/8B0070.c +++ b/src/world/area_kmr/kmr_02/8B0070.c @@ -52,13 +52,13 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240EB4_8B0F24); #include "world/common/GetGameStatus75.inc.c" -INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240EFC_8B0F6C); +#include "world/common/SetCamVfov.inc.c" -INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240F70_8B0FE0); +#include "world/common/GetCamVfov.inc.c" #include "world/common/UnkCameraFunc.inc.c" -INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802411AC_8B121C); +#include "world/common/UnkRotatePlayer.inc.c" #include "world/common/UnkPartnerFuncs.inc.c" diff --git a/src/world/area_mac/mac_00/7EB340.c b/src/world/area_mac/mac_00/7EB340.c index a50c4fba79..20fbbc1490 100644 --- a/src/world/area_mac/mac_00/7EB340.c +++ b/src/world/area_mac/mac_00/7EB340.c @@ -36,13 +36,13 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241154_7EBE64); #include "world/common/GetGameStatus75.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_8024119C_7EBEAC); +#include "world/common/SetCamVfov.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241210_7EBF20); +#include "world/common/GetCamVfov.inc.c" #include "world/common/UnkCameraFunc.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_8024144C_7EC15C); +#include "world/common/UnkRotatePlayer.inc.c" #include "world/common/UnkPartnerFuncs.inc.c" diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index 4f871cc5a3..843baa05ff 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -62,13 +62,13 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242A34_8032B4); #include "world/common/GetGameStatus75.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242A7C_8032FC); +#include "world/common/SetCamVfov.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242AF0_803370); +#include "world/common/GetCamVfov.inc.c" #include "world/common/UnkCameraFunc.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80242D2C_8035AC); +#include "world/common/UnkRotatePlayer.inc.c" #include "world/common/UnkPartnerFuncs.inc.c" diff --git a/src/world/area_mac/mac_02/823BF0.c b/src/world/area_mac/mac_02/823BF0.c index bbd39460fc..20595c6eb7 100644 --- a/src/world/area_mac/mac_02/823BF0.c +++ b/src/world/area_mac/mac_02/823BF0.c @@ -60,13 +60,13 @@ INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802422E4_8255A4); #include "world/common/GetGameStatus75.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_8024232C_8255EC); +#include "world/common/SetCamVfov.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802423A0_825660); +#include "world/common/GetCamVfov.inc.c" #include "world/common/UnkCameraFunc.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802425DC_82589C); +#include "world/common/UnkRotatePlayer.inc.c" #include "world/common/UnkPartnerFuncs.inc.c" diff --git a/src/world/area_mac/mac_03/831B20.c b/src/world/area_mac/mac_03/831B20.c index 935c165abb..badb04a0ac 100644 --- a/src/world/area_mac/mac_03/831B20.c +++ b/src/world/area_mac/mac_03/831B20.c @@ -38,13 +38,13 @@ INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80240FD4_8327D4); #include "world/common/GetGameStatus75.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_8024101C_83281C); +#include "world/common/SetCamVfov.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_80241090_832890); +#include "world/common/GetCamVfov.inc.c" #include "world/common/UnkCameraFunc.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802412CC_832ACC); +#include "world/common/UnkRotatePlayer.inc.c" #include "world/common/UnkPartnerFuncs.inc.c" diff --git a/src/world/area_mac/mac_04/843030.c b/src/world/area_mac/mac_04/843030.c index 33868e1f5c..bea6733f73 100644 --- a/src/world/area_mac/mac_04/843030.c +++ b/src/world/area_mac/mac_04/843030.c @@ -36,13 +36,13 @@ INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240F84_843B54); #include "world/common/GetGameStatus75.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240FCC_843B9C); +#include "world/common/SetCamVfov.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80241040_843C10); +#include "world/common/GetCamVfov.inc.c" #include "world/common/UnkCameraFunc.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_8024127C_843E4C); +#include "world/common/UnkRotatePlayer.inc.c" #include "world/common/UnkPartnerFuncs.inc.c" diff --git a/src/world/area_mac/mac_05/852170.c b/src/world/area_mac/mac_05/852170.c index ac73e21084..839bf91196 100644 --- a/src/world/area_mac/mac_05/852170.c +++ b/src/world/area_mac/mac_05/852170.c @@ -68,13 +68,13 @@ INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241E44_853FB4); #include "world/common/GetGameStatus75.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241E8C_853FFC); +#include "world/common/SetCamVfov.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241F00_854070); +#include "world/common/GetCamVfov.inc.c" #include "world/common/UnkCameraFunc.inc.c" -INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_8024213C_8542AC); +#include "world/common/UnkRotatePlayer.inc.c" #include "world/common/UnkPartnerFuncs.inc.c" diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index 04af4c9b9b..36a46e2554 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -76,13 +76,13 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_8024188C_9C6C6C); #include "world/common/GetGameStatus75.inc.c" -INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_802418D4_9C6CB4); +#include "world/common/SetCamVfov.inc.c" -INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80241948_9C6D28); +#include "world/common/GetCamVfov.inc.c" #include "world/common/UnkCameraFunc.inc.c" -INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80241B84_9C6F64); +#include "world/common/UnkRotatePlayer.inc.c" #include "world/common/UnkPartnerFuncs.inc.c" diff --git a/src/world/area_nok/nok_02/9D7AA0.c b/src/world/area_nok/nok_02/9D7AA0.c index ff2304cfef..9dc71cf4d2 100644 --- a/src/world/area_nok/nok_02/9D7AA0.c +++ b/src/world/area_nok/nok_02/9D7AA0.c @@ -60,13 +60,13 @@ INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242434_9D9454); #include "world/common/GetGameStatus75.inc.c" -INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_8024247C_9D949C); +#include "world/common/SetCamVfov.inc.c" -INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_802424F0_9D9510); +#include "world/common/GetCamVfov.inc.c" #include "world/common/UnkCameraFunc.inc.c" -INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_8024272C_9D974C); +#include "world/common/UnkRotatePlayer.inc.c" #include "world/common/UnkPartnerFuncs.inc.c" diff --git a/src/world/area_sam/sam_01/CF7E80.c b/src/world/area_sam/sam_01/CF7E80.c index f9daf86071..3da3677484 100644 --- a/src/world/area_sam/sam_01/CF7E80.c +++ b/src/world/area_sam/sam_01/CF7E80.c @@ -48,13 +48,13 @@ INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80241224_CF8D94); #include "world/common/GetGameStatus75.inc.c" -INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_8024126C_CF8DDC); +#include "world/common/SetCamVfov.inc.c" -INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_802412E0_CF8E50); +#include "world/common/GetCamVfov.inc.c" #include "world/common/UnkCameraFunc.inc.c" -INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_8024151C_CF908C); +#include "world/common/UnkRotatePlayer.inc.c" #include "world/common/UnkPartnerFuncs.inc.c" diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index 775fd06542..0521858a9d 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -56,13 +56,13 @@ INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80241650_D06D80); #include "world/common/GetGameStatus75.inc.c" -INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80241698_D06DC8); +#include "world/common/SetCamVfov.inc.c" -INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_8024170C_D06E3C); +#include "world/common/GetCamVfov.inc.c" #include "world/common/UnkCameraFunc.inc.c" -INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80241948_D07078); +#include "world/common/UnkRotatePlayer.inc.c" #include "world/common/UnkPartnerFuncs.inc.c" diff --git a/src/world/area_sam/sam_11/D3ADA0.c b/src/world/area_sam/sam_11/D3ADA0.c index df17fb25c7..4a11b87a56 100644 --- a/src/world/area_sam/sam_11/D3ADA0.c +++ b/src/world/area_sam/sam_11/D3ADA0.c @@ -36,13 +36,13 @@ INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802412F4_D3B8C4); #include "world/common/GetGameStatus75.inc.c" -INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_8024133C_D3B90C); +#include "world/common/SetCamVfov.inc.c" -INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802413B0_D3B980); +#include "world/common/GetCamVfov.inc.c" #include "world/common/UnkCameraFunc.inc.c" -INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802415EC_D3BBBC); +#include "world/common/UnkRotatePlayer.inc.c" #include "world/common/UnkPartnerFuncs.inc.c" diff --git a/src/world/common/GetCamVfov.inc.c b/src/world/common/GetCamVfov.inc.c new file mode 100644 index 0000000000..38c40d234d --- /dev/null +++ b/src/world/common/GetCamVfov.inc.c @@ -0,0 +1,10 @@ +#include "common.h" +#include "map.h" + +static ApiStatus GetCamVfov(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 cameraID = get_variable(script, *args++); + + set_variable(script, *args++, SI_FIXED(gCameras[cameraID].vfov)); + return ApiStatus_DONE2; +} diff --git a/src/world/common/SetCamVfov.inc.c b/src/world/common/SetCamVfov.inc.c new file mode 100644 index 0000000000..c05aec5e1a --- /dev/null +++ b/src/world/common/SetCamVfov.inc.c @@ -0,0 +1,10 @@ +#include "common.h" +#include "map.h" + +static ApiStatus SetCamVfov(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 cameraID = get_variable(script, *args++); + + gCameras[cameraID].vfov = get_float_variable(script, *args++); + return ApiStatus_DONE2; +} diff --git a/src/world/common/UnkPartnerFuncs.inc.c b/src/world/common/UnkPartnerFuncs.inc.c index b7f2e7584d..ed90f5612d 100644 --- a/src/world/common/UnkPartnerFuncs.inc.c +++ b/src/world/common/UnkPartnerFuncs.inc.c @@ -17,7 +17,6 @@ static ApiStatus UnkRotatePartner(ScriptInstance* script, s32 isInitialCall) { return (script->functionTemp[0].s >> 0x1F) & ApiStatus_DONE2; } - static ApiStatus UnkMovePartner(ScriptInstance* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(NpcId_PARTNER); diff --git a/src/world/common/UnkRotatePlayer.inc.c b/src/world/common/UnkRotatePlayer.inc.c new file mode 100644 index 0000000000..898906f1ce --- /dev/null +++ b/src/world/common/UnkRotatePlayer.inc.c @@ -0,0 +1,18 @@ +#include "common.h" + +static ApiStatus UnkRotatePlayer(ScriptInstance* script, s32 isInitialCall) { + PlayerStatus* playerStatus = PLAYER_STATUS; + + if (isInitialCall) { + script->functionTemp[0].s = 60; + } + + playerStatus->targetYaw += 30.0f; + if (playerStatus->targetYaw >= 360.0f) { + playerStatus->targetYaw -= 360.0f; + } + + script->functionTemp[0].s--; + + return (script->functionTemp[0].s >> 0x1F) & ApiStatus_DONE2; +} From 51b1c9acfbfc7bfbff28e1906ad25e8a5996836a Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 30 Oct 2020 19:03:29 -0400 Subject: [PATCH 64/78] CheckPartnerFlags1000 --- .../area_kmr/kmr_02/8B36B0/func_80243640_8B36B0.s | 15 --------------- .../area_kmr/kmr_03/8C7F90/func_80240184_8C8114.s | 15 --------------- .../area_kmr/kmr_04/8CA900/func_80240000_8CA900.s | 15 --------------- .../area_kmr/kmr_04/8CA960/func_8024029C_8CAB9C.s | 15 --------------- src/world/area_kmr/kmr_02/8B36B0.c | 2 +- src/world/area_kmr/kmr_03/8C7F90.c | 2 +- src/world/area_kmr/kmr_04/8CA900.c | 2 +- src/world/area_kmr/kmr_04/8CA960.c | 3 +-- src/world/common/CheckPartnerFlags1000.inc.c | 5 +++++ 9 files changed, 9 insertions(+), 65 deletions(-) delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_02/8B36B0/func_80243640_8B36B0.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_03/8C7F90/func_80240184_8C8114.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_04/8CA900/func_80240000_8CA900.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_04/8CA960/func_8024029C_8CAB9C.s create mode 100644 src/world/common/CheckPartnerFlags1000.inc.c diff --git a/asm/nonmatchings/world/area_kmr/kmr_02/8B36B0/func_80243640_8B36B0.s b/asm/nonmatchings/world/area_kmr/kmr_02/8B36B0/func_80243640_8B36B0.s deleted file mode 100644 index 53d1d0587e..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_02/8B36B0/func_80243640_8B36B0.s +++ /dev/null @@ -1,15 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243640_8B36B0 -/* 8B36B0 80243640 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8B36B4 80243644 AFBF0010 */ sw $ra, 0x10($sp) -/* 8B36B8 80243648 0C00EABB */ jal get_npc_unsafe -/* 8B36BC 8024364C 2404FFFC */ addiu $a0, $zero, -4 -/* 8B36C0 80243650 8C420000 */ lw $v0, ($v0) -/* 8B36C4 80243654 8FBF0010 */ lw $ra, 0x10($sp) -/* 8B36C8 80243658 30421000 */ andi $v0, $v0, 0x1000 -/* 8B36CC 8024365C 0002102B */ sltu $v0, $zero, $v0 -/* 8B36D0 80243660 00021040 */ sll $v0, $v0, 1 -/* 8B36D4 80243664 03E00008 */ jr $ra -/* 8B36D8 80243668 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kmr/kmr_03/8C7F90/func_80240184_8C8114.s b/asm/nonmatchings/world/area_kmr/kmr_03/8C7F90/func_80240184_8C8114.s deleted file mode 100644 index 5b71f3006b..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_03/8C7F90/func_80240184_8C8114.s +++ /dev/null @@ -1,15 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240184_8C8114 -/* 8C8114 80240184 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8C8118 80240188 AFBF0010 */ sw $ra, 0x10($sp) -/* 8C811C 8024018C 0C00EABB */ jal get_npc_unsafe -/* 8C8120 80240190 2404FFFC */ addiu $a0, $zero, -4 -/* 8C8124 80240194 8C420000 */ lw $v0, ($v0) -/* 8C8128 80240198 8FBF0010 */ lw $ra, 0x10($sp) -/* 8C812C 8024019C 30421000 */ andi $v0, $v0, 0x1000 -/* 8C8130 802401A0 0002102B */ sltu $v0, $zero, $v0 -/* 8C8134 802401A4 00021040 */ sll $v0, $v0, 1 -/* 8C8138 802401A8 03E00008 */ jr $ra -/* 8C813C 802401AC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kmr/kmr_04/8CA900/func_80240000_8CA900.s b/asm/nonmatchings/world/area_kmr/kmr_04/8CA900/func_80240000_8CA900.s deleted file mode 100644 index 231ffcd1af..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_04/8CA900/func_80240000_8CA900.s +++ /dev/null @@ -1,15 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_8CA900 -/* 8CA900 80240000 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8CA904 80240004 AFBF0010 */ sw $ra, 0x10($sp) -/* 8CA908 80240008 0C00EABB */ jal get_npc_unsafe -/* 8CA90C 8024000C 2404FFFC */ addiu $a0, $zero, -4 -/* 8CA910 80240010 8C420000 */ lw $v0, ($v0) -/* 8CA914 80240014 8FBF0010 */ lw $ra, 0x10($sp) -/* 8CA918 80240018 30421000 */ andi $v0, $v0, 0x1000 -/* 8CA91C 8024001C 0002102B */ sltu $v0, $zero, $v0 -/* 8CA920 80240020 00021040 */ sll $v0, $v0, 1 -/* 8CA924 80240024 03E00008 */ jr $ra -/* 8CA928 80240028 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kmr/kmr_04/8CA960/func_8024029C_8CAB9C.s b/asm/nonmatchings/world/area_kmr/kmr_04/8CA960/func_8024029C_8CAB9C.s deleted file mode 100644 index c594351fac..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_04/8CA960/func_8024029C_8CAB9C.s +++ /dev/null @@ -1,15 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024029C_8CAB9C -/* 8CAB9C 8024029C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 8CABA0 802402A0 AFBF0010 */ sw $ra, 0x10($sp) -/* 8CABA4 802402A4 0C00EABB */ jal get_npc_unsafe -/* 8CABA8 802402A8 2404FFFC */ addiu $a0, $zero, -4 -/* 8CABAC 802402AC 8C420000 */ lw $v0, ($v0) -/* 8CABB0 802402B0 8FBF0010 */ lw $ra, 0x10($sp) -/* 8CABB4 802402B4 30421000 */ andi $v0, $v0, 0x1000 -/* 8CABB8 802402B8 0002102B */ sltu $v0, $zero, $v0 -/* 8CABBC 802402BC 00021040 */ sll $v0, $v0, 1 -/* 8CABC0 802402C0 03E00008 */ jr $ra -/* 8CABC4 802402C4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/src/world/area_kmr/kmr_02/8B36B0.c b/src/world/area_kmr/kmr_02/8B36B0.c index dc6524e5e0..3032631199 100644 --- a/src/world/area_kmr/kmr_02/8B36B0.c +++ b/src/world/area_kmr/kmr_02/8B36B0.c @@ -1,6 +1,6 @@ #include "kmr_02.h" -INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B36B0", func_80243640_8B36B0); +#include "world/common/CheckPartnerFlags1000.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B36B0", func_8024366C_8B36DC); diff --git a/src/world/area_kmr/kmr_03/8C7F90.c b/src/world/area_kmr/kmr_03/8C7F90.c index 6f289df621..ce0c09531c 100644 --- a/src/world/area_kmr/kmr_03/8C7F90.c +++ b/src/world/area_kmr/kmr_03/8C7F90.c @@ -2,7 +2,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_03/8C7F90", func_80240000_8C7F90); -INCLUDE_ASM(s32, "world/area_kmr/kmr_03/8C7F90", func_80240184_8C8114); +#include "world/common/CheckPartnerFlags1000.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_03/8C7F90", func_802401B0_8C8140); diff --git a/src/world/area_kmr/kmr_04/8CA900.c b/src/world/area_kmr/kmr_04/8CA900.c index 3920cad638..3326b00c98 100644 --- a/src/world/area_kmr/kmr_04/8CA900.c +++ b/src/world/area_kmr/kmr_04/8CA900.c @@ -1,5 +1,5 @@ #include "kmr_04.h" -INCLUDE_ASM(s32, "world/area_kmr/kmr_04/8CA900", func_80240000_8CA900); +#include "world/common/CheckPartnerFlags1000.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_04/8CA900", func_8024002C_8CA92C); diff --git a/src/world/area_kmr/kmr_04/8CA960.c b/src/world/area_kmr/kmr_04/8CA960.c index 6843ad0c92..fa5c2991fd 100644 --- a/src/world/area_kmr/kmr_04/8CA960.c +++ b/src/world/area_kmr/kmr_04/8CA960.c @@ -2,8 +2,7 @@ #include "world/common/SomeMatrixOperations.inc.c" - -INCLUDE_ASM(s32, "world/area_kmr/kmr_04/8CA960", func_8024029C_8CAB9C); +#include "world/common/CheckPartnerFlags1000.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_04/8CA960", func_802402C8_8CABC8); diff --git a/src/world/common/CheckPartnerFlags1000.inc.c b/src/world/common/CheckPartnerFlags1000.inc.c new file mode 100644 index 0000000000..f34f84ba9c --- /dev/null +++ b/src/world/common/CheckPartnerFlags1000.inc.c @@ -0,0 +1,5 @@ +#include "common.h" + +static ApiStatus CheckPartnerFlags1000(ScriptInstance* script, s32 isInitialCall) { + return ((get_npc_unsafe(NpcId_PARTNER)->flags & 0x1000) != 0) * ApiStatus_DONE2; +} From cff33e37f4218983740b91eff3684b232b29c28b Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 30 Oct 2020 19:11:46 -0400 Subject: [PATCH 65/78] UnkPositionFunc --- .../kmr_03/8C7F90/func_802401B0_8C8140.s | 30 -------- .../kmr_03/8C7F90/func_80240218_8C81A8.s | 72 ------------------- .../mac_01/8017D0/func_802446E0_804F60.s | 70 ------------------ include/functions.h | 1 + src/code_759b0_len_61b0.c | 2 +- src/world/area_kmr/kmr_03/8C7F90.c | 9 ++- src/world/area_mac/mac_00/7EB340.c | 20 +----- src/world/area_mac/mac_01/8017D0.c | 2 +- src/world/common/UnkPositionFunc.inc.c | 21 ++++++ 9 files changed, 32 insertions(+), 195 deletions(-) delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_03/8C7F90/func_802401B0_8C8140.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_03/8C7F90/func_80240218_8C81A8.s delete mode 100644 asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802446E0_804F60.s create mode 100644 src/world/common/UnkPositionFunc.inc.c diff --git a/asm/nonmatchings/world/area_kmr/kmr_03/8C7F90/func_802401B0_8C8140.s b/asm/nonmatchings/world/area_kmr/kmr_03/8C7F90/func_802401B0_8C8140.s deleted file mode 100644 index be90193e13..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_03/8C7F90/func_802401B0_8C8140.s +++ /dev/null @@ -1,30 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802401B0_8C8140 -/* 8C8140 802401B0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 8C8144 802401B4 AFB10014 */ sw $s1, 0x14($sp) -/* 8C8148 802401B8 0080882D */ daddu $s1, $a0, $zero -/* 8C814C 802401BC 0000202D */ daddu $a0, $zero, $zero -/* 8C8150 802401C0 AFBF0018 */ sw $ra, 0x18($sp) -/* 8C8154 802401C4 0C00EABB */ jal get_npc_unsafe -/* 8C8158 802401C8 AFB00010 */ sw $s0, 0x10($sp) -/* 8C815C 802401CC 0040802D */ daddu $s0, $v0, $zero -/* 8C8160 802401D0 C60C0038 */ lwc1 $f12, 0x38($s0) -/* 8C8164 802401D4 0C038022 */ jal func_800E0088 -/* 8C8168 802401D8 C60E0040 */ lwc1 $f14, 0x40($s0) -/* 8C816C 802401DC C6020018 */ lwc1 $f2, 0x18($s0) -/* 8C8170 802401E0 3C013F4C */ lui $at, 0x3f4c -/* 8C8174 802401E4 3421CCCD */ ori $at, $at, 0xcccd -/* 8C8178 802401E8 44812000 */ mtc1 $at, $f4 -/* 8C817C 802401EC 46020003 */ div.s $f0, $f0, $f2 -/* 8C8180 802401F0 46040002 */ mul.s $f0, $f0, $f4 -/* 8C8184 802401F4 00000000 */ nop -/* 8C8188 802401F8 4600018D */ trunc.w.s $f6, $f0 -/* 8C818C 802401FC E6260088 */ swc1 $f6, 0x88($s1) -/* 8C8190 80240200 8FBF0018 */ lw $ra, 0x18($sp) -/* 8C8194 80240204 8FB10014 */ lw $s1, 0x14($sp) -/* 8C8198 80240208 8FB00010 */ lw $s0, 0x10($sp) -/* 8C819C 8024020C 24020002 */ addiu $v0, $zero, 2 -/* 8C81A0 80240210 03E00008 */ jr $ra -/* 8C81A4 80240214 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_kmr/kmr_03/8C7F90/func_80240218_8C81A8.s b/asm/nonmatchings/world/area_kmr/kmr_03/8C7F90/func_80240218_8C81A8.s deleted file mode 100644 index 9f3aeef417..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_03/8C7F90/func_80240218_8C81A8.s +++ /dev/null @@ -1,72 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240218_8C81A8 -/* 8C81A8 80240218 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 8C81AC 8024021C AFB10014 */ sw $s1, 0x14($sp) -/* 8C81B0 80240220 0080882D */ daddu $s1, $a0, $zero -/* 8C81B4 80240224 AFBF0018 */ sw $ra, 0x18($sp) -/* 8C81B8 80240228 AFB00010 */ sw $s0, 0x10($sp) -/* 8C81BC 8024022C F7B80030 */ sdc1 $f24, 0x30($sp) -/* 8C81C0 80240230 F7B60028 */ sdc1 $f22, 0x28($sp) -/* 8C81C4 80240234 F7B40020 */ sdc1 $f20, 0x20($sp) -/* 8C81C8 80240238 8E30000C */ lw $s0, 0xc($s1) -/* 8C81CC 8024023C 8E050000 */ lw $a1, ($s0) -/* 8C81D0 80240240 0C0B1EAF */ jal get_variable -/* 8C81D4 80240244 26100004 */ addiu $s0, $s0, 4 -/* 8C81D8 80240248 8E050000 */ lw $a1, ($s0) -/* 8C81DC 8024024C 26100004 */ addiu $s0, $s0, 4 -/* 8C81E0 80240250 4482C000 */ mtc1 $v0, $f24 -/* 8C81E4 80240254 00000000 */ nop -/* 8C81E8 80240258 4680C620 */ cvt.s.w $f24, $f24 -/* 8C81EC 8024025C 0C0B1EAF */ jal get_variable -/* 8C81F0 80240260 0220202D */ daddu $a0, $s1, $zero -/* 8C81F4 80240264 8E050000 */ lw $a1, ($s0) -/* 8C81F8 80240268 26100004 */ addiu $s0, $s0, 4 -/* 8C81FC 8024026C 4482B000 */ mtc1 $v0, $f22 -/* 8C8200 80240270 00000000 */ nop -/* 8C8204 80240274 4680B5A0 */ cvt.s.w $f22, $f22 -/* 8C8208 80240278 0C0B1EAF */ jal get_variable -/* 8C820C 8024027C 0220202D */ daddu $a0, $s1, $zero -/* 8C8210 80240280 8E050000 */ lw $a1, ($s0) -/* 8C8214 80240284 4482A000 */ mtc1 $v0, $f20 -/* 8C8218 80240288 00000000 */ nop -/* 8C821C 8024028C 4680A520 */ cvt.s.w $f20, $f20 -/* 8C8220 80240290 0C0B1EAF */ jal get_variable -/* 8C8224 80240294 0220202D */ daddu $a0, $s1, $zero -/* 8C8228 80240298 44820000 */ mtc1 $v0, $f0 -/* 8C822C 8024029C 00000000 */ nop -/* 8C8230 802402A0 46800020 */ cvt.s.w $f0, $f0 -/* 8C8234 802402A4 46160001 */ sub.s $f0, $f0, $f22 -/* 8C8238 802402A8 4618A501 */ sub.s $f20, $f20, $f24 -/* 8C823C 802402AC 46140003 */ div.s $f0, $f0, $f20 -/* 8C8240 802402B0 46180602 */ mul.s $f24, $f0, $f24 -/* 8C8244 802402B4 00000000 */ nop -/* 8C8248 802402B8 3C028011 */ lui $v0, %hi(gPlayerStatus) -/* 8C824C 802402BC 2442EFC8 */ addiu $v0, $v0, %lo(gPlayerStatus) -/* 8C8250 802402C0 C4420028 */ lwc1 $f2, 0x28($v0) -/* 8C8254 802402C4 46020002 */ mul.s $f0, $f0, $f2 -/* 8C8258 802402C8 00000000 */ nop -/* 8C825C 802402CC 4618B581 */ sub.s $f22, $f22, $f24 -/* 8C8260 802402D0 46160000 */ add.s $f0, $f0, $f22 -/* 8C8264 802402D4 C4420030 */ lwc1 $f2, 0x30($v0) -/* 8C8268 802402D8 4600103C */ c.lt.s $f2, $f0 -/* 8C826C 802402DC 00000000 */ nop -/* 8C8270 802402E0 45000003 */ bc1f .L802402F0 -/* 8C8274 802402E4 24020001 */ addiu $v0, $zero, 1 -/* 8C8278 802402E8 080900BD */ j .L802402F4 -/* 8C827C 802402EC AE200084 */ sw $zero, 0x84($s1) -.L802402F0: -/* 8C8280 802402F0 AE220084 */ sw $v0, 0x84($s1) -.L802402F4: -/* 8C8284 802402F4 8FBF0018 */ lw $ra, 0x18($sp) -/* 8C8288 802402F8 8FB10014 */ lw $s1, 0x14($sp) -/* 8C828C 802402FC 8FB00010 */ lw $s0, 0x10($sp) -/* 8C8290 80240300 D7B80030 */ ldc1 $f24, 0x30($sp) -/* 8C8294 80240304 D7B60028 */ ldc1 $f22, 0x28($sp) -/* 8C8298 80240308 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 8C829C 8024030C 24020002 */ addiu $v0, $zero, 2 -/* 8C82A0 80240310 03E00008 */ jr $ra -/* 8C82A4 80240314 27BD0038 */ addiu $sp, $sp, 0x38 -/* 8C82A8 80240318 00000000 */ nop -/* 8C82AC 8024031C 00000000 */ nop diff --git a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802446E0_804F60.s b/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802446E0_804F60.s deleted file mode 100644 index 5daf4f046b..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_01/8017D0/func_802446E0_804F60.s +++ /dev/null @@ -1,70 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802446E0_804F60 -/* 804F60 802446E0 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 804F64 802446E4 AFB10014 */ sw $s1, 0x14($sp) -/* 804F68 802446E8 0080882D */ daddu $s1, $a0, $zero -/* 804F6C 802446EC AFBF0018 */ sw $ra, 0x18($sp) -/* 804F70 802446F0 AFB00010 */ sw $s0, 0x10($sp) -/* 804F74 802446F4 F7B80030 */ sdc1 $f24, 0x30($sp) -/* 804F78 802446F8 F7B60028 */ sdc1 $f22, 0x28($sp) -/* 804F7C 802446FC F7B40020 */ sdc1 $f20, 0x20($sp) -/* 804F80 80244700 8E30000C */ lw $s0, 0xc($s1) -/* 804F84 80244704 8E050000 */ lw $a1, ($s0) -/* 804F88 80244708 0C0B1EAF */ jal get_variable -/* 804F8C 8024470C 26100004 */ addiu $s0, $s0, 4 -/* 804F90 80244710 8E050000 */ lw $a1, ($s0) -/* 804F94 80244714 26100004 */ addiu $s0, $s0, 4 -/* 804F98 80244718 4482C000 */ mtc1 $v0, $f24 -/* 804F9C 8024471C 00000000 */ nop -/* 804FA0 80244720 4680C620 */ cvt.s.w $f24, $f24 -/* 804FA4 80244724 0C0B1EAF */ jal get_variable -/* 804FA8 80244728 0220202D */ daddu $a0, $s1, $zero -/* 804FAC 8024472C 8E050000 */ lw $a1, ($s0) -/* 804FB0 80244730 26100004 */ addiu $s0, $s0, 4 -/* 804FB4 80244734 4482B000 */ mtc1 $v0, $f22 -/* 804FB8 80244738 00000000 */ nop -/* 804FBC 8024473C 4680B5A0 */ cvt.s.w $f22, $f22 -/* 804FC0 80244740 0C0B1EAF */ jal get_variable -/* 804FC4 80244744 0220202D */ daddu $a0, $s1, $zero -/* 804FC8 80244748 8E050000 */ lw $a1, ($s0) -/* 804FCC 8024474C 4482A000 */ mtc1 $v0, $f20 -/* 804FD0 80244750 00000000 */ nop -/* 804FD4 80244754 4680A520 */ cvt.s.w $f20, $f20 -/* 804FD8 80244758 0C0B1EAF */ jal get_variable -/* 804FDC 8024475C 0220202D */ daddu $a0, $s1, $zero -/* 804FE0 80244760 44820000 */ mtc1 $v0, $f0 -/* 804FE4 80244764 00000000 */ nop -/* 804FE8 80244768 46800020 */ cvt.s.w $f0, $f0 -/* 804FEC 8024476C 46160001 */ sub.s $f0, $f0, $f22 -/* 804FF0 80244770 4618A501 */ sub.s $f20, $f20, $f24 -/* 804FF4 80244774 46140003 */ div.s $f0, $f0, $f20 -/* 804FF8 80244778 46180602 */ mul.s $f24, $f0, $f24 -/* 804FFC 8024477C 00000000 */ nop -/* 805000 80244780 3C028011 */ lui $v0, %hi(gPlayerStatus) -/* 805004 80244784 2442EFC8 */ addiu $v0, $v0, %lo(gPlayerStatus) -/* 805008 80244788 C4420028 */ lwc1 $f2, 0x28($v0) -/* 80500C 8024478C 46020002 */ mul.s $f0, $f0, $f2 -/* 805010 80244790 00000000 */ nop -/* 805014 80244794 4618B581 */ sub.s $f22, $f22, $f24 -/* 805018 80244798 46160000 */ add.s $f0, $f0, $f22 -/* 80501C 8024479C C4420030 */ lwc1 $f2, 0x30($v0) -/* 805020 802447A0 4600103C */ c.lt.s $f2, $f0 -/* 805024 802447A4 00000000 */ nop -/* 805028 802447A8 45000003 */ bc1f .L802447B8 -/* 80502C 802447AC 24020001 */ addiu $v0, $zero, 1 -/* 805030 802447B0 080911EF */ j .L802447BC -/* 805034 802447B4 AE200084 */ sw $zero, 0x84($s1) -.L802447B8: -/* 805038 802447B8 AE220084 */ sw $v0, 0x84($s1) -.L802447BC: -/* 80503C 802447BC 8FBF0018 */ lw $ra, 0x18($sp) -/* 805040 802447C0 8FB10014 */ lw $s1, 0x14($sp) -/* 805044 802447C4 8FB00010 */ lw $s0, 0x10($sp) -/* 805048 802447C8 D7B80030 */ ldc1 $f24, 0x30($sp) -/* 80504C 802447CC D7B60028 */ ldc1 $f22, 0x28($sp) -/* 805050 802447D0 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 805054 802447D4 24020002 */ addiu $v0, $zero, 2 -/* 805058 802447D8 03E00008 */ jr $ra -/* 80505C 802447DC 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/include/functions.h b/include/functions.h index 7a6b9ed69c..1f3d72256e 100644 --- a/include/functions.h +++ b/include/functions.h @@ -70,6 +70,7 @@ void set_curtain_fade(f32 scale); void fx_walk_normal(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4, s32 arg5); +f32 func_800E0088(f32, f32); s32 func_800EB168(s32); // Partner diff --git a/src/code_759b0_len_61b0.c b/src/code_759b0_len_61b0.c index 159fdaedc7..2f827e8efb 100644 --- a/src/code_759b0_len_61b0.c +++ b/src/code_759b0_len_61b0.c @@ -74,7 +74,7 @@ INCLUDE_ASM(s32, "code_759b0_len_61b0", func_800DFF78); INCLUDE_ASM(s32, "code_759b0_len_61b0", func_800DFFCC); -INCLUDE_ASM(s32, "code_759b0_len_61b0", func_800E0088); +INCLUDE_ASM(f32, "code_759b0_len_61b0", func_800E0088, f32 arg0, f32 arg1); void enable_player_shadow(void) { get_shadow_by_index(D_8010F094)->flags &= ~1; diff --git a/src/world/area_kmr/kmr_03/8C7F90.c b/src/world/area_kmr/kmr_03/8C7F90.c index ce0c09531c..99a6c04939 100644 --- a/src/world/area_kmr/kmr_03/8C7F90.c +++ b/src/world/area_kmr/kmr_03/8C7F90.c @@ -4,6 +4,11 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_03/8C7F90", func_80240000_8C7F90); #include "world/common/CheckPartnerFlags1000.inc.c" -INCLUDE_ASM(s32, "world/area_kmr/kmr_03/8C7F90", func_802401B0_8C8140); +ApiStatus func_802401B0_8C8140(ScriptInstance* script, s32 isInitialCall) { + Npc* npc = get_npc_unsafe(0); -INCLUDE_ASM(s32, "world/area_kmr/kmr_03/8C7F90", func_80240218_8C81A8); + script->varTable[1] = (func_800E0088(npc->pos.x, npc->pos.z) / npc->moveSpeed) * 0.8f; + return ApiStatus_DONE2; +} + +#include "world/common/UnkPositionFunc.inc.c" diff --git a/src/world/area_mac/mac_00/7EB340.c b/src/world/area_mac/mac_00/7EB340.c index 20fbbc1490..2678144c2e 100644 --- a/src/world/area_mac/mac_00/7EB340.c +++ b/src/world/area_mac/mac_00/7EB340.c @@ -78,25 +78,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241E80_7ECB90); INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80241FF0_7ECD00); -ApiStatus func_80242078_7ECD88(ScriptInstance* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - PlayerStatus* playerStatus = PLAYER_STATUS; - f32 var0 = get_variable(script, *args++); - f32 var1 = get_variable(script, *args++); - f32 var2 = get_variable(script, *args++); - f32 var3 = get_variable(script, *args++); - f32 temp; - - temp = (var3 - var1) / (var2 - var0); - - if (playerStatus->position.z < ((temp * playerStatus->position.x) + (var1 - (temp * var0)))) { - script->varTable[0] = 0; - } else { - script->varTable[0] = 1; - } - - return ApiStatus_DONE2; -} +#include "world/common/UnkPositionFunc.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80242178_7ECE88); diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index 843baa05ff..464f97b3ee 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -142,7 +142,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802443E0_804C60); INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802446AC_804F2C); -INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802446E0_804F60); +#include "world/common/UnkPositionFunc.inc.c" INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_802447E0_805060); diff --git a/src/world/common/UnkPositionFunc.inc.c b/src/world/common/UnkPositionFunc.inc.c new file mode 100644 index 0000000000..e55d810e98 --- /dev/null +++ b/src/world/common/UnkPositionFunc.inc.c @@ -0,0 +1,21 @@ +#include "common.h" + +static ApiStatus UnkPositionFunc(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + PlayerStatus* playerStatus = PLAYER_STATUS; + f32 var0 = get_variable(script, *args++); + f32 var1 = get_variable(script, *args++); + f32 var2 = get_variable(script, *args++); + f32 var3 = get_variable(script, *args++); + f32 temp; + + temp = (var3 - var1) / (var2 - var0); + + if (playerStatus->position.z < ((temp * playerStatus->position.x) + (var1 - (temp * var0)))) { + script->varTable[0] = 0; + } else { + script->varTable[0] = 1; + } + + return ApiStatus_DONE2; +} From a840d81a29279f62346766da84ed293d8e8eb504 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 30 Oct 2020 19:21:00 -0400 Subject: [PATCH 66/78] SetCamera0MoveFlagNeg1 --- .../flo_21/CE7240/func_80240CD0_CE73D0.s | 12 ----- .../hos_01/A11650/func_80240DD0_A11650.s | 11 ---- .../kmr_03/8C82B0/func_80240320_8C82B0.s | 11 ---- .../kmr_03/8C82B0/func_80240358_8C82E8.s | 50 ------------------- .../kpa_08/A4CA20/func_80240000_A4CA20.s | 11 ---- .../kpa_09/A4F000/func_80240000_A4F000.s | 11 ---- .../kzn_03/C63A10/func_80242D00_C63A10.s | 11 ---- .../kzn_23/C9C610/func_80240504_C9C804.s | 11 ---- .../obk_01/BBD1A0/func_80240000_BBD1A0.s | 11 ---- .../obk_05/BCD060/func_80240000_BCD060.s | 11 ---- .../omo_02/D9D4D0/func_80240000_D9D4D0.s | 11 ---- .../omo_03/DA5240/func_80240000_DA5240.s | 12 ----- .../omo_03/DA5260/func_80240020_DA5260.s | 11 ---- .../omo_04/DAD400/func_802402BC_DAD6BC.s | 11 ---- .../omo_06/DB7910/func_80240000_DB7910.s | 11 ---- .../omo_07/DC01D0/func_802431DC_DC048C.s | 11 ---- .../omo_08/DC43D0/func_80240000_DC43D0.s | 11 ---- .../omo_10/DD79B0/func_80240000_DD79B0.s | 11 ---- .../omo_16/DEBED0/func_80240000_DEBED0.s | 11 ---- .../omo_17/DEEEA0/func_80240000_DEEEA0.s | 11 ---- .../sam_07/D2BD30/func_80240634_D2C364.s | 11 ---- .../sam_11/D3A930/func_80240564_D3AB34.s | 11 ---- src/world/area_flo/flo_21/CE7240.c | 2 +- src/world/area_hos/hos_01/A11650.c | 2 +- src/world/area_kmr/kmr_03/8C7F90.c | 2 +- src/world/area_kmr/kmr_03/8C82B0.c | 14 +++++- src/world/area_kpa/kpa_08/A4CA20.c | 2 +- src/world/area_kpa/kpa_09/A4F000.c | 2 +- src/world/area_kzn/kzn_03/C63A10.c | 2 +- src/world/area_kzn/kzn_23/C9C610.c | 2 +- src/world/area_obk/obk_01/BBD1A0.c | 2 +- src/world/area_obk/obk_05/BCD060.c | 2 +- src/world/area_omo/omo_02/D9D4D0.c | 2 +- src/world/area_omo/omo_03/DA5240.c | 2 +- src/world/area_omo/omo_03/DA5260.c | 2 +- src/world/area_omo/omo_04/DAD400.c | 2 +- src/world/area_omo/omo_06/DB7910.c | 2 +- src/world/area_omo/omo_07/DC01D0.c | 2 +- src/world/area_omo/omo_08/DC43D0.c | 2 +- src/world/area_omo/omo_10/DD79B0.c | 2 +- src/world/area_omo/omo_16/DEBED0.c | 2 +- src/world/area_omo/omo_17/DEEEA0.c | 2 +- src/world/area_sam/sam_07/D2BD30.c | 2 +- src/world/area_sam/sam_11/D3A930.c | 2 +- src/world/common/SetCamera0MoveFlagNeg1.inc.c | 8 +++ 45 files changed, 41 insertions(+), 306 deletions(-) delete mode 100644 asm/nonmatchings/world/area_flo/flo_21/CE7240/func_80240CD0_CE73D0.s delete mode 100644 asm/nonmatchings/world/area_hos/hos_01/A11650/func_80240DD0_A11650.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_03/8C82B0/func_80240320_8C82B0.s delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_03/8C82B0/func_80240358_8C82E8.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_08/A4CA20/func_80240000_A4CA20.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_09/A4F000/func_80240000_A4F000.s delete mode 100644 asm/nonmatchings/world/area_kzn/kzn_03/C63A10/func_80242D00_C63A10.s delete mode 100644 asm/nonmatchings/world/area_kzn/kzn_23/C9C610/func_80240504_C9C804.s delete mode 100644 asm/nonmatchings/world/area_obk/obk_01/BBD1A0/func_80240000_BBD1A0.s delete mode 100644 asm/nonmatchings/world/area_obk/obk_05/BCD060/func_80240000_BCD060.s delete mode 100644 asm/nonmatchings/world/area_omo/omo_02/D9D4D0/func_80240000_D9D4D0.s delete mode 100644 asm/nonmatchings/world/area_omo/omo_03/DA5240/func_80240000_DA5240.s delete mode 100644 asm/nonmatchings/world/area_omo/omo_03/DA5260/func_80240020_DA5260.s delete mode 100644 asm/nonmatchings/world/area_omo/omo_04/DAD400/func_802402BC_DAD6BC.s delete mode 100644 asm/nonmatchings/world/area_omo/omo_06/DB7910/func_80240000_DB7910.s delete mode 100644 asm/nonmatchings/world/area_omo/omo_07/DC01D0/func_802431DC_DC048C.s delete mode 100644 asm/nonmatchings/world/area_omo/omo_08/DC43D0/func_80240000_DC43D0.s delete mode 100644 asm/nonmatchings/world/area_omo/omo_10/DD79B0/func_80240000_DD79B0.s delete mode 100644 asm/nonmatchings/world/area_omo/omo_16/DEBED0/func_80240000_DEBED0.s delete mode 100644 asm/nonmatchings/world/area_omo/omo_17/DEEEA0/func_80240000_DEEEA0.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_07/D2BD30/func_80240634_D2C364.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240564_D3AB34.s create mode 100644 src/world/common/SetCamera0MoveFlagNeg1.inc.c diff --git a/asm/nonmatchings/world/area_flo/flo_21/CE7240/func_80240CD0_CE73D0.s b/asm/nonmatchings/world/area_flo/flo_21/CE7240/func_80240CD0_CE73D0.s deleted file mode 100644 index b1f5761016..0000000000 --- a/asm/nonmatchings/world/area_flo/flo_21/CE7240/func_80240CD0_CE73D0.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240CD0_CE73D0 -/* CE73D0 80240CD0 3C03800B */ lui $v1, %hi(gCameras) -/* CE73D4 80240CD4 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* CE73D8 80240CD8 94620002 */ lhu $v0, 2($v1) -/* CE73DC 80240CDC 3042FFFE */ andi $v0, $v0, 0xfffe -/* CE73E0 80240CE0 A4620002 */ sh $v0, 2($v1) -/* CE73E4 80240CE4 03E00008 */ jr $ra -/* CE73E8 80240CE8 24020002 */ addiu $v0, $zero, 2 -/* CE73EC 80240CEC 00000000 */ nop diff --git a/asm/nonmatchings/world/area_hos/hos_01/A11650/func_80240DD0_A11650.s b/asm/nonmatchings/world/area_hos/hos_01/A11650/func_80240DD0_A11650.s deleted file mode 100644 index 73e5a9b404..0000000000 --- a/asm/nonmatchings/world/area_hos/hos_01/A11650/func_80240DD0_A11650.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240DD0_A11650 -/* A11650 80240DD0 3C03800B */ lui $v1, %hi(gCameras) -/* A11654 80240DD4 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* A11658 80240DD8 94620002 */ lhu $v0, 2($v1) -/* A1165C 80240DDC 3042FFFE */ andi $v0, $v0, 0xfffe -/* A11660 80240DE0 A4620002 */ sh $v0, 2($v1) -/* A11664 80240DE4 03E00008 */ jr $ra -/* A11668 80240DE8 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_kmr/kmr_03/8C82B0/func_80240320_8C82B0.s b/asm/nonmatchings/world/area_kmr/kmr_03/8C82B0/func_80240320_8C82B0.s deleted file mode 100644 index 17e67f0c2b..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_03/8C82B0/func_80240320_8C82B0.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240320_8C82B0 -/* 8C82B0 80240320 3C03800B */ lui $v1, %hi(gCameras) -/* 8C82B4 80240324 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* 8C82B8 80240328 94620002 */ lhu $v0, 2($v1) -/* 8C82BC 8024032C 3042FFFE */ andi $v0, $v0, 0xfffe -/* 8C82C0 80240330 A4620002 */ sh $v0, 2($v1) -/* 8C82C4 80240334 03E00008 */ jr $ra -/* 8C82C8 80240338 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_kmr/kmr_03/8C82B0/func_80240358_8C82E8.s b/asm/nonmatchings/world/area_kmr/kmr_03/8C82B0/func_80240358_8C82E8.s deleted file mode 100644 index effece0d26..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_03/8C82B0/func_80240358_8C82E8.s +++ /dev/null @@ -1,50 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240358_8C82E8 -/* 8C82E8 80240358 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 8C82EC 8024035C AFB00010 */ sw $s0, 0x10($sp) -/* 8C82F0 80240360 3C108011 */ lui $s0, %hi(gPlayerStatus) -/* 8C82F4 80240364 2610EFC8 */ addiu $s0, $s0, %lo(gPlayerStatus) -/* 8C82F8 80240368 AFBF0018 */ sw $ra, 0x18($sp) -/* 8C82FC 8024036C AFB10014 */ sw $s1, 0x14($sp) -/* 8C8300 80240370 F7B60028 */ sdc1 $f22, 0x28($sp) -/* 8C8304 80240374 F7B40020 */ sdc1 $f20, 0x20($sp) -/* 8C8308 80240378 C60C0080 */ lwc1 $f12, 0x80($s0) -/* 8C830C 8024037C 0C00A8BB */ jal sin_deg -/* 8C8310 80240380 0080882D */ daddu $s1, $a0, $zero -/* 8C8314 80240384 C6140054 */ lwc1 $f20, 0x54($s0) -/* 8C8318 80240388 3C0140A0 */ lui $at, 0x40a0 -/* 8C831C 8024038C 4481B000 */ mtc1 $at, $f22 -/* 8C8320 80240390 00000000 */ nop -/* 8C8324 80240394 4616A502 */ mul.s $f20, $f20, $f22 -/* 8C8328 80240398 00000000 */ nop -/* 8C832C 8024039C C60C0080 */ lwc1 $f12, 0x80($s0) -/* 8C8330 802403A0 4600A502 */ mul.s $f20, $f20, $f0 -/* 8C8334 802403A4 0C00A8D4 */ jal cos_deg -/* 8C8338 802403A8 00000000 */ nop -/* 8C833C 802403AC C6040054 */ lwc1 $f4, 0x54($s0) -/* 8C8340 802403B0 46162102 */ mul.s $f4, $f4, $f22 -/* 8C8344 802403B4 00000000 */ nop -/* 8C8348 802403B8 C6020028 */ lwc1 $f2, 0x28($s0) -/* 8C834C 802403BC 46141080 */ add.s $f2, $f2, $f20 -/* 8C8350 802403C0 46000007 */ neg.s $f0, $f0 -/* 8C8354 802403C4 46002102 */ mul.s $f4, $f4, $f0 -/* 8C8358 802403C8 00000000 */ nop -/* 8C835C 802403CC 4600118D */ trunc.w.s $f6, $f2 -/* 8C8360 802403D0 E6260084 */ swc1 $f6, 0x84($s1) -/* 8C8364 802403D4 C6000030 */ lwc1 $f0, 0x30($s0) -/* 8C8368 802403D8 46040000 */ add.s $f0, $f0, $f4 -/* 8C836C 802403DC 4600018D */ trunc.w.s $f6, $f0 -/* 8C8370 802403E0 E6260088 */ swc1 $f6, 0x88($s1) -/* 8C8374 802403E4 8FBF0018 */ lw $ra, 0x18($sp) -/* 8C8378 802403E8 8FB10014 */ lw $s1, 0x14($sp) -/* 8C837C 802403EC 8FB00010 */ lw $s0, 0x10($sp) -/* 8C8380 802403F0 D7B60028 */ ldc1 $f22, 0x28($sp) -/* 8C8384 802403F4 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 8C8388 802403F8 24020002 */ addiu $v0, $zero, 2 -/* 8C838C 802403FC 03E00008 */ jr $ra -/* 8C8390 80240400 27BD0030 */ addiu $sp, $sp, 0x30 -/* 8C8394 80240404 00000000 */ nop -/* 8C8398 80240408 00000000 */ nop -/* 8C839C 8024040C 00000000 */ nop diff --git a/asm/nonmatchings/world/area_kpa/kpa_08/A4CA20/func_80240000_A4CA20.s b/asm/nonmatchings/world/area_kpa/kpa_08/A4CA20/func_80240000_A4CA20.s deleted file mode 100644 index 72e9e5f6cf..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_08/A4CA20/func_80240000_A4CA20.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_A4CA20 -/* A4CA20 80240000 3C03800B */ lui $v1, %hi(gCameras) -/* A4CA24 80240004 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* A4CA28 80240008 94620002 */ lhu $v0, 2($v1) -/* A4CA2C 8024000C 3042FFFE */ andi $v0, $v0, 0xfffe -/* A4CA30 80240010 A4620002 */ sh $v0, 2($v1) -/* A4CA34 80240014 03E00008 */ jr $ra -/* A4CA38 80240018 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_kpa/kpa_09/A4F000/func_80240000_A4F000.s b/asm/nonmatchings/world/area_kpa/kpa_09/A4F000/func_80240000_A4F000.s deleted file mode 100644 index da980b58b2..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_09/A4F000/func_80240000_A4F000.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_A4F000 -/* A4F000 80240000 3C03800B */ lui $v1, %hi(gCameras) -/* A4F004 80240004 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* A4F008 80240008 94620002 */ lhu $v0, 2($v1) -/* A4F00C 8024000C 3042FFFE */ andi $v0, $v0, 0xfffe -/* A4F010 80240010 A4620002 */ sh $v0, 2($v1) -/* A4F014 80240014 03E00008 */ jr $ra -/* A4F018 80240018 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_kzn/kzn_03/C63A10/func_80242D00_C63A10.s b/asm/nonmatchings/world/area_kzn/kzn_03/C63A10/func_80242D00_C63A10.s deleted file mode 100644 index bd9af1c337..0000000000 --- a/asm/nonmatchings/world/area_kzn/kzn_03/C63A10/func_80242D00_C63A10.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242D00_C63A10 -/* C63A10 80242D00 3C03800B */ lui $v1, %hi(gCameras) -/* C63A14 80242D04 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* C63A18 80242D08 94620002 */ lhu $v0, 2($v1) -/* C63A1C 80242D0C 3042FFFE */ andi $v0, $v0, 0xfffe -/* C63A20 80242D10 A4620002 */ sh $v0, 2($v1) -/* C63A24 80242D14 03E00008 */ jr $ra -/* C63A28 80242D18 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_kzn/kzn_23/C9C610/func_80240504_C9C804.s b/asm/nonmatchings/world/area_kzn/kzn_23/C9C610/func_80240504_C9C804.s deleted file mode 100644 index c63af71641..0000000000 --- a/asm/nonmatchings/world/area_kzn/kzn_23/C9C610/func_80240504_C9C804.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240504_C9C804 -/* C9C804 80240504 3C03800B */ lui $v1, %hi(gCameras) -/* C9C808 80240508 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* C9C80C 8024050C 94620002 */ lhu $v0, 2($v1) -/* C9C810 80240510 3042FFFE */ andi $v0, $v0, 0xfffe -/* C9C814 80240514 A4620002 */ sh $v0, 2($v1) -/* C9C818 80240518 03E00008 */ jr $ra -/* C9C81C 8024051C 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_obk/obk_01/BBD1A0/func_80240000_BBD1A0.s b/asm/nonmatchings/world/area_obk/obk_01/BBD1A0/func_80240000_BBD1A0.s deleted file mode 100644 index 55cf04adcc..0000000000 --- a/asm/nonmatchings/world/area_obk/obk_01/BBD1A0/func_80240000_BBD1A0.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_BBD1A0 -/* BBD1A0 80240000 3C03800B */ lui $v1, %hi(gCameras) -/* BBD1A4 80240004 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* BBD1A8 80240008 94620002 */ lhu $v0, 2($v1) -/* BBD1AC 8024000C 3042FFFE */ andi $v0, $v0, 0xfffe -/* BBD1B0 80240010 A4620002 */ sh $v0, 2($v1) -/* BBD1B4 80240014 03E00008 */ jr $ra -/* BBD1B8 80240018 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_obk/obk_05/BCD060/func_80240000_BCD060.s b/asm/nonmatchings/world/area_obk/obk_05/BCD060/func_80240000_BCD060.s deleted file mode 100644 index 26bb939d74..0000000000 --- a/asm/nonmatchings/world/area_obk/obk_05/BCD060/func_80240000_BCD060.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_BCD060 -/* BCD060 80240000 3C03800B */ lui $v1, %hi(gCameras) -/* BCD064 80240004 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* BCD068 80240008 94620002 */ lhu $v0, 2($v1) -/* BCD06C 8024000C 3042FFFE */ andi $v0, $v0, 0xfffe -/* BCD070 80240010 A4620002 */ sh $v0, 2($v1) -/* BCD074 80240014 03E00008 */ jr $ra -/* BCD078 80240018 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_omo/omo_02/D9D4D0/func_80240000_D9D4D0.s b/asm/nonmatchings/world/area_omo/omo_02/D9D4D0/func_80240000_D9D4D0.s deleted file mode 100644 index 6ee826468d..0000000000 --- a/asm/nonmatchings/world/area_omo/omo_02/D9D4D0/func_80240000_D9D4D0.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_D9D4D0 -/* D9D4D0 80240000 3C03800B */ lui $v1, %hi(gCameras) -/* D9D4D4 80240004 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* D9D4D8 80240008 94620002 */ lhu $v0, 2($v1) -/* D9D4DC 8024000C 3042FFFE */ andi $v0, $v0, 0xfffe -/* D9D4E0 80240010 A4620002 */ sh $v0, 2($v1) -/* D9D4E4 80240014 03E00008 */ jr $ra -/* D9D4E8 80240018 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_omo/omo_03/DA5240/func_80240000_DA5240.s b/asm/nonmatchings/world/area_omo/omo_03/DA5240/func_80240000_DA5240.s deleted file mode 100644 index 43fb01848c..0000000000 --- a/asm/nonmatchings/world/area_omo/omo_03/DA5240/func_80240000_DA5240.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_DA5240 -/* DA5240 80240000 3C03800B */ lui $v1, %hi(gCameras) -/* DA5244 80240004 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* DA5248 80240008 94620002 */ lhu $v0, 2($v1) -/* DA524C 8024000C 3042FFFE */ andi $v0, $v0, 0xfffe -/* DA5250 80240010 A4620002 */ sh $v0, 2($v1) -/* DA5254 80240014 03E00008 */ jr $ra -/* DA5258 80240018 24020002 */ addiu $v0, $zero, 2 -/* DA525C 8024001C 00000000 */ nop diff --git a/asm/nonmatchings/world/area_omo/omo_03/DA5260/func_80240020_DA5260.s b/asm/nonmatchings/world/area_omo/omo_03/DA5260/func_80240020_DA5260.s deleted file mode 100644 index 54c04b44c0..0000000000 --- a/asm/nonmatchings/world/area_omo/omo_03/DA5260/func_80240020_DA5260.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240020_DA5260 -/* DA5260 80240020 3C03800B */ lui $v1, %hi(gCameras) -/* DA5264 80240024 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* DA5268 80240028 94620002 */ lhu $v0, 2($v1) -/* DA526C 8024002C 3042FFFE */ andi $v0, $v0, 0xfffe -/* DA5270 80240030 A4620002 */ sh $v0, 2($v1) -/* DA5274 80240034 03E00008 */ jr $ra -/* DA5278 80240038 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_omo/omo_04/DAD400/func_802402BC_DAD6BC.s b/asm/nonmatchings/world/area_omo/omo_04/DAD400/func_802402BC_DAD6BC.s deleted file mode 100644 index ac128cb628..0000000000 --- a/asm/nonmatchings/world/area_omo/omo_04/DAD400/func_802402BC_DAD6BC.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802402BC_DAD6BC -/* DAD6BC 802402BC 3C03800B */ lui $v1, %hi(gCameras) -/* DAD6C0 802402C0 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* DAD6C4 802402C4 94620002 */ lhu $v0, 2($v1) -/* DAD6C8 802402C8 3042FFFE */ andi $v0, $v0, 0xfffe -/* DAD6CC 802402CC A4620002 */ sh $v0, 2($v1) -/* DAD6D0 802402D0 03E00008 */ jr $ra -/* DAD6D4 802402D4 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_omo/omo_06/DB7910/func_80240000_DB7910.s b/asm/nonmatchings/world/area_omo/omo_06/DB7910/func_80240000_DB7910.s deleted file mode 100644 index 8bc16f1e64..0000000000 --- a/asm/nonmatchings/world/area_omo/omo_06/DB7910/func_80240000_DB7910.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_DB7910 -/* DB7910 80240000 3C03800B */ lui $v1, %hi(gCameras) -/* DB7914 80240004 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* DB7918 80240008 94620002 */ lhu $v0, 2($v1) -/* DB791C 8024000C 3042FFFE */ andi $v0, $v0, 0xfffe -/* DB7920 80240010 A4620002 */ sh $v0, 2($v1) -/* DB7924 80240014 03E00008 */ jr $ra -/* DB7928 80240018 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_omo/omo_07/DC01D0/func_802431DC_DC048C.s b/asm/nonmatchings/world/area_omo/omo_07/DC01D0/func_802431DC_DC048C.s deleted file mode 100644 index 1d9f7dab27..0000000000 --- a/asm/nonmatchings/world/area_omo/omo_07/DC01D0/func_802431DC_DC048C.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802431DC_DC048C -/* DC048C 802431DC 3C03800B */ lui $v1, %hi(gCameras) -/* DC0490 802431E0 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* DC0494 802431E4 94620002 */ lhu $v0, 2($v1) -/* DC0498 802431E8 3042FFFE */ andi $v0, $v0, 0xfffe -/* DC049C 802431EC A4620002 */ sh $v0, 2($v1) -/* DC04A0 802431F0 03E00008 */ jr $ra -/* DC04A4 802431F4 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_omo/omo_08/DC43D0/func_80240000_DC43D0.s b/asm/nonmatchings/world/area_omo/omo_08/DC43D0/func_80240000_DC43D0.s deleted file mode 100644 index c885b959f2..0000000000 --- a/asm/nonmatchings/world/area_omo/omo_08/DC43D0/func_80240000_DC43D0.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_DC43D0 -/* DC43D0 80240000 3C03800B */ lui $v1, %hi(gCameras) -/* DC43D4 80240004 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* DC43D8 80240008 94620002 */ lhu $v0, 2($v1) -/* DC43DC 8024000C 3042FFFE */ andi $v0, $v0, 0xfffe -/* DC43E0 80240010 A4620002 */ sh $v0, 2($v1) -/* DC43E4 80240014 03E00008 */ jr $ra -/* DC43E8 80240018 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_omo/omo_10/DD79B0/func_80240000_DD79B0.s b/asm/nonmatchings/world/area_omo/omo_10/DD79B0/func_80240000_DD79B0.s deleted file mode 100644 index 3a5f09e35f..0000000000 --- a/asm/nonmatchings/world/area_omo/omo_10/DD79B0/func_80240000_DD79B0.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_DD79B0 -/* DD79B0 80240000 3C03800B */ lui $v1, %hi(gCameras) -/* DD79B4 80240004 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* DD79B8 80240008 94620002 */ lhu $v0, 2($v1) -/* DD79BC 8024000C 3042FFFE */ andi $v0, $v0, 0xfffe -/* DD79C0 80240010 A4620002 */ sh $v0, 2($v1) -/* DD79C4 80240014 03E00008 */ jr $ra -/* DD79C8 80240018 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_omo/omo_16/DEBED0/func_80240000_DEBED0.s b/asm/nonmatchings/world/area_omo/omo_16/DEBED0/func_80240000_DEBED0.s deleted file mode 100644 index 9620b34659..0000000000 --- a/asm/nonmatchings/world/area_omo/omo_16/DEBED0/func_80240000_DEBED0.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_DEBED0 -/* DEBED0 80240000 3C03800B */ lui $v1, %hi(gCameras) -/* DEBED4 80240004 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* DEBED8 80240008 94620002 */ lhu $v0, 2($v1) -/* DEBEDC 8024000C 3042FFFE */ andi $v0, $v0, 0xfffe -/* DEBEE0 80240010 A4620002 */ sh $v0, 2($v1) -/* DEBEE4 80240014 03E00008 */ jr $ra -/* DEBEE8 80240018 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_omo/omo_17/DEEEA0/func_80240000_DEEEA0.s b/asm/nonmatchings/world/area_omo/omo_17/DEEEA0/func_80240000_DEEEA0.s deleted file mode 100644 index 240afc7ea8..0000000000 --- a/asm/nonmatchings/world/area_omo/omo_17/DEEEA0/func_80240000_DEEEA0.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_DEEEA0 -/* DEEEA0 80240000 3C03800B */ lui $v1, %hi(gCameras) -/* DEEEA4 80240004 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* DEEEA8 80240008 94620002 */ lhu $v0, 2($v1) -/* DEEEAC 8024000C 3042FFFE */ andi $v0, $v0, 0xfffe -/* DEEEB0 80240010 A4620002 */ sh $v0, 2($v1) -/* DEEEB4 80240014 03E00008 */ jr $ra -/* DEEEB8 80240018 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_sam/sam_07/D2BD30/func_80240634_D2C364.s b/asm/nonmatchings/world/area_sam/sam_07/D2BD30/func_80240634_D2C364.s deleted file mode 100644 index 9a25be2d33..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_07/D2BD30/func_80240634_D2C364.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240634_D2C364 -/* D2C364 80240634 3C03800B */ lui $v1, %hi(gCameras) -/* D2C368 80240638 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* D2C36C 8024063C 94620002 */ lhu $v0, 2($v1) -/* D2C370 80240640 3042FFFE */ andi $v0, $v0, 0xfffe -/* D2C374 80240644 A4620002 */ sh $v0, 2($v1) -/* D2C378 80240648 03E00008 */ jr $ra -/* D2C37C 8024064C 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240564_D3AB34.s b/asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240564_D3AB34.s deleted file mode 100644 index cf8cb93fce..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240564_D3AB34.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240564_D3AB34 -/* D3AB34 80240564 3C03800B */ lui $v1, %hi(gCameras) -/* D3AB38 80240568 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* D3AB3C 8024056C 94620002 */ lhu $v0, 2($v1) -/* D3AB40 80240570 3042FFFE */ andi $v0, $v0, 0xfffe -/* D3AB44 80240574 A4620002 */ sh $v0, 2($v1) -/* D3AB48 80240578 03E00008 */ jr $ra -/* D3AB4C 8024057C 24020002 */ addiu $v0, $zero, 2 diff --git a/src/world/area_flo/flo_21/CE7240.c b/src/world/area_flo/flo_21/CE7240.c index eb91a1e40f..5ad3269b51 100644 --- a/src/world/area_flo/flo_21/CE7240.c +++ b/src/world/area_flo/flo_21/CE7240.c @@ -2,4 +2,4 @@ INCLUDE_ASM(s32, "world/area_flo/flo_21/CE7240", func_80240B40_CE7240); -INCLUDE_ASM(s32, "world/area_flo/flo_21/CE7240", func_80240CD0_CE73D0); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" diff --git a/src/world/area_hos/hos_01/A11650.c b/src/world/area_hos/hos_01/A11650.c index d7dd3543b5..3c4ac75a90 100644 --- a/src/world/area_hos/hos_01/A11650.c +++ b/src/world/area_hos/hos_01/A11650.c @@ -1,5 +1,5 @@ #include "hos_01.h" -INCLUDE_ASM(s32, "world/area_hos/hos_01/A11650", func_80240DD0_A11650); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" INCLUDE_ASM(s32, "world/area_hos/hos_01/A11650", func_80240DEC_A1166C); diff --git a/src/world/area_kmr/kmr_03/8C7F90.c b/src/world/area_kmr/kmr_03/8C7F90.c index 99a6c04939..1df8fe4a77 100644 --- a/src/world/area_kmr/kmr_03/8C7F90.c +++ b/src/world/area_kmr/kmr_03/8C7F90.c @@ -7,7 +7,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_03/8C7F90", func_80240000_8C7F90); ApiStatus func_802401B0_8C8140(ScriptInstance* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(0); - script->varTable[1] = (func_800E0088(npc->pos.x, npc->pos.z) / npc->moveSpeed) * 0.8f; + script->varTable[1] = func_800E0088(npc->pos.x, npc->pos.z) / npc->moveSpeed * 0.8f; return ApiStatus_DONE2; } diff --git a/src/world/area_kmr/kmr_03/8C82B0.c b/src/world/area_kmr/kmr_03/8C82B0.c index 9439c357df..f20c700cd1 100644 --- a/src/world/area_kmr/kmr_03/8C82B0.c +++ b/src/world/area_kmr/kmr_03/8C82B0.c @@ -1,7 +1,17 @@ #include "kmr_03.h" -INCLUDE_ASM(s32, "world/area_kmr/kmr_03/8C82B0", func_80240320_8C82B0); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" INCLUDE_ASM(s32, "world/area_kmr/kmr_03/8C82B0", func_8024033C_8C82CC); -INCLUDE_ASM(s32, "world/area_kmr/kmr_03/8C82B0", func_80240358_8C82E8); +ApiStatus func_80240358_8C82E8(ScriptInstance* script, s32 isInitialCall) { + PlayerStatus* playerStatus = PLAYER_STATUS; + + f32 xDelta = playerStatus->currentSpeed * 5.0f * sin_deg(playerStatus->targetYaw); + f32 zDelta = playerStatus->currentSpeed * 5.0f * -cos_deg(playerStatus->targetYaw); + + script->varTable[0] = playerStatus->position.x + xDelta; + script->varTable[1] = playerStatus->position.z + zDelta; + + return ApiStatus_DONE2; +} diff --git a/src/world/area_kpa/kpa_08/A4CA20.c b/src/world/area_kpa/kpa_08/A4CA20.c index 6b5ee573d8..fcf9e782ba 100644 --- a/src/world/area_kpa/kpa_08/A4CA20.c +++ b/src/world/area_kpa/kpa_08/A4CA20.c @@ -1,5 +1,5 @@ #include "kpa_08.h" -INCLUDE_ASM(s32, "world/area_kpa/kpa_08/A4CA20", func_80240000_A4CA20); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_08/A4CA20", func_8024001C_A4CA3C); diff --git a/src/world/area_kpa/kpa_09/A4F000.c b/src/world/area_kpa/kpa_09/A4F000.c index 3adb5a4a96..1288757674 100644 --- a/src/world/area_kpa/kpa_09/A4F000.c +++ b/src/world/area_kpa/kpa_09/A4F000.c @@ -1,5 +1,5 @@ #include "kpa_09.h" -INCLUDE_ASM(s32, "world/area_kpa/kpa_09/A4F000", func_80240000_A4F000); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_09/A4F000", func_8024001C_A4F01C); diff --git a/src/world/area_kzn/kzn_03/C63A10.c b/src/world/area_kzn/kzn_03/C63A10.c index 2860ab05a8..0b94192ece 100644 --- a/src/world/area_kzn/kzn_03/C63A10.c +++ b/src/world/area_kzn/kzn_03/C63A10.c @@ -1,6 +1,6 @@ #include "kzn_03.h" -INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C63A10", func_80242D00_C63A10); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C63A10", func_80242D1C_C63A2C); diff --git a/src/world/area_kzn/kzn_23/C9C610.c b/src/world/area_kzn/kzn_23/C9C610.c index c021165caf..ab601cd877 100644 --- a/src/world/area_kzn/kzn_23/C9C610.c +++ b/src/world/area_kzn/kzn_23/C9C610.c @@ -6,6 +6,6 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_23/C9C610", func_80240310_C9C610); INCLUDE_ASM(s32, "world/area_kzn/kzn_23/C9C610", func_80240478_C9C778); -INCLUDE_ASM(s32, "world/area_kzn/kzn_23/C9C610", func_80240504_C9C804); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" INCLUDE_ASM(s32, "world/area_kzn/kzn_23/C9C610", func_80240520_C9C820); diff --git a/src/world/area_obk/obk_01/BBD1A0.c b/src/world/area_obk/obk_01/BBD1A0.c index f5ce2f9247..52d905b650 100644 --- a/src/world/area_obk/obk_01/BBD1A0.c +++ b/src/world/area_obk/obk_01/BBD1A0.c @@ -1,6 +1,6 @@ #include "obk_01.h" -INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD1A0", func_80240000_BBD1A0); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD1A0", func_8024001C_BBD1BC); diff --git a/src/world/area_obk/obk_05/BCD060.c b/src/world/area_obk/obk_05/BCD060.c index 4b79d59b6a..72a1fba13b 100644 --- a/src/world/area_obk/obk_05/BCD060.c +++ b/src/world/area_obk/obk_05/BCD060.c @@ -1,6 +1,6 @@ #include "obk_05.h" -INCLUDE_ASM(s32, "world/area_obk/obk_05/BCD060", func_80240000_BCD060); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" INCLUDE_ASM(s32, "world/area_obk/obk_05/BCD060", func_8024001C_BCD07C); diff --git a/src/world/area_omo/omo_02/D9D4D0.c b/src/world/area_omo/omo_02/D9D4D0.c index 00d44b5d14..197dc117a8 100644 --- a/src/world/area_omo/omo_02/D9D4D0.c +++ b/src/world/area_omo/omo_02/D9D4D0.c @@ -1,5 +1,5 @@ #include "omo_02.h" -INCLUDE_ASM(s32, "world/area_omo/omo_02/D9D4D0", func_80240000_D9D4D0); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" INCLUDE_ASM(s32, "world/area_omo/omo_02/D9D4D0", func_8024001C_D9D4EC); diff --git a/src/world/area_omo/omo_03/DA5240.c b/src/world/area_omo/omo_03/DA5240.c index ad3c064d3b..d99f607597 100644 --- a/src/world/area_omo/omo_03/DA5240.c +++ b/src/world/area_omo/omo_03/DA5240.c @@ -1,3 +1,3 @@ #include "omo_03.h" -INCLUDE_ASM(s32, "world/area_omo/omo_03/DA5240", func_80240000_DA5240); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" diff --git a/src/world/area_omo/omo_03/DA5260.c b/src/world/area_omo/omo_03/DA5260.c index 021fb470e8..e8c05a16e4 100644 --- a/src/world/area_omo/omo_03/DA5260.c +++ b/src/world/area_omo/omo_03/DA5260.c @@ -1,6 +1,6 @@ #include "omo_03.h" -INCLUDE_ASM(s32, "world/area_omo/omo_03/DA5260", func_80240020_DA5260); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" INCLUDE_ASM(s32, "world/area_omo/omo_03/DA5260", func_8024003C_DA527C); diff --git a/src/world/area_omo/omo_04/DAD400.c b/src/world/area_omo/omo_04/DAD400.c index 1f1b8f5d20..321a498bc0 100644 --- a/src/world/area_omo/omo_04/DAD400.c +++ b/src/world/area_omo/omo_04/DAD400.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_80240000_DAD400); INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_80240268_DAD668); -INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_802402BC_DAD6BC); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_802402D8_DAD6D8); diff --git a/src/world/area_omo/omo_06/DB7910.c b/src/world/area_omo/omo_06/DB7910.c index 1a028b8506..add620ef94 100644 --- a/src/world/area_omo/omo_06/DB7910.c +++ b/src/world/area_omo/omo_06/DB7910.c @@ -1,6 +1,6 @@ #include "omo_06.h" -INCLUDE_ASM(s32, "world/area_omo/omo_06/DB7910", func_80240000_DB7910); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" INCLUDE_ASM(s32, "world/area_omo/omo_06/DB7910", func_8024001C_DB792C); diff --git a/src/world/area_omo/omo_07/DC01D0.c b/src/world/area_omo/omo_07/DC01D0.c index fd8cdb1857..a80b126f1a 100644 --- a/src/world/area_omo/omo_07/DC01D0.c +++ b/src/world/area_omo/omo_07/DC01D0.c @@ -8,6 +8,6 @@ INCLUDE_ASM(s32, "world/area_omo/omo_07/DC01D0", func_80242F20_DC01D0); INCLUDE_ASM(s32, "world/area_omo/omo_07/DC01D0", func_80243188_DC0438); -INCLUDE_ASM(s32, "world/area_omo/omo_07/DC01D0", func_802431DC_DC048C); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" INCLUDE_ASM(s32, "world/area_omo/omo_07/DC01D0", func_802431F8_DC04A8); diff --git a/src/world/area_omo/omo_08/DC43D0.c b/src/world/area_omo/omo_08/DC43D0.c index 7a5f2089f3..2c60cef685 100644 --- a/src/world/area_omo/omo_08/DC43D0.c +++ b/src/world/area_omo/omo_08/DC43D0.c @@ -1,6 +1,6 @@ #include "omo_08.h" -INCLUDE_ASM(s32, "world/area_omo/omo_08/DC43D0", func_80240000_DC43D0); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" INCLUDE_ASM(s32, "world/area_omo/omo_08/DC43D0", func_8024001C_DC43EC); diff --git a/src/world/area_omo/omo_10/DD79B0.c b/src/world/area_omo/omo_10/DD79B0.c index 0c29b20e6b..2ebfd8a10d 100644 --- a/src/world/area_omo/omo_10/DD79B0.c +++ b/src/world/area_omo/omo_10/DD79B0.c @@ -1,6 +1,6 @@ #include "omo_10.h" -INCLUDE_ASM(s32, "world/area_omo/omo_10/DD79B0", func_80240000_DD79B0); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" INCLUDE_ASM(s32, "world/area_omo/omo_10/DD79B0", func_8024001C_DD79CC); diff --git a/src/world/area_omo/omo_16/DEBED0.c b/src/world/area_omo/omo_16/DEBED0.c index ae24b76952..f154aae5c8 100644 --- a/src/world/area_omo/omo_16/DEBED0.c +++ b/src/world/area_omo/omo_16/DEBED0.c @@ -1,6 +1,6 @@ #include "omo_16.h" -INCLUDE_ASM(s32, "world/area_omo/omo_16/DEBED0", func_80240000_DEBED0); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" INCLUDE_ASM(s32, "world/area_omo/omo_16/DEBED0", func_8024001C_DEBEEC); diff --git a/src/world/area_omo/omo_17/DEEEA0.c b/src/world/area_omo/omo_17/DEEEA0.c index 5631685897..a9cd5069d4 100644 --- a/src/world/area_omo/omo_17/DEEEA0.c +++ b/src/world/area_omo/omo_17/DEEEA0.c @@ -1,6 +1,6 @@ #include "omo_17.h" -INCLUDE_ASM(s32, "world/area_omo/omo_17/DEEEA0", func_80240000_DEEEA0); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" INCLUDE_ASM(s32, "world/area_omo/omo_17/DEEEA0", func_8024001C_DEEEBC); diff --git a/src/world/area_sam/sam_07/D2BD30.c b/src/world/area_sam/sam_07/D2BD30.c index 9af80c6844..7b334b26a9 100644 --- a/src/world/area_sam/sam_07/D2BD30.c +++ b/src/world/area_sam/sam_07/D2BD30.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_07/D2BD30", func_80240448_D2C178); INCLUDE_ASM(s32, "world/area_sam/sam_07/D2BD30", func_802405B0_D2C2E0); -INCLUDE_ASM(s32, "world/area_sam/sam_07/D2BD30", func_80240634_D2C364); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_07/D2BD30", func_80240650_D2C380); diff --git a/src/world/area_sam/sam_11/D3A930.c b/src/world/area_sam/sam_11/D3A930.c index 33450ec0ed..ed38a0c603 100644 --- a/src/world/area_sam/sam_11/D3A930.c +++ b/src/world/area_sam/sam_11/D3A930.c @@ -15,7 +15,7 @@ static ApiStatus Set80151310_0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_80240564_D3AB34); +#include "world/common/SetCamera0MoveFlagNeg1.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_80240580_D3AB50); diff --git a/src/world/common/SetCamera0MoveFlagNeg1.inc.c b/src/world/common/SetCamera0MoveFlagNeg1.inc.c new file mode 100644 index 0000000000..f8e815371a --- /dev/null +++ b/src/world/common/SetCamera0MoveFlagNeg1.inc.c @@ -0,0 +1,8 @@ +#include "common.h" + +static ApiStatus SetCamera0MoveFlagNeg1(ScriptInstance* script, s32 isInitialCall) { + Camera* camera = &gCameras[0]; + + camera->moveFlags &= ~1; + return ApiStatus_DONE2; +} From fc5dcf43ead9159a06b0ddf4eb52c57c0378e952 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 30 Oct 2020 19:25:07 -0400 Subject: [PATCH 67/78] Camera0MoveFlag1 --- .../area_kmr/kmr_03/8C82B0/func_8024033C_8C82CC.s | 11 ----------- .../area_kzn/kzn_03/C63A10/func_80242D1C_C63A2C.s | 11 ----------- .../area_obk/obk_01/BBD1A0/func_8024001C_BBD1BC.s | 11 ----------- .../area_obk/obk_05/BCD060/func_8024001C_BCD07C.s | 11 ----------- .../area_omo/omo_02/D9D4D0/func_8024001C_D9D4EC.s | 13 ------------- .../area_omo/omo_04/DAD400/func_802402D8_DAD6D8.s | 11 ----------- .../area_omo/omo_07/DC01D0/func_802431F8_DC04A8.s | 14 -------------- .../area_sam/sam_11/D3A930/func_80240580_D3AB50.s | 11 ----------- src/world/area_flo/flo_21/CE7240.c | 2 +- src/world/area_hos/hos_01/A11650.c | 2 +- src/world/area_kmr/kmr_03/8C82B0.c | 4 ++-- src/world/area_kpa/kpa_08/A4CA20.c | 2 +- src/world/area_kpa/kpa_09/A4F000.c | 2 +- src/world/area_kzn/kzn_03/C63A10.c | 4 ++-- src/world/area_kzn/kzn_23/C9C610.c | 2 +- src/world/area_obk/obk_01/BBD1A0.c | 4 ++-- src/world/area_obk/obk_05/BCD060.c | 4 ++-- src/world/area_omo/omo_02/D9D4D0.c | 4 ++-- src/world/area_omo/omo_03/DA5240.c | 2 +- src/world/area_omo/omo_03/DA5260.c | 2 +- src/world/area_omo/omo_04/DAD400.c | 4 ++-- src/world/area_omo/omo_06/DB7910.c | 2 +- src/world/area_omo/omo_07/DC01D0.c | 4 ++-- src/world/area_omo/omo_08/DC43D0.c | 2 +- src/world/area_omo/omo_10/DD79B0.c | 2 +- src/world/area_omo/omo_16/DEBED0.c | 2 +- src/world/area_omo/omo_17/DEEEA0.c | 2 +- src/world/area_sam/sam_07/D2BD30.c | 2 +- src/world/area_sam/sam_11/D3A930.c | 4 ++-- src/world/common/SetCamera0MoveFlag1.inc.c | 8 ++++++++ ...eFlagNeg1.inc.c => UnsetCamera0MoveFlag1.inc.c} | 2 +- 31 files changed, 38 insertions(+), 123 deletions(-) delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_03/8C82B0/func_8024033C_8C82CC.s delete mode 100644 asm/nonmatchings/world/area_kzn/kzn_03/C63A10/func_80242D1C_C63A2C.s delete mode 100644 asm/nonmatchings/world/area_obk/obk_01/BBD1A0/func_8024001C_BBD1BC.s delete mode 100644 asm/nonmatchings/world/area_obk/obk_05/BCD060/func_8024001C_BCD07C.s delete mode 100644 asm/nonmatchings/world/area_omo/omo_02/D9D4D0/func_8024001C_D9D4EC.s delete mode 100644 asm/nonmatchings/world/area_omo/omo_04/DAD400/func_802402D8_DAD6D8.s delete mode 100644 asm/nonmatchings/world/area_omo/omo_07/DC01D0/func_802431F8_DC04A8.s delete mode 100644 asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240580_D3AB50.s create mode 100644 src/world/common/SetCamera0MoveFlag1.inc.c rename src/world/common/{SetCamera0MoveFlagNeg1.inc.c => UnsetCamera0MoveFlag1.inc.c} (57%) diff --git a/asm/nonmatchings/world/area_kmr/kmr_03/8C82B0/func_8024033C_8C82CC.s b/asm/nonmatchings/world/area_kmr/kmr_03/8C82B0/func_8024033C_8C82CC.s deleted file mode 100644 index 591712fcff..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_03/8C82B0/func_8024033C_8C82CC.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024033C_8C82CC -/* 8C82CC 8024033C 3C03800B */ lui $v1, %hi(gCameras) -/* 8C82D0 80240340 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* 8C82D4 80240344 94620002 */ lhu $v0, 2($v1) -/* 8C82D8 80240348 34420001 */ ori $v0, $v0, 1 -/* 8C82DC 8024034C A4620002 */ sh $v0, 2($v1) -/* 8C82E0 80240350 03E00008 */ jr $ra -/* 8C82E4 80240354 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_kzn/kzn_03/C63A10/func_80242D1C_C63A2C.s b/asm/nonmatchings/world/area_kzn/kzn_03/C63A10/func_80242D1C_C63A2C.s deleted file mode 100644 index 02d3b3b4da..0000000000 --- a/asm/nonmatchings/world/area_kzn/kzn_03/C63A10/func_80242D1C_C63A2C.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242D1C_C63A2C -/* C63A2C 80242D1C 3C03800B */ lui $v1, %hi(gCameras) -/* C63A30 80242D20 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* C63A34 80242D24 94620002 */ lhu $v0, 2($v1) -/* C63A38 80242D28 34420001 */ ori $v0, $v0, 1 -/* C63A3C 80242D2C A4620002 */ sh $v0, 2($v1) -/* C63A40 80242D30 03E00008 */ jr $ra -/* C63A44 80242D34 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_obk/obk_01/BBD1A0/func_8024001C_BBD1BC.s b/asm/nonmatchings/world/area_obk/obk_01/BBD1A0/func_8024001C_BBD1BC.s deleted file mode 100644 index a172df636a..0000000000 --- a/asm/nonmatchings/world/area_obk/obk_01/BBD1A0/func_8024001C_BBD1BC.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024001C_BBD1BC -/* BBD1BC 8024001C 3C03800B */ lui $v1, %hi(gCameras) -/* BBD1C0 80240020 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* BBD1C4 80240024 94620002 */ lhu $v0, 2($v1) -/* BBD1C8 80240028 34420001 */ ori $v0, $v0, 1 -/* BBD1CC 8024002C A4620002 */ sh $v0, 2($v1) -/* BBD1D0 80240030 03E00008 */ jr $ra -/* BBD1D4 80240034 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_obk/obk_05/BCD060/func_8024001C_BCD07C.s b/asm/nonmatchings/world/area_obk/obk_05/BCD060/func_8024001C_BCD07C.s deleted file mode 100644 index 49fe2f9e41..0000000000 --- a/asm/nonmatchings/world/area_obk/obk_05/BCD060/func_8024001C_BCD07C.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024001C_BCD07C -/* BCD07C 8024001C 3C03800B */ lui $v1, %hi(gCameras) -/* BCD080 80240020 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* BCD084 80240024 94620002 */ lhu $v0, 2($v1) -/* BCD088 80240028 34420001 */ ori $v0, $v0, 1 -/* BCD08C 8024002C A4620002 */ sh $v0, 2($v1) -/* BCD090 80240030 03E00008 */ jr $ra -/* BCD094 80240034 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_omo/omo_02/D9D4D0/func_8024001C_D9D4EC.s b/asm/nonmatchings/world/area_omo/omo_02/D9D4D0/func_8024001C_D9D4EC.s deleted file mode 100644 index 0b30e39460..0000000000 --- a/asm/nonmatchings/world/area_omo/omo_02/D9D4D0/func_8024001C_D9D4EC.s +++ /dev/null @@ -1,13 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024001C_D9D4EC -/* D9D4EC 8024001C 3C03800B */ lui $v1, %hi(gCameras) -/* D9D4F0 80240020 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* D9D4F4 80240024 94620002 */ lhu $v0, 2($v1) -/* D9D4F8 80240028 34420001 */ ori $v0, $v0, 1 -/* D9D4FC 8024002C A4620002 */ sh $v0, 2($v1) -/* D9D500 80240030 03E00008 */ jr $ra -/* D9D504 80240034 24020002 */ addiu $v0, $zero, 2 -/* D9D508 80240038 00000000 */ nop -/* D9D50C 8024003C 00000000 */ nop diff --git a/asm/nonmatchings/world/area_omo/omo_04/DAD400/func_802402D8_DAD6D8.s b/asm/nonmatchings/world/area_omo/omo_04/DAD400/func_802402D8_DAD6D8.s deleted file mode 100644 index 097155a3cd..0000000000 --- a/asm/nonmatchings/world/area_omo/omo_04/DAD400/func_802402D8_DAD6D8.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802402D8_DAD6D8 -/* DAD6D8 802402D8 3C03800B */ lui $v1, %hi(gCameras) -/* DAD6DC 802402DC 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* DAD6E0 802402E0 94620002 */ lhu $v0, 2($v1) -/* DAD6E4 802402E4 34420001 */ ori $v0, $v0, 1 -/* DAD6E8 802402E8 A4620002 */ sh $v0, 2($v1) -/* DAD6EC 802402EC 03E00008 */ jr $ra -/* DAD6F0 802402F0 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/world/area_omo/omo_07/DC01D0/func_802431F8_DC04A8.s b/asm/nonmatchings/world/area_omo/omo_07/DC01D0/func_802431F8_DC04A8.s deleted file mode 100644 index fabc1ad94e..0000000000 --- a/asm/nonmatchings/world/area_omo/omo_07/DC01D0/func_802431F8_DC04A8.s +++ /dev/null @@ -1,14 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802431F8_DC04A8 -/* DC04A8 802431F8 3C03800B */ lui $v1, %hi(gCameras) -/* DC04AC 802431FC 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* DC04B0 80243200 94620002 */ lhu $v0, 2($v1) -/* DC04B4 80243204 34420001 */ ori $v0, $v0, 1 -/* DC04B8 80243208 A4620002 */ sh $v0, 2($v1) -/* DC04BC 8024320C 03E00008 */ jr $ra -/* DC04C0 80243210 24020002 */ addiu $v0, $zero, 2 -/* DC04C4 80243214 00000000 */ nop -/* DC04C8 80243218 00000000 */ nop -/* DC04CC 8024321C 00000000 */ nop diff --git a/asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240580_D3AB50.s b/asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240580_D3AB50.s deleted file mode 100644 index 96c12a0374..0000000000 --- a/asm/nonmatchings/world/area_sam/sam_11/D3A930/func_80240580_D3AB50.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240580_D3AB50 -/* D3AB50 80240580 3C03800B */ lui $v1, %hi(gCameras) -/* D3AB54 80240584 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* D3AB58 80240588 94620002 */ lhu $v0, 2($v1) -/* D3AB5C 8024058C 34420001 */ ori $v0, $v0, 1 -/* D3AB60 80240590 A4620002 */ sh $v0, 2($v1) -/* D3AB64 80240594 03E00008 */ jr $ra -/* D3AB68 80240598 24020002 */ addiu $v0, $zero, 2 diff --git a/src/world/area_flo/flo_21/CE7240.c b/src/world/area_flo/flo_21/CE7240.c index 5ad3269b51..404d858ed5 100644 --- a/src/world/area_flo/flo_21/CE7240.c +++ b/src/world/area_flo/flo_21/CE7240.c @@ -2,4 +2,4 @@ INCLUDE_ASM(s32, "world/area_flo/flo_21/CE7240", func_80240B40_CE7240); -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" diff --git a/src/world/area_hos/hos_01/A11650.c b/src/world/area_hos/hos_01/A11650.c index 3c4ac75a90..eca5180865 100644 --- a/src/world/area_hos/hos_01/A11650.c +++ b/src/world/area_hos/hos_01/A11650.c @@ -1,5 +1,5 @@ #include "hos_01.h" -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" INCLUDE_ASM(s32, "world/area_hos/hos_01/A11650", func_80240DEC_A1166C); diff --git a/src/world/area_kmr/kmr_03/8C82B0.c b/src/world/area_kmr/kmr_03/8C82B0.c index f20c700cd1..37ca47412b 100644 --- a/src/world/area_kmr/kmr_03/8C82B0.c +++ b/src/world/area_kmr/kmr_03/8C82B0.c @@ -1,8 +1,8 @@ #include "kmr_03.h" -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" -INCLUDE_ASM(s32, "world/area_kmr/kmr_03/8C82B0", func_8024033C_8C82CC); +#include "world/common/SetCamera0MoveFlag1.inc.c" ApiStatus func_80240358_8C82E8(ScriptInstance* script, s32 isInitialCall) { PlayerStatus* playerStatus = PLAYER_STATUS; diff --git a/src/world/area_kpa/kpa_08/A4CA20.c b/src/world/area_kpa/kpa_08/A4CA20.c index fcf9e782ba..1ad1f9cf82 100644 --- a/src/world/area_kpa/kpa_08/A4CA20.c +++ b/src/world/area_kpa/kpa_08/A4CA20.c @@ -1,5 +1,5 @@ #include "kpa_08.h" -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_08/A4CA20", func_8024001C_A4CA3C); diff --git a/src/world/area_kpa/kpa_09/A4F000.c b/src/world/area_kpa/kpa_09/A4F000.c index 1288757674..fb3c753774 100644 --- a/src/world/area_kpa/kpa_09/A4F000.c +++ b/src/world/area_kpa/kpa_09/A4F000.c @@ -1,5 +1,5 @@ #include "kpa_09.h" -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_09/A4F000", func_8024001C_A4F01C); diff --git a/src/world/area_kzn/kzn_03/C63A10.c b/src/world/area_kzn/kzn_03/C63A10.c index 0b94192ece..09e3cb7a5c 100644 --- a/src/world/area_kzn/kzn_03/C63A10.c +++ b/src/world/area_kzn/kzn_03/C63A10.c @@ -1,8 +1,8 @@ #include "kzn_03.h" -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" -INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C63A10", func_80242D1C_C63A2C); +#include "world/common/SetCamera0MoveFlag1.inc.c" INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C63A10", func_80242D38_C63A48); diff --git a/src/world/area_kzn/kzn_23/C9C610.c b/src/world/area_kzn/kzn_23/C9C610.c index ab601cd877..33260463f5 100644 --- a/src/world/area_kzn/kzn_23/C9C610.c +++ b/src/world/area_kzn/kzn_23/C9C610.c @@ -6,6 +6,6 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_23/C9C610", func_80240310_C9C610); INCLUDE_ASM(s32, "world/area_kzn/kzn_23/C9C610", func_80240478_C9C778); -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" INCLUDE_ASM(s32, "world/area_kzn/kzn_23/C9C610", func_80240520_C9C820); diff --git a/src/world/area_obk/obk_01/BBD1A0.c b/src/world/area_obk/obk_01/BBD1A0.c index 52d905b650..0a42262049 100644 --- a/src/world/area_obk/obk_01/BBD1A0.c +++ b/src/world/area_obk/obk_01/BBD1A0.c @@ -1,8 +1,8 @@ #include "obk_01.h" -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" -INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD1A0", func_8024001C_BBD1BC); +#include "world/common/SetCamera0MoveFlag1.inc.c" INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD1A0", func_80240038_BBD1D8); diff --git a/src/world/area_obk/obk_05/BCD060.c b/src/world/area_obk/obk_05/BCD060.c index 72a1fba13b..591aaeda32 100644 --- a/src/world/area_obk/obk_05/BCD060.c +++ b/src/world/area_obk/obk_05/BCD060.c @@ -1,8 +1,8 @@ #include "obk_05.h" -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" -INCLUDE_ASM(s32, "world/area_obk/obk_05/BCD060", func_8024001C_BCD07C); +#include "world/common/SetCamera0MoveFlag1.inc.c" INCLUDE_ASM(s32, "world/area_obk/obk_05/BCD060", func_80240038_BCD098); diff --git a/src/world/area_omo/omo_02/D9D4D0.c b/src/world/area_omo/omo_02/D9D4D0.c index 197dc117a8..def33b6ba7 100644 --- a/src/world/area_omo/omo_02/D9D4D0.c +++ b/src/world/area_omo/omo_02/D9D4D0.c @@ -1,5 +1,5 @@ #include "omo_02.h" -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" -INCLUDE_ASM(s32, "world/area_omo/omo_02/D9D4D0", func_8024001C_D9D4EC); +#include "world/common/SetCamera0MoveFlag1.inc.c" diff --git a/src/world/area_omo/omo_03/DA5240.c b/src/world/area_omo/omo_03/DA5240.c index d99f607597..37ce7fa294 100644 --- a/src/world/area_omo/omo_03/DA5240.c +++ b/src/world/area_omo/omo_03/DA5240.c @@ -1,3 +1,3 @@ #include "omo_03.h" -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" diff --git a/src/world/area_omo/omo_03/DA5260.c b/src/world/area_omo/omo_03/DA5260.c index e8c05a16e4..d0dd112fba 100644 --- a/src/world/area_omo/omo_03/DA5260.c +++ b/src/world/area_omo/omo_03/DA5260.c @@ -1,6 +1,6 @@ #include "omo_03.h" -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" INCLUDE_ASM(s32, "world/area_omo/omo_03/DA5260", func_8024003C_DA527C); diff --git a/src/world/area_omo/omo_04/DAD400.c b/src/world/area_omo/omo_04/DAD400.c index 321a498bc0..07f629662a 100644 --- a/src/world/area_omo/omo_04/DAD400.c +++ b/src/world/area_omo/omo_04/DAD400.c @@ -8,9 +8,9 @@ INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_80240000_DAD400); INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_80240268_DAD668); -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" -INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_802402D8_DAD6D8); +#include "world/common/SetCamera0MoveFlag1.inc.c" INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_802402F4_DAD6F4); diff --git a/src/world/area_omo/omo_06/DB7910.c b/src/world/area_omo/omo_06/DB7910.c index add620ef94..7450d9241d 100644 --- a/src/world/area_omo/omo_06/DB7910.c +++ b/src/world/area_omo/omo_06/DB7910.c @@ -1,6 +1,6 @@ #include "omo_06.h" -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" INCLUDE_ASM(s32, "world/area_omo/omo_06/DB7910", func_8024001C_DB792C); diff --git a/src/world/area_omo/omo_07/DC01D0.c b/src/world/area_omo/omo_07/DC01D0.c index a80b126f1a..81540d7fc0 100644 --- a/src/world/area_omo/omo_07/DC01D0.c +++ b/src/world/area_omo/omo_07/DC01D0.c @@ -8,6 +8,6 @@ INCLUDE_ASM(s32, "world/area_omo/omo_07/DC01D0", func_80242F20_DC01D0); INCLUDE_ASM(s32, "world/area_omo/omo_07/DC01D0", func_80243188_DC0438); -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" -INCLUDE_ASM(s32, "world/area_omo/omo_07/DC01D0", func_802431F8_DC04A8); +#include "world/common/SetCamera0MoveFlag1.inc.c" diff --git a/src/world/area_omo/omo_08/DC43D0.c b/src/world/area_omo/omo_08/DC43D0.c index 2c60cef685..e0a48b9c0f 100644 --- a/src/world/area_omo/omo_08/DC43D0.c +++ b/src/world/area_omo/omo_08/DC43D0.c @@ -1,6 +1,6 @@ #include "omo_08.h" -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" INCLUDE_ASM(s32, "world/area_omo/omo_08/DC43D0", func_8024001C_DC43EC); diff --git a/src/world/area_omo/omo_10/DD79B0.c b/src/world/area_omo/omo_10/DD79B0.c index 2ebfd8a10d..1e90c216c8 100644 --- a/src/world/area_omo/omo_10/DD79B0.c +++ b/src/world/area_omo/omo_10/DD79B0.c @@ -1,6 +1,6 @@ #include "omo_10.h" -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" INCLUDE_ASM(s32, "world/area_omo/omo_10/DD79B0", func_8024001C_DD79CC); diff --git a/src/world/area_omo/omo_16/DEBED0.c b/src/world/area_omo/omo_16/DEBED0.c index f154aae5c8..fbf0379bef 100644 --- a/src/world/area_omo/omo_16/DEBED0.c +++ b/src/world/area_omo/omo_16/DEBED0.c @@ -1,6 +1,6 @@ #include "omo_16.h" -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" INCLUDE_ASM(s32, "world/area_omo/omo_16/DEBED0", func_8024001C_DEBEEC); diff --git a/src/world/area_omo/omo_17/DEEEA0.c b/src/world/area_omo/omo_17/DEEEA0.c index a9cd5069d4..029d1fc88f 100644 --- a/src/world/area_omo/omo_17/DEEEA0.c +++ b/src/world/area_omo/omo_17/DEEEA0.c @@ -1,6 +1,6 @@ #include "omo_17.h" -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" INCLUDE_ASM(s32, "world/area_omo/omo_17/DEEEA0", func_8024001C_DEEEBC); diff --git a/src/world/area_sam/sam_07/D2BD30.c b/src/world/area_sam/sam_07/D2BD30.c index 7b334b26a9..4a0ca9b280 100644 --- a/src/world/area_sam/sam_07/D2BD30.c +++ b/src/world/area_sam/sam_07/D2BD30.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_07/D2BD30", func_80240448_D2C178); INCLUDE_ASM(s32, "world/area_sam/sam_07/D2BD30", func_802405B0_D2C2E0); -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_07/D2BD30", func_80240650_D2C380); diff --git a/src/world/area_sam/sam_11/D3A930.c b/src/world/area_sam/sam_11/D3A930.c index ed38a0c603..a37071aeaf 100644 --- a/src/world/area_sam/sam_11/D3A930.c +++ b/src/world/area_sam/sam_11/D3A930.c @@ -15,9 +15,9 @@ static ApiStatus Set80151310_0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -#include "world/common/SetCamera0MoveFlagNeg1.inc.c" +#include "world/common/UnsetCamera0MoveFlag1.inc.c" -INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_80240580_D3AB50); +#include "world/common/SetCamera0MoveFlag1.inc.c" INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_8024059C_D3AB6C); diff --git a/src/world/common/SetCamera0MoveFlag1.inc.c b/src/world/common/SetCamera0MoveFlag1.inc.c new file mode 100644 index 0000000000..2f4cb9fd5e --- /dev/null +++ b/src/world/common/SetCamera0MoveFlag1.inc.c @@ -0,0 +1,8 @@ +#include "common.h" + +static ApiStatus SetCamera0MoveFlag1(ScriptInstance* script, s32 isInitialCall) { + Camera* camera = &gCameras[0]; + + camera->moveFlags |= 1; + return ApiStatus_DONE2; +} diff --git a/src/world/common/SetCamera0MoveFlagNeg1.inc.c b/src/world/common/UnsetCamera0MoveFlag1.inc.c similarity index 57% rename from src/world/common/SetCamera0MoveFlagNeg1.inc.c rename to src/world/common/UnsetCamera0MoveFlag1.inc.c index f8e815371a..e5ae2007c7 100644 --- a/src/world/common/SetCamera0MoveFlagNeg1.inc.c +++ b/src/world/common/UnsetCamera0MoveFlag1.inc.c @@ -1,6 +1,6 @@ #include "common.h" -static ApiStatus SetCamera0MoveFlagNeg1(ScriptInstance* script, s32 isInitialCall) { +static ApiStatus UnsetCamera0MoveFlag1(ScriptInstance* script, s32 isInitialCall) { Camera* camera = &gCameras[0]; camera->moveFlags &= ~1; From 90641b1b064ecd0e853827e01d5e3420cd08534e Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 30 Oct 2020 19:42:25 -0400 Subject: [PATCH 68/78] kmr_03 --- .../kmr_03/8C7F90/func_80240000_8C7F90.s | 109 ------------------ src/world/area_kmr/kmr_03/8C7F90.c | 45 +++++++- 2 files changed, 44 insertions(+), 110 deletions(-) delete mode 100644 asm/nonmatchings/world/area_kmr/kmr_03/8C7F90/func_80240000_8C7F90.s diff --git a/asm/nonmatchings/world/area_kmr/kmr_03/8C7F90/func_80240000_8C7F90.s b/asm/nonmatchings/world/area_kmr/kmr_03/8C7F90/func_80240000_8C7F90.s deleted file mode 100644 index 28b50c38c4..0000000000 --- a/asm/nonmatchings/world/area_kmr/kmr_03/8C7F90/func_80240000_8C7F90.s +++ /dev/null @@ -1,109 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_8C7F90 -/* 8C7F90 80240000 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 8C7F94 80240004 AFB20018 */ sw $s2, 0x18($sp) -/* 8C7F98 80240008 0080902D */ daddu $s2, $a0, $zero -/* 8C7F9C 8024000C AFB10014 */ sw $s1, 0x14($sp) -/* 8C7FA0 80240010 00A0882D */ daddu $s1, $a1, $zero -/* 8C7FA4 80240014 AFBF0024 */ sw $ra, 0x24($sp) -/* 8C7FA8 80240018 AFB40020 */ sw $s4, 0x20($sp) -/* 8C7FAC 8024001C AFB3001C */ sw $s3, 0x1c($sp) -/* 8C7FB0 80240020 AFB00010 */ sw $s0, 0x10($sp) -/* 8C7FB4 80240024 8E50000C */ lw $s0, 0xc($s2) -/* 8C7FB8 80240028 8E050000 */ lw $a1, ($s0) -/* 8C7FBC 8024002C 0C0B1EAF */ jal get_variable -/* 8C7FC0 80240030 26100004 */ addiu $s0, $s0, 4 -/* 8C7FC4 80240034 0240202D */ daddu $a0, $s2, $zero -/* 8C7FC8 80240038 8E050000 */ lw $a1, ($s0) -/* 8C7FCC 8024003C 0C0B1EAF */ jal get_variable -/* 8C7FD0 80240040 0040802D */ daddu $s0, $v0, $zero -/* 8C7FD4 80240044 0200202D */ daddu $a0, $s0, $zero -/* 8C7FD8 80240048 0C00EAD2 */ jal get_npc_safe -/* 8C7FDC 8024004C 0040A02D */ daddu $s4, $v0, $zero -/* 8C7FE0 80240050 3C138011 */ lui $s3, %hi(gPlayerData) -/* 8C7FE4 80240054 2673F290 */ addiu $s3, $s3, %lo(gPlayerData) -/* 8C7FE8 80240058 12200006 */ beqz $s1, .L80240074 -/* 8C7FEC 8024005C 0040802D */ daddu $s0, $v0, $zero -/* 8C7FF0 80240060 82620012 */ lb $v0, 0x12($s3) -/* 8C7FF4 80240064 54400003 */ bnel $v0, $zero, .L80240074 -/* 8C7FF8 80240068 AE400070 */ sw $zero, 0x70($s2) -/* 8C7FFC 8024006C 24020002 */ addiu $v0, $zero, 2 -/* 8C8000 80240070 AE420070 */ sw $v0, 0x70($s2) -.L80240074: -/* 8C8004 80240074 8E430070 */ lw $v1, 0x70($s2) -/* 8C8008 80240078 24110001 */ addiu $s1, $zero, 1 -/* 8C800C 8024007C 10710013 */ beq $v1, $s1, .L802400CC -/* 8C8010 80240080 28620002 */ slti $v0, $v1, 2 -/* 8C8014 80240084 10400005 */ beqz $v0, .L8024009C -/* 8C8018 80240088 24020002 */ addiu $v0, $zero, 2 -/* 8C801C 8024008C 10600009 */ beqz $v1, .L802400B4 -/* 8C8020 80240090 0000102D */ daddu $v0, $zero, $zero -/* 8C8024 80240094 08090059 */ j .L80240164 -/* 8C8028 80240098 00000000 */ nop -.L8024009C: -/* 8C802C 8024009C 10620013 */ beq $v1, $v0, .L802400EC -/* 8C8030 802400A0 24020003 */ addiu $v0, $zero, 3 -/* 8C8034 802400A4 1062001E */ beq $v1, $v0, .L80240120 -/* 8C8038 802400A8 0000102D */ daddu $v0, $zero, $zero -/* 8C803C 802400AC 08090059 */ j .L80240164 -/* 8C8040 802400B0 00000000 */ nop -.L802400B4: -/* 8C8044 802400B4 0C03AC5A */ jal func_800EB168 -/* 8C8048 802400B8 0000202D */ daddu $a0, $zero, $zero -/* 8C804C 802400BC 2402001E */ addiu $v0, $zero, 0x1e -/* 8C8050 802400C0 AE420074 */ sw $v0, 0x74($s2) -/* 8C8054 802400C4 08090058 */ j .L80240160 -/* 8C8058 802400C8 AE510070 */ sw $s1, 0x70($s2) -.L802400CC: -/* 8C805C 802400CC 8E420074 */ lw $v0, 0x74($s2) -/* 8C8060 802400D0 2403FFFF */ addiu $v1, $zero, -1 -/* 8C8064 802400D4 2442FFFF */ addiu $v0, $v0, -1 -/* 8C8068 802400D8 14430021 */ bne $v0, $v1, .L80240160 -/* 8C806C 802400DC AE420074 */ sw $v0, 0x74($s2) -/* 8C8070 802400E0 24020002 */ addiu $v0, $zero, 2 -/* 8C8074 802400E4 08090058 */ j .L80240160 -/* 8C8078 802400E8 AE420070 */ sw $v0, 0x70($s2) -.L802400EC: -/* 8C807C 802400EC 0200202D */ daddu $a0, $s0, $zero -/* 8C8080 802400F0 00141600 */ sll $v0, $s4, 0x18 -/* 8C8084 802400F4 00021543 */ sra $v0, $v0, 0x15 -/* 8C8088 802400F8 02621021 */ addu $v0, $s3, $v0 -/* 8C808C 802400FC A2740012 */ sb $s4, 0x12($s3) -/* 8C8090 80240100 0C03BD17 */ jal clear_partner_move_history -/* 8C8094 80240104 A0510014 */ sb $s1, 0x14($v0) -/* 8C8098 80240108 82640012 */ lb $a0, 0x12($s3) -/* 8C809C 8024010C 0C03ACA9 */ jal func_800EB2A4 -/* 8C80A0 80240110 00000000 */ nop -/* 8C80A4 80240114 24020003 */ addiu $v0, $zero, 3 -/* 8C80A8 80240118 08090058 */ j .L80240160 -/* 8C80AC 8024011C AE420070 */ sw $v0, 0x70($s2) -.L80240120: -/* 8C80B0 80240120 0C00EAD2 */ jal get_npc_safe -/* 8C80B4 80240124 2404FFFC */ addiu $a0, $zero, -4 -/* 8C80B8 80240128 8E05000C */ lw $a1, 0xc($s0) -/* 8C80BC 8024012C 0C00ECD0 */ jal set_npc_yaw -/* 8C80C0 80240130 0040202D */ daddu $a0, $v0, $zero -/* 8C80C4 80240134 0200202D */ daddu $a0, $s0, $zero -/* 8C80C8 80240138 8E020000 */ lw $v0, ($s0) -/* 8C80CC 8024013C 2403FFFB */ addiu $v1, $zero, -5 -/* 8C80D0 80240140 00431024 */ and $v0, $v0, $v1 -/* 8C80D4 80240144 0C00EAFF */ jal disable_npc_shadow -/* 8C80D8 80240148 AE020000 */ sw $v0, ($s0) -/* 8C80DC 8024014C 3C01C47A */ lui $at, 0xc47a -/* 8C80E0 80240150 44810000 */ mtc1 $at, $f0 -/* 8C80E4 80240154 24020002 */ addiu $v0, $zero, 2 -/* 8C80E8 80240158 08090059 */ j .L80240164 -/* 8C80EC 8024015C E600003C */ swc1 $f0, 0x3c($s0) -.L80240160: -/* 8C80F0 80240160 0000102D */ daddu $v0, $zero, $zero -.L80240164: -/* 8C80F4 80240164 8FBF0024 */ lw $ra, 0x24($sp) -/* 8C80F8 80240168 8FB40020 */ lw $s4, 0x20($sp) -/* 8C80FC 8024016C 8FB3001C */ lw $s3, 0x1c($sp) -/* 8C8100 80240170 8FB20018 */ lw $s2, 0x18($sp) -/* 8C8104 80240174 8FB10014 */ lw $s1, 0x14($sp) -/* 8C8108 80240178 8FB00010 */ lw $s0, 0x10($sp) -/* 8C810C 8024017C 03E00008 */ jr $ra -/* 8C8110 80240180 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/src/world/area_kmr/kmr_03/8C7F90.c b/src/world/area_kmr/kmr_03/8C7F90.c index 1df8fe4a77..dd8ae718af 100644 --- a/src/world/area_kmr/kmr_03/8C7F90.c +++ b/src/world/area_kmr/kmr_03/8C7F90.c @@ -1,6 +1,49 @@ #include "kmr_03.h" -INCLUDE_ASM(s32, "world/area_kmr/kmr_03/8C7F90", func_80240000_8C7F90); +ApiStatus func_80240000_8C7F90(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + PlayerData* playerData = PLAYER_DATA; + NpcId npcID = get_variable(script, *args++); + PartnerId partnerID = get_variable(script, *args++); + Npc* npc = get_npc_safe(npcID); + + if (isInitialCall) { + if (gPlayerData.currentPartner == PartnerId_NONE) { + script->functionTemp[0].s = 2; + } else { + script->functionTemp[0].s = 0; + } + } + + switch (script->functionTemp[0].s) { + case 0: + func_800EB168(0); + script->functionTemp[1].s = 30; + script->functionTemp[0].s = 1; + break; + case 1: + script->functionTemp[1].s--; + if (script->functionTemp[1].s == -1) { + script->functionTemp[0].s = 2; + } + break; + case 2: + playerData->currentPartner = partnerID; + playerData->partners[partnerID].enabled = TRUE; + clear_partner_move_history(npc); + func_800EB2A4(playerData->currentPartner); + script->functionTemp[0].s = 3; + break; + case 3: + set_npc_yaw(get_npc_safe(NpcId_PARTNER), npc->yaw); + npc->flags &= ~4; + disable_npc_shadow(npc); + npc->pos.y = -1000.0f; + return ApiStatus_DONE2; + } + + return ApiStatus_BLOCK; +} #include "world/common/CheckPartnerFlags1000.inc.c" From d86cb5cb2773c193c464aec3a5df8d6ea4ebfe56 Mon Sep 17 00:00:00 2001 From: Alex Bates <16batesa@gmail.com> Date: Sat, 31 Oct 2020 00:14:49 +0000 Subject: [PATCH 69/78] improve disasm_map.py output --- tools/disasm_map.py | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/tools/disasm_map.py b/tools/disasm_map.py index 842912d30b..970d462d96 100755 --- a/tools/disasm_map.py +++ b/tools/disasm_map.py @@ -43,14 +43,17 @@ def disassemble(bytes, offset, midx, symbol_map = {}, map_name = "map"): bytes.read(0x10) main,entry_list,entry_count = unpack(">IIi", bytes.read(4 * 3)) - out += f" .main = M(Main)\n" - out += f" .entryList = M(entryList)\n" - out += f" .entryCount = {entry_count}, // prefer ENTRY_COUNT(M(entryList)) if it matches\n" + out += f" .main = M(Main),\n" + out += f" .entryList = M(entryList),\n" + out += f" .entryCount = ENTRY_COUNT(M(entryList)),\n" bytes.read(0x1C) bg,tattle = unpack(">II", bytes.read(4 * 2)) - out += f" .background = {'&gBackgroundImage' if bg == 0x80200000 else 'NULL'},\n" + if bg == 0x80200000: + out += f" .background = &gBackgroundImage,\n" + elif bg != 0: + raise Exception(f"unknown MapConfig background {bg:X}") out += f" .tattle = {tattle:X},\n" out += f"}};\n" @@ -63,7 +66,7 @@ def disassemble(bytes, offset, midx, symbol_map = {}, map_name = "map"): word = int.from_bytes(bytes.read(4), byteorder="big") if word in symbol_map: - out += f" M({symbol_map[word]})," + out += f" {symbol_map[word]}," else: out += f" 0x{word:08X}," @@ -94,6 +97,7 @@ def parse_midx(file, prefix = ""): if len(s) == 5: if s[0] == "$Start": continue if s[0] == "$End": continue + structs.append({ "name": prefix + name_struct(s[0]), "type": s[1], @@ -134,8 +138,23 @@ def name_struct(s): s = s[1:].replace("???", "unk") # use ThisCase for scripts - if s.startswith("$Script"): - return s[0].upper() + s[1:] + if s.startswith("Script_"): + s = s[7].upper() + s[8:] + + # if `s` is hex, prefix it with Script_ again + try: + int(s, 16) + return "Script_" + s + except Exception: + pass + + if s.startswith("Main"): + return "Main" + + return s + + if s.startswith("ASCII"): + return s return s[0].lower() + s[1:] @@ -155,7 +174,7 @@ if __name__ == "__main__": symbol_map = {} for struct in midx: - symbol_map[struct["vaddr"]] = struct["name"] + symbol_map[struct["vaddr"]] = "M(" + struct["name"] + ")" bin_dir = f"bin/world/{area_name}/{map_name}" src_dir = f"src/world/{area_name}/{map_name}" @@ -184,5 +203,8 @@ if __name__ == "__main__": if filetype == "bin": with open(f"{bin_dir}/{rom_addr:X}.bin", "rb") as bytes: - print(f"// {rom_addr:X}") - print(disassemble(bytes, rom_addr - rom_start, midx, symbol_map, map_name)) + disasm = disassemble(bytes, rom_addr - rom_start, midx, symbol_map, map_name) + + if len(disasm.strip()) > 0: + with open(f"{src_dir}/{rom_addr:X}.bin.c", "w") as f: + f.write(disasm) From 91f3517b8652c6fb3086a69a355ac8aa0e1bb482 Mon Sep 17 00:00:00 2001 From: Alex Bates <16batesa@gmail.com> Date: Sat, 31 Oct 2020 00:28:23 +0000 Subject: [PATCH 70/78] parse ASCII structs --- tools/disasm_map.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/disasm_map.py b/tools/disasm_map.py index 970d462d96..6e68c556b4 100755 --- a/tools/disasm_map.py +++ b/tools/disasm_map.py @@ -3,7 +3,9 @@ import sys import os import yaml +import json from struct import unpack + from disasm_script import disassemble as disassemble_script def disassemble(bytes, offset, midx, symbol_map = {}, map_name = "map"): @@ -57,6 +59,15 @@ def disassemble(bytes, offset, midx, symbol_map = {}, map_name = "map"): out += f" .tattle = {tattle:X},\n" out += f"}};\n" + elif struct["type"] == "ASCII": + string_data = bytes.read(struct["length"]).decode("ascii") + + # strip null terminator(s) + while string_data[-1] == "\0": + string_data = string_data[:-1] + + string_literal = json.dumps(string_data) + out += f"const char M({struct['name']})[] = {string_literal};" else: # unknown type of struct out += f"s32 M({name})[] = {{" for i in range(0, struct["length"], 4): From 21ab7fed6ca137b576c5e28c974b71b96d8fb31a Mon Sep 17 00:00:00 2001 From: Alex Bates <16batesa@gmail.com> Date: Sat, 31 Oct 2020 02:28:18 +0000 Subject: [PATCH 71/78] new dsl syntax --- Makefile | 4 +- tools/compile_dsl_macros.py | 97 +++++- tools/disasm_map.py | 17 +- tools/disasm_script.py | 598 ++++++++++++++++++++++++------------ 4 files changed, 513 insertions(+), 203 deletions(-) diff --git a/Makefile b/Makefile index ece296eab5..06a8a51d95 100644 --- a/Makefile +++ b/Makefile @@ -135,7 +135,7 @@ $(BUILD_DIR)/%.c.o: %.c $(MDEPS) $(CPP) $(CPPFLAGS) -o - $< $(CPPMFLAGS) | $(CC) $(CFLAGS) -o - | $(OLD_AS) $(OLDASFLAGS) -o $@ - # Compile C files (with DSL macros) -$(foreach cfile, $(DSL_C_FILES), $(BUILD_DIR)/$(cfile).o): $(BUILD_DIR)/%.c.o: %.c $(MDEPS) +$(foreach cfile, $(DSL_C_FILES), $(BUILD_DIR)/$(cfile).o): $(BUILD_DIR)/%.c.o: %.c $(MDEPS) tools/compile_dsl_macros.py @mkdir -p $(shell dirname $@) $(CPP) $(CPPFLAGS) -o - $< $(CPPMFLAGS) | tools/compile_dsl_macros.py | $(CC) $(CFLAGS) -o - | $(OLD_AS) $(OLDASFLAGS) -o $@ - @@ -151,7 +151,7 @@ $(BUILD_DIR)/bin/assets/%: bin/assets/%.bin @mkdir -p $(shell dirname $@) @cp $< $@ -$(ASSETS_BIN): $(ASSET_FILES) $(YAY0_ASSET_FILES) +$(ASSETS_BIN): $(ASSET_FILES) $(YAY0_ASSET_FILES) sources.mk @mkdir -p $(shell dirname $@) @echo "building $@" @$(PYTHON) tools/build_assets_bin.py $@ $(ASSET_FILES) diff --git a/tools/compile_dsl_macros.py b/tools/compile_dsl_macros.py index d62cab7d29..fa759bd752 100755 --- a/tools/compile_dsl_macros.py +++ b/tools/compile_dsl_macros.py @@ -29,17 +29,18 @@ script_parser = Lark(r""" block: "{" NEWLINE* (stmt STMT_SEP)* NEWLINE* "}" ?stmt: call - | label ":" -> label_decl + | label ":" [stmt] -> label_decl | "goto" label -> label_goto | if_stmt | "return" -> return_stmt | "break" -> break_stmt | "sleep" expr -> sleep_stmt + | "sleep" expr "secs" -> sleep_secs_stmt | "spawn" expr -> spawn_stmt | "await" expr -> await_stmt | lhs "=" "spawn" expr -> spawn_set_stmt | lhs set_op expr -> set_stmt - | lhs ":=" expr -> set_const_stmt + | "const" lhs set_op expr -> set_const_stmt | bind_stmt | bind_set_stmt | "unbind" -> unbind_stmt @@ -49,12 +50,19 @@ script_parser = Lark(r""" | kill_stmt | loop_stmt | loop_until_stmt + | ["await"] block -> block_stmt + | "spawn" block -> spawn_block_stmt + | "parallel" block -> parallel_block_stmt call: CNAME "(" [expr ("," expr)* [","]] ")" if_stmt: "if" expr if_op expr block ["else" block] ?if_op: "==" -> if_op_eq | "!=" -> if_op_ne + | ">" -> if_op_gt + | "<" -> if_op_lt + | ">=" -> if_op_ge + | "<=" -> if_op_le suspend_stmt: "suspend" control_type expr ("," control_type expr)* [","] resume_stmt: "resume" control_type expr ("," control_type expr)* [","] @@ -84,6 +92,11 @@ script_parser = Lark(r""" | "*=" -> set_op_mul | "/=" -> set_op_div | "%=" -> set_op_mod + | "&=" -> set_op_and + | "|=" -> set_op_or + | ":=" -> set_op_eq_const + | ":&=" -> set_op_and_const + | ":|=" -> set_op_or_const c_const_expr: c_const_expr_internal c_const_expr_internal: "(" (c_const_expr_internal | NOT_PARENS)+ ")" @@ -175,6 +188,22 @@ class LoopUntilCtx(CmdCtx): def break_opcode(self, meta): raise CompileError("breaking out of a loop..until is not supported (hint: use a label)", meta) +class LabelCtx(CmdCtx): + def __init__(self, label): + super().__init__() + self.label = label + + # TODO: implement break_opcode so you can do lbl: loop { break lbl } + +class BlockCtx(CmdCtx): + pass + +class SpawnCtx(CmdCtx): + pass + +class ParallelCtx(CmdCtx): + pass + class CompileError(Exception): def __init__(self, message, meta): super().__init__(message) @@ -255,6 +284,10 @@ class Compile(Transformer): return [ Cmd(op, a, b, meta=tree.meta), *block, Cmd(0x13) ] def if_op_eq(self, tree): return 0x0A def if_op_ne(self, tree): return 0x0B + def if_op_lt(self, tree): return 0x0C + def if_op_gt(self, tree): return 0x0D + def if_op_le(self, tree): return 0x0E + def if_op_ge(self, tree): return 0x0F def loop_stmt(self, tree): expr = tree.children.pop(0) if len(tree.children) > 1 else 0 @@ -336,6 +369,8 @@ class Compile(Transformer): def sleep_stmt(self, tree): return Cmd(0x08, tree.children[0], meta=tree.meta) + def sleep_secs_stmt(self, tree): + return Cmd(0x09, tree.children[0], meta=tree.meta) def bind_stmt(self, tree): script, trigger, target = tree.children @@ -366,12 +401,16 @@ class Compile(Transformer): raise CompileError(f"operation `{opcodes['__op__']}' not supported for ints", tree.meta) return Cmd(opcode, lhs, rhs) def set_const_stmt(self, tree): - lhs, rhs = tree.children - return Cmd(0x25, lhs, rhs) + lhs, opcodes, rhs = tree.children + opcode = opcodes.get("const", None) + if not opcode: + raise CompileError(f"operation `{opcodes['__op__']}' not supported for consts", tree.meta) + return Cmd(opcode, lhs, rhs) def set_op_eq(self, tree): return { "__op__": "=", "int": 0x24, + "const": 0x25, "float": 0x26, } def set_op_add(self, tree): @@ -403,10 +442,37 @@ class Compile(Transformer): "__op__": "%", "int": 0x2B, } + def set_op_and(self, tree): + return { + "__op__": "&", + "int": 0x3F, + "const": 0x41, + } + def set_op_or(self, tree): + return { + "__op__": "|", + "int": 0x40, + "const": 0x42, + } def label_decl(self, tree): - label = tree.children[0] - return Cmd(0x03, label, meta=tree.meta) + if len(tree.children) == 0: + label = tree.children[0] + return Cmd(0x03, label, meta=tree.meta) + else: + label, cmd_or_block = tree.children + + if type(cmd_or_block) is not list: + cmd_or_block = [cmd_or_block] + + for cmd in cmd_or_block: + if isinstance(cmd, BaseCmd): + cmd.add_context(LabelCtx(label)) + + return [ + Cmd(0x03, label, meta=tree.meta), + *cmd_or_block + ] def label_goto(self, tree): label = tree.children[0] return Cmd(0x04, label, meta=tree.meta) @@ -416,6 +482,25 @@ class Compile(Transformer): return self.alloc.labels.index(name) raise CompileError(f"label `{name}' is undeclared", tree.meta) + def block_stmt(self, tree): + block, = tree.children + for cmd in block: + if isinstance(cmd, BaseCmd): + cmd.add_context(BlockCtx()) + return block + def spawn_block_stmt(self, tree): + block, = tree.children + for cmd in block: + if isinstance(cmd, BaseCmd): + cmd.add_context(SpawnCtx()) + return [ Cmd(0x56, meta=tree.meta), *block, Cmd(0x57) ] + def parallel_block_stmt(self, tree): + block, = tree.children + for cmd in block: + if isinstance(cmd, BaseCmd): + cmd.add_context(ParallelCtx()) + return [ Cmd(0x58, meta=tree.meta), *block, Cmd(0x59) ] + def compile_script(s): tree = script_parser.parse(s) diff --git a/tools/disasm_map.py b/tools/disasm_map.py index 6e68c556b4..3c3bbb993a 100755 --- a/tools/disasm_map.py +++ b/tools/disasm_map.py @@ -6,7 +6,7 @@ import yaml import json from struct import unpack -from disasm_script import disassemble as disassemble_script +import disasm_script def disassemble(bytes, offset, midx, symbol_map = {}, map_name = "map"): out = "" @@ -15,6 +15,9 @@ def disassemble(bytes, offset, midx, symbol_map = {}, map_name = "map"): while len(midx) > 0: struct = midx.pop(0) name = struct["name"] + + print(name) + if name == "Script_Main": name = f"M(Main)" #print(f"{offset:X} ({name}, start = {struct['start']:X}, len = {struct['length']:X})") @@ -28,7 +31,12 @@ def disassemble(bytes, offset, midx, symbol_map = {}, map_name = "map"): # format struct if struct["type"].startswith("Script"): - out += disassemble_script(bytes, f"M({name})", symbol_map) + pos = bytes.tell() + try: + out += disasm_script.ScriptDSLDisassembler(bytes, f"M({name})", symbol_map).disassemble() + except disasm_script.UnsupportedScript as e: + bytes.seek(pos) + out += disasm_script.ScriptDisassembler(bytes, f"M({name})", symbol_map).disassemble() elif struct["type"] == "Padding": # nops at end of file bytes.seek(offset % 4, 1) @@ -56,7 +64,7 @@ def disassemble(bytes, offset, midx, symbol_map = {}, map_name = "map"): out += f" .background = &gBackgroundImage,\n" elif bg != 0: raise Exception(f"unknown MapConfig background {bg:X}") - out += f" .tattle = {tattle:X},\n" + out += f" .tattle = 0x{tattle:X},\n" out += f"}};\n" elif struct["type"] == "ASCII": @@ -218,4 +226,5 @@ if __name__ == "__main__": if len(disasm.strip()) > 0: with open(f"{src_dir}/{rom_addr:X}.bin.c", "w") as f: - f.write(disasm) + f.write(f'#include "{map_name}.h"\n\n') + f.write(disasm.rstrip() + "\n") diff --git a/tools/disasm_script.py b/tools/disasm_script.py index 33c834df2a..0c5ffc9ac4 100755 --- a/tools/disasm_script.py +++ b/tools/disasm_script.py @@ -2,17 +2,19 @@ import sys -_star_rod_lib = None -def star_rod_lib(): - global _star_rod_lib +_script_lib = None +def script_lib(): + global _script_lib - if not _star_rod_lib: - _star_rod_lib = {} + if not _script_lib: + _script_lib = {} from pathlib import Path from os import path import re + # star rod database + """ LIB_LINE_RE = re.compile(r"\s+:\s+") NAME_RE = re.compile(r"({[^}]*})?\s*([a-zA-Z0-9_]+)") @@ -28,46 +30,71 @@ def star_rod_lib(): if name := NAME_RE.match(parts[2]): name = name.group(2) - _star_rod_lib[vaddr] = name - - """ - if "map" in str(filename): - if kind == "api": - print(f"ApiStatus {name}(ScriptInstance* script, s32 isInitialCall);") - elif kind == "scr": - print(f"extern Script {name};") - """ + _script_lib[vaddr] = name except: pass + """ - return _star_rod_lib + # symbol_addrs.txt + with open(Path(path.dirname(__file__), "symbol_addrs.txt"), "r") as file: + for line in file.readlines(): + s = line.split(";") + name = s[0] + addr = s[1] + _script_lib[int(addr, 16)] = name -def disassemble(bytes, script_name = "script", symbol_map = {}): - out = "" - prefix = "" + return _script_lib - indent = 1 - indent_used = False +class ScriptDisassembler: + def __init__(self, bytes, script_name = "script", symbol_map = {}): + self.bytes = bytes + self.script_name = script_name + self.symbol_map = symbol_map - def write_line(line): - nonlocal out, indent, indent_used - if indent < 0: indent = 0 - if indent > 1: indent_used = True - out += " " * indent - out += line - out += "\n" - def prefix_line(line): - nonlocal prefix - prefix += line - prefix += "\n" + self.out = "" + self.prefix = "" - def var(arg): - if arg in symbol_map: - return symbol_map[arg] + self.indent = 1 + self.indent_used = False + + self.done = False + + def disassemble(self): + while True: + opcode = self.read_word() + argc = self.read_word() + + if opcode > 0xFF or argc > 0xFF: + raise Exception(f"script '{script_name}' is malformed") + + argv = [] + for i in range(0, argc): + argv.append(self.read_word()) + + self.disassemble_command(opcode, argc, argv) + + if self.done: + return self.prefix + self.out + + def write_line(self, line): + if self.indent < 0: self.indent = 0 + if self.indent > 1: self.indent_used = True + + self.out += " " * self.indent + self.out += line + self.out += "\n" + + def prefix_line(self, line): + self.prefix += line + self.prefix += "\n" + + def var(self, arg): + if arg in self.symbol_map: + return self.symbol_map[arg] v = arg - 2**32 # convert to s32 if v > -250000000: - if v <= -220000000: return f"SI_FIXED({(v + 230000000) / 1024}f)" + if v <= -220000000: return f"SI_FIXED({(v + 230000000) / 1024})" elif v <= -200000000: return f"SI_ARRAY_FLAG({v + 210000000})" elif v <= -180000000: return f"SI_ARRAY({v + 190000000})" elif v <= -160000000: return f"SI_SAVE_VAR({v + 170000000})" @@ -86,12 +113,12 @@ def disassemble(bytes, script_name = "script", symbol_map = {}): else: return f"{arg}" - def addr_ref(addr): - if addr in symbol_map: - return symbol_map[addr] - return star_rod_lib().get(addr, f"0x{addr:08X}") + def addr_ref(self, addr): + if addr in self.symbol_map: + return self.symbol_map[addr] + return script_lib().get(addr, f"0x{addr:08X}") - def trigger(trigger): + def trigger(self, trigger): if trigger == 0x00000080: trigger = "TriggerFlag_FLOOR_TOUCH" if trigger == 0x00800000: trigger = "TriggerFlag_FLOOR_ABOVE" if trigger == 0x00000800: trigger = "TriggerFlag_FLOOR_INTERACT" @@ -106,206 +133,391 @@ def disassemble(bytes, script_name = "script", symbol_map = {}): if trigger == 0x00100000: trigger = "TriggerFlag_BOMB" return trigger - def read_word(): - return int.from_bytes(bytes.read(4), byteorder="big") - - while True: - opcode = read_word() - argc = read_word() - - if opcode > 0xFF or argc > 0xFF: - return f"/* malformed script: {script_name} */\n" - - argv = [] - for i in range(0, argc): - argv.append(read_word()) + def read_word(self): + return int.from_bytes(self.bytes.read(4), byteorder="big") + def disassemble_command(self, opcode, argc, argv): if opcode == 0x01: - write_line("SI_END(),") - indent -= 1 + self.write_line("SI_END(),") + self.indent -= 1 - if indent_used: - prefix_line("// *INDENT-OFF*") - prefix_line(f"Script {script_name} = {{") - write_line("};") - write_line("// *INDENT-ON*") + if self.indent_used: + self.prefix_line("// *INDENT-OFF*") + self.prefix_line(f"Script {self.script_name} = {{") + self.write_line("};") + self.write_line("// *INDENT-ON*") else: - prefix_line(f"Script {script_name} = {{") - write_line("};") + self.prefix_line(f"Script {self.script_name} = {{") + self.write_line("};") - return prefix + out - elif opcode == 0x02: write_line(f"SI_RETURN(),") - elif opcode == 0x03: write_line(f"SI_LABEL({var(argv[0])}),") - elif opcode == 0x04: write_line(f"SI_GOTO({var(argv[0])}),") + self.done = True + elif opcode == 0x02: self.write_line(f"SI_RETURN(),") + elif opcode == 0x03: self.write_line(f"SI_LABEL({self.var(argv[0])}),") + elif opcode == 0x04: self.write_line(f"SI_GOTO({self.var(argv[0])}),") elif opcode == 0x05: - write_line(f"SI_LOOP({var(argv[0])}),") - indent += 1 + self.write_line(f"SI_LOOP({self.var(argv[0])}),") + self.indent += 1 elif opcode == 0x06: - indent -= 1 - write_line("SI_END_LOOP(),") - elif opcode == 0x07: write_line(f"SI_BREAK_LOOP(),") - elif opcode == 0x08: write_line(f"SI_WAIT_FRAMES({var(argv[0])}),") - elif opcode == 0x09: write_line(f"SI_WAIT_SECS({var(argv[0])}),") + self.indent -= 1 + self.write_line("SI_END_LOOP(),") + elif opcode == 0x07: self.write_line(f"SI_BREAK_LOOP(),") + elif opcode == 0x08: self.write_line(f"SI_WAIT_FRAMES({self.var(argv[0])}),") + elif opcode == 0x09: self.write_line(f"SI_WAIT_SECS({self.var(argv[0])}),") elif opcode == 0x0A: - write_line(f"SI_IF_EQ({var(argv[0])}, {var(argv[1])}),") - indent += 1 + self.write_line(f"SI_IF_EQ({self.var(argv[0])}, {self.var(argv[1])}),") + self.indent += 1 elif opcode == 0x0B: - write_line(f"SI_IF_NE({var(argv[0])}, {var(argv[1])}),") - indent += 1 + self.write_line(f"SI_IF_NE({self.var(argv[0])}, {self.var(argv[1])}),") + self.indent += 1 elif opcode == 0x0C: - write_line(f"SI_IF_LT({var(argv[0])}, {var(argv[1])}),") - indent += 1 + self.write_line(f"SI_IF_LT({self.var(argv[0])}, {self.var(argv[1])}),") + self.indent += 1 elif opcode == 0x0D: - write_line(f"SI_IF_GT({var(argv[0])}, {var(argv[1])}),") - indent += 1 + self.write_line(f"SI_IF_GT({self.var(argv[0])}, {self.var(argv[1])}),") + self.indent += 1 elif opcode == 0x0E: - write_line(f"SI_IF_LE({var(argv[0])}, {var(argv[1])}),") - indent += 1 + self.write_line(f"SI_IF_LE({self.var(argv[0])}, {self.var(argv[1])}),") + self.indent += 1 elif opcode == 0x0F: - write_line(f"SI_IF_GE({var(argv[0])}, {var(argv[1])}),") - indent += 1 + self.write_line(f"SI_IF_GE({self.var(argv[0])}, {self.var(argv[1])}),") + self.indent += 1 elif opcode == 0x10: - write_line(f"SI_IF_BITS_ON({var(argv[0])}, {var(argv[1])}),") - indent += 1 + self.write_line(f"SI_IF_BITS_ON({self.var(argv[0])}, {self.var(argv[1])}),") + self.indent += 1 elif opcode == 0x11: - write_line(f"SI_IF_BITS_OFF({var(argv[0])}, {var(argv[1])}),") - indent += 1 - elif opcode == 0x12: write_line(f"SI_ELSE(),") + self.write_line(f"SI_IF_BITS_OFF({self.var(argv[0])}, {self.var(argv[1])}),") + self.indent += 1 + elif opcode == 0x12: + self.indent -= 1 + self.write_line(f"SI_ELSE(),") + self.indent += 1 elif opcode == 0x13: - indent -= 1 - write_line(f"SI_END_IF(),") + self.indent -= 1 + self.write_line(f"SI_END_IF(),") elif opcode == 0x14: - write_line(f"SI_SWITCH({var(argv[0])}),") - indent += 2 + self.write_line(f"SI_SWITCH({self.var(argv[0])}),") + self.indent += 2 elif opcode == 0x15: - write_line(f"SI_SWITCH_CONST(0x{argv[0]:X}),") - indent += 2 + self.write_line(f"SI_SWITCH_CONST(0x{argv[0]:X}),") + self.indent += 2 elif opcode == 0x16: - indent -= 1 - write_line(f"SI_CASE_EQ({var(argv[0])}),") - indent += 1 + self.indent -= 1 + self.write_line(f"SI_CASE_EQ({self.var(argv[0])}),") + self.indent += 1 elif opcode == 0x17: - indent -= 1 - write_line(f"SI_CASE_NE({var(argv[0])}),") - indent += 1 + self.indent -= 1 + self.write_line(f"SI_CASE_NE({self.var(argv[0])}),") + self.indent += 1 elif opcode == 0x18: - indent -= 1 - write_line(f"SI_CASE_LT({var(argv[0])}),") - indent += 1 + self.indent -= 1 + self.write_line(f"SI_CASE_LT({self.var(argv[0])}),") + self.indent += 1 elif opcode == 0x19: - indent -= 1 - write_line(f"SI_CASE_GT({var(argv[0])}),") - indent += 1 + self.indent -= 1 + self.write_line(f"SI_CASE_GT({self.var(argv[0])}),") + self.indent += 1 elif opcode == 0x1A: - indent -= 1 - write_line(f"SI_CASE_LE({var(argv[0])}),") - indent += 1 + self.indent -= 1 + self.write_line(f"SI_CASE_LE({self.var(argv[0])}),") + self.indent += 1 elif opcode == 0x1B: - indent -= 1 - write_line(f"SI_CASE_GE({var(argv[0])}),") - indent += 1 + self.indent -= 1 + self.write_line(f"SI_CASE_GE({self.var(argv[0])}),") + self.indent += 1 elif opcode == 0x1C: - indent -= 1 - write_line(f"SI_CASE_DEFAULT(),") - indent += 1 + self.indent -= 1 + self.write_line(f"SI_CASE_DEFAULT(),") + self.indent += 1 elif opcode == 0x1D: - indent -= 1 - write_line(f"SI_CASE_OR_EQ({var(argv[0])}),") - indent += 1 + self.indent -= 1 + self.write_line(f"SI_CASE_OR_EQ({self.var(argv[0])}),") + self.indent += 1 # opcode 0x1E? elif opcode == 0x1F: - indent -= 1 - write_line(f"SI_CASE_BITS_ON({var(argv[0])}),") - indent += 1 + self.indent -= 1 + self.write_line(f"SI_CASE_BITS_ON({self.var(argv[0])}),") + self.indent += 1 elif opcode == 0x20: - indent -= 1 - write_line(f"SI_END_MULTI_CASE(),") - indent += 1 + self.indent -= 1 + self.write_line(f"SI_END_MULTI_CASE(),") + self.indent += 1 elif opcode == 0x21: - indent -= 1 - write_line(f"SI_CASE_RANGE({var(argv[0])}, {var(argv[1])}),") - indent += 1 - elif opcode == 0x22: write_line(f"SI_BREAK_CASE(),") + self.indent -= 1 + self.write_line(f"SI_CASE_RANGE({self.var(argv[0])}, {self.var(argv[1])}),") + self.indent += 1 + elif opcode == 0x22: self.write_line(f"SI_BREAK_CASE(),") elif opcode == 0x23: - indent -= 2 - write_line(f"SI_END_SWITCH(),") - elif opcode == 0x24: write_line(f"SI_SET({var(argv[0])}, {var(argv[1])}),") - elif opcode == 0x25: write_line(f"SI_SET_CONST({var(argv[0])}, 0x{argv[1]:X}),") - elif opcode == 0x26: write_line(f"SI_SET_F({var(argv[0])}, {var(argv[1])}),") - elif opcode == 0x27: write_line(f"SI_ADD({var(argv[0])}, {var(argv[1])}),") - elif opcode == 0x28: write_line(f"SI_SUB({var(argv[0])}, {var(argv[1])}),") - elif opcode == 0x29: write_line(f"SI_MUL({var(argv[0])}, {var(argv[1])}),") - elif opcode == 0x2A: write_line(f"SI_DIV({var(argv[0])}, {var(argv[1])}),") - elif opcode == 0x2B: write_line(f"SI_MOD({var(argv[0])}, {var(argv[1])}),") - elif opcode == 0x2C: write_line(f"SI_ADD_F({var(argv[0])}, {var(argv[1])}),") - elif opcode == 0x2D: write_line(f"SI_SUB_F({var(argv[0])}, {var(argv[1])}),") - elif opcode == 0x2E: write_line(f"SI_MUL_F({var(argv[0])}, {var(argv[1])}),") - elif opcode == 0x2F: write_line(f"SI_DIV_F({var(argv[0])}, {var(argv[1])}),") - elif opcode == 0x30: write_line(f"SI_USE_BUFFER({var(argv[0])}),") + self.indent -= 2 + self.write_line(f"SI_END_SWITCH(),") + elif opcode == 0x24: self.write_line(f"SI_SET({self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x25: self.write_line(f"SI_SET_CONST({self.var(argv[0])}, 0x{argv[1]:X}),") + elif opcode == 0x26: self.write_line(f"SI_SET_F({self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x27: self.write_line(f"SI_ADD({self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x28: self.write_line(f"SI_SUB({self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x29: self.write_line(f"SI_MUL({self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x2A: self.write_line(f"SI_DIV({self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x2B: self.write_line(f"SI_MOD({self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x2C: self.write_line(f"SI_ADD_F({self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x2D: self.write_line(f"SI_SUB_F({self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x2E: self.write_line(f"SI_MUL_F({self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x2F: self.write_line(f"SI_DIV_F({self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x30: self.write_line(f"SI_USE_BUFFER({self.var(argv[0])}),") # TODO: SI_BUF commands - elif opcode == 0x3C: write_line(f"SI_USE_ARRAY({var(argv[0])}),") - elif opcode == 0x3D: write_line(f"SI_NEW_ARRAY({var(argv[0])}, {var(argv[1])}),") - elif opcode == 0x3E: write_line(f"SI_USE_FLAGS({var(argv[0])}),") - elif opcode == 0x3F: write_line(f"SI_AND({var(argv[0])}, {var(argv[1])}),") - elif opcode == 0x40: write_line(f"SI_OR({var(argv[0])}, {var(argv[1])}),") - elif opcode == 0x41: write_line(f"SI_AND_CONST({var(argv[0])}, 0x{argv[1]:X})") - elif opcode == 0x42: write_line(f"SI_OR_CONST({var(argv[0])}, 0x{argv[1]:X})") + elif opcode == 0x3C: self.write_line(f"SI_USE_ARRAY({self.var(argv[0])}),") + elif opcode == 0x3D: self.write_line(f"SI_NEW_ARRAY({self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x3E: self.write_line(f"SI_USE_FLAGS({self.var(argv[0])}),") + elif opcode == 0x3F: self.write_line(f"SI_AND({self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x40: self.write_line(f"SI_OR({self.var(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x41: self.write_line(f"SI_AND_CONST({self.var(argv[0])}, 0x{argv[1]:X})") + elif opcode == 0x42: self.write_line(f"SI_OR_CONST({self.var(argv[0])}, 0x{argv[1]:X})") elif opcode == 0x43: argv_str = "" for arg in argv[1:]: argv_str += ", " - argv_str += var(arg) + argv_str += self.var(arg) - write_line(f"SI_CALL({addr_ref(argv[0])}{argv_str}),") - elif opcode == 0x44: write_line(f"SI_EXEC({addr_ref(argv[0])}),") - elif opcode == 0x45: write_line(f"SI_EXEC_GET_ID({addr_ref(argv[0])}, {var(argv[1])}),") - elif opcode == 0x46: write_line(f"SI_EXEC_WAIT({addr_ref(argv[0])}),") + self.write_line(f"SI_CALL({self.addr_ref(argv[0])}{argv_str}),") + elif opcode == 0x44: self.write_line(f"SI_EXEC({self.addr_ref(argv[0])}),") + elif opcode == 0x45: self.write_line(f"SI_EXEC_GET_ID({self.addr_ref(argv[0])}, {self.var(argv[1])}),") + elif opcode == 0x46: self.write_line(f"SI_EXEC_WAIT({self.addr_ref(argv[0])}),") elif opcode == 0x47: - if argv[3] != 1: - raise "BIND argv[3] != 1" - - write_line(f"SI_BIND({addr_ref(argv[0])}, {trigger(argv[1])}, {var(argv[2])}, {'NULL' if argv[4] == 0 else var(argv[4])}),") - elif opcode == 0x48: write_line(f"SI_UNBIND_ME(),") - elif opcode == 0x49: write_line(f"SI_KILL({var(argv[0])}),") - elif opcode == 0x4A: write_line(f"SI_JUMP({var(argv[0])}),") - elif opcode == 0x4B: write_line(f"SI_PRIORITY({var(argv[0])}),") - elif opcode == 0x4C: write_line(f"SI_TIMESCALE({var(argv[0])}),") - elif opcode == 0x4D: write_line(f"SI_GROUP({var(argv[0])}),") + assert argv[3] == 1 + self.write_line(f"SI_BIND({self.addr_ref(argv[0])}, {self.trigger(argv[1])}, {self.var(argv[2])}, {'NULL' if argv[4] == 0 else self.var(argv[4])}),") + elif opcode == 0x48: self.write_line(f"SI_UNBIND_ME(),") + elif opcode == 0x49: self.write_line(f"SI_KILL({self.var(argv[0])}),") + elif opcode == 0x4A: self.write_line(f"SI_JUMP({self.var(argv[0])}),") + elif opcode == 0x4B: self.write_line(f"SI_PRIORITY({self.var(argv[0])}),") + elif opcode == 0x4C: self.write_line(f"SI_TIMESCALE({self.var(argv[0])}),") + elif opcode == 0x4D: self.write_line(f"SI_GROUP({self.var(argv[0])}),") elif opcode == 0x4E: - if argv[4] != 0: - raise "BIND_PADLOCK argv[4] != NULL" - if argv[5] != 1: - raise "BIND_PADLOCK argv[5] != 1" - - write_line(f"SI_BIND_PADLOCK({addr_ref(argv[0])}, {trigger(argv[1])}, {var(argv[2])}, {var(argv[3])}),") - elif opcode == 0x4F: write_line(f"SI_SUSPEND_GROUP({var(argv[0])}),") - elif opcode == 0x50: write_line(f"SI_RESUME_GROUP({var(argv[0])}),") - elif opcode == 0x51: write_line(f"SI_SUSPEND_GROUP_NOT_ME({var(argv[0])}),") - elif opcode == 0x52: write_line(f"SI_RESUME_GROUP_NOT_ME({var(argv[0])}),") - elif opcode == 0x53: write_line(f"SI_SUSPEND({var(argv[0])}),") - elif opcode == 0x54: write_line(f"SI_RESUME({var(argv[0])}),") - elif opcode == 0x55: write_line(f"SI_EXISTS({var(argv[0])}),") + assert argv[4] == 0 + assert argv[5] == 1 + self.write_line(f"SI_BIND_PADLOCK({self.addr_ref(argv[0])}, {self.trigger(argv[1])}, {self.var(argv[2])}, {self.var(argv[3])}),") + elif opcode == 0x4F: self.write_line(f"SI_SUSPEND_GROUP({self.var(argv[0])}),") + elif opcode == 0x50: self.write_line(f"SI_RESUME_GROUP({self.var(argv[0])}),") + elif opcode == 0x51: self.write_line(f"SI_SUSPEND_GROUP_NOT_ME({self.var(argv[0])}),") + elif opcode == 0x52: self.write_line(f"SI_RESUME_GROUP_NOT_ME({self.var(argv[0])}),") + elif opcode == 0x53: self.write_line(f"SI_SUSPEND({self.var(argv[0])}),") + elif opcode == 0x54: self.write_line(f"SI_RESUME({self.var(argv[0])}),") + elif opcode == 0x55: self.write_line(f"SI_EXISTS({self.var(argv[0])}),") elif opcode == 0x56: - write_line("SI_THREAD(),") - indent += 1 + self.write_line("SI_THREAD(),") + self.indent += 1 elif opcode == 0x57: - indent -= 1 - write_line("SI_END_THREAD(),") + self.indent -= 1 + self.write_line("SI_END_THREAD(),") elif opcode == 0x58: - write_line("SI_CHILD_THREAD(),") - indent += 1 + self.write_line("SI_CHILD_THREAD(),") + self.indent += 1 elif opcode == 0x59: - indent -= 1 - write_line("SI_END_CHILD_THREAD(),") + self.indent -= 1 + self.write_line("SI_END_CHILD_THREAD(),") else: # unknown opcode argv_str = "" for arg in argv: argv_str += ", " argv_str += f"0x{arg:X}" - write_line(f"SI_CMD(0x{opcode:02X}{argv_str}),") + self.write_line(f"SI_CMD(0x{opcode:02X}{argv_str}),") - raise "Reached end of data before END command" +class UnsupportedScript(Exception): + pass + +class ScriptDSLDisassembler(ScriptDisassembler): + def var(self, arg): + if arg in self.symbol_map: + return self.symbol_map[arg] + + v = arg - 2**32 # convert to s32 + if v > -250000000: + if v <= -220000000: return str((v + 230000000) / 1024) + elif v <= -200000000: return f"SI_ARRAY_FLAG({v + 210000000})" + elif v <= -180000000: return f"SI_ARRAY({v + 190000000})" + elif v <= -160000000: return f"SI_SAVE_VAR({v + 170000000})" + elif v <= -140000000: return f"SI_AREA_VAR({v + 150000000})" + elif v <= -120000000: return f"SI_SAVE_FLAG({v + 130000000})" + elif v <= -100000000: return f"SI_AREA_FLAG({v + 110000000})" + elif v <= -80000000: return f"SI_MAP_FLAG({v + 90000000})" + elif v <= -60000000: return f"SI_FLAG({v + 70000000})" + elif v <= -40000000: return f"SI_MAP_VAR({v + 50000000})" + elif v <= -20000000: return f"SI_VAR({v + 30000000})" + + if arg == 0xFFFFFFFF: + return "-1" + elif ((arg & 0xFF000000) == 0x80000000) or arg > 10000: + return f"0x{arg:X}" + else: + return f"{arg}" + + def verify_float(self, var): + try: + float(var) + except Exception: + # not a float! + raise UnsupportedScript("non-float used in float command") + + return var + + def disassemble_command(self, opcode, argc, argv): + if opcode == 0x01: + if self.out.endswith("return\n"): + # implicit return; break + self.out = self.out[:-7].rstrip() + "\n" + else: + self.write_line("break") + + self.indent -= 1 + + self.prefix_line(f"Script {self.script_name} = SCRIPT({{") + self.write_line("});") + + self.done = True + elif opcode == 0x02: self.write_line(f"return") + elif opcode == 0x03: self.write_line(f"lbl{self.var(argv[0])}:") + elif opcode == 0x04: self.write_line(f"goto lbl{self.var(argv[0])}") + elif opcode == 0x05: + if argv[0] == 0: + self.write_line("loop {") + else: + self.write_line(f"loop {self.var(argv[0])} {{") + self.indent += 1 + elif opcode == 0x06: + self.indent -= 1 + self.write_line("}") + elif opcode == 0x07: self.write_line(f"break") + elif opcode == 0x08: self.write_line(f"sleep {self.var(argv[0])}") + elif opcode == 0x09: self.write_line(f"sleep {self.var(argv[0])} secs") + elif opcode == 0x0A: + self.write_line(f"if {self.var(argv[0])} == {self.var(argv[1])} {{") + self.indent += 1 + elif opcode == 0x0B: + self.write_line(f"if {self.var(argv[0])} != {self.var(argv[1])} {{") + self.indent += 1 + elif opcode == 0x0C: + self.write_line(f"if {self.var(argv[0])} < {self.var(argv[1])} {{") + self.indent += 1 + elif opcode == 0x0D: + self.write_line(f"if {self.var(argv[0])} > {self.var(argv[1])} {{") + self.indent += 1 + elif opcode == 0x0E: + self.write_line(f"if {self.var(argv[0])} <= {self.var(argv[1])} {{") + self.indent += 1 + elif opcode == 0x0F: + self.write_line(f"if {self.var(argv[0])} >= {self.var(argv[1])} {{") + self.indent += 1 + elif opcode == 0x12: + self.indent -= 1 + self.write_line("} else {") + self.indent += 1 + elif opcode == 0x13: + self.indent -= 1 + self.write_line("}") + # elif opcode == 0x14: + # self.write_line(f"SI_SWITCH({self.var(argv[0])}),") + # self.indent += 2 + # elif opcode == 0x15: + # self.write_line(f"SI_SWITCH_CONST(0x{argv[0]:X}),") + # self.indent += 2 + # elif opcode == 0x16: + # self.indent -= 1 + # self.write_line(f"SI_CASE_EQ({self.var(argv[0])}),") + # self.indent += 1 + # elif opcode == 0x17: + # self.indent -= 1 + # self.write_line(f"SI_CASE_NE({self.var(argv[0])}),") + # self.indent += 1 + # elif opcode == 0x18: + # self.indent -= 1 + # self.write_line(f"SI_CASE_LT({self.var(argv[0])}),") + # self.indent += 1 + # elif opcode == 0x19: + # self.indent -= 1 + # self.write_line(f"SI_CASE_GT({self.var(argv[0])}),") + # self.indent += 1 + # elif opcode == 0x1A: + # self.indent -= 1 + # self.write_line(f"SI_CASE_LE({self.var(argv[0])}),") + # self.indent += 1 + # elif opcode == 0x1B: + # self.indent -= 1 + # self.write_line(f"SI_CASE_GE({self.var(argv[0])}),") + # self.indent += 1 + # elif opcode == 0x1C: + # self.indent -= 1 + # self.write_line(f"SI_CASE_DEFAULT(),") + # self.indent += 1 + # elif opcode == 0x1D: + # self.indent -= 1 + # self.write_line(f"SI_CASE_OR_EQ({self.var(argv[0])}),") + # self.indent += 1 + # # opcode 0x1E? + # elif opcode == 0x1F: + # self.indent -= 1 + # self.write_line(f"SI_CASE_BITS_ON({self.var(argv[0])}),") + # self.indent += 1 + # elif opcode == 0x20: + # self.indent -= 1 + # self.write_line(f"SI_END_MULTI_CASE(),") + # self.indent += 1 + # elif opcode == 0x21: + # self.indent -= 1 + # self.write_line(f"case {self.var(argv[0])}..{self.var(argv[1])}:") + # self.indent += 1 + # elif opcode == 0x22: self.write_line("break") + # elif opcode == 0x23: + # self.indent -= 2 + # self.write_line("}") + elif opcode == 0x24: self.write_line(f"{self.var(argv[0])} = {self.var(argv[1])}") + elif opcode == 0x25: self.write_line(f"const {self.var(argv[0])} = 0x{argv[1]:X}") + elif opcode == 0x26: self.write_line(f"{self.var(argv[0])} = {self.verify_float(self.var(argv[1]))}") + elif opcode == 0x27: self.write_line(f"{self.var(argv[0])} += {self.var(argv[1])}") + elif opcode == 0x28: self.write_line(f"{self.var(argv[0])} -= {self.var(argv[1])}") + elif opcode == 0x29: self.write_line(f"{self.var(argv[0])} *= {self.var(argv[1])}") + elif opcode == 0x2A: self.write_line(f"{self.var(argv[0])} /= {self.var(argv[1])}") + elif opcode == 0x2B: self.write_line(f"{self.var(argv[0])} %= {self.var(argv[1])}") + elif opcode == 0x2C: self.write_line(f"{self.var(argv[0])} += {self.verify_float(self.var(argv[1]))}") + elif opcode == 0x2D: self.write_line(f"{self.var(argv[0])} -= {self.verify_float(self.var(argv[1]))}") + elif opcode == 0x2E: self.write_line(f"{self.var(argv[0])} *= {self.verify_float(self.var(argv[1]))}") + elif opcode == 0x2F: self.write_line(f"{self.var(argv[0])} /= {self.verify_float(self.var(argv[1]))}") + elif opcode == 0x3F: self.write_line(f"{self.var(argv[0])} &= {self.var(argv[1])}") + elif opcode == 0x40: self.write_line(f"{self.var(argv[0])} |= {self.var(argv[1])}") + elif opcode == 0x41: self.write_line(f"const {self.var(argv[0])} &= {argv[1]:X})") + elif opcode == 0x42: self.write_line(f"const {self.var(argv[0])} |= {argv[1]:X})") + elif opcode == 0x43: + argv_str = ", ".join(self.var(arg) for arg in argv[1:]) + self.write_line(f"{self.addr_ref(argv[0])}({argv_str})") + elif opcode == 0x44: self.write_line(f"spawn {self.addr_ref(argv[0])}") + elif opcode == 0x45: self.write_line(f"{self.var(argv[1])} = spawn ({self.addr_ref(argv[0])}") + elif opcode == 0x46: self.write_line(f"await {self.addr_ref(argv[0])}") + elif opcode == 0x47: + assert argv[3] == 1 + if argv[4] != 0: + self.write_line(f"{self.var(argv[4])} = bind {self.addr_ref(argv[0])} to {self.trigger(argv[1])} {self.var(argv[2])}") + else: + self.write_line(f"bind {self.addr_ref(argv[0])} to {self.trigger(argv[1])} {self.var(argv[2])}") + elif opcode == 0x48: self.write_line(f"unbind") + elif opcode == 0x49: self.write_line(f"kill {self.var(argv[0])}") + elif opcode == 0x4D: self.write_line(f"group {self.var(argv[0])}") + elif opcode == 0x4F: self.write_line(f"suspend group {self.var(argv[0])}") + elif opcode == 0x50: self.write_line(f"resume group {self.var(argv[0])}") + elif opcode == 0x51: self.write_line(f"suspend others {self.var(argv[0])}") + elif opcode == 0x52: self.write_line(f"resume others {self.var(argv[0])}") + elif opcode == 0x53: self.write_line(f"suspend {self.var(argv[0])}") + elif opcode == 0x54: self.write_line(f"resume {self.var(argv[0])}") + elif opcode == 0x56: + self.write_line("spawn {") + self.indent += 1 + elif opcode == 0x57: + self.indent -= 1 + self.write_line("}") + elif opcode == 0x58: + self.write_line("parallel {") + self.indent += 1 + elif opcode == 0x59: + self.indent -= 1 + self.write_line("}") + else: + raise UnsupportedScript(f"DSL does not support script opcode {opcode:X}") if __name__ == "__main__": if len(sys.argv) <= 1: @@ -317,4 +529,8 @@ if __name__ == "__main__": with open(file, "rb") as f: f.seek(offset) - print(disassemble(f), end="") + + try: + print(ScriptDSLDisassembler(f).disassemble(), end="") + except UnsupportedScript: + print(ScriptDisassembler(f).disassemble(), end="") From 0e383a411b2d3b7564c2753e161b117e89c9051e Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Sat, 31 Oct 2020 11:44:24 -0400 Subject: [PATCH 72/78] kmr_03 data OK but messy --- include/messages.h | 1 + src/world/area_kmr/kmr_03/8C7F90.c | 26 ++- src/world/area_kmr/kmr_03/8C8140.c | 312 +++++++++++++++++++++++++++ src/world/area_kmr/kmr_03/8C83A0.c | 333 +++++++++++++++++++++++++++++ src/world/area_kmr/kmr_03/kmr_03.h | 4 + tools/splat.yaml | 15 +- 6 files changed, 678 insertions(+), 13 deletions(-) create mode 100644 src/world/area_kmr/kmr_03/8C8140.c diff --git a/include/messages.h b/include/messages.h index d119c08963..a7fea9666f 100644 --- a/include/messages.h +++ b/include/messages.h @@ -34,6 +34,7 @@ typedef s32 MessageID; // 18 Gossip Bulletin // 19 Map Tattles +#define MessageID_TATTLE_KMR_03 MESSAGE_ID(0x19, 0x3B) #define MessageID_TATTLE_KMR_12 MESSAGE_ID(0x19, 0x40) // 1A NPC Tattles diff --git a/src/world/area_kmr/kmr_03/8C7F90.c b/src/world/area_kmr/kmr_03/8C7F90.c index dd8ae718af..2a88dc5cc8 100644 --- a/src/world/area_kmr/kmr_03/8C7F90.c +++ b/src/world/area_kmr/kmr_03/8C7F90.c @@ -1,5 +1,7 @@ #include "kmr_03.h" +Script M(Main); + ApiStatus func_80240000_8C7F90(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerData* playerData = PLAYER_DATA; @@ -47,11 +49,23 @@ ApiStatus func_80240000_8C7F90(ScriptInstance* script, s32 isInitialCall) { #include "world/common/CheckPartnerFlags1000.inc.c" -ApiStatus func_802401B0_8C8140(ScriptInstance* script, s32 isInitialCall) { - Npc* npc = get_npc_unsafe(0); +// 8C85E0 +EntryList M(entryList) = { + { -340.0f, 0.0f, 348.0f, 48.0f }, + { 480.0f, 0.0f, 0.0f, 270.0f }, + { -310.0f, 20.0f, -80.0f, 135.0f }, +}; - script->varTable[1] = func_800E0088(npc->pos.x, npc->pos.z) / npc->moveSpeed * 0.8f; - return ApiStatus_DONE2; -} +MapConfig M(config) = { + .main = M(Main), + .entryList = M(entryList), + .entryCount = ENTRY_COUNT(M(entryList)), + .background = &gBackgroundImage, + .tattle = MessageID_TATTLE_KMR_03, +}; -#include "world/common/UnkPositionFunc.inc.c" +Script M(script_802406C0) = { + SI_CALL(SetMusicTrack, 0, 17, 0, 8), + SI_RETURN(), + SI_END(), +}; diff --git a/src/world/area_kmr/kmr_03/8C8140.c b/src/world/area_kmr/kmr_03/8C8140.c new file mode 100644 index 0000000000..331f63b956 --- /dev/null +++ b/src/world/area_kmr/kmr_03/8C8140.c @@ -0,0 +1,312 @@ +#include "kmr_03.h" + +s32 M(npcGroupList_80241450)[]; +Script M(script_MakeEntities); +Script M(script_802422B8); +Script M(script_80242340); + +ApiStatus func_802401B0_8C8140(ScriptInstance* script, s32 isInitialCall) { + Npc* npc = get_npc_unsafe(0); + + script->varTable[1] = func_800E0088(npc->pos.x, npc->pos.z) / npc->moveSpeed * 0.8f; + return ApiStatus_DONE2; +} + +#include "world/common/UnkPositionFunc.inc.c" + +// 8C8680 +Script M(script_ExitWalk_802406F0) = { + SI_GROUP(27), + SI_CALL(0x802D216C, 60, 0), + SI_EXEC(0x80285CF4), + SI_CALL(0x802CA400, "kmr_04", 0), + SI_WAIT_FRAMES(100), + SI_RETURN(), + SI_END(), +}; + +Script M(script_ExitWalk_8024074C) = { + SI_GROUP(27), + SI_CALL(0x802D216C, 60, 1), + SI_EXEC(0x80285CF4), + SI_CALL(0x802CA400, "kmr_05", 0), + SI_WAIT_FRAMES(100), + SI_RETURN(), + SI_END(), +}; + +Script M(script_802407A8) = { + SI_BIND(M(script_ExitWalk_802406F0), 524288, 3, NULL), + SI_BIND(M(script_ExitWalk_8024074C), 524288, 5, NULL), + SI_RETURN(), + SI_END(), +}; + +// *INDENT-OFF* +Script M(Main) = { + SI_SET(SI_SAVE_VAR(425), 30), + SI_CALL(0x802D9700, -1), + SI_CALL(0x802CA828, 0, 3, 25, 16, 4096), + SI_CALL(0x802CAD98, 0, 0, 0, 0), + SI_CALL(0x802CA6C0, 0, 1), + SI_CALL(0x802CB680, 0, 0), + SI_SET(SI_AREA_FLAG(8), 0), + SI_CALL(0x80044298, 0, M(npcGroupList_80241450)), + SI_CALL(0x80045640), + SI_EXEC_WAIT(M(script_MakeEntities)), + SI_EXEC_WAIT(M(script_802422B8)), + SI_EXEC(M(script_802406C0)), + SI_CALL(0x802CA460, SI_VAR(0)), + SI_IF_NE(SI_VAR(0), 2), + SI_SET(SI_VAR(0), M(script_802407A8)), + SI_EXEC(0x80285960), + SI_ELSE(), + SI_EXEC(M(script_802407A8)), + SI_EXEC(M(script_80242340)), + SI_END_IF(), + SI_WAIT_FRAMES(1), + SI_RETURN(), + SI_END(), +}; +// *INDENT-ON* + +s32 padding[] = {0, 0}; + +// 8C88E0 +s32 M(npcSettings_80240950)[] = { + 0x00000000, 0x00160018, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00630010, +}; + +// *INDENT-OFF* +Script M(script_8024097C) = { + SI_LABEL(1), + SI_IF_EQ(SI_AREA_FLAG(8), 1), + SI_LABEL(100), + SI_CALL(0x802D4A5C, 294, 123, 170), + SI_CALL(0x80044CF0, 0, 0), + SI_CALL(0x802D0E28, 1), + SI_CALL(0x802CE01C, 0, SI_FIXED(4.0f)), + SI_CALL(0x802CE0F4, 0, 0x9D0003), + SI_CALL(func_802401B0_8C8140), + SI_CALL(0x802D4830, 0, SI_VAR(2)), + SI_LOOP(SI_VAR(1)), + SI_CALL(0x802CF0F4, 0, SI_VAR(7), SI_VAR(8), SI_VAR(9)), + SI_CALL(0x802D4B14, SI_VAR(7), SI_VAR(9), SI_FIXED(4.0f), SI_VAR(2)), + SI_CALL(0x802CDCB0, 0, SI_VAR(7), SI_VAR(8), SI_VAR(9)), + SI_WAIT_FRAMES(1), + SI_END_LOOP(), + SI_CALL(0x802D1B04, 0, 3), + SI_CALL(0x802D1024, SI_FIXED(3.0f)), + SI_CALL(0x802D1134, 243, 243, 0), + SI_CALL(0x80045320, 0, 0, 1), + SI_CALL(0x80044CF0, 0, 1), + SI_CALL(0x802D0E28, 0), + SI_GOTO(100), + SI_END_IF(), + SI_WAIT_FRAMES(1), + SI_GOTO(1), + SI_RETURN(), + SI_END(), +}; +// *INDENT-ON* + +// *INDENT-OFF* +Script M(script_NpcAI_80240B50) = { + SI_LABEL(1), + SI_SWITCH(SI_SAVE_VAR(0)), + SI_CASE_EQ(0xFFFFFF86), + SI_LABEL(89), + SI_CALL(UnkPositionFunc, 0xFFFFFF8A, 86, 0xFFFFFFBA, 0xFFFFFFF1), + SI_WAIT_FRAMES(1), + SI_IF_EQ(SI_VAR(0), 0), + SI_GOTO(89), + SI_END_IF(), + SI_CALL(0x802D0E28, 1), + SI_CALL(0x80044DA4, 0, 0), + SI_CALL(0x802D01AC, 0, 610, 0), + SI_CALL(0x802D78A0, 0, 0, 45, 15, 1, 0, 0, 0, 0), + SI_WAIT_FRAMES(15), + SI_CALL(0x802CECC8, -1, 5), + SI_WAIT_FRAMES(10), + SI_CALL(0x802D02B0, 0, 0x9D0008, 0x9D0001, 0, 0xB00A6), + SI_CALL(0x802CB860, 0, 0xFFFFFF24, 20, 0xFFFFFFB8), + SI_CALL(0x802CBE2C, 0, 0xFFFFFFEC, 0, 68), + SI_CALL(0x802CBB48, 0, SI_FIXED(15.0f), SI_FIXED(-8.5f)), + SI_CALL(0x802CBBE4, 0, 275), + SI_CALL(0x802CBEF0, 0, SI_FIXED(1.5f)), + SI_CALL(0x802CB79C, 0, 0, 1), + SI_THREAD(), + SI_WAIT_FRAMES(20), + SI_CALL(0x802D1024, SI_FIXED(2.0f)), + SI_CALL(0x802D1134, 0xFFFFFFDA, 68, 0), + SI_END_THREAD(), + SI_CALL(0x802CF0F4, 0, SI_VAR(7), SI_VAR(8), SI_VAR(9)), + SI_CALL(0x802CE01C, 0, SI_FIXED(4.0f)), + SI_CALL(0x802CE0F4, 0, 0x9D0003), + SI_CALL(0x802CE22C, 0, 0, 70, 0), + SI_CALL(0x802CE0F4, 0, 0x9D0001), + SI_CALL(0x802CEB04, 0, 276, 20), + SI_WAIT_FRAMES(30), + SI_CALL(0x802D02B0, 0, 0x9D0008, 0x9D0001, 0, 0xB00A7), + SI_WAIT_FRAMES(5), + SI_CALL(0x802D1084, 0x80007), + SI_WAIT_FRAMES(30), + SI_CALL(0x802D02B0, 0, 0x9D0008, 0x9D0001, 0, 0xB00A8), + SI_CALL(func_80240000_8C7F90, 0, 5), + SI_SET(SI_SAVE_VAR(0), 0xFFFFFF87), + SI_CALL(0x802CB860, 0, 0xFFFFFF24, 20, 0xFFFFFFB8), + SI_CALL(0x802D1DFC, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802CBE2C, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802CBEF0, 0, SI_FIXED(3.0f)), + SI_CALL(0x802CB79C, 0, 0, 1), + SI_CALL(0x802CC354, 0, SI_FIXED(1.0f)), + SI_CALL(0x802CB79C, 0, 0, 0), + SI_CALL(0x802CF52C), + SI_CALL(0x802D0E28, 0), + SI_WAIT_FRAMES(1), + SI_END_SWITCH(), + SI_RETURN(), + SI_END(), +}; +// *INDENT-ON* + +// *INDENT-OFF* +Script M(script_Hit_80240F64) = { + SI_CALL(0x802CE0F4, -1, 0x9D0007), + SI_WAIT_FRAMES(10), + SI_CALL(0x802CE0F4, -1, 0x9D0001), + SI_ADD(SI_MAP_VAR(0), 1), + SI_IF_LT(SI_MAP_VAR(0), 3), + SI_CALL(0x80044600, SI_VAR(0)), + SI_SWITCH(SI_VAR(0)), + SI_CASE_EQ(2), + SI_CALL(0x80045320, 0, 0, 1), + SI_IF_EQ(SI_AREA_FLAG(6), 1), + SI_ELSE(), + SI_SET(SI_AREA_FLAG(6), 1), + SI_SET(SI_AREA_FLAG(7), 0), + SI_END_IF(), + SI_CASE_EQ(4), + SI_CALL(0x80045320, 0, 0, 1), + SI_IF_EQ(SI_AREA_FLAG(7), 1), + SI_ELSE(), + SI_SET(SI_AREA_FLAG(6), 0), + SI_SET(SI_AREA_FLAG(7), 1), + SI_END_IF(), + SI_END_SWITCH(), + SI_WAIT_FRAMES(10), + SI_CALL(0x802CE0F4, -1, 0x9D0003), + SI_ELSE(), + SI_WAIT_FRAMES(10), + SI_CALL(0x802CF0F4, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802CDCB0, 0xFFFFFFFC, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802CF060, 0xFFFFFFFC, 512, 1), + SI_CALL(0x802CDCB0, 0, 0, 0xFFFFFC18, 0), + SI_CALL(0x802CF060, 0, 256, 0), + SI_CALL(0x802CF52C), + SI_CALL(0x80044DA4, -1, M(script_8024097C)), + SI_CALL(0x80044A78, -1, M(script_NpcAI_80240B50)), + SI_END_IF(), + SI_RETURN(), + SI_END(), +}; +// *INDENT-ON* + +// *INDENT-OFF* +Script M(script_Init_802411A8) = { + SI_CALL(0x80044BAC, -1, M(script_NpcAI_80240B50)), + SI_CALL(0x80044EB8, -1, M(script_8024097C)), + SI_CALL(0x80045140, -1, M(script_Hit_80240F64)), + SI_SWITCH(SI_SAVE_VAR(0)), + SI_CASE_GE(0xFFFFFF87), + SI_CALL(0x802CF060, -1, 512, 0), + SI_CALL(0x802CF060, -1, 8, 1), + SI_CALL(0x802CDCB0, -1, 0, 0xFFFFFC18, 0), + SI_END_SWITCH(), + SI_RETURN(), + SI_END(), +}; +// *INDENT-ON* + +s32 M(npcGroup_80241260)[] = { + 0x00000000, M(npcSettings_80240950), 0xC2480000, 0x00000000, 0x42A00000, 0x00400105, M(script_Init_802411A8), 0x00000000, + 0x00000000, 0x0000002D, 0x80000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00007FFF, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00007FFF, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x009D0001, 0x009D0002, 0x009D0003, 0x009D0003, 0x009D0001, 0x009D0001, 0x009D0000, 0x009D0000, + 0x009D0003, 0x009D0003, 0x009D0003, 0x009D0003, 0x009D0003, 0x009D0003, 0x009D0003, 0x009D0003, + 0x00000000, 0x00000000, 0x00000000, 0x001A0063, +}; + +s32 M(npcGroupList_80241450)[] = { + 0x00000001, M(npcGroup_80241260), 0x00020000, 0x00000000, 0x00000000, 0x00000000, +}; + +s32 padding2[] = {0, 0}; + +// 8C9400 +Script M(script_80241470) = { + SI_CALL(0x802C9DCC, 0, 9, 0x7FFFFE00), + SI_SET(SI_SAVE_VAR(0), 0xFFFFFF8B), + SI_RETURN(), + SI_END(), +}; + +Script M(script_802414A8) = { + SI_SET(SI_SAVE_FLAG(54), 1), + SI_RETURN(), + SI_END(), +}; + +Script M(script_802414C8) = { + SI_LABEL(0), + SI_CALL(0x802D1DFC, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802CAF2C, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_WAIT_FRAMES(1), + SI_GOTO(0), + SI_RETURN(), + SI_END(), +}; + +// *INDENT-OFF* +Script M(script_MakeEntities) = { + SI_IF_LT(SI_SAVE_VAR(0), 0xFFFFFF8B), + SI_CALL(0x80111D38, 0x802EA10C, 45, 0, 70, 15, 0x80000000), + SI_CALL(0x80111FB0, M(script_80241470)), + SI_ELSE(), + SI_CALL(0x802C9DCC, 0, 9, 0x7FFFFE00), + SI_END_IF(), + SI_IF_EQ(SI_SAVE_FLAG(54), 0), + SI_CALL(0x80111D38, 0x802EA19C, 230, 0, 310, 15, 0x80000000), + SI_CALL(0x80111FB0, M(script_802414A8)), + SI_END_IF(), + SI_CALL(0x80111D38, 0x802EA588, 230, 60, 310, 15, 151, 0x80000000), + SI_CALL(0x8011206C, SI_SAVE_FLAG(52)), + SI_CALL(0x80111D38, 0x802EA0C4, 230, 50, 0xFFFFFF60, 15, 0x80000000), + SI_CALL(0x80111D38, 0x802EA0C4, 165, 0, 380, 20, 0x80000000), + SI_CALL(0x80111D38, 0x802EA564, 0xFFFFFF56, 0, 370, 43, 343, 0x80000000), + SI_CALL(0x8011206C, SI_SAVE_FLAG(50)), + SI_CALL(0x80111D38, 0x802EAA54, 345, 75, 0xFFFFFF06, 0, 100, 0x80000000), + SI_CALL(0x802D6CC0, 343, 345, 205, 0xFFFFFF06, 17, SI_SAVE_FLAG(56)), + SI_CALL(0x802D6CC0, 343, 345, 230, 0xFFFFFF06, 17, SI_SAVE_FLAG(57)), + SI_CALL(0x802D6CC0, 343, 345, 255, 0xFFFFFF06, 17, SI_SAVE_FLAG(58)), + SI_CALL(0x802D6CC0, 343, 345, 280, 0xFFFFFF06, 17, SI_SAVE_FLAG(59)), + SI_CALL(0x802D6CC0, 128, 229, 250, 0xFFFFFF64, 17, SI_SAVE_FLAG(49)), + SI_CALL(0x80111D38, 0x802EAB04, 300, 0, 150, 0, 18, 0x80000000), + SI_CALL(0x80112114, SI_SAVE_FLAG(88)), + SI_CALL(0x80111D38, 0x802EA7E0, 130, 60, 0, 0, 0x80000000), + SI_RETURN(), + SI_END(), +}; +// *INDENT-ON* + diff --git a/src/world/area_kmr/kmr_03/8C83A0.c b/src/world/area_kmr/kmr_03/8C83A0.c index 2b085c7e07..157a7769f1 100644 --- a/src/world/area_kmr/kmr_03/8C83A0.c +++ b/src/world/area_kmr/kmr_03/8C83A0.c @@ -2,3 +2,336 @@ #include "world/common/SomeMatrixOperations.inc.c" +// 8C9780 +// *INDENT-OFF* +Script M(script_SearchBush_802417F0) = { + SI_USE_BUFFER(SI_VAR(0)), + SI_CMD(0x34, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0xFE363C84), + SI_CALL(0x802D1DFC, SI_VAR(5), SI_VAR(15), SI_VAR(7)), + SI_THREAD(), + SI_SET(SI_FLAG(0), 0), + SI_IF_NE(SI_VAR(1), 0), + SI_LOOP(5), + SI_USE_BUFFER(SI_VAR(1)), + SI_CMD(0x31, 0xFE363C82), + SI_LOOP(SI_VAR(2)), + SI_CMD(0x31, 0xFE363C83), + SI_CALL(SomeMatrixOperation2, SI_VAR(3), SI_FIXED(0.1), 1, SI_VAR(15), 0), + SI_IF_EQ(SI_FLAG(0), 0), + SI_SET(SI_FLAG(0), 1), + SI_CALL(0x802CA558, SI_VAR(3), 339, 0), + SI_END_IF(), + SI_END_LOOP(), + SI_WAIT_FRAMES(1), + SI_USE_BUFFER(SI_VAR(1)), + SI_CMD(0x31, 0xFE363C82), + SI_LOOP(SI_VAR(2)), + SI_CMD(0x31, 0xFE363C83), + SI_CALL(SomeMatrixOperation2, SI_VAR(3), SI_FIXED(0.1), -1, SI_VAR(15), 0), + SI_END_LOOP(), + SI_WAIT_FRAMES(1), + SI_END_LOOP(), + SI_USE_BUFFER(SI_VAR(1)), + SI_CMD(0x31, 0xFE363C82), + SI_LOOP(SI_VAR(2)), + SI_CMD(0x31, 0xFE363C83), + SI_CALL(0x802C8B60, SI_VAR(3), 0, 0, 0), + SI_END_LOOP(), + SI_WAIT_FRAMES(1), + SI_END_IF(), + SI_END_THREAD(), + SI_THREAD(), + SI_IF_NE(SI_VAR(2), 0), + SI_USE_BUFFER(SI_VAR(2)), + SI_CMD(0x31, 0xFE363C83), + SI_LOOP(SI_VAR(3)), + SI_CMD(0x31, 0xFE363C84), + SI_CMD(0x33, 0xFE363C85, 0xFE363C86, 0xFE363C87), + SI_CMD(0x33, 0xFE363C88, 0xFE363C89, 0xFE363C8A), + SI_IF_EQ(SI_VAR(10), 0), + SI_CALL(0x802D6DC0, SI_VAR(4), SI_VAR(5), SI_VAR(6), SI_VAR(7), SI_VAR(8), SI_VAR(9)), + SI_ELSE(), + SI_CALL(0x802D593C, SI_VAR(10), SI_VAR(11)), + SI_IF_EQ(SI_VAR(11), 0), + SI_CALL(0x802D58E0, SI_VAR(10), 1), + SI_CALL(0x802D6DC0, SI_VAR(4), SI_VAR(5), SI_VAR(6), SI_VAR(7), SI_VAR(8), SI_VAR(9)), + SI_END_IF(), + SI_END_IF(), + SI_END_LOOP(), + SI_END_IF(), + SI_END_THREAD(), + SI_WAIT_FRAMES(15), + SI_IF_NE(SI_VAR(4), 0), + SI_EXEC_WAIT(0xFE363C84), + SI_END_IF(), + SI_RETURN(), + SI_END(), +}; +// *INDENT-ON* + +// *INDENT-OFF* +Script M(script_ShakeTree_80241B50) = { + SI_TIMESCALE(SI_FIXED(2.0f)), + SI_USE_BUFFER(SI_VAR(0)), + SI_CMD(0x34, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0xFE363C84), + SI_CMD(0x31, 0xFE363C85), + SI_CALL(0x802D1DFC, SI_VAR(6), SI_VAR(15), SI_VAR(8)), + SI_CALL(0x802D6150, 357), + SI_CALL(0x802D6150, 358), + SI_THREAD(), + SI_SET(SI_FLAG(0), 0), + SI_IF_NE(SI_VAR(1), 0), + SI_WAIT_FRAMES(1), + SI_LOOP(5), + SI_USE_BUFFER(SI_VAR(1)), + SI_CMD(0x31, 0xFE363C82), + SI_LOOP(SI_VAR(2)), + SI_CMD(0x31, 0xFE363C83), + SI_CALL(SomeMatrixOperation2, SI_VAR(3), SI_FIXED(0.1), SI_FIXED(0.2), SI_VAR(15), 0), + SI_IF_EQ(SI_FLAG(0), 0), + SI_SET(SI_FLAG(0), 1), + SI_CALL(0x802CA558, SI_VAR(3), 358, 0), + SI_END_IF(), + SI_END_LOOP(), + SI_WAIT_FRAMES(1), + SI_USE_BUFFER(SI_VAR(1)), + SI_CMD(0x31, 0xFE363C82), + SI_LOOP(SI_VAR(2)), + SI_CMD(0x31, 0xFE363C83), + SI_CALL(SomeMatrixOperation2, SI_VAR(3), SI_FIXED(0.1), SI_FIXED(-0.2), SI_VAR(15), 0), + SI_END_LOOP(), + SI_WAIT_FRAMES(1), + SI_END_LOOP(), + SI_USE_BUFFER(SI_VAR(1)), + SI_CMD(0x31, 0xFE363C82), + SI_LOOP(SI_VAR(2)), + SI_CMD(0x31, 0xFE363C83), + SI_CALL(0x802C8B60, SI_VAR(3), 0, 0, 0), + SI_END_LOOP(), + SI_WAIT_FRAMES(1), + SI_END_IF(), + SI_END_THREAD(), + SI_THREAD(), + SI_SET(SI_FLAG(0), 0), + SI_IF_NE(SI_VAR(2), 0), + SI_LOOP(5), + SI_USE_BUFFER(SI_VAR(2)), + SI_CMD(0x31, 0xFE363C83), + SI_LOOP(SI_VAR(3)), + SI_CMD(0x31, 0xFE363C84), + SI_CALL(SomeMatrixOperation2, SI_VAR(4), SI_FIXED(0.1), SI_FIXED(0.2), SI_VAR(15), 0), + SI_IF_EQ(SI_FLAG(0), 0), + SI_SET(SI_FLAG(0), 1), + SI_CALL(0x802CA558, SI_VAR(4), 357, 0), + SI_END_IF(), + SI_END_LOOP(), + SI_WAIT_FRAMES(1), + SI_USE_BUFFER(SI_VAR(2)), + SI_CMD(0x31, 0xFE363C83), + SI_LOOP(SI_VAR(3)), + SI_CMD(0x31, 0xFE363C84), + SI_CALL(SomeMatrixOperation2, SI_VAR(4), SI_FIXED(0.1), SI_FIXED(-0.2), SI_VAR(15), 0), + SI_END_LOOP(), + SI_WAIT_FRAMES(1), + SI_END_LOOP(), + SI_USE_BUFFER(SI_VAR(2)), + SI_CMD(0x31, 0xFE363C83), + SI_LOOP(SI_VAR(3)), + SI_CMD(0x31, 0xFE363C84), + SI_CALL(0x802C8B60, SI_VAR(4), 0, 0, 0), + SI_END_LOOP(), + SI_WAIT_FRAMES(1), + SI_END_IF(), + SI_END_THREAD(), + SI_THREAD(), + SI_IF_NE(SI_VAR(3), 0), + SI_USE_BUFFER(SI_VAR(3)), + SI_CMD(0x31, 0xFE363C84), + SI_LOOP(SI_VAR(4)), + SI_CMD(0x31, 0xFE363C85), + SI_CMD(0x33, 0xFE363C86, 0xFE363C87, 0xFE363C88), + SI_CMD(0x33, 0xFE363C89, 0xFE363C8A, 0xFE363C8B), + SI_IF_EQ(SI_VAR(11), 0), + SI_CALL(0x802D6DC0, SI_VAR(5), SI_VAR(6), SI_VAR(7), SI_VAR(8), SI_VAR(9), SI_VAR(10)), + SI_ELSE(), + SI_CALL(0x802D593C, SI_VAR(11), SI_VAR(12)), + SI_IF_EQ(SI_VAR(12), 0), + SI_CALL(0x802D58E0, SI_VAR(11), 1), + SI_CALL(0x802D6DC0, SI_VAR(5), SI_VAR(6), SI_VAR(7), SI_VAR(8), SI_VAR(9), SI_VAR(10)), + SI_END_IF(), + SI_END_IF(), + SI_END_LOOP(), + SI_END_IF(), + SI_END_THREAD(), + SI_THREAD(), + SI_IF_NE(SI_VAR(4), 0), + SI_USE_BUFFER(SI_VAR(4)), + SI_CMD(0x31, 0xFE363C85), + SI_LOOP(SI_VAR(5)), + SI_CMD(0x33, 0xFE363C86, 0xFE363C87, 0xFE363C88), + SI_CALL(0x802D829C, 20, 0, SI_VAR(6), SI_VAR(7), SI_VAR(8), 100, 0, 0, 0, 0, 0, 0, 0, 0), + SI_END_LOOP(), + SI_END_IF(), + SI_END_THREAD(), + SI_IF_NE(SI_VAR(5), 0), + SI_EXEC_WAIT(0xFE363C85), + SI_END_IF(), + SI_WAIT_FRAMES(15), + SI_RETURN(), + SI_END(), +}; +// *INDENT-ON* + +s32 M(treeModelList_Bush1_Bush)[] = { + 0x00000001, 0x00000040, +}; + +s32 M(treeEffectVectors_Bush1)[] = { + 0x00000001, 0x0000008F, 0x00000010, 0x000001CE, +}; + +s32 M(searchBushEvent_Bush1)[] = { + M(treeModelList_Bush1_Bush), 0x00000000, M(treeEffectVectors_Bush1), 0x00000000, +}; + +s32 M(treeModelList_Tree1_Leaves)[] = { + 0x00000001, 0x0000003E, +}; + +s32 M(treeModelList_Tree1_Trunk)[] = { + 0x00000001, 0x0000003D, +}; + +s32 M(treeEffectVectors_Tree1)[] = { + 0x00000002, 0xFFFFFFB0, 0x00000082, 0x00000012, 0x0000001C, 0x00000082, 0x00000027, +}; + +// *INDENT-OFF* +Script M(script_Tree1_Callback) = { + SI_IF_EQ(SI_SAVE_FLAG(53), 1), + SI_RETURN(), + SI_END_IF(), + SI_IF_EQ(SI_MAP_FLAG(10), 1), + SI_RETURN(), + SI_END_IF(), + SI_WAIT_FRAMES(10), + SI_CALL(0x802D1DFC, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_IF_LT(SI_VAR(0), 0xFFFFFFE2), + SI_CALL(0x802D6CC0, 138, 0xFFFFFFE9, 100, 35, 13, SI_SAVE_FLAG(53)), + SI_ELSE(), + SI_CALL(0x802D6CC0, 138, 0xFFFFFFAB, 100, 16, 13, SI_SAVE_FLAG(53)), + SI_END_IF(), + SI_SET(SI_MAP_FLAG(10), 1), + SI_RETURN(), + SI_END(), +}; +// *INDENT-ON* + +s32 M(shakeTreeEvent_Tree1)[] = { + M(treeModelList_Tree1_Leaves), M(treeModelList_Tree1_Trunk), 0x00000000, M(treeEffectVectors_Tree1), M(script_Tree1_Callback), +}; + +s32 M(triggerCoord_802422A8)[] = { + 0xC2280000, 0x00000000, 0xC1500000, 0x00000000, +}; + +Script M(script_802422B8) = { + SI_SET(SI_VAR(0), M(searchBushEvent_Bush1)), + SI_BIND(M(script_SearchBush_802417F0), TriggerFlag_WALL_INTERACT, 53, NULL), + SI_SET(SI_VAR(0), M(shakeTreeEvent_Tree1)), + SI_BIND(M(script_ShakeTree_80241B50), TriggerFlag_WALL_HAMMER, 52, NULL), + SI_BIND(M(script_ShakeTree_80241B50), TriggerFlag_BOMB, M(triggerCoord_802422A8), NULL), + SI_RETURN(), + SI_END(), +}; + +s32 padding3[] = {0}; + +// 8CA2D0 +// *INDENT-OFF* +Script M(script_80242340) = { + SI_CALL(0x802CB860, 0, 0xFFFFFEF2, 20, 0xFFFFFFB0), + SI_CALL(0x802CBE2C, 0, 0xFFFFFEF2, 20, 0xFFFFFFB0), + SI_CALL(0x802CBBE4, 0, SI_FIXED(700.0f)), + SI_CALL(0x802CBEF0, 0, SI_FIXED(90.0f)), + SI_CALL(0x802CB79C, 0, 0, 1), + SI_IF_GE(SI_SAVE_VAR(0), 0xFFFFFF89), + SI_CALL(0x802D0EF0, 0, 0xFFFFFC18, 0), + SI_CALL(0x802D0E28, 1), + SI_CALL(0x802D0EF0, 0xFFFFFF20, 20, 0xFFFFFFB0), + SI_CALL(0x802CDCB0, 0xFFFFFFFC, 0xFFFFFF20, 20, 0xFFFFFFB0), + SI_WAIT_FRAMES(20), + SI_CALL(0x802CBEF0, 0, SI_FIXED(3.0f)), + SI_CALL(0x802D1DFC, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802CB860, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802CBE2C, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802CB79C, 0, 0, 1), + SI_CALL(0x802CC354, 0, SI_FIXED(1.0f)), + SI_CALL(0x802CB79C, 0, 0, 0), + SI_CALL(0x802D0E28, 0), + SI_RETURN(), + SI_END_IF(), + SI_CALL(0x802D0E28, 1), + SI_CALL(0x802D0DE4, 1), + SI_CALL(0x802D1DFC, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802D0EF0, SI_VAR(0), 0xFFFFFC18, SI_VAR(2)), + SI_WAIT_FRAMES(30), + SI_CALL(0x802CBBE4, 0, 220), + SI_CALL(0x802CBEF0, 0, SI_FIXED(1.0f)), + SI_CALL(0x802CB79C, 0, 0, 1), + SI_CALL(0x802CC354, 0, SI_FIXED(1.0f)), + SI_THREAD(), + SI_WAIT_FRAMES(18), + SI_CALL(0x802D2CD8, 373, 0), + SI_WAIT_FRAMES(30), + SI_CALL(0x802D2CD8, 374, 0), + SI_WAIT_FRAMES(28), + SI_CALL(0x802D2CD8, 373, 0), + SI_END_THREAD(), + SI_CALL(0x802D0DA0, 1), + SI_CALL(0x802D1084, 0x10002), + SI_CALL(0x802D0EF0, 0xFFFFFF20, 120, 0xFFFFFFB0), + SI_CALL(0x802D193C, 90, 0), + SI_LABEL(0), + SI_WAIT_FRAMES(1), + SI_CALL(0x802D1DFC, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_ADD(SI_VAR(1), 0xFFFFFFFE), + SI_CALL(0x802D0EF0, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_IF_GT(SI_VAR(1), 86), + SI_GOTO(0), + SI_END_IF(), + SI_CALL(0x802D0EF0, 0xFFFFFECA, 20, 0xFFFFFFB0), + SI_THREAD(), + SI_WAIT_FRAMES(20), + SI_CALL(0x802CBE2C, 0, 0xFFFFFECA, 20, 0xFFFFFFB0), + SI_CALL(0x802CBEF0, 0, SI_FIXED(0.2)), + SI_CALL(0x802CB79C, 0, 0, 1), + SI_END_THREAD(), + SI_CALL(0x802D286C, 0x2800), + SI_CALL(0x802D2520, 0x10002, 5, 5, 1, 1, 0), + SI_WAIT_FRAMES(100), + SI_CALL(0x802CC354, 0, SI_FIXED(1.0f)), + SI_CALL(0x802D2520, 0x10002, 0, 0, 0, 0, 0), + SI_CALL(0x802D0DA0, 0), + SI_CALL(0x802D1084, 0x10006), + SI_WAIT_FRAMES(10), + SI_CALL(0x802D1084, 0x10007), + SI_CALL(0x802D1DFC, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802D1054, SI_FIXED(1.0f)), + SI_CALL(0x802D18E8, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10), + SI_CALL(0x802D1084, 0x10002), + SI_THREAD(), + SI_CALL(0x802CBEF0, 0, SI_FIXED(3.0f)), + SI_CALL(0x802D1DFC, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802CB860, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802CBE2C, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802CB79C, 0, 0, 1), + SI_CALL(0x802CC354, 0, SI_FIXED(1.0f)), + SI_CALL(0x802CB79C, 0, 0, 0), + SI_END_THREAD(), + SI_WAIT_FRAMES(30), + SI_CALL(0x802D0DE4, 0), + SI_CALL(0x802D0E28, 0), + SI_RETURN(), + SI_END(), +}; diff --git a/src/world/area_kmr/kmr_03/kmr_03.h b/src/world/area_kmr/kmr_03/kmr_03.h index b813b64200..2e655ab085 100644 --- a/src/world/area_kmr/kmr_03/kmr_03.h +++ b/src/world/area_kmr/kmr_03/kmr_03.h @@ -2,3 +2,7 @@ #include "map.h" #define MAP_NAME kmr_03 + +ApiStatus func_80240000_8C7F90(ScriptInstance* script, s32 isInitialCall); +Script M(Main); +Script M(script_802406C0); diff --git a/tools/splat.yaml b/tools/splat.yaml index 68395935ff..6bdebe26ff 100644 --- a/tools/splat.yaml +++ b/tools/splat.yaml @@ -1359,15 +1359,16 @@ segments: vram: 0x80240000 files: - [0x8C7F90, "c"] + - [0x8C8140, "c"] - [0x8C82B0, "c"] - [0x8C83A0, "c"] - - [0x8C85E0, "bin"] - - [0x8C8680, "bin"] - - [0x8C88E0, "bin"] - - [0x8C9400, "bin"] - - [0x8C9780, "bin"] - - [0x8CA2D0, "bin"] - - [0x8CA8F0, "bin"] # rodata + - [0x8C85E0, ".data", "world/area_kmr/kmr_03/8C7F90"] + - [0x8C8680, ".data", "world/area_kmr/kmr_03/8C8140"] + - [0x8C88E0, ".data", "world/area_kmr/kmr_03/8C82B0"] + # - [0x8C9400, "bin"] + - [0x8C9780, ".data", "world/area_kmr/kmr_03/8C83A0"] + # - [0x8CA2D0, "bin"] + - [0x8CA8F0, ".rodata", "world/area_kmr/kmr_03/8C8140"] - name: world/area_kmr/kmr_04/ type: code overlay: True From 44fd38f4f80fbb70f2b8c0735839be8101d6923f Mon Sep 17 00:00:00 2001 From: Alex Bates <16batesa@gmail.com> Date: Sat, 31 Oct 2020 18:30:16 +0000 Subject: [PATCH 73/78] add image splits --- .gitignore | 1 + .vscode/settings.json | 1 - Makefile | 50 +++++++++-- requirements.txt | 1 + sources.mk | 3 + tools/convert_image.py | 193 +++++++++++++++++++++++++++++++++++++++++ tools/n64splat | 2 +- tools/splat.yaml | 69 ++++++++++++++- 8 files changed, 309 insertions(+), 11 deletions(-) create mode 100755 tools/convert_image.py diff --git a/.gitignore b/.gitignore index e08969475e..3600fdfb40 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ settings.mk *.i *.Yay0 bin/ +img/ build/ docs/doxygen/ include/ld_addrs.h diff --git a/.vscode/settings.json b/.vscode/settings.json index b9a9ded7bd..c2b3c50402 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,7 +10,6 @@ "-D_LANGUAGE_C", "-DSCRIPT(...)={}", ], - "python.pythonPath": "/usr/bin/python3", "git.ignoreLimitWarning": true, "search.exclude": { "build": true, diff --git a/Makefile b/Makefile index ece296eab5..fcdcdbf959 100644 --- a/Makefile +++ b/Makefile @@ -98,14 +98,14 @@ submodules: git submodule update --init --recursive split: - rm -rf bin - $(SPLAT) --modes ld bin Yay0 PaperMarioMapFS + rm -rf bin img + $(SPLAT) --modes ld bin Yay0 PaperMarioMapFS rgba16 rgba32 ia4 ia8 ia16 i4 i8 ci4 ci8 -split-bin: - $(SPLAT) --modes ld bin +split-%: + $(SPLAT) --modes ld $* split-all: - rm -rf bin + rm -rf bin img $(SPLAT) --modes all test: $(ROM) @@ -137,13 +137,51 @@ $(BUILD_DIR)/%.c.o: %.c $(MDEPS) # Compile C files (with DSL macros) $(foreach cfile, $(DSL_C_FILES), $(BUILD_DIR)/$(cfile).o): $(BUILD_DIR)/%.c.o: %.c $(MDEPS) @mkdir -p $(shell dirname $@) - $(CPP) $(CPPFLAGS) -o - $< $(CPPMFLAGS) | tools/compile_dsl_macros.py | $(CC) $(CFLAGS) -o - | $(OLD_AS) $(OLDASFLAGS) -o $@ - + $(CPP) $(CPPFLAGS) -o - $< $(CPPMFLAGS) | $(PYTHON) tools/compile_dsl_macros.py | $(CC) $(CFLAGS) -o - | $(OLD_AS) $(OLDASFLAGS) -o $@ - # Assemble handwritten ASM $(BUILD_DIR)/%.s.o: %.s @mkdir -p $(shell dirname $@) $(AS) $(ASFLAGS) -o $@ $< +# Images +$(BUILD_DIR)/%.png.o: $(BUILD_DIR)/%.png + $(LD) -r -b binary -o $@ $< +$(BUILD_DIR)/%.rgba16.png: %.png + @mkdir -p $(shell dirname $@) + $(PYTHON) tools/convert_image.py rgba16 $< $@ $(IMG_FLAGS) +$(BUILD_DIR)/%.rgba32.png: %.png + @mkdir -p $(shell dirname $@) + $(PYTHON) tools/convert_image.py rgba32 $< $@ $(IMG_FLAGS) +$(BUILD_DIR)/%.ci8.png: %.png + @mkdir -p $(shell dirname $@) + $(PYTHON) tools/convert_image.py ci8 $< $@ $(IMG_FLAGS) +$(BUILD_DIR)/%.ci8palette.png: %.png + @mkdir -p $(shell dirname $@) + $(PYTHON) tools/convert_image.py ci8palette $< $@ $(IMG_FLAGS) +$(BUILD_DIR)/%.ci4.png: %.png + @mkdir -p $(shell dirname $@) + $(PYTHON) tools/convert_image.py ci4 $< $@ $(IMG_FLAGS) +$(BUILD_DIR)/%.ci4palette.png: %.png + @mkdir -p $(shell dirname $@) + $(PYTHON) tools/convert_image.py ci4palette $< $@ $(IMG_FLAGS) +$(BUILD_DIR)/%.ia4.png: %.png + @mkdir -p $(shell dirname $@) + $(PYTHON) tools/convert_image.py ia4 $< $@ $(IMG_FLAGS) +$(BUILD_DIR)/%.ia8.png: %.png + @mkdir -p $(shell dirname $@) + $(PYTHON) tools/convert_image.py ia8 $< $@ $(IMG_FLAGS) +$(BUILD_DIR)/%.ia16.png: %.png + @mkdir -p $(shell dirname $@) + $(PYTHON) tools/convert_image.py ia16 $< $@ $(IMG_FLAGS) +$(BUILD_DIR)/%.i4.png: %.png + @mkdir -p $(shell dirname $@) + $(PYTHON) tools/convert_image.py i4 $< $@ $(IMG_FLAGS) +$(BUILD_DIR)/%.i8.png: %.png + @mkdir -p $(shell dirname $@) + $(PYTHON) tools/convert_image.py i8 $< $@ $(IMG_FLAGS) + + ASSET_FILES := $(foreach asset, $(ASSETS), $(BUILD_DIR)/bin/assets/$(asset)) YAY0_ASSET_FILES := $(foreach asset, $(filter-out %_tex, $(ASSET_FILES)), $(asset).Yay0) diff --git a/requirements.txt b/requirements.txt index 361a2122c4..450238e89e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ capstone PyYAML lark-parser +pypng diff --git a/sources.mk b/sources.mk index 47d7169a4c..f2c0e86888 100644 --- a/sources.mk +++ b/sources.mk @@ -55,3 +55,6 @@ ASSETS := \ kmr_bg nok_bg sbk_bg sbk3_bg iwa_bg hos_bg arn_bg obk_bg omo_bg yos_bg jan_bg fla_bg flb_bg sra_bg yki_bg sam_bg kpa_bg title_bg \ title_data \ party_kurio party_kameki party_pinki party_pareta party_resa party_akari party_opuku party_pokopi + +# Image settings +$(BUILD_DIR)/img/battle/text_action_command_ratings.ia4.png: IMG_FLAGS = --flip-y diff --git a/tools/convert_image.py b/tools/convert_image.py new file mode 100755 index 0000000000..afc92d94bc --- /dev/null +++ b/tools/convert_image.py @@ -0,0 +1,193 @@ +#! /usr/bin/python3 + +from sys import argv, stderr +from math import floor, ceil +from itertools import zip_longest +import png + +def unpack_color(s): + r = (s >> 11) & 0x1F + g = (s >> 6) & 0x1F + b = (s >> 1) & 0x1F + a = (s & 1) * 0xFF + + r = ceil(0xFF * (r / 31)) + g = ceil(0xFF * (g / 31)) + b = ceil(0xFF * (b / 31)) + + return r, g, b, a + +def pack_color(r, g, b, a): + r = floor(31 * (r / 255)) + g = floor(31 * (g / 255)) + b = floor(31 * (b / 255)) + + s = round(a / 0xFF) + s |= (r & 0x1F) << 11 + s |= (g & 0x1F) << 6 + s |= (b & 0x1F) << 1 + + return s + +def rgb_to_intensity(r, g, b): + return round(r * 0.2126 + g * 0.7152 + 0.0722 * b) + +def iter_in_groups(iterable, n, fillvalue=None): + args = [iter(iterable)] * n + return zip_longest(*args, fillvalue=fillvalue) + + + +def reversed_if(iterator, cond): + if cond: + return reversed(list(iterator)) + else: + return iterator + +class Converter(): + def __init__(self, mode, infile, outfile, *argv): + self.mode = mode + self.infile = infile + self.outfile = outfile + self.flip_y = "--flip-y" in argv + + self.warned = False + + def warn(self, msg): + if not self.warned: + self.warned = True + print(self.infile + ": warning: " + msg, file=stderr) + + def convert(self): + img = png.Reader(self.infile) + + if self.mode == "rgba32": + with open(self.outfile, "wb") as f: + for row in reversed_if(img.asRGBA()[2], self.flip_y): + f.write(row) + elif self.mode == "rgba16": + with open(self.outfile, "wb") as f: + for row in reversed_if(img.asRGBA()[2], self.flip_y): + for rgba in iter_in_groups(row, 4): + if rgba[3] not in (0, 0xFF): + self.warn("alpha mask mode but translucent pixels used") + + color = pack_color(*rgba) + f.write(color.to_bytes(2, byteorder="big")) + elif self.mode == "ci8": + with open(self.outfile, "wb") as f: + for row in reversed_if(img.read()[2], self.flip_y): + f.write(row) + elif self.mode == "ci4": + with open(self.outfile, "wb") as f: + for row in reversed_if(img.read()[2], self.flip_y): + for a, b in iter_in_groups(row, 2): + byte = (a << 4) | b + f.write(byte.to_bytes(1, byteorder="big")) + elif self.mode == "ci8palette" or self.mode == "ci4palette": + img.preamble(True) + palette = img.palette(alpha="force") + + with open(self.outfile, "wb") as f: + for rgba in palette: + if rgba[3] not in (0, 0xFF): + self.warn("alpha mask mode but translucent pixels used") + + color = pack_color(*rgba) + f.write(color.to_bytes(2, byteorder="big")) + elif self.mode == "ia4": + with open(self.outfile, "wb") as f: + for row in reversed_if(img.asRGBA()[2], self.flip_y): + for c1, c2 in iter_in_groups(iter_in_groups(row, 4), 2): + i1 = rgb_to_intensity(*c1[:3]) + a1 = c1[3] + + i2 = rgb_to_intensity(*c2[:3]) + a2 = c2[3] + + i1 = floor(7 * (i1 / 0xFF)) + i2 = floor(7 * (i2 / 0xFF)) + + if a1 not in (0, 0xFF) or a2 not in (0, 0xFF): + self.warn("alpha mask mode but translucent pixels used") + if c1[0] != c1[1] != c1[2]: + self.warn("grayscale mode but image is not") + if c2[0] != c2[1] != c2[2]: + self.warn("grayscale mode but image is not") + + a1 = 1 if a1 > 128 else 0 + a2 = 1 if a2 > 128 else 0 + + h = (i1 << 1) | a1 + l = (i2 << 1) | a2 + + byte = (h << 4) | l + f.write(byte.to_bytes(1, byteorder="big")) + elif self.mode == "ia8": + with open(self.outfile, "wb") as f: + for row in reversed_if(img.asRGBA()[2], self.flip_y): + for rgba in iter_in_groups(row, 4): + i = rgb_to_intensity(*rgba[:3]) + a = rgba[3] + + i = floor(15 * (i / 0xFF)) + a = floor(15 * (a / 0xFF)) + + if rgba[0] != rgba[1] != rgba[2]: + self.warn("grayscale mode but image is not") + + byte = (i << 4) | a + f.write(byte.to_bytes(1, byteorder="big")) + elif self.mode == "ia16": + with open(self.outfile, "wb") as f: + for row in reversed_if(img.asRGBA()[2], self.flip_y): + for rgba in iter_in_groups(row, 4): + i = rgb_to_intensity(*rgba[:3]) + a = rgba[3] + + if rgba[0] != rgba[1] != rgba[2]: + self.warn("grayscale mode but image is not") + + f.write(bytes((i, a))) + elif self.mode == "i4": + with open(self.outfile, "wb") as f: + for row in reversed_if(img.asRGBA()[2], self.flip_y): + for c1, c2 in iter_in_groups(iter_in_groups(row, 4), 2): + if c1[3] != 0xFF or c2[3] != 0xFF: + self.warn("discarding alpha channel") + + i1 = rgb_to_intensity(*c1[:3]) + i2 = rgb_to_intensity(*c2[:3]) + + i1 = floor(15 * (i1 / 0xFF)) + i2 = floor(15 * (i2 / 0xFF)) + + if c1[0] != c1[1] != c1[2]: + self.warn("grayscale mode but image is not") + if c2[0] != c2[1] != c2[2]: + self.warn("grayscale mode but image is not") + + byte = (i1 << 4) | i2 + f.write(byte.to_bytes(1, byteorder="big")) + elif self.mode == "i8": + with open(self.outfile, "wb") as f: + for row in reversed_if(img.asRGBA()[2], self.flip_y): + for rgba in iter_in_groups(row, 4): + if rgba[3] != 0xFF or rgba[3] != 0xFF: + self.warn("discarding alpha channel") + if rgba[0] != rgba[1] != rgba[2]: + self.warn("grayscale mode but image is not") + + i = rgb_to_intensity(*rgba[:3]) + f.write(i.to_bytes(1, byteorder="big")) + else: + print("unsupported mode", file=stderr) + exit(1) + + +if __name__ == "__main__": + if len(argv) < 4: + print("usage: convert_image.py MODE INFILE OUTFILE [--flip-y]") + exit(1) + + Converter(*argv[1:]).convert() diff --git a/tools/n64splat b/tools/n64splat index 037d80e00c..6443fba42f 160000 --- a/tools/n64splat +++ b/tools/n64splat @@ -1 +1 @@ -Subproject commit 037d80e00cb3aeae37bdad77bfac871036982456 +Subproject commit 6443fba42f530ef99187a79cd93b9e5d95161ef7 diff --git a/tools/splat.yaml b/tools/splat.yaml index 68395935ff..61fc4ee65e 100644 --- a/tools/splat.yaml +++ b/tools/splat.yaml @@ -212,6 +212,14 @@ segments: - [0x8a860, "c", "code_8a860_len_3f30"] - [0x8e790, "c", "code_8e790_len_2850"] - [0x90fe0, "bin"] + - [0x93CD0, ci4, ui/hammer, 32, 32] + - [0x93ED0, ci4palette, ui/hammer] + - [0x93EF0, ci4palette, ui/hammer.disabled] + - [0x93FF0, bin] + - [0x9D658, rgba32, ui/stat_heart, 16, 16] + - [0x9DA58, bin] + - [0x9DA60, rgba32, ui/stat_flower, 16, 16] + - [0x9DE60, bin] - type: code start: 0xA5DD0 vram: 0x8010F6D0 @@ -268,8 +276,17 @@ segments: - [0x1086a0, "c", "code_1086a0_len_fc0"] - [0x109660, "c", "code_109660_len_1270"] - [0x10A8D0, "c", "code_10A8D0"] - - [0x10A9F0, "bin"] # todo split this further - - [0x131340, "bin"] # 0x8023E000 + - [0x10A9F0, i4, shadow/square, 16, 16] + - [0x10AA70, i4, shadow/circle, 16, 16] + - [0x10AAF0, bin] + - [0x10AB70, i4, shadow/10AB70, 32, 32] + - [0x10AD70, i4, shadow/10AD70, 32, 32] + - [0x10AF70, bin] # TODO + - [0x1164B8, ci8, peach_letter, 150, 105] + - [0x11A23E, bin] + - [0x11A240, ci8palette, peach_letter] + - [0x11A440, bin] + - [0x131340, bin] - type: code start: 0x135EE0 vram: 0x80242BA0 @@ -280,6 +297,28 @@ segments: - [0x140C70, "c"] - [0x1421C0, "c"] - [0x1422A0, "bin"] + - [0x1443F0, ci8, pause/world_map, 320, 320] + - [0x15D3F0, ci8palette, pause/world_map] + - [0x15D5F0, ci4, pause/spirits_bg, 128, 110] + - [0x15F170, ci4palette, pause/spirits_bg] + - [0x15F270, bin] + - [0x15F970, ci4, pause/banner_hp, 64, 16] + - [0x15FB70, ci4palette, pause/banner_hp] + - [0x15FD70, ci4, pause/banner_fp, 64, 16] + - [0x15FF70, ci4palette, pause/banner_fp] + - [0x160170, ci4, pause/banner_bp, 64, 16] + - [0x160370, ci4palette, pause/banner_bp] + - [0x160570, ci4, pause/banner_boots, 48, 16] + - [0x1606F0, ci4palette, pause/banner_boots] + - [0x1608F0, ci4, pause/banner_hammer, 48, 16] + - [0x160A70, ci4palette, pause/banner_hammer] + - [0x160C70, ci4, pause/banner_star_energy, 48, 16] + - [0x160DF0, ci4palette, pause/banner_star_energy] + - [0x160FF0, ci4, pause/available, 64, 16] + - [0x1611F0, ci4palette, pause/available] + - [0x1613F0, ci4, pause/prompt_check_abilities, 128, 16] + - [0x1617F0, ci4palette, pause/prompt_check_abilities] + - [0x1619F0, bin] - type: code start: 0x163400 vram: 0x80242BA0 @@ -313,6 +352,21 @@ segments: - [0x1AF230, "c"] - [0x1AF2D0, "bin"] - [0x1CC310, "bin"] # icon images and palettes, vram unknown + - [0x1FE1B0, rgba16, title/logo_n64, 128, 112] + - [0x2051B0, rgba16, title/logo_is, 256, 122] + - [0x2131B0, rgba16, title/logo_nintendo, 256, 48] + - [0x2191B0, ci8, title/bg_1, 264, 162] + - [0x2238C0, ci8palette, title/bg_1] + - [0x223AC0, ci8, title/bg_2, 264, 162] + - [0x22E1D0, ci8palette, title/bg_2] + - [0x22E3D0, ci8, title/bg_3, 264, 162] + - [0x238AE0, ci8palette, title/bg_3] + - [0x238CE0, ci8, title/bg_4, 264, 162] + - [0x2433F0, ci8palette, title/bg_4] + - [0x2435F0, ia8, title/tape, 128, 128] + - [0x2475F0, ci8, title/bowser_silhouette, 128, 128] + - [0x24B5F0, ci8palette, title/bowser_silhouette] + - [0x24B7F0, bin] - type: code start: 0x3169F0 vram: 0x80200000 @@ -482,13 +536,13 @@ segments: files: - [0x33CDF0, "c"] - [0x33d5d0, "bin"] + - [0x33D610, "bin"] - type: code start: 0x33E8C0 vram: 0xE002A000 files: - [0x33E8C0, "c"] - [0x33efe0, "bin"] - - [0x33D610, "bin"] - type: code start: 0x33FE80 vram: 0xE002C000 @@ -731,6 +785,13 @@ segments: - [0x38F900, "c"] - [0x390340, "bin"] - [0x3903D0, "bin"] + - start: 0x390810 + type: ia4 + name: battle/text_action_command_ratings + width: 64 + height: 125 + flip: vertical + - [0x3917B0, bin] - type: code start: 0x391D30 vram: 0xE0092000 @@ -814,6 +875,8 @@ segments: - [0x3BA030, "c"] - [0x3BAC60, "bin"] - [0x3BAEA0, "bin"] # todo split this further ADD STUFF AFTER HERE + - [0x3ED4E0, "ia8", "world/text_chapter", 128, 38] + - [0x3EE7E0, "bin"] - type: code start: 0x415D90 vram: 0x802A1000 From ca4c4b0507b5163449eee55726664886de3626e4 Mon Sep 17 00:00:00 2001 From: Alex Bates <16batesa@gmail.com> Date: Sat, 31 Oct 2020 18:50:00 +0000 Subject: [PATCH 74/78] bump splat --- tools/n64splat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/n64splat b/tools/n64splat index 6443fba42f..c8b324cdc0 160000 --- a/tools/n64splat +++ b/tools/n64splat @@ -1 +1 @@ -Subproject commit 6443fba42f530ef99187a79cd93b9e5d95161ef7 +Subproject commit c8b324cdc0072724ed78b90d2008f36c238b1a76 From bfbae5e26a7d1524947375ecf872a83cf0d7cea4 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Sat, 31 Oct 2020 15:04:45 -0400 Subject: [PATCH 75/78] remove padding3 --- src/world/area_kmr/kmr_03/8C83A0.c | 92 ------------------------------ src/world/area_kmr/kmr_03/8C85E0.c | 90 +++++++++++++++++++++++++++++ tools/splat.yaml | 3 +- 3 files changed, 92 insertions(+), 93 deletions(-) create mode 100644 src/world/area_kmr/kmr_03/8C85E0.c diff --git a/src/world/area_kmr/kmr_03/8C83A0.c b/src/world/area_kmr/kmr_03/8C83A0.c index 157a7769f1..de44b33c5e 100644 --- a/src/world/area_kmr/kmr_03/8C83A0.c +++ b/src/world/area_kmr/kmr_03/8C83A0.c @@ -2,7 +2,6 @@ #include "world/common/SomeMatrixOperations.inc.c" -// 8C9780 // *INDENT-OFF* Script M(script_SearchBush_802417F0) = { SI_USE_BUFFER(SI_VAR(0)), @@ -244,94 +243,3 @@ Script M(script_802422B8) = { SI_RETURN(), SI_END(), }; - -s32 padding3[] = {0}; - -// 8CA2D0 -// *INDENT-OFF* -Script M(script_80242340) = { - SI_CALL(0x802CB860, 0, 0xFFFFFEF2, 20, 0xFFFFFFB0), - SI_CALL(0x802CBE2C, 0, 0xFFFFFEF2, 20, 0xFFFFFFB0), - SI_CALL(0x802CBBE4, 0, SI_FIXED(700.0f)), - SI_CALL(0x802CBEF0, 0, SI_FIXED(90.0f)), - SI_CALL(0x802CB79C, 0, 0, 1), - SI_IF_GE(SI_SAVE_VAR(0), 0xFFFFFF89), - SI_CALL(0x802D0EF0, 0, 0xFFFFFC18, 0), - SI_CALL(0x802D0E28, 1), - SI_CALL(0x802D0EF0, 0xFFFFFF20, 20, 0xFFFFFFB0), - SI_CALL(0x802CDCB0, 0xFFFFFFFC, 0xFFFFFF20, 20, 0xFFFFFFB0), - SI_WAIT_FRAMES(20), - SI_CALL(0x802CBEF0, 0, SI_FIXED(3.0f)), - SI_CALL(0x802D1DFC, SI_VAR(0), SI_VAR(1), SI_VAR(2)), - SI_CALL(0x802CB860, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)), - SI_CALL(0x802CBE2C, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)), - SI_CALL(0x802CB79C, 0, 0, 1), - SI_CALL(0x802CC354, 0, SI_FIXED(1.0f)), - SI_CALL(0x802CB79C, 0, 0, 0), - SI_CALL(0x802D0E28, 0), - SI_RETURN(), - SI_END_IF(), - SI_CALL(0x802D0E28, 1), - SI_CALL(0x802D0DE4, 1), - SI_CALL(0x802D1DFC, SI_VAR(0), SI_VAR(1), SI_VAR(2)), - SI_CALL(0x802D0EF0, SI_VAR(0), 0xFFFFFC18, SI_VAR(2)), - SI_WAIT_FRAMES(30), - SI_CALL(0x802CBBE4, 0, 220), - SI_CALL(0x802CBEF0, 0, SI_FIXED(1.0f)), - SI_CALL(0x802CB79C, 0, 0, 1), - SI_CALL(0x802CC354, 0, SI_FIXED(1.0f)), - SI_THREAD(), - SI_WAIT_FRAMES(18), - SI_CALL(0x802D2CD8, 373, 0), - SI_WAIT_FRAMES(30), - SI_CALL(0x802D2CD8, 374, 0), - SI_WAIT_FRAMES(28), - SI_CALL(0x802D2CD8, 373, 0), - SI_END_THREAD(), - SI_CALL(0x802D0DA0, 1), - SI_CALL(0x802D1084, 0x10002), - SI_CALL(0x802D0EF0, 0xFFFFFF20, 120, 0xFFFFFFB0), - SI_CALL(0x802D193C, 90, 0), - SI_LABEL(0), - SI_WAIT_FRAMES(1), - SI_CALL(0x802D1DFC, SI_VAR(0), SI_VAR(1), SI_VAR(2)), - SI_ADD(SI_VAR(1), 0xFFFFFFFE), - SI_CALL(0x802D0EF0, SI_VAR(0), SI_VAR(1), SI_VAR(2)), - SI_IF_GT(SI_VAR(1), 86), - SI_GOTO(0), - SI_END_IF(), - SI_CALL(0x802D0EF0, 0xFFFFFECA, 20, 0xFFFFFFB0), - SI_THREAD(), - SI_WAIT_FRAMES(20), - SI_CALL(0x802CBE2C, 0, 0xFFFFFECA, 20, 0xFFFFFFB0), - SI_CALL(0x802CBEF0, 0, SI_FIXED(0.2)), - SI_CALL(0x802CB79C, 0, 0, 1), - SI_END_THREAD(), - SI_CALL(0x802D286C, 0x2800), - SI_CALL(0x802D2520, 0x10002, 5, 5, 1, 1, 0), - SI_WAIT_FRAMES(100), - SI_CALL(0x802CC354, 0, SI_FIXED(1.0f)), - SI_CALL(0x802D2520, 0x10002, 0, 0, 0, 0, 0), - SI_CALL(0x802D0DA0, 0), - SI_CALL(0x802D1084, 0x10006), - SI_WAIT_FRAMES(10), - SI_CALL(0x802D1084, 0x10007), - SI_CALL(0x802D1DFC, SI_VAR(0), SI_VAR(1), SI_VAR(2)), - SI_CALL(0x802D1054, SI_FIXED(1.0f)), - SI_CALL(0x802D18E8, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10), - SI_CALL(0x802D1084, 0x10002), - SI_THREAD(), - SI_CALL(0x802CBEF0, 0, SI_FIXED(3.0f)), - SI_CALL(0x802D1DFC, SI_VAR(0), SI_VAR(1), SI_VAR(2)), - SI_CALL(0x802CB860, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)), - SI_CALL(0x802CBE2C, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)), - SI_CALL(0x802CB79C, 0, 0, 1), - SI_CALL(0x802CC354, 0, SI_FIXED(1.0f)), - SI_CALL(0x802CB79C, 0, 0, 0), - SI_END_THREAD(), - SI_WAIT_FRAMES(30), - SI_CALL(0x802D0DE4, 0), - SI_CALL(0x802D0E28, 0), - SI_RETURN(), - SI_END(), -}; diff --git a/src/world/area_kmr/kmr_03/8C85E0.c b/src/world/area_kmr/kmr_03/8C85E0.c new file mode 100644 index 0000000000..b2a4a3b6b1 --- /dev/null +++ b/src/world/area_kmr/kmr_03/8C85E0.c @@ -0,0 +1,90 @@ +#include "kmr_03.h" + +// *INDENT-OFF* +Script M(script_80242340) = { + SI_CALL(0x802CB860, 0, 0xFFFFFEF2, 20, 0xFFFFFFB0), + SI_CALL(0x802CBE2C, 0, 0xFFFFFEF2, 20, 0xFFFFFFB0), + SI_CALL(0x802CBBE4, 0, SI_FIXED(700.0f)), + SI_CALL(0x802CBEF0, 0, SI_FIXED(90.0f)), + SI_CALL(0x802CB79C, 0, 0, 1), + SI_IF_GE(SI_SAVE_VAR(0), 0xFFFFFF89), + SI_CALL(0x802D0EF0, 0, 0xFFFFFC18, 0), + SI_CALL(0x802D0E28, 1), + SI_CALL(0x802D0EF0, 0xFFFFFF20, 20, 0xFFFFFFB0), + SI_CALL(0x802CDCB0, 0xFFFFFFFC, 0xFFFFFF20, 20, 0xFFFFFFB0), + SI_WAIT_FRAMES(20), + SI_CALL(0x802CBEF0, 0, SI_FIXED(3.0f)), + SI_CALL(0x802D1DFC, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802CB860, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802CBE2C, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802CB79C, 0, 0, 1), + SI_CALL(0x802CC354, 0, SI_FIXED(1.0f)), + SI_CALL(0x802CB79C, 0, 0, 0), + SI_CALL(0x802D0E28, 0), + SI_RETURN(), + SI_END_IF(), + SI_CALL(0x802D0E28, 1), + SI_CALL(0x802D0DE4, 1), + SI_CALL(0x802D1DFC, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802D0EF0, SI_VAR(0), 0xFFFFFC18, SI_VAR(2)), + SI_WAIT_FRAMES(30), + SI_CALL(0x802CBBE4, 0, 220), + SI_CALL(0x802CBEF0, 0, SI_FIXED(1.0f)), + SI_CALL(0x802CB79C, 0, 0, 1), + SI_CALL(0x802CC354, 0, SI_FIXED(1.0f)), + SI_THREAD(), + SI_WAIT_FRAMES(18), + SI_CALL(0x802D2CD8, 373, 0), + SI_WAIT_FRAMES(30), + SI_CALL(0x802D2CD8, 374, 0), + SI_WAIT_FRAMES(28), + SI_CALL(0x802D2CD8, 373, 0), + SI_END_THREAD(), + SI_CALL(0x802D0DA0, 1), + SI_CALL(0x802D1084, 0x10002), + SI_CALL(0x802D0EF0, 0xFFFFFF20, 120, 0xFFFFFFB0), + SI_CALL(0x802D193C, 90, 0), + SI_LABEL(0), + SI_WAIT_FRAMES(1), + SI_CALL(0x802D1DFC, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_ADD(SI_VAR(1), 0xFFFFFFFE), + SI_CALL(0x802D0EF0, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_IF_GT(SI_VAR(1), 86), + SI_GOTO(0), + SI_END_IF(), + SI_CALL(0x802D0EF0, 0xFFFFFECA, 20, 0xFFFFFFB0), + SI_THREAD(), + SI_WAIT_FRAMES(20), + SI_CALL(0x802CBE2C, 0, 0xFFFFFECA, 20, 0xFFFFFFB0), + SI_CALL(0x802CBEF0, 0, SI_FIXED(0.2)), + SI_CALL(0x802CB79C, 0, 0, 1), + SI_END_THREAD(), + SI_CALL(0x802D286C, 0x2800), + SI_CALL(0x802D2520, 0x10002, 5, 5, 1, 1, 0), + SI_WAIT_FRAMES(100), + SI_CALL(0x802CC354, 0, SI_FIXED(1.0f)), + SI_CALL(0x802D2520, 0x10002, 0, 0, 0, 0, 0), + SI_CALL(0x802D0DA0, 0), + SI_CALL(0x802D1084, 0x10006), + SI_WAIT_FRAMES(10), + SI_CALL(0x802D1084, 0x10007), + SI_CALL(0x802D1DFC, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802D1054, SI_FIXED(1.0f)), + SI_CALL(0x802D18E8, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10), + SI_CALL(0x802D1084, 0x10002), + SI_THREAD(), + SI_CALL(0x802CBEF0, 0, SI_FIXED(3.0f)), + SI_CALL(0x802D1DFC, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802CB860, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802CBE2C, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)), + SI_CALL(0x802CB79C, 0, 0, 1), + SI_CALL(0x802CC354, 0, SI_FIXED(1.0f)), + SI_CALL(0x802CB79C, 0, 0, 0), + SI_END_THREAD(), + SI_WAIT_FRAMES(30), + SI_CALL(0x802D0DE4, 0), + SI_CALL(0x802D0E28, 0), + SI_RETURN(), + SI_END(), +}; +// *INDENT-ON* diff --git a/tools/splat.yaml b/tools/splat.yaml index 6bdebe26ff..12d0deebb3 100644 --- a/tools/splat.yaml +++ b/tools/splat.yaml @@ -1362,12 +1362,13 @@ segments: - [0x8C8140, "c"] - [0x8C82B0, "c"] - [0x8C83A0, "c"] + - [0x8C85E0, "c"] - [0x8C85E0, ".data", "world/area_kmr/kmr_03/8C7F90"] - [0x8C8680, ".data", "world/area_kmr/kmr_03/8C8140"] - [0x8C88E0, ".data", "world/area_kmr/kmr_03/8C82B0"] # - [0x8C9400, "bin"] - [0x8C9780, ".data", "world/area_kmr/kmr_03/8C83A0"] - # - [0x8CA2D0, "bin"] + - [0x8CA2D0, ".data", "world/area_kmr/kmr_03/8C85E0"] - [0x8CA8F0, ".rodata", "world/area_kmr/kmr_03/8C8140"] - name: world/area_kmr/kmr_04/ type: code From 0f3d65f7c9d283ecf1bca0a7409ca6a26f0d287d Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Sat, 31 Oct 2020 15:34:10 -0400 Subject: [PATCH 76/78] cleanup --- src/world/area_sam/sam_11/D3A930.c | 6 +----- src/world/common/Set80151310.inc.c | 5 +---- src/world/common/Set80151310_0.inc.c | 6 ++++++ 3 files changed, 8 insertions(+), 9 deletions(-) create mode 100644 src/world/common/Set80151310_0.inc.c diff --git a/src/world/area_sam/sam_11/D3A930.c b/src/world/area_sam/sam_11/D3A930.c index a37071aeaf..cd04c7a33d 100644 --- a/src/world/area_sam/sam_11/D3A930.c +++ b/src/world/area_sam/sam_11/D3A930.c @@ -4,16 +4,12 @@ INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_80240360_D3A930); INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_8024052C_D3AAFC); -// Almost the same as Set80151310, but we're setting it to 2 in the first func instead of 1 static ApiStatus Set80151310_2(ScriptInstance* script, s32 isInitialCall) { D_80151310 = 2; return ApiStatus_DONE2; } -static ApiStatus Set80151310_0(ScriptInstance* script, s32 isInitialCall) { - D_80151310 = 0; - return ApiStatus_DONE2; -} +#include "world/common/Set80151310_0.inc.c" #include "world/common/UnsetCamera0MoveFlag1.inc.c" diff --git a/src/world/common/Set80151310.inc.c b/src/world/common/Set80151310.inc.c index 2223ab43f6..0f8f7d53a3 100644 --- a/src/world/common/Set80151310.inc.c +++ b/src/world/common/Set80151310.inc.c @@ -5,7 +5,4 @@ static ApiStatus Set80151310_1(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -static ApiStatus Set80151310_0(ScriptInstance* script, s32 isInitialCall) { - D_80151310 = 0; - return ApiStatus_DONE2; -} +#include "world/common/Set80151310_0.inc.c" diff --git a/src/world/common/Set80151310_0.inc.c b/src/world/common/Set80151310_0.inc.c new file mode 100644 index 0000000000..953e1f4232 --- /dev/null +++ b/src/world/common/Set80151310_0.inc.c @@ -0,0 +1,6 @@ +#include "common.h" + +static ApiStatus Set80151310_0(ScriptInstance* script, s32 isInitialCall) { + D_80151310 = 0; + return ApiStatus_DONE2; +} From 9151bf2fe420a0d1a1b1f894c25a8d7070986c46 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Sat, 31 Oct 2020 15:35:43 -0400 Subject: [PATCH 77/78] NotDoesScriptExist -> AwaitScriptComplete --- src/world/area_dro/dro_02/9694C0.c | 2 +- src/world/area_hos/hos_03/A1BDB0.c | 2 +- src/world/area_jan/jan_03/B34BD0.c | 2 +- src/world/area_kkj/kkj_20/AFDE00.c | 2 +- src/world/area_kmr/kmr_02/8B30E0.c | 2 +- src/world/area_kmr/kmr_20/8ED0C0.c | 2 +- src/world/area_kpa/kpa_91/A86A50.c | 2 +- src/world/area_kpa/kpa_95/A8CB60.c | 2 +- src/world/area_mac/mac_01/8017D0.c | 2 +- src/world/area_nok/nok_01/9C53E0.c | 2 +- src/world/area_sam/sam_02/D05F60.c | 2 +- src/world/area_sam/sam_06/D203E0.c | 2 +- .../{NotDoesScriptExist.inc.c => AwaitScriptComplete.inc.c} | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) rename src/world/common/{NotDoesScriptExist.inc.c => AwaitScriptComplete.inc.c} (58%) diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index cb9c9474cb..3dbe234741 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -92,7 +92,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_802434CC_96C68C); INCLUDE_ASM(s32, "world/area_dro/dro_02/9694C0", func_80243548_96C708); -#include "world/common/NotDoesScriptExist.inc.c" +#include "world/common/AwaitScriptComplete.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index 5480bb6c0b..3149046f86 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -30,7 +30,7 @@ INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802421F0_A1D2F0); INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_8024226C_A1D36C); -#include "world/common/NotDoesScriptExist.inc.c" +#include "world/common/AwaitScriptComplete.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index 2a9c7477b3..716aa12127 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -50,7 +50,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_802414F8_B360C8); INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241574_B36144); -#include "world/common/NotDoesScriptExist.inc.c" +#include "world/common/AwaitScriptComplete.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_kkj/kkj_20/AFDE00.c b/src/world/area_kkj/kkj_20/AFDE00.c index 5ec4549dae..04b34342c3 100644 --- a/src/world/area_kkj/kkj_20/AFDE00.c +++ b/src/world/area_kkj/kkj_20/AFDE00.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_80240308_AFDE48); INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDE00", func_80240384_AFDEC4); -#include "world/common/NotDoesScriptExist.inc.c" +#include "world/common/AwaitScriptComplete.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_kmr/kmr_02/8B30E0.c b/src/world/area_kmr/kmr_02/8B30E0.c index 894052300a..7c2ab8a71e 100644 --- a/src/world/area_kmr/kmr_02/8B30E0.c +++ b/src/world/area_kmr/kmr_02/8B30E0.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_802430B8_8B3128); INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B30E0", func_80243134_8B31A4); -#include "world/common/NotDoesScriptExist.inc.c" +#include "world/common/AwaitScriptComplete.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_kmr/kmr_20/8ED0C0.c b/src/world/area_kmr/kmr_20/8ED0C0.c index a273cad41b..69399becad 100644 --- a/src/world/area_kmr/kmr_20/8ED0C0.c +++ b/src/world/area_kmr/kmr_20/8ED0C0.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_802412E8_8ED108); INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED0C0", func_80241364_8ED184); -#include "world/common/NotDoesScriptExist.inc.c" +#include "world/common/AwaitScriptComplete.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_kpa/kpa_91/A86A50.c b/src/world/area_kpa/kpa_91/A86A50.c index f7bdac79c3..65cb2e7b8f 100644 --- a/src/world/area_kpa/kpa_91/A86A50.c +++ b/src/world/area_kpa/kpa_91/A86A50.c @@ -42,7 +42,7 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_80241570_A87FC0); INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_802415EC_A8803C); -#include "world/common/NotDoesScriptExist.inc.c" +#include "world/common/AwaitScriptComplete.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_kpa/kpa_95/A8CB60.c b/src/world/area_kpa/kpa_95/A8CB60.c index 44daaa48f2..7e68509226 100644 --- a/src/world/area_kpa/kpa_95/A8CB60.c +++ b/src/world/area_kpa/kpa_95/A8CB60.c @@ -42,7 +42,7 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_80241650_A8E0D0); INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_802416CC_A8E14C); -#include "world/common/NotDoesScriptExist.inc.c" +#include "world/common/AwaitScriptComplete.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index 464f97b3ee..c3ad2a45a0 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -98,7 +98,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", pause_tutorial_draw_contents_80 INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243870_8040F0); -#include "world/common/NotDoesScriptExist.inc.c" +#include "world/common/AwaitScriptComplete.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index 36a46e2554..8747b47e2d 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -28,7 +28,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240AB4_9C5E94); INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240B30_9C5F10); -#include "world/common/NotDoesScriptExist.inc.c" +#include "world/common/AwaitScriptComplete.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index 0521858a9d..630152cf2d 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -8,7 +8,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240878_D05FA8); INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_802408F4_D06024); -#include "world/common/NotDoesScriptExist.inc.c" +#include "world/common/AwaitScriptComplete.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/area_sam/sam_06/D203E0.c b/src/world/area_sam/sam_06/D203E0.c index 699d01bcfe..6f1be57830 100644 --- a/src/world/area_sam/sam_06/D203E0.c +++ b/src/world/area_sam/sam_06/D203E0.c @@ -46,7 +46,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80241F98_D21E28); INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80242014_D21EA4); -#include "world/common/NotDoesScriptExist.inc.c" +#include "world/common/AwaitScriptComplete.inc.c" #include "world/common/PartnerToggleAbilityScript.inc.c" diff --git a/src/world/common/NotDoesScriptExist.inc.c b/src/world/common/AwaitScriptComplete.inc.c similarity index 58% rename from src/world/common/NotDoesScriptExist.inc.c rename to src/world/common/AwaitScriptComplete.inc.c index cdd6ce8750..7716e501f0 100644 --- a/src/world/common/NotDoesScriptExist.inc.c +++ b/src/world/common/AwaitScriptComplete.inc.c @@ -1,5 +1,5 @@ #include "common.h" -static ApiStatus NotDoesScriptExist(ScriptInstance* script, s32 isInitialCall) { +static ApiStatus AwaitScriptComplete(ScriptInstance* script, s32 isInitialCall) { return (!does_script_exist(get_variable(script, *script->ptrReadPos))) * ApiStatus_DONE2; } From 82a5b59d274c835153b836d47885e8a29376a609 Mon Sep 17 00:00:00 2001 From: Alex Bates <16batesa@gmail.com> Date: Sat, 31 Oct 2020 19:57:37 +0000 Subject: [PATCH 78/78] bump splat --- tools/n64splat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/n64splat b/tools/n64splat index c8b324cdc0..e7a811adf8 160000 --- a/tools/n64splat +++ b/tools/n64splat @@ -1 +1 @@ -Subproject commit c8b324cdc0072724ed78b90d2008f36c238b1a76 +Subproject commit e7a811adf8e9cc5505c0992d0e73e9589c6ccd2e