Skip to content

Commit c32789e

Browse files
authored
d_a_bd Matching (#2560)
* Matching daPoFire * Adressed comments * Matching text * Some cleanup * Adressed review comments, added CUT_TYPE_NONE in cut type enum
1 parent ec9e4cf commit c32789e

File tree

13 files changed

+1105
-1119
lines changed

13 files changed

+1105
-1119
lines changed

config/GZ2E01/rels/d_a_bd/symbols.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:globa
131131
@1012 = .bss:0x0000003C; // type:object size:0x1 scope:local
132132
@1010 = .bss:0x00000040; // type:object size:0x1 scope:local
133133
@1009 = .bss:0x00000044; // type:object size:0x1 scope:local
134-
lbl_60_bss_45 = .bss:0x00000045; // type:object size:0x1 data:byte
134+
l_HIOInit = .bss:0x00000045; // type:object size:0x1 data:byte
135135
@3937 = .bss:0x00000048; // type:object size:0xC scope:local
136136
l_HIO = .bss:0x00000054; // type:object size:0x20 scope:global data:byte
137137
@3946 = .bss:0x00000074; // type:object size:0xC scope:local

config/GZ2P01/rels/d_a_bd/symbols.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:globa
131131
@1012 = .bss:0x0000003C; // type:object size:0x1 scope:local
132132
@1010 = .bss:0x00000040; // type:object size:0x1 scope:local
133133
@1009 = .bss:0x00000044; // type:object size:0x1 scope:local
134-
lbl_60_bss_45 = .bss:0x00000045; // type:object size:0x1 data:byte
134+
l_HIOInit = .bss:0x00000045; // type:object size:0x1 data:byte
135135
@3937 = .bss:0x00000048; // type:object size:0xC scope:local
136136
l_HIO = .bss:0x00000054; // type:object size:0x20 scope:global data:byte
137137
@3946 = .bss:0x00000074; // type:object size:0xC scope:local

config/ShieldD/rels/d_a_bdD/symbols.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ lbl_58_data_4B0 = .data:0x000004B0; // type:object size:0x24
147147
@122173 = .data:0x00000698; // type:object size:0xC scope:local
148148
@122174 = .data:0x000006BC; // type:object size:0x11 scope:local data:string
149149
@122175 = .data:0x000006E4; // type:object size:0xD scope:local data:string
150-
lbl_58_bss_0 = .bss:0x00000000; // type:object size:0x1 data:byte
150+
l_HIOInit = .bss:0x00000000; // type:object size:0x1 data:byte
151151
l_HIO = .bss:0x00000008; // type:object size:0x20 scope:global data:byte
152152
land_sp_pos = .bss:0x00000028; // type:object size:0x30 scope:global
153153
rope_pt = .bss:0x00000058; // type:object size:0x4 scope:global data:4byte

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@ def MatchingFor(*versions) -> bool:
15371537
ActorRel(MatchingFor("GZ2E01"), "d_a_tag_attention"),
15381538
ActorRel(MatchingFor("GZ2E01"), "d_a_alldie"),
15391539
ActorRel(MatchingFor("GZ2E01"), "d_a_andsw2"),
1540-
ActorRel(NonMatching, "d_a_bd"),
1540+
ActorRel(Equivalent, "d_a_bd"), # weak func order
15411541
ActorRel(MatchingFor("GZ2E01"), "d_a_canoe"),
15421542
ActorRel(MatchingFor("GZ2E01"), "d_a_cstaF"),
15431543
ActorRel(MatchingFor("GZ2E01"), "d_a_demo_item"),

include/d/actor/d_a_bd.h

Lines changed: 85 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef D_A_BD_H
22
#define D_A_BD_H
33

4+
#include "d/d_bg_s_acch.h"
5+
#include "d/d_cc_d.h"
46
#include "f_op/f_op_actor_mng.h"
57

68
/**
@@ -11,18 +13,95 @@
1113
* @details Used by birds that sit on Coro's head.
1214
*
1315
*/
14-
class bd_class : public fopEn_enemy_c {
15-
private:
16-
/* 0x5ac */ u8 field_0x5ac[0x9ec - 0x5ac];
16+
17+
enum da_BD_ANM {
18+
ANM_FLY = 5,
19+
ANM_KAKKU,
20+
ANM_KAKKU1,
21+
ANM_PITA_DOWN,
22+
ANM_PITA_LEFTUP,
23+
ANM_PITA_RIGHT,
24+
ANM_PYON,
25+
};
26+
27+
enum Action_bd {
28+
ACT_GROUND = 0,
29+
ACT_FLY = 1,
30+
ACT_DROP = 2,
31+
ACT_LANDING = 3,
32+
ACT_LANDING2 = 4,
33+
ACT_LANDING3 = 5,
34+
ACT_ROPE = 6,
35+
ACT_KKRI = 7,
36+
};
37+
38+
class bd_class {
39+
public:
40+
/* 0x000 */ fopEn_enemy_c enemy;
41+
/* 0x5AC */ request_of_phase_process_class mPhase;
42+
/* 0x5B4 */ u8 field_0x5B4;
43+
/* 0x5B5 */ u8 field_0x5B5;
44+
/* 0x5B6 */ u8 field_0x5B6;
45+
/* 0x5B7 */ u8 field_0x5B7;
46+
/* 0x5B8 */ u8 field_0x5B8;
47+
/* 0x5B9 */ u8 field_0x5B9;
48+
/* 0x5B8 */ char pad5B8[0x8]; // Padding
49+
/* 0x5C2 */ s8 field_0x5C2;
50+
/* 0x5C4 */ cXyz field_0x5C4;
51+
/* 0x5D0 */ s16 mTargetAngleY;
52+
/* 0x5D4 */ actor_place* field_0x5D4;
53+
/* 0x5D8 */ s16 field_0x5D8;
54+
/* 0x5DC */ f32 field_0x5DC;
55+
/* 0x5E0 */ f32 field_0x5E0;
56+
/* 0x5E4 */ mDoExt_McaMorf* mpMorf;
57+
/* 0x5E8 */ mDoExt_btkAnm* mpBtk;
58+
/* 0x5EC */ s8 field_0x5EC;
59+
/* 0x5F0 */ s32 mAnmID;
60+
/* 0x5F4 */ s16 mChirpDist;
61+
/* 0x5F8 */ Z2SoundObjSimple mSound;
62+
/* 0x618 */ s16 field_0x618;
63+
/* 0x61A */ s16 mActionID;
64+
/* 0x61C */ s16 field_0x61C;
65+
/* 0x61E */ s16 field_0x61E;
66+
/* 0x620 */ f32 field_0x620;
67+
/* 0x624 */ f32 field_0x624;
68+
/* 0x628 */ s16 field_0x628;
69+
/* 0x62C */ cXyz* field_0x62C;
70+
/* 0x630 */ int field_0x630;
71+
/* 0x634 */ cXyz field_0x634;
72+
/* 0x640 */ s16 field_0x640;
73+
/* 0x642 */ s16 field_0x642;
74+
/* 0x644 */ char pad644[1]; // Padding
75+
/* 0x645 */ s8 field_0x645;
76+
/* 0x646 */ char pad646[0x64C - 0x646]; // Padding
77+
/* 0x64C */ s16 field_0x64C[4];
78+
/* 0x654 */ s16 field_0x654;
79+
/* 0x656 */ s8 field_0x656;
80+
/* 0x658 */ s16 field_0x658;
81+
/* 0x65C */ dBgS_AcchCir mAcchCir;
82+
/* 0x69C */ dBgS_ObjAcch mBgc;
83+
/* 0x874 */ dCcD_Stts mStts;
84+
/* 0x8B0 */ dCcD_Sph mSphere;
85+
/* 0x9E8 */ u8 field_0x9E8;
1786
};
1887

1988
STATIC_ASSERT(sizeof(bd_class) == 0x9ec);
2089

21-
class daBd_HIO_c {
90+
class daBd_HIO_c : public JORReflexible {
2291
public:
2392
/* 804D6C4C */ daBd_HIO_c();
24-
/* 804D9CB8 */ ~daBd_HIO_c();
25-
};
93+
/* 804D9CB8 */ virtual ~daBd_HIO_c() {}
2694

95+
void genMessage(JORMContext*);
96+
97+
/* 0x04 */ s8 id;
98+
/* 0x08 */ f32 mBasicSize;
99+
/* 0x0C */ f32 mFlightSpeed;
100+
/* 0x10 */ f32 mGroundSpeed;
101+
/* 0x14 */ s16 mFlightTime;
102+
/* 0x18 */ f32 mLinkDetectRange;
103+
/* 0x1C */ s16 mChirpDist;
104+
/* 0x1E */ s8 field_0x1E;
105+
};
27106

28107
#endif /* D_A_BD_H */

include/d/actor/d_a_npc_kkri.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,23 @@ class daNpc_Kkri_c : public fopAc_ac_c {
5757
/* 80553404 */ void checkChangeJoint(int);
5858
/* 80553414 */ void checkRemoveJoint(int);
5959

60+
MtxP getBd3Mtx() {
61+
return mpMorf->getModel()->getAnmMtx(0x11);
62+
}
63+
MtxP getBd2Mtx() {
64+
return mpMorf->getModel()->getAnmMtx(6);
65+
}
66+
MtxP getBd1Mtx() {
67+
return mpMorf->getModel()->getAnmMtx(5);
68+
}
69+
6070
static void* mCutNameList[3];
6171
static u8 mCutList[36];
6272

6373
private:
64-
/* 0x568 */ u8 field_0x568[0xfdc - 0x568];
74+
/* 0x568 */ u8 field_0x568[0x578 - 0x568];
75+
/* 0x578 */ mDoExt_McaMorfSO* mpMorf;
76+
/* 0x57C */ u8 field_0x57C[0xfdc - 0x57C];
6577
};
6678

6779
STATIC_ASSERT(sizeof(daNpc_Kkri_c) == 0xfdc);

include/d/actor/d_a_player.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,8 @@ class daPy_py_c : public fopAc_ac_c {
599599
};
600600

601601
enum CutType {
602-
/* 0x01 */ CUT_TYPE_NM_VERTICAL = 1,
602+
/* 0x00 */ CUT_TYPE_NONE,
603+
/* 0x01 */ CUT_TYPE_NM_VERTICAL,
603604
/* 0x02 */ CUT_TYPE_NM_STAB,
604605
/* 0x03 */ CUT_TYPE_NM_RIGHT,
605606
/* 0x04 */ CUT_TYPE_NM_LEFT,

0 commit comments

Comments
 (0)