diff options
| author | hev7 <143887945+hev7@users.noreply.github.com> | 2025-10-26 11:03:16 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-26 13:03:16 +0200 |
| commit | a61d0272a683f99dcfe367ad31310532391cd12a (patch) | |
| tree | 18a476d2c3f82cae650c78b1e562de315452319a /include | |
| parent | 6bd013741b620402bcf46d1b714776db5c366b96 (diff) | |
NPC work, obj_szbridge matching (#2757)
* Some NPC work
* Fix impal
* Hopefully fix regressions in debug
* HIO work for more NPCs
* fix regressions
* obj_szbridge matching
* Fix literals
Diffstat (limited to 'include')
| -rw-r--r-- | include/d/actor/d_a_npc_ash.h | 144 | ||||
| -rw-r--r-- | include/d/actor/d_a_npc_ashB.h | 97 | ||||
| -rw-r--r-- | include/d/actor/d_a_npc_impal.h | 84 | ||||
| -rw-r--r-- | include/d/actor/d_a_npc_lud.h | 35 | ||||
| -rw-r--r-- | include/d/actor/d_a_npc_moi.h | 44 | ||||
| -rw-r--r-- | include/d/actor/d_a_npc_shad.h | 46 | ||||
| -rw-r--r-- | include/d/actor/d_a_npc_shoe.h | 84 | ||||
| -rw-r--r-- | include/d/actor/d_a_npc_the.h | 102 | ||||
| -rw-r--r-- | include/d/actor/d_a_npc_uri.h | 74 | ||||
| -rw-r--r-- | include/d/actor/d_a_obj_szbridge.h | 27 |
10 files changed, 339 insertions, 398 deletions
diff --git a/include/d/actor/d_a_npc_ash.h b/include/d/actor/d_a_npc_ash.h index dc6adcf7b9..d8a892c36a 100644 --- a/include/d/actor/d_a_npc_ash.h +++ b/include/d/actor/d_a_npc_ash.h @@ -3,6 +3,32 @@ #include "d/actor/d_a_npc.h" +struct daNpcAsh_HIOParam { + /* 0x00 */ daNpcF_HIOParam common; +}; + +class daNpcAsh_Param_c { +public: + /* 8095D5D4 */ virtual ~daNpcAsh_Param_c() {} + + static const daNpcAsh_HIOParam m; +}; + +#if DEBUG +class daNpcAsh_HIO_c : public mDoHIO_entry_c { +public: + daNpcAsh_HIO_c(); + + void genMessage(JORMContext*); + + daNpcAsh_HIOParam m; +}; + +#define NPC_ASH_HIO_CLASS daNpcAsh_HIO_c +#else +#define NPC_ASH_HIO_CLASS daNpcAsh_Param_c +#endif + /** * @ingroup actors-npcs * @class daNpcAsh_c @@ -66,28 +92,6 @@ public: /* 0x9 */ MOT_STEP, }; -private: - /* 0xB48 */ Z2Creature mCreatureSound; - /* 0xBD8 */ J3DModel* mModelBow; - /* 0xBDC */ J3DModel* mModelQuiver; - /* 0xBE0 */ daNpcF_MatAnm_c* mpMatAnm; - /* 0xBE4 */ daNpcF_Lookat_c mLookat; - /* 0xC80 */ daNpcF_ActorMngr_c mActorMngr[6]; - /* 0xCB0 */ fopAc_ac_c* mTalkPartner; - /* 0xCB4 */ u32 field_0xcb4; // unused - /* 0xCB8 */ dCcD_Cyl mCcCyl[2]; - /* 0xF30 */ ActionFn mpActionFn; - /* 0xF3C */ request_of_phase_process_class mPhase[2]; - /* 0xF4C */ u32 mItemPartnerId; - /* 0xF50 */ u32 field_0xf50; // unused - /* 0xF54 */ u32 field_0xf54; - /* 0xF58 */ s16 mFlowID; - /* 0xF5A */ s16 mLookMode; - /* 0xF5C */ u16 mMode; - /* 0xF5E */ u8 mMapToolId; - /* 0xF5F */ u8 field_0xf5f; - /* 0xF60 */ u8 mType; - public: /* 809582EC */ daNpcAsh_c(); /* 80958610 */ ~daNpcAsh_c(); @@ -112,23 +116,25 @@ public: /* 8095A8EC */ bool talk(void*); /* 8095AD28 */ bool demo(void*); /* 8095B164 */ bool leave(void*); - /* 8095B48C */ BOOL EvCut_Introduction(int i_staffID); - /* 8095B58C */ BOOL EvCut_Meeting(int i_staffID); - /* 8095B83C */ BOOL EvCut_WiretapSponsor(int i_staffID); - /* 8095BA80 */ BOOL EvCut_WiretapEntrant(int i_staffID); - /* 8095BCF0 */ void setParam(); - /* 8095BF6C */ BOOL main(); - /* 8095C200 */ void playMotion(); - /* 8095C520 */ BOOL ctrlBtk(); - /* 8095C5C4 */ void setAttnPos(); - /* 8095C9BC */ void lookat(); - /* 8095CC8C */ BOOL drawDbgInfo(); + /* 8095B48C */ BOOL EvCut_Introduction(int); + /* 8095B58C */ BOOL EvCut_Meeting(int); + /* 8095B83C */ BOOL EvCut_WiretapSponsor(int); + /* 8095BA80 */ BOOL EvCut_WiretapEntrant(int); + /* 8095BCF0 */ inline void setParam(); + /* 8095BF6C */ inline BOOL main(); + /* 8095C200 */ inline void playMotion(); + /* 8095C520 */ inline BOOL ctrlBtk(); + /* 8095C5C4 */ inline void setAttnPos(); + /* 8095C9BC */ inline void lookat(); + /* 8095CC8C */ inline BOOL drawDbgInfo(); s16 getMessageNo() { return shape_angle.x; } - /* dSv_event_flag_c::F_0268 - City in the Sky - City in the Sky clear */ - bool isMap() { return !(daNpcF_chkEvtBit(0x10c) - /* dSv_event_flag_c::F_0264 - Cutscene - Get master sword */ - || !daNpcF_chkEvtBit(0x108)); } + /* dSv_event_flag_c::F_0268 - City in the Sky - City in the Sky clear */ + bool isMap() { + return !(daNpcF_chkEvtBit(0x10c) + /* dSv_event_flag_c::F_0264 - Cutscene - Get master sword */ + || !daNpcF_chkEvtBit(0x108)); + } inline void setExpressionTalkAfter() { setExpression(7, -1.0f); } inline void setLookMode(int i_lookMode, fopAc_ac_c* i_talkPartner); inline void searchActors(); @@ -137,50 +143,30 @@ public: inline void playExpression(); static EventFn mEvtSeqList[6]; + +private: + /* 0xB48 */ Z2Creature mCreatureSound; + /* 0xBD8 */ J3DModel* mModelBow; + /* 0xBDC */ J3DModel* mModelQuiver; + /* 0xBE0 */ daNpcF_MatAnm_c* mpMatAnm; + /* 0xBE4 */ daNpcF_Lookat_c mLookat; + /* 0xC80 */ daNpcF_ActorMngr_c mActorMngr[6]; + /* 0xCB0 */ fopAc_ac_c* mTalkPartner; + /* 0xCB4 */ NPC_ASH_HIO_CLASS* mpHIO; + /* 0xCB8 */ dCcD_Cyl mCcCyl[2]; + /* 0xF30 */ ActionFn mpActionFn; + /* 0xF3C */ request_of_phase_process_class mPhase[2]; + /* 0xF4C */ u32 mItemPartnerId; + /* 0xF50 */ u32 field_0xf50; // unused + /* 0xF54 */ u32 field_0xf54; + /* 0xF58 */ s16 mFlowID; + /* 0xF5A */ s16 mLookMode; + /* 0xF5C */ u16 mMode; + /* 0xF5E */ u8 mMapToolId; + /* 0xF5F */ u8 field_0xf5f; + /* 0xF60 */ u8 mType; }; STATIC_ASSERT(sizeof(daNpcAsh_c) == 0xF64); -class daNpcAsh_Param_c { -public: - /* 8095D5D4 */ virtual ~daNpcAsh_Param_c() {} - - struct param { - /* 0x00 */ f32 mAttnOffsetY; - /* 0x04 */ f32 mGravity; - /* 0x08 */ f32 mScale; - /* 0x0C */ f32 mShadowDepth; - /* 0x10 */ f32 mCcWeight; - /* 0x14 */ f32 mCylH; - /* 0x18 */ f32 mWallH; - /* 0x1C */ f32 mWallR; - /* 0x20 */ f32 mBodyUpAngle; - /* 0x24 */ f32 mBodyDownAngle; - /* 0x28 */ f32 mBodyLeftAngle; - /* 0x2C */ f32 mBodyRightAngle; - /* 0x30 */ f32 mHeadUpAngle; - /* 0x34 */ f32 mHeadDownAngle; - /* 0x38 */ f32 mHeadLeftAngle; - /* 0x3C */ f32 mHeadRightAngle; - /* 0x40 */ f32 mNeckAngleScl; - /* 0x44 */ f32 mMorfFrames; - /* 0x48 */ s16 mSpeakDistIdx; - /* 0x4A */ s16 mSpeakAngleIdx; - /* 0x4C */ s16 mTalkDistIdx; - /* 0x4E */ s16 mTalkAngleIdx; - /* 0x50 */ f32 mAttnFovY; - /* 0x54 */ f32 mAttnRadius; - /* 0x58 */ f32 mAttnUpperY; - /* 0x5C */ f32 mAttnLowerY; - /* 0x60 */ s16 field_0x60; - /* 0x62 */ s16 mDamageTimer; - /* 0x64 */ s16 mTestExpression; - /* 0x66 */ s16 mTestMotion; - /* 0x68 */ s16 mTestLookMode; - /* 0x6A */ bool mTest; - }; - - static param const m; -}; - #endif /* D_A_NPC_ASH_H */ diff --git a/include/d/actor/d_a_npc_ashB.h b/include/d/actor/d_a_npc_ashB.h index a8c7e521a4..7572cd829d 100644 --- a/include/d/actor/d_a_npc_ashB.h +++ b/include/d/actor/d_a_npc_ashB.h @@ -3,6 +3,33 @@ #include "d/actor/d_a_npc.h" +struct daNpcAshB_HIOParam { + /* 0x00 */ daNpcF_HIOParam common; + /* 0x6C */ f32 field_0x6c; +}; + +class daNpcAshB_Param_c { +public: + /* 80962078 */ virtual ~daNpcAshB_Param_c() {} + + static const daNpcAshB_HIOParam m; +}; + +#if DEBUG +class daNpcAshB_HIO_c : public mDoHIO_entry_c { +public: + daNpcAshB_HIO_c(); + + void genMessage(JORMContext*); + + daNpcAshB_HIOParam m; +}; + +#define NPC_ASHB_HIO_CLASS daNpcAshB_HIO_c +#else +#define NPC_ASHB_HIO_CLASS daNpcAshB_Param_c +#endif + /** * @ingroup actors-npcs * @class daNpcAshB_c @@ -92,31 +119,31 @@ public: /* 8095FD9C */ bool talk(void*); /* 809602E0 */ bool demo(void*); /* 809604C8 */ BOOL EvCut_Appear(int); - /* 80960A60 */ void setParam(); - /* 80960AE8 */ BOOL main(); - /* 80960D64 */ void playMotion(); - /* 80961188 */ BOOL ctrlBtk(); - /* 80961264 */ void setAttnPos(); - /* 80961574 */ void lookat(); - /* 80961770 */ void drawOtherMdls(); - /* 809617F8 */ BOOL drawDbgInfo(); - - static EventFn mEvtSeqList[2]; - - s16 getMessageNo() { return (fopAcM_GetParam(this) >> 8) & 0xFFFF;} + /* 80960A60 */ inline void setParam(); + /* 80960AE8 */ inline BOOL main(); + /* 80960D64 */ inline void playMotion(); + /* 80961188 */ inline BOOL ctrlBtk(); + /* 80961264 */ inline void setAttnPos(); + /* 80961574 */ inline void lookat(); + /* 80961770 */ inline void drawOtherMdls(); + /* 809617F8 */ inline BOOL drawDbgInfo(); + + s16 getMessageNo() { return (fopAcM_GetParam(this) >> 8) & 0xFFFF; } inline void setExpressionTalkAfter() { setExpression(6, -1.0f); } inline void setLookMode(int i_lookMode); inline BOOL chkFindPlayer(); inline bool step(s16, int, f32); inline void playExpression(); + static EventFn mEvtSeqList[2]; + private: /* 0xB48 */ Z2Creature mCreatureSound; /* 0xBD8 */ daNpcF_MatAnm_c* mpMatAnm; /* 0xBDC */ J3DModel* mpModel; /* 0xBE0 */ daNpcF_Lookat_c mLookat; /* 0xC7C */ daNpcF_ActorMngr_c mActorMngr[1]; - /* 0xC84 */ fopAc_ac_c* mpTalkPartner; + /* 0xC84 */ NPC_ASHB_HIO_CLASS* mpHIO; /* 0xC88 */ dCcD_Cyl mCyl; /* 0xDC4 */ ActionFn mpActionFn; /* 0xDD0 */ request_of_phase_process_class mPhase[1]; @@ -130,52 +157,8 @@ private: /* 0xDEC */ u8 field_0xdec; /* 0xDED */ u8 field_0xded; /* 0xDEE */ u8 field_0xdee; - }; STATIC_ASSERT(sizeof(daNpcAshB_c) == 0xdf0); -class daNpcAshB_Param_c { -public: - /* 80962078 */ virtual ~daNpcAshB_Param_c() {} - - struct param { - /* 0x00 */ f32 mAttnOffsetY; - /* 0x04 */ f32 mGravity; - /* 0x08 */ f32 mScale; - /* 0x0C */ f32 mShadowDepth; - /* 0x10 */ f32 mCcWeight; - /* 0x14 */ f32 mCylH; - /* 0x18 */ f32 mWallH; - /* 0x1C */ f32 mWallR; - /* 0x20 */ f32 mBodyUpAngle; - /* 0x24 */ f32 mBodyDownAngle; - /* 0x28 */ f32 mBodyLeftAngle; - /* 0x2C */ f32 mBodyRightAngle; - /* 0x30 */ f32 mHeadUpAngle; - /* 0x34 */ f32 mHeadDownAngle; - /* 0x38 */ f32 mHeadLeftAngle; - /* 0x3C */ f32 mHeadRightAngle; - /* 0x40 */ f32 mNeckAngleScl; - /* 0x44 */ f32 mMorfFrames; - /* 0x48 */ s16 mSpeakDistIdx; - /* 0x4A */ s16 mSpeakAngleIdx; - /* 0x4C */ s16 mTalkDistIdx; - /* 0x4E */ s16 mTalkAngleIdx; - /* 0x50 */ f32 mAttnFovY; - /* 0x54 */ f32 mAttnRadius; - /* 0x58 */ f32 mAttnUpperY; - /* 0x5C */ f32 mAttnLowerY; - /* 0x60 */ s16 field_0x60; - /* 0x62 */ s16 mDamageTimer; - /* 0x64 */ s16 mTestExpression; - /* 0x66 */ s16 mTestMotion; - /* 0x68 */ s16 mTestLookMode; - /* 0x6A */ bool mTest; - /* 0x6C */ f32 field_0x6c; - }; - - static param const m; -}; - #endif /* D_A_NPC_ASHB_H */ diff --git a/include/d/actor/d_a_npc_impal.h b/include/d/actor/d_a_npc_impal.h index b07fc773d9..cf273ad585 100644 --- a/include/d/actor/d_a_npc_impal.h +++ b/include/d/actor/d_a_npc_impal.h @@ -3,6 +3,33 @@ #include "d/actor/d_a_npc.h" +struct daNpcImpal_HIOParam { + /* 0x00 */ daNpcF_HIOParam common; + /* 0x6C */ f32 field_0x6c; +}; + +class daNpcImpal_Param_c { +public: + /* 80A0C204 */ virtual ~daNpcImpal_Param_c() {} + + static const daNpcImpal_HIOParam m; +}; + +#if DEBUG +class daNpcImpal_HIO_c : public mDoHIO_entry_c { +public: + daNpcImpal_HIO_c(); + + void genMessage(JORMContext*); + + daNpcImpal_HIOParam m; +}; + +#define NPC_IMPAL_HIO_CLASS daNpcImpal_HIO_c +#else +#define NPC_IMPAL_HIO_CLASS daNpcImpal_Param_c +#endif + /** * @ingroup actors-npcs * @class daNpcImpal_c @@ -77,12 +104,12 @@ public: /* 80A0A1E0 */ BOOL EvCut_ImpalAppear1(int); /* 80A0A680 */ BOOL EvCut_ImpalAppear2(int); /* 80A0A950 */ BOOL EvCut_CopyRod(int); - /* 80A0ADF8 */ void setParam(); - /* 80A0AEA8 */ BOOL main(); - /* 80A0B380 */ BOOL ctrlBtk(); - /* 80A0B45C */ void setAttnPos(); - /* 80A0B76C */ void lookat(); - /* 80A0B94C */ BOOL drawDbgInfo(); + /* 80A0ADF8 */ inline void setParam(); + /* 80A0AEA8 */ inline BOOL main(); + /* 80A0B380 */ inline BOOL ctrlBtk(); + /* 80A0B45C */ inline void setAttnPos(); + /* 80A0B76C */ inline void lookat(); + /* 80A0B94C */ inline BOOL drawDbgInfo(); s16 getMessageNo() { return shape_angle.x; } u8 getSwitchNo() { return (fopAcM_GetParam(this) >> 8) & 0xFF; } @@ -101,7 +128,7 @@ private: /* 0xBD8 */ daNpcF_MatAnm_c* mpMatAnm; /* 0xBDC */ daNpcF_Lookat_c mLookat; /* 0xC78 */ daNpcF_ActorMngr_c mActorMngr[1]; - /* 0xC80 */ fopAc_ac_c* mpTalkPartner; + /* 0xC80 */ NPC_IMPAL_HIO_CLASS* mpHIO; /* 0xC84 */ dCcD_Cyl mCyl; /* 0xDC0 */ actionFunc mpActionFn; /* 0xDCC */ request_of_phase_process_class mPhase[1]; @@ -118,47 +145,4 @@ private: STATIC_ASSERT(sizeof(daNpcImpal_c) == 0xdec); -struct daNpc_Impal_HIOParam { - /* 0x00 */ f32 mAttnOffsetY; - /* 0x04 */ f32 mGravity; - /* 0x08 */ f32 mScale; - /* 0x0C */ f32 mShadowDepth; - /* 0x10 */ f32 mCcWeight; - /* 0x14 */ f32 mCylH; - /* 0x18 */ f32 mWallH; - /* 0x1C */ f32 mWallR; - /* 0x20 */ f32 mBodyUpAngle; - /* 0x24 */ f32 mBodyDownAngle; - /* 0x28 */ f32 mBodyLeftAngle; - /* 0x2C */ f32 mBodyRightAngle; - /* 0x30 */ f32 mHeadUpAngle; - /* 0x34 */ f32 mHeadDownAngle; - /* 0x38 */ f32 mHeadLeftAngle; - /* 0x3C */ f32 mHeadRightAngle; - /* 0x40 */ f32 mNeckAngleScl; - /* 0x44 */ f32 mMorfFrames; - /* 0x48 */ s16 mSpeakDistIdx; - /* 0x4A */ s16 mSpeakAngleIdx; - /* 0x4C */ s16 mTalkDistIdx; - /* 0x4E */ s16 mTalkAngleIdx; - /* 0x50 */ f32 mAttnFovY; - /* 0x54 */ f32 mAttnRadius; - /* 0x58 */ f32 mAttnUpperY; - /* 0x5C */ f32 mAttnLowerY; - /* 0x60 */ s16 field_0x60; - /* 0x62 */ s16 mDamageTimer; - /* 0x64 */ s16 mTestExpression; - /* 0x66 */ s16 mTestMotion; - /* 0x68 */ s16 mTestLookMode; - /* 0x6A */ bool mTest; - /* 0x6C */ f32 field_0x6c; -}; - -class daNpcImpal_Param_c { -public: - /* 80A0C204 */ virtual ~daNpcImpal_Param_c() {} - - static daNpc_Impal_HIOParam const m; -}; - #endif /* D_A_NPC_IMPAL_H */ diff --git a/include/d/actor/d_a_npc_lud.h b/include/d/actor/d_a_npc_lud.h index 1bea412e64..f70d1b6352 100644 --- a/include/d/actor/d_a_npc_lud.h +++ b/include/d/actor/d_a_npc_lud.h @@ -3,15 +3,6 @@ #include "d/actor/d_a_npc.h" -/** - * @ingroup actors-npcs - * @class daNpc_Lud_c - * @brief Luda - * - * @details - * - */ - struct daNpc_Lud_HIOParam { /* 0x00 */ daNpcT_HIOParam common; /* 0x8C */ f32 play_speed; @@ -24,6 +15,30 @@ public: static const daNpc_Lud_HIOParam m; }; +#if DEBUG +class daNpc_Lud_HIO_c : public mDoHIO_entry_c { +public: + daNpc_Lud_HIO_c(); + + void listenPropertyEvent(const JORPropertyEvent*); + void genMessage(JORMContext*); + + daNpc_Lud_HIOParam m; +}; + +#define NPC_LUD_HIO_CLASS daNpc_Lud_HIO_c +#else +#define NPC_LUD_HIO_CLASS daNpc_Lud_Param_c +#endif + +/** + * @ingroup actors-npcs + * @class daNpc_Lud_c + * @brief Luda + * + * @details + * + */ class daNpc_Lud_c : public daNpcT_c { public: typedef int (daNpc_Lud_c::*actionFunc)(void*); @@ -101,7 +116,7 @@ public: private: /* 0xE40 */ mDoExt_McaMorfSO* mpBowlMorf; - /* 0xE44 */ u8 field_0xe44[0xe48 - 0xe44]; + /* 0xE44 */ NPC_LUD_HIO_CLASS* mpHIO; /* 0xE48 */ J3DModel* mpModel[2]; /* 0xE50 */ dCcD_Cyl mCyl; /* 0xF8C */ u8 mType; diff --git a/include/d/actor/d_a_npc_moi.h b/include/d/actor/d_a_npc_moi.h index 5b15e11aa4..5b7e07abc9 100644 --- a/include/d/actor/d_a_npc_moi.h +++ b/include/d/actor/d_a_npc_moi.h @@ -3,18 +3,11 @@ #include "d/actor/d_a_npc.h" -/** - * @ingroup actors-npcs - * @class daNpc_Moi_c - * @brief Rusl - * - * @details - * - */ - struct daNpc_Moi_HIOParam { /* 0x00 */ daNpcT_HIOParam common; - /* 0x8C */ u8 field_0x70[12]; + /* 0x8C */ f32 field_0x8c; + /* 0x90 */ f32 field_0x90; + /* 0x94 */ f32 field_0x94; /* 0x98 */ s16 field_0x98; /* 0x9A */ s16 field_0x9a; /* 0x9C */ s16 field_0x9c; @@ -22,7 +15,9 @@ struct daNpc_Moi_HIOParam { /* 0xA0 */ s16 field_0xa0; /* 0xA2 */ s16 field_0xa2; /* 0xA4 */ f32 field_0xa4; - /* 0xA8 */ u8 field_0xa8[12]; + /* 0xA8 */ f32 field_0xa8; + /* 0xAC */ f32 field_0xac; + /* 0xB0 */ f32 field_0xb0; /* 0xB4 */ f32 field_0xb4; /* 0xB8 */ f32 field_0xb8; }; @@ -34,15 +29,30 @@ public: static const daNpc_Moi_HIOParam m; }; -class daNpc_Moi_HIO_c -#ifdef DEBUG - : public mDoHIO_entry_c -#endif -{ +#if DEBUG +class daNpc_Moi_HIO_c : public mDoHIO_entry_c { public: + daNpc_Moi_HIO_c(); + + void listenPropertyEvent(const JORPropertyEvent*); void genMessage(JORMContext*); + + daNpc_Moi_HIOParam m; }; +#define NPC_MOI_HIO_CLASS daNpc_Moi_HIO_c +#else +#define NPC_MOI_HIO_CLASS daNpc_Moi_Param_c +#endif + +/** + * @ingroup actors-npcs + * @class daNpc_Moi_c + * @brief Rusl + * + * @details + * + */ class daNpc_Moi_c : public daNpcT_c { public: typedef int (daNpc_Moi_c::*cutFunc)(int); @@ -152,7 +162,7 @@ public: static cutFunc mCutList[5]; private: - /* 0x0E40 */ daNpc_Moi_HIO_c* field_0xe40; + /* 0x0E40 */ NPC_MOI_HIO_CLASS* mpHIO; /* 0x0E44 */ J3DModel* mpModel[6]; /* 0x0E5C */ dCcD_Cyl mCyl[4]; /* 0x134C */ dCcD_Cyl mCyl2; diff --git a/include/d/actor/d_a_npc_shad.h b/include/d/actor/d_a_npc_shad.h index 6cea0c52d2..17852f4d62 100644 --- a/include/d/actor/d_a_npc_shad.h +++ b/include/d/actor/d_a_npc_shad.h @@ -3,31 +3,41 @@ #include "d/actor/d_a_npc.h" -/** - * @ingroup actors-npcs - * @class daNpcShad_c - * @brief Shad - * - * @details - * -*/ - struct daNpcShad_HIOParam { /* 0x00 */ daNpcF_HIOParam common; - /* 0x6C */ f32 traveling_speed; // 走行速度 (Traveling Speed) + /* 0x6C */ f32 traveling_speed; // 走行速度 (Traveling Speed) }; -class daNpcShad_Param_c: public JORReflexible { +class daNpcShad_Param_c : public JORReflexible { public: /* 80AE1F70 */ virtual ~daNpcShad_Param_c() {} -#ifdef DEBUG + static const daNpcShad_HIOParam m; +}; + +#if DEBUG +class daNpcShad_HIO_c : public mDoHIO_entry_c { +public: + daNpcShad_HIO_c(); + void genMessage(JORMContext*); -#endif - static const daNpcShad_HIOParam m; + daNpcShad_HIOParam m; }; +#define NPC_SHAD_HIO_CLASS daNpcShad_HIO_c +#else +#define NPC_SHAD_HIO_CLASS daNpcShad_Param_c +#endif + +/** + * @ingroup actors-npcs + * @class daNpcShad_c + * @brief Shad + * + * @details + * + */ class daNpcShad_c : public daNpcF_c { public: typedef bool (daNpcShad_c::*ActionFn)(void*); @@ -219,8 +229,10 @@ public: mActorMngr[4].entry(getEvtAreaTagP(17, 0)); } } else if (mMode == 1 - /* dSv_event_flag_c::F_0302 - Kakariko Village - Saw cutscene of Shad casting spells underneat Kakariko Village */ - && daNpcF_chkEvtBit(0x12E) && mActorMngr[4].getActorP() == NULL) { + /* dSv_event_flag_c::F_0302 - Kakariko Village - Saw cutscene of Shad casting + spells underneat Kakariko Village */ + && daNpcF_chkEvtBit(0x12E) && mActorMngr[4].getActorP() == NULL) + { mActorMngr[4].entry(getEvtAreaTagP(18, 0)); } } @@ -233,7 +245,7 @@ private: /* 0xBE4 */ daNpcF_Lookat_c mLookat; /* 0xC80 */ daNpcF_ActorMngr_c mActorMngr[5]; /* 0xCA8 */ daPy_py_c* field_0xca8; - /* 0xCAC */ u8 field_0xcac[0xcb0 - 0xcac]; + /* 0xCAC */ NPC_SHAD_HIO_CLASS* mpHIO; /* 0xCB0 */ dCcD_Cyl field_0xcb0; /* 0xDEC */ ActionFn mActionFn; /* 0xDF8 */ request_of_phase_process_class mPhases[2]; diff --git a/include/d/actor/d_a_npc_shoe.h b/include/d/actor/d_a_npc_shoe.h index 4d85ebd797..c894263a12 100644 --- a/include/d/actor/d_a_npc_shoe.h +++ b/include/d/actor/d_a_npc_shoe.h @@ -3,6 +3,34 @@ #include "d/actor/d_a_npc.h" +struct daNpcShoe_HIOParam { + /* 0x00 */ daNpcF_HIOParam common; +}; + +class daNpcShoe_Param_c { +public: + /* 80AEA344 */ virtual ~daNpcShoe_Param_c() {} + + static const daNpcShoe_HIOParam m; +}; + +STATIC_ASSERT(sizeof(daNpcShoe_Param_c::m) == 0x6C); + +#if DEBUG +class daNpcShoe_HIO_c : public mDoHIO_entry_c { +public: + daNpcShoe_HIO_c(); + + void genMessage(JORMContext*); + + daNpcShoe_HIOParam m; +}; + +#define NPC_SHOE_HIO_CLASS daNpcShoe_HIO_c +#else +#define NPC_SHOE_HIO_CLASS daNpcShoe_Param_c +#endif + /** * @ingroup actors-npcs * @class daNpcShoe_c @@ -52,10 +80,10 @@ public: /* 80AE92E8 */ void setParam(); /* 80AE93A0 */ BOOL main(); /* 80AE9624 */ void setAttnPos(); - /* 80AE9820 */ void lookat(); + /* 80AE9820 */ inline void lookat(); /* 80AE9A00 */ void setMotionAnm(int, f32); - /* 80AE9AD0 */ BOOL drawDbgInfo(); - /* 80AEA340 */ void adjustShapeAngle(); + /* 80AE9AD0 */ inline BOOL drawDbgInfo(); + /* 80AEA340 */ inline void adjustShapeAngle(); s16 getMessageNo() { return fopAcM_GetParam(this) >> 0x10; } @@ -83,7 +111,7 @@ public: inline void playMotion(); static EventFn mEvtSeqList[1]; - + private: /* 0xB48 */ J3DModel* mpModel1; /* 0xB4C */ J3DModel* mpModel2; @@ -91,7 +119,7 @@ private: /* 0xBF4 */ u8 field_0xbf4[0xbf8 - 0xbf4]; /* 0xBF8 */ daNpcF_Lookat_c mLookat; /* 0xC94 */ daNpcF_ActorMngr_c mActorMngr[1]; - /* 0xC9C */ u8 field_0xc9c[0xca0 - 0xc9c]; + /* 0xC9C */ NPC_SHOE_HIO_CLASS* mpHIO; /* 0xCA0 */ dCcD_Cyl mCcCyl; /* 0xDDC */ actionFunc mpActionFn; /* 0xDE8 */ request_of_phase_process_class mPhases[3]; @@ -105,53 +133,9 @@ private: /* 0xE16 */ u16 field_0xe16; /* 0xE18 */ u16 mMode; /* 0xE1A */ u8 field_0xe1a; - /* 0xE1B */ u8 field_0xe1b; // Probably isDaytime or isNighttime + /* 0xE1B */ u8 field_0xe1b; // Probably isDaytime or isNighttime }; STATIC_ASSERT(sizeof(daNpcShoe_c) == 0xe1c); -class daNpcShoe_Param_c { -public: - /* 8095D5D4 */ virtual ~daNpcShoe_Param_c() {} - - struct param { - /* 0x00 */ f32 mAttnOffsetY; - /* 0x04 */ f32 mGravity; - /* 0x08 */ f32 mScale; - /* 0x0C */ f32 mShadowDepth; - /* 0x10 */ f32 mCcWeight; - /* 0x14 */ f32 mCylH; - /* 0x18 */ f32 mWallH; - /* 0x1C */ f32 mWallR; - /* 0x20 */ f32 mBodyUpAngle; - /* 0x24 */ f32 mBodyDownAngle; - /* 0x28 */ f32 mBodyLeftAngle; - /* 0x2C */ f32 mBodyRightAngle; - /* 0x30 */ f32 mHeadUpAngle; - /* 0x34 */ f32 mHeadDownAngle; - /* 0x38 */ f32 mHeadLeftAngle; - /* 0x3C */ f32 mHeadRightAngle; - /* 0x40 */ f32 mNeckAngleScl; - /* 0x44 */ f32 mMorfFrames; - /* 0x48 */ s16 mSpeakDistIdx; - /* 0x4A */ s16 mSpeakAngleIdx; - /* 0x4C */ s16 mTalkDistIdx; - /* 0x4E */ s16 mTalkAngleIdx; - /* 0x50 */ f32 mAttnFovY; - /* 0x54 */ f32 mAttnRadius; - /* 0x58 */ f32 mAttnUpperY; - /* 0x5C */ f32 mAttnLowerY; - /* 0x60 */ s16 field_0x60; - /* 0x62 */ s16 mDamageTimer; - /* 0x64 */ s16 mTestExpression; - /* 0x66 */ s16 mTestMotion; - /* 0x68 */ s16 mTestLookMode; - /* 0x6A */ bool mTest; - }; - - static param const m; -}; - -STATIC_ASSERT(sizeof(daNpcShoe_Param_c::param) == 0x6C); - #endif /* D_A_NPC_SHOE_H */ diff --git a/include/d/actor/d_a_npc_the.h b/include/d/actor/d_a_npc_the.h index 7b0adb1280..437af22484 100644 --- a/include/d/actor/d_a_npc_the.h +++ b/include/d/actor/d_a_npc_the.h @@ -3,6 +3,35 @@ #include "d/actor/d_a_npc.h" +struct daNpcThe_HIOParam { + /* 0x00 */ daNpcF_HIOParam common; +}; + +class daNpcThe_Param_c { +public: + /* 80AFBDA0 */ virtual ~daNpcThe_Param_c() {} + + static const daNpcThe_HIOParam m; +}; + +STATIC_ASSERT(sizeof(daNpcThe_Param_c::m) == 0x6C); + +#if DEBUG +class daNpcThe_HIO_c : public mDoHIO_entry_c { +public: + daNpcThe_HIO_c(); + + void listenPropertyEvent(const JORPropertyEvent*); + void genMessage(JORMContext*); + + daNpcThe_HIOParam m; +}; + +#define NPC_THE_HIO_CLASS daNpcThe_HIO_c +#else +#define NPC_THE_HIO_CLASS daNpcThe_Param_c +#endif + /** * @ingroup actors-npcs * @class daNpcThe_c @@ -103,16 +132,16 @@ public: /* 80AF9358 */ cPhs__Step create(); /* 80AF9748 */ void reset(); /* inline */ inline int Draw(); - /* 80AF99F4 */ void setParam(); - /* 80AF9CF0 */ BOOL main(); - /* 80AF9F94 */ void playMotion(); - /* 80AFA338 */ void playExpression(); + /* 80AF99F4 */ inline void setParam(); + /* 80AF9CF0 */ inline BOOL main(); + /* 80AF9F94 */ inline void playMotion(); + /* 80AFA338 */ inline void playExpression(); /* inline */ inline void setExpressionTalkAfter(); - /* 80AFA6CC */ BOOL doEvent(); - /* 80AFADEC */ BOOL ctrlBtk(); - /* 80AFAEC8 */ void setAttnPos(); - /* 80AFB1C4 */ void lookat(); - /* 80AFB488 */ BOOL drawDbgInfo(); + /* 80AFA6CC */ inline BOOL doEvent(); + /* 80AFADEC */ inline BOOL ctrlBtk(); + /* 80AFAEC8 */ inline void setAttnPos(); + /* 80AFB1C4 */ inline void lookat(); + /* 80AFB488 */ inline BOOL drawDbgInfo(); /* 80AFBD9C */ void adjustShapeAngle() {} u8 getTypeFromParam() { @@ -143,16 +172,15 @@ public: } bool isSneaking() { - if (!strcmp(dComIfGp_getStartStageName(), "R_SP116") && dComIfGp_getStartStageRoomNo() == 5 - && dComIfG_play_c::getLayerNo(0) == 2) { + if (!strcmp(dComIfGp_getStartStageName(), "R_SP116") && + dComIfGp_getStartStageRoomNo() == 5 && dComIfG_play_c::getLayerNo(0) == 2) + { return true; } return false; } - bool chkAction(ActionFn action) { - return mpActionFn == action; - } + bool chkAction(ActionFn action) { return mpActionFn == action; } BOOL setAction(ActionFn action) { if (mpActionFn != NULL) { @@ -184,7 +212,7 @@ private: /* 0xBD8 */ daNpcF_MatAnm_c* mpMatAnm; /* 0xBDC */ daNpcF_Lookat_c mLookat; /* 0xC78 */ daNpcF_ActorMngr_c mActorMngr[3]; - /* 0xC90 */ u8 field_0xc90[4]; + /* 0xC90 */ NPC_THE_HIO_CLASS* mpHIO; /* 0xC94 */ dCcD_Cyl mColCyl; /* 0xDD0 */ ActionFn mpNextActionFn; /* 0xDDC */ ActionFn mpActionFn; @@ -208,48 +236,4 @@ private: STATIC_ASSERT(sizeof(daNpcThe_c) == 0xE20); -class daNpcThe_Param_c { -public: - struct param { - /* 0x00 */ f32 mAttnOffsetY; - /* 0x04 */ f32 mGravity; - /* 0x08 */ f32 mScale; - /* 0x0C */ f32 mShadowDepth; - /* 0x10 */ f32 mCcWeight; - /* 0x14 */ f32 mCylH; - /* 0x18 */ f32 mWallH; - /* 0x1C */ f32 mWallR; - /* 0x20 */ f32 mBodyUpAngle; - /* 0x24 */ f32 mBodyDownAngle; - /* 0x28 */ f32 mBodyLeftAngle; - /* 0x2C */ f32 mBodyRightAngle; - /* 0x30 */ f32 mHeadUpAngle; - /* 0x34 */ f32 mHeadDownAngle; - /* 0x38 */ f32 mHeadLeftAngle; - /* 0x3C */ f32 mHeadRightAngle; - /* 0x40 */ f32 mNeckAngleScl; - /* 0x44 */ f32 mMorfFrames; - /* 0x48 */ s16 mSpeakDistIdx; - /* 0x4A */ s16 mSpeakAngleIdx; - /* 0x4C */ s16 mTalkDistIdx; - /* 0x4E */ s16 mTalkAngleIdx; - /* 0x50 */ f32 mAttnFovY; - /* 0x54 */ f32 mAttnRadius; - /* 0x58 */ f32 mAttnUpperY; - /* 0x5C */ f32 mAttnLowerY; - /* 0x60 */ s16 field_0x60; - /* 0x62 */ s16 mDamageTimer; - /* 0x64 */ s16 mTestExpression; - /* 0x66 */ s16 mTestMotion; - /* 0x68 */ s16 mTestLookMode; - /* 0x6A */ bool mTest; - }; - - /* 80AFBDA0 */ virtual ~daNpcThe_Param_c() {} - - static daNpcThe_Param_c::param const m; -}; - -STATIC_ASSERT(sizeof(daNpcThe_Param_c::param) == 0x6C); - #endif /* D_A_NPC_THE_H */ diff --git a/include/d/actor/d_a_npc_uri.h b/include/d/actor/d_a_npc_uri.h index 10abae1e56..005905d454 100644 --- a/include/d/actor/d_a_npc_uri.h +++ b/include/d/actor/d_a_npc_uri.h @@ -3,47 +3,8 @@ #include "d/actor/d_a_npc.h" -/** - * @ingroup actors-npcs - * @class daNpc_Uri_c - * @brief Uli - * - * @details - * - */ - - struct daNpc_Uri_HIOParam { - /* 0x00 */ f32 field_0x00; - /* 0x04 */ f32 field_0x04; - /* 0x08 */ f32 field_0x08; - /* 0x0C */ f32 field_0x0c; - /* 0x10 */ f32 field_0x10; - /* 0x14 */ f32 field_0x14; - /* 0x18 */ f32 field_0x18; - /* 0x1C */ f32 field_0x1c; - /* 0x20 */ f32 field_0x20; - /* 0x24 */ f32 field_0x24; - /* 0x28 */ f32 field_0x28; - /* 0x2C */ f32 field_0x2c; - /* 0x30 */ f32 field_0x30; - /* 0x34 */ f32 field_0x34; - /* 0x38 */ f32 field_0x38; - /* 0x3C */ f32 field_0x3c; - /* 0x40 */ f32 field_0x40; - /* 0x44 */ f32 field_0x44; - /* 0x48 */ s16 field_0x48; - /* 0x4A */ s16 field_0x4a; - /* 0x4C */ s16 field_0x4c; - /* 0x4E */ s16 field_0x4e; - /* 0x50 */ f32 field_0x50; - /* 0x54 */ f32 field_0x54; - /* 0x58 */ f32 field_0x58; - /* 0x5C */ f32 field_0x5c; - /* 0x60 */ s16 field_0x60; - /* 0x62 */ s16 field_0x62; - /* 0x64 */ u8 field_0x64[8]; - /* 0x6C */ f32 field_0x6c; - /* 0x70 */ u8 field_0x70[28]; +struct daNpc_Uri_HIOParam { + /* 0x00 */ daNpcT_HIOParam common; /* 0x8C */ s16 field_0x8c; /* 0x8E */ s16 field_0x8e; /* 0x90 */ s16 field_0x90; @@ -59,20 +20,35 @@ class daNpc_Uri_Param_c { public: - /* 80B2CD94 */ virtual ~daNpc_Uri_Param_c() {}; + /* 80B2CD94 */ virtual ~daNpc_Uri_Param_c() {} - static daNpc_Uri_HIOParam const m; + static const daNpc_Uri_HIOParam m; }; -class daNpc_Uri_HIO_c -#ifdef DEBUG -: public mDoHIO_entry_c -#endif -{ +#if DEBUG +class daNpc_Uri_HIO_c : public mDoHIO_entry_c { public: + daNpc_Uri_HIO_c(); + + void listenPropertyEvent(const JORPropertyEvent*); void genMessage(JORMContext*); + + daNpc_Uri_HIOParam m; }; +#define NPC_URI_HIO_CLASS daNpc_Uri_HIO_c +#else +#define NPC_URI_HIO_CLASS daNpc_Uri_Param_c +#endif + +/** + * @ingroup actors-npcs + * @class daNpc_Uri_c + * @brief Uli + * + * @details + * + */ class daNpc_Uri_c : public daNpcT_c { public: typedef int (daNpc_Uri_c::*cutFunc)(int); @@ -164,7 +140,7 @@ public: static cutFunc mCutList[7]; private: - /* 0x0E40 */ daNpc_Uri_HIO_c* field_0xe40; + /* 0x0E40 */ NPC_URI_HIO_CLASS* mpHIO; /* 0x0E44 */ J3DModel* mpModel[1]; /* 0x0E48 */ dCcD_Cyl mCyl; /* 0x0F84 */ u8 mType; diff --git a/include/d/actor/d_a_obj_szbridge.h b/include/d/actor/d_a_obj_szbridge.h index 00ad056753..e9b58d1c43 100644 --- a/include/d/actor/d_a_obj_szbridge.h +++ b/include/d/actor/d_a_obj_szbridge.h @@ -1,6 +1,7 @@ #ifndef D_A_OBJ_SZBRIDGE_H #define D_A_OBJ_SZBRIDGE_H +#include "d/d_bg_s_movebg_actor.h" #include "f_op/f_op_actor_mng.h" /** @@ -11,24 +12,30 @@ * @details * */ -class daObjSZbridge_c : public fopAc_ac_c { +class daObjSZbridge_c : public dBgS_MoveBgActor, request_of_phase_process_class { public: /* 80D04360 */ void rideActor(fopAc_ac_c*); - /* 80D04424 */ void create1st(); + /* 80D04424 */ int create1st(); /* 80D044B8 */ void setMtx(); - /* 80D04528 */ void CreateHeap(); + /* 80D04528 */ int CreateHeap(); /* 80D04598 */ void chkBg(); - /* 80D048C4 */ void Create(); - /* 80D04974 */ void Execute(Mtx**); - /* 80D049E4 */ void Draw(); - /* 80D04A88 */ void Delete(); - /* 80D04B90 */ ~daObjSZbridge_c(); + /* 80D048C4 */ int Create(); + /* 80D04974 */ int Execute(Mtx**); + /* 80D049E4 */ int Draw(); + /* 80D04A88 */ int Delete(); + /* 80D04B90 */ virtual ~daObjSZbridge_c() {} private: - /* 0x568 */ u8 field_0x568[0x624 - 0x568]; + /* 0x5A8 */ Mtx mBgMtx; + /* 0x5D8 */ Mtx field_0x5d8; + /* 0x608 */ J3DModel* mpModel; + /* 0x60C */ f32 mWaterY; + /* 0x610 */ f32 mGroundY; + /* 0x614 */ u8 field_0x614; + /* 0x618 */ u32 field_0x618[2]; + /* 0x620 */ int field_0x620; }; STATIC_ASSERT(sizeof(daObjSZbridge_c) == 0x624); - #endif /* D_A_OBJ_SZBRIDGE_H */ |
