summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorhev7 <143887945+hev7@users.noreply.github.com>2025-10-21 19:37:13 +0100
committerGitHub <noreply@github.com>2025-10-21 21:37:13 +0300
commit7d2e6ba444de8cd6fc0b3d16d56387db53984173 (patch)
tree30bed7638c86975e6feaa0ccefe00fbdd8de3d9b /include
parent9155add1f655667a89c39f9573d634c4dc358885 (diff)
d_a_npc_len matching (#2748)
* d_a_npc_len matching * HIO * more work on len * d_a_midna work for PAL * mg_rod PAL work
Diffstat (limited to 'include')
-rw-r--r--include/d/actor/d_a_npc.h9
-rw-r--r--include/d/actor/d_a_npc_len.h146
2 files changed, 109 insertions, 46 deletions
diff --git a/include/d/actor/d_a_npc.h b/include/d/actor/d_a_npc.h
index e3c100da1d..858e430bec 100644
--- a/include/d/actor/d_a_npc.h
+++ b/include/d/actor/d_a_npc.h
@@ -299,6 +299,15 @@ public:
setDirect(i_direct);
}
+ void lookAround(u8 i_direct, int i_baseTimer) {
+ if (setMode(LOOK_MODE_7, FALSE)) {
+ mTimer = 0;
+ }
+
+ mBaseTimer = i_baseTimer;
+ setDirect(i_direct);
+ }
+
void lookAround2(u8 i_direct, int i_baseTimer) {
if (setMode(LOOK_MODE_8, FALSE)) {
mTimer = 0;
diff --git a/include/d/actor/d_a_npc_len.h b/include/d/actor/d_a_npc_len.h
index 1eedcaa060..cbd2848ea9 100644
--- a/include/d/actor/d_a_npc_len.h
+++ b/include/d/actor/d_a_npc_len.h
@@ -3,6 +3,36 @@
#include "d/actor/d_a_npc.h"
+struct daNpc_Len_HIOParam {
+ /* 0x00 */ daNpcT_HIOParam common;
+ /* 0x8C */ s16 field_0x8c;
+ /* 0x8E */ s16 field_0x8e;
+ /* 0x90 */ f32 field_0x90;
+};
+
+class daNpc_Len_Param_c {
+public:
+ /* 80A68E38 */ virtual ~daNpc_Len_Param_c() {}
+
+ static const daNpc_Len_HIOParam m;
+};
+
+#if DEBUG
+class daNpc_Len_HIO_c : public mDoHIO_entry_c {
+public:
+ daNpc_Len_HIO_c();
+
+ void listenPropertyEvent(const JORPropertyEvent*);
+ void genMessage(JORMContext*);
+
+ daNpc_Len_HIOParam m;
+};
+
+#define NPC_LEN_HIO_CLASS daNpc_Len_HIO_c
+#else
+#define NPC_LEN_HIO_CLASS daNpc_Len_Param_c
+#endif
+
/**
* @ingroup actors-npcs
* @class daNpc_Len_c
@@ -11,70 +41,94 @@
* @details
*
*/
-class daNpc_Len_c : public fopAc_ac_c {
+
+class daNpc_Len_c : public daNpcT_c {
public:
+ typedef int (daNpc_Len_c::*actionFunc)(void*);
+ typedef int (daNpc_Len_c::*cutFunc)(int);
+
/* 80A6432C */ ~daNpc_Len_c();
- /* 80A64478 */ void create();
- /* 80A64740 */ void CreateHeap();
- /* 80A64BE0 */ void Delete();
- /* 80A64C14 */ void Execute();
- /* 80A64C34 */ void Draw();
- /* 80A64CC8 */ void createHeapCallBack(fopAc_ac_c*);
- /* 80A64CE8 */ void ctrlJointCallBack(J3DJoint*, int);
- /* 80A64D40 */ void getType();
- /* 80A64DB8 */ void isDelete();
+ /* 80A64478 */ int create();
+ /* 80A64740 */ int CreateHeap();
+ /* 80A64BE0 */ int Delete();
+ /* 80A64C14 */ int Execute();
+ /* 80A64C34 */ int Draw();
+ /* 80A64CC8 */ static int createHeapCallBack(fopAc_ac_c*);
+ /* 80A64CE8 */ static int ctrlJointCallBack(J3DJoint*, int);
+ /* 80A64D40 */ u8 getType();
+ /* 80A64DB8 */ BOOL isDelete();
/* 80A64FBC */ void reset();
/* 80A6516C */ void afterJntAnm(int);
/* 80A65278 */ void setParam();
- /* 80A6546C */ void checkChangeEvt();
+ /* 80A6546C */ BOOL checkChangeEvt();
/* 80A6556C */ void setAfterTalkMotion();
/* 80A65624 */ void srchActors();
- /* 80A65710 */ void evtTalk();
- /* 80A657B0 */ void evtCutProc();
+ /* 80A65710 */ BOOL evtTalk();
+ /* 80A657B0 */ BOOL evtCutProc();
/* 80A65878 */ void action();
/* 80A65A60 */ void beforeMove();
/* 80A65B24 */ void setAttnPos();
/* 80A65E28 */ void setCollision();
- /* 80A65F80 */ bool drawDbgInfo();
- /* 80A65F88 */ void selectAction();
- /* 80A66004 */ void chkAction(int (daNpc_Len_c::*)(void*));
- /* 80A66030 */ void setAction(int (daNpc_Len_c::*)(void*));
+ /* 80A65F80 */ int drawDbgInfo();
+ /* 80A65F88 */ int selectAction();
+ /* 80A66004 */ BOOL chkAction(actionFunc);
+ /* 80A66030 */ int setAction(actionFunc);
/* 80A660D8 */ BOOL checkStartDemo13StbEvt(fopAc_ac_c*, f32, f32, f32, f32, f32, f32, f32);
- /* 80A661B4 */ void cutConversationInHotel(int);
- /* 80A66664 */ void cutHurry(int);
- /* 80A668B8 */ void cutTakeWoodStatue(int);
- /* 80A66C74 */ void wait(void*);
- /* 80A6736C */ void patrol(void*);
- /* 80A67794 */ void talk(void*);
- /* 80A68D00 */ daNpc_Len_c(daNpcT_faceMotionAnmData_c const*, daNpcT_motionAnmData_c const*,
- daNpcT_MotionSeqMngr_c::sequenceStepData_c const*, int,
- daNpcT_MotionSeqMngr_c::sequenceStepData_c const*, int,
- daNpcT_evtData_c const*, char**);
- /* 80A68DE0 */ u16 getEyeballMaterialNo();
- /* 80A68DE8 */ s32 getHeadJointNo();
- /* 80A68DF0 */ s32 getNeckJointNo();
- /* 80A68DF8 */ bool getBackboneJointNo();
- /* 80A68E00 */ void checkChangeJoint(int);
- /* 80A68E10 */ void checkRemoveJoint(int);
- /* 80A68E20 */ s32 getFootLJointNo();
- /* 80A68E28 */ s32 getFootRJointNo();
- /* 80A68E30 */ bool chkXYItems();
+ /* 80A661B4 */ int cutConversationInHotel(int);
+ /* 80A66664 */ int cutHurry(int);
+ /* 80A668B8 */ int cutTakeWoodStatue(int);
+ /* 80A66C74 */ int wait(void*);
+ /* 80A6736C */ int patrol(void*);
+ /* 80A67794 */ int talk(void*);
+ /* 80A68D00 */ daNpc_Len_c(
+ daNpcT_faceMotionAnmData_c const* i_faceMotionAnmData,
+ daNpcT_motionAnmData_c const* i_motionAnmData,
+ daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_faceMotionSequenceData,
+ int i_faceMotionStepNum,
+ daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData, int i_motionStepNum,
+ daNpcT_evtData_c const* i_evtData, char** i_arcNames)
+ : daNpcT_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
+ i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
+ i_arcNames) {}
+ /* 80A68DE0 */ u16 getEyeballMaterialNo() { return 1; }
+ /* 80A68DE8 */ s32 getHeadJointNo() { return 4; }
+ /* 80A68DF0 */ s32 getNeckJointNo() { return 3; }
+ /* 80A68DF8 */ s32 getBackboneJointNo() { return 1; }
+ /* 80A68E00 */ BOOL checkChangeJoint(int i_joint) { return i_joint == 4; }
+ /* 80A68E10 */ BOOL checkRemoveJoint(int i_joint) { return i_joint == 9; }
+ /* 80A68E20 */ s32 getFootLJointNo() { return 29; }
+ /* 80A68E28 */ s32 getFootRJointNo() { return 32; }
+ /* 80A68E30 */ BOOL chkXYItems() { return TRUE; }
static char* mCutNameList[4];
- static u8 mCutList[48];
+ static cutFunc mCutList[4];
+
+ int getFlowNodeNo() {
+ u16 nodeNo = home.angle.x;
+ if (nodeNo == 0xffff) {
+ return -1;
+ }
+ return nodeNo;
+ }
+ u8 getPathID() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; }
+ u8 getBitSW() { return (fopAcM_GetParam(this) & 0xff0000) >> 16; }
private:
- /* 0x568 */ u8 field_0x568[0xff4 - 0x568];
+ /* 0xE40 */ NPC_LEN_HIO_CLASS* mpHIO;
+ /* 0xE44 */ dCcD_Cyl mCyl;
+ /* 0xF80 */ u8 mType;
+ /* 0xF84 */ daNpcT_ActorMngr_c mActorMngr[4];
+ /* 0xFA4 */ daNpcT_Path_c mPath;
+ /* 0xFCC */ actionFunc field_0xfcc;
+ /* 0xFD8 */ actionFunc mAction;
+ /* 0xFE4 */ int field_0xfe4;
+ /* 0xFE8 */ int field_0xfe8;
+ /* 0xFEC */ u8 field_0xfec;
+ /* 0xFED */ u8 field_0xfed;
+ /* 0xFEE */ u8 field_0xfee;
+ /* 0xFF0 */ int field_0xff0;
};
STATIC_ASSERT(sizeof(daNpc_Len_c) == 0xff4);
-class daNpc_Len_Param_c {
-public:
- /* 80A68E38 */ ~daNpc_Len_Param_c();
-
- static u8 const m[148];
-};
-
-
#endif /* D_A_NPC_LEN_H */