diff --git a/include/d/actor/d_a_e_rdy.h b/include/d/actor/d_a_e_rdy.h index 49aa7f9f4ab..989468b9d83 100644 --- a/include/d/actor/d_a_e_rdy.h +++ b/include/d/actor/d_a_e_rdy.h @@ -1,7 +1,14 @@ #ifndef D_A_E_RDY_H #define D_A_E_RDY_H -#include "f_op/f_op_actor_mng.h" +#include "SSystem/SComponent/c_phase.h" +#include "d/d_bg_s_acch.h" +#include "d/d_cc_d.h" +#include "d/d_cc_uty.h" +#include "d/d_jnt_col.h" +#include "d/d_msg_flow.h" +#include "d/d_path.h" +#include "f_op/f_op_actor.h" /** * @ingroup actors-enemies @@ -15,20 +22,183 @@ class e_rdy_class : public fopEn_enemy_c { public: /* 80779340 */ e_rdy_class(); - /* 0x05AC */ u8 field_0x5ac[0xa8f - 0x5ac]; - /* 0x0A8F */ u8 field_0xa8f; - /* 0x0A90 */ u8 field_0xa90[0x1370 - 0xa90]; - /* 0x1370 */ s16 field_0x1370; - /* 0x1372 */ s16 field_0x1372; - /* 0x1374 */ u8 field_0x1374[0x142c - 0x1374]; + /* 0x05AC */ request_of_phase_process_class mPhase; + /* 0x05B4 */ s16 mMode; + /* 0x05B6 */ u8 field_0x5b6; + /* 0x05B7 */ u8 field_0x5b7; + /* 0x05B8 */ u8 field_0x5b8; + /* 0x05B9 */ u8 mSwBit; + /* 0x05BA */ u8 mWeaponType; + /* 0x05BB */ s8 field_0x5bb; + /* 0x05BC */ cXyz field_0x5bc; + /* 0x05C8 */ s16 mTargetAngleY; + /* 0x05CC */ mDoExt_McaMorfSO* mpMorf; + /* 0x05D0 */ Z2CreatureEnemy mSound; + /* 0x0674 */ char* mpArcName; + /* 0x0678 */ int mAnm; + /* 0x067C */ u8 field_0x67c[0x680 - 0x67c]; + /* 0x0680 */ dJntCol_c mJntCol; + /* 0x0690 */ J3DModel* mpWeaponModel; + /* 0x0694 */ mDoExt_McaMorfSO* mpBowMorf; + /* 0x0698 */ J3DModel* mpHawkGrassModel; + /* 0x069C */ s8 mIsHoldingGrass; + /* 0x06A0 */ dKy_tevstr_c mHawkGrassTevStr; + /* 0x0A28 */ J3DModel* mpEyeModel[2]; + /* 0x0A30 */ f32 mEyeScale; + /* 0x0A34 */ f32 mTargetEyeScale; + /* 0x0A38 */ s8 mIsDying; + /* 0x0A3C */ f32 mDyingTevColor; + /* 0x0A40 */ s16 mCounter; + /* 0x0A42 */ s16 mAction; + /* 0x0A44 */ s16 mPrevAction; + /* 0x0A48 */ f32 mPlayerDist; + /* 0x0A4C */ s16 mPlayerAngle; + /* 0x0A50 */ f32 mPlayerCheckDist; + /* 0x0A54 */ f32 mWaterHeight; + /* 0x0A58 */ u32 mShadowKey; + /* 0x0A5C */ fpc_ProcID mKargarokID; + /* 0x0A60 */ s16 mTimer[4]; + /* 0x0A68 */ s16 mIFrameTimer; + /* 0x0A6A */ u8 field_0xa6a[0xa6c - 0xa6a]; + /* 0x0A6C */ s16 field_0xa6c; + /* 0x0A6E */ s16 field_0xa6e; + /* 0x0A70 */ u8 field_0xa70; + /* 0x0A71 */ s8 field_0xa71; + /* 0x0A72 */ s8 mHasArrow; + /* 0x0A73 */ s8 mArrowFired; + /* 0x0A74 */ s8 field_0xa74; + /* 0x0A76 */ s16 mBowRotationTimer; + /* 0x0A78 */ s16 mBowRotation; + /* 0x0A7A */ u8 field_0xa7a[0xa7b - 0xa7a]; + /* 0x0A7B */ s8 field_0xa7b; + /* 0x0A7C */ s8 field_0xa7c; + /* 0x0A7D */ s8 mCollisionEnabled; + /* 0x0A7E */ u8 mFadeTimer; + /* 0x0A80 */ cXyz mKargarokPos; + /* 0x0A8C */ s8 mRideState; + /* 0x0A8D */ u8 field_0xa8d[0xa8e - 0xa8d]; + /* 0x0A8E */ s8 field_0xa8e; + /* 0x0A8F */ s8 field_0xa8f; + /* 0x0A90 */ f32 mJumpHeight; + /* 0x0A94 */ f32 mJumpSpeed; + /* 0x0A98 */ s8 field_0xa98; + /* 0x0A9A */ s16 field_0xa9a; + /* 0x0A9C */ s16 field_0xa9c; + /* 0x0A9E */ s16 field_0xa9e; + /* 0x0AA0 */ s16 field_0xaa0; + /* 0x0AA4 */ cXyz mArrowTarget; + /* 0x0AB0 */ u8 field_0xab0[0xabc - 0xab0]; + /* 0x0ABC */ f32 field_0xabc; + /* 0x0AC0 */ f32 mKnockback; + /* 0x0AC4 */ s16 mHitDirection; + /* 0x0AC6 */ s16 field_0xac6; + /* 0x0AC8 */ s8 field_0xac8; + /* 0x0AC9 */ u8 field_0xac9[0xadc - 0xac9]; + /* 0x0ADC */ csXyz field_0xadc; + /* 0x0AE2 */ csXyz field_0xae2; + /* 0x0AE8 */ csXyz field_0xae8; + /* 0x0AEE */ s8 field_0xaee; + /* 0x0AEF */ s8 mIsUpsideDown; + /* 0x0AF0 */ u32 field_0xaf0; + /* 0x0AF4 */ f32 field_0xaf4; + /* 0x0AF8 */ s16 field_0xaf8; + /* 0x0AFC */ f32 field_0xafc; + /* 0x0B00 */ s16 field_0xb00; + /* 0x0B02 */ csXyz field_0xb02[11]; + /* 0x0B44 */ csXyz field_0xb44[11]; + /* 0x0B88 */ f32 field_0xb88; + /* 0x0B8C */ s16 field_0xb8c[11]; + /* 0x0BA2 */ s16 field_0xba2[4]; + /* 0x0BAA */ s16 field_0xbaa; + /* 0x0BAC */ s16 field_0xbac; + /* 0x0BAE */ s16 field_0xbae; + /* 0x0BB0 */ s16 field_0xbb0; + /* 0x0BB2 */ u8 field_0xbb2[0xbb4 - 0xbb2]; + /* 0x0BB4 */ s16 field_0xbb4; + /* 0x0BB6 */ s16 field_0xbb6; + /* 0x0BB8 */ u8 field_0xbb8[0xbbc - 0xbb8]; + /* 0x0BBC */ f32 field_0xbbc; + /* 0x0BC0 */ s16 field_0xbc0; + /* 0x0BC2 */ u8 field_0xbc2[0xbc8 - 0xbc2]; + /* 0x0BC8 */ s16 field_0xbc8; + /* 0x0BCA */ s8 field_0xbca; + /* 0x0BCB */ s8 mKargarokDeleteTimer; + /* 0x0BCC */ dPath* mpPath; + /* 0x0BD0 */ s8 mPathIndex; + /* 0x0BD1 */ s8 mPathDirection; + /* 0x0BD4 */ dBgS_AcchCir mAcchCir; + /* 0x0C14 */ dBgS_ObjAcch mAcch; + /* 0x0DEC */ dCcD_Stts mCcStts; + /* 0x0E28 */ dCcD_Sph mCcSph[3]; + /* 0x11D0 */ dCcD_Sph mAtSph; + /* 0x1308 */ dCcU_AtInfo mAtInfo; + /* 0x132C */ bool mHIOInit; + /* 0x132D */ s8 mGroundHit; + /* 0x1330 */ u32 mSmokeKey1; + /* 0x1334 */ u32 mSmokeKey2; + /* 0x1338 */ u32 mWaterParticleKey[3]; + /* 0x1344 */ u32 mFireParticleKey[2]; + /* 0x134C */ cXyz field_0x134c; + /* 0x1358 */ cXyz field_0x1358; + /* 0x1364 */ s8 mInWater; + /* 0x1365 */ s8 field_0x1365; + /* 0x1366 */ s8 field_0x1366; + /* 0x1367 */ s8 mDrawEyeModel; + /* 0x1368 */ u8 field_0x1368; + /* 0x1369 */ s8 field_0x1369; + /* 0x136A */ u8 field_0x136a[0x136b - 0x136a]; + /* 0x136B */ s8 mParticleTimer; + /* 0x136C */ int mSwBit2; + /* 0x1370 */ s16 mDemoMode; + /* 0x1372 */ s16 mDemoTimer; + /* 0x1374 */ s16 mCamBankPhase; + /* 0x1378 */ cXyz mCamEye; + /* 0x1384 */ cXyz mCamCenter; + /* 0x1390 */ cXyz mCamEyeTarget; + /* 0x139C */ cXyz mCamCenterTarget; + /* 0x13A8 */ cXyz mCamEyeSpeed; + /* 0x13B4 */ cXyz mCamCenterSpeed; + /* 0x13C0 */ f32 mCamDist; + /* 0x13C4 */ u8 field_0x13c4[0x13c8 - 0x13c4]; + /* 0x13C8 */ f32 mCamFovy; + /* 0x13CC */ f32 mCamBank; + /* 0x13D0 */ f32 mCamSpeed; + /* 0x13D4 */ s16 field_0x13d4; + /* 0x13D6 */ u8 field_0x13d6[0x13e0 - 0x13d6]; + /* 0x13E0 */ dMsgFlow_c mMsgFlow; }; STATIC_ASSERT(sizeof(e_rdy_class) == 0x142C); class daE_RDY_HIO_c { +public: /* 8076BDCC */ daE_RDY_HIO_c(); - /* 80779880 */ ~daE_RDY_HIO_c(); + /* 80779880 */ virtual ~daE_RDY_HIO_c() {} + + /* 0x04 */ s8 field_0x4; + /* 0x08 */ f32 mScale; + /* 0x0C */ f32 field_0xc; + /* 0x10 */ f32 mWalkSpeed; + /* 0x14 */ f32 mRunSpeed; + /* 0x18 */ f32 field_0x18; + /* 0x1C */ f32 field_0x1c; + /* 0x20 */ f32 mAttackAnmSpeed; + /* 0x24 */ s16 field_0x24; + /* 0x28 */ f32 field_0x28; + /* 0x2C */ f32 field_0x2c; + /* 0x30 */ f32 field_0x30; + /* 0x34 */ f32 field_0x34; + /* 0x38 */ u8 field_0x38; + /* 0x39 */ u8 field_0x39; + /* 0x3A */ u8 mDrawEyeModel; + /* 0x3B */ u8 field_0x3b; + /* 0x3C */ f32 field_0x3c; + /* 0x40 */ f32 field_0x40; + /* 0x44 */ f32 field_0x44; + /* 0x48 */ f32 field_0x48; + /* 0x4C */ f32 field_0x4c; }; +STATIC_ASSERT(sizeof(daE_RDY_HIO_c) == 0x50); #endif /* D_A_E_RDY_H */ diff --git a/include/d/actor/d_a_e_yc.h b/include/d/actor/d_a_e_yc.h index 4568c88b823..6bd2886f3fe 100644 --- a/include/d/actor/d_a_e_yc.h +++ b/include/d/actor/d_a_e_yc.h @@ -43,7 +43,8 @@ public: /* 0x6A2 */ s16 mTimer[4]; /* 0x6AA */ s16 mCcDisableTimer; /* 0x6AC */ u32 mRiderID; - /* 0x6B0 */ u8 field_0x6b0[2]; + /* 0x6B0 */ u8 field_0x6b0; + /* 0x6B1 */ u8 field_0x6b1; /* 0x6B2 */ s8 mNoDrawFlag; /* 0x6B3 */ s8 mWolfBiteDamageCount; /* 0x6B4 */ dBgS_AcchCir mAcchCir; diff --git a/include/d/actor/d_a_kago.h b/include/d/actor/d_a_kago.h index 86ff1b5ef7f..32fac3d6620 100644 --- a/include/d/actor/d_a_kago.h +++ b/include/d/actor/d_a_kago.h @@ -93,6 +93,12 @@ public: field_0x744 = 0; } + void setEvent2() { + mIsFlying = 0; + field_0x740 = 6; + field_0x744 = 0; + } + void setKagoPath(u8 i_pathNo) { if (i_pathNo != 0xFF) { field_0x76c = dPath_GetRoomPath(i_pathNo, fopAcM_GetRoomNo(this)); diff --git a/include/d/actor/d_a_player.h b/include/d/actor/d_a_player.h index f1be27ad5da..486a78cb550 100644 --- a/include/d/actor/d_a_player.h +++ b/include/d/actor/d_a_player.h @@ -469,7 +469,7 @@ public: ERFLG0_UNK_8000000 = 0x8000000, ERFLG0_UNK_4000000 = 0x4000000, ERFLG0_BOSS_ROOM_WAIT = 0x2000000, - ERFLG0_UNK_1000000 = 0x1000000, + ERFLG0_ENEMY_DEAD = 0x1000000, ERFLG0_UNK_800000 = 0x800000, ERFLG0_BEE_FOLLOW = 0x400000, ERFLG0_UNK_200000 = 0x200000, @@ -1037,6 +1037,7 @@ public: void onNeckSearchWide() { onEndResetFlg0(ERFLG0_UNK_400); } void offPressedDamage() { offNoResetFlg2(FLG2_PRESSED_DAMAGE); } void onForceSubjectCancel() { onEndResetFlg0(ERFLG0_FORCE_SUBJECT_CANCEL); } + void onEnemyDead() { onEndResetFlg0(ERFLG0_ENEMY_DEAD); } u32 checkBoarSingleBattle() const { return checkNoResetFlg2(daPy_FLG2(FLG2_UNK_1000000 | FLG2_BOAR_SINGLE_BATTLE)); } u32 checkWolfDashAutoJump() const { return checkNoResetFlg2(FLG2_WOLF_DASH_AUTO_JUMP); } diff --git a/include/f_op/f_op_actor.h b/include/f_op/f_op_actor.h index c71e0c05363..3cfdce5ff1d 100644 --- a/include/f_op/f_op_actor.h +++ b/include/f_op/f_op_actor.h @@ -261,6 +261,7 @@ public: bool checkWolfNoLock() const { return mFlags & 0x200; } bool checkHeadLockFlg() const { return mFlags & 0x80; } bool checkWolfBiteDamage() const { return mFlags & 0x40; } + bool checkWolfDownPullFlg() const { return mFlags & 0x10; } bool checkDownFlg() const { return mFlags & 0x1; } bool checkCutDownHitFlg() const { return mFlags & 0x2; } bool checkDeadFlg() const { return mFlags & 0x8; } diff --git a/include/m_Do/m_Do_graphic.h b/include/m_Do/m_Do_graphic.h index fa458c501b0..c58396868c0 100644 --- a/include/m_Do/m_Do_graphic.h +++ b/include/m_Do/m_Do_graphic.h @@ -45,7 +45,9 @@ public: /* 80007F90 */ static void beginRender(); /* 800080D0 */ static void fadeOut(f32); /* 80007FD8 */ static void fadeOut(f32, _GXColor&); - /* 807DFAB4 */ static void fadeIn(f32, _GXColor&); + /* 807DFAB4 */ static void fadeIn(f32 fadeSpeed, _GXColor& fadeColor) { + fadeOut(-fadeSpeed, fadeColor); + } /* 80008028 */ static void fadeOut_f(f32, _GXColor&); /* 800080A0 */ static void onBlure(const Mtx); /* 80008078 */ static void onBlure(); diff --git a/src/d/actor/d_a_alink_link.inc b/src/d/actor/d_a_alink_link.inc index a6738285fd4..4a7456c642b 100644 --- a/src/d/actor/d_a_alink_link.inc +++ b/src/d/actor/d_a_alink_link.inc @@ -2709,7 +2709,7 @@ int daAlink_c::execute() { } } - if (checkEndResetFlg0(ERFLG0_UNK_1000000) && mEquipItem == 0x103) { + if (checkEndResetFlg0(ERFLG0_ENEMY_DEAD) && mEquipItem == 0x103) { mSwordFlourishTimer = daAlinkHIO_cut_c0::m.mFlourishTime; } diff --git a/src/d/actor/d_a_e_rdy.cpp b/src/d/actor/d_a_e_rdy.cpp index 9f3844d0cfc..cab5bdd5cc6 100644 --- a/src/d/actor/d_a_e_rdy.cpp +++ b/src/d/actor/d_a_e_rdy.cpp @@ -4,824 +4,4981 @@ */ #include "d/actor/d_a_e_rdy.h" +#include "Z2AudioLib/Z2Instances.h" +#include "d/actor/d_a_e_arrow.h" +#include "d/actor/d_a_e_yc.h" +#include "d/actor/d_a_horse.h" +#include "d/actor/d_a_kago.h" +#include "d/d_bomb.h" #include "d/d_cc_d.h" -#include "dol2asm.h" +#include "d/d_msg_object.h" #include "d/d_camera.h" +#include "f_op/f_op_kankyo_mng.h" UNK_REL_DATA; #include "f_op/f_op_actor_enemy.h" +#include "m_Do/m_Do_graphic.h" - -// -// Forward References: -// - -extern "C" void __ct__13daE_RDY_HIO_cFv(); -extern "C" static void anm_init__FP11e_rdy_classifUcf(); -extern "C" static void nodeCallBack__FP8J3DJointi(); -extern "C" static void nodeCallBack_bow__FP8J3DJointi(); -extern "C" static void daE_RDY_Draw__FP11e_rdy_class(); -extern "C" static void other_bg_check__FP11e_rdy_classP10fopAc_ac_c(); -extern "C" static void s_b_sub__FPvPv(); -extern "C" static void search_bomb__FP11e_rdy_classi(); -extern "C" static void way_bg_check__FP11e_rdy_classf(); -extern "C" static void ride_off__FP11e_rdy_class(); -extern "C" static void pl_check__FP11e_rdy_classfs(); -extern "C" static void bomb_view_check__FP11e_rdy_class(); -extern "C" static void bomb_check__FP11e_rdy_class(); -extern "C" static void move_gake_check__FP11e_rdy_classf(); -extern "C" static void way_check__FP11e_rdy_class(); -extern "C" static void path_check__FP11e_rdy_class(); -extern "C" static void e_rdy_normal__FP11e_rdy_class(); -extern "C" static void e_rdy_fight_run__FP11e_rdy_class(); -extern "C" static void at_hit_check__FP11e_rdy_class(); -extern "C" static void e_rdy_fight__FP11e_rdy_class(); -extern "C" static void e_rdy_bow_run__FP11e_rdy_class(); -extern "C" static void e_rdy_bow__FP11e_rdy_class(); -extern "C" static void s_command3_sub__FPvPv(); -extern "C" static void e_rdy_bow2__FP11e_rdy_class(); -extern "C" static void e_rdy_bow_ikki2__FP11e_rdy_class(); -extern "C" static void e_rdy_avoid__FP11e_rdy_class(); -extern "C" static void s_kusa_sub__FPvPv(); -extern "C" static void e_rdy_tkusa__FP11e_rdy_class(); -extern "C" static void e_rdy_yc_ride__FP11e_rdy_class(); -extern "C" static void e_rdy_bomb_action__FP11e_rdy_class(); -extern "C" static void e_rdy_s_damage__FP11e_rdy_class(); -extern "C" static void kado_check__FP11e_rdy_class(); -extern "C" static void rd_disappear__FP11e_rdy_class(); -extern "C" static void body_gake__FP11e_rdy_class(); -extern "C" void __dt__14dBgS_ObjGndChkFv(); -extern "C" static void e_rdy_damage__FP11e_rdy_class(); -extern "C" static void gake_check__FP11e_rdy_classf(); -extern "C" static void s_bikkuri_sub__FPvPv(); -extern "C" static void e_rdy_drop__FP11e_rdy_class(); -extern "C" static void e_rdy_a_damage__FP11e_rdy_class(); -extern "C" static void e_rdy_stand__FP11e_rdy_class(); -extern "C" static void e_rdy_bow3__FP11e_rdy_class(); -extern "C" static void s_command2_sub__FPvPv(); -extern "C" static void s_command4_sub__FPvPv(); -extern "C" static void e_rdy_commander__FP11e_rdy_class(); -extern "C" static void e_rdy_excite__FP11e_rdy_class(); -extern "C" static void e_rdy_water__FP11e_rdy_class(); -extern "C" static void e_rdy_jyunkai__FP11e_rdy_class(); -extern "C" static void wolfkick_damage__FP11e_rdy_class(); -extern "C" static void big_damage__FP11e_rdy_class(); -extern "C" static void small_damage__FP11e_rdy_classi(); -extern "C" static void damage_check__FP11e_rdy_class(); -extern "C" static void action__FP11e_rdy_class(); -extern "C" static void fire_eff_set__FP11e_rdy_class(); -extern "C" static void cam_3d_morf__FP11e_rdy_classf(); -extern "C" static void s_adel_sub__FPvPv(); -extern "C" static void demo_camera__FP11e_rdy_class(); -extern "C" static void daE_RDY_Execute__FP11e_rdy_class(); -extern "C" static bool daE_RDY_IsDelete__FP11e_rdy_class(); -extern "C" static void daE_RDY_Delete__FP11e_rdy_class(); -extern "C" static void useHeapInit__FP10fopAc_ac_c(); -extern "C" static void daE_RDY_Create__FP10fopAc_ac_c(); -extern "C" void __ct__11e_rdy_classFv(); -extern "C" void __dt__8cM3dGSphFv(); -extern "C" void __dt__8cM3dGAabFv(); -extern "C" void __dt__8dCcD_SphFv(); -extern "C" void __ct__8dCcD_SphFv(); -extern "C" void __dt__10dCcD_GSttsFv(); -extern "C" void __dt__12dBgS_ObjAcchFv(); -extern "C" void __dt__12dBgS_AcchCirFv(); -extern "C" void __ct__5csXyzFv(); -extern "C" void __ct__11J3DLightObjFv(); -extern "C" void __dt__10cCcD_GSttsFv(); -extern "C" void __dt__13daE_RDY_HIO_cFv(); -extern "C" void __sinit_d_a_e_rdy_cpp(); -extern "C" static void func_80779920(); -extern "C" static void func_80779928(); -extern "C" static void func_80779930(); -extern "C" static void func_80779938(); -extern "C" static void func_80779940(); -extern "C" void __dt__5csXyzFv(); -extern "C" void __dt__4cXyzFv(); -extern "C" void changeDemoMode__9daPy_py_cFUliis(); -extern "C" extern char const* const d_a_e_rdy__stringBase0; - -// -// External References: -// - -extern "C" void fadeOut__13mDoGph_gInf_cFfR8_GXColor(); -extern "C" void mDoMtx_XrotM__FPA4_fs(); -extern "C" void mDoMtx_YrotS__FPA4_fs(); -extern "C" void mDoMtx_YrotM__FPA4_fs(); -extern "C" void mDoMtx_ZrotM__FPA4_fs(); -extern "C" void scaleM__14mDoMtx_stack_cFfff(); -extern "C" void mDoExt_modelUpdateDL__FP8J3DModel(); -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 mDoExt_J3DModel__create__FP12J3DModelDataUlUl(); -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void fopAc_IsActor__FPv(); -extern "C" void fopAcIt_Judge__FPFPvPv_PvPv(); -extern "C" void fopAcM_delete__FP10fopAc_ac_c(); -extern "C" void fopAcM_create__FsUlPC4cXyziPC5csXyzPC4cXyzSc(); -extern "C" void fopAcM_createChild__FsUiUlPC4cXyziPC5csXyzPC4cXyzScPFPv_i(); -extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl(); -extern "C" void fopAcM_SetMin__FP10fopAc_ac_cfff(); -extern "C" void fopAcM_SetMax__FP10fopAc_ac_cfff(); -extern "C" void fopAcM_searchActorAngleY__FPC10fopAc_ac_cPC10fopAc_ac_c(); -extern "C" void fopAcM_searchActorDistance__FPC10fopAc_ac_cPC10fopAc_ac_c(); -extern "C" void fopAcM_orderPotentialEvent__FP10fopAc_ac_cUsUsUs(); -extern "C" void fopAcM_getTalkEventPartner__FPC10fopAc_ac_c(); -extern "C" void fopAcM_createDisappear__FPC10fopAc_ac_cPC4cXyzUcUcUc(); -extern "C" void fopAcM_setCarryNow__FP10fopAc_ac_ci(); -extern "C" void fopAcM_otoCheck__FPC10fopAc_ac_cf(); -extern "C" void fopAcM_effSmokeSet1__FPUlPUlPC4cXyzPC5csXyzfPC12dKy_tevstr_ci(); -extern "C" void fopKyM_createWpillar__FPC4cXyzfi(); -extern "C" void fpcEx_Search__FPFPvPv_PvPv(); -extern "C" void fpcSch_JudgeForPName__FPvPv(); -extern "C" void fpcSch_JudgeByID__FPvPv(); -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_offOneZoneSwitch__Fii(); -extern "C" void -dComIfGd_setShadow__FUlScP8J3DModelP4cXyzffffR13cBgS_PolyInfoP12dKy_tevstr_csfP9_GXTexObj(); -extern "C" void checkStateCarry__7dBomb_cFv(); -extern "C" void offEventBit__11dSv_event_cFUs(); -extern "C" void isEventBit__11dSv_event_cCFUs(); -extern "C" void onSwitch__10dSv_info_cFii(); -extern "C" void isSwitch__10dSv_info_cCFii(); -extern "C" void __ct__9dJntCol_cFv(); -extern "C" void init__9dJntCol_cFP10fopAc_ac_cPC13dJntColData_cP8J3DModeli(); -extern "C" void getRes__14dRes_control_cFPCclP11dRes_info_ci(); -extern "C" void reset__14dEvt_control_cFv(); -extern "C" void dEv_noFinishSkipProc__FPvi(); -extern "C" void setSkipProc__14dEvt_control_cFPvPFPvi_ii(); -extern "C" void getEmitter__Q213dPa_control_c7level_cFUl(); -extern "C" void -set__13dPa_control_cFUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf(); -extern "C" void -set__13dPa_control_cFUlUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf(); -extern "C" void dPath_GetRoomPath__Fii(); -extern "C" void addReal__21dDlst_shadowControl_cFUlP8J3DModel(); -extern "C" void StartShock__12dVibration_cFii4cXyz(); -extern "C" void LineCross__4cBgSFP11cBgS_LinChk(); -extern "C" void GroundCross__4cBgSFP11cBgS_GndChk(); -extern "C" void __ct__12dBgS_AcchCirFv(); -extern "C" void SetWall__12dBgS_AcchCirFff(); -extern "C" void __dt__9dBgS_AcchFv(); -extern "C" void __ct__9dBgS_AcchFv(); -extern "C" void Set__9dBgS_AcchFP4cXyzP4cXyzP10fopAc_ac_ciP12dBgS_AcchCirP4cXyzP5csXyzP5csXyz(); -extern "C" void CrrPos__9dBgS_AcchFR4dBgS(); -extern "C" void __ct__11dBgS_GndChkFv(); -extern "C" void __dt__11dBgS_GndChkFv(); -extern "C" void __ct__18dBgS_ObjGndChk_SplFv(); -extern "C" void __dt__18dBgS_ObjGndChk_SplFv(); -extern "C" void __ct__11dBgS_LinChkFv(); -extern "C" void __dt__11dBgS_LinChkFv(); -extern "C" void Set__11dBgS_LinChkFPC4cXyzPC4cXyzPC10fopAc_ac_c(); -extern "C" void SetObj__16dBgS_PolyPassChkFv(); -extern "C" void __ct__10dCcD_GSttsFv(); -extern "C" void Move__10dCcD_GSttsFv(); -extern "C" void Init__9dCcD_SttsFiiP10fopAc_ac_c(); -extern "C" void __ct__12dCcD_GObjInfFv(); -extern "C" void __dt__12dCcD_GObjInfFv(); -extern "C" void ChkAtHit__12dCcD_GObjInfFv(); -extern "C" void GetAtHitObj__12dCcD_GObjInfFv(); -extern "C" void ChkTgHit__12dCcD_GObjInfFv(); -extern "C" void GetTgHitObj__12dCcD_GObjInfFv(); -extern "C" void ChkCoHit__12dCcD_GObjInfFv(); -extern "C" void GetCoHitObj__12dCcD_GObjInfFv(); -extern "C" void Set__8dCcD_SphFRC11dCcD_SrcSph(); -extern "C" void StartCAt__8dCcD_SphFR4cXyz(); -extern "C" void MoveCAt__8dCcD_SphFR4cXyz(); -extern "C" void cc_pl_cut_bit_get__Fv(); -extern "C" void at_power_check__FP11dCcU_AtInfo(); -extern "C" void cc_at_check__FP10fopAc_ac_cP11dCcU_AtInfo(); -extern "C" void Start__9dCamera_cFv(); -extern "C" void Stop__9dCamera_cFv(); -extern "C" void SetTrimSize__9dCamera_cFl(); -extern "C" void Set__9dCamera_cF4cXyz4cXyzsf(); -extern "C" void Reset__9dCamera_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_Sound_set__F4cXyziUii(); -extern "C" void dKy_Sound_get__Fv(); -extern "C" void dKy_darkworld_check__Fv(); -extern "C" void getStatus__12dMsgObject_cFv(); -extern "C" void __ct__10dMsgFlow_cFv(); -extern "C" void init__10dMsgFlow_cFP10fopAc_ac_ciiPP10fopAc_ac_c(); -extern "C" void doFlow__10dMsgFlow_cFP10fopAc_ac_cPP10fopAc_ac_ci(); -extern "C" void GetAc__8cCcD_ObjFv(); -extern "C" void Set__4cCcSFP8cCcD_Obj(); -extern "C" void __pl__4cXyzCFRC3Vec(); -extern "C" void __mi__4cXyzCFRC3Vec(); -extern "C" void __ml__4cXyzCFf(); -extern "C" void __ct__5csXyzFsss(); -extern "C" void cM_atan2s__Fff(); -extern "C" void cM_rndF__Ff(); -extern "C" void cM_rndFX__Ff(); -extern "C" void cM_rndF2__Ff(); -extern "C" void cM_rndFX2__Ff(); -extern "C" void SetPos__11cBgS_GndChkFPC3Vec(); -extern "C" void SetPos__11cBgS_GndChkFPC4cXyz(); -extern "C" void __dt__13cBgS_PolyInfoFv(); -extern "C" void __dt__8cM3dGCirFv(); -extern "C" void SetC__8cM3dGSphFRC4cXyz(); -extern "C" void SetR__8cM3dGSphFf(); -extern "C" void cLib_addCalc2__FPffff(); -extern "C" void cLib_addCalc0__FPfff(); -extern "C" void cLib_addCalcAngleS2__FPssss(); -extern "C" void MtxTrans__FfffUc(); -extern "C" void MtxScale__FfffUc(); -extern "C" void MtxPosition__FP4cXyzP4cXyz(); -extern "C" void MtxPush__Fv(); -extern "C" void MtxPull__Fv(); -extern "C" void seStart__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc(); -extern "C" void bgmStart__8Z2SeqMgrFUlUll(); -extern "C" void bgmStop__8Z2SeqMgrFUll(); -extern "C" void setBattleBgmOff__8Z2SeqMgrFb(); -extern "C" void __ct__15Z2CreatureEnemyFv(); -extern "C" void init__15Z2CreatureEnemyFP3VecP3VecUcUc(); -extern "C" void setLinkSearch__15Z2CreatureEnemyFb(); -extern "C" void setEnemyName__15Z2CreatureEnemyFPCc(); -extern "C" void* __nw__FUl(); -extern "C" void __dl__FPv(); -extern "C" void __as__12J3DLightInfoFRC12J3DLightInfo(); -extern "C" void checkPass__12J3DFrameCtrlFf(); -extern "C" void __construct_array(); -extern "C" void _savegpr_19(); -extern "C" void _savegpr_21(); -extern "C" void _savegpr_22(); -extern "C" void _savegpr_23(); -extern "C" void _savegpr_24(); -extern "C" void _savegpr_25(); -extern "C" void _savegpr_26(); -extern "C" void _savegpr_27(); -extern "C" void _savegpr_28(); -extern "C" void _savegpr_29(); -extern "C" void _restgpr_19(); -extern "C" void _restgpr_21(); -extern "C" void _restgpr_22(); -extern "C" void _restgpr_23(); -extern "C" void _restgpr_24(); -extern "C" void _restgpr_25(); -extern "C" void _restgpr_26(); -extern "C" void _restgpr_27(); -extern "C" void _restgpr_28(); -extern "C" void _restgpr_29(); -extern "C" u8 const tempBitLabels__20dSv_event_tmp_flag_c[370 + 2 /* padding */]; -extern "C" u8 saveBitLabels__16dSv_event_flag_c[1644 + 4 /* padding */]; -extern "C" extern void* __vt__8dCcD_Sph[36]; -extern "C" extern void* __vt__9dCcD_Stts[11]; -extern "C" extern void* __vt__12cCcD_SphAttr[25]; -extern "C" extern void* __vt__14cCcD_ShapeAttr[22]; -extern "C" extern void* __vt__9cCcD_Stts[8]; -extern "C" u8 now__14mDoMtx_stack_c[48]; -extern "C" u8 mSimpleTexObj__21dDlst_shadowControl_c[32]; -extern "C" u8 mCurrentMtx__6J3DSys[48]; -extern "C" u8 sincosTable___5JMath[65536]; -extern "C" u8 mParticleTracePCB__13dPa_control_c[4 + 4 /* padding */]; -extern "C" u8 m_midnaActor__9daPy_py_c[4]; -extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */]; -extern "C" void __register_global_object(); - -// -// Declarations: -// - -/* ############################################################################################## */ -/* 80779E28-80779E2C 00002C 0004+00 0/1 0/0 0/0 .rodata @4039 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4039 = 6.0f / 5.0f; -COMPILER_STRIP_GATE(0x80779E28, &lit_4039); -#pragma pop - -/* 80779E2C-80779E30 000030 0004+00 0/1 0/0 0/0 .rodata @4040 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4040 = 3.5f; -COMPILER_STRIP_GATE(0x80779E2C, &lit_4040); -#pragma pop - -/* 80779E30-80779E34 000034 0004+00 0/1 0/0 0/0 .rodata @4041 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4041 = 14.0f; -COMPILER_STRIP_GATE(0x80779E30, &lit_4041); -#pragma pop - -/* 80779E34-80779E38 000038 0004+00 0/1 0/0 0/0 .rodata @4042 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4042 = 250.0f; -COMPILER_STRIP_GATE(0x80779E34, &lit_4042); -#pragma pop - -/* 80779E38-80779E3C 00003C 0004+00 0/5 0/0 0/0 .rodata @4043 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4043 = 300.0f; -COMPILER_STRIP_GATE(0x80779E38, &lit_4043); -#pragma pop - -/* 80779E3C-80779E40 000040 0004+00 0/1 0/0 0/0 .rodata @4044 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4044 = 11.0f / 10.0f; -COMPILER_STRIP_GATE(0x80779E3C, &lit_4044); -#pragma pop - -/* 80779E40-80779E44 000044 0004+00 0/2 0/0 0/0 .rodata @4045 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4045 = 1300.0f; -COMPILER_STRIP_GATE(0x80779E40, &lit_4045); -#pragma pop - -/* 80779E44-80779E48 000048 0004+00 0/2 0/0 0/0 .rodata @4046 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4046 = 2000.0f; -COMPILER_STRIP_GATE(0x80779E44, &lit_4046); -#pragma pop - -/* 80779E48-80779E4C 00004C 0004+00 0/10 0/0 0/0 .rodata @4047 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4047 = 3.0f; -COMPILER_STRIP_GATE(0x80779E48, &lit_4047); -#pragma pop - -/* 80779E4C-80779E50 000050 0004+00 0/1 0/0 0/0 .rodata @4048 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4048 = 75.0f; -COMPILER_STRIP_GATE(0x80779E4C, &lit_4048); -#pragma pop - -/* 80779E50-80779E54 000054 0004+00 0/13 0/0 0/0 .rodata @4049 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4049 = 5.0f; -COMPILER_STRIP_GATE(0x80779E50, &lit_4049); -#pragma pop - -/* 80779E54-80779E58 000058 0004+00 1/17 0/0 0/0 .rodata @4050 */ -SECTION_RODATA static f32 const lit_4050 = 10.0f; -COMPILER_STRIP_GATE(0x80779E54, &lit_4050); - -/* 80779E58-80779E5C 00005C 0004+00 0/1 0/0 0/0 .rodata @4051 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4051 = 33.0f; -COMPILER_STRIP_GATE(0x80779E58, &lit_4051); -#pragma pop - -/* 8077A114-8077A17C -00001 0068+00 1/1 0/0 0/0 .data @5017 */ -SECTION_DATA static void* lit_5017[26] = { - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x114), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x310), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x310), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x310), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x310), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x310), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x310), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x310), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x310), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x310), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x174), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x1B8), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x310), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x310), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x310), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x310), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x310), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x310), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x310), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x310), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x1D0), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x23C), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x274), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x2B4), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x310), - (void*)(((char*)e_rdy_fight_run__FP11e_rdy_class) + 0x2D8), +enum Action { + /* 0x00 */ ACT_NORMAL, + /* 0x03 */ ACT_FIGHT_RUN = 3, + /* 0x04 */ ACT_FIGHT, + /* 0x05 */ ACT_BOW_RUN, + /* 0x06 */ ACT_BOW, + /* 0x07 */ ACT_BOW2, + /* 0x09 */ ACT_BOW_IKKI2 = 9, + /* 0x0A */ ACT_AVOID, + /* 0x13 */ ACT_BOMB_ACTION = 0x13, + /* 0x14 */ ACT_S_DAMAGE, + /* 0x15 */ ACT_DAMAGE, + /* 0x16 */ ACT_DROP, + /* 0x17 */ ACT_A_DAMAGE, + /* 0x18 */ ACT_STAND, + /* 0x19 */ ACT_COMMANDER, + /* 0x1A */ ACT_BOW3, + /* 0x1B */ ACT_EXCITE, + /* 0x1D */ ACT_WATER = 0x1D, + /* 0x1E */ ACT_TKUSA, + /* 0x20 */ ACT_YC_RIDE = 0x20, + /* 0x33 */ ACT_JYUNKAI = 0x33, }; -/* 8077A17C-8077A1D8 -00001 005C+00 1/1 0/0 0/0 .data @5218 */ -SECTION_DATA static void* lit_5218[23] = { - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x80), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x264), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x264), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x264), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x264), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x264), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x264), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x264), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x264), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x264), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0xE0), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x124), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x264), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x264), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x264), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x264), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x264), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x264), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x264), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x264), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x144), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x1F8), - (void*)(((char*)e_rdy_bow_run__FP11e_rdy_class) + 0x244), +enum Animation { + /* 0x04 */ ANM_ARMAMENT = 4, + /* 0x05 */ ANM_ATTACK01, + /* 0x06 */ ANM_AVOID, + /* 0x07 */ ANM_BLOW, + /* 0x08 */ ANM_BOW_READY, + /* 0x09 */ ANM_BOW_RREADY, + /* 0x0A */ ANM_BOW_RSHOOT, + /* 0x0B */ ANM_BOW_SHOOT, + /* 0x0C */ ANM_DAMAGE_L, + /* 0x0D */ ANM_DAMAGE_R, + /* 0x0E */ ANM_DAMAGE_S, + /* 0x0F */ ANM_DAMAGE_W, + /* 0x10 */ ANM_DEAD_ARROW, + /* 0x11 */ ANM_DIEA, + /* 0x12 */ ANM_DIEA_UP, + /* 0x13 */ ANM_DIEB, + /* 0x14 */ ANM_DIEB_UP, + /* 0x15 */ ANM_DROWNEDA, + /* 0x16 */ ANM_DROWNEDB, + /* 0x17 */ ANM_FURA2, + /* 0x18 */ ANM_GOSIGN, + /* 0x19 */ ANM_JUMP_A, + /* 0x1A */ ANM_JUMP_B, + /* 0x1B */ ANM_JUMP_C, + /* 0x1C */ ANM_KAMAE, + /* 0x1D */ ANM_KICK, + /* 0x1E */ ANM_KYORO2, + /* 0x1F */ ANM_LOOKBACK, + /* 0x20 */ ANM_PICKUP, + /* 0x21 */ ANM_RATTACK01, + /* 0x22 */ ANM_RATTACK01_WAIT, + /* 0x23 */ ANM_RATTACK02, + /* 0x24 */ ANM_RATTACK02_WAIT, + /* 0x25 */ ANM_RATTACK03, + /* 0x26 */ ANM_RATTACK04, + /* 0x27 */ ANM_RDAMAGE, + /* 0x28 */ ANM_RDAMAGE_BACK, + /* 0x29 */ ANM_RFLY, + /* 0x2A */ ANM_RFLY_GLIDE, + /* 0x2B */ ANM_RHANGED, + /* 0x2C */ ANM_RHANGED_BRASH, + /* 0x2D */ ANM_RHANGED_BRASH2, + /* 0x2E */ ANM_RHANGED_DAMAGE, + /* 0x2F */ ANM_RHANGED_WAIT, + /* 0x30 */ ANM_RHOVERING, + /* 0x31 */ ANM_RJUMP_C, + /* 0x32 */ ANM_RRUN, + /* 0x33 */ ANM_RRUN02_BACK, + /* 0x34 */ ANM_RRUN_BACK, + /* 0x35 */ ANM_RSHOOT, + /* 0x36 */ ANM_RSHOOT_READY, + /* 0x37 */ ANM_RSHOOT_WAIT, + /* 0x38 */ ANM_RSHOOT_WAIT02, + /* 0x39 */ ANM_RSTEP_BACK, + /* 0x3A */ ANM_RSTEP_L, + /* 0x3B */ ANM_RSTEP_LBACK, + /* 0x3C */ ANM_RSTEP_R, + /* 0x3D */ ANM_RSTEP_RBACK, + /* 0x3E */ ANM_RUN, + /* 0x3F */ ANM_RUN02, + /* 0x40 */ ANM_RWAIT, + /* 0x41 */ ANM_RWAIT_BACK, + /* 0x42 */ ANM_RWALK, + /* 0x43 */ ANM_RWALK_BACK, + /* 0x44 */ ANM_SHOOT, + /* 0x45 */ ANM_SHOOT_READY, + /* 0x46 */ ANM_SHOOT_WAIT, + /* 0x47 */ ANM_SHOUT, + /* 0x48 */ ANM_SIGN, + /* 0x49 */ ANM_SLEEP_LOOKAROUND, + /* 0x4A */ ANM_SLEEP_STANDUP, + /* 0x4B */ ANM_SLEEP_WAIT, + /* 0x4C */ ANM_WAIT01, + /* 0x4D */ ANM_WALK, }; + +enum Joint { + /* 0x00 */ JNT_KOSI, + /* 0x01 */ JNT_HIP1, + /* 0x02 */ JNT_KOKA_L, + /* 0x03 */ JNT_MOMO_L, + /* 0x04 */ JNT_SUNE_L1, + /* 0x05 */ JNT_ASI_L, + /* 0x06 */ JNT_KOKA_R, + /* 0x07 */ JNT_MOMOR_R, + /* 0x08 */ JNT_SUNE_R1, + /* 0x09 */ JNT_ASI_R, + /* 0x0A */ JNT_MUNE1, + /* 0x0B */ JNT_MUNE2, + /* 0x0C */ JNT_KUBI, + /* 0x0D */ JNT_HEAD, + /* 0x0E */ JNT_HIMO_L, + /* 0x0F */ JNT_HIMO_R, + /* 0x10 */ JNT_SHOULDER_L, + /* 0x11 */ JNT_ARM_L1, + /* 0x12 */ JNT_ARM_L2, + /* 0x13 */ JNT_HAND_L, + /* 0x14 */ JNT_YUBI_L, + /* 0x15 */ JNT_SHOULDER_R, + /* 0x16 */ JNT_ARM_R1, + /* 0x17 */ JNT_ARM_R2, + /* 0x18 */ JNT_HAND_R, + /* 0x19 */ JNT_YUBI_R, + }; -/* 8077A1D8-8077A1F8 -00001 0020+00 1/1 0/0 0/0 .data @5517 */ -SECTION_DATA static void* lit_5517[8] = { - (void*)(((char*)e_rdy_bow_ikki2__FP11e_rdy_class) + 0x64), - (void*)(((char*)e_rdy_bow_ikki2__FP11e_rdy_class) + 0x94), - (void*)(((char*)e_rdy_bow_ikki2__FP11e_rdy_class) + 0xC0), - (void*)(((char*)e_rdy_bow_ikki2__FP11e_rdy_class) + 0xCC), - (void*)(((char*)e_rdy_bow_ikki2__FP11e_rdy_class) + 0xF8), - (void*)(((char*)e_rdy_bow_ikki2__FP11e_rdy_class) + 0x158), - (void*)(((char*)e_rdy_bow_ikki2__FP11e_rdy_class) + 0x1F4), - (void*)(((char*)e_rdy_bow_ikki2__FP11e_rdy_class) + 0x274), -}; + enum WeaponType { + /* 0 */ WEAPON_NONE, + /* 1 */ WEAPON_CLUB, + /* 2 */ WEAPON_BOW, + /* 3 */ WEAPON_BOW_FIRE, + /* 4 */ WEAPON_BOW_BOMB, + }; -/* 8077A1F8-8077A230 -00001 0038+00 1/1 0/0 0/0 .data @5899 */ -SECTION_DATA static void* lit_5899[14] = { - (void*)(((char*)e_rdy_tkusa__FP11e_rdy_class) + 0x148), - (void*)(((char*)e_rdy_tkusa__FP11e_rdy_class) + 0x1DC), - (void*)(((char*)e_rdy_tkusa__FP11e_rdy_class) + 0x238), - (void*)(((char*)e_rdy_tkusa__FP11e_rdy_class) + 0x314), - (void*)(((char*)e_rdy_tkusa__FP11e_rdy_class) + 0x474), - (void*)(((char*)e_rdy_tkusa__FP11e_rdy_class) + 0x4A4), - (void*)(((char*)e_rdy_tkusa__FP11e_rdy_class) + 0x584), - (void*)(((char*)e_rdy_tkusa__FP11e_rdy_class) + 0x6DC), - (void*)(((char*)e_rdy_tkusa__FP11e_rdy_class) + 0x80C), - (void*)(((char*)e_rdy_tkusa__FP11e_rdy_class) + 0x884), - (void*)(((char*)e_rdy_tkusa__FP11e_rdy_class) + 0x91C), - (void*)(((char*)e_rdy_tkusa__FP11e_rdy_class) + 0x988), - (void*)(((char*)e_rdy_tkusa__FP11e_rdy_class) + 0x9C8), - (void*)(((char*)e_rdy_tkusa__FP11e_rdy_class) + 0xA6C), -}; +UNK_BSS(1109) +UNK_BSS(1107) +UNK_BSS(1105) +UNK_BSS(1104) +UNK_BSS(1099) +UNK_BSS(1097) +UNK_BSS(1095) +UNK_BSS(1094) +UNK_BSS(1057) +UNK_BSS(1055) +UNK_BSS(1053) +UNK_BSS(1052) +UNK_BSS(1014) +UNK_BSS(1012) +UNK_BSS(1010) +UNK_BSS(1009) -/* 8077A230-8077A24C -00001 001C+00 1/1 0/0 0/0 .data @6169 */ -SECTION_DATA static void* lit_6169[7] = { - (void*)(((char*)e_rdy_bomb_action__FP11e_rdy_class) + 0x98), - (void*)(((char*)e_rdy_bomb_action__FP11e_rdy_class) + 0xD8), - (void*)(((char*)e_rdy_bomb_action__FP11e_rdy_class) + 0x124), - (void*)(((char*)e_rdy_bomb_action__FP11e_rdy_class) + 0x210), - (void*)(((char*)e_rdy_bomb_action__FP11e_rdy_class) + 0x3F4), - (void*)(((char*)e_rdy_bomb_action__FP11e_rdy_class) + 0x250), - (void*)(((char*)e_rdy_bomb_action__FP11e_rdy_class) + 0x2DC), -}; +/* 8077A870-8077A874 000048 0004+00 1/1 0/0 0/0 .bss boss */ +static e_rdy_class* boss; -/* 8077A24C-8077A254 000170 0008+00 1/1 0/0 0/0 .data kado_bit$6208 */ -SECTION_DATA static u8 kado_bit[8] = { - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, -}; +/* 8077A874-8077A878 00004C 0004+00 1/2 0/0 0/0 .bss None */ +static bool hioInit; -/* 8077A254-8077A25C 000178 0008+00 1/1 0/0 0/0 .data kado_check_x$6209 */ -SECTION_DATA static u8 kado_check_x[8] = { - 0x42, 0xA0, 0x00, 0x00, 0xC2, 0xA0, 0x00, 0x00, -}; +/* 8077A884-8077A8D4 00005C 0050+00 15/18 0/0 0/0 .bss l_HIO */ +static daE_RDY_HIO_c l_HIO; -/* 8077A25C-8077A2DC -00001 0080+00 1/1 0/0 0/0 .data @6638 */ -SECTION_DATA static void* lit_6638[32] = { - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0x11C), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0x1E0), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0x43C), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0x5F4), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0x700), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0x7E8), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0x884), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0x8D4), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0xA14), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0x92C), - (void*)(((char*)e_rdy_damage__FP11e_rdy_class) + 0x9E8), -}; +/* 8077A8D4-8077A8D8 0000AC 0002+02 4/5 0/0 0/0 .bss S_find */ +static s16 S_find; -/* 8077A2DC-8077A314 -00001 0038+00 1/1 0/0 0/0 .data @6943 */ -SECTION_DATA static void* lit_6943[14] = { - (void*)(((char*)e_rdy_bow3__FP11e_rdy_class) + 0xD4), - (void*)(((char*)e_rdy_bow3__FP11e_rdy_class) + 0xFC), - (void*)(((char*)e_rdy_bow3__FP11e_rdy_class) + 0x3C0), - (void*)(((char*)e_rdy_bow3__FP11e_rdy_class) + 0x104), - (void*)(((char*)e_rdy_bow3__FP11e_rdy_class) + 0x3C0), - (void*)(((char*)e_rdy_bow3__FP11e_rdy_class) + 0x11C), - (void*)(((char*)e_rdy_bow3__FP11e_rdy_class) + 0x3C0), - (void*)(((char*)e_rdy_bow3__FP11e_rdy_class) + 0x3C0), - (void*)(((char*)e_rdy_bow3__FP11e_rdy_class) + 0x3C0), - (void*)(((char*)e_rdy_bow3__FP11e_rdy_class) + 0x3C0), - (void*)(((char*)e_rdy_bow3__FP11e_rdy_class) + 0x184), - (void*)(((char*)e_rdy_bow3__FP11e_rdy_class) + 0x1FC), - (void*)(((char*)e_rdy_bow3__FP11e_rdy_class) + 0x2B8), - (void*)(((char*)e_rdy_bow3__FP11e_rdy_class) + 0x360), -}; +/* 8077A8E4-8077A8F0 0000BC 000C+00 2/3 0/0 0/0 .bss S_find_pos */ +static cXyz S_find_pos; -/* 8077A314-8077A344 -00001 0030+00 1/1 0/0 0/0 .data @7053 */ -SECTION_DATA static void* lit_7053[12] = { - (void*)(((char*)e_rdy_commander__FP11e_rdy_class) + 0x8C), - (void*)(((char*)e_rdy_commander__FP11e_rdy_class) + 0x98), - (void*)(((char*)e_rdy_commander__FP11e_rdy_class) + 0xEC), - (void*)(((char*)e_rdy_commander__FP11e_rdy_class) + 0x3F0), - (void*)(((char*)e_rdy_commander__FP11e_rdy_class) + 0x3F0), - (void*)(((char*)e_rdy_commander__FP11e_rdy_class) + 0x140), - (void*)(((char*)e_rdy_commander__FP11e_rdy_class) + 0x16C), - (void*)(((char*)e_rdy_commander__FP11e_rdy_class) + 0x214), - (void*)(((char*)e_rdy_commander__FP11e_rdy_class) + 0x3F0), - (void*)(((char*)e_rdy_commander__FP11e_rdy_class) + 0x3F0), - (void*)(((char*)e_rdy_commander__FP11e_rdy_class) + 0x2F4), - (void*)(((char*)e_rdy_commander__FP11e_rdy_class) + 0x368), -}; +/* 8077A8F0-8077A918 0000C8 0028+00 2/2 0/0 0/0 .bss target_info */ +static fopAc_ac_c* target_info[10]; -/* 8077A344-8077A35C 000268 0016+02 1/1 0/0 0/0 .data j_spd$7550 */ -SECTION_DATA static u8 j_spd[22 + 2 /* padding */] = { - 0x40, - 0x00, - 0x40, - 0x00, - 0x40, - 0x00, - 0x10, - 0x00, - 0x10, - 0x00, - 0x10, - 0x00, - 0x10, - 0x00, - 0x40, - 0x00, - 0x40, - 0x00, - 0x40, - 0x00, - 0x40, - 0x00, - /* padding */ - 0x00, - 0x00, -}; +/* 8077A918-8077A91C 0000F0 0004+00 2/2 0/0 0/0 .bss target_info_count */ +static int target_info_count; -/* 8077A35C-8077A364 000280 0006+02 1/1 0/0 0/0 .data w_eff_name$7595 */ -SECTION_DATA static u8 w_eff_name[6 + 2 /* padding */] = { - 0x82, - 0x58, - 0x82, - 0x59, - 0x82, - 0x5A, - /* padding */ - 0x00, - 0x00, -}; +/* 8076BDCC-8076BE80 0000EC 00B4+00 1/1 0/0 0/0 .text __ct__13daE_RDY_HIO_cFv */ +daE_RDY_HIO_c::daE_RDY_HIO_c() { + field_0x4 = -1; + mScale = 1.2f; + field_0xc = 1.2f; + mWalkSpeed = 3.5f; + mRunSpeed = 14.0f; + field_0x18 = 250.0f; + field_0x1c = 300.0f; + mAttackAnmSpeed = 1.1f; + field_0x24 = 60; + field_0x28 = 1300.0f; + field_0x2c = 2000.0f; + field_0x30 = 3.0f; + field_0x34 = 3.0f; + field_0x38 = 1; + field_0x39 = 0; + mDrawEyeModel = false; + field_0x3b = 0; + field_0x3c = 75.0f; + field_0x48 = 5.0f; + field_0x44 = 10.0f; + field_0x4c = 33.0f; + field_0x40 = 5.0f; +} -/* 8077A364-8077A434 -00001 00D0+00 1/1 0/0 0/0 .data @7918 */ -SECTION_DATA static void* lit_7918[52] = { - (void*)(((char*)action__FP11e_rdy_class) + 0xEC), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0xFC), - (void*)(((char*)action__FP11e_rdy_class) + 0x10C), - (void*)(((char*)action__FP11e_rdy_class) + 0x11C), - (void*)(((char*)action__FP11e_rdy_class) + 0x12C), - (void*)(((char*)action__FP11e_rdy_class) + 0x13C), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x150), - (void*)(((char*)action__FP11e_rdy_class) + 0x160), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x16C), - (void*)(((char*)action__FP11e_rdy_class) + 0x178), - (void*)(((char*)action__FP11e_rdy_class) + 0x184), - (void*)(((char*)action__FP11e_rdy_class) + 0x190), - (void*)(((char*)action__FP11e_rdy_class) + 0x19C), - (void*)(((char*)action__FP11e_rdy_class) + 0x1A8), - (void*)(((char*)action__FP11e_rdy_class) + 0x1B8), - (void*)(((char*)action__FP11e_rdy_class) + 0x1C8), - (void*)(((char*)action__FP11e_rdy_class) + 0x1DC), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x1E8), - (void*)(((char*)action__FP11e_rdy_class) + 0x1F8), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x204), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x218), - (void*)(((char*)action__FP11e_rdy_class) + 0x210), -}; +/* 8076BE80-8076BF6C 0001A0 00EC+00 23/23 0/0 0/0 .text anm_init__FP11e_rdy_classifUcf */ +static void anm_init(e_rdy_class* i_this, int i_anm, f32 i_morf, u8 i_attr, f32 i_rate) { + J3DAnmTransform* bck = (J3DAnmTransform*)dComIfG_getObjectRes(i_this->mpArcName, i_anm); + i_this->mpMorf->setAnm(bck, i_attr, i_morf, i_rate, 0.0f, -1.0f); + i_this->mAnm = i_anm; -/* 8077A434-8077A5C8 -00001 0194+00 1/1 0/0 0/0 .data @8596 */ -SECTION_DATA static void* lit_8596[101] = { - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x94), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x180), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x180), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x180), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x25C), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x304), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x460), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x544), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x5D4), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x654), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x704), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x778), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x7E0), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x898), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x960), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x9C4), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0xB74), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0xC74), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0xDC0), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0xE9C), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0xFA0), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0xFE4), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x1054), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x10A4), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x1148), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x1198), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x11F0), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E8), - (void*)(((char*)demo_camera__FP11e_rdy_class) + 0x12E4), -}; + if (i_anm == ANM_KYORO2) { + i_this->mpMorf->setFrame(cM_rndF(30.0f)); + } +} -/* 8077A5C8-8077A62C 0004EC 0064+00 1/1 0/0 0/0 .data time_scale$8695 */ -SECTION_DATA static u8 time_scale[100] = { - 0x3F, 0x99, 0x99, 0x9A, 0x3F, 0x99, 0x99, 0x9A, 0x3F, 0x8C, 0xCC, 0xCD, 0x3F, 0x80, 0x00, - 0x00, 0x3F, 0x4C, 0xCC, 0xCD, 0x3F, 0x19, 0x99, 0x9A, 0x3E, 0xCC, 0xCC, 0xCD, 0x3E, 0x4C, - 0xCC, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x4C, 0xCC, - 0xCD, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x4C, 0xCC, 0xCD, 0x3F, 0x99, 0x99, 0x9A, 0x3F, 0x99, - 0x99, 0x9A, 0x3F, 0x99, 0x99, 0x9A, 0x3F, 0x99, 0x99, 0x9A, -}; +/* 8076BF6C-8076C484 00028C 0518+00 1/1 0/0 0/0 .text nodeCallBack__FP8J3DJointi */ +// NONMATCHING ordering issue +static int nodeCallBack(J3DJoint* i_joint, int param_1) { + if (param_1 == 0) { + int jnt_no = i_joint->getJntNo(); + J3DModel* model = j3dSys.getModel(); + e_rdy_class* _this = (e_rdy_class*)model->getUserArea(); + if (_this != NULL) { + MTXCopy(model->getAnmMtx(jnt_no), *calc_mtx); + + if (jnt_no == JNT_KOSI) { + if (_this->field_0xa98 == 3) { + mDoMtx_YrotM(*calc_mtx, _this->field_0xa9a); + } + } else if (jnt_no == JNT_HIP1) { + if (_this->field_0xa98 == 3) { + mDoMtx_XrotM(*calc_mtx, _this->field_0xa9a); + } + mDoMtx_YrotM(*calc_mtx, _this->field_0xbb0); + mDoMtx_ZrotM(*calc_mtx, _this->field_0xb8c[2] + + (_this->field_0xbae - _this->field_0xb02[2].x)); + } else if (jnt_no == JNT_KOKA_L) { + mDoMtx_YrotM(*calc_mtx, _this->field_0xb8c[7]); + } else if (jnt_no == JNT_SUNE_L1) { + mDoMtx_ZrotM(*calc_mtx, _this->field_0xb8c[8]); + } else if (jnt_no == JNT_KOKA_R) { + mDoMtx_YrotM(*calc_mtx, _this->field_0xb8c[9]); + } else if (jnt_no == JNT_SUNE_R1) { + mDoMtx_ZrotM(*calc_mtx, _this->field_0xb8c[10]); + } else if (jnt_no == JNT_MUNE2) { + mDoMtx_YrotM(*calc_mtx, _this->field_0xb02[1].y); + if (_this->field_0xa98 == 3) { + mDoMtx_XrotM(*calc_mtx, _this->field_0xa9a); + } + mDoMtx_ZrotM(*calc_mtx, _this->field_0xb02[1].x + _this->field_0xb8c[1]); + if (_this->field_0xa98 == 4) { + mDoMtx_YrotM(*calc_mtx, _this->field_0xa9c * -1.0f); + mDoMtx_XrotM(*calc_mtx, _this->field_0xa9c * 0.3f); + } + if (_this->field_0xa98 == 3) { + mDoMtx_ZrotM(*calc_mtx, _this->field_0xa9c); + } + } else if (jnt_no == JNT_HEAD) { + if (_this->field_0xa98 != 3 && _this->field_0xa98 != 4) { + mDoMtx_YrotM(*calc_mtx, (_this->field_0xa9e - _this->field_0xa9a) / 2); + mDoMtx_ZrotM(*calc_mtx, (_this->field_0xb8c[0] + + (_this->field_0xb02[0].x - _this->field_0xa9c)) / 2); + } + } else if (jnt_no == JNT_KUBI) { + mDoMtx_YrotM(*calc_mtx, _this->field_0xb02[0].y); + if (_this->field_0xa98 != 3 && _this->field_0xa98 != 4) { + mDoMtx_YrotM(*calc_mtx, (_this->field_0xa9e - _this->field_0xa9a) / 2); + mDoMtx_ZrotM(*calc_mtx, (_this->field_0xb8c[0] + + (_this->field_0xb02[0].x - _this->field_0xa9c)) / 2); + } else { + mDoMtx_ZrotM(*calc_mtx, _this->field_0xb02[0].x + _this->field_0xb8c[0]); + } + } else if (jnt_no == JNT_ARM_L1) { + mDoMtx_YrotM(*calc_mtx, _this->field_0xb02[3].y + _this->field_0xb8c[3]); + } else if (jnt_no == JNT_ARM_L2) { + mDoMtx_YrotM(*calc_mtx, _this->field_0xb02[4].y + _this->field_0xb8c[4]); + } else if (jnt_no == JNT_ARM_R1) { + mDoMtx_YrotM(*calc_mtx, _this->field_0xb02[5].y + _this->field_0xb8c[5]); + } else if (jnt_no == JNT_ARM_R2) { + mDoMtx_YrotM(*calc_mtx, _this->field_0xb02[6].y + _this->field_0xb8c[6]); + } + + if (_this->field_0xbaa != 0) { + if (jnt_no & 1) { + mDoMtx_YrotM(*calc_mtx, _this->field_0xbaa); + } else if (jnt_no & 2) { + mDoMtx_XrotM(*calc_mtx, _this->field_0xbaa); + } else if (jnt_no & 4) { + mDoMtx_ZrotM(*calc_mtx, _this->field_0xbaa); + } + } + + model->setAnmMtx(jnt_no, *calc_mtx); + MTXCopy(*calc_mtx, J3DSys::mCurrentMtx); + } + } + + return 1; +} + +/* 8076C484-8076C54C 0007A4 00C8+00 1/1 0/0 0/0 .text nodeCallBack_bow__FP8J3DJointi */ +static int nodeCallBack_bow(J3DJoint* i_joint, int param_1) { + if (param_1 == 0) { + int jnt_no = i_joint->getJntNo(); + J3DModel* model = j3dSys.getModel(); + e_rdy_class* _this = (e_rdy_class*)model->getUserArea(); + if (_this != NULL && _this->mBowRotation != 0) { + MTXCopy(model->getAnmMtx(jnt_no), *calc_mtx); + mDoMtx_ZrotM(*calc_mtx, _this->mBowRotation); + model->setAnmMtx(jnt_no, *calc_mtx); + MTXCopy(*calc_mtx, J3DSys::mCurrentMtx); + } + } + + return 1; +} + +/* 8076C54C-8076C9D0 00086C 0484+00 1/0 0/0 0/0 .text daE_RDY_Draw__FP11e_rdy_class */ +static int daE_RDY_Draw(e_rdy_class* i_this) { + if (i_this->field_0x5b8 == 12 && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[239])) { + return 1; + } + + if (i_this->mKargarokDeleteTimer != 0) { + return 1; + } + + J3DModel* model = i_this->mpMorf->getModel(); + g_env_light.settingTevStruct(2, &i_this->current.pos, &i_this->tevStr); + dComIfGd_setListDark(); + g_env_light.setLightTevColorType_MAJI(model, &i_this->tevStr); + + if (i_this->mIsDying) { + J3DModelData* model_data = model->getModelData(); + for (u16 i = 0; i < model_data->getMaterialNum(); i++) { + J3DMaterial* material = model_data->getMaterialNodePointer(i); + material->getTevColor(0)->r = i_this->mDyingTevColor; + material->getTevColor(0)->g = i_this->mDyingTevColor; + material->getTevColor(0)->b = i_this->mDyingTevColor; + } + } + + i_this->mpMorf->entryDL(); + + if (i_this->mIsDying) { + J3DModelData* model_data = model->getModelData(); + for (u16 i = 0; i < model_data->getMaterialNum(); i++) { + J3DMaterial* material = model_data->getMaterialNodePointer(i); + material->getTevColor(0)->r = 0; + material->getTevColor(0)->g = 0; + material->getTevColor(0)->b = 0; + } + } + + if (i_this->mWeaponType == WEAPON_CLUB) { + g_env_light.setLightTevColorType_MAJI(i_this->mpWeaponModel, &i_this->tevStr); + mDoExt_modelUpdateDL(i_this->mpWeaponModel); + } else if (i_this->mWeaponType >= WEAPON_BOW) { + g_env_light.setLightTevColorType_MAJI(i_this->mpBowMorf->getModel(), &i_this->tevStr); + i_this->mpBowMorf->entryDL(); + if (i_this->mHasArrow) { + g_env_light.setLightTevColorType_MAJI(i_this->mpWeaponModel, &i_this->tevStr); + mDoExt_modelUpdateDL(i_this->mpWeaponModel); + } + } + + if (i_this->mDrawEyeModel) { + for (int i = 0; i < 2; i++) { + g_env_light.setLightTevColorType_MAJI(i_this->mpEyeModel[i], &i_this->tevStr); + J3DModelData* model_data = i_this->mpEyeModel[i]->getModelData(); + for (u16 j = 0; j < model_data->getMaterialNum(); j++) { + J3DMaterial* material = model_data->getMaterialNodePointer(j); + material->getTevColor(1)->r = 0xff; + material->getTevColor(1)->g = 0x8a; + material->getTevColor(1)->b = 0x18; + } + mDoExt_modelUpdateDL(i_this->mpEyeModel[i]); + } + } + + dComIfGd_setList(); + + if (i_this->mRideState != 2) { + cXyz pos; + pos.set(i_this->current.pos.x, i_this->current.pos.y + 100.0f, i_this->current.pos.z); + i_this->mShadowKey = dComIfGd_setShadow(i_this->mShadowKey, 1, model, &pos, 1200.0f, 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()); + if (i_this->mWeaponType == WEAPON_CLUB) { + dComIfGd_addRealShadow(i_this->mShadowKey, i_this->mpWeaponModel); + } + } + + if (i_this->mIsHoldingGrass) { + g_env_light.settingTevStruct(0x10, &i_this->current.pos, &i_this->mHawkGrassTevStr); + g_env_light.setLightTevColorType_MAJI(i_this->mpHawkGrassModel, &i_this->mHawkGrassTevStr); + mDoExt_modelUpdateDL(i_this->mpHawkGrassModel); + } + + return 1; +} + +/* 8076C9D0-8076CAA8 000CF0 00D8+00 3/3 0/0 0/0 .text other_bg_check__FP11e_rdy_classP10fopAc_ac_c + */ +static BOOL other_bg_check(e_rdy_class* i_this, fopAc_ac_c* i_actor) { + fopAc_ac_c* _this = (fopAc_ac_c*)i_this; + dBgS_LinChk lin_chk; + cXyz start, end; + end = i_actor->current.pos; + end.y += 130.0f; + start = _this->current.pos; + start.y = _this->eyePos.y; + lin_chk.Set(&start, &end, _this); + if (dComIfG_Bgsp().LineCross(&lin_chk)) { + return TRUE; + } else { + return FALSE; + } +} + +/* 8076CAA8-8076CB24 000DC8 007C+00 1/1 0/0 0/0 .text s_b_sub__FPvPv */ +static void* s_b_sub(void* i_proc, void* i_this) { + if (fopAc_IsActor(i_proc)) { + fopAc_ac_c* actor = (fopAc_ac_c*)i_proc; + if (dBomb_c::checkBombActor(actor) && !((dBomb_c*)actor)->checkStateExplode() + && target_info_count < 10) + { + target_info[target_info_count] = actor; + target_info_count++; + } + } + + return NULL; +} + +/* 8076CB24-8076CE10 000E44 02EC+00 2/2 0/0 0/0 .text search_bomb__FP11e_rdy_classi */ +// NONMATCHING regalloc mainly +static dBomb_c* search_bomb(e_rdy_class* i_this, BOOL param_1) { + if ((i_this->field_0xaf0 & 0x10000000) == 0) { + return NULL; + } + + target_info_count = 0; + for (int i = 0; i < 10; i++) { + target_info[i] = NULL; + } + fpcM_Search(s_b_sub, i_this); + + f32 threshold = 50.0f; + if (target_info_count != 0) { + cXyz vec1, vec2, vec3; + for (int i = 0; i < target_info_count;) { + dBomb_c* bomb = (dBomb_c*)target_info[i]; + vec1.x = bomb->current.pos.x - i_this->eyePos.x; + vec1.y = threshold + bomb->current.pos.y - i_this->eyePos.y; + vec1.z = bomb->current.pos.z - i_this->eyePos.z; + vec2.x = bomb->current.pos.x - i_this->current.pos.x; + vec2.z = bomb->current.pos.z - i_this->current.pos.z; + f32 dist1 = JMAFastSqrt(vec1.x * vec1.x + vec1.z * vec1.z); + f32 dist2 = JMAFastSqrt(vec2.x * vec2.x + vec2.z * vec2.z); + + if (dist1 < threshold && !(dist2 > i_this->mPlayerDist + 30.0f) + && (!other_bg_check(i_this, bomb) || !param_1)) + { + if (param_1) { + if (fabsf(50.0f + bomb->current.pos.y - i_this->eyePos.y) <= 300.0f) { + s16 ang_y = i_this->shape_angle.y - cM_atan2s(vec1.x, vec1.z); + u16 abs_ang_y = ang_y < 0 ? (s16)-ang_y : ang_y; + if (abs_ang_y < 20000) { + return bomb; + } + mDoMtx_YrotS(*calc_mtx, -i_this->shape_angle.y); + MtxPosition(&vec1, &vec3); + if (fabsf(vec3.x) < 500.0f && fabsf(vec3.y) < 300.0f + && vec3.z > -125.0f && vec3.z < 500.0f) + { + return bomb; + } + } + } else { + return bomb; + } + } + + i++; + if (i == target_info_count) { + i = 0; + threshold += 50.0f; + if (threshold > 1500.0f) { + return NULL; + } + } + } + } else { + return NULL; + } + + return NULL; +} + +/* 8076CE10-8076CF1C 001130 010C+00 3/3 0/0 0/0 .text way_bg_check__FP11e_rdy_classf */ +static BOOL way_bg_check(e_rdy_class* i_this, f32 i_dist) { + fopAc_ac_c* _this = (fopAc_ac_c*)i_this; + dBgS_LinChk lin_chk; + cXyz vec, start, end; + start = _this->current.pos; + start.y += 50.0f; + mDoMtx_YrotS(*calc_mtx, _this->shape_angle.y); + vec.x = 0.0f; + vec.y = 50.0f; + vec.z = i_dist; + MtxPosition(&vec, &end); + end += _this->current.pos; + lin_chk.Set(&start, &end, _this); + if (dComIfG_Bgsp().LineCross(&lin_chk)) { + return TRUE; + } else { + return FALSE; + } +} + +/* 8076CF1C-8076D004 00123C 00E8+00 1/1 0/0 0/0 .text ride_off__FP11e_rdy_class */ +static void ride_off(e_rdy_class* i_this) { + e_yc_class* kargarok = (e_yc_class*)fopAcM_SearchByID(i_this->mKargarokID); + if (kargarok != NULL) { + kargarok->field_0x6b0 = 0; + i_this->field_0xa8e = 0; + i_this->current.angle.x = 0; + i_this->mKargarokID = fpcM_ERROR_PROCESS_ID_e; + } + + i_this->mRideState = 0; + if (i_this->mpBowMorf != NULL) { + J3DAnmTransform* bck = (J3DAnmTransform*)dComIfG_getObjectRes(i_this->mpArcName, 11); + i_this->mpBowMorf->setAnm(bck, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 1.0f, 0.0f, -1.0f); + i_this->mpBowMorf->setFrame(10.0f); + } + i_this->home.pos = i_this->current.pos; +} + +/* 8076D004-8076D114 001324 0110+00 6/6 0/0 0/0 .text pl_check__FP11e_rdy_classfs */ +static BOOL pl_check(e_rdy_class* i_this, f32 i_dist, s16 i_angle) { + if (dComIfGp_event_runCheck()) { + return FALSE; + } + + fopAc_ac_c* player = dComIfGp_getPlayer(0); + + if (S_find != 0) { + i_dist = 10000.0f; + } + + if (i_this->mPlayerDist < i_dist) { + s16 angle = i_this->shape_angle.y - i_this->mPlayerAngle; + if (angle < i_angle && angle > (s16)-i_angle && !other_bg_check(i_this, player)) { + return TRUE; + } + + for (int i = 0; i <= 2; i++) { + if (i_this->mCcSph[i].ChkCoHit()) { + fopAc_ac_c* hit_actor = dCc_GetAc(i_this->mCcSph[i].GetCoHitObj()->GetAc()); + if (daPy_getPlayerActorClass() == hit_actor) { + return TRUE; + } + } + } + } + + return FALSE; +} + +/* 8076D114-8076D138 001434 0024+00 3/3 0/0 0/0 .text bomb_view_check__FP11e_rdy_class */ +static dBomb_c* bomb_view_check(e_rdy_class* i_this) { + return search_bomb(i_this, TRUE); +} + +/* 8076D138-8076D15C 001458 0024+00 1/1 0/0 0/0 .text bomb_check__FP11e_rdy_class */ +static dBomb_c* bomb_check(e_rdy_class* i_this) { + return search_bomb(i_this, FALSE); +} + +/* 8076D15C-8076D24C 00147C 00F0+00 6/6 0/0 0/0 .text move_gake_check__FP11e_rdy_classf + */ +static BOOL move_gake_check(e_rdy_class* i_this, f32 i_dist) { + dBgS_GndChk gnd_chk; + cXyz vec, pos; + mDoMtx_YrotS(*calc_mtx, i_this->shape_angle.y); + vec.x = 0.0f; + vec.y = 100.0f; + vec.z = i_dist; + MtxPosition(&vec, &pos); + pos += i_this->current.pos; + gnd_chk.SetPos(&pos); + if (i_this->current.pos.y - dComIfG_Bgsp().GroundCross(&gnd_chk) > 300.0f) { + return TRUE; + } else { + return FALSE; + } +} + +/* 8076D24C-8076D3C4 00156C 0178+00 1/1 0/0 0/0 .text way_check__FP11e_rdy_class */ +static BOOL way_check(e_rdy_class* i_this) { + fopAc_ac_c* _this = (fopAc_ac_c*)i_this; + cXyz start, end, vec; + s16 angle = cM_rndF(65535.0f); + f32 dist = 1000.0f; + start = _this->current.pos; + start.y += 50.0f; + for (int i = 0; i < 5; i++) { + for (int j = 0; j < 0x10; j++) { + mDoMtx_YrotS(*calc_mtx, angle); + vec.x = 0.0f; + vec.y = 0.0f; + vec.z = dist; + MtxPosition(&vec, &end); + end += start; + dBgS_LinChk lin_chk; + lin_chk.Set(&start, &end, _this); + if (dComIfG_Bgsp().LineCross(&lin_chk)) { + angle += 0x1000; + } else { + i_this->mTargetAngleY = angle; + return TRUE; + } + } + dist -= 150.0f; + } + return FALSE; +} + +/* 8076D3C4-8076D5F0 0016E4 022C+00 1/1 0/0 0/0 .text path_check__FP11e_rdy_class */ +static BOOL path_check(e_rdy_class* i_this) { + static bool check_index[0xff]; + dBgS_LinChk lin_chk; + cXyz start, end; + start = i_this->current.pos; + start.y += 10.0f; + dStage_dPnt_c* point = i_this->mpPath->m_points; + for (int i = 0; i < i_this->mpPath->m_num; i++, point++) { + if (i < 0xff) { + end.x = point->m_position.x; + end.y = point->m_position.y + 10.0f; + end.z = point->m_position.z; + lin_chk.Set(&start, &end, i_this); + if (!dComIfG_Bgsp().LineCross(&lin_chk)) { + check_index[i] = true; + } else { + check_index[i] = false; + } + } + } + + f32 dist, delta_x, delta_y, delta_z; + f32 threshold = 100.0f; + bool check = false; + for (int i = 0; i < 100; threshold += 50.0f, i++) { + point = i_this->mpPath->m_points; + for (int i = 0; i < i_this->mpPath->m_num; i++, point++) { + if (i < 0xff && check_index[i]) { + delta_x = i_this->current.pos.x - point->m_position.x; + delta_y = i_this->current.pos.y - point->m_position.y; + delta_z = i_this->current.pos.z - point->m_position.z; + dist = JMAFastSqrt(delta_x * delta_x + delta_y * delta_y + delta_z * delta_z); + if (dist < threshold) { + i_this->mPathIndex = i; + check = true; + break; + } + } + } + if (check) break; + } + + if (!check) { + return FALSE; + } else { + if (cM_rndF(1.0f) < 0.5f) { + i_this->mPathDirection = 1; + } else { + i_this->mPathDirection = -1; + } + return TRUE; + } +} + +/* 8076D5F0-8076DA3C 001910 044C+00 1/1 0/0 0/0 .text e_rdy_normal__FP11e_rdy_class */ +static void e_rdy_normal(e_rdy_class* i_this) { + f32 target_speed = 0.0f; + s16 check_angle = 0x4000; + + switch (i_this->mMode) { + case 0: + if (i_this->field_0x5bb) { + anm_init(i_this, ANM_ARMAMENT, 2.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + i_this->mMode = 1; + } else { + i_this->mMode = 2; + } + break; + + case 1: + if ((int)i_this->mpMorf->getFrame() == 11) { + i_this->field_0x5bb = false; + } + if (i_this->mpMorf->isStop()) { + i_this->mMode = 2; + } + break; + + case 2: + if (i_this->mTimer[0] == 0) { + if (i_this->mpPath != NULL && path_check(i_this)) { + i_this->mAction = ACT_JYUNKAI; + i_this->mMode = 0; + return; + } else if (way_check(i_this)) { + anm_init(i_this, ANM_WALK, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mMode = 3; + i_this->mTimer[0] = cM_rndF(100.0f) + 100.0f; + } + } else { + check_angle = 0x6000; + } + break; + + case 3: + target_speed = l_HIO.mWalkSpeed; + if (i_this->speedF >= 3.0f && move_gake_check(i_this, 100.0f)) { + i_this->mMode = 4; + i_this->mTimer[0] = cM_rndF(100.0f) + 50.0f; + anm_init(i_this, ANM_KYORO2, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + } else if (i_this->mTimer[0] == 0 + || (i_this->speedF >= 3.0f && way_bg_check(i_this, 200.0f))) + { + i_this->mMode = 2; + i_this->mTimer[0] = cM_rndF(100.0f) + 50.0f; + anm_init(i_this, ANM_KYORO2, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + } + break; + + case 4: + i_this->field_0xa98 = -1; + if (i_this->mTimer[0] == 0) { + i_this->mTargetAngleY = i_this->current.angle.y + 0x8000 + (int)cM_rndFX(4000.0f); + anm_init(i_this, ANM_WALK, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mMode = 3; + i_this->mTimer[0] = cM_rndF(100.0f) + 100.0f; + } + break; + } + + if (target_speed) { + cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->mTargetAngleY, 8, 0x400); + s16 angle_diff = i_this->current.angle.y - i_this->mTargetAngleY; + if (angle_diff > 0x400 || angle_diff < -0x400) { + target_speed = 0.0f; + } + } + cLib_addCalc2(&i_this->speedF, target_speed, 1.0f, 3.0f); + + f32 check_dist = i_this->mPlayerCheckDist; + BOOL bVar1 = FALSE; + if (i_this->field_0xa71 == 1 || S_find != 0) { + if (i_this->field_0xa71 == 1) { + bVar1 = TRUE; + } + check_dist = 10000.0f; + check_angle = 0x7fff; + } + + if (((i_this->mCounter & 7) == 0 || bVar1) && i_this->mMode >= 2 + && ((i_this->mCounter & 8) == 0 || bVar1)) + { + if (pl_check(i_this, check_dist, check_angle)) { + if (i_this->mWeaponType == WEAPON_CLUB) { + i_this->mAction = ACT_FIGHT_RUN; + i_this->mMode = -10; + i_this->mTimer[0] = 60; + } else if (i_this->mWeaponType >= WEAPON_BOW) { + i_this->mAction = ACT_BOW_RUN; + i_this->mMode = -10; + } + } + if (bomb_view_check(i_this)) { + i_this->mAction = ACT_BOMB_ACTION; + i_this->mMode = 0; + } + } +} + +/* 8076DA3C-8076E00C 001D5C 05D0+00 2/1 0/0 0/0 .text e_rdy_fight_run__FP11e_rdy_class */ +// NONMATCHING minor regalloc +static void e_rdy_fight_run(e_rdy_class* i_this) { + f32 target_speed = 0.0f; + s8 bVar1 = true; + if (!pl_check(i_this, i_this->mPlayerCheckDist + 50.0f, 0x7fff) && i_this->mTimer[0] == 0) { + if (i_this->field_0xa6c == 0) { + bVar1 = false; + } + } else { + i_this->field_0xa6c = 20; + } + f32 run_speed = l_HIO.mRunSpeed; + + if (i_this->mWeaponType != WEAPON_CLUB) { + if (i_this->mWeaponType >= WEAPON_BOW) { + i_this->mAction = ACT_BOW_RUN; + } else { + i_this->mAction = ACT_NORMAL; + i_this->mTimer[0] = cM_rndF(50.0f) + 50.0f; + anm_init(i_this, ANM_KYORO2, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + } + i_this->mMode = 0; + return; + } + + switch (i_this->mMode) { + case -20: + if ((int)i_this->mpMorf->getFrame() == 11) { + i_this->field_0x5bb = false; + } + if (i_this->mpMorf->isStop()) { + i_this->mMode = 0; + } + break; + + case -10: + anm_init(i_this, ANM_WAIT01, 7.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mTimer[1] = cM_rndF(10.0f) + 15.0f; + i_this->mMode = -9; + break; + + case -9: + if (i_this->mTimer[1] == 0) { + i_this->mMode = 0; + } + break; + + case 0: + if (i_this->field_0x5bb) { + anm_init(i_this, ANM_ARMAMENT, 2.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + i_this->mMode = -20; + } else if (i_this->mTimer[1] == 0) { + anm_init(i_this, ANM_RUN, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, cM_rndFX(0.05f) + 1.0f); + i_this->mMode = 1; + } + break; + + case 1: + target_speed = run_speed; + if (i_this->mPlayerDist < l_HIO.field_0x18) { + anm_init(i_this, ANM_KAMAE, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mMode = 2; + } + break; + + case 2: + target_speed = l_HIO.mWalkSpeed; + if (i_this->mPlayerDist > l_HIO.field_0x18 + 50.0f) { + i_this->mMode = 0; + } else if (i_this->mPlayerDist < l_HIO.field_0x18 - 50.0f) { + i_this->mMode = 3; + } + break; + + case 3: + target_speed = -l_HIO.mWalkSpeed; + if (i_this->mPlayerDist > l_HIO.field_0x18) { + i_this->mMode = 2; + } + break; + + case 5: + if (i_this->mTimer[3] != 0) { + i_this->field_0xa98 = -1; + } + i_this->speedF = 0.0f; + if (!move_gake_check(i_this, 100.0f)) { + i_this->mMode = 2; + } + break; + } + + if (i_this->mMode < 5 && move_gake_check(i_this, 100.0f)) { + i_this->mMode = 5; + i_this->mTimer[3] = cM_rndF(15.0f) + 30.0f; + anm_init(i_this, ANM_WAIT01, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + } + + if (i_this->mMode >= 0) { + cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->mPlayerAngle, 4, 0x800); + s16 angle_diff = i_this->current.angle.y - i_this->mPlayerAngle; + if (angle_diff > 0x400 || angle_diff < -0x400) { + target_speed = 0.0f; + } + } + cLib_addCalc2(&i_this->speedF, target_speed, 1.0f, 5.0f); + + if (!bVar1) { + i_this->mAction = ACT_NORMAL; + if (i_this->mMode == 5) { + i_this->mTargetAngleY = i_this->current.angle.y + 0x8000 + (int)cM_rndFX(4000.0f); + anm_init(i_this, ANM_WALK, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mMode = 3; + i_this->mTimer[0] = cM_rndF(100.0f) + 100.0f; + i_this->mTimer[1] = 40; + } else { + i_this->mMode = 0; + i_this->mTimer[0] = cM_rndF(50.0f) + 50.0f; + anm_init(i_this, ANM_KYORO2, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + } + } else { + if (i_this->mPlayerDist < l_HIO.field_0x18 && (i_this->field_0xaf0 & cc_pl_cut_bit_get()) + && i_this->mKnockback < 0.1f) + { + i_this->mAction = ACT_AVOID; + i_this->mMode = 0; + i_this->mIFrameTimer = 20; + } else if (!i_this->field_0x5bb && i_this->mPlayerDist < l_HIO.field_0x1c + && i_this->mTimer[2] == 0) + { + i_this->mTimer[2] = cM_rndF(20.0f) + 20.0f; + if (cM_rndF(1.0f) < 0.5f) { + i_this->mAction = ACT_FIGHT; + i_this->mMode = 0; + } + } + } + + if ((i_this->mCounter & 0xf) == 0 && bomb_view_check(i_this)) { + i_this->mAction = ACT_BOMB_ACTION; + i_this->mMode = 0; + } + + if (i_this->mAction == ACT_FIGHT_RUN && i_this->field_0xa98 >= 0) { + i_this->field_0xa98 = 1; + } +} + +/* 8076E00C-8076E06C 00232C 0060+00 1/1 0/0 0/0 .text at_hit_check__FP11e_rdy_class */ +static fopAc_ac_c* at_hit_check(e_rdy_class* i_this) { + if (i_this->mMode >= 10) { + return NULL; + } + + if (i_this->mAtSph.ChkAtHit()) { + return dCc_GetAc(i_this->mAtSph.GetAtHitObj()->GetAc()); + } else { + return NULL; + } +} + +/* 8076E06C-8076E418 00238C 03AC+00 1/1 0/0 0/0 .text e_rdy_fight__FP11e_rdy_class */ +static void e_rdy_fight(e_rdy_class* i_this) { + int frame = (int)i_this->mpMorf->getFrame(); + int last_frame; + + switch (i_this->mMode) { + case 0: + anm_init(i_this, ANM_ATTACK01, 6.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + if (l_HIO.field_0x38 == 0) { + i_this->mTimer[0] = 25; + } else if (l_HIO.field_0x38 == 1) { + i_this->mTimer[0] = 15; + } else if (l_HIO.field_0x38 == 2) { + i_this->mTimer[0] = 10; + } + i_this->mMode = 1; + i_this->mTimer[1] = 5; + i_this->mSound.startCreatureVoice(Z2SE_EN_RD_V_WAND_ATTACK, -1); + break; + + case 1: + if (i_this->mTimer[1] != 0) { + cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->mPlayerAngle, 4, 0x800); + } + if (frame == 30) { + i_this->mpMorf->setFrame(0.0f); + } else if (i_this->mTimer[0] == 0) { + anm_init(i_this, ANM_ATTACK01, 2.0f, J3DFrameCtrl::LOOP_ONCE_e, l_HIO.mAttackAnmSpeed); + i_this->mpMorf->setFrame(30.0f); + i_this->mMode = 2; + } + break; + + case 2: + if (frame >= 44 && frame <= 47) { + i_this->field_0xa7b = 1; + } + if (i_this->mpMorf->checkFrame(44.0f)) { + i_this->mSound.startCreatureSound(Z2SE_EN_RD_SWING_CLUB, 0, -1); + } + if (i_this->mpMorf->checkFrame(50.0f)) { + i_this->mpMorf->setPlaySpeed(1.0f); + } + if (l_HIO.field_0x38 == 0) { + last_frame = 64; + } else if (l_HIO.field_0x38 == 1) { + last_frame = 54; + } else if (l_HIO.field_0x38 == 2) { + last_frame = 44; + } + if (frame >= last_frame) { + i_this->mMode = 3; + if (l_HIO.field_0x38 == 0) { + i_this->mTimer[0] = 20; + } else if (l_HIO.field_0x38 == 1) { + i_this->mTimer[0] = 15; + } else if (l_HIO.field_0x38 == 2) { + i_this->mTimer[0] = 10; + } + anm_init(i_this, ANM_KAMAE, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + } + break; + + case 3: + case 10: + if (i_this->mTimer[0] == 0) { + i_this->mAction = ACT_FIGHT_RUN; + i_this->mMode = 0; + } + break; + } + + cLib_addCalc0(&i_this->speedF, 1.0f, 3.0f); + + if (i_this->field_0xa7b != 0) { + fopAc_ac_c* hit_actor = at_hit_check(i_this); + if (hit_actor != NULL && fopAcM_GetName(hit_actor) == PROC_ALINK + && daPy_getPlayerActorClass()->checkPlayerGuard()) + { + i_this->mpMorf->setPlaySpeed(-1.0f); + dComIfGp_getVibration().StartShock(4, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); + dKy_Sound_set(i_this->current.pos, 100, fopAcM_GetID(i_this), 5); + i_this->mMode = 10; + i_this->mTimer[0] = 10; + } + } +} + +/* 8076E418-8076E81C 002738 0404+00 2/1 0/0 0/0 .text e_rdy_bow_run__FP11e_rdy_class */ +static void e_rdy_bow_run(e_rdy_class* i_this) { + f32 target_speed = 0.0f; + f32 run_speed = l_HIO.mRunSpeed; + s16 target_angle = fopAcM_searchPlayerAngleY(i_this); + s8 bVar2 = false; + + switch (i_this->mMode) { + case -20: + if ((int)i_this->mpMorf->getFrame() == 11) { + i_this->field_0x5bb = false; + } + if (i_this->mpMorf->isStop()) { + i_this->mMode = 0; + } + break; + + case -10: + anm_init(i_this, ANM_WAIT01, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mTimer[0] = cM_rndF(10.0f) + 15.0f; + i_this->mMode = -9; + break; + + case -9: + i_this->field_0xa98 = 1; + if (i_this->mTimer[0] == 0) { + i_this->mMode = 0; + } + break; + + case 0: + if (i_this->field_0x5bb) { + anm_init(i_this, ANM_ARMAMENT, 2.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + i_this->mMode = -20; + } else { + anm_init(i_this, ANM_RUN, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mTimer[0] = cM_rndF(50.0f) + 20.0f; + if (i_this->mPlayerDist < l_HIO.field_0x28 - 100.0f) { + i_this->mMode = 1; + } else if (i_this->mPlayerDist > l_HIO.field_0x28 + 100.0f) { + i_this->mMode = 2; + } else { + bVar2 = true; + } + } + break; + + case 1: + target_speed = run_speed; + target_angle += 0x8000; + if (i_this->mPlayerDist > l_HIO.field_0x28 || i_this->mTimer[0] == 0 + || i_this->mAcch.ChkWallHit()) + { + bVar2 = true; + } + i_this->mTimer[2] = 20; + break; + + case 2: + target_speed = run_speed; + if (i_this->mPlayerDist < l_HIO.field_0x28) { + bVar2 = true; + } + break; + } + + if (i_this->mMode >= 0) { + cLib_addCalcAngleS2(&i_this->current.angle.y, target_angle, 2, 0x1000); + s16 angle_diff = i_this->current.angle.y - target_angle; + if (angle_diff > 0x800 || angle_diff < -0x800) { + target_speed = 0.0f; + } + } + cLib_addCalc2(&i_this->speedF, target_speed, 1.0f, 5.0f); + + if (move_gake_check(i_this, 200.0f)) { + bVar2 = true; + } + + if (!i_this->field_0x5bb && bVar2) { + if (i_this->field_0x5b8 == 3) { + i_this->mAction = ACT_BOW2; + } else { + i_this->mAction = ACT_BOW; + } + i_this->mMode = 0; + i_this->mTimer[1] = cM_rndF(150.0f); + } else if (i_this->mTimer[2] == 0 && !pl_check(i_this, i_this->mPlayerCheckDist + 50.0f, 0x7fff)) { + i_this->mAction = ACT_NORMAL; + i_this->mMode = 0; + i_this->mTimer[0] = cM_rndF(50.0f) + 50.0f; + anm_init(i_this, ANM_KYORO2, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + } else if ((i_this->mCounter & 0xf) == 0 && bomb_view_check(i_this)) { + i_this->mAction = ACT_BOMB_ACTION; + i_this->mMode = 0; + } + + if (i_this->mAction != ACT_BOW_RUN) { + i_this->field_0xa98 = 0; + } +} + +/* 8076E81C-8076EB4C 002B3C 0330+00 1/1 0/0 0/0 .text e_rdy_bow__FP11e_rdy_class */ +static void e_rdy_bow(e_rdy_class* i_this) { + J3DAnmTransform* bck; + int frame = (int)i_this->mpMorf->getFrame(); + + switch (i_this->mMode) { + case 0: + anm_init(i_this, ANM_SHOOT_READY, 5.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + bck = (J3DAnmTransform*)dComIfG_getObjectRes(i_this->mpArcName, 8); + i_this->mpBowMorf->setAnm(bck, J3DFrameCtrl::LOOP_ONCE_e, 5.0f, 0.9f, 0.0f, -1.0f); + i_this->mMode = 1; + i_this->speedF = 0.0f; + break; + + case 1: + i_this->field_0xa98 = 4; + if (frame >= 10) { + i_this->mHasArrow = true; + } + if (frame == 20) { + i_this->mSound.startCreatureSound(Z2SE_OBJ_ARROW_DRAW_NORMAL, 0, -1); + } + if (i_this->mpMorf->isStop()) { + anm_init(i_this, ANM_SHOOT_WAIT, 4.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mTimer[0] = cM_rndF(10.0f) + 10.0f; + i_this->mMode = 2; + } + break; + + case 2: + i_this->field_0xa98 = 4; + if (i_this->mTimer[0] == 0) { + if (!i_this->field_0xa74 && !dMsgObject_isTalkNowCheck()) { + anm_init(i_this, ANM_SHOOT, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + bck = (J3DAnmTransform*)dComIfG_getObjectRes(i_this->mpArcName, 11); + i_this->mpBowMorf->setAnm(bck, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 1.0f, 0.0f, -1.0f); + i_this->mMode = 3; + } else { + i_this->mAction = ACT_BOW_RUN; + i_this->mMode = 0; + } + } + i_this->mHasArrow = true; + break; + + case 3: + if (frame <= 3) { + i_this->mHasArrow = true; + i_this->field_0xa98 = 4; + } + if (frame == 2) { + i_this->mArrowFired = true; + } + if (i_this->mpMorf->isStop()) { + if (i_this->mTimer[1] == 0 && (i_this->mPlayerDist < l_HIO.field_0x28 - 200.0f + || i_this->mPlayerDist > l_HIO.field_0x28)) { + if (!(i_this->mPlayerDist < l_HIO.field_0x28 - 200.0f + && way_bg_check(i_this, -100.0f))) { + i_this->mAction = ACT_BOW_RUN; + } + i_this->mMode = 0; + } else { + i_this->mMode = 0; + } + } + break; + } + + cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->mPlayerAngle, 4, 0x1000); +} + +/* 8076EB4C-8076EBB8 002E6C 006C+00 1/1 0/0 0/0 .text s_command3_sub__FPvPv */ +static void* s_command3_sub(void* i_proc, void* i_this) { + if (fopAc_IsActor(i_proc) && fopAcM_GetName(i_proc) == PROC_E_RDY) { + e_rdy_class* other = (e_rdy_class*)i_proc; + if (other != i_this && other->mAction == ACT_COMMANDER) { + return other; + } + } + return NULL; +} + +/* 8076EBB8-8076F0E0 002ED8 0528+00 1/1 0/0 0/0 .text e_rdy_bow2__FP11e_rdy_class */ +// NONMATCHING regalloc +static s8 e_rdy_bow2(e_rdy_class* i_this) { + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz vec1, vec2; + J3DAnmTransform* bck; + int frame = (int)i_this->mpMorf->getFrame(); + + s8 ret = false; + if (i_this->mMode <= 1) { + if (i_this->mPlayerDist < i_this->mPlayerCheckDist && !other_bg_check(i_this, player)) { + i_this->mMode = 2; + } + ret = true; + } + + if (i_this->mpPath != NULL) { + dStage_dPnt_c* point = i_this->mpPath->m_points; + i_this->mArrowTarget.x = point->m_position.x; + i_this->mArrowTarget.y = point->m_position.y; + i_this->mArrowTarget.z = point->m_position.z; + vec1 = i_this->mArrowTarget - i_this->current.pos; + i_this->mPlayerAngle = cM_atan2s(vec1.x, vec1.z); + } + + int sw_bit = fopAcM_GetParam(i_this) >> 0x18; + BOOL bVar2 = FALSE; + if (sw_bit != 0xff && dComIfGs_isSwitch(sw_bit, fopAcM_GetRoomNo(i_this))) { + bVar2 = TRUE; + } + + switch (i_this->mMode) { + case 0: + if (i_this->mTimer[0] == 0) { + anm_init(i_this, ANM_KYORO2, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mMode = 1; + i_this->mTimer[0] = cM_rndF(40.0f) + 60.0f; + } + break; + + case 1: + if (i_this->mTimer[0] == 0) { + anm_init(i_this, ANM_WAIT01, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mTimer[0] = cM_rndF(100.0f) + 100.0f; + i_this->mMode = 0; + } + break; + + case 2: + anm_init(i_this, ANM_SHOOT_READY, 5.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + bck = (J3DAnmTransform*)dComIfG_getObjectRes(i_this->mpArcName, 8); + i_this->mpBowMorf->setAnm(bck, J3DFrameCtrl::LOOP_ONCE_e, 5.0f, 0.9f, 0.0f, -1.0f); + i_this->mMode = 3; + i_this->speedF = 0.0f; + break; + + case 3: + i_this->field_0xa98 = 4; + if (frame >= 10) { + i_this->mHasArrow = true; + } + if (frame == 20) { + i_this->mSound.startCreatureSound(Z2SE_OBJ_ARROW_DRAW_NORMAL, 0, -1); + } + if (i_this->mpMorf->isStop()) { + anm_init(i_this, ANM_SHOOT_WAIT, 4.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mTimer[0] = cM_rndF(10.0f); + i_this->mMode = 4; + } + break; + + case 4: + i_this->field_0xa98 = 4; + if (i_this->mTimer[0] == 0) { + if (i_this->mpPath == NULL && sw_bit == 0xff + && (i_this->mPlayerDist > i_this->mPlayerCheckDist || other_bg_check(i_this, player))) + { + i_this->mMode = 0; + return ret; + } + if ((sw_bit == 0xff || (sw_bit != 0xff && bVar2)) && !dMsgObject_isTalkNowCheck() + && !i_this->field_0xa74) + { + anm_init(i_this, ANM_SHOOT, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + bck = (J3DAnmTransform*)dComIfG_getObjectRes(i_this->mpArcName, 11); + i_this->mpBowMorf->setAnm(bck, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 1.0f, 0.0f, -1.0f); + i_this->mMode = 5; + } + } + i_this->mHasArrow = true; + break; + + case 5: + if (frame <= 3) { + i_this->mHasArrow = true; + i_this->field_0xa98 = 4; + } + if (frame == 2) { + i_this->mArrowFired = true; + } + if (i_this->mpMorf->isStop()) { + if (i_this->mTimer[1] == 0 && i_this->mPlayerDist < l_HIO.field_0x28 - 200.0f) { + if (!way_bg_check(i_this, -100.0f) && !move_gake_check(i_this, -200.0f)) { + i_this->mAction = ACT_BOW_RUN; + i_this->field_0x1365 = false; + } + i_this->mMode = 0; + } else { + i_this->mMode = 0; + } + } + break; + } + + cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->mPlayerAngle, 4, 0x1000); + if (i_this->field_0xa98 != 0 && i_this->mpPath != NULL) { + i_this->field_0xa98 = 14; + } + return ret; +} + +/* 8076F0E0-8076F438 003400 0358+00 2/1 0/0 0/0 .text e_rdy_bow_ikki2__FP11e_rdy_class */ +static void e_rdy_bow_ikki2(e_rdy_class* i_this) { + fopAc_ac_c* player = dComIfGp_getPlayer(0); + J3DAnmTransform* bck; + int frame = (int)i_this->mpMorf->getFrame(); + + switch (i_this->mMode) { + case 0: + anm_init(i_this, ANM_WAIT01, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mMode = 1; + i_this->current.pos.x = -92938.0f; + i_this->current.pos.z = 49992.0f; + break; + + case 1: + if (player->current.pos.z > 35000.0f) { + i_this->mDemoMode = 20; + i_this->mDemoTimer = 0; + i_this->mMode = 2; + } + break; + + case 2: + i_this->mCamDist = 0.0f; + break; + + case 3: + cLib_addCalc2(&i_this->current.pos.x, -93658.0f, 1.0f, 50.0f); + cLib_addCalc2(&i_this->current.pos.z, 49894.0f, 1.0f, 50.0f); + break; + + case 4: + anm_init(i_this, ANM_SHOOT_READY, 5.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + bck = (J3DAnmTransform*)dComIfG_getObjectRes(i_this->mpArcName, 8); + i_this->mpBowMorf->setAnm(bck, J3DFrameCtrl::LOOP_ONCE_e, 5.0f, 0.9f, 0.0f, -1.0f); + i_this->mMode = 5; + break; + + case 5: + if (frame >= 10) { + i_this->mHasArrow = true; + } + if (frame == 20) { + i_this->mSound.startCreatureSound(Z2SE_OBJ_ARROW_DRAW_NORMAL, 0, -1); + } + if (i_this->mpMorf->isStop()) { + anm_init(i_this, ANM_SHOOT_WAIT, 4.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mMode = 6; + i_this->mTimer[0] = 40; + } + break; + + case 6: + if (i_this->mTimer[0] == 0 && !i_this->field_0xa74) { + anm_init(i_this, ANM_SHOOT, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + bck = (J3DAnmTransform*)dComIfG_getObjectRes(i_this->mpArcName, 11); + i_this->mpBowMorf->setAnm(bck, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 1.0f, 0.0f, -1.0f); + i_this->mMode = 7; + } + i_this->mHasArrow = true; + break; + + case 7: + if (frame <= 3) { + i_this->mHasArrow = true; + } + if (frame == 2) { + i_this->mArrowFired = true; + } + if (i_this->mpMorf->isStop()) { + i_this->mMode = 2; + anm_init(i_this, ANM_WAIT01, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + } + break; + } + + if (i_this->mMode >= 6) { + i_this->field_0xa98 = 14; + i_this->mArrowTarget.set(-93666.0f, player->current.pos.y + i_this->mCamDist, + player->current.pos.z); + f32 fVar2; + if (i_this->mDemoMode > 25) { + fVar2 = -1000.0f; + } else { + fVar2 = 5400.0f; + } + cLib_addCalc2(&i_this->mCamDist, fVar2, 0.1f, 200.0f); + } +} + +/* 8076F438-8076F59C 003758 0164+00 1/1 0/0 0/0 .text e_rdy_avoid__FP11e_rdy_class */ +static void e_rdy_avoid(e_rdy_class* i_this) { + int frame = (int)i_this->mpMorf->getFrame(); + + switch (i_this->mMode) { + case 0: + anm_init(i_this, ANM_AVOID, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + i_this->mMode = 1; + i_this->speedF = -30.0f; + i_this->speed.y = 20.0f; + i_this->mSound.startCreatureVoice(Z2SE_EN_RD_V_DODGE, -1); + break; + + case 1: + if (frame == 6) { + i_this->mpMorf->setPlaySpeed(0.0f); + i_this->mMode = 2; + } + break; + + case 2: + if (i_this->mAcch.ChkGroundHit()) { + i_this->mpMorf->setPlaySpeed(1.0f); + i_this->mMode = 3; + } + break; + + case 3: + cLib_addCalc0(&i_this->speedF, 1.0f, 10.0f); + if (i_this->mpMorf->isStop()) { + i_this->mAction = ACT_FIGHT_RUN; + i_this->mMode = 0; + i_this->mTimer[0] = 30; + } + break; + } +} + +/* 8076F59C-8076F71C 0038BC 0180+00 1/1 0/0 0/0 .text s_kusa_sub__FPvPv */ +static void* s_kusa_sub(void* i_proc, void* i_this) { + if (fopAc_IsActor(i_proc) && fopAcM_GetName(i_proc) == PROC_Obj_Yobikusa) { + fopAc_ac_c* grass = (fopAc_ac_c*)i_proc; + fopAc_ac_c* _this = (fopAc_ac_c*)i_this; + cXyz delta = grass->current.pos - _this->current.pos; + if (delta.abs() < 1000.0f) { + return i_proc; + } + } + return NULL; +} + +/* 8076F71C-807701F4 003A3C 0AD8+00 2/1 0/0 0/0 .text e_rdy_tkusa__FP11e_rdy_class */ +// NONMATCHING regswap +static void e_rdy_tkusa(e_rdy_class* i_this) { + cXyz vec; + i_this->mIFrameTimer = 20; + + if (i_this->mKargarokID == fpcM_ERROR_PROCESS_ID_e) { + i_this->mKargarokID = fopAcM_GetID(fopAcM_SearchByName(PROC_E_YC)); + } + e_yc_class* kargarok = (e_yc_class*)fopAcM_SearchByID(i_this->mKargarokID); + if (kargarok != NULL) { + kargarok->mRiderID = fopAcM_GetID(i_this); + } + + int frame = (int)i_this->mpMorf->getFrame(); + f32 target_speed = 0.0f; + + fopAc_ac_c* grass = (fopAc_ac_c*)fpcM_Search(s_kusa_sub, i_this); + if (grass == NULL) { + return; + } + + if (i_this->mMode <= 1 && i_this->mPlayerDist < 1300.0f) { + i_this->mDemoMode = 10; + i_this->mDemoTimer = 0; + i_this->mMode = 2; + anm_init(i_this, ANM_WAIT01, 7.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + } + + switch (i_this->mMode) { + case 0: + if (i_this->mTimer[0] == 0) { + anm_init(i_this, ANM_WALK, 7.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mTimer[0] = cM_rndF(60.0f) + 60.0f; + i_this->mMode = 1; + vec.x = i_this->home.pos.x + cM_rndFX(200.0f) - i_this->current.pos.x; + vec.z = i_this->home.pos.z + cM_rndFX(200.0f) - i_this->current.pos.z; + i_this->mTargetAngleY = cM_atan2s(vec.x, vec.z); + } + break; + + case 1: + target_speed = l_HIO.mWalkSpeed; + if (i_this->mTimer[0] == 0) { + anm_init(i_this, ANM_KYORO2, 7.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mMode = 0; + i_this->mTimer[0] = cM_rndF(30.0f) + 60.0f; + } + break; + + case 2: + if (i_this->mDemoMode == 11) { + if (i_this->mDemoTimer > 70) { + vec = grass->current.pos - i_this->current.pos; + i_this->mTargetAngleY = cM_atan2s(vec.x, vec.z) + -1000; + } else if (i_this->mDemoTimer > 30) { + i_this->mTargetAngleY = i_this->mPlayerAngle; + if (i_this->mDemoTimer == 31) { + i_this->mSound.startCreatureVoice(Z2SE_EN_RD_V_NOTICE, -1); + } + } + } else if (i_this->mDemoTimer == 110) { + anm_init(i_this, ANM_RUN, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mMode = 3; + i_this->mDemoMode++; + i_this->mDemoTimer = 0; + } + break; + + case 3: + target_speed = l_HIO.mRunSpeed; + vec = grass->current.pos - i_this->current.pos; + i_this->mTargetAngleY = cM_atan2s(vec.x, vec.z); + if (vec.abs() < 160.0f) { + anm_init(i_this, ANM_WAIT01, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mTimer[0] = 20; + i_this->mMode = 4; + } + break; + + case 4: + if (i_this->mTimer[0] == 0) { + anm_init(i_this, ANM_PICKUP, 5.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + i_this->mMode = 5; + } + break; + + case 5: + if (frame == 15) { + fopAcM_setCarryNow(grass, FALSE); + i_this->mIsHoldingGrass = true; + i_this->mSound.startCreatureSound(Z2SE_AL_PICKUP_GRASS, 0, -1); + i_this->mSound.startCreatureVoice(Z2SE_EN_RD_V_CALLING, -1); + } + if (frame == 30) { + i_this->mDemoMode++; + } + if (i_this->mpMorf->isStop()) { + anm_init(i_this, ANM_BLOW, 0.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mMode = 6; + i_this->mTimer[0] = 220; + } + break; + + case 6: + if (i_this->mTimer[0] == 215) { + mDoAud_seStart(Z2SE_PLAY_REED_TOBIKUSA, NULL, 0, 0); + i_this->mTimer[2] = 100; + } + if (i_this->mTimer[0] == 140) { + i_this->mDemoMode++; + i_this->mDemoTimer = 0; + } + if (i_this->mTimer[0] == 100) { + mDoAud_seStart(Z2SE_PLAY_REED_TOBIKUSA, NULL, 0, 0); + i_this->mTimer[2] = 100; + } + if (i_this->mTimer[0] == 50) { + i_this->mMode = 7; + i_this->mTimer[0] = 3; + kargarok->mMode = 2; + kargarok->current = kargarok->home; + kargarok->shape_angle = kargarok->current.angle; + kargarok->mNoDrawFlag = true; + kargarok->mAngleSpeedRatio = 0.0f; + } + break; + + case 7: + if (i_this->mTimer[0] == 1) { + i_this->mDemoMode = 16; + i_this->mDemoTimer = 0; + anm_init(i_this, ANM_WAIT01, 7.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + Z2GetAudioMgr()->setBattleBgmOff(false); + } + if (i_this->mDemoTimer == 309) { + anm_init(i_this, ANM_LOOKBACK, 10.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + i_this->mIsHoldingGrass = false; + kargarok->mMode = 4; + kargarok->speedF = 30.0f; + mDoMtx_YrotS(*calc_mtx, i_this->shape_angle.y); + vec.x = 1100.0f; + vec.y = 1050.0f; + vec.z = -1100.0f; + MtxPosition(&vec, &kargarok->current.pos); + kargarok->current.pos += i_this->current.pos; + vec = i_this->current.pos - kargarok->current.pos; + kargarok->current.angle.y = cM_atan2s(vec.x, vec.z); + kargarok->shape_angle.y = kargarok->current.angle.y; + kargarok->shape_angle.z = 0x2000; + kargarok->current.angle.z = 0x2000; + i_this->mDemoMode = 17; + i_this->mDemoTimer = 0; + i_this->mMode = 8; + } + break; + + case 8: + if (i_this->mDemoTimer == 95) { + anm_init(i_this, ANM_RUN, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + vec = kargarok->current.pos - i_this->current.pos; + i_this->mTargetAngleY = cM_atan2s(vec.x, vec.z); + i_this->mDemoMode = 18; + i_this->mDemoTimer = 0; + i_this->mMode = 9; + kargarok->mMode = 5; + } + break; + + case 9: + if (i_this->mDemoTimer == 10) { + anm_init(i_this, ANM_JUMP_A, 2.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + i_this->mSound.startCreatureVoice(Z2SE_EN_RD_V_JUMP_RIDING, -1); + i_this->mMode = 10; + i_this->home = i_this->current; + } + break; + + case 10: + if (i_this->mpMorf->isStop()) { + i_this->mMode = 11; + anm_init(i_this, ANM_JUMP_B, 10.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + i_this->mRideState = 1; + i_this->mJumpSpeed = 50.0f; + i_this->mTimer[3] = 30; + } + break; + + case 11: + if (i_this->mJumpHeight <= 0.0f) { + anm_init(i_this, ANM_RJUMP_C, 2.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + i_this->mMode = 12; + kargarok->field_0x698 = -27.0f; + } + break; + + case 12: + if (i_this->mpMorf->isStop()) { + anm_init(i_this, ANM_RHOVERING, 15.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mpMorf->setFrame(kargarok->mpMorf->getFrame()); + i_this->mMode = 13; + kargarok->mMode = 6; + i_this->mDemoMode = 19; + i_this->mDemoTimer = 0; + } + break; + + case 13: + break; + } + + cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->mTargetAngleY, 2, 0x1000); + s16 angle_diff = i_this->current.angle.y - i_this->mTargetAngleY; + if (angle_diff > 0x400 || angle_diff < -0x400) { + target_speed = 0.0f; + } + cLib_addCalc2(&i_this->speedF, target_speed, 1.0f, 5.0f); +} + +/* 807701F4-8077089C 004514 06A8+00 1/1 0/0 0/0 .text e_rdy_yc_ride__FP11e_rdy_class */ +static void e_rdy_yc_ride(e_rdy_class* i_this) { + int frame = (int)i_this->mpMorf->getFrame(); + e_yc_class* kargarok = (e_yc_class*)fopAcM_SearchByID(i_this->mKargarokID); + i_this->mIFrameTimer = 20; + + if (kargarok == NULL) { + kargarok = (e_yc_class*)fopAcM_SearchByName(PROC_E_YC); + i_this->mKargarokID = fopAcM_GetID(kargarok); + return; + } + + if (i_this->field_0xa6e != 0) { + return; + } + + int kargarok_frame = (int)kargarok->mpMorf->getFrame(); + if (i_this->mAnm != ANM_RHANGED && i_this->mAnm != ANM_RHANGED_BRASH + && i_this->mAnm != ANM_RHANGED_BRASH2 && i_this->mAnm != ANM_RHANGED_DAMAGE) + { + i_this->field_0xa98 = 4; + } else { + i_this->mSound.startCreatureVoiceLevel(Z2SE_EN_RD_V_SNIPED_DAMAGE, -1); + } + + switch (i_this->mMode) { + case 0: + if (kargarok->mAnm == e_yc_class::ANM_HOVERING && i_this->mAnm != ANM_RHOVERING) { + anm_init(i_this, ANM_RHOVERING, 15.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mpMorf->setFrame(kargarok->mpMorf->getFrame()); + } else if (kargarok->mAnm == e_yc_class::ANM_FLY && i_this->mAnm != ANM_RFLY) { + anm_init(i_this, ANM_RFLY, 15.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mpMorf->setFrame(kargarok->mpMorf->getFrame()); + } else if (kargarok->mAnm == e_yc_class::ANM_FLY_GLIDE && i_this->mAnm != ANM_RFLY_GLIDE) { + anm_init(i_this, ANM_RFLY_GLIDE, 15.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mpMorf->setFrame(kargarok->mpMorf->getFrame()); + } else if (kargarok->mAnm == e_yc_class::ANM_HANGED && kargarok_frame == 1) { + anm_init(i_this, ANM_RHANGED, 3.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + } else if (kargarok->mAnm == e_yc_class::ANM_HANGED_WAIT + && i_this->mAnm != ANM_RHANGED_WAIT) { + anm_init(i_this, ANM_RHANGED_WAIT, 3.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mpMorf->setFrame(kargarok->mpMorf->getFrame()); + } else if (kargarok->mAnm == e_yc_class::ANM_HANGED_DAMAGE && kargarok_frame == 1) { + anm_init(i_this, ANM_RHANGED_DAMAGE, 3.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + } else if (kargarok->mAnm == e_yc_class::ANM_HANGED_BRUSH && kargarok_frame == 1) { + anm_init(i_this, ANM_RHANGED_BRASH, 3.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + } else if (kargarok->mAnm == e_yc_class::ANM_HANGED_BRUSH2 && kargarok_frame == 1) { + anm_init(i_this, ANM_RHANGED_BRASH2, 3.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + } + if (i_this->mAnm == ANM_RHOVERING) { + i_this->mMode = 1; + i_this->mTimer[0] = cM_rndF(30.0f) + 30.0f; + } + break; + + case 1: + if (i_this->mTimer[0] == 0) { + anm_init(i_this, ANM_RSHOOT_READY, 5.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + J3DAnmTransform* bck = (J3DAnmTransform*)dComIfG_getObjectRes(i_this->mpArcName, 9); + i_this->mpBowMorf->setAnm(bck, J3DFrameCtrl::LOOP_ONCE_e, 5.0f, 1.0f, 0.0f, -1.0f); + i_this->mMode = 2; + } + break; + + case 2: + if (frame == 14) { + i_this->mSound.startCreatureSound(Z2SE_OBJ_ARROW_DRAW_NORMAL, 0, -1); + } + if (i_this->mpMorf->isStop()) { + i_this->mMode = 3; + anm_init(i_this, ANM_RSHOOT_WAIT, 4.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + } + i_this->mHasArrow = true; + break; + + case 3: + if (i_this->mTimer[1] == 0 && !dComIfGp_event_runCheck()) { + anm_init(i_this, ANM_RSHOOT, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + J3DAnmTransform* bck = (J3DAnmTransform*)dComIfG_getObjectRes(i_this->mpArcName, 11); + i_this->mpBowMorf->setAnm(bck, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 1.0f, 0.0f, -1.0f); + i_this->mMode = 4; + } + i_this->mHasArrow = true; + break; + + case 4: + if (frame <= 3) { + i_this->mHasArrow = true; + } + if (frame == 2) { + i_this->mArrowFired = true; + } + if (i_this->mpMorf->isStop()) { + if (kargarok->mAnm == e_yc_class::ANM_HOVERING) { + anm_init(i_this, ANM_RSHOOT_READY, 5.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + J3DAnmTransform* bck = (J3DAnmTransform*)dComIfG_getObjectRes(i_this->mpArcName, 9); + i_this->mpBowMorf->setAnm(bck, J3DFrameCtrl::LOOP_ONCE_e, 5.0f, 1.0f, 0.0f, -1.0f); + i_this->mMode = 2; + i_this->mTimer[1] = cM_rndF(30.0f) + 20.0f; + } else { + i_this->mMode = 0; + } + } + break; + } + + i_this->mRideState = 2; + i_this->field_0xa8e = 1; + kargarok->field_0x6b0 = 1; + if (i_this->mAnm == ANM_RFLY || i_this->mAnm == ANM_RFLY_GLIDE) { + i_this->mSound.startCreatureVoiceLevel(Z2SE_EN_RD_V_RIDING_YELL, -1); + } +} + +/* 8077089C-80770CF8 004BBC 045C+00 2/1 0/0 0/0 .text e_rdy_bomb_action__FP11e_rdy_class + */ +static void e_rdy_bomb_action(e_rdy_class* i_this) { + cXyz vec1, vec2; + dBomb_c* bomb = bomb_check(i_this); + if (bomb == NULL) { + i_this->mAction = ACT_FIGHT_RUN; + i_this->mMode = 0; + return; + } + + vec1.x = bomb->current.pos.x - i_this->current.pos.x; + vec1.z = bomb->current.pos.z - i_this->current.pos.z; + s16 target_angle = cM_atan2s(vec1.x, vec1.z); + f32 target_speed = 0.0f; + + switch (i_this->mMode) { + case 0: + i_this->mMode = 1; + anm_init(i_this, ANM_WAIT01, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mTimer[1] = cM_rndF(10.0f) + 10.0f; + // fallthrough + + case 1: + if (i_this->mTimer[1] == 0 && bomb->speedF < 0.1f) { + i_this->mMode = 2; + anm_init(i_this, ANM_RUN, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, cM_rndFX(0.05f) + 1.0f); + } + break; + + case 2: + if (bomb->speedF < 0.1f && !bomb->checkStateCarry() + && JMAFastSqrt(vec1.x * vec1.x + vec1.z * vec1.z) < 250.0f) + { + s16 angle = i_this->mPlayerAngle - i_this->shape_angle.y; + if (angle < 0x4000 && angle > -0x4000) { + i_this->mMode = 5; + break; + } + } + target_angle += 0x8000; + target_speed = l_HIO.mRunSpeed; + if (JMAFastSqrt(vec1.x * vec1.x + vec1.z * vec1.z) > 600.0f) { + i_this->mMode = 3; + anm_init(i_this, ANM_WAIT01, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + } + break; + + case 3: + target_angle = i_this->mPlayerAngle; + if (JMAFastSqrt(vec1.x * vec1.x + vec1.z * vec1.z) < 500.0f) { + i_this->mMode = 0; + } + break; + + case 5: + target_speed = l_HIO.mRunSpeed; + i_this->mCollisionEnabled = false; + if (bomb->speedF > 0.1f) { + i_this->mMode = 0; + } else if (JMAFastSqrt(vec1.x * vec1.x + vec1.z * vec1.z) < 100.0f) { + i_this->mTimer[0] = 20; + i_this->mMode = 6; + anm_init(i_this, ANM_KICK, 3.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + } + break; + + case 6: + i_this->mCollisionEnabled = false; + target_angle = i_this->mPlayerAngle; + if ((int)i_this->mpMorf->getFrame() <= 10) { + mDoMtx_YrotS(*calc_mtx, target_angle); + vec1.x = -30.0f; + vec1.y = 0.0f; + vec1.z = 60.0f; + MtxPosition(&vec1, &vec2); + vec2 += i_this->current.pos; + cLib_addCalc2(&bomb->current.pos.x, vec2.x, 1.0f, 15.0f); + cLib_addCalc2(&bomb->current.pos.z, vec2.z, 1.0f, 15.0f); + if ((int)i_this->mpMorf->getFrame() == 10) { + bomb->speedF = 30.0f; + bomb->speed.y = 30.0f; + bomb->current.angle.y = i_this->shape_angle.y; + } + } + if (i_this->mpMorf->isStop()) { + anm_init(i_this, ANM_WAIT01, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mMode = 3; + } + break; + } + + cLib_addCalc2(&i_this->speedF, target_speed, 1.0f, 5.0f); + cLib_addCalcAngleS2(&i_this->current.angle.y, target_angle, 4, 0x1000); + i_this->field_0xa98 = 11; + i_this->mArrowTarget = bomb->current.pos; +} + +/* 80770CF8-80770E48 005018 0150+00 1/1 0/0 0/0 .text e_rdy_s_damage__FP11e_rdy_class */ +static void e_rdy_s_damage(e_rdy_class* i_this) { + switch (i_this->mMode) { + case 0: + i_this->mMode = 1; + i_this->mTimer[0] = 10; + if (i_this->field_0xa8e != 0) { + e_yc_class* kargarok = (e_yc_class*)fopAcM_SearchByID(i_this->mKargarokID); + if (kargarok != NULL) { + kargarok->field_0x6b0 &= ~i_this->field_0xa8e; + } + i_this->field_0xa8e = 0; + i_this->mKargarokID = fpcM_ERROR_PROCESS_ID_e; + } + break; + + case 1: + if (i_this->mTimer[1] != 0) { + i_this->onHeadLockFlg(); + } + if (i_this->mpMorf->isStop()) { + if (i_this->mPrevAction == ACT_BOW2) { + i_this->mAction = ACT_BOW2; + } else if (i_this->mPrevAction == ACT_BOW3) { + i_this->mAction = ACT_BOW3; + } else { + i_this->mAction = ACT_FIGHT_RUN; + i_this->mTimer[0] = 40; + } + i_this->mMode = 0; + } + } + + cLib_addCalc0(&i_this->speedF, 1.0f, 3.0f); +} + +/* 80770E48-80770FFC 005168 01B4+00 1/1 0/0 0/0 .text kado_check__FP11e_rdy_class */ +static int kado_check(e_rdy_class* i_this) { + fopAc_ac_c* _this = (fopAc_ac_c*)i_this; + dBgS_LinChk lin_chk; + cXyz vec1, vec2, vec3; + int ret = 0; + mDoMtx_YrotS(*calc_mtx, i_this->field_0xadc.y); + + static int kado_bit[2] = {1, 2}; + static f32 kado_check_x[2] = {80.0f, -80.0f}; + + for (int i = 0; i < 2; i++) { + vec2 = _this->current.pos; + vec2.y += 100.0f; + vec1.x = 0.0f; + vec1.y = 0.0f; + vec1.z = 70.0f; + MtxPosition(&vec1, &vec3); + vec2 += vec3; + + vec1.y = 50.0f; + vec1.z = -150.0f; + vec1.x = kado_check_x[i]; + MtxPosition(&vec1, &vec3); + vec3 += vec2; + + lin_chk.Set(&vec2, &vec3, _this); + if (dComIfG_Bgsp().LineCross(&lin_chk)) { + ret |= kado_bit[i]; + } + } + + if (ret == 3) { + ret = 0; + } + return ret; +} + +/* 80770FFC-807710DC 00531C 00E0+00 3/3 0/0 0/0 .text rd_disappear__FP11e_rdy_class */ +static void rd_disappear(e_rdy_class* i_this) { + cXyz vec1, vec2; + MTXCopy(i_this->mpMorf->getModel()->getAnmMtx(JNT_MUNE2), *calc_mtx); + vec1.set(0.0f, 0.0f, 0.0f); + MtxPosition(&vec1, &vec2); + fopAcM_createDisappear(i_this, &vec2, 10, 1, 12); + + if (i_this->field_0x5b8 == 12) { + i_this->mKargarokDeleteTimer = 50; + Z2GetAudioMgr()->setBattleBgmOff(true); + } else { + fopAcM_delete(i_this); + } + + int sw_bit = fopAcM_GetParam(i_this) >> 0x18; + if (sw_bit != 0xff) { + dComIfGs_onSwitch(sw_bit, fopAcM_GetRoomNo(i_this)); + } +} + +/* 807710DC-80771230 0053FC 0154+00 1/1 0/0 0/0 .text body_gake__FP11e_rdy_class */ +static BOOL body_gake(e_rdy_class* i_this) { + cXyz vec1, vec2; + MTXCopy(i_this->mpMorf->getModel()->getAnmMtx(JNT_MUNE2), *calc_mtx); + vec1.set(40.0f, 0.0f, 0.0f); + MtxPosition(&vec1, &vec2); + dBgS_ObjGndChk gnd_chk; + vec2.y += 100.0f; + gnd_chk.SetPos(&vec2); + vec2.y = dComIfG_Bgsp().GroundCross(&gnd_chk); + if (i_this->current.pos.y - vec2.y > 300.0f) { + return TRUE; + } else { + return FALSE; + } +} + +/* 807712A8-80771DA4 0055C8 0AFC+00 2/1 0/0 0/0 .text e_rdy_damage__FP11e_rdy_class */ +static void e_rdy_damage(e_rdy_class* i_this) { + cXyz vec1, vec2; + + if (i_this->health <= 0) { + fopAcM_OffStatus(i_this, 0); + i_this->attention_info.flags = 0; + } + + i_this->mTargetEyeScale = 0.0f; + + if (!daPy_py_c::i_checkNowWolf() && i_this->checkCutDownHitFlg()) { + i_this->offCutDownHitFlg(); + i_this->mMode = 3; + i_this->mTimer[0] = 100; + i_this->mTimer[1] = 45; + i_this->health = 0; + i_this->mSound.startCreatureVoice(Z2SE_EN_RD_V_DEATH, -1); + i_this->mIsDying = true; + daPy_getPlayerActorClass()->onEnemyDead(); + i_this->field_0xbac = 15; + i_this->offDownFlg(); + } + + switch (i_this->mMode) { + case 0: + anm_init(i_this, ANM_DIEB, 3.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + i_this->mMode = 1; + i_this->speedF = 0.0f; + ride_off(i_this); + i_this->field_0xb88 = 8000.0f; + if (i_this->health <= 0) { + i_this->mSound.startCreatureVoice(Z2SE_EN_RD_V_DEATH, -1); + i_this->mIsDying = true; + daPy_getPlayerActorClass()->onEnemyDead(); + } else { + i_this->mSound.startCreatureVoice(Z2SE_EN_RD_V_DAMAGE, -1); + } + i_this->mTimer[0] = 0; + break; + + case 1: + if (i_this->mAcch.ChkWallHit() && i_this->mTimer[0] == 0) { + int check = kado_check(i_this); + if (check != 0) { + if (check == 2) { + i_this->field_0xac6 = 0x1000; + i_this->field_0xadc.y += -7000; + } else { + i_this->field_0xac6 = -0x1000; + i_this->field_0xadc.y += 7000; + } + i_this->field_0xb88 = 8000.0f; + i_this->field_0xaf4 = 100.0f; + i_this->field_0xafc = 100.0f; + i_this->mTimer[0] = 60; + } else { + i_this->mMode = 10; + i_this->speed.y = 0.0f; + i_this->field_0xabc *= 0.2f; + i_this->field_0xadc.y += 0x8000; + i_this->field_0xbc0 = 5; + i_this->field_0xaf4 = 100.0f; + i_this->field_0xafc = 100.0f; + i_this->field_0xac6 = 0; + } + } else { + cLib_addCalcAngleS2(&i_this->field_0xadc.x, -0x4000, 1, 0x300); + i_this->current.angle.y += i_this->field_0xac6; + i_this->shape_angle.y = i_this->current.angle.y; + if (i_this->field_0xadc.x <= -0x3000 && i_this->mAcch.ChkGroundHit()) { + i_this->field_0xaee = 10; + if (i_this->mInWater) { + i_this->mSound.startCreatureSound(Z2SE_CM_BODYFALL_ASASE_M, 0, -1); + } else { + i_this->mSound.startCreatureSound(Z2SE_CM_BODYFALL_M, 0, -1); + } + i_this->mMode = 2; + s16 angle_y; + if (!i_this->mIsUpsideDown) { + anm_init(i_this, ANM_DIEA, 3.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + angle_y = i_this->field_0xadc.y; + } else { + angle_y = i_this->field_0xadc.y + 0x8000; + } + i_this->current.angle.y = angle_y; + if (i_this->field_0xac8) { + i_this->field_0xabc = 0.0f; + i_this->field_0xb88 = 2000.0f; + } else { + if (!i_this->mIsUpsideDown) { + i_this->field_0xaf4 = -100.0f; + i_this->field_0xafc = -100.0f; + } else { + i_this->field_0xaf4 = 100.0f; + i_this->field_0xafc = 100.0f; + } + i_this->field_0xaf8 = -0x5000; + i_this->field_0xb00 = -0x4000; + i_this->field_0xabc *= 0.5f; + i_this->speed.y = 20.0f; + i_this->field_0xac6 /= 2; + i_this->field_0xb88 = 8000.0f; + i_this->mGroundHit = true; + } + } + } + break; + + case 2: + i_this->current.angle.y += i_this->field_0xac6; + i_this->shape_angle.y = i_this->current.angle.y; + cLib_addCalcAngleS2(&i_this->field_0xadc.x, -0x4000, 1, 0x300); + if (i_this->mAcch.ChkGroundHit()) { + if (i_this->health > 0 && !daPy_py_c::i_checkNowWolf()) { + i_this->onDownFlg(); + } + dKy_Sound_set(i_this->current.pos, 100, fopAcM_GetID(i_this), 5); + i_this->field_0xaee = 10; + if (!i_this->mIsUpsideDown) { + anm_init(i_this, ANM_DIEA, 3.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + } else { + anm_init(i_this, ANM_DIEB, 3.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + } + i_this->field_0xabc = 0.0f; + i_this->field_0xadc.x = -0x4000; + s16 angle_y; + if (!i_this->mIsUpsideDown) { + angle_y = i_this->field_0xadc.y; + for (int i = 0; i < 4; i++) { + i_this->field_0xba2[i] = cM_rndF(10.0f); + } + } else { + angle_y = i_this->field_0xadc.y + 0x8000; + } + i_this->current.angle.y = angle_y; + if (daPy_py_c::i_checkNowWolf()) { + i_this->mTimer[0] = 80; + i_this->mTimer[1] = 55; + } else { + i_this->mTimer[0] = cM_rndF(10.0f) + 60.0f; + i_this->mTimer[1] = 35; + } + i_this->mMode = 3; + i_this->field_0xb88 = 1500.0f; + i_this->mGroundHit = true; + } + break; + + case 3: + if (body_gake(i_this)) { + i_this->field_0xabc = -20.0f; + i_this->field_0xadc.x += -0x300; + } + if (i_this->health <= 0 && i_this->mTimer[1] == 0) { + rd_disappear(i_this); + return; + } + if (daPy_getPlayerActorClass()->getCutType() != daPy_py_c::CUT_TYPE_DOWN + && i_this->mTimer[0] == 0) + { + i_this->field_0xabc = 0.0f; + i_this->field_0xadc.x = -0x4000; + i_this->offDownFlg(); + i_this->mMode = 20; + if (!i_this->mIsUpsideDown) { + anm_init(i_this, ANM_DIEA_UP, 3.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + } else { + anm_init(i_this, ANM_DIEB_UP, 3.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + } + if (i_this->field_0x5b8 == 12) { + i_this->mSound.startCreatureVoice(Z2SE_EN_RD_V_CALLING, -1); + } + } + break; + + case 10: + if (i_this->field_0xbc0 != 0) { + cLib_addCalcAngleS2(&i_this->field_0xadc.x, 0, 1, 0x300); + } else { + cLib_addCalcAngleS2(&i_this->field_0xadc.x, -0x4000, 1, 0x800); + if (i_this->mAcch.ChkGroundHit()) { + i_this->mMode = 2; + if (!i_this->mIsUpsideDown) { + anm_init(i_this, ANM_DIEA, 3.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + i_this->field_0xaf4 = -100.0f; + i_this->field_0xafc = -100.0f; + } else { + i_this->field_0xaf4 = 100.0f; + i_this->field_0xafc = 100.0f; + } + i_this->field_0xaf8 = -0x5000; + i_this->field_0xb00 = -0x4000; + i_this->field_0xabc *= 0.5f; + i_this->speed.y = 20.0f; + s16 angle_y; + if (!i_this->mIsUpsideDown) { + angle_y = i_this->field_0xadc.y; + } else { + angle_y = i_this->field_0xadc.y + 0x8000; + } + i_this->current.angle.y = angle_y; + i_this->field_0xb88 = 8000.0f; + } + } + break; + + case 20: + if (i_this->mpMorf->getFrame() >= 35.0f) { + i_this->field_0xae8.z = 0; + i_this->field_0xae8.x = 0; + } + if (i_this->mpMorf->isStop()) { + i_this->field_0xadc.y = 0; + i_this->field_0xadc.x = 0; + anm_init(i_this, ANM_WAIT01, 0.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mTimer[0] = 5; + i_this->mMode = 21; + i_this->offDownFlg(); + } + break; + + case 21: + if (i_this->mTimer[0] == 0) { + i_this->mTimer[0] = cM_rndF(20.0f) + 20.0f; + anm_init(i_this, ANM_KYORO2, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mMode = 22; + } + break; + + case 22: + i_this->mIFrameTimer = 0; + if (i_this->mTimer[0] == 0) { + i_this->mAction = ACT_NORMAL; + i_this->mMode = 0; + i_this->mTimer[0] = cM_rndF(50.0f) + 50.0f; + anm_init(i_this, ANM_KYORO2, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + } + break; + + case 30: + if (!i_this->checkWolfDownPullFlg()) { + i_this->mTimer[1] = 0; + } + if (i_this->mTimer[0] == 0) { + i_this->mMode = 31; + if (!i_this->mIsUpsideDown) { + anm_init(i_this, ANM_DIEA_UP, 3.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + } else { + anm_init(i_this, ANM_DIEB_UP, 3.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + } + i_this->mTimer[0] = 10; + } else if (i_this->mTimer[1] == 1) { + i_this->onWolfDownPullEndFlg(); + i_this->offCutDownHitFlg(); + i_this->health = 0; + i_this->mTimer[0] = 1000; + i_this->mTimer[1] = 35; + i_this->mMode = 3; + } + break; + + case 31: + if (i_this->mTimer[0] == 0) { + i_this->offDownFlg(); + i_this->mMode = 20; + i_this->field_0xbca = 0; + } + break; + } + + if (i_this->checkDownFlg()) { + MTXCopy(i_this->mpMorf->getModel()->getAnmMtx(JNT_MUNE2), *calc_mtx); + vec1.set(0.0f, 0.0f, 0.0f); + MtxPosition(&vec1, &vec2); + i_this->setDownPos(&vec2); + i_this->mCollisionEnabled = false; + } + + if (i_this->field_0xbac != 0) { + i_this->field_0xbac--; + i_this->field_0xbaa = i_this->field_0xbac * cM_ssin(i_this->field_0xbac * 0x3800) * 100.0f; + } +} + +/* 80771DA4-80771F50 0060C4 01AC+00 1/1 0/0 0/0 .text gake_check__FP11e_rdy_classf */ +static s16 gake_check(e_rdy_class* i_this, f32 i_dist) { + fopAc_ac_c* _this = (fopAc_ac_c*)i_this; + dBgS_GndChk gnd_chk; + dBgS_LinChk lin_chk; + cXyz vec1, vec2; + s16 angle_y = _this->shape_angle.y; + for (int i = 0; i < 0x10; i++, angle_y += 0x1000) { + mDoMtx_YrotS(*calc_mtx, angle_y); + vec1.x = 0.0f; + vec1.y = 100.0f; + vec1.z = i_dist; + MtxPosition(&vec1, &vec2); + vec2 += _this->current.pos; + gnd_chk.SetPos(&vec2); + if (_this->current.pos.y - dComIfG_Bgsp().GroundCross(&gnd_chk) > 300.0f) { + vec1 = _this->current.pos; + vec1.y += 100.0f; + lin_chk.Set(&vec1, &vec2, _this); + if (!dComIfG_Bgsp().LineCross(&lin_chk)) { + return angle_y; + } + } + } + return _this->shape_angle.y; +} + +/* 80771F50-80772128 006270 01D8+00 1/1 0/0 0/0 .text s_bikkuri_sub__FPvPv */ +// NONMATCHING regswap +static void* s_bikkuri_sub(void* i_proc, void* i_this) { + e_rdy_class* _this = (e_rdy_class*)i_this; + if (fopAc_IsActor(i_proc) && fopAcM_GetName(i_proc) == PROC_E_RDY) { + e_rdy_class* other = (e_rdy_class*)i_proc; + if (other != _this && other->mAction == ACT_BOW3 && other->mMode <= 2) { + cXyz delta = other->current.pos - _this->current.pos; + if (delta.abs() < 350.0f) { + anm_init(other, ANM_KYORO2, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.3f); + other->mMode = 3; + other->mTimer[0] = cM_rndF(20.0f) + 40.0f; + } + } + } + return NULL; +} + +/* 80772128-807724A0 006448 0378+00 1/1 0/0 0/0 .text e_rdy_drop__FP11e_rdy_class */ +static void e_rdy_drop(e_rdy_class* i_this) { + f32 target_speed = 0.0f; + + switch (i_this->mMode) { + case 0: + i_this->mSound.startCreatureVoiceLevel(Z2SE_EN_RD_V_SNIPED_DAMAGE, -1); + anm_init(i_this, ANM_DAMAGE_S, 2.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + i_this->mMode = 1; + break; + + case 1: + i_this->mSound.startCreatureVoiceLevel(Z2SE_EN_RD_V_SNIPED_DAMAGE, -1); + if (i_this->mpMorf->isStop()) { + anm_init(i_this, ANM_FURA2, 0.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mMode = 2; + i_this->mTargetAngleY = gake_check(i_this, 200.0f); + fpcM_Search(s_bikkuri_sub, i_this); + i_this->mTimer[0] = 60; + } + break; + + case 2: + i_this->mSound.startCreatureVoiceLevel(Z2SE_EN_RD_V_SNIPED_DAMAGE, -1); + target_speed = 4.0f; + cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->mTargetAngleY, 8, 0x400); + if (i_this->mTimer[0] == 0) { + i_this->mAction = ACT_A_DAMAGE; + i_this->mMode = 0; + return; + } + if (move_gake_check(i_this, 10.0f)) { + i_this->mMode = 3; + i_this->field_0xadc.y = i_this->shape_angle.y + 0x8000; + i_this->field_0xadc.x = 0; + i_this->mpMorf->setPlaySpeed(0.3f); + i_this->field_0xbc8 = 0; + i_this->mTimer[0] = 20; + } + break; + + case 3: + target_speed = 3.0f; + if (i_this->field_0xadc.x > -0x4000) { + i_this->speed.y = 0.0f; + i_this->mSound.startCreatureVoiceLevel(Z2SE_EN_RD_V_SNIPED_DAMAGE, -1); + } else if (i_this->field_0xadc.x > -0x6800) { + i_this->speed.y = -fabsf(cM_scos(i_this->field_0xadc.x) * 70.0f); + i_this->mSound.startCreatureVoiceLevel(Z2SE_EN_RD_V_SNIPED_FALLING, -1); + } else { + i_this->mSound.startCreatureVoiceLevel(Z2SE_EN_RD_V_SNIPED_FALLING, -1); + } + cLib_addCalcAngleS2(&i_this->field_0xadc.x, -0x7000, 2, i_this->field_0xbc8); + cLib_addCalcAngleS2(&i_this->field_0xbc8, 0x800, 1, 0x50); + i_this->field_0xa7b = 2; + if (i_this->mTimer[0] == 0 && i_this->current.pos.y <= i_this->mAcch.GetGroundH() + 100.0f) + { + i_this->current.pos.y = i_this->mAcch.GetGroundH() + 100.0f; + i_this->field_0xadc.x = -0x4000; + i_this->mAction = ACT_DAMAGE; + i_this->mMode = 0; + i_this->field_0xabc = 0.0f; + i_this->health = 0; + } + break; + } + + cLib_addCalc2(&i_this->speedF, target_speed, 1.0f, 3.0f); +} + +/* 807724A0-80772580 0067C0 00E0+00 1/1 0/0 0/0 .text e_rdy_a_damage__FP11e_rdy_class */ +static void e_rdy_a_damage(e_rdy_class* i_this) { + i_this->mIFrameTimer = 3; + + switch (i_this->mMode) { + case 0: + i_this->mMode = 1; + anm_init(i_this, ANM_DEAD_ARROW, 5.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + i_this->mTimer[0] = 80; + dKy_Sound_set(i_this->current.pos, 100, fopAcM_GetID(i_this), 5); + break; + + case 1: + if (i_this->mTimer[0] == 0) { + rd_disappear(i_this); + } + break; + } + + cLib_addCalc0(&i_this->speedF, 1.0f, 3.0f); +} + +/* 80772580-807726F0 0068A0 0170+00 1/1 0/0 0/0 .text e_rdy_stand__FP11e_rdy_class */ +static void e_rdy_stand(e_rdy_class* i_this) { + switch (i_this->mMode) { + case 0: + if (i_this->mTimer[0] == 0) { + anm_init(i_this, ANM_KYORO2, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mMode = 1; + i_this->mTimer[0] = cM_rndF(40.0f) + 60.0f; + } + break; + + case 1: + if (i_this->mTimer[0] == 0) { + anm_init(i_this, ANM_WAIT01, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mTimer[0] = cM_rndF(100.0f) + 100.0f; + i_this->mMode = 0; + } + break; + } + + f32 dist = i_this->mPlayerCheckDist; + s16 angle = 0x4000; + BOOL bVar1 = FALSE; + if (i_this->field_0xa71 == 1 || S_find != 0) { + if (i_this->field_0xa71 == 1) { + bVar1 = TRUE; + } + dist = 10000.0f; + angle = 0x7fff; + } + if (((i_this->mCounter & 7) == 0 || bVar1) && pl_check(i_this, dist, angle) + && i_this->mWeaponType == WEAPON_CLUB) + { + i_this->mAction = ACT_FIGHT_RUN; + i_this->mMode = -10; + i_this->mTimer[0] = 60; + } +} + +/* 807726F0-80772B0C 006A10 041C+00 2/1 0/0 0/0 .text e_rdy_bow3__FP11e_rdy_class */ +static s8 e_rdy_bow3(e_rdy_class* i_this) { + if (i_this->mIFrameTimer == 0 && i_this->mMode != 5 + && fpcM_Search(s_command3_sub, i_this) == NULL) + { + i_this->mMode = 5; + i_this->mTimer[1] = cM_rndF(20.0f) + 40.0f; + i_this->mTimer[0] = cM_rndF(20.0f) + 80.0f; + } + + int frame = (int)i_this->mpMorf->getFrame(); + s8 turn_to_player = true; + + switch (i_this->mMode) { + case 0: + turn_to_player = false; + anm_init(i_this, ANM_WAIT01, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mMode = 1; + break; + + case 1: + turn_to_player = false; + break; + + case 3: + if (i_this->mTimer[0] == 0) { + i_this->mMode = 0; + } + break; + + case 5: + if (i_this->mTimer[1] == 1) { + anm_init(i_this, ANM_KYORO2, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.3f); + } + if (i_this->mTimer[0] == 10) { + anm_init(i_this, ANM_WAIT01, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + } + if (i_this->mTimer[0] == 0) { + i_this->mAction = ACT_BOW2; + i_this->mMode = 0; + } + break; + + case 10: + if (i_this->mTimer[0] == 0) { + anm_init(i_this, ANM_SHOOT_READY, 5.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + J3DAnmTransform* bck = (J3DAnmTransform*)dComIfG_getObjectRes(i_this->mpArcName, 8); + i_this->mpBowMorf->setAnm(bck, J3DFrameCtrl::LOOP_ONCE_e, 5.0f, 0.9f, 0.0f, -1.0f); + i_this->mMode = 11; + i_this->speedF = 0.0f; + } + break; + + case 11: + i_this->field_0xa98 = 4; + if (frame >= 10) { + i_this->mHasArrow = true; + } + if (frame == 20) { + i_this->mSound.startCreatureSound(Z2SE_OBJ_ARROW_DRAW_NORMAL, 0, -1); + } + if (i_this->mpMorf->isStop()) { + anm_init(i_this, ANM_SHOOT_WAIT, 4.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mTimer[0] = cM_rndF(10.0f) + 10.0f; + i_this->mMode = 12; + } + break; + + case 12: + i_this->field_0xa98 = 4; + if (i_this->mTimer[0] == 0 && !i_this->field_0xa74 && !dMsgObject_isTalkNowCheck()) { + anm_init(i_this, ANM_SHOOT, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + J3DAnmTransform* bck = (J3DAnmTransform*)dComIfG_getObjectRes(i_this->mpArcName, 11); + i_this->mpBowMorf->setAnm(bck, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 1.0f, 0.0f, -1.0f); + i_this->mMode = 13; + } + i_this->mHasArrow = true; + break; + + case 13: + if (frame <= 3) { + i_this->mHasArrow = true; + i_this->field_0xa98 = 4; + } + if (frame == 2) { + i_this->mArrowFired = true; + } + if (i_this->mpMorf->isStop()) { + i_this->mMode = 0; + } + break; + } + + if (turn_to_player) { + cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->mPlayerAngle, 4, 0x1000); + } + + if (i_this->mPlayerDist < 500.0f) { + i_this->mAction = ACT_BOW_RUN; + i_this->mMode = 0; + i_this->field_0x1365 = false; + } + + return false; +} + +/* 80772B0C-80772B98 006E2C 008C+00 1/1 0/0 0/0 .text s_command2_sub__FPvPv */ +static void* s_command2_sub(void* i_proc, void* i_this) { + if (fopAc_IsActor(i_proc) && fopAcM_GetName(i_proc) == PROC_E_RDY) { + e_rdy_class* other = (e_rdy_class*)i_proc; + if (other->mAction == ACT_BOW3 && other->mMode < 10) { + other->mTimer[0] = cM_rndF(10.0f) + 10.0f; + other->mMode = 10; + } + } + return NULL; +} + +/* 80772B98-80772C04 006EB8 006C+00 1/1 0/0 0/0 .text s_command4_sub__FPvPv */ +static void* s_command4_sub(void* i_proc, void* i_this) { + if (fopAc_IsActor(i_proc) && fopAcM_GetName(i_proc) == PROC_E_RDY) { + e_rdy_class* other = (e_rdy_class*)i_proc; + if (other != i_this && other->mAction == ACT_BOW3) { + return other; + } + } + return NULL; +} + +/* 80772C04-80773070 006F24 046C+00 2/1 0/0 0/0 .text e_rdy_commander__FP11e_rdy_class */ +static void e_rdy_commander(e_rdy_class* i_this) { + s8 bVar1 = false; + s8 turn_to_player = false; + boss = i_this; + + if (i_this->mTimer[2] == 0 && fpcM_Search(s_command4_sub, i_this) == NULL) { + i_this->mAction = ACT_BOW2; + i_this->mMode = 0; + return; + } + + switch (i_this->mMode) { + case 0: + i_this->mMode = 1; + break; + + case 1: + bVar1 = true; + if (i_this->mTimer[0] == 0) { + anm_init(i_this, ANM_KYORO2, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mMode = 2; + i_this->mTimer[0] = cM_rndF(40.0f) + 60.0f; + } + break; + + case 2: + bVar1 = true; + if (i_this->mTimer[0] == 0) { + anm_init(i_this, ANM_WAIT01, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mTimer[0] = cM_rndF(100.0f) + 100.0f; + i_this->mMode = 1; + } + break; + + case 5: + anm_init(i_this, ANM_WAIT01, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mTimer[0] = 30; + i_this->mMode = 6; + break; + + case 6: + turn_to_player = true; + if (i_this->mTimer[0] == 0) { + anm_init(i_this, ANM_GOSIGN, 3.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + mDoAud_seStart(Z2SE_EN_RD_V_CALLING, NULL, 0, 0); + i_this->mMode = 7; + if (dComIfGp_event_runCheck()) { + i_this->mTimer[0] = l_HIO.field_0x24 + 2; + } else { + i_this->mTimer[0] = 10; + } + } + break; + + case 7: + turn_to_player = true; + if (i_this->mTimer[0] == 1) { + fpcM_Search(s_command2_sub, i_this); + } + if (i_this->mTimer[0] == 0 && i_this->mpMorf->isStop()) { + anm_init(i_this, ANM_WAIT01, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + if (!dComIfGp_event_runCheck() && !pl_check(i_this, i_this->mPlayerCheckDist, 0x4000)) { + i_this->mMode = 10; + i_this->mTimer[1] = 350; + } else { + if (dComIfGp_event_runCheck()) { + i_this->mTimer[0] = 80; + } else { + i_this->mTimer[0] = 0; + } + i_this->mMode = 6; + } + } + break; + + case 10: + anm_init(i_this, ANM_GOSIGN, 3.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + mDoAud_seStart(Z2SE_EN_RD_V_CALLING, NULL, 0, 0); + fpcM_Search(s_command2_sub, i_this); + i_this->mMode = 11; + break; + + case 11: + if (i_this->mpMorf->isStop()) { + if (i_this->mTimer[1] == 0) { + anm_init(i_this, ANM_WAIT01, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mTimer[0] = cM_rndF(30.0f) + 30.0f; + i_this->mMode = 1; + } else { + i_this->mMode = 10; + } + } + break; + } + + if (bVar1 && pl_check(i_this, i_this->mPlayerCheckDist, 0x4000)) { + i_this->mMode = 5; + if (i_this->mSwBit2 != 0) { + dComIfGs_onSwitch(i_this->mSwBit2, fopAcM_GetRoomNo(i_this)); + } + } + + if (turn_to_player) { + cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->mPlayerAngle, 2, 0x800); + } +} + +/* 80773070-80773474 007390 0404+00 1/1 0/0 0/0 .text e_rdy_excite__FP11e_rdy_class */ +static void e_rdy_excite(e_rdy_class* i_this) { + cXyz vec; + f32 target_speed = 0.0f; + + switch (i_this->mMode) { + case 0: + anm_init(i_this, ANM_WAIT01, 4.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mMode = 1; + i_this->mTimer[0] = cM_rndF(20.0f) + 20.0f; + i_this->mTargetAngleY = i_this->current.angle.y; + i_this->field_0x5bc = S_find_pos; + break; + + case 1: + i_this->field_0xa98 = 11; + i_this->mArrowTarget = S_find_pos; + if (i_this->mTimer[0] == 0) { + if (i_this->field_0x1365) { + i_this->mMode = 3; + anm_init(i_this, ANM_KYORO2, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.3f); + i_this->mTimer[0] = cM_rndF(20.0f) + 40.0f; + } else { + i_this->mMode = 2; + anm_init(i_this, ANM_RUN, 2.0f, J3DFrameCtrl::LOOP_REPEAT_e, + cM_rndFX(0.05f) + 1.0f); + i_this->mTimer[0] = cM_rndF(15.0f) + 30.0f; + } + vec = i_this->field_0x5bc - i_this->current.pos; + i_this->mTargetAngleY = cM_atan2s(vec.x, vec.z); + } + break; + + case 2: + i_this->field_0xa98 = 11; + i_this->mArrowTarget = i_this->field_0x5bc; + target_speed = l_HIO.mRunSpeed; + vec = i_this->field_0x5bc - i_this->current.pos; + if (i_this->mTimer[0] == 0 || move_gake_check(i_this, 100.0f) || vec.abs() < 100.0f) { + i_this->mMode = 3; + anm_init(i_this, ANM_KYORO2, 5.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.3f); + i_this->mTimer[0] = cM_rndF(20.0f) + 40.0f; + } + break; + + case 3: + if (i_this->mTimer[0] == 0) { + i_this->mAction = i_this->mPrevAction; + if (i_this->mAction == ACT_STAND) { + i_this->mAction = ACT_NORMAL; + } + i_this->mMode = 0; + } + break; + } + + cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->mTargetAngleY, 2, 0x800); + s16 angle_diff = i_this->current.angle.y - i_this->mTargetAngleY; + if (angle_diff > 0x400 || angle_diff < -0x400) { + target_speed = 0.0f; + } + cLib_addCalc2(&i_this->speedF, target_speed, 1.0f, 5.0f); +} + +/* 80773474-807735A8 007794 0134+00 1/1 0/0 0/0 .text e_rdy_water__FP11e_rdy_class */ +static void e_rdy_water(e_rdy_class* i_this) { + i_this->mIFrameTimer = 10; + + switch (i_this->mMode) { + case 0: { + i_this->speed.y = 0.0f; + if (!i_this->mIsUpsideDown) { + anm_init(i_this, ANM_DROWNEDA, 3.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + } else { + anm_init(i_this, ANM_DROWNEDB, 3.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + } + i_this->mTimer[0] = 60; + i_this->mMode = 1; + i_this->speedF = 0.0f; + i_this->field_0xabc = 0.0f; + i_this->mKnockback = 0.0f; + cXyz pos = i_this->current.pos; + pos.y = i_this->mWaterHeight; + fopKyM_createWpillar(&pos, 1.5f, 0); + break; + } + + case 1: + i_this->speed.y = 0.0f; + cLib_addCalc2(&i_this->current.pos.y, i_this->mWaterHeight, 0.5f, 5.0f); + cLib_addCalcAngleS2(&i_this->field_0xadc.x, -0x4000, 4, 0x400); + if (i_this->mTimer[0] == 0) { + rd_disappear(i_this); + } + } +} + +/* 807735A8-80773A8C 0078C8 04E4+00 1/1 0/0 0/0 .text e_rdy_jyunkai__FP11e_rdy_class */ +static void e_rdy_jyunkai(e_rdy_class* i_this) { + cXyz vec; + f32 target_speed = 0.0f; + s16 check_angle = 0x4000; + + switch (i_this->mMode) { + case 0: { + anm_init(i_this, ANM_WALK, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + i_this->mMode = 1; + dStage_dPnt_c* point = &i_this->mpPath->m_points[i_this->mPathIndex]; + i_this->field_0x5bc = point->m_position; + // fallthrough + } + + case 1: + target_speed = l_HIO.mWalkSpeed; + vec = i_this->field_0x5bc - i_this->current.pos; + i_this->mTargetAngleY = cM_atan2s(vec.x, vec.z); + if (vec.abs() < 50.0f) { + i_this->mPathIndex += i_this->mPathDirection; + if (i_this->mPathIndex >= (i_this->mpPath->m_num & 0xff)) { + if (dPath_ChkClose(i_this->mpPath)) { + i_this->mPathIndex = 0; + } else { + i_this->mPathDirection = -1; + i_this->mPathIndex = i_this->mpPath->m_num - 2; + } + } else if (i_this->mPathIndex < 0) { + i_this->mPathDirection = 1; + i_this->mPathIndex = 1; + } + i_this->mMode = 2; + i_this->mTimer[0] = cM_rndF(100.0f) + 100.0f; + anm_init(i_this, ANM_KYORO2, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + } + break; + + case 2: + check_angle = 0x6000; + if (i_this->mTimer[0] == 0) { + i_this->mMode = 0; + } + break; + + case 10: + anm_init(i_this, ANM_SHOUT, 5.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + i_this->mMode = 11; + dKy_Sound_set(i_this->current.pos, 100, fopAcM_GetID(i_this), 3); + S_find = 20; + break; + + case 11: + cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->mPlayerAngle, 2, 0x800); + if (i_this->mpMorf->isStop()) { + i_this->mAction = ACT_FIGHT_RUN; + i_this->mMode = -10; + i_this->mTimer[0] = 60; + return; + } + break; + } + + if (target_speed) { + cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->mTargetAngleY, 8, 0x400); + s16 angle_diff = i_this->current.angle.y - i_this->mTargetAngleY; + if (angle_diff > 0x400 || angle_diff < -0x400) { + target_speed = 0.0f; + } + } + cLib_addCalc2(&i_this->speedF, target_speed, 1.0f, 3.0f); + + f32 check_dist = i_this->mPlayerCheckDist; + BOOL bVar1 = FALSE; + if (i_this->field_0xa71 == 1 || S_find != 0) { + if (i_this->field_0xa71 == 1) { + bVar1 = TRUE; + } + check_dist = 10000.0f; + check_angle = 0x7fff; + } + + if (i_this->mMode < 10) { + if (bVar1) { + i_this->mMode = 2; + i_this->mTimer[0] = cM_rndF(100.0f) + 100.0f; + anm_init(i_this, ANM_KYORO2, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + } else if ((i_this->mCounter & 7) == 0 && pl_check(i_this, check_dist, check_angle)) { + if (S_find == 0) { + i_this->mMode = 10; + } else { + i_this->mAction = 3; + i_this->mMode = -10; + i_this->mTimer[0] = 60; + } + } + } +} + +/* 80773A8C-80773B24 007DAC 0098+00 1/1 0/0 0/0 .text wolfkick_damage__FP11e_rdy_class */ +static void wolfkick_damage(e_rdy_class* i_this) { + fopAc_ac_c* player = dComIfGp_getPlayer(0); + i_this->mAction = ACT_DAMAGE; + i_this->mMode = 0; + i_this->field_0xadc.y = player->shape_angle.y + 0x8000; + i_this->speed.y = l_HIO.field_0x30; + i_this->field_0xabc = -l_HIO.field_0x34; + i_this->mSound.startCollisionSE(Z2SE_HIT_WOOD_WEAPON, 0x1f); + i_this->field_0xac8 = true; +} + +/* 80773B24-80773D2C 007E44 0208+00 1/1 0/0 0/0 .text big_damage__FP11e_rdy_class */ +static void big_damage(e_rdy_class* i_this) { + i_this->mAction = ACT_DAMAGE; + i_this->mMode = 0; + i_this->speed.y = l_HIO.field_0x4c + 2.0f; + + if (i_this->mRideState == 2) { + fopAc_ac_c* kargarok = fopAcM_SearchByID(i_this->mKargarokID); + if (kargarok != NULL && kargarok->speedF >= 20.0f) { + i_this->field_0xabc = kargarok->speedF; + if (i_this->field_0xabc > 40.0f) { + i_this->field_0xabc = 40.0f; + } + } else { + i_this->field_0xabc = -l_HIO.field_0x48; + } + i_this->field_0xadc.y = i_this->shape_angle.y + (s16)cM_rndFX(3000.0f); + } else { + i_this->field_0xadc.y = i_this->mAtInfo.mHitDirection.y; + i_this->field_0xabc = -l_HIO.field_0x44; + } + + if (i_this->mAtInfo.mHitBit & 0x80) { + i_this->field_0xac6 = cM_rndFX(2000.0f) + 4000.0f; + } else if (i_this->mAtInfo.mHitBit & 0x800) { + i_this->field_0xac6 = -(cM_rndFX(2000.0f) + 4000.0f); + } else if (i_this->mRideState != 0) { + i_this->field_0xac6 = cM_rndFX(3000.0f); + } else if (fopAcM_GetName(i_this->mAtInfo.mpActor) == PROC_E_WB) { + i_this->field_0xac6 = cM_rndFX(8000.0f); + i_this->speed.y = cM_rndF(15.0f) + 35.0f; + i_this->field_0xabc = -(i_this->mAtInfo.mpActor->speedF * 0.5f); + } else { + i_this->field_0xac6 = cM_rndFX(1000.0f); + } + + i_this->field_0xac8 = false; +} + +/* 80773D2C-80773E5C 00804C 0130+00 1/1 0/0 0/0 .text small_damage__FP11e_rdy_classi */ +static void small_damage(e_rdy_class* i_this, int i_collider) { + if (i_this->mAction != ACT_S_DAMAGE) { + i_this->mPrevAction = i_this->mAction; + } + i_this->mAction = ACT_S_DAMAGE; + i_this->mMode = 0; + i_this->mSound.startCreatureVoice(Z2SE_EN_RD_V_DAMAGE, -1); + + if (i_collider == 0) { + s16 angle_diff = i_this->shape_angle.y - i_this->mPlayerAngle; + if (angle_diff < -0x4000 || angle_diff > 0x4000) { + anm_init(i_this, ANM_DAMAGE_W, 2.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + } else if (angle_diff < 0) { + anm_init(i_this, ANM_DAMAGE_L, 2.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + } else { + anm_init(i_this, ANM_DAMAGE_R, 2.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + } + } else { + anm_init(i_this, ANM_DAMAGE_W, 2.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); + } + + i_this->mKnockback = 20.0f; + i_this->mHitDirection = i_this->mAtInfo.mHitDirection.y; +} + +/* 80773E5C-8077424C 00817C 03F0+00 1/1 0/0 0/0 .text damage_check__FP11e_rdy_class */ +static void damage_check(e_rdy_class* i_this) { + fopAc_ac_c* _this = (fopAc_ac_c*)i_this; + daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); + if (i_this->field_0xa8f != 0) { + i_this->field_0xa8f = 0; + big_damage(i_this); + i_this->mIFrameTimer = 1000; + _this->current.angle.x = 0; + _this->current.angle.z = 0; + _this->shape_angle.x = _this->current.angle.x; + _this->shape_angle.z = _this->current.angle.z; + } else { + i_this->mCcStts.Move(); + if (i_this->mIFrameTimer == 0) { + if (l_HIO.field_0x39) { + _this->health = 100; + } + + for (int i = 0; i <= 2; i++) { + if (i_this->mCcSph[i].ChkTgHit()) { + i_this->mIFrameTimer = 6; + i_this->mParticleTimer = 3; + i_this->mAtInfo.mpCollider = i_this->mCcSph[i].GetTgHitObj(); + + if (i_this->mAtInfo.mpCollider->ChkAtType(AT_TYPE_10000000)) { + wolfkick_damage(i_this); + i_this->mIFrameTimer = 1000; + break; + + } else { + at_power_check(&i_this->mAtInfo); + if (i_this->mAtInfo.mpCollider->ChkAtType(AT_TYPE_SHIELD_ATTACK)) { + i_this->mTimer[1] = 30; + } else { + i_this->mTimer[1] = 1; + } + + if (i_this->mAtInfo.mHitType != HIT_TYPE_LINK_NORMAL_ATTACK + && i_this->mAtInfo.mHitType != HIT_TYPE_STUN + && i_this->mAtInfo.mHitType != HIT_TYPE_BOMB + && i_this->field_0x1365) + { + i_this->mIFrameTimer = 1000; + i_this->mAction = ACT_DROP; + i_this->mMode = 0; + _this->health = 0; + cc_at_check(_this, &i_this->mAtInfo); + return; + } + + if (i_this->mRideState == 0 && i_this->mAtInfo.mHitType == HIT_TYPE_ARROW) + { + i_this->mAction = ACT_A_DAMAGE; + i_this->mMode = 0; + i_this->mSound.startCreatureVoice(Z2SE_EN_RD_V_DAMAGE, -1); + _this->health = 0; + cc_at_check(_this, &i_this->mAtInfo); + return; + } + + cc_at_check(_this, &i_this->mAtInfo); + + if (daPy_getPlayerActorClass()->getCutType() + == daPy_py_c::CUT_TYPE_HEAD_JUMP) { + _this->health = 0; + } + + if (i_this->mAtInfo.mpCollider->ChkAtType(AT_TYPE_UNK)) { + i_this->mIFrameTimer = 20; + } else { + i_this->mIFrameTimer = 10; + } + if (i_this->mAtInfo.mAttackPower <= 1) { + i_this->mIFrameTimer = 10; + } + + i_this->field_0xaf0 |= i_this->mAtInfo.mHitBit; + + if (daPy_getPlayerActorClass()->checkHorseRide() + && dComIfGp_getHorseActor()->speedF >= 20.0f + && i_this->mAtInfo.mHitType == HIT_TYPE_LINK_NORMAL_ATTACK) + { + i_this->mAtInfo.mAttackPower = 20; + } + + if (_this->health <= 0 || i_this->mAtInfo.mAttackPower >= 20 + || i_this->mAtInfo.mHitStatus != 0 || i_this->mRideState != 0) + { + if (player->getCutType() == daPy_py_c::CUT_TYPE_JUMP + && player->checkCutJumpCancelTurn()) + { + small_damage(i_this, i); + i_this->mIFrameTimer = 3; + } else { + big_damage(i_this); + i_this->mIFrameTimer = 1000; + } + } else { + int collider = i; + if (i_this->mAtInfo.mHitType == HIT_TYPE_STUN) { + collider = 0; + } + small_damage(i_this, collider); + } + + _this->speedF = 0.0f; + + if (i_this->mpBowMorf != NULL) { + J3DAnmTransform* bck = + (J3DAnmTransform*)dComIfG_getObjectRes(i_this->mpArcName, 11); + i_this->mpBowMorf->setAnm(bck, J3DFrameCtrl::LOOP_ONCE_e, + 1.0f, 1.0f, 0.0f, -1.0f); + break; + } else { + break; + } + } + } + } + + for (int i = 0; i <= 2; i++) { + if (_this->health <= 1) { + _this->health = 0; + i_this->mCcSph[i].SetTgHitMark(CcG_Tg_UNK_MARK_3); + } + } + } + } +} + +/* 8077424C-8077582C 00856C 15E0+00 2/1 0/0 0/0 .text action__FP11e_rdy_class */ +// NONMATCHING float ordering and an extra mr +// A cast to s16 fixes the latter, but causes a regswap +static void action(e_rdy_class* i_this) { + daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); + cXyz vec1, vec2; + + i_this->field_0xa98 = 0; + i_this->mPlayerDist = fopAcM_searchPlayerDistance(i_this); + if (daPy_getPlayerActorClass()->checkHorseRide()) { + i_this->mPlayerDist -= 100.0f; + } + i_this->mPlayerAngle = fopAcM_searchPlayerAngleY(i_this); + + if (i_this->mRideState == 0) { + fopAcM_OnStatus(i_this, 0); + i_this->attention_info.flags = 4; + } else { + fopAcM_OffStatus(i_this, 0); + i_this->attention_info.flags = 0; + } + + damage_check(i_this); + + s8 link_search = false; + s8 water_check = true; + s8 search_sound = false; + i_this->offHeadLockFlg(); + + switch (i_this->mAction) { + case ACT_NORMAL: + e_rdy_normal(i_this); + search_sound = true; + break; + case ACT_FIGHT_RUN: + e_rdy_fight_run(i_this); + link_search = true; + break; + case ACT_FIGHT: + e_rdy_fight(i_this); + link_search = true; + break; + case ACT_BOW_RUN: + e_rdy_bow_run(i_this); + link_search = true; + break; + case ACT_BOW: + e_rdy_bow(i_this); + link_search = true; + break; + case ACT_BOW2: + search_sound = e_rdy_bow2(i_this); + link_search = true; + break; + case ACT_BOW_IKKI2: + e_rdy_bow_ikki2(i_this); + water_check = false; + break; + case ACT_AVOID: + e_rdy_avoid(i_this); + break; + case ACT_BOMB_ACTION: + e_rdy_bomb_action(i_this); + break; + case ACT_S_DAMAGE: + e_rdy_s_damage(i_this); + break; + case ACT_DAMAGE: + e_rdy_damage(i_this); + break; + case ACT_DROP: + e_rdy_drop(i_this); + break; + case ACT_A_DAMAGE: + e_rdy_a_damage(i_this); + break; + case ACT_STAND: + e_rdy_stand(i_this); + search_sound = true; + break; + case ACT_COMMANDER: + e_rdy_commander(i_this); + link_search = true; + break; + case ACT_BOW3: + search_sound = e_rdy_bow3(i_this); + link_search = true; + break; + case ACT_EXCITE: + e_rdy_excite(i_this); + break; + case ACT_WATER: + e_rdy_water(i_this); + water_check = false; + break; + case ACT_TKUSA: + e_rdy_tkusa(i_this); + break; + case ACT_YC_RIDE: + e_rdy_yc_ride(i_this); + break; + case ACT_JYUNKAI: + e_rdy_jyunkai(i_this); + break; + } + + if (search_sound) { + SND_INFLUENCE* sound = dKy_Sound_get(); + if (sound->actor_id != fpcM_ERROR_PROCESS_ID_e && sound->actor_id != fopAcM_GetID(i_this)) { + vec1 = sound->position - i_this->current.pos; + if (vec1.abs() < sound->field_0xc * 120) { + i_this->mPrevAction = i_this->mAction; + i_this->mAction = ACT_EXCITE; + i_this->mMode = 0; + S_find_pos = sound->position; + } + } + } + + if (water_check) { + dBgS_ObjGndChk_Spl gnd_chk; + vec1 = i_this->current.pos; + vec1.y += 150.0f; + gnd_chk.SetPos(&vec1); + i_this->mWaterHeight = dComIfG_Bgsp().GroundCross(&gnd_chk); + if (i_this->current.pos.y < i_this->mWaterHeight) { + i_this->mAction = ACT_WATER; + i_this->mMode = 0; + i_this->current.pos.y = i_this->mWaterHeight; + } + } + + if (link_search) { + i_this->mSound.setLinkSearch(true); + } else { + i_this->mSound.setLinkSearch(false); + } + + cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->current.angle.y, 2, 0x1000); + cLib_addCalcAngleS2(&i_this->shape_angle.x, i_this->current.angle.x, 2, 0x1000); + cLib_addCalcAngleS2(&i_this->shape_angle.z, i_this->current.angle.z, 2, 0x1000); + + if (i_this->mRideState == 0) { + i_this->attention_info.distances[fopAc_attn_BATTLE_e] = 3; + if (i_this->field_0xabc) { + mDoMtx_YrotS(*calc_mtx, i_this->field_0xadc.y); + if (i_this->field_0xbc0 == 0) { + vec1.z = i_this->field_0xabc; + } else { + vec1.z = 0.0f; + i_this->speed.y = 0.0f; + } + i_this->gravity = -(l_HIO.field_0x40 - 1.0f); + } else { + mDoMtx_YrotS(*calc_mtx, i_this->current.angle.y); + vec1.z = i_this->speedF; + i_this->gravity = -5.0f; + } + vec1.x = 0.0f; + vec1.y = 0.0f; + MtxPosition(&vec1, &vec2); + i_this->speed.x = vec2.x; + i_this->speed.z = vec2.z; + i_this->current.pos += i_this->speed; + i_this->speed.y += i_this->gravity; + if (i_this->speed.y < -100.0f) { + i_this->speed.y = -100.0f; + } + if (i_this->mCollisionEnabled) { + cXyz* move_p = i_this->mCcStts.GetCCMoveP(); + if (move_p != NULL) { + i_this->current.pos.x += move_p->x; + i_this->current.pos.z += move_p->z; + } + } + cLib_addCalc0(&i_this->mJumpHeight, 1.0f, 3.0f); + if (i_this->mKnockback > 0.1f) { + vec1.x = 0.0f; + vec1.y = 0.0f; + vec1.z = -i_this->mKnockback; + mDoMtx_YrotS(*calc_mtx, i_this->mHitDirection); + MtxPosition(&vec1, &vec2); + i_this->current.pos += vec2; + cLib_addCalc0(&i_this->mKnockback, 1.0f, 7.0f); + } + + } else { + e_yc_class* kargarok = (e_yc_class*)fopAcM_SearchByID(i_this->mKargarokID); + if (kargarok == NULL) { + i_this->mAction = ACT_NORMAL; + i_this->mMode = 0; + return; + } + i_this->speedF = kargarok->speedF; + i_this->speed.set(0.0f, 0.0f, 0.0f); + MTXCopy(kargarok->mpMorf->getModel()->getAnmMtx(9), *calc_mtx); + vec1.set(0.0f, -60.0f, 15.0f); + MtxPosition(&vec1, &i_this->mKargarokPos); + if (i_this->mRideState == 2) { + i_this->current.pos = i_this->mKargarokPos; + i_this->current.angle = kargarok->shape_angle; + i_this->shape_angle = i_this->current.angle; + kargarok->mRiderID = fopAcM_GetID(i_this); + } else { + vec1 = i_this->mKargarokPos - i_this->current.pos; + mDoMtx_YrotS(*calc_mtx, cM_atan2s(vec1.x, vec1.z)); + f32 vec1_xz = JMAFastSqrt(vec1.x * vec1.x + vec1.z * vec1.z); + mDoMtx_XrotM(*calc_mtx, -cM_atan2s(vec1.y, vec1_xz)); + vec1.x = 0.0f; + vec1.y = 0.0f; + vec1.z = 20.0f; + MtxPosition(&vec1, &vec2); + i_this->current.pos += vec2; + vec1 = i_this->mKargarokPos - i_this->current.pos; + if (vec1.abs() < 30.0f || i_this->mTimer[3] == 0) { + i_this->mRideState = 2; + } + cLib_addCalcAngleS2(&i_this->current.angle.y, kargarok->shape_angle.y, 4, 0x800); + } + i_this->mJumpHeight += i_this->mJumpSpeed; + i_this->mJumpSpeed -= 4.5f; + if (i_this->mJumpHeight <= 0.0f) { + i_this->mJumpHeight = 0.0f; + i_this->mJumpSpeed = 0.0f; + } + } + + s16 sVar10 = 0; + i_this->field_0xa74 = false; + cXyz vec3; + s16 sVar15 = 0x1000; + + if (i_this->field_0xa98 == -1 || i_this->field_0xa98 == -2) { + mDoMtx_YrotS(*calc_mtx, i_this->shape_angle.y); + vec1.x = 0.0f; + if (i_this->field_0xa98 == -2) { + vec1.y = 110.0f; + } else { + vec1.y = 70.0f; + } + vec1.z = 50.0f; + MtxPosition(&vec1, &vec3); + vec3 += i_this->current.pos; + i_this->field_0xa98 = 2; + sVar15 = 0x800; + } else if (i_this->field_0xa98 >= 11) { + i_this->field_0xa98 -= 10; + vec3 = i_this->mArrowTarget; + } else { + vec3 = player->eyePos; + } + + if (i_this->mRideState == 2) { + sVar15 = 0x1000; + } + + if (i_this->field_0xa98 != 0) { + vec1 = vec3 - i_this->current.pos; + vec1.y += -150.0f; + s16 ang_diff_y = cM_atan2s(vec1.x, vec1.z) - i_this->shape_angle.y; + f32 vec1_xz = JMAFastSqrt(vec1.x * vec1.x + vec1.z * vec1.z); + sVar10 = i_this->shape_angle.x + cM_atan2s(vec1.y, vec1_xz); + if (i_this->field_0xa98 <= 2) { + if (ang_diff_y > 16000) { + ang_diff_y = 16000; + } else if (ang_diff_y < -16000) { + ang_diff_y = -16000; + } + if (sVar10 > 16000) { + sVar10 = 16000; + } else if (sVar10 < -16000) { + sVar10 = -16000; + } + cLib_addCalcAngleS2(&i_this->field_0xa9a, ang_diff_y, 2, sVar15); + } else if (i_this->field_0xa98 == 5) { + if ((i_this->mCounter & 0xf) == 0 && cM_rndF2(1.0f) < 0.3f) { + i_this->field_0xaa0 = cM_rndFX2(2000.0f); + } + } else { + if (ang_diff_y > 30000) { + ang_diff_y = 30000; + i_this->field_0xa74 = true; + } else if (ang_diff_y < -25000) { + ang_diff_y = -25000; + i_this->field_0xa74 = true; + } + cLib_addCalcAngleS2(&i_this->field_0xa9a, ang_diff_y / 2, 2, 0x1000); + vec1_xz = JMAFastSqrt(vec1.x * vec1.x + vec1.z * vec1.z); + sVar10 = -cM_atan2s(vec1.y, vec1_xz); + if (sVar10 > 11000) { + sVar10 = 11000; + i_this->field_0xa74 = true; + } else if (sVar10 < -8000) { + sVar10 = -8000; + i_this->field_0xa74 = true; + } + } + } else { + cLib_addCalcAngleS2(&i_this->field_0xa9a, 0, 2, 0x1000); + i_this->field_0xaa0 = 0; + } + + cLib_addCalcAngleS2(&i_this->field_0xa9c, sVar10, 2, sVar15); + cLib_addCalcAngleS2(&i_this->field_0xa9e, i_this->field_0xaa0, 4, 0x500); + + if (fabsf(i_this->field_0xafc) > 1.0f) { + i_this->field_0xb44[1].x = i_this->field_0xafc * cM_scos(i_this->field_0xb00) * 70.0f; + i_this->field_0xb44[2].x += i_this->field_0xb44[1].x; + cLib_addCalc0(&i_this->field_0xafc, 1.0f, 3.0f); + i_this->field_0xb00 += 4000; + } + + if (fabsf(i_this->field_0xaf4) > 1.0f) { + i_this->field_0xb44[0].x = i_this->field_0xaf4 * cM_scos(i_this->field_0xaf8) * 70.0f; + cLib_addCalc0(&i_this->field_0xaf4, 1.0f, 3.0f); + i_this->field_0xaf8 += 4000; + } + + if (i_this->speed.y < 0.0f && i_this->mAcch.ChkGroundHit()) { + cLib_addCalc0(&i_this->field_0xafc, 1.0f, 30.0f); + cLib_addCalc0(&i_this->field_0xaf4, 1.0f, 30.0f); + } + + if (i_this->field_0xabc) { + s16 ang_diff_y = i_this->field_0xadc.y - i_this->shape_angle.y; + i_this->field_0xb44[3].y = 0x4000 - ang_diff_y; + if (i_this->field_0xb44[3].y > 6000) { + i_this->field_0xb44[3].y = 6000; + } else if (i_this->field_0xb44[3].y < -12000) { + i_this->field_0xb44[3].y = -12000; + } + i_this->field_0xb44[4].y = 0x4000 - ang_diff_y; + if (i_this->field_0xb44[4].y > 15000) { + i_this->field_0xb44[4].y = 15000; + } else if (i_this->field_0xb44[4].y < 0) { + i_this->field_0xb44[4].y = 0; + } + i_this->field_0xb44[5].y = ang_diff_y + 0x4000; + if (i_this->field_0xb44[5].y > 6000) { + i_this->field_0xb44[5].y = 6000; + } else if (i_this->field_0xb44[5].y < -12000) { + i_this->field_0xb44[5].y = -12000; + } + i_this->field_0xb44[6].y = ang_diff_y + 0x4000; + if (i_this->field_0xb44[6].y > 15000) { + i_this->field_0xb44[6].y = 15000; + } else if (i_this->field_0xb44[6].y < 0) { + i_this->field_0xb44[6].y = 0; + } + + mDoMtx_YrotS(*calc_mtx, ang_diff_y); + vec1.x = 0.0f; + vec1.y = 0.0f; + vec1.z = 12000.0f; + MtxPosition(&vec1, &vec2); + i_this->field_0xbb6 = -vec2.x; + i_this->field_0xbb4 = -vec2.z * 1.3f; + if (i_this->field_0xbb4 > 10000) { + i_this->field_0xbb4 = 10000; + } + } + + static s16 j_spd[11] = { + 0x4000, 0x4000, 0x4000, 0x1000, 0x1000, 0x1000, 0x1000, 0x4000, 0x4000, 0x4000, 0x4000, + }; + for (int i = 0; i < 11; i++) { + cLib_addCalcAngleS2(&i_this->field_0xb02[i].x, i_this->field_0xb44[i].x, 2, j_spd[i]); + cLib_addCalcAngleS2(&i_this->field_0xb02[i].y, i_this->field_0xb44[i].y, 2, j_spd[i]); + cLib_addCalcAngleS2(&i_this->field_0xb02[i].z, i_this->field_0xb44[i].z, 2, j_spd[i]); + i_this->field_0xb44[i].z = 0; + i_this->field_0xb44[i].x = 0; + if (i >= 3 && i <= 6) { + if (i_this->field_0xba2[i - 3] == 0) { + s16 spd; + if (i == 4 || i == 6) { + spd = 0x600; + } else { + spd = 0x800; + } + cLib_addCalcAngleS2(&i_this->field_0xb44[i].y, 0, 1, spd); + } else { + i_this->field_0xba2[i - 3]--; + } + } else { + i_this->field_0xb44[i].y = 0; + } + if (i >= 3) { + i_this->field_0xb8c[i] = + i_this->field_0xb88 * cM_scos(i_this->mCounter * 4000 + i * 20000); + } + } + cLib_addCalc0(&i_this->field_0xb88, 1.0f, 100.0f); + + cLib_addCalcAngleS2(&i_this->field_0xbb0, i_this->field_0xbb6, 2, 0x800); + cLib_addCalcAngleS2(&i_this->field_0xbae, i_this->field_0xbb4, 2, 0x800); + i_this->field_0xbb4 = 0; + i_this->field_0xbb6 = 0; + + s16 sVar11 = 0; + s16 sVar12 = 0; + if (i_this->field_0xaee != 0) { + i_this->field_0xaee--; + if (i_this->field_0xadc.x != 0) { + Vec gnd_pos2; + cXyz gnd_pos; + dBgS_GndChk gnd_chk; + MTXCopy(i_this->mpMorf->getModel()->getAnmMtx(JNT_HIP1), *calc_mtx); + vec1.set(0.0f, 0.0f, 0.0f); + MtxPosition(&vec1, &gnd_pos); + gnd_pos.y += 100.0f; + gnd_pos.y += 100.0f; + gnd_chk.SetPos(&gnd_pos); + gnd_pos.y = dComIfG_Bgsp().GroundCross(&gnd_chk); + + if (gnd_pos.y != -1.0e9f) { + gnd_pos2.x = gnd_pos.x; + gnd_pos2.y = gnd_pos.y + 100.0f; + gnd_pos2.z = gnd_pos.z + 75.0f; + gnd_chk.SetPos(&gnd_pos2); + gnd_pos2.y = dComIfG_Bgsp().GroundCross(&gnd_chk); + if (gnd_pos2.y != -1.0e9f) { + sVar12 = -cM_atan2s(gnd_pos2.y - gnd_pos.y, gnd_pos2.z - gnd_pos.z); + if (sVar12 > 0x3000 || sVar12 < -0x3000) { + sVar12 = 0; + } + } + + gnd_pos2.x = gnd_pos.x + 75.0f; + gnd_pos2.y = gnd_pos.y + 100.0f; + gnd_pos2.z = gnd_pos.z; + gnd_chk.SetPos(&gnd_pos2); + gnd_pos2.y = dComIfG_Bgsp().GroundCross(&gnd_chk); + if (gnd_pos2.y != -1.0e9f) { + sVar11 = cM_atan2s(gnd_pos2.y - gnd_pos.y, gnd_pos2.x - gnd_pos.x); + if (sVar11 > 0x3000 || sVar11 < -0x3000) { + sVar11 = 0; + } + } + } + + dBgS_LinChk lin_chk; + cXyz vec4, lin_start, lin_end; + lin_start = i_this->current.pos; + lin_start.y += 30.0f; + J3DModel* model = i_this->mpMorf->getModel(); + vec4.set(0.0f, 0.0f, 0.0f); + MTXCopy(model->getAnmMtx(JNT_HEAD), *calc_mtx); + MtxPosition(&vec4, &lin_end); + lin_end.y += 30.0f; + lin_chk.Set(&lin_start, &lin_end, i_this); + if (dComIfG_Bgsp().LineCross(&lin_chk)) { + vec4 = lin_start - lin_end; + mDoMtx_YrotS(*calc_mtx, cM_atan2s(vec4.x, vec4.z)); + vec4.x = 0.0f; + vec4.y = 0.0f; + vec4.z = 50.0f; + MtxPosition(&vec4, &vec2); + i_this->current.pos += vec2; + } + + i_this->field_0xae8.x = sVar12; + i_this->field_0xae8.z = sVar11; + } + } + cLib_addCalcAngleS2(&i_this->field_0xae2.x, i_this->field_0xae8.x, 1, 0x400); + cLib_addCalcAngleS2(&i_this->field_0xae2.z, i_this->field_0xae8.z, 1, 0x400); + + if (i_this->mParticleTimer != 0) { + i_this->mParticleTimer--; + if (i_this->mParticleTimer == 0) { + dComIfGp_particle_set(0x15e, &i_this->eyePos, &i_this->shape_angle, NULL); + } + } + + if (i_this->mGroundHit) { + MTXCopy(i_this->mpMorf->getModel()->getAnmMtx(JNT_MUNE2), *calc_mtx); + vec1.set(0.0f, 0.0f, 0.0f); + MtxPosition(&vec1, &vec2); + dBgS_ObjGndChk_Spl wtr_chk; + vec1 = vec2; + vec1.y += 100.0f; + wtr_chk.SetPos(&vec1); + if (fabsf(dComIfG_Bgsp().GroundCross(&wtr_chk) - vec2.y) < 50.0f) { + cXyz scl(1.0f, 1.0f, 1.0f); + csXyz rot(0, 0, 0); + static u16 w_eff_name[3] = {0x8258, 0x8259, 0x825a}; + for (int i = 0; i < 3; i++) { + i_this->mWaterParticleKey[i] = + dComIfGp_particle_set(i_this->mWaterParticleKey[i], w_eff_name[i], &vec2, + &i_this->tevStr, &rot, &scl, 0xff, + NULL, -1, NULL, NULL, NULL); + } + } else { + fopAcM_effSmokeSet1(&i_this->mSmokeKey1, &i_this->mSmokeKey2, &vec2, + NULL, 1.3f, &i_this->tevStr, 1); + } + i_this->mGroundHit = false; + } + + cXyz bind_scl(1.3f, 1.3f, 1.3f); + setMidnaBindEffect(i_this, &i_this->mSound, &i_this->eyePos, &bind_scl); +} + +/* 8077582C-80775A20 009B4C 01F4+00 1/1 0/0 0/0 .text fire_eff_set__FP11e_rdy_class */ +static void fire_eff_set(e_rdy_class* i_this) { + int eff_num; + u16 eff[2]; + cXyz vec1, vec2; + + if (i_this->mWeaponType == WEAPON_BOW_BOMB) { + eff_num = 2; + eff[0] = 0x86a5; + eff[1] = 0x86a6; + i_this->mSound.startCreatureSoundLevel(Z2SE_OBJ_BOMB_IGNITION, 0, -1); + } else { + eff_num = 1; + eff[0] = 0x8113; + i_this->mSound.startCreatureSoundLevel(Z2SE_OBJ_ARROW_FIRE_READY, 0, -1); + } + + vec1.x = 90.0f; + vec1.y = 10.0f; + vec1.z = -60.0f; + MtxPosition(&vec1, &vec2); + i_this->field_0x1358 = vec2 - i_this->field_0x134c; + i_this->field_0x1358 *= 0.9f; + i_this->field_0x134c = vec2; + + for (int i = 0; i < eff_num; i++) { + i_this->mFireParticleKey[i] = dComIfGp_particle_set(i_this->mFireParticleKey[i], eff[i], + &vec2, &i_this->shape_angle, NULL); + if (i == 0) { + JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->mFireParticleKey[i]); + if (emitter != NULL) { + emitter->setParticleCallBackPtr(dPa_control_c::getParticleTracePCB()); + emitter->setUserWork((u32)&i_this->field_0x1358); + } + } + } +} + +/* 80775A20-80775B04 009D40 00E4+00 1/1 0/0 0/0 .text cam_3d_morf__FP11e_rdy_classf */ +static void cam_3d_morf(e_rdy_class* i_this, f32 i_scale) { + cLib_addCalc2(&i_this->mCamCenter.x, i_this->mCamCenterTarget.x, i_scale, + i_this->mCamCenterSpeed.x * i_this->mCamSpeed); + cLib_addCalc2(&i_this->mCamCenter.y, i_this->mCamCenterTarget.y, i_scale, + i_this->mCamCenterSpeed.y * i_this->mCamSpeed); + cLib_addCalc2(&i_this->mCamCenter.z, i_this->mCamCenterTarget.z, i_scale, + i_this->mCamCenterSpeed.z * i_this->mCamSpeed); + cLib_addCalc2(&i_this->mCamEye.x, i_this->mCamEyeTarget.x, i_scale, + i_this->mCamEyeSpeed.x * i_this->mCamSpeed); + cLib_addCalc2(&i_this->mCamEye.y, i_this->mCamEyeTarget.y, i_scale, + i_this->mCamEyeSpeed.y * i_this->mCamSpeed); + cLib_addCalc2(&i_this->mCamEye.z, i_this->mCamEyeTarget.z, i_scale, + i_this->mCamEyeSpeed.z * i_this->mCamSpeed); +} + +/* 80775B04-80775B50 009E24 004C+00 1/1 0/0 0/0 .text s_adel_sub__FPvPv */ +static void* s_adel_sub(void* i_proc, void* i_this) { + if (fopAc_IsActor(i_proc) && fopAcM_GetName(i_proc) == PROC_E_ARROW) { + fopAcM_delete((fopAc_ac_c*)i_proc); + } + return NULL; +} + +/* 80775B50-80777330 009E70 17E0+00 2/1 0/0 0/0 .text demo_camera__FP11e_rdy_class */ +// NONMATCHING regalloc +static void demo_camera(e_rdy_class* i_this) { + daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); + camera_class* player_camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); + camera_class* camera = dComIfGp_getCamera(0); + cXyz vec1, vec2, vec3, vec4, vec5; + s8 cVar13 = 0; + s8 cVar12 = 0; + e_yc_class* kargarok = (e_yc_class*)fopAcM_SearchByID(i_this->mKargarokID); + + switch (i_this->mDemoMode) { + case 1: + if (!i_this->eventInfo.i_checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(i_this, 2, 0xffef, 0); + i_this->eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + return; + } + player_camera->mCamera.Stop(); + i_this->mDemoMode = 2; + i_this->mDemoTimer = 0; + i_this->mCamFovy = 55.0f; + player_camera->mCamera.SetTrimSize(3); + daPy_getPlayerActorClass()->changeOriginalDemo(); + daPy_getPlayerActorClass()->changeDemoMode(0x38, 0, 0, 0); + i_this->mCamEye = camera->lookat.eye; + i_this->mCamCenter = camera->lookat.center; + if ((s16)(kargarok->shape_angle.y - player->shape_angle.y) > 0) { + i_this->field_0x13d4 = -0x4000; + } else { + i_this->field_0x13d4 = 0x4000; + } + player->speedF = 0.0f; + // fallthrough + + case 2: + case 3: + case 4: + cLib_addCalc2(&i_this->mCamCenter.x, player->current.pos.x, 0.2f, 100.0f); + cLib_addCalc2(&i_this->mCamCenter.y, player->current.pos.y + 100.0f, 0.2f, 100.0f); + cLib_addCalc2(&i_this->mCamCenter.z, player->current.pos.z, 0.2f, 100.0f); + cLib_addCalc2(&i_this->mCamEye.y, player->current.pos.y + 100.0f, 0.1f, 5.0f); + if (i_this->mDemoMode == 3) { + i_this->mDemoMode = 4; + i_this->mDemoTimer = 0; + daPy_getPlayerActorClass()->setThrowDamage(i_this->shape_angle.y, 40.0f, 0.0f, 2, 1, 0); + daPy_getPlayerActorClass()->changeDemoMode(1, 0, 0, 0); + } + if (i_this->mDemoMode == 4 && i_this->mDemoTimer == 70) { + cVar13 = 1; + } + break; + + case 5: + if (!i_this->eventInfo.i_checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(i_this, 2, 0xffff, 0); + i_this->eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + return; + } + player_camera->mCamera.Stop(); + i_this->mDemoMode = 6; + i_this->mDemoTimer = 0; + i_this->mCamFovy = 55.0f; + player_camera->mCamera.SetTrimSize(3); + mDoMtx_YrotS(*calc_mtx, player->shape_angle.y); + vec1.x = 200.0f; + vec1.y = 100.0f; + vec1.z = -300.0f; + MtxPosition(&vec1, &i_this->mCamEye); + i_this->mCamEye += player->current.pos; + // fallthrough + + case 6: + vec4 = i_this->current.pos; + vec4.y += 100.0f; + if (i_this->mDemoTimer == 0) { + i_this->mCamCenter = vec4; + } else { + cLib_addCalc2(&i_this->mCamCenter.x, vec4.x, 0.2f, 50.0f); + cLib_addCalc2(&i_this->mCamCenter.y, vec4.y, 0.2f, 50.0f); + cLib_addCalc2(&i_this->mCamCenter.z, vec4.z, 0.2f, 50.0f); + } + mDoMtx_YrotS(*calc_mtx, player->shape_angle.y); + vec1.x = 200.0f; + vec1.y = 100.0f; + vec1.z = -300.0f; + MtxPosition(&vec1, &vec3); + vec3 += player->current.pos; + cLib_addCalc2(&i_this->mCamEye.x, vec3.x, 0.1f, 50.0f); + cLib_addCalc2(&i_this->mCamEye.y, vec3.y, 0.1f, 50.0f); + cLib_addCalc2(&i_this->mCamEye.z, vec3.z, 0.1f, 50.0f); + if (i_this->mDemoTimer == 170) { + cVar13 = 1; + player_camera->mCamera.Reset(i_this->mCamCenter, i_this->mCamEye); + dComIfGs_offOneZoneSwitch(1, -1); + } + break; + + case 10: + if (!i_this->eventInfo.i_checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(i_this, 2, 0xffff, 0); + i_this->eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + return; + } + player_camera->mCamera.Stop(); + i_this->mDemoMode = 11; + i_this->mDemoTimer = 0; + i_this->mCamFovy = 55.0f; + player_camera->mCamera.SetTrimSize(3); + daPy_getPlayerActorClass()->changeOriginalDemo(); + daPy_getPlayerActorClass()->changeDemoMode(0x17, 0, 0, 0); + i_this->mCamDist = 300.0f; + dComIfGp_getEvent().startCheckSkipEdge(i_this); + i_this->mTargetAngleY = i_this->mPlayerAngle; + i_this->current.angle.y = -0x3384; + i_this->shape_angle.y = i_this->current.angle.y; + i_this->current.pos = i_this->home.pos; + // fallthrough + + case 11: + vec2.set(-102687.0f, -23441.5f, 38942.0f); + player->setPlayerPosAndAngle(&vec2, -0x7384, 0); + if (i_this->mDemoTimer >= 1) { + i_this->mCamCenter.set(-102677.0f, -23375.0f, 38866.0f); + i_this->mCamEye.set(-102392.0f, -23393.0f, 39031.0f); + } + if (i_this->mDemoTimer != 85) { + break; + } + i_this->mDemoMode = 12; + i_this->mDemoTimer = 0; + // fallthrough + + case 12: + vec2.set(-102520.0f, -23416.0f, 38021.0f); + player->setPlayerPosAndAngle(&vec2, -0x3b5d, 0); + mDoMtx_YrotS(*calc_mtx, i_this->shape_angle.y); + vec1.x = -50.0f; + vec1.y = 80.0f; + vec1.z = i_this->mCamDist; + MtxPosition(&vec1, &i_this->mCamEye); + i_this->mCamEye += i_this->current.pos; + // fallthrough + + case 13: + vec4 = i_this->current.pos; + vec4.y += 100.0f; + if (i_this->mDemoTimer == 0) { + i_this->mCamCenter = vec4; + } else { + cLib_addCalc2(&i_this->mCamCenter.x, vec4.x, 0.2f, 50.0f); + cLib_addCalc2(&i_this->mCamCenter.y, vec4.y, 0.2f, 50.0f); + cLib_addCalc2(&i_this->mCamCenter.z, vec4.z, 0.2f, 50.0f); + } + if (i_this->mDemoTimer >= 20) { + cLib_addCalc2(&i_this->mCamDist, 420.0f, 0.2f, i_this->mCamSpeed); + cLib_addCalc2(&i_this->mCamSpeed, 5.0f, 1.0f, 0.1f); + } + break; + + case 14: + i_this->mCamCenter = i_this->current.pos; + i_this->mCamCenter.y += 100.0f; + mDoMtx_YrotS(*calc_mtx, i_this->shape_angle.y); + vec1.x = 170.0f; + vec1.y = 160.0f; + vec1.z = 300.0f; + MtxPosition(&vec1, &i_this->mCamEye); + i_this->mCamEye += i_this->current.pos; + break; + + case 15: + cLib_addCalc2(&i_this->mCamFovy, 80.0f, 0.03f, 0.3f); + mDoMtx_YrotS(*calc_mtx, i_this->shape_angle.y); + vec1.x = -30.0f; + vec1.y = 210.0f; + vec1.z = 200.0f; + MtxPosition(&vec1, &i_this->mCamEye); + i_this->mCamEye += i_this->current.pos; + i_this->mCamSpeed = 0.0f; + break; + + case 16: + i_this->mCamFovy = 70.0f; + mDoMtx_YrotS(*calc_mtx, kargarok->current.angle.y); + mDoMtx_XrotM(*calc_mtx, kargarok->current.angle.x); + vec1.x = 0.0f; + vec1.y = 0.0f; + vec1.z = 500.0f; + MtxPosition(&vec1, &i_this->mCamCenter); + i_this->mCamCenter += kargarok->current.pos; + i_this->mCamEye = kargarok->current.pos; + if (i_this->mDemoTimer == 80) { + kargarok->mMode = 3; + i_this->mCamBankPhase = 80; + } + if (i_this->mDemoTimer >= 80) { + cLib_addCalc2(&i_this->mCamBank, 3000.0f, 1.0f, 20.0f); + } + break; + + case 17: + i_this->mCamFovy = 55.0f; + if (i_this->mDemoTimer >= 1) { + kargarok->mNoDrawFlag = false; + i_this->mCamBank = 0.0f; + i_this->mCamCenter = i_this->current.pos + + (kargarok->current.pos - i_this->current.pos) * 0.5f; + i_this->mCamCenter.y += 50.0f; + mDoMtx_YrotS(*calc_mtx, i_this->shape_angle.y); + vec1.x = 170.0f; + vec1.y = 160.0f; + vec1.z = 400.0f; + MtxPosition(&vec1, &i_this->mCamEye); + i_this->mCamEye += i_this->current.pos; + } + break; + + case 18: + i_this->mCamCenter = i_this->current.pos + + (kargarok->current.pos - i_this->current.pos) * 0.5f; + i_this->mCamCenter.y += 50.0f; + i_this->mCamSpeed = 0.0f; + break; + + case 19: + i_this->mCamCenter = i_this->current.pos + + (kargarok->current.pos - i_this->current.pos) * 0.5f; + i_this->mCamCenter.y += 50.0f; + if (i_this->mDemoTimer > 30) { + mDoMtx_YrotS(*calc_mtx, kargarok->shape_angle.y); + vec1.x = 200.0f; + vec1.y = -350.0f; + vec1.z = 1050.0f; + MtxPosition(&vec1, &vec3); + vec3 += kargarok->current.pos; + cLib_addCalc2(&i_this->mCamEye.x, vec3.x, 0.1f, i_this->mCamSpeed * 10.0f); + cLib_addCalc2(&i_this->mCamEye.y, vec3.y, 0.1f, i_this->mCamSpeed * 10.0f); + cLib_addCalc2(&i_this->mCamEye.z, vec3.z, 0.1f, i_this->mCamSpeed * 10.0f); + cLib_addCalc2(&i_this->mCamSpeed, 1.0f, 1.0f, 0.02f); + } + if (i_this->mDemoTimer == 150) { + i_this->mAction = ACT_YC_RIDE; + i_this->mMode = 0; + kargarok->mAction = e_yc_class::ACT_HOVERING; + kargarok->mMode = 0; + kargarok->home.pos = kargarok->current.pos; + kargarok->mFlyAnmMode = 1; + cVar13 = 1; + player_camera->mCamera.Reset(i_this->mCamCenter, i_this->mCamEye); + dComIfGs_onOneZoneSwitch(1, -1); + } + break; + + case 20: + if (!i_this->eventInfo.i_checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(i_this, 2, 0xffff, 0); + i_this->eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + return; + } + player_camera->mCamera.Stop(); + i_this->mDemoMode = 21; + i_this->mDemoTimer = 0; + i_this->mCamFovy = 55.0f; + player_camera->mCamera.SetTrimSize(3); + i_this->mCamCenter.set(-93806.0f, -5894.0f, 42791.0f); + i_this->mCamEye.set(-93532.0f, -5824.0f, 43075.0f); + daPy_getPlayerActorClass()->changeOriginalDemo(); + daPy_getPlayerActorClass()->changeDemoMode(4, 0, 0, 0); + Z2GetAudioMgr()->bgmStop(70, 0); + dComIfGp_getEvent().offFlag2(8); + dComIfGs_offTmpBit(dSv_event_tmp_flag_c::tempBitLabels[11]); + // fallthrough + + case 21: + vec2.set(-93705.0f, -5951.0f, 42867.0f); + player->setPlayerPosAndAngle(&vec2, 0, 0); + if (i_this->mDemoTimer >= 30) { + if (i_this->mDemoTimer == 30) { + i_this->mMsgFlow.init(i_this, 0x7d1, 0, NULL); + } + if (i_this->mDemoTimer == 50) { + dComIfGp_getEvent().startCheckSkipEdge(i_this); + } + if (i_this->mDemoTimer == 55) { + daPy_getPlayerActorClass()->changeDemoMode(1, 4, 0, 0); + } + if (i_this->mDemoTimer == 130) { + daPy_getPlayerActorClass()->changeDemoMode(0x35, 0, 0, 0); + } + if (i_this->mMsgFlow.doFlow(i_this, NULL, 0)) { + if (i_this->mDemoTimer < 130) { + daPy_getPlayerActorClass()->changeDemoMode(0x35, 0, 0, 0); + } + i_this->mDemoMode = 22; + i_this->mDemoTimer = 0; + Z2GetAudioMgr()->bgmStart(Z2BGM_BRIDGE_ON_FIRE, 0, 0); + } + } + break; + + case 22: + if (i_this->mDemoTimer == 50) { + daPy_getPlayerActorClass()->changeDemoMode(0x17, 0, 0, 0); + } + if (i_this->mDemoTimer >= 70) { + if (i_this->mDemoTimer == 70) { + i_this->mCamCenter.set(-93860.0f, -5786.0f, 42701.0f); + i_this->mCamEye.set(-93644.0f, -5908.0f, 43016.0f); + } + if (i_this->mDemoTimer >= 80) { + cLib_addCalc2(&i_this->mCamFovy, 40.0f, 0.5f, 5.0f); + } + } + if (i_this->mDemoTimer == 110) { + i_this->mCamCenter.set(-93614.0f, -5879.0f, 43003.0f); + i_this->mCamEye.set(-93593.0f, -5871.0f, 42603.0f); + i_this->mCamFovy = 55.0f; + i_this->mDemoMode = 23; + i_this->mDemoTimer = 0; + } + break; + + case 23: + if (i_this->mDemoTimer == 10) { + i_this->mMode = 3; + i_this->speed.y = 35.0f; + } + if (i_this->mDemoTimer == 40) { + i_this->mCamCenterTarget.set(-93660.0f, -5873.0f, 49831.0f); + i_this->mCamEyeTarget.set(-93551.0f, -5926.0f, 49449.0f); + i_this->mCamEyeSpeed.x = fabsf(i_this->mCamEyeTarget.x - i_this->mCamEye.x); + i_this->mCamEyeSpeed.y = fabsf(i_this->mCamEyeTarget.y - i_this->mCamEye.y); + i_this->mCamEyeSpeed.z = fabsf(i_this->mCamEyeTarget.z - i_this->mCamEye.z); + i_this->mCamCenterSpeed.x = fabsf(i_this->mCamCenterTarget.x - i_this->mCamCenter.x); + i_this->mCamCenterSpeed.y = fabsf(i_this->mCamCenterTarget.y - i_this->mCamCenter.y); + i_this->mCamCenterSpeed.z = fabsf(i_this->mCamCenterTarget.z - i_this->mCamCenter.z); + i_this->mCamSpeed = 0.0f; + i_this->mDemoMode = 24; + i_this->mDemoTimer = 0; + } + break; + + case 24: + i_this->mCamSpeed = 0.05f; + cam_3d_morf(i_this, 0.5f); + if (i_this->mDemoTimer == 50) { + i_this->mMode = 4; + } + if (i_this->mDemoTimer != 135) { + break; + } + i_this->mDemoMode = 25; + i_this->mDemoTimer = 0; + // fallthrough + + case 25: + i_this->mCamEye.set(-92666.0f, -5540.0f, 43878.0f); + cVar12 = 1; + if (i_this->mDemoTimer != 100) { + break; + } + i_this->mDemoMode = 26; + i_this->mDemoTimer = 0; + vec2.set(-93666.0f, -5951.0f, 39000.0f); + player->setPlayerPosAndAngle(&vec2, 0, 0); + // fallthrough + + case 26: + i_this->mCamEye.set(-93539.0f, -5857.0f, 30480.0f); + if (i_this->mDemoTimer >= 115) { + i_this->mDemoMode = 27; + i_this->mDemoTimer = 0; + i_this->mCamEyeSpeed.y = 0.0f; + i_this->mCamEyeSpeed.x = 0.0f; + i_this->mCamSpeed = 0.0f; + } else { + cVar12 = 2; + } + break; + + case 27: + cVar12 = 3; + cLib_addCalc2(&i_this->mCamEye.y, -4469.0f, 0.05f, i_this->mCamEyeSpeed.y); + cLib_addCalc2(&i_this->mCamEyeSpeed.y, 50.0f, 1.0f, 0.5f); + cLib_addCalc2(&i_this->mCamEye.x, -92006.0f, 0.05f, i_this->mCamEyeSpeed.x); + cLib_addCalc2(&i_this->mCamEyeSpeed.x, 50.0f, 1.0f, 0.5f); + if (i_this->mDemoTimer != 115) { + break; + } + i_this->mDemoMode = 28; + i_this->mDemoTimer = 0; + i_this->mMode = 4; + i_this->mCamDist = 0.0f; + ((e_arrow_class*)fopAcM_SearchByName(PROC_E_ARROW))->field_0xa00.z = 30000.0f; + cVar12 = 0; + // fallthrough + + case 28: + i_this->mCamCenter.set(-93660.0f, -5873.0f, 49831.0f); + i_this->mCamEye.set(-93551.0f, -5926.0f, 49449.0f); + if (i_this->mDemoTimer == 80) { + i_this->mDemoMode = 29; + i_this->mDemoTimer = 0; + } + break; + + case 29: + i_this->mCamCenter.set(-92787.0f, -5256.0f, 46550.0f); + i_this->mCamEye.set(-92609.0f, -5139.0f, 46210.0f); + if (i_this->mDemoTimer == 115) { + i_this->mDemoMode = 30; + i_this->mDemoTimer = 0; + i_this->field_0x13d4 = -0x2000; + } + break; + + case 30: + mDoMtx_YrotS(*calc_mtx, i_this->field_0x13d4); + vec1.x = 0.0f; + vec1.y = 150.0f; + vec1.z = 400.0f; + MtxPosition(&vec1, &i_this->mCamEye); + i_this->mCamEye += player->current.pos; + i_this->mCamCenter = player->current.pos; + i_this->mCamCenter.y += 100.0f; + i_this->field_0x13d4 += 230; + if (i_this->mDemoTimer >= 30) { + if (i_this->mDemoTimer == 30) { + i_this->mMsgFlow.init(i_this, 0x7d1, 0, NULL); + } + if (i_this->mMsgFlow.doFlow(i_this, NULL, 0)) { + cVar13 = 1; + } + if (i_this->mDemoTimer >= 40 && !dMsgObject_isTalkNowCheck()) { + cVar13 = 1; + } + } + break; + + case 100: + cVar13 = 1; + break; + } + + if (cVar12 != 0) { + e_arrow_class* arrow = (e_arrow_class*)fopAcM_SearchByName(PROC_E_ARROW); + if (arrow != NULL) { + if (cVar12 == 3) { + vec4 = arrow->field_0xa00; + } else { + vec4 = arrow->current.pos; + } + f32 scale; + if (cVar12 == 1) { + vec4.y -= 300.0f; + scale = 0.2f; + } else { + scale = 0.5f; + } + if (i_this->mDemoTimer == 0) { + i_this->mCamCenter = vec4; + } else { + cLib_addCalc2(&i_this->mCamCenter.x, vec4.x, scale, 200.0f); + cLib_addCalc2(&i_this->mCamCenter.y, vec4.y, scale, 200.0f); + cLib_addCalc2(&i_this->mCamCenter.z, vec4.z, scale, 200.0f); + } + } + } + + if (i_this->mDemoMode >= 11 && i_this->mDemoMode < 20) { + if (dComIfGp_getEvent().checkSkipEdge()) { + i_this->current.pos.set(-103242.0f, -22894.0f, 38097.0f); + i_this->current.angle.y = 0x44a3; + kargarok->current.pos.set(-103242.0f, -22894.0f, 38097.0f); + kargarok->current.angle.y = 0x44a3; + i_this->mAction = ACT_YC_RIDE; + i_this->mMode = 0; + kargarok->mAction = e_yc_class::ACT_HOVERING; + kargarok->mMode = 0; + kargarok->mNoDrawFlag = false; + kargarok->speedF = 0.0f; + cVar13 = 1; + dComIfGs_onOneZoneSwitch(1, -1); + Z2GetAudioMgr()->setBattleBgmOff(false); + } + } else if (i_this->mDemoMode >= 20 && i_this->mDemoMode < 29) { + if (dComIfGp_getEvent().checkSkipEdge()) { + cVar13 = 2; + vec2.set(-93666.0f, -5951.0f, 39000.0f); + player->setPlayerPosAndAngle(&vec2, 0, 0); + fpcM_Search(s_adel_sub, i_this); + i_this->mMode = 2; + anm_init(i_this, ANM_WAIT01, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); + csXyz angle(0, 0x4000, 0); + vec2.set(-93652.0f, -5875.0f, 46674.0f); + fopAcM_createChild(PROC_E_ARROW, fopAcM_GetID(i_this), 0x80000011, &vec2, + fopAcM_GetRoomNo(i_this), &angle, NULL, -1, NULL); + vec2.set(-93659.0f, -5875.0f, 32500.0f); + fopAcM_createChild(PROC_E_ARROW, fopAcM_GetID(i_this), 0x80000011, &vec2, + fopAcM_GetRoomNo(i_this), &angle, NULL, -1, NULL); + Z2GetAudioMgr()->bgmStop(30, 0); + mDoGph_gInf_c::fadeOut(1.0f, g_blackColor); + i_this->mFadeTimer = 30; + } + } + + if (cVar13 != 0) { + if (cVar13 == 2) { + mDoMtx_YrotS(*calc_mtx, player->shape_angle.y); + vec1.x = 0.0f; + vec1.y = 200.0f; + vec1.z = -250.0f; + MtxPosition(&vec1, &i_this->mCamEye); + i_this->mCamEye += player->current.pos; + i_this->mCamCenter = player->current.pos; + i_this->mCamCenter.y += 120.0f; + player_camera->mCamera.Reset(i_this->mCamCenter, i_this->mCamEye, i_this->mCamFovy, 0); + } + player_camera->mCamera.Start(); + player_camera->mCamera.SetTrimSize(0); + dComIfGp_event_reset(); + daPy_getPlayerActorClass()->cancelOriginalDemo(); + i_this->mDemoMode = 0; + } + + if (i_this->mDemoMode > 0) { + s16 bank = -i_this->mCamBank * cM_scos(i_this->mCamBankPhase * 600); + player_camera->mCamera.Set(i_this->mCamCenter, i_this->mCamEye, bank, i_this->mCamFovy); + i_this->mDemoTimer++; + i_this->mCamBankPhase++; + } +} + +/* 8077AA1C-8077AA24 0001F4 0004+04 0/2 0/0 0/0 .bss c_start */ +static BOOL c_start; +static s8 data_8077aa20; + +/* 80777330-8077892C 00B650 15FC+00 2/1 0/0 0/0 .text daE_RDY_Execute__FP11e_rdy_class */ +// NONMATCHING regalloc, float multiplication order +static int daE_RDY_Execute(e_rdy_class* i_this) { + if (!c_start && dComIfGp_event_runCheck()) { + if (fopAcM_getTalkEventPartner(daPy_getLinkPlayerActorClass()) + == daPy_py_c::getMidnaActor() + || daPy_getPlayerActorClass()->eventInfo.i_checkCommandDoor()) + { + return 1; + } + } + + if (i_this->field_0x5b8 == 12 && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[239])) { + fopAcM_OffStatus(i_this, 0); + i_this->attention_info.flags = 0; + return 1; + } + + if (i_this->mKargarokDeleteTimer != 0) { + i_this->mKargarokDeleteTimer--; + if (i_this->mKargarokDeleteTimer == 0) { + daKago_c* kago = (daKago_c*)fopAcM_SearchByName(PROC_KAGO); + kago->setEvent2(); + fopAcM_delete(i_this); + fopAc_ac_c* kargarok = fopAcM_SearchByID(i_this->mKargarokID); + fopAcM_delete(kargarok); + } + return 1; + } + + if (i_this->mFadeTimer != 0) { + i_this->mFadeTimer--; + if (i_this->mFadeTimer == 20) { + mDoGph_gInf_c::fadeIn(0.05f, g_blackColor); + } + if (i_this->mFadeTimer == 0) { + Z2GetAudioMgr()->bgmStart(Z2BGM_EVENT02, 0, 0); + } + } + + cXyz vec1, vec2, vec3; + + if (S_find != 0) { + S_find--; + } + i_this->mCounter++; + i_this->mDrawEyeModel = l_HIO.mDrawEyeModel; + for (int i = 0; i < 4; i++) { + if (i_this->mTimer[i] != 0) { + i_this->mTimer[i]--; + } + } + if (i_this->mIFrameTimer != 0) { + i_this->mIFrameTimer--; + } + if (i_this->field_0xbc0 != 0) { + i_this->field_0xbc0--; + } + if (i_this->field_0xa6c != 0) { + i_this->field_0xa6c--; + } + if (i_this->field_0xa6e != 0) { + i_this->field_0xa6e--; + } + + if (fopAcM_otoCheck(i_this, 1000.0f) || daPy_getPlayerActorClass()->checkWolfBark()) { + i_this->field_0xa71 = cM_rndF(10.0f) + 10.0f; + } + if (i_this->field_0xa71 != 0) { + i_this->field_0xa71--; + } + + i_this->mHasArrow = false; + i_this->mCollisionEnabled = true; + + action(i_this); + + if (i_this->mRideState != 0) { + i_this->mCollisionEnabled = false; + } + + if (i_this->mRideState != 2 && i_this->field_0xbc0 == 0) { + vec2.set(0.0f, 0.0f, 0.0f); + if (i_this->field_0xabc) { + mDoMtx_YrotS(*calc_mtx, i_this->field_0xadc.y); + vec1.x = 0.0f; + vec1.y = 0.0f; + vec1.z = i_this->field_0xbbc; + MtxPosition(&vec1, &vec2); + cLib_addCalc2(&i_this->field_0xbbc, i_this->field_0xabc * 2.0f, 1.0f, 5.0f); + } else { + cLib_addCalc0(&i_this->field_0xbbc, 1.0f, 5.0f); + } + if (i_this->mAnm == ANM_DIEB && i_this->field_0xadc.x != 0 && !i_this->mIsUpsideDown) { + vec2.y += -20.0f; + } + i_this->current.pos += vec2; + i_this->old.pos += vec2; + i_this->mAcch.CrrPos(dComIfG_Bgsp()); + i_this->current.pos -= vec2; + i_this->old.pos -= vec2; + i_this->mInWater = false; + if (i_this->mAcch.GetGroundH() != -1.0e9f && i_this->mAcch.ChkWaterHit() + && i_this->mAcch.m_wtr.GetHeight() > i_this->current.pos.y) + { + i_this->mInWater = true; + } + } + + mDoMtx_stack_c::transS(i_this->current.pos.x, i_this->current.pos.y + i_this->mJumpHeight, + i_this->current.pos.z); + mDoMtx_stack_c::XrotM(i_this->field_0xae2.x); + mDoMtx_stack_c::ZrotM(i_this->field_0xae2.z); + mDoMtx_stack_c::YrotM(i_this->field_0xadc.y); + mDoMtx_stack_c::XrotM(i_this->field_0xadc.x); + mDoMtx_stack_c::YrotM(-i_this->field_0xadc.y); + mDoMtx_stack_c::YrotM(i_this->shape_angle.y); + mDoMtx_stack_c::XrotM(i_this->shape_angle.x); + mDoMtx_stack_c::ZrotM(i_this->shape_angle.z); + f32 scale = l_HIO.mScale * i_this->scale.x; + mDoMtx_stack_c::scaleM(scale, scale, scale); + J3DModel* model = i_this->mpMorf->getModel(); + model->setBaseTRMtx(mDoMtx_stack_c::get()); + + i_this->mpMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + int frame = i_this->mpMorf->getFrame(); + if (i_this->mAnm == ANM_RUN && (frame == 1 || frame == 10)) { + i_this->mSound.startCreatureVoice(Z2SE_EN_RD_V_RUNNING_BREATH, -1); + } + if (i_this->mAnm == ANM_KYORO2 && (frame == 5 || frame == 26)) { + i_this->mSound.startCreatureVoice(Z2SE_EN_RD_V_RUNNING_BREATH, -1); + } + if ((i_this->mAnm == ANM_SHOOT_READY && frame == 10) + || (i_this->mAnm == ANM_RSHOOT_READY && frame == 5) + || (i_this->mAnm == ANM_ARMAMENT && frame == 10)) + { + i_this->mSound.startCreatureVoice(Z2SE_EN_RD_V_READY_WEAPON, -1); + } + if ((i_this->mAnm == ANM_WALK + && (i_this->mpMorf->checkFrame(1.0f) || i_this->mpMorf->checkFrame(15.0f))) + || ((i_this->mAnm == ANM_RUN || i_this->mAnm == ANM_RUN02) + && (i_this->mpMorf->checkFrame(1.0f) || i_this->mpMorf->checkFrame(7.0f)))) + { + if (i_this->mInWater) { + i_this->mSound.startCreatureSound(Z2SE_RIDER_FOOTNOTE_WATER, 0, -1); + } else { + i_this->mSound.startCreatureSound(Z2SE_RIDER_FOOTNOTE, 0, -1); + } + } + + i_this->mpMorf->modelCalc(); + + if (dComIfGp_checkPlayerStatus0(0, 0x200000)) { + i_this->mDrawEyeModel = false; + } + + static f32 time_scale[25] = { + 1.2f, 1.2f, 1.1f, 1.0f, 0.8f, 0.6f, 0.4f, 0.2f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 0.2f, 0.5f, 0.8f, 1.2f, 1.2f, 1.2f, 1.2f, + }; + + if (i_this->mDrawEyeModel) { + J3DModel* model = i_this->mpMorf->getModel(); + cLib_addCalc2(&i_this->mEyeScale, i_this->mTargetEyeScale, 1.0f, 0.02f); + i_this->mTargetEyeScale = 1.0f; + MTXCopy(model->getAnmMtx(JNT_HEAD), *calc_mtx); + camera_class* camera = dComIfGp_getCamera(0); + s16 ang_y, ang_x; + f32 scale; + for (int i = 0; i < 2; i++) { + MtxPush(); + if (i == 0) { + vec1.set(38.0f, 0.0f, 0.0f); + MtxPosition(&vec1, &vec2); + vec1 = camera->lookat.eye - vec2; + ang_y = cM_atan2s(vec1.x, vec1.z); + ang_x = -cM_atan2s(vec1.y, JMAFastSqrt(vec1.x * vec1.x + vec1.z * vec1.z)); + scale = vec1.abs() * 0.001f; + if (scale > 2.0f) { + scale = 2.0f; + } + scale *= i_this->mEyeScale + * time_scale[(int)(dKy_getEnvlight()->daytime / 15.0f)]; + vec1.set(38.0f, 0.0f, 6.0f); + } else { + vec1.set(38.0f, 0.0f, -6.0f); + } + MtxPosition(&vec1, &vec2); + MtxTrans(vec2.x, vec2.y, vec2.z, 0); + mDoMtx_YrotM(*calc_mtx, ang_y); + mDoMtx_XrotM(*calc_mtx, ang_x); + MtxScale(scale, scale, scale, 1); + i_this->mpEyeModel[i]->setBaseTRMtx(*calc_mtx); + MtxPull(); + } + } + + MTXCopy(model->getAnmMtx(JNT_MUNE2), *calc_mtx); + vec1.set(0.0f, 0.0f, 0.0f); + MtxPosition(&vec1, &vec2); + vec1.set(0.0f, 100.0f, 0.0f); + MtxPosition(&vec1, &vec3); + if (vec2.y < vec3.y) { + i_this->mIsUpsideDown = false; + } else { + i_this->mIsUpsideDown = true; + } + + cXyz cc_offset(0.0f, 0.0f, 0.0f); + if (i_this->mIFrameTimer != 0) { + cc_offset.set(-20000.0f, 200000.0f, 30000.0f); + } + + MTXCopy(model->getAnmMtx(JNT_HEAD), *calc_mtx); + vec1.set(20.0f, 0.0f, 0.0f); + MtxPosition(&vec1, &i_this->eyePos); + + if (daPy_py_c::i_checkNowWolf()) { + cc_offset.y += 30.0f; + i_this->mCcSph[0].SetC(i_this->eyePos + cc_offset); + i_this->mCcSph[0].SetR(50.0f); + } else { + i_this->mCcSph[0].SetC(i_this->eyePos + cc_offset); + i_this->mCcSph[0].SetR(35.0f); + } + + i_this->attention_info.position = i_this->eyePos; + i_this->attention_info.position.y += 30.0f; + + vec1.set(0.0f, 0.0f, 0.0f); + MTXCopy(model->getAnmMtx(JNT_KUBI), *calc_mtx); + MtxPosition(&vec1, &vec2); + i_this->mCcSph[2].SetC(vec2 + cc_offset); + i_this->mCcSph[2].SetR(35.0f); + + vec1.set(-10.0f, 0.0f, 0.0f); + MTXCopy(model->getAnmMtx(JNT_MUNE1), *calc_mtx); + MtxPosition(&vec1, &vec2); + i_this->mCcSph[1].SetC(vec2 + cc_offset); + i_this->mCcSph[1].SetR(35.0f); + + for (int i = 0; i <= 2; i++) { + if (i_this->mCollisionEnabled) { + i_this->mCcSph[i].OnCoSetBit(); + } else { + i_this->mCcSph[i].OffCoSetBit(); + } + dComIfG_Ccsp()->Set(&i_this->mCcSph[i]); + i_this->mCcSph[i].OffTgNoHitMark(); + } + + if (i_this->field_0xa7b == 2) { + MTXCopy(i_this->mpMorf->getModel()->getAnmMtx(JNT_MUNE2), *calc_mtx); + vec1.set(0.0f, 0.0f, 0.0f); + MtxPosition(&vec1, &vec2); + i_this->mAtSph.SetR(l_HIO.mScale * 50.0f); + i_this->mAtSph.SetC(vec2); + dComIfG_Ccsp()->Set(&i_this->mAtSph); + i_this->field_0xa7b = 0; + } + + if (i_this->mWeaponType == WEAPON_CLUB) { + if (!i_this->field_0x5bb) { + MTXCopy(i_this->mpMorf->getModel()->getAnmMtx(JNT_HAND_R), *calc_mtx); + } else { + MTXCopy(i_this->mpMorf->getModel()->getAnmMtx(JNT_MUNE2), *calc_mtx); + mDoMtx_YrotM(*calc_mtx, 6000); + mDoMtx_XrotM(*calc_mtx, 10000); + mDoMtx_ZrotM(*calc_mtx, 18000); + MtxTrans(-30.0f, -50.0f, 20.0f, 1); + } + i_this->mpWeaponModel->setBaseTRMtx(*calc_mtx); + + if (i_this->field_0xa7b != 0) { + vec1.set(0.0f, 30.0f, 0.0f); + MtxPosition(&vec1, &vec2); + i_this->mAtSph.SetR(l_HIO.mScale * 50.0f); + if (!i_this->field_0xa7c) { + i_this->field_0xa7c = true; + i_this->mAtSph.StartCAt(vec2); + } else { + i_this->mAtSph.MoveCAt(vec2); + } + i_this->field_0xa7b = 0; + } else { + cXyz at_center(-200000.0f, -200000.0f, -200000.0f); + i_this->mAtSph.SetC(at_center); + i_this->mAtSph.SetR(-200.0f); + i_this->field_0xa7c = false; + } + dComIfG_Ccsp()->Set(&i_this->mAtSph); + } + + if (i_this->mWeaponType >= WEAPON_BOW) { + if (i_this->mBowRotationTimer != 0) { + i_this->mBowRotationTimer--; + } + i_this->mBowRotation = i_this->mBowRotationTimer + * cM_ssin(i_this->mBowRotationTimer * 0x7800) * 100.0f; + + J3DModel* bow_model = i_this->mpBowMorf->getModel(); + if (!i_this->field_0x5bb) { + bow_model->setBaseTRMtx(i_this->mpMorf->getModel()->getAnmMtx(JNT_HAND_L)); + } else { + MTXCopy(i_this->mpMorf->getModel()->getAnmMtx(JNT_MUNE2), *calc_mtx); + mDoMtx_YrotM(*calc_mtx, 6000); + mDoMtx_XrotM(*calc_mtx, 10000); + mDoMtx_ZrotM(*calc_mtx, 18000); + MtxTrans(-20.0f, -20.0f, 30.0f, 1); + bow_model->setBaseTRMtx(*calc_mtx); + } + i_this->mpBowMorf->play(0, 0); + i_this->mpBowMorf->modelCalc(); + + if (i_this->mHasArrow) { + MTXCopy(i_this->mpMorf->getModel()->getAnmMtx(JNT_HAND_R), *calc_mtx); + i_this->mpWeaponModel->setBaseTRMtx(*calc_mtx); + if (i_this->mWeaponType >= WEAPON_BOW_FIRE) { + if (i_this->mRideState != 2 || i_this->mTimer[1] <= 18) { + fire_eff_set(i_this); + } + } else { + i_this->field_0x134c.set(-200000.0f, -200000.0f, -200000.0f); + } + } + + if (i_this->mArrowFired) { + if (i_this->mWeaponType == WEAPON_BOW_FIRE) { + i_this->mSound.startCreatureSound(Z2SE_OBJ_ARROW_SHOT_FIRE, 0, -1); + } else { + i_this->mSound.startCreatureSound(Z2SE_OBJ_ARROW_SHOT_NORMAL, 0, -1); + } + i_this->mSound.startCreatureVoice(Z2SE_EN_RD_V_SHOT_ARROW, -1); + vec1.set(0.0f, 0.0f, 0.0f); + MTXCopy(i_this->mpMorf->getModel()->getAnmMtx(JNT_HAND_R), *calc_mtx); + MtxPosition(&vec1, &vec2); + csXyz arrow_angle; + if (i_this->mpPath != NULL || i_this->mAction == ACT_BOW_IKKI2) { + vec1 = i_this->mArrowTarget - vec2; + arrow_angle.y = cM_atan2s(vec1.x, vec1.z); + arrow_angle.x = -cM_atan2s(vec1.y, JMAFastSqrt(vec1.x * vec1.x + vec1.z * vec1.z)); + } else { + fopAc_ac_c* player = dComIfGp_getPlayer(0); + vec1 = player->eyePos; + if (i_this->field_0x1366) { + vec1.x += player->speed.x * 15.0f; + vec1.z += player->speed.z * 15.0f; + } + vec1 -= vec2; + vec1.y -= 30.0f; + arrow_angle.y = cM_atan2s(vec1.x, vec1.z); + arrow_angle.x = -cM_atan2s(vec1.y, JMAFastSqrt(vec1.x * vec1.x + vec1.z * vec1.z)); + if (strcmp(dComIfGp_getStartStageName(), "F_SP121") && !i_this->field_0x1366) { + // Not Hyrule Field + arrow_angle.x += (s16)(cM_rndFX(200.0f) + -500.0f); + arrow_angle.y += (s16)cM_rndFX(100.0f); + } + } + arrow_angle.z = 0; + u32 params = 0x80000000; + if (i_this->mWeaponType == WEAPON_BOW_FIRE) { + params |= 1; + } else if (i_this->mWeaponType == WEAPON_BOW_BOMB) { + params |= 2; + } + if (i_this->field_0x5b8 == 11) { + params |= 0x10; + } + fopAcM_createChild(PROC_E_ARROW, fopAcM_GetID(i_this), params, &vec2, + fopAcM_GetRoomNo(i_this), &arrow_angle, NULL, -1, NULL); + i_this->mArrowFired = false; + i_this->mBowRotationTimer = 15; + } + } + + if (i_this->mIsHoldingGrass) { + s16 ang_y = 0; + if (i_this->mTimer[2] != 0) { + int tmp = i_this->mTimer[2] * 10; + if (tmp > 400) { + tmp = 400; + } + ang_y = (i_this->mCounter & 1) * tmp * 2 - tmp; + } + MTXCopy(i_this->mpMorf->getModel()->getAnmMtx(JNT_HAND_R), *calc_mtx); + MtxTrans(20.0f, 5.0f, -10.0f, 1); + mDoMtx_XrotM(*calc_mtx, 0x8000); + mDoMtx_YrotM(*calc_mtx, ang_y + -0x15cd); + mDoMtx_ZrotM(*calc_mtx, 0x28cd); + i_this->mpHawkGrassModel->setBaseTRMtx(*calc_mtx); + } + + if (i_this->mIsDying) { + cLib_addCalc2(&i_this->mDyingTevColor, -20.0f, 1.0f, 0.4f); + } + + if (i_this->mRideState == 0) { + fopAc_ac_c* player = dComIfGp_getPlayer(0); + mDoMtx_stack_c::copy(i_this->mpMorf->getModel()->getAnmMtx(JNT_MUNE2)); + mDoMtx_stack_c::multVecZero(&vec2); + vec1 = player->current.pos - vec2; + mDoMtx_YrotS(*calc_mtx, cM_atan2s(vec1.x, vec1.z)); + vec1.set(0.0f, 0.0f, 10.0f); + MtxPosition(&vec1, &vec3); + vec3 += vec2; + i_this->setDownPos(&vec3); + } + + cXyz lock_pos = i_this->eyePos; + lock_pos.y += 130.0f; + i_this->setHeadLockPos(&lock_pos); + + demo_camera(i_this); + return 1; +} + +/* 8077892C-80778934 00CC4C 0008+00 1/0 0/0 0/0 .text daE_RDY_IsDelete__FP11e_rdy_class + */ +static int daE_RDY_IsDelete(e_rdy_class* i_this) { + return 1; +} + +/* 80778934-80778998 00CC54 0064+00 1/0 0/0 0/0 .text daE_RDY_Delete__FP11e_rdy_class */ +static int daE_RDY_Delete(e_rdy_class* i_this) { + dComIfG_resDelete(&i_this->mPhase, i_this->mpArcName); + + if (i_this->mHIOInit) { + hioInit = false; + } + + if (i_this->heap != NULL) { + i_this->mpMorf->stopZelAnime(); + } + + return 1; +} /* 8077A62C-8077A638 000550 000C+00 1/0 0/0 0/0 .data jv_offset */ -SECTION_DATA static u8 jv_offset[12] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; +static Vec jv_offset = {0.0f, 0.0f, 0.0f}; /* 8077A638-8077A6BC -00001 0084+00 1/1 0/0 0/0 .data jc_data */ -SECTION_DATA static void* jc_data[33] = { - (void*)0x00010001, (void*)0x41F00000, (void*)&jv_offset, (void*)0x0001000B, (void*)0x41C80000, - (void*)&jv_offset, (void*)0x0001000C, (void*)0x41A00000, (void*)&jv_offset, (void*)0x00010011, - (void*)0x41700000, (void*)&jv_offset, (void*)0x00010012, (void*)0x41200000, (void*)&jv_offset, - (void*)0x00010016, (void*)0x41700000, (void*)&jv_offset, (void*)0x00010017, (void*)0x41200000, - (void*)&jv_offset, (void*)0x00010003, (void*)0x41200000, (void*)&jv_offset, (void*)0x00010004, - (void*)0x40A00000, (void*)&jv_offset, (void*)0x00010008, (void*)0x41200000, (void*)&jv_offset, - (void*)0x00010009, (void*)0x40A00000, (void*)&jv_offset, +static dJntColData_c jc_data[11] = { + {0, 1, JNT_HIP1, 30.0f, &jv_offset}, + {0, 1, JNT_MUNE2, 25.0f, &jv_offset}, + {0, 1, JNT_KUBI, 20.0f, &jv_offset}, + {0, 1, JNT_ARM_L1, 15.0f, &jv_offset}, + {0, 1, JNT_ARM_L2, 10.0f, &jv_offset}, + {0, 1, JNT_ARM_R1, 15.0f, &jv_offset}, + {0, 1, JNT_ARM_R2, 10.0f, &jv_offset}, + {0, 1, JNT_MOMO_L, 10.0f, &jv_offset}, + {0, 1, JNT_SUNE_L1, 5.0f, &jv_offset}, + {0, 1, JNT_SUNE_R1, 10.0f, &jv_offset}, + {0, 1, JNT_ASI_R, 5.0f, &jv_offset}, }; -/* 8077A6BC-8077A6FC 0005E0 0040+00 1/1 0/0 0/0 .data cc_sph_src$9405 */ -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 -}; +/* 80778998-80778D90 00CCB8 03F8+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */ +static int useHeapInit(fopAc_ac_c* i_this) { + e_rdy_class* _this = (e_rdy_class*)i_this; + + _this->mpMorf = new mDoExt_McaMorfSO( + (J3DModelData*)dComIfG_getObjectRes(_this->mpArcName, 81), NULL, NULL, + (J3DAnmTransform*)dComIfG_getObjectRes(_this->mpArcName, 76), + J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, &_this->mSound, 0x80000, 0x11000084); + if (_this->mpMorf == NULL || _this->mpMorf->getModel() == NULL) { + return 0; + } -/* 8077A6FC-8077A73C 000620 0040+00 1/1 0/0 0/0 .data at_sph_src$9406 */ -static dCcD_SrcSph at_sph_src = { - { - {0x0, {{AT_TYPE_CSTATUE_SWING, 0x1, 0x1d}, {0x0, 0x0}, 0x0}}, // mObj - {dCcD_SE_METAL, 0x0, 0x0, 0x0, 0x0}, // mGObjAt - {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg - {0x0}, // mGObjCo - }, // mObjInf - { - {{0.0f, 0.0f, 0.0f}, 35.0f} // mSph - } // mSphAttr -}; + J3DModel* model = _this->mpMorf->getModel(); + model->setUserArea((u32)_this); + for (u16 i = 0; i < model->getModelData()->getJointNum(); i++) { + model->getModelData()->getJointNodePointer(i)->setCallBack(nodeCallBack); + } + if (!_this->mJntCol.init(_this, jc_data, model, 11)) { + return 0; + } + + if (_this->mWeaponType == WEAPON_CLUB) { + J3DModelData* weapon_model_data = (J3DModelData*)dComIfG_getObjectRes(_this->mpArcName, 85); + _this->mpWeaponModel = mDoExt_J3DModel__create(weapon_model_data, 0x80000, 0x11000084); + if (_this->mpWeaponModel == NULL) { + return 0; + } + } else if (_this->mWeaponType >= WEAPON_BOW) { + _this->mpBowMorf = new mDoExt_McaMorfSO( + (J3DModelData*)dComIfG_getObjectRes(_this->mpArcName, 84), NULL, NULL, + (J3DAnmTransform*)dComIfG_getObjectRes(_this->mpArcName, 11), + J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, NULL, 0x80000, 0x11000084); + if (_this->mpBowMorf == NULL || _this->mpBowMorf->getModel() == NULL) { + return 0; + } + + J3DModel* bow_model = _this->mpBowMorf->getModel(); + bow_model->setUserArea((u32)_this); + for (u16 i = 0; i < bow_model->getModelData()->getJointNum(); i++) { + if (i == 2 || i == 3) { + bow_model->getModelData()->getJointNodePointer(i)->setCallBack(nodeCallBack_bow); + } + } + + J3DModelData* weapon_model_data; + if (_this->mWeaponType == WEAPON_BOW_BOMB) { + weapon_model_data = (J3DModelData*)dComIfG_getObjectRes(_this->mpArcName, 83); + } else { + weapon_model_data = (J3DModelData*)dComIfG_getObjectRes(_this->mpArcName, 82); + } + _this->mpWeaponModel = mDoExt_J3DModel__create(weapon_model_data, 0x80000, 0x11000084); + if (_this->mpWeaponModel == NULL) { + return 0; + } + } + + J3DModelData* eye_model_data = (J3DModelData*)dComIfG_getObjectRes(_this->mpArcName, 80); + for (u16 i = 0; i < 2; i++) { + _this->mpEyeModel[i] = mDoExt_J3DModel__create(eye_model_data, 0x80000, 0x11000084); + if (_this->mpEyeModel[i] == NULL) { + return 0; + } + } + + if (_this->field_0x5b8 == 12) { + J3DModelData* grass_model_data = (J3DModelData*)dComIfG_getObjectRes("J_Tobi", 3); + _this->mpHawkGrassModel = mDoExt_J3DModel__create(grass_model_data, 0x80000, 0x11000084); + if (_this->mpHawkGrassModel == NULL) { + return 0; + } + } + + return 1; +} + +/* 80778D90-80779340 00D0B0 05B0+00 1/0 0/0 0/0 .text daE_RDY_Create__FP10fopAc_ac_c */ +static cPhs__Step daE_RDY_Create(fopAc_ac_c* i_this) { + fopAcM_SetupActor(i_this, e_rdy_class); + e_rdy_class* _this = (e_rdy_class*)i_this; + + _this->field_0x5b6 = fopAcM_GetParam(_this) & 0xff; + _this->field_0x5b7 = _this->field_0x5b6; + _this->field_0x5b8 = (fopAcM_GetParam(_this) >> 0xc) & 0xf; + if (_this->field_0x5b8 == 0xf) { + _this->field_0x5b8 = 0; + } + + _this->mpArcName = "E_rdy"; + cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&_this->mPhase, _this->mpArcName); + + if (step == cPhs_COMPLEATE_e) { + if (_this->field_0x5b8 != 3) { + int swbit = fopAcM_GetParam(_this) >> 0x18; + if (swbit != 0xff && dComIfGs_isSwitch(swbit, fopAcM_GetRoomNo(_this))) { + return cPhs_ERROR_e; + } + } + + _this->mWeaponType = (fopAcM_GetParam(_this) >> 8) & 0xf; + if (_this->mWeaponType == 0xff) { + _this->mWeaponType = WEAPON_NONE; + } + _this->mSwBit = (fopAcM_GetParam(_this) >> 0x18) & 0xff; + + if (_this->field_0x5b8 == 3 || _this->field_0x5b8 == 4 || _this->field_0x5b8 == 5 + || _this->field_0x5b8 == 6 || _this->field_0x5b8 == 7) + { + if (_this->field_0x5b8 != 5) { + _this->field_0x1365 = true; + } + if (_this->field_0x5b8 == 4) { + _this->field_0x1366 = true; + } + if (_this->field_0x5b8 == 6) { + _this->field_0x1368 = true; + _this->mAction = ACT_COMMANDER; + _this->mMode = 0; + _this->mTimer[2] = 20; + _this->field_0x1366 = true; + } else if (_this->field_0x5b8 == 7) { + _this->mAction = ACT_BOW3; + _this->field_0x1366 = true; + _this->mIFrameTimer = 20; + } else { + _this->mAction = ACT_BOW2; + } + fopAcM_OffStatus(_this, fopAcStts_CULL_e); + _this->field_0x5b8 = 3; + } else if (_this->field_0x5b8 == 11) { + _this->mAction = ACT_BOW_IKKI2; + } else if (_this->field_0x5b8 == 12) { + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[84])) { + return cPhs_ERROR_e; + } + cXyz pos = _this->current.pos; + _this->mAction = ACT_TKUSA; + pos.y += 5000.0f; + _this->mKargarokID = fpcM_ERROR_PROCESS_ID_e; + fopAcM_create(PROC_E_YC, 0xffffff00, &pos, fopAcM_GetRoomNo(_this), + &_this->shape_angle, NULL, 0xff); + } + + int tmp1 = _this->home.angle.z & 0xff; + if (tmp1 == 0 || tmp1 == 0xff) { + _this->mPlayerCheckDist = 100000.0f; + } else { + _this->mPlayerCheckDist = tmp1 * 100.0f; + } + + _this->mSwBit2 = (_this->home.angle.z >> 8) & 0xff; + if (_this->mSwBit2 == 0xff) { + _this->mSwBit2 = 0; + } + + fopAcM_OnStatus(_this, fopAcStts_CULL_e); + _this->attention_info.flags = 4; + + u8 path_id = _this->home.angle.x & 0xff; + if (path_id != 0xff) { + _this->mpPath = dPath_GetRoomPath(path_id, fopAcM_GetRoomNo(_this)); + if (_this->mpPath == NULL) { + return cPhs_ERROR_e; + } + } + + if (_this->field_0x5b6 == 7) { + _this->mAction = ACT_NORMAL; + } + if (_this->mWeaponType == WEAPON_CLUB && _this->field_0x5b6 == 0) { + _this->mAction = ACT_STAND; + _this->mMode = 0; + } + if (_this->field_0x5b6 > 2) { + _this->field_0x5b6 = 0; + } + + _this->shape_angle.x = 0; + _this->current.angle.x = 0; + _this->home.angle.x = 0; + _this->shape_angle.z = 0; + _this->current.angle.z = 0; + _this->home.angle.z = 0; + + if (!fopAcM_entrySolidHeap(_this, useHeapInit, 0x57D0)) { + return cPhs_ERROR_e; + } + + if (!hioInit) { + _this->mHIOInit = true; + hioInit = true; + l_HIO.field_0x4 = -1; + } + + fopAcM_SetMtx(_this, _this->mpMorf->getModel()->getBaseTRMtx()); + fopAcM_SetMin(_this, -200.0f, -200.0f, -200.0f); + fopAcM_SetMax(_this, 200.0f, 200.0f, 200.0f); + _this->mAcch.Set(fopAcM_GetPosition_p(_this), fopAcM_GetOldPosition_p(_this), _this, 1, + &_this->mAcchCir, fopAcM_GetSpeed_p(_this), NULL, NULL); + _this->mAcchCir.SetWall(50.0f, 50.0f); + + _this->health = 60; + _this->field_0x560 = 60; + + 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 + }; + + static dCcD_SrcSph at_sph_src = { + { + {0x0, {{AT_TYPE_CSTATUE_SWING, 0x1, 0x1d}, {0x0, 0x0}, 0x0}}, // mObj + {dCcD_SE_METAL, 0x0, 0x0, 0x0, 0x0}, // mGObjAt + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg + {0x0}, // mGObjCo + }, // mObjInf + { + {{0.0f, 0.0f, 0.0f}, 35.0f} // mSph + } // mSphAttr + }; + + _this->mCcStts.Init(200, 0, _this); + for (int i = 0; i <= 2; i++) { + _this->mCcSph[i].Set(cc_sph_src); + _this->mCcSph[i].SetStts(&_this->mCcStts); + if (_this->field_0x1369) { + _this->mCcSph[i].SetTgType(0xd8fbfdbf); + } + } + _this->mAtSph.Set(at_sph_src); + _this->mAtSph.SetStts(&_this->mCcStts); + + _this->mCounter = data_8077aa20 | ((u16)cM_rndF(0xFFFF) & 0xFF00); + data_8077aa20++; + + _this->mSound.init(&_this->current.pos, &_this->eyePos, 3, 1); + _this->mSound.setEnemyName("E_rdy"); + _this->mAtInfo.mpSound = &_this->mSound; + + _this->field_0xa70 = 5; + + if (!strcmp(dComIfGp_getStartStageName(), "F_SP115")) { // Lake Hylia + fopAcM_OffStatus(_this, 0x4000); + } + + c_start = TRUE; + daE_RDY_Execute(_this); + c_start = FALSE; + } + + return step; +} + +/* 80779340-807794E0 00D660 01A0+00 1/1 0/0 0/0 .text __ct__11e_rdy_classFv */ +e_rdy_class::e_rdy_class() { + /* empty function */ +} + +AUDIO_INSTANCES /* 8077A73C-8077A75C -00001 0020+00 1/0 0/0 0/0 .data l_daE_RDY_Method */ static actor_method_class l_daE_RDY_Method = { - (process_method_func)daE_RDY_Create__FP10fopAc_ac_c, - (process_method_func)daE_RDY_Delete__FP11e_rdy_class, - (process_method_func)daE_RDY_Execute__FP11e_rdy_class, - (process_method_func)daE_RDY_IsDelete__FP11e_rdy_class, - (process_method_func)daE_RDY_Draw__FP11e_rdy_class, + (process_method_func)daE_RDY_Create, + (process_method_func)daE_RDY_Delete, + (process_method_func)daE_RDY_Execute, + (process_method_func)daE_RDY_IsDelete, + (process_method_func)daE_RDY_Draw, }; /* 8077A75C-8077A78C -00001 0030+00 0/0 0/0 1/0 .data g_profile_E_RDY */ @@ -830,8 +4987,8 @@ extern actor_process_profile_definition g_profile_E_RDY = { 7, // mListID fpcPi_CURRENT_e, // mListPrio PROC_E_RDY, // mProcName - &g_fpcLf_Method.base, // sub_method - 0x0000142C, // mSize + &g_fpcLf_Method.base, // sub_method + sizeof(e_rdy_class), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // sub_method @@ -841,1907 +4998,3 @@ extern actor_process_profile_definition g_profile_E_RDY = { fopAc_ENEMY_e, // mActorType fopAc_CULLBOX_CUSTOM_e, // cullType }; - -/* 8077A78C-8077A798 0006B0 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, -}; - -/* 8077A798-8077A7A4 0006BC 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, -}; - -/* 8077A7A4-8077A7B0 0006C8 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, -}; - -/* 8077A7B0-8077A7BC 0006D4 000C+00 4/4 0/0 0/0 .data __vt__8cM3dGSph */ -SECTION_DATA extern void* __vt__8cM3dGSph[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGSphFv, -}; - -/* 8077A7BC-8077A7C8 0006E0 000C+00 4/4 0/0 0/0 .data __vt__8cM3dGAab */ -SECTION_DATA extern void* __vt__8cM3dGAab[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGAabFv, -}; - -/* 8077A7C8-8077A7EC 0006EC 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_80779940, - (void*)NULL, - (void*)NULL, - (void*)func_80779938, -}; - -/* 8077A7EC-8077A81C 000710 0030+00 2/2 0/0 0/0 .data __vt__14dBgS_ObjGndChk */ -SECTION_DATA extern void* __vt__14dBgS_ObjGndChk[12] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__14dBgS_ObjGndChkFv, - (void*)NULL, - (void*)NULL, - (void*)func_80779920, - (void*)NULL, - (void*)NULL, - (void*)func_80779930, - (void*)NULL, - (void*)NULL, - (void*)func_80779928, -}; - -/* 8077A81C-8077A828 000740 000C+00 2/2 0/0 0/0 .data __vt__13daE_RDY_HIO_c */ -SECTION_DATA extern void* __vt__13daE_RDY_HIO_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__13daE_RDY_HIO_cFv, -}; - -/* 8076BDCC-8076BE80 0000EC 00B4+00 1/1 0/0 0/0 .text __ct__13daE_RDY_HIO_cFv */ -daE_RDY_HIO_c::daE_RDY_HIO_c() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779E5C-80779E60 000060 0004+00 1/8 0/0 0/0 .rodata @4074 */ -SECTION_RODATA static f32 const lit_4074 = -1.0f; -COMPILER_STRIP_GATE(0x80779E5C, &lit_4074); - -/* 80779E60-80779E64 000064 0004+00 0/6 0/0 0/0 .rodata @4075 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4075 = 30.0f; -COMPILER_STRIP_GATE(0x80779E60, &lit_4075); -#pragma pop - -/* 80779E64-80779E6C 000068 0008+00 1/5 0/0 0/0 .rodata @4078 */ -SECTION_RODATA static u8 const lit_4078[8] = { - 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80779E64, &lit_4078); - -/* 8076BE80-8076BF6C 0001A0 00EC+00 23/23 0/0 0/0 .text anm_init__FP11e_rdy_classifUcf */ -static void anm_init(e_rdy_class* param_0, int param_1, f32 param_2, u8 param_3, f32 param_4) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779E6C-80779E70 000070 0004+00 1/2 0/0 0/0 .rodata @4246 */ -SECTION_RODATA static f32 const lit_4246 = 3.0f / 10.0f; -COMPILER_STRIP_GATE(0x80779E6C, &lit_4246); - -/* 8076BF6C-8076C484 00028C 0518+00 1/1 0/0 0/0 .text nodeCallBack__FP8J3DJointi */ -static void nodeCallBack(J3DJoint* param_0, int param_1) { - // NONMATCHING -} - -/* 8076C484-8076C54C 0007A4 00C8+00 1/1 0/0 0/0 .text nodeCallBack_bow__FP8J3DJointi */ -static void nodeCallBack_bow(J3DJoint* param_0, int param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779E70-80779E74 000074 0004+00 0/1 0/0 0/0 .rodata @4408 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4408 = 1200.0f; -COMPILER_STRIP_GATE(0x80779E70, &lit_4408); -#pragma pop - -/* 8076C54C-8076C9D0 00086C 0484+00 1/0 0/0 0/0 .text daE_RDY_Draw__FP11e_rdy_class */ -static void daE_RDY_Draw(e_rdy_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779E74-80779E78 000078 0004+00 1/2 0/0 0/0 .rodata @4442 */ -SECTION_RODATA static f32 const lit_4442 = 130.0f; -COMPILER_STRIP_GATE(0x80779E74, &lit_4442); - -/* 8076C9D0-8076CAA8 000CF0 00D8+00 3/3 0/0 0/0 .text other_bg_check__FP11e_rdy_classP10fopAc_ac_c - */ -static void other_bg_check(e_rdy_class* param_0, fopAc_ac_c* param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 8077A830-8077A834 000008 0001+03 3/3 0/0 0/0 .bss @1109 */ -static u8 lit_1109[1 + 3 /* padding */]; - -/* 8077A834-8077A838 00000C 0001+03 0/0 0/0 0/0 .bss @1107 */ -#pragma push -#pragma force_active on -static u8 lit_1107[1 + 3 /* padding */]; -#pragma pop - -/* 8077A838-8077A83C 000010 0001+03 0/0 0/0 0/0 .bss @1105 */ -#pragma push -#pragma force_active on -static u8 lit_1105[1 + 3 /* padding */]; -#pragma pop - -/* 8077A83C-8077A840 000014 0001+03 0/0 0/0 0/0 .bss @1104 */ -#pragma push -#pragma force_active on -static u8 lit_1104[1 + 3 /* padding */]; -#pragma pop - -/* 8077A840-8077A844 000018 0001+03 0/0 0/0 0/0 .bss @1099 */ -#pragma push -#pragma force_active on -static u8 lit_1099[1 + 3 /* padding */]; -#pragma pop - -/* 8077A844-8077A848 00001C 0001+03 0/0 0/0 0/0 .bss @1097 */ -#pragma push -#pragma force_active on -static u8 lit_1097[1 + 3 /* padding */]; -#pragma pop - -/* 8077A848-8077A84C 000020 0001+03 0/0 0/0 0/0 .bss @1095 */ -#pragma push -#pragma force_active on -static u8 lit_1095[1 + 3 /* padding */]; -#pragma pop - -/* 8077A84C-8077A850 000024 0001+03 0/0 0/0 0/0 .bss @1094 */ -#pragma push -#pragma force_active on -static u8 lit_1094[1 + 3 /* padding */]; -#pragma pop - -/* 8077A850-8077A854 000028 0001+03 0/0 0/0 0/0 .bss @1057 */ -#pragma push -#pragma force_active on -static u8 lit_1057[1 + 3 /* padding */]; -#pragma pop - -/* 8077A854-8077A858 00002C 0001+03 0/0 0/0 0/0 .bss @1055 */ -#pragma push -#pragma force_active on -static u8 lit_1055[1 + 3 /* padding */]; -#pragma pop - -/* 8077A858-8077A85C 000030 0001+03 0/0 0/0 0/0 .bss @1053 */ -#pragma push -#pragma force_active on -static u8 lit_1053[1 + 3 /* padding */]; -#pragma pop - -/* 8077A85C-8077A860 000034 0001+03 0/0 0/0 0/0 .bss @1052 */ -#pragma push -#pragma force_active on -static u8 lit_1052[1 + 3 /* padding */]; -#pragma pop - -/* 8077A860-8077A864 000038 0001+03 0/0 0/0 0/0 .bss @1014 */ -#pragma push -#pragma force_active on -static u8 lit_1014[1 + 3 /* padding */]; -#pragma pop - -/* 8077A864-8077A868 00003C 0001+03 0/0 0/0 0/0 .bss @1012 */ -#pragma push -#pragma force_active on -static u8 lit_1012[1 + 3 /* padding */]; -#pragma pop - -/* 8077A868-8077A86C 000040 0001+03 0/0 0/0 0/0 .bss @1010 */ -#pragma push -#pragma force_active on -static u8 lit_1010[1 + 3 /* padding */]; -#pragma pop - -/* 8077A86C-8077A870 000044 0001+03 0/0 0/0 0/0 .bss @1009 */ -#pragma push -#pragma force_active on -static u8 lit_1009[1 + 3 /* padding */]; -#pragma pop - -/* 8077A870-8077A874 000048 0004+00 1/1 0/0 0/0 .bss boss */ -static u8 boss[4]; - -/* 8077A874-8077A878 00004C 0004+00 1/2 0/0 0/0 .bss None */ -static u8 data_8077A874[4]; - -/* 8077A878-8077A884 000050 000C+00 0/1 0/0 0/0 .bss @4034 */ -#pragma push -#pragma force_active on -static u8 lit_4034[12]; -#pragma pop - -/* 8077A884-8077A8D4 00005C 0050+00 15/18 0/0 0/0 .bss l_HIO */ -static u8 l_HIO[80]; - -/* 8077A8D4-8077A8D8 0000AC 0002+02 4/5 0/0 0/0 .bss S_find */ -static u8 S_find[2 + 2 /* padding */]; - -/* 8077A8D8-8077A8E4 0000B0 000C+00 0/1 0/0 0/0 .bss @4052 */ -#pragma push -#pragma force_active on -static u8 lit_4052[12]; -#pragma pop - -/* 8077A8E4-8077A8F0 0000BC 000C+00 2/3 0/0 0/0 .bss S_find_pos */ -static u8 S_find_pos[12]; - -/* 8077A8F0-8077A918 0000C8 0028+00 2/2 0/0 0/0 .bss target_info */ -static u8 target_info[40]; - -/* 8077A918-8077A91C 0000F0 0004+00 2/2 0/0 0/0 .bss target_info_count */ -static u8 target_info_count[4]; - -/* 8076CAA8-8076CB24 000DC8 007C+00 1/1 0/0 0/0 .text s_b_sub__FPvPv */ -static void s_b_sub(void* param_0, void* param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779E78-80779E7C 00007C 0004+00 1/11 0/0 0/0 .rodata @4576 */ -SECTION_RODATA static f32 const lit_4576 = 50.0f; -COMPILER_STRIP_GATE(0x80779E78, &lit_4576); - -/* 80779E7C-80779E80 000080 0004+00 0/1 0/0 0/0 .rodata @4577 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4577 = 500.0f; -COMPILER_STRIP_GATE(0x80779E7C, &lit_4577); -#pragma pop - -/* 80779E80-80779E84 000084 0004+00 0/1 0/0 0/0 .rodata @4578 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4578 = -125.0f; -COMPILER_STRIP_GATE(0x80779E80, &lit_4578); -#pragma pop - -/* 80779E84-80779E88 000088 0004+00 0/1 0/0 0/0 .rodata @4579 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4579 = 1500.0f; -COMPILER_STRIP_GATE(0x80779E84, &lit_4579); -#pragma pop - -/* 8076CB24-8076CE10 000E44 02EC+00 2/2 0/0 0/0 .text search_bomb__FP11e_rdy_classi */ -static void search_bomb(e_rdy_class* param_0, int param_1) { - // NONMATCHING -} - -/* 8076CE10-8076CF1C 001130 010C+00 3/3 0/0 0/0 .text way_bg_check__FP11e_rdy_classf */ -static void way_bg_check(e_rdy_class* param_0, f32 param_1) { - // NONMATCHING -} - -/* 8076CF1C-8076D004 00123C 00E8+00 1/1 0/0 0/0 .text ride_off__FP11e_rdy_class */ -static void ride_off(e_rdy_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779E88-80779E8C 00008C 0004+00 1/4 0/0 0/0 .rodata @4663 */ -SECTION_RODATA static f32 const lit_4663 = 10000.0f; -COMPILER_STRIP_GATE(0x80779E88, &lit_4663); - -/* 8076D004-8076D114 001324 0110+00 6/6 0/0 0/0 .text pl_check__FP11e_rdy_classfs */ -static void pl_check(e_rdy_class* param_0, f32 param_1, s16 param_2) { - // NONMATCHING -} - -/* 8076D114-8076D138 001434 0024+00 3/3 0/0 0/0 .text bomb_view_check__FP11e_rdy_class */ -static void bomb_view_check(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 8076D138-8076D15C 001458 0024+00 1/1 0/0 0/0 .text bomb_check__FP11e_rdy_class */ -static void bomb_check(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 8076D15C-8076D24C 00147C 00F0+00 6/6 0/0 0/0 .text move_gake_check__FP11e_rdy_classf - */ -static void move_gake_check(e_rdy_class* param_0, f32 param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779E8C-80779E90 000090 0004+00 0/2 0/0 0/0 .rodata @4740 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4740 = 65535.0f; -COMPILER_STRIP_GATE(0x80779E8C, &lit_4740); -#pragma pop - -/* 80779E90-80779E94 000094 0004+00 0/4 0/0 0/0 .rodata @4741 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4741 = 1000.0f; -COMPILER_STRIP_GATE(0x80779E90, &lit_4741); -#pragma pop - -/* 80779E94-80779E98 000098 0004+00 0/1 0/0 0/0 .rodata @4742 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4742 = 150.0f; -COMPILER_STRIP_GATE(0x80779E94, &lit_4742); -#pragma pop - -/* 8076D24C-8076D3C4 00156C 0178+00 1/1 0/0 0/0 .text way_check__FP11e_rdy_class */ -static void way_check(e_rdy_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779E98-80779E9C 00009C 0004+00 0/3 0/0 0/0 .rodata @4813 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4813 = 0.5f; -COMPILER_STRIP_GATE(0x80779E98, &lit_4813); -#pragma pop - -/* 8077A91C-8077AA1C 0000F4 00FF+01 1/1 0/0 0/0 .bss check_index$4747 */ -static u8 check_index[255 + 1 /* padding */]; - -/* 8076D3C4-8076D5F0 0016E4 022C+00 1/1 0/0 0/0 .text path_check__FP11e_rdy_class */ -static void path_check(e_rdy_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779E9C-80779EA0 0000A0 0004+00 0/7 0/0 0/0 .rodata @4901 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4901 = 2.0f; -COMPILER_STRIP_GATE(0x80779E9C, &lit_4901); -#pragma pop - -/* 80779EA0-80779EA4 0000A4 0004+00 0/7 0/0 0/0 .rodata @4902 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4902 = 200.0f; -COMPILER_STRIP_GATE(0x80779EA0, &lit_4902); -#pragma pop - -/* 80779EA4-80779EA8 0000A8 0004+00 0/2 0/0 0/0 .rodata @4903 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4903 = 4000.0f; -COMPILER_STRIP_GATE(0x80779EA4, &lit_4903); -#pragma pop - -/* 8076D5F0-8076DA3C 001910 044C+00 1/1 0/0 0/0 .text e_rdy_normal__FP11e_rdy_class */ -static void e_rdy_normal(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 8076DA3C-8076E00C 001D5C 05D0+00 2/1 0/0 0/0 .text e_rdy_fight_run__FP11e_rdy_class */ -static void e_rdy_fight_run(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 8076E00C-8076E06C 00232C 0060+00 1/1 0/0 0/0 .text at_hit_check__FP11e_rdy_class */ -static void at_hit_check(e_rdy_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779EA8-80779EAC 0000AC 0004+00 0/2 0/0 0/0 .rodata @5011 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5011 = 7.0f; -COMPILER_STRIP_GATE(0x80779EA8, &lit_5011); -#pragma pop - -/* 80779EAC-80779EB0 0000B0 0004+00 0/4 0/0 0/0 .rodata @5012 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5012 = 15.0f; -COMPILER_STRIP_GATE(0x80779EAC, &lit_5012); -#pragma pop - -/* 80779EB0-80779EB4 0000B4 0004+00 0/2 0/0 0/0 .rodata @5013 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5013 = 1.0f / 20.0f; -COMPILER_STRIP_GATE(0x80779EB0, &lit_5013); -#pragma pop - -/* 80779EB4-80779EB8 0000B8 0004+00 0/2 0/0 0/0 .rodata @5014 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5014 = 1.0f / 10.0f; -COMPILER_STRIP_GATE(0x80779EB4, &lit_5014); -#pragma pop - -/* 80779EB8-80779EBC 0000BC 0004+00 0/9 0/0 0/0 .rodata @5015 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5015 = 20.0f; -COMPILER_STRIP_GATE(0x80779EB8, &lit_5015); -#pragma pop - -/* 80779EBC-80779EC0 0000C0 0004+00 0/2 0/0 0/0 .rodata @5138 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5138 = 6.0f; -COMPILER_STRIP_GATE(0x80779EBC, &lit_5138); -#pragma pop - -/* 80779EC0-80779EC4 0000C4 0004+00 0/1 0/0 0/0 .rodata @5139 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5139 = 44.0f; -COMPILER_STRIP_GATE(0x80779EC0, &lit_5139); -#pragma pop - -/* 8076E06C-8076E418 00238C 03AC+00 1/1 0/0 0/0 .text e_rdy_fight__FP11e_rdy_class */ -static void e_rdy_fight(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 8076E418-8076E81C 002738 0404+00 2/1 0/0 0/0 .text e_rdy_bow_run__FP11e_rdy_class */ -static void e_rdy_bow_run(e_rdy_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779EC4-80779EC8 0000C8 0004+00 0/3 0/0 0/0 .rodata @5297 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5297 = 9.0f / 10.0f; -COMPILER_STRIP_GATE(0x80779EC4, &lit_5297); -#pragma pop - -/* 80779EC8-80779ECC 0000CC 0004+00 0/5 0/0 0/0 .rodata @5298 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5298 = 4.0f; -COMPILER_STRIP_GATE(0x80779EC8, &lit_5298); -#pragma pop - -/* 80779ECC-80779ED0 0000D0 0004+00 0/2 0/0 0/0 .rodata @5299 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5299 = -100.0f; -COMPILER_STRIP_GATE(0x80779ECC, &lit_5299); -#pragma pop - -/* 8076E81C-8076EB4C 002B3C 0330+00 1/1 0/0 0/0 .text e_rdy_bow__FP11e_rdy_class */ -static void e_rdy_bow(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 8076EB4C-8076EBB8 002E6C 006C+00 1/1 0/0 0/0 .text s_command3_sub__FPvPv */ -static void s_command3_sub(void* param_0, void* param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779ED0-80779ED4 0000D4 0004+00 0/3 0/0 0/0 .rodata @5429 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5429 = 60.0f; -COMPILER_STRIP_GATE(0x80779ED0, &lit_5429); -#pragma pop - -/* 80779ED4-80779ED8 0000D8 0004+00 0/8 0/0 0/0 .rodata @5430 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5430 = 40.0f; -COMPILER_STRIP_GATE(0x80779ED4, &lit_5430); -#pragma pop - -/* 80779ED8-80779EDC 0000DC 0004+00 0/3 0/0 0/0 .rodata @5431 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5431 = -200.0f; -COMPILER_STRIP_GATE(0x80779ED8, &lit_5431); -#pragma pop - -/* 8076EBB8-8076F0E0 002ED8 0528+00 1/1 0/0 0/0 .text e_rdy_bow2__FP11e_rdy_class */ -static void e_rdy_bow2(e_rdy_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779EDC-80779EE0 0000E0 0004+00 0/1 0/0 0/0 .rodata @5508 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5508 = -92938.0f; -COMPILER_STRIP_GATE(0x80779EDC, &lit_5508); -#pragma pop - -/* 80779EE0-80779EE4 0000E4 0004+00 0/1 0/0 0/0 .rodata @5509 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5509 = 49992.0f; -COMPILER_STRIP_GATE(0x80779EE0, &lit_5509); -#pragma pop - -/* 8076F0E0-8076F438 003400 0358+00 2/1 0/0 0/0 .text e_rdy_bow_ikki2__FP11e_rdy_class */ -static void e_rdy_bow_ikki2(e_rdy_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779EE4-80779EE8 0000E8 0004+00 0/0 0/0 0/0 .rodata @5510 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5510 = 35000.0f; -COMPILER_STRIP_GATE(0x80779EE4, &lit_5510); -#pragma pop - -/* 80779EE8-80779EEC 0000EC 0004+00 0/0 0/0 0/0 .rodata @5511 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5511 = -93658.0f; -COMPILER_STRIP_GATE(0x80779EE8, &lit_5511); -#pragma pop - -/* 80779EEC-80779EF0 0000F0 0004+00 0/0 0/0 0/0 .rodata @5512 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5512 = 49894.0f; -COMPILER_STRIP_GATE(0x80779EEC, &lit_5512); -#pragma pop - -/* 80779EF0-80779EF4 0000F4 0004+00 0/0 0/0 0/0 .rodata @5513 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5513 = -93666.0f; -COMPILER_STRIP_GATE(0x80779EF0, &lit_5513); -#pragma pop - -/* 80779EF4-80779EF8 0000F8 0004+00 0/0 0/0 0/0 .rodata @5514 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5514 = -1000.0f; -COMPILER_STRIP_GATE(0x80779EF4, &lit_5514); -#pragma pop - -/* 80779EF8-80779EFC 0000FC 0004+00 0/0 0/0 0/0 .rodata @5515 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5515 = 5400.0f; -COMPILER_STRIP_GATE(0x80779EF8, &lit_5515); -#pragma pop - -/* 80779EFC-80779F00 000100 0004+00 0/2 0/0 0/0 .rodata @5553 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5553 = -30.0f; -COMPILER_STRIP_GATE(0x80779EFC, &lit_5553); -#pragma pop - -/* 8076F438-8076F59C 003758 0164+00 1/1 0/0 0/0 .text e_rdy_avoid__FP11e_rdy_class */ -static void e_rdy_avoid(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 8076F59C-8076F71C 0038BC 0180+00 1/1 0/0 0/0 .text s_kusa_sub__FPvPv */ -static void s_kusa_sub(void* param_0, void* param_1) { - // NONMATCHING -} - -/* 8076F71C-807701F4 003A3C 0AD8+00 2/1 0/0 0/0 .text e_rdy_tkusa__FP11e_rdy_class */ -static void e_rdy_tkusa(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 807701F4-8077089C 004514 06A8+00 1/1 0/0 0/0 .text e_rdy_yc_ride__FP11e_rdy_class */ -static void e_rdy_yc_ride(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 8077089C-80770CF8 004BBC 045C+00 2/1 0/0 0/0 .text e_rdy_bomb_action__FP11e_rdy_class - */ -static void e_rdy_bomb_action(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 80770CF8-80770E48 005018 0150+00 1/1 0/0 0/0 .text e_rdy_s_damage__FP11e_rdy_class */ -static void e_rdy_s_damage(e_rdy_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779F00-80779F04 000104 0004+00 0/0 0/0 0/0 .rodata @5893 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5893 = 160.0f; -COMPILER_STRIP_GATE(0x80779F00, &lit_5893); -#pragma pop - -/* 80779F04-80779F08 000108 0004+00 0/0 0/0 0/0 .rodata @5894 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5894 = 1100.0f; -COMPILER_STRIP_GATE(0x80779F04, &lit_5894); -#pragma pop - -/* 80779F08-80779F0C 00010C 0004+00 0/0 0/0 0/0 .rodata @5895 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5895 = 1050.0f; -COMPILER_STRIP_GATE(0x80779F08, &lit_5895); -#pragma pop - -/* 80779F0C-80779F10 000110 0004+00 0/0 0/0 0/0 .rodata @5896 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5896 = -1100.0f; -COMPILER_STRIP_GATE(0x80779F0C, &lit_5896); -#pragma pop - -/* 80779F10-80779F14 000114 0004+00 0/0 0/0 0/0 .rodata @5897 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5897 = -27.0f; -COMPILER_STRIP_GATE(0x80779F10, &lit_5897); -#pragma pop - -/* 80779F14-80779F18 000118 0004+00 0/0 0/0 0/0 .rodata @6168 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6168 = 600.0f; -COMPILER_STRIP_GATE(0x80779F14, &lit_6168); -#pragma pop - -/* 80779F18-80779F1C 00011C 0004+00 0/2 0/0 0/0 .rodata @6243 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6243 = 70.0f; -COMPILER_STRIP_GATE(0x80779F18, &lit_6243); -#pragma pop - -/* 80779F1C-80779F20 000120 0004+00 0/1 0/0 0/0 .rodata @6244 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6244 = -150.0f; -COMPILER_STRIP_GATE(0x80779F1C, &lit_6244); -#pragma pop - -/* 80770E48-80770FFC 005168 01B4+00 1/1 0/0 0/0 .text kado_check__FP11e_rdy_class */ -static void kado_check(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 80770FFC-807710DC 00531C 00E0+00 3/3 0/0 0/0 .text rd_disappear__FP11e_rdy_class */ -static void rd_disappear(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 807710DC-80771230 0053FC 0154+00 1/1 0/0 0/0 .text body_gake__FP11e_rdy_class */ -static void body_gake(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 80771230-807712A8 005550 0078+00 4/3 0/0 0/0 .text __dt__14dBgS_ObjGndChkFv */ -// dBgS_ObjGndChk::~dBgS_ObjGndChk() { -extern "C" void __dt__14dBgS_ObjGndChkFv() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779F20-80779F24 000124 0004+00 0/2 0/0 0/0 .rodata @6634 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6634 = 8000.0f; -COMPILER_STRIP_GATE(0x80779F20, &lit_6634); -#pragma pop - -/* 807712A8-80771DA4 0055C8 0AFC+00 2/1 0/0 0/0 .text e_rdy_damage__FP11e_rdy_class */ -static void e_rdy_damage(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 80771DA4-80771F50 0060C4 01AC+00 1/1 0/0 0/0 .text gake_check__FP11e_rdy_classf */ -static void gake_check(e_rdy_class* param_0, f32 param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779F24-80779F28 000128 0004+00 0/1 0/0 0/0 .rodata @6635 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6635 = 1.0f / 5.0f; -COMPILER_STRIP_GATE(0x80779F24, &lit_6635); -#pragma pop - -/* 80779F28-80779F2C 00012C 0004+00 0/1 0/0 0/0 .rodata @6636 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6636 = -20.0f; -COMPILER_STRIP_GATE(0x80779F28, &lit_6636); -#pragma pop - -/* 80779F2C-80779F30 000130 0004+00 0/2 0/0 0/0 .rodata @6637 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6637 = 35.0f; -COMPILER_STRIP_GATE(0x80779F2C, &lit_6637); -#pragma pop - -/* 80779F30-80779F34 000134 0004+00 0/1 0/0 0/0 .rodata @6727 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6727 = 350.0f; -COMPILER_STRIP_GATE(0x80779F30, &lit_6727); -#pragma pop - -/* 80779F34-80779F38 000138 0004+00 0/2 0/0 0/0 .rodata @6728 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6728 = 13.0f / 10.0f; -COMPILER_STRIP_GATE(0x80779F34, &lit_6728); -#pragma pop - -/* 80771F50-80772128 006270 01D8+00 1/1 0/0 0/0 .text s_bikkuri_sub__FPvPv */ -static void s_bikkuri_sub(void* param_0, void* param_1) { - // NONMATCHING -} - -/* 80772128-807724A0 006448 0378+00 1/1 0/0 0/0 .text e_rdy_drop__FP11e_rdy_class */ -static void e_rdy_drop(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 807724A0-80772580 0067C0 00E0+00 1/1 0/0 0/0 .text e_rdy_a_damage__FP11e_rdy_class */ -static void e_rdy_a_damage(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 80772580-807726F0 0068A0 0170+00 1/1 0/0 0/0 .text e_rdy_stand__FP11e_rdy_class */ -static void e_rdy_stand(e_rdy_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779F38-80779F3C 00013C 0004+00 0/1 0/0 0/0 .rodata @6940 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6940 = 80.0f; -COMPILER_STRIP_GATE(0x80779F38, &lit_6940); -#pragma pop - -/* 807726F0-80772B0C 006A10 041C+00 2/1 0/0 0/0 .text e_rdy_bow3__FP11e_rdy_class */ -static void e_rdy_bow3(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 80772B0C-80772B98 006E2C 008C+00 1/1 0/0 0/0 .text s_command2_sub__FPvPv */ -static void s_command2_sub(void* param_0, void* param_1) { - // NONMATCHING -} - -/* 80772B98-80772C04 006EB8 006C+00 1/1 0/0 0/0 .text s_command4_sub__FPvPv */ -static void s_command4_sub(void* param_0, void* param_1) { - // NONMATCHING -} - -/* 80772C04-80773070 006F24 046C+00 2/1 0/0 0/0 .text e_rdy_commander__FP11e_rdy_class */ -static void e_rdy_commander(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 80773070-80773474 007390 0404+00 1/1 0/0 0/0 .text e_rdy_excite__FP11e_rdy_class */ -static void e_rdy_excite(e_rdy_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779F3C-80779F40 000140 0004+00 0/1 0/0 0/0 .rodata @7142 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7142 = 1.5f; -COMPILER_STRIP_GATE(0x80779F3C, &lit_7142); -#pragma pop - -/* 80773474-807735A8 007794 0134+00 1/1 0/0 0/0 .text e_rdy_water__FP11e_rdy_class */ -static void e_rdy_water(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 807735A8-80773A8C 0078C8 04E4+00 1/1 0/0 0/0 .text e_rdy_jyunkai__FP11e_rdy_class */ -static void e_rdy_jyunkai(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 80773A8C-80773B24 007DAC 0098+00 1/1 0/0 0/0 .text wolfkick_damage__FP11e_rdy_class */ -static void wolfkick_damage(e_rdy_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779F40-80779F44 000144 0004+00 0/1 0/0 0/0 .rodata @7294 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7294 = 3000.0f; -COMPILER_STRIP_GATE(0x80779F40, &lit_7294); -#pragma pop - -/* 80773B24-80773D2C 007E44 0208+00 1/1 0/0 0/0 .text big_damage__FP11e_rdy_class */ -static void big_damage(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 80773D2C-80773E5C 00804C 0130+00 1/1 0/0 0/0 .text small_damage__FP11e_rdy_classi */ -static void small_damage(e_rdy_class* param_0, int param_1) { - // NONMATCHING -} - -/* 80773E5C-8077424C 00817C 03F0+00 1/1 0/0 0/0 .text damage_check__FP11e_rdy_class */ -static void damage_check(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 8077424C-8077582C 00856C 15E0+00 2/1 0/0 0/0 .text action__FP11e_rdy_class */ -static void action(e_rdy_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779F44-80779F48 000148 0004+00 0/0 0/0 0/0 .rodata @7912 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7912 = -5.0f; -COMPILER_STRIP_GATE(0x80779F44, &lit_7912); -#pragma pop - -/* 80779F48-80779F4C 00014C 0004+00 0/1 0/0 0/0 .rodata @7913 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7913 = -60.0f; -COMPILER_STRIP_GATE(0x80779F48, &lit_7913); -#pragma pop - -/* 80779F4C-80779F50 000150 0004+00 0/0 0/0 0/0 .rodata @7914 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7914 = 4.5f; -COMPILER_STRIP_GATE(0x80779F4C, &lit_7914); -#pragma pop - -/* 80779F50-80779F54 000154 0004+00 0/0 0/0 0/0 .rodata @7915 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7915 = 110.0f; -COMPILER_STRIP_GATE(0x80779F50, &lit_7915); -#pragma pop - -/* 80779F54-80779F58 000158 0004+00 0/0 0/0 0/0 .rodata @7916 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7916 = 12000.0f; -COMPILER_STRIP_GATE(0x80779F54, &lit_7916); -#pragma pop - -/* 80779F58-80779F5C 00015C 0004+00 0/1 0/0 0/0 .rodata @7917 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7917 = -1000000000.0f; -COMPILER_STRIP_GATE(0x80779F58, &lit_7917); -#pragma pop - -/* 80779F5C-80779F60 000160 0004+00 0/1 0/0 0/0 .rodata @7976 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7976 = 90.0f; -COMPILER_STRIP_GATE(0x80779F5C, &lit_7976); -#pragma pop - -/* 8077582C-80775A20 009B4C 01F4+00 1/1 0/0 0/0 .text fire_eff_set__FP11e_rdy_class */ -static void fire_eff_set(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 80775A20-80775B04 009D40 00E4+00 1/1 0/0 0/0 .text cam_3d_morf__FP11e_rdy_classf */ -static void cam_3d_morf(e_rdy_class* param_0, f32 param_1) { - // NONMATCHING -} - -/* 80775B04-80775B50 009E24 004C+00 1/1 0/0 0/0 .text s_adel_sub__FPvPv */ -static void s_adel_sub(void* param_0, void* param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779F60-80779F64 000164 0004+00 0/1 0/0 0/0 .rodata @8521 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8521 = 55.0f; -COMPILER_STRIP_GATE(0x80779F60, &lit_8521); -#pragma pop - -/* 80775B50-80777330 009E70 17E0+00 2/1 0/0 0/0 .text demo_camera__FP11e_rdy_class */ -static void demo_camera(e_rdy_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80779F64-80779F68 000168 0004+00 0/0 0/0 0/0 .rodata @8522 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8522 = -300.0f; -COMPILER_STRIP_GATE(0x80779F64, &lit_8522); -#pragma pop - -/* 80779F68-80779F6C 00016C 0004+00 0/0 0/0 0/0 .rodata @8523 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8523 = -102687.0f; -COMPILER_STRIP_GATE(0x80779F68, &lit_8523); -#pragma pop - -/* 80779F6C-80779F70 000170 0004+00 0/0 0/0 0/0 .rodata @8524 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8524 = -23441.5f; -COMPILER_STRIP_GATE(0x80779F6C, &lit_8524); -#pragma pop - -/* 80779F70-80779F74 000174 0004+00 0/0 0/0 0/0 .rodata @8525 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8525 = 38942.0f; -COMPILER_STRIP_GATE(0x80779F70, &lit_8525); -#pragma pop - -/* 80779F74-80779F78 000178 0004+00 0/0 0/0 0/0 .rodata @8526 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8526 = -102677.0f; -COMPILER_STRIP_GATE(0x80779F74, &lit_8526); -#pragma pop - -/* 80779F78-80779F7C 00017C 0004+00 0/0 0/0 0/0 .rodata @8527 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8527 = -23375.0f; -COMPILER_STRIP_GATE(0x80779F78, &lit_8527); -#pragma pop - -/* 80779F7C-80779F80 000180 0004+00 0/0 0/0 0/0 .rodata @8528 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8528 = 38866.0f; -COMPILER_STRIP_GATE(0x80779F7C, &lit_8528); -#pragma pop - -/* 80779F80-80779F84 000184 0004+00 0/0 0/0 0/0 .rodata @8529 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8529 = -102392.0f; -COMPILER_STRIP_GATE(0x80779F80, &lit_8529); -#pragma pop - -/* 80779F84-80779F88 000188 0004+00 0/0 0/0 0/0 .rodata @8530 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8530 = -23393.0f; -COMPILER_STRIP_GATE(0x80779F84, &lit_8530); -#pragma pop - -/* 80779F88-80779F8C 00018C 0004+00 0/0 0/0 0/0 .rodata @8531 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8531 = 39031.0f; -COMPILER_STRIP_GATE(0x80779F88, &lit_8531); -#pragma pop - -/* 80779F8C-80779F90 000190 0004+00 0/0 0/0 0/0 .rodata @8532 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8532 = -102520.0f; -COMPILER_STRIP_GATE(0x80779F8C, &lit_8532); -#pragma pop - -/* 80779F90-80779F94 000194 0004+00 0/0 0/0 0/0 .rodata @8533 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8533 = -23416.0f; -COMPILER_STRIP_GATE(0x80779F90, &lit_8533); -#pragma pop - -/* 80779F94-80779F98 000198 0004+00 0/0 0/0 0/0 .rodata @8534 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8534 = 38021.0f; -COMPILER_STRIP_GATE(0x80779F94, &lit_8534); -#pragma pop - -/* 80779F98-80779F9C 00019C 0004+00 0/1 0/0 0/0 .rodata @8535 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8535 = -50.0f; -COMPILER_STRIP_GATE(0x80779F98, &lit_8535); -#pragma pop - -/* 80779F9C-80779FA0 0001A0 0004+00 0/0 0/0 0/0 .rodata @8536 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8536 = 420.0f; -COMPILER_STRIP_GATE(0x80779F9C, &lit_8536); -#pragma pop - -/* 80779FA0-80779FA4 0001A4 0004+00 0/0 0/0 0/0 .rodata @8537 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8537 = 170.0f; -COMPILER_STRIP_GATE(0x80779FA0, &lit_8537); -#pragma pop - -/* 80779FA4-80779FA8 0001A8 0004+00 0/0 0/0 0/0 .rodata @8538 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8538 = 3.0f / 100.0f; -COMPILER_STRIP_GATE(0x80779FA4, &lit_8538); -#pragma pop - -/* 80779FA8-80779FAC 0001AC 0004+00 0/0 0/0 0/0 .rodata @8539 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8539 = 210.0f; -COMPILER_STRIP_GATE(0x80779FA8, &lit_8539); -#pragma pop - -/* 80779FAC-80779FB0 0001B0 0004+00 0/0 0/0 0/0 .rodata @8540 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8540 = 400.0f; -COMPILER_STRIP_GATE(0x80779FAC, &lit_8540); -#pragma pop - -/* 80779FB0-80779FB4 0001B4 0004+00 0/0 0/0 0/0 .rodata @8541 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8541 = -350.0f; -COMPILER_STRIP_GATE(0x80779FB0, &lit_8541); -#pragma pop - -/* 80779FB4-80779FB8 0001B8 0004+00 0/1 0/0 0/0 .rodata @8542 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8542 = 1.0f / 50.0f; -COMPILER_STRIP_GATE(0x80779FB4, &lit_8542); -#pragma pop - -/* 80779FB8-80779FBC 0001BC 0004+00 0/0 0/0 0/0 .rodata @8543 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8543 = -93806.0f; -COMPILER_STRIP_GATE(0x80779FB8, &lit_8543); -#pragma pop - -/* 80779FBC-80779FC0 0001C0 0004+00 0/0 0/0 0/0 .rodata @8544 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8544 = -5894.0f; -COMPILER_STRIP_GATE(0x80779FBC, &lit_8544); -#pragma pop - -/* 80779FC0-80779FC4 0001C4 0004+00 0/0 0/0 0/0 .rodata @8545 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8545 = 42791.0f; -COMPILER_STRIP_GATE(0x80779FC0, &lit_8545); -#pragma pop - -/* 80779FC4-80779FC8 0001C8 0004+00 0/0 0/0 0/0 .rodata @8546 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8546 = -93532.0f; -COMPILER_STRIP_GATE(0x80779FC4, &lit_8546); -#pragma pop - -/* 80779FC8-80779FCC 0001CC 0004+00 0/0 0/0 0/0 .rodata @8547 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8547 = -5824.0f; -COMPILER_STRIP_GATE(0x80779FC8, &lit_8547); -#pragma pop - -/* 80779FCC-80779FD0 0001D0 0004+00 0/0 0/0 0/0 .rodata @8548 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8548 = 43075.0f; -COMPILER_STRIP_GATE(0x80779FCC, &lit_8548); -#pragma pop - -/* 80779FD0-80779FD4 0001D4 0004+00 0/0 0/0 0/0 .rodata @8549 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8549 = -93705.0f; -COMPILER_STRIP_GATE(0x80779FD0, &lit_8549); -#pragma pop - -/* 80779FD4-80779FD8 0001D8 0004+00 0/0 0/0 0/0 .rodata @8550 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8550 = -5951.0f; -COMPILER_STRIP_GATE(0x80779FD4, &lit_8550); -#pragma pop - -/* 80779FD8-80779FDC 0001DC 0004+00 0/0 0/0 0/0 .rodata @8551 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8551 = 42867.0f; -COMPILER_STRIP_GATE(0x80779FD8, &lit_8551); -#pragma pop - -/* 80779FDC-80779FE0 0001E0 0004+00 0/0 0/0 0/0 .rodata @8552 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8552 = -93860.0f; -COMPILER_STRIP_GATE(0x80779FDC, &lit_8552); -#pragma pop - -/* 80779FE0-80779FE4 0001E4 0004+00 0/0 0/0 0/0 .rodata @8553 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8553 = -5786.0f; -COMPILER_STRIP_GATE(0x80779FE0, &lit_8553); -#pragma pop - -/* 80779FE4-80779FE8 0001E8 0004+00 0/0 0/0 0/0 .rodata @8554 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8554 = 42701.0f; -COMPILER_STRIP_GATE(0x80779FE4, &lit_8554); -#pragma pop - -/* 80779FE8-80779FEC 0001EC 0004+00 0/0 0/0 0/0 .rodata @8555 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8555 = -93644.0f; -COMPILER_STRIP_GATE(0x80779FE8, &lit_8555); -#pragma pop - -/* 80779FEC-80779FF0 0001F0 0004+00 0/0 0/0 0/0 .rodata @8556 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8556 = -5908.0f; -COMPILER_STRIP_GATE(0x80779FEC, &lit_8556); -#pragma pop - -/* 80779FF0-80779FF4 0001F4 0004+00 0/0 0/0 0/0 .rodata @8557 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8557 = 43016.0f; -COMPILER_STRIP_GATE(0x80779FF0, &lit_8557); -#pragma pop - -/* 80779FF4-80779FF8 0001F8 0004+00 0/0 0/0 0/0 .rodata @8558 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8558 = -93614.0f; -COMPILER_STRIP_GATE(0x80779FF4, &lit_8558); -#pragma pop - -/* 80779FF8-80779FFC 0001FC 0004+00 0/0 0/0 0/0 .rodata @8559 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8559 = -5879.0f; -COMPILER_STRIP_GATE(0x80779FF8, &lit_8559); -#pragma pop - -/* 80779FFC-8077A000 000200 0004+00 0/0 0/0 0/0 .rodata @8560 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8560 = 43003.0f; -COMPILER_STRIP_GATE(0x80779FFC, &lit_8560); -#pragma pop - -/* 8077A000-8077A004 000204 0004+00 0/0 0/0 0/0 .rodata @8561 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8561 = -93593.0f; -COMPILER_STRIP_GATE(0x8077A000, &lit_8561); -#pragma pop - -/* 8077A004-8077A008 000208 0004+00 0/0 0/0 0/0 .rodata @8562 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8562 = -5871.0f; -COMPILER_STRIP_GATE(0x8077A004, &lit_8562); -#pragma pop - -/* 8077A008-8077A00C 00020C 0004+00 0/0 0/0 0/0 .rodata @8563 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8563 = 42603.0f; -COMPILER_STRIP_GATE(0x8077A008, &lit_8563); -#pragma pop - -/* 8077A00C-8077A010 000210 0004+00 0/0 0/0 0/0 .rodata @8564 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8564 = -93660.0f; -COMPILER_STRIP_GATE(0x8077A00C, &lit_8564); -#pragma pop - -/* 8077A010-8077A014 000214 0004+00 0/0 0/0 0/0 .rodata @8565 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8565 = -5873.0f; -COMPILER_STRIP_GATE(0x8077A010, &lit_8565); -#pragma pop - -/* 8077A014-8077A018 000218 0004+00 0/0 0/0 0/0 .rodata @8566 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8566 = 49831.0f; -COMPILER_STRIP_GATE(0x8077A014, &lit_8566); -#pragma pop - -/* 8077A018-8077A01C 00021C 0004+00 0/0 0/0 0/0 .rodata @8567 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8567 = -93551.0f; -COMPILER_STRIP_GATE(0x8077A018, &lit_8567); -#pragma pop - -/* 8077A01C-8077A020 000220 0004+00 0/0 0/0 0/0 .rodata @8568 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8568 = -5926.0f; -COMPILER_STRIP_GATE(0x8077A01C, &lit_8568); -#pragma pop - -/* 8077A020-8077A024 000224 0004+00 0/0 0/0 0/0 .rodata @8569 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8569 = 49449.0f; -COMPILER_STRIP_GATE(0x8077A020, &lit_8569); -#pragma pop - -/* 8077A024-8077A028 000228 0004+00 0/0 0/0 0/0 .rodata @8570 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8570 = -92666.0f; -COMPILER_STRIP_GATE(0x8077A024, &lit_8570); -#pragma pop - -/* 8077A028-8077A02C 00022C 0004+00 0/0 0/0 0/0 .rodata @8571 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8571 = -5540.0f; -COMPILER_STRIP_GATE(0x8077A028, &lit_8571); -#pragma pop - -/* 8077A02C-8077A030 000230 0004+00 0/0 0/0 0/0 .rodata @8572 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8572 = 43878.0f; -COMPILER_STRIP_GATE(0x8077A02C, &lit_8572); -#pragma pop - -/* 8077A030-8077A034 000234 0004+00 0/0 0/0 0/0 .rodata @8573 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8573 = 39000.0f; -COMPILER_STRIP_GATE(0x8077A030, &lit_8573); -#pragma pop - -/* 8077A034-8077A038 000238 0004+00 0/0 0/0 0/0 .rodata @8574 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8574 = -93539.0f; -COMPILER_STRIP_GATE(0x8077A034, &lit_8574); -#pragma pop - -/* 8077A038-8077A03C 00023C 0004+00 0/0 0/0 0/0 .rodata @8575 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8575 = -5857.0f; -COMPILER_STRIP_GATE(0x8077A038, &lit_8575); -#pragma pop - -/* 8077A03C-8077A040 000240 0004+00 0/0 0/0 0/0 .rodata @8576 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8576 = 30480.0f; -COMPILER_STRIP_GATE(0x8077A03C, &lit_8576); -#pragma pop - -/* 8077A040-8077A044 000244 0004+00 0/0 0/0 0/0 .rodata @8577 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8577 = -4469.0f; -COMPILER_STRIP_GATE(0x8077A040, &lit_8577); -#pragma pop - -/* 8077A044-8077A048 000248 0004+00 0/0 0/0 0/0 .rodata @8578 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8578 = -92006.0f; -COMPILER_STRIP_GATE(0x8077A044, &lit_8578); -#pragma pop - -/* 8077A048-8077A04C 00024C 0004+00 0/1 0/0 0/0 .rodata @8579 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8579 = 30000.0f; -COMPILER_STRIP_GATE(0x8077A048, &lit_8579); -#pragma pop - -/* 8077A04C-8077A050 000250 0004+00 0/0 0/0 0/0 .rodata @8580 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8580 = -92787.0f; -COMPILER_STRIP_GATE(0x8077A04C, &lit_8580); -#pragma pop - -/* 8077A050-8077A054 000254 0004+00 0/0 0/0 0/0 .rodata @8581 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8581 = -5256.0f; -COMPILER_STRIP_GATE(0x8077A050, &lit_8581); -#pragma pop - -/* 8077A054-8077A058 000258 0004+00 0/0 0/0 0/0 .rodata @8582 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8582 = 46550.0f; -COMPILER_STRIP_GATE(0x8077A054, &lit_8582); -#pragma pop - -/* 8077A058-8077A05C 00025C 0004+00 0/0 0/0 0/0 .rodata @8583 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8583 = -92609.0f; -COMPILER_STRIP_GATE(0x8077A058, &lit_8583); -#pragma pop - -/* 8077A05C-8077A060 000260 0004+00 0/0 0/0 0/0 .rodata @8584 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8584 = -5139.0f; -COMPILER_STRIP_GATE(0x8077A05C, &lit_8584); -#pragma pop - -/* 8077A060-8077A064 000264 0004+00 0/0 0/0 0/0 .rodata @8585 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8585 = 46210.0f; -COMPILER_STRIP_GATE(0x8077A060, &lit_8585); -#pragma pop - -/* 8077A064-8077A068 000268 0004+00 0/0 0/0 0/0 .rodata @8586 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8586 = -103242.0f; -COMPILER_STRIP_GATE(0x8077A064, &lit_8586); -#pragma pop - -/* 8077A068-8077A06C 00026C 0004+00 0/0 0/0 0/0 .rodata @8587 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8587 = -22894.0f; -COMPILER_STRIP_GATE(0x8077A068, &lit_8587); -#pragma pop - -/* 8077A06C-8077A070 000270 0004+00 0/0 0/0 0/0 .rodata @8588 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8588 = 38097.0f; -COMPILER_STRIP_GATE(0x8077A06C, &lit_8588); -#pragma pop - -/* 8077A070-8077A074 000274 0004+00 0/0 0/0 0/0 .rodata @8589 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8589 = -93652.0f; -COMPILER_STRIP_GATE(0x8077A070, &lit_8589); -#pragma pop - -/* 8077A074-8077A078 000278 0004+00 0/0 0/0 0/0 .rodata @8590 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8590 = -5875.0f; -COMPILER_STRIP_GATE(0x8077A074, &lit_8590); -#pragma pop - -/* 8077A078-8077A07C 00027C 0004+00 0/0 0/0 0/0 .rodata @8591 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8591 = 46674.0f; -COMPILER_STRIP_GATE(0x8077A078, &lit_8591); -#pragma pop - -/* 8077A07C-8077A080 000280 0004+00 0/0 0/0 0/0 .rodata @8592 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8592 = -93659.0f; -COMPILER_STRIP_GATE(0x8077A07C, &lit_8592); -#pragma pop - -/* 8077A080-8077A084 000284 0004+00 0/0 0/0 0/0 .rodata @8593 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8593 = 32500.0f; -COMPILER_STRIP_GATE(0x8077A080, &lit_8593); -#pragma pop - -/* 8077A084-8077A088 000288 0004+00 0/0 0/0 0/0 .rodata @8594 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8594 = -250.0f; -COMPILER_STRIP_GATE(0x8077A084, &lit_8594); -#pragma pop - -/* 8077A088-8077A08C 00028C 0004+00 0/0 0/0 0/0 .rodata @8595 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8595 = 120.0f; -COMPILER_STRIP_GATE(0x8077A088, &lit_8595); -#pragma pop - -/* 8077A08C-8077A090 000290 0004+00 0/1 0/0 0/0 .rodata @9184 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9184 = -1.0f / 20.0f; -COMPILER_STRIP_GATE(0x8077A08C, &lit_9184); -#pragma pop - -/* 8077A090-8077A094 000294 0004+00 0/1 0/0 0/0 .rodata @9185 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9185 = 38.0f; -COMPILER_STRIP_GATE(0x8077A090, &lit_9185); -#pragma pop - -/* 8077A094-8077A098 000298 0004+00 0/1 0/0 0/0 .rodata @9186 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_9186 = 0x3A83126F; -COMPILER_STRIP_GATE(0x8077A094, &lit_9186); -#pragma pop - -/* 8077A098-8077A09C 00029C 0004+00 0/1 0/0 0/0 .rodata @9187 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9187 = -6.0f; -COMPILER_STRIP_GATE(0x8077A098, &lit_9187); -#pragma pop - -/* 8077A09C-8077A0A0 0002A0 0004+00 0/1 0/0 0/0 .rodata @9188 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9188 = -20000.0f; -COMPILER_STRIP_GATE(0x8077A09C, &lit_9188); -#pragma pop - -/* 8077A0A0-8077A0A4 0002A4 0004+00 0/1 0/0 0/0 .rodata @9189 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9189 = 200000.0f; -COMPILER_STRIP_GATE(0x8077A0A0, &lit_9189); -#pragma pop - -/* 8077A0A4-8077A0A8 0002A8 0004+00 0/1 0/0 0/0 .rodata @9190 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9190 = -10.0f; -COMPILER_STRIP_GATE(0x8077A0A4, &lit_9190); -#pragma pop - -/* 8077A0A8-8077A0AC 0002AC 0004+00 0/1 0/0 0/0 .rodata @9191 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9191 = -200000.0f; -COMPILER_STRIP_GATE(0x8077A0A8, &lit_9191); -#pragma pop - -/* 8077A0AC-8077A0B0 0002B0 0004+00 0/1 0/0 0/0 .rodata @9192 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9192 = -500.0f; -COMPILER_STRIP_GATE(0x8077A0AC, &lit_9192); -#pragma pop - -/* 8077A0B0-8077A0B4 0002B4 0004+00 0/1 0/0 0/0 .rodata @9193 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9193 = 2.0f / 5.0f; -COMPILER_STRIP_GATE(0x8077A0B0, &lit_9193); -#pragma pop - -/* 8077A0BC-8077A0BC 0002C0 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_8077A0BC = "F_SP121"; -#pragma pop - -/* 8077AA1C-8077AA24 0001F4 0004+04 0/2 0/0 0/0 .bss c_start */ -#pragma push -#pragma force_active on -static u8 c_start[4 + 4 /* padding */]; -#pragma pop - -/* 80777330-8077892C 00B650 15FC+00 2/1 0/0 0/0 .text daE_RDY_Execute__FP11e_rdy_class */ -static void daE_RDY_Execute(e_rdy_class* param_0) { - // NONMATCHING -} - -/* 8077892C-80778934 00CC4C 0008+00 1/0 0/0 0/0 .text daE_RDY_IsDelete__FP11e_rdy_class - */ -static bool daE_RDY_IsDelete(e_rdy_class* param_0) { - return true; -} - -/* 80778934-80778998 00CC54 0064+00 1/0 0/0 0/0 .text daE_RDY_Delete__FP11e_rdy_class */ -static void daE_RDY_Delete(e_rdy_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 8077A0BC-8077A0BC 0002C0 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_8077A0C4 = "J_Tobi"; -#pragma pop - -/* 80778998-80778D90 00CCB8 03F8+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */ -static void useHeapInit(fopAc_ac_c* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 8077A0B4-8077A0B8 0002B8 0004+00 0/1 0/0 0/0 .rodata @9541 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9541 = 5000.0f; -COMPILER_STRIP_GATE(0x8077A0B4, &lit_9541); -#pragma pop - -/* 8077A0B8-8077A0BC 0002BC 0004+00 0/1 0/0 0/0 .rodata @9542 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9542 = 100000.0f; -COMPILER_STRIP_GATE(0x8077A0B8, &lit_9542); -#pragma pop - -/* 8077A0BC-8077A0BC 0002C0 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_8077A0CB = "E_rdy"; -SECTION_DEAD static char const* const stringBase_8077A0D1 = "F_SP115"; -#pragma pop - -/* 80778D90-80779340 00D0B0 05B0+00 1/0 0/0 0/0 .text daE_RDY_Create__FP10fopAc_ac_c */ -static void daE_RDY_Create(fopAc_ac_c* param_0) { - // NONMATCHING -} - -/* 80779340-807794E0 00D660 01A0+00 1/1 0/0 0/0 .text __ct__11e_rdy_classFv */ -e_rdy_class::e_rdy_class() { - // NONMATCHING -} - -/* 807794E0-80779528 00D800 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGSphFv */ -// cM3dGSph::~cM3dGSph() { -extern "C" void __dt__8cM3dGSphFv() { - // NONMATCHING -} - -/* 80779528-80779570 00D848 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGAabFv */ -// cM3dGAab::~cM3dGAab() { -extern "C" void __dt__8cM3dGAabFv() { - // NONMATCHING -} - -/* 80779570-8077963C 00D890 00CC+00 1/1 0/0 0/0 .text __dt__8dCcD_SphFv */ -// dCcD_Sph::~dCcD_Sph() { -extern "C" void __dt__8dCcD_SphFv() { - // NONMATCHING -} - -/* 8077963C-807796C0 00D95C 0084+00 1/1 0/0 0/0 .text __ct__8dCcD_SphFv */ -// dCcD_Sph::dCcD_Sph() { -extern "C" void __ct__8dCcD_SphFv() { - // NONMATCHING -} - -/* 807796C0-8077971C 00D9E0 005C+00 1/0 0/0 0/0 .text __dt__10dCcD_GSttsFv */ -// dCcD_GStts::~dCcD_GStts() { -extern "C" void __dt__10dCcD_GSttsFv() { - // NONMATCHING -} - -/* 8077971C-8077978C 00DA3C 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */ -// dBgS_ObjAcch::~dBgS_ObjAcch() { -extern "C" void __dt__12dBgS_ObjAcchFv() { - // NONMATCHING -} - -/* 8077978C-807797FC 00DAAC 0070+00 1/0 0/0 0/0 .text __dt__12dBgS_AcchCirFv */ -// dBgS_AcchCir::~dBgS_AcchCir() { -extern "C" void __dt__12dBgS_AcchCirFv() { - // NONMATCHING -} - -/* 807797FC-80779800 00DB1C 0004+00 1/1 0/0 0/0 .text __ct__5csXyzFv */ -// csXyz::csXyz() { -extern "C" void __ct__5csXyzFv() { - /* empty function */ -} - -/* 80779800-80779838 00DB20 0038+00 1/1 0/0 0/0 .text __ct__11J3DLightObjFv */ -// J3DLightObj::J3DLightObj() { -extern "C" void __ct__11J3DLightObjFv() { - // NONMATCHING -} - -/* 80779838-80779880 00DB58 0048+00 1/0 0/0 0/0 .text __dt__10cCcD_GSttsFv */ -// cCcD_GStts::~cCcD_GStts() { -extern "C" void __dt__10cCcD_GSttsFv() { - // NONMATCHING -} - -/* 80779880-807798C8 00DBA0 0048+00 2/1 0/0 0/0 .text __dt__13daE_RDY_HIO_cFv */ -daE_RDY_HIO_c::~daE_RDY_HIO_c() { - // NONMATCHING -} - -/* 807798C8-80779920 00DBE8 0058+00 0/0 1/0 0/0 .text __sinit_d_a_e_rdy_cpp */ -void __sinit_d_a_e_rdy_cpp() { - // NONMATCHING -} - -#pragma push -#pragma force_active on -REGISTER_CTORS(0x807798C8, __sinit_d_a_e_rdy_cpp); -#pragma pop - -/* 80779920-80779928 00DC40 0008+00 1/0 0/0 0/0 .text @20@__dt__14dBgS_ObjGndChkFv */ -static void func_80779920() { - // NONMATCHING -} - -/* 80779928-80779930 00DC48 0008+00 1/0 0/0 0/0 .text @76@__dt__14dBgS_ObjGndChkFv */ -static void func_80779928() { - // NONMATCHING -} - -/* 80779930-80779938 00DC50 0008+00 1/0 0/0 0/0 .text @60@__dt__14dBgS_ObjGndChkFv */ -static void func_80779930() { - // NONMATCHING -} - -/* 80779938-80779940 00DC58 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */ -static void func_80779938() { - // NONMATCHING -} - -/* 80779940-80779948 00DC60 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */ -static void func_80779940() { - // NONMATCHING -} - -/* 80779D5C-80779D98 00E07C 003C+00 1/1 0/0 0/0 .text __dt__5csXyzFv */ -// csXyz::~csXyz() { -extern "C" void __dt__5csXyzFv() { - // NONMATCHING -} - -/* 80779D98-80779DD4 00E0B8 003C+00 1/1 0/0 0/0 .text __dt__4cXyzFv */ -// cXyz::~cXyz() { -extern "C" void __dt__4cXyzFv() { - // NONMATCHING -} - -/* 80779DD4-80779DE8 00E0F4 0014+00 1/1 0/0 0/0 .text changeDemoMode__9daPy_py_cFUliis */ -// void daPy_py_c::changeDemoMode(u32 param_0, int param_1, int param_2, s16 param_3) { -extern "C" void changeDemoMode__9daPy_py_cFUliis() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 8077AA24-8077AA28 0001FC 0004+00 0/0 0/0 0/0 .bss - * sInstance__40JASGlobalInstance<19JASDefaultBankTable> */ -#pragma push -#pragma force_active on -static u8 data_8077AA24[4]; -#pragma pop - -/* 8077AA28-8077AA2C 000200 0004+00 0/0 0/0 0/0 .bss - * sInstance__35JASGlobalInstance<14JASAudioThread> */ -#pragma push -#pragma force_active on -static u8 data_8077AA28[4]; -#pragma pop - -/* 8077AA2C-8077AA30 000204 0004+00 0/0 0/0 0/0 .bss sInstance__27JASGlobalInstance<7Z2SeMgr> */ -#pragma push -#pragma force_active on -static u8 data_8077AA2C[4]; -#pragma pop - -/* 8077AA30-8077AA34 000208 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8Z2SeqMgr> */ -#pragma push -#pragma force_active on -static u8 data_8077AA30[4]; -#pragma pop - -/* 8077AA34-8077AA38 00020C 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SceneMgr> - */ -#pragma push -#pragma force_active on -static u8 data_8077AA34[4]; -#pragma pop - -/* 8077AA38-8077AA3C 000210 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2StatusMgr> - */ -#pragma push -#pragma force_active on -static u8 data_8077AA38[4]; -#pragma pop - -/* 8077AA3C-8077AA40 000214 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2DebugSys> - */ -#pragma push -#pragma force_active on -static u8 data_8077AA3C[4]; -#pragma pop - -/* 8077AA40-8077AA44 000218 0004+00 0/0 0/0 0/0 .bss - * sInstance__36JASGlobalInstance<15JAISoundStarter> */ -#pragma push -#pragma force_active on -static u8 data_8077AA40[4]; -#pragma pop - -/* 8077AA44-8077AA48 00021C 0004+00 0/0 0/0 0/0 .bss - * sInstance__35JASGlobalInstance<14Z2SoundStarter> */ -#pragma push -#pragma force_active on -static u8 data_8077AA44[4]; -#pragma pop - -/* 8077AA48-8077AA4C 000220 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12Z2SpeechMgr2> */ -#pragma push -#pragma force_active on -static u8 data_8077AA48[4]; -#pragma pop - -/* 8077AA4C-8077AA50 000224 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8JAISeMgr> */ -#pragma push -#pragma force_active on -static u8 data_8077AA4C[4]; -#pragma pop - -/* 8077AA50-8077AA54 000228 0004+00 0/0 0/0 0/0 .bss sInstance__29JASGlobalInstance<9JAISeqMgr> */ -#pragma push -#pragma force_active on -static u8 data_8077AA50[4]; -#pragma pop - -/* 8077AA54-8077AA58 00022C 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAIStreamMgr> */ -#pragma push -#pragma force_active on -static u8 data_8077AA54[4]; -#pragma pop - -/* 8077AA58-8077AA5C 000230 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SoundMgr> - */ -#pragma push -#pragma force_active on -static u8 data_8077AA58[4]; -#pragma pop - -/* 8077AA5C-8077AA60 000234 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAISoundInfo> */ -#pragma push -#pragma force_active on -static u8 data_8077AA5C[4]; -#pragma pop - -/* 8077AA60-8077AA64 000238 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13JAUSoundTable> */ -#pragma push -#pragma force_active on -static u8 data_8077AA60[4]; -#pragma pop - -/* 8077AA64-8077AA68 00023C 0004+00 0/0 0/0 0/0 .bss - * sInstance__38JASGlobalInstance<17JAUSoundNameTable> */ -#pragma push -#pragma force_active on -static u8 data_8077AA64[4]; -#pragma pop - -/* 8077AA68-8077AA6C 000240 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAUSoundInfo> */ -#pragma push -#pragma force_active on -static u8 data_8077AA68[4]; -#pragma pop - -/* 8077AA6C-8077AA70 000244 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SoundInfo> - */ -#pragma push -#pragma force_active on -static u8 data_8077AA6C[4]; -#pragma pop - -/* 8077AA70-8077AA74 000248 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13Z2SoundObjMgr> */ -#pragma push -#pragma force_active on -static u8 data_8077AA70[4]; -#pragma pop - -/* 8077AA74-8077AA78 00024C 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2Audience> - */ -#pragma push -#pragma force_active on -static u8 data_8077AA74[4]; -#pragma pop - -/* 8077AA78-8077AA7C 000250 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2FxLineMgr> - */ -#pragma push -#pragma force_active on -static u8 data_8077AA78[4]; -#pragma pop - -/* 8077AA7C-8077AA80 000254 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2EnvSeMgr> - */ -#pragma push -#pragma force_active on -static u8 data_8077AA7C[4]; -#pragma pop - -/* 8077AA80-8077AA84 000258 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SpeechMgr> - */ -#pragma push -#pragma force_active on -static u8 data_8077AA80[4]; -#pragma pop - -/* 8077AA84-8077AA88 00025C 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13Z2WolfHowlMgr> */ -#pragma push -#pragma force_active on -static u8 data_8077AA84[4]; -#pragma pop - -/* 8077A0BC-8077A0BC 0002C0 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ diff --git a/src/d/actor/d_a_e_wb.cpp b/src/d/actor/d_a_e_wb.cpp index 0c9c8090632..46c06a8edf9 100644 --- a/src/d/actor/d_a_e_wb.cpp +++ b/src/d/actor/d_a_e_wb.cpp @@ -2490,12 +2490,6 @@ static void demo_camera(e_wb_class* param_0) { // NONMATCHING } -/* 807DFAB4-807DFAD8 00D714 0024+00 1/1 0/0 0/0 .text fadeIn__13mDoGph_gInf_cFfR8_GXColor - */ -void mDoGph_gInf_c::fadeIn(f32 param_0, _GXColor& param_1) { - // NONMATCHING -} - /* 807DFAD8-807DFAEC 00D738 0014+00 1/1 0/0 0/0 .text checkSkipEdge__14dEvt_control_cFv */ extern "C" void checkSkipEdge__14dEvt_control_cFv() { diff --git a/src/d/actor/d_a_e_yc.cpp b/src/d/actor/d_a_e_yc.cpp index 44df0723814..e903955e0ba 100644 --- a/src/d/actor/d_a_e_yc.cpp +++ b/src/d/actor/d_a_e_yc.cpp @@ -140,7 +140,7 @@ static void e_yc_fly(e_yc_class* i_this) { case 3: target_speed = 25.0f; - if (rider->field_0x1372 > 200) { + if (rider->mDemoTimer > 200) { target_speed = 35.0f; accel = 0.25f; } @@ -150,10 +150,10 @@ static void e_yc_fly(e_yc_class* i_this) { case 4: accel = 0.3f; - if (rider->field_0x1372 == 30) { + if (rider->mDemoTimer == 30) { anm_init(i_this, e_yc_class::ANM_FLY_BRAKE, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); } - if (rider->field_0x1372 == 60) { + if (rider->mDemoTimer == 60) { anm_init(i_this, e_yc_class::ANM_HOVERING, 10.0f, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f); } i_this->mMaxAngleSpeed = 300.0f; @@ -361,8 +361,8 @@ static void e_yc_attack(e_yc_class* i_this) { break; case 4: - if (frame == 11 && rider->field_0x1370 == 0 & i_this->mDistToPlayer < 200.0f) { - rider->field_0x1370 = 1; + if (frame == 11 && rider->mDemoMode == 0 & i_this->mDistToPlayer < 200.0f) { + rider->mDemoMode = 1; i_this->mCreatureSound.startCreatureSound(Z2SE_EN_YC_HIT_SIDE, 0, -1); } @@ -371,7 +371,7 @@ static void e_yc_attack(e_yc_class* i_this) { cLib_addCalc2(&i_this->current.pos.z, i_this->mTargetPos.z, 1.0f, 30.0f); if (i_this->mpMorf->isStop()) { - if (rider->field_0x1370 == 0) { + if (rider->mDemoMode == 0) { i_this->mAction = e_yc_class::ACT_HOVERING; i_this->mMode = 0; } else { @@ -394,7 +394,7 @@ static void e_yc_attack(e_yc_class* i_this) { case 6: if (frame == 30) { - rider->field_0x1370 = 3; + rider->mDemoMode = 3; } if (i_this->mpMorf->isStop()) { @@ -474,7 +474,7 @@ static void e_yc_wolfbite(e_yc_class* i_this) { anm_init(i_this, e_yc_class::ANM_HANGED_BRUSH2, 3.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f); i_this->mMode = 3; - rider->field_0x1370 = 5; + rider->mDemoMode = 5; dScnPly_c::setPauseTimer(7); i_this->mCreatureSound.startCollisionSE(Z2SE_HIT_WOLFBITE, 0x20); dComIfGp_setHitMark(3, i_this, &player->eyePos, &player->shape_angle, NULL, 0);