Skip to content

Commit 418e393

Browse files
authored
daObjBATTA Equivalent (#2563)
1 parent c32789e commit 418e393

File tree

7 files changed

+662
-895
lines changed

7 files changed

+662
-895
lines changed

config/GZ2E01/rels/d_a_obj_batta/symbols.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,6 @@ __vt__12daObjBATTA_c = .data:0x000001E8; // type:object size:0xC scope:global
130130
__vt__12J3DFrameCtrl = .data:0x000001F4; // type:object size:0xC scope:global
131131
__vt__16daObj_BattaHIO_c = .data:0x00000200; // type:object size:0xC scope:global
132132
__global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global
133-
lbl_403_bss_8 = .bss:0x00000008; // type:object size:0x1 data:byte
133+
l_HIOInit = .bss:0x00000008; // type:object size:0x1 scope:local data:byte
134134
@3769 = .bss:0x0000000C; // type:object size:0xC scope:local
135135
l_HIO = .bss:0x00000018; // type:object size:0x10 scope:global align:4 data:float

config/GZ2J01/rels/d_a_obj_batta/symbols.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,6 @@ __vt__12daObjBATTA_c = .data:0x000001E8; // type:object size:0xC scope:global
129129
__vt__12J3DFrameCtrl = .data:0x000001F4; // type:object size:0xC scope:global
130130
__vt__16daObj_BattaHIO_c = .data:0x00000200; // type:object size:0xC scope:global
131131
__global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global
132-
lbl_403_bss_8 = .bss:0x00000008; // type:object size:0x1 data:byte
132+
l_HIOInit = .bss:0x00000008; // type:object size:0x1 data:byte scope:local
133133
@3769 = .bss:0x0000000C; // type:object size:0xC scope:local
134134
l_HIO = .bss:0x00000018; // type:object size:0x10 scope:global align:4 data:float

config/GZ2P01/rels/d_a_obj_batta/symbols.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,6 @@ __vt__12daObjBATTA_c = .data:0x000001E8; // type:object size:0xC scope:global
129129
__vt__12J3DFrameCtrl = .data:0x000001F4; // type:object size:0xC scope:global
130130
__vt__16daObj_BattaHIO_c = .data:0x00000200; // type:object size:0xC scope:global
131131
__global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global
132-
lbl_403_bss_8 = .bss:0x00000008; // type:object size:0x1 data:byte
132+
l_HIOInit = .bss:0x00000008; // type:object size:0x1 data:byte scope:local
133133
@3769 = .bss:0x0000000C; // type:object size:0xC scope:local
134134
l_HIO = .bss:0x00000018; // type:object size:0x10 scope:global align:4 data:float

config/RZDE01_00/rels/d_a_obj_batta/symbols.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,6 @@ lbl_403_data_424 = .data:0x00000424; // type:object size:0x4 data:string
133133
lbl_403_data_428 = .data:0x00000428; // type:object size:0x4 data:string
134134
lbl_403_data_42C = .data:0x0000042C; // type:object size:0x4 data:string
135135
__global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global
136-
lbl_403_bss_8 = .bss:0x00000008; // type:object size:0x1 data:byte
136+
l_HIOInit = .bss:0x00000008; // type:object size:0x1 data:byte scope:local
137137
@93433 = .bss:0x0000000C; // type:object size:0xC scope:local
138138
l_HIO = .bss:0x00000018; // type:object size:0x10 scope:global align:4 data:float

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1880,7 +1880,7 @@ def MatchingFor(*versions) -> bool:
18801880
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_avalanche"),
18811881
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_balloon"),
18821882
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_barDesk"),
1883-
ActorRel(NonMatching, "d_a_obj_batta"),
1883+
ActorRel(Equivalent, "d_a_obj_batta"),
18841884
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_bbox"),
18851885
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_bed"),
18861886
ActorRel(NonMatching, "d_a_obj_bemos"),

include/d/actor/d_a_obj_batta.h

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

4-
#include "f_op/f_op_actor_mng.h"
4+
#include "d/actor/d_a_player.h"
5+
#include "d/d_bg_s_acch.h"
6+
#include "d/d_cc_d.h"
57
#include "d/d_insect.h"
68

79
/**
@@ -14,6 +16,8 @@
1416
*/
1517
class daObjBATTA_c : public dInsect_c {
1618
public:
19+
typedef void (daObjBATTA_c::*actionFunc)();
20+
1721
/* 80BA9E5C */ void setAction(void (daObjBATTA_c::*)());
1822
/* 80BAA1C8 */ void wait();
1923
/* 80BAA47C */ void turn();
@@ -27,21 +31,54 @@ class daObjBATTA_c : public dInsect_c {
2731
/* 80BABA98 */ void batta_setParticle();
2832
/* 80BABCA4 */ void action();
2933
/* 80BABD6C */ void hit_check();
30-
/* 80BABE20 */ void execute();
31-
/* 80BABFA4 */ void _delete();
34+
/* 80BABE20 */ int execute();
35+
/* 80BABFA4 */ int _delete();
3236
/* 80BAC00C */ void mtx_set();
33-
/* 80BAC194 */ void create();
37+
/* 80BAC194 */ int create();
38+
39+
inline int CreateHeap();
40+
inline int draw();
41+
42+
bool checkAction(actionFunc i_func) {
43+
return mActionFunc == i_func;
44+
}
3445

3546
private:
36-
/* 0x590 */ u8 field_0x568[0x9f8 - 0x590];
47+
/* 0x590 */ Z2Creature mCreature;
48+
/* 0x620 */ mDoExt_McaMorfSO* mpMorf;
49+
/* 0x624 */ mDoExt_brkAnm* mBrk;
50+
/* 0x628 */ mDoExt_btkAnm* mBtk;
51+
/* 0x62C */ dBgS_AcchCir mAcchCir;
52+
/* 0x66C */ dBgS_ObjAcch mAcch;
53+
/* 0x844 */ dCcD_Stts mStts;
54+
/* 0x890 */ dCcD_Sph mSph;
55+
/* 0x8B8 */ daPy_boomerangMove_c mBoomerangMove;
56+
/* 0x9C4 */ request_of_phase_process_class mPhase;
57+
/* 0x9CC */ f32 mParticleScale;
58+
/* 0x9D0 */ actionFunc mActionFunc;
59+
/* 0x9DC */ actionFunc mPrevActionFunc;
60+
/* 0x9E8 */ int field_0x9e8;
61+
/* 0x9EC */ s16 field_0x9ec;
62+
/* 0x9EE */ u16 mActionTimer;
63+
/* 0x9F0 */ u8 field_0x9f0;
64+
/* 0x9F1 */ u8 field_0x9f1;
65+
/* 0x9F2 */ u8 field_0x9f2;
66+
/* 0x9F3 */ u8 mSex;
67+
/* 0x9F4 */ u8 mIsHIOOwner;
3768
};
3869

3970
STATIC_ASSERT(sizeof(daObjBATTA_c) == 0x9f8);
4071

41-
class daObj_BattaHIO_c {
72+
class daObj_BattaHIO_c : public JORReflexible {
4273
public:
4374
/* 80BA9E2C */ daObj_BattaHIO_c();
44-
/* 80BAC874 */ ~daObj_BattaHIO_c();
75+
/* 80BAC874 */ virtual ~daObj_BattaHIO_c() {}
76+
77+
void genMessage(JORMContext* ctx);
78+
79+
/* 0x4 */ s8 mId;
80+
/* 0x8 */ f32 mModelScaleFemale;
81+
/* 0xC */ f32 mModelScaleMale;
4582
};
4683

4784
#endif /* D_A_OBJ_BATTA_H */

0 commit comments

Comments
 (0)