Skip to content

Commit 2dc324c

Browse files
authored
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
1 parent 156d2b2 commit 2dc324c

File tree

5 files changed

+3161
-3349
lines changed

5 files changed

+3161
-3349
lines changed

configure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,7 +1562,7 @@ def MatchingFor(*versions) -> bool:
15621562
ActorRel(Equivalent, "d_a_npc_henna"), # weak func order
15631563
ActorRel(NonMatching, "d_a_npc_kakashi"),
15641564
ActorRel(NonMatching, "d_a_npc_kkri"),
1565-
ActorRel(NonMatching, "d_a_npc_kolin"),
1565+
ActorRel(Equivalent, "d_a_npc_kolin"), # weak func order
15661566
ActorRel(Equivalent, "d_a_npc_maro"), # weak func order
15671567
ActorRel(NonMatching, "d_a_npc_taro"),
15681568
ActorRel(NonMatching, "d_a_npc_tkj"),
@@ -1806,7 +1806,7 @@ def MatchingFor(*versions) -> bool:
18061806
ActorRel(MatchingFor("GZ2E01"), "d_a_npc_kdk"),
18071807
ActorRel(NonMatching, "d_a_npc_kn"),
18081808
ActorRel(NonMatching, "d_a_npc_knj"),
1809-
ActorRel(NonMatching, "d_a_npc_kolinb"),
1809+
ActorRel(Equivalent, "d_a_npc_kolinb"), # weak func order
18101810
ActorRel(Equivalent, "d_a_npc_ks"), # weak func order
18111811
ActorRel(NonMatching, "d_a_npc_kyury"),
18121812
ActorRel(NonMatching, "d_a_npc_len"),

include/d/actor/d_a_npc_kolin.h

Lines changed: 108 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -10,55 +10,83 @@
1010
*
1111
* @details
1212
*
13-
*/
13+
*/
14+
15+
struct daNpc_Kolin_HIOParam {
16+
/* 0x00 */ daNpcT_HIOParam common;
17+
/* 0x8C */ f32 start_distance; // 走りはじめ距離 - Start Distance
18+
/* 0x90 */ f32 follow_distance; // 追従距離 - Follow Distance
19+
/* 0x94 */ f32 run_speed; // 走る速度 - Run Speed
20+
/* 0x98 */ s16 shy_walk_time; // いじけ歩き時間 - Shy Walk Time
21+
/* 0x9A */ s16 sulk_time; // いじけ時間 - Sulk Time
22+
/* 0x9C */ f32 yeah_yeah; // ハイハイ - Yeah Yeah (Likely a sarcastic connotation)
23+
};
24+
25+
class daNpc_Kolin_Param_c {
26+
public:
27+
/* 8055A4E8 */ virtual ~daNpc_Kolin_Param_c() {}
28+
29+
static daNpc_Kolin_HIOParam const m;
30+
};
31+
1432
class daNpc_Kolin_c : public daNpcT_c {
1533
public:
34+
typedef int (daNpc_Kolin_c::*cutFunc)(int);
35+
typedef int (daNpc_Kolin_c::*actionFunc)(void*);
36+
1637
/* 80553FEC */ ~daNpc_Kolin_c();
17-
/* 80554138 */ void create();
18-
/* 80554414 */ void CreateHeap();
19-
/* 80554930 */ void Delete();
20-
/* 80554964 */ void Execute();
21-
/* 80554984 */ void Draw();
22-
/* 80554A18 */ void createHeapCallBack(fopAc_ac_c*);
23-
/* 80554A38 */ void ctrlJointCallBack(J3DJoint*, int);
24-
/* 80554A90 */ void getType();
25-
/* 80554B30 */ void isDelete();
38+
/* 80554138 */ cPhs__Step create();
39+
/* 80554414 */ int CreateHeap();
40+
/* 80554930 */ int Delete();
41+
/* 80554964 */ int Execute();
42+
/* 80554984 */ int Draw();
43+
/* 80554A18 */ static int createHeapCallBack(fopAc_ac_c*);
44+
/* 80554A38 */ static int ctrlJointCallBack(J3DJoint*, int);
45+
/* 80554A90 */ u8 getType();
46+
/* 80554B30 */ BOOL isDelete();
2647
/* 80554CB0 */ void reset();
2748
/* 805552DC */ void srchActors();
28-
/* 80555E38 */ void selectAction();
29-
/* 80555F28 */ void chkAction(int (daNpc_Kolin_c::*)(void*));
30-
/* 80555F54 */ void setAction(int (daNpc_Kolin_c::*)(void*));
49+
/* 80555E38 */ int selectAction();
50+
/* 80555F28 */ BOOL chkAction(actionFunc);
51+
/* 80555F54 */ int setAction(actionFunc);
3152
/* 80555FFC */ void calcFollowSpeedAndAngle(fopAc_ac_c*, int, int);
3253
/* 805563BC */ void followPlayer(int);
3354
/* 805567AC */ void lookup(u8);
34-
/* 805568AC */ void cutNoRide(int);
35-
/* 80556A04 */ void cutHail(int);
36-
/* 80556DB4 */ void cutGiveMeWoodSwd(int);
37-
/* 80557054 */ void cutGetWoodSwd(int);
38-
/* 805576C4 */ void cutConversationAboutLoopHole(int);
39-
/* 805579DC */ void cutCacaricoConversation(int);
40-
/* 80557BD4 */ void cutConversationAboutDeathMt(int);
41-
/* 80557C6C */ void cutConversationAboutGoron(int);
42-
/* 80557D04 */ void cutClothTry(int);
43-
/* 80557E38 */ void cutThankYou(int);
44-
/* 80557ED8 */ void wait(void*);
45-
/* 80558698 */ void timidWalk(void*);
46-
/* 80558AF8 */ void follow(void*);
47-
/* 80558C4C */ void clothWait(void*);
48-
/* 80558E90 */ void talk(void*);
49-
/* 8055A3B8 */ daNpc_Kolin_c(daNpcT_faceMotionAnmData_c const*, daNpcT_motionAnmData_c const*,
50-
daNpcT_MotionSeqMngr_c::sequenceStepData_c const*, int,
51-
daNpcT_MotionSeqMngr_c::sequenceStepData_c const*, int,
52-
daNpcT_evtData_c const*, char**);
53-
54-
/* 8055A4B8 */ virtual int checkChangeJoint(int);
55-
/* 8055A4C8 */ virtual int checkRemoveJoint(int);
56-
/* 8055A4B0 */ virtual s32 getBackboneJointNo();
57-
/* 8055A4A8 */ virtual s32 getNeckJointNo();
58-
/* 8055A4A0 */ virtual s32 getHeadJointNo();
59-
/* 8055A4D8 */ virtual s32 getFootLJointNo();
60-
/* 8055A4E0 */ virtual s32 getFootRJointNo();
61-
/* 8055A498 */ virtual u16 getEyeballMaterialNo();
55+
/* 805568AC */ int cutNoRide(int);
56+
/* 80556A04 */ int cutHail(int);
57+
/* 80556DB4 */ int cutGiveMeWoodSwd(int);
58+
/* 80557054 */ int cutGetWoodSwd(int);
59+
/* 805576C4 */ int cutConversationAboutLoopHole(int);
60+
/* 805579DC */ int cutCacaricoConversation(int);
61+
/* 80557BD4 */ int cutConversationAboutDeathMt(int);
62+
/* 80557C6C */ int cutConversationAboutGoron(int);
63+
/* 80557D04 */ int cutClothTry(int);
64+
/* 80557E38 */ int cutThankYou(int);
65+
/* 80557ED8 */ int wait(void*);
66+
/* 80558698 */ int timidWalk(void*);
67+
/* 80558AF8 */ int follow(void*);
68+
/* 80558C4C */ int clothWait(void*);
69+
/* 80558E90 */ int talk(void*);
70+
/* 8055A3B8 */ daNpc_Kolin_c(
71+
daNpcT_faceMotionAnmData_c const* i_faceMotionAnmData,
72+
daNpcT_motionAnmData_c const* i_motionAnmData,
73+
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_faceMotionSequenceData,
74+
int i_faceMotionStepNum,
75+
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData,
76+
int i_motionStepNum,
77+
daNpcT_evtData_c const* i_evtData,
78+
char** i_arcNames)
79+
: daNpcT_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
80+
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
81+
i_arcNames) {}
82+
/* 8055A4B8 */ virtual int checkChangeJoint(int i_joint) { return i_joint == 4; }
83+
/* 8055A4C8 */ virtual int checkRemoveJoint(int i_joint) { return i_joint == 8; }
84+
/* 8055A4B0 */ virtual s32 getBackboneJointNo() { return 1; }
85+
/* 8055A4A8 */ virtual s32 getNeckJointNo() { return 3; }
86+
/* 8055A4A0 */ virtual s32 getHeadJointNo() { return 4; }
87+
/* 8055A4D8 */ virtual s32 getFootLJointNo() { return 22; }
88+
/* 8055A4E0 */ virtual s32 getFootRJointNo() { return 25; }
89+
/* 8055A498 */ virtual u16 getEyeballMaterialNo() { return 2; }
6290
/* 80554EBC */ virtual void afterJntAnm(int);
6391
/* 80554F48 */ virtual void setParam();
6492
/* 80555118 */ virtual BOOL checkChangeEvt();
@@ -74,11 +102,25 @@ class daNpc_Kolin_c : public daNpcT_c {
74102
/* 80555DC4 */ virtual void changeAnm(int*, int*);
75103
/* 80555DEC */ virtual void changeBck(int*, int*);
76104

77-
static void* mCutNameList[11];
78-
static u8 mCutList[132];
105+
static char* mCutNameList[11];
106+
static cutFunc mCutList[11];
107+
108+
u32 getFlowNodeNo() {
109+
u16 nodeNo = home.angle.x;
110+
u32 rv;
111+
if (nodeNo == 0xffff) {
112+
rv = -1;
113+
} else {
114+
rv = nodeNo;
115+
}
116+
return rv;
117+
}
118+
119+
u32 getPathID() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; }
120+
u32 getBitSW() { return (fopAcM_GetParam(this) & 0xFF0000) >> 16; }
79121

80122
BOOL orderNoRideEvt() {
81-
if (field_0xf84 == 11) {
123+
if (mType == 11) {
82124
s16 var_r28 = (s16)(fopAcM_searchPlayerAngleY(this) - home.angle.y);
83125
int var_r29 = 3;
84126

@@ -103,19 +145,30 @@ class daNpc_Kolin_c : public daNpcT_c {
103145
}
104146

105147
private:
106-
/* 0x0E40 */ u8 field_0xe40[0xF84 - 0xE40];
107-
/* 0x0F84 */ u8 field_0xf84;
108-
/* 0x0F85 */ u8 field_0xf85[0x1020 - 0xF85];
148+
/* 0x0E40 */ u8 field_0xe40[0xe44 - 0xe40];
149+
/* 0x0E44 */ J3DModel* mpClothModel;
150+
/* 0x0E48 */ dCcD_Cyl field_0xe48;
151+
/* 0x0F84 */ u8 mType;
152+
/* 0x0F88 */ daNpcT_ActorMngr_c mActorMngr[5];
153+
/* 0x0FB0 */ daNpcT_Path_c mPath;
154+
/* 0x0FD8 */ actionFunc mNextAction;
155+
/* 0x0FE4 */ actionFunc mAction;
156+
/* 0x0FF0 */ u8 field_0xff0[0xffc - 0xff0];
157+
/* 0x0FFC */ int field_0xffc;
158+
/* 0x1000 */ int field_0x1000;
159+
/* 0x1004 */ int field_0x1004;
160+
/* 0x1008 */ int field_0x1008;
161+
/* 0x100C */ u8 field_0x100c[0x1010 - 0x100c];
162+
/* 0x1010 */ f32 field_0x1010;
163+
/* 0x1014 */ u8 field_0x1014;
164+
/* 0x1015 */ u8 field_0x1015;
165+
/* 0x1016 */ u8 field_0x1016;
166+
/* 0x1017 */ u8 field_0x1017;
167+
/* 0x1018 */ u8 field_0x1018;
168+
/* 0x1019 */ u8 field_0x1019[0x101c - 0x1019];
169+
/* 0x101C */ u8 field_0x101c;
109170
};
110171

111172
STATIC_ASSERT(sizeof(daNpc_Kolin_c) == 0x1020);
112173

113-
class daNpc_Kolin_Param_c {
114-
public:
115-
/* 8055A4E8 */ ~daNpc_Kolin_Param_c();
116-
117-
static u8 const m[160];
118-
};
119-
120-
121174
#endif /* D_A_NPC_KOLIN_H */

0 commit comments

Comments
 (0)