summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYunataSavior <58997725+YunataSavior@users.noreply.github.com>2025-10-01 15:35:44 -0700
committerGitHub <noreply@github.com>2025-10-01 15:35:44 -0700
commit9f119e7b01f3827df0f11039b2661a3e480dec3b (patch)
treea16a9016ac2ce2c3d0765a107fcec353f969715c /include
parent9a784744f21d45bcd674d9217cb60f63fd0f139e (diff)
npc_moir HIO and debug cleanup (#2719)
Diffstat (limited to 'include')
-rw-r--r--include/d/actor/d_a_npc.h5
-rw-r--r--include/d/actor/d_a_npc_moir.h24
2 files changed, 25 insertions, 4 deletions
diff --git a/include/d/actor/d_a_npc.h b/include/d/actor/d_a_npc.h
index 4f79103d66..024d62dcf8 100644
--- a/include/d/actor/d_a_npc.h
+++ b/include/d/actor/d_a_npc.h
@@ -1226,6 +1226,11 @@ BOOL daNpcF_chkTmpBit(u32 i_idx);
void daNpcF_onTmpBit(u32 i_idx);
void daNpcF_offTmpBit(u32 i_idx);
u8 daNpcF_getDistTableIdx(int param_0, int param_1);
+#if DEBUG
+class daNpcF_HIOParam;
+void daNpcF_commonListenPropertyEvent(char*, int*, daNpcF_HIOParam*);
+void daNpcF_commonGenMessage(JORMContext*, daNpcF_HIOParam*);
+#endif
void daNpcF_clearMessageTmpBit();
BOOL daNpcF_chkPointInArea(cXyz, cXyz, cXyz, s16);
int daNpcF_getPlayerInfoFromPlayerList(int param_0, int i_roomNo, cXyz& param_2, csXyz& param_3);
diff --git a/include/d/actor/d_a_npc_moir.h b/include/d/actor/d_a_npc_moir.h
index 88f7cc5d08..171230d396 100644
--- a/include/d/actor/d_a_npc_moir.h
+++ b/include/d/actor/d_a_npc_moir.h
@@ -26,6 +26,20 @@ public:
static daNpcMoiR_HIOParam const m;
};
+#if DEBUG
+class daNpcMoiR_HIO_c : public mDoHIO_entry_c {
+public:
+ daNpcMoiR_HIO_c();
+ void genMessage(JORMContext*);
+
+ daNpcMoiR_HIOParam m;
+};
+
+#define NPC_MOIR_HIO_CLASS daNpcMoiR_HIO_c
+#else
+#define NPC_MOIR_HIO_CLASS daNpcMoiR_Param_c
+#endif
+
class daNpcMoiR_c : public daNpcF_c {
public:
typedef bool (daNpcMoiR_c::*ActionFn)(void*);
@@ -169,9 +183,9 @@ public:
MtxP getHandRMtx() { return mpMorf->getModel()->getAnmMtx(17); }
- u16 getMessageNo() { return fopAcM_GetParam(this) >> 8; }
+ s16 getMessageNo() { return (fopAcM_GetParam(this) >> 8) & 0xFFFF; }
- inline void setAction(ActionFn action) {
+ inline int setAction(ActionFn action) {
field_0xe08 = 3;
if (mAction) {
@@ -184,8 +198,10 @@ public:
if (mAction) {
(this->*mAction)(NULL);
}
+
+ return 1;
}
-
+
inline void playExpression();
inline BOOL step(s16, int);
inline void setExpressionTalkAfter();
@@ -204,7 +220,7 @@ private:
/* 0xBDC */ daNpcF_MatAnm_c* mpMatAnm;
/* 0xBE0 */ daNpcF_Lookat_c mLookat;
/* 0xC7C */ daNpcF_ActorMngr_c mActorMngr[4];
- /* 0xC9C */ u8 field_0xc9c[0xca0 - 0xc9c];
+ /* 0xC9C */ NPC_MOIR_HIO_CLASS* mpHIO;
/* 0xCA0 */ dCcD_Cyl field_0xca0;
/* 0xDDC */ ActionFn mAction;
/* 0xDE8 */ request_of_phase_process_class mPhase[2];