d_a_npc_guard all functions OK (#2849)

* guard about to match

* weak func order messes linking up

* improve executePath
This commit is contained in:
Trueffel 2025-11-23 20:51:19 +01:00 committed by GitHub
parent 24c1bf1723
commit eaf980174f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 569 additions and 910 deletions

View File

@ -2,6 +2,7 @@
#define D_A_NPC_GUARD_H
#include "d/actor/d_a_npc.h"
#include "d/actor/d_a_npc_cd2.h"
/**
* @ingroup actors-npcs
@ -11,9 +12,19 @@
* @details
*
*/
class daNpcGuard_c : public fopAc_ac_c {
class daNpcGuard_c : public daNpcCd2_c {
public:
struct Mode_e {};
typedef void (daNpcGuard_c::*actionFunc)();
enum Mode_e {
/* 0 */ MODE_PATH_e,
/* 1 */ MODE_RUN_e,
/* 2 */ MODE_FIGHT_WAIT_e,
/* 3 */ MODE_FIGHT_STEP_e,
/* 4 */ MODE_FIGHT_MENACE_e,
/* 5 */ MODE_FEAR_e,
/* 6 */ MODE_MAX_e, // Escape
};
/* 809EFE20 */ void setAction(daNpcGuard_c::Mode_e);
/* 809EFE64 */ void callInit();
@ -35,20 +46,46 @@ public:
/* 809F0DD4 */ void setAngle();
/* 809F0DE0 */ void setSpeed(f32, f32, f32*, int);
/* 809F0ED4 */ void pathMoveF();
/* 809F12F0 */ void create();
/* 809F12F0 */ int create();
/* 809F14CC */ void create_init();
/* 809F17D0 */ void setMtx();
/* 809F1878 */ void lookat();
/* 809F1F74 */ ~daNpcGuard_c();
/* 809F2044 */ void execute();
/* 809F1F74 */ virtual ~daNpcGuard_c();
/* 809F2044 */ int execute();
static u8 ActionTable[168];
inline int createHeap();
inline int draw();
inline void setCollision();
inline void initCollision();
u32 getPathID() { return fopAcM_GetParam(this) >> 0x10 & 0xFF; }
static actionFunc ActionTable[7][2];
private:
/* 0x568 */ u8 field_0x568[0xda8 - 0x568];
/* 0xAC8 */ J3DModel* mpModel;
/* 0xACC */ J3DModel* mpModel2;
/* 0xAD0 */ J3DAnmTransformKey* mpAnmKey;
/* 0xAD4 */ J3DAnmTransformKey* mpAnmKey2;
/* 0xAD8 */ PathTrace_c m_path;
/* 0xB00 */ daNpcT_ActorMngr_c mActorMngr;
/* 0xB08 */ daNpcGuard_c::actionFunc* mAction;
/* 0xB0C */ Mode_e mActionIdx;
/* 0xB10 */ Mode_e mPrevActionIdx;
/* 0xB14 */ dCcD_Sph mSpheres[2];
/* 0xD84 */ int mObjNum;
/* 0xD88 */ int field_0xd88;
/* 0xD8C */ f32 field_0xd8c;
/* 0xD90 */ f32 field_0xd90;
/* 0xD94 */ f32 field_0xd94;
/* 0xD98 */ f32 field_0xd98;
/* 0xD9C */ u32 field_0xd9c;
/* 0xDA0 */ s16 field_0xda0;
/* 0xDA2 */ u8 field_0xda2;
/* 0xDA3 */ u8 field_0xda3[0xDA5 - 0xDA3];
/* 0xDA5 */ u8 field_0xda5;
};
STATIC_ASSERT(sizeof(daNpcGuard_c) == 0xda8);
#endif /* D_A_NPC_GUARD_H */

File diff suppressed because it is too large Load Diff