diff --git a/include/d/actor/d_a_ks.h b/include/d/actor/d_a_ks.h index b1313ab55..bdf3a89a2 100644 --- a/include/d/actor/d_a_ks.h +++ b/include/d/actor/d_a_ks.h @@ -4,11 +4,6 @@ #include "f_op/f_op_actor.h" #include "c/c_damagereaction.h" -class mDoExt_McaMorf; -class mDoExt_brkAnm; -class mDoExt_btkAnm; -class daPy_lk_c; - class ks_class : public fopEn_enemy_c { public: /* 0x2AC */ request_of_phase_process_class mPhs; diff --git a/include/d/actor/d_a_player.h b/include/d/actor/d_a_player.h index f09701769..868beefa4 100644 --- a/include/d/actor/d_a_player.h +++ b/include/d/actor/d_a_player.h @@ -1,6 +1,7 @@ #ifndef D_A_PLAYER #define D_A_PLAYER +#include "d/d_com_inf_game.h" #include "f_op/f_op_actor.h" #include "d/d_particle.h" #include "d/d_cc_d.h" @@ -598,4 +599,8 @@ public: void stopDoButtonQuake(BOOL); }; // Size: 0x320 +inline daPy_py_c* daPy_getPlayerActorClass() { + return (daPy_py_c*)dComIfGp_getPlayer(0); +} + #endif /* D_A_PLAYER */ diff --git a/include/d/actor/d_a_player_main.h b/include/d/actor/d_a_player_main.h index 058433d77..e05da8899 100644 --- a/include/d/actor/d_a_player_main.h +++ b/include/d/actor/d_a_player_main.h @@ -2343,4 +2343,8 @@ public: static const AnmDataTableEntry mAnmDataTable[]; }; // Size: 0x4C28 +inline daPy_lk_c* daPy_getPlayerLinkActorClass() { + return (daPy_lk_c*)dComIfGp_getLinkPlayer(); +} + #endif /* D_A_PLAYER_MAIN */ diff --git a/include/d/d_attention.h b/include/d/d_attention.h index 12fadfaa2..fdad31613 100644 --- a/include/d/d_attention.h +++ b/include/d/d_attention.h @@ -119,8 +119,6 @@ public: virtual bool execute(u16, J3DTransformInfo*); }; -class daPy_lk_c; - enum AttentionFlags { AttnFlag_00000001 = 0x00000001, AttnFlag_00000002 = 0x00000002, @@ -205,7 +203,7 @@ public: bool LockonTruth(); void Init(fopAc_ac_c* i_owner, u32 i_padNo) { - mpPlayer = (daPy_lk_c*)i_owner; + mpPlayer = i_owner; mPadNo = i_padNo; } @@ -263,7 +261,7 @@ public: void Look2RequestF(fopAc_ac_c* param_1, s16 param_2, int param_3) {mLook[1].requestF(param_1,param_2,param_3);} public: - /* 0x000 */ daPy_lk_c* mpPlayer; + /* 0x000 */ fopAc_ac_c* mpPlayer; /* 0x004 */ fpc_ProcID mLockonTargetID; /* 0x008 */ dAttDraw_CallBack_c mCallBack; /* 0x00C */ int mPadNo; diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index cbe12c69b..c446f978a 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -28,8 +28,6 @@ class dGrass_packet_c; class dTree_packet_c; class dFlower_packet_c; namespace dWood { class Packet_c; }; -class daPy_py_c; -class daPy_lk_c; class daShip_c; class daAgb_c; class camera_class; @@ -2337,10 +2335,6 @@ inline daAgb_c* dComIfGp_getAgb() { return g_dComIfG_gameInfo.play.getAgb(); } -inline daPy_py_c* daPy_getPlayerActorClass() { - return (daPy_py_c*)dComIfGp_getPlayer(0); -} - inline fopAc_ac_c* dComIfGp_getLinkPlayer() { return g_dComIfG_gameInfo.play.getPlayerPtr(0); } @@ -2349,10 +2343,6 @@ inline void dComIfGp_setLinkPlayer(fopAc_ac_c* player) { g_dComIfG_gameInfo.play.setPlayerPtr(0, player); } -inline daPy_lk_c* daPy_getPlayerLinkActorClass() { - return (daPy_lk_c*)dComIfGp_getLinkPlayer(); -} - inline void dComIfGp_setWindowNum(int num) { g_dComIfG_gameInfo.play.setWindowNum(num); } diff --git a/src/d/actor/d_a_himo2.cpp b/src/d/actor/d_a_himo2.cpp index 5c4434b9e..106e62a5c 100644 --- a/src/d/actor/d_a_himo2.cpp +++ b/src/d/actor/d_a_himo2.cpp @@ -5,6 +5,7 @@ #include "d/dolzel.h" // IWYU pragma: keep #include "d/actor/d_a_bk.h" +#include "d/actor/d_a_player_main.h" #include "d/actor/d_a_ykgr.h" #include "d/actor/d_a_himo2.h" #include "d/actor/d_a_btd.h" diff --git a/src/d/actor/d_a_player_main.cpp b/src/d/actor/d_a_player_main.cpp index 4a8b7f45e..2b7d28285 100644 --- a/src/d/actor/d_a_player_main.cpp +++ b/src/d/actor/d_a_player_main.cpp @@ -9073,22 +9073,21 @@ void daPy_lk_c::setNeckAngle() { checkAttentionPosAngle(mpAttnActorZ, &sp18) ) { r28 = true; - } else { - if (dComIfGp_getDetect().chk_attention(&spA0) && - cLib_distanceAngleS(cLib_targetAngleY(¤t.pos, &spA0), m34DE) <= 0x6000) - { + } else if ( + dComIfGp_getDetect().chk_attention(&spA0) && + cLib_distanceAngleS(cLib_targetAngleY(¤t.pos, &spA0), m34DE) <= 0x6000 + ) { + sp18 = &spA0; + r28 = true; + } else if (m34C3 == 10) { + spA0.set( + current.pos.x - 10.0f * (m3730.x + m36B8.x), + 120.0f + current.pos.y, + current.pos.z - 10.0f * (m3730.z + m36B8.z) + ); + if (cLib_distanceAngleS(cLib_targetAngleY(¤t.pos, &spA0), m34DE) <= 0x6000) { sp18 = &spA0; r28 = true; - } else if (m34C3 == 10) { - spA0.set( - current.pos.x - 10.0f * (m3730.x + m36B8.x), - 120.0f + current.pos.y, - current.pos.z - 10.0f * (m3730.z + m36B8.z) - ); - if (cLib_distanceAngleS(cLib_targetAngleY(¤t.pos, &spA0), m34DE) <= 0x6000) { - sp18 = &spA0; - r28 = true; - } } } } else if (mCurProc == daPyProc_BOTTLE_OPEN_e) { diff --git a/src/d/d_attention.cpp b/src/d/d_attention.cpp index d0550559a..0a847bfac 100644 --- a/src/d/d_attention.cpp +++ b/src/d/d_attention.cpp @@ -55,7 +55,7 @@ bool dAttDraw_CallBack_c::execute(u16 timing, J3DTransformInfo* xform) { /* 8009D2E0-8009D654 .text __ct__12dAttention_cFP10fopAc_ac_cUl */ dAttention_c::dAttention_c(fopAc_ac_c* i_player, u32 i_padNo) { - mpPlayer = (daPy_lk_c*)i_player; + mpPlayer = i_player; mPadNo = i_padNo; initList(0xFFFFFFFF); mFlagMask = 0; @@ -848,7 +848,7 @@ void dAttention_c::judgementStatusHd(u32 interactMask) { bool dAttention_c::Run(u32 interactMask) { bool var = dComIfGs_getOptAttentionType() == 0; if (chkFlag(AttnFlag_00000080)) { - mpPlayer = (daPy_lk_c*)dComIfGp_getPlayer(0); + mpPlayer = dComIfGp_getPlayer(0); mPadNo = 0; } runDebugDisp0(); diff --git a/src/d/d_com_inf_game.cpp b/src/d/d_com_inf_game.cpp index e9df273e2..9bde2487d 100644 --- a/src/d/d_com_inf_game.cpp +++ b/src/d/d_com_inf_game.cpp @@ -1138,7 +1138,7 @@ void dComIfGs_setGameStartStage() { {true, dSv_event_flag_c::UNK_0801, "MajyuE", 0, 0}, {true, dSv_event_flag_c::UNK_0808, "MajyuE", 0, 18}, {true, dSv_event_flag_c::UNK_2401, "A_umikz", 0, 204}, - {false, 0, "sea", dIsleRoom_OutsetIsland_e, 128}, + {false, 0, "sea", dIsleRoom_OutsetIsland_e, 128}, }; check_data* data_p = l_checkData;