prime/asm/MetroidPrime/ScriptObjects/CScriptSwitch.s

166 lines
7.9 KiB
ArmAsm
Raw Normal View History

2022-04-14 08:02:42 +00:00
.include "macros.inc"
2022-04-18 04:19:18 +00:00
.section .data
.global lbl_803E5C40
lbl_803E5C40:
# ROM: 0x3E2C40
.4byte 0
.4byte 0
.4byte __dt__13CScriptSwitchFv
.4byte Accept__13CScriptSwitchFR8IVisitor
.4byte PreThink__7CEntityFfR13CStateManager
.4byte Think__7CEntityFfR13CStateManager
.4byte AcceptScriptMsg__13CScriptSwitchF20EScriptObjectMessage9TUniqueIdR13CStateManager
.4byte SetActive__7CEntityFb
2022-07-14 05:36:41 +00:00
.section .text, "ax"
2022-04-14 08:02:42 +00:00
.global __dt__13CScriptSwitchFv
__dt__13CScriptSwitchFv:
/* 801D9730 001D6690 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 801D9734 001D6694 7C 08 02 A6 */ mflr r0
/* 801D9738 001D6698 90 01 00 14 */ stw r0, 0x14(r1)
/* 801D973C 001D669C 93 E1 00 0C */ stw r31, 0xc(r1)
/* 801D9740 001D66A0 7C 9F 23 78 */ mr r31, r4
/* 801D9744 001D66A4 93 C1 00 08 */ stw r30, 8(r1)
/* 801D9748 001D66A8 7C 7E 1B 79 */ or. r30, r3, r3
/* 801D974C 001D66AC 41 82 00 28 */ beq lbl_801D9774
/* 801D9750 001D66B0 3C A0 80 3E */ lis r5, lbl_803E5C40@ha
/* 801D9754 001D66B4 38 80 00 00 */ li r4, 0
/* 801D9758 001D66B8 38 05 5C 40 */ addi r0, r5, lbl_803E5C40@l
/* 801D975C 001D66BC 90 1E 00 00 */ stw r0, 0(r30)
/* 801D9760 001D66C0 4B E7 7B 15 */ bl __dt__7CEntityFv
/* 801D9764 001D66C4 7F E0 07 35 */ extsh. r0, r31
/* 801D9768 001D66C8 40 81 00 0C */ ble lbl_801D9774
/* 801D976C 001D66CC 7F C3 F3 78 */ mr r3, r30
/* 801D9770 001D66D0 48 13 C1 C1 */ bl Free__7CMemoryFPCv
lbl_801D9774:
/* 801D9774 001D66D4 80 01 00 14 */ lwz r0, 0x14(r1)
/* 801D9778 001D66D8 7F C3 F3 78 */ mr r3, r30
/* 801D977C 001D66DC 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 801D9780 001D66E0 83 C1 00 08 */ lwz r30, 8(r1)
/* 801D9784 001D66E4 7C 08 03 A6 */ mtlr r0
/* 801D9788 001D66E8 38 21 00 10 */ addi r1, r1, 0x10
2022-07-14 05:48:03 +00:00
/* 801D978C 001D66EC 4E 80 00 20 */ blr
2022-04-14 08:02:42 +00:00
.global AcceptScriptMsg__13CScriptSwitchF20EScriptObjectMessage9TUniqueIdR13CStateManager
AcceptScriptMsg__13CScriptSwitchF20EScriptObjectMessage9TUniqueIdR13CStateManager:
/* 801D9790 001D66F0 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 801D9794 001D66F4 7C 08 02 A6 */ mflr r0
/* 801D9798 001D66F8 90 01 00 24 */ stw r0, 0x24(r1)
/* 801D979C 001D66FC 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 801D97A0 001D6700 7C DF 33 78 */ mr r31, r6
/* 801D97A4 001D6704 93 C1 00 18 */ stw r30, 0x18(r1)
/* 801D97A8 001D6708 7C BE 2B 78 */ mr r30, r5
/* 801D97AC 001D670C 93 A1 00 14 */ stw r29, 0x14(r1)
/* 801D97B0 001D6710 7C 9D 23 78 */ mr r29, r4
/* 801D97B4 001D6714 93 81 00 10 */ stw r28, 0x10(r1)
/* 801D97B8 001D6718 7C 7C 1B 78 */ mr r28, r3
/* 801D97BC 001D671C 88 03 00 30 */ lbz r0, 0x30(r3)
/* 801D97C0 001D6720 54 00 CF FF */ rlwinm. r0, r0, 0x19, 0x1f, 0x1f
/* 801D97C4 001D6724 41 82 00 84 */ beq lbl_801D9848
/* 801D97C8 001D6728 2C 1D 00 09 */ cmpwi r29, 9
/* 801D97CC 001D672C 41 82 00 20 */ beq lbl_801D97EC
/* 801D97D0 001D6730 40 80 00 10 */ bge lbl_801D97E0
/* 801D97D4 001D6734 2C 1D 00 03 */ cmpwi r29, 3
/* 801D97D8 001D6738 41 82 00 20 */ beq lbl_801D97F8
/* 801D97DC 001D673C 48 00 00 6C */ b lbl_801D9848
lbl_801D97E0:
/* 801D97E0 001D6740 2C 1D 00 0D */ cmpwi r29, 0xd
/* 801D97E4 001D6744 41 82 00 20 */ beq lbl_801D9804
/* 801D97E8 001D6748 48 00 00 60 */ b lbl_801D9848
lbl_801D97EC:
/* 801D97EC 001D674C 38 00 00 01 */ li r0, 1
/* 801D97F0 001D6750 98 1C 00 34 */ stb r0, 0x34(r28)
/* 801D97F4 001D6754 48 00 00 54 */ b lbl_801D9848
lbl_801D97F8:
/* 801D97F8 001D6758 38 00 00 00 */ li r0, 0
/* 801D97FC 001D675C 98 1C 00 34 */ stb r0, 0x34(r28)
/* 801D9800 001D6760 48 00 00 48 */ b lbl_801D9848
lbl_801D9804:
/* 801D9804 001D6764 88 1C 00 34 */ lbz r0, 0x34(r28)
/* 801D9808 001D6768 28 00 00 00 */ cmplwi r0, 0
/* 801D980C 001D676C 41 82 00 2C */ beq lbl_801D9838
/* 801D9810 001D6770 7F E5 FB 78 */ mr r5, r31
/* 801D9814 001D6774 38 80 00 08 */ li r4, 8
/* 801D9818 001D6778 38 C0 FF FF */ li r6, -1
/* 801D981C 001D677C 4B E7 78 A5 */ bl SendScriptMsgs__7CEntityF18EScriptObjectStateR13CStateManager20EScriptObjectMessage
/* 801D9820 001D6780 88 1C 00 35 */ lbz r0, 0x35(r28)
/* 801D9824 001D6784 28 00 00 00 */ cmplwi r0, 0
/* 801D9828 001D6788 41 82 00 20 */ beq lbl_801D9848
/* 801D982C 001D678C 38 00 00 00 */ li r0, 0
/* 801D9830 001D6790 98 1C 00 34 */ stb r0, 0x34(r28)
/* 801D9834 001D6794 48 00 00 14 */ b lbl_801D9848
lbl_801D9838:
/* 801D9838 001D6798 7F E5 FB 78 */ mr r5, r31
/* 801D983C 001D679C 38 80 00 02 */ li r4, 2
/* 801D9840 001D67A0 38 C0 FF FF */ li r6, -1
/* 801D9844 001D67A4 4B E7 78 7D */ bl SendScriptMsgs__7CEntityF18EScriptObjectStateR13CStateManager20EScriptObjectMessage
lbl_801D9848:
/* 801D9848 001D67A8 A0 1E 00 00 */ lhz r0, 0(r30)
/* 801D984C 001D67AC 7F 83 E3 78 */ mr r3, r28
/* 801D9850 001D67B0 7F A4 EB 78 */ mr r4, r29
/* 801D9854 001D67B4 7F E6 FB 78 */ mr r6, r31
/* 801D9858 001D67B8 B0 01 00 08 */ sth r0, 8(r1)
/* 801D985C 001D67BC 38 A1 00 08 */ addi r5, r1, 8
/* 801D9860 001D67C0 4B E7 78 FD */ bl AcceptScriptMsg__7CEntityF20EScriptObjectMessage9TUniqueIdR13CStateManager
/* 801D9864 001D67C4 80 01 00 24 */ lwz r0, 0x24(r1)
/* 801D9868 001D67C8 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 801D986C 001D67CC 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 801D9870 001D67D0 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 801D9874 001D67D4 83 81 00 10 */ lwz r28, 0x10(r1)
/* 801D9878 001D67D8 7C 08 03 A6 */ mtlr r0
/* 801D987C 001D67DC 38 21 00 20 */ addi r1, r1, 0x20
2022-07-14 05:48:03 +00:00
/* 801D9880 001D67E0 4E 80 00 20 */ blr
2022-04-14 08:02:42 +00:00
.global Accept__13CScriptSwitchFR8IVisitor
Accept__13CScriptSwitchFR8IVisitor:
/* 801D9884 001D67E4 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 801D9888 001D67E8 7C 08 02 A6 */ mflr r0
/* 801D988C 001D67EC 90 01 00 14 */ stw r0, 0x14(r1)
/* 801D9890 001D67F0 7C 60 1B 78 */ mr r0, r3
/* 801D9894 001D67F4 7C 83 23 78 */ mr r3, r4
/* 801D9898 001D67F8 81 84 00 00 */ lwz r12, 0(r4)
/* 801D989C 001D67FC 7C 04 03 78 */ mr r4, r0
/* 801D98A0 001D6800 81 8C 00 24 */ lwz r12, 0x24(r12)
/* 801D98A4 001D6804 7D 89 03 A6 */ mtctr r12
2022-07-14 05:48:03 +00:00
/* 801D98A8 001D6808 4E 80 04 21 */ bctrl
2022-04-14 08:02:42 +00:00
/* 801D98AC 001D680C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 801D98B0 001D6810 7C 08 03 A6 */ mtlr r0
/* 801D98B4 001D6814 38 21 00 10 */ addi r1, r1, 0x10
2022-07-14 05:48:03 +00:00
/* 801D98B8 001D6818 4E 80 00 20 */ blr
2022-04-14 08:02:42 +00:00
.global "__ct__13CScriptSwitchF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfobbb"
"__ct__13CScriptSwitchF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfobbb":
/* 801D98BC 001D681C 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 801D98C0 001D6820 7C 08 02 A6 */ mflr r0
/* 801D98C4 001D6824 90 01 00 24 */ stw r0, 0x24(r1)
/* 801D98C8 001D6828 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 801D98CC 001D682C 7D 3F 4B 78 */ mr r31, r9
/* 801D98D0 001D6830 93 C1 00 18 */ stw r30, 0x18(r1)
/* 801D98D4 001D6834 7D 1E 43 78 */ mr r30, r8
/* 801D98D8 001D6838 93 A1 00 14 */ stw r29, 0x14(r1)
/* 801D98DC 001D683C 7C 7D 1B 78 */ mr r29, r3
/* 801D98E0 001D6840 A0 04 00 00 */ lhz r0, 0(r4)
/* 801D98E4 001D6844 7C A4 2B 78 */ mr r4, r5
/* 801D98E8 001D6848 7C C5 33 78 */ mr r5, r6
/* 801D98EC 001D684C 7C E6 3B 78 */ mr r6, r7
/* 801D98F0 001D6850 B0 01 00 08 */ sth r0, 8(r1)
/* 801D98F4 001D6854 7C 87 23 78 */ mr r7, r4
/* 801D98F8 001D6858 38 81 00 08 */ addi r4, r1, 8
/* 801D98FC 001D685C 4B E7 7A 29 */ bl "__ct__7CEntityF9TUniqueIdRC11CEntityInfobRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>"
/* 801D9900 001D6860 3C 80 80 3E */ lis r4, lbl_803E5C40@ha
/* 801D9904 001D6864 7F A3 EB 78 */ mr r3, r29
/* 801D9908 001D6868 38 04 5C 40 */ addi r0, r4, lbl_803E5C40@l
/* 801D990C 001D686C 90 1D 00 00 */ stw r0, 0(r29)
/* 801D9910 001D6870 9B DD 00 34 */ stb r30, 0x34(r29)
/* 801D9914 001D6874 9B FD 00 35 */ stb r31, 0x35(r29)
/* 801D9918 001D6878 80 01 00 24 */ lwz r0, 0x24(r1)
/* 801D991C 001D687C 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 801D9920 001D6880 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 801D9924 001D6884 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 801D9928 001D6888 7C 08 03 A6 */ mtlr r0
/* 801D992C 001D688C 38 21 00 20 */ addi r1, r1, 0x20
/* 801D9930 001D6890 4E 80 00 20 */ blr