diff --git a/configure.py b/configure.py index 5e14b0d2fd..e388916f19 100755 --- a/configure.py +++ b/configure.py @@ -1673,7 +1673,7 @@ config.libs = [ ActorRel(NonMatching, "d_a_e_st"), ActorRel(MatchingFor("GZ2E01"), "d_a_e_st_line"), ActorRel(NonMatching, "d_a_e_sw"), - ActorRel(NonMatching, "d_a_e_th"), + ActorRel(Equivalent, "d_a_e_th"), # weak func order ActorRel(MatchingFor("GZ2E01"), "d_a_e_th_ball"), ActorRel(NonMatching, "d_a_e_tk"), ActorRel(NonMatching, "d_a_e_tk2"), diff --git a/include/d/actor/d_a_e_th.h b/include/d/actor/d_a_e_th.h index ad83547fef..5a0717d5ea 100644 --- a/include/d/actor/d_a_e_th.h +++ b/include/d/actor/d_a_e_th.h @@ -7,10 +7,7 @@ #include "d/d_bg_s_acch.h" struct th_ke_s { - /* 807B3B58 */ ~th_ke_s(); - /* 807B3BD4 */ th_ke_s(); - - /* 0x000 */ cXyz field_0x0[15]; + /* 0x000 */ cXyz pos[15]; /* 0x0B4 */ cXyz field_0xb4[15]; /* 0x168 */ s16 field_0x168; /* 0x16A */ s16 field_0x16a; @@ -37,31 +34,28 @@ public: /* 0x05CC */ mDoExt_McaMorfSO* mpModelMorf; /* 0x05D0 */ int mAnm; /* 0x05D4 */ u8 field_0x5D4[0x05D8 - 0x05D4]; - /* 0x05D8 */ f32 field_0x5d8; + /* 0x05D8 */ f32 mSpinAnmSpeed; /* 0x05DC */ s16 field_0x5dc; - /* 0x05DE */ u8 field_0x5DE[0x05E0 - 0x05DE]; /* 0x05E0 */ Z2CreatureEnemy mSound; - /* 0x0684 */ s16 field_0x684; + /* 0x0684 */ s16 mCounter; /* 0x0686 */ s16 mAction; /* 0x0688 */ u8 field_0x688[0x068A - 0x0688]; /* 0x068A */ s8 field_0x68a; - /* 0x068B */ u8 field_0x68B[0x068C - 0x068B]; /* 0x068C */ f32 mPlayerDist; /* 0x0690 */ s16 mPlayerAngleY; /* 0x0692 */ u8 field_0x692[0x0698 - 0x0692]; /* 0x0698 */ u32 mShadowKey; - /* 0x069C */ s16 field_0x69c[4]; + /* 0x069C */ s16 mTimers[4]; /* 0x06A4 */ s16 field_0x6a4; /* 0x06A6 */ s16 field_0x6a6; - /* 0x06A8 */ cXyz field_0x6a8; - /* 0x06B4 */ cXyz field_0x6b4; - /* 0x06C0 */ cXyz field_0x6c0; - /* 0x06CC */ cXyz field_0x6cc; + /* 0x06A8 */ cXyz mHandL_Pos1; + /* 0x06B4 */ cXyz mHandL_Pos2; + /* 0x06C0 */ cXyz mHandR_Pos1; + /* 0x06CC */ cXyz mHandR_Pos2; /* 0x06D8 */ u8 field_0x6D8[0x06E4 - 0x06D8]; - /* 0x06E4 */ u8 field_0x6e4; - /* 0x06E5 */ u8 field_0x6E5[0x06E6 - 0x06E5]; - /* 0x06E6 */ s16 field_0x6e6; - /* 0x06E8 */ s16 field_0x6e8; + /* 0x06E4 */ s8 field_0x6e4; + /* 0x06E6 */ s16 mHeadRotY; + /* 0x06E8 */ s16 mHeadRotZ; /* 0x06EA */ s8 field_0x6ea; /* 0x06EB */ u8 field_0x6EB[0x06F0 - 0x06EB]; /* 0x06F0 */ fpc_ProcID mBallID; @@ -70,8 +64,8 @@ public: /* 0x090C */ dCcD_Stts mCcStts; /* 0x0948 */ dCcD_Sph mCcSph[3]; /* 0x0CF0 */ dCcU_AtInfo mAtInfo; - /* 0x0D14 */ cXyz field_0xd14; - /* 0x0D20 */ cXyz field_0xd20; + /* 0x0D14 */ cXyz mHeadPos; + /* 0x0D20 */ cXyz mTailPos; /* 0x0D2C */ s16 mDemoCamMode; /* 0x0D2E */ s16 mDemoCamTimer; /* 0x0D30 */ cXyz mDemoCamEye; @@ -86,13 +80,13 @@ public: /* 0x0D84 */ u8 field_0xD84[0x0D88 - 0x0D84]; /* 0x0D88 */ f32 field_0xd88; /* 0x0D8C */ u8 field_0xD8C[0x0D8E - 0x0D8C]; - /* 0x0D8E */ s8 field_0xd8e; - /* 0x0D8F */ s8 field_0xd8f; - /* 0x0D90 */ f32 field_0xd90; + /* 0x0D8E */ s8 mNoDraw; + /* 0x0D8F */ s8 mDoEndColorEff; + /* 0x0D90 */ f32 mEndBodyColor; /* 0x0D94 */ u32 field_0xd94; /* 0x0D98 */ u32 field_0xd98; - /* 0x0D9C */ th_ke_s field_0xd9c[3]; - /* 0x1210 */ mDoExt_3DlineMat0_c field_0x1210; + /* 0x0D9C */ th_ke_s mKe_s[3]; + /* 0x1210 */ mDoExt_3DlineMat0_c mKeLineMat; /* 0x122C */ u8 field_0x122C[0x1238 - 0x122C]; /* 0x1238 */ u8 mInitHIO; }; @@ -100,8 +94,15 @@ public: STATIC_ASSERT(sizeof(e_th_class) == 0x123c); class daE_TH_HIO_c { +public: /* 807B038C */ daE_TH_HIO_c(); - /* 807B3FA4 */ ~daE_TH_HIO_c(); + /* 807B3FA4 */ virtual ~daE_TH_HIO_c() {} + + /* 0x04 */ s8 no; + /* 0x08 */ f32 base_size; + /* 0x0C */ u8 unk_0xC[0x10 - 0xC]; + /* 0x10 */ f32 move_range; + /* 0x14 */ f32 middle_move_range; }; #endif /* D_A_E_TH_H */ diff --git a/src/d/actor/d_a_e_th.cpp b/src/d/actor/d_a_e_th.cpp index dbdcbaa502..5cebb9d993 100644 --- a/src/d/actor/d_a_e_th.cpp +++ b/src/d/actor/d_a_e_th.cpp @@ -4,310 +4,1322 @@ */ #include "d/actor/d_a_e_th.h" -#include "d/d_cc_d.h" -#include "dol2asm.h" -#include "d/d_camera.h" +#include "d/actor/d_a_e_th_ball.h" +#include "d/d_com_inf_game.h" +#include "d/d_item.h" +#include "c/c_damagereaction.h" + UNK_REL_DATA; #include "f_op/f_op_actor_enemy.h" - - -// -// Forward References: -// - -extern "C" void __ct__12daE_TH_HIO_cFv(); -extern "C" static void s_md_sub1__FPvPv(); -extern "C" static void s_md_sub2__FPvPv(); -extern "C" static void anm_init__FP10e_th_classifUcf(); -extern "C" static void nodeCallBack__FP8J3DJointi(); -extern "C" static void ke_control__FP10e_th_classP7th_ke_si(); -extern "C" static void ke_pos_set__FP10e_th_classP7th_ke_si(); -extern "C" static void ke_disp__FP10e_th_class(); -extern "C" static void ke_move__FP10e_th_class(); -extern "C" static void daE_TH_Draw__FP10e_th_class(); -extern "C" static void e_th_wait__FP10e_th_class(); -extern "C" static void e_th_spin__FP10e_th_class(); -extern "C" static void e_th_spin_B__FP10e_th_class(); -extern "C" static void e_th_shot__FP10e_th_class(); -extern "C" static void e_th_return__FP10e_th_class(); -extern "C" static void e_th_damage__FP10e_th_class(); -extern "C" static void e_th_start__FP10e_th_class(); -extern "C" static void e_th_end__FP10e_th_class(); -extern "C" static void damage_check__FP10e_th_class(); -extern "C" static void action__FP10e_th_class(); -extern "C" static void cam_3d_morf__FP10e_th_classf(); -extern "C" static void demo_camera__FP10e_th_class(); -extern "C" static void anm_se_set__FP10e_th_class(); -extern "C" static void daE_TH_Execute__FP10e_th_class(); -extern "C" static bool daE_TH_IsDelete__FP10e_th_class(); -extern "C" static void daE_TH_Delete__FP10e_th_class(); -extern "C" static void useHeapInit__FP10fopAc_ac_c(); -extern "C" static void daE_TH_Create__FP10fopAc_ac_c(); -extern "C" void __dt__7th_ke_sFv(); -extern "C" void __ct__7th_ke_sFv(); -extern "C" void __ct__4cXyzFv(); -extern "C" void __dt__8dCcD_SphFv(); -extern "C" void __ct__8dCcD_SphFv(); -extern "C" void __dt__8cM3dGSphFv(); -extern "C" void __dt__8cM3dGAabFv(); -extern "C" void __dt__10dCcD_GSttsFv(); -extern "C" void __dt__12dBgS_ObjAcchFv(); -extern "C" void __dt__12dBgS_AcchCirFv(); -extern "C" void __dt__10cCcD_GSttsFv(); -extern "C" void __dt__12daE_TH_HIO_cFv(); -extern "C" void __sinit_d_a_e_th_cpp(); -extern "C" static void func_807B4028(); -extern "C" static void func_807B4030(); -extern "C" void __dt__4cXyzFv(); -extern "C" extern char const* const d_a_e_th__stringBase0; - -// -// External References: -// - -extern "C" void mDoMtx_XrotS__FPA4_fs(); -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 transM__14mDoMtx_stack_cFfff(); -extern "C" void scaleM__14mDoMtx_stack_cFfff(); -extern "C" void -__ct__16mDoExt_McaMorfSOFP12J3DModelDataP25mDoExt_McaMorfCallBack1_cP25mDoExt_McaMorfCallBack2_cP15J3DAnmTransformifiiP10Z2CreatureUlUl(); -extern "C" void setAnm__16mDoExt_McaMorfSOFP15J3DAnmTransformiffff(); -extern "C" void play__16mDoExt_McaMorfSOFUlSc(); -extern "C" void entryDL__16mDoExt_McaMorfSOFv(); -extern "C" void modelCalc__16mDoExt_McaMorfSOFv(); -extern "C" void stopZelAnime__16mDoExt_McaMorfSOFv(); -extern "C" void init__19mDoExt_3DlineMat0_cFUsUsi(); -extern "C" void update__19mDoExt_3DlineMat0_cFifR8_GXColorUsP12dKy_tevstr_c(); -extern "C" void setMat__26mDoExt_3DlineMatSortPacketFP18mDoExt_3DlineMat_c(); -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_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_createDisappear__FPC10fopAc_ac_cPC4cXyzUcUcUc(); -extern "C" void fopAcM_effSmokeSet1__FPUlPUlPC4cXyzPC5csXyzfPC12dKy_tevstr_ci(); -extern "C" void fpcEx_Search__FPFPvPv_PvPv(); -extern "C" void fpcSch_JudgeByID__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_onOneZoneSwitch__Fii(); -extern "C" void dComIfGs_isOneZoneSwitch__Fii(); -extern "C" void -dComIfGd_setShadow__FUlScP8J3DModelP4cXyzffffR13cBgS_PolyInfoP12dKy_tevstr_csfP9_GXTexObj(); -extern "C" void onSwitch__12dSv_memBit_cFi(); -extern "C" void onDungeonItem__12dSv_memBit_cFi(); -extern "C" void isDungeonItem__12dSv_memBit_cCFi(); -extern "C" void onSwitch__10dSv_info_cFii(); -extern "C" void offSwitch__10dSv_info_cFii(); -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 -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 __ct__12dBgS_AcchCirFv(); -extern "C" void SetWall__12dBgS_AcchCirFff(); -extern "C" void __dt__9dBgS_AcchFv(); -extern "C" void __ct__9dBgS_AcchFv(); -extern "C" void Set__9dBgS_AcchFP4cXyzP4cXyzP10fopAc_ac_ciP12dBgS_AcchCirP4cXyzP5csXyzP5csXyz(); -extern "C" void CrrPos__9dBgS_AcchFR4dBgS(); -extern "C" void SetObj__16dBgS_PolyPassChkFv(); -extern "C" void __ct__10dCcD_GSttsFv(); -extern "C" void Move__10dCcD_GSttsFv(); -extern "C" void Init__9dCcD_SttsFiiP10fopAc_ac_c(); -extern "C" void __ct__12dCcD_GObjInfFv(); -extern "C" void __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 def_se_set__FP10Z2CreatureP8cCcD_ObjUlP10fopAc_ac_c(); -extern "C" void cc_at_check__FP10fopAc_ac_cP11dCcU_AtInfo(); -extern "C" void checkItemGet__FUci(); -extern "C" void Start__9dCamera_cFv(); -extern "C" void Stop__9dCamera_cFv(); -extern "C" void SetTrimSize__9dCamera_cFl(); -extern "C" void Set__9dCamera_cF4cXyz4cXyzfs(); -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_darkworld_check__Fv(); -extern "C" void Set__4cCcSFP8cCcD_Obj(); -extern "C" void __mi__4cXyzCFRC3Vec(); -extern "C" void cM_atan2s__Fff(); -extern "C" void cM_rndF__Ff(); -extern "C" void cM_initRnd2__Fiii(); -extern "C" void cM_rndFX2__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_addCalcAngleS2__FPssss(); -extern "C" void MtxPosition__FP4cXyzP4cXyz(); -extern "C" void MtxPush__Fv(); -extern "C" void MtxPull__Fv(); -extern "C" void subBgmStart__8Z2SeqMgrFUl(); -extern "C" void subBgmStop__8Z2SeqMgrFv(); -extern "C" void __ct__15Z2CreatureEnemyFv(); -extern "C" void init__15Z2CreatureEnemyFP3VecP3VecUcUc(); -extern "C" void* __nw__FUl(); -extern "C" void __dl__FPv(); -extern "C" void checkPass__12J3DFrameCtrlFf(); -extern "C" void __destroy_arr(); -extern "C" void __construct_array(); -extern "C" void _savegpr_19(); -extern "C" void _savegpr_24(); -extern "C" void _savegpr_25(); -extern "C" void _savegpr_26(); -extern "C" void _savegpr_27(); -extern "C" void _savegpr_28(); -extern "C" void _savegpr_29(); -extern "C" void _restgpr_19(); -extern "C" void _restgpr_24(); -extern "C" void _restgpr_25(); -extern "C" void _restgpr_26(); -extern "C" void _restgpr_27(); -extern "C" void _restgpr_28(); -extern "C" void _restgpr_29(); -extern "C" extern void* __vt__19mDoExt_3DlineMat0_c[5]; -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" u8 mSimpleTexObj__21dDlst_shadowControl_c[32]; -extern "C" u8 mCurrentMtx__6J3DSys[48]; -extern "C" extern u8 struct_80450C98[4]; -extern "C" u8 m_midnaActor__9daPy_py_c[4]; -extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */]; -extern "C" void __register_global_object(); - -// -// Declarations: -// - -/* ############################################################################################## */ -/* 807B44C8-807B44CC 00002C 0004+00 0/1 0/0 0/0 .rodata @3927 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3927 = 1300.0f; -COMPILER_STRIP_GATE(0x807B44C8, &lit_3927); -#pragma pop - -/* 807B44CC-807B44D0 000030 0004+00 0/1 0/0 0/0 .rodata @3928 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3928 = 700.0f; -COMPILER_STRIP_GATE(0x807B44CC, &lit_3928); -#pragma pop - -/* 807B4684-807B4688 000038 0004+00 1/1 0/0 0/0 .data l_color$4083 */ -SECTION_DATA static u8 l_color[4] = { - 0x50, - 0x0A, - 0x0A, - 0xFF, +enum daE_TH_ACTION { + ACTION_WAIT, + ACTION_SPIN, + ACTION_SPIN_B, + ACTION_SHOT, + ACTION_RETURN, + ACTION_DAMAGE = 20, + ACTION_START = 22, + ACTION_END = 25, }; -/* 807B4688-807B46B4 -00001 002C+00 1/1 0/0 0/0 .data @4357 */ -SECTION_DATA static void* lit_4357[11] = { - (void*)(((char*)e_th_spin_B__FP10e_th_class) + 0xD8), - (void*)(((char*)e_th_spin_B__FP10e_th_class) + 0x110), - (void*)(((char*)e_th_spin_B__FP10e_th_class) + 0x2D4), - (void*)(((char*)e_th_spin_B__FP10e_th_class) + 0x1E0), - (void*)(((char*)e_th_spin_B__FP10e_th_class) + 0x244), - (void*)(((char*)e_th_spin_B__FP10e_th_class) + 0x2D4), - (void*)(((char*)e_th_spin_B__FP10e_th_class) + 0x2D4), - (void*)(((char*)e_th_spin_B__FP10e_th_class) + 0x2D4), - (void*)(((char*)e_th_spin_B__FP10e_th_class) + 0x2D4), - (void*)(((char*)e_th_spin_B__FP10e_th_class) + 0x2D4), - (void*)(((char*)e_th_spin_B__FP10e_th_class) + 0x288), -}; +/* 807B038C-807B03C4 0000EC 0038+00 1/1 0/0 0/0 .text __ct__12daE_TH_HIO_cFv */ +daE_TH_HIO_c::daE_TH_HIO_c() { + no = -1; + base_size = 1.0f; + move_range = 1300.0f; + middle_move_range = 700.0f; +} -/* 807B46B4-807B471C -00001 0068+00 1/1 0/0 0/0 .data @4682 */ -SECTION_DATA static void* lit_4682[26] = { - (void*)(((char*)action__FP10e_th_class) + 0x84), - (void*)(((char*)action__FP10e_th_class) + 0x90), - (void*)(((char*)action__FP10e_th_class) + 0xA0), - (void*)(((char*)action__FP10e_th_class) + 0xB0), - (void*)(((char*)action__FP10e_th_class) + 0xC0), - (void*)(((char*)action__FP10e_th_class) + 0xF4), - (void*)(((char*)action__FP10e_th_class) + 0xF4), - (void*)(((char*)action__FP10e_th_class) + 0xF4), - (void*)(((char*)action__FP10e_th_class) + 0xF4), - (void*)(((char*)action__FP10e_th_class) + 0xF4), - (void*)(((char*)action__FP10e_th_class) + 0xF4), - (void*)(((char*)action__FP10e_th_class) + 0xF4), - (void*)(((char*)action__FP10e_th_class) + 0xF4), - (void*)(((char*)action__FP10e_th_class) + 0xF4), - (void*)(((char*)action__FP10e_th_class) + 0xF4), - (void*)(((char*)action__FP10e_th_class) + 0xF4), - (void*)(((char*)action__FP10e_th_class) + 0xF4), - (void*)(((char*)action__FP10e_th_class) + 0xF4), - (void*)(((char*)action__FP10e_th_class) + 0xF4), - (void*)(((char*)action__FP10e_th_class) + 0xF4), - (void*)(((char*)action__FP10e_th_class) + 0xCC), - (void*)(((char*)action__FP10e_th_class) + 0xF4), - (void*)(((char*)action__FP10e_th_class) + 0xD8), - (void*)(((char*)action__FP10e_th_class) + 0xF4), - (void*)(((char*)action__FP10e_th_class) + 0xF4), - (void*)(((char*)action__FP10e_th_class) + 0xE8), -}; +/* 807B03C4-807B0434 000124 0070+00 1/1 0/0 0/0 .text s_md_sub1__FPvPv */ +static void* s_md_sub1(void* i_actor, void* i_data) { + if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_MD && (fopAcM_GetParam(i_actor) & 0xFF00) == 0xFF00 && ((fopAc_ac_c*)i_actor)->current.pos.z == 560.0f) { + fopAcM_delete((fopAc_ac_c*)i_actor); + } -/* 807B471C-807B4754 -00001 0038+00 1/1 0/0 0/0 .data @5133 */ -SECTION_DATA static void* lit_5133[14] = { - (void*)(((char*)demo_camera__FP10e_th_class) + 0xCEC), - (void*)(((char*)demo_camera__FP10e_th_class) + 0x68), - (void*)(((char*)demo_camera__FP10e_th_class) + 0x110), - (void*)(((char*)demo_camera__FP10e_th_class) + 0x220), - (void*)(((char*)demo_camera__FP10e_th_class) + 0x35C), - (void*)(((char*)demo_camera__FP10e_th_class) + 0x624), - (void*)(((char*)demo_camera__FP10e_th_class) + 0xCEC), - (void*)(((char*)demo_camera__FP10e_th_class) + 0xCEC), - (void*)(((char*)demo_camera__FP10e_th_class) + 0xCEC), - (void*)(((char*)demo_camera__FP10e_th_class) + 0xCEC), - (void*)(((char*)demo_camera__FP10e_th_class) + 0x67C), - (void*)(((char*)demo_camera__FP10e_th_class) + 0x840), - (void*)(((char*)demo_camera__FP10e_th_class) + 0xB98), - (void*)(((char*)demo_camera__FP10e_th_class) + 0xBCC), -}; + return NULL; +} -/* 807B4754-807B4794 000108 0040+00 1/1 0/0 0/0 .data cc_sph_src$5396 */ -static dCcD_SrcSph cc_sph_src = { - { - {0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x3}, 0x75}}, // 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 -}; +/* 807B0434-807B04A4 000194 0070+00 1/1 0/0 0/0 .text s_md_sub2__FPvPv */ +static void* s_md_sub2(void* i_actor, void* i_data) { + if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_MD && (fopAcM_GetParam(i_actor) & 0xFF00) != 0xFF00 && ((fopAc_ac_c*)i_actor)->current.pos.z == -950.0f) { + fopAcM_delete((fopAc_ac_c*)i_actor); + } + + return NULL; +} + +/* 807B04A4-807B0550 000204 00AC+00 6/6 0/0 0/0 .text anm_init__FP10e_th_classifUcf */ +static void anm_init(e_th_class* i_this, int i_anm, f32 i_morf, u8 i_mode, f32 i_speed) { + i_this->mpModelMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("E_th", i_anm), i_mode, i_morf, i_speed, 0.0f, -1.0f); + i_this->mAnm = i_anm; +} + +/* 807B0550-807B0630 0002B0 00E0+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_p = j3dSys.getModel(); + e_th_class* i_this = (e_th_class*)model_p->getUserArea(); + + if (i_this != NULL && (jnt_no == 3 || jnt_no == 4)) { + MTXCopy(model_p->getAnmMtx(jnt_no), *calc_mtx); + cMtx_YrotM(*calc_mtx, i_this->mHeadRotY); + cMtx_ZrotM(*calc_mtx, i_this->mHeadRotZ); + model_p->setAnmMtx(jnt_no, *calc_mtx); + MTXCopy(*calc_mtx, J3DSys::mCurrentMtx); + } + } + + return 1; +} + +/* 807B0630-807B09A4 000390 0374+00 1/1 0/0 0/0 .text ke_control__FP10e_th_classP7th_ke_si */ +static void ke_control(e_th_class* i_this, th_ke_s* i_ke_s, int i_no) { + cXyz sp4C; + cXyz sp40; + + int i; + cXyz* pos_p = &i_ke_s->pos[1]; + cXyz* var_r29 = &i_ke_s->field_0xb4[1]; + cXyz sp34; + cXyz sp28; + cXyz sp1C; + + cMtx_YrotS(*calc_mtx, i_ke_s->field_0x16a); + cMtx_XrotM(*calc_mtx, i_ke_s->field_0x168); + sp4C.x = 0.0f; + sp4C.y = 3.0f + (10.0f + TREG_F(3)); + sp4C.z = -10.0f + TREG_F(4); + MtxPosition(&sp4C, &sp34); + + for (i = 1; i < 15; i++, pos_p++, var_r29++) { + MtxPush(); + sp28.x = 0.1f * (sp34.x * (15 - i)); + sp28.y = 0.1f * (sp34.y * (15 - i)); + sp28.z = 0.1f * (sp34.z * (15 - i)); + sp4C.x = cM_rndFX2(2.0f + KREG_F(7)); + sp4C.y = cM_rndFX2(2.0f + KREG_F(7)); + sp4C.z = 0.0f; + MtxPosition(&sp4C, &sp1C); + + f32 temp_f28 = sp1C.x + (sp28.x + (var_r29[0].x + (pos_p[0].x - pos_p[-1].x))); + f32 temp_f30 = sp1C.z + (sp28.z + (var_r29[0].z + (pos_p[0].z - pos_p[-1].z))); + f32 temp_f31 = (TREG_F(2) + ((sp1C.y + (sp28.y + (pos_p[0].y + var_r29[0].y))) - 10.0f)) - pos_p[-1].y; + s16 sp12 = -cM_atan2s(temp_f31, temp_f30); + s16 sp10 = (s16)cM_atan2s(temp_f28, JMAFastSqrt((temp_f31 * temp_f31) + (temp_f30 * temp_f30))); + + cMtx_XrotS(*calc_mtx, sp12); + cMtx_YrotM(*calc_mtx, sp10); + sp4C.x = 0.0f; + sp4C.y = 0.0f; + sp4C.z = 15.0f + TREG_F(5); + MtxPosition(&sp4C, &sp40); + + *var_r29 = *pos_p; + pos_p[0].x = pos_p[-1].x + sp40.x; + pos_p[0].y = pos_p[-1].y + sp40.y; + pos_p[0].z = pos_p[-1].z + sp40.z; + + f32 temp_f29 = 0.75f + (0.001f * i_no); + var_r29[0].x = temp_f29 * (pos_p[0].x - var_r29[0].x); + var_r29[0].y = temp_f29 * (pos_p[0].y - var_r29[0].y); + var_r29[0].z = temp_f29 * (pos_p[0].z - var_r29[0].z); + MtxPull(); + } +} + +/* 807B09A4-807B09E8 000704 0044+00 1/1 0/0 0/0 .text ke_pos_set__FP10e_th_classP7th_ke_si */ +static void ke_pos_set(e_th_class* i_this, th_ke_s* i_ke_s, int param_2) { + cXyz* pos_p = i_this->mKeLineMat.getPos(param_2); + for (int i = 0; i < 15; i++, pos_p++) { + *pos_p = i_ke_s->pos[i]; + } +} + +/* 807B09E8-807B0A6C 000748 0084+00 1/1 0/0 0/0 .text ke_disp__FP10e_th_class */ +static void ke_disp(e_th_class* i_this) { + static GXColor l_color = {0x50, 0x0A, 0x0A, 0xFF}; + i_this->mKeLineMat.update(15, 3.5f + TREG_F(11), l_color, 1, &i_this->tevStr); + dComIfGd_set3DlineMat(&i_this->mKeLineMat); +} + +/* 807B0A6C-807B0BD0 0007CC 0164+00 1/1 0/0 0/0 .text ke_move__FP10e_th_class */ +static void ke_move(e_th_class* i_this) { + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + cXyz sp28; + cXyz sp1C; + + cM_initRnd2(12, 123, 70); + + MTXCopy(i_this->mpModelMorf->getModel()->getAnmMtx(4), *calc_mtx); + sp28.x = 0.0f; + sp28.y = 27.0f + TREG_F(15); + sp28.z = TREG_F(16); + MtxPosition(&sp28, &sp1C); + + sp28 = i_this->mKe_s[0].pos[0] - sp1C; + s16 temp_r25 = cM_atan2s(sp28.x, sp28.z); + sp28.x = 35.0f + TREG_F(14); + sp28.y = 27.0f + TREG_F(15); + sp28.z = TREG_F(16); + + for (int i = 0; i < 3; i++) { + MtxPosition(&sp28, &i_this->mKe_s[i].pos[0]); + i_this->mKe_s[i].field_0x168 = -i_this->mHeadRotZ; + i_this->mKe_s[i].field_0x16a = temp_r25 + ((i - 1) << 11); + + if (i == 1) { + i_this->mKe_s[i].field_0x168 += 0x500; + } + } + + th_ke_s* ke_s = i_this->mKe_s; + for (int i = 0; i < 3; i++, ke_s++) { + ke_control(i_this, ke_s, i); + ke_pos_set(i_this, ke_s, i); + } +} + +/* 807B0BD0-807B0D7C 000930 01AC+00 1/0 0/0 0/0 .text daE_TH_Draw__FP10e_th_class */ +static int daE_TH_Draw(e_th_class* i_this) { + J3DModel* model_p = i_this->mpModelMorf->getModel(); + if (i_this->mNoDraw) { + return 1; + } + + g_env_light.settingTevStruct(0, &i_this->current.pos, &i_this->tevStr); + g_env_light.setLightTevColorType_MAJI(model_p, &i_this->tevStr); + + if (i_this->mDoEndColorEff) { + J3DModelData* modelData_p = model_p->getModelData(); + for (u16 i = 0; i < modelData_p->getMaterialNum(); i++) { + J3DMaterial* material_p = modelData_p->getMaterialNodePointer(i); + material_p->getTevColor(0)->r = i_this->mEndBodyColor; + material_p->getTevColor(0)->g = i_this->mEndBodyColor; + material_p->getTevColor(0)->b = i_this->mEndBodyColor; + } + } + + i_this->mpModelMorf->entryDL(); + + cXyz sp8; + sp8.set(i_this->current.pos.x, 50.0f + i_this->current.pos.y + BREG_F(18), i_this->current.pos.z); + i_this->mShadowKey = dComIfGd_setShadow(i_this->mShadowKey, 1, model_p, &sp8, 1200.0f + BREG_F(19), 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()); + + ke_disp(i_this); + return 1; +} + +/* 807B0D7C-807B0EFC 000ADC 0180+00 1/1 0/0 0/0 .text e_th_wait__FP10e_th_class */ +static void e_th_wait(e_th_class* i_this) { + i_this->field_0x6a4 = 5; + + switch (i_this->mMode) { + case 0: + if (i_this->mTimers[0] == 0) { + anm_init(i_this, 0x1B, 10.0f, 2, 1.0f); + i_this->mMode = 1; + i_this->mTimers[1] = 10; + i_this->mTimers[0] = 60.0f + cM_rndF(60.0f); + } + break; + case 1: + if (i_this->mTimers[0] == 0 && i_this->mDemoCamMode == 0) { + i_this->mMode = 2; + anm_init(i_this, 0x12, 5.0f, 0, 1.0f); + } + break; + case 2: + if (i_this->mpModelMorf->isStop()) { + anm_init(i_this, 0x1B, 10.0f, 2, 1.0f); + i_this->mMode = 1; + i_this->mTimers[0] = 60.0f + cM_rndF(60.0f); + } + break; + } + + if (i_this->mTimers[1] == 0) { + i_this->mAction = ACTION_SPIN; + i_this->mMode = 0; + } +} + +/* 807B0EFC-807B0F20 000C5C 0024+00 1/1 0/0 0/0 .text e_th_spin__FP10e_th_class */ +static void e_th_spin(e_th_class* i_this) { + cXyz sp14; + cXyz sp8; + + i_this->field_0x6a4 = 5; + i_this->field_0x6e4 = 1; + i_this->mAction = ACTION_SPIN_B; + i_this->mMode = 0; +} + +/* 807B0F20-807B12B0 000C80 0390+00 2/1 0/0 0/0 .text e_th_spin_B__FP10e_th_class */ +static void e_th_spin_B(e_th_class* i_this) { + cXyz sp18; + cXyz spC; + + i_this->field_0x6a4 = 5; + i_this->field_0x6e4 = 1; + + s8 var_r26 = 0; + s16 var_r27; + if (i_this->mPlayerAngleY > 0x4000 || i_this->mPlayerAngleY < -0x4000) { + var_r27 = -0x8000; + } else { + var_r27 = 0; + } + + cMtx_YrotS(*calc_mtx, var_r27); + sp18.x = 0.0f; + sp18.y = 0.0f; + sp18.z = i_this->speedF * i_this->mSpinAnmSpeed; + MtxPosition(&sp18, &spC); + i_this->current.pos += spC; + + f32 speed_target; + f32 anm_frame = i_this->mpModelMorf->getFrame(); + + switch (i_this->mMode) { + case 0: + anm_init(i_this, 5, 10.0f, 0, 1.0f); + i_this->mMode = 1; + i_this->field_0x68a |= 1; + i_this->mSpinAnmSpeed = 0.5f; + break; + case 1: + if (i_this->mpModelMorf->isStop()) { + i_this->field_0x68a |= 1; + if (i_this->mDemoCamMode != 0 && i_this->mDemoCamMode < 4) { + anm_init(i_this, 4, 3.0f, 2, i_this->mSpinAnmSpeed); + i_this->mMode = 10; + } else { + anm_init(i_this, 6, 3.0f, 2, i_this->mSpinAnmSpeed); + i_this->mMode = 3; + } + + i_this->mpModelMorf->setFrame(anm_frame); + i_this->field_0x5dc = 0; + } + break; + case 3: + var_r26 = 1; + speed_target = 2.0f; + var_r27 = i_this->mPlayerAngleY - i_this->shape_angle.y; + + i_this->field_0x5dc++; + if (i_this->field_0x5dc > 80 && (var_r27 > 0x2000 || var_r27 < -0x2000) && i_this->mPlayerDist > 200.0f + BREG_F(10)) { + i_this->mTimers[0] = 40; + i_this->mMode = 4; + } + break; + case 4: + var_r26 = 1; + if (i_this->mTimers[0] == 0 && i_this->mpModelMorf->checkFrame(4.0f + NREG_F(18))) { + i_this->mAction = ACTION_SHOT; + i_this->mMode = 0; + i_this->field_0x68a |= 1; + } + break; + case 10: + var_r26 = 1; + if (i_this->mDemoCamMode == 3 && i_this->mDemoCamTimer >= VREG_S(6) + 80 && i_this->mpModelMorf->checkFrame(4.0f + NREG_F(18))) { + i_this->mAction = ACTION_SHOT; + i_this->mMode = 0; + i_this->field_0x68a |= 1; + } + break; + } + + if (var_r26 != 0) { + f32 anm_speed_step; + if (i_this->field_0x5b7 == 1) { + anm_speed_step = 0.025f; + } else { + anm_speed_step = 0.01f; + } + + cLib_addCalc2(&i_this->mSpinAnmSpeed, 1.5f, 1.0f, anm_speed_step); + i_this->mpModelMorf->setPlaySpeed(i_this->mSpinAnmSpeed); + + if (i_this->mpModelMorf->checkFrame(10.0f)) { + i_this->mSound.startCreatureSound(Z2SE_EN_TH_BRANDISH, 0, -1); + } + } + + cLib_addCalc2(&i_this->speedF, speed_target, 1.0f, 0.1f); +} + +/* 807B12B0-807B141C 001010 016C+00 1/1 0/0 0/0 .text e_th_shot__FP10e_th_class */ +static s16 e_th_shot(e_th_class* i_this) { + s16 angle_chase_step = 0; + int anm_frame = i_this->mpModelMorf->getFrame(); + + switch (i_this->mMode) { + case 0: + anm_init(i_this, 0x18, 4.0f + NREG_F(19), 0, 1.0f); + i_this->mMode = 1; + /* fallthrough */ + case 1: + i_this->field_0x6a4 = 5; + if (anm_frame < 20) { + angle_chase_step = 0x500; + } + + if (NREG_S(1) + 25 == (int)i_this->mpModelMorf->getFrame()) { + i_this->field_0x68a |= 2; + } + + if (i_this->mpModelMorf->isStop()) { + if (i_this->mDemoCamMode == 0) { + i_this->mTimers[0] = JREG_S(4) + 100; + } else { + i_this->mTimers[0] = JREG_S(4) + 90; + } + + i_this->mMode = 2; + anm_init(i_this, 0x19, 3.0f, 2, 1.0f); + } + break; + case 2: + i_this->field_0x6e4 = 1; + if (i_this->mTimers[0] == 0) { + i_this->mAction = ACTION_RETURN; + i_this->mMode = 0; + } + break; + } + + return angle_chase_step; +} + +/* 807B141C-807B1670 00117C 0254+00 1/1 0/0 0/0 .text e_th_return__FP10e_th_class */ +static void e_th_return(e_th_class* i_this) { + e_th_ball_class* ball_p = (e_th_ball_class*)fopAcM_SearchByID(i_this->mBallID); + cXyz ball_vec; + + i_this->field_0x6e4 = 2; + ball_vec = ball_p->current.pos - i_this->current.pos; + + switch (i_this->mMode) { + case 0: + if (JMAFastSqrt((ball_vec.x * ball_vec.x) + (ball_vec.z * ball_vec.z)) < 300.0f + AREG_F(17)) { + i_this->field_0x68a |= 1; + i_this->mAction = ACTION_WAIT; + i_this->mMode = 0; + } else { + anm_init(i_this, 0x17, 5.0f, 0, 1.0f); + i_this->mMode = 1; + } + break; + case 1: + if (NREG_S(2) + 9 == (int)i_this->mpModelMorf->getFrame()) { + i_this->field_0x68a |= 1; + } + + if (i_this->mpModelMorf->isStop()) { + anm_init(i_this, 0x1B, 0.0f, 2, 1.0f); + i_this->mMode = 2; + } + + i_this->mTimers[0] = 100; + /* fallthrough */ + case 2: + if (JMAFastSqrt((ball_vec.x * ball_vec.x) + (ball_vec.z * ball_vec.z)) < 300.0f + AREG_F(17)) { + anm_init(i_this, 0x1A, 3.0f, 0, 1.0f); + i_this->mMode = 3; + i_this->mTimers[0] = 0; + } else if (i_this->mTimers[0] == 0) { + i_this->mAction = ACTION_WAIT; + i_this->mMode = 0; + } + break; + case 3: + if (i_this->mpModelMorf->isStop()) { + i_this->mAction = ACTION_WAIT; + i_this->mMode = 0; + } + break; + } +} + +/* 807B1670-807B176C 0013D0 00FC+00 1/1 0/0 0/0 .text e_th_damage__FP10e_th_class */ +static void e_th_damage(e_th_class* i_this) { + switch (i_this->mMode) { + case 0: + i_this->mMode = 1; + if (cM_rndF(1.0f) < 0.5f) { + anm_init(i_this, 7, 3.0f, 0, 1.0f); + } else { + anm_init(i_this, 8, 3.0f, 0, 1.0f); + } + break; + case 1: + if (i_this->mTimers[0] == 0 || i_this->mpModelMorf->isStop()) { + i_this->field_0x6a4 = 5; + i_this->mAction = ACTION_SHOT; + i_this->mMode = 2; + } + break; + } +} + +/* 807B176C-807B18C0 0014CC 0154+00 1/1 0/0 0/0 .text e_th_start__FP10e_th_class */ +static void e_th_start(e_th_class* i_this) { + daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); + i_this->field_0x6a4 = 5; + e_th_ball_class* ball_p = (e_th_ball_class*)fopAcM_SearchByID(i_this->mBallID); + + switch (i_this->mMode) { + case 0: + if (ball_p != NULL) { + i_this->mMode = 1; + ball_p->mPlayerGet = 1; + } + break; + case 1: + if (!dComIfGp_checkPlayerStatus1(0, 0x2000000) && !dComIfGp_checkPlayerStatus1(0, 0x10000) && !daPy_getPlayerActorClass()->checkHookshotShootReturnMode() && player->current.pos.z < -1200.0f && !player->checkNowWolf()) { + fpcM_Search(s_md_sub1, i_this); + Z2GetAudioMgr()->subBgmStart(Z2BGM_IB_MBOSS_D01); + i_this->mDemoCamMode = 1; + i_this->mNoDraw = FALSE; + ball_p->mPlayerGet = 0; + i_this->current.pos.y = i_this->home.pos.y; + i_this->mAction = ACTION_SPIN; + i_this->mMode = 0; + dComIfGs_onOneZoneSwitch(1, -1); + } + break; + } +} + +/* 807B18C0-807B19AC 001620 00EC+00 1/1 0/0 0/0 .text e_th_end__FP10e_th_class */ +static void e_th_end(e_th_class* i_this) { + i_this->field_0x6a4 = 5; + dComIfGp_getPlayer(0); + + switch (i_this->mMode) { + case 0: + case 2: + break; + case 1: + if (i_this->mpModelMorf->isStop()) { + i_this->mMode = 2; + dComIfGs_onStageMiddleBoss(); + } + break; + case 3: + i_this->current.pos.y = 10000.0f + i_this->home.pos.y; + break; + } + + if (i_this->mDoEndColorEff) { + cLib_addCalc2(&i_this->mEndBodyColor, -30.0f, 1.0f, 0.4f); + } +} + +/* 807B19AC-807B1B78 00170C 01CC+00 1/1 0/0 0/0 .text damage_check__FP10e_th_class */ +static void damage_check(e_th_class* i_this) { + fopAc_ac_c* player = dComIfGp_getPlayer(0); + i_this->mCcStts.Move(); + + for (int i = 0; i <= 2; i++) { + if (i_this->mCcSph[i].ChkTgHit()) { + i_this->mAtInfo.mpCollider = i_this->mCcSph[i].GetTgHitObj(); + + if (i_this->mCcSph[i].ChkTgShield()) { + if (i_this->field_0x6a6 == 0) { + i_this->field_0x6a6 = 6; + def_se_set(&i_this->mSound, i_this->mCcSph[i].GetTgHitObj(), 0x28, NULL); + return; + } + break; + } + + if (i_this->field_0x6a4 == 0 && i_this->mAction != ACTION_SPIN) { + daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); + OS_REPORT("E_th HP1 %d\n", i_this->health); + cc_at_check(i_this, &i_this->mAtInfo); + OS_REPORT("E_th HP2 %d\n", i_this->health); + + if (player->getCutType() == daPy_py_c::CUT_TYPE_JUMP && player->checkCutJumpCancelTurn()) { + i_this->field_0x6a4 = 3; + } else { + i_this->field_0x6a4 = 10; + } + + dComIfGs_onOneZoneSwitch(3, -1); + + if (i_this->health <= 0) { + i_this->mAction = ACTION_END; + i_this->mMode = 0; + i_this->field_0x68a |= 4; + i_this->mDemoCamMode = 10; + Z2GetAudioMgr()->subBgmStop(); + } else if (i_this->mAction == ACTION_SHOT || i_this->mAction == ACTION_DAMAGE) { + i_this->mAction = ACTION_DAMAGE; + i_this->mMode = 0; + } + } + break; + } + } + + for (int i = 0; i <= 2; i++) { + if (i_this->health <= 1) { + i_this->mCcSph[i].SetTgHitMark((CcG_Tg_HitMark)3); + } + } +} + +/* 807B1B78-807B1EB4 0018D8 033C+00 2/1 0/0 0/0 .text action__FP10e_th_class */ +static void action(e_th_class* i_this) { + fopEn_enemy_c* a_this = (fopEn_enemy_c*)i_this; + daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); + cXyz sp50; + cXyz sp44; + + i_this->field_0x6e4 = 0; + i_this->mPlayerDist = fopAcM_searchPlayerDistance(a_this); + i_this->mPlayerAngleY = fopAcM_searchPlayerAngleY(a_this); + + damage_check(i_this); + + s16 angle_chase_step = 0; + s8 on_attention = TRUE; + + switch (i_this->mAction) { + case ACTION_WAIT: + e_th_wait(i_this); + break; + case ACTION_SPIN: + e_th_spin(i_this); + angle_chase_step = KREG_S(5) + 0x400; + break; + case ACTION_SPIN_B: + e_th_spin_B(i_this); + angle_chase_step = KREG_S(5) + 0x300; + break; + case ACTION_SHOT: + angle_chase_step = e_th_shot(i_this); + break; + case ACTION_RETURN: + e_th_return(i_this); + break; + case ACTION_DAMAGE: + e_th_damage(i_this); + break; + case ACTION_START: + e_th_start(i_this); + on_attention = FALSE; + break; + case ACTION_END: + e_th_end(i_this); + on_attention = FALSE; + break; + } + + if (angle_chase_step != 0) { + cLib_addCalcAngleS2(&a_this->shape_angle.y, i_this->mPlayerAngleY, 4, angle_chase_step); + } + + if (on_attention) { + fopAcM_OnStatus(a_this, 0); + a_this->attention_info.flags = 4; + } else { + fopAcM_OffStatus(a_this, 0); + a_this->attention_info.flags = 0; + } + + if (i_this->field_0x6e4 != 0 && i_this->mDemoCamMode == 0) { + cXyz sp38; + s16 var_r27 = 0; + s16 var_r28; + + if (i_this->field_0x6e4 == 3) { + var_r28 = 10000; + } else { + if (i_this->field_0x6e4 == 1) { + sp38 = player->eyePos - a_this->current.pos; + sp38.y += -150.0f + KREG_F(17); + } else if (i_this->field_0x6e4 == 2) { + fopAc_ac_c* ball_p = fopAcM_SearchByID(i_this->mBallID); + sp38 = ball_p->current.pos - a_this->current.pos; + sp38.y += -50.0f + KREG_F(16); + } + + var_r27 = cM_atan2s(sp38.x, sp38.z) - a_this->shape_angle.y; + var_r28 = cM_atan2s(sp38.y, JMAFastSqrt((sp38.x * sp38.x) + (sp38.z * sp38.z))) - a_this->shape_angle.x; + if (var_r27 > (TREG_S(8) + 8000)) { + var_r27 = TREG_S(8) + 8000; + } else if (var_r27 < -(TREG_S(8) + 8000)) { + var_r27 = -(TREG_S(8) + 8000); + } + } + cLib_addCalcAngleS2(&i_this->mHeadRotY, var_r27 / 2, 4, 0x800); + + if (var_r28 > (TREG_S(8) + 8000)) { + var_r28 = TREG_S(8) + 8000; + } else if (var_r28 < -(TREG_S(8) + 8000)) { + var_r28 = -(TREG_S(8) + 8000); + } + cLib_addCalcAngleS2(&i_this->mHeadRotZ, var_r28 / 2, 4, 0x800); + } + + cXyz bind_eff_size(1.8f, 1.8f, 1.8f); + setMidnaBindEffect(a_this, &i_this->mSound, &a_this->eyePos, &bind_eff_size); + + if (dComIfGs_isOneZoneSwitch(1, -1) && player->current.pos.y > 500.0f) { + dComIfGs_onOneZoneSwitch(2, -1); + } +} + +/* 807B1EB4-807B1F98 001C14 00E4+00 1/1 0/0 0/0 .text cam_3d_morf__FP10e_th_classf */ +static void cam_3d_morf(e_th_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_0xd88); + cLib_addCalc2(&i_this->mDemoCamCenter.y, i_this->mDemoCamCenterTarget.y, param_1, i_this->mDemoCamCenterSpd.y * i_this->field_0xd88); + cLib_addCalc2(&i_this->mDemoCamCenter.z, i_this->mDemoCamCenterTarget.z, param_1, i_this->mDemoCamCenterSpd.z * i_this->field_0xd88); + + cLib_addCalc2(&i_this->mDemoCamEye.x, i_this->mDemoCamEyeTarget.x, param_1, i_this->mDemoCamEyeSpd.x * i_this->field_0xd88); + cLib_addCalc2(&i_this->mDemoCamEye.y, i_this->mDemoCamEyeTarget.y, param_1, i_this->mDemoCamEyeSpd.y * i_this->field_0xd88); + cLib_addCalc2(&i_this->mDemoCamEye.z, i_this->mDemoCamEyeTarget.z, param_1, i_this->mDemoCamEyeSpd.z * i_this->field_0xd88); +} + +/* 807B1F98-807B2DEC 001CF8 0E54+00 2/1 0/0 0/0 .text demo_camera__FP10e_th_class */ +static void demo_camera(e_th_class* 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 sp8C; + cXyz sp80; + cXyz sp74; + cXyz sp68; + + s8 sp8 = 0; + + switch (i_this->mDemoCamMode) { + case 1: + if (!i_this->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(i_this, 2, 0xFFFF, 0); + i_this->eventInfo.onCondition(2); + return; + } + + camera->mCamera.Stop(); + i_this->mDemoCamMode = 2; + i_this->mDemoCamTimer = 0; + i_this->mDemoCamFovy = 55.0f; + camera->mCamera.SetTrimSize(3); + + daPy_getPlayerActorClass()->changeOriginalDemo(); + daPy_getPlayerActorClass()->changeDemoMode(1, 0, 0, 0); + dComIfGp_getEvent().startCheckSkipEdge(i_this); + case 2: + sp80.set(1.9f, 0.0f, -1127.0f); + player->setPlayerPosAndAngle(&sp80, -0x8000, 0); + player->speedF = 0.0f; + + if (i_this->mDemoCamTimer >= 1) { + i_this->mDemoCamCenter.set(35.0f, 140.0f, -1262.0f); + i_this->mDemoCamEye.set(130.0f, 98.0f, -963.0f); + + if (i_this->mDemoCamTimer == 1) { + int bitSw = (fopAcM_GetParam(i_this) & 0xFF000000) >> 0x18; + dComIfGs_offSwitch(bitSw, fopAcM_GetRoomNo(i_this)); + } + + if (i_this->mDemoCamTimer == 90) { + i_this->mDemoCamMode = 3; + i_this->mDemoCamTimer = 0; + i_this->mDemoCamFovy = 30.0f; + i_this->mDemoCamCenter.set(0.0f, 180.0f, -1043.0f); + i_this->mDemoCamEye.set(0.0f, 84.0f, -1344.0f); + daPy_getPlayerActorClass()->changeDemoMode(0x48, 0, 0, 0); + } + } + break; + case 3: + if (i_this->mDemoCamTimer > 20) { + cLib_addCalc2(&i_this->mDemoCamFovy, 55.0f, 0.1f, 0.2f * i_this->field_0xd88); + cLib_addCalc2(&i_this->field_0xd88, 1.0f, 1.0f, 0.05f); + + if (i_this->mDemoCamTimer == 145) { + daPy_getPlayerActorClass()->changeDemoMode(0x49, 0, 0, 0); + i_this->mDemoCamMode = 4; + i_this->mDemoCamTimer = 0; + i_this->mDemoCamCenterTarget.set(-172.0f, 99.7f, -1016.0f); + i_this->mDemoCamEyeTarget.set(-210.0f, 84.0f, -1330.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_0xd88 = 0.0f; + } + } + break; + case 4: + if (i_this->mAction == ACTION_WAIT) { + i_this->mTimers[1] = 10; + } + + cLib_addCalc2(&i_this->mDemoCamFovy, 55.0f, 0.1f, 0.2f); + + if (i_this->mDemoCamTimer >= 20 && i_this->mDemoCamTimer == 20) { + daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 2, 0); + sp80.set(-300.0f, 0.0f, -1104.0f); + player->setPlayerPosAndAngle(&sp80, 0, 0); + } + + if (i_this->mDemoCamTimer >= 150) { + if (i_this->mDemoCamTimer == 150) { + i_this->mDemoCamCenterTarget.set(-56.0f, 224.7f, 598.0f); + i_this->mDemoCamEyeTarget.set(-54.5f, 177.0f, 285.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_0xd88 = 0.0f; + } + + cam_3d_morf(i_this, 0.2f); + cLib_addCalc2(&i_this->field_0xd88, 0.05f, 1.0f, 0.002f); + + if (i_this->mDemoCamTimer == 270) { + i_this->mAction = ACTION_SPIN; + i_this->mMode = 0; + + i_this->mDemoCamMode = 5; + i_this->mDemoCamTimer = 0; + i_this->mDemoCamCenterTarget.set(-184.0f, 90.7f,-1028.0f); + i_this->mDemoCamEyeTarget.set(-256.5f, 34.0f, -1331.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_0xd88 = 0.0f; + + fpcM_Search(s_md_sub2, i_this); + dComIfGs_onSwitch(106, fopAcM_GetRoomNo(i_this)); + } + } else if (i_this->mDemoCamTimer >= 15) { + i_this->field_0xd88 = 0.05f; + cam_3d_morf(i_this, 0.2f); + } + break; + case 5: + if (i_this->mDemoCamTimer > 70) { + cam_3d_morf(i_this, 0.1f); + cLib_addCalc2(&i_this->field_0xd88, 0.01f, 1.0f, 0.0003f); + + if (i_this->mDemoCamTimer == 250) { + sp8 = 1; + Z2GetAudioMgr()->subBgmStart(Z2BGM_IB_MBOSS); + } + } + break; + case 10: + if (!i_this->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(i_this, 2, 0xFFFF, 0); + i_this->eventInfo.onCondition(2); + return; + } + + camera->mCamera.Stop(); + i_this->mDemoCamMode = 11; + i_this->mDemoCamTimer = 0; + i_this->mDemoCamFovy = 55.0f; + i_this->field_0xd78 = 0.0f; + i_this->field_0xd88 = 0.0f; + camera->mCamera.SetTrimSize(3); + + if (i_this->shape_angle.y > 0x4000 || i_this->shape_angle.y < -0x4000) { + i_this->current.angle.y = -0x8000; + } else { + i_this->current.angle.y = 0; + } + i_this->shape_angle.y = i_this->current.angle.y; + + e_th_ball_class* ball_p = (e_th_ball_class*)fopAcM_SearchByID(i_this->mBallID); + cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); + sp8C.x = AREG_F(3); + sp8C.y = AREG_F(4); + sp8C.z = 400.0f + AREG_F(5); + MtxPosition(&sp8C, &ball_p->current.pos); + + ball_p->current.pos += i_this->current.pos; + ball_p->shape_angle.set(0, 0, 0x1700); + ball_p->current.angle.y = i_this->shape_angle.y; + ball_p->current.angle.x = -0x1000; + ball_p->speedF = 0.0f; + daPy_getPlayerActorClass()->changeOriginalDemo(); + + if (player->checkNowWolf()) { + daPy_getPlayerActorClass()->changeDemoMode(0x3A, 0, 0, 0); + i_this->field_0x567 = 1; + } else { + daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 2, 0); + } + + anm_init(i_this, 0xE, 2.0f, 0, 1.0f); + i_this->mMode = 1; + dComIfGs_onSaveSwitch(94); + case 11: + if (i_this->mDemoCamTimer == 55 && i_this->field_0x567 != 0) { + daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 2, 0); + } + + cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); + sp8C.x = 100.0f + AREG_F(7); + sp8C.y = AREG_F(8); + sp8C.z = -300.0f + AREG_F(9); + MtxPosition(&sp8C, &sp80); + sp80 += i_this->current.pos; + player->setPlayerPosAndAngle(&sp80, i_this->shape_angle.y, 0); + + sp8C.x = 300.0f + AREG_F(10); + sp8C.y = 80.0f + AREG_F(11); + sp8C.z = 400.0f + AREG_F(12); + MtxPosition(&sp8C, &sp74); + sp74 += i_this->current.pos; + + sp8C.x = AREG_F(13); + sp8C.y = AREG_F(14); + sp8C.z = AREG_F(15); + MtxPosition(&sp8C, &sp68); + sp68 += i_this->current.pos; + sp68.y = 30.0f + i_this->mHeadPos.y + AREG_F(16); + if (sp68.y > 150.0f + (i_this->current.pos.y + AREG_F(17))) { + sp68.y = 150.0f + (i_this->current.pos.y + AREG_F(17)); + } + + if (i_this->mDemoCamTimer == 0) { + i_this->mDemoCamEye = sp74; + i_this->mDemoCamCenter = sp68; + } else { + cLib_addCalc2(&i_this->mDemoCamCenter.x, sp68.x, 0.1f, 20.0f); + cLib_addCalc2(&i_this->mDemoCamCenter.y, sp68.y, 0.1f, 20.0f); + cLib_addCalc2(&i_this->mDemoCamCenter.z, sp68.z, 0.1f, 20.0f); + } + + if (i_this->mDemoCamTimer == 279) { + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER4, 0x4F, cXyz(0.0f, 1.0f, 0.0f)); + fopAcM_effSmokeSet1(&i_this->field_0xd94, &i_this->field_0xd98, &i_this->mHeadPos, &i_this->shape_angle, 2.5f + TREG_F(18), &i_this->tevStr, 1); + i_this->mSound.startCreatureSound(Z2SE_CM_BODYFALL_L, 0, -1); + i_this->mDoEndColorEff = TRUE; + } + + if (i_this->mDemoCamTimer == 380) { + J3DModel* model_p = i_this->mpModelMorf->getModel(); + MTXCopy(model_p->getAnmMtx(1), *calc_mtx); + sp8C.set(BREG_F(11), BREG_F(12), BREG_F(13)); + MtxPosition(&sp8C, &sp80); + fopAcM_createDisappear(i_this, &sp80, 20, 0, 0xFF); + } + + if (i_this->mDemoCamTimer == 382) { + i_this->mNoDraw = TRUE; + } + + if (i_this->mDemoCamTimer != 430) { + break; + } + + i_this->mDemoCamMode = 12; + i_this->mDemoCamTimer = 0; + player->changeDemoMode(0x1E, 0, 0, 0); + + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + sp8C.x = ZREG_F(7); + sp8C.y = 130.0f + ZREG_F(8); + sp8C.z = 170.0f + ZREG_F(9); + MtxPosition(&sp8C, &i_this->mDemoCamEye); + i_this->mDemoCamEye += player->current.pos; + + sp8C.x = ZREG_F(10); + sp8C.y = 130.0f + ZREG_F(11); + sp8C.z = ZREG_F(12); + MtxPosition(&sp8C, &i_this->mDemoCamCenter); + i_this->mDemoCamCenter += player->current.pos; + case 12: + if (i_this->mDemoCamTimer != 100) { + break; + } + daPy_getPlayerActorClass()->changeDemoMode(1, 0, 0, 0); + i_this->mDemoCamMode = 13; + i_this->mDemoCamTimer = 0; + case 13: + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + sp8C.x = -80.0f + ZREG_F(13); + sp8C.y = 80.0f + ZREG_F(14); + sp8C.z = -200.0f + ZREG_F(15); + MtxPosition(&sp8C, &i_this->mDemoCamEye); + i_this->mDemoCamEye += player->current.pos; + + sp8C.x = -30.0f + ZREG_F(16) + i_this->field_0xd78; + sp8C.y = 70.0f + ZREG_F(17); + sp8C.z = ZREG_F(18); + MtxPosition(&sp8C, &i_this->mDemoCamCenter); + i_this->mDemoCamCenter += player->current.pos; + + if (i_this->mDemoCamTimer > 50) { + cLib_addCalc2(&i_this->mDemoCamFovy, 25.0f, 0.1f, i_this->field_0xd88); + cLib_addCalc2(&i_this->field_0xd78, -55.0f, 0.1f, 1.9f * i_this->field_0xd88); + cLib_addCalc2(&i_this->field_0xd88, 1.0f, 1.0f, 0.05f); + + if (i_this->mDemoCamTimer == 170) { + sp8 = 1; + i_this->mMode = 3; + + int bitSw = (fopAcM_GetParam(i_this) & 0xFF000000) >> 0x18; + dComIfGs_onSwitch(bitSw, fopAcM_GetRoomNo(i_this)); + dComIfGs_offSwitch(106, fopAcM_GetRoomNo(i_this)); + } + } + } + + if (sp8 != 0) { + camera->mCamera.Reset(i_this->mDemoCamCenter, i_this->mDemoCamEye); + camera->mCamera.Start(); + camera->mCamera.SetTrimSize(0); + + dComIfGp_event_reset(); + daPy_getPlayerActorClass()->cancelOriginalDemo(); + i_this->mDemoCamMode = 0; + } + + if (i_this->mDemoCamMode != 0) { + camera->mCamera.Set(i_this->mDemoCamCenter, i_this->mDemoCamEye, i_this->mDemoCamFovy, 0); + i_this->mDemoCamTimer++; + + if (i_this->mDemoCamMode >= 2 && i_this->mDemoCamMode < 10 && dComIfGp_getEvent().checkSkipEdge()) { + Z2GetAudioMgr()->subBgmStop(); + cDmr_SkipInfo = 30; + dStage_changeScene(4, 0.0f, 0, fopAcM_GetRoomNo(i_this), 0, -1); + } + } +} + +/* 807B2DEC-807B300C 002B4C 0220+00 1/1 0/0 0/0 .text anm_se_set__FP10e_th_class */ +static void anm_se_set(e_th_class* i_this) { + u32 sound_id = 0; + u32 voice_id = 0; + + if (i_this->mAnm == 5 && i_this->mpModelMorf->checkFrame(13.0f)) { + sound_id = Z2SE_EN_TH_BRANDISH_START; + } else if ((i_this->mAnm == 7 || i_this->mAnm == 8) && i_this->mpModelMorf->checkFrame(1.0f)) { + voice_id = Z2SE_EN_TH_V_DAMAGE; + } else if (i_this->mAnm == 0xE && i_this->mpModelMorf->checkFrame(1.0f)) { + voice_id = Z2SE_EN_TH_V_ENDDEMO; + } else if (i_this->mAnm == 0x12 && (i_this->mpModelMorf->checkFrame(1.0f) || i_this->mpModelMorf->checkFrame(45.0f))) { + voice_id = Z2SE_EN_TH_V_LOOKAROUND; + } else if (i_this->mAnm == 0x17 && i_this->mpModelMorf->checkFrame(7.0f)) { + voice_id = Z2SE_EN_TH_V_PULLBACK; + } else if (i_this->mAnm == 0x18) { + if (i_this->mpModelMorf->checkFrame(1.0f)) { + sound_id = Z2SE_EN_TH_BRANDISH; + } else if (i_this->mpModelMorf->checkFrame(18.0f)) { + voice_id = Z2SE_EN_TH_V_THROW; + } + } else if (i_this->mAnm == 0x1A && i_this->mpModelMorf->checkFrame(1.0f)) { + voice_id = Z2SE_EN_TH_V_TRAP; + } + + if (sound_id != 0) { + i_this->mSound.startCreatureSound(sound_id, 0, -1); + } + + if (voice_id != 0) { + i_this->mSound.startCreatureVoice(voice_id, -1); + } +} + +/* 807B4870-807B4874 000008 0004+00 2/2 0/0 0/0 .bss None */ +static u8 l_initHIO; + +/* 807B4880-807B4898 000018 0018+00 3/3 0/0 0/0 .bss l_HIO */ +static daE_TH_HIO_c l_HIO; + +/* 807B300C-807B3514 002D6C 0508+00 2/1 0/0 0/0 .text daE_TH_Execute__FP10e_th_class */ +static int daE_TH_Execute(e_th_class* i_this) { + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + cXyz sp2C; + cXyz sp20; + cXyz sp14; + + if (cDmr_SkipInfo != 0) { + cDmr_SkipInfo--; + } + + i_this->mCounter++; + + for (int i = 0; i < 4; i++) { + if (i_this->mTimers[i] != 0) { + i_this->mTimers[i]--; + } + } + + if (i_this->field_0x6a4 != 0) { + i_this->field_0x6a4--; + } + + if (i_this->field_0x6a6 != 0) { + i_this->field_0x6a6--; + } + + action(i_this); + i_this->mAcch.CrrPos(dComIfG_Bgsp()); + + mDoMtx_stack_c::transS(a_this->current.pos.x, a_this->current.pos.y, a_this->current.pos.z); + mDoMtx_stack_c::YrotM((s16)a_this->shape_angle.y); + mDoMtx_stack_c::XrotM((s16)a_this->shape_angle.x); + mDoMtx_stack_c::scaleM(l_HIO.base_size, l_HIO.base_size, l_HIO.base_size); + mDoMtx_stack_c::transM(50.0f + KREG_F(10), 0.0f, 50.0f + KREG_F(1)); + + J3DModel* model_p = i_this->mpModelMorf->getModel(); + model_p->setBaseTRMtx(mDoMtx_stack_c::get()); + + i_this->mpModelMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(a_this))); + anm_se_set(i_this); + i_this->mpModelMorf->modelCalc(); + + MTXCopy(model_p->getAnmMtx(4), *calc_mtx); + sp2C.set(0.0f, 0.0f, 0.0f); + MtxPosition(&sp2C, &i_this->mHeadPos); + i_this->mCcSph[0].SetC(i_this->mHeadPos); + i_this->mCcSph[0].SetR(35.0f); + + MTXCopy(model_p->getAnmMtx(1), *calc_mtx); + sp2C.set(BREG_F(11), BREG_F(12), BREG_F(13)); + MtxPosition(&sp2C, &sp20); + i_this->mCcSph[1].SetC(sp20); + i_this->mCcSph[1].SetR(60.0f); + + MTXCopy(model_p->getAnmMtx(2), *calc_mtx); + sp2C.set(BREG_F(14), BREG_F(15), BREG_F(16)); + MtxPosition(&sp2C, &sp20); + i_this->mCcSph[2].SetC(sp20); + i_this->mCcSph[2].SetR(75.0f); + + i_this->field_0x6ea = 0; + + s16 sp8 = i_this->mPlayerAngleY - a_this->shape_angle.y; + if (i_this->mAnm != 0x14 && sp8 < 0x4000 && sp8 > -0x4000) { + a_this->eyePos = i_this->mHeadPos; + i_this->field_0x6ea = 1; + } else if (i_this->field_0x6a4 != 0) { + sp20.set(-50000.0f, 20000.0f, 18000.0f); + for (int i = 0; i <= 2; i++) { + i_this->mCcSph[i].SetC(sp20); + } + } else { + MTXCopy(model_p->getAnmMtx(0x1B), *calc_mtx); + sp2C.set(0.0f, 0.0f, 0.0f); + MtxPosition(&sp2C, &i_this->mTailPos); + a_this->eyePos = i_this->mTailPos; + + sp2C.set(-50.0f + BREG_F(11), 60.0f + BREG_F(12), BREG_F(13)); + MtxPosition(&sp2C, &sp20); + i_this->mCcSph[1].SetC(sp20); + } + + a_this->attention_info.position = a_this->eyePos; + a_this->attention_info.position.y += (40.0f + AREG_F(4)) * l_HIO.base_size; + + for (int i = 0; i <= 2; i++) { + if (i_this->field_0x6ea != 0) { + i_this->mCcSph[i].OnTgShield(); + i_this->mCcSph[i].SetTgHitMark((CcG_Tg_HitMark)2); + } else { + i_this->mCcSph[i].OffTgShield(); + i_this->mCcSph[i].SetTgHitMark((CcG_Tg_HitMark)0); + } + + dComIfG_Ccsp()->Set(&i_this->mCcSph[i]); + } + + MTXCopy(model_p->getAnmMtx(0xC), *calc_mtx); + sp2C.set(15.0f, -20.0f, -20.0f); + MtxPosition(&sp2C, &i_this->mHandL_Pos1); + sp2C.set(15.0f, 20.0f, -10.0f); + MtxPosition(&sp2C, &i_this->mHandL_Pos2); + + MTXCopy(model_p->getAnmMtx(0x11), *calc_mtx); + sp2C.set(20.0f, -20.0f, 5.0f); + MtxPosition(&sp2C, &i_this->mHandR_Pos1); + sp2C.set(5.0f, 20.0f, 10.0f); + MtxPosition(&sp2C, &i_this->mHandR_Pos2); + + ke_move(i_this); + demo_camera(i_this); + return 1; +} + +/* 807B3514-807B351C 003274 0008+00 1/0 0/0 0/0 .text daE_TH_IsDelete__FP10e_th_class */ +static int daE_TH_IsDelete(e_th_class* i_this) { + return 1; +} + +/* 807B351C-807B3584 00327C 0068+00 1/0 0/0 0/0 .text daE_TH_Delete__FP10e_th_class */ +static int daE_TH_Delete(e_th_class* i_this) { + fopAcM_GetID(i_this); + dComIfG_resDelete(&i_this->mPhase, "E_th"); + + if (i_this->mInitHIO) { + l_initHIO = FALSE; + mDoHIO_DELETE_CHILD(&l_HIO); + } + + if (i_this->heap != NULL) { + i_this->mpModelMorf->stopZelAnime(); + } + + return 1; +} + +/* 807B3584-807B36D0 0032E4 014C+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */ +static int useHeapInit(fopAc_ac_c* a_this) { + e_th_class* i_this = (e_th_class*)a_this; + + i_this->mpModelMorf = new mDoExt_McaMorfSO((J3DModelData*)dComIfG_getObjectRes("E_th", 0x1F), NULL, NULL, (J3DAnmTransform*)dComIfG_getObjectRes("E_th", 0x1B), 0, 1.0f, 0, -1, &i_this->mSound, 0, 0x11000084); + if (i_this->mpModelMorf == NULL || i_this->mpModelMorf->getModel() == NULL) { + return 0; + } + + J3DModel* model_p = i_this->mpModelMorf->getModel(); + model_p->setUserArea((u32)i_this); + + for (u16 i = 0; i < model_p->getModelData()->getJointNum(); i++) { + model_p->getModelData()->getJointNodePointer(i)->setCallBack(nodeCallBack); + } + + if (!i_this->mKeLineMat.init(3, 15, 0)) { + return 0; + } + + return 1; +} + +/* 807B36D0-807B3B58 003430 0488+00 1/0 0/0 0/0 .text daE_TH_Create__FP10fopAc_ac_c */ +static int daE_TH_Create(fopAc_ac_c* a_this) { + e_th_class* i_this = (e_th_class*)a_this; + fopAcM_SetupActor(i_this, e_th_class); + + int phase_state = dComIfG_resLoad(&i_this->mPhase, "E_th"); + if (phase_state == cPhs_COMPLEATE_e) { + OS_REPORT("E_th PARAM %x\n", fopAcM_GetParam(a_this)); + + i_this->field_0x5b6 = fopAcM_GetParam(a_this); + if (i_this->field_0x5b6 == 2 && dComIfGs_isStageMiddleBoss() && checkItemGet(fpcNm_ITEM_IRONBALL, TRUE)) { + return cPhs_ERROR_e; + } + + i_this->field_0x5b7 = (fopAcM_GetParam(i_this) & 0xF00) >> 8; + i_this->field_0x5b8 = (fopAcM_GetParam(i_this) & 0xF000) >> 12; + + if (i_this->field_0x5b6 == 0xFF) { + i_this->field_0x5b6 = 0; + } + + if (i_this->field_0x5b7 == 0xF) { + i_this->field_0x5b7 = 0; + } + + int sp10 = (fopAcM_GetParam(i_this) & 0xFF0000) >> 0x10; + i_this->field_0x5b9 = (fopAcM_GetParam(i_this) & 0xFF000000) >> 0x18; + + OS_REPORT("E_th//////////////E_TH SET 1 !!\n"); + + if (!fopAcM_entrySolidHeap(i_this, useHeapInit, 0x4B000)) { + OS_REPORT("//////////////E_TH SET NON !!\n"); + return cPhs_ERROR_e; + } + + if (!l_initHIO) { + i_this->mInitHIO = TRUE; + l_initHIO = TRUE; + l_HIO.no = mDoHIO_CREATE_CHILD("鉄球兵", &l_HIO); + } + + fopAcM_SetMtx(i_this, i_this->mpModelMorf->getModel()->getBaseTRMtx()); + fopAcM_SetMin(i_this, -300.0f, -500.0f, -300.0f); + fopAcM_SetMax(i_this, 300.0f, 500.0f, 300.0f); + + i_this->mAcch.Set(fopAcM_GetPosition_p(i_this), fopAcM_GetOldPosition_p(i_this), i_this, 1, &i_this->mAcchCir, fopAcM_GetSpeed_p(i_this), NULL, NULL); + i_this->mAcchCir.SetWall(100.0f, 400.0f + BREG_F(11)); + + i_this->health = 300; + i_this->field_0x560 = 300; + + i_this->mCcStts.Init(0xFA, 0, i_this); + + static dCcD_SrcSph cc_sph_src = { + { + {0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x3}, 0x75}}, // 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 + }; + + for (int i = 0; i <= 2; i++) { + i_this->mCcSph[i].Set(cc_sph_src); + i_this->mCcSph[i].SetStts(&i_this->mCcStts); + } + + i_this->mCounter = (u16)cM_rndF(65535.0f) & 0xFF00; + i_this->mSound.init(&i_this->current.pos, &i_this->eyePos, 3, 1); + i_this->mAtInfo.mpSound = &i_this->mSound; + + i_this->mBallID = fopAcM_createChild(PROC_E_TH_BALL, fopAcM_GetID(i_this), 0, &i_this->current.pos, fopAcM_GetRoomNo(i_this), &i_this->shape_angle, NULL, -1, NULL); + + if (i_this->field_0x5b6 == 2 && dComIfGs_isStageMiddleBoss()) { + i_this->mAction = ACTION_END; + i_this->mMode = 3; + i_this->field_0x68a |= 4; + i_this->mNoDraw = TRUE; + dComIfGs_offSwitch(106, fopAcM_GetRoomNo(i_this)); + } else { + if (cDmr_SkipInfo != 0) { + i_this->mAction = ACTION_WAIT; + Z2GetAudioMgr()->subBgmStart(Z2BGM_IB_MBOSS); + dComIfGs_onSwitch(106, fopAcM_GetRoomNo(i_this)); + dComIfGs_onOneZoneSwitch(1, -1); + } else { + i_this->mAction = ACTION_START; + i_this->mNoDraw = TRUE; + i_this->current.pos.z = 560.0f; + dComIfGs_offSwitch(106, fopAcM_GetRoomNo(i_this)); + } + + i_this->shape_angle.y = -0x8000; + i_this->current.angle.y = -0x8000; + } + + i_this->attention_info.distances[fopAc_attn_BATTLE_e] = 60; + daE_TH_Execute(i_this); + } + + return phase_state; +} /* 807B4794-807B47B4 -00001 0020+00 1/0 0/0 0/0 .data l_daE_TH_Method */ static actor_method_class l_daE_TH_Method = { - (process_method_func)daE_TH_Create__FP10fopAc_ac_c, - (process_method_func)daE_TH_Delete__FP10e_th_class, - (process_method_func)daE_TH_Execute__FP10e_th_class, - (process_method_func)daE_TH_IsDelete__FP10e_th_class, - (process_method_func)daE_TH_Draw__FP10e_th_class, + (process_method_func)daE_TH_Create, + (process_method_func)daE_TH_Delete, + (process_method_func)daE_TH_Execute, + (process_method_func)daE_TH_IsDelete, + (process_method_func)daE_TH_Draw, }; /* 807B47B4-807B47E4 -00001 0030+00 0/0 0/0 1/0 .data g_profile_E_TH */ @@ -327,963 +1339,3 @@ extern actor_process_profile_definition g_profile_E_TH = { fopAc_ENEMY_e, // mActorType fopAc_CULLBOX_CUSTOM_e, // cullType }; - -/* 807B47E4-807B47F0 000198 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, -}; - -/* 807B47F0-807B47FC 0001A4 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, -}; - -/* 807B47FC-807B4808 0001B0 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, -}; - -/* 807B4808-807B4814 0001BC 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGAab */ -SECTION_DATA extern void* __vt__8cM3dGAab[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGAabFv, -}; - -/* 807B4814-807B4820 0001C8 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGSph */ -SECTION_DATA extern void* __vt__8cM3dGSph[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGSphFv, -}; - -/* 807B4820-807B4834 0001D4 0014+00 1/1 0/0 0/0 .data __vt__18mDoExt_3DlineMat_c */ -SECTION_DATA extern void* __vt__18mDoExt_3DlineMat_c[5] = { - (void*)NULL /* RTTI */, (void*)NULL, (void*)NULL, (void*)NULL, (void*)NULL, -}; - -/* 807B4834-807B4858 0001E8 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_807B4030, - (void*)NULL, - (void*)NULL, - (void*)func_807B4028, -}; - -/* 807B4858-807B4864 00020C 000C+00 2/2 0/0 0/0 .data __vt__12daE_TH_HIO_c */ -SECTION_DATA extern void* __vt__12daE_TH_HIO_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12daE_TH_HIO_cFv, -}; - -/* 807B038C-807B03C4 0000EC 0038+00 1/1 0/0 0/0 .text __ct__12daE_TH_HIO_cFv */ -daE_TH_HIO_c::daE_TH_HIO_c() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 807B44D0-807B44D4 000034 0004+00 1/2 0/0 0/0 .rodata @3942 */ -SECTION_RODATA static f32 const lit_3942 = 560.0f; -COMPILER_STRIP_GATE(0x807B44D0, &lit_3942); - -/* 807B03C4-807B0434 000124 0070+00 1/1 0/0 0/0 .text s_md_sub1__FPvPv */ -static void s_md_sub1(void* param_0, void* param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 807B44D4-807B44D8 000038 0004+00 1/1 0/0 0/0 .rodata @3956 */ -SECTION_RODATA static f32 const lit_3956 = -950.0f; -COMPILER_STRIP_GATE(0x807B44D4, &lit_3956); - -/* 807B0434-807B04A4 000194 0070+00 1/1 0/0 0/0 .text s_md_sub2__FPvPv */ -static void s_md_sub2(void* param_0, void* param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 807B44D8-807B44DC 00003C 0004+00 1/1 0/0 0/0 .rodata @3970 */ -SECTION_RODATA static f32 const lit_3970 = -1.0f; -COMPILER_STRIP_GATE(0x807B44D8, &lit_3970); - -/* 807B4644-807B4644 0001A8 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_807B4644 = "E_th"; -#pragma pop - -/* 807B04A4-807B0550 000204 00AC+00 6/6 0/0 0/0 .text anm_init__FP10e_th_classifUcf */ -static void anm_init(e_th_class* param_0, int param_1, f32 param_2, u8 param_3, f32 param_4) { - // NONMATCHING -} - -/* 807B0550-807B0630 0002B0 00E0+00 1/1 0/0 0/0 .text nodeCallBack__FP8J3DJointi */ -static void nodeCallBack(J3DJoint* param_0, int param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 807B44DC-807B44E0 000040 0004+00 0/2 0/0 0/0 .rodata @4055 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4055 = 13.0f; -COMPILER_STRIP_GATE(0x807B44DC, &lit_4055); -#pragma pop - -/* 807B44E0-807B44E4 000044 0004+00 0/2 0/0 0/0 .rodata @4056 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4056 = -10.0f; -COMPILER_STRIP_GATE(0x807B44E0, &lit_4056); -#pragma pop - -/* 807B44E4-807B44E8 000048 0004+00 0/1 0/0 0/0 .rodata @4057 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4057 = 0.75f; -COMPILER_STRIP_GATE(0x807B44E4, &lit_4057); -#pragma pop - -/* 807B44E8-807B44EC 00004C 0004+00 0/1 0/0 0/0 .rodata @4058 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_4058 = 0x3A83126F; -COMPILER_STRIP_GATE(0x807B44E8, &lit_4058); -#pragma pop - -/* 807B44EC-807B44F0 000050 0004+00 0/1 0/0 0/0 .rodata @4059 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4059 = 1.0f / 10.0f; -COMPILER_STRIP_GATE(0x807B44EC, &lit_4059); -#pragma pop - -/* 807B44F0-807B44F4 000054 0004+00 0/1 0/0 0/0 .rodata @4060 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4060 = 2.0f; -COMPILER_STRIP_GATE(0x807B44F0, &lit_4060); -#pragma pop - -/* 807B44F4-807B44F8 000058 0004+00 0/4 0/0 0/0 .rodata @4061 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4061 = 10.0f; -COMPILER_STRIP_GATE(0x807B44F4, &lit_4061); -#pragma pop - -/* 807B44F8-807B44FC 00005C 0004+00 0/2 0/0 0/0 .rodata @4062 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4062 = 15.0f; -COMPILER_STRIP_GATE(0x807B44F8, &lit_4062); -#pragma pop - -/* 807B44FC-807B4504 000060 0008+00 0/1 0/0 0/0 .rodata @4064 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4064[8] = { - 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x807B44FC, &lit_4064); -#pragma pop - -/* 807B0630-807B09A4 000390 0374+00 1/1 0/0 0/0 .text ke_control__FP10e_th_classP7th_ke_si */ -static void ke_control(e_th_class* param_0, th_ke_s* param_1, int param_2) { - // NONMATCHING -} - -/* 807B09A4-807B09E8 000704 0044+00 1/1 0/0 0/0 .text ke_pos_set__FP10e_th_classP7th_ke_si */ -static void ke_pos_set(e_th_class* param_0, th_ke_s* param_1, int param_2) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 807B4504-807B4508 000068 0004+00 1/1 0/0 0/0 .rodata @4087 */ -SECTION_RODATA static f32 const lit_4087 = 3.5f; -COMPILER_STRIP_GATE(0x807B4504, &lit_4087); - -/* 807B09E8-807B0A6C 000748 0084+00 1/1 0/0 0/0 .text ke_disp__FP10e_th_class */ -static void ke_disp(e_th_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 807B4508-807B450C 00006C 0004+00 0/1 0/0 0/0 .rodata @4127 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4127 = 27.0f; -COMPILER_STRIP_GATE(0x807B4508, &lit_4127); -#pragma pop - -/* 807B450C-807B4510 000070 0004+00 0/3 0/0 0/0 .rodata @4128 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4128 = 35.0f; -COMPILER_STRIP_GATE(0x807B450C, &lit_4128); -#pragma pop - -/* 807B0A6C-807B0BD0 0007CC 0164+00 1/1 0/0 0/0 .text ke_move__FP10e_th_class */ -static void ke_move(e_th_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 807B4510-807B4514 000074 0004+00 0/2 0/0 0/0 .rodata @4164 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4164 = 50.0f; -COMPILER_STRIP_GATE(0x807B4510, &lit_4164); -#pragma pop - -/* 807B4514-807B4518 000078 0004+00 0/1 0/0 0/0 .rodata @4165 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4165 = 1200.0f; -COMPILER_STRIP_GATE(0x807B4514, &lit_4165); -#pragma pop - -/* 807B0BD0-807B0D7C 000930 01AC+00 1/0 0/0 0/0 .text daE_TH_Draw__FP10e_th_class */ -static void daE_TH_Draw(e_th_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 807B4518-807B451C 00007C 0004+00 0/2 0/0 0/0 .rodata @4263 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4263 = 60.0f; -COMPILER_STRIP_GATE(0x807B4518, &lit_4263); -#pragma pop - -/* 807B451C-807B4520 000080 0004+00 0/3 0/0 0/0 .rodata @4264 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4264 = 5.0f; -COMPILER_STRIP_GATE(0x807B451C, &lit_4264); -#pragma pop - -/* 807B0D7C-807B0EFC 000ADC 0180+00 1/1 0/0 0/0 .text e_th_wait__FP10e_th_class */ -static void e_th_wait(e_th_class* param_0) { - // NONMATCHING -} - -/* 807B0EFC-807B0F20 000C5C 0024+00 1/1 0/0 0/0 .text e_th_spin__FP10e_th_class */ -static void e_th_spin(e_th_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 807B4520-807B4524 000084 0004+00 0/2 0/0 0/0 .rodata @4351 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4351 = 0.5f; -COMPILER_STRIP_GATE(0x807B4520, &lit_4351); -#pragma pop - -/* 807B0F20-807B12B0 000C80 0390+00 2/1 0/0 0/0 .text e_th_spin_B__FP10e_th_class */ -static void e_th_spin_B(e_th_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 807B4524-807B4528 000088 0004+00 0/3 0/0 0/0 .rodata @4352 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4352 = 3.0f; -COMPILER_STRIP_GATE(0x807B4524, &lit_4352); -#pragma pop - -/* 807B4528-807B452C 00008C 0004+00 0/0 0/0 0/0 .rodata @4353 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4353 = 200.0f; -COMPILER_STRIP_GATE(0x807B4528, &lit_4353); -#pragma pop - -/* 807B452C-807B4530 000090 0004+00 0/1 0/0 0/0 .rodata @4354 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4354 = 4.0f; -COMPILER_STRIP_GATE(0x807B452C, &lit_4354); -#pragma pop - -/* 807B12B0-807B141C 001010 016C+00 1/1 0/0 0/0 .text e_th_shot__FP10e_th_class */ -static void e_th_shot(e_th_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 807B4530-807B4534 000094 0004+00 0/0 0/0 0/0 .rodata @4355 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4355 = 1.5f; -COMPILER_STRIP_GATE(0x807B4530, &lit_4355); -#pragma pop - -/* 807B4534-807B4538 000098 0004+00 0/0 0/0 0/0 .rodata @4356 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4356 = 1.0f / 40.0f; -COMPILER_STRIP_GATE(0x807B4534, &lit_4356); -#pragma pop - -/* 807B4538-807B453C 00009C 0004+00 0/2 0/0 0/0 .rodata @4462 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4462 = 300.0f; -COMPILER_STRIP_GATE(0x807B4538, &lit_4462); -#pragma pop - -/* 807B141C-807B1670 00117C 0254+00 1/1 0/0 0/0 .text e_th_return__FP10e_th_class */ -static void e_th_return(e_th_class* param_0) { - // NONMATCHING -} - -/* 807B1670-807B176C 0013D0 00FC+00 1/1 0/0 0/0 .text e_th_damage__FP10e_th_class */ -static void e_th_damage(e_th_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 807B453C-807B4540 0000A0 0004+00 1/1 0/0 0/0 .rodata @4513 */ -SECTION_RODATA static f32 const lit_4513 = -1200.0f; -COMPILER_STRIP_GATE(0x807B453C, &lit_4513); - -/* 807B176C-807B18C0 0014CC 0154+00 1/1 0/0 0/0 .text e_th_start__FP10e_th_class */ -static void e_th_start(e_th_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 807B4540-807B4544 0000A4 0004+00 0/1 0/0 0/0 .rodata @4540 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4540 = 10000.0f; -COMPILER_STRIP_GATE(0x807B4540, &lit_4540); -#pragma pop - -/* 807B4544-807B4548 0000A8 0004+00 0/1 0/0 0/0 .rodata @4541 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4541 = -30.0f; -COMPILER_STRIP_GATE(0x807B4544, &lit_4541); -#pragma pop - -/* 807B4548-807B454C 0000AC 0004+00 0/1 0/0 0/0 .rodata @4542 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4542 = 2.0f / 5.0f; -COMPILER_STRIP_GATE(0x807B4548, &lit_4542); -#pragma pop - -/* 807B18C0-807B19AC 001620 00EC+00 1/1 0/0 0/0 .text e_th_end__FP10e_th_class */ -static void e_th_end(e_th_class* param_0) { - // NONMATCHING -} - -/* 807B19AC-807B1B78 00170C 01CC+00 1/1 0/0 0/0 .text damage_check__FP10e_th_class */ -static void damage_check(e_th_class* param_0) { - // NONMATCHING -} - -/* 807B1B78-807B1EB4 0018D8 033C+00 2/1 0/0 0/0 .text action__FP10e_th_class */ -static void action(e_th_class* param_0) { - // NONMATCHING -} - -/* 807B1EB4-807B1F98 001C14 00E4+00 1/1 0/0 0/0 .text cam_3d_morf__FP10e_th_classf */ -static void cam_3d_morf(e_th_class* param_0, f32 param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 807B454C-807B4550 0000B0 0004+00 0/0 0/0 0/0 .rodata @4678 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4678 = -150.0f; -COMPILER_STRIP_GATE(0x807B454C, &lit_4678); -#pragma pop - -/* 807B4550-807B4554 0000B4 0004+00 0/1 0/0 0/0 .rodata @4679 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4679 = -50.0f; -COMPILER_STRIP_GATE(0x807B4550, &lit_4679); -#pragma pop - -/* 807B4554-807B4558 0000B8 0004+00 0/0 0/0 0/0 .rodata @4680 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4680 = 9.0f / 5.0f; -COMPILER_STRIP_GATE(0x807B4554, &lit_4680); -#pragma pop - -/* 807B4558-807B455C 0000BC 0004+00 0/1 0/0 0/0 .rodata @4681 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4681 = 500.0f; -COMPILER_STRIP_GATE(0x807B4558, &lit_4681); -#pragma pop - -/* 807B455C-807B4560 0000C0 0004+00 0/1 0/0 0/0 .rodata @5086 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5086 = 55.0f; -COMPILER_STRIP_GATE(0x807B455C, &lit_5086); -#pragma pop - -/* 807B4560-807B4564 0000C4 0004+00 0/1 0/0 0/0 .rodata @5087 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5087 = 19.0f / 10.0f; -COMPILER_STRIP_GATE(0x807B4560, &lit_5087); -#pragma pop - -/* 807B4564-807B4568 0000C8 0004+00 0/1 0/0 0/0 .rodata @5088 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5088 = -1127.0f; -COMPILER_STRIP_GATE(0x807B4564, &lit_5088); -#pragma pop - -/* 807B4568-807B456C 0000CC 0004+00 0/1 0/0 0/0 .rodata @5089 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5089 = 140.0f; -COMPILER_STRIP_GATE(0x807B4568, &lit_5089); -#pragma pop - -/* 807B456C-807B4570 0000D0 0004+00 0/1 0/0 0/0 .rodata @5090 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5090 = -1262.0f; -COMPILER_STRIP_GATE(0x807B456C, &lit_5090); -#pragma pop - -/* 807B4570-807B4574 0000D4 0004+00 0/1 0/0 0/0 .rodata @5091 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5091 = 130.0f; -COMPILER_STRIP_GATE(0x807B4570, &lit_5091); -#pragma pop - -/* 807B4574-807B4578 0000D8 0004+00 0/1 0/0 0/0 .rodata @5092 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5092 = 98.0f; -COMPILER_STRIP_GATE(0x807B4574, &lit_5092); -#pragma pop - -/* 807B4578-807B457C 0000DC 0004+00 0/1 0/0 0/0 .rodata @5093 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5093 = -963.0f; -COMPILER_STRIP_GATE(0x807B4578, &lit_5093); -#pragma pop - -/* 807B457C-807B4580 0000E0 0004+00 0/1 0/0 0/0 .rodata @5094 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5094 = 30.0f; -COMPILER_STRIP_GATE(0x807B457C, &lit_5094); -#pragma pop - -/* 807B4580-807B4584 0000E4 0004+00 0/1 0/0 0/0 .rodata @5095 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5095 = 180.0f; -COMPILER_STRIP_GATE(0x807B4580, &lit_5095); -#pragma pop - -/* 807B4584-807B4588 0000E8 0004+00 0/1 0/0 0/0 .rodata @5096 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5096 = -1043.0f; -COMPILER_STRIP_GATE(0x807B4584, &lit_5096); -#pragma pop - -/* 807B4588-807B458C 0000EC 0004+00 0/1 0/0 0/0 .rodata @5097 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5097 = 84.0f; -COMPILER_STRIP_GATE(0x807B4588, &lit_5097); -#pragma pop - -/* 807B458C-807B4590 0000F0 0004+00 0/1 0/0 0/0 .rodata @5098 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5098 = -1344.0f; -COMPILER_STRIP_GATE(0x807B458C, &lit_5098); -#pragma pop - -/* 807B1F98-807B2DEC 001CF8 0E54+00 2/1 0/0 0/0 .text demo_camera__FP10e_th_class */ -static void demo_camera(e_th_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 807B4590-807B4594 0000F4 0004+00 0/0 0/0 0/0 .rodata @5099 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5099 = 1.0f / 5.0f; -COMPILER_STRIP_GATE(0x807B4590, &lit_5099); -#pragma pop - -/* 807B4594-807B4598 0000F8 0004+00 0/0 0/0 0/0 .rodata @5100 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5100 = 1.0f / 20.0f; -COMPILER_STRIP_GATE(0x807B4594, &lit_5100); -#pragma pop - -/* 807B4598-807B459C 0000FC 0004+00 0/0 0/0 0/0 .rodata @5101 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5101 = -172.0f; -COMPILER_STRIP_GATE(0x807B4598, &lit_5101); -#pragma pop - -/* 807B459C-807B45A0 000100 0004+00 0/0 0/0 0/0 .rodata @5102 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_5102 = 0x42C76666; -COMPILER_STRIP_GATE(0x807B459C, &lit_5102); -#pragma pop - -/* 807B45A0-807B45A4 000104 0004+00 0/0 0/0 0/0 .rodata @5103 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5103 = -1016.0f; -COMPILER_STRIP_GATE(0x807B45A0, &lit_5103); -#pragma pop - -/* 807B45A4-807B45A8 000108 0004+00 0/0 0/0 0/0 .rodata @5104 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5104 = -210.0f; -COMPILER_STRIP_GATE(0x807B45A4, &lit_5104); -#pragma pop - -/* 807B45A8-807B45AC 00010C 0004+00 0/0 0/0 0/0 .rodata @5105 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5105 = -1330.0f; -COMPILER_STRIP_GATE(0x807B45A8, &lit_5105); -#pragma pop - -/* 807B45AC-807B45B0 000110 0004+00 0/1 0/0 0/0 .rodata @5106 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5106 = -300.0f; -COMPILER_STRIP_GATE(0x807B45AC, &lit_5106); -#pragma pop - -/* 807B45B0-807B45B4 000114 0004+00 0/0 0/0 0/0 .rodata @5107 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5107 = -1104.0f; -COMPILER_STRIP_GATE(0x807B45B0, &lit_5107); -#pragma pop - -/* 807B45B4-807B45B8 000118 0004+00 0/0 0/0 0/0 .rodata @5108 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5108 = -56.0f; -COMPILER_STRIP_GATE(0x807B45B4, &lit_5108); -#pragma pop - -/* 807B45B8-807B45BC 00011C 0004+00 0/0 0/0 0/0 .rodata @5109 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_5109 = 0x4360B333; -COMPILER_STRIP_GATE(0x807B45B8, &lit_5109); -#pragma pop - -/* 807B45BC-807B45C0 000120 0004+00 0/0 0/0 0/0 .rodata @5110 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5110 = 598.0f; -COMPILER_STRIP_GATE(0x807B45BC, &lit_5110); -#pragma pop - -/* 807B45C0-807B45C4 000124 0004+00 0/0 0/0 0/0 .rodata @5111 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5111 = -54.5f; -COMPILER_STRIP_GATE(0x807B45C0, &lit_5111); -#pragma pop - -/* 807B45C4-807B45C8 000128 0004+00 0/0 0/0 0/0 .rodata @5112 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5112 = 177.0f; -COMPILER_STRIP_GATE(0x807B45C4, &lit_5112); -#pragma pop - -/* 807B45C8-807B45CC 00012C 0004+00 0/0 0/0 0/0 .rodata @5113 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5113 = 285.0f; -COMPILER_STRIP_GATE(0x807B45C8, &lit_5113); -#pragma pop - -/* 807B45CC-807B45D0 000130 0004+00 0/0 0/0 0/0 .rodata @5114 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_5114 = 0x3B03126F; -COMPILER_STRIP_GATE(0x807B45CC, &lit_5114); -#pragma pop - -/* 807B45D0-807B45D4 000134 0004+00 0/0 0/0 0/0 .rodata @5115 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5115 = -184.0f; -COMPILER_STRIP_GATE(0x807B45D0, &lit_5115); -#pragma pop - -/* 807B45D4-807B45D8 000138 0004+00 0/0 0/0 0/0 .rodata @5116 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_5116 = 0x42B56666; -COMPILER_STRIP_GATE(0x807B45D4, &lit_5116); -#pragma pop - -/* 807B45D8-807B45DC 00013C 0004+00 0/0 0/0 0/0 .rodata @5117 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5117 = -1028.0f; -COMPILER_STRIP_GATE(0x807B45D8, &lit_5117); -#pragma pop - -/* 807B45DC-807B45E0 000140 0004+00 0/0 0/0 0/0 .rodata @5118 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5118 = -256.5f; -COMPILER_STRIP_GATE(0x807B45DC, &lit_5118); -#pragma pop - -/* 807B45E0-807B45E4 000144 0004+00 0/0 0/0 0/0 .rodata @5119 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5119 = 34.0f; -COMPILER_STRIP_GATE(0x807B45E0, &lit_5119); -#pragma pop - -/* 807B45E4-807B45E8 000148 0004+00 0/0 0/0 0/0 .rodata @5120 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5120 = -1331.0f; -COMPILER_STRIP_GATE(0x807B45E4, &lit_5120); -#pragma pop - -/* 807B45E8-807B45EC 00014C 0004+00 0/0 0/0 0/0 .rodata @5121 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_5121 = 0x399D4952; -COMPILER_STRIP_GATE(0x807B45E8, &lit_5121); -#pragma pop - -/* 807B45EC-807B45F0 000150 0004+00 0/1 0/0 0/0 .rodata @5122 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5122 = 400.0f; -COMPILER_STRIP_GATE(0x807B45EC, &lit_5122); -#pragma pop - -/* 807B45F0-807B45F4 000154 0004+00 0/0 0/0 0/0 .rodata @5123 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5123 = 80.0f; -COMPILER_STRIP_GATE(0x807B45F0, &lit_5123); -#pragma pop - -/* 807B45F4-807B45F8 000158 0004+00 0/0 0/0 0/0 .rodata @5124 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5124 = 150.0f; -COMPILER_STRIP_GATE(0x807B45F4, &lit_5124); -#pragma pop - -/* 807B45F8-807B45FC 00015C 0004+00 0/1 0/0 0/0 .rodata @5125 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5125 = 20.0f; -COMPILER_STRIP_GATE(0x807B45F8, &lit_5125); -#pragma pop - -/* 807B45FC-807B4600 000160 0004+00 0/0 0/0 0/0 .rodata @5126 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5126 = 2.5f; -COMPILER_STRIP_GATE(0x807B45FC, &lit_5126); -#pragma pop - -/* 807B4600-807B4604 000164 0004+00 0/0 0/0 0/0 .rodata @5127 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5127 = 170.0f; -COMPILER_STRIP_GATE(0x807B4600, &lit_5127); -#pragma pop - -/* 807B4604-807B4608 000168 0004+00 0/0 0/0 0/0 .rodata @5128 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5128 = -80.0f; -COMPILER_STRIP_GATE(0x807B4604, &lit_5128); -#pragma pop - -/* 807B4608-807B460C 00016C 0004+00 0/0 0/0 0/0 .rodata @5129 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5129 = -200.0f; -COMPILER_STRIP_GATE(0x807B4608, &lit_5129); -#pragma pop - -/* 807B460C-807B4610 000170 0004+00 0/0 0/0 0/0 .rodata @5130 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5130 = 70.0f; -COMPILER_STRIP_GATE(0x807B460C, &lit_5130); -#pragma pop - -/* 807B4610-807B4614 000174 0004+00 0/0 0/0 0/0 .rodata @5131 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5131 = 25.0f; -COMPILER_STRIP_GATE(0x807B4610, &lit_5131); -#pragma pop - -/* 807B4614-807B4618 000178 0004+00 0/0 0/0 0/0 .rodata @5132 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5132 = -55.0f; -COMPILER_STRIP_GATE(0x807B4614, &lit_5132); -#pragma pop - -/* 807B4618-807B461C 00017C 0004+00 0/1 0/0 0/0 .rodata @5191 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5191 = 45.0f; -COMPILER_STRIP_GATE(0x807B4618, &lit_5191); -#pragma pop - -/* 807B461C-807B4620 000180 0004+00 0/1 0/0 0/0 .rodata @5192 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5192 = 7.0f; -COMPILER_STRIP_GATE(0x807B461C, &lit_5192); -#pragma pop - -/* 807B4620-807B4624 000184 0004+00 0/1 0/0 0/0 .rodata @5193 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5193 = 18.0f; -COMPILER_STRIP_GATE(0x807B4620, &lit_5193); -#pragma pop - -/* 807B2DEC-807B300C 002B4C 0220+00 1/1 0/0 0/0 .text anm_se_set__FP10e_th_class */ -static void anm_se_set(e_th_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 807B4624-807B4628 000188 0004+00 0/1 0/0 0/0 .rodata @5312 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5312 = 75.0f; -COMPILER_STRIP_GATE(0x807B4624, &lit_5312); -#pragma pop - -/* 807B4628-807B462C 00018C 0004+00 0/1 0/0 0/0 .rodata @5313 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5313 = -50000.0f; -COMPILER_STRIP_GATE(0x807B4628, &lit_5313); -#pragma pop - -/* 807B462C-807B4630 000190 0004+00 0/1 0/0 0/0 .rodata @5314 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5314 = 20000.0f; -COMPILER_STRIP_GATE(0x807B462C, &lit_5314); -#pragma pop - -/* 807B4630-807B4634 000194 0004+00 0/1 0/0 0/0 .rodata @5315 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5315 = 18000.0f; -COMPILER_STRIP_GATE(0x807B4630, &lit_5315); -#pragma pop - -/* 807B4634-807B4638 000198 0004+00 0/1 0/0 0/0 .rodata @5316 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5316 = 40.0f; -COMPILER_STRIP_GATE(0x807B4634, &lit_5316); -#pragma pop - -/* 807B4638-807B463C 00019C 0004+00 0/1 0/0 0/0 .rodata @5317 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5317 = -20.0f; -COMPILER_STRIP_GATE(0x807B4638, &lit_5317); -#pragma pop - -/* 807B4870-807B4874 000008 0004+00 2/2 0/0 0/0 .bss None */ -static u8 data_807B4870[4]; - -/* 807B4874-807B4880 00000C 000C+00 1/1 0/0 0/0 .bss @3922 */ -static u8 lit_3922[12]; - -/* 807B4880-807B4898 000018 0018+00 3/3 0/0 0/0 .bss l_HIO */ -static u8 l_HIO[24]; - -/* 807B300C-807B3514 002D6C 0508+00 2/1 0/0 0/0 .text daE_TH_Execute__FP10e_th_class */ -static void daE_TH_Execute(e_th_class* param_0) { - // NONMATCHING -} - -/* 807B3514-807B351C 003274 0008+00 1/0 0/0 0/0 .text daE_TH_IsDelete__FP10e_th_class */ -static bool daE_TH_IsDelete(e_th_class* param_0) { - return true; -} - -/* 807B351C-807B3584 00327C 0068+00 1/0 0/0 0/0 .text daE_TH_Delete__FP10e_th_class */ -static void daE_TH_Delete(e_th_class* param_0) { - // NONMATCHING -} - -/* 807B3584-807B36D0 0032E4 014C+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */ -static void useHeapInit(fopAc_ac_c* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 807B463C-807B4640 0001A0 0004+00 0/1 0/0 0/0 .rodata @5526 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5526 = -500.0f; -COMPILER_STRIP_GATE(0x807B463C, &lit_5526); -#pragma pop - -/* 807B4640-807B4644 0001A4 0004+00 0/1 0/0 0/0 .rodata @5527 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5527 = 65535.0f; -COMPILER_STRIP_GATE(0x807B4640, &lit_5527); -#pragma pop - -/* 807B36D0-807B3B58 003430 0488+00 1/0 0/0 0/0 .text daE_TH_Create__FP10fopAc_ac_c */ -static void daE_TH_Create(fopAc_ac_c* param_0) { - // NONMATCHING -} - -/* 807B3B58-807B3BD4 0038B8 007C+00 1/1 0/0 0/0 .text __dt__7th_ke_sFv */ -th_ke_s::~th_ke_s() { - // NONMATCHING -} - -/* 807B3BD4-807B3C3C 003934 0068+00 1/1 0/0 0/0 .text __ct__7th_ke_sFv */ -th_ke_s::th_ke_s() { - // NONMATCHING -} - -/* 807B3C3C-807B3C40 00399C 0004+00 1/1 0/0 0/0 .text __ct__4cXyzFv */ -// cXyz::cXyz() { -extern "C" void __ct__4cXyzFv() { - /* empty function */ -} - -/* 807B3C40-807B3D0C 0039A0 00CC+00 1/1 0/0 0/0 .text __dt__8dCcD_SphFv */ -// dCcD_Sph::~dCcD_Sph() { -extern "C" void __dt__8dCcD_SphFv() { - // NONMATCHING -} - -/* 807B3D0C-807B3D90 003A6C 0084+00 1/1 0/0 0/0 .text __ct__8dCcD_SphFv */ -// dCcD_Sph::dCcD_Sph() { -extern "C" void __ct__8dCcD_SphFv() { - // NONMATCHING -} - -/* 807B3D90-807B3DD8 003AF0 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGSphFv */ -// cM3dGSph::~cM3dGSph() { -extern "C" void __dt__8cM3dGSphFv() { - // NONMATCHING -} - -/* 807B3DD8-807B3E20 003B38 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGAabFv */ -// cM3dGAab::~cM3dGAab() { -extern "C" void __dt__8cM3dGAabFv() { - // NONMATCHING -} - -/* 807B3E20-807B3E7C 003B80 005C+00 1/0 0/0 0/0 .text __dt__10dCcD_GSttsFv */ -// dCcD_GStts::~dCcD_GStts() { -extern "C" void __dt__10dCcD_GSttsFv() { - // NONMATCHING -} - -/* 807B3E7C-807B3EEC 003BDC 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */ -// dBgS_ObjAcch::~dBgS_ObjAcch() { -extern "C" void __dt__12dBgS_ObjAcchFv() { - // NONMATCHING -} - -/* 807B3EEC-807B3F5C 003C4C 0070+00 1/0 0/0 0/0 .text __dt__12dBgS_AcchCirFv */ -// dBgS_AcchCir::~dBgS_AcchCir() { -extern "C" void __dt__12dBgS_AcchCirFv() { - // NONMATCHING -} - -/* 807B3F5C-807B3FA4 003CBC 0048+00 1/0 0/0 0/0 .text __dt__10cCcD_GSttsFv */ -// cCcD_GStts::~cCcD_GStts() { -extern "C" void __dt__10cCcD_GSttsFv() { - // NONMATCHING -} - -/* 807B3FA4-807B3FEC 003D04 0048+00 2/1 0/0 0/0 .text __dt__12daE_TH_HIO_cFv */ -daE_TH_HIO_c::~daE_TH_HIO_c() { - // NONMATCHING -} - -/* 807B3FEC-807B4028 003D4C 003C+00 0/0 1/0 0/0 .text __sinit_d_a_e_th_cpp */ -void __sinit_d_a_e_th_cpp() { - // NONMATCHING -} - -#pragma push -#pragma force_active on -REGISTER_CTORS(0x807B3FEC, __sinit_d_a_e_th_cpp); -#pragma pop - -/* 807B4028-807B4030 003D88 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */ -static void func_807B4028() { - // NONMATCHING -} - -/* 807B4030-807B4038 003D90 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */ -static void func_807B4030() { - // NONMATCHING -} - -/* 807B444C-807B4488 0041AC 003C+00 2/2 0/0 0/0 .text __dt__4cXyzFv */ -// cXyz::~cXyz() { -extern "C" void __dt__4cXyzFv() { - // NONMATCHING -} - -/* 807B4644-807B4644 0001A8 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ diff --git a/src/d/actor/d_a_e_th_ball.cpp b/src/d/actor/d_a_e_th_ball.cpp index a1a6de7316..7f0b3c4978 100644 --- a/src/d/actor/d_a_e_th_ball.cpp +++ b/src/d/actor/d_a_e_th_ball.cpp @@ -48,7 +48,7 @@ static void chain_draw(e_th_ball_class* i_this) { var_r28++; } - if (master == NULL || master->field_0xd8e == 0) { + if (master == NULL || !master->mNoDraw) { var_r28 = 0; for (int i = i_this->field_0xde8; i < 19; i++) { MtxTrans(i_this->field_0xdec.m_pos[i].x, i_this->field_0xdec.m_pos[i].y, i_this->field_0xdec.m_pos[i].z, 0); @@ -116,8 +116,8 @@ static void chain_control_01(e_th_ball_class* i_this) { dBgS_GndChk gndchk; th_chain_s* chain_s = &i_this->field_0x65c; - if (master != NULL && fopAcM_GetName(master) == PROC_E_TH && master->field_0xd8e == 0) { - chain_s->m_pos[0] = master->field_0x6c0; + if (master != NULL && fopAcM_GetName(master) == PROC_E_TH && master->mNoDraw == 0) { + chain_s->m_pos[0] = master->mHandR_Pos1; } cXyz* pos_p = &chain_s->m_pos[1]; @@ -200,7 +200,7 @@ static void chain_control_02(e_th_ball_class* i_this) { cXyz sp3C; s8 sp8 = 0; - if (master != NULL && master->field_0xd8e != 0) { + if (master != NULL && master->mNoDraw != 0) { sp8 = 1; } @@ -272,7 +272,7 @@ static void chain_control_11(e_th_ball_class* i_this) { dBgS_GndChk gndchk; th_chain_2s* chain_s = &i_this->field_0xdec; - chain_s->m_pos[0] = master->field_0x6cc; + chain_s->m_pos[0] = master->mHandR_Pos2; cXyz* pos_p = &chain_s->m_pos[1]; csXyz* rot_p = &chain_s->m_rot[1]; @@ -340,7 +340,7 @@ static void chain_control_12(e_th_ball_class* i_this) { th_chain_2s* chain_s = &i_this->field_0xdec; fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; - chain_s->m_pos[19] = master->field_0x6a8; + chain_s->m_pos[19] = master->mHandL_Pos1; cXyz* pos_p = &chain_s->m_pos[18]; csXyz* rot_p = &chain_s->m_rot[18]; @@ -395,7 +395,7 @@ static void chain_control_21(e_th_ball_class* i_this) { dBgS_GndChk gndchk; th_chain_2s* chain_s = &i_this->field_0x11d8; - chain_s->m_pos[0] = master->field_0x6b4; + chain_s->m_pos[0] = master->mHandL_Pos2; cXyz* pos_p = &chain_s->m_pos[1]; cXyz* var_r29 = &chain_s->field_0x230[1]; @@ -537,7 +537,7 @@ static void e_th_ball_spin(e_th_ball_class* i_this) { case 1: case 2: case 3: - sp34 = i_this->current.pos - master->field_0x6c0; + sp34 = i_this->current.pos - master->mHandR_Pos1; if (i_this->mTimers[0] != 0) { cLib_addCalcAngleS2(&i_this->shape_angle.y, cM_atan2s(sp34.x, sp34.z), 1, 0xC00); @@ -566,7 +566,7 @@ static void e_th_ball_spin(e_th_ball_class* i_this) { if (i_this->mMode == 2) { i_this->field_0x15c0 = master->mpModelMorf->getFrame(); } else { - i_this->field_0x15c0 += master->field_0x5d8; + i_this->field_0x15c0 += master->mSpinAnmSpeed; if (i_this->field_0x15c0 >= 29.0f) { i_this->field_0x15c0 -= 29.0f; } @@ -580,9 +580,9 @@ static void e_th_ball_spin(e_th_ball_class* i_this) { MtxPosition(&sp34, &sp28); cLib_addCalc2(&i_this->speedF, 1000.0f, 1.0f, 1.0f + YREG_F(15)); - cLib_addCalc2(&i_this->current.pos.x, master->field_0x6c0.x + sp28.x, 0.5f, i_this->speedF); - cLib_addCalc2(&i_this->current.pos.y, master->field_0x6c0.y + sp28.y, 0.1f, 0.02f * i_this->speedF * master->field_0x5d8); - cLib_addCalc2(&i_this->current.pos.z, master->field_0x6c0.z + sp28.z, 0.5f, i_this->speedF); + cLib_addCalc2(&i_this->current.pos.x, master->mHandR_Pos1.x + sp28.x, 0.5f, i_this->speedF); + cLib_addCalc2(&i_this->current.pos.y, master->mHandR_Pos1.y + sp28.y, 0.1f, 0.02f * i_this->speedF * master->mSpinAnmSpeed); + cLib_addCalc2(&i_this->current.pos.z, master->mHandR_Pos1.z + sp28.z, 0.5f, i_this->speedF); if (master->field_0x68a & 2) { master->field_0x68a &= ~2; @@ -668,7 +668,7 @@ static void e_th_ball_shot(e_th_ball_class* i_this) { if (i_this->speedF > 0.0f) { cLib_addCalc2(&i_this->field_0xde4, 100.0f + JREG_F(0), 1.0f, 30.0f + JREG_F(1)); - sp28 = i_this->current.pos - master->field_0x6c0; + sp28 = i_this->current.pos - master->mHandR_Pos1; s16 spE = cM_atan2s(sp28.x, sp28.z); cLib_addCalcAngleS2(&i_this->shape_angle.y, spE, 1, 0x4000); cLib_addCalcAngleS2(&i_this->shape_angle.x, 0, 1, 0x4000); @@ -877,7 +877,7 @@ static void action(e_th_ball_class* i_this) { cLib_addCalc0(&i_this->field_0xde4, 1.0f, 10.0f + JREG_F(1)); if (i_this->field_0x15c6 == 0) { - cXyz sp2C = i_this->current.pos - master->field_0x6c0; + cXyz sp2C = i_this->current.pos - master->mHandR_Pos1; s16 var_r27 = i_this->field_0xdc8 * (50.0f - ((0.035f + XREG_F(3)) * sp2C.abs())); if (var_r27 < 0) { @@ -928,7 +928,7 @@ static void action(e_th_ball_class* i_this) { master->mAction = ACTION_RETURN; master->mMode = 2; - master->field_0x69c[0] = JREG_S(4) + 30; + master->mTimers[0] = JREG_S(4) + 30; master->mpModelMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("E_th", 0x1B), 2, 10.0f, 1.0f, 0.0f, -1.0f); master->mAnm = 0x1B; }