Skip to content

Commit bfeb1c0

Browse files
authored
d_a_e_zm matching (#2638)
* initial work * a little more work * matching * pr cleanup * changed 'subtype' to 'argument' * fixed debug error
1 parent 1e50c25 commit bfeb1c0

24 files changed

+1047
-734
lines changed

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1779,7 +1779,7 @@ def MatchingFor(*versions) -> bool:
17791779
ActorRel(MatchingFor("GZ2E01", "GZ2J01"), "d_a_e_ymb"),
17801780
ActorRel(MatchingFor("GZ2E01", "GZ2J01"), "d_a_e_yr"),
17811781
ActorRel(NonMatching, "d_a_e_zh"),
1782-
ActorRel(NonMatching, "d_a_e_zm"),
1782+
ActorRel(MatchingFor("GZ2E01", "GZ2J01"), "d_a_e_zm"),
17831783
ActorRel(MatchingFor("GZ2E01", "GZ2J01"), "d_a_e_zs"),
17841784
ActorRel(MatchingFor("GZ2E01", "GZ2J01"), "d_a_formation_mng"),
17851785
ActorRel(MatchingFor("GZ2E01", "GZ2J01"), "d_a_guard_mng"),

include/d/actor/d_a_e_zm.h

Lines changed: 52 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#ifndef D_A_E_ZM_H
22
#define D_A_E_ZM_H
33

4+
#include "d/d_bg_s_acch.h"
5+
#include "d/d_cc_d.h"
6+
#include "d/d_cc_uty.h"
47
#include "f_op/f_op_actor_mng.h"
58

69
/**
@@ -10,13 +13,15 @@
1013
*
1114
* @details
1215
*
13-
*/
16+
*/
17+
1418
class daE_ZM_c : public fopEn_enemy_c {
15-
/* 8082F9A0 */ void draw();
19+
public:
20+
/* 8082F9A0 */ int draw();
1621
/* 8082FBD4 */ void setBck(int, u8, f32, f32);
1722
/* 8082FC80 */ void setActionMode(int, int);
1823
/* 8082FC8C */ void damage_check();
19-
/* 808301E0 */ void mCutTypeCheck();
24+
/* 808301E0 */ bool mCutTypeCheck();
2025
/* 8083033C */ void executeSearchPoint();
2126
/* 80830398 */ void executeWait();
2227
/* 808309DC */ void executeMove();
@@ -27,21 +32,52 @@ class daE_ZM_c : public fopEn_enemy_c {
2732
/* 80831930 */ void action();
2833
/* 80831B08 */ void mtx_set();
2934
/* 80831B9C */ void cc_set();
30-
/* 80831D64 */ void execute();
31-
/* 80831E9C */ void _delete();
32-
/* 80831F4C */ void CreateHeap();
33-
/* 80832064 */ void create();
34-
35-
private:
36-
/* 0x5ac */ u8 field_0x5ac[0xc3c - 0x5ac];
37-
};
35+
/* 80831D64 */ int execute();
36+
/* 80831E9C */ int _delete();
37+
/* 80831F4C */ int CreateHeap();
38+
/* 80832064 */ cPhs__Step create();
3839

39-
STATIC_ASSERT(sizeof(daE_ZM_c) == 0xc3c);
40-
41-
class daE_ZM_HIO_c {
42-
/* 8082F94C */ daE_ZM_HIO_c();
43-
/* 80832800 */ ~daE_ZM_HIO_c();
40+
/* 0x5AC */ request_of_phase_process_class mPhase;
41+
/* 0x5B4 */ mDoExt_McaMorfSO* mpModelMorf;
42+
/* 0x5B8 */ Z2CreatureEnemy mSound;
43+
/* 0x65C */ int mAction;
44+
/* 0x660 */ int mMode;
45+
/* 0x664 */ u8 field_0x664[0x668 - 0x664];
46+
/* 0x668 */ int mAnm;
47+
/* 0x66C */ cXyz field_0x66c[10];
48+
/* 0x6E4 */ u8 field_0x6e4;
49+
/* 0x6E5 */ u8 field_0x6e5;
50+
/* 0x6E6 */ u8 field_0x6e6[0x6f4 - 0x6e6];
51+
/* 0x6F4 */ cXyz field_0x6f4;
52+
/* 0x700 */ csXyz field_0x700;
53+
/* 0x708 */ f32 mColor[3];
54+
/* 0x714 */ f32 field_0x714;
55+
/* 0x718 */ f32 field_0x718;
56+
/* 0x71C */ f32 field_0x71c;
57+
/* 0x720 */ s16 field_0x720;
58+
/* 0x722 */ u8 field_0x722;
59+
/* 0x723 */ u8 field_0x723;
60+
/* 0x724 */ u8 field_0x724;
61+
/* 0x725 */ u8 mTimer;
62+
/* 0x726 */ u8 arg0;
63+
/* 0x727 */ u8 arg1;
64+
/* 0x728 */ u8 arg2;
65+
/* 0x729 */ u8 bitSw;
66+
/* 0x72A */ u8 bitSw2;
67+
/* 0x72B */ u8 field_0x72b;
68+
/* 0x72C */ u8 field_0x72c;
69+
/* 0x72D */ u8 field_0x72d;
70+
/* 0x730 */ u32 field_0x730[3];
71+
/* 0x73C */ dBgS_AcchCir mAcchCir;
72+
/* 0x77C */ dBgS_ObjAcch mBgc;
73+
/* 0x954 */ dCcD_Stts mStts;
74+
/* 0x990 */ dCcD_Cyl mCyl;
75+
/* 0xACC */ dCcD_Sph mSph;
76+
/* 0xC04 */ dCcU_AtInfo mAtInfo;
77+
/* 0xC28 */ bool field_0xc28;
78+
/* 0xC29 */ u8 field_0xc29[0xc3c - 0xc29];
4479
};
4580

81+
STATIC_ASSERT(sizeof(daE_ZM_c) == 0xc3c);
4682

4783
#endif /* D_A_E_ZM_H */

include/d/actor/d_a_npc_cdn3.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class daNpcCdn3_c : public daNpcCd2_c {
139139
int getGroupID() { return fopAcM_GetParam(this) & 0xff; }
140140
u8 getPathID() { return fopAcM_GetParam(this) >> 24; }
141141
int isStop() { return TRUE; }
142-
int getType() { return subtype & 0x7f; }
142+
int getType() { return argument & 0x7f; }
143143
int getSeqNum() { return shape_angle.x & 0x3f; }
144144
int getFlowNodeNum() { return shape_angle.z; }
145145
u16 getStartTime() { return (fopAcM_GetParam(this) >> 8) & 0xff; }

include/d/actor/d_a_npc_wrestler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class daNpcWrestler_c : public daNpcF_c {
211211

212212
s16 getMessageNo() { return (fopAcM_GetParam(this) >> 8) & 0xFFFF; }
213213
int getWrestlerAction() { return mWrestlerAction; }
214-
u8 getType() { return subtype & 0x7F; }
214+
u8 getType() { return argument & 0x7F; }
215215
u8 getWrestlerType() { return getType(); }
216216
bool chkAction(actionFunc i_action) { return i_action == field_0xdcc; }
217217
bool selectAction();

include/d/actor/d_a_obj_kago.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class daObj_Kago_c : public fopAc_ac_c {
3737
int iVar1 = fopAcM_GetParam(this) & 0xFF;
3838
u8 rv;
3939

40-
switch ((subtype & 127)) {
40+
switch ((argument & 127)) {
4141
case 0:
4242
switch (iVar1) {
4343
case 0:

include/d/actor/d_a_obj_sekizoa.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class daObj_Sekizoa_c : public daNpcT_c {
159159
int prm = fopAcM_GetParam(this) >> 0x1C;
160160

161161
u8 type;
162-
switch (subtype) {
162+
switch (argument) {
163163
case 0:
164164
switch (prm) {
165165
case 1:

include/d/actor/d_a_obj_warp_obrg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class daObjWarpOBrg_c : public dBgS_MoveBgActor {
4646
/* 80D2B5C8 */ virtual int Draw();
4747
/* 80D2B6C0 */ virtual int Delete();
4848

49-
u8 getNameArg() { return subtype; }
49+
u8 getNameArg() { return argument; }
5050
u8 getSwNo() { return fopAcM_GetParamBit(this, 0, 8); }
5151
u8 getSwNo2() { return fopAcM_GetParamBit(this, 8, 8); }
5252
u8 getArg0() { return fopAcM_GetParamBit(this, 16, 8); }

include/d/actor/d_a_obj_yobikusa.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class daObjYobikusa_c : public fopAc_ac_c {
8080
static actionFuncEntry ActionTable[3];
8181

8282
const attributes* attr() const { return &M_attr; }
83-
int getType() { return subtype & 0x7F; }
83+
int getType() { return argument & 0x7F; }
8484
u8 getPathID() { return fopAcM_GetParam(this); }
8585
bool isPlayerCorrect() { return (s8)(u8)(fopAcM_GetParam(this) >> 8) > 0; }
8686

include/d/actor/d_a_passer_mng.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class daPasserMng_c : public fopAc_ac_c {
2323
/* 80D467C0 */ void create_init();
2424
~daPasserMng_c() { delete [] childProcIds; }
2525

26-
u8 getDetailLevel() { return subtype; }
26+
u8 getDetailLevel() { return argument; }
2727
u8 getPathID() { return fopAcM_GetParam(this); }
2828
u8 getIntervalTime() { return fopAcM_GetParam(this) >> 24; }
2929
int getStartTime() { return (fopAcM_GetParam(this) >> 8) & 0xff; }

include/f_op/f_op_actor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ class fopAc_ac_c : public leafdraw_class {
246246
/* 0x496 */ u8 group;
247247
/* 0x497 */ u8 cullType;
248248
/* 0x498 */ u8 demoActorID;
249-
/* 0x499 */ s8 subtype;
249+
/* 0x499 */ s8 argument;
250250
/* 0x49A */ u8 carryType;
251251
/* 0x49C */ u32 actor_status;
252252
/* 0x4A0 */ u32 actor_condition;

0 commit comments

Comments
 (0)