Skip to content

Commit ec9e4cf

Browse files
authored
d_a_e_sb Matching (#2559)
* d_a_e_sb 50% complete * d_a_e_sb 71% done * d_a_e_sb matching * address PR comments
1 parent 2b873ea commit ec9e4cf

File tree

5 files changed

+1130
-980
lines changed

5 files changed

+1130
-980
lines changed

config/GZ2E01/rels/d_a_e_sb/symbols.txt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ __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_SB_HIO_cFv = .text:0x000000EC; // type:function size:0x8C scope:global
77
CreateHeap__8daE_SB_cFv = .text:0x00000178; // type:function size:0xF8 scope:global
8-
useHeapInit__FP10fopAc_ac_c = .text:0x00000270; // type:function size:0x20 scope:global
8+
useHeapInit__FP10fopAc_ac_c = .text:0x00000270; // type:function size:0x20 scope:local
99
initCcCylinder__8daE_SB_cFv = .text:0x00000290; // type:function size:0x60 scope:global
1010
setCcCylinder__8daE_SB_cFv = .text:0x000002F0; // type:function size:0x48 scope:global
1111
ctrlJoint__8daE_SB_cFP8J3DJointP8J3DModel = .text:0x00000338; // type:function size:0xF8 scope:global
12-
JointCallBack__FP8J3DJointi = .text:0x00000430; // type:function size:0x4C scope:global
12+
JointCallBack__FP8J3DJointi = .text:0x00000430; // type:function size:0x4C scope:local
1313
Particle_Set__8daE_SB_cFUs = .text:0x0000047C; // type:function size:0x70 scope:global
1414
SetAnm__8daE_SB_cFiiff = .text:0x000004EC; // type:function size:0xAC scope:global
1515
MemberClear__8daE_SB_cFv = .text:0x00000598; // type:function size:0x5C scope:global
1616
other_bg_check__FP8daE_SB_cP10fopAc_ac_c = .text:0x000005F4; // type:function size:0xD8 scope:global
17-
s_obj_sub__FPvPv = .text:0x000006CC; // type:function size:0x108 scope:global
18-
s_bomb_sub__FPvPv = .text:0x000007D4; // type:function size:0xA0 scope:global
17+
s_obj_sub__FPvPv = .text:0x000006CC; // type:function size:0x108 scope:local
18+
s_bomb_sub__FPvPv = .text:0x000007D4; // type:function size:0xA0 scope:local
1919
Shield_Motion__8daE_SB_cFv = .text:0x00000874; // type:function size:0x15C scope:global
2020
AttackStop__8daE_SB_cFv = .text:0x000009D0; // type:function size:0x50 scope:global
2121
AttackSetSP__8daE_SB_cFv = .text:0x00000A20; // type:function size:0x200 scope:global
@@ -50,16 +50,16 @@ Execute__8daE_SB_cFv = .text:0x00002E30; // type:function size:0x12C scope:globa
5050
Draw__8daE_SB_cFv = .text:0x00002F5C; // type:function size:0x11C scope:global
5151
Delete__8daE_SB_cFv = .text:0x00003078; // type:function size:0x68 scope:global
5252
setBaseMtx__8daE_SB_cFv = .text:0x000030E0; // type:function size:0x78 scope:global
53-
daE_SB_Draw__FP8daE_SB_c = .text:0x00003158; // type:function size:0x20 scope:global
54-
daE_SB_Execute__FP8daE_SB_c = .text:0x00003178; // type:function size:0x20 scope:global
55-
daE_SB_IsDelete__FP8daE_SB_c = .text:0x00003198; // type:function size:0x8 scope:global
56-
daE_SB_Delete__FP8daE_SB_c = .text:0x000031A0; // type:function size:0x20 scope:global
53+
daE_SB_Draw__FP8daE_SB_c = .text:0x00003158; // type:function size:0x20 scope:local
54+
daE_SB_Execute__FP8daE_SB_c = .text:0x00003178; // type:function size:0x20 scope:local
55+
daE_SB_IsDelete__FP8daE_SB_c = .text:0x00003198; // type:function size:0x8 scope:local
56+
daE_SB_Delete__FP8daE_SB_c = .text:0x000031A0; // type:function size:0x20 scope:local
5757
Create__8daE_SB_cFv = .text:0x000031C0; // type:function size:0x438 scope:global
5858
__dt__8cM3dGCylFv = .text:0x000035F8; // type:function size:0x48 scope:global
5959
__dt__8cM3dGSphFv = .text:0x00003640; // type:function size:0x48 scope:global
6060
__dt__8cM3dGAabFv = .text:0x00003688; // type:function size:0x48 scope:global
6161
__dt__12dBgS_ObjAcchFv = .text:0x000036D0; // type:function size:0x70 scope:global
62-
daE_SB_Create__FP10fopAc_ac_c = .text:0x00003740; // type:function size:0x20 scope:global
62+
daE_SB_Create__FP10fopAc_ac_c = .text:0x00003740; // type:function size:0x20 scope:local
6363
__dt__12daE_SB_HIO_cFv = .text:0x00003760; // type:function size:0x48 scope:global
6464
__sinit_d_a_e_sb_cpp = .text:0x000037A8; // type:function size:0x3C scope:local
6565
@36@__dt__12dBgS_ObjAcchFv = .text:0x000037E4; // type:function size:0x8 scope:local
@@ -111,7 +111,7 @@ ccCylSrc$3693 = .rodata:0x0000002C; // type:object size:0x44 scope:local
111111
@4739 = .rodata:0x000000F8; // type:object size:0x4 scope:local
112112
@stringBase0 = .rodata:0x000000FC; // type:object size:0x5 scope:local data:string_table
113113
@4468 = .data:0x00000000; // type:object size:0x1C scope:local
114-
l_daE_SB_Method = .data:0x0000001C; // type:object size:0x20 scope:global
114+
l_daE_SB_Method = .data:0x0000001C; // type:object size:0x20 scope:local
115115
g_profile_E_SB = .data:0x0000003C; // type:object size:0x30 scope:global
116116
__vt__8cM3dGCyl = .data:0x0000006C; // type:object size:0xC scope:global
117117
__vt__8cM3dGSph = .data:0x00000078; // type:object size:0xC scope:global
@@ -136,12 +136,12 @@ __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:globa
136136
@1012 = .bss:0x0000003C; // type:object size:0x1 scope:local
137137
@1010 = .bss:0x00000040; // type:object size:0x1 scope:local
138138
@1009 = .bss:0x00000044; // type:object size:0x1 scope:local
139-
lbl_227_bss_45 = .bss:0x00000045; // type:object size:0x1 data:byte
139+
l_HIOInit = .bss:0x00000045; // type:object size:0x1 scope:local data:byte
140140
@3653 = .bss:0x00000048; // type:object size:0xC scope:local
141-
l_HIO = .bss:0x00000054; // type:object size:0x40 scope:global data:byte
142-
s_Bomb__22@unnamed@d_a_e_sb_cpp@ = .bss:0x00000094; // type:object size:0x4 scope:global data:4byte
143-
s_TargetAngle__22@unnamed@d_a_e_sb_cpp@ = .bss:0x00000098; // type:object size:0x2 scope:global data:2byte
144-
s_LinkPos__22@unnamed@d_a_e_sb_cpp@ = .bss:0x0000009C; // type:object size:0x4 scope:global data:4byte
141+
l_HIO = .bss:0x00000054; // type:object size:0x40 scope:local data:byte
142+
s_Bomb__22@unnamed@d_a_e_sb_cpp@ = .bss:0x00000094; // type:object size:0x4 scope:local data:4byte
143+
s_TargetAngle__22@unnamed@d_a_e_sb_cpp@ = .bss:0x00000098; // type:object size:0x2 scope:local data:2byte
144+
s_LinkPos__22@unnamed@d_a_e_sb_cpp@ = .bss:0x0000009C; // type:object size:0x4 scope:local data:4byte
145145
sInstance__40JASGlobalInstance<19JASDefaultBankTable> = .bss:0x000000A0; // type:object size:0x4 scope:global
146146
sInstance__35JASGlobalInstance<14JASAudioThread> = .bss:0x000000A4; // type:object size:0x4 scope:global
147147
sInstance__27JASGlobalInstance<7Z2SeMgr> = .bss:0x000000A8; // type:object size:0x4 scope:global

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,7 @@ def MatchingFor(*versions) -> bool:
17041704
ActorRel(Equivalent, "d_a_e_rdb"), # weak func order
17051705
ActorRel(Equivalent, "d_a_e_rdy"), # weak func order
17061706
ActorRel(NonMatching, "d_a_e_s1"),
1707-
ActorRel(NonMatching, "d_a_e_sb"),
1707+
ActorRel(MatchingFor("GZ2E01"), "d_a_e_sb"),
17081708
ActorRel(NonMatching, "d_a_e_sf"),
17091709
ActorRel(MatchingFor("GZ2E01"), "d_a_e_sg"),
17101710
ActorRel(NonMatching, "d_a_e_sh"),

include/d/actor/d_a_e_sb.h

Lines changed: 78 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#ifndef D_A_E_SB_H
22
#define D_A_E_SB_H
3+
#include "d/d_bg_s_acch.h"
4+
#include "d/d_cc_d.h"
5+
#include "d/d_cc_uty.h"
36
#include "f_op/f_op_actor_mng.h"
47

58
/**
@@ -11,10 +14,11 @@
1114
*
1215
*/
1316
class daE_SB_c : public fopEn_enemy_c {
14-
/* 807816D8 */ void CreateHeap();
17+
public:
18+
/* 807816D8 */ int CreateHeap();
1519
/* 807817F0 */ void initCcCylinder();
1620
/* 80781850 */ void setCcCylinder();
17-
/* 80781898 */ void ctrlJoint(J3DJoint*, J3DModel*);
21+
/* 80781898 */ int ctrlJoint(J3DJoint*, J3DModel*);
1822
/* 807819DC */ void Particle_Set(u16);
1923
/* 80781A4C */ void SetAnm(int, int, f32, f32);
2024
/* 80781AF8 */ void MemberClear();
@@ -48,20 +52,84 @@ class daE_SB_c : public fopEn_enemy_c {
4852
/* 80783FBC */ void HashiraVib();
4953
/* 80784144 */ void Yazirushi();
5054
/* 807841CC */ void setGroundAngle();
51-
/* 80784390 */ void Execute();
52-
/* 807844BC */ void Draw();
53-
/* 807845D8 */ void Delete();
55+
/* 80784390 */ int Execute();
56+
/* 807844BC */ int Draw();
57+
/* 807845D8 */ int Delete();
5458
/* 80784640 */ void setBaseMtx();
55-
/* 80784720 */ void Create();
59+
/* 80784720 */ cPhs__Step Create();
5660
private:
57-
/* 0x5ac */ u8 field_0x5ac[0xbc0 - 0x5ac];
61+
/* 0x5AC */ int field_0x5ac;
62+
/* 0x5B0 */ int field_0x5b0;
63+
/* 0x5B4 */ int field_0x5b4;
64+
/* 0x5B8 */ int field_0x5b8;
65+
/* 0x5BC */ int field_0x5bc;
66+
/* 0x5C0 */ int field_0x5c0;
67+
/* 0x5C4 */ int field_0x5c4;
68+
/* 0x5C8 */ int field_0x5c8;
69+
/* 0x5CC */ u32 field_0x5cc;
70+
/* 0x5D0 */ u8 field_0x5d0;
71+
/* 0x5D2 */ s16 field_0x5d2;
72+
/* 0x5D1 */ f32 field_0x5d4;
73+
/* 0x5D8 */ csXyz field_0x5d8;
74+
/* 0x5DE */ csXyz field_0x5de;
75+
/* 0x5E4 */ u8 field_0x5e4;
76+
/* 0x5E6 */ s16 field_0x5e6;
77+
/* 0x5E8 */ u8 field_0x5e8;
78+
public:
79+
/* 0x5EC */ cXyz* field_0x5ec;
80+
/* 0x5F0 */ f32 field_0x5f0;
81+
private:
82+
/* 0x5F4 */ cXyz field_0x5f4;
83+
/* 0x600 */ s16 field_0x600;
84+
/* 0x602 */ u8 field_0x602;
85+
/* 0x603 */ u8 field_0x603;
86+
/* 0x604 */ u8 field_0x604;
87+
/* 0x608 */ int field_0x608;
88+
/* 0x60C */ int field_0x60c;
89+
/* 0x610 */ s16 field_0x610;
90+
/* 0x612 */ s16 field_0x612;
91+
/* 0x614 */ csXyz field_0x614;
92+
/* 0x61A */ u8 field_0x61a;
93+
/* 0x61C */ mDoExt_McaMorfSO* mpMorf;
94+
/* 0x620 */ request_of_phase_process_class mPhaseReq;
95+
/* 0x628 */ int mShadowKey;
96+
/* 0x62C */ Z2CreatureEnemy mSound;
97+
/* 0x6D0 */ dBgS_AcchCir mAcchCir;
98+
/* 0x710 */ dBgS_ObjAcch mAcch;
99+
/* 0x8E8 */ dCcD_Stts mStts;
100+
/* 0x924 */ dCcD_Sph mSph;
101+
/* 0xA5C */ dCcD_Cyl mCyl;
102+
/* 0xB98 */ dCcU_AtInfo mAtInfo;
103+
/* 0xBBC */ u8 field_0xbbc;
58104
};
59105

60-
STATIC_ASSERT(sizeof(daE_SB_c) == 0xbc0);
106+
STATIC_ASSERT(sizeof(daE_SB_c) == 0xBC0);
61107

62-
class daE_SB_HIO_c {
108+
class daE_SB_HIO_c : public JORReflexible {
109+
public:
63110
/* 8078164C */ daE_SB_HIO_c();
64-
/* 80784CC0 */ ~daE_SB_HIO_c();
111+
/* 80784CC0 */ virtual ~daE_SB_HIO_c() {}
112+
113+
#if DEBUG
114+
void genMessage(JORMContext*);
115+
#endif
116+
117+
/* 0x04 */ s8 field_0x04;
118+
/* 0x08 */ f32 search_area;
119+
/* 0x0C */ f32 distance_home;
120+
/* 0x10 */ f32 jump_xz_axis_speed;
121+
/* 0x14 */ f32 jump_y_axis_speed;
122+
/* 0x18 */ f32 atk_jump_xz_axis_speed;
123+
/* 0x1C */ f32 atk_y_axis_speed;
124+
/* 0x20 */ f32 magne_on_atk_y_axis_speed;
125+
/* 0x24 */ f32 grav_reduct_rate;
126+
/* 0x28 */ f32 other_anm_speed;
127+
/* 0x2C */ f32 shield_atk_anm_speed;
128+
/* 0x30 */ f32 death_anm_speed;
129+
/* 0x34 */ f32 size;
130+
/* 0x38 */ f32 atk_start_range;
131+
/* 0x3C */ s16 field_0x3c;
132+
/* 0x3E */ s16 field_0x3e;
65133
};
66134

67135

include/d/d_bg_s_acch.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ class dBgS_Acch : public cBgS_Chk, public dBgS_Chk {
149149
u32 MaskRoofHit() const { return m_flags & ROOF_HIT; }
150150
bool ChkRoofHit() const { return MaskRoofHit() != 0; }
151151
void OffClrSpeedY() { m_flags |= CLR_SPEED_Y; }
152+
void OnClrSpeedY() { m_flags &= ~CLR_SPEED_Y; }
152153
bool ChkClrSpeedY() const { return !(m_flags & CLR_SPEED_Y); }
153154
void SetGroundFind() { m_flags |= GROUND_FIND; }
154155
void SetGroundHit() { m_flags |= GROUND_HIT; }

0 commit comments

Comments
 (0)