From aeecb59fc2d35da784a0a1725a4f9919de4753e7 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Sat, 6 Feb 2021 03:47:47 +0900 Subject: [PATCH] decomp --- .../item/coconut/func_802A1000_72F720.s | 125 ------------- .../item/coconut/func_802A11D4_72F8F4.s | 32 ---- .../code_72F720/func_802A1000_72F720.s | 125 ------------- asm/nonmatchings/code_F5750/func_802D2148.s | 13 -- asm/nonmatchings/code_F5750/func_802D244C.s | 20 --- asm/nonmatchings/code_F5750/func_802D2484.s | 10 -- asm/nonmatchings/code_F5750/func_802D2508.s | 10 -- asm/nonmatchings/code_F5750/func_802D286C.s | 10 -- asm/nonmatchings/code_F5750/func_802D2B50.s | 11 -- asm/nonmatchings/code_F5750/func_802D2B6C.s | 11 -- asm/nonmatchings/code_F5750/func_802D2C14.s | 15 -- asm/nonmatchings/code_F5750/func_802D2C40.s | 42 ----- asm/nonmatchings/code_F5750/func_802D3474.s | 61 ------- asm/nonmatchings/code_F5750/func_802D354C.s | 61 ------- asm/nonmatchings/code_F5750/func_802D4164.s | 10 -- asm/nonmatchings/code_F5750/func_802D43AC.s | 13 -- asm/nonmatchings/code_F5750/func_802D43D0.s | 13 -- include/enums.h | 26 ++- src/code_7bb60_len_41b0.c | 7 +- src/code_F5750.c | 168 ++++++++++++++++-- 20 files changed, 170 insertions(+), 613 deletions(-) delete mode 100644 asm/nonmatchings/battle/item/coconut/func_802A1000_72F720.s delete mode 100644 asm/nonmatchings/battle/item/coconut/func_802A11D4_72F8F4.s delete mode 100644 asm/nonmatchings/code_72F720/func_802A1000_72F720.s delete mode 100644 asm/nonmatchings/code_F5750/func_802D2148.s delete mode 100644 asm/nonmatchings/code_F5750/func_802D244C.s delete mode 100644 asm/nonmatchings/code_F5750/func_802D2484.s delete mode 100644 asm/nonmatchings/code_F5750/func_802D2508.s delete mode 100644 asm/nonmatchings/code_F5750/func_802D286C.s delete mode 100644 asm/nonmatchings/code_F5750/func_802D2B50.s delete mode 100644 asm/nonmatchings/code_F5750/func_802D2B6C.s delete mode 100644 asm/nonmatchings/code_F5750/func_802D2C14.s delete mode 100644 asm/nonmatchings/code_F5750/func_802D2C40.s delete mode 100644 asm/nonmatchings/code_F5750/func_802D3474.s delete mode 100644 asm/nonmatchings/code_F5750/func_802D354C.s delete mode 100644 asm/nonmatchings/code_F5750/func_802D4164.s delete mode 100644 asm/nonmatchings/code_F5750/func_802D43AC.s delete mode 100644 asm/nonmatchings/code_F5750/func_802D43D0.s diff --git a/asm/nonmatchings/battle/item/coconut/func_802A1000_72F720.s b/asm/nonmatchings/battle/item/coconut/func_802A1000_72F720.s deleted file mode 100644 index 252cd6b601..0000000000 --- a/asm/nonmatchings/battle/item/coconut/func_802A1000_72F720.s +++ /dev/null @@ -1,125 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802A1000_72F720 -/* 72F720 802A1000 27BDFF98 */ addiu $sp, $sp, -0x68 -/* 72F724 802A1004 AFB50044 */ sw $s5, 0x44($sp) -/* 72F728 802A1008 0080A82D */ daddu $s5, $a0, $zero -/* 72F72C 802A100C AFB10034 */ sw $s1, 0x34($sp) -/* 72F730 802A1010 0000882D */ daddu $s1, $zero, $zero -/* 72F734 802A1014 2405001D */ addiu $a1, $zero, 0x1d -/* 72F738 802A1018 F7B40050 */ sdc1 $f20, 0x50($sp) -/* 72F73C 802A101C 4480A000 */ mtc1 $zero, $f20 -/* 72F740 802A1020 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 72F744 802A1024 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) -/* 72F748 802A1028 AFBF0048 */ sw $ra, 0x48($sp) -/* 72F74C 802A102C AFB40040 */ sw $s4, 0x40($sp) -/* 72F750 802A1030 AFB3003C */ sw $s3, 0x3c($sp) -/* 72F754 802A1034 AFB20038 */ sw $s2, 0x38($sp) -/* 72F758 802A1038 AFB00030 */ sw $s0, 0x30($sp) -/* 72F75C 802A103C F7B80060 */ sdc1 $f24, 0x60($sp) -/* 72F760 802A1040 F7B60058 */ sdc1 $f22, 0x58($sp) -/* 72F764 802A1044 8C5300D8 */ lw $s3, 0xd8($v0) -/* 72F768 802A1048 8442017A */ lh $v0, 0x17a($v0) -/* 72F76C 802A104C 0260202D */ daddu $a0, $s3, $zero -/* 72F770 802A1050 00021140 */ sll $v0, $v0, 5 -/* 72F774 802A1054 3C128008 */ lui $s2, %hi(gItemTable+0xC) -/* 72F778 802A1058 02429021 */ addu $s2, $s2, $v0 -/* 72F77C 802A105C 865278EC */ lh $s2, %lo(gItemTable+0xC)($s2) -/* 72F780 802A1060 92620191 */ lbu $v0, 0x191($s3) -/* 72F784 802A1064 C6620148 */ lwc1 $f2, 0x148($s3) -/* 72F788 802A1068 44820000 */ mtc1 $v0, $f0 -/* 72F78C 802A106C 00000000 */ nop -/* 72F790 802A1070 46800020 */ cvt.s.w $f0, $f0 -/* 72F794 802A1074 0C099CAB */ jal heroes_is_ability_active -/* 72F798 802A1078 46001580 */ add.s $f22, $f2, $f0 -/* 72F79C 802A107C 50400048 */ beql $v0, $zero, .L802A11A0 -/* 72F7A0 802A1080 AEB10084 */ sw $s1, 0x84($s5) -/* 72F7A4 802A1084 1A400045 */ blez $s2, .L802A119C -/* 72F7A8 802A1088 3C0451EB */ lui $a0, 0x51eb -/* 72F7AC 802A108C 3484851F */ ori $a0, $a0, 0x851f -/* 72F7B0 802A1090 00121880 */ sll $v1, $s2, 2 -/* 72F7B4 802A1094 00721821 */ addu $v1, $v1, $s2 -/* 72F7B8 802A1098 00031100 */ sll $v0, $v1, 4 -/* 72F7BC 802A109C 00431023 */ subu $v0, $v0, $v1 -/* 72F7C0 802A10A0 24420063 */ addiu $v0, $v0, 0x63 -/* 72F7C4 802A10A4 00440018 */ mult $v0, $a0 -/* 72F7C8 802A10A8 000217C3 */ sra $v0, $v0, 0x1f -/* 72F7CC 802A10AC 00004010 */ mfhi $t0 -/* 72F7D0 802A10B0 00081943 */ sra $v1, $t0, 5 -/* 72F7D4 802A10B4 00629023 */ subu $s2, $v1, $v0 -/* 72F7D8 802A10B8 0232102A */ slt $v0, $s1, $s2 -/* 72F7DC 802A10BC 10400019 */ beqz $v0, .L802A1124 -/* 72F7E0 802A10C0 0220802D */ daddu $s0, $s1, $zero -/* 72F7E4 802A10C4 24140017 */ addiu $s4, $zero, 0x17 -/* 72F7E8 802A10C8 3C0141F0 */ lui $at, 0x41f0 -/* 72F7EC 802A10CC 4481C000 */ mtc1 $at, $f24 -/* 72F7F0 802A10D0 24110001 */ addiu $s1, $zero, 1 -.L802A10D4: -/* 72F7F4 802A10D4 C6600144 */ lwc1 $f0, 0x144($s3) -/* 72F7F8 802A10D8 C662014C */ lwc1 $f2, 0x14c($s3) -/* 72F7FC 802A10DC 4600A10D */ trunc.w.s $f4, $f20 -/* 72F800 802A10E0 E7A40018 */ swc1 $f4, 0x18($sp) -/* 72F804 802A10E4 24040157 */ addiu $a0, $zero, 0x157 -/* 72F808 802A10E8 AFB10014 */ sw $s1, 0x14($sp) -/* 72F80C 802A10EC 26310003 */ addiu $s1, $s1, 3 -/* 72F810 802A10F0 26100001 */ addiu $s0, $s0, 1 -/* 72F814 802A10F4 4406B000 */ mfc1 $a2, $f22 -/* 72F818 802A10F8 44050000 */ mfc1 $a1, $f0 -/* 72F81C 802A10FC 44071000 */ mfc1 $a3, $f2 -/* 72F820 802A1100 4618A500 */ add.s $f20, $f20, $f24 -/* 72F824 802A1104 AFB40010 */ sw $s4, 0x10($sp) -/* 72F828 802A1108 0C04C4FD */ jal make_item_entity -/* 72F82C 802A110C AFA0001C */ sw $zero, 0x1c($sp) -/* 72F830 802A1110 0C03A830 */ jal add_coins -/* 72F834 802A1114 24040001 */ addiu $a0, $zero, 1 -/* 72F838 802A1118 0212102A */ slt $v0, $s0, $s2 -/* 72F83C 802A111C 1440FFED */ bnez $v0, .L802A10D4 -/* 72F840 802A1120 00000000 */ nop -.L802A1124: -/* 72F844 802A1124 00101040 */ sll $v0, $s0, 1 -/* 72F848 802A1128 00501021 */ addu $v0, $v0, $s0 -/* 72F84C 802A112C 2451001E */ addiu $s1, $v0, 0x1e -/* 72F850 802A1130 C6600144 */ lwc1 $f0, 0x144($s3) -/* 72F854 802A1134 C6760148 */ lwc1 $f22, 0x148($s3) -/* 72F858 802A1138 C662014C */ lwc1 $f2, 0x14c($s3) -/* 72F85C 802A113C 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* 72F860 802A1140 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* 72F864 802A1144 27A20020 */ addiu $v0, $sp, 0x20 -/* 72F868 802A1148 AFA20010 */ sw $v0, 0x10($sp) -/* 72F86C 802A114C 27A20024 */ addiu $v0, $sp, 0x24 -/* 72F870 802A1150 AFA20014 */ sw $v0, 0x14($sp) -/* 72F874 802A1154 44050000 */ mfc1 $a1, $f0 -/* 72F878 802A1158 4406B000 */ mfc1 $a2, $f22 -/* 72F87C 802A115C 44071000 */ mfc1 $a3, $f2 -/* 72F880 802A1160 27A20028 */ addiu $v0, $sp, 0x28 -/* 72F884 802A1164 0C00B94E */ jal get_screen_coords -/* 72F888 802A1168 AFA20018 */ sw $v0, 0x18($sp) -/* 72F88C 802A116C 3C048011 */ lui $a0, %hi(D_80108A64) -/* 72F890 802A1170 24848A64 */ addiu $a0, $a0, %lo(D_80108A64) -/* 72F894 802A1174 0C050529 */ jal create_icon -/* 72F898 802A1178 00000000 */ nop -/* 72F89C 802A117C 8FA50020 */ lw $a1, 0x20($sp) -/* 72F8A0 802A1180 8FA60024 */ lw $a2, 0x24($sp) -/* 72F8A4 802A1184 0040202D */ daddu $a0, $v0, $zero -/* 72F8A8 802A1188 3C01802A */ lui $at, %hi(D_802A1E80) -/* 72F8AC 802A118C AC241E80 */ sw $a0, %lo(D_802A1E80)($at) -/* 72F8B0 802A1190 24A50024 */ addiu $a1, $a1, 0x24 -/* 72F8B4 802A1194 0C051261 */ jal set_icon_render_pos -/* 72F8B8 802A1198 24C6FFC1 */ addiu $a2, $a2, -0x3f -.L802A119C: -/* 72F8BC 802A119C AEB10084 */ sw $s1, 0x84($s5) -.L802A11A0: -/* 72F8C0 802A11A0 8FBF0048 */ lw $ra, 0x48($sp) -/* 72F8C4 802A11A4 8FB50044 */ lw $s5, 0x44($sp) -/* 72F8C8 802A11A8 8FB40040 */ lw $s4, 0x40($sp) -/* 72F8CC 802A11AC 8FB3003C */ lw $s3, 0x3c($sp) -/* 72F8D0 802A11B0 8FB20038 */ lw $s2, 0x38($sp) -/* 72F8D4 802A11B4 8FB10034 */ lw $s1, 0x34($sp) -/* 72F8D8 802A11B8 8FB00030 */ lw $s0, 0x30($sp) -/* 72F8DC 802A11BC D7B80060 */ ldc1 $f24, 0x60($sp) -/* 72F8E0 802A11C0 D7B60058 */ ldc1 $f22, 0x58($sp) -/* 72F8E4 802A11C4 D7B40050 */ ldc1 $f20, 0x50($sp) -/* 72F8E8 802A11C8 24020002 */ addiu $v0, $zero, 2 -/* 72F8EC 802A11CC 03E00008 */ jr $ra -/* 72F8F0 802A11D0 27BD0068 */ addiu $sp, $sp, 0x68 diff --git a/asm/nonmatchings/battle/item/coconut/func_802A11D4_72F8F4.s b/asm/nonmatchings/battle/item/coconut/func_802A11D4_72F8F4.s deleted file mode 100644 index 33057d5021..0000000000 --- a/asm/nonmatchings/battle/item/coconut/func_802A11D4_72F8F4.s +++ /dev/null @@ -1,32 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802A11D4_72F8F4 -/* 72F8F4 802A11D4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 72F8F8 802A11D8 3C03800E */ lui $v1, %hi(gBattleStatus) -/* 72F8FC 802A11DC 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) -/* 72F900 802A11E0 AFBF0014 */ sw $ra, 0x14($sp) -/* 72F904 802A11E4 AFB00010 */ sw $s0, 0x10($sp) -/* 72F908 802A11E8 8462017A */ lh $v0, 0x17a($v1) -/* 72F90C 802A11EC 8C6400D8 */ lw $a0, 0xd8($v1) -/* 72F910 802A11F0 00021140 */ sll $v0, $v0, 5 -/* 72F914 802A11F4 3C108008 */ lui $s0, %hi(gItemTable+0xC) -/* 72F918 802A11F8 02028021 */ addu $s0, $s0, $v0 -/* 72F91C 802A11FC 861078EC */ lh $s0, %lo(gItemTable+0xC)($s0) -/* 72F920 802A1200 0C099CAB */ jal heroes_is_ability_active -/* 72F924 802A1204 2405001D */ addiu $a1, $zero, 0x1d -/* 72F928 802A1208 10400007 */ beqz $v0, .L802A1228 -/* 72F92C 802A120C 00000000 */ nop -/* 72F930 802A1210 1A000005 */ blez $s0, .L802A1228 -/* 72F934 802A1214 00000000 */ nop -/* 72F938 802A1218 3C04802A */ lui $a0, %hi(D_802A1E80) -/* 72F93C 802A121C 8C841E80 */ lw $a0, %lo(D_802A1E80)($a0) -/* 72F940 802A1220 0C05123D */ jal free_icon -/* 72F944 802A1224 00000000 */ nop -.L802A1228: -/* 72F948 802A1228 8FBF0014 */ lw $ra, 0x14($sp) -/* 72F94C 802A122C 8FB00010 */ lw $s0, 0x10($sp) -/* 72F950 802A1230 24020002 */ addiu $v0, $zero, 2 -/* 72F954 802A1234 03E00008 */ jr $ra -/* 72F958 802A1238 27BD0018 */ addiu $sp, $sp, 0x18 -/* 72F95C 802A123C 00000000 */ nop diff --git a/asm/nonmatchings/code_72F720/func_802A1000_72F720.s b/asm/nonmatchings/code_72F720/func_802A1000_72F720.s deleted file mode 100644 index 252cd6b601..0000000000 --- a/asm/nonmatchings/code_72F720/func_802A1000_72F720.s +++ /dev/null @@ -1,125 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802A1000_72F720 -/* 72F720 802A1000 27BDFF98 */ addiu $sp, $sp, -0x68 -/* 72F724 802A1004 AFB50044 */ sw $s5, 0x44($sp) -/* 72F728 802A1008 0080A82D */ daddu $s5, $a0, $zero -/* 72F72C 802A100C AFB10034 */ sw $s1, 0x34($sp) -/* 72F730 802A1010 0000882D */ daddu $s1, $zero, $zero -/* 72F734 802A1014 2405001D */ addiu $a1, $zero, 0x1d -/* 72F738 802A1018 F7B40050 */ sdc1 $f20, 0x50($sp) -/* 72F73C 802A101C 4480A000 */ mtc1 $zero, $f20 -/* 72F740 802A1020 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 72F744 802A1024 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) -/* 72F748 802A1028 AFBF0048 */ sw $ra, 0x48($sp) -/* 72F74C 802A102C AFB40040 */ sw $s4, 0x40($sp) -/* 72F750 802A1030 AFB3003C */ sw $s3, 0x3c($sp) -/* 72F754 802A1034 AFB20038 */ sw $s2, 0x38($sp) -/* 72F758 802A1038 AFB00030 */ sw $s0, 0x30($sp) -/* 72F75C 802A103C F7B80060 */ sdc1 $f24, 0x60($sp) -/* 72F760 802A1040 F7B60058 */ sdc1 $f22, 0x58($sp) -/* 72F764 802A1044 8C5300D8 */ lw $s3, 0xd8($v0) -/* 72F768 802A1048 8442017A */ lh $v0, 0x17a($v0) -/* 72F76C 802A104C 0260202D */ daddu $a0, $s3, $zero -/* 72F770 802A1050 00021140 */ sll $v0, $v0, 5 -/* 72F774 802A1054 3C128008 */ lui $s2, %hi(gItemTable+0xC) -/* 72F778 802A1058 02429021 */ addu $s2, $s2, $v0 -/* 72F77C 802A105C 865278EC */ lh $s2, %lo(gItemTable+0xC)($s2) -/* 72F780 802A1060 92620191 */ lbu $v0, 0x191($s3) -/* 72F784 802A1064 C6620148 */ lwc1 $f2, 0x148($s3) -/* 72F788 802A1068 44820000 */ mtc1 $v0, $f0 -/* 72F78C 802A106C 00000000 */ nop -/* 72F790 802A1070 46800020 */ cvt.s.w $f0, $f0 -/* 72F794 802A1074 0C099CAB */ jal heroes_is_ability_active -/* 72F798 802A1078 46001580 */ add.s $f22, $f2, $f0 -/* 72F79C 802A107C 50400048 */ beql $v0, $zero, .L802A11A0 -/* 72F7A0 802A1080 AEB10084 */ sw $s1, 0x84($s5) -/* 72F7A4 802A1084 1A400045 */ blez $s2, .L802A119C -/* 72F7A8 802A1088 3C0451EB */ lui $a0, 0x51eb -/* 72F7AC 802A108C 3484851F */ ori $a0, $a0, 0x851f -/* 72F7B0 802A1090 00121880 */ sll $v1, $s2, 2 -/* 72F7B4 802A1094 00721821 */ addu $v1, $v1, $s2 -/* 72F7B8 802A1098 00031100 */ sll $v0, $v1, 4 -/* 72F7BC 802A109C 00431023 */ subu $v0, $v0, $v1 -/* 72F7C0 802A10A0 24420063 */ addiu $v0, $v0, 0x63 -/* 72F7C4 802A10A4 00440018 */ mult $v0, $a0 -/* 72F7C8 802A10A8 000217C3 */ sra $v0, $v0, 0x1f -/* 72F7CC 802A10AC 00004010 */ mfhi $t0 -/* 72F7D0 802A10B0 00081943 */ sra $v1, $t0, 5 -/* 72F7D4 802A10B4 00629023 */ subu $s2, $v1, $v0 -/* 72F7D8 802A10B8 0232102A */ slt $v0, $s1, $s2 -/* 72F7DC 802A10BC 10400019 */ beqz $v0, .L802A1124 -/* 72F7E0 802A10C0 0220802D */ daddu $s0, $s1, $zero -/* 72F7E4 802A10C4 24140017 */ addiu $s4, $zero, 0x17 -/* 72F7E8 802A10C8 3C0141F0 */ lui $at, 0x41f0 -/* 72F7EC 802A10CC 4481C000 */ mtc1 $at, $f24 -/* 72F7F0 802A10D0 24110001 */ addiu $s1, $zero, 1 -.L802A10D4: -/* 72F7F4 802A10D4 C6600144 */ lwc1 $f0, 0x144($s3) -/* 72F7F8 802A10D8 C662014C */ lwc1 $f2, 0x14c($s3) -/* 72F7FC 802A10DC 4600A10D */ trunc.w.s $f4, $f20 -/* 72F800 802A10E0 E7A40018 */ swc1 $f4, 0x18($sp) -/* 72F804 802A10E4 24040157 */ addiu $a0, $zero, 0x157 -/* 72F808 802A10E8 AFB10014 */ sw $s1, 0x14($sp) -/* 72F80C 802A10EC 26310003 */ addiu $s1, $s1, 3 -/* 72F810 802A10F0 26100001 */ addiu $s0, $s0, 1 -/* 72F814 802A10F4 4406B000 */ mfc1 $a2, $f22 -/* 72F818 802A10F8 44050000 */ mfc1 $a1, $f0 -/* 72F81C 802A10FC 44071000 */ mfc1 $a3, $f2 -/* 72F820 802A1100 4618A500 */ add.s $f20, $f20, $f24 -/* 72F824 802A1104 AFB40010 */ sw $s4, 0x10($sp) -/* 72F828 802A1108 0C04C4FD */ jal make_item_entity -/* 72F82C 802A110C AFA0001C */ sw $zero, 0x1c($sp) -/* 72F830 802A1110 0C03A830 */ jal add_coins -/* 72F834 802A1114 24040001 */ addiu $a0, $zero, 1 -/* 72F838 802A1118 0212102A */ slt $v0, $s0, $s2 -/* 72F83C 802A111C 1440FFED */ bnez $v0, .L802A10D4 -/* 72F840 802A1120 00000000 */ nop -.L802A1124: -/* 72F844 802A1124 00101040 */ sll $v0, $s0, 1 -/* 72F848 802A1128 00501021 */ addu $v0, $v0, $s0 -/* 72F84C 802A112C 2451001E */ addiu $s1, $v0, 0x1e -/* 72F850 802A1130 C6600144 */ lwc1 $f0, 0x144($s3) -/* 72F854 802A1134 C6760148 */ lwc1 $f22, 0x148($s3) -/* 72F858 802A1138 C662014C */ lwc1 $f2, 0x14c($s3) -/* 72F85C 802A113C 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* 72F860 802A1140 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* 72F864 802A1144 27A20020 */ addiu $v0, $sp, 0x20 -/* 72F868 802A1148 AFA20010 */ sw $v0, 0x10($sp) -/* 72F86C 802A114C 27A20024 */ addiu $v0, $sp, 0x24 -/* 72F870 802A1150 AFA20014 */ sw $v0, 0x14($sp) -/* 72F874 802A1154 44050000 */ mfc1 $a1, $f0 -/* 72F878 802A1158 4406B000 */ mfc1 $a2, $f22 -/* 72F87C 802A115C 44071000 */ mfc1 $a3, $f2 -/* 72F880 802A1160 27A20028 */ addiu $v0, $sp, 0x28 -/* 72F884 802A1164 0C00B94E */ jal get_screen_coords -/* 72F888 802A1168 AFA20018 */ sw $v0, 0x18($sp) -/* 72F88C 802A116C 3C048011 */ lui $a0, %hi(D_80108A64) -/* 72F890 802A1170 24848A64 */ addiu $a0, $a0, %lo(D_80108A64) -/* 72F894 802A1174 0C050529 */ jal create_icon -/* 72F898 802A1178 00000000 */ nop -/* 72F89C 802A117C 8FA50020 */ lw $a1, 0x20($sp) -/* 72F8A0 802A1180 8FA60024 */ lw $a2, 0x24($sp) -/* 72F8A4 802A1184 0040202D */ daddu $a0, $v0, $zero -/* 72F8A8 802A1188 3C01802A */ lui $at, %hi(D_802A1E80) -/* 72F8AC 802A118C AC241E80 */ sw $a0, %lo(D_802A1E80)($at) -/* 72F8B0 802A1190 24A50024 */ addiu $a1, $a1, 0x24 -/* 72F8B4 802A1194 0C051261 */ jal set_icon_render_pos -/* 72F8B8 802A1198 24C6FFC1 */ addiu $a2, $a2, -0x3f -.L802A119C: -/* 72F8BC 802A119C AEB10084 */ sw $s1, 0x84($s5) -.L802A11A0: -/* 72F8C0 802A11A0 8FBF0048 */ lw $ra, 0x48($sp) -/* 72F8C4 802A11A4 8FB50044 */ lw $s5, 0x44($sp) -/* 72F8C8 802A11A8 8FB40040 */ lw $s4, 0x40($sp) -/* 72F8CC 802A11AC 8FB3003C */ lw $s3, 0x3c($sp) -/* 72F8D0 802A11B0 8FB20038 */ lw $s2, 0x38($sp) -/* 72F8D4 802A11B4 8FB10034 */ lw $s1, 0x34($sp) -/* 72F8D8 802A11B8 8FB00030 */ lw $s0, 0x30($sp) -/* 72F8DC 802A11BC D7B80060 */ ldc1 $f24, 0x60($sp) -/* 72F8E0 802A11C0 D7B60058 */ ldc1 $f22, 0x58($sp) -/* 72F8E4 802A11C4 D7B40050 */ ldc1 $f20, 0x50($sp) -/* 72F8E8 802A11C8 24020002 */ addiu $v0, $zero, 2 -/* 72F8EC 802A11CC 03E00008 */ jr $ra -/* 72F8F0 802A11D0 27BD0068 */ addiu $sp, $sp, 0x68 diff --git a/asm/nonmatchings/code_F5750/func_802D2148.s b/asm/nonmatchings/code_F5750/func_802D2148.s deleted file mode 100644 index 742f7de48c..0000000000 --- a/asm/nonmatchings/code_F5750/func_802D2148.s +++ /dev/null @@ -1,13 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D2148 -/* F6AF8 802D2148 3C04FBFF */ lui $a0, 0xfbff -/* F6AFC 802D214C 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* F6B00 802D2150 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* F6B04 802D2154 8C620000 */ lw $v0, ($v1) -/* F6B08 802D2158 3484FFFF */ ori $a0, $a0, 0xffff -/* F6B0C 802D215C 00441024 */ and $v0, $v0, $a0 -/* F6B10 802D2160 AC620000 */ sw $v0, ($v1) -/* F6B14 802D2164 03E00008 */ jr $ra -/* F6B18 802D2168 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/code_F5750/func_802D244C.s b/asm/nonmatchings/code_F5750/func_802D244C.s deleted file mode 100644 index a531fd3c5f..0000000000 --- a/asm/nonmatchings/code_F5750/func_802D244C.s +++ /dev/null @@ -1,20 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D244C -/* F6DFC 802D244C 3C028016 */ lui $v0, %hi(gCollisionStatus+0x2) -/* F6E00 802D2450 8442A552 */ lh $v0, %lo(gCollisionStatus+0x2)($v0) -/* F6E04 802D2454 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* F6E08 802D2458 04400006 */ bltz $v0, .L802D2474 -/* F6E0C 802D245C AFBF0010 */ sw $ra, 0x10($sp) -/* F6E10 802D2460 0C0B48FE */ jal func_802D23F8 -/* F6E14 802D2464 00000000 */ nop -/* F6E18 802D2468 0040182D */ daddu $v1, $v0, $zero -/* F6E1C 802D246C 14600002 */ bnez $v1, .L802D2478 -/* F6E20 802D2470 24020002 */ addiu $v0, $zero, 2 -.L802D2474: -/* F6E24 802D2474 0000102D */ daddu $v0, $zero, $zero -.L802D2478: -/* F6E28 802D2478 8FBF0010 */ lw $ra, 0x10($sp) -/* F6E2C 802D247C 03E00008 */ jr $ra -/* F6E30 802D2480 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_F5750/func_802D2484.s b/asm/nonmatchings/code_F5750/func_802D2484.s deleted file mode 100644 index bfc33e073d..0000000000 --- a/asm/nonmatchings/code_F5750/func_802D2484.s +++ /dev/null @@ -1,10 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D2484 -/* F6E34 802D2484 3C028016 */ lui $v0, %hi(gCollisionStatus+0x2) -/* F6E38 802D2488 8442A552 */ lh $v0, %lo(gCollisionStatus+0x2)($v0) -/* F6E3C 802D248C 00021027 */ nor $v0, $zero, $v0 -/* F6E40 802D2490 000217C3 */ sra $v0, $v0, 0x1f -/* F6E44 802D2494 03E00008 */ jr $ra -/* F6E48 802D2498 30420002 */ andi $v0, $v0, 2 diff --git a/asm/nonmatchings/code_F5750/func_802D2508.s b/asm/nonmatchings/code_F5750/func_802D2508.s deleted file mode 100644 index a81a9975dd..0000000000 --- a/asm/nonmatchings/code_F5750/func_802D2508.s +++ /dev/null @@ -1,10 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D2508 -/* F6EB8 802D2508 3C028011 */ lui $v0, %hi(gPlayerStatus) -/* F6EBC 802D250C 8C42EFC8 */ lw $v0, %lo(gPlayerStatus)($v0) -/* F6EC0 802D2510 30422000 */ andi $v0, $v0, 0x2000 -/* F6EC4 802D2514 2C420001 */ sltiu $v0, $v0, 1 -/* F6EC8 802D2518 03E00008 */ jr $ra -/* F6ECC 802D251C 00021040 */ sll $v0, $v0, 1 diff --git a/asm/nonmatchings/code_F5750/func_802D286C.s b/asm/nonmatchings/code_F5750/func_802D286C.s deleted file mode 100644 index c85bd986c0..0000000000 --- a/asm/nonmatchings/code_F5750/func_802D286C.s +++ /dev/null @@ -1,10 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D286C -/* F721C 802D286C 8C82000C */ lw $v0, 0xc($a0) -/* F7220 802D2870 8C420000 */ lw $v0, ($v0) -/* F7224 802D2874 3C01802E */ lui $at, %hi(D_802DB5B0) -/* F7228 802D2878 A422B5B0 */ sh $v0, %lo(D_802DB5B0)($at) -/* F722C 802D287C 03E00008 */ jr $ra -/* F7230 802D2880 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/code_F5750/func_802D2B50.s b/asm/nonmatchings/code_F5750/func_802D2B50.s deleted file mode 100644 index de367158f5..0000000000 --- a/asm/nonmatchings/code_F5750/func_802D2B50.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D2B50 -/* F7500 802D2B50 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* F7504 802D2B54 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* F7508 802D2B58 8C620004 */ lw $v0, 4($v1) -/* F750C 802D2B5C 34420008 */ ori $v0, $v0, 8 -/* F7510 802D2B60 AC620004 */ sw $v0, 4($v1) -/* F7514 802D2B64 03E00008 */ jr $ra -/* F7518 802D2B68 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/code_F5750/func_802D2B6C.s b/asm/nonmatchings/code_F5750/func_802D2B6C.s deleted file mode 100644 index d7c221cabe..0000000000 --- a/asm/nonmatchings/code_F5750/func_802D2B6C.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D2B6C -/* F751C 802D2B6C 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* F7520 802D2B70 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* F7524 802D2B74 8C620004 */ lw $v0, 4($v1) -/* F7528 802D2B78 34420004 */ ori $v0, $v0, 4 -/* F752C 802D2B7C AC620004 */ sw $v0, 4($v1) -/* F7530 802D2B80 03E00008 */ jr $ra -/* F7534 802D2B84 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/code_F5750/func_802D2C14.s b/asm/nonmatchings/code_F5750/func_802D2C14.s deleted file mode 100644 index 16bf05bf96..0000000000 --- a/asm/nonmatchings/code_F5750/func_802D2C14.s +++ /dev/null @@ -1,15 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D2C14 -/* F75C4 802D2C14 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* F75C8 802D2C18 AFBF0010 */ sw $ra, 0x10($sp) -/* F75CC 802D2C1C 8C82000C */ lw $v0, 0xc($a0) -/* F75D0 802D2C20 0C0B1EAF */ jal get_variable -/* F75D4 802D2C24 8C450000 */ lw $a1, ($v0) -/* F75D8 802D2C28 0C03BCF5 */ jal func_800EF3D4 -/* F75DC 802D2C2C 0040202D */ daddu $a0, $v0, $zero -/* F75E0 802D2C30 8FBF0010 */ lw $ra, 0x10($sp) -/* F75E4 802D2C34 24020002 */ addiu $v0, $zero, 2 -/* F75E8 802D2C38 03E00008 */ jr $ra -/* F75EC 802D2C3C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_F5750/func_802D2C40.s b/asm/nonmatchings/code_F5750/func_802D2C40.s deleted file mode 100644 index 082ffe4b96..0000000000 --- a/asm/nonmatchings/code_F5750/func_802D2C40.s +++ /dev/null @@ -1,42 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D2C40 -/* F75F0 802D2C40 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* F75F4 802D2C44 AFB20018 */ sw $s2, 0x18($sp) -/* F75F8 802D2C48 0080902D */ daddu $s2, $a0, $zero -/* F75FC 802D2C4C AFBF001C */ sw $ra, 0x1c($sp) -/* F7600 802D2C50 AFB10014 */ sw $s1, 0x14($sp) -/* F7604 802D2C54 AFB00010 */ sw $s0, 0x10($sp) -/* F7608 802D2C58 8E50000C */ lw $s0, 0xc($s2) -/* F760C 802D2C5C 8E050000 */ lw $a1, ($s0) -/* F7610 802D2C60 0C0B1EAF */ jal get_variable -/* F7614 802D2C64 26100004 */ addiu $s0, $s0, 4 -/* F7618 802D2C68 44820000 */ mtc1 $v0, $f0 -/* F761C 802D2C6C 00000000 */ nop -/* F7620 802D2C70 46800020 */ cvt.s.w $f0, $f0 -/* F7624 802D2C74 3C118011 */ lui $s1, %hi(gPlayerStatus) -/* F7628 802D2C78 2631EFC8 */ addiu $s1, $s1, %lo(gPlayerStatus) -/* F762C 802D2C7C E620001C */ swc1 $f0, 0x1c($s1) -/* F7630 802D2C80 8E050000 */ lw $a1, ($s0) -/* F7634 802D2C84 26100004 */ addiu $s0, $s0, 4 -/* F7638 802D2C88 0C0B1EAF */ jal get_variable -/* F763C 802D2C8C 0240202D */ daddu $a0, $s2, $zero -/* F7640 802D2C90 44820000 */ mtc1 $v0, $f0 -/* F7644 802D2C94 00000000 */ nop -/* F7648 802D2C98 46800020 */ cvt.s.w $f0, $f0 -/* F764C 802D2C9C E6200020 */ swc1 $f0, 0x20($s1) -/* F7650 802D2CA0 8E050000 */ lw $a1, ($s0) -/* F7654 802D2CA4 0C0B1EAF */ jal get_variable -/* F7658 802D2CA8 0240202D */ daddu $a0, $s2, $zero -/* F765C 802D2CAC 44820000 */ mtc1 $v0, $f0 -/* F7660 802D2CB0 00000000 */ nop -/* F7664 802D2CB4 46800020 */ cvt.s.w $f0, $f0 -/* F7668 802D2CB8 E6200024 */ swc1 $f0, 0x24($s1) -/* F766C 802D2CBC 8FBF001C */ lw $ra, 0x1c($sp) -/* F7670 802D2CC0 8FB20018 */ lw $s2, 0x18($sp) -/* F7674 802D2CC4 8FB10014 */ lw $s1, 0x14($sp) -/* F7678 802D2CC8 8FB00010 */ lw $s0, 0x10($sp) -/* F767C 802D2CCC 24020002 */ addiu $v0, $zero, 2 -/* F7680 802D2CD0 03E00008 */ jr $ra -/* F7684 802D2CD4 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_F5750/func_802D3474.s b/asm/nonmatchings/code_F5750/func_802D3474.s deleted file mode 100644 index 1d9d63b898..0000000000 --- a/asm/nonmatchings/code_F5750/func_802D3474.s +++ /dev/null @@ -1,61 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D3474 -/* F7E24 802D3474 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* F7E28 802D3478 AFB20018 */ sw $s2, 0x18($sp) -/* F7E2C 802D347C 0080902D */ daddu $s2, $a0, $zero -/* F7E30 802D3480 AFBF0020 */ sw $ra, 0x20($sp) -/* F7E34 802D3484 AFB3001C */ sw $s3, 0x1c($sp) -/* F7E38 802D3488 AFB10014 */ sw $s1, 0x14($sp) -/* F7E3C 802D348C AFB00010 */ sw $s0, 0x10($sp) -/* F7E40 802D3490 8E42000C */ lw $v0, 0xc($s2) -/* F7E44 802D3494 8C450004 */ lw $a1, 4($v0) -/* F7E48 802D3498 8C530000 */ lw $s3, ($v0) -/* F7E4C 802D349C 0C0B1EAF */ jal get_variable -/* F7E50 802D34A0 0000882D */ daddu $s1, $zero, $zero -/* F7E54 802D34A4 0040202D */ daddu $a0, $v0, $zero -/* F7E58 802D34A8 3C03802E */ lui $v1, %hi(D_802DB7C0) -/* F7E5C 802D34AC 8C63B7C0 */ lw $v1, %lo(D_802DB7C0)($v1) -.L802D34B0: -/* F7E60 802D34B0 8C700000 */ lw $s0, ($v1) -/* F7E64 802D34B4 8E020000 */ lw $v0, ($s0) -/* F7E68 802D34B8 04400006 */ bltz $v0, .L802D34D4 -/* F7E6C 802D34BC 2A220040 */ slti $v0, $s1, 0x40 -/* F7E70 802D34C0 26310001 */ addiu $s1, $s1, 1 -/* F7E74 802D34C4 2A220040 */ slti $v0, $s1, 0x40 -/* F7E78 802D34C8 1440FFF9 */ bnez $v0, .L802D34B0 -/* F7E7C 802D34CC 24630004 */ addiu $v1, $v1, 4 -/* F7E80 802D34D0 2A220040 */ slti $v0, $s1, 0x40 -.L802D34D4: -/* F7E84 802D34D4 10400016 */ beqz $v0, .L802D3530 -/* F7E88 802D34D8 24020002 */ addiu $v0, $zero, 2 -/* F7E8C 802D34DC 0C048338 */ jal load_entity_model -/* F7E90 802D34E0 00000000 */ nop -/* F7E94 802D34E4 3C013F80 */ lui $at, 0x3f80 -/* F7E98 802D34E8 44810000 */ mtc1 $at, $f0 -/* F7E9C 802D34EC AE020000 */ sw $v0, ($s0) -/* F7EA0 802D34F0 0040202D */ daddu $a0, $v0, $zero -/* F7EA4 802D34F4 AE000004 */ sw $zero, 4($s0) -/* F7EA8 802D34F8 AE000008 */ sw $zero, 8($s0) -/* F7EAC 802D34FC AE00000C */ sw $zero, 0xc($s0) -/* F7EB0 802D3500 AE000010 */ sw $zero, 0x10($s0) -/* F7EB4 802D3504 AE000014 */ sw $zero, 0x14($s0) -/* F7EB8 802D3508 AE000018 */ sw $zero, 0x18($s0) -/* F7EBC 802D350C E600001C */ swc1 $f0, 0x1c($s0) -/* F7EC0 802D3510 E6000020 */ swc1 $f0, 0x20($s0) -/* F7EC4 802D3514 0C0483C1 */ jal update_entity_rendercmd -/* F7EC8 802D3518 E6000024 */ swc1 $f0, 0x24($s0) -/* F7ECC 802D351C 0240202D */ daddu $a0, $s2, $zero -/* F7ED0 802D3520 0260282D */ daddu $a1, $s3, $zero -/* F7ED4 802D3524 0C0B2026 */ jal set_variable -/* F7ED8 802D3528 0220302D */ daddu $a2, $s1, $zero -/* F7EDC 802D352C 24020002 */ addiu $v0, $zero, 2 -.L802D3530: -/* F7EE0 802D3530 8FBF0020 */ lw $ra, 0x20($sp) -/* F7EE4 802D3534 8FB3001C */ lw $s3, 0x1c($sp) -/* F7EE8 802D3538 8FB20018 */ lw $s2, 0x18($sp) -/* F7EEC 802D353C 8FB10014 */ lw $s1, 0x14($sp) -/* F7EF0 802D3540 8FB00010 */ lw $s0, 0x10($sp) -/* F7EF4 802D3544 03E00008 */ jr $ra -/* F7EF8 802D3548 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/code_F5750/func_802D354C.s b/asm/nonmatchings/code_F5750/func_802D354C.s deleted file mode 100644 index 44547ad528..0000000000 --- a/asm/nonmatchings/code_F5750/func_802D354C.s +++ /dev/null @@ -1,61 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D354C -/* F7EFC 802D354C 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* F7F00 802D3550 AFB20018 */ sw $s2, 0x18($sp) -/* F7F04 802D3554 0080902D */ daddu $s2, $a0, $zero -/* F7F08 802D3558 AFBF0020 */ sw $ra, 0x20($sp) -/* F7F0C 802D355C AFB3001C */ sw $s3, 0x1c($sp) -/* F7F10 802D3560 AFB10014 */ sw $s1, 0x14($sp) -/* F7F14 802D3564 AFB00010 */ sw $s0, 0x10($sp) -/* F7F18 802D3568 8E42000C */ lw $v0, 0xc($s2) -/* F7F1C 802D356C 8C450004 */ lw $a1, 4($v0) -/* F7F20 802D3570 8C530000 */ lw $s3, ($v0) -/* F7F24 802D3574 0C0B1EAF */ jal get_variable -/* F7F28 802D3578 0000882D */ daddu $s1, $zero, $zero -/* F7F2C 802D357C 0040202D */ daddu $a0, $v0, $zero -/* F7F30 802D3580 3C03802E */ lui $v1, %hi(D_802DB7C0) -/* F7F34 802D3584 8C63B7C0 */ lw $v1, %lo(D_802DB7C0)($v1) -.L802D3588: -/* F7F38 802D3588 8C700000 */ lw $s0, ($v1) -/* F7F3C 802D358C 8E020000 */ lw $v0, ($s0) -/* F7F40 802D3590 04400006 */ bltz $v0, .L802D35AC -/* F7F44 802D3594 2A220040 */ slti $v0, $s1, 0x40 -/* F7F48 802D3598 26310001 */ addiu $s1, $s1, 1 -/* F7F4C 802D359C 2A220040 */ slti $v0, $s1, 0x40 -/* F7F50 802D35A0 1440FFF9 */ bnez $v0, .L802D3588 -/* F7F54 802D35A4 24630004 */ addiu $v1, $v1, 4 -/* F7F58 802D35A8 2A220040 */ slti $v0, $s1, 0x40 -.L802D35AC: -/* F7F5C 802D35AC 10400016 */ beqz $v0, .L802D3608 -/* F7F60 802D35B0 24020002 */ addiu $v0, $zero, 2 -/* F7F64 802D35B4 0C048379 */ jal ALT_load_entity_model -/* F7F68 802D35B8 00000000 */ nop -/* F7F6C 802D35BC 3C013F80 */ lui $at, 0x3f80 -/* F7F70 802D35C0 44810000 */ mtc1 $at, $f0 -/* F7F74 802D35C4 AE020000 */ sw $v0, ($s0) -/* F7F78 802D35C8 0040202D */ daddu $a0, $v0, $zero -/* F7F7C 802D35CC AE000004 */ sw $zero, 4($s0) -/* F7F80 802D35D0 AE000008 */ sw $zero, 8($s0) -/* F7F84 802D35D4 AE00000C */ sw $zero, 0xc($s0) -/* F7F88 802D35D8 AE000010 */ sw $zero, 0x10($s0) -/* F7F8C 802D35DC AE000014 */ sw $zero, 0x14($s0) -/* F7F90 802D35E0 AE000018 */ sw $zero, 0x18($s0) -/* F7F94 802D35E4 E600001C */ swc1 $f0, 0x1c($s0) -/* F7F98 802D35E8 E6000020 */ swc1 $f0, 0x20($s0) -/* F7F9C 802D35EC 0C0483C1 */ jal update_entity_rendercmd -/* F7FA0 802D35F0 E6000024 */ swc1 $f0, 0x24($s0) -/* F7FA4 802D35F4 0240202D */ daddu $a0, $s2, $zero -/* F7FA8 802D35F8 0260282D */ daddu $a1, $s3, $zero -/* F7FAC 802D35FC 0C0B2026 */ jal set_variable -/* F7FB0 802D3600 0220302D */ daddu $a2, $s1, $zero -/* F7FB4 802D3604 24020002 */ addiu $v0, $zero, 2 -.L802D3608: -/* F7FB8 802D3608 8FBF0020 */ lw $ra, 0x20($sp) -/* F7FBC 802D360C 8FB3001C */ lw $s3, 0x1c($sp) -/* F7FC0 802D3610 8FB20018 */ lw $s2, 0x18($sp) -/* F7FC4 802D3614 8FB10014 */ lw $s1, 0x14($sp) -/* F7FC8 802D3618 8FB00010 */ lw $s0, 0x10($sp) -/* F7FCC 802D361C 03E00008 */ jr $ra -/* F7FD0 802D3620 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/code_F5750/func_802D4164.s b/asm/nonmatchings/code_F5750/func_802D4164.s deleted file mode 100644 index e2ad85f4a5..0000000000 --- a/asm/nonmatchings/code_F5750/func_802D4164.s +++ /dev/null @@ -1,10 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D4164 -/* F8B14 802D4164 3C02802E */ lui $v0, %hi(D_802DB7C0) -/* F8B18 802D4168 8C42B7C0 */ lw $v0, %lo(D_802DB7C0)($v0) -/* F8B1C 802D416C 00042080 */ sll $a0, $a0, 2 -/* F8B20 802D4170 00822021 */ addu $a0, $a0, $v0 -/* F8B24 802D4174 03E00008 */ jr $ra -/* F8B28 802D4178 8C820000 */ lw $v0, ($a0) diff --git a/asm/nonmatchings/code_F5750/func_802D43AC.s b/asm/nonmatchings/code_F5750/func_802D43AC.s deleted file mode 100644 index 31d85583c2..0000000000 --- a/asm/nonmatchings/code_F5750/func_802D43AC.s +++ /dev/null @@ -1,13 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D43AC -/* F8D5C 802D43AC 3C02802E */ lui $v0, %hi(D_802DB7C0) -/* F8D60 802D43B0 8C42B7C0 */ lw $v0, %lo(D_802DB7C0)($v0) -/* F8D64 802D43B4 00042080 */ sll $a0, $a0, 2 -/* F8D68 802D43B8 00822021 */ addu $a0, $a0, $v0 -/* F8D6C 802D43BC 8C820000 */ lw $v0, ($a0) -/* F8D70 802D43C0 AC45001C */ sw $a1, 0x1c($v0) -/* F8D74 802D43C4 AC460020 */ sw $a2, 0x20($v0) -/* F8D78 802D43C8 03E00008 */ jr $ra -/* F8D7C 802D43CC AC470024 */ sw $a3, 0x24($v0) diff --git a/asm/nonmatchings/code_F5750/func_802D43D0.s b/asm/nonmatchings/code_F5750/func_802D43D0.s deleted file mode 100644 index 887bf23368..0000000000 --- a/asm/nonmatchings/code_F5750/func_802D43D0.s +++ /dev/null @@ -1,13 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D43D0 -/* F8D80 802D43D0 3C02802E */ lui $v0, %hi(D_802DB7C0) -/* F8D84 802D43D4 8C42B7C0 */ lw $v0, %lo(D_802DB7C0)($v0) -/* F8D88 802D43D8 00042080 */ sll $a0, $a0, 2 -/* F8D8C 802D43DC 00822021 */ addu $a0, $a0, $v0 -/* F8D90 802D43E0 8C820000 */ lw $v0, ($a0) -/* F8D94 802D43E4 AC450010 */ sw $a1, 0x10($v0) -/* F8D98 802D43E8 AC460014 */ sw $a2, 0x14($v0) -/* F8D9C 802D43EC 03E00008 */ jr $ra -/* F8DA0 802D43F0 AC470018 */ sw $a3, 0x18($v0) diff --git a/include/enums.h b/include/enums.h index 73c161a1e1..fbd17d4948 100644 --- a/include/enums.h +++ b/include/enums.h @@ -1094,19 +1094,17 @@ typedef UNK_TYPE DamageType; #define DamageType_THROW 0x00040000 typedef s8 PartnerID; -enum PartnerID { - PartnerID_NONE, - PartnerID_GOOMBARIO, - PartnerID_KOOPER, - PartnerID_BOMBETTE, - PartnerID_PARAKARRY, - PartnerID_GOOMPA, - PartnerID_WATT, - PartnerID_SUSHIE, - PartnerID_LAKILESTER, - PartnerID_BOW, - PartnerID_GOOMBARIA, - PartnerID_TWINK, -}; +#define PartnerID_NONE 0 +#define PartnerID_GOOMBARIO 1 +#define PartnerID_KOOPER 2 +#define PartnerID_BOMBETTE 3 +#define PartnerID_PARAKARRY 4 +#define PartnerID_GOOMPA 5 +#define PartnerID_WATT 6 +#define PartnerID_SUSHIE 7 +#define PartnerID_LAKILESTER 8 +#define PartnerID_BOW 9 +#define PartnerID_GOOMBARIA 10 +#define PartnerID_TWINK 11 #endif diff --git a/src/code_7bb60_len_41b0.c b/src/code_7bb60_len_41b0.c index 62c381f980..301c0a8afb 100644 --- a/src/code_7bb60_len_41b0.c +++ b/src/code_7bb60_len_41b0.c @@ -159,15 +159,16 @@ void set_action_state(s32 actionState) { } if (actionState == ActionState_HIT_HAZARD || actionState == ActionState_HIT_LAVA) { - u8 partner; + PartnerID partner; if (playerStatus->unk_BF == 3) { actionState = ActionState_HIT_HAZARD; } - // Whilst Lakilester, Bow, or Parakarry's ability is active, hazards have no effect. + // Whilst Sushie, Lakilester, Parakarry's ability is active, hazards have no effect. partner = playerData->currentPartner; - if (((u8)(partner - 7) < 2) || (playerData->currentPartner == PartnerID_PARAKARRY)) { + + if (partner == PartnerID_SUSHIE || partner == PartnerID_LAKILESTER || partner == PartnerID_PARAKARRY) { if (D_8010EBB0[0]) { playerStatus->animFlags |= 0x4; playerStatus->flags |= 0x800; diff --git a/src/code_F5750.c b/src/code_F5750.c index 6e1ee4993a..bc71e89ad1 100644 --- a/src/code_F5750.c +++ b/src/code_F5750.c @@ -1,5 +1,21 @@ #include "common.h" +typedef struct UnkF5750 { + /* 0x00 */ s32 unk_00; + /* 0x04 */ s32 unk_04; + /* 0x08 */ s32 unk_08; + /* 0x0C */ s32 unk_0C; + /* 0x10 */ s32 unk_10; + /* 0x14 */ s32 unk_14; + /* 0x18 */ s32 unk_18; + /* 0x1C */ f32 unk_1C; + /* 0x20 */ f32 unk_20; + /* 0x24 */ f32 unk_24; +} UnkF5750; + +extern s16 D_802DB5B0; +extern UnkF5750** D_802DB7C0; + ApiStatus HidePlayerShadow(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 hideShadow = get_variable(script, *args++); @@ -293,19 +309,31 @@ ApiStatus DisablePartner(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "code_F5750", UseEntryHeading); -INCLUDE_ASM(s32, "code_F5750", func_802D2148); +ApiStatus func_802D2148(ScriptInstance* script, s32 isInitialCall) { + gPlayerStatus.flags &= ~0x4000000; + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_F5750", UseExitHeading); INCLUDE_ASM(s32, "code_F5750", func_802D23F8); -INCLUDE_ASM(s32, "code_F5750", func_802D244C); +ApiStatus func_802D244C(ScriptInstance* script, s32 isInitialCall) { + if ((gCollisionStatus.currentFloor >= 0) && (func_802D23F8() != 0)) { + return ApiStatus_DONE2; + } -INCLUDE_ASM(s32, "code_F5750", func_802D2484); + return ApiStatus_BLOCK; +} + +ApiStatus func_802D2484(ScriptInstance* script, s32 isInitialCall) { + return (gCollisionStatus.currentFloor >= 0) * ApiStatus_DONE2; +} ApiStatus func_802D249C(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 val = 0; + if (gCollisionStatus.currentFloor >= 0) { val = func_802D23F8() != 0; } @@ -318,11 +346,18 @@ ApiStatus func_802D24F4(ScriptInstance* script, s32 isInitialCall) { return (gPlayerStatus.moveFrames == 0) * ApiStatus_DONE2; } -INCLUDE_ASM(s32, "code_F5750", func_802D2508); +ApiStatus func_802D2508(ScriptInstance* script, s32 isInitialCall) { + return !(gPlayerStatus.flags & 0x2000) * ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_F5750", func_802D2520); -INCLUDE_ASM(s32, "code_F5750", func_802D286C); +ApiStatus func_802D286C(ScriptInstance* script, s32 isInitialCall) { + s32 temp = *script->ptrReadPos; + + D_802DB5B0 = temp; + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_F5750", func_802D2884); @@ -353,9 +388,19 @@ ApiStatus GetCurrentPartner(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "code_F5750", func_802D2B50); +ApiStatus func_802D2B50(void) { + PlayerStatus* playerStatus = &gPlayerStatus; -INCLUDE_ASM(s32, "code_F5750", func_802D2B6C); + playerStatus->animFlags |= 8; + return ApiStatus_DONE2; +} + +ApiStatus func_802D2B6C(ScriptInstance* script, s32 isInitialCall) { + PlayerStatus* playerStatus = &gPlayerStatus; + + playerStatus->animFlags |= 4; + return ApiStatus_DONE2; +} ApiStatus Disable8bitMario(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; @@ -375,9 +420,24 @@ ApiStatus Disable8bitMario(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "code_F5750", func_802D2C14); +ApiStatus func_802D2C14(ScriptInstance* script, s32 isInitialCall) { + func_800EF3D4(get_variable(script, *script->ptrReadPos)); + return ApiStatus_DONE2; +} -INCLUDE_ASM(s32, "code_F5750", func_802D2C40); +ApiStatus func_802D2C40(ScriptInstance *script) { + Bytecode* args = script->ptrReadPos; + f32 x = get_variable(script, *args++); + PlayerStatus* playerStatus = &gPlayerStatus; + f32 y; + f32 z; + + playerStatus->extraVelocity.x = x; + playerStatus->extraVelocity.y = get_variable(script, *args++); + playerStatus->extraVelocity.z = get_variable(script, *args++); + + return ApiStatus_DONE2; +} ApiStatus PlaySoundAtPlayer(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; @@ -404,9 +464,75 @@ INCLUDE_ASM(s32, "code_F5750", func_802D3398); INCLUDE_ASM(s32, "code_F5750", func_802D33D4); -INCLUDE_ASM(s32, "code_F5750", func_802D3474); +ApiStatus func_802D3474(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 outVar = *args++; + s32* unkStructPtr = get_variable(script, *args++); + UnkF5750* temp; + s32 i; -INCLUDE_ASM(s32, "code_F5750", func_802D354C); + for (i = 0; i < 0x40; i++) { + temp = D_802DB7C0[i]; + if (temp->unk_00 < 0) { + break; + } + } + + if (i >= 0x40) { + return ApiStatus_DONE2; + } + + temp->unk_00 = load_entity_model(unkStructPtr); + temp->unk_04 = 0; + temp->unk_08 = 0; + temp->unk_0C = 0; + temp->unk_10 = 0; + temp->unk_14 = 0; + temp->unk_18 = 0; + temp->unk_1C = 1.0f; + temp->unk_20 = 1.0f; + temp->unk_24 = 1.0f; + + update_entity_rendercmd(temp->unk_00); + set_variable(script, outVar, i); + + return ApiStatus_DONE2; +} + +ApiStatus func_802D354C(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 outVar = *args++; + s32* unkStructPtr = get_variable(script, *args++); + UnkF5750* temp; + s32 i; + + for (i = 0; i < 0x40; i++) { + temp = D_802DB7C0[i]; + if (temp->unk_00 < 0) { + break; + } + } + + if (i >= 0x40) { + return ApiStatus_DONE2; + } + + temp->unk_00 = ALT_load_entity_model(unkStructPtr); + temp->unk_04 = 0; + temp->unk_08 = 0; + temp->unk_0C = 0; + temp->unk_10 = 0; + temp->unk_14 = 0; + temp->unk_18 = 0; + temp->unk_1C = 1.0f; + temp->unk_20 = 1.0f; + temp->unk_24 = 1.0f; + + update_entity_rendercmd(temp->unk_00); + set_variable(script, outVar, i); + + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_F5750", func_802D3624); @@ -436,7 +562,9 @@ INCLUDE_ASM(s32, "code_F5750", func_802D3FC8); INCLUDE_ASM(s32, "code_F5750", func_802D4050); -INCLUDE_ASM(s32, "code_F5750", func_802D4164); +UnkF5750* func_802D4164(s32 index) { + return D_802DB7C0[index]; +} INCLUDE_ASM(s32, "code_F5750", func_802D417C); @@ -446,9 +574,21 @@ INCLUDE_ASM(s32, "code_F5750", func_802D42AC); INCLUDE_ASM(s32, "code_F5750", func_802D4364); -INCLUDE_ASM(s32, "code_F5750", func_802D43AC); +void func_802D43AC(s32 index, f32 arg1, f32 arg2, f32 arg3) { + UnkF5750* temp = D_802DB7C0[index]; -INCLUDE_ASM(s32, "code_F5750", func_802D43D0); + temp->unk_1C = arg1; + temp->unk_20 = arg2; + temp->unk_24 = arg3; +} + +void func_802D43D0(s32 index, s32 arg1, s32 arg2, s32 arg3) { + UnkF5750* temp = D_802DB7C0[index]; + + temp->unk_10 = arg1; + temp->unk_14 = arg2; + temp->unk_18 = arg3; +} INCLUDE_ASM(s32, "code_F5750", func_802D43F4);