Skip to content

Commit 38c4252

Browse files
authored
decompile a few enemy classes (#2423)
1 parent df8f49f commit 38c4252

File tree

8 files changed

+429
-42
lines changed

8 files changed

+429
-42
lines changed

include/d/actor/d_a_e_ai.h

Lines changed: 74 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
#ifndef D_A_E_AI_H
22
#define D_A_E_AI_H
3+
4+
#include "Z2AudioLib/Z2Creature.h"
5+
#include "d/d_bg_s_acch.h"
6+
#include "d/d_cc_d.h"
7+
#include "d/d_cc_uty.h"
38
#include "f_op/f_op_actor_mng.h"
49

10+
511
/**
612
* @ingroup actors-enemies
713
* @class e_ai_class
814
* @brief Armos
9-
*
10-
* @details
11-
*
15+
*
16+
* @details
17+
*
1218
*/
1319
class e_ai_class : public fopEn_enemy_c {
20+
public:
1421
/* 806791BC */ void initCcCylinder();
1522
/* 80679284 */ void setCcCylinder();
1623
/* 80679350 */ void anm_init(int, f32, u8, f32);
@@ -33,16 +40,76 @@ class e_ai_class : public fopEn_enemy_c {
3340
/* 8067B6F0 */ void CreateHeap();
3441
/* 8067B8E4 */ void Create();
3542
/* 8067BAEC */ e_ai_class();
43+
3644
private:
37-
/* 0x5ac */ u8 field_0x5ac[0xd44 - 0x5ac];
45+
/* 0x5AC */ JPABaseEmitter* mpEmitter;
46+
/* 0x5B0 */ request_of_phase_process_class mPhaseReq;
47+
/* 0x5B8 */ u8 field_0x5B8[0x5B9 - 0x5B8];
48+
/* 0x5B9 */ u8 field_0x5b9;
49+
/* 0x5BA */ u8 field_0x5ba;
50+
/* 0x5BC */ cXyz mUnused; // The offset of this member is a guess. Debug only says that it
51+
// exists, unsure of offset in retail
52+
/* 0x5C8 */ mDoExt_brkAnm* mpBrkAnm;
53+
/* 0x5CC */ u8 field_0x5cc;
54+
/* 0x5D0 */ mDoExt_McaMorfSO* mpMorfSO;
55+
/* 0x5D4 */ Z2CreatureEnemy mCreatureSound;
56+
/* 0x678 */ u8 field_0x678[0x67C - 0x678];
57+
/* 0x67C */ u8 field_0x67c;
58+
/* 0x680 */ u32 mShadowKey;
59+
/* 0x684 */ s32 field_0x684;
60+
/* 0x688 */ u8 field_0x688[0x68C - 0x688];
61+
/* 0x68C */ s16 field_0x68c;
62+
/* 0x68E */ s16 field_0x68e;
63+
/* 0x690 */ s16 field_0x690;
64+
/* 0x692 */ s16 field_0x692;
65+
/* 0x694 */ s16 field_0x694;
66+
/* 0x696 */ s16 field_0x696;
67+
/* 0x698 */ u8 field_0x698;
68+
/* 0x699 */ cXyz mUnused2; // The offset of this member is a guess. Also unused in debug but
69+
// exists, unsure of offset in retail
70+
/* 0x6A8 */ s16 field_0x6a8;
71+
/* 0x6AA */ s16 field_0x6aa;
72+
/* 0x6AC */ f32 field_0x6ac;
73+
/* 0x6B0 */ s16 field_0x6b0[4];
74+
/* 0x6B8 */ s16 field_0x6b8;
75+
/* 0x6BA */ s16 field_0x6ba;
76+
/* 0x6BC */ s16 field_0x6bc;
77+
/* 0x6C0 */ f32 field_0x6c0;
78+
/* 0x6C4 */ u8 field_0x6C4[0x6C8 - 0x6C4];
79+
/* 0x6C8 */ dBgS_AcchCir mAcchCir;
80+
/* 0x708 */ dBgS_ObjAcch mObjAcch;
81+
/* 0x8E0 */ dCcD_Stts mAtStts;
82+
/* 0x91C */ dCcD_Stts mShieldStts;
83+
/* 0x958 */ dCcD_Sph mAtSphere;
84+
/* 0xA90 */ dCcD_Sph mShieldSphere;
85+
/* 0xBC8 */ dCcD_Cyl mCylinder;
86+
/* 0xD04 */ dCcU_AtInfo mAtInfo;
87+
/* 0xD28 */ u8 field_0xd28;
88+
/* 0xD29 */ s8 field_0xd29;
89+
/* 0xD2C */ u32 field_0xd2c;
90+
/* 0xD30 */ u32 field_0xd30;
91+
/* 0xD34 */ u32 field_0xd34;
92+
/* 0xD38 */ u32 field_0xd38;
93+
/* 0xD3C */ u8 field_0xD3C[0xD40 - 0xD3C];
94+
/* 0xD40 */ u8 mHIOInit;
3895
};
3996

4097
STATIC_ASSERT(sizeof(e_ai_class) == 0xd44);
4198

42-
class daE_AI_HIO_c {
99+
class daE_AI_HIO_c : public JORReflexible {
100+
public:
43101
/* 8067916C */ daE_AI_HIO_c();
44-
/* 8067BF40 */ ~daE_AI_HIO_c();
45-
};
102+
/* 8067BF40 */ virtual ~daE_AI_HIO_c();
103+
104+
void genMessage(JORMContext*);
46105

106+
/* 0x04 */ s8 field_0x4;
107+
/* 0x08 */ f32 model_size;
108+
/* 0x0C */ f32 movement_speed;
109+
/* 0x10 */ f32 pl_recognition_distance;
110+
/* 0x14 */ f32 attack_range_1;
111+
/* 0x18 */ f32 attack_range_2;
112+
/* 0x1C */ f32 home_distance;
113+
};
47114

48115
#endif /* D_A_E_AI_H */

include/d/actor/d_a_e_bg.h

Lines changed: 71 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
#ifndef D_A_E_BG_H
22
#define D_A_E_BG_H
33

4+
#include "Z2AudioLib/Z2Creature.h"
5+
#include "d/d_bg_s_acch.h"
6+
#include "d/d_cc_d.h"
7+
#include "d/d_cc_uty.h"
48
#include "f_op/f_op_actor_mng.h"
59

610
/**
711
* @ingroup actors-enemies
812
* @class daE_BG_c
913
* @brief Bomb Fish
10-
*
11-
* @details
12-
*
14+
*
15+
* @details
16+
*
1317
*/
1418
class daE_BG_c : public fopEn_enemy_c {
19+
public:
1520
/* 8068585C */ void ctrlJoint(J3DJoint*, J3DModel*);
1621
/* 80685948 */ void JointCallBack(J3DJoint*, int);
1722
/* 80685994 */ void draw();
@@ -36,16 +41,75 @@ class daE_BG_c : public fopEn_enemy_c {
3641
/* 80689978 */ void _delete();
3742
/* 80689A0C */ void CreateHeap();
3843
/* 80689C38 */ void create();
44+
45+
void setBgId(u32 i_bgId) { mBgId = i_bgId; }
46+
bool isBomb() { return mIsBomb; }
47+
3948
private:
40-
/* 0x5ac */ u8 field_0x5ac[0xbbc - 0x5ac];
49+
/* 0x5AC */ request_of_phase_process_class mPhaseReq;
50+
/* 0x5B4 */ mDoExt_McaMorfSO* mpMorfSO;
51+
/* 0x5B8 */ mDoExt_brkAnm* mpBrkAnm;
52+
/* 0x5BC */ Z2CreatureEnemy mCreatureSound;
53+
/* 0x660 */ cXyz field_0x660;
54+
/* 0x66C */ u32 mBgId;
55+
/* 0x670 */ s32 mActionMode;
56+
/* 0x674 */ s32 mMoveMode;
57+
/* 0x678 */ u32 mShadowKey;
58+
/* 0x67C */ u8 field_0x67C[0x684 - 0x67C];
59+
/* 0x684 */ f32 field_0x684;
60+
/* 0x688 */ f32 field_0x688;
61+
/* 0x68C */ u8 field_0x68c;
62+
/* 0x68D */ u8 field_0x68d;
63+
/* 0x68E */ u8 field_0x68e;
64+
/* 0x68F */ u8 field_0x68f;
65+
/* 0x690 */ s32 field_0x690;
66+
/* 0x694 */ s32 field_0x694;
67+
/* 0x698 */ s16 field_0x698;
68+
/* 0x69A */ s16 field_0x69a;
69+
/* 0x69C */ s16 field_0x69c;
70+
/* 0x69E */ s16 field_0x69e;
71+
/* 0x6A0 */ s16 field_0x6a0;
72+
/* 0x6A2 */ s16 field_0x6a2;
73+
/* 0x6A4 */ s16 field_0x6a4;
74+
/* 0x6A6 */ s16 field_0x6a6;
75+
/* 0x6A8 */ s16 field_0x6a8;
76+
/* 0x6AA */ s16 field_0x6aa;
77+
/* 0x6AC */ s16 field_0x6ac;
78+
/* 0x6AE */ u8 field_0x6ae;
79+
/* 0x6AF */ u8 field_0x6af;
80+
/* 0x6B0 */ u8 field_0x6b0;
81+
/* 0x6B1 */ bool mIsBomb;
82+
/* 0x6B2 */ u8 field_0x6B2[0x6B4 - 0x6B2];
83+
/* 0x6B4 */ dBgS_AcchCir mAcchCir;
84+
/* 0x6F4 */ dBgS_ObjAcch mObjAcch;
85+
/* 0x8CC */ dCcD_Stts mStts;
86+
/* 0x908 */ dCcD_Sph mSphere;
87+
/* 0xA40 */ dCcD_Sph mAtSphere;
88+
/* 0xB78 */ dCcU_AtInfo mAtInfo;
89+
/* 0xB9C */ u32 mParticle;
90+
/* 0xBA0 */ u8 field_0xBA0[0xBB0 - 0xBA0];
91+
/* 0xBB0 */ u32 mParticle2;
92+
/* 0xBB4 */ u32 mParticle3;
93+
/* 0xBB8 */ u8 mHIOInit;
4194
};
4295

4396
STATIC_ASSERT(sizeof(daE_BG_c) == 0xbbc);
4497

45-
class daE_BG_HIO_c {
98+
class daE_BG_HIO_c : public JORReflexible {
99+
public:
46100
/* 8068580C */ daE_BG_HIO_c();
47-
/* 8068A19C */ ~daE_BG_HIO_c();
48-
};
101+
/* 8068A19C */ virtual ~daE_BG_HIO_c();
49102

103+
void genMessage(JORMContext*);
104+
105+
/* 0x04 */ s8 field_0x4;
106+
/* 0x08 */ f32 tracking_speed;
107+
/* 0x0C */ f32 rush_speed;
108+
/* 0x10 */ f32 waiting_distance_before_charging;
109+
/* 0x14 */ f32 player_search_distance;
110+
/* 0x18 */ f32 attack_range;
111+
/* 0x1C */ f32 swimming_range;
112+
/* 0x20 */ f32 spring_time;
113+
};
50114

51115
#endif /* D_A_E_BG_H */

include/d/actor/d_a_e_df.h

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
#ifndef D_A_E_DF_H
22
#define D_A_E_DF_H
3+
4+
#include "Z2AudioLib/Z2Creature.h"
5+
#include "d/d_cc_d.h"
6+
#include "d/d_cc_uty.h"
37
#include "f_op/f_op_actor_mng.h"
48

59
/**
610
* @ingroup actors-enemies
711
* @class daE_DF_c
812
* @brief Deku Flower
9-
*
10-
* @details
11-
*
13+
*
14+
* @details
15+
*
1216
*/
1317
class daE_DF_c : public fopEn_enemy_c {
18+
public:
1419
/* 806A7710 */ void CreateHeap();
1520
/* 806A7828 */ void initCcCylinder();
1621
/* 806A78A0 */ void setCcCylinder();
@@ -39,16 +44,44 @@ class daE_DF_c : public fopEn_enemy_c {
3944
/* 806A9550 */ void Delete();
4045
/* 806A95B8 */ void setBaseMtx();
4146
/* 806A9678 */ void Create();
47+
4248
private:
43-
/* 0x5ac */ u8 field_0x5ac[0x838 - 0x5ac];
49+
/* 0x5AC */ u8 field_0x5ac;
50+
/* 0x5AD */ u8 field_0x5ad;
51+
/* 0x5AE */ u8 field_0x5ae;
52+
/* 0x5B0 */ csXyz field_0x5b0;
53+
/* 0x5B6 */ u8 field_0x5B6[0x5B8 - 0x5B6];
54+
/* 0x5B8 */ s32 field_0x5b8;
55+
/* 0x5BC */ u8 field_0x5bc;
56+
/* 0x5BE */ s16 field_0x5be;
57+
/* 0x5C0 */ s32 field_0x5c0;
58+
/* 0x5C4 */ s16 field_0x5c4;
59+
/* 0x5C6 */ s16 field_0x5c6;
60+
/* 0x5C8 */ mDoExt_McaMorfSO* mpMorfSO;
61+
/* 0x5CC */ request_of_phase_process_class mPhaseReq;
62+
/* 0x5D4 */ u8 field_0x5D4[0x5D8 - 0x5D4];
63+
/* 0x5D8 */ Z2CreatureEnemy mCreatureSound;
64+
/* 0x67C */ dCcD_Stts mStts;
65+
/* 0x6B8 */ dCcD_Cyl mCylinder;
66+
/* 0x7F4 */ dCcU_AtInfo mAtInfo;
67+
/* 0x818 */ u8 mHIOInit;
68+
/* 0x819 */ u8 field_0x819;
69+
/* 0x81C */ cXyz field_0x81c;
70+
/* 0x828 */ cXyz field_0x828;
71+
/* 0x834 */ f32 field_0x834;
4472
};
4573

4674
STATIC_ASSERT(sizeof(daE_DF_c) == 0x838);
4775

48-
class daE_DF_HIO_c {
76+
class daE_DF_HIO_c : public JORReflexible {
77+
public:
4978
/* 806A76EC */ daE_DF_HIO_c();
50-
/* 806A9A84 */ ~daE_DF_HIO_c();
51-
};
79+
/* 806A9A84 */ virtual ~daE_DF_HIO_c();
5280

81+
void genMessage(JORMContext*);
82+
83+
/* 0x4 */ s8 field_0x4;
84+
/* 0x8 */ f32 speed;
85+
};
5386

5487
#endif /* D_A_E_DF_H */

include/d/actor/d_a_e_dk.h

Lines changed: 61 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
#ifndef D_A_E_DK_H
22
#define D_A_E_DK_H
33

4+
#include "Z2AudioLib/Z2Creature.h"
5+
#include "d/d_bg_s_acch.h"
6+
#include "d/d_bg_s_sph_chk.h"
7+
#include "d/d_cc_d.h"
8+
#include "d/d_cc_uty.h"
49
#include "f_op/f_op_actor_mng.h"
510

611
/**
712
* @ingroup actors-enemies
813
* @class daE_DK_c
914
* @brief Bari
10-
*
11-
* @details
12-
*
15+
*
16+
* @details
17+
*
1318
*/
1419
class daE_DK_c : public fopEn_enemy_c {
20+
public:
1521
/* 806AA228 */ void draw();
1622
/* 806AA5C8 */ void setBck(int, u8, f32, f32);
1723
/* 806AA68C */ void setBckCore(int, u8, f32, f32);
@@ -38,16 +44,64 @@ class daE_DK_c : public fopEn_enemy_c {
3844
/* 806ACAA4 */ void CreateHeap();
3945
/* 806ACE14 */ void create();
4046
/* 806AD0AC */ daE_DK_c();
47+
4148
private:
42-
/* 0x5ac */ u8 field_0x5ac[0xd54 - 0x5ac];
49+
/* 0x5AC */ request_of_phase_process_class mPhaseReq;
50+
/* 0x5B4 */ mDoExt_McaMorfSO* mpMorfSO;
51+
/* 0x5B8 */ mDoExt_McaMorfSO* mpCoreMorfSO;
52+
/* 0x5BC */ mDoExt_brkAnm* mpBrkAnm[2];
53+
/* 0x5C4 */ mDoExt_btkAnm* mpBtkAnm[2];
54+
/* 0x5CC */ Z2CreatureEnemy mCreatureSound;
55+
/* 0x670 */ cXyz field_0x670;
56+
/* 0x67C */ s32 mActionMode;
57+
/* 0x680 */ s32 mMoveMode;
58+
/* 0x684 */ u32 mShadowKey;
59+
/* 0x688 */ u32 mShadowKey2;
60+
/* 0x68C */ s16 field_0x68c;
61+
/* 0x68E */ s16 field_0x68e;
62+
/* 0x690 */ u8 field_0x690;
63+
/* 0x691 */ u8 field_0x691;
64+
/* 0x692 */ u8 field_0x692;
65+
/* 0x694 */ s16 field_0x694;
66+
/* 0x698 */ s32 field_0x698;
67+
/* 0x69C */ s32 field_0x69c;
68+
/* 0x6A0 */ u8 field_0x6a0;
69+
/* 0x6A1 */ u8 field_0x6a1;
70+
/* 0x6A2 */ u8 field_0x6a2;
71+
/* 0x6A3 */ u8 field_0x6a3;
72+
/* 0x6A4 */ u8 field_0x6a4;
73+
/* 0x6A8 */ f32 field_0x6a8;
74+
/* 0x6AC */ f32 field_0x6ac;
75+
/* 0x6B0 */ f32 field_0x6b0;
76+
/* 0x6B4 */ f32 field_0x6b4;
77+
/* 0x6B8 */ f32 field_0x6b8;
78+
/* 0x6BC */ dBgS_AcchCir mAcchCir;
79+
/* 0x6FC */ dBgS_ObjAcch mObjAcch;
80+
/* 0x8D4 */ dBgS_SphChk mSphereChk;
81+
/* 0x928 */ dCcD_Stts mStts;
82+
/* 0x964 */ dCcD_Sph mSphere;
83+
/* 0xA9C */ dCcD_Sph mAtSphere;
84+
/* 0xBD4 */ dCcD_Sph mCoreSphere;
85+
/* 0xD0C */ dCcU_AtInfo field_0xd0c;
86+
/* 0xD30 */ u32 mEffects[6];
87+
/* 0xD48 */ u8 field_0xD48[0xD50 - 0xD48];
88+
/* 0xD50 */ u8 mHIOInit;
4389
};
4490

4591
STATIC_ASSERT(sizeof(daE_DK_c) == 0xd54);
4692

47-
class daE_DK_HIO_c {
93+
class daE_DK_HIO_c : public JORReflexible {
94+
public:
4895
/* 806AA1EC */ daE_DK_HIO_c();
49-
/* 806AD490 */ ~daE_DK_HIO_c();
50-
};
96+
/* 806AD490 */ virtual ~daE_DK_HIO_c();
5197

98+
void genMessage(JORMContext*);
99+
100+
/* 0x04 */ s8 field_0x4;
101+
/* 0x08 */ f32 model_size;
102+
/* 0x0C */ f32 player_detection_range;
103+
/* 0x10 */ f32 field_0x10;
104+
/* 0x14 */ f32 first_attack_range;
105+
};
52106

53107
#endif /* D_A_E_DK_H */

0 commit comments

Comments
 (0)