diff --git a/config/GZ2E01/rels/d_a_b_zant_magic/symbols.txt b/config/GZ2E01/rels/d_a_b_zant_magic/symbols.txt index b11542bf5b8..9607088b967 100644 --- a/config/GZ2E01/rels/d_a_b_zant_magic/symbols.txt +++ b/config/GZ2E01/rels/d_a_b_zant_magic/symbols.txt @@ -2,16 +2,16 @@ _prolog = .text:0x00000000; // type:function size:0x2C scope:global _epilog = .text:0x0000002C; // type:function size:0x2C scope:global _unresolved = .text:0x00000058; // type:function size:0x20 scope:global draw__11daB_ZANTM_cFv = .text:0x00000078; // type:function size:0x3C scope:global -daB_ZANTM_Draw__FP11daB_ZANTM_c = .text:0x000000B4; // type:function size:0x20 scope:global +daB_ZANTM_Draw__FP11daB_ZANTM_c = .text:0x000000B4; // type:function size:0x20 scope:local setMagicEffect__11daB_ZANTM_cFv = .text:0x000000D4; // type:function size:0x164 scope:global setMagicHitEffect__11daB_ZANTM_cFv = .text:0x00000238; // type:function size:0x118 scope:global executeSmall__11daB_ZANTM_cFv = .text:0x00000350; // type:function size:0x31C scope:global cc_set__11daB_ZANTM_cFv = .text:0x0000066C; // type:function size:0x100 scope:global execute__11daB_ZANTM_cFv = .text:0x0000076C; // type:function size:0x98 scope:global -daB_ZANTM_Execute__FP11daB_ZANTM_c = .text:0x00000804; // type:function size:0x20 scope:global -daB_ZANTM_IsDelete__FP11daB_ZANTM_c = .text:0x00000824; // type:function size:0x8 scope:global +daB_ZANTM_Execute__FP11daB_ZANTM_c = .text:0x00000804; // type:function size:0x20 scope:local +daB_ZANTM_IsDelete__FP11daB_ZANTM_c = .text:0x00000824; // type:function size:0x8 scope:local _delete__11daB_ZANTM_cFv = .text:0x0000082C; // type:function size:0x8 scope:global -daB_ZANTM_Delete__FP11daB_ZANTM_c = .text:0x00000834; // type:function size:0x20 scope:global +daB_ZANTM_Delete__FP11daB_ZANTM_c = .text:0x00000834; // type:function size:0x20 scope:local create__11daB_ZANTM_cFv = .text:0x00000854; // type:function size:0x154 scope:global __ct__11daB_ZANTM_cFv = .text:0x000009A8; // type:function size:0x1A8 scope:global __dt__8cM3dGSphFv = .text:0x00000B50; // type:function size:0x48 scope:global @@ -19,7 +19,7 @@ __dt__8cM3dGAabFv = .text:0x00000B98; // type:function size:0x48 scope:global __dt__10dCcD_GSttsFv = .text:0x00000BE0; // type:function size:0x5C scope:global __dt__12dBgS_ObjAcchFv = .text:0x00000C3C; // type:function size:0x70 scope:global __dt__12dBgS_AcchCirFv = .text:0x00000CAC; // type:function size:0x70 scope:global -daB_ZANTM_Create__FP11daB_ZANTM_c = .text:0x00000D1C; // type:function size:0x20 scope:global +daB_ZANTM_Create__FP11daB_ZANTM_c = .text:0x00000D1C; // type:function size:0x20 scope:local __dt__10cCcD_GSttsFv = .text:0x00000D3C; // type:function size:0x48 scope:global @36@__dt__12dBgS_ObjAcchFv = .text:0x00000D84; // type:function size:0x8 scope:local @20@__dt__12dBgS_ObjAcchFv = .text:0x00000D8C; // type:function size:0x8 scope:local @@ -44,14 +44,14 @@ _dtors = .dtors:0x00000000; // type:label scope:global @3939 = .rodata:0x00000044; // type:object size:0x4 scope:local @3940 = .rodata:0x00000048; // type:object size:0x4 scope:local ...data.0 = .data:0x00000000; // type:label scope:local -cNullVec__6Z2Calc = .data:0x00000000; // type:object size:0xC scope:global +cNullVec__6Z2Calc = .data:0x00000000; // type:object size:0xC scope:local @1787 = .data:0x0000000C; // type:object size:0x4 scope:local cc_zant_src__30@unnamed@d_a_b_zant_magic_cpp@ = .data:0x00000020; // type:object size:0x4C scope:global cc_zant_src2__30@unnamed@d_a_b_zant_magic_cpp@ = .data:0x0000006C; // type:object size:0x40 scope:global cc_zant_src3__30@unnamed@d_a_b_zant_magic_cpp@ = .data:0x000000AC; // type:object size:0x40 scope:global magic_effect_id$3667 = .data:0x000000EC; // type:object size:0x8 scope:local magic_effect_id$3729 = .data:0x000000F4; // type:object size:0x8 scope:local -l_daB_ZANTM_Method = .data:0x000000FC; // type:object size:0x20 scope:global +l_daB_ZANTM_Method = .data:0x000000FC; // type:object size:0x20 scope:local g_profile_B_ZANTM = .data:0x0000011C; // type:object size:0x30 scope:global __vt__12dBgS_AcchCir = .data:0x0000014C; // type:object size:0xC scope:global __vt__10cCcD_GStts = .data:0x00000158; // type:object size:0xC scope:global diff --git a/config/GZ2E01/rels/d_a_b_zant_mobile/symbols.txt b/config/GZ2E01/rels/d_a_b_zant_mobile/symbols.txt index 52b218bd4b0..0f52ee16d7d 100644 --- a/config/GZ2E01/rels/d_a_b_zant_mobile/symbols.txt +++ b/config/GZ2E01/rels/d_a_b_zant_mobile/symbols.txt @@ -5,7 +5,7 @@ __register_global_object = .text:0x00000078; // type:function size:0x1C scope:gl __destroy_global_chain = .text:0x00000094; // type:function size:0x58 scope:global __ct__15daB_ZANTZ_HIO_cFv = .text:0x000000EC; // type:function size:0x24 scope:global draw__11daB_ZANTZ_cFv = .text:0x00000110; // type:function size:0x84 scope:global -daB_ZANTZ_Draw__FP11daB_ZANTZ_c = .text:0x00000194; // type:function size:0x20 scope:global +daB_ZANTZ_Draw__FP11daB_ZANTZ_c = .text:0x00000194; // type:function size:0x20 scope:local setSnortEffect__11daB_ZANTZ_cFi = .text:0x000001B4; // type:function size:0x8C scope:global calcSnortEffect__11daB_ZANTZ_cFv = .text:0x00000240; // type:function size:0x29C scope:global setMouthMode__11daB_ZANTZ_cFUc = .text:0x000004DC; // type:function size:0x190 scope:global @@ -15,13 +15,13 @@ __dt__14dBgS_ObjGndChkFv = .text:0x00000B64; // type:function size:0x78 scope:gl action__11daB_ZANTZ_cFv = .text:0x00000BDC; // type:function size:0x8A0 scope:global cc_set__11daB_ZANTZ_cFv = .text:0x0000147C; // type:function size:0x104 scope:global execute__11daB_ZANTZ_cFv = .text:0x00001580; // type:function size:0xD4 scope:global -daB_ZANTZ_Execute__FP11daB_ZANTZ_c = .text:0x00001654; // type:function size:0x20 scope:global -daB_ZANTZ_IsDelete__FP11daB_ZANTZ_c = .text:0x00001674; // type:function size:0x8 scope:global +daB_ZANTZ_Execute__FP11daB_ZANTZ_c = .text:0x00001654; // type:function size:0x20 scope:local +daB_ZANTZ_IsDelete__FP11daB_ZANTZ_c = .text:0x00001674; // type:function size:0x8 scope:local _delete__11daB_ZANTZ_cFv = .text:0x0000167C; // type:function size:0x88 scope:global -daB_ZANTZ_Delete__FP11daB_ZANTZ_c = .text:0x00001704; // type:function size:0x20 scope:global +daB_ZANTZ_Delete__FP11daB_ZANTZ_c = .text:0x00001704; // type:function size:0x20 scope:local CreateHeap__11daB_ZANTZ_cFv = .text:0x00001724; // type:function size:0x20C scope:global __dt__12J3DFrameCtrlFv = .text:0x00001930; // type:function size:0x48 scope:global -useHeapInit__FP10fopAc_ac_c = .text:0x00001978; // type:function size:0x20 scope:global +useHeapInit__FP10fopAc_ac_c = .text:0x00001978; // type:function size:0x20 scope:local create__11daB_ZANTZ_cFv = .text:0x00001998; // type:function size:0x2BC scope:global __dt__8dCcD_CylFv = .text:0x00001C54; // type:function size:0xCC scope:global __ct__8dCcD_CylFv = .text:0x00001D20; // type:function size:0x84 scope:global @@ -30,7 +30,7 @@ __dt__8cM3dGAabFv = .text:0x00001DEC; // type:function size:0x48 scope:global __dt__8dCcD_SphFv = .text:0x00001E34; // type:function size:0xCC scope:global __ct__8dCcD_SphFv = .text:0x00001F00; // type:function size:0x84 scope:global __dt__8cM3dGSphFv = .text:0x00001F84; // type:function size:0x48 scope:global -daB_ZANTZ_Create__FP11daB_ZANTZ_c = .text:0x00001FCC; // type:function size:0x20 scope:global +daB_ZANTZ_Create__FP11daB_ZANTZ_c = .text:0x00001FCC; // type:function size:0x20 scope:local __dt__15daB_ZANTZ_HIO_cFv = .text:0x00001FEC; // type:function size:0x48 scope:global __sinit_d_a_b_zant_mobile_cpp = .text:0x00002034; // type:function size:0x3C scope:local @20@__dt__14dBgS_ObjGndChkFv = .text:0x00002070; // type:function size:0x8 scope:local @@ -77,9 +77,9 @@ _dtors = .dtors:0x00000000; // type:label scope:global @4373 = .rodata:0x0000008C; // type:object size:0x4 scope:local @4374 = .rodata:0x00000090; // type:object size:0x4 scope:local @stringBase0 = .rodata:0x00000094; // type:object size:0xB scope:local data:string_table -cc_zant_src__31@unnamed@d_a_b_zant_mobile_cpp@ = .data:0x00000000; // type:object size:0x40 scope:global -cc_zant_snort_src__31@unnamed@d_a_b_zant_mobile_cpp@ = .data:0x00000040; // type:object size:0x44 scope:global -l_daB_ZANTZ_Method = .data:0x00000084; // type:object size:0x20 scope:global +cc_zant_src__31@unnamed@d_a_b_zant_mobile_cpp@ = .data:0x00000000; // type:object size:0x40 scope:local +cc_zant_snort_src__31@unnamed@d_a_b_zant_mobile_cpp@ = .data:0x00000040; // type:object size:0x44 scope:local +l_daB_ZANTZ_Method = .data:0x00000084; // type:object size:0x20 scope:local g_profile_B_ZANTZ = .data:0x000000A4; // type:object size:0x30 scope:global __vt__8cM3dGSph = .data:0x000000D4; // type:object size:0xC scope:global __vt__8cM3dGAab = .data:0x000000E0; // type:object size:0xC scope:global @@ -88,6 +88,6 @@ __vt__12J3DFrameCtrl = .data:0x000000F8; // type:object size:0xC scope:global __vt__14dBgS_ObjGndChk = .data:0x00000104; // type:object size:0x30 scope:global __vt__15daB_ZANTZ_HIO_c = .data:0x00000134; // type:object size:0xC scope:global __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global -lbl_157_bss_8 = .bss:0x00000008; // type:object size:0x1 data:byte +lbl_157_bss_8 = .bss:0x00000008; // type:object size:0x1 scope:local data:byte @3644 = .bss:0x0000000C; // type:object size:0xC scope:local l_HIO = .bss:0x00000018; // type:object size:0xC scope:global data:byte diff --git a/configure.py b/configure.py index 7e2c181299d..908df6a038f 100644 --- a/configure.py +++ b/configure.py @@ -1521,8 +1521,8 @@ def MatchingFor(*versions): ActorRel(Equivalent, "d_a_b_yo"), ActorRel(Equivalent, "d_a_b_yo_ice"), ActorRel(NonMatching, "d_a_b_zant"), - ActorRel(NonMatching, "d_a_b_zant_magic"), - ActorRel(NonMatching, "d_a_b_zant_mobile"), + ActorRel(Equivalent, "d_a_b_zant_magic"), # matches in objdiff, unknown issue + ActorRel(Matching, "d_a_b_zant_mobile"), ActorRel(Matching, "d_a_b_zant_sima"), ActorRel(NonMatching, "d_a_balloon_2D"), ActorRel(NonMatching, "d_a_bullet"), diff --git a/include/d/actor/d_a_b_zant.h b/include/d/actor/d_a_b_zant.h index d0842eebc9a..b3a3385e884 100644 --- a/include/d/actor/d_a_b_zant.h +++ b/include/d/actor/d_a_b_zant.h @@ -41,8 +41,8 @@ class daB_ZANT_c : public fopEn_enemy_c { /* 80640310 */ void setWaterBubble(); /* 806403D4 */ void setMonkeyFallEffect(); /* 80640478 */ void setLastRollEffect(); - /* 80640654 */ void getMagicSpeed(); - /* 80640664 */ void getMagicWaterSpeed(); + /* 80640654 */ f32 getMagicSpeed(); + /* 80640664 */ f32 getMagicWaterSpeed(); /* 80640674 */ void executeSmallAttack(); /* 80640C20 */ void calcScale(int); /* 80640D14 */ void executeWarp(); diff --git a/include/d/actor/d_a_b_zant_magic.h b/include/d/actor/d_a_b_zant_magic.h index e043abda884..c24dd7c4e0f 100644 --- a/include/d/actor/d_a_b_zant_magic.h +++ b/include/d/actor/d_a_b_zant_magic.h @@ -2,6 +2,8 @@ #define D_A_B_ZANT_MAGIC_H #include "f_op/f_op_actor_mng.h" +#include "d/d_cc_d.h" +#include "d/d_bg_s_acch.h" /** * @ingroup actors-enemies @@ -13,18 +15,29 @@ */ class daB_ZANTM_c : public fopEn_enemy_c { public: - /* 8064F778 */ void draw(); + /* 8064F778 */ int draw(); /* 8064F7D4 */ void setMagicEffect(); /* 8064F938 */ void setMagicHitEffect(); /* 8064FA50 */ void executeSmall(); /* 8064FD6C */ void cc_set(); - /* 8064FE6C */ void execute(); - /* 8064FF2C */ bool _delete(); - /* 8064FF54 */ void create(); - /* 806500A8 */ daB_ZANTM_c(); + /* 8064FE6C */ int execute(); + /* 8064FF2C */ int _delete(); + /* 8064FF54 */ int create(); private: - /* 0x5ac */ u8 field_0x5ac[0xc0c - 0x5ac]; + /* 0x5AC */ Mtx field_0x5ac; + /* 0x5DC */ cXyz field_0x5dc; + /* 0x5E8 */ f32 field_0x5e8; + /* 0x5EC */ int mAliveTimer; + /* 0x5F0 */ u8 mPrm; + /* 0x5F1 */ u8 mMode; + /* 0x5F4 */ dBgS_AcchCir mAcchCir; + /* 0x634 */ dBgS_ObjAcch mAcch; + /* 0x80C */ dCcD_Stts mCcStts; + /* 0x848 */ dCcD_Sph field_0x848; + /* 0x980 */ dCcD_Sph mTgCollider; + /* 0xAB8 */ dCcD_Cps mAtCollider; + /* 0xBFC */ u32 field_0xbfc[4]; }; STATIC_ASSERT(sizeof(daB_ZANTM_c) == 0xc0c); diff --git a/include/d/actor/d_a_b_zant_mobile.h b/include/d/actor/d_a_b_zant_mobile.h index 70b54024ab3..35690d9a0b0 100644 --- a/include/d/actor/d_a_b_zant_mobile.h +++ b/include/d/actor/d_a_b_zant_mobile.h @@ -2,32 +2,55 @@ #define D_A_B_ZANT_MOBILE_H #include "f_op/f_op_actor_mng.h" +#include "d/d_cc_d.h" +#include "d/d_bg_w.h" /** * @ingroup actors-enemies * @class daB_ZANTZ_c * @brief Zant (Mobile) * - * @details Palace of Twilight dungeon boss (mobile form?). + * @details Palace of Twilight dungeon boss (Moving Helmet Structure). * */ class daB_ZANTZ_c : public fopEn_enemy_c { public: - /* 806507B0 */ void draw(); + /* 806507B0 */ int draw(); /* 80650854 */ void setSnortEffect(int); /* 806508E0 */ void calcSnortEffect(); /* 80650B7C */ void setMouthMode(u8); /* 80650D0C */ void setAppearMode(u8); - /* 806510C0 */ void getGroundPos(); + /* 806510C0 */ f32 getGroundPos(); /* 8065127C */ void action(); /* 80651B1C */ void cc_set(); - /* 80651C20 */ void execute(); - /* 80651D1C */ void _delete(); - /* 80651DC4 */ void CreateHeap(); - /* 80652038 */ void create(); + /* 80651C20 */ int execute(); + /* 80651D1C */ int _delete(); + /* 80651DC4 */ int CreateHeap(); + /* 80652038 */ int create(); private: - /* 0x5ac */ u8 field_0x5ac[0xd14 - 0x5ac]; + /* 0x5AC */ request_of_phase_process_class mPhase; + /* 0x5B4 */ mDoExt_McaMorfSO* mpMorf; + /* 0x5B8 */ mDoExt_brkAnm* mpBrk; + /* 0x5BC */ Z2CreatureEnemy mSound; + /* 0x660 */ f32 field_0x660; + /* 0x664 */ f32 field_0x664; + /* 0x668 */ int field_0x668; + /* 0x66C */ u8 mMouthMode; + /* 0x66D */ u8 mAppearMode; + /* 0x66E */ u8 field_0x66e; + /* 0x66F */ u8 field_0x66f; + /* 0x670 */ u8 field_0x670; + /* 0x671 */ u8 mSearchContinue; + /* 0x674 */ Mtx mBgMtx; + /* 0x6A4 */ dBgW* mpBgW; + /* 0x6A8 */ dCcD_Stts mCcStts; + /* 0x6E4 */ dCcD_Sph field_0x6e4[3]; + /* 0xA8C */ dCcD_Cyl mSnortColliders[2]; + /* 0xD04 */ u32 field_0xd04; + /* 0xD08 */ u32 field_0xd08; + /* 0xD0C */ u32 field_0xd0c; + /* 0xD10 */ u8 mInitHIO; }; STATIC_ASSERT(sizeof(daB_ZANTZ_c) == 0xd14); @@ -35,7 +58,10 @@ STATIC_ASSERT(sizeof(daB_ZANTZ_c) == 0xd14); class daB_ZANTZ_HIO_c { public: /* 8065078C */ daB_ZANTZ_HIO_c(); - /* 8065268C */ ~daB_ZANTZ_HIO_c(); + /* 8065268C */ virtual ~daB_ZANTZ_HIO_c() {} + + /* 0x4 */ s8 field_0x4; + /* 0x8 */ f32 mModelSize; }; diff --git a/src/d/actor/d_a_b_zant.cpp b/src/d/actor/d_a_b_zant.cpp index e36ceedcf2c..7566bb6caac 100644 --- a/src/d/actor/d_a_b_zant.cpp +++ b/src/d/actor/d_a_b_zant.cpp @@ -1376,13 +1376,13 @@ static void s_pillar_sub(void* param_0, void* param_1) { } /* 80640654-80640664 002634 0010+00 0/0 0/0 1/1 .text getMagicSpeed__10daB_ZANT_cFv */ -void daB_ZANT_c::getMagicSpeed() { +f32 daB_ZANT_c::getMagicSpeed() { // NONMATCHING } /* 80640664-80640674 002644 0010+00 0/0 0/0 1/1 .text getMagicWaterSpeed__10daB_ZANT_cFv */ -void daB_ZANT_c::getMagicWaterSpeed() { +f32 daB_ZANT_c::getMagicWaterSpeed() { // NONMATCHING } @@ -3013,4 +3013,4 @@ static u8 data_8064F6F4[4]; static u8 data_8064F6F8[4]; #pragma pop -/* 8064EE60-8064EE60 000344 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ \ No newline at end of file +/* 8064EE60-8064EE60 000344 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ diff --git a/src/d/actor/d_a_b_zant_magic.cpp b/src/d/actor/d_a_b_zant_magic.cpp index 375a86ebae0..c82f47b284e 100644 --- a/src/d/actor/d_a_b_zant_magic.cpp +++ b/src/d/actor/d_a_b_zant_magic.cpp @@ -4,383 +4,299 @@ */ #include "d/actor/d_a_b_zant_magic.h" -#include "dol2asm.h" - - - -// -// Forward References: -// - -extern "C" void draw__11daB_ZANTM_cFv(); -extern "C" static void daB_ZANTM_Draw__FP11daB_ZANTM_c(); -extern "C" void setMagicEffect__11daB_ZANTM_cFv(); -extern "C" void setMagicHitEffect__11daB_ZANTM_cFv(); -extern "C" void executeSmall__11daB_ZANTM_cFv(); -extern "C" void cc_set__11daB_ZANTM_cFv(); -extern "C" void execute__11daB_ZANTM_cFv(); -extern "C" static void daB_ZANTM_Execute__FP11daB_ZANTM_c(); -extern "C" static bool daB_ZANTM_IsDelete__FP11daB_ZANTM_c(); -extern "C" bool _delete__11daB_ZANTM_cFv(); -extern "C" static void daB_ZANTM_Delete__FP11daB_ZANTM_c(); -extern "C" void create__11daB_ZANTM_cFv(); -extern "C" void __ct__11daB_ZANTM_cFv(); -extern "C" void __dt__8cM3dGSphFv(); -extern "C" void __dt__8cM3dGAabFv(); -extern "C" void __dt__10dCcD_GSttsFv(); -extern "C" void __dt__12dBgS_ObjAcchFv(); -extern "C" void __dt__12dBgS_AcchCirFv(); -extern "C" static void daB_ZANTM_Create__FP11daB_ZANTM_c(); -extern "C" void __dt__10cCcD_GSttsFv(); -extern "C" static void func_80650484(); -extern "C" static void func_8065048C(); - -// -// External References: -// - -extern "C" void transS__14mDoMtx_stack_cFRC4cXyz(); -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void fopAcM_SearchByID__FUiPP10fopAc_ac_c(); -extern "C" void fopAcM_delete__FP10fopAc_ac_c(); -extern "C" void fopAcM_SetMin__FP10fopAc_ac_cfff(); -extern "C" void fopAcM_SetMax__FP10fopAc_ac_cfff(); -extern "C" void fopAcM_posMoveF__FP10fopAc_ac_cPC4cXyz(); -extern "C" void getEmitter__Q213dPa_control_c7level_cFUl(); -extern "C" void -set__13dPa_control_cFUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf(); -extern "C" void -set__13dPa_control_cFUlUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf(); -extern "C" void __ct__12dBgS_AcchCirFv(); -extern "C" void SetWall__12dBgS_AcchCirFff(); -extern "C" void __dt__9dBgS_AcchFv(); -extern "C" void __ct__9dBgS_AcchFv(); -extern "C" void Set__9dBgS_AcchFP4cXyzP4cXyzP10fopAc_ac_ciP12dBgS_AcchCirP4cXyzP5csXyzP5csXyz(); -extern "C" void CrrPos__9dBgS_AcchFR4dBgS(); -extern "C" void SetObj__16dBgS_PolyPassChkFv(); -extern "C" void __ct__10dCcD_GSttsFv(); -extern "C" void Move__10dCcD_GSttsFv(); -extern "C" void Init__9dCcD_SttsFiiP10fopAc_ac_c(); -extern "C" void __ct__12dCcD_GObjInfFv(); -extern "C" void ChkAtHit__12dCcD_GObjInfFv(); -extern "C" void ChkTgHit__12dCcD_GObjInfFv(); -extern "C" void Set__8dCcD_CpsFRC11dCcD_SrcCps(); -extern "C" void CalcAtVec__8dCcD_CpsFv(); -extern "C" void Set__8dCcD_SphFRC11dCcD_SrcSph(); -extern "C" void checkMasterSwordEquip__9daPy_py_cFv(); -extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c(); -extern "C" void Set__4cCcSFP8cCcD_Obj(); -extern "C" void __ml__4cXyzCFf(); -extern "C" void __dt__13cBgS_PolyInfoFv(); -extern "C" void __dt__8cM3dGCirFv(); -extern "C" void __ct__8cM3dGCpsFv(); -extern "C" void Set__8cM3dGCpsFRC4cXyzRC4cXyzf(); -extern "C" void SetC__8cM3dGSphFRC4cXyz(); -extern "C" void SetR__8cM3dGSphFf(); -extern "C" void cLib_chaseF__FPfff(); -extern "C" void cLib_chaseAngleS__FPsss(); -extern "C" void cLib_targetAngleY__FPC3VecPC3Vec(); -extern "C" void cLib_targetAngleX__FPC4cXyzPC4cXyz(); -extern "C" void seStart__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc(); -extern "C" void seStartLevel__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc(); -extern "C" void __dl__FPv(); -extern "C" void _savegpr_23(); -extern "C" void _savegpr_26(); -extern "C" void _savegpr_27(); -extern "C" void _savegpr_29(); -extern "C" void _restgpr_23(); -extern "C" void _restgpr_26(); -extern "C" void _restgpr_27(); -extern "C" void _restgpr_29(); -extern "C" extern void* __vt__8dCcD_Sph[36]; -extern "C" extern void* __vt__8dCcD_Cps[36]; -extern "C" extern void* __vt__9dCcD_Stts[11]; -extern "C" extern void* __vt__12cCcD_SphAttr[25]; -extern "C" extern void* __vt__12cCcD_CpsAttr[25]; -extern "C" extern void* __vt__14cCcD_ShapeAttr[22]; -extern "C" extern void* __vt__9cCcD_Stts[8]; -extern "C" u8 now__14mDoMtx_stack_c[48]; -extern "C" extern u8 g_dComIfG_gameInfo[122384]; -extern "C" u8 sincosTable___5JMath[65536]; -extern "C" extern u8 mStayNo__20dStage_roomControl_c[4]; -extern "C" u8 mParticleTracePCB__13dPa_control_c[4 + 4 /* padding */]; -extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */]; -extern "C" void getMagicSpeed__10daB_ZANT_cFv(); -extern "C" void getMagicWaterSpeed__10daB_ZANT_cFv(); - -// -// Declarations: -// +#include "d/actor/d_a_b_zant.h" +#include "d/d_com_inf_game.h" +#include "d/actor/d_a_player.h" +#include "SSystem/SComponent/c_math.h" +#include /* 8064F778-8064F7B4 000078 003C+00 1/1 0/0 0/0 .text draw__11daB_ZANTM_cFv */ -void daB_ZANTM_c::draw() { - // NONMATCHING +int daB_ZANTM_c::draw() { + g_env_light.settingTevStruct(0, ¤t.pos, &tevStr); + return 1; } /* 8064F7B4-8064F7D4 0000B4 0020+00 1/0 0/0 0/0 .text daB_ZANTM_Draw__FP11daB_ZANTM_c */ -static void daB_ZANTM_Draw(daB_ZANTM_c* param_0) { - // NONMATCHING +static int daB_ZANTM_Draw(daB_ZANTM_c* i_this) { + return i_this->draw(); } -/* ############################################################################################## */ -/* 8065049C-806504A0 000000 0004+00 5/5 0/0 0/0 .rodata @3721 */ -SECTION_RODATA static f32 const lit_3721 = 0.5f; -COMPILER_STRIP_GATE(0x8065049C, &lit_3721); - -/* 806504A0-806504A4 000004 0004+00 0/1 0/0 0/0 .rodata @3722 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3722 = 4.0f / 5.0f; -COMPILER_STRIP_GATE(0x806504A0, &lit_3722); -#pragma pop - -/* 806504A4-806504A8 000008 0004+00 0/3 0/0 0/0 .rodata @3723 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3723 = 1.0f; -COMPILER_STRIP_GATE(0x806504A4, &lit_3723); -#pragma pop - -/* 806504E8-806504F4 000000 000C+00 1/1 0/0 0/0 .data cNullVec__6Z2Calc */ -SECTION_DATA static u8 cNullVec__6Z2Calc[12] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -/* 806504F4-80650508 00000C 0004+10 0/0 0/0 0/0 .data @1787 */ -#pragma push -#pragma force_active on -SECTION_DATA static u32 lit_1787[1 + 4 /* padding */] = { - 0x02000201, - /* padding */ - 0x40080000, - 0x00000000, - 0x3FE00000, - 0x00000000, -}; -#pragma pop +UNK_REL_DATA +namespace { /* 80650508-80650554 000020 004C+00 0/1 0/0 0/0 .data * cc_zant_src__30@unnamed@d_a_b_zant_magic_cpp@ */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 data_80650508[76] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, - 0xD8, 0xFB, 0xFD, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xA0, 0x00, 0x00, +dCcD_SrcCps cc_zant_src = { + { + {0, {{AT_TYPE_CSTATUE_SWING, 2, 0x1D}, {0xD8FBFDFF, 0}, 0}}, + {dCcD_SE_13, 0, 1, 0, {0}}, + {dCcD_SE_NONE, 0, 0, 0, {2}}, + {0}, + }, + {{ + {0.0f, 0.0f, 0.0f}, + {0.0f, 0.0f, 0.0f}, + 20.0f, + }}, }; -#pragma pop /* 80650554-80650594 00006C 0040+00 0/1 0/0 0/0 .data * cc_zant_src2__30@unnamed@d_a_b_zant_magic_cpp@ */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 data_80650554[64] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, +dCcD_SrcSph cc_zant_src2 = { + { + {0x0, {{0x400, 0x2, 0x0}, {0x6000, 0x3}, 0x0}}, // mObj + {dCcD_SE_METAL, 0x0, 0x0, 0x0, 0x0}, // mGObjAt + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x3}, // mGObjTg + {0x0}, // mGObjCo + }, // mObjInf + { + {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph + } // mSphAttr }; -#pragma pop /* 80650594-806505D4 0000AC 0040+00 0/1 0/0 0/0 .data * cc_zant_src3__30@unnamed@d_a_b_zant_magic_cpp@ */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 data_80650594[64] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, -}; -#pragma pop - -/* 806505D4-806505DC 0000EC 0008+00 1/1 0/0 0/0 .data magic_effect_id$3667 */ -SECTION_DATA static u8 magic_effect_id_3667[8] = { - 0x89, 0x0D, 0x89, 0x0E, 0x89, 0x0F, 0x89, 0x10, +dCcD_SrcSph cc_zant_src3 = { + { + {0x0, {{0x400, 0x2, 0x0}, {0x2, 0x3}, 0x0}}, // mObj + {dCcD_SE_METAL, 0x0, 0x0, 0x0, 0x0}, // mGObjAt + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg + {0x0}, // mGObjCo + }, // mObjInf + { + {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph + } // mSphAttr }; +} /* 8064F7D4-8064F938 0000D4 0164+00 1/1 0/0 0/0 .text setMagicEffect__11daB_ZANTM_cFv */ void daB_ZANTM_c::setMagicEffect() { - // NONMATCHING + static u16 magic_effect_id[] = { + 0x890D, 0x890E, 0x890F, 0x8910, + }; + + cXyz size(0.5f, 0.5f, 0.5f); + cXyz sp30(current.pos); + field_0x5dc = speed * 0.8f; + + for (int i = 0; i < 4; i++) { + field_0xbfc[i] = dComIfGp_particle_set(field_0xbfc[i], magic_effect_id[i], &sp30, &tevStr, &shape_angle, &size, 0xFF, NULL, -1, NULL, NULL, NULL); + + JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(field_0xbfc[i]); + if (emitter != NULL) { + emitter->setGlobalScale(size); + emitter->setParticleCallBackPtr(dPa_control_c::getParticleTracePCB()); + emitter->setUserWork((u32)&field_0x5dc); + } + } } -/* ############################################################################################## */ -/* 806504A8-806504AC 00000C 0004+00 0/2 0/0 0/0 .rodata @3753 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3753 = -1.0f; -COMPILER_STRIP_GATE(0x806504A8, &lit_3753); -#pragma pop - -/* 806504AC-806504B0 000010 0004+00 0/1 0/0 0/0 .rodata @3754 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3754 = 25.0f; -COMPILER_STRIP_GATE(0x806504AC, &lit_3754); -#pragma pop - -/* 806505DC-806505E4 0000F4 0008+00 1/1 0/0 0/0 .data magic_effect_id$3729 */ -SECTION_DATA static u8 magic_effect_id_3729[8] = { - 0x88, 0x62, 0x88, 0x63, 0x88, 0x64, 0x88, 0x65, -}; - /* 8064F938-8064FA50 000238 0118+00 1/1 0/0 0/0 .text setMagicHitEffect__11daB_ZANTM_cFv */ void daB_ZANTM_c::setMagicHitEffect() { - // NONMATCHING -} + static u16 magic_effect_id[] = { + 0x8862, 0x8863, 0x8864, 0x8865, + }; -/* ############################################################################################## */ -/* 806504B0-806504B4 000014 0004+00 0/1 0/0 0/0 .rodata @3858 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3858 = 40.0f; -COMPILER_STRIP_GATE(0x806504B0, &lit_3858); -#pragma pop - -/* 806504B4-806504B8 000018 0004+00 0/1 0/0 0/0 .rodata @3859 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3859 = 100.0f; -COMPILER_STRIP_GATE(0x806504B4, &lit_3859); -#pragma pop - -/* 806504B8-806504BC 00001C 0004+00 0/2 0/0 0/0 .rodata @3860 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_3860[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x806504B8, &lit_3860); -#pragma pop - -/* 806504BC-806504C0 000020 0004+00 0/1 0/0 0/0 .rodata @3861 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3861 = 60.0f; -COMPILER_STRIP_GATE(0x806504BC, &lit_3861); -#pragma pop - -/* 806504C0-806504C4 000024 0004+00 0/1 0/0 0/0 .rodata @3862 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3862 = 260.0f; -COMPILER_STRIP_GATE(0x806504C0, &lit_3862); -#pragma pop - -/* 806504C4-806504CC 000028 0004+04 0/1 0/0 0/0 .rodata @3863 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3863[1 + 1 /* padding */] = { - 1.0f / 10.0f, - /* padding */ - 0.0f, -}; -COMPILER_STRIP_GATE(0x806504C4, &lit_3863); -#pragma pop - -/* 806504CC-806504D4 000030 0008+00 0/1 0/0 0/0 .rodata @3865 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_3865[8] = { - 0x43, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x806504CC, &lit_3865); -#pragma pop + Z2GetAudioMgr()->seStart(Z2SE_EN_ZAN_FIRE_BURST, ¤t.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, false); + + cXyz size(0.5f, 0.5f, 0.5f); + cXyz sp34(current.pos); + sp34.y -= 25.0f; + + for (int i = 0; i < 4; i++) { + dComIfGp_particle_set(magic_effect_id[i], ¤t.pos, &tevStr, &shape_angle, &size); + } +} /* 8064FA50-8064FD6C 000350 031C+00 1/1 0/0 0/0 .text executeSmall__11daB_ZANTM_cFv */ void daB_ZANTM_c::executeSmall() { - // NONMATCHING + cXyz target_pos; + daPy_getPlayerActorClass(); + + if (daPy_py_c::checkMasterSwordEquip()) { + mTgCollider.OnTgSetBit(); + } else { + mTgCollider.OffTgSetBit(); + } + + fopAc_ac_c* boss; + fopAcM_SearchByID(fopAcM_GetLinkId(this), &boss); + + f32 magic_speed; + if (boss != NULL) { + if (dComIfGp_roomControl_getStayNo() == 55) { + magic_speed = ((daB_ZANT_c*)boss)->getMagicWaterSpeed(); + } else { + magic_speed = ((daB_ZANT_c*)boss)->getMagicSpeed(); + } + } else { + if (dComIfGp_roomControl_getStayNo() == 55) { + magic_speed = 40.0f; + } else { + magic_speed = 100.0f; + } + } + + switch (mMode) { + case 0: + mAliveTimer = 900; + mMode = 1; + field_0x5e8 = 0.0f; + + target_pos = daPy_getPlayerActorClass()->current.pos; + target_pos.y += mPrm * 60.0f - 260.0f; + + if (dComIfGp_roomControl_getStayNo() != 55) { + cLib_chaseAngleS(¤t.angle.y, cLib_targetAngleY(¤t.pos, &target_pos), 0x2000); + } + + cLib_chaseAngleS(¤t.angle.x, cLib_targetAngleX(¤t.pos, &target_pos), 0x2000); + speedF = std::abs(magic_speed * cM_scos(current.angle.x)); + speed.y = magic_speed * cM_ssin(current.angle.x); + Z2GetAudioMgr()->seStart(Z2SE_EN_ZAN_FIRE_OUT, ¤t.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, false); + case 1: + Z2GetAudioMgr()->seStart(Z2SE_EN_ZAN_FIRE, ¤t.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, false); + cLib_chaseF(&field_0x5e8, 1.0f, 0.1f); + + if (mAliveTimer == 0 || mAcch.ChkWallHit() || mAcch.i_ChkGroundHit()) { + speed.z = 0.0f; + speed.y = 0.0f; + speed.x = 0.0f; + + setMagicHitEffect(); + fopAcM_delete(this); + } + + cXyz* phitpos = NULL; + if (mAtCollider.ChkAtHit()) { + phitpos = mAtCollider.GetAtHitPosP(); + } else if (mTgCollider.ChkTgHit()) { + phitpos = mTgCollider.GetTgHitPosP(); + } + + if (phitpos != NULL) { + current.pos = *phitpos; + speed.z = 0.0f; + speed.y = 0.0f; + speed.x = 0.0f; + + setMagicHitEffect(); + fopAcM_delete(this); + } + break; + } } -/* ############################################################################################## */ -/* 806504D4-806504D8 000038 0004+00 0/1 0/0 0/0 .rodata @3878 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3878 = 30.0f; -COMPILER_STRIP_GATE(0x806504D4, &lit_3878); -#pragma pop - -/* 806504D8-806504DC 00003C 0004+00 0/2 0/0 0/0 .rodata @3879 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3879 = 20.0f; -COMPILER_STRIP_GATE(0x806504D8, &lit_3879); -#pragma pop - -/* 806504DC-806504E0 000040 0004+00 0/1 0/0 0/0 .rodata @3880 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3880 = 50.0f; -COMPILER_STRIP_GATE(0x806504DC, &lit_3880); -#pragma pop - /* 8064FD6C-8064FE6C 00066C 0100+00 1/1 0/0 0/0 .text cc_set__11daB_ZANTM_cFv */ void daB_ZANTM_c::cc_set() { - // NONMATCHING + eyePos = current.pos; + eyePos.y += 30.0f; + + attention_info.position = eyePos; + attention_info.position.y += 30.0f; + + mAtCollider.cM3dGCps::Set(old.pos, current.pos, 20.0f); + mAtCollider.CalcAtVec(); + dComIfG_Ccsp()->Set(&mAtCollider); + + field_0x848.SetC(current.pos); + field_0x848.SetR(50.0f); + dComIfG_Ccsp()->Set(&field_0x848); + + mTgCollider.SetC(current.pos); + mTgCollider.SetR(50.0f); + dComIfG_Ccsp()->Set(&mTgCollider); } /* 8064FE6C-8064FF04 00076C 0098+00 1/1 0/0 0/0 .text execute__11daB_ZANTM_cFv */ -void daB_ZANTM_c::execute() { - // NONMATCHING +int daB_ZANTM_c::execute() { + if (mAliveTimer != 0) { + mAliveTimer--; + } + + executeSmall(); + setMagicEffect(); + + mCcStts.Move(); + fopAcM_posMoveF(this, mCcStts.GetCCMoveP()); + mAcch.CrrPos(dComIfG_Bgsp()); + + cc_set(); + + mDoMtx_stack_c::transS(current.pos); + cMtx_copy(mDoMtx_stack_c::get(), field_0x5ac); + return 1; } /* 8064FF04-8064FF24 000804 0020+00 1/0 0/0 0/0 .text daB_ZANTM_Execute__FP11daB_ZANTM_c */ -static void daB_ZANTM_Execute(daB_ZANTM_c* param_0) { - // NONMATCHING +static int daB_ZANTM_Execute(daB_ZANTM_c* i_this) { + return i_this->execute(); } /* 8064FF24-8064FF2C 000824 0008+00 1/0 0/0 0/0 .text daB_ZANTM_IsDelete__FP11daB_ZANTM_c */ -static bool daB_ZANTM_IsDelete(daB_ZANTM_c* param_0) { - return true; +static int daB_ZANTM_IsDelete(daB_ZANTM_c* i_this) { + return 1; } /* 8064FF2C-8064FF34 00082C 0008+00 1/1 0/0 0/0 .text _delete__11daB_ZANTM_cFv */ -bool daB_ZANTM_c::_delete() { - return true; +int daB_ZANTM_c::_delete() { + return 1; } /* 8064FF34-8064FF54 000834 0020+00 1/0 0/0 0/0 .text daB_ZANTM_Delete__FP11daB_ZANTM_c */ -static void daB_ZANTM_Delete(daB_ZANTM_c* param_0) { - // NONMATCHING +static int daB_ZANTM_Delete(daB_ZANTM_c* i_this) { + return i_this->_delete(); } -/* ############################################################################################## */ -/* 806504E0-806504E4 000044 0004+00 0/1 0/0 0/0 .rodata @3939 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3939 = -400.0f; -COMPILER_STRIP_GATE(0x806504E0, &lit_3939); -#pragma pop - -/* 806504E4-806504E8 000048 0004+00 0/1 0/0 0/0 .rodata @3940 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3940 = 400.0f; -COMPILER_STRIP_GATE(0x806504E4, &lit_3940); -#pragma pop - /* 8064FF54-806500A8 000854 0154+00 1/1 0/0 0/0 .text create__11daB_ZANTM_cFv */ -void daB_ZANTM_c::create() { - // NONMATCHING +int daB_ZANTM_c::create() { + fopAcM_SetupActor(this, daB_ZANTM_c); + OS_REPORT("B_ZANTM PARAM %x\n", fopAcM_GetParam(this)); + + mPrm = fopAcM_GetParam(this); + attention_info.flags = 0; + + mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, &mAcchCir, fopAcM_GetSpeed_p(this), NULL, NULL); + + fopAcM_SetMtx(this, field_0x5ac); + fopAcM_SetMin(this, -400.0f, -400.0f, -400.0f); + fopAcM_SetMax(this, 400.0f, 400.0f, 400.0f); + + health = 80; + field_0x560 = 80; + + mCcStts.Init(0xFF, 0, this); + mAtCollider.Set(cc_zant_src); + mAcchCir.SetWall(20.0f, 20.0f); + mAtCollider.SetAtSpl(dCcG_At_Spl_UNK_0); + mAtCollider.SetAtAtp(2); + mAtCollider.SetStts(&mCcStts); + + field_0x848.Set(cc_zant_src2); + field_0x848.SetStts(&mCcStts); + + mTgCollider.Set(cc_zant_src3); + mTgCollider.SetStts(&mCcStts); + + gravity = 0.0f; + return cPhs_COMPLEATE_e; +} + +static int daB_ZANTM_Create(daB_ZANTM_c* i_this) { + return i_this->create(); } -/* ############################################################################################## */ /* 806505E4-80650604 -00001 0020+00 1/0 0/0 0/0 .data l_daB_ZANTM_Method */ static actor_method_class l_daB_ZANTM_Method = { - (process_method_func)daB_ZANTM_Create__FP11daB_ZANTM_c, - (process_method_func)daB_ZANTM_Delete__FP11daB_ZANTM_c, - (process_method_func)daB_ZANTM_Execute__FP11daB_ZANTM_c, - (process_method_func)daB_ZANTM_IsDelete__FP11daB_ZANTM_c, - (process_method_func)daB_ZANTM_Draw__FP11daB_ZANTM_c, + (process_method_func)daB_ZANTM_Create, + (process_method_func)daB_ZANTM_Delete, + (process_method_func)daB_ZANTM_Execute, + (process_method_func)daB_ZANTM_IsDelete, + (process_method_func)daB_ZANTM_Draw, }; /* 80650604-80650634 -00001 0030+00 0/0 0/0 1/0 .data g_profile_B_ZANTM */ @@ -400,108 +316,3 @@ extern actor_process_profile_definition g_profile_B_ZANTM = { fopAc_ENEMY_e, // mActorType fopAc_CULLBOX_CUSTOM_e, // cullType }; - -/* 80650634-80650640 00014C 000C+00 1/1 0/0 0/0 .data __vt__12dBgS_AcchCir */ -SECTION_DATA extern void* __vt__12dBgS_AcchCir[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12dBgS_AcchCirFv, -}; - -/* 80650640-8065064C 000158 000C+00 2/2 0/0 0/0 .data __vt__10cCcD_GStts */ -SECTION_DATA extern void* __vt__10cCcD_GStts[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__10cCcD_GSttsFv, -}; - -/* 8065064C-80650658 000164 000C+00 1/1 0/0 0/0 .data __vt__10dCcD_GStts */ -SECTION_DATA extern void* __vt__10dCcD_GStts[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__10dCcD_GSttsFv, -}; - -/* 80650658-80650664 000170 000C+00 2/2 0/0 0/0 .data __vt__8cM3dGSph */ -SECTION_DATA extern void* __vt__8cM3dGSph[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGSphFv, -}; - -/* 80650664-80650670 00017C 000C+00 2/2 0/0 0/0 .data __vt__8cM3dGAab */ -SECTION_DATA extern void* __vt__8cM3dGAab[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGAabFv, -}; - -/* 80650670-80650694 000188 0024+00 2/2 0/0 0/0 .data __vt__12dBgS_ObjAcch */ -SECTION_DATA extern void* __vt__12dBgS_ObjAcch[9] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12dBgS_ObjAcchFv, - (void*)NULL, - (void*)NULL, - (void*)func_8065048C, - (void*)NULL, - (void*)NULL, - (void*)func_80650484, -}; - -/* 806500A8-80650250 0009A8 01A8+00 1/1 0/0 0/0 .text __ct__11daB_ZANTM_cFv */ -daB_ZANTM_c::daB_ZANTM_c() { - // NONMATCHING -} - -/* 80650250-80650298 000B50 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGSphFv */ -// cM3dGSph::~cM3dGSph() { -extern "C" void __dt__8cM3dGSphFv() { - // NONMATCHING -} - -/* 80650298-806502E0 000B98 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGAabFv */ -// cM3dGAab::~cM3dGAab() { -extern "C" void __dt__8cM3dGAabFv() { - // NONMATCHING -} - -/* 806502E0-8065033C 000BE0 005C+00 1/0 0/0 0/0 .text __dt__10dCcD_GSttsFv */ -// dCcD_GStts::~dCcD_GStts() { -extern "C" void __dt__10dCcD_GSttsFv() { - // NONMATCHING -} - -/* 8065033C-806503AC 000C3C 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */ -// dBgS_ObjAcch::~dBgS_ObjAcch() { -extern "C" void __dt__12dBgS_ObjAcchFv() { - // NONMATCHING -} - -/* 806503AC-8065041C 000CAC 0070+00 1/0 0/0 0/0 .text __dt__12dBgS_AcchCirFv */ -// dBgS_AcchCir::~dBgS_AcchCir() { -extern "C" void __dt__12dBgS_AcchCirFv() { - // NONMATCHING -} - -/* 8065041C-8065043C 000D1C 0020+00 1/0 0/0 0/0 .text daB_ZANTM_Create__FP11daB_ZANTM_c - */ -static void daB_ZANTM_Create(daB_ZANTM_c* param_0) { - // NONMATCHING -} - -/* 8065043C-80650484 000D3C 0048+00 1/0 0/0 0/0 .text __dt__10cCcD_GSttsFv */ -// cCcD_GStts::~cCcD_GStts() { -extern "C" void __dt__10cCcD_GSttsFv() { - // NONMATCHING -} - -/* 80650484-8065048C 000D84 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */ -static void func_80650484() { - // NONMATCHING -} - -/* 8065048C-80650494 000D8C 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */ -static void func_8065048C() { - // NONMATCHING -} \ No newline at end of file diff --git a/src/d/actor/d_a_b_zant_mobile.cpp b/src/d/actor/d_a_b_zant_mobile.cpp index 67eacb9717e..623b3ca55c1 100644 --- a/src/d/actor/d_a_b_zant_mobile.cpp +++ b/src/d/actor/d_a_b_zant_mobile.cpp @@ -4,706 +4,549 @@ */ #include "d/actor/d_a_b_zant_mobile.h" -#include "dol2asm.h" - - - -// -// Forward References: -// - -extern "C" void __ct__15daB_ZANTZ_HIO_cFv(); -extern "C" void draw__11daB_ZANTZ_cFv(); -extern "C" static void daB_ZANTZ_Draw__FP11daB_ZANTZ_c(); -extern "C" void setSnortEffect__11daB_ZANTZ_cFi(); -extern "C" void calcSnortEffect__11daB_ZANTZ_cFv(); -extern "C" void setMouthMode__11daB_ZANTZ_cFUc(); -extern "C" void setAppearMode__11daB_ZANTZ_cFUc(); -extern "C" void getGroundPos__11daB_ZANTZ_cFv(); -extern "C" void __dt__14dBgS_ObjGndChkFv(); -extern "C" void action__11daB_ZANTZ_cFv(); -extern "C" void cc_set__11daB_ZANTZ_cFv(); -extern "C" void execute__11daB_ZANTZ_cFv(); -extern "C" static void daB_ZANTZ_Execute__FP11daB_ZANTZ_c(); -extern "C" static bool daB_ZANTZ_IsDelete__FP11daB_ZANTZ_c(); -extern "C" void _delete__11daB_ZANTZ_cFv(); -extern "C" static void daB_ZANTZ_Delete__FP11daB_ZANTZ_c(); -extern "C" void CreateHeap__11daB_ZANTZ_cFv(); -extern "C" void __dt__12J3DFrameCtrlFv(); -extern "C" static void useHeapInit__FP10fopAc_ac_c(); -extern "C" void create__11daB_ZANTZ_cFv(); -extern "C" void __dt__8dCcD_CylFv(); -extern "C" void __ct__8dCcD_CylFv(); -extern "C" void __dt__8cM3dGCylFv(); -extern "C" void __dt__8cM3dGAabFv(); -extern "C" void __dt__8dCcD_SphFv(); -extern "C" void __ct__8dCcD_SphFv(); -extern "C" void __dt__8cM3dGSphFv(); -extern "C" static void daB_ZANTZ_Create__FP11daB_ZANTZ_c(); -extern "C" void __dt__15daB_ZANTZ_HIO_cFv(); -extern "C" void __sinit_d_a_b_zant_mobile_cpp(); -extern "C" static void func_80652710(); -extern "C" static void func_80652718(); -extern "C" static void func_80652720(); -extern "C" extern char const* const d_a_b_zant_mobile__stringBase0; - -// -// External References: -// - -extern "C" void transS__14mDoMtx_stack_cFRC4cXyz(); -extern "C" void transM__14mDoMtx_stack_cFfff(); -extern "C" void scaleM__14mDoMtx_stack_cFfff(); -extern "C" void ZXYrotM__14mDoMtx_stack_cFRC5csXyz(); -extern "C" void play__14mDoExt_baseAnmFv(); -extern "C" void init__13mDoExt_brkAnmFP16J3DMaterialTableP15J3DAnmTevRegKeyiifss(); -extern "C" void entry__13mDoExt_brkAnmFP16J3DMaterialTablef(); -extern "C" void -__ct__16mDoExt_McaMorfSOFP12J3DModelDataP25mDoExt_McaMorfCallBack1_cP25mDoExt_McaMorfCallBack2_cP15J3DAnmTransformifiiP10Z2CreatureUlUl(); -extern "C" void setAnm__16mDoExt_McaMorfSOFP15J3DAnmTransformiffff(); -extern "C" void play__16mDoExt_McaMorfSOFUlSc(); -extern "C" void entryDL__16mDoExt_McaMorfSOFv(); -extern "C" void modelCalc__16mDoExt_McaMorfSOFv(); -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl(); -extern "C" void fopAcM_SetMin__FP10fopAc_ac_cfff(); -extern "C" void fopAcM_SetMax__FP10fopAc_ac_cfff(); -extern "C" void fopAcM_posMoveF__FP10fopAc_ac_cPC4cXyz(); -extern "C" void fopAcM_searchActorAngleY__FPC10fopAc_ac_cPC10fopAc_ac_c(); -extern "C" void dComIfG_resLoad__FP30request_of_phase_process_classPCc(); -extern "C" void dComIfG_resDelete__FP30request_of_phase_process_classPCc(); -extern "C" void dComIfGp_getReverb__Fi(); -extern "C" void getRes__14dRes_control_cFPCclP11dRes_info_ci(); -extern "C" void -set__13dPa_control_cFUlUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf(); -extern "C" void StartShock__12dVibration_cFii4cXyz(); -extern "C" void StartQuake__12dVibration_cFii4cXyz(); -extern "C" void StopQuake__12dVibration_cFi(); -extern "C" void Release__4cBgSFP9dBgW_Base(); -extern "C" void GroundCross__4cBgSFP11cBgS_GndChk(); -extern "C" void GetActorPointer__4cBgSCFi(); -extern "C" void Regist__4dBgSFP9dBgW_BaseP10fopAc_ac_c(); -extern "C" void dBgS_MoveBGProc_Typical__FP4dBgWPvRC13cBgS_PolyInfobP4cXyzP5csXyzP5csXyz(); -extern "C" void __ct__11dBgS_GndChkFv(); -extern "C" void __dt__11dBgS_GndChkFv(); -extern "C" void SetObj__16dBgS_PolyPassChkFv(); -extern "C" void Set__4cBgWFP6cBgD_tUlPA3_A4_f(); -extern "C" void __ct__4dBgWFv(); -extern "C" void Move__4dBgWFv(); -extern "C" void __ct__10dCcD_GSttsFv(); -extern "C" void Init__9dCcD_SttsFiiP10fopAc_ac_c(); -extern "C" void __ct__12dCcD_GObjInfFv(); -extern "C" void __dt__12dCcD_GObjInfFv(); -extern "C" void ChkCoHit__12dCcD_GObjInfFv(); -extern "C" void GetCoHitObj__12dCcD_GObjInfFv(); -extern "C" void Set__8dCcD_CylFRC11dCcD_SrcCyl(); -extern "C" void Set__8dCcD_SphFRC11dCcD_SrcSph(); -extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c(); -extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c(); -extern "C" void GetAc__8cCcD_ObjFv(); -extern "C" void Set__4cCcSFP8cCcD_Obj(); -extern "C" void SetPos__11cBgS_GndChkFPC4cXyz(); -extern "C" void SetC__8cM3dGCylFRC4cXyz(); -extern "C" void SetH__8cM3dGCylFf(); -extern "C" void SetR__8cM3dGCylFf(); -extern "C" void SetC__8cM3dGSphFRC4cXyz(); -extern "C" void SetR__8cM3dGSphFf(); -extern "C" void cLib_addCalc__FPfffff(); -extern "C" void cLib_addCalcAngleS2__FPssss(); -extern "C" void cLib_chaseF__FPfff(); -extern "C" void cLib_targetAngleY__FPC3VecPC3Vec(); -extern "C" void cLib_offsetPos__FP4cXyzPC4cXyzsPC4cXyz(); -extern "C" void seStart__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc(); -extern "C" void seStartLevel__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc(); -extern "C" void __ct__15Z2CreatureEnemyFv(); -extern "C" void* __nw__FUl(); -extern "C" void __dl__FPv(); -extern "C" void init__12J3DFrameCtrlFs(); -extern "C" void checkPass__12J3DFrameCtrlFf(); -extern "C" void __construct_array(); -extern "C" void _savegpr_24(); -extern "C" void _savegpr_26(); -extern "C" void _savegpr_28(); -extern "C" void _restgpr_24(); -extern "C" void _restgpr_26(); -extern "C" void _restgpr_28(); -extern "C" extern void* __vt__8dCcD_Sph[36]; -extern "C" extern void* __vt__8dCcD_Cyl[36]; -extern "C" extern void* __vt__9dCcD_Stts[11]; -extern "C" extern void* __vt__12cCcD_SphAttr[25]; -extern "C" extern void* __vt__12cCcD_CylAttr[25]; -extern "C" extern void* __vt__14cCcD_ShapeAttr[22]; -extern "C" extern void* __vt__9cCcD_Stts[8]; -extern "C" u8 now__14mDoMtx_stack_c[48]; -extern "C" extern u8 g_dComIfG_gameInfo[122384]; -extern "C" u8 sincosTable___5JMath[65536]; -extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */]; -extern "C" void __register_global_object(); - -// -// Declarations: -// - -/* ############################################################################################## */ -/* 8065273C-80652740 000000 0004+00 10/10 0/0 0/0 .rodata @3649 */ -SECTION_RODATA static f32 const lit_3649 = 1.0f; -COMPILER_STRIP_GATE(0x8065273C, &lit_3649); +#include "d/d_com_inf_game.h" +#include "d/d_cc_uty.h" +#include "d/actor/d_a_player.h" +#include "SSystem/SComponent/c_math.h" +#include +namespace { /* 806527DC-8065281C 000000 0040+00 1/1 0/0 0/0 .data * cc_zant_src__31@unnamed@d_a_b_zant_mobile_cpp@ */ -SECTION_DATA static u8 data_806527DC[64] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xD8, 0xFB, 0xFD, 0xFF, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x55, 0x09, 0x00, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, +dCcD_SrcSph cc_zant_src = { + { + {0x0, {{0x0, 0x1, 0x0}, {0xD8FBFDFF, 0x3}, 0x55}}, // mObj + {dCcD_SE_METAL, 0x0, 0x1, 0x0, 0x0}, // mGObjAt + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x303}, // mGObjTg + {0x0}, // mGObjCo + }, // mObjInf + { + {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph + } // mSphAttr }; /* 8065281C-80652860 000040 0044+00 1/1 0/0 0/0 .data * cc_zant_snort_src__31@unnamed@d_a_b_zant_mobile_cpp@ */ -SECTION_DATA static u8 data_8065281C[68] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xD8, 0xFB, 0xFD, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, - 0x09, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, -}; - -/* 80652860-80652880 -00001 0020+00 1/0 0/0 0/0 .data l_daB_ZANTZ_Method */ -static actor_method_class l_daB_ZANTZ_Method = { - (process_method_func)daB_ZANTZ_Create__FP11daB_ZANTZ_c, - (process_method_func)daB_ZANTZ_Delete__FP11daB_ZANTZ_c, - (process_method_func)daB_ZANTZ_Execute__FP11daB_ZANTZ_c, - (process_method_func)daB_ZANTZ_IsDelete__FP11daB_ZANTZ_c, - (process_method_func)daB_ZANTZ_Draw__FP11daB_ZANTZ_c, -}; - -/* 80652880-806528B0 -00001 0030+00 0/0 0/0 1/0 .data g_profile_B_ZANTZ */ -extern actor_process_profile_definition g_profile_B_ZANTZ = { - fpcLy_CURRENT_e, // mLayerID - 4, // mListID - fpcPi_CURRENT_e, // mListPrio - PROC_B_ZANTZ, // mProcName - &g_fpcLf_Method.mBase, // sub_method - sizeof(daB_ZANTZ_c), // mSize - 0, // mSizeOther - 0, // mParameters - &g_fopAc_Method.base, // sub_method - 228, // mPriority - &l_daB_ZANTZ_Method, // sub_method - 0x00040000, // mStatus - fopAc_ENEMY_e, // mActorType - fopAc_CULLBOX_CUSTOM_e, // cullType -}; - -/* 806528B0-806528BC 0000D4 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGSph */ -SECTION_DATA extern void* __vt__8cM3dGSph[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGSphFv, -}; - -/* 806528BC-806528C8 0000E0 000C+00 5/5 0/0 0/0 .data __vt__8cM3dGAab */ -SECTION_DATA extern void* __vt__8cM3dGAab[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGAabFv, -}; - -/* 806528C8-806528D4 0000EC 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGCyl */ -SECTION_DATA extern void* __vt__8cM3dGCyl[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGCylFv, -}; - -/* 806528D4-806528E0 0000F8 000C+00 2/2 0/0 0/0 .data __vt__12J3DFrameCtrl */ -SECTION_DATA extern void* __vt__12J3DFrameCtrl[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12J3DFrameCtrlFv, -}; - -/* 806528E0-80652910 000104 0030+00 2/2 0/0 0/0 .data __vt__14dBgS_ObjGndChk */ -SECTION_DATA extern void* __vt__14dBgS_ObjGndChk[12] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__14dBgS_ObjGndChkFv, - (void*)NULL, - (void*)NULL, - (void*)func_80652710, - (void*)NULL, - (void*)NULL, - (void*)func_80652720, - (void*)NULL, - (void*)NULL, - (void*)func_80652718, -}; - -/* 80652910-8065291C 000134 000C+00 2/2 0/0 0/0 .data __vt__15daB_ZANTZ_HIO_c */ -SECTION_DATA extern void* __vt__15daB_ZANTZ_HIO_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__15daB_ZANTZ_HIO_cFv, +static dCcD_SrcCyl cc_zant_snort_src = { + { + {0, {{0x400, 0, 0}, {0xD8FBFDFF, 0}, 0x55}}, + {dCcD_SE_METAL, 0, 1, 0, {0}}, + {dCcD_SE_NONE, 0, 0, 0, {2}}, + {0}, + }, + { + {0.0f, 0.0f, 0.0f}, + 40.0f, + 40.0f, + }, }; +} /* 8065078C-806507B0 0000EC 0024+00 1/1 0/0 0/0 .text __ct__15daB_ZANTZ_HIO_cFv */ daB_ZANTZ_HIO_c::daB_ZANTZ_HIO_c() { - // NONMATCHING + field_0x4 = -1; + mModelSize = 1.0f; } /* 806507B0-80650834 000110 0084+00 1/1 0/0 0/0 .text draw__11daB_ZANTZ_cFv */ -void daB_ZANTZ_c::draw() { - // NONMATCHING +int daB_ZANTZ_c::draw() { + J3DModel* model = mpMorf->getModel(); + g_env_light.settingTevStruct(0, ¤t.pos, &tevStr); + g_env_light.setLightTevColorType_MAJI(model, &tevStr); + mpBrk->entry(model->getModelData()); + mpMorf->entryDL(); + return 1; } /* 80650834-80650854 000194 0020+00 1/0 0/0 0/0 .text daB_ZANTZ_Draw__FP11daB_ZANTZ_c */ -static void daB_ZANTZ_Draw(daB_ZANTZ_c* param_0) { - // NONMATCHING +static int daB_ZANTZ_Draw(daB_ZANTZ_c* i_this) { + return i_this->draw(); } -/* ############################################################################################## */ -/* 80652740-80652744 000004 0004+00 1/4 0/0 0/0 .rodata @3688 */ -SECTION_RODATA static f32 const lit_3688 = -1.0f; -COMPILER_STRIP_GATE(0x80652740, &lit_3688); - /* 80650854-806508E0 0001B4 008C+00 0/0 0/0 2/2 .text setSnortEffect__11daB_ZANTZ_cFi */ void daB_ZANTZ_c::setSnortEffect(int param_0) { - // NONMATCHING -} + if (field_0x668 == 0) { + Z2GetAudioMgr()->seStart(Z2SE_EN_ZZ_HANAIKI, ¤t.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); + } -/* ############################################################################################## */ -/* 80652744-80652748 000008 0004+00 0/1 0/0 0/0 .rodata @3746 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3746 = 5.0f; -COMPILER_STRIP_GATE(0x80652744, &lit_3746); -#pragma pop - -/* 80652748-8065274C 00000C 0004+00 0/1 0/0 0/0 .rodata @3747 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3747 = 1.5f; -COMPILER_STRIP_GATE(0x80652748, &lit_3747); -#pragma pop - -/* 8065274C-80652750 000010 0004+00 0/1 0/0 0/0 .rodata @3748 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3748 = 150.0f; -COMPILER_STRIP_GATE(0x8065274C, &lit_3748); -#pragma pop - -/* 80652750-80652754 000014 0004+00 0/1 0/0 0/0 .rodata @3749 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3749 = 800.0f; -COMPILER_STRIP_GATE(0x80652750, &lit_3749); -#pragma pop - -/* 80652754-80652758 000018 0004+00 0/1 0/0 0/0 .rodata @3750 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3750 = 1000.0f; -COMPILER_STRIP_GATE(0x80652754, &lit_3750); -#pragma pop - -/* 80652758-8065275C 00001C 0004+00 0/1 0/0 0/0 .rodata @3751 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3751 = 900.0f; -COMPILER_STRIP_GATE(0x80652758, &lit_3751); -#pragma pop - -/* 8065275C-80652760 000020 0004+00 0/2 0/0 0/0 .rodata @3752 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3752 = 300.0f; -COMPILER_STRIP_GATE(0x8065275C, &lit_3752); -#pragma pop - -/* 80652760-80652764 000024 0004+00 0/1 0/0 0/0 .rodata @3753 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3753 = -150.0f; -COMPILER_STRIP_GATE(0x80652760, &lit_3753); -#pragma pop - -/* 80652764-80652768 000028 0004+00 0/1 0/0 0/0 .rodata @3754 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3754 = 30.0f; -COMPILER_STRIP_GATE(0x80652764, &lit_3754); -#pragma pop - -/* 80652768-8065276C 00002C 0004+00 0/3 0/0 0/0 .rodata @3755 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3755 = 10.0f; -COMPILER_STRIP_GATE(0x80652768, &lit_3755); -#pragma pop + field_0x668 = param_0; +} /* 806508E0-80650B7C 000240 029C+00 1/1 0/0 0/0 .text calcSnortEffect__11daB_ZANTZ_cFv */ void daB_ZANTZ_c::calcSnortEffect() { - // NONMATCHING -} + cXyz sp28; + cXyz sp34; + cXyz sp40(5.0f, 1.5f, 5.0f); + csXyz sp48; -/* ############################################################################################## */ -/* 8065276C-80652770 000030 0004+00 1/6 0/0 0/0 .rodata @3795 */ -SECTION_RODATA static u8 const lit_3795[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x8065276C, &lit_3795); + sp34.set(150.0f, 800.0f, 1000.0f); + cLib_offsetPos(&sp28, ¤t.pos, shape_angle.y, &sp34); + sp48.set(0, 0, 0x7C00); + + field_0xd04 = dComIfGp_particle_set(field_0xd04, 0x8908, ¤t.pos, &tevStr, &shape_angle, NULL, 0xFF, NULL, -1, NULL, NULL, NULL); + sp28.y -= 900.0f; + + mSnortColliders[0].SetC(sp28); + mSnortColliders[0].SetR(300.0f); + mSnortColliders[0].SetH(900.0f); + dComIfG_Ccsp()->Set(&mSnortColliders[0]); + + sp34.set(-150.0f, 800.0f, 1000.0f); + cLib_offsetPos(&sp28, ¤t.pos, shape_angle.y, &sp34); + sp48.set(0, 0, -0x7C00); + + field_0xd08 = dComIfGp_particle_set(field_0xd08, 0x8909, ¤t.pos, &tevStr, &shape_angle, NULL, 0xFF, NULL, -1, NULL, NULL, NULL); + sp28.y -= 900.0f; -/* 806527D0-806527D0 000094 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_806527D0 = "B_zan"; -#pragma pop + mSnortColliders[1].SetC(sp28); + mSnortColliders[1].SetR(300.0f); + mSnortColliders[1].SetH(900.0f); + dComIfG_Ccsp()->Set(&mSnortColliders[1]); + + cCcD_Obj* var_r28 = NULL; + if (mSnortColliders[0].ChkCoHit()) { + var_r28 = mSnortColliders[0].GetCoHitObj(); + } + + if (mSnortColliders[1].ChkCoHit()) { + var_r28 = mSnortColliders[1].GetCoHitObj(); + } + + if (var_r28 != NULL) { + if (fopAcM_GetName(dCc_GetAc(var_r28->GetAc())) == PROC_ALINK) { + daPy_py_c* player = daPy_getPlayerActorClass(); + s16 var_r26 = cLib_targetAngleY(¤t.pos, &player->current.pos); + player->setThrowDamage(var_r26, 30.0f, 10.0f, 0, 0, 2); + } + } +} /* 80650B7C-80650D0C 0004DC 0190+00 0/0 0/0 3/3 .text setMouthMode__11daB_ZANTZ_cFUc */ void daB_ZANTZ_c::setMouthMode(u8 param_0) { - // NONMATCHING + if (param_0 == 2) { + if (mMouthMode == 0 || mMouthMode == 1) { + mMouthMode = 2; + mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("B_zan", 0x43), J3DFrameCtrl::LOOP_ONCE_e, 0.0f, 1.0f, 0.0f, -1.0f); + Z2GetAudioMgr()->seStart(Z2SE_EN_ZZ_CLOSE, ¤t.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); + } + } else if (param_0 == 0) { + if (mMouthMode == 2 || mMouthMode == 3) { + mMouthMode = 0; + mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("B_zan", 0x44), J3DFrameCtrl::LOOP_ONCE_e, 0.0f, 1.0f, 0.0f, -1.0f); + Z2GetAudioMgr()->seStart(Z2SE_EN_ZZ_OPEN, ¤t.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); + } + } } -/* ############################################################################################## */ -/* 80652770-80652774 000034 0004+00 0/1 0/0 0/0 .rodata @3899 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3899 = 2000.0f; -COMPILER_STRIP_GATE(0x80652770, &lit_3899); -#pragma pop - -/* 80652774-80652778 000038 0004+00 0/1 0/0 0/0 .rodata @3900 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3900 = 3000.0f; -COMPILER_STRIP_GATE(0x80652774, &lit_3900); -#pragma pop - /* 80650D0C-806510C0 00066C 03B4+00 0/0 0/0 1/1 .text setAppearMode__11daB_ZANTZ_cFUc */ void daB_ZANTZ_c::setAppearMode(u8 param_0) { - // NONMATCHING + cXyz sp34(0.0f, 0.0f, 2000.0f); + + if (param_0 == 2) { + if (mAppearMode == 0 || mAppearMode == 1) { + mAppearMode = 2; + mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("B_zan", 0x42), J3DFrameCtrl::LOOP_REPEAT_e, 0.0f, 1.0f, 0.0f, -1.0f); + field_0x660 = 1.0f; + dComIfGp_getVibration().StartQuake(1, 31, cXyz(0.0f, 1.0f, 0.0f)); + } + } else if (param_0 == 0) { + if (mAppearMode == 2 || mAppearMode == 3) { + mAppearMode = 0; + mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("B_zan", 0x42), J3DFrameCtrl::LOOP_REPEAT_e, 0.0f, 1.0f, 0.0f, -1.0f); + field_0x660 = 1.0f; + dComIfGp_getVibration().StartQuake(1, 31, cXyz(0.0f, 1.0f, 0.0f)); + + if (field_0x66f == 0) { + field_0x66f = 1; + current.pos.set(sp34.x, current.pos.y, sp34.z); + current.angle.y = shape_angle.y = fopAcM_searchPlayerAngleY(this); + } else { + s16 sp68 = cLib_targetAngleY(&daPy_getPlayerActorClass()->current.pos, &sp34); + s16 var_r28 = sp68 + 0x2000 + (field_0x670 * 0x4000); + + current.pos.set(sp34.x + 3000.0f * cM_ssin(var_r28), current.pos.y, sp34.z + 3000.0f * cM_scos(var_r28)); + current.angle.y = shape_angle.y = cLib_targetAngleY(¤t.pos, &sp34); + } + + field_0x664 = getGroundPos(); + } + } else if (param_0 == 4) { + if (mAppearMode == 1) { + if (abs((s16)(fopAcM_searchPlayerAngleY(this) - shape_angle.y)) > 0x1800) { + mAppearMode = 4; + mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("B_zan", 0x42), J3DFrameCtrl::LOOP_REPEAT_e, 0.0f, 1.0f, 0.0f, -1.0f); + field_0x660 = 1.0f; + dComIfGp_getVibration().StartQuake(1, 31, cXyz(0.0f, 1.0f, 0.0f)); + } + } + } else if (param_0 == 5) { + if (mAppearMode == 1) { + mAppearMode = 5; + mSearchContinue = true; + mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("B_zan", 0x42), J3DFrameCtrl::LOOP_REPEAT_e, 0.0f, 1.0f, 0.0f, -1.0f); + field_0x660 = 1.0f; + dComIfGp_getVibration().StartQuake(1, 31, cXyz(0.0f, 1.0f, 0.0f)); + } + } } -/* ############################################################################################## */ -/* 80652778-8065277C 00003C 0004+00 0/1 0/0 0/0 .rodata @3909 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3909 = 4000.0f; -COMPILER_STRIP_GATE(0x80652778, &lit_3909); -#pragma pop - -/* 8065277C-80652780 000040 0004+00 0/1 0/0 0/0 .rodata @3939 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3939 = -1000000000.0f; -COMPILER_STRIP_GATE(0x8065277C, &lit_3939); -#pragma pop - /* 806510C0-80651204 000A20 0144+00 2/2 0/0 0/0 .text getGroundPos__11daB_ZANTZ_cFv */ -void daB_ZANTZ_c::getGroundPos() { - // NONMATCHING -} +f32 daB_ZANTZ_c::getGroundPos() { + cXyz sp88(current.pos); + dBgS_ObjGndChk gndchk; + sp88.y += 4000.0f; -/* 80651204-8065127C 000B64 0078+00 4/3 0/0 0/0 .text __dt__14dBgS_ObjGndChkFv */ -// dBgS_ObjGndChk::~dBgS_ObjGndChk() { -extern "C" void __dt__14dBgS_ObjGndChkFv() { - // NONMATCHING -} + while (1) { + gndchk.SetPos(&sp88); + sp88.y = dComIfG_Bgsp().GroundCross(&gndchk); -/* ############################################################################################## */ -/* 80652780-80652784 000044 0004+00 0/1 0/0 0/0 .rodata @4120 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4120 = 4.0f; -COMPILER_STRIP_GATE(0x80652780, &lit_4120); -#pragma pop - -/* 80652784-80652788 000048 0004+00 0/1 0/0 0/0 .rodata @4121 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4121 = 15.0f; -COMPILER_STRIP_GATE(0x80652784, &lit_4121); -#pragma pop - -/* 80652788-8065278C 00004C 0004+00 0/1 0/0 0/0 .rodata @4122 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4122 = 40.0f; -COMPILER_STRIP_GATE(0x80652788, &lit_4122); -#pragma pop - -/* 8065278C-80652790 000050 0004+00 0/1 0/0 0/0 .rodata @4123 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4123 = 6.0f; -COMPILER_STRIP_GATE(0x8065278C, &lit_4123); -#pragma pop - -/* 80652790-80652794 000054 0004+00 0/1 0/0 0/0 .rodata @4124 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4124 = 9.0f; -COMPILER_STRIP_GATE(0x80652790, &lit_4124); -#pragma pop - -/* 80652794-80652798 000058 0004+00 0/1 0/0 0/0 .rodata @4125 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4125 = 13.0f; -COMPILER_STRIP_GATE(0x80652794, &lit_4125); -#pragma pop - -/* 80652798-8065279C 00005C 0004+00 0/1 0/0 0/0 .rodata @4126 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4126 = 16.0f; -COMPILER_STRIP_GATE(0x80652798, &lit_4126); -#pragma pop - -/* 8065279C-806527A0 000060 0004+00 0/1 0/0 0/0 .rodata @4127 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4127 = 26.0f; -COMPILER_STRIP_GATE(0x8065279C, &lit_4127); -#pragma pop - -/* 806527A0-806527A4 000064 0004+00 0/1 0/0 0/0 .rodata @4128 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4128 = 3500.0f; -COMPILER_STRIP_GATE(0x806527A0, &lit_4128); -#pragma pop - -/* 806527A4-806527A8 000068 0004+00 0/1 0/0 0/0 .rodata @4129 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4129 = 1.0f / 10.0f; -COMPILER_STRIP_GATE(0x806527A4, &lit_4129); -#pragma pop - -/* 806527A8-806527AC 00006C 0004+00 0/1 0/0 0/0 .rodata @4130 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4130 = 1.0f / 5.0f; -COMPILER_STRIP_GATE(0x806527A8, &lit_4130); -#pragma pop - -/* 806527AC-806527B0 000070 0004+00 0/1 0/0 0/0 .rodata @4131 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4131 = 17.0f / 10.0f; -COMPILER_STRIP_GATE(0x806527AC, &lit_4131); -#pragma pop - -/* 806527B0-806527B4 000074 0004+00 0/1 0/0 0/0 .rodata @4132 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4132 = 500.0f; -COMPILER_STRIP_GATE(0x806527B0, &lit_4132); -#pragma pop - -/* 806527B4-806527BC 000078 0008+00 0/1 0/0 0/0 .rodata @4135 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4135[8] = { - 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x806527B4, &lit_4135); -#pragma pop + if (sp88.y == -1000000000.0f) { + break; + } + + if (dComIfG_Bgsp().GetActorPointer(gndchk) != this) { + break; + } + + sp88.y -= 10.0f; + } + + return sp88.y; +} /* 8065127C-80651B1C 000BDC 08A0+00 1/1 0/0 0/0 .text action__11daB_ZANTZ_cFv */ void daB_ZANTZ_c::action() { - // NONMATCHING + if (mMouthMode == 0) { + if (mpMorf->checkFrame(4.0f) || mpMorf->checkFrame(10.0f) || mpMorf->checkFrame(15.0f)) { + dComIfGp_getVibration().StartShock(1, 31, cXyz(0.0f, 1.0f, 0.0f)); + } + + if (mpMorf->checkFrame(40.0f)) { + dComIfGp_getVibration().StartShock(3, 31, cXyz(0.0f, 1.0f, 0.0f)); + } + + if (mpMorf->isStop()) { + mMouthMode++; + } + } else if (mMouthMode == 2) { + if (mpMorf->checkFrame(6.0f) || mpMorf->checkFrame(9.0f) || mpMorf->checkFrame(13.0f) || mpMorf->checkFrame(16.0f)) { + dComIfGp_getVibration().StartShock(1, 31, cXyz(0.0f, 1.0f, 0.0f)); + } + + if (mpMorf->checkFrame(26.0f)) { + dComIfGp_getVibration().StartShock(3, 31, cXyz(0.0f, 1.0f, 0.0f)); + } + + if (mpMorf->isStop()) { + mMouthMode++; + } + } + + cXyz particle_pos(current.pos.x, field_0x664, current.pos.z); + + switch (mAppearMode) { + case 0: { + f32 var_f31 = cLib_addCalc(¤t.pos.y, home.pos.y + 3500.0f, 0.1f, 15.0f, 1.0f); + if (std::abs(var_f31) < 15.0f) { + cLib_chaseF(&field_0x660, 0.0f, 0.2f); + mpMorf->setFrame(field_0x660); + } + + if (current.pos.y > home.pos.y + 300.0f) { + cLib_chaseF(&field_0x664, 0.0f, 1.7f); + + field_0xd0c = dComIfGp_particle_set(field_0xd0c, 0x8906, &particle_pos, &tevStr, &shape_angle, NULL, 0xFF, NULL, -1, NULL, NULL, NULL); + Z2GetAudioMgr()->seStartLevel(Z2SE_EN_ZZ_MV, ¤t.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); + } + + if (!var_f31) { + dComIfGp_getVibration().StopQuake(0x1F); + mAppearMode++; + mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("B_zan", 0x44), J3DFrameCtrl::LOOP_REPEAT_e, 0.0f, 0.0f, 0.0f, -1.0f); + } + break; + } + case 2: { + f32 var_f31 = cLib_addCalc(¤t.pos.y, home.pos.y, 0.1f, 15.0f, 1.0f); + if (std::abs(var_f31) < 15.0f) { + cLib_chaseF(&field_0x660, 0.0f, 0.2f); + mpMorf->setFrame(field_0x660); + } + + if (current.pos.y > home.pos.y + 300.0f) { + if (current.pos.y < home.pos.y + 500.0f) { + cLib_chaseF(&field_0x664, getGroundPos(), 1.7f); + } + + field_0xd0c = dComIfGp_particle_set(field_0xd0c, 0x8907, &particle_pos, &tevStr, &shape_angle, NULL, 0xFF, NULL, -1, NULL, NULL, NULL); + Z2GetAudioMgr()->seStartLevel(Z2SE_EN_ZZ_MV, ¤t.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); + } + + if (!var_f31) { + dComIfGp_getVibration().StopQuake(0x1F); + mAppearMode++; + mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("B_zan", 0x44), J3DFrameCtrl::LOOP_REPEAT_e, 0.0f, 0.0f, 0.0f, -1.0f); + } + break; + } + case 3: { + current.angle.y = shape_angle.y = fopAcM_searchPlayerAngleY(this); + break; + } + case 4: + case 5: { + cLib_addCalcAngleS2(&shape_angle.y, fopAcM_searchPlayerAngleY(this), 0x10, 0x80); + current.angle.y = shape_angle.y; + + field_0xd0c = dComIfGp_particle_set(field_0xd0c, 0x890A, &particle_pos, &tevStr, &shape_angle, NULL, 0xFF, NULL, -1, NULL, NULL, NULL); + Z2GetAudioMgr()->seStartLevel(Z2SE_EN_ZZ_MV, ¤t.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); + + BOOL sp6C = false; + if (mAppearMode == 4) { + if (abs((s16)(shape_angle.y - fopAcM_searchPlayerAngleY(this))) < 0x1000) { + sp6C = true; + } + } else if (!mSearchContinue) { + sp6C = true; + } + + if (sp6C) { + cLib_chaseF(&field_0x660, 0.0f, 0.1f); + mpMorf->setFrame(field_0x660); + + if (!field_0x660) { + dComIfGp_getVibration().StopQuake(0x1F); + mAppearMode = 1; + mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("B_zan", 0x44), J3DFrameCtrl::LOOP_REPEAT_e, 0.0f, 0.0f, 0.0f, -1.0f); + } + } else { + cLib_chaseF(&field_0x660, 1.0f, 0.2f); + mpMorf->setFrame(field_0x660); + } + break; + } + } + + fopAcM_posMoveF(this, NULL); + mpMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(this))); } -/* ############################################################################################## */ -/* 806527BC-806527C0 000080 0004+00 0/1 0/0 0/0 .rodata @4171 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4171 = 100.0f; -COMPILER_STRIP_GATE(0x806527BC, &lit_4171); -#pragma pop - -/* 806527C0-806527C4 000084 0004+00 0/1 0/0 0/0 .rodata @4172 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4172 = 130.0f; -COMPILER_STRIP_GATE(0x806527C0, &lit_4172); -#pragma pop - -/* 806527C4-806527C8 000088 0004+00 0/1 0/0 0/0 .rodata @4173 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4173 = 230.0f; -COMPILER_STRIP_GATE(0x806527C4, &lit_4173); -#pragma pop - /* 80651B1C-80651C20 00147C 0104+00 1/1 0/0 0/0 .text cc_set__11daB_ZANTZ_cFv */ void daB_ZANTZ_c::cc_set() { - // NONMATCHING + cXyz cc_center; + eyePos = current.pos; + eyePos.y += 100.0f; + + for (int i = 0; i < 3; i++) { + mDoMtx_stack_c::copy(mpMorf->getModel()->getAnmMtx(i + 2)); + mDoMtx_stack_c::transM(0.0f, 0.0f, 130.0f); + mDoMtx_stack_c::multVecZero(&cc_center); + + field_0x6e4[i].SetC(cc_center); + field_0x6e4[i].SetR(230.0f); + dComIfG_Ccsp()->Set(&field_0x6e4[i]); + } } -/* ############################################################################################## */ /* 80652928-8065292C 000008 0004+00 2/2 0/0 0/0 .bss None */ -static u8 data_80652928[4]; - -/* 8065292C-80652938 00000C 000C+00 1/1 0/0 0/0 .bss @3644 */ -static u8 lit_3644[12]; +static u8 l_initHIO; /* 80652938-80652944 000018 000C+00 3/3 0/0 0/0 .bss l_HIO */ -static u8 l_HIO[12]; +static daB_ZANTZ_HIO_c l_HIO; /* 80651C20-80651CF4 001580 00D4+00 1/1 0/0 0/0 .text execute__11daB_ZANTZ_cFv */ -void daB_ZANTZ_c::execute() { - // NONMATCHING +int daB_ZANTZ_c::execute() { + if (field_0x668 != 0) { + field_0x668--; + } + + action(); + + mDoMtx_stack_c::transS(current.pos); + mDoMtx_stack_c::ZXYrotM(shape_angle); + mDoMtx_stack_c::scaleM(l_HIO.mModelSize, l_HIO.mModelSize, l_HIO.mModelSize); + mpMorf->getModel()->setBaseTRMtx(mDoMtx_stack_c::get()); + mpMorf->modelCalc(); + + mpBrk->play(); + + cMtx_copy(mDoMtx_stack_c::get(), mBgMtx); + + if (mpBgW != NULL) { + mpBgW->Move(); + } + + if (field_0x668 != 0) { + calcSnortEffect(); + } + + cc_set(); + return 1; } /* 80651CF4-80651D14 001654 0020+00 1/0 0/0 0/0 .text daB_ZANTZ_Execute__FP11daB_ZANTZ_c */ -static void daB_ZANTZ_Execute(daB_ZANTZ_c* param_0) { - // NONMATCHING +static int daB_ZANTZ_Execute(daB_ZANTZ_c* i_this) { + return i_this->execute(); } /* 80651D14-80651D1C 001674 0008+00 1/0 0/0 0/0 .text daB_ZANTZ_IsDelete__FP11daB_ZANTZ_c */ -static bool daB_ZANTZ_IsDelete(daB_ZANTZ_c* param_0) { - return true; +static int daB_ZANTZ_IsDelete(daB_ZANTZ_c* i_this) { + return 1; } -/* ############################################################################################## */ -/* 806527D0-806527D0 000094 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_806527D6 = "B_oh"; -#pragma pop - /* 80651D1C-80651DA4 00167C 0088+00 1/1 0/0 0/0 .text _delete__11daB_ZANTZ_cFv */ -void daB_ZANTZ_c::_delete() { - // NONMATCHING -} +int daB_ZANTZ_c::_delete() { + if (mInitHIO) { + l_initHIO = false; + } -/* 80651DA4-80651DC4 001704 0020+00 1/0 0/0 0/0 .text daB_ZANTZ_Delete__FP11daB_ZANTZ_c - */ -static void daB_ZANTZ_Delete(daB_ZANTZ_c* param_0) { - // NONMATCHING -} + dComIfG_resDelete(&mPhase, "B_oh"); -/* 80651DC4-80651FD0 001724 020C+00 1/1 0/0 0/0 .text CreateHeap__11daB_ZANTZ_cFv */ -void daB_ZANTZ_c::CreateHeap() { - // NONMATCHING -} + if (mpBgW != NULL) { + dComIfG_Bgsp().Release(mpBgW); + } -/* 80651FD0-80652018 001930 0048+00 1/0 0/0 0/0 .text __dt__12J3DFrameCtrlFv */ -// J3DFrameCtrl::~J3DFrameCtrl() { -extern "C" void __dt__12J3DFrameCtrlFv() { - // NONMATCHING + mSound.deleteObject(); + return 1; } -/* 80652018-80652038 001978 0020+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */ -static void useHeapInit(fopAc_ac_c* param_0) { - // NONMATCHING +/* 80651DA4-80651DC4 001704 0020+00 1/0 0/0 0/0 .text daB_ZANTZ_Delete__FP11daB_ZANTZ_c + */ +static int daB_ZANTZ_Delete(daB_ZANTZ_c* i_this) { + return i_this->_delete(); } -/* ############################################################################################## */ -/* 806527C8-806527CC 00008C 0004+00 0/1 0/0 0/0 .rodata @4373 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4373 = -400.0f; -COMPILER_STRIP_GATE(0x806527C8, &lit_4373); -#pragma pop - -/* 806527CC-806527D0 000090 0004+00 0/1 0/0 0/0 .rodata @4374 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4374 = 400.0f; -COMPILER_STRIP_GATE(0x806527CC, &lit_4374); -#pragma pop +/* 80651DC4-80651FD0 001724 020C+00 1/1 0/0 0/0 .text CreateHeap__11daB_ZANTZ_cFv */ +int daB_ZANTZ_c::CreateHeap() { + J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("B_zan", 0x4C); + JUT_ASSERT(modelData != 0); -/* 80652038-806522F4 001998 02BC+00 1/1 0/0 0/0 .text create__11daB_ZANTZ_cFv */ -void daB_ZANTZ_c::create() { - // NONMATCHING -} + mpMorf = new mDoExt_McaMorfSO(modelData, NULL, NULL, (J3DAnmTransform*)dComIfG_getObjectRes("B_zan", 0x44), 0, 0.0f, 0, -1, &mSound, 0, 0x11000084); + if (mpMorf == NULL) { + return 0; + } -/* 806522F4-806523C0 001C54 00CC+00 1/1 0/0 0/0 .text __dt__8dCcD_CylFv */ -// dCcD_Cyl::~dCcD_Cyl() { -extern "C" void __dt__8dCcD_CylFv() { - // NONMATCHING -} + mpBrk = new mDoExt_brkAnm(); + if (mpBrk == NULL) { + return 0; + } -/* 806523C0-80652444 001D20 0084+00 1/1 0/0 0/0 .text __ct__8dCcD_CylFv */ -// dCcD_Cyl::dCcD_Cyl() { -extern "C" void __ct__8dCcD_CylFv() { - // NONMATCHING -} + if (!mpBrk->init(mpMorf->getModel()->getModelData(), (J3DAnmTevRegKey*)dComIfG_getObjectRes("B_zan", 0x50), TRUE, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1)) { + return 0; + } -/* 80652444-8065248C 001DA4 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGCylFv */ -// cM3dGCyl::~cM3dGCyl() { -extern "C" void __dt__8cM3dGCylFv() { - // NONMATCHING -} + mpBgW = new dBgW(); + if (mpBgW == NULL) { + return 0; + } -/* 8065248C-806524D4 001DEC 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGAabFv */ -// cM3dGAab::~cM3dGAab() { -extern "C" void __dt__8cM3dGAabFv() { - // NONMATCHING -} + if (mpBgW->Set((cBgD_t*)dComIfG_getObjectRes("B_zan", 0x57), 1, &mBgMtx) == 1) { + return 0; + } -/* 806524D4-806525A0 001E34 00CC+00 1/1 0/0 0/0 .text __dt__8dCcD_SphFv */ -// dCcD_Sph::~dCcD_Sph() { -extern "C" void __dt__8dCcD_SphFv() { - // NONMATCHING + mpBgW->SetCrrFunc(dBgS_MoveBGProc_Typical); + return 1; } -/* 806525A0-80652624 001F00 0084+00 1/1 0/0 0/0 .text __ct__8dCcD_SphFv */ -// dCcD_Sph::dCcD_Sph() { -extern "C" void __ct__8dCcD_SphFv() { - // NONMATCHING +/* 80652018-80652038 001978 0020+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */ +static int useHeapInit(fopAc_ac_c* i_this) { + return ((daB_ZANTZ_c*)i_this)->CreateHeap(); } -/* 80652624-8065266C 001F84 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGSphFv */ -// cM3dGSph::~cM3dGSph() { -extern "C" void __dt__8cM3dGSphFv() { - // NONMATCHING +/* 80652038-806522F4 001998 02BC+00 1/1 0/0 0/0 .text create__11daB_ZANTZ_cFv */ +int daB_ZANTZ_c::create() { + fopAcM_SetupActor(this, daB_ZANTZ_c); + + int phase_state = dComIfG_resLoad(&mPhase, "B_oh"); + if (phase_state == cPhs_COMPLEATE_e) { + if (!fopAcM_entrySolidHeap(this, useHeapInit, 0x3220)) { + return cPhs_ERROR_e; + } + + if (!l_initHIO) { + l_initHIO = true; + mInitHIO = true; + l_HIO.field_0x4 = -1; + } + + OS_REPORT("B_ZANTZ PARAM %x\n", fopAcM_GetParam(this)); + field_0x670 = fopAcM_GetParam(this); + if (field_0x670 != 0) { + field_0x66f = 1; + } + + if (mpBgW != NULL) { + if (dComIfG_Bgsp().Regist(mpBgW, this)) { + return cPhs_ERROR_e; + } + } + + attention_info.flags = 0; + + fopAcM_SetMtx(this, mpMorf->getModel()->getBaseTRMtx()); + fopAcM_SetMin(this, -400.0f, -400.0f,-400.0f); + fopAcM_SetMax(this, 400.0f, 400.0f, 400.0f); + + health = 80; + field_0x560 = 80; + + mCcStts.Init(0xFE, 0, this); + + for (int i = 0; i < 3; i++) { + field_0x6e4[i].Set(cc_zant_src); + field_0x6e4[i].SetStts(&mCcStts); + } + + for (int i = 0; i < 2; i++) { + mSnortColliders[i].Set(cc_zant_snort_src); + mSnortColliders[i].SetStts(&mCcStts); + } + + mMouthMode = 2; + mAppearMode = 2; + gravity = 0.0f; + + mDoMtx_stack_c::transS(current.pos); + mDoMtx_stack_c::ZXYrotM(shape_angle); + mDoMtx_stack_c::scaleM(l_HIO.mModelSize, l_HIO.mModelSize, l_HIO.mModelSize); + mpMorf->getModel()->setBaseTRMtx(mDoMtx_stack_c::get()); + mpMorf->modelCalc(); + } + + return phase_state; } /* 8065266C-8065268C 001FCC 0020+00 1/0 0/0 0/0 .text daB_ZANTZ_Create__FP11daB_ZANTZ_c */ -static void daB_ZANTZ_Create(daB_ZANTZ_c* param_0) { - // NONMATCHING -} - -/* 8065268C-806526D4 001FEC 0048+00 2/1 0/0 0/0 .text __dt__15daB_ZANTZ_HIO_cFv */ -daB_ZANTZ_HIO_c::~daB_ZANTZ_HIO_c() { - // NONMATCHING -} - -/* 806526D4-80652710 002034 003C+00 0/0 1/0 0/0 .text __sinit_d_a_b_zant_mobile_cpp */ -void __sinit_d_a_b_zant_mobile_cpp() { - // NONMATCHING -} - -#pragma push -#pragma force_active on -REGISTER_CTORS(0x806526D4, __sinit_d_a_b_zant_mobile_cpp); -#pragma pop - -/* 80652710-80652718 002070 0008+00 1/0 0/0 0/0 .text @20@__dt__14dBgS_ObjGndChkFv */ -static void func_80652710() { - // NONMATCHING -} - -/* 80652718-80652720 002078 0008+00 1/0 0/0 0/0 .text @76@__dt__14dBgS_ObjGndChkFv */ -static void func_80652718() { - // NONMATCHING +static int daB_ZANTZ_Create(daB_ZANTZ_c* i_this) { + return i_this->create(); } -/* 80652720-80652728 002080 0008+00 1/0 0/0 0/0 .text @60@__dt__14dBgS_ObjGndChkFv */ -static void func_80652720() { - // NONMATCHING -} +/* 80652860-80652880 -00001 0020+00 1/0 0/0 0/0 .data l_daB_ZANTZ_Method */ +static actor_method_class l_daB_ZANTZ_Method = { + (process_method_func)daB_ZANTZ_Create, + (process_method_func)daB_ZANTZ_Delete, + (process_method_func)daB_ZANTZ_Execute, + (process_method_func)daB_ZANTZ_IsDelete, + (process_method_func)daB_ZANTZ_Draw, +}; -/* 806527D0-806527D0 000094 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ \ No newline at end of file +/* 80652880-806528B0 -00001 0030+00 0/0 0/0 1/0 .data g_profile_B_ZANTZ */ +extern actor_process_profile_definition g_profile_B_ZANTZ = { + fpcLy_CURRENT_e, // mLayerID + 4, // mListID + fpcPi_CURRENT_e, // mListPrio + PROC_B_ZANTZ, // mProcName + &g_fpcLf_Method.mBase, // sub_method + sizeof(daB_ZANTZ_c), // mSize + 0, // mSizeOther + 0, // mParameters + &g_fopAc_Method.base, // sub_method + 228, // mPriority + &l_daB_ZANTZ_Method, // sub_method + 0x00040000, // mStatus + fopAc_ENEMY_e, // mActorType + fopAc_CULLBOX_CUSTOM_e, // cullType +};