Move daPy methods into d_a_player headers

This commit is contained in:
LagoLunatic
2025-12-29 13:20:45 -05:00
parent 8651f98984
commit 1c3762cf14
9 changed files with 28 additions and 36 deletions
-5
View File
@@ -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;
+5
View File
@@ -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 */
+4
View File
@@ -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 */
+2 -4
View File
@@ -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;
-10
View File
@@ -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);
}
+1
View File
@@ -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"
+13 -14
View File
@@ -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(&current.pos, &spA0), m34DE) <= 0x6000)
{
} else if (
dComIfGp_getDetect().chk_attention(&spA0) &&
cLib_distanceAngleS(cLib_targetAngleY(&current.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(&current.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(&current.pos, &spA0), m34DE) <= 0x6000) {
sp18 = &spA0;
r28 = true;
}
}
}
} else if (mCurProc == daPyProc_BOTTLE_OPEN_e) {
+2 -2
View File
@@ -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();
+1 -1
View File
@@ -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;