summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCarco_21 <144170194+carter-ktb21@users.noreply.github.com>2025-08-08 10:12:15 -0400
committerGitHub <noreply@github.com>2025-08-08 17:12:15 +0300
commit2dc324cf947e494b7d5707ff2d1a7cb216e062ba (patch)
tree13237f30396d2b535781722e9cc99a82ca16dc07 /include
parent156d2b24c36309f455e0284806ae9d2170775bdb (diff)
d_a_npc_kolin and d_a_npc_kolinb equivalent (#2573)
* data work * About 50% done on functions * Cut func work * d_a_npc_kolin equivalent! * kolin enums added * kolinb equivalent! * PR cleanup
Diffstat (limited to 'include')
-rw-r--r--include/d/actor/d_a_npc_kolin.h163
-rw-r--r--include/d/actor/d_a_npc_kolinb.h184
2 files changed, 245 insertions, 102 deletions
diff --git a/include/d/actor/d_a_npc_kolin.h b/include/d/actor/d_a_npc_kolin.h
index 5059ea414e..335e0b9310 100644
--- a/include/d/actor/d_a_npc_kolin.h
+++ b/include/d/actor/d_a_npc_kolin.h
@@ -10,55 +10,83 @@
*
* @details
*
- */
+*/
+
+struct daNpc_Kolin_HIOParam {
+ /* 0x00 */ daNpcT_HIOParam common;
+ /* 0x8C */ f32 start_distance; // 走りはじめ距離 - Start Distance
+ /* 0x90 */ f32 follow_distance; // 追従距離 - Follow Distance
+ /* 0x94 */ f32 run_speed; // 走る速度 - Run Speed
+ /* 0x98 */ s16 shy_walk_time; // いじけ歩き時間 - Shy Walk Time
+ /* 0x9A */ s16 sulk_time; // いじけ時間 - Sulk Time
+ /* 0x9C */ f32 yeah_yeah; // ハイハイ - Yeah Yeah (Likely a sarcastic connotation)
+};
+
+class daNpc_Kolin_Param_c {
+public:
+ /* 8055A4E8 */ virtual ~daNpc_Kolin_Param_c() {}
+
+ static daNpc_Kolin_HIOParam const m;
+};
+
class daNpc_Kolin_c : public daNpcT_c {
public:
+ typedef int (daNpc_Kolin_c::*cutFunc)(int);
+ typedef int (daNpc_Kolin_c::*actionFunc)(void*);
+
/* 80553FEC */ ~daNpc_Kolin_c();
- /* 80554138 */ void create();
- /* 80554414 */ void CreateHeap();
- /* 80554930 */ void Delete();
- /* 80554964 */ void Execute();
- /* 80554984 */ void Draw();
- /* 80554A18 */ void createHeapCallBack(fopAc_ac_c*);
- /* 80554A38 */ void ctrlJointCallBack(J3DJoint*, int);
- /* 80554A90 */ void getType();
- /* 80554B30 */ void isDelete();
+ /* 80554138 */ cPhs__Step create();
+ /* 80554414 */ int CreateHeap();
+ /* 80554930 */ int Delete();
+ /* 80554964 */ int Execute();
+ /* 80554984 */ int Draw();
+ /* 80554A18 */ static int createHeapCallBack(fopAc_ac_c*);
+ /* 80554A38 */ static int ctrlJointCallBack(J3DJoint*, int);
+ /* 80554A90 */ u8 getType();
+ /* 80554B30 */ BOOL isDelete();
/* 80554CB0 */ void reset();
/* 805552DC */ void srchActors();
- /* 80555E38 */ void selectAction();
- /* 80555F28 */ void chkAction(int (daNpc_Kolin_c::*)(void*));
- /* 80555F54 */ void setAction(int (daNpc_Kolin_c::*)(void*));
+ /* 80555E38 */ int selectAction();
+ /* 80555F28 */ BOOL chkAction(actionFunc);
+ /* 80555F54 */ int setAction(actionFunc);
/* 80555FFC */ void calcFollowSpeedAndAngle(fopAc_ac_c*, int, int);
/* 805563BC */ void followPlayer(int);
/* 805567AC */ void lookup(u8);
- /* 805568AC */ void cutNoRide(int);
- /* 80556A04 */ void cutHail(int);
- /* 80556DB4 */ void cutGiveMeWoodSwd(int);
- /* 80557054 */ void cutGetWoodSwd(int);
- /* 805576C4 */ void cutConversationAboutLoopHole(int);
- /* 805579DC */ void cutCacaricoConversation(int);
- /* 80557BD4 */ void cutConversationAboutDeathMt(int);
- /* 80557C6C */ void cutConversationAboutGoron(int);
- /* 80557D04 */ void cutClothTry(int);
- /* 80557E38 */ void cutThankYou(int);
- /* 80557ED8 */ void wait(void*);
- /* 80558698 */ void timidWalk(void*);
- /* 80558AF8 */ void follow(void*);
- /* 80558C4C */ void clothWait(void*);
- /* 80558E90 */ void talk(void*);
- /* 8055A3B8 */ daNpc_Kolin_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**);
-
- /* 8055A4B8 */ virtual int checkChangeJoint(int);
- /* 8055A4C8 */ virtual int checkRemoveJoint(int);
- /* 8055A4B0 */ virtual s32 getBackboneJointNo();
- /* 8055A4A8 */ virtual s32 getNeckJointNo();
- /* 8055A4A0 */ virtual s32 getHeadJointNo();
- /* 8055A4D8 */ virtual s32 getFootLJointNo();
- /* 8055A4E0 */ virtual s32 getFootRJointNo();
- /* 8055A498 */ virtual u16 getEyeballMaterialNo();
+ /* 805568AC */ int cutNoRide(int);
+ /* 80556A04 */ int cutHail(int);
+ /* 80556DB4 */ int cutGiveMeWoodSwd(int);
+ /* 80557054 */ int cutGetWoodSwd(int);
+ /* 805576C4 */ int cutConversationAboutLoopHole(int);
+ /* 805579DC */ int cutCacaricoConversation(int);
+ /* 80557BD4 */ int cutConversationAboutDeathMt(int);
+ /* 80557C6C */ int cutConversationAboutGoron(int);
+ /* 80557D04 */ int cutClothTry(int);
+ /* 80557E38 */ int cutThankYou(int);
+ /* 80557ED8 */ int wait(void*);
+ /* 80558698 */ int timidWalk(void*);
+ /* 80558AF8 */ int follow(void*);
+ /* 80558C4C */ int clothWait(void*);
+ /* 80558E90 */ int talk(void*);
+ /* 8055A3B8 */ daNpc_Kolin_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) {}
+ /* 8055A4B8 */ virtual int checkChangeJoint(int i_joint) { return i_joint == 4; }
+ /* 8055A4C8 */ virtual int checkRemoveJoint(int i_joint) { return i_joint == 8; }
+ /* 8055A4B0 */ virtual s32 getBackboneJointNo() { return 1; }
+ /* 8055A4A8 */ virtual s32 getNeckJointNo() { return 3; }
+ /* 8055A4A0 */ virtual s32 getHeadJointNo() { return 4; }
+ /* 8055A4D8 */ virtual s32 getFootLJointNo() { return 22; }
+ /* 8055A4E0 */ virtual s32 getFootRJointNo() { return 25; }
+ /* 8055A498 */ virtual u16 getEyeballMaterialNo() { return 2; }
/* 80554EBC */ virtual void afterJntAnm(int);
/* 80554F48 */ virtual void setParam();
/* 80555118 */ virtual BOOL checkChangeEvt();
@@ -74,11 +102,25 @@ public:
/* 80555DC4 */ virtual void changeAnm(int*, int*);
/* 80555DEC */ virtual void changeBck(int*, int*);
- static void* mCutNameList[11];
- static u8 mCutList[132];
+ static char* mCutNameList[11];
+ static cutFunc mCutList[11];
+
+ u32 getFlowNodeNo() {
+ u16 nodeNo = home.angle.x;
+ u32 rv;
+ if (nodeNo == 0xffff) {
+ rv = -1;
+ } else {
+ rv = nodeNo;
+ }
+ return rv;
+ }
+
+ u32 getPathID() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; }
+ u32 getBitSW() { return (fopAcM_GetParam(this) & 0xFF0000) >> 16; }
BOOL orderNoRideEvt() {
- if (field_0xf84 == 11) {
+ if (mType == 11) {
s16 var_r28 = (s16)(fopAcM_searchPlayerAngleY(this) - home.angle.y);
int var_r29 = 3;
@@ -103,19 +145,30 @@ public:
}
private:
- /* 0x0E40 */ u8 field_0xe40[0xF84 - 0xE40];
- /* 0x0F84 */ u8 field_0xf84;
- /* 0x0F85 */ u8 field_0xf85[0x1020 - 0xF85];
+ /* 0x0E40 */ u8 field_0xe40[0xe44 - 0xe40];
+ /* 0x0E44 */ J3DModel* mpClothModel;
+ /* 0x0E48 */ dCcD_Cyl field_0xe48;
+ /* 0x0F84 */ u8 mType;
+ /* 0x0F88 */ daNpcT_ActorMngr_c mActorMngr[5];
+ /* 0x0FB0 */ daNpcT_Path_c mPath;
+ /* 0x0FD8 */ actionFunc mNextAction;
+ /* 0x0FE4 */ actionFunc mAction;
+ /* 0x0FF0 */ u8 field_0xff0[0xffc - 0xff0];
+ /* 0x0FFC */ int field_0xffc;
+ /* 0x1000 */ int field_0x1000;
+ /* 0x1004 */ int field_0x1004;
+ /* 0x1008 */ int field_0x1008;
+ /* 0x100C */ u8 field_0x100c[0x1010 - 0x100c];
+ /* 0x1010 */ f32 field_0x1010;
+ /* 0x1014 */ u8 field_0x1014;
+ /* 0x1015 */ u8 field_0x1015;
+ /* 0x1016 */ u8 field_0x1016;
+ /* 0x1017 */ u8 field_0x1017;
+ /* 0x1018 */ u8 field_0x1018;
+ /* 0x1019 */ u8 field_0x1019[0x101c - 0x1019];
+ /* 0x101C */ u8 field_0x101c;
};
STATIC_ASSERT(sizeof(daNpc_Kolin_c) == 0x1020);
-class daNpc_Kolin_Param_c {
-public:
- /* 8055A4E8 */ ~daNpc_Kolin_Param_c();
-
- static u8 const m[160];
-};
-
-
#endif /* D_A_NPC_KOLIN_H */
diff --git a/include/d/actor/d_a_npc_kolinb.h b/include/d/actor/d_a_npc_kolinb.h
index 79a74947cd..394d5684ee 100644
--- a/include/d/actor/d_a_npc_kolinb.h
+++ b/include/d/actor/d_a_npc_kolinb.h
@@ -2,75 +2,165 @@
#define D_A_NPC_KOLINB_H
#include "d/actor/d_a_npc.h"
+#include "d/d_bg_w.h"
/**
* @ingroup actors-npcs
* @class daNpc_Kolinb_c
- * @brief Colin (Bedridden)
+ * @brief Colin (Bedridden) / Ralis (Bedridden)
*
* @details
*
- */
-class daNpc_Kolinb_c : public fopAc_ac_c {
+*/
+
+struct daNpc_Kolinb_HIOParam {
+ /* 0x00 */ daNpcT_HIOParam common;
+};
+
+class daNpc_Kolinb_Param_c {
+public:
+ /* 80A486A4 */ virtual ~daNpc_Kolinb_Param_c() {}
+
+ static daNpc_Kolinb_HIOParam const m;
+};
+
+class daNpc_Kolinb_c : public daNpcT_c {
public:
+ enum Joint {
+ /* 0x00 */ KOLINB_JNT_CENTER,
+ /* 0x01 */ KOLINB_JNT_BED_ROOT,
+ /* 0x02 */ KOLINB_JNT_MAT,
+ /* 0x03 */ KOLINB_JNT_KOLIN_CENTER,
+ /* 0x04 */ KOLINB_JNT_BACKBONE1,
+ /* 0x05 */ KOLINB_JNT_BACKBONE2,
+ /* 0x06 */ KOLINB_JNT_NECK,
+ /* 0x07 */ KOLINB_JNT_HEAD,
+ /* 0x08 */ KOLINB_JNT_CHIN,
+ /* 0x09 */ KOLINB_JNT_MAYUL,
+ /* 0x0A */ KOLINB_JNT_MAYUR,
+ /* 0x0B */ KOLINB_JNT_MOUTH,
+ /* 0x0C */ KOLINB_JNT_SHOULDERL,
+ /* 0x0D */ KOLINB_JNT_ARML1,
+ /* 0x0E */ KOLINB_JNT_ARML2,
+ /* 0x0F */ KOLINB_JNT_HANDL,
+ /* 0x10 */ KOLINB_JNT_FINGERL,
+ /* 0x11 */ KOLINB_JNT_SHOULDERR,
+ /* 0x12 */ KOLINB_JNT_ARMR1,
+ /* 0x13 */ KOLINB_JNT_ARMR2,
+ /* 0x14 */ KOLINB_JNT_HANDR,
+ /* 0x15 */ KOLINB_JNT_FINGERR,
+ /* 0x16 */ KOLINB_JNT_CLOTH_ROOT,
+ /* 0x17 */ KOLINB_JNT_CLOTH,
+ /* 0x18 */ KOLINB_JNT_WAIST,
+ /* 0x19 */ KOLINB_JNT_PILLOW_ROOT,
+ /* 0x1A */ KOLINB_JNT_PILLOW,
+
+ /* 0x00 */ ZRCB_JNT_CENTER = 0x0,
+ /* 0x01 */ ZRCB_JNT_BED_ROOT,
+ /* 0x02 */ ZRCB_JNT_ZRC_CENTER,
+ /* 0x03 */ ZRCB_JNT_BACKBONE1,
+ /* 0x04 */ ZRCB_JNT_BACKBONE2,
+ /* 0x05 */ ZRCB_JNT_NECK,
+ /* 0x06 */ ZRCB_JNT_HEAD,
+ /* 0x07 */ ZRCB_JNT_H_TAIL1,
+ /* 0x08 */ ZRCB_JNT_H_TAIL2,
+ /* 0x09 */ ZRCB_JNT_H_TAIL3,
+ /* 0x0A */ ZRCB_JNT_CHIN,
+ /* 0x0B */ ZRCB_JNT_EARL1,
+ /* 0x0C */ ZRCB_JNT_EARL2,
+ /* 0x0D */ ZRCB_JNT_EARR1,
+ /* 0x0E */ ZRCB_JNT_EARR2,
+ /* 0x0F */ ZRCB_JNT_MOUTH,
+ /* 0x10 */ ZRCB_JNT_SHOULDERL,
+ /* 0x11 */ ZRCB_JNT_ARML1,
+ /* 0x12 */ ZRCB_JNT_SHOULDERR,
+ /* 0x13 */ ZRCB_JNT_ARMR1,
+ /* 0x14 */ ZRCB_JNT_CLOTH_ROOT,
+ /* 0x15 */ ZRCB_JNT_CLOTH,
+ };
+
+ typedef int (daNpc_Kolinb_c::*cutFunc)(int);
+ typedef int (daNpc_Kolinb_c::*actionFunc)(void*);
+
/* 80A4598C */ ~daNpc_Kolinb_c();
- /* 80A45ADC */ void create();
- /* 80A45DC4 */ void CreateHeap();
- /* 80A4603C */ void Delete();
- /* 80A46070 */ void Execute();
- /* 80A46090 */ void Draw();
- /* 80A46124 */ void createHeapCallBack(fopAc_ac_c*);
- /* 80A46144 */ void ctrlJointCallBack(J3DJoint*, int);
- /* 80A4619C */ void getType();
- /* 80A461E8 */ void isDelete();
+ /* 80A45ADC */ cPhs__Step create();
+ /* 80A45DC4 */ int CreateHeap();
+ /* 80A4603C */ int Delete();
+ /* 80A46070 */ int Execute();
+ /* 80A46090 */ int Draw();
+ /* 80A46124 */ static int createHeapCallBack(fopAc_ac_c*);
+ /* 80A46144 */ static int ctrlJointCallBack(J3DJoint*, int);
+ /* 80A4619C */ u8 getType();
+ /* 80A461E8 */ BOOL isDelete();
/* 80A462C8 */ void reset();
/* 80A46420 */ void setParam();
- /* 80A4651C */ void checkChangeEvt();
+ /* 80A4651C */ BOOL checkChangeEvt();
/* 80A465D0 */ void setAfterTalkMotion();
/* 80A46630 */ void srchActors();
- /* 80A46634 */ void evtTalk();
- /* 80A466D4 */ void evtCutProc();
+ /* 80A46634 */ BOOL evtTalk();
+ /* 80A466D4 */ BOOL evtCutProc();
/* 80A4679C */ void action();
/* 80A46824 */ void beforeMove();
/* 80A468E8 */ void setAttnPos();
/* 80A46A4C */ void setCollision();
- /* 80A46A9C */ bool drawDbgInfo();
- /* 80A46AA4 */ void selectAction();
- /* 80A46AEC */ void chkAction(int (daNpc_Kolinb_c::*)(void*));
- /* 80A46B18 */ void setAction(int (daNpc_Kolinb_c::*)(void*));
- /* 80A46BC0 */ void cutConversationInHotel(int);
- /* 80A46C48 */ void cutConversationAboutDeathMt(int);
- /* 80A46EE4 */ void cutConversationAboutGoron(int);
- /* 80A47180 */ void cutNurse(int);
- /* 80A472EC */ void cutClothTry(int);
- /* 80A4738C */ void cutThankYou(int);
- /* 80A4742C */ void wait(void*);
- /* 80A475D4 */ void talk(void*);
- /* 80A4854C */ daNpc_Kolinb_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**);
- /* 80A4860C */ void getHeadJointNo();
- /* 80A48624 */ void checkChangeJoint(int);
- /* 80A4864C */ void checkRemoveJoint(int);
- /* 80A48674 */ void getBackboneJointNo();
- /* 80A4868C */ void getNeckJointNo();
+ /* 80A46A9C */ int drawDbgInfo();
+ /* 80A46AA4 */ int selectAction();
+ /* 80A46AEC */ BOOL chkAction(actionFunc);
+ /* 80A46B18 */ int setAction(actionFunc);
+ /* 80A46BC0 */ int cutConversationInHotel(int);
+ /* 80A46C48 */ int cutConversationAboutDeathMt(int);
+ /* 80A46EE4 */ int cutConversationAboutGoron(int);
+ /* 80A47180 */ int cutNurse(int);
+ /* 80A472EC */ int cutClothTry(int);
+ /* 80A4738C */ int cutThankYou(int);
+ /* 80A4742C */ int wait(void*);
+ /* 80A475D4 */ int talk(void*);
+ /* 80A4854C */ daNpc_Kolinb_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) {}
+ /* 80A4860C */ s32 getHeadJointNo() { return mType == 2 ? ZRCB_JNT_HEAD : KOLINB_JNT_HEAD; }
+ /* 80A48624 */ BOOL checkChangeJoint(int i_joint) { return i_joint == ((mType == 2 ? ZRCB_JNT_H_TAIL1 : KOLINB_JNT_CHIN) - 1); }
+ /* 80A4864C */ BOOL checkRemoveJoint(int i_joint) { return i_joint == ((mType == 2 ? ZRCB_JNT_MOUTH : KOLINB_JNT_MOUTH) - 1); }
+ /* 80A48674 */ s32 getBackboneJointNo() { return mType == 2 ? ZRCB_JNT_BACKBONE1 : KOLINB_JNT_BACKBONE1; }
+ /* 80A4868C */ s32 getNeckJointNo() { return mType == 2 ? ZRCB_JNT_NECK : KOLINB_JNT_NECK; }
- static void* mCutNameList[7];
- static u8 mCutList[84];
+ static char* mCutNameList[7];
+ static cutFunc mCutList[7];
-private:
- /* 0x568 */ u8 field_0x568[0xffc - 0x568];
-};
+ u32 getFlowNodeNo() {
+ u16 nodeNo = home.angle.x;
+ u32 rv;
+ if (nodeNo == 0xffff) {
+ rv = -1;
+ } else {
+ rv = nodeNo;
+ }
+ return rv;
+ }
-STATIC_ASSERT(sizeof(daNpc_Kolinb_c) == 0xffc);
+ u32 getModelType() { return fopAcM_GetParam(this) >> 28; }
-class daNpc_Kolinb_Param_c {
-public:
- /* 80A486A4 */ ~daNpc_Kolinb_Param_c();
-
- static u8 const m[140];
+private:
+ /* 0xE40 */ u8 field_0xe40[0xe44 - 0xe40];
+ /* 0xE44 */ dCcD_Cyl field_0xe44;
+ /* 0xF80 */ Mtx mMtx;
+ /* 0xFB0 */ dBgW* mpBgW;
+ /* 0xFB4 */ u8 mType;
+ /* 0xFB8 */ actionFunc mNextAction;
+ /* 0xFC4 */ actionFunc mAction;
+ /* 0xFD0 */ daNpcT_Path_c mPath;
+ /* 0xFF8 */ u8 field_0xff8;
};
+STATIC_ASSERT(sizeof(daNpc_Kolinb_c) == 0xffc);
#endif /* D_A_NPC_KOLINB_H */