From c2fbd42c21b99e7da5ca8ff9bd60a09e332e798a Mon Sep 17 00:00:00 2001 From: hev7 <143887945+hev7@users.noreply.github.com> Date: Thu, 23 Nov 2023 10:00:57 +0000 Subject: [PATCH] d_a_tag_Lv6Gate almost matching (#1990) --- Progress.md | 8 +- .../d_a_tag_Lv6Gate/__dt__12J3DFrameCtrlFv.s | 20 - .../d_a_tag_Lv6Gate/__dt__4dBgWFv.s | 26 - .../createHeap__14daTagLv6Gate_cFv.s | 186 ----- .../createSolidHeap__FP10fopAc_ac_c.s | 9 - .../create__14daTagLv6Gate_cFv.s | 167 ---- .../daTagLv6Gate_Create__FP10fopAc_ac_c.s | 9 - .../daTagLv6Gate_Delete__FP14daTagLv6Gate_c.s | 48 -- .../daTagLv6Gate_Draw__FP14daTagLv6Gate_c.s | 9 - ...daTagLv6Gate_Execute__FP14daTagLv6Gate_c.s | 9 - .../draw__14daTagLv6Gate_cFv.s | 107 --- .../d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate.h | 35 +- .../d/a/tag/d_a_tag_Lv7Gate/d_a_tag_Lv7Gate.h | 36 +- .../a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate.cpp | 775 ++++++++---------- .../a/tag/d_a_tag_Lv7Gate/d_a_tag_Lv7Gate.cpp | 30 +- 15 files changed, 428 insertions(+), 1046 deletions(-) delete mode 100644 asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/__dt__12J3DFrameCtrlFv.s delete mode 100644 asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/__dt__4dBgWFv.s delete mode 100644 asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/createHeap__14daTagLv6Gate_cFv.s delete mode 100644 asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/createSolidHeap__FP10fopAc_ac_c.s delete mode 100644 asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/create__14daTagLv6Gate_cFv.s delete mode 100644 asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Create__FP10fopAc_ac_c.s delete mode 100644 asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Delete__FP14daTagLv6Gate_c.s delete mode 100644 asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Draw__FP14daTagLv6Gate_c.s delete mode 100644 asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Execute__FP14daTagLv6Gate_c.s delete mode 100644 asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/draw__14daTagLv6Gate_cFv.s diff --git a/Progress.md b/Progress.md index a6a6d5ecf7b..aeb38f7a578 100644 --- a/Progress.md +++ b/Progress.md @@ -21,8 +21,8 @@ Total | 42.067495% | 1691396 | 4020672 Section | Percentage | Decompiled (bytes) | Total (bytes) ---|---|---|--- main.dol | 42.067495% | 1691396 | 4020672 -RELs | 34.948337% | 4019172 | 11500324 -Total | 36.792536% | 5710568 | 15520996 +RELs | 34.967676% | 4021396 | 11500324 +Total | 36.806865% | 5712792 | 15520996 ## RELs @@ -704,7 +704,7 @@ d_a_swTime | 100.000000% | 1040 | 1040 d_a_swc00 | 43.087121% | 1820 | 4224 d_a_swhit0 | 35.577421% | 2748 | 7724 d_a_tag_CstaSw | 100.000000% | 2560 | 2560 -d_a_tag_Lv6Gate | 39.281576% | 2712 | 6904 +d_a_tag_Lv6Gate | 71.494786% | 4936 | 6904 d_a_tag_Lv7Gate | 100.000000% | 6296 | 6296 d_a_tag_Lv8Gate | 43.347193% | 1668 | 3848 d_a_tag_TWgate | 55.682049% | 10956 | 19676 @@ -785,4 +785,4 @@ d_a_vrbox2 | 44.907111% | 2804 | 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.948337% | 4019172 | 11500324 +Total | 34.967676% | 4021396 | 11500324 diff --git a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/__dt__12J3DFrameCtrlFv.s b/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/__dt__12J3DFrameCtrlFv.s deleted file mode 100644 index 461bf32559c..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/__dt__12J3DFrameCtrlFv.s +++ /dev/null @@ -1,20 +0,0 @@ -lbl_80D4FB70: -/* 80D4FB70 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80D4FB74 7C 08 02 A6 */ mflr r0 -/* 80D4FB78 90 01 00 14 */ stw r0, 0x14(r1) -/* 80D4FB7C 93 E1 00 0C */ stw r31, 0xc(r1) -/* 80D4FB80 7C 7F 1B 79 */ or. r31, r3, r3 -/* 80D4FB84 41 82 00 1C */ beq lbl_80D4FBA0 -/* 80D4FB88 3C A0 80 D5 */ lis r5, __vt__12J3DFrameCtrl@ha /* 0x80D50A1C@ha */ -/* 80D4FB8C 38 05 0A 1C */ addi r0, r5, __vt__12J3DFrameCtrl@l /* 0x80D50A1C@l */ -/* 80D4FB90 90 1F 00 00 */ stw r0, 0(r31) -/* 80D4FB94 7C 80 07 35 */ extsh. r0, r4 -/* 80D4FB98 40 81 00 08 */ ble lbl_80D4FBA0 -/* 80D4FB9C 4B 57 F1 A1 */ bl __dl__FPv -lbl_80D4FBA0: -/* 80D4FBA0 7F E3 FB 78 */ mr r3, r31 -/* 80D4FBA4 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 80D4FBA8 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80D4FBAC 7C 08 03 A6 */ mtlr r0 -/* 80D4FBB0 38 21 00 10 */ addi r1, r1, 0x10 -/* 80D4FBB4 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/__dt__4dBgWFv.s b/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/__dt__4dBgWFv.s deleted file mode 100644 index 9b1b0f5cbbe..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/__dt__4dBgWFv.s +++ /dev/null @@ -1,26 +0,0 @@ -lbl_80D4FE5C: -/* 80D4FE5C 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80D4FE60 7C 08 02 A6 */ mflr r0 -/* 80D4FE64 90 01 00 14 */ stw r0, 0x14(r1) -/* 80D4FE68 93 E1 00 0C */ stw r31, 0xc(r1) -/* 80D4FE6C 93 C1 00 08 */ stw r30, 8(r1) -/* 80D4FE70 7C 7E 1B 79 */ or. r30, r3, r3 -/* 80D4FE74 7C 9F 23 78 */ mr r31, r4 -/* 80D4FE78 41 82 00 28 */ beq lbl_80D4FEA0 -/* 80D4FE7C 3C 80 80 3B */ lis r4, __vt__4dBgW@ha /* 0x803ABA80@ha */ -/* 80D4FE80 38 04 BA 80 */ addi r0, r4, __vt__4dBgW@l /* 0x803ABA80@l */ -/* 80D4FE84 90 1E 00 04 */ stw r0, 4(r30) -/* 80D4FE88 38 80 00 00 */ li r4, 0 -/* 80D4FE8C 4B 32 94 B1 */ bl __dt__4cBgWFv -/* 80D4FE90 7F E0 07 35 */ extsh. r0, r31 -/* 80D4FE94 40 81 00 0C */ ble lbl_80D4FEA0 -/* 80D4FE98 7F C3 F3 78 */ mr r3, r30 -/* 80D4FE9C 4B 57 EE A1 */ bl __dl__FPv -lbl_80D4FEA0: -/* 80D4FEA0 7F C3 F3 78 */ mr r3, r30 -/* 80D4FEA4 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 80D4FEA8 83 C1 00 08 */ lwz r30, 8(r1) -/* 80D4FEAC 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80D4FEB0 7C 08 03 A6 */ mtlr r0 -/* 80D4FEB4 38 21 00 10 */ addi r1, r1, 0x10 -/* 80D4FEB8 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/createHeap__14daTagLv6Gate_cFv.s b/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/createHeap__14daTagLv6Gate_cFv.s deleted file mode 100644 index 9de806dcfb8..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/createHeap__14daTagLv6Gate_cFv.s +++ /dev/null @@ -1,186 +0,0 @@ -lbl_80D4F8B8: -/* 80D4F8B8 94 21 FF D0 */ stwu r1, -0x30(r1) -/* 80D4F8BC 7C 08 02 A6 */ mflr r0 -/* 80D4F8C0 90 01 00 34 */ stw r0, 0x34(r1) -/* 80D4F8C4 39 61 00 30 */ addi r11, r1, 0x30 -/* 80D4F8C8 4B 61 29 0D */ bl _savegpr_27 -/* 80D4F8CC 7C 7D 1B 78 */ mr r29, r3 -/* 80D4F8D0 3C 60 80 D5 */ lis r3, l_arcName@ha /* 0x80D509C8@ha */ -/* 80D4F8D4 38 63 09 C8 */ addi r3, r3, l_arcName@l /* 0x80D509C8@l */ -/* 80D4F8D8 80 63 00 00 */ lwz r3, 0(r3) -/* 80D4F8DC 38 80 00 0F */ li r4, 0xf -/* 80D4F8E0 3C A0 80 40 */ lis r5, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80D4F8E4 38 A5 61 C0 */ addi r5, r5, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80D4F8E8 3F C5 00 02 */ addis r30, r5, 2 -/* 80D4F8EC 3B DE C2 F8 */ addi r30, r30, -15624 -/* 80D4F8F0 7F C5 F3 78 */ mr r5, r30 -/* 80D4F8F4 38 C0 00 80 */ li r6, 0x80 -/* 80D4F8F8 4B 2E C9 F5 */ bl getRes__14dRes_control_cFPCclP11dRes_info_ci -/* 80D4F8FC 7C 7F 1B 78 */ mr r31, r3 -/* 80D4F900 3C 80 00 08 */ lis r4, 8 -/* 80D4F904 3C A0 11 00 */ lis r5, 0x1100 /* 0x11000284@ha */ -/* 80D4F908 38 A5 02 84 */ addi r5, r5, 0x0284 /* 0x11000284@l */ -/* 80D4F90C 4B 2C 53 49 */ bl mDoExt_J3DModel__create__FP12J3DModelDataUlUl -/* 80D4F910 90 7D 05 68 */ stw r3, 0x568(r29) -/* 80D4F914 80 1D 05 68 */ lwz r0, 0x568(r29) -/* 80D4F918 28 00 00 00 */ cmplwi r0, 0 -/* 80D4F91C 40 82 00 0C */ bne lbl_80D4F928 -/* 80D4F920 38 60 00 00 */ li r3, 0 -/* 80D4F924 48 00 02 34 */ b lbl_80D4FB58 -lbl_80D4F928: -/* 80D4F928 3C 60 80 D5 */ lis r3, l_arcName@ha /* 0x80D509C8@ha */ -/* 80D4F92C 38 63 09 C8 */ addi r3, r3, l_arcName@l /* 0x80D509C8@l */ -/* 80D4F930 80 63 00 00 */ lwz r3, 0(r3) -/* 80D4F934 38 80 00 13 */ li r4, 0x13 -/* 80D4F938 7F C5 F3 78 */ mr r5, r30 -/* 80D4F93C 38 C0 00 80 */ li r6, 0x80 -/* 80D4F940 4B 2E C9 AD */ bl getRes__14dRes_control_cFPCclP11dRes_info_ci -/* 80D4F944 7C 7B 1B 78 */ mr r27, r3 -/* 80D4F948 38 60 00 18 */ li r3, 0x18 -/* 80D4F94C 4B 57 F3 01 */ bl __nw__FUl -/* 80D4F950 7C 7C 1B 79 */ or. r28, r3, r3 -/* 80D4F954 41 82 00 20 */ beq lbl_80D4F974 -/* 80D4F958 3C 80 80 D5 */ lis r4, __vt__12J3DFrameCtrl@ha /* 0x80D50A1C@ha */ -/* 80D4F95C 38 04 0A 1C */ addi r0, r4, __vt__12J3DFrameCtrl@l /* 0x80D50A1C@l */ -/* 80D4F960 90 1C 00 00 */ stw r0, 0(r28) -/* 80D4F964 38 80 00 00 */ li r4, 0 -/* 80D4F968 4B 5D 8A 95 */ bl init__12J3DFrameCtrlFs -/* 80D4F96C 38 00 00 00 */ li r0, 0 -/* 80D4F970 90 1C 00 14 */ stw r0, 0x14(r28) -lbl_80D4F974: -/* 80D4F974 93 9D 05 70 */ stw r28, 0x570(r29) -/* 80D4F978 80 7D 05 70 */ lwz r3, 0x570(r29) -/* 80D4F97C 28 03 00 00 */ cmplwi r3, 0 -/* 80D4F980 41 82 00 30 */ beq lbl_80D4F9B0 -/* 80D4F984 38 9F 00 58 */ addi r4, r31, 0x58 -/* 80D4F988 7F 65 DB 78 */ mr r5, r27 -/* 80D4F98C 38 C0 00 01 */ li r6, 1 -/* 80D4F990 38 E0 00 00 */ li r7, 0 -/* 80D4F994 3D 00 80 D5 */ lis r8, lit_3757@ha /* 0x80D50920@ha */ -/* 80D4F998 C0 28 09 20 */ lfs f1, lit_3757@l(r8) /* 0x80D50920@l */ -/* 80D4F99C 39 00 00 00 */ li r8, 0 -/* 80D4F9A0 39 20 FF FF */ li r9, -1 -/* 80D4F9A4 4B 2B DC 99 */ bl init__13mDoExt_btkAnmFP16J3DMaterialTableP19J3DAnmTextureSRTKeyiifss -/* 80D4F9A8 2C 03 00 00 */ cmpwi r3, 0 -/* 80D4F9AC 40 82 00 0C */ bne lbl_80D4F9B8 -lbl_80D4F9B0: -/* 80D4F9B0 38 60 00 00 */ li r3, 0 -/* 80D4F9B4 48 00 01 A4 */ b lbl_80D4FB58 -lbl_80D4F9B8: -/* 80D4F9B8 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80D4F9BC 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80D4F9C0 80 1D 00 B0 */ lwz r0, 0xb0(r29) -/* 80D4F9C4 54 04 C6 3E */ rlwinm r4, r0, 0x18, 0x18, 0x1f -/* 80D4F9C8 88 1D 04 BA */ lbz r0, 0x4ba(r29) -/* 80D4F9CC 7C 05 07 74 */ extsb r5, r0 -/* 80D4F9D0 4B 2E 59 91 */ bl isSwitch__10dSv_info_cCFii -/* 80D4F9D4 2C 03 00 00 */ cmpwi r3, 0 -/* 80D4F9D8 41 82 00 30 */ beq lbl_80D4FA08 -/* 80D4F9DC 80 9D 05 70 */ lwz r4, 0x570(r29) -/* 80D4F9E0 A8 04 00 08 */ lha r0, 8(r4) -/* 80D4F9E4 3C 60 80 D5 */ lis r3, lit_3759@ha /* 0x80D50928@ha */ -/* 80D4F9E8 C8 23 09 28 */ lfd f1, lit_3759@l(r3) /* 0x80D50928@l */ -/* 80D4F9EC 6C 00 80 00 */ xoris r0, r0, 0x8000 -/* 80D4F9F0 90 01 00 0C */ stw r0, 0xc(r1) -/* 80D4F9F4 3C 00 43 30 */ lis r0, 0x4330 -/* 80D4F9F8 90 01 00 08 */ stw r0, 8(r1) -/* 80D4F9FC C8 01 00 08 */ lfd f0, 8(r1) -/* 80D4FA00 EC 00 08 28 */ fsubs f0, f0, f1 -/* 80D4FA04 D0 04 00 10 */ stfs f0, 0x10(r4) -lbl_80D4FA08: -/* 80D4FA08 3C 60 80 D5 */ lis r3, l_arcName@ha /* 0x80D509C8@ha */ -/* 80D4FA0C 38 63 09 C8 */ addi r3, r3, l_arcName@l /* 0x80D509C8@l */ -/* 80D4FA10 80 63 00 00 */ lwz r3, 0(r3) -/* 80D4FA14 38 80 00 14 */ li r4, 0x14 -/* 80D4FA18 7F C5 F3 78 */ mr r5, r30 -/* 80D4FA1C 38 C0 00 80 */ li r6, 0x80 -/* 80D4FA20 4B 2E C8 CD */ bl getRes__14dRes_control_cFPCclP11dRes_info_ci -/* 80D4FA24 7C 7B 1B 78 */ mr r27, r3 -/* 80D4FA28 38 60 00 18 */ li r3, 0x18 -/* 80D4FA2C 4B 57 F2 21 */ bl __nw__FUl -/* 80D4FA30 7C 7C 1B 79 */ or. r28, r3, r3 -/* 80D4FA34 41 82 00 20 */ beq lbl_80D4FA54 -/* 80D4FA38 3C 80 80 D5 */ lis r4, __vt__12J3DFrameCtrl@ha /* 0x80D50A1C@ha */ -/* 80D4FA3C 38 04 0A 1C */ addi r0, r4, __vt__12J3DFrameCtrl@l /* 0x80D50A1C@l */ -/* 80D4FA40 90 1C 00 00 */ stw r0, 0(r28) -/* 80D4FA44 38 80 00 00 */ li r4, 0 -/* 80D4FA48 4B 5D 89 B5 */ bl init__12J3DFrameCtrlFs -/* 80D4FA4C 38 00 00 00 */ li r0, 0 -/* 80D4FA50 90 1C 00 14 */ stw r0, 0x14(r28) -lbl_80D4FA54: -/* 80D4FA54 93 9D 05 74 */ stw r28, 0x574(r29) -/* 80D4FA58 80 7D 05 74 */ lwz r3, 0x574(r29) -/* 80D4FA5C 28 03 00 00 */ cmplwi r3, 0 -/* 80D4FA60 41 82 00 30 */ beq lbl_80D4FA90 -/* 80D4FA64 38 9F 00 58 */ addi r4, r31, 0x58 -/* 80D4FA68 7F 65 DB 78 */ mr r5, r27 -/* 80D4FA6C 38 C0 00 01 */ li r6, 1 -/* 80D4FA70 38 E0 00 02 */ li r7, 2 -/* 80D4FA74 3D 00 80 D5 */ lis r8, lit_3757@ha /* 0x80D50920@ha */ -/* 80D4FA78 C0 28 09 20 */ lfs f1, lit_3757@l(r8) /* 0x80D50920@l */ -/* 80D4FA7C 39 00 00 00 */ li r8, 0 -/* 80D4FA80 39 20 FF FF */ li r9, -1 -/* 80D4FA84 4B 2B DB B9 */ bl init__13mDoExt_btkAnmFP16J3DMaterialTableP19J3DAnmTextureSRTKeyiifss -/* 80D4FA88 2C 03 00 00 */ cmpwi r3, 0 -/* 80D4FA8C 40 82 00 0C */ bne lbl_80D4FA98 -lbl_80D4FA90: -/* 80D4FA90 38 60 00 00 */ li r3, 0 -/* 80D4FA94 48 00 00 C4 */ b lbl_80D4FB58 -lbl_80D4FA98: -/* 80D4FA98 3C 60 80 D5 */ lis r3, l_arcName@ha /* 0x80D509C8@ha */ -/* 80D4FA9C 38 63 09 C8 */ addi r3, r3, l_arcName@l /* 0x80D509C8@l */ -/* 80D4FAA0 80 63 00 00 */ lwz r3, 0(r3) -/* 80D4FAA4 38 80 00 10 */ li r4, 0x10 -/* 80D4FAA8 7F C5 F3 78 */ mr r5, r30 -/* 80D4FAAC 38 C0 00 80 */ li r6, 0x80 -/* 80D4FAB0 4B 2E C8 3D */ bl getRes__14dRes_control_cFPCclP11dRes_info_ci -/* 80D4FAB4 3C 80 00 08 */ lis r4, 8 -/* 80D4FAB8 3C A0 11 00 */ lis r5, 0x1100 /* 0x11000084@ha */ -/* 80D4FABC 38 A5 00 84 */ addi r5, r5, 0x0084 /* 0x11000084@l */ -/* 80D4FAC0 4B 2C 51 95 */ bl mDoExt_J3DModel__create__FP12J3DModelDataUlUl -/* 80D4FAC4 90 7D 05 6C */ stw r3, 0x56c(r29) -/* 80D4FAC8 80 1D 05 6C */ lwz r0, 0x56c(r29) -/* 80D4FACC 28 00 00 00 */ cmplwi r0, 0 -/* 80D4FAD0 40 82 00 0C */ bne lbl_80D4FADC -/* 80D4FAD4 38 60 00 00 */ li r3, 0 -/* 80D4FAD8 48 00 00 80 */ b lbl_80D4FB58 -lbl_80D4FADC: -/* 80D4FADC 3C 60 80 D5 */ lis r3, l_arcName@ha /* 0x80D509C8@ha */ -/* 80D4FAE0 38 63 09 C8 */ addi r3, r3, l_arcName@l /* 0x80D509C8@l */ -/* 80D4FAE4 80 63 00 00 */ lwz r3, 0(r3) -/* 80D4FAE8 38 80 00 1B */ li r4, 0x1b -/* 80D4FAEC 7F C5 F3 78 */ mr r5, r30 -/* 80D4FAF0 38 C0 00 80 */ li r6, 0x80 -/* 80D4FAF4 4B 2E C7 F9 */ bl getRes__14dRes_control_cFPCclP11dRes_info_ci -/* 80D4FAF8 7C 64 1B 78 */ mr r4, r3 -/* 80D4FAFC 38 7D 05 78 */ addi r3, r29, 0x578 -/* 80D4FB00 38 A0 00 01 */ li r5, 1 -/* 80D4FB04 38 DD 06 F8 */ addi r6, r29, 0x6f8 -/* 80D4FB08 4B 32 A4 31 */ bl Set__4cBgWFP6cBgD_tUlPA3_A4_f -/* 80D4FB0C 54 60 06 3F */ clrlwi. r0, r3, 0x18 -/* 80D4FB10 41 82 00 0C */ beq lbl_80D4FB1C -/* 80D4FB14 38 60 00 00 */ li r3, 0 -/* 80D4FB18 48 00 00 40 */ b lbl_80D4FB58 -lbl_80D4FB1C: -/* 80D4FB1C 3C 60 80 D5 */ lis r3, l_arcName@ha /* 0x80D509C8@ha */ -/* 80D4FB20 38 63 09 C8 */ addi r3, r3, l_arcName@l /* 0x80D509C8@l */ -/* 80D4FB24 80 63 00 00 */ lwz r3, 0(r3) -/* 80D4FB28 38 80 00 1C */ li r4, 0x1c -/* 80D4FB2C 7F C5 F3 78 */ mr r5, r30 -/* 80D4FB30 38 C0 00 80 */ li r6, 0x80 -/* 80D4FB34 4B 2E C7 B9 */ bl getRes__14dRes_control_cFPCclP11dRes_info_ci -/* 80D4FB38 7C 64 1B 78 */ mr r4, r3 -/* 80D4FB3C 38 7D 06 38 */ addi r3, r29, 0x638 -/* 80D4FB40 38 A0 00 01 */ li r5, 1 -/* 80D4FB44 38 DD 07 28 */ addi r6, r29, 0x728 -/* 80D4FB48 4B 32 A3 F1 */ bl Set__4cBgWFP6cBgD_tUlPA3_A4_f -/* 80D4FB4C 54 60 06 3E */ clrlwi r0, r3, 0x18 -/* 80D4FB50 7C 00 00 34 */ cntlzw r0, r0 -/* 80D4FB54 54 03 D9 7E */ srwi r3, r0, 5 -lbl_80D4FB58: -/* 80D4FB58 39 61 00 30 */ addi r11, r1, 0x30 -/* 80D4FB5C 4B 61 26 C5 */ bl _restgpr_27 -/* 80D4FB60 80 01 00 34 */ lwz r0, 0x34(r1) -/* 80D4FB64 7C 08 03 A6 */ mtlr r0 -/* 80D4FB68 38 21 00 30 */ addi r1, r1, 0x30 -/* 80D4FB6C 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/createSolidHeap__FP10fopAc_ac_c.s b/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/createSolidHeap__FP10fopAc_ac_c.s deleted file mode 100644 index ae528b590ee..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/createSolidHeap__FP10fopAc_ac_c.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_80D4F898: -/* 80D4F898 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80D4F89C 7C 08 02 A6 */ mflr r0 -/* 80D4F8A0 90 01 00 14 */ stw r0, 0x14(r1) -/* 80D4F8A4 48 00 00 15 */ bl createHeap__14daTagLv6Gate_cFv -/* 80D4F8A8 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80D4F8AC 7C 08 03 A6 */ mtlr r0 -/* 80D4F8B0 38 21 00 10 */ addi r1, r1, 0x10 -/* 80D4F8B4 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/create__14daTagLv6Gate_cFv.s b/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/create__14daTagLv6Gate_cFv.s deleted file mode 100644 index d56af8565a2..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/create__14daTagLv6Gate_cFv.s +++ /dev/null @@ -1,167 +0,0 @@ -lbl_80D4FBD8: -/* 80D4FBD8 94 21 FF D0 */ stwu r1, -0x30(r1) -/* 80D4FBDC 7C 08 02 A6 */ mflr r0 -/* 80D4FBE0 90 01 00 34 */ stw r0, 0x34(r1) -/* 80D4FBE4 39 61 00 30 */ addi r11, r1, 0x30 -/* 80D4FBE8 4B 61 25 F5 */ bl _savegpr_29 -/* 80D4FBEC 7C 7F 1B 78 */ mr r31, r3 -/* 80D4FBF0 3C 80 80 D5 */ lis r4, l_minRelative@ha /* 0x80D50908@ha */ -/* 80D4FBF4 3B C4 09 08 */ addi r30, r4, l_minRelative@l /* 0x80D50908@l */ -/* 80D4FBF8 80 03 04 A0 */ lwz r0, 0x4a0(r3) -/* 80D4FBFC 54 00 07 39 */ rlwinm. r0, r0, 0, 0x1c, 0x1c -/* 80D4FC00 40 82 00 40 */ bne lbl_80D4FC40 -/* 80D4FC04 7F E0 FB 79 */ or. r0, r31, r31 -/* 80D4FC08 41 82 00 2C */ beq lbl_80D4FC34 -/* 80D4FC0C 7C 1D 03 78 */ mr r29, r0 -/* 80D4FC10 4B 2C 8F 55 */ bl __ct__10fopAc_ac_cFv -/* 80D4FC14 38 7D 05 78 */ addi r3, r29, 0x578 -/* 80D4FC18 3C 80 80 08 */ lis r4, __ct__4dBgWFv@ha /* 0x8007B970@ha */ -/* 80D4FC1C 38 84 B9 70 */ addi r4, r4, __ct__4dBgWFv@l /* 0x8007B970@l */ -/* 80D4FC20 3C A0 80 D5 */ lis r5, __dt__4dBgWFv@ha /* 0x80D4FE5C@ha */ -/* 80D4FC24 38 A5 FE 5C */ addi r5, r5, __dt__4dBgWFv@l /* 0x80D4FE5C@l */ -/* 80D4FC28 38 C0 00 C0 */ li r6, 0xc0 -/* 80D4FC2C 38 E0 00 02 */ li r7, 2 -/* 80D4FC30 4B 61 21 31 */ bl __construct_array -lbl_80D4FC34: -/* 80D4FC34 80 1F 04 A0 */ lwz r0, 0x4a0(r31) -/* 80D4FC38 60 00 00 08 */ ori r0, r0, 8 -/* 80D4FC3C 90 1F 04 A0 */ stw r0, 0x4a0(r31) -lbl_80D4FC40: -/* 80D4FC40 38 7F 07 58 */ addi r3, r31, 0x758 -/* 80D4FC44 3C 80 80 D5 */ lis r4, l_arcName@ha /* 0x80D509C8@ha */ -/* 80D4FC48 38 84 09 C8 */ addi r4, r4, l_arcName@l /* 0x80D509C8@l */ -/* 80D4FC4C 80 84 00 00 */ lwz r4, 0(r4) -/* 80D4FC50 4B 2D D2 6D */ bl dComIfG_resLoad__FP30request_of_phase_process_classPCc -/* 80D4FC54 7C 7D 1B 78 */ mr r29, r3 -/* 80D4FC58 2C 1D 00 04 */ cmpwi r29, 4 -/* 80D4FC5C 40 82 01 E4 */ bne lbl_80D4FE40 -/* 80D4FC60 7F E3 FB 78 */ mr r3, r31 -/* 80D4FC64 3C 80 80 D5 */ lis r4, createSolidHeap__FP10fopAc_ac_c@ha /* 0x80D4F898@ha */ -/* 80D4FC68 38 84 F8 98 */ addi r4, r4, createSolidHeap__FP10fopAc_ac_c@l /* 0x80D4F898@l */ -/* 80D4FC6C 38 A0 78 00 */ li r5, 0x7800 -/* 80D4FC70 4B 2C A8 41 */ bl fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl -/* 80D4FC74 54 60 06 3F */ clrlwi. r0, r3, 0x18 -/* 80D4FC78 40 82 00 0C */ bne lbl_80D4FC84 -/* 80D4FC7C 38 60 00 05 */ li r3, 5 -/* 80D4FC80 48 00 01 C4 */ b lbl_80D4FE44 -lbl_80D4FC84: -/* 80D4FC84 7F E3 FB 78 */ mr r3, r31 -/* 80D4FC88 C0 3E 00 4C */ lfs f1, 0x4c(r30) -/* 80D4FC8C C0 5E 00 50 */ lfs f2, 0x50(r30) -/* 80D4FC90 FC 60 08 90 */ fmr f3, f1 -/* 80D4FC94 C0 9E 00 54 */ lfs f4, 0x54(r30) -/* 80D4FC98 C0 BE 00 58 */ lfs f5, 0x58(r30) -/* 80D4FC9C FC C0 20 90 */ fmr f6, f4 -/* 80D4FCA0 4B 2C A8 A9 */ bl fopAcM_setCullSizeBox__FP10fopAc_ac_cffffff -/* 80D4FCA4 C0 1F 04 D0 */ lfs f0, 0x4d0(r31) -/* 80D4FCA8 D0 1F 05 50 */ stfs f0, 0x550(r31) -/* 80D4FCAC C0 1F 04 D4 */ lfs f0, 0x4d4(r31) -/* 80D4FCB0 D0 1F 05 54 */ stfs f0, 0x554(r31) -/* 80D4FCB4 C0 1F 04 D8 */ lfs f0, 0x4d8(r31) -/* 80D4FCB8 D0 1F 05 58 */ stfs f0, 0x558(r31) -/* 80D4FCBC 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80D4FCC0 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80D4FCC4 80 1F 00 B0 */ lwz r0, 0xb0(r31) -/* 80D4FCC8 54 04 06 3E */ clrlwi r4, r0, 0x18 -/* 80D4FCCC 88 1F 04 BA */ lbz r0, 0x4ba(r31) -/* 80D4FCD0 7C 05 07 74 */ extsb r5, r0 -/* 80D4FCD4 4B 2E 56 8D */ bl isSwitch__10dSv_info_cCFii -/* 80D4FCD8 20 03 00 00 */ subfic r0, r3, 0 -/* 80D4FCDC 7C 60 01 10 */ subfe r3, r0, r0 -/* 80D4FCE0 38 00 00 80 */ li r0, 0x80 -/* 80D4FCE4 7C 00 18 78 */ andc r0, r0, r3 -/* 80D4FCE8 90 1F 05 5C */ stw r0, 0x55c(r31) -/* 80D4FCEC 38 00 00 59 */ li r0, 0x59 -/* 80D4FCF0 98 1F 05 4B */ stb r0, 0x54b(r31) -/* 80D4FCF4 38 00 FF FF */ li r0, -1 -/* 80D4FCF8 B0 1F 07 68 */ sth r0, 0x768(r31) -/* 80D4FCFC 38 00 00 00 */ li r0, 0 -/* 80D4FD00 98 1F 07 6A */ stb r0, 0x76a(r31) -/* 80D4FD04 C0 1E 00 5C */ lfs f0, 0x5c(r30) -/* 80D4FD08 D0 1F 07 60 */ stfs f0, 0x760(r31) -/* 80D4FD0C C0 1E 00 60 */ lfs f0, 0x60(r30) -/* 80D4FD10 D0 1F 07 64 */ stfs f0, 0x764(r31) -/* 80D4FD14 80 7F 05 68 */ lwz r3, 0x568(r31) -/* 80D4FD18 38 03 00 24 */ addi r0, r3, 0x24 -/* 80D4FD1C 90 1F 05 04 */ stw r0, 0x504(r31) -/* 80D4FD20 3C 60 80 3E */ lis r3, now__14mDoMtx_stack_c@ha /* 0x803DD470@ha */ -/* 80D4FD24 38 63 D4 70 */ addi r3, r3, now__14mDoMtx_stack_c@l /* 0x803DD470@l */ -/* 80D4FD28 C0 3E 00 50 */ lfs f1, 0x50(r30) -/* 80D4FD2C FC 40 08 90 */ fmr f2, f1 -/* 80D4FD30 FC 60 08 90 */ fmr f3, f1 -/* 80D4FD34 4B 5F 6B B5 */ bl PSMTXTrans -/* 80D4FD38 3C 60 80 3E */ lis r3, now__14mDoMtx_stack_c@ha /* 0x803DD470@ha */ -/* 80D4FD3C 38 63 D4 70 */ addi r3, r3, now__14mDoMtx_stack_c@l /* 0x803DD470@l */ -/* 80D4FD40 38 80 00 00 */ li r4, 0 -/* 80D4FD44 4B 2B C6 F1 */ bl mDoMtx_YrotM__FPA4_fs -/* 80D4FD48 3C 60 80 3E */ lis r3, now__14mDoMtx_stack_c@ha /* 0x803DD470@ha */ -/* 80D4FD4C 38 63 D4 70 */ addi r3, r3, now__14mDoMtx_stack_c@l /* 0x803DD470@l */ -/* 80D4FD50 38 9F 06 F8 */ addi r4, r31, 0x6f8 -/* 80D4FD54 4B 5F 67 5D */ bl PSMTXCopy -/* 80D4FD58 3C 60 80 3E */ lis r3, now__14mDoMtx_stack_c@ha /* 0x803DD470@ha */ -/* 80D4FD5C 38 63 D4 70 */ addi r3, r3, now__14mDoMtx_stack_c@l /* 0x803DD470@l */ -/* 80D4FD60 80 9F 05 68 */ lwz r4, 0x568(r31) -/* 80D4FD64 38 84 00 24 */ addi r4, r4, 0x24 -/* 80D4FD68 4B 5F 67 49 */ bl PSMTXCopy -/* 80D4FD6C 38 7F 05 78 */ addi r3, r31, 0x578 -/* 80D4FD70 4B 32 BC 51 */ bl Move__4dBgWFv -/* 80D4FD74 3C 60 80 3E */ lis r3, now__14mDoMtx_stack_c@ha /* 0x803DD470@ha */ -/* 80D4FD78 38 63 D4 70 */ addi r3, r3, now__14mDoMtx_stack_c@l /* 0x803DD470@l */ -/* 80D4FD7C C0 3E 00 50 */ lfs f1, 0x50(r30) -/* 80D4FD80 C0 5E 00 64 */ lfs f2, 0x64(r30) -/* 80D4FD84 C0 7E 00 68 */ lfs f3, 0x68(r30) -/* 80D4FD88 4B 5F 6B 61 */ bl PSMTXTrans -/* 80D4FD8C 3C 60 80 3E */ lis r3, now__14mDoMtx_stack_c@ha /* 0x803DD470@ha */ -/* 80D4FD90 38 63 D4 70 */ addi r3, r3, now__14mDoMtx_stack_c@l /* 0x803DD470@l */ -/* 80D4FD94 38 80 00 00 */ li r4, 0 -/* 80D4FD98 4B 2B C6 9D */ bl mDoMtx_YrotM__FPA4_fs -/* 80D4FD9C 3C 60 80 3E */ lis r3, now__14mDoMtx_stack_c@ha /* 0x803DD470@ha */ -/* 80D4FDA0 38 63 D4 70 */ addi r3, r3, now__14mDoMtx_stack_c@l /* 0x803DD470@l */ -/* 80D4FDA4 38 9F 07 28 */ addi r4, r31, 0x728 -/* 80D4FDA8 4B 5F 67 09 */ bl PSMTXCopy -/* 80D4FDAC 3C 60 80 3E */ lis r3, now__14mDoMtx_stack_c@ha /* 0x803DD470@ha */ -/* 80D4FDB0 38 63 D4 70 */ addi r3, r3, now__14mDoMtx_stack_c@l /* 0x803DD470@l */ -/* 80D4FDB4 80 9F 05 6C */ lwz r4, 0x56c(r31) -/* 80D4FDB8 38 84 00 24 */ addi r4, r4, 0x24 -/* 80D4FDBC 4B 5F 66 F5 */ bl PSMTXCopy -/* 80D4FDC0 38 7F 06 38 */ addi r3, r31, 0x638 -/* 80D4FDC4 4B 32 BB FD */ bl Move__4dBgWFv -/* 80D4FDC8 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80D4FDCC 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80D4FDD0 80 1F 00 B0 */ lwz r0, 0xb0(r31) -/* 80D4FDD4 54 04 06 3E */ clrlwi r4, r0, 0x18 -/* 80D4FDD8 88 1F 04 BA */ lbz r0, 0x4ba(r31) -/* 80D4FDDC 7C 05 07 74 */ extsb r5, r0 -/* 80D4FDE0 4B 2E 55 81 */ bl isSwitch__10dSv_info_cCFii -/* 80D4FDE4 2C 03 00 00 */ cmpwi r3, 0 -/* 80D4FDE8 40 82 00 58 */ bne lbl_80D4FE40 -/* 80D4FDEC C0 1E 00 6C */ lfs f0, 0x6c(r30) -/* 80D4FDF0 D0 01 00 10 */ stfs f0, 0x10(r1) -/* 80D4FDF4 C0 1E 00 64 */ lfs f0, 0x64(r30) -/* 80D4FDF8 D0 01 00 14 */ stfs f0, 0x14(r1) -/* 80D4FDFC C0 1E 00 70 */ lfs f0, 0x70(r30) -/* 80D4FE00 D0 01 00 18 */ stfs f0, 0x18(r1) -/* 80D4FE04 38 61 00 08 */ addi r3, r1, 8 -/* 80D4FE08 38 80 00 00 */ li r4, 0 -/* 80D4FE0C 38 A0 7F FF */ li r5, 0x7fff -/* 80D4FE10 38 C0 00 00 */ li r6, 0 -/* 80D4FE14 4B 51 75 E1 */ bl __ct__5csXyzFsss -/* 80D4FE18 38 60 02 75 */ li r3, 0x275 -/* 80D4FE1C 38 80 00 02 */ li r4, 2 -/* 80D4FE20 38 A1 00 10 */ addi r5, r1, 0x10 -/* 80D4FE24 88 1F 04 E2 */ lbz r0, 0x4e2(r31) -/* 80D4FE28 7C 06 07 74 */ extsb r6, r0 -/* 80D4FE2C 38 E1 00 08 */ addi r7, r1, 8 -/* 80D4FE30 39 00 00 00 */ li r8, 0 -/* 80D4FE34 39 20 FF FF */ li r9, -1 -/* 80D4FE38 4B 2C 9F 61 */ bl fopAcM_create__FsUlPC4cXyziPC5csXyzPC4cXyzSc -/* 80D4FE3C 90 7F 04 A4 */ stw r3, 0x4a4(r31) -lbl_80D4FE40: -/* 80D4FE40 7F A3 EB 78 */ mr r3, r29 -lbl_80D4FE44: -/* 80D4FE44 39 61 00 30 */ addi r11, r1, 0x30 -/* 80D4FE48 4B 61 23 E1 */ bl _restgpr_29 -/* 80D4FE4C 80 01 00 34 */ lwz r0, 0x34(r1) -/* 80D4FE50 7C 08 03 A6 */ mtlr r0 -/* 80D4FE54 38 21 00 30 */ addi r1, r1, 0x30 -/* 80D4FE58 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Create__FP10fopAc_ac_c.s b/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Create__FP10fopAc_ac_c.s deleted file mode 100644 index 8c565bc67f0..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Create__FP10fopAc_ac_c.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_80D4FBB8: -/* 80D4FBB8 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80D4FBBC 7C 08 02 A6 */ mflr r0 -/* 80D4FBC0 90 01 00 14 */ stw r0, 0x14(r1) -/* 80D4FBC4 48 00 00 15 */ bl create__14daTagLv6Gate_cFv -/* 80D4FBC8 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80D4FBCC 7C 08 03 A6 */ mtlr r0 -/* 80D4FBD0 38 21 00 10 */ addi r1, r1, 0x10 -/* 80D4FBD4 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Delete__FP14daTagLv6Gate_c.s b/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Delete__FP14daTagLv6Gate_c.s deleted file mode 100644 index 41897c00216..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Delete__FP14daTagLv6Gate_c.s +++ /dev/null @@ -1,48 +0,0 @@ -lbl_80D50850: -/* 80D50850 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80D50854 7C 08 02 A6 */ mflr r0 -/* 80D50858 90 01 00 14 */ stw r0, 0x14(r1) -/* 80D5085C 93 E1 00 0C */ stw r31, 0xc(r1) -/* 80D50860 7C 7F 1B 79 */ or. r31, r3, r3 -/* 80D50864 41 82 00 84 */ beq lbl_80D508E8 -/* 80D50868 38 7F 05 78 */ addi r3, r31, 0x578 -/* 80D5086C 4B 51 79 69 */ bl ChkUsed__9cBgW_BgIdCFv -/* 80D50870 54 60 06 3F */ clrlwi. r0, r3, 0x18 -/* 80D50874 41 82 00 18 */ beq lbl_80D5088C -/* 80D50878 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80D5087C 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80D50880 38 63 0F 38 */ addi r3, r3, 0xf38 -/* 80D50884 38 9F 05 78 */ addi r4, r31, 0x578 -/* 80D50888 4B 32 39 C9 */ bl Release__4cBgSFP9dBgW_Base -lbl_80D5088C: -/* 80D5088C 38 7F 06 38 */ addi r3, r31, 0x638 -/* 80D50890 4B 51 79 45 */ bl ChkUsed__9cBgW_BgIdCFv -/* 80D50894 54 60 06 3F */ clrlwi. r0, r3, 0x18 -/* 80D50898 41 82 00 18 */ beq lbl_80D508B0 -/* 80D5089C 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80D508A0 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80D508A4 38 63 0F 38 */ addi r3, r3, 0xf38 -/* 80D508A8 38 9F 06 38 */ addi r4, r31, 0x638 -/* 80D508AC 4B 32 39 A5 */ bl Release__4cBgSFP9dBgW_Base -lbl_80D508B0: -/* 80D508B0 38 7F 07 58 */ addi r3, r31, 0x758 -/* 80D508B4 3C 80 80 D5 */ lis r4, l_arcName@ha /* 0x80D509C8@ha */ -/* 80D508B8 38 84 09 C8 */ addi r4, r4, l_arcName@l /* 0x80D509C8@l */ -/* 80D508BC 80 84 00 00 */ lwz r4, 0(r4) -/* 80D508C0 4B 2D C7 49 */ bl dComIfG_resDelete__FP30request_of_phase_process_classPCc -/* 80D508C4 38 7F 05 78 */ addi r3, r31, 0x578 -/* 80D508C8 3C 80 80 D5 */ lis r4, __dt__4dBgWFv@ha /* 0x80D4FE5C@ha */ -/* 80D508CC 38 84 FE 5C */ addi r4, r4, __dt__4dBgWFv@l /* 0x80D4FE5C@l */ -/* 80D508D0 38 A0 00 C0 */ li r5, 0xc0 -/* 80D508D4 38 C0 00 02 */ li r6, 2 -/* 80D508D8 4B 61 14 11 */ bl __destroy_arr -/* 80D508DC 7F E3 FB 78 */ mr r3, r31 -/* 80D508E0 38 80 00 00 */ li r4, 0 -/* 80D508E4 4B 2C 83 A9 */ bl __dt__10fopAc_ac_cFv -lbl_80D508E8: -/* 80D508E8 38 60 00 01 */ li r3, 1 -/* 80D508EC 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 80D508F0 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80D508F4 7C 08 03 A6 */ mtlr r0 -/* 80D508F8 38 21 00 10 */ addi r1, r1, 0x10 -/* 80D508FC 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Draw__FP14daTagLv6Gate_c.s b/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Draw__FP14daTagLv6Gate_c.s deleted file mode 100644 index 3511318fee0..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Draw__FP14daTagLv6Gate_c.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_80D5068C: -/* 80D5068C 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80D50690 7C 08 02 A6 */ mflr r0 -/* 80D50694 90 01 00 14 */ stw r0, 0x14(r1) -/* 80D50698 48 00 00 15 */ bl draw__14daTagLv6Gate_cFv -/* 80D5069C 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80D506A0 7C 08 03 A6 */ mtlr r0 -/* 80D506A4 38 21 00 10 */ addi r1, r1, 0x10 -/* 80D506A8 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Execute__FP14daTagLv6Gate_c.s b/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Execute__FP14daTagLv6Gate_c.s deleted file mode 100644 index 3b0afe19051..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Execute__FP14daTagLv6Gate_c.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_80D4FEBC: -/* 80D4FEBC 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80D4FEC0 7C 08 02 A6 */ mflr r0 -/* 80D4FEC4 90 01 00 14 */ stw r0, 0x14(r1) -/* 80D4FEC8 48 00 00 15 */ bl execute__14daTagLv6Gate_cFv -/* 80D4FECC 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80D4FED0 7C 08 03 A6 */ mtlr r0 -/* 80D4FED4 38 21 00 10 */ addi r1, r1, 0x10 -/* 80D4FED8 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/draw__14daTagLv6Gate_cFv.s b/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/draw__14daTagLv6Gate_cFv.s deleted file mode 100644 index cfd11e17c4d..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/draw__14daTagLv6Gate_cFv.s +++ /dev/null @@ -1,107 +0,0 @@ -lbl_80D506AC: -/* 80D506AC 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 80D506B0 7C 08 02 A6 */ mflr r0 -/* 80D506B4 90 01 00 24 */ stw r0, 0x24(r1) -/* 80D506B8 39 61 00 20 */ addi r11, r1, 0x20 -/* 80D506BC 4B 61 1B 1D */ bl _savegpr_28 -/* 80D506C0 7C 7E 1B 78 */ mr r30, r3 -/* 80D506C4 3C 60 80 43 */ lis r3, g_env_light@ha /* 0x8042CA54@ha */ -/* 80D506C8 38 63 CA 54 */ addi r3, r3, g_env_light@l /* 0x8042CA54@l */ -/* 80D506CC 38 80 00 10 */ li r4, 0x10 -/* 80D506D0 38 BE 04 D0 */ addi r5, r30, 0x4d0 -/* 80D506D4 38 DE 01 0C */ addi r6, r30, 0x10c -/* 80D506D8 4B 45 30 ED */ bl settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c -/* 80D506DC 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80D506E0 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80D506E4 80 03 5F 70 */ lwz r0, 0x5f70(r3) -/* 80D506E8 3C 80 80 43 */ lis r4, j3dSys@ha /* 0x80434AC8@ha */ -/* 80D506EC 3B E4 4A C8 */ addi r31, r4, j3dSys@l /* 0x80434AC8@l */ -/* 80D506F0 90 1F 00 48 */ stw r0, 0x48(r31) -/* 80D506F4 80 03 5F 74 */ lwz r0, 0x5f74(r3) -/* 80D506F8 90 1F 00 4C */ stw r0, 0x4c(r31) -/* 80D506FC 80 1E 00 B0 */ lwz r0, 0xb0(r30) -/* 80D50700 54 04 C6 3E */ rlwinm r4, r0, 0x18, 0x18, 0x1f -/* 80D50704 88 1E 04 BA */ lbz r0, 0x4ba(r30) -/* 80D50708 7C 05 07 74 */ extsb r5, r0 -/* 80D5070C 4B 2E 4C 55 */ bl isSwitch__10dSv_info_cCFii -/* 80D50710 2C 03 00 00 */ cmpwi r3, 0 -/* 80D50714 41 82 00 84 */ beq lbl_80D50798 -/* 80D50718 3C 60 80 43 */ lis r3, g_env_light@ha /* 0x8042CA54@ha */ -/* 80D5071C 38 63 CA 54 */ addi r3, r3, g_env_light@l /* 0x8042CA54@l */ -/* 80D50720 80 9E 05 68 */ lwz r4, 0x568(r30) -/* 80D50724 80 84 00 04 */ lwz r4, 4(r4) -/* 80D50728 38 BE 01 0C */ addi r5, r30, 0x10c -/* 80D5072C 4B 45 46 75 */ bl setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c -/* 80D50730 80 7E 05 68 */ lwz r3, 0x568(r30) -/* 80D50734 80 83 00 04 */ lwz r4, 4(r3) -/* 80D50738 80 7E 05 70 */ lwz r3, 0x570(r30) -/* 80D5073C C0 23 00 10 */ lfs f1, 0x10(r3) -/* 80D50740 38 84 00 58 */ addi r4, r4, 0x58 -/* 80D50744 4B 2B CF 95 */ bl entry__13mDoExt_btkAnmFP16J3DMaterialTablef -/* 80D50748 80 7E 05 68 */ lwz r3, 0x568(r30) -/* 80D5074C 80 83 00 04 */ lwz r4, 4(r3) -/* 80D50750 80 7E 05 74 */ lwz r3, 0x574(r30) -/* 80D50754 C0 23 00 10 */ lfs f1, 0x10(r3) -/* 80D50758 38 84 00 58 */ addi r4, r4, 0x58 -/* 80D5075C 4B 2B CF 7D */ bl entry__13mDoExt_btkAnmFP16J3DMaterialTablef -/* 80D50760 80 7E 05 68 */ lwz r3, 0x568(r30) -/* 80D50764 4B 2B D5 61 */ bl mDoExt_modelUpdateDL__FP8J3DModel -/* 80D50768 80 7E 05 68 */ lwz r3, 0x568(r30) -/* 80D5076C 80 63 00 04 */ lwz r3, 4(r3) -/* 80D50770 38 63 00 58 */ addi r3, r3, 0x58 -/* 80D50774 80 9E 05 70 */ lwz r4, 0x570(r30) -/* 80D50778 80 84 00 14 */ lwz r4, 0x14(r4) -/* 80D5077C 4B 5D F0 39 */ bl removeTexMtxAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKey -/* 80D50780 80 7E 05 68 */ lwz r3, 0x568(r30) -/* 80D50784 80 63 00 04 */ lwz r3, 4(r3) -/* 80D50788 38 63 00 58 */ addi r3, r3, 0x58 -/* 80D5078C 80 9E 05 74 */ lwz r4, 0x574(r30) -/* 80D50790 80 84 00 14 */ lwz r4, 0x14(r4) -/* 80D50794 4B 5D F0 21 */ bl removeTexMtxAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKey -lbl_80D50798: -/* 80D50798 3B 80 00 00 */ li r28, 0 -/* 80D5079C 48 00 00 4C */ b lbl_80D507E8 -lbl_80D507A0: -/* 80D507A0 80 7E 05 6C */ lwz r3, 0x56c(r30) -/* 80D507A4 80 63 00 04 */ lwz r3, 4(r3) -/* 80D507A8 80 63 00 60 */ lwz r3, 0x60(r3) -/* 80D507AC 57 9D 13 BA */ rlwinm r29, r28, 2, 0xe, 0x1d -/* 80D507B0 7C 63 E8 2E */ lwzx r3, r3, r29 -/* 80D507B4 80 63 00 2C */ lwz r3, 0x2c(r3) -/* 80D507B8 38 80 00 03 */ li r4, 3 -/* 80D507BC 81 83 00 00 */ lwz r12, 0(r3) -/* 80D507C0 81 8C 00 74 */ lwz r12, 0x74(r12) -/* 80D507C4 7D 89 03 A6 */ mtctr r12 -/* 80D507C8 4E 80 04 21 */ bctrl -/* 80D507CC 38 1D 07 60 */ addi r0, r29, 0x760 -/* 80D507D0 7C 1E 04 2E */ lfsx f0, r30, r0 -/* 80D507D4 FC 00 00 1E */ fctiwz f0, f0 -/* 80D507D8 D8 01 00 08 */ stfd f0, 8(r1) -/* 80D507DC 80 01 00 0C */ lwz r0, 0xc(r1) -/* 80D507E0 98 03 00 03 */ stb r0, 3(r3) -/* 80D507E4 3B 9C 00 01 */ addi r28, r28, 1 -lbl_80D507E8: -/* 80D507E8 57 80 04 3E */ clrlwi r0, r28, 0x10 -/* 80D507EC 28 00 00 02 */ cmplwi r0, 2 -/* 80D507F0 41 80 FF B0 */ blt lbl_80D507A0 -/* 80D507F4 3C 60 80 43 */ lis r3, g_env_light@ha /* 0x8042CA54@ha */ -/* 80D507F8 38 63 CA 54 */ addi r3, r3, g_env_light@l /* 0x8042CA54@l */ -/* 80D507FC 80 9E 05 6C */ lwz r4, 0x56c(r30) -/* 80D50800 80 84 00 04 */ lwz r4, 4(r4) -/* 80D50804 38 BE 01 0C */ addi r5, r30, 0x10c -/* 80D50808 4B 45 45 99 */ bl setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c -/* 80D5080C 80 7E 05 6C */ lwz r3, 0x56c(r30) -/* 80D50810 4B 2B D4 B5 */ bl mDoExt_modelUpdateDL__FP8J3DModel -/* 80D50814 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80D50818 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80D5081C 80 03 5F 80 */ lwz r0, 0x5f80(r3) -/* 80D50820 90 1F 00 48 */ stw r0, 0x48(r31) -/* 80D50824 80 03 5F 84 */ lwz r0, 0x5f84(r3) -/* 80D50828 90 1F 00 4C */ stw r0, 0x4c(r31) -/* 80D5082C 38 60 00 01 */ li r3, 1 -/* 80D50830 39 61 00 20 */ addi r11, r1, 0x20 -/* 80D50834 4B 61 19 F1 */ bl _restgpr_28 -/* 80D50838 80 01 00 24 */ lwz r0, 0x24(r1) -/* 80D5083C 7C 08 03 A6 */ mtlr r0 -/* 80D50840 38 21 00 20 */ addi r1, r1, 0x20 -/* 80D50844 4E 80 00 20 */ blr diff --git a/include/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate.h b/include/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate.h index b2714592dbe..e9c2ae8c2d5 100644 --- a/include/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate.h +++ b/include/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate.h @@ -1,19 +1,42 @@ #ifndef D_A_TAG_LV6GATE_H #define D_A_TAG_LV6GATE_H +#include "d/bg/d_bg_w.h" +#include "d/com/d_com_inf_game.h" #include "f_op/f_op_actor_mng.h" class daTagLv6Gate_c : public fopAc_ac_c { public: - /* 80D4F8B8 */ void createHeap(); - /* 80D4FBD8 */ void create(); - /* 80D4FEDC */ void execute(); - /* 80D506AC */ void draw(); + /* 80D4F8B8 */ int createHeap(); + /* 80D4FBD8 */ int create(); + /* 80D4FEDC */ int execute(); + /* 80D506AC */ int draw(); + + inline ~daTagLv6Gate_c(); + + inline void seStair(); + inline void seGlassOff(); + inline void seGlassOn(); + inline void initBaseMtx(); + inline void setBaseMtx(); + inline void create_init(); + inline bool checkOpenArea(); + inline void cut1(); + inline void cut2(); + inline void cut4(); void stabMasterSword() { field_0x76a = 1; } + u8 getSwitchNo1() { return fopAcM_GetParam(this) & 0xFF; } + u8 getSwitchNo2() { return fopAcM_GetParam(this) >> 0x8 & 0xFF; } - /* 0x568 */ u8 field_0x568[0x76A - 0x568]; + /* 0x568 */ J3DModel* mpModel[2]; + /* 0x570 */ mDoExt_btkAnm* mpBtk[2]; + /* 0x578 */ dBgW mBgW[2]; + /* 0x6F8 */ Mtx field_0x6f8[2]; + /* 0x758 */ request_of_phase_process_class mPhase; + /* 0x760 */ f32 field_0x760[2]; + /* 0x768 */ s16 mEvtId; /* 0x76A */ u8 field_0x76a; -}; +}; // Size: 0x76C #endif /* D_A_TAG_LV6GATE_H */ diff --git a/include/rel/d/a/tag/d_a_tag_Lv7Gate/d_a_tag_Lv7Gate.h b/include/rel/d/a/tag/d_a_tag_Lv7Gate/d_a_tag_Lv7Gate.h index 75c80fc8c9b..46057741cd6 100644 --- a/include/rel/d/a/tag/d_a_tag_Lv7Gate/d_a_tag_Lv7Gate.h +++ b/include/rel/d/a/tag/d_a_tag_Lv7Gate/d_a_tag_Lv7Gate.h @@ -6,13 +6,13 @@ class daTagLv7Gate_c : public fopAc_ac_c { public: - inline ~daTagLv7Gate_c(); - /* 80D50C64 */ int create(); /* 80D50D30 */ void create_init(); /* 80D511C8 */ int execute(); /* 80D51628 */ void calcFly(); + inline ~daTagLv7Gate_c(); + inline int createHeap(); inline void setPath(u8 i_path_ID); inline void initBaseMtx(); @@ -22,24 +22,24 @@ public: inline bool setNextPoint(); inline int draw(); - u8 getPathID() { return (fopAcM_GetParam(this) >> 0x10); } + u8 getPathID() { return fopAcM_GetParam(this) >> 0x10; } u16 getFlowNodeNo() { return fopAcM_GetParam(this); } - /* 0X568 */ J3DModel* mpModel; - /* 0X56C */ mDoExt_bckAnm* mpBck; - /* 0X570 */ dPath* mRoomPath; - /* 0X574 */ request_of_phase_process_class mPhase; - /* 0X57C */ cXyz mPos2; - /* 0X588 */ cXyz mPos1; - /* 0X594 */ csXyz field_0x594; - /* 0X59C */ char* mEvName; - /* 0X5A0 */ int field_0x5a0; - /* 0X5A4 */ f32 mDistance; - /* 0X5A8 */ f32 mLastFrame; - /* 0X5AC */ u16 field_0x5ac; - /* 0X5AE */ s16 mEvtId; - /* 0X5B0 */ bool field_0x5b0; - /* 0X5B1 */ bool field_0x5b1; + /* 0x568 */ J3DModel* mpModel; + /* 0x56C */ mDoExt_bckAnm* mpBck; + /* 0x570 */ dPath* mRoomPath; + /* 0x574 */ request_of_phase_process_class mPhase; + /* 0x57C */ cXyz mPos2; + /* 0x588 */ cXyz mPos1; + /* 0x594 */ csXyz field_0x594; + /* 0x59C */ char* mEvName; + /* 0x5A0 */ int field_0x5a0; + /* 0x5A4 */ f32 mDistance; + /* 0x5A8 */ f32 mLastFrame; + /* 0x5AC */ u16 field_0x5ac; + /* 0x5AE */ s16 mEvtId; + /* 0x5B0 */ bool field_0x5b0; + /* 0x5B1 */ bool field_0x5b1; }; // Size: 0x5B4 #endif /* D_A_TAG_LV7GATE_H */ diff --git a/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate.cpp b/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate.cpp index b06f9ff64af..c51fd91d204 100644 --- a/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate.cpp +++ b/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate.cpp @@ -1,166 +1,20 @@ // -// Generated By: dol2asm -// Translation Unit: d_a_tag_Lv6Gate +// d_a_tag_Lv6Gate.cpp +// Temple of Time Gate // -// #include "rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate.h" -#include "dolphin/types.h" +#include "rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate.h" +#include "JSystem/J3DGraphBase/J3DMaterial.h" +#include "JSystem/JKernel/JKRHeap.h" +#include "d/a/d_a_player.h" +#include "d/bg/d_bg_w.h" +#include "d/d_procname.h" #include "dol2asm.h" -// -// Types: -// - -struct request_of_phase_process_class {}; - -struct cXyz {}; - -struct mDoMtx_stack_c { - /* 8000CCC8 */ void push(); - /* 8000CD14 */ void pop(); - /* 8000CD64 */ void transS(cXyz const&); - - static u8 now[48]; -}; - -struct J3DAnmTextureSRTKey {}; - -struct J3DMaterialTable { - /* 8032F7B4 */ void removeTexMtxAnimator(J3DAnmTextureSRTKey*); -}; - -struct mDoExt_btkAnm { - /* 8000D63C */ void init(J3DMaterialTable*, J3DAnmTextureSRTKey*, int, int, f32, s16, s16); - /* 8000D6D8 */ void entry(J3DMaterialTable*, f32); -}; - -struct mDoExt_baseAnm { - /* 8000D428 */ void play(); -}; - -struct fopAc_ac_c { - /* 80018B64 */ fopAc_ac_c(); - /* 80018C8C */ ~fopAc_ac_c(); -}; - -struct daTagLv6Gate_c { - /* 80D4F8B8 */ void createHeap(); - /* 80D4FBD8 */ void create(); - /* 80D4FEDC */ void execute(); - /* 80D506AC */ void draw(); -}; - -struct dSv_info_c { - /* 80035200 */ void onSwitch(int, int); - /* 80035360 */ void isSwitch(int, int) const; -}; - -struct dKy_tevstr_c {}; - -struct J3DModelData {}; - -struct dScnKy_env_light_c { - /* 801A37C4 */ void settingTevStruct(int, cXyz*, dKy_tevstr_c*); - /* 801A4DA0 */ void setLightTevColorType_MAJI(J3DModelData*, dKy_tevstr_c*); -}; - -struct dRes_info_c {}; - -struct dRes_control_c { - /* 8003C2EC */ void getRes(char const*, s32, dRes_info_c*, int); -}; - -struct dPa_levelEcallBack {}; - -struct csXyz { - /* 802673F4 */ csXyz(s16, s16, s16); -}; - -struct _GXColor {}; - -struct dPa_control_c { - /* 8004CA90 */ void set(u8, u16, cXyz const*, dKy_tevstr_c const*, csXyz const*, cXyz const*, - u8, dPa_levelEcallBack*, s8, _GXColor const*, _GXColor const*, - cXyz const*, f32); -}; - -struct dEvt_control_c { - /* 80042468 */ void reset(); - /* 80042958 */ void setSkipZev(void*, char*); -}; - -struct dEvent_manager_c { - /* 80046800 */ void setObjectArchive(char*); - /* 80047758 */ void getEventIdx(fopAc_ac_c*, char const*, u8); - /* 80047A78 */ void endCheck(s16); - /* 80047B1C */ void getMyStaffId(char const*, fopAc_ac_c*, int); - /* 80047D4C */ void getIsAddvance(int); - /* 80047F5C */ void getMyNowCutName(int); - /* 8004817C */ void cutEnd(int); -}; - -struct dBgW_Base {}; - -struct dBgW { - /* 8007B970 */ dBgW(); - /* 8007B9C0 */ void Move(); - /* 80D4FE5C */ ~dBgW(); -}; - -struct dBgS { - /* 80074A08 */ void Regist(dBgW_Base*, fopAc_ac_c*); -}; - -struct cBgW_BgId { - /* 802681D4 */ void ChkUsed() const; -}; - -struct cBgD_t {}; - -struct cBgW { - /* 8007933C */ ~cBgW(); - /* 80079F38 */ void Set(cBgD_t*, u32, f32 (*)[3][4]); -}; - -struct cBgS { - /* 80074250 */ void Release(dBgW_Base*); -}; - -struct JAISoundID {}; - -struct Vec {}; - -struct Z2SeMgr { - /* 802AB984 */ void seStart(JAISoundID, Vec const*, u32, s8, f32, f32, f32, f32, u8); -}; - -struct Z2AudioMgr { - static u8 mAudioMgrPtr[4 + 4 /* padding */]; -}; - -struct J3DModel {}; - -struct J3DFrameCtrl { - /* 803283FC */ void init(s16); - /* 80D4FB70 */ ~J3DFrameCtrl(); -}; - // // Forward References: // -extern "C" static void createSolidHeap__FP10fopAc_ac_c(); -extern "C" void createHeap__14daTagLv6Gate_cFv(); -extern "C" void __dt__12J3DFrameCtrlFv(); -extern "C" static void daTagLv6Gate_Create__FP10fopAc_ac_c(); -extern "C" void create__14daTagLv6Gate_cFv(); -extern "C" void __dt__4dBgWFv(); -extern "C" static void daTagLv6Gate_Execute__FP14daTagLv6Gate_c(); -extern "C" void execute__14daTagLv6Gate_cFv(); -extern "C" static void daTagLv6Gate_Draw__FP14daTagLv6Gate_c(); -extern "C" void draw__14daTagLv6Gate_cFv(); -extern "C" static bool daTagLv6Gate_IsDelete__FP14daTagLv6Gate_c(); -extern "C" static void daTagLv6Gate_Delete__FP14daTagLv6Gate_c(); extern "C" extern char const* const d_a_tag_Lv6Gate__stringBase0; // @@ -172,26 +26,9 @@ extern "C" void push__14mDoMtx_stack_cFv(); extern "C" void pop__14mDoMtx_stack_cFv(); extern "C" void transS__14mDoMtx_stack_cFRC4cXyz(); extern "C" void play__14mDoExt_baseAnmFv(); -extern "C" void init__13mDoExt_btkAnmFP16J3DMaterialTableP19J3DAnmTextureSRTKeyiifss(); -extern "C" void entry__13mDoExt_btkAnmFP16J3DMaterialTablef(); -extern "C" void mDoExt_modelUpdateDL__FP8J3DModel(); -extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl(); -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void __dt__10fopAc_ac_cFv(); extern "C" void fopAcIt_Judge__FPFPvPv_PvPv(); -extern "C" void fopAcM_SearchByID__FUiPP10fopAc_ac_c(); -extern "C" void fopAcM_SearchByName__FsPP10fopAc_ac_c(); -extern "C" void fopAcM_delete__FUi(); -extern "C" void fopAcM_create__FsUlPC4cXyziPC5csXyzPC4cXyzSc(); -extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl(); -extern "C" void fopAcM_setCullSizeBox__FP10fopAc_ac_cffffff(); -extern "C" void fopAcM_orderOtherEventId__FP10fopAc_ac_csUcUsUsUs(); -extern "C" void fpcSch_JudgeForPName__FPvPv(); -extern "C" void dComIfG_resLoad__FP30request_of_phase_process_classPCc(); -extern "C" void dComIfG_resDelete__FP30request_of_phase_process_classPCc(); extern "C" void onSwitch__10dSv_info_cFii(); extern "C" void isSwitch__10dSv_info_cCFii(); -extern "C" void getRes__14dRes_control_cFPCclP11dRes_info_ci(); extern "C" void reset__14dEvt_control_cFv(); extern "C" void setSkipZev__14dEvt_control_cFPvPc(); extern "C" void setObjectArchive__16dEvent_manager_cFPc(); @@ -205,40 +42,12 @@ extern "C" void set__13dPa_control_cFUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf(); extern "C" void Release__4cBgSFP9dBgW_Base(); extern "C" void Regist__4dBgSFP9dBgW_BaseP10fopAc_ac_c(); -extern "C" void __dt__4cBgWFv(); -extern "C" void Set__4cBgWFP6cBgD_tUlPA3_A4_f(); -extern "C" void __ct__4dBgWFv(); -extern "C" void Move__4dBgWFv(); -extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c(); -extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c(); extern "C" void __ct__5csXyzFsss(); extern "C" void ChkUsed__9cBgW_BgIdCFv(); extern "C" void seStart__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc(); -extern "C" void* __nw__FUl(); -extern "C" void __dl__FPv(); -extern "C" void init__12J3DFrameCtrlFs(); -extern "C" void removeTexMtxAnimator__16J3DMaterialTableFP19J3DAnmTextureSRTKey(); -extern "C" void PSMTXCopy(); -extern "C" void PSMTXInverse(); -extern "C" void PSMTXTrans(); -extern "C" void PSMTXMultVec(); -extern "C" void __destroy_arr(); -extern "C" void __construct_array(); extern "C" void _savegpr_24(); -extern "C" void _savegpr_27(); -extern "C" void _savegpr_28(); -extern "C" void _savegpr_29(); extern "C" void _restgpr_24(); -extern "C" void _restgpr_27(); -extern "C" void _restgpr_28(); -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 void* __vt__4dBgW[65]; extern "C" u8 now__14mDoMtx_stack_c[48]; -extern "C" extern u8 g_dComIfG_gameInfo[122384]; -extern "C" extern u8 g_env_light[4880]; -extern "C" extern u8 j3dSys[284]; extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */]; // @@ -246,116 +55,83 @@ extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */]; // /* 80D4F898-80D4F8B8 000078 0020+00 1/1 0/0 0/0 .text createSolidHeap__FP10fopAc_ac_c */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void createSolidHeap(fopAc_ac_c* param_0) { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/createSolidHeap__FP10fopAc_ac_c.s" +static int createSolidHeap(fopAc_ac_c* i_this) { + return static_cast(i_this)->createHeap(); } -#pragma pop -/* ############################################################################################## */ /* 80D50908-80D50914 000000 000C+00 2/2 0/0 0/0 .rodata l_minRelative */ -SECTION_RODATA static u8 const l_minRelative[12] = { - 0xC4, 0x2F, 0x00, 0x00, 0xC3, 0x96, 0x00, 0x00, 0xC4, 0xFA, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80D50908, &l_minRelative); +static f32 const l_minRelative[] = {-700.0f, -300.0f, -2000.0f}; /* 80D50914-80D50920 00000C 000C+00 0/1 0/0 0/0 .rodata l_maxRelative */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const l_maxRelative[12] = { - 0x44, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x7A, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80D50914, &l_maxRelative); -#pragma pop - -/* 80D50920-80D50928 000018 0004+04 1/2 0/0 0/0 .rodata @3757 */ -SECTION_RODATA static f32 const lit_3757[1 + 1 /* padding */] = { - 1.0f, - /* padding */ - 0.0f, -}; -COMPILER_STRIP_GATE(0x80D50920, &lit_3757); - -/* 80D50928-80D50930 000020 0008+00 1/2 0/0 0/0 .rodata @3759 */ -SECTION_RODATA static u8 const lit_3759[8] = { - 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80D50928, &lit_3759); - -/* 80D50998-80D50998 000090 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80D50998 = "Lv6Gate"; -#pragma pop +static f32 const l_maxRelative[] = {700.0f, 0.0f, 1000.0f}; /* 80D509C8-80D509CC -00001 0004+00 4/4 0/0 0/0 .data l_arcName */ -SECTION_DATA static void* l_arcName = (void*)&d_a_tag_Lv6Gate__stringBase0; - -/* 80D509CC-80D509EC -00001 0020+00 1/0 0/0 0/0 .data l_daTagLv6Gate_Method */ -SECTION_DATA static void* l_daTagLv6Gate_Method[8] = { - (void*)daTagLv6Gate_Create__FP10fopAc_ac_c, - (void*)daTagLv6Gate_Delete__FP14daTagLv6Gate_c, - (void*)daTagLv6Gate_Execute__FP14daTagLv6Gate_c, - (void*)daTagLv6Gate_IsDelete__FP14daTagLv6Gate_c, - (void*)daTagLv6Gate_Draw__FP14daTagLv6Gate_c, - (void*)NULL, - (void*)NULL, - (void*)NULL, -}; - -/* 80D509EC-80D50A1C -00001 0030+00 0/0 0/0 1/0 .data g_profile_Tag_Lv6Gate */ -SECTION_DATA extern void* g_profile_Tag_Lv6Gate[12] = { - (void*)0xFFFFFFFD, (void*)0x0007FFFD, - (void*)0x02C90000, (void*)&g_fpcLf_Method, - (void*)0x0000076C, (void*)NULL, - (void*)NULL, (void*)&g_fopAc_Method, - (void*)0x01060000, (void*)&l_daTagLv6Gate_Method, - (void*)0x00040000, (void*)0x000E0000, -}; - -/* 80D50A1C-80D50A28 000054 000C+00 2/2 0/0 0/0 .data __vt__12J3DFrameCtrl */ -SECTION_DATA extern void* __vt__12J3DFrameCtrl[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12J3DFrameCtrlFv, -}; +static char* l_arcName = "Lv6Gate"; /* 80D4F8B8-80D4FB70 000098 02B8+00 1/1 0/0 0/0 .text createHeap__14daTagLv6Gate_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daTagLv6Gate_c::createHeap() { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/createHeap__14daTagLv6Gate_cFv.s" -} -#pragma pop +int daTagLv6Gate_c::createHeap() { + J3DAnmTextureSRTKey* btk; -/* 80D4FB70-80D4FBB8 000350 0048+00 1/0 0/0 0/0 .text __dt__12J3DFrameCtrlFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm J3DFrameCtrl::~J3DFrameCtrl() { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/__dt__12J3DFrameCtrlFv.s" + J3DModelData* model_data = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 15); + mpModel[0] = mDoExt_J3DModel__create(model_data, 0x80000, 0x11000284); + if (mpModel[0] == NULL) { + return 0; + } + + btk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName, 19); + mpBtk[0] = new mDoExt_btkAnm(); + if (mpBtk[0] == NULL || + !mpBtk[0]->init(model_data, btk, TRUE, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1)) { + return 0; + } + + if (i_fopAcM_isSwitch(this, getSwitchNo2())) { + mpBtk[0]->setFrame(mpBtk[0]->getEndFrame()); + } + + btk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName, 20); + mpBtk[1] = new mDoExt_btkAnm(); + if (mpBtk[1] == NULL || + !mpBtk[1]->init(model_data, btk, TRUE, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1)) + { + return 0; + } + + model_data = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 16); + mpModel[1] = mDoExt_J3DModel__create(model_data, 0x80000, 0x11000084); + if (mpModel[1] == NULL) { + return 0; + } + + if (mBgW[0].Set((cBgD_t*)dComIfG_getObjectRes(l_arcName, 27), cBgW::MOVE_BG_e, &field_0x6f8[0])) { + return 0; + } + + return checkEqual(mBgW[1].Set((cBgD_t*)dComIfG_getObjectRes(l_arcName, 28), cBgW::MOVE_BG_e, &field_0x6f8[1]), 0); } -#pragma pop /* 80D4FBB8-80D4FBD8 000398 0020+00 1/0 0/0 0/0 .text daTagLv6Gate_Create__FP10fopAc_ac_c */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daTagLv6Gate_Create(fopAc_ac_c* param_0) { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Create__FP10fopAc_ac_c.s" +static int daTagLv6Gate_Create(fopAc_ac_c* i_this) { + return static_cast(i_this)->create(); } -#pragma pop -/* ############################################################################################## */ -/* 80D50930-80D5093C 000028 000C+00 0/1 0/0 0/0 .rodata @3803 */ +#ifdef NONMATCHING +void daTagLv6Gate_c::seStair() { + Vec se_pos = {0.0f, 1800.0f, -6800.0f}; + mDoAud_seStart(Z2SE_OBJ_LV6_GATE_STAIR, &se_pos, 0, 0); +} + +void daTagLv6Gate_c::seGlassOff() { + Vec se_pos = {0.0f, 2887.0f, -8330.0f}; + mDoAud_seStart(Z2SE_OBJ_LV6_GATE_GLASS_OFF, &se_pos, 0, 0); +} + +void daTagLv6Gate_c::seGlassOn() { + Vec se_pos = {0.0f, 2887.0f, -8330.0f}; + mDoAud_seStart(Z2SE_OBJ_LV6_GATE_GLASS_ON, &se_pos, 0, 0); +} +#else #pragma push #pragma force_active on SECTION_RODATA static u8 const lit_3803[12] = { @@ -381,113 +157,245 @@ SECTION_RODATA static u8 const lit_3847[12] = { }; COMPILER_STRIP_GATE(0x80D50948, &lit_3847); #pragma pop +#endif -/* 80D50954-80D50958 00004C 0004+00 0/1 0/0 0/0 .rodata @3942 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3942 = -50.0f; -COMPILER_STRIP_GATE(0x80D50954, &lit_3942); -#pragma pop +void daTagLv6Gate_c::initBaseMtx() { + fopAcM_SetMtx(this, mpModel[0]->getBaseTRMtx()); + + mDoMtx_stack_c::transS(0.0f, 0.0f, 0.0f); + mDoMtx_stack_c::YrotM(0); + MTXCopy(mDoMtx_stack_c::get(), field_0x6f8[0]); + mpModel[0]->i_setBaseTRMtx(mDoMtx_stack_c::get()); + mBgW[0].Move(); -/* 80D50958-80D5095C 000050 0004+00 0/2 0/0 0/0 .rodata @3943 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_3943[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x80D50958, &lit_3943); -#pragma pop + mDoMtx_stack_c::transS(0.0f, 2887.0f, -8330.0f); + mDoMtx_stack_c::YrotM(0); + MTXCopy(mDoMtx_stack_c::get(), field_0x6f8[1]); + mpModel[1]->i_setBaseTRMtx(mDoMtx_stack_c::get()); + mBgW[1].Move(); +} -/* 80D5095C-80D50960 000054 0004+00 0/1 0/0 0/0 .rodata @3944 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3944 = 50.0f; -COMPILER_STRIP_GATE(0x80D5095C, &lit_3944); -#pragma pop +void daTagLv6Gate_c::create_init() { + fopAcM_setCullSizeBox(this, -50.0f, 0.0f, -50.0f, 50.0f, 100.0f, 50.0f); + mAttentionInfo.mPosition = current.pos; + mAttentionInfo.mFlags = (i_fopAcM_isSwitch(this, getSwitchNo1()) != 0) ? 0 : 0x80; + mAttentionInfo.field_0x0[7] = 89; + mEvtId = -1; + field_0x76a = 0; -/* 80D50960-80D50964 000058 0004+00 0/1 0/0 0/0 .rodata @3945 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3945 = 100.0f; -COMPILER_STRIP_GATE(0x80D50960, &lit_3945); -#pragma pop + field_0x760[0] = 255.0f; + field_0x760[1] = 115.0f; -/* 80D50964-80D50968 00005C 0004+00 0/2 0/0 0/0 .rodata @3946 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3946 = 255.0f; -COMPILER_STRIP_GATE(0x80D50964, &lit_3946); -#pragma pop + initBaseMtx(); -/* 80D50968-80D5096C 000060 0004+00 0/2 0/0 0/0 .rodata @3947 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3947 = 115.0f; -COMPILER_STRIP_GATE(0x80D50968, &lit_3947); -#pragma pop - -/* 80D5096C-80D50970 000064 0004+00 0/1 0/0 0/0 .rodata @3948 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3948 = 2887.0f; -COMPILER_STRIP_GATE(0x80D5096C, &lit_3948); -#pragma pop - -/* 80D50970-80D50974 000068 0004+00 0/1 0/0 0/0 .rodata @3949 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3949 = -8330.0f; -COMPILER_STRIP_GATE(0x80D50970, &lit_3949); -#pragma pop - -/* 80D50974-80D50978 00006C 0004+00 0/1 0/0 0/0 .rodata @3950 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_3950 = 0xC1545C15; -COMPILER_STRIP_GATE(0x80D50974, &lit_3950); -#pragma pop - -/* 80D50978-80D5097C 000070 0004+00 0/1 0/0 0/0 .rodata @3951 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_3951 = 0xC62216DF; -COMPILER_STRIP_GATE(0x80D50978, &lit_3951); -#pragma pop + if (!i_fopAcM_isSwitch(this, getSwitchNo1())) { + mParentPcId = fopAcM_create(PROC_NPC_TKS, 2, &cXyz(-13.272481f, 2887.0f, -10373.718f), + fopAcM_GetRoomNo(this), &csXyz(0, 0x7FFF, 0), NULL, -1); + } +} /* 80D4FBD8-80D4FE5C 0003B8 0284+00 1/1 0/0 0/0 .text create__14daTagLv6Gate_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daTagLv6Gate_c::create() { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/create__14daTagLv6Gate_cFv.s" -} -#pragma pop +int daTagLv6Gate_c::create() { + fopAcM_SetupActor(this, daTagLv6Gate_c); -/* 80D4FE5C-80D4FEBC 00063C 0060+00 2/2 0/0 0/0 .text __dt__4dBgWFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm dBgW::~dBgW() { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/__dt__4dBgWFv.s" + int phase = dComIfG_resLoad(&mPhase, l_arcName); + + if (phase == cPhs_COMPLEATE_e) { + if (!fopAcM_entrySolidHeap(this, createSolidHeap, 0x7800)) { + return cPhs_ERROR_e; + } else { + create_init(); + } + } + + return phase; } -#pragma pop /* 80D4FEBC-80D4FEDC 00069C 0020+00 1/0 0/0 0/0 .text daTagLv6Gate_Execute__FP14daTagLv6Gate_c */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daTagLv6Gate_Execute(daTagLv6Gate_c* param_0) { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Execute__FP14daTagLv6Gate_c.s" +static int daTagLv6Gate_Execute(daTagLv6Gate_c* i_this) { + return i_this->execute(); } -#pragma pop -/* ############################################################################################## */ +#ifdef NONMATCHING +bool daTagLv6Gate_c::checkOpenArea() { + fopAc_ac_c* actor; + cXyz pos; + + if (!i_fopAcM_isSwitch(this, getSwitchNo2())) { + return false; + } + + mDoMtx_stack_c::copy(mpModel[1]->getBaseTRMtx()); + mDoMtx_stack_c::inverse(); + + for (int i = 0; i < 2; i++) { + actor = (i == 0) ? daPy_getPlayerActorClass() : i_fopAcM_SearchByName(PROC_NPC_TKS); + if (actor != NULL) { + mDoMtx_stack_c::push(); + mDoMtx_stack_c::multVec(&fopAcM_GetPosition_p(actor), &pos); + mDoMtx_stack_c::pop(); + if (pos.x >= l_minRelative[0] && pos.x <= l_maxRelative[0] && + pos.z >= l_minRelative[2] && pos.z <= l_maxRelative[2]) + { + return true; + } + } + } + + return false; +} + +void daTagLv6Gate_c::cut1() { + i_dComIfGp_getEvent().setSkipZev(this, "LV6_GATE_APPEAR_SKIP"); + + cXyz pos(0.0f, 0.0f, 78.0f); + + mDoMtx_stack_c::transS(current.pos); + mDoMtx_stack_c::YrotM(shape_angle.y); + mDoMtx_stack_c::multVec(&pos, &pos); + daPy_getPlayerActorClass()->setPlayerPosAndAngle(&pos, shape_angle.y + 0x10000 - 0x8000, 0); +} + +void daTagLv6Gate_c::cut2() { + cXyz pos(0.0f, 0.0f, 0.0f); + dComIfGp_particle_set(0x8B89, &pos, &csXyz(0, 0, 0), NULL); +} + +void daTagLv6Gate_c::cut4() { + cXyz pos(117.8473f, 1677.0f, -5110.8394f); + + fopAc_ac_c* actor2; + fopAc_ac_c* actor1; + + actor1 = NULL; + fopAcM_SearchByID(mParentPcId, &actor1); + + if (actor1 == NULL) { + return; + } + + fopAcM_GetOldPosition_p(actor1) = pos; + fopAcM_GetPosition_p(actor1) = pos; + + actor2 = NULL; + fopAcM_SearchByName(PROC_NPC_TKC, &actor2); + + if (actor2 == NULL) { + return; + } + + fopAcM_GetOldPosition_p(actor2) = pos; + fopAcM_GetPosition_p(actor2) = pos; +} + +/* 80D4FEDC-80D5068C 0006BC 07B0+00 1/1 0/0 0/0 .text execute__14daTagLv6Gate_cFv */ +int daTagLv6Gate_c::execute() { + // Fake match? + dComIfG_play_c& play = g_dComIfG_gameInfo.getPlay(); + if (i_dComIfGp_event_runCheck() && !mEvtInfo.checkCommandTalk()) { + s32 cut_index = i_dComIfGp_evmng_getMyStaffId(l_arcName, NULL, 0); + if (cut_index != -1) { + // int* cut_name = (int*)i_dComIfGp_getEventManager().getMyNowCutName(cut_index); + int* cut_name = (int*)play.getEvtManager().getMyNowCutName(cut_index); + + daPy_getPlayerActorClass()->onShieldBackBone(); + + if (dComIfGp_evmng_getIsAddvance(cut_index)) { + switch (*cut_name) { + case '0001': + cut1(); + break; + case '0002': + cut2(); + break; + case '0003': + i_fopAcM_onSwitch(this, getSwitchNo2()); + seStair(); + break; + case '0004': + cut4(); + break; + case '0006': + i_fopAcM_onSwitch(this, getSwitchNo2()); + mpBtk[0]->setFrame(mpBtk[0]->getEndFrame()); + if (!mBgW[0].ChkUsed()) { + dComIfG_Bgsp().Regist(&mBgW[0], this); + } + fopAcM_delete(mParentPcId); + } + } + + switch (*cut_name) { + case '0001': + case '0002': + case '0003': + case '0004': + case '0005': + case '0006': + dComIfGp_evmng_cutEnd(cut_index); + } + + if (mEvtInfo.checkCommandDemoAccrpt() && mEvtId != -1 && + dComIfGp_evmng_endCheck(mEvtId)) { + i_dComIfGp_event_reset(); + mEvtId = -1; + } + } + } else if (field_0x76a && !i_fopAcM_isSwitch(this, getSwitchNo1())) { + mEvtInfo.setArchiveName(l_arcName); + i_dComIfGp_getEventManager().setObjectArchive(mEvtInfo.getArchiveName()); + mEvtId = i_dComIfGp_getEventManager().getEventIdx(this, "LV6_GATE_APPEAR", -1); + fopAcM_orderOtherEventId(this, mEvtId, -1, -1, 0, 1); + i_fopAcM_onSwitch(this, getSwitchNo1()); + mAttentionInfo.mFlags = 0; + } + + if (i_fopAcM_isSwitch(this, getSwitchNo2())) { + if (!mBgW[0].ChkUsed()) { + dComIfG_Bgsp().Regist(&mBgW[0], this); + } + + mpBtk[0]->play(); + mpBtk[1]->play(); + } + + if (checkOpenArea()) { + if (mBgW[1].ChkUsed()) { + dComIfG_Bgsp().Release(&mBgW[1]); + seGlassOff(); + } + + field_0x760[0] -= 12.75f; + field_0x760[1] -= 5.75f; + + if (field_0x760[0] < 0.0f) { + field_0x760[0] = 0.0f; + } + + if (field_0x760[1] < 0.0f) { + field_0x760[1] = 0.0f; + } + } else { + if (!mBgW[1].ChkUsed()) { + dComIfG_Bgsp().Regist(&mBgW[1], this); + seGlassOn(); + } + + field_0x760[0] += 12.75f; + field_0x760[1] += 5.75f; + + if (field_0x760[0] > 255.0f) { + field_0x760[0] = 255.0f; + } + + if (field_0x760[1] > 115.0f) { + field_0x760[1] = 115.0f; + } + } + + return 1; +} +#else /* 80D5097C-80D50980 000074 0004+00 0/1 0/0 0/0 .rodata @4155 */ #pragma push #pragma force_active on @@ -544,49 +452,92 @@ SECTION_DEAD static char const* const stringBase_80D509A0 = "LV6_GATE_APPEAR_SKI SECTION_DEAD static char const* const stringBase_80D509B5 = "LV6_GATE_APPEAR"; #pragma pop -/* 80D4FEDC-80D5068C 0006BC 07B0+00 1/1 0/0 0/0 .text execute__14daTagLv6Gate_cFv */ #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daTagLv6Gate_c::execute() { +asm int daTagLv6Gate_c::execute() { nofralloc #include "asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/execute__14daTagLv6Gate_cFv.s" } #pragma pop +#endif /* 80D5068C-80D506AC 000E6C 0020+00 1/0 0/0 0/0 .text daTagLv6Gate_Draw__FP14daTagLv6Gate_c */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daTagLv6Gate_Draw(daTagLv6Gate_c* param_0) { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Draw__FP14daTagLv6Gate_c.s" +static int daTagLv6Gate_Draw(daTagLv6Gate_c* i_this) { + return i_this->draw(); } -#pragma pop /* 80D506AC-80D50848 000E8C 019C+00 1/1 0/0 0/0 .text draw__14daTagLv6Gate_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daTagLv6Gate_c::draw() { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/draw__14daTagLv6Gate_cFv.s" +int daTagLv6Gate_c::draw() { + g_env_light.settingTevStruct(16, ¤t.pos, &mTevStr); + + dComIfGd_setListBG(); + + if (i_fopAcM_isSwitch(this, getSwitchNo2())) { + g_env_light.setLightTevColorType_MAJI(mpModel[0], &mTevStr); + mpBtk[0]->entry(mpModel[0]->getModelData()); + mpBtk[1]->entry(mpModel[0]->getModelData()); + mDoExt_modelUpdateDL(mpModel[0]); + + mpBtk[0]->remove(mpModel[0]->getModelData()); + mpBtk[1]->remove(mpModel[0]->getModelData()); + } + + for (u16 i = 0; i < 2; i++) { + J3DModelData* model_data = mpModel[1]->getModelData(); + model_data->getMaterialNodePointer(i)->getTevKColor(3)->a = field_0x760[i]; + } + + g_env_light.setLightTevColorType_MAJI(mpModel[1], &mTevStr); + mDoExt_modelUpdateDL(mpModel[1]); + + dComIfGd_setList(); + + return 1; } -#pragma pop /* 80D50848-80D50850 001028 0008+00 1/0 0/0 0/0 .text daTagLv6Gate_IsDelete__FP14daTagLv6Gate_c */ -static bool daTagLv6Gate_IsDelete(daTagLv6Gate_c* param_0) { - return true; +static int daTagLv6Gate_IsDelete(daTagLv6Gate_c* i_this) { + return 1; +} + +daTagLv6Gate_c::~daTagLv6Gate_c() { + if (mBgW[0].ChkUsed()) { + dComIfG_Bgsp().Release(&mBgW[0]); + } + if (mBgW[1].ChkUsed()) { + dComIfG_Bgsp().Release(&mBgW[1]); + } + dComIfG_resDelete(&mPhase, l_arcName); } /* 80D50850-80D50900 001030 00B0+00 1/0 0/0 0/0 .text daTagLv6Gate_Delete__FP14daTagLv6Gate_c */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daTagLv6Gate_Delete(daTagLv6Gate_c* param_0) { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_Lv6Gate/d_a_tag_Lv6Gate/daTagLv6Gate_Delete__FP14daTagLv6Gate_c.s" +static int daTagLv6Gate_Delete(daTagLv6Gate_c* i_this) { + i_this->~daTagLv6Gate_c(); + return 1; } -#pragma pop -/* 80D50998-80D50998 000090 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ +/* 80D509CC-80D509EC -00001 0020+00 1/0 0/0 0/0 .data l_daTagLv6Gate_Method */ +static actor_method_class l_daTagLv6Gate_Method = { + (process_method_func)daTagLv6Gate_Create, (process_method_func)daTagLv6Gate_Delete, + (process_method_func)daTagLv6Gate_Execute, (process_method_func)daTagLv6Gate_IsDelete, + (process_method_func)daTagLv6Gate_Draw, +}; + +/* 80D509EC-80D50A1C -00001 0030+00 0/0 0/0 1/0 .data g_profile_Tag_Lv6Gate */ +extern actor_process_profile_definition g_profile_Tag_Lv6Gate = { + fpcLy_CURRENT_e, // mLayerID + 7, // mListID + fpcPi_CURRENT_e, // mListPrio + PROC_Tag_Lv6Gate, // mProcName + &g_fpcLf_Method.mBase, // mSubMtd + sizeof(daTagLv6Gate_c), // mSize + 0, // mSizeOther + 0, // mParameters + &g_fopAc_Method.base, // mSubMtd + 262, // mPriority + &l_daTagLv6Gate_Method, // mSubMtd + 0x40000, // mStatus + 0, // mActorType + fopAc_CULLBOX_CUSTOM_e, // mCullType +}; diff --git a/rel/d/a/tag/d_a_tag_Lv7Gate/d_a_tag_Lv7Gate.cpp b/rel/d/a/tag/d_a_tag_Lv7Gate/d_a_tag_Lv7Gate.cpp index 44520e98f59..550d13b1900 100644 --- a/rel/d/a/tag/d_a_tag_Lv7Gate/d_a_tag_Lv7Gate.cpp +++ b/rel/d/a/tag/d_a_tag_Lv7Gate/d_a_tag_Lv7Gate.cpp @@ -12,7 +12,7 @@ /* 80D51B50-80D51B54 -00001 0004+00 5/5 0/0 0/0 .data l_arcName */ static char* l_arcName = "Lv7Gate"; -inline int daTagLv7Gate_c::createHeap() { +int daTagLv7Gate_c::createHeap() { // Watched City in the Sky start cutscene if (i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[510])) { return 1; @@ -70,7 +70,7 @@ int daTagLv7Gate_c::create() { return phase; } -inline void daTagLv7Gate_c::setPath(u8 i_path_ID) { +void daTagLv7Gate_c::setPath(u8 i_path_ID) { mRoomPath = dPath_GetRoomPath(i_path_ID, fopAcM_GetRoomNo(this)); if (mRoomPath != NULL) { dStage_dPnt_c* pnt = dPath_GetPnt(mRoomPath, 0); @@ -97,11 +97,11 @@ inline void daTagLv7Gate_c::setPath(u8 i_path_ID) { } } -inline void daTagLv7Gate_c::initBaseMtx() { +void daTagLv7Gate_c::initBaseMtx() { fopAcM_SetMtx(this, mpModel->getBaseTRMtx()); } -inline void daTagLv7Gate_c::setBaseMtx() { +void daTagLv7Gate_c::setBaseMtx() { if (mpModel) { cXyz local_34(0.0f, 0.0f, speedF); @@ -176,7 +176,7 @@ static int daTagLv7Gate_Execute(daTagLv7Gate_c* i_this) { return i_this->execute(); } -inline void daTagLv7Gate_c::flyAnime() { +void daTagLv7Gate_c::flyAnime() { J3DAnmTransform* bck = NULL; J3DAnmTransform* bck_anm = mpBck->getBckAnm(); @@ -262,13 +262,11 @@ int daTagLv7Gate_c::execute() { break; } - if (mEvtInfo.checkCommandDemoAccrpt() && mEvtId != -1) { - cut_index = dComIfGp_evmng_endCheck(mEvtId); - if (cut_index != 0) { - i_dComIfGp_event_reset(); - mEvtId = -1; - fopAcM_delete(this); - } + if (mEvtInfo.checkCommandDemoAccrpt() && mEvtId != -1 && + dComIfGp_evmng_endCheck(mEvtId)) { + i_dComIfGp_event_reset(); + mEvtId = -1; + fopAcM_delete(this); } field_0x5b0 = true; @@ -292,7 +290,7 @@ int daTagLv7Gate_c::execute() { return 1; } -inline bool daTagLv7Gate_c::checkPoint(f32 i_speed) { +bool daTagLv7Gate_c::checkPoint(f32 i_speed) { dStage_dPnt_c* pnt = dPath_GetPnt(mRoomPath, field_0x5a0); mDistance -= i_speed; if (sqrtf(PSVECSquareDistance((Vec*)&mPos1, (Vec*)&pnt->m_position)) < i_speed || @@ -302,7 +300,7 @@ inline bool daTagLv7Gate_c::checkPoint(f32 i_speed) { return false; } -inline bool daTagLv7Gate_c::setNextPoint() { +bool daTagLv7Gate_c::setNextPoint() { bool bVar1; dPath_GetPnt(mRoomPath, field_0x5a0); field_0x5a0 += 1; @@ -341,7 +339,7 @@ void daTagLv7Gate_c::calcFly() { cLib_addCalcAngleS2(&field_0x594.z, (field_0x594.y - angle_y) * 4, 0x23, 0x100); } -inline int daTagLv7Gate_c::draw() { +int daTagLv7Gate_c::draw() { if (field_0x5b1) { g_env_light.settingTevStruct(0, &mPos1, &mTevStr); g_env_light.setLightTevColorType_MAJI(mpModel, &mTevStr); @@ -362,7 +360,7 @@ static int daTagLv7Gate_IsDelete(daTagLv7Gate_c* i_this) { return 1; } -inline daTagLv7Gate_c::~daTagLv7Gate_c() { +daTagLv7Gate_c::~daTagLv7Gate_c() { // Watched City in the Sky start cutscene dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[510]); dComIfG_resDelete(&mPhase, l_arcName);