Skip to content

Commit 52b23ad

Browse files
authored
d_a_e_zs (a.k.a. Stallord's zombie soldiers) equivalent (#2313)
* Initial work for d_a_e_zs * d_a_e_zs equivalent * d_a_e_zs data fixes. Thanks Taka! * Update d_a_e_zs based on Taka's comments
1 parent fb45587 commit 52b23ad

File tree

6 files changed

+579
-519
lines changed

6 files changed

+579
-519
lines changed

config/GZ2E01/rels/d_a_e_zs/splits.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ REL/global_destructor_chain.c:
1717
d/actor/d_a_e_zs.cpp:
1818
.text start:0x000000EC end:0x000022FC
1919
.ctors start:0x00000000 end:0x00000004
20-
.rodata start:0x00000000 end:0x0000007C
20+
.rodata start:0x00000000 end:0x00000079
2121
.data start:0x00000000 end:0x0000014C
22-
.bss start:0x00000008 end:0x0000002C
22+
.bss start:0x00000008 end:0x0000002A

config/GZ2E01/rels/d_a_e_zs/symbols.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ __register_global_object = .text:0x00000078; // type:function size:0x1C scope:gl
55
__destroy_global_chain = .text:0x00000094; // type:function size:0x58 scope:global
66
__ct__12daE_ZS_HIO_cFv = .text:0x000000EC; // type:function size:0x30 scope:global
77
draw__8daE_ZS_cFv = .text:0x0000011C; // type:function size:0xE8 scope:global
8-
daE_ZS_Draw__FP8daE_ZS_c = .text:0x00000204; // type:function size:0x20 scope:global
8+
daE_ZS_Draw__FP8daE_ZS_c = .text:0x00000204; // type:function size:0x20 scope:local
99
setBck__8daE_ZS_cFiUcff = .text:0x00000224; // type:function size:0xAC scope:global
1010
setActionMode__8daE_ZS_cFii = .text:0x000002D0; // type:function size:0xC scope:global
1111
damage_check__8daE_ZS_cFv = .text:0x000002DC; // type:function size:0x3B0 scope:global
12-
s_BossSearch__FPvPv = .text:0x0000068C; // type:function size:0x4C scope:global
12+
s_BossSearch__FPvPv = .text:0x0000068C; // type:function size:0x4C scope:local
1313
mBossHandCheck__8daE_ZS_cFv = .text:0x000006D8; // type:function size:0x2CC scope:global
1414
executeAppear__8daE_ZS_cFv = .text:0x000009A4; // type:function size:0x3CC scope:global
1515
executeWait__8daE_ZS_cFv = .text:0x00000D70; // type:function size:0x1EC scope:global
@@ -19,19 +19,19 @@ action__8daE_ZS_cFv = .text:0x00001308; // type:function size:0x1B0 scope:global
1919
mtx_set__8daE_ZS_cFv = .text:0x000014B8; // type:function size:0xA0 scope:global
2020
cc_set__8daE_ZS_cFv = .text:0x00001558; // type:function size:0x138 scope:global
2121
execute__8daE_ZS_cFv = .text:0x00001690; // type:function size:0x6C scope:global
22-
daE_ZS_Execute__FP8daE_ZS_c = .text:0x000016FC; // type:function size:0x20 scope:global
23-
daE_ZS_IsDelete__FP8daE_ZS_c = .text:0x0000171C; // type:function size:0x8 scope:global
22+
daE_ZS_Execute__FP8daE_ZS_c = .text:0x000016FC; // type:function size:0x20 scope:local
23+
daE_ZS_IsDelete__FP8daE_ZS_c = .text:0x0000171C; // type:function size:0x8 scope:local
2424
_delete__8daE_ZS_cFv = .text:0x00001724; // type:function size:0x74 scope:global
25-
daE_ZS_Delete__FP8daE_ZS_c = .text:0x00001798; // type:function size:0x20 scope:global
25+
daE_ZS_Delete__FP8daE_ZS_c = .text:0x00001798; // type:function size:0x20 scope:local
2626
CreateHeap__8daE_ZS_cFv = .text:0x000017B8; // type:function size:0xEC scope:global
27-
useHeapInit__FP10fopAc_ac_c = .text:0x000018A4; // type:function size:0x20 scope:global
27+
useHeapInit__FP10fopAc_ac_c = .text:0x000018A4; // type:function size:0x20 scope:local
2828
create__8daE_ZS_cFv = .text:0x000018C4; // type:function size:0x324 scope:global
2929
__dt__8cM3dGCylFv = .text:0x00001BE8; // type:function size:0x48 scope:global
3030
__dt__8cM3dGAabFv = .text:0x00001C30; // type:function size:0x48 scope:global
3131
__dt__10dCcD_GSttsFv = .text:0x00001C78; // type:function size:0x5C scope:global
3232
__dt__12dBgS_ObjAcchFv = .text:0x00001CD4; // type:function size:0x70 scope:global
3333
__dt__12dBgS_AcchCirFv = .text:0x00001D44; // type:function size:0x70 scope:global
34-
daE_ZS_Create__FP8daE_ZS_c = .text:0x00001DB4; // type:function size:0x20 scope:global
34+
daE_ZS_Create__FP8daE_ZS_c = .text:0x00001DB4; // type:function size:0x20 scope:local
3535
__dt__10cCcD_GSttsFv = .text:0x00001DD4; // type:function size:0x48 scope:global
3636
__dt__12daE_ZS_HIO_cFv = .text:0x00001E1C; // type:function size:0x48 scope:global
3737
__sinit_d_a_e_zs_cpp = .text:0x00001E64; // type:function size:0x3C scope:local
@@ -71,16 +71,16 @@ _dtors = .dtors:0x00000000; // type:label scope:global
7171
@4649 = .rodata:0x00000070; // type:object size:0x4 scope:local
7272
@stringBase0 = .rodata:0x00000074; // type:object size:0x5 scope:local data:string_table
7373
...data.0 = .data:0x00000000; // type:label scope:local
74-
cNullVec__6Z2Calc = .data:0x00000000; // type:object size:0xC scope:global
74+
cNullVec__6Z2Calc = .data:0x00000000; // type:object size:0xC scope:local
7575
@1787 = .data:0x0000000C; // type:object size:0x4 scope:local
7676
e_prim$3788 = .data:0x00000020; // type:object size:0x8 scope:local
7777
e_env$3789 = .data:0x00000028; // type:object size:0x8 scope:local
7878
eff_id$3797 = .data:0x00000030; // type:object size:0x6 scope:local
79-
cc_zs_src__22@unnamed@d_a_e_zs_cpp@ = .data:0x00000038; // type:object size:0x44 scope:global
79+
cc_zs_src__22@unnamed@d_a_e_zs_cpp@ = .data:0x00000038; // type:object size:0x44 scope:local
8080
eff_Damage_id$3979 = .data:0x0000007C; // type:object size:0x6 scope:local
8181
eff_Appear_id$4194 = .data:0x00000084; // type:object size:0x4 scope:local
8282
w_eff_id$4324 = .data:0x00000088; // type:object size:0x8 scope:local
83-
l_daE_ZS_Method = .data:0x00000090; // type:object size:0x20 scope:global
83+
l_daE_ZS_Method = .data:0x00000090; // type:object size:0x20 scope:local
8484
g_profile_E_ZS = .data:0x000000B0; // type:object size:0x30 scope:global
8585
__vt__12dBgS_AcchCir = .data:0x000000E0; // type:object size:0xC scope:global
8686
__vt__10cCcD_GStts = .data:0x000000EC; // type:object size:0xC scope:global
@@ -90,8 +90,8 @@ __vt__8cM3dGAab = .data:0x00000110; // type:object size:0xC scope:global
9090
__vt__12dBgS_ObjAcch = .data:0x0000011C; // type:object size:0x24 scope:global
9191
__vt__12daE_ZS_HIO_c = .data:0x00000140; // type:object size:0xC scope:global
9292
__global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global
93-
lbl_259_bss_8 = .bss:0x00000008; // type:object size:0x1 data:byte
93+
lbl_259_bss_8 = .bss:0x00000008; // type:object size:0x1 scope:local data:byte
9494
@3925 = .bss:0x0000000C; // type:object size:0xC scope:local
95-
l_HIO = .bss:0x00000018; // type:object size:0x10 scope:global data:byte
96-
lbl_259_bss_28 = .bss:0x00000028; // type:object size:0x1 data:byte
97-
lbl_259_bss_29 = .bss:0x00000029; // type:object size:0x1 data:byte
95+
l_HIO = .bss:0x00000018; // type:object size:0x10 scope:local data:byte
96+
lbl_259_bss_28 = .bss:0x00000028; // type:object size:0x1 scope:local data:byte
97+
lbl_259_bss_29 = .bss:0x00000029; // type:object size:0x1 scope:local data:byte

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1691,7 +1691,7 @@ def MatchingFor(*versions):
16911691
ActorRel(NonMatching, "d_a_e_yr"),
16921692
ActorRel(NonMatching, "d_a_e_zh"),
16931693
ActorRel(NonMatching, "d_a_e_zm"),
1694-
ActorRel(NonMatching, "d_a_e_zs"),
1694+
ActorRel(Equivalent, "d_a_e_zs"),
16951695
ActorRel(MatchingFor("GZ2E01"), "d_a_formation_mng"),
16961696
ActorRel(MatchingFor("GZ2E01"), "d_a_guard_mng"),
16971697
ActorRel(NonMatching, "d_a_horse"),

include/d/actor/d_a_b_ds.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,15 @@ class daB_DS_c : public fopEn_enemy_c {
178178
/* 805DB974 */ cPhs__Step create();
179179
/* 805DC1E8 */ daB_DS_c();
180180

181+
cXyz getHandPosR();
182+
cXyz getHandPosL();
183+
BOOL isOpening() { return mAction == ACT_OPENING_DEMO; }
184+
bool isDemo() { return mIsDemo; }
185+
bool isAppear() { return mIsAppear; }
186+
bool isAppearG() { return mIsAppearG; }
187+
bool isDead() { return mDead; }
188+
bool isArg0() { return arg0; }
189+
181190
private:
182191
/* 0x05AC */ request_of_phase_process_class mPhase;
183192
/* 0x05B4 */ mDoExt_McaMorfSO* mpMorf;
@@ -321,6 +330,9 @@ class daB_DS_c : public fopEn_enemy_c {
321330
/* 0x2EDC */ dMsgFlow_c mMsgFlow;
322331
};
323332

333+
cXyz daB_DS_c::getHandPosR() { return mHandPos[1]; }
334+
cXyz daB_DS_c::getHandPosL() { return mHandPos[0]; }
335+
324336
STATIC_ASSERT(sizeof(daB_DS_c) == 0x2F28);
325337

326338
class daB_DS_HIO_c {

include/d/actor/d_a_e_zs.h

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#ifndef D_A_E_ZS_H
22
#define D_A_E_ZS_H
33

4-
#include "f_op/f_op_actor_mng.h"
4+
#include "d/d_bg_s_acch.h"
5+
#include "d/d_cc_d.h"
6+
#include "f_op/f_op_actor.h"
57

68
/**
79
* @ingroup actors-enemies
@@ -12,32 +14,68 @@
1214
*
1315
*/
1416
class daE_ZS_c : public fopEn_enemy_c {
15-
/* 808330DC */ void draw();
17+
public:
18+
enum daE_ZS_Action {
19+
/* 0 */ ACT_APPEAR,
20+
/* 1 */ ACT_WAIT,
21+
/* 2 */ ACT_DAMAGE,
22+
/* 3 */ ACT_DRIVE
23+
};
24+
25+
/* 808330DC */ int draw();
1626
/* 808331E4 */ void setBck(int, u8, f32, f32);
1727
/* 80833290 */ void setActionMode(int, int);
1828
/* 8083329C */ void damage_check();
19-
/* 80833698 */ void mBossHandCheck();
29+
/* 80833698 */ u8 mBossHandCheck();
2030
/* 80833964 */ void executeAppear();
2131
/* 80833D30 */ void executeWait();
2232
/* 80833F1C */ void executeDamage();
2333
/* 80834108 */ void executeDrive();
2434
/* 808342C8 */ void action();
2535
/* 80834478 */ void mtx_set();
2636
/* 80834518 */ void cc_set();
27-
/* 80834650 */ void execute();
28-
/* 808346E4 */ void _delete();
29-
/* 80834778 */ void CreateHeap();
30-
/* 80834884 */ void create();
37+
/* 80834650 */ int execute();
38+
/* 808346E4 */ int _delete();
39+
/* 80834778 */ int CreateHeap();
40+
/* 80834884 */ int create();
3141

3242
private:
33-
/* 0x5ac */ u8 field_0x5ac[0xa3c - 0x5ac];
43+
/* 0x5ac */ request_of_phase_process_class mPhase;
44+
/* 0x5b4 */ mDoExt_McaMorfSO* mpMorf;
45+
/* 0x5b8 */ Z2CreatureEnemy mSound;
46+
/* 0x65c */ f32 field_0x65c;
47+
/* 0x660 */ int mAction;
48+
/* 0x664 */ int mMode;
49+
/* 0x668 */ int mResIndex;
50+
/* 0x66c */ u32 mShadowKey;
51+
/* 0x670 */ u8 field_0x670;
52+
/* 0x671 */ u8 field_0x671;
53+
/* 0x672 */ u8 field_0x672;
54+
/* 0x673 */ u8 field_0x673;
55+
/* 0x674 */ dBgS_AcchCir mAcchCir;
56+
/* 0x6b4 */ dBgS_ObjAcch mAcch;
57+
/* 0x88c */ dCcD_Stts mStts;
58+
/* 0x8c8 */ dCcD_Cyl mCyl;
59+
/* 0xa04 */ cCcD_Obj* mpCollider;
60+
/* 0xa08 */ u8 field_0xa08[0xa0c - 0xa08];
61+
/* 0xa0c */ Z2CreatureEnemy* mpSound;
62+
/* 0xa10 */ u8 field_0xa10[0xa22 - 0xa10];
63+
/* 0xa22 */ s8 field_0xa22;
64+
/* 0xa23 */ u8 field_0xa23[0xa28 - 0xa23];
65+
/* 0xa28 */ u8 field_0xa28;
66+
/* 0xa29 */ u8 field_0xa29[0xa3c - 0xa29];
3467
};
3568

3669
STATIC_ASSERT(sizeof(daE_ZS_c) == 0xa3c);
3770

3871
class daE_ZS_HIO_c {
72+
public:
3973
/* 808330AC */ daE_ZS_HIO_c();
40-
/* 80834DDC */ ~daE_ZS_HIO_c();
74+
/* 80834DDC */ virtual ~daE_ZS_HIO_c() {}
75+
76+
/* 0x4 */ s8 field_0x4;
77+
/* 0x8 */ f32 field_0x8;
78+
/* 0xc */ f32 field_0xc;
4179
};
4280

4381

0 commit comments

Comments
 (0)