Skip to content

Commit a6802bf

Browse files
authored
e_db equivalent (#2586)
* e_db equivalent * pr fix
1 parent 8b93a87 commit a6802bf

File tree

8 files changed

+2196
-1227
lines changed

8 files changed

+2196
-1227
lines changed

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,7 @@ def MatchingFor(*versions) -> bool:
16591659
ActorRel(Equivalent, "d_a_e_bug"), # weak func order
16601660
ActorRel(Equivalent, "d_a_e_cr"), # weak func order
16611661
ActorRel(MatchingFor("GZ2E01"), "d_a_e_cr_egg"),
1662-
ActorRel(NonMatching, "d_a_e_db"),
1662+
ActorRel(Equivalent, "d_a_e_db"), # weak func order
16631663
ActorRel(MatchingFor("GZ2E01"), "d_a_e_db_leaf"),
16641664
ActorRel(NonMatching, "d_a_e_dd"),
16651665
ActorRel(Equivalent, "d_a_e_df"), # weak func order

include/d/actor/d_a_e_db.h

Lines changed: 55 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -17,69 +17,84 @@
1717
class e_db_class {
1818
public:
1919
/* 0x0000 */ fopEn_enemy_c enemy;
20-
/* 0x05AC */ request_of_phase_process_class field_0x5ac;
21-
/* 0x05B4 */ u8 field_0x5b4;
22-
/* 0x05B5 */ u8 field_0x5b5;
23-
/* 0x05B6 */ u8 field_0x5b6;
24-
/* 0x05B7 */ u8 field_0x5b7;
25-
/* 0x05B8 */ mDoExt_McaMorfSO* field_0x5b8;
20+
/* 0x05AC */ request_of_phase_process_class phase;
21+
/* 0x05B4 */ u8 arg0;
22+
/* 0x05B5 */ u8 arg1;
23+
/* 0x05B6 */ u8 arg2;
24+
/* 0x05B7 */ u8 arg3;
25+
/* 0x05B8 */ mDoExt_McaMorfSO* modelMorf;
2626
/* 0x05BC */ Z2CreatureEnemy sound;
27-
/* 0x0660 */ int field_0x660;
28-
/* 0x0664 */ u32 field_0x664;
29-
/* 0x0668 */ s16 field_0x668;
30-
/* 0x066A */ s16 field_0x66a;
31-
/* 0x066C */ s16 field_0x66c;
32-
/* 0x0670 */ f32 field_0x670;
27+
/* 0x0660 */ int anm;
28+
/* 0x0664 */ u32 shadowId;
29+
/* 0x0668 */ s16 counter;
30+
/* 0x066A */ s16 action;
31+
/* 0x066C */ s16 mode;
32+
/* 0x0670 */ f32 pl_search_range;
3333
/* 0x0674 */ cXyz field_0x674;
3434
/* 0x0680 */ s16 field_0x680;
3535
/* 0x0682 */ u8 field_0x682[0x0684 - 0x0682];
36-
/* 0x0684 */ s16 field_0x684;
37-
/* 0x0688 */ f32 field_0x688;
36+
/* 0x0684 */ s16 angle_to_player;
37+
/* 0x0688 */ f32 dist_to_player;
3838
/* 0x068C */ f32 field_0x68c;
39-
/* 0x0690 */ f32 field_0x690;
40-
/* 0x0694 */ s16 field_0x694[3];
41-
/* 0x069A */ s16 field_0x69a;
39+
/* 0x0690 */ f32 size;
40+
/* 0x0694 */ s16 timers[3];
41+
/* 0x069A */ s16 invulnerabilityTimer;
4242
/* 0x069C */ cXyz field_0x69c[12];
4343
/* 0x072C */ csXyz field_0x72c[12];
44-
/* 0x0774 */ J3DModel* field_0x774[11];
45-
/* 0x07A0 */ u8 field_0x7A0[0x07D4 - 0x07A0];
46-
/* 0x07D4 */ f32 field_0x7d4[11];
47-
/* 0x0800 */ u8 field_0x800[0x0804 - 0x0800];
48-
/* 0x0804 */ mDoExt_3DlineMat1_c field_0x804;
44+
/* 0x0774 */ J3DModel* thornModel[12];
45+
/* 0x07A4 */ f32 field_0x7a4[12];
46+
/* 0x07D4 */ f32 thorn_size[12];
47+
/* 0x0804 */ mDoExt_3DlineMat1_c stalkLine;
4948
/* 0x0840 */ f32 field_0x840;
5049
/* 0x0844 */ f32 field_0x844;
5150
/* 0x0848 */ f32 field_0x848;
52-
/* 0x084C */ u8 field_0x84C[0x084E - 0x084C];
51+
/* 0x084C */ s16 field_0x84c;
5352
/* 0x084E */ s16 field_0x84e;
54-
/* 0x0850 */ u8 field_0x850;
55-
/* 0x0851 */ u8 field_0x851;
53+
/* 0x0850 */ s8 field_0x850;
54+
/* 0x0851 */ s8 field_0x851;
5655
/* 0x0852 */ s8 field_0x852;
5756
/* 0x0854 */ f32 field_0x854;
5857
/* 0x0858 */ f32 field_0x858;
5958
/* 0x085C */ s16 field_0x85c;
60-
/* 0x085E */ u8 field_0x85E[0x0860 - 0x085E];
59+
/* 0x085E */ s16 field_0x85e;
6160
/* 0x0860 */ s16 field_0x860;
6261
/* 0x0864 */ f32 field_0x864;
63-
/* 0x0868 */ dCcD_Stts field_0x868;
64-
/* 0x08A4 */ dCcD_Sph field_0x8a4;
65-
/* 0x09DC */ dCcD_Sph field_0x9dc;
66-
/* 0x0B14 */ u8 field_0xb14;
67-
/* 0x0B18 */ dCcD_Sph field_0xb18[4];
68-
/* 0x0FF8 */ dCcU_AtInfo field_0xff8;
69-
/* 0x101C */ dBgS_AcchCir field_0x101c;
70-
/* 0x105C */ dBgS_ObjAcch field_0x105c;
71-
/* 0x1234 */ fpc_ProcID field_0x1234;
72-
/* 0x1238 */ u8 field_0x1238;
73-
/* 0x1239 */ u8 field_0x1239;
74-
/* 0x123A */ u8 field_0x123A[0x126C - 0x123A];
75-
/* 0x126C */ u8 field_0x126c;
62+
/* 0x0868 */ dCcD_Stts ccStts;
63+
/* 0x08A4 */ dCcD_Sph ccSph;
64+
/* 0x09DC */ dCcD_Sph atSph;
65+
/* 0x0B14 */ s8 field_0xb14;
66+
/* 0x0B15 */ u8 field_0xb15;
67+
/* 0x0B18 */ dCcD_Sph kukiSph[4];
68+
/* 0x0FF8 */ dCcU_AtInfo atInfo;
69+
/* 0x101C */ dBgS_AcchCir acchcir;
70+
/* 0x105C */ dBgS_ObjAcch acch;
71+
/* 0x1234 */ fpc_ProcID leaf_actor_id;
72+
/* 0x1238 */ s8 field_0x1238;
73+
/* 0x1239 */ s8 field_0x1239;
74+
/* 0x123C */ u32 field_0x123c[3];
75+
/* 0x1248 */ u32 field_0x1248;
76+
/* 0x124C */ u32 field_0x124c;
77+
/* 0x1250 */ u32 field_0x1250;
78+
/* 0x1254 */ f32 field_0x1254;
79+
/* 0x1258 */ u32 field_0x1258;
80+
/* 0x125C */ u32 field_0x125c;
81+
/* 0x1260 */ u8 field_0x1260[0x126C - 0x1260];
82+
/* 0x126C */ u8 HIOInit;
7683
};
7784

7885
STATIC_ASSERT(sizeof(e_db_class) == 0x1270);
7986

8087
class daE_DB_HIO_c {
88+
public:
8189
/* 8069AAEC */ daE_DB_HIO_c();
82-
/* 806A13D8 */ ~daE_DB_HIO_c();
90+
/* 806A13D8 */ virtual ~daE_DB_HIO_c() {}
91+
92+
/* 0x04 */ s8 id;
93+
/* 0x08 */ f32 base_size;
94+
/* 0x0C */ f32 flower_size;
95+
/* 0x10 */ f32 appear_size;
96+
/* 0x14 */ s16 roof_reappear_interval;
97+
/* 0x16 */ s16 attack_freq;
8398
};
8499

85100

include/d/actor/d_a_e_db_leaf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ class e_db_leaf_class : public fopEn_enemy_c {
1818
/* 0x5B4 */ mDoExt_McaMorf* mpMorf;
1919
}; // Size: 0x5B8
2020

21-
#endif /* D_A_E_DB_LEAF_H */
21+
#endif /* D_A_E_DB_LEAF_H */

include/d/actor/d_a_player.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,7 @@ class daPy_py_c : public fopAc_ac_c {
709709
const cXyz getLeftHandPos() const { return mLeftHandPos; }
710710
const cXyz getItemPos() const { return mItemPos; }
711711
bool getDkCaught() const { return checkNoResetFlg1(FLG1_DK_CAUGHT); }
712+
bool getDkCaught2() const { return checkNoResetFlg0(FLG0_DK_CAUGHT); }
712713
bool getStCaught() const { return checkNoResetFlg1(FLG1_UNK_80000000); }
713714

714715
/* vt 0X008 */ virtual cXyz* getMidnaAtnPos() const { return NULL; }
@@ -942,6 +943,8 @@ class daPy_py_c : public fopAc_ac_c {
942943
void onWolfEyeKeep() { onEndResetFlg1(ERFLG1_WOLF_EYE_KEEP); }
943944
void onPortalWarpMidnaAtnKeep() { onEndResetFlg2(ERFLG2_PORTAL_WARP_MIDNA_ATN_KEEP); }
944945
void onFogFade() { onNoResetFlg2(FLG2_UNK_4000); }
946+
void onDkCaught2() { onNoResetFlg0(FLG0_DK_CAUGHT); }
947+
945948
BOOL checkStickArrowReset() const { return checkResetFlg0(RFLG0_UNK_1); }
946949
u32 getCutAtFlg() const { return checkNoResetFlg0(FLG0_UNK_40); }
947950
u32 checkBoarSingleBattleFirst() const { return checkNoResetFlg2(FLG2_BOAR_SINGLE_BATTLE); }

0 commit comments

Comments
 (0)