diff --git a/include/SSystem/SComponent/c_bg_s_lin_chk.h b/include/SSystem/SComponent/c_bg_s_lin_chk.h index 0b5116f3cb..b7d116f2e2 100644 --- a/include/SSystem/SComponent/c_bg_s_lin_chk.h +++ b/include/SSystem/SComponent/c_bg_s_lin_chk.h @@ -36,7 +36,6 @@ public: void SetHit() { mStts |= STTS_HIT; } u32 ChkHit() const { return mStts & STTS_HIT; } void SetCross(const cXyz& pos) { mLin.SetEnd(pos); } - cXyz& i_GetCross() { return mLin.GetEnd(); } cXyz* GetCrossP() { return &mLin.GetEndP(); } cM3dGLin* GetLinP() { return &mLin; } bool ChkBackFlag() const { return mBackFlag; } diff --git a/include/Z2AudioLib/Z2LinkMgr.h b/include/Z2AudioLib/Z2LinkMgr.h index 21c0509c13..d86f81cf8d 100644 --- a/include/Z2AudioLib/Z2LinkMgr.h +++ b/include/Z2AudioLib/Z2LinkMgr.h @@ -18,7 +18,6 @@ public: Z2CreatureLink(); ~Z2CreatureLink(); - void setLinkState(u8); void setLinkGroupInfo(u8); void setLinkHp(s32, s32); void setLinkSwordType(s32, s32); @@ -48,7 +47,7 @@ public: u8 getLinkState() const { return mLinkState; } u8 getMoveSpeed() const { return mMoveSpeed; } bool isRiding() const { return mRiding; } - void i_setLinkState(u8 i_state) { mLinkState = i_state; } + void setLinkState(u8 i_state) { mLinkState = i_state; } Z2SoundObjSimple& getKantera() { return mKantera; } u8 getLinkHp() const { return mLinkHp; } u8 getMovingTime() { return mMovingTime; } diff --git a/include/d/actor/d_a_alink.h b/include/d/actor/d_a_alink.h index c63418f9bd..d8cd3b1dff 100644 --- a/include/d/actor/d_a_alink.h +++ b/include/d/actor/d_a_alink.h @@ -3183,7 +3183,7 @@ public: virtual f32 getSinkShapeOffset() const; virtual BOOL checkSinkDead() const; virtual BOOL checkHorseStart(); - virtual Z2WolfHowlMgr* getWolfHowlMgrP(); + virtual Z2WolfHowlMgr* getWolfHowlMgrP() { return &mZ2WolfHowlMgr; } virtual BOOL checkWolfHowlSuccessAnime() const; virtual BOOL checkCopyRodTopUse(); virtual bool checkCopyRodEquip() const; @@ -3192,7 +3192,7 @@ public: u32 checkModeFlg(u32 pFlag) const { return mModeFlg & pFlag; } BOOL checkSmallUpperGuardAnime() const { return checkUpperAnime(0x16); } BOOL checkFmChainGrabAnime() const { return checkUpperAnime(0x62) || checkUpperAnime(0x2A0); } - Z2WolfHowlMgr* i_getWolfHowlMgrP() { return &mZ2WolfHowlMgr; } + // this might be a fake match, but helps fix usage in many functions #pragma optimization_level 2 @@ -3359,7 +3359,7 @@ public: var_r5 = 0; if (mItemAcKeep.getActor() != NULL && - mItemAcKeep.getActor()->eventInfo.i_checkCommandDemoAccrpt() != 0) { + mItemAcKeep.getActor()->eventInfo.checkCommandDemoAccrpt() != 0) { var_r5 = 1; } diff --git a/include/d/actor/d_a_b_gnd.h b/include/d/actor/d_a_b_gnd.h index b39343f27a..603f9d44bc 100644 --- a/include/d/actor/d_a_b_gnd.h +++ b/include/d/actor/d_a_b_gnd.h @@ -18,9 +18,6 @@ */ struct g_himo_s { - /* 80601D40 */ ~g_himo_s(); - /* 80601DA0 */ g_himo_s(); - /* 0x0 */ cXyz field_0x0[16]; }; @@ -32,94 +29,85 @@ public: /* 0x05AC */ request_of_phase_process_class mPhaseReq; /* 0x05B4 */ request_of_phase_process_class mHorsePhaseReq; - /* 0x05BC */ s16 field_0x05bc; - /* 0x05BE */ u8 field_0x05be; - /* 0x05BF */ u8 field_0x05BF[0x05C0 - 0x05BF]; - /* 0x05C0 */ cXyz field_0x05c0; - /* 0x05CC */ s16 field_0x05cc; - /* 0x05CE */ u8 field_0x05CE[0x05D0 - 0x05CE]; + /* 0x05BC */ s16 mMoveMode; + /* 0x05BE */ u8 field_0x5be; + /* 0x05C0 */ cXyz field_0x5c0; + /* 0x05CC */ s16 field_0x5cc; /* 0x05D0 */ mDoExt_McaMorfSO* mpModelMorf; /* 0x05D4 */ mDoExt_McaMorfSO* mpHorseMorf; - /* 0x05D8 */ mDoExt_McaMorf* field_0x05d8; - /* 0x05DC */ Z2CreatureEnemy mZ2Creature; - /* 0x0680 */ Z2CreatureEnemy field_0x0680; - /* 0x0724 */ mDoExt_brkAnm* field_0x0724; - /* 0x0728 */ mDoExt_btkAnm* field_0x0728[6]; - /* 0x0740 */ u8 field_0x0740[0x0744 - 0x0740]; - /* 0x0744 */ mDoExt_btpAnm* field_0x0744; - /* 0x0748 */ int field_0x0748; - /* 0x074C */ mDoExt_btpAnm* field_0x074c; - /* 0x0750 */ mDoExt_btkAnm* field_0x0750; - /* 0x0754 */ u8 field_0x0754; - /* 0x0755 */ u8 field_0x0755[0x0758 - 0x0755]; + /* 0x05D8 */ mDoExt_McaMorf* mpZeldaModel; + /* 0x05DC */ Z2CreatureEnemy mGndSound; + /* 0x0680 */ Z2CreatureEnemy mHorseSound; + /* 0x0724 */ mDoExt_brkAnm* mpGndCoreBrk; + /* 0x0728 */ mDoExt_btkAnm* mpGndEyeBtk[6]; + /* 0x0740 */ u8 field_0x740[0x0744 - 0x0740]; + /* 0x0744 */ mDoExt_btpAnm* mpGndEyeBtp; + /* 0x0748 */ int mGndEyeBtkNo; + /* 0x074C */ mDoExt_btpAnm* mpZeldaBtp; + /* 0x0750 */ mDoExt_btkAnm* mpZeldaBtk; + /* 0x0754 */ u8 mDrawZelda; /* 0x0758 */ int mAnmID; /* 0x075C */ int mHorseAnmID; /* 0x0760 */ f32 mPlaySpeed; - /* 0x0764 */ u8 field_0x0764[0x0768 - 0x0764]; - /* 0x0768 */ J3DModel* field_0x0768; - /* 0x076C */ J3DModel* field_0x076c; - /* 0x0770 */ u8 field_0x0770; - /* 0x0771 */ u8 field_0x0771; - /* 0x0772 */ s16 field_0x0772; - /* 0x0774 */ dKy_tevstr_c field_0x0774; - /* 0x0AFC */ s16 field_0x0afc; - /* 0x0AFE */ s16 mActionID; - /* 0x0B00 */ s16 field_0x0b00; - /* 0x0B02 */ u8 field_0x0B02[0x0B94 - 0x0B02]; - /* 0x0B94 */ J3DModel* field_0x0b94[36]; - /* 0x0C24 */ s16 field_0x0c24; - /* 0x0C26 */ s16 field_0x0c26; - /* 0x0C28 */ s16 field_0x0c28; - /* 0x0C2A */ u8 field_0x0C2A[0x0C2C - 0x0C2A]; - /* 0x0C2C */ J3DModel* field_0x0c2c[2]; - /* 0x0C34 */ u8 field_0x0C34[0x0C38 - 0x0C34]; - /* 0x0C38 */ f32 field_0x0c38; - /* 0x0C3C */ s16 field_0x0c3c; - /* 0x0C3E */ u8 field_0x0C3E[0x0C40 - 0x0C3E]; + /* 0x0764 */ u8 field_0x764[0x0768 - 0x0764]; + /* 0x0768 */ J3DModel* mpSwordModel; + /* 0x076C */ J3DModel* mpSheathModel; + /* 0x0770 */ u8 field_0x770; + /* 0x0771 */ u8 mHideSheath; + /* 0x0772 */ s16 field_0x772; + /* 0x0774 */ dKy_tevstr_c mSwordTevstr; + /* 0x0AFC */ s16 mCounter; + /* 0x0AFE */ s16 mActionMode; + /* 0x0B00 */ s16 field_0xb00; + /* 0x0B02 */ u8 field_0xB02[0x0B94 - 0x0B02]; + /* 0x0B94 */ J3DModel* mpMantShadowModel[36]; + /* 0x0C24 */ s16 mSwordBlurAlpha; + /* 0x0C26 */ s16 mSwordBlurType; + /* 0x0C28 */ s16 field_0xc28; + /* 0x0C2C */ J3DModel* mpSwordBlurModel[2]; + /* 0x0C34 */ u8 field_0xC34[0x0C38 - 0x0C34]; + /* 0x0C38 */ f32 mPlayerDistXZ; + /* 0x0C3C */ s16 mPlayerAngleY; /* 0x0C40 */ u32 mShadowID; - /* 0x0C44 */ s16 field_0x0c44[10]; - /* 0x0C58 */ s16 field_0x0c58; - /* 0x0C5A */ s16 field_0x0c5a; - /* 0x0C5C */ s16 field_0x0c5c; - /* 0x0C5D */ u8 field_0x0C5E[0x0C60 - 0x0C5E]; - /* 0x0C60 */ int field_0x0c60; - /* 0x0C64 */ int field_0x0c64; - /* 0x0C68 */ s16 field_0x0c68; - /* 0x0C6A */ s16 field_0x0c6a; - /* 0x0C6C */ f32 field_0x0c6c; - /* 0x0C70 */ s16 field_0x0c70; - /* 0x0C72 */ s16 field_0x0c72; - /* 0x0C74 */ s16 field_0x0c74; - /* 0x0C76 */ u8 field_0x0c76; - /* 0x0C77 */ u8 field_0x0c77; - /* 0x0C78 */ u8 field_0x0c78; - /* 0x0C79 */ u8 field_0x0c79; - /* 0x0C7A */ u8 field_0x0c7a; - /* 0x0C7B */ u8 field_0x0c7b; - /* 0x0C7C */ u8 field_0x0c7c; - /* 0x0C7D */ u8 field_0x0c7d; - /* 0x0C7E */ u8 field_0x0C7E[0x0C80 - 0x0C7E]; - /* 0x0C80 */ cXyz field_0x0c80; - /* 0x0C8C */ s16 field_0x0c8c; - /* 0x0C8E */ s16 field_0x0c8e; - /* 0x0C90 */ s16 field_0x0c90; - /* 0x0C92 */ s16 field_0x0c92; - /* 0x0C94 */ dBgS_AcchCir mWall; - /* 0x0CD4 */ dBgS_ObjAcch field_0x0cd4; - /* 0x0EAC */ s16 field_0x0eac; - /* 0x0EAE */ u8 field_0x0EAE[0x0EB0 - 0x0EAE]; - /* 0x0EB0 */ f32 field_0x0eb0; - /* 0x0EB4 */ cXyz field_0x0eb4; - /* 0x0EC0 */ csXyz field_0x0ec0; - /* 0x0EC6 */ u8 field_0x0EC6[0x0EC8 - 0x0EC6]; - /* 0x0EC8 */ dCcD_Stts field_0x0ec8; - /* 0x0F04 */ dCcD_Sph mHorseSpheres1[2]; - /* 0x1174 */ dCcD_Sph mHorseSpheres2[4]; - /* 0x1654 */ dCcD_Stts field_0x1654; - /* 0x1690 */ dCcD_Sph field_0x1690[3]; - /* 0x1A38 */ dCcD_Sph field_0x1a38; - /* 0x1B70 */ dCcD_Sph field_0x1b70; - /* 0x1CA8 */ dCcD_Cyl field_0x1ca8; + /* 0x0C44 */ s16 field_0xc44[10]; + /* 0x0C58 */ s16 mDamageInvulnerabilityTimer; + /* 0x0C5A */ s16 field_0xc5a; + /* 0x0C5C */ s16 mHorseLegRot; + /* 0x0C60 */ int field_0xc60; + /* 0x0C64 */ int field_0xc64; + /* 0x0C68 */ s16 field_0xc68; + /* 0x0C6A */ s16 field_0xc6a; + /* 0x0C6C */ f32 field_0xc6c; + /* 0x0C70 */ s16 field_0xc70; + /* 0x0C72 */ s16 field_0xc72; + /* 0x0C74 */ s16 field_0xc74; + /* 0x0C76 */ u8 mGakeChkType; + /* 0x0C77 */ u8 field_0xc77; + /* 0x0C78 */ u8 field_0xc78; + /* 0x0C79 */ u8 field_0xc79; + /* 0x0C7A */ u8 field_0xc7a; + /* 0x0C7B */ u8 field_0xc7b; + /* 0x0C7C */ u8 field_0xc7c; + /* 0x0C7D */ s8 field_0xc7d; + /* 0x0C80 */ cXyz field_0xc80; + /* 0x0C8C */ s16 mGndBodyRotX; + /* 0x0C8E */ s16 mGndHeadRotZ; + /* 0x0C90 */ s16 field_0xc90; + /* 0x0C92 */ s16 field_0xc92; + /* 0x0C94 */ dBgS_AcchCir mAcchCir; + /* 0x0CD4 */ dBgS_ObjAcch mAcch; + /* 0x0EAC */ s16 field_0xeac; + /* 0x0EB0 */ f32 field_0xeb0; + /* 0x0EB4 */ cXyz field_0xeb4; + /* 0x0EC0 */ csXyz field_0xec0; + /* 0x0EC8 */ dCcD_Stts mHorseCcStts; + /* 0x0F04 */ dCcD_Sph mHorseBodySph[2]; + /* 0x1174 */ dCcD_Sph mHorseFootSph[4]; + /* 0x1654 */ dCcD_Stts mGndCcStts; + /* 0x1690 */ dCcD_Sph mGndSph[3]; + /* 0x1A38 */ dCcD_Sph mAtSph; + /* 0x1B70 */ dCcD_Sph mDefSph; + /* 0x1CA8 */ dCcD_Cyl mCoCyl; /* 0x1DE4 */ dCcU_AtInfo mAtInfo; /* 0x1E08 */ u8 field_0x1e08; /* 0x1E09 */ u8 field_0x1e09; @@ -133,61 +121,69 @@ public: /* 0x1E2C */ Z2SoundObjSimple field_0x1e2c; /* 0x1E4C */ f32 field_0x1e4c; /* 0x1E50 */ csXyz field_0x1e50; - /* 0x1E56 */ u8 field_0x1e56[5]; - /* 0x1E5B */ u8 field_0x1E5B[0x1E5C - 0x1E5B]; - /* 0x1E5C */ cXyz field_0x1e5c[5]; + /* 0x1E56 */ s8 field_0x1e56[5]; + /* 0x1E5C */ cXyz mLightBallPos[5]; /* 0x1E98 */ cXyz field_0x1e98[5]; /* 0x1ED4 */ cXyz field_0x1ed4[5]; - /* 0x1F10 */ Z2SoundObjSimple field_0x1f10[5]; + /* 0x1F10 */ Z2SoundObjSimple mLightBallSound[5]; /* 0x1FB0 */ u8 mInitHIO; - /* 0x1FB0 */ u8 field_0x1FB1[0x1FB4 - 0x1FB1]; /* 0x1FB4 */ fpc_ProcID mMantChildID; /* 0x1FB8 */ cXyz field_0x1fb8; - /* 0x1FC4 */ int field_0x1fc4; + /* 0x1FC4 */ int mDrawHorse; /* 0x1FC8 */ s16 field_0x1fc8; - /* 0x1FCA */ s16 field_0x1fca; - /* 0x1FCC */ s16 field_0x1fcc; - /* 0x1FCE */ u8 field_0x1FCE[0x1FD0 - 0x1FCE]; + /* 0x1FCA */ s16 mGndArmRRotX; + /* 0x1FCC */ s16 mGndShoulderLRotY; /* 0x1FD0 */ f32 field_0x1fd0; /* 0x1FD4 */ s16 field_0x1fd4; /* 0x1FD6 */ s16 field_0x1fd6; /* 0x1FD8 */ cXyz field_0x1fd8[2]; /* 0x1FF0 */ g_himo_s field_0x1ff0[2]; - /* 0x2170 */ mDoExt_3DlineMat1_c field_0x2170[2]; + /* 0x2170 */ mDoExt_3DlineMat1_c mHorseReins[2]; /* 0x21E8 */ mDoExt_3DlineMat1_c field_0x21e8; /* 0x2224 */ dKy_tevstr_c field_0x2224; - /* 0x25AC */ u32 field_0x25ac[17]; - /* 0x25F0 */ u8 field_0x25F0[0x2688 - 0x25F0]; + /* 0x25AC */ u32 field_0x25ac[2]; + /* 0x25B4 */ u32 field_0x25b4; + /* 0x25B8 */ u32 field_0x25b8; + /* 0x25BC */ u32 field_0x25bc; + /* 0x25C0 */ u32 field_0x25c0; + /* 0x25C4 */ u32 field_0x25c4; + /* 0x25C8 */ u32 field_0x25c8; + /* 0x25CC */ u32 field_0x25cc; + /* 0x25D0 */ u32 field_0x25d0; + /* 0x25D4 */ u32 field_0x25d4; + /* 0x25D8 */ u32 field_0x25d8; + /* 0x25DC */ u32 field_0x25dc; + /* 0x25E0 */ u32 field_0x25e0; + /* 0x25E4 */ u32 field_0x25e4[3]; + /* 0x25F0 */ u32 field_0x25f0[6]; + /* 0x2608 */ u32 field_0x2608[5][6]; + /* 0x2680 */ u32 field_0x2680[2]; /* 0x2688 */ u32 field_0x2688; /* 0x268C */ u32 field_0x268c[3]; /* 0x2698 */ u8 field_0x2698; /* 0x2699 */ u8 field_0x2699; /* 0x269C */ cXyz field_0x269c; /* 0x26A8 */ cXyz field_0x26a8[2]; - /* 0x26C0 */ s16 field_0x26c0; + /* 0x26C0 */ s16 mGndLegRotX; /* 0x26C2 */ s16 field_0x26c2; - /* 0x26C4 */ s16 field_0x26c4; - /* 0x26C6 */ s16 field_0x26c6; - /* 0x26C8 */ cXyz field_0x26c8; - /* 0x26D4 */ cXyz field_0x26d4; - /* 0x26E0 */ cXyz field_0x26e0; - /* 0x26EC */ cXyz field_0x26ec; - /* 0x26F8 */ cXyz field_0x26f8; - /* 0x2704 */ cXyz field_0x2704; + /* 0x26C4 */ s16 mDemoCamMode; + /* 0x26C6 */ s16 mDemoCamTimer; + /* 0x26C8 */ cXyz mDemoCamEye; + /* 0x26D4 */ cXyz mDemoCamCenter; + /* 0x26E0 */ cXyz mDemoCamEyeTarget; + /* 0x26EC */ cXyz mDemoCamCenterTarget; + /* 0x26F8 */ cXyz mDemoCamEyeSpd; + /* 0x2704 */ cXyz mDemoCamCenterSpd; /* 0x2710 */ cXyz field_0x2710; /* 0x271C */ s16 field_0x271c; - /* 0x271E */ u8 field_0x271E[0x2720 - 0x271E]; /* ox2720 */ cXyz field_0x2720; /* 0x272C */ s16 field_0x272c; - /* 0x272E */ u8 field_0x272E[0x2730 - 0x272E]; - /* 0x2730 */ f32 field_0x2730; - /* 0x2734 */ f32 field_0x2734; - /* 0x2738 */ u8 field_0x2738; + /* 0x2730 */ f32 mTubazeriPushValue; + /* 0x2734 */ f32 mTubazeriPushAmount; + /* 0x2738 */ u8 mNoDrawTimer; /* 0x2739 */ u8 field_0x2739; - /* 0x273A */ u8 field_0x273A[0x273C - 0x273A]; - /* 0x273C */ f32 field_0x273c; + /* 0x273C */ f32 mKankyoBlend; /* 0x2740 */ u8 field_0x2740; - /* 0x2741 */ u8 field_0x2741[0x2744 - 0x2741]; /* 0x2744 */ dMsgFlow_c mMsgFlow; }; @@ -196,10 +192,9 @@ STATIC_ASSERT(sizeof(b_gnd_class) == 0x2790); class daB_GND_HIO_c { public: /* 805F4A4C */ daB_GND_HIO_c(); - /* 80602230 */ ~daB_GND_HIO_c(); + /* 80602230 */ virtual ~daB_GND_HIO_c() {} - /* 0x00 */ f32 field_0x0; - /* 0x04 */ s8 field_0x4; + /* 0x04 */ s8 no; /* 0x08 */ f32 model_size; /* 0x0C */ f32 field_0xc; /* 0x10 */ f32 field_0x10; diff --git a/include/d/actor/d_a_formation_mng.h b/include/d/actor/d_a_formation_mng.h index bcf73ba099..648ee4ffd8 100644 --- a/include/d/actor/d_a_formation_mng.h +++ b/include/d/actor/d_a_formation_mng.h @@ -185,7 +185,7 @@ struct daFmtMng_c : public fopAc_ac_c { } bool checkEmergency() { - if (dKy_darkworld_check() || !daPy_py_c::i_checkNowWolf()) { + if (dKy_darkworld_check() || !daPy_py_c::checkNowWolf()) { return false; } FmtMember_c* member = mMember; diff --git a/include/d/actor/d_a_guard_mng.h b/include/d/actor/d_a_guard_mng.h index 7a0dbf25f0..4d7e2e6c52 100644 --- a/include/d/actor/d_a_guard_mng.h +++ b/include/d/actor/d_a_guard_mng.h @@ -24,7 +24,7 @@ public: 0x00000200, 0x00000201, }; - if (!daPy_py_c::i_checkNowWolf() || field_0x573 >= mLimitNum) { + if (!daPy_py_c::checkNowWolf() || field_0x573 >= mLimitNum) { return 1; } else { if (field_0x571 < mMerchantNum) { diff --git a/include/d/actor/d_a_horse.h b/include/d/actor/d_a_horse.h index fdf887030c..c02b5458f6 100644 --- a/include/d/actor/d_a_horse.h +++ b/include/d/actor/d_a_horse.h @@ -130,8 +130,6 @@ public: PROC_NONE_e = 8, }; - fopAc_ac_c* getZeldaActor(); - void cancelOriginalDemo() { field_0x16b8 = 2; m_demoMode = 1; @@ -139,7 +137,6 @@ public: /* 807E27F8 */ void onDemoJumpDistance(f32, f32); /* 807E28B8 */ void changeDemoPos0(cXyz const*); - /* 807E28E0 */ void setHorsePosAndAngle(cXyz const*, s16); /* 80838498 */ void coHitCallbackBoarJump(fopAc_ac_c*); /* 80838798 */ void coHitCallbackBoarHit(fopAc_ac_c*, dCcD_GObjInf*); /* 80838904 */ void coHitCallbackCowHit(fopAc_ac_c*); @@ -225,7 +222,6 @@ public: /* 8084478C */ ~daHorse_c(); /* 80182D04 */ void getLashDashStart() const; - bool checkNoBombProc() const { return m_procID == PROC_WAIT_e || m_procID == PROC_MOVE_e; } bool checkResetStateFlg0(daHorse_RFLG0 flag) const { return m_resetStateFlg0 & flag; } @@ -237,7 +233,7 @@ public: void setDemoStickR(f32 stick) { m_demoStickR = stick; } void changeDemoMode(u32 param_0, int param_1) { m_demoMode = param_0; field_0x1728 = param_1; } void changeOriginalDemo() { field_0x16b8 = 3; field_0x1728 = 0; } - void i_setHorsePosAndAngle(cXyz const* i_pos, s16 i_angle) { (this->*m_setHorsePosAngle)(i_pos, i_angle); } + void setHorsePosAndAngle(cXyz const* i_pos, s16 i_angle) { (this->*m_setHorsePosAngle)(i_pos, i_angle); } void onRideFlg() { (this->*m_onRideFlg)(); } void offRideFlg() { (this->*m_offRideFlg)(); } void onStateFlg0(daHorse_FLG0 flag) { m_stateFlg0 |= flag; } @@ -257,7 +253,7 @@ public: u16 getAnmIdx(int i_idx) const { return m_anmIdx[i_idx]; } int callHorse(const cXyz* param_0) { return (this->*m_callHorse)(param_0); } - daHoZelda_c* i_getZeldaActor() { return (daHoZelda_c*)m_zeldaActorKeep.getActor(); } + daHoZelda_c* getZeldaActor() { return (daHoZelda_c*)m_zeldaActorKeep.getActor(); } bool checkTurnStandCamera() const { return checkResetStateFlg0(RFLG0_TURN_STAND_CAMERA); } bool checkTurnStand() const { return checkResetStateFlg0(RFLG0_TURN_STAND); } diff --git a/include/d/actor/d_a_midna.h b/include/d/actor/d_a_midna.h index c1077de6f8..0be675bf8b 100644 --- a/include/d/actor/d_a_midna.h +++ b/include/d/actor/d_a_midna.h @@ -215,7 +215,6 @@ public: void onForcePanic() { onEndResetStateFlg0(ERFLG0_FORCE_PANIC); } u32 checkForceNormalColor() const; u32 checkForceTiredColor() const; - static bool checkMidnaTired(); void onNoServiceWait(); /* 804BC3E0 */ int modelCallBack(int); @@ -357,7 +356,7 @@ public: return dKy_darkworld_check() == true || dComIfGs_isTransformLV(3); } - static bool i_checkMidnaTired() { + static bool checkMidnaTired() { return dComIfGs_isTransformLV(3) && !dComIfGs_isEventBit(0x1E08); } diff --git a/include/d/actor/d_a_player.h b/include/d/actor/d_a_player.h index 6588ae8ba8..bf844b0b00 100644 --- a/include/d/actor/d_a_player.h +++ b/include/d/actor/d_a_player.h @@ -690,9 +690,9 @@ public: static void setPlayerDamage(int, int); static void setMidnaMotionNum(int); static void setMidnaFaceNum(int); - static BOOL checkShieldGet(); - static BOOL checkSwordGet(); - void changeDemoParam2(s16); + static BOOL checkShieldGet() { return dComIfGs_getSelectEquipShield() != fpcNm_ITEM_NONE; } + inline static BOOL checkSwordGet(); + cXyz getHeadTopPos() const { return mHeadTopPos; } BOOL checkThrowDamage() const { return checkNoResetFlg1(FLG1_THROW_DAMAGE); } BOOL checkGoronSideMove() const { return mSpecialMode == 0x2B; } @@ -1060,7 +1060,7 @@ public: mDemo.setParam1(i_param1); } - void i_changeDemoParam2(s16 i_param2) { + void changeDemoParam2(s16 i_param2) { mDemo.setParam2(i_param2); } @@ -1070,6 +1070,8 @@ public: void setItemPos(cXyz* i_itemPos) { mItemPos = *i_itemPos; } + cXyz* getViewerCurrentPosP() { return &field_0x5f8; } + static bool checkPeepEndSceneChange() { return getLastSceneMode() == 7; } static int getLastSceneDamage() { return (dComIfGs_getLastSceneMode() >> 4) & 0x7F; } @@ -1077,19 +1079,16 @@ public: static BOOL checkNormalSwordEquip() { return dComIfGs_getSelectEquipSword() == fpcNm_ITEM_SWORD; } - inline static u32 i_getLastSceneMode(); inline static u32 getLastSceneMode(); inline static bool checkWoodSwordEquip() { return dComIfGs_getSelectEquipSword() == fpcNm_ITEM_WOOD_STICK; } inline static bool checkLightMasterSwordEquip(); - inline BOOL i_checkSwordGet(); - inline bool i_checkShieldGet() const; - inline static BOOL checkNowWolf(); - inline static u32 i_checkNowWolf() { return ((daPy_py_c*)dComIfGp_getLinkPlayer())->checkWolf(); } + + inline static u32 checkNowWolf() { return ((daPy_py_c*)dComIfGp_getLinkPlayer())->checkWolf(); } inline bool checkZoraWearFlg() const; inline bool checkMagicArmorWearFlg() const; - inline static BOOL i_checkFirstMidnaDemo() { return dComIfGs_isEventBit(0xc10); } + inline static BOOL checkFirstMidnaDemo() { return dComIfGs_isEventBit(0xc10); } static int checkNowWolfPowerUp() { return checkNowWolfEyeUp(); } static daMidna_c* getMidnaActor() { return m_midnaActor; } diff --git a/include/d/d_meter2_info.h b/include/d/d_meter2_info.h index 0f49063324..a11eade4d8 100644 --- a/include/d/d_meter2_info.h +++ b/include/d/d_meter2_info.h @@ -417,7 +417,7 @@ inline void dMeter2Info_allUseButton() { g_meter2_info.allUseButton(); } -inline void i_dMeter2Info_offUseButton(int flag) { +inline void dMeter2Info_offUseButton(int flag) { g_meter2_info.offUseButton(flag); } diff --git a/include/f_op/f_op_actor.h b/include/f_op/f_op_actor.h index e9ae3e1a4d..8c8eaba1d2 100644 --- a/include/f_op/f_op_actor.h +++ b/include/f_op/f_op_actor.h @@ -129,11 +129,13 @@ public: void setEventName(char*); char* getEventName(); void beforeProc(); - void onCondition(u16); - void offCondition(u16); - BOOL checkCommandCatch(); - BOOL checkCommandDoor(); + void onCondition(u16 cond) { mCondition |= cond; } + void offCondition(u16 cond) { mCondition &= ~cond; } + BOOL checkCommandCatch() { return mCommand == dEvtCmd_INCATCH_e; } + BOOL checkCommandDoor() { return mCommand == dEvtCmd_INDOOR_e; } BOOL checkCommandDemoAccrpt() { return mCommand == dEvtCmd_INDEMO_e; } + bool checkCommandTalk() { return mCommand == dEvtCmd_INTALK_e; } + bool checkCommandItem() { return mCommand == dEvtCmd_INGETITEM_e; } void setCommand(u16 command) { mCommand = command; } void setMapToolId(u8 id) { mMapToolId = id; } @@ -147,14 +149,6 @@ public: void setIdx(u8 i_idx) { mIndex = i_idx; } char* getArchiveName() { return mArchiveName; } BOOL chkCondition(u16 condition) { return (mCondition & condition) == condition; } - void i_onCondition(u16 cond) { mCondition |= cond; } - void i_offCondition(u16 cond) { mCondition &= ~cond; } - - bool checkCommandTalk() { return mCommand == dEvtCmd_INTALK_e; } - bool checkCommandItem() { return mCommand == dEvtCmd_INGETITEM_e; } - BOOL i_checkCommandDoor() { return mCommand == dEvtCmd_INDOOR_e; } - bool i_checkCommandDemoAccrpt() { return mCommand == dEvtCmd_INDEMO_e; } - bool i_checkCommandCatch() { return mCommand == dEvtCmd_INCATCH_e; } void suspendProc(void* actor) { if (field_0x10 != NULL) { diff --git a/src/d/actor/d_a_alink.cpp b/src/d/actor/d_a_alink.cpp index bee09a5023..71438df515 100644 --- a/src/d/actor/d_a_alink.cpp +++ b/src/d/actor/d_a_alink.cpp @@ -132,12 +132,6 @@ u8 daAlink_matAnm_c::m_morf_frame; bool daAlink_c::checkWindSpeedOnXZ() const { return field_0x35b8.abs2XZ() > 1.0f; } -bool daPy_py_c::i_checkShieldGet() const { - return dComIfGs_getSelectEquipShield() != fpcNm_ITEM_NONE; -} -u32 daPy_py_c::getLastSceneMode() { - return dComIfGs_getLastSceneMode() & 0xF; -} /* 8009D8E4-8009D90C 098224 0028+00 2/2 0/0 0/0 .text init__16daAlink_matAnm_cFv */ void daAlink_matAnm_c::init() { @@ -5513,7 +5507,7 @@ bool daPy_py_c::checkLightMasterSwordEquip() { return dComIfGs_getSelectEquipSword() == fpcNm_ITEM_LIGHT_SWORD; } -BOOL daPy_py_c::i_checkSwordGet() { +BOOL daPy_py_c::checkSwordGet() { return dComIfGs_getSelectEquipSword() != fpcNm_ITEM_NONE; } @@ -5529,14 +5523,14 @@ void daAlink_c::setSelectEquipItem(int param_0) { mSwordModel = mpSwMModel; mSheathModel = mpSwMSheathModel; } else { - if (!i_checkSwordGet()) { + if (!checkSwordGet()) { mSwordChangeWaitTimer = 100; } mSwordModel = mpSwAModel; mSheathModel = mpSwASheathModel; } - if (!i_checkSwordGet() || checkWoodSwordEquip() || checkNoResetFlg3(FLG3_UNK_1000000)) { + if (!checkSwordGet() || checkWoodSwordEquip() || checkNoResetFlg3(FLG3_UNK_1000000)) { if (field_0x06ec != NULL) { field_0x06ec->hide(); } @@ -5603,7 +5597,7 @@ BOOL daAlink_c::checkCanoeStart() { return (checkStageName("F_SP115") && getStartRoomNo() == 0) && dComIfGs_getStartPoint() == 2; } -u32 daPy_py_c::i_getLastSceneMode() { +u32 daPy_py_c::getLastSceneMode() { return dComIfGs_getLastSceneMode() & 0xF; } @@ -5752,7 +5746,7 @@ void daAlink_c::playerInit() { } else if (dComIfGp_getStartStagePoint() == -4) { field_0x3188 = dComIfGp_evmng_startDemo(0xD5); } else { - if (i_getLastSceneMode() == 9) { + if (getLastSceneMode() == 9) { field_0x3188 = dComIfGp_evmng_startDemo(0xD3); } else if (startMode == 10) { if (startEvent != 0xFF) { @@ -5778,9 +5772,9 @@ void daAlink_c::playerInit() { } } else if (startMode == 12) { field_0x3188 = dComIfGp_evmng_startDemo(0xC9); - } else if (i_getLastSceneMode() == 11) { + } else if (getLastSceneMode() == 11) { field_0x3188 = dComIfGp_evmng_startDemo(0xFF); - } else if (i_getLastSceneMode() == 12) { + } else if (getLastSceneMode() == 12) { field_0x3188 = dComIfGp_evmng_startDemo(0xD1); } else { field_0x3188 = dComIfGp_evmng_startDemo(startEvent); @@ -5858,7 +5852,7 @@ int daAlink_c::setStartProcInit() { } if (horse_start) { - horsep->i_setHorsePosAndAngle(¤t.pos, shape_angle.y); + horsep->setHorsePosAndAngle(¤t.pos, shape_angle.y); horsep->initHorseMtx(); initForceRideHorse(); } @@ -6041,7 +6035,7 @@ int daAlink_c::create() { static int bgWaitFlg = 0; - u32 sceneMode = i_getLastSceneMode(); + u32 sceneMode = getLastSceneMode(); s32 startMode = getStartMode(); s16 startPoint = dComIfGp_getStartStagePoint(); BOOL horseStart = checkHorseStart(sceneMode, startMode); @@ -6404,8 +6398,8 @@ void daAlink_c::iceSlipBgCheck() { sp48.z += field_0x35c4.z * var_f31; if (commonLineCheck(&sp3C, &sp48) && dBgS_CheckBWallPoly(mLinkLinChk)) { - current.pos.x = mLinkLinChk.i_GetCross().x - field_0x35c4.x * var_f31; - current.pos.z = mLinkLinChk.i_GetCross().z - field_0x35c4.z * var_f31; + current.pos.x = mLinkLinChk.GetCross().x - field_0x35c4.x * var_f31; + current.pos.z = mLinkLinChk.GetCross().z - field_0x35c4.z * var_f31; } } } @@ -6573,7 +6567,7 @@ f32 daAlink_c::checkWindWallRate(cXyz const& param_0) { f32 var_f31; if (commonLineCheck(&sp24, &sp18) && dComIfG_Bgsp().GetWallCode(mLinkLinChk) != 0xA) { - var_f31 = (1.0f / (daAlinkHIO_basic_c0::m.mMaxWindInfluenceDist - daAlinkHIO_basic_c0::m.mNoWindInfluenceDist)) * (sp24.abs(mLinkLinChk.i_GetCross()) - daAlinkHIO_basic_c0::m.mNoWindInfluenceDist); + var_f31 = (1.0f / (daAlinkHIO_basic_c0::m.mMaxWindInfluenceDist - daAlinkHIO_basic_c0::m.mNoWindInfluenceDist)) * (sp24.abs(mLinkLinChk.GetCross()) - daAlinkHIO_basic_c0::m.mNoWindInfluenceDist); if (var_f31 < 0.0f) { var_f31 = 0.0f; } @@ -7024,7 +7018,7 @@ void daAlink_c::setMatrix() { } else if (checkReelAnime()) { field_0x2fb6 = 4; } else if (checkEquipAnime() && !checkModeFlg(1)) { - if (checkSwordEquipAnime() && !i_checkShieldGet()) { + if (checkSwordEquipAnime() && !checkShieldGet()) { field_0x2fb6 = 5; } else { field_0x2fb6 = 1; @@ -7037,7 +7031,7 @@ void daAlink_c::setMatrix() { field_0x2fb6 = 7; } else if (checkUpperAnime(0x96) || checkCutDashChargeAnime() || (checkReinRide() && (checkUpperReadyThrowAnime() || checkGrabAnime()))) { field_0x2fb6 = 3; - } else if (checkSwordEquipAnime() && !i_checkShieldGet()) { + } else if (checkSwordEquipAnime() && !checkShieldGet()) { field_0x2fb6 = 2; } else if (checkIronBallWaitAnime()) { if (checkUnderMove0BckNoArc(ANM_IRONBALL_WAIT)) { @@ -7152,7 +7146,7 @@ void daAlink_c::setItemMatrix(int param_0) { } int var_r28; - if (!i_checkSwordGet()) { + if (!checkSwordGet()) { var_r28 = 0; } else if (checkLightMasterSwordEquip()) { var_r28 = 3; @@ -7168,7 +7162,7 @@ void daAlink_c::setItemMatrix(int param_0) { if (param_0 != 0 || (checkPlayerGuardAndAttack() && mEquipItem != fpcNm_ITEM_IRONBALL && !checkModeFlg(0x400)) || checkNoResetFlg0(FLG0_UNK_2) || (mProcID == PROC_TOOL_DEMO && mProcVar4.field_0x3010 != 0) || (mProcID == PROC_CUT_REVERSE && mProcVar2.field_0x300c != 0) || mProcID == PROC_GUARD_BREAK || (mEquipItem == 0x103 && !checkEndResetFlg1(ERFLG1_GANON_FINISH) && !checkModeFlg(0x400))) { mShieldModel->setBaseTRMtx(mpLinkModel->getAnmMtx(field_0x30c2)); - if (i_checkShieldGet()) { + if (checkShieldGet()) { field_0x2e44.offPassNum(0xF); mDoAud_setLinkShieldType(1, 1); } else { @@ -7187,7 +7181,7 @@ void daAlink_c::setItemMatrix(int param_0) { mDoMtx_stack_c::XYZrotM(cM_deg2s(91.0f), cM_deg2s(57.0f), cM_deg2s(180.0f)); mShieldModel->setBaseTRMtx(mDoMtx_stack_c::get()); - if (!i_checkShieldGet()) { + if (!checkShieldGet()) { mDoAud_setLinkShieldType(0, 2); field_0x2e44.onPassNum(0x10); } else { @@ -7469,7 +7463,7 @@ BOOL daAlink_c::checkNoCollisionCorret() { (!strcmp(dComIfGp_getEventManager().getRunEventName(), "SCENE_EXIT") || (fopAcM_getTalkEventPartner(this) && fopAcM_getTalkEventPartner(this) == getMidnaActor()))) || - eventInfo.i_checkCommandDoor()) + eventInfo.checkCommandDoor()) { return true; } @@ -7710,7 +7704,7 @@ void daAlink_c::setAtCollision() { mRopeLinChk.Set(&spBC, &spB0, this); if (dComIfG_Bgsp().LineCross(&mRopeLinChk)) { - spB0 = mRopeLinChk.i_GetCross(); + spB0 = mRopeLinChk.GetCross(); } mAtCps[0].SetStartEnd(spBC, spB0); @@ -9923,7 +9917,7 @@ void daAlink_c::setFrontWallType() { f32 sp40; if (checkModeFlg(2)) { - field_0x34ec = mLinkLinChk.i_GetCross(); + field_0x34ec = mLinkLinChk.GetCross(); } else { sp40 = linchk_tri.getSignedLenPos(¤t.pos); field_0x34ec.set(current.pos.x - (sp40 * linchk_tri.mNormal.x), current.pos.y, current.pos.z - (sp40 * linchk_tri.mNormal.z)); @@ -10102,7 +10096,7 @@ void daAlink_c::setFrontWallType() { BOOL sp24 = commonLineCheck(&chk_start_pos, &chk_end_pos); if (sp24) { - chk_start_pos = mLinkLinChk.i_GetCross(); + chk_start_pos = mLinkLinChk.GetCross(); dComIfG_Bgsp().GetTriPla(mLinkLinChk, &spCC); chk_start_pos.x = (chk_start_pos.x + (25.0f * spCC.mNormal.x)); chk_start_pos.z = (chk_start_pos.z + (25.0f * spCC.mNormal.z)); @@ -10571,7 +10565,7 @@ void daAlink_c::setPlayerPosAndAngle(cXyz const* p_pos, s16 i_angle, int param_2 } if (checkHorseRide()) { - dComIfGp_getHorseActor()->i_setHorsePosAndAngle(¤t.pos, shape_angle.y); + dComIfGp_getHorseActor()->setHorsePosAndAngle(¤t.pos, shape_angle.y); } else if (checkSpinnerRide()) { fopAc_ac_c* rideAc = mRideAcKeep.getActor(); rideAc->current.pos = current.pos; @@ -12181,8 +12175,8 @@ BOOL daAlink_c::checkAutoJumpAction() { if (field_0x3178 != 3 && !checkEndResetFlg0(ERFLG0_NOT_AUTO_JUMP)) { if (sp14 >= sp10 && (!checkBootsOrArmorHeavy() || checkIronBallWaitAnime()) && (field_0x33a8 > 0.85f || (checkIronBallWaitAnime() && field_0x33ac > 0.85f) || mProcID == PROC_WOLF_GIANT_PUZZLE || checkEndResetFlg0(ERFLG0_FORCE_AUTO_JUMP)) && cLib_distanceAngleS(temp_r26, shape_angle.y) < 0x800) { if (var_r29) { - current.pos.x = mLinkLinChk.i_GetCross().x; - current.pos.z = mLinkLinChk.i_GetCross().z; + current.pos.x = mLinkLinChk.GetCross().x; + current.pos.z = mLinkLinChk.GetCross().z; } if (checkWolf()) { @@ -12197,9 +12191,9 @@ BOOL daAlink_c::checkAutoJumpAction() { } } - if (!checkEndResetFlg0(ERFLG0_NOT_HANG) && mSpecialMode != 0x2B && var_r29 && dComIfG_Bgsp().GetWallCode(mLinkLinChk) != 2 && sp28 < -daAlinkHIO_wallHang_c0::m.hang_foot_pos_height && current.pos.y - mWaterY > sp18 && (fabsf(sp44.mNormal.y) <= 0.05f || (sp44.mNormal.y < 0.05f && var_r27 && getWallEdgePos(mLinkLinChk.i_GetCross(), &sp44, &sp58, mLinkLinChk.GetCrossP(), 0)))) { - current.pos.x = mLinkLinChk.i_GetCross().x; - current.pos.z = mLinkLinChk.i_GetCross().z; + if (!checkEndResetFlg0(ERFLG0_NOT_HANG) && mSpecialMode != 0x2B && var_r29 && dComIfG_Bgsp().GetWallCode(mLinkLinChk) != 2 && sp28 < -daAlinkHIO_wallHang_c0::m.hang_foot_pos_height && current.pos.y - mWaterY > sp18 && (fabsf(sp44.mNormal.y) <= 0.05f || (sp44.mNormal.y < 0.05f && var_r27 && getWallEdgePos(mLinkLinChk.GetCross(), &sp44, &sp58, mLinkLinChk.GetCrossP(), 0)))) { + current.pos.x = mLinkLinChk.GetCross().x; + current.pos.z = mLinkLinChk.GetCross().z; if (!checkWolf() && checkClimbCode(mLinkLinChk)) { mPolyInfo1.SetPolyInfo(mLinkLinChk); @@ -13141,7 +13135,7 @@ BOOL daAlink_c::checkItemAction() { } } - if (((dComIfGs_isEventBit(0x2908) || checkNoResetFlg3(FLG3_UNK_8)) && checkGuardActionChange() && !checkUpperReadyThrowAnime() && !checkModeFlg(0x70C52) && i_checkShieldGet() && !checkNotBattleStage()) && ((mLinkAcch.ChkGroundHit() || checkMagneBootsOn()) && dComIfGp_getRStatus() == 0)) { + if (((dComIfGs_isEventBit(0x2908) || checkNoResetFlg3(FLG3_UNK_8)) && checkGuardActionChange() && !checkUpperReadyThrowAnime() && !checkModeFlg(0x70C52) && checkShieldGet() && !checkNotBattleStage()) && ((mLinkAcch.ChkGroundHit() || checkMagneBootsOn()) && dComIfGp_getRStatus() == 0)) { setRStatus(0x3A); if (spActionTrigger()) { @@ -13249,7 +13243,7 @@ BOOL daAlink_c::checkSwordTwirlAnime() const { /* 800B93F4-800B9580 0B3D34 018C+00 7/7 0/0 0/0 .text swordEquip__9daAlink_cFi */ void daAlink_c::swordEquip(int param_0) { - if (i_checkSwordGet()) { + if (checkSwordGet()) { field_0x2fde = 0x103; if (checkReinRide()) { @@ -14593,7 +14587,7 @@ void daAlink_c::posMove() { if (commonLineCheck(&spC0, &spB4)) { dComIfG_Bgsp().GetTriPla(mLinkLinChk, &plane); - f32 temp_f31 = spB4.abs(mLinkLinChk.i_GetCross()); + f32 temp_f31 = spB4.abs(mLinkLinChk.GetCross()); mDoMtx_multVecSR(mMagneBootInvMtx, &plane.mNormal, &spCC); if (cBgW_CheckBWall(spCC.y)) { @@ -14639,7 +14633,7 @@ void daAlink_c::autoGroundHit() { sp5C = current.pos + (sp50 * 100.0f); if (commonMagneLineCheck(&sp68, &sp5C)) { - current.pos = mMagneLineChk.i_GetCross(); + current.pos = mMagneLineChk.GetCross(); onNoResetFlg0(FLG0_UNK_2000); if (checkNoResetFlg1(FLG1_UNK_20000000)) { @@ -15112,7 +15106,7 @@ int daAlink_c::checkSceneChange(int exitID) { exit_mode = 0; } - if (eventInfo.i_checkCommandDoor() || mProcID == PROC_WARP || mProcID == PROC_WOLF_DIG || + if (eventInfo.checkCommandDoor() || mProcID == PROC_WARP || mProcID == PROC_WOLF_DIG || mProcID == PROC_WOLF_DIG_THROUGH || field_0x3106 != 0 || dComIfGp_event_compulsory(this, NULL, -1)) { @@ -15146,7 +15140,7 @@ int daAlink_c::checkSceneChange(int exitID) { if (scn_changed) { onNoResetFlg0(FLG0_UNK_4000); - if (!eventInfo.i_checkCommandDoor()) { + if (!eventInfo.checkCommandDoor()) { mDemo.setOriginalDemoType(); if (checkUpperReadyThrowAnime()) { @@ -15327,7 +15321,7 @@ BOOL daAlink_c::checkSightLine(f32 param_0, cXyz* param_1) { mRopeLinChk.Set(&field_0x3834, &mHeldItemRootPos, this); if (dComIfG_Bgsp().LineCross(&mRopeLinChk)) { - *param_1 = mRopeLinChk.i_GetCross(); + *param_1 = mRopeLinChk.GetCross(); onResetFlg0(RFLG0_UNK_2000000); return 1; } @@ -15352,7 +15346,7 @@ BOOL daAlink_c::checkSightLine(f32 param_0, cXyz* param_1) { BOOL temp_r3 = dComIfG_Bgsp().LineCross(var_r30); if (temp_r3) { - *param_1 = var_r30->i_GetCross(); + *param_1 = var_r30->GetCross(); onResetFlg0(RFLG0_UNK_2000000); } @@ -15913,10 +15907,10 @@ int daAlink_c::checkNewItemChange(u8 param_0) { if (commonLineCheck(&sp38, &sp2C)) { sp2C.x = (sp38.x * 2.0f) - sp2C.x; sp2C.z = (sp38.z * 2.0f) - sp2C.z; - sp20 = mLinkLinChk.i_GetCross(); + sp20 = mLinkLinChk.GetCross(); if (commonLineCheck(&sp38, &sp2C)) { - if (mLinkLinChk.i_GetCross().abs2XZ(sp20) < 14400.0f) { + if (mLinkLinChk.GetCross().abs2XZ(sp20) < 14400.0f) { return ITEM_PROC_NONE; } } @@ -16438,7 +16432,7 @@ void daAlink_c::commonProcInit(daAlink_c::daAlink_PROC i_procID) { if (prev_proc_fishcast && (mItemAcKeep.getActor() == NULL || - !mItemAcKeep.getActor()->eventInfo.i_checkCommandDemoAccrpt()) && + !mItemAcKeep.getActor()->eventInfo.checkCommandDemoAccrpt()) && !checkEndResetFlg0(ERFLG0_UNK_1000)) { deleteEquipItem(0, 0); diff --git a/src/d/actor/d_a_alink_bottle.inc b/src/d/actor/d_a_alink_bottle.inc index 7adde1fd74..74e5aa90d1 100644 --- a/src/d/actor/d_a_alink_bottle.inc +++ b/src/d/actor/d_a_alink_bottle.inc @@ -641,7 +641,7 @@ int daAlink_c::procBottleSwing() { daPy_frameCtrl_c* frameCtrl_p = mUnderFrameCtrl; if (mProcVar2.field_0x300c == 0) { - if (eventInfo.i_checkCommandCatch()) { + if (eventInfo.checkCommandCatch()) { if (mProcVar3.field_0x300e == 0) { dComIfGp_getVibration().StartShock(1, 1, cXyz(0.0f, 1.0f, 0.0f)); mProcVar3.field_0x300e = 1; diff --git a/src/d/actor/d_a_alink_crawl.inc b/src/d/actor/d_a_alink_crawl.inc index 00e4b5c687..2bcd85cd58 100644 --- a/src/d/actor/d_a_alink_crawl.inc +++ b/src/d/actor/d_a_alink_crawl.inc @@ -167,7 +167,7 @@ int daAlink_c::getCrawlMoveVec(cXyz* param_0, cXyz* param_1, cXyz* param_2, int int temp_r27 = dComIfG_Bgsp().GetSpecialCode(mLinkLinChk); if (cBgW_CheckBWall(sp3C.mNormal.y) || (param_3 == 2 && cBgW_CheckBGround(sp3C.mNormal.y))) { - cXyz sp1C = *param_1 - mLinkLinChk.i_GetCross(); + cXyz sp1C = *param_1 - mLinkLinChk.GetCross(); s16 temp_r26 = sp3C.mNormal.atan2sX_Z(); s16 temp_r3 = sp1C.atan2sX_Z(); @@ -205,7 +205,7 @@ int daAlink_c::getCrawlMoveVec(cXyz* param_0, cXyz* param_1, cXyz* param_2, int } if (param_3 == 1 && (temp_r27 == 1 || (sp3C.mNormal.y < field_0x3470 && temp_r27 == 2))) { - *param_2 = *param_1 - mLinkLinChk.i_GetCross(); + *param_2 = *param_1 - mLinkLinChk.GetCross(); return 1; } } @@ -247,7 +247,7 @@ BOOL daAlink_c::checkCrawlSideWall(cXyz* param_0, cXyz* param_1, cXyz* param_2, if (commonLineCheck(param_0, param_1)) { cM3dGPla sp64; - *param_2 = mLinkLinChk.i_GetCross(); + *param_2 = mLinkLinChk.GetCross(); dComIfG_Bgsp().GetTriPla(mLinkLinChk, &sp64); *param_4 = sp64.mNormal.atan2sX_Z(); @@ -255,7 +255,7 @@ BOOL daAlink_c::checkCrawlSideWall(cXyz* param_0, cXyz* param_1, cXyz* param_2, sp4C = *param_2 + (sp64.mNormal * 95.0f); sp58 = (sp4C + *param_2) * 0.5f; if (commonLineCheck(&sp58, &sp4C)) { - *param_3 = mLinkLinChk.i_GetCross(); + *param_3 = mLinkLinChk.GetCross(); dComIfG_Bgsp().GetTriPla(mLinkLinChk, &sp64); *param_5 = sp64.mNormal.atan2sX_Z(); diff --git a/src/d/actor/d_a_alink_cut.inc b/src/d/actor/d_a_alink_cut.inc index ba2d349271..21f0748dff 100644 --- a/src/d/actor/d_a_alink_cut.inc +++ b/src/d/actor/d_a_alink_cut.inc @@ -119,7 +119,7 @@ bool daAlink_c::checkCutFastReady() { if (mEquipItem == fpcNm_ITEM_NONE && (dComIfGs_isEventBit(0x2A80) || checkNoResetFlg3(FLG3_UNK_80))) { - if (checkModeFlg(1) && !checkRideOn() && i_checkSwordGet() && checkModeFlg(4) && + if (checkModeFlg(1) && !checkRideOn() && checkSwordGet() && checkModeFlg(4) && !checkModeFlg(0x40000) && mTargetedActor == NULL && checkEnemyGroup(target_p)) { f32 xz_dist = target_p->eyePos.abs2XZ(current.pos); diff --git a/src/d/actor/d_a_alink_damage.inc b/src/d/actor/d_a_alink_damage.inc index 1fe404b7be..ed03eaad28 100644 --- a/src/d/actor/d_a_alink_damage.inc +++ b/src/d/actor/d_a_alink_damage.inc @@ -106,7 +106,7 @@ void daAlink_c::checkCutLandDamage() { /* 800D70A0-800D7160 0D19E0 00C0+00 2/2 0/0 0/0 .text checkCaughtEscapeCutTurn__9daAlink_cFv */ BOOL daAlink_c::checkCaughtEscapeCutTurn() { - if (mLinkAcch.ChkGroundHit() && (i_checkSwordGet() || checkWolf()) && + if (mLinkAcch.ChkGroundHit() && (checkSwordGet() || checkWolf()) && checkCutTurnInputTrigger()) { if (checkWolf()) { @@ -1458,8 +1458,8 @@ int daAlink_c::procCoLargeDamageWallInit(int param_0, int param_1, s16 param_2, s16 temp_r29 = cM_atan2s(sp18.mNormal.y, sp18.mNormal.absXZ()); current.angle.y = temp_r26; - current.pos.x = mLinkLinChk.i_GetCross().x; - current.pos.z = mLinkLinChk.i_GetCross().z; + current.pos.x = mLinkLinChk.GetCross().x; + current.pos.z = mLinkLinChk.GetCross().z; setOldRootQuaternion(param_2, 0, param_3); diff --git a/src/d/actor/d_a_alink_demo.inc b/src/d/actor/d_a_alink_demo.inc index 5e7eda9681..af31b5bca8 100644 --- a/src/d/actor/d_a_alink_demo.inc +++ b/src/d/actor/d_a_alink_demo.inc @@ -199,7 +199,7 @@ int daAlink_c::checkDemoAction() { if (mDemo.getParam0() != 0) { freeGrabItem(); - if (mDemo.getParam0() == 1 && i_checkSwordGet()) { + if (mDemo.getParam0() == 1 && checkSwordGet()) { if (mEquipItem != 0x103) { deleteEquipItem(FALSE, TRUE); if (checkEquipAnime()) { diff --git a/src/d/actor/d_a_alink_grab.inc b/src/d/actor/d_a_alink_grab.inc index 3a00d3408f..78e2438823 100644 --- a/src/d/actor/d_a_alink_grab.inc +++ b/src/d/actor/d_a_alink_grab.inc @@ -362,7 +362,7 @@ void daAlink_c::setGrabItemPos() { if (grabLineCheck(&sp110, &sp104)) { if (temp_r3->current.pos.abs(sp110) > mObjLinChk.GetCrossP()->abs(sp110)) { temp_r3->speedF = 0.0f; - temp_r3->current.pos = mObjLinChk.i_GetCross(); + temp_r3->current.pos = mObjLinChk.GetCross(); freeGrabItem(); return; } @@ -431,7 +431,7 @@ void daAlink_c::freeGrabItem() { cXyz sp14(current.pos.x, field_0x34e0.y, current.pos.z); if (grabLineCheck(&sp14, &temp_r3->current.pos)) { - temp_r3->current.pos = mObjLinChk.i_GetCross(); + temp_r3->current.pos = mObjLinChk.GetCross(); cM3dGPla sp20; dComIfG_Bgsp().GetTriPla(mObjLinChk, &sp20); @@ -659,7 +659,7 @@ void daAlink_c::putObjLineCheck(dBgS_LinChk& param_0, cXyz* param_1, fopAc_ac_c* param_0.Set(&field_0x37c8, param_1, param_2); if (dComIfG_Bgsp().LineCross(¶m_0) && dBgS_CheckBWallPoly(param_0)) { - cXyz sp8 = *param_1 - param_0.i_GetCross(); + cXyz sp8 = *param_1 - param_0.GetCross(); f32 temp_f31 = sp8.abs(); f32 temp_f1 = sp8.absXZ(); diff --git a/src/d/actor/d_a_alink_guard.inc b/src/d/actor/d_a_alink_guard.inc index 4f3c6f9a01..614e585d31 100644 --- a/src/d/actor/d_a_alink_guard.inc +++ b/src/d/actor/d_a_alink_guard.inc @@ -63,7 +63,7 @@ void daAlink_c::stickArrowIncrement(int param_0) { } if (arrow_num != 0) { - if (i_checkShieldGet() && checkItemGet(fpcNm_ITEM_BOW, true)) { + if (checkShieldGet() && checkItemGet(fpcNm_ITEM_BOW, true)) { int arrow_type = arrow_num == 1 ? fpcNm_ITEM_ARROW_1 : fpcNm_ITEM_ARROW_10; dComIfGp_setItemArrowNumCount(arrow_num); @@ -175,7 +175,7 @@ BOOL daAlink_c::checkUpperGuardAnime() const { /* 800DCE6C-800DCF04 0D77AC 0098+00 1/0 0/0 0/0 .text checkPlayerGuard__9daAlink_cCFv */ BOOL daAlink_c::checkPlayerGuard() const { - return (checkSmallUpperGuardAnime() || (i_checkShieldGet() && checkHorseLieAnime())) || + return (checkSmallUpperGuardAnime() || (checkShieldGet() && checkHorseLieAnime())) || checkUpperGuardAnime(); } @@ -186,7 +186,7 @@ BOOL daAlink_c::checkPlayerGuardAndAttack() const { /* 800DCF64-800DD008 0D78A4 00A4+00 2/2 0/0 0/0 .text checkGuardAccept__9daAlink_cFv */ BOOL daAlink_c::checkGuardAccept() { - return checkModeFlg(0x80) && i_checkShieldGet() && !checkFmChainGrabAnime() && + return checkModeFlg(0x80) && checkShieldGet() && !checkFmChainGrabAnime() && !checkNotBattleStage(); } diff --git a/src/d/actor/d_a_alink_hang.inc b/src/d/actor/d_a_alink_hang.inc index 1f1afb1552..5c26ac0eb8 100644 --- a/src/d/actor/d_a_alink_hang.inc +++ b/src/d/actor/d_a_alink_hang.inc @@ -83,7 +83,7 @@ BOOL daAlink_c::hangMoveBgCheck(s16 param_0, cXyz* param_1) { return true; } - sp9C = mLinkLinChk.i_GetCross() - sp90; + sp9C = mLinkLinChk.GetCross() - sp90; if (sp9C.abs2XZ() > param_1->abs2XZ()) { *param_1 = sp9C; rt = true; @@ -664,7 +664,7 @@ int daAlink_c::procHangMove() { if (abs(temp_r25) < 100) { field_0x308c = 0; } else { - cXyz spC8(mLinkLinChk.i_GetCross()); + cXyz spC8(mLinkLinChk.GetCross()); spC8.x -= spA4.mNormal.x * 1.5f; spC8.y += 25.0f; spC8.z -= spA4.mNormal.z * 1.5f; @@ -1743,7 +1743,7 @@ void daAlink_c::setClimbShapeOffset() { sp60.z += var_f30; if (commonLineCheck(&sp54, &sp60) && (!checkModeFlg(0x10000) || checkClimbCode(mLinkLinChk))) { - sp78 = mLinkLinChk.i_GetCross(); + sp78 = mLinkLinChk.GetCross(); } else { field_0x308c = 0; return; @@ -1757,7 +1757,7 @@ void daAlink_c::setClimbShapeOffset() { if (!commonLineCheck(&sp54, &sp60) || (checkModeFlg(0x10000) && !checkClimbCode(mLinkLinChk))) { field_0x308c = 0; } else { - sp78 -= mLinkLinChk.i_GetCross(); + sp78 -= mLinkLinChk.GetCross(); cLib_addCalcAngleS(&field_0x308c, (s16)((sp78.atan2sX_Z() - 0x4000) - shape_angle.y), 5, 2000, 400); } @@ -1928,8 +1928,8 @@ int daAlink_c::setMoveBGClimbCorrect() { s16 temp_r28 = shape_angle.y; shape_angle.y = temp_r29 + 0x8000; - current.pos.x = mLinkLinChk.i_GetCross().x; - current.pos.z = mLinkLinChk.i_GetCross().z; + current.pos.x = mLinkLinChk.GetCross().x; + current.pos.z = mLinkLinChk.GetCross().z; current.angle.y += (s16)(shape_angle.y - temp_r28); field_0x308c += (s16)(temp_r28 - shape_angle.y); @@ -1948,7 +1948,7 @@ int daAlink_c::checkBgCorrectClimbMove(cXyz* i_startPos, cXyz* i_endPos) { if (cLib_distanceAngleS(tri_plane.mNormal.atan2sX_Z(), shape_angle.y) < 0x549F || (checkModeFlg(0x10000) && !checkClimbCode(mLinkLinChk))) { - current.pos += mLinkLinChk.i_GetCross() - *i_endPos; + current.pos += mLinkLinChk.GetCross() - *i_endPos; return 1; } } @@ -2911,8 +2911,8 @@ int daAlink_c::procRoofHangFrontMove() { dComIfG_Bgsp().GetTriPla(mLinkLinChk, &sp70); if (cLib_distanceAngleS(sp70.mNormal.atan2sX_Z(), shape_angle.y) > 0x6000) { - current.pos.x = sp70.mNormal.x * 15.0f + mLinkLinChk.i_GetCross().x; - current.pos.z = sp70.mNormal.z * 15.0f + mLinkLinChk.i_GetCross().z; + current.pos.x = sp70.mNormal.x * 15.0f + mLinkLinChk.GetCross().x; + current.pos.z = sp70.mNormal.z * 15.0f + mLinkLinChk.GetCross().z; return procFallInit(1, daAlinkHIO_autoJump_c0::m.mFallInterpolation); } } diff --git a/src/d/actor/d_a_alink_hook.inc b/src/d/actor/d_a_alink_hook.inc index 550f3a0ebb..d366c6d4ce 100644 --- a/src/d/actor/d_a_alink_hook.inc +++ b/src/d/actor/d_a_alink_hook.inc @@ -1155,7 +1155,7 @@ void daAlink_c::setHookshotPos() { } } - mHookshotTopPos = mRopeLinChk.i_GetCross() - (mIronBallCenterPos * 15.0f); + mHookshotTopPos = mRopeLinChk.GetCross() - (mIronBallCenterPos * 15.0f); cM3dGPla poly; dComIfG_Bgsp().GetTriPla(mRopeLinChk, &poly); @@ -1649,7 +1649,7 @@ int daAlink_c::procHookshotFly() { } else { cXyz spA0 = current.pos - field_0x37c8; if (commonLineCheck(&field_0x37c8, ¤t.pos)) { - current.pos = mLinkLinChk.i_GetCross(); + current.pos = mLinkLinChk.GetCross(); spA0.y = 0.0f; spA0.normalizeZP(); diff --git a/src/d/actor/d_a_alink_horse.inc b/src/d/actor/d_a_alink_horse.inc index dc52d6a889..6d3d65ca7e 100644 --- a/src/d/actor/d_a_alink_horse.inc +++ b/src/d/actor/d_a_alink_horse.inc @@ -38,7 +38,7 @@ BOOL daAlink_c::checkHorseZeldaBowMode() { return false; } - daHoZelda_c* zelda_p = dComIfGp_getHorseActor()->i_getZeldaActor(); + daHoZelda_c* zelda_p = dComIfGp_getHorseActor()->getZeldaActor(); return zelda_p != NULL && zelda_p->checkBowMode(); } @@ -46,7 +46,7 @@ BOOL daAlink_c::checkHorseZeldaBowMode() { */ void daAlink_c::setHorseZeldaDamage() { if (dComIfGp_getHorseActor() != NULL) { - daHoZelda_c* zelda_p = dComIfGp_getHorseActor()->i_getZeldaActor(); + daHoZelda_c* zelda_p = dComIfGp_getHorseActor()->getZeldaActor(); if (zelda_p != NULL) { zelda_p->setDamageInit(); } @@ -559,7 +559,7 @@ void daAlink_c::getBaseHorseAnime(daAlink_c::daAlink_ANM* param_0) { if (checkHorseNoUpperAnime() || checkUpperHorseLieAnime()) { if (!dComIfGp_checkPlayerStatus0(0, 0x2000)) { - if (i_checkShieldGet()) { + if (checkShieldGet()) { setRStatus(0xB); } else { setRStatus(0x3E); @@ -1764,7 +1764,7 @@ int daAlink_c::procHorseTurn() { temp_r29->onTurnCancelKeep(); if (checkHorseNoUpperAnime()) { - if (i_checkShieldGet()) { + if (checkShieldGet()) { setRStatus(0xB); } else { setRStatus(0x3E); @@ -2045,7 +2045,7 @@ int daAlink_c::procHorseCut() { } else if (checkNoResetFlg2(FLG2_UNK_2)) { checkCutAction(); } else { - if (i_checkShieldGet()) { + if (checkShieldGet()) { setRStatus(0xB); } else { setRStatus(0x3E); @@ -2057,7 +2057,7 @@ int daAlink_c::procHorseCut() { } } else { if (temp_r30->getFrame() > field_0x3484) { - if (i_checkShieldGet()) { + if (checkShieldGet()) { setRStatus(0xB); } else { setRStatus(0x3E); diff --git a/src/d/actor/d_a_alink_hvyboots.inc b/src/d/actor/d_a_alink_hvyboots.inc index 625f989730..c61795b2ca 100644 --- a/src/d/actor/d_a_alink_hvyboots.inc +++ b/src/d/actor/d_a_alink_hvyboots.inc @@ -342,7 +342,7 @@ int daAlink_c::procMagneBootsFlyInit() { dComIfG_Bgsp().GetTriPla(mMagneLineChk, &sp50); mPolyInfo2.SetPolyInfo(mMagneLineChk); - field_0x37c8 = mMagneLineChk.i_GetCross(); + field_0x37c8 = mMagneLineChk.GetCross(); setSpecialGravity(0.0f, maxFallSpeed, 0); speed.y = 0.0f; diff --git a/src/d/actor/d_a_alink_link.inc b/src/d/actor/d_a_alink_link.inc index 4a7456c642..b5265202d0 100644 --- a/src/d/actor/d_a_alink_link.inc +++ b/src/d/actor/d_a_alink_link.inc @@ -3411,13 +3411,13 @@ void daAlink_c::setDrawHand() { u8 var_r30; u8 var_r29; if (checkNoResetFlg2(FLG2_STATUS_WINDOW_DRAW)) { - if (i_checkSwordGet()) { + if (checkSwordGet()) { var_r30 = 0; } else { var_r30 = 0xFE; } - if (i_checkShieldGet()) { + if (checkShieldGet()) { var_r29 = 6; } else { var_r29 = 0xFE; @@ -3527,14 +3527,14 @@ void daAlink_c::setDrawHand() { /* 800CB480-800CB53C 0C5DC0 00BC+00 3/3 0/0 0/0 .text checkSwordDraw__9daAlink_cFv */ bool daAlink_c::checkSwordDraw() { - return ((i_checkSwordGet() && mSwordChangeWaitTimer == 0) && + return ((checkSwordGet() && mSwordChangeWaitTimer == 0) && !checkNoResetFlg2(FLG2_UNK_2080000)) && (!checkWolf() || !dComIfGs_isEventBit(0x0C08)); } /* 800CB53C-800CB5F8 0C5E7C 00BC+00 3/3 0/0 0/0 .text checkShieldDraw__9daAlink_cFv */ bool daAlink_c::checkShieldDraw() { - return ((i_checkShieldGet() && mShieldChangeWaitTimer == 0) && + return ((checkShieldGet() && mShieldChangeWaitTimer == 0) && !checkNoResetFlg2(FLG2_UNK_4080000)) && (!checkWolf() || !dComIfGs_isEventBit(0x0C08)); } @@ -3542,7 +3542,7 @@ bool daAlink_c::checkShieldDraw() { /* 800CB5F8-800CB694 0C5F38 009C+00 2/2 0/0 0/0 .text checkItemDraw__9daAlink_cFv */ bool daAlink_c::checkItemDraw() { if (mHeldItemModel != NULL && (mEquipItem != fpcNm_ITEM_IRONBALL || !checkSwordEquipAnime())) { - if (!checkBowAndSlingItem(mEquipItem) || checkBowGrabLeftHand() || !i_checkShieldGet() || + if (!checkBowAndSlingItem(mEquipItem) || checkBowGrabLeftHand() || !checkShieldGet() || field_0x2e44.checkPassNum(15)) { return true; @@ -4397,7 +4397,7 @@ s16 daAlink_c::checkBodyAngleX(s16 param_0) { mDoMtx_stack_c::multVec(&sp2C, &sp14); if (commonLineCheck(&sp20, &sp14)) { - cXyz sp8 = sp14 - mLinkLinChk.i_GetCross(); + cXyz sp8 = sp14 - mLinkLinChk.GetCross(); multVecMagneBootInvMtx(&sp8); current.pos.x -= sp8.x; @@ -4465,7 +4465,7 @@ void daAlink_c::setSubjectMode() { /* 800CEB58-800CEBD8 0C9498 0080+00 2/2 0/0 0/0 .text subjectCancelTrigger__9daAlink_cFv */ BOOL daAlink_c::subjectCancelTrigger() { - if (checkWolf() || checkNotBattleStage() || !i_checkSwordGet() || + if (checkWolf() || checkNotBattleStage() || !checkSwordGet() || (checkModeFlg(0x40000) && !checkEquipHeavyBoots())) { return itemTriggerCheck(BTN_B); diff --git a/src/d/actor/d_a_alink_swim.inc b/src/d/actor/d_a_alink_swim.inc index 4daa835e47..6271466edb 100644 --- a/src/d/actor/d_a_alink_swim.inc +++ b/src/d/actor/d_a_alink_swim.inc @@ -163,7 +163,7 @@ void daAlink_c::swimBgCheck(f32 param_0) { if (cBgW_CheckBWall(tri.mNormal.y) && (mProcID != PROC_METAMORPHOSE || dComIfG_Bgsp().GetWallCode(mLinkLinChk) != 7)) { - cXyz sp14 = end_pos - mLinkLinChk.i_GetCross(); + cXyz sp14 = end_pos - mLinkLinChk.GetCross(); f32 temp_f1 = sp14.absXZ(); s16 var_r28 = sp14.atan2sX_Z(); @@ -189,7 +189,7 @@ void daAlink_c::swimBgCheck(f32 param_0) { dComIfG_Bgsp().GetTriPla(mLinkLinChk, &tri); if (cBgW_CheckBWall(tri.mNormal.y)) { - sp14 = end_pos - mLinkLinChk.i_GetCross(); + sp14 = end_pos - mLinkLinChk.GetCross(); temp_f1 = sp14.absXZ(); var_r28 = sp14.atan2sX_Z(); diff --git a/src/d/actor/d_a_alink_swindow.inc b/src/d/actor/d_a_alink_swindow.inc index 411aaecd55..c307c19da2 100644 --- a/src/d/actor/d_a_alink_swindow.inc +++ b/src/d/actor/d_a_alink_swindow.inc @@ -31,7 +31,7 @@ inline bool checkShopWoodShieldEquip() { /* 8013FF90-8013FFD8 13A8D0 0048+00 2/2 0/0 0/0 .text setShieldArcName__9daAlink_cFv */ void daAlink_c::setShieldArcName() { - if (checkCarvingWoodShieldEquip() || !i_checkShieldGet()) { + if (checkCarvingWoodShieldEquip() || !checkShieldGet()) { mShieldArcName = l_cWShdArcName; } else if (checkShopWoodShieldEquip()) { mShieldArcName = l_sWShdArcName; diff --git a/src/d/actor/d_a_alink_weakfn.inc b/src/d/actor/d_a_alink_weakfn.inc index 53319db0d4..cb1e090101 100644 --- a/src/d/actor/d_a_alink_weakfn.inc +++ b/src/d/actor/d_a_alink_weakfn.inc @@ -1171,7 +1171,7 @@ extern "C" void dMeter2Info_offUseButton__Fi() { /* 80141988-80141990 -00001 0008+00 0/0 0/0 0/0 .text setLinkState__14Z2CreatureLinkFUc */ extern "C" void setLinkState__14Z2CreatureLinkFUc(Z2CreatureLink* this_, u8 param_0) { - *(u8*)(((u8*)this_) + 192) /* this->field_0xc0 */ = (u8)(param_0); + //*(u8*)(((u8*)this_) + 192) this->field_0xc0 = (u8)(param_0); } /* 80141990-801419A0 13C2D0 0010+00 1/1 0/0 0/0 .text dComIfGs_getRupee__Fv */ diff --git a/src/d/actor/d_a_alink_wolf.inc b/src/d/actor/d_a_alink_wolf.inc index 8e9d9aceb5..0ecbe5d903 100644 --- a/src/d/actor/d_a_alink_wolf.inc +++ b/src/d/actor/d_a_alink_wolf.inc @@ -186,7 +186,7 @@ void daAlink_c::changeWolf() { field_0x309a[i] = 0; } - mZ2Link.i_setLinkState(1); + mZ2Link.setLinkState(1); field_0x30d6 = 0; field_0x2fa6 = 0; field_0x2e54.changeWaterOffset(daAlinkHIO_basic_c0::m.mWolfWaterSurfaceEffectHeight); @@ -411,7 +411,7 @@ void daAlink_c::changeLink(int param_0) { mpKanteraModel->setUserArea((u32)this); mpKanteraModel->getModelData()->getJointNodePointer(1)->setCallBack( daAlink_kandelaarModelCallBack); - mZ2Link.i_setLinkState(var_r27); + mZ2Link.setLinkState(var_r27); if (checkHookshotReadyMaterialOffMode()) { setHookshotReadyMaterial(); @@ -1677,7 +1677,7 @@ void daAlink_c::wolfBgCheck() { } else { onNoResetFlg3(FLG3_UNK_800000); dComIfG_Bgsp().GetTriPla(mLinkLinChk, &sp44); - field_0x378c = mLinkLinChk.i_GetCross(); + field_0x378c = mLinkLinChk.GetCross(); } } @@ -1695,7 +1695,7 @@ void daAlink_c::wolfBgCheck() { } else { onNoResetFlg3(FLG3_UNK_800000); dComIfG_Bgsp().GetTriPla(mLinkLinChk, &sp44); - field_0x378c = mLinkLinChk.i_GetCross(); + field_0x378c = mLinkLinChk.GetCross(); } } @@ -2850,7 +2850,7 @@ int daAlink_c::procWolfWaitTurn() { /* 8012DEC8-8012E0AC 128808 01E4+00 2/2 0/0 0/0 .text procWolfSideStepInit__9daAlink_cFi */ int daAlink_c::procWolfSideStepInit(int param_0) { - if (field_0x2f98 == 1 && !param_0 && i_checkFirstMidnaDemo() && !checkWolfGrabAnime() && + if (field_0x2f98 == 1 && !param_0 && checkFirstMidnaDemo() && !checkWolfGrabAnime() && field_0x2fcc != 0) { return procWolfBackJumpInit(0); @@ -7203,7 +7203,7 @@ void daAlink_c::setWolfBiteDamage(fopEn_enemy_c* i_enemy) { /* 801397A4-801398A8 1340E4 0104+00 1/1 0/0 0/0 .text checkWolfLockAttackChargeState__9daAlink_cFv */ BOOL daAlink_c::checkWolfLockAttackChargeState() { - return checkMidnaRide() && checkMidnaChargeAttack() && !daMidna_c::i_checkMidnaTired() && + return checkMidnaRide() && checkMidnaChargeAttack() && !daMidna_c::checkMidnaTired() && daMidna_c::checkMidnaRealBody(); } @@ -8660,7 +8660,7 @@ int daAlink_c::procWolfGrabPut() { if (grabLineCheck(&field_0x34e0, &actor_p->current.pos) && dBgS_CheckBWallPoly(mObjLinChk)) { - cXyz sp8 = actor_p->current.pos - mObjLinChk.i_GetCross(); + cXyz sp8 = actor_p->current.pos - mObjLinChk.GetCross(); current.pos.x -= sp8.x * 1.5f; current.pos.z -= sp8.z * 1.5f; } diff --git a/src/d/actor/d_a_andsw2.cpp b/src/d/actor/d_a_andsw2.cpp index ed1d144852..88a2613b35 100644 --- a/src/d/actor/d_a_andsw2.cpp +++ b/src/d/actor/d_a_andsw2.cpp @@ -250,7 +250,7 @@ static int daAndsw2_actionTimer(daAndsw2_c* i_this) { /* 804D6704-804D68A4 000984 01A0+00 1/0 0/0 0/0 .text daAndsw2_actionOrder__FP10daAndsw2_c */ static int daAndsw2_actionOrder(daAndsw2_c* i_this) { - if (i_this->eventInfo.i_checkCommandDemoAccrpt()) { + if (i_this->eventInfo.checkCommandDemoAccrpt()) { i_this->setActio(daAndsw2_c::ACT_EVENT_e); dComIfGs_onSwitch(i_this->getSwbit(), fopAcM_GetRoomNo(i_this)); } else if ((i_this->getType() == 1 && !i_this->chkAllSw2()) || diff --git a/src/d/actor/d_a_arrow.cpp b/src/d/actor/d_a_arrow.cpp index 084217c6de..b6a9418e12 100644 --- a/src/d/actor/d_a_arrow.cpp +++ b/src/d/actor/d_a_arrow.cpp @@ -184,11 +184,11 @@ int daArrow_c::setArrowWaterNextPos(cXyz* i_start, cXyz* i_end) { if (dComIfG_Bgsp().LineCross(&field_0x5dc)) { if (dComIfG_Bgsp().GetPolyAtt0(field_0x5dc) == 6) { - *i_end = field_0x5dc.i_GetCross(); + *i_end = field_0x5dc.GetCross(); return 2; } - cXyz v = *i_end - field_0x5dc.i_GetCross(); + cXyz v = *i_end - field_0x5dc.GetCross(); f32 dis = (*i_end).abs(*i_start); if (dis > 0.0001f) { @@ -198,7 +198,7 @@ int daArrow_c::setArrowWaterNextPos(cXyz* i_start, cXyz* i_end) { } v.normalizeZP(); - *i_end = field_0x5dc.i_GetCross() + v * 80.0f * dis; + *i_end = field_0x5dc.GetCross() + v * 80.0f * dis; return 1; } @@ -261,7 +261,7 @@ void daArrow_c::setArrowAt(f32 param_0) { field_0x56c.Set(¤t.pos, &target, this); if (dComIfG_Bgsp().LineCross(&field_0x56c)) { - target = field_0x56c.i_GetCross(); + target = field_0x56c.GetCross(); } static_cast(&field_0x688)->Set(current.pos, target, radius); @@ -603,7 +603,7 @@ int daArrow_c::procMove() { cXyz v2; if (dComIfG_Bgsp().LineCross(&field_0x56c)) { - v2 = field_0x56c.i_GetCross(); + v2 = field_0x56c.GetCross(); } else { v2 = v; } @@ -621,7 +621,7 @@ int daArrow_c::procMove() { if (water_next_pos == 4 || water_next_pos == 3) { field_0x9fc = old.pos; } else { - field_0x9fc = field_0x5dc.i_GetCross(); + field_0x9fc = field_0x5dc.GetCross(); } speed.normalizeZP(); @@ -753,7 +753,7 @@ int daArrow_c::procMove() { } if (line_cross) { - current.pos = field_0x56c.i_GetCross(); + current.pos = field_0x56c.GetCross(); if (field_0x945 != 0 && (mArrowType == 1 || current.pos.y - field_0x9fc.y < -300.0f)) { field_0x93f = 1; @@ -802,7 +802,7 @@ int daArrow_c::procMove() { speedF = 0.0f; se_id = Z2SE_HIT_AL_ARROW_STICK; current.angle.x = shape_angle.x; - dComIfG_Bgsp().ArrowStickCallBack(field_0x56c, this, field_0x56c.i_GetCross()); + dComIfG_Bgsp().ArrowStickCallBack(field_0x56c, this, field_0x56c.GetCross()); } daAlink_getAlinkActorClass()->itemHitSE(se_id, dKy_pol_sound_get(&field_0x56c) & 0xff, &mSoundObjArrow); diff --git a/src/d/actor/d_a_b_bq.cpp b/src/d/actor/d_a_b_bq.cpp index c6208b94bb..15cebb952d 100644 --- a/src/d/actor/d_a_b_bq.cpp +++ b/src/d/actor/d_a_b_bq.cpp @@ -848,7 +848,7 @@ static s8 b_bq_attack(b_bq_class* i_this) { lin_chk.Set(&i_this->mMizuAtStartPos, &i_this->field_0x12bc, a_this); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - spD8 = lin_chk.i_GetCross(); + spD8 = lin_chk.GetCross(); for (int i = 0; i < 2; i++) { static u16 fireno[] = {0x82D4, 0x82D5}; @@ -2182,7 +2182,7 @@ static void demo_camera(b_bq_class* i_this) { lin_chk.Set(¢er, &eye, a_this); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - eye = lin_chk.i_GetCross(); + eye = lin_chk.GetCross(); } } diff --git a/src/d/actor/d_a_b_dr.cpp b/src/d/actor/d_a_b_dr.cpp index 46772094e8..b6131e7cc6 100644 --- a/src/d/actor/d_a_b_dr.cpp +++ b/src/d/actor/d_a_b_dr.cpp @@ -3026,9 +3026,9 @@ bool daB_DR_c::startDemoCheck() { camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); camera_class* camera0 = dComIfGp_getCamera(0); - if (!eventInfo.i_checkCommandDemoAccrpt()) { + if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xFFFF, 0); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); mDemoCamEye = camera0->lookat.eye; mDemoCamCenter = camera0->lookat.center; return false; diff --git a/src/d/actor/d_a_b_dre.cpp b/src/d/actor/d_a_b_dre.cpp index 970777af8c..08ccf4567c 100644 --- a/src/d/actor/d_a_b_dre.cpp +++ b/src/d/actor/d_a_b_dre.cpp @@ -76,9 +76,9 @@ bool daB_DRE_c::CameraSet() { camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); dCamera_c* cam_body = dCam_getBody(); - if (!eventInfo.i_checkCommandDemoAccrpt()) { + if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xFFFF, 0); - eventInfo.i_onCondition(0); + eventInfo.onCondition(0); return 0; } diff --git a/src/d/actor/d_a_b_ds.cpp b/src/d/actor/d_a_b_ds.cpp index 029f7f0e06..a4129d0aa4 100644 --- a/src/d/actor/d_a_b_ds.cpp +++ b/src/d/actor/d_a_b_ds.cpp @@ -1317,13 +1317,13 @@ bool daB_DS_c::mCutTypeCheck() { bool daB_DS_c::startDemoCheck() { camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { return false; } if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xFFFF, 0); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); mCameraEye = dCam_getBody()->Center(); mCameraCenter = dCam_getBody()->Eye(); mCameraFovy = dCam_getBody()->Fovy(); @@ -5273,7 +5273,7 @@ void daB_DS_c::mBattle2_mtx_set() { lin_chk.Set(&mMouthPos, &field_0x6d0, this); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - field_0x6d0 = lin_chk.i_GetCross(); + field_0x6d0 = lin_chk.GetCross(); } } diff --git a/src/d/actor/d_a_b_gm.cpp b/src/d/actor/d_a_b_gm.cpp index d0ed13c60f..01a1b3e502 100644 --- a/src/d/actor/d_a_b_gm.cpp +++ b/src/d/actor/d_a_b_gm.cpp @@ -319,7 +319,7 @@ static BOOL bg_check(b_gm_class* i_this) { i_this->field_0x5ce = cM_atan2s(sp14.x, sp14.z) + 0x8000; } - i_this->field_0x73c = line_chk.i_GetCross(); + i_this->field_0x73c = line_chk.GetCross(); return TRUE; } @@ -809,7 +809,7 @@ static int foot_IK(b_gm_class* i_this, b_gm_foot* i_foot) { i_foot->field_0x1c = i_foot->field_0x10; line_chk.Set(&i_this->field_0x730, &i_foot->field_0x10, i_this); if (dComIfG_Bgsp().LineCross(&line_chk)) { - i_foot->field_0x1c = line_chk.i_GetCross(); + i_foot->field_0x1c = line_chk.GetCross(); f32 temp_f31 = (i_foot->field_0x1c - i_foot->field_0x10).abs(); i_foot->field_0x0 += 10.0f + (10.0f + (temp_f31 * 4.0f)); @@ -1031,9 +1031,9 @@ static void demo_camera(b_gm_class* i_this) { switch (i_this->mDemoMode) { case 1: - if (!a_this->eventInfo.i_checkCommandDemoAccrpt()) { + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0); - a_this->eventInfo.i_onCondition(2); + a_this->eventInfo.onCondition(2); return; } @@ -1164,9 +1164,9 @@ static void demo_camera(b_gm_class* i_this) { } break; case 10: - if (!a_this->eventInfo.i_checkCommandDemoAccrpt()) { + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0); - a_this->eventInfo.i_onCondition(2); + a_this->eventInfo.onCondition(2); return; } @@ -1206,9 +1206,9 @@ static void demo_camera(b_gm_class* i_this) { } break; case 20: - if (!a_this->eventInfo.i_checkCommandDemoAccrpt()) { + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0); - a_this->eventInfo.i_onCondition(2); + a_this->eventInfo.onCondition(2); return; } @@ -1245,9 +1245,9 @@ static void demo_camera(b_gm_class* i_this) { } break; case 30: - if (!a_this->eventInfo.i_checkCommandDemoAccrpt()) { + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0); - a_this->eventInfo.i_onCondition(2); + a_this->eventInfo.onCondition(2); return; } @@ -1399,9 +1399,9 @@ static void demo_camera(b_gm_class* i_this) { } break; case 40: - if (!a_this->eventInfo.i_checkCommandDemoAccrpt()) { + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0); - a_this->eventInfo.i_onCondition(2); + a_this->eventInfo.onCondition(2); return; } @@ -1422,7 +1422,7 @@ static void demo_camera(b_gm_class* i_this) { i_this->field_0x1ce0 = 600.0f; i_this->field_0x1ce6 = cM_atan2s(-i_this->field_0x1cec.x, -i_this->field_0x1cec.z); - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { daPy_getPlayerActorClass()->changeDemoMode(daPy_demo_c::DEMO_METAMORPHOSE_UNK2_e, 0, 0, 0); a_this->field_0x567 = 1; } else { @@ -1510,9 +1510,9 @@ static void demo_camera(b_gm_class* i_this) { } break; case 50: - if (!a_this->eventInfo.i_checkCommandDemoAccrpt()) { + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0); - a_this->eventInfo.i_onCondition(2); + a_this->eventInfo.onCondition(2); return; } @@ -1561,7 +1561,7 @@ static void demo_camera(b_gm_class* i_this) { i_this->field_0x1ce0 = 600.0f; i_this->field_0x1ce6 = cM_atan2s(-i_this->field_0x1cec.x, -i_this->field_0x1cec.z); - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { daPy_getPlayerActorClass()->changeDemoMode(daPy_demo_c::DEMO_METAMORPHOSE_UNK2_e, 0, 0, 0); a_this->field_0x567 = 1; } else { @@ -1911,7 +1911,7 @@ static int daB_GM_Execute(b_gm_class* i_this) { line_chk.Set(&spC8, &spD4, i_this); if (dComIfG_Bgsp().LineCross(&line_chk)) { - spD4 = line_chk.i_GetCross(); + spD4 = line_chk.GetCross(); i_this->field_0x6d8 = spD4; i_this->mBeamSound.startLevelSound(Z2SE_EN_GO_BEAM, 0, -1); diff --git a/src/d/actor/d_a_b_gnd.cpp b/src/d/actor/d_a_b_gnd.cpp index bc0ecab147..535b8cd73b 100644 --- a/src/d/actor/d_a_b_gnd.cpp +++ b/src/d/actor/d_a_b_gnd.cpp @@ -5,17 +5,159 @@ #include "d/actor/d_a_b_gnd.h" #include "d/d_com_inf_game.h" -#include "d/actor/d_a_player.h" #include "d/actor/d_a_alink.h" #include "d/actor/d_a_horse.h" -#include "dol2asm.h" #include "d/d_s_play.h" #include "f_op/f_op_msg_mng.h" #include "m_Do/m_Do_graphic.h" -#include "Z2AudioLib/Z2Instances.h" #include "d/actor/d_a_mant.h" #include "d/actor/d_a_mg_rod.h" +#include "Z2AudioLib/Z2Instances.h" + +enum B_GND_RES_FILE_ID { // IDs and indexes are synced + /* BCK */ + B_GND_BCK_AL_EGND_TODOME=0x8, + B_GND_BCK_AL_EGND_TODOMEWAIT=0x9, + B_GND_BCK_AL_EGND_TUBAZERI_A=0xA, + B_GND_BCK_AL_EGND_TUBAZERI_B=0xB, + B_GND_BCK_AL_EGND_TUBAZERI_C=0xC, + B_GND_BCK_AL_EGND_TUBAZERI_LOSE=0xD, + B_GND_BCK_AL_EGND_TUBAZERI_WIN=0xE, + B_GND_BCK_AL_EGND_WH=0xF, + B_GND_BCK_AL_FEGND_TODOME=0x10, + B_GND_BCK_AL_FEGND_TODOMEWAIT=0x11, + B_GND_BCK_AL_FEGND_WH=0x12, + B_GND_BCK_EGND_ATTACKA=0x13, + B_GND_BCK_EGND_ATTACKB=0x14, + B_GND_BCK_EGND_ATTACKC_A=0x15, + B_GND_BCK_EGND_ATTACKC_B=0x16, + B_GND_BCK_EGND_ATTACKC_C=0x17, + B_GND_BCK_EGND_ATTACKD=0x18, + B_GND_BCK_EGND_ATTACKE_A=0x19, + B_GND_BCK_EGND_ATTACKE_B=0x1A, + B_GND_BCK_EGND_ATTACKE_C=0x1B, + B_GND_BCK_EGND_ATTACKE_C1=0x1C, + B_GND_BCK_EGND_ATTACKE_C2=0x1D, + B_GND_BCK_EGND_ATTACKF=0x1E, + B_GND_BCK_EGND_ATTACKG=0x1F, + B_GND_BCK_EGND_CHOUHATU=0x20, + B_GND_BCK_EGND_DAMAGE_A=0x21, + B_GND_BCK_EGND_DAMAGE_B=0x22, + B_GND_BCK_EGND_DEFENSE_A=0x23, + B_GND_BCK_EGND_DEFENSE_B=0x24, + B_GND_BCK_EGND_DEFENSE_C=0x25, + B_GND_BCK_EGND_DEFENSE_D=0x26, + B_GND_BCK_EGND_DEFENSE_E=0x27, + B_GND_BCK_EGND_DOWN=0x28, + B_GND_BCK_EGND_DOWNB=0x29, + B_GND_BCK_EGND_DOWNUP=0x2A, + B_GND_BCK_EGND_DOWNWAIT=0x2B, + B_GND_BCK_EGND_JUMP_A=0x2C, + B_GND_BCK_EGND_JUMP_B=0x2D, + B_GND_BCK_EGND_JUMP_C=0x2E, + B_GND_BCK_EGND_KAMAE=0x2F, + B_GND_BCK_EGND_KURUSIMI=0x30, + B_GND_BCK_EGND_KUZURE=0x31, + B_GND_BCK_EGND_LAUGH=0x32, + B_GND_BCK_EGND_LOOK=0x33, + B_GND_BCK_EGND_RATTACK01_A=0x34, + B_GND_BCK_EGND_RATTACK01_B=0x35, + B_GND_BCK_EGND_RATTACK01_C=0x36, + B_GND_BCK_EGND_RATTACK01_D=0x37, + B_GND_BCK_EGND_RATTACK02_A=0x38, + B_GND_BCK_EGND_RATTACK02_B=0x39, + B_GND_BCK_EGND_RATTACK02_C=0x3A, + B_GND_BCK_EGND_RBRAKE=0x3B, + B_GND_BCK_EGND_RDAMEGE01_A=0x3C, + B_GND_BCK_EGND_RDAMEGE01_B=0x3D, + B_GND_BCK_EGND_RDAMEGE02L=0x3E, + B_GND_BCK_EGND_RDAMEGE02R=0x3F, + B_GND_BCK_EGND_RDASH=0x40, + B_GND_BCK_EGND_RDOWN=0x41, + B_GND_BCK_EGND_RINANAKI01=0x42, + B_GND_BCK_EGND_RINANAKI02L=0x43, + B_GND_BCK_EGND_RINANAKI02R=0x44, + B_GND_BCK_EGND_RJUMP_END=0x45, + B_GND_BCK_EGND_RJUMP_MIDDLE=0x46, + B_GND_BCK_EGND_RJUMP_START=0x47, + B_GND_BCK_EGND_RRETURN=0x48, + B_GND_BCK_EGND_RRUN=0x49, + B_GND_BCK_EGND_RSPUR=0x4A, + B_GND_BCK_EGND_RWAIT=0x4B, + B_GND_BCK_EGND_RWALK=0x4C, + B_GND_BCK_EGND_SAYAOPEN=0x4D, + B_GND_BCK_EGND_SIDEJUMP_LA=0x4E, + B_GND_BCK_EGND_SIDEJUMP_LB=0x4F, + B_GND_BCK_EGND_SIDEJUMP_RA=0x50, + B_GND_BCK_EGND_SIDEJUMP_RB=0x51, + B_GND_BCK_EGND_STANDUP=0x52, + B_GND_BCK_EGND_TODOME=0x53, + B_GND_BCK_EGND_TODOME_02=0x54, + B_GND_BCK_EGND_TUBAZERI_A=0x55, + B_GND_BCK_EGND_TUBAZERI_B=0x56, + B_GND_BCK_EGND_TUBAZERI_C=0x57, + B_GND_BCK_EGND_TUBAZERI_LOSE=0x58, + B_GND_BCK_EGND_TUBAZERI_WIN=0x59, + B_GND_BCK_EGND_WAIT01=0x5A, + B_GND_BCK_EGND_WAIT02=0x5B, + B_GND_BCK_EGND_WAIT03=0x5C, + B_GND_BCK_EGND_WALK=0x5D, + B_GND_BCK_ZELDA_SURPRISE=0x5E, + + /* BMDR */ + B_GND_BMD_EGND_SHEATH=0x61, + B_GND_BMD_EGND_SWORD=0x62, + B_GND_BMD_MANT_SHADOW8=0x63, + B_GND_BMD_SWORD_EFFECTA=0x64, + B_GND_BMD_SWORD_EFFECTB=0x65, + B_GND_BMD_SWORD_EFFECTC=0x66, + + /* BMDV */ + B_GND_BMD_EGND=0x69, + B_GND_BMD_ZELDA=0x6A, + + /* BRK */ + B_GND_BRK_EGND_CORE_BEAT=0x6D, + + /* BTK */ + B_GND_BTK_AL_FEGND_TODOME=0x70, + B_GND_BTK_AL_FEGND_WH=0x71, + B_GND_BTK_EGND_KAMAE=0x72, + B_GND_BTK_EGND_LAUGH=0x73, + B_GND_BTK_EGND_LOOK=0x74, + B_GND_BTK_EGND_SAYAOPEN=0x75, + B_GND_BTK_EGND_STANDUP=0x76, + B_GND_BTK_EYE_DEFAULT=0x77, + B_GND_BTK_ZELDA_SUEPRISE=0x78, + + /* BTP */ + B_GND_BTP_EGND_MEPACHI=0x7B, + B_GND_BTP_ZELDA_SUEPRISE=0x7C, +}; + +enum B_HG_RES_FILE_ID { // IDs and indexes are synced + /* BCK */ + B_HG_BCK_HG_DOWN=0x5, + B_HG_BCK_HG_JUMP_END=0x6, + B_HG_BCK_HG_JUMP_MIDDLE=0x7, + B_HG_BCK_HG_JUMP_START=0x8, + B_HG_BCK_HG_RUN=0x9, + B_HG_BCK_HG_RUN_DASH=0xA, + B_HG_BCK_HG_STAND=0xB, + B_HG_BCK_HG_STANDTURNL=0xC, + B_HG_BCK_HG_STANDTURNR=0xD, + B_HG_BCK_HG_STOP=0xE, + B_HG_BCK_HG_WAIT=0xF, + B_HG_BCK_HG_WALK=0x10, + + /* BMDR */ + B_HG_BMD_HG=0x13, + + /* TEX */ + B_HG_BTI_TAZUNA=0x16, +}; + enum daB_GND_ACTION { ACTION_HWAIT_1 = 1, ACTION_HWAIT_2 = 2, @@ -36,131 +178,67 @@ enum daB_GND_ACTION { UNK_REL_DATA; UNK_REL_BSS; -/* ############################################################################################## */ -/* 80602664-80602668 000000 0004+00 32/32 0/0 0/0 .rodata @3815 */ -static f32 const lit_3815 = 1.0f; -COMPILER_STRIP_GATE(0x80602664, &lit_3815); -/* 80602668-8060266C 000004 0004+00 0/1 0/0 0/0 .rodata @3816 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3816 = 57.0f; -COMPILER_STRIP_GATE(0x80602668, &lit_3816); -#pragma pop +static u8 l_initHIO; -/* 8060266C-80602670 000008 0004+00 0/1 0/0 0/0 .rodata @3817 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3817 = 65.0f; -COMPILER_STRIP_GATE(0x8060266C, &lit_3817); -#pragma pop - -/* 80602670-80602674 00000C 0004+00 0/1 0/0 0/0 .rodata @3818 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3818 = 76.0f; -COMPILER_STRIP_GATE(0x80602670, &lit_3818); -#pragma pop - -/* 80602674-80602678 000010 0004+00 0/3 0/0 0/0 .rodata @3819 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3819 = 40.0f; -COMPILER_STRIP_GATE(0x80602674, &lit_3819); -#pragma pop - -static u8 lbl_145_bss_45; - -// /* 805F4A4C-805F4A94 0000EC 0048+00 1/1 0/0 0/0 .text __ct__13daB_GND_HIO_cFv */ -// daB_GND_HIO_c::daB_GND_HIO_c() { -// // NONMATCHING -// } - -// /* ############################################################################################## */ -// /* 80602678-8060267C 000014 0004+00 4/28 0/0 0/0 .rodata @3835 */ -// SECTION_RODATA static u8 const lit_3835[4] = { -// 0x00, -// 0x00, -// 0x00, -// 0x00, -// }; -// COMPILER_STRIP_GATE(0x80602678, &lit_3835); - -// /* 8060267C-80602680 000018 0004+00 2/5 0/0 0/0 .rodata @3836 */ -// SECTION_RODATA static f32 const lit_3836 = -1.0f; -// COMPILER_STRIP_GATE(0x8060267C, &lit_3836); - -// /* 806029AC-806029AC 000348 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -// #pragma push -// #pragma force_active on -// SECTION_DEAD static char const* const stringBase_806029AC = "B_gnd"; -// #pragma pop +/* 805F4A4C-805F4A94 0000EC 0048+00 1/1 0/0 0/0 .text __ct__13daB_GND_HIO_cFv */ +daB_GND_HIO_c::daB_GND_HIO_c() { + no = -1; + model_size = 1.0f; + field_0xc = 57.0f; + field_0x10 = 65.0f; + field_0x14 = 76.0f; + field_0x18 = 40.0f; +} /* 805F4A94-805F4B48 000134 00B4+00 15/15 0/0 0/0 .text anm_init__FP11b_gnd_classifUcf */ static void anm_init(b_gnd_class* i_this, int i_anmID, f32 i_morf, u8 i_attr, f32 i_speed) { i_this->mAnmID = i_anmID; - if (i_anmID == 73) { - i_anmID = 64; + if (i_anmID == B_GND_BCK_EGND_RRUN) { + i_anmID = B_GND_BCK_EGND_RDASH; } i_this->mpModelMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("B_gnd", i_anmID), i_attr, i_morf, i_speed, 0.0f, -1.0f); } -// /* ############################################################################################## */ -// /* 806029AC-806029AC 000348 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -// #pragma push -// #pragma force_active on -// SECTION_DEAD static char const* const stringBase_806029B2 = "B_hg"; -// #pragma pop - /* 805F4B48-805F4C00 0001E8 00B8+00 7/7 0/0 0/0 .text h_anm_init__FP11b_gnd_classifUcf */ static void h_anm_init(b_gnd_class* i_this, int i_anmID, f32 i_morf, u8 i_attr, f32 i_speed) { i_this->mHorseAnmID = i_anmID; - if (i_anmID == 9) { - i_anmID = 10; + if (i_anmID == B_HG_BCK_HG_RUN) { + i_anmID = B_HG_BCK_HG_RUN_DASH; } i_this->mpHorseMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("B_hg", i_anmID), i_attr, i_morf, i_speed, 0.0f, -1.0f); } -// /* ############################################################################################## */ -// /* 80602680-80602684 00001C 0004+00 1/1 0/0 0/0 .rodata @3902 */ -// SECTION_RODATA static f32 const lit_3902 = 0.75f; -// COMPILER_STRIP_GATE(0x80602680, &lit_3902); - -// /* 80602684-8060268C 000020 0008+00 2/4 0/0 0/0 .rodata @3904 */ -// SECTION_RODATA static u8 const lit_3904[8] = { -// 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, -// }; -// COMPILER_STRIP_GATE(0x80602684, &lit_3904); - /* 805F4C00-805F4DCC 0002A0 01CC+00 1/1 0/0 0/0 .text nodeCallBack__FP8J3DJointi */ static int nodeCallBack(J3DJoint* i_joint, int param_2) { if (param_2 == 0) { int jntNo = i_joint->getJntNo(); J3DModel* model = j3dSys.getModel(); - b_gnd_class* userArea = (b_gnd_class*)model->getUserArea(); + b_gnd_class* a_this = (b_gnd_class*)model->getUserArea(); - if (userArea) { - PSMTXCopy(model->getAnmMtx(jntNo), *calc_mtx); + if (a_this != NULL) { + MTXCopy(model->getAnmMtx(jntNo), *calc_mtx); if (jntNo == 1) { - cMtx_XrotM(*calc_mtx, userArea->field_0x0c8c / 4); + cMtx_XrotM(*calc_mtx, a_this->mGndBodyRotX / 4); } else if (jntNo == 4) { - cMtx_XrotM(*calc_mtx, userArea->field_0x0c8c * 0.75f); - cMtx_ZrotM(*calc_mtx, -userArea->field_0x0c8e); + cMtx_XrotM(*calc_mtx, a_this->mGndBodyRotX * 0.75f); + cMtx_ZrotM(*calc_mtx, -a_this->mGndHeadRotZ); } else if (jntNo == 28) { - cMtx_XrotM(*calc_mtx, userArea->field_0x1fca); + cMtx_XrotM(*calc_mtx, a_this->mGndArmRRotX); } else if (jntNo == 17) { - cMtx_YrotM(*calc_mtx, userArea->field_0x1fcc); + cMtx_YrotM(*calc_mtx, a_this->mGndShoulderLRotY); } else if (jntNo == 37) { - cMtx_XrotM(*calc_mtx, userArea->field_0x26c0); + cMtx_XrotM(*calc_mtx, a_this->mGndLegRotX); } else if (jntNo == 41) { - cMtx_XrotM(*calc_mtx, -userArea->field_0x26c0); + cMtx_XrotM(*calc_mtx, -a_this->mGndLegRotX); } model->setAnmMtx(jntNo, *calc_mtx); - PSMTXCopy(*calc_mtx, J3DSys::mCurrentMtx); + MTXCopy(*calc_mtx, J3DSys::mCurrentMtx); } } + return 1; } @@ -169,2442 +247,1943 @@ static int h_nodeCallBack(J3DJoint* i_joint, int param_2) { if (param_2 == 0) { int jntNo = i_joint->getJntNo(); J3DModel* model = j3dSys.getModel(); - b_gnd_class* userArea = (b_gnd_class*)model->getUserArea(); + b_gnd_class* a_this = (b_gnd_class*)model->getUserArea(); - if (userArea) { - PSMTXCopy(model->getAnmMtx(jntNo), *calc_mtx); + if (a_this != NULL) { + MTXCopy(model->getAnmMtx(jntNo), *calc_mtx); if (jntNo == 4 || jntNo == 5) { - cMtx_ZrotM(*calc_mtx, -userArea->field_0x0c5c * 2); + cMtx_ZrotM(*calc_mtx, -a_this->mHorseLegRot * 2); } else if (jntNo == 8 || jntNo == 9) { - cMtx_YrotM(*calc_mtx, -userArea->field_0x0c5c * 2); + cMtx_YrotM(*calc_mtx, -a_this->mHorseLegRot * 2); } else if (jntNo == 28 || jntNo == 29) { - cMtx_YrotM(*calc_mtx, userArea->field_0x0c5c << 1); + cMtx_YrotM(*calc_mtx, a_this->mHorseLegRot << 1); } else if (jntNo == 32 || jntNo == 33) { - cMtx_YrotM(*calc_mtx, userArea->field_0x0c5c << 1); + cMtx_YrotM(*calc_mtx, a_this->mHorseLegRot << 1); } model->setAnmMtx(jntNo, *calc_mtx); - PSMTXCopy(*calc_mtx, J3DSys::mCurrentMtx); + MTXCopy(*calc_mtx, J3DSys::mCurrentMtx); } } + return 1; } -// /* ############################################################################################## */ -// /* 8060268C-80602690 000028 0004+00 0/5 0/0 0/0 .rodata @4102 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4102 = 100.0f; -// COMPILER_STRIP_GATE(0x8060268C, &lit_4102); -// #pragma pop - -// /* 80602690-80602694 00002C 0004+00 0/3 0/0 0/0 .rodata @4103 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4103 = 3000.0f; -// COMPILER_STRIP_GATE(0x80602690, &lit_4103); -// #pragma pop - /* 805F4F38-805F53A4 0005D8 046C+00 1/0 0/0 0/0 .text daB_GND_Draw__FP11b_gnd_class */ static int daB_GND_Draw(b_gnd_class* i_this) { - // NONMATCHING - static _GXColor l_color = { - 20, 15, 0, 255 - }; + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; - if (i_this->field_0x2738) { + if (i_this->mNoDrawTimer != 0) { return 1; } J3DModel* model = i_this->mpModelMorf->getModel(); - g_env_light.settingTevStruct(0, &i_this->current.pos, &i_this->tevStr); + g_env_light.settingTevStruct(0, &a_this->current.pos, &a_this->tevStr); - i_this->field_0x0728[i_this->field_0x0748]->entry(model->getModelData()); - i_this->field_0x0724->entry(model->getModelData()); - i_this->field_0x0744->entry(model->getModelData()); - g_env_light.setLightTevColorType_MAJI(model, &i_this->tevStr); + i_this->mpGndEyeBtk[i_this->mGndEyeBtkNo]->entry(model->getModelData()); + i_this->mpGndCoreBrk->entry(model->getModelData()); + i_this->mpGndEyeBtp->entry(model->getModelData()); + + g_env_light.setLightTevColorType_MAJI(model, &a_this->tevStr); + i_this->mpModelMorf->entryDL(); - g_env_light.settingTevStruct(5, &i_this->current.pos, &i_this->field_0x0774); - g_env_light.setLightTevColorType_MAJI(i_this->field_0x0768, &i_this->field_0x0774); - mDoExt_modelUpdateDL(i_this->field_0x0768); - if (10 < i_this->field_0x0c24) { - g_env_light.setLightTevColorType_MAJI(i_this->field_0x0c2c[i_this->field_0x0c26], &i_this->tevStr); - model->getModelData()->getMaterialNodePointer(0); - J3DGXColor* pJVar4 = i_this->field_0x0c2c[i_this->field_0x0c26]->getModelData()->getMaterialNodePointer(0)->getTevKColor(3); - pJVar4->a = i_this->field_0x0c24; - mDoExt_modelUpdateDL(i_this->field_0x0c2c[i_this->field_0x0c26]); + + g_env_light.settingTevStruct(5, &a_this->current.pos, &i_this->mSwordTevstr); + g_env_light.setLightTevColorType_MAJI(i_this->mpSwordModel, &i_this->mSwordTevstr); + mDoExt_modelUpdateDL(i_this->mpSwordModel); + + if (i_this->mSwordBlurAlpha > 10) { + g_env_light.setLightTevColorType_MAJI(i_this->mpSwordBlurModel[i_this->mSwordBlurType], &a_this->tevStr); + + J3DMaterial* material = i_this->mpSwordBlurModel[i_this->mSwordBlurType]->getModelData()->getMaterialNodePointer(0); + material->getTevKColor(3)->a = i_this->mSwordBlurAlpha; + mDoExt_modelUpdateDL(i_this->mpSwordBlurModel[i_this->mSwordBlurType]); } - if (i_this->field_0x0771 == 0) { - g_env_light.setLightTevColorType_MAJI(i_this->field_0x076c, &i_this->tevStr); - mDoExt_modelUpdateDL(i_this->field_0x076c); + if (!i_this->mHideSheath) { + g_env_light.setLightTevColorType_MAJI(i_this->mpSheathModel, &a_this->tevStr); + mDoExt_modelUpdateDL(i_this->mpSheathModel); } - if (i_this->field_0x0754 != 0) { - J3DModel* model = i_this->field_0x05d8->getModel(); - g_env_light.setLightTevColorType_MAJI(model->getModelData(), &i_this->tevStr); - i_this->field_0x0750->entry(i_this->field_0x05d8->getModel()->getModelData()); - i_this->field_0x074c->entry(i_this->field_0x05d8->getModel()->getModelData()); - i_this->field_0x05d8->entryDL(); + if (i_this->mDrawZelda) { + g_env_light.setLightTevColorType_MAJI(i_this->mpZeldaModel->getModel(), &a_this->tevStr); + i_this->mpZeldaBtk->entry(i_this->mpZeldaModel->getModel()->getModelData()); + i_this->mpZeldaBtp->entry(i_this->mpZeldaModel->getModel()->getModelData()); + i_this->mpZeldaModel->entryDL(); } - if (i_this->field_0x26c4 >= 60) { + if (i_this->mDemoCamMode >= 60) { return 1; } for (int i = 0; i < 36; i++) { - g_env_light.setLightTevColorType_MAJI(i_this->field_0x0b94[i], &i_this->tevStr); - mDoExt_modelUpdateDL(i_this->field_0x0b94[i]); + g_env_light.setLightTevColorType_MAJI(i_this->mpMantShadowModel[i], &a_this->tevStr); + mDoExt_modelUpdateDL(i_this->mpMantShadowModel[i]); } - J3DModel* horseModel = NULL; - if (i_this->field_0x1fc4 != 0) { - horseModel = i_this->mpHorseMorf->getModel(); - g_env_light.setLightTevColorType_MAJI(horseModel, &i_this->tevStr); + J3DModel* horse_model = NULL; + if (i_this->mDrawHorse) { + horse_model = i_this->mpHorseMorf->getModel(); + g_env_light.setLightTevColorType_MAJI(horse_model, &a_this->tevStr); i_this->mpHorseMorf->entryDL(); } cXyz shadowPos; - shadowPos.set(i_this->current.pos.x, i_this->current.pos.y + 100.0f, i_this->current.pos.z); - _GXTexObj* texObj = dDlst_shadowControl_c::getSimpleTex(); + shadowPos.set(a_this->current.pos.x, a_this->current.pos.y + 100.0f, a_this->current.pos.z); + i_this->mShadowID = dComIfGd_setShadow(i_this->mShadowID, 1, model, - &shadowPos, 3000.0f, 0.0f, - i_this->field_0x0cd4.GetGroundH(), 0.0f, i_this->field_0x0cd4.m_gnd, - &i_this->tevStr, 0, 1.0f, texObj); - dComIfGd_addRealShadow(i_this->mShadowID, i_this->field_0x0768); - if (i_this->field_0x1fc4 != 0) { - dComIfGd_addRealShadow(i_this->mShadowID, horseModel); + &shadowPos, 3000.0f, 0.0f, a_this->current.pos.y, + i_this->mAcch.GetGroundH(), i_this->mAcch.m_gnd, + &a_this->tevStr, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex()); + + dComIfGd_addRealShadow(i_this->mShadowID, i_this->mpSwordModel); + + if (i_this->mDrawHorse) { + dComIfGd_addRealShadow(i_this->mShadowID, horse_model); } else { for (int i = 0; i < 36; i++) { - dComIfGd_addRealShadow(i_this->mShadowID, i_this->field_0x0b94[i]); + dComIfGd_addRealShadow(i_this->mShadowID, i_this->mpMantShadowModel[i]); } } - if (i_this->field_0x1fc4 != 0) { - i_this->field_0x2170[0].update(16, l_color, &i_this->tevStr); - dComIfGd_set3DlineMat(&i_this->field_0x2170[0]); - i_this->field_0x2170[1].update(16, l_color, &i_this->tevStr); - dComIfGd_set3DlineMat(&i_this->field_0x2170[1]); - i_this->field_0x21e8.update(2, l_color, &i_this->tevStr); + if (i_this->mDrawHorse) { + static GXColor l_color = {20, 15, 0, 255}; + + i_this->mHorseReins[0].update(16, l_color, &a_this->tevStr); + dComIfGd_set3DlineMat(&i_this->mHorseReins[0]); + + i_this->mHorseReins[1].update(16, l_color, &a_this->tevStr); + dComIfGd_set3DlineMat(&i_this->mHorseReins[1]); + + i_this->field_0x21e8.update(2, l_color, &a_this->tevStr); dComIfGd_set3DlineMat(&i_this->field_0x21e8); } return 1; } -// /* 805F53A4-805F53E0 000A44 003C+00 6/6 0/0 0/0 .text __dt__4cXyzFv */ -// // cXyz::~cXyz() { -// extern "C" void __dt__4cXyzFv() { -// // NONMATCHING -// } - -// /* ############################################################################################## */ -// /* 80602694-8060269C 000030 0008+00 0/3 0/0 0/0 .rodata @4154 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static u8 const lit_4154[8] = { -// 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// }; -// COMPILER_STRIP_GATE(0x80602694, &lit_4154); -// #pragma pop - -// /* 8060269C-806026A4 000038 0008+00 0/3 0/0 0/0 .rodata @4155 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static u8 const lit_4155[8] = { -// 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// }; -// COMPILER_STRIP_GATE(0x8060269C, &lit_4155); -// #pragma pop - -// /* 806026A4-806026AC 000040 0008+00 0/3 0/0 0/0 .rodata @4156 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static u8 const lit_4156[8] = { -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// }; -// COMPILER_STRIP_GATE(0x806026A4, &lit_4156); -// #pragma pop - -// /* 806026AC-806026B0 000048 0004+00 0/4 0/0 0/0 .rodata @4157 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4157 = 1000.0f; -// COMPILER_STRIP_GATE(0x806026AC, &lit_4157); -// #pragma pop - /* 805F53E0-805F5574 000A80 0194+00 1/1 0/0 0/0 .text shot_s_sub__FPvPv */ static void* shot_s_sub(void* i_actor, void* i_data) { - // NONMATCHING - if (fopAcM_IsActor(i_actor) && (fopAcM_GetName(i_actor) == PROC_ARROW) && - ((fopAcM_GetParam(i_actor) == 1) || (fopAcM_GetParam(i_actor) == 2))) { - cXyz vec = ((fopAc_ac_c*)i_data)->current.pos - ((fopAc_ac_c*)i_actor)->current.pos; - if (vec.abs() < 1000.0f) { - return i_actor; - } + if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_ARROW && + (fopAcM_GetParam(i_actor) == 1 || fopAcM_GetParam(i_actor) == 2)) + { + cXyz vec_to_arrow = ((fopAc_ac_c*)i_data)->current.pos - ((fopAc_ac_c*)i_actor)->current.pos; + if (vec_to_arrow.abs() < 1000.0f) { + return i_actor; + } } + return NULL; } -// /* ############################################################################################## */ -// /* 806026B0-806026B4 00004C 0004+00 0/1 0/0 0/0 .rodata @4312 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4312 = -5000.0f; -// COMPILER_STRIP_GATE(0x806026B0, &lit_4312); -// #pragma pop - -// /* 806026B4-806026B8 000050 0004+00 0/2 0/0 0/0 .rodata @4313 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4313 = 6000.0f; -// COMPILER_STRIP_GATE(0x806026B4, &lit_4313); -// #pragma pop - -// /* 806026B8-806026BC 000054 0004+00 0/6 0/0 0/0 .rodata @4314 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4314 = 200.0f; -// COMPILER_STRIP_GATE(0x806026B8, &lit_4314); -// #pragma pop - -// /* 806026BC-806026C0 000058 0004+00 0/2 0/0 0/0 .rodata @4315 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4315 = 2000.0f; -// COMPILER_STRIP_GATE(0x806026BC, &lit_4315); -// #pragma pop - -// /* 806026C0-806026C4 00005C 0004+00 0/2 0/0 0/0 .rodata @4316 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4316 = 250.0f; -// COMPILER_STRIP_GATE(0x806026C0, &lit_4316); -// #pragma pop - -// /* 806026C4-806026C8 000060 0004+00 0/4 0/0 0/0 .rodata @4317 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4317 = 500.0f; -// COMPILER_STRIP_GATE(0x806026C4, &lit_4317); -// #pragma pop - -// /* 806026C8-806026CC 000064 0004+00 0/1 0/0 0/0 .rodata @4318 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4318 = -10000.0f; -// COMPILER_STRIP_GATE(0x806026C8, &lit_4318); -// #pragma pop - -// /* 806026CC-806026D0 000068 0004+00 0/1 0/0 0/0 .rodata @4319 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4319 = 700.0f; -// COMPILER_STRIP_GATE(0x806026CC, &lit_4319); -// #pragma pop - -// /* 806026D0-806026D4 00006C 0004+00 0/1 0/0 0/0 .rodata @4320 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4320 = -700.0f; -// COMPILER_STRIP_GATE(0x806026D0, &lit_4320); -// #pragma pop - -// /* 806026D4-806026D8 000070 0004+00 0/1 0/0 0/0 .rodata @4321 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4321 = 2500.0f; -// COMPILER_STRIP_GATE(0x806026D4, &lit_4321); -// #pragma pop - - -// UNK_BSS(3810) -// UNK_BSS(4187) - /* 80602FB4-80602FD0 000054 001C+00 3/5 0/0 0/0 .bss l_HIO */ static daB_GND_HIO_c l_HIO; -/* 80602FD0-80602FE0 000070 000C+04 0/1 0/0 0/0 .bss @4187 */ -// static char lit_4187; - -/* 80602FE0-80602FEC 000080 000C+00 0/1 0/0 0/0 .bss k_pos$4186 */ -// static cXyz k_pos; - /* 805F5574-805F5BE8 000C14 0674+00 1/1 0/0 0/0 .text gake_check__FP11b_gnd_class */ static u32 gake_check(b_gnd_class* i_this) { - // NONMATCHING - static f32 chk_x[] = { - 14167.0f, 34775.0f, -24164.0f, -11627.0f - }; - static f32 chk_z[4] = { - 21775.0f, -16467.0f, 9747.0f, 22601.0f - }; - - int iVar9; - BOOL bVar1; - dBgS_GndChk dStack_94; - cXyz local_b8; - cXyz local_ac; + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + dBgS_GndChk gnd_chk; + cXyz sp40; + cXyz sp34; - if (i_this->current.pos.y < -5000.0f) { - i_this->current.pos = i_this->home.pos; - i_this->old.pos = i_this->current.pos; + if (a_this->current.pos.y < -5000.0f) { + a_this->current.pos = a_this->home.pos; + a_this->old.pos = a_this->current.pos; } - cXyz local_a0; - for (iVar9 = 0; iVar9 < 4; iVar9++) { - local_a0.x = (chk_x[iVar9] - i_this->current.pos.x); - local_a0.z = (chk_z[iVar9] - i_this->current.pos.z); - s16 sVar5 = cM_atan2s(local_a0.x, local_a0.z) - i_this->shape_angle.y; + for (int i = 0; i < 4; i++) { + // check if ganondorf is near one of the field exits + // 0: Kakariko, 1: Eldin Bridge, 2: Castle Town, 3: Eldin Gorge + static f32 chk_x[] = {14167.0f, 34775.0f, -24164.0f, -11627.0f}; + static f32 chk_z[] = {21775.0f, -16467.0f, 9747.0f, 22601.0f}; - if ((JMAFastSqrt(local_a0.x * local_a0.x + local_a0.z * local_a0.z) < 6000.0f && - sVar5 < 0x4000) && -0x4000 < sVar5) { - if (0 < sVar5) { + sp40.x = chk_x[i] - a_this->current.pos.x; + sp40.z = chk_z[i] - a_this->current.pos.z; + s16 sp12 = cM_atan2s(sp40.x, sp40.z) - a_this->shape_angle.y; + + if (JMAFastSqrt(sp40.x * sp40.x + sp40.z * sp40.z) < 6000.0f && sp12 < 0x4000 && -0x4000 < sp12) { + if (sp12 > 0) { return 4; + } else { + return 5; } - return 5; } } + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + BOOL sp14 = FALSE; - cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); - bVar1 = FALSE; - local_a0.x = 200.0f; - local_a0.y = 1000.0f; - local_a0.z = 200.0f; - MtxPosition(&local_a0, &local_ac); - local_ac += i_this->current.pos; - - dStack_94.SetPos(&local_ac); + cXyz sp28; + sp40.x = 200.0f; + sp40.y = 1000.0f; + sp40.z = 200.0f; + MtxPosition(&sp40, &sp34); + sp34 += i_this->current.pos; + gnd_chk.SetPos(&sp34); - if (i_this->current.pos.y - dComIfG_Bgsp().GroundCross(&dStack_94) > 2000.0f) { - local_a0.x *= -1.0f; - MtxPosition(&local_a0, &local_ac); - local_ac += i_this->current.pos; - dStack_94.SetPos(&local_ac); - if (i_this->current.pos.y - dComIfG_Bgsp().GroundCross(&dStack_94) > 2000.0f) { - local_b8 = local_ac; - bVar1 = TRUE; + if (a_this->current.pos.y - dComIfG_Bgsp().GroundCross(&gnd_chk) > 2000.0f) { + sp28 = sp34; + sp14 = TRUE; + } else { + sp40.x *= -1.0f; + MtxPosition(&sp40, &sp34); + sp34 += i_this->current.pos; + gnd_chk.SetPos(&sp34); + if (i_this->current.pos.y - dComIfG_Bgsp().GroundCross(&gnd_chk) > 2000.0f) { + sp28 = sp34; + sp14 = TRUE; } else { - local_a0.x = 0.0f; - local_a0.y = 1000.0f; - local_a0.z = 250.0f; - MtxPosition(&local_a0, &local_ac); - local_ac += i_this->current.pos; - dStack_94.SetPos(&local_ac); - if (2000.0f > i_this->current.pos.y - dComIfG_Bgsp().GroundCross(&dStack_94)) { - local_b8 = local_ac; - bVar1 = TRUE; + sp40.x = 0.0f; + sp40.y = 1000.0f; + sp40.z = 250.0f; + MtxPosition(&sp40, &sp34); + sp34 += i_this->current.pos; + gnd_chk.SetPos(&sp34); + if (i_this->current.pos.y - dComIfG_Bgsp().GroundCross(&gnd_chk) > 2000.0f) { + sp28 = sp34; + sp14 = TRUE; } } } - // if (lit_4187 == 0) { - static cXyz k_pos; - k_pos.set(0.0f, 0.0f, 0.0f); - // k_pos = cXyz(0.0f, 0.0f, 0.0f); - // lit_4187 = 1; - // } + static cXyz k_pos(0.0f, 0.0f, 0.0f); - if (bVar1) { + if (sp14) { if (k_pos.y < -5000.0f) { - k_pos.y = i_this->current.pos.y; - k_pos.x = local_b8.x; - k_pos.z = local_b8.z; - local_b8.y = k_pos.y; + sp28.y = a_this->current.pos.y; + k_pos = sp28; } - local_a0 = i_this->current.pos - k_pos; - if (local_a0.abs() < 500.0f) { - cMtx_YrotS(*calc_mtx, cM_atan2s(local_a0.x, local_a0.z)); - local_a0.x = 0.0f; - local_a0.y = 0.0f; - local_a0.z = 500.0f; - MtxPosition(&local_a0, &local_ac); + sp40 = a_this->current.pos - k_pos; + if (sp40.abs() < 500.0f) { + cMtx_YrotS(*calc_mtx, cM_atan2s(sp40.x, sp40.z)); + sp40.x = 0.0f; + sp40.y = 0.0f; + sp40.z = 500.0f; + MtxPosition(&sp40, &sp34); - i_this->current.pos.x = local_ac.x + k_pos.x; - i_this->current.pos.z = local_ac.z + k_pos.z; + a_this->current.pos.x = sp34.x + k_pos.x; + a_this->current.pos.z = sp34.z + k_pos.z; } } else { k_pos.set(0.0f, -10000.0f, 0.0f); } - local_a0.x = 700.0f; - local_a0.y = 1000.0f; - local_a0.z = 2000.0f; - MtxPosition(&local_a0, &local_ac); - local_ac += i_this->current.pos; - dStack_94.SetPos(&local_ac); + sp40.x = 700.0f; + sp40.y = 1000.0f; + sp40.z = 2000.0f; + MtxPosition(&sp40, &sp34); + sp34 += i_this->current.pos; + gnd_chk.SetPos(&sp34); - if (i_this->current.pos.y - dComIfG_Bgsp().GroundCross(&dStack_94) > 2000.0f) { + if (i_this->current.pos.y - dComIfG_Bgsp().GroundCross(&gnd_chk) > 2000.0f) { return 2; - } else { - local_a0.x = -700.0f; - MtxPosition(&local_a0, &local_ac); - local_ac += i_this->current.pos; - dStack_94.SetPos(&local_ac); - - if (i_this->current.pos.y - dComIfG_Bgsp().GroundCross(&dStack_94) > 2000.0f) { - return 3; - } else { - local_a0.x = 0.0f; - local_a0.y = 1000.0f; - local_a0.z = 2500.0f; - MtxPosition(&local_a0, &local_ac); - local_ac += i_this->current.pos; - dStack_94.SetPos(&local_ac); + } - if (i_this->current.pos.y - dComIfG_Bgsp().GroundCross(&dStack_94) > 2000.0f) { - return 1; - } - } + sp40.x = -700.0f; + MtxPosition(&sp40, &sp34); + sp34 += i_this->current.pos; + gnd_chk.SetPos(&sp34); + + if (i_this->current.pos.y - dComIfG_Bgsp().GroundCross(&gnd_chk) > 2000.0f) { + return 3; + } + + sp40.x = 0.0f; + sp40.y = 1000.0f; + sp40.z = 2500.0f; + MtxPosition(&sp40, &sp34); + sp34 += i_this->current.pos; + gnd_chk.SetPos(&sp34); + + if (i_this->current.pos.y - dComIfG_Bgsp().GroundCross(&gnd_chk) > 2000.0f) { + return 1; } return 0; } -// /* ############################################################################################## */ -// /* 806026D8-806026DC 000074 0004+00 0/12 0/0 0/0 .rodata @4436 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4436 = 10.0f; -// COMPILER_STRIP_GATE(0x806026D8, &lit_4436); -// #pragma pop - -// /* 806026DC-806026E0 000078 0004+00 0/4 0/0 0/0 .rodata @4437 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4437 = 150.0f; -// COMPILER_STRIP_GATE(0x806026DC, &lit_4437); -// #pragma pop - -// /* 806026E0-806026E4 00007C 0004+00 0/1 0/0 0/0 .rodata @4438 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4438 = 900.0f; -// COMPILER_STRIP_GATE(0x806026E0, &lit_4438); -// #pragma pop - -// /* 806026E4-806026E8 000080 0004+00 0/1 0/0 0/0 .rodata @4439 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4439 = 350.0f; -// COMPILER_STRIP_GATE(0x806026E4, &lit_4439); -// #pragma pop - /* 805F5BE8-805F5EF4 001288 030C+00 1/1 0/0 0/0 .text saku_jump_check__FP11b_gnd_class */ -static int saku_jump_check(b_gnd_class* i_this) { - // NONMATCHING - fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; - cXyz local_ac, local_b8, cStack_c4, local_d0, local_dc; - if (4 <= i_this->field_0x0c76) { - return 0; +static BOOL saku_jump_check(b_gnd_class* i_this) { + if (i_this->mGakeChkType >= 4) { + return FALSE; } + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; dBgS_LinChk lineChk; cM3dGPla plane; + cXyz sp54, sp48, sp3C; - cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); - cMtx_XrotM(*calc_mtx, i_this->shape_angle.x); + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + cMtx_XrotM(*calc_mtx, a_this->shape_angle.x); + sp54.x = 10.0f; + sp54.y = 150.0f; + sp54.z = 900.0f; - local_ac.x = 10.0f; - local_ac.y = 150.0f; - local_ac.z = 900.0f; - - MtxPosition(&local_ac, &cStack_c4); + MtxPosition(&sp54, &sp3C); - cStack_c4 += i_this->current.pos; - cStack_c4.y += 200.0f; + sp3C += a_this->current.pos; + sp3C.y += 200.0f; - local_b8 = i_this->current.pos; - local_b8.y += 350.0f; + sp48 = a_this->current.pos; + sp48.y += 350.0f; - lineChk.Set(&local_b8, &cStack_c4, a_this); + lineChk.Set(&sp48, &sp3C, a_this); if (dComIfG_Bgsp().LineCross(&lineChk) && dComIfG_Bgsp().GetTriPla(lineChk, &plane) && !cBgW_CheckBGround(plane.mNormal.y)) { - return 0; + return FALSE; } - local_b8.y -= 250.0f; - cStack_c4.y -= 200.0f; - lineChk.Set(&local_b8, &cStack_c4, a_this); + sp48.y -= 250.0f; + sp3C.y -= 200.0f; + lineChk.Set(&sp48, &sp3C, a_this); + if (dComIfG_Bgsp().LineCross(&lineChk)) { - if (dComIfG_Bgsp().GetTriPla(lineChk, &plane)) { - if (!cBgW_CheckBGround(plane.mNormal.y)) { - local_d0 = lineChk.mLin.mEnd; + if (dComIfG_Bgsp().GetTriPla(lineChk, &plane) && !cBgW_CheckBGround(plane.mNormal.y)) { + cXyz line_cross_pos(lineChk.GetCross()); + cXyz sp24; - local_ac.x *= -1.0f; - MtxPosition(&local_ac, &cStack_c4); - - cStack_c4 += i_this->current.pos; - lineChk.Set(&local_b8, &cStack_c4, a_this); + sp54.x *= -1.0f; + MtxPosition(&sp54, &sp3C); + sp3C += a_this->current.pos; + lineChk.Set(&sp48, &sp3C, a_this); - if (dComIfG_Bgsp().LineCross(&lineChk)) { - return 0; - } - local_dc = lineChk.GetCross(); - local_ac = local_dc - local_d0; - - s16 sVar1 = cM_atan2s(local_ac.x, local_ac.z) + 0x4000 - i_this->shape_angle.y; - if (sVar1 > -0x3000 && sVar1 < 0x3000) { - return 1; - } + if (dComIfG_Bgsp().LineCross(&lineChk)) { + sp24 = lineChk.GetCross(); + } else { + return FALSE; + } + + sp54 = sp24 - line_cross_pos; + + s16 var_r28 = cM_atan2s(sp54.x, sp54.z) + 0x4000 - a_this->shape_angle.y; + if (var_r28 > -0x3000 && var_r28 < 0x3000) { + return TRUE; } } } - return 0; + return FALSE; } -/* ############################################################################################## */ -// /* 806026E8-806026EC 000084 0004+00 2/13 0/0 0/0 .rodata @4460 */ -// SECTION_RODATA static f32 const lit_4460 = 2.0f; -// COMPILER_STRIP_GATE(0x806026E8, &lit_4460); - /* 805F5F3C-805F6068 0015DC 012C+00 1/1 0/0 0/0 .text b_gnd_h_wait__FP11b_gnd_class */ static void b_gnd_h_wait(b_gnd_class* i_this) { - // NONMATCHING - s16 sVar1 = i_this->field_0x0c3c; - s16 sVar2 = i_this->field_0x05bc; + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + f32 player_distxz = i_this->mPlayerDistXZ; + s16 player_angle = i_this->mPlayerAngleY; - switch (sVar2) { - case -1: - Z2GetAudioMgr()->bgmStart(0x200005d, 0, 0); - case 0: - anm_init(i_this, 75, 10.0f, 2, 1.0f); - h_anm_init(i_this, 15, 10.0f, 2, 1.0f); - i_this->field_0x05bc = 1; - if (i_this->field_0x0c44[0] == 0) { - i_this->field_0x05bc = 2; - } - break; - case 2: - cLib_addCalcAngleS2(&i_this->current.angle.y, sVar1, 8, 0x200); - sVar2 = sVar1 - i_this->current.angle.y; - if ((sVar2 < 0x800) && (sVar2 > -0x800)) { - i_this->mActionID = ACTION_HWAIT_2; - i_this->field_0x05bc = 0; - } + switch (i_this->mMoveMode) { + case -1: + Z2GetAudioMgr()->bgmStart(0x200005D, 0, 0); + case 0: + anm_init(i_this, B_GND_BCK_EGND_RWAIT, 10.0f, 2, 1.0f); + h_anm_init(i_this, B_HG_BCK_HG_WAIT, 10.0f, 2, 1.0f); + i_this->mMoveMode = 1; + case 1: + if (i_this->field_0xc44[0] == 0) { + i_this->mMoveMode = 2; + } + break; + case 2: + cLib_addCalcAngleS2(&a_this->current.angle.y, player_angle, 8, 0x200); + + s16 angle_diff = player_angle - a_this->current.angle.y; + if (angle_diff < 0x800 && angle_diff > -0x800) { + i_this->mActionMode = ACTION_HWAIT_2; + i_this->mMoveMode = 0; + } } - cLib_addCalc0(&i_this->speedF, 1.0f, 2.0f); + + cLib_addCalc0(&a_this->speedF, 1.0f, 2.0f); } -// /* ############################################################################################## */ -// /* 806026EC-806026F0 000088 0004+00 0/5 0/0 0/0 .rodata @4503 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4503 = 0.5f; -// COMPILER_STRIP_GATE(0x806026EC, &lit_4503); -// #pragma pop - -// /* 806026F0-806026F4 00008C 0004+00 0/11 0/0 0/0 .rodata @4504 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4504 = 3.0f; -// COMPILER_STRIP_GATE(0x806026F0, &lit_4504); -// #pragma pop - -// /* 806026F4-806026F8 000090 0004+00 0/1 0/0 0/0 .rodata @4505 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4505 = 4000.0f; -// COMPILER_STRIP_GATE(0x806026F4, &lit_4505); -// #pragma pop - -// /* 806026F8-806026FC 000094 0004+00 0/1 0/0 0/0 .rodata @4506 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4506 = 7500.0f; -// COMPILER_STRIP_GATE(0x806026F8, &lit_4506); -// #pragma pop - /* 805F6068-805F6290 001708 0228+00 1/1 0/0 0/0 .text b_gnd_h_wait2__FP11b_gnd_class */ static void b_gnd_h_wait2(b_gnd_class* i_this) { - // NONMATCHING - s16 sVar2 = i_this->field_0x0c3c; - float fVar1 = i_this->mpHorseMorf->getFrame(); - s16 sVar3 = i_this->field_0x05bc; + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + + cXyz sp18; + cXyz spC; + f32 player_distxz = i_this->mPlayerDistXZ; + s16 player_angle = i_this->mPlayerAngleY; + int h_anm_frame = i_this->mpHorseMorf->getFrame(); - switch (sVar3) { - case 0: - if (i_this->field_0x0c76 != 0) { - i_this->field_0x05cc = i_this->current.angle.y + -0x8000; - } else { - float fVar5 = cM_rndF(1.0f); - if (fVar5 < 0.5f) { - i_this->field_0x05cc = sVar2 + 0x2000; - } else { - i_this->field_0x05cc = sVar2 + -0x2000; - } - } + switch (i_this->mMoveMode) { + case 0: + if (i_this->mGakeChkType != 0) { + i_this->field_0x5cc = a_this->current.angle.y + 0x8000; + } else if (cM_rndF(1.0f) < 0.5f) { + i_this->field_0x5cc = player_angle + 0x2000; + } else { + i_this->field_0x5cc = player_angle + -0x2000; + } - if (i_this->field_0x05cc - i_this->current.angle.y > 1) { - anm_init(i_this, 67, 3.0f, 0, 1.0f); - h_anm_init(i_this, 12, 3.0f, 0, 1.0f); - } else { - anm_init(i_this, 68, 3.0f, 0, 1.0f); - h_anm_init(i_this, 13, 3.0f, 0, 1.0f); - } + if ((s16)(i_this->field_0x5cc - a_this->current.angle.y) > 0) { + anm_init(i_this, B_GND_BCK_EGND_RINANAKI02L, 3.0f, 0, 1.0f); + h_anm_init(i_this, B_HG_BCK_HG_STANDTURNL, 3.0f, 0, 1.0f); + OS_REPORT(" GND TURN L\n"); + } else { + anm_init(i_this, B_GND_BCK_EGND_RINANAKI02R, 3.0f, 0, 1.0f); + h_anm_init(i_this, B_HG_BCK_HG_STANDTURNR, 3.0f, 0, 1.0f); + OS_REPORT(" GND TURN R\n"); + } - i_this->field_0x05bc = 1; - i_this->field_0x0c68 = 0x100; - case 2: - break; - default: - cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->field_0x05cc, 4, i_this->field_0x0c68); - cLib_addCalcAngleS2(&i_this->field_0x0c68, 0x400, 1, 0x80); - - if (i_this->mpModelMorf->isStop()) { - anm_init(i_this, 75, 10.0f, 2, 1.0f); - h_anm_init(i_this, 15, 10.0f, 2, 1.0f); - i_this->field_0x05bc = 2; - } - break; + i_this->mMoveMode = 1; + i_this->field_0xc68 = 0x100; + case 1: + if (h_anm_frame >= 12) { + cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x5cc, 4, i_this->field_0xc68); + cLib_addCalcAngleS2(&i_this->field_0xc68, 0x400, 1, 0x80); + } + + if (i_this->mpModelMorf->isStop()) { + anm_init(i_this, B_GND_BCK_EGND_RWAIT, 10.0f, 2, 1.0f); + h_anm_init(i_this, B_HG_BCK_HG_WAIT, 10.0f, 2, 1.0f); + i_this->mMoveMode = 2; + } + break; + case 2: + if (player_distxz < 4000.0f || player_distxz > 7500.0f) { + i_this->mActionMode = ACTION_HRUN_P; + i_this->mMoveMode = 0; + i_this->field_0xc44[3] = 100; + } } - if (i_this->field_0x0c38 < 4000.0f || i_this->field_0x0c38 > 7500.0f) { - i_this->mActionID = ACTION_HRUN_P; - i_this->field_0x05bc = 0; - i_this->field_0x0c44[3] = 100; - } - cLib_addCalc0(&i_this->speedF, 1.0f, 1.0f); + + cLib_addCalc0(&a_this->speedF, 1.0f, 1.0f); } -// /* ############################################################################################## */ -// /* 806026FC-80602700 000098 0004+00 0/7 0/0 0/0 .rodata @4960 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4960 = 30.0f; -// COMPILER_STRIP_GATE(0x806026FC, &lit_4960); -// #pragma pop - -// /* 80602700-80602704 00009C 0004+00 0/6 0/0 0/0 .rodata @4961 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4961 = 5.0f; -// COMPILER_STRIP_GATE(0x80602700, &lit_4961); -// #pragma pop - -// /* 80602704-80602708 0000A0 0004+00 0/2 0/0 0/0 .rodata @4962 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4962 = 5000.0f; -// COMPILER_STRIP_GATE(0x80602704, &lit_4962); -// #pragma pop - -// /* 80602FEC-80602FF8 00008C 000C+00 0/1 0/0 0/0 .bss @4509 */ -// #pragma push -// #pragma force_active on -// static u8 lit_4509[12]; -// #pragma pop - /* 80602FF8-8060305C 000098 0060+04 2/4 0/0 0/0 .bss b_path */ static cXyz b_path[8]; /* 805F6290-805F6FA4 001930 0D14+00 2/1 0/0 0/0 .text b_gnd_h_run_a__FP11b_gnd_class */ +// NONMATCHING - regswap, equivalent static void b_gnd_h_run_a(b_gnd_class* i_this) { - // NONMATCHING + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; fopAc_ac_c* player = dComIfGp_getPlayer(0); - float fVar19 = i_this->field_0x0c38; - float fVar18; - float fVar20 = 0.0f; - float fVar1 = 1.0f; - float fVar6; - float fVar7; - bool bVar8 = false; - int iVar13 = daPy_getPlayerActorClass()->checkHorseRide(); - int iVar14; - int iVar16; - cXyz local_104, local_f8, local_bc, local_b0, local_c8, local_d4; - if (iVar13 && dComIfGp_getHorseActor()->speedF >= 30.0f) { - bVar8 = true; + cXyz sp8C; + cXyz sp80; + + f32 player_distxz = i_this->mPlayerDistXZ; + f32 speed_target = 0.0f; + f32 speed_step = 1.0f; + + s8 sp9 = 0; + if (daPy_getPlayerActorClass()->checkHorseRide() && dComIfGp_getHorseActor()->speedF >= 30.0f) { + sp9 = 1; } - s16 sVar12 = i_this->current.angle.y; - float fVar2 = 1.0f; - BOOL bVar4 = FALSE; - s16 sVar11 = (i_this->field_0x0c3c + 0x7fff) - player->shape_angle.y; - if (sVar11 < 0x4000 && sVar11 > -0x4000) { - bVar4 = TRUE; + s16 sp12 = a_this->current.angle.y; + f32 anm_speed_target = 1.0f; + + BOOL sp2C = FALSE; + s16 sp10 = (i_this->mPlayerAngleY + 0x7FFF) - player->shape_angle.y; + if (sp10 < 0x4000 && sp10 > -0x4000) { + sp2C = TRUE; } - bool bVar3 = false; - s16 sVar15 = 128; + s8 sp8 = false; + s16 spE = 0x80; + cXyz sp74; + cXyz sp68; - switch (i_this->field_0x05bc) { - case 0: - case 1: - if (i_this->mAnmID != 73) { - anm_init(i_this, 73, 5.0f, 2, 1.0f); - h_anm_init(i_this, 9, 5.0f, 2, 1.0f); - i_this->mPlaySpeed = 1.0f; - } + switch (i_this->mMoveMode) { + case 0: + case 1: { + if (i_this->mAnmID != B_GND_BCK_EGND_RRUN) { + anm_init(i_this, B_GND_BCK_EGND_RRUN, 5.0f, 2, 1.0f); + h_anm_init(i_this, B_HG_BCK_HG_RUN, 5.0f, 2, 1.0f); + i_this->mPlaySpeed = 1.0f; + } - i_this->field_0x05bc = 2; - i_this->field_0x0c68 = 0; - iVar13 = 0; - iVar14 = 1; - iVar16 = 12; - - for (int i = 0; i < 8; i++) { - local_c8 = b_path[i * 12] - i_this->current.pos; - local_d4 = b_path[i * 12] - i_this->current.pos; - - if (local_d4.abs() > local_c8.abs()) { - i++; - } - } - - i_this->field_0x0c60 = iVar13; - i_this->field_0x0c44[2] = cM_rndF(100.0f) + 100.0f; - case 2: - if (i_this->field_0x0c44[2] == 0 && bVar8) { - i_this->field_0x05bc = 3; - } else if (fVar19 > 5000.0f && i_this->field_0x0c44[3] == 0) { - if (bVar4) { - i_this->field_0x05bc = 20; - i_this->field_0x0c44[0] = 10; - } else { - i_this->mActionID = ACTION_HRUN_P; - i_this->field_0x05bc = 0; - i_this->field_0x0c44[3] = 100; - } - } - - i_this->field_0x0c6a = 1; - break; - case 3: - anm_init(i_this, 56, 3.0f, 0, 1.0f); - i_this->field_0x05bc = 4; - i_this->field_0x1e0f = 1; - i_this->field_0x1e10 = 0.0f; - case 4: - if (i_this->mpModelMorf->isStop()) { - anm_init(i_this, 57, 3.0f, 2, 1.0f); - i_this->field_0x0c44[0] = 20; - i_this->field_0x05bc = 5; - } - break; - case 5: - if (i_this->field_0x0c44[0] == 0) { - anm_init(i_this, 58, 3.0f, 0, 1.0f); - i_this->field_0x05bc = 6; - i_this->field_0x0c44[0] = 15; - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_ATTACK02C, -1); - } - break; - case 6: - if (i_this->field_0x0c44[0] == 1) { - i_this->field_0x1e50.y = i_this->shape_angle.y + 0x4000; - i_this->field_0x1e50.x = 0; - i_this->field_0x1e0f = 2; - i_this->field_0x1e4c = 40.0f; - i_this->field_0x1e0e = 0; - } - - if (i_this->mpModelMorf->isStop()) { - i_this->field_0x05bc = 2; - i_this->field_0x0c44[2] = cM_rndF(100.0f) + 100.0f; - } - break; - case 7: - if (i_this->mHorseAnmID != 9) { - h_anm_init(i_this, 9, 5.0f, 2, 1.0f); - } - anm_init(i_this, 60, 1.0f, 0, 1.0f); - i_this->field_0x05bc = 8; - i_this->field_0x0c44[0] = 300; - case 8: - i_this->field_0x1e08 = 10; - - if (i_this->mpModelMorf->isStop()) { - anm_init(i_this, 61, 2.0f, 2, 1.0f); - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_DAMAGE01, -1); - i_this->field_0x05bc = 9; - } - break; - case 9: - i_this->field_0x1e08 = 10; - if (i_this->field_0x0c44[0] == 0) { - anm_init(i_this, 72, 3.0f, 0, 1.0f); - i_this->field_0x05bc = 10; - } - break; - case 10: - i_this->field_0x0c58 = 10; - - if (i_this->mpModelMorf->isStop()) { - i_this->field_0x05bc = 0; - } - break; - case 11: - if (sVar11 < 1) { - anm_init(i_this, 63, 2.0f, 0, 1.0f); - } else { - anm_init(i_this, 62, 2.0f, 0, 1.0f); - } - i_this->field_0x05bc = 12; - case 12: - i_this->field_0x0c58 = 10; - - if (i_this->mpModelMorf->isStop()) { - i_this->field_0x05bc = 0; - } - break; - case 20: - fVar1 = 2.0f; - if (i_this->field_0x0c44[0] == 0) { - i_this->field_0x05bc = 21; - anm_init(i_this, 59, 3.0f, 0, 1.0f); - h_anm_init(i_this, 14, 3.0f, 0, 1.0f); - } - - i_this->field_0x0c6a = 1; - fVar20 = fVar18; - break; - case 21: - fVar1 = 2.0f; - if (i_this->speedF > 15.0f) { - i_this->field_0x0c6a = 2; - i_this->mZ2Creature.startCreatureSoundLevel(Z2SE_EN_HG_SLIP, 0, -1); - } - - if (i_this->speedF < 2.0f) { - i_this->mActionID = ACTION_HWAIT_2; - i_this->field_0x05bc = 0; - } - } - - if (i_this->field_0x05bc < 20) { - local_f8 = b_path[i_this->field_0x0c60] - i_this->current.pos; - fVar19 = JMAFastSqrt(local_f8.x * local_f8.x + local_f8.z + local_f8.z); + i_this->mMoveMode = 2; + i_this->field_0xc68 = 0; - if (fVar19 < 800.0f) { - local_104 = b_path[i_this->field_0x0c60] - i_this->current.pos; - iVar13 = cM_atan2s(local_104.x, local_104.z); - sVar11 = i_this->current.angle.y - iVar13; - if (sVar11 < 0x4000 && sVar11 > -0x4000) { - i_this->field_0x0c64 = 1; - } else { - i_this->field_0x0c64 = -1; + int sp28 = 0; + + for (int i = 1; i < 8; i++) { + sp74 = b_path[sp28] - a_this->current.pos; + sp68 = b_path[i] - a_this->current.pos; + + if (sp74.abs() > sp68.abs()) { + sp28 = i; } - i_this->field_0x0c60 = i_this->field_0x0c60 + i_this->field_0x0c64; - i_this->field_0x0c60 = i_this->field_0x0c60 & 7; - bVar3 = true; - i_this->field_0x0c68 = 0; } - i_this->field_0x05cc = cM_atan2s(local_b0.x, local_b0.z); - if (i_this->field_0x1e0a >= 1 && i_this->field_0x05bc <= 2) { - fVar20 = (fVar19 - 800.0f) * 2.0f; - fVar19 = 7000.0f; - if (fVar20 > 7000.0f) { - fVar20 = 7000.0f; + i_this->field_0xc60 = sp28; + i_this->field_0xc44[2] = cM_rndF(100.0f) + 100.0f; + } + case 2: + if (i_this->field_0xc44[2] == 0 && sp9) { + i_this->mMoveMode = 3; + } else if (player_distxz > 5000.0f && i_this->field_0xc44[3] == 0) { + if (sp2C) { + i_this->mMoveMode = 20; + i_this->field_0xc44[0] = 10; } else { - if (fVar20 < 0.0f) { - fVar20 = 0.0f; + i_this->mActionMode = ACTION_HRUN_P; + i_this->mMoveMode = 0; + i_this->field_0xc44[3] = 100; + } + } + + i_this->field_0xc6a = 1; + break; + case 3: + anm_init(i_this, B_GND_BCK_EGND_RATTACK02_A, 3.0f, 0, 1.0f); + i_this->mMoveMode = 4; + i_this->field_0x1e0f = 1; + i_this->field_0x1e10 = 0.0f; + case 4: + if (i_this->mpModelMorf->isStop()) { + anm_init(i_this, B_GND_BCK_EGND_RATTACK02_B, 3.0f, 2, 1.0f); + i_this->field_0xc44[0] = 20; + i_this->mMoveMode = 5; + } + break; + case 5: + if (i_this->field_0xc44[0] == 0) { + anm_init(i_this, B_GND_BCK_EGND_RATTACK02_C, 3.0f, 0, 1.0f); + i_this->mMoveMode = 6; + i_this->field_0xc44[0] = 15; + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_ATTACK02C, -1); + } + break; + case 6: + if (i_this->field_0xc44[0] == 1) { + i_this->field_0x1e50.y = a_this->shape_angle.y + 0x4000; + i_this->field_0x1e50.x = 0; + i_this->field_0x1e0f = 2; + i_this->field_0x1e4c = 40.0f; + i_this->field_0x1e0e = 0; + } + + if (i_this->mpModelMorf->isStop()) { + i_this->mMoveMode = 2; + i_this->field_0xc44[2] = cM_rndF(100.0f) + 100.0f; + } + break; + case 7: + if (i_this->mHorseAnmID != B_HG_BCK_HG_RUN) { + h_anm_init(i_this, B_HG_BCK_HG_RUN, 5.0f, 2, 1.0f); + } + anm_init(i_this, B_GND_BCK_EGND_RDAMEGE01_A, 1.0f, 0, 1.0f); + i_this->mMoveMode = 8; + i_this->field_0xc44[0] = 300; + case 8: + i_this->field_0x1e08 = 10; + + if (i_this->mpModelMorf->isStop()) { + anm_init(i_this, B_GND_BCK_EGND_RDAMEGE01_B, 2.0f, 2, 1.0f); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_DAMAGE01, -1); + i_this->mMoveMode = 9; + } + break; + case 9: + i_this->field_0x1e08 = 10; + if (i_this->field_0xc44[0] == 0) { + anm_init(i_this, B_GND_BCK_EGND_RRETURN, 3.0f, 0, 1.0f); + i_this->mMoveMode = 10; + } + break; + case 10: + i_this->mDamageInvulnerabilityTimer = 10; + + if (i_this->mpModelMorf->isStop()) { + i_this->mMoveMode = 0; + } + break; + case 11: + if (sp10 > 0) { + anm_init(i_this, B_GND_BCK_EGND_RDAMEGE02L, 2.0f, 0, 1.0f); + } else { + anm_init(i_this, B_GND_BCK_EGND_RDAMEGE02R, 2.0f, 0, 1.0f); + } + i_this->mMoveMode = 12; + case 12: + i_this->mDamageInvulnerabilityTimer = 10; + + if (i_this->mpModelMorf->isStop()) { + i_this->mMoveMode = 0; + } + break; + case 20: + speed_target = l_HIO.field_0xc; + speed_step = 2.0f; + if (i_this->field_0xc44[0] == 0) { + i_this->mMoveMode = 21; + anm_init(i_this, B_GND_BCK_EGND_RBRAKE, 3.0f, 0, 1.0f); + h_anm_init(i_this, B_HG_BCK_HG_STOP, 3.0f, 0, 1.0f); + } + + i_this->field_0xc6a = 1; + break; + case 21: + speed_step = 2.0f; + if (a_this->speedF > 15.0f) { + i_this->field_0xc6a = 2; + i_this->mGndSound.startCreatureSoundLevel(Z2SE_EN_HG_SLIP, 0, -1); + } + + if (a_this->speedF < 2.0f) { + i_this->mActionMode = ACTION_HWAIT_2; + i_this->mMoveMode = 0; + } + } + + if (i_this->mMoveMode < 20) { + sp8C = b_path[i_this->field_0xc60] - a_this->current.pos; + + f32 var_f30 = JMAFastSqrt(sp8C.x * sp8C.x + sp8C.z * sp8C.z); + if (var_f30 < 800.0f) { + sp8C = b_path[(i_this->field_0xc60 + 1) & 7] - a_this->current.pos; + + sp10 = a_this->current.angle.y - cM_atan2s(sp8C.x, sp8C.z); + if (sp10 < 0x4000 && sp10 > -0x4000) { + i_this->field_0xc64 = 1; + } else { + i_this->field_0xc64 = -1; + } + + i_this->field_0xc60 = i_this->field_0xc60 + i_this->field_0xc64; + i_this->field_0xc60 = i_this->field_0xc60 & 7; + sp8 = true; + i_this->field_0xc68 = 0; + } + + i_this->field_0x5cc = cM_atan2s(sp8C.x, sp8C.z); + if (i_this->field_0x1e0a >= 1 && i_this->mMoveMode <= 2) { + speed_target = (var_f30 - 800.0f) * 2.0f; + var_f30 = 7000.0f; + if (speed_target > 7000.0f) { + speed_target = 7000.0f; + } else { + if (speed_target < 0.0f) { + speed_target = 0.0f; } } - i_this->field_0x0c90 = i_this->field_0x0c90 + i_this->field_0x0c92; - if ((i_this->field_0x0afc & 63U) == 0) { - i_this->field_0x0c92 = cM_rndF(600.0f) + 300.0f; + i_this->field_0xc90 = i_this->field_0xc90 + i_this->field_0xc92; + if ((i_this->mCounter & 0x3F) == 0) { + i_this->field_0xc92 = cM_rndF(600.0f) + 300.0f; } - i_this->field_0x05cc += (s16)(fVar20 * cM_ssin(i_this->field_0x0c90)); + i_this->field_0x5cc += (s16)(speed_target * cM_ssin(i_this->field_0xc90)); } - if (i_this->field_0x0c72 != 0) { - i_this->field_0x05cc = i_this->field_0x0c74; + if (i_this->field_0xc72 != 0) { + i_this->field_0x5cc = i_this->field_0xc74; } if (i_this->field_0x1e08 != 0) { - i_this->field_0x0c68 = 128; + i_this->field_0xc68 = 0x80; } - cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->field_0x05cc, 8, i_this->field_0x0c68); - if (i_this->field_0x0c76 != 0) { - sVar15 = 0x100; + cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x5cc, 8, i_this->field_0xc68); + + if (i_this->mGakeChkType != 0) { + spE = 0x100; } - cLib_addCalcAngleS2(&i_this->field_0x0c68, 0x400, 1, sVar15); + cLib_addCalcAngleS2(&i_this->field_0xc68, 0x400, 1, spE); + if (i_this->field_0x1e08 != 0) { - fVar20 = l_HIO.field_0x18; - fVar1 = 0.5f; - } else { - if (bVar8) { - fVar19 = dComIfGp_getHorseActor()->speedF; - fVar20 = l_HIO.field_0x10; - if (fVar19 > fVar20) { - fVar20 = fVar19; - if (fVar19 < l_HIO.field_0xc) { - fVar20 = l_HIO.field_0xc; - } - } else { - fVar19 = l_HIO.field_0x10; - } + speed_target = l_HIO.field_0x18; + speed_step = 0.5f; + } else if (sp9) { + speed_target = dComIfGp_getHorseActor()->speedF; + if (speed_target > l_HIO.field_0x10) { + speed_target = l_HIO.field_0x10; + } else if (speed_target < l_HIO.field_0xc) { + speed_target = l_HIO.field_0xc; + } - if (fopAcM_searchActorDistanceXZ((fopAc_ac_c*)i_this, player) < 2000.0f) { - fVar20 = fVar20 * 1.2f; - } + if (fopAcM_searchPlayerDistanceXZ(a_this) < 2000.0f) { + speed_target *= 1.2f; + } - fVar2 = i_this->speedF; - if (l_HIO.field_0xc < fVar2) { - fVar1 = 2.5f; - } else { - fVar1 = 2.0f; - } - - fVar2 = fVar2 / 40.0f; + if (a_this->speedF < l_HIO.field_0xc) { + speed_step = 2.5f; } else { - fVar1 = 2.0f; - fVar20 = l_HIO.field_0xc; + speed_step = 2.0f; } - } - } - - if (fVar2 < 1.0f) { - fVar2 = 1.0f; - } - - if (fVar2 > 1.3f) { - fVar2 = 1.3f; - } - - cLib_addCalc2(&i_this->speedF, fVar20, 1.0f, fVar1); - if (fVar20 > 10.0f) { - sVar12 = (i_this->current.angle.y - sVar12) * -8; - if (sVar12 > 0x7d0) { - sVar12 = 2000; + + anm_speed_target = a_this->speedF / 40.0f; } else { - if (sVar12 < -2000) { - sVar12 = -2000; - } + speed_step = 2.0f; + speed_target = l_HIO.field_0xc; } - cLib_addCalcAngleS2(&i_this->field_0x0c5c, sVar12, 4, 0x300); } - if (i_this->mAnmID == 73) { + if (anm_speed_target < 1.0f) { + anm_speed_target = 1.0f; + } + + if (anm_speed_target > 1.3f) { + anm_speed_target = 1.3f; + } + + cLib_addCalc2(&a_this->speedF, speed_target, 1.0f, speed_step); + if (speed_target > 10.0f) { + sp12 = (a_this->current.angle.y - sp12) * -8; + if (sp12 > 2000) { + sp12 = 2000; + } else if (sp12 < -2000) { + sp12 = -2000; + } + + cLib_addCalcAngleS2(&i_this->mHorseLegRot, sp12, 4, 0x300); + } + + if (i_this->mAnmID == B_GND_BCK_EGND_RRUN) { i_this->mpModelMorf->setPlaySpeed(i_this->mPlaySpeed); i_this->mpHorseMorf->setPlaySpeed(i_this->mPlaySpeed); } - cLib_addCalc2(&i_this->mPlaySpeed, fVar2, 1.0f, 0.1f); - if (bVar3) { - local_b0.x = 0.0f; - local_b0.y = 1000.0f; - for (int i = 0; i < 8; i++) { - cMtx_YrotS(*calc_mtx, (int)(short)(i << 13)); - local_b0.z = cM_rndF(3000.0f) + 12000.0f; - MtxPosition(&local_b0, &local_bc); - local_bc.x = local_bc.x + -2989.0f; - local_bc.z = local_bc.z + 1364.0f; + cLib_addCalc2(&i_this->mPlaySpeed, anm_speed_target, 1.0f, 0.1f); - b_path[i * 12] = local_bc; + if (sp8) { + sp8C.x = 0.0f; + sp8C.y = 1000.0f; + for (int i = 0; i < 8; i++) { + cMtx_YrotS(*calc_mtx, (int)(i << 13)); + sp8C.z = cM_rndF(3000.0f) + 12000.0f; + MtxPosition(&sp8C, &sp80); + sp80.x += -2989.0f; + sp80.z += 1364.0f; + + b_path[i] = sp80; } } - return; } -// /* ############################################################################################## */ -// /* 80602708-8060270C 0000A4 0004+00 0/5 0/0 0/0 .rodata @4963 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4963 = 15.0f; -// COMPILER_STRIP_GATE(0x80602708, &lit_4963); -// #pragma pop - -// /* 8060270C-80602710 0000A8 0004+00 0/2 0/0 0/0 .rodata @4964 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4964 = 800.0f; -// COMPILER_STRIP_GATE(0x8060270C, &lit_4964); -// #pragma pop - -// /* 80602710-80602714 0000AC 0004+00 0/0 0/0 0/0 .rodata @4965 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4965 = 7000.0f; -// COMPILER_STRIP_GATE(0x80602710, &lit_4965); -// #pragma pop - -// /* 80602714-80602718 0000B0 0004+00 0/2 0/0 0/0 .rodata @4966 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4966 = 300.0f; -// COMPILER_STRIP_GATE(0x80602714, &lit_4966); -// #pragma pop - -// /* 80602718-8060271C 0000B4 0004+00 0/2 0/0 0/0 .rodata @4967 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4967 = 600.0f; -// COMPILER_STRIP_GATE(0x80602718, &lit_4967); -// #pragma pop - -// /* 8060271C-80602720 0000B8 0004+00 0/3 0/0 0/0 .rodata @4968 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4968 = 6.0f / 5.0f; -// COMPILER_STRIP_GATE(0x8060271C, &lit_4968); -// #pragma pop - -// /* 80602720-80602724 0000BC 0004+00 1/5 0/0 0/0 .rodata @4969 */ -// SECTION_RODATA static f32 const lit_4969 = 2.5f; -// COMPILER_STRIP_GATE(0x80602720, &lit_4969); - -// /* 80602724-80602728 0000C0 0004+00 0/2 0/0 0/0 .rodata @4970 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4970 = 13.0f / 10.0f; -// COMPILER_STRIP_GATE(0x80602724, &lit_4970); -// #pragma pop - -// /* 80602728-8060272C 0000C4 0004+00 0/4 0/0 0/0 .rodata @4971 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4971 = 1.0f / 10.0f; -// COMPILER_STRIP_GATE(0x80602728, &lit_4971); -// #pragma pop - -// /* 8060272C-80602730 0000C8 0004+00 0/1 0/0 0/0 .rodata @4972 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4972 = 12000.0f; -// COMPILER_STRIP_GATE(0x8060272C, &lit_4972); -// #pragma pop - -// /* 80602730-80602734 0000CC 0004+00 0/0 0/0 0/0 .rodata @4973 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4973 = -2989.0f; -// COMPILER_STRIP_GATE(0x80602730, &lit_4973); -// #pragma pop - -// /* 80602734-80602738 0000D0 0004+00 0/0 0/0 0/0 .rodata @4974 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4974 = 1364.0f; -// COMPILER_STRIP_GATE(0x80602734, &lit_4974); -// #pragma pop - -// /* 80602738-8060273C 0000D4 0004+00 0/3 0/0 0/0 .rodata @5101 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5101 = 400.0f; -// COMPILER_STRIP_GATE(0x80602738, &lit_5101); -// #pragma pop - -// /* 8060273C-80602740 0000D8 0004+00 0/1 0/0 0/0 .rodata @5102 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5102 = 1700.0f; -// COMPILER_STRIP_GATE(0x8060273C, &lit_5102); -// #pragma pop - -// /* 80602740-80602744 0000DC 0004+00 0/1 0/0 0/0 .rodata @5103 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5103 = 550.0f; -// COMPILER_STRIP_GATE(0x80602740, &lit_5103); -// #pragma pop - -// /* 80602744-80602748 0000E0 0004+00 0/2 0/0 0/0 .rodata @5104 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5104 = -200.0f; -// COMPILER_STRIP_GATE(0x80602744, &lit_5104); -// #pragma pop - -// /* 80602748-8060274C 0000E4 0004+00 0/1 0/0 0/0 .rodata @5105 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5105 = 7.0f / 5.0f; -// COMPILER_STRIP_GATE(0x80602748, &lit_5105); -// #pragma pop - /* 805F6FA4-805F74F4 002644 0550+00 1/1 0/0 0/0 .text b_gnd_h_run_p__FP11b_gnd_class */ static void b_gnd_h_run_p(b_gnd_class* i_this) { - // NONMATCHING - fopAc_ac_c* fopPlayer = dComIfGp_getPlayer(0); - f32 fVar2; - BOOL bVar5; - cXyz local_78; - cXyz local_6c; - daPy_py_c* player = daPy_getPlayerActorClass(); - f32 fVar13 = i_this->field_0x0c38; - f32 fVar12 = 2.5f; - f32 fVar11; - f32 fVar10; - BOOL bVar6 = FALSE; + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); + cXyz sp38; + cXyz sp2C; + f32 player_distxz = i_this->mPlayerDistXZ; + f32 speed_target = 0.0f; + f32 speed_step = 2.5f; + + s8 sp9 = FALSE; if (player->checkHorseRide() && dComIfGp_getHorseActor()->speedF >= 30.0f) { - bVar6 = TRUE; + sp9 = TRUE; } - s16 sVar8 = i_this->current.angle.y; - fVar11 = 1.0f; - BOOL bVar4 = FALSE; - s16 sVar7 = i_this->field_0x0c3c - i_this->shape_angle.y; + s16 spE = a_this->current.angle.y; + f32 anm_speed_target = 1.0f; + cXyz sp20; + cXyz sp14; - if (sVar7 < 0x4000 && -0x4000 < sVar7) { - bVar4 = TRUE; + BOOL var_r27 = FALSE; + s16 angle_diff = i_this->mPlayerAngleY - a_this->shape_angle.y; + if (angle_diff < 0x4000 && angle_diff > -0x4000) { + var_r27 = TRUE; } - if (bVar6) { - fVar10 = 0.0f; + f32 var_f28; + if (sp9) { + var_f28 = 0.0f; } else { - fVar10 = 400.0f; + var_f28 = 400.0f; } - switch (i_this->field_0x05bc) { - case 0: - case 1: - if (i_this->mAnmID != 73) { - i_this->mPlaySpeed = 1.0f; - anm_init(i_this, 73, 5.0f, 2, 1.0f); - h_anm_init(i_this, 9, 5.0f, 2, 1.0f); - } - break; - case 2: - bVar4 = TRUE; - if (fVar13 < fVar10 + 1700.0f) { - i_this->field_0x05bc = 3; - } - break; - case 3: - anm_init(i_this, 52, 3.0f, 0, 1.0f); - i_this->field_0x05bc = 4; - break; - case 4: - bVar4 = TRUE; - if (fVar10 + 550.0f <= fVar13) { - bVar5 = TRUE; - if (i_this->mpModelMorf->isStop()) { - bVar5 = FALSE; - } + switch (i_this->mMoveMode) { + case 0: + case 1: + if (i_this->mAnmID != B_GND_BCK_EGND_RRUN) { + i_this->mPlaySpeed = 1.0f; + anm_init(i_this, B_GND_BCK_EGND_RRUN, 5.0f, 2, 1.0f); + h_anm_init(i_this, B_HG_BCK_HG_RUN, 5.0f, 2, 1.0f); + } - if (!bVar5) break; + i_this->field_0xc68 = 0; + i_this->mMoveMode = 2; + break; + case 2: + var_r27 = TRUE; + if (player_distxz < var_f28 + 1700.0f) { + i_this->mMoveMode = 3; + } + break; + case 3: + anm_init(i_this, B_GND_BCK_EGND_RATTACK01_A, 3.0f, 0, 1.0f); + i_this->mMoveMode = 4; + case 4: + var_r27 = TRUE; + if (player_distxz < var_f28 + 550.0f || i_this->mpModelMorf->isStop()) { + anm_init(i_this, B_GND_BCK_EGND_RATTACK01_D, 2.0f, 2, 1.0f); + i_this->mMoveMode = 5; + } + break; + case 5: + var_r27 = TRUE; + if (player_distxz < var_f28 + 550.0f) { + if (angle_diff < 0 || !sp9) { + anm_init(i_this, B_GND_BCK_EGND_RATTACK01_C, 2.0f, 0, 1.0f); + } else { + anm_init(i_this, B_GND_BCK_EGND_RATTACK01_B, 2.0f, 0, 1.0f); } - anm_init(i_this, 55, 2.0f, 2, 1.0f); - i_this->field_0x05bc = 5; - case 5: - if (bVar4 && fVar13 < fVar10 + 550.0f) { - if (sVar7 < 0 || !bVar6) { - anm_init(i_this, 54, 2.0f, 0, 1.0f); - } else { - anm_init(i_this, 53, 2.0f, 0, 1.0f); - } + i_this->mMoveMode = 6; + } + break; + case 6: + var_r27 = TRUE; + i_this->field_0xc77 = 1; - i_this->field_0x05bc = 6; - } - break; - case 6: - bVar4 = TRUE; - bVar5 = TRUE; - i_this->field_0x0c77 = 1; - - if (i_this->mpModelMorf->isStop()) { - bVar5 = FALSE; - } - - if (bVar5) { - bVar4 = FALSE; - } - break; - default: - break; + if (i_this->mpModelMorf->isStop()) { + var_r27 = FALSE; + } + break; + default: + break; } - cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); - if (bVar6) { - if (sVar7 < 0) { - local_6c.x = 200.0f; + if (sp9) { + if (angle_diff < 0) { + sp38.x = 200.0f; } else { - local_6c.x = -200.0f; + sp38.x = -200.0f; } } else { - local_6c.x = 0.0f; + sp38.x = 0.0f; } - local_6c.y = 0.0f; - local_6c.z = 0.0f; - MtxPosition(&local_78, &local_6c); + sp38.y = 0.0f; + sp38.z = 0.0f; + MtxPosition(&sp38, &sp2C); - local_78 += player->current.pos; - local_78 -= i_this->current.pos; + sp2C += player->current.pos; + sp2C -= a_this->current.pos; - i_this->field_0x05cc = (s16)cM_atan2s(local_78.x, local_78.z); + i_this->field_0x5cc = (s16)cM_atan2s(sp2C.x, sp2C.z); - cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->field_0x05cc, 8, - i_this->field_0x0c68); - cLib_addCalcAngleS2(&i_this->field_0x0c68, 0x400, 1, 64); + cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x5cc, 8, i_this->field_0xc68); + cLib_addCalcAngleS2(&i_this->field_0xc68, 0x400, 1, 0x40); - if (bVar6) { - fVar10 = l_HIO.field_0x14; - if (fVar13 <= 2000.0f) { - if (1000.0f < fVar13) { - fVar10 *= 6.0f / 5.0f; - } - } else { - fVar10 *= 7.0f / 5.0f; - } - fVar11 = i_this->speedF / 40.0f; - - if (fVar11 < 1.0f) { - fVar11 = 1.0f; + if (sp9) { + speed_target = l_HIO.field_0x14; + if (player_distxz > 2000.0f) { + speed_target *= 1.4f; + } else if (player_distxz > 1000.0f) { + speed_target *= 1.2f; } - if (13.0f / 10.0f < fVar11) { - fVar11 = 13.0f / 10.0f; + anm_speed_target = a_this->speedF / 40.0f; + if (anm_speed_target < 1.0f) { + anm_speed_target = 1.0f; + } + if (anm_speed_target > 1.3f) { + anm_speed_target = 1.3f; } } else { - fVar12 = 3.0f; - fVar10 = l_HIO.field_0xc; + speed_step = 3.0f; + speed_target = l_HIO.field_0xc; } - if ((!bVar4 && i_this->field_0x0c44[3] == 0) || i_this->field_0x0c76 != 0) { - i_this->mActionID = ACTION_HRUN_A; - - switch (i_this->field_0x0c76) { - case 2: - i_this->field_0x0c72 = 40; - i_this->field_0x0c74 = i_this->shape_angle.y + -0x4000; - break; - case 3: - i_this->field_0x0c72 = 40; - i_this->field_0x0c74 = i_this->shape_angle.y + 0x4000; - break; - default: - i_this->field_0x0c74 = i_this->shape_angle.y + -0x8000; + if ((!var_r27 && i_this->field_0xc44[3] == 0) || i_this->mGakeChkType != 0) { + i_this->mActionMode = ACTION_HRUN_A; + + if (i_this->mGakeChkType == 2) { + i_this->field_0xc72 = 40; + i_this->field_0xc74 = a_this->shape_angle.y + -0x4000; + } else if (i_this->mGakeChkType == 3) { + i_this->field_0xc72 = 40; + i_this->field_0xc74 = a_this->shape_angle.y + 0x4000; + } else if (i_this->mGakeChkType >= 4) { + i_this->field_0xc74 = a_this->shape_angle.y + 0x8000; } - i_this->field_0x05bc = 0; - i_this->field_0x0c44[3] = 100; + i_this->mMoveMode = 0; + i_this->field_0xc44[3] = 100; } - i_this->field_0x0c6a = 1; - cLib_addCalc2(&i_this->speedF, fVar10, 1.0f, fVar12); + i_this->field_0xc6a = 1; + cLib_addCalc2(&a_this->speedF, speed_target, 1.0f, speed_step); - if (10.0f < fVar10) { - sVar8 = (i_this->current.angle.y - sVar8) * -8; - - if (sVar8 < 0x7d1) { - if (sVar8 < -2000) { - sVar8 = -2000; - } - } else { - sVar8 = 2000; + if (speed_target > 10.0f) { + spE = (a_this->current.angle.y - spE) * -8; + if (spE > 2000) { + spE = 2000; + } else if (spE < -2000) { + spE = -2000; } - cLib_addCalcAngleS2(&i_this->field_0x0c5c, sVar8, 4, 0x300); + cLib_addCalcAngleS2(&i_this->mHorseLegRot, spE, 4, 0x300); } i_this->mpHorseMorf->setPlaySpeed(i_this->mPlaySpeed); - if (i_this->mAnmID == 73) { + if (i_this->mAnmID == B_GND_BCK_EGND_RRUN) { i_this->mpModelMorf->setPlaySpeed(i_this->mPlaySpeed); } - cLib_addCalc2(&i_this->mPlaySpeed, fVar11, 1.0f, 0.1f); + cLib_addCalc2(&i_this->mPlaySpeed, anm_speed_target, 1.0f, 0.1f); } -// /* ############################################################################################## */ -// /* 8060274C-80602750 0000E8 0004+00 0/4 0/0 0/0 .rodata @5137 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5137 = 55.0f; -// COMPILER_STRIP_GATE(0x8060274C, &lit_5137); -// #pragma pop - -// /* 80602750-80602754 0000EC 0004+00 0/3 0/0 0/0 .rodata @5138 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5138 = 1.5f; -// COMPILER_STRIP_GATE(0x80602750, &lit_5138); -// #pragma pop /* 805F74F4-805F76C4 002B94 01D0+00 1/1 0/0 0/0 .text b_gnd_h_jump__FP11b_gnd_class */ static void b_gnd_h_jump(b_gnd_class* i_this) { - // NONMATCHING - switch (i_this->field_0x05bc) { - case 0: - i_this->field_0x05bc = 1; - anm_init(i_this, 71, 2.0f, 0, 1.0f); - h_anm_init(i_this, 8, 2.0f, 0, 1.0f); - i_this->speed.y = 55.0f; - break; - case 1: - if (i_this->mpModelMorf->isStop()) { - i_this->field_0x05bc = 2; - anm_init(i_this, 70, 2.0f, 0, 1.0f); - h_anm_init(i_this, 7, 2.0f, 0, 1.0f); - } - break; - case 2: - if (i_this->field_0x0cd4.ChkGroundHit()) { - i_this->field_0x05bc = 3; - anm_init(i_this, 69, 2.0f, 0, 1.0f); - h_anm_init(i_this, 6, 2.0f, 0, 1.0f); - i_this->field_0x2699 = 1; - } - break; - case 3: - if (i_this->mpModelMorf->isStop()) { - i_this->mActionID = i_this->field_0x0b00; - i_this->field_0x05bc = 0; - i_this->mPlaySpeed = 1.5f; - anm_init(i_this, 73, 2.0f, 2, 1.5f); - h_anm_init(i_this, 9, 2.0f, 2, 1.5f); - } + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + + switch (i_this->mMoveMode) { + case 0: + i_this->mMoveMode = 1; + anm_init(i_this, B_GND_BCK_EGND_RJUMP_START, 2.0f, 0, 1.0f); + h_anm_init(i_this, B_HG_BCK_HG_JUMP_START, 2.0f, 0, 1.0f); + a_this->speed.y = 55.0f; + break; + case 1: + if (i_this->mpModelMorf->isStop()) { + i_this->mMoveMode = 2; + anm_init(i_this, B_GND_BCK_EGND_RJUMP_MIDDLE, 2.0f, 0, 1.0f); + h_anm_init(i_this, B_HG_BCK_HG_JUMP_MIDDLE, 2.0f, 0, 1.0f); + } + break; + case 2: + if (i_this->mAcch.ChkGroundHit()) { + i_this->mMoveMode = 3; + anm_init(i_this, B_GND_BCK_EGND_RJUMP_END, 2.0f, 0, 1.0f); + h_anm_init(i_this, B_HG_BCK_HG_JUMP_END, 2.0f, 0, 1.0f); + i_this->field_0x2699 = 1; + } + break; + case 3: + if (i_this->mpModelMorf->isStop()) { + i_this->mActionMode = i_this->field_0xb00; + i_this->mMoveMode = 0; + i_this->mPlaySpeed = 1.5f; + anm_init(i_this, B_GND_BCK_EGND_RRUN, 2.0f, 2, 1.5f); + h_anm_init(i_this, B_HG_BCK_HG_RUN, 2.0f, 2, 1.5f); + } } } -/* ############################################################################################## */ -// /* 80602754-80602758 0000F0 0004+00 0/6 0/0 0/0 .rodata @5206 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5206 = 50.0f; -// COMPILER_STRIP_GATE(0x80602754, &lit_5206); -// #pragma pop - -// /* 80602758-8060275C 0000F4 0004+00 0/1 0/0 0/0 .rodata @5207 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5207 = 12.0f / 5.0f; -// COMPILER_STRIP_GATE(0x80602758, &lit_5207); -// #pragma pop - -// /* 8060275C-80602760 0000F8 0004+00 0/1 0/0 0/0 .rodata @5208 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5208 = 701.0f; -// COMPILER_STRIP_GATE(0x8060275C, &lit_5208); -// #pragma pop - -// /* 80602760-80602764 0000FC 0004+00 0/1 0/0 0/0 .rodata @5209 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5209 = -5920.0f; -// COMPILER_STRIP_GATE(0x80602760, &lit_5209); -// #pragma pop - -// /* 80602764-80602768 000100 0004+00 0/3 0/0 0/0 .rodata @5210 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5210 = 4.0f; -// COMPILER_STRIP_GATE(0x80602764, &lit_5210); -// #pragma pop - -// /* 80602768-8060276C 000104 0004+00 0/2 0/0 0/0 .rodata @5211 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5211 = 14.0f; -// COMPILER_STRIP_GATE(0x80602768, &lit_5211); -// #pragma pop - /* 805F76C4-805F7A10 002D64 034C+00 1/1 0/0 0/0 .text b_gnd_h_end__FP11b_gnd_class */ static void b_gnd_h_end(b_gnd_class* i_this) { - // NONMATCHING - mant_class* mantActor = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); - cXyz local_24; - int iVar1 = i_this->mpHorseMorf->getFrame(); - i_this->field_0x0c58 = 10; - switch (i_this->field_0x05bc) { - case 0: - Z2GetAudioMgr()->bgmStop(30, 0); - i_this->field_0x05bc = 1; - h_anm_init(i_this, 5, 3.0f, 0, 1.0f); - anm_init(i_this, 65, 2.0f, 0, 1.0f); - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_DOWN, -1); - i_this->speedF = 50.0f; - i_this->current.pos.x = 2.4f; - i_this->current.pos.y = 701.0f; - i_this->current.pos.z = -5920.0f; - i_this->old.pos.x = i_this->current.pos.x; - i_this->old.pos.y = i_this->current.pos.y; - i_this->old.pos.z = i_this->current.pos.z; - i_this->shape_angle.y = 0; - i_this->current.angle.y = 0; - i_this->field_0x1e0f = 0; - i_this->field_0x1e10 = 0.0f; - i_this->field_0x26c4 = 30; - i_this->health = 100; - i_this->field_0x1e0a = 0; - case 1: - if (i_this->field_0x26c4 < 33 && iVar1 == 30) { - i_this->mpModelMorf->setFrame(0.0f); - i_this->mpHorseMorf->setFrame(0.0f); - if (i_this->field_0x26c4 < 32) { - i_this->field_0x26c4 = 32; - } else { - i_this->field_0x26c4 = 34; - i_this->field_0x26c6 = 0; - i_this->field_0x05bc = 2; - } - } - break; - case 2: - if (i_this->field_0x26c4 < 34) { - if (iVar1 == 57) { - local_24.x = 4.0f; - local_24.y = 4.0f; - local_24.z = 4.0f; - dComIfGp_particle_set(0x8c21, &i_this->current.pos, &i_this->shape_angle, &local_24); - } - - if (iVar1 >= 62) { - cLib_addCalc0(&i_this->speedF, 1.0f, 1.2f); - cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->current.angle.y + 0x1000, 8, 130); - i_this->field_0x2688 = dComIfGp_particle_set(i_this->field_0x2688, 0x8b9a, - &i_this->current.pos, 0, 0); - if (i_this->speedF > 14.0f) { - i_this->mZ2Creature.startCreatureSoundLevel(Z2SE_EN_HG_SLIP, 0, -1); - } - } - - if (i_this->speedF < 1.0f) { - mantActor->field_0x3965 = 1; - } - } else { - i_this->mpModelMorf->setFrame(0.0f); - i_this->mpHorseMorf->setFrame(0.0f); - i_this->speedF = 0.0f; - i_this->current.pos.x = 1000.0f; - } - case 3: - default: - return; + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + mant_class* mant_p = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); + int h_anm_frame = i_this->mpHorseMorf->getFrame(); + i_this->mDamageInvulnerabilityTimer = 10; + switch (i_this->mMoveMode) { + case 0: + Z2GetAudioMgr()->bgmStop(30, 0); + i_this->mMoveMode = 1; + h_anm_init(i_this, B_HG_BCK_HG_DOWN, 3.0f, 0, 1.0f); + anm_init(i_this, B_GND_BCK_EGND_RDOWN, 2.0f, 0, 1.0f); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_DOWN, -1); + + a_this->speedF = 50.0f; + a_this->current.pos.set(2.4f, 701.0f, -5920.0f); + a_this->old.pos = a_this->current.pos; + a_this->shape_angle.y = 0; + a_this->current.angle.y = 0; + i_this->field_0x1e0f = 0; + i_this->field_0x1e10 = 0.0f; + i_this->mDemoCamMode = 30; + a_this->health = 100; + i_this->field_0x1e0a = 0; + case 1: + if (i_this->mDemoCamMode < 33 && h_anm_frame == 30) { + i_this->mpModelMorf->setFrame(0.0f); + i_this->mpHorseMorf->setFrame(0.0f); + + if (i_this->mDemoCamMode < 32) { + i_this->mDemoCamMode = 32; + } else { + i_this->mDemoCamMode = 34; + i_this->mDemoCamTimer = 0; + i_this->mMoveMode = 2; + } + } + break; + case 2: + if (i_this->mDemoCamMode < 34) { + if (h_anm_frame == 57) { + cXyz eff_size(4.0f, 4.0f, 4.0f); + dComIfGp_particle_set(0x8C21, &a_this->current.pos, &a_this->shape_angle, &eff_size); + } + + if (h_anm_frame >= 62) { + cLib_addCalc0(&a_this->speedF, 1.0f, 1.2f); + cLib_addCalcAngleS2(&a_this->shape_angle.y, a_this->current.angle.y + 0x1000, 8, 130); + i_this->field_0x2688 = dComIfGp_particle_set(i_this->field_0x2688, 0x8b9a, + &i_this->current.pos, 0, 0); + if (a_this->speedF > 14.0f) { + i_this->mGndSound.startCreatureSoundLevel(Z2SE_EN_HG_SLIP, 0, -1); + } + } + + if (a_this->speedF < 1.0f) { + mant_p->field_0x3965 = 1; + } + } else { + i_this->mpModelMorf->setFrame(0.0f); + i_this->mpHorseMorf->setFrame(0.0f); + a_this->speedF = 0.0f; + a_this->current.pos.x = 1000.0f; + } + case 3: + default: + break; } } -// /* ############################################################################################## */ -// /* 8060276C-80602770 000108 0004+00 0/1 0/0 0/0 .rodata @5305 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5305 = 43.0f / 10.0f; -// COMPILER_STRIP_GATE(0x8060276C, &lit_5305); -// #pragma pop - -// /* 80602770-80602774 00010C 0004+00 0/2 0/0 0/0 .rodata @5306 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5306 = 3.0f / 10.0f; -// COMPILER_STRIP_GATE(0x80602770, &lit_5306); -// #pragma pop - /* 805F7A10-805F7E88 0030B0 0478+00 2/1 0/0 0/0 .text b_gnd_g_wait__FP11b_gnd_class */ static void b_gnd_g_wait(b_gnd_class* i_this) { - // NONMATCHING - s16 sVar1; - float fVar1 = 0.0f; - mant_class* mantActor = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); - dmg_rod_class* fishingRod = (dmg_rod_class*)fopAcM_SearchByName(740); + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + f32 speed_target = 0.0f; + f32 speed_step = 2.0f; + s16 angle_step = 0x400; - if (!fishingRod || fishingRod->field_0xf7e != 0) { - if (i_this->field_0x05bc < 5 && i_this->field_0x0c38 < 600.0f) { - i_this->field_0x05bc = 5; - i_this->field_0x0c44[0] = 10; + mant_class* mant_p = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); + dmg_rod_class* mgrod_p = (dmg_rod_class*)fopAcM_SearchByName(PROC_MG_ROD); + + if (mgrod_p != NULL && mgrod_p->field_0xf7e != 0) { + if (i_this->mMoveMode < 5 && i_this->mPlayerDistXZ < 600.0f) { + i_this->mMoveMode = 5; + i_this->field_0xc44[0] = 10; } - } else if (i_this->field_0x05bc == 5) { - i_this->field_0x05bc = 6; - i_this->field_0x0c44[0] = 40; + } else if (i_this->mMoveMode == 5) { + i_this->mMoveMode = 6; + i_this->field_0xc44[0] = 40; } - switch (i_this->field_0x05bc) { - case 0: - i_this->field_0x05bc = 1; - anm_init(i_this, 93, 15.0f, 2, 1.0f); - i_this->field_0x0c44[0] = (cM_rndF(100.0f) + 200.0f); - case 1: - fVar1 = 43.0f / 10.0f; - if (i_this->field_0x0c38 < 500.0f) { - i_this->field_0x05bc = 2; - anm_init(i_this, 91, 10.0f, 2, 1.0f); - i_this->field_0x0c44[0] = (cM_rndF(50.0f) + 30.0f); + switch (i_this->mMoveMode) { + case 0: + i_this->mMoveMode = 1; + anm_init(i_this, B_GND_BCK_EGND_WALK, 15.0f, 2, 1.0f); + i_this->field_0xc44[0] = cM_rndF(100.0f) + 200.0f; + case 1: + speed_target = 4.3f; + + if (i_this->mPlayerDistXZ < 500.0f) { + i_this->mMoveMode = 2; + anm_init(i_this, B_GND_BCK_EGND_WAIT02, 10.0f, 2, 1.0f); + i_this->field_0xc44[0] = cM_rndF(50.0f) + 30.0f; + } else if (i_this->field_0xc44[0] == 1) { + if (i_this->mPlayerDistXZ < 800.0f && cM_rndF(1.0f) < 0.3f) { + i_this->mActionMode = ACTION_ATTACK; + i_this->mMoveMode = 10; } else { - if (i_this->field_0x0c44[0] == 1) { - if (800.0f > i_this->field_0x0c38 || 0.3f < cM_rndF(1.0f)) { - i_this->mActionID = ACTION_ATTACK; - i_this->field_0x05bc = 10; - } else { - i_this->mActionID = ACTION_JUMP; - i_this->field_0x05bc = 0; - } - } + i_this->mActionMode = ACTION_JUMP; + i_this->mMoveMode = 0; + } + } + break; + case 2: + if (i_this->field_0xc44[8] != 0) { + if (i_this->mPlayerDistXZ < 300.0f) { + i_this->field_0xc44[8] = 0; } - break; - case 2: - if (i_this->field_0x0c44[8] != 0) { - if (i_this->field_0x0c38 < 300.0f) { - i_this->field_0x0c44[8] = 0; - } + if (i_this->field_0xc44[8] == 1) { + i_this->mActionMode = ACTION_ATTACK; + i_this->mMoveMode = 10; + } + } else { + if (i_this->mPlayerDistXZ > 650.0f) { + i_this->mMoveMode = 0; + } - if (i_this->field_0x0c44[8] == 1) { - i_this->mActionID = ACTION_ATTACK; - i_this->field_0x05bc = 10; + if (i_this->mPlayerDistXZ > 550.0f) { + i_this->mActionMode = ACTION_ATTACK; + if (cM_rndF(1.0f) < 0.5f) { + i_this->mMoveMode = 10; + } else { + i_this->mMoveMode = 15; } - } else { - if (i_this->field_0x0c38 > 650.0f) { - i_this->field_0x05bc = 0; - } - - if (i_this->field_0x0c38 > 550.0f) { - i_this->mActionID = ACTION_ATTACK; - if (cM_rndF(1.0f) < 0.5) { - i_this->field_0x05bc = 10; + } else if (i_this->mPlayerDistXZ < 150.0f) { + i_this->mActionMode = ACTION_ATTACK; + i_this->mMoveMode = 4; + } else if (i_this->field_0xc44[0] == 0) { + i_this->mActionMode = ACTION_ATTACK; + if (i_this->mPlayerDistXZ < 300.0f) { + if (cM_rndF(1.0f) < 0.5f) { + i_this->mMoveMode = 0; } else { - i_this->field_0x05bc = 15; + i_this->mMoveMode = 8; } } else { - if (i_this->field_0x0c38 < 150.0f) { - i_this->mActionID = ACTION_ATTACK; - i_this->field_0x05bc = 4; - } else { - if (i_this->field_0x0c44[0] == 0) { - i_this->mActionID = ACTION_ATTACK; - if (i_this->field_0x0c38 < 300.0f) { - if (0.5f < cM_rndF(1.0f)) { - i_this->field_0x05bc = 0; - } else { - i_this->field_0x05bc = 8; - } - } else { - i_this->field_0x05bc = 2; - } - } - } + i_this->mMoveMode = 2; } } - break; - case 3: - if (i_this->mpModelMorf->isStop()) { - i_this->field_0x05bc = 0; - } - break; - case 5: - if (i_this->field_0x0c44[0] == 1) { - anm_init(i_this, 91, 10.0f, 2, 1.0f); - } + } + break; + case 3: + if (i_this->mpModelMorf->isStop()) { + i_this->mMoveMode = 0; + } + break; + case 5: + if (i_this->field_0xc44[0] == 1) { + anm_init(i_this, B_GND_BCK_EGND_WAIT02, 10.0f, 2, 1.0f); + } - if (i_this->field_0x0c44[0] == 0) { - sVar1 = 0; - } + if (i_this->field_0xc44[0] == 0) { + angle_step = 0; + } - i_this->field_0x0c7d = 2; - - i_this->field_0x0c80 = fishingRod->mHookPosition; - break; - case 6: - sVar1 = 0; - i_this->field_0x0c5a = 10; - if (i_this->field_0x0c44[0] == 0) { - i_this->field_0x05bc = 0; - } - } - cLib_addCalc2(&i_this->speedF, fVar1, 1.0f, 2.0f); - if ((i_this->field_0x0afc & 12U) == 0) { - sVar1 = sVar1 >> 1; + i_this->field_0xc7d = 2; + i_this->field_0xc80 = mgrod_p->mHookPosition; + break; + case 6: + angle_step = 0; + i_this->field_0xc5a = 10; + if (i_this->field_0xc44[0] == 0) { + i_this->mMoveMode = 0; + } } - cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->field_0x0c3c, - 2, sVar1); - sVar1 = i_this->current.angle.y - i_this->field_0x0c3c; - if (0x100 < sVar1 || sVar1 < -0x100) { - i_this->field_0x26c2 = 2500.0f * cM_ssin(i_this->field_0x0afc * 5000); + cLib_addCalc2(&a_this->speedF, speed_target, 1.0f, speed_step); + if ((i_this->mCounter & 12) == 0) { + angle_step /= 2; } - if (i_this->mActionID != ACTION_WAIT && mantActor->field_0x3969 == 2) { - mantActor->field_0x3969 = 1; + cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->mPlayerAngleY, 2, angle_step); + + s16 angle_diff = a_this->current.angle.y - i_this->mPlayerAngleY; + if (angle_diff > 0x100 || angle_diff < -0x100) { + i_this->field_0x26c2 = 2500.0f * cM_ssin(i_this->mCounter * 5000); + } + + if (i_this->mActionMode != ACTION_WAIT && mant_p->field_0x3969 == 2) { + mant_p->field_0x3969 = 1; } } /* 805F7E88-805F878C 003528 0904+00 2/1 0/0 0/0 .text b_gnd_g_attack__FP11b_gnd_class */ -static bool b_gnd_g_attack(b_gnd_class* i_this) { - // NONMATCHING - daPy_py_c* player = daPy_getPlayerActorClass(); - f32 fVar2 = 0.0f; - f32 fVar1 = 2.0f; - int frame = i_this->mpModelMorf->getFrame(); - s16 sVar1 = 0; +static BOOL b_gnd_g_attack(b_gnd_class* i_this) { fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; - mant_class* mantActor = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); + daPy_py_c* player = daPy_getPlayerActorClass(); - bool bVar5 = true; - switch (i_this->field_0x05bc) { - case 0: - i_this->field_0x05bc = 1; - anm_init(i_this, 19, 3.0f, 0, 1.0f); + f32 speed_target = 0.0f; + f32 speed_step = 2.0f; + int anm_frame = i_this->mpModelMorf->getFrame(); + s16 angle_step = 0; + + mant_class* mant_p = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); + + BOOL spC = true; + switch (i_this->mMoveMode) { + case 0: + i_this->mMoveMode = 1; + anm_init(i_this, B_GND_BCK_EGND_ATTACKA, 3.0f, 0, 1.0f); + break; + case 1: + if (20 <= anm_frame && anm_frame <= 28) { + i_this->field_0xc77 = 1; + mant_p->field_0x395c = 1.0f; + spC = false; + } + + if (44 <= anm_frame && anm_frame <= 50) { + mant_p->field_0x395c = 3.0f / 5.0f; + } + + if (anm_frame == 25) { + i_this->field_0x2698 = 1; + } + + if (20 <= anm_frame && anm_frame <= 26) { + i_this->mSwordBlurAlpha = 80; + i_this->field_0xc28 = -3000; + } + + if (i_this->mpModelMorf->isStop()) { + i_this->mActionMode = ACTION_WAIT; + i_this->mMoveMode = 0; + } + break; + case 2: + i_this->mMoveMode = 3; + anm_init(i_this, B_GND_BCK_EGND_ATTACKB, 3.0f, 0, 1.0f); + break; + case 3: + if (anm_frame < 25) { + spC = false; + } + + if (17 <= anm_frame && anm_frame <= 23) { + i_this->field_0xc77 = 1; + } + + if (17 <= anm_frame && anm_frame <= 19) { + mant_p->field_0x395c = 0.7f; + } + + if (37 <= anm_frame && anm_frame <= 47) { + mant_p->field_0x395c = 0.6f; + } + + if (anm_frame == 20) { + i_this->field_0x2698 = 1; + } + + if (i_this->mpModelMorf->isStop()) { + i_this->mActionMode = ACTION_WAIT; + i_this->mMoveMode = 0; + } + break; + case 4: + i_this->mMoveMode = 5; + anm_init(i_this, B_GND_BCK_EGND_ATTACKD, 3.0f, 0, 1.0f); + break; + case 5: + if (3 <= anm_frame && anm_frame <= 10) { + mant_p->field_0x395c = 0.6f; + } + + if (3 <= anm_frame && anm_frame <= 10) { + i_this->field_0xc77 = 1; + i_this->field_0xc78 = 1; + spC = false; + } + + if (anm_frame == 6) { + i_this->field_0x2698 = 1; + } + + if (i_this->mpModelMorf->isStop()) { + i_this->mActionMode = ACTION_WAIT; + i_this->mMoveMode = 0; + } + break; + case 6: + i_this->mMoveMode = 7; + anm_init(i_this, B_GND_BCK_EGND_ATTACKF, 5.0f, 0, 1.0f); + break; + case 7: + i_this->mDamageInvulnerabilityTimer = 10; + if (anm_frame < 35) { + spC = false; + } + speed_step = 3.3299999f; + + if (13 <= anm_frame && anm_frame <= 33) { + speed_target = 10.0f; + } + + if (15 <= anm_frame && anm_frame <= 38) { + i_this->field_0xc77 = 1; + mant_p->field_0x395c = 0.7f; + } + + if (15 <= anm_frame && anm_frame <= 30) { + i_this->mSwordBlurAlpha = 80; + i_this->field_0xc28 = -3000; + } + + if (anm_frame == 20 || anm_frame == 35) { + i_this->field_0x2698 = 1; + } + + if (i_this->mpModelMorf->isStop()) { + i_this->mActionMode = ACTION_WAIT; + i_this->mMoveMode = 0; + } + break; + case 8: + i_this->mMoveMode = 9; + anm_init(i_this, B_GND_BCK_EGND_ATTACKG, 3.0f, 0, 1.0f); + break; + case 9: + if (anm_frame < 25) { + spC = false; + } + + if ((18 <= anm_frame && anm_frame <= 24) || (33 <= anm_frame && anm_frame <= 40)) { + i_this->field_0xc77 = 1; + mant_p->field_0x395c = 0.7f; + i_this->mSwordBlurAlpha = 80; + } + + if (anm_frame == 20 || anm_frame == 38) { + i_this->field_0x2698 = 1; + } + + if (i_this->mpModelMorf->isStop()) { + i_this->mActionMode = ACTION_WAIT; + i_this->mMoveMode = 0; + } + break; + case 10: + anm_init(i_this, B_GND_BCK_EGND_ATTACKC_A, 3.0f, 0, 1.0f); + i_this->mMoveMode = 11; + i_this->mDamageInvulnerabilityTimer = 10; + break; + case 11: + i_this->mDamageInvulnerabilityTimer = 10; + angle_step = 0x800; + + if (anm_frame >= 15) { + speed_target = 30.0f; + speed_step = 10.0f; + spC = false; + } + + if (!i_this->mpModelMorf->isStop()) { break; - case 1: - if (20 <= frame && frame <= 28) { - i_this->field_0x0c77 = 1; - mantActor->field_0x395c = 1.0f; - bVar5 = false; - } + } - if (44 <= frame && frame <= 50) { - mantActor->field_0x395c = 3.0f / 5.0f; - } + anm_init(i_this, B_GND_BCK_EGND_ATTACKC_B, 0.0f, 2, 1.0f); + i_this->mMoveMode = 12; + i_this->field_0xc44[0] = 50; + case 12: + spC = false; + i_this->mDamageInvulnerabilityTimer = 10; + i_this->field_0xc79 = 1; + mant_p->field_0x395c = 1.0f; + speed_target = 30.0f; + speed_step = 15.0f; + angle_step = 0x800; + i_this->field_0x2698 = 2; - if (frame == 25) { - i_this->field_0x2698 = 1; - } + if (player->checkMasterSwordEquip() && i_this->mPlayerDistXZ < 600.0f) { + dComIfGp_setDoStatusForce(107, 0); + i_this->field_0x2740 = 1; + } - if (20 <= frame && frame <= 26) { - i_this->field_0x0c24 = 80; - i_this->field_0x0c28 = -3000; - } + if (i_this->field_0xc44[0] == 0 || i_this->mPlayerDistXZ < 450.0f) { + anm_init(i_this, B_GND_BCK_EGND_ATTACKC_C, 1.0f, 0, 1.0f); + i_this->mMoveMode = 13; + } + break; + case 13: + i_this->mDamageInvulnerabilityTimer = 5; + i_this->field_0xc79 = 1; + speed_step = 10.0f; - if (i_this->mpModelMorf->isStop()) { - i_this->mActionID = ACTION_WAIT; - i_this->field_0x05bc = 0; + if (anm_frame < 30) { + spC = false; + } + + if (18 <= anm_frame && anm_frame <= 26) { + mant_p->field_0x395c = 1.0f; + } + + if (43 <= anm_frame && anm_frame <= 53) { + mant_p->field_0x395c = 0.6f; + } + + if (20 <= anm_frame && anm_frame <= 32) { + i_this->field_0xc77 = 2; + } + + if (18 <= anm_frame && anm_frame <= 23) { + i_this->mSwordBlurAlpha = 80; + } + + if (anm_frame == 25) { + i_this->field_0x2698 = 1; + } + + if (i_this->mpModelMorf->isStop()) { + i_this->mActionMode = ACTION_WAIT; + i_this->mMoveMode = 0; + } + + if (anm_frame < 28 && player->checkMasterSwordEquip()) { + dComIfGp_setDoStatusForce(107, 0); + i_this->field_0x2740 = 1; + if (cc_pl_cut_bit_get() == 0x100 && player->speed.y < 0.0f) { + i_this->mActionMode = ACTION_TUBA; + i_this->mMoveMode = 0; } + } + break; + case 15: + anm_init(i_this, B_GND_BCK_EGND_ATTACKE_A, speed_step, 0, 1.0f); + i_this->mMoveMode = 16; + i_this->mDamageInvulnerabilityTimer = 10; + i_this->field_0xc44[0] = 11; + break; + case 16: + i_this->mDamageInvulnerabilityTimer = 10; + spC = false; + angle_step = 0x800; + + if (anm_frame >= 5) { + speed_target = 60.0f; + speed_step = 30.0f; + if (anm_frame == 5) { + a_this->speed.y = 20.0f; + } + } + + if (i_this->field_0xc44[0] != 0) break; - case 2: - i_this->field_0x05bc = 3; - anm_init(i_this, 20, 3.0f, 0, 1.0f); - break; - case 3: - if (25 > frame) { - bVar5 = false; - } - if (17 <= frame && frame <= 23) { - i_this->field_0x0c77 = 1; - } + anm_init(i_this, B_GND_BCK_EGND_ATTACKE_B, 1.0f, 0, 1.0f); + i_this->mMoveMode = 17; + case 17: + spC = false; + i_this->mDamageInvulnerabilityTimer = 10; + speed_step = 15.0f; + angle_step = 0x800; - if (17 <= frame && frame <= 19) { - mantActor->field_0x395c = 0.7f; - } + if (2 <= anm_frame && anm_frame <= 12) { + i_this->field_0xc78 = 2; + i_this->field_0xc77 = 1; + } - if (37 <= frame && frame <= 47) { - mantActor->field_0x395c = 0.6f; - } + if (anm_frame >= 5) { + mant_p->field_0x395c = 0.7f; + } + + if (i_this->mpModelMorf->isStop()) { + anm_init(i_this, B_GND_BCK_EGND_ATTACKE_C2, 1.0f, 0, 1.0f); + i_this->mMoveMode = 18; + } + break; + case 18: + speed_step = 15.0f; + if (10 <= anm_frame && anm_frame <= 20) { + i_this->field_0xc77 = 1; + mant_p->field_0x395c = 0.7f; + } - if (frame == 20) { - i_this->field_0x2698 = 1; - } - - if (i_this->mpModelMorf->isStop()) { - i_this->mActionID = ACTION_WAIT; - i_this->field_0x05bc = 0; - } - break; - case 4: - i_this->field_0x05bc = 5; - anm_init(i_this, 24, 3.0f, 0, 1.0f); - break; - case 5: - if (3 <= frame && frame <= 10) { - mantActor->field_0x395c = 0.6f; - } - - if (3 <= frame && frame <= 10) { - i_this->field_0x0c77 = 1; - i_this->field_0x0c78 = 1; - bVar5 = false; - } - - if (frame == 6) { - i_this->field_0x2698 = 1; - } - - if (i_this->mpModelMorf->isStop()) { - i_this->mActionID = ACTION_WAIT; - i_this->field_0x05bc = 0; - } - break; - case 6: - i_this->field_0x05bc = 7; - anm_init(i_this, 30, 3.0f, 0, 1.0f); - break; - case 7: - i_this->field_0x0c58 = 10; - if (35 > frame) { - bVar5 = false; - } - fVar1 = 0x40551EB8; - - if (13 <= frame && frame <= 33) { - fVar2 = 10.0f; - } - - if (15 <= frame && frame <= 38) { - i_this->field_0x0c77 = 1; - mantActor->field_0x395c = 0.7f; - } - - if (15 <= frame && frame <= 30) { - i_this->field_0x0c24 = 80; - i_this->field_0x0c28 = -3000; - } - - if (frame == 20 || frame == 35) { - i_this->field_0x2698 = 1; - } - - if (i_this->mpModelMorf->isStop()) { - i_this->mActionID = ACTION_WAIT; - i_this->field_0x05bc = 0; - } - break; - case 8: - i_this->field_0x05bc = 9; - anm_init(i_this, 31, 3.0f, 0, 1.0f); - break; - case 9: - if (25 > frame) { - bVar5 = false; - } - if ((18 <= frame && frame <= 24) || (33 <= frame && frame <= 40)) { - i_this->field_0x0c77 = 1; - mantActor->field_0x395c = 0.7f; - i_this->field_0x0c24 = 80; - } - - if (frame == 20 || frame == 38) { - i_this->field_0x2698 = 1; - } - - if (i_this->mpModelMorf->isStop()) { - i_this->mActionID = ACTION_WAIT; - i_this->field_0x05bc = 0; - } - break; - case 10: - anm_init(i_this, 21, 3.0f, 0, 1.0f); - i_this->field_0x05bc = 11; - i_this->field_0x0c58 = 10; - break; - case 11: - i_this->field_0x0c58 = 10; - sVar1 = 0x800; - if (15 <= frame) { - fVar2 = 30.0f; - fVar1 = 10.0f; - bVar5 = false; - } - - if (!i_this->mpModelMorf->isStop()) { - break; - } - - anm_init(i_this, 22, 3.0f, 2, 1.0f); - i_this->field_0x05bc = 12; - i_this->field_0x0c44[0] = 50; - case 12: - bVar5 = false; - i_this->field_0x0c58 = 10; - i_this->field_0x0c79 = 1; - mantActor->field_0x395c = 1.0f; - fVar2 = 30.0f; - fVar1 = 15.0f; - sVar1 = 0x800; - i_this->field_0x2698 = 2; - if (player->checkMasterSwordEquip() && i_this->field_0x0c38 < 600.0f) { - dComIfGp_setDoStatusForce(107, 0); - i_this->field_0x2740 = 1; - } - - if (i_this->field_0x0c44[0] == 0 || i_this->field_0x0c38 < 450.0f) { - anm_init(i_this, 23, 1.0f, 0, 1.0f); - i_this->field_0x05bc = 13; - } - break; - case 13: - i_this->field_0x0c58 = 5; - i_this->field_0x0c79 = 1; - fVar1 = 10.0f; - - if (30 > frame) { - bVar5 = false; - } - - if (18 <= frame && frame <= 26) { - mantActor->field_0x395c = 1.0f; - } - - if (43 <= frame && frame <= 53) { - mantActor->field_0x395c = 0.6f; - } - - if (20 <= frame && frame <= 32) { - i_this->field_0x0c77 = 2; - } - - if (18 <= frame && frame <= 23) { - i_this->field_0x0c24 = 80; - } - - if (frame == 25) { - i_this->field_0x2698 = 1; - } - - if (i_this->mpModelMorf->isStop()) { - i_this->mActionID = ACTION_WAIT; - i_this->field_0x05bc = 0; - } - - if (frame < 28 && player->checkMasterSwordEquip()) { - dComIfGp_setDoStatusForce(107, 0); - i_this->field_0x2740 = 1; - if (cc_pl_cut_bit_get() == 0x100 && player->speed.y < 0.0f) { - i_this->mActionID = ACTION_TUBA; - i_this->field_0x05bc = 0; - } - } - break; - case 15: - anm_init(i_this, 25, fVar1, 0, 1.0f); - i_this->field_0x05bc = 16; - i_this->field_0x0c58 = 10; - i_this->field_0x0c44[0] = 11; - break; - case 16: - i_this->field_0x0c58 = 10; - bVar5 = false; - sVar1 = 0x800; - - if (5 <= frame) { - fVar2 = 60.0f; - fVar1 = 30.0f; - if (frame == 5) { - i_this->speed.y = 20.0f; - } - } - - if (i_this->field_0x0c44[0] != 0) break; - - anm_init(i_this, 26, 1.0f, 0, 1.0f); - i_this->field_0x05bc = 17; - case 17: - bVar5 = false; - i_this->field_0x0c58 = 10; - fVar1 = 15.0f; - sVar1 = 0x800; - if (2 <= frame && frame <= 12) { - i_this->field_0x0c78 = 2; - i_this->field_0x0c77 = 1; - } - - if (5 <= frame) { - mantActor->field_0x395c = 0.7f; - } - - if (i_this->mpModelMorf->isStop()) { - anm_init(i_this, 29, 1.0f, 0, 1.0f); - i_this->field_0x05bc = 18; - } - break; - case 18: - fVar1 = 15.0f; - if (10 <= frame && frame <= 20) { - i_this->field_0x0c77 = 1; - mantActor->field_0x395c = 0.7f; - } - - if (i_this->mpModelMorf->isStop()) { - i_this->mActionID = ACTION_WAIT; - i_this->field_0x05bc = 0; - } + if (i_this->mpModelMorf->isStop()) { + i_this->mActionMode = ACTION_WAIT; + i_this->mMoveMode = 0; + } } - cLib_addCalc2(&i_this->speedF, fVar2, 1.0f, fVar1); - cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->field_0x0c3c, 4, sVar1); - - return bVar5; + cLib_addCalc2(&a_this->speedF, speed_target, 1.0f, speed_step); + cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->mPlayerAngleY, 4, angle_step); + return spC; } -// /* ############################################################################################## */ -// /* 80602774-80602778 000110 0004+00 0/0 0/0 0/0 .rodata @5307 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5307 = 650.0f; -// COMPILER_STRIP_GATE(0x80602774, &lit_5307); -// #pragma pop - -// /* 80602778-8060277C 000114 0004+00 0/0 0/0 0/0 .rodata @5536 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5536 = 3.0f / 5.0f; -// COMPILER_STRIP_GATE(0x80602778, &lit_5536); -// #pragma pop - -// /* 8060277C-80602780 000118 0004+00 0/0 0/0 0/0 .rodata @5537 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5537 = 7.0f / 10.0f; -// COMPILER_STRIP_GATE(0x8060277C, &lit_5537); -// #pragma pop - -// /* 80602780-80602784 00011C 0004+00 0/0 0/0 0/0 .rodata @5538 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static u32 const lit_5538 = 0x40551EB8; -// COMPILER_STRIP_GATE(0x80602780, &lit_5538); -// #pragma pop - -// /* 80602784-80602788 000120 0004+00 0/0 0/0 0/0 .rodata @5539 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5539 = 450.0f; -// COMPILER_STRIP_GATE(0x80602784, &lit_5539); -// #pragma pop - -// /* 80602788-8060278C 000124 0004+00 0/1 0/0 0/0 .rodata @5540 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5540 = 60.0f; -// COMPILER_STRIP_GATE(0x80602788, &lit_5540); -// #pragma pop - -// /* 8060278C-80602790 000128 0004+00 0/4 0/0 0/0 .rodata @5541 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5541 = 20.0f; -// COMPILER_STRIP_GATE(0x8060278C, &lit_5541); -// #pragma pop - -// /* 80602790-80602794 00012C 0004+00 0/1 0/0 0/0 .rodata @5634 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5634 = 7.0f / 20.0f; -// COMPILER_STRIP_GATE(0x80602790, &lit_5634); -// #pragma pop - -// /* 80602794-80602798 000130 0004+00 0/3 0/0 0/0 .rodata @5635 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5635 = 25.0f; -// COMPILER_STRIP_GATE(0x80602794, &lit_5635); -// #pragma pop - /* 805F878C-805F8C20 003E2C 0494+00 1/1 0/0 0/0 .text b_gnd_g_defence__FP11b_gnd_class */ static void b_gnd_g_defence(b_gnd_class* i_this) { - // NONMATCHING - int frame = i_this->mpModelMorf->getFrame(); - s16 sVar2 = 0; - mant_class* mantActor = (mant_class *)fopAcM_SearchByID(i_this->mMantChildID); - i_this->field_0x0c58 = 10; + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + int anm_frame = i_this->mpModelMorf->getFrame(); + s16 angle_step = 0; + mant_class* mant_p = (mant_class *)fopAcM_SearchByID(i_this->mMantChildID); + i_this->mDamageInvulnerabilityTimer = 10; + cc_pl_cut_bit_get(); - switch (i_this->field_0x05bc) { - case 0: - i_this->field_0x05bc = 1; - if (cM_rndF(1.0) < 0.5f) { - if ((i_this->field_0x0c7b & 1) != 0) { - anm_init(i_this, 35, 3.0f, 0, 1.0f); - } else { - anm_init(i_this, 36, 3.0f, 0, 1.0f); - } - } else if ((i_this->field_0x0c7b & 1) == 0) { - anm_init(i_this, 37, 3.0f, 0, 1.0f); - } else { - anm_init(i_this, 38, 3.0f, 0, 1.0f); - } - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_DEFENCE, -1); - i_this->field_0x0c44[0] = 20; - i_this->field_0x0c7a = 0; - break; - case 1: - if (i_this->field_0x0c44[0] == 0 && daPy_getPlayerActorClass()->getCutAtFlg()) { - i_this->field_0x05bc = 2; - i_this->field_0x0c7b += 1; + switch (i_this->mMoveMode) { + case 0: + i_this->mMoveMode = 1; + + if (cM_rndF(1.0) < 0.5f) { + if (i_this->field_0xc7b & 1) { + anm_init(i_this, B_GND_BCK_EGND_DEFENSE_A, 3.0f, 0, 1.0f); + } else { + anm_init(i_this, B_GND_BCK_EGND_DEFENSE_B, 3.0f, 0, 1.0f); + } + } else if (i_this->field_0xc7b & 1) { + anm_init(i_this, B_GND_BCK_EGND_DEFENSE_C, 3.0f, 0, 1.0f); + } else { + anm_init(i_this, B_GND_BCK_EGND_DEFENSE_D, 3.0f, 0, 1.0f); + } + + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_DEFENCE, -1); + i_this->field_0xc44[0] = 20; + i_this->field_0xc7a = 0; + break; + case 1: + case 2: + if (i_this->mMoveMode == 1) { + if (i_this->field_0xc44[0] == 0 && daPy_getPlayerActorClass()->getCutAtFlg()) { + i_this->mMoveMode = 2; + i_this->field_0xc7b++; + if (cM_rndF(1.0) < 0.5f) { - if ((i_this->field_0x0c7b & 1) != 0) { - anm_init(i_this, 35, 3.0f, 0, 1.0f); + if (i_this->field_0xc7b & 1) { + anm_init(i_this, B_GND_BCK_EGND_DEFENSE_A, 3.0f, 0, 1.0f); } else { - anm_init(i_this, 36, 3.0f, 0, 1.0f); + anm_init(i_this, B_GND_BCK_EGND_DEFENSE_B, 3.0f, 0, 1.0f); } - } else if ((i_this->field_0x0c7b & 1) != 0) { - anm_init(i_this, 37, 3.0f, 0, 1.0f); + } else if (i_this->field_0xc7b & 1) { + anm_init(i_this, B_GND_BCK_EGND_DEFENSE_C, 3.0f, 0, 1.0f); } else { - anm_init(i_this, 38, 3.0f, 0, 1.0f); + anm_init(i_this, B_GND_BCK_EGND_DEFENSE_D, 3.0f, 0, 1.0f); } - - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_DEFENCE, -1); - if ((i_this->field_0x0cd4.m_flags & 16) != 0) { - i_this->mActionID = ACTION_JUMP; - i_this->field_0x05bc = 0; - } else if ((i_this->field_0x0c7a >= 3 || cM_rndF(0.1) != 0.0f) && (cM_rndF(1.0) < 0.35f)) { - i_this->mActionID = ACTION_JUMP; - i_this->field_0x05bc = 0; + + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_DEFENCE, -1); + + if (i_this->mAcch.ChkWallHit()) { + i_this->mActionMode = ACTION_JUMP; + i_this->mMoveMode = 0; + } else if ((i_this->field_0xc7a >= 3 || cM_rndF(0.1f)) && cM_rndF(1.0f) < 0.35f) { + i_this->mActionMode = ACTION_JUMP; + i_this->mMoveMode = 0; } } - break; - case 2: - case 3: - case 4: - if (!daPy_getPlayerActorClass()->getCutAtFlg()) { - i_this->field_0x05bc = 1; - } + } else if (!daPy_getPlayerActorClass()->getCutAtFlg()) { + i_this->mMoveMode = 1; + } - if (frame < 10) { - sVar2 = 0x1000; - } + if (anm_frame < 10) { + angle_step = 0x1000; + } - if (cc_pl_cut_bit_get() && 5 < frame && frame < 10) { - i_this->mpModelMorf->setFrame(frame - 1); - } + if (cc_pl_cut_bit_get() && 5 < anm_frame && anm_frame < 10) { + i_this->mpModelMorf->setFrame(anm_frame - 1); + } - if (frame < 10) { - i_this->field_0x0c79 = 1; - } + if (anm_frame < 10) { + i_this->field_0xc79 = 1; + } - if (i_this->mpModelMorf->isStop()) { - i_this->mActionID = ACTION_WAIT; - i_this->field_0x05bc = 0; - } - break; - case 5: - if (i_this->field_0x0c44[0] != 0) { - i_this->current.angle.y += 0x1800; - i_this->field_0x0eb0 = 30.0f; - mantActor->field_0x395c = 1.2f; - } else { - i_this->field_0x2698 = 1; - i_this->mActionID = ACTION_WAIT; - i_this->field_0x05bc = 3; - anm_init(i_this, 32, 10.0f, 0, 1.0f); - // actor->mHorseSpheres2[0].GetObjAt().SetSPrm(0x3f99999a); - } + if (i_this->mpModelMorf->isStop()) { + i_this->mActionMode = ACTION_WAIT; + i_this->mMoveMode = 0; + } + break; + case 5: + if (i_this->field_0xc44[0] != 0) { + a_this->current.angle.y += 0x1800; + i_this->field_0xeb0 = 30.0f; + mant_p->field_0x395c = 1.2f; + } else { + i_this->field_0x2698 = 1; + i_this->mActionMode = ACTION_WAIT; + i_this->mMoveMode = 3; + anm_init(i_this, B_GND_BCK_EGND_CHOUHATU, 10.0f, 0, 1.0f); + } - i_this->shape_angle.y = i_this->current.angle.y; - break; + a_this->shape_angle.y = a_this->current.angle.y; + break; } - cLib_addCalc2(&i_this->speedF, 0.0f, 1.0f, 10.0f); - cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->field_0x0c3c, 2, sVar2); - if (i_this->field_0x1b70.ChkTgHit()) { - i_this->field_0x0eb0 = 25.0f; - i_this->field_0x0eac = i_this->shape_angle.y; - mantActor->field_0x395c = 0.3f; - i_this->field_0x0c7a += 1; + cLib_addCalc2(&a_this->speedF, 0.0f, 1.0f, 10.0f); + cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->mPlayerAngleY, 2, angle_step); + + if (i_this->mDefSph.ChkTgHit()) { + i_this->field_0xeb0 = 25.0f; + i_this->field_0xeac = a_this->shape_angle.y; + mant_p->field_0x395c = 0.3f; + i_this->field_0xc7a++; i_this->field_0x2698 = 1; } } -// /* ############################################################################################## */ -// /* 80602798-8060279C 000134 0004+00 0/2 0/0 0/0 .rodata @5702 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5702 = 70.0f; -// COMPILER_STRIP_GATE(0x80602798, &lit_5702); -// #pragma pop - /* 805F8C20-805F8F88 0042C0 0368+00 1/1 0/0 0/0 .text b_gnd_g_jump__FP11b_gnd_class */ static int b_gnd_g_jump(b_gnd_class* i_this) { - // NONMATCHING - int rv = 1; - mant_class* mantActor = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); - switch (i_this->field_0x05bc) { - case 0: - anm_init(i_this, 44, 2.0f, 0, 1.0f); - i_this->field_0x05bc = 1; - i_this->field_0x0c58 = 100; + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + f32 var_f31 = 0.0f; + f32 var_f30 = 10.0f; + int sp10 = 1; + mant_class* mant_p = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); + + switch (i_this->mMoveMode) { + case 0: + anm_init(i_this, B_GND_BCK_EGND_JUMP_A, 2.0f, 0, 1.0f); + i_this->mMoveMode = 1; + i_this->mDamageInvulnerabilityTimer = 100; + break; + case 1: + if (!i_this->mpModelMorf->isStop()) { break; - case 1: - if (i_this->mpModelMorf->isStop()) { - anm_init(i_this, 45, 0.0f, 2, 1.0f); - i_this->field_0x05bc = 2; - if (i_this->field_0x0c38 > 500.0f) { - i_this->speedF = (cM_rndF(10.0f) + 30.0f); - i_this->current.angle.y += (int)(cM_rndFX(3000.0f)); - } else { - i_this->speedF = (cM_rndF(10.0f) + 10.0f); - i_this->current.angle.y += (int)(cM_rndFX(6000.0f)); - } + } + + anm_init(i_this, B_GND_BCK_EGND_JUMP_B, 0.0f, 2, 1.0f); + i_this->mMoveMode = 2; + + if (i_this->mPlayerDistXZ > 500.0f) { + a_this->speedF = cM_rndF(10.0f) + 30.0f; + a_this->current.angle.y += (int)cM_rndFX(3000.0f); + } else { + a_this->speedF = cM_rndF(10.0f) + 10.0f; + a_this->current.angle.y += (int)cM_rndFX(6000.0f); + } + + a_this->speed.y = 70.0f; + i_this->field_0x2698 = 1; + break; + case 2: + sp10 = 0; + cLib_addCalcAngleS2(&a_this->shape_angle.y, i_this->mPlayerAngleY, 2, 0x600); + mant_p->field_0x3964 = 1; + + if (i_this->mAcch.ChkGroundHit()) { + if (i_this->mPlayerDistXZ < 400.0f) { + i_this->mActionMode = ACTION_ATTACK; + i_this->mMoveMode = 6; + } else { + i_this->mActionMode = ACTION_ATTACK; + i_this->mMoveMode = 3; + anm_init(i_this, B_GND_BCK_EGND_ATTACKB, 3.0f, 0, 1.0f); + i_this->mpModelMorf->setFrame(10.0f); } - - i_this->speed.y = 70.0f; + + a_this->current.angle.y = a_this->shape_angle.y; + a_this->speedF = 0.0f; + + mant_p->field_0x395c = 1.0f; + i_this->mDamageInvulnerabilityTimer = 0; i_this->field_0x2698 = 1; - break; - case 2: - rv = 0; - cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->field_0x0c3c, 2, 0x600); - mantActor->field_0x3964 = 1; - if ((i_this->field_0x0cd4.m_flags & 32) != 0) { - if (400.0f < i_this->field_0x0c38) { - i_this->mActionID = ACTION_ATTACK; - i_this->field_0x05bc = 6; - } else { - i_this->mActionID = ACTION_ATTACK; - i_this->field_0x05bc = 3; - anm_init(i_this, 20, 3.0f, 0, 1.0f); - i_this->mpModelMorf->setFrame(10.0f); - } + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_LAND, 0, -1); + } + break; + case 4: + cLib_addCalcAngleS2(&a_this->shape_angle.y, i_this->mPlayerAngleY, 2, 0x600); + a_this->current.angle.y = a_this->shape_angle.y; - i_this->current.angle.y = i_this->shape_angle.y; - i_this->speedF = 0.0f; - mantActor->field_0x395c = 1.0f; - i_this->field_0x0c58 = 0; - i_this->field_0x2698 = 1; - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_LAND, 0, -1); - } - break; - case 3: - cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->field_0x0c3c, 2, 0x600); - if (i_this->field_0x0c44[0] == 0) { - i_this->mActionID = ACTION_ATTACK; - if (150.0f < i_this->field_0x0c38) { - i_this->field_0x05bc = 4; - } else if (300.0f < i_this->field_0x0c38) { - i_this->field_0x05bc = 0; - } else if (0.5f < cM_rndF(1.0f)) { - i_this->field_0x05bc = 2; - } else { - i_this->field_0x05bc = 10; - } - } - break; - case 5: - if (i_this->mpModelMorf->isStop()) { - anm_init(i_this, 91, 10.0f, 2, 1.0f); + if (i_this->field_0xc44[0] == 0) { + i_this->mActionMode = ACTION_ATTACK; + if (i_this->mPlayerDistXZ < 150.0f) { + i_this->mMoveMode = 4; + } else if (i_this->mPlayerDistXZ < 300.0f) { + i_this->mMoveMode = 0; + } else if (cM_rndF(1.0f) < 0.5f) { + i_this->mMoveMode = 2; + } else { + i_this->mMoveMode = 10; } + } + break; + case 5: + if (i_this->mpModelMorf->isStop()) { + anm_init(i_this, B_GND_BCK_EGND_WAIT02, 10.0f, 2, 1.0f); + } - if (i_this->field_0x0c44[0] == 0) { - i_this->field_0x05bc = 4; - } + if (i_this->field_0xc44[0] == 0) { + i_this->mMoveMode = 4; + } } - return rv; + return sp10; } -// /* ############################################################################################## */ -// /* 8060279C-806027A0 000138 0004+00 0/1 0/0 0/0 .rodata @5751 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5751 = 6.0f; -// COMPILER_STRIP_GATE(0x8060279C, &lit_5751); -// #pragma pop - /* 805F8F88-805F9220 004628 0298+00 1/1 0/0 0/0 .text b_gnd_g_side__FP11b_gnd_class */ static void b_gnd_g_side(b_gnd_class* i_this) { - // NONMATCHING - mant_class* mantActor = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); - i_this->field_0x0c58 = 10; + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + mant_class* mant_p = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); + i_this->mDamageInvulnerabilityTimer = 10; - switch (i_this->field_0x05bc) { - case 0: - if (0.5f < cM_rndF(1.0f)) { - anm_init(i_this, 78, 2.0f, 0, 1.0f); - i_this->current.angle.y = i_this->field_0x0c3c + 0x3000; + switch (i_this->mMoveMode) { + case 0: + if (cM_rndF(1.0f) < 0.5f) { + anm_init(i_this, B_GND_BCK_EGND_SIDEJUMP_LA, 2.0f, 0, 1.0f); + a_this->current.angle.y = i_this->mPlayerAngleY + 0x3000; + } else { + anm_init(i_this, B_GND_BCK_EGND_SIDEJUMP_RA, 2.0f, 0, 1.0f); + a_this->current.angle.y = i_this->mPlayerAngleY + -0x3000; + } + + a_this->speedF = 30.0f; + a_this->speed.y = 30.0f; + i_this->mMoveMode = 1; + mant_p->field_0x395c = 1.0f; + break; + case 1: + cLib_addCalcAngleS2(&a_this->shape_angle.y, i_this->mPlayerAngleY, 2, 0x600); + + if (i_this->mAcch.ChkGroundHit()) { + if (i_this->mAnmID == B_GND_BCK_EGND_SIDEJUMP_LA) { + anm_init(i_this, B_GND_BCK_EGND_SIDEJUMP_LB, 1.0f, 0, 1.0f); } else { - anm_init(i_this, 80, 2.0f, 0, 1.0f); - i_this->current.angle.y = i_this->field_0x0c3c + -0x3000; + anm_init(i_this, B_GND_BCK_EGND_SIDEJUMP_RB, 1.0f, 0, 1.0f); } - i_this->speedF = 30.0f; - i_this->speed.y = 30.0f; - i_this->field_0x05bc = 1; - mantActor->field_0x395c = 1.0f; - break; + i_this->mMoveMode = 2; + i_this->field_0x2698 = 1; + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_LAND, 0, -1); + } + break; + case 2: + cLib_addCalc0(&a_this->speedF, 1.0f, 6.0f); - case 1: - cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->field_0x0c3c, 2, 0x600); - if ((i_this->field_0x0cd4.m_flags & 32) != 0) { - if (i_this->mAnmID == 78) { - anm_init(i_this, 79, 1.0f, 0, 1.0f); + if (i_this->mpModelMorf->isStop()) { + if (i_this->mPlayerDistXZ < 500.0f) { + i_this->mActionMode = ACTION_ATTACK; + if (i_this->mPlayerDistXZ < 300.0f) { + i_this->mMoveMode = 6; } else { - anm_init(i_this, 81, 1.0f, 0, 1.0f); + i_this->mMoveMode = 3; + anm_init(i_this, B_GND_BCK_EGND_ATTACKB, 3.0f, 0, 1.0f); + i_this->mpModelMorf->setFrame(10.0f); } - - i_this->field_0x05bc = 2; - i_this->field_0x2698 = 1; - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_LAND, 0, -1); - } - break; - - case 2: - cLib_addCalc0(&i_this->speedF, 1.0f, 6.0f); - if (i_this->mpModelMorf->isStop()) { - if (i_this->field_0x0c38 < 500.0f) { - i_this->mActionID = ACTION_ATTACK; - if (i_this->field_0x0c38 < 300.0f) { - i_this->field_0x05bc = 6; - } else { - i_this->field_0x05bc = 3; - anm_init(i_this, 20, 3.0f, 0, 1.0f); - i_this->mpModelMorf->setFrame(10.0f); - } + } else { + i_this->mActionMode = ACTION_WAIT; + if (cM_rndF(1.0f) < 0.5f) { + i_this->mMoveMode = 0; } else { - i_this->mActionID = ACTION_WAIT; - if (cM_rndF(1.0f) < 0.5f) { - i_this->field_0x05bc = 0; - } else { - i_this->field_0x05bc = 3; - anm_init(i_this, 32, 10.0f, 0, 1.0f); - } + i_this->mMoveMode = 3; + anm_init(i_this, B_GND_BCK_EGND_CHOUHATU, 10.0f, 0, 1.0f); } - - i_this->current.angle.y = i_this->shape_angle.y; } + + a_this->current.angle.y = a_this->shape_angle.y; + } } } /* 805F9220-805F92FC 0048C0 00DC+00 1/1 0/0 0/0 .text b_gnd_g_tuba__FP11b_gnd_class */ static void b_gnd_g_tuba(b_gnd_class* i_this) { - // NONMATCHING - mant_class* mantActor = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); - i_this->field_0x0c58 = 10; - switch (i_this->field_0x05bc) { - case 0: - anm_init(i_this, 85, 5.0f, 2, 1.0f); - i_this->field_0x05bc = 1; - mantActor->field_0x395c = 1.5f; - i_this->field_0x26c4 = 50; - i_this->speedF = 0.0f; - dComIfGp_getVibration().StartShock(6, 31, cXyz(0.0f, 1.0f, 0.0f)); - break; - case 1: - break; + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + mant_class* mant_p = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); + i_this->mDamageInvulnerabilityTimer = 10; + + switch (i_this->mMoveMode) { + case 0: + anm_init(i_this, B_GND_BCK_EGND_TUBAZERI_A, 5.0f, 2, 1.0f); + i_this->mMoveMode = 1; + mant_p->field_0x395c = 1.5f; + i_this->mDemoCamMode = 50; + a_this->speedF = 0.0f; + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER6, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); + break; + case 1: + break; } } /* 805F92FC-805F94A8 00499C 01AC+00 1/1 0/0 0/0 .text b_gnd_g_damage__FP11b_gnd_class */ static void b_gnd_g_damage(b_gnd_class* i_this) { - // NONMATCHING + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; daPy_py_c* player = daPy_getPlayerActorClass(); - int frame = i_this->mpModelMorf->getFrame(); - mant_class* mantActor = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); - switch (i_this->field_0x05bc) { - case 0: - i_this->field_0x05bc = 1; - if (cM_rndF(1.0f) < 0.5f) { - anm_init(i_this, 33, 3.0f, 0, 1.0f); - } else { - anm_init(i_this, 34, 3.0f, 0, 1.0f); - } - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_DAMAGE, -1); - i_this->current.angle.y = player->shape_angle.y + 0x8000; - i_this->field_0x0eb0 = 25.0f; - i_this->field_0x0eac = i_this->current.angle.y; - mantActor->field_0x395c = 0.5f; + int anm_frame = i_this->mpModelMorf->getFrame(); + mant_class* mant_p = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); + + switch (i_this->mMoveMode) { + case 0: + i_this->mMoveMode = 1; + if (cM_rndF(1.0f) < 0.5f) { + anm_init(i_this, B_GND_BCK_EGND_DAMAGE_A, 3.0f, 0, 1.0f); + } else { + anm_init(i_this, B_GND_BCK_EGND_DAMAGE_B, 3.0f, 0, 1.0f); + } + + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_DAMAGE, -1); + a_this->current.angle.y = player->shape_angle.y + 0x8000; + i_this->field_0xeb0 = 25.0f; + i_this->field_0xeac = a_this->current.angle.y; + mant_p->field_0x395c = 0.5f; + break; + case 1: + if ((i_this->mDamageInvulnerabilityTimer <= 50 || anm_frame <= 10) && !i_this->mpModelMorf->isStop()) { break; + } - case 1: - if ((i_this->field_0x0c58 <= 51 || frame <= 11) && !i_this->mpModelMorf->isStop()) { - break; - } - - i_this->field_0x0c58 = 15; - i_this->mActionID = ACTION_WAIT; - i_this->field_0x05bc = 0; - i_this->field_0x1e0a = 0; - i_this->field_0x0c7c = 0; + i_this->mDamageInvulnerabilityTimer = 15; + i_this->mActionMode = ACTION_WAIT; + i_this->mMoveMode = 0; + i_this->field_0x1e0a = 0; + i_this->field_0xc7c = 0; } - cLib_addCalc2(&i_this->speedF, 0.0f, 1.0f, 10.0f); + cLib_addCalc2(&a_this->speedF, 0.0f, 1.0f, 10.0f); } -// /* ############################################################################################## */ -// /* 806027A0-806027A4 00013C 0004+00 0/1 0/0 0/0 .rodata @5894 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5894 = 35.0f; -// COMPILER_STRIP_GATE(0x806027A0, &lit_5894); -// #pragma pop - -// /* 806027A4-806027A8 000140 0004+00 0/1 0/0 0/0 .rodata @5895 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5895 = 9.0f; -// COMPILER_STRIP_GATE(0x806027A4, &lit_5895); -// #pragma pop - /* 805F94A8-805F98A0 004B48 03F8+00 1/1 0/0 0/0 .text b_gnd_g_down__FP11b_gnd_class */ static void b_gnd_g_down(b_gnd_class* i_this) { - // NONMATCHING - int frame = (int)i_this->mpModelMorf->getFrame(); - fopEn_enemy_c* enemyActor = (fopEn_enemy_c *)i_this; - mant_class* mantActor = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); - i_this->field_0x0c58 = 10; + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + fopEn_enemy_c* e_this = (fopEn_enemy_c*)a_this; - switch(i_this->field_0x05bc) { - case 0: - i_this->field_0x1e0c += 1; - if (i_this->field_0x1e0c >= 3) { - anm_init(i_this, 40, 3.0f, 0, 1.0f); - } else { - anm_init(i_this, 41, 3.0f, 0, 1.0f); - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_DAMAGE, -1); + f32 var_f31 = 0.0f; + f32 var_f30 = 10.0f; + int anm_frame = (int)i_this->mpModelMorf->getFrame(); + + mant_class* mant_p = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); + i_this->mDamageInvulnerabilityTimer = 10; + + switch(i_this->mMoveMode) { + case 0: + i_this->field_0x1e0c++; + if (i_this->field_0x1e0c >= 3) { + anm_init(i_this, B_GND_BCK_EGND_DOWN, 3.0f, 0, 1.0f); + } else { + anm_init(i_this, B_GND_BCK_EGND_DOWNB, 3.0f, 0, 1.0f); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_DAMAGE, -1); + } + + a_this->current.angle.y = i_this->mPlayerAngleY + 0x8000; + i_this->mMoveMode = 1; + + mant_p->field_0x395c = 1.0f; + + a_this->speedF = 30.0f; + a_this->speed.y = 35.0f; + return; + case 1: + if (anm_frame >= 16) { + cLib_addCalc0(&a_this->speedF, 1.0f, 3.0f); + + if (anm_frame == 16) { + cXyz eff_pos; + MTXCopy(i_this->mpModelMorf->getModel()->getAnmMtx(1), mDoMtx_stack_c::get()); + mDoMtx_stack_c::multVecZero(&eff_pos); + + fopAcM_effSmokeSet1(&i_this->field_0x25b4, &i_this->field_0x25b8, &eff_pos, &a_this->shape_angle, 2.5f, &i_this->tevStr, 1); + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER6, 0x1F, cXyz(0.0f, 1.0f, 0.0f)); + mant_p->field_0x3960 = 9.0f; + + if (i_this->mAnmID == B_GND_BCK_EGND_DOWNB) { + mant_p->field_0x395c = 1.0f; + } } - i_this->current.angle.y = i_this->field_0x0c3c + -0x8000; - i_this->field_0x05bc = 1; - - mantActor->field_0x395c = 1.0f; + if (i_this->mAnmID == B_GND_BCK_EGND_DOWN && anm_frame >= 22) { + mant_p->field_0x3965 = 1; + } + } else { + mant_p->field_0x3964 = 1; + } - i_this->speedF = 30.0f; - i_this->speed.y = 35.0f; + if (i_this->mAnmID == B_GND_BCK_EGND_DOWNB && anm_frame == 48) { + mant_p->field_0x395c = 1.0f; + } + + if (!i_this->mpModelMorf->isStop()) { return; - case 1: - if (frame >= 16) { - cLib_addCalc0(&i_this->speedF, 1.0f, 3.0f); - if (frame == 16) { - PSMTXCopy(i_this->mpModelMorf->getModel()->getAnmMtx(1), mDoMtx_stack_c::now); - fopAcM_effSmokeSet1(&i_this->field_0x25ac[2], &i_this->field_0x25ac[3], - &cXyz(mDoMtx_stack_c::now[0][3], mDoMtx_stack_c::now[1][3], mDoMtx_stack_c::now[2][3]), - &i_this->shape_angle, 2.5f, &i_this->tevStr, 1); - dComIfGp_getVibration().StartShock(6, 31, - cXyz(0.0f, 1.0f, 0.0f)); - mantActor->field_0x3960 = 9.0f; - if (i_this->mAnmID == 41) { - mantActor->field_0x395c = 1.0f; - } - } + } - if (i_this->mAnmID == 40 && 22 <= frame) { - mantActor->field_0x3965 = 1; - } - } else { - mantActor->field_0x3964 = 1; - } + a_this->speedF = 0.0f; - if (i_this->mAnmID == 41 && frame == 48) { - mantActor->field_0x395c = 1.0f; - } + if (i_this->mAnmID == B_GND_BCK_EGND_DOWN) { + anm_init(i_this, B_GND_BCK_EGND_DOWNWAIT, 3.0f, 2, 1.0f); + i_this->mMoveMode = 2; + i_this->field_0xc44[0] = 200; - if (!i_this->mpModelMorf->isStop()) { - return; + if (daPy_getPlayerActorClass()->checkMasterSwordEquip()) { + e_this->onDownFlg(); } - - i_this->speedF = 0.0f; - if (i_this->mAnmID == 40) { - anm_init(i_this, 43, 3.0f, 2, 1.0f); - i_this->field_0x05bc = 2; - i_this->field_0x0c44[0] = 200; - if (!daPy_getPlayerActorClass()->checkMasterSwordEquip()) { - return; - } - } - - enemyActor->onDownFlg(); - i_this->mActionID = ACTION_WAIT; - i_this->field_0x05bc = 0; - i_this->current.angle.y = i_this->shape_angle.y; - return; - case 2: - mantActor->field_0x3965 = 1; - if (daPy_getPlayerActorClass()->getCutType() == daPy_py_c::CUT_TYPE_DOWN ) { - i_this->field_0x26c4 = 60; - i_this->mActionID = ACTION_END; - i_this->field_0x05bc = 0; - Z2GetAudioMgr()->bgmStop(30, 0); + } + + i_this->mActionMode = ACTION_WAIT; + i_this->mMoveMode = 0; + a_this->current.angle.y = a_this->shape_angle.y; + return; + case 2: + mant_p->field_0x3965 = 1; + if (daPy_getPlayerActorClass()->getCutType() == daPy_py_c::CUT_TYPE_DOWN) { + i_this->mDemoCamMode = 60; + i_this->mActionMode = ACTION_END; + i_this->mMoveMode = 0; + Z2GetAudioMgr()->bgmStop(30, 0); + } + + if (i_this->field_0xc44[0] != 0 && daPy_getPlayerActorClass()->checkMasterSwordEquip()) { + return; + } + + anm_init(i_this, B_GND_BCK_EGND_DOWNUP, 3.0f, 0, 1.0f); + a_this->current.angle.y = a_this->shape_angle.y; + i_this->mMoveMode = 3; + e_this->offDownFlg(); + case 3: + if (anm_frame <= 10) { + mant_p->field_0x3965 = 1; + if (anm_frame == 10) { + mant_p->field_0x395c = 1.0f; } + } - if (i_this->field_0x0c44[0] != 0 && daPy_getPlayerActorClass()->checkMasterSwordEquip()) { - return; - } - - anm_init(i_this, 42, 3.0f, 0, 1.0f); - i_this->current.angle.y = i_this->shape_angle.y; - i_this->field_0x05bc = 3; - enemyActor->offDownFlg(); - break; - default: - return; - } - - if (frame <= 10) { - mantActor->field_0x3965 = 1; if (i_this->mpModelMorf->isStop()) { - i_this->mActionID = ACTION_WAIT; - i_this->field_0x05bc = 0; + i_this->mActionMode = ACTION_WAIT; + i_this->mMoveMode = 0; } } } /* 805F98A0-805F98F8 004F40 0058+00 1/1 0/0 0/0 .text b_gnd_g_end__FP11b_gnd_class */ static void b_gnd_g_end(b_gnd_class* i_this) { - i_this->field_0x0c58 = 10; - mant_class* mantActor = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); - mantActor->field_0x3965 = 1; + i_this->mDamageInvulnerabilityTimer = 10; + mant_class* mant_p = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); + mant_p->field_0x3965 = 1; - if (i_this->field_0x05bc == 0) { + if (i_this->mMoveMode == 0) { return; } } /* 805F98F8-805F9BE4 004F98 02EC+00 1/1 0/0 0/0 .text damage_check__FP11b_gnd_class */ static void damage_check(b_gnd_class* i_this) { - // NONMATCHING - BOOL bVar1; - cXyz local_38, cStack_44, local_50; - daPy_py_c* player = daPy_getPlayerActorClass(); - i_this->field_0x1654.Move(); + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); + + i_this->mGndCcStts.Move(); + if (i_this->field_0x1e09 != 0) { - i_this->field_0x1e09 -= 1; + i_this->field_0x1e09--; } - if (i_this->field_0x0c58 == 0) { - mant_class* mantActor = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); + if (i_this->mDamageInvulnerabilityTimer == 0) { + mant_class* mant_p = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); + BOOL hit_down = FALSE; + for (int i = 0; i < 3; i++) { - if (i_this->field_0x1690[i].ChkTgHit()) { - i_this->mAtInfo.mpCollider = i_this->field_0x1690[i].GetTgHitObj(); - cc_at_check((fopAc_ac_c*)i_this, &i_this->mAtInfo); + if (i_this->mGndSph[i].ChkTgHit()) { + i_this->mAtInfo.mpCollider = i_this->mGndSph[i].GetTgHitObj(); + cc_at_check(a_this, &i_this->mAtInfo); + if (i_this->mAtInfo.mpCollider->ChkAtType(AT_TYPE_BOOMERANG)) { - mantActor->field_0x395c = 1.3f; - i_this->field_0x0c58 = 6; - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_MANTEAU, 0, -1); + mant_p->field_0x395c = 1.3f; + i_this->mDamageInvulnerabilityTimer = 6; + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_MANTEAU, 0, -1); return; } - bVar1 = i_this->field_0x1e09 != 0; - if (i_this->health <= 0 || 3 <= i_this->field_0x1e0a && 4 <= daPy_getPlayerActorClass()->getCutCount()) { - bVar1 = true; + if (i_this->field_0x1e09 != 0) { + hit_down = TRUE; + } + + if (i_this->health <= 0 || (i_this->field_0x1e0a >= 3 && daPy_getPlayerActorClass()->getCutCount() >= 4)) { + hit_down = TRUE; } else { - i_this->mActionID = ACTION_DAMAGE; - i_this->field_0x05bc = 0; + i_this->mActionMode = ACTION_DAMAGE; + i_this->mMoveMode = 0; i_this->field_0x2698 = 1; + if (i_this->mAtInfo.mHitStatus != 0) { - mantActor->field_0x3967 = 3; + mant_p->field_0x3967 = 3; } else { - mantActor->field_0x3967 = 2; + mant_p->field_0x3967 = 2; } if (player->getCutType() == daPy_py_c::CUT_TYPE_JUMP && player->checkCutJumpCancelTurn()) { - i_this->field_0x0c58 = 3; + i_this->mDamageInvulnerabilityTimer = 3; i_this->field_0x1e09 = 10; } else { - i_this->field_0x0c58 = 10; - i_this->field_0x1e0a += 1; - if (i_this->field_0x0c7c == 0 && 3 <= i_this->field_0x1e0a) { - i_this->field_0x0c58 = 100; + i_this->mDamageInvulnerabilityTimer = 10; + i_this->field_0x1e0a++; + + if (i_this->field_0xc7c == 0 && i_this->field_0x1e0a >= 3) { + i_this->mDamageInvulnerabilityTimer = 100; } } } - local_38.setall(1.0f); - u8 uVar1; - if (bVar1) { - uVar1 = 3; + cXyz hitmark_size(1.0f, 1.0f, 1.0f); + u16 hitmark; + if (hit_down) { + hitmark = 3; } else { - uVar1 = 1; + hitmark = 1; } - PSMTXCopy(i_this->mpModelMorf->getModel()->getAnmMtx(2), *calc_mtx); - local_50.x = cM_rndFX(10.0f); - local_50.y = cM_rndFX(10.0f) + 50.0f; - local_50.z = cM_rndFX(10.0f); - MtxPosition(&local_50, &cStack_44); - dComIfGp_setHitMark(uVar1, (fopAc_ac_c*)i_this, &cStack_44, NULL, &local_38, 0); - if (!bVar1) { - return; - } + cXyz ato; + cXyz mae; + MTXCopy(i_this->mpModelMorf->getModel()->getAnmMtx(2), *calc_mtx); + mae.x = cM_rndFX(10.0f); + mae.y = cM_rndFX(10.0f) + 50.0f; + mae.z = cM_rndFX(10.0f); + MtxPosition(&mae, &ato); + dComIfGp_setHitMark(hitmark, a_this, &ato, NULL, &hitmark_size, 0); - i_this->mActionID = ACTION_DOWN; - i_this->field_0x05bc = 0; - i_this->field_0x0c58 = 10; - i_this->field_0x0c7c = 0; - dScnPly_c::setPauseTimer(7); - i_this->health = 100; - return; + if (hit_down) { + i_this->mActionMode = ACTION_DOWN; + i_this->mMoveMode = 0; + i_this->mDamageInvulnerabilityTimer = 10; + i_this->field_0xc7c = 0; + dScnPly_c::setPauseTimer(7); + a_this->health = 100; + } + break; } } } @@ -2612,170 +2191,153 @@ static void damage_check(b_gnd_class* i_this) { /* 805F9BE4-805FA2FC 005284 0718+00 1/1 0/0 0/0 .text eff_set_h__FP11b_gnd_class */ static void eff_set_h(b_gnd_class* i_this) { - // NONMATCHING - static u16 w_eff_name[3] = { - 0x825B, 0x825C, 0x825D - }; - static u16 w_eff_name2[3] = { - 0x8258, 0x8259, 0x825A - }; - static u16 e_name_6046[3] = { - 0x8B95, 0x8B96, 0x8B97 - }; + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + cXyz sp44; + cXyz sp38; - BOOL bVar4; - BOOL bVar9; - cXyz local_ec, local_f8; - - if (i_this->mHorseAnmID == 9) { + if (i_this->mHorseAnmID == B_HG_BCK_HG_RUN) { if (i_this->mpHorseMorf->checkFrame(5.0f)) { - i_this->field_0x2698 = i_this->field_0x2698 | 3; + i_this->field_0x2698 |= 3; } else if (i_this->mpHorseMorf->checkFrame(20.0f)) { - i_this->field_0x2698 = i_this->field_0x2698 | 12; + i_this->field_0x2698 |= 12; } - i_this->field_0x0c6a = 1; + i_this->field_0xc6a = 1; } - dBgS_GndChk dStack_8c; - dBgS_ObjGndChk_Spl dStack_e0; + dBgS_GndChk spA4; + dBgS_ObjGndChk_Spl sp50; - local_ec = i_this->current.pos; - local_ec.y += 100.0f; + sp44 = i_this->current.pos; + sp44.y += 100.0f; - dStack_8c.SetPos(&local_ec); - dStack_e0.SetPos(&local_ec); + spA4.SetPos(&sp44); + sp50.SetPos(&sp44); - bVar4 = FALSE; + s8 var_r27 = FALSE; + s8 var_r26 = FALSE; - if (dComIfG_Bgsp().GroundCross(&dStack_e0) - dComIfG_Bgsp().GroundCross(&dStack_8c) > 0.0f) { - bVar9 = TRUE; + if (dComIfG_Bgsp().GroundCross(&sp50) - dComIfG_Bgsp().GroundCross(&spA4) > 0.0f) { + var_r27 = TRUE; } if (i_this->field_0x2698 != 0) { J3DModel* model = i_this->mpHorseMorf->getModel(); - local_ec.set(0.0f, 0.0f, 0.0f); - if ((i_this->field_0x2698 & 1) != 0) { - PSMTXCopy(model->getAnmMtx(10), *calc_mtx); - MtxPosition(&local_ec, &local_f8); + sp44.set(0.0f, 0.0f, 0.0f); - if (bVar9) { - bVar4 = TRUE; + if (i_this->field_0x2698 & 1) { + MTXCopy(model->getAnmMtx(10), *calc_mtx); + MtxPosition(&sp44, &sp38); + + if (var_r27) { + var_r26 = TRUE; } else { - fopAcM_effSmokeSet1(&i_this->field_0x25ac[1], &i_this->field_0x25ac[9], - &local_f8, &i_this->shape_angle, i_this->scale.z * 2.0f, &i_this->tevStr, 0); - if (i_this->field_0x0c6a != 0) { - i_this->field_0x25ac[5] = dComIfGp_particle_set(i_this->field_0x25ac[5], - 0x80e3, &local_f8, &i_this->shape_angle, 0); + fopAcM_effSmokeSet2(&i_this->field_0x25ac[1], &i_this->field_0x25d0, &sp38, &i_this->shape_angle, i_this->scale.z * 2.0f, &i_this->tevStr); + if (i_this->field_0xc6a != 0) { + i_this->field_0x25c0 = dComIfGp_particle_set(i_this->field_0x25c0, 0x80E3, &sp38, &i_this->shape_angle, 0); } } } - if ((i_this->field_0x2698 & 2) != 0) { - PSMTXCopy(model->getAnmMtx(6), *calc_mtx); - MtxPosition(&local_ec, &local_f8); + if (i_this->field_0x2698 & 2) { + MTXCopy(model->getAnmMtx(6), *calc_mtx); + MtxPosition(&sp44, &sp38); - if (bVar9) { - bVar4 = TRUE; + if (var_r27) { + var_r26 = TRUE; } else { - fopAcM_effSmokeSet1(&i_this->field_0x25ac[0], &i_this->field_0x25ac[8], - &local_f8, &i_this->shape_angle, i_this->scale.z * 2.0f, &i_this->tevStr, 0); - if (i_this->field_0x0c6a != 0) { - i_this->field_0x25ac[4] = dComIfGp_particle_set(i_this->field_0x25ac[4], - 0x80e3, &local_f8, &i_this->shape_angle, 0); + fopAcM_effSmokeSet2(&i_this->field_0x25ac[0], &i_this->field_0x25cc, &sp38, &i_this->shape_angle, i_this->scale.z * 2.0f, &i_this->tevStr); + if (i_this->field_0xc6a != 0) { + i_this->field_0x25bc = dComIfGp_particle_set(i_this->field_0x25bc, 0x80E3, &sp38, &i_this->shape_angle, 0); } } } - if ((i_this->field_0x2698 & 4) != 0) { - PSMTXCopy(model->getAnmMtx(34), *calc_mtx); - MtxPosition(&local_ec, &local_f8); + if (i_this->field_0x2698 & 4) { + MTXCopy(model->getAnmMtx(34), *calc_mtx); + MtxPosition(&sp44, &sp38); - if (bVar9) { - bVar4 = TRUE; + if (var_r27) { + var_r26 = TRUE; } else { - fopAcM_effSmokeSet1(&i_this->field_0x25ac[2], &i_this->field_0x25ac[10], - &local_f8, &i_this->shape_angle, i_this->scale.z * 2.0f, &i_this->tevStr, 0); - if (i_this->field_0x0c6a != 0) { - i_this->field_0x25ac[6] = dComIfGp_particle_set(i_this->field_0x25ac[6], - 0x80e3, &local_f8, &i_this->shape_angle, 0); + fopAcM_effSmokeSet2(&i_this->field_0x25b4, &i_this->field_0x25d4, &sp38, &i_this->shape_angle, i_this->scale.z * 2.0f, &i_this->tevStr); + if (i_this->field_0xc6a != 0) { + i_this->field_0x25c4 = dComIfGp_particle_set(i_this->field_0x25c4, 0x80E3, &sp38, &i_this->shape_angle, 0); } } } - if ((i_this->field_0x2698 & 8) != 0) { - PSMTXCopy(model->getAnmMtx(30), *calc_mtx); - MtxPosition(&local_ec, &local_f8); + if (i_this->field_0x2698 & 8) { + MTXCopy(model->getAnmMtx(30), *calc_mtx); + MtxPosition(&sp44, &sp38); - if (bVar9) { - bVar4 = TRUE; + if (var_r27) { + var_r26 = TRUE; } else { - fopAcM_effSmokeSet1(&i_this->field_0x25ac[3], &i_this->field_0x25ac[11], - &local_f8, &i_this->shape_angle, i_this->scale.z * 2.0f, &i_this->tevStr, 0); - if (i_this->field_0x0c6a != 0) { - i_this->field_0x25ac[7] = dComIfGp_particle_set(i_this->field_0x25ac[7], - 0x80e3, &local_f8, &i_this->shape_angle, 0); + fopAcM_effSmokeSet2(&i_this->field_0x25b8, &i_this->field_0x25d8, &sp38, &i_this->shape_angle, i_this->scale.z * 2.0f, &i_this->tevStr); + if (i_this->field_0xc6a != 0) { + i_this->field_0x25c8 = dComIfGp_particle_set(i_this->field_0x25c8, 0x80E3, &sp38, &i_this->shape_angle, 0); } } } } if (i_this->field_0x2699 != 0) { - local_ec.set(0.0f, 0.0f, 0.0f); - PSMTXCopy(i_this->mpHorseMorf->getModel()->getAnmMtx(2), *calc_mtx); - MtxPosition(&local_ec, &local_f8); - - f32 fVar1 = 2.5f; + sp44.set(0.0f, 0.0f, 0.0f); + MTXCopy(i_this->mpHorseMorf->getModel()->getAnmMtx(2), *calc_mtx); + MtxPosition(&sp44, &sp38); + f32 var_f30 = 2.5f; if (i_this->field_0x2699 == 2) { - fVar1 = 4.0f; + var_f30 = 4.0f; } - if (bVar9) { - fopAcM_effSmokeSet1(&i_this->field_0x25ac[12], &i_this->field_0x25ac[13], - &local_f8, NULL, fVar1, &i_this->tevStr, 1); + if (var_r27) { + var_r26 = TRUE; } else { - bVar4 = TRUE; + fopAcM_effSmokeSet1(&i_this->field_0x25dc, &i_this->field_0x25e0, &sp38, NULL, var_f30, &i_this->tevStr, 1); } } - if (bVar4) { - // cXyz local_104 = cXyz(2.0f, 2.0f, 2.0f); - // csXyz cStack_10c = csXyz(0, 0, 0); - local_f8.y = dComIfG_Bgsp().GroundCross(&dStack_8c); + if (var_r26) { + cXyz sp2C(2.0f, 2.0f, 2.0f); + csXyz sp24(0, 0, 0); + sp38.y = dComIfG_Bgsp().GroundCross(&spA4); for (int i = 0; i < 3; i++) { - i_this->field_0x25ac[i] = dComIfGp_particle_set(i_this->field_0x25ac[i], - w_eff_name[i], &local_f8, &i_this->tevStr, - &csXyz(0, 0, 0), &cXyz(2.0f, 2.0f, 2.0f), -1, 0, - -1, 0, 0, 0); + static u16 w_eff_name[3] = {0x825B, 0x825C, 0x825D}; + static u16 w_eff_name2[3] = {0x8258, 0x8259, 0x825A}; + + i_this->field_0x25e4[i] = dComIfGp_particle_set(i_this->field_0x25e4[i], + w_eff_name[i], &sp38, &i_this->tevStr, + &sp24, &sp2C, -1, NULL, + -1, NULL, NULL, NULL); } } i_this->field_0x2698 = 0; - i_this->field_0x0c6a = 0; + i_this->field_0xc6a = 0; i_this->field_0x2699 = 0; if (i_this->field_0x1e08 != 0) { - PSMTXCopy(i_this->mpHorseMorf->getModel()->getAnmMtx(1), mDoMtx_stack_c::now); - mDoMtx_stack_c::multVecZero(&local_f8); + MTXCopy(i_this->mpModelMorf->getModel()->getAnmMtx(1), mDoMtx_stack_c::get()); + mDoMtx_stack_c::multVecZero(&sp38); for (int i = 0; i < 3; i++) { - i_this->field_0x268c[i] = dComIfGp_particle_set(i_this->field_0x268c[i], - e_name_6046[i], &local_f8, &i_this->shape_angle, 0); + static u16 e_name[3] = {0x8B95, 0x8B96, 0x8B97}; + i_this->field_0x268c[i] = dComIfGp_particle_set(i_this->field_0x268c[i], e_name[i], &sp38, NULL, 0); } - i_this->mZ2Creature.startCreatureSoundLevel(Z2SE_EN_GND_DENKIBIRI, 0, -1); + i_this->mGndSound.startCreatureSoundLevel(Z2SE_EN_GND_DENKIBIRI, 0, -1); } } /* 805FA2FC-805FA3E4 00599C 00E8+00 1/1 0/0 0/0 .text eff_set__FP11b_gnd_class */ static void eff_set(b_gnd_class* i_this) { - // NONMATCHING if (i_this->field_0x2698 == 2) { - if ((i_this->field_0x0afc & 1) != 0) { + if (i_this->mCounter & 1) { fopAcM_effSmokeSet2(&i_this->field_0x25ac[0], &i_this->field_0x25ac[1], - &i_this->field_0x26a8[(i_this->field_0x0afc & 2) >> 1], &i_this->shape_angle, + &i_this->field_0x26a8[(i_this->mCounter & 2) >> 1], &i_this->shape_angle, 2.0f, &i_this->tevStr); } } else if (i_this->field_0x2698 == 1) { @@ -2784,212 +2346,255 @@ static void eff_set(b_gnd_class* i_this) { &i_this->field_0x26a8[i], &i_this->shape_angle, 2.5f, &i_this->tevStr); } } + i_this->field_0x2698 = 0; } /* 805FA3E4-805FA430 005A84 004C+00 2/2 0/0 0/0 .text s_fkdel_sub__FPvPv */ -static void* s_fkdel_sub(void* param_1, void* param_2) { - if (fopAc_IsActor(param_1) && fopAcM_GetName(param_1) == 486) { - fopAcM_delete((fopAc_ac_c*)param_1); +static void* s_fkdel_sub(void* i_actor, void* i_data) { + if (fopAc_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_FK) { + fopAcM_delete((fopAc_ac_c*)i_actor); } + return NULL; } /* 805FA430-805FA47C 005AD0 004C+00 1/1 0/0 0/0 .text s_objgbdel_sub__FPvPv */ -static void* s_objgbdel_sub(void* param_1, void* param_2) { - if (fopAc_IsActor(param_1) && fopAcM_GetName(param_1) == 45) { - fopAcM_delete((fopAc_ac_c*)param_1); +static void* s_objgbdel_sub(void* i_actor, void* i_data) { + if (fopAc_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_OBJ_GB) { + fopAcM_delete((fopAc_ac_c*)i_actor); } + return NULL; } /* 805FA47C-805FA758 005B1C 02DC+00 1/1 0/0 0/0 .text h_damage_check__FP11b_gnd_class */ static void h_damage_check(b_gnd_class* i_this) { - // NONMATCHING - BOOL bVar1; fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; - daPy_py_c* player = daPy_getPlayerActorClass(); - u16 uVar1; - cXyz local_44; - cXyz cStack_38; - cXyz local_2c; - i_this->field_0x1654.Move(); - if (i_this->field_0x0c58 == 0) { - mant_class* mantActor = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); - bVar1 = FALSE; + daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); + + i_this->mGndCcStts.Move(); + + if (i_this->mDamageInvulnerabilityTimer == 0) { + mant_class* mant_p = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); + BOOL var_r27 = FALSE; + for (int i = 0; i < 3; i++) { - if (i_this->field_0x1690[i].ChkTgHit()) { - i_this->mAtInfo.mpCollider = i_this->field_0x1690[i].GetTgHitObj(); + if (i_this->mGndSph[i].ChkTgHit()) { + i_this->mAtInfo.mpCollider = i_this->mGndSph[i].GetTgHitObj(); cc_at_check(a_this, &i_this->mAtInfo); - i_this->field_0x0c58 = 10; + i_this->mDamageInvulnerabilityTimer = 10; + + OS_REPORT(" GND AP %d\n", i_this->mAtInfo.mAttackPower); + OS_REPORT(" GND HP2 %d\n", i_this->health); + if (i_this->field_0x1e08 != 0) { - i_this->field_0x1e0a += 1; - mantActor->field_0x3967 = 1;; - i_this->field_0x0c58 = 30; + i_this->field_0x1e0a++; + mant_p->field_0x3967 = 1; + i_this->mDamageInvulnerabilityTimer = 30; + if (i_this->health <= 0) { - i_this->mActionID = ACTION_HEND; - i_this->field_0x05bc = 0; + i_this->mActionMode = ACTION_HEND; + i_this->mMoveMode = 0; fpcM_Search(s_fkdel_sub, i_this); i_this->field_0x1e0a = 0; } else { - i_this->field_0x05bc = 11; + i_this->mMoveMode = 11; + OS_REPORT(" GND PIYO DAM %d\n", i_this->field_0x1e0a); } - bVar1 = true; + var_r27 = true; break; } - if ((u32)i_this->mAtInfo.mpCollider->GetObjTg().getRPrm() == 4) { + if (((dCcD_GObjInf*)i_this->mAtInfo.mpCollider)->GetAtMtrl() == dCcD_MTRL_LIGHT) { + OS_REPORT(" GND LIGHT HITL\n"); if (i_this->field_0x1e0f == 1) { i_this->field_0x1e0f = 0; i_this->field_0x1e10 = 0.0f; } - i_this->mActionID = ACTION_HRUN_A; - i_this->field_0x05bc = 7; - bVar1 = true; + i_this->mActionMode = ACTION_HRUN_A; + i_this->mMoveMode = 7; + var_r27 = true; break; } } } - if (!bVar1) { + if (!var_r27) { for (int i = 0; i < 2; i++) { - if (i_this->field_0x1690[i].ChkTgHit()) { - i_this->mAtInfo.mpCollider = i_this->field_0x1690[i].GetTgHitObj(); - i_this->field_0x1690[i].ClrTgHit(); - if (i_this->field_0x1fc4 != 0 && i_this->field_0x1e08 == 0 && - (u32)i_this->mAtInfo.mpCollider->GetObjTg().getRPrm() == 4) { - i_this->field_0x0c58 = 10; - if (i_this->field_0x1e0f == 1) { - i_this->field_0x1e0f = 0; - i_this->field_0x1e10 = 0.0f; - } + if (i_this->mHorseBodySph[i].ChkTgHit()) { + i_this->mAtInfo.mpCollider = i_this->mHorseBodySph[i].GetTgHitObj(); + i_this->mHorseBodySph[i].ClrTgHit(); - i_this->mActionID = ACTION_HRUN_A; - i_this->field_0x05bc = 7; - bVar1 = true; - break; + if (i_this->mDrawHorse && i_this->field_0x1e08 == 0 && ((dCcD_GObjInf*)i_this->mAtInfo.mpCollider)->GetAtMtrl() == dCcD_MTRL_LIGHT) { + OS_REPORT(" HGND LIGHT HITL 2\n"); + i_this->mDamageInvulnerabilityTimer = 10; + if (i_this->field_0x1e0f == 1) { + i_this->field_0x1e0f = 0; + i_this->field_0x1e10 = 0.0f; } + + i_this->mActionMode = ACTION_HRUN_A; + i_this->mMoveMode = 7; + var_r27 = true; + break; + } } } } - if (bVar1) { - local_2c.x = 1.0f; - local_2c.y = 1.0f; - local_2c.z = 1.0f; + if (var_r27) { + cXyz sp34(1.0f, 1.0f, 1.0f); + u16 sp8; if (i_this->mAtInfo.mHitStatus != 0) { - uVar1 = 3; + sp8 = 3; } else { - uVar1 = 1; + sp8 = 1; } - PSMTXCopy(i_this->mpModelMorf->getModel()->getAnmMtx(2), *calc_mtx); - local_44.x = cM_rndFX(10.0f); - local_44.y = cM_rndFX(10.0f) + 50.0f; - local_44.z = cM_rndFX(10.0f); - MtxPosition(&local_44, &cStack_38); - dComIfGp_setHitMark(uVar1, a_this, &cStack_38, NULL, &local_2c, 0); + cXyz sp28; + cXyz sp1C; + MTXCopy(i_this->mpModelMorf->getModel()->getAnmMtx(2), *calc_mtx); + sp1C.x = cM_rndFX(10.0f); + sp1C.y = cM_rndFX(10.0f) + 50.0f; + sp1C.z = cM_rndFX(10.0f); + MtxPosition(&sp1C, &sp28); + dComIfGp_setHitMark(sp8, a_this, &sp28, NULL, &sp34, 0); } } } /* 805FA758-805FAFF0 005DF8 0898+00 2/1 0/0 0/0 .text action__FP11b_gnd_class */ static void action(b_gnd_class* i_this) { - // NONMATCHING - base_process_class* process; - cXyz local_80; - cXyz local_74; - cXyz local_50; - f32 local_4c; - f32 local_48; - daAlink_c* player = daAlink_getAlinkActorClass(); - char cVar1; - f32 fVar13; - s16 sVar4; - s16 sVar5; - BOOL isMasterSwordEquipped; fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; - cXyz cStack_5c; - cXyz cStack_68; + daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); + cXyz sp88; + cXyz sp7C; + + i_this->mPlayerDistXZ = fopAcM_searchPlayerDistanceXZ(a_this); + i_this->mPlayerAngleY = fopAcM_searchPlayerAngleY(a_this); - i_this->field_0x0c38 = fopAcM_searchPlayerDistanceXZ(a_this); - i_this->field_0x0c3c = fopAcM_searchPlayerAngleY(a_this); if (i_this->field_0x1e08 != 0) { - i_this->field_0x1e08 -= 1; + i_this->field_0x1e08--; } - int iVar1 = 1; - BOOL bVar9 = FALSE; - int iVar11 = i_this->field_0x0c3c; - BOOL bVar1 = TRUE; + BOOL attn_on = TRUE; + BOOL snd_link_search = TRUE; + BOOL can_hjump = FALSE; + BOOL sp38 = FALSE; + BOOL sp34 = TRUE; - i_this->field_0x0c7d = 1; + i_this->field_0xc7d = 1; i_this->field_0x2740 = 0; - switch (i_this->mActionID) { - case ACTION_HWAIT_1: - b_gnd_h_wait(i_this); - break; - case ACTION_HWAIT_2: - b_gnd_h_wait2(i_this); - break; - case ACTION_HRUN_A: - b_gnd_h_run_a(i_this); - isMasterSwordEquipped = true; - break; - case ACTION_HRUN_P: - b_gnd_h_run_p(i_this); - isMasterSwordEquipped = true; - break; - case ACTION_HJUMP: - b_gnd_h_jump(i_this); - break; - case ACTION_HEND: - b_gnd_h_end(i_this); - bVar1 = FALSE; - iVar1 = 0; - i_this->field_0x0c7d = 0; - break; - case ACTION_WAIT: - b_gnd_g_wait(i_this); - iVar11 = 1; - break; - case ACTION_ATTACK: - iVar11 = b_gnd_g_attack(i_this); - break; - case ACTION_DEFENCE: - b_gnd_g_defence(i_this); - break; - case ACTION_JUMP: - iVar1 = b_gnd_g_jump(i_this); - bVar1 = FALSE; - break; - case ACTION_SIDE: - b_gnd_g_side(i_this); - bVar1 = FALSE; - break; - case ACTION_TUBA: - b_gnd_g_tuba(i_this); - break; - case ACTION_DAMAGE: - b_gnd_g_damage(i_this); - i_this->field_0x0c7d = 0; - break; - case ACTION_DOWN: - b_gnd_g_down(i_this); - bVar1 = FALSE; - i_this->field_0x0c7d = 0; - break; - case ACTION_END: - b_gnd_g_end(i_this); - bVar1 = FALSE; - i_this->field_0x0c7d = 0; + switch (i_this->mActionMode) { + case ACTION_HWAIT_1: + b_gnd_h_wait(i_this); + break; + case ACTION_HWAIT_2: + b_gnd_h_wait2(i_this); + break; + case ACTION_HRUN_A: + b_gnd_h_run_a(i_this); + can_hjump = true; + break; + case ACTION_HRUN_P: + b_gnd_h_run_p(i_this); + can_hjump = true; + break; + case ACTION_HJUMP: + b_gnd_h_jump(i_this); + break; + case ACTION_HEND: + b_gnd_h_end(i_this); + sp34 = FALSE; + attn_on = FALSE; + i_this->field_0xc7d = 0; + break; + case ACTION_WAIT: + b_gnd_g_wait(i_this); + sp38 = TRUE; + break; + case ACTION_ATTACK: + sp38 = b_gnd_g_attack(i_this); + break; + case ACTION_DEFENCE: + b_gnd_g_defence(i_this); + break; + case ACTION_JUMP: + attn_on = b_gnd_g_jump(i_this); + sp34 = FALSE; + break; + case ACTION_SIDE: + b_gnd_g_side(i_this); + sp34 = FALSE; + break; + case ACTION_TUBA: + b_gnd_g_tuba(i_this); + break; + case ACTION_DAMAGE: + b_gnd_g_damage(i_this); + i_this->field_0xc7d = 0; + break; + case ACTION_DOWN: + b_gnd_g_down(i_this); + sp34 = FALSE; + i_this->field_0xc7d = 0; + break; + case ACTION_END: + b_gnd_g_end(i_this); + sp34 = FALSE; + i_this->field_0xc7d = 0; } - i_this->mZ2Creature.setLinkSearch(true); - if (iVar1 != 0) { +#ifdef DEBUG + if (mDoCPd_c::getTrigR(PAD_2)) { + dScnKy_env_light_c* kankyo = dKy_getEnvlight(); + kankyo->field_0x12cc = 1; + + i_this->mActionMode = ACTION_WAIT; + i_this->mMoveMode = 0; + i_this->mDrawHorse = FALSE; + i_this->speedF = 0.0f; + + mant_class* mant_p = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); + mant_p->unk3971 = 1; + + h_anm_init(i_this, B_HG_BCK_HG_DOWN, 3.0f, 0, 1.0f); + if (daPy_getPlayerActorClass()->checkHorseRide()) { + i_this->mDemoCamMode = 90; + } + + fpcM_Search(s_fkdel_sub, i_this); + i_this->health = 100; + i_this->field_0x1e0a = 0; + i_this->shape_angle.z = 0; + i_this->shape_angle.x = 0; + i_this->current.angle.z = 0; + i_this->current.angle.x = 0; + + Z2GetAudioMgr()->bgmStart(Z2BGM_VS_GANON_04, 0, 0); + dComIfGs_onOneZoneSwitch(15, -1); + dComIfGs_onSaveDunSwitch(1); + } + + if (mDoCPd_c::getTrigZ(PAD_2)) { + i_this->mActionMode = ACTION_HEND; + i_this->mMoveMode = 0; + i_this->mDrawHorse = TRUE; + fpcM_Search(s_fkdel_sub, i_this); + } +#endif + + if (snd_link_search) { + i_this->mGndSound.setLinkSearch(true); + } else { + i_this->mGndSound.setLinkSearch(false); + } + + if (attn_on) { fopAcM_OnStatus(i_this, 0); i_this->attention_info.flags = 4; } else { @@ -2997,146 +2602,136 @@ static void action(b_gnd_class* i_this) { i_this->attention_info.flags = 0; } - if (i_this->field_0x1fc4 != 0) { - if (isMasterSwordEquipped && saku_jump_check(i_this) != 0) { - i_this->field_0x0b00 = i_this->mActionID; - i_this->mActionID = ACTION_HJUMP; - i_this->field_0x05bc = 0; - } else { - if (!isMasterSwordEquipped) { - i_this->field_0x0c58 = 10; - } - - if (i_this->field_0x0c5a != 0) { - iVar11 = 0; - } - - if (iVar1 != 0) { - process = fpcM_Search(shot_s_sub, i_this); - cVar1 = process != NULL; - if (daPy_getPlayerActorClass()->checkHookshotShootReturnMode() && !daPy_getPlayerActorClass()->checkHookshotShootReturnMode()) { - cVar1 = 2; - } - - cXyz* ironBallCenterPos = player->getIronBallCenterPos(); - if (ironBallCenterPos) { - cStack_5c = player->current.pos - *ironBallCenterPos; - if (300.0f < cStack_5c.abs()) { - // cStack_68 = player->current.pos - *ironBallCenterPos; - if (cStack_5c.abs() < 400.0f && dComIfGp_checkPlayerStatus0(0, 0x400) == 0 && - (!daPy_getPlayerActorClass()->checkIronBallReturn() && !daPy_getPlayerActorClass()->checkIronBallGroundStop())) { - cVar1 = 2; - } - } - } - - fVar13 = 0.0f; - daPy_py_c::CutType cutType; - if (cutType == daPy_py_c::CUT_TYPE_LARGE_TURN_RIGHT || cutType == daPy_py_c::CUT_TYPE_LARGE_TURN_LEFT) { - fVar13 = 150.0f; - } - - int uVar6; - if (cc_pl_cut_bit_get() == 0) { - uVar6 = daPy_getPlayerActorClass()->getCutType(); - } - - if (uVar6 == 0x400 || (uVar6 == 0x100 && (5.0f < player->speed.y))) { - uVar6 = 0; - } - - if (!fopAcM_plAngleCheck(i_this, 0x4000)) { - uVar6 = 0; - } - - if (!daPy_py_c::checkMasterSwordEquip()) { - uVar6 = 0; - } - - if ((uVar6 != 0 || cVar1 != 0) && (cVar1 != 0 || i_this->field_0x0c38 < fVar13 + 380.0f)) { - if (cVar1 == 2 || (cVar1 == 1 && cM_rndF(1.0f) < 0.5f) || uVar6 == 0x100) { - if ((cVar1 != 2 || i_this->field_0x0c38 < 700.0f) || 0.5f < cM_rndF(1.0f)) { - i_this->mActionID = ACTION_JUMP; - i_this->field_0x05bc = 0; - } else { - i_this->mActionID = ACTION_SIDE; - i_this->field_0x05bc = 0; - i_this->field_0x0c58 = 15; - } - } else { - i_this->mActionID = ACTION_DEFENCE; - i_this->field_0x05bc = 0; - i_this->field_0x0c58 = 15; - i_this->field_0x0c79 = 1; - } - } - } - } - } - - sVar4 = 0; - sVar5 = 0; - if (i_this->field_0x0c7d != 0) { - if (i_this->field_0x0c7d == 1) { - // local_74 = player->eyePos - i_this->current.pos; - local_50 = player->eyePos - i_this->current.pos; - } else { - // local_80 = i_this->field_0x0c80 - i_this->current.pos; - local_50 = i_this->field_0x0c80 - i_this->current.pos; - } - - if (i_this->field_0x1fc4 != 0) { - local_50.y += -450.0f; - } else { - local_50.y += -200.0f; - } - - sVar4 = cM_atan2s(local_50.x, local_50.z) - i_this->shape_angle.y; - sVar5 = i_this->shape_angle.x + cM_atan2s(local_50.y, JMAFastSqrt(local_50.x * local_50.x + local_50.z * local_50.z)); - if (sVar4 > 0x2af8) { - sVar4 = 11000; - } else if (sVar4 < -11000) { - sVar4 = -11000; - } - - if (sVar5 > 0xbb8) { - sVar5 = 3000; - } else if (sVar5 < -3000) { - sVar5 = -3000; - } - } - - cLib_addCalcAngleS2(&i_this->field_0x0c8c, sVar4, 2, 0x1000); - cLib_addCalcAngleS2(&i_this->field_0x0c8e, sVar5, 2, 0x1000); - - if (bVar1) { - cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->current.angle.y, 2, 0x1000); - } - - if (i_this->field_0x0c70 != 0) { - i_this->field_0x0c70 += -1; - i_this->field_0x0c6c = i_this->field_0x0c70; - if (i_this->field_0x0c6c > 7.0f) { - i_this->field_0x0c6c = 0.0f; + if (i_this->mDrawHorse) { + if (can_hjump && saku_jump_check(i_this)) { + i_this->field_0xb00 = i_this->mActionMode; + i_this->mActionMode = ACTION_HJUMP; + i_this->mMoveMode = 0; } } else { - i_this->field_0x0c6c = 0.0f; - i_this->field_0x0c70 = cM_rndF(200.0f) + 200.0f; + if (!daPy_py_c::checkMasterSwordEquip()) { + i_this->mDamageInvulnerabilityTimer = 10; + } + + if (i_this->field_0xc5a != 0) { + sp38 = FALSE; + } + + if (sp38) { + int sp28 = fpcM_Search(shot_s_sub, i_this) != NULL; + if (daPy_getPlayerActorClass()->checkHookshotShootReturnMode() && !daPy_getPlayerActorClass()->checkHookshotReturnMode()) { + sp28 = 2; + } + + cXyz* ironball_pos = player->getIronBallCenterPos(); + if (ironball_pos != NULL && (player->current.pos - *ironball_pos).abs() > 300.0f && (a_this->current.pos - *ironball_pos).abs() < 400.0f && !dComIfGp_checkPlayerStatus0(0, 0x400) && !daPy_getPlayerActorClass()->checkIronBallReturn() && !daPy_getPlayerActorClass()->checkIronBallGroundStop()) { + sp28 = 2; + } + + f32 pl_at_check_range = 0.0f; + if (daPy_getPlayerActorClass()->getCutType() == daPy_py_c::CUT_TYPE_LARGE_TURN_RIGHT || daPy_getPlayerActorClass()->getCutType() == daPy_py_c::CUT_TYPE_LARGE_TURN_LEFT) { + pl_at_check_range = 150.0f; + } + + int cut_type = cc_pl_cut_bit_get(); + if (cut_type == 0) { + cut_type = daPy_getPlayerActorClass()->getCutType(); + } + + if (cut_type == 0x400 || (cut_type == 0x100 && player->speed.y > 5.0f)) { + cut_type = 0; + } + + if (!fopAcM_plAngleCheck(a_this, 0x4000)) { + cut_type = 0; + } + + if (!daPy_py_c::checkMasterSwordEquip()) { + cut_type = 0; + } + + if ((cut_type != 0 || sp28 != 0) && (sp28 != 0 || i_this->mPlayerDistXZ < pl_at_check_range + 380.0f)) { + if (sp28 == 2 || (sp28 == 1 && cM_rndF(1.0f) < 0.5f) || cut_type == 0x100) { + if (sp28 == 2 && i_this->mPlayerDistXZ > 700.0f && cM_rndF(1.0f) < 0.5f) { + i_this->mActionMode = ACTION_JUMP; + i_this->mMoveMode = 0; + } else { + i_this->mActionMode = ACTION_SIDE; + i_this->mMoveMode = 0; + i_this->mDamageInvulnerabilityTimer = 15; + } + } else { + i_this->mActionMode = ACTION_DEFENCE; + i_this->mMoveMode = 0; + i_this->mDamageInvulnerabilityTimer = 15; + i_this->field_0xc79 = 1; + } + } + } } - cLib_addCalcAngleS2(&i_this->field_0x26c0, i_this->field_0x26c2, 2, 0x600); + s16 sp14 = 0; + s16 sp12 = 0; + s16 sp10 = 0x1000; + if (i_this->field_0xc7d != 0) { + if (i_this->field_0xc7d == 1) { + sp88 = player->eyePos - a_this->current.pos; + } else { + sp88 = i_this->field_0xc80 - a_this->current.pos; + } + + if (i_this->mDrawHorse) { + sp88.y += -450.0f; + } else { + sp88.y += -200.0f; + } + + sp14 = cM_atan2s(sp88.x, sp88.z) - a_this->shape_angle.y; + sp12 = a_this->shape_angle.x + cM_atan2s(sp88.y, JMAFastSqrt(sp88.x * sp88.x + sp88.z * sp88.z)); + if (sp14 > 11000) { + sp14 = 11000; + } else if (sp14 < -11000) { + sp14 = -11000; + } + + if (sp12 > 3000) { + sp12 = 3000; + } else if (sp12 < -3000) { + sp12 = -3000; + } + } + + cLib_addCalcAngleS2(&i_this->mGndBodyRotX, sp14, 2, sp10); + cLib_addCalcAngleS2(&i_this->mGndHeadRotZ, sp12, 2, sp10); + + if (sp34) { + cLib_addCalcAngleS2(&a_this->shape_angle.y, a_this->current.angle.y, 2, 0x1000); + } + + if (i_this->field_0xc70 != 0) { + i_this->field_0xc70--; + i_this->field_0xc6c = i_this->field_0xc70; + if (i_this->field_0xc6c > 7.0f) { + i_this->field_0xc6c = 0.0f; + } + } else { + i_this->field_0xc6c = 0.0f; + i_this->field_0xc70 = cM_rndF(200.0f) + 200.0f; + } + + cLib_addCalcAngleS2(&i_this->mGndLegRotX, i_this->field_0x26c2, 2, 0x600); i_this->field_0x26c2 = 0; } /* 805FAFF0-805FB0F0 006690 0100+00 1/1 0/0 0/0 .text ball_bg_check__FP11b_gnd_classi */ -static BOOL ball_bg_check(b_gnd_class* i_this, int param_1) { - // NONMATCHING +static BOOL ball_bg_check(b_gnd_class* i_this, int i_no) { cXyz start; cXyz end; + cXyz sp2C; dBgS_LinChk linChk; - start = i_this->field_0x1e5c[0]; - end = i_this->field_0x1e5c[0] + ((i_this->field_0x1e5c[0] - i_this->field_0x1e98[1]) * 2.0f); + start = i_this->mLightBallPos[i_no]; + end = i_this->mLightBallPos[i_no] + ((i_this->mLightBallPos[i_no] - i_this->field_0x1e98[i_no]) * 2.0f); linChk.Set(&start, &end, i_this); if (dComIfG_Bgsp().LineCross(&linChk)) { @@ -3146,2046 +2741,1856 @@ static BOOL ball_bg_check(b_gnd_class* i_this, int param_1) { return FALSE; } -/* ############################################################################################## */ -// /* 806027A8-806027AC 000144 0004+00 0/0 0/0 0/0 .rodata @6508 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_6508 = 380.0f; -// COMPILER_STRIP_GATE(0x806027A8, &lit_6508); -// #pragma pop - -// /* 806027AC-806027B0 000148 0004+00 0/0 0/0 0/0 .rodata @6509 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_6509 = -450.0f; -// COMPILER_STRIP_GATE(0x806027AC, &lit_6509); -// #pragma pop - -// /* 806027B0-806027B4 00014C 0004+00 0/2 0/0 0/0 .rodata @6510 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_6510 = 7.0f; -// COMPILER_STRIP_GATE(0x806027B0, &lit_6510); -// #pragma pop - -// /* 806027B4-806027B8 000150 0004+00 0/1 0/0 0/0 .rodata @6631 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_6631 = 2.0f / 5.0f; -// COMPILER_STRIP_GATE(0x806027B4, &lit_6631); -// #pragma pop - /* 805FB0F0-805FB414 006790 0324+00 1/1 0/0 0/0 .text himo_control1__FP11b_gnd_classP4cXyziSc */ static void himo_control1(b_gnd_class* i_this, cXyz* param_2, int param_3, s8 param_4) { - // NONMATCHING - int i; - s16 iVar3; - s16 iVar2; - g_himo_s* pgVar5; - cXyz* pcVar4; - cXyz local_8c; - cXyz local_98; + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + cXyz sp60; + cXyz sp54; - pgVar5 = &i_this->field_0x1ff0[param_3]; - pgVar5->field_0x0[0] = *param_2; - cXyz local_a4; + int i; + s16 sp10; + s16 spE; - cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); - cMtx_XrotM(*calc_mtx, i_this->shape_angle.x); + cXyz* var_r30 = i_this->field_0x1ff0[param_3].field_0x0; + var_r30[0] = *param_2; - local_8c.x = 20.0f; + cXyz sp48; + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + cMtx_XrotM(*calc_mtx, a_this->shape_angle.x); + + sp60.x = 20.0f; if (param_3 == 0) { - local_8c.x *= -1.0f; + sp60.x *= -1.0f; } - local_8c.y = 0.0f; - local_8c.z = 0.0f; - MtxPosition(&local_8c, &local_a4); - cXyz local_b0, local_bc, local_c8; + sp60.y = 0.0f; + sp60.z = 0.0f; + MtxPosition(&sp60, &sp48); - local_8c.x = 0.0f; - local_8c.y = i_this->field_0x1fd0; - local_8c.z = local_8c.y; - MtxPosition(&local_8c, &local_bc); + cXyz sp3C; + cXyz sp30; + cXyz sp24; - if (i_this->speedF > 20.0f) { - local_8c.x = i_this->field_0x1fd0 * 0.4f; + sp60.x = 0.0f; + sp60.y = i_this->field_0x1fd0; + sp60.z = sp60.y; + MtxPosition(&sp60, &sp30); + + if (a_this->speedF > 20.0f) { + sp60.x = i_this->field_0x1fd0 * 0.4f; } else { - local_8c.x = i_this->field_0x1fd0 * 0.1f; + sp60.x = i_this->field_0x1fd0 * 0.1f; } if (param_3 == 0) { - local_8c.x *= -1.0f; + sp60.x *= -1.0f; } - local_8c.y = 0.0f; - local_8c.z = 0.0f; - MtxPosition(&local_8c, &local_c8); + sp60.y = 0.0f; + sp60.z = 0.0f; + MtxPosition(&sp60, &sp24); - local_8c.x = 0.0f; - local_8c.y = 0.0f; + sp60.x = 0.0f; + sp60.y = 0.0f; if (param_4 != 0) { - local_8c.z = 15.0f; + sp60.z = 15.0f; } else { - local_8c.z = 20.0f; + sp60.z = 20.0f; } - - for (i = 1, pcVar4 = &pgVar5->field_0x0[1] ; i < 16; i++, pcVar4++) { - local_b0.x = local_bc.x * cM_ssin(i_this->field_0x1fd4 + i * 6000); - local_b0.y = local_bc.y * cM_ssin(i_this->field_0x1fd4 + i * 6000); - local_b0.z = local_bc.z * cM_ssin(i_this->field_0x1fd4 + i * 6000); - f32 deltaX = pcVar4[0].x - pcVar4[-1].x; - f32 deltaY = pcVar4[0].y - pcVar4[-1].y - 20.0f; - f32 deltaZ = pcVar4[0].z - pcVar4[-1].z; - - f32 x = deltaX + (local_a4.x * 2.0f) + local_b0.x + local_c8.x; - f32 y = local_b0.y + deltaY; - f32 z = deltaZ + (local_a4.z * 2.0f) + local_b0.z + local_c8.z; - - iVar2 = (s16)cM_atan2s(x, z); - iVar3 = -cM_atan2s(y, JMAFastSqrt(x * x + z * z)); + i = 1; + cXyz* var_r30_2 = var_r30 + 1; + for (; i < 16; i++, var_r30_2++) { + sp3C.x = sp30.x * cM_ssin(i_this->field_0x1fd4 + i * 6000); + sp3C.y = sp30.y * cM_ssin(i_this->field_0x1fd4 + i * 6000); + sp3C.z = sp30.z * cM_ssin(i_this->field_0x1fd4 + i * 6000); - cMtx_YrotS(*calc_mtx, iVar2); - cMtx_XrotM(*calc_mtx, iVar3); - MtxPosition(&local_8c, &local_98); + f32 var_f29 = 1.0f; + f32 var_f31 = sp24.x + (sp3C.x + ((var_r30_2[0].x - var_r30_2[-1].x) + (sp48.x * var_f29))); + f32 var_f28 = sp3C.y + ((var_r30_2[0].y - var_r30_2[-1].y) - 20.0f); + f32 var_f30 = sp24.z + (sp3C.z + ((var_r30_2[0].z - var_r30_2[-1].z) + (sp48.z * var_f29))); - pcVar4[0].x = pcVar4[-1].x + local_98.x; - pcVar4[0].y = pcVar4[-1].y + local_98.y; - pcVar4[0].z = pcVar4[-1].z + local_98.z; + spE = (s16)cM_atan2s(var_f31, var_f30); + sp10 = -cM_atan2s(var_f28, JMAFastSqrt(var_f31 * var_f31 + var_f30 * var_f30)); + + cMtx_YrotS(*calc_mtx, spE); + cMtx_XrotM(*calc_mtx, sp10); + MtxPosition(&sp60, &sp54); + + var_r30_2[0].x = var_r30_2[-1].x + sp54.x; + var_r30_2[0].y = var_r30_2[-1].y + sp54.y; + var_r30_2[0].z = var_r30_2[-1].z + sp54.z; } } /* 805FB414-805FB620 006AB4 020C+00 1/1 0/0 0/0 .text himo_control2__FP11b_gnd_classP4cXyziSc */ static void himo_control2(b_gnd_class* i_this, cXyz* param_2, int param_3, s8 param_4) { - // NONMATCHING - f32 fVar1; - f32 fVar2; - f32 fVar3; - cXyz *pcVar6; - g_himo_s *pgVar7; - cXyz local_88; - cXyz local_7c; + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + cXyz sp30; + cXyz sp24; - pgVar7 = &i_this->field_0x1ff0[param_3]; - pgVar7->field_0x0[15].x = param_2->x; - pgVar7->field_0x0[15].y = param_2->y; - pgVar7->field_0x0[15].z = param_2->z; - local_7c.x = 0.0f; - local_7c.y = 0.0f; - if (param_4 == 0) { - local_7c.z = 20.0f; + int i; + s16 sp10; + s16 spE; + g_himo_s* sp1C = &i_this->field_0x1ff0[param_3]; + cXyz* temp_r31 = &sp1C->field_0x0[15]; + *temp_r31 = *param_2; + + sp30.x = 0.0f; + sp30.y = 0.0f; + + if (param_4 != 0) { + sp30.z = 15.0f; } else { - local_7c.z = 15.0f; - } - pcVar6 = &pgVar7->field_0x0[14]; - - for (int i = 14; i > 0; i--) { - fVar3 = pcVar6->x - pcVar6[3].x; - fVar1 = pcVar6->y; - fVar2 = pcVar6[1].y; - f32 x = pcVar6->z - pcVar6[1].z; - u32 iVar4 = cM_atan2s(fVar3, x); - fVar3 = JMAFastSqrt(fVar3 * fVar3 + x * x); - u32 iVar5 = cM_atan2s(fVar1 - fVar2, fVar3); - cMtx_YrotS(*calc_mtx, iVar4); - cMtx_XrotM(*calc_mtx, iVar5); - MtxPosition(&local_88, &local_7c); - - pcVar6->x = pcVar6[1].x + local_88.x; - pcVar6->y = pcVar6[1].y + local_88.y; - fVar1 = pcVar6[1].z; - pcVar6->z = fVar1 + local_88.z; + sp30.z = 20.0f; } - pcVar6 = i_this->field_0x2170[param_3].getPos(0); - for (int i = 0; i < 16; i++) { - pcVar6->x = pgVar7->field_0x0[0].x; - pcVar6->y = pgVar7->field_0x0[0].y; - pcVar6->z = pgVar7->field_0x0[0].z; - pcVar6 += 1; - pgVar7 += 1; + temp_r31--; + + for (i = 14; i >= 1; i--, temp_r31--) { + f32 temp_f31 = temp_r31[0].x - temp_r31[1].x; + f32 temp_f29 = temp_r31[0].y - temp_r31[1].y; + f32 temp_f30 = temp_r31[0].z - temp_r31[1].z; + spE = (s16)cM_atan2s(temp_f31, temp_f30); + sp10 = -cM_atan2s(temp_f29, JMAFastSqrt((temp_f31 * temp_f31) + (temp_f30 * temp_f30))); + + cMtx_YrotS(*calc_mtx, spE); + cMtx_XrotM(*calc_mtx, sp10); + MtxPosition(&sp30, &sp24); + + temp_r31[0].x = temp_r31[1].x + sp24.x; + temp_r31[0].y = temp_r31[1].y + sp24.y; + temp_r31[0].z = temp_r31[1].z + sp24.z; } - pcVar6 = i_this->field_0x2170[param_3].getPos(0); - pcVar6[param_3].x = i_this->field_0x1ff0[param_3].field_0x0[15].x; - pcVar6[param_3].y = i_this->field_0x1ff0[param_3].field_0x0[15].y; - pcVar6[param_3].z = i_this->field_0x1ff0[param_3].field_0x0[15].z; + temp_r31 = sp1C->field_0x0; + cXyz* var_r29 = i_this->mHorseReins[param_3].getPos(0); + for (int i = 0; i < 16; i++, var_r29++, temp_r31++) { + *var_r29 = *temp_r31; + } + + var_r29 = i_this->field_0x21e8.getPos(0); + var_r29[param_3] = i_this->field_0x1ff0[param_3].field_0x0[15]; } /* 805FB620-805FB704 006CC0 00E4+00 1/1 0/0 0/0 .text cam_3d_morf__FP11b_gnd_classf */ static void cam_3d_morf(b_gnd_class* i_this, f32 i_scale) { - cLib_addCalc2(&i_this->field_0x26d4.x, i_this->field_0x26ec.x, i_scale, i_this->field_0x2704.x * i_this->field_0x2710.y); - cLib_addCalc2(&i_this->field_0x26d4.y, i_this->field_0x26ec.y, i_scale, i_this->field_0x2704.y * i_this->field_0x2710.y); - cLib_addCalc2(&i_this->field_0x26d4.z, i_this->field_0x26ec.z, i_scale, i_this->field_0x2704.z * i_this->field_0x2710.y); + cLib_addCalc2(&i_this->mDemoCamCenter.x, i_this->mDemoCamCenterTarget.x, i_scale, i_this->mDemoCamCenterSpd.x * i_this->field_0x2710.y); + cLib_addCalc2(&i_this->mDemoCamCenter.y, i_this->mDemoCamCenterTarget.y, i_scale, i_this->mDemoCamCenterSpd.y * i_this->field_0x2710.y); + cLib_addCalc2(&i_this->mDemoCamCenter.z, i_this->mDemoCamCenterTarget.z, i_scale, i_this->mDemoCamCenterSpd.z * i_this->field_0x2710.y); - cLib_addCalc2(&i_this->field_0x26c8.x, i_this->field_0x26e0.x, i_scale, i_this->field_0x26f8.x * i_this->field_0x2710.y); - cLib_addCalc2(&i_this->field_0x26c8.y, i_this->field_0x26e0.y, i_scale, i_this->field_0x26f8.y * i_this->field_0x2710.y); - cLib_addCalc2(&i_this->field_0x26c8.z, i_this->field_0x26e0.z, i_scale, i_this->field_0x26f8.z * i_this->field_0x2710.y); + cLib_addCalc2(&i_this->mDemoCamEye.x, i_this->mDemoCamEyeTarget.x, i_scale, i_this->mDemoCamEyeSpd.x * i_this->field_0x2710.y); + cLib_addCalc2(&i_this->mDemoCamEye.y, i_this->mDemoCamEyeTarget.y, i_scale, i_this->mDemoCamEyeSpd.y * i_this->field_0x2710.y); + cLib_addCalc2(&i_this->mDemoCamEye.z, i_this->mDemoCamEyeTarget.z, i_scale, i_this->mDemoCamEyeSpd.z * i_this->field_0x2710.y); } /* 805FB704-805FB7A4 006DA4 00A0+00 1/1 0/0 0/0 .text cam_spd_set__FP11b_gnd_class */ static void cam_spd_set(b_gnd_class* i_this) { - i_this->field_0x26f8.x = fabsf(i_this->field_0x26e0.x - i_this->field_0x26c8.x); - i_this->field_0x26f8.y = fabsf(i_this->field_0x26e0.y - i_this->field_0x26c8.y); - i_this->field_0x26f8.z = fabsf(i_this->field_0x26e0.z - i_this->field_0x26c8.z); + i_this->mDemoCamEyeSpd.x = fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x); + i_this->mDemoCamEyeSpd.y = fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y); + i_this->mDemoCamEyeSpd.z = fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z); - i_this->field_0x2704.x = fabsf(i_this->field_0x26ec.x - i_this->field_0x26d4.x); - i_this->field_0x2704.y = fabsf(i_this->field_0x26ec.y - i_this->field_0x26d4.y); - i_this->field_0x2704.z = fabsf(i_this->field_0x26ec.z - i_this->field_0x26d4.z); + i_this->mDemoCamCenterSpd.x = fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x); + i_this->mDemoCamCenterSpd.y = fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y); + i_this->mDemoCamCenterSpd.z = fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z); i_this->field_0x2710.y = 0.0f; } /* 805FB7A4-805FDAE0 006E44 233C+00 2/1 0/0 0/0 .text demo_camera__FP11b_gnd_class */ static void demo_camera(b_gnd_class* i_this) { - // NONMATCHING - static u8 e_name_6757[4] = { - 0x8B, 0x9B, 0x8B, 0x9C, - }; - static u8 e_name_6846[4] = { - 0x8B, 0x98, 0x8B, 0x99, - }; - - BOOL bVar3; - u32 uVar7; - f32 rndF32; - cXyz cStack_c4; - cXyz cStack_b8; - cXyz cStack_ac; - cXyz local_40; - cXyz local_4c; - cXyz cStack_58; - cXyz local_64; - cXyz cStack_94; - cXyz cStack_7c; - cXyz cStack_88; - fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; daPy_py_c* player = (daPy_py_c *)dComIfGp_getPlayer(0); - camera_class* camera1 = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); - dComIfGp_getCamera(0); - mant_class* mantActor = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); - dScnKy_env_light_c* envLight = dKy_getEnvlight(); + camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); + camera_class* camera0 = dComIfGp_getCamera(0); + mant_class* mant_p = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); + dScnKy_env_light_c* kankyo = dKy_getEnvlight(); - daHorse_c* horseActor; - if (i_this->field_0x26c4 != 0) { - horseActor = dComIfGp_getHorseActor(); + daHorse_c* horse; + if (i_this->mDemoCamMode != 0) { + // fakematch - dComIfGp_getHorseActor() isn't getting inlined for some reason + horse = (daHorse_c*)g_dComIfG_gameInfo.play.getPlayerPtr(1); } - bVar3 = false; - switch (i_this->field_0x26c4) { - case 30: - if (i_this->eventInfo.checkCommandDemoAccrpt() == 0) { - fopAcM_orderPotentialEvent(i_this, 2, 0xffff, 0); - i_this->eventInfo.mCondition |= 2; - break; + cXyz sp114; + cXyz sp108; + cXyz spFC; + cXyz spF0; + + s8 sp8 = false; + switch (i_this->mDemoCamMode) { + case 0: + break; + case 30: + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(a_this, 2, 0xffff, 0); + a_this->eventInfo.onCondition(2); + return; + } + + camera->mCamera.Stop(); + i_this->mDemoCamMode = 31; + i_this->mDemoCamTimer = 0; + i_this->field_0x2710.x = 55.0f; + + horse->changeOriginalDemo(); + player->changeOriginalDemo(); + camera->mCamera.SetTrimSize(3); + + sp108 = a_this->current.pos; + sp108.x -= 5000.0f; + + horse->setHorsePosAndAngle(&sp108, 1); + + i_this->mDemoCamCenterTarget.set(0.0f, 0.0f, 0.0f); + i_this->mDemoCamCenterSpd.set(0.0f, 0.0f, 0.0f); + i_this->field_0xc44[9] = 0; + Z2GetAudioMgr()->setDemoName("force_start"); + break; + case 31: + case 32: + case 33: + if (i_this->mDemoCamMode < 33) { + if (i_this->field_0xc44[9] == 0) { + i_this->field_0xc44[9] = (s16)(cM_rndF(10.0f) + 5.0f); + i_this->mDemoCamCenterSpd.x = cM_rndFX(40.0f); + i_this->mDemoCamCenterSpd.y = cM_rndFX(40.0f); + i_this->mDemoCamCenterSpd.z = cM_rndFX(40.0f); } - camera1->mCamera.Stop(); - i_this->field_0x26c4 = 31; - i_this->field_0x26c6 = 0; - i_this->field_0x2710.x = 55.0f; - horseActor->changeOriginalDemo(); - player->changeOriginalDemo(); - camera1->mCamera.SetTrimSize(3); - local_4c = i_this->current.pos; - local_4c.x -= 5000.0f; + cLib_addCalc2(&i_this->mDemoCamCenterTarget.x, i_this->mDemoCamCenterSpd.x, 0.3f, 30.0f); + cLib_addCalc2(&i_this->mDemoCamCenterTarget.y, i_this->mDemoCamCenterSpd.y, 0.3f, 30.0f); + cLib_addCalc2(&i_this->mDemoCamCenterTarget.z, i_this->mDemoCamCenterSpd.z, 0.3f, 30.0f); - horseActor->i_setHorsePosAndAngle(&local_4c, 1); + i_this->mDemoCamCenter.x = a_this->current.pos.x + i_this->mDemoCamCenterTarget.x; + i_this->mDemoCamCenter.y = a_this->current.pos.y + 300.0f + i_this->mDemoCamCenterTarget.y; + i_this->mDemoCamCenter.z = a_this->current.pos.z + i_this->mDemoCamCenterTarget.z; + } else { + i_this->mDemoCamCenter = a_this->eyePos; + } - i_this->field_0x26ec.set(0.0f, 0.0f, 0.0f); - i_this->field_0x2704.set(0.0f, 0.0f, 0.0f); - i_this->field_0x0c44[9] = 0; - Z2GetAudioMgr()->setDemoName("force_start"); - break; - case 31: - case 32: - case 33: - if (i_this->field_0x26c4 < 33) { - if (i_this->field_0x0c44[9] == 0) { - rndF32 = cM_rndF(10.0f); - i_this->field_0x0c44[9] = (s16)(rndF32 + 5.0f); - rndF32 = cM_rndFX(40.0f); - i_this->field_0x2704.x = rndF32; - rndF32 = cM_rndFX(40.0f); - i_this->field_0x2704.y = rndF32; - rndF32 = cM_rndFX(40.0f); - i_this->field_0x2704.z = rndF32; - } + cMtx_YrotS(*calc_mtx, a_this->current.angle.y); + if (i_this->mDemoCamMode == 31) { + sp114.x = 300.0f; + sp114.y = 300.0f; + sp114.z = -500.0f; + } else if (i_this->mDemoCamMode == 32) { + sp114.x = -300.0f; + sp114.y = 300.0f; + sp114.z = 400.0f; + } else if (i_this->mDemoCamMode == 33) { + sp114.x = i_this->field_0x2710.z; + sp114.y = 300.0f; + sp114.z = -1000.0f; + cLib_addCalc2(&i_this->field_0x2710.z, 100.0f, 0.1f, 5.0f); + } - cLib_addCalc2(&i_this->field_0x26ec.x, i_this->field_0x2704.x, 0.3f, 30.0f); - cLib_addCalc2(&i_this->field_0x26ec.y, i_this->field_0x2704.y, 0.3f, 30.0f); - cLib_addCalc2(&i_this->field_0x26ec.z, i_this->field_0x2704.z, 0.3f, 30.0f); + MtxPosition(&sp114, &i_this->mDemoCamEye); + i_this->mDemoCamEye += a_this->current.pos; - i_this->field_0x26d4.x = i_this->current.pos.x + i_this->field_0x26ec.x; - i_this->field_0x26d4.y = i_this->current.pos.y + 300.0f + i_this->field_0x26ec.y; - i_this->field_0x26d4.z = i_this->current.pos.z + i_this->field_0x26ec.z; - } else { - i_this->field_0x26d4 = i_this->eyePos; + if (i_this->mDemoCamMode == 33) { + if (i_this->mDemoCamTimer == 140) { + sp108.set(0.0f, 1100.0f, -2000.0f); + horse->setHorsePosAndAngle(&sp108, 0); + horse->changeDemoMode(1, 0); + player->changeDemoMode(93, 0, 0, 0); } - cMtx_YrotS(*calc_mtx, i_this->current.angle.y); - if (i_this->field_0x26c4 == 31) { - local_40.x = 300.0f; - local_40.y = 300.0f; - local_40.z = -500.0f; - } else if (i_this->field_0x26c4 == 32) { - local_40.x = -300.0f; - local_40.y = 300.0f; - local_40.z = 400.0f; - } else if (i_this->field_0x26c4 == 33) { - local_40.x = i_this->field_0x2710.z; - local_40.y = 300.0f; - local_40.z = -1000.0f; - cLib_addCalc2(&i_this->field_0x2710.z, 100.0f, 0.1f, 5.0f); + if (i_this->mDemoCamTimer == 160) { + i_this->mDemoCamMode = 35; + i_this->mDemoCamTimer = 0; + i_this->mMoveMode = 3; + Z2GetAudioMgr()->bgmStreamPrepare(0x2000063); + Z2GetAudioMgr()->bgmStreamPlay(); + } + } + break; + case 34: + if (i_this->mDemoCamTimer == 0) { + i_this->field_0x2710.z = -400.0f; + horse->changeDemoMode(8, 0); + } else { + if (i_this->mDemoCamTimer == 1) { + i_this->mDemoCamCenter = player->current.pos; + i_this->mDemoCamEye.set(200.0f, 1318.0f, -1355.0f); } - MtxPosition(&i_this->field_0x26c8, &local_40); - i_this->field_0x26c8 += i_this->current.pos; - if (i_this->field_0x26c4 == 33) { - if (i_this->field_0x26c6 == 140) { - local_4c.set(0.0f, 1100.0f, -2000.0f); - horseActor->i_setHorsePosAndAngle(&local_4c, 0); - horseActor->changeDemoMode(1, 0); - player->changeDemoMode(93, 0, 0, 0); - } + cLib_addCalc2(&i_this->mDemoCamCenter.x, player->current.pos.x, 0.2f, 50.0f); + cLib_addCalc2(&i_this->mDemoCamCenter.y, player->current.pos.y, 0.2f, 50.0f); + cLib_addCalc2(&i_this->mDemoCamCenter.z, player->current.pos.z, 0.2f, 50.0f); + } - if (i_this->field_0x26c6 == 160) { - i_this->field_0x26c4 = 35; - i_this->field_0x26c6 = 0; - i_this->field_0x05bc = 3; - Z2GetAudioMgr()->bgmStreamPrepare(0x2000063); - Z2GetAudioMgr()->bgmStreamPlay(); - } - } - break; - case 34: - if (i_this->field_0x26c6 == 0) { - i_this->field_0x2710.z = -400.0f; - horseActor->changeDemoMode(8, 0); - } else if (i_this->field_0x26c6 == 1) { - i_this->field_0x26d4 = player->current.pos; - i_this->field_0x26c8.set(200.0f, 1318.0f, -1355.0f); - } + sp108.set(0.0f, 1100.0f, i_this->field_0x2710.z + -1500.0f); + horse->setHorsePosAndAngle(&sp108, 0); + cLib_addCalc0(&i_this->field_0x2710.z, 0.5f, 20.0f); - cLib_addCalc2(&i_this->field_0x26d4.x, player->current.pos.x, 0.2f, 50.0f); - cLib_addCalc2(&i_this->field_0x26d4.y, player->current.pos.y, 0.2f, 50.0f); - cLib_addCalc2(&i_this->field_0x26d4.z, player->current.pos.z, 0.2f, 50.0f); + if (i_this->mDemoCamTimer == 55) { + i_this->mDemoCamMode = 33; + i_this->mDemoCamTimer = 0; + a_this->speedF = 50.0f; + i_this->field_0x2710.z = -300.0f; + a_this->current.pos.x = 0.0f; + sp108.set(0.0f, 1100.0f, -4000.0f); + horse->setHorsePosAndAngle(&sp108, 0); + } + break; + case 35: + i_this->mDemoCamCenter.set(-286.0f, 1364.0f, -1780.0f); + i_this->mDemoCamEye.set(389.0f, 1326.0f, -2356.0f); - local_4c.set(0.0f, 1100.0f, i_this->field_0x2710.z + -1500.0f); - horseActor->i_setHorsePosAndAngle(&local_4c, 0); - cLib_addCalc0(&i_this->field_0x2710.z, 0.5f, 20.0f); - if (i_this->field_0x26c6 == 55) { - i_this->field_0x26c4 = 33; - i_this->field_0x26c6 = 0; - i_this->speedF = 50.0f; - i_this->field_0x2710.z = -300.0f; - i_this->current.pos.x = 0.0f; - local_4c.set(0.0f, 1100.0f, -4000.0f); - horseActor->i_setHorsePosAndAngle(&local_4c, 0); - } - break; - case 35: - i_this->field_0x26d4.set(-286.0f, 1364.0f, -1780.0f); - i_this->field_0x26c8.set(389.0f, 1326.0f, -2356.0f); - if (i_this->field_0x26c6 <= 1) { - i_this->field_0x2710.x = 25.0f; - } else { - cLib_addCalc2(&i_this->field_0x2710.x, 20.0f, 0.03f, 0.1f); - } - - if (i_this->field_0x26c6 == 70) { - i_this->field_0x1fc4 = 0; - anm_init(i_this, 92, 0.0f, 2, 1.0f); - i_this->shape_angle.y = i_this->field_0x0c3c; - i_this->current.angle.y = i_this->shape_angle.y; - i_this->field_0x0771 = 0; - i_this->field_0x0770 = 1; - for (int i = 0; i < 2; i++) { - dComIfGp_particle_set(e_name_6757[i], &i_this->current.pos, &i_this->shape_angle, - NULL); - } - } - - if (i_this->field_0x26c6 == 80) { - i_this->field_0x26c4 = 40; - i_this->field_0x26c6 = 0; - i_this->field_0x26d4.set(79.0f, 1305.0f, -1029.0f); - i_this->field_0x26c8.set(86.0f, 1321.0f, -1277.0f); - i_this->field_0x2710.x = 55.0f; - local_4c.set(0.0f, 1100.0f, -2000.0f); - horseActor->i_setHorsePosAndAngle(&local_4c, -0x2000); - } - break; - case 40: - if (i_this->field_0x26c6 != 110) break; - i_this->field_0x26c4 = 41; - i_this->field_0x26c6 = 0; - anm_init(i_this, 82, 1.0f, 0, 1.0f); - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_STANDUP, -1); - i_this->field_0x0748 = 1; - horseActor->changeDemoMode(1, 0); - player->changeDemoMode(1, 0, 0, 0); - case 41: - cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); - local_40.x = -50.0f; - local_40.y = 200.0f; - local_40.z = 300.0f; - MtxPosition(&local_4c, &local_40); - i_this->field_0x26c8.x = local_4c.x + i_this->current.pos.x; - i_this->field_0x26c8.z = local_4c.z + i_this->current.pos.z; - // cStack_58.y = i_this->current.pos.y; - cStack_58.y = i_this->current.pos.y + (i_this->eyePos.y - cStack_58.y) * 0.55f; - i_this->field_0x26d4.x = i_this->current.pos.x; - i_this->field_0x26d4.z = i_this->current.pos.z; - local_64.y = i_this->eyePos.y - 50.0f; - if (i_this->field_0x26c6 == 0) { - i_this->field_0x26d4.y = local_64.y; - i_this->field_0x26c8.y = cStack_58.y; - } else { - cLib_addCalc2(&i_this->field_0x26d4.y, local_64.y, 0.1f, 10.0f); - cLib_addCalc2(&i_this->field_0x26c8.y, cStack_58.y, 0.1f, 10.0f); - } - - if (i_this->mAnmID == 82 && i_this->mpModelMorf->isStop()) { - anm_init(i_this, 50, 0.0f, 2, 1.0f); - i_this->field_0x0748 = 2; - } - - if (i_this->field_0x26c6 == 250) { - i_this->field_0x26c4 = 42; - i_this->field_0x26c6 = 0; - anm_init(i_this, 51, 0.0f, 0, 1.0f); - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_LOOK, -1); - i_this->field_0x0748 = 3; - player->onForceHorseGetOff(); - } - case 42: - cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); - local_40.x = 80.0f; - local_40.y = 280.0f; - local_40.z = 40.0f; - MtxPosition(&i_this->field_0x26c8, &local_40); - i_this->field_0x26c8 += i_this->current.pos; - i_this->field_0x26d4.x = i_this->current.pos.x; - i_this->field_0x26d4.z = i_this->current.pos.z - 20.0f; - i_this->field_0x26d4.y = i_this->eyePos.y + 10.0f; - if (i_this->field_0x26c6 < 70) { - i_this->field_0x0c70 = 8; - } - - if (i_this->mpModelMorf->isStop()) { - anm_init(i_this, 77, 0.0f, 0, 1.0f); - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_SAYAOPEN, -1); - i_this->field_0x0748 = 4; - i_this->field_0x26c4 = 43; - i_this->field_0x26c6 = 0; - local_4c.set(0.0f, 1100.0f, -1000.0f); - player->setPlayerPosAndAngle(&local_4c, 1, 0); - - mantActor->field_0x3969 = 1; - } else { - break; - } - case 43: - if (i_this->mpModelMorf->checkFrame(212.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_SAYAOPEN, -1); - } - - - if (i_this->field_0x26c6 == 10) { - i_this->mMsgFlow.init(a_this, 0xbca, 0, NULL); - } - i_this->mMsgFlow.doFlow(a_this, NULL, 0); - - - if (i_this->mpModelMorf->getFrame() > 340.0f) { - cLib_addCalc2(&i_this->speedF, 4.3f, 1.0f, 0.7f); - mantActor->field_0x3969 = 3; - } else { - cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); - local_40.x = 20.0f; - local_40.y = 180.0f; - local_40.z = 260.0f; - MtxPosition(&i_this->field_0x26c8, &local_40); - i_this->field_0x26c8 += i_this->current.pos; - i_this->field_0x26d4.x = i_this->current.pos.x; - i_this->field_0x26d4.z = i_this->current.pos.z - 20.0f; - i_this->field_0x26d4.y = i_this->eyePos.y - 50.0f; - } - - if (i_this->field_0x26c6 == 211) { - i_this->field_0x0770 = 0; - mantActor->field_0x395c = 0.9f; - } - - if (i_this->field_0x26c6 == 215) { - i_this->field_0x2739 = 1; - i_this->field_0x273c = 0.0f; - envLight->mThunderEff.field_0x2 = 1; - } - - if (i_this->field_0x26c6 == 0x116) { - i_this->field_0x0772 = 1; - } - - if (i_this->field_0x26c6 == 0x186) { - anm_init(i_this, 93, 0.0f, 2, 1.0f); - i_this->mpModelMorf->setFrame(20.0f); - i_this->field_0x26c4 = 44; - i_this->field_0x26c6 = 0; - i_this->field_0x0748 = 0; - i_this->field_0x26d4.set(792.0f, 1595.0f, 1160.0f); - i_this->field_0x26c8.set(938.0f, 1675.0f, 1337.0f); - local_4c.set(0.0f, 1100.0f, -500.0f); - player->setPlayerPosAndAngle(&local_4c, 1, 0); - } - break; - case 44: - i_this->mMsgFlow.doFlow(a_this, NULL, 0); - if (i_this->field_0x26c6 == 125) { - envLight->mThunderEff.field_0x2 = 1; - } - - if (i_this->field_0x26c6 >= 100) { - if (i_this->field_0x26c6 == 100) { - anm_init(i_this, 90, 12.0f, 2, 1.0f); - } - - if (i_this->field_0x26c6 == 135) { - i_this->field_0x26c4 = 45; - i_this->field_0x26c6 = 0; - local_4c.set(0.0f, 1100.0f, 0.0f); - fopAcM_create(PROC_OBJ_GB, 0xf0069600, &local_4c, - fopAcM_GetRoomNo(a_this), 0, 0, -1); - } - - cLib_addCalc0(&i_this->speedF, 1.0f, 0.7f); - } - - cLib_addCalc2(&i_this->speedF, (43.0f / 10.0f), 1.0f, 7.0f / 10.0f); - break; - case 45: - if (i_this->field_0x26c6 == 1) { - horseActor->changeDemoMode(9, 0); - i_this->field_0x26d4.set(-81.0f, 1391.0f, -2144.0f); - i_this->field_0x26c8.set(37.0f, 1366.0f, -1865.0f); - i_this->field_0x26ec.set(76.0f, 1352.0f, -1866.0f); - i_this->field_0x26e0.set(129.0f, 1358.0f, -2165.0f); - cam_spd_set(i_this); - } - - if (i_this->field_0x26c6 == 15) { - envLight->mThunderEff.field_0x2 = 1; - } - - if (i_this->field_0x26c6 >= 25) { - cam_3d_morf(i_this, 0.2f); - cLib_addCalc2(&i_this->field_0x2710.y, 0.07f, 1.0f, 0.002f); - } - - if (i_this->field_0x26c6 == 120) { - i_this->field_0x26c4 = 46; - i_this->field_0x26c6 = 200; - i_this->field_0x26d4.set(101.0f, 1206.0f, -582.0f); - i_this->field_0x26c8.set(154.0f, 1199.0f, -819.0f); - } - break; - case 46: - cLib_addCalc2(&i_this->field_0x2710.x, 30.0f, 0.1f, 0.2f); - if (i_this->field_0x26c6 >= 0x131) { - mantActor->field_0x3969 = 2; - } - - if (i_this->field_0x26c6 == 255) { - daPy_getPlayerActorClass()->changeDemoMode(23, 1, 2, 0); - } - - if (i_this->field_0x26c6 == 0x122) { - anm_init(i_this, 47, 3.0f, 0, 1.0f); - i_this->field_0x0748 = 5; - Z2GetAudioMgr()->bgmStart(Z2BGM_VS_GANON_04, 0, 0); - envLight->field_0x12cc = 3; - } - - if (i_this->field_0x26c6 == 0x140) { - fopMsgM_messageSetDemo(0x487); - } - - if (i_this->mAnmID == 47 && i_this->mpModelMorf->isStop()) { - anm_init(i_this, 91, 3.0f, 2, 1.0f); - envLight->mThunderEff.field_0x2 = 1; - } - - if (i_this->field_0x26c6 == 0x19a) { - i_this->mActionID = ACTION_WAIT; - i_this->field_0x05bc = 2; - i_this->field_0x0c44[0] = (cM_rndF(50.0f) + 30.0f); - i_this->field_0x0c44[8] = 100; - bVar3 = true; - dComIfGs_onOneZoneSwitch(15, -1); - dComIfGs_onSaveDunSwitch(1); - Z2GetAudioMgr()->setDemoName("force_end"); - envLight->field_0x12cc = 1; - } - break; - case 50: - if (i_this->eventInfo.checkCommandDemoAccrpt() == 0) { - fopAcM_orderPotentialEvent(i_this, 2, 0xffff, 0); - i_this->eventInfo.mCondition |= 2; - break; - } - - camera1->mCamera.Stop(); - i_this->field_0x26c4 = 51; - i_this->field_0x26c6 = 0; - i_this->field_0x2710.x = 55.0f; - i_this->field_0x2720 = player->current.pos; - i_this->field_0x272c = player->shape_angle.y; - i_this->field_0x2734 = 0.0f; - i_this->field_0x2730 = 0.0f; - daPy_getPlayerActorClass()->changeOriginalDemo(); - daPy_getPlayerActorClass()->changeDemoMode(89, 0, 0, 0); - Z2GetAudioMgr()->changeBgmStatus(1); - case 51: - mantActor->field_0x3969 = 1; - i_this->field_0x0c70 = 20; - if (i_this->field_0x26c6 >= 5) { - dComIfGp_getVibration().StartQuake(2, 1, cXyz(0.0f, 1.0f, 0.0f)); - } - - dComIfGp_setDoStatusForce(100, 4); - cMtx_YrotS(*calc_mtx, player->shape_angle.y); - local_40.x = 0.0f; - local_40.y = 0.0f; - local_40.z = i_this->field_0x2734 * 1.3f; - MtxPosition(&local_4c, &local_40); - local_4c += i_this->field_0x2720; - local_4c.y = player->current.pos.y; - player->setPlayerPosAndAngle(&local_4c, i_this->field_0x272c, 0); - local_40.x = 0.0f; - local_40.y = 0.0f; - local_40.z = 135.0f; - MtxPosition(&local_4c, &local_40); - i_this->current.pos.x = local_4c.x + player->field_0x5f8.x; - i_this->current.pos.z = local_4c.z + player->field_0x5f8.z; - i_this->current.angle.y = player->shape_angle.y + -0x8000; - player->field_0x5f8 - i_this->current.pos; - cStack_ac * 0.5f; - i_this->current.pos + cStack_b8; - local_64 = cStack_c4; - local_64.y += 150.0f; - local_40.x = 200.0f; - local_40.y = 0.0f; - local_40.z = 0.0f; - MtxPosition(&local_40, &cStack_58); - - cStack_58 += local_64; - if (i_this->field_0x26c6 == 0) { - i_this->field_0x26d4 = local_64; - i_this->field_0x26c8 = cStack_58; - dComIfGp_setHitMark(2, a_this, - &local_64, NULL, &cXyz(2.0f, 2.0f, 2.0f), 0); - i_this->mZ2Creature.startCollisionSE(Z2SE_HIT_SWORD, 40); - } else { - PSMTXCopy(i_this->mpModelMorf->getModel()->getAnmMtx(33), *calc_mtx); - local_40.set(10.0f, 20.0f, 0.0f); - MtxPosition(&local_40, &local_4c); - for (int i = 0; i < 2; i++) { - i_this->field_0x268c[i - 12] = dComIfGp_particle_set((i_this->field_0x268c[i + 4 - 12]), - e_name_6846[i * 2], &local_4c, NULL, NULL); - } - - i_this->mZ2Creature.startCreatureExtraSoundLevel(Z2SE_EN_GND_TUBAZERI_EFF, 0 , -1); - - if (i_this->field_0x0c44[3] == 0) { - i_this->field_0x0c44[3] = (s16)(cM_rndF(10.0f) + 3.0f); - i_this->field_0x26ec.x = cM_rndFX(20.0f); - i_this->field_0x26ec.y = cM_rndFX(20.0f); - i_this->field_0x26ec.z = cM_rndFX(20.0f); - } - - cLib_addCalc2(&i_this->field_0x26d4.x, local_64.x + i_this->field_0x26ec.x, - 0.1f, 5.0f); - cLib_addCalc2(&i_this->field_0x26d4.y, local_64.y + i_this->field_0x26ec.y, - 0.1f, 5.0f); - cLib_addCalc2(&i_this->field_0x26d4.z, local_64.z + i_this->field_0x26ec.z, - 0.1f, 5.0f); - } - - if (mDoCPd_c::getTrigA(0) != 0) { - i_this->field_0x2730 += 0.1f; - if (i_this->field_0x2730 > 1.0f) { - i_this->field_0x2730 = 1.0f; - } - } else { - i_this->field_0x2730 -= 0.02f; - if (i_this->field_0x2730 < -1.0f) { - i_this->field_0x2730 = -1.0f; - } - } - - cLib_addCalc2(&i_this->field_0x2734, i_this->field_0x2730 * 50.0f, 0.1f, 2.0f); - if (i_this->field_0x2734 <= -49.9f) { - i_this->field_0x26c4 = 52; - i_this->field_0x26c6 = 0; - anm_init(i_this, 89, 3.0f, 0, 1.0f); - daPy_getPlayerActorClass()->changeDemoMode(89, 4, 0, 0); - dComIfGp_getVibration().StopQuake(31); - Z2GetAudioMgr()->changeBgmStatus(2); - } else if (i_this->field_0x2734 <= 48.0f) { - i_this->field_0x26c4 = 55; - i_this->field_0x26c6 = 0; - anm_init(i_this, 88, 3.0f, 0, 1.0f); - daPy_getPlayerActorClass()->changeDemoMode(89, 3, 0, 0); - dComIfGp_getVibration().StopQuake(31); - Z2GetAudioMgr()->changeBgmStatus(3); - } else if (i_this->field_0x2730 < -0.4f) { - i_this->mZ2Creature.startCreatureVoiceLevel(Z2SE_EN_GND_V_TUBAZERI_B, -1); - if (i_this->mAnmID != 86 && i_this->field_0x0c44[2] == 0) { - anm_init(i_this, 86, 3.0f, 2, 1.0f); - daPy_getPlayerActorClass()->changeDemoMode(89, 1, 0, 0); - i_this->field_0x0c44[2] = 30; - Z2GetAudioMgr()->changeBgmStatus(4); - } - } else if (i_this->field_0x2730 > 0.4f) { - i_this->mZ2Creature.startCreatureVoiceLevel(Z2SE_EN_GND_V_TUBAZERI_C, -1); - if (i_this->mAnmID != 87 && i_this->field_0x0c44[2] == 0) { - anm_init(i_this, 87, 3.0f, 2, 1.0f); - daPy_getPlayerActorClass()->changeDemoMode(89, 2, 0, 0); - i_this->field_0x0c44[2] = 30; - Z2GetAudioMgr()->changeBgmStatus(5); - } - } else { - i_this->mZ2Creature.startCreatureVoiceLevel(Z2SE_EN_GND_V_TUBAZERI_A, -1); - if (i_this->mAnmID != 85 && i_this->field_0x0c44[2] == 0) { - anm_init(i_this, 85, 3.0f, 2, 1.0f); - daPy_getPlayerActorClass()->changeDemoMode(89, 0, 0, 0); - i_this->field_0x0c44[2] = 30; - Z2GetAudioMgr()->changeBgmStatus(6); - } - } - break; - case 52: - i_this->field_0x0c70 = 20; - if (i_this->mpModelMorf->isStop()) { - i_this->mActionID = ACTION_ATTACK; - i_this->field_0x05bc = 2; - i_this->field_0x26c4 = 53; - i_this->field_0x26c6 = 0; - } - - if (i_this->field_0x26c6 == 20) { - cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); - local_40.x = -200.0f; - local_40.y = 50.0f; - local_40.z = 500.0f; - MtxPosition(&local_40, &i_this->field_0x26c8); - i_this->field_0x26c8 += i_this->current.pos; - i_this->field_0x26d4 = player->current.pos; - i_this->field_0x26d4.y += 80.0f; - mantActor->field_0x395c = 1.2f; - } - break; - case 53: - i_this->field_0x0c70 = 20; - if (i_this->field_0x26c6 >= 20) { - local_64 = player->current.pos; - local_64.y += 80.0f; - cLib_addCalc2(&i_this->field_0x26d4.x, local_64.x, 0.15f, 200.0f); - cLib_addCalc2(&i_this->field_0x26d4.y, local_64.y, 0.15f, 200.0f); - cLib_addCalc2(&i_this->field_0x26d4.z, local_64.z, 0.15f, 200.0f); - } - - if (i_this->field_0x26c6 == 18) { - daPy_getPlayerActorClass()->setThrowDamage(i_this->shape_angle.y, 50.0f, 30.0f, 8, 1, 0); - daPy_getPlayerActorClass()->changeDemoMode(1, 0, 0, 0); - cStack_7c = player->current.pos; - cStack_7c.y += 150.0f; - dComIfGp_setHitMark(3, NULL, &cStack_7c, &player->shape_angle, NULL, 0); - } - - if (i_this->field_0x26c6 == 92) { - bVar3 = TRUE; - } - break; - case 55: - i_this->field_0x0c70 = 20; - if (i_this->field_0x26c6 == 20) { - cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); - local_40.x = 200.0f; - local_40.y = 50.0f; - local_40.z = 500.0f; - MtxPosition(&local_40, &i_this->field_0x26c8); - i_this->field_0x26c8 += i_this->current.pos; - i_this->field_0x26d4 = player->current.pos; - i_this->field_0x26d4.y += 80.0f; - mantActor->field_0x395c = 1.2f; - } - - if (i_this->field_0x26c6 >= 43) { - bVar3 = true; - i_this->mActionID = ACTION_JUMP; - i_this->field_0x05bc = 5; - i_this->field_0x0c44[0] = 50; - i_this->field_0x0c7c = 1; - } - - break; - case 60: - if (i_this->eventInfo.checkCommandDemoAccrpt() == 0) { - fopAcM_orderPotentialEvent(i_this, 2, 0xffff, 0); - i_this->eventInfo.mCondition |= 2; - break; - } - - camera1->mCamera.Stop(); - i_this->field_0x26c4 = 61; - i_this->field_0x26c6 = 0; - i_this->field_0x2710.x = 55.0f; - daPy_getPlayerActorClass()->changeOriginalDemo(); - daPy_getPlayerActorClass()->changeDemoMode(90, 0, 0, 0); - local_4c.set(0.0f, 1100.0f, 0.0f); - daPy_getPlayerActorClass()->setPlayerPosAndAngle(&local_4c, 0xffffe000, 0); - i_this->current.pos.set(0.0f, 1100.0f, 0.0f); - i_this->old.pos = i_this->current.pos; - i_this->shape_angle.y = -0x2000; - i_this->current.angle.y = -0x2000; - cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); - local_40.x = -300.0f; - local_40.y = 150.0f; - local_40.z = 200.0f; - MtxPosition(&local_40, &i_this->field_0x26c8); - i_this->field_0x26c8 += i_this->current.pos; - i_this->field_0x26d4 = i_this->current.pos; - case 61: - i_this->field_0x0c70 = 20; - if (i_this->field_0x26c6 >= 1) { - cLib_addCalc2(&i_this->field_0x26d4.x, player->eyePos.x, 0.3f, 50.0f); - local_64.y = player->eyePos.y; - if (local_64.y > 1400.0f) { - local_64.y = 1400.0f; - } - - cLib_addCalc2(&i_this->field_0x26d4.y, local_64.y, 0.3f, 50.0f); - cLib_addCalc2(&i_this->field_0x26d4.z, player->eyePos.z, 0.3f, 50.0f); - } - - if (i_this->field_0x26c6 == 31) { - i_this->field_0x26c4 = 62; - i_this->field_0x26c6 = 0; - anm_init(i_this, 84, 0.0f, 0, 1.0f); - dComIfGp_getVibration().StartShock(7, 1, cXyz(0.0f, 1.0f, 0.0f)); - fpcM_Search(s_objgbdel_sub, i_this); - i_this->field_0x2739 = 2; - Z2GetAudioMgr()->seMoveVolumeAll(0.0f, 0); - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_END, -1); - } - break; - case 62: - i_this->field_0x0c70 = 20; + if (i_this->mDemoCamTimer <= 1) { i_this->field_0x2710.x = 25.0f; - cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); - local_40.set(55.7f, 1146.0f, -151.0f); - MtxPosition(&local_40, &i_this->field_0x26d4); - local_40.set(-131.0f, 1146.0f, -156.0f); - MtxPosition(&local_40, &i_this->field_0x26c8); - if (i_this->mpModelMorf->isStop()) { - anm_init(i_this, 48, 10.0f, 2, 1.0f); + } else { + cLib_addCalc2(&i_this->field_0x2710.x, 20.0f, 0.03f, 0.1f); + } + + if (i_this->mDemoCamTimer == 70) { + i_this->mDrawHorse = FALSE; + anm_init(i_this, B_GND_BCK_EGND_WAIT03, 0.0f, 2, 1.0f); + a_this->current.angle.y = a_this->shape_angle.y = i_this->mPlayerAngleY; + i_this->mHideSheath = FALSE; + i_this->field_0x770 = 1; + + for (int i = 0; i < 2; i++) { + static u16 e_name[] = {0x8B9B, 0x8B9C}; + dComIfGp_particle_set(e_name[i], &a_this->current.pos, &a_this->shape_angle, NULL); } + } - if (i_this->field_0x26c6 == 80) { - i_this->field_0x26c4 = 63; - i_this->field_0x26c6 = 0; - Z2GetAudioMgr()->seMoveVolumeAll(1.0f, 37); - i_this->field_0x2739 = 3; - } - - local_4c.set(0.0f, 1100.0f, -2000.0f); - horseActor->i_setHorsePosAndAngle(&local_4c, -0x2000); - break; - case 63: - cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); - local_40.set(90.0f, 1250.0f, -57.0f); - MtxPosition(&i_this->field_0x26d4, &local_40); - local_40.set(-80.0f, 1188.0f, -106.0f); - MtxPosition(&local_40, &i_this->field_0x26c8); - - if (i_this->field_0x26c6 == 80) { - i_this->field_0x26c4 = 64; - i_this->field_0x26c6 = 0; - i_this->field_0x0754 = 0; - i_this->field_0x2739 = 4; - } - break; - case 64: - i_this->field_0x0c70 = 20; - i_this->field_0x0754 = 1; - mDoMtx_stack_c::transS(0.0f, 1430.0f, -2000.0f); - mDoMtx_stack_c::YrotM(-0x2000); - i_this->mpModelMorf->getModel()->setBaseTRMtx(mDoMtx_stack_c::get()); - i_this->field_0x0750->play(); - i_this->field_0x074c->play(); - i_this->field_0x05d8->play(NULL, 0, 0); - i_this->field_0x05d8->modelCalc(); - i_this->field_0x26d4.set(25.0f, 1603.0f, -2033.0f); - i_this->field_0x26c8.set(-70.0f, 1564.0f, -1884.0f); - if (i_this->field_0x26c6 == 88) { - i_this->field_0x26c4 = 65; - i_this->field_0x26c6 = 0; - i_this->field_0x271c = 3000; - i_this->field_0x2710.z = 1.0f; - i_this->field_0x2710.y = 0.0f; - i_this->field_0x2739 = 5; - } - break; - case 65: - i_this->field_0x0c70 = 20; - i_this->field_0x26d4 = i_this->eyePos; - i_this->field_0x26d4.z += -5.0f; - cMtx_YrotS(*calc_mtx, i_this->shape_angle.y + i_this->field_0x271c); - local_40.x = 0.0f; - local_40.y = local_40.z * 150.0f; - local_40.z *= 50.0f; - MtxPosition(&i_this->field_0x26c8, &local_40); - i_this->field_0x26c8 += i_this->field_0x26d4; - - if (i_this->field_0x26c6 > 80) { - cLib_addCalc2(&i_this->field_0x2710.y, 1.0f, 1.0f, 0.05f); - i_this->field_0x271c += (int)(i_this->field_0x2710.y * 200.0f); - cLib_addCalc2(&i_this->field_0x2710.z, 500.0f, 1.0f, i_this->field_0x2710.y * 0.5f); - if (i_this->field_0x26c6 == 150) { - daPy_getPlayerActorClass()->changeDemoMode(16, 0, 0, 0); - } - - if (i_this->field_0x26c6 == 230) { - mDoGph_gInf_c::fadeOut(0.1f, g_blackColor); - } - - if (i_this->field_0x26c6 == 330) { - dStage_changeScene(0, 0.0f, 0, i_this->current.roomNo, 0, -1); - } - } - break; - case 90: - if (i_this->eventInfo.checkCommandDemoAccrpt() == 0) { - fopAcM_orderPotentialEvent(i_this, 2, 0xffff, 0); - i_this->eventInfo.mCondition |= 2; - break; - } - - camera1->mCamera.Stop(); - i_this->field_0x26c4 = 91; - i_this->field_0x26c6 = 0; + if (i_this->mDemoCamTimer == 80) { + i_this->mDemoCamMode = 40; + i_this->mDemoCamTimer = 0; + i_this->mDemoCamCenter.set(79.0f, 1305.0f, -1029.0f); + i_this->mDemoCamEye.set(86.0f, 1321.0f, -1277.0f); i_this->field_0x2710.x = 55.0f; - - daPy_getPlayerActorClass()->changeOriginalDemo(); - horseActor->changeOriginalDemo(); - - i_this->field_0x26d4 = player->current.pos; - i_this->field_0x26c8 = player->current.pos; - - i_this->field_0x26c8.x += 100.0f; + sp108.set(0.0f, 1100.0f, -2000.0f); + horse->setHorsePosAndAngle(&sp108, -0x2000); + } + break; + case 40: + if (i_this->mDemoCamTimer != 110) break; - case 91: - local_4c.set(0.0f, 1100.0f, -2000.0f); - horseActor->i_setHorsePosAndAngle(&local_4c, -0x2000); - if (i_this->field_0x26c6 == 2) { - player->onForceHorseGetOff(); - } - if (i_this->field_0x26c6 == 5) { - i_this->field_0x26c4 = 92; - i_this->field_0x26c6 = 0; - } + i_this->mDemoCamMode = 41; + i_this->mDemoCamTimer = 0; + anm_init(i_this, B_GND_BCK_EGND_STANDUP, 1.0f, 0, 1.0f); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_STANDUP, -1); + i_this->mGndEyeBtkNo = 1; + horse->changeDemoMode(1, 0); + player->changeDemoMode(1, 0, 0, 0); + case 41: + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + sp114.x = -50.0f; + sp114.y = 200.0f; + sp114.z = 300.0f; + MtxPosition(&sp114, &sp108); + i_this->mDemoCamEye.x = sp108.x + a_this->current.pos.x; + i_this->mDemoCamEye.z = sp108.z + a_this->current.pos.z; + spFC.y = a_this->current.pos.y + ((a_this->eyePos.y - a_this->current.pos.y) * 0.55f); + + i_this->mDemoCamCenter.x = a_this->current.pos.x; + i_this->mDemoCamCenter.z = a_this->current.pos.z; + spF0.y = a_this->eyePos.y - 50.0f; + + if (i_this->mDemoCamTimer == 0) { + i_this->mDemoCamCenter.y = spF0.y; + i_this->mDemoCamEye.y = spFC.y; + } else { + cLib_addCalc2(&i_this->mDemoCamCenter.y, spF0.y, 0.1f, 10.0f); + cLib_addCalc2(&i_this->mDemoCamEye.y, spFC.y, 0.1f, 10.0f); + } + + if (i_this->mAnmID == B_GND_BCK_EGND_STANDUP && i_this->mpModelMorf->isStop()) { + anm_init(i_this, B_GND_BCK_EGND_LAUGH, 0.0f, 2, 1.0f); + i_this->mGndEyeBtkNo = 2; + } + + if (i_this->mDemoCamTimer != 250) { break; - case 92: - if (i_this->field_0x26c6 == 1) { - local_4c.set(0.0f, 1100.0f, 0.0f); - fopAcM_create(PROC_OBJ_GB, 0xf0069600, &local_4c, - i_this->current.roomNo, NULL, NULL, -1); - } - - if (i_this->field_0x26c6 == 5) { - local_4c.set(600.0f, 1100.0f, 0.0f); - player->setPlayerPosAndAngle(&local_4c, 0xffffb7fe, 0); - i_this->current.pos.set(-600.0f, 1100.0f, 0.0f); - i_this->old.pos = i_this->current.pos; - i_this->current.angle.y = 0x37fe; - i_this->shape_angle.y = 0x37fe; - bVar3 = TRUE; - } - break; - case 95: - if (i_this->eventInfo.checkCommandDemoAccrpt() == 0) { - fopAcM_orderPotentialEvent(i_this, 2, 0xffff, 0); - i_this->eventInfo.mCondition |= 2; - return; - } - - i_this->field_0x26c4 = 96; - i_this->field_0x26c6 = 0; - - daPy_getPlayerActorClass()->changeOriginalDemo(); - horseActor->changeOriginalDemo(); - - local_4c.set(0.0f, 1100.0f, -2000.0f); - horseActor->i_setHorsePosAndAngle(&local_4c, -0x2000); - - local_4c.set(600.0f, 1100.0f, 0.0f); - player->setPlayerPosAndAngle(&local_4c, 0xffffb7fe, 0); - local_4c.set(-600.0f, 1100.0f, 0.0f); - - i_this->old.pos = i_this->current.pos; - i_this->current.angle.y = 0x37fe; - i_this->shape_angle.y = 0x37fe; - - local_4c.set(0.0f, 1100.0f, 0.0f); - fopAcM_create(PROC_OBJ_GB, 0xf0069600, &local_4c, - i_this->current.roomNo, NULL, NULL, -1); - break; - case 96: - i_this->field_0x26c6 += 1; - if (i_this->field_0x26c6 != 2) { - return; - } - - dComIfGp_event_reset(); - bVar3 = TRUE; - } - - if (!bVar3) { - cMtx_YrotS(*calc_mtx, player->shape_angle.y); - local_40.x = 0.0f; - local_40.y = 100.0f; - local_40.z = -250.0f; - MtxPosition(&local_40, &i_this->field_0x26c8); - i_this->field_0x26c8 += player->current.pos; - i_this->field_0x26d4 = player->current.pos; - i_this->field_0x26d4.y += 120.0f; - } - - camera1->mCamera.Reset(i_this->field_0x26d4, i_this->field_0x26c8); - camera1->mCamera.Start(); - camera1->mCamera.SetTrimSize(0); - - dComIfGp_event_reset(); - - daPy_getPlayerActorClass()->cancelOriginalDemo(); - - i_this->field_0x26c4 = 0; - - if (i_this->field_0x26c4 > 0) { - cStack_88 = i_this->field_0x26d4; - cStack_94 = i_this->field_0x26c8; + } - camera1->mCamera.Set(cStack_88, cStack_94, i_this->field_0x2710.x, 0); - i_this->field_0x26c6 += 1; - if (i_this->field_0x26c6 > 0x2710) { - i_this->field_0x26c6 = 0x2710; + i_this->mDemoCamMode = 42; + i_this->mDemoCamTimer = 0; + anm_init(i_this, B_GND_BCK_EGND_LOOK, 0.0f, 0, 1.0f); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_LOOK, -1); + i_this->mGndEyeBtkNo = 3; + player->onForceHorseGetOff(); + case 42: + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + sp114.x = 80.0f; + sp114.y = 280.0f; + sp114.z = 40.0f; + MtxPosition(&sp114, &i_this->mDemoCamEye); + + i_this->mDemoCamEye += a_this->current.pos; + i_this->mDemoCamCenter.x = a_this->current.pos.x; + i_this->mDemoCamCenter.z = a_this->current.pos.z - 20.0f; + i_this->mDemoCamCenter.y = a_this->eyePos.y + 10.0f; + + if (i_this->mDemoCamTimer < 70) { + i_this->field_0xc70 = 8; + } + + if (i_this->mpModelMorf->isStop()) { + anm_init(i_this, B_GND_BCK_EGND_SAYAOPEN, 0.0f, 0, 1.0f); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_SAYAOPEN, -1); + i_this->mGndEyeBtkNo = 4; + i_this->mDemoCamMode = 43; + i_this->mDemoCamTimer = 0; + sp108.set(0.0f, 1100.0f, -1000.0f); + player->setPlayerPosAndAngle(&sp108, 1, 0); + + mant_p->field_0x3969 = 1; + } else { + break; + } + case 43: + if (i_this->mpModelMorf->checkFrame(212.0f)) { + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_SAYAOPEN, 0, -1); + } + + if (i_this->mDemoCamTimer >= 10) { + if (i_this->mDemoCamTimer == 10) { + i_this->mMsgFlow.init(a_this, 3018, 0, NULL); + } + i_this->mMsgFlow.doFlow(a_this, NULL, 0); + } + + if (i_this->mpModelMorf->getFrame() > 340.0f) { + cLib_addCalc2(&a_this->speedF, 4.3f, 1.0f, 0.7f); + mant_p->field_0x3969 = 3; + } else { + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + sp114.x = 20.0f; + sp114.y = 180.0f; + sp114.z = 260.0f; + MtxPosition(&sp114, &i_this->mDemoCamEye); + + i_this->mDemoCamEye += a_this->current.pos; + i_this->mDemoCamCenter.x = a_this->current.pos.x; + i_this->mDemoCamCenter.z = a_this->current.pos.z - 20.0f; + i_this->mDemoCamCenter.y = a_this->eyePos.y - 50.0f; + } + + if (i_this->mDemoCamTimer == 211) { + i_this->field_0x770 = 0; + mant_p->field_0x395c = 0.9f; + } + + if (i_this->mDemoCamTimer == 215) { + i_this->field_0x2739 = 1; + i_this->mKankyoBlend = 0.0f; + kankyo->mThunderEff.field_0x2 = 1; + } + + if (i_this->mDemoCamTimer == 278) { + i_this->field_0x772 = 1; + } + + if (i_this->mDemoCamTimer == 390) { + anm_init(i_this, B_GND_BCK_EGND_WALK, 0.0f, 2, 1.0f); + i_this->mpModelMorf->setFrame(20.0f); + i_this->mDemoCamMode = 44; + i_this->mDemoCamTimer = 0; + i_this->mGndEyeBtkNo = 0; + i_this->mDemoCamCenter.set(792.0f, 1595.0f, 1160.0f); + i_this->mDemoCamEye.set(938.0f, 1675.0f, 1337.0f); + sp108.set(0.0f, 1100.0f, -500.0f); + player->setPlayerPosAndAngle(&sp108, 1, 0); + } + break; + case 44: + i_this->mMsgFlow.doFlow(a_this, NULL, 0); + + if (i_this->mDemoCamTimer == 125) { + kankyo->mThunderEff.field_0x2 = 1; + } + + if (i_this->mDemoCamTimer >= 100) { + if (i_this->mDemoCamTimer == 100) { + anm_init(i_this, B_GND_BCK_EGND_WAIT01, 12.0f, 2, 1.0f); + } + + if (i_this->mDemoCamTimer == 135) { + i_this->mDemoCamMode = 45; + i_this->mDemoCamTimer = 0; + sp108.set(0.0f, 1100.0f, 0.0f); + fopAcM_create(PROC_OBJ_GB, 0xF0069600, &sp108, fopAcM_GetRoomNo(a_this), 0, 0, -1); + } + + cLib_addCalc0(&a_this->speedF, 1.0f, 0.7f); + break; + } + + cLib_addCalc2(&a_this->speedF, 4.3f, 1.0f, 0.7f); + break; + case 45: + if (i_this->mDemoCamTimer == 1) { + horse->changeDemoMode(9, 0); + i_this->mDemoCamCenter.set(-81.0f, 1391.0f, -2144.0f); + i_this->mDemoCamEye.set(37.0f, 1366.0f, -1865.0f); + i_this->mDemoCamCenterTarget.set(76.0f, 1352.0f, -1866.0f); + i_this->mDemoCamEyeTarget.set(129.0f, 1358.0f, -2165.0f); + cam_spd_set(i_this); + } + + if (i_this->mDemoCamTimer == 15) { + kankyo->mThunderEff.field_0x2 = 1; + } + + if (i_this->mDemoCamTimer >= 25) { + cam_3d_morf(i_this, 0.2f); + cLib_addCalc2(&i_this->field_0x2710.y, 0.07f, 1.0f, 0.002f); + } + + if (i_this->mDemoCamTimer == 120) { + i_this->mDemoCamMode = 46; + i_this->mDemoCamTimer = 200; + i_this->mDemoCamCenter.set(101.0f, 1206.0f, -582.0f); + i_this->mDemoCamEye.set(154.0f, 1199.0f, -819.0f); + } + break; + case 46: + cLib_addCalc2(&i_this->field_0x2710.x, 30.0f, 0.1f, 0.2f); + + if (i_this->mDemoCamTimer >= 305) { + mant_p->field_0x3969 = 2; + } + + if (i_this->mDemoCamTimer == 255) { + daPy_getPlayerActorClass()->changeDemoMode(23, 1, 2, 0); + } + + if (i_this->mDemoCamTimer == 290) { + anm_init(i_this, B_GND_BCK_EGND_KAMAE, 3.0f, 0, 1.0f); + i_this->mGndEyeBtkNo = 5; + Z2GetAudioMgr()->bgmStart(Z2BGM_VS_GANON_04, 0, 0); + kankyo->field_0x12cc = 3; + } + + if (i_this->mDemoCamTimer == 320) { + fopMsgM_messageSetDemo(1159); // Dark Lord GANONDORF + } + + if (i_this->mAnmID == B_GND_BCK_EGND_KAMAE && i_this->mpModelMorf->isStop()) { + anm_init(i_this, B_GND_BCK_EGND_WAIT02, 3.0f, 2, 1.0f); + kankyo->mThunderEff.field_0x2 = 1; + } + + if (i_this->mDemoCamTimer == 410) { + i_this->mActionMode = ACTION_WAIT; + i_this->mMoveMode = 2; + i_this->field_0xc44[0] = cM_rndF(50.0f) + 30.0f; + i_this->field_0xc44[8] = 100; + + sp8 = true; + dComIfGs_onOneZoneSwitch(15, -1); + dComIfGs_onSaveDunSwitch(1); + Z2GetAudioMgr()->setDemoName("force_end"); + kankyo->field_0x12cc = 1; + } + break; + case 50: + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(a_this, 2, 0xFFEF, 0); + a_this->eventInfo.onCondition(2); + return; + } + + camera->mCamera.Stop(); + i_this->mDemoCamMode = 51; + i_this->mDemoCamTimer = 0; + i_this->field_0x2710.x = 55.0f; + i_this->field_0x2720 = player->current.pos; + i_this->field_0x272c = player->shape_angle.y; + i_this->mTubazeriPushAmount = 0.0f; + i_this->mTubazeriPushValue = 0.0f; + + daPy_getPlayerActorClass()->changeOriginalDemo(); + daPy_getPlayerActorClass()->changeDemoMode(89, 0, 0, 0); + Z2GetAudioMgr()->changeBgmStatus(1); + case 51: + mant_p->field_0x3966 = 1; + i_this->field_0xc70 = 20; + + if (i_this->mDemoCamTimer >= 5) { + dComIfGp_getVibration().StartQuake(VIBMODE_Q_POWER2, 1, cXyz(0.0f, 1.0f, 0.0f)); + } + + dComIfGp_setDoStatusForce(100, 4); + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + sp114.x = 0.0f; + sp114.y = 0.0f; + sp114.z = i_this->mTubazeriPushAmount * 1.3f; + MtxPosition(&sp114, &sp108); + sp108 += i_this->field_0x2720; + sp108.y = player->current.pos.y; + player->setPlayerPosAndAngle(&sp108, i_this->field_0x272c, 0); + + sp114.x = 0.0f; + sp114.y = 0.0f; + sp114.z = 135.0f; + MtxPosition(&sp114, &sp108); + a_this->current.pos.x = sp108.x + player->field_0x5f8.x; + a_this->current.pos.z = sp108.z + player->field_0x5f8.z; + a_this->current.angle.y = player->shape_angle.y + 0x8000; + + spF0 = a_this->current.pos + ((*player->getViewerCurrentPosP() - a_this->current.pos) * 0.5f); + spF0.y += 150.0f; + + sp114.x = 200.0f; + sp114.y = 0.0f; + sp114.z = 0.0f; + MtxPosition(&sp114, &spFC); + spFC += spF0; + + if (i_this->mDemoCamTimer == 0) { + i_this->mDemoCamCenter = spF0; + i_this->mDemoCamEye = spFC; + + cXyz spE4(2.0f, 2.0f, 2.0f); + dComIfGp_setHitMark(2, a_this, &spF0, NULL, &spE4, 0); + i_this->mGndSound.startCollisionSE(Z2SE_HIT_SWORD, 40); + } else { + MTXCopy(i_this->mpModelMorf->getModel()->getAnmMtx(33), *calc_mtx); + sp114.set(10.0f, 20.0f, 0.0f); + MtxPosition(&sp114, &sp108); + + for (int i = 0; i < 2; i++) { + static u16 e_name[] = {0x8B98, 0x8B99}; + i_this->field_0x2680[i] = dComIfGp_particle_set(i_this->field_0x2680[i], e_name[i], &sp108, NULL, NULL); + } + + i_this->mGndSound.startCreatureExtraSoundLevel(Z2SE_EN_GND_TUBAZERI_EFF, 0 , -1); + + if (i_this->field_0xc44[3] == 0) { + i_this->field_0xc44[3] = (s16)(cM_rndF(10.0f) + 3.0f); + i_this->mDemoCamCenterTarget.x = cM_rndFX(20.0f); + i_this->mDemoCamCenterTarget.y = cM_rndFX(20.0f); + i_this->mDemoCamCenterTarget.z = cM_rndFX(20.0f); + } + + cLib_addCalc2(&i_this->mDemoCamCenter.x, spF0.x + i_this->mDemoCamCenterTarget.x, 0.1f, 5.0f); + cLib_addCalc2(&i_this->mDemoCamCenter.y, spF0.y + i_this->mDemoCamCenterTarget.y, 0.1f, 5.0f); + cLib_addCalc2(&i_this->mDemoCamCenter.z, spF0.z + i_this->mDemoCamCenterTarget.z, 0.1f, 5.0f); + } + + if ((int)mDoCPd_c::getTrigA(PAD_1) != 0) { + i_this->mTubazeriPushValue += 0.1f; + if (i_this->mTubazeriPushValue > 1.0f) { + i_this->mTubazeriPushValue = 1.0f; + } + } else { + i_this->mTubazeriPushValue -= 0.02f; + if (i_this->mTubazeriPushValue < -1.0f) { + i_this->mTubazeriPushValue = -1.0f; + } + } + + cLib_addCalc2(&i_this->mTubazeriPushAmount, i_this->mTubazeriPushValue * 50.0f, 0.1f, 2.0f); + if (i_this->mTubazeriPushAmount <= -49.9f) { + i_this->mDemoCamMode = 52; + i_this->mDemoCamTimer = 0; + + anm_init(i_this, B_GND_BCK_EGND_TUBAZERI_WIN, 3.0f, 0, 1.0f); + daPy_getPlayerActorClass()->changeDemoMode(89, 4, 0, 0); + dComIfGp_getVibration().StopQuake(31); + Z2GetAudioMgr()->changeBgmStatus(2); + } else if (i_this->mTubazeriPushAmount >= 48.0f) { + i_this->mDemoCamMode = 55; + i_this->mDemoCamTimer = 0; + + anm_init(i_this, B_GND_BCK_EGND_TUBAZERI_LOSE, 3.0f, 0, 1.0f); + daPy_getPlayerActorClass()->changeDemoMode(89, 3, 0, 0); + dComIfGp_getVibration().StopQuake(31); + Z2GetAudioMgr()->changeBgmStatus(3); + } else if (i_this->mTubazeriPushValue < -0.4f) { + i_this->mGndSound.startCreatureVoiceLevel(Z2SE_EN_GND_V_TUBAZERI_B, -1); + if (i_this->mAnmID != B_GND_BCK_EGND_TUBAZERI_B && i_this->field_0xc44[2] == 0) { + anm_init(i_this, B_GND_BCK_EGND_TUBAZERI_B, 3.0f, 2, 1.0f); + daPy_getPlayerActorClass()->changeDemoMode(89, 1, 0, 0); + i_this->field_0xc44[2] = 30; + Z2GetAudioMgr()->changeBgmStatus(4); + } + } else if (i_this->mTubazeriPushValue > 0.4f) { + i_this->mGndSound.startCreatureVoiceLevel(Z2SE_EN_GND_V_TUBAZERI_C, -1); + if (i_this->mAnmID != B_GND_BCK_EGND_TUBAZERI_C && i_this->field_0xc44[2] == 0) { + anm_init(i_this, B_GND_BCK_EGND_TUBAZERI_C, 3.0f, 2, 1.0f); + daPy_getPlayerActorClass()->changeDemoMode(89, 2, 0, 0); + i_this->field_0xc44[2] = 30; + Z2GetAudioMgr()->changeBgmStatus(5); + } + } else { + i_this->mGndSound.startCreatureVoiceLevel(Z2SE_EN_GND_V_TUBAZERI_A, -1); + if (i_this->mAnmID != B_GND_BCK_EGND_TUBAZERI_A && i_this->field_0xc44[2] == 0) { + anm_init(i_this, B_GND_BCK_EGND_TUBAZERI_A, 3.0f, 2, 1.0f); + daPy_getPlayerActorClass()->changeDemoMode(89, 0, 0, 0); + i_this->field_0xc44[2] = 30; + Z2GetAudioMgr()->changeBgmStatus(6); + } + } + break; + case 52: + i_this->field_0xc70 = 20; + if (i_this->mpModelMorf->isStop()) { + i_this->mActionMode = ACTION_ATTACK; + i_this->mMoveMode = 2; + i_this->mDemoCamMode = 53; + i_this->mDemoCamTimer = 0; + } + + if (i_this->mDemoCamTimer == 20) { + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + sp114.x = -200.0f; + sp114.y = 50.0f; + sp114.z = 500.0f; + MtxPosition(&sp114, &i_this->mDemoCamEye); + i_this->mDemoCamEye += a_this->current.pos; + i_this->mDemoCamCenter = player->current.pos; + i_this->mDemoCamCenter.y += 80.0f; + mant_p->field_0x395c = 1.2f; + } + break; + case 53: + i_this->field_0xc70 = 20; + if (i_this->mDemoCamTimer >= 20) { + spF0 = player->current.pos; + spF0.y += 80.0f; + cLib_addCalc2(&i_this->mDemoCamCenter.x, spF0.x, 0.15f, 200.0f); + cLib_addCalc2(&i_this->mDemoCamCenter.y, spF0.y, 0.15f, 200.0f); + cLib_addCalc2(&i_this->mDemoCamCenter.z, spF0.z, 0.15f, 200.0f); + } + + if (i_this->mDemoCamTimer == 18) { + daPy_getPlayerActorClass()->setThrowDamage(a_this->shape_angle.y, 50.0f, 30.0f, 8, 1, 0); + daPy_getPlayerActorClass()->changeDemoMode(1, 0, 0, 0); + + cXyz spD8(player->current.pos); + spD8.y += 150.0f; + dComIfGp_setHitMark(3, NULL, &spD8, &player->shape_angle, NULL, 0); + } + + if (i_this->mDemoCamTimer == 92) { + sp8 = TRUE; + } + break; + case 55: + i_this->field_0xc70 = 20; + if (i_this->mDemoCamTimer == 20) { + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + sp114.x = 200.0f; + sp114.y = 50.0f; + sp114.z = 500.0f; + MtxPosition(&sp114, &i_this->mDemoCamEye); + i_this->mDemoCamEye += a_this->current.pos; + i_this->mDemoCamCenter = player->current.pos; + i_this->mDemoCamCenter.y += 80.0f; + mant_p->field_0x395c = 1.2f; + } + + if (i_this->mDemoCamTimer >= 43) { + sp8 = true; + i_this->mActionMode = ACTION_JUMP; + i_this->mMoveMode = 5; + i_this->field_0xc44[0] = 50; + i_this->field_0xc7c = 1; + } + break; + case 60: + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(a_this, 2, 0xffff, 0); + a_this->eventInfo.onCondition(2); + return; + } + + camera->mCamera.Stop(); + i_this->mDemoCamMode = 61; + i_this->mDemoCamTimer = 0; + i_this->field_0x2710.x = 55.0f; + + daPy_getPlayerActorClass()->changeOriginalDemo(); + daPy_getPlayerActorClass()->changeDemoMode(90, 0, 0, 0); + sp108.set(0.0f, 1100.0f, 0.0f); + daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp108, -0x2000, 0); + + a_this->current.pos.set(0.0f, 1100.0f, 0.0f); + a_this->old.pos = a_this->current.pos; + a_this->shape_angle.y = -0x2000; + a_this->current.angle.y = -0x2000; + + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + sp114.x = -300.0f; + sp114.y = 150.0f; + sp114.z = 200.0f; + MtxPosition(&sp114, &i_this->mDemoCamEye); + i_this->mDemoCamEye += a_this->current.pos; + i_this->mDemoCamCenter = a_this->current.pos; + case 61: + i_this->field_0xc70 = 20; + if (i_this->mDemoCamTimer >= 1) { + cLib_addCalc2(&i_this->mDemoCamCenter.x, player->eyePos.x, 0.3f, 50.0f); + spF0.y = player->eyePos.y; + if (spF0.y > 1400.0f) { + spF0.y = 1400.0f; + } + + cLib_addCalc2(&i_this->mDemoCamCenter.y, spF0.y, 0.3f, 50.0f); + cLib_addCalc2(&i_this->mDemoCamCenter.z, player->eyePos.z, 0.3f, 50.0f); + } + + if (i_this->mDemoCamTimer == 31) { + i_this->mDemoCamMode = 62; + i_this->mDemoCamTimer = 0; + anm_init(i_this, B_GND_BCK_EGND_TODOME_02, 0.0f, 0, 1.0f); + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER7, 1, cXyz(0.0f, 1.0f, 0.0f)); + fpcM_Search(s_objgbdel_sub, i_this); + i_this->field_0x2739 = 2; + Z2GetAudioMgr()->seMoveVolumeAll(0.0f, 0); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_END, -1); + } + break; + case 62: + i_this->field_0xc70 = 20; + i_this->field_0x2710.x = 25.0f; + + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + sp114.set(55.7f, 1146.0f, -151.0f); + MtxPosition(&sp114, &i_this->mDemoCamCenter); + sp114.set(-131.0f, 1146.0f, -156.0f); + MtxPosition(&sp114, &i_this->mDemoCamEye); + + if (i_this->mpModelMorf->isStop()) { + anm_init(i_this, B_GND_BCK_EGND_KURUSIMI, 10.0f, 2, 1.0f); + } + + if (i_this->mDemoCamTimer == 80) { + i_this->mDemoCamMode = 63; + i_this->mDemoCamTimer = 0; + Z2GetAudioMgr()->seMoveVolumeAll(1.0f, 37); + i_this->field_0x2739 = 3; + } + + sp108.set(0.0f, 1100.0f, -2000.0f); + horse->setHorsePosAndAngle(&sp108, -0x2000); + break; + case 63: + cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); + sp114.set(90.0f, 1250.0f, -57.0f); + MtxPosition(&sp114, &i_this->mDemoCamCenter); + sp114.set(-80.0f, 1188.0f, -106.0f); + MtxPosition(&sp114, &i_this->mDemoCamEye); + + if (i_this->mDemoCamTimer == 80) { + i_this->mDemoCamMode = 64; + i_this->mDemoCamTimer = 0; + i_this->mDrawZelda = FALSE; + i_this->field_0x2739 = 4; + } + break; + case 64: + i_this->field_0xc70 = 20; + i_this->mDrawZelda = TRUE; + + mDoMtx_stack_c::transS(0.0f, 1430.0f, -2000.0f); + mDoMtx_stack_c::YrotM(-0x2000); + i_this->mpZeldaModel->getModel()->setBaseTRMtx(mDoMtx_stack_c::get()); + + i_this->mpZeldaBtk->play(); + i_this->mpZeldaBtp->play(); + i_this->mpZeldaModel->play(NULL, 0, 0); + i_this->mpZeldaModel->modelCalc(); + + i_this->mDemoCamCenter.set(25.0f, 1603.0f, -2033.0f); + i_this->mDemoCamEye.set(-70.0f, 1564.0f, -1884.0f); + + if (i_this->mDemoCamTimer == 88) { + i_this->mDemoCamMode = 65; + i_this->mDemoCamTimer = 0; + i_this->field_0x271c = 3000; + i_this->field_0x2710.z = 1.0f; + i_this->field_0x2710.y = 0.0f; + i_this->field_0x2739 = 5; + } + break; + case 65: + i_this->field_0xc70 = 20; + i_this->mDemoCamCenter = a_this->eyePos; + i_this->mDemoCamCenter.z += -5.0f; + + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y + i_this->field_0x271c); + sp114.x = 0.0f; + sp114.y = i_this->field_0x2710.z * 150.0f; + sp114.z = i_this->field_0x2710.z * 50.0f; + MtxPosition(&sp114, &i_this->mDemoCamEye); + i_this->mDemoCamEye += i_this->mDemoCamCenter; + + if (i_this->mDemoCamTimer > 80) { + cLib_addCalc2(&i_this->field_0x2710.y, 1.0f, 1.0f, 0.05f); + i_this->field_0x271c += (int)(i_this->field_0x2710.y * 200.0f); + cLib_addCalc2(&i_this->field_0x2710.z, 500.0f, 1.0f, i_this->field_0x2710.y * 0.5f); + + if (i_this->mDemoCamTimer == 150) { + daPy_getPlayerActorClass()->changeDemoMode(16, 0, 0, 0); + } + + if (i_this->mDemoCamTimer == 230) { + mDoGph_gInf_c::fadeOut(0.01f, g_blackColor); + } + + if (i_this->mDemoCamTimer == 330) { + dStage_changeScene(0, 0.0f, 0, fopAcM_GetRoomNo(a_this), 0, -1); + } + } + break; + case 90: + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(a_this, 2, 0xffff, 0); + a_this->eventInfo.onCondition(2); + return; + } + + camera->mCamera.Stop(); + i_this->mDemoCamMode = 91; + i_this->mDemoCamTimer = 0; + i_this->field_0x2710.x = 55.0f; + + daPy_getPlayerActorClass()->changeOriginalDemo(); + horse->changeOriginalDemo(); + + i_this->mDemoCamCenter = player->current.pos; + i_this->mDemoCamEye = player->current.pos; + i_this->mDemoCamEye.x += 100.0f; + break; + case 91: + sp108.set(0.0f, 1100.0f, -2000.0f); + horse->setHorsePosAndAngle(&sp108, -0x2000); + + if (i_this->mDemoCamTimer == 2) { + player->onForceHorseGetOff(); + } + + if (i_this->mDemoCamTimer == 5) { + i_this->mDemoCamMode = 92; + i_this->mDemoCamTimer = 0; + } + break; + case 92: + if (i_this->mDemoCamTimer == 1) { + sp108.set(0.0f, 1100.0f, 0.0f); + fopAcM_create(PROC_OBJ_GB, 0xF0069600, &sp108, fopAcM_GetRoomNo(a_this), NULL, NULL, -1); + } + + if (i_this->mDemoCamTimer == 5) { + sp108.set(600.0f, 1100.0f, 0.0f); + player->setPlayerPosAndAngle(&sp108, -0x4802, 0); + a_this->current.pos.set(-600.0f, 1100.0f, 0.0f); + a_this->old.pos = a_this->current.pos; + a_this->current.angle.y = 0x37FE; + a_this->shape_angle.y = 0x37FE; + sp8 = TRUE; + } + break; + case 95: + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(a_this, 2, 0xffff, 0); + a_this->eventInfo.onCondition(2); + return; + } + + i_this->mDemoCamMode = 96; + i_this->mDemoCamTimer = 0; + + daPy_getPlayerActorClass()->changeOriginalDemo(); + horse->changeOriginalDemo(); + + sp108.set(0.0f, 1100.0f, -2000.0f); + horse->setHorsePosAndAngle(&sp108, -0x2000); + + sp108.set(600.0f, 1100.0f, 0.0f); + player->setPlayerPosAndAngle(&sp108, -0x4802, 0); + a_this->current.pos.set(-600.0f, 1100.0f, 0.0f); + + a_this->old.pos = a_this->current.pos; + a_this->current.angle.y = 0x37FE; + a_this->shape_angle.y = 0x37FE; + + sp108.set(0.0f, 1100.0f, 0.0f); + fopAcM_create(PROC_OBJ_GB, 0xF0069600, &sp108, fopAcM_GetRoomNo(a_this), NULL, NULL, -1); + break; + case 96: + i_this->mDemoCamTimer++; + if (i_this->mDemoCamTimer == 2) { + dComIfGp_event_reset(); + sp8 = TRUE; + break; + } + return; + } + + if (sp8) { + if (sp8 == 1) { + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + sp114.x = 0.0f; + sp114.y = 100.0f; + sp114.z = -250.0f; + MtxPosition(&sp114, &i_this->mDemoCamEye); + i_this->mDemoCamEye += player->current.pos; + i_this->mDemoCamCenter = player->current.pos; + i_this->mDemoCamCenter.y += 120.0f; + } + + camera->mCamera.Reset(i_this->mDemoCamCenter, i_this->mDemoCamEye); + camera->mCamera.Start(); + camera->mCamera.SetTrimSize(0); + dComIfGp_event_reset(); + daPy_getPlayerActorClass()->cancelOriginalDemo(); + i_this->mDemoCamMode = 0; + } + + if (i_this->mDemoCamMode > 0) { + cXyz center; + cXyz eye; + center = i_this->mDemoCamCenter; + eye = i_this->mDemoCamEye; + camera->mCamera.Set(center, eye, i_this->field_0x2710.x, 0); + + i_this->mDemoCamTimer++; + if (i_this->mDemoCamTimer > 10000) { + i_this->mDemoCamTimer = 10000; } } } /* 805FDAE0-805FEC58 009180 1178+00 1/1 0/0 0/0 .text anm_se_set__FP11b_gnd_class */ static void anm_se_set(b_gnd_class* i_this) { - // NONMATCHING - if (i_this->mAnmID == 74 && i_this->mpModelMorf->checkFrame(15.0f) || - i_this->mAnmID == 72 && i_this->mpModelMorf->checkFrame(86.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_SPUR, -1); - } else if (i_this->mAnmID == 59 && i_this->mpModelMorf->checkFrame(1.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_BRAKE, -1); - } else if (i_this->mAnmID == 52 && i_this->mpModelMorf->checkFrame(1.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_ATTACK01A, -1); - } else if ((i_this->mAnmID == 53 || i_this->mAnmID == 54) && i_this->mpModelMorf->checkFrame(1.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_ATTACK01B, -1); - } else if (i_this->mAnmID == 56 && i_this->mpModelMorf->checkFrame(21.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_ATTACK02A, -1); - } else if (i_this->mAnmID == 71 && i_this->mpModelMorf->checkFrame(1.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_JUMP_START, -1); - } else if ((i_this->mAnmID == 62 || i_this->mAnmID == 63) && i_this->mpModelMorf->checkFrame(1.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_DAMAGE02, -1); - } else if (i_this->mAnmID == 72 && i_this->mpModelMorf->checkFrame(1.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_RETURN, -1); + if (i_this->mAnmID == B_GND_BCK_EGND_RSPUR && i_this->mpModelMorf->checkFrame(15.0f) || + i_this->mAnmID == B_GND_BCK_EGND_RRETURN && i_this->mpModelMorf->checkFrame(86.0f)) { + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_SPUR, -1); + } else if (i_this->mAnmID == B_GND_BCK_EGND_RBRAKE && i_this->mpModelMorf->checkFrame(1.0f)) { + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_BRAKE, -1); + } else if (i_this->mAnmID == B_GND_BCK_EGND_RATTACK01_A && i_this->mpModelMorf->checkFrame(1.0f)) { + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_ATTACK01A, -1); + } else if ((i_this->mAnmID == B_GND_BCK_EGND_RATTACK01_B || i_this->mAnmID == B_GND_BCK_EGND_RATTACK01_C) && i_this->mpModelMorf->checkFrame(1.0f)) { + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_ATTACK01B, -1); + } else if (i_this->mAnmID == B_GND_BCK_EGND_RATTACK02_A && i_this->mpModelMorf->checkFrame(21.0f)) { + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_ATTACK02A, -1); + } else if (i_this->mAnmID == B_GND_BCK_EGND_RJUMP_START && i_this->mpModelMorf->checkFrame(1.0f)) { + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_JUMP_START, -1); + } else if ((i_this->mAnmID == B_GND_BCK_EGND_RDAMEGE02L || i_this->mAnmID == B_GND_BCK_EGND_RDAMEGE02R) && i_this->mpModelMorf->checkFrame(1.0f)) { + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_DAMAGE02, -1); + } else if (i_this->mAnmID == B_GND_BCK_EGND_RRETURN && i_this->mpModelMorf->checkFrame(1.0f)) { + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_RETURN, -1); } - if (i_this->mAnmID == 93 && (i_this->mpModelMorf->checkFrame(1.0f) || i_this->mpModelMorf->checkFrame(26.0f))) { - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_FOOTNOTE, 0, -1); - } else if (i_this->mAnmID == 32 && i_this->mpModelMorf->checkFrame(25.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_CHOUHATU, -1); - } else if (i_this->mAnmID == 19) { + if (i_this->mAnmID == B_GND_BCK_EGND_WALK && (i_this->mpModelMorf->checkFrame(1.0f) || i_this->mpModelMorf->checkFrame(26.0f))) { + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_FOOTNOTE, 0, -1); + } else if (i_this->mAnmID == B_GND_BCK_EGND_CHOUHATU && i_this->mpModelMorf->checkFrame(25.0f)) { + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_CHOUHATU, -1); + } else if (i_this->mAnmID == B_GND_BCK_EGND_ATTACKA) { if (i_this->mpModelMorf->checkFrame(15.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_ATTACKA, -1); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_ATTACKA, -1); } else if (i_this->mpModelMorf->checkFrame(17.0f)) { - i_this->mZ2Creature.startCreatureExtraSound(Z2SE_EN_GND_ATTACKA, 0, -1); + i_this->mGndSound.startCreatureExtraSound(Z2SE_EN_GND_ATTACKA, 0, -1); } else if (i_this->mpModelMorf->checkFrame(21.0f)) { - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_MANTEAU, 0, -1); + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_MANTEAU, 0, -1); } - } else if (i_this->mAnmID == 20) { + } else if (i_this->mAnmID == B_GND_BCK_EGND_ATTACKB) { if (i_this->mpModelMorf->checkFrame(14.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_ATTACKB, -1); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_ATTACKB, -1); } else if (i_this->mpModelMorf->checkFrame(16.5f)) { - i_this->mZ2Creature.startCreatureExtraSound(Z2SE_EN_GND_ATTACKB, 0, -1); + i_this->mGndSound.startCreatureExtraSound(Z2SE_EN_GND_ATTACKB, 0, -1); } else if (i_this->mpModelMorf->checkFrame(21.0f)) { - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_MANTEAU, 0, -1); + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_MANTEAU, 0, -1); } - } else if (i_this->mAnmID == 21) { + } else if (i_this->mAnmID == B_GND_BCK_EGND_ATTACKC_A) { if (i_this->mpModelMorf->checkFrame(1.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_ATTACKC_A, -1); - i_this->mZ2Creature.startCreatureExtraSound(Z2SE_EN_GND_ATTACKC_A, 0, -1); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_ATTACKC_A, -1); + i_this->mGndSound.startCreatureExtraSound(Z2SE_EN_GND_ATTACKC_A, 0, -1); } - } else if (i_this->mAnmID == 22 && (i_this->mpModelMorf->checkFrame(2.0f) || i_this->mpModelMorf->checkFrame(9.5f))) { - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_FOOTNOTE, 0, -1); - } else if (i_this->mAnmID == 23) { + } else if (i_this->mAnmID == B_GND_BCK_EGND_ATTACKC_B && (i_this->mpModelMorf->checkFrame(2.0f) || i_this->mpModelMorf->checkFrame(9.5f))) { + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_FOOTNOTE, 0, -1); + } else if (i_this->mAnmID == B_GND_BCK_EGND_ATTACKC_C) { if (i_this->mpModelMorf->checkFrame(1.0f) || i_this->mpModelMorf->checkFrame(5.0f) || i_this->mpModelMorf->checkFrame(7.0f)) { - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_FOOTNOTE, 0, -1); + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_FOOTNOTE, 0, -1); } else if (i_this->mpModelMorf->checkFrame(13.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_ATTACKC_C, -1); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_ATTACKC_C, -1); } else if (i_this->mpModelMorf->checkFrame(19.0f)) { - i_this->mZ2Creature.startCreatureExtraSound(Z2SE_EN_GND_ATTACKC_C, 0, -1); + i_this->mGndSound.startCreatureExtraSound(Z2SE_EN_GND_ATTACKC_C, 0, -1); } else if (i_this->mpModelMorf->checkFrame(21.0f)) { - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_MANTEAU, 0, -1); + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_MANTEAU, 0, -1); } - } else if (i_this->mAnmID == 24 && i_this->mpModelMorf->checkFrame(3.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_ATTACKD, -1); - i_this->mZ2Creature.startCreatureExtraSound(Z2SE_EN_GND_ATTACKD, 0, -1); - } else if (i_this->mAnmID == 25 && i_this->mpModelMorf->checkFrame(1.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_ATTACKE_A, -1); - i_this->mZ2Creature.startCreatureExtraSound(Z2SE_EN_GND_ATTACKE_A, 0, -1); - } else if (i_this->mAnmID == 26) { + } else if (i_this->mAnmID == B_GND_BCK_EGND_ATTACKD && i_this->mpModelMorf->checkFrame(3.0f)) { + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_ATTACKD, -1); + i_this->mGndSound.startCreatureExtraSound(Z2SE_EN_GND_ATTACKD, 0, -1); + } else if (i_this->mAnmID == B_GND_BCK_EGND_ATTACKE_A && i_this->mpModelMorf->checkFrame(1.0f)) { + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_ATTACKE_A, -1); + i_this->mGndSound.startCreatureExtraSound(Z2SE_EN_GND_ATTACKE_A, 0, -1); + } else if (i_this->mAnmID == B_GND_BCK_EGND_ATTACKE_B) { if (i_this->mpModelMorf->checkFrame(2.0f)) { - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_FN_SLIDE, 0, -1); + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_FN_SLIDE, 0, -1); } else if (i_this->mpModelMorf->checkFrame(8.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_ATTACKE_B, -1); - i_this->mZ2Creature.startCreatureExtraSound(Z2SE_EN_GND_ATTACKE_B, 0, -1); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_ATTACKE_B, -1); + i_this->mGndSound.startCreatureExtraSound(Z2SE_EN_GND_ATTACKE_B, 0, -1); } else if (i_this->mpModelMorf->checkFrame(21.0f)) { - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_MANTEAU, 0, -1); + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_MANTEAU, 0, -1); } - } else if (i_this->mAnmID == 29) { + } else if (i_this->mAnmID == B_GND_BCK_EGND_ATTACKE_C2) { if (i_this->mpModelMorf->checkFrame(8.0f)) { - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_FN_SLIDE, 0, -1); - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_ATTACKE_C2, -1); - i_this->mZ2Creature.startCreatureExtraSound(Z2SE_EN_GND_ATTACKE_C2, 0, -1); + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_FN_SLIDE, 0, -1); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_ATTACKE_C2, -1); + i_this->mGndSound.startCreatureExtraSound(Z2SE_EN_GND_ATTACKE_C2, 0, -1); } else if (i_this->mpModelMorf->checkFrame(17.0f)) { - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_MANTEAU, 0, -1); + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_MANTEAU, 0, -1); } - } else if (i_this->mAnmID == 30) { + } else if (i_this->mAnmID == B_GND_BCK_EGND_ATTACKF) { if (i_this->mpModelMorf->checkFrame(11.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_ATTACK_F, -1); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_ATTACK_F, -1); } else if (i_this->mpModelMorf->checkFrame(13.0f)) { - i_this->mZ2Creature.startCreatureExtraSound(Z2SE_EN_GND_ATTACK_F, 0, -1); + i_this->mGndSound.startCreatureExtraSound(Z2SE_EN_GND_ATTACK_F, 0, -1); } else if (i_this->mpModelMorf->checkFrame(19.0f) || i_this->mpModelMorf->checkFrame(28.0f)) { - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_FN_SLIDE, 0, -1); + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_FN_SLIDE, 0, -1); } else if (i_this->mpModelMorf->checkFrame(31.0f)) { - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_MANTEAU, 0, -1); + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_MANTEAU, 0, -1); } - } else if (i_this->mAnmID == 31) { + } else if (i_this->mAnmID == B_GND_BCK_EGND_ATTACKG) { if (i_this->mpModelMorf->checkFrame(17.0f)) { - i_this->mZ2Creature.startCreatureExtraSound(Z2SE_EN_GND_ATTACK_G1, 0, -1); - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_ATTACK_G1, -1); + i_this->mGndSound.startCreatureExtraSound(Z2SE_EN_GND_ATTACK_G1, 0, -1); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_ATTACK_G1, -1); } else if (i_this->mpModelMorf->checkFrame(32.0f)) { - i_this->mZ2Creature.startCreatureExtraSound(Z2SE_EN_GND_ATTACK_G2, 0, -1); - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_ATTACK_G2, -1); + i_this->mGndSound.startCreatureExtraSound(Z2SE_EN_GND_ATTACK_G2, 0, -1); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_ATTACK_G2, -1); } else if (i_this->mpModelMorf->checkFrame(26.0f)) { - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_MANTEAU, 0, -1); + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_MANTEAU, 0, -1); } - } else if (i_this->mAnmID == 44) { + } else if (i_this->mAnmID == B_GND_BCK_EGND_JUMP_A) { if (i_this->mpModelMorf->checkFrame(8.0f)) { - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_JUMP, 0, -1); - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_JUMP, -1); + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_JUMP, 0, -1); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_JUMP, -1); } - } else if (i_this->mAnmID == 80 || i_this->mAnmID == 78) { + } else if (i_this->mAnmID == B_GND_BCK_EGND_SIDEJUMP_RA || i_this->mAnmID == B_GND_BCK_EGND_SIDEJUMP_LA) { if (i_this->mpModelMorf->checkFrame(3.0f)) { - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_JUMP, 0, -1); - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_JUMP, -1); + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_JUMP, 0, -1); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_JUMP, -1); } - } else if (i_this->mAnmID == 89 && i_this->mpModelMorf->checkFrame(14.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_TUBAZERI_WIN, -1); - i_this->mZ2Creature.startCreatureExtraSound(Z2SE_EN_GND_TUBAZERI_PUSH, 0, -1); - } else if (i_this->mAnmID == 88) { + } else if (i_this->mAnmID == B_GND_BCK_EGND_TUBAZERI_WIN && i_this->mpModelMorf->checkFrame(14.0f)) { + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_TUBAZERI_WIN, -1); + i_this->mGndSound.startCreatureExtraSound(Z2SE_EN_GND_TUBAZERI_PUSH, 0, -1); + } else if (i_this->mAnmID == B_GND_BCK_EGND_TUBAZERI_LOSE) { if (i_this->mpModelMorf->checkFrame(12.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_TUBAZERI_LOSE, -1); - i_this->mZ2Creature.startCreatureExtraSound(Z2SE_EN_GND_TUBAZERI_PUSH, 0, -1); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_TUBAZERI_LOSE, -1); + i_this->mGndSound.startCreatureExtraSound(Z2SE_EN_GND_TUBAZERI_PUSH, 0, -1); } else if (i_this->mpModelMorf->checkFrame(18.0f) || i_this->mpModelMorf->checkFrame(24.0f) || i_this->mpModelMorf->checkFrame(31.0f) || i_this->mpModelMorf->checkFrame(55.0f)) { - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_FOOTNOTE, 0, -1); + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_FOOTNOTE, 0, -1); } - } else if (i_this->mAnmID == 40 && i_this->mpModelMorf->checkFrame(1.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_DAMAGE_DOWN, -1); - } else if (i_this->mAnmID == 43 && i_this->mpModelMorf->checkFrame(1.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_DOWNWAIT, -1); - } else if (i_this->mAnmID == 42) { + } else if (i_this->mAnmID == B_GND_BCK_EGND_DOWN && i_this->mpModelMorf->checkFrame(1.0f)) { + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_DAMAGE_DOWN, -1); + } else if (i_this->mAnmID == B_GND_BCK_EGND_DOWNWAIT && i_this->mpModelMorf->checkFrame(1.0f)) { + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_DOWNWAIT, -1); + } else if (i_this->mAnmID == B_GND_BCK_EGND_DOWNUP) { if (i_this->mpModelMorf->checkFrame(12.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_DOWNUP, -1); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_DOWNUP, -1); } else if (i_this->mpModelMorf->checkFrame(27.0f)) { - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_LAND, 0, -1); + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_LAND, 0, -1); } - } else if (i_this->mAnmID == 41) { + } else if (i_this->mAnmID == B_GND_BCK_EGND_DOWNB) { if (i_this->mpModelMorf->checkFrame(1.0f)) { - i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_DOWNB, -1); + i_this->mGndSound.startCreatureVoice(Z2SE_EN_GND_V_DOWNB, -1); } else if (i_this->mpModelMorf->checkFrame(17.0f)) { - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_LAND, 0, -1); + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_LAND, 0, -1); } else if (i_this->mpModelMorf->checkFrame(55.0f)) { - i_this->mZ2Creature.startCreatureSound(Z2SE_EN_GND_MANTEAU, 0, -1); + i_this->mGndSound.startCreatureSound(Z2SE_EN_GND_MANTEAU, 0, -1); } } } -// /* ############################################################################################## */ -// /* 80602954-80602958 0002F0 0004+00 0/1 0/0 0/0 .rodata @8733 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_8733 = -20.0f; -// COMPILER_STRIP_GATE(0x80602954, &lit_8733); -// #pragma pop - -// /* 80602958-8060295C 0002F4 0004+00 0/1 0/0 0/0 .rodata @8734 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_8734 = -100.0f; -// COMPILER_STRIP_GATE(0x80602958, &lit_8734); -// #pragma pop - -// /* 8060295C-80602960 0002F8 0004+00 0/1 0/0 0/0 .rodata @8735 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_8735 = 7.5f; -// COMPILER_STRIP_GATE(0x8060295C, &lit_8735); -// #pragma pop - -// /* 80602960-80602964 0002FC 0004+00 0/1 0/0 0/0 .rodata @8736 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_8736 = -1000000000.0f; -// COMPILER_STRIP_GATE(0x80602960, &lit_8736); -// #pragma pop - -// /* 80602964-80602968 000300 0004+00 0/1 0/0 0/0 .rodata @8737 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_8737 = -30.0f; -// COMPILER_STRIP_GATE(0x80602964, &lit_8737); -// #pragma pop - -// /* 80602968-8060296C 000304 0004+00 0/1 0/0 0/0 .rodata @8738 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_8738 = -1200.0f; -// COMPILER_STRIP_GATE(0x80602968, &lit_8738); -// #pragma pop - -// /* 8060296C-80602970 000308 0004+00 0/1 0/0 0/0 .rodata @8739 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static u32 const lit_8739 = 0x42A39EB8; -// COMPILER_STRIP_GATE(0x8060296C, &lit_8739); -// #pragma pop - -// /* 80602970-80602974 00030C 0004+00 0/1 0/0 0/0 .rodata @8740 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_8740 = 127.0f / 50.0f; -// COMPILER_STRIP_GATE(0x80602970, &lit_8740); -// #pragma pop - -// /* 80602974-80602978 000310 0004+00 0/1 0/0 0/0 .rodata @8741 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_8741 = 29.0f / 10.0f; -// COMPILER_STRIP_GATE(0x80602974, &lit_8741); -// #pragma pop - -// /* 80602978-8060297C 000314 0004+00 0/1 0/0 0/0 .rodata @8742 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_8742 = -130.0f; -// COMPILER_STRIP_GATE(0x80602978, &lit_8742); -// #pragma pop - -// /* 8060297C-80602980 000318 0004+00 0/1 0/0 0/0 .rodata @8743 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_8743 = 130.0f; -// COMPILER_STRIP_GATE(0x8060297C, &lit_8743); -// #pragma pop - -// /* 80602980-80602984 00031C 0004+00 0/1 0/0 0/0 .rodata @8744 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_8744 = 20000.0f; -// COMPILER_STRIP_GATE(0x80602980, &lit_8744); -// #pragma pop - -// /* 80602984-80602988 000320 0004+00 0/1 0/0 0/0 .rodata @8745 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_8745 = 13000.0f; -// COMPILER_STRIP_GATE(0x80602984, &lit_8745); -// #pragma pop - -// /* 80602988-8060298C 000324 0004+00 0/1 0/0 0/0 .rodata @8746 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_8746 = -20000.0f; -// COMPILER_STRIP_GATE(0x80602988, &lit_8746); -// #pragma pop - -// /* 8060298C-80602990 000328 0004+00 0/1 0/0 0/0 .rodata @8747 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_8747 = 100000.0f; -// COMPILER_STRIP_GATE(0x8060298C, &lit_8747); -// #pragma pop - -// /* 80602990-80602994 00032C 0004+00 0/1 0/0 0/0 .rodata @8748 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_8748 = -13456.0f; -// COMPILER_STRIP_GATE(0x80602990, &lit_8748); -// #pragma pop - -// /* 80602994-80602998 000330 0004+00 0/1 0/0 0/0 .rodata @8749 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_8749 = -17.0f; -// COMPILER_STRIP_GATE(0x80602994, &lit_8749); -// #pragma pop - -// /* 80602998-8060299C 000334 0004+00 0/1 0/0 0/0 .rodata @8750 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_8750 = 0.25f; -// COMPILER_STRIP_GATE(0x80602998, &lit_8750); -// #pragma pop - -// /* 8060299C-806029A0 000338 0004+00 0/1 0/0 0/0 .rodata @8751 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_8751 = 1500.0f; -// COMPILER_STRIP_GATE(0x8060299C, &lit_8751); -// #pragma pop - -// /* 806029A0-806029A4 00033C 0004+00 0/1 0/0 0/0 .rodata @8752 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_8752 = -15.0f; -// COMPILER_STRIP_GATE(0x806029A0, &lit_8752); -// #pragma pop - /* 805FEC58-806009F8 00A2F8 1DA0+00 2/1 0/0 0/0 .text daB_GND_Execute__FP11b_gnd_class */ static int daB_GND_Execute(b_gnd_class* i_this) { - // NONMATCHING - static u32 footJ[4] = { - 6, 10, 30, 34 - }; - static u16 b_id[6] = { - 0x8A37, 0x8A38, 0x8A39, 0x8A3A, 0x8A3B, 0x8C24 - }; - static u16 b_id2[5] = { - 0x8A3D, 0x8A3E, 0x8A3F, 0x8A40, 0x8A41 - }; - static u16 bun_xs[10] = { - 0xC316, 0x0000, 0xC296, 0x0000, 0x0000, 0x0000, 0x4296, 0x0000, 0x4316, 0x0000 - }; + fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); + cXyz sp118; + cXyz sp10C; + cXyz sp100; - dBgS_GndChk GndChk; - cXyz local_110; - cXyz local_11c; - cXyz local_128; - cXyz local_134; - cXyz local_140; - cXyz local_14c; - cXyz cStack_188; - f32 fVar1; - f32 fVar24; - u32 uVar7; - int rv; - daPy_py_c* player = daPy_getPlayerActorClass(); + if (i_this->mDemoCamMode == 0 && !player->checkElecDamage() && dComIfGp_event_runCheck()) { + return 1; + } + if (i_this->mNoDrawTimer != 0) { + i_this->mNoDrawTimer--; + if (i_this->mNoDrawTimer == 0) { + dScnKy_env_light_c* kankyo = dKy_getEnvlight(); + kankyo->field_0x12cc = 1; - if (i_this->field_0x26c4 != 0 || player->checkElecDamage() || dComIfGp_event_runCheck()) { - rv = 1; - } else if (i_this->field_0x2738 != 0) { - i_this->field_0x2738 -= 1; - if (i_this->field_0x2738 == 0) { - dKy_getEnvlight()->field_0x12cc = 1; - i_this->mActionID = ACTION_WAIT; - i_this->field_0x05bc = 0; - i_this->field_0x1fc4 = 0; - i_this->speedF = 0.0f; + i_this->mActionMode = ACTION_WAIT; + i_this->mMoveMode = 0; + i_this->mDrawHorse = FALSE; + a_this->speedF = 0.0f; - mant_class* mantActor = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); - mantActor->field_0x3969 = 1; + mant_class* mant_p = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); + mant_p->field_0x3969 = 1; - h_anm_init(i_this, 5, 3.0f, 0, 1.0f); + h_anm_init(i_this, B_HG_BCK_HG_DOWN, 3.0f, 0, 1.0f); - i_this->field_0x26c4 = 95; + i_this->mDemoCamMode = 95; fpcM_Search(s_fkdel_sub, i_this); - i_this->health = 100; + a_this->health = 100; i_this->field_0x1e0a = 0; Z2GetAudioMgr()->bgmStart(Z2BGM_VS_GANON_04, 0, 0); dComIfGs_onOneZoneSwitch(15, -1); + } else { + return 1; } - } else { - rv = 1; } - daPy_py_c* linkActor = daPy_getLinkPlayerActorClass(); if (dComIfGp_event_runCheck()) { - daPy_py_c* midnaActor = (daPy_py_c *)daPy_py_c::getMidnaActor(); - if (fopAcM_getTalkEventPartner(linkActor) == midnaActor) { - rv = 1; + if (fopAcM_getTalkEventPartner(daPy_getLinkPlayerActorClass()) == (fopAc_ac_c*)daPy_py_c::getMidnaActor()) { + return 1; + } + } + + i_this->mCounter++; + + for (int i = 0; i < 10; i++) { + if (i_this->field_0xc44[i] != 0) { + i_this->field_0xc44[i]--; + } + } + + if (i_this->mDamageInvulnerabilityTimer != 0) { + i_this->mDamageInvulnerabilityTimer--; + } + + if (i_this->field_0xc5a != 0) { + i_this->field_0xc5a--; + } + + if (i_this->field_0xc72 != 0) { + i_this->field_0xc72--; + } + + action(i_this); + demo_camera(i_this); + + if (i_this->mDrawHorse) { + h_damage_check(i_this); + i_this->mGakeChkType = gake_check(i_this); + + if (a_this->speed.y <= 0.0f && i_this->mAcch.ChkGroundHit()) { + dBgS_GndChk sp124; + Vec spF4; + cXyz spE8; + + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + sp118.x = 0.0f; + sp118.y = 200.0f; + sp118.z = 200.0f; + MtxPosition(&sp118, &sp10C); + sp10C += a_this->current.pos; + + sp118.z = 0.0f; + MtxPosition(&sp118, &spE8); + spE8 += a_this->current.pos; + + spF4.x = sp10C.x; + spF4.y = sp10C.y; + spF4.z = sp10C.z; + sp124.SetPos(&spF4); + sp10C.y = dComIfG_Bgsp().GroundCross(&sp124); + + spF4.x = spE8.x; + spF4.y = spE8.y; + spF4.z = spE8.z; + sp124.SetPos(&spF4); + spE8.y = dComIfG_Bgsp().GroundCross(&sp124); + + if (fabsf(sp10C.y - spE8.y) <= 200.0f) { + a_this->current.angle.x = -cM_atan2s(sp10C.y - spE8.y, 200.0f); + } + + a_this->speed.y = -20.0f; } } else { - i_this->field_0x0afc += 1; + damage_check(i_this); + } - for (int i = 0; i < 10; i++) { - if (i_this->field_0x0c44[i] != 0) { - i_this->field_0x0c44[i]--; - } - } + cLib_addCalcAngleS2(&a_this->shape_angle.x, a_this->current.angle.x, 2, 0x1000); + cLib_addCalcAngleS2(&a_this->shape_angle.z, a_this->current.angle.z, 2, 0x1000); + a_this->gravity = -5.0f; - if (i_this->field_0x0c58 != 0) { - i_this->field_0x0c58--; - } + cMtx_YrotS(*calc_mtx, a_this->current.angle.y); + sp118.x = 0.0f; + sp118.y = 0.0f; + sp118.z = a_this->speedF; + MtxPosition(&sp118, &sp10C); - if (i_this->field_0x0c5a != 0) { - i_this->field_0x0c5a--; - } + a_this->speed.x = sp10C.x; + a_this->speed.z = sp10C.z; - if (i_this->field_0x0c72 != 0) { - i_this->field_0x0c72--; - } + a_this->current.pos += a_this->speed; - action(i_this); - demo_camera(i_this); + a_this->speed.y += a_this->gravity; + if (a_this->speed.y < -100.0f) { + a_this->speed.y = -100.0f; + } - if (i_this->field_0x1fc4 != 0) { - h_damage_check(i_this); - i_this->field_0x0c76 = gake_check(i_this); + if (i_this->field_0xeb0 > 0.1f) { + sp118.x = 0.0f; + sp118.y = 0.0f; + sp118.z = -i_this->field_0xeb0; + cMtx_YrotS(*calc_mtx, i_this->field_0xeac); + MtxPosition(&sp118, &sp10C); + a_this->current.pos += sp10C; + cLib_addCalc0(&i_this->field_0xeb0, 1.0f, 7.5f); + } - if (i_this->speed.y <= 0.0f && i_this->field_0x0cd4.ChkGroundHit()) { - dBgS_GndChk(GndChk); + if (i_this->mDrawHorse) { + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + sp118.set(0.0f, 0.0f, 150.0f); + MtxPosition(&sp118, &sp10C); + + a_this->current.pos += sp10C; + a_this->old.pos += sp10C; + i_this->mAcch.CrrPos(dComIfG_Bgsp()); - cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); - local_110 = cXyz(0.0f, 200.0f, 200.0f); - // local_110.x = 0.0f; - // local_110.y = 200.0f; - // local_110.z = 200.0f; - MtxPosition(&local_110, &local_11c); - local_11c += i_this->current.pos; + a_this->current.pos -= sp10C; + a_this->old.pos -= sp10C; - local_110.z = 0.0f; - MtxPosition(&local_110, &local_134); - local_134 += i_this->current.pos; + i_this->field_0xeb4 = a_this->current.pos; + i_this->field_0xec0 = a_this->shape_angle; + } else { + i_this->mAcch.CrrPos(dComIfG_Bgsp()); + } - // local_128 = local_11c; + J3DModel* sp6C; + if (i_this->mDrawHorse) { + mDoMtx_stack_c::transS(i_this->field_0xeb4.x, i_this->field_0xeb4.y, i_this->field_0xeb4.z); + mDoMtx_stack_c::YrotM(i_this->field_0xec0.y); + mDoMtx_stack_c::XrotM(i_this->field_0xec0.x); + mDoMtx_stack_c::ZrotM(i_this->field_0xec0.z + i_this->mHorseLegRot); - GndChk.SetPos(&local_128); - local_11c.y = dComIfG_Bgsp().GroundCross(&GndChk); + cLib_addCalcAngleS2(&i_this->mHorseLegRot, 0, 8, 0x100); - // local_128 = local_134; + mDoMtx_stack_c::scaleM(l_HIO.model_size * a_this->scale.x, l_HIO.model_size * a_this->scale.x, l_HIO.model_size * a_this->scale.x); + sp6C = i_this->mpHorseMorf->getModel(); + sp6C->setBaseTRMtx(mDoMtx_stack_c::get()); - GndChk.SetPos(&local_128); - local_134.y = dComIfG_Bgsp().GroundCross(&GndChk); - - if (fabsf(local_11c.y - fVar24) <= 200.0f) { - i_this->current.angle.x = -cM_atan2s(local_11c.y - fVar24, 200.0f); - } - - i_this->speed.y = -20.0f; + u32 sp68; + if (i_this->mAcch.GetGroundH() != -1000000000.0f) { + if (i_this->mAcch.ChkWaterHit() && i_this->mAcch.m_wtr.GetHeight() > a_this->current.pos.y) { + sp68 = dKy_pol_sound_get(&i_this->mAcch.m_wtr); + } else if (i_this->mAcch.ChkGroundHit()) { + sp68 = dKy_pol_sound_get(&i_this->mAcch.m_gnd); } else { - damage_check(i_this); + sp68 = 0; } - } - - 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); - i_this->gravity = -5.0f; - - cMtx_YrotS(*calc_mtx, i_this->current.angle.y); - local_110.set(0.0f, 0.0f, i_this->speedF); - MtxPosition(&local_110, &local_11c); - - i_this->speed.x = local_11c.x; - i_this->speed.z = local_11c.z; - - i_this->current.pos += i_this->speed; - - // i_this->speed += i_this->gravity; - if (i_this->speed.y < -100.0f) { - i_this->speed.y = -100.0f; - } - - if (i_this->field_0x0eb0 > 0.1f) { - local_110.set(0.0f, 0.0f, i_this->field_0x0eb0); - cMtx_YrotS(*calc_mtx, i_this->field_0x0eac); - MtxPosition(&local_110, &local_11c); - i_this->current.pos += local_11c; - cLib_addCalc0(&i_this->field_0x0eb0, 1.0f, 7.5f); - } - - if (i_this->field_0x1fc4 != 0) { - cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); - local_110.set(0.0f, 0.0f, 150.0f); - MtxPosition(&local_110, &local_11c); - - i_this->current.pos += local_11c; - i_this->old.pos += local_11c; - i_this->field_0x0cd4.CrrPos(dComIfG_Bgsp()); - - i_this->current.pos -= local_11c; - i_this->old.pos -= local_11c; - - i_this->field_0x0eb4 = i_this->current.pos; - i_this->field_0x0ec0 = i_this->shape_angle; } else { - i_this->field_0x0cd4.CrrPos(dComIfG_Bgsp()); + sp68 = 0; } - if (i_this->field_0x1fc4 != 0) { - PSMTXTrans(mDoMtx_stack_c::now, i_this->field_0x0eb4.x, i_this->field_0x0eb4.y, - i_this->field_0x0eb4.z); - cMtx_YrotM(mDoMtx_stack_c::now, (int)i_this->field_0x0ec0.y); - cMtx_XrotM(mDoMtx_stack_c::now, i_this->field_0x0ec0.x); - cMtx_ZrotM(mDoMtx_stack_c::now, i_this->field_0x0ec0.z + i_this->field_0x0c5c); + i_this->mpHorseMorf->play(sp68, dComIfGp_getReverb(fopAcM_GetRoomNo(a_this))); + i_this->mpHorseMorf->modelCalc(); + MTXCopy(sp6C->getAnmMtx(2), *calc_mtx); - cLib_addCalcAngleS2(&i_this->field_0x0c5c, 0, 8, 0x100); - mDoMtx_stack_c::scaleM(l_HIO.model_size * i_this->scale.x, - l_HIO.model_size * i_this->scale.x, l_HIO.model_size * i_this->scale.x); + sp118.set(70.0f, 60.0f, 0.0f); + MtxPosition(&sp118, &sp10C); + i_this->mHorseBodySph[0].SetC(sp10C); + i_this->mHorseBodySph[0].SetR(100.0f); - // PSMTXCopy(mDoMtx_stack_c::now, i_this->mpHorseMorf->mpModel->mBaseTransformMtx); - i_this->mpHorseMorf->getModel()->setBaseTRMtx(mDoMtx_stack_c::now); + MTXCopy(sp6C->getAnmMtx(26), *calc_mtx); - if (i_this->field_0x0cd4.GetGroundH() != -1000000000.0f) { - // uVar7 = i_this->field_0x0cd4.m_flags; - if (!i_this->field_0x0cd4.ChkWaterHit() || i_this->field_0x0cd4.m_wtr.GetHeight() > i_this->current.pos.y) { - uVar7 = dKy_pol_sound_get(&i_this->field_0x0cd4.m_wtr) & 0xff; - } else { - if (!i_this->field_0x0cd4.ChkGroundHit()) { - uVar7 = dKy_pol_sound_get(&i_this->field_0x0cd4.m_gnd) & 0xff; - } else { - uVar7 = 0; - } - } + sp118.set(10.0f, -30.0f, 0.0f); + MtxPosition(&sp118, &i_this->field_0x1fb8); + + i_this->mHorseBodySph[1].SetC(i_this->field_0x1fb8); + i_this->mHorseBodySph[1].SetR(90.0f); + + i_this->mHorseBodySph[0].OffAtSetBit(); + i_this->mHorseBodySph[1].OffAtSetBit(); + + if (i_this->field_0x1e08 != 0) { + i_this->mHorseBodySph[0].OffTgSetBit(); + i_this->mHorseBodySph[1].OffTgSetBit(); + } else { + i_this->mHorseBodySph[0].OnTgSetBit(); + i_this->mHorseBodySph[1].OnTgSetBit(); + } + + dComIfG_Ccsp()->Set(&i_this->mHorseBodySph[0]); + dComIfG_Ccsp()->Set(&i_this->mHorseBodySph[1]); + + for (int i = 0; i < 4; i++) { + static int footJ[4] = {6, 10, 30, 34}; + MTXCopy(sp6C->getAnmMtx(footJ[i]), *calc_mtx); + sp118.set(0.0f, 0.0f, 0.0f); + MtxPosition(&sp118, &sp10C); + + i_this->mHorseFootSph[i].SetC(sp10C); + i_this->mHorseFootSph[i].SetR(40.0f); + + if (i_this->field_0x1e08 == 0 && i < 2 && a_this->speedF > 10.0f) { + i_this->mHorseFootSph[i].OnAtSetBit(); } else { - uVar7 = 0; + i_this->mHorseFootSph[i].OffAtSetBit(); } - i_this->mpHorseMorf->play(uVar7, dComIfGp_getReverb((int)fopAcM_GetRoomNo((fopAc_ac_c*)i_this))); - i_this->mpHorseMorf->modelCalc(); - - PSMTXCopy(i_this->mpHorseMorf->getModel()->getMtxBuffer()->getAnmMtx(2), *calc_mtx); - - local_110.set(70.0f, 60.0f, 0.0f); - MtxPosition(&local_110, &local_11c); - i_this->mHorseSpheres1[0].SetC(local_11c); - i_this->mHorseSpheres1[0].SetR(100.0f); - - PSMTXCopy(i_this->mpHorseMorf->getModel()->getMtxBuffer()->getAnmMtx(26), *calc_mtx); - - local_110.set(10.0f, -30.0f, 0.0f); - MtxPosition(&local_110, &i_this->field_0x1fb8); - - i_this->mHorseSpheres1[1].SetC(i_this->field_0x1fb8); - i_this->mHorseSpheres1[1].SetR(90.0f); - - i_this->mHorseSpheres1[0].OffAtSetBit(); - i_this->mHorseSpheres1[1].OffAtSetBit(); - if (i_this->field_0x1e08 != 0) { - i_this->mHorseSpheres1[0].OffTgSetBit(); - i_this->mHorseSpheres1[1].OffTgSetBit(); + i_this->mHorseFootSph[i].OffTgSetBit(); } else { - i_this->mHorseSpheres1[0].OnTgSetBit(); - i_this->mHorseSpheres1[1].OnTgSetBit(); + i_this->mHorseFootSph[i].OnTgSetBit(); } - dComIfG_Ccsp()->Set(i_this->mHorseSpheres1); - dComIfG_Ccsp()->Set(i_this->mHorseSpheres1 + 1); - - for (int i = 0; i < 4; i++) { - PSMTXCopy(i_this->mpHorseMorf->getModel()->getMtxBuffer()->getAnmMtx(footJ[i]), *calc_mtx); - local_110.set(0.0f, 0.0f, 0.0f); - MtxPosition(&local_110, &local_11c); - - i_this->mHorseSpheres2[i].SetC(local_11c); - i_this->mHorseSpheres2[i].SetR(40.0f); - - if ((i_this->field_0x1e08 != 0 || i >= 2) || i_this->speedF > 10.0f) { - i_this->mHorseSpheres2[i].OnAtSetBit(); - } else { - i_this->mHorseSpheres2[i].OffAtSetBit(); - } - - if (i_this->field_0x1e08 != 0) { - i_this->mHorseSpheres2[i].OffTgSetBit(); - } else { - i_this->mHorseSpheres2[i].OnTgSetBit(); - } - - dComIfG_Ccsp()->Set(&i_this->mHorseSpheres2[i]); - } + dComIfG_Ccsp()->Set(&i_this->mHorseFootSph[i]); } + } - if (i_this->field_0x1fc4 == 0) { - MtxTrans(i_this->current.pos.x, i_this->current.pos.y, i_this->current.pos.z, 0); - cMtx_YrotM(*calc_mtx, (int)i_this->shape_angle.y); - cMtx_XrotM(*calc_mtx, (int)i_this->shape_angle.x); - cMtx_ZrotM(*calc_mtx, (int)i_this->shape_angle.z); - } else { - PSMTXCopy(i_this->mpHorseMorf->getModel()->getMtxBuffer()->getAnmMtx(21), *calc_mtx); - cMtx_ZrotM(*calc_mtx, 0xffffc000); - MtxTrans(0.0f, 55.0f, -30.0f, 1); + if (!i_this->mDrawHorse) { + MtxTrans(a_this->current.pos.x, a_this->current.pos.y, a_this->current.pos.z, 0); + cMtx_YrotM(*calc_mtx, a_this->shape_angle.y); + cMtx_XrotM(*calc_mtx, a_this->shape_angle.x); + cMtx_ZrotM(*calc_mtx, a_this->shape_angle.z); + } else { + MTXCopy(sp6C->getAnmMtx(21), *calc_mtx); + cMtx_ZrotM(*calc_mtx, -0x4000); + MtxTrans(0.0f, 55.0f, -30.0f, 1); + } + + sp6C = i_this->mpModelMorf->getModel(); + sp6C->setBaseTRMtx(*calc_mtx); + i_this->mpModelMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(a_this))); + + if (i_this->mAnmID == B_GND_BCK_EGND_DEFENSE_C || i_this->mAnmID == B_GND_BCK_EGND_DEFENSE_D) { + cLib_addCalcAngleS2(&i_this->mGndShoulderLRotY, cM_ssin(i_this->mCounter * 4000) * 600.0f + -1200.0f, 1, 500); + + if (i_this->field_0x1fc8 != 0) { + i_this->field_0x1fc8--; + i_this->mGndArmRRotX = i_this->field_0x1fc8 * (cM_ssin(i_this->mCounter * 0x5500)) * 90.0f; } + } else { + cLib_addCalcAngleS2(&i_this->mGndShoulderLRotY, 0, 1, 100); + i_this->mGndArmRRotX = 0; + i_this->field_0x1fc8 = 0; + } - // C_MTXCopy(i_this->mpModelMorf->getModel()->getBaseTRMtx(), *calc_mtx); - i_this->mpHorseMorf->getModel()->setBaseTRMtx(*calc_mtx); - i_this->mpHorseMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo((fopAc_ac_c*)i_this))); + i_this->mpGndCoreBrk->play(); - if (i_this->mAnmID == 37 || i_this->mAnmID == 38) { - cLib_addCalcAngleS2(&i_this->field_0x1fcc, - cM_ssin(i_this->field_0x0afc * 4000) * 600.0f + -1200.0f, 1, 500); + if (i_this->mGndEyeBtkNo == 0) { + i_this->mpGndEyeBtk[i_this->mGndEyeBtkNo]->setFrame(0.0f); + } else { + i_this->mpGndEyeBtk[i_this->mGndEyeBtkNo]->play(); + } - if (i_this->field_0x1fc8 != 0) { - i_this->field_0x1fc8--; - i_this->field_0x1fca = i_this->field_0x1fc8 * (cM_ssin(i_this->field_0x0afc * 0x5500)) * 90.0f; - } - } else { - cLib_addCalcAngleS2(&i_this->field_0x1fcc, 0, 1, 100); - i_this->field_0x1fca = 0; - i_this->field_0x1fc8 = 0; - } + i_this->mpGndEyeBtp->setFrame(i_this->field_0xc6c); + i_this->mpModelMorf->modelCalc(); - i_this->field_0x0724->play(); - - if (i_this->field_0x0748 == 0) { - i_this->field_0x0728[0]->setFrame(0.0f); - } else { - i_this->field_0x0724->play(); - } - - i_this->field_0x0744->setFrame(i_this->field_0x0c6c); - i_this->mpModelMorf->modelCalc(); - - if (i_this->field_0x0771 == 0 && i_this->field_0x0772 == 0) { - i_this->field_0x0772++; - PSMTXCopy(i_this->field_0x076c->getBaseTRMtx(), *calc_mtx); + if (!i_this->mHideSheath) { + if (i_this->field_0x772 != 0) { + i_this->field_0x772++; + MTXCopy(i_this->mpSheathModel->getBaseTRMtx(), *calc_mtx); MtxTrans(10.0f, 0.0f, -5.0f, 1); cMtx_YrotM(*calc_mtx, 800); cMtx_XrotM(*calc_mtx, 0); cMtx_ZrotM(*calc_mtx, 0); - if (i_this->field_0x0772 > 20) { - i_this->field_0x0771 = 1; + if (i_this->field_0x772 > 20) { + i_this->mHideSheath = TRUE; } } else { - PSMTXCopy(i_this->mpHorseMorf->getModel()->getMtxBuffer()->getAnmMtx(24), *calc_mtx); + MTXCopy(sp6C->getAnmMtx(24), *calc_mtx); } - PSMTXCopy(i_this->field_0x076c->getBaseTRMtx(), *calc_mtx); + i_this->mpSheathModel->setBaseTRMtx(*calc_mtx); + } - if (i_this->field_0x0770 == 1) { - MtxTrans(81.81f, 2.54f, 2.9f, 1); - cMtx_XrotM(*calc_mtx, 0x226); - cMtx_YrotM(*calc_mtx, 0x2a30); - cMtx_ZrotM(*calc_mtx, 0x4e3e); - PSMTXCopy(i_this->mpModelMorf->getModel()->getBaseTRMtx(), *calc_mtx); - } else { - PSMTXCopy(i_this->mpHorseMorf->getModel()->getMtxBuffer()->getAnmMtx(33), *calc_mtx); - PSMTXCopy(i_this->field_0x0768->getBaseTRMtx(), *calc_mtx); + if (i_this->field_0x770 == 1) { + MtxTrans(81.81f, 2.54f, 2.9f, 1); + cMtx_XrotM(*calc_mtx, 10800); + cMtx_YrotM(*calc_mtx, 550); + cMtx_ZrotM(*calc_mtx, 20030); + i_this->mpSwordModel->setBaseTRMtx(*calc_mtx); + } else { + MTXCopy(sp6C->getAnmMtx(33), *calc_mtx); + i_this->mpSwordModel->setBaseTRMtx(*calc_mtx); + } + + if (i_this->mSwordBlurAlpha >= 80) { + i_this->mSwordBlurType++; + if (i_this->mSwordBlurType > 1) { + i_this->mSwordBlurType = 1; } - if (i_this->field_0x0c24 < 80) { - if (i_this->field_0x0c24 < 11) { - i_this->field_0x0c26 = -1; - i_this->field_0x0c24 = 0; + cMtx_YrotM(*calc_mtx, -0x4048); + cMtx_XrotM(*calc_mtx, 0x32DD); + cMtx_ZrotM(*calc_mtx, i_this->field_0xc28 + 0x4ECF); + MtxTrans(0.0f, 0.0f, -130.0f, 1); + i_this->mpSwordBlurModel[i_this->mSwordBlurType]->setBaseTRMtx(*calc_mtx); + MTXCopy(sp6C->getAnmMtx(33), *calc_mtx); + + i_this->field_0xc28 = 0; + } else if (i_this->mSwordBlurAlpha > 10) { + i_this->mSwordBlurType = 1; + } else { + i_this->mSwordBlurType = -1; + i_this->mSwordBlurAlpha = 0; + } + + cLib_addCalcAngleS2(&i_this->mSwordBlurAlpha, 0, 1, 20); + + if (i_this->field_0xc78 == 0) { + sp118.set(40.0f, 80.0f, 0.0f); + MtxPosition(&sp118, &sp10C); + i_this->field_0x269c = sp10C; + + if (i_this->mDrawHorse) { + i_this->mAtSph.SetR(120.0f); + if (player->checkHorseRide()) { + i_this->mAtSph.SetAtSpl((dCcG_At_Spl)13); } else { - i_this->field_0x0c26 = 1; + i_this->mAtSph.SetAtSpl((dCcG_At_Spl)0); } } else { - i_this->field_0x0c26++; - if (i_this->field_0x0c26 > 1) { - i_this->field_0x0c26 = 1; - } + i_this->mAtSph.SetR(100.0f); + i_this->mAtSph.SetAtSpl((dCcG_At_Spl)10); + } + } else if (i_this->field_0xc78 == 1) { + MTXCopy(sp6C->getAnmMtx(41), *calc_mtx); + sp118.set(0.0f, 0.0f, 0.0f); + MtxPosition(&sp118, &sp10C); + i_this->mAtSph.SetR(70.0f); + i_this->mAtSph.SetAtSpl((dCcG_At_Spl)10); + } else if (i_this->field_0xc78 == 2) { + MTXCopy(sp6C->getAnmMtx(19), *calc_mtx); + sp118.set(0.0f, 0.0f, 0.0f); + MtxPosition(&sp118, &sp10C); + i_this->mAtSph.SetR(70.0f); + i_this->mAtSph.SetAtSpl((dCcG_At_Spl)10); + } else { + sp118.set(40.0f, 130.0f, 0.0f); + MtxPosition(&sp118, &sp10C); + } - cMtx_YrotM(*calc_mtx, 0xffffbfb8); - cMtx_XrotM(*calc_mtx, 0x32dd); - cMtx_ZrotM(*calc_mtx, (int)(s16)i_this->field_0x0c28 + 0x4ecf); - MtxTrans(0.0f, 0.0f, -130.0f, 1); - PSMTXCopy(*calc_mtx, i_this->field_0x0c2c[i_this->field_0x0c26]->getBaseTRMtx()); - PSMTXCopy(i_this->mpHorseMorf->getModel()->getMtxBuffer()->getAnmMtx(33), *calc_mtx); - i_this->field_0x0c28 = 0; + if (i_this->field_0xc77 == 0) { + sp10C.y -= 20000.0f; + } else { + if (i_this->field_0xc77 == 2) { + i_this->mAtSph.SetAtSpl((dCcG_At_Spl)11); + i_this->mAtSph.SetAtAtp(4); + } else { + i_this->mAtSph.SetAtAtp(2); } - cLib_addCalcAngleS2(&i_this->field_0x0c24, 0, 1, 20); + i_this->field_0xc78 = 0; + i_this->field_0xc77 = 0; + } - if (i_this->field_0x0c78 == 0) { - local_110.set(40.0f, 80.0f, 0.0f); - MtxPosition(&local_110, &local_11c); - i_this->field_0x269c = local_11c; - if (i_this->field_0x1fc4 == 0) { - i_this->field_0x1a38.SetR(120.0f); - if (!player->checkHorseRide()) { - i_this->field_0x1a38.SetAtSpl((dCcG_At_Spl)0); - } else { - i_this->field_0x1a38.SetAtSpl((dCcG_At_Spl)13); - } + i_this->mAtSph.SetC(sp10C); + dComIfG_Ccsp()->Set(&i_this->mAtSph); + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + cMtx_XrotM(*calc_mtx, a_this->shape_angle.x); + + sp118.set(0.0f, 130.0f, 0.0f); + MtxPosition(&sp118, &sp10C); + sp10C += i_this->current.pos; + + if (i_this->field_0xc79 != 0) { + i_this->mDefSph.SetR(50.0f); + i_this->mDefSph.SetC(sp10C); + dComIfG_Ccsp()->Set(&i_this->mDefSph); + i_this->field_0xc79 = 0; + } else { + sp10C.y -= 13000.0f; + } + + i_this->mDefSph.SetC(sp10C); + dComIfG_Ccsp()->Set(&i_this->mDefSph); + + if (i_this->mDefSph.ChkTgHit()) { + def_se_set(&i_this->mGndSound, i_this->mDefSph.GetTgHitObj(), 40, NULL); + i_this->field_0x1fc8 = 7; + } + + MTXCopy(sp6C->getAnmMtx(4), *calc_mtx); + sp118.set(0.0f, 0.0f, 0.0f); + MtxPosition(&sp118, &a_this->eyePos); + a_this->attention_info.position = a_this->eyePos; + + a_this->attention_info.position.y += 50.0f; + + f32 var_f29 = 50.0f; + if (i_this->mDrawHorse) { + var_f29 = 100.0f; + } + + cXyz spDC; + if (i_this->mDamageInvulnerabilityTimer != 0) { + spDC.set(-20000.0f, 100000.0f, -13456.0f); + } else { + spDC.set(0.0f, 0.0f, 0.0f); + } + + i_this->mGndSph[0].SetC(a_this->eyePos + spDC); + i_this->mGndSph[0].SetR(40.0f); + + MTXCopy(sp6C->getAnmMtx(2), *calc_mtx); + MtxPosition(&sp118, &sp10C); + i_this->setDownPos(&sp10C); + + i_this->mGndSph[1].SetC(sp10C + spDC); + i_this->mGndSph[1].SetR(var_f29); + + MTXCopy(sp6C->getAnmMtx(1), *calc_mtx); + sp118.set(0.0f, 0.0f, 0.0f); + MtxPosition(&sp118, &sp10C); + + i_this->mGndSph[2].SetC(sp10C + spDC); + i_this->mGndSph[2].SetR(var_f29); + + for (int i = 0; i < 3; i++) { + if (i_this->mDrawHorse) { + if (i_this->field_0x1e08 != 0) { + i_this->mGndSph[i].SetTgType(2); } else { - i_this->field_0x1a38.SetR(100.0f); - i_this->field_0x1a38.SetAtSpl((dCcG_At_Spl)10); - } - } else if (i_this->field_0x0c78 == 1) { - PSMTXCopy(i_this->mpHorseMorf->getModel()->getMtxBuffer()->getAnmMtx(41), *calc_mtx); - local_110.set(0.0f, 0.0f, 0.0f); - MtxPosition(&local_110, &local_11c); - i_this->field_0x1a38.SetR(70.0f); - i_this->field_0x1a38.SetAtSpl((dCcG_At_Spl)10); - } else if (i_this->field_0x0c78 == 2) { - PSMTXCopy(i_this->mpHorseMorf->getModel()->getMtxBuffer()->getAnmMtx(19), *calc_mtx); - local_110.set(0.0f, 0.0f, 0.0f); - MtxPosition(&local_110, &local_11c); - i_this->field_0x1a38.SetR(70.0f); - i_this->field_0x1a38.SetAtSpl((dCcG_At_Spl)10); - } else { - local_110.set(40.0f, 130.0f, 0.0f); - MtxPosition(&local_110, &local_11c); - } - - if (i_this->field_0x0c77 == 0) { - local_11c.y -= 20000.0f; - } else if (i_this->field_0x0c77 == 2) { - i_this->field_0x1a38.SetAtSpl((dCcG_At_Spl)11); - i_this->field_0x1a38.SetAtAtp(4); - } else { - i_this->field_0x1a38.SetAtAtp(2); - } - - i_this->field_0x0c78 = 0; - i_this->field_0x0c77 = 0; - - i_this->field_0x1a38.SetC(local_11c); - dComIfG_Ccsp()->Set(&i_this->field_0x1a38); - cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); - cMtx_XrotM(*calc_mtx, i_this->shape_angle.x); - - local_110.set(0.0f, 130.0f, 0.0f); - MtxPosition(&local_110, &local_11c); - local_11c += i_this->current.pos; - - if (i_this->field_0x0c79 != 0) { - // local_11c.y -= 13000.0f; - i_this->field_0x1b70.SetR(50.0f); - i_this->field_0x1b70.SetC(local_11c); - dComIfG_Ccsp()->Set(&i_this->field_0x1b70); - i_this->field_0x0c79 = 0; - } else { - // i_this->field_0x1b70.SetR(50.0f); - // i_this->field_0x1b70.SetC(local_11c); - // dComIfG_Ccsp()->Set(&i_this->field_0x1b70); - // i_this->field_0x0c79 = 0; - local_11c.y -= 13000.0f; - } - - i_this->field_0x1b70.SetC(local_11c); - dComIfG_Ccsp()->Set(&i_this->field_0x1b70); - - if (i_this->field_0x1b70.ChkTgHit()) { - def_se_set(&i_this->mZ2Creature, i_this->field_0x1b70.GetTgHitObj(), 40, NULL); - i_this->field_0x1fc8 = 7; - } - - PSMTXCopy(i_this->mpHorseMorf->getModel()->getMtxBuffer()->getAnmMtx(4), *calc_mtx); - local_110.set(0.0f, 0.0f, 0.0f); - MtxPosition(&local_110, &i_this->eyePos); - i_this->attention_info.position = i_this->eyePos; - - // f32 fVar1 = 50.0f; - - i_this->attention_info.position.y += 50.0f; - - if (i_this->field_0x1fc4 != 0) { - fVar1 = 100.0f; - } - - if (i_this->field_0x0c58 == 0) { - local_140.set(-20000.0f, 100000.0f, -13456.0f); - } else { - local_140.set(0.0f, 0.0f, 0.0f); - } - - i_this->field_0x1690[0].SetC((i_this->eyePos + local_140)); - i_this->field_0x1690[0].SetR(40.0f); - - PSMTXCopy(i_this->mpHorseMorf->getModel()->getMtxBuffer()->getAnmMtx(2), *calc_mtx); - MtxPosition(&local_110, &local_11c); - - i_this->setDownPos(&local_11c); - - i_this->field_0x1690[1].SetC((local_11c + local_140)); - i_this->field_0x1690[1].SetR(fVar1); - - PSMTXCopy(i_this->mpHorseMorf->getModel()->getMtxBuffer()->getAnmMtx(1), *calc_mtx); - local_110.set(0.0f, 0.0f, 0.0f); - MtxPosition(&local_110, &local_11c); - - i_this->field_0x1690[2].SetC((local_11c + local_140)); - i_this->field_0x1690[2].SetR(fVar1); - - for (int i = 0; i < 3; i++) { - if (i_this->field_0x1fc4 == 0) { - i_this->field_0x1690[i].SetTgType(0x12002); - } else if (i_this->field_0x1e08 == 0) { - i_this->field_0x1690[i].SetTgType(0x2000); - } else { - i_this->field_0x1690[i].SetTgType(2); - } - - dComIfG_Ccsp()->Set(&i_this->field_0x1690[i]); - } - - PSMTXCopy(i_this->mpHorseMorf->getModel()->getMtxBuffer()->getAnmMtx(37), mDoMtx_stack_c::now); - mDoMtx_stack_c::multVecZero(i_this->field_0x26a8); - - PSMTXCopy(i_this->mpHorseMorf->getModel()->getMtxBuffer()->getAnmMtx(42), mDoMtx_stack_c::now); - mDoMtx_stack_c::multVecZero(i_this->field_0x26a8 + 1); - - local_110.set(0.0f, 0.0f, 0.0f); - MtxPosition(&local_110, &local_11c); - local_11c.y = i_this->current.pos.y; - - i_this->field_0x1ca8.SetC(local_11c); - i_this->field_0x1ca8.SetR(50.0f); - i_this->field_0x1ca8.SetH(200.0f); - dComIfG_Ccsp()->Set(&i_this->field_0x1ca8); - - if (i_this->field_0x1e0f < 1) { - if (i_this->field_0x1e0f < 0) { - // JPABaseEmitter* emitter; - // for (int i = 0; i < 6; i++) { - // emitter = dComIfGp_particle_getEmitter(i_this->field_0x25e4[i * 4 + 12]); - // if (emitter) { - // emitter->deleteAllParticle(); - // dComIfGp_particle_levelEmitterOnEventMove(i_this->field_0x25e4[i * 4 + 12]); - // } - // } - - // for (int i = 0; i < 5; i++) { - // dComIfGp_particle_set(b_id[i * 2], &i_this->field_0x1e20, NULL, NULL); - // } - - // i_this->field_0x1e0f = 0; + i_this->mGndSph[i].SetTgType(0x2000); } } else { - i_this->field_0x1e2c.startLevelSound(Z2SE_EN_GND_LIGHTBALL, 0, -1); - - if (i_this->field_0x1e0f == 1) { - PSMTXCopy(i_this->mpHorseMorf->getModel()->getMtxBuffer()->getAnmMtx(24), *calc_mtx); - local_110.set(0.0f, 0.0f, 0.0f); - MtxPosition(&local_110, &i_this->field_0x1e20); - cLib_addCalc2(&i_this->field_0x1e10, 1.0f, 1.0f, 0.02f); - } else { - i_this->field_0x1e0e += 1; - i_this->field_0x1e14 = i_this->field_0x1e20; - local_110 = i_this->current.pos; - local_110.y += 800.0f; - local_110 -= i_this->field_0x1e20; - - if (i_this->field_0x1e0e > 10) { - cLib_addCalcAngleS2(&i_this->field_0x1e50.y, - cM_atan2s(local_110.x, local_110.z), 4, 0x800); - cLib_addCalcAngleS2(&i_this->field_0x1e50.x, - (s16)-cM_atan2s(local_110.y, JMAFastSqrt(local_110.x * local_110.x + local_110.z * local_110.z)), - 4, 0x800); - } - - cLib_addCalc2(&i_this->field_0x1e4c, 100.0f, 1.0f, 2.0f); - cMtx_YrotS(*calc_mtx, i_this->field_0x1e50.y); - cMtx_XrotM(*calc_mtx, i_this->field_0x1e50.x); - local_110.x = 0.0f; - local_110.y = 0.0f; - local_110.z = i_this->field_0x1e4c; - MtxPosition(&local_110, &local_11c); - - i_this->field_0x1e20 += local_11c; - i_this->field_0x1e20 += i_this->speed; - - if (i_this->field_0x1e0e == 50) { - i_this->field_0x1e0f = -1; - i_this->field_0x1e2c.startSound(Z2SE_EN_GND_LIGHTBALL_SPLIT, 0, -1); - cMtx_YrotS(*calc_mtx, i_this->field_0x0c3c); - local_110.x = cM_rndF(10.0f); - local_110.y -= -50.0f; - local_110.z = cM_rndF(20.0f); - // local_110.set(cM_rndF(10.0f), -50.0f - local_110.y, cM_rndF(20.0f)); - - for (int i = 0; i < 5; i++) { - i_this->field_0x1e56[i] = 1; - local_110.x = *(f32*)(int)bun_xs[i * 4]; - MtxPosition(&local_110, (cXyz*)((int)&i_this->field_0x1ed4[i * 12].x)); - cXyz* pcVar18 = (cXyz*)((int)i_this->field_0x1ed4[i * 12].x); - pcVar18 = &i_this->field_0x1e20; - i_this->field_0x1e98[i * 12].x = *(f32*)pcVar18; - } - } - } - - for (int i = 0; i < 5; i++) { - i_this->field_0x25ac[i * 4 + 12] = dComIfGp_particle_set(i_this->field_0x25ac[i * 4 + 12], - *(s16*)(int)b_id[i + 2], &i_this->field_0x1e20, NULL, NULL); - } + i_this->mGndSph[i].SetTgType(0x12002); } - local_14c.set(1.0f, 1.0f, 1.0f); - csXyz cStack_190; - cStack_190.set(0, 0, 0); + dComIfG_Ccsp()->Set(&i_this->mGndSph[i]); + } - for (int i = 0; i < 5; i++) { - if (i_this->field_0x1e56[i] == 1) { - i_this->field_0x1f10[i * 32 - 13].startSound(Z2SE_EN_GND_LIGHTBALL_SUB, 0, -1); - cXyz* pcVar18 = (cXyz*)((int)i_this->field_0x1e5c[i * 12].x); - i_this->field_0x1e98[i * 12].x = *(f32*)pcVar18; - // ::mtx::PSVECAdd((Vec *)pcVar18,(Vec *)((int)&i_this->field272_0x1ed4[0].x + iVar23), (Vec *)pcVar18); - ??? + MTXCopy(sp6C->getAnmMtx(37), mDoMtx_stack_c::get()); + mDoMtx_stack_c::multVecZero(&i_this->field_0x26a8[0]); - for (int j = 0; j < 6; j++) { - i_this->field_0x25ac[j * 4 + 0x2608 + i * 24 - 0x25e4] = - dComIfGp_particle_set(((int)i_this->field_0x25ac[j * 4 + 0x2608 + i * 24 - 0x25e4]), - b_id[j * 2], pcVar18, NULL, &local_14c); - } + MTXCopy(sp6C->getAnmMtx(42), mDoMtx_stack_c::get()); + mDoMtx_stack_c::multVecZero(&i_this->field_0x26a8[1]); - if (ball_bg_check(i_this, uVar7)) { - i_this->field_0x1e56[uVar7] = 2; + sp118.set(0.0f, 0.0f, 0.0f); + MtxPosition(&sp118, &sp10C); + sp10C.y = a_this->current.pos.y; - for (int k = 0; k < 5; k++) { - dComIfGp_particle_set(b_id2[k * 2], pcVar18, NULL, &local_14c); - } + i_this->mCoCyl.SetC(sp10C); + i_this->mCoCyl.SetR(50.0f); + i_this->mCoCyl.SetH(200.0f); + dComIfG_Ccsp()->Set(&i_this->mCoCyl); - local_110 = (player->current.pos - *(cXyz*)pcVar18); - cStack_190.y = (s16)cM_atan2s(local_110.x, local_110.z); + static u16 b_id[6] = {0x8A37, 0x8A38, 0x8A39, 0x8A3A, 0x8A3B, 0x8C24}; + static u16 b_id2[5] = {0x8A3D, 0x8A3E, 0x8A3F, 0x8A40, 0x8A41}; - fopAcM_create(PROC_E_FK, uVar7, pcVar18, - i_this->current.roomNo, &cStack_190, NULL, -1); + if (i_this->field_0x1e0f > 0) { + i_this->field_0x1e2c.startLevelSound(Z2SE_EN_GND_LIGHTBALL, 0, -1); - i_this->field_0x1f10[i * 32 - 13].startSound(Z2SE_EN_GND_LIGHTBALL_SUB_HIT, 0, -1); - } - } else if (i_this->field_0x1e56[uVar7] == 2) { - i_this->field_0x1e56[uVar7] = 0; - JPABaseEmitter* emitter; - for (int j = 0; j < 6; j++) { - emitter = dComIfGp_particle_getEmitter(i_this->field_0x25ac[j * 4 + 0x2608 + (i * 24) - 0x25e4]); + if (i_this->field_0x1e0f == 1) { + MTXCopy(sp6C->getAnmMtx(24), *calc_mtx); + sp118.set(0.0f, 0.0f, 0.0f); + MtxPosition(&sp118, &i_this->field_0x1e20); + cLib_addCalc2(&i_this->field_0x1e10, 1.0f, 1.0f, 0.02f); + } else { + i_this->field_0x1e0e++; + i_this->field_0x1e14 = i_this->field_0x1e20; + sp118 = a_this->current.pos; + sp118.y += 800.0f; + sp118 -= i_this->field_0x1e20; - if (emitter) { - emitter->deleteAllParticle(); - dComIfGp_particle_levelEmitterOnEventMove(i_this->field_0x25ac[j * 4 + 0x2608 + (i * 24) - 0x25e4]); - } + if (i_this->field_0x1e0e > 10) { + cLib_addCalcAngleS2(&i_this->field_0x1e50.y,cM_atan2s(sp118.x, sp118.z), 4, 0x800); + cLib_addCalcAngleS2(&i_this->field_0x1e50.x, (s16)-cM_atan2s(sp118.y, JMAFastSqrt(sp118.x * sp118.x + sp118.z * sp118.z)), 4, 0x800); + } + + cLib_addCalc2(&i_this->field_0x1e4c, 100.0f, 1.0f, 2.0f); + cMtx_YrotS(*calc_mtx, i_this->field_0x1e50.y); + cMtx_XrotM(*calc_mtx, i_this->field_0x1e50.x); + sp118.x = 0.0f; + sp118.y = 0.0f; + sp118.z = i_this->field_0x1e4c; + MtxPosition(&sp118, &sp10C); + + i_this->field_0x1e20 += sp10C; + i_this->field_0x1e20 += a_this->speed; + + if (i_this->field_0x1e0e == 50) { + i_this->field_0x1e0f = -1; + i_this->field_0x1e2c.startSound(Z2SE_EN_GND_LIGHTBALL_SPLIT, 0, -1); + + cMtx_YrotS(*calc_mtx, i_this->mPlayerAngleY); + sp118.y = -50.0f - cM_rndF(10.0f); + sp118.z = cM_rndF(20.0f); + + for (int i = 0; i < 5; i++) { + i_this->field_0x1e56[i] = 1; + + static f32 bun_xs[] = {-150.0f, -75.0f, 0.0f, 75.0f, 150.0f}; + sp118.x = bun_xs[i]; + MtxPosition(&sp118, &i_this->field_0x1ed4[i]); + i_this->mLightBallPos[i] = i_this->field_0x1e20; + i_this->field_0x1e98[i] = i_this->mLightBallPos[i]; } } } - b_gnd_class* gndActor = (b_gnd_class*)fopAcM_SearchByID(i_this->mMantChildID); - - if (gndActor) { - gndActor->current.pos = i_this->current.pos; - PSMTXCopy(i_this->mpHorseMorf->getModel()->getMtxBuffer()->getAnmMtx(34), *calc_mtx); - // local_110.set(10.0f, 5.0f, -17.0f); - // SComponent::MtxPosition(&local_110,(cXyz *)((int)pvVar11 + 0x3928)); - ??? - PSMTXCopy(i_this->mpHorseMorf->getModel()->getMtxBuffer()->getAnmMtx(25), *calc_mtx); - // local_110.set(10.0f, 5.0f, 17.0f); - // SComponent::MtxPosition(&local_110,(cXyz *)((int)pvVar11 + 0x3934)); - ??? - + for (int i = 0; i < 6; i++) { + i_this->field_0x25f0[i] = dComIfGp_particle_set(i_this->field_0x25f0[i], b_id[i], &i_this->field_0x1e20, NULL, NULL); + } + } else { + if (i_this->field_0x1e0f < 0) { for (int i = 0; i < 6; i++) { - for (int j = 0; j < 6; j++) { - /* other = (Vec *)((int)gndActor[7].mTevStr.mLights + iVar21 + iVar22 * 0x180 + -0x30); - ::mtx::PSMTXTrans(&::mDoMtx_stack_c::now,other->x,other->y,other->z); - ::cXyz::operator_-(&cStack_188, - (cXyz *)((int)gndActor[7].mTevStr.mLights + - iVar20 * 0xc + iVar22 * 0x180 + -0x24),other); - ::cXyz::operator_=(&local_110,&cStack_188); - local_a8 = CONCAT44(0x43300000,iVar18 ^ 0x80000000); - ??? */ - fVar1 = (f32)(j * 0.25f); - - cMtx_YrotM(mDoMtx_stack_c::now, cM_atan2s(local_110.x, local_110.z)); - cMtx_XrotM(mDoMtx_stack_c::now, cM_atan2s(local_110.y, - JMAFastSqrt(local_110.x * local_110.x + local_110.z * local_110.z))); - mDoMtx_stack_c::scaleM(fVar1, fVar1, fVar1); - i_this->field_0x0b94[i + j * 6]->setBaseTRMtx(mDoMtx_stack_c::now); + JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->field_0x25f0[i]); + if (emitter != NULL) { + emitter->deleteAllParticle(); + dComIfGp_particle_levelEmitterOnEventMove(i_this->field_0x25f0[i]); } } - } - - if (i_this->field_0x1fc4 != 0) { - i_this->field_0x1fd4 += i_this->field_0x1fd6; - cLib_addCalcAngleS2(&i_this->field_0x1fd6, (s16)(i_this->speedF * 50.0f + 1500.0f), - 1, 60); - cLib_addCalc2(&i_this->field_0x1fd0, i_this->speedF * 1.5f, 1.0f, 0.9f); - - PSMTXCopy(i_this->mpHorseMorf->getModel()->getMtxBuffer()->getAnmMtx(19), *calc_mtx); - - MtxPush(); - local_110.set(0.0f, 7.0f, -15.0f); - MtxPosition(&local_110, &local_11c); - himo_control1(i_this, &local_11c, 0, 0); - MtxPull(); - - local_110.set(0.0f, 7.0f, 15.0f); - MtxPosition(&local_110, &local_11c); - himo_control1(i_this, &local_11c, 1, 0); - - PSMTXCopy(i_this->mpHorseMorf->getModel()->getMtxBuffer()->getAnmMtx(21), *calc_mtx); - local_110.set(60.0f, 0.0f, 50.0f); - MtxPosition(&local_110, i_this->field_0x1fd8); - - i_this->field_0x1fd8[1] = i_this->field_0x1fd8[0]; - } - - if (i_this->field_0x1fc4 == 0) { - eff_set(i_this); - } else { - eff_set_h(i_this); - - i_this->field_0x1e2c.framework(0, dComIfGp_getReverb(fopAcM_GetRoomNo((fopAc_ac_c*)i_this))); for (int i = 0; i < 5; i++) { - i_this->field_0x1f10[i * 12].framework(0, - dComIfGp_getReverb(fopAcM_GetRoomNo((fopAc_ac_c*)i_this))); + dComIfGp_particle_set(b_id2[i], &i_this->field_0x1e20, NULL, NULL); } - } - anm_se_set(i_this); - - f32 fVar2 = 1.0f; - fVar1 = 0.1f; - - if (i_this->field_0x2739 == 0) { - fVar2 = 0.0f; - dKy_custom_colset(0, 0, i_this->field_0x273c); - } else if (i_this->field_0x2739 == 1) { - fVar1 = 0.05f; - dKy_custom_colset(0, 5, i_this->field_0x273c); - } else if (i_this->field_0x2739 == 2) { - fVar2 = 0.0f; - dKy_custom_colset(1, 1, i_this->field_0x273c); - } else if(i_this->field_0x2739 == 3) { - fVar2 = 0.0f; - dKy_custom_colset(2, 2, i_this->field_0x273c); - } else if (i_this->field_0x2739 == 4) { - fVar2 = 0.0f; - dKy_custom_colset(3, 3, i_this->field_0x273c); - }else if (i_this->field_0x2739 == 5) { - fVar2 = 0.0f; - dKy_custom_colset(4, 4, i_this->field_0x273c); - } - - if (fVar2 >= 0.0f) { - cLib_addCalc2(&i_this->field_0x273c, fVar2, 1.0f, fVar1); + i_this->field_0x1e0f = 0; } } - return rv; + cXyz ball_eff_size(1.0f, 1.0f, 1.0f); + csXyz fk_angle(0, 0, 0); + for (int i = 0; i < 5; i++) { + if (i_this->field_0x1e56[i] == 1) { + i_this->mLightBallSound[i].startLevelSound(Z2SE_EN_GND_LIGHTBALL_SUB, 0, -1); + i_this->field_0x1e98[i] = i_this->mLightBallPos[i]; + i_this->mLightBallPos[i] += i_this->field_0x1ed4[i]; + + for (int j = 0; j < 6; j++) { + i_this->field_0x2608[i][j] = dComIfGp_particle_set(i_this->field_0x2608[i][j], b_id[j], &i_this->mLightBallPos[i], NULL, &ball_eff_size); + } + + if (ball_bg_check(i_this, i)) { + i_this->field_0x1e56[i] = 2; + + for (int k = 0; k < 5; k++) { + dComIfGp_particle_set(b_id2[k], &i_this->mLightBallPos[i], NULL, &ball_eff_size); + } + + sp118 = (player->current.pos - i_this->mLightBallPos[i]); + fk_angle.y = (s16)cM_atan2s(sp118.x, sp118.z); + + fopAcM_create(PROC_E_FK, i | 0xFFFFFF00, &i_this->mLightBallPos[i], fopAcM_GetRoomNo(a_this), &fk_angle, NULL, -1); + i_this->mLightBallSound[i].startSound(Z2SE_EN_GND_LIGHTBALL_SUB_HIT, 0, -1); + } + } else if (i_this->field_0x1e56[i] == 2) { + i_this->field_0x1e56[i] = 0; + + for (int j = 0; j < 6; j++) { + JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->field_0x2608[i][j]); + if (emitter != NULL) { + emitter->deleteAllParticle(); + dComIfGp_particle_levelEmitterOnEventMove(i_this->field_0x2608[i][j]); + } + } + } + } + + mant_class* mant_p = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); + if (mant_p != NULL) { + mant_p->current.pos = a_this->current.pos; + + MTXCopy(sp6C->getAnmMtx(34), *calc_mtx); + sp118.set(10.0f, 5.0f, -17.0f); + MtxPosition(&sp118, &mant_p->field_0x3928[0]); + + MTXCopy(sp6C->getAnmMtx(25), *calc_mtx); + sp118.set(10.0f, 5.0f, 17.0f); + MtxPosition(&sp118, &mant_p->field_0x3928[1]); + + f32 var_f26 = 2.5f; + for (int i = 0; i < 6; i++) { + for (int j = 0; j < 6; j++) { + cXyz* sp30 = &mant_p->field_0x25a8[i * 2 + 1].field_0x0[j * 2]; + cXyz* sp2C = &mant_p->field_0x25a8[i * 2 + 1].field_0x0[j * 2 + 1]; + mDoMtx_stack_c::transS(sp30->x, sp30->y, sp30->z); + sp118 = *sp2C - *sp30; + + f32 var_f28 = var_f26 + (f32)(j * 0.25f); + + mDoMtx_stack_c::YrotM(cM_atan2s(sp118.x, sp118.z)); + mDoMtx_stack_c::XrotM(-cM_atan2s(sp118.y, JMAFastSqrt(sp118.x * sp118.x + sp118.z * sp118.z))); + mDoMtx_stack_c::scaleM(var_f28, var_f28, var_f28); + i_this->mpMantShadowModel[i + j * 6]->setBaseTRMtx(mDoMtx_stack_c::get()); + } + } + } + + if (i_this->mDrawHorse) { + i_this->field_0x1fd4 += i_this->field_0x1fd6; + + cLib_addCalcAngleS2(&i_this->field_0x1fd6, (s16)(i_this->speedF * 50.0f + 1500.0f), 1, 60); + cLib_addCalc2(&i_this->field_0x1fd0, i_this->speedF * 1.5f, 1.0f, 0.9f); + + sp6C = i_this->mpModelMorf->getModel(); + J3DModel* horse_model = i_this->mpHorseMorf->getModel(); + + MTXCopy(horse_model->getAnmMtx(19), *calc_mtx); + MtxPush(); + sp118.set(0.0f, 7.0f, -15.0f); + MtxPosition(&sp118, &sp10C); + himo_control1(i_this, &sp10C, 0, 0); + MtxPull(); + + sp118.set(0.0f, 7.0f, 15.0f); + MtxPosition(&sp118, &sp10C); + himo_control1(i_this, &sp10C, 1, 0); + + MTXCopy(horse_model->getAnmMtx(21), *calc_mtx); + sp118.set(60.0f, 0.0f, 50.0f); + MtxPosition(&sp118, i_this->field_0x1fd8); + + i_this->field_0x1fd8[1] = i_this->field_0x1fd8[0]; + himo_control2(i_this, &i_this->field_0x1fd8[0], 0, 0); + himo_control2(i_this, &i_this->field_0x1fd8[1], 1, 0); + } + + if (i_this->mDrawHorse) { + eff_set_h(i_this); + + i_this->field_0x1e2c.framework(0, dComIfGp_getReverb(fopAcM_GetRoomNo(a_this))); + + for (int i = 0; i < 5; i++) { + i_this->mLightBallSound[i].framework(0, dComIfGp_getReverb(fopAcM_GetRoomNo(a_this))); + } + } else { + eff_set(i_this); + } + + anm_se_set(i_this); + + f32 target_blend = 1.0f; + f32 blend_step = 0.1f; + + if (i_this->field_0x2739 == 0) { + target_blend = 0.0f; + dKy_custom_colset(0, 0, i_this->mKankyoBlend); + } else if (i_this->field_0x2739 == 1) { + blend_step = 0.05f; + dKy_custom_colset(0, 5, i_this->mKankyoBlend); + } else if (i_this->field_0x2739 == 2) { + target_blend = 0.0f; + dKy_custom_colset(1, 1, i_this->mKankyoBlend); + } else if(i_this->field_0x2739 == 3) { + target_blend = 0.0f; + dKy_custom_colset(2, 2, i_this->mKankyoBlend); + } else if (i_this->field_0x2739 == 4) { + target_blend = 0.0f; + dKy_custom_colset(3, 3, i_this->mKankyoBlend); + }else if (i_this->field_0x2739 == 5) { + target_blend = 0.0f; + dKy_custom_colset(4, 4, i_this->mKankyoBlend); + } + + if (target_blend >= 0.0f) { + cLib_addCalc2(&i_this->mKankyoBlend, target_blend, 1.0f, blend_step); + } + + return 1; } /* 80600A54-80600A5C 00C0F4 0008+00 1/0 0/0 0/0 .text daB_GND_IsDelete__FP11b_gnd_class */ @@ -5201,15 +4606,16 @@ static int daB_GND_Delete(b_gnd_class* i_this) { dComIfG_resDelete(&i_this->mHorsePhaseReq, "B_hg"); if (i_this->mInitHIO) { - lbl_145_bss_45 = false; + l_initHIO = false; } if (a_this->heap != NULL) { i_this->mpModelMorf->stopZelAnime(); i_this->mpHorseMorf->stopZelAnime(); i_this->field_0x1e2c.deleteObject(); + for (int i = 0; i < 5; i++) { - i_this->field_0x1f10[i].deleteObject(); + i_this->mLightBallSound[i].deleteObject(); } } @@ -5218,21 +4624,14 @@ static int daB_GND_Delete(b_gnd_class* i_this) { /* 80600B14-80601468 00C1B4 0954+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */ static int useHeapInit(fopAc_ac_c* a_this) { - // NONMATCHING - static u32 const blur_model[2] = { - 0x00000066, 0x00000065 - }; - static u32 btk_d[6] = { - 0x00000077, 0x00000076, 0x00000073, - 0x00000074, 0x00000075, 0x00000072 - }; - b_gnd_class* i_this = (b_gnd_class*)a_this; - f32* size; + + static int const blur_model[2] = {0x66, 0x65}; + static int btk_d[6] = {0x77, 0x76, 0x73, 0x74, 0x75, 0x72}; i_this->mpModelMorf = new mDoExt_McaMorfSO((J3DModelData*)dComIfG_getObjectRes("B_gnd", 0x69), NULL, NULL, (J3DAnmTransform*)dComIfG_getObjectRes("B_gnd", 0x4b), - 2, 1.0f, 0, -1, &i_this->mZ2Creature, 0, 0x11020284); + 2, 1.0f, 0, -1, &i_this->mGndSound, 0, 0x11020284); if (i_this->mpModelMorf == NULL || i_this->mpModelMorf->getModel() == NULL) { return 0; @@ -5248,84 +4647,89 @@ static int useHeapInit(fopAc_ac_c* a_this) { mDoMtx_stack_c::scaleS(0.0f, 0.0f, 0.0f); model->setBaseTRMtx(mDoMtx_stack_c::get()); - i_this->field_0x0724 = new mDoExt_brkAnm(); - if (i_this->field_0x0724 == NULL) { + i_this->mpGndCoreBrk = new mDoExt_brkAnm(); + if (i_this->mpGndCoreBrk == NULL) { return 0; } - if (!i_this->field_0x0724->init(i_this->mpModelMorf->getModel()->getModelData(), + if (!i_this->mpGndCoreBrk->init(i_this->mpModelMorf->getModel()->getModelData(), (J3DAnmTevRegKey*)dComIfG_getObjectRes("B_gnd", 0x6d), 1, 2, 1.0f, 0, -1)) { return 0; } for (int i = 0; i < 6; i++) { - i_this->field_0x0728[i] = new mDoExt_btkAnm(); - if (i_this->field_0x0728[i] == NULL) { + i_this->mpGndEyeBtk[i] = new mDoExt_btkAnm(); + if (i_this->mpGndEyeBtk[i] == NULL) { return 0; } - if (!i_this->field_0x0728[i]->init(i_this->mpModelMorf->getModel()->getModelData(), + if (!i_this->mpGndEyeBtk[i]->init(i_this->mpModelMorf->getModel()->getModelData(), (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("B_gnd", btk_d[i]), 1, 0, 1.0f, 0, -1)) { return 0; } } - i_this->field_0x0744 = new mDoExt_btpAnm(); - if (i_this->field_0x0744 == NULL) { + i_this->mpGndEyeBtp = new mDoExt_btpAnm(); + if (i_this->mpGndEyeBtp == NULL) { return 0; } - if (!i_this->field_0x0744->init(i_this->mpModelMorf->getModel()->getModelData(), + if (!i_this->mpGndEyeBtp->init(i_this->mpModelMorf->getModel()->getModelData(), (J3DAnmTexPattern*)dComIfG_getObjectRes("B_gnd", 0x7b), 1, 2, 1.0f, 0, -1)) { return 0; } J3DModelData* modelData; modelData = (J3DModelData*)dComIfG_getObjectRes("B_gnd", 0x62); - JUT_ASSERT(0x19d4, modelData != 0); - i_this->field_0x0768 = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); - if (i_this->field_0x0768 == NULL) { + JUT_ASSERT(6612, modelData != 0); + i_this->mpSwordModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (i_this->mpSwordModel == NULL) { return 0; } mDoMtx_stack_c::scaleS(0.0f, 0.0f, 0.0f); - i_this->field_0x0768->setBaseTRMtx(mDoMtx_stack_c::get()); + i_this->mpSwordModel->setBaseTRMtx(mDoMtx_stack_c::get()); + modelData = (J3DModelData*)dComIfG_getObjectRes("B_gnd", 0x61); - i_this->field_0x076c = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); - if (i_this->field_0x076c == NULL) { + JUT_ASSERT(6626, modelData != 0); + i_this->mpSheathModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (i_this->mpSheathModel == NULL) { return 0; } mDoMtx_stack_c::scaleS(0.0f, 0.0f, 0.0f); - i_this->field_0x076c->setBaseTRMtx(mDoMtx_stack_c::get()); + i_this->mpSheathModel->setBaseTRMtx(mDoMtx_stack_c::get()); + for (int i = 0; i < 2; i++) { modelData = (J3DModelData*)dComIfG_getObjectRes("B_gnd", blur_model[i]); - i_this->field_0x0c2c[i] = mDoExt_J3DModel__create(modelData, - 0x80000, 0x11000084); - if (i_this->field_0x0c2c[i] == NULL) { + JUT_ASSERT(6647, modelData != 0); + i_this->mpSwordBlurModel[i] = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (i_this->mpSwordBlurModel[i] == NULL) { return 0; } + mDoMtx_stack_c::scaleS(0.0f, 0.0f, 0.0f); - i_this->field_0x0b94[i]->setBaseTRMtx(mDoMtx_stack_c::get()); + i_this->mpSwordBlurModel[i]->setBaseTRMtx(mDoMtx_stack_c::get()); } modelData = (J3DModelData*)dComIfG_getObjectRes("B_gnd", 99); - JUT_ASSERT(0x1a0e, modelData != 0); + JUT_ASSERT(6670, modelData != 0); + for (int i = 0; i < 36; i++) { - i_this->field_0x0b94[i] = mDoExt_J3DModel__create(modelData, - 0x80000, 0x11000084); - if (i_this->field_0x0b94[i] == NULL) { + i_this->mpMantShadowModel[i] = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (i_this->mpMantShadowModel[i] == NULL) { return 0; } + mDoMtx_stack_c::scaleS(0.0f, 0.0f, 0.0f); - i_this->field_0x0b94[i]->setBaseTRMtx(mDoMtx_stack_c::get()); + i_this->mpMantShadowModel[i]->setBaseTRMtx(mDoMtx_stack_c::get()); } i_this->mpHorseMorf = new mDoExt_McaMorfSO((J3DModelData*)dComIfG_getObjectRes("B_hg", 19), NULL, NULL, (J3DAnmTransform*)dComIfG_getObjectRes("B_hg", 15), - 2, 1.0f, 0, -1, &i_this->field_0x0680, 0x80000, 0x11000084); + 2, 1.0f, 0, -1, &i_this->mHorseSound, 0x80000, 0x11000084); if (i_this->mpHorseMorf == NULL || i_this->mpHorseMorf->getModel() == NULL) { return 0; } @@ -5338,54 +4742,54 @@ static int useHeapInit(fopAc_ac_c* a_this) { mDoMtx_stack_c::scaleS(0.0f, 0.0f, 0.0f); model->setBaseTRMtx(mDoMtx_stack_c::get()); + for (int i = 0; i < 2; i++) { - if (!i_this->field_0x2170[i].init(1, 16, - (ResTIMG *)dComIfG_getObjectRes("B_hg", 22), 1)) { + if (!i_this->mHorseReins[i].init(1, 16, (ResTIMG *)dComIfG_getObjectRes("B_hg", 22), 1)) { return 0; } - size = i_this->field_0x2170[i].getSize(0); + + f32* size = i_this->mHorseReins[i].getSize(0); for (int j = 0; j < 16; j++) { *size = 4.0f; size++; } } - if (!i_this->field_0x21e8.init(1, 2, - (ResTIMG *)dComIfG_getObjectRes("B_hg", 22), 1)) { + if (!i_this->field_0x21e8.init(1, 2, (ResTIMG *)dComIfG_getObjectRes("B_hg", 22), 1)) { return 0; } - size = i_this->field_0x21e8.getSize(0); + f32* size = i_this->field_0x21e8.getSize(0); for (int i = 0; i < 2; i++) { *size = 4.0f; size++; } - i_this->field_0x05d8 = new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes("B_gnd", 0x6a) - , NULL, NULL, (J3DAnmTransform*)dComIfG_getObjectRes("B_gnd", 0x5e), + i_this->mpZeldaModel = new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes("B_gnd", 0x6a), + NULL, NULL, (J3DAnmTransform*)dComIfG_getObjectRes("B_gnd", 0x5e), 0, 1.0f, 0, -1, 1, NULL, 0, 0x11020284); - if (i_this->field_0x05d8 == NULL || i_this->field_0x05d8->getModel() == NULL) { + if (i_this->mpZeldaModel == NULL || i_this->mpZeldaModel->getModel() == NULL) { return 0; } - i_this->field_0x0750 = new mDoExt_btkAnm(); - if (i_this->field_0x0750 == NULL) { + i_this->mpZeldaBtk = new mDoExt_btkAnm(); + if (i_this->mpZeldaBtk == NULL) { return 0; } - if (!i_this->field_0x0750->init(i_this->field_0x05d8->getModel()->getModelData(), + if (!i_this->mpZeldaBtk->init(i_this->mpZeldaModel->getModel()->getModelData(), (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("B_gnd", 0x78), 1, 0, 1.0f, 0, -1)) { return 0; } - i_this->field_0x074c = new mDoExt_btpAnm(); - if (i_this->field_0x074c == NULL) { + i_this->mpZeldaBtp = new mDoExt_btpAnm(); + if (i_this->mpZeldaBtp == NULL) { return 0; } J3DAnmTexPattern* texPattern = (J3DAnmTexPattern*)dComIfG_getObjectRes("B_gnd", 0x7c); - if (!i_this->field_0x074c->init(i_this->field_0x05d8->getModel()->getModelData(), + if (!i_this->mpZeldaBtp->init(i_this->mpZeldaModel->getModel()->getModelData(), texPattern, 1, 0, 1.0f, 0, -1)) { return 0; @@ -5396,181 +4800,182 @@ static int useHeapInit(fopAc_ac_c* a_this) { /* 806014B0-80601960 00CB50 04B0+00 1/0 0/0 0/0 .text daB_GND_Create__FP10fopAc_ac_c */ static int daB_GND_Create(fopAc_ac_c* a_this) { - // NONMATCHING - static dCcD_SrcSph h_cc_sph_src = { - { - {0x0, {{AT_TYPE_CSTATUE_SWING, 0x2, 0x1f}, {0x4006020, 0x3}, 0x75}}, // mObj - {dCcD_SE_HARD_BODY, 0x0, 0x7, 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 cc_sph_src = { - { - {0x00, {{AT_TYPE_0, 0x0, 0x00}, {0x4012000, 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, 0x2, 0x1f}, {0x0, 0x0}, 0x0}}, // mObj - {dCcD_SE_HARD_BODY, 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 - }; - - static dCcD_SrcSph def_sph_src = { - { - {0x0, {{0x0, 0x0, 0x0}, {0xdcfbfdfd, 0x3}, 0x0}}, // mObj - {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt - {dCcD_SE_METAL, 0x5, 0x0, 0x0, 0x2}, // mGObjTg - {0x0}, // mGObjCo - }, // mObjInf - { - {{0.0f, 0.0f, 0.0f}, 100.0f} // mSph - } // mSphAttr - }; - - static dCcD_SrcCyl co_cyl_src = { - { - {0x0, {{0x0, 0x0, 0x0}, {0x0, 0x0}, 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}, // mCenter - 100.0f, // mRadius - 200.0f // mHeight - } // mCyl - }; - b_gnd_class* i_this = (b_gnd_class*)a_this; fopAcM_SetupActor(i_this, b_gnd_class); int phase_state = dComIfG_resLoad(&i_this->mPhaseReq, "B_gnd"); - int h_phase_state = dComIfG_resLoad(&i_this->mPhaseReq, "B_gh"); - i_this->field_0x05be = fopAcM_GetParam(a_this); + int h_phase_state = dComIfG_resLoad(&i_this->mHorsePhaseReq, "B_hg"); + i_this->field_0x5be = fopAcM_GetParam(a_this); if (h_phase_state != cPhs_COMPLEATE_e) { phase_state = h_phase_state; } if (phase_state == cPhs_COMPLEATE_e) { - if (!fopAcM_entrySolidHeap(a_this, useHeapInit, 0x2b1a0)) { + OS_REPORT("b_gnd PARAM %x\n", fopAcM_GetParam(a_this)); + + if (!fopAcM_entrySolidHeap(a_this, useHeapInit, 0x2B1A0)) { + OS_REPORT("//////////////B_GND SET NON !!\n"); return cPhs_ERROR_e; - } else if (!lbl_145_bss_45) { + } + + if (!l_initHIO) { i_this->mInitHIO = true; - lbl_145_bss_45 = true; - l_HIO.field_0x4 = -1; + l_initHIO = true; + l_HIO.no = mDoHIO_CREATE_CHILD("ガノンドロフ", &l_HIO); } - a_this->attention_info.distances[2] = '$'; + a_this->attention_info.distances[2] = 36; fopAcM_SetMtx(a_this, i_this->mpModelMorf->getModel()->getBaseTRMtx()); fopAcM_SetMin(a_this, -400.0f, -200.0f, -400.0f); fopAcM_SetMax(a_this, 400.0f, 200.0f, 400.0f); - i_this->field_0x0cd4.Set(&i_this->current.pos, &i_this->old.pos, a_this, 1, - &i_this->mWall, &i_this->speed, NULL, NULL); - i_this->mWall.SetWall(50.0f, 150.0f); - i_this->field_0x0cd4.m_flags = i_this->field_0x0cd4.m_flags & 0xfffffbff; + i_this->mAcch.Set(fopAcM_GetPosition_p(a_this), fopAcM_GetOldPosition_p(a_this), a_this, 1, &i_this->mAcchCir, fopAcM_GetSpeed_p(a_this), NULL, NULL); + i_this->mAcchCir.SetWall(50.0f, 150.0f); + i_this->mAcch.ClrWaterNone(); - cXyz local_44; - cXyz local_50; - - local_44.y = 0.0f; - local_44.x = 0.0f; + cXyz sp3C; + cXyz sp30; + sp3C.y = 0.0f; + sp3C.x = 0.0f; for (int i = 0; i < 8; i++) { cMtx_YrotS(*calc_mtx, i << 13); - local_44.z = cM_rndF(3000.0f) + 12000.0f; - MtxPosition(&local_44, &local_50); + sp3C.z = cM_rndF(3000.0f) + 12000.0f; + MtxPosition(&sp3C, &sp30); - b_path[i].x = local_50.x; - b_path[i].z = local_50.z; + b_path[i].x = sp30.x; + b_path[i].z = sp30.z; } i_this->mMantChildID = fopAcM_createChild(PROC_MANT, fopAcM_GetID(a_this), - 0, &i_this->current.pos, fopAcM_GetRoomNo(a_this), NULL, NULL, -1, 0); - i_this->health = 24; + 0, &a_this->current.pos, fopAcM_GetRoomNo(a_this), NULL, NULL, -1, 0); + a_this->health = 24; i_this->field_0x560 = 24; - i_this->field_0x1654.Init(254, 0, a_this); - i_this->field_0x0ec8.Init(150, 0, a_this); + i_this->mGndCcStts.Init(254, 0, a_this); + i_this->mHorseCcStts.Init(150, 0, a_this); + + static dCcD_SrcSph h_cc_sph_src = { + { + {0x0, {{AT_TYPE_CSTATUE_SWING, 0x2, 0x1f}, {0x4006020, 0x3}, 0x75}}, // mObj + {dCcD_SE_HARD_BODY, 0x0, 0x7, 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 cc_sph_src = { + { + {0x00, {{AT_TYPE_0, 0x0, 0x00}, {0x4012000, 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, 0x2, 0x1f}, {0x0, 0x0}, 0x0}}, // mObj + {dCcD_SE_HARD_BODY, 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 + }; + + static dCcD_SrcSph def_sph_src = { + { + {0x0, {{0x0, 0x0, 0x0}, {0xdcfbfdfd, 0x3}, 0x0}}, // mObj + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt + {dCcD_SE_METAL, 0x5, 0x0, 0x0, 0x2}, // mGObjTg + {0x0}, // mGObjCo + }, // mObjInf + { + {{0.0f, 0.0f, 0.0f}, 100.0f} // mSph + } // mSphAttr + }; + + static dCcD_SrcCyl co_cyl_src = { + { + {0x0, {{0x0, 0x0, 0x0}, {0x0, 0x0}, 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}, // mCenter + 100.0f, // mRadius + 200.0f // mHeight + } // mCyl + }; for (int i = 0; i < 2; i++) { - i_this->mHorseSpheres1[i].Set(h_cc_sph_src); - i_this->mHorseSpheres1[i].SetStts(&i_this->field_0x0ec8); - i_this->mHorseSpheres1[i].OnTgShield(); - i_this->mHorseSpheres1[i].SetTgHitMark(CcG_Tg_UNK_MARK_2); + i_this->mHorseBodySph[i].Set(h_cc_sph_src); + i_this->mHorseBodySph[i].SetStts(&i_this->mHorseCcStts); + i_this->mHorseBodySph[i].OnTgShield(); + i_this->mHorseBodySph[i].SetTgHitMark(CcG_Tg_UNK_MARK_2); } for (int i = 0; i < 4; i++) { - i_this->mHorseSpheres2[i].Set(h_cc_sph_src); - i_this->mHorseSpheres2[i].SetStts(&i_this->field_0x0ec8); - i_this->mHorseSpheres2[i].OnTgShield(); - i_this->mHorseSpheres2[i].SetTgHitMark(CcG_Tg_UNK_MARK_2); + i_this->mHorseFootSph[i].Set(h_cc_sph_src); + i_this->mHorseFootSph[i].SetStts(&i_this->mHorseCcStts); + i_this->mHorseFootSph[i].OnTgShield(); + i_this->mHorseFootSph[i].SetTgHitMark(CcG_Tg_UNK_MARK_2); } for (int i = 0; i < 3; i++) { - i_this->field_0x1690[i].Set(cc_sph_src); - i_this->field_0x1690[i].SetStts(&i_this->field_0x1654); - i_this->field_0x1690[i].OnTgNoHitMark(); + i_this->mGndSph[i].Set(cc_sph_src); + i_this->mGndSph[i].SetStts(&i_this->mGndCcStts); + i_this->mGndSph[i].OnTgNoHitMark(); } - i_this->field_0x1a38.Set(at_sph_src); - i_this->field_0x1a38.SetStts(&i_this->field_0x1654); + i_this->mAtSph.Set(at_sph_src); + i_this->mAtSph.SetStts(&i_this->mGndCcStts); - i_this->mAtInfo.mpSound = &i_this->mZ2Creature; + i_this->mAtInfo.mpSound = &i_this->mGndSound; i_this->mAtInfo.mPowerType = 5; - i_this->mZ2Creature.init(&i_this->current.pos, &i_this->eyePos, &i_this->field_0x269c, 3, 1, 1); - i_this->mZ2Creature.setEnemyName("B_gnd"); + i_this->mGndSound.init(&a_this->current.pos, &a_this->eyePos, &i_this->field_0x269c, 3, 1, 1); + i_this->mGndSound.setEnemyName("B_gnd"); - i_this->field_0x0680.init(&i_this->current.pos, &i_this->eyePos, 3, 1); - i_this->mZ2Creature.setEnemyName("B_gnd"); + i_this->mHorseSound.init(&a_this->current.pos, &a_this->eyePos, 3, 1); + i_this->mGndSound.setEnemyName("B_gnd"); - i_this->field_0x1b70.Set(def_sph_src); - i_this->field_0x1b70.SetStts(&i_this->field_0x1654); + i_this->mDefSph.Set(def_sph_src); + i_this->mDefSph.SetStts(&i_this->mGndCcStts); - i_this->field_0x1ca8.Set(co_cyl_src); - i_this->field_0x1ca8.SetStts(&i_this->field_0x1654); + i_this->mCoCyl.Set(co_cyl_src); + i_this->mCoCyl.SetStts(&i_this->mGndCcStts); - i_this->mActionID = ACTION_HWAIT_1; - i_this->field_0x05bc = -1; - i_this->field_0x1fc4 = 1; + i_this->mActionMode = ACTION_HWAIT_1; + i_this->mMoveMode = -1; + i_this->mDrawHorse = TRUE; - dKy_tevstr_init(&i_this->field_0x0774, fopAcM_GetRoomNo(a_this), -1); + dKy_tevstr_init(&i_this->mSwordTevstr, fopAcM_GetRoomNo(a_this), -1); - i_this->field_0x0770 = 0; - i_this->field_0x0771 = 1; + i_this->field_0x770 = 0; + i_this->mHideSheath = TRUE; - h_phase_state = dComIfGs_isSaveDunSwitch(1); - if (h_phase_state) { - i_this->field_0x2738 = 2; + if (dComIfGs_isSaveDunSwitch(1)) { + i_this->mNoDrawTimer = 2; } i_this->field_0x1e2c.init(&i_this->field_0x1e20, 1); - h_phase_state = 0; for (int i = 0; i < 5; i++) { - i_this->field_0x1f10[i].init(&i_this->field_0x1e5c[i], 1); + i_this->mLightBallSound[i].init(&i_this->mLightBallPos[i], 1); } + daB_GND_Execute(i_this); } @@ -5578,14 +4983,7 @@ static int daB_GND_Create(fopAc_ac_c* a_this) { } /* 80601960-80601D24 00D000 03C4+00 1/1 0/0 0/0 .text __ct__11b_gnd_classFv */ -b_gnd_class::b_gnd_class() { - // NONMATCHING -} - -/* 80602230-80602278 00D8D0 0048+00 2/1 0/0 0/0 .text __dt__13daB_GND_HIO_cFv */ -daB_GND_HIO_c::~daB_GND_HIO_c() { - // NONMATCHING -} +b_gnd_class::b_gnd_class() {} /* 80602E6C-80602E8C -00001 0020+00 1/0 0/0 0/0 .data l_daB_GND_Method */ static actor_method_class l_daB_GND_Method = { diff --git a/src/d/actor/d_a_b_ob.cpp b/src/d/actor/d_a_b_ob.cpp index 72c0684934..0b911443e5 100644 --- a/src/d/actor/d_a_b_ob.cpp +++ b/src/d/actor/d_a_b_ob.cpp @@ -2385,7 +2385,7 @@ static void demo_camera(b_ob_class* i_this) { case 1: if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, 0xFFEF, 0); - a_this->eventInfo.i_onCondition(2); + a_this->eventInfo.onCondition(2); return; } @@ -2510,7 +2510,7 @@ static void demo_camera(b_ob_class* i_this) { case 10: if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, 0xFFEF, 0); - a_this->eventInfo.i_onCondition(2); + a_this->eventInfo.onCondition(2); return; } @@ -2611,7 +2611,7 @@ static void demo_camera(b_ob_class* i_this) { case 20: if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0); - a_this->eventInfo.i_onCondition(2); + a_this->eventInfo.onCondition(2); return; } @@ -2714,7 +2714,7 @@ static void demo_camera(b_ob_class* i_this) { case 30: if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0); - a_this->eventInfo.i_onCondition(2); + a_this->eventInfo.onCondition(2); return; } @@ -2882,7 +2882,7 @@ static void demo_camera(b_ob_class* i_this) { case 40: if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0); - a_this->eventInfo.i_onCondition(2); + a_this->eventInfo.onCondition(2); return; } @@ -3174,7 +3174,7 @@ static void demo_camera(b_ob_class* i_this) { case 50: if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0); - a_this->eventInfo.i_onCondition(2); + a_this->eventInfo.onCondition(2); return; } @@ -3262,7 +3262,7 @@ static void demo_camera(b_ob_class* i_this) { case 60: if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0); - a_this->eventInfo.i_onCondition(2); + a_this->eventInfo.onCondition(2); return; } diff --git a/src/d/actor/d_a_b_yo.cpp b/src/d/actor/d_a_b_yo.cpp index b8c2e66979..811923e412 100644 --- a/src/d/actor/d_a_b_yo.cpp +++ b/src/d/actor/d_a_b_yo.cpp @@ -802,7 +802,7 @@ void daB_YO_c::executeOpening() { case 0: if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xffff, 0); - eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); return; } Z2GetAudioMgr()->seStart(Z2SE_EN_YO_DEMO_OP1, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); @@ -1558,9 +1558,9 @@ void daB_YO_c::executeSeriousDemo() { switch (mMode) { case 0: - if (!eventInfo.i_checkCommandDemoAccrpt()) { + if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xffff, 0); - eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); return; } dComIfGs_onOneZoneSwitch(7, fopAcM_GetRoomNo(this)); @@ -2161,9 +2161,9 @@ void daB_YO_c::executeDemoRevival() { switch (mMode) { case 0: - if (!eventInfo.i_checkCommandDemoAccrpt()) { + if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xffff, 0); - eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); return; } mMode = 1; @@ -2342,9 +2342,9 @@ void daB_YO_c::executeDeath() { switch (mMode) { case 0: setChillEffect(); - if (!eventInfo.i_checkCommandDemoAccrpt()) { + if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xffff, 0); - eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); return; } fopAcM_OnStatus(this, 0x4000); diff --git a/src/d/actor/d_a_b_zant.cpp b/src/d/actor/d_a_b_zant.cpp index d2ed24f9d5..c346d48229 100644 --- a/src/d/actor/d_a_b_zant.cpp +++ b/src/d/actor/d_a_b_zant.cpp @@ -1473,9 +1473,9 @@ void daB_ZANT_c::executeOpening() { current.pos.set(0.0f, 0.0f, 160.0f); shape_angle.y = -0x8000; - if (!eventInfo.i_checkCommandDemoAccrpt()) { + if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xFFFF, 4); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); return; } @@ -3817,9 +3817,9 @@ void daB_ZANT_c::executeLastStartDemo() { switch (mMode) { case 0: - if (!eventInfo.i_checkCommandDemoAccrpt()) { + if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xFFFF, 0); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } else { camera->Stop(); camera->SetTrimSize(3); @@ -4522,9 +4522,9 @@ void daB_ZANT_c::executeLastEndDemo() { switch (mMode) { case 0: - if (!eventInfo.i_checkCommandDemoAccrpt()) { + if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xFFFF, 0); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); return; } @@ -4795,9 +4795,9 @@ void daB_ZANT_c::executeRoomChange() { switch (mMode) { case 0: setTgHitBit(FALSE); - if (!eventInfo.i_checkCommandDemoAccrpt()) { + if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xFFFF, 0); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); return; } diff --git a/src/d/actor/d_a_bg_obj.cpp b/src/d/actor/d_a_bg_obj.cpp index 05552942d9..c3de573c50 100644 --- a/src/d/actor/d_a_bg_obj.cpp +++ b/src/d/actor/d_a_bg_obj.cpp @@ -1133,7 +1133,7 @@ int daBgObj_c::actionOrderWait() { /* 8045BBE0-8045BD50 002600 0170+00 1/0 0/0 0/0 .text actionOrder__9daBgObj_cFv */ int daBgObj_c::actionOrder() { - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { setAction(2); if (field_0xd01 < 5) { diff --git a/src/d/actor/d_a_boomerang.cpp b/src/d/actor/d_a_boomerang.cpp index 1d6fb89c54..d4db6f5154 100644 --- a/src/d/actor/d_a_boomerang.cpp +++ b/src/d/actor/d_a_boomerang.cpp @@ -756,7 +756,7 @@ void daBoomerang_c::setAimPos() { void daBoomerang_c::checkBgHit(cXyz* i_start, cXyz* i_end) { m_lineChk.Set(i_start, i_end, this); if (dComIfG_Bgsp().LineCross(&m_lineChk)) { - current.pos = m_lineChk.i_GetCross(); + current.pos = m_lineChk.GetCross(); onStateFlg0(FLG0_1); field_0x957 = 0; current.angle.y -= -0x8000; @@ -778,7 +778,7 @@ void daBoomerang_c::checkBgHit(cXyz* i_start, cXyz* i_end) { } if (field_0x718[field_0x951] != 0) { - if (m_lockActorsPositions[field_0x951].abs2(m_boomLineChk.i_GetCross()) < 2500.0f) { + if (m_lockActorsPositions[field_0x951].abs2(m_boomLineChk.GetCross()) < 2500.0f) { if (field_0x951 < m_lockCnt - 1) { field_0x718[field_0x951] = 0; field_0x951++; @@ -792,7 +792,7 @@ void daBoomerang_c::checkBgHit(cXyz* i_start, cXyz* i_end) { return; } - current.pos = m_boomLineChk.i_GetCross(); + current.pos = m_boomLineChk.GetCross(); onStateFlg0(FLG0_1); field_0x957 = 0; current.angle.y -= -0x8000; diff --git a/src/d/actor/d_a_demo_item.cpp b/src/d/actor/d_a_demo_item.cpp index 11aa20ecc2..c72cfb863a 100644 --- a/src/d/actor/d_a_demo_item.cpp +++ b/src/d/actor/d_a_demo_item.cpp @@ -362,7 +362,7 @@ void daDitem_c::set_pos() { offset = offset_tbl[0]; } - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { offset = l_wolf_offset; sp38.y = player->getLeftFootPosP()->y; } else if (player->checkHorseRide()) { diff --git a/src/d/actor/d_a_do.cpp b/src/d/actor/d_a_do.cpp index 9343458392..7aaad5877f 100644 --- a/src/d/actor/d_a_do.cpp +++ b/src/d/actor/d_a_do.cpp @@ -1118,7 +1118,7 @@ static s16 hang_set(do_class* i_this) { vec3[i] += vec2; lin_chk.Set(&vec2, &vec3[i], _this); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - vec3[i] = lin_chk.i_GetCross(); + vec3[i] = lin_chk.GetCross(); } else { return 0xDCF; } @@ -1760,7 +1760,7 @@ static s8 do_boat(do_class* i_this) { lin_chk.Set(&i_this->field_0xc90, &i_this->field_0xc9c, _this); if (dComIfG_Bgsp().LineCross(&lin_chk)) { i_this->field_0xc80 = false; - i_this->mTargetPos = lin_chk.i_GetCross(); + i_this->mTargetPos = lin_chk.GetCross(); i_this->mMode = 5; } } @@ -1883,7 +1883,7 @@ static s8 do_carry(do_class* i_this) { vec.y += 2.0f; lin_chk.Set(&player->eyePos, &vec, _this); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - _this->current.pos = lin_chk.i_GetCross(); + _this->current.pos = lin_chk.GetCross(); } return ret; @@ -2035,7 +2035,7 @@ static void action(do_class* i_this) { } } - if (i_this->mMessageState == 1 && daPy_py_c::i_checkNowWolf() + if (i_this->mMessageState == 1 && daPy_py_c::checkNowWolf() && i_this->mDistFromPlayer < 300.0f) { i_this->mAction = ACT_MESSAGE; @@ -2328,10 +2328,10 @@ static void message(do_class* i_this) { i_this->mIsTalking = 1; } - if (i_this->mMessageState == 2 && i_this->mFlowID != -1 && daPy_py_c::i_checkNowWolf()) { + if (i_this->mMessageState == 2 && i_this->mFlowID != -1 && daPy_py_c::checkNowWolf()) { fopAcM_OnStatus(i_this, 0); cLib_onBit(i_this->attention_info.flags, 0xa); - i_this->eventInfo.i_onCondition(dEvtCnd_CANTALK_e); + i_this->eventInfo.onCondition(dEvtCnd_CANTALK_e); } else { fopAcM_OffStatus(i_this, 0); cLib_offBit(i_this->attention_info.flags, 0xa); diff --git a/src/d/actor/d_a_door_boss.cpp b/src/d/actor/d_a_door_boss.cpp index 026f772eb3..44824316fc 100644 --- a/src/d/actor/d_a_door_boss.cpp +++ b/src/d/actor/d_a_door_boss.cpp @@ -296,7 +296,7 @@ BOOL daBdoor_c::checkFront() { /* 80670294-80670320 000EF4 008C+00 1/1 0/0 0/0 .text checkOpen__9daBdoor_cFv */ BOOL daBdoor_c::checkOpen() { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { return false; } if (!dComIfGs_isDungeonItemBossKey()) { @@ -324,14 +324,14 @@ static char const l_staff_name[13] = "SHUTTER_DOOR"; /* 80670328-806703C0 000F88 0098+00 1/0 0/0 0/0 .text actionCloseWait__9daBdoor_cFv */ BOOL daBdoor_c::actionCloseWait() { - if (eventInfo.i_checkCommandDoor()) { + if (eventInfo.checkCommandDoor()) { mStaffID = dComIfGp_evmng_getMyStaffId(l_staff_name, NULL, 0); demoProc(); setAction(ACT_OPEN); } else { if (checkOpen()) { eventInfo.setEventName((char*)l_door_open_demo); - eventInfo.i_onCondition(dEvtCnd_CANDOOR_e); + eventInfo.onCondition(dEvtCnd_CANDOOR_e); } } return 1; diff --git a/src/d/actor/d_a_door_bossL1.cpp b/src/d/actor/d_a_door_bossL1.cpp index a213d3f3ff..54e79537a4 100644 --- a/src/d/actor/d_a_door_bossL1.cpp +++ b/src/d/actor/d_a_door_bossL1.cpp @@ -923,14 +923,14 @@ int daBdoorL1_c::actionWait() { /* 804E441C-804E44B4 0026FC 0098+00 1/0 0/0 0/0 .text actionCloseWait__11daBdoorL1_cFv */ int daBdoorL1_c::actionCloseWait() { - if (eventInfo.i_checkCommandDoor()) { + if (eventInfo.checkCommandDoor()) { field_0x5a0 = dComIfGp_evmng_getMyStaffId(l_staff_name, 0, 0); demoProc(); setAction(ACTION_OPEN); } else if (checkOpen()) { eventInfo.setEventId(field_0x59e); eventInfo.setMapToolId(0xff); - eventInfo.i_onCondition(4); + eventInfo.onCondition(4); } return 1; } diff --git a/src/d/actor/d_a_door_bossL5.cpp b/src/d/actor/d_a_door_bossL5.cpp index 397e3cfdf6..e0603d74b0 100644 --- a/src/d/actor/d_a_door_bossL5.cpp +++ b/src/d/actor/d_a_door_bossL5.cpp @@ -412,7 +412,7 @@ int daBdoorL5_c::checkFront() { /* 80671DE4-80671E70 001224 008C+00 1/1 0/0 0/0 .text checkOpen__11daBdoorL5_cFv */ int daBdoorL5_c::checkOpen() { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { return 0; } @@ -436,7 +436,7 @@ int daBdoorL5_c::actionWait() { /* 80671E78-80671F58 0012B8 00E0+00 1/0 0/0 0/0 .text actionCloseWait__11daBdoorL5_cFv */ int daBdoorL5_c::actionCloseWait() { - if (eventInfo.i_checkCommandDoor()) { + if (eventInfo.checkCommandDoor()) { field_0x59c = dComIfGp_evmng_getMyStaffId(l_staff_name, 0, 0); demoProc(); setAction(ACTION_OPEN); @@ -449,7 +449,7 @@ int daBdoorL5_c::actionCloseWait() { eventInfo.setEventId(field_0x598); eventInfo.setMapToolId(field_0x593); } - eventInfo.i_onCondition(4); + eventInfo.onCondition(4); } } return 1; diff --git a/src/d/actor/d_a_door_dbdoor00.cpp b/src/d/actor/d_a_door_dbdoor00.cpp index c9a4939add..b62493c31a 100644 --- a/src/d/actor/d_a_door_dbdoor00.cpp +++ b/src/d/actor/d_a_door_dbdoor00.cpp @@ -341,7 +341,7 @@ int daDbDoor00_c::actionLockWait() { /* 8045E000-8045E094 000D00 0094+00 1/0 0/0 0/0 .text actionLockOff__12daDbDoor00_cFv */ int daDbDoor00_c::actionLockOff() { - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { field_0x598 = dComIfGp_evmng_getMyStaffId("DOUBLE_DOOR", NULL, 0); demoProc(); setAction(3); @@ -365,7 +365,7 @@ int daDbDoor00_c::actionLockDemo() { /* 8045E108-8045E1C8 000E08 00C0+00 1/0 0/0 0/0 .text actionCloseWait__12daDbDoor00_cFv */ int daDbDoor00_c::actionCloseWait() { - if (eventInfo.i_checkCommandDoor()) { + if (eventInfo.checkCommandDoor()) { field_0x598 = dComIfGp_evmng_getMyStaffId("DOUBLE_DOOR", NULL, 0); demoProc(); setAction(5); @@ -374,7 +374,7 @@ int daDbDoor00_c::actionCloseWait() { } else { if (checkArea() != 0) { eventInfo.setEventName("DEFAULT_DOUBLE_DOOR_OPEN"); - eventInfo.i_onCondition(4); + eventInfo.onCondition(4); } } return 1; diff --git a/src/d/actor/d_a_door_knob00.cpp b/src/d/actor/d_a_door_knob00.cpp index 23ee222b5d..e0442c3860 100644 --- a/src/d/actor/d_a_door_knob00.cpp +++ b/src/d/actor/d_a_door_knob00.cpp @@ -307,13 +307,13 @@ void daKnob20_c::setEventPrm() { field_0x5b9 = 5; } } - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { if (!checkArea(80.0f, 110.0f, 250.0f)) { offFlag(4); } else { eventInfo.setEventId(field_0x5a4[field_0x5b9]); eventInfo.setMapToolId(field_0x5b2[field_0x5b9]); - eventInfo.i_onCondition(4); + eventInfo.onCondition(4); } } } @@ -594,7 +594,7 @@ void daKnob20_c::startDemoProc() { /* 8045FF08-8045FFB0 001728 00A8+00 1/0 0/0 0/0 .text actionWait__10daKnob20_cFv */ int daKnob20_c::actionWait() { - if (eventInfo.i_checkCommandDoor()) { + if (eventInfo.checkCommandDoor()) { initOpenDemo(); setAction(ACTION_DEMO); demoProc(); @@ -649,7 +649,7 @@ int daKnob20_c::actionTalk() { /* 8046012C-804601D4 00194C 00A8+00 1/0 0/0 0/0 .text actionTalkWait__10daKnob20_cFv */ int daKnob20_c::actionTalkWait() { - if (eventInfo.i_checkCommandDoor()) { + if (eventInfo.checkCommandDoor()) { initOpenDemo(); setAction(ACTION_TALK); demoProc(); @@ -667,7 +667,7 @@ int daKnob20_c::actionTalkWait() { /* 804601D4-8046027C 0019F4 00A8+00 1/0 0/0 0/0 .text actionTalkOpen__10daKnob20_cFv */ int daKnob20_c::actionTalkOpen() { - if (eventInfo.i_checkCommandDoor()) { + if (eventInfo.checkCommandDoor()) { initOpenDemo(); setAction(ACTION_DEMO); demoProc(); diff --git a/src/d/actor/d_a_door_mbossL1.cpp b/src/d/actor/d_a_door_mbossL1.cpp index b60b9ea408..73b91fdf94 100644 --- a/src/d/actor/d_a_door_mbossL1.cpp +++ b/src/d/actor/d_a_door_mbossL1.cpp @@ -1363,7 +1363,7 @@ int daMBdoorL1_c::checkArea() { daPy_py_c* player = daPy_getPlayerActorClass(); cXyz local_48; cXyz local_54; - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { local_48 = player->attention_info.position - current.pos; local_54 = player->current.pos - current.pos; } else { @@ -1378,7 +1378,7 @@ int daMBdoorL1_c::checkArea() { if (fabsf(local_48.x) > 130.0f) { return 0; } - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { mDoMtx_stack_c::multVec(&local_54, &local_54); if (fabsf(local_54.x) > 130.0f) { return 0; @@ -1410,7 +1410,7 @@ int daMBdoorL1_c::checkFront() { /* 80676308-806764D0 003B48 01C8+00 1/1 0/0 0/0 .text checkOpen__12daMBdoorL1_cFv */ int daMBdoorL1_c::checkOpen() { daPy_py_c* player = daPy_getPlayerActorClass(); - if (getDoorType() == DOOR_TYPE_2 && daPy_py_c::i_checkNowWolf()) { + if (getDoorType() == DOOR_TYPE_2 && daPy_py_c::checkNowWolf()) { return 0; } if ((checkFrontKey() || checkBackKey()) && dComIfGs_getKeyNum() == 0) { @@ -1618,7 +1618,7 @@ int daMBdoorL1_c::actionWait() { /* 80676BE8-80676DEC 004428 0204+00 2/1 0/0 0/0 .text actionCloseWait__12daMBdoorL1_cFv */ int daMBdoorL1_c::actionCloseWait() { - if (eventInfo.i_checkCommandDoor()) { + if (eventInfo.checkCommandDoor()) { field_0x5e8 = dComIfGp_evmng_getMyStaffId(l_staff_name, 0, 0); demoProc(); setAction(ACTION_OPEN); @@ -1653,7 +1653,7 @@ int daMBdoorL1_c::actionCloseWait() { if (checkOpen()) { eventInfo.setEventId(field_0x5d4[field_0x5de]); eventInfo.setMapToolId(0xff); - eventInfo.i_onCondition(4); + eventInfo.onCondition(4); } } } diff --git a/src/d/actor/d_a_door_push.cpp b/src/d/actor/d_a_door_push.cpp index ddd716006a..7e543fac72 100644 --- a/src/d/actor/d_a_door_push.cpp +++ b/src/d/actor/d_a_door_push.cpp @@ -245,19 +245,19 @@ void daDoorPush_c::actionOpenWait() { if (mIndex != 2) { setAction(1); fopAcM_orderOtherEventId(this, field_0x63a[mIndex], field_0x63e[mIndex], 0xffff, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } /* 8067877C-806787F8 000A3C 007C+00 1/0 0/0 0/0 .text actionOrderEvent__12daDoorPush_cFv */ void daDoorPush_c::actionOrderEvent() { - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { setAction(2); demoProc(); } else { fopAcM_orderOtherEventId(this, field_0x63a[mIndex], field_0x63e[mIndex], 0xffff, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } diff --git a/src/d/actor/d_a_door_shutter.cpp b/src/d/actor/d_a_door_shutter.cpp index 1002a62f41..d053c9ee05 100644 --- a/src/d/actor/d_a_door_shutter.cpp +++ b/src/d/actor/d_a_door_shutter.cpp @@ -225,7 +225,7 @@ void daDoor20_c::setEventPrm() { } if (dComIfGp_roomControl_checkStatusFlag(roomNo, 1)) { if (door_param2_c::getKind(this) == 9) { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { return; } int iStack_48; @@ -256,7 +256,7 @@ void daDoor20_c::setEventPrm() { } } } else { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { if (!player->checkMidnaRide() || !daMidna_c::checkMidnaRealBody()) { return; } @@ -279,7 +279,7 @@ void daDoor20_c::setEventPrm() { } if (chkMakeKey()) { if (field_0x5f0) { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { if (dComIfGs_getKeyNum() == 0) { return; } @@ -318,7 +318,7 @@ void daDoor20_c::setEventPrm() { if (checkArea(getSize2X(), 12100.0f, 62500.0f)) { eventInfo.setEventId(field_0x692[field_0x6cb]); eventInfo.setMapToolId(field_0x6b8[field_0x6cb]); - eventInfo.i_onCondition(4); + eventInfo.onCondition(4); } } } @@ -422,7 +422,7 @@ static u16 const l_eff_id_lv4[5] = { /* 80461A60-80461D24 000FA0 02C4+00 1/1 0/0 0/0 .text openInit_0__10daDoor20_cFv */ void daDoor20_c::openInit_0() { J3DAnmTransform* anm; - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { if (door_param2_c::getKind(this) == 10) { anm = (J3DAnmTransform*)dComIfG_getObjectRes(getArcName(), "md_oj_DoorOpF.bck"); } else { @@ -462,7 +462,7 @@ void daDoor20_c::openInit_0() { /* 80461D24-80461EC4 001264 01A0+00 1/1 0/0 0/0 .text openInit_1__10daDoor20_cFv */ void daDoor20_c::openInit_1() { J3DAnmTransform* anm; - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { anm = (J3DAnmTransform*)dComIfG_getObjectRes(getArcName(), "md_oj_DoorOpC.bck"); } else { anm = (J3DAnmTransform*)dComIfG_getObjectRes(getArcName(), "oj_DoorOpC.bck"); @@ -518,7 +518,7 @@ int daDoor20_c::openProc(int param_1) { dComIfGp_getVibration().StartShock(4, 15, cXyz(0.0f, 1.0f, 0.0f)); } else { if (field_0x584.getFrame() == 18.0f) { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { u32 mdnfx; if (field_0x672) { mdnfx = Z2SE_OBJ_WOOD_DR_OP_MDN_FX; @@ -546,7 +546,7 @@ int daDoor20_c::openProc(int param_1) { { dComIfGp_getVibration().StartShock(4, 15, cXyz(0.0f, 1.0f, 0.0f)); } - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { if (field_0x584.getFrame() == 20.0f) { if (door_param2_c::getKind(this) == 2) { sfx = Z2SE_OBJ_L8_SHTR_OP; @@ -1211,7 +1211,7 @@ int daDoor20_c::orderStopEvent() { /* 80463FBC-80464118 0034FC 015C+00 2/2 0/0 0/0 .text actionWait__10daDoor20_cFv */ int daDoor20_c::actionWait() { - if (eventInfo.i_checkCommandDoor()) { + if (eventInfo.checkCommandDoor()) { initOpenDemo(1); setAction(ACTION_DEMO); demoProc(); @@ -1344,7 +1344,7 @@ int daDoor20_c::draw() { return 1; } calcMtx(); - if (!eventInfo.i_checkCommandDoor() && field_0x5c8 != dComIfGp_roomControl_getStayNo()) { + if (!eventInfo.checkCommandDoor() && field_0x5c8 != dComIfGp_roomControl_getStayNo()) { field_0x5c4->Move(); field_0x5c8 = dComIfGp_roomControl_getStayNo(); } @@ -1531,7 +1531,7 @@ int daDoor20_c::frontCheck() { /* 80464CEC-80464E18 00422C 012C+00 1/1 0/0 0/0 .text drawCheck__10daDoor20_cFi */ int daDoor20_c::drawCheck(int param_1) { - if (!adjoinPlayer() && !eventInfo.i_checkCommandDemoAccrpt() && !eventInfo.i_checkCommandDoor()) + if (!adjoinPlayer() && !eventInfo.checkCommandDemoAccrpt() && !eventInfo.checkCommandDoor()) { return 0; } @@ -1566,7 +1566,7 @@ int daDoor20_c::checkExecute() { if (fopAcM_checkStatus(this, 0x1000)) { return 1; } - if (eventInfo.i_checkCommandDemoAccrpt() || eventInfo.i_checkCommandDoor()) { + if (eventInfo.checkCommandDemoAccrpt() || eventInfo.checkCommandDoor()) { return 2; } if (field_0x67d != dComIfGp_roomControl_getStayNo()) { @@ -1720,7 +1720,7 @@ void daDoor20_c::makeEventId() { int i; switch (field_0x691) { case 1: - if (player != NULL && player->i_checkNowWolf()) { + if (player != NULL && player->checkNowWolf()) { int j = 0; for (i = 4; i < 8; i++, j++) { field_0x692[i] = @@ -1735,7 +1735,7 @@ void daDoor20_c::makeEventId() { } break; case 3: - if (player != NULL && player->i_checkNowWolf()) { + if (player != NULL && player->checkNowWolf()) { int j = 0; for (i = 4; i < 8; i++, j++) { field_0x692[i] = @@ -1750,7 +1750,7 @@ void daDoor20_c::makeEventId() { } break; case 2: - if (player != NULL && player->i_checkNowWolf()) { + if (player != NULL && player->checkNowWolf()) { int j = 0; for (i = 4; i < 8; i++, j++) { field_0x692[i] = @@ -1772,7 +1772,7 @@ void daDoor20_c::makeEventId() { } break; case 5: - if (player != NULL && player->i_checkNowWolf()) { + if (player != NULL && player->checkNowWolf()) { int j = 0; for (i = 4; i < 8; i++, j++) { field_0x692[i] = @@ -1787,7 +1787,7 @@ void daDoor20_c::makeEventId() { } break; case 6: - if (player != NULL && player->i_checkNowWolf()) { + if (player != NULL && player->checkNowWolf()) { int j = 0; for (i = 4; i < 8; i++, j++) { field_0x692[i] = @@ -1903,7 +1903,7 @@ void daDoor20_c::getRestartPos(cXyz* param_1) { cXyz acStack_78 = player->current.pos - current.pos; f32 dVar9 = acStack_78.inprodXZ(field_0x680); f32 fVar1; - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { if (dVar9 < 0.0f) { fVar1 = 300.0f; } else { @@ -1969,7 +1969,7 @@ void daDoor20_c::setGoal() { mDoMtx_stack_c::multVec(&local_1c, &local_1c); local_1c.x = local_1c.x * 0.8f; local_1c.y = 0.0f; - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { local_1c.z = -300.0f; } else { local_1c.z = -200.0f; diff --git a/src/d/actor/d_a_e_arrow.cpp b/src/d/actor/d_a_e_arrow.cpp index f0de66acd4..da0dddde59 100644 --- a/src/d/actor/d_a_e_arrow.cpp +++ b/src/d/actor/d_a_e_arrow.cpp @@ -216,7 +216,7 @@ static void hit_check(e_arrow_class* i_this) { line_chk.Set(&line_chk_start, &i_this->current.pos, i_this); if (dComIfG_Bgsp().LineCross(&line_chk)) { - i_this->current.pos = line_chk.i_GetCross(); + i_this->current.pos = line_chk.GetCross(); dComIfG_Bgsp().ArrowStickCallBack(line_chk, i_this, i_this->current.pos); if (i_this->mFlags & 0x10) { diff --git a/src/d/actor/d_a_e_bee.cpp b/src/d/actor/d_a_e_bee.cpp index 48e228fdcd..d20f176f20 100644 --- a/src/d/actor/d_a_e_bee.cpp +++ b/src/d/actor/d_a_e_bee.cpp @@ -168,10 +168,10 @@ static void bee_ground_ang_set(bee_s* i_bee) { s8 bvar1 = false; lin_chk.Set(&vec1, &vec2, NULL); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - vec2 = lin_chk.i_GetCross(); + vec2 = lin_chk.GetCross(); lin_chk.Set(&vec1, &vec3, NULL); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - vec3 = lin_chk.i_GetCross(); + vec3 = lin_chk.GetCross(); bvar1 = true; } } @@ -186,10 +186,10 @@ static void bee_ground_ang_set(bee_s* i_bee) { bvar1 = false; lin_chk.Set(&vec1, &vec2, NULL); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - vec2 = lin_chk.i_GetCross(); + vec2 = lin_chk.GetCross(); lin_chk.Set(&vec1, &vec3, NULL); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - vec3 = lin_chk.i_GetCross(); + vec3 = lin_chk.GetCross(); bvar1 = true; } } diff --git a/src/d/actor/d_a_e_dt.cpp b/src/d/actor/d_a_e_dt.cpp index cef6cff2b9..9a577dbcb8 100644 --- a/src/d/actor/d_a_e_dt.cpp +++ b/src/d/actor/d_a_e_dt.cpp @@ -1508,9 +1508,9 @@ void daE_DT_c::executeDeath() { break; case 2: - if (!eventInfo.i_checkCommandDemoAccrpt()) { + if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xffff, 0); - eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); } else { setDeadShibukiEffect(); setDeadYodareEffect(); @@ -1753,9 +1753,9 @@ void daE_DT_c::executeOpening() { return; case 3: - if (!eventInfo.i_checkCommandDemoAccrpt()) { + if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xffff, 0); - eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); } else { mMode = 4; mTimer = 60; diff --git a/src/d/actor/d_a_e_fs.cpp b/src/d/actor/d_a_e_fs.cpp index 58d48c6ac5..3cf593e4fa 100644 --- a/src/d/actor/d_a_e_fs.cpp +++ b/src/d/actor/d_a_e_fs.cpp @@ -263,7 +263,7 @@ static void e_fs_move(e_fs_class* i_this) { f32 target_speed = l_HIO.mMoveSpeedRatio * (0.8f * fopAcM_GetSpeedF(daPy_getPlayerActorClass()) + 20.0f); - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { target_speed = 0.7f * (0.8f * fopAcM_GetSpeedF(daPy_getPlayerActorClass()) + 20.0f); } cLib_addCalc2(&i_this->speedF, target_speed, 1.0f, 0.5f); diff --git a/src/d/actor/d_a_e_hzelda.cpp b/src/d/actor/d_a_e_hzelda.cpp index cb0240061b..70d8058368 100644 --- a/src/d/actor/d_a_e_hzelda.cpp +++ b/src/d/actor/d_a_e_hzelda.cpp @@ -855,7 +855,7 @@ static void demo_camera(e_hzelda_class* i_this) { case 1: if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0); - a_this->eventInfo.i_onCondition(2); + a_this->eventInfo.onCondition(2); return; } diff --git a/src/d/actor/d_a_e_nest.cpp b/src/d/actor/d_a_e_nest.cpp index 287f9cc30c..1fa1336f79 100644 --- a/src/d/actor/d_a_e_nest.cpp +++ b/src/d/actor/d_a_e_nest.cpp @@ -359,7 +359,7 @@ static s16 wall_angle_get(e_nest_class* i_this) { vec3[i] += vec2; lin_chk.Set(&vec2, &vec3[i], a_this); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - vec3[i] = lin_chk.i_GetCross(); + vec3[i] = lin_chk.GetCross(); } else { return 0x23; } @@ -492,7 +492,7 @@ static int water_check(e_nest_class* i_this) { vec.z = i_this->current.pos.z; lin_chk.Set(&i_this->current.pos, &vec, i_this); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - vec.y = lin_chk.i_GetCross().y - 10.0f; + vec.y = lin_chk.GetCross().y - 10.0f; } dBgS_ObjGndChk_Spl gnd_chk; gnd_chk.SetPos(&vec); @@ -605,12 +605,12 @@ static void e_nest_hahen(e_nest_class* i_this) { a_this->current.pos = i_this->mDebris[i].mPos; a_this->attention_info.position = a_this->current.pos; a_this->eyePos = a_this->attention_info.position; - if (a_this->eventInfo.i_checkCommandCatch()) { + if (a_this->eventInfo.checkCommandCatch()) { i_this->mMode = 2; i_this->mTimers[0] = 60; } else { dComIfGp_att_CatchRequest(a_this, 0x76, 100.0f, 50.0f, -150.0f, 0x5000, 1); - a_this->eventInfo.i_onCondition(0x40); + a_this->eventInfo.onCondition(0x40); } break; } @@ -809,7 +809,7 @@ static void demo_camera(e_nest_class* i_this) { case 1: if (!i_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(i_this, 2, -1, 0); - i_this->eventInfo.i_onCondition(2); + i_this->eventInfo.onCondition(2); return; } camera->mCamera.Stop(); diff --git a/src/d/actor/d_a_e_oc.cpp b/src/d/actor/d_a_e_oc.cpp index 5eb3b2f2e0..e2cfd15afd 100644 --- a/src/d/actor/d_a_e_oc.cpp +++ b/src/d/actor/d_a_e_oc.cpp @@ -393,7 +393,7 @@ int daE_OC_c::checkBeforeBg() { link_chk.Set(&my_vec_0, &my_vec_1, this); if (dComIfG_Bgsp().LineCross(&link_chk)) { dComIfG_Bgsp().GetTriPla(link_chk, &plane); - if (my_vec_0.abs(link_chk.i_GetCross()) < 100.0f) { + if (my_vec_0.abs(link_chk.GetCross()) < 100.0f) { return 1; } if ( (s16) (cM_atan2s(plane.mNormal.x, plane.mNormal.z) - shape_angle.y) > 0) diff --git a/src/d/actor/d_a_e_pm.cpp b/src/d/actor/d_a_e_pm.cpp index cc3ebf8a4b..6f2ce6a5fe 100644 --- a/src/d/actor/d_a_e_pm.cpp +++ b/src/d/actor/d_a_e_pm.cpp @@ -382,7 +382,7 @@ bool daE_PM_c::CameraSet() { camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); dCamera_c* camera_body = dCam_getBody(); - if (!eventInfo.i_checkCommandDemoAccrpt()) { + if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xffff, 0); return false; } diff --git a/src/d/actor/d_a_e_po.cpp b/src/d/actor/d_a_e_po.cpp index 618ae09dca..4931a6517b 100644 --- a/src/d/actor/d_a_e_po.cpp +++ b/src/d/actor/d_a_e_po.cpp @@ -3037,9 +3037,9 @@ extern "C" void fopAcM_searchPlayerAngleY__FPC10fopAc_ac_c() { } /* 8075764C-8075765C 00B1EC 0010+00 1/1 0/0 0/0 .text onCondition__11dEvt_info_cFUs */ -void dEvt_info_c::onCondition(u16 param_0) { +/* void dEvt_info_c::onCondition(u16 param_0) { // NONMATCHING -} +} */ /* 8075765C-80757670 00B1FC 0014+00 1/1 0/0 0/0 .text checkCommandDemoAccrpt__11dEvt_info_cFv */ // void dEvt_info_c::checkCommandDemoAccrpt() { diff --git a/src/d/actor/d_a_e_pz.cpp b/src/d/actor/d_a_e_pz.cpp index 93e20bf78c..ef3d44cc0e 100644 --- a/src/d/actor/d_a_e_pz.cpp +++ b/src/d/actor/d_a_e_pz.cpp @@ -480,7 +480,7 @@ void daE_PZ_c::executeOpeningDemo() { case 101: if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xFFFF, 0); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); mDemoCameraEye = camera0->lookat.eye; mDemoCameraCenter = camera0->lookat.center; break; @@ -593,7 +593,7 @@ void daE_PZ_c::executeOpeningDemo() { current.angle.y = fopAcM_searchPlayerAngleY(this); if (field_0x7d0 == 1) { - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 2, 0); } else { daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 0, 0); @@ -674,7 +674,7 @@ void daE_PZ_c::executeOpeningDemo() { ((daE_PZ_c*)parent)->mMoveMode = 20; dComIfGp_particle_set(0x889D, &parent->current.pos, &shape_angle, NULL); - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 2, 0); } else { daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 0, 0); @@ -732,7 +732,7 @@ void daE_PZ_c::executeOpeningDemo() { data_80761E29 = 2; data_80761E28 = 0; case 30: - if (!eventInfo.i_checkCommandDemoAccrpt()) { + if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xFFFF, 3); break; } @@ -741,7 +741,7 @@ void daE_PZ_c::executeOpeningDemo() { sp120.set(0.0f, player->current.pos.y, -1300.0f); daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp120, -0x8000, 0); - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 2, 0); } else { daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 0, 0); @@ -772,7 +772,7 @@ void daE_PZ_c::executeOpeningDemo() { case 31: case 131: if (mMoveMode == 31) { - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { sp120.set(-70.0f, 250.0f + XREG_F(1), -950.0f + XREG_F(2)); } else { sp120.set(-70.0f, 200.0f + XREG_F(3), -700.0f + XREG_F(4)); @@ -809,7 +809,7 @@ void daE_PZ_c::executeOpeningDemo() { if (field_0x7d7 == 0) { if (field_0x7d0 >= 30) { if (arg0 == 0) { - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { sp120.set(0.0f, 0.0f, -800.0f); } else { sp120.set(0.0f, 0.0f, -700.0f); @@ -1015,7 +1015,7 @@ void daE_PZ_c::executeOpeningDemo() { break; } - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { current.pos.set(0.0f, 0.0f, -2850.0f); } else { current.pos.set(0.0f, 0.0f, -3000.0f); @@ -1030,7 +1030,7 @@ void daE_PZ_c::executeOpeningDemo() { case 110: mSetFirePos(); - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { mDemoCameraCenter.set(mPzCenterInit_dt[14]); mDemoCameraEye.set(mPzEyeInit_dt[14]); } else { @@ -1050,7 +1050,7 @@ void daE_PZ_c::executeOpeningDemo() { case 111: if (field_0x7d0 != 0) { if (field_0x7d0 == 1) { - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { daPy_getPlayerActorClass()->changeDemoMode(0xC, 1, 1, 0); } else { daPy_getPlayerActorClass()->changeDemoMode(0x2B, 0, 0, 0); @@ -1062,7 +1062,7 @@ void daE_PZ_c::executeOpeningDemo() { break; } - if (field_0x7d7 < 10 && !daPy_py_c::i_checkNowWolf()) { + if (field_0x7d7 < 10 && !daPy_py_c::checkNowWolf()) { field_0x7d7++; if (field_0x7d7 == 10) { daPy_getPlayerActorClass()->changeDemoMode(0x24, 0x16, 0, 0); @@ -1127,7 +1127,7 @@ void daE_PZ_c::executeOpeningDemo() { break; case 114: if (field_0x7d0 == 0) { - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { daPy_getPlayerActorClass()->changeDemoMode(0x22, 1, 0, 0); } else { daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 0, 0); @@ -1577,9 +1577,9 @@ void daE_PZ_c::executeDead() { case 0: case 10: field_0x7d0 = 0; - if (!eventInfo.i_checkCommandDemoAccrpt()) { + if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xFFFF, 0); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); mDemoCameraEye = sp18->lookat.eye; mDemoCameraCenter = sp18->lookat.center; diff --git a/src/d/actor/d_a_e_rdy.cpp b/src/d/actor/d_a_e_rdy.cpp index 8006ab0650..45ac46e3e3 100644 --- a/src/d/actor/d_a_e_rdy.cpp +++ b/src/d/actor/d_a_e_rdy.cpp @@ -2057,7 +2057,7 @@ static void e_rdy_damage(e_rdy_class* i_this) { i_this->mTargetEyeScale = 0.0f; - if (!daPy_py_c::i_checkNowWolf() && i_this->checkCutDownHitFlg()) { + if (!daPy_py_c::checkNowWolf() && i_this->checkCutDownHitFlg()) { i_this->offCutDownHitFlg(); i_this->mMode = 3; i_this->mTimer[0] = 100; @@ -2160,7 +2160,7 @@ static void e_rdy_damage(e_rdy_class* i_this) { 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()) { + if (i_this->health > 0 && !daPy_py_c::checkNowWolf()) { i_this->onDownFlg(); } dKy_Sound_set(i_this->current.pos, 100, fopAcM_GetID(i_this), 5); @@ -2182,7 +2182,7 @@ static void e_rdy_damage(e_rdy_class* i_this) { angle_y = i_this->field_0xadc.y + 0x8000; } i_this->current.angle.y = angle_y; - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { i_this->mTimer[0] = 80; i_this->mTimer[1] = 55; } else { @@ -3726,9 +3726,9 @@ static void demo_camera(e_rdy_class* i_this) { switch (i_this->mDemoMode) { case 1: - if (!i_this->eventInfo.i_checkCommandDemoAccrpt()) { + if (!i_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(i_this, 2, 0xffef, 0); - i_this->eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + i_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e); return; } player_camera->mCamera.Stop(); @@ -3767,9 +3767,9 @@ static void demo_camera(e_rdy_class* i_this) { break; case 5: - if (!i_this->eventInfo.i_checkCommandDemoAccrpt()) { + if (!i_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(i_this, 2, 0xffff, 0); - i_this->eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + i_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e); return; } player_camera->mCamera.Stop(); @@ -3812,9 +3812,9 @@ static void demo_camera(e_rdy_class* i_this) { break; case 10: - if (!i_this->eventInfo.i_checkCommandDemoAccrpt()) { + if (!i_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(i_this, 2, 0xffff, 0); - i_this->eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + i_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e); return; } player_camera->mCamera.Stop(); @@ -3968,9 +3968,9 @@ static void demo_camera(e_rdy_class* i_this) { break; case 20: - if (!i_this->eventInfo.i_checkCommandDemoAccrpt()) { + if (!i_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(i_this, 2, 0xffff, 0); - i_this->eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + i_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e); return; } player_camera->mCamera.Stop(); @@ -4257,7 +4257,7 @@ 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()) + || daPy_getPlayerActorClass()->eventInfo.checkCommandDoor()) { return 1; } @@ -4468,7 +4468,7 @@ static int daE_RDY_Execute(e_rdy_class* i_this) { vec1.set(20.0f, 0.0f, 0.0f); MtxPosition(&vec1, &i_this->eyePos); - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { cc_offset.y += 30.0f; i_this->mCcSph[0].SetC(i_this->eyePos + cc_offset); i_this->mCcSph[0].SetR(50.0f); diff --git a/src/d/actor/d_a_e_s1.cpp b/src/d/actor/d_a_e_s1.cpp index a0c363ed75..c4076cf5c3 100644 --- a/src/d/actor/d_a_e_s1.cpp +++ b/src/d/actor/d_a_e_s1.cpp @@ -346,7 +346,7 @@ static void damage_check(e_s1_class* i_this) { i_this->field_0x6ac = TREG_F(1) + 65.0f; } } else { - if (i_this->mAtInfo.mAttackPower >= 60 && daPy_py_c::i_checkNowWolf()) { + if (i_this->mAtInfo.mAttackPower >= 60 && daPy_py_c::checkNowWolf()) { i_this->mAtInfo.field_0x18 = 36; } else { i_this->mAtInfo.field_0x18 = 0; @@ -365,7 +365,7 @@ static void damage_check(e_s1_class* i_this) { if (i_this->mAtInfo.mAttackPower < 20) { i_this->field_0x6ac = TREG_F(0) + 20.0f; - } else if (i_this->mAtInfo.mAttackPower >= 60 && daPy_py_c::i_checkNowWolf()) { + } else if (i_this->mAtInfo.mAttackPower >= 60 && daPy_py_c::checkNowWolf()) { i_this->field_0x6ac = 0.0f; a_this->health = 0; @@ -389,7 +389,7 @@ static void damage_check(e_s1_class* i_this) { } if (!l_no_fail) { - if (i_this->mAtInfo.mAttackPower >= 60 && daPy_py_c::i_checkNowWolf()) { + if (i_this->mAtInfo.mAttackPower >= 60 && daPy_py_c::checkNowWolf()) { i_this->mAction = ACT_FAIL_WAIT; i_this->mHitInvincibilityTimer = 10; i_this->mSound.startCreatureVoice(Z2SE_EN_NS_V_DEATH, -1); @@ -1644,9 +1644,9 @@ static void demo_camera(e_s1_class* i_this) { switch (i_this->mDemoMode) { case 1: - if (!a_this->eventInfo.i_checkCommandDemoAccrpt()) { + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0); - a_this->eventInfo.i_onCondition(2); + a_this->eventInfo.onCondition(2); return; } @@ -1690,9 +1690,9 @@ static void demo_camera(e_s1_class* i_this) { } break; case 10: - if (!a_this->eventInfo.i_checkCommandDemoAccrpt()) { + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0); - a_this->eventInfo.i_onCondition(2); + a_this->eventInfo.onCondition(2); return; } @@ -1766,7 +1766,7 @@ static void demo_camera(e_s1_class* i_this) { linchk.Set(&i_this->mDemoCamCenter, &i_this->mDemoCamEye, a_this); if (dComIfG_Bgsp().LineCross(&linchk)) { - eye = linchk.i_GetCross() + ((center - eye) * 0.1f); + eye = linchk.GetCross() + ((center - eye) * 0.1f); f32 dist_x = eye.x - center.x; f32 dist_z = eye.z - center.z; diff --git a/src/d/actor/d_a_e_vt.cpp b/src/d/actor/d_a_e_vt.cpp index 3b6afd80dd..cc14dbbe73 100644 --- a/src/d/actor/d_a_e_vt.cpp +++ b/src/d/actor/d_a_e_vt.cpp @@ -1566,7 +1566,7 @@ void daE_VA_c::executeDemoOpWait() { mDrawRopes = true; case 1: for (int i = 0; i < 190; i++) { - if (!daPy_getPlayerActorClass()->i_checkNowWolf()) { + if (!daPy_getPlayerActorClass()->checkNowWolf()) { mLineSphs[i].OffTgShield(); } else { mLineSphs[i].OnTgShield(); @@ -1590,9 +1590,9 @@ void daE_VA_c::executeDemoOp() { switch (mMode) { case 0: - if (!eventInfo.i_checkCommandDemoAccrpt()) { + if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xFFFF, 0); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); return; } @@ -1729,7 +1729,7 @@ void daE_VA_c::executeDemoOp() { mWeponEfMode = 1; mDemoModeTimer = 130; - if (!player->i_checkNowWolf()) { + if (!player->checkNowWolf()) { player->changeDemoMode(0x17, 0, 0, 0); } @@ -2355,9 +2355,9 @@ void daE_VA_c::executeOpaciWait() { Z2GetAudioMgr()->changeSubBgmStatus(3); break; case 10: - if (!eventInfo.i_checkCommandDemoAccrpt()) { + if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xFFFF, 0); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } else { mAlphaType = 2; field_0x1380 = 30; @@ -2681,7 +2681,7 @@ void daE_VA_c::executeOpaciChase() { field_0x1388 = 1; mSound.startCreatureVoiceLevel(Z2SE_EN_VA_V_ROTATE, -1); - if (mDownTimer == 0 && !player->i_checkNowWolf()) { + if (mDownTimer == 0 && !player->checkNowWolf()) { mBodyCyls[0].OnTgSetBit(); mBodyCyls[1].OnTgSetBit(); } @@ -2747,7 +2747,7 @@ void daE_VA_c::executeOpaciChase() { case 12: mSound.startCreatureVoiceLevel(Z2SE_EN_VA_V_ROTATE, -1); - if (!player->i_checkNowWolf()) { + if (!player->checkNowWolf()) { mBodyCyls[0].OnTgSetBit(); mBodyCyls[1].OnTgSetBit(); } @@ -2767,7 +2767,7 @@ void daE_VA_c::executeOpaciChase() { case 13: mSound.startCreatureVoiceLevel(Z2SE_EN_VA_V_ROTATE, -1); - if (!player->i_checkNowWolf()) { + if (!player->checkNowWolf()) { mBodyCyls[0].OnTgSetBit(); mBodyCyls[1].OnTgSetBit(); } @@ -3087,9 +3087,9 @@ void daE_VA_c::executeOpaciDeath() { switch (mMode) { case 0: - if (!eventInfo.i_checkCommandDemoAccrpt()) { + if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xFFFF, 0); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); return; } diff --git a/src/d/actor/d_a_e_wb.cpp b/src/d/actor/d_a_e_wb.cpp index 46c06a8edf..0fae423ffe 100644 --- a/src/d/actor/d_a_e_wb.cpp +++ b/src/d/actor/d_a_e_wb.cpp @@ -4126,9 +4126,9 @@ extern "C" void changeDemoMode__9daPy_py_cFUliis() { } /* 807E2348-807E2350 -00001 0008+00 0/0 0/0 0/0 .text changeDemoParam2__9daPy_py_cFs */ -void daPy_py_c::changeDemoParam2(s16 param_0) { - *(u16*)(((u8*)this) + 1546) /* this->field_0x60a */ = (u16)(param_0); -} +/* void daPy_py_c::changeDemoParam2(s16 param_0) { + //*(u16*)(((u8*)this) + 1546) this->field_0x60a = (u16)(param_0); +} */ /* 807E2350-807E235C 00FFB0 000C+00 1/1 0/0 0/0 .text fabsf__3stdFf */ extern "C" void fabsf__3stdFf() { @@ -4339,9 +4339,9 @@ extern "C" void changeDemoMode__9daHorse_cFUli() { } /* 807E28E0-807E2908 010540 0028+00 1/1 0/0 0/0 .text setHorsePosAndAngle__9daHorse_cFPC4cXyzs */ -void daHorse_c::setHorsePosAndAngle(cXyz const* param_0, s16 param_1) { +/* void daHorse_c::setHorsePosAndAngle(cXyz const* param_0, s16 param_1) { // NONMATCHING -} +} */ /* 807E2908-807E2934 010568 002C+00 1/1 0/0 0/0 .text startCheckSkipEdge__14dEvt_control_cFPv */ extern "C" void startCheckSkipEdge__14dEvt_control_cFPv() { diff --git a/src/d/actor/d_a_formation_mng.cpp b/src/d/actor/d_a_formation_mng.cpp index 0d3319c8f4..e0ac90acd1 100644 --- a/src/d/actor/d_a_formation_mng.cpp +++ b/src/d/actor/d_a_formation_mng.cpp @@ -116,7 +116,7 @@ void daFmtMng_c::executeWait() { ((daNpcFgd_c*)npcFgd)->offDrawFlag(); } } - if (!dKy_darkworld_check() && daPy_py_c::i_checkNowWolf()) { + if (!dKy_darkworld_check() && daPy_py_c::checkNowWolf()) { fopAcM_delete(this); } } diff --git a/src/d/actor/d_a_horse.cpp b/src/d/actor/d_a_horse.cpp index 427fa2cde9..fd03f065cb 100644 --- a/src/d/actor/d_a_horse.cpp +++ b/src/d/actor/d_a_horse.cpp @@ -1329,7 +1329,7 @@ void daHorse_c::setDemoData() { if (mode == 5) { speedF = 0.0f; m_cc_stts.ClrCcMove(); - i_setHorsePosAndAngle(pos_p, angle); + setHorsePosAndAngle(pos_p, angle); m_demoMoveAngle = angle; } else if (mode == 2 || mode == 10 || mode == 3 || mode == 11 || mode == 4) { setDemoMoveData(&mode, pos_p); @@ -1390,7 +1390,7 @@ void daHorse_c::setDemoData() { /* 8083B578-8083B600 003738 0088+00 4/4 0/0 0/0 .text acceptPlayerRide__9daHorse_cFv */ void daHorse_c::acceptPlayerRide() { - if (!checkStateFlg0(FLG0_UNK_1) && !daPy_py_c::i_checkNowWolf()) { + if (!checkStateFlg0(FLG0_UNK_1) && !daPy_py_c::checkNowWolf()) { int angle = fopAcM_seenPlayerAngleY(this); if (angle > 0x2800 && (!daAlink_getAlinkActorClass()->checkHorseZelda() || angle < 0x5800)) { attention_info.flags |= 0x80; @@ -1704,7 +1704,7 @@ int daHorse_c::checkHorseNoMove(int param_0) { if (line_cross) { cM3dGPla plane; dComIfG_Bgsp().GetTriPla(m_linechk, &plane); - sp50 = m_linechk.i_GetCross(); + sp50 = m_linechk.GetCross(); if (cBgW_CheckBWall(plane.mNormal.y) && ((param_0 != 0 && cLib_distanceAngleS(plane.mNormal.atan2sX_Z(), shape_angle.y) > 0x6000) || (param_0 == 0 && cLib_distanceAngleS(plane.mNormal.atan2sX_Z(), shape_angle.y) < 0x2000))) { m_linechk.Set(&start, &end, this); @@ -2208,7 +2208,7 @@ void daHorse_c::setMatrix() { mDoMtx_stack_c::ZXYrotM(shape_angle.x, shape_angle.y, shape_angle.z); m_model->setBaseTRMtx(mDoMtx_stack_c::get()); - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { attention_info.position.set(current.pos.x + (140.0f * cM_ssin(shape_angle.y)), 200.0f + current.pos.y, current.pos.z + (140.0f * cM_scos(shape_angle.y))); } else { attention_info.position.set(current.pos.x, 200.0f + current.pos.y, current.pos.z); @@ -2976,8 +2976,8 @@ void daHorse_c::setReinPosNormalSubstance() { static cXyz saddleLeft(29.0f, -2.0f, 30.0f); static cXyz saddleRight(29.0f, 2.0f, 30.0f); - if (!checkStateFlg0(FLG0_UNK_1) && i_getZeldaActor() != NULL) { - if (((daHoZelda_c*)i_getZeldaActor())->checkSingleRide()) { + if (!checkStateFlg0(FLG0_UNK_1) && getZeldaActor() != NULL) { + if (((daHoZelda_c*)getZeldaActor())->checkSingleRide()) { offStateFlg0(FLG0_UNK_4000000); return; } @@ -3360,7 +3360,7 @@ int daHorse_c::callHorseSubstance(cXyz const* i_pos) { } cXyz pos(farthest_pos->x, farthest_pos->y, farthest_pos->z); - i_setHorsePosAndAngle(&pos, shape_angle.y); + setHorsePosAndAngle(&pos, shape_angle.y); rt = 1; } else if (dist_xz2 <= SQUARE(800.0f)) { return 3; @@ -3581,9 +3581,9 @@ int daHorse_c::procWait() { } if (!checkStateFlg0(FLG0_UNK_1)) { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { attention_info.flags |= 0x8; - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); } else if (m_procID == PROC_WAIT_e) { acceptPlayerRide(); } diff --git a/src/d/actor/d_a_kytag03.cpp b/src/d/actor/d_a_kytag03.cpp index ff73bec026..0c66db0bfe 100644 --- a/src/d/actor/d_a_kytag03.cpp +++ b/src/d/actor/d_a_kytag03.cpp @@ -373,7 +373,7 @@ static int daKytag03_Execute(kytag03_class* i_this) { if (i_this->field_0x587 == 0) { if (player->current.pos.abs(a_this->current.pos) < i_this->field_0x574 && - daPy_py_c::i_checkNowWolf() && !var_r28) + daPy_py_c::checkNowWolf() && !var_r28) { i_this->attention_info.distances[fopAc_attn_ETC_e] = 0x3D; a_this->attention_info.flags |= 0x80; diff --git a/src/d/actor/d_a_kytag04.cpp b/src/d/actor/d_a_kytag04.cpp index 3cc7026872..4bcb90f3a6 100644 --- a/src/d/actor/d_a_kytag04.cpp +++ b/src/d/actor/d_a_kytag04.cpp @@ -168,7 +168,7 @@ static int daKytag04_Execute(kytag04_class* i_this) { { switch (i_this->field_0x5c4) { case 0: - if (!a_this->eventInfo.i_checkCommandDemoAccrpt()) { + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { dComIfGp_getEvent().reset(a_this); fopAcM_orderPotentialEvent(a_this, 0x400, 0xFFFF, 0); } else { diff --git a/src/d/actor/d_a_kytag12.cpp b/src/d/actor/d_a_kytag12.cpp index b92b24cd59..eccc407048 100644 --- a/src/d/actor/d_a_kytag12.cpp +++ b/src/d/actor/d_a_kytag12.cpp @@ -308,7 +308,7 @@ static int daKytag12_Execute_standard(kytag12_class* i_this) { } } - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { if (effect_p->field_0x38 >= 9000.0f) { var_f29 = 0.0f; } @@ -389,7 +389,7 @@ static int daKytag12_Execute_standard(kytag12_class* i_this) { } if (i_this->field_0x578 != 0 && i_this->field_0x578 <= 60) { - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { temp_r25->mEffect[0].field_0x42 = 45; } @@ -412,7 +412,7 @@ static int daKytag12_Execute_standard(kytag12_class* i_this) { g_env_light.mEvilInitialized &= 0x7F; - if (daPy_py_c::i_checkNowWolf() && var_r22 > 0) { + if (daPy_py_c::checkNowWolf() && var_r22 > 0) { g_env_light.mEvilInitialized |= 0x80; } @@ -616,7 +616,7 @@ static int daKytag12_Execute_arrival(kytag12_class* i_this) { } } - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { if (effect_p->field_0x38 >= 9000.0f) { var_f27 = 0.0f; } @@ -692,7 +692,7 @@ static int daKytag12_Execute_arrival(kytag12_class* i_this) { g_env_light.mEvilInitialized &= 0x7F; - if (daPy_py_c::i_checkNowWolf() && var_r20 > 0) { + if (daPy_py_c::checkNowWolf() && var_r20 > 0) { g_env_light.mEvilInitialized |= 0x80; } @@ -909,7 +909,7 @@ static int daKytag12_Execute_R00(kytag12_class* i_this) { } } - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { if (effect_p->field_0x38 >= 9000.0f) { var_f25 = 0.0f; } diff --git a/src/d/actor/d_a_mant.cpp b/src/d/actor/d_a_mant.cpp index 1d90d6e575..7e51551823 100644 --- a/src/d/actor/d_a_mant.cpp +++ b/src/d/actor/d_a_mant.cpp @@ -397,7 +397,7 @@ static void joint_control(mant_class* i_this, mant_j_s* param_2, int param_3, f3 f32 fVar1; b_gnd_class* gndActor = (b_gnd_class*)fopAcM_SearchByID(i_this->parentActorID); - if (gndActor->field_0x1fc4 != 0) { + if (gndActor->mDrawHorse != 0) { bVar2 = TRUE; local_158 = gndActor->field_0x1fb8; } else if (i_this->field_0x3966 != 0) { @@ -642,7 +642,7 @@ static int daMant_Execute(mant_class* i_this) { b_gnd_class* gndActor = (b_gnd_class*)fopAcM_SearchByID(i_this->parentActorID); - if (gndActor && gndActor->field_0x1fc4 != 0) { + if (gndActor && gndActor->mDrawHorse != 0) { i_this->field_0x394c = 21.0f; i_this->field_0x3950 = 0.75f; i_this->field_0x3958 = -5.0f; diff --git a/src/d/actor/d_a_midna.cpp b/src/d/actor/d_a_midna.cpp index e6cf27d483..451540c330 100644 --- a/src/d/actor/d_a_midna.cpp +++ b/src/d/actor/d_a_midna.cpp @@ -574,7 +574,7 @@ cPhs__Step daMidna_c::create() { daPy_py_c::setMidnaActor(this); mpMorf->setMorf(1.0f); - if (fopAcM_GetParam(this) == 1 && checkMidnaRealBody() && !i_checkMidnaTired()) { + if (fopAcM_GetParam(this) == 1 && checkMidnaRealBody() && !checkMidnaTired()) { changeOriginalDemo(); changeDemoMode(11); } @@ -767,7 +767,7 @@ void daMidna_c::setMatrix() { mDoMtx_stack_c::transM(0.0f, -98.0f, 17.0f); mpShadowModel->setBaseTRMtx(mDoMtx_stack_c::get()); } else if (!checkStateFlg0(FLG0_WOLF_NO_POS) && - (!daPy_py_c::i_checkNowWolf() || checkShadowModelDrawSmode())) { + (!daPy_py_c::checkNowWolf() || checkShadowModelDrawSmode())) { if (field_0x84e != 4) { f32 sin_link_y = cM_ssin(link->shape_angle.y); f32 cos_link_y = cM_scos(link->shape_angle.y); @@ -1060,7 +1060,7 @@ void daMidna_c::setBodyPartPos() { } if (field_0x84e == 1 || (checkSetAnime(0, ANM_S_APPEAR) && mpMorf->getFrame() < 3.0f)) { daAlink_c* link = daAlink_getAlinkActorClass(); - f32 fvar1 = daPy_py_c::i_checkNowWolf() ? 250.0f : 50.0f; + f32 fvar1 = daPy_py_c::checkNowWolf() ? 250.0f : 50.0f; attention_info.position.set( link->current.pos.x + fvar1 * cM_ssin(link->shape_angle.y), link->current.pos.y - 30.0f, @@ -1083,7 +1083,7 @@ void daMidna_c::setBodyPartPos() { /* 804BEFA0-804BF070 002E00 00D0+00 1/1 0/0 0/0 .text checkAppear__9daMidna_cFv */ BOOL daMidna_c::checkAppear() { - if (daPy_py_c::i_checkNowWolf() && daPy_py_c::i_checkFirstMidnaDemo() && + if (daPy_py_c::checkNowWolf() && daPy_py_c::checkFirstMidnaDemo() && (!daAlink_getAlinkActorClass()->checkMidnaDisappearMode() || checkStateFlg0(FLG0_WOLF_NO_POS) || (checkSetAnime(0, ANM_RETURN) && !mpMorf->isStop()))) @@ -1207,7 +1207,7 @@ void daMidna_c::checkMidnaPosState() { } if (mDemoMode == 12) { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { onStateFlg0(FLG0_WOLF_NO_POS); Vec vec1 = {0.0f, daMidna_hio_c0::m.field_0x18, daMidna_hio_c0::m.field_0x1c}; cXyz vec2; @@ -1795,7 +1795,7 @@ void daMidna_c::setAnm() { } BOOL bVar2 = FALSE; BOOL bVar3 = TRUE; - bool tired = i_checkMidnaTired(); + bool tired = checkMidnaTired(); daMidna_ANM anm; if (link->checkMidnaWolfDeadAnime() && !checkStateFlg0(FLG0_TAG_WAIT)) { @@ -2049,7 +2049,7 @@ void daMidna_c::setAnm() { } if (anm == ANM_WARPIN) { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { u32 sound_id; if (checkStateFlg1(FLG1_SIDE_WARP)) { sound_id = Z2SE_MDN_WARP_IN_YOKO; @@ -2145,7 +2145,7 @@ void daMidna_c::setAnm() { J3DAnmTransform* bck = (J3DAnmTransform*)mBckHeap[0].loadDataIdx(res_id); setBckAnime(bck, J3DFrameCtrl::EMode_NONE, 0.0f); } - } else if (daPy_py_c::i_checkNowWolf() && !bVar1 + } else if (daPy_py_c::checkNowWolf() && !bVar1 && ((mNeckAngle.y == 0 && mNeckAngle.x == 0 && anm != ANM_LEADWAIT && cM_rnd() < 0.01f) || (anm == ANM_LEADWAIT && !checkStateFlg0(FLG0_NO_HAIR_LEAD) && cM_rnd() < 0.0125f))) { @@ -2455,7 +2455,7 @@ void daMidna_c::setNeckAngle() { s16 eye_y = 0; cXyz* pos; - if (field_0x84e == 2 || i_checkMidnaTired() || checkSetAnime(0, ANM_CLINGB) + if (field_0x84e == 2 || checkMidnaTired() || checkSetAnime(0, ANM_CLINGB) || (checkStateFlg0((daMidna_FLG0)(FLG0_NO_HAIR_SCALE | FLG0_UNK_200000)) && !checkEndResetStateFlg0(ERFLG0_UNK_100)) || (clear_eye_move && !checkStateFlg0(FLG0_NO_DRAW)) @@ -2546,7 +2546,7 @@ void daMidna_c::setHairAngle() { cXyz* atn_pos = NULL; daAlink_c* link = daAlink_getAlinkActorClass(); - if (link->checkMidnaHairAtnPos() && !i_checkMidnaTired() && !checkStateFlg0((daMidna_FLG0) + if (link->checkMidnaHairAtnPos() && !checkMidnaTired() && !checkStateFlg0((daMidna_FLG0) (FLG0_NO_HAIR_SCALE | FLG0_UNK_200000 | FLG0_TAG_WAIT | FLG0_UNK_100))) { atn_pos = link->getMidnaHairAtnPos(); onStateFlg0(FLG0_UNK_10000000); @@ -3033,7 +3033,7 @@ void daMidna_c::setSound() { mSound.updateAnime(mpMorf->getFrame(), mpMorf->getPlaySpeed()); } - if (i_checkMidnaTired() && !dComIfGp_checkPlayerStatus0(0, 0x20000000)) { + if (checkMidnaTired() && !dComIfGp_checkPlayerStatus0(0, 0x20000000)) { mSound.startCreatureVoiceLevel(Z2SE_MDN_V_WAITD, -1); } } @@ -3042,7 +3042,7 @@ void daMidna_c::setSound() { int daMidna_c::execute() { daAlink_c* link = daAlink_getAlinkActorClass(); if (!link->checkMetamorphose()) { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { onStateFlg0(FLG0_UNK_40000000); } else { offStateFlg0(FLG0_UNK_40000000); @@ -3059,7 +3059,7 @@ int daMidna_c::execute() { } daMidna_matAnm_c::decMorfFrame(); checkMidnaPosState(); - if (daPy_py_c::i_checkFirstMidnaDemo() && !checkStateFlg0(FLG0_WOLF_NO_POS)) { + if (daPy_py_c::checkFirstMidnaDemo() && !checkStateFlg0(FLG0_WOLF_NO_POS)) { link->onMidnaRide(); } else { link->offMidnaRide(); @@ -3115,7 +3115,7 @@ int daMidna_c::execute() { field_0x84e = 0; } - if (checkSetAnime(0, ANM_LEADTOWAITA) && mpMorf->checkFrame(2.0f) && daPy_py_c::i_checkNowWolf() + if (checkSetAnime(0, ANM_LEADTOWAITA) && mpMorf->checkFrame(2.0f) && daPy_py_c::checkNowWolf() && mpKago == NULL) { dComIfGp_getVibration().StartShock(2, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); } @@ -3187,12 +3187,12 @@ int daMidna_c::execute() { } } } - } else if (eventInfo.i_checkCommandDemoAccrpt() && !link->checkMetamorphose()) { + } else if (eventInfo.checkCommandDemoAccrpt() && !link->checkMetamorphose()) { dComIfGp_getEvent().reset(this); } if (link->checkMidnaRide()) { - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); } if (mpModel != NULL && !checkStateFlg0(FLG0_NO_DRAW)) { diff --git a/src/d/actor/d_a_myna.cpp b/src/d/actor/d_a_myna.cpp index 4519869c82..5a09824b7f 100644 --- a/src/d/actor/d_a_myna.cpp +++ b/src/d/actor/d_a_myna.cpp @@ -535,12 +535,12 @@ void daMyna_c::attack_wait_move() { current.angle = home.angle; } } - if (!daPy_py_c::i_checkNowWolf() && daMyna_evtTagActor0 != NULL) { + if (!daPy_py_c::checkNowWolf() && daMyna_evtTagActor0 != NULL) { cXyz var1(1.0f, 1.0f, 1.0f); if (!dComIfGs_isSaveSwitch(0x3C)) { if (chkPlayerInEvtArea(daMyna_evtTagActor0, var1)) { if (!isEventFlag(1)) { - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); fopAcM_orderSpeakEvent(this, 0, 0); if (eventInfo.checkCommandTalk()) { field_0x92C = 1; @@ -552,7 +552,7 @@ void daMyna_c::attack_wait_move() { } else if (field_0x92A < l_HOSTIO.field_0x24) { field_0x92A++; } else { - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); fopAcM_orderSpeakEvent(this, 0, 0); if (eventInfo.checkCommandTalk()) { field_0x92C = 4; @@ -590,7 +590,7 @@ void daMyna_c::attack_fly_move() { if (field_0x926 > 0 && dComIfGs_isSaveSwitch(0x3C)) { field_0x926 = 0; } - if (chkPlayerInEvtArea(daMyna_evtTagActor0, var1) && !daPy_py_c::i_checkNowWolf() && + if (chkPlayerInEvtArea(daMyna_evtTagActor0, var1) && !daPy_py_c::checkNowWolf() && !dComIfGs_isSaveSwitch(0x3C) && field_0x926 == 0) { mStatus.Move(); @@ -645,17 +645,17 @@ void daMyna_c::greet_wait_init() { /* 80946EB0-80947030 001330 0180+00 1/0 0/0 0/0 .text greet_wait_move__8daMyna_cFv */ void daMyna_c::greet_wait_move() { - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { if (daMyna_evtTagActor0 != NULL) { if (chkPlayerInEvtArea(daMyna_evtTagActor0, cXyz(cXyz(1.0f, 1.0f, 1.0f)))) { - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); fopAcM_orderSpeakEvent(this, 0, 0); if (eventInfo.checkCommandTalk()) { field_0x92C = 6; } } else { if (isEventFlag(0)) { - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); fopAcM_orderSpeakEvent(this, 0, 0); if (eventInfo.checkCommandTalk()) { field_0x92C = 10; @@ -664,14 +664,14 @@ void daMyna_c::greet_wait_move() { } } else { if (fopAcM_searchPlayerDistanceXZ(this) < 350.0f) { - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); fopAcM_orderSpeakEvent(this, 0, 0); if (eventInfo.checkCommandTalk()) { field_0x92C = 6; } } else { if (isEventFlag(0)) { - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); fopAcM_orderSpeakEvent(this, 0, 0); if (eventInfo.checkCommandTalk()) { field_0x92C = 10; @@ -727,7 +727,7 @@ void daMyna_c::shopping_wait_init() { /* 809471E8-809475B4 001668 03CC+00 1/0 0/0 0/0 .text shopping_wait_move__8daMyna_cFv */ void daMyna_c::shopping_wait_move() { - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[802])) { field_0x92C = 17; field_0x937 = 20; @@ -736,7 +736,7 @@ void daMyna_c::shopping_wait_move() { bool bVar1 = false; s16 nowTotalPrice = dMsgObject_getMsgObjectClass()->getNowTotalPrice(); if (dMsgObject_getMsgObjectClass()->isPaymentFlag()) { - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); fopAcM_orderSpeakEvent(this, 0, 0); if (eventInfo.checkCommandTalk()) { field_0x92C = 9; @@ -751,7 +751,7 @@ void daMyna_c::shopping_wait_move() { dMsgObject_addTotalPrice(mShopItems[i].mValueNum); field_0x931 = i; if (mShopItems[i].mFlowNodeNum != 0xFFFF) { - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); fopAcM_orderSpeakEvent(this, 0, 0); } } @@ -773,13 +773,13 @@ void daMyna_c::shopping_wait_move() { cXyz stack_2c(1.0f, 1.0f, 1.0f); if (chkPlayerInEvtArea(daMyna_evtTagActor1, stack_2c)) { if (isEventFlag(0)) { - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); fopAcM_orderSpeakEvent(this, 0, 0); bVar1 = true; field_0x933 = 1; } else if (field_0x931 != 0xFF && mShopItems[field_0x931].mItemStatus == 2) { - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); fopAcM_orderSpeakEvent(this, 0, 0); bVar1 = true; field_0x933 = 1; @@ -790,17 +790,17 @@ void daMyna_c::shopping_wait_move() { if (daMyna_evtTagActor0 != NULL) { cXyz stack_38(1.0f, 1.0f, 1.0f); if (!chkPlayerInEvtArea(daMyna_evtTagActor0, stack_38) && nowTotalPrice > 0) { - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); fopAcM_orderSpeakEvent(this, 0, 0); bVar1 = true; } } else if (fopAcM_searchPlayerDistanceXZ(this) > 450.0f) { if (isEventFlag(0)) { - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); fopAcM_orderSpeakEvent(this, 0, 0); bVar1 = true; } else if (field_0x931 != 0xFF && mShopItems[field_0x931].mItemStatus == 2) { - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); fopAcM_orderSpeakEvent(this, 0, 0); bVar1 = true; } @@ -1060,7 +1060,7 @@ void daMyna_c::attack_wait2_init() { /* 809481B4-80948388 002634 01D4+00 1/0 0/0 0/0 .text attack_wait2_move__8daMyna_cFv */ void daMyna_c::attack_wait2_move() { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { field_0x92C = 7; } else { if (current.angle.y != home.angle.y) { @@ -1081,7 +1081,7 @@ void daMyna_c::attack_wait2_move() { } else { if (field_0x939 == 1) { current.angle = home.angle; - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); fopAcM_orderSpeakEvent(this, 0, 0); if (eventInfo.checkCommandTalk()) { field_0x92C = 21; @@ -1133,7 +1133,7 @@ void daMyna_c::attack_fly2_move() { field_0x939 = 1; } - if (chkPlayerInEvtArea(daMyna_evtTagActor0, stack_2c) && !daPy_py_c::i_checkNowWolf() && + if (chkPlayerInEvtArea(daMyna_evtTagActor0, stack_2c) && !daPy_py_c::checkNowWolf() && field_0x937 != 0 && field_0x926 == 0) { mStatus.Move(); @@ -1311,7 +1311,7 @@ void daMyna_c::talkAnime(msg_class* param_0) { /* 80948FAC-809490B8 00342C 010C+00 1/1 0/0 0/0 .text chkEvent__8daMyna_cFv */ int daMyna_c::chkEvent() { int retVal = 1; - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { if (!dComIfGp_getEvent().isOrderOK()) { retVal = 0; if (eventInfo.checkCommandTalk()) { @@ -1334,7 +1334,7 @@ int daMyna_c::chkEvent() { /* 809490B8-80949128 003538 0070+00 2/1 0/0 0/0 .text orderEvent__8daMyna_cFv */ int daMyna_c::orderEvent() { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { switch (field_0x92C) { case 0: case 5: @@ -1349,7 +1349,7 @@ int daMyna_c::orderEvent() { if (attention_info.flags == 10) { attention_info.distances[fopAc_attn_TALK_e] = 0x8B; attention_info.distances[fopAc_attn_SPEAK_e] = 0x8B; - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); } } return 1; diff --git a/src/d/actor/d_a_nbomb.cpp b/src/d/actor/d_a_nbomb.cpp index d89e9d4e2f..139f4c7dbb 100644 --- a/src/d/actor/d_a_nbomb.cpp +++ b/src/d/actor/d_a_nbomb.cpp @@ -616,7 +616,7 @@ int daNbomb_c::insectLineCheck() { void daNbomb_c::setHitPolygon(BOOL param_0) { if (!param_0) { mInsectHitPolyInfo.SetPolyInfo(mLineChk); - current.pos = mLineChk.i_GetCross(); + current.pos = mLineChk.GetCross(); } cM3dGPla poly; @@ -1358,7 +1358,7 @@ BOOL daNbomb_c::procInsectMove() { } if (var_r28 == 2) { - current.pos = mLineChk.i_GetCross(); + current.pos = mLineChk.GetCross(); } else { current.pos += field_0xbfc * speedF; } diff --git a/src/d/actor/d_a_ni.cpp b/src/d/actor/d_a_ni.cpp index cfc0bc33f6..54ac266b8f 100644 --- a/src/d/actor/d_a_ni.cpp +++ b/src/d/actor/d_a_ni.cpp @@ -1510,9 +1510,9 @@ static void play_camera(ni_class* i_this) { i_this->field_0xa00 = a_this->current.pos.y; // fallthrough case 1: - if (!a_this->eventInfo.i_checkCommandDemoAccrpt()) { + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0); - a_this->eventInfo.i_onCondition(2); + a_this->eventInfo.onCondition(2); return; } @@ -1673,7 +1673,7 @@ static void play_camera(ni_class* i_this) { sp1D8.y = 0.0f; sp1D8.z = hREG_F(10) + 50.0f; MtxPosition(&sp1D8, &sp1E4); - sp214 = cam_line_chk.i_GetCross() - sp1E4; + sp214 = cam_line_chk.GetCross() - sp1E4; } if (var_r27 == 0) { @@ -1808,7 +1808,7 @@ static void action(ni_class* i_this) { var_r25 = true; } - if (i_this->field_0xa50 == 1 && daPy_py_c::i_checkNowWolf() && + if (i_this->field_0xa50 == 1 && daPy_py_c::checkNowWolf() && i_this->mDistToPlayer < 300.0f) { i_this->mAction = ACTION_MESSAGE_e; @@ -1993,7 +1993,7 @@ static void action(ni_class* i_this) { line_chk.Set(&a_this->current.pos, &sp148, a_this); if (dComIfG_Bgsp().LineCross(&line_chk)) { - sp148.y = line_chk.i_GetCross().y - 10.0f; + sp148.y = line_chk.GetCross().y - 10.0f; } gnd_chk_spl.SetPos(&sp148); @@ -2047,10 +2047,10 @@ static int message(ni_class* i_this) { OS_REPORT("////////NI MSG FNO %d\n", i_this->mFlowNo); } - if (i_this->field_0xa50 == 2 && i_this->mFlowNo != -1 && daPy_py_c::i_checkNowWolf()) { + if (i_this->field_0xa50 == 2 && i_this->mFlowNo != -1 && daPy_py_c::checkNowWolf()) { fopAcM_OnStatus(i_this, 0); cLib_onBit(i_this->attention_info.flags, 10); - i_this->eventInfo.i_onCondition(1); + i_this->eventInfo.onCondition(1); } else { fopAcM_OffStatus(i_this, 0); cLib_offBit(i_this->attention_info.flags, 10); diff --git a/src/d/actor/d_a_npc.cpp b/src/d/actor/d_a_npc.cpp index 2e6d87532e..9682c8f081 100644 --- a/src/d/actor/d_a_npc.cpp +++ b/src/d/actor/d_a_npc.cpp @@ -1662,7 +1662,7 @@ BOOL daNpcT_c::evtProc() { evtTalk(); } ret = TRUE; - } else if (eventInfo.i_checkCommandDemoAccrpt() + } else if (eventInfo.checkCommandDemoAccrpt() && dComIfGp_getEventManager().endCheck(mEvtId)) { if (evtEndProc()) { dComIfGp_event_reset(); @@ -1741,7 +1741,7 @@ void daNpcT_c::setFootPrtcl(cXyz* param_0, f32 param_1, f32 param_2) { mLinChk.Set(&start, &end, this); cross1 = dComIfG_Bgsp().LineCross(&mLinChk); if (cross1) { - foot_l_pos.y = mLinChk.i_GetCross().y; + foot_l_pos.y = mLinChk.GetCross().y; mFootLPolyAngle = fopAcM_getPolygonAngle(mLinChk, mCurAngle.y); foot_l_att = dComIfG_Bgsp().GetPolyAtt0(mLinChk); } else { @@ -1754,7 +1754,7 @@ void daNpcT_c::setFootPrtcl(cXyz* param_0, f32 param_1, f32 param_2) { mLinChk.Set(&start, &end, this); cross2 = dComIfG_Bgsp().LineCross(&mLinChk); if (cross2) { - foot_r_pos.y = mLinChk.i_GetCross().y; + foot_r_pos.y = mLinChk.GetCross().y; mFootRPolyAngle = fopAcM_getPolygonAngle(mLinChk, mCurAngle.y); foot_r_att = dComIfG_Bgsp().GetPolyAtt0(mLinChk); } else { @@ -1816,9 +1816,9 @@ void daNpcT_c::evtOrder() { } else if ((!mTwilight || daPy_py_c::checkNowWolfEyeUp()) && ((attention_info.flags & 8) || (attention_info.flags & 2))) { - eventInfo.i_onCondition(dEvtCnd_CANTALK_e); + eventInfo.onCondition(dEvtCnd_CANTALK_e); if (chkXYItems()) { - eventInfo.i_onCondition(dEvtCnd_CANTALKITEM_e); + eventInfo.onCondition(dEvtCnd_CANTALKITEM_e); } if (mSpeakEvent) { fopAcM_orderSpeakEvent(this, 0, 0); @@ -2125,7 +2125,7 @@ BOOL daNpcT_c::chkFindActor(fopAc_ac_c* i_actor, BOOL i_release, s16 i_angleY) { /* 8014B024-8014B0C8 145964 00A4+00 1/1 0/0 0/0 .text chkWolfAction__8daNpcT_cFv */ // NONMATCHING regswap BOOL daNpcT_c::chkWolfAction() { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { bool ret = false; if (!daPy_getPlayerActorClass()->checkWolfWait() && !dComIfGp_checkPlayerStatus0(0, 0x8000000) @@ -2145,7 +2145,7 @@ BOOL daNpcT_c::chkFindWolf(s16 i_angleY, int i_distIndex, int param_2, f32 i_bou f32 i_boundY1, f32 i_boundY2, BOOL param_7) { cXyz attn_pos = getAttnPos(daPy_getPlayerActorClass()); - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { if (chkPointInArea(attn_pos, attention_info.position, i_boundXZ, i_boundY1, i_boundY2, 0) && chkActorInSight(daPy_getPlayerActorClass(), i_fovY, i_angleY)) { @@ -2193,7 +2193,7 @@ cXyz daNpcT_c::getAttnPos(fopAc_ac_c* i_actor) { cXyz attn_pos = i_actor->attention_info.position; if (fopAcM_GetName(i_actor) == PROC_ALINK) { attn_pos.y -= daPy_py_c::getAttentionOffsetY(); - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { attn_pos = i_actor->current.pos; attn_pos.y = i_actor->attention_info.position.y; } @@ -4502,7 +4502,7 @@ void daNpcF_c::orderEvent(int i_speak, char* i_evtName, u16 param_2, u16 i_prior fopAcM_orderOtherEventId(this, mEventIdx, i_mapToolID, param_2, i_priority, i_flag); } else if (!mTwilight || daPy_py_c::checkNowWolfEyeUp()) { if ((attention_info.flags & 8) || (attention_info.flags & 2)) { - eventInfo.i_onCondition(dEvtCnd_CANTALK_e); + eventInfo.onCondition(dEvtCnd_CANTALK_e); if (i_speak) { fopAcM_orderSpeakEvent(this, 0, 0); } diff --git a/src/d/actor/d_a_npc_ashB.cpp b/src/d/actor/d_a_npc_ashB.cpp index 22406edc9e..fc0cb3ef7f 100644 --- a/src/d/actor/d_a_npc_ashB.cpp +++ b/src/d/actor/d_a_npc_ashB.cpp @@ -847,7 +847,7 @@ bool daNpcAshB_c::wait(void* param_0) { } } - if (!daNpcF_chkEvtBit(0x14f) && field_0xded == 0 && !daPy_py_c::i_checkNowWolf()) { + if (!daNpcF_chkEvtBit(0x14f) && field_0xded == 0 && !daPy_py_c::checkNowWolf()) { f32 res = pow(600.0f, 2.0f); if (fopAcM_searchPlayerDistanceXZ2(this) <= res) { daNpcF_offTmpBit(0xb); @@ -890,7 +890,7 @@ bool daNpcAshB_c::wait(void* param_0) { orderEvent(field_0xdec,l_evtNames[mOrderEvtNo*1],-1, 40, -1, 1); if (daNpcF_chkEvtBit(0x14f)) { - eventInfo.i_onCondition(0x20); + eventInfo.onCondition(0x20); } } @@ -1193,7 +1193,7 @@ static bool daNpcAshB_IsDelete(void* param_0) { /* 80960A60-80960AE8 002D00 0088+00 1/0 0/0 0/0 .text setParam__11daNpcAshB_cFv */ void daNpcAshB_c::setParam() { - attention_info.flags = daPy_py_c::i_checkNowWolf() ? 0 : 10; + attention_info.flags = daPy_py_c::checkNowWolf() ? 0 : 10; attention_info.distances[0] = getDistTableIdx(daNpcAshB_Param_c::m.mTalkDistIdx,daNpcAshB_Param_c::m.mTalkAngleIdx); attention_info.distances[1] = attention_info.distances[0]; attention_info.distances[3] = getDistTableIdx(daNpcAshB_Param_c::m.mSpeakDistIdx,daNpcAshB_Param_c::m.mSpeakAngleIdx); diff --git a/src/d/actor/d_a_npc_cd2.cpp b/src/d/actor/d_a_npc_cd2.cpp index b3b68b9b71..a3abb64936 100644 --- a/src/d/actor/d_a_npc_cd2.cpp +++ b/src/d/actor/d_a_npc_cd2.cpp @@ -1940,7 +1940,7 @@ bool daNpcCd2_c::checkFearSituation() { bool rv; bool bVar5; rv = false; - bVar5 = ((!field_0xac6 && daPy_py_c::i_checkNowWolf()) && dVar10 < 200.0f); + bVar5 = ((!field_0xac6 && daPy_py_c::checkNowWolf()) && dVar10 < 200.0f); if (bVar5) { f32 maxDist = pow(500.0f, 2.0f); if (fopAcM_searchPlayerDistanceXZ2(this) < maxDist) { diff --git a/src/d/actor/d_a_npc_hanjo.cpp b/src/d/actor/d_a_npc_hanjo.cpp index 87409546bb..dfaffa0b3a 100644 --- a/src/d/actor/d_a_npc_hanjo.cpp +++ b/src/d/actor/d_a_npc_hanjo.cpp @@ -2313,7 +2313,7 @@ int daNpc_Hanjo_c::wait(void* param_0) { case TYPE_1: break; case TYPE_2: - if (daPy_py_c::i_checkNowWolf() && mCyl2.ChkCoHit()) { + if (daPy_py_c::checkNowWolf() && mCyl2.ChkCoHit()) { if (!daPy_getPlayerActorClass()->checkPlayerFly() || daPy_getPlayerActorClass()->checkAutoJump() || daPy_getPlayerActorClass()->checkWolfTriggerJump()) @@ -2514,7 +2514,7 @@ int daNpc_Hanjo_c::takayose(void* param_0) { } } } - if (daPy_py_c::i_checkNowWolf() && mCyl2.ChkCoHit() != NULL) { + if (daPy_py_c::checkNowWolf() && mCyl2.ChkCoHit() != NULL) { if (!daPy_getPlayerActorClass()->checkPlayerFly() || daPy_getPlayerActorClass()->checkAutoJump() || daPy_getPlayerActorClass()->checkWolfTriggerJump()) diff --git a/src/d/actor/d_a_npc_ne.cpp b/src/d/actor/d_a_npc_ne.cpp index 4bc81659a1..8aaf1090ee 100644 --- a/src/d/actor/d_a_npc_ne.cpp +++ b/src/d/actor/d_a_npc_ne.cpp @@ -260,7 +260,7 @@ static int water_check(npc_ne_class* i_this, f32 param_1) { vec.z = i_this->current.pos.z; lin_chk.Set(&i_this->current.pos, &vec, i_this); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - vec.y = lin_chk.i_GetCross().y - 10.0f; + vec.y = lin_chk.GetCross().y - 10.0f; } gnd_chk_spl.SetPos(&vec); i_this->mWaterY = dComIfG_Bgsp().GroundCross(&gnd_chk_spl); @@ -294,13 +294,13 @@ static s16 climb_angle_get(npc_ne_class* i_this) { vec2 += i_this->current.pos; lin_chk.Set(&vec1, &vec2, i_this); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - i_this->mClimbPos = lin_chk.i_GetCross(); + i_this->mClimbPos = lin_chk.GetCross(); vec3.z = 20.0f; MtxPosition(&vec3, &vec2); vec2 += i_this->current.pos; lin_chk.Set(&vec1, &vec2, i_this); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - vec2 = lin_chk.i_GetCross(); + vec2 = lin_chk.GetCross(); vec3 = vec2 - i_this->mClimbPos; return -cM_atan2s(vec3.y, JMAFastSqrt(vec3.x * vec3.x + vec3.z * vec3.z)); } @@ -1794,8 +1794,8 @@ static s16 wall_angle_get(npc_ne_class* i_this) { vec3[i] += vec2; lin_chk.Set(&vec2, &vec3[i], _this); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - i_this->mClimbPos = lin_chk.i_GetCross(); - vec3[i] = lin_chk.i_GetCross(); + i_this->mClimbPos = lin_chk.GetCross(); + vec3[i] = lin_chk.GetCross(); } else { return 1; } @@ -1830,7 +1830,7 @@ static void search_ground_1(npc_ne_class* i_this) { vec2 += vec1; lin_chk.Set(&vec1, &vec2, _this); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - vec2 = lin_chk.i_GetCross(); + vec2 = lin_chk.GetCross(); vec3.set(0.0f, var_y, var_z); MtxPosition(&vec3, &vec1); vec1 += vec2; @@ -1838,8 +1838,8 @@ static void search_ground_1(npc_ne_class* i_this) { vec2.y -= var_y + 20.0f; lin_chk.Set(&vec1, &vec2, _this); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - pos[i] = lin_chk.i_GetCross(); - vec1 = lin_chk.i_GetCross(); + pos[i] = lin_chk.GetCross(); + vec1 = lin_chk.GetCross(); vec1.y += 5.0f; vec3.set(0.0f, 0.0f, 200.0f); MtxPosition(&vec3, &vec2); @@ -1890,7 +1890,7 @@ static BOOL search_ground_2(npc_ne_class* i_this, s16 i_wallAngle) { vec2.y -= 200.0f; lin_chk.Set(&vec1, &vec2, _this); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - i_this->mTargetPos = lin_chk.i_GetCross(); + i_this->mTargetPos = lin_chk.GetCross(); return true; } else { return false; @@ -2251,7 +2251,7 @@ static BOOL npc_ne_carry(npc_ne_class* i_this) { pos.y += 2.0f; lin_chk.Set(&player->eyePos, &pos, _this); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - _this->current.pos = lin_chk.i_GetCross(); + _this->current.pos = lin_chk.GetCross(); } return ret; @@ -2433,7 +2433,7 @@ static void action(npc_ne_class* i_this) { } if (i_this->mResName != "Npc_net") { - if (i_this->mMessageState == 1 && daPy_py_c::i_checkNowWolf() + if (i_this->mMessageState == 1 && daPy_py_c::checkNowWolf() && i_this->mDistToTarget < 300.0f) { i_this->mAction = npc_ne_class::ACT_MESSAGE; i_this->mMode = 0; @@ -2644,7 +2644,7 @@ static void action(npc_ne_class* i_this) { vec1 = i_this->mLookTarget - i_this->current.pos; } else { vec1 = player->eyePos - i_this->current.pos; - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { vec1.y += i_this->mBaseScale.z * -40.0f; } } @@ -2756,9 +2756,9 @@ static void demo_camera(npc_ne_class* i_this) { break; case 1: - if (!_this->eventInfo.i_checkCommandDemoAccrpt()) { + if (!_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(_this, 2, 0xffff, 0); - _this->eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + _this->eventInfo.onCondition(dEvtCnd_CANDEMO_e); return; } @@ -2820,9 +2820,9 @@ static void demo_camera(npc_ne_class* i_this) { break; case 10: - if (!_this->eventInfo.i_checkCommandDemoAccrpt()) { + if (!_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(_this, 2, 0xffff, 0); - _this->eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + _this->eventInfo.onCondition(dEvtCnd_CANDEMO_e); return; } @@ -2911,9 +2911,9 @@ static void demo_camera(npc_ne_class* i_this) { vec.z = 120.0f; MtxPosition(&vec, &i_this->mCameraEye2); i_this->mCameraEye2 += player->current.pos; - player->i_changeDemoParam2(2); + player->changeDemoParam2(2); } else if (i_this->mDemoCounter == 120) { - player->i_changeDemoParam2(0); + player->changeDemoParam2(0); } } } @@ -3004,14 +3004,14 @@ static int message(npc_ne_class* i_this) { i_this->mIsTalking = 1; } - if (i_this->mMessageState == 2 && i_this->mFlowID != -1 && daPy_py_c::i_checkNowWolf() && + if (i_this->mMessageState == 2 && i_this->mFlowID != -1 && daPy_py_c::checkNowWolf() && !fopAcM_otherBgCheck(daPy_getLinkPlayerActorClass(), i_this)) { fopAcM_OnStatus(i_this, 0); cLib_onBit(i_this->attention_info.flags, 0xa); if (i_this->mResName == "Npc_net") { cLib_onBit(i_this->attention_info.flags, 0xc00000); } - i_this->eventInfo.i_onCondition(dEvtCnd_CANTALK_e); + i_this->eventInfo.onCondition(dEvtCnd_CANTALK_e); } else { fopAcM_OffStatus(i_this, 0); cLib_offBit(i_this->attention_info.flags, 0xc0000a); diff --git a/src/d/actor/d_a_npc_sq.cpp b/src/d/actor/d_a_npc_sq.cpp index 0c37ad9278..9bf6c27539 100644 --- a/src/d/actor/d_a_npc_sq.cpp +++ b/src/d/actor/d_a_npc_sq.cpp @@ -139,9 +139,9 @@ static void demo_camera(npc_sq_class* i_this) { switch (i_this->mDemoMode) { case 1: - if (!_this->eventInfo.i_checkCommandDemoAccrpt()) { + if (!_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(_this, 2, 0xffff, 0); - _this->eventInfo.i_onCondition(2); + _this->eventInfo.onCondition(2); return; } player_camera->mCamera.Stop(); diff --git a/src/d/actor/d_a_npc_the.cpp b/src/d/actor/d_a_npc_the.cpp index 1f358f0224..33288a31de 100644 --- a/src/d/actor/d_a_npc_the.cpp +++ b/src/d/actor/d_a_npc_the.cpp @@ -1388,7 +1388,7 @@ BOOL daNpcThe_c::main() { eventInfo.setArchiveName(l_resNames[l_evtGetParamList[mOrderEvtNo]]); } if (!strcmp(dComIfGp_getStartStageName(), "R_SP116")) { - eventInfo.i_onCondition(0x20); + eventInfo.onCondition(0x20); } orderEvent(field_0xe1c, l_evtNames[mOrderEvtNo], 0xffff, 0x28, 0xff, 1); } @@ -1494,7 +1494,7 @@ BOOL daNpcThe_c::doEvent() { } ret = true; } - if (eventInfo.i_checkCommandDemoAccrpt() && mEventIdx != -1 + if (eventInfo.checkCommandDemoAccrpt() && mEventIdx != -1 && event_manager.endCheck(mEventIdx)) { dComIfGp_event_reset(); mOrderEvtNo = 0; diff --git a/src/d/actor/d_a_npc_zra.cpp b/src/d/actor/d_a_npc_zra.cpp index cf7cc34252..8f61584ae3 100644 --- a/src/d/actor/d_a_npc_zra.cpp +++ b/src/d/actor/d_a_npc_zra.cpp @@ -990,7 +990,7 @@ void daNpc_zrA_c::setParam() { selectAction(); - if (!mTwilight && daPy_py_c::i_checkNowWolf()) { + if (!mTwilight && daPy_py_c::checkNowWolf()) { attn_flags = 0; } @@ -1067,7 +1067,7 @@ BOOL daNpc_zrA_c::main() { orderEvent(mOrderSpeakEvt, l_evtNames[l_evtGetParamList[mOrderEvtNo].fileIdx], 0xffff, 4, 0xff, 2); if (!mTwilight && mType == TYPE_WAIT && !field_0x1550) { - eventInfo.i_onCondition(dEvtCnd_CANTALKITEM_e); + eventInfo.onCondition(dEvtCnd_CANTALKITEM_e); } } @@ -2163,7 +2163,7 @@ BOOL daNpc_zrA_c::doEvent() { if (dComIfGp_event_runCheck() != false) { dEvent_manager_c& event_manager = dComIfGp_getEventManager(); - if (eventInfo.checkCommandTalk() || eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandTalk() || eventInfo.checkCommandDemoAccrpt()) { mOrderNewEvt = false; } @@ -2237,7 +2237,7 @@ BOOL daNpc_zrA_c::doEvent() { ret = true; } - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { if (mEventIdx != -1 && event_manager.endCheck(mEventIdx)) { switch (mOrderEvtNo) { case EVT_TALK_SWIM: diff --git a/src/d/actor/d_a_npc_zrc.cpp b/src/d/actor/d_a_npc_zrc.cpp index 6c9fbe1630..e9f26b0b43 100644 --- a/src/d/actor/d_a_npc_zrc.cpp +++ b/src/d/actor/d_a_npc_zrc.cpp @@ -436,7 +436,7 @@ void daNpc_zrC_c::setParam() { u32 attn_flags = 10; selectAction(); - if (!mTwilight && daPy_py_c::i_checkNowWolf()) { + if (!mTwilight && daPy_py_c::checkNowWolf()) { attn_flags = 0; } @@ -506,7 +506,7 @@ BOOL daNpc_zrC_c::main() { 0xffff, 0x28, 0xff, 1); if (mType == 2) { - eventInfo.i_onCondition(dEvtCnd_CANTALKITEM_e); + eventInfo.onCondition(dEvtCnd_CANTALKITEM_e); } } @@ -1169,7 +1169,7 @@ BOOL daNpc_zrC_c::doEvent() { if (dComIfGp_event_runCheck() != FALSE) { dEvent_manager_c& event_mgr = dComIfGp_getEventManager(); - if ((eventInfo.checkCommandTalk() || eventInfo.i_checkCommandDemoAccrpt()) && !mSpeakEvent) + if ((eventInfo.checkCommandTalk() || eventInfo.checkCommandDemoAccrpt()) && !mSpeakEvent) { mOrderNewEvt = false; } @@ -1212,7 +1212,7 @@ BOOL daNpc_zrC_c::doEvent() { ret = TRUE; } - if (eventInfo.i_checkCommandDemoAccrpt() && mEventIdx != -1 + if (eventInfo.checkCommandDemoAccrpt() && mEventIdx != -1 && event_mgr.endCheck(mEventIdx)) { dComIfGp_event_reset(); mOrderEvtNo = EVT_NONE; @@ -1422,7 +1422,7 @@ BOOL daNpc_zrC_c::waitSick(void* param_0) { // fallthrough case 2: - if (daPy_py_c::i_checkNowWolf() && daPy_py_c::checkNowWolfEyeUp()) { + if (daPy_py_c::checkNowWolf() && daPy_py_c::checkNowWolfEyeUp()) { mCreatureSound.startCreatureVoiceLevel(Z2SE_ZRC_V_SLEEPING, -1); } break; @@ -1454,7 +1454,7 @@ BOOL daNpc_zrC_c::waitPray(void* param_0) { // fallthrough case 2: - if (!daNpcF_chkEvtBit(0x1df) && field_0xe30 && !daPy_py_c::i_checkNowWolf() + if (!daNpcF_chkEvtBit(0x1df) && field_0xe30 && !daPy_py_c::checkNowWolf() && player_dist <= daNpc_zrC_Param_c::m.field_0x6c && !daPy_getPlayerActorClass()->checkPlayerFly() && daPy_getPlayerActorClass()->checkSwimUp() && !dComIfGp_checkPlayerStatus0(0, 0x100)) diff --git a/src/d/actor/d_a_npc_zrz.cpp b/src/d/actor/d_a_npc_zrz.cpp index de343d9d59..7444ade770 100644 --- a/src/d/actor/d_a_npc_zrz.cpp +++ b/src/d/actor/d_a_npc_zrz.cpp @@ -630,7 +630,7 @@ void daNpc_zrZ_c::setParam() { u32 attn_flags = 10; selectAction(); - if (!mTwilight && daPy_py_c::i_checkNowWolf()) { + if (!mTwilight && daPy_py_c::checkNowWolf()) { attn_flags = 0; } diff --git a/src/d/actor/d_a_obj_ari.cpp b/src/d/actor/d_a_obj_ari.cpp index e4d60f3366..b9a586980c 100644 --- a/src/d/actor/d_a_obj_ari.cpp +++ b/src/d/actor/d_a_obj_ari.cpp @@ -191,7 +191,7 @@ void daObjARI_c::WallWalk() { cXyz zero(0.0f, 0.0f, 0.0f); cXyz normal_yz(0.0f, normal->y, normal->z); f32 normal_len_yz = zero.abs(normal_yz); - mTargetPos = lin_chk1.i_GetCross(); + mTargetPos = lin_chk1.GetCross(); mDownAngleY = normal_ang_y; mWallAngle.z = -cM_atan2s(normal->x, normal_len_yz); mWallAngle.x = cM_atan2s(normal->z, normal->y); @@ -205,7 +205,7 @@ void daObjARI_c::WallWalk() { cXyz zero(0.0f, 0.0f, 0.0f); cXyz normal_yz(0.0f, normal->y, normal->z); f32 normal_len_yz = zero.abs(normal_yz); - mTargetPos = lin_chk2.i_GetCross(); + mTargetPos = lin_chk2.GetCross(); mDownAngleY = normal_ang_y; mWallAngle.z = -cM_atan2s(normal->x, normal_len_yz); mWallAngle.x = cM_atan2s(normal->z, normal->y); @@ -269,7 +269,7 @@ void daObjARI_c::checkGround() { if (dComIfG_Bgsp().LineCross(&lin_chk)) { cM3dGPla plane; dComIfG_Bgsp().GetTriPla(lin_chk, &plane); - current.pos = lin_chk.i_GetCross(); + current.pos = lin_chk.GetCross(); const cXyz* normal = plane.GetNP(); cXyz zero(0.0f, 0.0f, 0.0f); cXyz normal_yz(0.0f, normal->y, normal->z); @@ -351,7 +351,7 @@ void daObjARI_c::BoomChk() { if (dComIfG_Bgsp().LineCross(&lin_chk)) { cM3dGPla plane; dComIfG_Bgsp().GetTriPla(lin_chk, &plane); - old.pos = lin_chk.i_GetCross(); + old.pos = lin_chk.GetCross(); current.pos = old.pos; mAction = 0; mMode = 0; @@ -466,7 +466,7 @@ int daObjARI_c::Execute() { cM3dGPla plane; dComIfG_Bgsp().GetTriPla(lin_chk, &plane); const cXyz* normal = plane.GetNP(); - current.pos = lin_chk.i_GetCross(); + current.pos = lin_chk.GetCross(); mTargetPos = current.pos; old.pos = current.pos; cXyz zero(0.0f, 0.0f, 0.0f); @@ -485,7 +485,7 @@ int daObjARI_c::Execute() { cM3dGPla plane; dComIfG_Bgsp().GetTriPla(lin_chk, &plane); const cXyz* normal = plane.GetNP(); - current.pos = lin_chk.i_GetCross(); + current.pos = lin_chk.GetCross(); mTargetPos = current.pos; old.pos = current.pos; cXyz zero(0.0f, 0.0f, 0.0f); @@ -690,7 +690,7 @@ cPhs__Step daObjARI_c::create() { cM3dGPla plane; dComIfG_Bgsp().GetTriPla(lin_chk, &plane); const cXyz* normal = plane.GetNP(); - current.pos = lin_chk.i_GetCross(); + current.pos = lin_chk.GetCross(); cXyz zero(0.0f, 0.0f, 0.0f); cXyz normalYZ(0.0f, normal->y, normal->z); mWallAngle.z = mWallAlignAngle.z = -cM_atan2s(normal->x, zero.abs(normalYZ)); @@ -711,7 +711,7 @@ cPhs__Step daObjARI_c::create() { cM3dGPla plane; dComIfG_Bgsp().GetTriPla(lin_chk, &plane); const cXyz* normal = plane.GetNP(); - current.pos = lin_chk.i_GetCross(); + current.pos = lin_chk.GetCross(); cXyz zero(0.0f, 0.0f, 0.0f); cXyz normalYZ(0.0f, normal->y, normal->z); mWallAngle.z = mWallAlignAngle.z = -cM_atan2s(normal->x, zero.abs(normalYZ)); diff --git a/src/d/actor/d_a_obj_avalanche.cpp b/src/d/actor/d_a_obj_avalanche.cpp index 24bfe75745..26f5d74601 100644 --- a/src/d/actor/d_a_obj_avalanche.cpp +++ b/src/d/actor/d_a_obj_avalanche.cpp @@ -155,7 +155,7 @@ int daObjAvalanche_c::Execute(Mtx** param_1) { */ int daObjAvalanche_c::checkCollapse() { daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { return 0; } if (!player->checkWolfAttackReverse() && !player->checkFrontRollCrash()) { @@ -208,13 +208,13 @@ void daObjAvalanche_c::actionWait() { if (checkCollapse()) { setAction(ACTION_ORDER_EVENT); fopAcM_orderOtherEventId(this, mEventIdx, mMapToolId, 0xffff, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } /* 80BA773C-80BA7804 0008DC 00C8+00 1/0 0/0 0/0 .text actionOrderEvent__16daObjAvalanche_cFv */ void daObjAvalanche_c::actionOrderEvent() { - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { setAction(ACTION_EVENT); mStaffId = dComIfGp_evmng_getMyStaffId(l_staffName, 0, 0); if (mpBgW != NULL && mpBgW->ChkUsed()) { @@ -223,7 +223,7 @@ void daObjAvalanche_c::actionOrderEvent() { demoProc(); } else { fopAcM_orderOtherEventId(this, mEventIdx, mMapToolId, 0xffff, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } diff --git a/src/d/actor/d_a_obj_bmWindow.cpp b/src/d/actor/d_a_obj_bmWindow.cpp index 069d668b92..edfc3c428c 100644 --- a/src/d/actor/d_a_obj_bmWindow.cpp +++ b/src/d/actor/d_a_obj_bmWindow.cpp @@ -193,7 +193,7 @@ void daBmWindow_c::modeWait() { } if (player->checkAutoJump()) { if (checkActorInRectangle(player, &cStack_2c, &cStack_38)) { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { if (field_0xede == 0) { cXyz soundPos(current.pos); soundPos.z -= 200.0f; diff --git a/src/d/actor/d_a_obj_bmshutter.cpp b/src/d/actor/d_a_obj_bmshutter.cpp index 4d97dc9f5a..a71c28ca49 100644 --- a/src/d/actor/d_a_obj_bmshutter.cpp +++ b/src/d/actor/d_a_obj_bmshutter.cpp @@ -188,7 +188,7 @@ void daObjBmSh_c::actionWait() { if (checkSw()) { setAction(daObjBmSh_Action_ORDER_EVENT_e); fopAcM_orderOtherEventId(this, mEventIdx, mEvent, 0xffff, 0, 1); - eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); } } @@ -199,7 +199,7 @@ void daObjBmSh_c::actionOrderEvent() { setAction(daObjBmSh_Action_EVENT_e); } else { fopAcM_orderOtherEventId(this, mEventIdx, mEvent, 0xffff, 0, 1); - eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); } } diff --git a/src/d/actor/d_a_obj_bosswarp.cpp b/src/d/actor/d_a_obj_bosswarp.cpp index a0a0540f2b..d01679b7d4 100644 --- a/src/d/actor/d_a_obj_bosswarp.cpp +++ b/src/d/actor/d_a_obj_bosswarp.cpp @@ -470,19 +470,19 @@ void daObjBossWarp_c::event_proc_call() { void daObjBossWarp_c::actionWait() { setAction(ACT_ORDER_EVENT); fopAcM_orderOtherEventId(this, mBossClearEventId, mBossClearMapToolId, 0xffff, 3, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } /* 8057A54C-8057A610 000F8C 00C4+00 1/0 0/0 0/0 .text actionOrderEvent__15daObjBossWarp_cFv */ void daObjBossWarp_c::actionOrderEvent() { - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { dComIfGp_event_setTalkPartner(fopAcM_SearchByName(PROC_OBJ_YSTONE)); setAction(ACT_EVENT); mStaffId = dComIfGp_evmng_getMyStaffId("WARPHOLE", NULL, 0); demoProc(); } else { fopAcM_orderOtherEventId(this, mBossClearEventId, mBossClearMapToolId, 0xffff, 3, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } @@ -502,19 +502,19 @@ void daObjBossWarp_c::actionWaitWarp() { if (checkDistance()) { setAction(ACT_ORDER_CHK_EVENT); fopAcM_orderOtherEventId(this, mWarpCheckEventId, 0xff, 0xffff, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } /* 8057A6E0-8057A778 001120 0098+00 1/0 0/0 0/0 .text actionOrderWarpEvent__15daObjBossWarp_cFv */ void daObjBossWarp_c::actionOrderWarpEvent() { - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { setAction(ACT_WARP_EVENT); mStaffId = dComIfGp_evmng_getMyStaffId("WARPHOLE", NULL, 0); demoProc(); } else { fopAcM_orderOtherEventId(this, mBossWarpInEventId, mBossWarpInMapToolId, 0xffff, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } @@ -533,7 +533,7 @@ void daObjBossWarp_c::actionDead() { /* 8057A7C8-8057A8B4 001208 00EC+00 1/0 0/0 0/0 .text actionOrderChkEvent__15daObjBossWarp_cFv */ void daObjBossWarp_c::actionOrderChkEvent() { daMidna_c* midna = daPy_py_c::getMidnaActor(); - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { setAction(ACT_CHK_EVENT); mStaffId = dComIfGp_evmng_getMyStaffId("WARPHOLE", NULL, 0); attention_info.position = midna->attention_info.position; @@ -542,7 +542,7 @@ void daObjBossWarp_c::actionOrderChkEvent() { demoProc(); } else { fopAcM_orderOtherEventId(this, mWarpCheckEventId, 0xff, 0xffff, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } @@ -554,11 +554,11 @@ void daObjBossWarp_c::actionChkEvent() { if (mWarpChoice == 0) { setAction(ACT_ORDER_WARP_EVENT); fopAcM_orderOtherEventId(this, mBossWarpInEventId, mBossWarpInMapToolId, 0xffff, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } else if (mWarpChoice == 1) { setAction(ACT_ORDER_CANCEL_EVENT); fopAcM_orderOtherEventId(this, mWarpCancelEventId, 0xff, 0xffff, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } else { demoProc(); @@ -568,13 +568,13 @@ void daObjBossWarp_c::actionChkEvent() { /* 8057A994-8057AA2C 0013D4 0098+00 1/0 0/0 0/0 .text actionOrderCancelEvent__15daObjBossWarp_cFv */ void daObjBossWarp_c::actionOrderCancelEvent() { - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { setAction(ACT_CANCEL_EVENT); mStaffId = dComIfGp_evmng_getMyStaffId("WARPHOLE", NULL, 0); demoProc(); } else { fopAcM_orderOtherEventId(this, mWarpCancelEventId, 0xff, 0xffff, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } diff --git a/src/d/actor/d_a_obj_carry.cpp b/src/d/actor/d_a_obj_carry.cpp index c3aba8ef4f..350c467271 100644 --- a/src/d/actor/d_a_obj_carry.cpp +++ b/src/d/actor/d_a_obj_carry.cpp @@ -2602,7 +2602,7 @@ int daObjCarry_c::mode_proc_carry() { if (0.0f != fopAcM_GetSpeedF(this)) { if (current.angle.x == 0) { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { speedF = data().m_wolfThrowInitSpeedXZ; speed.y = data().m_wolfThrowInitSpeedY; } else { @@ -2610,7 +2610,7 @@ int daObjCarry_c::mode_proc_carry() { speed.y = data().m_throwInitSpeedY; } } else { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { speedF = data().m_wolfThrowInitSpeedXZ; } else { speedF = data().m_throwInitSpeedXZ; diff --git a/src/d/actor/d_a_obj_cdoor.cpp b/src/d/actor/d_a_obj_cdoor.cpp index b37f15c269..3ef638d4d6 100644 --- a/src/d/actor/d_a_obj_cdoor.cpp +++ b/src/d/actor/d_a_obj_cdoor.cpp @@ -283,18 +283,18 @@ void daObjCdoor_c::actionWait() { if (mMapToolID != 0xff) { setAction(ACT_ORDER_EVENT); fopAcM_orderOtherEventId(this, mEventID, mMapToolID, 0xffff, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } /* 80BC7B34-80BC7B9C 000DF4 0068+00 1/0 0/0 0/0 .text actionOrderEvent__12daObjCdoor_cFv */ void daObjCdoor_c::actionOrderEvent() { - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { setAction(ACT_EVENT); } else { fopAcM_orderOtherEventId(this, mEventID, mMapToolID, 0xffff, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } diff --git a/src/d/actor/d_a_obj_chest.cpp b/src/d/actor/d_a_obj_chest.cpp index bc7bb1bcc1..812ffc03c9 100644 --- a/src/d/actor/d_a_obj_chest.cpp +++ b/src/d/actor/d_a_obj_chest.cpp @@ -176,7 +176,7 @@ void daObjChest_c::actionWait() { fopAcM_seStart(this, Z2SE_OBJ_TANSU_YURE, 0); } - if (!fopAcM_isSwitch(this, getSwNo()) && player->i_checkNowWolf()) { + if (!fopAcM_isSwitch(this, getSwNo()) && player->checkNowWolf()) { if (player->checkWolfAttackReverse() || player->checkFrontRollCrash()) { for (int i = 0; i < 2; i++) { cXyz multiply[2] = { diff --git a/src/d/actor/d_a_obj_cho.cpp b/src/d/actor/d_a_obj_cho.cpp index 191c50b3ed..cc8554565d 100644 --- a/src/d/actor/d_a_obj_cho.cpp +++ b/src/d/actor/d_a_obj_cho.cpp @@ -134,7 +134,7 @@ void daObjCHO_c::WallCheck() { lin_chk.SetObj(); lin_chk.Set(&old.pos, ¤t.pos, NULL); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - current.pos = lin_chk.i_GetCross(); + current.pos = lin_chk.GetCross(); mTargetAngleY += 0x100; } } @@ -358,7 +358,7 @@ void daObjCHO_c::BoomChk() { if (dComIfG_Bgsp().LineCross(&lin_chk)) { cM3dGPla plane; dComIfG_Bgsp().GetTriPla(lin_chk, &plane); - old.pos = lin_chk.i_GetCross(); + old.pos = lin_chk.GetCross(); current.pos = old.pos; mAction = ACT_MOVE; mMode = 0; diff --git a/src/d/actor/d_a_obj_cwall.cpp b/src/d/actor/d_a_obj_cwall.cpp index 9461358a26..8214c4ce89 100644 --- a/src/d/actor/d_a_obj_cwall.cpp +++ b/src/d/actor/d_a_obj_cwall.cpp @@ -568,7 +568,7 @@ void daObjCwall_c::chain_control2() { cXyz acStack_98; cXyz cStack_a4; if (field_0xe90 != 0) { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { mDoMtx_stack_c::copy(player->getWolfMouthMatrix()); mDoMtx_stack_c::multVecZero(&acStack_98); cXyz cStack_b0(0.0f, 0.0f, 60.0f); @@ -892,7 +892,7 @@ BOOL daObjCwall_c::checkPullNow() { mDoMtx_stack_c::multVec(&local_2c, &local_2c); cXyz local_38; cXyz local_44; - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { local_38 = l_check_min_wolf; local_44 = l_check_max_wolf; } else { diff --git a/src/d/actor/d_a_obj_digholl.cpp b/src/d/actor/d_a_obj_digholl.cpp index 34ac188819..53a4d63c23 100644 --- a/src/d/actor/d_a_obj_digholl.cpp +++ b/src/d/actor/d_a_obj_digholl.cpp @@ -45,7 +45,7 @@ static int daObjDigholl_Delete(daObjDigholl_c* i_this) { /* 80BDC7D8-80BDCAEC 000238 0314+00 1/1 0/0 0/0 .text execute__14daObjDigholl_cFv */ int daObjDigholl_c::execute() { daPy_py_c* player = daPy_getLinkPlayerActorClass(); - if (player->i_checkNowWolf() && + if (player->checkNowWolf() && (field_0x56a == 0xff || fopAcM_isSwitch(this, field_0x56a)) && (f32)fabsf(current.pos.y - player->current.pos.y) < 40.0f) { diff --git a/src/d/actor/d_a_obj_digplace.cpp b/src/d/actor/d_a_obj_digplace.cpp index 715dc3e61f..6993bd7a7c 100644 --- a/src/d/actor/d_a_obj_digplace.cpp +++ b/src/d/actor/d_a_obj_digplace.cpp @@ -139,7 +139,7 @@ int daObjDigpl_c::execute() { } } - if (daPy_py_c::i_checkNowWolf() && mDigFlg == 0) { + if (daPy_py_c::checkNowWolf() && mDigFlg == 0) { if (field_0x56b == 0) { int seen_angle = fopAcM_seenActorAngleY(player_p, this); f32 dist_to_player = fopAcM_searchPlayerDistanceXZ2(this); diff --git a/src/d/actor/d_a_obj_digsnow.cpp b/src/d/actor/d_a_obj_digsnow.cpp index 4b49446d56..6fb67a070f 100644 --- a/src/d/actor/d_a_obj_digsnow.cpp +++ b/src/d/actor/d_a_obj_digsnow.cpp @@ -89,7 +89,7 @@ int daObjDigSnow_c::create1st() { /* 80BDCE84-80BDCF00 0002A4 007C+00 1/0 0/0 0/0 .text Execute__14daObjDigSnow_cFPPA3_A4_f */ int daObjDigSnow_c::Execute(Mtx** i_mtx) { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { attention_info.flags = 0x80; } else { attention_info.flags = 0; diff --git a/src/d/actor/d_a_obj_drop.cpp b/src/d/actor/d_a_obj_drop.cpp index 921b3a4090..4124395448 100644 --- a/src/d/actor/d_a_obj_drop.cpp +++ b/src/d/actor/d_a_obj_drop.cpp @@ -503,7 +503,7 @@ int daObjDrop_c::actionCompleteWait() { int daObjDrop_c::actionOrderCompleteDemo() { camera_class* pcamera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { pcamera->mCamera.SetTrimTypeForce(1); setDemoMode(DEMOMODE_COMPLETE_DEMO_e); mFadeoutTimer = KREG_S(8) + 135; @@ -511,7 +511,7 @@ int daObjDrop_c::actionOrderCompleteDemo() { dropGet(); } else { fopAcM_orderPotentialEvent(this, 2, 0, 0); - eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); } return 1; @@ -522,7 +522,7 @@ int daObjDrop_c::actionCompleateDemo() { camera_class* pcamera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); pcamera->mCamera.SetTrimTypeForce(1); - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { int timer = cLib_calcTimer(&mFadeoutTimer); if (timer == 0) { u8 need_num = dComIfGp_getNeedLightDropNum(); @@ -556,7 +556,7 @@ int daObjDrop_c::actionWaitCompleteGetDemo() { dComIfGs_onSaveSwitch(13); } else { fopAcM_orderItemEvent(this, 0, 0); - eventInfo.i_onCondition(dEvtCnd_CANGETITEM_e); + eventInfo.onCondition(dEvtCnd_CANGETITEM_e); } return 1; diff --git a/src/d/actor/d_a_obj_fchain.cpp b/src/d/actor/d_a_obj_fchain.cpp index a6c51c3119..1ecf2eb344 100644 --- a/src/d/actor/d_a_obj_fchain.cpp +++ b/src/d/actor/d_a_obj_fchain.cpp @@ -148,7 +148,7 @@ int daObjFchain_c::execute() { } cXyz* pcVar12 = field_0x694; cXyz* local_150 = field_0x79c; - u32 isWolf = daPy_py_c::i_checkNowWolf(); + u32 isWolf = daPy_py_c::checkNowWolf(); daPy_py_c* player = daPy_getLinkPlayerActorClass(); for (int i = 0; i < 22; i++) { local_54 = (*pcVar12 - *local_148) + *local_150; diff --git a/src/d/actor/d_a_obj_food.cpp b/src/d/actor/d_a_obj_food.cpp index 10df59017d..4ce249cbec 100644 --- a/src/d/actor/d_a_obj_food.cpp +++ b/src/d/actor/d_a_obj_food.cpp @@ -136,7 +136,7 @@ static s16 wall_angle_get(obj_food_class* i_this) { lin_chk.Set(&vec3, &vec1[i], _this); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - vec1[i] = lin_chk.i_GetCross(); + vec1[i] = lin_chk.GetCross(); } else { return 0x23; } diff --git a/src/d/actor/d_a_obj_iceblock.cpp b/src/d/actor/d_a_obj_iceblock.cpp index 7541843d98..8a01510522 100644 --- a/src/d/actor/d_a_obj_iceblock.cpp +++ b/src/d/actor/d_a_obj_iceblock.cpp @@ -676,7 +676,7 @@ int daObjIceBlk_c::checkWallPre(s16 i_angle) { linchk.Set(&start, &end, this); if (dComIfG_Bgsp().LineCross(&linchk)) { end = start + spC8; - mWallPrePos = end - linchk.i_GetCross(); + mWallPrePos = end - linchk.GetCross(); var_r29 = i; } } @@ -799,7 +799,7 @@ void daObjIceBlk_c::actionWait() { if (mMode == MODE_PROC_WALK_e && mWalkType == WALK_PUSH) { setAction(ACTION_ORDER_EVENT_e); fopAcM_orderPotentialEvent(this, 2, 0, 0); - eventInfo.i_onCondition(fopAcCnd_NOEXEC_e); + eventInfo.onCondition(fopAcCnd_NOEXEC_e); } } @@ -808,13 +808,13 @@ void daObjIceBlk_c::actionWait() { void daObjIceBlk_c::actionOrderEvent() { camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { setAction(ACTION_EVENT_e); camera->mCamera.Stop(); camera->mCamera.SetTrimSize(1); } else if (mMode == MODE_PROC_WALK_e) { fopAcM_orderPotentialEvent(this, 2, 0, 0); - eventInfo.i_onCondition(fopAcCnd_NOEXEC_e); + eventInfo.onCondition(fopAcCnd_NOEXEC_e); } else { setAction(ACTION_WAIT_e); } diff --git a/src/d/actor/d_a_obj_iceleaf.cpp b/src/d/actor/d_a_obj_iceleaf.cpp index 12fa59b48b..ad07fac945 100644 --- a/src/d/actor/d_a_obj_iceleaf.cpp +++ b/src/d/actor/d_a_obj_iceleaf.cpp @@ -366,7 +366,7 @@ void daObjIceLeaf_c::actionWait() {} /* 80C259C8-80C25A68 001328 00A0+00 1/0 0/0 0/0 .text actionOrderEvent__14daObjIceLeaf_cFv */ void daObjIceLeaf_c::actionOrderEvent() { - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { setAction(ACT_EVENT_e); mpBck->setPlaySpeed(1.0f); setMode(MODE_DROP_e); @@ -375,7 +375,7 @@ void daObjIceLeaf_c::actionOrderEvent() { fopAcM_onSwitch(this, getSwbit()); } else { fopAcM_orderOtherEventId(this, mEventID, mEvId, 0xFFFF, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } diff --git a/src/d/actor/d_a_obj_item.cpp b/src/d/actor/d_a_obj_item.cpp index f9a3982b21..e8ec0b1698 100644 --- a/src/d/actor/d_a_obj_item.cpp +++ b/src/d/actor/d_a_obj_item.cpp @@ -522,7 +522,7 @@ void daItem_c::procInitGetDemoEvent() { field_0x9c1 = 10; fopAcM_orderItemEvent(this, 0, 0); - eventInfo.i_onCondition(dEvtCnd_CANGETITEM_e); + eventInfo.onCondition(dEvtCnd_CANGETITEM_e); m_item_id = fopAcM_createItemForTrBoxDemo(¤t.pos, m_itemNo, -1, fopAcM_GetRoomNo(this), NULL, NULL); @@ -542,7 +542,7 @@ void daItem_c::procWaitGetDemoEvent() { } else { if (m_itemNo == fpcNm_ITEM_BOOMERANG) { fopAcM_orderItemEvent(this, 0, 0); - eventInfo.i_onCondition(dEvtCnd_CANGETITEM_e); + eventInfo.onCondition(dEvtCnd_CANGETITEM_e); return; } @@ -561,7 +561,7 @@ void daItem_c::procWaitGetDemoEvent() { } } else { fopAcM_orderItemEvent(this, 0, 0); - eventInfo.i_onCondition(dEvtCnd_CANGETITEM_e); + eventInfo.onCondition(dEvtCnd_CANGETITEM_e); } } } diff --git a/src/d/actor/d_a_obj_kabuto.cpp b/src/d/actor/d_a_obj_kabuto.cpp index 15b929e0ad..6215595606 100644 --- a/src/d/actor/d_a_obj_kabuto.cpp +++ b/src/d/actor/d_a_obj_kabuto.cpp @@ -190,7 +190,7 @@ BOOL daObjKABUTO_c::WallCheck() { cM3dGPla plane; dComIfG_Bgsp().GetTriPla(lin_chk, &plane); const cXyz* normal = plane.GetNP(); - current.pos = lin_chk.i_GetCross(); + current.pos = lin_chk.GetCross(); cXyz zero(0.0f, 0.0f, 0.0f); cXyz normal_yz(0.0f, normal->y, normal->z); mWallAngle.z = -cM_atan2s(normal->x, zero.abs(normal_yz)); @@ -242,7 +242,7 @@ void daObjKABUTO_c::WallWalk() { cXyz zero(0.0f, 0.0f, 0.0f); cXyz normal_yz(0.0f, normal->y, normal->z); f32 normal_len_yz = zero.abs(normal_yz); - cross = lin_chk1.i_GetCross(); + cross = lin_chk1.GetCross(); if (normal_ang_y - mDownAngleY < 0x1000 && normal_ang_y - mDownAngleY > -0x1000 && cross.abs(current.pos) < speedF * 3.0f) { @@ -582,11 +582,11 @@ int daObjKABUTO_c::Execute() { if (dComIfG_Bgsp().LineCross(&lin_chk)) { cM3dGPla plane; dComIfG_Bgsp().GetTriPla(lin_chk, &plane); - current.pos = old.pos = lin_chk.i_GetCross(); + current.pos = old.pos = lin_chk.GetCross(); mAction = ACT_WAIT; mMode = 0; const cXyz* normal = plane.GetNP(); - current.pos = lin_chk.i_GetCross(); + current.pos = lin_chk.GetCross(); cXyz zero(0.0f, 0.0f, 0.0f); cXyz vec(0.0f, normal->y, normal->z); mWallAngle.z = -cM_atan2s(normal->x, zero.abs(vec)); @@ -803,7 +803,7 @@ cPhs__Step daObjKABUTO_c::create() { cM3dGPla plane; dComIfG_Bgsp().GetTriPla(lin_chk, &plane); const cXyz* normal = plane.GetNP(); - current.pos = lin_chk.i_GetCross(); + current.pos = lin_chk.GetCross(); cXyz zero(0.0f, 0.0f, 0.0f); cXyz normalYZ(0.0f, normal->y, normal->z); mWallAngle.z = -cM_atan2s(normal->x, zero.abs(normalYZ)); @@ -823,7 +823,7 @@ cPhs__Step daObjKABUTO_c::create() { cM3dGPla plane; dComIfG_Bgsp().GetTriPla(lin_chk, &plane); const cXyz* normal = plane.GetNP(); - current.pos = lin_chk.i_GetCross(); + current.pos = lin_chk.GetCross(); cXyz zero(0.0f, 0.0f, 0.0f); cXyz normalYZ(0.0f, normal->y, normal->z); mWallAngle.z = -cM_atan2s(normal->x, zero.abs(normalYZ)); diff --git a/src/d/actor/d_a_obj_kantera.cpp b/src/d/actor/d_a_obj_kantera.cpp index 0a3d60197f..75d29ab078 100644 --- a/src/d/actor/d_a_obj_kantera.cpp +++ b/src/d/actor/d_a_obj_kantera.cpp @@ -194,7 +194,7 @@ int daItemKantera_c::initActionOrderGetDemo() { mCcCyl.OffCoSPrmBit(1); hide(); fopAcM_orderItemEvent(this, 0, 0); - eventInfo.i_onCondition(8); + eventInfo.onCondition(8); field_0x92c = fopAcM_createItemForTrBoxDemo(¤t.pos, m_itemNo, -1, fopAcM_GetRoomNo(this), NULL, NULL); setStatus(2); @@ -210,7 +210,7 @@ int daItemKantera_c::actionOrderGetDemo() { } } else { fopAcM_orderItemEvent(this, 0, 0); - eventInfo.i_onCondition(8); + eventInfo.onCondition(8); } return 1; } diff --git a/src/d/actor/d_a_obj_kgate.cpp b/src/d/actor/d_a_obj_kgate.cpp index 5d81cbc4d2..80d8198e23 100644 --- a/src/d/actor/d_a_obj_kgate.cpp +++ b/src/d/actor/d_a_obj_kgate.cpp @@ -440,7 +440,7 @@ int daObjKGate_c::checkAreaL(cXyz const* param_0, cXyz const* param_1) { pos = player_p->current.pos; - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { offset.set(0.0f, 0.0f, 90.0f); } else { offset.set(0.0f, 0.0f, 0.0f); @@ -526,7 +526,7 @@ int daObjKGate_c::checkAreaR(cXyz const* param_0, cXyz const* param_1) { pos = player_p->current.pos; cXyz player_offset; - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { player_offset.set(0.0f, 0.0f, 90.0f); } else { player_offset.set(0.0f, 0.0f, 0.0f); @@ -782,7 +782,7 @@ void daObjKGate_c::action_typeA() { if (chk_l != 0 || chk_r != 0) { daPy_py_c* player_p = daPy_getPlayerActorClass(); - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { if (player_p->checkWolfAttackReverse() || player_p->checkFrontRollCrash()) { field_0xb98 = 1200.0f; field_0xb94 = 1200.0f; @@ -832,7 +832,7 @@ void daObjKGate_c::action_typeB() { if (chk_l != 0 || chk_r != 0) { daPy_py_c* player_p = daPy_getPlayerActorClass(); - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { if (player_p->checkWolfAttackReverse() || player_p->checkFrontRollCrash()) { field_0xb98 = 1200.0f; field_0xb94 = 1200.0f; @@ -878,7 +878,7 @@ void daObjKGate_c::action_typeB() { /* 8058A1B0-8058A294 0021B0 00E4+00 1/0 0/0 0/0 .text actionWaitEvent__12daObjKGate_cFv */ void daObjKGate_c::actionWaitEvent() { - if (eventInfo.i_checkCommandDoor()) { + if (eventInfo.checkCommandDoor()) { setAction(ACT_EVENT); dComIfGp_setItemKeyNumCount(-1); fopAcM_onSwitch(this, getSwNo()); @@ -886,7 +886,7 @@ void daObjKGate_c::actionWaitEvent() { } else if (checkOpen()) { eventInfo.setEventId(mEventID); eventInfo.setMapToolId(mMapToolID); - eventInfo.i_onCondition(dEvtCnd_CANDOOR_e); + eventInfo.onCondition(dEvtCnd_CANDOOR_e); } } diff --git a/src/d/actor/d_a_obj_kiPot.cpp b/src/d/actor/d_a_obj_kiPot.cpp index c86d3b7673..88d0609fae 100644 --- a/src/d/actor/d_a_obj_kiPot.cpp +++ b/src/d/actor/d_a_obj_kiPot.cpp @@ -71,9 +71,9 @@ void daKiPot_c::init_modeWait() { /* 80C44F80-80C45008 000360 0088+00 1/0 0/0 0/0 .text modeWait__9daKiPot_cFv */ void daKiPot_c::modeWait() { - if (chkEvent() && eventInfo.i_checkCommandCatch() == 0) { + if (chkEvent() && eventInfo.checkCommandCatch() == 0) { dComIfGp_att_CatchRequest(this, fpcNm_ITEM_UGLY_SOUP, 100.0f, 50.0f, -50.0f, 0x2000, 1); - eventInfo.i_onCondition(0x40); + eventInfo.onCondition(0x40); } } @@ -84,7 +84,7 @@ s32 daKiPot_c::chkEvent() { if (!dComIfGp_getEvent().isOrderOK()) { result = 0; - if (eventInfo.i_checkCommandCatch()) { + if (eventInfo.checkCommandCatch()) { return result; } } diff --git a/src/d/actor/d_a_obj_ladder.cpp b/src/d/actor/d_a_obj_ladder.cpp index 1b4d4e4008..8069704e34 100644 --- a/src/d/actor/d_a_obj_ladder.cpp +++ b/src/d/actor/d_a_obj_ladder.cpp @@ -283,7 +283,7 @@ void daObjLadder::Act_c::mode_demoreq() { mInDemo = true; } else { fopAcM_orderOtherEventId(this, mEventIdx, prm_get_evId(), 0xffff, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } else { isDemo = true; diff --git a/src/d/actor/d_a_obj_life_container.cpp b/src/d/actor/d_a_obj_life_container.cpp index 88df1353bb..08cf929486 100644 --- a/src/d/actor/d_a_obj_life_container.cpp +++ b/src/d/actor/d_a_obj_life_container.cpp @@ -310,7 +310,7 @@ int daObjLife_c::initActionOrderGetDemo() { hide(); fopAcM_orderItemEvent(this, 0, 0); - eventInfo.i_onCondition(dEvtCnd_CANGETITEM_e); + eventInfo.onCondition(dEvtCnd_CANGETITEM_e); mItemId = fopAcM_createItemForTrBoxDemo(¤t.pos, m_itemNo, -1, fopAcM_GetRoomNo(this), NULL, NULL); JUT_ASSERT(699, mItemId != fpcM_ERROR_PROCESS_ID_e); @@ -330,7 +330,7 @@ int daObjLife_c::actionOrderGetDemo() { } } else { fopAcM_orderItemEvent(this, 0, 0); - eventInfo.i_onCondition(dEvtCnd_CANGETITEM_e); + eventInfo.onCondition(dEvtCnd_CANGETITEM_e); } return 1; diff --git a/src/d/actor/d_a_obj_lv4digsand.cpp b/src/d/actor/d_a_obj_lv4digsand.cpp index 653f1c7ff6..304f202321 100644 --- a/src/d/actor/d_a_obj_lv4digsand.cpp +++ b/src/d/actor/d_a_obj_lv4digsand.cpp @@ -88,7 +88,7 @@ int daObjL4DigSand_c::create1st() { /* 80C66D40-80C66DD0 0002A0 0090+00 1/0 0/0 0/0 .text Execute__16daObjL4DigSand_cFPPA3_A4_f */ int daObjL4DigSand_c::Execute(f32 (**param_0)[3][4]) { - if (daPy_py_c::i_checkNowWolf() && checkItemGet(fpcNm_ITEM_SMELL_POH, 1)) { + if (daPy_py_c::checkNowWolf() && checkItemGet(fpcNm_ITEM_SMELL_POH, 1)) { attention_info.flags = 0x80; } else { attention_info.flags = 0; diff --git a/src/d/actor/d_a_obj_mirror_table.cpp b/src/d/actor/d_a_obj_mirror_table.cpp index 86b980c6b1..1639760888 100644 --- a/src/d/actor/d_a_obj_mirror_table.cpp +++ b/src/d/actor/d_a_obj_mirror_table.cpp @@ -137,7 +137,7 @@ void daObjMirrorTable_c::checkOnPanel() { cXyz rel_pos; mDoMtx_stack_c::copy(mpPanelModel->getBaseTRMtx()); mDoMtx_stack_c::inverse(); - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { for (int i = 0; i < 4; i++) { cXyz* pos; switch (i) { diff --git a/src/d/actor/d_a_obj_movebox.cpp b/src/d/actor/d_a_obj_movebox.cpp index 764f4621cb..47cc1c59a1 100644 --- a/src/d/actor/d_a_obj_movebox.cpp +++ b/src/d/actor/d_a_obj_movebox.cpp @@ -169,7 +169,7 @@ void daObjMovebox::Bgc_c::wall_pos(daObjMovebox::Act_c const* i_actor, M_wall_work[i].SetActorPid(i_actor->base.id); if (dComIfG_Bgsp().LineCross(&M_wall_work[i])) { - field_0x64[i] = M_wall_work[i].i_GetCross(); + field_0x64[i] = M_wall_work[i].GetCross(); f32 var_f31 = sp48.abs2(field_0x64[i]); if (var_f31 < field_0x17c) { diff --git a/src/d/actor/d_a_obj_oiltubo.cpp b/src/d/actor/d_a_obj_oiltubo.cpp index af7bf6e873..dfe7cfb340 100644 --- a/src/d/actor/d_a_obj_oiltubo.cpp +++ b/src/d/actor/d_a_obj_oiltubo.cpp @@ -276,7 +276,7 @@ BOOL daObj_Oiltubo_c::chkEvent() { if (!dComIfGp_getEvent().isOrderOK()) { var_r5 = 0; - if (eventInfo.i_checkCommandCatch()) { + if (eventInfo.checkCommandCatch()) { return var_r5; } } @@ -288,9 +288,9 @@ BOOL daObj_Oiltubo_c::chkEvent() { int daObj_Oiltubo_c::wait(void* unused) { switch (mMode) { case 1: - if (!eventInfo.i_checkCommandCatch()) { + if (!eventInfo.checkCommandCatch()) { dComIfGp_att_CatchRequest(this, fpcNm_ITEM_OIL_BOTTLE_2, 100.0f, 50.0f, -50.0f, 0x2000, 1); - eventInfo.i_onCondition(0x40); + eventInfo.onCondition(0x40); } break; case 2: diff --git a/src/d/actor/d_a_obj_pdoor.cpp b/src/d/actor/d_a_obj_pdoor.cpp index 764fdec123..fa823e0b6a 100644 --- a/src/d/actor/d_a_obj_pdoor.cpp +++ b/src/d/actor/d_a_obj_pdoor.cpp @@ -191,7 +191,7 @@ void daObjPDoor_c::modeWait() { } field_0x5b0 = -1; } - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { cXyz cStack_44 = player->current.pos - current.pos; mDoMtx_stack_c::YrotS(-shape_angle.y); mDoMtx_stack_c::multVec(&cStack_44, &cStack_44); diff --git a/src/d/actor/d_a_obj_pillar.cpp b/src/d/actor/d_a_obj_pillar.cpp index 1c67cb02ca..e93bc0f274 100644 --- a/src/d/actor/d_a_obj_pillar.cpp +++ b/src/d/actor/d_a_obj_pillar.cpp @@ -287,7 +287,7 @@ int daPillar_c::checkShake() { f32 player_dist = player->current.pos.abs(current.pos); f32 attack_range = 150.0f; - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { attack_range = 220.0f; } diff --git a/src/d/actor/d_a_obj_rgate.cpp b/src/d/actor/d_a_obj_rgate.cpp index 573f271af3..368678e5ce 100644 --- a/src/d/actor/d_a_obj_rgate.cpp +++ b/src/d/actor/d_a_obj_rgate.cpp @@ -395,7 +395,7 @@ int daObjRgate_c::checkAreaL(cXyz const* unused1, cXyz const* unused2) { bound_b.set(350.0f, 0.0f, 100.0f); pos = player_p->current.pos; - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { offset.set(0.0f, 0.0f, 90.0f); } else { offset.set(0.0f, 0.0f, 0.0f); @@ -473,7 +473,7 @@ int daObjRgate_c::checkAreaR(cXyz const* unused1, cXyz const* unused2) { pos = player_p->current.pos; cXyz player_offset; - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { player_offset.set(0.0f, 0.0f, 90.0f); } else { player_offset.set(0.0f, 0.0f, 0.0f); @@ -728,7 +728,7 @@ void daObjRgate_c::action_typeA() { if (chk_l != 0 || chk_r != 0) { daPy_py_c* player_p = daPy_getPlayerActorClass(); - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { if (player_p->checkWolfAttackReverse() || player_p->checkFrontRollCrash()) { field_0xb94 = 1200.0f; field_0xb90 = 1200.0f; @@ -764,7 +764,7 @@ void daObjRgate_c::action_typeA() { /* 80CBBA10-80CBBAF4 001DF0 00E4+00 1/0 0/0 0/0 .text actionWaitEvent__12daObjRgate_cFv */ void daObjRgate_c::actionWaitEvent() { - if (eventInfo.i_checkCommandDoor()) { + if (eventInfo.checkCommandDoor()) { setAction(ACT_EVENT); dComIfGp_setItemKeyNumCount(-1); fopAcM_onSwitch(this, getSwNo()); @@ -772,7 +772,7 @@ void daObjRgate_c::actionWaitEvent() { } else if (checkOpen()) { eventInfo.setEventId(mEventID); eventInfo.setMapToolId(mMapToolID); - eventInfo.i_onCondition(dEvtCnd_CANDOOR_e); + eventInfo.onCondition(dEvtCnd_CANDOOR_e); } } diff --git a/src/d/actor/d_a_obj_riverrock.cpp b/src/d/actor/d_a_obj_riverrock.cpp index 5acf0eeff2..b95a88968f 100644 --- a/src/d/actor/d_a_obj_riverrock.cpp +++ b/src/d/actor/d_a_obj_riverrock.cpp @@ -87,7 +87,7 @@ void daObjRIVERROCK_c::CheckBG() { adStack_a0.Set(&field_0x5d0, &particlePos, NULL); if (dComIfG_Bgsp().LineCross(&adStack_a0)) { if (dComIfG_Bgsp().GetSpecialCode(adStack_a0) == 1) { - eyePos = adStack_a0.i_GetCross(); + eyePos = adStack_a0.GetCross(); fopAcM_seStart(this, Z2SE_OBJ_RG_ROCKPOLE_LAND, 0); if (field_0x5a8 != 0xff) { if (!dComIfGs_isSwitch(field_0x5a8, fopAcM_GetRoomNo(this))) { diff --git a/src/d/actor/d_a_obj_rstair.cpp b/src/d/actor/d_a_obj_rstair.cpp index 05fe205bd1..9a6d2e043a 100644 --- a/src/d/actor/d_a_obj_rstair.cpp +++ b/src/d/actor/d_a_obj_rstair.cpp @@ -256,7 +256,7 @@ void daObjRotStair_c::actionWait() { field_0x5e2 = false; setAction(ACTION_ORDER_EVENT); fopAcM_orderOtherEventId(this, mEventId, mMapToolId, 0xffff, 0, 1); - eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); } } @@ -266,7 +266,7 @@ void daObjRotStair_c::actionOrderEvent() { setAction(ACTION_EVENT); } else { fopAcM_orderOtherEventId(this, mEventId, mMapToolId, 0xffff, 0, 1); - eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); } } diff --git a/src/d/actor/d_a_obj_shield.cpp b/src/d/actor/d_a_obj_shield.cpp index e299e1119e..e200b2a387 100644 --- a/src/d/actor/d_a_obj_shield.cpp +++ b/src/d/actor/d_a_obj_shield.cpp @@ -253,7 +253,7 @@ int daItemShield_c::initActionOrderGetDemo() { mCcCyl.OffCoSPrmBit(1); daItemBase_c::hide(); fopAcM_orderItemEvent(this, 0, 0); - eventInfo.i_onCondition(dEvtCnd_CANGETITEM_e); + eventInfo.onCondition(dEvtCnd_CANGETITEM_e); mItemId = fopAcM_createItemForTrBoxDemo(¤t.pos, m_itemNo, -1, fopAcM_GetRoomNo(this), 0, 0); JUT_ASSERT(682, mItemId != fpcM_ERROR_PROCESS_ID_e) @@ -270,7 +270,7 @@ int daItemShield_c::actionOrderGetDemo() { } } else { fopAcM_orderItemEvent(this, 0, 0); - eventInfo.i_onCondition(dEvtCnd_CANGETITEM_e); + eventInfo.onCondition(dEvtCnd_CANGETITEM_e); } return 1; } @@ -305,7 +305,7 @@ void daItemShield_c::actionWaitCamDemo() { setAction(ACTION_ORDER_CAM_DEMO); fopAcM_orderOtherEventId(this, mEventIdx, mEvId, 0xffff, 0, 1); - eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); } } @@ -316,7 +316,7 @@ void daItemShield_c::actionOrderCamDemo() { } else { fopAcM_orderOtherEventId(this, mEventIdx, mEvId, 0xffff, 0, 1); - eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); } } diff --git a/src/d/actor/d_a_obj_smw_stone.cpp b/src/d/actor/d_a_obj_smw_stone.cpp index ee3ff5b57c..4d5756e4e5 100644 --- a/src/d/actor/d_a_obj_smw_stone.cpp +++ b/src/d/actor/d_a_obj_smw_stone.cpp @@ -173,7 +173,7 @@ bool daSmWStone_c::chkWlfInRange() { if (player == NULL) { return false; } - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { cXyz pos = player->current.pos; if (pos.abs2(current.pos) < 40000.0f) { return true; diff --git a/src/d/actor/d_a_obj_stone.cpp b/src/d/actor/d_a_obj_stone.cpp index 8f09ae5c0a..827aae38b8 100644 --- a/src/d/actor/d_a_obj_stone.cpp +++ b/src/d/actor/d_a_obj_stone.cpp @@ -322,7 +322,7 @@ void daObjStone_c::mode_proc_call() { &daObjStone_c::modeYogan, }; if (fopAcM_checkCarryNow(this) && field_0x0907 != 2) { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { init_modePushWolfNonBreak(); } else { init_modeCarry(); diff --git a/src/d/actor/d_a_obj_swBallC.cpp b/src/d/actor/d_a_obj_swBallC.cpp index bf9b28b6fb..0966c5f515 100644 --- a/src/d/actor/d_a_obj_swBallC.cpp +++ b/src/d/actor/d_a_obj_swBallC.cpp @@ -180,7 +180,7 @@ void daObjSwBallC_c::actionWait() { if (fopAcM_isSwitch(this, 0x3d) && fopAcM_isSwitch(this, 0x3e)) { setAction(1); fopAcM_orderOtherEventId(this, field_0x57c, field_0x57e, 0xffff, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } @@ -194,7 +194,7 @@ void daObjSwBallC_c::actionOrderEvent() { dComIfGs_onTbox(11); } else { fopAcM_orderOtherEventId(this, field_0x57c, field_0x57e, 0xffff, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } diff --git a/src/d/actor/d_a_obj_swturn.cpp b/src/d/actor/d_a_obj_swturn.cpp index be1b6ec0f4..0fca73be7f 100644 --- a/src/d/actor/d_a_obj_swturn.cpp +++ b/src/d/actor/d_a_obj_swturn.cpp @@ -303,7 +303,7 @@ void daObjSwTurn_c::modeWait() { } field_0x5c0 = -1; } - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { cXyz local_44 = player->current.pos - current.pos; mDoMtx_stack_c::YrotS(-shape_angle.y); mDoMtx_stack_c::multVec(&local_44, &local_44); diff --git a/src/d/actor/d_a_obj_table.cpp b/src/d/actor/d_a_obj_table.cpp index e90c055c89..5cf8e8a7bd 100644 --- a/src/d/actor/d_a_obj_table.cpp +++ b/src/d/actor/d_a_obj_table.cpp @@ -138,7 +138,7 @@ int daObjTable_c::Create() { /* 80D0695C-80D06AD8 00059C 017C+00 1/0 0/0 0/0 .text Execute__12daObjTable_cFPPA3_A4_f */ int daObjTable_c::Execute(Mtx** i_mtx) { - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); dComIfG_inf_c& gameInfo = g_dComIfG_gameInfo; if (dComIfGp_event_runCheck()) { @@ -152,7 +152,7 @@ int daObjTable_c::Execute(Mtx** i_mtx) { fopAcM_orderChangeEventId(this, mEventID, 1, -1); } } else if (dComIfGp_getEventManager().getMyStaffId(l_arcName, NULL, 0) != -1 && - eventInfo.i_checkCommandDemoAccrpt() && mEventID != -1 && + eventInfo.checkCommandDemoAccrpt() && mEventID != -1 && dComIfGp_getEventManager().endCheck(mEventID)) { mEventID = -1; diff --git a/src/d/actor/d_a_obj_ten.cpp b/src/d/actor/d_a_obj_ten.cpp index c5e545d81a..dc3af8c7b1 100644 --- a/src/d/actor/d_a_obj_ten.cpp +++ b/src/d/actor/d_a_obj_ten.cpp @@ -155,7 +155,7 @@ BOOL daObjTEN_c::WallCheck() { cM3dGPla acStack_b0; dComIfG_Bgsp().GetTriPla(linChk, &acStack_b0); cXyz* pfVar4 = acStack_b0.GetNP(); - current.pos = linChk.i_GetCross(); + current.pos = linChk.GetCross(); cXyz cStack_bc(0.0f, 0.0f, 0.0f); cXyz cStack_c8(0.0f, pfVar4->y, pfVar4->z); field_0x602.z = -cM_atan2s(pfVar4->x, cStack_bc.abs(cStack_c8)); @@ -206,7 +206,7 @@ void daObjTEN_c::WallWalk() { cXyz cStack_15c(0.0f, 0.0f, 0.0f); cXyz cStack_168(0.0f, pfVar5->y, pfVar5->z); f32 uVar11 = cStack_15c.abs(cStack_168); - cStack_150 = adStack_a8.i_GetCross(); + cStack_150 = adStack_a8.GetCross(); if (0x1000 > sVar7 - field_0x60a && sVar7 - field_0x60a > -0x1000 && cStack_150.abs(current.pos) < speedF * 3.0f) { @@ -494,11 +494,11 @@ void daObjTEN_c::BoomChk() { if (dComIfG_Bgsp().LineCross(&linChk)) { cM3dGPla acStack_c0; dComIfG_Bgsp().GetTriPla(linChk, &acStack_c0); - current.pos = old.pos = linChk.i_GetCross(); + current.pos = old.pos = linChk.GetCross(); mAction = ACTION_WAIT; field_0x5e9 = 0; cXyz* pfVar7 = acStack_c0.GetNP(); - current.pos = linChk.i_GetCross(); + current.pos = linChk.GetCross(); cXyz cStack_d8(0.0f, 0.0f, 0.0f); cXyz cStack_e4(0.0f, pfVar7->y, pfVar7->z); field_0x602.z = -cM_atan2s(pfVar7->x, cStack_d8.abs(cStack_e4)); @@ -779,7 +779,7 @@ int daObjTEN_c::create() { cM3dGPla acStack_d0; dComIfG_Bgsp().GetTriPla(linChk, &acStack_d0); cXyz* pfVar13 = acStack_d0.GetNP(); - current.pos = linChk.i_GetCross(); + current.pos = linChk.GetCross(); cXyz cStack_12c(0.0f, 0.0f, 0.0f); cXyz cStack_138(0.0f, pfVar13->y, pfVar13->z); field_0x602.z = -cM_atan2s(pfVar13->x, cStack_12c.abs(cStack_138)); @@ -798,7 +798,7 @@ int daObjTEN_c::create() { cM3dGPla acStack_e4; dComIfG_Bgsp().GetTriPla(linChk, &acStack_e4); cXyz* pfVar13 = acStack_e4.GetNP(); - current.pos = linChk.i_GetCross(); + current.pos = linChk.GetCross(); cXyz cStack_144(0.0f, 0.0f, 0.0f); cXyz cStack_150(0.0f, pfVar13->y, pfVar13->z); field_0x602.z = -cM_atan2s(pfVar13->x, cStack_144.abs(cStack_150)); diff --git a/src/d/actor/d_a_obj_wchain.cpp b/src/d/actor/d_a_obj_wchain.cpp index dbe980d135..e56855bbb5 100644 --- a/src/d/actor/d_a_obj_wchain.cpp +++ b/src/d/actor/d_a_obj_wchain.cpp @@ -263,7 +263,7 @@ int daObjWchain_c::execute() { setChainPos(); - if (daPy_py_c::i_checkNowWolf() && !mRide && mPullLength < 0.1f) { + if (daPy_py_c::checkNowWolf() && !mRide && mPullLength < 0.1f) { attention_info.flags |= 1; } else { attention_info.flags &= ~1; diff --git a/src/d/actor/d_a_obj_wind_stone.cpp b/src/d/actor/d_a_obj_wind_stone.cpp index 09fa0a292e..5ff02c6137 100644 --- a/src/d/actor/d_a_obj_wind_stone.cpp +++ b/src/d/actor/d_a_obj_wind_stone.cpp @@ -154,7 +154,7 @@ bool daWindStone_c::chkWlfInRange() { if (dComIfGp_getPlayer(0) == NULL) { return false; } - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { cXyz player_pos = dComIfGp_getPlayer(0)->current.pos; if (player_pos.abs2(current.pos) < 40000.0f) { return true; @@ -178,11 +178,7 @@ void daWindStone_c::exeModeHowl() { field_0x5c4 = 2; } else { s8 tuneId = getTuneId(); - // Fake match. Should be: - // daAlink_getAlinkActorClass()->daAlink_c::i_getWolfHowlMgrP()->startWindStoneSound(tuneId, - // ¤t.pos); - daAlink_getAlinkActorClass()->i_getWolfHowlMgrP()->startWindStoneSound(tuneId, - ¤t.pos); + daAlink_getAlinkActorClass()->startWindStoneSound(tuneId, ¤t.pos); attention_info.flags = 0; if (chkWlfInRange()) { attention_info.flags |= 0x80; diff --git a/src/d/actor/d_a_obj_yel_bag.cpp b/src/d/actor/d_a_obj_yel_bag.cpp index 16e9641043..3a4953bf42 100644 --- a/src/d/actor/d_a_obj_yel_bag.cpp +++ b/src/d/actor/d_a_obj_yel_bag.cpp @@ -477,7 +477,7 @@ int daObj_YBag_c::getWallAngle(s16 param_1, s16* param_2) { acStack_40[i] += cStack_50; mLinChk.Set(&cStack_50, &acStack_40[i], this); if (dComIfG_Bgsp().LineCross(&mLinChk)) { - acStack_40[i] = mLinChk.i_GetCross(); + acStack_40[i] = mLinChk.GetCross(); } else { return 0; } diff --git a/src/d/actor/d_a_obj_yobikusa.cpp b/src/d/actor/d_a_obj_yobikusa.cpp index e921044914..4001812277 100644 --- a/src/d/actor/d_a_obj_yobikusa.cpp +++ b/src/d/actor/d_a_obj_yobikusa.cpp @@ -411,7 +411,7 @@ int daObjYobikusa_c::execute() { setAction(MODE_PICK_LEAF); } - attention_info.distances[fopAc_attn_CARRY_e] = daPy_py_c::i_checkNowWolf() ? 73 : 42; + attention_info.distances[fopAc_attn_CARRY_e] = daPy_py_c::checkNowWolf() ? 73 : 42; callExecute(); } diff --git a/src/d/actor/d_a_obj_zra_freeze.cpp b/src/d/actor/d_a_obj_zra_freeze.cpp index 5d6c178fba..c6c251b832 100644 --- a/src/d/actor/d_a_obj_zra_freeze.cpp +++ b/src/d/actor/d_a_obj_zra_freeze.cpp @@ -148,7 +148,7 @@ int daZraFreeze_c::Execute() { } } else { if (dComIfGp_event_runCheck()) { - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { daPy_getPlayerActorClass()->onWolfEyeKeep(); } else if (field_0x5cf == 1) { dComIfGs_sense_type_change_Set(-1); diff --git a/src/d/actor/d_a_player.cpp b/src/d/actor/d_a_player.cpp index 5c62029ba6..03496e3a84 100644 --- a/src/d/actor/d_a_player.cpp +++ b/src/d/actor/d_a_player.cpp @@ -460,10 +460,6 @@ BOOL daPy_py_c::checkWoodShieldEquip() { return equipShield == fpcNm_ITEM_WOOD_SHIELD || equipShield == fpcNm_ITEM_SHIELD; } -BOOL daPy_py_c::checkNowWolf() { - return dComIfGp_getLinkPlayer()->checkWolf(); -} - /* 8015F3FC-8015F424 159D3C 0028+00 0/0 4/4 3/3 .text getAttentionOffsetY__9daPy_py_cFv */ f32 daPy_py_c::getAttentionOffsetY() { diff --git a/src/d/actor/d_a_scene_exit2.cpp b/src/d/actor/d_a_scene_exit2.cpp index a44dbc10c9..e64936d34d 100644 --- a/src/d/actor/d_a_scene_exit2.cpp +++ b/src/d/actor/d_a_scene_exit2.cpp @@ -88,19 +88,19 @@ void daScExit_c::actionWait() { if (checkArea()) { setAction(ACTION_ORDER_EVENT_e); fopAcM_orderOtherEventId(this, mEventID, mToolID, 0xFFFF, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } /* 8059E408-8059E488 000328 0080+00 1/0 0/0 0/0 .text actionOrderEvent__10daScExit_cFv */ void daScExit_c::actionOrderEvent() { - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { setAction(ACTION_EVENT_e); demoProc(); dComIfGp_setPlayerStatus1(0, 0x4000000); } else { fopAcM_orderOtherEventId(this, mEventID, mToolID, 0xFFFF, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } diff --git a/src/d/actor/d_a_sq.cpp b/src/d/actor/d_a_sq.cpp index f2396d2db2..9dba3c86bb 100644 --- a/src/d/actor/d_a_sq.cpp +++ b/src/d/actor/d_a_sq.cpp @@ -344,7 +344,7 @@ static void action(sq_class* i_this) { break; } - if (i_this->mMessageState == 1 && daPy_py_c::i_checkNowWolf() + if (i_this->mMessageState == 1 && daPy_py_c::checkNowWolf() && i_this->mPlayerDist < 300.0f) { i_this->mAction = sq_class::ACT_MESSAGE; i_this->mMode = 0; @@ -413,10 +413,10 @@ static int message(sq_class* i_this) { i_this->mIsTalking = 1; } - if (i_this->mMessageState == 2 && i_this->mFlowID != -1 && daPy_py_c::i_checkNowWolf()) { + if (i_this->mMessageState == 2 && i_this->mFlowID != -1 && daPy_py_c::checkNowWolf()) { fopAcM_OnStatus(i_this, 0); cLib_onBit(i_this->attention_info.flags, 0xa); - i_this->eventInfo.i_onCondition(1); + i_this->eventInfo.onCondition(1); } else { fopAcM_OffStatus(i_this, 0); cLib_offBit(i_this->attention_info.flags, 0xa); diff --git a/src/d/actor/d_a_swhit0.cpp b/src/d/actor/d_a_swhit0.cpp index 7c0b9d704a..1b635b52ae 100644 --- a/src/d/actor/d_a_swhit0.cpp +++ b/src/d/actor/d_a_swhit0.cpp @@ -243,7 +243,7 @@ void daSwhit0_c::orderEvent() { fopAcM_orderMapToolAutoNextEvent(this, getEvNo(), mEventId, 0xFFFF, 1, 0); } - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } /* 80486ABC-80486BC4 000B3C 0108+00 1/1 0/0 0/0 .text actionOffWait__10daSwhit0_cFv */ @@ -289,7 +289,7 @@ int daSwhit0_c::actionToOnReady() { /* 80486C28-80486CE4 000CA8 00BC+00 1/1 0/0 0/0 .text actionToOnOrder__10daSwhit0_cFv */ int daSwhit0_c::actionToOnOrder() { - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { if (dComIfGp_evmng_isMapToolCamera(getEvNo())) { mReadyTimer = 6; mAction += 2; diff --git a/src/d/actor/d_a_tag_Lv8Gate.cpp b/src/d/actor/d_a_tag_Lv8Gate.cpp index 2c88bfc5eb..72fabec1a1 100644 --- a/src/d/actor/d_a_tag_Lv8Gate.cpp +++ b/src/d/actor/d_a_tag_Lv8Gate.cpp @@ -165,7 +165,7 @@ int daTagLv8Gate_c::execute() { break; } - if (eventInfo.i_checkCommandDemoAccrpt() && mEventID != -1) { + if (eventInfo.checkCommandDemoAccrpt() && mEventID != -1) { if (dComIfGp_evmng_endCheck(mEventID)) { mEventID = -1; } diff --git a/src/d/actor/d_a_tag_TWgate.cpp b/src/d/actor/d_a_tag_TWgate.cpp index bed234c7d6..f303ba1067 100644 --- a/src/d/actor/d_a_tag_TWgate.cpp +++ b/src/d/actor/d_a_tag_TWgate.cpp @@ -212,7 +212,7 @@ void daTagTWGate_c::executeDemoFilone1() { event_manager.cutEnd(staffId); } - if (eventInfo.i_checkCommandDemoAccrpt() && mEventID != -1 && + if (eventInfo.checkCommandDemoAccrpt() && mEventID != -1 && event_manager.endCheck(mEventID)) { mActionID = ACT_DEMO_FILONE_2; @@ -276,7 +276,7 @@ void daTagTWGate_c::executeDemoFilone2() { break; } - if (eventInfo.i_checkCommandDemoAccrpt() && mEventID != -1 && + if (eventInfo.checkCommandDemoAccrpt() && mEventID != -1 && dComIfGp_evmng_endCheck(mEventID)) { dComIfGp_getEvent().reset(); field_0x5e0 = 0; @@ -379,7 +379,7 @@ void daTagTWGate_c::executeDemoFilone3() { break; } - if (eventInfo.i_checkCommandDemoAccrpt() && mEventID != -1 && + if (eventInfo.checkCommandDemoAccrpt() && mEventID != -1 && dComIfGp_evmng_endCheck(mEventID)) { dComIfGp_getEvent().reset(); field_0x5e0 = 0; @@ -544,7 +544,7 @@ void daTagTWGate_c::executeDemoOrdin3() { l_zevParamTbl[mType].mRoomNo, l_zevParamTbl[mType].mLayer); } - int dVar2 = daPy_py_c::i_checkNowWolf() ? 0x2e : 0x4a; + int dVar2 = daPy_py_c::checkNowWolf() ? 0x2e : 0x4a; if (field_0x5e1++ == dVar2) { daPy_py_c* player = daPy_getPlayerActorClass(); cXyz cStack_30; @@ -736,7 +736,7 @@ void daTagTWGate_c::executeDemoRanail3() { l_zevParamTbl[mType].mRoomNo, l_zevParamTbl[mType].mLayer); } - int dVar2 = daPy_py_c::i_checkNowWolf() ? 0x2e : 0x4a; + int dVar2 = daPy_py_c::checkNowWolf() ? 0x2e : 0x4a; if (field_0x5e1++ == dVar2) { daPy_py_c* player = daPy_getPlayerActorClass(); cXyz cStack_30; diff --git a/src/d/actor/d_a_tag_allmato.cpp b/src/d/actor/d_a_tag_allmato.cpp index 4aead0e8b8..cb65f4e502 100644 --- a/src/d/actor/d_a_tag_allmato.cpp +++ b/src/d/actor/d_a_tag_allmato.cpp @@ -78,7 +78,7 @@ int daTag_AllMato_c::Execute() { if (dComIfGp_event_runCheck()) { if (!eventInfo.checkCommandTalk()) { - if (eventInfo.i_checkCommandDemoAccrpt() && dComIfGp_getEventManager().endCheck(mEventIdx)) { + if (eventInfo.checkCommandDemoAccrpt() && dComIfGp_getEventManager().endCheck(mEventIdx)) { u16 evt_action = EVT_NONE; switch (field_0x1d08) { diff --git a/src/d/actor/d_a_tag_attention.cpp b/src/d/actor/d_a_tag_attention.cpp index e4be21f673..6f7871865d 100644 --- a/src/d/actor/d_a_tag_attention.cpp +++ b/src/d/actor/d_a_tag_attention.cpp @@ -69,12 +69,12 @@ int daAttp_c::execute() { case 0: break; case 1: - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { bVar1 = false; } break; case 2: - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { bVar1 = false; } break; @@ -87,12 +87,12 @@ int daAttp_c::execute() { case 0: break; case 1: - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { bVar1 = false; } break; case 2: - if (!daPy_py_c::i_checkNowWolf()) { + if (!daPy_py_c::checkNowWolf()) { bVar1 = false; } break; diff --git a/src/d/actor/d_a_tag_bottle_item.cpp b/src/d/actor/d_a_tag_bottle_item.cpp index 6d94cc4edd..9cd6628ce7 100644 --- a/src/d/actor/d_a_tag_bottle_item.cpp +++ b/src/d/actor/d_a_tag_bottle_item.cpp @@ -118,7 +118,7 @@ s32 daTag_BottleItem_c::chkEvent() { if (!dComIfGp_getEvent().isOrderOK()) { uVar2 = 0; - if (eventInfo.i_checkCommandCatch()) { + if (eventInfo.checkCommandCatch()) { return uVar2; } } @@ -130,7 +130,7 @@ s32 daTag_BottleItem_c::chkEvent() { s32 daTag_BottleItem_c::orderEvent() { makeSoup(); - if (!daPy_py_c::i_checkNowWolf() && mBottleItemType != fpcNm_ITEM_EMPTY_BOTTLE) { + if (!daPy_py_c::checkNowWolf() && mBottleItemType != fpcNm_ITEM_EMPTY_BOTTLE) { attention_info.flags = 0x20000008; } else { attention_info.flags = 0; @@ -139,7 +139,7 @@ s32 daTag_BottleItem_c::orderEvent() { if (attention_info.flags == 0x20000008) { attention_info.distances[fopAc_attn_TALK_e] = fpcNm_ITEM_EMPTY_BOTTLE; attention_info.distances[fopAc_attn_SPEAK_e] = fpcNm_ITEM_EMPTY_BOTTLE; - eventInfo.i_onCondition(dEvtCnd_CANTALK_e); + eventInfo.onCondition(dEvtCnd_CANTALK_e); } return 1; @@ -160,12 +160,12 @@ void daTag_BottleItem_c::makeSoup() { int daTag_BottleItem_c::wait(void* param_0) { switch(mEventType) { case 1: - if (eventInfo.i_checkCommandCatch() == 0){ + if (eventInfo.checkCommandCatch() == 0){ fopAc_ac_c* player = dComIfGp_getPlayer(0); cXyz pos = attention_info.position - player->attention_info.position; dComIfGp_att_CatchRequest(this,mBottleItemType,140.0f,pos.y+100.0f,pos.y-100.0f,0x2000,1); - eventInfo.i_onCondition(0x40); + eventInfo.onCondition(0x40); } case 2: case 0: diff --git a/src/d/actor/d_a_tag_camera.cpp b/src/d/actor/d_a_tag_camera.cpp index f9dc8ed10a..e858603428 100644 --- a/src/d/actor/d_a_tag_camera.cpp +++ b/src/d/actor/d_a_tag_camera.cpp @@ -60,7 +60,7 @@ bool is_player_wear_magneboots() { /* 80489C1C-80489C34 0001FC 0018+00 1/0 0/0 0/0 .text * is_player_wolf__28@unnamed@d_a_tag_camera_cpp@Fv */ bool is_player_wolf() { - return Player->i_checkNowWolf(); + return Player->checkNowWolf(); } /* 80489C34-80489C6C 000214 0038+00 1/0 0/0 0/0 .text diff --git a/src/d/actor/d_a_tag_event.cpp b/src/d/actor/d_a_tag_event.cpp index de867a0e10..9fb84c11aa 100644 --- a/src/d/actor/d_a_tag_event.cpp +++ b/src/d/actor/d_a_tag_event.cpp @@ -145,7 +145,7 @@ int daTag_Event_c::create() { /* 8048B0E4-8048B1B0 000424 00CC+00 1/1 0/0 0/0 .text actionNext__13daTag_Event_cFv */ int daTag_Event_c::actionNext() { - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { mEventIdx = mMapEventIdx; mMapEventIdx = -1; @@ -191,7 +191,7 @@ int daTag_Event_c::actionEvent() { int daTag_Event_c::actionReady() { int swbit = getSwbit(); - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { demoInitProc(); setActio(ACTION_EVENT); actionEvent(); diff --git a/src/d/actor/d_a_tag_evt.cpp b/src/d/actor/d_a_tag_evt.cpp index 14da15ee26..c1262821da 100644 --- a/src/d/actor/d_a_tag_evt.cpp +++ b/src/d/actor/d_a_tag_evt.cpp @@ -57,7 +57,7 @@ int daTag_Evt_c::execute() { bVar = false; int iVar1 = dComIfGp_evmng_getMyStaffId(field_0x568, 0, 0); if (!eventInfo.checkCommandTalk()) { - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { if (dComIfGp_getEventManager().endCheck(field_0x572)) { dComIfGp_event_reset(); field_0x570 = 0; diff --git a/src/d/actor/d_a_tag_evtmsg.cpp b/src/d/actor/d_a_tag_evtmsg.cpp index 95a858e8d6..ead7f1db51 100644 --- a/src/d/actor/d_a_tag_evtmsg.cpp +++ b/src/d/actor/d_a_tag_evtmsg.cpp @@ -120,7 +120,7 @@ int daTag_EvtMsg_c::Execute() { fopAcM_orderOtherEventId(this, mEventID, 0xFF, 0xFFFF, 0, 1); } } else { - eventInfo.i_onCondition(dEvtCnd_CANTALK_e); + eventInfo.onCondition(dEvtCnd_CANTALK_e); fopAcM_orderSpeakEvent(this, 0, 0); } } diff --git a/src/d/actor/d_a_tag_hinit.cpp b/src/d/actor/d_a_tag_hinit.cpp index e05288b3d7..0d84b18514 100644 --- a/src/d/actor/d_a_tag_hinit.cpp +++ b/src/d/actor/d_a_tag_hinit.cpp @@ -52,7 +52,7 @@ int daTagHinit_c::execute() { } daHorse_c* horse = dComIfGp_getHorseActor(); - horse->i_setHorsePosAndAngle(¤t.pos, shape_angle.y); + horse->setHorsePosAndAngle(¤t.pos, shape_angle.y); horse->offNoDrawWait(); fopAcM_delete(this); } diff --git a/src/d/actor/d_a_tag_howl.cpp b/src/d/actor/d_a_tag_howl.cpp index 9ac64899ac..fac811744e 100644 --- a/src/d/actor/d_a_tag_howl.cpp +++ b/src/d/actor/d_a_tag_howl.cpp @@ -47,7 +47,7 @@ u8 daTag_Howl_c::isAreaCheck() { } cXyz vec_to_player = daPy_getPlayerActorClass()->current.pos - current.pos; - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { if (vec_to_player.absXZ() < scale.x && -scale.y < vec_to_player.y && vec_to_player.y < scale.y) { diff --git a/src/d/actor/d_a_tag_hstop.cpp b/src/d/actor/d_a_tag_hstop.cpp index bdb6754ff9..6294635a60 100644 --- a/src/d/actor/d_a_tag_hstop.cpp +++ b/src/d/actor/d_a_tag_hstop.cpp @@ -146,7 +146,7 @@ int daTagHstop_c::execute() { } } else if (field_0x573 == 2 && !dComIfGp_getHorseActor()->checkTurnStand()) { fopAcM_orderSpeakEvent(this, 0, 0); - eventInfo.i_onCondition(dEvtCnd_CANTALK_e); + eventInfo.onCondition(dEvtCnd_CANTALK_e); } } else if (mPrm1 == 2 && !dComIfGp_event_runCheck()) { if (dComIfGs_getArrowNum() == 0 && !dComIfGs_isSwitch(0x8D, fopAcM_GetHomeRoomNo(this))) diff --git a/src/d/actor/d_a_tag_kago_fall.cpp b/src/d/actor/d_a_tag_kago_fall.cpp index 1ce4209ee7..539d6eb828 100644 --- a/src/d/actor/d_a_tag_kago_fall.cpp +++ b/src/d/actor/d_a_tag_kago_fall.cpp @@ -101,7 +101,7 @@ void daTagKagoFall_c::actionWaitRiver() { if (dComIfGp_checkPlayerStatus0(0, 0x100000) && dComIfGs_getLife()) { if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 1, -1, 3); - eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); } else { camera->Stop(); camera->SetTrimSize(3); @@ -208,7 +208,7 @@ void daTagKagoFall_c::actionWaitFall() { } else if (!eventInfo.checkCommandDemoAccrpt()) { mRestartPos = player->current.pos; fopAcM_orderPotentialEvent(this, 1, -1, 0); - eventInfo.i_onCondition(dEvtCnd_CANDEMO_e); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); } else { mDoGph_gInf_c::fadeOut(0.05f, static_cast(g_blackColor)); mTimer = 60; @@ -239,7 +239,7 @@ void daTagKagoFall_c::actionWaitFall() { lin_chk.Set(&player->current.pos, &mRestartPos, NULL); if (dComIfG_Bgsp().LineCross(&lin_chk)) { - mRestartPos.y = lin_chk.i_GetCross().y; + mRestartPos.y = lin_chk.GetCross().y; } } diff --git a/src/d/actor/d_a_tag_kmsg.cpp b/src/d/actor/d_a_tag_kmsg.cpp index 713489a3de..b4551aa624 100644 --- a/src/d/actor/d_a_tag_kmsg.cpp +++ b/src/d/actor/d_a_tag_kmsg.cpp @@ -89,7 +89,7 @@ int daTag_KMsg_c::Execute() { } } if ((getType() == KMSG_TYPE_1 || getType() == KMSG_TYPE_4 || getType() == KMSG_TYPE_5) && - daPy_py_c::i_checkNowWolf()) + daPy_py_c::checkNowWolf()) { attention_info.flags = 0; } @@ -149,7 +149,7 @@ int daTag_KMsg_c::Execute() { } } } else { - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); if (getType() != KMSG_TYPE_1 && daNpcT_chkDoBtnIsSpeak(this)) { if (getChkType() != KMSG_TYPE_0) { dComIfGp_setDoStatusForce(0x80, 2); @@ -198,7 +198,7 @@ int daTag_KMsg_c::Execute() { if (dComIfG_Bgsp().LineCross(&lin_chk)) { cXyz vec48; cXyz vec30 = vec54 - vec60; - vec48 = lin_chk.i_GetCross() + vec30.norm() * 10.0f; + vec48 = lin_chk.GetCross() + vec30.norm() * 10.0f; attention_info.position.x = vec48.x; attention_info.position.z = vec48.z; } diff --git a/src/d/actor/d_a_tag_lantern.cpp b/src/d/actor/d_a_tag_lantern.cpp index a2d14cef6b..c8b7225bf7 100644 --- a/src/d/actor/d_a_tag_lantern.cpp +++ b/src/d/actor/d_a_tag_lantern.cpp @@ -38,7 +38,7 @@ int daTag_Lantern_c::Execute() { } } } else if (field_0x5f8) { - eventInfo.i_onCondition(dEvtCnd_CANTALK_e); + eventInfo.onCondition(dEvtCnd_CANTALK_e); fopAcM_orderSpeakEvent(this, 0, 0); } diff --git a/src/d/actor/d_a_tag_mhint.cpp b/src/d/actor/d_a_tag_mhint.cpp index 6dd9388de3..513be6dbca 100644 --- a/src/d/actor/d_a_tag_mhint.cpp +++ b/src/d/actor/d_a_tag_mhint.cpp @@ -81,7 +81,7 @@ static int daTagMhint_Delete(daTagMhint_c* i_this) { /* 805A5974-805A5AE4 000334 0170+00 1/1 0/0 0/0 .text eventOrder__12daTagMhint_cFv */ void daTagMhint_c::eventOrder() { if (!dComIfGp_event_runCheck()) { - eventInfo.i_onCondition(dEvtCnd_CANTALK_e); + eventInfo.onCondition(dEvtCnd_CANTALK_e); if (!daPy_getPlayerActorClass()->checkPlayerFly() || dComIfGp_checkPlayerStatus0(0, 0x100000)) @@ -129,7 +129,7 @@ int daTagMhint_c::execute() { shape_angle.y = fopAcM_searchPlayerAngleY(this); } - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { if (dComIfGp_evmng_endCheck(mEventID)) { dComIfGp_event_reset(); fopAcM_orderSpeakEvent(this, 3, 0); @@ -178,7 +178,7 @@ int daTagMhint_c::execute() { } } else { if (field_0x570 != 0) { - eventInfo.i_onCondition(dEvtCnd_CANTALK_e); + eventInfo.onCondition(dEvtCnd_CANTALK_e); fopAcM_orderSpeakEvent(this, 3, 0); return 1; } diff --git a/src/d/actor/d_a_tag_msg.cpp b/src/d/actor/d_a_tag_msg.cpp index 4b9f7b355a..6dde5083c2 100644 --- a/src/d/actor/d_a_tag_msg.cpp +++ b/src/d/actor/d_a_tag_msg.cpp @@ -129,7 +129,7 @@ int daTag_Msg_c::execute() { dComIfGp_getEventManager().getEventIdx(this, l_evtNameTBL[mOrderEvtNum], 0xFF); fopAcM_orderOtherEventId(this, mEventIdx, 0xFF, 0xFFFF, 0, 1); } else { - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); field_0x5e4 = 1; } } diff --git a/src/d/actor/d_a_tag_mstop.cpp b/src/d/actor/d_a_tag_mstop.cpp index f24e58fe23..bd1caab91c 100644 --- a/src/d/actor/d_a_tag_mstop.cpp +++ b/src/d/actor/d_a_tag_mstop.cpp @@ -84,7 +84,7 @@ static int daTagMstop_Delete(daTagMstop_c* i_this) { /* 805A63C4-805A63F8 000304 0034+00 1/1 0/0 0/0 .text eventOrder__12daTagMstop_cFv */ void daTagMstop_c::eventOrder() { - eventInfo.i_onCondition(dEvtCnd_CANTALK_e); + eventInfo.onCondition(dEvtCnd_CANTALK_e); fopAcM_orderSpeakEvent(this, 0, 0); } diff --git a/src/d/actor/d_a_tag_mwait.cpp b/src/d/actor/d_a_tag_mwait.cpp index 78375523cc..c403190ac9 100644 --- a/src/d/actor/d_a_tag_mwait.cpp +++ b/src/d/actor/d_a_tag_mwait.cpp @@ -95,13 +95,13 @@ int daTagMwait_c::execute() { } } else if (mEnteredTrigger) { fopAcM_orderSpeakEvent(this, 0, 0); - eventInfo.i_onCondition(dEvtCnd_CANTALK_e); + eventInfo.onCondition(dEvtCnd_CANTALK_e); attention_info.position = midna_p->attention_info.position; eyePos = attention_info.position; } else { mInitMsgFlow = false; - if (daPy_py_c::i_checkNowWolf() && midna_p != NULL && fopAcM_isSwitch(this, mOnSw)) + if (daPy_py_c::checkNowWolf() && midna_p != NULL && fopAcM_isSwitch(this, mOnSw)) { if (mWarpToPos == 1) { midna_p->onTagWaitPosWarp(&mWaitPosition); @@ -130,14 +130,14 @@ int daTagMwait_c::execute() { attention_info.position = midna_p->attention_info.position; eyePos = attention_info.position; fopAcM_orderSpeakEvent(this, 0, 0); - eventInfo.i_onCondition(dEvtCnd_CANTALK_e); + eventInfo.onCondition(dEvtCnd_CANTALK_e); } } else if (field_0x570 > 0.0f && player_dist < field_0x570 && player_p->current.pos.y >= current.pos.y && player_p->current.pos.y <= current.pos.y + scale.y) { attention_info.flags = 2; - eventInfo.i_onCondition(dEvtCnd_CANTALK_e); + eventInfo.onCondition(dEvtCnd_CANTALK_e); } } } diff --git a/src/d/actor/d_a_tag_river_back.cpp b/src/d/actor/d_a_tag_river_back.cpp index fc9f0a9abe..a8d4a72f4a 100644 --- a/src/d/actor/d_a_tag_river_back.cpp +++ b/src/d/actor/d_a_tag_river_back.cpp @@ -102,7 +102,7 @@ void daTagRiverBack_c::actionWait() { mCount = 0; setAction(ACTION_ORDER_EVENT_e); fopAcM_orderOtherEventId(this, mEventID, mMapToolID, 0xFFFF, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } @@ -116,7 +116,7 @@ void daTagRiverBack_c::actionOrderEvent() { demoProc(); } else { fopAcM_orderOtherEventId(this, mEventID, mMapToolID, 0xFFFF, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } } diff --git a/src/d/actor/d_a_tag_ss_drink.cpp b/src/d/actor/d_a_tag_ss_drink.cpp index 0de6badc25..91f374e2a4 100644 --- a/src/d/actor/d_a_tag_ss_drink.cpp +++ b/src/d/actor/d_a_tag_ss_drink.cpp @@ -167,7 +167,7 @@ int daTag_SSDrink_c::chkEvent() { } } return retVal; - } else if (eventInfo.i_checkCommandCatch()) { + } else if (eventInfo.checkCommandCatch()) { if (field_0x5D4 == 0) { if (getParentPtr() != NULL) { ((daMyna_c*)getParentPtr())->onEventFlag(0); @@ -195,7 +195,7 @@ int daTag_SSDrink_c::orderEvent() { if (fopAcM_searchPlayerDistanceXZ(this) <= 160.0f && fopAcM_seenPlayerAngleY() <= 0x2000) { attention_info.distances[fopAc_attn_TALK_e] = 0x9D; attention_info.distances[fopAc_attn_SPEAK_e] = 0x9D; - eventInfo.i_onCondition(1); + eventInfo.onCondition(1); } } @@ -206,7 +206,7 @@ int daTag_SSDrink_c::orderEvent() { int daTag_SSDrink_c::wait(void* param_0) { switch (mEventType) { case 1: - if (!eventInfo.i_checkCommandCatch()) { + if (!eventInfo.checkCommandCatch()) { if (fopAcM_isSwitch(this, getSwitchFromParam())) { if (fopAcM_searchPlayerDistanceXZ(this) <= 160.0f && fopAcM_seenPlayerAngleY() <= 0x2000) @@ -215,7 +215,7 @@ int daTag_SSDrink_c::wait(void* param_0) { cXyz local_28 = attention_info.position - player->attention_info.position; dComIfGp_att_CatchRequest(this, field_0x5D3, 200.0f, local_28.y + 100.0f, local_28.y - 100.0f, 0x4000, 1); - eventInfo.i_onCondition(0x40); + eventInfo.onCondition(0x40); } if (field_0x5D4 != 0) { field_0x5D4 = 0; diff --git a/src/d/actor/d_a_tag_statue_evt.cpp b/src/d/actor/d_a_tag_statue_evt.cpp index 6cc647c539..bad73e1cf3 100644 --- a/src/d/actor/d_a_tag_statue_evt.cpp +++ b/src/d/actor/d_a_tag_statue_evt.cpp @@ -231,13 +231,13 @@ void daTagStatue_c::actionWait() { // Statue is far enough away and player is close enough to the tag for the cutscene to be ordered setAction(ACTION_ORDER_EVENT_e); fopAcM_orderOtherEventId(this, mEventId, mMapToolId, 0xFFFF, 0, 1); - eventInfo.i_onCondition(0x0002); + eventInfo.onCondition(0x0002); } } /* 805A7714-805A77A0 000834 008C+00 1/0 0/0 0/0 .text actionOrderEvent__13daTagStatue_cFv */ void daTagStatue_c::actionOrderEvent() { - if(eventInfo.i_checkCommandDemoAccrpt()) { + if(eventInfo.checkCommandDemoAccrpt()) { // Cutscene order accepted setAction(ACTION_EVENT_e); mDoAud_subBgmStart(Z2BGM_KOMONJO_GET_INTRO); @@ -246,7 +246,7 @@ void daTagStatue_c::actionOrderEvent() { else { // Cutscene order has not been accepted yet, attempt again fopAcM_orderOtherEventId(this, mEventId, mMapToolId, 0xFFFF, 0, 1); - eventInfo.i_onCondition(0x0002); + eventInfo.onCondition(0x0002); } } diff --git a/src/d/actor/d_a_tag_wara_howl.cpp b/src/d/actor/d_a_tag_wara_howl.cpp index a4be9a2718..6444a9922b 100644 --- a/src/d/actor/d_a_tag_wara_howl.cpp +++ b/src/d/actor/d_a_tag_wara_howl.cpp @@ -55,7 +55,7 @@ bool daTagWrHowl_c::chkWlfInTag() { return false; } - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { cXyz player_pos = dComIfGp_getPlayer(0)->current.pos; if (player_pos.abs2(current.pos) < field_0x570) { return true; diff --git a/src/d/actor/d_a_tag_wljump.cpp b/src/d/actor/d_a_tag_wljump.cpp index af57b01111..e32d38ac6a 100644 --- a/src/d/actor/d_a_tag_wljump.cpp +++ b/src/d/actor/d_a_tag_wljump.cpp @@ -124,7 +124,7 @@ int daTagWljump_c::execute() { } } - if (!player->i_checkNowWolf() || !daPy_py_c::i_checkFirstMidnaDemo() || midna->i_checkMidnaTired()) { + if (!player->checkNowWolf() || !daPy_py_c::checkFirstMidnaDemo() || midna->checkMidnaTired()) { return 1; } @@ -190,7 +190,7 @@ int daTagWljump_c::execute() { if (field_0x572 == 0) { if (!dComIfGp_event_runCheck()) { - eventInfo.i_onCondition(dEvtCnd_CANTALK_e); + eventInfo.onCondition(dEvtCnd_CANTALK_e); if (!player->checkPlayerFly() && player->eventInfo.chkCondition(dEvtCnd_CANTALK_e)) { dComIfGp_att_ZHintRequest(this, 0x1FF); diff --git a/src/d/actor/d_a_talk.cpp b/src/d/actor/d_a_talk.cpp index 9eee10556f..97dd9612bd 100644 --- a/src/d/actor/d_a_talk.cpp +++ b/src/d/actor/d_a_talk.cpp @@ -51,7 +51,7 @@ int daTalk_c::execute() { mMessageID = -1; fopAcM_delete(this); } else { - eventInfo.i_onCondition(dEvtCnd_CANTALK_e); + eventInfo.onCondition(dEvtCnd_CANTALK_e); } } diff --git a/src/d/actor/d_a_tbox.cpp b/src/d/actor/d_a_tbox.cpp index ff615de603..bf2b583c0a 100644 --- a/src/d/actor/d_a_tbox.cpp +++ b/src/d/actor/d_a_tbox.cpp @@ -1462,10 +1462,10 @@ int daTbox_c::actionOpenWait() { daMidna_c* midna = daPy_py_c::getMidnaActor(); daPy_py_c* player = daPy_getPlayerActorClass(); - if (eventInfo.i_checkCommandDoor()) { + if (eventInfo.checkCommandDoor()) { dComIfGp_event_onEventFlag(4); - if (getShapeType() != SHAPE_SMALL && player->i_checkNowWolf() && + if (getShapeType() != SHAPE_SMALL && player->checkNowWolf() && !midna->checkMetamorphoseEnable()) { setAction(&daTbox_c::actionNotOpenDemo); mStaffId = dComIfGp_evmng_getMyStaffId(l_staff_name, NULL, 0); @@ -1480,10 +1480,10 @@ int daTbox_c::actionOpenWait() { field_0x9f4 = 0; } } else if (boxCheck()) { - eventInfo.i_onCondition(4); + eventInfo.onCondition(4); if (getShapeType() == SHAPE_SMALL) { eventInfo.setEventName("DEFAULT_TREASURE_SIMPLE"); - } else if (player->i_checkNowWolf() && !midna->checkMetamorphoseEnable()) { + } else if (player->checkNowWolf() && !midna->checkMetamorphoseEnable()) { eventInfo.setEventName("DEFAULT_TREASURE_NOTOPEN"); } else if (getShapeType() == SHAPE_BOSSKEY) { eventInfo.setEventId(field_0x984); @@ -1593,7 +1593,7 @@ void daTbox_c::settingDropDemoCamera() { /* 80494D88-80494E98 004148 0110+00 1/0 0/0 0/0 .text actionSwOnWait__8daTbox_cFv */ int daTbox_c::actionSwOnWait() { - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { setAction(&daTbox_c::actionDemo2); mStaffId = dComIfGp_evmng_getMyStaffId(l_staff_name, NULL, 0); demoProc(); @@ -1603,7 +1603,7 @@ int daTbox_c::actionSwOnWait() { } else { fopAcM_orderOtherEventId(this, mEventId, getEvent(), 0xffff, 0, 1); } - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } return true; @@ -1626,7 +1626,7 @@ int daTbox_c::actionSwOnWait2() { /* 80494F44-80495058 004304 0114+00 1/0 0/0 0/0 .text actionDropWait__8daTbox_cFv */ int daTbox_c::actionDropWait() { - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { setAction(&daTbox_c::actionDropDemo); clrDzb(); field_0x97d = false; @@ -1637,7 +1637,7 @@ int daTbox_c::actionDropWait() { } else if (checkDrop()) { if (mEventId != -1) { fopAcM_orderOtherEventId(this, mEventId, getEvent(), 0xffff, 0, 1); - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); } else { dropProcInitCall(); setAction(&daTbox_c::actionDropDemo); @@ -1650,7 +1650,7 @@ int daTbox_c::actionDropWait() { /* 80495058-8049518C 004418 0134+00 1/0 0/0 0/0 .text actionGenocide__8daTbox_cFv */ int daTbox_c::actionGenocide() { - if (eventInfo.i_checkCommandDemoAccrpt()) { + if (eventInfo.checkCommandDemoAccrpt()) { setAction(&daTbox_c::actionDemo2); mStaffId = dComIfGp_evmng_getMyStaffId(l_staff_name, NULL, 0); demoProc(); @@ -1663,7 +1663,7 @@ int daTbox_c::actionGenocide() { } else { fopAcM_orderOtherEventId(this, mEventId, getEvent(), 0xffff, 0, 1); } - eventInfo.i_onCondition(2); + eventInfo.onCondition(2); dComIfGs_onSwitch(getSwNo(), fopAcM_GetRoomNo(this)); } } diff --git a/src/d/actor/d_a_tbox2.cpp b/src/d/actor/d_a_tbox2.cpp index cbe8910332..d14dc1bff5 100644 --- a/src/d/actor/d_a_tbox2.cpp +++ b/src/d/actor/d_a_tbox2.cpp @@ -379,10 +379,10 @@ void daTbox2_c::actionOpenWait() { daMidna_c* midna_p = (daMidna_c*)daPy_py_c::getMidnaActor(); // cast needed for reg alloc daPy_py_c* player_p = daPy_getPlayerActorClass(); - if (eventInfo.i_checkCommandDoor()) { + if (eventInfo.checkCommandDoor()) { dComIfGp_event_onEventFlag(4); - if (mModelType != TYPE_SMALL_e && daPy_py_c::i_checkNowWolf() && + if (mModelType != TYPE_SMALL_e && daPy_py_c::checkNowWolf() && !midna_p->checkMetamorphoseEnable()) { mStaffIdx = dComIfGp_evmng_getMyStaffId(l_staff_name, NULL, 0); @@ -396,11 +396,11 @@ void daTbox2_c::actionOpenWait() { init_actionOpenDemo(); } } else if (boxCheck()) { - eventInfo.i_onCondition(dEvtCnd_CANDOOR_e); + eventInfo.onCondition(dEvtCnd_CANDOOR_e); if (mModelType == TYPE_SMALL_e) { eventInfo.setEventName("DEFAULT_TREASURE_SIMPLE"); - } else if (daPy_py_c::i_checkNowWolf() && !midna_p->checkMetamorphoseEnable()) { + } else if (daPy_py_c::checkNowWolf() && !midna_p->checkMetamorphoseEnable()) { eventInfo.setEventName("DEFAULT_TREASURE_NOTOPEN"); } else { eventInfo.setEventName("DEFAULT_TREASURE_NORMAL"); diff --git a/src/d/d_bg_s_acch.cpp b/src/d/d_bg_s_acch.cpp index 658ec7c98a..4d57a6bab2 100644 --- a/src/d/d_bg_s_acch.cpp +++ b/src/d/d_bg_s_acch.cpp @@ -265,7 +265,7 @@ void dBgS_Acch::LineCheck(dBgS& i_bgs) { lin_chk.SetExtChk(*this); if (i_bgs.LineCross(&lin_chk)) { - *GetPos() = lin_chk.i_GetCross(); + *GetPos() = lin_chk.GetCross(); OnLineCheckHit(); if (pm_out_poly_info != NULL) @@ -306,7 +306,7 @@ void dBgS_Acch::LineCheck(dBgS& i_bgs) { lin_chk.SetExtChk(*this); if (i_bgs.LineCross(&lin_chk)) { - *GetPos() = lin_chk.i_GetCross(); + *GetPos() = lin_chk.GetCross(); OnLineCheckHit(); if (pm_out_poly_info != NULL) diff --git a/src/d/d_cam_param.cpp b/src/d/d_cam_param.cpp index acd18cf844..483d6041cc 100644 --- a/src/d/d_cam_param.cpp +++ b/src/d/d_cam_param.cpp @@ -282,7 +282,7 @@ bool dCamSetup_c::CheckLatitudeRange(s16* param_0) { /* 80088988-800889B0 0832C8 0028+00 0/0 1/1 0/0 .text PlayerHideDist__11dCamSetup_cFv */ f32 dCamSetup_c::PlayerHideDist() { - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { return 120.0f; } diff --git a/src/d/d_camera.cpp b/src/d/d_camera.cpp index 9a2ddcbc9a..89645f57d8 100644 --- a/src/d/d_camera.cpp +++ b/src/d/d_camera.cpp @@ -884,7 +884,7 @@ void dCamera_c::initialize(camera_class* i_camera, fopAc_ac_c* i_player, u32 i_c specialType[41] = GetCameraTypeFromCameraName("Peep"); field_0x698 = 0xFF; field_0x69c = 0; - field_0x190 = daPy_py_c::i_checkNowWolf() != 0; + field_0x190 = daPy_py_c::checkNowWolf() != 0; mCurMode = 0; field_0x680 = 0; field_0x1ac = 11; @@ -1467,7 +1467,7 @@ bool dCamera_c::Run() { bool bVar9 = false; clrComStat(0x804); int iVar8 = field_0x190; - field_0x190 = daPy_py_c::i_checkNowWolf() ? 1 : 0; + field_0x190 = daPy_py_c::checkNowWolf() ? 1 : 0; mFocusLine.Off(); clrFlag(0x10168C21); clrFlag(0x10); @@ -2744,7 +2744,7 @@ bool dCamera_c::lineBGCheck(cXyz* i_start, cXyz* i_end, cXyz* o_cross, u32 i_fla if (lineBGCheck(i_start, i_end, &lin_chk, i_flags)) { cM3dGPla plane; dComIfG_Bgsp().GetTriPla(lin_chk, &plane); - *o_cross = lin_chk.i_GetCross() + *plane.GetNP(); + *o_cross = lin_chk.GetCross() + *plane.GetNP(); return true; } else { *o_cross = *i_end; @@ -3033,7 +3033,7 @@ BOOL dCamera_c::jutOutCheck(cXyz* param_0, f32 param_1) { cM3dGPla plane; dComIfG_Bgsp().GetTriPla(linchk, &plane); - *param_0 = linchk.i_GetCross(); + *param_0 = linchk.GetCross(); *param_0 += *plane.GetNP() * param_1; return TRUE; } diff --git a/src/d/d_cc_uty.cpp b/src/d/d_cc_uty.cpp index 2038a6a293..4d1ed1429e 100644 --- a/src/d/d_cc_uty.cpp +++ b/src/d/d_cc_uty.cpp @@ -12,10 +12,6 @@ #include "d/d_com_inf_game.h" #include "f_op/f_op_actor_mng.h" -BOOL daPy_py_c::checkNowWolf() { - return dComIfGp_getLinkPlayer()->checkWolf(); -} - /* 803AC418-803AC500 009538 00E8+00 1/1 0/0 0/0 .data plCutLRC */ static int plCutLRC[58] = { 0, // diff --git a/src/d/d_event.cpp b/src/d/d_event.cpp index 10a8a9f04a..e84af99de6 100644 --- a/src/d/d_event.cpp +++ b/src/d/d_event.cpp @@ -243,7 +243,7 @@ int dEvt_control_c::talkCheck(dEvt_order_c* p_order) { (fopAcM_GetName(actor) == PROC_Tag_Mstop && ((daTagMstop_c*)actor)->checkNoAttention()) || fopAcM_GetName(actor) == PROC_MIDNA) { daMidna_c* midna = (daMidna_c*)daPy_py_c::getMidnaActor(); - if (!daPy_py_c::i_checkNowWolf() || midna->checkNoDraw()) { + if (!daPy_py_c::checkNowWolf() || midna->checkNoDraw()) { event = "MHINT_TALK"; } } diff --git a/src/d/d_event_lib.cpp b/src/d/d_event_lib.cpp index 7698c63a1c..11d2dcc36b 100644 --- a/src/d/d_event_lib.cpp +++ b/src/d/d_event_lib.cpp @@ -96,7 +96,7 @@ BOOL dEvLib_callback_c::executeStart() { fopAcM_orderOtherEventId(mActor, mActor->eventInfo.getEventId(), mActor->eventInfo.getMapToolId(), 0xFFFF, 0, _C); } - mActor->eventInfo.i_onCondition(2); + mActor->eventInfo.onCondition(2); return TRUE; } else { return setAction(&l_runAction); @@ -118,4 +118,4 @@ BOOL dEvLib_callback_c::executeRun() { setAction(NULL); return eventEnd(); } -} \ No newline at end of file +} diff --git a/src/d/d_event_manager.cpp b/src/d/d_event_manager.cpp index 007849c247..3bf6302c79 100644 --- a/src/d/d_event_manager.cpp +++ b/src/d/d_event_manager.cpp @@ -9,10 +9,6 @@ #include "d/d_com_inf_game.h" #include "stdio.h" -BOOL daPy_py_c::checkNowWolf() { - return dComIfGp_getLinkPlayer()->checkWolf(); -} - void dEvent_exception_c::init() { mEventInfoIdx = -1; mState = 0; diff --git a/src/d/d_insect.cpp b/src/d/d_insect.cpp index f69f76334a..f99b6af124 100644 --- a/src/d/d_insect.cpp +++ b/src/d/d_insect.cpp @@ -45,7 +45,7 @@ void dInsect_c::Insect_GetDemoMain() { cLib_offBit(attention_info.flags, 0x10); fopAcM_cancelCarryNow(this); fopAcM_orderItemEvent(this, 0, 0); - eventInfo.i_onCondition(dEvtCnd_CANGETITEM_e); + eventInfo.onCondition(dEvtCnd_CANGETITEM_e); m_itemId = fopAcM_createItemForTrBoxDemo(¤t.pos, m_itemNo, -1, fopAcM_GetRoomNo(this), NULL, NULL); @@ -68,7 +68,7 @@ void dInsect_c::Insect_GetDemoMain() { m_mode = 2; } else { fopAcM_orderItemEvent(this, 0, 0); - eventInfo.i_onCondition(dEvtCnd_CANGETITEM_e); + eventInfo.onCondition(dEvtCnd_CANGETITEM_e); } break; case 2: diff --git a/src/d/d_k_wmark.cpp b/src/d/d_k_wmark.cpp index 9033c0de69..b35d0b2703 100644 --- a/src/d/d_k_wmark.cpp +++ b/src/d/d_k_wmark.cpp @@ -48,7 +48,7 @@ int dkWmark_c::create() { return cPhs_ERROR_e; } - if ((int)this->parameters != 3 && daPy_py_c::i_checkNowWolf()) { + if ((int)this->parameters != 3 && daPy_py_c::checkNowWolf()) { mpModel->setBaseScale(wolfFootScale); } diff --git a/src/d/d_kankyo.cpp b/src/d/d_kankyo.cpp index f1a5e76a6f..85c3e4cad4 100644 --- a/src/d/d_kankyo.cpp +++ b/src/d/d_kankyo.cpp @@ -1881,7 +1881,7 @@ void dScnKy_env_light_c::setLight() { dBgS_CamGndChk_Wtr camchk; cXyz chkpos; - if (checkZoraWearFlg() && !daPy_py_c::i_checkNowWolf()) { + if (checkZoraWearFlg() && !daPy_py_c::checkNowWolf()) { dKy_WaterIn_Light_set(); } diff --git a/src/d/d_menu_collect.cpp b/src/d/d_menu_collect.cpp index 60f4928b96..8894daa67a 100644 --- a/src/d/d_menu_collect.cpp +++ b/src/d/d_menu_collect.cpp @@ -72,7 +72,7 @@ dMenu_Collect2D_c::dMenu_Collect2D_c(JKRExpHeap* param_0, STControl* param_1, CS mpStick = param_1; mpCStick = param_2; field_0xc = NULL; - mIsWolf = daPy_py_c::i_checkNowWolf(); + mIsWolf = daPy_py_c::checkNowWolf(); mLinkGlobalCenterPos.set(0.0f, 0.0f, 0.0f); for (int i = 0; i < 2; i++) { field_0x44[i] = 1.0f; @@ -2196,7 +2196,7 @@ void dMenu_Collect2D_c::setItemNameStringNull() { * __ct__17dMenu_Collect3D_cFP10JKRExpHeapP17dMenu_Collect2D_cP10CSTControl */ dMenu_Collect3D_c::dMenu_Collect3D_c(JKRExpHeap* param_0, dMenu_Collect2D_c* param_1, CSTControl* param_2) { - mIsWolf = daPy_py_c::i_checkNowWolf(); + mIsWolf = daPy_py_c::checkNowWolf(); mpHeap = param_0; mpSolidHeap = NULL; mpCStick = param_2; diff --git a/src/d/d_menu_dmap.cpp b/src/d/d_menu_dmap.cpp index 15a7c0f21b..f8dfae59b4 100644 --- a/src/d/d_menu_dmap.cpp +++ b/src/d/d_menu_dmap.cpp @@ -1237,7 +1237,7 @@ void dMenu_Dmap_c::screenInit() { f32 dVar17 = mpDrawBg[0]->mFloorScreen->search('rink')->getBounds().i.y; dVar16 = mpDrawBg[0]->mFloorScreen->search('rink')->getBounds().i.x; mpDrawBg[0]->mFloorScreen->search('wolf')->move(dVar16, dVar17); - if (daPy_py_c::i_checkNowWolf()) { + if (daPy_py_c::checkNowWolf()) { mpDrawBg[0]->mFloorScreen->search('wolf')->show(); mpDrawBg[0]->mFloorScreen->search('rink')->hide(); } else { diff --git a/src/d/d_menu_ring.cpp b/src/d/d_menu_ring.cpp index fff0541c50..9d4793084a 100644 --- a/src/d/d_menu_ring.cpp +++ b/src/d/d_menu_ring.cpp @@ -123,7 +123,7 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i mRingScaleH = 1.0f; mRingScaleV = 1.0f; mRingAlpha = 1.0f; - mPlayerIsWolf = daPy_py_c::i_checkNowWolf(); + mPlayerIsWolf = daPy_py_c::checkNowWolf(); mNameStringID = 0; field_0x63a = 0; field_0x63c = 0; diff --git a/src/d/d_meter2.cpp b/src/d/d_meter2.cpp index 135edcc13e..10af3761da 100644 --- a/src/d/d_meter2.cpp +++ b/src/d/d_meter2.cpp @@ -291,7 +291,7 @@ int dMeter2_c::_execute() { } dMeter2Info_allUseButton(); - i_dMeter2Info_offUseButton(0x800); + dMeter2Info_offUseButton(0x800); dMeter2Info_resetGameStatus(); dComIfGp_setNunStatus(0, 0, 0); dComIfGp_setRemoConStatus(0, 0, 0); diff --git a/src/d/d_msg_flow.cpp b/src/d/d_msg_flow.cpp index 317cfa0c45..b77b802bb8 100644 --- a/src/d/d_msg_flow.cpp +++ b/src/d/d_msg_flow.cpp @@ -711,10 +711,6 @@ int dMsgFlow_c::query001(mesg_flow_node_branch* flow_node, fopAc_ac_c*, int) { return dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[flow_node->params[0] & 0xFFFF]) == false; } -BOOL daPy_py_c::checkNowWolf() { - return dComIfGp_getLinkPlayer()->checkWolf(); -} - /* 8024B180-8024B208 245AC0 0088+00 1/0 0/0 0/0 .text * query002__10dMsgFlow_cFP21mesg_flow_node_branchP10fopAc_ac_ci */ int dMsgFlow_c::query002(mesg_flow_node_branch*, fopAc_ac_c*, int) { diff --git a/src/f_op/f_op_actor_mng.cpp b/src/f_op/f_op_actor_mng.cpp index 515bd3e4e6..1f0da203f7 100644 --- a/src/f_op/f_op_actor_mng.cpp +++ b/src/f_op/f_op_actor_mng.cpp @@ -593,10 +593,6 @@ f32 fopAcM_searchActorDistanceXZ2(const fopAc_ac_c* i_actorA, const fopAc_ac_c* return (*posB - *posA).abs2XZ(); } -BOOL daPy_py_c::checkNowWolf() { - return dComIfGp_getLinkPlayer()->checkWolf(); -} - /* 8001AAE0-8001AC40 015420 0160+00 0/0 0/0 2/2 .text * fopAcM_rollPlayerCrash__FPC10fopAc_ac_cfUlffif */ BOOL fopAcM_rollPlayerCrash(fopAc_ac_c const* i_crashActor, f32 i_range, u32 i_flag, f32 i_max_y,