diff --git a/Progress.md b/Progress.md index dc3f1e630c4..9b97d8ad416 100644 --- a/Progress.md +++ b/Progress.md @@ -7,22 +7,22 @@ Section | Percentage | Decompiled (bytes) | Total (bytes) .init | 97.972973% | 9280 | 9472 .extab | 100.000000% | 96 | 96 .extabindex | 100.000000% | 96 | 96 -.text | 30.963614% | 1113620 | 3596544 +.text | 30.976404% | 1114080 | 3596544 .ctors | 100.000000% | 448 | 448 .dtors | 100.000000% | 32 | 32 .rodata | 100.000000% | 193856 | 193856 .data | 100.000000% | 197632 | 197632 .sdata | 100.000000% | 1408 | 1408 .sdata2 | 100.000000% | 20832 | 20832 -Total | 38.241269% | 1537556 | 4020672 +Total | 38.252710% | 1538016 | 4020672 ## Total Section | Percentage | Decompiled (bytes) | Total (bytes) ---|---|---|--- -main.dol | 38.241269% | 1537556 | 4020672 -RELs | 34.213471% | 3934660 | 11500324 -Total | 35.256861% | 5472216 | 15520996 +main.dol | 38.252710% | 1538016 | 4020672 +RELs | 34.221992% | 3935640 | 11500324 +Total | 35.266139% | 5473656 | 15520996 ## RELs @@ -717,7 +717,7 @@ d_a_tag_attention | 100.000000% | 2024 | 2024 d_a_tag_bottle_item | 100.000000% | 2656 | 2656 d_a_tag_camera | 37.023593% | 1632 | 4408 d_a_tag_chgrestart | 73.981900% | 1308 | 1768 -d_a_tag_chkpoint | 39.852399% | 864 | 2168 +d_a_tag_chkpoint | 43.726937% | 948 | 2168 d_a_tag_csw | 35.869565% | 3696 | 10304 d_a_tag_escape | 100.000000% | 712 | 712 d_a_tag_event | 31.075697% | 1248 | 4016 @@ -747,7 +747,7 @@ d_a_tag_mmsg | 100.000000% | 1960 | 1960 d_a_tag_msg | 37.563971% | 1468 | 3908 d_a_tag_mstop | 43.995098% | 1436 | 3264 d_a_tag_mwait | 100.000000% | 2896 | 2896 -d_a_tag_myna2 | 47.260274% | 828 | 1752 +d_a_tag_myna2 | 98.401826% | 1724 | 1752 d_a_tag_myna_light | 36.747759% | 1148 | 3124 d_a_tag_pachi | 51.107595% | 1292 | 2528 d_a_tag_poFire | 100.000000% | 1688 | 1688 @@ -785,4 +785,4 @@ d_a_vrbox2 | 34.977578% | 2184 | 6244 d_a_warp_bug | 100.000000% | 2024 | 2024 d_a_ykgr | 44.400631% | 2252 | 5072 f_pc_profile_lst | 100.000000% | 28156 | 28156 -Total | 34.213471% | 3934660 | 11500324 +Total | 34.221992% | 3935640 | 11500324 diff --git a/asm/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint/daTag_Chk_Delete__FP11daTag_Chk_c.s b/asm/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint/daTag_Chk_Delete__FP11daTag_Chk_c.s deleted file mode 100644 index 9ed531e8ddd..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint/daTag_Chk_Delete__FP11daTag_Chk_c.s +++ /dev/null @@ -1,14 +0,0 @@ -lbl_8048AA20: -/* 8048AA20 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8048AA24 7C 08 02 A6 */ mflr r0 -/* 8048AA28 90 01 00 14 */ stw r0, 0x14(r1) -/* 8048AA2C 28 03 00 00 */ cmplwi r3, 0 -/* 8048AA30 41 82 00 0C */ beq lbl_8048AA3C -/* 8048AA34 38 80 00 00 */ li r4, 0 -/* 8048AA38 4B B8 E2 55 */ bl __dt__10fopAc_ac_cFv -lbl_8048AA3C: -/* 8048AA3C 38 60 00 01 */ li r3, 1 -/* 8048AA40 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8048AA44 7C 08 03 A6 */ mtlr r0 -/* 8048AA48 38 21 00 10 */ addi r1, r1, 0x10 -/* 8048AA4C 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint/daTag_Chk_Execute__FP11daTag_Chk_c.s b/asm/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint/daTag_Chk_Execute__FP11daTag_Chk_c.s deleted file mode 100644 index ae4f1b4853a..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint/daTag_Chk_Execute__FP11daTag_Chk_c.s +++ /dev/null @@ -1,10 +0,0 @@ -lbl_8048A9F4: -/* 8048A9F4 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8048A9F8 7C 08 02 A6 */ mflr r0 -/* 8048A9FC 90 01 00 14 */ stw r0, 0x14(r1) -/* 8048AA00 4B FF FC F9 */ bl execute__11daTag_Chk_cFv -/* 8048AA04 38 60 00 01 */ li r3, 1 -/* 8048AA08 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8048AA0C 7C 08 03 A6 */ mtlr r0 -/* 8048AA10 38 21 00 10 */ addi r1, r1, 0x10 -/* 8048AA14 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/create__12daTagMyna2_cFv.s b/asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/create__12daTagMyna2_cFv.s deleted file mode 100644 index 562b5e93ece..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/create__12daTagMyna2_cFv.s +++ /dev/null @@ -1,31 +0,0 @@ -lbl_80D5C698: -/* 80D5C698 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80D5C69C 7C 08 02 A6 */ mflr r0 -/* 80D5C6A0 90 01 00 14 */ stw r0, 0x14(r1) -/* 80D5C6A4 93 E1 00 0C */ stw r31, 0xc(r1) -/* 80D5C6A8 7C 7F 1B 78 */ mr r31, r3 -/* 80D5C6AC 80 03 04 A0 */ lwz r0, 0x4a0(r3) -/* 80D5C6B0 54 00 07 39 */ rlwinm. r0, r0, 0, 0x1c, 0x1c -/* 80D5C6B4 40 82 00 1C */ bne lbl_80D5C6D0 -/* 80D5C6B8 28 1F 00 00 */ cmplwi r31, 0 -/* 80D5C6BC 41 82 00 08 */ beq lbl_80D5C6C4 -/* 80D5C6C0 4B 2B C4 A5 */ bl __ct__10fopAc_ac_cFv -lbl_80D5C6C4: -/* 80D5C6C4 80 1F 04 A0 */ lwz r0, 0x4a0(r31) -/* 80D5C6C8 60 00 00 08 */ ori r0, r0, 8 -/* 80D5C6CC 90 1F 04 A0 */ stw r0, 0x4a0(r31) -lbl_80D5C6D0: -/* 80D5C6D0 80 1F 00 B0 */ lwz r0, 0xb0(r31) -/* 80D5C6D4 54 00 C6 3E */ rlwinm r0, r0, 0x18, 0x18, 0x1f -/* 80D5C6D8 90 1F 05 68 */ stw r0, 0x568(r31) -/* 80D5C6DC 80 1F 00 B0 */ lwz r0, 0xb0(r31) -/* 80D5C6E0 54 00 06 3E */ clrlwi r0, r0, 0x18 -/* 80D5C6E4 90 1F 05 6C */ stw r0, 0x56c(r31) -/* 80D5C6E8 38 00 00 05 */ li r0, 5 -/* 80D5C6EC B0 1F 05 70 */ sth r0, 0x570(r31) -/* 80D5C6F0 38 60 00 04 */ li r3, 4 -/* 80D5C6F4 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 80D5C6F8 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80D5C6FC 7C 08 03 A6 */ mtlr r0 -/* 80D5C700 38 21 00 10 */ addi r1, r1, 0x10 -/* 80D5C704 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/daTagMyna2_Create__FP10fopAc_ac_c.s b/asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/daTagMyna2_Create__FP10fopAc_ac_c.s deleted file mode 100644 index 59d19ab6a96..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/daTagMyna2_Create__FP10fopAc_ac_c.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_80D5C9A8: -/* 80D5C9A8 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80D5C9AC 7C 08 02 A6 */ mflr r0 -/* 80D5C9B0 90 01 00 14 */ stw r0, 0x14(r1) -/* 80D5C9B4 4B FF FC E5 */ bl create__12daTagMyna2_cFv -/* 80D5C9B8 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80D5C9BC 7C 08 03 A6 */ mtlr r0 -/* 80D5C9C0 38 21 00 10 */ addi r1, r1, 0x10 -/* 80D5C9C4 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/daTagMyna2_Delete__FP12daTagMyna2_c.s b/asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/daTagMyna2_Delete__FP12daTagMyna2_c.s deleted file mode 100644 index daec3a88ced..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/daTagMyna2_Delete__FP12daTagMyna2_c.s +++ /dev/null @@ -1,14 +0,0 @@ -lbl_80D5C9E8: -/* 80D5C9E8 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80D5C9EC 7C 08 02 A6 */ mflr r0 -/* 80D5C9F0 90 01 00 14 */ stw r0, 0x14(r1) -/* 80D5C9F4 28 03 00 00 */ cmplwi r3, 0 -/* 80D5C9F8 41 82 00 0C */ beq lbl_80D5CA04 -/* 80D5C9FC 38 80 00 00 */ li r4, 0 -/* 80D5CA00 4B 2B C2 8D */ bl __dt__10fopAc_ac_cFv -lbl_80D5CA04: -/* 80D5CA04 38 60 00 01 */ li r3, 1 -/* 80D5CA08 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80D5CA0C 7C 08 03 A6 */ mtlr r0 -/* 80D5CA10 38 21 00 10 */ addi r1, r1, 0x10 -/* 80D5CA14 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/daTagMyna2_Execute__FP12daTagMyna2_c.s b/asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/daTagMyna2_Execute__FP12daTagMyna2_c.s deleted file mode 100644 index 21b0e152421..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/daTagMyna2_Execute__FP12daTagMyna2_c.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_80D5C9C8: -/* 80D5C9C8 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80D5C9CC 7C 08 02 A6 */ mflr r0 -/* 80D5C9D0 90 01 00 14 */ stw r0, 0x14(r1) -/* 80D5C9D4 4B FF FD 35 */ bl execute__12daTagMyna2_cFv -/* 80D5C9D8 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80D5C9DC 7C 08 03 A6 */ mtlr r0 -/* 80D5C9E0 38 21 00 10 */ addi r1, r1, 0x10 -/* 80D5C9E4 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/execute__12daTagMyna2_cFv.s b/asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/execute__12daTagMyna2_cFv.s deleted file mode 100644 index 9f2423ad233..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/execute__12daTagMyna2_cFv.s +++ /dev/null @@ -1,183 +0,0 @@ -lbl_80D5C708: -/* 80D5C708 94 21 FF B0 */ stwu r1, -0x50(r1) -/* 80D5C70C 7C 08 02 A6 */ mflr r0 -/* 80D5C710 90 01 00 54 */ stw r0, 0x54(r1) -/* 80D5C714 39 61 00 50 */ addi r11, r1, 0x50 -/* 80D5C718 4B 60 5A C1 */ bl _savegpr_28 -/* 80D5C71C 7C 7D 1B 78 */ mr r29, r3 -/* 80D5C720 3C 60 80 D6 */ lis r3, lit_3743@ha /* 0x80D5CA3C@ha */ -/* 80D5C724 3B C3 CA 3C */ addi r30, r3, lit_3743@l /* 0x80D5CA3C@l */ -/* 80D5C728 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80D5C72C 3B E3 61 C0 */ addi r31, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80D5C730 88 1F 4F AD */ lbz r0, 0x4fad(r31) -/* 80D5C734 28 00 00 00 */ cmplwi r0, 0 -/* 80D5C738 40 82 02 34 */ bne lbl_80D5C96C -/* 80D5C73C 7F E3 FB 78 */ mr r3, r31 -/* 80D5C740 80 9D 05 68 */ lwz r4, 0x568(r29) -/* 80D5C744 88 1D 04 E2 */ lbz r0, 0x4e2(r29) -/* 80D5C748 7C 05 07 74 */ extsb r5, r0 -/* 80D5C74C 4B 2D 8C 15 */ bl isSwitch__10dSv_info_cCFii -/* 80D5C750 2C 03 00 00 */ cmpwi r3, 0 -/* 80D5C754 40 82 02 18 */ bne lbl_80D5C96C -/* 80D5C758 38 61 00 20 */ addi r3, r1, 0x20 -/* 80D5C75C 3C 80 80 40 */ lis r4, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80D5C760 3B 84 61 C0 */ addi r28, r4, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80D5C764 80 9C 5D AC */ lwz r4, 0x5dac(r28) -/* 80D5C768 38 84 04 D0 */ addi r4, r4, 0x4d0 -/* 80D5C76C 38 BD 04 D0 */ addi r5, r29, 0x4d0 -/* 80D5C770 4B 50 A3 C5 */ bl __mi__4cXyzCFRC3Vec -/* 80D5C774 C0 01 00 20 */ lfs f0, 0x20(r1) -/* 80D5C778 D0 01 00 14 */ stfs f0, 0x14(r1) -/* 80D5C77C C0 1E 00 00 */ lfs f0, 0(r30) -/* 80D5C780 D0 01 00 18 */ stfs f0, 0x18(r1) -/* 80D5C784 C0 01 00 28 */ lfs f0, 0x28(r1) -/* 80D5C788 D0 01 00 1C */ stfs f0, 0x1c(r1) -/* 80D5C78C 38 61 00 14 */ addi r3, r1, 0x14 -/* 80D5C790 4B 5E A9 A9 */ bl PSVECSquareMag -/* 80D5C794 C0 1E 00 00 */ lfs f0, 0(r30) -/* 80D5C798 FC 01 00 40 */ fcmpo cr0, f1, f0 -/* 80D5C79C 40 81 00 58 */ ble lbl_80D5C7F4 -/* 80D5C7A0 FC 00 08 34 */ frsqrte f0, f1 -/* 80D5C7A4 C8 9E 00 08 */ lfd f4, 8(r30) -/* 80D5C7A8 FC 44 00 32 */ fmul f2, f4, f0 -/* 80D5C7AC C8 7E 00 10 */ lfd f3, 0x10(r30) -/* 80D5C7B0 FC 00 00 32 */ fmul f0, f0, f0 -/* 80D5C7B4 FC 01 00 32 */ fmul f0, f1, f0 -/* 80D5C7B8 FC 03 00 28 */ fsub f0, f3, f0 -/* 80D5C7BC FC 02 00 32 */ fmul f0, f2, f0 -/* 80D5C7C0 FC 44 00 32 */ fmul f2, f4, f0 -/* 80D5C7C4 FC 00 00 32 */ fmul f0, f0, f0 -/* 80D5C7C8 FC 01 00 32 */ fmul f0, f1, f0 -/* 80D5C7CC FC 03 00 28 */ fsub f0, f3, f0 -/* 80D5C7D0 FC 02 00 32 */ fmul f0, f2, f0 -/* 80D5C7D4 FC 44 00 32 */ fmul f2, f4, f0 -/* 80D5C7D8 FC 00 00 32 */ fmul f0, f0, f0 -/* 80D5C7DC FC 01 00 32 */ fmul f0, f1, f0 -/* 80D5C7E0 FC 03 00 28 */ fsub f0, f3, f0 -/* 80D5C7E4 FC 02 00 32 */ fmul f0, f2, f0 -/* 80D5C7E8 FC 21 00 32 */ fmul f1, f1, f0 -/* 80D5C7EC FC 20 08 18 */ frsp f1, f1 -/* 80D5C7F0 48 00 00 88 */ b lbl_80D5C878 -lbl_80D5C7F4: -/* 80D5C7F4 C8 1E 00 18 */ lfd f0, 0x18(r30) -/* 80D5C7F8 FC 01 00 40 */ fcmpo cr0, f1, f0 -/* 80D5C7FC 40 80 00 10 */ bge lbl_80D5C80C -/* 80D5C800 3C 60 80 45 */ lis r3, __float_nan@ha /* 0x80450AE0@ha */ -/* 80D5C804 C0 23 0A E0 */ lfs f1, __float_nan@l(r3) /* 0x80450AE0@l */ -/* 80D5C808 48 00 00 70 */ b lbl_80D5C878 -lbl_80D5C80C: -/* 80D5C80C D0 21 00 08 */ stfs f1, 8(r1) -/* 80D5C810 80 81 00 08 */ lwz r4, 8(r1) -/* 80D5C814 54 83 00 50 */ rlwinm r3, r4, 0, 1, 8 -/* 80D5C818 3C 00 7F 80 */ lis r0, 0x7f80 -/* 80D5C81C 7C 03 00 00 */ cmpw r3, r0 -/* 80D5C820 41 82 00 14 */ beq lbl_80D5C834 -/* 80D5C824 40 80 00 40 */ bge lbl_80D5C864 -/* 80D5C828 2C 03 00 00 */ cmpwi r3, 0 -/* 80D5C82C 41 82 00 20 */ beq lbl_80D5C84C -/* 80D5C830 48 00 00 34 */ b lbl_80D5C864 -lbl_80D5C834: -/* 80D5C834 54 80 02 7F */ clrlwi. r0, r4, 9 -/* 80D5C838 41 82 00 0C */ beq lbl_80D5C844 -/* 80D5C83C 38 00 00 01 */ li r0, 1 -/* 80D5C840 48 00 00 28 */ b lbl_80D5C868 -lbl_80D5C844: -/* 80D5C844 38 00 00 02 */ li r0, 2 -/* 80D5C848 48 00 00 20 */ b lbl_80D5C868 -lbl_80D5C84C: -/* 80D5C84C 54 80 02 7F */ clrlwi. r0, r4, 9 -/* 80D5C850 41 82 00 0C */ beq lbl_80D5C85C -/* 80D5C854 38 00 00 05 */ li r0, 5 -/* 80D5C858 48 00 00 10 */ b lbl_80D5C868 -lbl_80D5C85C: -/* 80D5C85C 38 00 00 03 */ li r0, 3 -/* 80D5C860 48 00 00 08 */ b lbl_80D5C868 -lbl_80D5C864: -/* 80D5C864 38 00 00 04 */ li r0, 4 -lbl_80D5C868: -/* 80D5C868 2C 00 00 01 */ cmpwi r0, 1 -/* 80D5C86C 40 82 00 0C */ bne lbl_80D5C878 -/* 80D5C870 3C 60 80 45 */ lis r3, __float_nan@ha /* 0x80450AE0@ha */ -/* 80D5C874 C0 23 0A E0 */ lfs f1, __float_nan@l(r3) /* 0x80450AE0@l */ -lbl_80D5C878: -/* 80D5C878 C0 5E 00 20 */ lfs f2, 0x20(r30) -/* 80D5C87C C0 1D 04 EC */ lfs f0, 0x4ec(r29) -/* 80D5C880 EC 02 00 32 */ fmuls f0, f2, f0 -/* 80D5C884 FC 01 00 40 */ fcmpo cr0, f1, f0 -/* 80D5C888 40 80 00 E4 */ bge lbl_80D5C96C -/* 80D5C88C 7F A3 EB 78 */ mr r3, r29 -/* 80D5C890 80 9C 5D AC */ lwz r4, 0x5dac(r28) -/* 80D5C894 4B 2B DE 7D */ bl fopAcM_searchActorAngleY__FPC10fopAc_ac_cPC10fopAc_ac_c -/* 80D5C898 7C 60 1B 78 */ mr r0, r3 -/* 80D5C89C 38 61 00 0C */ addi r3, r1, 0xc -/* 80D5C8A0 38 80 00 1E */ li r4, 0x1e -/* 80D5C8A4 7C 05 07 34 */ extsh r5, r0 -/* 80D5C8A8 38 C0 00 00 */ li r6, 0 -/* 80D5C8AC 4B 50 AB 49 */ bl __ct__5csXyzFsss -/* 80D5C8B0 C0 1D 04 D0 */ lfs f0, 0x4d0(r29) -/* 80D5C8B4 D0 01 00 2C */ stfs f0, 0x2c(r1) -/* 80D5C8B8 C0 3D 04 D4 */ lfs f1, 0x4d4(r29) -/* 80D5C8BC D0 21 00 30 */ stfs f1, 0x30(r1) -/* 80D5C8C0 C0 1D 04 D8 */ lfs f0, 0x4d8(r29) -/* 80D5C8C4 D0 01 00 34 */ stfs f0, 0x34(r1) -/* 80D5C8C8 C0 1E 00 24 */ lfs f0, 0x24(r30) -/* 80D5C8CC EC 01 00 2A */ fadds f0, f1, f0 -/* 80D5C8D0 D0 01 00 30 */ stfs f0, 0x30(r1) -/* 80D5C8D4 38 61 00 2C */ addi r3, r1, 0x2c -/* 80D5C8D8 4B 2C 13 E5 */ bl gndCheck__11fopAcM_gc_cFPC4cXyz -/* 80D5C8DC 54 60 06 3F */ clrlwi. r0, r3, 0x18 -/* 80D5C8E0 41 82 00 14 */ beq lbl_80D5C8F4 -/* 80D5C8E4 3C 60 80 45 */ lis r3, mGroundY__11fopAcM_gc_c@ha /* 0x80450CD0@ha */ -/* 80D5C8E8 C0 03 0C D0 */ lfs f0, mGroundY__11fopAcM_gc_c@l(r3) /* 0x80450CD0@l */ -/* 80D5C8EC D0 01 00 30 */ stfs f0, 0x30(r1) -/* 80D5C8F0 48 00 00 1C */ b lbl_80D5C90C -lbl_80D5C8F4: -/* 80D5C8F4 C0 1D 04 D0 */ lfs f0, 0x4d0(r29) -/* 80D5C8F8 D0 01 00 2C */ stfs f0, 0x2c(r1) -/* 80D5C8FC C0 1D 04 D4 */ lfs f0, 0x4d4(r29) -/* 80D5C900 D0 01 00 30 */ stfs f0, 0x30(r1) -/* 80D5C904 C0 1D 04 D8 */ lfs f0, 0x4d8(r29) -/* 80D5C908 D0 01 00 34 */ stfs f0, 0x34(r1) -lbl_80D5C90C: -/* 80D5C90C A8 1D 05 70 */ lha r0, 0x570(r29) -/* 80D5C910 2C 00 00 00 */ cmpwi r0, 0 -/* 80D5C914 40 82 00 58 */ bne lbl_80D5C96C -/* 80D5C918 38 60 02 86 */ li r3, 0x286 -/* 80D5C91C 80 1D 05 68 */ lwz r0, 0x568(r29) -/* 80D5C920 54 00 40 2E */ slwi r0, r0, 8 -/* 80D5C924 64 04 FF FF */ oris r4, r0, 0xffff -/* 80D5C928 60 84 00 01 */ ori r4, r4, 1 -/* 80D5C92C 38 A1 00 2C */ addi r5, r1, 0x2c -/* 80D5C930 88 1D 04 E2 */ lbz r0, 0x4e2(r29) -/* 80D5C934 7C 06 07 74 */ extsb r6, r0 -/* 80D5C938 38 E1 00 0C */ addi r7, r1, 0xc -/* 80D5C93C 39 00 00 00 */ li r8, 0 -/* 80D5C940 39 20 FF FF */ li r9, -1 -/* 80D5C944 4B 2B D4 55 */ bl fopAcM_create__FsUlPC4cXyziPC5csXyzPC4cXyzSc -/* 80D5C948 3C 03 00 01 */ addis r0, r3, 1 -/* 80D5C94C 28 00 FF FF */ cmplwi r0, 0xffff -/* 80D5C950 41 82 00 1C */ beq lbl_80D5C96C -/* 80D5C954 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80D5C958 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80D5C95C 80 9D 05 68 */ lwz r4, 0x568(r29) -/* 80D5C960 88 1D 04 E2 */ lbz r0, 0x4e2(r29) -/* 80D5C964 7C 05 07 74 */ extsb r5, r0 -/* 80D5C968 4B 2D 88 99 */ bl onSwitch__10dSv_info_cFii -lbl_80D5C96C: -/* 80D5C96C 88 1F 4F AD */ lbz r0, 0x4fad(r31) -/* 80D5C970 28 00 00 00 */ cmplwi r0, 0 -/* 80D5C974 41 82 00 10 */ beq lbl_80D5C984 -/* 80D5C978 38 00 00 05 */ li r0, 5 -/* 80D5C97C B0 1D 05 70 */ sth r0, 0x570(r29) -/* 80D5C980 48 00 00 0C */ b lbl_80D5C98C -lbl_80D5C984: -/* 80D5C984 38 7D 05 70 */ addi r3, r29, 0x570 -/* 80D5C988 48 00 00 91 */ bl func_80D5CA18 -lbl_80D5C98C: -/* 80D5C98C 38 60 00 01 */ li r3, 1 -/* 80D5C990 39 61 00 50 */ addi r11, r1, 0x50 -/* 80D5C994 4B 60 58 91 */ bl _restgpr_28 -/* 80D5C998 80 01 00 54 */ lwz r0, 0x54(r1) -/* 80D5C99C 7C 08 03 A6 */ mtlr r0 -/* 80D5C9A0 38 21 00 50 */ addi r1, r1, 0x50 -/* 80D5C9A4 4E 80 00 20 */ blr diff --git a/include/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint.h b/include/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint.h index 2d3a2fac604..1daa29ee7cb 100644 --- a/include/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint.h +++ b/include/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint.h @@ -1,6 +1,54 @@ #ifndef D_A_TAG_CHKPOINT_H #define D_A_TAG_CHKPOINT_H -#include "dolphin/types.h" +#include "f_op/f_op_actor_mng.h" +#include "d/com/d_com_inf_game.h" +#include "JSystem/JKernel/JKRHeap.h" + +class daTag_Chk_c : public fopAc_ac_c { +public: + /* 8048A6F8 */ s32 execute(); + + u16 getAreaType() { return orig.angle.z & 0x100; } + u16 getHeight() { return fopAcM_GetParam(this) & 0xff; } + u8 getSwBit() { return fopAcM_GetParam(this) >> 8; } + u8 getSwBit2() { return fopAcM_GetParam(this) >> 16; } + + s32 create() { + if (!fopAcM_CheckCondition(this, 8)) { + new (this) daTag_Chk_c(); + fopAcM_OnCondition(this, 8); + } + + if (getAreaType() == 0) { + mScale.x *= 50.0f; + mScale.y *= 100.0f; + mScale.z *= 50.0f; + + mPos1.set(current.pos.x - mScale.x, current.pos.y, current.pos.z - mScale.z); + mPos2.set(current.pos.x + mScale.x, current.pos.y + mScale.y, current.pos.z + mScale.z); + } else { + mScale.x *= 100.0f; + mScale.y *= 100.0f; + mScale.z *= 0.0f; + + mPos1.set(0.0f, current.pos.y, 0.0f); + mPos2.set(0.0f, current.pos.y + mScale.y, 0.0f); + } + + mAttentionInfo.mPosition = current.pos; + + u16 l_height = getHeight(); + l_height != 0xff ? mAttentionInfo.mPosition.y += l_height * 10.0f : mAttentionInfo.mPosition.y += mScale.y * 0.5f; + + mEyePos = mAttentionInfo.mPosition; + return cPhs_COMPLEATE_e; + } +private: + /* 0x568 */ u8 field_0x568[8]; + /* 0x570 */ cXyz mPos1; + /* 0x57C */ cXyz mPos2; +}; +STATIC_ASSERT(sizeof(daTag_Chk_c) == 0x588); #endif /* D_A_TAG_CHKPOINT_H */ diff --git a/include/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2.h b/include/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2.h index ace6a1dfef0..288f84e1c5b 100644 --- a/include/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2.h +++ b/include/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2.h @@ -1,6 +1,23 @@ #ifndef D_A_TAG_MYNA2_H #define D_A_TAG_MYNA2_H -#include "dolphin/types.h" +#include "f_op/f_op_actor_mng.h" +#include "d/com/d_com_inf_game.h" + +class daTagMyna2_c : public fopAc_ac_c { +public: + /* 80D5C698 */ s32 create(); + /* 80D5C708 */ s32 execute(); + + u8 getSwBit() { return fopAcM_GetParam(this) >> 8; } + u8 getMode() { return fopAcM_GetParam(this); } + f32 getExtent() { return mScale.x * 100.0f;} + +private: + /* 0x568 */ u32 mSwitchNo; + /* 0x56C */ u32 mMode; + /* 0x570 */ s16 mTimer; +}; +STATIC_ASSERT(sizeof(daTagMyna2_c) == 0x574); #endif /* D_A_TAG_MYNA2_H */ diff --git a/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint.cpp b/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint.cpp index 57ea3e322cf..3c0976258f1 100644 --- a/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint.cpp +++ b/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint.cpp @@ -1,34 +1,13 @@ -// -// Generated By: dol2asm -// Translation Unit: d_a_tag_chkpoint -// +/** + * d_a_tag_chkpoint.cpp + * + */ #include "rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint.h" #include "dol2asm.h" #include "dolphin/types.h" - -// -// Types: -// - -struct fopAc_ac_c { - /* 80018B64 */ fopAc_ac_c(); - /* 80018C8C */ ~fopAc_ac_c(); -}; - -struct daTag_Chk_c { - /* 8048A6F8 */ void execute(); -}; - -struct cXyz {}; - -struct daPy_py_c { - /* 8015F4F0 */ void setLookPos(cXyz*); -}; - -struct dSv_info_c { - /* 80035360 */ void isSwitch(int, int) const; -}; +#include "d/d_procname.h" +#include "d/a/d_a_player.h" // // Forward References: @@ -40,7 +19,7 @@ extern "C" static void daTag_Chk_Execute__FP11daTag_Chk_c(); extern "C" static bool daTag_Chk_IsDelete__FP11daTag_Chk_c(); extern "C" static void daTag_Chk_Delete__FP11daTag_Chk_c(); extern "C" static void daTag_Chk_Create__FP10fopAc_ac_c(); -extern "C" extern void* g_profile_TAG_CHKPOINT[12]; +// extern "C" extern void* g_profile_TAG_CHKPOINT[12]; // // External References: @@ -52,11 +31,6 @@ extern "C" void isSwitch__10dSv_info_cCFii(); extern "C" void setLookPos__9daPy_py_cFP4cXyz(); extern "C" void _savegpr_29(); extern "C" void _restgpr_29(); -extern "C" extern void* g_fopAc_Method[8]; -extern "C" extern void* g_fpcLf_Method[5 + 1 /* padding */]; -extern "C" extern u8 g_dComIfG_gameInfo[122384]; -extern "C" extern u32 __float_nan; -extern "C" extern u8 mStayNo__20dStage_roomControl_c[4]; // // Declarations: @@ -121,47 +95,105 @@ COMPILER_STRIP_GATE(0x8048AC48, &lit_3846); #pragma pop /* 8048A6F8-8048A9EC 000078 02F4+00 1/1 0/0 0/0 .text execute__11daTag_Chk_cFv */ +#ifdef NONMATCHING +// still lots wrong here +s32 daTag_Chk_c::execute() { + int iVar12; + bool bVar6; + u32 local_64; + u32 local_60; + u32 local_5c; + + s32 l_roomNo = fopAcM_GetRoomNo(this); + s32 l_stayNo = dComIfGp_roomControl_getStayNo(); + + if (l_roomNo == l_stayNo) { + local_64 = 0x1010000; + local_60 = 0x101; + local_5c = 0; + + u8 l_swBit = getSwBit(); + if (l_swBit == -1) { + l_stayNo = 0; + } else { + l_roomNo = fopAcM_GetRoomNo(this); + l_stayNo = dComIfGs_isSwitch(l_swBit,l_roomNo); + + if (l_stayNo == 0) { + l_stayNo = 2; + } else { + l_stayNo = 1; + } + } + + l_swBit = getSwBit2(); + + if (l_swBit == -1) { + iVar12 = 0; + } else { + l_roomNo = fopAcM_GetRoomNo(this); + l_stayNo = dComIfGs_isSwitch(l_swBit,l_roomNo); + + if (l_stayNo == 0) { + l_stayNo = 2; + } else { + l_stayNo = 1; + } + } + + bVar6 = false; + + if (true) { + daPy_py_c* link = dComIfGp_getLinkPlayer(); + u16 areaType = getAreaType(); + } + + mAttentionInfo.mFlags = 0; + + if (bVar6) { + daPy_py_c::setLookPos(&mAttentionInfo.mPosition); + mAttentionInfo.mFlags = 0x1000; + } + + return 1; + } + return 0; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daTag_Chk_c::execute() { +asm s32 daTag_Chk_c::execute() { nofralloc #include "asm/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint/execute__11daTag_Chk_cFv.s" } #pragma pop +#endif /* 8048A9EC-8048A9F4 00036C 0008+00 1/0 0/0 0/0 .text daTag_Chk_Draw__FP11daTag_Chk_c */ -static bool daTag_Chk_Draw(daTag_Chk_c* param_0) { - return true; +static s32 daTag_Chk_Draw(daTag_Chk_c* i_this) { + return 1; } /* 8048A9F4-8048AA18 000374 0024+00 1/0 0/0 0/0 .text daTag_Chk_Execute__FP11daTag_Chk_c */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daTag_Chk_Execute(daTag_Chk_c* param_0) { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint/daTag_Chk_Execute__FP11daTag_Chk_c.s" +static s32 daTag_Chk_Execute(daTag_Chk_c* i_this) { + i_this->execute(); + return 1; } -#pragma pop /* 8048AA18-8048AA20 000398 0008+00 1/0 0/0 0/0 .text daTag_Chk_IsDelete__FP11daTag_Chk_c */ -static bool daTag_Chk_IsDelete(daTag_Chk_c* param_0) { - return true; +static s32 daTag_Chk_IsDelete(daTag_Chk_c* i_this) { + return 1; } /* 8048AA20-8048AA50 0003A0 0030+00 1/0 0/0 0/0 .text daTag_Chk_Delete__FP11daTag_Chk_c */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daTag_Chk_Delete(daTag_Chk_c* param_0) { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint/daTag_Chk_Delete__FP11daTag_Chk_c.s" +static s32 daTag_Chk_Delete(daTag_Chk_c* i_this) { + i_this->~daTag_Chk_c(); + return 1; } -#pragma pop /* ############################################################################################## */ /* 8048AC50-8048AC54 000028 0004+00 0/1 0/0 0/0 .rodata @3925 */ @@ -202,34 +234,46 @@ COMPILER_STRIP_GATE(0x8048AC60, &lit_3930); #pragma pop /* 8048AA50-8048AC20 0003D0 01D0+00 1/0 0/0 0/0 .text daTag_Chk_Create__FP10fopAc_ac_c */ +#ifdef NONMATCHING +// literals +static s32 daTag_Chk_Create(fopAc_ac_c* i_this) { + return static_cast(i_this)->create(); +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -static asm void daTag_Chk_Create(fopAc_ac_c* param_0) { +static asm s32 daTag_Chk_Create(fopAc_ac_c* i_this) { nofralloc #include "asm/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint/daTag_Chk_Create__FP10fopAc_ac_c.s" } #pragma pop +#endif /* ############################################################################################## */ /* 8048AC68-8048AC88 -00001 0020+00 1/0 0/0 0/0 .data l_daTag_Chk_Method */ -SECTION_DATA static void* l_daTag_Chk_Method[8] = { - (void*)daTag_Chk_Create__FP10fopAc_ac_c, - (void*)daTag_Chk_Delete__FP11daTag_Chk_c, - (void*)daTag_Chk_Execute__FP11daTag_Chk_c, - (void*)daTag_Chk_IsDelete__FP11daTag_Chk_c, - (void*)daTag_Chk_Draw__FP11daTag_Chk_c, - (void*)NULL, - (void*)NULL, - (void*)NULL, +static actor_method_class l_daTag_Chk_Method = { + (process_method_func)daTag_Chk_Create, + (process_method_func)daTag_Chk_Delete, + (process_method_func)daTag_Chk_Execute, + (process_method_func)daTag_Chk_IsDelete, + (process_method_func)daTag_Chk_Draw }; /* 8048AC88-8048ACB8 -00001 0030+00 0/0 0/0 1/0 .data g_profile_TAG_CHKPOINT */ -SECTION_DATA extern void* g_profile_TAG_CHKPOINT[12] = { - (void*)0xFFFFFFFD, (void*)0x0007FFFD, - (void*)0x02D00000, (void*)&g_fpcLf_Method, - (void*)0x00000588, (void*)NULL, - (void*)NULL, (void*)&g_fopAc_Method, - (void*)0x01180000, (void*)&l_daTag_Chk_Method, - (void*)0x00044000, (void*)0x00060000, -}; +extern actor_process_profile_definition g_profile_TAG_CHKPOINT = { + -3, // mLayerID + 7, // mListID + -3, // mListPrio + PROC_TAG_CHKPOINT, // mProcName + &g_fpcLf_Method.mBase, // mSubMtd + sizeof(daTag_Chk_c), // mSize + 0, // mSizeOther + 0, // mParameters + &g_fopAc_Method.base, // mSubMtd + 0x0118, // mPriority + &l_daTag_Chk_Method, // mSubMtd + 0x00044000, // mStatus + 0, // mActorType + 6 // mCullType +}; \ No newline at end of file diff --git a/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2.cpp b/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2.cpp index 14866140461..30bf8f3c9ec 100644 --- a/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2.cpp +++ b/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2.cpp @@ -1,198 +1,88 @@ -// -// Generated By: dol2asm -// Translation Unit: d_a_tag_myna2 -// +/** + * @file d_a_tag_myna2.cpp + * @brief Tag - Creates Plumm's actor. + */ #include "rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2.h" -#include "dol2asm.h" -#include "dolphin/types.h" +#include "JSystem/JKernel/JKRHeap.h" +#include "d/d_procname.h" -// -// Types: -// - -struct fopAc_ac_c { - /* 80018B64 */ fopAc_ac_c(); - /* 80018C8C */ ~fopAc_ac_c(); -}; - -struct Vec {}; - -struct cXyz { - /* 80266B34 */ void operator-(Vec const&) const; -}; - -struct fopAcM_gc_c { - /* 8001DCBC */ void gndCheck(cXyz const*); - - static f32 mGroundY; -}; - -struct daTagMyna2_c { - /* 80D5C698 */ void create(); - /* 80D5C708 */ void execute(); -}; - -struct dSv_info_c { - /* 80035200 */ void onSwitch(int, int); - /* 80035360 */ void isSwitch(int, int) const; -}; - -struct csXyz { - /* 802673F4 */ csXyz(s16, s16, s16); -}; - -// -// Forward References: -// - -extern "C" void create__12daTagMyna2_cFv(); -extern "C" void execute__12daTagMyna2_cFv(); -extern "C" static void daTagMyna2_Create__FP10fopAc_ac_c(); -extern "C" static void daTagMyna2_Execute__FP12daTagMyna2_c(); -extern "C" static void daTagMyna2_Delete__FP12daTagMyna2_c(); -extern "C" void func_80D5CA18(void* _this, s16*); -extern "C" extern void* g_profile_TAG_MYNA2[12]; - -// -// External References: -// - -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void __dt__10fopAc_ac_cFv(); -extern "C" void fopAcM_create__FsUlPC4cXyziPC5csXyzPC4cXyzSc(); -extern "C" void fopAcM_searchActorAngleY__FPC10fopAc_ac_cPC10fopAc_ac_c(); -extern "C" void gndCheck__11fopAcM_gc_cFPC4cXyz(); -extern "C" void onSwitch__10dSv_info_cFii(); -extern "C" void isSwitch__10dSv_info_cCFii(); -extern "C" void __mi__4cXyzCFRC3Vec(); -extern "C" void __ct__5csXyzFsss(); -extern "C" void PSVECSquareMag(); -extern "C" void _savegpr_28(); -extern "C" void _restgpr_28(); -extern "C" extern void* g_fopAc_Method[8]; -extern "C" extern void* g_fpcLf_Method[5 + 1 /* padding */]; -extern "C" extern u8 g_dComIfG_gameInfo[122384]; -extern "C" extern u32 __float_nan; -extern "C" f32 mGroundY__11fopAcM_gc_c; - -// -// Declarations: -// +// clib_calcTimer +extern "C" void func_80D5CA18(s16*); /* 80D5C698-80D5C708 000078 0070+00 1/1 0/0 0/0 .text create__12daTagMyna2_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daTagMyna2_c::create() { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/create__12daTagMyna2_cFv.s" +s32 daTagMyna2_c::create() { + if (!fopAcM_CheckCondition(this, 8)) { + new (this) daTagMyna2_c(); + fopAcM_OnCondition(this, 8); + } + mSwitchNo = getSwBit(); + mMode = getMode(); + mTimer = 5; + return cPhs_COMPLEATE_e; } -#pragma pop - -/* ############################################################################################## */ -/* 80D5CA3C-80D5CA44 000000 0004+04 1/1 0/0 0/0 .rodata @3743 */ -SECTION_RODATA static u8 const lit_3743[4 + 4 /* padding */] = { - 0x00, - 0x00, - 0x00, - 0x00, - /* padding */ - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x80D5CA3C, &lit_3743); - -/* 80D5CA44-80D5CA4C 000008 0008+00 0/1 0/0 0/0 .rodata @3744 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_3744[8] = { - 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80D5CA44, &lit_3744); -#pragma pop - -/* 80D5CA4C-80D5CA54 000010 0008+00 0/1 0/0 0/0 .rodata @3745 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_3745[8] = { - 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80D5CA4C, &lit_3745); -#pragma pop - -/* 80D5CA54-80D5CA5C 000018 0008+00 0/1 0/0 0/0 .rodata @3746 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_3746[8] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80D5CA54, &lit_3746); -#pragma pop - -/* 80D5CA5C-80D5CA60 000020 0004+00 0/1 0/0 0/0 .rodata @3747 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3747 = 100.0f; -COMPILER_STRIP_GATE(0x80D5CA5C, &lit_3747); -#pragma pop - -/* 80D5CA60-80D5CA64 000024 0004+00 0/1 0/0 0/0 .rodata @3748 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3748 = 1000.0f; -COMPILER_STRIP_GATE(0x80D5CA60, &lit_3748); -#pragma pop /* 80D5C708-80D5C9A8 0000E8 02A0+00 1/1 0/0 0/0 .text execute__12daTagMyna2_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daTagMyna2_c::execute() { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/execute__12daTagMyna2_cFv.s" +s32 daTagMyna2_c::execute() { + if (!i_dComIfGp_event_runCheck()) { + if (!dComIfGs_isSwitch(mSwitchNo,fopAcM_GetRoomNo(this))) { + if ((dComIfGp_getPlayer(0)->current.pos - current.pos).absXZ() < getExtent()) { + s16 angle_y = (s16)fopAcM_searchPlayerAngleY(this); + csXyz actor_angle(0x1e,angle_y,0); + cXyz actor_pos = current.pos; + actor_pos.y += 1000.0f; + + if (fopAcM_gc_c::gndCheck(&actor_pos) != 0) { + actor_pos.y = fopAcM_gc_c::getGroundY(); + } else { + actor_pos = current.pos; + } + + if (mTimer == 0) { + s32 actor_create = fopAcM_create(PROC_MYNA2, (mSwitchNo << 8 | 0xffff0001), &actor_pos, fopAcM_GetRoomNo(this), &actor_angle, 0, 0xffffffff); + + if (actor_create != 0xFFFFFFFF) { + dComIfGs_onSwitch(mSwitchNo,fopAcM_GetRoomNo(this)); + } + } + } + } + } + + if (i_dComIfGp_event_runCheck()) { + mTimer = 5; + } else { + // func_80D5CA18 is clib_calcTimer. + // It should be compiler generated, but it causes matching issues currently. + func_80D5CA18(&mTimer); + } + + return 1; } -#pragma pop /* 80D5C9A8-80D5C9C8 000388 0020+00 1/0 0/0 0/0 .text daTagMyna2_Create__FP10fopAc_ac_c */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daTagMyna2_Create(fopAc_ac_c* param_0) { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/daTagMyna2_Create__FP10fopAc_ac_c.s" +static s32 daTagMyna2_Create(fopAc_ac_c* i_this) { + return static_cast(i_this)->create(); } -#pragma pop /* 80D5C9C8-80D5C9E8 0003A8 0020+00 1/0 0/0 0/0 .text daTagMyna2_Execute__FP12daTagMyna2_c */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daTagMyna2_Execute(daTagMyna2_c* param_0) { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/daTagMyna2_Execute__FP12daTagMyna2_c.s" +static s32 daTagMyna2_Execute(daTagMyna2_c* i_this) { + return i_this->execute(); } -#pragma pop /* 80D5C9E8-80D5CA18 0003C8 0030+00 1/0 0/0 0/0 .text daTagMyna2_Delete__FP12daTagMyna2_c */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daTagMyna2_Delete(daTagMyna2_c* param_0) { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/daTagMyna2_Delete__FP12daTagMyna2_c.s" +static s32 daTagMyna2_Delete(daTagMyna2_c* i_this) { + i_this->~daTagMyna2_c(); + return 1; } -#pragma pop /* 80D5CA18-80D5CA34 0003F8 001C+00 1/1 0/0 0/0 .text cLib_calcTimer__FPs */ #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -extern "C" asm void func_80D5CA18(void* _this, s16* param_0) { +extern "C" asm void func_80D5CA18(s16* param_0) { nofralloc #include "asm/rel/d/a/tag/d_a_tag_myna2/d_a_tag_myna2/func_80D5CA18.s" } @@ -200,23 +90,26 @@ extern "C" asm void func_80D5CA18(void* _this, s16* param_0) { /* ############################################################################################## */ /* 80D5CA64-80D5CA84 -00001 0020+00 1/0 0/0 0/0 .data l_daTagMyna2_Method */ -SECTION_DATA static void* l_daTagMyna2_Method[8] = { - (void*)daTagMyna2_Create__FP10fopAc_ac_c, - (void*)daTagMyna2_Delete__FP12daTagMyna2_c, - (void*)daTagMyna2_Execute__FP12daTagMyna2_c, - (void*)NULL, - (void*)NULL, - (void*)NULL, - (void*)NULL, - (void*)NULL, +static actor_method_class l_daTagMyna2_Method = { + (process_method_func)daTagMyna2_Create, + (process_method_func)daTagMyna2_Delete, + (process_method_func)daTagMyna2_Execute, }; /* 80D5CA84-80D5CAB4 -00001 0030+00 0/0 0/0 1/0 .data g_profile_TAG_MYNA2 */ -SECTION_DATA extern void* g_profile_TAG_MYNA2[12] = { - (void*)0xFFFFFFFD, (void*)0x0007FFFD, - (void*)0x02870000, (void*)&g_fpcLf_Method, - (void*)0x00000574, (void*)NULL, - (void*)NULL, (void*)&g_fopAc_Method, - (void*)0x018A0000, (void*)&l_daTagMyna2_Method, - (void*)0x00044000, (void*)0x000E0000, +extern actor_process_profile_definition g_profile_TAG_MYNA2 = { + -3, // mLayerID + 7, // mListID + -3, // mListPrio + PROC_TAG_MYNA2, // mProcName + &g_fpcLf_Method.mBase, // mSubMtd + sizeof(daTagMyna2_c), // mSize + 0, // mSizeOther + 0, // mParameters + &g_fopAc_Method.base, // mSubMtd + 0x0000018A, // mPriority + &l_daTagMyna2_Method, // mSubMtd + 0x00044000, // mStatus + 0, // mActorType + 0xE // mCullType };