mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
d_a_npc_kn work (#2274)
* checkpoint * checkpoint * checkpoint * checkpoint * checkpoint * fixups * check * fixes 2 * fixes 3 * fixes 4 * fixes 5 --------- Co-authored-by: pheenoh <pheenoh@macmini.local> Co-authored-by: pheenoh <pheenoh@macmini.lan>
This commit is contained in:
co-authored by
pheenoh
pheenoh
parent
1a7b14537c
commit
5ec7e42c2d
@@ -5,7 +5,7 @@
|
||||
/**
|
||||
* @ingroup actors-enemies
|
||||
* @class e_mk_bo_class
|
||||
* @brief Ook?
|
||||
* @brief Ook's Boomerang
|
||||
*
|
||||
* @details
|
||||
*
|
||||
|
||||
+60
-61
@@ -22,20 +22,21 @@
|
||||
*
|
||||
*/
|
||||
enum daE_YK_Action {
|
||||
ACT_ROOF, /**< Keese is on roof. */
|
||||
ACT_FIGHT_FLY, /**< Keese is transitioning from flying to aggro. */
|
||||
ACT_FIGHT, /**< Keese is aggroed. */
|
||||
ACT_ATTACK, /**< Keese is attacking. */
|
||||
ACT_RETURN, /**< Keese is returning to roof. */
|
||||
ACT_FLY, /**< Keese is flying around. */
|
||||
ACT_PATH_FLY, /**< Unconfirmed: Keese is flying along its path. */
|
||||
ACT_CHANCE = 10, /**< Keese is stunned/fell down. */
|
||||
ACT_WOLFBITE = 13, /**< Keese is being bitten by wolf. */
|
||||
ACT_WIND /**< Keese is in the gale boomerang. */
|
||||
ACT_ROOF, /**< Keese hangs from roof, enters combat if player gets close. */
|
||||
ACT_FIGHT_FLY, /**< Keese flies directly towards player to initiate combat. */
|
||||
ACT_FIGHT, /**< Keese circles around player at a distance, preparing to attack. */
|
||||
ACT_ATTACK, /**< Keese charges directly at player to deal damage. */
|
||||
ACT_RETURN, /**< Keese returns to its home position on the roof. */
|
||||
ACT_FLY, /**< Keese flies randomly around its home position. */
|
||||
ACT_PATH_FLY, /**< Keese follows predefined path points in the room. */
|
||||
ACT_CHANCE = 10, /**< Keese is stunned from shield attack, falls and bounces on ground. */
|
||||
ACT_WOLFBITE = 13, /**< Keese is caught in wolf Link's mouth, can be thrown. */
|
||||
ACT_WIND /**< Keese is caught in Gale Boomerang's wind, spins around it. */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Shadow Keese Host Input Output class
|
||||
* @class daE_YK_HIO_c
|
||||
* @brief Shadow Keese Host Input Output class.
|
||||
*
|
||||
*/
|
||||
class daE_YK_HIO_c {
|
||||
@@ -43,13 +44,12 @@ public:
|
||||
/* 8080482C */ daE_YK_HIO_c();
|
||||
/* 808077E0 */ virtual ~daE_YK_HIO_c() {}
|
||||
|
||||
/* 0x00 */ // vtable
|
||||
/* 0x04 */ s8 field_0x04; // padding after this
|
||||
/* 0x08 */ f32 field_0x08;
|
||||
/* 0x0C */ f32 field_0x0c;
|
||||
/* 0x10 */ f32 field_0x10;
|
||||
/* 0x14 */ f32 field_0x14;
|
||||
/* 0x18 */ f32 field_0x18;
|
||||
/* 0x04 */ s8 field_0x04; ///< @brief Initialized to -1, appears unused.
|
||||
/* 0x08 */ f32 mModelScale; ///< @brief Base model scale factor (default: 1.0).
|
||||
/* 0x0C */ f32 mFlySpeed; ///< @brief Base flying speed (default: 15.0).
|
||||
/* 0x10 */ f32 mAttackRange; ///< @brief Distance threshold for entering attack state (default: 250.0).
|
||||
/* 0x14 */ f32 mCruiseSpeed; ///< @brief Speed when flying normally (default: 15.0).
|
||||
/* 0x18 */ f32 mChargeSpeed; ///< @brief Speed when charging at player (default: 40.0).
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -62,49 +62,48 @@ public:
|
||||
*/
|
||||
class e_yk_class : public fopEn_enemy_c {
|
||||
public:
|
||||
/* 0x5AC */ request_of_phase_process_class mPhase; ///< @brief Actor phase process class.
|
||||
/* 0x5B4 */ u8 mParam1; ///< @brief Actor parameter. Used to determine default action?
|
||||
/* 0x5B5 */ u8 mPlayerTriggerBase; ///< @brief Actor parameter. Used to determine mPlayerTrigger value. @see mPlayerTrigeer
|
||||
/* 0x5B6 */ u8 field_0x5b6; ///< @brief ???
|
||||
/* 0x5B7 */ u8 mPathIdx; ///< @brief Path index. Used to lookup/set mpPath based on the room.
|
||||
/* 0x5B8 */ u8 field_0x5b8; ///< @brief ???
|
||||
/* 0x5B9 */ s8 mPathPntIdx; ///< @brief Path point index. Tracks the index of the points along the actor's path.
|
||||
/* 0x5BA */ s8 field_0x5ba; ///< @brief ???
|
||||
/* 0x5BB */ u8 field_0x5bb; ///< @brief ???
|
||||
/* 0x5BC */ dPath* mpPath; ///< @brief Flight path. Flight path for the actor to follow?
|
||||
/* 0x5C0 */ mDoExt_McaMorfSO* mpMorfSO; ///< @brief MorfSO pointer. Tracks the last resource loaded.
|
||||
/* 0x5C4 */ Z2CreatureEnemy mCreature; ///< @brief Z2 Audio class. Used for playing actor noises.
|
||||
/* 0x668 */ int mResIdx; ///< @brief Resource index. Tracks the index of the last resource loaded.
|
||||
/* 0x66C */ s16 field_0x66c; ///< @brief ???
|
||||
/* 0x66E */ s16 mAction; ///< @brief Current action. Tracks the current action of the actor. @see daE_YK_Action
|
||||
/* 0x670 */ s16 mActionPhase; ///< @brief Current action phase. Tracks the phase of the current action of the actor. @see daE_YK_Action
|
||||
/* 0x674 */ cXyz mPathPntPos; ///< @brief Path point position. Tracks the position of the point the actor is along a path.
|
||||
/* 0x680 */ s16 mAngleFromPlayer; ///< @brief Angle from player. Tracks the current actor angle from player.
|
||||
/* 0x684 */ f32 mDistanceXZFromPlayer; ///< @brief Distance from player. Tracks the current distance the actor is from the player.
|
||||
/* 0x688 */ f32 mPlayerTrigger; ///< @brief Trigger distance from player. Tracks how close to the actor the player has to be before it will begin to attack the player.
|
||||
/* 0x68C */ f32 field_0x68c; ///< @brief ???
|
||||
/* 0x690 */ f32 field_0x690; ///< @brief ???
|
||||
/* 0x694 */ f32 field_0x694; ///< @brief ???
|
||||
/* 0x698 */ s16 field_0x698; ///< @brief ???
|
||||
/* 0x69A */ csXyz field_0x69a; ///< @brief ???
|
||||
/* 0x6A0 */ s8 field_0x6a0; ///< @brief ???
|
||||
/* 0x6A1 */ u8 field_0x6a1; ///< @brief ???
|
||||
/* 0x6A2 */ s16 field_0x6a2[4]; ///< @brief ???
|
||||
/* 0x6AA */ s16 field_0x6aa; ///< @brief ???
|
||||
/* 0x6AC */ s16 field_0x6ac[6]; ///< @brief ???
|
||||
/* 0x6B8 */ cXyz mBoomrangPosOffset; ///< @brief Boomerang position offset. Tracks the offset position when the actor is caught in the gale boomerang.
|
||||
/* 0x6C4 */ s16 mBoomrangXRotOffset; ///< @brief Boomerang rotation offset. Tracks the offset x rotation when the actor is caught in the gale boomerang.
|
||||
/* 0x6C8 */ dBgS_AcchCir field_0x6c8; ///< @brief ???
|
||||
/* 0x708 */ dBgS_ObjAcch field_0x708; ///< @brief ???
|
||||
/* 0x8E0 */ dCcD_Stts mCollisionStatus; ///< @brief Collision status.
|
||||
/* 0x91C */ dCcD_Sph mCollisionSphere; ///< @brief Collision sphere.
|
||||
/* 0xA54 */ dCcU_AtInfo mAtColliderInfo; ///< @brief Attack collider info. Used when actor gets hit.
|
||||
/* 0xA78 */ u32 field_0xa78; ///< @brief ???
|
||||
/* 0xA7C */ u32 field_0xa7c; ///< @brief ???
|
||||
/* 0xA80 */ u32 field_0xa80; ///< @brief ???
|
||||
/* 0xA84 */ u32 mParticleEmitterIds[2]; ///< @brief ???
|
||||
/* 0xA8C */ u8 field_0xa8c; ///< @brief ???
|
||||
/* 0x5AC */ request_of_phase_process_class mPhase; ///< @brief Resource loading phase handler.
|
||||
/* 0x5B4 */ u8 mBehaviorMode; ///< @brief Controls default behavior (0: return to roof, 1: free flying).
|
||||
/* 0x5B5 */ u8 mPlayerTriggerBase; ///< @brief Base value used to calculate player detection range (multiplied by 100).
|
||||
/* 0x5B6 */ u8 field_0x5b6; ///< @brief Appears unused.
|
||||
/* 0x5B7 */ u8 mPathIdx; ///< @brief Path index for room path lookup.
|
||||
/* 0x5B8 */ u8 mPathActive; ///< @brief Flag indicating if path following is active (pathIdx + 1).
|
||||
/* 0x5B9 */ s8 mPathPntIdx; ///< @brief Current index in path point array.
|
||||
/* 0x5BA */ s8 mPathDirection; ///< @brief Direction to traverse path (1: forward, -1: backward).
|
||||
/* 0x5BC */ dPath* mpPath; ///< @brief Pointer to current flight path data.
|
||||
/* 0x5C0 */ mDoExt_McaMorfSO* mpMorfSO; ///< @brief Model and animation handler.
|
||||
/* 0x5C4 */ Z2CreatureEnemy mCreature; ///< @brief Sound effect and voice handler.
|
||||
/* 0x668 */ s32 mResIdx; ///< @brief Current animation resource index.
|
||||
/* 0x66C */ s16 mFrameCounter; ///< @brief Increments each frame, used for periodic events.
|
||||
/* 0x66E */ s16 mAction; ///< @brief Current action state. @see daE_YK_Action
|
||||
/* 0x670 */ s16 mActionPhase; ///< @brief Sub-phase within current action.
|
||||
/* 0x674 */ cXyz mPathPntPos; ///< @brief Target position (path point or player).
|
||||
/* 0x680 */ s16 mAngleFromPlayer; ///< @brief Angle between keese and player in XZ plane.
|
||||
/* 0x684 */ f32 mDistanceXZFromPlayer; ///< @brief XZ distance between keese and player.
|
||||
/* 0x688 */ f32 mPlayerTrigger; ///< @brief Distance threshold for player detection.
|
||||
/* 0x68C */ f32 mMoveInterpolation; ///< @brief Movement interpolation factor (0.0-1.0).
|
||||
/* 0x690 */ f32 mTurnSpeed; ///< @brief Angular velocity for turning.
|
||||
/* 0x694 */ f32 mKnockbackSpeed; ///< @brief Speed when knocked back from damage.
|
||||
/* 0x698 */ s16 mKnockbackAngle; ///< @brief Direction angle when knocked back.
|
||||
/* 0x69A */ csXyz mStunRotation; ///< @brief Rotation angles during stun animation.
|
||||
/* 0x6A0 */ s8 mDeathFlag; ///< @brief Set to 1 when keese is dying.
|
||||
/* 0x6A2 */ s16 mActionTimers[4]; ///< @brief Timers for various action states (movement, attack, etc).
|
||||
/* 0x6AA */ s16 mInvulnerabilityTimer; ///< @brief Frames of damage invulnerability remaining.
|
||||
/* 0x6AC */ s16 field_0x6ac[6]; ///< @brief Reserved/unused timer array.
|
||||
/* 0x6B8 */ cXyz mBoomrangPosOffset; ///< @brief Position offset when caught in Gale Boomerang.
|
||||
/* 0x6C4 */ s16 mBoomrangXRotOffset; ///< @brief Rotation offset when caught in Gale Boomerang.
|
||||
/* 0x6C8 */ dBgS_AcchCir mWallCollisionCircle; ///< @brief Circular collision volume for wall detection and response.
|
||||
/* 0x708 */ dBgS_ObjAcch mActorCollisionHandler; ///< @brief Handles all collision types (ground/wall/roof/water) for this actor.
|
||||
/* 0x8E0 */ dCcD_Stts mCollisionStatus; ///< @brief Collision state tracking.
|
||||
/* 0x91C */ dCcD_Sph mCollisionSphere; ///< @brief Spherical collision shape.
|
||||
/* 0xA54 */ dCcU_AtInfo mAtColliderInfo; ///< @brief Attack collision processor.
|
||||
/* 0xA78 */ u32 mSmokeEffectId; ///< @brief ID for smoke particle effect.
|
||||
/* 0xA7C */ u32 mSmokeEffectParams; ///< @brief Parameters for smoke effect.
|
||||
/* 0xA80 */ u32 mShadowParticleId; ///< @brief ID for shadow trail particle effect.
|
||||
/* 0xA84 */ u32 mWingParticleIds[2]; ///< @brief IDs for wing particle effects.
|
||||
/* 0xA8C */ u8 mIsFirstSpawn; ///< @brief Set to 1 if this is the first keese spawned in room.
|
||||
};
|
||||
// size: 0xA90
|
||||
|
||||
STATIC_ASSERT(sizeof(e_yk_class) == 0xA90);
|
||||
|
||||
#endif /* D_A_E_YK_H */
|
||||
|
||||
@@ -48,6 +48,7 @@ private:
|
||||
|
||||
public:
|
||||
daNpcT_MatAnm_c() { initialize(); }
|
||||
|
||||
/* 80145764 */ void initialize();
|
||||
/* 8014D24C */ virtual ~daNpcT_MatAnm_c() {}
|
||||
/* 80145788 */ virtual void calc(J3DMaterial*) const;
|
||||
@@ -754,6 +755,7 @@ void daNpcT_offTmpBit(u32 i_idx);
|
||||
void daNpcT_onTmpBit(u32 i_idx);
|
||||
BOOL daNpcT_chkTmpBit(u32 i_idx);
|
||||
void daNpcT_onEvtBit(u32 i_idx);
|
||||
BOOL daNpcT_chkTmpBit(u32 i_idx);
|
||||
BOOL daNpcT_getPlayerInfoFromPlayerList(int param_0, int i_roomNo, cXyz* o_spawnPos,
|
||||
csXyz* o_angle);
|
||||
|
||||
@@ -1193,7 +1195,7 @@ private:
|
||||
/* 0x0FC */ f32 mNowOffsetX;
|
||||
/* 0x100 */ f32 mNowOffsetY;
|
||||
/* 0x104 */ u8 mEyeMoveFlag;
|
||||
/* 0x105 */ u8 field_0x105;
|
||||
/* 0x105 */ u8 mMorfFrm;
|
||||
|
||||
public:
|
||||
daNpcF_MatAnm_c() { initialize(); }
|
||||
|
||||
@@ -67,6 +67,13 @@ public:
|
||||
static u8 mEvtCutList[60];
|
||||
|
||||
private:
|
||||
// /* 0xB48 */ Z2Creature mCreature;
|
||||
// /* 0xBD8 */ daNpcF_MatAnm_c* mpMatAnm;
|
||||
// /* 0xBDC */ daNpcF_Lookat_c mLookAt;
|
||||
// /* 0xC78 */ daNpcF_ActorMngr_c mActorMng[2];
|
||||
// /* 0xC88 */ u8 field_0xc88[4];
|
||||
// /* 0xC8C */ dCcD_Cyl mCyl;
|
||||
// /* 0xDC8 */ u8 field_0xdc8[0xE1C - 0xdc8];
|
||||
/* 0x568 */ u8 field_0xb48[0xE1C - 0x568];
|
||||
/* 0xE1C */ u8 field_0xe1c;
|
||||
};
|
||||
|
||||
+359
-128
File diff suppressed because it is too large
Load Diff
@@ -22,8 +22,12 @@ public:
|
||||
/* 80C47558 */ void col_chk();
|
||||
/* 80C477B4 */ void hitPrtclSet();
|
||||
|
||||
u8 getActionMode() { return mActionMode; }
|
||||
|
||||
private:
|
||||
/* 0x568 */ u8 field_0x568[0x71c - 0x568];
|
||||
/* 0x568 */ u8 field_0x568[0x70c - 0x568];
|
||||
/* 0x70C */ u8 mActionMode;
|
||||
/* 0x70D */ u8 field_0x70d[0x71c - 0x70d];
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(daObjKnBullet_c) == 0x71c);
|
||||
|
||||
@@ -455,7 +455,7 @@ public:
|
||||
FLG3_UNK_100 = 0x100,
|
||||
FLG3_UNK_80 = 0x80,
|
||||
FLG3_UNK_40 = 0x40,
|
||||
FLG3_UNK_20 = 0x20,
|
||||
FL3_TRANING_CUT_BACK = 0x20,
|
||||
FLG3_UNK_10 = 0x10,
|
||||
FLG3_UNK_8 = 8,
|
||||
FLG3_UNK_4 = 4,
|
||||
@@ -500,7 +500,7 @@ public:
|
||||
ERFLG1_UNK_40000000 = 0x40000000,
|
||||
ERFLG1_UNK_20000000 = 0x20000000,
|
||||
ERFLG1_UNK_10000000 = 0x10000000,
|
||||
ERFLG1_UNK_8000000 = 0x8000000,
|
||||
ERFLG1_LARGE_DAMAGE_UP_STOP = 0x8000000,
|
||||
ERFLG1_UNK_4000000 = 0x4000000,
|
||||
ERFLG1_UNK_2000000 = 0x2000000,
|
||||
ERFLG1_UNK_1000000 = 0x1000000,
|
||||
@@ -572,7 +572,7 @@ public:
|
||||
};
|
||||
|
||||
enum daPy_RFLG1 {
|
||||
RFLG1_UNK_400 = 0x400,
|
||||
RFLG1_DAMAGE_IMPACT = 0x400,
|
||||
RFLG1_UNK_200 = 0x200,
|
||||
RFLG1_UNK_100 = 0x100,
|
||||
RFLG1_UNK_80 = 0x80,
|
||||
@@ -914,6 +914,7 @@ public:
|
||||
bool checkWolfAttackReverse() const { return checkResetFlg1(RFLG1_WOLF_ATTACK_REVERSE); }
|
||||
bool checkFreezeDamage() const { return checkNoResetFlg1(FLG1_ICE_FREEZE); }
|
||||
bool checkWolfTagLockJumpReady() const { return checkResetFlg0(RFLG0_UNK_20000); }
|
||||
bool checkDamageImpact() const { return checkResetFlg1(RFLG1_DAMAGE_IMPACT); }
|
||||
bool getGrabUpEnd() const { return checkResetFlg0(RFLG0_GRAB_UP_END); }
|
||||
bool getGrabPutStart() const { return checkResetFlg0(RFLG0_GRAB_PUT_START); }
|
||||
bool checkSwimUp() const { return checkNoResetFlg0(FLG0_SWIM_UP); }
|
||||
@@ -1046,6 +1047,8 @@ public:
|
||||
void onDoExchangePutIn() { onEndResetFlg1(ERFLG1_UNK_4000000); }
|
||||
void onNsScream() { onEndResetFlg1(ERFLG1_UNK_1); }
|
||||
void onNsScreamAnm() { onEndResetFlg1(daPy_ERFLG1(ERFLG1_UNK_1 | ERFLG1_UNK_2)); }
|
||||
void onLargeDamageUpStop() { onEndResetFlg1(ERFLG1_LARGE_DAMAGE_UP_STOP); }
|
||||
void onTraningCutBack() { onNoResetFlg3(FL3_TRANING_CUT_BACK); }
|
||||
void onNeckSearchWide() { onEndResetFlg0(ERFLG0_UNK_400); }
|
||||
void offPressedDamage() { offNoResetFlg2(FLG2_PRESSED_DAMAGE); }
|
||||
void onForceSubjectCancel() { onEndResetFlg0(ERFLG0_FORCE_SUBJECT_CANCEL); }
|
||||
|
||||
@@ -409,6 +409,7 @@ public:
|
||||
cXyz* GetTgRVecP() { return mGObjTg.GetRVecP(); }
|
||||
bool ChkTgHookshotThrough() { return mGObjTg.ChkSPrm(0x80); }
|
||||
bool ChkTgShieldHit() { return mGObjTg.ChkRPrm(2); }
|
||||
void OffTgNoAtHitInfSet() { mObjTg.OffSPrmBit(0x20); }
|
||||
bool ChkTgSpinnerReflect() { return mGObjTg.ChkSPrm(0x200); }
|
||||
|
||||
static const Z2SoundID m_hitSeID[24];
|
||||
|
||||
@@ -7,6 +7,21 @@ class dBgS_Acch;
|
||||
class dKy_tevstr_c;
|
||||
class JPABaseEmitter;
|
||||
|
||||
/**
|
||||
* @brief Particle effect management class for center-based effects
|
||||
*
|
||||
* This class handles particle effects, particularly those related to water interactions.
|
||||
* It manages emitters, water offsets, and ripple effects with a center-based configuration.
|
||||
*
|
||||
* @details The class maintains:
|
||||
* - Center-based particle emitters
|
||||
* - Water and ripple offset values
|
||||
* - Effect type information
|
||||
* - Background collision checking capabilities
|
||||
*
|
||||
* @note This serves as the base class for dPaPoT_c and dPaPoF_c which extend the
|
||||
* functionality to handle two and four particle emitters respectively.
|
||||
*/
|
||||
class dPaPo_c {
|
||||
public:
|
||||
/* 80050C9C */ void init(dBgS_Acch*, f32, f32);
|
||||
|
||||
Reference in New Issue
Block a user