Skip to content

Commit 8e55b79

Browse files
authored
d_a_npc_zelR almost matching (#2380)
* Initial work * Generak work * Almost matching * Pull request cleanup
1 parent 32173fa commit 8e55b79

File tree

3 files changed

+618
-1080
lines changed

3 files changed

+618
-1080
lines changed

include/d/actor/d_a_npc.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,12 @@ class daNpcT_DmgStagger_c {
308308
s16 getAngleZ(int idx) { return field_0x0[idx].z; }
309309
int checkRebirth() { return mRebirth; }
310310

311+
void setPower(f32 mPower) {
312+
for (int i = 0; i < 2; i++) {
313+
field_0xc[i] = mPower;
314+
}
315+
}
316+
311317
private:
312318
/* 0x00 */ csXyz field_0x0[2];
313319
/* 0x0C */ f32 field_0xc[2];

include/d/actor/d_a_npc_zelR.h

Lines changed: 91 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,63 +11,121 @@
1111
* @details
1212
*
1313
*/
14-
class daNpc_ZelR_c : public fopAc_ac_c {
14+
class daNpc_ZelR_c : public daNpcT_c {
1515
public:
16+
typedef BOOL (daNpc_ZelR_c::*ActionFn)(void*);
17+
typedef BOOL (daNpc_ZelR_c::*EventFn)(int);
18+
19+
enum Type {
20+
TYPE_0,
21+
TYPE_1,
22+
};
23+
1624
/* 80B6EE2C */ ~daNpc_ZelR_c();
17-
/* 80B6EF64 */ void create();
18-
/* 80B6F1F8 */ void CreateHeap();
19-
/* 80B6F664 */ void Delete();
20-
/* 80B6F698 */ void Execute();
21-
/* 80B6F6B8 */ void Draw();
22-
/* 80B6F77C */ void createHeapCallBack(fopAc_ac_c*);
23-
/* 80B6F79C */ void ctrlJointCallBack(J3DJoint*, int);
24-
/* 80B6F7F4 */ void getType();
25-
/* 80B6F814 */ void getFlowNodeNo();
26-
/* 80B6F830 */ void getPath();
27-
/* 80B6F83C */ void isDelete();
25+
/* 80B6EF64 */ int create();
26+
/* 80B6F1F8 */ int CreateHeap();
27+
/* 80B6F664 */ int Delete();
28+
/* 80B6F698 */ int Execute();
29+
/* 80B6F6B8 */ int Draw();
30+
/* 80B6F77C */ static int createHeapCallBack(fopAc_ac_c*);
31+
/* 80B6F79C */ static int ctrlJointCallBack(J3DJoint*, int);
32+
/* 80B6F7F4 */ u8 getType();
33+
/* 80B6F814 */ u32 getFlowNodeNo();
34+
/* 80B6F830 */ u8 getPath();
35+
/* 80B6F83C */ int isDelete();
2836
/* 80B6F894 */ void reset();
2937
/* 80B6FA10 */ void afterJntAnm(int);
30-
/* 80B6FA9C */ void ctrlBtk();
38+
/* 80B6FA9C */ BOOL ctrlBtk();
3139
/* 80B6FBA8 */ void setParam();
3240
/* 80B6FC9C */ void setAfterTalkMotion();
3341
/* 80B6FCFC */ void srchActors();
34-
/* 80B6FD00 */ void evtTalk();
35-
/* 80B6FE00 */ void evtCutProc();
42+
/* 80B6FD00 */ BOOL evtTalk();
43+
/* 80B6FE00 */ BOOL evtCutProc();
3644
/* 80B6FEC8 */ void action();
3745
/* 80B70018 */ void beforeMove();
3846
/* 80B70090 */ void setAttnPos();
3947
/* 80B702B0 */ void setCollision();
40-
/* 80B703E0 */ bool drawDbgInfo();
41-
/* 80B703E8 */ void selectAction();
42-
/* 80B70430 */ void chkAction(int (daNpc_ZelR_c::*)(void*));
43-
/* 80B7045C */ void setAction(int (daNpc_ZelR_c::*)(void*));
44-
/* 80B70504 */ void wait(void*);
45-
/* 80B706B0 */ void talk(void*);
46-
/* 80B71974 */ daNpc_ZelR_c(daNpcT_faceMotionAnmData_c const*, daNpcT_motionAnmData_c const*,
47-
daNpcT_MotionSeqMngr_c::sequenceStepData_c const*, int,
48-
daNpcT_MotionSeqMngr_c::sequenceStepData_c const*, int,
49-
daNpcT_evtData_c const*, char**);
48+
/* 80B703E0 */ int drawDbgInfo();
49+
/* 80B703E8 */ int selectAction();
50+
/* 80B70430 */ int chkAction(int (daNpc_ZelR_c::*)(void*));
51+
/* 80B7045C */ int setAction(int (daNpc_ZelR_c::*)(void*));
52+
/* 80B70504 */ int wait(void*);
53+
/* 80B706B0 */ BOOL talk(void*);
54+
/* 80B71974 */ daNpc_ZelR_c(daNpcT_faceMotionAnmData_c const* param_1, daNpcT_motionAnmData_c const* param_2,
55+
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_3, int param_4,
56+
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_5, int param_6,
57+
daNpcT_evtData_c const* param_7, char** param_8) :
58+
daNpcT_c(param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8)
59+
{}
5060
/* 80B71A34 */ s32 getEyeballRMaterialNo();
5161
/* 80B71A3C */ s32 getEyeballLMaterialNo();
5262
/* 80B71A44 */ s32 getHeadJointNo();
53-
/* 80B71A4C */ bool getBackboneJointNo();
54-
/* 80B71A54 */ void checkChangeJoint(int);
55-
/* 80B71A64 */ void checkRemoveJoint(int);
63+
/* 80B71A4C */ s32 getBackboneJointNo();
64+
/* 80B71A54 */ BOOL checkChangeJoint(int param_1) { return param_1 == 3; };
65+
/* 80B71A64 */ BOOL checkRemoveJoint(int param_1) { return param_1 == 13; };
5666

57-
static void* mCutNameList;
58-
static u8 mCutList[12];
67+
static char* mCutNameList;
68+
static EventFn mCutList[1];
5969

6070
private:
61-
/* 0x568 */ u8 field_0x568[0xfc8 - 0x568];
71+
/* 0xE40 */ u8 field_0xe40[0xe44 - 0xe40];
72+
/* 0xE44 */ dCcD_Cyl mCyl;
73+
/* 0xF80 */ u8 mType;
74+
/* 0xF81 */ u8 field_0xf81[0xf84 - 0xf81];
75+
/* 0xF84 */ ActionFn field_0xf84;
76+
/* 0xF90 */ ActionFn field_0xf90;
77+
/* 0xF9C */ daNpcT_Path_c mPath;
78+
/* 0xFBE */ int field_0xfc4;
6279
};
6380

6481
STATIC_ASSERT(sizeof(daNpc_ZelR_c) == 0xfc8);
6582

6683
class daNpc_ZelR_Param_c {
6784
public:
68-
/* 80B71A74 */ ~daNpc_ZelR_Param_c();
85+
/* 80B71A74 */ virtual ~daNpc_ZelR_Param_c() {};
86+
87+
struct Data {
88+
/* 0x00 */ f32 field_0x0;
89+
/* 0x04 */ f32 mGravity;
90+
/* 0x08 */ f32 field_0x8;
91+
/* 0x0C */ f32 field_0xc;
92+
/* 0x10 */ f32 mWeight;
93+
/* 0x14 */ f32 mCylH;
94+
/* 0x18 */ f32 mWallH;
95+
/* 0x1C */ f32 mWallR;
96+
/* 0x20 */ f32 field_0x20;
97+
/* 0x24 */ f32 field_0x24;
98+
/* 0x28 */ f32 field_0x28;
99+
/* 0x2C */ f32 field_0x2c;
100+
/* 0x30 */ f32 field_0x30;
101+
/* 0x34 */ f32 field_0x34;
102+
/* 0x38 */ f32 field_0x38;
103+
/* 0x3C */ f32 field_0x3c;
104+
/* 0x40 */ f32 field_0x40;
105+
/* 0x44 */ f32 mMorfFrames;
106+
/* 0x48 */ s16 field_0x48;
107+
/* 0x4A */ s16 field_0x4a;
108+
/* 0x4C */ s16 field_0x4c;
109+
/* 0x4E */ s16 field_0x4e;
110+
/* 0x50 */ f32 field_0x50;
111+
/* 0x54 */ f32 field_0x54;
112+
/* 0x58 */ f32 field_0x58;
113+
/* 0x5C */ f32 field_0x5c;
114+
/* 0x60 */ s16 field_0x60;
115+
/* 0x62 */ s16 field_0x62;
116+
/* 0x64 */ f32 field_0x64;
117+
/* 0x68 */ f32 field_0x68;
118+
/* 0x6C */ f32 field_0x6c;
119+
/* 0x70 */ f32 field_0x70;
120+
/* 0x74 */ f32 field_0x74;
121+
/* 0x78 */ f32 field_0x78;
122+
/* 0x7C */ f32 field_0x7c;
123+
/* 0x80 */ f32 field_0x80;
124+
/* 0x84 */ f32 field_0x84;
125+
/* 0x88 */ f32 field_0x88;
126+
};
69127

70-
static u8 const m[140];
128+
static const Data m;
71129
};
72130

73131

0 commit comments

Comments
 (0)