diff --git a/asm/rel/d/a/d_a_suspend/d_a_suspend/create__7daSus_cFv.s b/asm/rel/d/a/d_a_suspend/d_a_suspend/create__7daSus_cFv.s deleted file mode 100644 index 42bcc0085c..0000000000 --- a/asm/rel/d/a/d_a_suspend/d_a_suspend/create__7daSus_cFv.s +++ /dev/null @@ -1,54 +0,0 @@ -lbl_804D5118: -/* 804D5118 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 804D511C 7C 08 02 A6 */ mflr r0 -/* 804D5120 90 01 00 14 */ stw r0, 0x14(r1) -/* 804D5124 7C 65 1B 78 */ mr r5, r3 -/* 804D5128 3C 60 80 4D */ lis r3, lit_3640@ha /* 0x804D523C@ha */ -/* 804D512C 38 83 52 3C */ addi r4, r3, lit_3640@l /* 0x804D523C@l */ -/* 804D5130 88 05 04 E2 */ lbz r0, 0x4e2(r5) -/* 804D5134 7C 00 07 75 */ extsb. r0, r0 -/* 804D5138 7C 03 03 78 */ mr r3, r0 -/* 804D513C 40 80 00 10 */ bge lbl_804D514C -/* 804D5140 80 05 00 B0 */ lwz r0, 0xb0(r5) -/* 804D5144 54 00 B6 3E */ rlwinm r0, r0, 0x16, 0x18, 0x1f -/* 804D5148 7C 03 07 74 */ extsb r3, r0 -lbl_804D514C: -/* 804D514C 80 05 00 B0 */ lwz r0, 0xb0(r5) -/* 804D5150 54 06 06 3E */ clrlwi r6, r0, 0x18 -/* 804D5154 54 07 C7 FE */ rlwinm r7, r0, 0x18, 0x1f, 0x1f -/* 804D5158 54 08 BF FE */ rlwinm r8, r0, 0x17, 0x1f, 0x1f -/* 804D515C 54 00 17 BF */ rlwinm. r0, r0, 2, 0x1e, 0x1f -/* 804D5160 41 82 00 34 */ beq lbl_804D5194 -/* 804D5164 C0 05 04 EC */ lfs f0, 0x4ec(r5) -/* 804D5168 C0 44 00 00 */ lfs f2, 0(r4) -/* 804D516C EC 00 00 B2 */ fmuls f0, f0, f2 -/* 804D5170 D0 05 04 EC */ stfs f0, 0x4ec(r5) -/* 804D5174 C0 25 04 F0 */ lfs f1, 0x4f0(r5) -/* 804D5178 C0 04 00 04 */ lfs f0, 4(r4) -/* 804D517C EC 01 00 32 */ fmuls f0, f1, f0 -/* 804D5180 D0 05 04 F0 */ stfs f0, 0x4f0(r5) -/* 804D5184 C0 05 04 F4 */ lfs f0, 0x4f4(r5) -/* 804D5188 EC 00 00 B2 */ fmuls f0, f0, f2 -/* 804D518C D0 05 04 F4 */ stfs f0, 0x4f4(r5) -/* 804D5190 48 00 00 30 */ b lbl_804D51C0 -lbl_804D5194: -/* 804D5194 C0 05 04 EC */ lfs f0, 0x4ec(r5) -/* 804D5198 C0 44 00 08 */ lfs f2, 8(r4) -/* 804D519C EC 00 00 B2 */ fmuls f0, f0, f2 -/* 804D51A0 D0 05 04 EC */ stfs f0, 0x4ec(r5) -/* 804D51A4 C0 25 04 F0 */ lfs f1, 0x4f0(r5) -/* 804D51A8 C0 04 00 0C */ lfs f0, 0xc(r4) -/* 804D51AC EC 01 00 32 */ fmuls f0, f1, f0 -/* 804D51B0 D0 05 04 F0 */ stfs f0, 0x4f0(r5) -/* 804D51B4 C0 05 04 F4 */ lfs f0, 0x4f4(r5) -/* 804D51B8 EC 00 00 B2 */ fmuls f0, f0, f2 -/* 804D51BC D0 05 04 F4 */ stfs f0, 0x4f4(r5) -lbl_804D51C0: -/* 804D51C0 38 85 04 D0 */ addi r4, r5, 0x4d0 -/* 804D51C4 38 A5 04 EC */ addi r5, r5, 0x4ec -/* 804D51C8 4B B5 C0 81 */ bl newData__7daSus_cFScRC4cXyzRC4cXyzUcUcUc -/* 804D51CC 38 60 00 04 */ li r3, 4 -/* 804D51D0 80 01 00 14 */ lwz r0, 0x14(r1) -/* 804D51D4 7C 08 03 A6 */ mtlr r0 -/* 804D51D8 38 21 00 10 */ addi r1, r1, 0x10 -/* 804D51DC 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/d_a_vrbox/d_a_vrbox/daVrbox_Create__FP10fopAc_ac_c.s b/asm/rel/d/a/d_a_vrbox/d_a_vrbox/daVrbox_Create__FP10fopAc_ac_c.s deleted file mode 100644 index f150885d2c..0000000000 --- a/asm/rel/d/a/d_a_vrbox/d_a_vrbox/daVrbox_Create__FP10fopAc_ac_c.s +++ /dev/null @@ -1,48 +0,0 @@ -lbl_804988DC: -/* 804988DC 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 804988E0 7C 08 02 A6 */ mflr r0 -/* 804988E4 90 01 00 14 */ stw r0, 0x14(r1) -/* 804988E8 93 E1 00 0C */ stw r31, 0xc(r1) -/* 804988EC 93 C1 00 08 */ stw r30, 8(r1) -/* 804988F0 7C 7E 1B 78 */ mr r30, r3 -/* 804988F4 80 03 04 A0 */ lwz r0, 0x4a0(r3) -/* 804988F8 54 00 07 39 */ rlwinm. r0, r0, 0, 0x1c, 0x1c -/* 804988FC 40 82 00 1C */ bne lbl_80498918 -/* 80498900 28 1E 00 00 */ cmplwi r30, 0 -/* 80498904 41 82 00 08 */ beq lbl_8049890C -/* 80498908 4B B8 02 5D */ bl __ct__10fopAc_ac_cFv -lbl_8049890C: -/* 8049890C 80 1E 04 A0 */ lwz r0, 0x4a0(r30) -/* 80498910 60 00 00 08 */ ori r0, r0, 8 -/* 80498914 90 1E 04 A0 */ stw r0, 0x4a0(r30) -lbl_80498918: -/* 80498918 38 00 00 00 */ li r0, 0 -/* 8049891C 98 1E 05 74 */ stb r0, 0x574(r30) -/* 80498920 3B E0 00 04 */ li r31, 4 -/* 80498924 7F C3 F3 78 */ mr r3, r30 -/* 80498928 3C 80 80 4A */ lis r4, daVrbox_solidHeapCB__FP10fopAc_ac_c@ha /* 0x80498868@ha */ -/* 8049892C 38 84 88 68 */ addi r4, r4, daVrbox_solidHeapCB__FP10fopAc_ac_c@l /* 0x80498868@l */ -/* 80498930 38 A0 0C 60 */ li r5, 0xc60 -/* 80498934 4B B8 1B 7D */ bl fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl -/* 80498938 54 60 06 3F */ clrlwi. r0, r3, 0x18 -/* 8049893C 41 82 00 2C */ beq lbl_80498968 -/* 80498940 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80498944 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80498948 A0 03 5D 46 */ lhz r0, 0x5d46(r3) -/* 8049894C 60 00 00 01 */ ori r0, r0, 1 -/* 80498950 B0 03 5D 46 */ sth r0, 0x5d46(r3) -/* 80498954 38 00 00 00 */ li r0, 0 -/* 80498958 3C 60 80 43 */ lis r3, g_env_light@ha /* 0x8042CA54@ha */ -/* 8049895C 38 63 CA 54 */ addi r3, r3, g_env_light@l /* 0x8042CA54@l */ -/* 80498960 98 03 12 D4 */ stb r0, 0x12d4(r3) -/* 80498964 48 00 00 08 */ b lbl_8049896C -lbl_80498968: -/* 80498968 3B E0 00 05 */ li r31, 5 -lbl_8049896C: -/* 8049896C 7F E3 FB 78 */ mr r3, r31 -/* 80498970 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 80498974 83 C1 00 08 */ lwz r30, 8(r1) -/* 80498978 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8049897C 7C 08 03 A6 */ mtlr r0 -/* 80498980 38 21 00 10 */ addi r1, r1, 0x10 -/* 80498984 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/d_a_vrbox/d_a_vrbox/daVrbox_Draw__FP11vrbox_class.s b/asm/rel/d/a/d_a_vrbox/d_a_vrbox/daVrbox_Draw__FP11vrbox_class.s deleted file mode 100644 index 6ac63d7562..0000000000 --- a/asm/rel/d/a/d_a_vrbox/d_a_vrbox/daVrbox_Draw__FP11vrbox_class.s +++ /dev/null @@ -1,114 +0,0 @@ -lbl_80498518: -/* 80498518 94 21 FF D0 */ stwu r1, -0x30(r1) -/* 8049851C 7C 08 02 A6 */ mflr r0 -/* 80498520 90 01 00 34 */ stw r0, 0x34(r1) -/* 80498524 DB E1 00 20 */ stfd f31, 0x20(r1) -/* 80498528 F3 E1 00 28 */ psq_st f31, 40(r1), 0, 0 /* qr0 */ -/* 8049852C 39 61 00 20 */ addi r11, r1, 0x20 -/* 80498530 4B EC 9C A9 */ bl _savegpr_28 -/* 80498534 83 E3 05 6C */ lwz r31, 0x56c(r3) -/* 80498538 3C 80 80 4A */ lis r4, lit_3695@ha /* 0x80498990@ha */ -/* 8049853C C3 E4 89 90 */ lfs f31, lit_3695@l(r4) /* 0x80498990@l */ -/* 80498540 3B A0 00 00 */ li r29, 0 -/* 80498544 48 00 01 75 */ bl daVrbox_color_set__FP11vrbox_class -/* 80498548 3C 60 80 43 */ lis r3, g_env_light@ha /* 0x8042CA54@ha */ -/* 8049854C 38 63 CA 54 */ addi r3, r3, g_env_light@l /* 0x8042CA54@l */ -/* 80498550 88 03 12 D4 */ lbz r0, 0x12d4(r3) -/* 80498554 28 00 00 00 */ cmplwi r0, 0 -/* 80498558 41 82 00 0C */ beq lbl_80498564 -/* 8049855C 38 60 00 01 */ li r3, 1 -/* 80498560 48 00 01 38 */ b lbl_80498698 -lbl_80498564: -/* 80498564 3C 60 80 45 */ lis r3, mStayNo__20dStage_roomControl_c+0x0@ha /* 0x80450D64@ha */ -/* 80498568 88 83 0D 64 */ lbz r4, mStayNo__20dStage_roomControl_c+0x0@l(r3) /* 0x80450D64@l */ -/* 8049856C 7C 84 07 75 */ extsb. r4, r4 -/* 80498570 41 80 00 28 */ blt lbl_80498598 -/* 80498574 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80498578 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 8049857C 38 63 4E C4 */ addi r3, r3, 0x4ec4 -/* 80498580 4B B8 BE 05 */ bl getStatusRoomDt__20dStage_roomControl_cFi -/* 80498584 81 83 00 00 */ lwz r12, 0(r3) -/* 80498588 81 8C 01 0C */ lwz r12, 0x10c(r12) -/* 8049858C 7D 89 03 A6 */ mtctr r12 -/* 80498590 4E 80 04 21 */ bctrl -/* 80498594 7C 7D 1B 78 */ mr r29, r3 -lbl_80498598: -/* 80498598 28 1D 00 00 */ cmplwi r29, 0 -/* 8049859C 41 82 00 08 */ beq lbl_804985A4 -/* 804985A0 C3 FD 00 04 */ lfs f31, 4(r29) -lbl_804985A4: -/* 804985A4 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 804985A8 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 804985AC 80 83 61 B0 */ lwz r4, 0x61b0(r3) -/* 804985B0 28 04 00 00 */ cmplwi r4, 0 -/* 804985B4 41 82 00 1C */ beq lbl_804985D0 -/* 804985B8 3C 60 80 4A */ lis r3, lit_3696@ha /* 0x80498994@ha */ -/* 804985BC C0 23 89 94 */ lfs f1, lit_3696@l(r3) /* 0x80498994@l */ -/* 804985C0 C0 04 01 8C */ lfs f0, 0x18c(r4) -/* 804985C4 EC 00 F8 28 */ fsubs f0, f0, f31 -/* 804985C8 EC 41 00 32 */ fmuls f2, f1, f0 -/* 804985CC 48 00 00 0C */ b lbl_804985D8 -lbl_804985D0: -/* 804985D0 3C 60 80 4A */ lis r3, lit_3695@ha /* 0x80498990@ha */ -/* 804985D4 C0 43 89 90 */ lfs f2, lit_3695@l(r3) /* 0x80498990@l */ -lbl_804985D8: -/* 804985D8 3C 60 80 3E */ lis r3, now__14mDoMtx_stack_c@ha /* 0x803DD470@ha */ -/* 804985DC 38 63 D4 70 */ addi r3, r3, now__14mDoMtx_stack_c@l /* 0x803DD470@l */ -/* 804985E0 C0 24 01 7C */ lfs f1, 0x17c(r4) -/* 804985E4 C0 04 01 8C */ lfs f0, 0x18c(r4) -/* 804985E8 EC 40 10 28 */ fsubs f2, f0, f2 -/* 804985EC C0 64 01 9C */ lfs f3, 0x19c(r4) -/* 804985F0 4B EA E2 F9 */ bl PSMTXTrans -/* 804985F4 3C 60 80 3E */ lis r3, now__14mDoMtx_stack_c@ha /* 0x803DD470@ha */ -/* 804985F8 38 63 D4 70 */ addi r3, r3, now__14mDoMtx_stack_c@l /* 0x803DD470@l */ -/* 804985FC 38 9F 00 24 */ addi r4, r31, 0x24 -/* 80498600 4B EA DE B1 */ bl PSMTXCopy -/* 80498604 4B D1 00 29 */ bl dKy_GxFog_set__Fv -/* 80498608 A0 7F 00 5C */ lhz r3, 0x5c(r31) -/* 8049860C 3B 83 FF FF */ addi r28, r3, -1 -/* 80498610 3B A0 00 02 */ li r29, 2 -/* 80498614 48 00 00 38 */ b lbl_8049864C -lbl_80498618: -/* 80498618 80 7F 00 60 */ lwz r3, 0x60(r31) -/* 8049861C 57 80 13 BA */ rlwinm r0, r28, 2, 0xe, 0x1d -/* 80498620 7C 63 00 2E */ lwzx r3, r3, r0 -/* 80498624 28 03 00 00 */ cmplwi r3, 0 -/* 80498628 41 82 00 1C */ beq lbl_80498644 -/* 8049862C 80 63 00 34 */ lwz r3, 0x34(r3) -/* 80498630 81 83 00 00 */ lwz r12, 0(r3) -/* 80498634 81 8C 00 30 */ lwz r12, 0x30(r12) -/* 80498638 7D 89 03 A6 */ mtctr r12 -/* 8049863C 4E 80 04 21 */ bctrl -/* 80498640 7C 7E 1B 78 */ mr r30, r3 -lbl_80498644: -/* 80498644 9B BE 00 00 */ stb r29, 0(r30) -/* 80498648 3B 9C FF FF */ addi r28, r28, -1 -lbl_8049864C: -/* 8049864C 2C 1C 00 00 */ cmpwi r28, 0 -/* 80498650 40 80 FF C8 */ bge lbl_80498618 -/* 80498654 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80498658 38 83 61 C0 */ addi r4, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 8049865C 80 04 5F 64 */ lwz r0, 0x5f64(r4) -/* 80498660 3C 60 80 43 */ lis r3, j3dSys@ha /* 0x80434AC8@ha */ -/* 80498664 3B C3 4A C8 */ addi r30, r3, j3dSys@l /* 0x80434AC8@l */ -/* 80498668 90 1E 00 48 */ stw r0, 0x48(r30) -/* 8049866C 80 04 5F 68 */ lwz r0, 0x5f68(r4) -/* 80498670 90 1E 00 4C */ stw r0, 0x4c(r30) -/* 80498674 7F E3 FB 78 */ mr r3, r31 -/* 80498678 4B B7 56 4D */ bl mDoExt_modelUpdateDL__FP8J3DModel -/* 8049867C 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80498680 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80498684 80 03 5F 80 */ lwz r0, 0x5f80(r3) -/* 80498688 90 1E 00 48 */ stw r0, 0x48(r30) -/* 8049868C 80 03 5F 84 */ lwz r0, 0x5f84(r3) -/* 80498690 90 1E 00 4C */ stw r0, 0x4c(r30) -/* 80498694 38 60 00 01 */ li r3, 1 -lbl_80498698: -/* 80498698 E3 E1 00 28 */ psq_l f31, 40(r1), 0, 0 /* qr0 */ -/* 8049869C CB E1 00 20 */ lfd f31, 0x20(r1) -/* 804986A0 39 61 00 20 */ addi r11, r1, 0x20 -/* 804986A4 4B EC 9B 81 */ bl _restgpr_28 -/* 804986A8 80 01 00 34 */ lwz r0, 0x34(r1) -/* 804986AC 7C 08 03 A6 */ mtlr r0 -/* 804986B0 38 21 00 30 */ addi r1, r1, 0x30 -/* 804986B4 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/d_a_vrbox/d_a_vrbox/daVrbox_color_set__FP11vrbox_class.s b/asm/rel/d/a/d_a_vrbox/d_a_vrbox/daVrbox_color_set__FP11vrbox_class.s deleted file mode 100644 index a14476165d..0000000000 --- a/asm/rel/d/a/d_a_vrbox/d_a_vrbox/daVrbox_color_set__FP11vrbox_class.s +++ /dev/null @@ -1,107 +0,0 @@ -lbl_804986B8: -/* 804986B8 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 804986BC 7C 08 02 A6 */ mflr r0 -/* 804986C0 90 01 00 24 */ stw r0, 0x24(r1) -/* 804986C4 39 61 00 20 */ addi r11, r1, 0x20 -/* 804986C8 4B EC 9B 15 */ bl _savegpr_29 -/* 804986CC 3C 80 80 43 */ lis r4, g_env_light@ha /* 0x8042CA54@ha */ -/* 804986D0 3B E4 CA 54 */ addi r31, r4, g_env_light@l /* 0x8042CA54@l */ -/* 804986D4 A9 7F 10 CC */ lha r11, 0x10cc(r31) -/* 804986D8 A9 5F 10 CA */ lha r10, 0x10ca(r31) -/* 804986DC A9 3F 10 C8 */ lha r9, 0x10c8(r31) -/* 804986E0 A9 1F 10 C4 */ lha r8, 0x10c4(r31) -/* 804986E4 A8 FF 10 C2 */ lha r7, 0x10c2(r31) -/* 804986E8 A8 DF 10 C0 */ lha r6, 0x10c0(r31) -/* 804986EC A8 BF 10 E4 */ lha r5, 0x10e4(r31) -/* 804986F0 A8 9F 10 E0 */ lha r4, 0x10e0(r31) -/* 804986F4 A8 1F 10 E2 */ lha r0, 0x10e2(r31) -/* 804986F8 7C 00 2A 14 */ add r0, r0, r5 -/* 804986FC 7C 00 32 14 */ add r0, r0, r6 -/* 80498700 7C 00 3A 14 */ add r0, r0, r7 -/* 80498704 7C 00 42 14 */ add r0, r0, r8 -/* 80498708 7C 00 4A 14 */ add r0, r0, r9 -/* 8049870C 7C 00 52 14 */ add r0, r0, r10 -/* 80498710 7C 00 5A 14 */ add r0, r0, r11 -/* 80498714 7C 04 02 15 */ add. r0, r4, r0 -/* 80498718 40 82 00 14 */ bne lbl_8049872C -/* 8049871C 38 00 00 01 */ li r0, 1 -/* 80498720 98 1F 12 D4 */ stb r0, 0x12d4(r31) -/* 80498724 38 60 00 01 */ li r3, 1 -/* 80498728 48 00 01 10 */ b lbl_80498838 -lbl_8049872C: -/* 8049872C 38 00 00 00 */ li r0, 0 -/* 80498730 98 1F 12 D4 */ stb r0, 0x12d4(r31) -/* 80498734 80 63 05 6C */ lwz r3, 0x56c(r3) -/* 80498738 83 C3 00 04 */ lwz r30, 4(r3) -/* 8049873C 80 7E 00 60 */ lwz r3, 0x60(r30) -/* 80498740 83 A3 00 00 */ lwz r29, 0(r3) -/* 80498744 28 1D 00 00 */ cmplwi r29, 0 -/* 80498748 41 82 00 6C */ beq lbl_804987B4 -/* 8049874C 80 7D 00 24 */ lwz r3, 0x24(r29) -/* 80498750 38 80 00 00 */ li r4, 0 -/* 80498754 81 83 00 00 */ lwz r12, 0(r3) -/* 80498758 81 8C 00 74 */ lwz r12, 0x74(r12) -/* 8049875C 7D 89 03 A6 */ mtctr r12 -/* 80498760 4E 80 04 21 */ bctrl -/* 80498764 7F A3 EB 78 */ mr r3, r29 -/* 80498768 81 9D 00 00 */ lwz r12, 0(r29) -/* 8049876C 81 8C 00 2C */ lwz r12, 0x2c(r12) -/* 80498770 7D 89 03 A6 */ mtctr r12 -/* 80498774 4E 80 04 21 */ bctrl -/* 80498778 A8 1F 10 C0 */ lha r0, 0x10c0(r31) -/* 8049877C B0 01 00 08 */ sth r0, 8(r1) -/* 80498780 A8 1F 10 C2 */ lha r0, 0x10c2(r31) -/* 80498784 B0 01 00 0A */ sth r0, 0xa(r1) -/* 80498788 A8 1F 10 C4 */ lha r0, 0x10c4(r31) -/* 8049878C B0 01 00 0C */ sth r0, 0xc(r1) -/* 80498790 38 00 00 FF */ li r0, 0xff -/* 80498794 B0 01 00 0E */ sth r0, 0xe(r1) -/* 80498798 80 7D 00 2C */ lwz r3, 0x2c(r29) -/* 8049879C 38 80 00 00 */ li r4, 0 -/* 804987A0 38 A1 00 08 */ addi r5, r1, 8 -/* 804987A4 81 83 00 00 */ lwz r12, 0(r3) -/* 804987A8 81 8C 00 60 */ lwz r12, 0x60(r12) -/* 804987AC 7D 89 03 A6 */ mtctr r12 -/* 804987B0 4E 80 04 21 */ bctrl -lbl_804987B4: -/* 804987B4 80 7E 00 60 */ lwz r3, 0x60(r30) -/* 804987B8 83 A3 00 04 */ lwz r29, 4(r3) -/* 804987BC 28 1D 00 00 */ cmplwi r29, 0 -/* 804987C0 41 82 00 74 */ beq lbl_80498834 -/* 804987C4 80 7D 00 24 */ lwz r3, 0x24(r29) -/* 804987C8 38 80 00 00 */ li r4, 0 -/* 804987CC 81 83 00 00 */ lwz r12, 0(r3) -/* 804987D0 81 8C 00 74 */ lwz r12, 0x74(r12) -/* 804987D4 7D 89 03 A6 */ mtctr r12 -/* 804987D8 4E 80 04 21 */ bctrl -/* 804987DC 7F A3 EB 78 */ mr r3, r29 -/* 804987E0 81 9D 00 00 */ lwz r12, 0(r29) -/* 804987E4 81 8C 00 2C */ lwz r12, 0x2c(r12) -/* 804987E8 7D 89 03 A6 */ mtctr r12 -/* 804987EC 4E 80 04 21 */ bctrl -/* 804987F0 3C 60 80 43 */ lis r3, g_env_light@ha /* 0x8042CA54@ha */ -/* 804987F4 38 63 CA 54 */ addi r3, r3, g_env_light@l /* 0x8042CA54@l */ -/* 804987F8 A8 03 10 E8 */ lha r0, 0x10e8(r3) -/* 804987FC B0 01 00 08 */ sth r0, 8(r1) -/* 80498800 A8 03 10 EA */ lha r0, 0x10ea(r3) -/* 80498804 B0 01 00 0A */ sth r0, 0xa(r1) -/* 80498808 A8 03 10 EC */ lha r0, 0x10ec(r3) -/* 8049880C B0 01 00 0C */ sth r0, 0xc(r1) -/* 80498810 A8 03 10 EE */ lha r0, 0x10ee(r3) -/* 80498814 B0 01 00 0E */ sth r0, 0xe(r1) -/* 80498818 80 7D 00 2C */ lwz r3, 0x2c(r29) -/* 8049881C 38 80 00 00 */ li r4, 0 -/* 80498820 38 A1 00 08 */ addi r5, r1, 8 -/* 80498824 81 83 00 00 */ lwz r12, 0(r3) -/* 80498828 81 8C 00 60 */ lwz r12, 0x60(r12) -/* 8049882C 7D 89 03 A6 */ mtctr r12 -/* 80498830 4E 80 04 21 */ bctrl -lbl_80498834: -/* 80498834 38 60 00 01 */ li r3, 1 -lbl_80498838: -/* 80498838 39 61 00 20 */ addi r11, r1, 0x20 -/* 8049883C 4B EC 99 ED */ bl _restgpr_29 -/* 80498840 80 01 00 24 */ lwz r0, 0x24(r1) -/* 80498844 7C 08 03 A6 */ mtlr r0 -/* 80498848 38 21 00 20 */ addi r1, r1, 0x20 -/* 8049884C 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/d_a_vrbox/d_a_vrbox/daVrbox_solidHeapCB__FP10fopAc_ac_c.s b/asm/rel/d/a/d_a_vrbox/d_a_vrbox/daVrbox_solidHeapCB__FP10fopAc_ac_c.s deleted file mode 100644 index 563956f96b..0000000000 --- a/asm/rel/d/a/d_a_vrbox/d_a_vrbox/daVrbox_solidHeapCB__FP10fopAc_ac_c.s +++ /dev/null @@ -1,31 +0,0 @@ -lbl_80498868: -/* 80498868 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8049886C 7C 08 02 A6 */ mflr r0 -/* 80498870 90 01 00 14 */ stw r0, 0x14(r1) -/* 80498874 93 E1 00 0C */ stw r31, 0xc(r1) -/* 80498878 93 C1 00 08 */ stw r30, 8(r1) -/* 8049887C 7C 7E 1B 78 */ mr r30, r3 -/* 80498880 3C 60 80 4A */ lis r3, d_a_vrbox__stringBase0@ha /* 0x80498998@ha */ -/* 80498884 38 63 89 98 */ addi r3, r3, d_a_vrbox__stringBase0@l /* 0x80498998@l */ -/* 80498888 4B B9 6B AD */ bl dComIfG_getStageRes__FPCc -/* 8049888C 7C 7F 1B 78 */ mr r31, r3 -/* 80498890 3C 80 00 08 */ lis r4, 8 -/* 80498894 3C A0 11 02 */ lis r5, 0x1102 /* 0x11020202@ha */ -/* 80498898 38 A5 02 02 */ addi r5, r5, 0x0202 /* 0x11020202@l */ -/* 8049889C 4B B7 C3 B9 */ bl mDoExt_J3DModel__create__FP12J3DModelDataUlUl -/* 804988A0 90 7E 05 6C */ stw r3, 0x56c(r30) -/* 804988A4 38 60 00 00 */ li r3, 0 -/* 804988A8 28 1F 00 00 */ cmplwi r31, 0 -/* 804988AC 41 82 00 14 */ beq lbl_804988C0 -/* 804988B0 80 1E 05 6C */ lwz r0, 0x56c(r30) -/* 804988B4 28 00 00 00 */ cmplwi r0, 0 -/* 804988B8 41 82 00 08 */ beq lbl_804988C0 -/* 804988BC 38 60 00 01 */ li r3, 1 -lbl_804988C0: -/* 804988C0 54 63 06 3E */ clrlwi r3, r3, 0x18 -/* 804988C4 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 804988C8 83 C1 00 08 */ lwz r30, 8(r1) -/* 804988CC 80 01 00 14 */ lwz r0, 0x14(r1) -/* 804988D0 7C 08 03 A6 */ mtlr r0 -/* 804988D4 38 21 00 10 */ addi r1, r1, 0x10 -/* 804988D8 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/kytag/d_a_kytag02/d_a_kytag02/daKytag02_Create__FP10fopAc_ac_c.s b/asm/rel/d/a/kytag/d_a_kytag02/d_a_kytag02/daKytag02_Create__FP10fopAc_ac_c.s deleted file mode 100644 index 13840e137b..0000000000 --- a/asm/rel/d/a/kytag/d_a_kytag02/d_a_kytag02/daKytag02_Create__FP10fopAc_ac_c.s +++ /dev/null @@ -1,72 +0,0 @@ -lbl_80855CEC: -/* 80855CEC 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80855CF0 7C 08 02 A6 */ mflr r0 -/* 80855CF4 90 01 00 14 */ stw r0, 0x14(r1) -/* 80855CF8 93 E1 00 0C */ stw r31, 0xc(r1) -/* 80855CFC 93 C1 00 08 */ stw r30, 8(r1) -/* 80855D00 7C 7F 1B 78 */ mr r31, r3 -/* 80855D04 3C 60 80 43 */ lis r3, g_env_light@ha /* 0x8042CA54@ha */ -/* 80855D08 3B C3 CA 54 */ addi r30, r3, g_env_light@l /* 0x8042CA54@l */ -/* 80855D0C 4B 80 4D D5 */ bl dKyw_get_wind_vec__Fv -/* 80855D10 80 1F 04 A0 */ lwz r0, 0x4a0(r31) -/* 80855D14 54 00 07 39 */ rlwinm. r0, r0, 0, 0x1c, 0x1c -/* 80855D18 40 82 00 20 */ bne lbl_80855D38 -/* 80855D1C 28 1F 00 00 */ cmplwi r31, 0 -/* 80855D20 41 82 00 0C */ beq lbl_80855D2C -/* 80855D24 7F E3 FB 78 */ mr r3, r31 -/* 80855D28 4B 7C 2E 3D */ bl __ct__10fopAc_ac_cFv -lbl_80855D2C: -/* 80855D2C 80 1F 04 A0 */ lwz r0, 0x4a0(r31) -/* 80855D30 60 00 00 08 */ ori r0, r0, 8 -/* 80855D34 90 1F 04 A0 */ stw r0, 0x4a0(r31) -lbl_80855D38: -/* 80855D38 38 00 00 00 */ li r0, 0 -/* 80855D3C B0 1F 05 74 */ sth r0, 0x574(r31) -/* 80855D40 98 1F 05 76 */ stb r0, 0x576(r31) -/* 80855D44 A8 1F 04 DC */ lha r0, 0x4dc(r31) -/* 80855D48 98 1F 05 77 */ stb r0, 0x577(r31) -/* 80855D4C 3C 60 80 85 */ lis r3, lit_3668@ha /* 0x80855E04@ha */ -/* 80855D50 C0 03 5E 04 */ lfs f0, lit_3668@l(r3) /* 0x80855E04@l */ -/* 80855D54 D0 1E 0E 5C */ stfs f0, 0xe5c(r30) -/* 80855D58 80 1F 00 B0 */ lwz r0, 0xb0(r31) -/* 80855D5C 98 1F 05 78 */ stb r0, 0x578(r31) -/* 80855D60 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80855D64 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80855D68 88 9F 05 77 */ lbz r4, 0x577(r31) -/* 80855D6C 88 BF 04 BA */ lbz r5, 0x4ba(r31) -/* 80855D70 7C A5 07 74 */ extsb r5, r5 -/* 80855D74 4B 7D F5 ED */ bl isSwitch__10dSv_info_cCFii -/* 80855D78 2C 03 00 00 */ cmpwi r3, 0 -/* 80855D7C 41 82 00 44 */ beq lbl_80855DC0 -/* 80855D80 4B 80 58 B9 */ bl dKyw_evt_wind_set_go__Fv -/* 80855D84 38 60 00 00 */ li r3, 0 -/* 80855D88 A8 9F 04 DE */ lha r4, 0x4de(r31) -/* 80855D8C 4B 80 58 91 */ bl dKyw_evt_wind_set__Fss -/* 80855D90 88 1F 05 78 */ lbz r0, 0x578(r31) -/* 80855D94 28 00 00 63 */ cmplwi r0, 0x63 -/* 80855D98 40 82 00 10 */ bne lbl_80855DA8 -/* 80855D9C 38 00 00 FF */ li r0, 0xff -/* 80855DA0 98 1E 0E 6E */ stb r0, 0xe6e(r30) -/* 80855DA4 48 00 00 1C */ b lbl_80855DC0 -lbl_80855DA8: -/* 80855DA8 38 00 00 01 */ li r0, 1 -/* 80855DAC 98 1E 0E 6E */ stb r0, 0xe6e(r30) -/* 80855DB0 38 00 00 04 */ li r0, 4 -/* 80855DB4 98 1E 0E B5 */ stb r0, 0xeb5(r30) -/* 80855DB8 38 00 00 32 */ li r0, 0x32 -/* 80855DBC 90 1E 0E B8 */ stw r0, 0xeb8(r30) -lbl_80855DC0: -/* 80855DC0 88 1F 05 78 */ lbz r0, 0x578(r31) -/* 80855DC4 28 00 00 63 */ cmplwi r0, 0x63 -/* 80855DC8 41 82 00 10 */ beq lbl_80855DD8 -/* 80855DCC 3C 60 80 43 */ lis r3, g_mEnvSeMgr@ha /* 0x8042DD70@ha */ -/* 80855DD0 38 63 DD 70 */ addi r3, r3, g_mEnvSeMgr@l /* 0x8042DD70@l */ -/* 80855DD4 4B A7 21 E9 */ bl initStrongWindSe__10Z2EnvSeMgrFv -lbl_80855DD8: -/* 80855DD8 38 60 00 04 */ li r3, 4 -/* 80855DDC 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 80855DE0 83 C1 00 08 */ lwz r30, 8(r1) -/* 80855DE4 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80855DE8 7C 08 03 A6 */ mtlr r0 -/* 80855DEC 38 21 00 10 */ addi r1, r1, 0x10 -/* 80855DF0 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/kytag/d_a_kytag02/d_a_kytag02/daKytag02_Delete__FP13kytag02_class.s b/asm/rel/d/a/kytag/d_a_kytag02/d_a_kytag02/daKytag02_Delete__FP13kytag02_class.s deleted file mode 100644 index 7f0502cf85..0000000000 --- a/asm/rel/d/a/kytag/d_a_kytag02/d_a_kytag02/daKytag02_Delete__FP13kytag02_class.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_80855CCC: -/* 80855CCC 38 00 00 00 */ li r0, 0 -/* 80855CD0 3C 60 80 43 */ lis r3, g_env_light@ha /* 0x8042CA54@ha */ -/* 80855CD4 38 63 CA 54 */ addi r3, r3, g_env_light@l /* 0x8042CA54@l */ -/* 80855CD8 98 03 0E 6D */ stb r0, 0xe6d(r3) -/* 80855CDC 90 03 0E B8 */ stw r0, 0xeb8(r3) -/* 80855CE0 98 03 0E 6E */ stb r0, 0xe6e(r3) -/* 80855CE4 38 60 00 01 */ li r3, 1 -/* 80855CE8 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/kytag/d_a_kytag02/d_a_kytag02/daKytag02_Execute__FP13kytag02_class.s b/asm/rel/d/a/kytag/d_a_kytag02/d_a_kytag02/daKytag02_Execute__FP13kytag02_class.s deleted file mode 100644 index 4ba4fe32f4..0000000000 --- a/asm/rel/d/a/kytag/d_a_kytag02/d_a_kytag02/daKytag02_Execute__FP13kytag02_class.s +++ /dev/null @@ -1,140 +0,0 @@ -lbl_80855AC0: -/* 80855AC0 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 80855AC4 7C 08 02 A6 */ mflr r0 -/* 80855AC8 90 01 00 24 */ stw r0, 0x24(r1) -/* 80855ACC 39 61 00 20 */ addi r11, r1, 0x20 -/* 80855AD0 4B B0 C7 09 */ bl _savegpr_28 -/* 80855AD4 7C 7E 1B 78 */ mr r30, r3 -/* 80855AD8 3C 60 80 85 */ lis r3, lit_3666@ha /* 0x80855DFC@ha */ -/* 80855ADC 3B 83 5D FC */ addi r28, r3, lit_3666@l /* 0x80855DFC@l */ -/* 80855AE0 3C 60 80 43 */ lis r3, g_env_light@ha /* 0x8042CA54@ha */ -/* 80855AE4 3B A3 CA 54 */ addi r29, r3, g_env_light@l /* 0x8042CA54@l */ -/* 80855AE8 4B 80 4F F9 */ bl dKyw_get_wind_vec__Fv -/* 80855AEC 7C 7F 1B 78 */ mr r31, r3 -/* 80855AF0 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80855AF4 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80855AF8 88 9E 05 77 */ lbz r4, 0x577(r30) -/* 80855AFC 88 BE 04 BA */ lbz r5, 0x4ba(r30) -/* 80855B00 7C A5 07 74 */ extsb r5, r5 -/* 80855B04 4B 7D F8 5D */ bl isSwitch__10dSv_info_cCFii -/* 80855B08 2C 03 00 00 */ cmpwi r3, 0 -/* 80855B0C 41 82 01 34 */ beq lbl_80855C40 -/* 80855B10 4B 80 5B 29 */ bl dKyw_evt_wind_set_go__Fv -/* 80855B14 38 60 00 00 */ li r3, 0 -/* 80855B18 A8 9E 04 DE */ lha r4, 0x4de(r30) -/* 80855B1C 4B 80 5B 01 */ bl dKyw_evt_wind_set__Fss -/* 80855B20 88 1E 05 78 */ lbz r0, 0x578(r30) -/* 80855B24 28 00 00 63 */ cmplwi r0, 0x63 -/* 80855B28 41 82 01 04 */ beq lbl_80855C2C -/* 80855B2C 38 80 00 01 */ li r4, 1 -/* 80855B30 98 9D 0E 6E */ stb r4, 0xe6e(r29) -/* 80855B34 38 00 00 04 */ li r0, 4 -/* 80855B38 98 1D 0E B5 */ stb r0, 0xeb5(r29) -/* 80855B3C 38 00 00 32 */ li r0, 0x32 -/* 80855B40 90 1D 0E B8 */ stw r0, 0xeb8(r29) -/* 80855B44 88 1E 05 76 */ lbz r0, 0x576(r30) -/* 80855B48 2C 00 00 01 */ cmpwi r0, 1 -/* 80855B4C 41 82 00 5C */ beq lbl_80855BA8 -/* 80855B50 40 80 00 10 */ bge lbl_80855B60 -/* 80855B54 2C 00 00 00 */ cmpwi r0, 0 -/* 80855B58 40 80 00 14 */ bge lbl_80855B6C -/* 80855B5C 48 00 00 B8 */ b lbl_80855C14 -lbl_80855B60: -/* 80855B60 2C 00 00 03 */ cmpwi r0, 3 -/* 80855B64 40 80 00 B0 */ bge lbl_80855C14 -/* 80855B68 48 00 00 78 */ b lbl_80855BE0 -lbl_80855B6C: -/* 80855B6C A8 1E 05 74 */ lha r0, 0x574(r30) -/* 80855B70 2C 00 00 00 */ cmpwi r0, 0 -/* 80855B74 41 81 00 A0 */ bgt lbl_80855C14 -/* 80855B78 C0 1C 00 00 */ lfs f0, 0(r28) -/* 80855B7C D0 1D 0E 5C */ stfs f0, 0xe5c(r29) -/* 80855B80 38 00 00 3C */ li r0, 0x3c -/* 80855B84 B0 1E 05 74 */ sth r0, 0x574(r30) -/* 80855B88 38 00 00 02 */ li r0, 2 -/* 80855B8C 3C 60 80 43 */ lis r3, g_mEnvSeMgr@ha /* 0x8042DD70@ha */ -/* 80855B90 38 63 DD 70 */ addi r3, r3, g_mEnvSeMgr@l /* 0x8042DD70@l */ -/* 80855B94 98 03 01 60 */ stb r0, 0x160(r3) -/* 80855B98 88 7E 05 76 */ lbz r3, 0x576(r30) -/* 80855B9C 38 03 00 01 */ addi r0, r3, 1 -/* 80855BA0 98 1E 05 76 */ stb r0, 0x576(r30) -/* 80855BA4 48 00 00 70 */ b lbl_80855C14 -lbl_80855BA8: -/* 80855BA8 A8 1E 05 74 */ lha r0, 0x574(r30) -/* 80855BAC 2C 00 00 00 */ cmpwi r0, 0 -/* 80855BB0 41 81 00 64 */ bgt lbl_80855C14 -/* 80855BB4 C0 1C 00 04 */ lfs f0, 4(r28) -/* 80855BB8 D0 1D 0E 5C */ stfs f0, 0xe5c(r29) -/* 80855BBC 38 00 00 5A */ li r0, 0x5a -/* 80855BC0 B0 1E 05 74 */ sth r0, 0x574(r30) -/* 80855BC4 3C 60 80 43 */ lis r3, g_mEnvSeMgr@ha /* 0x8042DD70@ha */ -/* 80855BC8 38 63 DD 70 */ addi r3, r3, g_mEnvSeMgr@l /* 0x8042DD70@l */ -/* 80855BCC 98 83 01 60 */ stb r4, 0x160(r3) -/* 80855BD0 88 7E 05 76 */ lbz r3, 0x576(r30) -/* 80855BD4 38 03 00 01 */ addi r0, r3, 1 -/* 80855BD8 98 1E 05 76 */ stb r0, 0x576(r30) -/* 80855BDC 48 00 00 38 */ b lbl_80855C14 -lbl_80855BE0: -/* 80855BE0 A8 1E 05 74 */ lha r0, 0x574(r30) -/* 80855BE4 2C 00 00 00 */ cmpwi r0, 0 -/* 80855BE8 41 81 00 2C */ bgt lbl_80855C14 -/* 80855BEC C0 1C 00 08 */ lfs f0, 8(r28) -/* 80855BF0 D0 1D 0E 5C */ stfs f0, 0xe5c(r29) -/* 80855BF4 38 00 00 5A */ li r0, 0x5a -/* 80855BF8 B0 1E 05 74 */ sth r0, 0x574(r30) -/* 80855BFC 38 00 00 00 */ li r0, 0 -/* 80855C00 98 1E 05 76 */ stb r0, 0x576(r30) -/* 80855C04 38 00 00 03 */ li r0, 3 -/* 80855C08 3C 60 80 43 */ lis r3, g_mEnvSeMgr@ha /* 0x8042DD70@ha */ -/* 80855C0C 38 63 DD 70 */ addi r3, r3, g_mEnvSeMgr@l /* 0x8042DD70@l */ -/* 80855C10 98 03 01 60 */ stb r0, 0x160(r3) -lbl_80855C14: -/* 80855C14 A8 7E 05 74 */ lha r3, 0x574(r30) -/* 80855C18 2C 03 00 00 */ cmpwi r3, 0 -/* 80855C1C 41 82 00 4C */ beq lbl_80855C68 -/* 80855C20 38 03 FF FF */ addi r0, r3, -1 -/* 80855C24 B0 1E 05 74 */ sth r0, 0x574(r30) -/* 80855C28 48 00 00 40 */ b lbl_80855C68 -lbl_80855C2C: -/* 80855C2C 38 00 00 FF */ li r0, 0xff -/* 80855C30 98 1D 0E 6E */ stb r0, 0xe6e(r29) -/* 80855C34 C0 1C 00 0C */ lfs f0, 0xc(r28) -/* 80855C38 D0 1D 0E 5C */ stfs f0, 0xe5c(r29) -/* 80855C3C 48 00 00 2C */ b lbl_80855C68 -lbl_80855C40: -/* 80855C40 3C 60 80 43 */ lis r3, g_env_light@ha /* 0x8042CA54@ha */ -/* 80855C44 38 83 CA 54 */ addi r4, r3, g_env_light@l /* 0x8042CA54@l */ -/* 80855C48 38 60 00 00 */ li r3, 0 -/* 80855C4C 98 64 0E 6D */ stb r3, 0xe6d(r4) -/* 80855C50 88 1E 05 78 */ lbz r0, 0x578(r30) -/* 80855C54 28 00 00 63 */ cmplwi r0, 0x63 -/* 80855C58 41 82 00 08 */ beq lbl_80855C60 -/* 80855C5C 90 64 0E B8 */ stw r3, 0xeb8(r4) -lbl_80855C60: -/* 80855C60 38 00 00 00 */ li r0, 0 -/* 80855C64 98 04 0E 6E */ stb r0, 0xe6e(r4) -lbl_80855C68: -/* 80855C68 88 1E 05 78 */ lbz r0, 0x578(r30) -/* 80855C6C 28 00 00 63 */ cmplwi r0, 0x63 -/* 80855C70 41 82 00 38 */ beq lbl_80855CA8 -/* 80855C74 3C 60 80 43 */ lis r3, g_mEnvSeMgr@ha /* 0x8042DD70@ha */ -/* 80855C78 38 63 DD 70 */ addi r3, r3, g_mEnvSeMgr@l /* 0x8042DD70@l */ -/* 80855C7C 7F E4 FB 78 */ mr r4, r31 -/* 80855C80 4B A7 23 49 */ bl setWindDirection__10Z2EnvSeMgrFP3Vec -/* 80855C84 3C 60 80 45 */ lis r3, mStayNo__20dStage_roomControl_c+0x0@ha /* 0x80450D64@ha */ -/* 80855C88 38 63 0D 64 */ addi r3, r3, mStayNo__20dStage_roomControl_c+0x0@l /* 0x80450D64@l */ -/* 80855C8C 88 63 00 00 */ lbz r3, 0(r3) -/* 80855C90 7C 63 07 74 */ extsb r3, r3 -/* 80855C94 4B 7D 73 D9 */ bl dComIfGp_getReverb__Fi -/* 80855C98 7C 64 1B 78 */ mr r4, r3 -/* 80855C9C 3C 60 80 43 */ lis r3, g_mEnvSeMgr@ha /* 0x8042DD70@ha */ -/* 80855CA0 38 63 DD 70 */ addi r3, r3, g_mEnvSeMgr@l /* 0x8042DD70@l */ -/* 80855CA4 4B A7 23 69 */ bl startStrongWindSe__10Z2EnvSeMgrFSc -lbl_80855CA8: -/* 80855CA8 38 60 00 01 */ li r3, 1 -/* 80855CAC 39 61 00 20 */ addi r11, r1, 0x20 -/* 80855CB0 4B B0 C5 75 */ bl _restgpr_28 -/* 80855CB4 80 01 00 24 */ lwz r0, 0x24(r1) -/* 80855CB8 7C 08 03 A6 */ mtlr r0 -/* 80855CBC 38 21 00 20 */ addi r1, r1, 0x20 -/* 80855CC0 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff/_create__Q28daObjEff5Act_cFv.s b/asm/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff/_create__Q28daObjEff5Act_cFv.s deleted file mode 100644 index b72c8c49b4..0000000000 --- a/asm/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff/_create__Q28daObjEff5Act_cFv.s +++ /dev/null @@ -1,51 +0,0 @@ -lbl_8057C9D8: -/* 8057C9D8 94 21 FF D0 */ stwu r1, -0x30(r1) -/* 8057C9DC 7C 08 02 A6 */ mflr r0 -/* 8057C9E0 90 01 00 34 */ stw r0, 0x34(r1) -/* 8057C9E4 93 E1 00 2C */ stw r31, 0x2c(r1) -/* 8057C9E8 7C 7F 1B 78 */ mr r31, r3 -/* 8057C9EC 80 03 04 A0 */ lwz r0, 0x4a0(r3) -/* 8057C9F0 54 00 07 39 */ rlwinm. r0, r0, 0, 0x1c, 0x1c -/* 8057C9F4 40 82 00 1C */ bne lbl_8057CA10 -/* 8057C9F8 28 1F 00 00 */ cmplwi r31, 0 -/* 8057C9FC 41 82 00 08 */ beq lbl_8057CA04 -/* 8057CA00 4B A9 C1 65 */ bl __ct__10fopAc_ac_cFv -lbl_8057CA04: -/* 8057CA04 80 1F 04 A0 */ lwz r0, 0x4a0(r31) -/* 8057CA08 60 00 00 08 */ ori r0, r0, 8 -/* 8057CA0C 90 1F 04 A0 */ stw r0, 0x4a0(r31) -lbl_8057CA10: -/* 8057CA10 7F E3 FB 78 */ mr r3, r31 -/* 8057CA14 38 80 00 08 */ li r4, 8 -/* 8057CA18 38 A0 00 00 */ li r5, 0 -/* 8057CA1C 48 00 00 B9 */ bl func_8057CAD4 -/* 8057CA20 2C 03 00 03 */ cmpwi r3, 3 -/* 8057CA24 40 82 00 58 */ bne lbl_8057CA7C -/* 8057CA28 88 1F 04 E2 */ lbz r0, 0x4e2(r31) -/* 8057CA2C 7C 04 07 74 */ extsb r4, r0 -/* 8057CA30 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 8057CA34 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 8057CA38 80 63 5D 3C */ lwz r3, 0x5d3c(r3) -/* 8057CA3C 38 00 00 00 */ li r0, 0 -/* 8057CA40 90 01 00 08 */ stw r0, 8(r1) -/* 8057CA44 90 81 00 0C */ stw r4, 0xc(r1) -/* 8057CA48 90 01 00 10 */ stw r0, 0x10(r1) -/* 8057CA4C 90 01 00 14 */ stw r0, 0x14(r1) -/* 8057CA50 39 3F 04 EC */ addi r9, r31, 0x4ec -/* 8057CA54 91 21 00 18 */ stw r9, 0x18(r1) -/* 8057CA58 38 80 00 00 */ li r4, 0 -/* 8057CA5C 38 A0 00 E7 */ li r5, 0xe7 -/* 8057CA60 38 DF 04 D0 */ addi r6, r31, 0x4d0 -/* 8057CA64 38 E0 00 00 */ li r7, 0 -/* 8057CA68 39 00 00 00 */ li r8, 0 -/* 8057CA6C 39 40 00 37 */ li r10, 0x37 -/* 8057CA70 3D 60 80 58 */ lis r11, lit_3648@ha /* 0x8057CAF8@ha */ -/* 8057CA74 C0 2B CA F8 */ lfs f1, lit_3648@l(r11) /* 0x8057CAF8@l */ -/* 8057CA78 4B AD 00 19 */ bl set__13dPa_control_cFUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf -lbl_8057CA7C: -/* 8057CA7C 38 60 00 05 */ li r3, 5 -/* 8057CA80 83 E1 00 2C */ lwz r31, 0x2c(r1) -/* 8057CA84 80 01 00 34 */ lwz r0, 0x34(r1) -/* 8057CA88 7C 08 03 A6 */ mtlr r0 -/* 8057CA8C 38 21 00 30 */ addi r1, r1, 0x30 -/* 8057CA90 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff/func_8057CA94.s b/asm/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff/func_8057CA94.s deleted file mode 100644 index 1551aee7d0..0000000000 --- a/asm/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff/func_8057CA94.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_8057CA94: -/* 8057CA94 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8057CA98 7C 08 02 A6 */ mflr r0 -/* 8057CA9C 90 01 00 14 */ stw r0, 0x14(r1) -/* 8057CAA0 4B FF FF 39 */ bl _create__Q28daObjEff5Act_cFv -/* 8057CAA4 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8057CAA8 7C 08 03 A6 */ mtlr r0 -/* 8057CAAC 38 21 00 10 */ addi r1, r1, 0x10 -/* 8057CAB0 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff/func_8057CAD4.s b/asm/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff/func_8057CAD4.s deleted file mode 100644 index 2ef051d898..0000000000 --- a/asm/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff/func_8057CAD4.s +++ /dev/null @@ -1,8 +0,0 @@ -lbl_8057CAD4: -/* 8057CAD4 80 C3 00 B0 */ lwz r6, 0xb0(r3) -/* 8057CAD8 38 00 00 01 */ li r0, 1 -/* 8057CADC 7C 03 20 30 */ slw r3, r0, r4 -/* 8057CAE0 38 63 FF FF */ addi r3, r3, -1 -/* 8057CAE4 7C C0 2C 30 */ srw r0, r6, r5 -/* 8057CAE8 7C 63 00 38 */ and r3, r3, r0 -/* 8057CAEC 4E 80 00 20 */ blr diff --git a/include/JSystem/J3DGraphBase/J3DMatBlock.h b/include/JSystem/J3DGraphBase/J3DMatBlock.h index da9e49cfe2..d68a99bc94 100644 --- a/include/JSystem/J3DGraphBase/J3DMatBlock.h +++ b/include/JSystem/J3DGraphBase/J3DMatBlock.h @@ -538,7 +538,9 @@ struct J3DFogInfo { /* 0x18 */ u16 field_0x18[10]; }; // Size: 0x2C -struct J3DFog : public J3DFogInfo {}; +struct J3DFog : public J3DFogInfo { + J3DFogInfo* getFogInfo() { return (J3DFogInfo*)this; } +}; struct J3DAlphaComp { /* 0x0 */ u16 field_0x0; @@ -558,7 +560,7 @@ public: virtual u32 getType() = 0; /* 80317368 */ virtual void setFog(J3DFog); /* 80317364 */ virtual void setFog(J3DFog*); - /* 8000DF5C */ virtual bool getFog(); + /* 8000DF5C */ virtual J3DFog* getFog(); /* 8031736C */ virtual void setAlphaComp(J3DAlphaComp const*); /* 8000E01C */ virtual void setAlphaComp(J3DAlphaComp const&); /* 8000DF54 */ virtual bool getAlphaComp(); @@ -617,7 +619,7 @@ public: /* 8032194C */ virtual u32 getType(); /* 8032197C */ virtual void setFog(J3DFog); /* 80321958 */ virtual void setFog(J3DFog*); - /* 803219A0 */ virtual bool getFog(); + /* 803219A0 */ virtual J3DFog* getFog(); /* 803219C4 */ virtual void setAlphaComp(J3DAlphaComp const*); /* 803219A8 */ virtual void setAlphaComp(J3DAlphaComp const&); /* 803219E0 */ virtual bool getAlphaComp(); diff --git a/include/JSystem/J3DGraphBase/J3DMaterial.h b/include/JSystem/J3DGraphBase/J3DMaterial.h index d5cdd83b0a..39fcfece23 100644 --- a/include/JSystem/J3DGraphBase/J3DMaterial.h +++ b/include/JSystem/J3DGraphBase/J3DMaterial.h @@ -62,10 +62,12 @@ public: J3DNBTScale* getNBTScale() const { return mTexGenBlock->getNBTScale(); } u32 getTexNo(u32 idx) const { return mTevBlock->getTexNo(idx); } GXColor* getTevKColor(u32 param_0) { return mTevBlock->getTevKColor(param_0); } + J3DFog* getFog() { return mPEBlock->getFog(); } void setTevColor(u32 i, const J3DGXColorS10* i_color) { mTevBlock->setTevColor(i, i_color); } void setTevKColor(u32 i, const J3DGXColor* i_color) { mTevBlock->setTevKColor(i, i_color); } void setMaterialAnm(J3DMaterialAnm* i_anm) { mMaterialAnm = i_anm; } + void setCullMode(u8 i_mode) { mColorBlock->setCullMode(i_mode); } public: /* 0x04 */ J3DMaterial* mNext; diff --git a/include/JSystem/JMath/JMATrigonometric.h b/include/JSystem/JMath/JMATrigonometric.h index 027eafb092..8fd009944b 100644 --- a/include/JSystem/JMath/JMATrigonometric.h +++ b/include/JSystem/JMath/JMATrigonometric.h @@ -2,24 +2,13 @@ #define JMATRIGONOMETRIC_H #include "dolphin/types.h" - -namespace std { -template -struct pair { - A1 a1; - B1 b1; - pair() { - a1 = A1(); - b1 = B1(); - } -}; -} // namespace std +#include "MSL_C/utility.h" struct TSinCosTable { std::pair table[0x2000]; - f32 sinShort(s16 v) const { return table[static_cast(v) >> 3].a1; } - f32 cosShort(s16 v) const { return table[static_cast(v) >> 3].b1; } + f32 sinShort(s16 v) const { return table[static_cast(v) >> 3].first; } + f32 cosShort(s16 v) const { return table[static_cast(v) >> 3].second; } }; struct TAtanTable { diff --git a/include/MSL_C/algorithm.h b/include/MSL_C/algorithm.h new file mode 100644 index 0000000000..e8e222a1e7 --- /dev/null +++ b/include/MSL_C/algorithm.h @@ -0,0 +1,15 @@ +#ifndef MSL_ALGORITHM_H_ +#define MSL_ALGORITHM_H_ + +namespace std { +template +ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last, const T& val); + +template +ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last, const T& val); + +template +InputIt find_if(InputIt first, InputIt last, UnaryPredicate p); +} // namespace std + +#endif diff --git a/include/MSL_C/bitset.h b/include/MSL_C/bitset.h new file mode 100644 index 0000000000..49cade37a9 --- /dev/null +++ b/include/MSL_C/bitset.h @@ -0,0 +1,16 @@ +#ifndef MSL_BITSET_H_ +#define MSL_BITSET_H_ + +#include "stddef.h" + +namespace std { +template class bitset { + bitset(); + + void set(size_t pos, bool val); + void reset(size_t pos); + bool test(size_t pos) const; +}; +} // namespace std + +#endif diff --git a/include/MSL_C/functional.h b/include/MSL_C/functional.h new file mode 100644 index 0000000000..8a11caaead --- /dev/null +++ b/include/MSL_C/functional.h @@ -0,0 +1,8 @@ +#ifndef MSL_FUNCTIONAL_H_ +#define MSL_FUNCTIONAL_H_ + +namespace std { +template struct less {}; +} // namespace std + +#endif diff --git a/include/MSL_C/utility.h b/include/MSL_C/utility.h new file mode 100644 index 0000000000..3a105316f4 --- /dev/null +++ b/include/MSL_C/utility.h @@ -0,0 +1,17 @@ +#ifndef MSL_UTILITY_H_ +#define MSL_UTILITY_H_ + +namespace std { +template +struct pair { + T1 first; + T2 second; + + pair() { + first = T1(); + second = T2(); + } +}; +} // namespace std + +#endif diff --git a/include/SSystem/SComponent/c_math.h b/include/SSystem/SComponent/c_math.h index 8369f5238a..1a9f67eefe 100644 --- a/include/SSystem/SComponent/c_math.h +++ b/include/SSystem/SComponent/c_math.h @@ -18,11 +18,11 @@ float cM_rndF2(float); float cM_rndFX2(float); inline f32 cM_scos(s16 s) { - return JMath::sincosTable_.table[static_cast(s) >> 3].b1; + return JMath::sincosTable_.table[static_cast(s) >> 3].second; } inline f32 cM_ssin(s16 s) { - return JMath::sincosTable_.table[static_cast(s) >> 3].a1; + return JMath::sincosTable_.table[static_cast(s) >> 3].first; } inline s16 cM_deg2s(f32 val) { diff --git a/include/Z2AudioLib/Z2EnvSeMgr.h b/include/Z2AudioLib/Z2EnvSeMgr.h index 8f8aede46b..34d04e70a5 100644 --- a/include/Z2AudioLib/Z2EnvSeMgr.h +++ b/include/Z2AudioLib/Z2EnvSeMgr.h @@ -80,6 +80,8 @@ struct Z2EnvSeMgr : public JASGlobalInstance { /* 802C9F58 */ void registLv3WaterSePos(u8, Vec*); /* 802CA794 */ void startLv3WaterSe(s8); + void setWindType(u8 i_type) { mWindType = i_type; } + /* 0x000 */ Z2EnvSeAutoPan field_0x0; /* 0x01C */ Z2EnvSeAutoPan field_0x1c; /* 0x038 */ u8 field_0x38; @@ -112,7 +114,7 @@ struct Z2EnvSeMgr : public JASGlobalInstance { /* 0x140 */ u8 field_0x140; /* 0x141 */ u8 field_0x141; /* 0x144 */ Z2EnvSeDir field_0x144; - /* 0x160 */ u8 field_0x160; + /* 0x160 */ u8 mWindType; /* 0x164 */ Z2MultiSeMgr field_0x164; /* 0x180 */ Z2EnvSeBase field_0x180; /* 0x188 */ u8 field_0x188; diff --git a/include/d/com/d_com_inf_game.h b/include/d/com/d_com_inf_game.h index 3bb28c00fc..b492ca3877 100644 --- a/include/d/com/d_com_inf_game.h +++ b/include/d/com/d_com_inf_game.h @@ -321,6 +321,8 @@ public: mZSetFlagForce = flag; } + void onStatus(u16 i_status) { mStatus |= i_status; } + void setItemRupeeCount(s32 rupees) { mItemRupeeCount += rupees; } void setItemMagicCount(s16 magic) { mItemMagicCount += magic; } void setItemMaxMagicCount(s16 max) { mItemMaxMagicCount += max; } @@ -2207,6 +2209,10 @@ inline u8 dComIfGp_get3DSetFlagForce() { return g_dComIfG_gameInfo.play.get3DSetFlagForce(); } +inline void dComIfGp_onStatus(u16 i_status) { + g_dComIfG_gameInfo.play.onStatus(i_status); +} + inline void dComIfGp_setItemMagicCount(s16 count) { g_dComIfG_gameInfo.play.setItemMagicCount(count); } @@ -2858,6 +2864,10 @@ inline BOOL i_dComIfGp_event_runCheck() { return g_dComIfG_gameInfo.play.getEvent().runCheck(); } +inline f32 dComIfGp_event_getCullRate() { + return g_dComIfG_gameInfo.play.getEvent().getCullRate(); +} + inline u16 dComIfGp_event_checkHind(u16 flag) { if (!i_dComIfGp_event_runCheck()) { return false; @@ -3258,6 +3268,10 @@ inline Mtx44* dComIfGd_getProjViewMtx() { return &(g_dComIfG_gameInfo.drawlist.getView()->mProjViewMtx); } +inline MtxP dComIfGd_getInvViewMtx() { + return g_dComIfG_gameInfo.drawlist.getView()->mInvViewMtx; +} + inline view_port_class* dComIfGd_getViewport() { return g_dComIfG_gameInfo.drawlist.getViewport(); } diff --git a/include/d/com/d_com_static.h b/include/d/com/d_com_static.h index 540fed86e5..e4ab5deb75 100644 --- a/include/d/com/d_com_static.h +++ b/include/d/com/d_com_static.h @@ -1,61 +1,8 @@ #ifndef D_COM_D_COM_STATIC_H #define D_COM_D_COM_STATIC_H -#include "dolphin/types.h" -#include "f_op/f_op_actor.h" +#include "rel/d/a/d_a_suspend/d_a_suspend.h" int daNpcKakashi_getSwdTutorialStep(); -class daSus_c { -public: - class data_c { - public: - /* 80030F14 */ void set(s8, cXyz const&, cXyz const&, u8, u8, u8); - /* 80030FBC */ data_c* reset(); - /* 80030FCC */ u8 isSwitch(); - /* 800310C8 */ u8 check(fopAc_ac_c*); - /* 80031038 */ bool check(cXyz const&); - /* 80031150 */ void execute(); - /* 80031F28 */ ~data_c(); - /* 80031F64 */ data_c(); - - void setNext(data_c* i_next) { mpNext = i_next; } - data_c* getNext() { return mpNext; } - u8 getType() { return mType; } - - /* 0x00 */ s8 mRoomNo; - /* 0x01 */ bool field_0x1; - /* 0x02 */ u8 field_0x2; - /* 0x03 */ u8 field_0x3; - /* 0x04 */ u8 mType; - /* 0x08 */ cXyz field_0x8; - /* 0x14 */ cXyz field_0x14; - /* 0x20 */ data_c* mpNext; - }; // Size: 0x24 - - class room_c { - public: - /* 80031190 */ void add(daSus_c::data_c*); - /* 800311FC */ void reset(); - /* 80031EE4 */ room_c(); - - /* 0x0 */ data_c* mpData; - }; // Size: 0x4 - - /* 80031248 */ void newData(s8, cXyz const&, cXyz const&, u8, u8, u8); - /* 800313BC */ void reset(); - /* 800314D4 */ static void check(fopAc_ac_c*); - /* 80031434 */ static bool check(s8 i_roomNo, cXyz const& i_pos); - /* 800315A4 */ static void execute(); - - static void reset(int roomNo) { - room_c* room = (room_c*)mRoom; // tmp - room[roomNo].reset(); - } - - static u8 mData[1152]; - static u8 mRoom[256]; - static s16 mSetTop; -}; - #endif /* D_COM_D_COM_STATIC_H */ diff --git a/include/d/d_stage.h b/include/d/d_stage.h index a5bc5fc926..daf9f20a8d 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -1063,6 +1063,10 @@ inline int dStage_FileList_dt_GetBitSw(dStage_FileList_dt_c* p_fList) { return p_fList->mBitSw; } +inline f32 dStage_FileList_dt_SeaLevel(dStage_FileList_dt_c* p_fList) { + return p_fList->mSeaLevel; +} + inline f32 dStage_FileList2_dt_GetLeftRmX(dStage_FileList2_dt_c* p_fList2) { return p_fList2->mLeftRmX; } diff --git a/include/d/event/d_event.h b/include/d/event/d_event.h index cc024e776b..56662ebb1e 100644 --- a/include/d/event/d_event.h +++ b/include/d/event/d_event.h @@ -143,6 +143,7 @@ public: u16 chkFlag2(u16 flag) { return flag & mFlag2; } bool runCheck() { return mEventStatus != 0; } + f32 getCullRate() { return mCullRate; } u16 chkEventFlag(u16 flag) { return flag & mEventFlag; } void onEventFlag(u16 flag) { mEventFlag |= flag; } void offEventFlag(u16 flag) { mEventFlag &= ~flag; } diff --git a/include/d/kankyo/d_kankyo_wether.h b/include/d/kankyo/d_kankyo_wether.h index 90c1fe3bb8..f0f443fad2 100644 --- a/include/d/kankyo/d_kankyo_wether.h +++ b/include/d/kankyo/d_kankyo_wether.h @@ -21,6 +21,7 @@ f32 dKyw_get_wind_pow(); static void squal_proc(); void dKyw_rain_set(int count); void dKyw_wind_set(); +cXyz* dKyw_get_wind_vec(); cXyz dKyw_get_wind_vecpow(); void dKyw_evt_wind_set(s16 angleX, s16 angleY); void dKyw_custom_windpower(f32 pow); diff --git a/include/f_op/f_op_actor.h b/include/f_op/f_op_actor.h index 947b66da7e..c092479b16 100644 --- a/include/f_op/f_op_actor.h +++ b/include/f_op/f_op_actor.h @@ -18,7 +18,10 @@ struct actor_process_profile_definition { /* 0x28 */ u32 mStatus; /* 0x2C */ u8 mActorType; /* 0x2D */ u8 mCullType; - /* 0x2E */ u8 field_0x2e[2]; // Likely padding +}; + +enum { + ACTOR_TYPE_ENEMY = 2, }; struct JKRSolidHeap; @@ -93,6 +96,16 @@ struct actor_attention_types { class dJntCol_c; +struct cull_sphere { + /* 0x0 */ Vec mCenter; + /* 0xC */ f32 mRadius; +}; + +struct cull_box { + /* 0x0 */ Vec mMin; + /* 0xC */ Vec mMax; +}; + class fopAc_ac_c : public leafdraw_class { public: /* 0x0C0 */ int mAcType; @@ -119,14 +132,8 @@ public: /* 0x4F8 */ cXyz speed; /* 0x504 */ MtxP mCullMtx; union { - struct { - /* 0x508 */ cXyz mMin; - /* 0x514 */ cXyz mMax; - } mBox; - struct { - /* 0x508 */ cXyz mCenter; - /* 0x514 */ f32 mRadius; - } mSphere; + /* 0x508 */ cull_box mBox; + /* 0x508 */ cull_sphere mSphere; } mCull; /* 0x520 */ f32 mCullSizeFar; /* 0x524 */ J3DModel* model; diff --git a/include/f_op/f_op_actor_mng.h b/include/f_op/f_op_actor_mng.h index 2fb288504b..d1636034f2 100644 --- a/include/f_op/f_op_actor_mng.h +++ b/include/f_op/f_op_actor_mng.h @@ -305,6 +305,26 @@ inline dJntCol_c* fopAcM_GetJntCol(fopAc_ac_c* i_actor) { return i_actor->mJntCol; } +inline f32 fopAcM_getCullSizeFar(const fopAc_ac_c* i_actor) { + return i_actor->mCullSizeFar; +} + +inline int fopAcM_GetCullSize(const fopAc_ac_c* i_actor) { + return i_actor->mCullType; +} + +inline BOOL fopAcM_CULLSIZE_IS_BOX(int i_culltype) { + return (i_culltype >= 0 && i_culltype < 14) || i_culltype == 14; +} + +inline Vec fopAcM_getCullSizeSphereCenter(const fopAc_ac_c* i_actor) { + return i_actor->mCull.mSphere.mCenter; +} + +inline f32 fopAcM_getCullSizeSphereR(const fopAc_ac_c* i_actor) { + return i_actor->mCull.mSphere.mRadius; +} + inline void dComIfGs_onSwitch(int i_no, int i_roomNo); inline void dComIfGs_offSwitch(int i_no, int i_roomNo); inline BOOL dComIfGs_isSwitch(int i_no, int i_roomNo); diff --git a/include/f_pc/f_pc_leaf.h b/include/f_pc/f_pc_leaf.h index a646cd2758..b2df5fa658 100644 --- a/include/f_pc/f_pc_leaf.h +++ b/include/f_pc/f_pc_leaf.h @@ -24,7 +24,6 @@ typedef struct leaf_process_profile_definition { /* 0x00 */ process_profile_definition mBase; /* 0x1C */ leafdraw_method_class* mSubMtd; // Subclass methods /* 0x20 */ s16 mPriority; // mDrawPriority - /* 0x22 */ u8 unk22[2]; // Likely padding... } leaf_process_profile_definition; s16 fpcLf_GetPriority(const leafdraw_class* pLeaf); diff --git a/include/f_pc/f_pc_profile.h b/include/f_pc/f_pc_profile.h index f6a51bf7f6..6294ed032b 100644 --- a/include/f_pc/f_pc_profile.h +++ b/include/f_pc/f_pc_profile.h @@ -13,7 +13,6 @@ typedef struct process_profile_definition { /* 0x04 */ u16 mListID; /* 0x06 */ u16 mListPrio; /* 0x08 */ s16 mProcName; - /* 0x0A */ s16 unkA; // probably padding /* 0x0C */ process_method_class* mSubMtd; // Subclass methods /* 0x10 */ s32 mSize; /* 0x14 */ s32 mSizeOther; diff --git a/include/m_Do/m_Do_audio.h b/include/m_Do/m_Do_audio.h index 0e8767e166..58c70de4b2 100644 --- a/include/m_Do/m_Do_audio.h +++ b/include/m_Do/m_Do_audio.h @@ -128,4 +128,20 @@ inline void mDoAud_mEnvSe_startFarThunderSe(const Vec* param_0) { g_mEnvSeMgr.startFarThunderSe((Vec*)param_0, 0); } +inline void mDoAud_mEnvse_initStrongWind() { + g_mEnvSeMgr.initStrongWindSe(); +} + +inline void mDoAud_mEnvse_setWindDirection(Vec* i_direction) { + g_mEnvSeMgr.setWindDirection(i_direction); +} + +inline void mDoAud_mEnvse_startStrongWindSe(s8 i_reverb) { + g_mEnvSeMgr.startStrongWindSe(i_reverb); +} + +inline void mDoAud_mEnvse_setWindType(u8 i_type) { + g_mEnvSeMgr.setWindType(i_type); +} + #endif /* M_DO_M_DO_AUDIO_H */ diff --git a/include/m_Do/m_Do_lib.h b/include/m_Do/m_Do_lib.h index 66923702f9..b64756a219 100644 --- a/include/m_Do/m_Do_lib.h +++ b/include/m_Do/m_Do_lib.h @@ -17,6 +17,17 @@ struct mDoLib_clipper { return mClipper.clip(m, (Vec*)param_1, (Vec*)param_2); } + static u32 clip(const Mtx m, Vec param_1, f32 param_2) { + return mClipper.clip(m, param_1, param_2); + } + + static f32 getFar() { return mSystemFar; } + + static void resetFar() { + mClipper.setFar(mSystemFar); + mClipper.calcViewFrustum(); + } + static J3DUClipper mClipper; static f32 mSystemFar; static f32 mFovyRate; diff --git a/include/rel/d/a/d_a_suspend/d_a_suspend.h b/include/rel/d/a/d_a_suspend/d_a_suspend.h index 096e228afc..97eb0a4a7d 100644 --- a/include/rel/d/a/d_a_suspend/d_a_suspend.h +++ b/include/rel/d/a/d_a_suspend/d_a_suspend.h @@ -1,35 +1,65 @@ #ifndef D_A_SUSPEND_H #define D_A_SUSPEND_H -#include "dolphin/types.h" #include "f_op/f_op_actor_mng.h" class daSus_c : public fopAc_ac_c { public: - u32 getScale() { - return fopAcM_GetParam(this) >> 0x1E; - } + class data_c { + public: + /* 80030F14 */ void set(s8, cXyz const&, cXyz const&, u8, u8, u8); + /* 80030FBC */ data_c* reset(); + /* 80030FCC */ u8 isSwitch(); + /* 800310C8 */ u8 check(fopAc_ac_c*); + /* 80031038 */ bool check(cXyz const&); + /* 80031150 */ void execute(); + /* 80031F28 */ ~data_c(); + /* 80031F64 */ data_c(); - u8 getArg1() { - return (fopAcM_GetParam(this) >> 9) & 1; - } + void setNext(data_c* i_next) { mpNext = i_next; } + data_c* getNext() { return mpNext; } + u8 getType() { return mType; } - u8 getArg0() { - return (fopAcM_GetParam(this) >> 8) & 1; - } + /* 0x00 */ s8 mRoomNo; + /* 0x01 */ bool field_0x1; + /* 0x02 */ u8 field_0x2; + /* 0x03 */ u8 field_0x3; + /* 0x04 */ u8 mType; + /* 0x08 */ cXyz field_0x8; + /* 0x14 */ cXyz field_0x14; + /* 0x20 */ data_c* mpNext; + }; // Size: 0x24 - u8 getSw() { - return fopAcM_GetParam(this) & 0xFF; - } - - u8 getRoom() { - return fopAcM_GetParam(this) >> 10; - } + class room_c { + public: + /* 80031190 */ void add(daSus_c::data_c*); + /* 800311FC */ void reset(); + /* 80031EE4 */ room_c(); - /* 80031248 */ void newData(s8, cXyz const&, cXyz const&, u8, u8, u8); + /* 0x0 */ data_c* mpData; + }; // Size: 0x4 + + /* 80031248 */ static void newData(s8, cXyz const&, cXyz const&, u8, u8, u8); + /* 800313BC */ void reset(); + /* 800314D4 */ static void check(fopAc_ac_c*); + /* 80031434 */ static bool check(s8 i_roomNo, cXyz const& i_pos); + /* 800315A4 */ static void execute(); /* 804D5118 */ int create(); + static void reset(int roomNo) { + room_c* room = (room_c*)mRoom; // tmp + room[roomNo].reset(); + } + u32 getScale() { return fopAcM_GetParam(this) >> 0x1E; } + u8 getArg1() { return (fopAcM_GetParam(this) >> 9) & 1; } + u8 getArg0() { return (fopAcM_GetParam(this) >> 8) & 1; } + u8 getSw() { return fopAcM_GetParam(this) & 0xFF; } + u8 getRoom() { return fopAcM_GetParam(this) >> 10; } + + static u8 mData[1152]; + static u8 mRoom[256]; + static s16 mSetTop; }; #endif /* D_A_SUSPEND_H */ diff --git a/include/rel/d/a/d_a_vrbox/d_a_vrbox.h b/include/rel/d/a/d_a_vrbox/d_a_vrbox.h index 20b1654171..cf40dd47ad 100644 --- a/include/rel/d/a/d_a_vrbox/d_a_vrbox.h +++ b/include/rel/d/a/d_a_vrbox/d_a_vrbox.h @@ -1,6 +1,14 @@ #ifndef D_A_VRBOX_H #define D_A_VRBOX_H -#include "dolphin/types.h" +#include "d/com/d_com_inf_game.h" + +class vrbox_class : public fopAc_ac_c { +public: + /* 0x568 */ u8 unk_0x568[0x56C - 0x568]; + /* 0x56C */ J3DModel* mpSoraModel; + /* 0x570 */ u8 unk_0x570[0x574 - 0x570]; + /* 0x574 */ u8 field_0x574; +}; #endif /* D_A_VRBOX_H */ diff --git a/include/rel/d/a/kytag/d_a_kytag02/d_a_kytag02.h b/include/rel/d/a/kytag/d_a_kytag02/d_a_kytag02.h index 2adef7510d..1691592414 100644 --- a/include/rel/d/a/kytag/d_a_kytag02/d_a_kytag02.h +++ b/include/rel/d/a/kytag/d_a_kytag02/d_a_kytag02.h @@ -1,6 +1,15 @@ #ifndef D_A_KYTAG02_H #define D_A_KYTAG02_H -#include "dolphin/types.h" +#include "d/com/d_com_inf_game.h" + +class kytag02_class : public fopAc_ac_c { +public: + /* 0x568 */ cXyz field_0x568; + /* 0x574 */ s16 field_0x574; + /* 0x576 */ u8 field_0x576; + /* 0x577 */ u8 field_0x577; + /* 0x578 */ u8 field_0x578; +}; #endif /* D_A_KYTAG02_H */ diff --git a/include/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff.h b/include/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff.h index a69f156d22..577f50ebfc 100644 --- a/include/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff.h +++ b/include/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff.h @@ -1,6 +1,18 @@ #ifndef D_A_OBJ_EFF_H #define D_A_OBJ_EFF_H -#include "dolphin/types.h" +#include "f_op/f_op_actor_mng.h" + +namespace daObjEff { +class Act_c : public fopAc_ac_c { +public: + enum Prm_e { + PRM_0 = 0, + PRM_8 = 8, + }; + + /* 8057C9D8 */ int _create(); +}; +}; // namespace daObjEff #endif /* D_A_OBJ_EFF_H */ diff --git a/libs/JSystem/J3DGraphBase/J3DMatBlock.cpp b/libs/JSystem/J3DGraphBase/J3DMatBlock.cpp index 6d12a728bc..9a5324feae 100644 --- a/libs/JSystem/J3DGraphBase/J3DMatBlock.cpp +++ b/libs/JSystem/J3DGraphBase/J3DMatBlock.cpp @@ -2128,7 +2128,7 @@ asm void J3DPEBlockFull::setFog(J3DFog param_0) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm bool J3DPEBlockFull::getFog() { +asm J3DFog* J3DPEBlockFull::getFog() { nofralloc #include "asm/JSystem/J3DGraphBase/J3DMatBlock/getFog__14J3DPEBlockFullFv.s" } diff --git a/rel/d/a/b/d_a_b_oh2/d_a_b_oh2.cpp b/rel/d/a/b/d_a_b_oh2/d_a_b_oh2.cpp index ce2bae1892..969e9b357e 100644 --- a/rel/d/a/b/d_a_b_oh2/d_a_b_oh2.cpp +++ b/rel/d/a/b/d_a_b_oh2/d_a_b_oh2.cpp @@ -317,19 +317,14 @@ extern actor_process_profile_definition g_profile_B_OH2 = { 7, 0xFFFD, PROC_B_OH2, - 0, &g_fpcLf_Method.mBase, sizeof(b_oh2_class), 0, 0, &g_fopAc_Method.base, 0x00DB, - 0, - 0, &l_daB_OH2_Method, 0x00044000, - 2, + ACTOR_TYPE_ENEMY, 14, - 0, - 0, }; diff --git a/rel/d/a/d_a_alldie/d_a_alldie.cpp b/rel/d/a/d_a_alldie/d_a_alldie.cpp index 09bb3def80..aacaa5940b 100644 --- a/rel/d/a/d_a_alldie/d_a_alldie.cpp +++ b/rel/d/a/d_a_alldie/d_a_alldie.cpp @@ -214,19 +214,14 @@ extern actor_process_profile_definition g_profile_ALLDIE = { 2, 0xFFFD, PROC_ALLDIE, - 0, &g_fpcLf_Method.mBase, sizeof(daAlldie_c), 0, 0, &g_fopAc_Method.base, 0x0116, - 0, - 0, &l_daAlldie_Method, 0x00044000, 0, 6, - 0, - 0, }; diff --git a/rel/d/a/d_a_andsw/d_a_andsw.cpp b/rel/d/a/d_a_andsw/d_a_andsw.cpp index f3b1a6408d..d785b596f3 100644 --- a/rel/d/a/d_a_andsw/d_a_andsw.cpp +++ b/rel/d/a/d_a_andsw/d_a_andsw.cpp @@ -82,19 +82,14 @@ extern actor_process_profile_definition g_profile_ANDSW = { 7, // mListID -3, // mListPrio PROC_ANDSW, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daAndsw_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x012E, // mPriority - 0, // padding - 0, // padding &l_daAndsw_Method, // mSubMtd 0x00040000, // mStatus 0, // mActorType 0x0E, // mCullType - 0, // padding - 0 // padding }; diff --git a/rel/d/a/d_a_crod/d_a_crod.cpp b/rel/d/a/d_a_crod/d_a_crod.cpp index d91c8bca98..3024c2e616 100644 --- a/rel/d/a/d_a_crod/d_a_crod.cpp +++ b/rel/d/a/d_a_crod/d_a_crod.cpp @@ -425,19 +425,14 @@ extern actor_process_profile_definition g_profile_CROD = { 8, 0xFFFD, PROC_CROD, - 0, &g_fpcLf_Method.mBase, sizeof(daCrod_c), 0, 0, &g_fopAc_Method.base, 0x02B0, - 0, - 0, &l_daCrod_Method, 0x00060000, 5, 0, - 0, - 0, }; diff --git a/rel/d/a/d_a_dmidna/d_a_dmidna.cpp b/rel/d/a/d_a_dmidna/d_a_dmidna.cpp index a61cd63b14..b3347b3dc3 100644 --- a/rel/d/a/d_a_dmidna/d_a_dmidna.cpp +++ b/rel/d/a/d_a_dmidna/d_a_dmidna.cpp @@ -109,19 +109,14 @@ extern actor_process_profile_definition g_profile_DMIDNA = { 7, 0xFFFD, PROC_DMIDNA, - 0, &g_fpcLf_Method.mBase, sizeof(daDmidna_c), 0, 0, &g_fopAc_Method.base, 0x005D, - 0, - 0, &l_daDmidna_Method, 0x00060000, 3, 0, - 0, - 0, }; diff --git a/rel/d/a/d_a_econt/d_a_econt.cpp b/rel/d/a/d_a_econt/d_a_econt.cpp index 32d2edca23..32d5896b4c 100644 --- a/rel/d/a/d_a_econt/d_a_econt.cpp +++ b/rel/d/a/d_a_econt/d_a_econt.cpp @@ -96,19 +96,14 @@ extern actor_process_profile_definition g_profile_ECONT = { 8, // mListID -3, // mListPrio PROC_ECONT, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(econt_class), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x009B, // mPriority - 0, // padding - 0, // padding &l_daEcont_Method, // mSubMtd 0x00044000, // mStatus 0, // mActorType - 0, // mCullType - 0, // padding - 0 // padding + 0, // mCullType }; diff --git a/rel/d/a/d_a_guard_mng/d_a_guard_mng.cpp b/rel/d/a/d_a_guard_mng/d_a_guard_mng.cpp index 702024e1bc..634058de23 100644 --- a/rel/d/a/d_a_guard_mng/d_a_guard_mng.cpp +++ b/rel/d/a/d_a_guard_mng/d_a_guard_mng.cpp @@ -83,19 +83,14 @@ extern actor_process_profile_definition g_profile_GUARD_MNG = { 7, // mListID -3, // mListPrio PROC_GUARD_MNG, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daGuardMng_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd - 0x0197, // mPriority - 0, // padding - 0, // padding + 0x0197, // mPriority &l_daGuardMng_Method, // mSubMtd 0x00040100, // mStatus 0, // mActorType - 0, // mCullType - 0, // padding - 0 // padding + 0, // mCullType }; diff --git a/rel/d/a/d_a_hitobj/d_a_hitobj.cpp b/rel/d/a/d_a_hitobj/d_a_hitobj.cpp index 9cecd35d67..8dcede9f4e 100644 --- a/rel/d/a/d_a_hitobj/d_a_hitobj.cpp +++ b/rel/d/a/d_a_hitobj/d_a_hitobj.cpp @@ -89,19 +89,14 @@ extern actor_process_profile_definition g_profile_HITOBJ = { 7, // mListID -3, // mListPrio PROC_HITOBJ, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(hitobj_class), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x02B2, // mPriority - 0, // padding - 0, // padding &l_daHitobj_Method, // mSubMtd 0x00040000, // mStatus 0, // mActorType 0, // mCullType - 0, // padding - 0 // padding }; diff --git a/rel/d/a/d_a_set_bgobj/d_a_set_bgobj.cpp b/rel/d/a/d_a_set_bgobj/d_a_set_bgobj.cpp index 3006ed9882..37f4d914e6 100644 --- a/rel/d/a/d_a_set_bgobj/d_a_set_bgobj.cpp +++ b/rel/d/a/d_a_set_bgobj/d_a_set_bgobj.cpp @@ -72,19 +72,14 @@ extern actor_process_profile_definition g_profile_SET_BG_OBJ = { 7, -3, PROC_SET_BG_OBJ, - 0, &g_fpcLf_Method.mBase, sizeof(daSetBgObj_c), 0, 0, &g_fopAc_Method.base, 0x02F2, - 0, - 0, &l_daSetBgObj_Method, 0x00040100, 0, 14, - 0, - 0, }; diff --git a/rel/d/a/d_a_skip_2D/d_a_skip_2D.cpp b/rel/d/a/d_a_skip_2D/d_a_skip_2D.cpp index caad67e8ce..f68977a160 100644 --- a/rel/d/a/d_a_skip_2D/d_a_skip_2D.cpp +++ b/rel/d/a/d_a_skip_2D/d_a_skip_2D.cpp @@ -98,19 +98,14 @@ extern actor_process_profile_definition g_profile_SKIP2D = { 3, 0xFFFD, PROC_SKIP2D, - 0000, &g_fpcLf_Method.mBase, sizeof(daSkip2D_c), 0, 0, &g_fopAc_Method.base, 0x0304, - 0, - 0, &daSkip2D_MethodTable, 0x00040000, 0, 0, - 0, - 0, }; \ No newline at end of file diff --git a/rel/d/a/d_a_suspend/d_a_suspend.cpp b/rel/d/a/d_a_suspend/d_a_suspend.cpp index 94ad1028e5..d2f3b9b901 100644 --- a/rel/d/a/d_a_suspend/d_a_suspend.cpp +++ b/rel/d/a/d_a_suspend/d_a_suspend.cpp @@ -4,66 +4,22 @@ // #include "rel/d/a/d_a_suspend/d_a_suspend.h" -#include "dol2asm.h" -#include "dolphin/types.h" - -// -// Forward References: -// - -extern "C" void create__7daSus_cFv(); -extern "C" static void daSus_create__FP7daSus_c(); -extern "C" extern void* g_profile_SUSPEND[12]; - -// -// External References: -// - -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void newData__7daSus_cFScRC4cXyzRC4cXyzUcUcUc(); - -/* ############################################################################################## */ -/* 804D523C-804D5240 000000 0004+00 1/1 0/0 0/0 .rodata @3640 */ -SECTION_RODATA static f32 const lit_3640 = 1250.0f; -COMPILER_STRIP_GATE(0x804D523C, &lit_3640); - -/* 804D5240-804D5244 000004 0004+00 0/1 0/0 0/0 .rodata @3641 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3641 = 2500.0f; -COMPILER_STRIP_GATE(0x804D5240, &lit_3641); -#pragma pop - -/* 804D5244-804D5248 000008 0004+00 0/1 0/0 0/0 .rodata @3642 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3642 = 125.0f; -COMPILER_STRIP_GATE(0x804D5244, &lit_3642); -#pragma pop - -/* 804D5248-804D524C 00000C 0004+00 0/1 0/0 0/0 .rodata @3643 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3643 = 250.0f; -COMPILER_STRIP_GATE(0x804D5248, &lit_3643); -#pragma pop +#include "d/d_procname.h" +#include "f_op/f_op_actor_mng.h" /* 804D5118-804D51E0 000078 00C8+00 1/1 0/0 0/0 .text create__7daSus_cFv */ -#ifdef NONMATCHING -// missing mr instruction int daSus_c::create() { - daSus_c* suspend = static_cast(this); - s8 roomNo = fopAcM_GetRoomNo(suspend); + s8 roomNo = fopAcM_GetRoomNo(this); if (roomNo < 0) { - roomNo = suspend->getRoom(); + roomNo = getRoom(); } - u8 sw = suspend->getSw(); - u8 arg0 = suspend->getArg0(); - u8 arg1 = suspend->getArg1(); + u8 sw = getSw(); + u8 arg0 = getArg0(); + u8 arg1 = getArg1(); - if (suspend->getScale() != 0) { + if (getScale() != 0) { mScale.x *= 1250.0f; mScale.y *= 2500.0f; mScale.z *= 1250.0f; @@ -73,19 +29,9 @@ int daSus_c::create() { mScale.z *= 125.0f; } - newData(roomNo,current.pos,mScale,sw,arg0,arg1); + newData(roomNo, current.pos, mScale, sw, arg0, arg1); return cPhs_COMPLEATE_e; } -#else -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm int daSus_c::create() { - nofralloc -#include "asm/rel/d/a/d_a_suspend/d_a_suspend/create__7daSus_cFv.s" -} -#pragma pop -#endif /* 804D51E0-804D5234 000140 0054+00 1/0 0/0 0/0 .text daSus_create__FP7daSus_c */ static int daSus_create(daSus_c* i_this) { @@ -93,24 +39,29 @@ static int daSus_create(daSus_c* i_this) { new (i_this) daSus_c(); fopAcM_OnCondition(i_this, 8); } + return i_this->create(); } /* ############################################################################################## */ /* 804D524C-804D526C -00001 0020+00 1/0 0/0 0/0 .data daSus_METHODS */ -SECTION_DATA static void* daSus_METHODS[8] = { - (void*)daSus_create__FP7daSus_c, - (void*)NULL, - (void*)NULL, - (void*)NULL, - (void*)NULL, - (void*)NULL, - (void*)NULL, - (void*)NULL, +static actor_method_class daSus_METHODS = { + (process_method_func)daSus_create, NULL, NULL, NULL, NULL, }; /* 804D526C-804D529C -00001 0030+00 0/0 0/0 1/0 .data g_profile_SUSPEND */ -SECTION_DATA extern void* g_profile_SUSPEND[12] = { - (void*)0xFFFFFFFD, (void*)0x000BFFFD, (void*)0x030F0000, (void*)&g_fpcLf_Method, - (void*)0x00000568, (void*)NULL, (void*)NULL, (void*)&g_fopAc_Method, - (void*)0x02FB0000, (void*)&daSus_METHODS, (void*)0x00060000, (void*)0x05000000, +extern actor_process_profile_definition g_profile_SUSPEND = { + -3, + 11, + -3, + PROC_SUSPEND, + &g_fpcLf_Method.mBase, + sizeof(daSus_c), + 0, + 0, + &g_fopAc_Method.base, + 763, + &daSus_METHODS, + 0x00060000, + 5, + 0, }; diff --git a/rel/d/a/d_a_swTime/d_a_swTime.cpp b/rel/d/a/d_a_swTime/d_a_swTime.cpp index 1b8779dc59..a16705c891 100644 --- a/rel/d/a/d_a_swTime/d_a_swTime.cpp +++ b/rel/d/a/d_a_swTime/d_a_swTime.cpp @@ -74,19 +74,14 @@ extern actor_process_profile_definition g_profile_SwTime = { 7, // mListID -3, // mListPrio PROC_SwTime, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daSwTime_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x0240, // mPriority - 0, // padding - 0, // padding &l_daSwTime_Method, // mSubMtd 0x00040100, // mStatus 0, // mActorType 0x0E, // mCullType - 0, // padding - 0 // padding }; diff --git a/rel/d/a/d_a_tboxSw/d_a_tboxSw.cpp b/rel/d/a/d_a_tboxSw/d_a_tboxSw.cpp index dd60f6c45d..1d1bcf84be 100644 --- a/rel/d/a/d_a_tboxSw/d_a_tboxSw.cpp +++ b/rel/d/a/d_a_tboxSw/d_a_tboxSw.cpp @@ -79,19 +79,14 @@ extern actor_process_profile_definition g_profile_TBOX_SW = { 7, 0xFFFD, PROC_TBOX_SW, - 0000, &g_fpcLf_Method.mBase, sizeof(daTboxSw_c), 0, 0, &g_fopAc_Method.base, 0x020E, - 0, - 0, &l_daTboxSw_Method, 0x00040100, 0, 14, - 0, - 0, }; diff --git a/rel/d/a/d_a_vrbox/d_a_vrbox.cpp b/rel/d/a/d_a_vrbox/d_a_vrbox.cpp index 22def51253..0c45f1697e 100644 --- a/rel/d/a/d_a_vrbox/d_a_vrbox.cpp +++ b/rel/d/a/d_a_vrbox/d_a_vrbox.cpp @@ -1,177 +1,178 @@ -// -// Generated By: dol2asm -// Translation Unit: d_a_vrbox -// +/** + * d_a_vrbox.cpp + * + */ #include "rel/d/a/d_a_vrbox/d_a_vrbox.h" -#include "dol2asm.h" -#include "dolphin/types.h" -// -// Types: -// - -struct vrbox_class {}; - -struct mDoMtx_stack_c { - static u8 now[48]; -}; - -struct fopAc_ac_c { - /* 80018B64 */ fopAc_ac_c(); -}; - -struct dStage_roomControl_c { - /* 80024384 */ void getStatusRoomDt(int); -}; - -struct J3DModelData {}; - -struct J3DModel {}; - -// -// Forward References: -// - -extern "C" static void daVrbox_Draw__FP11vrbox_class(); -extern "C" static void daVrbox_color_set__FP11vrbox_class(); -extern "C" static bool daVrbox_Execute__FP11vrbox_class(); -extern "C" static bool daVrbox_IsDelete__FP11vrbox_class(); -extern "C" static bool daVrbox_Delete__FP11vrbox_class(); -extern "C" static void daVrbox_solidHeapCB__FP10fopAc_ac_c(); -extern "C" static void daVrbox_Create__FP10fopAc_ac_c(); -extern "C" extern char const* const d_a_vrbox__stringBase0; -extern "C" extern void* g_profile_VRBOX[12]; - -// -// External References: -// - -extern "C" void mDoExt_modelUpdateDL__FP8J3DModel(); -extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl(); -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl(); -extern "C" void getStatusRoomDt__20dStage_roomControl_cFi(); -extern "C" void dComIfG_getStageRes__FPCc(); -extern "C" void dKy_GxFog_set__Fv(); -extern "C" void PSMTXCopy(); -extern "C" void PSMTXTrans(); -extern "C" void _savegpr_28(); -extern "C" void _savegpr_29(); -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" 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" extern u8 mStayNo__20dStage_roomControl_c[4]; - -// -// Declarations: -// - -/* ############################################################################################## */ -/* 80498990-80498994 000000 0004+00 1/1 0/0 0/0 .rodata @3695 */ -SECTION_RODATA static u8 const lit_3695[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x80498990, &lit_3695); - -/* 80498994-80498998 000004 0004+00 1/1 0/0 0/0 .rodata @3696 */ -SECTION_RODATA static f32 const lit_3696 = 9.0f / 100.0f; -COMPILER_STRIP_GATE(0x80498994, &lit_3696); +static int daVrbox_color_set(vrbox_class* i_this); /* 80498518-804986B8 000078 01A0+00 1/0 0/0 0/0 .text daVrbox_Draw__FP11vrbox_class */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daVrbox_Draw(vrbox_class* param_0) { - nofralloc -#include "asm/rel/d/a/d_a_vrbox/d_a_vrbox/daVrbox_Draw__FP11vrbox_class.s" +static int daVrbox_Draw(vrbox_class* i_this) { + J3DModel* soraModel_p = i_this->mpSoraModel; + f32 fvar = 0.0f; + dStage_FileList_dt_c* filelist_p = NULL; + + daVrbox_color_set(i_this); + + if (g_env_light.mVrboxInvisible) { + return 1; + } + + if (dComIfGp_roomControl_getStayNo() >= 0) { + s32 stayNo = dComIfGp_roomControl_getStayNo(); + filelist_p = dComIfGp_roomControl_getStatusRoomDt(stayNo)->mRoomDt.getFileListInfo(); + } + + if (filelist_p != NULL) { + fvar = dStage_FileList_dt_SeaLevel(filelist_p); + } + + if (dComIfGd_getView() != NULL) { + fvar = (dComIfGd_getInvViewMtx()[1][3] - fvar) * 0.09f; + } else { + fvar = 0.0f; + } + + mDoMtx_stack_c::transS(dComIfGd_getInvViewMtx()[0][3], dComIfGd_getInvViewMtx()[1][3] - fvar, + dComIfGd_getInvViewMtx()[2][3]); + + soraModel_p->i_setBaseTRMtx(mDoMtx_stack_c::get()); + dKy_GxFog_set(); + + // these casts look like fake matches, but this ptr is used as both J3DModel and J3DModelData? + for (int i = ((J3DModelData*)soraModel_p)->getMaterialNum() - 1; i >= 0; i--) { + J3DMaterial* material_p = ((J3DModelData*)soraModel_p)->getMaterialNodePointer(i); + + J3DFogInfo* fogInfo_p; + if (material_p != NULL) { + fogInfo_p = material_p->getFog()->getFogInfo(); + } + + fogInfo_p->field_0x0 = 2; + } + + dComIfGd_setListSky(); + mDoExt_modelUpdateDL(soraModel_p); + dComIfGd_setList(); + + return 1; } -#pragma pop /* 804986B8-80498850 000218 0198+00 1/1 0/0 0/0 .text daVrbox_color_set__FP11vrbox_class */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daVrbox_color_set(vrbox_class* param_0) { - nofralloc -#include "asm/rel/d/a/d_a_vrbox/d_a_vrbox/daVrbox_color_set__FP11vrbox_class.s" +static int daVrbox_color_set(vrbox_class* i_this) { + if ((g_env_light.mCloudOuterHazeColor.r + g_env_light.mCloudOuterHazeColor.g + + g_env_light.mCloudOuterHazeColor.b + g_env_light.mSkyColor.r + g_env_light.mSkyColor.g + + g_env_light.mSkyColor.b + g_env_light.mUpperCloudColor.r + g_env_light.mUpperCloudColor.g + + g_env_light.mUpperCloudColor.b) == 0) + { + g_env_light.mVrboxInvisible = true; + return 1; + } + + g_env_light.mVrboxInvisible = false; + + J3DModelData* modelData = i_this->mpSoraModel->getModelData(); + GXColorS10 color; + + J3DMaterial* material_0 = modelData->getMaterialNodePointer(0); + if (material_0 != NULL) { + material_0->setCullMode(0); + material_0->change(); + + color.r = g_env_light.mSkyColor.r; + color.g = g_env_light.mSkyColor.g; + color.b = g_env_light.mSkyColor.b; + color.a = 255; + material_0->setTevColor(0, (J3DGXColorS10*)&color); + } + + J3DMaterial* material_1 = modelData->getMaterialNodePointer(1); + if (material_1 != NULL) { + material_1->setCullMode(0); + material_1->change(); + + color.r = g_env_light.mCloudInnerHazeColor.r; + color.g = g_env_light.mCloudInnerHazeColor.g; + color.b = g_env_light.mCloudInnerHazeColor.b; + color.a = g_env_light.mCloudInnerHazeColor.a; + material_1->setTevColor(0, (J3DGXColorS10*)&color); + } + + return 1; } -#pragma pop /* 80498850-80498858 0003B0 0008+00 1/0 0/0 0/0 .text daVrbox_Execute__FP11vrbox_class */ -static bool daVrbox_Execute(vrbox_class* param_0) { - return true; +static int daVrbox_Execute(vrbox_class* i_this) { + return 1; } /* 80498858-80498860 0003B8 0008+00 1/0 0/0 0/0 .text daVrbox_IsDelete__FP11vrbox_class */ -static bool daVrbox_IsDelete(vrbox_class* param_0) { - return true; +static int daVrbox_IsDelete(vrbox_class* i_this) { + return 1; } /* 80498860-80498868 0003C0 0008+00 1/0 0/0 0/0 .text daVrbox_Delete__FP11vrbox_class */ -static bool daVrbox_Delete(vrbox_class* param_0) { - return true; +static int daVrbox_Delete(vrbox_class* i_this) { + return 1; } -/* ############################################################################################## */ -/* 80498998-80498998 000008 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80498998 = "vrbox_sora.bmd"; -#pragma pop - /* 80498868-804988DC 0003C8 0074+00 1/1 0/0 0/0 .text daVrbox_solidHeapCB__FP10fopAc_ac_c */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daVrbox_solidHeapCB(fopAc_ac_c* param_0) { - nofralloc -#include "asm/rel/d/a/d_a_vrbox/d_a_vrbox/daVrbox_solidHeapCB__FP10fopAc_ac_c.s" +static int daVrbox_solidHeapCB(fopAc_ac_c* i_this) { + vrbox_class* this_ = (vrbox_class*)i_this; + + J3DModelData* modelData = (J3DModelData*)dComIfG_getStageRes("vrbox_sora.bmd"); + this_->mpSoraModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11020202); + + return modelData != NULL && this_->mpSoraModel != NULL; } -#pragma pop /* 804988DC-80498988 00043C 00AC+00 1/0 0/0 0/0 .text daVrbox_Create__FP10fopAc_ac_c */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daVrbox_Create(fopAc_ac_c* param_0) { - nofralloc -#include "asm/rel/d/a/d_a_vrbox/d_a_vrbox/daVrbox_Create__FP10fopAc_ac_c.s" +static int daVrbox_Create(fopAc_ac_c* i_this) { + if (!fopAcM_CheckCondition(i_this, 8)) { + new (i_this) vrbox_class(); + fopAcM_OnCondition(i_this, 8); + } + vrbox_class* this_ = (vrbox_class*)i_this; + + this_->field_0x574 = 0; + int phase = cPhs_COMPLEATE_e; + + if (fopAcM_entrySolidHeap(this_, daVrbox_solidHeapCB, 0xC60)) { + dComIfGp_onStatus(1); + g_env_light.mVrboxInvisible = false; + } else { + phase = cPhs_ERROR_e; + } + + return phase; } -#pragma pop /* ############################################################################################## */ /* 804989A8-804989C8 -00001 0020+00 1/0 0/0 0/0 .data l_daVrbox_Method */ -SECTION_DATA static void* l_daVrbox_Method[8] = { - (void*)daVrbox_Create__FP10fopAc_ac_c, - (void*)daVrbox_Delete__FP11vrbox_class, - (void*)daVrbox_Execute__FP11vrbox_class, - (void*)daVrbox_IsDelete__FP11vrbox_class, - (void*)daVrbox_Draw__FP11vrbox_class, - (void*)NULL, - (void*)NULL, - (void*)NULL, +static actor_method_class l_daVrbox_Method = { + (process_method_func)daVrbox_Create, (process_method_func)daVrbox_Delete, + (process_method_func)daVrbox_Execute, (process_method_func)daVrbox_IsDelete, + (process_method_func)daVrbox_Draw, }; /* 804989C8-804989F8 -00001 0030+00 0/0 0/0 1/0 .data g_profile_VRBOX */ -SECTION_DATA extern void* g_profile_VRBOX[12] = { - (void*)0xFFFFFFFD, (void*)0x0007FFFD, - (void*)0x02DA0000, (void*)&g_fpcLf_Method, - (void*)0x00000578, (void*)NULL, - (void*)NULL, (void*)&g_fopAc_Method, - (void*)0x00070000, (void*)&l_daVrbox_Method, - (void*)0x00044000, (void*)NULL, +extern actor_process_profile_definition g_profile_VRBOX = { + -3, + 7, + -3, + PROC_VRBOX, + &g_fpcLf_Method.mBase, + sizeof(vrbox_class), + 0, + 0, + &g_fopAc_Method.base, + 7, + &l_daVrbox_Method, + 0x00044000, + 0, + 0, }; - -/* 80498998-80498998 000008 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ diff --git a/rel/d/a/e/d_a_e_yk/d_a_e_yk.cpp b/rel/d/a/e/d_a_e_yk/d_a_e_yk.cpp index 2146885a27..2d0d7c2b4f 100644 --- a/rel/d/a/e/d_a_e_yk/d_a_e_yk.cpp +++ b/rel/d/a/e/d_a_e_yk/d_a_e_yk.cpp @@ -349,21 +349,16 @@ extern actor_process_profile_definition g_profile_E_YK = { 7, // mListID -3, // mListPrio PROC_E_YK, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(e_yk_class), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x00BC, // mPriority - 0, // padding - 0, // padding &l_daE_YK_Method, // mSubMtd 0x10050100, // mStatus - 0x02, // mActorType + ACTOR_TYPE_ENEMY, // mActorType 0x0E, // mCullType - 0, // padding - 0, // padding }; /* 80807E80-80807E8C 000110 000C+00 1/1 0/0 0/0 .data __vt__12dBgS_AcchCir */ diff --git a/rel/d/a/e/d_a_e_ym_tag/d_a_e_ym_tag.cpp b/rel/d/a/e/d_a_e_ym_tag/d_a_e_ym_tag.cpp index d20b107479..21752ac2ce 100644 --- a/rel/d/a/e/d_a_e_ym_tag/d_a_e_ym_tag.cpp +++ b/rel/d/a/e/d_a_e_ym_tag/d_a_e_ym_tag.cpp @@ -89,19 +89,14 @@ extern actor_process_profile_definition g_profile_E_YM_TAG = { 7, // mListID -3, // mListPrio PROC_E_YM_TAG, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daE_YM_TAG_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x00C3, // mPriority - 0, // padding - 0, // padding &l_daE_YM_TAG_Method, // mSubMtd 0x00044000, // mStatus 0, // mActorType 0, // mCullType - 0, // padding - 0 // padding }; diff --git a/rel/d/a/kytag/d_a_kytag02/d_a_kytag02.cpp b/rel/d/a/kytag/d_a_kytag02/d_a_kytag02.cpp index de075084c4..02bd1d84f6 100644 --- a/rel/d/a/kytag/d_a_kytag02/d_a_kytag02.cpp +++ b/rel/d/a/kytag/d_a_kytag02/d_a_kytag02.cpp @@ -1,160 +1,162 @@ -// -// Generated By: dol2asm -// Translation Unit: d_a_kytag02 -// +/** + * d_a_kytag02.cpp + * + */ #include "rel/d/a/kytag/d_a_kytag02/d_a_kytag02.h" -#include "dol2asm.h" -#include "dolphin/types.h" -// -// Types: -// - -struct kytag02_class {}; - -struct fopAc_ac_c { - /* 80018B64 */ fopAc_ac_c(); -}; - -struct dSv_info_c { - /* 80035360 */ void isSwitch(int, int) const; -}; - -struct Vec {}; - -struct Z2EnvSeMgr { - /* 802C7FBC */ void initStrongWindSe(); - /* 802C7FC8 */ void setWindDirection(Vec*); - /* 802C800C */ void startStrongWindSe(s8); -}; - -// -// Forward References: -// - -extern "C" static bool daKytag02_Draw__FP13kytag02_class(); -extern "C" static void daKytag02_Execute__FP13kytag02_class(); -extern "C" static bool daKytag02_IsDelete__FP13kytag02_class(); -extern "C" static void daKytag02_Delete__FP13kytag02_class(); -extern "C" static void daKytag02_Create__FP10fopAc_ac_c(); -extern "C" extern void* g_profile_KYTAG02[12]; - -// -// External References: -// - -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void dComIfGp_getReverb__Fi(); -extern "C" void isSwitch__10dSv_info_cCFii(); -extern "C" void dKyw_get_wind_vec__Fv(); -extern "C" void dKyw_evt_wind_set__Fss(); -extern "C" void dKyw_evt_wind_set_go__Fv(); -extern "C" void initStrongWindSe__10Z2EnvSeMgrFv(); -extern "C" void setWindDirection__10Z2EnvSeMgrFP3Vec(); -extern "C" void startStrongWindSe__10Z2EnvSeMgrFSc(); -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 u8 g_env_light[4880]; -extern "C" extern u8 g_mEnvSeMgr[780]; -extern "C" extern u8 mStayNo__20dStage_roomControl_c[4]; - -// -// Declarations: -// - -/* 80855AB8-80855AC0 000078 0008+00 1/0 0/0 0/0 .text daKytag02_Draw__FP13kytag02_class +/* -80855AC0 000078 0008+00 1/0 0/0 0/0 .text daKytag02_Draw__FP13kytag02_class */ -static bool daKytag02_Draw(kytag02_class* param_0) { - return true; +static int daKytag02_Draw(kytag02_class* i_this) { + return 1; } -/* ############################################################################################## */ -/* 80855DFC-80855E00 000000 0004+00 1/1 0/0 0/0 .rodata @3666 */ -SECTION_RODATA static f32 const lit_3666 = 27.0f / 100.0f; -COMPILER_STRIP_GATE(0x80855DFC, &lit_3666); - -/* 80855E00-80855E04 000004 0004+00 0/1 0/0 0/0 .rodata @3667 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_3667 = 0x3ECF5C28; -COMPILER_STRIP_GATE(0x80855E00, &lit_3667); -#pragma pop - -/* 80855E04-80855E08 000008 0004+00 1/2 0/0 0/0 .rodata @3668 */ -SECTION_RODATA static u8 const lit_3668[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x80855E04, &lit_3668); - -/* 80855E08-80855E0C 00000C 0004+00 0/1 0/0 0/0 .rodata @3669 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3669 = 3.0f / 10.0f; -COMPILER_STRIP_GATE(0x80855E08, &lit_3669); -#pragma pop - /* 80855AC0-80855CC4 000080 0204+00 1/0 0/0 0/0 .text daKytag02_Execute__FP13kytag02_class */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daKytag02_Execute(kytag02_class* param_0) { - nofralloc -#include "asm/rel/d/a/kytag/d_a_kytag02/d_a_kytag02/daKytag02_Execute__FP13kytag02_class.s" +static int daKytag02_Execute(kytag02_class* i_this) { + dScnKy_env_light_c* env_light = i_dKy_getEnvlight(); + cXyz* wind_vec = dKyw_get_wind_vec(); + + if (dComIfGs_isSwitch(i_this->field_0x577, i_this->orig.roomNo)) { + dKyw_evt_wind_set_go(); + dKyw_evt_wind_set(0, i_this->current.angle.y); + + if (i_this->field_0x578 != 99) { + env_light->mTeachWindExist = 1; + env_light->mMoyaMode = 4; + env_light->mMoyaCount = 50; + + switch (i_this->field_0x576) { + case 0: + if (i_this->field_0x574 <= 0) { + env_light->custom_windpower = 0.27f; + i_this->field_0x574 = 60; + mDoAud_mEnvse_setWindType(2); + i_this->field_0x576++; + } + break; + case 1: + if (i_this->field_0x574 <= 0) { + env_light->custom_windpower = 0.40499997f; + i_this->field_0x574 = 90; + mDoAud_mEnvse_setWindType(1); + i_this->field_0x576++; + } + break; + case 2: + if (i_this->field_0x574 <= 0) { + env_light->custom_windpower = 0.0f; + i_this->field_0x574 = 90; + i_this->field_0x576 = 0; + mDoAud_mEnvse_setWindType(3); + } + break; + } + + if (i_this->field_0x574 != 0) { + i_this->field_0x574--; + } + } else { + env_light->mTeachWindExist = 0xFF; + env_light->custom_windpower = 0.3f; + } + } else { + env_light = i_dKy_getEnvlight(); + env_light->mEvtWindSet = 0; + + if (i_this->field_0x578 != 99) { + env_light->mMoyaCount = 0; + } + + env_light->mTeachWindExist = 0; + } + + if (i_this->field_0x578 != 99) { + mDoAud_mEnvse_setWindDirection(wind_vec); + + s8 reverb = dComIfGp_getReverb(dComIfGp_roomControl_getStayNo()); + mDoAud_mEnvse_startStrongWindSe(reverb); + } + + return 1; } -#pragma pop /* 80855CC4-80855CCC 000284 0008+00 1/0 0/0 0/0 .text daKytag02_IsDelete__FP13kytag02_class */ -static bool daKytag02_IsDelete(kytag02_class* param_0) { - return true; +static int daKytag02_IsDelete(kytag02_class* i_this) { + return 1; } /* 80855CCC-80855CEC 00028C 0020+00 1/0 0/0 0/0 .text daKytag02_Delete__FP13kytag02_class */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daKytag02_Delete(kytag02_class* param_0) { - nofralloc -#include "asm/rel/d/a/kytag/d_a_kytag02/d_a_kytag02/daKytag02_Delete__FP13kytag02_class.s" +static int daKytag02_Delete(kytag02_class* i_this) { + dScnKy_env_light_c* env_light = i_dKy_getEnvlight(); + + env_light->mEvtWindSet = 0; + env_light->mMoyaCount = 0; + env_light->mTeachWindExist = 0; + return 1; } -#pragma pop /* 80855CEC-80855DF4 0002AC 0108+00 1/0 0/0 0/0 .text daKytag02_Create__FP10fopAc_ac_c */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daKytag02_Create(fopAc_ac_c* param_0) { - nofralloc -#include "asm/rel/d/a/kytag/d_a_kytag02/d_a_kytag02/daKytag02_Create__FP10fopAc_ac_c.s" +static int daKytag02_Create(fopAc_ac_c* i_this) { + dScnKy_env_light_c* env_light = i_dKy_getEnvlight(); + dKyw_get_wind_vec(); + + if (!fopAcM_CheckCondition(i_this, 8)) { + new (i_this) kytag02_class(); + fopAcM_OnCondition(i_this, 8); + } + kytag02_class* this_ = (kytag02_class*)i_this; + + this_->field_0x574 = 0; + this_->field_0x576 = 0; + this_->field_0x577 = this_->current.angle.x & 0xFF; + + env_light->custom_windpower = 0.0f; + + this_->field_0x578 = fopAcM_GetParam(this_) & 0xFF; + + if (dComIfGs_isSwitch(this_->field_0x577, this_->orig.roomNo)) { + dKyw_evt_wind_set_go(); + dKyw_evt_wind_set(0, this_->current.angle.y); + + if (this_->field_0x578 == 99) { + env_light->mTeachWindExist = 0xFF; + } else { + env_light->mTeachWindExist = 1; + env_light->mMoyaMode = 4; + env_light->mMoyaCount = 50; + } + } + + if (this_->field_0x578 != 99) { + mDoAud_mEnvse_initStrongWind(); + } + + return cPhs_COMPLEATE_e; } -#pragma pop /* ############################################################################################## */ /* 80855E0C-80855E2C -00001 0020+00 1/0 0/0 0/0 .data l_daKytag02_Method */ -SECTION_DATA static void* l_daKytag02_Method[8] = { - (void*)daKytag02_Create__FP10fopAc_ac_c, - (void*)daKytag02_Delete__FP13kytag02_class, - (void*)daKytag02_Execute__FP13kytag02_class, - (void*)daKytag02_IsDelete__FP13kytag02_class, - (void*)daKytag02_Draw__FP13kytag02_class, - (void*)NULL, - (void*)NULL, - (void*)NULL, +static actor_method_class l_daKytag02_Method = { + (process_method_func)daKytag02_Create, (process_method_func)daKytag02_Delete, + (process_method_func)daKytag02_Execute, (process_method_func)daKytag02_IsDelete, + (process_method_func)daKytag02_Draw, }; /* 80855E2C-80855E5C -00001 0030+00 0/0 0/0 1/0 .data g_profile_KYTAG02 */ -SECTION_DATA extern void* g_profile_KYTAG02[12] = { - (void*)0xFFFFFFFD, (void*)0x0007FFFD, - (void*)0x02AC0000, (void*)&g_fpcLf_Method, - (void*)0x0000057C, (void*)NULL, - (void*)NULL, (void*)&g_fopAc_Method, - (void*)0x00600000, (void*)&l_daKytag02_Method, - (void*)0x00044000, (void*)NULL, +extern actor_process_profile_definition g_profile_KYTAG02 = { + -3, + 7, + -3, + PROC_KYTAG02, + &g_fpcLf_Method.mBase, + sizeof(kytag02_class), + 0, + 0, + &g_fopAc_Method.base, + 0x60, + &l_daKytag02_Method, + 0x00044000, + 0, + 0, }; diff --git a/rel/d/a/kytag/d_a_kytag05/d_a_kytag05.cpp b/rel/d/a/kytag/d_a_kytag05/d_a_kytag05.cpp index d6aeb5c84a..85bdceffdb 100644 --- a/rel/d/a/kytag/d_a_kytag05/d_a_kytag05.cpp +++ b/rel/d/a/kytag/d_a_kytag05/d_a_kytag05.cpp @@ -62,19 +62,14 @@ extern actor_process_profile_definition g_profile_KYTAG05 = { 7, 0xFFFD, PROC_KYTAG05, - 0000, &g_fpcLf_Method.mBase, sizeof(kytag05_class), 0, 0, &g_fopAc_Method.base, 0x0063, - 0, - 0, &l_daKytag05_Method, 0x00044000, 0, 0, - 0, - 0, }; diff --git a/rel/d/a/kytag/d_a_kytag06/d_a_kytag06.cpp b/rel/d/a/kytag/d_a_kytag06/d_a_kytag06.cpp index ed664aac8a..0982aa9d0d 100644 --- a/rel/d/a/kytag/d_a_kytag06/d_a_kytag06.cpp +++ b/rel/d/a/kytag/d_a_kytag06/d_a_kytag06.cpp @@ -1355,21 +1355,16 @@ extern actor_process_profile_definition g_profile_KYTAG06 = { 7, -3, PROC_KYTAG06, - 0, &g_fpcLf_Method.mBase, sizeof(kytag06_class), 0, 0, &g_fopAc_Method.base, 0x64, - 0, - 0, &l_daKytag06_Method, 0x00060000, 0, 0, - 0, - 0, }; /* 8085A18C-8085A190 000064 0004+00 0/0 0/0 0/0 .bss diff --git a/rel/d/a/kytag/d_a_kytag07/d_a_kytag07.cpp b/rel/d/a/kytag/d_a_kytag07/d_a_kytag07.cpp index d6d1308af8..d497c91944 100644 --- a/rel/d/a/kytag/d_a_kytag07/d_a_kytag07.cpp +++ b/rel/d/a/kytag/d_a_kytag07/d_a_kytag07.cpp @@ -88,19 +88,14 @@ extern actor_process_profile_definition g_profile_KYTAG07 = { 7, // mListID -3, // mListPrio PROC_KYTAG07, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(kytag07_class), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x0065, // mPriority - 0, // padding - 0, // padding &l_daKytag07_Method, // mSubMtd 0x00044000, // mStatus 0, // mActorType 0, // mCullType - 0, // padding - 0 // padding }; diff --git a/rel/d/a/kytag/d_a_kytag14/d_a_kytag14.cpp b/rel/d/a/kytag/d_a_kytag14/d_a_kytag14.cpp index bc71846ee7..91c971d1a4 100644 --- a/rel/d/a/kytag/d_a_kytag14/d_a_kytag14.cpp +++ b/rel/d/a/kytag/d_a_kytag14/d_a_kytag14.cpp @@ -114,19 +114,14 @@ extern actor_process_profile_definition g_profile_KYTAG14 = { 7, 0xFFFD, PROC_KYTAG14, - 0, &g_fpcLf_Method.mBase, sizeof(kytag14_class), 0, 0, &g_fopAc_Method.base, 0x006C, - 0, - 0, &l_daKytag14_Method, 0x00044000, 0, 0, - 0, - 0, }; diff --git a/rel/d/a/kytag/d_a_kytag17/d_a_kytag17.cpp b/rel/d/a/kytag/d_a_kytag17/d_a_kytag17.cpp index 96ccbd9fe4..e96a914ce7 100644 --- a/rel/d/a/kytag/d_a_kytag17/d_a_kytag17.cpp +++ b/rel/d/a/kytag/d_a_kytag17/d_a_kytag17.cpp @@ -61,19 +61,14 @@ extern actor_process_profile_definition g_profile_KYTAG17 = { 7, // mListID -3, // mListPrio PROC_KYTAG17, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(kytag17_class), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x006F, // mPriority - 0, // padding - 0, // padding &l_daKytag17_Method, // mSubMtd 0x00044000, // mStatus 0, // mActorType 0, // mCullType - 0, // padding - 0 // padding }; diff --git a/rel/d/a/obj/d_a_obj_bombf/d_a_obj_bombf.cpp b/rel/d/a/obj/d_a_obj_bombf/d_a_obj_bombf.cpp index a51dbbea03..7ad38d4cd3 100644 --- a/rel/d/a/obj/d_a_obj_bombf/d_a_obj_bombf.cpp +++ b/rel/d/a/obj/d_a_obj_bombf/d_a_obj_bombf.cpp @@ -133,19 +133,14 @@ extern actor_process_profile_definition g_profile_Obj_Bombf = { 7, // mListID -3, // mListPrio PROC_Obj_Bombf, // mProcName - 0, // Padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daObjBombf_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x00FB, // mPriority - 0, // Padding - 0, // Padding &l_daObjBombf_Method, // mSubMtd 0x00040100, // mStatus 3, // mActorType 14, // mCullType - 0, // Padding - 0, // Padding }; diff --git a/rel/d/a/obj/d_a_obj_cboard/d_a_obj_cboard.cpp b/rel/d/a/obj/d_a_obj_cboard/d_a_obj_cboard.cpp index 0bf59400f8..d1dec43051 100644 --- a/rel/d/a/obj/d_a_obj_cboard/d_a_obj_cboard.cpp +++ b/rel/d/a/obj/d_a_obj_cboard/d_a_obj_cboard.cpp @@ -180,19 +180,14 @@ extern actor_process_profile_definition g_profile_Obj_Cboard = { 3, -3, PROC_Obj_Cboard, - 0, &g_fpcLf_Method.mBase, sizeof(daObjBoard_c), 0, 0, &g_fopAc_Method.base, 0x01C5, - 0, - 0, &daObjBoard_METHODS, 0x00040000, 0, 14, - 0, - 0, }; diff --git a/rel/d/a/obj/d_a_obj_cowdoor/d_a_obj_cowdoor.cpp b/rel/d/a/obj/d_a_obj_cowdoor/d_a_obj_cowdoor.cpp index 9e7ebcc100..5b4b56e2a2 100644 --- a/rel/d/a/obj/d_a_obj_cowdoor/d_a_obj_cowdoor.cpp +++ b/rel/d/a/obj/d_a_obj_cowdoor/d_a_obj_cowdoor.cpp @@ -114,19 +114,14 @@ extern actor_process_profile_definition g_profile_Obj_Cowdoor = { 3, // mListID -3, // mListPrio PROC_Obj_Cowdoor, // mProcName - 0, // Padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daCowdoor_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x01BF, // mPriority - 0, // Padding - 0, // Padding &l_daCowdoor_Method, // mSubMtd 0x00040100, // mStatus 0, // mActorType 14, // mCullType - 0, // Padding - 0, // Padding }; \ No newline at end of file diff --git a/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff.cpp b/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff.cpp index 744da441a2..edac11f174 100644 --- a/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff.cpp +++ b/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff.cpp @@ -1,160 +1,102 @@ -// -// Generated By: dol2asm -// Translation Unit: d_a_obj_eff -// +/** + * d_a_obj_eff.cpp + * + */ #include "rel/d/a/obj/d_a_obj_eff/d_a_obj_eff.h" -#include "dol2asm.h" -#include "dolphin/types.h" - -// -// Types: -// - -struct fopAc_ac_c { - /* 80018B64 */ fopAc_ac_c(); -}; - -struct daObjEff { - struct Act_c { - struct Prm_e {}; - - /* 8057C9D8 */ void _create(); - }; -}; +#include "d/com/d_com_inf_game.h" struct daObj { - template - void PrmAbstract(/* ... */); - /* 8057CAD4 */ /* daObj::PrmAbstract */ - void func_8057CAD4(void* _this, fopAc_ac_c const*, daObjEff::Act_c::Prm_e, - daObjEff::Act_c::Prm_e); + template + static int PrmAbstract(const fopAc_ac_c* param_0, T param_1, T param_2); }; -struct dPa_levelEcallBack {}; - -struct dKy_tevstr_c {}; - -struct csXyz {}; - -struct _GXColor {}; - -struct cXyz {}; - -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); -}; - -// -// Forward References: -// - -extern "C" void _create__Q28daObjEff5Act_cFv(); -extern "C" static void func_8057CA94(); -extern "C" static bool func_8057CAB4(); -extern "C" static bool func_8057CABC(); -extern "C" static bool func_8057CAC4(); -extern "C" static bool func_8057CACC(); -extern "C" void func_8057CAD4(void* _this, fopAc_ac_c const*, daObjEff::Act_c::Prm_e, - daObjEff::Act_c::Prm_e); -extern "C" extern void* g_profile_Obj_Eff[12]; - -// -// External References: -// - -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void -set__13dPa_control_cFUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf(); -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]; - -// -// Declarations: -// - -/* ############################################################################################## */ -/* 8057CAF8-8057CAFC 000000 0004+00 1/1 0/0 0/0 .rodata @3648 */ -SECTION_RODATA static u8 const lit_3648[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x8057CAF8, &lit_3648); - /* 8057C9D8-8057CA94 000078 00BC+00 1/1 0/0 0/0 .text _create__Q28daObjEff5Act_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daObjEff::Act_c::_create() { - nofralloc -#include "asm/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff/_create__Q28daObjEff5Act_cFv.s" -} -#pragma pop +int daObjEff::Act_c::_create() { + if (!fopAcM_CheckCondition(this, 8)) { + new (this) Act_c(); + fopAcM_OnCondition(this, 8); + } + if (daObj::PrmAbstract(this, PRM_8, PRM_0) == 3) { + s32 roomNo = fopAcM_GetRoomNo(this); + dComIfGp_particle_setColor(0x00E7, ¤t.pos, NULL, NULL, NULL, 0.0f, 55, NULL, &mScale, + NULL, roomNo, &mScale); + } + + return cPhs_ERROR_e; +} + +namespace daObjEff { +namespace { /* 8057CA94-8057CAB4 000134 0020+00 1/0 0/0 0/0 .text * Mthd_Create__Q28daObjEff25@unnamed@d_a_obj_eff_cpp@FPv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void func_8057CA94() { - nofralloc -#include "asm/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff/func_8057CA94.s" +int Mthd_Create(void* i_this) { + return static_cast(i_this)->_create(); } -#pragma pop /* 8057CAB4-8057CABC 000154 0008+00 1/0 0/0 0/0 .text * Mthd_Delete__Q28daObjEff25@unnamed@d_a_obj_eff_cpp@FPv */ -static bool func_8057CAB4() { - return true; +int Mthd_Delete(void* i_this) { + return 1; } /* 8057CABC-8057CAC4 00015C 0008+00 1/0 0/0 0/0 .text * Mthd_Execute__Q28daObjEff25@unnamed@d_a_obj_eff_cpp@FPv */ -static bool func_8057CABC() { - return true; +int Mthd_Execute(void* i_this) { + return 1; } /* 8057CAC4-8057CACC 000164 0008+00 1/0 0/0 0/0 .text * Mthd_Draw__Q28daObjEff25@unnamed@d_a_obj_eff_cpp@FPv */ -static bool func_8057CAC4() { - return true; +int Mthd_Draw(void* i_this) { + return 1; } /* 8057CACC-8057CAD4 00016C 0008+00 1/0 0/0 0/0 .text * Mthd_IsDelete__Q28daObjEff25@unnamed@d_a_obj_eff_cpp@FPv */ -static bool func_8057CACC() { - return true; +int Mthd_IsDelete(void* i_this) { + return 1; } +}; // namespace +}; // namespace daObjEff /* 8057CAD4-8057CAF0 000174 001C+00 1/1 0/0 0/0 .text * PrmAbstract__5daObjFPC10fopAc_ac_cQ38daObjEff5Act_c5Prm_eQ38daObjEff5Act_c5Prm_e */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -extern "C" asm void func_8057CAD4(void* _this, fopAc_ac_c const* param_0, - daObjEff::Act_c::Prm_e param_1, daObjEff::Act_c::Prm_e param_2) { - nofralloc -#include "asm/rel/d/a/obj/d_a_obj_eff/d_a_obj_eff/func_8057CAD4.s" +template +int daObj::PrmAbstract(const fopAc_ac_c* param_0, T param_1, T param_2) { + u32 param = fopAcM_GetParam(param_0); + return ((1 << param_1) - 1) & (param >> param_2); } -#pragma pop /* ############################################################################################## */ /* 8057CAFC-8057CB1C -00001 0020+00 1/0 0/0 0/0 .data * Mthd_Table__Q28daObjEff25@unnamed@d_a_obj_eff_cpp@ */ -SECTION_DATA static void* data_8057CAFC[8] = { - (void*)func_8057CA94, (void*)func_8057CAB4, (void*)func_8057CABC, (void*)func_8057CACC, - (void*)func_8057CAC4, (void*)NULL, (void*)NULL, (void*)NULL, +namespace daObjEff { +namespace { +static actor_method_class Mthd_Table = { + (process_method_func)Mthd_Create, (process_method_func)Mthd_Delete, + (process_method_func)Mthd_Execute, (process_method_func)Mthd_IsDelete, + (process_method_func)Mthd_Draw, }; +}; +}; // namespace daObjEff /* 8057CB1C-8057CB4C -00001 0030+00 0/0 0/0 1/0 .data g_profile_Obj_Eff */ -SECTION_DATA extern void* g_profile_Obj_Eff[12] = { - (void*)0xFFFFFFFD, (void*)0x0009FFFD, (void*)0x03010000, (void*)&g_fpcLf_Method, - (void*)0x00000568, (void*)NULL, (void*)NULL, (void*)&g_fopAc_Method, - (void*)0x010B0000, (void*)&data_8057CAFC, (void*)0x00040000, (void*)NULL, -}; +extern actor_process_profile_definition g_profile_Obj_Eff = { + -3, + 9, + -3, + PROC_Obj_Eff, + &g_fpcLf_Method.mBase, + sizeof(daObjEff::Act_c), + 0, + 0, + &g_fopAc_Method.base, + 0x10B, + &daObjEff::Mthd_Table, + 0x00040000, + 0, + 0, +}; \ No newline at end of file diff --git a/rel/d/a/obj/d_a_obj_enemy_create/d_a_obj_enemy_create.cpp b/rel/d/a/obj/d_a_obj_enemy_create/d_a_obj_enemy_create.cpp index df8bb1212b..ba99cbea10 100644 --- a/rel/d/a/obj/d_a_obj_enemy_create/d_a_obj_enemy_create.cpp +++ b/rel/d/a/obj/d_a_obj_enemy_create/d_a_obj_enemy_create.cpp @@ -277,19 +277,14 @@ extern actor_process_profile_definition g_profile_Obj_E_CREATE = { 3, 0xFFFD, PROC_Obj_E_CREATE, - 0, &g_fpcLf_Method.mBase, sizeof(daObjE_CREATE_c), 0, 0, &g_fopAc_Method.base, 0x01CA, - 0, - 0, &l_daObjE_CREATE_Method, 0x00040000, 0x0, 0xE, - 0, - 0, }; diff --git a/rel/d/a/obj/d_a_obj_mgate/d_a_obj_mgate.cpp b/rel/d/a/obj/d_a_obj_mgate/d_a_obj_mgate.cpp index 03f192914d..4189e56255 100644 --- a/rel/d/a/obj/d_a_obj_mgate/d_a_obj_mgate.cpp +++ b/rel/d/a/obj/d_a_obj_mgate/d_a_obj_mgate.cpp @@ -289,14 +289,18 @@ static actor_method_class daObjMGate_METHODS = { /* 80593FC8-80593FF8 -00001 0030+00 0/0 0/0 1/0 .data g_profile_Obj_MGate */ extern actor_process_profile_definition g_profile_Obj_MGate = { - -3, 3, - 0xFFFD, PROC_Obj_MGate, - 0, &g_fpcLf_Method.mBase, - 0x5D0, 0, - 0, &g_fopAc_Method.base, - 0x01C4, 0, - 0, &daObjMGate_METHODS, - 0x00040100, 0, - 14, 0, + -3, + 3, + 0xFFFD, + PROC_Obj_MGate, + &g_fpcLf_Method.mBase, + 0x5D0, 0, + 0, + &g_fopAc_Method.base, + 0x01C4, + &daObjMGate_METHODS, + 0x00040100, + 0, + 14, }; diff --git a/rel/d/a/obj/d_a_obj_onsenFire/d_a_obj_onsenFire.cpp b/rel/d/a/obj/d_a_obj_onsenFire/d_a_obj_onsenFire.cpp index 47da56e8c1..a0f5706687 100644 --- a/rel/d/a/obj/d_a_obj_onsenFire/d_a_obj_onsenFire.cpp +++ b/rel/d/a/obj/d_a_obj_onsenFire/d_a_obj_onsenFire.cpp @@ -58,20 +58,15 @@ extern actor_process_profile_definition g_profile_OBJ_ONSEN_FIRE = { -3, // mLayerID 3, // mListID -3, // mListPrio - PROC_OBJ_ONSEN_FIRE, // mProcName - 0, // padding + PROC_OBJ_ONSEN_FIRE, // mProcName &g_fpcLf_Method.mBase, // mSubMtd sizeof(daObjOnsenFire_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd - 0x0264, // mPriority - 0, // padding - 0, // padding + 0x0264, // mPriority &l_daObjOnsenFire_Method, // mSubMtd 0x00044000, // mStatus 0, // mActorType - 0x0E, // mCullType - 0, // padding - 0, // padding + 0x0E, // mCullType }; diff --git a/rel/d/a/obj/d_a_obj_smoke/d_a_obj_smoke.cpp b/rel/d/a/obj/d_a_obj_smoke/d_a_obj_smoke.cpp index 245a956392..187e8460b4 100644 --- a/rel/d/a/obj/d_a_obj_smoke/d_a_obj_smoke.cpp +++ b/rel/d/a/obj/d_a_obj_smoke/d_a_obj_smoke.cpp @@ -90,19 +90,14 @@ extern actor_process_profile_definition g_profile_Obj_Smoke = { 7, // mListID -3, // mListPrio PROC_Obj_Smoke, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daObjSmoke_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd - 0x0278, // mPriority - 0, // padding - 0, // padding + 0x0278, // mPriority &l_daObjSmoke_Method, // mSubMtd 0x00040100, // mStatus 0, // mActorType 0x0E, // mCullType - 0, // padding - 0, // padding }; diff --git a/rel/d/a/obj/d_a_obj_stone/d_a_obj_stone.cpp b/rel/d/a/obj/d_a_obj_stone/d_a_obj_stone.cpp index 809ebaab01..c75178652b 100644 --- a/rel/d/a/obj/d_a_obj_stone/d_a_obj_stone.cpp +++ b/rel/d/a/obj/d_a_obj_stone/d_a_obj_stone.cpp @@ -564,21 +564,16 @@ extern actor_process_profile_definition g_profile_Obj_Stone = { 8, // mListID -3, // mListPrio PROC_Obj_Stone, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daObjStone_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x01FF, // mPriority - 0, // padding - 0, // padding &l_daObjStone_Method, // mSubMtd 0x00040100, // mStatus 0, // mActorType 23, // mCullType - 0, // padding - 0, // padding }; /* 80CECD74-80CECDA4 000120 0030+00 2/2 0/0 0/0 .data __vt__14dBgS_ObjGndChk */ diff --git a/rel/d/a/obj/d_a_obj_stoneMark/d_a_obj_stoneMark.cpp b/rel/d/a/obj/d_a_obj_stoneMark/d_a_obj_stoneMark.cpp index e294b9e19a..6b1aeced6b 100644 --- a/rel/d/a/obj/d_a_obj_stoneMark/d_a_obj_stoneMark.cpp +++ b/rel/d/a/obj/d_a_obj_stoneMark/d_a_obj_stoneMark.cpp @@ -284,21 +284,16 @@ extern actor_process_profile_definition g_profile_Obj_StoneMark = { 7, // mListID -3, // mListPrio PROC_Obj_StoneMark, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daObjSMark_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x0216, // mPriority - 0, // padding - 0, // padding &l_daObjSMark_Method, // mSubMtd 0x00040100, // mStatus 0, // mActorType 23, // mCullType - 0, // padding - 0 // padding }; /* 8059A464-8059A488 000054 0024+00 2/2 0/0 0/0 .data __vt__12dBgS_ObjAcch */ diff --git a/rel/d/a/obj/d_a_obj_tmoon/d_a_obj_tmoon.cpp b/rel/d/a/obj/d_a_obj_tmoon/d_a_obj_tmoon.cpp index 7824cd6a73..d69b253ea4 100644 --- a/rel/d/a/obj/d_a_obj_tmoon/d_a_obj_tmoon.cpp +++ b/rel/d/a/obj/d_a_obj_tmoon/d_a_obj_tmoon.cpp @@ -122,19 +122,14 @@ extern actor_process_profile_definition g_profile_Obj_TMoon = { 7, // mListID -3, // mListPrio PROC_Obj_TMoon, // mProcName - 0, // Padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daObjTMoon_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x0239, // mPriority - 0, // Padding - 0, // Padding &l_daObjTMoon_Method, // mSubMtd 0x00040000, // mStatus 0, // mActorType 14, // mCullType - 0, // Padding - 0, // Padding }; diff --git a/rel/d/a/obj/d_a_obj_web0/d_a_obj_web0.cpp b/rel/d/a/obj/d_a_obj_web0/d_a_obj_web0.cpp index be657d584b..e505dcaa71 100644 --- a/rel/d/a/obj/d_a_obj_web0/d_a_obj_web0.cpp +++ b/rel/d/a/obj/d_a_obj_web0/d_a_obj_web0.cpp @@ -444,19 +444,14 @@ extern actor_process_profile_definition g_profile_OBJ_WEB0 = { 3, -3, PROC_OBJ_WEB0, - 0, &g_fpcLf_Method.mBase, sizeof(obj_web0_class), 0, 0, &g_fopAc_Method.base, 0x002F, - 0, - 0, &l_daObj_Web0_Method, 0x00040100, 0, 14, - 0, - 0, }; \ No newline at end of file diff --git a/rel/d/a/obj/d_a_obj_web1/d_a_obj_web1.cpp b/rel/d/a/obj/d_a_obj_web1/d_a_obj_web1.cpp index bbe800cc63..6f35a3991f 100644 --- a/rel/d/a/obj/d_a_obj_web1/d_a_obj_web1.cpp +++ b/rel/d/a/obj/d_a_obj_web1/d_a_obj_web1.cpp @@ -334,19 +334,14 @@ extern actor_process_profile_definition g_profile_OBJ_WEB1 = { 3, -3, PROC_OBJ_WEB1, - 0, &g_fpcLf_Method.mBase, sizeof(obj_web1_class), 0, 0, &g_fopAc_Method.base, 0x0030, - 0, - 0, &l_daObj_Web1_Method, 0x00040100, 0, 14, - 0, - 0, }; diff --git a/rel/d/a/tag/d_a_tag_CstaSw/d_a_tag_CstaSw.cpp b/rel/d/a/tag/d_a_tag_CstaSw/d_a_tag_CstaSw.cpp index 5643fb1708..2f3ae6b371 100644 --- a/rel/d/a/tag/d_a_tag_CstaSw/d_a_tag_CstaSw.cpp +++ b/rel/d/a/tag/d_a_tag_CstaSw/d_a_tag_CstaSw.cpp @@ -118,19 +118,14 @@ extern actor_process_profile_definition g_profile_Tag_CstaSw = { 7, // mListID -3, // mListPrio PROC_Tag_CstaSw, // mProcName - 0, // Padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daTagCstaSw_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x0291, // mPriority - 0, // Padding - 0, // Padding &l_daTagCstaSw_Method, // mSubMtd 0x00044000, // mStatus 0, // mActorType 14, // mCullType - 0, // Padding - 0, // Padding }; \ No newline at end of file diff --git a/rel/d/a/tag/d_a_tag_ajnot/d_a_tag_ajnot.cpp b/rel/d/a/tag/d_a_tag_ajnot/d_a_tag_ajnot.cpp index 6aa8bb8bf1..58edf5a576 100644 --- a/rel/d/a/tag/d_a_tag_ajnot/d_a_tag_ajnot.cpp +++ b/rel/d/a/tag/d_a_tag_ajnot/d_a_tag_ajnot.cpp @@ -80,19 +80,14 @@ extern actor_process_profile_definition g_profile_Tag_AJnot = { 3, 0xFFFD, PROC_Tag_AJnot, - 0, &g_fpcLf_Method.mBase, sizeof(daTagAJnot_c), 0, 0, &g_fopAc_Method.base, 0x01B4, - 0, - 0, &l_daTagAJnot_Method, 0x00044000, 3, 14, - 0, - 0, }; diff --git a/rel/d/a/tag/d_a_tag_arena/d_a_tag_arena.cpp b/rel/d/a/tag/d_a_tag_arena/d_a_tag_arena.cpp index ce736b0d5c..a3dd2846fc 100644 --- a/rel/d/a/tag/d_a_tag_arena/d_a_tag_arena.cpp +++ b/rel/d/a/tag/d_a_tag_arena/d_a_tag_arena.cpp @@ -35,19 +35,14 @@ extern actor_process_profile_definition g_profile_Tag_Arena = { 7, // mListID -3, // mListPrio PROC_Tag_Arena, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daTagArena_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x014D, // mPriority - 0, // padding - 0, // padding &l_daTagArena_Method, // mSubMtd 0x00040000, // mStatus 0, // mActorType 0x0E, // mCullType - 0, // padding - 0 // padding }; diff --git a/rel/d/a/tag/d_a_tag_assistance/d_a_tag_assistance.cpp b/rel/d/a/tag/d_a_tag_assistance/d_a_tag_assistance.cpp index f724b9977e..5705b04d85 100644 --- a/rel/d/a/tag/d_a_tag_assistance/d_a_tag_assistance.cpp +++ b/rel/d/a/tag/d_a_tag_assistance/d_a_tag_assistance.cpp @@ -46,19 +46,14 @@ extern actor_process_profile_definition g_profile_Tag_Assist = { 7, // mListID -3, // mListPrio PROC_Tag_Assist, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daTagAssist_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x010A, // mPriority - 0, // padding - 0, // padding &l_daTagAssist_Method, // mSubMtd 0x00040000, // mStatus 0x00, // mActorType 0x0E, // mCullType - 0, // padding - 0, // padding }; diff --git a/rel/d/a/tag/d_a_tag_attention/d_a_tag_attention.cpp b/rel/d/a/tag/d_a_tag_attention/d_a_tag_attention.cpp index be1a1987f3..36153d26e5 100644 --- a/rel/d/a/tag/d_a_tag_attention/d_a_tag_attention.cpp +++ b/rel/d/a/tag/d_a_tag_attention/d_a_tag_attention.cpp @@ -176,16 +176,14 @@ extern actor_process_profile_definition g_profile_Tag_Attp = { 7, // mListID -3, // mListPrio PROC_Tag_Attp, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daAttp_c), // mSize 0, // mSizeOther 0, // mParameter &g_fopAc_Method.base, // mSubMtd 0x01B8, // mPriority - 0, // padding - 0, // padding &l_daAttp_Method, // mSubMtd 0x00040100, // mStatus 0, // mActorType + 0, // mCullType }; diff --git a/rel/d/a/tag/d_a_tag_escape/d_a_tag_escape.cpp b/rel/d/a/tag/d_a_tag_escape/d_a_tag_escape.cpp index cfd1f089e7..f01bcc948b 100644 --- a/rel/d/a/tag/d_a_tag_escape/d_a_tag_escape.cpp +++ b/rel/d/a/tag/d_a_tag_escape/d_a_tag_escape.cpp @@ -39,19 +39,14 @@ extern actor_process_profile_definition g_profile_Tag_Escape = { 07, 0xFFFD, PROC_Tag_Escape, - 0, &g_fpcLf_Method.mBase, sizeof(daTagEscape_c), 0, 0, &g_fopAc_Method.base, 0x018D, - 0, - 0, &l_daTagEscape_Method, 0x00040000, 0, 14, - 0, - 0, }; diff --git a/rel/d/a/tag/d_a_tag_gra/d_a_tag_gra.cpp b/rel/d/a/tag/d_a_tag_gra/d_a_tag_gra.cpp index cca45f9f4d..8e19939f70 100644 --- a/rel/d/a/tag/d_a_tag_gra/d_a_tag_gra.cpp +++ b/rel/d/a/tag/d_a_tag_gra/d_a_tag_gra.cpp @@ -31,19 +31,14 @@ extern actor_process_profile_definition g_profile_TAG_GRA = { 3, // mListID -3, // mListPrio PROC_TAG_GRA, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daTagGra_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x0014, // mPriority - 0, // padding - 0, // padding &l_daTagGra_Method, // mSubMtd 0x00040000, // mStatus 0, // mActorType 0x0E, // mCullType - 0, // padding - 0 // padding }; diff --git a/rel/d/a/tag/d_a_tag_gstart/d_a_tag_gstart.cpp b/rel/d/a/tag/d_a_tag_gstart/d_a_tag_gstart.cpp index c61deca50b..e0814ecadb 100644 --- a/rel/d/a/tag/d_a_tag_gstart/d_a_tag_gstart.cpp +++ b/rel/d/a/tag/d_a_tag_gstart/d_a_tag_gstart.cpp @@ -74,19 +74,14 @@ extern actor_process_profile_definition g_profile_Tag_Gstart = { 2, 0xFFFD, PROC_Tag_Gstart, - 0, &g_fpcLf_Method.mBase, sizeof(daTagGstart_c), 0, 0, &g_fopAc_Method.base, 0x01B5, - 0, - 0, &l_daTagGstart_Method, 0x00060000, 3, 14, - 0, - 0, }; diff --git a/rel/d/a/tag/d_a_tag_guard/d_a_tag_guard.cpp b/rel/d/a/tag/d_a_tag_guard/d_a_tag_guard.cpp index d51376dc47..e6cf2d68c6 100644 --- a/rel/d/a/tag/d_a_tag_guard/d_a_tag_guard.cpp +++ b/rel/d/a/tag/d_a_tag_guard/d_a_tag_guard.cpp @@ -77,19 +77,14 @@ extern actor_process_profile_definition g_profile_TAG_GUARD = { 7, -3, PROC_TAG_GUARD, - 0, &g_fpcLf_Method.mBase, sizeof(daTagGuard_c), 0, 0, &g_fopAc_Method.base, 0x0198, - 0, - 0, &l_daTagGuard_Method, 0x00040000, 0x00, 0x0E, - 0, - 0, }; diff --git a/rel/d/a/tag/d_a_tag_hinit/d_a_tag_hinit.cpp b/rel/d/a/tag/d_a_tag_hinit/d_a_tag_hinit.cpp index 88b968c512..1b04d77be1 100644 --- a/rel/d/a/tag/d_a_tag_hinit/d_a_tag_hinit.cpp +++ b/rel/d/a/tag/d_a_tag_hinit/d_a_tag_hinit.cpp @@ -88,19 +88,14 @@ extern actor_process_profile_definition g_profile_Tag_Hinit = { 3, -3, PROC_Tag_Hinit, - 0, &g_fpcLf_Method.mBase, sizeof(daTagHinit_c), 0, 0, &g_fopAc_Method.base, 0x01B1, - 0, - 0, &l_daTagHinit_Method, 0x00060000, 3, 0x0E, - 0, - 0, }; diff --git a/rel/d/a/tag/d_a_tag_howl/d_a_tag_howl.cpp b/rel/d/a/tag/d_a_tag_howl/d_a_tag_howl.cpp index 8d6ef8b237..b25b781038 100644 --- a/rel/d/a/tag/d_a_tag_howl/d_a_tag_howl.cpp +++ b/rel/d/a/tag/d_a_tag_howl/d_a_tag_howl.cpp @@ -107,19 +107,14 @@ extern actor_process_profile_definition g_profile_TAG_HOWL = { 7, // mListID -3, // mListPrio PROC_TAG_HOWL, // mProcName - 0, // unkA &g_fpcLf_Method.mBase, // mSubMtd sizeof(daTag_Howl_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x011B, // mPriority - 0, // unk22[0] - 0, // unk22[1] &daTag_Howl_MethodTable, // mSubMtd 0x00040000, // mStatus 0x00, // mActorType 0x0E, // mCullType - 0, // field_0x2e[0] - 0, // field_0x2e[1] }; diff --git a/rel/d/a/tag/d_a_tag_hstop/d_a_tag_hstop.cpp b/rel/d/a/tag/d_a_tag_hstop/d_a_tag_hstop.cpp index b167afe673..9323b839d2 100644 --- a/rel/d/a/tag/d_a_tag_hstop/d_a_tag_hstop.cpp +++ b/rel/d/a/tag/d_a_tag_hstop/d_a_tag_hstop.cpp @@ -196,19 +196,14 @@ extern actor_process_profile_definition g_profile_Tag_Hstop = { 3, 0xFFFD, PROC_Tag_Hstop, - 0, &g_fpcLf_Method.mBase, sizeof(daTagHstop_c), 0, 0, &g_fopAc_Method.base, 0x01B3, - 0, - 0, &l_daTagHstop_Method, 0x00040000, 3, 14, - 0, - 0, }; diff --git a/rel/d/a/tag/d_a_tag_instruction/d_a_tag_instruction.cpp b/rel/d/a/tag/d_a_tag_instruction/d_a_tag_instruction.cpp index 6b6db3586b..0545040764 100644 --- a/rel/d/a/tag/d_a_tag_instruction/d_a_tag_instruction.cpp +++ b/rel/d/a/tag/d_a_tag_instruction/d_a_tag_instruction.cpp @@ -39,19 +39,14 @@ extern actor_process_profile_definition g_profile_Tag_Instruction = { 7, 0xFFFD, PROC_Tag_Instruction, - 0, &g_fpcLf_Method.mBase, sizeof(daTagInst_c), 0, 0, &g_fopAc_Method.base, 0x014E, - 0, - 0, &l_daTagInst_Method, 0x00040000, 0, 14, - 0, - 0, }; diff --git a/rel/d/a/tag/d_a_tag_lantern/d_a_tag_lantern.cpp b/rel/d/a/tag/d_a_tag_lantern/d_a_tag_lantern.cpp index cdd639eb91..8d37edb8cf 100644 --- a/rel/d/a/tag/d_a_tag_lantern/d_a_tag_lantern.cpp +++ b/rel/d/a/tag/d_a_tag_lantern/d_a_tag_lantern.cpp @@ -127,19 +127,14 @@ extern actor_process_profile_definition g_profile_TAG_LANTERN = { 7, // mListID -3, // mListPrio PROC_TAG_LANTERN, // mProcName - 0, // Padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daTag_Lantern_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x011E, // mPriority - 0, // Padding - 0, // Padding &daTag_Lantern_MethodTable, // mSubMtd 0x00040000, // mStatus 0, // mActorType 14, // mCullType - 0, // Padding - 0, // Padding }; \ No newline at end of file diff --git a/rel/d/a/tag/d_a_tag_lv5soup/d_a_tag_lv5soup.cpp b/rel/d/a/tag/d_a_tag_lv5soup/d_a_tag_lv5soup.cpp index 131c933d44..040fca2c09 100644 --- a/rel/d/a/tag/d_a_tag_lv5soup/d_a_tag_lv5soup.cpp +++ b/rel/d/a/tag/d_a_tag_lv5soup/d_a_tag_lv5soup.cpp @@ -100,19 +100,14 @@ extern actor_process_profile_definition g_profile_TAG_LV5SOUP = { 7, 0xFFFD, 0x122, - 0, &g_fpcLf_Method.mBase, sizeof(daTag_Lv5Soup_c), 0, 0, &g_fopAc_Method.base, 0x0046, - 0, - 0, &daTag_Lv5Soup_MethodTable, 0x00064100, 5, 14, - 0, - 0, }; diff --git a/rel/d/a/tag/d_a_tag_lv6CstaSw/d_a_tag_lv6CstaSw.cpp b/rel/d/a/tag/d_a_tag_lv6CstaSw/d_a_tag_lv6CstaSw.cpp index a679220474..a61f7ea583 100644 --- a/rel/d/a/tag/d_a_tag_lv6CstaSw/d_a_tag_lv6CstaSw.cpp +++ b/rel/d/a/tag/d_a_tag_lv6CstaSw/d_a_tag_lv6CstaSw.cpp @@ -121,19 +121,14 @@ extern actor_process_profile_definition g_profile_Tag_Lv6CstaSw = { 7, 0xFFFD, PROC_Tag_Lv6CstaSw, - 0, &g_fpcLf_Method.mBase, sizeof(daLv6CstaSw_c), 0, 0, &g_fopAc_Method.base, 0x0292, - 0, - 0, &l_daLv6CstaSw_Method, 0x00044000, 0, 14, - 0, - 0, }; diff --git a/rel/d/a/tag/d_a_tag_magne/d_a_tag_magne.cpp b/rel/d/a/tag/d_a_tag_magne/d_a_tag_magne.cpp index 1d0b7dd475..3c16edfc7b 100644 --- a/rel/d/a/tag/d_a_tag_magne/d_a_tag_magne.cpp +++ b/rel/d/a/tag/d_a_tag_magne/d_a_tag_magne.cpp @@ -72,19 +72,14 @@ extern actor_process_profile_definition g_profile_Tag_Magne = { 7, 0xFFFD, PROC_Tag_Magne, - 0, &g_fpcLf_Method.mBase, sizeof(daTagMagne_c), 0, 0, &g_fopAc_Method.base, 0x024E, - 0, - 0, &l_daTagMagne_Method, 0x00040000, 0, 14, - 0, - 0, }; diff --git a/rel/d/a/tag/d_a_tag_mmsg/d_a_tag_mmsg.cpp b/rel/d/a/tag/d_a_tag_mmsg/d_a_tag_mmsg.cpp index 86663e3fc9..9ce091c219 100644 --- a/rel/d/a/tag/d_a_tag_mmsg/d_a_tag_mmsg.cpp +++ b/rel/d/a/tag/d_a_tag_mmsg/d_a_tag_mmsg.cpp @@ -121,19 +121,14 @@ extern actor_process_profile_definition g_profile_Tag_Mmsg = { 7, // mListID 0xFFFD, // mListPrio PROC_Tag_Mmsg, // mProcName - 0, // unkA &g_fpcLf_Method.mBase, // mSubMtd sizeof(daTagMmsg_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x00FF, // mPriority - 0, // unk22[0] - 0, // unk22[1] &l_daTagMmsg_Method, // mSubMtd 0x00044000, // mStatus 0x03, // mActorType 0x0E, // mCullType - 0, // field_0x2e[0] - 0 // field_0x2e[1] }; \ No newline at end of file diff --git a/rel/d/a/tag/d_a_tag_mstop/d_a_tag_mstop.cpp b/rel/d/a/tag/d_a_tag_mstop/d_a_tag_mstop.cpp index ff99a4ca1a..f751b15915 100644 --- a/rel/d/a/tag/d_a_tag_mstop/d_a_tag_mstop.cpp +++ b/rel/d/a/tag/d_a_tag_mstop/d_a_tag_mstop.cpp @@ -317,19 +317,14 @@ extern actor_process_profile_definition g_profile_Tag_Mstop = { 7, // mListID -3, // mListPrio PROC_Tag_Mstop, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daTagMstop_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x0101, // mPriority - 0, // padding - 0, // padding &l_daTagMstop_Method, // mSubMtd 0x00044000, // mStatus 3, // mActorType 0x0E, // mCullType - 0, // padding - 0 // padding }; diff --git a/rel/d/a/tag/d_a_tag_poFire/d_a_tag_poFire.cpp b/rel/d/a/tag/d_a_tag_poFire/d_a_tag_poFire.cpp index 8f80310218..6d35e8308b 100644 --- a/rel/d/a/tag/d_a_tag_poFire/d_a_tag_poFire.cpp +++ b/rel/d/a/tag/d_a_tag_poFire/d_a_tag_poFire.cpp @@ -89,19 +89,14 @@ extern actor_process_profile_definition g_profile_Tag_poFire = { 7, // mListID -3, // mListPrio PROC_Tag_poFire, // mProcName - 0, // Padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daTagPoFire_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x0289, // mPriority - 0, // Padding - 0, // Padding &l_daTagPoFire_Method, // mSubMtd 0x00044000, // mStatus 0, // mActorType 14, // mCullType - 0, // Padding - 0, // Padding }; diff --git a/rel/d/a/tag/d_a_tag_ret_room/d_a_tag_ret_room.cpp b/rel/d/a/tag/d_a_tag_ret_room/d_a_tag_ret_room.cpp index 5f2178c5cf..245f833930 100644 --- a/rel/d/a/tag/d_a_tag_ret_room/d_a_tag_ret_room.cpp +++ b/rel/d/a/tag/d_a_tag_ret_room/d_a_tag_ret_room.cpp @@ -113,19 +113,14 @@ extern actor_process_profile_definition g_profile_Tag_RetRoom = { 7, // mListID -3, // mListPrio PROC_Tag_RetRoom, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daTagRetRm_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x02DB, // mPriority - 0, // padding - 0, // padding &daTagRetRm_METHODS, // mSubMtd 0x00040000, // mStatus 0x00, // mActorType 0x0E, // mCullType - 0, // padding - 0, // padding }; diff --git a/rel/d/a/tag/d_a_tag_rmbit_sw/d_a_tag_rmbit_sw.cpp b/rel/d/a/tag/d_a_tag_rmbit_sw/d_a_tag_rmbit_sw.cpp index 01db99db18..62e3a94dbb 100644 --- a/rel/d/a/tag/d_a_tag_rmbit_sw/d_a_tag_rmbit_sw.cpp +++ b/rel/d/a/tag/d_a_tag_rmbit_sw/d_a_tag_rmbit_sw.cpp @@ -144,19 +144,14 @@ extern actor_process_profile_definition g_profile_Tag_RmbitSw = { 7, -3, PROC_Tag_RmbitSw, - 0, &g_fpcLf_Method.mBase, sizeof(daTagRmbitSw_c), 0, 0, &g_fopAc_Method.base, 0x02EC, - 0, - 0, &daTagRmbitSw_METHODS, 0x00040000, 0, 0x0E, - 0, - 0, }; diff --git a/rel/d/a/tag/d_a_tag_schedule/d_a_tag_schedule.cpp b/rel/d/a/tag/d_a_tag_schedule/d_a_tag_schedule.cpp index 64a9a9dbef..19ba5e6b58 100644 --- a/rel/d/a/tag/d_a_tag_schedule/d_a_tag_schedule.cpp +++ b/rel/d/a/tag/d_a_tag_schedule/d_a_tag_schedule.cpp @@ -33,19 +33,14 @@ extern actor_process_profile_definition g_profile_Tag_Schedule = { 0x0007, // mListID 0xFFFD, // mListPrio PROC_Tag_Schedule, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daTagSchedule_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x018C, // mPriority - 0, // padding - 0, // padding &l_daTagSchedule_Method, // mSubMtd 0x00040000, // mStatus 0x00, // mActorType 0x0E, // mCullType - 0, // padding - 0, // padding }; diff --git a/rel/d/a/tag/d_a_tag_setBall/d_a_tag_setBall.cpp b/rel/d/a/tag/d_a_tag_setBall/d_a_tag_setBall.cpp index 3f1967db99..6f73f998ec 100644 --- a/rel/d/a/tag/d_a_tag_setBall/d_a_tag_setBall.cpp +++ b/rel/d/a/tag/d_a_tag_setBall/d_a_tag_setBall.cpp @@ -76,19 +76,14 @@ extern actor_process_profile_definition g_profile_Tag_SetBall = { 7, 0xFFFD, PROC_Tag_SetBall, - 0, &g_fpcLf_Method.mBase, sizeof(daTagSetBall_c), 0, 0, &g_fopAc_Method.base, 0x023F, - 0, - 0, &l_daTagSetBall_Method, 0x00040100, 0, 14, - 0, - 0, }; diff --git a/rel/d/a/tag/d_a_tag_setrestart/d_a_tag_setrestart.cpp b/rel/d/a/tag/d_a_tag_setrestart/d_a_tag_setrestart.cpp index fb2cce6f62..80baba5424 100644 --- a/rel/d/a/tag/d_a_tag_setrestart/d_a_tag_setrestart.cpp +++ b/rel/d/a/tag/d_a_tag_setrestart/d_a_tag_setrestart.cpp @@ -123,19 +123,14 @@ extern actor_process_profile_definition g_profile_Tag_Restart = { 7, 0xFFFD, PROC_Tag_Restart, - 0, &g_fpcLf_Method.mBase, sizeof(daTagRestart_c), 0, 0, &g_fopAc_Method.base, 0x0250, - 0, - 0, &l_daTagRestart_Method, 0x00040000, 0, 14, - 0, - 0, }; diff --git a/rel/d/a/tag/d_a_tag_shop_item/d_a_tag_shop_item.cpp b/rel/d/a/tag/d_a_tag_shop_item/d_a_tag_shop_item.cpp index 7367a1e3ce..b4d6b66352 100644 --- a/rel/d/a/tag/d_a_tag_shop_item/d_a_tag_shop_item.cpp +++ b/rel/d/a/tag/d_a_tag_shop_item/d_a_tag_shop_item.cpp @@ -178,19 +178,14 @@ extern actor_process_profile_definition g_profile_TAG_SHOPITM = { 7, // mListID -3, // mListPrio PROC_TAG_SHOPITM, // mProcName - 0, // Padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daTag_ShopItem_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x004B, // mPriority - 0, // Padding - 0, // Padding &daTag_ShopItem_MethodTable, // mSubMtd 0x00064100, // mStatus 5, // mActorType 14, // mCullType - 0, // Padding - 0, // Padding }; \ No newline at end of file diff --git a/rel/d/a/tag/d_a_tag_smk_emt/d_a_tag_smk_emt.cpp b/rel/d/a/tag/d_a_tag_smk_emt/d_a_tag_smk_emt.cpp index 1d50e26e68..97d3d195ed 100644 --- a/rel/d/a/tag/d_a_tag_smk_emt/d_a_tag_smk_emt.cpp +++ b/rel/d/a/tag/d_a_tag_smk_emt/d_a_tag_smk_emt.cpp @@ -109,19 +109,14 @@ extern actor_process_profile_definition g_profile_Tag_SmkEmt = { 7, // mListID -3, // mListPrio PROC_Tag_SmkEmt, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daTagSmkEmt_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x02E7, // mPriority - 0, // padding - 0, // padding &daTagSmkEmt_METHODS, // mSubMtd 0x00040000, // mStatus 0, // mActorType 0x0E, // mCullType - 0, // padding - 0 // padding }; \ No newline at end of file diff --git a/rel/d/a/tag/d_a_tag_spinner/d_a_tag_spinner.cpp b/rel/d/a/tag/d_a_tag_spinner/d_a_tag_spinner.cpp index ca84046e15..a3108140f8 100644 --- a/rel/d/a/tag/d_a_tag_spinner/d_a_tag_spinner.cpp +++ b/rel/d/a/tag/d_a_tag_spinner/d_a_tag_spinner.cpp @@ -119,19 +119,14 @@ extern actor_process_profile_definition g_profile_Tag_Spinner = { 3, // mListID -3, // mListPrio PROC_Tag_Spinner, // mProcName - 0, // Padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daTagSpinner_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x025D, // mPriority - 0, // Padding - 0, // Padding &l_daTagSpinner_Method, // mSubMtd 0x00040100, // mStatus 0, // mActorType 14, // mCullType - 0, // Padding - 0, // Padding }; \ No newline at end of file diff --git a/rel/d/a/tag/d_a_tag_spring/d_a_tag_spring.cpp b/rel/d/a/tag/d_a_tag_spring/d_a_tag_spring.cpp index 5389b0e4e6..9d32184a6a 100644 --- a/rel/d/a/tag/d_a_tag_spring/d_a_tag_spring.cpp +++ b/rel/d/a/tag/d_a_tag_spring/d_a_tag_spring.cpp @@ -111,19 +111,14 @@ extern actor_process_profile_definition g_profile_Tag_Spring = { 7, // mListID -3, // mListPrio PROC_Tag_Spring, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daTagSpring_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x024B, // mPriority - 0, // padding - 0, // padding &l_daTagSpring_Method, // mSubMtd 0x00040000, // mStatus 0, // mActorType 0x0E, // mCullType - 0, // padding - 0, // padding }; diff --git a/rel/d/a/tag/d_a_tag_stream/d_a_tag_stream.cpp b/rel/d/a/tag/d_a_tag_stream/d_a_tag_stream.cpp index 6187768adc..e52d534322 100644 --- a/rel/d/a/tag/d_a_tag_stream/d_a_tag_stream.cpp +++ b/rel/d/a/tag/d_a_tag_stream/d_a_tag_stream.cpp @@ -125,19 +125,14 @@ extern actor_process_profile_definition g_profile_Tag_Stream = { 7, // mListID -3, // mListPrio PROC_Tag_Stream, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daTagStream_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x0103, // mPriority - 0, // padding - 0, // padding &l_daTagStream_Method, // mSubMtd 0x00044000, // mStatus 3, // mActorType 0x0E, // mCullType - 0, // padding - 0 // padding }; diff --git a/rel/d/a/tag/d_a_tag_telop/d_a_tag_telop.cpp b/rel/d/a/tag/d_a_tag_telop/d_a_tag_telop.cpp index 38e52281de..ce80605566 100644 --- a/rel/d/a/tag/d_a_tag_telop/d_a_tag_telop.cpp +++ b/rel/d/a/tag/d_a_tag_telop/d_a_tag_telop.cpp @@ -83,19 +83,14 @@ extern actor_process_profile_definition g_profile_TAG_TELOP = { 7, 0xFFFD, PROC_TAG_TELOP, - 0, &g_fpcLf_Method.mBase, sizeof(daTag_Telop_c), 0, 0, &g_fopAc_Method.base, 0x011A, - 0, - 0, &l_daTag_Telop_Method, 0x00044000, 0, 6, - 0, - 0, }; diff --git a/rel/d/a/tag/d_a_tag_theB_hint/d_a_tag_theB_hint.cpp b/rel/d/a/tag/d_a_tag_theB_hint/d_a_tag_theB_hint.cpp index d32cf7bcd2..a96f970c7e 100644 --- a/rel/d/a/tag/d_a_tag_theB_hint/d_a_tag_theB_hint.cpp +++ b/rel/d/a/tag/d_a_tag_theB_hint/d_a_tag_theB_hint.cpp @@ -37,19 +37,14 @@ extern actor_process_profile_definition g_profile_Tag_TheBHint = { 7, // mListID -3, // mListPrio PROC_Tag_TheBHint, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daTagTheBHint_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x0109, // mPriority - 0, // padding - 0, // padding &l_daTagTheBHint_Method, // mSubMtd 0x00040000, // mStatus 0, // mActorType 0x0E, // mCullType - 0, // padding - 0 // padding }; diff --git a/rel/d/a/tag/d_a_tag_wara_howl/d_a_tag_wara_howl.cpp b/rel/d/a/tag/d_a_tag_wara_howl/d_a_tag_wara_howl.cpp index 5058527fb0..81c989e7a6 100644 --- a/rel/d/a/tag/d_a_tag_wara_howl/d_a_tag_wara_howl.cpp +++ b/rel/d/a/tag/d_a_tag_wara_howl/d_a_tag_wara_howl.cpp @@ -107,19 +107,14 @@ extern actor_process_profile_definition g_profile_Tag_WaraHowl = { 7, 0xFFFD, PROC_Tag_WaraHowl, - 0, &g_fpcLf_Method.mBase, sizeof(daTagWrHowl_c), 0, 0, &g_fopAc_Method.base, 0x02DD, - 0, - 0, &daTagWrHowl_METHODS, 0x00040000, 0, 14, - 0, - 0, }; \ No newline at end of file diff --git a/rel/d/a/tag/d_a_tag_watchge/d_a_tag_watchge.cpp b/rel/d/a/tag/d_a_tag_watchge/d_a_tag_watchge.cpp index d5307a4b65..1779c94d4e 100644 --- a/rel/d/a/tag/d_a_tag_watchge/d_a_tag_watchge.cpp +++ b/rel/d/a/tag/d_a_tag_watchge/d_a_tag_watchge.cpp @@ -111,19 +111,14 @@ extern actor_process_profile_definition g_profile_Tag_WatchGe = { 7, // mListID -3, // mListPrio PROC_Tag_WatchGe, // mProcName - 0, // padding &g_fpcLf_Method.mBase, // mSubMtd sizeof(daTagWatchGe_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // mSubMtd 0x00C1, // mPriority - 0, // padding - 0, // padding &l_daTagWatchGe_Method, // mSubMtd 0x00044000, // mStatus 0, // mActorType 0, // mCullType - 0, // padding - 0 // padding }; diff --git a/src/d/a/d_a_alink.cpp b/src/d/a/d_a_alink.cpp index d3e966cf6b..cd827157ed 100644 --- a/src/d/a/d_a_alink.cpp +++ b/src/d/a/d_a_alink.cpp @@ -11674,21 +11674,16 @@ extern actor_process_profile_definition g_profile_ALINK = { 5, -3, PROC_ALINK, - 0, &g_fpcLf_Method.mBase, sizeof(daAlink_c), 0, 0, &g_fopAc_Method.base, 0x5B, - 0, - 0, &l_daAlink_Method, 0x00060400, 1, 0, - 0, - 0, }; // tons of extra padding? not sure what this is diff --git a/src/d/d_ky_thunder.cpp b/src/d/d_ky_thunder.cpp index f453359feb..c5691f1e97 100644 --- a/src/d/d_ky_thunder.cpp +++ b/src/d/d_ky_thunder.cpp @@ -280,14 +280,11 @@ extern kankyo_process_profile_definition g_profile_KY_THUNDER = { 7, -3, PROC_KY_THUNDER, - 0, &g_fpcLf_Method.mBase, sizeof(dThunder_c), 0, 0, &g_fopKy_Method, 6, - 0, - 0, &l_dThunder_Method, }; diff --git a/src/d/d_kyeff.cpp b/src/d/d_kyeff.cpp index 3982b2c7a3..52dd72fd22 100644 --- a/src/d/d_kyeff.cpp +++ b/src/d/d_kyeff.cpp @@ -110,14 +110,11 @@ extern kankyo_process_profile_definition g_profile_KYEFF = { 12, 0xFFFD, PROC_KYEFF, - 0, &g_fpcLf_Method.mBase, sizeof(dKyeff_c), 0, 0, &g_fopKy_Method, 0x0005, - 0, - 0, &l_dKyeff_Method, }; diff --git a/src/d/d_kyeff2.cpp b/src/d/d_kyeff2.cpp index 2e02fe37af..87c577d002 100644 --- a/src/d/d_kyeff2.cpp +++ b/src/d/d_kyeff2.cpp @@ -49,14 +49,11 @@ extern kankyo_process_profile_definition g_profile_KYEFF2 = { 12, 0xFFFD, PROC_KYEFF2, - 0, &g_fpcLf_Method.mBase, sizeof(dKyeff2_c), 0, 0, &g_fopKy_Method, 0x0003, - 0, - 0, &l_dKyeff2_Method, }; diff --git a/src/d/kankyo/d_kankyo_wether.cpp b/src/d/kankyo/d_kankyo_wether.cpp index 0839605f1a..4a99929522 100644 --- a/src/d/kankyo/d_kankyo_wether.cpp +++ b/src/d/kankyo/d_kankyo_wether.cpp @@ -1603,8 +1603,8 @@ asm void dKyw_wind_set() { #pragma pop /* 8005AAE0-8005AAF0 055420 0010+00 1/1 6/6 7/7 .text dKyw_get_wind_vec__Fv */ -cXyz& dKyw_get_wind_vec() { - return g_env_light.mWind.vec; +cXyz* dKyw_get_wind_vec() { + return &g_env_light.mWind.vec; } /* 8005AAF0-8005AB00 055430 0010+00 1/1 6/6 8/8 .text dKyw_get_wind_pow__Fv */ diff --git a/src/d/meter/d_meter2.cpp b/src/d/meter/d_meter2.cpp index 8ea63fd654..d866e1a79b 100644 --- a/src/d/meter/d_meter2.cpp +++ b/src/d/meter/d_meter2.cpp @@ -3377,14 +3377,11 @@ SECTION_DATA extern msg_process_profile_definition g_profile_METER2 = { 12, -3, PROC_METER2, - 0, (process_method_class*)&g_fpcLf_Method, sizeof(dMeter2_c), 0, 0, &g_fopMsg_Method, 0x0301, - 0, - 0, &l_dMeter2_Method, }; diff --git a/src/d/s/d_s_menu.cpp b/src/d/s/d_s_menu.cpp index 30a1cafe0c..7f8c9404a1 100644 --- a/src/d/s/d_s_menu.cpp +++ b/src/d/s/d_s_menu.cpp @@ -17,7 +17,6 @@ extern scene_process_profile_definition g_profile_MENU_SCENE = { 1, // mListID -3, // mListPrio PROC_MENU_SCENE, // mProcName - 0, // padding &g_fpcNd_Method.mBase, // mSubMtd 0, // mSize 0, // mSizeOther diff --git a/src/d/s/d_s_title.cpp b/src/d/s/d_s_title.cpp index 234f025e64..e3617537ab 100644 --- a/src/d/s/d_s_title.cpp +++ b/src/d/s/d_s_title.cpp @@ -15,7 +15,6 @@ extern scene_process_profile_definition g_profile_WARNING_SCENE = { 1, // mListID -3, // mListPrio PROC_WARNING_SCENE, // mProcName - 0, // padding &g_fpcNd_Method.mBase, // mSubMtd 0x00000204, // mSize 0, // mSizeOther @@ -31,7 +30,6 @@ extern scene_process_profile_definition g_profile_WARNING2_SCENE = { 1, // mListID -3, // mListPrio PROC_WARNING2_SCENE, // mProcName - 0, // padding &g_fpcNd_Method.mBase, // mSubMtd 0x00000204, // mSize 0, // mSizeOther diff --git a/src/f_op/f_op_actor.cpp b/src/f_op/f_op_actor.cpp index c11222bd3c..27d1b92edd 100644 --- a/src/f_op/f_op_actor.cpp +++ b/src/f_op/f_op_actor.cpp @@ -190,14 +190,14 @@ static int fopAc_Create(void* i_this) { if (!dStage_FileList_dt_GetEnemyAppear1Flag(filelist)) { u32 sw = dStage_FileList_dt_GetBitSw(filelist); if (sw != 0xFF && dComIfGs_isSwitch(sw, _this->orig.roomNo) && - profile->mActorType == 2) + profile->mActorType == ACTOR_TYPE_ENEMY) { return cPhs_ERROR_e; } } else { u32 sw = dStage_FileList_dt_GetBitSw(filelist); if (sw != 0xFF && !dComIfGs_isSwitch(sw, _this->orig.roomNo) && - profile->mActorType == 2) + profile->mActorType == ACTOR_TYPE_ENEMY) { return cPhs_ERROR_e; } diff --git a/src/f_op/f_op_actor_iter.cpp b/src/f_op/f_op_actor_iter.cpp index 5882c20ba8..bf31c4e6e6 100644 --- a/src/f_op/f_op_actor_iter.cpp +++ b/src/f_op/f_op_actor_iter.cpp @@ -8,31 +8,27 @@ #include "SSystem/SComponent/c_tag_iter.h" #include "f_op/f_op_actor_tag.h" -// -// Declarations: -// - /* 800197BC-800197F8 0140FC 003C+00 0/0 5/5 3/3 .text fopAcIt_Executor__FPFPvPv_iPv */ -int fopAcIt_Executor(fopAcIt_ExecutorFunc pExecFunc, void* pData) { +int fopAcIt_Executor(fopAcIt_ExecutorFunc i_execFunc, void* i_data) { struct { fopAcIt_ExecutorFunc func; void* data; } userData; - userData.func = pExecFunc; - userData.data = pData; + userData.func = i_execFunc; + userData.data = i_data; return cLsIt_Method(&g_fopAcTg_Queue, (cNdIt_MethodFunc)cTgIt_MethodCall, &userData); } /* 800197F8-80019834 014138 003C+00 0/0 67/67 388/388 .text fopAcIt_Judge__FPFPvPv_PvPv */ -void* fopAcIt_Judge(fopAcIt_JudgeFunc pJudgeFunc, void* pData) { +void* fopAcIt_Judge(fopAcIt_JudgeFunc i_judgeFunc, void* i_data) { struct { fopAcIt_JudgeFunc func; void* data; } userData; - userData.func = pJudgeFunc; - userData.data = pData; + userData.func = i_judgeFunc; + userData.data = i_data; return cLsIt_Judge(&g_fopAcTg_Queue, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &userData); } diff --git a/src/f_op/f_op_actor_mng.cpp b/src/f_op/f_op_actor_mng.cpp index 321b603296..b3b9d309eb 100644 --- a/src/f_op/f_op_actor_mng.cpp +++ b/src/f_op/f_op_actor_mng.cpp @@ -4,25 +4,23 @@ // #include "f_op/f_op_actor_mng.h" +#include "JSystem/J3DGraphBase/J3DSys.h" +#include "JSystem/J3DU/J3DUClipper.h" #include "JSystem/JKernel/JKRHeap.h" #include "JSystem/JKernel/JKRSolidHeap.h" #include "MSL_C/math.h" #include "SSystem/SComponent/c_lib.h" #include "SSystem/SComponent/c_malloc.h" -#include "dol2asm.h" -#include "global.h" -#include "d/com/d_com_inf_game.h" -#include "JSystem/J3DGraphBase/J3DSys.h" -#include "JSystem/J3DU/J3DUClipper.h" -#include "MSL_C/math.h" #include "SSystem/SComponent/c_math.h" +#include "d/com/d_com_inf_game.h" +#include "d/d_procname.h" #include "d/d_stage.h" +#include "dol2asm.h" #include "f_op/f_op_actor.h" +#include "global.h" #include "m_Do/m_Do_ext.h" #include "m_Do/m_Do_lib.h" -#include "d/d_procname.h" #include "m_Do/m_Do_mtx.h" -#include "SSystem/SComponent/c_lib.h" // // Types: @@ -296,31 +294,32 @@ extern "C" extern u8 data_80451164[4]; // /* 800198A4-800198C4 0141E4 0020+00 0/0 1/1 0/0 .text fopAcM_FastCreate__FsPFPv_iPvPv */ -void* fopAcM_FastCreate(s16 procName, FastCreateReqFunc createFunc, void* param_3, void* p_data) { - return fpcM_FastCreate(procName, createFunc, param_3, p_data); +void* fopAcM_FastCreate(s16 i_procName, FastCreateReqFunc i_createFunc, void* param_3, + void* i_data) { + return fpcM_FastCreate(i_procName, i_createFunc, param_3, i_data); } /* 800198C4-80019934 014204 0070+00 1/1 5/5 18/18 .text fopAcM_setStageLayer__FPv */ -void fopAcM_setStageLayer(void* p_proc) { +void fopAcM_setStageLayer(void* i_proc) { scene_class* stageProc = fopScnM_SearchByID(dStage_roomControl_c::getProcID()); - fpcM_ChangeLayerID(p_proc, fopScnM_LayerID(stageProc)); + fpcM_ChangeLayerID(i_proc, fopScnM_LayerID(stageProc)); } /* 80019934-800199BC 014274 0088+00 1/1 0/0 2/2 .text fopAcM_setRoomLayer__FPvi */ -void fopAcM_setRoomLayer(void* p_proc, int roomNo) { - if (roomNo >= 0) { - scene_class* roomProc = fopScnM_SearchByID(dStage_roomControl_c::getStatusProcID(roomNo)); - fpcM_ChangeLayerID(p_proc, fopScnM_LayerID(roomProc)); +void fopAcM_setRoomLayer(void* i_proc, int i_roomNo) { + if (i_roomNo >= 0) { + scene_class* roomProc = fopScnM_SearchByID(dStage_roomControl_c::getStatusProcID(i_roomNo)); + fpcM_ChangeLayerID(i_proc, fopScnM_LayerID(roomProc)); } } /* 800199BC-80019A2C 0142FC 0070+00 0/0 4/4 114/114 .text fopAcM_SearchByID__FUiPP10fopAc_ac_c */ -s32 fopAcM_SearchByID(unsigned int id, fopAc_ac_c** p_actor) { - if (fpcM_IsCreating(id)) { - *p_actor = NULL; +s32 fopAcM_SearchByID(unsigned int i_actorID, fopAc_ac_c** i_outActor) { + if (fpcM_IsCreating(i_actorID)) { + *i_outActor = NULL; } else { - *p_actor = (fopAc_ac_c*)fopAcIt_Judge((fopAcIt_JudgeFunc)fpcSch_JudgeByID, &id); - if (*p_actor == NULL) { + *i_outActor = (fopAc_ac_c*)fopAcIt_Judge((fopAcIt_JudgeFunc)fpcSch_JudgeByID, &i_actorID); + if (*i_outActor == NULL) { return 0; } } @@ -328,13 +327,13 @@ s32 fopAcM_SearchByID(unsigned int id, fopAc_ac_c** p_actor) { } /* 80019A2C-80019AA8 01436C 007C+00 0/0 0/0 28/28 .text fopAcM_SearchByName__FsPP10fopAc_ac_c */ -s32 fopAcM_SearchByName(s16 procName, fopAc_ac_c** p_actor) { - *p_actor = (fopAc_ac_c*)fopAcIt_Judge((fopAcIt_JudgeFunc)fpcSch_JudgeForPName, &procName); - if (*p_actor == NULL) { +s32 fopAcM_SearchByName(s16 i_procName, fopAc_ac_c** i_outActor) { + *i_outActor = (fopAc_ac_c*)fopAcIt_Judge((fopAcIt_JudgeFunc)fpcSch_JudgeForPName, &i_procName); + if (*i_outActor == NULL) { return 0; } else { - if (fpcM_IsCreating(fopAcM_GetID(*p_actor))) { - *p_actor = NULL; + if (fpcM_IsCreating(fopAcM_GetID(*i_outActor))) { + *i_outActor = NULL; } return 1; } @@ -359,63 +358,63 @@ fopAcM_prm_class* fopAcM_CreateAppend() { /* 80019B1C-80019C78 01445C 015C+00 4/4 0/0 0/0 .text * createAppend__FUsUlPC4cXyziPC5csXyzPC4cXyzScUi */ -fopAcM_prm_class* createAppend(u16 enemyNo, u32 parameters, const cXyz* p_pos, int roomNo, - const csXyz* p_angle, const cXyz* p_scale, s8 subType, - unsigned int parentPId) { +fopAcM_prm_class* createAppend(u16 i_enemyNo, u32 i_parameters, const cXyz* i_pos, int i_roomNo, + const csXyz* i_angle, const cXyz* i_scale, s8 i_subType, + unsigned int i_parentProcID) { fopAcM_prm_class* params = fopAcM_CreateAppend(); if (params == NULL) { return NULL; } else { - params->mEnemyNo = enemyNo; + params->mEnemyNo = i_enemyNo; - if (p_pos != NULL) { - params->mPos = *p_pos; + if (i_pos != NULL) { + params->mPos = *i_pos; } else { params->mPos = cXyz::Zero; } - params->mRoomNo = roomNo; + params->mRoomNo = i_roomNo; - if (p_angle != NULL) { - params->mAngle = *p_angle; + if (i_angle != NULL) { + params->mAngle = *i_angle; } else { params->mAngle = csXyz::Zero; } - if (p_scale != NULL) { - params->mScale[0] = 10.0f * p_scale->x; - params->mScale[1] = 10.0f * p_scale->y; - params->mScale[2] = 10.0f * p_scale->z; + if (i_scale != NULL) { + params->mScale[0] = 10.0f * i_scale->x; + params->mScale[1] = 10.0f * i_scale->y; + params->mScale[2] = 10.0f * i_scale->z; } else { params->mScale[0] = 10; params->mScale[1] = 10; params->mScale[2] = 10; } - params->mParameter = parameters; - params->mParentPId = parentPId; - params->mSubtype = subType; + params->mParameter = i_parameters; + params->mParentPId = i_parentProcID; + params->mSubtype = i_subType; return params; } } /* 80019C78-80019C7C 0145B8 0004+00 3/3 0/0 0/0 .text fopAcM_Log__FPC10fopAc_ac_cPCc */ -void fopAcM_Log(fopAc_ac_c const* p_actor, char const* str) { +void fopAcM_Log(fopAc_ac_c const* i_actor, char const* str) { /* empty function */ } /* 80019C7C-80019CB8 0145BC 003C+00 0/0 10/10 483/483 .text fopAcM_delete__FP10fopAc_ac_c */ -void fopAcM_delete(fopAc_ac_c* p_actor) { +void fopAcM_delete(fopAc_ac_c* i_actor) { // "Deleting Actor" - fopAcM_Log(p_actor, "アクターの削除"); - fpcM_Delete(p_actor); + fopAcM_Log(i_actor, "アクターの削除"); + fpcM_Delete(i_actor); } /* 80019CB8-80019D18 0145F8 0060+00 0/0 3/3 12/12 .text fopAcM_delete__FUi */ -s32 fopAcM_delete(unsigned int actorID) { - void* actor = fopAcM_SearchByID(actorID); +s32 fopAcM_delete(unsigned int i_actorID) { + void* actor = fopAcM_SearchByID(i_actorID); if (actor != NULL) { // "Deleting Actor" @@ -428,86 +427,88 @@ s32 fopAcM_delete(unsigned int actorID) { /* 80019D18-80019D98 014658 0080+00 2/2 0/0 0/0 .text * fopAcM_create__FsUsUlPC4cXyziPC5csXyzPC4cXyzScPFPv_i */ -s32 fopAcM_create(s16 procName, u16 enemyNo, u32 parameter, const cXyz* p_pos, int roomNo, - const csXyz* p_angle, const cXyz* p_scale, s8 subType, createFunc p_createFunc) { - fopAcM_prm_class* params = - createAppend(enemyNo, parameter, p_pos, roomNo, p_angle, p_scale, subType, 0xFFFFFFFF); +s32 fopAcM_create(s16 i_procName, u16 i_enemyNo, u32 i_parameters, const cXyz* i_pos, int i_roomNo, + const csXyz* i_angle, const cXyz* i_scale, s8 i_subType, + createFunc i_createFunc) { + fopAcM_prm_class* params = createAppend(i_enemyNo, i_parameters, i_pos, i_roomNo, i_angle, + i_scale, i_subType, 0xFFFFFFFF); if (params == NULL) { return -1; } else { - return fpcM_Create(procName, p_createFunc, params); + return fpcM_Create(i_procName, i_createFunc, params); } } /* 80019D98-80019E04 0146D8 006C+00 3/3 11/11 70/70 .text * fopAcM_create__FsUlPC4cXyziPC5csXyzPC4cXyzSc */ -s32 fopAcM_create(s16 procName, u32 parameter, const cXyz* p_pos, int roomNo, const csXyz* p_angle, - const cXyz* p_scale, s8 subType) { - return fopAcM_create(procName, 0xFFFF, parameter, p_pos, roomNo, p_angle, p_scale, subType, NULL); +s32 fopAcM_create(s16 i_procName, u32 i_parameters, const cXyz* i_pos, int i_roomNo, + const csXyz* i_angle, const cXyz* i_scale, s8 i_subType) { + return fopAcM_create(i_procName, 0xFFFF, i_parameters, i_pos, i_roomNo, i_angle, i_scale, + i_subType, NULL); } /* 80019E04-80019E6C 014744 0068+00 5/5 6/6 18/18 .text * fopAcM_fastCreate__FsUlPC4cXyziPC5csXyzPC4cXyzScPFPv_iPv */ -void* fopAcM_fastCreate(s16 procName, u32 parameter, const cXyz* p_pos, int roomNo, - const csXyz* p_angle, const cXyz* p_scale, s8 subType, createFunc p_createFunc, - void* p_createFuncData) { - fopAcM_prm_class* prmClass = - createAppend(0xFFFF, parameter, p_pos, roomNo, p_angle, p_scale, subType, 0xFFFFFFFF); +void* fopAcM_fastCreate(s16 i_procName, u32 i_parameters, const cXyz* i_pos, int i_roomNo, + const csXyz* i_angle, const cXyz* i_scale, s8 i_subType, + createFunc i_createFunc, void* i_createFuncData) { + fopAcM_prm_class* prmClass = createAppend(0xFFFF, i_parameters, i_pos, i_roomNo, i_angle, + i_scale, i_subType, 0xFFFFFFFF); if (prmClass == NULL) { return NULL; } else { - return fpcM_FastCreate(procName, p_createFunc, p_createFuncData, prmClass); + return fpcM_FastCreate(i_procName, i_createFunc, i_createFuncData, prmClass); } } /* 80019E6C-80019EF0 0147AC 0084+00 0/0 1/1 0/0 .text * fopAcM_fastCreate__FPCcUlPC4cXyziPC5csXyzPC4cXyzPFPv_iPv */ -void* fopAcM_fastCreate(const char* p_actorName, u32 parameter, const cXyz* p_pos, int roomNo, - const csXyz* p_angle, const cXyz* p_scale, createFunc p_createFunc, - void* p_createFuncData) { +void* fopAcM_fastCreate(const char* p_actorName, u32 i_parameters, const cXyz* i_pos, int i_roomNo, + const csXyz* i_angle, const cXyz* i_scale, createFunc i_createFunc, + void* i_createFuncData) { dStage_objectNameInf* nameInfo = dStage_searchName(p_actorName); if (nameInfo == NULL) { return NULL; } else { - return fopAcM_fastCreate(nameInfo->mProcName, parameter, p_pos, roomNo, p_angle, - p_scale, nameInfo->mSubtype, p_createFunc, p_createFuncData); + return fopAcM_fastCreate(nameInfo->mProcName, i_parameters, i_pos, i_roomNo, i_angle, + i_scale, nameInfo->mSubtype, i_createFunc, i_createFuncData); } } /* 80019EF0-80019F78 014830 0088+00 0/0 1/1 105/105 .text * fopAcM_createChild__FsUiUlPC4cXyziPC5csXyzPC4cXyzScPFPv_i */ -s32 fopAcM_createChild(s16 procName, unsigned int parentPId, u32 parameters, const cXyz* p_pos, - int roomNo, const csXyz* p_angle, const cXyz* p_scale, s8 subType, - createFunc p_createFunc) { - fopAcM_prm_class* paramClass = - createAppend(0xFFFF, parameters, p_pos, roomNo, p_angle, p_scale, subType, parentPId); +s32 fopAcM_createChild(s16 i_procName, unsigned int i_parentProcID, u32 i_parameters, + const cXyz* i_pos, int i_roomNo, const csXyz* i_angle, const cXyz* i_scale, + s8 i_subType, createFunc i_createFunc) { + fopAcM_prm_class* paramClass = createAppend(0xFFFF, i_parameters, i_pos, i_roomNo, i_angle, + i_scale, i_subType, i_parentProcID); if (paramClass == NULL) { return -1; } else { - return fpcM_Create(procName, p_createFunc, paramClass); + return fpcM_Create(i_procName, i_createFunc, paramClass); } } /* 80019F78-8001A138 0148B8 01C0+00 0/0 0/0 6/6 .text * fopAcM_createChildFromOffset__FsUiUlPC4cXyziPC5csXyzPC4cXyzScPFPv_i */ -s32 fopAcM_createChildFromOffset(s16 procName, unsigned int parentProcID, u32 actorParams, - const cXyz* p_pos, int roomNo, const csXyz* p_angle, - const cXyz* p_scale, s8 subType, createFunc p_createFunc) { - fopAc_ac_c* parentActor = fopAcM_SearchByID(parentProcID); +s32 fopAcM_createChildFromOffset(s16 i_procName, unsigned int i_parentProcID, u32 i_parameters, + const cXyz* i_pos, int i_roomNo, const csXyz* i_angle, + const cXyz* i_scale, s8 i_subType, createFunc i_createFunc) { + fopAc_ac_c* parentActor = fopAcM_SearchByID(i_parentProcID); s16 parent_angleY = parentActor->current.angle.y; cXyz tmpPos; - if (p_pos == NULL) { + if (i_pos == NULL) { tmpPos = cXyz::Zero; } else { - tmpPos = *p_pos; + tmpPos = *i_pos; } csXyz tmpRot; - if (p_angle == NULL) { + if (i_angle == NULL) { tmpRot = csXyz::Zero; } else { - tmpRot = *p_angle; + tmpRot = *i_angle; } cXyz parentPos = parentActor->current.pos; csXyz newAngle(tmpRot); @@ -517,12 +518,12 @@ s32 fopAcM_createChildFromOffset(s16 procName, unsigned int parentProcID, u32 ac parentPos.y += tmpPos.y; parentPos.z += tmpPos.z * cM_scos(parent_angleY) - tmpPos.x * cM_ssin(parent_angleY); - fopAcM_prm_class* prmClass = createAppend(0xFFFF, actorParams, &parentPos, roomNo, &newAngle, - p_scale, subType, parentProcID); + fopAcM_prm_class* prmClass = createAppend(0xFFFF, i_parameters, &parentPos, i_roomNo, &newAngle, + i_scale, i_subType, i_parentProcID); if (prmClass == NULL) { return -1; } else { - return fpcM_Create(procName, p_createFunc, prmClass); + return fpcM_Create(i_procName, i_createFunc, prmClass); } } @@ -539,20 +540,20 @@ SECTION_DEAD static char const* const stringBase_803788EE = "fopAcM_createHeap /* 8001A138-8001A188 014A78 0050+00 0/0 1/1 1/1 .text fopAcM_DeleteHeap__FP10fopAc_ac_c */ -void fopAcM_DeleteHeap(fopAc_ac_c* p_actor) { +void fopAcM_DeleteHeap(fopAc_ac_c* i_actor) { // "Destroying actor's heap" - fopAcM_Log(p_actor, "アクターのヒープの破壊"); - if (p_actor->mHeap != NULL) { - mDoExt_destroySolidHeap(p_actor->mHeap); - p_actor->mHeap = NULL; + fopAcM_Log(i_actor, "アクターのヒープの破壊"); + if (i_actor->mHeap != NULL) { + mDoExt_destroySolidHeap(i_actor->mHeap); + i_actor->mHeap = NULL; } } /* 8001A188-8001A1E8 014AC8 0060+00 1/1 0/0 0/0 .text * fopAcM_callCallback__FP10fopAc_ac_cPFP10fopAc_ac_c_iP7JKRHeap */ -s32 fopAcM_callCallback(fopAc_ac_c* p_actor, heapCallbackFunc p_callbackFunc, JKRHeap* p_heap) { - JKRHeap* oldHeap = mDoExt_setCurrentHeap(p_heap); - s32 ret = p_callbackFunc(p_actor); +s32 fopAcM_callCallback(fopAc_ac_c* i_actor, heapCallbackFunc i_callback, JKRHeap* i_heap) { + JKRHeap* oldHeap = mDoExt_setCurrentHeap(i_heap); + s32 ret = i_callback(i_actor); mDoExt_setCurrentHeap(oldHeap); return ret; } @@ -565,29 +566,29 @@ static u8 HeapAdjustVerbose; /* 8001A1E8-8001A4B0 014B28 02C8+00 1/1 0/0 0/0 .text * fopAcM_entrySolidHeap___FP10fopAc_ac_cPFP10fopAc_ac_c_iUl */ -bool fopAcM_entrySolidHeap_(fopAc_ac_c* p_actor, heapCallbackFunc p_heapCallback, u32 size) { - const char* procNameString = fopAcM_getProcNameString(p_actor); +bool fopAcM_entrySolidHeap_(fopAc_ac_c* i_actor, heapCallbackFunc i_heapCallback, u32 i_size) { + const char* procNameString = fopAcM_getProcNameString(i_actor); JKRSolidHeap* heap00 = NULL; - if (size != 0) { - size = ALIGN_NEXT(size, 0x10); + if (i_size != 0) { + i_size = ALIGN_NEXT(i_size, 0x10); } while (true) { - if (size != 0) { - heap00 = mDoExt_createSolidHeapFromGame(size, 0x20); + if (i_size != 0) { + heap00 = mDoExt_createSolidHeapFromGame(i_size, 0x20); if (heap00 != NULL) { - bool status = fopAcM_callCallback(p_actor, p_heapCallback, heap00) != 0; + bool status = fopAcM_callCallback(i_actor, i_heapCallback, heap00) != 0; if (!status) { // "Entry for estimated heap size(%08x) failed. %08x[%s]\n" OSReport_Error("見積もりヒープサイズ(%08x)で登録失敗しました。%08x[%s]\n", - size, heap00->getFreeSize(), procNameString); + i_size, heap00->getFreeSize(), procNameString); mDoExt_destroySolidHeap(heap00); heap00 = NULL; } } else { // "Could not allocate estimated heap. %08x [%s]\n" - OSReport_Error("見積もりヒープが確保できませんでした。 %08x [%s]\n", size, + OSReport_Error("見積もりヒープが確保できませんでした。 %08x [%s]\n", i_size, procNameString); } } @@ -600,7 +601,7 @@ bool fopAcM_entrySolidHeap_(fopAc_ac_c* p_actor, heapCallbackFunc p_heapCallback return false; } - bool status = fopAcM_callCallback(p_actor, p_heapCallback, heap00) != 0; + bool status = fopAcM_callCallback(i_actor, i_heapCallback, heap00) != 0; if (!status) { // "Entry failed for maximum heap size. %08x[%s]\n" OSReport_Error("最大空きヒープサイズで登録失敗。%08x[%s]\n", heap00->getFreeSize(), @@ -616,7 +617,7 @@ bool fopAcM_entrySolidHeap_(fopAc_ac_c* p_actor, heapCallbackFunc p_heapCallback if (HeapAdjustEntry == 0) { mDoExt_adjustSolidHeap(heap00); - p_actor->mHeap = heap00; + i_actor->mHeap = heap00; return true; } else { JKRSolidHeap* heap = NULL; @@ -630,7 +631,7 @@ bool fopAcM_entrySolidHeap_(fopAc_ac_c* p_actor, heapCallbackFunc p_heapCallback if (heap < heap00) { mDoExt_destroySolidHeap(heap00); heap00 = NULL; - bool status = fopAcM_callCallback(p_actor, p_heapCallback, heap) != 0; + bool status = fopAcM_callCallback(i_actor, i_heapCallback, heap) != 0; if (!status) { // "Entry fails at exact size? (Bug)\n" OSReport_Error("ぴったりサイズで、登録失敗?(バグ)\n"); @@ -645,13 +646,13 @@ bool fopAcM_entrySolidHeap_(fopAc_ac_c* p_actor, heapCallbackFunc p_heapCallback if (heap != NULL) { mDoExt_adjustSolidHeap(heap); - p_actor->mHeap = heap; + i_actor->mHeap = heap; return true; } if (heap00 != NULL) { mDoExt_adjustSolidHeap(heap00); - p_actor->mHeap = heap00; + i_actor->mHeap = heap00; return true; } @@ -667,69 +668,80 @@ bool fopAcM_entrySolidHeap_(fopAc_ac_c* p_actor, heapCallbackFunc p_heapCallback /* 8001A4B0-8001A528 014DF0 0078+00 0/0 4/4 446/446 .text * fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl */ -bool fopAcM_entrySolidHeap(fopAc_ac_c* p_actor, heapCallbackFunc p_heapCallback, u32 size) { +bool fopAcM_entrySolidHeap(fopAc_ac_c* i_actor, heapCallbackFunc i_heapCallback, u32 i_size) { u8 oldCC9 = HeapAdjustVerbose; - if (size & 0x80000000) { + if (i_size & 0x80000000) { HeapAdjustVerbose = 1; } u8 oldCC8 = HeapAdjustEntry; - if (size & 0x20000000) { + if (i_size & 0x20000000) { HeapAdjustEntry = 0; - } else if (size & 0x10000000) { + } else if (i_size & 0x10000000) { HeapAdjustEntry = 1; } - bool result = fopAcM_entrySolidHeap_(p_actor, p_heapCallback, size & 0xFFFFFF); + bool result = fopAcM_entrySolidHeap_(i_actor, i_heapCallback, i_size & 0xFFFFFF); HeapAdjustVerbose = oldCC9; HeapAdjustEntry = oldCC8; return result; } /* 8001A528-8001A538 014E68 0010+00 0/0 0/0 136/136 .text fopAcM_SetMin__FP10fopAc_ac_cfff */ -void fopAcM_SetMin(fopAc_ac_c* p_actor, f32 minX, f32 minY, f32 minZ) { - p_actor->mCull.mBox.mMin.set(minX, minY, minZ); +void fopAcM_SetMin(fopAc_ac_c* i_actor, f32 i_minX, f32 i_minY, f32 i_minZ) { + i_actor->mCull.mBox.mMin.x = i_minX; + i_actor->mCull.mBox.mMin.y = i_minY; + i_actor->mCull.mBox.mMin.z = i_minZ; } /* 8001A538-8001A548 014E78 0010+00 0/0 0/0 136/136 .text fopAcM_SetMax__FP10fopAc_ac_cfff */ -void fopAcM_SetMax(fopAc_ac_c* p_actor, f32 maxX, f32 maxY, f32 maxZ) { - p_actor->mCull.mBox.mMax.set(maxX, maxY, maxZ); +void fopAcM_SetMax(fopAc_ac_c* i_actor, f32 i_maxX, f32 i_maxY, f32 i_maxZ) { + i_actor->mCull.mBox.mMax.x = i_maxX; + i_actor->mCull.mBox.mMax.y = i_maxY; + i_actor->mCull.mBox.mMax.z = i_maxZ; } /* 8001A548-8001A564 014E88 001C+00 1/1 0/0 260/260 .text * fopAcM_setCullSizeBox__FP10fopAc_ac_cffffff */ -void fopAcM_setCullSizeBox(fopAc_ac_c* p_actor, f32 minX, f32 minY, f32 minZ, f32 maxX, f32 maxY, - f32 maxZ) { - p_actor->mCull.mBox.mMin.set(minX, minY, minZ); - p_actor->mCull.mBox.mMax.set(maxX, maxY, maxZ); +void fopAcM_setCullSizeBox(fopAc_ac_c* i_actor, f32 i_minX, f32 i_minY, f32 i_minZ, f32 i_maxX, + f32 i_maxY, f32 i_maxZ) { + i_actor->mCull.mBox.mMin.x = i_minX; + i_actor->mCull.mBox.mMin.y = i_minY; + i_actor->mCull.mBox.mMin.z = i_minZ; + + i_actor->mCull.mBox.mMax.x = i_maxX; + i_actor->mCull.mBox.mMax.y = i_maxY; + i_actor->mCull.mBox.mMax.z = i_maxZ; } /* 8001A564-8001A578 014EA4 0014+00 0/0 0/0 4/4 .text fopAcM_setCullSizeSphere__FP10fopAc_ac_cffff */ -void fopAcM_setCullSizeSphere(fopAc_ac_c* p_actor, f32 minX, f32 minY, f32 minZ, f32 radius) { - p_actor->mCull.mSphere.mCenter.set(minX, minY, minZ); - p_actor->mCull.mSphere.mRadius = radius; +void fopAcM_setCullSizeSphere(fopAc_ac_c* i_actor, f32 i_minX, f32 i_minY, f32 i_minZ, f32 radius) { + i_actor->mCull.mSphere.mCenter.x = i_minX; + i_actor->mCull.mSphere.mCenter.y = i_minY; + i_actor->mCull.mSphere.mCenter.z = i_minZ; + i_actor->mCull.mSphere.mRadius = radius; } /* 8001A578-8001A5DC 014EB8 0064+00 0/0 0/0 123/123 .text * fopAcM_setCullSizeBox2__FP10fopAc_ac_cP12J3DModelData */ -void fopAcM_setCullSizeBox2(fopAc_ac_c* p_actor, J3DModelData* p_modelData) { - J3DJoint* jointNode = p_modelData->getJointNodePointer(0); +void fopAcM_setCullSizeBox2(fopAc_ac_c* i_actor, J3DModelData* i_modelData) { + J3DJoint* jointNode = i_modelData->getJointNodePointer(0); - f32 minX = p_actor->mScale.x * jointNode->getMin()->x; - f32 minY = p_actor->mScale.y * jointNode->getMin()->y; - f32 minZ = p_actor->mScale.z * jointNode->getMin()->z; - f32 maxX = p_actor->mScale.x * jointNode->getMax()->x; - f32 maxY = p_actor->mScale.y * jointNode->getMax()->y; - f32 maxZ = p_actor->mScale.z * jointNode->getMax()->z; - - fopAcM_setCullSizeBox(p_actor, minX, minY, minZ, maxX, maxY, maxZ); + f32 minX = i_actor->mScale.x * jointNode->getMin()->x; + f32 minY = i_actor->mScale.y * jointNode->getMin()->y; + f32 minZ = i_actor->mScale.z * jointNode->getMin()->z; + f32 maxX = i_actor->mScale.x * jointNode->getMax()->x; + f32 maxY = i_actor->mScale.y * jointNode->getMax()->y; + f32 maxZ = i_actor->mScale.z * jointNode->getMax()->z; + + fopAcM_setCullSizeBox(i_actor, minX, minY, minZ, maxX, maxY, maxZ); } /* 8001A5DC-8001A60C 014F1C 0030+00 0/0 0/0 1/1 .text fopAcM_addAngleY__FP10fopAc_ac_css */ -bool fopAcM_addAngleY(fopAc_ac_c* p_actor, s16 target, s16 step) { - return cLib_chaseAngleS(&fopAcM_GetAngle_p(p_actor).y, target, step); +bool fopAcM_addAngleY(fopAc_ac_c* i_actor, s16 i_target, s16 i_step) { + return cLib_chaseAngleS(&fopAcM_GetAngle_p(i_actor).y, i_target, i_step); } inline void clampMin(f32& val, f32 min) { @@ -739,41 +751,41 @@ inline void clampMin(f32& val, f32 min) { } /* 8001A60C-8001A660 014F4C 0054+00 1/1 0/0 8/8 .text fopAcM_calcSpeed__FP10fopAc_ac_c */ -void fopAcM_calcSpeed(fopAc_ac_c* p_actor) { - f32 speedF = fopAcM_GetSpeedF(p_actor); - f32 gravity = fopAcM_GetGravity(p_actor); - f32 xSpeed = speedF * cM_ssin(p_actor->getAngle().GetY()); - f32 ySpeed = p_actor->speed.y + gravity; - f32 zSpeed = speedF * cM_scos(p_actor->getAngle().GetY()); +void fopAcM_calcSpeed(fopAc_ac_c* i_actor) { + f32 speedF = fopAcM_GetSpeedF(i_actor); + f32 gravity = fopAcM_GetGravity(i_actor); + f32 xSpeed = speedF * cM_ssin(i_actor->getAngle().GetY()); + f32 ySpeed = i_actor->speed.y + gravity; + f32 zSpeed = speedF * cM_scos(i_actor->getAngle().GetY()); - clampMin(ySpeed, fopAcM_GetMaxFallSpeed(p_actor)); - fopAcM_SetSpeed(p_actor, xSpeed, ySpeed, zSpeed); + clampMin(ySpeed, fopAcM_GetMaxFallSpeed(i_actor)); + fopAcM_SetSpeed(i_actor, xSpeed, ySpeed, zSpeed); } /* 8001A660-8001A6CC 014FA0 006C+00 1/1 1/1 17/17 .text fopAcM_posMove__FP10fopAc_ac_cPC4cXyz */ -void fopAcM_posMove(fopAc_ac_c* p_actor, const cXyz* p_movePos) { - p_actor->current.pos.x += p_actor->speed.x; - p_actor->current.pos.y += p_actor->speed.y; - p_actor->current.pos.z += p_actor->speed.z; - - if (p_movePos != NULL) { - p_actor->current.pos.x += p_movePos->x; - p_actor->current.pos.y += p_movePos->y; - p_actor->current.pos.z += p_movePos->z; +void fopAcM_posMove(fopAc_ac_c* i_actor, const cXyz* i_movePos) { + i_actor->current.pos.x += i_actor->speed.x; + i_actor->current.pos.y += i_actor->speed.y; + i_actor->current.pos.z += i_actor->speed.z; + + if (i_movePos != NULL) { + i_actor->current.pos.x += i_movePos->x; + i_actor->current.pos.y += i_movePos->y; + i_actor->current.pos.z += i_movePos->z; } } /* 8001A6CC-8001A710 01500C 0044+00 0/0 5/5 137/137 .text fopAcM_posMoveF__FP10fopAc_ac_cPC4cXyz */ -void fopAcM_posMoveF(fopAc_ac_c* p_actor, const cXyz* p_movePos) { - fopAcM_calcSpeed(p_actor); - fopAcM_posMove(p_actor, p_movePos); +void fopAcM_posMoveF(fopAc_ac_c* i_actor, const cXyz* i_movePos) { + fopAcM_calcSpeed(i_actor); + fopAcM_posMove(i_actor, i_movePos); } /* 8001A710-8001A738 015050 0028+00 1/1 26/26 596/596 .text * fopAcM_searchActorAngleY__FPC10fopAc_ac_cPC10fopAc_ac_c */ -s16 fopAcM_searchActorAngleY(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p_actorB) { - return cLib_targetAngleY(&p_actorA->current.pos, &p_actorB->current.pos); +s16 fopAcM_searchActorAngleY(const fopAc_ac_c* i_actorA, const fopAc_ac_c* i_actorB) { + return cLib_targetAngleY(&i_actorA->current.pos, &i_actorB->current.pos); } /* ############################################################################################## */ @@ -799,9 +811,9 @@ inline f32 square(f32 f) { /* 8001A738-8001A79C 015078 0064+00 0/0 0/0 13/13 .text * fopAcM_searchActorAngleX__FPC10fopAc_ac_cPC10fopAc_ac_c */ #ifdef NONMATCHING -s16 fopAcM_searchActorAngleX(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p_actorB) { - const cXyz& posA = fopAcM_GetPosition_p(p_actorA); - const cXyz& posB = fopAcM_GetPosition_p(p_actorB); +s16 fopAcM_searchActorAngleX(const fopAc_ac_c* i_actorA, const fopAc_ac_c* i_actorB) { + const cXyz& posA = fopAcM_GetPosition_p(i_actorA); + const cXyz& posB = fopAcM_GetPosition_p(i_actorB); return cM_atan2s(posB.y - posA.y, JMAFastSqrt__Ff(square(posB.x - posA.x) + square(posB.z - posA.z))); } @@ -809,7 +821,7 @@ s16 fopAcM_searchActorAngleX(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p_act #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm s16 fopAcM_searchActorAngleX(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p_actorB) { +asm s16 fopAcM_searchActorAngleX(const fopAc_ac_c* i_actorA, const fopAc_ac_c* i_actorB) { nofralloc #include "asm/f_op/f_op_actor_mng/fopAcM_searchActorAngleX__FPC10fopAc_ac_cPC10fopAc_ac_c.s" } @@ -818,10 +830,9 @@ asm s16 fopAcM_searchActorAngleX(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p /* 8001A79C-8001A7E0 0150DC 0044+00 0/0 3/3 15/15 .text * fopAcM_seenActorAngleY__FPC10fopAc_ac_cPC10fopAc_ac_c */ -s32 fopAcM_seenActorAngleY(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p_actorB) { - return abs(static_cast( - cLib_targetAngleY(&p_actorA->current.pos, &p_actorB->current.pos) - - p_actorA->shape_angle.y)); +s32 fopAcM_seenActorAngleY(const fopAc_ac_c* i_actorA, const fopAc_ac_c* i_actorB) { + return abs(static_cast(cLib_targetAngleY(&i_actorA->current.pos, &i_actorB->current.pos) - + i_actorA->shape_angle.y)); } /* ############################################################################################## */ @@ -853,15 +864,15 @@ inline f32 local_sqrtf(f32 mag) { /* 8001A7E0-8001A914 015120 0134+00 0/0 5/5 188/188 .text * fopAcM_searchActorDistance__FPC10fopAc_ac_cPC10fopAc_ac_c */ -f32 fopAcM_searchActorDistance(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p_actorB) { - cXyz tmp = (p_actorB->current.pos - p_actorA->current.pos); +f32 fopAcM_searchActorDistance(const fopAc_ac_c* i_actorA, const fopAc_ac_c* i_actorB) { + cXyz tmp = (i_actorB->current.pos - i_actorA->current.pos); return local_sqrtf(tmp.abs2()); } /* 8001A914-8001A964 015254 0050+00 0/0 0/0 2/2 .text * fopAcM_searchActorDistance2__FPC10fopAc_ac_cPC10fopAc_ac_c */ -f32 fopAcM_searchActorDistance2(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p_actorB) { - cXyz tmp = (p_actorB->current.pos - p_actorA->current.pos); +f32 fopAcM_searchActorDistance2(const fopAc_ac_c* i_actorA, const fopAc_ac_c* i_actorB) { + cXyz tmp = (i_actorB->current.pos - i_actorA->current.pos); return tmp.abs2(); } @@ -869,16 +880,16 @@ f32 fopAcM_searchActorDistance2(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p_ * fopAcM_searchActorDistanceXZ__FPC10fopAc_ac_cPC10fopAc_ac_c */ #ifdef NONMATCHING // matches besides data -f32 fopAcM_searchActorDistanceXZ(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p_actorB) { - const cXyz& posA = fopAcM_GetPosition_p(p_actorA); - const cXyz& posB = fopAcM_GetPosition_p(p_actorB); +f32 fopAcM_searchActorDistanceXZ(const fopAc_ac_c* i_actorA, const fopAc_ac_c* i_actorB) { + const cXyz& posA = fopAcM_GetPosition_p(i_actorA); + const cXyz& posB = fopAcM_GetPosition_p(i_actorB); return sqrtf((posB - posA).abs2XZ()); } #else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm f32 fopAcM_searchActorDistanceXZ(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p_actorB) { +asm f32 fopAcM_searchActorDistanceXZ(const fopAc_ac_c* i_actorA, const fopAc_ac_c* i_actorB) { nofralloc #include "asm/f_op/f_op_actor_mng/fopAcM_searchActorDistanceXZ__FPC10fopAc_ac_cPC10fopAc_ac_c.s" } @@ -889,17 +900,17 @@ asm f32 fopAcM_searchActorDistanceXZ(const fopAc_ac_c* p_actorA, const fopAc_ac_ * fopAcM_searchActorDistanceXZ2__FPC10fopAc_ac_cPC10fopAc_ac_c */ #ifdef NONMATCHING // matches besides data -f32 fopAcM_searchActorDistanceXZ2(const fopAc_ac_c* p_actorA, const fopAc_ac_c* p_actorB) { - const cXyz& posA = fopAcM_GetPosition_p(p_actorA); - const cXyz& posB = fopAcM_GetPosition_p(p_actorB); +f32 fopAcM_searchActorDistanceXZ2(const fopAc_ac_c* i_actorA, const fopAc_ac_c* i_actorB) { + const cXyz& posA = fopAcM_GetPosition_p(i_actorA); + const cXyz& posB = fopAcM_GetPosition_p(i_actorB); return (posB - posA).abs2XZ(); } #else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm f32 fopAcM_searchActorDistanceXZ2(fopAc_ac_c const* param_0, fopAc_ac_c const* param_1) { - nofralloc +asm f32 fopAcM_searchActorDistanceXZ2(fopAc_ac_c const* param_0, + fopAc_ac_c const* param_1){nofralloc #include "asm/f_op/f_op_actor_mng/fopAcM_searchActorDistanceXZ2__FPC10fopAc_ac_cPC10fopAc_ac_c.s" } #pragma pop @@ -912,7 +923,7 @@ BOOL daPy_py_c::checkNowWolf() { /* 8001AAE0-8001AC40 015420 0160+00 0/0 0/0 2/2 .text * fopAcM_rollPlayerCrash__FPC10fopAc_ac_cfUlffif */ s32 fopAcM_rollPlayerCrash(fopAc_ac_c const* actor, f32 param_1, u32 param_2, f32 param_3, - f32 param_4, int param_5, f32 param_6) { + f32 param_4, int param_5, f32 param_6) { daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); if (player != dComIfGp_getLinkPlayer()) { @@ -926,10 +937,10 @@ s32 fopAcM_rollPlayerCrash(fopAc_ac_c const* actor, f32 param_1, u32 param_2, f3 } f32 y_dist = fopAcM_searchPlayerDistanceY(actor); - if (y_dist > param_4 && y_dist < param_3 && + if (y_dist > param_4 && y_dist < param_3 && (player->checkFrontRoll() || player->checkWolfDash()) && - fopAcM_searchPlayerDistanceXZ2(actor) < (tmp * tmp)) { - + fopAcM_searchPlayerDistanceXZ2(actor) < (tmp * tmp)) + { if (cM_scos(player->current.angle.y - fopAcM_searchPlayerAngleY(actor)) < param_6) { player->onFrollCrashFlg(param_2, param_5); return 1; @@ -950,43 +961,182 @@ s32 fopAcM_checkCullingBox(Mtx pMtx, f32 x1, f32 y1, f32 z1, f32 x2, f32 y2, f32 /* ############################################################################################## */ /* 803A35F0-803A3740 000710 0150+00 1/1 0/0 0/0 .data l_cullSizeBox */ -SECTION_DATA static u8 l_cullSizeBox[336] = { - 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC2, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, - 0x42, 0xFA, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0xC1, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xC1, 0xC8, 0x00, 0x00, 0x41, 0xC8, 0x00, 0x00, 0x42, 0x48, 0x00, 0x00, 0x41, 0xC8, 0x00, 0x00, - 0xC2, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC2, 0x48, 0x00, 0x00, 0x42, 0x48, 0x00, 0x00, - 0x42, 0xC8, 0x00, 0x00, 0x42, 0x48, 0x00, 0x00, 0xC2, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xC2, 0x96, 0x00, 0x00, 0x42, 0x96, 0x00, 0x00, 0x43, 0x16, 0x00, 0x00, 0x42, 0x96, 0x00, 0x00, - 0xC2, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xC8, 0x00, 0x00, 0x42, 0xC8, 0x00, 0x00, - 0x44, 0x48, 0x00, 0x00, 0x42, 0xC8, 0x00, 0x00, 0xC2, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xC2, 0xFA, 0x00, 0x00, 0x42, 0xFA, 0x00, 0x00, 0x43, 0x7A, 0x00, 0x00, 0x42, 0xFA, 0x00, 0x00, - 0xC3, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x16, 0x00, 0x00, 0x43, 0x16, 0x00, 0x00, - 0x43, 0x96, 0x00, 0x00, 0x43, 0x16, 0x00, 0x00, 0xC3, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xC3, 0x48, 0x00, 0x00, 0x43, 0x48, 0x00, 0x00, 0x43, 0xC8, 0x00, 0x00, 0x43, 0x48, 0x00, 0x00, - 0xC4, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0x16, 0x00, 0x00, 0x44, 0x16, 0x00, 0x00, - 0x44, 0x61, 0x00, 0x00, 0x44, 0x16, 0x00, 0x00, 0xC3, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xC2, 0x48, 0x00, 0x00, 0x43, 0x7A, 0x00, 0x00, 0x43, 0xE1, 0x00, 0x00, 0x42, 0x48, 0x00, 0x00, - 0xC2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC1, 0xA0, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, - 0x43, 0x02, 0x00, 0x00, 0x43, 0x16, 0x00, 0x00, 0xC2, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xC2, 0x96, 0x00, 0x00, 0x42, 0x96, 0x00, 0x00, 0x43, 0x52, 0x00, 0x00, 0x42, 0x96, 0x00, 0x00, - 0xC2, 0x8C, 0x00, 0x00, 0xC2, 0xC8, 0x00, 0x00, 0xC2, 0xA0, 0x00, 0x00, 0x42, 0x8C, 0x00, 0x00, - 0x43, 0x70, 0x00, 0x00, 0x42, 0xC8, 0x00, 0x00, 0xC2, 0x70, 0x00, 0x00, 0xC1, 0xA0, 0x00, 0x00, - 0xC2, 0x70, 0x00, 0x00, 0x42, 0x70, 0x00, 0x00, 0x43, 0x20, 0x00, 0x00, 0x42, 0x70, 0x00, 0x00, +SECTION_DATA static cull_box l_cullSizeBox[] = { + { + {-40.0f, 0.0f, -40.0f}, + {40.0f, 125.0f, 40.0f}, + }, + { + {-25.0f, 0.0f, -25.0f}, + {25.0f, 50.0f, 25.0f}, + }, + { + {-50.0f, 0.0f, -50.0f}, + {50.0f, 100.0f, 50.0f}, + }, + { + {-75.0f, 0.0f, -75.0f}, + {75.0f, 150.0f, 75.0f}, + }, + { + {-100.0f, 0.0f, -100.0f}, + {100.0f, 800.0f, 100.0f}, + }, + { + {-125.0f, 0.0f, -125.0f}, + {125.0f, 250.0f, 125.0f}, + }, + { + {-150.0f, 0.0f, -150.0f}, + {150.0f, 300.0f, 150.0f}, + }, + { + {-200.0f, 0.0f, -200.0f}, + {200.0f, 400.0f, 200.0f}, + }, + { + {-600.0f, 0.0f, -600.0f}, + {600.0f, 900.0f, 600.0f}, + }, + { + {-250.0f, 0.0f, -50.0f}, + {250.0f, 450.0f, 50.0f}, + }, + { + {-60.0f, 0.0f, -20.0f}, + {40.0f, 130.0f, 150.0f}, + }, + { + {-75.0f, 0.0f, -75.0f}, + {75.0f, 210.0f, 75.0f}, + }, + { + {-70.0f, -100.0f, -80.0f}, + {70.0f, 240.0f, 100.0f}, + }, + { + {-60.0f, -20.0f, -60.0f}, + {60.0f, 160.0f, 60.0f}, + }, }; /* 803A3740-803A37C0 000860 0080+00 1/1 0/0 0/0 .data l_cullSizeSphere */ -SECTION_DATA static u8 l_cullSizeSphere[128] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xA0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x48, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xC8, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x16, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x48, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x7A, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x96, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0xC8, 0x00, 0x00, +SECTION_DATA static cull_sphere l_cullSizeSphere[] = { + { + {0.0f, 0.0f, 0.0f}, + 80.0f, + }, + { + {0.0f, 0.0f, 0.0f}, + 50.0f, + }, + { + {0.0f, 0.0f, 0.0f}, + 100.0f, + }, + { + {0.0f, 0.0f, 0.0f}, + 150.0f, + }, + { + {0.0f, 0.0f, 0.0f}, + 200.0f, + }, + { + {0.0f, 0.0f, 0.0f}, + 250.0f, + }, + { + {0.0f, 0.0f, 0.0f}, + 300.0f, + }, + { + {0.0f, 0.0f, 0.0f}, + 400.0f, + }, }; /* 8001ACEC-8001B058 01562C 036C+00 0/0 1/1 1/1 .text fopAcM_cullingCheck__FPC10fopAc_ac_c */ +// some stack / extra instructions regarding mDoLib_clipper::clip +#ifdef NONMATCHING +s32 fopAcM_cullingCheck(fopAc_ac_c const* i_actor) { + MtxP mtx_p; + if (fopAcM_GetMtx(i_actor) == NULL) { + mtx_p = j3dSys.getViewMtx(); + } else { + Mtx concat_mtx; + PSMTXConcat(j3dSys.getViewMtx(), fopAcM_GetMtx(i_actor), concat_mtx); + mtx_p = concat_mtx; + } + + f32 cullsize_far = fopAcM_getCullSizeFar(i_actor); + if (i_dComIfGp_event_runCheck()) { + cullsize_far *= dComIfGp_event_getCullRate(); + } + + int cullsize = fopAcM_GetCullSize(i_actor); + + if (fopAcM_CULLSIZE_IS_BOX(cullsize)) { + if (fopAcM_GetCullSize(i_actor) == 14) { + if (fopAcM_getCullSizeFar(i_actor) > 0.0f) { + mDoLib_clipper::changeFar(cullsize_far * mDoLib_clipper::getFar()); + u32 ret = mDoLib_clipper::clip(mtx_p, &i_actor->mCull.mBox.mMax, &i_actor->mCull.mBox.mMin); + mDoLib_clipper::resetFar(); + return ret; + } else { + return mDoLib_clipper::clip(mtx_p, &i_actor->mCull.mBox.mMax, &i_actor->mCull.mBox.mMin); + } + } else { + cull_box* box = &l_cullSizeBox[cullsize]; + + if (fopAcM_getCullSizeFar(i_actor) > 0.0f) { + mDoLib_clipper::changeFar(cullsize_far * mDoLib_clipper::getFar()); + u32 ret = mDoLib_clipper::clip(mtx_p, &box->mMax, &box->mMin); + mDoLib_clipper::resetFar(); + return ret; + } else { + return mDoLib_clipper::clip(mtx_p, &box->mMax, &box->mMin); + } + } + } else { + if (fopAcM_GetCullSize(i_actor) == 23) { + if (fopAcM_getCullSizeFar(i_actor) > 0.0f) { + mDoLib_clipper::changeFar(cullsize_far * mDoLib_clipper::getFar()); + + f32 radius = fopAcM_getCullSizeSphereR(i_actor); + const Vec* center_p = fopAcM_getCullSizeSphereCenter(i_actor); + Vec center; + center.x = center_p->x; + center.y = center_p->y; + center.z = center_p->z; + + u32 ret = mDoLib_clipper::clip(mtx_p, center, radius); + mDoLib_clipper::resetFar(); + return ret; + } else { + f32 radius = fopAcM_getCullSizeSphereR(i_actor); + const Vec* center_p = fopAcM_getCullSizeSphereCenter(i_actor); + Vec center; + center.x = center_p->x; + center.y = center_p->y; + center.z = center_p->z; + return mDoLib_clipper::clip(mtx_p, center, radius); + } + } else { + cull_sphere* sphere = &l_cullSizeSphere[cullsize - 15]; + + if (fopAcM_getCullSizeFar(i_actor) > 0.0f) { + mDoLib_clipper::changeFar(cullsize_far * mDoLib_clipper::getFar()); + u32 ret = mDoLib_clipper::clip(mtx_p, sphere->mCenter, sphere->mRadius); + mDoLib_clipper::resetFar(); + return ret; + } else { + return mDoLib_clipper::clip(mtx_p, sphere->mCenter, sphere->mRadius); + } + } + } +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off @@ -995,6 +1145,7 @@ asm s32 fopAcM_cullingCheck(fopAc_ac_c const* param_0) { #include "asm/f_op/f_op_actor_mng/fopAcM_cullingCheck__FPC10fopAc_ac_c.s" } #pragma pop +#endif /* 8001B058-8001B068 015998 0010+00 5/5 0/0 0/0 .text event_second_actor__FUs */ void* event_second_actor(u16) { @@ -1004,7 +1155,9 @@ void* event_second_actor(u16) { /* 8001B068-8001B0FC 0159A8 0094+00 0/0 3/3 0/0 .text * fopAcM_orderTalkEvent__FP10fopAc_ac_cP10fopAc_ac_cUsUs */ s32 fopAcM_orderTalkEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, u16 priority, u16 flag) { - if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actorA))) { + if (!i_dComIfGp_getEvent().i_isOrderOK() && + (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actorA))) + { return 0; } @@ -1018,8 +1171,10 @@ s32 fopAcM_orderTalkEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, u16 priority, /* 8001B0FC-8001B19C 015A3C 00A0+00 0/0 1/1 0/0 .text * fopAcM_orderTalkItemBtnEvent__FUsP10fopAc_ac_cP10fopAc_ac_cUsUs */ s32 fopAcM_orderTalkItemBtnEvent(u16 eventType, fopAc_ac_c* actorA, fopAc_ac_c* actorB, - u16 priority, u16 flag) { - if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actorA))) { + u16 priority, u16 flag) { + if (!i_dComIfGp_getEvent().i_isOrderOK() && + (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actorA))) + { return 0; } @@ -1035,7 +1190,9 @@ s32 fopAcM_orderTalkItemBtnEvent(u16 eventType, fopAc_ac_c* actorA, fopAc_ac_c* // wrong load order #ifdef NONMATCHING s32 fopAcM_orderSpeakEvent(fopAc_ac_c* actor, u16 priority, u16 flag) { - if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actor))) { + if (!i_dComIfGp_getEvent().i_isOrderOK() && + (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actor))) + { return 0; } @@ -1043,7 +1200,8 @@ s32 fopAcM_orderSpeakEvent(fopAc_ac_c* actor, u16 priority, u16 flag) { priority = 0x1EA; } - return dComIfGp_event_order(EVT_TYPE_TALK, priority, flag, 0x14F, dComIfGp_getPlayer(0), actor, -1, -1); + return dComIfGp_event_order(EVT_TYPE_TALK, priority, flag, 0x14F, dComIfGp_getPlayer(0), actor, + -1, -1); } #else #pragma push @@ -1059,7 +1217,9 @@ asm s32 fopAcM_orderSpeakEvent(fopAc_ac_c* param_0, u16 param_1, u16 param_2) { /* 8001B244-8001B334 015B84 00F0+00 0/0 2/2 0/0 .text * fopAcM_orderDoorEvent__FP10fopAc_ac_cP10fopAc_ac_cUsUs */ s32 fopAcM_orderDoorEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, u16 priority, u16 flag) { - if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actorA))) { + if (!i_dComIfGp_getEvent().i_isOrderOK() && + (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actorA))) + { return 0; } @@ -1080,7 +1240,9 @@ s32 fopAcM_orderDoorEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, u16 priority, /* 8001B334-8001B3CC 015C74 0098+00 0/0 1/1 0/0 .text * fopAcM_orderCatchEvent__FP10fopAc_ac_cP10fopAc_ac_cUsUs */ s32 fopAcM_orderCatchEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, u16 priority, u16 flag) { - if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actorA))) { + if (!i_dComIfGp_getEvent().i_isOrderOK() && + (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actorA))) + { return 0; } @@ -1094,8 +1256,10 @@ s32 fopAcM_orderCatchEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, u16 priority, /* 8001B3CC-8001B4E0 015D0C 0114+00 0/0 2/2 6/6 .text * fopAcM_orderOtherEvent__FP10fopAc_ac_cPCcUsUsUs */ s32 fopAcM_orderOtherEvent(fopAc_ac_c* actor, char const* param_1, u16 param_2, u16 flag, - u16 priority) { - if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actor))) { + u16 priority) { + if (!i_dComIfGp_getEvent().i_isOrderOK() && + (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actor))) + { return 0; } @@ -1113,14 +1277,17 @@ s32 fopAcM_orderOtherEvent(fopAc_ac_c* actor, char const* param_1, u16 param_2, eventPrio = priority; } - return dComIfGp_event_order(EVT_TYPE_OTHER, eventPrio, flag, param_2, actor, event_second_actor(flag), eventIdx, -1); + return dComIfGp_event_order(EVT_TYPE_OTHER, eventPrio, flag, param_2, actor, + event_second_actor(flag), eventIdx, -1); } /* 8001B4E0-8001B5E4 015E20 0104+00 0/0 1/1 2/2 .text * fopAcM_orderOtherEvent__FP10fopAc_ac_cP10fopAc_ac_cPCcUsUsUs */ -s32 fopAcM_orderOtherEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, char const* param_2, - u16 param_3, u16 flag, u16 priority) { - if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actorA))) { +s32 fopAcM_orderOtherEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, char const* param_2, u16 param_3, + u16 flag, u16 priority) { + if (!i_dComIfGp_getEvent().i_isOrderOK() && + (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actorA))) + { return 0; } @@ -1138,7 +1305,8 @@ s32 fopAcM_orderOtherEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, char const* p eventPrio = priority; } - return dComIfGp_event_order(EVT_TYPE_OTHER, eventPrio, flag, param_3, actorA, actorB, eventIdx, -1); + return dComIfGp_event_order(EVT_TYPE_OTHER, eventPrio, flag, param_3, actorA, actorB, eventIdx, + -1); } /* 8001B5E4-8001B67C 015F24 0098+00 0/0 2/2 41/41 .text @@ -1149,14 +1317,17 @@ s32 fopAcM_orderChangeEventId(fopAc_ac_c* actor, s16 eventID, u16 flag, u16 para eventPrio = 0xFF; } - return dComIfGp_event_order(EVT_TYPE_OTHER, eventPrio, flag | 0x400, param_3, actor, event_second_actor(flag), eventID, -1); + return dComIfGp_event_order(EVT_TYPE_OTHER, eventPrio, flag | 0x400, param_3, actor, + event_second_actor(flag), eventID, -1); } /* 8001B67C-8001B7B4 015FBC 0138+00 0/0 10/10 101/101 .text * fopAcM_orderOtherEventId__FP10fopAc_ac_csUcUsUsUs */ s32 fopAcM_orderOtherEventId(fopAc_ac_c* actor, s16 eventID, u8 mapToolID, u16 param_3, - u16 priority, u16 flag) { - if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actor))) { + u16 priority, u16 flag) { + if (!i_dComIfGp_getEvent().i_isOrderOK() && + (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actor))) + { return 0; } @@ -1182,14 +1353,17 @@ s32 fopAcM_orderOtherEventId(fopAc_ac_c* actor, s16 eventID, u8 mapToolID, u16 p } } - return dComIfGp_event_order(EVT_TYPE_OTHER, newPriority, flag, param_3, actor, event_second_actor(flag), eventID, mapToolID); + return dComIfGp_event_order(EVT_TYPE_OTHER, newPriority, flag, param_3, actor, + event_second_actor(flag), eventID, mapToolID); } /* 8001B7B4-8001B8E0 0160F4 012C+00 1/1 1/1 4/4 .text * fopAcM_orderMapToolEvent__FP10fopAc_ac_cUcsUsUsUs */ -s32 fopAcM_orderMapToolEvent(fopAc_ac_c* actor, u8 param_1, s16 eventID, u16 param_3, - u16 flag, u16 param_5) { - if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actor))) { +s32 fopAcM_orderMapToolEvent(fopAc_ac_c* actor, u8 param_1, s16 eventID, u16 param_3, u16 flag, + u16 param_5) { + if (!i_dComIfGp_getEvent().i_isOrderOK() && + (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actor))) + { return 0; } @@ -1216,20 +1390,23 @@ s32 fopAcM_orderMapToolEvent(fopAc_ac_c* actor, u8 param_1, s16 eventID, u16 par newPriority = param_5; } - return dComIfGp_event_order(EVT_TYPE_OTHER, newPriority, flag, param_3, actor, event_second_actor(flag), eventID, param_1); + return dComIfGp_event_order(EVT_TYPE_OTHER, newPriority, flag, param_3, actor, + event_second_actor(flag), eventID, param_1); } /* 8001B8E0-8001B908 016220 0028+00 0/0 1/1 1/1 .text * fopAcM_orderMapToolAutoNextEvent__FP10fopAc_ac_cUcsUsUsUs */ s32 fopAcM_orderMapToolAutoNextEvent(fopAc_ac_c* actor, u8 param_1, s16 eventID, u16 param_3, - u16 flag, u16 param_5) { + u16 flag, u16 param_5) { return fopAcM_orderMapToolEvent(actor, param_1, eventID, param_3, flag | 0x100, param_5); } /* 8001B908-8001B9D0 016248 00C8+00 0/0 0/0 106/106 .text * fopAcM_orderPotentialEvent__FP10fopAc_ac_cUsUsUs */ s32 fopAcM_orderPotentialEvent(fopAc_ac_c* actor, u16 flag, u16 param_2, u16 priority) { - if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actor))) { + if (!i_dComIfGp_getEvent().i_isOrderOK() && + (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actor))) + { return 0; } @@ -1237,7 +1414,8 @@ s32 fopAcM_orderPotentialEvent(fopAc_ac_c* actor, u16 flag, u16 param_2, u16 pri priority = 0xFF; } - return dComIfGp_event_order(EVT_TYPE_POTENTIAL, priority, flag, param_2, actor, event_second_actor(flag), -1, -1); + return dComIfGp_event_order(EVT_TYPE_POTENTIAL, priority, flag, param_2, actor, + event_second_actor(flag), -1, -1); } /* 8001B9D0-8001BA7C 016310 00AC+00 0/0 3/3 12/12 .text fopAcM_orderItemEvent__FP10fopAc_ac_cUsUs @@ -1245,7 +1423,9 @@ s32 fopAcM_orderPotentialEvent(fopAc_ac_c* actor, u16 flag, u16 param_2, u16 pri // load order #ifdef NONMATCHING s32 fopAcM_orderItemEvent(fopAc_ac_c* actor, u16 priority, u16 flag) { - if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actor))) { + if (!i_dComIfGp_getEvent().i_isOrderOK() && + (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actor))) + { return 0; } @@ -1253,7 +1433,8 @@ s32 fopAcM_orderItemEvent(fopAc_ac_c* actor, u16 priority, u16 flag) { priority = 0xFF; } - return dComIfGp_event_order(EVT_TYPE_ITEM, priority, flag, -1, dComIfGp_getPlayer(0), actor, -1, -1); + return dComIfGp_event_order(EVT_TYPE_ITEM, priority, flag, -1, dComIfGp_getPlayer(0), actor, -1, + -1); } #else #pragma push @@ -1268,9 +1449,10 @@ asm s32 fopAcM_orderItemEvent(fopAc_ac_c* param_0, u16 param_1, u16 param_2) { /* 8001BA7C-8001BB14 0163BC 0098+00 0/0 1/1 0/0 .text * fopAcM_orderTreasureEvent__FP10fopAc_ac_cP10fopAc_ac_cUsUs */ -s32 fopAcM_orderTreasureEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, u16 priority, - u16 flag) { - if (!i_dComIfGp_getEvent().i_isOrderOK() && (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actorA))) { +s32 fopAcM_orderTreasureEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, u16 priority, u16 flag) { + if (!i_dComIfGp_getEvent().i_isOrderOK() && + (!(flag & 0x400) || !i_dComIfGp_getEvent().isChangeOK(actorA))) + { return 0; } @@ -1298,33 +1480,34 @@ void* fopAcM_getEventPartner(fopAc_ac_c const* actor) { if (dComIfGp_event_getPt1() != actor) { return dComIfGp_event_getPt1(); } - + return dComIfGp_event_getPt2(); } /* 8001BBE8-8001BC74 016528 008C+00 0/0 5/5 43/43 .text * fopAcM_createItemForPresentDemo__FPC4cXyziUciiPC5csXyzPC4cXyz */ -s32 fopAcM_createItemForPresentDemo(cXyz const* p_pos, int i_itemNo, u8 param_2, int i_itemBitNo, - int i_roomNo, csXyz const* p_angle, cXyz const* p_scale) { +s32 fopAcM_createItemForPresentDemo(cXyz const* i_pos, int i_itemNo, u8 param_2, int i_itemBitNo, + int i_roomNo, csXyz const* i_angle, cXyz const* i_scale) { dComIfGp_event_setGtItm(i_itemNo); if (i_itemNo == NO_ITEM) { return -1; } else { - return fopAcM_createDemoItem(p_pos, i_itemNo, i_itemBitNo, p_angle, i_roomNo, p_scale, param_2); + return fopAcM_createDemoItem(i_pos, i_itemNo, i_itemBitNo, i_angle, i_roomNo, i_scale, + param_2); } } /* 8001BC74-8001BCFC 0165B4 0088+00 0/0 2/2 10/10 .text * fopAcM_createItemForTrBoxDemo__FPC4cXyziiiPC5csXyzPC4cXyz */ -s32 fopAcM_createItemForTrBoxDemo(cXyz const* p_pos, int i_itemNo, int i_itemBitNo, int i_roomNo, - csXyz const* p_angle, cXyz const* p_scale) { +s32 fopAcM_createItemForTrBoxDemo(cXyz const* i_pos, int i_itemNo, int i_itemBitNo, int i_roomNo, + csXyz const* i_angle, cXyz const* i_scale) { dComIfGp_event_setGtItm(i_itemNo); if (i_itemNo == NO_ITEM) { return -1; } else { - return fopAcM_createDemoItem(p_pos, i_itemNo, i_itemBitNo, p_angle, i_roomNo, p_scale, 0); + return fopAcM_createDemoItem(i_pos, i_itemNo, i_itemBitNo, i_angle, i_roomNo, i_scale, 0); } } @@ -1401,9 +1584,9 @@ struct EnemyTable { * fopAcM_createItemFromEnemyID__FUcPC4cXyziiPC5csXyzPC4cXyzPfPf */ // matches with literals #ifdef NONMATCHING -s32 fopAcM_createItemFromEnemyID(u8 i_enemyID, cXyz const* p_pos, int i_itemBitNo, int i_roomNo, - csXyz const* p_angle, cXyz const* p_scale, f32* speedF, - f32* speedY) { +s32 fopAcM_createItemFromEnemyID(u8 i_enemyID, cXyz const* i_pos, int i_itemBitNo, int i_roomNo, + csXyz const* i_angle, cXyz const* i_scale, f32* speedF, + f32* speedY) { int tableNo = 0xFF; EnemyTableList* tblList = (EnemyTableList*)dEnemyItem_c::mData; int tableNum = tblList->field_0x4; @@ -1423,11 +1606,12 @@ s32 fopAcM_createItemFromEnemyID(u8 i_enemyID, cXyz const* p_pos, int i_itemBitN if (daPy_getPlayerActorClass()->checkHorseRide()) { int itemNo = fopAcM_getItemNoFromTableNo(tableNo); - void* ac = fopAcM_createItemForDirectGet(p_pos, itemNo, i_roomNo, NULL, NULL, 0.0f, 0.0f); + void* ac = fopAcM_createItemForDirectGet(i_pos, itemNo, i_roomNo, NULL, NULL, 0.0f, 0.0f); return fopAcM_GetID(ac); } - return fopAcM_createItemFromTable(p_pos, tableNo, i_itemBitNo, i_roomNo, p_angle, 0, p_scale, speedF, speedY, false); + return fopAcM_createItemFromTable(i_pos, tableNo, i_itemBitNo, i_roomNo, i_angle, 0, i_scale, + speedF, speedY, false); } #else #pragma push @@ -1446,9 +1630,9 @@ asm s32 fopAcM_createItemFromEnemyID(u8 param_0, cXyz const* param_1, int param_ * fopAcM_createItemFromTable__FPC4cXyziiiPC5csXyziPC4cXyzPfPfb */ // matches with literals #ifdef NONMATCHING -s32 fopAcM_createItemFromTable(cXyz const* p_pos, int i_tableNo, int i_itemBitNo, int i_roomNo, - csXyz const* p_angle, int param_5, cXyz const* p_scale, - f32* speedF, f32* speedY, bool createDirect) { +s32 fopAcM_createItemFromTable(cXyz const* i_pos, int i_tableNo, int i_itemBitNo, int i_roomNo, + csXyz const* i_angle, int param_5, cXyz const* i_scale, f32* speedF, + f32* speedY, bool createDirect) { if (i_tableNo == 0xFF) { return -1; } @@ -1460,11 +1644,13 @@ s32 fopAcM_createItemFromTable(cXyz const* p_pos, int i_tableNo, int i_itemBitNo void* ac; if (createDirect) { - ac = fopAcM_createItemForDirectGet(p_pos, itemNo, i_roomNo, NULL, NULL, 0.0f, 0.0f); + ac = fopAcM_createItemForDirectGet(i_pos, itemNo, i_roomNo, NULL, NULL, 0.0f, 0.0f); } else if (speedF == NULL && speedY == NULL) { - ac = fopAcM_fastCreateItem2(p_pos, itemNo, i_itemBitNo, i_roomNo, param_5, p_angle, p_scale); + ac = + fopAcM_fastCreateItem2(i_pos, itemNo, i_itemBitNo, i_roomNo, param_5, i_angle, i_scale); } else { - ac = fopAcM_fastCreateItem(p_pos, itemNo, i_roomNo, p_angle, p_scale, speedF, speedY, i_itemBitNo, param_5, NULL); + ac = fopAcM_fastCreateItem(i_pos, itemNo, i_roomNo, i_angle, i_scale, speedF, speedY, + i_itemBitNo, param_5, NULL); } return fopAcM_GetID(ac); @@ -1484,22 +1670,24 @@ asm s32 fopAcM_createItemFromTable(cXyz const* param_0, int param_1, int param_2 /* 8001C078-8001C0D4 0169B8 005C+00 2/2 0/0 0/0 .text * fopAcM_createDemoItem__FPC4cXyziiPC5csXyziPC4cXyzUc */ -s32 fopAcM_createDemoItem(const cXyz* p_pos, int itemNo, int itemBitNo, const csXyz* p_angle, - int roomNo, const cXyz* scale, u8 param_7) { +s32 fopAcM_createDemoItem(const cXyz* i_pos, int itemNo, int itemBitNo, const csXyz* i_angle, + int i_roomNo, const cXyz* scale, u8 param_7) { if (itemNo == NO_ITEM) { return -1; } else { - return fopAcM_create(PROC_Demo_Item, (itemNo & 0xFF) | (itemBitNo & 0x7F) << 0x8 | (param_7 << 0x10), - p_pos, roomNo, p_angle, scale, -1); + return fopAcM_create(PROC_Demo_Item, + (itemNo & 0xFF) | (itemBitNo & 0x7F) << 0x8 | (param_7 << 0x10), i_pos, + i_roomNo, i_angle, scale, -1); } } /* 8001C0D4-8001C174 016A14 00A0+00 0/0 0/0 18/18 .text * fopAcM_createItemForBoss__FPC4cXyziiPC5csXyzPC4cXyzffi */ -s32 fopAcM_createItemForBoss(const cXyz* p_pos, int param_2, int roomNo, const csXyz* p_angle, - const cXyz* p_scale, f32 speedF, f32 speedY, int param_8) { - fopAc_ac_c* actor = (fopAc_ac_c*)fopAcM_fastCreate(PROC_Obj_LifeContainer, 0xFFFF0000 | param_8 << 0x8 | (param_2 & 0xFF), p_pos, roomNo, p_angle, - p_scale, -1, NULL, NULL); +s32 fopAcM_createItemForBoss(const cXyz* i_pos, int param_2, int i_roomNo, const csXyz* i_angle, + const cXyz* i_scale, f32 speedF, f32 speedY, int param_8) { + fopAc_ac_c* actor = (fopAc_ac_c*)fopAcM_fastCreate( + PROC_Obj_LifeContainer, 0xFFFF0000 | param_8 << 0x8 | (param_2 & 0xFF), i_pos, i_roomNo, + i_angle, i_scale, -1, NULL, NULL); if (actor != NULL) { actor->speedF = speedF; actor->speed.y = speedY; @@ -1509,25 +1697,27 @@ s32 fopAcM_createItemForBoss(const cXyz* p_pos, int param_2, int roomNo, const c /* 8001C174-8001C1B8 016AB4 0044+00 0/0 0/0 2/2 .text * fopAcM_createItemForMidBoss__FPC4cXyziiPC5csXyzPC4cXyzii */ -s32 fopAcM_createItemForMidBoss(const cXyz* p_pos, int i_itemNo, int i_roomNo, const csXyz* p_angle, - const cXyz* p_scale, int param_6, int param_7) { - return fopAcM_createItem(p_pos, i_itemNo, param_7, i_roomNo, &csXyz(csXyz::Zero), p_scale, 0x6); +s32 fopAcM_createItemForMidBoss(const cXyz* i_pos, int i_itemNo, int i_roomNo, const csXyz* i_angle, + const cXyz* i_scale, int param_6, int param_7) { + return fopAcM_createItem(i_pos, i_itemNo, param_7, i_roomNo, &csXyz(csXyz::Zero), i_scale, 0x6); } /* 8001C1B8-8001C1FC 016AF8 0044+00 2/2 0/0 1/1 .text * fopAcM_createItemForDirectGet__FPC4cXyziiPC5csXyzPC4cXyzff */ -void* fopAcM_createItemForDirectGet(const cXyz* p_pos, int i_itemNo, int i_roomNo, const csXyz* p_angle, - const cXyz* p_scale, f32 speedF, f32 speedY) { - return fopAcM_fastCreateItem(p_pos, i_itemNo, i_roomNo, p_angle, p_scale, &speedF, &speedY, -1, 0x7, - NULL); +void* fopAcM_createItemForDirectGet(const cXyz* i_pos, int i_itemNo, int i_roomNo, + const csXyz* i_angle, const cXyz* i_scale, f32 speedF, + f32 speedY) { + return fopAcM_fastCreateItem(i_pos, i_itemNo, i_roomNo, i_angle, i_scale, &speedF, &speedY, -1, + 0x7, NULL); } /* 8001C1FC-8001C240 016B3C 0044+00 0/0 2/2 3/3 .text * fopAcM_createItemForSimpleDemo__FPC4cXyziiPC5csXyzPC4cXyzff */ -void* fopAcM_createItemForSimpleDemo(const cXyz* p_pos, int i_itemNo, int i_roomNo, const csXyz* p_angle, - const cXyz* p_scale, f32 speedF, f32 speedY) { - return fopAcM_fastCreateItem(p_pos, i_itemNo, i_roomNo, p_angle, p_scale, &speedF, &speedY, -1, 0x4, - NULL); +void* fopAcM_createItemForSimpleDemo(const cXyz* i_pos, int i_itemNo, int i_roomNo, + const csXyz* i_angle, const cXyz* i_scale, f32 speedF, + f32 speedY) { + return fopAcM_fastCreateItem(i_pos, i_itemNo, i_roomNo, i_angle, i_scale, &speedF, &speedY, -1, + 0x4, NULL); } inline u32 maskShift(int val, int bits, int shift) { @@ -1541,15 +1731,15 @@ inline u32 makeItemParams(int iNo, int p8, int unk, int p9) { /* 8001C240-8001C3E0 016B80 01A0+00 1/1 1/1 17/17 .text * fopAcM_createItem__FPC4cXyziiiPC5csXyzPC4cXyzi */ -s32 fopAcM_createItem(const cXyz* p_pos, int itemNo, int param_3, int roomNo, const csXyz* p_angle, - const cXyz* p_scale, int param_7) { +s32 fopAcM_createItem(const cXyz* i_pos, int itemNo, int param_3, int i_roomNo, + const csXyz* i_angle, const cXyz* i_scale, int param_7) { if (itemNo == NO_ITEM) { return -1; } csXyz item_angle(csXyz::Zero); - if (p_angle != NULL) { - item_angle = *p_angle; + if (i_angle != NULL) { + item_angle = *i_angle; } else { item_angle.y = cM_rndFX(32767.0f); } @@ -1559,32 +1749,33 @@ s32 fopAcM_createItem(const cXyz* p_pos, int itemNo, int param_3, int roomNo, co switch (itemNo) { case RECOVERY_FAILY: - return fopAcM_create(PROC_Obj_Yousei, 0xFFFFFFFF, p_pos, roomNo, p_angle, p_scale, -1); + return fopAcM_create(PROC_Obj_Yousei, 0xFFFFFFFF, i_pos, i_roomNo, i_angle, i_scale, -1); case KAKERA_HEART: case UTAWA_HEART: - return fopAcM_create(PROC_Obj_LifeContainer, itemActorParams, p_pos, roomNo, p_angle, p_scale, -1); + return fopAcM_create(PROC_Obj_LifeContainer, itemActorParams, i_pos, i_roomNo, i_angle, + i_scale, -1); case TRIPLE_HEART: for (int i = 0; i < 2; i++) { - fopAcM_create(PROC_ITEM, itemActorParams, p_pos, roomNo, &item_angle, p_scale, -1); + fopAcM_create(PROC_ITEM, itemActorParams, i_pos, i_roomNo, &item_angle, i_scale, -1); item_angle.y = cM_rndFX(32767.0f); } default: - return fopAcM_create(PROC_ITEM, itemActorParams, p_pos, roomNo, &item_angle, p_scale, -1); + return fopAcM_create(PROC_ITEM, itemActorParams, i_pos, i_roomNo, &item_angle, i_scale, -1); } } /* 8001C3E0-8001C5B0 016D20 01D0+00 1/1 0/0 0/0 .text * fopAcM_fastCreateItem2__FPC4cXyziiiiPC5csXyzPC4cXyz */ -void* fopAcM_fastCreateItem2(const cXyz* p_pos, int itemNo, int param_3, int roomNo, int param_5, - const csXyz* p_angle, const cXyz* p_scale) { +void* fopAcM_fastCreateItem2(const cXyz* i_pos, int itemNo, int param_3, int i_roomNo, int param_5, + const csXyz* i_angle, const cXyz* i_scale) { csXyz item_angle(csXyz::Zero); if (itemNo == NO_ITEM) { return NULL; } - if (p_angle != NULL) { - item_angle = *p_angle; + if (i_angle != NULL) { + item_angle = *i_angle; } else { item_angle.y = cM_rndFX(32767.0f); } @@ -1596,19 +1787,21 @@ void* fopAcM_fastCreateItem2(const cXyz* p_pos, int itemNo, int param_3, int roo switch (itemNo) { case RECOVERY_FAILY: - return fopAcM_fastCreate(PROC_Obj_Yousei, 0xFFFFFFFF, p_pos, roomNo, p_angle, p_scale, -1, NULL, NULL); + return fopAcM_fastCreate(PROC_Obj_Yousei, 0xFFFFFFFF, i_pos, i_roomNo, i_angle, i_scale, -1, + NULL, NULL); case KAKERA_HEART: case UTAWA_HEART: - return fopAcM_fastCreate(PROC_Obj_LifeContainer, itemActorParams, p_pos, roomNo, p_angle, p_scale, -1, NULL, - NULL); + return fopAcM_fastCreate(PROC_Obj_LifeContainer, itemActorParams, i_pos, i_roomNo, i_angle, + i_scale, -1, NULL, NULL); case TRIPLE_HEART: for (int i = 0; i < 2; i++) { - fopAcM_fastCreate(PROC_ITEM, itemActorParams, p_pos, roomNo, &item_angle, p_scale, -1, NULL, NULL); + fopAcM_fastCreate(PROC_ITEM, itemActorParams, i_pos, i_roomNo, &item_angle, i_scale, -1, + NULL, NULL); item_angle.y = cM_rndFX(32767.0f); } default: - return fopAcM_fastCreate(PROC_ITEM, itemActorParams, p_pos, roomNo, &item_angle, p_scale, -1, NULL, - NULL); + return fopAcM_fastCreate(PROC_ITEM, itemActorParams, i_pos, i_roomNo, &item_angle, i_scale, + -1, NULL, NULL); } } @@ -1632,9 +1825,9 @@ SECTION_SDATA2 static f32 lit_5812 = 1.0f / 5.0f; * fopAcM_fastCreateItem__FPC4cXyziiPC5csXyzPC4cXyzPfPfiiPFPv_i */ // issue with makeItemParams #ifdef NONMATCHING -void* fopAcM_fastCreateItem(const cXyz* p_pos, int i_itemNo, int i_roomNo, const csXyz* p_angle, - const cXyz* p_scale, f32* p_speedF, f32* p_speedY, int param_8, - int param_9, createFunc p_createFunc) { +void* fopAcM_fastCreateItem(const cXyz* i_pos, int i_itemNo, int i_roomNo, const csXyz* i_angle, + const cXyz* i_scale, f32* p_speedF, f32* p_speedY, int param_8, + int param_9, createFunc i_createFunc) { csXyz angle; if (i_itemNo == NO_ITEM) { @@ -1649,22 +1842,25 @@ void* fopAcM_fastCreateItem(const cXyz* p_pos, int i_itemNo, int i_roomNo, const switch (i_itemNo) { case RECOVERY_FAILY: - return fopAcM_fastCreate(PROC_Obj_Yousei, 0xFFFFFFFF, p_pos, i_roomNo, p_angle, p_scale, -1, NULL, NULL); + return fopAcM_fastCreate(PROC_Obj_Yousei, 0xFFFFFFFF, i_pos, i_roomNo, i_angle, i_scale, -1, + NULL, NULL); case KAKERA_HEART: case UTAWA_HEART: - return fopAcM_fastCreate(PROC_Obj_LifeContainer, itemActorParams, p_pos, i_roomNo, p_angle, p_scale, -1, NULL, - NULL); + return fopAcM_fastCreate(PROC_Obj_LifeContainer, itemActorParams, i_pos, i_roomNo, i_angle, + i_scale, -1, NULL, NULL); case TRIPLE_HEART: for (int i = 0; i < 2; i++) { - if (p_angle != NULL) { - angle = *p_angle; + if (i_angle != NULL) { + angle = *i_angle; } else { angle = csXyz::Zero; } angle.z = 0xFF; angle.y += (s16)cM_rndFX(8192.0f); - fopAc_ac_c* actor = (fopAc_ac_c*)fopAcM_fastCreate(PROC_ITEM, itemActorParams, p_pos, i_roomNo, &angle, p_scale, -1, p_createFunc, NULL); + fopAc_ac_c* actor = + (fopAc_ac_c*)fopAcM_fastCreate(PROC_ITEM, itemActorParams, i_pos, i_roomNo, &angle, + i_scale, -1, i_createFunc, NULL); if (actor != NULL) { if (p_speedF != NULL) { @@ -1677,14 +1873,15 @@ void* fopAcM_fastCreateItem(const cXyz* p_pos, int i_itemNo, int i_roomNo, const } } default: - if (p_angle != NULL) { - angle = *p_angle; + if (i_angle != NULL) { + angle = *i_angle; } else { angle = csXyz::Zero; } angle.z = 0xFF; - fopAc_ac_c* actor = (fopAc_ac_c*)fopAcM_fastCreate(PROC_ITEM, itemActorParams, p_pos, i_roomNo, &angle, p_scale, -1, p_createFunc, NULL); + fopAc_ac_c* actor = (fopAc_ac_c*)fopAcM_fastCreate( + PROC_ITEM, itemActorParams, i_pos, i_roomNo, &angle, i_scale, -1, i_createFunc, NULL); if (actor != NULL) { if (p_speedF != NULL) { @@ -1703,9 +1900,9 @@ void* fopAcM_fastCreateItem(const cXyz* p_pos, int i_itemNo, int i_roomNo, const #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void* fopAcM_fastCreateItem(const cXyz* p_pos, int i_itemNo, int i_roomNo, const csXyz* p_angle, - const cXyz* p_scale, f32* p_speedF, f32* p_speedY, int param_8, - int param_9, createFunc p_createFunc) { +asm void* fopAcM_fastCreateItem(const cXyz* i_pos, int i_itemNo, int i_roomNo, const csXyz* i_angle, + const cXyz* i_scale, f32* p_speedF, f32* p_speedY, int param_8, + int param_9, createFunc i_createFunc) { nofralloc #include "asm/f_op/f_op_actor_mng/fopAcM_fastCreateItem__FPC4cXyziiPC5csXyzPC4cXyzPfPfiiPFPv_i.s" } @@ -1714,7 +1911,7 @@ asm void* fopAcM_fastCreateItem(const cXyz* p_pos, int i_itemNo, int i_roomNo, c /* 8001C870-8001C95C 0171B0 00EC+00 0/0 0/0 1/1 .text fopAcM_createBokkuri__FUsPC4cXyziiiPC4cXyzii */ -s32 fopAcM_createBokkuri(u16 enemyNo, const cXyz* p_pos, int param_3, int param_4, int roomNo, +s32 fopAcM_createBokkuri(u16 i_enemyNo, const cXyz* i_pos, int param_3, int param_4, int i_roomNo, const cXyz* param_6, int param_7, int param_8) { csXyz angle(0, 0, 0); if (param_6 != NULL) { @@ -1724,27 +1921,30 @@ s32 fopAcM_createBokkuri(u16 enemyNo, const cXyz* p_pos, int param_3, int param_ } u32 actorParams = 0; make_prm_bokkuri(&actorParams, &angle, 6, param_3, param_4, param_7, param_8); - return fopAcM_create(PROC_Obj_Carry, enemyNo, actorParams, p_pos, roomNo, &angle, NULL, -1, NULL); + return fopAcM_create(PROC_Obj_Carry, i_enemyNo, actorParams, i_pos, i_roomNo, &angle, NULL, -1, + NULL); } /* 8001C95C-8001C9CC 01729C 0070+00 0/0 0/0 12/12 .text * fopAcM_createWarpHole__FPC4cXyzPC5csXyziUcUcUc */ -s32 fopAcM_createWarpHole(const cXyz* p_pos, const csXyz* p_angle, int roomNo, u8 param_4, u8 param_5, - u8 param_6) { +s32 fopAcM_createWarpHole(const cXyz* i_pos, const csXyz* i_angle, int i_roomNo, u8 param_4, + u8 param_5, u8 param_6) { if (param_6 == 0xFF) { param_6 = param_4; } u32 actorParams; make_prm_warp_hole(&actorParams, param_5, param_6, param_4); - return fopAcM_create(PROC_Obj_BossWarp, actorParams, p_pos, roomNo, p_angle, NULL, -1); + return fopAcM_create(PROC_Obj_BossWarp, actorParams, i_pos, i_roomNo, i_angle, NULL, -1); } s32 fopAc_IsActor(void*); /* 8001C9CC-8001CA1C 01730C 0050+00 1/1 0/0 0/0 .text enemySearchJugge__FPvPv */ -void* enemySearchJugge(void* p_actor, void* p_data) { - if (p_actor != NULL && fopAc_IsActor(p_actor) && static_cast(p_actor)->mGroup == 2) { - return p_actor; +void* enemySearchJugge(void* i_actor, void* i_data) { + if (i_actor != NULL && fopAc_IsActor(i_actor) && + static_cast(i_actor)->mGroup == ACTOR_TYPE_ENEMY) + { + return i_actor; } else { return NULL; } @@ -1752,8 +1952,8 @@ void* enemySearchJugge(void* p_actor, void* p_data) { /* 8001CA1C-8001CAD8 01735C 00BC+00 0/0 0/0 6/6 .text fopAcM_myRoomSearchEnemy__FSc */ #ifdef NONMATCHING -fopAc_ac_c* fopAcM_myRoomSearchEnemy(s8 roomNo) { - int procID = dStage_roomControl_c::getStatusProcID(roomNo); +fopAc_ac_c* fopAcM_myRoomSearchEnemy(s8 i_roomNo) { + int procID = dStage_roomControl_c::getStatusProcID(i_roomNo); scene_class* roomProc = fopScnM_SearchByID(procID); u32 actorID = ((daPy_py_c*)dComIfGp_getPlayer(0))->getGrabActorID(); @@ -1778,45 +1978,45 @@ asm fopAc_ac_c* fopAcM_myRoomSearchEnemy(s8 param_0) { /* 8001CAD8-8001CB48 017418 0070+00 0/0 0/0 81/81 .text * fopAcM_createDisappear__FPC10fopAc_ac_cPC4cXyzUcUcUc */ -s32 fopAcM_createDisappear(const fopAc_ac_c* p_actor, const cXyz* p_pos, u8 param_3, u8 param_4, +s32 fopAcM_createDisappear(const fopAc_ac_c* i_actor, const cXyz* i_pos, u8 param_3, u8 param_4, u8 param_5) { - s8 roomNo = p_actor->current.roomNo; - return fopAcM_GetID(fopAcM_fastCreate(PROC_DISAPPEAR, (param_5 << 0x10) | (param_3 << 0x8) | param_4, - p_pos, roomNo, &p_actor->current.angle, NULL, 0xFF, NULL, - NULL)); + s8 roomNo = i_actor->current.roomNo; + return fopAcM_GetID(fopAcM_fastCreate(PROC_DISAPPEAR, + (param_5 << 0x10) | (param_3 << 0x8) | param_4, i_pos, + roomNo, &i_actor->current.angle, NULL, 0xFF, NULL, NULL)); } /* 8001CB48-8001CBA0 017488 0058+00 0/0 6/6 7/7 .text fopAcM_setCarryNow__FP10fopAc_ac_ci */ -void fopAcM_setCarryNow(fopAc_ac_c* p_actor, int param_1) { - p_actor->mStatus |= 0x2000; +void fopAcM_setCarryNow(fopAc_ac_c* i_actor, int param_1) { + i_actor->mStatus |= 0x2000; if (param_1 != 0) { - fopAcM_setStageLayer(p_actor); - fopAcM_onActor(p_actor); + fopAcM_setStageLayer(i_actor); + fopAcM_onActor(i_actor); } } /* 8001CBA0-8001CC5C 0174E0 00BC+00 0/0 5/5 21/21 .text fopAcM_cancelCarryNow__FP10fopAc_ac_c */ -void fopAcM_cancelCarryNow(fopAc_ac_c* p_actor) { - if (fopAcM_checkCarryNow(p_actor)) { - p_actor->mStatus &= ~0x2000; +void fopAcM_cancelCarryNow(fopAc_ac_c* i_actor) { + if (fopAcM_checkCarryNow(i_actor)) { + i_actor->mStatus &= ~0x2000; - s8 roomNo = fopAcM_GetHomeRoomNo(p_actor); + s8 roomNo = fopAcM_GetHomeRoomNo(i_actor); if (roomNo != -1) { - int procID = dStage_roomControl_c::getStatusProcID(fopAcM_GetRoomNo(p_actor)); + int procID = dStage_roomControl_c::getStatusProcID(fopAcM_GetRoomNo(i_actor)); scene_class* roomProc = fopScnM_SearchByID(procID); if (roomProc != NULL) { - fopAcM_setRoomLayer(p_actor, fopAcM_GetRoomNo(p_actor)); + fopAcM_setRoomLayer(i_actor, fopAcM_GetRoomNo(i_actor)); } } - p_actor->shape_angle.z = 0; - p_actor->shape_angle.x = 0; + i_actor->shape_angle.z = 0; + i_actor->shape_angle.x = 0; - if (i_dComIfGp_event_runCheck() && fopAcM_GetGroup(p_actor) != 2) { - p_actor->mStatus |= 0x800; + if (i_dComIfGp_event_runCheck() && fopAcM_GetGroup(i_actor) != 2) { + i_actor->mStatus |= 0x800; } } } @@ -1825,12 +2025,12 @@ void fopAcM_cancelCarryNow(fopAc_ac_c* p_actor) { */ // matches with literals #ifdef NONMATCHING -s32 fopAcM_otoCheck(fopAc_ac_c const* p_actor, f32 param_1) { +s32 fopAcM_otoCheck(fopAc_ac_c const* i_actor, f32 param_1) { SND_INFLUENCE* sound = dKy_Sound_get(); - - if (sound->field_0x14 != -1 && fopAcM_GetID(p_actor) != sound->field_0x14) { - cXyz tmp = sound->field_0x0 - p_actor->current.pos; - + + if (sound->field_0x14 != -1 && fopAcM_GetID(i_actor) != sound->field_0x14) { + cXyz tmp = sound->field_0x0 - i_actor->current.pos; + if (tmp.abs() < param_1) { return sound->field_0xc; } @@ -1903,8 +2103,8 @@ s32 fopAcM_wayBgCheck(fopAc_ac_c const* param_0, f32 param_1, f32 param_2) { } /* 8001CFD8-8001D020 017918 0048+00 0/0 0/0 2/2 .text fopAcM_plAngleCheck__FPC10fopAc_ac_cs */ -s32 fopAcM_plAngleCheck(fopAc_ac_c const* p_actor, s16 i_angle) { - s16 angle = p_actor->shape_angle.y - dComIfGp_getPlayer(0)->shape_angle.y; +s32 fopAcM_plAngleCheck(fopAc_ac_c const* i_actor, s16 i_angle) { + s16 angle = i_actor->shape_angle.y - dComIfGp_getPlayer(0)->shape_angle.y; if (angle <= i_angle && angle >= (s16)-i_angle) { return 0; } @@ -2094,22 +2294,22 @@ asm void fopAcM_setEffectMtx(fopAc_ac_c const* param_0, J3DModelData const* para #pragma pop /* 8001D5A4-8001D5EC 017EE4 0048+00 1/1 0/0 0/0 .text fopAcM_getProcNameString__FPC10fopAc_ac_c */ -static const char* fopAcM_getProcNameString(const fopAc_ac_c* p_actor) { - const char* name = dStage_getName2(p_actor->mBase.mBsTypeId, p_actor->mSubtype); +static const char* fopAcM_getProcNameString(const fopAc_ac_c* i_actor) { + const char* name = dStage_getName2(i_actor->mBase.mBsTypeId, i_actor->mSubtype); return name != NULL ? name : "UNKOWN"; } /* 8001D5EC-8001D698 017F2C 00AC+00 1/1 0/0 0/0 .text fopAcM_findObjectCB__FPC10fopAc_ac_cPv */ -static const fopAc_ac_c* fopAcM_findObjectCB(fopAc_ac_c const* p_actor, void* p_data) { - fopAcM_search_prm* prm = (fopAcM_search_prm*)p_data; +static const fopAc_ac_c* fopAcM_findObjectCB(fopAc_ac_c const* i_actor, void* i_data) { + fopAcM_search_prm* prm = (fopAcM_search_prm*)i_data; - if (!fopAcM_IsExecuting(fopAcM_GetID(p_actor))) { + if (!fopAcM_IsExecuting(fopAcM_GetID(i_actor))) { return NULL; } - if (prm->mProcName == fopAcM_GetProfName(p_actor) && prm->mSubType == p_actor->mSubtype) { - if (prm->mParam0 == 0 || prm->mParam1 == (prm->mParam0 & fopAcM_GetParam(p_actor))) { - return p_actor; + if (prm->mProcName == fopAcM_GetProfName(i_actor) && prm->mSubType == i_actor->mSubtype) { + if (prm->mParam0 == 0 || prm->mParam1 == (prm->mParam0 & fopAcM_GetParam(i_actor))) { + return i_actor; } } @@ -2134,16 +2334,16 @@ fopAc_ac_c* fopAcM_searchFromName(char const* name, u32 param0, u32 param1) { /* 8001D6F0-8001D7A0 018030 00B0+00 1/1 0/0 0/0 .text fopAcM_findObject4EventCB__FP10fopAc_ac_cPv */ -fopAc_ac_c* fopAcM_findObject4EventCB(fopAc_ac_c* p_actor, void* p_data) { - fopAcM_search4ev_prm* prm = (fopAcM_search4ev_prm*)p_data; +fopAc_ac_c* fopAcM_findObject4EventCB(fopAc_ac_c* i_actor, void* i_data) { + fopAcM_search4ev_prm* prm = (fopAcM_search4ev_prm*)i_data; - if (p_data == NULL || !fopAcM_IsExecuting(fopAcM_GetID(p_actor))) { + if (i_data == NULL || !fopAcM_IsExecuting(fopAcM_GetID(i_actor))) { return NULL; } - if (prm->mProcName == fopAcM_GetProfName(p_actor) && prm->mSubType == p_actor->mSubtype) { - if (prm->mEventID < 0 || prm->mEventID == p_actor->mEvtInfo.getIdx()) { - return p_actor; + if (prm->mProcName == fopAcM_GetProfName(i_actor) && prm->mSubType == i_actor->mSubtype) { + if (prm->mEventID < 0 || prm->mEventID == i_actor->mEvtInfo.getIdx()) { + return i_actor; } } @@ -2236,7 +2436,7 @@ asm s32 fopAcM_getWaterY(cXyz const* param_0, f32* param_1) { void fpoAcM_relativePos(fopAc_ac_c const* actor, cXyz const* p_inPos, cXyz* p_outPos) { s16 angle = -actor->shape_angle.y; cXyz pos = *p_inPos - actor->current.pos; - + p_outPos->x = (pos.z * cM_ssin(angle)) + (pos.x * cM_scos(angle)); p_outPos->y = pos.y; p_outPos->z = (pos.z * cM_scos(angle)) - (pos.x * cM_ssin(angle)); @@ -2438,8 +2638,7 @@ SECTION_DATA extern void* __vt__14dBgS_ObjGndChk[12 + 1 /* padding */] = { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void __sinit_f_op_actor_mng_cpp() { - nofralloc +asm void __sinit_f_op_actor_mng_cpp(){nofralloc #include "asm/f_op/f_op_actor_mng/__sinit_f_op_actor_mng_cpp.s" } #pragma pop diff --git a/src/f_op/f_op_actor_tag.cpp b/src/f_op/f_op_actor_tag.cpp index aed68873f6..cd6740cd85 100644 --- a/src/f_op/f_op_actor_tag.cpp +++ b/src/f_op/f_op_actor_tag.cpp @@ -20,7 +20,7 @@ u32 fopAcTg_ActorQTo(create_tag_class* i_createTag) { } /* 80019880-800198A4 0141C0 0024+00 0/0 1/1 0/0 .text fopAcTg_Init__FP16create_tag_classPv */ -u32 fopAcTg_Init(create_tag_class* i_createTag, void* data) { - cTg_Create(i_createTag, data); +u32 fopAcTg_Init(create_tag_class* i_createTag, void* i_data) { + cTg_Create(i_createTag, i_data); return 1; } diff --git a/src/f_pc/f_pc_base.cpp b/src/f_pc/f_pc_base.cpp index d0897bc53e..5b77008629 100644 --- a/src/f_pc/f_pc_base.cpp +++ b/src/f_pc/f_pc_base.cpp @@ -11,8 +11,8 @@ #include "global.h" /* 8002064C-8002065C 0010+00 s=0 e=14 z=0 None .text fpcBs_Is_JustOfType__Fii */ -s32 fpcBs_Is_JustOfType(int pType1, int pType2) { - return checkEqual(pType1, pType2); // return pType2 == pType1 matches when return type is bool +s32 fpcBs_Is_JustOfType(int i_typeA, int i_typeB) { + return checkEqual(i_typeA, i_typeB); // return pType2 == pType1 matches when return type is bool } /* ############################################################################################## */ @@ -20,67 +20,67 @@ s32 fpcBs_Is_JustOfType(int pType1, int pType2) { static int g_fpcBs_type; /* 8002065C-8002069C 0040+00 s=1 e=5 z=0 None .text fpcBs_MakeOfType__FPi */ -s32 fpcBs_MakeOfType(int* pType) { +s32 fpcBs_MakeOfType(int* i_type) { static s32 t_type = 0x9130000; - if (*pType == 0) { - *pType = ++t_type; + if (*i_type == 0) { + *i_type = ++t_type; } - return *pType; + return *i_type; } /* 8002069C-800206C4 0028+00 s=0 e=2 z=0 None .text fpcBs_MakeOfId__Fv */ -s32 fpcBs_MakeOfId(void) { +s32 fpcBs_MakeOfId() { static s32 process_id = 1; return process_id++; } /* 800206C4-80020720 005C+00 s=0 e=1 z=0 None .text fpcBs_Execute__FP18base_process_class */ -s32 fpcBs_Execute(base_process_class* pProc) { +s32 fpcBs_Execute(base_process_class* i_proc) { s32 result; layer_class* savedLayer = fpcLy_CurrentLayer(); - fpcLy_SetCurrentLayer(pProc->mLyTg.mpLayer); - result = fpcMtd_Execute(pProc->mpPcMtd, pProc); + fpcLy_SetCurrentLayer(i_proc->mLyTg.mpLayer); + result = fpcMtd_Execute(i_proc->mpPcMtd, i_proc); fpcLy_SetCurrentLayer(savedLayer); return result; } /* 80020720-80020760 0040+00 s=2 e=0 z=0 None .text fpcBs_DeleteAppend__FP18base_process_class */ -void fpcBs_DeleteAppend(base_process_class* pProc) { - if (pProc->mpUserData != NULL) { - cMl::free(pProc->mpUserData); - pProc->mpUserData = NULL; +void fpcBs_DeleteAppend(base_process_class* i_proc) { + if (i_proc->mpUserData != NULL) { + cMl::free(i_proc->mpUserData); + i_proc->mpUserData = NULL; } } /* 80020760-800207BC 005C+00 s=0 e=1 z=0 None .text fpcBs_IsDelete__FP18base_process_class */ -s32 fpcBs_IsDelete(base_process_class* pProc) { +s32 fpcBs_IsDelete(base_process_class* i_proc) { s32 result; layer_class* savedLayer = fpcLy_CurrentLayer(); - fpcLy_SetCurrentLayer(pProc->mLyTg.mpLayer); - result = fpcMtd_IsDelete(pProc->mpPcMtd, pProc); + fpcLy_SetCurrentLayer(i_proc->mLyTg.mpLayer); + result = fpcMtd_IsDelete(i_proc->mpPcMtd, i_proc); fpcLy_SetCurrentLayer(savedLayer); return result; } /* 800207BC-80020820 0064+00 s=0 e=2 z=0 None .text fpcBs_Delete__FP18base_process_class */ -s32 fpcBs_Delete(base_process_class* pProc) { - s32 deleteResult = fpcMtd_Delete(pProc->mpPcMtd, pProc); +s32 fpcBs_Delete(base_process_class* i_proc) { + s32 deleteResult = fpcMtd_Delete(i_proc->mpPcMtd, i_proc); if (deleteResult == 1) { - fpcBs_DeleteAppend(pProc); - pProc->mBsType = 0; - cMl::free(pProc); + fpcBs_DeleteAppend(i_proc); + i_proc->mBsType = 0; + cMl::free(i_proc); } return deleteResult; } /* 80020820-8002091C 00FC+00 s=0 e=2 z=0 None .text fpcBs_Create__FsUiPv */ -base_process_class* fpcBs_Create(s16 pProcTypeID, unsigned int pProcID, void* pData) { +base_process_class* fpcBs_Create(s16 i_procTypeID, unsigned int i_procID, void* i_data) { process_profile_definition* procProfDef; base_process_class* procClass; u32 size; - procProfDef = (process_profile_definition*)fpcPf_Get(pProcTypeID); + procProfDef = (process_profile_definition*)fpcPf_Get(i_procTypeID); size = procProfDef->mSize + procProfDef->mSizeOther; procClass = (base_process_class*)cMl::memalignB(-4, size); if (procClass == NULL) { @@ -94,37 +94,37 @@ base_process_class* fpcBs_Create(s16 pProcTypeID, unsigned int pProcID, void* pD procProfDef->mListPrio); procClass->mInitState = 0; procClass->mUnk0 = 0; - procClass->mBsPcId = pProcID; - procClass->mBsTypeId = pProcTypeID; + procClass->mBsPcId = i_procID; + procClass->mBsTypeId = i_procTypeID; procClass->mBsType = fpcBs_MakeOfType(&g_fpcBs_type); procClass->mProcName = procProfDef->mProcName; fpcPause_Init(procClass); procClass->mpPcMtd = procProfDef->mSubMtd; procClass->mpProf = procProfDef; - procClass->mpUserData = pData; + procClass->mpUserData = i_data; procClass->mParameters = procProfDef->mParameters; return procClass; } } -s32 fpcBs_SubCreate(base_process_class* pProc) { - switch (fpcMtd_Create(pProc->mpPcMtd, pProc)) { +s32 fpcBs_SubCreate(base_process_class* i_proc) { + switch (fpcMtd_Create(i_proc->mpPcMtd, i_proc)) { case 2: case cPhs_COMPLEATE_e: - fpcBs_DeleteAppend(pProc); - pProc->mUnk2 = 2; + fpcBs_DeleteAppend(i_proc); + i_proc->mUnk2 = 2; return 2; case cPhs_ZERO_e: case 1: - pProc->mInitState = 1; - pProc->mUnk2 = 0; + i_proc->mInitState = 1; + i_proc->mUnk2 = 0; return cPhs_ZERO_e; case 3: - pProc->mUnk2 = 3; + i_proc->mUnk2 = 3; return 3; case cPhs_ERROR_e: default: - pProc->mUnk2 = 5; + i_proc->mUnk2 = 5; return cPhs_ERROR_e; } } diff --git a/src/f_pc/f_pc_create_iter.cpp b/src/f_pc/f_pc_create_iter.cpp index c16f89da5d..388e2c9a1e 100644 --- a/src/f_pc/f_pc_create_iter.cpp +++ b/src/f_pc/f_pc_create_iter.cpp @@ -7,37 +7,37 @@ #include "f_pc/f_pc_create_req.h" /* 800209C8-80020A04 003C+00 s=0 e=1 z=0 None .text fpcCtIt_Method__FPFPvPv_iPv */ -s32 fpcCtIt_Method(fpcCtIt_MethodFunc pJudge, void* pUserData) { +s32 fpcCtIt_Method(fpcCtIt_MethodFunc i_judgeFunc, void* i_data) { node_method_data iter; - iter.mFunc = pJudge; - iter.mpUserData = pUserData; + iter.mFunc = i_judgeFunc; + iter.mpUserData = i_data; return cLsIt_Method(&g_fpcCtTg_Queue, (cNdIt_MethodFunc)cTgIt_MethodCall, &iter); } /* 80020A04-80020A40 003C+00 s=1 e=2 z=0 None .text fpcCtIt_Judge__FPFPvPv_PvPv */ -void* fpcCtIt_Judge(fpcCtIt_JudgeFunc pJudge, void* pUserData) { +void* fpcCtIt_Judge(fpcCtIt_JudgeFunc i_judgeFunc, void* i_data) { node_judge_data iter; - iter.mFunc = pJudge; - iter.mpUserData = pUserData; + iter.mFunc = i_judgeFunc; + iter.mpUserData = i_data; return cLsIt_Judge(&g_fpcCtTg_Queue, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &iter); } /* 80020A40-80020A94 0054+00 s=1 e=0 z=0 None .text * fpcCtIt_filter_JudgeInLayer__FP10create_tagP16fpcCtIt_jilprm_c */ -void* fpcCtIt_filter_JudgeInLayer(create_tag* pCreateTag, fpcCtIt_jilprm_c* pIterData) { - create_request* create_req = static_cast(pCreateTag->mBase.mpTagData); - if (create_req->mpLayer->mLayerID == pIterData->mLayerID) { - return pIterData->mFunc((node_class*)create_req->mpRes, pIterData->mpUserData); +void* fpcCtIt_filter_JudgeInLayer(create_tag* i_createTag, fpcCtIt_jilprm_c* i_iterData) { + create_request* create_req = static_cast(i_createTag->mBase.mpTagData); + if (create_req->mpLayer->mLayerID == i_iterData->mLayerID) { + return i_iterData->mFunc((node_class*)create_req->mpRes, i_iterData->mpUserData); } else { return NULL; } } /* 80020A94-80020ACC 0038+00 s=0 e=1 z=0 None .text fpcCtIt_JudgeInLayer__FUiPFPvPv_PvPv */ -void* fpcCtIt_JudgeInLayer(unsigned int pLayerID, fpcCtIt_JudgeFunc pFunc, void* pUserData) { +void* fpcCtIt_JudgeInLayer(unsigned int i_layerID, fpcCtIt_JudgeFunc i_judgeFunc, void* i_data) { fpcCtIt_jilprm_c data; - data.mLayerID = pLayerID; - data.mFunc = pFunc; - data.mpUserData = pUserData; + data.mLayerID = i_layerID; + data.mFunc = i_judgeFunc; + data.mpUserData = i_data; return fpcCtIt_Judge((fpcCtIt_JudgeFunc)fpcCtIt_filter_JudgeInLayer, &data); } diff --git a/src/f_pc/f_pc_create_req.cpp b/src/f_pc/f_pc_create_req.cpp index a9fd48cc32..cc1b2b3c05 100644 --- a/src/f_pc/f_pc_create_req.cpp +++ b/src/f_pc/f_pc_create_req.cpp @@ -13,95 +13,95 @@ /* 80020ACC-80020AE8 001C+00 s=1 e=0 z=0 None .text fpcCtRq_isCreatingByID__FP10create_tagPUi */ -bool fpcCtRq_isCreatingByID(create_tag* pTag, unsigned int* pId) { - create_request* pReq = static_cast(pTag->mBase.mpTagData); - return pReq->mBsPcId == *pId; +bool fpcCtRq_isCreatingByID(create_tag* i_createTag, unsigned int* i_procID) { + create_request* pReq = static_cast(i_createTag->mBase.mpTagData); + return pReq->mBsPcId == *i_procID; } /* 80020AE8-80020B20 0038+00 s=0 e=2 z=0 None .text fpcCtRq_IsCreatingByID__FUi */ -BOOL fpcCtRq_IsCreatingByID(unsigned int id) { - return fpcCtIt_Judge((fpcLyIt_JudgeFunc)fpcCtRq_isCreatingByID, &id) != NULL ? 1 : 0; +BOOL fpcCtRq_IsCreatingByID(unsigned int i_id) { + return fpcCtIt_Judge((fpcLyIt_JudgeFunc)fpcCtRq_isCreatingByID, &i_id) != NULL ? TRUE : FALSE; } /* 80020B20-80020B5C 003C+00 s=1 e=0 z=0 None .text fpcCtRq_CreateQTo__FP14create_request */ -void fpcCtRq_CreateQTo(create_request* pReq) { - fpcCtTg_CreateQTo(&pReq->mBase); - fpcLy_CreatedMesg(pReq->mpLayer); - fpcLy_CancelQTo(&pReq->mMtdTg); +void fpcCtRq_CreateQTo(create_request* i_request) { + fpcCtTg_CreateQTo(&i_request->mBase); + fpcLy_CreatedMesg(i_request->mpLayer); + fpcLy_CancelQTo(&i_request->mMtdTg); } /* 80020B5C-80020BA0 0044+00 s=1 e=0 z=0 None .text fpcCtRq_ToCreateQ__FP14create_request */ -void fpcCtRq_ToCreateQ(create_request* pReq) { - fpcLy_CreatingMesg(pReq->mpLayer); - fpcLy_ToCancelQ(pReq->mpLayer, &pReq->mMtdTg); - fpcCtTg_ToCreateQ(&pReq->mBase); +void fpcCtRq_ToCreateQ(create_request* i_request) { + fpcLy_CreatingMesg(i_request->mpLayer); + fpcLy_ToCancelQ(i_request->mpLayer, &i_request->mMtdTg); + fpcCtTg_ToCreateQ(&i_request->mBase); } /* 80020BA0-80020C14 0074+00 s=2 e=0 z=0 None .text fpcCtRq_Delete__FP14create_request */ -BOOL fpcCtRq_Delete(create_request* pReq) { - fpcCtRq_CreateQTo(pReq); - if (pReq->mpCtRqMtd != NULL && fpcMtd_Method(pReq->mpCtRqMtd->mpDelete, pReq) == 0) { +BOOL fpcCtRq_Delete(create_request* i_request) { + fpcCtRq_CreateQTo(i_request); + if (i_request->mpCtRqMtd != NULL && fpcMtd_Method(i_request->mpCtRqMtd->mpDelete, i_request) == 0) { return 0; } else { - if (pReq->mpRes) { - pReq->mpRes->mpCtRq = NULL; + if (i_request->mpRes) { + i_request->mpRes->mpCtRq = NULL; } - cMl::free(pReq); + cMl::free(i_request); return 1; } } /* 80020C14-80020CAC 0098+00 s=2 e=2 z=0 None .text fpcCtRq_Cancel__FP14create_request */ -BOOL fpcCtRq_Cancel(create_request* pReq) { +BOOL fpcCtRq_Cancel(create_request* i_request) { base_process_class* pProc; - if (pReq != NULL && !pReq->mbIsCancelling) { - pReq->mbIsCancelling = TRUE; - pProc = pReq->mpRes; + if (i_request != NULL && !i_request->mbIsCancelling) { + i_request->mbIsCancelling = TRUE; + pProc = i_request->mpRes; if (pProc != NULL && !fpcDt_Delete(pProc)) return FALSE; - if (pReq->mpCtRqMtd != NULL && !fpcMtd_Method(pReq->mpCtRqMtd->mpCancel, pReq)) + if (i_request->mpCtRqMtd != NULL && !fpcMtd_Method(i_request->mpCtRqMtd->mpCancel, i_request)) return FALSE; - return fpcCtRq_Delete(pReq); + return fpcCtRq_Delete(i_request); } else { return TRUE; } } /* 80020CAC-80020CC8 001C+00 s=0 e=1 z=0 None .text fpcCtRq_IsDoing__FP14create_request */ -s32 fpcCtRq_IsDoing(create_request* pReq) { - if (pReq != NULL) - return pReq->mbIsCreating; +s32 fpcCtRq_IsDoing(create_request* i_request) { + if (i_request != NULL) + return i_request->mbIsCreating; else return FALSE; } /* 80020CC8-80020D84 00BC+00 s=1 e=0 z=0 None .text fpcCtRq_Do__FP14create_request */ -BOOL fpcCtRq_Do(create_request* pReq) { - s32 ret = cPhs_COMPLEATE_e; +BOOL fpcCtRq_Do(create_request* i_request) { + s32 phase = cPhs_COMPLEATE_e; - if (pReq->mpCtRqMtd != NULL) { - cPhs__Handler pHandler = pReq->mpCtRqMtd->mpHandler; + if (i_request->mpCtRqMtd != NULL) { + cPhs__Handler pHandler = i_request->mpCtRqMtd->mpHandler; if (pHandler != NULL) { - pReq->mbIsCreating = TRUE; - ret = pHandler(pReq); - pReq->mbIsCreating = FALSE; + i_request->mbIsCreating = TRUE; + phase = pHandler(i_request); + i_request->mbIsCreating = FALSE; } } - switch (ret) { + switch (phase) { case cPhs_COMPLEATE_e: { - s32 success = fpcEx_ToExecuteQ(pReq->mpRes); + s32 success = fpcEx_ToExecuteQ(i_request->mpRes); if (success == 0) - return fpcCtRq_Cancel(pReq); + return fpcCtRq_Cancel(i_request); else - return fpcCtRq_Delete(pReq); + return fpcCtRq_Delete(i_request); } case 3: case cPhs_ERROR_e: - return fpcCtRq_Cancel(pReq); + return fpcCtRq_Cancel(i_request); } return 1; @@ -109,20 +109,20 @@ BOOL fpcCtRq_Do(create_request* pReq) { /* 80020D84-80020DB0 002C+00 s=0 e=1 z=0 None .text fpcCtRq_Handler__Fv */ -void fpcCtRq_Handler(void) { +void fpcCtRq_Handler() { fpcCtIt_Method((fpcCtIt_MethodFunc)fpcCtRq_Do, NULL); } /* 80020DB0-80020E38 0088+00 s=0 e=2 z=0 None .text * fpcCtRq_Create__FP11layer_classUlP27create_request_method_class */ -create_request* fpcCtRq_Create(layer_class* pLayer, u32 size, create_request_method_class* pMthd) { - create_request* pReq = (create_request*)cMl::memalignB(-4, size); +create_request* fpcCtRq_Create(layer_class* i_layer, u32 i_size, create_request_method_class* i_CtRqMethods) { + create_request* pReq = (create_request*)cMl::memalignB(-4, i_size); if (pReq != NULL) { fpcCtTg_Init(&pReq->mBase, pReq); fpcMtdTg_Init(&pReq->mMtdTg, (process_method_tag_func)fpcCtRq_Cancel, pReq); - pReq->mpLayer = pLayer; - pReq->mpCtRqMtd = pMthd; + pReq->mpLayer = i_layer; + pReq->mpCtRqMtd = i_CtRqMethods; pReq->mBsPcId = fpcBs_MakeOfId(); pReq->mpRes = NULL; pReq->mbIsCancelling = FALSE; diff --git a/src/f_pc/f_pc_create_tag.cpp b/src/f_pc/f_pc_create_tag.cpp index bf94fa969c..393ec4eaa4 100644 --- a/src/f_pc/f_pc_create_tag.cpp +++ b/src/f_pc/f_pc_create_tag.cpp @@ -11,17 +11,17 @@ node_list_class g_fpcCtTg_Queue = {NULL, NULL, 0}; /* 80020E38-80020E64 002C+00 s=0 e=1 z=0 None .text fpcCtTg_ToCreateQ__FP10create_tag */ -void fpcCtTg_ToCreateQ(create_tag* pTag) { - cTg_Addition(&g_fpcCtTg_Queue, &pTag->mBase); +void fpcCtTg_ToCreateQ(create_tag* i_createTag) { + cTg_Addition(&g_fpcCtTg_Queue, &i_createTag->mBase); } /* 80020E64-80020E84 0020+00 s=0 e=1 z=0 None .text fpcCtTg_CreateQTo__FP10create_tag */ -void fpcCtTg_CreateQTo(create_tag* pTag) { - cTg_SingleCut(&pTag->mBase); +void fpcCtTg_CreateQTo(create_tag* i_createTag) { + cTg_SingleCut(&i_createTag->mBase); } /* 80020E84-80020EA8 0024+00 s=0 e=1 z=0 None .text fpcCtTg_Init__FP10create_tagPv */ -s32 fpcCtTg_Init(create_tag* pTag, void* pUserData) { - cTg_Create(&pTag->mBase, pUserData); +s32 fpcCtTg_Init(create_tag* i_createTag, void* i_data) { + cTg_Create(&i_createTag->mBase, i_data); return 1; } diff --git a/src/f_pc/f_pc_creator.cpp b/src/f_pc/f_pc_creator.cpp index 325cbba5bf..972d3b2fde 100644 --- a/src/f_pc/f_pc_creator.cpp +++ b/src/f_pc/f_pc_creator.cpp @@ -12,21 +12,21 @@ // /* 80020EA8-80020EC8 0020+00 s=0 e=1 z=0 None .text fpcCt_IsCreatingByID__FUi */ -BOOL fpcCt_IsCreatingByID(unsigned int id) { - return fpcCtRq_IsCreatingByID(id); +BOOL fpcCt_IsCreatingByID(unsigned int i_id) { + return fpcCtRq_IsCreatingByID(i_id); } /* 80020EC8-80020EEC 0024+00 s=0 e=1 z=0 None .text fpcCt_IsDoing__FP18base_process_class */ -s32 fpcCt_IsDoing(base_process_class* pProc) { - return fpcCtRq_IsDoing(pProc->mpCtRq); +s32 fpcCt_IsDoing(base_process_class* i_proc) { + return fpcCtRq_IsDoing(i_proc->mpCtRq); } /* 80020EEC-80020F10 0024+00 s=0 e=1 z=0 None .text fpcCt_Abort__FP18base_process_class */ -BOOL fpcCt_Abort(base_process_class* pProc) { - return fpcCtRq_Cancel(pProc->mpCtRq); +BOOL fpcCt_Abort(base_process_class* i_proc) { + return fpcCtRq_Cancel(i_proc->mpCtRq); } /* 80020F10-80020F30 0020+00 s=0 e=1 z=0 None .text fpcCt_Handler__Fv */ -void fpcCt_Handler(void) { +void fpcCt_Handler() { fpcCtRq_Handler(); } diff --git a/src/f_pc/f_pc_delete_tag.cpp b/src/f_pc/f_pc_delete_tag.cpp index 3f3911373d..9655e55f6d 100644 --- a/src/f_pc/f_pc_delete_tag.cpp +++ b/src/f_pc/f_pc_delete_tag.cpp @@ -12,41 +12,41 @@ node_list_class g_fpcDtTg_Queue = {NULL, NULL, 0}; /* 80020F30-80020F48 0018+00 s=0 e=1 z=0 None .text fpcDtTg_IsEmpty__Fv */ -BOOL fpcDtTg_IsEmpty(void) { +BOOL fpcDtTg_IsEmpty() { return checkEqual(g_fpcDtTg_Queue.mSize, 0); } /* 80020F48-80020F7C 0034+00 s=1 e=1 z=0 None .text fpcDtTg_ToDeleteQ__FP16delete_tag_class */ -void fpcDtTg_ToDeleteQ(delete_tag_class* pTag) { - pTag->mTimer = 1; - cTg_Addition(&g_fpcDtTg_Queue, &pTag->mBase); +void fpcDtTg_ToDeleteQ(delete_tag_class* i_deleteTag) { + i_deleteTag->mTimer = 1; + cTg_Addition(&g_fpcDtTg_Queue, &i_deleteTag->mBase); } /* 80020F7C-80020F9C 0020+00 s=1 e=0 z=0 None .text fpcDtTg_DeleteQTo__FP16delete_tag_class */ -void fpcDtTg_DeleteQTo(delete_tag_class* pTag) { - cTg_SingleCut(&pTag->mBase); +void fpcDtTg_DeleteQTo(delete_tag_class* i_deleteTag) { + cTg_SingleCut(&i_deleteTag->mBase); } /* 80020F9C-8002101C 0080+00 s=0 e=1 z=0 None .text fpcDtTg_Do__FP16delete_tag_classPFPv_i */ -s32 fpcDtTg_Do(delete_tag_class* pTag, delete_tag_func pFunc) { - if (pTag->mTimer <= 0) { +s32 fpcDtTg_Do(delete_tag_class* i_deleteTag, delete_tag_func i_func) { + if (i_deleteTag->mTimer <= 0) { s32 ret; - fpcDtTg_DeleteQTo(pTag); - ret = pFunc(pTag->mBase.mpTagData); + fpcDtTg_DeleteQTo(i_deleteTag); + ret = i_func(i_deleteTag->mBase.mpTagData); if (ret == 0) { - fpcDtTg_ToDeleteQ(pTag); + fpcDtTg_ToDeleteQ(i_deleteTag); return 0; } else { return 1; } } else { - pTag->mTimer--; + i_deleteTag->mTimer--; return 0; } } /* 8002101C-80021040 0024+00 s=0 e=1 z=0 None .text fpcDtTg_Init__FP16delete_tag_classPv */ -s32 fpcDtTg_Init(delete_tag_class* pTag, void* pUserData) { - cTg_Create(&pTag->mBase, pUserData); +s32 fpcDtTg_Init(delete_tag_class* i_deleteTag, void* i_data) { + cTg_Create(&i_deleteTag->mBase, i_data); return 1; } diff --git a/src/f_pc/f_pc_deletor.cpp b/src/f_pc/f_pc_deletor.cpp index ab63505a5f..9fbb999f00 100644 --- a/src/f_pc/f_pc_deletor.cpp +++ b/src/f_pc/f_pc_deletor.cpp @@ -18,13 +18,13 @@ BOOL fpcDt_IsComplete() { /* 80021060-800210D4 0074+00 s=1 e=0 z=0 None .text fpcDt_deleteMethod__FP18base_process_class */ -s32 fpcDt_deleteMethod(base_process_class* pProc) { - layer_class* layer = pProc->mDtTg.mpLayer; - s16 typeID = pProc->mBsTypeId; +s32 fpcDt_deleteMethod(base_process_class* i_proc) { + layer_class* layer = i_proc->mDtTg.mpLayer; + s16 typeID = i_proc->mBsTypeId; fpcLy_SetCurrentLayer(layer); - fpcLnTg_QueueTo(&pProc->mLnTg); - if (fpcBs_Delete(pProc) == 1) { + fpcLnTg_QueueTo(&i_proc->mLnTg); + if (fpcBs_Delete(i_proc) == 1) { fpcLy_DeletedMesg(layer); fpcLd_Free(typeID); return 1; @@ -39,14 +39,14 @@ void fpcDt_Handler(void) { } /* 8002110C-80021188 007C+00 s=1 e=0 z=0 None .text fpcDt_ToQueue__FP18base_process_class */ -s32 fpcDt_ToQueue(base_process_class* pProc) { - if (pProc->mUnk0 != 1 && fpcBs_IsDelete(pProc) == 1) { - if (fpcPi_IsInQueue(&pProc->mPi) == 1) { - fpcPi_Delete(&pProc->mPi); +s32 fpcDt_ToQueue(base_process_class* i_proc) { + if (i_proc->mUnk0 != 1 && fpcBs_IsDelete(i_proc) == 1) { + if (fpcPi_IsInQueue(&i_proc->mPi) == 1) { + fpcPi_Delete(&i_proc->mPi); } - pProc->mDtTg.mpLayer = pProc->mLyTg.mpLayer; - fpcDtTg_ToDeleteQ(&pProc->mDtTg); - fpcLy_DeletingMesg(pProc->mLyTg.mpLayer); + i_proc->mDtTg.mpLayer = i_proc->mLyTg.mpLayer; + fpcDtTg_ToDeleteQ(&i_proc->mDtTg); + fpcLy_DeletingMesg(i_proc->mLyTg.mpLayer); return 1; } else { return 0; @@ -54,39 +54,40 @@ s32 fpcDt_ToQueue(base_process_class* pProc) { } /* 80021188-800212A4 011C+00 s=1 e=0 z=0 None .text fpcDt_ToDeleteQ__FP18base_process_class */ -s32 fpcDt_ToDeleteQ(base_process_class* pProc) { - if (pProc->mUnk0 == 1) { +s32 fpcDt_ToDeleteQ(base_process_class* i_proc) { + if (i_proc->mUnk0 == 1) { return 0; } else { - if (cTg_IsUse(&pProc->mDtTg.mBase) != 0) { + if (cTg_IsUse(&i_proc->mDtTg.mBase) != 0) { return 1; } else { - if (fpcBs_Is_JustOfType(g_fpcNd_type, pProc->mSubType)) { - process_node_class* procNode = (process_node_class*)pProc; + if (fpcBs_Is_JustOfType(g_fpcNd_type, i_proc->mSubType)) { + process_node_class* procNode = (process_node_class*)i_proc; if (fpcNd_IsDeleteTiming(procNode) == 0) { return 0; } else { layer_class* layer = &procNode->mLayer; fpcLy_Cancel(layer); - if (fpcLyIt_OnlyHereLY(layer, (fpcLyIt_OnlyHereFunc)fpcDt_ToDeleteQ, NULL) == - 0) { + if (fpcLyIt_OnlyHereLY(layer, (fpcLyIt_OnlyHereFunc)fpcDt_ToDeleteQ, NULL) == 0) + { return 0; } } } - if (fpcDt_ToQueue(pProc) == 1) { + + if (fpcDt_ToQueue(i_proc) == 1) { // return type has to be BOOL - if (fpcEx_IsExist(pProc->mBsPcId) == 1) { - if (fpcEx_ExecuteQTo(pProc) == 0) { + if (fpcEx_IsExist(i_proc->mBsPcId) == 1) { + if (fpcEx_ExecuteQTo(i_proc) == 0) { return 0; } } else { // return type is wrong, has to be BOOL - if (fpcCt_Abort(pProc) == 0) { + if (fpcCt_Abort(i_proc) == 0) { return 0; } } - pProc->mInitState = 3; + i_proc->mInitState = 3; return 1; } else { return 0; @@ -96,16 +97,16 @@ s32 fpcDt_ToDeleteQ(base_process_class* pProc) { } /* 800212A4-80021308 0064+00 s=0 e=3 z=0 None .text fpcDt_Delete__FPv */ -s32 fpcDt_Delete(void* pProcV) { - base_process_class* pProc = static_cast(pProcV); - if (pProc != NULL) { - if (fpcCt_IsDoing(pProc) == 1) +s32 fpcDt_Delete(void* i_proc) { + base_process_class* proc = static_cast(i_proc); + if (proc != NULL) { + if (fpcCt_IsDoing(proc) == 1) return 0; - if (pProc->mInitState == 3) + if (proc->mInitState == 3) return 0; - return fpcDt_ToDeleteQ(pProc); + return fpcDt_ToDeleteQ(proc); } else { return 1; } diff --git a/src/f_pc/f_pc_draw.cpp b/src/f_pc/f_pc_draw.cpp index d00104e032..bb31ce453b 100644 --- a/src/f_pc/f_pc_draw.cpp +++ b/src/f_pc/f_pc_draw.cpp @@ -9,19 +9,19 @@ #include "f_pc/f_pc_pause.h" /* 80023954-800239F4 00A0+00 s=0 e=1 z=0 None .text fpcDw_Execute__FP18base_process_class */ -s32 fpcDw_Execute(base_process_class* pProc) { - if (!fpcPause_IsEnable(pProc, 2)) { +s32 fpcDw_Execute(base_process_class* i_proc) { + if (!fpcPause_IsEnable(i_proc, 2)) { layer_class* curLay; s32 ret; - process_method_func func; + process_method_func draw_func; curLay = fpcLy_CurrentLayer(); - if (fpcBs_Is_JustOfType(g_fpcLf_type, pProc->mSubType)) { - func = ((leafdraw_method_class*)pProc->mpPcMtd)->mpDrawFunc; + if (fpcBs_Is_JustOfType(g_fpcLf_type, i_proc->mSubType)) { + draw_func = ((leafdraw_method_class*)i_proc->mpPcMtd)->mpDrawFunc; } else { - func = ((nodedraw_method_class*)pProc->mpPcMtd)->mpDrawFunc; + draw_func = ((nodedraw_method_class*)i_proc->mpPcMtd)->mpDrawFunc; } - fpcLy_SetCurrentLayer(pProc->mLyTg.mpLayer); - ret = func(pProc); + fpcLy_SetCurrentLayer(i_proc->mLyTg.mpLayer); + ret = draw_func(i_proc); fpcLy_SetCurrentLayer(curLay); return ret; } else { diff --git a/src/f_pc/f_pc_draw_priority.cpp b/src/f_pc/f_pc_draw_priority.cpp index 8486a3d9f5..04d60cbc58 100644 --- a/src/f_pc/f_pc_draw_priority.cpp +++ b/src/f_pc/f_pc_draw_priority.cpp @@ -6,16 +6,16 @@ #include "f_pc/f_pc_draw_priority.h" /* 80021308-80021310 0008+00 s=0 e=1 z=0 None .text fpcDwPi_Get__FPC19draw_priority_class */ -s16 fpcDwPi_Get(const draw_priority_class* pDwPi) { - return pDwPi->mPriority; +s16 fpcDwPi_Get(const draw_priority_class* i_drawPrioClass) { + return i_drawPrioClass->mPriority; } /* 80021310-80021318 0008+00 s=1 e=0 z=0 None .text fpcDwPi_Set__FP19draw_priority_classs */ -void fpcDwPi_Set(draw_priority_class* pDwPi, s16 p) { - pDwPi->mPriority = p; +void fpcDwPi_Set(draw_priority_class* i_drawPrioClass, s16 i_priority) { + i_drawPrioClass->mPriority = i_priority; } /* 80021318-80021338 0020+00 s=0 e=1 z=0 None .text fpcDwPi_Init__FP19draw_priority_classs */ -void fpcDwPi_Init(draw_priority_class* pDwPi, s16 p) { - fpcDwPi_Set(pDwPi, p); +void fpcDwPi_Init(draw_priority_class* i_drawPrioClass, s16 i_priority) { + fpcDwPi_Set(i_drawPrioClass, i_priority); } diff --git a/src/f_pc/f_pc_executor.cpp b/src/f_pc/f_pc_executor.cpp index 2a2c1bdd4c..7790ba476d 100644 --- a/src/f_pc/f_pc_executor.cpp +++ b/src/f_pc/f_pc_executor.cpp @@ -9,45 +9,45 @@ #include "f_pc/f_pc_searcher.h" /* 80021338-80021358 0020+00 s=1 e=9 z=291 None .text fpcEx_Search__FPFPvPv_PvPv */ -base_process_class* fpcEx_Search(fpcLyIt_JudgeFunc pFunc, void* pUserData) { - return (base_process_class*)fpcLyIt_AllJudge(pFunc, pUserData); +base_process_class* fpcEx_Search(fpcLyIt_JudgeFunc i_judgeFunc, void* i_data) { + return (base_process_class*)fpcLyIt_AllJudge(i_judgeFunc, i_data); } /* 80021358-8002139C 0044+00 s=1 e=5 z=30 None .text fpcEx_SearchByID__FUi */ -base_process_class* fpcEx_SearchByID(unsigned int id) { - if (id + 2 <= 1) +base_process_class* fpcEx_SearchByID(unsigned int i_id) { + if (i_id + 2 <= 1) return NULL; - return fpcEx_Search(fpcSch_JudgeByID, &id); + return fpcEx_Search(fpcSch_JudgeByID, &i_id); } /* 8002139C-800213C4 0028+00 s=0 e=7 z=42 None .text fpcEx_IsExist__FUi */ -BOOL fpcEx_IsExist(unsigned int id) { - return fpcEx_SearchByID(id) != NULL ? 1 : 0; +BOOL fpcEx_IsExist(unsigned int i_id) { + return fpcEx_SearchByID(i_id) != NULL ? TRUE : FALSE; } /* 800213C4-80021418 0054+00 s=0 e=1 z=0 None .text fpcEx_Execute__FP18base_process_class */ -s32 fpcEx_Execute(base_process_class* pProc) { - if (pProc->mInitState != 2 || fpcPause_IsEnable(pProc, 1) == 1) +s32 fpcEx_Execute(base_process_class* i_proc) { + if (i_proc->mInitState != 2 || fpcPause_IsEnable(i_proc, 1) == 1) return 0; - return fpcBs_Execute(pProc); + return fpcBs_Execute(i_proc); } /* 80021418-800214C4 00AC+00 s=1 e=0 z=0 None .text fpcEx_ToLineQ__FP18base_process_class */ -s32 fpcEx_ToLineQ(base_process_class* pProc) { - layer_class* pLayer = pProc->mLyTg.mpLayer; +s32 fpcEx_ToLineQ(base_process_class* i_proc) { + layer_class* pLayer = i_proc->mLyTg.mpLayer; base_process_class* pLayerPcNode = &pLayer->mpPcNode->mBase; if (pLayer->mLayerID == 0 || cTg_IsUse(&pLayerPcNode->mLnTg.mBase) == TRUE) { - s32 ret = fpcLnTg_ToQueue(&pProc->mLnTg, pProc->mPi.mInfoCurr.mListID); + s32 ret = fpcLnTg_ToQueue(&i_proc->mLnTg, i_proc->mPi.mInfoCurr.mListID); if (ret == 0) { - fpcLyTg_QueueTo(&pProc->mLyTg); + fpcLyTg_QueueTo(&i_proc->mLyTg); return 0; } - pProc->mInitState = 2; - if (fpcBs_Is_JustOfType(g_fpcNd_type, pProc->mSubType)) { - process_node_class* pNode = (process_node_class*)pProc; + i_proc->mInitState = 2; + if (fpcBs_Is_JustOfType(g_fpcNd_type, i_proc->mSubType)) { + process_node_class* pNode = (process_node_class*)i_proc; fpcLyIt_OnlyHere(&pNode->mLayer, (fpcLyIt_OnlyHereFunc)fpcEx_ToLineQ, pNode); } @@ -59,10 +59,10 @@ s32 fpcEx_ToLineQ(base_process_class* pProc) { /* 800214C4-80021510 004C+00 s=0 e=1 z=0 None .text fpcEx_ExecuteQTo__FP18base_process_class */ -s32 fpcEx_ExecuteQTo(base_process_class* pProc) { - s32 ret = fpcLyTg_QueueTo(&pProc->mLyTg); +s32 fpcEx_ExecuteQTo(base_process_class* i_proc) { + s32 ret = fpcLyTg_QueueTo(&i_proc->mLyTg); if (ret == 1) { - pProc->mInitState = 3; + i_proc->mInitState = 3; return 1; } else { return 0; @@ -71,11 +71,11 @@ s32 fpcEx_ExecuteQTo(base_process_class* pProc) { /* 80021510-80021568 0058+00 s=0 e=1 z=0 None .text fpcEx_ToExecuteQ__FP18base_process_class */ -s32 fpcEx_ToExecuteQ(base_process_class* pProc) { - s32 ret = fpcLyTg_ToQueue(&pProc->mLyTg, pProc->mPi.mInfoCurr.mLayer, - pProc->mPi.mInfoCurr.mListID, pProc->mPi.mInfoCurr.mListPrio); +s32 fpcEx_ToExecuteQ(base_process_class* i_proc) { + s32 ret = fpcLyTg_ToQueue(&i_proc->mLyTg, i_proc->mPi.mInfoCurr.mLayer, + i_proc->mPi.mInfoCurr.mListID, i_proc->mPi.mInfoCurr.mListPrio); if (ret == 1) { - fpcEx_ToLineQ(pProc); + fpcEx_ToLineQ(i_proc); return 1; } else { return 0; @@ -83,6 +83,6 @@ s32 fpcEx_ToExecuteQ(base_process_class* pProc) { } /* 80021568-80021588 0020+00 s=0 e=1 z=0 None .text fpcEx_Handler__FPFPvPv_i */ -void fpcEx_Handler(fpcLnIt_QueueFunc pFunc) { - fpcLnIt_Queue(pFunc); +void fpcEx_Handler(fpcLnIt_QueueFunc i_queueFunc) { + fpcLnIt_Queue(i_queueFunc); } diff --git a/src/f_pc/f_pc_fstcreate_req.cpp b/src/f_pc/f_pc_fstcreate_req.cpp index 8faa23bc45..9ce751bbc6 100644 --- a/src/f_pc/f_pc_fstcreate_req.cpp +++ b/src/f_pc/f_pc_fstcreate_req.cpp @@ -9,10 +9,10 @@ #include "f_pc/f_pc_load.h" /* 80023A48-80023A98 0050+00 s=1 e=3 z=52 None .text fpcFCtRq_Do__FP19fast_create_request */ -s32 fpcFCtRq_Do(fast_create_request* pFstCreateReq) { - if (pFstCreateReq->mpFastCreateFunc != NULL && - pFstCreateReq->mpFastCreateFunc(pFstCreateReq->mBase.mpRes, - pFstCreateReq->mpFastCreateData) == 0) { +s32 fpcFCtRq_Do(fast_create_request* i_createReq) { + if (i_createReq->mpFastCreateFunc != NULL && + i_createReq->mpFastCreateFunc(i_createReq->mBase.mpRes, i_createReq->mpFastCreateData) == 0) + { return 3; } else { return 4; @@ -21,36 +21,33 @@ s32 fpcFCtRq_Do(fast_create_request* pFstCreateReq) { /* 80023A98-80023AA0 0008+00 s=1 e=0 z=0 None .text fpcFCtRq_Delete__FP19fast_create_request */ -s32 fpcFCtRq_Delete(fast_create_request* pFstCreateReq) { +s32 fpcFCtRq_Delete(fast_create_request* i_createReq) { return 1; } -/* ############################################################################################## */ -/* 803A3AE0-803A3AF0 000C+04 s=1 e=0 z=0 None .data submethod$2214 */ -create_request_method_class submethod = {(cPhs__Handler)fpcFCtRq_Do, NULL, - (process_method_func)fpcFCtRq_Delete}; - /* 80023AA0-80023B70 00D0+00 s=0 e=3 z=43 None .text * fpcFCtRq_Request__FP11layer_classsPFPvPv_iPvPv */ -base_process_class* fpcFCtRq_Request(layer_class* pLayer, s16 pProcTypeID, - fstCreateFunc pFastCreateFunc, void* pFastCreateData, - void* pData) { - if (!fpcLd_Use(pProcTypeID)) { +base_process_class* fpcFCtRq_Request(layer_class* i_layer, s16 i_procTypeID, + fstCreateFunc i_createFunc, void* i_createData, void* pData) { + static create_request_method_class submethod = {(cPhs__Handler)fpcFCtRq_Do, NULL, + (process_method_func)fpcFCtRq_Delete}; + + if (!fpcLd_Use(i_procTypeID)) { return NULL; } else { fast_create_request* request = - (fast_create_request*)fpcCtRq_Create(pLayer, 0x50, &submethod); + (fast_create_request*)fpcCtRq_Create(i_layer, 0x50, &submethod); if (request != NULL) { base_process_class* proc; - fpcLy_SetCurrentLayer(pLayer); - proc = fpcBs_Create(pProcTypeID, fpcBs_MakeOfId(), pData); + fpcLy_SetCurrentLayer(i_layer); + proc = fpcBs_Create(i_procTypeID, fpcBs_MakeOfId(), pData); if (proc != NULL) { proc->mpCtRq = (struct create_request*)request; request->mBase.mpRes = proc; request->mBase.mBsPcId = proc->mBsPcId; if (fpcBs_SubCreate(proc) == 2) { - request->mpFastCreateFunc = pFastCreateFunc; - request->mpFastCreateData = pFastCreateData; + request->mpFastCreateFunc = i_createFunc; + request->mpFastCreateData = i_createData; return proc; } } diff --git a/src/f_pc/f_pc_layer.cpp b/src/f_pc/f_pc_layer.cpp index 4f1920f8dd..8be3d29eae 100644 --- a/src/f_pc/f_pc_layer.cpp +++ b/src/f_pc/f_pc_layer.cpp @@ -11,71 +11,71 @@ /* 80021588-800215A8 0020+00 s=0 e=4 z=0 None .text fpcLy_CancelQTo__FP24process_method_tag_class */ -void fpcLy_CancelQTo(process_method_tag_class* pMthd) { - fpcMtdTg_MethodQTo(pMthd); +void fpcLy_CancelQTo(process_method_tag_class* i_methods) { + fpcMtdTg_MethodQTo(i_methods); } /* 800215A8-800215CC 0024+00 s=0 e=3 z=0 None .text * fpcLy_ToCancelQ__FP11layer_classP24process_method_tag_class */ -s32 fpcLy_ToCancelQ(layer_class* pLayer, process_method_tag_class* pMthd) { - return fpcMtdTg_ToMethodQ(&pLayer->mCancelList, pMthd); +s32 fpcLy_ToCancelQ(layer_class* i_layer, process_method_tag_class* i_methods) { + return fpcMtdTg_ToMethodQ(&i_layer->mCancelList, i_methods); } /* 800215CC-800215F8 002C+00 s=1 e=0 z=0 None .text * fpcLy_CancelMethod__FP24process_method_tag_class */ -bool fpcLy_CancelMethod(process_method_tag_class* pLayer) { - return fpcMtdTg_Do(pLayer) == 1; +bool fpcLy_CancelMethod(process_method_tag_class* i_layer) { + return fpcMtdTg_Do(i_layer) == 1; } /* 800215F8-8002161C 0024+00 s=0 e=1 z=0 None .text * fpcLy_IntoQueue__FP11layer_classiP16create_tag_classi */ -s32 fpcLy_IntoQueue(layer_class* pLayer, int treeListIdx, create_tag_class* pTag, int idx) { - return cTg_InsertToTree(&pLayer->mNodeListTree, treeListIdx, pTag, idx); +s32 fpcLy_IntoQueue(layer_class* i_layer, int i_treeListNo, create_tag_class* i_createTag, int i_no) { + return cTg_InsertToTree(&i_layer->mNodeListTree, i_treeListNo, i_createTag, i_no); } /* 8002161C-80021640 0024+00 s=0 e=1 z=0 None .text * fpcLy_ToQueue__FP11layer_classiP16create_tag_class */ -s32 fpcLy_ToQueue(layer_class* pLayer, int treeListIdx, create_tag_class* pTag) { - return cTg_AdditionToTree(&pLayer->mNodeListTree, treeListIdx, pTag); +s32 fpcLy_ToQueue(layer_class* i_layer, int i_treeListNo, create_tag_class* i_createTag) { + return cTg_AdditionToTree(&i_layer->mNodeListTree, i_treeListNo, i_createTag); } /* 80021640-80021664 0024+00 s=0 e=1 z=0 None .text * fpcLy_QueueTo__FP11layer_classP16create_tag_class */ -s32 fpcLy_QueueTo(layer_class* pLayer, create_tag_class* pTag) { - return cTg_SingleCutFromTree(pTag); +s32 fpcLy_QueueTo(layer_class* i_layer, create_tag_class* i_createTag) { + return cTg_SingleCutFromTree(i_createTag); } /* 80021664-80021678 0014+00 s=0 e=1 z=0 None .text fpcLy_IsDeletingMesg__FP11layer_class */ -BOOL fpcLy_IsDeletingMesg(layer_class* pLayer) { - return pLayer->counts.mDeletingCount > 0; +BOOL fpcLy_IsDeletingMesg(layer_class* i_layer) { + return i_layer->counts.mDeletingCount > 0; } /* 80021678-80021688 0010+00 s=0 e=1 z=0 None .text fpcLy_DeletingMesg__FP11layer_class */ -void fpcLy_DeletingMesg(layer_class* pLayer) { - pLayer->counts.mDeletingCount++; +void fpcLy_DeletingMesg(layer_class* i_layer) { + i_layer->counts.mDeletingCount++; } /* 80021688-800216A0 0018+00 s=0 e=1 z=0 None .text fpcLy_DeletedMesg__FP11layer_class */ -void fpcLy_DeletedMesg(layer_class* pLayer) { - if (pLayer->counts.mDeletingCount > 0) { - pLayer->counts.mDeletingCount--; +void fpcLy_DeletedMesg(layer_class* i_layer) { + if (i_layer->counts.mDeletingCount > 0) { + i_layer->counts.mDeletingCount--; } } /* 800216A0-800216B4 0014+00 s=0 e=2 z=0 None .text fpcLy_IsCreatingMesg__FP11layer_class */ -BOOL fpcLy_IsCreatingMesg(layer_class* pLayer) { - return pLayer->counts.mCreatingCount > 0; +BOOL fpcLy_IsCreatingMesg(layer_class* i_layer) { + return i_layer->counts.mCreatingCount > 0; } /* 800216B4-800216C4 0010+00 s=0 e=2 z=0 None .text fpcLy_CreatingMesg__FP11layer_class */ -void fpcLy_CreatingMesg(layer_class* pLayer) { - pLayer->counts.mCreatingCount++; +void fpcLy_CreatingMesg(layer_class* i_layer) { + i_layer->counts.mCreatingCount++; } /* 800216C4-800216DC 0018+00 s=0 e=2 z=0 None .text fpcLy_CreatedMesg__FP11layer_class */ -void fpcLy_CreatedMesg(layer_class* pLayer) { - if (pLayer->counts.mCreatingCount > 0) { - pLayer->counts.mCreatingCount--; +void fpcLy_CreatedMesg(layer_class* i_layer) { + if (i_layer->counts.mCreatingCount > 0) { + i_layer->counts.mCreatingCount--; } } @@ -102,48 +102,48 @@ layer_class* fpcLy_RootLayer(void) { static layer_class* l_fpcLy_CurrLayer_p; /* 800216EC-800216F4 0008+00 s=1 e=13 z=0 None .text fpcLy_SetCurrentLayer__FP11layer_class */ -void fpcLy_SetCurrentLayer(layer_class* pLayer) { - l_fpcLy_CurrLayer_p = pLayer; +void fpcLy_SetCurrentLayer(layer_class* i_layer) { + l_fpcLy_CurrLayer_p = i_layer; } /* 800216F4-800216FC 0008+00 s=1 e=21 z=0 None .text fpcLy_CurrentLayer__Fv */ -layer_class* fpcLy_CurrentLayer(void) { +layer_class* fpcLy_CurrentLayer() { return l_fpcLy_CurrLayer_p; } /* 800216FC-8002174C 0050+00 s=1 e=0 z=0 None .text fpcLy_Search__FUi */ -layer_class* fpcLy_Search(unsigned int id) { - layer_class* iVar1 = fpcLy_RootLayer(); - while (iVar1 != NULL) { - if (iVar1->mLayerID == id) { - return iVar1; +layer_class* fpcLy_Search(unsigned int i_id) { + layer_class* layer_p = fpcLy_RootLayer(); + while (layer_p != NULL) { + if (layer_p->mLayerID == i_id) { + return layer_p; } - iVar1 = (layer_class*)iVar1->mNode.mpNextNode; + layer_p = (layer_class*)layer_p->mNode.mpNextNode; } return NULL; } /* 8002174C-800217BC 0070+00 s=0 e=5 z=0 None .text fpcLy_Layer__FUi */ -layer_class* fpcLy_Layer(unsigned int id) { - if (id == 0 || fpcLy_RootLayer()->mLayerID == id) { +layer_class* fpcLy_Layer(unsigned int i_id) { + if (i_id == 0 || fpcLy_RootLayer()->mLayerID == i_id) { return fpcLy_RootLayer(); - } else if (id == ~2 || fpcLy_CurrentLayer()->mLayerID == id) { + } else if (i_id == ~2 || fpcLy_CurrentLayer()->mLayerID == i_id) { return fpcLy_CurrentLayer(); } else { - return fpcLy_Search(id); + return fpcLy_Search(i_id); } } /* 800217BC-800217E8 002C+00 s=1 e=0 z=0 None .text fpcLy_Regist__FP11layer_class */ -void fpcLy_Regist(layer_class* pLayer) { - cLs_Addition(&l_fpcLy_LayerList, (node_class*)pLayer); +void fpcLy_Regist(layer_class* i_layer) { + cLs_Addition(&l_fpcLy_LayerList, (node_class*)i_layer); } /* 800217E8-8002189C 00B4+00 s=0 e=1 z=0 None .text fpcLy_Delete__FP11layer_class */ -s32 fpcLy_Delete(layer_class* pLayer) { - if (pLayer->mNodeListTree.mpLists->mSize == 0 && pLayer->mCancelList.mSize == 0) { - cLs_SingleCut((node_class*)pLayer); - *pLayer = l_fpcLy_Crear; +s32 fpcLy_Delete(layer_class* i_layer) { + if (i_layer->mNodeListTree.mpLists->mSize == 0 && i_layer->mCancelList.mSize == 0) { + cLs_SingleCut((node_class*)i_layer); + *i_layer = l_fpcLy_Crear; return 1; } else { return 0; @@ -151,30 +151,30 @@ s32 fpcLy_Delete(layer_class* pLayer) { } /* 8002189C-800218C8 002C+00 s=0 e=1 z=0 None .text fpcLy_Cancel__FP11layer_class */ -void fpcLy_Cancel(layer_class* pLayer) { - fpcMtdIt_Method(&pLayer->mCancelList, (fpcMtdIt_MethodFunc)fpcLy_CancelMethod); +void fpcLy_Cancel(layer_class* i_layer) { + fpcMtdIt_Method(&i_layer->mCancelList, (fpcMtdIt_MethodFunc)fpcLy_CancelMethod); } /* 800218C8-80021A00 0138+00 s=0 e=2 z=0 None .text * fpcLy_Create__FP11layer_classPvP15node_list_classi */ -void fpcLy_Create(layer_class* pLayer, void* pPcNode, node_list_class* pLists, int listNum) { +void fpcLy_Create(layer_class* i_layer, void* i_node, node_list_class* i_nodeList, int i_numLists) { void* pvVar1; s32 iVar2; static int IsInitOfLayerList = 1; static int layer_id = 0; - *pLayer = l_fpcLy_Crear; - cNd_Create((node_class*)pLayer, NULL); - pLayer->mLayerID = layer_id++; - pLayer->mpPcNode = static_cast(pPcNode); - if (IsInitOfLayerList == 0x1) { - IsInitOfLayerList = 0x0; + *i_layer = l_fpcLy_Crear; + cNd_Create((node_class*)i_layer, NULL); + i_layer->mLayerID = layer_id++; + i_layer->mpPcNode = static_cast(i_node); + if (IsInitOfLayerList == 1) { + IsInitOfLayerList = 0; cLs_Create(&l_fpcLy_LayerList); - fpcLy_SetCurrentLayer(pLayer); + fpcLy_SetCurrentLayer(i_layer); } - (pLayer->mNodeListTree).mpLists = pLists; - (pLayer->mNodeListTree).mNumLists = listNum; - cTr_Create(&pLayer->mNodeListTree, (pLayer->mNodeListTree).mpLists, - (pLayer->mNodeListTree).mNumLists); - fpcLy_Regist(pLayer); + (i_layer->mNodeListTree).mpLists = i_nodeList; + (i_layer->mNodeListTree).mNumLists = i_numLists; + cTr_Create(&i_layer->mNodeListTree, (i_layer->mNodeListTree).mpLists, + (i_layer->mNodeListTree).mNumLists); + fpcLy_Regist(i_layer); } diff --git a/src/f_pc/f_pc_layer_iter.cpp b/src/f_pc/f_pc_layer_iter.cpp index 44f47edaa9..6e9aaa7974 100644 --- a/src/f_pc/f_pc_layer_iter.cpp +++ b/src/f_pc/f_pc_layer_iter.cpp @@ -10,39 +10,39 @@ /* 80021B88-80021BC0 0038+00 s=1 e=4 z=0 None .text fpcLyIt_OnlyHere__FP11layer_classPFPvPv_iPv */ -s32 fpcLyIt_OnlyHere(layer_class* pLayer, fpcLyIt_OnlyHereFunc pFunc, void* pUserData) { +s32 fpcLyIt_OnlyHere(layer_class* i_layer, fpcLyIt_OnlyHereFunc i_func, void* i_data) { layer_iter lIter; - lIter.mpFunc = pFunc; - lIter.mpUserData = pUserData; - return cTrIt_Method(&pLayer->mNodeListTree, (cNdIt_MethodFunc)cTgIt_MethodCall, &lIter); + lIter.mpFunc = i_func; + lIter.mpUserData = i_data; + return cTrIt_Method(&i_layer->mNodeListTree, (cNdIt_MethodFunc)cTgIt_MethodCall, &lIter); } /* 80021BC0-80021C28 0068+00 s=0 e=1 z=0 None .text fpcLyIt_OnlyHereLY__FP11layer_classPFPvPv_iPv */ -s32 fpcLyIt_OnlyHereLY(layer_class* pLayer, fpcLyIt_OnlyHereFunc pFunc, void* pUserData) { +s32 fpcLyIt_OnlyHereLY(layer_class* i_layer, fpcLyIt_OnlyHereFunc i_func, void* i_data) { s32 result; layer_class* currentLayer = fpcLy_CurrentLayer(); - fpcLy_SetCurrentLayer(pLayer); - result = fpcLyIt_OnlyHere(pLayer, pFunc, pUserData); + fpcLy_SetCurrentLayer(i_layer); + result = fpcLyIt_OnlyHere(i_layer, i_func, i_data); fpcLy_SetCurrentLayer(currentLayer); return result; } /* 80021C28-80021C60 0038+00 s=0 e=3 z=0 None .text fpcLyIt_Judge__FP11layer_classPFPvPv_PvPv */ -void* fpcLyIt_Judge(layer_class* pLayer, fpcLyIt_JudgeFunc pFunc, void* pUserData) { +void* fpcLyIt_Judge(layer_class* i_layer, fpcLyIt_JudgeFunc i_func, void* i_data) { layer_iter lIter; - lIter.mpFunc = pFunc; - lIter.mpUserData = pUserData; - return cTrIt_Judge(&pLayer->mNodeListTree, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &lIter); + lIter.mpFunc = i_func; + lIter.mpUserData = i_data; + return cTrIt_Judge(&i_layer->mNodeListTree, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &lIter); } /* 80021C60-80021CD4 0074+00 s=0 e=1 z=4 None .text fpcLyIt_AllJudge__FPFPvPv_PvPv */ -void* fpcLyIt_AllJudge(fpcLyIt_JudgeFunc pFunc, void* pUserData) { +void* fpcLyIt_AllJudge(fpcLyIt_JudgeFunc i_func, void* i_data) { layer_iter lIter; layer_class* current; - lIter.mpFunc = pFunc; - lIter.mpUserData = pUserData; + lIter.mpFunc = i_func; + lIter.mpUserData = i_data; current = fpcLy_RootLayer(); while (current != NULL) { diff --git a/src/f_pc/f_pc_layer_tag.cpp b/src/f_pc/f_pc_layer_tag.cpp index bf094a563a..e1600cb485 100644 --- a/src/f_pc/f_pc_layer_tag.cpp +++ b/src/f_pc/f_pc_layer_tag.cpp @@ -7,36 +7,38 @@ /* 80021CD4-80021DCC 00F8+00 s=1 e=1 z=0 None .text * fpcLyTg_ToQueue__FP26layer_management_tag_classUiUsUs */ -s32 fpcLyTg_ToQueue(layer_management_tag_class* pTag, unsigned int layerID, u16 listID, - u16 listPrio) { - if (pTag->mpLayer == NULL && layerID == -1) { +s32 fpcLyTg_ToQueue(layer_management_tag_class* i_LyTag, unsigned int i_layerID, u16 i_listID, + u16 i_listPriority) { + if (i_LyTag->mpLayer == NULL && i_layerID == -1) { return 0; } else { - // ghidra says layerID is unsigned? - if (layerID != -1 && layerID != -3 && pTag->mpLayer->mLayerID != layerID) { - pTag->mpLayer = fpcLy_Layer(layerID); + // ghidra says i_layerID is unsigned? + if (i_layerID != -1 && i_layerID != -3 && i_LyTag->mpLayer->mLayerID != i_layerID) { + i_LyTag->mpLayer = fpcLy_Layer(i_layerID); } - if (layerID == -1 || layerID == -3) { - s32 tmp = fpcLy_ToQueue(pTag->mpLayer, listID, &pTag->mCreateTag); - if (tmp != 0x0) { - pTag->mNodeListID = listID; - pTag->mNodeListIdx = tmp - 1; + if (i_layerID == -1 || i_layerID == -3) { + s32 tmp = fpcLy_ToQueue(i_LyTag->mpLayer, i_listID, &i_LyTag->mCreateTag); + if (tmp != 0) { + i_LyTag->mNodeListID = i_listID; + i_LyTag->mNodeListIdx = tmp - 1; return 1; } - } else if (fpcLy_IntoQueue(pTag->mpLayer, listID, &pTag->mCreateTag, listPrio) != 0x0) { - pTag->mNodeListID = listID; - pTag->mNodeListIdx = listPrio; + } else if (fpcLy_IntoQueue(i_LyTag->mpLayer, i_listID, &i_LyTag->mCreateTag, + i_listPriority) != 0) + { + i_LyTag->mNodeListID = i_listID; + i_LyTag->mNodeListIdx = i_listPriority; return 1; } return 0; } } -s32 fpcLyTg_QueueTo(layer_management_tag_class* pTag) { - if (fpcLy_QueueTo(pTag->mpLayer, &pTag->mCreateTag) == 1) { - pTag->mpLayer = NULL; - pTag->mNodeListID = 0xFFFF; - pTag->mNodeListIdx = 0xFFFF; +s32 fpcLyTg_QueueTo(layer_management_tag_class* i_LyTag) { + if (fpcLy_QueueTo(i_LyTag->mpLayer, &i_LyTag->mCreateTag) == 1) { + i_LyTag->mpLayer = NULL; + i_LyTag->mNodeListID = 0xFFFF; + i_LyTag->mNodeListIdx = 0xFFFF; return 1; } else { return 0; @@ -45,33 +47,32 @@ s32 fpcLyTg_QueueTo(layer_management_tag_class* pTag) { /* 80021E2C-80021EB0 0084+00 s=0 e=1 z=0 None .text * fpcLyTg_Move__FP26layer_management_tag_classUiUsUs */ -s32 fpcLyTg_Move(layer_management_tag_class* pTag, unsigned int layerID, u16 listID, u16 listPrio) { - layer_class* layer = fpcLy_Layer(layerID); +s32 fpcLyTg_Move(layer_management_tag_class* i_LyTag, unsigned int i_layerID, u16 i_listID, + u16 i_listPriority) { + layer_class* layer = fpcLy_Layer(i_layerID); if (layer == NULL) { return 0; - } else if (fpcLyTg_QueueTo(pTag) == 0x1) { - pTag->mpLayer = layer; - return fpcLyTg_ToQueue(pTag, layerID, listID, listPrio); + } else if (fpcLyTg_QueueTo(i_LyTag) == 0x1) { + i_LyTag->mpLayer = layer; + return fpcLyTg_ToQueue(i_LyTag, i_layerID, i_listID, i_listPriority); } else { return 0; } } -/* ############################################################################################## */ -/* 803A3A00-803A3A20 001C+04 s=1 e=0 z=0 None .data crear$2239 */ -layer_management_tag_class crear = { - NULL, NULL, NULL, NULL, 0, NULL, 0xFFFF, 0xFFFF, -}; - /* 80021EB0-80021F64 00B4+00 s=0 e=1 z=0 None .text * fpcLyTg_Init__FP26layer_management_tag_classUiPv */ -s32 fpcLyTg_Init(layer_management_tag_class* pTag, unsigned int param2, void* param3) { +s32 fpcLyTg_Init(layer_management_tag_class* i_LyTag, unsigned int i_id, void* i_data) { + static layer_management_tag_class crear = { + NULL, NULL, NULL, NULL, 0, NULL, 0xFFFF, 0xFFFF, + }; + layer_class* layer; - *pTag = crear; - cTg_Create(&pTag->mCreateTag, param3); - layer = fpcLy_Layer(param2); + *i_LyTag = crear; + cTg_Create(&i_LyTag->mCreateTag, i_data); + layer = fpcLy_Layer(i_id); if (layer != NULL) { - pTag->mpLayer = layer; + i_LyTag->mpLayer = layer; return 1; } else { return 0; diff --git a/src/f_pc/f_pc_leaf.cpp b/src/f_pc/f_pc_leaf.cpp index 37ba0bb318..3eb49afbce 100644 --- a/src/f_pc/f_pc_leaf.cpp +++ b/src/f_pc/f_pc_leaf.cpp @@ -6,39 +6,39 @@ #include "f_pc/f_pc_leaf.h" /* 80021A00-80021A24 0024+00 s=0 e=4 z=2 None .text fpcLf_GetPriority__FPC14leafdraw_class */ -s16 fpcLf_GetPriority(const leafdraw_class* pLeaf) { - return fpcDwPi_Get(&pLeaf->mDwPi); +s16 fpcLf_GetPriority(const leafdraw_class* i_leaf) { + return fpcDwPi_Get(&i_leaf->mDwPi); } /* 80021A24-80021A48 0024+00 s=1 e=6 z=0 None .text fpcLf_DrawMethod__FP21leafdraw_method_classPv */ -s32 fpcLf_DrawMethod(leafdraw_method_class* pMthd, void* pUserData) { - return fpcMtd_Method(pMthd->mpDrawFunc, pUserData); +s32 fpcLf_DrawMethod(leafdraw_method_class* i_methods, void* i_data) { + return fpcMtd_Method(i_methods->mpDrawFunc, i_data); } /* 80021A48-80021A80 0038+00 s=1 e=0 z=0 None .text fpcLf_Draw__FP14leafdraw_class */ -s32 fpcLf_Draw(leafdraw_class* pLeaf) { +s32 fpcLf_Draw(leafdraw_class* i_leaf) { s32 ret = 0; - if (pLeaf->mbUnk0 == 0) - ret = fpcLf_DrawMethod(pLeaf->mpDrawMtd, pLeaf); + if (i_leaf->mbUnk0 == 0) + ret = fpcLf_DrawMethod(i_leaf->mpDrawMtd, i_leaf); return ret; } /* 80021A80-80021AA8 0028+00 s=1 e=0 z=0 None .text fpcLf_Execute__FP14leafdraw_class */ -s32 fpcLf_Execute(leafdraw_class* pLeaf) { - return fpcMtd_Execute(&pLeaf->mpDrawMtd->mBase, pLeaf); +s32 fpcLf_Execute(leafdraw_class* i_leaf) { + return fpcMtd_Execute(&i_leaf->mpDrawMtd->mBase, i_leaf); } /* 80021AA8-80021AD0 0028+00 s=1 e=0 z=0 None .text fpcLf_IsDelete__FP14leafdraw_class */ -s32 fpcLf_IsDelete(leafdraw_class* pLeaf) { - return fpcMtd_IsDelete(&pLeaf->mpDrawMtd->mBase, pLeaf); +s32 fpcLf_IsDelete(leafdraw_class* i_leaf) { + return fpcMtd_IsDelete(&i_leaf->mpDrawMtd->mBase, i_leaf); } /* 80021AD0-80021B14 0044+00 s=1 e=0 z=0 None .text fpcLf_Delete__FP14leafdraw_class */ -s32 fpcLf_Delete(leafdraw_class* pLeaf) { - s32 ret = fpcMtd_Delete(&pLeaf->mpDrawMtd->mBase, pLeaf); +s32 fpcLf_Delete(leafdraw_class* i_leaf) { + s32 ret = fpcMtd_Delete(&i_leaf->mpDrawMtd->mBase, i_leaf); if (ret == 1) { - pLeaf->mBase.mSubType = 0; + i_leaf->mBase.mSubType = 0; } return ret; } @@ -48,16 +48,16 @@ s32 fpcLf_Delete(leafdraw_class* pLeaf) { int g_fpcLf_type; /* 80021B14-80021B88 0074+00 s=1 e=0 z=0 None .text fpcLf_Create__FP14leafdraw_class */ -s32 fpcLf_Create(leafdraw_class* pLeaf) { +s32 fpcLf_Create(leafdraw_class* i_leaf) { leaf_process_profile_definition* profDef; - if (pLeaf->mBase.mInitState == 0) { - profDef = (leaf_process_profile_definition*)pLeaf->mBase.mpProf; - pLeaf->mpDrawMtd = profDef->mSubMtd; - pLeaf->mBase.mSubType = fpcBs_MakeOfType(&g_fpcLf_type); - fpcDwPi_Init(&pLeaf->mDwPi, profDef->mPriority); - pLeaf->mbUnk0 = 0; + if (i_leaf->mBase.mInitState == 0) { + profDef = (leaf_process_profile_definition*)i_leaf->mBase.mpProf; + i_leaf->mpDrawMtd = profDef->mSubMtd; + i_leaf->mBase.mSubType = fpcBs_MakeOfType(&g_fpcLf_type); + fpcDwPi_Init(&i_leaf->mDwPi, profDef->mPriority); + i_leaf->mbUnk0 = 0; } - return fpcMtd_Create(&pLeaf->mpDrawMtd->mBase, pLeaf); + return fpcMtd_Create(&i_leaf->mpDrawMtd->mBase, i_leaf); } /* ############################################################################################## */ diff --git a/src/f_pc/f_pc_line.cpp b/src/f_pc/f_pc_line.cpp index b5e0397b33..da0d20a41e 100644 --- a/src/f_pc/f_pc_line.cpp +++ b/src/f_pc/f_pc_line.cpp @@ -13,7 +13,7 @@ static node_list_class l_fpcLn_Line[16]; /* 80021F64-80021FB8 0054+00 s=0 e=1 z=0 None .text fpcLn_Create__Fv */ -void fpcLn_Create(void) { +void fpcLn_Create() { s32 i = ARRAY_SIZE(l_fpcLn_Line); node_list_class* pLine = l_fpcLn_Line; while (i-- > 0) diff --git a/src/f_pc/f_pc_line_iter.cpp b/src/f_pc/f_pc_line_iter.cpp index ce6f02b5ff..faf6217720 100644 --- a/src/f_pc/f_pc_line_iter.cpp +++ b/src/f_pc/f_pc_line_iter.cpp @@ -14,22 +14,22 @@ /* 800236C0-80023728 0068+00 s=1 e=0 z=0 None .text * fpcLnIt_MethodCall__FP16create_tag_classP13method_filter */ -static s32 fpcLnIt_MethodCall(create_tag_class* pTag, method_filter* pFilter) { - layer_class* pLayer = static_cast(pTag->mpTagData)->mLyTg.mpLayer; +static s32 fpcLnIt_MethodCall(create_tag_class* i_createTag, method_filter* i_filter) { + layer_class* pLayer = static_cast(i_createTag->mpTagData)->mLyTg.mpLayer; layer_class* pCurLayer = fpcLy_CurrentLayer(); s32 ret; fpcLy_SetCurrentLayer(pLayer); - ret = cTgIt_MethodCall(pTag, pFilter); + ret = cTgIt_MethodCall(i_createTag, i_filter); fpcLy_SetCurrentLayer(pCurLayer); return ret; } /* 80023728-80023764 003C+00 s=0 e=1 z=0 None .text fpcLnIt_Queue__FPFPvPv_i */ -void fpcLnIt_Queue(fpcLnIt_QueueFunc pFunc) { +void fpcLnIt_Queue(fpcLnIt_QueueFunc i_queueFunc) { method_filter filter; - filter.mpMethodFunc = (cNdIt_MethodFunc)pFunc; + filter.mpMethodFunc = (cNdIt_MethodFunc)i_queueFunc; filter.mpUserData = NULL; cTrIt_Method(&g_fpcLn_Queue, (cNdIt_MethodFunc)fpcLnIt_MethodCall, &filter); } diff --git a/src/f_pc/f_pc_line_tag.cpp b/src/f_pc/f_pc_line_tag.cpp index 29ac73c080..6439b59731 100644 --- a/src/f_pc/f_pc_line_tag.cpp +++ b/src/f_pc/f_pc_line_tag.cpp @@ -8,27 +8,27 @@ /* 800235A8-80023600 0058+00 s=0 e=1 z=0 None .text fpcLnTg_Move__FP8line_tagi */ -s32 fpcLnTg_Move(line_tag* pLineTag, int newLineListID) { - if (pLineTag->mLineListID != newLineListID) { - fpcLnTg_QueueTo(pLineTag); - return fpcLnTg_ToQueue(pLineTag, newLineListID); +s32 fpcLnTg_Move(line_tag* i_lineTag, int i_newListID) { + if (i_lineTag->mLineListID != i_newListID) { + fpcLnTg_QueueTo(i_lineTag); + return fpcLnTg_ToQueue(i_lineTag, i_newListID); } return 1; } /* 80023600-80023634 0034+00 s=1 e=1 z=1 None .text fpcLnTg_QueueTo__FP8line_tag */ -void fpcLnTg_QueueTo(line_tag* pLineTag) { - cTg_SingleCutFromTree(&pLineTag->mBase); - pLineTag->mLineListID = -1; +void fpcLnTg_QueueTo(line_tag* i_lineTag) { + cTg_SingleCutFromTree(&i_lineTag->mBase); + i_lineTag->mLineListID = -1; } /* 80023634-8002368C 0058+00 s=1 e=1 z=1 None .text fpcLnTg_ToQueue__FP8line_tagi */ -s32 fpcLnTg_ToQueue(line_tag* pLineTag, int lineListID) { - s32 ret = cTg_AdditionToTree(&g_fpcLn_Queue, lineListID, &pLineTag->mBase); +s32 fpcLnTg_ToQueue(line_tag* i_lineTag, int lineListID) { + s32 ret = cTg_AdditionToTree(&g_fpcLn_Queue, lineListID, &i_lineTag->mBase); if (ret) { - pLineTag->mLineListID = lineListID; + i_lineTag->mLineListID = lineListID; return 1; } else { return 0; @@ -36,7 +36,7 @@ s32 fpcLnTg_ToQueue(line_tag* pLineTag, int lineListID) { } /* 8002368C-800236C0 0034+00 s=0 e=1 z=0 None .text fpcLnTg_Init__FP8line_tagPv */ -void fpcLnTg_Init(line_tag* pLineTag, void* pData) { - cTg_Create(&pLineTag->mBase, pData); - pLineTag->mLineListID = -1; +void fpcLnTg_Init(line_tag* i_lineTag, void* i_data) { + cTg_Create(&i_lineTag->mBase, i_data); + i_lineTag->mLineListID = -1; } diff --git a/src/f_pc/f_pc_load.cpp b/src/f_pc/f_pc_load.cpp index b309c4849b..74b8c37799 100644 --- a/src/f_pc/f_pc_load.cpp +++ b/src/f_pc/f_pc_load.cpp @@ -5,33 +5,31 @@ #include "f_pc/f_pc_load.h" #include "SSystem/SComponent/c_phase.h" -#include "dol2asm.h" -#include "dolphin/types.h" -extern s32 cDyl_IsLinked(s16 procName); -extern s32 cDyl_Unlink(s16 procName); -extern s32 cDyl_LinkASync(s16 procName); +extern s32 cDyl_IsLinked(s16 i_procName); +extern s32 cDyl_Unlink(s16 i_procName); +extern s32 cDyl_LinkASync(s16 i_procName); /* 80021FB8-80022008 0050+00 s=0 e=1 z=0 None .text fpcLd_Use__Fs */ -BOOL fpcLd_Use(s16 procName) { - if (fpcLd_IsLoaded(procName) == TRUE && fpcLd_Load(procName) == cPhs_COMPLEATE_e) +BOOL fpcLd_Use(s16 i_procName) { + if (fpcLd_IsLoaded(i_procName) == TRUE && fpcLd_Load(i_procName) == cPhs_COMPLEATE_e) return TRUE; return FALSE; } /* 80022008-8002202C 0024+00 s=1 e=0 z=0 None .text fpcLd_IsLoaded__Fs */ -s32 fpcLd_IsLoaded(s16 procName) { - return cDyl_IsLinked((int)procName); +s32 fpcLd_IsLoaded(s16 i_procName) { + return cDyl_IsLinked((int)i_procName); } /* 8002202C-80022050 0024+00 s=0 e=2 z=0 None .text fpcLd_Free__Fs */ -void fpcLd_Free(s16 procName) { - cDyl_Unlink((int)procName); +void fpcLd_Free(s16 i_procName) { + cDyl_Unlink((int)i_procName); } /* 80022050-800220A0 0050+00 s=1 e=1 z=0 None .text fpcLd_Load__Fs */ -s32 fpcLd_Load(s16 procName) { - s32 phase = cDyl_LinkASync((int)procName); +s32 fpcLd_Load(s16 i_procName) { + s32 phase = cDyl_LinkASync((int)i_procName); switch (phase) { case cPhs_COMPLEATE_e: diff --git a/src/f_pc/f_pc_manager.cpp b/src/f_pc/f_pc_manager.cpp index 791ea1a2c2..d8d6f12033 100644 --- a/src/f_pc/f_pc_manager.cpp +++ b/src/f_pc/f_pc_manager.cpp @@ -3,8 +3,9 @@ * Framework - Process Manager */ -#include "d/d_error_msg.h" #include "f_pc/f_pc_manager.h" +#include "SSystem/SComponent/c_API_graphic.h" +#include "d/d_error_msg.h" #include "f_pc/f_pc_base.h" #include "f_pc/f_pc_create_iter.h" #include "f_pc/f_pc_creator.h" @@ -24,26 +25,25 @@ #include "f_pc/f_pc_pause.h" #include "f_pc/f_pc_priority.h" #include "f_pc/f_pc_profile.h" -#include "SSystem/SComponent/c_API_graphic.h" /* 800220A0-800220C0 0020+00 s=1 e=1 z=0 None .text fpcM_Draw__FPv */ -void fpcM_Draw(void* pProc) { - fpcDw_Execute((base_process_class*)pProc); +void fpcM_Draw(void* i_proc) { + fpcDw_Execute((base_process_class*)i_proc); } /* 800220C0-800220F8 0038+00 s=1 e=0 z=0 None .text fpcM_DrawIterater__FPFPvPv_i */ -s32 fpcM_DrawIterater(fpcM_DrawIteraterFunc pFunc) { - return fpcLyIt_OnlyHere(fpcLy_RootLayer(), (fpcLyIt_OnlyHereFunc)pFunc, NULL); +s32 fpcM_DrawIterater(fpcM_DrawIteraterFunc i_drawIterFunc) { + return fpcLyIt_OnlyHere(fpcLy_RootLayer(), (fpcLyIt_OnlyHereFunc)i_drawIterFunc, NULL); } /* 800220F8-80022118 0020+00 s=1 e=0 z=1 None .text fpcM_Execute__FPv */ -s32 fpcM_Execute(void* pProc) { - return fpcEx_Execute((base_process_class*)pProc); +s32 fpcM_Execute(void* i_proc) { + return fpcEx_Execute((base_process_class*)i_proc); } /* 80022118-80022138 0020+00 s=0 e=7 z=0 None .text fpcM_Delete__FPv */ -s32 fpcM_Delete(void* pProc) { - return fpcDt_Delete((base_process_class*)pProc); +s32 fpcM_Delete(void* i_proc) { + return fpcDt_Delete((base_process_class*)i_proc); } /* 80022138-80022158 0020+00 s=0 e=6 z=43 None .text fpcM_IsCreating__FUi */ @@ -52,7 +52,7 @@ BOOL fpcM_IsCreating(unsigned int pID) { } /* 80022158-800222B8 0160+00 s=0 e=1 z=0 None .text fpcM_Management__FPFv_vPFv_v */ -void fpcM_Management(fpcM_ManagementFunc func1, fpcM_ManagementFunc func2) { +void fpcM_Management(fpcM_ManagementFunc i_mngFunc1, fpcM_ManagementFunc i_mngFunc2) { MtxInit(); dComIfGd_peekZdata(); @@ -77,15 +77,15 @@ void fpcM_Management(fpcM_ManagementFunc func1, fpcM_ManagementFunc func2) { fpcPi_Handler(); fpcCt_Handler(); - if (func1 != NULL) { - func1(); + if (i_mngFunc1 != NULL) { + i_mngFunc1(); } fpcEx_Handler((fpcLnIt_QueueFunc)fpcM_Execute); fpcDw_Handler((fpcDw_HandlerFuncFunc)fpcM_DrawIterater, (fpcDw_HandlerFunc)fpcM_Draw); - if (func2 != NULL) { - func2(); + if (i_mngFunc2 != NULL) { + i_mngFunc2(); } dComIfGp_drawSimpleModel(); @@ -98,48 +98,44 @@ void fpcM_Management(fpcM_ManagementFunc func1, fpcM_ManagementFunc func2) { } } -/* ############################################################################################## */ -/* 803F4DB0-803F4DDC 002C+00 s=1 e=0 z=0 None .bss rootlayer$3716 */ -static layer_class rootlayer; - -/* 803F4DDC-803F4E58 0078+04 s=1 e=0 z=0 None .bss queue$3717 */ -static node_list_class queue[10]; - /* 800222B8-800222F4 003C+00 s=0 e=1 z=0 None .text fpcM_Init__Fv */ -void fpcM_Init(void) { +void fpcM_Init() { + static layer_class rootlayer; + static node_list_class queue[10]; + fpcLy_Create(&rootlayer, NULL, queue, 10); fpcLn_Create(); } /* 800222F4-80022348 0054+00 s=0 e=3 z=0 None .text fpcM_FastCreate__FsPFPv_iPvPv */ -base_process_class* fpcM_FastCreate(s16 pProcTypeID, FastCreateReqFunc param_2, void* param_3, - void* pData) { - return fpcFCtRq_Request(fpcLy_CurrentLayer(), pProcTypeID, (fstCreateFunc)param_2, param_3, - pData); +base_process_class* fpcM_FastCreate(s16 i_procTypeID, FastCreateReqFunc i_createReqFunc, + void* i_createData, void* i_data) { + return fpcFCtRq_Request(fpcLy_CurrentLayer(), i_procTypeID, (fstCreateFunc)i_createReqFunc, + i_createData, i_data); } /* 80022348-8002236C 0024+00 s=0 e=1 z=0 None .text fpcM_IsPause__FPvUc */ -s32 fpcM_IsPause(void* pProc, u8 param_2) { - return fpcPause_IsEnable((base_process_class*)pProc, param_2 & 0xFF); +s32 fpcM_IsPause(void* i_proc, u8 i_flag) { + return fpcPause_IsEnable((base_process_class*)i_proc, i_flag & 0xFF); } /* 8002236C-80022390 0024+00 s=0 e=1 z=0 None .text fpcM_PauseEnable__FPvUc */ -void fpcM_PauseEnable(void* pProc, u8 param_2) { - fpcPause_Enable((process_node_class*)pProc, param_2 & 0xFF); +void fpcM_PauseEnable(void* i_proc, u8 i_flag) { + fpcPause_Enable((process_node_class*)i_proc, i_flag & 0xFF); } /* 80022390-800223B4 0024+00 s=0 e=1 z=0 None .text fpcM_PauseDisable__FPvUc */ -void fpcM_PauseDisable(void* pProc, u8 param_2) { - fpcPause_Disable((process_node_class*)pProc, param_2 & 0xFF); +void fpcM_PauseDisable(void* i_proc, u8 i_flag) { + fpcPause_Disable((process_node_class*)i_proc, i_flag & 0xFF); } /* 800223B4-80022428 0074+00 s=0 e=1 z=0 None .text fpcM_JudgeInLayer__FUiPFPvPv_PvPv */ -void* fpcM_JudgeInLayer(unsigned int pLayerID, fpcCtIt_JudgeFunc pFunc, void* pUserData) { - layer_class* layer = fpcLy_Layer(pLayerID); +void* fpcM_JudgeInLayer(unsigned int i_layerID, fpcCtIt_JudgeFunc i_judgeFunc, void* i_data) { + layer_class* layer = fpcLy_Layer(i_layerID); if (layer != NULL) { - void* ret = fpcCtIt_JudgeInLayer(pLayerID, pFunc, pUserData); + void* ret = fpcCtIt_JudgeInLayer(i_layerID, i_judgeFunc, i_data); if (ret == NULL) { - ret = fpcLyIt_Judge(layer, pFunc, pUserData); + ret = fpcLyIt_Judge(layer, i_judgeFunc, i_data); } return ret; } else { diff --git a/src/f_pc/f_pc_method.cpp b/src/f_pc/f_pc_method.cpp index bb4fc1aa0d..e4e7e2a64f 100644 --- a/src/f_pc/f_pc_method.cpp +++ b/src/f_pc/f_pc_method.cpp @@ -6,33 +6,33 @@ #include "f_pc/f_pc_method.h" /* 80022428-80022460 0038+00 s=4 e=6 z=0 None .text fpcMtd_Method__FPFPv_iPv */ -s32 fpcMtd_Method(process_method_func pFunc, void* pUserData) { - if (pFunc != NULL) - return pFunc(pUserData); +s32 fpcMtd_Method(process_method_func i_methodFunc, void* i_data) { + if (i_methodFunc != NULL) + return i_methodFunc(i_data); else return 1; } /* 80022460-80022484 0024+00 s=0 e=10 z=0 None .text fpcMtd_Execute__FP20process_method_classPv */ -s32 fpcMtd_Execute(process_method_class* pMthd, void* pUserData) { - return fpcMtd_Method(pMthd->mpExecuteFunc, pUserData); +s32 fpcMtd_Execute(process_method_class* i_methods, void* i_data) { + return fpcMtd_Method(i_methods->mpExecuteFunc, i_data); } /* 80022484-800224A8 0024+00 s=0 e=10 z=0 None .text fpcMtd_IsDelete__FP20process_method_classPv */ -s32 fpcMtd_IsDelete(process_method_class* pMthd, void* pUserData) { - return fpcMtd_Method(pMthd->mpIsDeleteFunc, pUserData); +s32 fpcMtd_IsDelete(process_method_class* i_methods, void* i_data) { + return fpcMtd_Method(i_methods->mpIsDeleteFunc, i_data); } /* 800224A8-800224CC 0024+00 s=0 e=10 z=0 None .text fpcMtd_Delete__FP20process_method_classPv */ -s32 fpcMtd_Delete(process_method_class* pMthd, void* pUserData) { - return fpcMtd_Method(pMthd->mpDeleteFunc, pUserData); +s32 fpcMtd_Delete(process_method_class* i_methods, void* i_data) { + return fpcMtd_Method(i_methods->mpDeleteFunc, i_data); } /* 800224CC-800224F0 0024+00 s=0 e=10 z=0 None .text fpcMtd_Create__FP20process_method_classPv */ -s32 fpcMtd_Create(process_method_class* pMthd, void* pUserData) { - return fpcMtd_Method(pMthd->mpCreateFunc, pUserData); +s32 fpcMtd_Create(process_method_class* i_methods, void* i_data) { + return fpcMtd_Method(i_methods->mpCreateFunc, i_data); } diff --git a/src/f_pc/f_pc_method_iter.cpp b/src/f_pc/f_pc_method_iter.cpp index 529eb7899a..8b63262683 100644 --- a/src/f_pc/f_pc_method_iter.cpp +++ b/src/f_pc/f_pc_method_iter.cpp @@ -7,6 +7,6 @@ /* 80023764-80023788 0024+00 s=0 e=1 z=0 None .text fpcMtdIt_Method__FP15node_list_classPFPv_i */ -void fpcMtdIt_Method(node_list_class* pList, fpcMtdIt_MethodFunc pMethod) { - cLsIt_Method(pList, (cNdIt_MethodFunc)pMethod, NULL); +void fpcMtdIt_Method(node_list_class* i_nodeList, fpcMtdIt_MethodFunc i_methods) { + cLsIt_Method(i_nodeList, (cNdIt_MethodFunc)i_methods, NULL); } diff --git a/src/f_pc/f_pc_method_tag.cpp b/src/f_pc/f_pc_method_tag.cpp index f01c94309b..7780a735d5 100644 --- a/src/f_pc/f_pc_method_tag.cpp +++ b/src/f_pc/f_pc_method_tag.cpp @@ -7,27 +7,27 @@ /* 80023788-800237B8 0030+00 s=0 e=1 z=0 None .text fpcMtdTg_Do__FP24process_method_tag_class */ -s32 fpcMtdTg_Do(process_method_tag_class* pMthd) { - return pMthd->mpFunc(pMthd->mpMthdData); +s32 fpcMtdTg_Do(process_method_tag_class* i_methodTag) { + return i_methodTag->mpFunc(i_methodTag->mpMthdData); } /* 800237B8-800237D8 0020+00 s=0 e=1 z=0 None .text * fpcMtdTg_ToMethodQ__FP15node_list_classP24process_method_tag_class */ -s32 fpcMtdTg_ToMethodQ(node_list_class* pList, process_method_tag_class* pMthd) { - return cTg_Addition(pList, &pMthd->mCreateTag); +s32 fpcMtdTg_ToMethodQ(node_list_class* pList, process_method_tag_class* i_methodTag) { + return cTg_Addition(pList, &i_methodTag->mCreateTag); } /* 800237D8-800237F8 0020+00 s=0 e=1 z=0 None .text * fpcMtdTg_MethodQTo__FP24process_method_tag_class */ -void fpcMtdTg_MethodQTo(process_method_tag_class* pMthd) { - cTg_SingleCut(&pMthd->mCreateTag); +void fpcMtdTg_MethodQTo(process_method_tag_class* i_methodTag) { + cTg_SingleCut(&i_methodTag->mCreateTag); } /* 800237F8-80023844 004C+00 s=0 e=3 z=0 None .text * fpcMtdTg_Init__FP24process_method_tag_classPFPv_iPv */ -s32 fpcMtdTg_Init(process_method_tag_class* pMthd, process_method_tag_func pFunc, void* pMthdData) { - cTg_Create(&pMthd->mCreateTag, pMthd); - pMthd->mpFunc = pFunc; - pMthd->mpMthdData = pMthdData; +s32 fpcMtdTg_Init(process_method_tag_class* i_methodTag, process_method_tag_func i_mtdTgFunc, void* i_data) { + cTg_Create(&i_methodTag->mCreateTag, i_methodTag); + i_methodTag->mpFunc = i_mtdTgFunc; + i_methodTag->mpMthdData = i_data; return 1; } diff --git a/src/f_pc/f_pc_node.cpp b/src/f_pc/f_pc_node.cpp index 24a78adcba..e3bcff2d12 100644 --- a/src/f_pc/f_pc_node.cpp +++ b/src/f_pc/f_pc_node.cpp @@ -8,29 +8,29 @@ /* 800224F0-80022514 0024+00 s=1 e=1 z=0 None .text fpcNd_DrawMethod__FP21nodedraw_method_classPv */ -s32 fpcNd_DrawMethod(nodedraw_method_class* pNodeMethod, void* pData) { - return fpcMtd_Method(pNodeMethod->mpDrawFunc, pData); +s32 fpcNd_DrawMethod(nodedraw_method_class* i_nodeMethods, void* i_data) { + return fpcMtd_Method(i_nodeMethods->mpDrawFunc, i_data); } /* 80022514-80022580 006C+00 s=1 e=0 z=0 None .text fpcNd_Draw__FP18process_node_class */ -s32 fpcNd_Draw(process_node_class* pProcNode) { - s32 uVar2 = 0x0; - if (pProcNode->mUnk0 == 0) { - layer_class* uVar1 = fpcLy_CurrentLayer(); - fpcLy_SetCurrentLayer(&pProcNode->mLayer); - uVar2 = fpcNd_DrawMethod(pProcNode->mpNodeMtd, pProcNode); - fpcLy_SetCurrentLayer(uVar1); +s32 fpcNd_Draw(process_node_class* i_procNode) { + s32 ret = 0; + if (i_procNode->mUnk0 == 0) { + layer_class* curLayer_p = fpcLy_CurrentLayer(); + fpcLy_SetCurrentLayer(&i_procNode->mLayer); + ret = fpcNd_DrawMethod(i_procNode->mpNodeMtd, i_procNode); + fpcLy_SetCurrentLayer(curLayer_p); } - return uVar2; + return ret; } /* 80022580-800225DC 005C+00 s=1 e=0 z=0 None .text fpcNd_Execute__FP18process_node_class */ -s32 fpcNd_Execute(process_node_class* pProcNode) { +s32 fpcNd_Execute(process_node_class* i_procNode) { s32 ret; - layer_class* uVar1 = fpcLy_CurrentLayer(); - fpcLy_SetCurrentLayer(&pProcNode->mLayer); - ret = fpcMtd_Execute(&pProcNode->mpNodeMtd->mBase, pProcNode); - fpcLy_SetCurrentLayer(uVar1); + layer_class* curLayer_p = fpcLy_CurrentLayer(); + fpcLy_SetCurrentLayer(&i_procNode->mLayer); + ret = fpcMtd_Execute(&i_procNode->mpNodeMtd->mBase, i_procNode); + fpcLy_SetCurrentLayer(curLayer_p); return ret; } @@ -39,13 +39,13 @@ s32 fpcNd_Execute(process_node_class* pProcNode) { int g_fpcNd_type; /* 800225DC-8002265C 0080+00 s=1 e=0 z=0 None .text fpcNd_IsCreatingFromUnder__FPv */ -void* fpcNd_IsCreatingFromUnder(void* pProcNodeV) { +void* fpcNd_IsCreatingFromUnder(void* i_procNode) { layer_class* layer; - process_node_class* pProcNode = static_cast(pProcNodeV); - if (pProcNode != NULL && - fpcBs_Is_JustOfType(g_fpcNd_type, pProcNode->mBase.mSubType) != FALSE) { + process_node_class* pProcNode = static_cast(i_procNode); + if (pProcNode != NULL && fpcBs_Is_JustOfType(g_fpcNd_type, pProcNode->mBase.mSubType) != FALSE) + { layer = &pProcNode->mLayer; - if (fpcLy_IsCreatingMesg(layer) == 0x0) { + if (fpcLy_IsCreatingMesg(layer) == 0) { return (process_node_class*)fpcLyIt_Judge( layer, (fpcLyIt_JudgeFunc)fpcNd_IsCreatingFromUnder, NULL); } else { @@ -62,8 +62,8 @@ static s32 g_fpcNd_IsCheckOfDeleteTiming = 1; /* 8002265C-8002269C 0040+00 s=0 e=2 z=0 None .text fpcNd_IsDeleteTiming__FP18process_node_class */ -s32 fpcNd_IsDeleteTiming(process_node_class* pProcNode) { - if (g_fpcNd_IsCheckOfDeleteTiming == 0x1 && fpcNd_IsCreatingFromUnder(pProcNode) != NULL) { +s32 fpcNd_IsDeleteTiming(process_node_class* i_procNode) { + if (g_fpcNd_IsCheckOfDeleteTiming == 1 && fpcNd_IsCreatingFromUnder(i_procNode) != NULL) { return 0; } else { return 1; @@ -71,29 +71,29 @@ s32 fpcNd_IsDeleteTiming(process_node_class* pProcNode) { } /* 8002269C-800226C4 0028+00 s=1 e=0 z=0 None .text fpcNd_IsDelete__FP18process_node_class */ -s32 fpcNd_IsDelete(process_node_class* pProcNode) { - return fpcMtd_IsDelete(&pProcNode->mpNodeMtd->mBase, pProcNode); +s32 fpcNd_IsDelete(process_node_class* i_procNode) { + return fpcMtd_IsDelete(&i_procNode->mpNodeMtd->mBase, i_procNode); } /* 800226C4-80022728 0064+00 s=1 e=0 z=0 None .text fpcNd_Delete__FP18process_node_class */ -s32 fpcNd_Delete(process_node_class* pProcNode) { - if ((fpcLy_IsDeletingMesg(&pProcNode->mLayer) == 0x0) && - fpcMtd_Delete(&pProcNode->mpNodeMtd->mBase, pProcNode) == 0x1) { - pProcNode->mBase.mSubType = 0x0; - return fpcLy_Delete(&pProcNode->mLayer); +s32 fpcNd_Delete(process_node_class* i_procNode) { + if ((fpcLy_IsDeletingMesg(&i_procNode->mLayer) == 0) && + fpcMtd_Delete(&i_procNode->mpNodeMtd->mBase, i_procNode) == 1) + { + i_procNode->mBase.mSubType = 0; + return fpcLy_Delete(&i_procNode->mLayer); } else { return 0; } } - /* 80022728-800227C4 009C+00 s=1 e=0 z=0 None .text fpcNd_Create__FP18process_node_class */ -s32 fpcNd_Create(process_node_class* pProcNode1) { +s32 fpcNd_Create(process_node_class* i_procNode) { // this cast looks like a fake match, but it doesn't match without the cast, naive approach // swaps r31 and r30 most likely it gets casted to another unknown struct - process_node_class* pProcNode = (process_node_class*)pProcNode1; - layer_class* uVar2; - s32 uVar3; + process_node_class* pProcNode = (process_node_class*)i_procNode; + layer_class* curLayer_p; + s32 ret; if (pProcNode->mBase.mInitState == 0) { node_process_profile_definition* pProcProfileDef = (node_process_profile_definition*)pProcNode->mBase.mpProf; @@ -102,19 +102,16 @@ s32 fpcNd_Create(process_node_class* pProcNode1) { fpcLy_Create(&pProcNode->mLayer, pProcNode, pProcNode->mLayerNodeLists, 0x10); pProcNode->mUnk0 = 0; } - uVar2 = fpcLy_CurrentLayer(); + curLayer_p = fpcLy_CurrentLayer(); fpcLy_SetCurrentLayer(&pProcNode->mLayer); - uVar3 = fpcMtd_Create(&pProcNode->mpNodeMtd->mBase, pProcNode); - fpcLy_SetCurrentLayer(uVar2); - return uVar3; + ret = fpcMtd_Create(&pProcNode->mpNodeMtd->mBase, pProcNode); + fpcLy_SetCurrentLayer(curLayer_p); + return ret; } /* ############################################################################################## */ /* 803A3A20-803A3A38 0014+04 s=0 e=9 z=0 None .data g_fpcNd_Method */ nodedraw_method_class g_fpcNd_Method = { - (process_method_func)fpcNd_Create, - (process_method_func)fpcNd_Delete, - (process_method_func)fpcNd_Execute, - (process_method_func)fpcNd_IsDelete, - (process_method_func)fpcNd_Draw -}; + (process_method_func)fpcNd_Create, (process_method_func)fpcNd_Delete, + (process_method_func)fpcNd_Execute, (process_method_func)fpcNd_IsDelete, + (process_method_func)fpcNd_Draw}; diff --git a/src/f_pc/f_pc_node_req.cpp b/src/f_pc/f_pc_node_req.cpp index b6d38e05b0..8d9d9445fd 100644 --- a/src/f_pc/f_pc_node_req.cpp +++ b/src/f_pc/f_pc_node_req.cpp @@ -16,10 +16,10 @@ /* 800227C4-80022804 0040+00 s=1 e=0 z=0 None .text fpcNdRq_RequestQTo__FP19node_create_request */ -void fpcNdRq_RequestQTo(node_create_request* pNodeCreateReq) { - fpcLy_CreatedMesg(pNodeCreateReq->mpLayerClass); - fpcLy_CancelQTo(&pNodeCreateReq->mProcMthCls); - cTg_SingleCut(&pNodeCreateReq->mCreateTag); +void fpcNdRq_RequestQTo(node_create_request* i_NdCtReq) { + fpcLy_CreatedMesg(i_NdCtReq->mpLayerClass); + fpcLy_CancelQTo(&i_NdCtReq->mProcMthCls); + cTg_SingleCut(&i_NdCtReq->mCreateTag); } /* ############################################################################################## */ @@ -28,71 +28,70 @@ static node_list_class l_fpcNdRq_Queue = {NULL, NULL, 0}; /* 80022804-80022850 004C+00 s=1 e=0 z=0 None .text fpcNdRq_ToRequestQ__FP19node_create_request */ -void fpcNdRq_ToRequestQ(node_create_request* pNodeCreateReq) { - cTg_Addition(&l_fpcNdRq_Queue, &pNodeCreateReq->mCreateTag); - fpcLy_ToCancelQ(pNodeCreateReq->mpLayerClass, &pNodeCreateReq->mProcMthCls); - fpcLy_CreatingMesg(pNodeCreateReq->mpLayerClass); +void fpcNdRq_ToRequestQ(node_create_request* i_NdCtReq) { + cTg_Addition(&l_fpcNdRq_Queue, &i_NdCtReq->mCreateTag); + fpcLy_ToCancelQ(i_NdCtReq->mpLayerClass, &i_NdCtReq->mProcMthCls); + fpcLy_CreatingMesg(i_NdCtReq->mpLayerClass); } /* 80022850-800228A8 0058+00 s=2 e=0 z=0 None .text * fpcNdRq_phase_IsCreated__FP19node_create_request */ -s32 fpcNdRq_phase_IsCreated(node_create_request* pNodeCreateReq) { - if (fpcCtRq_IsCreatingByID(pNodeCreateReq->mCreatingID) == TRUE) { +s32 fpcNdRq_phase_IsCreated(node_create_request* i_NdCtReq) { + if (fpcCtRq_IsCreatingByID(i_NdCtReq->mCreatingID) == TRUE) { return cPhs_ZERO_e; } else { - return fpcEx_IsExist(pNodeCreateReq->mCreatingID) == TRUE ? 2 : 3; + return fpcEx_IsExist(i_NdCtReq->mCreatingID) == TRUE ? 2 : 3; } } /* 800228A8-80022904 005C+00 s=2 e=0 z=0 None .text fpcNdRq_phase_Create__FP19node_create_request */ -s32 fpcNdRq_phase_Create(node_create_request* pNodeCreateReq) { - pNodeCreateReq->mCreatingID = - fpcSCtRq_Request(pNodeCreateReq->mpLayerClass, pNodeCreateReq->mProcName, - (stdCreateFunc)pNodeCreateReq->mpNodeCrReqMthCls->mpPostMethodFunc, - pNodeCreateReq, pNodeCreateReq->mpUserData); - return pNodeCreateReq->mCreatingID == -1 ? 3 : 2; +s32 fpcNdRq_phase_Create(node_create_request* i_NdCtReq) { + i_NdCtReq->mCreatingID = + fpcSCtRq_Request(i_NdCtReq->mpLayerClass, i_NdCtReq->mProcName, + (stdCreateFunc)i_NdCtReq->mpNodeCrReqMthCls->mpPostMethodFunc, i_NdCtReq, + i_NdCtReq->mpUserData); + return i_NdCtReq->mCreatingID == -1 ? 3 : 2; } /* 80022904-8002290C 0008+00 s=2 e=0 z=0 None .text * fpcNdRq_phase_IsDeleteTiming__FP19node_create_request */ -s32 fpcNdRq_phase_IsDeleteTiming(node_create_request* pNodeCreateReq) { +s32 fpcNdRq_phase_IsDeleteTiming(node_create_request* i_NdCtReq) { return 2; } /* 8002290C-8002293C 0030+00 s=2 e=0 z=0 None .text * fpcNdRq_phase_IsDeleted__FP19node_create_request */ -s32 fpcNdRq_phase_IsDeleted(node_create_request* pNodeCreateReq) { +s32 fpcNdRq_phase_IsDeleted(node_create_request* i_NdCtReq) { return fpcDt_IsComplete() == 0 ? cPhs_ZERO_e : 2; } /* 8002293C-80022990 0054+00 s=2 e=0 z=0 None .text fpcNdRq_phase_Delete__FP19node_create_request */ -s32 fpcNdRq_phase_Delete(node_create_request* pNodeCreateReq) { - if (pNodeCreateReq->mNodeProc.mpNodeProc != NULL) { - if (fpcDt_Delete(&pNodeCreateReq->mNodeProc.mpNodeProc->mBase) == 0) { +s32 fpcNdRq_phase_Delete(node_create_request* i_NdCtReq) { + if (i_NdCtReq->mNodeProc.mpNodeProc != NULL) { + if (fpcDt_Delete(&i_NdCtReq->mNodeProc.mpNodeProc->mBase) == 0) { return cPhs_ZERO_e; } - pNodeCreateReq->mNodeProc.mpNodeProc = NULL; + i_NdCtReq->mNodeProc.mpNodeProc = NULL; } return 2; } /* 80022990-800229D8 0048+00 s=1 e=0 z=0 None .text fpcNdRq_DoPhase__FP19node_create_request */ -s32 fpcNdRq_DoPhase(node_create_request* pNodeCreateReq) { - s32 result = - cPhs_Handler(&pNodeCreateReq->mReqPhsProc, pNodeCreateReq->mpPhsHandler, pNodeCreateReq); - if (result == 0x2) { - return fpcNdRq_DoPhase(pNodeCreateReq); +s32 fpcNdRq_DoPhase(node_create_request* i_NdCtReq) { + s32 result = cPhs_Handler(&i_NdCtReq->mReqPhsProc, i_NdCtReq->mpPhsHandler, i_NdCtReq); + if (result == 2) { + return fpcNdRq_DoPhase(i_NdCtReq); } return result; } /* 800229D8-80022A3C 0064+00 s=0 e=1 z=0 None .text fpcNdRq_Execute__FP19node_create_request */ -s32 fpcNdRq_Execute(node_create_request* pNodeCreateReq) { - s32 result = fpcNdRq_DoPhase(pNodeCreateReq); +s32 fpcNdRq_Execute(node_create_request* i_NdCtReq) { + s32 result = fpcNdRq_DoPhase(i_NdCtReq); switch (result) { case 0: case 1: @@ -108,29 +107,30 @@ s32 fpcNdRq_Execute(node_create_request* pNodeCreateReq) { } /* 80022A3C-80022AA4 0068+00 s=2 e=1 z=0 None .text fpcNdRq_Delete__FP19node_create_request */ -s32 fpcNdRq_Delete(node_create_request* pNodeCreateReq) { - fpcNdRq_RequestQTo(pNodeCreateReq); - if (pNodeCreateReq->mpNodeCrReqMthCls != NULL && - pNodeCreateReq->mpNodeCrReqMthCls->mpUnkFunc != NULL && - fpcMtd_Method(pNodeCreateReq->mpNodeCrReqMthCls->mpUnkFunc, pNodeCreateReq) == 0) { +s32 fpcNdRq_Delete(node_create_request* i_NdCtReq) { + fpcNdRq_RequestQTo(i_NdCtReq); + if (i_NdCtReq->mpNodeCrReqMthCls != NULL && i_NdCtReq->mpNodeCrReqMthCls->mpUnkFunc != NULL && + fpcMtd_Method(i_NdCtReq->mpNodeCrReqMthCls->mpUnkFunc, i_NdCtReq) == 0) + { return 0; } - cMl::free(pNodeCreateReq); + cMl::free(i_NdCtReq); return 1; } /* 80022AA4-80022AFC 0058+00 s=2 e=0 z=0 None .text fpcNdRq_Cancel__FP19node_create_request */ -s32 fpcNdRq_Cancel(node_create_request* pNodeCreateReq) { - if (pNodeCreateReq->mpNodeCrReqMthCls != NULL && - fpcMtd_Method(pNodeCreateReq->mpNodeCrReqMthCls->mpCancelFunc, pNodeCreateReq) == 0) { +s32 fpcNdRq_Cancel(node_create_request* i_NdCtReq) { + if (i_NdCtReq->mpNodeCrReqMthCls != NULL && + fpcMtd_Method(i_NdCtReq->mpNodeCrReqMthCls->mpCancelFunc, i_NdCtReq) == 0) + { return 0; } - return fpcNdRq_Delete(pNodeCreateReq); + return fpcNdRq_Delete(i_NdCtReq); } /* 80022AFC-80022BE4 00E8+00 s=0 e=1 z=0 None .text fpcNdRq_Handler__Fv */ #define NODE_GET_NEXT(pNode) (pNode ? pNode->mpNextNode : NULL) -s32 fpcNdRq_Handler(void) { +s32 fpcNdRq_Handler() { node_class* currentNode = l_fpcNdRq_Queue.mpHead; while (currentNode != NULL) { node_create_request* req = ((request_node_class*)currentNode)->mNodeCrReq; @@ -158,8 +158,8 @@ s32 fpcNdRq_Handler(void) { /* 80022BE4-80022C50 006C+00 s=3 e=0 z=0 None .text * fpcNdRq_IsPossibleTarget__FP18process_node_class */ -s32 fpcNdRq_IsPossibleTarget(process_node_class* pProcNode) { - s32 bsPcId = pProcNode->mBase.mBsPcId; +s32 fpcNdRq_IsPossibleTarget(process_node_class* i_procNode) { + s32 bsPcId = i_procNode->mBase.mBsPcId; request_node_class* currentNode; node_create_request* currentNdCr; currentNode = (request_node_class*)l_fpcNdRq_Queue.mpHead; @@ -167,7 +167,8 @@ s32 fpcNdRq_IsPossibleTarget(process_node_class* pProcNode) { currentNdCr = currentNode->mNodeCrReq; if ((currentNdCr->mParameter == 2 || currentNdCr->mParameter == 4 || currentNdCr->mParameter == 1) && - currentNdCr->mNodeProc.mProcId == bsPcId) { + currentNdCr->mNodeProc.mProcId == bsPcId) + { return 0; } currentNode = (request_node_class*)NODE_GET_NEXT((¤tNode->mBase)); @@ -176,10 +177,10 @@ s32 fpcNdRq_IsPossibleTarget(process_node_class* pProcNode) { } /* 80022C50-80022C9C 004C+00 s=2 e=0 z=0 None .text fpcNdRq_IsIng__FP18process_node_class */ -s32 fpcNdRq_IsIng(process_node_class* pProcNode) { +s32 fpcNdRq_IsIng(process_node_class* i_procNode) { request_node_class* currentNode; node_create_request* currentNodeReq; - s32 bsPcId = pProcNode->mBase.mBsPcId; + s32 bsPcId = i_procNode->mBase.mBsPcId; currentNode = (request_node_class*)l_fpcNdRq_Queue.mpHead; while (currentNode != NULL) { currentNodeReq = currentNode->mNodeCrReq; @@ -191,19 +192,18 @@ s32 fpcNdRq_IsIng(process_node_class* pProcNode) { return 0; } -/* ############################################################################################## */ -/* 803A3A44-803A3AA8 0064+00 s=1 e=0 z=0 None .data clear$2359 */ -static node_create_request clear = {NULL, NULL, NULL, NULL, 0, NULL, NULL, - NULL, NULL, 0, NULL, NULL, NULL, 0, - 0, NULL, 5, 0xFFFFFFFF, NULL, 0xFFFFFFFE, NULL, - 0xFFFFFFFE, 0x7FFF, NULL, 0x7FFF}; - /* 80022C9C-80022E14 0178+00 s=3 e=0 z=0 None .text fpcNdRq_Create__FUl */ -node_create_request* fpcNdRq_Create(u32 pRequestSize) { - node_create_request* req = (node_create_request*)cMl::memalignB(-4, pRequestSize); +node_create_request* fpcNdRq_Create(u32 i_requestSize) { + static node_create_request clear = { + NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, + 0, NULL, NULL, NULL, 0, 0, NULL, 5, 0xFFFFFFFF, + NULL, 0xFFFFFFFE, NULL, 0xFFFFFFFE, 0x7FFF, NULL, 0x7FFF, + }; + + node_create_request* req = (node_create_request*)cMl::memalignB(-4, i_requestSize); if (req != NULL) { static int request_id = 0; - sBs_ClearArea(req, pRequestSize); + sBs_ClearArea(req, i_requestSize); *req = clear; cTg_Create(&req->mCreateTag, req); fpcMtdTg_Init(&req->mProcMthCls, (process_method_tag_func)fpcNdRq_Cancel, req); @@ -212,27 +212,25 @@ node_create_request* fpcNdRq_Create(u32 pRequestSize) { return req; } -/* ############################################################################################## */ -/* 803A3AA8-803A3AC0 0018+00 s=1 e=0 z=0 None .data methods$2376 */ -static cPhs__Handler methods_2376[6] = { - (cPhs__Handler)fpcNdRq_phase_IsDeleteTiming, (cPhs__Handler)fpcNdRq_phase_Delete, - (cPhs__Handler)fpcNdRq_phase_IsDeleted, (cPhs__Handler)fpcNdRq_phase_Create, - (cPhs__Handler)fpcNdRq_phase_IsCreated, NULL, -}; - /* 80022E14-80022EB0 009C+00 s=1 e=0 z=0 None .text * fpcNdRq_ChangeNode__FUlP18process_node_classsPv */ -node_create_request* fpcNdRq_ChangeNode(u32 pRequestSize, process_node_class* pProcNode, - s16 param_3, void* param_4) { - if (fpcNdRq_IsPossibleTarget(pProcNode) == 1 && fpcNdRq_IsIng(pProcNode) == 0) { - node_create_request* req = fpcNdRq_Create(pRequestSize); +node_create_request* fpcNdRq_ChangeNode(u32 i_requestSize, process_node_class* i_procNode, + s16 i_procName, void* i_data) { + static cPhs__Handler methods[6] = { + (cPhs__Handler)fpcNdRq_phase_IsDeleteTiming, (cPhs__Handler)fpcNdRq_phase_Delete, + (cPhs__Handler)fpcNdRq_phase_IsDeleted, (cPhs__Handler)fpcNdRq_phase_Create, + (cPhs__Handler)fpcNdRq_phase_IsCreated, NULL, + }; + + if (fpcNdRq_IsPossibleTarget(i_procNode) == 1 && fpcNdRq_IsIng(i_procNode) == 0) { + node_create_request* req = fpcNdRq_Create(i_requestSize); if (req != NULL) { - req->mpPhsHandler = methods_2376; - req->mNodeProc.mpNodeProc = pProcNode; - req->mNodeProc.mProcId = pProcNode->mBase.mBsPcId; - req->mpLayerClass = pProcNode->mBase.mLyTg.mpLayer; - req->mProcName = param_3; - req->mpUserData = param_4; + req->mpPhsHandler = methods; + req->mNodeProc.mpNodeProc = i_procNode; + req->mNodeProc.mProcId = i_procNode->mBase.mBsPcId; + req->mpLayerClass = i_procNode->mBase.mLyTg.mpLayer; + req->mProcName = i_procName; + req->mpUserData = i_data; } return req; } else { @@ -240,25 +238,23 @@ node_create_request* fpcNdRq_ChangeNode(u32 pRequestSize, process_node_class* pP } } -/* ############################################################################################## */ -/* 803A3AC0-803A3AD0 0010+00 s=1 e=0 z=0 None .data methods$2386 */ -static cPhs__Handler methods_2386[4] = { - (cPhs__Handler)fpcNdRq_phase_IsDeleteTiming, - (cPhs__Handler)fpcNdRq_phase_Delete, - (cPhs__Handler)fpcNdRq_phase_IsDeleted, - NULL, -}; - /* 80022EB0-80022F3C 008C+00 s=1 e=0 z=0 None .text fpcNdRq_DeleteNode__FUlP18process_node_class */ -node_create_request* fpcNdRq_DeleteNode(u32 pRequestSize, process_node_class* pProcNode) { - if (fpcNdRq_IsPossibleTarget(pProcNode) == 1 && fpcNdRq_IsIng(pProcNode) == 0) { - node_create_request* req = fpcNdRq_Create(pRequestSize); +node_create_request* fpcNdRq_DeleteNode(u32 i_requestSize, process_node_class* i_procNode) { + static cPhs__Handler methods[4] = { + (cPhs__Handler)fpcNdRq_phase_IsDeleteTiming, + (cPhs__Handler)fpcNdRq_phase_Delete, + (cPhs__Handler)fpcNdRq_phase_IsDeleted, + NULL, + }; + + if (fpcNdRq_IsPossibleTarget(i_procNode) == 1 && fpcNdRq_IsIng(i_procNode) == 0) { + node_create_request* req = fpcNdRq_Create(i_requestSize); if (req != NULL) { - req->mpPhsHandler = methods_2386; - req->mNodeProc.mpNodeProc = pProcNode; - req->mNodeProc.mProcId = pProcNode->mBase.mBsPcId; - req->mpLayerClass = pProcNode->mBase.mLyTg.mpLayer; + req->mpPhsHandler = methods; + req->mNodeProc.mpNodeProc = i_procNode; + req->mNodeProc.mProcId = i_procNode->mBase.mBsPcId; + req->mpLayerClass = i_procNode->mBase.mLyTg.mpLayer; } return req; } else { @@ -266,30 +262,28 @@ node_create_request* fpcNdRq_DeleteNode(u32 pRequestSize, process_node_class* pP } } -/* ############################################################################################## */ -/* 803A3AD0-803A3AE0 000C+04 s=1 e=0 z=0 None .data methods$2397 */ -static cPhs__Handler methods_2397[3] = { - (cPhs__Handler)fpcNdRq_phase_Create, - (cPhs__Handler)fpcNdRq_phase_IsCreated, - NULL, -}; - /* 80022F3C-80022FE8 00AC+00 s=1 e=0 z=0 None .text fpcNdRq_CreateNode__FUlsPv */ -node_create_request* fpcNdRq_CreateNode(u32 pRequestSize, s16 param_2, void* param_3) { +node_create_request* fpcNdRq_CreateNode(u32 i_requestSize, s16 i_procName, void* i_data) { + static cPhs__Handler methods[3] = { + (cPhs__Handler)fpcNdRq_phase_Create, + (cPhs__Handler)fpcNdRq_phase_IsCreated, + NULL, + }; + layer_class* layer = fpcLy_CurrentLayer(); if (layer->mLayerID != 0 && fpcNdRq_IsPossibleTarget(layer->mpPcNode) == 0) { return NULL; } else { - node_create_request* req = fpcNdRq_Create(pRequestSize); + node_create_request* req = fpcNdRq_Create(i_requestSize); if (req != NULL) { - req->mpPhsHandler = methods_2397; + req->mpPhsHandler = methods; if (layer->mLayerID != 0) { req->mNodeProc.mpNodeProc = layer->mpPcNode; req->mNodeProc.mProcId = layer->mpPcNode->mBase.mBsPcId; } req->mpLayerClass = layer; - req->mProcName = param_2; - req->mpUserData = param_3; + req->mProcName = i_procName; + req->mpUserData = i_data; } return req; } @@ -297,42 +291,44 @@ node_create_request* fpcNdRq_CreateNode(u32 pRequestSize, s16 param_2, void* par /* 80022FE8-80023098 00B0+00 s=0 e=1 z=0 None .text * fpcNdRq_Request__FUliP18process_node_classsPvP32node_create_request_method_class */ -node_create_request* -fpcNdRq_Request(u32 param_1, int param_2, process_node_class* param_3, s16 param_4, void* param_5, - node_create_request_method_class* pNodeCreateRequestMethodClass) { +node_create_request* fpcNdRq_Request(u32 i_requestSize, int i_reqType, + process_node_class* i_procNode, s16 i_procName, void* i_data, + node_create_request_method_class* i_nodeCtRqMtd) { node_create_request* req; - switch (param_2) { + switch (i_reqType) { case 0: - req = fpcNdRq_CreateNode(param_1, param_4, param_5); + req = fpcNdRq_CreateNode(i_requestSize, i_procName, i_data); break; case 1: - req = fpcNdRq_DeleteNode(param_1, param_3); + req = fpcNdRq_DeleteNode(i_requestSize, i_procNode); break; case 2: - req = fpcNdRq_ChangeNode(param_1, param_3, param_4, param_5); + req = fpcNdRq_ChangeNode(i_requestSize, i_procNode, i_procName, i_data); break; case 4: break; } + if (req != NULL) { - req->mParameter = param_2; - req->mpNodeCrReqMthCls = pNodeCreateRequestMethodClass; + req->mParameter = i_reqType; + req->mpNodeCrReqMthCls = i_nodeCtRqMtd; fpcNdRq_ToRequestQ(req); } + return req; } /* 80023098-80023110 0078+00 s=1 e=0 z=0 None .text fpcNdRq_ReChangeNode__FUisPv */ -s32 fpcNdRq_ReChangeNode(unsigned int pRequestId, s16 param_2, void* param_3) { +s32 fpcNdRq_ReChangeNode(unsigned int i_requestID, s16 i_procName, void* i_data) { request_node_class* currentNode; node_create_request* found; currentNode = (request_node_class*)l_fpcNdRq_Queue.mpHead; while (currentNode != NULL) { found = currentNode->mNodeCrReq; - if (found->mParameter == 2 && found->mRequestId == pRequestId) { + if (found->mParameter == 2 && found->mRequestId == i_requestID) { if (found->mCreatingID == -2) { - found->mProcName = param_2; - found->mpUserData = param_3; + found->mProcName = i_procName; + found->mpUserData = i_data; return 1; } return 0; @@ -343,6 +339,6 @@ s32 fpcNdRq_ReChangeNode(unsigned int pRequestId, s16 param_2, void* param_3) { } /* 80023110-80023130 0020+00 s=0 e=1 z=0 None .text fpcNdRq_ReRequest__FUisPv */ -s32 fpcNdRq_ReRequest(unsigned int pRequestId, s16 param_2, void* param_3) { - return fpcNdRq_ReChangeNode(pRequestId, param_2, param_3); +s32 fpcNdRq_ReRequest(unsigned int i_requestID, s16 i_procName, void* i_data) { + return fpcNdRq_ReChangeNode(i_requestID, i_procName, i_data); } diff --git a/src/f_pc/f_pc_pause.cpp b/src/f_pc/f_pc_pause.cpp index 3fd9a81a14..eea4efcab4 100644 --- a/src/f_pc/f_pc_pause.cpp +++ b/src/f_pc/f_pc_pause.cpp @@ -7,9 +7,9 @@ #include "f_pc/f_pc_layer_iter.h" /* 80023844-80023868 0024+00 s=0 e=3 z=0 None .text fpcPause_IsEnable__FPvUc */ -s32 fpcPause_IsEnable(void* pProcess, u8 flag) { - base_process_class* pProc = (base_process_class*)pProcess; - if ((pProc->mPauseFlag & flag) == flag) { +s32 fpcPause_IsEnable(void* i_proc, u8 i_flag) { + base_process_class* pProc = (base_process_class*)i_proc; + if ((pProc->mPauseFlag & i_flag) == i_flag) { return 1; } else { return 0; @@ -17,33 +17,33 @@ s32 fpcPause_IsEnable(void* pProcess, u8 flag) { } /* 80023868-800238D4 006C+00 s=0 e=1 z=0 None .text fpcPause_Enable__FPvUc */ -s32 fpcPause_Enable(void* pProcess, u8 flag) { - base_process_class* pProc = (base_process_class*)pProcess; - pProc->mPauseFlag |= flag; +s32 fpcPause_Enable(void* i_proc, u8 i_flag) { + base_process_class* pProc = (base_process_class*)i_proc; + pProc->mPauseFlag |= i_flag; if (fpcBs_Is_JustOfType(g_fpcNd_type, pProc->mSubType)) { process_node_class* pNode = (process_node_class*)pProc; fpcLyIt_OnlyHere(&pNode->mLayer, (fpcLyIt_OnlyHereFunc)fpcPause_Enable, - (void*)(flag & 0xFF)); + (void*)(i_flag & 0xFF)); } return 1; } /* 800238D4-80023948 0074+00 s=0 e=1 z=0 None .text fpcPause_Disable__FPvUc */ -s32 fpcPause_Disable(void* pProcess, u8 flag) { - base_process_class* pProc = (base_process_class*)pProcess; - pProc->mPauseFlag &= (0xFF - flag) & 0xFF; +s32 fpcPause_Disable(void* i_proc, u8 i_flag) { + base_process_class* pProc = (base_process_class*)i_proc; + pProc->mPauseFlag &= (0xFF - i_flag) & 0xFF; if (fpcBs_Is_JustOfType(g_fpcNd_type, pProc->mSubType)) { process_node_class* pNode = (process_node_class*)pProc; - fpcLyIt_OnlyHere(&pNode->mLayer, (fpcLyIt_OnlyHereFunc)fpcPause_Disable, (void*)flag); + fpcLyIt_OnlyHere(&pNode->mLayer, (fpcLyIt_OnlyHereFunc)fpcPause_Disable, (void*)i_flag); } return 1; } /* 80023948-80023954 000C+00 s=0 e=1 z=0 None .text fpcPause_Init__FPv */ -void fpcPause_Init(void* pProcess) { - base_process_class* pProc = (base_process_class*)pProcess; +void fpcPause_Init(void* i_proc) { + base_process_class* pProc = (base_process_class*)i_proc; pProc->mPauseFlag = 0; } diff --git a/src/f_pc/f_pc_priority.cpp b/src/f_pc/f_pc_priority.cpp index 7ba902b769..8422fcd325 100644 --- a/src/f_pc/f_pc_priority.cpp +++ b/src/f_pc/f_pc_priority.cpp @@ -10,15 +10,15 @@ /* 80023130-80023150 0020+00 s=0 e=1 z=0 None .text fpcPi_IsInQueue__FP22process_priority_class */ -s32 fpcPi_IsInQueue(process_priority_class* pPi) { - return cTg_IsUse(&pPi->mBase); +s32 fpcPi_IsInQueue(process_priority_class* i_procPriority) { + return cTg_IsUse(&i_procPriority->mBase); } /* 80023150-80023188 0038+00 s=1 e=0 z=0 None .text fpcPi_QueueTo__FP22process_priority_class */ -s32 fpcPi_QueueTo(process_priority_class* pPi) { - cTg_SingleCut(&pPi->mBase); - fpcLy_CancelQTo(&pPi->mMtdTag); +s32 fpcPi_QueueTo(process_priority_class* i_procPriority) { + cTg_SingleCut(&i_procPriority->mBase); + fpcLy_CancelQTo(&i_procPriority->mMtdTag); return 1; } @@ -28,15 +28,15 @@ static node_list_class l_fpcPi_Queue; /* 80023188-80023214 008C+00 s=1 e=0 z=0 None .text fpcPi_ToQueue__FP22process_priority_class */ -s32 fpcPi_ToQueue(process_priority_class* pPi) { - u32 layer = pPi->mInfoQ.mLayer; +s32 fpcPi_ToQueue(process_priority_class* i_procPriority) { + u32 layer = i_procPriority->mInfoQ.mLayer; - if (cTg_Addition(&l_fpcPi_Queue, &pPi->mBase)) { + if (cTg_Addition(&l_fpcPi_Queue, &i_procPriority->mBase)) { if (layer != 0xFFFFFFFD) { layer_class* pLayer = fpcLy_Layer(layer); - if (!fpcLy_ToCancelQ(pLayer, &pPi->mMtdTag)) { - cTg_SingleCut(&pPi->mBase); + if (!fpcLy_ToCancelQ(pLayer, &i_procPriority->mMtdTag)) { + cTg_SingleCut(&i_procPriority->mBase); return 0; } } @@ -48,11 +48,11 @@ s32 fpcPi_ToQueue(process_priority_class* pPi) { } /* 80023214-80023268 0054+00 s=1 e=0 z=0 None .text fpcPi_GetFromQueue__Fv */ -process_priority_class* fpcPi_GetFromQueue(void) { - process_priority_class* pPi = (process_priority_class*)cTg_GetFirst(&l_fpcPi_Queue); +process_priority_class* fpcPi_GetFromQueue() { + process_priority_class* i_procPriority = (process_priority_class*)cTg_GetFirst(&l_fpcPi_Queue); - if (pPi != NULL) { - base_process_class* pProc = (base_process_class*)pPi->mBase.mpTagData; + if (i_procPriority != NULL) { + base_process_class* pProc = (base_process_class*)i_procPriority->mBase.mpTagData; process_priority_class* pProcPi = &pProc->mPi; fpcLy_CancelQTo(&pProcPi->mMtdTag); return pProcPi; @@ -61,27 +61,25 @@ process_priority_class* fpcPi_GetFromQueue(void) { return NULL; } -/* ############################################################################################## */ -/* 804505E8-804505F0 0008+00 s=1 e=0 z=0 None .sdata crear$2224 */ -static process_priority_queue_info crear = { - 0xFFFFFFFF, - 0xFFFF, - 0xFFFF, -}; - /* 80023268-800232B4 004C+00 s=1 e=1 z=0 None .text fpcPi_Delete__FP22process_priority_class */ -s32 fpcPi_Delete(process_priority_class* pPi) { - fpcPi_QueueTo(pPi); - pPi->mInfoQ.mLayer = crear.mLayer; - pPi->mInfoQ.mListID = crear.mListID; - pPi->mInfoQ.mListPrio = crear.mListPrio; +s32 fpcPi_Delete(process_priority_class* i_procPriority) { + static process_priority_queue_info crear = { + 0xFFFFFFFF, + 0xFFFF, + 0xFFFF, + }; + + fpcPi_QueueTo(i_procPriority); + i_procPriority->mInfoQ.mLayer = crear.mLayer; + i_procPriority->mInfoQ.mListID = crear.mListID; + i_procPriority->mInfoQ.mListPrio = crear.mListPrio; return 1; } /* 800232B4-800232E8 0034+00 s=2 e=0 z=0 None .text fpcPi_IsNormal__FUiUsUs */ -s32 fpcPi_IsNormal(unsigned int layer, u16 listID, u16 priority) { - if ((layer < 0xFFFFFFFE) && (listID < 0xFFFE) && (priority < 0xFFFE)) +s32 fpcPi_IsNormal(unsigned int i_layer, u16 i_listID, u16 i_priority) { + if ((i_layer < 0xFFFFFFFE) && (i_listID < 0xFFFE) && (i_priority < 0xFFFE)) return 1; return 0; @@ -89,61 +87,61 @@ s32 fpcPi_IsNormal(unsigned int layer, u16 listID, u16 priority) { /* 800232E8-80023428 0140+00 s=0 e=3 z=0 None .text * fpcPi_Change__FP22process_priority_classUiUsUs */ -s32 fpcPi_Change(process_priority_class* pPi, unsigned int layer, u16 listID, u16 priority) { - base_process_class* pProc = (base_process_class*)pPi->mBase.mpTagData; +s32 fpcPi_Change(process_priority_class* i_procPriority, unsigned int i_layer, u16 i_listID, u16 i_priority) { + base_process_class* pProc = (base_process_class*)i_procPriority->mBase.mpTagData; BOOL changed = 0; if (pProc->mInitState == 3) return 0; - if (!fpcPi_IsNormal(layer, listID, priority)) + if (!fpcPi_IsNormal(i_layer, i_listID, i_priority)) return 0; - pPi->mInfoQ.mLayer = pPi->mInfoCurr.mLayer; - pPi->mInfoQ.mListID = pPi->mInfoCurr.mListID; - pPi->mInfoQ.mListPrio = pPi->mInfoCurr.mListPrio; + i_procPriority->mInfoQ.mLayer = i_procPriority->mInfoCurr.mLayer; + i_procPriority->mInfoQ.mListID = i_procPriority->mInfoCurr.mListID; + i_procPriority->mInfoQ.mListPrio = i_procPriority->mInfoCurr.mListPrio; - if (layer != 0xFFFFFFFD && pPi->mInfoCurr.mLayer != layer) { - pPi->mInfoQ.mLayer = layer; + if (i_layer != 0xFFFFFFFD && i_procPriority->mInfoCurr.mLayer != i_layer) { + i_procPriority->mInfoQ.mLayer = i_layer; changed = 1; } - if (listID != 0xFFFD && pPi->mInfoCurr.mListID != listID) { - pPi->mInfoQ.mListID = listID; + if (i_listID != 0xFFFD && i_procPriority->mInfoCurr.mListID != i_listID) { + i_procPriority->mInfoQ.mListID = i_listID; changed = 1; } - if (priority != 0xFFFD && pPi->mInfoCurr.mListPrio != priority) { - pPi->mInfoQ.mListPrio = priority; + if (i_priority != 0xFFFD && i_procPriority->mInfoCurr.mListPrio != i_priority) { + i_procPriority->mInfoQ.mListPrio = i_priority; changed = 1; } if (pProc->mInitState == 0 || pProc->mInitState == 1) { - pPi->mInfoCurr.mLayer = pPi->mInfoQ.mLayer; - pPi->mInfoCurr.mListID = pPi->mInfoQ.mListID; - pPi->mInfoCurr.mListPrio = pPi->mInfoQ.mListPrio; + i_procPriority->mInfoCurr.mLayer = i_procPriority->mInfoQ.mLayer; + i_procPriority->mInfoCurr.mListID = i_procPriority->mInfoQ.mListID; + i_procPriority->mInfoCurr.mListPrio = i_procPriority->mInfoQ.mListPrio; return 1; } if (changed == 1) - return fpcPi_ToQueue(pPi); + return fpcPi_ToQueue(i_procPriority); else return 0; } /* 80023428-800234BC 0094+00 s=0 e=1 z=0 None .text fpcPi_Handler__Fv */ -s32 fpcPi_Handler(void) { - process_priority_class* pPi; - while (pPi = fpcPi_GetFromQueue()) { - base_process_class* pProc = (base_process_class*)pPi->mBase.mpTagData; +s32 fpcPi_Handler() { + process_priority_class* i_procPriority; + while (i_procPriority = fpcPi_GetFromQueue()) { + base_process_class* pProc = (base_process_class*)i_procPriority->mBase.mpTagData; layer_management_tag_class* pLayerTag = &pProc->mLyTg; line_tag* pLineTag = &pProc->mLnTg; - if (fpcLyTg_Move(pLayerTag, pPi->mInfoQ.mLayer, pPi->mInfoQ.mListID, - pPi->mInfoQ.mListPrio) == 1) { - fpcLnTg_Move(pLineTag, pPi->mInfoCurr.mListID); - pPi->mInfoCurr.mLayer = pPi->mInfoQ.mLayer; - pPi->mInfoCurr.mListID = pPi->mInfoQ.mListID; - pPi->mInfoCurr.mListPrio = pPi->mInfoQ.mListPrio; + if (fpcLyTg_Move(pLayerTag, i_procPriority->mInfoQ.mLayer, i_procPriority->mInfoQ.mListID, + i_procPriority->mInfoQ.mListPrio) == 1) { + fpcLnTg_Move(pLineTag, i_procPriority->mInfoCurr.mListID); + i_procPriority->mInfoCurr.mLayer = i_procPriority->mInfoQ.mLayer; + i_procPriority->mInfoCurr.mListID = i_procPriority->mInfoQ.mListID; + i_procPriority->mInfoCurr.mListPrio = i_procPriority->mInfoQ.mListPrio; } else { return 0; } @@ -154,20 +152,20 @@ s32 fpcPi_Handler(void) { /* 800234BC-80023564 00A8+00 s=0 e=1 z=0 None .text * fpcPi_Init__FP22process_priority_classPvUiUsUs */ -s32 fpcPi_Init(process_priority_class* pPi, void* pUserData, unsigned int layer, u16 listID, - u16 priority) { - if (!fpcPi_IsNormal(layer, listID, priority)) +s32 fpcPi_Init(process_priority_class* i_procPriority, void* i_data, unsigned int i_layer, u16 i_listID, + u16 i_priority) { + if (!fpcPi_IsNormal(i_layer, i_listID, i_priority)) return 0; - pPi->mInfoQ.mLayer = layer; - pPi->mInfoQ.mListID = listID; - pPi->mInfoQ.mListPrio = priority; + i_procPriority->mInfoQ.mLayer = i_layer; + i_procPriority->mInfoQ.mListID = i_listID; + i_procPriority->mInfoQ.mListPrio = i_priority; - pPi->mInfoCurr.mLayer = pPi->mInfoQ.mLayer; - pPi->mInfoCurr.mListID = pPi->mInfoQ.mListID; - pPi->mInfoCurr.mListPrio = pPi->mInfoQ.mListPrio; - cTg_Create(&pPi->mBase, pUserData); - fpcMtdTg_Init(&pPi->mMtdTag, (process_method_tag_func)fpcPi_Delete, pPi); + i_procPriority->mInfoCurr.mLayer = i_procPriority->mInfoQ.mLayer; + i_procPriority->mInfoCurr.mListID = i_procPriority->mInfoQ.mListID; + i_procPriority->mInfoCurr.mListPrio = i_procPriority->mInfoQ.mListPrio; + cTg_Create(&i_procPriority->mBase, i_data); + fpcMtdTg_Init(&i_procPriority->mMtdTag, (process_method_tag_func)fpcPi_Delete, i_procPriority); return 1; } diff --git a/src/f_pc/f_pc_profile.cpp b/src/f_pc/f_pc_profile.cpp index 28e38b5fe7..43253115f7 100644 --- a/src/f_pc/f_pc_profile.cpp +++ b/src/f_pc/f_pc_profile.cpp @@ -10,6 +10,6 @@ process_profile_definition** g_fpcPf_ProfileList_p; /* 80023564-80023578 0014+00 s=0 e=1 z=0 None .text fpcPf_Get__Fs */ -process_profile_definition* fpcPf_Get(s16 profileID) { - return g_fpcPf_ProfileList_p[profileID]; +process_profile_definition* fpcPf_Get(s16 i_profName) { + return g_fpcPf_ProfileList_p[i_profName]; } diff --git a/src/f_pc/f_pc_searcher.cpp b/src/f_pc/f_pc_searcher.cpp index 16a9b8e741..451f151b9e 100644 --- a/src/f_pc/f_pc_searcher.cpp +++ b/src/f_pc/f_pc_searcher.cpp @@ -6,17 +6,19 @@ #include "f_pc/f_pc_searcher.h" /* 80023578-80023590 0018+00 s=0 e=3 z=77 None .text fpcSch_JudgeForPName__FPvPv */ -void* fpcSch_JudgeForPName(void* pProc, void* pUserData) { - s16 pname = *(s16*)pUserData; - if (((base_process_class*)pProc)->mProcName == pname) - return pProc; +void* fpcSch_JudgeForPName(void* i_proc, void* i_data) { + s16 proc_name = *(s16*)i_data; + + if (((base_process_class*)i_proc)->mProcName == proc_name) + return i_proc; return NULL; } /* 80023590-800235A8 0018+00 s=0 e=44 z=270 None .text fpcSch_JudgeByID__FPvPv */ -void* fpcSch_JudgeByID(void* pProc, void* pUserData) { - s32 id = *(s32*)pUserData; - if (((base_process_class*)pProc)->mBsPcId == id) - return pProc; +void* fpcSch_JudgeByID(void* i_proc, void* i_data) { + s32 process_id = *(s32*)i_data; + + if (((base_process_class*)i_proc)->mBsPcId == process_id) + return i_proc; return NULL; } diff --git a/src/f_pc/f_pc_stdcreate_req.cpp b/src/f_pc/f_pc_stdcreate_req.cpp index c1811c92a8..1848429cde 100644 --- a/src/f_pc/f_pc_stdcreate_req.cpp +++ b/src/f_pc/f_pc_stdcreate_req.cpp @@ -10,8 +10,8 @@ /* 80023B70-80023BC4 0054+00 s=1 e=0 z=5 None .text * fpcSCtRq_phase_Load__FP29standard_create_request_class */ -s32 fpcSCtRq_phase_Load(standard_create_request_class* pStdCreateReq) { - switch (fpcLd_Load(pStdCreateReq->mLoadID)) { +s32 fpcSCtRq_phase_Load(standard_create_request_class* i_SCtReq) { + switch (fpcLd_Load(i_SCtReq->mLoadID)) { case 0: return cPhs_ZERO_e; case 4: @@ -24,30 +24,30 @@ s32 fpcSCtRq_phase_Load(standard_create_request_class* pStdCreateReq) { /* 80023BC4-80023C2C 0068+00 s=1 e=0 z=9 None .text * fpcSCtRq_phase_CreateProcess__FP29standard_create_request_class */ -s32 fpcSCtRq_phase_CreateProcess(standard_create_request_class* pStdCreateReq) { - fpcLy_SetCurrentLayer(pStdCreateReq->mBase.mpLayer); - pStdCreateReq->mBase.mpRes = - fpcBs_Create(pStdCreateReq->mLoadID, pStdCreateReq->mBase.mBsPcId, pStdCreateReq->unk_0x54); - if (pStdCreateReq->mBase.mpRes == NULL) { - fpcLd_Free(pStdCreateReq->mLoadID); +s32 fpcSCtRq_phase_CreateProcess(standard_create_request_class* i_SCtReq) { + fpcLy_SetCurrentLayer(i_SCtReq->mBase.mpLayer); + i_SCtReq->mBase.mpRes = + fpcBs_Create(i_SCtReq->mLoadID, i_SCtReq->mBase.mBsPcId, i_SCtReq->unk_0x54); + if (i_SCtReq->mBase.mpRes == NULL) { + fpcLd_Free(i_SCtReq->mLoadID); return cPhs_ERROR_e; } else { - pStdCreateReq->mBase.mpRes->mpCtRq = (struct create_request*)pStdCreateReq; + i_SCtReq->mBase.mpRes->mpCtRq = (struct create_request*)i_SCtReq; return 2; } } /* 80023C2C-80023C64 0038+00 s=1 e=0 z=3 None .text * fpcSCtRq_phase_SubCreateProcess__FP29standard_create_request_class */ -s32 fpcSCtRq_phase_SubCreateProcess(standard_create_request_class* pStdCreateReq) { - fpcLy_SetCurrentLayer(pStdCreateReq->mBase.mpLayer); - return fpcBs_SubCreate(pStdCreateReq->mBase.mpRes); +s32 fpcSCtRq_phase_SubCreateProcess(standard_create_request_class* i_SCtReq) { + fpcLy_SetCurrentLayer(i_SCtReq->mBase.mpLayer); + return fpcBs_SubCreate(i_SCtReq->mBase.mpRes); } /* 80023C64-80023CBC 0058+00 s=1 e=0 z=14 None .text * fpcSCtRq_phase_IsComplete__FP29standard_create_request_class */ -s32 fpcSCtRq_phase_IsComplete(standard_create_request_class* pStdCreateReq) { - process_node_class* procNode = (process_node_class*)pStdCreateReq->mBase.mpRes; +s32 fpcSCtRq_phase_IsComplete(standard_create_request_class* i_SCtReq) { + process_node_class* procNode = (process_node_class*)i_SCtReq->mBase.mpRes; if (fpcBs_Is_JustOfType(g_fpcNd_type, procNode->mBase.mSubType) == 1) { if (fpcLy_IsCreatingMesg(&procNode->mLayer) == 1) { return cPhs_ZERO_e; @@ -58,9 +58,10 @@ s32 fpcSCtRq_phase_IsComplete(standard_create_request_class* pStdCreateReq) { /* 80023CBC-80023D0C 0050+00 s=1 e=0 z=5 None .text * fpcSCtRq_phase_PostMethod__FP29standard_create_request_class */ -s32 fpcSCtRq_phase_PostMethod(standard_create_request_class* pStdCreateReq) { - if (pStdCreateReq->unk_0x58 != NULL && - pStdCreateReq->unk_0x58(pStdCreateReq->mBase.mpRes, pStdCreateReq->unk_0x5C) == 0) { +s32 fpcSCtRq_phase_PostMethod(standard_create_request_class* i_SCtReq) { + if (i_SCtReq->unk_0x58 != NULL && + i_SCtReq->unk_0x58(i_SCtReq->mBase.mpRes, i_SCtReq->unk_0x5C) == 0) + { return cPhs_ZERO_e; } else { return 2; @@ -69,18 +70,18 @@ s32 fpcSCtRq_phase_PostMethod(standard_create_request_class* pStdCreateReq) { /* 80023D0C-80023D14 0008+00 s=1 e=0 z=0 None .text * fpcSCtRq_phase_Done__FP29standard_create_request_class */ -s32 fpcSCtRq_phase_Done(standard_create_request_class* param_0) { +s32 fpcSCtRq_phase_Done(standard_create_request_class* i_SCtReq) { return 2; } /* 80023D14-80023D84 0070+00 s=1 e=0 z=2 None .text * fpcSCtRq_Handler__FP29standard_create_request_class */ -s32 fpcSCtRq_Handler(standard_create_request_class* pStdCreateReq) { - s32 phase_state = cPhs_Do(&pStdCreateReq->unk_0x48, pStdCreateReq); +s32 fpcSCtRq_Handler(standard_create_request_class* i_SCtReq) { + s32 phase_state = cPhs_Do(&i_SCtReq->unk_0x48, i_SCtReq); switch (phase_state) { case cPhs_TWO_e: - return fpcSCtRq_Handler(pStdCreateReq); + return fpcSCtRq_Handler(i_SCtReq); case cPhs_COMPLEATE_e: return cPhs_COMPLEATE_e; case cPhs_ONE_e: @@ -92,50 +93,47 @@ s32 fpcSCtRq_Handler(standard_create_request_class* pStdCreateReq) { /* 80023D84-80023D8C 0008+00 s=1 e=0 z=0 None .text * fpcSCtRq_Delete__FP29standard_create_request_class */ -s32 fpcSCtRq_Delete(standard_create_request_class* param_0) { +s32 fpcSCtRq_Delete(standard_create_request_class* i_SCtReq) { return 1; } /* 80023D8C-80023D94 0008+00 s=1 e=0 z=1 None .text * fpcSCtRq_Cancel__FP29standard_create_request_class */ -s32 fpcSCtRq_Cancel(standard_create_request_class* param_0) { +s32 fpcSCtRq_Cancel(standard_create_request_class* i_SCtReq) { return 1; } -/* ############################################################################################## */ -/* 803A3AF0-803A3AFC 000C+00 s=1 e=0 z=0 None .data submethod$2261 */ -static create_request_method_class submethod = { - (cPhs__Handler)fpcSCtRq_Handler, - (process_method_func)fpcSCtRq_Cancel, - (process_method_func)fpcSCtRq_Delete, -}; - -/* 803A3AFC-803A3B18 001C+00 s=1 e=0 z=0 None .data method$2262 */ -static cPhs__Handler method[7] = { - (cPhs__Handler)fpcSCtRq_phase_Load, - (cPhs__Handler)fpcSCtRq_phase_CreateProcess, - (cPhs__Handler)fpcSCtRq_phase_SubCreateProcess, - (cPhs__Handler)fpcSCtRq_phase_IsComplete, - (cPhs__Handler)fpcSCtRq_phase_PostMethod, - (cPhs__Handler)fpcSCtRq_phase_Done, - NULL, -}; - /* 80023D94-80023E28 0094+00 s=0 e=12 z=1 None .text * fpcSCtRq_Request__FP11layer_classsPFPvPv_iPvPv */ -s32 fpcSCtRq_Request(layer_class* param_1, s16 pProcName, stdCreateFunc param_3, void* param_4, - void* param_5) { - if (pProcName >= 0x7FFF) { +s32 fpcSCtRq_Request(layer_class* i_layer, s16 i_procName, stdCreateFunc i_createFunc, + void* param_4, void* param_5) { + static create_request_method_class submethod = { + (cPhs__Handler)fpcSCtRq_Handler, + (process_method_func)fpcSCtRq_Cancel, + (process_method_func)fpcSCtRq_Delete, + }; + + static cPhs__Handler method[7] = { + (cPhs__Handler)fpcSCtRq_phase_Load, + (cPhs__Handler)fpcSCtRq_phase_CreateProcess, + (cPhs__Handler)fpcSCtRq_phase_SubCreateProcess, + (cPhs__Handler)fpcSCtRq_phase_IsComplete, + (cPhs__Handler)fpcSCtRq_phase_PostMethod, + (cPhs__Handler)fpcSCtRq_phase_Done, + NULL, + }; + + if (i_procName >= 0x7FFF) { return -1; } else { standard_create_request_class* request = - (standard_create_request_class*)fpcCtRq_Create(param_1, 0x60, &submethod); + (standard_create_request_class*)fpcCtRq_Create(i_layer, 0x60, &submethod); if (request == NULL) { return -1; } else { cPhs_Set(&request->unk_0x48, method); - request->mLoadID = pProcName; - request->unk_0x58 = param_3; + request->mLoadID = i_procName; + request->unk_0x58 = i_createFunc; request->unk_0x5C = param_4; request->unk_0x54 = param_5; return request->mBase.mBsPcId; diff --git a/src/m_Do/m_Do_ext.cpp b/src/m_Do/m_Do_ext.cpp index 70f01ca0f1..840927474d 100644 --- a/src/m_Do/m_Do_ext.cpp +++ b/src/m_Do/m_Do_ext.cpp @@ -1620,8 +1620,8 @@ bool J3DPEBlock::getAlphaComp() { } /* 8000DF5C-8000DF64 00889C 0008+00 0/0 6/0 0/0 .text getFog__10J3DPEBlockFv */ -bool J3DPEBlock::getFog() { - return false; +J3DFog* J3DPEBlock::getFog() { + return NULL; } /* 8000DF64-8000DF6C 0088A4 0008+00 0/0 2/0 0/0 .text getIndTexCoordScale__11J3DIndBlockFUl */