diff options
| author | Trueffel <106771418+Trueffeloot@users.noreply.github.com> | 2025-11-23 20:51:19 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-23 21:51:19 +0200 |
| commit | eaf980174f97ca1ee08df8c93a4459fba9527bad (patch) | |
| tree | dc983fdfd7e365d0a9a58240c24c3e75d7ad75cb /include | |
| parent | 24c1bf1723facc75b841ef68d523573797efb445 (diff) | |
d_a_npc_guard all functions OK (#2849)
* guard about to match
* weak func order messes linking up
* improve executePath
Diffstat (limited to 'include')
| -rw-r--r-- | include/d/actor/d_a_npc_guard.h | 53 |
1 files changed, 45 insertions, 8 deletions
diff --git a/include/d/actor/d_a_npc_guard.h b/include/d/actor/d_a_npc_guard.h index f12753d09f..14f497f99a 100644 --- a/include/d/actor/d_a_npc_guard.h +++ b/include/d/actor/d_a_npc_guard.h @@ -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(); + + inline int createHeap(); + inline int draw(); + inline void setCollision(); + inline void initCollision(); - static u8 ActionTable[168]; + 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 */ |
