Skip to content

Commit 8d167fc

Browse files
authored
d_a_e_sg Matching (#2421)
* d_a_e_sg first pass * d_a_e_sg equivalent * d_a_e_sg matching * d_a_e_sg cleanup * d_a_e_sg comments
1 parent 3079971 commit 8d167fc

File tree

5 files changed

+1301
-1170
lines changed

5 files changed

+1301
-1170
lines changed

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1692,7 +1692,7 @@ def MatchingFor(*versions) -> bool:
16921692
ActorRel(NonMatching, "d_a_e_s1"),
16931693
ActorRel(NonMatching, "d_a_e_sb"),
16941694
ActorRel(NonMatching, "d_a_e_sf"),
1695-
ActorRel(NonMatching, "d_a_e_sg"),
1695+
ActorRel(MatchingFor("GZ2E01"), "d_a_e_sg"),
16961696
ActorRel(NonMatching, "d_a_e_sh"),
16971697
ActorRel(NonMatching, "d_a_e_sm"),
16981698
ActorRel(NonMatching, "d_a_e_sm2"),

include/d/actor/d_a_e_sg.h

Lines changed: 72 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,90 @@
11
#ifndef D_A_E_SG_H
22
#define D_A_E_SG_H
3-
#include "f_op/f_op_actor_mng.h"
3+
4+
#include "f_op/f_op_actor.h"
5+
#include "d/d_bg_s_acch.h"
6+
#include "d/d_cc_d.h"
7+
#include "d/d_cc_uty.h"
8+
#include "d/d_jnt_col.h"
49

510
/**
611
* @ingroup actors-enemies
712
* @class e_sg_class
813
* @brief Skullfish
9-
*
14+
*
1015
* @details
11-
*
12-
*/
16+
* Skullfish are found in the Lakebed Temple and some caves. They attack by
17+
* chasing and biting Link, often appearing in groups.
18+
* Skullfish can also be caught with the Fishing Rod, leaving behind a Heart
19+
* when released. It will then flop on land.
20+
* */
1321
class e_sg_class : public fopEn_enemy_c {
14-
private:
15-
/* 0x5ac */ u8 field_0x5ac[0xab0 - 0x5ac];
22+
public:
23+
/* 0x5AC */ request_of_phase_process_class mPhaseReq;
24+
/* 0x5B4 */ u8 mArg0;
25+
/* 0x5B8 */ J3DModel* mpModel;
26+
/* 0x5BC */ Z2CreatureEnemy mSound;
27+
/* 0x660 */ s16 mTimers[3];
28+
/* 0x666 */ s16 mInvincibilityTimer;
29+
/* 0x668 */ u8 mInitTimer;
30+
/* 0x66A */ s16 mRandomSeed;
31+
/* 0x66C */ s16 mAction;
32+
/* 0x66E */ s16 mMode;
33+
/* 0x670 */ f32 mIdleMoveBound;
34+
/* 0x674 */ f32 mSearchBound;
35+
/* 0x678 */ cXyz mTargetPos;
36+
/* 0x684 */ u8 field_0x684[4];
37+
/* 0x688 */ s16 mPlayerAngle;
38+
/* 0x68C */ f32 mPlayerDist;
39+
/* 0x690 */ f32 mTargetDist;
40+
/* 0x694 */ f32 mTargetSpeed;
41+
/* 0x698 */ f32 mStepSpeed;
42+
/* 0x69C */ s16 mSwimAngle;
43+
/* 0x69E */ s16 mSwimAngleSpeed;
44+
/* 0x6A0 */ s16 mJoints[4];
45+
/* 0x6A8 */ f32 mJointYRot;
46+
/* 0x6AC */ f32 mJointSpeed;
47+
/* 0x6B0 */ s16 mJointAngle;
48+
/* 0x6B4 */ f32 field_0x6b4;
49+
/* 0x6B8 */ f32 mGroundY;
50+
/* 0x6BC */ f32 mKamuSpeed;
51+
/* 0x6C0 */ s16 mRotation;
52+
/* 0x6C2 */ s16 mRotationTarget;
53+
/* 0x6C4 */ s8 mStickIdx;
54+
/* 0x6C5 */ u8 mKamuTimer;
55+
/* 0x6C6 */ s16 field_0x6C6;
56+
/* 0x6C8 */ int mShadowKey;
57+
/* 0x6CC */ fpc_ProcID mTargetActorID;
58+
/* 0x6D0 */ dJntCol_c mJoint;
59+
/* 0x6E0 */ dBgS_AcchCir mAcchCir;
60+
/* 0x720 */ dBgS_ObjAcch mAcch;
61+
/* 0x8F8 */ dCcD_Stts mStts;
62+
/* 0x934 */ dCcD_Sph mSph;
63+
/* 0xA6C */ dCcU_AtInfo mAtInfo;
64+
/* 0xA90 */ s8 mAttackCollistion;
65+
/* 0xA91 */ s8 mCollisionResponse;
66+
/* 0xA92 */ u8 mInactive;
67+
/* 0xA93 */ s8 mWaterSplash;
68+
/* 0xA94 */ int mParticleKey[4];
69+
/* 0xAA4 */ u32 mHamon;
70+
/* 0xAA8 */ u8 field_0xaa8[4];
71+
/* 0xAAC */ bool mHioInit;
1672
};
1773

18-
STATIC_ASSERT(sizeof(e_sg_class) == 0xab0);
74+
STATIC_ASSERT(sizeof(e_sg_class) == 0xAB0);
1975

2076
class daE_SG_HIO_c {
77+
public:
2178
/* 8078A22C */ daE_SG_HIO_c();
22-
/* 8078DC84 */ ~daE_SG_HIO_c();
79+
/* 8078DC84 */ virtual ~daE_SG_HIO_c() {};
80+
81+
s8 mUnk0;
82+
f32 mScaleFactor;
83+
f32 mMovementSpeed;
84+
f32 mSearchSpeed;
85+
f32 mPlayerHeightThreshold;
2386
};
2487

88+
STATIC_ASSERT(sizeof(daE_SG_HIO_c) == 0x18);
2589

2690
#endif /* D_A_E_SG_H */

include/d/actor/d_a_mg_rod.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#ifndef D_A_MG_ROD_H
22
#define D_A_MG_ROD_H
33

4-
#include "f_op/f_op_actor_mng.h"
54
#include "Z2AudioLib/Z2Creature.h"
5+
#include "d/actor/d_a_mg_fish.h"
66
#include "d/d_bg_s_acch.h"
77
#include "d/d_cc_d.h"
88
#include "d/d_msg_flow.h"
9-
#include "d/actor/d_a_mg_fish.h"
9+
#include "f_op/f_op_actor_mng.h"
1010

1111
struct mg_rod_s {
1212
/* 0x0 */ cXyz field_0x0[16];
@@ -43,7 +43,9 @@ class dmg_rod_class : public fopAc_ac_c {
4343
bool checkRodEquipPermission() { return field_0x1514 == 0; }
4444
bool checkReelSpin() { return field_0x14f0 != 0; }
4545

46-
/* 0x0568 */ u8 field_0x568[0x5A4 - 0x568];
46+
/* 0x0568 */ u8 field_0x568[0x590 - 0x568];
47+
/* 0x0590 */ f32 field_0x590;
48+
/* 0x0594 */ u8 field_0x594[0x5A4 - 0x594];
4749
/* 0x05A4 */ mg_rod_s field_0x5a4;
4850
/* 0x0664 */ u8 field_0x664[0x6AC - 0x664];
4951
/* 0x06AC */ cXyz field_0x6ac;
@@ -66,7 +68,9 @@ class dmg_rod_class : public fopAc_ac_c {
6668
/* 0x0F7E */ s16 field_0xf7e;
6769
/* 0x0F80 */ u8 field_0xf80[0xFAC - 0xF80];
6870
/* 0x0FAC */ mg_hook_s field_0xfac[2];
69-
/* 0x0FEC */ u8 field_0xfec[0x1060 - 0xFEC];
71+
/* 0x0FEC */ u8 field_0xfec[0x100D - 0xFEC];
72+
/* 0x100D */ s8 field_0x100d;
73+
/* 0x100E */ u8 field_0x100e[0x1060 - 0x100E];
7074
/* 0x1060 */ cXyz mHookPosition;
7175
/* 0x106C */ cXyz field_0x106c;
7276
/* 0x1078 */ cXyz field_0x1078;

include/d/actor/d_a_obj_kbox.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,13 @@
1212
*
1313
*/
1414
class obj_kbox_class : public fopAc_ac_c {
15-
private:
16-
/* 0x568 */ u8 field_0x568[0x9f0 - 0x568];
15+
public:
16+
/* 0x568 */ u8 field_0x568[0x598 - 0x568];
17+
/* 0x598 */ f32 field_0x598;
18+
/* 0x59C */ u8 field_0x59c[0x5a8 - 0x59c];
19+
/* 0x5A8 */ cXyz field_0x5a8;
20+
/* 0x5B4 */ cXyz field_0x5b4;
21+
/* 0x5C0 */ u8 field_0x5c0[0x9f0 - 0x5c0];
1722
};
1823

1924
STATIC_ASSERT(sizeof(obj_kbox_class) == 0x9f0);

0 commit comments

Comments
 (0)