Skip to content

Commit 5d46f1f

Browse files
authored
d_a_e_ai done (#2617)
* d_a_e_ai done * pr
1 parent c1615cd commit 5d46f1f

File tree

4 files changed

+917
-725
lines changed

4 files changed

+917
-725
lines changed

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1676,7 +1676,7 @@ def MatchingFor(*versions) -> bool:
16761676
ActorRel(MatchingFor("GZ2E01"), "d_a_door_bossL5"),
16771677
ActorRel(MatchingFor("GZ2E01"), "d_a_door_mbossL1"),
16781678
ActorRel(MatchingFor("GZ2E01"), "d_a_door_push"),
1679-
ActorRel(NonMatching, "d_a_e_ai"),
1679+
ActorRel(MatchingFor("GZ2E01"), "d_a_e_ai"),
16801680
ActorRel(MatchingFor("GZ2E01"), "d_a_e_arrow"),
16811681
ActorRel(MatchingFor("GZ2E01"), "d_a_e_ba"),
16821682
ActorRel(NonMatching, "d_a_e_bee"),

include/SSystem/SComponent/c_cc_d.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class cCcD_SphAttr;
3131

3232
enum cCcD_ObjAtType {
3333
/* 0x00000000 */ AT_TYPE_0 = 0,
34-
/* 0x00000001*/ AT_TYPE_1 = (1 << 0),
34+
/* 0x00000001 */ AT_TYPE_1 = (1 << 0),
3535
/* 0x00000002 */ AT_TYPE_NORMAL_SWORD = (1 << 1), // wooden or ordon
3636
/* 0x00000004 */ AT_TYPE_HORSE = (1 << 2),
3737
/* 0x00000008 */ AT_TYPE_THROW_OBJ = (1 << 3),
@@ -56,6 +56,7 @@ enum cCcD_ObjAtType {
5656
/* 0x00400000 */ AT_TYPE_IRON_BALL = (1 << 22),
5757
/* 0x00800000 */ AT_TYPE_COPY_ROD = (1 << 23),
5858
/* 0x01000000 */ AT_TYPE_1000000 = (1 << 24),
59+
/* 0x02000000 */ AT_TYPE_2000000 = (1 << 25),
5960
/* 0x04000000 */ AT_TYPE_MASTER_SWORD = (1 << 26),
6061
/* 0x08000000 */ AT_TYPE_MIDNA_LOCK = (1 << 27),
6162
/* 0x10000000 */ AT_TYPE_10000000 = (1 << 28),

include/d/actor/d_a_e_ai.h

Lines changed: 45 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,21 @@
1818
*/
1919
class e_ai_class : public fopEn_enemy_c {
2020
public:
21+
enum action_e {
22+
ACTION_WAIT,
23+
ACTION_MOVE,
24+
ACTION_ATTACK,
25+
ACTION_DAMAGE,
26+
ACTION_RETURN,
27+
};
28+
2129
/* 806791BC */ void initCcCylinder();
2230
/* 80679284 */ void setCcCylinder();
2331
/* 80679350 */ void anm_init(int, f32, u8, f32);
24-
/* 806793FC */ void Draw();
25-
/* 806794F4 */ void player_way_check();
26-
/* 80679538 */ void other_bg_check(fopAc_ac_c*);
27-
/* 80679610 */ void pl_check(f32, s16);
32+
/* 806793FC */ int Draw();
33+
/* 806794F4 */ BOOL player_way_check();
34+
/* 80679538 */ BOOL other_bg_check(fopAc_ac_c*);
35+
/* 80679610 */ BOOL pl_check(f32, s16);
2836
/* 8067968C */ void damage_check();
2937
/* 80679DC8 */ void e_ai_damage();
3038
/* 8067A2CC */ void e_ai_attack();
@@ -34,82 +42,63 @@ class e_ai_class : public fopEn_enemy_c {
3442
/* 8067B024 */ void action();
3543
/* 8067B2B0 */ void PlayerWaySet();
3644
/* 8067B31C */ void AttentionSet();
37-
/* 8067B378 */ void Execute();
45+
/* 8067B378 */ int Execute();
3846
/* 8067B598 */ void setBaseMtx();
39-
/* 8067B620 */ void Delete();
40-
/* 8067B6F0 */ void CreateHeap();
41-
/* 8067B8E4 */ void Create();
42-
/* 8067BAEC */ e_ai_class();
47+
/* 8067B620 */ int Delete();
48+
/* 8067B6F0 */ int CreateHeap();
49+
/* 8067B8E4 */ int Create();
4350

4451
private:
4552
/* 0x5AC */ JPABaseEmitter* mpEmitter;
46-
/* 0x5B0 */ request_of_phase_process_class mPhaseReq;
47-
/* 0x5B8 */ u8 field_0x5B8[0x5B9 - 0x5B8];
53+
/* 0x5B0 */ request_of_phase_process_class m_phase;
54+
/* 0x5B8 */ u8 field_0x5b8;
4855
/* 0x5B9 */ u8 field_0x5b9;
4956
/* 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;
57+
/* 0x5BC */ cXyz unk_0x5bc;
58+
/* 0x5C8 */ mDoExt_brkAnm* m_brk;
5359
/* 0x5CC */ u8 field_0x5cc;
54-
/* 0x5D0 */ mDoExt_McaMorfSO* mpMorfSO;
55-
/* 0x5D4 */ Z2CreatureEnemy mCreatureSound;
60+
/* 0x5D0 */ mDoExt_McaMorfSO* m_modelMorf;
61+
/* 0x5D4 */ Z2CreatureEnemy m_sound;
5662
/* 0x678 */ u8 field_0x678[0x67C - 0x678];
57-
/* 0x67C */ u8 field_0x67c;
58-
/* 0x680 */ u32 mShadowKey;
59-
/* 0x684 */ s32 field_0x684;
63+
/* 0x67C */ s8 field_0x67c;
64+
/* 0x680 */ u32 m_shadowKey;
65+
/* 0x684 */ int m_anm;
6066
/* 0x688 */ u8 field_0x688[0x68C - 0x688];
61-
/* 0x68C */ s16 field_0x68c;
62-
/* 0x68E */ s16 field_0x68e;
63-
/* 0x690 */ s16 field_0x690;
67+
/* 0x68C */ s16 m_lifetime;
68+
/* 0x68E */ s16 m_action;
69+
/* 0x690 */ s16 m_mode;
6470
/* 0x692 */ s16 field_0x692;
6571
/* 0x694 */ s16 field_0x694;
6672
/* 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
73+
/* 0x698 */ u8 m_swbit;
74+
/* 0x69C */ cXyz unk_0x69c;
7075
/* 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;
76+
/* 0x6AA */ s16 m_angleToPlayer;
77+
/* 0x6AC */ f32 m_playerDist;
78+
/* 0x6B0 */ s16 m_timers[4];
79+
/* 0x6B8 */ s16 m_invulnerabilityTimer;
7580
/* 0x6BA */ s16 field_0x6ba;
7681
/* 0x6BC */ s16 field_0x6bc;
7782
/* 0x6C0 */ f32 field_0x6c0;
7883
/* 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;
84+
/* 0x6C8 */ dBgS_AcchCir m_acchcir;
85+
/* 0x708 */ dBgS_ObjAcch m_acch;
86+
/* 0x8E0 */ dCcD_Stts m_ccAtStts;
87+
/* 0x91C */ dCcD_Stts m_ccShieldStts;
88+
/* 0x958 */ dCcD_Sph m_ccAtSph;
89+
/* 0xA90 */ dCcD_Sph m_ccShieldSph;
90+
/* 0xBC8 */ dCcD_Cyl m_ccCyl;
91+
/* 0xD04 */ dCcU_AtInfo m_atInfo;
92+
/* 0xD28 */ s8 field_0xd28;
93+
/* 0xD29 */ s8 m_hitCount;
8994
/* 0xD2C */ u32 field_0xd2c;
9095
/* 0xD30 */ u32 field_0xd30;
9196
/* 0xD34 */ u32 field_0xd34;
9297
/* 0xD38 */ u32 field_0xd38;
9398
/* 0xD3C */ u8 field_0xD3C[0xD40 - 0xD3C];
94-
/* 0xD40 */ u8 mHIOInit;
99+
/* 0xD40 */ u8 m_HIOInit;
95100
};
96101

97102
STATIC_ASSERT(sizeof(e_ai_class) == 0xd44);
98103

99-
class daE_AI_HIO_c : public JORReflexible {
100-
public:
101-
/* 8067916C */ daE_AI_HIO_c();
102-
/* 8067BF40 */ virtual ~daE_AI_HIO_c();
103-
104-
void genMessage(JORMContext*);
105-
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-
};
114-
115104
#endif /* D_A_E_AI_H */

0 commit comments

Comments
 (0)