diff --git a/configure.py b/configure.py index cf0f4b7f1a4..41bef79e06e 100755 --- a/configure.py +++ b/configure.py @@ -1502,7 +1502,7 @@ config.libs = [ ActorRel(NonMatching, "d_a_demo_item"), ActorRel(MatchingFor("GZ2E01"), "d_a_door_bossL1"), ActorRel(NonMatching, "d_a_e_dn"), - ActorRel(NonMatching, "d_a_e_fm"), + ActorRel(Equivalent, "d_a_e_fm"), ActorRel(NonMatching, "d_a_e_ga"), ActorRel(NonMatching, "d_a_e_hb"), ActorRel(MatchingFor("GZ2E01"), "d_a_e_nest"), diff --git a/include/d/actor/d_a_e_fm.h b/include/d/actor/d_a_e_fm.h index a1b39a274ca..8ece67184ab 100644 --- a/include/d/actor/d_a_e_fm.h +++ b/include/d/actor/d_a_e_fm.h @@ -2,8 +2,39 @@ #define D_A_E_FM_H #include "f_op/f_op_actor_mng.h" +#include "d/d_cc_d.h" +#include "d/d_cc_uty.h" +#include "d/d_bg_s_acch.h" #include "Z2AudioLib/Z2Creature.h" +struct chain_s { + /* 0x0000 */ J3DModel* model[26]; + /* 0x0068 */ cXyz field_0x68; + /* 0x0074 */ cXyz pos[26]; + /* 0x01AC */ cXyz field_0x1ac[26]; + /* 0x02E4 */ cXyz field_0x2e4[26]; + /* 0x041C */ csXyz rot[26]; + /* 0x04B8 */ dKy_tevstr_c tevstr[26]; + /* 0x6088 */ cXyz sound_pos; + /* 0x6094 */ cXyz field_0x6094; + /* 0x60A0 */ u8 field_0x60A0[0x6170 - 0x60A0]; + /* 0x6170 */ int field_0x6170; + /* 0x6174 */ f32 field_0x6174; + /* 0x6178 */ f32 field_0x6178; + /* 0x617C */ s8 field_0x617c; + /* 0x617D */ s8 field_0x617d; + /* 0x617E */ s8 field_0x617e; + /* 0x6180 */ cXyz field_0x6180; + /* 0x618C */ cXyz field_0x618c; + /* 0x6198 */ f32 field_0x6198; + /* 0x619C */ s8 field_0x619c; + /* 0x619E */ s16 field_0x619e; + /* 0x61A0 */ f32 field_0x61a0; + /* 0x61A4 */ f32 field_0x61a4; + /* 0x61A8 */ u8 field_0x61A8[0x61D0 - 0x61A8]; + /* 0x61D0 */ int field_0x61d0; +}; + /** * @ingroup actors-enemies * @class e_fm_class @@ -15,23 +46,192 @@ class e_fm_class : public fopEn_enemy_c { public: /* 804F9B64 */ e_fm_class(); - /* 0x005AC */ u8 field_0x5ac[0x63c - 0x5ac]; - /* 0x0063C */ Z2CreatureFM field_0x63c; - /* 0x00760 */ u8 field_0x760[0x1828 - 0x760]; - /* 0x01828 */ u8 field_0x1828; - /* 0x01829 */ u8 field_0x1829[0x1b084 - 0x1829]; + + BOOL checkCameraFree() { return field_0x1b07c; } + + /* 0x005AC */ request_of_phase_process_class mPhase; + /* 0x005B4 */ u8 arg0; + /* 0x005B5 */ u8 arg1; + /* 0x005B6 */ u8 arg3; + /* 0x005B7 */ u8 field_0x5B7[0x005C4 - 0x005B7]; + /* 0x005C4 */ s16 field_0x5c4; + /* 0x005C6 */ s16 mAngleToPlayer; + /* 0x005C8 */ int field_0x5c8; + /* 0x005CC */ f32 mKankyoBlend; + /* 0x005D0 */ mDoExt_McaMorf* mpFmModelMorf; + /* 0x005D4 */ mDoExt_btkAnm* mpFmBtk[9]; + /* 0x005F8 */ mDoExt_brkAnm* mpFmBrk[9]; + /* 0x0061C */ int mPlayTexAnmNo; + /* 0x00620 */ int mAnm; + /* 0x00624 */ s8 mDrawDemoModel; + /* 0x00628 */ mDoExt_McaMorf* mpDemoFmModelMorf; + /* 0x0062C */ u8 field_0x62C[0x00630 - 0x0062C]; + /* 0x00630 */ mDoExt_brkAnm* mpDemoFmBrk; + /* 0x00634 */ f32 mDemoModelSize; + /* 0x00638 */ f32 mDemoModelSizeStep; + /* 0x0063C */ Z2CreatureFM mSound; + /* 0x00760 */ J3DModel* mpCoreModel; + /* 0x00764 */ mDoExt_btkAnm* mpCoreBtk; + /* 0x00768 */ mDoExt_brkAnm* mpCoreBrk; + /* 0x0076C */ f32 mCoreBrkFrame; + /* 0x00770 */ s16 field_0x770; + /* 0x00772 */ s8 mDoCreateBa; + /* 0x00773 */ u8 field_0x773; + /* 0x00774 */ f32 mChainColorR; + /* 0x00778 */ f32 field_0x778; + /* 0x0077C */ mDoExt_McaMorf* mpAttackEfModelMorf[2]; + /* 0x00784 */ mDoExt_btkAnm* mpAttackEfBtk[2]; + /* 0x0078C */ mDoExt_brkAnm* mpAttackEfBrk; + /* 0x00790 */ s16 field_0x790; + /* 0x00792 */ s8 field_0x792; + /* 0x00794 */ f32 field_0x794; + /* 0x00798 */ f32 field_0x798; + /* 0x0079C */ f32 field_0x79c; + /* 0x007A0 */ s16 mCounter; + /* 0x007A2 */ s16 mAction; + /* 0x007A4 */ s16 mMode; + /* 0x007A8 */ u32 mShadowKey; + /* 0x007AC */ s16 mTimers[4]; + /* 0x007B4 */ s16 mDamageInvulnerabilityTimer; + /* 0x007B6 */ s8 field_0x7b6; + /* 0x007B8 */ f32 field_0x7b8; + /* 0x007BC */ u8 field_0x7BC[0x007C0 - 0x007BC]; + /* 0x007C0 */ s8 field_0x7c0; + /* 0x007C2 */ s16 mBodyRotX; + /* 0x007C4 */ s16 mHeadRotZ; + /* 0x007C8 */ cXyz mFootPos[2]; + /* 0x007E0 */ int field_0x7e0; + /* 0x007E4 */ cXyz field_0x7e4[2]; + /* 0x007FC */ f32 field_0x7fc; + /* 0x00800 */ s16 field_0x800; + /* 0x00802 */ s8 mDownCnt; + /* 0x00804 */ s16 field_0x804; + /* 0x00806 */ s16 field_0x806; + /* 0x00808 */ s8 field_0x808; + /* 0x00809 */ s8 field_0x809; + /* 0x0080C */ dBgS_AcchCir mAcchCir; + /* 0x0084C */ dBgS_ObjAcch mAcch; + /* 0x00A24 */ dCcD_Stts field_0xa24; + /* 0x00A60 */ dCcD_Stts field_0xa60; + /* 0x00A9C */ dCcD_Sph mCcSph[8]; + /* 0x0145C */ dCcD_Sph mAtSph; + /* 0x01594 */ dCcD_Sph mCoreSph; + /* 0x016CC */ dCcD_Sph mEffAtSph; + /* 0x01804 */ dCcU_AtInfo mAtInfo; + /* 0x01828 */ s8 field_0x1828; + /* 0x01829 */ s8 field_0x1829; + /* 0x0182A */ s8 field_0x182a; + /* 0x0182B */ s8 field_0x182b; + /* 0x0182C */ s8 field_0x182c; + /* 0x0182D */ s8 mHideCore; + /* 0x01830 */ f32 field_0x1830; + /* 0x01834 */ f32 field_0x1834; + /* 0x01838 */ u32 field_0x1838[14]; + /* 0x01870 */ u32 field_0x1870; + /* 0x01874 */ u32 field_0x1874; + /* 0x01878 */ u32 field_0x1878; + /* 0x0187C */ u32 field_0x187c[2]; + /* 0x01884 */ u32 field_0x1884; + /* 0x01888 */ u32 field_0x1888[4]; + /* 0x01898 */ fopAc_ac_c* mHashiraActors[10]; + /* 0x018C0 */ u8 field_0x18c0[0x018D0 - 0x018C0]; + /* 0x018D0 */ cXyz field_0x18d0[8]; + /* 0x01930 */ u8 field_0x1930[0x1990 - 0x01930]; + /* 0x01990 */ dCcD_Sph mFEffAtSph[8]; + /* 0x02350 */ u32 field_0x2350; + /* 0x02354 */ u32 field_0x2354[8]; + /* 0x02374 */ u32 field_0x2374[6]; + /* 0x0238C */ u32 field_0x238c[3]; + /* 0x02398 */ s8 field_0x2398; + /* 0x02399 */ s8 field_0x2399; + /* 0x0239C */ LIGHT_INFLUENCE mPlight; + /* 0x023BC */ chain_s mChain[4]; + /* 0x1AB0C */ s8 field_0x1ab0c[4]; + /* 0x1AB10 */ dCcD_Sph mChainAtSph[4]; + /* 0x1AFF0 */ u8 field_0x1aff0; + /* 0x1AFF2 */ s16 mDemoCamMode; + /* 0x1AFF4 */ s16 mDemoCamTimer; + /* 0x1AFF6 */ s16 field_0x1aff6; + /* 0x1AFF8 */ cXyz mDemoCamEye; + /* 0x1B004 */ cXyz mDemoCamCenter; + /* 0x1B010 */ cXyz mDemoCamEyeTarget; + /* 0x1B01C */ cXyz mDemoCamCenterTarget; + /* 0x1B028 */ cXyz mDemoCamEyeSpd; + /* 0x1B034 */ cXyz mDemoCamCenterSpd; + /* 0x1B040 */ cXyz field_0x1b040; + /* 0x1B04C */ f32 mDemoCamFovy; + /* 0x1B050 */ f32 field_0x1b050; + /* 0x1B054 */ f32 field_0x1b054; + /* 0x1B058 */ u8 field_0x1B058[0x1B05C - 0x1B058]; + /* 0x1B05C */ f32 field_0x1b05c; + /* 0x1B060 */ u8 field_0x1B060[0x1B064 - 0x1B060]; + /* 0x1B064 */ f32 field_0x1b064; + /* 0x1B068 */ f32 field_0x1b068; + /* 0x1B06C */ f32 field_0x1b06c; + /* 0x1B070 */ f32 field_0x1b070; + /* 0x1B074 */ f32 field_0x1b074; + /* 0x1B078 */ s8 field_0x1b078; + /* 0x1B07C */ int field_0x1b07c; + /* 0x1B080 */ s8 field_0x1b080; + /* 0x1B081 */ u8 mInitHIO; }; STATIC_ASSERT(sizeof(e_fm_class) == 0x1b084); -class daE_FM_HIO_c { +class daE_FM_HIO_c : public JORReflexible { +public: /* 804EF0EC */ daE_FM_HIO_c(); - /* 804FA3D8 */ ~daE_FM_HIO_c(); -}; -struct chain_s { - /* 804F9E14 */ ~chain_s(); - /* 804F9F14 */ chain_s(); + void genMessage(JORMContext*); + /* 804FA3D8 */ virtual ~daE_FM_HIO_c() {} + + /* 0x04 */ s8 no; + /* 0x08 */ f32 base_size; + /* 0x0C */ f32 field_0xc; + /* 0x10 */ f32 field_0x10; + /* 0x14 */ f32 field_0x14; + /* 0x18 */ f32 field_0x18; + /* 0x1C */ f32 field_0x1c; + /* 0x20 */ f32 field_0x20; + /* 0x24 */ f32 field_0x24; + /* 0x28 */ f32 field_0x28; + /* 0x2C */ f32 field_0x2c; + /* 0x30 */ f32 field_0x30; + /* 0x34 */ s16 field_0x34; + /* 0x36 */ s16 field_0x36; + /* 0x38 */ s16 field_0x38; + /* 0x3C */ f32 field_0x3c; + /* 0x40 */ f32 field_0x40; + /* 0x44 */ f32 field_0x44; + /* 0x48 */ f32 chain_size; + /* 0x4C */ f32 field_0x4c; + /* 0x50 */ f32 field_0x50; + /* 0x54 */ f32 field_0x54; + /* 0x58 */ f32 field_0x58; + /* 0x5C */ f32 field_0x5c; + /* 0x60 */ u8 field_0x60; + /* 0x61 */ u8 field_0x61; + /* 0x64 */ f32 field_0x64; + /* 0x68 */ f32 field_0x68; + /* 0x6C */ f32 field_0x6c; + /* 0x70 */ f32 field_0x70; + /* 0x74 */ f32 field_0x74; + /* 0x78 */ f32 field_0x78; + /* 0x7C */ f32 field_0x7c; + /* 0x80 */ f32 field_0x80; + /* 0x84 */ f32 field_0x84; + /* 0x88 */ f32 field_0x88; + /* 0x8C */ f32 field_0x8c; + /* 0x90 */ f32 field_0x90; + /* 0x94 */ s16 field_0x94; + /* 0x96 */ s16 field_0x96; + /* 0x98 */ s16 field_0x98; + /* 0x9A */ s16 field_0x9a; + /* 0x9C */ s16 field_0x9c; + /* 0xA0 */ f32 field_0xa0; + /* 0xA4 */ f32 field_0xa4; + /* 0xA8 */ f32 field_0xa8; + /* 0xAC */ u8 field_0xac; }; diff --git a/include/d/actor/d_a_obj_hhashi.h b/include/d/actor/d_a_obj_hhashi.h index 73928860294..353c0f039ec 100644 --- a/include/d/actor/d_a_obj_hhashi.h +++ b/include/d/actor/d_a_obj_hhashi.h @@ -34,7 +34,6 @@ public: /* 805812BC */ int Draw(); /* 8058140C */ int Delete(); -private: /* 0x05A0 */ int field_0x5a0; /* 0x05A4 */ int field_0x5a4; /* 0x05A8 */ s8 field_0x5a8; diff --git a/src/d/actor/d_a_e_fm.cpp b/src/d/actor/d_a_e_fm.cpp index 7e6a07c65e2..cf24bf269ba 100644 --- a/src/d/actor/d_a_e_fm.cpp +++ b/src/d/actor/d_a_e_fm.cpp @@ -4,857 +4,3769 @@ */ #include "d/actor/d_a_e_fm.h" -#include "d/d_cc_d.h" -#include "dol2asm.h" -#include "d/d_camera.h" +#include "d/d_com_inf_game.h" +#include "d/actor/d_a_player.h" +#include "d/d_s_play.h" +#include "d/actor/d_a_obj_hhashi.h" #include "d/actor/d_a_obj_ystone.h" +#include "c/c_damagereaction.h" +#include "f_op/f_op_msg_mng.h" +#include "Z2AudioLib/Z2Instances.h" - - - -// -// Forward References: -// - -extern "C" void __ct__12daE_FM_HIO_cFv(); -extern "C" static void s_fmobj_del__FPvPv(); -extern "C" static void s_hasira_sub__FPvPv(); -extern "C" static void s_hasira_poscheck__FPvPv(); -extern "C" static void s_hasira_eff_sub__FPvPv(); -extern "C" void __dt__5csXyzFv(); -extern "C" void __dt__4cXyzFv(); -extern "C" static void hasira_hahen_hit__FP4cXyzffSc(); -extern "C" static void carry_off__FP10e_fm_classi(); -extern "C" static void anm_init__FP10e_fm_classifUcf(); -extern "C" static void nodeCallBack__FP8J3DJointi(); -extern "C" static void chain_draw__FP10e_fm_classP7chain_si(); -extern "C" static void daE_FM_Draw__FP10e_fm_class(); -extern "C" static void other_bg_check__FP10e_fm_classP10fopAc_ac_c(); -extern "C" static void pl_check__FP10e_fm_classfs(); -extern "C" static void e_fm_normal__FP10e_fm_class(); -extern "C" static void e_fm_fight_run__FP10e_fm_class(); -extern "C" static void e_fm_n_fight__FP10e_fm_class(); -extern "C" static void tame_eff_set__FP10e_fm_class(); -extern "C" static void e_fm_f_fight__FP10e_fm_class(); -extern "C" static void animal_eff_set__FP10e_fm_classs(); -extern "C" static void e_fm_animal__FP10e_fm_class(); -extern "C" static void e_fm_fire__FP10e_fm_class(); -extern "C" static void e_fm_stop__FP10e_fm_class(); -extern "C" static void e_fm_damage_run__FP10e_fm_class(); -extern "C" static void cam_3d_morf__FP10e_fm_classf(); -extern "C" static void demo_camera__FP10e_fm_class(); -extern "C" static void e_fm_down__FP10e_fm_class(); -extern "C" static void e_fm_a_down__FP10e_fm_class(); -extern "C" static void e_fm_start__FP10e_fm_class(); -extern "C" static void e_fm_end__FP10e_fm_class(); -extern "C" static void damage_check__FP10e_fm_class(); -extern "C" static void chain_control1__FP10e_fm_classP7chain_si(); -extern "C" static void chain_control2__FP10e_fm_classP7chain_si(); -extern "C" static void chain_control3__FP10e_fm_classP7chain_si(); -extern "C" static void s_ba_sub__FPvPv(); -extern "C" static void action__FP10e_fm_class(); -extern "C" static void effect_set__FP10e_fm_class(); -extern "C" static void daE_FM_Execute__FP10e_fm_class(); -extern "C" static bool daE_FM_IsDelete__FP10e_fm_class(); -extern "C" static void daE_FM_Delete__FP10e_fm_class(); -extern "C" static void useHeapInit__FP10fopAc_ac_c(); -extern "C" void __dt__12J3DFrameCtrlFv(); -extern "C" static void daE_FM_Create__FP10fopAc_ac_c(); -extern "C" void __ct__10e_fm_classFv(); -extern "C" void __dt__7chain_sFv(); -extern "C" void __dt__12dKy_tevstr_cFv(); -extern "C" void __ct__7chain_sFv(); -extern "C" void __ct__12dKy_tevstr_cFv(); -extern "C" void __ct__11J3DLightObjFv(); -extern "C" void __ct__5csXyzFv(); -extern "C" void __dt__8cM3dGSphFv(); -extern "C" void __dt__8cM3dGAabFv(); -extern "C" void __dt__8dCcD_SphFv(); -extern "C" void __ct__8dCcD_SphFv(); -extern "C" void __dt__10dCcD_GSttsFv(); -extern "C" void __dt__12dBgS_ObjAcchFv(); -extern "C" void __dt__12dBgS_AcchCirFv(); -extern "C" void __ct__4cXyzFv(); -extern "C" void __dt__10cCcD_GSttsFv(); -extern "C" void __dt__12daE_FM_HIO_cFv(); -extern "C" void __sinit_d_a_e_fm_cpp(); -extern "C" static void func_804FA478(); -extern "C" static void func_804FA480(); -extern "C" void setCurrentPos__16obj_ystone_classF4cXyz(); -extern "C" void __ct__4cXyzFRC4cXyz(); -extern "C" static void dComIfGp_particle_set__FUsPC4cXyzPC5csXyzPC4cXyz(); -extern "C" void changeDemoPos0__9daPy_py_cFPC4cXyz(); -extern "C" void abs__4cXyzCFv(); -extern "C" void __as__4cXyzFRC4cXyz(); -extern "C" void changeDemoMode__9daPy_py_cFUliis(); -extern "C" void changeOriginalDemo__9daPy_py_cFv(); -extern "C" extern char const* const d_a_e_fm__stringBase0; - -// -// External References: -// - -extern "C" void mDoMtx_XrotM__FPA4_fs(); -extern "C" void mDoMtx_YrotS__FPA4_fs(); -extern "C" void mDoMtx_YrotM__FPA4_fs(); -extern "C" void mDoMtx_ZrotM__FPA4_fs(); -extern "C" void scaleM__14mDoMtx_stack_cFfff(); -extern "C" void play__14mDoExt_baseAnmFv(); -extern "C" void init__13mDoExt_btkAnmFP16J3DMaterialTableP19J3DAnmTextureSRTKeyiifss(); -extern "C" void entry__13mDoExt_btkAnmFP16J3DMaterialTablef(); -extern "C" void init__13mDoExt_brkAnmFP16J3DMaterialTableP15J3DAnmTevRegKeyiifss(); -extern "C" void entry__13mDoExt_brkAnmFP16J3DMaterialTablef(); -extern "C" void mDoExt_modelUpdate__FP8J3DModel(); -extern "C" void mDoExt_modelUpdateDL__FP8J3DModel(); -extern "C" void -__ct__14mDoExt_McaMorfFP12J3DModelDataP25mDoExt_McaMorfCallBack1_cP25mDoExt_McaMorfCallBack2_cP15J3DAnmTransformifiiiPvUlUl(); -extern "C" void setAnm__14mDoExt_McaMorfFP15J3DAnmTransformiffffPv(); -extern "C" void play__14mDoExt_McaMorfFP3VecUlSc(); -extern "C" void entryDL__14mDoExt_McaMorfFv(); -extern "C" void modelCalc__14mDoExt_McaMorfFv(); -extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl(); -extern "C" void cDmrNowMidnaTalk__Fv(); -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void fopAc_IsActor__FPv(); -extern "C" void fopAcIt_Judge__FPFPvPv_PvPv(); -extern "C" void fopAcM_delete__FP10fopAc_ac_c(); -extern "C" void fopAcM_create__FsUlPC4cXyziPC5csXyzPC4cXyzSc(); -extern "C" void fopAcM_createChild__FsUiUlPC4cXyziPC5csXyzPC4cXyzScPFPv_i(); -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_searchActorAngleY__FPC10fopAc_ac_cPC10fopAc_ac_c(); -extern "C" void fopAcM_searchActorDistance__FPC10fopAc_ac_cPC10fopAc_ac_c(); -extern "C" void fopAcM_orderPotentialEvent__FP10fopAc_ac_cUsUsUs(); -extern "C" void fopAcM_createItemForBoss__FPC4cXyziiPC5csXyzPC4cXyzffi(); -extern "C" void fopAcM_createWarpHole__FPC4cXyzPC5csXyziUcUcUc(); -extern "C" void fopAcM_createDisappear__FPC10fopAc_ac_cPC4cXyzUcUcUc(); -extern "C" void fopAcM_otherBgCheck__FPC10fopAc_ac_cPC10fopAc_ac_c(); -extern "C" void fopAcM_setEffectMtx__FPC10fopAc_ac_cPC12J3DModelData(); -extern "C" void fopMsgM_messageSetDemo__FUl(); -extern "C" void fpcEx_Search__FPFPvPv_PvPv(); -extern "C" void fpcSch_JudgeForPName__FPvPv(); -extern "C" void dStage_changeScene__FifUlScsi(); -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 dComIfGs_BossLife_public_Set__FSc(); -extern "C" void dComIfGs_onOneZoneSwitch__Fii(); -extern "C" void dComIfGs_offOneZoneSwitch__Fii(); -extern "C" void -dComIfGd_setShadow__FUlScP8J3DModelP4cXyzffffR13cBgS_PolyInfoP12dKy_tevstr_csfP9_GXTexObj(); -extern "C" void onDungeonItem__12dSv_memBit_cFi(); -extern "C" void isDungeonItem__12dSv_memBit_cCFi(); -extern "C" void onEventBit__11dSv_event_cFUs(); -extern "C" void offEventBit__11dSv_event_cFUs(); -extern "C" void getRes__14dRes_control_cFPCclP11dRes_info_ci(); -extern "C" void reset__14dEvt_control_cFv(); -extern "C" void dEv_noFinishSkipProc__FPvi(); -extern "C" void setSkipProc__14dEvt_control_cFPvPFPvi_ii(); -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 StartShock__12dVibration_cFii4cXyz(); -extern "C" void StartQuake__12dVibration_cFii4cXyz(); -extern "C" void StopQuake__12dVibration_cFi(); -extern "C" void LineCross__4cBgSFP11cBgS_LinChk(); -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 __ct__11dBgS_GndChkFv(); -extern "C" void __dt__11dBgS_GndChkFv(); -extern "C" void __ct__11dBgS_LinChkFv(); -extern "C" void __dt__11dBgS_LinChkFv(); -extern "C" void Set__11dBgS_LinChkFPC4cXyzPC4cXyzPC10fopAc_ac_c(); -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 __dt__12dCcD_GObjInfFv(); -extern "C" void ChkTgHit__12dCcD_GObjInfFv(); -extern "C" void GetTgHitObj__12dCcD_GObjInfFv(); -extern "C" void Set__8dCcD_SphFRC11dCcD_SrcSph(); -extern "C" void StartCAt__8dCcD_SphFR4cXyz(); -extern "C" void MoveCAt__8dCcD_SphFR4cXyz(); -extern "C" void cc_at_check__FP10fopAc_ac_cP11dCcU_AtInfo(); -extern "C" void setFmChainPos__9daPy_py_cFP10fopAc_ac_cP4cXyzi(); -extern "C" void cancelFmChainGrab__9daPy_py_cFv(); -extern "C" void setLookPos__9daPy_py_cFP4cXyz(); -extern "C" void setPlayerSe__9daPy_py_cFUl(); -extern "C" void Start__9dCamera_cFv(); -extern "C" void Stop__9dCamera_cFv(); -extern "C" void SetTrimSize__9dCamera_cFl(); -extern "C" void Set__9dCamera_cF4cXyz4cXyzsf(); -extern "C" void Reset__9dCamera_cF4cXyz4cXyz(); -extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c(); -extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c(); -extern "C" void dKy_plight_set__FP15LIGHT_INFLUENCE(); -extern "C" void dKy_plight_cut__FP15LIGHT_INFLUENCE(); -extern "C" void dKy_custom_colset__FUcUcf(); -extern "C" void dKy_tevstr_init__FP12dKy_tevstr_cScUc(); -extern "C" void dKy_BossLight_set__FP4cXyzP8_GXColorfUc(); -extern "C" void Set__4cCcSFP8cCcD_Obj(); -extern "C" void __pl__4cXyzCFRC3Vec(); -extern "C" void __mi__4cXyzCFRC3Vec(); -extern "C" void __ml__4cXyzCFf(); -extern "C" void __ct__5csXyzFsss(); -extern "C" void cM_atan2s__Fff(); -extern "C" void cM_rndF__Ff(); -extern "C" void cM_rndFX__Ff(); -extern "C" void __dt__13cBgS_PolyInfoFv(); -extern "C" void __dt__8cM3dGCirFv(); -extern "C" void SetC__8cM3dGSphFRC4cXyz(); -extern "C" void SetR__8cM3dGSphFf(); -extern "C" void cLib_addCalc2__FPffff(); -extern "C" void cLib_addCalc0__FPfff(); -extern "C" void cLib_addCalcAngleS2__FPssss(); -extern "C" void MtxTrans__FfffUc(); -extern "C" void MtxScale__FfffUc(); -extern "C" void MtxPosition__FP4cXyzP4cXyz(); -extern "C" void func_802807E0(); -extern "C" void func_80280808(); -extern "C" void seStart__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc(); -extern "C" void bgmStart__8Z2SeqMgrFUlUll(); -extern "C" void bgmStop__8Z2SeqMgrFUll(); -extern "C" void subBgmStart__8Z2SeqMgrFUl(); -extern "C" void bgmStreamPrepare__8Z2SeqMgrFUl(); -extern "C" void bgmStreamPlay__8Z2SeqMgrFv(); -extern "C" void changeBgmStatus__8Z2SeqMgrFl(); -extern "C" void __ct__12Z2CreatureFMFv(); -extern "C" void init__12Z2CreatureFMFP3VecP3VecP3VecP3VecP3VecP3VecUcUcUcUcUcUc(); -extern "C" void startChainSoundLevel__12Z2CreatureFMF10JAISoundIDUcfUlSc(); -extern "C" void* __nw__FUl(); -extern "C" void __dl__FPv(); -extern "C" void __as__12J3DLightInfoFRC12J3DLightInfo(); -extern "C" void init__12J3DFrameCtrlFs(); -extern "C" void checkPass__12J3DFrameCtrlFf(); -extern "C" void __destroy_arr(); -extern "C" void __construct_array(); -extern "C" void _savegpr_14(); -extern "C" void _savegpr_18(); -extern "C" void _savegpr_20(); -extern "C" void _savegpr_21(); -extern "C" void _savegpr_22(); -extern "C" void _savegpr_23(); -extern "C" void _savegpr_24(); -extern "C" void _savegpr_25(); -extern "C" void _savegpr_26(); -extern "C" void _savegpr_27(); -extern "C" void _savegpr_29(); -extern "C" void _restgpr_14(); -extern "C" void _restgpr_18(); -extern "C" void _restgpr_20(); -extern "C" void _restgpr_21(); -extern "C" void _restgpr_22(); -extern "C" void _restgpr_23(); -extern "C" void _restgpr_24(); -extern "C" void _restgpr_25(); -extern "C" void _restgpr_26(); -extern "C" void _restgpr_27(); -extern "C" void _restgpr_29(); -extern "C" u8 saveBitLabels__16dSv_event_flag_c[1644 + 4 /* padding */]; -extern "C" extern void* __vt__8dCcD_Sph[36]; -extern "C" extern void* __vt__9dCcD_Stts[11]; -extern "C" extern void* __vt__12cCcD_SphAttr[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 mSimpleTexObj__21dDlst_shadowControl_c[32]; -extern "C" u8 mCurrentMtx__6J3DSys[48]; -extern "C" u8 sincosTable___5JMath[65536]; -extern "C" extern u8 struct_80450C98[4]; -extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */]; -extern "C" void __register_global_object(); -extern "C" void Rolling__13daObjHHASHI_cFP4cXyzffSc(); - -// -// Declarations: -// - -/* ############################################################################################## */ -/* 804FA6BC-804FA6C0 000000 0004+00 31/31 0/0 0/0 .rodata @3777 */ -SECTION_RODATA static f32 const lit_3777 = 1.0f; -COMPILER_STRIP_GATE(0x804FA6BC, &lit_3777); - -/* 804FA6C0-804FA6C4 000004 0004+00 0/3 0/0 0/0 .rodata @3778 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3778 = 3.0f; -COMPILER_STRIP_GATE(0x804FA6C0, &lit_3778); -#pragma pop - -/* 804FA6C4-804FA6C8 000008 0004+00 0/2 0/0 0/0 .rodata @3779 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3779 = 2.5f; -COMPILER_STRIP_GATE(0x804FA6C4, &lit_3779); -#pragma pop - -/* 804FA6C8-804FA6CC 00000C 0004+00 0/7 0/0 0/0 .rodata @3780 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3780 = 5.0f; -COMPILER_STRIP_GATE(0x804FA6C8, &lit_3780); -#pragma pop - -/* 804FA6CC-804FA6D0 000010 0004+00 0/2 0/0 0/0 .rodata @3781 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3781 = 4.0f; -COMPILER_STRIP_GATE(0x804FA6CC, &lit_3781); -#pragma pop - -/* 804FA6D0-804FA6D4 000014 0004+00 0/2 0/0 0/0 .rodata @3782 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3782 = 20000.0f; -COMPILER_STRIP_GATE(0x804FA6D0, &lit_3782); -#pragma pop - -/* 804FA6D4-804FA6D8 000018 0004+00 0/1 0/0 0/0 .rodata @3783 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3783 = 1500.0f; -COMPILER_STRIP_GATE(0x804FA6D4, &lit_3783); -#pragma pop - -/* 804FA6D8-804FA6DC 00001C 0004+00 0/2 0/0 0/0 .rodata @3784 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3784 = 600.0f; -COMPILER_STRIP_GATE(0x804FA6D8, &lit_3784); -#pragma pop - -/* 804FA6DC-804FA6E0 000020 0004+00 0/2 0/0 0/0 .rodata @3785 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3785 = 120.0f; -COMPILER_STRIP_GATE(0x804FA6DC, &lit_3785); -#pragma pop - -/* 804FA6E0-804FA6E4 000024 0004+00 0/5 0/0 0/0 .rodata @3786 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3786 = 1000.0f; -COMPILER_STRIP_GATE(0x804FA6E0, &lit_3786); -#pragma pop - -/* 804FA6E4-804FA6E8 000028 0004+00 0/5 0/0 0/0 .rodata @3787 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3787 = 2.0f; -COMPILER_STRIP_GATE(0x804FA6E4, &lit_3787); -#pragma pop - -/* 804FA6E8-804FA6EC 00002C 0004+00 0/3 0/0 0/0 .rodata @3788 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3788 = 35.0f; -COMPILER_STRIP_GATE(0x804FA6E8, &lit_3788); -#pragma pop - -/* 804FA6EC-804FA6F0 000030 0004+00 0/1 0/0 0/0 .rodata @3789 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3789 = 7000.0f; -COMPILER_STRIP_GATE(0x804FA6EC, &lit_3789); -#pragma pop - -/* 804FA6F0-804FA6F4 000034 0004+00 0/1 0/0 0/0 .rodata @3790 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3790 = 180.0f; -COMPILER_STRIP_GATE(0x804FA6F0, &lit_3790); -#pragma pop - -/* 804FA6F4-804FA6F8 000038 0004+00 0/9 0/0 0/0 .rodata @3791 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3791 = 20.0f; -COMPILER_STRIP_GATE(0x804FA6F4, &lit_3791); -#pragma pop - -/* 804FA6F8-804FA6FC 00003C 0004+00 4/30 0/0 0/0 .rodata @3792 */ -SECTION_RODATA static u8 const lit_3792[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x804FA6F8, &lit_3792); - -/* 804FA6FC-804FA700 000040 0004+00 0/1 0/0 0/0 .rodata @3793 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3793 = 17.0f / 10.0f; -COMPILER_STRIP_GATE(0x804FA6FC, &lit_3793); -#pragma pop - -/* 804FA700-804FA704 000044 0004+00 0/2 0/0 0/0 .rodata @3794 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3794 = 1.5f; -COMPILER_STRIP_GATE(0x804FA700, &lit_3794); -#pragma pop - -/* 804FA704-804FA708 000048 0004+00 0/1 0/0 0/0 .rodata @3795 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3795 = 36000.0f; -COMPILER_STRIP_GATE(0x804FA704, &lit_3795); -#pragma pop - -/* 804FA708-804FA70C 00004C 0004+00 0/3 0/0 0/0 .rodata @3796 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3796 = 40.0f; -COMPILER_STRIP_GATE(0x804FA708, &lit_3796); -#pragma pop - -/* 804FA70C-804FA710 000050 0004+00 0/1 0/0 0/0 .rodata @3797 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3797 = 753.0f; -COMPILER_STRIP_GATE(0x804FA70C, &lit_3797); -#pragma pop - -/* 804FA710-804FA714 000054 0004+00 0/1 0/0 0/0 .rodata @3798 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3798 = 258.0f; -COMPILER_STRIP_GATE(0x804FA710, &lit_3798); -#pragma pop - -/* 804FA714-804FA718 000058 0004+00 0/1 0/0 0/0 .rodata @3799 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3799 = -2100.0f; -COMPILER_STRIP_GATE(0x804FA714, &lit_3799); -#pragma pop - -/* 804FA718-804FA71C 00005C 0004+00 0/2 0/0 0/0 .rodata @3800 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3800 = 1100.0f; -COMPILER_STRIP_GATE(0x804FA718, &lit_3800); -#pragma pop - -/* 804FA71C-804FA720 000060 0004+00 0/6 0/0 0/0 .rodata @3801 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3801 = 300.0f; -COMPILER_STRIP_GATE(0x804FA71C, &lit_3801); -#pragma pop - -/* 804FA720-804FA724 000064 0004+00 0/1 0/0 0/0 .rodata @3802 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3802 = 1200.0f; -COMPILER_STRIP_GATE(0x804FA720, &lit_3802); -#pragma pop - -/* 804FA950-804FA95C 000000 000C+00 5/5 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, +enum daE_FM_ACTION { + ACTION_NORMAL, + ACTION_FIGHT_RUN, + ACTION_N_FIGHT, + ACTION_F_FIGHT, + ACTION_DAMAGE_RUN, + ACTION_ANIMAL, + ACTION_FIRE, + ACTION_STOP, + ACTION_DOWN = 9, + ACTION_A_DOWN, + ACTION_START, + ACTION_END, }; -/* 804FA95C-804FA970 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 - -/* 804FA970-804FA978 000020 0006+02 1/1 0/0 0/0 .data h_id$3853 */ -SECTION_DATA static u8 h_id[6 + 2 /* padding */] = { - 0x81, - 0x51, - 0x87, - 0x2A, - 0x87, - 0x2B, - /* padding */ - 0x00, - 0x00, +enum daE_FM_TexAnm { + TEXANM_FM, + TEXANM_ATTACK, + TEXANM_PUTOUT, + TEXANM_PUTOUT_WAIT, + TEXANM_ANIMAL, + TEXANM_OP_DEMO, + TEXANM_HANG_WAIT, + TEXANM_DEMO_END01, + TEXANM_DEMO_END02, }; -/* 804FA978-804FA9DC 000028 0064+00 1/1 0/0 0/0 .data chain_z */ -SECTION_DATA static u8 chain_z[100] = { - 0x45, 0x2F, 0x00, 0x00, 0x44, 0xFA, 0x00, 0x00, 0xC5, 0x3B, 0x80, 0x00, 0xC5, 0x4E, 0x40, - 0x00, 0x45, 0x48, 0x00, 0x00, 0x45, 0x28, 0xC0, 0x00, 0xC4, 0xE1, 0x00, 0x00, 0xC5, 0x22, - 0x80, 0x00, 0x44, 0xFA, 0x00, 0x00, 0x44, 0xAF, 0x00, 0x00, 0xC5, 0x35, 0x40, 0x00, 0xC4, - 0xC8, 0x00, 0x00, 0x45, 0x09, 0x80, 0x00, 0x45, 0x1C, 0x40, 0x00, 0xC4, 0xA2, 0x80, 0x00, - 0xC5, 0x03, 0x40, 0x00, 0x44, 0x89, 0x80, 0x00, 0x44, 0xFA, 0x00, 0x00, 0xC5, 0x41, 0xC0, - 0x00, 0xC5, 0x0F, 0xC0, 0x00, 0x44, 0xE1, 0x00, 0x00, 0x45, 0x35, 0x40, 0x00, 0xC4, 0x89, - 0x80, 0x00, 0xC5, 0x28, 0xC0, 0x00, 0x45, 0x0F, 0xC0, 0x00, +UNK_REL_DATA + +/* 804EF0EC-804EF250 0000EC 0164+00 1/1 0/0 0/0 .text __ct__12daE_FM_HIO_cFv */ +daE_FM_HIO_c::daE_FM_HIO_c() { + no = -1; + + base_size = 1.0f; + field_0xc = 3.0f; + field_0x10 = 2.5f; + field_0x14 = 5.0f; + field_0x18 = 4.0f; + field_0x1c = 20000.0f; + field_0x20 = 1500.0f; + field_0x24 = 600.0f; + field_0x28 = 3.0f; + field_0x2c = 2.5f; + field_0x30 = 2.5f; + + field_0x34 = 0xFF; + field_0x36 = 0x8A; + field_0x38 = 0x18; + + field_0x3c = 1.0f; + field_0x40 = 120.0f; + field_0x44 = 1000.0f; + chain_size = 2.0f; + field_0x4c = 35.0f; + field_0x50 = 7000.0f; + field_0x54 = 180.0f; + field_0x58 = 20.0f; + field_0x5c = 0.0f; + field_0x60 = 0; + field_0x61 = 0; + field_0x8c = 1.7f; + field_0x90 = 1.5f; + field_0x64 = 1000.0f; + field_0x6c = 1500.0f; + field_0x74 = 0.0f; + field_0x7c = 36000.0f; + field_0x84 = 40.0f; + field_0x68 = 35.0f; + field_0x70 = 753.0f; + field_0x78 = 258.0f; + field_0x80 = -2100.0f; + field_0x88 = 40.0f; + + field_0x94 = 140; + field_0x96 = 270; + field_0x98 = 28; + field_0x9a = 100; + field_0x9c = 400; + + field_0xa0 = 1100.0f; + field_0xa4 = 300.0f; + field_0xac = 0; + field_0xa8 = 1200.0f; +} + +/* 804EF250-804EF29C 000250 004C+00 2/2 0/0 0/0 .text s_fmobj_del__FPvPv */ +static void* s_fmobj_del(void* i_actor, void* i_data) { + if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_OBJ_FMOBJ) { + fopAcM_delete((fopAc_ac_c*)i_actor); + } + + return NULL; +} + +UNK_REL_BSS; + +/* 804FAE95 0003+00 data_804FAE95 None */ +static u8 l_initHIO; + +/* 804FAEA4-804FAF54 000054 00B0+00 14/16 0/0 0/0 .bss l_HIO */ +static daE_FM_HIO_c l_HIO; + +/* 804FAF60-804FAF6C 000110 000C+00 0/3 0/0 0/0 .bss h_pos */ +static cXyz h_pos; + +/* 804FAF6C-804FAF70 00011C 0004+00 0/2 0/0 0/0 .bss h_range */ +static f32 h_range; + +/* 804FAF70-804FAF78 000120 0004+04 0/2 0/0 0/0 .bss h_power */ +static f32 h_power; + +static s8 h_unk; + +/* 804EF29C-804EF308 00029C 006C+00 1/1 0/0 0/0 .text s_hasira_sub__FPvPv */ +static void* s_hasira_sub(void* i_actor, void* i_data) { + if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_Obj_HHASHI) { + ((daObjHHASHI_c*)i_actor)->Rolling(&h_pos, h_range, h_power, h_unk); + } + + return NULL; +} + +/* 804EF308-804EF3CC 000308 00C4+00 1/1 0/0 0/0 .text s_hasira_poscheck__FPvPv */ +static void* s_hasira_poscheck(void* i_actor, void* i_data) { + if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_Obj_HHASHI) { + f32 x = ((fopAc_ac_c*)i_actor)->current.pos.x - ((fopAc_ac_c*)i_data)->current.pos.x; + f32 z = ((fopAc_ac_c*)i_actor)->current.pos.z - ((fopAc_ac_c*)i_data)->current.pos.z; + if (JMAFastSqrt((x * x) + (z * z)) < 500.0f) { + s16 temp_r0 = ((fopAc_ac_c*)i_data)->shape_angle.y - cM_atan2s(x, z); + if (temp_r0 < 0x3000 && temp_r0 > -0x3000) { + return i_actor; + } + } + } + + return NULL; +} + +/* 804FAF78-804FAF7C 000128 0004+00 2/2 0/0 0/0 .bss fire_range */ +static f32 fire_range; + +/* 804EF3CC-804EF63C 0003CC 0270+00 1/1 0/0 0/0 .text s_hasira_eff_sub__FPvPv */ +static void* s_hasira_eff_sub(void* i_actor, void* i_data) { + if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_Obj_HHASHI) { + daObjHHASHI_c* a_actor = (daObjHHASHI_c*)i_actor; + for (int i = 0; i < 10; i++) { + if (((e_fm_class*)i_data)->mHashiraActors[i] == a_actor) { + return NULL; + } + } + + for (int i = 0; i < 10; i++) { + if (((e_fm_class*)i_data)->mHashiraActors[i] == NULL) { + e_fm_class* a_data = (e_fm_class*)i_data; + if (a_actor->field_0x5a4 == 0) { + cXyz sp10 = a_data->current.pos - a_actor->current.pos; + if (sp10.abs() < fire_range) { + csXyz eff_rot; + eff_rot.x = eff_rot.z = 0; + eff_rot.y = cM_atan2s(sp10.x, sp10.z); + + for (int j = 0; j < 3; j++) { + static u16 h_id[3] = {0x8151, 0x872A, 0x872B}; + dComIfGp_particle_set(h_id[j], &a_actor->current.pos, &eff_rot, NULL); + } + + ((e_fm_class*)i_data)->mHashiraActors[i] = a_actor; + return NULL; + } + } + } + } + } + + return NULL; +} + +/* 804EF6B4-804EF710 0006B4 005C+00 6/6 0/0 0/0 .text hasira_hahen_hit__FP4cXyzffSc */ +static void hasira_hahen_hit(cXyz* i_pos, f32 i_range, f32 i_power, s8 param_3) { + h_pos = *i_pos; + h_range = i_range; + h_power = i_power; + h_unk = param_3; + fpcM_Search(s_hasira_sub, NULL); +} + +/* 804EF710-804EF808 000710 00F8+00 5/5 0/0 0/0 .text carry_off__FP10e_fm_classi */ +static void carry_off(e_fm_class* i_this, int i_chainNo) { + if (i_this->mChain[i_chainNo].field_0x617e != 0) { + i_this->mChain[i_chainNo].field_0x617e = 0; + mDoAud_seStart(Z2SE_EN_FM_CHAIN_CUTOFF, &i_this->mChain[i_chainNo].sound_pos, 0, 0); + } + + if (i_this->mChain[i_chainNo].field_0x617c != 0) { + i_this->mChain[i_chainNo].field_0x617c = 0; + i_this->mChain[i_chainNo].field_0x617d = 20; + daPy_getPlayerActorClass()->cancelFmChainGrab(); + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER6, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); + } +} + +/* 804EF808-804EF8B8 000808 00B0+00 13/13 0/0 0/0 .text anm_init__FP10e_fm_classifUcf */ +static void anm_init(e_fm_class* i_this, int i_anm, f32 i_morf, u8 i_mode, f32 i_speed) { + i_this->mpFmModelMorf->setAnm((J3DAnmTransform *)dComIfG_getObjectRes("E_fm", i_anm), i_mode, i_morf, i_speed, 0.0f, -1.0f, NULL); + i_this->mAnm = i_anm; +} + +/* 804EF8B8-804EF99C 0008B8 00E4+00 1/1 0/0 0/0 .text nodeCallBack__FP8J3DJointi */ +static int nodeCallBack(J3DJoint* i_joint, int param_1) { + if (param_1 == 0) { + int jnt_no = i_joint->getJntNo(); + J3DModel* model = j3dSys.getModel(); + e_fm_class* a_this = (e_fm_class*)model->getUserArea(); + + if (a_this != NULL) { + MTXCopy(model->getAnmMtx(jnt_no), *calc_mtx); + if (jnt_no == 2) { + cMtx_YrotM(*calc_mtx, -a_this->mBodyRotX); + cMtx_ZrotM(*calc_mtx, a_this->mHeadRotZ); + } else if (jnt_no == 1) { + cMtx_XrotM(*calc_mtx, a_this->mBodyRotX); + } + MTXCopy(*calc_mtx, J3DSys::mCurrentMtx); + } + } + + return 1; +} + +static f32 chain_z[25] = { + 2800.0f, + 2000.0f, + -3000.0f, + -3300.0f, + 3200.0f, + 2700.0f, + -1800.0f, + -2600.0f, + 2000.0f, + 1400.0f, + -2900.0f, + -1600.0f, + 2200.0f, + 2500.0f, + -1300.0f, + -2100.0f, + 1100.0f, + 2000.0f, + -3100.0f, + -2300.0f, + 1800.0f, + 2900.0f, + -1100.0f, + -2700.0f, + 2300.0f, }; -/* 804FA9DC-804FA9E0 00008C 0004+00 1/1 0/0 0/0 .data tame_name$4558 */ -SECTION_DATA static u8 tame_name[4] = { - 0x81, - 0xA3, - 0x81, - 0xA4, -}; +/* 804EF99C-804EFC3C 00099C 02A0+00 1/1 0/0 0/0 .text chain_draw__FP10e_fm_classP7chain_si */ +static void chain_draw(e_fm_class* i_this, chain_s* i_chain_s, int i_chainNo) { + fopAc_ac_c* actor = (fopAc_ac_c*)i_this; + cXyz sp1C; -/* 804FA9E0-804FA9E8 000090 0008+00 1/1 0/0 0/0 .data fire_name$4712 */ -SECTION_DATA static u8 fire_name[8] = { - 0x81, 0x81, 0x81, 0x82, 0x81, 0x83, 0x81, 0x84, -}; + f32 var_f31 = i_chain_s->field_0x6174 * (0.002f + TREG_F(9)); + if (var_f31 > 0.6f + TREG_F(10)) { + var_f31 = 0.6f + TREG_F(10); + } -/* 804FA9E8-804FAA08 000098 0020+00 0/1 0/0 0/0 .data g_c_i$5284 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 g_c_i[32] = { - 0x84, 0x81, 0x84, 0x82, 0x84, 0x83, 0x84, 0x84, 0x84, 0x85, 0x84, 0x86, 0x84, 0x87, 0x84, 0x88, - 0x84, 0x89, 0x84, 0x8A, 0x84, 0x8B, 0x84, 0x8C, 0x84, 0x8D, 0x84, 0x8E, 0x84, 0x8F, 0x84, 0x90, -}; -#pragma pop + f32 var_f30 = i_chain_s->field_0x6178; + if (var_f30 > 0.75f) { + var_f30 = 0.75f; + } -/* 804FAA08-804FAA48 0000B8 0040+00 0/1 0/0 0/0 .data g_c_ji$5285 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 g_c_ji[64] = { - 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x05, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x13, - 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0E, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x13, -}; -#pragma pop + J3DModel* model; + for (int i = 0; i < i_chain_s->field_0x61d0 - 1; i++) { + MtxTrans(i_chain_s->pos[i].x, i_chain_s->pos[i].y, i_chain_s->pos[i].z, 0); + cMtx_YrotM(*calc_mtx, i_chain_s->rot[i].y); + cMtx_XrotM(*calc_mtx, i_chain_s->rot[i].x); -/* 804FAA48-804FAA50 0000F8 0008+00 0/1 0/0 0/0 .data g_e_i$5297 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 g_e_i[8] = { - 0x84, 0x7B, 0x84, 0x7C, 0x84, 0x7D, 0x84, 0x7E, -}; -#pragma pop + if (i != i_chain_s->field_0x61d0 - 2 || i_chain_s->field_0x617c == 0) { + s16 spC = (1.0f - var_f30) * chain_z[i]; + if ((i + i_chain_s->field_0x61d0) & 1) { + spC += 0x4000; + } + cMtx_ZrotM(*calc_mtx, spC); + } -/* 804FAA50-804FAA84 -00001 0034+00 1/1 0/0 0/0 .data @7067 */ -SECTION_DATA static void* lit_7067[13] = { - (void*)(((char*)action__FP10e_fm_class) + 0xB0), - (void*)(((char*)action__FP10e_fm_class) + 0xC8), - (void*)(((char*)action__FP10e_fm_class) + 0xE0), - (void*)(((char*)action__FP10e_fm_class) + 0xF8), - (void*)(((char*)action__FP10e_fm_class) + 0x110), - (void*)(((char*)action__FP10e_fm_class) + 0x128), - (void*)(((char*)action__FP10e_fm_class) + 0x140), - (void*)(((char*)action__FP10e_fm_class) + 0x158), - (void*)(((char*)action__FP10e_fm_class) + 0x1B4), - (void*)(((char*)action__FP10e_fm_class) + 0x170), - (void*)(((char*)action__FP10e_fm_class) + 0x180), - (void*)(((char*)action__FP10e_fm_class) + 0x190), - (void*)(((char*)action__FP10e_fm_class) + 0x1A0), -}; + MtxScale(l_HIO.chain_size, l_HIO.chain_size, l_HIO.chain_size + var_f31, 1); + MtxTrans(0.0f, 0.0f, 8.0f + XREG_F(4), 1); -/* 804FAA84-804FAABC 000134 0038+00 0/1 0/0 0/0 .data eff_joint_d$7090 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 eff_joint_d[56] = { - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x01, -}; -#pragma pop + if (i_chainNo >= 2) { + if (i == i_chain_s->field_0x61d0 - 2) { + model = i_chain_s->model[24]; + } else { + model = i_chain_s->model[i]; + } + } else { + model = i_chain_s->model[i]; + } -/* 804FAABC-804FAAD8 00016C 001C+00 0/1 0/0 0/0 .data eff_id$7091 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 eff_id[28] = { - 0x80, 0xFD, 0x80, 0xF9, 0x80, 0xF9, 0x80, 0xFC, 0x80, 0xFC, 0x80, 0xFA, 0x80, 0xFB, - 0x80, 0xF7, 0x80, 0xF7, 0x80, 0xF8, 0x80, 0xFE, 0x80, 0xFF, 0x87, 0x23, 0x87, 0x22, -}; -#pragma pop + model->setBaseTRMtx(*calc_mtx); + g_env_light.settingTevStruct(0, &i_chain_s->pos[i], &i_chain_s->tevstr[i]); + g_env_light.setLightTevColorType_MAJI(model, &i_chain_s->tevstr[i]); -/* 804FAAD8-804FAAE0 000188 0008+00 0/1 0/0 0/0 .data ef_bck$7111 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 ef_bck[8] = { - 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, -}; -#pragma pop + J3DModelData* modelData = model->getModelData(); + J3DMaterial* material = modelData->getMaterialNodePointer(0); + if (i < 6) { + material->getTevColor(0)->r = 0.166667f * ((6 - i) * i_this->mChainColorR); + } else { + material->getTevColor(0)->r = 0; + } -/* 804FAAE0-804FAAE4 000190 0004+00 0/1 0/0 0/0 .data cg_name$7351 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 cg_name_7351[4] = { - 0x84, - 0x2C, - 0x84, - 0x96, -}; -#pragma pop + mDoExt_modelUpdate(model); + } +} -/* 804FAAE4-804FAAF0 000194 000C+00 0/1 0/0 0/0 .data cg_name$7360 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 cg_name_7360[12] = { - 0x84, 0x0F, 0x84, 0x7F, 0x87, 0x26, 0x87, 0x27, 0x87, 0x28, 0x87, 0x29, -}; -#pragma pop +/* 804EFC3C-804EFF68 000C3C 032C+00 1/0 0/0 0/0 .text daE_FM_Draw__FP10e_fm_class */ +static int daE_FM_Draw(e_fm_class* i_this) { + J3DModel* model = i_this->mpFmModelMorf->getModel(); + g_env_light.settingTevStruct(0, &i_this->current.pos, &i_this->tevStr); + g_env_light.setLightTevColorType_MAJI(model, &i_this->tevStr); + i_this->mpFmBtk[i_this->mPlayTexAnmNo]->entry(model->getModelData()); + i_this->mpFmBrk[i_this->mPlayTexAnmNo]->entry(model->getModelData()); -/* 804FAAF0-804FAB08 0001A0 0018+00 0/1 0/0 0/0 .data hl_d$7373 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 hl_d[24] = { - 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x07, - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0F, -}; -#pragma pop + J3DModelData* modelData = model->getModelData(); + J3DMaterial* chain_material = modelData->getMaterialNodePointer(4); -/* 804FAB08-804FAB20 0001B8 0018+00 0/1 0/0 0/0 .data hl_s$7374 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 hl_s[24] = { - 0x42, 0x48, 0x00, 0x00, 0x42, 0x48, 0x00, 0x00, 0x42, 0x48, 0x00, 0x00, - 0x42, 0x48, 0x00, 0x00, 0x42, 0x48, 0x00, 0x00, 0x42, 0x48, 0x00, 0x00, -}; -#pragma pop + chain_material->getTevColor(0)->r = i_this->mChainColorR; + chain_material = modelData->getMaterialNodePointer(0); + + int color = 255.0f * i_this->field_0x778; + chain_material->getTevColor(2)->r = color; + chain_material->getTevColor(2)->g = color; + chain_material->getTevColor(2)->b = color; -/* 804FAB20-804FAB30 0001D0 0010+00 0/1 0/0 0/0 .data sisi_joint$7416 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 sisi_joint[16] = { - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x19, -}; -#pragma pop + i_this->mpFmModelMorf->entryDL(); -/* 804FAB30-804FAB40 0001E0 0010+00 0/1 0/0 0/0 .data chain_hit_d$7417 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 chain_hit_d[16] = { - 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x03, -}; -#pragma pop + if (!i_this->mHideCore) { + g_env_light.setLightTevColorType_MAJI(i_this->mpCoreModel, &i_this->tevStr); + fopAcM_setEffectMtx(i_this, i_this->mpCoreModel->getModelData()); + i_this->mpCoreBtk->entry(i_this->mpCoreModel->getModelData()); + i_this->mpCoreBrk->entry(i_this->mpCoreModel->getModelData()); + mDoExt_modelUpdateDL(i_this->mpCoreModel); + } -/* 804FAB40-804FAB44 0001F0 0004+00 0/1 0/0 0/0 .data chain_at_id$7477 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 chain_at_id[4] = { - 0x87, - 0x24, - 0x87, - 0x25, -}; -#pragma pop + if (i_this->field_0x792 == 0 && i_this->mShadowKey != 353535) { + cXyz sp10; + sp10.set(i_this->current.pos.x, 100.0f + i_this->current.pos.y, i_this->current.pos.z); -/* 804FAB44-804FAB50 0001F4 000C+00 0/1 0/0 0/0 .data c_id$7478 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 c_id[12] = { - 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0E, -}; -#pragma pop + i_this->mShadowKey = dComIfGd_setShadow(i_this->mShadowKey, 1, model, &sp10, (2500.0f + BREG_F(19)) * l_HIO.base_size, 0.0f, i_this->current.pos.y, i_this->mAcch.GetGroundH(), i_this->mAcch.m_gnd, &i_this->tevStr, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex()); + } -/* 804FAB50-804FAB58 000200 0006+02 0/1 0/0 0/0 .data core_id$7501 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 core_id[6 + 2 /* padding */] = { - 0x84, - 0x10, - 0x84, - 0x11, - 0x84, - 0x80, - /* padding */ - 0x00, - 0x00, -}; -#pragma pop + if (i_this->mDrawDemoModel) { + J3DModel* model = i_this->mpDemoFmModelMorf->getModel(); + g_env_light.setLightTevColorType_MAJI(model, &i_this->tevStr); + i_this->mpDemoFmBrk->entry(model->getModelData()); + i_this->mpDemoFmModelMorf->entryDL(); + } -/* 804FAB58-804FAB60 000208 0006+02 0/1 0/0 0/0 .data f_id$7515 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 f_id[6 + 2 /* padding */] = { - 0x84, - 0x12, - 0x84, - 0x13, - 0x84, - 0x14, - /* padding */ - 0x00, - 0x00, -}; -#pragma pop + if (i_this->field_0x790 != 0) { + for (int i = 0; i < 2; i++) { + J3DModel* model = i_this->mpAttackEfModelMorf[i]->getModel(); + i_this->mpAttackEfBtk[i]->entry(model->getModelData()); + if (i != 0) { + i_this->mpAttackEfBrk->entry(model->getModelData()); + } + i_this->mpAttackEfModelMorf[i]->entryDL(); + } + } -/* 804FAB60-804FAB70 000210 0010+00 0/1 0/0 0/0 .data end_id$7532 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 end_id[16] = { - 0x84, 0x92, 0x84, 0x93, 0x84, 0x94, 0x84, 0x95, 0x86, 0xD6, 0x86, 0xD7, 0x86, 0xD8, 0x86, 0xD9, -}; -#pragma pop + for (int i = 0; i < 4; i++) { + chain_draw(i_this, &i_this->mChain[i], i); + } -/* 804FAB70-804FAB94 000220 0024+00 0/1 0/0 0/0 .data brk$8360 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 brk[36] = { - 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x3B, - 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x3A, - 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x37, -}; -#pragma pop + return 1; +} -/* 804FAB94-804FABB8 000244 0024+00 0/1 0/0 0/0 .data btk$8361 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 btk[36] = { - 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x49, - 0x00, 0x00, 0x00, 0x4A, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x48, - 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x46, -}; -#pragma pop +/* 804EFF68-804F005C 000F68 00F4+00 1/1 0/0 0/0 .text other_bg_check__FP10e_fm_classP10fopAc_ac_c + */ +static BOOL other_bg_check(e_fm_class* i_this, fopAc_ac_c* i_other) { + fopAc_ac_c* actor = (fopAc_ac_c*)i_this; + dBgS_LinChk linchk; + cXyz sp24; + cXyz start; + cXyz end; -/* 804FABB8-804FABC0 000268 0008+00 0/1 0/0 0/0 .data eff_bmd$8401 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 eff_bmd[8] = { - 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2B, -}; -#pragma pop + if (i_other != NULL) { + end = i_other->current.pos; + end.y += 30.0f; + start = actor->current.pos; + start.y = actor->eyePos.y; -/* 804FABC0-804FABC8 000270 0008+00 0/1 0/0 0/0 .data eff_btk$8402 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 eff_btk[8] = { - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x41, -}; -#pragma pop + linchk.Set(&start, &end, actor); + if (dComIfG_Bgsp().LineCross(&linchk)) { + return TRUE; + } + return FALSE; + } -/* 804FABC8-804FAC08 000278 0040+00 0/1 0/0 0/0 .data cc_sph_src$8693 */ -#pragma push -#pragma force_active on -static dCcD_SrcSph cc_sph_src = { - { - {0x0, {{AT_TYPE_CSTATUE_SWING, 0x1, 0x1d}, {0x0, 0x0}, 0x79}}, // mObj - {dCcD_SE_NONE, 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 -}; -#pragma pop + return TRUE; +} -/* 804FAC08-804FAC48 0002B8 0040+00 0/1 0/0 0/0 .data at_sph_src$8694 */ -#pragma push -#pragma force_active on -static dCcD_SrcSph at_sph_src = { - { - {0x0, {{AT_TYPE_CSTATUE_SWING, 0x2, 0x1d}, {0x0, 0x0}, 0x0}}, // mObj - {dCcD_SE_NONE, 0x0, 0xe, 0x0, 0x0}, // mGObjAt - {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg - {0x0}, // mGObjCo - }, // mObjInf - { - {{0.0f, 0.0f, 0.0f}, 35.0f} // mSph - } // mSphAttr -}; -#pragma pop +/* 804F005C-804F00E4 00105C 0088+00 2/2 0/0 0/0 .text pl_check__FP10e_fm_classfs */ +static BOOL pl_check(e_fm_class* i_this, f32 i_range, s16 i_sightRange) { + if (i_sightRange != 0) { + s16 angle_diff = i_this->shape_angle.y - i_this->mAngleToPlayer; + if (angle_diff > i_sightRange) { + return FALSE; + } else if (angle_diff < (s16)-i_sightRange) { + return FALSE; + } + } -/* 804FAC48-804FAC88 0002F8 0040+00 0/1 0/0 0/0 .data core_sph_src$8695 */ -#pragma push -#pragma force_active on -static dCcD_SrcSph core_sph_src = { - { - {0x0, {{0x0, 0x0, 0x0}, {0x2002, 0x3}, 0x0}}, // mObj - {dCcD_SE_NONE, 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 -}; -#pragma pop + if (fopAcM_searchPlayerDistance(i_this) < i_range) { + return TRUE; + } -/* 804FAC88-804FACC8 000338 0040+00 0/1 0/0 0/0 .data eff_at_sph_src$8696 */ -#pragma push -#pragma force_active on -static dCcD_SrcSph eff_at_sph_src = { - { - {0x0, {{AT_TYPE_CSTATUE_SWING, 0x4, 0x1f}, {0x0, 0x0}, 0x0}}, // mObj - {dCcD_SE_NONE, 0x0, 0xe, 0x1, 0x0}, // mGObjAt - {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg - {0x0}, // mGObjCo - }, // mObjInf - { - {{0.0f, 0.0f, 0.0f}, 35.0f} // mSph - } // mSphAttr -}; -#pragma pop + return FALSE; +} -/* 804FACC8-804FAD08 000378 0040+00 0/1 0/0 0/0 .data f_eff_at_sph_src$8697 */ -#pragma push -#pragma force_active on -static dCcD_SrcSph f_eff_at_sph_src = { - { - {0x0, {{AT_TYPE_CSTATUE_SWING, 0x2, 0xd}, {0x0, 0x0}, 0x0}}, // mObj - {dCcD_SE_NONE, 0x0, 0x0, 0x1, 0x0}, // mGObjAt - {dCcD_SE_NONE, 0x0, 0x1, 0x0, 0x2}, // mGObjTg - {0x0}, // mGObjCo - }, // mObjInf - { - {{0.0f, 0.0f, 0.0f}, 35.0f} // mSph - } // mSphAttr -}; -#pragma pop +/* 804F00E4-804F0530 0010E4 044C+00 1/1 0/0 0/0 .text e_fm_normal__FP10e_fm_class */ +static void e_fm_normal(e_fm_class* i_this) { + fopAc_ac_c* player = dComIfGp_getPlayer(0); + if (i_this->mMode >= 0 && !fopAcM_otherBgCheck(i_this, player)) { + i_this->mAction = ACTION_FIGHT_RUN; + i_this->mMode = 0; + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_FIND, -1); + return; + } -/* 804FAD08-804FAD48 0003B8 0040+00 0/1 0/0 0/0 .data chain_at_sph_src$8698 */ -#pragma push -#pragma force_active on -static dCcD_SrcSph chain_at_sph_src = { - { - {0x0, {{AT_TYPE_CSTATUE_BOSS_SWING, 0x2, 0x1f}, {0x0, 0x0}, 0x0}}, // mObj - {dCcD_SE_NONE, 0x0, 0x2, 0x0, 0x0}, // mGObjAt - {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg - {0x0}, // mGObjCo - }, // mObjInf - { - {{0.0f, 0.0f, 0.0f}, 90.0f} // mSph - } // mSphAttr -}; -#pragma pop + cXyz sp50; + cXyz sp44; + f32 move_speed = 0.0f; + s16 spA = 0x3000; + int anm_frame = (int)i_this->mpFmModelMorf->getFrame(); -/* 804FAD48-804FAD88 0003F8 0040+00 0/0 0/0 0/0 .data chain_co_sph_src$8699 */ -#pragma push -#pragma force_active on -static dCcD_SrcSph chain_co_sph_src = { - { - {0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj - {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt - {dCcD_SE_METAL, 0x2, 0x0, 0x0, 0x3}, // mGObjTg - {0x0}, // mGObjCo - }, // mObjInf - { - {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph - } // mSphAttr -}; -#pragma pop + i_this->field_0x7c0 = 1; + + switch (i_this->mMode) { + case 2: + break; + case -10: + fpcM_Search(s_fmobj_del, NULL); + if (i_this->mTimers[0] == 0 && !dComIfGp_event_runCheck()) { + i_this->mMode = 0; + } + break; + case 0: + if (i_this->mTimers[0] == 0) { + sp44.x = i_this->home.pos.x + cM_rndFX(300.0f); + sp44.y = i_this->home.pos.y; + sp44.z = i_this->home.pos.z + cM_rndFX(300.0f); + sp50 = sp44 - i_this->current.pos; + + s16 sp8 = cM_atan2s(sp50.x, sp50.z) - i_this->current.angle.y; + if (sp8 > 0x4000) { + sp8 = 0x4000; + } else if (sp8 < -0x4000) { + sp8 = -0x4000; + } + + i_this->field_0x5c4 = i_this->current.angle.y + sp8; + anm_init(i_this, 0x23, 20.0f, 2, l_HIO.field_0xc); + i_this->mMode = 1; + i_this->mTimers[0] = 100.0f + cM_rndF(100.0f); + } else { + spA = 0x7000; + } + break; + case 1: + i_this->mpFmModelMorf->setPlaySpeed(l_HIO.field_0xc); + + for (int i = 0; i < 2; i++) { + int sp1C = 1 - i; + if (fabsf(i_this->mFootPos[i].y - i_this->current.pos.y) < 15.0f && fabsf(i_this->mFootPos[sp1C].y - i_this->current.pos.y) >= 15.0f) { + move_speed = l_HIO.field_0x10; + i_this->field_0x7e0 = sp1C; + } + } + + if (i_this->speedF < 1.0f && move_speed > 1.0f) { + i_this->mSound.startCreatureSound(Z2SE_EN_FM_CHAIN_FOOTNOTE, 0, -1); + } + + if (i_this->speedF > 1.0f && move_speed < 1.0f) { + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER5, 0xF, cXyz(0.0f, 1.0f, 0.0f)); + dComIfGp_particle_set(0x8150, &i_this->home.pos, NULL, NULL); + mDoAud_seStart(Z2SE_OBJ_FM_DIRTFALL, NULL, 0, 0); + i_this->mSound.startCreatureSound(Z2SE_EN_FM_FOOTNOTE, 0, -1); + } + + if (move_speed > 1.0f) { + cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->field_0x5c4, 8, 0x100); + } + + if (i_this->mTimers[0] == 0) { + i_this->mMode = 0; + i_this->mTimers[0] = 50.0f + cM_rndF(100.0f); + anm_init(i_this, 0x1E, 50.0f, 2, 1.0f); + move_speed = 0.0f; + } else { + for (int i = 0; i < 2; i++) { + if (i_this->mChain[i].field_0x617e != 0) {} + } + } + break; + } + + i_this->speedF = move_speed; +} + +/* 804F0530-804F0A78 001530 0548+00 1/1 0/0 0/0 .text e_fm_fight_run__FP10e_fm_class */ +static void e_fm_fight_run(e_fm_class* i_this) { + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz sp4C; + cXyz sp40; + + f32 move_speed = 0.0f; + int anm_frame = i_this->mpFmModelMorf->getFrame(); + i_this->field_0x7c0 = 1; + s8 do_f_fight = FALSE; + s8 do_n_fight = FALSE; + + switch (i_this->mMode) { + case 0: + i_this->mTimers[0] = 20.0f + cM_rndF(10.0f); + anm_init(i_this, 0x22, 30.0f, 2, 1.0f); + i_this->mTimers[2] = l_HIO.field_0x40 + cM_rndF(0.5f * l_HIO.field_0x40); + i_this->mMode = 1; + /* fallthrough */ + case 1: + if (i_this->mTimers[0] == 0) { + anm_init(i_this, 0x24, 30.0f, 2, l_HIO.field_0xc); + i_this->mMode = 2; + } + break; + case 2: + i_this->mpFmModelMorf->setPlaySpeed(l_HIO.field_0xc); + for (int i = 0; i <= 1; i++) { + int sp18 = 1 - i; + if (fabsf(i_this->mFootPos[i].y - i_this->current.pos.y) < 15.0f && fabsf(i_this->mFootPos[sp18].y - i_this->current.pos.y) >= 15.0f) { + move_speed = l_HIO.field_0x14; + i_this->field_0x7e0 = sp18; + } + } + + if (i_this->speedF < 1.0f && move_speed > 1.0f) { + i_this->mSound.startCreatureSound(Z2SE_EN_FM_CHAIN_FOOTNOTE, 0, -1); + } + + if (i_this->speedF > 1.0f && move_speed < 1.0f) { + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER5, 0xF, cXyz(0.0f, 1.0f, 0.0f)); + dComIfGp_particle_set(0x8150, &i_this->home.pos, NULL, NULL); + mDoAud_seStart(Z2SE_OBJ_FM_DIRTFALL, NULL, 0, 0); + i_this->mSound.startCreatureSound(Z2SE_EN_FM_FOOTNOTE, 0, -1); + hasira_hahen_hit(&i_this->mFootPos[i_this->field_0x7e0], 100.0f + VREG_F(4), 20.0f + VREG_F(5), -1); + } + + for (int i = 2; i <= 3; i++) { + sp4C = i_this->mChain[i].field_0x6180 - i_this->current.pos; + s16 spC = i_this->shape_angle.y - cM_atan2s(sp4C.x, sp4C.z); + + if ((spC > 0x6000 || spC < -0x6000) && (i_this->mChain[i].field_0x617e != 0 || (i_this->mChain[i].field_0x617c != 0 && daPy_getPlayerActorClass()->checkEquipHeavyBoots()))) { + f32 var_f30; + if (i_this->mChain[i].field_0x617c != 0) { + var_f30 = 280.0f + VREG_F(10); + } else { + var_f30 = 100.0f + VREG_F(11); + } + + if (i_this->mChain[i].field_0x6174 > var_f30 && ((i == 2 && (anm_frame & 252) == 12) || (i == 3 && (anm_frame & 252) == 40))) { + i_this->mAction = ACTION_STOP; + i_this->mMode = 0; + i_this->field_0x808 = i; + return; + } + } + } + + if (i_this->field_0x809 != 0) { + s16 spA = i_this->mAngleToPlayer - i_this->current.angle.y; + if (spA < 0x400 && spA > -0x400) { + do_f_fight = TRUE; + } + } + + if (i_this->mAcch.ChkWallHit() && fpcM_Search(s_hasira_poscheck, i_this)) { + do_n_fight = TRUE; + } + } + + i_this->speedF = move_speed; + + if (move_speed > 1.0f) { + cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->mAngleToPlayer, 2, KREG_S(6) + 0x500); + } + + if (pl_check(i_this, l_HIO.field_0x24 + TREG_F(11), 0x3000)) { + do_n_fight = TRUE; + } else if (pl_check(i_this, l_HIO.field_0x20 + TREG_F(11), 0) && i_this->mTimers[2] == 0) { + do_f_fight = TRUE; + } + + if (do_f_fight) { + i_this->mAction = ACTION_F_FIGHT; + i_this->mMode = 0; + anm_init(i_this, 0x22, 20.0f, 2, 1.0f); + } + + if (do_n_fight) { + i_this->mAction = ACTION_N_FIGHT; + i_this->mMode = 0; + } +} + +/* 804F0A78-804F0D3C 001A78 02C4+00 1/1 0/0 0/0 .text e_fm_n_fight__FP10e_fm_class */ +static void e_fm_n_fight(e_fm_class* i_this) { + int anm_frame = i_this->mpFmModelMorf->getFrame(); + cXyz sp28; + cXyz sp1C; + + i_this->field_0x7c0 = 1; + + switch (i_this->mMode) { + case 0: + anm_init(i_this, 0xC, 10.0f, 0, 1.0f); + i_this->mSound.startCreatureSound(Z2SE_EN_FM_ATTACK02_CHAIN, 0, -1); + i_this->mMode = 1; + break; + case 1: + if (anm_frame >= 30 && anm_frame <= 40) { + i_this->field_0x1829 = 1; + i_this->field_0x1828 = 1; + + if (anm_frame == AREG_S(6) + 35) { + i_this->field_0x2399 = 2; + } + + if (anm_frame == 30) { + i_this->mSound.startCreatureSound(Z2SE_EN_FM_BUN, 0, -1); + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_UDEHURI, -1); + } + + if (anm_frame == 35) { + carry_off(i_this, i_this->field_0x1828); + } + } else if (anm_frame >= 50 && anm_frame <= 60) { + i_this->field_0x1829 = 1; + i_this->field_0x1828 = 0; + + if (anm_frame == AREG_S(7) + 57) { + i_this->field_0x2399 = 1; + } + + if (anm_frame == 52) { + i_this->mSound.startCreatureSound(Z2SE_EN_FM_BUN, 0, -1); + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_UDEHURI, -1); + } + + if (anm_frame == 53) { + carry_off(i_this, i_this->field_0x1828); + } + } + + if (i_this->mpFmModelMorf->isStop()) { + if (cM_rndF(1.0f) < 0.5f && pl_check(i_this, l_HIO.field_0x24 + TREG_F(11), 0x3000)) { + i_this->mAction = ACTION_FIRE; + anm_init(i_this, 0x22, 20.0f, 2, 1.0f); + } else { + i_this->mAction = ACTION_NORMAL; + } + i_this->mMode = 0; + } + break; + } + + cLib_addCalc0(&i_this->speedF, 1.0f, 1.0f); + + if (i_this->field_0x1829 != 0) { + cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->mAngleToPlayer, 2, KREG_S(6) + 0x500); + } +} + +/* 804F0D3C-804F0F80 001D3C 0244+00 1/1 0/0 0/0 .text tame_eff_set__FP10e_fm_class */ +static void tame_eff_set(e_fm_class* i_this) { + J3DModel* model = i_this->mpFmModelMorf->getModel(); + cXyz mae(0.0f, 0.0f, 0.0f); + cXyz ato; + + MTXCopy(model->getAnmMtx(1), *calc_mtx); + MtxPosition(&mae, &ato); + + i_this->field_0x1870 = dComIfGp_particle_set(i_this->field_0x1870, 0x814D, &ato, &i_this->shape_angle, NULL); + i_this->field_0x1874 = dComIfGp_particle_set(i_this->field_0x1874, 0x814E, &i_this->current.pos, NULL, NULL); + i_this->field_0x1878 = dComIfGp_particle_set(i_this->field_0x1878, 0x814F, &i_this->current.pos, NULL, NULL); + + if (i_this->field_0x792 == 0) { + for (int i = 0; i < 2; i++) { + static u16 tame_name[] = {0x81A3, 0x81A4}; + i_this->field_0x187c[i] = dComIfGp_particle_set(i_this->field_0x187c[i], tame_name[i], &ato, NULL, NULL); + + JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->field_0x187c[i]); + if (emitter != NULL) { + emitter->setGlobalRTMatrix(model->getAnmMtx(1)); + } + } + } +} + +/* 804F0F80-804F11D8 001F80 0258+00 1/1 0/0 0/0 .text e_fm_f_fight__FP10e_fm_class */ +static void e_fm_f_fight(e_fm_class* i_this) { + cXyz sp30; + cXyz sp24; + int anm_frame = i_this->mpFmModelMorf->getFrame(); + + switch (i_this->mMode) { + case 0: + if ((int)i_this->mpFmBtk[0]->getFrame() == 0) { + anm_init(i_this, 0xB, 10.0f, 0, 1.0f); + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_ATTACK_TAME, -1); + i_this->mSound.startCreatureSound(Z2SE_EN_FM_ATTACK_TAME, 0, -1); + + i_this->mPlayTexAnmNo = TEXANM_ATTACK; + i_this->mpFmBrk[TEXANM_ATTACK]->setFrame(0.0f); + i_this->mpFmBtk[TEXANM_ATTACK]->setFrame(0.0f); + i_this->mMode = 1; + } + break; + case 1: + tame_eff_set(i_this); + + if (anm_frame == TREG_S(7) + 88) { + i_this->field_0x790 = 1; + dComIfGp_getVibration().StartQuake(VIBMODE_Q_POWER3, 1, cXyz(0.0f, 1.0f, 0.0f)); + i_this->mSound.startCreatureSound(Z2SE_EN_FM_BLAST, 0, -1); + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_BLAST_GAOO, -1); + + if (dComIfGs_getArrowNum() <= 5 || dComIfGs_getLife() <= 4) { + i_this->mDoCreateBa = TRUE; + } + } + + if (i_this->mpFmModelMorf->isStop()) { + if (cM_rndF(1.0f) < 0.3f) { + i_this->mAction = ACTION_ANIMAL; + } else { + i_this->mAction = ACTION_NORMAL; + } + + i_this->mMode = 0; + i_this->mPlayTexAnmNo = TEXANM_FM; + i_this->mpFmBrk[TEXANM_FM]->setFrame(0.0f); + i_this->mpFmBtk[TEXANM_FM]->setFrame(0.0f); + } + break; + } + + cLib_addCalc0(&i_this->speedF, 1.0f, 1.0f); +} + +/* 804F11D8-804F13FC 0021D8 0224+00 2/2 0/0 0/0 .text animal_eff_set__FP10e_fm_classs */ +static void animal_eff_set(e_fm_class* i_this, s16 param_1) { + J3DModel* model = i_this->mpFmModelMorf->getModel(); + + if (param_1 == 1) { + for (int i = 0; i < 4; i++) { + static u16 fire_name[] = {0x8181, 0x8182, 0x8183, 0x8184}; + i_this->field_0x1888[i] = dComIfGp_particle_set(i_this->field_0x1888[i], fire_name[i], &i_this->current.pos, NULL, NULL); + + JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->field_0x1888[i]); + if (emitter != NULL) { + MTXCopy(model->getAnmMtx(3), *calc_mtx); + MtxScale(1.0f, 1.0f, 1.0f, 1); + emitter->setGlobalSRTMatrix(*calc_mtx); + } + } + } else { + i_this->field_0x1884 = dComIfGp_particle_set(i_this->field_0x1884, 0x814C, &i_this->current.pos, NULL, NULL); + + JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->field_0x1884); + if (emitter != NULL) { + MTXCopy(model->getAnmMtx(3), *calc_mtx); + MtxScale(1.0f, 1.0f, 1.0f, 1); + emitter->setGlobalSRTMatrix(*calc_mtx); + } + } +} + +/* 804F13FC-804F14C8 0023FC 00CC+00 1/1 0/0 0/0 .text e_fm_animal__FP10e_fm_class */ +static void e_fm_animal(e_fm_class* i_this) { + switch (i_this->mMode) { + case 0: + anm_init(i_this, 0xA, 10.0f, 0, 1.0f); + i_this->mMode = 1; + break; + case 1: + if (i_this->mpFmModelMorf->isStop()) { + i_this->mAction = ACTION_NORMAL; + i_this->mMode = 0; + } + break; + } + + animal_eff_set(i_this, 2); + cLib_addCalc0(&i_this->speedF, 1.0f, 1.0f); +} + +/* 804F14C8-804F16C4 0024C8 01FC+00 1/1 0/0 0/0 .text e_fm_fire__FP10e_fm_class */ +static void e_fm_fire(e_fm_class* i_this) { + i_this->field_0x7c0 = 1; + + switch (i_this->mMode) { + case 0: + if ((int)i_this->mpFmBtk[0]->getFrame() == 0) { + i_this->field_0x1830 = 0.0f; + anm_init(i_this, 9, 10.0f, 0, 1.0f); + i_this->mMode = 1; + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_GAOO_SHORT, -1); + } + break; + case 1: + if ((int)i_this->mpFmModelMorf->getFrame() >= l_HIO.field_0x98 && (int)i_this->mpFmModelMorf->getFrame() <= l_HIO.field_0x9a) { + i_this->mSound.startCreatureVoiceLevel(Z2SE_EN_FM_HOTAIR, -1); + if ((int)i_this->mpFmModelMorf->getFrame() >= l_HIO.field_0x98 + 15) { + i_this->field_0x1829 = 1; + i_this->field_0x1828 = 2; + i_this->field_0x7b6 = 3; + i_this->field_0x5c8 = 4; + } + } + + if (i_this->mpFmModelMorf->isStop()) { + i_this->mAction = ACTION_NORMAL; + i_this->mMode = 0; + i_this->mTimers[0] = 0; + i_this->mPlayTexAnmNo = TEXANM_FM; + i_this->mpFmBrk[TEXANM_FM]->setFrame(0.0f); + i_this->mpFmBtk[TEXANM_FM]->setFrame(0.0f); + i_this->field_0x7b6 = 0; + i_this->field_0x5c8 = 2; + } + break; + } + + if (i_this->mMode >= 1) { + animal_eff_set(i_this, 1); + } + + cLib_addCalc0(&i_this->speedF, 1.0f, 1.0f); +} + +/* 804F16C4-804F1918 0026C4 0254+00 1/1 0/0 0/0 .text e_fm_stop__FP10e_fm_class */ +static void e_fm_stop(e_fm_class* i_this) { + i_this->mDamageInvulnerabilityTimer = 6; + + switch (i_this->mMode) { + case 0: + i_this->mMode = 1; + i_this->field_0x806 = 0; + if (i_this->field_0x1b078 == 0) { + i_this->mDemoCamMode = 1; + i_this->mTimers[0] = 40; + dComIfGp_getVibration().StartQuake(VIBMODE_Q_POWER5, 1, cXyz(0.0f, 1.0f, 0.0f)); + } else { + i_this->mTimers[0] = 20; + } + /* fallthrough */ + case 1: + if (i_this->mTimers[0] == 35) { + dComIfGp_getVibration().StartQuake(VIBMODE_Q_POWER3, 1, cXyz(0.0f, 1.0f, 0.0f)); + } + + f32 anm_speed = (0.7f + JREG_F(16)) * cM_ssin(i_this->field_0x806); + i_this->field_0x806 += JREG_S(7) + 3000; + f32 temp_f31 = 0.5f + TREG_F(13); + + i_this->mChain[i_this->field_0x808].field_0x6178 = temp_f31 + (temp_f31 * cM_ssin((i_this->field_0x806 + TREG_S(0)) - 20000)); + i_this->mpFmModelMorf->setPlaySpeed(anm_speed); + + if (i_this->mTimers[0] <= 10) { + i_this->field_0x7c0 = 2; + if (i_this->mTimers[0] == 10) { + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_FIND, -1); + } + } + + if (i_this->mTimers[0] == 0) { + dComIfGp_getVibration().StopQuake(0x1F); + i_this->mAction = ACTION_DOWN; + i_this->mMode = 0; + i_this->health = 50; + i_this->mDownCnt++; + i_this->mChain[i_this->field_0x808].field_0x6178 = 0.0f; + + if (i_this->field_0x1b078 == 0) { + i_this->mDemoCamMode = 3; + i_this->mDemoCamTimer = 0; + daPy_getPlayerActorClass()->changeDemoMode(1, 0, 0, 0); + } + } + break; + } + + cLib_addCalc0(&i_this->speedF, 1.0f, 1.0f); +} + +/* 804F1918-804F20F4 002918 07DC+00 1/1 0/0 0/0 .text e_fm_damage_run__FP10e_fm_class */ +static void e_fm_damage_run(e_fm_class* i_this) { + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz sp78; + cXyz sp6C; + f32 move_speed = 0.0f; + int anm_frame = (int)i_this->mpFmModelMorf->getFrame(); + + i_this->mDamageInvulnerabilityTimer = 10; + + switch (i_this->mMode) { + case 0: + if (i_this->mpFmModelMorf->isStop()) { + i_this->mTimers[0] = l_HIO.field_0xa4 + cM_rndF(50.0f); + anm_init(i_this, 0x11, 5.0f, 2, 2.0f); + i_this->mMode = 1; + Z2GetAudioMgr()->changeBgmStatus(3); + } + break; + case 1: + for (int i = 0; i <= 1; i++) { + int sp20 = 1 - i; + if (fabsf(i_this->mFootPos[i].y - i_this->current.pos.y) < 15.0f && fabsf(i_this->mFootPos[sp20].y - i_this->current.pos.y) >= 15.0f) { + move_speed = l_HIO.field_0x18; + i_this->field_0x7e0 = sp20; + } + } + + if (i_this->speedF < 1.0f && move_speed > 1.0f) { + i_this->mSound.startCreatureSound(Z2SE_EN_FM_CHAIN_FOOTNOTE, 0, -1); + + if (i_this->mTimers[1] == 0) { + i_this->mTimers[1] = 30.0f + cM_rndF(30.0f); + + s8 sp8 = 0; + for (int i = 2; i < 4; i++) { + if (i_this->mChain[i].field_0x617e != 0 || (i_this->mChain[i].field_0x617c != 0 && daPy_getPlayerActorClass()->checkEquipHeavyBoots())) { + sp78 = i_this->mChain[i].field_0x6180; + sp78.y = 0.0f; + + if (sp78.abs() < 1000.0f + KREG_F(12)) { + sp78 = i_this->current.pos - i_this->mChain[i].field_0x6180; + } else { + sp78 = i_this->home.pos - i_this->mChain[i].field_0x6180; + } + + i_this->field_0x5c4 = cM_atan2s(sp78.x, sp78.z) + (s16)cM_rndFX(10000.0f); + sp8 = 1; + break; + } + } + + if (sp8 == 0) { + sp6C.x = i_this->home.pos.x + cM_rndFX(300.0f); + sp6C.y = i_this->home.pos.y; + sp6C.z = i_this->home.pos.z + cM_rndFX(300.0f); + sp78 = sp6C - i_this->current.pos; + + s16 spC = cM_atan2s(sp78.x, sp78.z) - i_this->current.angle.y; + if (spC > 0x4000) { + spC = 0x4000; + } else if (spC < -0x4000) { + spC = -0x4000; + } + i_this->field_0x5c4 = i_this->current.angle.y + spC; + } + } + } + + if (i_this->speedF > 1.0f && move_speed < 1.0f) { + dComIfGp_getVibration().StartShock(YREG_S(3) + VIBMODE_S_POWER7, 0xF, cXyz(0.0f, 1.0f, 0.0f)); + dComIfGp_particle_set(0x8150, &i_this->home.pos, NULL, NULL); + mDoAud_seStart(Z2SE_OBJ_FM_DIRTFALL, NULL, 0, 0); + i_this->mSound.startCreatureSound(Z2SE_EN_FM_FOOTNOTE, 0, -1); + hasira_hahen_hit(&i_this->mFootPos[i_this->field_0x7e0], 100.0f + VREG_F(4), 20.0f + VREG_F(5), -1); + } + + for (int i = 2; i <= 3; i++) { + sp78 = i_this->mChain[i].field_0x6180 - i_this->current.pos; + + s16 spA = i_this->shape_angle.y - cM_atan2s(sp78.x, sp78.z); + if ((spA > 0x6000 || spA < -0x6000) && (i_this->mChain[i].field_0x617e != 0 || (i_this->mChain[i].field_0x617c != 0 && daPy_getPlayerActorClass()->checkEquipHeavyBoots()))) { + f32 var_f30; + if (i_this->mChain[i].field_0x617c != 0) { + var_f30 = 300.0f + VREG_F(10); + } else { + var_f30 = 100.0f + VREG_F(11); + } + + if (i_this->mChain[i].field_0x6174 > var_f30 && ((i == 2 && (anm_frame & 252) == 12) || (i == 3 && (anm_frame & 252) == 40))) { + i_this->mAction = ACTION_STOP; + i_this->mMode = 0; + i_this->field_0x808 = i; + return; + } + } + } + + if (((i_this->mTimers[0] < l_HIO.field_0xa4 - 250.0f) && i_this->field_0x809 != 0) || i_this->mTimers[0] == 0) { + anm_init(i_this, 0xA, 10.0f, 0, 1.0f); + i_this->mMode = 2; + i_this->mPlayTexAnmNo = TEXANM_ANIMAL; + i_this->mpFmBrk[TEXANM_ANIMAL]->setFrame(0.0f); + i_this->mpFmBtk[TEXANM_ANIMAL]->setFrame(0.0f); + } + break; + case 2: + if (i_this->mpFmModelMorf->isStop()) { + i_this->mAction = ACTION_NORMAL; + i_this->mMode = 0; + i_this->mPlayTexAnmNo = TEXANM_FM; + i_this->mpFmBrk[TEXANM_FM]->setFrame(0.0f); + i_this->mpFmBtk[TEXANM_FM]->setFrame(0.0f); + Z2GetAudioMgr()->changeBgmStatus(4); + } + } + + i_this->speedF = move_speed; + if (move_speed > 1.0f) { + cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->field_0x5c4, 2, KREG_S(2) + 0x200); + } +} + +/* 804F20F4-804F21F0 0030F4 00FC+00 1/1 0/0 0/0 .text cam_3d_morf__FP10e_fm_classf */ +static void cam_3d_morf(e_fm_class* i_this, f32 param_1) { + cLib_addCalc2(&i_this->mDemoCamCenter.x, i_this->mDemoCamCenterTarget.x, param_1, i_this->mDemoCamCenterSpd.x * i_this->field_0x1b050); + cLib_addCalc2(&i_this->mDemoCamCenter.y, i_this->mDemoCamCenterTarget.y, param_1, i_this->mDemoCamCenterSpd.y * i_this->field_0x1b050); + cLib_addCalc2(&i_this->mDemoCamCenter.z, i_this->mDemoCamCenterTarget.z, param_1, i_this->mDemoCamCenterSpd.z * i_this->field_0x1b050); + cLib_addCalc2(&i_this->mDemoCamEye.x, i_this->mDemoCamEyeTarget.x, param_1, i_this->mDemoCamEyeSpd.x * i_this->field_0x1b050); + cLib_addCalc2(&i_this->mDemoCamEye.y, i_this->mDemoCamEyeTarget.y, param_1, i_this->mDemoCamEyeSpd.y * i_this->field_0x1b050); + cLib_addCalc2(&i_this->mDemoCamEye.z, i_this->mDemoCamEyeTarget.z, param_1, i_this->mDemoCamEyeSpd.z * i_this->field_0x1b050); +} + +/* 804FAF7C-804FAF80 00012C 0004+00 2/3 0/0 0/0 .bss demo_stop */ +static int demo_stop; + +/* 804F21F0-804F3E74 0031F0 1C84+00 1/1 0/0 0/0 .text demo_camera__FP10e_fm_class */ +static void demo_camera(e_fm_class* i_this) { + fopAc_ac_c* actor = (fopAc_ac_c*)i_this; + daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); + camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); + camera_class* camera0 = dComIfGp_getCamera(0); + + cXyz spEC; + cXyz spE0; + cXyz spD4; + cXyz spC8; + + switch (i_this->mDemoCamMode) { + case 0: + break; + case 1: + if (!actor->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(actor, 2, 0xFFFF, 0); + actor->eventInfo.onCondition(2); + return; + } + + camera->mCamera.Stop(); + i_this->mDemoCamMode = 2; + i_this->mDemoCamTimer = 0; + daPy_getPlayerActorClass()->changeOriginalDemo(); + + if ((i_this->mChain[2].field_0x617c != 0 || i_this->mChain[3].field_0x617c != 0) && daPy_getPlayerActorClass()->checkEquipHeavyBoots()) { + daPy_getPlayerActorClass()->changeDemoMode(0x43, 0, 0, 0); + } else { + daPy_getPlayerActorClass()->changeDemoMode(1, 0, 0, 0); + } + + i_this->mDemoCamFovy = 55.0f + NREG_F(10); + camera->mCamera.SetTrimSize(3); + case 2: + if (i_this->mDemoCamTimer == 10) { + mDoAud_seStart(Z2SE_EN_FM_CHAIN_TENSION, &i_this->mChain[i_this->field_0x808].sound_pos, 0, 0); + } + + spEC = i_this->mChain[i_this->field_0x808].field_0x68 - i_this->mChain[i_this->field_0x808].field_0x6180; + cMtx_YrotS(*calc_mtx, cM_atan2s(spEC.x, spEC.z)); + + if (i_this->field_0x808 == 2) { + spEC.x = -(100.0f + NREG_F(11)); + } else { + spEC.x = (100.0f + NREG_F(11)); + } + spEC.y = 50.0f + NREG_F(12); + spEC.z = NREG_F(13) - 200.0f; + MtxPosition(&spEC, &i_this->mDemoCamEye); + i_this->mDemoCamEye += i_this->mChain[i_this->field_0x808].field_0x6180; + + if (i_this->field_0x808 == 2) { + spEC.x = 200.0f + NREG_F(14); + } else { + spEC.x = -(200.0f + NREG_F(14)); + } + spEC.y = -100.0f + NREG_F(15); + spEC.z = NREG_F(16); + MtxPosition(&spEC, &i_this->mDemoCamCenter); + i_this->mDemoCamCenter += i_this->mChain[i_this->field_0x808].field_0x68; + break; + case 3: + if (actor->current.pos.abs() > 700.0f + BREG_F(18)) { + spEC = actor->current.pos; + cMtx_YrotS(*calc_mtx, cM_atan2s(spEC.x, spEC.z)); + spEC.x = 0.0f; + spEC.y = 0.0f; + spEC.z = 700.0f + BREG_F(18); + MtxPosition(&spEC, &spE0); + actor->current.pos.x = spE0.x; + actor->current.pos.z = spE0.z; + OS_REPORT(" FM DOWN POS REVISE \n"); + } + + cMtx_YrotS(*calc_mtx, actor->shape_angle.y); + if (i_this->field_0x808 == 2) { + spEC.x = 400.0f + BREG_F(1); + } else { + spEC.x = -(400.0f + BREG_F(0)); + } + spEC.y = 400.0f + BREG_F(2); + spEC.z = 300.0f + BREG_F(3); + MtxPosition(&spEC, &i_this->mDemoCamEye); + i_this->mDemoCamEye += actor->current.pos; + + spEC.x = BREG_F(4); + spEC.y = 500.0f + BREG_F(5); + spEC.z = BREG_F(6); + MtxPosition(&spEC, &i_this->mDemoCamCenter); + i_this->mDemoCamCenter += actor->current.pos; + break; + case 4: + cMtx_YrotS(*calc_mtx, actor->shape_angle.y); + spEC.x = NREG_F(0); + spEC.y = 300.0f + NREG_F(1); + spEC.z = 200.0f + NREG_F(2); + MtxPosition(&spEC, &i_this->mDemoCamCenter); + i_this->mDemoCamCenter += actor->current.pos; + i_this->mDemoCamMode++; + /* fallthrough */ + case 5: + cMtx_YrotS(*calc_mtx, actor->shape_angle.y); + if (i_this->field_0x808 == 2) { + spEC.x = 100.0f + NREG_F(5); + spEC.z = 100.0f + (1000.0f + NREG_F(6)); + } else { + spEC.x = -(550.0f + NREG_F(3)); + spEC.z = 800.0f + NREG_F(4); + } + spEC.y = 100.0f + NREG_F(7); + MtxPosition(&spEC, &i_this->mDemoCamEye); + i_this->mDemoCamEye += actor->current.pos; + + if (i_this->mDemoCamTimer > (s16)(NREG_S(0) + 34)) { + cLib_addCalc2(&i_this->mDemoCamCenter.y, 100.0f + NREG_F(8), 0.5f, 20.0f + NREG_F(9)); + } + break; + case 10: + if (!actor->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(actor, 2, 0xFFFF, 0); + actor->eventInfo.onCondition(2); + return; + } + + camera->mCamera.Stop(); + i_this->mDemoCamMode = 11; + i_this->mDemoCamTimer = 0; + daPy_getPlayerActorClass()->changeOriginalDemo(); + + i_this->mDemoCamFovy = 50.0f; + i_this->mDemoCamEye = camera0->lookat.eye; + i_this->mDemoCamCenter = camera0->lookat.center; + i_this->field_0x778 = 0.0f; + camera->mCamera.SetTrimSize(3); + dComIfGp_getEvent().startCheckSkipEdge(actor); + case 11: + if (i_this->mDemoCamTimer == (s16)(VREG_S(0) + 8)) { + daPy_getPlayerActorClass()->changeDemoMode(0x19, 0, 0, 0); + } + + if (i_this->mDemoCamTimer >= 60) { + if (i_this->mDemoCamTimer == 60) { + i_this->mDemoCamCenter.set(0.0f, 176.0f, 1782.0f); + i_this->mDemoCamEye.set(0.0f, 217.0f, 1968.0f); + i_this->mDemoCamCenterTarget.set(0.0f, 671.0f, 1664.0f); + i_this->mDemoCamEyeTarget.set(0.0f, 752.0f, 1836.0f); + + i_this->mDemoCamEyeSpd.x = fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x); + i_this->mDemoCamEyeSpd.y = fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y); + i_this->mDemoCamEyeSpd.z = fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z); + + i_this->mDemoCamCenterSpd.x = fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x); + i_this->mDemoCamCenterSpd.y = fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y); + i_this->mDemoCamCenterSpd.z = fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z); + + i_this->field_0x1b050 = 0.0f; + i_this->mDemoCamFovy = 55.0f + NREG_F(10); + } + + if (i_this->mDemoCamTimer == 120) { + player->changeDemoMode(2, 1, 0, 0); + spE0.set(0.0f, 0.0f, 600.0f); + player->changeDemoPos0(&spE0); + } + + if (i_this->mDemoCamTimer >= 160) { + cam_3d_morf(i_this, 0.1f); + cLib_addCalc2(&i_this->field_0x1b050, 0.008f, 1.0f, 0.0002f); + } + + if (i_this->mDemoCamTimer == 340) { + i_this->mDemoCamMode = 12; + i_this->mDemoCamTimer = 0; + + i_this->mDemoCamCenter.set(0.0f, 140.0f, 669.0f); + i_this->mDemoCamEye.set(0.0f, 163.0f, 857.0f); + i_this->mDemoCamCenterTarget.set(0.0f, 211.0f, 673.0f); + i_this->mDemoCamEyeTarget.set(0.0f, 163.0f, 857.0f); + + i_this->mDemoCamEyeSpd.x = fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x); + i_this->mDemoCamEyeSpd.y = fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y); + i_this->mDemoCamEyeSpd.z = fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z); + + i_this->mDemoCamCenterSpd.x = fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x); + i_this->mDemoCamCenterSpd.y = fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y); + i_this->mDemoCamCenterSpd.z = fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z); + + i_this->field_0x1b050 = 0.0f; + } + } + break; + case 12: + if (i_this->mDemoCamTimer >= 50) { + cam_3d_morf(i_this, 0.1f); + cLib_addCalc2(&i_this->field_0x1b050, 0.01f, 1.0f, 0.0005f); + } + + if (i_this->mDemoCamTimer == 250) { + i_this->mDemoCamMode = 13; + i_this->mDemoCamTimer = 0; + i_this->mDemoCamCenter.set(2.8f, 496.0f, 162.0f); + i_this->mDemoCamEye.set(9.7f, 362.0f, 296.0f); + Z2GetAudioMgr()->subBgmStart(Z2BGM_BOSSFIREMAN_1); + } + break; + case 13: + if (i_this->mDemoCamTimer == 90) { + i_this->mpCoreBtk->setPlaySpeed(1.0f); + i_this->field_0x770 = 10000; + } + + if (i_this->mDemoCamTimer == 100) { + i_this->mSound.startCreatureSound(Z2SE_EN_FM_CORE_EYEOPEN, 0, -1); + } + + if (i_this->mDemoCamTimer >= 190) { + cLib_addCalc2(&i_this->field_0x778, 1.0f, 1.0f, 0.05f); + } + + if (i_this->mDemoCamTimer != 260) { + break; + } + + i_this->mDemoCamMode = 14; + i_this->mDemoCamTimer = 0; + case 14: + cMtx_YrotS(*calc_mtx, actor->current.angle.y); + spEC.x = -200.0f + ZREG_F(1); + spEC.y = 100.0f + ZREG_F(2); + spEC.z = 900.0f + ZREG_F(3); + MtxPosition(&spEC, &i_this->mDemoCamEye); + i_this->mDemoCamEye += actor->current.pos; + + spEC.x = ZREG_F(5); + spEC.y = -100.0f + ZREG_F(6); + spEC.z = ZREG_F(7); + MtxPosition(&spEC, &spC8); + spC8 += actor->eyePos; + + if (i_this->mDemoCamTimer == 0) { + i_this->mDemoCamCenter = spC8; + } else { + cLib_addCalc2(&i_this->mDemoCamCenter.x, spC8.x, 0.1f, 50.0f); + cLib_addCalc2(&i_this->mDemoCamCenter.y, spC8.y, 0.1f, 50.0f); + cLib_addCalc2(&i_this->mDemoCamCenter.z, spC8.z, 0.1f, 50.0f); + } + + if (i_this->mDemoCamTimer == 60) { + anm_init(i_this, 0x1F, 10.0f, 0, 1.0f); + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_OPDEMO, -1); + i_this->mSound.startCreatureSound(Z2SE_EN_FM_OPDEMO, 0, -1); + + i_this->mMode = 2; + i_this->mPlayTexAnmNo = TEXANM_OP_DEMO; + i_this->mpFmBrk[TEXANM_OP_DEMO]->setFrame(0.0f); + i_this->mpFmBtk[TEXANM_OP_DEMO]->setFrame(0.0f); + } + + if (i_this->mDemoCamTimer == 420) { + daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 2, 0); + } + + if (i_this->mDemoCamTimer == 163 || i_this->mDemoCamTimer == 203 || i_this->mDemoCamTimer == 793) { + dComIfGp_getVibration().StartQuake(VIBMODE_Q_POWER3, 1, cXyz(0.0f, 1.0f, 0.0f)); + } + + if (i_this->mDemoCamTimer == 195 || i_this->mDemoCamTimer == 257 || i_this->mDemoCamTimer == 882) { + dComIfGp_getVibration().StopQuake(0x1F); + } + + if (i_this->mDemoCamTimer == 804) { + daPy_getPlayerActorClass()->changeDemoMode(0x22, 0, 0, 0); + } + + if (i_this->mDemoCamTimer == 404) { + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER5, 1, cXyz(0.0f, 1.0f, 0.0f)); + } + break; + case 20: + if (!actor->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(actor, 2, 0xFFFF, 0); + actor->eventInfo.onCondition(2); + return; + } + + camera->mCamera.Stop(); + i_this->mDemoCamMode = 21; + i_this->mDemoCamTimer = 0; + daPy_getPlayerActorClass()->changeOriginalDemo(); + daPy_getPlayerActorClass()->changeDemoMode(1, 0, 0, 0); + i_this->mDemoCamFovy = 55.0f + NREG_F(10); + i_this->field_0x1b050 = 0.0f; + camera->mCamera.SetTrimSize(3); + case 21: + if (actor->current.pos.abs() > 700.0f + BREG_F(18)) { + spEC = actor->current.pos; + cMtx_YrotS(*calc_mtx, cM_atan2s(spEC.x, spEC.z)); + spEC.x = 0.0f; + spEC.y = 0.0f; + spEC.z = 700.0f + BREG_F(18); + MtxPosition(&spEC, &spE0); + actor->current.pos.x = spE0.x; + actor->current.pos.z = spE0.z; + OS_REPORT(" FM DOWN POS REVISE \n"); + } + + cMtx_YrotS(*calc_mtx, actor->shape_angle.y); + spEC.x = 100.0f + NREG_F(15); + spEC.y = 50.0f + NREG_F(11); + spEC.z = 1000.0f + NREG_F(12); + MtxPosition(&spEC, &i_this->mDemoCamEye); + i_this->mDemoCamEye += actor->current.pos; + spC8 = actor->eyePos; + + if (i_this->mDemoCamTimer < 110) { + if (i_this->mDemoCamTimer == 0) { + i_this->mDemoCamCenter = spC8; + i_this->mDemoCamCenter.y -= 300.0f + NREG_F(16); + } else { + cLib_addCalc2(&i_this->mDemoCamCenter.y, (spC8.y - 300.0f) + NREG_F(16), 0.1f, 5.0f); + cLib_addCalc2(&i_this->mDemoCamCenter.x, spC8.x, 0.1f, 5.0f); + cLib_addCalc2(&i_this->mDemoCamCenter.z, spC8.z, 0.1f, 5.0f); + } + } else { + cLib_addCalc2(&i_this->mDemoCamCenter.x, spC8.x, 0.2f, 100.0f * i_this->field_0x1b050); + cLib_addCalc2(&i_this->mDemoCamCenter.y, spC8.y, 0.2f, 200.0f * i_this->field_0x1b050); + cLib_addCalc2(&i_this->mDemoCamCenter.z, spC8.z, 0.2f, 100.0f * i_this->field_0x1b050); + cLib_addCalc2(&i_this->field_0x1b050, 1.0f, 1.0f, 0.1f); + } + break; + case 50: + if (!actor->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(actor, 2, 0xFFFF, 0); + actor->eventInfo.onCondition(2); + return; + } + + camera->mCamera.Stop(); + i_this->mDemoCamMode = 51; + i_this->mDemoCamTimer = 0; + daPy_getPlayerActorClass()->changeOriginalDemo(); + i_this->mDemoCamFovy = 55.0f + NREG_F(10); + i_this->field_0x770 = 0; + i_this->field_0x1aff6 = 0; + i_this->field_0x1b050 = i_this->field_0x1b054 = i_this->field_0x1b068 = i_this->field_0x1b06c = i_this->field_0x1b074 = i_this->field_0x1b070 = 0.0f; + + Z2GetAudioMgr()->bgmStreamPrepare(0x200001E); + Z2GetAudioMgr()->bgmStreamPlay(); + daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 2, 0); + camera->mCamera.SetTrimSize(3); + case 51: + actor->shape_angle.y = actor->current.angle.y = actor->home.angle.y; + + for (int i = 0; i < 4; i++) { + for (int j = 0; j < i_this->mChain[i].field_0x61d0 - 1; j++) { + i_this->mChain[i].pos[j].x -= actor->current.pos.x; + i_this->mChain[i].pos[j].z -= actor->current.pos.z; + i_this->mChain[i].field_0x1ac[j] = i_this->mChain[i].pos[j]; + } + } + + actor->current.pos.x = 0.0f; + actor->current.pos.z = 0.0f; + + cMtx_YrotS(*calc_mtx, actor->current.angle.y); + spEC.x = 0.0f; + spEC.y = 0.0f; + spEC.z = (700.0f + ZREG_F(0)); + MtxPosition(&spEC, &spE0); + spE0 += actor->current.pos; + player->setPlayerPosAndAngle(&spE0, actor->home.angle.y + 0x8000, 0); + + if (i_this->mDemoCamTimer < XREG_S(0) + 420) { + cMtx_YrotS(*calc_mtx, actor->current.angle.y); + spEC.x = (200.0f + ZREG_F(1)); + spEC.y = (100.0f + ZREG_F(2)); + spEC.z = (900.0f + ZREG_F(3)); + MtxPosition(&spEC, &i_this->mDemoCamEye); + i_this->mDemoCamEye += actor->current.pos; + + spEC.x = ZREG_F(5); + spEC.y = i_this->field_0x1b074; + spEC.z = ZREG_F(7); + MtxPosition(&spEC, &i_this->field_0x1b040); + + if (i_this->mDemoCamTimer == 0) { + i_this->field_0x1b040 += actor->current.pos; + i_this->field_0x1b040.z += 600.0f; + } else { + i_this->field_0x1b040 += actor->eyePos; + } + spC8 = i_this->field_0x1b040; + + if (i_this->mDemoCamTimer > XREG_S(1) + 220) { + cLib_addCalc2(&i_this->field_0x1b074, -100.0f, 1.0f, 5.0f); + } + } else { + cMtx_YrotS(*calc_mtx, (actor->current.angle.y + i_this->field_0x1aff6)); + spEC.x = (200.0f + ZREG_F(1)); + spEC.y = (100.0f + ZREG_F(2) + i_this->field_0x1b068); + spEC.z = (900.0f + ZREG_F(3) + i_this->field_0x1b06c); + MtxPosition(&spEC, &i_this->mDemoCamEye); + i_this->mDemoCamEye += actor->current.pos; + + spEC.x = ZREG_F(5) + i_this->field_0x1b070; + spEC.y = -100.0f + ZREG_F(6); + spEC.z = ZREG_F(7); + MtxPosition(&spEC, &spC8); + spC8 += i_this->field_0x1b040; + + cLib_addCalcAngleS2(&i_this->field_0x1aff6, 20000, 8, 200.0f * i_this->field_0x1b054); + cLib_addCalc2(&i_this->field_0x1b054, 1.0f, 1.0f, 0.05f); + + if (i_this->mDemoCamTimer > (s16)(XREG_S(2) + 470)) { + cLib_addCalc2(&i_this->field_0x1b068, 800.0f, 0.125f, 20.0f * i_this->field_0x1b050); + cLib_addCalc2(&i_this->field_0x1b070, -100.0f, 0.125f, 12.5f * i_this->field_0x1b050); + cLib_addCalc2(&i_this->field_0x1b06c, -400.0f, 0.125f, 10.0f * i_this->field_0x1b050); + cLib_addCalc2(&i_this->field_0x1b050, 1.0f, 1.0f, 0.02f); + } + } + + spC8.x *= 0.5f; + if (i_this->mDemoCamTimer == 0) { + i_this->mDemoCamCenter = spC8; + } else { + cLib_addCalc2(&i_this->mDemoCamCenter.x, spC8.x, 0.1f, 50.0f); + cLib_addCalc2(&i_this->mDemoCamCenter.y, spC8.y, 0.1f, 50.0f); + cLib_addCalc2(&i_this->mDemoCamCenter.z, spC8.z, 0.1f, 50.0f); + } + + if (i_this->mDemoCamTimer == XREG_S(3) + 640) { + i_this->field_0x770 = 0; + } + + if (i_this->mDemoCamTimer == XREG_S(3) + 668) { + i_this->field_0x182c = 2; + i_this->mHideCore = TRUE; + } + + if (i_this->mDemoCamTimer == XREG_S(5) + 537) { + i_this->field_0x5c8 = 3; + i_this->mKankyoBlend = 1.0f; + } + + if (i_this->mDemoCamTimer == XREG_S(3) + XREG_S(4) + 678) { + demo_stop = 1; + i_this->mDemoCamTimer = 0; + i_this->mDemoCamMode = 52; + } + break; + case 52: + cMtx_YrotS(*calc_mtx, actor->current.angle.y); + spEC.x = 100.0f + ZREG_F(1); + spEC.y = 100.0f + ZREG_F(2); + spEC.z = 900.0f + ZREG_F(3); + MtxPosition(&spEC, &i_this->mDemoCamEye); + i_this->mDemoCamEye += actor->current.pos; + + spEC.x = ZREG_F(5); + spEC.y = 370.0f + ZREG_F(6); + spEC.z = ZREG_F(7); + MtxPosition(&spEC, &i_this->mDemoCamCenter); + i_this->mDemoCamCenter += actor->current.pos; + + if (i_this->mDemoCamTimer == XREG_S(6) + 85) { + anm_init(i_this, 0x16, 1.0f, 0, 1.0f); + i_this->mPlayTexAnmNo = TEXANM_DEMO_END02; + i_this->mpFmBrk[TEXANM_DEMO_END02]->setFrame(0.0f); + i_this->mpFmBtk[TEXANM_DEMO_END02]->setFrame(0.0f); + i_this->mDemoCamMode = 53; + i_this->mDemoCamTimer = 0; + } + break; + case 53: { + if (i_this->mDemoCamTimer == AREG_S(9) + 97) { + player->changeDemoMode(0x1E, 0, 0, 0); + } + + if (i_this->mDemoCamTimer == XREG_S(7) + 86) { + i_this->mSound.startCreatureSound(Z2SE_EN_BOSS_EXPLODE, 0, 0); + i_this->mDrawDemoModel = TRUE; + i_this->mDemoModelSize = 1.0f; + + for (int i = 0; i < 16; i++) { + static u16 g_c_i[] = { + 0x8481, 0x8482, 0x8483, 0x8484, 0x8485, 0x8486, 0x8487, 0x8488, + 0x8489, 0x848A, 0x848B, 0x848C, 0x848D, 0x848E, 0x848F, 0x8490, + }; + + JPABaseEmitter* emitter = dComIfGp_particle_set(g_c_i[i], &actor->current.pos, NULL, NULL); + if (emitter != NULL) { + static int g_c_ji[] = {6, 13, 8, 5, 3, 21, 24, 19, 6, 7, 13, 14, 3, 21, 24, 19}; + emitter->setGlobalRTMatrix(i_this->mpFmModelMorf->getModel()->getAnmMtx(g_c_ji[i])); + } + } + + i_this->mShadowKey = 353535; + } + + if (i_this->mDemoCamTimer > XREG_S(8) + 14) { + cLib_addCalc2(&i_this->mDemoCamFovy, 85.0f, 0.05f, 0.05f + JREG_F(16)); + } + + if (i_this->mDemoCamTimer != XREG_S(7) + 206) { + break; + } + + i_this->mDemoCamCenter.set(207.0f, 615.0f, -343.0f); + i_this->mDemoCamEye.set(813.0f, 942.0f, -1001.0f); + i_this->mDemoCamCenterTarget.set(223.0f, 474.0f, 162.0f); + i_this->mDemoCamEyeTarget.set(636.0f, 802.0f, -630.0f); + + i_this->mDemoCamEyeSpd.x = fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x); + i_this->mDemoCamEyeSpd.y = fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y); + i_this->mDemoCamEyeSpd.z = fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z); + + i_this->mDemoCamCenterSpd.x = fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x); + i_this->mDemoCamCenterSpd.y = fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y); + i_this->mDemoCamCenterSpd.z = fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z); + + i_this->field_0x1b050 = 0.0f; + i_this->mDemoCamMode = 54; + i_this->mDemoCamTimer = 0; + + cXyz spBC(0.0f, 0.0f, 0.0f); + for (int i = 0; i < 4; i++) { + static u16 g_e_i[] = {0x847B, 0x847C, 0x847D, 0x847E}; + dComIfGp_particle_set(g_e_i[i], &spBC, NULL, NULL); + } + + i_this->mDemoCamFovy = 55.0f + NREG_F(10); + i_this->mSound.startCreatureSound(Z2SE_EN_BOSS_CONVERGE, 0, 0); + daPy_getPlayerActorClass()->changeDemoMode(1, 0, 0, 0); + } + case 54: { + if (i_this->mDemoCamTimer >= VREG_S(0) + 100) { + cam_3d_morf(i_this, 0.2f); + cLib_addCalc2(&i_this->field_0x1b050, 0.15f, 1.0f, 0.002f); + } + + if (i_this->mDemoCamTimer == VREG_S(1) + 100) { + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + spEC.set(0.0f, 300.0f + JREG_F(8), 100.0f + JREG_F(9)); + MtxPosition(&spEC, &spE0); + spE0 += player->current.pos; + + OS_REPORT("///YSTONE POS %d,%d,%d\n", (int)spE0.x, (int)spE0.y, (int)spE0.z); + fopAcM_create(PROC_OBJ_YSTONE, 0, &spE0, fopAcM_GetRoomNo(actor), NULL, NULL, -1); + } + + if (i_this->mDemoCamTimer == VREG_S(1) + 120) { + obj_ystone_class* ystone = (obj_ystone_class*)fopAcM_SearchByName(PROC_OBJ_YSTONE); + if (ystone != NULL) { + ystone->field_0x59b = 0; + } + } + + if (i_this->mDemoCamTimer == VREG_S(2) + 180) { + i_this->mDemoCamMode = 55; + i_this->mDemoCamTimer = 0; + i_this->field_0x1b05c = 300.0f + JREG_F(8); + i_this->field_0x79c = 70.0f + DREG_F(7); + i_this->mTimers[3] = 100; + actor->current.pos.z -= 300.0f; + } + break; + } + case 55: { + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + spEC.x = ZREG_F(1); + spEC.y = 100.0f + ZREG_F(2); + spEC.z = -200.0f + ZREG_F(3); + MtxPosition(&spEC, &i_this->mDemoCamEye); + i_this->mDemoCamEye += player->current.pos; + i_this->mDemoCamCenter = player->current.pos; + i_this->mDemoCamCenter.y += 200.0f + ZREG_F(4); + + spEC.set(0.0f, i_this->field_0x1b05c, 100.0f + JREG_F(9)); + MtxPosition(&spEC, &spE0); + spE0 += player->current.pos; + + cLib_addCalc2(&i_this->field_0x1b05c, 210.0f, 0.05f, 0.5f); + + obj_ystone_class* ystone = (obj_ystone_class*)fopAcM_SearchByName(PROC_OBJ_YSTONE); + if (ystone != NULL) { + ystone->setCurrentPos(spE0); + } + + if (i_this->mDemoCamTimer == VREG_S(3) + 104) { + cXyz warp_pos(-363.0f, 0.0f,291.0f); + csXyz warp_rot(0, 0, 0); + fopAcM_createWarpHole(&warp_pos, &warp_rot, fopAcM_GetRoomNo(actor), 0, 1, 0xFF); + + spEC = actor->current.pos; + fopAcM_create(PROC_NPC_GRZ, 0xFFFFFF01, &spEC, fopAcM_GetRoomNo(actor), &actor->shape_angle, NULL, -1); + i_this->mDrawDemoModel = FALSE; + } + + if (i_this->mDemoCamTimer == VREG_S(3) + 110) { + i_this->mDemoCamMode = 100; + dComIfGs_onStageBossEnemy(); + dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[64]); + } + break; + } + case 100: + camera->mCamera.Reset(i_this->mDemoCamCenter, i_this->mDemoCamEye); + camera->mCamera.Start(); + camera->mCamera.SetTrimSize(0); + dComIfGp_event_reset(); + i_this->mDemoCamMode = 0; + break; + } + + if (i_this->mDemoCamMode != 0) { + s16 sp8 = 7.5f * (i_this->field_0x1b064 * cM_scos(i_this->mCounter * 0x2C00)); + spC8 = i_this->mDemoCamCenter; + spD4 = i_this->mDemoCamEye; + spC8.y += (1.0f + KREG_F(8)) * (i_this->field_0x1b064 * cM_ssin(i_this->mCounter * 0x2800)); + spD4.y += (1.0f + KREG_F(8)) * (i_this->field_0x1b064 * cM_ssin(i_this->mCounter * 0x2800)); + + camera->mCamera.Set(spC8, spD4, sp8, i_this->mDemoCamFovy); + cLib_addCalc0(&i_this->field_0x1b064, 1.0f, 2.0f + TREG_F(16)); + i_this->mDemoCamTimer++; + } +} + +/* 804F3E74-804F448C 004E74 0618+00 1/1 0/0 0/0 .text e_fm_down__FP10e_fm_class */ +static s8 e_fm_down(e_fm_class* i_this) { + fopEn_enemy_c* enemy = (fopEn_enemy_c*)i_this; + s8 sp8 = 1; + int anm_frame = i_this->mpFmModelMorf->getFrame(); + + switch (i_this->mMode) { + case 0: + anm_init(i_this, 0x18, 10.0f, 0, 1.0f); + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_DOWN, -1); + i_this->mMode = 1; + i_this->field_0x7c0 = 2; + i_this->mDamageInvulnerabilityTimer = 5; + break; + case 1: + i_this->mDamageInvulnerabilityTimer = 5; + i_this->field_0x182b = 1; + + if (anm_frame == (BREG_S(0) + 54) && i_this->field_0x1b078 == 0) { + i_this->mDemoCamMode++; + i_this->mDemoCamTimer = 0; + } + + if (anm_frame < 72) { + i_this->field_0x7c0 = 2; + } + + if (anm_frame == 90) { + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER8, 0xF, cXyz(0.0f, 1.0f, 0.0f)); + dComIfGp_particle_set(0x8150, &i_this->home.pos, NULL, NULL); + mDoAud_seStart(Z2SE_OBJ_FM_DIRTFALL, NULL, 0, 0); + + i_this->mSound.startCreatureSound(Z2SE_EN_FM_DOWN, 0, -1); + i_this->field_0x1b064 = 30.0f; + hasira_hahen_hit(&i_this->eyePos, 500.0f + VREG_F(4), 50.0f + VREG_F(5), -1); + + if (i_this->field_0x792 != 0) { + i_this->field_0x792 = 0; + i_this->mPlayTexAnmNo = TEXANM_PUTOUT_WAIT; + i_this->mpFmBrk[TEXANM_PUTOUT_WAIT]->setFrame(0.0f); + i_this->mpFmBtk[TEXANM_PUTOUT_WAIT]->setFrame(0.0f); + } + + if (i_this->mDownCnt >= 3) { + enemy->onDownFlg(); + } + + Z2GetAudioMgr()->changeBgmStatus(1); + } + + if (i_this->mpFmModelMorf->isStop()) { + anm_init(i_this, 0x1C, 0.0f, 2, 1.0f); + i_this->mMode = 2; + i_this->mTimers[0] = 33; + i_this->mTimers[1] = l_HIO.field_0x9c; + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[256]); + } + break; + case 2: + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[257]); + + if (i_this->mAnm == 0x1A && i_this->mpFmModelMorf->isStop()) { + anm_init(i_this, 0x1C, 5.0f, 2, 1.0f); + } + + if (i_this->mTimers[0] == 1) { + cXyz sp40; + cXyz sp34; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + i_this->mDemoCamMode = 100; + + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + sp40.x = 0.0f; + sp40.y = 200.0f; + sp40.z = -400.0f; + MtxPosition(&sp40, &sp34); + i_this->mDemoCamEye = player->current.pos + sp34; + i_this->mDemoCamCenter = player->eyePos; + daPy_getPlayerActorClass()->cancelOriginalDemo(); + } + + if (i_this->mTimers[1] == 0) { + anm_init(i_this, 0x20, 10.0f, 0, 1.0f); + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_UP, -1); + i_this->mMode = 3; + enemy->offDownFlg(); + Z2GetAudioMgr()->changeBgmStatus(2); + OS_REPORT(" CHANGE BGM STATUS 2 \n"); + } + break; + case 3: + i_this->field_0x770 = 0; + i_this->mDamageInvulnerabilityTimer = 1000; + sp8 = 0; + + if (i_this->mpFmModelMorf->isStop()) { + anm_init(i_this, 0xA, 10.0f, 0, 1.0f); + i_this->mMode = 4; + i_this->mPlayTexAnmNo = TEXANM_ANIMAL; + i_this->mpFmBrk[TEXANM_ANIMAL]->setFrame(0.0f); + i_this->mpFmBtk[TEXANM_ANIMAL]->setFrame(0.0f); + } + break; + case 4: + sp8 = 0; + + if (anm_frame == 60) { + i_this->field_0x792 = 1; + Z2GetAudioMgr()->changeBgmStatus(4); + } + + if (anm_frame == 65) { + for (int i = 0; i < 4; i++) { + carry_off(i_this, i); + } + + i_this->field_0x79c = 100.0f; + i_this->field_0x182c = 3; + } + + if (i_this->mpFmModelMorf->isStop()) { + i_this->mAction = ACTION_NORMAL; + i_this->mMode = 0; + i_this->mPlayTexAnmNo = TEXANM_FM; + i_this->mpFmBrk[TEXANM_FM]->setFrame(0.0f); + i_this->mpFmBtk[TEXANM_FM]->setFrame(0.0f); + i_this->mDamageInvulnerabilityTimer = 2; + i_this->field_0x770 = 1; + } + break; + } + + i_this->speedF = 0.0f; + return sp8; +} + +/* 804F448C-804F4740 00548C 02B4+00 1/1 0/0 0/0 .text e_fm_a_down__FP10e_fm_class */ +static s8 e_fm_a_down(e_fm_class* i_this) { + int anm_frame = i_this->mpFmModelMorf->getFrame(); + i_this->mDamageInvulnerabilityTimer = 10; + + switch (i_this->mMode) { + case 0: + anm_init(i_this, 0x19, 15.0f, 0, 1.0f); + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_DOWN, -1); + i_this->mMode = 1; + break; + case 1: + i_this->field_0x182b = 1; + + if (anm_frame == 112) { + dComIfGp_getVibration().StartShock(YREG_S(2) + 5, 0xF, cXyz(0.0f, 1.0f, 0.0f)); + dComIfGp_particle_set(0x8150, &i_this->home.pos, NULL, NULL); + mDoAud_seStart(Z2SE_OBJ_FM_DIRTFALL, NULL, 0, 0); + i_this->mSound.startCreatureSound(Z2SE_EN_FM_DOWN, 0, -1); + + i_this->field_0x1b064 = 30.0f; + hasira_hahen_hit(&i_this->eyePos, 500.0f + VREG_F(4), 50.0f + VREG_F(5), -1); + + if (i_this->field_0x792 != 0) { + i_this->field_0x792 = 0; + i_this->mPlayTexAnmNo = TEXANM_PUTOUT_WAIT; + i_this->mpFmBrk[TEXANM_PUTOUT_WAIT]->setFrame(0.0f); + i_this->mpFmBtk[TEXANM_PUTOUT_WAIT]->setFrame(0.0f); + } + + if (i_this->mDownCnt >= 3) { + i_this->onDownFlg(); + } + + Z2GetAudioMgr()->changeBgmStatus(1); + } + + if (i_this->mpFmModelMorf->isStop()) { + anm_init(i_this, 0x1C, 0.0f, 2, 1.0f); + i_this->mAction = ACTION_DOWN; + i_this->mMode = 2; + i_this->mTimers[0] = 33; + i_this->mTimers[1] = l_HIO.field_0x9c; + } + break; + } + + i_this->speedF = 0.0f; + return 1; +} + +/* 804F4740-804F4BDC 005740 049C+00 1/1 0/0 0/0 .text e_fm_start__FP10e_fm_class */ +static s8 e_fm_start(e_fm_class* i_this) { + cXyz sp50; + cXyz sp44; + + s8 var_r25 = 0; + int anm_frame = i_this->mpFmModelMorf->getFrame(); + i_this->mDamageInvulnerabilityTimer = 5; + int var_r26 = 0; + + if (i_this->mDemoCamMode >= 11 && dComIfGp_getEvent().checkSkipEdge()) { + cDmr_SkipInfo = 1; + i_this->mDemoCamMode = 1000; + dComIfGp_event_reset(); + dComIfGp_getVibration().StopQuake(0x1F); + dStage_changeScene(1, 0.0f, 0, fopAcM_GetRoomNo(i_this), 0, -1); + return 0; + } + + switch (i_this->mMode) { + case 0: + anm_init(i_this, 0x1D, 0.0f, 2, 1.0f); + i_this->mPlayTexAnmNo = TEXANM_HANG_WAIT; + i_this->mMode = 1; + i_this->mChain[3].field_0x617e = 1; + i_this->mChain[2].field_0x617e = 1; + i_this->mChain[1].field_0x617e = 1; + i_this->mChain[0].field_0x617e = 1; + i_this->mDemoCamMode = 10; + break; + case 1: + cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); + sp50.x = 800.0f + NREG_F(10); + sp50.y = 1000.0f + NREG_F(11); + sp50.z = -500.0f + NREG_F(12); + MtxPosition(&sp50, &sp44); + i_this->mChain[0].field_0x6180 = i_this->current.pos + sp44; + + sp50.x = -(800.0f + NREG_F(10)); + MtxPosition(&sp50, &sp44); + i_this->mChain[1].field_0x6180 = i_this->current.pos + sp44; + i_this->mChain[2].field_0x6180.set(677.0f, 40.0f, -226.0f); + i_this->mChain[3].field_0x6180.set(-677.0f, 40.0f, -226.0f); + break; + case 2: + if (anm_frame == 339) { + i_this->field_0x792 = 1; + i_this->field_0x182c = 3; + carry_off(i_this, 2); + carry_off(i_this, 3); + i_this->field_0x5c8 = 1; + } + + if (anm_frame >= 33) { + var_r25 = 1; + } + + if (anm_frame >= 576 && anm_frame <= 596) { + i_this->field_0x1829 = 1; + i_this->field_0x1828 = 1; + + if (anm_frame == 576) { + carry_off(i_this, 1); + var_r26 = 2; + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER3, 1, cXyz(0.0f, 1.0f, 0.0f)); + } + } + + if (anm_frame >= 651 && anm_frame <= 671) { + i_this->field_0x1829 = 1; + i_this->field_0x1828 = 0; + + if (anm_frame == 651) { + carry_off(i_this, 0); + var_r26 = 1; + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER3, 1, cXyz(0.0f, 1.0f, 0.0f)); + } + } + + if (anm_frame == 730) { + i_this->field_0x1b080 = 1; + fpcM_Search(s_fmobj_del, NULL); + } + + if (anm_frame == (int)((i_this->mpFmModelMorf->getEndFrame() - 80.0f) - 20.0f)) { + fopMsgM_messageSetDemo(0x480); + } + + if (i_this->mpFmModelMorf->isStop()) { + i_this->mAction = ACTION_NORMAL; + i_this->mMode = 0; + i_this->mPlayTexAnmNo = TEXANM_FM; + i_this->mpFmBrk[TEXANM_FM]->setFrame(0.0f); + i_this->mpFmBtk[TEXANM_FM]->setFrame(0.0f); + Z2GetAudioMgr()->bgmStart(Z2BGM_BOSSFIREMAN_0, 0, 0); + i_this->mDemoCamMode = 100; + } + break; + } + + if (var_r26 != 0) { + cXyz ef_size(1.5f, 1.5f, 1.5f); + dComIfGp_particle_set(0x8455, &i_this->mChain[var_r26 - 1].field_0x6180, NULL, &ef_size); + } + + return var_r25; +} + +/* 804F4BDC-804F4D74 005BDC 0198+00 1/1 0/0 0/0 .text e_fm_end__FP10e_fm_class */ +static s8 e_fm_end(e_fm_class* i_this) { + int anm_frame = i_this->mpFmModelMorf->getFrame(); + i_this->mDamageInvulnerabilityTimer = 5; + s8 var_r30 = 0; + + switch (i_this->mMode) { + case 0: + anm_init(i_this, 0x15, 1.0f, 0, 1.0f); + i_this->mMode = 1; + Z2GetAudioMgr()->bgmStop(0x1E, 0); + i_this->mPlayTexAnmNo = TEXANM_DEMO_END01; + i_this->mpFmBrk[TEXANM_DEMO_END01]->setFrame(0.0f); + i_this->mpFmBtk[TEXANM_DEMO_END01]->setFrame(0.0f); + i_this->mDemoCamMode = 50; + break; + case 1: + break; + case 10: + anm_init(i_this, 0x15, 0.0f, 0, 0.0f); + i_this->mMode = 11; + i_this->mPlayTexAnmNo = TEXANM_DEMO_END01; + i_this->mpFmBrk[TEXANM_DEMO_END01]->setFrame(0.0f); + i_this->mpFmBtk[TEXANM_DEMO_END01]->setFrame(0.0f); + i_this->mpFmBrk[TEXANM_DEMO_END01]->setPlaySpeed(0.0f); + i_this->mpFmBtk[TEXANM_DEMO_END01]->setPlaySpeed(0.0f); + i_this->mTimers[0] = 40; + /* fallthrough */ + case 11: + var_r30 = 1; + if (i_this->mTimers[0] == 0) { + i_this->mMode = 1; + i_this->mpFmModelMorf->setPlaySpeed(1.0f); + i_this->mpFmBrk[TEXANM_DEMO_END01]->setPlaySpeed(1.0f); + i_this->mpFmBtk[TEXANM_DEMO_END01]->setPlaySpeed(1.0f); + Z2GetAudioMgr()->bgmStop(0x1E, 0); + i_this->mDemoCamMode = 50; + } + break; + } + + return var_r30; +} + +/* 804F4D74-804F5148 005D74 03D4+00 1/1 0/0 0/0 .text damage_check__FP10e_fm_class */ +static void damage_check(e_fm_class* i_this) { + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz sp30; + cXyz sp24; + + i_this->field_0xa24.Move(); + i_this->field_0xa60.Move(); + + if (i_this->mDamageInvulnerabilityTimer == 0) { + if (i_this->mCoreSph.ChkTgHit()) { + i_this->mDamageInvulnerabilityTimer = 6; + i_this->mSound.startCreatureSound(Z2SE_EN_FM_COREHIT, 0, -1); + + if (i_this->mAction == ACTION_DOWN) { + i_this->mAtInfo.mpCollider = i_this->mCoreSph.GetTgHitObj(); + cc_at_check(i_this, &i_this->mAtInfo); + OS_REPORT("//////////////FM AP %d\n", i_this->mAtInfo.mAttackPower); + OS_REPORT("//////////////FM HP %d\n", i_this->health); + + if (daPy_getPlayerActorClass()->getCutType() == daPy_py_c::CUT_TYPE_JUMP && daPy_getPlayerActorClass()->checkCutJumpCancelTurn()) { + i_this->mDamageInvulnerabilityTimer = NREG_S(7) + 3; + } else { + i_this->mDamageInvulnerabilityTimer = NREG_S(6) + 6; + } + + if (daPy_getPlayerActorClass()->getCutType() == daPy_py_c::CUT_TYPE_MORTAL_DRAW_B) { + i_this->health = 0; + } + + if (i_this->health <= 0 || daPy_getPlayerActorClass()->getCutCount() >= 4) { + if (i_this->health <= 0 && i_this->mDownCnt >= 3) { + i_this->mAction = ACTION_END; + i_this->mMode = 0; + carry_off(i_this, 2); + carry_off(i_this, 3); + } else { + anm_init(i_this, 0x21, 5.0f, 0, 1.0f); + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_UP02, -1); + i_this->mMode = 3; + Z2GetAudioMgr()->changeBgmStatus(2); + } + } else { + anm_init(i_this, 0x1A, 3.0f, 0, 1.0f); + i_this->mSound.startCreatureSound(Z2SE_EN_FM_FOOTNOTE, 0, -1); + } + + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_DAMAGE, -1); + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[670]); + } else { + i_this->field_0x804++; + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[254]); + + if (i_this->field_0x804 >= 10) { + i_this->mDownCnt++; + i_this->mAction = ACTION_A_DOWN; + i_this->health = 50; + i_this->mDemoCamMode = 20; + } else { + i_this->mAction = ACTION_DAMAGE_RUN; + anm_init(i_this, 0x10, 3.0f, 0, 1.0f); + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_CHANCEDAMAGE, -1); + } + i_this->mMode = 0; + } + + i_this->field_0x2398 = 30; + } + + sp24 = i_this->eyePos; + i_this->setDownPos(&i_this->eyePos); + + if (i_this->checkCutDownHitFlg()) { + i_this->mAction = ACTION_END; + i_this->mMode = 10; + carry_off(i_this, 2); + carry_off(i_this, 3); + i_this->offCutDownHitFlg(); + i_this->offDownFlg(); + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_TODOME, -1); + i_this->mDamageInvulnerabilityTimer = 300; + i_this->field_0x182c = 1; + } + } +} + +/* 804F5148-804F5990 006148 0848+00 1/1 0/0 0/0 .text chain_control1__FP10e_fm_classP7chain_si */ +static void chain_control1(e_fm_class* i_this, chain_s* i_chain_s, int param_2) { + fopAc_ac_c* actor = i_this; + cXyz sp80; + cXyz sp74; + + i_chain_s->pos[0] = i_chain_s->field_0x68; + + int i; + s16 spE, spC; + cXyz* ppos = &i_chain_s->pos[1]; + cXyz* var_r27 = &i_chain_s->field_0x2e4[1]; + csXyz* prot = &i_chain_s->rot[1]; + + cXyz sp68 = i_chain_s->sound_pos - i_chain_s->field_0x6094; + + f32 temp_f28; + f32 temp_f27; + f32 var_f26; + f32 var_f29 = sp68.abs(); + + cXyz sp5C(0.0f, 0.0f, 0.0f); + f32 sp24 = 0.0f; + + if ((i_chain_s->field_0x617e != 0 || (i_chain_s->field_0x617c != 0 && daPy_getPlayerActorClass()->checkEquipHeavyBoots())) && i_chain_s->field_0x6174 > 100.0f) { + f32 var_f25 = i_chain_s->field_0x6174 - 100.0f; + if (var_f25 > 50.0f) { + var_f25 = 50.0f; + } + + sp80 = i_chain_s->field_0x6180 - i_chain_s->field_0x68; + + cMtx_YrotS(*calc_mtx, cM_atan2s(sp80.x, sp80.z)); + cMtx_XrotM(*calc_mtx, -cM_atan2s(sp80.y, JMAFastSqrt((sp80.x * sp80.x) + (sp80.z * sp80.z)))); + sp80.x = 0.0f; + sp80.y = 0.0f; + sp80.z = var_f25 * (10.0f + YREG_F(10)); + MtxPosition(&sp80, &sp5C); + } else if (i_this->field_0x79c > 1.0f) { + if (i_this->mAction == ACTION_END) { + cMtx_YrotS(*calc_mtx, actor->shape_angle.y + 0x8000); + } else { + sp80 = i_chain_s->pos[i_chain_s->field_0x61d0 - 1] - actor->current.pos; + cMtx_YrotS(*calc_mtx, cM_atan2s(sp80.x, sp80.z)); + } + + sp80.x = 0.0f; + sp80.y = 0.0f; + sp80.z = i_this->field_0x79c; + MtxPosition(&sp80, &sp5C); + } + + sp80.x = 0.0f; + sp80.y = 0.0f; + sp80.z = l_HIO.field_0x4c; + + f32 var_f31; + f32 sp20 = -20.0f + XREG_F(0); + + if (i_chain_s->field_0x617c != 0) { + var_f31 = 0.73f + XREG_F(3); + if (i_this->field_0x1829 != 0) { + var_f31 += 0.12f; + } + sp20 = (-20.0f + XREG_F(4)); + } else { + var_f31 = 0.66f + XREG_F(2); + if (i_this->field_0x1829 != 0) { + var_f31 += 0.17f; + } + } + + f32 sp1C = 15.0f + i_this->mAcch.GetGroundH(); + cXyz sp50(0.75f, 0.75f, 0.75f); + + for (i = 1; i < i_chain_s->field_0x61d0; i++, ppos++, prot++, var_r27++) { + temp_f28 = sp5C.x + (var_r27[0].x + (ppos[0].x - ppos[-1].x)); + temp_f27 = sp5C.z + (var_r27[0].z + (ppos[0].z - ppos[-1].z)); + + if (i_this->field_0x79c > 1.0f) { + sp24 = (i_this->field_0x79c * (0.3f + KREG_F(15))) + + ((0.3f + KREG_F(15)) * (i_this->field_0x79c * cM_ssin(((i_this->mCounter * 6000) + (i * (KREG_S(4) - 3000)))))); + } + + var_f26 = sp24 + (sp5C.y + (sp20 + (ppos->y + var_r27->y))); + if (var_f26 <= sp1C) { + var_f26 = sp1C; + if (var_f29 >= (10.0f + DREG_F(0)) && i_this->mTimers[3] == 0) { + if (i == i_chain_s->field_0x61d0 / 2) { + if (var_f29 > 110.0f) { + var_f29 = 110.0f; + } + + i_this->mSound.startChainSoundLevel(Z2SE_EN_FM_CHAIN_HIKIZURI, param_2, var_f29 - 10.0f, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(actor))); + } + } + } + + f32 sp2C = var_f26 - ppos[-1].y; + + spC = (s16)cM_atan2s(temp_f28, temp_f27); + spE = -cM_atan2s(sp2C, JMAFastSqrt((temp_f28 * temp_f28) + (temp_f27 * temp_f27))); + + cMtx_YrotS(*calc_mtx, spC); + cMtx_XrotM(*calc_mtx, spE); + MtxPosition(&sp80, &sp74); + *var_r27 = *ppos; + + ppos[0].x = ppos[-1].x + sp74.x; + ppos[0].y = ppos[-1].y + sp74.y; + ppos[0].z = ppos[-1].z + sp74.z; + var_r27[0].x = var_f31 * (ppos[0].x - var_r27[0].x); + var_r27[0].y = var_f31 * (ppos[0].y - var_r27[0].y); + var_r27[0].z = var_f31 * (ppos[0].z - var_r27[0].z); + + if (i_chain_s->field_0x617c == 0) { + prot[-1].x = spE; + + f32 var_f30 = 1024.0f * var_r27->abs(); + if (var_f30 > 16384.0f) { + prot[-1].y = spC; + } else { + if (var_f30 < 2048.0f) { + if (demo_stop != 0) { + var_f30 = 0.0f; + } else { + var_f30 = 2048.0f; + } + var_r27->set(0.0f, 0.0f, 0.0f); + } + + cLib_addCalcAngleS2(&prot[-1].y, spC, 2, var_f30); + } + } + } + + for (int i = 0; i < i_chain_s->field_0x61d0; i++) { + i_chain_s->field_0x1ac[i] = i_chain_s->pos[i]; + } +} + +/* 804F5990-804F5EF4 006990 0564+00 1/1 0/0 0/0 .text chain_control2__FP10e_fm_classP7chain_si */ +static void chain_control2(e_fm_class* i_this, chain_s* i_chain_s, int param_2) { + if ((i_chain_s->field_0x617c != 0) || (i_chain_s->field_0x619c != 0) || (i_chain_s->field_0x617e != 0)) { + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz sp64; + cXyz sp58; + cXyz sp4C; + fopAc_ac_c* actor = i_this; + dBgS_GndChk gndchk; + + f32 temp_f31; + f32 temp_f27; + f32 temp_f30; + + if (i_chain_s->field_0x617c != 0) { + daPy_py_c* sp18 = (daPy_py_c*)dComIfGp_getPlayer(0); + MTXCopy(sp18->getRightItemMatrix(), *calc_mtx); + sp64.set(0.0f, 0.0f, 0.0f); + MtxPosition(&sp64, &sp4C); + + s16 spC = -10000.0f + (30.0f * i_chain_s->field_0x6174); + if (spC > -4000) { + spC = -4000; + } + + f32 var_f29 = -100.0f + (0.1f * i_chain_s->field_0x6174); + if (var_f29 > -80.0f) { + var_f29 = -80.0f; + } + + f32 var_f28 = 30.0f + (0.025f * i_chain_s->field_0x6174); + if (var_f28 > 35.0f) { + var_f28 = 35.0f; + } + + cLib_addCalcAngleS2(&i_chain_s->field_0x619e, spC, 2, 1000); + cLib_addCalc2(&i_chain_s->field_0x61a0, var_f29, 0.5f, 5.0f); + cLib_addCalc2(&i_chain_s->field_0x61a4, var_f28, 0.5f, 5.0f); + + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + sp64.x = (25.0f + NREG_F(0)) - 7.0f; + sp64.y = (48.0f + (i_chain_s->field_0x61a0 + NREG_F(1))) - 8.0f; + sp64.z = (20.0f + (i_chain_s->field_0x61a4 + NREG_F(2))) - 7.0f; + MtxPosition(&sp64, &sp58); + i_chain_s->pos[i_chain_s->field_0x61d0 - 1] = sp4C + sp58; + i_chain_s->field_0x618c = i_chain_s->pos[i_chain_s->field_0x61d0 - 1]; + i_chain_s->field_0x6198 = 0.0f; + } else if (i_chain_s->field_0x617e != 0) { + cMtx_YrotS(*calc_mtx, i_chain_s->rot[i_chain_s->field_0x61d0 - 2].y); + sp64.x = 0.0f; + sp64.y = -5.0f + AREG_F(11); + sp64.z = (20.0f + AREG_F(12)) - 30.0f; + MtxPosition(&sp64, &sp58); + i_chain_s->pos[i_chain_s->field_0x61d0 - 1] = i_chain_s->field_0x6180 + sp58; + } else if (i_chain_s->field_0x619c != 0) { + i_chain_s->field_0x619c--; + if (i_chain_s->field_0x619c == 0) { + daPy_py_c::setPlayerSe(Z2SE_AL_GRAB_CHAIN); + } + + i_chain_s->field_0x618c.y += i_chain_s->field_0x6198; + i_chain_s->field_0x6198 -= 7.0f; + + if (i_chain_s->field_0x618c.y <= 15.0f + i_this->mAcch.GetGroundH()) { + i_chain_s->field_0x618c.y = 15.0f + i_this->mAcch.GetGroundH(); + } + + i_chain_s->pos[i_chain_s->field_0x61d0 - 1] = i_chain_s->field_0x618c; + } + + int i; + s16 sp10, spE; + cXyz* ppos = &i_chain_s->pos[i_chain_s->field_0x61d0 - 2]; + csXyz* prot = &i_chain_s->rot[i_chain_s->field_0x61d0 - 2]; + sp64.x = 0.0f; + sp64.y = 0.0f; + sp64.z = l_HIO.field_0x4c; + + for (i = i_chain_s->field_0x61d0 - 2; i >= i_chain_s->field_0x6170; i--, ppos--, prot--) { + temp_f31 = ppos[0].x - ppos[1].x; + temp_f27 = ppos[0].y - ppos[1].y; + temp_f30 = ppos[0].z - ppos[1].z; + + spE = (s16)cM_atan2s(temp_f31, temp_f30); + sp10 = -cM_atan2s(temp_f27, JMAFastSqrt((temp_f31 * temp_f31) + (temp_f30 * temp_f30))); + + cMtx_YrotS(*calc_mtx, spE); + cMtx_XrotM(*calc_mtx, sp10); + MtxPosition(&sp64, &sp58); + + if (i == (i_chain_s->field_0x61d0 - 2) && (i_chain_s->field_0x617c != 0 || i_chain_s->field_0x619c != 0)) { + *ppos = *(ppos + 1); + } else { + *ppos = *(ppos + 1) + sp58; + } + + if (i_chain_s->field_0x617c != 0 && i == ((i_chain_s->field_0x61d0 + KREG_S(2)) - 2)) { + cLib_addCalcAngleS2(&prot->y, player->shape_angle.y + 0x8000, 2, 0x2000); + cLib_addCalcAngleS2(&prot->x, i_chain_s->field_0x619e, 2, 0x2000); + } else { + prot->x = -sp10; + prot->y = (spE + 0x8000); + } + } + } +} + +/* 804F5EF4-804F64A8 006EF4 05B4+00 1/1 0/0 0/0 .text chain_control3__FP10e_fm_classP7chain_si */ +static void chain_control3(e_fm_class* i_this, chain_s* i_chain_s, int param_2) { + fopAc_ac_c* actor = (fopAc_ac_c*)i_this; + daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); + cXyz sp68; + cXyz sp5C; + + sp68 = i_chain_s->field_0x1ac[i_chain_s->field_0x6170] - i_chain_s->pos[i_chain_s->field_0x6170]; + i_chain_s->field_0x6174 = sp68.abs(); + + cXyz* ppos = &i_chain_s->pos[i_chain_s->field_0x6170]; + for (int i = i_chain_s->field_0x6170; i < i_chain_s->field_0x61d0; i++, ppos++) { + *ppos += sp68 * ((f32)(i_chain_s->field_0x61d0 - (i - i_chain_s->field_0x6170)) / (f32)i_chain_s->field_0x61d0); + } + + if (i_chain_s->field_0x617c != 0) { + i_chain_s->field_0x6180 = player->current.pos; + sp68 = i_chain_s->pos[i_chain_s->field_0x61d0 - 2] - i_chain_s->pos[i_chain_s->field_0x61d0 - 1]; + + if (daPy_getPlayerActorClass()->checkEquipHeavyBoots()) { + if (i_chain_s->field_0x6174 > 300.0f) { + cMtx_YrotS(*calc_mtx, cM_atan2s(sp68.x, sp68.z)); + sp68.y = 0.0f; + sp68.x = 0.0f; + sp68.z = (i_chain_s->field_0x6174 - 300.0f) * (0.05f + XREG_F(14)); + MtxPosition(&sp68, &sp5C); + actor->current.pos -= sp5C; + } + } else if (i_chain_s->field_0x6174 > 50.0f && i_this->mDemoCamMode == 0) { + daPy_py_c* spC = (daPy_py_c*)dComIfGp_getPlayer(0); + f32 temp_f31 = (i_chain_s->field_0x6174 - 50.0f); + temp_f31 *= 0.5f + TREG_F(12); + + spC->setOutPower(temp_f31, cM_atan2s(sp68.x, sp68.z), 0); + } + } else if (i_chain_s->field_0x617e == 0) { + i_chain_s->field_0x6174 = 0.0f; + } else if (i_this->mAction != ACTION_START) { + f32 var_f30; + if (i_this->mAction == ACTION_STOP) { + var_f30 = 200.0f; + } else { + var_f30 = 50.0f; + } + + if (i_chain_s->field_0x6174 > var_f30) { + sp68 = i_chain_s->pos[i_chain_s->field_0x61d0 - 2] - i_chain_s->pos[i_chain_s->field_0x61d0 - 1]; + cMtx_YrotS(*calc_mtx, cM_atan2s(sp68.x, sp68.z)); + sp68.y = 0.0f; + sp68.x = 0.0f; + sp68.z = (0.05f + XREG_F(14)) * (i_chain_s->field_0x6174 - var_f30); + MtxPosition(&sp68, &sp5C); + actor->current.pos -= sp5C; + } + } + + if (param_2 >= 2 && i_this->mAction != ACTION_END) { + if (i_chain_s->field_0x617d != 0) { + i_chain_s->field_0x617d--; + } + + fopAc_ac_c* var_r24 = NULL; + if (i_chain_s->field_0x617c == 0 || i_chain_s->field_0x617e != 0) { + if (i_chain_s->pos[i_chain_s->field_0x61d0 - 1].y < 0.0f) { + daPy_py_c::setLookPos(&i_chain_s->pos[i_chain_s->field_0x61d0 - 1]); + } + + if (i_chain_s->field_0x617d == 0) { + if (daPy_py_c::setFmChainPos(actor, &i_chain_s->pos[i_chain_s->field_0x61d0 - 1], param_2)) { + i_chain_s->field_0x617c = 1; + + daPy_py_c::setPlayerSe(Z2SE_AL_GRAB_CHAIN); + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER3, 1, cXyz(0.0f, 1.0f, 0.0f)); + + if (i_chain_s->field_0x617e != 0 && i_this->mAction == ACTION_STOP) { + i_this->mAction = ACTION_NORMAL; + i_this->mMode = 0; + } + + i_chain_s->field_0x617e = 0; + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[669]); + } + } + } else { + if (i_chain_s->field_0x617d == 0 && i_chain_s->field_0x617c != 0 && + !daPy_py_c::setFmChainPos(actor, &i_chain_s->pos[i_chain_s->field_0x61d0 - 1], param_2)) + { + if (var_r24 != NULL) { + i_chain_s->field_0x617d = 10; + } else { + i_chain_s->field_0x617d = 1; + } + } + + if (i_chain_s->field_0x617d == 1) { + i_chain_s->field_0x617c = 0; + i_chain_s->field_0x6170 = 0; + + if (var_r24 != NULL) { + i_chain_s->field_0x617e = 1; + i_chain_s->field_0x6180 = var_r24->current.pos; + i_chain_s->field_0x6180.y += 40.0f + YREG_F(15); + + daPy_py_c::setPlayerSe(Z2SE_AL_SET_CHAIN); + cXyz sp14; + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER2, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); + } else { + i_chain_s->field_0x619c = 4; + } + } + } + } +} + +/* 804FAF80-804FAF84 000130 0004+00 2/2 0/0 0/0 .bss ba_count */ +static int ba_count; + +/* 804F64A8-804F6500 0074A8 0058+00 1/1 0/0 0/0 .text s_ba_sub__FPvPv */ +static void* s_ba_sub(void* i_actor, void* i_data) { + if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_BA) { + ba_count++; + } + + return NULL; +} + +/* 804F6500-804F6BD0 007500 06D0+00 2/1 0/0 0/0 .text action__FP10e_fm_class */ +static void action(e_fm_class* i_this) { + fopAc_ac_c* actor = (fopAc_ac_c*)i_this; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz sp48; + cXyz sp3C; + + i_this->mAngleToPlayer = fopAcM_searchPlayerAngleY(actor); + +#ifdef DEBUG + if (mDoCPd_c::getTrigStart(PAD_2) && i_this->mAction != ACTION_DOWN) { + i_this->mAction = ACTION_DOWN; + i_this->mMode = 0; + actor->health = 50; + i_this->mDownCnt = 3; + } +#endif + + s8 attn_on = FALSE; + s8 set_look_pos = TRUE; + damage_check(i_this); + s8 bossroom_wait_on = TRUE; + + i_this->field_0x1b07c = 1; + + dComIfGs_offEventBit((u16)dSv_event_flag_c::saveBitLabels[255]); + dComIfGs_offEventBit((u16)dSv_event_flag_c::saveBitLabels[257]); + + switch (i_this->mAction) { + case ACTION_NORMAL: + e_fm_normal(i_this); + i_this->field_0x1b07c = 0; + break; + case ACTION_FIGHT_RUN: + e_fm_fight_run(i_this); + i_this->field_0x1b07c = 0; + break; + case ACTION_N_FIGHT: + e_fm_n_fight(i_this); + i_this->field_0x1b07c = 0; + break; + case ACTION_F_FIGHT: + e_fm_f_fight(i_this); + i_this->field_0x1b07c = 0; + break; + case ACTION_DAMAGE_RUN: + e_fm_damage_run(i_this); + dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[255]); + break; + case ACTION_ANIMAL: + e_fm_animal(i_this); + i_this->field_0x1b07c = 0; + break; + case ACTION_FIRE: + e_fm_fire(i_this); + i_this->field_0x1b07c = 0; + break; + case ACTION_STOP: + e_fm_stop(i_this); + i_this->field_0x1b07c = 0; + break; + case ACTION_DOWN: + attn_on = e_fm_down(i_this); + break; + case ACTION_A_DOWN: + attn_on = e_fm_a_down(i_this); + break; + case ACTION_START: + bossroom_wait_on = e_fm_start(i_this); + break; + case ACTION_END: + attn_on = e_fm_end(i_this); + bossroom_wait_on = FALSE; + set_look_pos = FALSE; + break; + } + + cLib_addCalcAngleS2(&actor->shape_angle.y, actor->current.angle.y, 2, 0x1000); + cLib_addCalcAngleS2(&actor->shape_angle.x, actor->current.angle.x, 2, 0x1000); + cLib_addCalcAngleS2(&actor->shape_angle.z, actor->current.angle.z, 2, 0x1000); + + cMtx_YrotS(*calc_mtx, actor->current.angle.y); + sp48.z = l_HIO.field_0xc * (actor->speedF * l_HIO.base_size); + actor->gravity = -5.0f; + sp48.x = 0.0f; + sp48.y = 0.0f; + MtxPosition(&sp48, &sp3C); + actor->speed.x = sp3C.x; + actor->speed.z = sp3C.z; + actor->current.pos += actor->speed; + + if (actor->current.pos.abs() > l_HIO.field_0xa0) { + sp48 = actor->current.pos; + cMtx_YrotS(*calc_mtx, cM_atan2s(-sp48.x, -sp48.z)); + sp48.x = 0.0f; + sp48.y = 0.0f; + sp48.z = 10.0f + VREG_F(7); + MtxPosition(&sp48, &sp3C); + actor->current.pos += sp3C; + i_this->field_0x809 = 1; + } else { + i_this->field_0x809 = 0; + } + + cXyz* cc_move_p = i_this->field_0xa24.GetCCMoveP(); + if (cc_move_p != NULL) { + actor->current.pos.x += cc_move_p->x; + actor->current.pos.z += cc_move_p->z; + } + + if (i_this->field_0x7fc > 0.1f) { + sp48.x = 0.0f; + sp48.y = 0.0f; + sp48.z = -i_this->field_0x7fc; + cMtx_YrotS(*calc_mtx, i_this->field_0x800); + MtxPosition(&sp48, &sp3C); + actor->current.pos += sp3C; + + cLib_addCalc0(&i_this->field_0x7fc, 1.0f, 7.0f + TREG_F(12)); + } + + s16 sp16 = 0; + s16 sp14 = 0; + if (i_this->field_0x7c0 != 0) { + if (i_this->field_0x7c0 == 1) { + sp48 = player->eyePos - actor->current.pos; + sp48.y += -300.0f + TREG_F(2); + + sp16 = cM_atan2s(sp48.x, sp48.z) - actor->shape_angle.y; + sp14 = actor->shape_angle.x + -cM_atan2s(sp48.y, JMAFastSqrt((sp48.x * sp48.x) + (sp48.z * sp48.z))); + + if (sp16 > 7000) { + sp16 = 7000; + } else if (sp16 < -7000) { + sp16 = -7000; + } + + if (sp14 > 1000) { + sp14 = 1000; + } else if (sp14 < -1000) { + sp14 = -1000; + } + } else { + if (i_this->field_0x808 & 1) { + sp16 = -14000; + } else { + sp16 = 14000; + } + sp14 = 2000; + } + + i_this->field_0x7c0 = 0; + } + + cLib_addCalcAngleS2(&i_this->mBodyRotX, sp16 / 2, 0x10, 0x200); + cLib_addCalcAngleS2(&i_this->mHeadRotZ, sp14, 0x10, 0x200); + + if (attn_on) { + fopAcM_OnStatus(actor, 0); + actor->attention_info.flags = 4; + } else { + fopAcM_OffStatus(actor, 0); + actor->attention_info.flags = 0; + } + + if (set_look_pos) { + daPy_py_c::setLookPos(&actor->eyePos); + } + + if (i_this->mDoCreateBa) { + i_this->mDoCreateBa = FALSE; + ba_count = 0; + fpcM_Search(s_ba_sub, i_this); + + const int MAX_BA = 4; + int create_num = MAX_BA - ba_count; + + csXyz rot(0, 0, 0); + rot.x = JREG_S(8); + + for (int i = 0; i < create_num; i++) { + fopAcM_createChild(PROC_E_BA, fopAcM_GetID(actor), 0xFFFF1F02, &actor->eyePos, fopAcM_GetRoomNo(actor), &rot, NULL, -1, NULL); + rot.y += (s16)(0x10000 / create_num); + } + } + + demo_camera(i_this); + + if (bossroom_wait_on) { + daPy_getPlayerActorClass()->onBossRoomWait(); + } +} + +/* 804F6BD0-804F72D0 007BD0 0700+00 1/1 0/0 0/0 .text effect_set__FP10e_fm_class */ +static void effect_set(e_fm_class* i_this) { + fopAc_ac_c* actor = (fopAc_ac_c*)i_this; + cXyz sp4C(l_HIO.field_0x2c, l_HIO.field_0x2c, l_HIO.field_0x2c); + + J3DModel* model = i_this->mpFmModelMorf->getModel(); + if (i_this->field_0x7b6 != 3) { + i_this->field_0x7b6 = 0; + } + + dComIfGs_BossLife_public_Set(0); + + f32 var_f28; + f32 var_f27; + if (i_this->field_0x792 != 0) { + dComIfGs_BossLife_public_Set(100); + var_f28 = 40.0f + KREG_F(9); + var_f27 = 0.65f; + + if (i_this->field_0x7b6 != 3) { + i_this->field_0x7b6 = 1; + } + + f32 temp_f29 = l_HIO.field_0x28 * i_this->field_0x794; + + for (int i = 0; i < 14; i++) { + static int eff_joint_d[] = {2, 6, 13, 8, 15, 1, 1, 6, 13, 1, 1, 1, 19, 1}; + + static u16 eff_id[] = { + 0x80FD, 0x80F9, 0x80F9, 0x80FC, 0x80FC, 0x80FA, 0x80FB, + 0x80F7, 0x80F7, 0x80F8, 0x80FE, 0x80FF, 0x8723, 0x8722, + }; + + i_this->field_0x1838[i] = dComIfGp_particle_set(i_this->field_0x1838[i], (u16)eff_id[i], &i_this->current.pos, NULL, NULL); + + JPABaseEmitter* player = dComIfGp_particle_getEmitter(i_this->field_0x1838[i]); + if (player != NULL) { + MTXCopy(model->getAnmMtx(eff_joint_d[i]), *calc_mtx); + MtxScale(temp_f29, temp_f29, temp_f29, 1); + player->setGlobalSRTMatrix(*calc_mtx); + } + } + + i_this->mSound.startCreatureSoundLevel(Z2SE_EN_FM_BURNING, 0, -1); + } else { + var_f28 = 0.0f; + var_f27 = 0.15f; + } + + cLib_addCalc2(&i_this->mChainColorR, var_f28, 1.0f, var_f27); + + if (i_this->field_0x790 != 0) { + i_this->field_0x790++; + if (i_this->field_0x790 == 10) { + for (int i = 0; i < 4; i++) { + carry_off(i_this, i); + } + + i_this->field_0x79c = 100.0f; + hasira_hahen_hit(&actor->current.pos, 1000.0f + VREG_F(14), 100.0f + VREG_F(15), -1); + } + + if (i_this->field_0x790 == 2) { + for (int i = 0; i < 2; i++) { + static int ef_bck[] = {7, 8}; + i_this->mpAttackEfModelMorf[i]->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("E_fm", ef_bck[i]), 0, 1.0f, 1.0f, 0.0f, -1.0f, NULL); + i_this->mpAttackEfModelMorf[i]->setFrame(0.0f); + i_this->mpAttackEfBtk[i]->setFrame(0.0f); + + if (i == 1) { + i_this->mpAttackEfBrk->setFrame(0.0f); + i_this->field_0x798 = 2.5f + KREG_F(7); + } + } + + dComIfGp_particle_set(0x811B, &actor->current.pos, &actor->shape_angle, &sp4C); + + for (int i = 0; i < 10; i++) { + i_this->mHashiraActors[i] = NULL; + } + } + + mDoMtx_stack_c::transS(actor->current.pos.x, 3.0f + actor->current.pos.y, actor->current.pos.z); + mDoMtx_stack_c::scaleM(l_HIO.field_0x30, l_HIO.field_0x30, l_HIO.field_0x30); + + for (int i = 0; i < 2; i++) { + model = i_this->mpAttackEfModelMorf[i]->getModel(); + model->setBaseTRMtx(mDoMtx_stack_c::get()); + + if (i == 1) { + i_this->mpAttackEfModelMorf[i]->setPlaySpeed(i_this->field_0x798); + cLib_addCalc2(&i_this->field_0x798, 0.5f + KREG_F(8), 1.0f, 0.08f + KREG_F(9)); + } + + i_this->mpAttackEfModelMorf[i]->play(NULL, 0, 0); + i_this->mpAttackEfBtk[i]->play(); + + if (i == 1) { + i_this->mpAttackEfBrk->play(); + } + + i_this->mpAttackEfModelMorf[i]->modelCalc(); + } + + fire_range = (10.5f + KREG_F(6)) * (l_HIO.field_0x28 * i_this->mpAttackEfModelMorf[1]->getFrame()); + + if (i_this->field_0x790 < (TREG_S(6) + 43)) { + if (i_this->field_0x790 == (TREG_S(6) + 41)) { + dComIfGp_getVibration().StopQuake(0x1F); + } + + fopAc_ac_c* sp10 = (fopAc_ac_c*)dComIfGp_getPlayer(0); + if (other_bg_check(i_this, sp10)) { + i_this->mEffAtSph.OffAtVsPlayerBit(); + } else { + i_this->mEffAtSph.OnAtVsPlayerBit(); + } + + i_this->mEffAtSph.SetC(actor->current.pos); + i_this->mEffAtSph.SetR(fire_range); + dComIfG_Ccsp()->Set(&i_this->mEffAtSph); + + i_this->field_0x7b6 = 2; + fpcM_Search(s_hasira_eff_sub, i_this); + } + + if (i_this->field_0x790 >= (TREG_S(7) + 70)) { + i_this->field_0x790 = 0; + } + } + + if (i_this->mShadowKey != 353535 && i_this->field_0x7b8 > 0.02f) { + GXColor light_col; + light_col.r = l_HIO.field_0x34; + light_col.g = l_HIO.field_0x36; + light_col.b = l_HIO.field_0x38; + light_col.a = 0xFF; + + cXyz light_pos(actor->current.pos); + light_pos.y += 300.0f + TREG_F(12); + + f32 var_f26 = l_HIO.field_0x3c * i_this->field_0x7b8; + dKy_BossLight_set(&light_pos, &light_col, var_f26, 0); + } + + f32 var_f31; + f32 var_f30; + if (i_this->field_0x7b6 == 0) { + var_f31 = 0.0f; + var_f30 = 2.0f; + } else if (i_this->field_0x7b6 == 1) { + var_f31 = 1.7f + (2.0f + JREG_F(17)) + (0.5f * cM_ssin((i_this->mCounter * 6656))); + var_f30 = 2.0f; + } else if (i_this->field_0x7b6 == 2) { + var_f31 = 30.0f; + var_f30 = 2.0f; + } else if (i_this->field_0x7b6 == 3) { + var_f31 = 0.0f; + var_f30 = 0.025f; + } + + cLib_addCalc2(&i_this->field_0x7b8, var_f31, 1.0f, var_f30); + cLib_addCalc0(&i_this->field_0x79c, 1.0f, 4.0f); + + cXyz sp34; + model = i_this->mpFmModelMorf->getModel(); + + MTXCopy(model->getAnmMtx(0x16), *calc_mtx); + sp34.set(0.0f, 0.0f, 0.0f); + MtxPosition(&sp34, &i_this->mFootPos[0]); + + MTXCopy(model->getAnmMtx(0x19), *calc_mtx); + MtxPosition(&sp34, &i_this->mFootPos[1]); +} + +/* 804F72D0-804F8C60 0082D0 1990+00 2/1 0/0 0/0 .text daE_FM_Execute__FP10e_fm_class */ +static int daE_FM_Execute(e_fm_class* i_this) { + if (cDmrNowMidnaTalk()) { + return 1; + } + + if (i_this->mDemoCamMode == 1000) { + return 1; + } + + fopAc_ac_c* actor = (fopAc_ac_c*)i_this; + cXyz sp130; + cXyz sp124; + cXyz sp118; + + i_this->mCounter++; + + for (int i = 0; i < 4; i++) { + if (i_this->mTimers[i] != 0) { + i_this->mTimers[i]--; + } + } + + if (i_this->mDamageInvulnerabilityTimer != 0) { + i_this->mDamageInvulnerabilityTimer--; + } + + action(i_this); + + i_this->mAcch.CrrPos(dComIfG_Bgsp()); + actor->current.pos.y = actor->home.pos.y; + + mDoMtx_stack_c::transS(actor->current.pos.x, actor->current.pos.y, actor->current.pos.z + ZREG_F(7)); + mDoMtx_stack_c::YrotM(actor->shape_angle.y); + mDoMtx_stack_c::XrotM(actor->shape_angle.x); + mDoMtx_stack_c::ZrotM(actor->shape_angle.z); + mDoMtx_stack_c::scaleM(l_HIO.base_size, l_HIO.base_size, l_HIO.base_size); + + J3DModel* model = i_this->mpFmModelMorf->getModel(); + model->setBaseTRMtx(mDoMtx_stack_c::get()); + + i_this->mpFmModelMorf->play(&actor->eyePos, 0, 0); + + if (i_this->mAnm == 0x15 && i_this->mpFmModelMorf->checkFrame(1.0f)) { + i_this->mSound.startCreatureSound(Z2SE_EN_FM_DEMOEND, 0, -1); + i_this->mSound.startCreatureSound(Z2SE_EN_FM_DEMOEND_CORE, 0, -1); + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_DEMOEND, -1); + } else if (i_this->mAnm == 0xF && i_this->mpFmModelMorf->checkFrame(20.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_CHANCE, -1); + } else if (i_this->mAnm == 0x11 && (i_this->mpFmModelMorf->checkFrame(1.0f) || i_this->mpFmModelMorf->checkFrame(30.0f))) { + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_DAMAGEWALK, -1); + } else if (i_this->mAnm == 0x1C && i_this->mpFmModelMorf->checkFrame(5.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_DOWNWAIT, -1); + } else if (i_this->mAnm == 0x1E && (i_this->mpFmModelMorf->checkFrame(1.0f) || i_this->mpFmModelMorf->checkFrame(30.0f))) { + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_KYORO, -1); + } else if (i_this->mAnm == 0x21 && i_this->mpFmModelMorf->checkFrame(145.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_UP02_2, -1); + } else if (i_this->mAnm == 0x22 && i_this->mpFmModelMorf->checkFrame(13.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_WAIT, -1); + } else if (i_this->mAnm == 0xA && i_this->mpFmModelMorf->checkFrame(1.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_GAOO_LONG, -1); + } else if (i_this->mAnm == 0x1D && i_this->mpFmModelMorf->checkFrame(1.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_EN_FM_V_HANGWAIT, -1); + } + + if (i_this->mDrawDemoModel) { + mDoMtx_stack_c::scaleM(i_this->mDemoModelSize, i_this->mDemoModelSize, i_this->mDemoModelSize); + cLib_addCalc2(&i_this->mDemoModelSize, 0.65f + KREG_F(11), 0.2f, i_this->mDemoModelSizeStep); + cLib_addCalc2(&i_this->mDemoModelSizeStep, 0.02f + KREG_F(13), 1.0f, 0.001f + KREG_F(14)); + + i_this->mpDemoFmModelMorf->getModel()->setBaseTRMtx(mDoMtx_stack_c::get()); + i_this->mpDemoFmBrk->play(); + i_this->mpDemoFmModelMorf->play(&actor->eyePos, 0, 0); + i_this->mpDemoFmModelMorf->modelCalc(); + + dComIfGs_offOneZoneSwitch(0, -1); + } + + i_this->mpFmBtk[i_this->mPlayTexAnmNo]->play(); + i_this->mpFmBrk[i_this->mPlayTexAnmNo]->play(); + + if (i_this->mPlayTexAnmNo != TEXANM_FM && i_this->mPlayTexAnmNo != TEXANM_PUTOUT_WAIT) { + if (i_this->mpFmBrk[i_this->mPlayTexAnmNo]->getFrame() > i_this->mpFmBrk[i_this->mPlayTexAnmNo]->getEndFrame() - 2.0f) { + i_this->mpFmBrk[i_this->mPlayTexAnmNo]->setFrame(i_this->mpFmBrk[i_this->mPlayTexAnmNo]->getEndFrame() - 2.0f); + } + + if (i_this->mpFmBtk[i_this->mPlayTexAnmNo]->getFrame() > i_this->mpFmBtk[i_this->mPlayTexAnmNo]->getEndFrame() - 2.0f) { + i_this->mpFmBtk[i_this->mPlayTexAnmNo]->setFrame(i_this->mpFmBtk[i_this->mPlayTexAnmNo]->getEndFrame() - 2.0f); + } + } + + i_this->mpFmModelMorf->modelCalc(); + + cXyz sp10C(-20000.0f, 20000.0f, 20000.0f); + i_this->field_0x1aff0 = 0; + + MTXCopy(model->getAnmMtx(3), *calc_mtx); + sp130.set(20.0f, 0.0f, 0.0f); + MtxPosition(&sp130, &sp124); + i_this->mCcSph[0].SetC(sp124); + i_this->mCcSph[0].SetR(120.0f + KREG_F(17)); + dComIfG_Ccsp()->Set(&i_this->mCcSph[0]); + + sp130.set(0.0f, 0.0f, 0.0f); + MTXCopy(model->getAnmMtx(1), *calc_mtx); + sp130.set(100.0f + VREG_F(0), VREG_F(1), VREG_F(2)); + MtxPosition(&sp130, &sp124); + i_this->mCcSph[1].SetC(sp124); + i_this->mCcSph[1].SetR(170.0f + VREG_F(3)); + dComIfG_Ccsp()->Set(&i_this->mCcSph[1]); + + MTXCopy(model->getAnmMtx(3), *calc_mtx); + sp130.set(0.0f, 0.0f, 0.0f); + i_this->mpCoreModel->setBaseTRMtx(*calc_mtx); + + f32 brk_frame = 0.0f; + if (i_this->field_0x770 != 0) { + brk_frame = 29.0f; + i_this->mSound.startCreatureSoundLevel(Z2SE_EN_FM_CORE_GLOW, 0, -1); + i_this->field_0x1834 = 1.0f; + } else { + cLib_addCalc0(&i_this->field_0x1834, 1.0f, 0.05f); + } + + cLib_addCalc2(&i_this->mCoreBrkFrame, brk_frame, 1.0f, 1.0f); + + if (!(i_this->mCoreBrkFrame > 0.0f) || i_this->field_0x770 >= 9970) { + i_this->field_0x1834 = 0.0f; + } + + if (i_this->field_0x1834 > 0.0001f) { + if (i_this->field_0x1834 <= 0.05f) { + i_this->field_0x1834 = 0.0f; + } + + cXyz sp100; + sp130.set(10.0f + (135.0f + KREG_F(7)), -25.0f + KREG_F(8), KREG_F(9)); + MtxPosition(&sp130, &sp100); + + if (i_this->mAction == ACTION_END || i_this->mCoreBrkFrame < 2.0f) { + sp100.y += 20000.0f; + } + + JGeometry::TVec3 spF4; + spF4.x = spF4.y = spF4.z = i_this->field_0x1834; + + if (i_this->mAction == ACTION_START) { + for (int i = 0; i < 2; i++) { + static u16 cg_name[] = {0x842C, 0x8496}; + i_this->field_0x2374[i] = dComIfGp_particle_set(i_this->field_0x2374[i], cg_name[i], &sp100, NULL, NULL); + + JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->field_0x2374[i]); + if (emitter != NULL) { + JGeometry::TVec3 spE8; + spE8.x = spE8.y = spE8.z = i_this->field_0x1834; + emitter->setGlobalScale(spE8); + } + } + } else { + for (int i = 0; i < 6; i++) { + static u16 cg_name[] = {0x840F, 0x847F, 0x8726, 0x8727, 0x8728, 0x8729}; + i_this->field_0x2374[i] = dComIfGp_particle_set(i_this->field_0x2374[i], cg_name[i], &sp100, NULL, NULL); + + JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->field_0x2374[i]); + if (emitter != NULL) { + emitter->setGlobalScale(spF4); + model = i_this->mpFmModelMorf->getModel(); + emitter->setGlobalRTMatrix(model->getAnmMtx(3)); + } + } + } + } + + i_this->mpCoreBrk->setFrame(i_this->mCoreBrkFrame); + i_this->mpCoreBtk->play(); + + sp130.set((10.0f + (135.0f + KREG_F(7))) - 20.0f, -25.0f + KREG_F(8), KREG_F(9)); + MtxPosition(&sp130, &actor->eyePos); + actor->attention_info.position = actor->eyePos; + actor->attention_info.position.y += 30.0f; + sp124 = actor->eyePos; + + if (i_this->field_0x770 != 0) { + if (i_this->field_0x770 > 1) { + i_this->field_0x770--; + } + } else { + sp124.x += 20000.0f; + } + + i_this->mCoreSph.SetC(sp124); + i_this->mCoreSph.SetR(10.0f + (40.0f + YREG_F(3))); + dComIfG_Ccsp()->Set(&i_this->mCoreSph); + + sp130.set(0.0f, 0.0f, 0.0f); + + for (int i = 0; i < 6; i++) { + static int hl_d[] = {21, 24, 7, 8, 14, 15}; + static f32 hl_s[] = {50.0f, 50.0f, 50.0f, 50.0f, 50.0f, 50.0f}; + + MTXCopy(model->getAnmMtx(hl_d[i]), *calc_mtx); + MtxPosition(&sp130, &sp124); + i_this->mCcSph[i + 2].SetC(sp124); + + if (i_this->field_0x182b != 0) { + i_this->mCcSph[i + 2].SetR(2.2f * hl_s[i]); + } else if (i_this->mAction == ACTION_DOWN) { + i_this->mCcSph[i + 2].SetR((1.8f + KREG_F(11)) * hl_s[i]); + } else { + i_this->mCcSph[i + 2].SetR(hl_s[i]); + } + + dComIfG_Ccsp()->Set(&i_this->mCcSph[i + 2]); + } + + for (int i = 0; i < 8; i++) { + if (i_this->field_0x792 == 0) { + i_this->mCcSph[i].OffAtVsPlayerBit(); + } else { + i_this->mCcSph[i].OnAtVsPlayerBit(); + } + + if (i_this->field_0x182b != 0) { + i_this->mCcSph[i].SetAtType(0x100000); + } else { + i_this->mCcSph[i].SetAtType(0x400); + } + } + + i_this->field_0x182b = 0; + + if (i_this->field_0x1829 != 0) { + i_this->mAtSph.SetR(60.0f); + + if (i_this->field_0x1828 == 0) { + MTXCopy(model->getAnmMtx(8), *calc_mtx); + } else if (i_this->field_0x1828 == 1) { + MTXCopy(model->getAnmMtx(0xF), *calc_mtx); + } else if (i_this->field_0x1828 == 2) { + MTXCopy(model->getAnmMtx(3), *calc_mtx); + MtxTrans((550.0f + KREG_F(13)) * i_this->field_0x1830, (100.0f + KREG_F(14)) * i_this->field_0x1830, KREG_F(15), 1); + i_this->mAtSph.SetR(80.0f); + + i_this->field_0x1830 += 0.18f; + if (i_this->field_0x1830 > 1.0f) { + i_this->field_0x1830 -= 1.0f; + } + } + + MtxPosition(&sp130, &sp124); + + if (i_this->field_0x182a == 0) { + i_this->field_0x182a = 1; + i_this->mAtSph.StartCAt(sp124); + } else { + i_this->mAtSph.MoveCAt(sp124); + } + + dComIfG_Ccsp()->Set(&i_this->mAtSph); + } else { + i_this->field_0x182a = 0; + } + + effect_set(i_this); + + if (i_this->mShadowKey != 353535) { + i_this->mPlight.mPosition = actor->current.pos; + i_this->mPlight.mPosition.y += 200.0f; + i_this->mPlight.mColor.r = 175; + i_this->mPlight.mColor.g = 93; + i_this->mPlight.mColor.b = 0; + i_this->mPlight.mPow = l_HIO.field_0x44 * l_HIO.base_size; + i_this->mPlight.mFluctuation = 1.0f; + } else { + i_this->mPlight.mPow = 0.0f; + } + + for (int i = 0; i < 4; i++) { + if (i_this->field_0x1b080 != 0) { + if (i <= 1) { + i_this->mChain[i].field_0x61d0 = 21; + } else { + i_this->mChain[i].field_0x61d0 = 18; + } + } + + static int sisi_joint[] = {8, 15, 22, 25}; + MTXCopy(model->getAnmMtx(sisi_joint[i]), *calc_mtx); + + if (i == 0) { + sp130.set(-25.0f, 20.0f, 50.0f); + } else if (i == 1) { + sp130.set(-25.0f, 20.0f, -50.0f); + } else if (i == 2) { + sp130.set(-5.0f, 30.0f, -35.0f); + } else if (i == 3) { + sp130.set(-5.0f, 30.0f, 35.0f); + } + + MtxPosition(&sp130, &i_this->mChain[i].field_0x68); + + if ((i_this->field_0x2399 != 1 || i != 0) && (i_this->field_0x2399 != 2 || i != 1)) { + chain_control1(i_this, &i_this->mChain[i], i); + chain_control2(i_this, &i_this->mChain[i], i); + chain_control3(i_this, &i_this->mChain[i], i); + } + + static int chain_hit_d[] = {21, 15, 9, 3}; + + if (i < 2 && i == i_this->field_0x1828 && i_this->field_0x1829 != 0) { + if (i_this->field_0x1ab0c[i] == 0) { + i_this->field_0x1ab0c[i] = 1; + + for (int j = 0; j < 4; j++) { + if (chain_hit_d[j] < i_this->mChain[i].field_0x61d0) { + i_this->mChainAtSph[j].StartCAt(i_this->mChain[i].pos[chain_hit_d[j]]); + } else { + i_this->mChainAtSph[j].StartCAt(sp10C); + } + } + } else { + for (int j = 0; j < 4; j++) { + if (chain_hit_d[j] < i_this->mChain[i].field_0x61d0) { + i_this->mChainAtSph[j].MoveCAt(i_this->mChain[i].pos[chain_hit_d[j]]); + + if (j == 2) { + sp130 = i_this->mChain[i].pos[chain_hit_d[j]]; + if (sp130.y < 100.0f) { + hasira_hahen_hit(&sp130, 500.0f + VREG_F(17), 100.0f + VREG_F(18), i_this->field_0x1828); + } + } + } else { + i_this->mChainAtSph[j].MoveCAt(sp10C); + } + + dComIfG_Ccsp()->Set(&i_this->mChainAtSph[j]); + + if (daPy_getPlayerActorClass()->checkEquipHeavyBoots()) { + i_this->mChainAtSph[j].SetAtSpl((dCcG_At_Spl)2); + } else { + i_this->mChainAtSph[j].SetAtSpl((dCcG_At_Spl)14); + } + } + } + } + + i_this->mChain[i].field_0x6094 = i_this->mChain[i].sound_pos; + i_this->mChain[i].sound_pos = i_this->mChain[i].pos[(i_this->mChain[i].field_0x61d0 / 2) + 4]; + } + + if (i_this->field_0x2399 != 0) { + for (int i = 0; i < 2; i++) { + for (int j = 0; j < 3; j++) { + static u16 chain_at_id[] = {0x8724, 0x8725}; + static int c_id[] = {10, 12, 14}; + + dComIfGp_particle_set(chain_at_id[i], &i_this->mChain[i_this->field_0x2399 - 1].pos[c_id[j]], NULL, NULL); + } + } + + i_this->field_0x2399 = 0; + } + + i_this->field_0x1829 = 0; + i_this->mSound.framework(0, dComIfGp_getReverb(fopAcM_GetRoomNo(actor))); + + if (!i_this->checkCameraFree()) { + if (fopAcM_searchPlayerDistance(actor) < l_HIO.field_0xa8) { + dComIfGs_onOneZoneSwitch(0, -1); + } else { + dComIfGs_offOneZoneSwitch(0, -1); + } + } + + if (i_this->field_0x2398 != 0) { + i_this->field_0x2398--; + i_this->field_0x182c = 1; + } + + if (i_this->field_0x182c != 0) { + if (i_this->field_0x182c == 1) { + for (int i = 0; i < 3; i++) { + static u16 core_id[] = {0x8410, 0x8411, 0x8480}; + i_this->field_0x238c[i] = dComIfGp_particle_set(i_this->field_0x238c[i], core_id[i], &actor->eyePos, NULL, NULL); + + if (i == 2) { + JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->field_0x238c[i]); + if (emitter != NULL) { + model = i_this->mpFmModelMorf->getModel(); + emitter->setGlobalRTMatrix(model->getAnmMtx(3)); + } + } + } + } + + if (i_this->field_0x182c == 2) { + dComIfGp_particle_set(0x8491, &actor->eyePos, NULL, NULL); + fopAcM_createDisappear(actor, &actor->eyePos, 5, 0, 0xFF); + mDoAud_seStart(Z2SE_EN_BQ_EYE_EXPLODE, NULL, 0, 0); + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER5, 1, cXyz(0.0f, 1.0f, 0.0f)); + + cXyz spDC(1.0f, 1.0f, 1.0f); + csXyz rot(actor->shape_angle); + rot.y += 0x800; + + fopAcM_createItemForBoss(&actor->eyePos, fpcNm_ITEM_UTAWA_HEART, fopAcM_GetRoomNo(actor), &rot, NULL, 10.0f + KREG_F(19), 30.0f, -1); + } + + if (i_this->field_0x182c == 3) { + for (int i = 0; i < 3; i++) { + static u16 f_id[] = {0x8412, 0x8413, 0x8414}; + JPABaseEmitter* emitter = dComIfGp_particle_set(f_id[i], &actor->current.pos, NULL, NULL); + } + + i_this->mSound.startCreatureSound(Z2SE_EN_FM_SAITENKA, 0, -1); + } + + i_this->field_0x182c = 0; + } + + if (i_this->mAnm == 0x15) { + int anm_frame = i_this->mpFmModelMorf->getFrame(); + if (anm_frame == 90 || anm_frame == 120) { + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER3, 1, cXyz(0.0f, 1.0f, 0.0f)); + } else if (anm_frame == 108 || anm_frame == 196 || anm_frame == 300 || anm_frame == 340) { + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER5, 1, cXyz(0.0f, 1.0f, 0.0f)); + } + + for (int i = 0; i < 8; i++) { + static u16 end_id[] = {0x8492, 0x8493, 0x8494, 0x8495, 0x86D6, 0x86D7, 0x86D8, 0x86D9}; + i_this->field_0x2354[i] = dComIfGp_particle_set(i_this->field_0x2354[i], end_id[i], &actor->eyePos, NULL, NULL); + + JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->field_0x2354[i]); + if (emitter != NULL) { + emitter->setGlobalRTMatrix(model->getAnmMtx(3)); + } + } + } else if (i_this->mAnm == 0x1F) { + i_this->field_0x2350 = dComIfGp_particle_set(i_this->field_0x2350, 0x872C, &actor->current.pos, NULL, NULL); + + JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->field_0x2350); + if (emitter != NULL) { + model = i_this->mpFmModelMorf->getModel(); + emitter->setGlobalRTMatrix(model->getAnmMtx(3)); + } + } + + if (i_this->mAction == ACTION_END) { + cXyz spD0(20000.0f, -23000.0f, 40000.0f); + for (int i = 0; i <= 7; i++) { + i_this->mCcSph[i].SetC(spD0); + } + + i_this->mAtSph.SetC(spD0); + i_this->mCoreSph.SetC(spD0); + i_this->mEffAtSph.SetC(spD0); + + for (int i = 0; i < 8; i++) { + i_this->mFEffAtSph[i].SetC(spD0); + } + + for (int i = 0; i < 4; i++) { + i_this->mChainAtSph[i].SetC(spD0); + } + } + + f32 blend_target = 0.0f; + f32 blend_step = 0.05f; + + int sp3C = i_this->field_0x5c8; + if (sp3C == 0) { + dKy_custom_colset(0, 1, i_this->mKankyoBlend); + } else if (sp3C == 1) { + dKy_custom_colset(0, 1, i_this->mKankyoBlend); + blend_target = 1.0f; + blend_step = 0.1f; + + if (i_this->mKankyoBlend == 1.0f) { + i_this->field_0x5c8 = 2; + i_this->mKankyoBlend = 0.0f; + } + } else if (sp3C == 2) { + dKy_custom_colset(1, 3, i_this->mKankyoBlend); + if (i_this->field_0x7b6 == 2) { + blend_target = 1.0f; + blend_step = 0.2f; + } else { + blend_target = 0.0f; + } + } else if (sp3C == 3) { + dKy_custom_colset(2, 1, i_this->mKankyoBlend); + blend_target = 0.0f; + blend_step = 0.02f; + } else if (sp3C == 4) { + dKy_custom_colset(1, 3, i_this->mKankyoBlend); + blend_target = 1.0f; + blend_step = 0.2f; + } + + cLib_addCalc2(&i_this->mKankyoBlend, blend_target, 1.0f, blend_step); + + if (l_HIO.field_0xac != 0) { + i_this->field_0x1b07c = 1; + } + + return 1; +} + +/* 804F8C60-804F8C68 009C60 0008+00 1/0 0/0 0/0 .text daE_FM_IsDelete__FP10e_fm_class */ +static int daE_FM_IsDelete(e_fm_class* i_this) { + return 1; +} + +/* 804F8C68-804F8CE8 009C68 0080+00 1/0 0/0 0/0 .text daE_FM_Delete__FP10e_fm_class */ +static int daE_FM_Delete(e_fm_class* i_this) { + fopAcM_GetID(i_this); + dComIfG_resDelete(&i_this->mPhase, "E_fm"); + + if (i_this->mInitHIO != 0) { + l_initHIO = 0; + mDoHIO_DELETE_CHILD(l_HIO.no); + } + + dKy_plight_cut(&i_this->mPlight); + + if (i_this->heap != NULL) { + i_this->mSound.deleteObject(); + } + + return 1; +} + +/* 804F8CE8-804F95CC 009CE8 08E4+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */ +static int useHeapInit(fopAc_ac_c* i_this) { + J3DModelData* modelData; + e_fm_class* a_this = (e_fm_class*)i_this; + + a_this->mpFmModelMorf = new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes("E_fm", 0x2C), NULL, NULL, (J3DAnmTransform*)dComIfG_getObjectRes("E_fm", 0x22), 0, 1.0f, 0, -1, 1, NULL, 0x80000, 0x11000284); + if (a_this->mpFmModelMorf == NULL || a_this->mpFmModelMorf->getModel() == NULL) { + return 0; + } + + J3DModel* fm_model = a_this->mpFmModelMorf->getModel(); + fm_model->setUserArea((u32)a_this); + + for (u16 i = 0; i < fm_model->getModelData()->getJointNum(); i++) { + if (i == 1 || i == 2) { + fm_model->getModelData()->getJointNodePointer(i)->setCallBack(nodeCallBack); + } + } + + int anm_mode; + for (int i = 0; i < 9; i++) { + a_this->mpFmBrk[i] = new mDoExt_brkAnm(); + if (a_this->mpFmBrk[i] == NULL) { + return 0; + } + + if (i >= 7) { + anm_mode = 0; + } else { + anm_mode = 2; + } + + static int brk[] = {0x33, 0x35, 0x3B, 0x3C, 0x34, 0x3A, 0x39, 0x36, 0x37}; + if (!a_this->mpFmBrk[i]->init(a_this->mpFmModelMorf->getModel()->getModelData(), (J3DAnmTevRegKey*)dComIfG_getObjectRes("E_fm", brk[i]), 1, anm_mode, 1.0f, 0, -1)) { + return 0; + } + + a_this->mpFmBtk[i] = new mDoExt_btkAnm(); + if (a_this->mpFmBtk[i] == NULL) { + return 0; + } + + static int btk[] = {0x42, 0x44, 0x49, 0x4A, 0x43, 0x48, 0x47, 0x45, 0x46}; + if (!a_this->mpFmBtk[i]->init(a_this->mpFmModelMorf->getModel()->getModelData(), (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("E_fm", btk[i]), 1, anm_mode, 1.0f, 0, -1)) { + return 0; + } + } + + a_this->mpDemoFmModelMorf = new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes("E_fm", 0x2C), NULL, NULL, (J3DAnmTransform*)dComIfG_getObjectRes("E_fm", 0x17), 0, 1.0f, 0, -1, 1, NULL, 0x80000, 0x11000284); + if (a_this->mpDemoFmModelMorf == NULL || a_this->mpDemoFmModelMorf->getModel() == NULL) { + return 0; + } + + a_this->mpDemoFmBrk = new mDoExt_brkAnm(); + if (a_this->mpDemoFmBrk == NULL) { + return 0; + } + + if (!a_this->mpDemoFmBrk->init(a_this->mpFmModelMorf->getModel()->getModelData(), (J3DAnmTevRegKey*)dComIfG_getObjectRes("E_fm", 0x38), 1, 0, 1.0f, 0, -1)) { + return 0; + } + + modelData = (J3DModelData*)dComIfG_getObjectRes("E_fm", 0x27); + JUT_ASSERT(7257, modelData != 0); + a_this->mpCoreModel = mDoExt_J3DModel__create(modelData, 0, 0x11020203); + if (a_this->mpCoreModel == NULL) { + return 0; + } + + a_this->mpCoreBrk = new mDoExt_brkAnm(); + if (a_this->mpCoreBrk == NULL) { + return 0; + } + + if (!a_this->mpCoreBrk->init(a_this->mpCoreModel->getModelData(), (J3DAnmTevRegKey*)dComIfG_getObjectRes("E_fm", 0x31), 1, 2, 1.0f, 0, -1)) { + return 0; + } + + a_this->mpCoreBtk = new mDoExt_btkAnm(); + if (a_this->mpCoreBtk == NULL) { + return 0; + } + + if (!a_this->mpCoreBtk->init(a_this->mpCoreModel->getModelData(), (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("E_fm", 0x3F), 1, 0, 1.0f, 0, -1)) { + return 0; + } + + a_this->mpCoreBtk->setPlaySpeed(0.0f); + + for (int i = 0; i < 2; i++) { + static int eff_bmd[] = {0x2A, 0x2B}; + a_this->mpAttackEfModelMorf[i] = new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes("E_fm", eff_bmd[i]), NULL, NULL, NULL, 0, 1.0f, 0, -1, 1, NULL, 0x80000, 0x11000284); + if (a_this->mpAttackEfModelMorf[i] == NULL || a_this->mpAttackEfModelMorf[i]->getModel() == NULL) { + return 0; + } + + if (i != 0) { + a_this->mpAttackEfBrk = new mDoExt_brkAnm(); + if (a_this->mpAttackEfBrk == NULL) { + return 0; + } + + if (!a_this->mpAttackEfBrk->init(a_this->mpAttackEfModelMorf[i]->getModel()->getModelData(), (J3DAnmTevRegKey*)dComIfG_getObjectRes("E_fm", 0x32), 1, 2, 1.0f, 0, -1)) { + return 0; + } + } + + a_this->mpAttackEfBtk[i] = new mDoExt_btkAnm(); + if (a_this->mpAttackEfBtk[i] == NULL) { + return 0; + } + + static int eff_btk[] = {0x40, 0x41}; + if (!a_this->mpAttackEfBtk[i]->init(a_this->mpAttackEfModelMorf[i]->getModel()->getModelData(), (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("E_fm", eff_btk[i]), 1, 2, 1.0f, 0, -1)) { + return 0; + } + } + + modelData = (J3DModelData*)dComIfG_getObjectRes("E_fm", 0x2E); + JUT_ASSERT(7404, modelData != 0); + + J3DModelData* modelData2 = (J3DModelData*)dComIfG_getObjectRes("E_fm", 0x2D); + JUT_ASSERT(7408, modelData2 != 0); + + for (int i = 0; i < 4; i++) { + for (int j = 0; j < 26; j++) { + if (j == 24) { + a_this->mChain[i].model[j] = mDoExt_J3DModel__create(modelData2, 0x80000, 0x11000084); + } else { + a_this->mChain[i].model[j] = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + } + + if (a_this->mChain[i].model[j] == NULL) { + return 0; + } + + dKy_tevstr_init(&a_this->mChain[i].tevstr[j], fopAcM_GetRoomNo(i_this), 0xFF); + } + + a_this->mChain[i].field_0x61d0 = 26; + a_this->mChain[i].field_0x619e = -10000; + a_this->mChain[i].field_0x61a0 = -100.0f; + a_this->mChain[i].field_0x61a4 = 30.0f; + } + + return 1; +} + +/* 804F9614-804F9B64 00A614 0550+00 1/0 0/0 0/0 .text daE_FM_Create__FP10fopAc_ac_c */ +static int daE_FM_Create(fopAc_ac_c* i_this) { + e_fm_class* a_this = (e_fm_class*)i_this; + fopAcM_SetupActor(a_this, e_fm_class); + + static dCcD_SrcSph cc_sph_src = { + { + {0x0, {{AT_TYPE_CSTATUE_SWING, 0x1, 0x1d}, {0x0, 0x0}, 0x79}}, // mObj + {dCcD_SE_NONE, 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 + }; + + static dCcD_SrcSph at_sph_src = { + { + {0x0, {{AT_TYPE_CSTATUE_SWING, 0x2, 0x1d}, {0x0, 0x0}, 0x0}}, // mObj + {dCcD_SE_NONE, 0x0, 0xe, 0x0, 0x0}, // mGObjAt + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg + {0x0}, // mGObjCo + }, // mObjInf + { + {{0.0f, 0.0f, 0.0f}, 35.0f} // mSph + } // mSphAttr + }; + + static dCcD_SrcSph core_sph_src = { + { + {0x0, {{0x0, 0x0, 0x0}, {0x2002, 0x3}, 0x0}}, // mObj + {dCcD_SE_NONE, 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 + }; + + static dCcD_SrcSph eff_at_sph_src = { + { + {0x0, {{AT_TYPE_CSTATUE_SWING, 0x4, 0x1f}, {0x0, 0x0}, 0x0}}, // mObj + {dCcD_SE_NONE, 0x0, 0xe, dCcD_MTRL_FIRE, 0x0}, // mGObjAt + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg + {0x0}, // mGObjCo + }, // mObjInf + { + {{0.0f, 0.0f, 0.0f}, 35.0f} // mSph + } // mSphAttr + }; + + static dCcD_SrcSph f_eff_at_sph_src = { + { + {0x0, {{AT_TYPE_CSTATUE_SWING, 0x2, 0xd}, {0x0, 0x0}, 0x0}}, // mObj + {dCcD_SE_NONE, 0x0, 0x0, dCcD_MTRL_FIRE, 0x0}, // mGObjAt + {dCcD_SE_NONE, 0x0, 0x1, 0x0, 0x2}, // mGObjTg + {0x0}, // mGObjCo + }, // mObjInf + { + {{0.0f, 0.0f, 0.0f}, 35.0f} // mSph + } // mSphAttr + }; + + static dCcD_SrcSph chain_at_sph_src = { + { + {0x0, {{AT_TYPE_CSTATUE_BOSS_SWING, 0x2, 0x1f}, {0x0, 0x0}, 0x0}}, // mObj + {dCcD_SE_NONE, 0x0, 0x2, 0x0, 0x0}, // mGObjAt + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg + {0x0}, // mGObjCo + }, // mObjInf + { + {{0.0f, 0.0f, 0.0f}, 90.0f} // mSph + } // mSphAttr + }; + + static dCcD_SrcSph chain_co_sph_src = { + { + {0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt + {dCcD_SE_METAL, 0x2, 0x0, 0x0, 0x3}, // mGObjTg + {0x0}, // mGObjCo + }, // mObjInf + { + {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph + } // mSphAttr + }; + + int phase_state = dComIfG_resLoad(&a_this->mPhase, "E_fm"); + if (phase_state == cPhs_COMPLEATE_e) { + OS_REPORT("E_FM PARAM %x\n", fopAcM_GetParam(i_this)); + + if (dComIfGs_isStageBossEnemy()) { + OS_REPORT("E_FM やられ後なので再セットしません\n"); + cXyz pos(-363.0f, 0.0f, 291.0f); + csXyz rot(0, 0, 0); + fopAcM_createWarpHole(&pos, &rot, fopAcM_GetRoomNo(i_this), 0, 0, 0xFF); + + if (!dComIfGs_isStageLife()) { + cXyz size(1.0f, 1.0f, 1.0f); + pos.set(209.0f, 0.0f, 861.0f); + fopAcM_createItemForBoss(&pos, fpcNm_ITEM_UTAWA_HEART, fopAcM_GetRoomNo(i_this), &i_this->shape_angle, &size, 0.0f, 0.0f, -1); + } + + g_env_light.mColpatWeather = 2; + g_env_light.wether_pat0 = 2; + g_env_light.wether_pat1 = 2; + dComIfGs_BossLife_public_Set(0); + return cPhs_ERROR_e; + } + + a_this->arg0 = fopAcM_GetParam(i_this); + if (a_this->arg0 == 0xFF) { + a_this->arg0 = 0; + } + + a_this->arg1 = (fopAcM_GetParam(i_this) & 0xFF00) >> 8; + if (a_this->arg1 == 0xFF) { + a_this->arg1 = 1; + } + + int arg2 = (fopAcM_GetParam(i_this) & 0xFF0000) >> 0x10; + a_this->arg3 = (fopAcM_GetParam(i_this) & 0xFF000000) >> 0x18; + + OS_REPORT("E_FM//////////////E_FM SET 1 !!\n"); + + if (!fopAcM_entrySolidHeap(i_this, useHeapInit, 0x4B000)) { + OS_REPORT("//////////////E_FM SET NON !!\n"); + return cPhs_ERROR_e; + } + + OS_REPORT("//////////////E_FM SET 2 !!\n"); + + if (!l_initHIO) { + a_this->mInitHIO = TRUE; + l_initHIO = TRUE; + l_HIO.no = mDoHIO_CREATE_CHILD("火魔人", &l_HIO); + } + + i_this->attention_info.flags = 4; + + fopAcM_SetMtx(i_this, a_this->mpFmModelMorf->getModel()->getBaseTRMtx()); + fopAcM_SetMin(i_this, -200.0f, -200.0f, -200.0f); + fopAcM_SetMax(i_this, 200.0f, 200.0f, 200.0f); + + a_this->mAcch.Set(fopAcM_GetPosition_p(i_this), fopAcM_GetOldPosition_p(i_this), i_this, 1, &a_this->mAcchCir, fopAcM_GetSpeed_p(i_this), NULL, NULL); + a_this->mAcchCir.SetWall(100.0f, 400.0f); + + i_this->health = 50; + i_this->field_0x560 = 50; + + a_this->field_0xa24.Init(0xFA, 0, i_this); + + for (int i = 0; i <= 7; i++) { + a_this->mCcSph[i].Set(cc_sph_src); + a_this->mCcSph[i].SetStts(&a_this->field_0xa24); + a_this->mCcSph[i].SetAtType(0x100); + a_this->mCcSph[i].SetAtMtrl(dCcD_MTRL_FIRE); + } + + a_this->mAtSph.Set(at_sph_src); + a_this->mAtSph.SetStts(&a_this->field_0xa24); + a_this->mAtSph.SetAtType(0x100); + a_this->mAtSph.SetAtMtrl(dCcD_MTRL_FIRE); + + a_this->field_0xa60.Init(0xA, 0, i_this); + + a_this->mCoreSph.Set(core_sph_src); + a_this->mCoreSph.SetStts(&a_this->field_0xa60); + + a_this->mEffAtSph.Set(eff_at_sph_src); + a_this->mEffAtSph.SetStts(&a_this->field_0xa24); + a_this->mEffAtSph.SetAtType(0x100); + a_this->mEffAtSph.SetAtMtrl(dCcD_MTRL_FIRE); + + for (int i = 0; i < 8; i++) { + a_this->mFEffAtSph[i].Set(f_eff_at_sph_src); + a_this->mFEffAtSph[i].SetStts(&a_this->field_0xa24); + a_this->mFEffAtSph[i].SetAtType(0x100); + a_this->mFEffAtSph[i].SetAtMtrl(dCcD_MTRL_FIRE); + } + + for (int i = 0; i < 4; i++) { + a_this->mChainAtSph[i].Set(chain_at_sph_src); + a_this->mChainAtSph[i].SetStts(&a_this->field_0xa24); + } + + a_this->mCounter = cM_rndF(65535.0f); + dKy_plight_set(&a_this->mPlight); + + i_this->attention_info.distances[fopAc_attn_BATTLE_e] = 75; + + a_this->mSound.init(&i_this->current.pos, &i_this->eyePos, &a_this->mChain[0].sound_pos, &a_this->mChain[1].sound_pos, &a_this->mChain[2].sound_pos, &a_this->mChain[3].sound_pos, 6, 1, 1, 1, 1, 1); + a_this->mAtInfo.mpSound = &a_this->mSound; + + if (cDmr_SkipInfo != 0) { + cDmr_SkipInfo = 0; + a_this->mAction = ACTION_NORMAL; + a_this->mMode = -10; + a_this->mTimers[0] = 20; + Z2GetAudioMgr()->bgmStart(Z2BGM_BOSSFIREMAN_0, 0, 0); + a_this->field_0x5c8 = 2; + a_this->mKankyoBlend = 0.0f; + a_this->field_0x792 = 1; + a_this->mpCoreBtk->setPlaySpeed(1.0f); + a_this->field_0x770 = 1; + a_this->field_0x1b080 = 1; + } else { + a_this->mAction = ACTION_START; + } + + a_this->field_0x794 = 1.0f; + a_this->field_0x778 = 1.0f; + + dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[254]); + dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[256]); + dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[669]); + dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[670]); + demo_stop = 0; + + daE_FM_Execute(a_this); + } + + return phase_state; +} + +/* 804F9B64-804F9E14 00AB64 02B0+00 1/1 0/0 0/0 .text __ct__10e_fm_classFv */ +e_fm_class::e_fm_class() {} /* 804FAD88-804FADA8 -00001 0020+00 1/0 0/0 0/0 .data l_daE_FM_Method */ static actor_method_class l_daE_FM_Method = { - (process_method_func)daE_FM_Create__FP10fopAc_ac_c, - (process_method_func)daE_FM_Delete__FP10e_fm_class, - (process_method_func)daE_FM_Execute__FP10e_fm_class, - (process_method_func)daE_FM_IsDelete__FP10e_fm_class, - (process_method_func)daE_FM_Draw__FP10e_fm_class, + (process_method_func)daE_FM_Create, + (process_method_func)daE_FM_Delete, + (process_method_func)daE_FM_Execute, + (process_method_func)daE_FM_IsDelete, + (process_method_func)daE_FM_Draw, }; /* 804FADA8-804FADD8 -00001 0030+00 0/0 0/0 1/0 .data g_profile_E_FM */ @@ -875,1718 +3787,4 @@ extern actor_process_profile_definition g_profile_E_FM = { fopAc_CULLBOX_CUSTOM_e, // cullType }; -/* 804FADD8-804FADE4 000488 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, -}; - -/* 804FADE4-804FADF0 000494 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, -}; - -/* 804FADF0-804FADFC 0004A0 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, -}; - -/* 804FADFC-804FAE08 0004AC 000C+00 4/4 0/0 0/0 .data __vt__8cM3dGSph */ -SECTION_DATA extern void* __vt__8cM3dGSph[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGSphFv, -}; - -/* 804FAE08-804FAE14 0004B8 000C+00 4/4 0/0 0/0 .data __vt__8cM3dGAab */ -SECTION_DATA extern void* __vt__8cM3dGAab[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGAabFv, -}; - -/* 804FAE14-804FAE38 0004C4 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_804FA480, - (void*)NULL, - (void*)NULL, - (void*)func_804FA478, -}; - -/* 804FAE38-804FAE44 0004E8 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, -}; - -/* 804FAE44-804FAE50 0004F4 000C+00 2/2 0/0 0/0 .data __vt__12daE_FM_HIO_c */ -SECTION_DATA extern void* __vt__12daE_FM_HIO_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12daE_FM_HIO_cFv, -}; - -/* 804EF0EC-804EF250 0000EC 0164+00 1/1 0/0 0/0 .text __ct__12daE_FM_HIO_cFv */ -daE_FM_HIO_c::daE_FM_HIO_c() { - // NONMATCHING -} - -/* 804EF250-804EF29C 000250 004C+00 2/2 0/0 0/0 .text s_fmobj_del__FPvPv */ -static void s_fmobj_del(void* param_0, void* param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FAE58-804FAE5C 000008 0001+03 4/4 0/0 0/0 .bss @1109 */ -static u8 lit_1109[1 + 3 /* padding */]; - -/* 804FAE5C-804FAE60 00000C 0001+03 0/0 0/0 0/0 .bss @1107 */ -#pragma push -#pragma force_active on -static u8 lit_1107[1 + 3 /* padding */]; -#pragma pop - -/* 804FAE60-804FAE64 000010 0001+03 0/0 0/0 0/0 .bss @1105 */ -#pragma push -#pragma force_active on -static u8 lit_1105[1 + 3 /* padding */]; -#pragma pop - -/* 804FAE64-804FAE68 000014 0001+03 0/0 0/0 0/0 .bss @1104 */ -#pragma push -#pragma force_active on -static u8 lit_1104[1 + 3 /* padding */]; -#pragma pop - -/* 804FAE68-804FAE6C 000018 0001+03 0/0 0/0 0/0 .bss @1099 */ -#pragma push -#pragma force_active on -static u8 lit_1099[1 + 3 /* padding */]; -#pragma pop - -/* 804FAE6C-804FAE70 00001C 0001+03 0/0 0/0 0/0 .bss @1097 */ -#pragma push -#pragma force_active on -static u8 lit_1097[1 + 3 /* padding */]; -#pragma pop - -/* 804FAE70-804FAE74 000020 0001+03 0/0 0/0 0/0 .bss @1095 */ -#pragma push -#pragma force_active on -static u8 lit_1095[1 + 3 /* padding */]; -#pragma pop - -/* 804FAE74-804FAE78 000024 0001+03 0/0 0/0 0/0 .bss @1094 */ -#pragma push -#pragma force_active on -static u8 lit_1094[1 + 3 /* padding */]; -#pragma pop - -/* 804FAE78-804FAE7C 000028 0001+03 0/0 0/0 0/0 .bss @1057 */ -#pragma push -#pragma force_active on -static u8 lit_1057[1 + 3 /* padding */]; -#pragma pop - -/* 804FAE7C-804FAE80 00002C 0001+03 0/0 0/0 0/0 .bss @1055 */ -#pragma push -#pragma force_active on -static u8 lit_1055[1 + 3 /* padding */]; -#pragma pop - -/* 804FAE80-804FAE84 000030 0001+03 0/0 0/0 0/0 .bss @1053 */ -#pragma push -#pragma force_active on -static u8 lit_1053[1 + 3 /* padding */]; -#pragma pop - -/* 804FAE84-804FAE88 000034 0001+03 0/0 0/0 0/0 .bss @1052 */ -#pragma push -#pragma force_active on -static u8 lit_1052[1 + 3 /* padding */]; -#pragma pop - -/* 804FAE88-804FAE8C 000038 0001+03 0/0 0/0 0/0 .bss @1014 */ -#pragma push -#pragma force_active on -static u8 lit_1014[1 + 3 /* padding */]; -#pragma pop - -/* 804FAE8C-804FAE90 00003C 0001+03 0/0 0/0 0/0 .bss @1012 */ -#pragma push -#pragma force_active on -static u8 lit_1012[1 + 3 /* padding */]; -#pragma pop - -/* 804FAE90-804FAE94 000040 0001+03 0/0 0/0 0/0 .bss @1010 */ -#pragma push -#pragma force_active on -static u8 lit_1010[1 + 3 /* padding */]; -#pragma pop - -/* 804FAE94-804FAE98 -00001 0004+00 1/2 0/0 0/0 .bss None */ -/* 804FAE94 0001+00 data_804FAE94 @1009 */ -/* 804FAE95 0003+00 data_804FAE95 None */ -static u8 struct_804FAE94[4]; - -/* 804FAE98-804FAEA4 000048 000C+00 0/1 0/0 0/0 .bss @3772 */ -#pragma push -#pragma force_active on -static u8 lit_3772[12]; -#pragma pop - -/* 804FAEA4-804FAF54 000054 00B0+00 14/16 0/0 0/0 .bss l_HIO */ -static u8 l_HIO[176]; - -/* 804FAF54-804FAF60 000104 000C+00 0/1 0/0 0/0 .bss @3819 */ -#pragma push -#pragma force_active on -static u8 lit_3819[12]; -#pragma pop - -/* 804FAF60-804FAF6C 000110 000C+00 0/3 0/0 0/0 .bss h_pos */ -#pragma push -#pragma force_active on -static u8 h_pos[12]; -#pragma pop - -/* 804FAF6C-804FAF70 00011C 0004+00 0/2 0/0 0/0 .bss h_range */ -#pragma push -#pragma force_active on -static u8 h_range[4]; -#pragma pop - -/* 804FAF70-804FAF78 000120 0004+04 0/2 0/0 0/0 .bss h_power */ -#pragma push -#pragma force_active on -static u8 h_power[4 + 4 /* padding */]; -#pragma pop - -/* 804EF29C-804EF308 00029C 006C+00 1/1 0/0 0/0 .text s_hasira_sub__FPvPv */ -static void s_hasira_sub(void* param_0, void* param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FA724-804FA72C 000068 0004+04 1/5 0/0 0/0 .rodata @3846 */ -SECTION_RODATA static f32 const lit_3846[1 + 1 /* padding */] = { - 500.0f, - /* padding */ - 0.0f, -}; -COMPILER_STRIP_GATE(0x804FA724, &lit_3846); - -/* 804EF308-804EF3CC 000308 00C4+00 1/1 0/0 0/0 .text s_hasira_poscheck__FPvPv */ -static void s_hasira_poscheck(void* param_0, void* param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FA72C-804FA734 000070 0008+00 0/5 0/0 0/0 .rodata @3927 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_3927[8] = { - 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x804FA72C, &lit_3927); -#pragma pop - -/* 804FA734-804FA73C 000078 0008+00 0/5 0/0 0/0 .rodata @3928 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_3928[8] = { - 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x804FA734, &lit_3928); -#pragma pop - -/* 804FA73C-804FA744 000080 0008+00 0/5 0/0 0/0 .rodata @3929 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_3929[8] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x804FA73C, &lit_3929); -#pragma pop - -/* 804FAF78-804FAF7C 000128 0004+00 2/2 0/0 0/0 .bss fire_range */ -static u8 fire_range[4]; - -/* 804EF3CC-804EF63C 0003CC 0270+00 1/1 0/0 0/0 .text s_hasira_eff_sub__FPvPv */ -static void s_hasira_eff_sub(void* param_0, void* param_1) { - // NONMATCHING -} - -/* 804EF63C-804EF678 00063C 003C+00 2/2 0/0 0/0 .text __dt__5csXyzFv */ -// csXyz::~csXyz() { -extern "C" void __dt__5csXyzFv() { - // NONMATCHING -} - -/* 804EF678-804EF6B4 000678 003C+00 4/4 0/0 0/0 .text __dt__4cXyzFv */ -// cXyz::~cXyz() { -extern "C" void __dt__4cXyzFv() { - // NONMATCHING -} - -/* 804EF6B4-804EF710 0006B4 005C+00 6/6 0/0 0/0 .text hasira_hahen_hit__FP4cXyzffSc */ -static void hasira_hahen_hit(cXyz* param_0, f32 param_1, f32 param_2, s8 param_3) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FA744-804FA748 000088 0004+00 1/10 0/0 0/0 .rodata @3964 */ -SECTION_RODATA static f32 const lit_3964 = -1.0f; -COMPILER_STRIP_GATE(0x804FA744, &lit_3964); - -/* 804EF710-804EF808 000710 00F8+00 5/5 0/0 0/0 .text carry_off__FP10e_fm_classi */ -static void carry_off(e_fm_class* param_0, int param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FA948-804FA948 00028C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_804FA948 = "E_fm"; -#pragma pop - -/* 804EF808-804EF8B8 000808 00B0+00 13/13 0/0 0/0 .text anm_init__FP10e_fm_classifUcf */ -static void anm_init(e_fm_class* param_0, int param_1, f32 param_2, u8 param_3, f32 param_4) { - // NONMATCHING -} - -/* 804EF8B8-804EF99C 0008B8 00E4+00 1/1 0/0 0/0 .text nodeCallBack__FP8J3DJointi */ -static void nodeCallBack(J3DJoint* param_0, int param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FA748-804FA74C 00008C 0004+00 0/2 0/0 0/0 .rodata @4059 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_4059 = 0x3B03126F; -COMPILER_STRIP_GATE(0x804FA748, &lit_4059); -#pragma pop - -/* 804FA74C-804FA750 000090 0004+00 0/1 0/0 0/0 .rodata @4060 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4060 = 3.0f / 5.0f; -COMPILER_STRIP_GATE(0x804FA74C, &lit_4060); -#pragma pop - -/* 804FA750-804FA754 000094 0004+00 0/2 0/0 0/0 .rodata @4061 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4061 = 0.75f; -COMPILER_STRIP_GATE(0x804FA750, &lit_4061); -#pragma pop - -/* 804FA754-804FA758 000098 0004+00 0/2 0/0 0/0 .rodata @4062 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4062 = 8.0f; -COMPILER_STRIP_GATE(0x804FA754, &lit_4062); -#pragma pop - -/* 804FA758-804FA75C 00009C 0004+00 0/1 0/0 0/0 .rodata @4063 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_4063 = 0x3E2AAAC1; -COMPILER_STRIP_GATE(0x804FA758, &lit_4063); -#pragma pop - -/* 804FA75C-804FA764 0000A0 0008+00 0/5 0/0 0/0 .rodata @4065 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4065[8] = { - 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x804FA75C, &lit_4065); -#pragma pop - -/* 804EF99C-804EFC3C 00099C 02A0+00 1/1 0/0 0/0 .text chain_draw__FP10e_fm_classP7chain_si */ -static void chain_draw(e_fm_class* param_0, chain_s* param_1, int param_2) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FA764-804FA768 0000A8 0004+00 0/1 0/0 0/0 .rodata @4193 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4193 = 255.0f; -COMPILER_STRIP_GATE(0x804FA764, &lit_4193); -#pragma pop - -/* 804FA768-804FA76C 0000AC 0004+00 0/10 0/0 0/0 .rodata @4194 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4194 = 100.0f; -COMPILER_STRIP_GATE(0x804FA768, &lit_4194); -#pragma pop - -/* 804FA76C-804FA770 0000B0 0004+00 0/1 0/0 0/0 .rodata @4195 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4195 = 2500.0f; -COMPILER_STRIP_GATE(0x804FA76C, &lit_4195); -#pragma pop - -/* 804EFC3C-804EFF68 000C3C 032C+00 1/0 0/0 0/0 .text daE_FM_Draw__FP10e_fm_class */ -static void daE_FM_Draw(e_fm_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FA770-804FA774 0000B4 0004+00 1/9 0/0 0/0 .rodata @4237 */ -SECTION_RODATA static f32 const lit_4237 = 30.0f; -COMPILER_STRIP_GATE(0x804FA770, &lit_4237); - -/* 804EFF68-804F005C 000F68 00F4+00 1/1 0/0 0/0 .text other_bg_check__FP10e_fm_classP10fopAc_ac_c - */ -static void other_bg_check(e_fm_class* param_0, fopAc_ac_c* param_1) { - // NONMATCHING -} - -/* 804F005C-804F00E4 00105C 0088+00 2/2 0/0 0/0 .text pl_check__FP10e_fm_classfs */ -static void pl_check(e_fm_class* param_0, f32 param_1, s16 param_2) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FA774-804FA778 0000B8 0004+00 0/6 0/0 0/0 .rodata @4355 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4355 = 15.0f; -COMPILER_STRIP_GATE(0x804FA774, &lit_4355); -#pragma pop - -/* 804FA778-804FA77C 0000BC 0004+00 0/8 0/0 0/0 .rodata @4356 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4356 = 50.0f; -COMPILER_STRIP_GATE(0x804FA778, &lit_4356); -#pragma pop - -/* 804F00E4-804F0530 0010E4 044C+00 1/1 0/0 0/0 .text e_fm_normal__FP10e_fm_class */ -static void e_fm_normal(e_fm_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FA77C-804FA780 0000C0 0004+00 0/10 0/0 0/0 .rodata @4486 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4486 = 10.0f; -COMPILER_STRIP_GATE(0x804FA77C, &lit_4486); -#pragma pop - -/* 804FA780-804FA784 0000C4 0004+00 0/7 0/0 0/0 .rodata @4487 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4487 = 0.5f; -COMPILER_STRIP_GATE(0x804FA780, &lit_4487); -#pragma pop - -/* 804FA784-804FA788 0000C8 0004+00 0/1 0/0 0/0 .rodata @4488 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4488 = 280.0f; -COMPILER_STRIP_GATE(0x804FA784, &lit_4488); -#pragma pop - -/* 804F0530-804F0A78 001530 0548+00 1/1 0/0 0/0 .text e_fm_fight_run__FP10e_fm_class */ -static void e_fm_fight_run(e_fm_class* param_0) { - // NONMATCHING -} - -/* 804F0A78-804F0D3C 001A78 02C4+00 1/1 0/0 0/0 .text e_fm_n_fight__FP10e_fm_class */ -static void e_fm_n_fight(e_fm_class* param_0) { - // NONMATCHING -} - -/* 804F0D3C-804F0F80 001D3C 0244+00 1/1 0/0 0/0 .text tame_eff_set__FP10e_fm_class */ -static void tame_eff_set(e_fm_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FA788-804FA78C 0000CC 0004+00 0/2 0/0 0/0 .rodata @4705 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4705 = 3.0f / 10.0f; -COMPILER_STRIP_GATE(0x804FA788, &lit_4705); -#pragma pop - -/* 804F0F80-804F11D8 001F80 0258+00 1/1 0/0 0/0 .text e_fm_f_fight__FP10e_fm_class */ -static void e_fm_f_fight(e_fm_class* param_0) { - // NONMATCHING -} - -/* 804F11D8-804F13FC 0021D8 0224+00 2/2 0/0 0/0 .text animal_eff_set__FP10e_fm_classs */ -static void animal_eff_set(e_fm_class* param_0, s16 param_1) { - // NONMATCHING -} - -/* 804F13FC-804F14C8 0023FC 00CC+00 1/1 0/0 0/0 .text e_fm_animal__FP10e_fm_class */ -static void e_fm_animal(e_fm_class* param_0) { - // NONMATCHING -} - -/* 804F14C8-804F16C4 0024C8 01FC+00 1/1 0/0 0/0 .text e_fm_fire__FP10e_fm_class */ -static void e_fm_fire(e_fm_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FA78C-804FA790 0000D0 0004+00 0/1 0/0 0/0 .rodata @4917 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4917 = 7.0f / 10.0f; -COMPILER_STRIP_GATE(0x804FA78C, &lit_4917); -#pragma pop - -/* 804F16C4-804F1918 0026C4 0254+00 1/1 0/0 0/0 .text e_fm_stop__FP10e_fm_class */ -static void e_fm_stop(e_fm_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FA790-804FA794 0000D4 0004+00 0/1 0/0 0/0 .rodata @5129 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5129 = 10000.0f; -COMPILER_STRIP_GATE(0x804FA790, &lit_5129); -#pragma pop - -/* 804FA794-804FA798 0000D8 0004+00 0/1 0/0 0/0 .rodata @5130 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5130 = 250.0f; -COMPILER_STRIP_GATE(0x804FA794, &lit_5130); -#pragma pop - -/* 804F1918-804F20F4 002918 07DC+00 1/1 0/0 0/0 .text e_fm_damage_run__FP10e_fm_class */ -static void e_fm_damage_run(e_fm_class* param_0) { - // NONMATCHING -} - -/* 804F20F4-804F21F0 0030F4 00FC+00 1/1 0/0 0/0 .text cam_3d_morf__FP10e_fm_classf */ -static void cam_3d_morf(e_fm_class* param_0, f32 param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FA798-804FA79C 0000DC 0004+00 0/1 0/0 0/0 .rodata @5881 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5881 = 55.0f; -COMPILER_STRIP_GATE(0x804FA798, &lit_5881); -#pragma pop - -/* 804FA79C-804FA7A0 0000E0 0004+00 0/3 0/0 0/0 .rodata @5882 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5882 = -100.0f; -COMPILER_STRIP_GATE(0x804FA79C, &lit_5882); -#pragma pop - -/* 804FA7A0-804FA7A4 0000E4 0004+00 0/2 0/0 0/0 .rodata @5883 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5883 = -200.0f; -COMPILER_STRIP_GATE(0x804FA7A0, &lit_5883); -#pragma pop - -/* 804FA7A4-804FA7A8 0000E8 0004+00 0/5 0/0 0/0 .rodata @5884 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5884 = 200.0f; -COMPILER_STRIP_GATE(0x804FA7A4, &lit_5884); -#pragma pop - -/* 804FA7A8-804FA7AC 0000EC 0004+00 0/1 0/0 0/0 .rodata @5885 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5885 = 700.0f; -COMPILER_STRIP_GATE(0x804FA7A8, &lit_5885); -#pragma pop - -/* 804FA7AC-804FA7B0 0000F0 0004+00 0/2 0/0 0/0 .rodata @5886 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5886 = 400.0f; -COMPILER_STRIP_GATE(0x804FA7AC, &lit_5886); -#pragma pop - -/* 804FA7B0-804FA7B4 0000F4 0004+00 0/2 0/0 0/0 .rodata @5887 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5887 = -400.0f; -COMPILER_STRIP_GATE(0x804FA7B0, &lit_5887); -#pragma pop - -/* 804FA7B4-804FA7B8 0000F8 0004+00 0/1 0/0 0/0 .rodata @5888 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5888 = -550.0f; -COMPILER_STRIP_GATE(0x804FA7B4, &lit_5888); -#pragma pop - -/* 804FA7B8-804FA7BC 0000FC 0004+00 0/2 0/0 0/0 .rodata @5889 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5889 = 800.0f; -COMPILER_STRIP_GATE(0x804FA7B8, &lit_5889); -#pragma pop - -/* 804FA7BC-804FA7C0 000100 0004+00 0/1 0/0 0/0 .rodata @5890 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5890 = 176.0f; -COMPILER_STRIP_GATE(0x804FA7BC, &lit_5890); -#pragma pop - -/* 804FA7C0-804FA7C4 000104 0004+00 0/1 0/0 0/0 .rodata @5891 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5891 = 1782.0f; -COMPILER_STRIP_GATE(0x804FA7C0, &lit_5891); -#pragma pop - -/* 804FA7C4-804FA7C8 000108 0004+00 0/1 0/0 0/0 .rodata @5892 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5892 = 217.0f; -COMPILER_STRIP_GATE(0x804FA7C4, &lit_5892); -#pragma pop - -/* 804FA7C8-804FA7CC 00010C 0004+00 0/1 0/0 0/0 .rodata @5893 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5893 = 1968.0f; -COMPILER_STRIP_GATE(0x804FA7C8, &lit_5893); -#pragma pop - -/* 804FA7CC-804FA7D0 000110 0004+00 0/1 0/0 0/0 .rodata @5894 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5894 = 671.0f; -COMPILER_STRIP_GATE(0x804FA7CC, &lit_5894); -#pragma pop - -/* 804FA7D0-804FA7D4 000114 0004+00 0/1 0/0 0/0 .rodata @5895 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5895 = 1664.0f; -COMPILER_STRIP_GATE(0x804FA7D0, &lit_5895); -#pragma pop - -/* 804FA7D4-804FA7D8 000118 0004+00 0/1 0/0 0/0 .rodata @5896 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5896 = 752.0f; -COMPILER_STRIP_GATE(0x804FA7D4, &lit_5896); -#pragma pop - -/* 804FA7D8-804FA7DC 00011C 0004+00 0/1 0/0 0/0 .rodata @5897 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5897 = 1836.0f; -COMPILER_STRIP_GATE(0x804FA7D8, &lit_5897); -#pragma pop - -/* 804FA7DC-804FA7E0 000120 0004+00 0/3 0/0 0/0 .rodata @5898 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5898 = 1.0f / 10.0f; -COMPILER_STRIP_GATE(0x804FA7DC, &lit_5898); -#pragma pop - -/* 804FA7E0-804FA7E4 000124 0004+00 0/1 0/0 0/0 .rodata @5899 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5899 = 1.0f / 125.0f; -COMPILER_STRIP_GATE(0x804FA7E0, &lit_5899); -#pragma pop - -/* 804FA7E4-804FA7E8 000128 0004+00 0/1 0/0 0/0 .rodata @5900 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_5900 = 0x3951B717; -COMPILER_STRIP_GATE(0x804FA7E4, &lit_5900); -#pragma pop - -/* 804FA7E8-804FA7EC 00012C 0004+00 0/1 0/0 0/0 .rodata @5901 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5901 = 140.0f; -COMPILER_STRIP_GATE(0x804FA7E8, &lit_5901); -#pragma pop - -/* 804FA7EC-804FA7F0 000130 0004+00 0/1 0/0 0/0 .rodata @5902 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5902 = 669.0f; -COMPILER_STRIP_GATE(0x804FA7EC, &lit_5902); -#pragma pop - -/* 804FA7F0-804FA7F4 000134 0004+00 0/1 0/0 0/0 .rodata @5903 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5903 = 163.0f; -COMPILER_STRIP_GATE(0x804FA7F0, &lit_5903); -#pragma pop - -/* 804FA7F4-804FA7F8 000138 0004+00 0/1 0/0 0/0 .rodata @5904 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5904 = 857.0f; -COMPILER_STRIP_GATE(0x804FA7F4, &lit_5904); -#pragma pop - -/* 804FA7F8-804FA7FC 00013C 0004+00 0/1 0/0 0/0 .rodata @5905 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5905 = 211.0f; -COMPILER_STRIP_GATE(0x804FA7F8, &lit_5905); -#pragma pop - -/* 804FA7FC-804FA800 000140 0004+00 0/1 0/0 0/0 .rodata @5906 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5906 = 673.0f; -COMPILER_STRIP_GATE(0x804FA7FC, &lit_5906); -#pragma pop - -/* 804FA800-804FA804 000144 0004+00 0/1 0/0 0/0 .rodata @5907 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5907 = 1.0f / 100.0f; -COMPILER_STRIP_GATE(0x804FA800, &lit_5907); -#pragma pop - -/* 804FA804-804FA808 000148 0004+00 0/1 0/0 0/0 .rodata @5908 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_5908 = 0x3A03126F; -COMPILER_STRIP_GATE(0x804FA804, &lit_5908); -#pragma pop - -/* 804FA808-804FA80C 00014C 0004+00 0/1 0/0 0/0 .rodata @5909 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5909 = 14.0f / 5.0f; -COMPILER_STRIP_GATE(0x804FA808, &lit_5909); -#pragma pop - -/* 804FA80C-804FA810 000150 0004+00 0/1 0/0 0/0 .rodata @5910 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5910 = 496.0f; -COMPILER_STRIP_GATE(0x804FA80C, &lit_5910); -#pragma pop - -/* 804FA810-804FA814 000154 0004+00 0/1 0/0 0/0 .rodata @5911 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5911 = 162.0f; -COMPILER_STRIP_GATE(0x804FA810, &lit_5911); -#pragma pop - -/* 804FA814-804FA818 000158 0004+00 0/1 0/0 0/0 .rodata @5912 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5912 = 97.0f / 10.0f; -COMPILER_STRIP_GATE(0x804FA814, &lit_5912); -#pragma pop - -/* 804FA818-804FA81C 00015C 0004+00 0/1 0/0 0/0 .rodata @5913 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5913 = 362.0f; -COMPILER_STRIP_GATE(0x804FA818, &lit_5913); -#pragma pop - -/* 804FA81C-804FA820 000160 0004+00 0/1 0/0 0/0 .rodata @5914 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5914 = 296.0f; -COMPILER_STRIP_GATE(0x804FA81C, &lit_5914); -#pragma pop - -/* 804FA820-804FA824 000164 0004+00 0/3 0/0 0/0 .rodata @5915 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5915 = 1.0f / 20.0f; -COMPILER_STRIP_GATE(0x804FA820, &lit_5915); -#pragma pop - -/* 804FA824-804FA828 000168 0004+00 0/1 0/0 0/0 .rodata @5916 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5916 = 900.0f; -COMPILER_STRIP_GATE(0x804FA824, &lit_5916); -#pragma pop - -/* 804FA828-804FA82C 00016C 0004+00 0/2 0/0 0/0 .rodata @5917 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5917 = 1.0f / 5.0f; -COMPILER_STRIP_GATE(0x804FA828, &lit_5917); -#pragma pop - -/* 804FA82C-804FA830 000170 0004+00 0/1 0/0 0/0 .rodata @5918 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5918 = 0.125f; -COMPILER_STRIP_GATE(0x804FA82C, &lit_5918); -#pragma pop - -/* 804FA830-804FA834 000174 0004+00 0/1 0/0 0/0 .rodata @5919 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5919 = 12.5f; -COMPILER_STRIP_GATE(0x804FA830, &lit_5919); -#pragma pop - -/* 804FA834-804FA838 000178 0004+00 0/3 0/0 0/0 .rodata @5920 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5920 = 1.0f / 50.0f; -COMPILER_STRIP_GATE(0x804FA834, &lit_5920); -#pragma pop - -/* 804FA838-804FA83C 00017C 0004+00 0/1 0/0 0/0 .rodata @5921 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5921 = 370.0f; -COMPILER_STRIP_GATE(0x804FA838, &lit_5921); -#pragma pop - -/* 804FA83C-804FA840 000180 0004+00 0/1 0/0 0/0 .rodata @5922 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5922 = 85.0f; -COMPILER_STRIP_GATE(0x804FA83C, &lit_5922); -#pragma pop - -/* 804FA840-804FA844 000184 0004+00 0/1 0/0 0/0 .rodata @5923 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5923 = 207.0f; -COMPILER_STRIP_GATE(0x804FA840, &lit_5923); -#pragma pop - -/* 804FA844-804FA848 000188 0004+00 0/1 0/0 0/0 .rodata @5924 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5924 = 615.0f; -COMPILER_STRIP_GATE(0x804FA844, &lit_5924); -#pragma pop - -/* 804FA848-804FA84C 00018C 0004+00 0/1 0/0 0/0 .rodata @5925 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5925 = -343.0f; -COMPILER_STRIP_GATE(0x804FA848, &lit_5925); -#pragma pop - -/* 804FA84C-804FA850 000190 0004+00 0/1 0/0 0/0 .rodata @5926 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5926 = 813.0f; -COMPILER_STRIP_GATE(0x804FA84C, &lit_5926); -#pragma pop - -/* 804FA850-804FA854 000194 0004+00 0/1 0/0 0/0 .rodata @5927 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5927 = 942.0f; -COMPILER_STRIP_GATE(0x804FA850, &lit_5927); -#pragma pop - -/* 804FA854-804FA858 000198 0004+00 0/1 0/0 0/0 .rodata @5928 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5928 = -1001.0f; -COMPILER_STRIP_GATE(0x804FA854, &lit_5928); -#pragma pop - -/* 804FA858-804FA85C 00019C 0004+00 0/1 0/0 0/0 .rodata @5929 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5929 = 223.0f; -COMPILER_STRIP_GATE(0x804FA858, &lit_5929); -#pragma pop - -/* 804FA85C-804FA860 0001A0 0004+00 0/1 0/0 0/0 .rodata @5930 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5930 = 474.0f; -COMPILER_STRIP_GATE(0x804FA85C, &lit_5930); -#pragma pop - -/* 804FA860-804FA864 0001A4 0004+00 0/1 0/0 0/0 .rodata @5931 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5931 = 636.0f; -COMPILER_STRIP_GATE(0x804FA860, &lit_5931); -#pragma pop - -/* 804FA864-804FA868 0001A8 0004+00 0/1 0/0 0/0 .rodata @5932 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5932 = 802.0f; -COMPILER_STRIP_GATE(0x804FA864, &lit_5932); -#pragma pop - -/* 804FA868-804FA86C 0001AC 0004+00 0/1 0/0 0/0 .rodata @5933 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5933 = -630.0f; -COMPILER_STRIP_GATE(0x804FA868, &lit_5933); -#pragma pop - -/* 804FA86C-804FA870 0001B0 0004+00 0/2 0/0 0/0 .rodata @5934 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5934 = 3.0f / 20.0f; -COMPILER_STRIP_GATE(0x804FA86C, &lit_5934); -#pragma pop - -/* 804FA870-804FA874 0001B4 0004+00 0/1 0/0 0/0 .rodata @5935 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5935 = 70.0f; -COMPILER_STRIP_GATE(0x804FA870, &lit_5935); -#pragma pop - -/* 804FA874-804FA878 0001B8 0004+00 0/1 0/0 0/0 .rodata @5936 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5936 = 210.0f; -COMPILER_STRIP_GATE(0x804FA874, &lit_5936); -#pragma pop - -/* 804FA878-804FA87C 0001BC 0004+00 0/2 0/0 0/0 .rodata @5937 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5937 = -363.0f; -COMPILER_STRIP_GATE(0x804FA878, &lit_5937); -#pragma pop - -/* 804FA87C-804FA880 0001C0 0004+00 0/2 0/0 0/0 .rodata @5938 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5938 = 291.0f; -COMPILER_STRIP_GATE(0x804FA87C, &lit_5938); -#pragma pop - -/* 804FA880-804FA884 0001C4 0004+00 0/1 0/0 0/0 .rodata @5939 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5939 = 7.5f; -COMPILER_STRIP_GATE(0x804FA880, &lit_5939); -#pragma pop - -/* 804FAF7C-804FAF80 00012C 0004+00 2/3 0/0 0/0 .bss demo_stop */ -static u8 demo_stop[4]; - -/* 804F21F0-804F3E74 0031F0 1C84+00 1/1 0/0 0/0 .text demo_camera__FP10e_fm_class */ -static void demo_camera(e_fm_class* param_0) { - // NONMATCHING -} - -/* 804F3E74-804F448C 004E74 0618+00 1/1 0/0 0/0 .text e_fm_down__FP10e_fm_class */ -static void e_fm_down(e_fm_class* param_0) { - // NONMATCHING -} - -/* 804F448C-804F4740 00548C 02B4+00 1/1 0/0 0/0 .text e_fm_a_down__FP10e_fm_class */ -static void e_fm_a_down(e_fm_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FA884-804FA888 0001C8 0004+00 0/1 0/0 0/0 .rodata @6312 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6312 = -500.0f; -COMPILER_STRIP_GATE(0x804FA884, &lit_6312); -#pragma pop - -/* 804FA888-804FA88C 0001CC 0004+00 0/1 0/0 0/0 .rodata @6313 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6313 = -800.0f; -COMPILER_STRIP_GATE(0x804FA888, &lit_6313); -#pragma pop - -/* 804FA88C-804FA890 0001D0 0004+00 0/1 0/0 0/0 .rodata @6314 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6314 = 677.0f; -COMPILER_STRIP_GATE(0x804FA88C, &lit_6314); -#pragma pop - -/* 804FA890-804FA894 0001D4 0004+00 0/1 0/0 0/0 .rodata @6315 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6315 = -226.0f; -COMPILER_STRIP_GATE(0x804FA890, &lit_6315); -#pragma pop - -/* 804FA894-804FA898 0001D8 0004+00 0/1 0/0 0/0 .rodata @6316 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6316 = -677.0f; -COMPILER_STRIP_GATE(0x804FA894, &lit_6316); -#pragma pop - -/* 804FA898-804FA89C 0001DC 0004+00 0/2 0/0 0/0 .rodata @6317 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6317 = 80.0f; -COMPILER_STRIP_GATE(0x804FA898, &lit_6317); -#pragma pop - -/* 804F4740-804F4BDC 005740 049C+00 1/1 0/0 0/0 .text e_fm_start__FP10e_fm_class */ -static void e_fm_start(e_fm_class* param_0) { - // NONMATCHING -} - -/* 804F4BDC-804F4D74 005BDC 0198+00 1/1 0/0 0/0 .text e_fm_end__FP10e_fm_class */ -static void e_fm_end(e_fm_class* param_0) { - // NONMATCHING -} - -/* 804F4D74-804F5148 005D74 03D4+00 1/1 0/0 0/0 .text damage_check__FP10e_fm_class */ -static void damage_check(e_fm_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FA89C-804FA8A0 0001E0 0004+00 0/1 0/0 0/0 .rodata @6637 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6637 = -20.0f; -COMPILER_STRIP_GATE(0x804FA89C, &lit_6637); -#pragma pop - -/* 804FA8A0-804FA8A4 0001E4 0004+00 0/1 0/0 0/0 .rodata @6638 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6638 = 73.0f / 100.0f; -COMPILER_STRIP_GATE(0x804FA8A0, &lit_6638); -#pragma pop - -/* 804FA8A4-804FA8A8 0001E8 0004+00 0/1 0/0 0/0 .rodata @6639 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6639 = 3.0f / 25.0f; -COMPILER_STRIP_GATE(0x804FA8A4, &lit_6639); -#pragma pop - -/* 804FA8A8-804FA8AC 0001EC 0004+00 0/1 0/0 0/0 .rodata @6640 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6640 = 33.0f / 50.0f; -COMPILER_STRIP_GATE(0x804FA8A8, &lit_6640); -#pragma pop - -/* 804FA8AC-804FA8B0 0001F0 0004+00 0/1 0/0 0/0 .rodata @6641 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6641 = 17.0f / 100.0f; -COMPILER_STRIP_GATE(0x804FA8AC, &lit_6641); -#pragma pop - -/* 804FA8B0-804FA8B4 0001F4 0004+00 0/1 0/0 0/0 .rodata @6642 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6642 = 110.0f; -COMPILER_STRIP_GATE(0x804FA8B0, &lit_6642); -#pragma pop - -/* 804FA8B4-804FA8B8 0001F8 0004+00 0/1 0/0 0/0 .rodata @6643 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6643 = 1024.0f; -COMPILER_STRIP_GATE(0x804FA8B4, &lit_6643); -#pragma pop - -/* 804FA8B8-804FA8BC 0001FC 0004+00 0/1 0/0 0/0 .rodata @6644 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6644 = 16384.0f; -COMPILER_STRIP_GATE(0x804FA8B8, &lit_6644); -#pragma pop - -/* 804FA8BC-804FA8C0 000200 0004+00 0/1 0/0 0/0 .rodata @6645 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6645 = 2048.0f; -COMPILER_STRIP_GATE(0x804FA8BC, &lit_6645); -#pragma pop - -/* 804F5148-804F5990 006148 0848+00 1/1 0/0 0/0 .text chain_control1__FP10e_fm_classP7chain_si */ -static void chain_control1(e_fm_class* param_0, chain_s* param_1, int param_2) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FA8C0-804FA8C4 000204 0004+00 0/1 0/0 0/0 .rodata @6749 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6749 = -10000.0f; -COMPILER_STRIP_GATE(0x804FA8C0, &lit_6749); -#pragma pop - -/* 804FA8C4-804FA8C8 000208 0004+00 0/1 0/0 0/0 .rodata @6750 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6750 = -80.0f; -COMPILER_STRIP_GATE(0x804FA8C4, &lit_6750); -#pragma pop - -/* 804FA8C8-804FA8CC 00020C 0004+00 0/2 0/0 0/0 .rodata @6751 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6751 = 1.0f / 40.0f; -COMPILER_STRIP_GATE(0x804FA8C8, &lit_6751); -#pragma pop - -/* 804FA8CC-804FA8D0 000210 0004+00 0/1 0/0 0/0 .rodata @6752 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6752 = 18.0f; -COMPILER_STRIP_GATE(0x804FA8CC, &lit_6752); -#pragma pop - -/* 804FA8D0-804FA8D4 000214 0004+00 0/1 0/0 0/0 .rodata @6753 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6753 = 48.0f; -COMPILER_STRIP_GATE(0x804FA8D0, &lit_6753); -#pragma pop - -/* 804FA8D4-804FA8D8 000218 0004+00 0/1 0/0 0/0 .rodata @6754 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6754 = 7.0f; -COMPILER_STRIP_GATE(0x804FA8D4, &lit_6754); -#pragma pop - -/* 804FA8D8-804FA8DC 00021C 0004+00 0/3 0/0 0/0 .rodata @6755 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6755 = -5.0f; -COMPILER_STRIP_GATE(0x804FA8D8, &lit_6755); -#pragma pop - -/* 804FA8DC-804FA8E0 000220 0004+00 0/1 0/0 0/0 .rodata @6756 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6756 = -10.0f; -COMPILER_STRIP_GATE(0x804FA8DC, &lit_6756); -#pragma pop - -/* 804F5990-804F5EF4 006990 0564+00 1/1 0/0 0/0 .text chain_control2__FP10e_fm_classP7chain_si */ -static void chain_control2(e_fm_class* param_0, chain_s* param_1, int param_2) { - // NONMATCHING -} - -/* 804F5EF4-804F64A8 006EF4 05B4+00 1/1 0/0 0/0 .text chain_control3__FP10e_fm_classP7chain_si */ -static void chain_control3(e_fm_class* param_0, chain_s* param_1, int param_2) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FAF80-804FAF84 000130 0004+00 2/2 0/0 0/0 .bss ba_count */ -static u8 ba_count[4]; - -/* 804F64A8-804F6500 0074A8 0058+00 1/1 0/0 0/0 .text s_ba_sub__FPvPv */ -static void s_ba_sub(void* param_0, void* param_1) { - // NONMATCHING -} - -/* 804F6500-804F6BD0 007500 06D0+00 2/1 0/0 0/0 .text action__FP10e_fm_class */ -static void action(e_fm_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FA8E0-804FA8E4 000224 0004+00 0/0 0/0 0/0 .rodata @7066 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7066 = -300.0f; -COMPILER_STRIP_GATE(0x804FA8E0, &lit_7066); -#pragma pop - -/* 804FA8E4-804FA8E8 000228 0004+00 0/2 0/0 0/0 .rodata @7269 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7269 = 13.0f / 20.0f; -COMPILER_STRIP_GATE(0x804FA8E4, &lit_7269); -#pragma pop - -/* 804FA8E8-804FA8EC 00022C 0004+00 0/1 0/0 0/0 .rodata @7270 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7270 = 2.0f / 25.0f; -COMPILER_STRIP_GATE(0x804FA8E8, &lit_7270); -#pragma pop - -/* 804FA8EC-804FA8F0 000230 0004+00 0/1 0/0 0/0 .rodata @7271 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7271 = 10.5f; -COMPILER_STRIP_GATE(0x804FA8EC, &lit_7271); -#pragma pop - -/* 804FA8F0-804FA8F4 000234 0004+00 0/1 0/0 0/0 .rodata @7272 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7272 = 37.0f / 10.0f; -COMPILER_STRIP_GATE(0x804FA8F0, &lit_7272); -#pragma pop - -/* 804F6BD0-804F72D0 007BD0 0700+00 1/1 0/0 0/0 .text effect_set__FP10e_fm_class */ -static void effect_set(e_fm_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FA8F4-804FA8F8 000238 0004+00 0/1 0/0 0/0 .rodata @8309 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8309 = 145.0f; -COMPILER_STRIP_GATE(0x804FA8F4, &lit_8309); -#pragma pop - -/* 804FA8F8-804FA8FC 00023C 0004+00 0/1 0/0 0/0 .rodata @8310 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8310 = 13.0f; -COMPILER_STRIP_GATE(0x804FA8F8, &lit_8310); -#pragma pop - -/* 804FA8FC-804FA900 000240 0004+00 0/1 0/0 0/0 .rodata @8311 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_8311 = 0x3A83126F; -COMPILER_STRIP_GATE(0x804FA8FC, &lit_8311); -#pragma pop - -/* 804FA900-804FA904 000244 0004+00 0/1 0/0 0/0 .rodata @8312 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8312 = -20000.0f; -COMPILER_STRIP_GATE(0x804FA900, &lit_8312); -#pragma pop - -/* 804FA904-804FA908 000248 0004+00 0/1 0/0 0/0 .rodata @8313 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8313 = 170.0f; -COMPILER_STRIP_GATE(0x804FA904, &lit_8313); -#pragma pop - -/* 804FA908-804FA90C 00024C 0004+00 0/1 0/0 0/0 .rodata @8314 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8314 = 29.0f; -COMPILER_STRIP_GATE(0x804FA908, &lit_8314); -#pragma pop - -/* 804FA90C-804FA910 000250 0004+00 0/1 0/0 0/0 .rodata @8315 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_8315 = 0x38D1B717; -COMPILER_STRIP_GATE(0x804FA90C, &lit_8315); -#pragma pop - -/* 804FA910-804FA914 000254 0004+00 0/1 0/0 0/0 .rodata @8316 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8316 = -25.0f; -COMPILER_STRIP_GATE(0x804FA910, &lit_8316); -#pragma pop - -/* 804FA914-804FA918 000258 0004+00 0/1 0/0 0/0 .rodata @8317 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8317 = 125.0f; -COMPILER_STRIP_GATE(0x804FA914, &lit_8317); -#pragma pop - -/* 804FA918-804FA91C 00025C 0004+00 0/1 0/0 0/0 .rodata @8318 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8318 = 11.0f / 5.0f; -COMPILER_STRIP_GATE(0x804FA918, &lit_8318); -#pragma pop - -/* 804FA91C-804FA920 000260 0004+00 0/1 0/0 0/0 .rodata @8319 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8319 = 9.0f / 5.0f; -COMPILER_STRIP_GATE(0x804FA91C, &lit_8319); -#pragma pop - -/* 804FA920-804FA924 000264 0004+00 0/1 0/0 0/0 .rodata @8320 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8320 = 60.0f; -COMPILER_STRIP_GATE(0x804FA920, &lit_8320); -#pragma pop - -/* 804FA924-804FA928 000268 0004+00 0/1 0/0 0/0 .rodata @8321 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8321 = 550.0f; -COMPILER_STRIP_GATE(0x804FA924, &lit_8321); -#pragma pop - -/* 804FA928-804FA92C 00026C 0004+00 0/1 0/0 0/0 .rodata @8322 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8322 = 9.0f / 50.0f; -COMPILER_STRIP_GATE(0x804FA928, &lit_8322); -#pragma pop - -/* 804FA92C-804FA930 000270 0004+00 0/1 0/0 0/0 .rodata @8323 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8323 = -50.0f; -COMPILER_STRIP_GATE(0x804FA92C, &lit_8323); -#pragma pop - -/* 804FA930-804FA934 000274 0004+00 0/1 0/0 0/0 .rodata @8324 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8324 = -35.0f; -COMPILER_STRIP_GATE(0x804FA930, &lit_8324); -#pragma pop - -/* 804FA934-804FA938 000278 0004+00 0/1 0/0 0/0 .rodata @8325 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8325 = -23000.0f; -COMPILER_STRIP_GATE(0x804FA934, &lit_8325); -#pragma pop - -/* 804FA938-804FA93C 00027C 0004+00 0/1 0/0 0/0 .rodata @8326 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8326 = 40000.0f; -COMPILER_STRIP_GATE(0x804FA938, &lit_8326); -#pragma pop - -/* 804F72D0-804F8C60 0082D0 1990+00 2/1 0/0 0/0 .text daE_FM_Execute__FP10e_fm_class */ -static void daE_FM_Execute(e_fm_class* param_0) { - // NONMATCHING -} - -/* 804F8C60-804F8C68 009C60 0008+00 1/0 0/0 0/0 .text daE_FM_IsDelete__FP10e_fm_class */ -static bool daE_FM_IsDelete(e_fm_class* param_0) { - return true; -} - -/* 804F8C68-804F8CE8 009C68 0080+00 1/0 0/0 0/0 .text daE_FM_Delete__FP10e_fm_class */ -static void daE_FM_Delete(e_fm_class* param_0) { - // NONMATCHING -} - -/* 804F8CE8-804F95CC 009CE8 08E4+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */ -static void useHeapInit(fopAc_ac_c* param_0) { - // NONMATCHING -} - -/* 804F95CC-804F9614 00A5CC 0048+00 1/0 0/0 0/0 .text __dt__12J3DFrameCtrlFv */ -// J3DFrameCtrl::~J3DFrameCtrl() { -extern "C" void __dt__12J3DFrameCtrlFv() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FA93C-804FA940 000280 0004+00 0/1 0/0 0/0 .rodata @8842 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8842 = 209.0f; -COMPILER_STRIP_GATE(0x804FA93C, &lit_8842); -#pragma pop - -/* 804FA940-804FA944 000284 0004+00 0/1 0/0 0/0 .rodata @8843 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8843 = 861.0f; -COMPILER_STRIP_GATE(0x804FA940, &lit_8843); -#pragma pop - -/* 804FA944-804FA948 000288 0004+00 0/1 0/0 0/0 .rodata @8844 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8844 = 65535.0f; -COMPILER_STRIP_GATE(0x804FA944, &lit_8844); -#pragma pop - -/* 804F9614-804F9B64 00A614 0550+00 1/0 0/0 0/0 .text daE_FM_Create__FP10fopAc_ac_c */ -static void daE_FM_Create(fopAc_ac_c* param_0) { - // NONMATCHING -} - -/* 804F9B64-804F9E14 00AB64 02B0+00 1/1 0/0 0/0 .text __ct__10e_fm_classFv */ -e_fm_class::e_fm_class() { - // NONMATCHING -} - -/* 804F9E14-804F9ED8 00AE14 00C4+00 1/1 0/0 0/0 .text __dt__7chain_sFv */ -chain_s::~chain_s() { - // NONMATCHING -} - -/* 804F9ED8-804F9F14 00AED8 003C+00 2/2 0/0 0/0 .text __dt__12dKy_tevstr_cFv */ -// dKy_tevstr_c::~dKy_tevstr_c() { -extern "C" void __dt__12dKy_tevstr_cFv() { - // NONMATCHING -} - -/* 804F9F14-804F9FE0 00AF14 00CC+00 1/1 0/0 0/0 .text __ct__7chain_sFv */ -chain_s::chain_s() { - // NONMATCHING -} - -/* 804F9FE0-804FA034 00AFE0 0054+00 1/1 0/0 0/0 .text __ct__12dKy_tevstr_cFv */ -// dKy_tevstr_c::dKy_tevstr_c() { -extern "C" void __ct__12dKy_tevstr_cFv() { - // NONMATCHING -} - -/* 804FA034-804FA06C 00B034 0038+00 1/1 0/0 0/0 .text __ct__11J3DLightObjFv */ -// J3DLightObj::J3DLightObj() { -extern "C" void __ct__11J3DLightObjFv() { - // NONMATCHING -} - -/* 804FA06C-804FA070 00B06C 0004+00 1/1 0/0 0/0 .text __ct__5csXyzFv */ -// csXyz::csXyz() { -extern "C" void __ct__5csXyzFv() { - /* empty function */ -} - -/* 804FA070-804FA0B8 00B070 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGSphFv */ -// cM3dGSph::~cM3dGSph() { -extern "C" void __dt__8cM3dGSphFv() { - // NONMATCHING -} - -/* 804FA0B8-804FA100 00B0B8 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGAabFv */ -// cM3dGAab::~cM3dGAab() { -extern "C" void __dt__8cM3dGAabFv() { - // NONMATCHING -} - -/* 804FA100-804FA1CC 00B100 00CC+00 1/1 0/0 0/0 .text __dt__8dCcD_SphFv */ -// dCcD_Sph::~dCcD_Sph() { -extern "C" void __dt__8dCcD_SphFv() { - // NONMATCHING -} - -/* 804FA1CC-804FA250 00B1CC 0084+00 1/1 0/0 0/0 .text __ct__8dCcD_SphFv */ -// dCcD_Sph::dCcD_Sph() { -extern "C" void __ct__8dCcD_SphFv() { - // NONMATCHING -} - -/* 804FA250-804FA2AC 00B250 005C+00 1/0 0/0 0/0 .text __dt__10dCcD_GSttsFv */ -// dCcD_GStts::~dCcD_GStts() { -extern "C" void __dt__10dCcD_GSttsFv() { - // NONMATCHING -} - -/* 804FA2AC-804FA31C 00B2AC 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */ -// dBgS_ObjAcch::~dBgS_ObjAcch() { -extern "C" void __dt__12dBgS_ObjAcchFv() { - // NONMATCHING -} - -/* 804FA31C-804FA38C 00B31C 0070+00 1/0 0/0 0/0 .text __dt__12dBgS_AcchCirFv */ -// dBgS_AcchCir::~dBgS_AcchCir() { -extern "C" void __dt__12dBgS_AcchCirFv() { - // NONMATCHING -} - -/* 804FA38C-804FA390 00B38C 0004+00 2/2 0/0 0/0 .text __ct__4cXyzFv */ -// cXyz::cXyz() { -extern "C" void __ct__4cXyzFv() { - /* empty function */ -} - -/* 804FA390-804FA3D8 00B390 0048+00 1/0 0/0 0/0 .text __dt__10cCcD_GSttsFv */ -// cCcD_GStts::~cCcD_GStts() { -extern "C" void __dt__10cCcD_GSttsFv() { - // NONMATCHING -} - -/* 804FA3D8-804FA420 00B3D8 0048+00 2/1 0/0 0/0 .text __dt__12daE_FM_HIO_cFv */ -daE_FM_HIO_c::~daE_FM_HIO_c() { - // NONMATCHING -} - -/* 804FA420-804FA478 00B420 0058+00 0/0 1/0 0/0 .text __sinit_d_a_e_fm_cpp */ -void __sinit_d_a_e_fm_cpp() { - // NONMATCHING -} - -#pragma push -#pragma force_active on -REGISTER_CTORS(0x804FA420, __sinit_d_a_e_fm_cpp); -#pragma pop - -/* 804FA478-804FA480 00B478 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */ -static void func_804FA478() { - // NONMATCHING -} - -/* 804FA480-804FA488 00B480 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */ -static void func_804FA480() { - // NONMATCHING -} - -/* 804FA488-804FA4A4 00B488 001C+00 1/1 0/0 0/0 .text setCurrentPos__16obj_ystone_classF4cXyz */ -// void obj_ystone_class::setCurrentPos(cXyz param_0) { -extern "C" void setCurrentPos__16obj_ystone_classF4cXyz() { - // NONMATCHING -} - -/* 804FA4A4-804FA4C0 00B4A4 001C+00 1/1 0/0 0/0 .text __ct__4cXyzFRC4cXyz */ -// cXyz::cXyz(cXyz const& param_0) { -extern "C" void __ct__4cXyzFRC4cXyz() { - // NONMATCHING -} - -/* 804FA4C0-804FA534 00B4C0 0074+00 1/1 0/0 0/0 .text - * dComIfGp_particle_set__FUsPC4cXyzPC5csXyzPC4cXyz */ -static void dComIfGp_particle_set(u16 param_0, cXyz const* param_1, csXyz const* param_2, - cXyz const* param_3) { - // NONMATCHING -} - -/* 804FA534-804FA550 00B534 001C+00 1/1 0/0 0/0 .text changeDemoPos0__9daPy_py_cFPC4cXyz - */ -// void daPy_py_c::changeDemoPos0(cXyz const* param_0) { -extern "C" void changeDemoPos0__9daPy_py_cFPC4cXyz() { - // NONMATCHING -} - -/* 804FA550-804FA664 00B550 0114+00 1/1 0/0 0/0 .text abs__4cXyzCFv */ -// void cXyz::abs() const { -extern "C" void abs__4cXyzCFv() { - // NONMATCHING -} - -/* 804FA664-804FA680 00B664 001C+00 1/1 0/0 0/0 .text __as__4cXyzFRC4cXyz */ -// void cXyz::operator=(cXyz const& param_0) { -extern "C" void __as__4cXyzFRC4cXyz() { - // NONMATCHING -} - -/* 804FA680-804FA694 00B680 0014+00 1/1 0/0 0/0 .text changeDemoMode__9daPy_py_cFUliis */ -// void daPy_py_c::changeDemoMode(u32 param_0, int param_1, int param_2, s16 param_3) { -extern "C" void changeDemoMode__9daPy_py_cFUliis() { - // NONMATCHING -} - -/* 804FA694-804FA6A8 00B694 0014+00 1/1 0/0 0/0 .text changeOriginalDemo__9daPy_py_cFv */ -// void daPy_py_c::changeOriginalDemo() { -extern "C" void changeOriginalDemo__9daPy_py_cFv() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804FAF84-804FAF88 000134 0004+00 0/0 0/0 0/0 .bss - * sInstance__40JASGlobalInstance<19JASDefaultBankTable> */ -#pragma push -#pragma force_active on -static u8 data_804FAF84[4]; -#pragma pop - -/* 804FAF88-804FAF8C 000138 0004+00 0/0 0/0 0/0 .bss - * sInstance__35JASGlobalInstance<14JASAudioThread> */ -#pragma push -#pragma force_active on -static u8 data_804FAF88[4]; -#pragma pop - -/* 804FAF8C-804FAF90 00013C 0004+00 0/0 0/0 0/0 .bss sInstance__27JASGlobalInstance<7Z2SeMgr> */ -#pragma push -#pragma force_active on -static u8 data_804FAF8C[4]; -#pragma pop - -/* 804FAF90-804FAF94 000140 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8Z2SeqMgr> */ -#pragma push -#pragma force_active on -static u8 data_804FAF90[4]; -#pragma pop - -/* 804FAF94-804FAF98 000144 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SceneMgr> - */ -#pragma push -#pragma force_active on -static u8 data_804FAF94[4]; -#pragma pop - -/* 804FAF98-804FAF9C 000148 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2StatusMgr> - */ -#pragma push -#pragma force_active on -static u8 data_804FAF98[4]; -#pragma pop - -/* 804FAF9C-804FAFA0 00014C 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2DebugSys> - */ -#pragma push -#pragma force_active on -static u8 data_804FAF9C[4]; -#pragma pop - -/* 804FAFA0-804FAFA4 000150 0004+00 0/0 0/0 0/0 .bss - * sInstance__36JASGlobalInstance<15JAISoundStarter> */ -#pragma push -#pragma force_active on -static u8 data_804FAFA0[4]; -#pragma pop - -/* 804FAFA4-804FAFA8 000154 0004+00 0/0 0/0 0/0 .bss - * sInstance__35JASGlobalInstance<14Z2SoundStarter> */ -#pragma push -#pragma force_active on -static u8 data_804FAFA4[4]; -#pragma pop - -/* 804FAFA8-804FAFAC 000158 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12Z2SpeechMgr2> */ -#pragma push -#pragma force_active on -static u8 data_804FAFA8[4]; -#pragma pop - -/* 804FAFAC-804FAFB0 00015C 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8JAISeMgr> */ -#pragma push -#pragma force_active on -static u8 data_804FAFAC[4]; -#pragma pop - -/* 804FAFB0-804FAFB4 000160 0004+00 0/0 0/0 0/0 .bss sInstance__29JASGlobalInstance<9JAISeqMgr> */ -#pragma push -#pragma force_active on -static u8 data_804FAFB0[4]; -#pragma pop - -/* 804FAFB4-804FAFB8 000164 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAIStreamMgr> */ -#pragma push -#pragma force_active on -static u8 data_804FAFB4[4]; -#pragma pop - -/* 804FAFB8-804FAFBC 000168 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SoundMgr> - */ -#pragma push -#pragma force_active on -static u8 data_804FAFB8[4]; -#pragma pop - -/* 804FAFBC-804FAFC0 00016C 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAISoundInfo> */ -#pragma push -#pragma force_active on -static u8 data_804FAFBC[4]; -#pragma pop - -/* 804FAFC0-804FAFC4 000170 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13JAUSoundTable> */ -#pragma push -#pragma force_active on -static u8 data_804FAFC0[4]; -#pragma pop - -/* 804FAFC4-804FAFC8 000174 0004+00 0/0 0/0 0/0 .bss - * sInstance__38JASGlobalInstance<17JAUSoundNameTable> */ -#pragma push -#pragma force_active on -static u8 data_804FAFC4[4]; -#pragma pop - -/* 804FAFC8-804FAFCC 000178 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAUSoundInfo> */ -#pragma push -#pragma force_active on -static u8 data_804FAFC8[4]; -#pragma pop - -/* 804FAFCC-804FAFD0 00017C 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SoundInfo> - */ -#pragma push -#pragma force_active on -static u8 data_804FAFCC[4]; -#pragma pop - -/* 804FAFD0-804FAFD4 000180 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13Z2SoundObjMgr> */ -#pragma push -#pragma force_active on -static u8 data_804FAFD0[4]; -#pragma pop - -/* 804FAFD4-804FAFD8 000184 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2Audience> - */ -#pragma push -#pragma force_active on -static u8 data_804FAFD4[4]; -#pragma pop - -/* 804FAFD8-804FAFDC 000188 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2FxLineMgr> - */ -#pragma push -#pragma force_active on -static u8 data_804FAFD8[4]; -#pragma pop - -/* 804FAFDC-804FAFE0 00018C 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2EnvSeMgr> - */ -#pragma push -#pragma force_active on -static u8 data_804FAFDC[4]; -#pragma pop - -/* 804FAFE0-804FAFE4 000190 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SpeechMgr> - */ -#pragma push -#pragma force_active on -static u8 data_804FAFE0[4]; -#pragma pop - -/* 804FAFE4-804FAFE8 000194 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13Z2WolfHowlMgr> */ -#pragma push -#pragma force_active on -static u8 data_804FAFE4[4]; -#pragma pop - -/* 804FA948-804FA948 00028C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ +AUDIO_INSTANCES; diff --git a/src/d/actor/d_a_obj_hhashi.cpp b/src/d/actor/d_a_obj_hhashi.cpp index 9c3b05fe611..fc3a1830d71 100644 --- a/src/d/actor/d_a_obj_hhashi.cpp +++ b/src/d/actor/d_a_obj_hhashi.cpp @@ -150,7 +150,7 @@ void daObjHHASHI_c::Obj_Damage() { mCyl.ResetTgHit(); // !@bug: I'm not quite sure but it seems like the access to tgActor fields is outside // proc name check so it might not be the right type of actor - tgActor->field_0x63c.startChainSound( + tgActor->mSound.startChainSound( Z2SE_EN_FM_CHAIN_HIT, tgActor->field_0x1828, 100.0f, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(this))); }