diff --git a/asm/nonmatchings/code_105700_len_2130/func_802E46BC.s b/asm/nonmatchings/code_105700_len_2130/func_802E46BC.s index 6abe7d351b..fcf27d10f7 100644 --- a/asm/nonmatchings/code_105700_len_2130/func_802E46BC.s +++ b/asm/nonmatchings/code_105700_len_2130/func_802E46BC.s @@ -10,7 +10,7 @@ glabel func_802E46BC /* 105F50 802E46D0 86040014 */ lh $a0, 0x14($s0) /* 105F54 802E46D4 3C02802E */ lui $v0, 0x802e /* 105F58 802E46D8 2442455C */ addiu $v0, $v0, 0x455c -/* 105F5C 802E46DC 0C047FF8 */ jal func_8011FFE0 +/* 105F5C 802E46DC 0C047FF8 */ jal get_anim_mesh /* 105F60 802E46E0 AE02003C */ sw $v0, 0x3c($s0) /* 105F64 802E46E4 24030011 */ addiu $v1, $zero, 0x11 /* 105F68 802E46E8 A0430004 */ sb $v1, 4($v0) @@ -22,4 +22,4 @@ glabel func_802E46BC /* 105F80 802E4700 8FB00010 */ lw $s0, 0x10($sp) /* 105F84 802E4704 03E00008 */ jr $ra /* 105F88 802E4708 27BD0018 */ addiu $sp, $sp, 0x18 -/* 105F8C 802E470C 00000000 */ nop +/* 105F8C 802E470C 00000000 */ nop diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/delete_entity.s b/asm/nonmatchings/code_a5dd0_len_114e0/delete_entity.s index 2d1c527840..ab36887ff1 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/delete_entity.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/delete_entity.s @@ -11,29 +11,29 @@ glabel delete_entity /* A6DE8 801106E8 0040882D */ daddu $s1, $v0, $zero /* A6DEC 801106EC 8E240040 */ lw $a0, 0x40($s1) /* A6DF0 801106F0 10800003 */ beqz $a0, .L80110700 -/* A6DF4 801106F4 00000000 */ nop +/* A6DF4 801106F4 00000000 */ nop /* A6DF8 801106F8 0C00AB4B */ jal heap_free -/* A6DFC 801106FC 00000000 */ nop +/* A6DFC 801106FC 00000000 */ nop .L80110700: /* A6E00 80110700 8E220000 */ lw $v0, ($s1) /* A6E04 80110704 30420008 */ andi $v0, $v0, 8 /* A6E08 80110708 14400005 */ bnez $v0, .L80110720 -/* A6E0C 8011070C 00000000 */ nop +/* A6E0C 8011070C 00000000 */ nop /* A6E10 80110710 0C048B7F */ jal func_80122DFC /* A6E14 80110714 86240014 */ lh $a0, 0x14($s1) /* A6E18 80110718 080441CC */ j .L80110730 -/* A6E1C 8011071C 00000000 */ nop +/* A6E1C 8011071C 00000000 */ nop .L80110720: -/* A6E20 80110720 0C047FF8 */ jal func_8011FFE0 +/* A6E20 80110720 0C047FF8 */ jal get_anim_mesh /* A6E24 80110724 86240014 */ lh $a0, 0x14($s1) /* A6E28 80110728 0C04790E */ jal func_8011E438 /* A6E2C 8011072C 0040202D */ daddu $a0, $v0, $zero .L80110730: /* A6E30 80110730 86240016 */ lh $a0, 0x16($s1) /* A6E34 80110734 04800007 */ bltz $a0, .L80110754 -/* A6E38 80110738 00000000 */ nop +/* A6E38 80110738 00000000 */ nop /* A6E3C 8011073C 0C044181 */ jal get_shadow_by_index -/* A6E40 80110740 00000000 */ nop +/* A6E40 80110740 00000000 */ nop /* A6E44 80110744 8C430000 */ lw $v1, ($v0) /* A6E48 80110748 3C041000 */ lui $a0, 0x1000 /* A6E4C 8011074C 00641825 */ or $v1, $v1, $a0 diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/delete_entity_and_unload_data.s b/asm/nonmatchings/code_a5dd0_len_114e0/delete_entity_and_unload_data.s index c0d34fef62..779fe58e5c 100644 --- a/asm/nonmatchings/code_a5dd0_len_114e0/delete_entity_and_unload_data.s +++ b/asm/nonmatchings/code_a5dd0_len_114e0/delete_entity_and_unload_data.s @@ -11,32 +11,32 @@ glabel delete_entity_and_unload_data /* A6EA8 801107A8 0040882D */ daddu $s1, $v0, $zero /* A6EAC 801107AC 8E240040 */ lw $a0, 0x40($s1) /* A6EB0 801107B0 10800003 */ beqz $a0, .L801107C0 -/* A6EB4 801107B4 00000000 */ nop +/* A6EB4 801107B4 00000000 */ nop /* A6EB8 801107B8 0C00AB4B */ jal heap_free -/* A6EBC 801107BC 00000000 */ nop +/* A6EBC 801107BC 00000000 */ nop .L801107C0: /* A6EC0 801107C0 8E220000 */ lw $v0, ($s1) /* A6EC4 801107C4 30420008 */ andi $v0, $v0, 8 /* A6EC8 801107C8 14400005 */ bnez $v0, .L801107E0 -/* A6ECC 801107CC 00000000 */ nop +/* A6ECC 801107CC 00000000 */ nop /* A6ED0 801107D0 0C048B7F */ jal func_80122DFC /* A6ED4 801107D4 86240014 */ lh $a0, 0x14($s1) /* A6ED8 801107D8 080441FC */ j .L801107F0 -/* A6EDC 801107DC 00000000 */ nop +/* A6EDC 801107DC 00000000 */ nop .L801107E0: -/* A6EE0 801107E0 0C047FF8 */ jal func_8011FFE0 +/* A6EE0 801107E0 0C047FF8 */ jal get_anim_mesh /* A6EE4 801107E4 86240014 */ lh $a0, 0x14($s1) /* A6EE8 801107E8 0C04790E */ jal func_8011E438 /* A6EEC 801107EC 0040202D */ daddu $a0, $v0, $zero .L801107F0: /* A6EF0 801107F0 8E240038 */ lw $a0, 0x38($s1) /* A6EF4 801107F4 0C0445F7 */ jal func_801117DC -/* A6EF8 801107F8 00000000 */ nop +/* A6EF8 801107F8 00000000 */ nop /* A6EFC 801107FC 86240016 */ lh $a0, 0x16($s1) /* A6F00 80110800 04800007 */ bltz $a0, .L80110820 -/* A6F04 80110804 00000000 */ nop +/* A6F04 80110804 00000000 */ nop /* A6F08 80110808 0C044181 */ jal get_shadow_by_index -/* A6F0C 8011080C 00000000 */ nop +/* A6F0C 8011080C 00000000 */ nop /* A6F10 80110810 8C430000 */ lw $v1, ($v0) /* A6F14 80110814 3C041000 */ lui $a0, 0x1000 /* A6F18 80110818 00641825 */ or $v1, $v1, $a0 diff --git a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011FFE0.s b/asm/nonmatchings/code_a5dd0_len_114e0/func_8011FFE0.s deleted file mode 100644 index 1b9217c601..0000000000 --- a/asm/nonmatchings/code_a5dd0_len_114e0/func_8011FFE0.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8011FFE0 -/* B66E0 8011FFE0 2402F7FF */ addiu $v0, $zero, -0x801 -/* B66E4 8011FFE4 00822024 */ and $a0, $a0, $v0 -/* B66E8 8011FFE8 3C028015 */ lui $v0, %hi(gCurrentAnimMeshListPtr) -/* B66EC 8011FFEC 8C423A40 */ lw $v0, %lo(gCurrentAnimMeshListPtr)($v0) -/* B66F0 8011FFF0 00042080 */ sll $a0, $a0, 2 -/* B66F4 8011FFF4 00822021 */ addu $a0, $a0, $v0 -/* B66F8 8011FFF8 03E00008 */ jr $ra -/* B66FC 8011FFFC 8C820000 */ lw $v0, ($a0) diff --git a/asm/nonmatchings/code_ef070_len_3400/AddAnimModelPosition.s b/asm/nonmatchings/code_ef070_len_3400/AddAnimModelPosition.s deleted file mode 100644 index 114cefa93f..0000000000 --- a/asm/nonmatchings/code_ef070_len_3400/AddAnimModelPosition.s +++ /dev/null @@ -1,53 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel AddAnimModelPosition -/* F1ADC 802CD12C 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* F1AE0 802CD130 AFB20018 */ sw $s2, 0x18($sp) -/* F1AE4 802CD134 0080902D */ daddu $s2, $a0, $zero -/* F1AE8 802CD138 AFBF001C */ sw $ra, 0x1c($sp) -/* F1AEC 802CD13C AFB10014 */ sw $s1, 0x14($sp) -/* F1AF0 802CD140 AFB00010 */ sw $s0, 0x10($sp) -/* F1AF4 802CD144 F7B60028 */ sdc1 $f22, 0x28($sp) -/* F1AF8 802CD148 F7B40020 */ sdc1 $f20, 0x20($sp) -/* F1AFC 802CD14C 8E50000C */ lw $s0, 0xc($s2) -/* F1B00 802CD150 8E050000 */ lw $a1, ($s0) -/* F1B04 802CD154 0C0B1EAF */ jal get_variable -/* F1B08 802CD158 26100004 */ addiu $s0, $s0, 4 -/* F1B0C 802CD15C 8E050000 */ lw $a1, ($s0) -/* F1B10 802CD160 26100004 */ addiu $s0, $s0, 4 -/* F1B14 802CD164 0240202D */ daddu $a0, $s2, $zero -/* F1B18 802CD168 0C0B210B */ jal get_float_variable -/* F1B1C 802CD16C 0040882D */ daddu $s1, $v0, $zero -/* F1B20 802CD170 8E050000 */ lw $a1, ($s0) -/* F1B24 802CD174 26100004 */ addiu $s0, $s0, 4 -/* F1B28 802CD178 0240202D */ daddu $a0, $s2, $zero -/* F1B2C 802CD17C 0C0B210B */ jal get_float_variable -/* F1B30 802CD180 46000586 */ mov.s $f22, $f0 -/* F1B34 802CD184 0240202D */ daddu $a0, $s2, $zero -/* F1B38 802CD188 8E050000 */ lw $a1, ($s0) -/* F1B3C 802CD18C 0C0B210B */ jal get_float_variable -/* F1B40 802CD190 46000506 */ mov.s $f20, $f0 -/* F1B44 802CD194 3C02802E */ lui $v0, %hi(gCurrentMeshAnimationListPtr) -/* F1B48 802CD198 8C42AE30 */ lw $v0, %lo(gCurrentMeshAnimationListPtr)($v0) -/* F1B4C 802CD19C 00118880 */ sll $s1, $s1, 2 -/* F1B50 802CD1A0 02228821 */ addu $s1, $s1, $v0 -/* F1B54 802CD1A4 8E230000 */ lw $v1, ($s1) -/* F1B58 802CD1A8 C4660004 */ lwc1 $f6, 4($v1) -/* F1B5C 802CD1AC 46163180 */ add.s $f6, $f6, $f22 -/* F1B60 802CD1B0 C4640008 */ lwc1 $f4, 8($v1) -/* F1B64 802CD1B4 46142100 */ add.s $f4, $f4, $f20 -/* F1B68 802CD1B8 C462000C */ lwc1 $f2, 0xc($v1) -/* F1B6C 802CD1BC 46001080 */ add.s $f2, $f2, $f0 -/* F1B70 802CD1C0 E4660004 */ swc1 $f6, 4($v1) -/* F1B74 802CD1C4 E4640008 */ swc1 $f4, 8($v1) -/* F1B78 802CD1C8 E462000C */ swc1 $f2, 0xc($v1) -/* F1B7C 802CD1CC 8FBF001C */ lw $ra, 0x1c($sp) -/* F1B80 802CD1D0 8FB20018 */ lw $s2, 0x18($sp) -/* F1B84 802CD1D4 8FB10014 */ lw $s1, 0x14($sp) -/* F1B88 802CD1D8 8FB00010 */ lw $s0, 0x10($sp) -/* F1B8C 802CD1DC D7B60028 */ ldc1 $f22, 0x28($sp) -/* F1B90 802CD1E0 D7B40020 */ ldc1 $f20, 0x20($sp) -/* F1B94 802CD1E4 24020002 */ addiu $v0, $zero, 2 -/* F1B98 802CD1E8 03E00008 */ jr $ra -/* F1B9C 802CD1EC 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/asm/nonmatchings/code_ef070_len_3400/LoadModelAnimation.s b/asm/nonmatchings/code_ef070_len_3400/LoadModelAnimation.s deleted file mode 100644 index ac3a426a16..0000000000 --- a/asm/nonmatchings/code_ef070_len_3400/LoadModelAnimation.s +++ /dev/null @@ -1,52 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel LoadModelAnimation -/* F169C 802CCCEC 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* F16A0 802CCCF0 AFB10014 */ sw $s1, 0x14($sp) -/* F16A4 802CCCF4 0080882D */ daddu $s1, $a0, $zero -/* F16A8 802CCCF8 AFBF001C */ sw $ra, 0x1c($sp) -/* F16AC 802CCCFC AFB20018 */ sw $s2, 0x18($sp) -/* F16B0 802CCD00 AFB00010 */ sw $s0, 0x10($sp) -/* F16B4 802CCD04 8E30000C */ lw $s0, 0xc($s1) -/* F16B8 802CCD08 8E050000 */ lw $a1, ($s0) -/* F16BC 802CCD0C 0C0B1EAF */ jal get_variable -/* F16C0 802CCD10 26100004 */ addiu $s0, $s0, 4 -/* F16C4 802CCD14 0220202D */ daddu $a0, $s1, $zero -/* F16C8 802CCD18 8E050000 */ lw $a1, ($s0) -/* F16CC 802CCD1C 0C0B1EAF */ jal get_variable -/* F16D0 802CCD20 0040802D */ daddu $s0, $v0, $zero -/* F16D4 802CCD24 0040902D */ daddu $s2, $v0, $zero -/* F16D8 802CCD28 3C02802E */ lui $v0, %hi(gCurrentMeshAnimationListPtr) -/* F16DC 802CCD2C 8C42AE30 */ lw $v0, %lo(gCurrentMeshAnimationListPtr)($v0) -/* F16E0 802CCD30 00108080 */ sll $s0, $s0, 2 -/* F16E4 802CCD34 02028021 */ addu $s0, $s0, $v0 -/* F16E8 802CCD38 8E100000 */ lw $s0, ($s0) -/* F16EC 802CCD3C 0C04792E */ jal func_8011E4B8 -/* F16F0 802CCD40 0000202D */ daddu $a0, $zero, $zero -/* F16F4 802CCD44 0040882D */ daddu $s1, $v0, $zero -/* F16F8 802CCD48 0220202D */ daddu $a0, $s1, $zero -/* F16FC 802CCD4C 0C0480EB */ jal func_801203AC -/* F1700 802CCD50 0240282D */ daddu $a1, $s2, $zero -/* F1704 802CCD54 3C013F80 */ lui $at, 0x3f80 -/* F1708 802CCD58 44810000 */ mtc1 $at, $f0 -/* F170C 802CCD5C 26040028 */ addiu $a0, $s0, 0x28 -/* F1710 802CCD60 AE110000 */ sw $s1, ($s0) -/* F1714 802CCD64 AE000004 */ sw $zero, 4($s0) -/* F1718 802CCD68 AE000008 */ sw $zero, 8($s0) -/* F171C 802CCD6C AE00000C */ sw $zero, 0xc($s0) -/* F1720 802CCD70 AE000010 */ sw $zero, 0x10($s0) -/* F1724 802CCD74 AE000014 */ sw $zero, 0x14($s0) -/* F1728 802CCD78 AE000018 */ sw $zero, 0x18($s0) -/* F172C 802CCD7C E600001C */ swc1 $f0, 0x1c($s0) -/* F1730 802CCD80 E6000020 */ swc1 $f0, 0x20($s0) -/* F1734 802CCD84 E6000024 */ swc1 $f0, 0x24($s0) -/* F1738 802CCD88 0C019D10 */ jal guMtxIdent -/* F173C 802CCD8C AE000068 */ sw $zero, 0x68($s0) -/* F1740 802CCD90 8FBF001C */ lw $ra, 0x1c($sp) -/* F1744 802CCD94 8FB20018 */ lw $s2, 0x18($sp) -/* F1748 802CCD98 8FB10014 */ lw $s1, 0x14($sp) -/* F174C 802CCD9C 8FB00010 */ lw $s0, 0x10($sp) -/* F1750 802CCDA0 24020002 */ addiu $v0, $zero, 2 -/* F1754 802CCDA4 03E00008 */ jr $ra -/* F1758 802CCDA8 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_ef070_len_3400/func_802CCDAC.s b/asm/nonmatchings/code_ef070_len_3400/func_802CCDAC.s deleted file mode 100644 index 8aa048d12c..0000000000 --- a/asm/nonmatchings/code_ef070_len_3400/func_802CCDAC.s +++ /dev/null @@ -1,52 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802CCDAC -/* F175C 802CCDAC 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* F1760 802CCDB0 AFB10014 */ sw $s1, 0x14($sp) -/* F1764 802CCDB4 0080882D */ daddu $s1, $a0, $zero -/* F1768 802CCDB8 AFBF001C */ sw $ra, 0x1c($sp) -/* F176C 802CCDBC AFB20018 */ sw $s2, 0x18($sp) -/* F1770 802CCDC0 AFB00010 */ sw $s0, 0x10($sp) -/* F1774 802CCDC4 8E30000C */ lw $s0, 0xc($s1) -/* F1778 802CCDC8 8E050000 */ lw $a1, ($s0) -/* F177C 802CCDCC 0C0B1EAF */ jal get_variable -/* F1780 802CCDD0 26100004 */ addiu $s0, $s0, 4 -/* F1784 802CCDD4 0220202D */ daddu $a0, $s1, $zero -/* F1788 802CCDD8 8E050000 */ lw $a1, ($s0) -/* F178C 802CCDDC 0C0B1EAF */ jal get_variable -/* F1790 802CCDE0 0040802D */ daddu $s0, $v0, $zero -/* F1794 802CCDE4 0040902D */ daddu $s2, $v0, $zero -/* F1798 802CCDE8 3C02802E */ lui $v0, %hi(gCurrentMeshAnimationListPtr) -/* F179C 802CCDEC 8C42AE30 */ lw $v0, %lo(gCurrentMeshAnimationListPtr)($v0) -/* F17A0 802CCDF0 00108080 */ sll $s0, $s0, 2 -/* F17A4 802CCDF4 02028021 */ addu $s0, $s0, $v0 -/* F17A8 802CCDF8 8E100000 */ lw $s0, ($s0) -/* F17AC 802CCDFC 0C04792E */ jal func_8011E4B8 -/* F17B0 802CCE00 0000202D */ daddu $a0, $zero, $zero -/* F17B4 802CCE04 0040882D */ daddu $s1, $v0, $zero -/* F17B8 802CCE08 0220202D */ daddu $a0, $s1, $zero -/* F17BC 802CCE0C 0C04811D */ jal func_80120474 -/* F17C0 802CCE10 0240282D */ daddu $a1, $s2, $zero -/* F17C4 802CCE14 3C013F80 */ lui $at, 0x3f80 -/* F17C8 802CCE18 44810000 */ mtc1 $at, $f0 -/* F17CC 802CCE1C 26040028 */ addiu $a0, $s0, 0x28 -/* F17D0 802CCE20 AE110000 */ sw $s1, ($s0) -/* F17D4 802CCE24 AE000004 */ sw $zero, 4($s0) -/* F17D8 802CCE28 AE000008 */ sw $zero, 8($s0) -/* F17DC 802CCE2C AE00000C */ sw $zero, 0xc($s0) -/* F17E0 802CCE30 AE000010 */ sw $zero, 0x10($s0) -/* F17E4 802CCE34 AE000014 */ sw $zero, 0x14($s0) -/* F17E8 802CCE38 AE000018 */ sw $zero, 0x18($s0) -/* F17EC 802CCE3C E600001C */ swc1 $f0, 0x1c($s0) -/* F17F0 802CCE40 E6000020 */ swc1 $f0, 0x20($s0) -/* F17F4 802CCE44 E6000024 */ swc1 $f0, 0x24($s0) -/* F17F8 802CCE48 0C019D10 */ jal guMtxIdent -/* F17FC 802CCE4C AE000068 */ sw $zero, 0x68($s0) -/* F1800 802CCE50 8FBF001C */ lw $ra, 0x1c($sp) -/* F1804 802CCE54 8FB20018 */ lw $s2, 0x18($sp) -/* F1808 802CCE58 8FB10014 */ lw $s1, 0x14($sp) -/* F180C 802CCE5C 8FB00010 */ lw $s0, 0x10($sp) -/* F1810 802CCE60 24020002 */ addiu $v0, $zero, 2 -/* F1814 802CCE64 03E00008 */ jr $ra -/* F1818 802CCE68 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_ef070_len_3400/func_802CD348.s b/asm/nonmatchings/code_ef070_len_3400/func_802CD348.s deleted file mode 100644 index b8575a3b17..0000000000 --- a/asm/nonmatchings/code_ef070_len_3400/func_802CD348.s +++ /dev/null @@ -1,34 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802CD348 -/* F1CF8 802CD348 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* F1CFC 802CD34C AFB10014 */ sw $s1, 0x14($sp) -/* F1D00 802CD350 0080882D */ daddu $s1, $a0, $zero -/* F1D04 802CD354 AFBF0018 */ sw $ra, 0x18($sp) -/* F1D08 802CD358 AFB00010 */ sw $s0, 0x10($sp) -/* F1D0C 802CD35C 8E30000C */ lw $s0, 0xc($s1) -/* F1D10 802CD360 8E050000 */ lw $a1, ($s0) -/* F1D14 802CD364 0C0B1EAF */ jal get_variable -/* F1D18 802CD368 26100004 */ addiu $s0, $s0, 4 -/* F1D1C 802CD36C 0220202D */ daddu $a0, $s1, $zero -/* F1D20 802CD370 8E050000 */ lw $a1, ($s0) -/* F1D24 802CD374 0C0B210B */ jal get_float_variable -/* F1D28 802CD378 0040802D */ daddu $s0, $v0, $zero -/* F1D2C 802CD37C 3C02802E */ lui $v0, %hi(gCurrentMeshAnimationListPtr) -/* F1D30 802CD380 8C42AE30 */ lw $v0, %lo(gCurrentMeshAnimationListPtr)($v0) -/* F1D34 802CD384 00108080 */ sll $s0, $s0, 2 -/* F1D38 802CD388 02028021 */ addu $s0, $s0, $v0 -/* F1D3C 802CD38C 8E020000 */ lw $v0, ($s0) -/* F1D40 802CD390 8C440000 */ lw $a0, ($v0) -/* F1D44 802CD394 4600008D */ trunc.w.s $f2, $f0 -/* F1D48 802CD398 44101000 */ mfc1 $s0, $f2 -/* F1D4C 802CD39C 0C047FF8 */ jal func_8011FFE0 -/* F1D50 802CD3A0 00000000 */ nop -/* F1D54 802CD3A4 A0500004 */ sb $s0, 4($v0) -/* F1D58 802CD3A8 8FBF0018 */ lw $ra, 0x18($sp) -/* F1D5C 802CD3AC 8FB10014 */ lw $s1, 0x14($sp) -/* F1D60 802CD3B0 8FB00010 */ lw $s0, 0x10($sp) -/* F1D64 802CD3B4 24020002 */ addiu $v0, $zero, 2 -/* F1D68 802CD3B8 03E00008 */ jr $ra -/* F1D6C 802CD3BC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_ef070_len_3400/func_802CD418.s b/asm/nonmatchings/code_ef070_len_3400/func_802CD418.s deleted file mode 100644 index 07b97bfebc..0000000000 --- a/asm/nonmatchings/code_ef070_len_3400/func_802CD418.s +++ /dev/null @@ -1,45 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802CD418 -/* F1DC8 802CD418 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* F1DCC 802CD41C AFB10014 */ sw $s1, 0x14($sp) -/* F1DD0 802CD420 0080882D */ daddu $s1, $a0, $zero -/* F1DD4 802CD424 AFBF001C */ sw $ra, 0x1c($sp) -/* F1DD8 802CD428 AFB20018 */ sw $s2, 0x18($sp) -/* F1DDC 802CD42C AFB00010 */ sw $s0, 0x10($sp) -/* F1DE0 802CD430 8E30000C */ lw $s0, 0xc($s1) -/* F1DE4 802CD434 8E050000 */ lw $a1, ($s0) -/* F1DE8 802CD438 0C0B1EAF */ jal get_variable -/* F1DEC 802CD43C 26100004 */ addiu $s0, $s0, 4 -/* F1DF0 802CD440 0220202D */ daddu $a0, $s1, $zero -/* F1DF4 802CD444 8E050004 */ lw $a1, 4($s0) -/* F1DF8 802CD448 8E120000 */ lw $s2, ($s0) -/* F1DFC 802CD44C 0C0B1EAF */ jal get_variable -/* F1E00 802CD450 0040882D */ daddu $s1, $v0, $zero -/* F1E04 802CD454 3C03802E */ lui $v1, %hi(gCurrentMeshAnimationListPtr) -/* F1E08 802CD458 8C63AE30 */ lw $v1, %lo(gCurrentMeshAnimationListPtr)($v1) -/* F1E0C 802CD45C 00118880 */ sll $s1, $s1, 2 -/* F1E10 802CD460 02238821 */ addu $s1, $s1, $v1 -/* F1E14 802CD464 8E230000 */ lw $v1, ($s1) -/* F1E18 802CD468 8C640000 */ lw $a0, ($v1) -/* F1E1C 802CD46C 0C047FF8 */ jal func_8011FFE0 -/* F1E20 802CD470 0040802D */ daddu $s0, $v0, $zero -/* F1E24 802CD474 12000004 */ beqz $s0, .L802CD488 -/* F1E28 802CD478 0040202D */ daddu $a0, $v0, $zero -/* F1E2C 802CD47C 8C820000 */ lw $v0, ($a0) -/* F1E30 802CD480 080B3525 */ j .L802CD494 -/* F1E34 802CD484 00521025 */ or $v0, $v0, $s2 -.L802CD488: -/* F1E38 802CD488 8C820000 */ lw $v0, ($a0) -/* F1E3C 802CD48C 00121827 */ nor $v1, $zero, $s2 -/* F1E40 802CD490 00431024 */ and $v0, $v0, $v1 -.L802CD494: -/* F1E44 802CD494 AC820000 */ sw $v0, ($a0) -/* F1E48 802CD498 8FBF001C */ lw $ra, 0x1c($sp) -/* F1E4C 802CD49C 8FB20018 */ lw $s2, 0x18($sp) -/* F1E50 802CD4A0 8FB10014 */ lw $s1, 0x14($sp) -/* F1E54 802CD4A4 8FB00010 */ lw $s0, 0x10($sp) -/* F1E58 802CD4A8 24020002 */ addiu $v0, $zero, 2 -/* F1E5C 802CD4AC 03E00008 */ jr $ra -/* F1E60 802CD4B0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_ef070_len_3400/func_802CD5C0.s b/asm/nonmatchings/code_ef070_len_3400/func_802CD5C0.s index 659a0dc841..9439fcef3b 100644 --- a/asm/nonmatchings/code_ef070_len_3400/func_802CD5C0.s +++ b/asm/nonmatchings/code_ef070_len_3400/func_802CD5C0.s @@ -30,7 +30,7 @@ glabel func_802CD5C0 /* F1FD4 802CD624 8E330000 */ lw $s3, ($s1) /* F1FD8 802CD628 8E100004 */ lw $s0, 4($s0) /* F1FDC 802CD62C 8E640000 */ lw $a0, ($s3) -/* F1FE0 802CD630 0C047FF8 */ jal func_8011FFE0 +/* F1FE0 802CD630 0C047FF8 */ jal get_anim_mesh /* F1FE4 802CD634 0040882D */ daddu $s1, $v0, $zero /* F1FE8 802CD638 0040202D */ daddu $a0, $v0, $zero /* F1FEC 802CD63C 0C047FE6 */ jal func_8011FF98 diff --git a/asm/nonmatchings/code_ef070_len_3400/func_802CD6E0.s b/asm/nonmatchings/code_ef070_len_3400/func_802CD6E0.s index d5f620f9be..dabe2b3bf9 100644 --- a/asm/nonmatchings/code_ef070_len_3400/func_802CD6E0.s +++ b/asm/nonmatchings/code_ef070_len_3400/func_802CD6E0.s @@ -30,7 +30,7 @@ glabel func_802CD6E0 /* F20F4 802CD744 8E230000 */ lw $v1, ($s1) /* F20F8 802CD748 8E150004 */ lw $s5, 4($s0) /* F20FC 802CD74C 8C640000 */ lw $a0, ($v1) -/* F2100 802CD750 0C047FF8 */ jal func_8011FFE0 +/* F2100 802CD750 0C047FF8 */ jal get_anim_mesh /* F2104 802CD754 0040882D */ daddu $s1, $v0, $zero /* F2108 802CD758 0040202D */ daddu $a0, $v0, $zero /* F210C 802CD75C 0C047FE6 */ jal func_8011FF98 diff --git a/asm/nonmatchings/code_ef070_len_3400/func_802CD7D8.s b/asm/nonmatchings/code_ef070_len_3400/func_802CD7D8.s index 20f51a62a8..f03ca9a136 100644 --- a/asm/nonmatchings/code_ef070_len_3400/func_802CD7D8.s +++ b/asm/nonmatchings/code_ef070_len_3400/func_802CD7D8.s @@ -30,7 +30,7 @@ glabel func_802CD7D8 /* F21EC 802CD83C 8E330000 */ lw $s3, ($s1) /* F21F0 802CD840 8E100004 */ lw $s0, 4($s0) /* F21F4 802CD844 8E640000 */ lw $a0, ($s3) -/* F21F8 802CD848 0C047FF8 */ jal func_8011FFE0 +/* F21F8 802CD848 0C047FF8 */ jal get_anim_mesh /* F21FC 802CD84C 0040882D */ daddu $s1, $v0, $zero /* F2200 802CD850 0040202D */ daddu $a0, $v0, $zero /* F2204 802CD854 0C047FDD */ jal func_8011FF74 diff --git a/asm/nonmatchings/code_ef070_len_3400/func_802CD8F8.s b/asm/nonmatchings/code_ef070_len_3400/func_802CD8F8.s index 3e409569e9..1ffc08f192 100644 --- a/asm/nonmatchings/code_ef070_len_3400/func_802CD8F8.s +++ b/asm/nonmatchings/code_ef070_len_3400/func_802CD8F8.s @@ -30,7 +30,7 @@ glabel func_802CD8F8 /* F230C 802CD95C 8E230000 */ lw $v1, ($s1) /* F2310 802CD960 8E150004 */ lw $s5, 4($s0) /* F2314 802CD964 8C640000 */ lw $a0, ($v1) -/* F2318 802CD968 0C047FF8 */ jal func_8011FFE0 +/* F2318 802CD968 0C047FF8 */ jal get_anim_mesh /* F231C 802CD96C 0040882D */ daddu $s1, $v0, $zero /* F2320 802CD970 0040202D */ daddu $a0, $v0, $zero /* F2324 802CD974 0C047FDD */ jal func_8011FF74 diff --git a/asm/nonmatchings/code_ef070_len_3400/func_802CD9F0.s b/asm/nonmatchings/code_ef070_len_3400/func_802CD9F0.s index 7799c63cce..5d2f82702b 100644 --- a/asm/nonmatchings/code_ef070_len_3400/func_802CD9F0.s +++ b/asm/nonmatchings/code_ef070_len_3400/func_802CD9F0.s @@ -29,7 +29,7 @@ glabel func_802CD9F0 /* F2400 802CDA50 02238821 */ addu $s1, $s1, $v1 /* F2404 802CDA54 8E230000 */ lw $v1, ($s1) /* F2408 802CDA58 8C640000 */ lw $a0, ($v1) -/* F240C 802CDA5C 0C047FF8 */ jal func_8011FFE0 +/* F240C 802CDA5C 0C047FF8 */ jal get_anim_mesh /* F2410 802CDA60 0040802D */ daddu $s0, $v0, $zero /* F2414 802CDA64 0040202D */ daddu $a0, $v0, $zero /* F2418 802CDA68 0C047FE6 */ jal func_8011FF98 @@ -53,6 +53,6 @@ glabel func_802CD9F0 /* F2458 802CDAA8 24020002 */ addiu $v0, $zero, 2 /* F245C 802CDAAC 03E00008 */ jr $ra /* F2460 802CDAB0 27BD0028 */ addiu $sp, $sp, 0x28 -/* F2464 802CDAB4 00000000 */ nop -/* F2468 802CDAB8 00000000 */ nop -/* F246C 802CDABC 00000000 */ nop +/* F2464 802CDAB4 00000000 */ nop +/* F2468 802CDAB8 00000000 */ nop +/* F246C 802CDABC 00000000 */ nop diff --git a/include/functions.h b/include/functions.h index 72b99e0f04..1a190d84ca 100644 --- a/include/functions.h +++ b/include/functions.h @@ -93,6 +93,7 @@ ScriptInstance* start_script(Bytecode* initialLine, s32 priority, s32 initialSta ScriptInstance* start_script_in_group(Bytecode* initialLine, u8 priority, u8 initialState, u8 groupFlags); void func_8011B7C0(u16, s32, s32); +AnimatedMesh* get_anim_mesh(s32 arg0); void func_80137D88(s32, f32); void func_80137DA4(s32, f32); s32 func_80137E10(s32, u8, u8, u8); diff --git a/src/code_a5dd0_len_114e0.c b/src/code_a5dd0_len_114e0.c index 26d7166ec7..8f0eced19a 100644 --- a/src/code_a5dd0_len_114e0.c +++ b/src/code_a5dd0_len_114e0.c @@ -387,7 +387,9 @@ INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8011FF98); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8011FFB4); -INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8011FFE0); +AnimatedMesh* get_anim_mesh(s32 animModelID) { + return (*gCurrentAnimMeshListPtr)[animModelID & ~0x800]; +} INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80120000); diff --git a/src/code_ef070_len_3400.c b/src/code_ef070_len_3400.c index f04ec53b35..f21ea4917f 100644 --- a/src/code_ef070_len_3400.c +++ b/src/code_ef070_len_3400.c @@ -489,9 +489,53 @@ ApiStatus func_802CCCB0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "code_ef070_len_3400", LoadModelAnimation); +ApiStatus LoadModelAnimation(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 index = get_variable(script, *args++); + s32 var1 = get_variable(script, *args++); + AnimatedModel* animModel = (*gCurrentMeshAnimationListPtr)[index]; + s32 animModelID = func_8011E4B8(0); -INCLUDE_ASM(s32, "code_ef070_len_3400", func_802CCDAC); + func_801203AC(animModelID, var1); + animModel->animModelID = animModelID; + animModel->pos.x = 0; + animModel->pos.y = 0; + animModel->pos.z = 0; + animModel->rot.x = 0; + animModel->rot.y = 0; + animModel->rot.z = 0; + animModel->scale.x = 1.0f; + animModel->scale.y = 1.0f; + animModel->scale.z = 1.0f; + animModel->currentAnimData = NULL; + guMtxIdent(&animModel->mtx); + + return ApiStatus_DONE2; +} + +ApiStatus func_802CCDAC(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 index = get_variable(script, *args++); + s32 var1 = get_variable(script, *args++); + AnimatedModel* animModel = (*gCurrentMeshAnimationListPtr)[index]; + s32 animModelID = func_8011E4B8(0); + + func_80120474(animModelID, var1); + animModel->animModelID = animModelID; + animModel->pos.x = 0; + animModel->pos.y = 0; + animModel->pos.z = 0; + animModel->rot.x = 0; + animModel->rot.y = 0; + animModel->rot.z = 0; + animModel->scale.x = 1.0f; + animModel->scale.y = 1.0f; + animModel->scale.z = 1.0f; + animModel->currentAnimData = NULL; + guMtxIdent(&animModel->mtx); + + return ApiStatus_DONE2; +} ApiStatus PlayModelAnimation(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; @@ -563,7 +607,20 @@ ApiStatus GetAnimModelPosition(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "code_ef070_len_3400", AddAnimModelPosition); +ApiStatus AddAnimModelPosition(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 index = 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++); + AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[index]; + + model->pos.x += x; + model->pos.y += y; + model->pos.z += z; + + return ApiStatus_DONE2; +} ApiStatus SetAnimModelRotation(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; @@ -595,17 +652,38 @@ ApiStatus SetAnimModelScale(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "code_ef070_len_3400", func_802CD348); +ApiStatus func_802CD348(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 index = get_variable(script, *args++); + s32 renderMode = get_float_variable(script, *args++); + + get_anim_mesh((*gCurrentMeshAnimationListPtr)[index]->animModelID)->renderMode = renderMode; + return ApiStatus_DONE2; +} ApiStatus func_802CD3C0(ScriptInstance* script, s32 isInitialCall) { AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[get_variable(script, *script->ptrReadPos)]; - func_8011E438(func_8011FFE0(model->animModelID)); + func_8011E438(get_anim_mesh(model->animModelID)); model->animModelID = -1; return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "code_ef070_len_3400", func_802CD418); +ApiStatus func_802CD418(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 index = get_variable(script, *args++); + s32 a1 = *args++; + s32 var2 = get_variable(script, *args++); + AnimatedMesh* animMesh = get_anim_mesh((*gCurrentMeshAnimationListPtr)[index]->animModelID); + + if (var2) { + animMesh->flags |= a1; + } else { + animMesh->flags &= ~a1; + } + + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_ef070_len_3400", func_802CD4B4); diff --git a/tools/symbol_addrs.txt b/tools/symbol_addrs.txt index d41b15cb25..2ebd814720 100644 --- a/tools/symbol_addrs.txt +++ b/tools/symbol_addrs.txt @@ -768,6 +768,7 @@ set_aux_pan_v = 0x8011BC64; set_background_color_blend = 0x8011BE5C; get_background_color_blend = 0x8011BE80; queue_render_task = 0x8011D910; +get_anim_mesh = 8011FFE0; play_model_animation = 0x80120148; clear_virtual_models = 0x80120BB0; init_virtual_models = 0x80120C58;