z_player documentation 2024-10-11 (#4407)

* Add names to start of typedefs

* Idle stuff

* 2 functions

* Player state flags

* Name functions + misc

* ActionChange => ActionHandler

* Some player unks

* More player unks

* Header misc

* Misc

* More misc

* Player Actions

* Missed comments

* Move ship specific stuff

* Fix build

* CsCmdActorAction to CsCmdActorCue

* Fix build
This commit is contained in:
Pepe20129 2024-10-17 20:55:31 +02:00 committed by GitHub
parent 3c5d9faba3
commit b5c6545d6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
65 changed files with 3603 additions and 2562 deletions

View File

@ -415,7 +415,7 @@ f32 Actor_WorldDistXZToPoint(Actor* actor, Vec3f* refPoint);
void func_8002DBD0(Actor* actor, Vec3f* result, Vec3f* arg2); void func_8002DBD0(Actor* actor, Vec3f* result, Vec3f* arg2);
f32 Actor_HeightDiff(Actor* actorA, Actor* actorB); f32 Actor_HeightDiff(Actor* actorA, Actor* actorB);
f32 Player_GetHeight(Player* player); f32 Player_GetHeight(Player* player);
s32 Player_ActionChange_2(Player* player, PlayState* play); s32 Player_ActionHandler_2(Player* player, PlayState* play);
f32 func_8002DCE4(Player* player); f32 func_8002DCE4(Player* player);
s32 func_8002DD6C(Player* player); s32 func_8002DD6C(Player* player);
s32 func_8002DD78(Player* player); s32 func_8002DD78(Player* player);
@ -1107,7 +1107,7 @@ void Player_SetBootData(PlayState* play, Player* player);
s32 Player_InBlockingCsMode(PlayState* play, Player* player); s32 Player_InBlockingCsMode(PlayState* play, Player* player);
s32 Player_TryCsAction(PlayState* play, Actor* actor, s32 csAction); s32 Player_TryCsAction(PlayState* play, Actor* actor, s32 csAction);
s32 Player_InCsMode(PlayState* play); s32 Player_InCsMode(PlayState* play);
s32 func_8008E9C4(Player* player); s32 Player_CheckHostileLockOn(Player* player);
s32 Player_IsChildWithHylianShield(Player* player); s32 Player_IsChildWithHylianShield(Player* player);
s32 Player_ActionToModelGroup(Player* player, s32 actionParam); s32 Player_ActionToModelGroup(Player* player, s32 actionParam);
void Player_SetModelsForHoldingShield(Player* player); void Player_SetModelsForHoldingShield(Player* player);
@ -1117,9 +1117,9 @@ void func_8008EC70(Player* player);
void Player_SetEquipmentData(PlayState* play, Player* player); void Player_SetEquipmentData(PlayState* play, Player* player);
void Player_UpdateBottleHeld(PlayState* play, Player* player, s32 item, s32 actionParam); void Player_UpdateBottleHeld(PlayState* play, Player* player, s32 item, s32 actionParam);
void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4, s16 arg5, s32 arg6); void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4, s16 arg5, s32 arg6);
void func_8008EDF0(Player* player); void Player_ReleaseLockOn(Player* player);
void func_8008EE08(Player* player); void Player_ClearZTargeting(Player* player);
void func_8008EEAC(PlayState* play, Actor* actor); void Player_SetAutoLockOnActor(PlayState* play, Actor* actor);
s32 func_8008EF44(PlayState* play, s32 ammo); s32 func_8008EF44(PlayState* play, s32 ammo);
s32 Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 radius, f32 arg3); s32 Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 radius, f32 arg3);
s32 Player_GetStrength(void); s32 Player_GetStrength(void);

View File

@ -8,17 +8,23 @@
// #define __attribute__(x) // #define __attribute__(x)
// #endif // #endif
// #ifndef AVOID_UB // SoH [Port] Always use the AVOID_UB version (we don't set AVOID_UB while building yet)
// #define BAD_RETURN(type) type /*
// #else #ifndef AVOID_UB
// #define BAD_RETURN(type) void #define BAD_RETURN(type) type
// #endif #else
#define BAD_RETURN(type) void
#endif
*/
#define BAD_RETURN(type) void
// Upstream TODO: Document reasoning for change
// #define UNUSED __attribute__((unused)) // #define UNUSED __attribute__((unused))
// #define FALLTHROUGH __attribute__((fallthrough)) // #define FALLTHROUGH __attribute__((fallthrough))
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0])) #define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0])) #define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
#define ARRAY_COUNT_2D(arr) (s32)(sizeof(arr) / sizeof(arr[0][0]))
#define PHYSICAL_TO_VIRTUAL(addr) (void*)((uintptr_t)(addr) + 0x80000000) #define PHYSICAL_TO_VIRTUAL(addr) (void*)((uintptr_t)(addr) + 0x80000000)
#define VIRTUAL_TO_PHYSICAL(addr) (uintptr_t)((u8*)(addr) - 0x80000000) #define VIRTUAL_TO_PHYSICAL(addr) (uintptr_t)((u8*)(addr) - 0x80000000)

View File

@ -382,8 +382,8 @@ typedef struct {
/* 0x1B */ u8 unk_1B; /* 0x1B */ u8 unk_1B;
/* 0x1C */ CutsceneCameraPoint* cameraFocus; /* 0x1C */ CutsceneCameraPoint* cameraFocus;
/* 0x20 */ CutsceneCameraPoint* cameraPosition; /* 0x20 */ CutsceneCameraPoint* cameraPosition;
/* 0x24 */ CsCmdActorAction* linkAction; /* 0x24 */ CsCmdActorCue* linkAction;
/* 0x28 */ CsCmdActorAction* npcActions[10]; // "npcdemopnt" /* 0x28 */ CsCmdActorCue* npcActions[10]; // "npcdemopnt"
} CutsceneContext; // size = 0x50 } CutsceneContext; // size = 0x50
typedef struct { typedef struct {

View File

@ -92,7 +92,7 @@ typedef struct {
/* 0x0C */ Vec3i startPos; /* 0x0C */ Vec3i startPos;
/* 0x18 */ Vec3i endPos; /* 0x18 */ Vec3i endPos;
/* 0x24 */ Vec3i normal; /* 0x24 */ Vec3i normal;
} CsCmdActorAction; // size = 0x30 } CsCmdActorCue; // size = 0x30
typedef enum { typedef enum {
CS_STATE_IDLE, CS_STATE_IDLE,

View File

@ -7,9 +7,7 @@
struct Player; struct Player;
extern GetItemEntry sGetItemTable[195]; typedef enum PlayerSword {
typedef enum {
/* 0 */ PLAYER_SWORD_NONE, /* 0 */ PLAYER_SWORD_NONE,
/* 1 */ PLAYER_SWORD_KOKIRI, /* 1 */ PLAYER_SWORD_KOKIRI,
/* 2 */ PLAYER_SWORD_MASTER, /* 2 */ PLAYER_SWORD_MASTER,
@ -17,7 +15,7 @@ typedef enum {
/* 4 */ PLAYER_SWORD_MAX /* 4 */ PLAYER_SWORD_MAX
} PlayerSword; } PlayerSword;
typedef enum { typedef enum PlayerShield {
/* 0x00 */ PLAYER_SHIELD_NONE, /* 0x00 */ PLAYER_SHIELD_NONE,
/* 0x01 */ PLAYER_SHIELD_DEKU, /* 0x01 */ PLAYER_SHIELD_DEKU,
/* 0x02 */ PLAYER_SHIELD_HYLIAN, /* 0x02 */ PLAYER_SHIELD_HYLIAN,
@ -25,14 +23,14 @@ typedef enum {
/* 0x04 */ PLAYER_SHIELD_MAX /* 0x04 */ PLAYER_SHIELD_MAX
} PlayerShield; } PlayerShield;
typedef enum { typedef enum PlayerTunic {
/* 0x00 */ PLAYER_TUNIC_KOKIRI, /* 0x00 */ PLAYER_TUNIC_KOKIRI,
/* 0x01 */ PLAYER_TUNIC_GORON, /* 0x01 */ PLAYER_TUNIC_GORON,
/* 0x02 */ PLAYER_TUNIC_ZORA, /* 0x02 */ PLAYER_TUNIC_ZORA,
/* 0x03 */ PLAYER_TUNIC_MAX /* 0x03 */ PLAYER_TUNIC_MAX
} PlayerTunic; } PlayerTunic;
typedef enum { typedef enum PlayerBoots {
/* 0x00 */ PLAYER_BOOTS_KOKIRI, /* 0x00 */ PLAYER_BOOTS_KOKIRI,
/* 0x01 */ PLAYER_BOOTS_IRON, /* 0x01 */ PLAYER_BOOTS_IRON,
/* 0x02 */ PLAYER_BOOTS_HOVER, /* 0x02 */ PLAYER_BOOTS_HOVER,
@ -43,7 +41,7 @@ typedef enum {
/* 0x06 */ PLAYER_BOOTS_MAX /* 0x06 */ PLAYER_BOOTS_MAX
} PlayerBoots; } PlayerBoots;
typedef enum { typedef enum PlayerStrength {
/* 0x00 */ PLAYER_STR_NONE, /* 0x00 */ PLAYER_STR_NONE,
/* 0x01 */ PLAYER_STR_BRACELET, /* 0x01 */ PLAYER_STR_BRACELET,
/* 0x02 */ PLAYER_STR_SILVER_G, /* 0x02 */ PLAYER_STR_SILVER_G,
@ -51,7 +49,7 @@ typedef enum {
/* 0x04 */ PLAYER_STR_MAX /* 0x04 */ PLAYER_STR_MAX
} PlayerStrength; } PlayerStrength;
typedef enum { typedef enum PlayerMask {
/* 0x00 */ PLAYER_MASK_NONE, /* 0x00 */ PLAYER_MASK_NONE,
/* 0x01 */ PLAYER_MASK_KEATON, /* 0x01 */ PLAYER_MASK_KEATON,
/* 0x02 */ PLAYER_MASK_SKULL, /* 0x02 */ PLAYER_MASK_SKULL,
@ -64,9 +62,15 @@ typedef enum {
/* 0x09 */ PLAYER_MASK_MAX /* 0x09 */ PLAYER_MASK_MAX
} PlayerMask; } PlayerMask;
typedef enum { typedef enum PlayerIdleType {
/* -0x1 */ PLAYER_IDLE_CRIT_HEALTH = -1,
/* 0x0 */ PLAYER_IDLE_DEFAULT,
/* 0x1 */ PLAYER_IDLE_FIDGET
} PlayerIdleType;
typedef enum PlayerItemAction {
/* 0x00 */ PLAYER_IA_NONE, /* 0x00 */ PLAYER_IA_NONE,
/* 0x01 */ PLAYER_IA_LAST_USED, /* 0x01 */ PLAYER_IA_SWORD_CS, // Hold sword without shield in hand. The sword is not usable.
/* 0x02 */ PLAYER_IA_FISHING_POLE, /* 0x02 */ PLAYER_IA_FISHING_POLE,
/* 0x03 */ PLAYER_IA_SWORD_MASTER, /* 0x03 */ PLAYER_IA_SWORD_MASTER,
/* 0x04 */ PLAYER_IA_SWORD_KOKIRI, /* 0x04 */ PLAYER_IA_SWORD_KOKIRI,
@ -132,10 +136,10 @@ typedef enum {
/* 0x40 */ PLAYER_IA_MASK_GERUDO, /* 0x40 */ PLAYER_IA_MASK_GERUDO,
/* 0x41 */ PLAYER_IA_MASK_TRUTH, /* 0x41 */ PLAYER_IA_MASK_TRUTH,
/* 0x42 */ PLAYER_IA_LENS_OF_TRUTH, /* 0x42 */ PLAYER_IA_LENS_OF_TRUTH,
/* 0x4C */ PLAYER_IA_MAX /* 0x43 */ PLAYER_IA_MAX
} PlayerItemAction; } PlayerItemAction;
typedef enum { typedef enum PlayerLimb {
/* 0x00 */ PLAYER_LIMB_NONE, /* 0x00 */ PLAYER_LIMB_NONE,
/* 0x01 */ PLAYER_LIMB_ROOT, /* 0x01 */ PLAYER_LIMB_ROOT,
/* 0x02 */ PLAYER_LIMB_WAIST, /* 0x02 */ PLAYER_LIMB_WAIST,
@ -161,7 +165,7 @@ typedef enum {
/* 0x16 */ PLAYER_LIMB_MAX /* 0x16 */ PLAYER_LIMB_MAX
} PlayerLimb; } PlayerLimb;
typedef enum { typedef enum PlayerBodyPart {
/* 0x00 */ PLAYER_BODYPART_WAIST, // PLAYER_LIMB_WAIST /* 0x00 */ PLAYER_BODYPART_WAIST, // PLAYER_LIMB_WAIST
/* 0x01 */ PLAYER_BODYPART_R_THIGH, // PLAYER_LIMB_R_THIGH /* 0x01 */ PLAYER_BODYPART_R_THIGH, // PLAYER_LIMB_R_THIGH
/* 0x02 */ PLAYER_BODYPART_R_SHIN, // PLAYER_LIMB_R_SHIN /* 0x02 */ PLAYER_BODYPART_R_SHIN, // PLAYER_LIMB_R_SHIN
@ -183,7 +187,7 @@ typedef enum {
/* 0x12 */ PLAYER_BODYPART_MAX /* 0x12 */ PLAYER_BODYPART_MAX
} PlayerBodyPart; } PlayerBodyPart;
typedef enum { typedef enum PlayerMeleeWeaponAnimation {
/* 0 */ PLAYER_MWA_FORWARD_SLASH_1H, /* 0 */ PLAYER_MWA_FORWARD_SLASH_1H,
/* 1 */ PLAYER_MWA_FORWARD_SLASH_2H, /* 1 */ PLAYER_MWA_FORWARD_SLASH_2H,
/* 2 */ PLAYER_MWA_FORWARD_COMBO_1H, /* 2 */ PLAYER_MWA_FORWARD_COMBO_1H,
@ -215,7 +219,7 @@ typedef enum {
/* 28 */ PLAYER_MWA_MAX /* 28 */ PLAYER_MWA_MAX
} PlayerMeleeWeaponAnimation; } PlayerMeleeWeaponAnimation;
typedef enum { typedef enum PlayerDoorType {
/* -1 */ PLAYER_DOORTYPE_AJAR = -1, /* -1 */ PLAYER_DOORTYPE_AJAR = -1,
/* 0 */ PLAYER_DOORTYPE_NONE, /* 0 */ PLAYER_DOORTYPE_NONE,
/* 1 */ PLAYER_DOORTYPE_HANDLE, /* 1 */ PLAYER_DOORTYPE_HANDLE,
@ -223,10 +227,10 @@ typedef enum {
/* 3 */ PLAYER_DOORTYPE_FAKE /* 3 */ PLAYER_DOORTYPE_FAKE
} PlayerDoorType; } PlayerDoorType;
typedef enum { typedef enum PlayerModelGroup {
/* 0x00 */ PLAYER_MODELGROUP_0, // unused (except with the `Player_OverrideLimbDrawPause` bug) /* 0x00 */ PLAYER_MODELGROUP_0, // unused (except for a bug in `Player_OverrideLimbDrawPause`)
/* 0x01 */ PLAYER_MODELGROUP_CHILD_HYLIAN_SHIELD, // kokiri/master sword, shield not in hand /* 0x01 */ PLAYER_MODELGROUP_CHILD_HYLIAN_SHIELD, //hold sword only. used for holding sword only as child link with hylian shield equipped
/* 0x02 */ PLAYER_MODELGROUP_SWORD, // kokiri/master sword and possibly shield /* 0x02 */ PLAYER_MODELGROUP_SWORD_AND_SHIELD, // hold sword and shield or just sword if no shield is equipped
/* 0x03 */ PLAYER_MODELGROUP_DEFAULT, // non-specific models, for items that don't have particular link models /* 0x03 */ PLAYER_MODELGROUP_DEFAULT, // non-specific models, for items that don't have particular link models
/* 0x04 */ PLAYER_MODELGROUP_4, // unused, same as PLAYER_MODELGROUP_DEFAULT /* 0x04 */ PLAYER_MODELGROUP_4, // unused, same as PLAYER_MODELGROUP_DEFAULT
/* 0x05 */ PLAYER_MODELGROUP_BGS, // biggoron sword /* 0x05 */ PLAYER_MODELGROUP_BGS, // biggoron sword
@ -239,11 +243,11 @@ typedef enum {
/* 0x0C */ PLAYER_MODELGROUP_OCARINA, // ocarina /* 0x0C */ PLAYER_MODELGROUP_OCARINA, // ocarina
/* 0x0D */ PLAYER_MODELGROUP_OOT, // ocarina of time /* 0x0D */ PLAYER_MODELGROUP_OOT, // ocarina of time
/* 0x0E */ PLAYER_MODELGROUP_BOTTLE, // bottles (drawn separately) /* 0x0E */ PLAYER_MODELGROUP_BOTTLE, // bottles (drawn separately)
/* 0x0F */ PLAYER_MODELGROUP_15, // "last used" /* 0x0F */ PLAYER_MODELGROUP_SWORD, // hold sword and no shield, even if one is equipped
/* 0x10 */ PLAYER_MODELGROUP_MAX /* 0x10 */ PLAYER_MODELGROUP_MAX
} PlayerModelGroup; } PlayerModelGroup;
typedef enum { typedef enum PlayerModelGroupEntry {
/* 0x00 */ PLAYER_MODELGROUPENTRY_ANIM, /* 0x00 */ PLAYER_MODELGROUPENTRY_ANIM,
/* 0x01 */ PLAYER_MODELGROUPENTRY_LEFT_HAND, /* 0x01 */ PLAYER_MODELGROUPENTRY_LEFT_HAND,
/* 0x02 */ PLAYER_MODELGROUPENTRY_RIGHT_HAND, /* 0x02 */ PLAYER_MODELGROUPENTRY_RIGHT_HAND,
@ -252,7 +256,7 @@ typedef enum {
/* 0x05 */ PLAYER_MODELGROUPENTRY_MAX /* 0x05 */ PLAYER_MODELGROUPENTRY_MAX
} PlayerModelGroupEntry; } PlayerModelGroupEntry;
typedef enum { typedef enum PlayerModelType {
// left hand // left hand
/* 0x00 */ PLAYER_MODELTYPE_LH_OPEN, // empty open hand /* 0x00 */ PLAYER_MODELTYPE_LH_OPEN, // empty open hand
/* 0x01 */ PLAYER_MODELTYPE_LH_CLOSED, // empty closed hand /* 0x01 */ PLAYER_MODELTYPE_LH_CLOSED, // empty closed hand
@ -282,7 +286,7 @@ typedef enum {
/* 0xFF */ PLAYER_MODELTYPE_RH_FF = 0xFF // disable shield collider, cutscene-specific /* 0xFF */ PLAYER_MODELTYPE_RH_FF = 0xFF // disable shield collider, cutscene-specific
} PlayerModelType; } PlayerModelType;
typedef enum { typedef enum PlayerAnimType {
/* 0x00 */ PLAYER_ANIMTYPE_0, /* 0x00 */ PLAYER_ANIMTYPE_0,
/* 0x01 */ PLAYER_ANIMTYPE_1, /* 0x01 */ PLAYER_ANIMTYPE_1,
/* 0x02 */ PLAYER_ANIMTYPE_2, /* 0x02 */ PLAYER_ANIMTYPE_2,
@ -292,7 +296,10 @@ typedef enum {
/* 0x06 */ PLAYER_ANIMTYPE_MAX /* 0x06 */ PLAYER_ANIMTYPE_MAX
} PlayerAnimType; } PlayerAnimType;
typedef enum { /**
* Temporary names, derived from original animation names in `D_80853914`
*/
typedef enum PlayerAnimGroup {
/* 0x00 */ PLAYER_ANIMGROUP_wait, /* 0x00 */ PLAYER_ANIMGROUP_wait,
/* 0x01 */ PLAYER_ANIMGROUP_walk, /* 0x01 */ PLAYER_ANIMGROUP_walk,
/* 0x02 */ PLAYER_ANIMGROUP_run, /* 0x02 */ PLAYER_ANIMGROUP_run,
@ -344,7 +351,227 @@ typedef enum {
#define LIMB_BUF_COUNT(limbCount) ((ALIGN16((limbCount) * sizeof(Vec3s)) + sizeof(Vec3s) - 1) / sizeof(Vec3s)) #define LIMB_BUF_COUNT(limbCount) ((ALIGN16((limbCount) * sizeof(Vec3s)) + sizeof(Vec3s) - 1) / sizeof(Vec3s))
#define PLAYER_LIMB_BUF_COUNT LIMB_BUF_COUNT(PLAYER_LIMB_MAX) #define PLAYER_LIMB_BUF_COUNT LIMB_BUF_COUNT(PLAYER_LIMB_MAX)
typedef struct { typedef enum PlayerCsAction {
/* 0x00 */ PLAYER_CSACTION_NONE,
/* 0x01 */ PLAYER_CSACTION_1,
/* 0x02 */ PLAYER_CSACTION_2,
/* 0x03 */ PLAYER_CSACTION_3,
/* 0x04 */ PLAYER_CSACTION_4,
/* 0x05 */ PLAYER_CSACTION_5,
/* 0x06 */ PLAYER_CSACTION_6,
/* 0x07 */ PLAYER_CSACTION_7,
/* 0x08 */ PLAYER_CSACTION_8,
/* 0x09 */ PLAYER_CSACTION_9,
/* 0x0A */ PLAYER_CSACTION_10,
/* 0x0B */ PLAYER_CSACTION_11,
/* 0x0C */ PLAYER_CSACTION_12,
/* 0x0D */ PLAYER_CSACTION_13,
/* 0x0E */ PLAYER_CSACTION_14,
/* 0x0F */ PLAYER_CSACTION_15,
/* 0x10 */ PLAYER_CSACTION_16,
/* 0x11 */ PLAYER_CSACTION_17,
/* 0x12 */ PLAYER_CSACTION_18,
/* 0x13 */ PLAYER_CSACTION_19,
/* 0x14 */ PLAYER_CSACTION_20,
/* 0x15 */ PLAYER_CSACTION_21,
/* 0x16 */ PLAYER_CSACTION_22,
/* 0x17 */ PLAYER_CSACTION_23,
/* 0x18 */ PLAYER_CSACTION_24,
/* 0x19 */ PLAYER_CSACTION_25,
/* 0x1A */ PLAYER_CSACTION_26,
/* 0x1B */ PLAYER_CSACTION_27,
/* 0x1C */ PLAYER_CSACTION_28,
/* 0x1D */ PLAYER_CSACTION_29,
/* 0x1E */ PLAYER_CSACTION_30,
/* 0x1F */ PLAYER_CSACTION_31,
/* 0x20 */ PLAYER_CSACTION_32,
/* 0x21 */ PLAYER_CSACTION_33,
/* 0x22 */ PLAYER_CSACTION_34,
/* 0x23 */ PLAYER_CSACTION_35,
/* 0x24 */ PLAYER_CSACTION_36,
/* 0x25 */ PLAYER_CSACTION_37,
/* 0x26 */ PLAYER_CSACTION_38,
/* 0x27 */ PLAYER_CSACTION_39,
/* 0x28 */ PLAYER_CSACTION_40,
/* 0x29 */ PLAYER_CSACTION_41,
/* 0x2A */ PLAYER_CSACTION_42,
/* 0x2B */ PLAYER_CSACTION_43,
/* 0x2C */ PLAYER_CSACTION_44,
/* 0x2D */ PLAYER_CSACTION_45,
/* 0x2E */ PLAYER_CSACTION_46,
/* 0x2F */ PLAYER_CSACTION_47,
/* 0x30 */ PLAYER_CSACTION_48,
/* 0x31 */ PLAYER_CSACTION_49,
/* 0x32 */ PLAYER_CSACTION_50,
/* 0x33 */ PLAYER_CSACTION_51,
/* 0x34 */ PLAYER_CSACTION_52,
/* 0x35 */ PLAYER_CSACTION_53,
/* 0x36 */ PLAYER_CSACTION_54,
/* 0x37 */ PLAYER_CSACTION_55,
/* 0x38 */ PLAYER_CSACTION_56,
/* 0x39 */ PLAYER_CSACTION_57,
/* 0x3A */ PLAYER_CSACTION_58,
/* 0x3B */ PLAYER_CSACTION_59,
/* 0x3C */ PLAYER_CSACTION_60,
/* 0x3D */ PLAYER_CSACTION_61,
/* 0x3E */ PLAYER_CSACTION_62,
/* 0x3F */ PLAYER_CSACTION_63,
/* 0x40 */ PLAYER_CSACTION_64,
/* 0x41 */ PLAYER_CSACTION_65,
/* 0x42 */ PLAYER_CSACTION_66,
/* 0x43 */ PLAYER_CSACTION_67,
/* 0x44 */ PLAYER_CSACTION_68,
/* 0x45 */ PLAYER_CSACTION_69,
/* 0x46 */ PLAYER_CSACTION_70,
/* 0x47 */ PLAYER_CSACTION_71,
/* 0x48 */ PLAYER_CSACTION_72,
/* 0x49 */ PLAYER_CSACTION_73,
/* 0x4A */ PLAYER_CSACTION_74,
/* 0x4B */ PLAYER_CSACTION_75,
/* 0x4C */ PLAYER_CSACTION_76,
/* 0x4D */ PLAYER_CSACTION_77,
/* 0x4E */ PLAYER_CSACTION_78,
/* 0x4F */ PLAYER_CSACTION_79,
/* 0x50 */ PLAYER_CSACTION_80,
/* 0x51 */ PLAYER_CSACTION_81,
/* 0x52 */ PLAYER_CSACTION_82,
/* 0x53 */ PLAYER_CSACTION_83,
/* 0x54 */ PLAYER_CSACTION_84,
/* 0x55 */ PLAYER_CSACTION_85,
/* 0x56 */ PLAYER_CSACTION_86,
/* 0x57 */ PLAYER_CSACTION_87,
/* 0x58 */ PLAYER_CSACTION_88,
/* 0x59 */ PLAYER_CSACTION_89,
/* 0x5A */ PLAYER_CSACTION_90,
/* 0x5B */ PLAYER_CSACTION_91,
/* 0x5C */ PLAYER_CSACTION_92,
/* 0x5D */ PLAYER_CSACTION_93,
/* 0x5E */ PLAYER_CSACTION_94,
/* 0x5F */ PLAYER_CSACTION_95,
/* 0x60 */ PLAYER_CSACTION_96,
/* 0x61 */ PLAYER_CSACTION_97,
/* 0x62 */ PLAYER_CSACTION_98,
/* 0x63 */ PLAYER_CSACTION_99,
/* 0x64 */ PLAYER_CSACTION_100,
/* 0x65 */ PLAYER_CSACTION_101,
/* 0x66 */ PLAYER_CSACTION_102,
/* 0x67 */ PLAYER_CSACTION_MAX
} PlayerCsAction;
typedef enum PlayerCueId {
/* 0x00 */ PLAYER_CUEID_NONE,
/* 0x01 */ PLAYER_CUEID_1,
/* 0x02 */ PLAYER_CUEID_2,
/* 0x03 */ PLAYER_CUEID_3,
/* 0x04 */ PLAYER_CUEID_4,
/* 0x05 */ PLAYER_CUEID_5,
/* 0x06 */ PLAYER_CUEID_6,
/* 0x07 */ PLAYER_CUEID_7,
/* 0x08 */ PLAYER_CUEID_8,
/* 0x09 */ PLAYER_CUEID_9,
/* 0x0A */ PLAYER_CUEID_10,
/* 0x0B */ PLAYER_CUEID_11,
/* 0x0C */ PLAYER_CUEID_12,
/* 0x0D */ PLAYER_CUEID_13,
/* 0x0E */ PLAYER_CUEID_14,
/* 0x0F */ PLAYER_CUEID_15,
/* 0x10 */ PLAYER_CUEID_16,
/* 0x11 */ PLAYER_CUEID_17,
/* 0x12 */ PLAYER_CUEID_18,
/* 0x13 */ PLAYER_CUEID_19,
/* 0x14 */ PLAYER_CUEID_20,
/* 0x15 */ PLAYER_CUEID_21,
/* 0x16 */ PLAYER_CUEID_22,
/* 0x17 */ PLAYER_CUEID_23,
/* 0x18 */ PLAYER_CUEID_24,
/* 0x19 */ PLAYER_CUEID_25,
/* 0x1A */ PLAYER_CUEID_26,
/* 0x1B */ PLAYER_CUEID_27,
/* 0x1C */ PLAYER_CUEID_28,
/* 0x1D */ PLAYER_CUEID_29,
/* 0x1E */ PLAYER_CUEID_30,
/* 0x1F */ PLAYER_CUEID_31,
/* 0x20 */ PLAYER_CUEID_32,
/* 0x21 */ PLAYER_CUEID_33,
/* 0x22 */ PLAYER_CUEID_34,
/* 0x23 */ PLAYER_CUEID_35,
/* 0x24 */ PLAYER_CUEID_36,
/* 0x25 */ PLAYER_CUEID_37,
/* 0x26 */ PLAYER_CUEID_38,
/* 0x27 */ PLAYER_CUEID_39,
/* 0x28 */ PLAYER_CUEID_40,
/* 0x29 */ PLAYER_CUEID_41,
/* 0x2A */ PLAYER_CUEID_42,
/* 0x2B */ PLAYER_CUEID_43,
/* 0x2C */ PLAYER_CUEID_44,
/* 0x2D */ PLAYER_CUEID_45,
/* 0x2E */ PLAYER_CUEID_46,
/* 0x2F */ PLAYER_CUEID_47,
/* 0x30 */ PLAYER_CUEID_48,
/* 0x31 */ PLAYER_CUEID_49,
/* 0x32 */ PLAYER_CUEID_50,
/* 0x33 */ PLAYER_CUEID_51,
/* 0x34 */ PLAYER_CUEID_52,
/* 0x35 */ PLAYER_CUEID_53,
/* 0x36 */ PLAYER_CUEID_54,
/* 0x37 */ PLAYER_CUEID_55,
/* 0x38 */ PLAYER_CUEID_56,
/* 0x39 */ PLAYER_CUEID_57,
/* 0x3A */ PLAYER_CUEID_58,
/* 0x3B */ PLAYER_CUEID_59,
/* 0x3C */ PLAYER_CUEID_60,
/* 0x3D */ PLAYER_CUEID_61,
/* 0x3E */ PLAYER_CUEID_62,
/* 0x3F */ PLAYER_CUEID_63,
/* 0x40 */ PLAYER_CUEID_64,
/* 0x41 */ PLAYER_CUEID_65,
/* 0x42 */ PLAYER_CUEID_66,
/* 0x43 */ PLAYER_CUEID_67,
/* 0x44 */ PLAYER_CUEID_68,
/* 0x45 */ PLAYER_CUEID_69,
/* 0x46 */ PLAYER_CUEID_70,
/* 0x47 */ PLAYER_CUEID_71,
/* 0x48 */ PLAYER_CUEID_72,
/* 0x49 */ PLAYER_CUEID_73,
/* 0x4A */ PLAYER_CUEID_74,
/* 0x4B */ PLAYER_CUEID_75,
/* 0x4C */ PLAYER_CUEID_76,
/* 0x4D */ PLAYER_CUEID_77,
/* 0x4E */ PLAYER_CUEID_MAX
} PlayerCueId;
typedef enum PlayerLedgeClimbType {
/* 0 */ PLAYER_LEDGE_CLIMB_NONE,
/* 1 */ PLAYER_LEDGE_CLIMB_1,
/* 2 */ PLAYER_LEDGE_CLIMB_2,
/* 3 */ PLAYER_LEDGE_CLIMB_3,
/* 4 */ PLAYER_LEDGE_CLIMB_4
} PlayerLedgeClimbType;
typedef enum PlayerStickDirection {
/* -1 */ PLAYER_STICK_DIR_NONE = -1,
/* 0 */ PLAYER_STICK_DIR_FORWARD,
/* 1 */ PLAYER_STICK_DIR_LEFT,
/* 2 */ PLAYER_STICK_DIR_BACKWARD,
/* 3 */ PLAYER_STICK_DIR_RIGHT
} PlayerStickDirection;
typedef enum {
/* 0 */ PLAYER_KNOCKBACK_NONE, // No knockback
/* 1 */ PLAYER_KNOCKBACK_SMALL, // A small hop, remains standing up
/* 2 */ PLAYER_KNOCKBACK_LARGE, // Sent flying in the air and lands laying down on the floor
/* 3 */ PLAYER_KNOCKBACK_LARGE_SHOCK // Same as`PLAYER_KNOCKBACK_LARGE` with a shock effect
} PlayerKnockbackType;
typedef enum {
/* 0 */ PLAYER_HIT_RESPONSE_NONE,
/* 1 */ PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE,
/* 2 */ PLAYER_HIT_RESPONSE_KNOCKBACK_SMALL,
/* 3 */ PLAYER_HIT_RESPONSE_ICE_TRAP,
/* 4 */ PLAYER_HIT_RESPONSE_ELECTRIC_SHOCK
} PlayerDamageResponseType;
typedef struct PlayerAgeProperties {
/* 0x00 */ f32 ceilingCheckHeight; /* 0x00 */ f32 ceilingCheckHeight;
/* 0x04 */ f32 unk_04; /* 0x04 */ f32 unk_04;
/* 0x08 */ f32 unk_08; /* 0x08 */ f32 unk_08;
@ -380,7 +607,7 @@ typedef struct {
/* 0xCC */ LinkAnimationHeader* unk_CC[2]; /* 0xCC */ LinkAnimationHeader* unk_CC[2];
} PlayerAgeProperties; // size = 0xD4 } PlayerAgeProperties; // size = 0xD4
typedef struct { typedef struct WeaponInfo {
/* 0x00 */ s32 active; /* 0x00 */ s32 active;
/* 0x04 */ Vec3f tip; /* 0x04 */ Vec3f tip;
/* 0x10 */ Vec3f base; /* 0x10 */ Vec3f base;
@ -389,7 +616,7 @@ typedef struct {
// #region SOH [General] // #region SOH [General]
// Supporting pendingFlag // Supporting pendingFlag
// Upstream TODO: Rename these to be more obviously SoH specific // Upstream TODO: Rename these to be more obviously SoH specific
typedef enum { typedef enum FlagType {
FLAG_NONE, FLAG_NONE,
FLAG_SCENE_SWITCH, FLAG_SCENE_SWITCH,
FLAG_SCENE_TREASURE, FLAG_SCENE_TREASURE,
@ -403,47 +630,47 @@ typedef enum {
FLAG_GS_TOKEN, FLAG_GS_TOKEN,
} FlagType; } FlagType;
typedef struct { typedef struct PendingFlag {
/* 0x00 */ s32 flagID; // which flag to set when Player_SetPendingFlag is called /* 0x00 */ s32 flagID; // which flag to set when Player_SetPendingFlag is called
/* 0x04 */ FlagType flagType; // type of flag to set when Player_SetPendingFlag is called /* 0x04 */ FlagType flagType; // type of flag to set when Player_SetPendingFlag is called
} PendingFlag; // size = 0x06 } PendingFlag; // size = 0x06
// #endregion // #endregion
#define PLAYER_STATE1_LOADING (1 << 0) //Transitioning to a new scene #define PLAYER_STATE1_LOADING (1 << 0) //Transitioning to a new scene
#define PLAYER_STATE1_SWINGING_BOTTLE (1 << 1) #define PLAYER_STATE1_SWINGING_BOTTLE (1 << 1) // Bottle is swung; Bottle is active and can catch things
#define PLAYER_STATE1_HOOKSHOT_FALLING (1 << 2) #define PLAYER_STATE1_HOOKSHOT_FALLING (1 << 2)
#define PLAYER_STATE1_ITEM_IN_HAND (1 << 3) #define PLAYER_STATE1_ITEM_IN_HAND (1 << 3)
#define PLAYER_STATE1_ENEMY_TARGET (1 << 4) #define PLAYER_STATE1_HOSTILE_LOCK_ON (1 << 4) // Currently locked onto a hostile actor. Triggers a "battle" variant of many actions.
#define PLAYER_STATE1_INPUT_DISABLED (1 << 5) #define PLAYER_STATE1_INPUT_DISABLED (1 << 5)
#define PLAYER_STATE1_TEXT_ON_SCREEN (1 << 6) #define PLAYER_STATE1_TALKING (1 << 6) // Currently talking to an actor. This includes item exchanges.
#define PLAYER_STATE1_DEAD (1 << 7) #define PLAYER_STATE1_DEAD (1 << 7) // Player has died. Note that this gets set when the death cutscene has started, after landing from the air.
#define PLAYER_STATE1_START_PUTAWAY (1 << 8) #define PLAYER_STATE1_START_CHANGING_HELD_ITEM (1 << 8) // Item change process has begun
#define PLAYER_STATE1_READY_TO_FIRE (1 << 9) #define PLAYER_STATE1_READY_TO_FIRE (1 << 9)
#define PLAYER_STATE1_GETTING_ITEM (1 << 10) #define PLAYER_STATE1_GETTING_ITEM (1 << 10)
#define PLAYER_STATE1_ITEM_OVER_HEAD (1 << 11) #define PLAYER_STATE1_CARRYING_ACTOR (1 << 11) // Currently carrying an actor
#define PLAYER_STATE1_CHARGING_SPIN_ATTACK (1 << 12) #define PLAYER_STATE1_CHARGING_SPIN_ATTACK (1 << 12) // Currently charing a spin attack (by holding down the B button)
#define PLAYER_STATE1_HANGING_OFF_LEDGE (1 << 13) #define PLAYER_STATE1_HANGING_OFF_LEDGE (1 << 13)
#define PLAYER_STATE1_CLIMBING_LEDGE (1 << 14) #define PLAYER_STATE1_CLIMBING_LEDGE (1 << 14)
#define PLAYER_STATE1_TARGETING (1 << 15) #define PLAYER_STATE1_Z_TARGETING (1 << 15) // Either lock-on or parallel is active. This flag is never checked for and is practically unused.
#define PLAYER_STATE1_TARGET_LOCKED (1 << 16) #define PLAYER_STATE1_FRIENDLY_ACTOR_FOCUS (1 << 16) // Currently focusing on a friendly actor. Includes friendly lock-on, talking, and more. Usually does not include hostile actor lock-on, see `PLAYER_STATE1_HOSTILE_LOCK_ON`.
#define PLAYER_STATE1_TARGET_NOTHING (1 << 17) #define PLAYER_STATE1_PARALLEL (1 << 17) // "Parallel" mode, Z-Target without an actor lock-on
#define PLAYER_STATE1_JUMPING (1 << 18) #define PLAYER_STATE1_JUMPING (1 << 18)
#define PLAYER_STATE1_FREEFALL (1 << 19) #define PLAYER_STATE1_FREEFALL (1 << 19)
#define PLAYER_STATE1_FIRST_PERSON (1 << 20) #define PLAYER_STATE1_FIRST_PERSON (1 << 20)
#define PLAYER_STATE1_CLIMBING_LADDER (1 << 21) #define PLAYER_STATE1_CLIMBING_LADDER (1 << 21)
#define PLAYER_STATE1_SHIELDING (1 << 22) #define PLAYER_STATE1_SHIELDING (1 << 22)
#define PLAYER_STATE1_ON_HORSE (1 << 23) #define PLAYER_STATE1_ON_HORSE (1 << 23)
#define PLAYER_STATE1_BOOMERANG_IN_HAND (1 << 24) #define PLAYER_STATE1_USING_BOOMERANG (1 << 24) // Currently using the boomerang. This includes all phases (aiming, throwing, and catching).
#define PLAYER_STATE1_THREW_BOOMERANG (1 << 25) #define PLAYER_STATE1_BOOMERANG_THROWN (1 << 25) // Boomerang has been thrown and is flying in the air
#define PLAYER_STATE1_DAMAGED (1 << 26) #define PLAYER_STATE1_DAMAGED (1 << 26)
#define PLAYER_STATE1_IN_WATER (1 << 27) #define PLAYER_STATE1_IN_WATER (1 << 27)
#define PLAYER_STATE1_IN_ITEM_CS (1 << 28) #define PLAYER_STATE1_IN_ITEM_CS (1 << 28)
#define PLAYER_STATE1_IN_CUTSCENE (1 << 29) #define PLAYER_STATE1_IN_CUTSCENE (1 << 29)
#define PLAYER_STATE1_30 (1 << 30) //Unknown, potentially target related? #define PLAYER_STATE1_LOCK_ON_FORCED_TO_RELEASE (1 << 30) // Lock-on was released automatically, for example by leaving the lock-on leash range
#define PLAYER_STATE1_FLOOR_DISABLED (1 << 31) //Used for grottos #define PLAYER_STATE1_FLOOR_DISABLED (1 << 31) //Used for grottos
#define PLAYER_STATE2_DO_ACTION_GRAB (1 << 0) #define PLAYER_STATE2_DO_ACTION_GRAB (1 << 0)
#define PLAYER_STATE2_SPEAK_OR_CHECK (1 << 1) #define PLAYER_STATE2_CAN_ACCEPT_TALK_OFFER (1 << 1) // Can accept a talk offer. "Speak" or "Check" is shown on the A button.
#define PLAYER_STATE2_DO_ACTION_CLIMB (1 << 2) #define PLAYER_STATE2_DO_ACTION_CLIMB (1 << 2)
#define PLAYER_STATE2_FOOTSTEP (1 << 3) #define PLAYER_STATE2_FOOTSTEP (1 << 3)
#define PLAYER_STATE2_MOVING_DYNAPOLY (1 << 4) #define PLAYER_STATE2_MOVING_DYNAPOLY (1 << 4)
@ -451,18 +678,18 @@ typedef struct {
#define PLAYER_STATE2_DISABLE_ROTATION_ALWAYS (1 << 6) #define PLAYER_STATE2_DISABLE_ROTATION_ALWAYS (1 << 6)
#define PLAYER_STATE2_GRABBED_BY_ENEMY (1 << 7) #define PLAYER_STATE2_GRABBED_BY_ENEMY (1 << 7)
#define PLAYER_STATE2_GRABBING_DYNAPOLY (1 << 8) #define PLAYER_STATE2_GRABBING_DYNAPOLY (1 << 8)
#define PLAYER_STATE2_SPAWN_DUST (1 << 9) #define PLAYER_STATE2_FORCE_SAND_FLOOR_SOUND (1 << 9) // Forces sand footstep sounds regardless of current floor type
#define PLAYER_STATE2_UNDERWATER (1 << 10) #define PLAYER_STATE2_UNDERWATER (1 << 10)
#define PLAYER_STATE2_DIVING (1 << 11) #define PLAYER_STATE2_DIVING (1 << 11)
#define PLAYER_STATE2_STATIONARY_LADDER (1 << 12) #define PLAYER_STATE2_STATIONARY_LADDER (1 << 12)
#define PLAYER_STATE2_SWITCH_TARGETING (1 << 13) #define PLAYER_STATE2_LOCK_ON_WITH_SWITCH (1 << 13) // Actor lock-on is active, specifically with Switch Targeting. Hold Targeting checks the state of the Z button instead of this flag.
#define PLAYER_STATE2_FROZEN (1 << 14) #define PLAYER_STATE2_FROZEN (1 << 14)
#define PLAYER_STATE2_PAUSE_MOST_UPDATING (1 << 15) #define PLAYER_STATE2_PAUSE_MOST_UPDATING (1 << 15)
#define PLAYER_STATE2_DO_ACTION_ENTER (1 << 16) // Turns on the "Enter On A" DoAction #define PLAYER_STATE2_DO_ACTION_ENTER (1 << 16) // Sets the "Enter On A" DoAction
#define PLAYER_STATE2_SPIN_ATTACKING (1 << 17) //w/o magic #define PLAYER_STATE2_SPIN_ATTACKING (1 << 17) //w/o magic
#define PLAYER_STATE2_CRAWLING (1 << 18) // Crawling through a crawlspace #define PLAYER_STATE2_CRAWLING (1 << 18) // Crawling through a crawlspace
#define PLAYER_STATE2_HOPPING (1 << 19) //Sidehop/backflip #define PLAYER_STATE2_HOPPING (1 << 19) //Sidehop/backflip
#define PLAYER_STATE2_NAVI_OUT (1 << 20) #define PLAYER_STATE2_NAVI_ACTIVE (1 << 20) // Navi is visible and active. Could be hovering idle near Link or hovering over other actors.
#define PLAYER_STATE2_NAVI_ALERT (1 << 21) #define PLAYER_STATE2_NAVI_ALERT (1 << 21)
#define PLAYER_STATE2_DO_ACTION_DOWN (1 << 22) #define PLAYER_STATE2_DO_ACTION_DOWN (1 << 22)
#define PLAYER_STATE2_NEAR_OCARINA_ACTOR (1 << 23) #define PLAYER_STATE2_NEAR_OCARINA_ACTOR (1 << 23)
@ -470,7 +697,7 @@ typedef struct {
#define PLAYER_STATE2_PLAY_FOR_ACTOR (1 << 25) #define PLAYER_STATE2_PLAY_FOR_ACTOR (1 << 25)
#define PLAYER_STATE2_REFLECTION (1 << 26) //Handles Dark Link's Reflection #define PLAYER_STATE2_REFLECTION (1 << 26) //Handles Dark Link's Reflection
#define PLAYER_STATE2_OCARINA_PLAYING (1 << 27) #define PLAYER_STATE2_OCARINA_PLAYING (1 << 27)
#define PLAYER_STATE2_IDLING (1 << 28) #define PLAYER_STATE2_IDLE_FIDGET (1 << 28) // Playing a fidget idle animation (under typical circumstances, see `Player_ChooseNextIdleAnim` for more info)
#define PLAYER_STATE2_DISABLE_DRAW (1 << 29) #define PLAYER_STATE2_DISABLE_DRAW (1 << 29)
#define PLAYER_STATE2_SWORD_LUNGE (1 << 30) #define PLAYER_STATE2_SWORD_LUNGE (1 << 30)
#define PLAYER_STATE2_FORCED_VOID_OUT (1 << 31) #define PLAYER_STATE2_FORCED_VOID_OUT (1 << 31)
@ -482,11 +709,21 @@ typedef struct {
#define PLAYER_STATE3_CHECK_FLOOR_WATER_COLLISION (1 << 4) #define PLAYER_STATE3_CHECK_FLOOR_WATER_COLLISION (1 << 4)
#define PLAYER_STATE3_FORCE_PULL_OCARINA (1 << 5) #define PLAYER_STATE3_FORCE_PULL_OCARINA (1 << 5)
#define PLAYER_STATE3_RESTORE_NAYRUS_LOVE (1 << 6) // Set by ocarina effects actors when destroyed to signal Nayru's Love may be restored (see `ACTOROVL_ALLOC_ABSOLUTE`) #define PLAYER_STATE3_RESTORE_NAYRUS_LOVE (1 << 6) // Set by ocarina effects actors when destroyed to signal Nayru's Love may be restored (see `ACTOROVL_ALLOC_ABSOLUTE`)
#define PLAYER_STATE3_HOOKSHOT_TRAVELLING (1 << 7) //Travelling to target #define PLAYER_STATE3_FLYING_WITH_HOOKSHOT (1 << 7) // Flying in the air with the hookshot as it pulls Player toward its destination
typedef void (*PlayerActionFunc)(struct Player*, struct PlayState*); typedef void (*PlayerActionFunc)(struct Player*, struct PlayState*);
typedef s32 (*UpperActionFunc)(struct Player*, struct PlayState*); typedef s32 (*UpperActionFunc)(struct Player*, struct PlayState*);
typedef void (*PlayerFuncA74)(struct PlayState*, struct Player*); typedef void (*AfterPutAwayFunc)(struct PlayState*, struct Player*);
#define UNK6AE_ROT_FOCUS_X (1 << 0)
#define UNK6AE_ROT_FOCUS_Y (1 << 1)
#define UNK6AE_ROT_FOCUS_Z (1 << 2)
#define UNK6AE_ROT_HEAD_X (1 << 3)
#define UNK6AE_ROT_HEAD_Y (1 << 4)
#define UNK6AE_ROT_HEAD_Z (1 << 5)
#define UNK6AE_ROT_UPPER_X (1 << 6)
#define UNK6AE_ROT_UPPER_Y (1 << 7)
#define UNK6AE_ROT_UPPER_Z (1 << 8)
typedef struct Player { typedef struct Player {
/* 0x0000 */ Actor actor; /* 0x0000 */ Actor actor;
@ -547,71 +784,76 @@ typedef struct Player {
/* 0x0450 */ Vec3f unk_450; /* 0x0450 */ Vec3f unk_450;
/* 0x045C */ Vec3f unk_45C; /* 0x045C */ Vec3f unk_45C;
/* 0x0468 */ char unk_468[0x002]; /* 0x0468 */ char unk_468[0x002];
/* 0x046A */ s16 doorBgCamIndex; /* 0x046A */ union {
s16 haltActorsDuringCsAction; // If true, halt actors belonging to certain categories during a `csAction`
s16 slidingDoorBgCamIndex; // `BgCamIndex` used during a sliding door cutscene
} cv; // "Cutscene Variable": context dependent variable that has different meanings depending on what function is called
/* 0x046C */ s16 subCamId; /* 0x046C */ s16 subCamId;
/* 0x046E */ char unk_46E[0x02A]; /* 0x046E */ char unk_46E[0x02A];
/* 0x0498 */ ColliderCylinder cylinder; /* 0x0498 */ ColliderCylinder cylinder;
/* 0x04E4 */ ColliderQuad meleeWeaponQuads[2]; /* 0x04E4 */ ColliderQuad meleeWeaponQuads[2];
/* 0x05E4 */ ColliderQuad shieldQuad; /* 0x05E4 */ ColliderQuad shieldQuad;
/* 0x0664 */ Actor* unk_664; /* 0x0664 */ Actor* focusActor; // Actor that Player and the camera are looking at; Used for lock-on, talking, and more
/* 0x0668 */ char unk_668[0x004]; /* 0x0668 */ char unk_668[0x004];
/* 0x066C */ s32 unk_66C; /* 0x066C */ s32 zTargetActiveTimer; // Non-zero values indicate Z-Targeting should update; Values under 5 indicate lock-on is releasing
/* 0x0670 */ s32 meleeWeaponEffectIndex; /* 0x0670 */ s32 meleeWeaponEffectIndex;
/* 0x0674 */ PlayerActionFunc actionFunc; /* 0x0674 */ PlayerActionFunc actionFunc;
/* 0x0678 */ PlayerAgeProperties* ageProperties; /* 0x0678 */ PlayerAgeProperties* ageProperties;
/* 0x067C */ u32 stateFlags1; /* 0x067C */ u32 stateFlags1;
/* 0x0680 */ u32 stateFlags2; /* 0x0680 */ u32 stateFlags2;
/* 0x0684 */ Actor* unk_684; /* 0x0684 */ Actor* autoLockOnActor; // Actor that is locked onto automatically without player input; see `Player_SetAutoLockOnActor`
/* 0x0688 */ Actor* boomerangActor; /* 0x0688 */ Actor* boomerangActor;
/* 0x068C */ Actor* naviActor; /* 0x068C */ Actor* naviActor;
/* 0x0690 */ s16 naviTextId; /* 0x0690 */ s16 naviTextId;
/* 0x0692 */ u8 stateFlags3; /* 0x0692 */ u8 stateFlags3;
/* 0x0693 */ s8 exchangeItemId; /* 0x0693 */ s8 exchangeItemId;
/* 0x0694 */ Actor* targetActor; /* 0x0694 */ Actor* talkActor; // Actor offering to talk, or currently talking to, depending on context
/* 0x0698 */ f32 targetActorDistance; /* 0x0698 */ f32 talkActorDistance; // xz distance away from `talkActor`
/* 0x069C */ char unk_69C[0x004]; /* 0x069C */ char unk_69C[0x004];
/* 0x06A0 */ f32 unk_6A0; /* 0x06A0 */ f32 unk_6A0;
/* 0x06A4 */ f32 closestSecretDistSq; /* 0x06A4 */ f32 closestSecretDistSq;
/* 0x06A8 */ Actor* unk_6A8; /* 0x06A8 */ Actor* unk_6A8;
/* 0x06AC */ s8 unk_6AC; /* 0x06AC */ s8 idleType;
/* 0x06AD */ u8 unk_6AD; /* 0x06AD */ u8 unk_6AD;
/* 0x06AE */ u16 unk_6AE; /* 0x06AE */ u16 unk_6AE_rotFlags; // See `UNK6AE_ROT_` macros. If its flag isn't set, a rot steps to 0.
/* 0x06B0 */ s16 unk_6B0; /* 0x06B0 */ s16 upperLimbYawSecondary;
/* 0x06B2 */ char unk_6B4[0x004]; /* 0x06B2 */ char unk_6B4[0x004];
/* 0x06B6 */ s16 unk_6B6; /* 0x06B6 */ Vec3s headLimbRot;
/* 0x06B8 */ s16 unk_6B8; /* 0x06BC */ Vec3s upperLimbRot;
/* 0x06BA */ s16 unk_6BA;
/* 0x06BC */ s16 unk_6BC;
/* 0x06BE */ s16 unk_6BE;
/* 0x06C0 */ s16 unk_6C0;
/* 0x06C2 */ s16 unk_6C2; /* 0x06C2 */ s16 unk_6C2;
/* 0x06C4 */ f32 unk_6C4; /* 0x06C4 */ f32 unk_6C4;
/* 0x06C8 */ SkelAnime upperSkelAnime; /* 0x06C8 */ SkelAnime upperSkelAnime;
/* 0x070C */ Vec3s upperJointTable[PLAYER_LIMB_BUF_COUNT]; /* 0x070C */ Vec3s upperJointTable[PLAYER_LIMB_BUF_COUNT];
/* 0x079C */ Vec3s upperMorphTable[PLAYER_LIMB_BUF_COUNT]; /* 0x079C */ Vec3s upperMorphTable[PLAYER_LIMB_BUF_COUNT];
/* 0x082C */ UpperActionFunc upperActionFunc; /* 0x082C */ UpperActionFunc upperActionFunc;
/* 0x0830 */ f32 upperAnimBlendWeight; /* 0x0830 */ f32 upperAnimInterpWeight;
/* 0x0834 */ s16 unk_834; /* 0x0834 */ s16 unk_834;
/* 0x0836 */ s8 unk_836; /* 0x0836 */ s8 unk_836;
/* 0x0837 */ u8 unk_837; /* 0x0837 */ u8 putAwayCooldownTimer;
/* 0x0838 */ f32 linearVelocity; /* 0x0838 */ f32 linearVelocity; // Controls horizontal speed, used for `actor.speed`. Current or target value depending on context.
/* 0x083C */ s16 yaw; // General yaw value, used both for world and shape rotation. Current or target value depending on context. /* 0x083C */ s16 yaw; // General yaw value, used both for world and shape rotation. Current or target value depending on context.
/* 0x083E */ s16 zTargetYaw; // yaw relating to Z targeting/"parallel" mode /* 0x083E */ s16 parallelYaw; // yaw in "parallel" mode, Z-Target without an actor lock-on
/* 0x0840 */ u16 underwaterTimer; /* 0x0840 */ u16 underwaterTimer;
/* 0x0842 */ s8 meleeWeaponAnimation; /* 0x0842 */ s8 meleeWeaponAnimation;
/* 0x0843 */ s8 meleeWeaponState; /* 0x0843 */ s8 meleeWeaponState;
/* 0x0844 */ s8 unk_844; /* 0x0844 */ s8 unk_844;
/* 0x0845 */ u8 unk_845; /* 0x0845 */ u8 unk_845;
/* 0x0846 */ u8 unk_846; /* 0x0846 */ u8 controlStickDataIndex; // cycles between 0 - 3. Used to index `controlStickSpinAngles` and `controlStickDirections`
/* 0x0847 */ s8 unk_847[4]; /* 0x0847 */ s8 controlStickSpinAngles[4]; // Stores a modified version of the control stick angle for the last 4 frames. Used for checking spins.
/* 0x084B */ s8 unk_84B[4]; /* 0x084B */ s8 controlStickDirections[4]; // Stores the control stick direction (relative to shape yaw) for the last 4 frames. See `PlayerStickDirection`.
/* 0x084F */ union { /* 0x084F */ union {
s8 actionVar1; s8 actionVar1;
s8 facingUpSlope; // Player_Action_SlideOnSlope: facing uphill when sliding on a slope
s8 bottleCatchType; // Player_Action_SwingBottle: entry type for `sBottleCatchInfo`, corresponds to actor caught in a bottle
} av1; // "Action Variable 1": context dependent variable that has different meanings depending on what action is currently running } av1; // "Action Variable 1": context dependent variable that has different meanings depending on what action is currently running
/* 0x0850 */ union { /* 0x0850 */ union {
s16 actionVar2; s16 actionVar2;
s16 fallDamageStunTimer; // Player_Action_Idle: Prevents any movement and shakes model up and down quickly to indicate fall damage stun
s16 bonked; // Player_Action_Roll: set to true after bonking into a wall or an actor
s16 startedTextbox; // Player_Action_SwingBottle: set to true when the textbox is started
s16 inWater; // Player_Action_SwingBottle: true if a bottle is swung in water. Used to determine which bottle swing animation to use.
} av2; // "Action Variable 2": context dependent variable that has different meanings depending on what action is currently running } av2; // "Action Variable 2": context dependent variable that has different meanings depending on what action is currently running
/* 0x0854 */ f32 unk_854; /* 0x0854 */ f32 unk_854;
@ -626,14 +868,14 @@ typedef struct Player {
/* 0x0874 */ f32 unk_874; /* 0x0874 */ f32 unk_874;
/* 0x0878 */ f32 unk_878; /* 0x0878 */ f32 unk_878;
/* 0x087C */ s16 unk_87C; /* 0x087C */ s16 unk_87C;
/* 0x087E */ s16 unk_87E; /* 0x087E */ s16 turnRate; // Amount angle is changed every frame when turning in place
/* 0x0880 */ f32 unk_880; /* 0x0880 */ f32 unk_880;
/* 0x0884 */ f32 yDistToLedge; // y distance to ground above an interact wall. LEDGE_DIST_MAX if no ground is found /* 0x0884 */ f32 yDistToLedge; // y distance to ground above an interact wall. LEDGE_DIST_MAX if no ground is found
/* 0x0888 */ f32 distToInteractWall; // xyz distance to the interact wall /* 0x0888 */ f32 distToInteractWall; // xyz distance to the interact wall
/* 0x088C */ u8 ledgeClimbType; /* 0x088C */ u8 ledgeClimbType;
/* 0x088D */ u8 ledgeClimbDelayTimer; /* 0x088D */ u8 ledgeClimbDelayTimer;
/* 0x088E */ u8 unk_88E; /* 0x088E */ u8 textboxBtnCooldownTimer; // Prevents usage of A/B/C-up when counting down
/* 0x088F */ u8 unk_88F; /* 0x088F */ u8 damageFlickerAnimCounter; // Used to flicker Link after taking damage
/* 0x0890 */ u8 unk_890; /* 0x0890 */ u8 unk_890;
/* 0x0891 */ u8 bodyShockTimer; /* 0x0891 */ u8 bodyShockTimer;
/* 0x0892 */ u8 unk_892; /* 0x0892 */ u8 unk_892;
@ -644,11 +886,11 @@ typedef struct Player {
/* 0x089A */ s16 floorPitchAlt; // the calculation for this value is bugged and doesn't represent anything meaningful /* 0x089A */ s16 floorPitchAlt; // the calculation for this value is bugged and doesn't represent anything meaningful
/* 0x089C */ s16 unk_89C; /* 0x089C */ s16 unk_89C;
/* 0x089E */ u16 floorSfxOffset; /* 0x089E */ u16 floorSfxOffset;
/* 0x08A0 */ u8 unk_8A0; /* 0x08A0 */ u8 knockbackDamage;
/* 0x08A1 */ u8 unk_8A1; /* 0x08A1 */ u8 knockbackType;
/* 0x08A2 */ s16 unk_8A2; /* 0x08A2 */ s16 knockbackRot;
/* 0x08A4 */ f32 unk_8A4; /* 0x08A4 */ f32 knockbackSpeed;
/* 0x08A8 */ f32 unk_8A8; /* 0x08A8 */ f32 knockbackYVelocity;
/* 0x08AC */ f32 pushedSpeed; // Pushing player, examples include water currents, floor conveyors, climbing sloped surfaces /* 0x08AC */ f32 pushedSpeed; // Pushing player, examples include water currents, floor conveyors, climbing sloped surfaces
/* 0x08B0 */ s16 pushedYaw; // Yaw direction of player being pushed /* 0x08B0 */ s16 pushedYaw; // Yaw direction of player being pushed
/* 0x08B4 */ WeaponInfo meleeWeaponInfo[3]; /* 0x08B4 */ WeaponInfo meleeWeaponInfo[3];
@ -658,8 +900,8 @@ typedef struct Player {
/* 0x0A60 */ u8 bodyIsBurning; /* 0x0A60 */ u8 bodyIsBurning;
/* 0x0A61 */ u8 bodyFlameTimers[PLAYER_BODYPART_MAX]; // one flame per body part /* 0x0A61 */ u8 bodyFlameTimers[PLAYER_BODYPART_MAX]; // one flame per body part
/* 0x0A73 */ u8 unk_A73; /* 0x0A73 */ u8 unk_A73;
/* 0x0A74 */ PlayerFuncA74 func_A74; /* 0x0A74 */ AfterPutAwayFunc afterPutAwayFunc; // See `Player_SetupWaitForPutAway` and `Player_Action_WaitForPutAway`
/* 0x0A78 */ s8 invincibilityTimer; // prevents damage when nonzero (positive = visible, counts towards zero each frame) /* 0x0A78 */ s8 invincibilityTimer; // prevents damage when nonzero. Positive values are intangibility, negative are invulnerability
/* 0x0A79 */ u8 floorTypeTimer; // counts up every frame the current floor type is the same as the last frame /* 0x0A79 */ u8 floorTypeTimer; // counts up every frame the current floor type is the same as the last frame
/* 0x0A7A */ u8 floorProperty; /* 0x0A7A */ u8 floorProperty;
/* 0x0A7B */ u8 prevFloorType; /* 0x0A7B */ u8 prevFloorType;
@ -678,9 +920,9 @@ typedef struct Player {
// #region SOH [Enhancements] // #region SOH [Enhancements]
// Upstream TODO: Rename this to make it more obvious it is apart of an enhancement // Upstream TODO: Rename this to make it more obvious it is apart of an enhancement
/* */ u8 boomerangQuickRecall; // Has the player pressed the boomerang button while it's in the air still? /* */ u8 boomerangQuickRecall; // Has the player pressed the boomerang button while it's in the air still?
/* */ u8 ivanFloating;
/* */ u8 ivanDamageMultiplier;
// #endregion // #endregion
u8 ivanFloating;
u8 ivanDamageMultiplier;
} Player; // size = 0xA94 } Player; // size = 0xA94
#endif #endif

View File

@ -1060,7 +1060,7 @@ void ActorViewerWindow::DrawElement() {
if (ImGui::Button("Fetch from Target")) { if (ImGui::Button("Fetch from Target")) {
Player* player = GET_PLAYER(gPlayState); Player* player = GET_PLAYER(gPlayState);
fetch = player->targetActor; fetch = player->talkActor;
if (fetch != NULL) { if (fetch != NULL) {
display = fetch; display = fetch;
category = fetch->category; category = fetch->category;

View File

@ -613,8 +613,8 @@ void DrawFlagsTab() {
ImGui::SameLine(); ImGui::SameLine();
DrawGroupWithBorder([&]() { DrawGroupWithBorder([&]() {
ImGui::Text("unk_6AE"); ImGui::Text("unk_6AE_rotFlags");
UIWidgets::DrawFlagArray16("unk_6AE", player->unk_6AE); UIWidgets::DrawFlagArray16("unk_6AE_rotFlags", player->unk_6AE_rotFlags);
}); });
} }
ImGui::TreePop(); ImGui::TreePop();

View File

@ -50,8 +50,8 @@ extern "C" {
extern SaveContext gSaveContext; extern SaveContext gSaveContext;
extern PlayState* gPlayState; extern PlayState* gPlayState;
extern void func_8084DFAC(PlayState* play, Player* player); extern void func_8084DFAC(PlayState* play, Player* player);
extern void func_80835DAC(PlayState* play, Player* player, PlayerActionFunc actionFunc, s32 flags); extern void Player_SetupActionPreserveAnimMovement(PlayState* play, Player* player, PlayerActionFunc actionFunc, s32 flags);
extern s32 func_80836898(PlayState* play, Player* player, PlayerFuncA74 func); extern s32 Player_SetupWaitForPutAway(PlayState* play, Player* player, AfterPutAwayFunc func);
} }
#define RAND_GET_OPTION(option) Rando::Context::GetInstance()->GetOption(option).GetSelectedOptionIndex() #define RAND_GET_OPTION(option) Rando::Context::GetInstance()->GetOption(option).GetSelectedOptionIndex()
@ -252,7 +252,7 @@ void RandomizerOnPlayerUpdateForRCQueueHandler() {
// If we're in a cutscene, don't queue // If we're in a cutscene, don't queue
Player* player = GET_PLAYER(gPlayState); Player* player = GET_PLAYER(gPlayState);
if (Player_InBlockingCsMode(gPlayState, player) || player->stateFlags1 & PLAYER_STATE1_IN_ITEM_CS || player->stateFlags1 & PLAYER_STATE1_GETTING_ITEM || player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) { if (Player_InBlockingCsMode(gPlayState, player) || player->stateFlags1 & PLAYER_STATE1_IN_ITEM_CS || player->stateFlags1 & PLAYER_STATE1_GETTING_ITEM || player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
return; return;
} }
@ -297,7 +297,7 @@ void RandomizerOnPlayerUpdateForItemQueueHandler() {
if (randomizerQueuedCheck == RC_UNKNOWN_CHECK) return; if (randomizerQueuedCheck == RC_UNKNOWN_CHECK) return;
Player* player = GET_PLAYER(gPlayState); Player* player = GET_PLAYER(gPlayState);
if (player == NULL || Player_InBlockingCsMode(gPlayState, player) || player->stateFlags1 & PLAYER_STATE1_IN_ITEM_CS || player->stateFlags1 & PLAYER_STATE1_GETTING_ITEM || player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) { if (player == NULL || Player_InBlockingCsMode(gPlayState, player) || player->stateFlags1 & PLAYER_STATE1_IN_ITEM_CS || player->stateFlags1 & PLAYER_STATE1_GETTING_ITEM || player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
return; return;
} }
@ -306,7 +306,7 @@ void RandomizerOnPlayerUpdateForItemQueueHandler() {
if (player->stateFlags1 & PLAYER_STATE1_IN_WATER) { if (player->stateFlags1 & PLAYER_STATE1_IN_WATER) {
// Allow the player to receive the item while swimming // Allow the player to receive the item while swimming
player->stateFlags2 |= PLAYER_STATE2_UNDERWATER; player->stateFlags2 |= PLAYER_STATE2_UNDERWATER;
Player_ActionChange_2(player, gPlayState); Player_ActionHandler_2(player, gPlayState);
} }
} }
@ -342,7 +342,7 @@ void RandomizerOnItemReceiveHandler(GetItemEntry receivedItemEntry) {
static uint32_t updateHook; static uint32_t updateHook;
updateHook = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPlayerUpdate>([]() { updateHook = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPlayerUpdate>([]() {
Player* player = GET_PLAYER(gPlayState); Player* player = GET_PLAYER(gPlayState);
if (player == NULL || Player_InBlockingCsMode(gPlayState, player) || player->stateFlags1 & PLAYER_STATE1_IN_ITEM_CS || player->stateFlags1 & PLAYER_STATE1_GETTING_ITEM || player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) { if (player == NULL || Player_InBlockingCsMode(gPlayState, player) || player->stateFlags1 & PLAYER_STATE1_IN_ITEM_CS || player->stateFlags1 & PLAYER_STATE1_GETTING_ITEM || player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
return; return;
} }
@ -604,7 +604,7 @@ void Player_Action_8084E6D4_override(Player* player, PlayState* play) {
} }
void func_8083A434_override(PlayState* play, Player* player) { void func_8083A434_override(PlayState* play, Player* player) {
func_80835DAC(play, player, Player_Action_8084E6D4_override, 0); Player_SetupActionPreserveAnimMovement(play, player, Player_Action_8084E6D4_override, 0);
player->stateFlags1 |= PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_IN_CUTSCENE; player->stateFlags1 |= PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_IN_CUTSCENE;
} }
@ -643,7 +643,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l
RandomizerSetChestGameRandomizerInf(rc); RandomizerSetChestGameRandomizerInf(rc);
Player* player = GET_PLAYER(gPlayState); Player* player = GET_PLAYER(gPlayState);
func_80836898(gPlayState, player, func_8083A434_override); Player_SetupWaitForPutAway(gPlayState, player, func_8083A434_override);
*should = false; *should = false;
break; break;

View File

@ -991,7 +991,7 @@ void TimeSaverOnPlayerUpdateHandler() {
if (vanillaQueuedItemEntry.itemId == ITEM_NONE) return; if (vanillaQueuedItemEntry.itemId == ITEM_NONE) return;
Player* player = GET_PLAYER(gPlayState); Player* player = GET_PLAYER(gPlayState);
if (player == NULL || Player_InBlockingCsMode(gPlayState, player) || player->stateFlags1 & PLAYER_STATE1_IN_ITEM_CS || player->stateFlags1 & PLAYER_STATE1_GETTING_ITEM || player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) { if (player == NULL || Player_InBlockingCsMode(gPlayState, player) || player->stateFlags1 & PLAYER_STATE1_IN_ITEM_CS || player->stateFlags1 & PLAYER_STATE1_GETTING_ITEM || player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
return; return;
} }
@ -1000,7 +1000,7 @@ void TimeSaverOnPlayerUpdateHandler() {
if (player->stateFlags1 & PLAYER_STATE1_IN_WATER) { if (player->stateFlags1 & PLAYER_STATE1_IN_WATER) {
// Allow the player to receive the item while swimming // Allow the player to receive the item while swimming
player->stateFlags2 |= PLAYER_STATE2_UNDERWATER; player->stateFlags2 |= PLAYER_STATE2_UNDERWATER;
Player_ActionChange_2(player, gPlayState); Player_ActionHandler_2(player, gPlayState);
} }
} }

View File

@ -2588,7 +2588,7 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
Player_GetMask(play) == PLAYER_MASK_TRUTH) || Player_GetMask(play) == PLAYER_MASK_TRUTH) ||
(Randomizer_GetSettingValue(RSK_GOSSIP_STONE_HINTS) == RO_GOSSIP_STONES_NEED_STONE && CHECK_QUEST_ITEM(QUEST_STONE_OF_AGONY)))) { (Randomizer_GetSettingValue(RSK_GOSSIP_STONE_HINTS) == RO_GOSSIP_STONES_NEED_STONE && CHECK_QUEST_ITEM(QUEST_STONE_OF_AGONY)))) {
Actor* stone = GET_PLAYER(play)->targetActor; Actor* stone = GET_PLAYER(play)->talkActor;
RandomizerHint stoneHint = RH_NONE; RandomizerHint stoneHint = RH_NONE;
s16 hintParams = stone->params & 0xFF; s16 hintParams = stone->params & 0xFF;
@ -2642,7 +2642,7 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
messageEntry = OTRGlobals::Instance->gRandomizer->GetMerchantMessage(rc, TEXT_SHOP_ITEM_RANDOM_CONFIRM); messageEntry = OTRGlobals::Instance->gRandomizer->GetMerchantMessage(rc, TEXT_SHOP_ITEM_RANDOM_CONFIRM);
// textId: TEXT_SCRUB_RANDOM + (randomizerInf - RAND_INF_SCRUBS_PURCHASED_DODONGOS_CAVERN_DEKU_SCRUB_NEAR_BOMB_BAG_LEFT) // textId: TEXT_SCRUB_RANDOM + (randomizerInf - RAND_INF_SCRUBS_PURCHASED_DODONGOS_CAVERN_DEKU_SCRUB_NEAR_BOMB_BAG_LEFT)
} else if (textId == TEXT_SCRUB_RANDOM) { } else if (textId == TEXT_SCRUB_RANDOM) {
EnDns* enDns = (EnDns*)GET_PLAYER(play)->targetActor; EnDns* enDns = (EnDns*)GET_PLAYER(play)->talkActor;
RandomizerCheck rc = OTRGlobals::Instance->gRandomizer->GetCheckFromRandomizerInf((RandomizerInf)enDns->sohScrubIdentity.randomizerInf); RandomizerCheck rc = OTRGlobals::Instance->gRandomizer->GetCheckFromRandomizerInf((RandomizerInf)enDns->sohScrubIdentity.randomizerInf);
messageEntry = OTRGlobals::Instance->gRandomizer->GetMerchantMessage(rc, TEXT_SCRUB_RANDOM, TEXT_SCRUB_RANDOM_FREE, Randomizer_GetSettingValue(RSK_SCRUB_TEXT_HINT) == RO_GENERIC_OFF); messageEntry = OTRGlobals::Instance->gRandomizer->GetMerchantMessage(rc, TEXT_SCRUB_RANDOM, TEXT_SCRUB_RANDOM_FREE, Randomizer_GetSettingValue(RSK_SCRUB_TEXT_HINT) == RO_GENERIC_OFF);
} else if (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("RandomizeRupeeNames"), 1) && } else if (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("RandomizeRupeeNames"), 1) &&
@ -2679,7 +2679,7 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
else if (textId == TEXT_CARPET_SALESMAN_ARMS_DEALER){ else if (textId == TEXT_CARPET_SALESMAN_ARMS_DEALER){
messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::merchantMessageTableID, textId, MF_AUTO_FORMAT); messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::merchantMessageTableID, textId, MF_AUTO_FORMAT);
} else if (textId == TEXT_SKULLTULA_PEOPLE_IM_CURSED) { } else if (textId == TEXT_SKULLTULA_PEOPLE_IM_CURSED) {
actorParams = GET_PLAYER(play)->targetActor->params; actorParams = GET_PLAYER(play)->talkActor->params;
if (actorParams == 1 && ctx->GetOption(RSK_KAK_10_SKULLS_HINT)){ if (actorParams == 1 && ctx->GetOption(RSK_KAK_10_SKULLS_HINT)){
messageEntry = ctx->GetHint(RH_KAK_10_SKULLS_HINT)->GetHintMessage(MF_AUTO_FORMAT); messageEntry = ctx->GetHint(RH_KAK_10_SKULLS_HINT)->GetHintMessage(MF_AUTO_FORMAT);
} else if (actorParams == 2 && ctx->GetOption(RSK_KAK_20_SKULLS_HINT)){ } else if (actorParams == 2 && ctx->GetOption(RSK_KAK_20_SKULLS_HINT)){

View File

@ -486,7 +486,7 @@ void func_8002C124(TargetContext* targetCtx, PlayState* play) {
func_8002BE64(targetCtx, targetCtx->unk_4C, spBC.x, spBC.y, spBC.z); func_8002BE64(targetCtx, targetCtx->unk_4C, spBC.x, spBC.y, spBC.z);
if ((!(player->stateFlags1 & PLAYER_STATE1_TEXT_ON_SCREEN)) || (actor != player->unk_664)) { if ((!(player->stateFlags1 & PLAYER_STATE1_TALKING)) || (actor != player->focusActor)) {
OVERLAY_DISP = Gfx_SetupDL(OVERLAY_DISP, 0x39); OVERLAY_DISP = Gfx_SetupDL(OVERLAY_DISP, 0x39);
for (spB0 = 0, spAC = targetCtx->unk_4C; spB0 < spB8; spB0++, spAC = (spAC + 1) % 3) { for (spB0 = 0, spAC = targetCtx->unk_4C; spB0 < spB8; spB0++, spAC = (spAC + 1) % 3) {
@ -564,7 +564,7 @@ void func_8002C7BC(TargetContext* targetCtx, Player* player, Actor* actorArg, Pl
unkActor = NULL; unkActor = NULL;
if ((player->unk_664 != NULL) && (player->unk_84B[player->unk_846] == 2)) { if ((player->focusActor != NULL) && (player->controlStickDirections[player->controlStickDataIndex] == 2)) {
targetCtx->unk_94 = NULL; targetCtx->unk_94 = NULL;
} else { } else {
func_80032AF0(play, &play->actorCtx, &unkActor, player); func_80032AF0(play, &play->actorCtx, &unkActor, player);
@ -1397,7 +1397,7 @@ s32 func_8002DD78(Player* player) {
s32 func_8002DDA8(PlayState* play) { s32 func_8002DDA8(PlayState* play) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
return (player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) || func_8002DD78(player); return (player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) || func_8002DD78(player);
} }
s32 func_8002DDE4(PlayState* play) { s32 func_8002DDE4(PlayState* play) {
@ -1448,7 +1448,7 @@ s32 func_8002DF38(PlayState* play, Actor* actor, u8 csAction) {
player->csAction = csAction; player->csAction = csAction;
player->csActor = actor; player->csActor = actor;
player->doorBgCamIndex = 0; player->cv.haltActorsDuringCsAction = false;
return true; return true;
} }
@ -1457,7 +1457,7 @@ s32 Player_SetCsActionWithHaltedActors(PlayState* play, Actor* actor, u8 csActio
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
func_8002DF38(play, actor, csAction); func_8002DF38(play, actor, csAction);
player->doorBgCamIndex = 1; player->cv.haltActorsDuringCsAction = true;
return true; return true;
} }
@ -1854,7 +1854,7 @@ f32 func_8002EFC0(Actor* actor, Player* player, s16 arg2) {
s16 yawTemp = (s16)(actor->yawTowardsPlayer - 0x8000) - arg2; s16 yawTemp = (s16)(actor->yawTowardsPlayer - 0x8000) - arg2;
s16 yawTempAbs = ABS(yawTemp); s16 yawTempAbs = ABS(yawTemp);
if (player->unk_664 != NULL) { if (player->focusActor != NULL) {
if ((yawTempAbs > 0x4000) || (actor->flags & ACTOR_FLAG_NO_LOCKON)) { if ((yawTempAbs > 0x4000) || (actor->flags & ACTOR_FLAG_NO_LOCKON)) {
return FLT_MAX; return FLT_MAX;
} else { } else {
@ -1900,7 +1900,7 @@ s32 func_8002F0C8(Actor* actor, Player* player, s32 flag) {
s16 abs_var = ABS(var); s16 abs_var = ABS(var);
f32 dist; f32 dist;
if ((player->unk_664 == NULL) && (abs_var > 0x2AAA)) { if ((player->focusActor == NULL) && (abs_var > 0x2AAA)) {
dist = FLT_MAX; dist = FLT_MAX;
} else { } else {
dist = actor->xyzDistToPlayerSq; dist = actor->xyzDistToPlayerSq;
@ -1927,13 +1927,13 @@ s32 func_8002F1C4(Actor* actor, PlayState* play, f32 arg2, f32 arg3, u32 exchang
// This is convoluted but it seems like it must be a single if statement to match // This is convoluted but it seems like it must be a single if statement to match
if ((player->actor.flags & ACTOR_FLAG_PLAYER_TALKED_TO) || ((exchangeItemId != EXCH_ITEM_NONE) && Player_InCsMode(play)) || if ((player->actor.flags & ACTOR_FLAG_PLAYER_TALKED_TO) || ((exchangeItemId != EXCH_ITEM_NONE) && Player_InCsMode(play)) ||
(!actor->isTargeted && (!actor->isTargeted &&
((arg3 < fabsf(actor->yDistToPlayer)) || (player->targetActorDistance < actor->xzDistToPlayer) || ((arg3 < fabsf(actor->yDistToPlayer)) || (player->talkActorDistance < actor->xzDistToPlayer) ||
(arg2 < actor->xzDistToPlayer)))) { (arg2 < actor->xzDistToPlayer)))) {
return false; return false;
} }
player->targetActor = actor; player->talkActor = actor;
player->targetActorDistance = actor->xzDistToPlayer; player->talkActorDistance = actor->xzDistToPlayer;
player->exchangeItemId = exchangeItemId; player->exchangeItemId = exchangeItemId;
return true; return true;
@ -2002,7 +2002,7 @@ s32 GiveItemEntryWithoutActor(PlayState* play, GetItemEntry getItemEntry) {
Player_GetExplosiveHeld(player) < 0) { Player_GetExplosiveHeld(player) < 0) {
if (((player->heldActor != NULL) && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX)) || if (((player->heldActor != NULL) && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX)) ||
(IS_RANDO && (getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))) || (IS_RANDO && (getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))) ||
(!(player->stateFlags1 & (PLAYER_STATE1_ITEM_OVER_HEAD | PLAYER_STATE1_IN_CUTSCENE)))) { (!(player->stateFlags1 & (PLAYER_STATE1_CARRYING_ACTOR | PLAYER_STATE1_IN_CUTSCENE)))) {
if ((getItemEntry.getItemId != GI_NONE)) { if ((getItemEntry.getItemId != GI_NONE)) {
player->getItemEntry = getItemEntry; player->getItemEntry = getItemEntry;
player->getItemId = getItemEntry.getItemId; player->getItemId = getItemEntry.getItemId;
@ -2039,10 +2039,10 @@ s32 GiveItemEntryFromActor(Actor* actor, PlayState* play, GetItemEntry getItemEn
(PLAYER_STATE1_DEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE | (PLAYER_STATE1_DEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE |
PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER)) && PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER)) &&
Player_GetExplosiveHeld(player) < 0) { Player_GetExplosiveHeld(player) < 0) {
if ((((player->heldActor != NULL) || (actor == player->targetActor)) && if ((((player->heldActor != NULL) || (actor == player->talkActor)) &&
((!IS_RANDO && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX))) || ((!IS_RANDO && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX))) ||
(IS_RANDO && ((getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))))) || (IS_RANDO && ((getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))))) ||
(!(player->stateFlags1 & (PLAYER_STATE1_ITEM_OVER_HEAD | PLAYER_STATE1_IN_CUTSCENE)))) { (!(player->stateFlags1 & (PLAYER_STATE1_CARRYING_ACTOR | PLAYER_STATE1_IN_CUTSCENE)))) {
if ((actor->xzDistToPlayer < xzRange) && (fabsf(actor->yDistToPlayer) < yRange)) { if ((actor->xzDistToPlayer < xzRange) && (fabsf(actor->yDistToPlayer) < yRange)) {
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y; s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
s32 absYawDiff = ABS(yawDiff); s32 absYawDiff = ABS(yawDiff);
@ -2083,9 +2083,9 @@ s32 Actor_OfferGetItem(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange
(PLAYER_STATE1_DEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE | (PLAYER_STATE1_DEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE |
PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER)) && PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER)) &&
Player_GetExplosiveHeld(player) < 0) { Player_GetExplosiveHeld(player) < 0) {
if ((((player->heldActor != NULL) || (actor == player->targetActor)) && if ((((player->heldActor != NULL) || (actor == player->talkActor)) &&
((!IS_RANDO && ((getItemId > GI_NONE) && (getItemId < GI_MAX))) || (IS_RANDO && ((getItemId > RG_NONE) && (getItemId < RG_MAX))))) || ((!IS_RANDO && ((getItemId > GI_NONE) && (getItemId < GI_MAX))) || (IS_RANDO && ((getItemId > RG_NONE) && (getItemId < RG_MAX))))) ||
(!(player->stateFlags1 & (PLAYER_STATE1_ITEM_OVER_HEAD | PLAYER_STATE1_IN_CUTSCENE)))) { (!(player->stateFlags1 & (PLAYER_STATE1_CARRYING_ACTOR | PLAYER_STATE1_IN_CUTSCENE)))) {
if ((actor->xzDistToPlayer < xzRange) && (fabsf(actor->yDistToPlayer) < yRange)) { if ((actor->xzDistToPlayer < xzRange) && (fabsf(actor->yDistToPlayer) < yRange)) {
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y; s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
s32 absYawDiff = ABS(yawDiff); s32 absYawDiff = ABS(yawDiff);
@ -2156,7 +2156,7 @@ u32 Actor_SetRideActor(PlayState* play, Actor* horse, s32 mountSide) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 & if (!(player->stateFlags1 &
(PLAYER_STATE1_DEAD | PLAYER_STATE1_ITEM_OVER_HEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE | (PLAYER_STATE1_DEAD | PLAYER_STATE1_CARRYING_ACTOR | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_HANGING_OFF_LEDGE |
PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER))) { PLAYER_STATE1_CLIMBING_LEDGE | PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_FIRST_PERSON | PLAYER_STATE1_CLIMBING_LADDER))) {
player->rideActor = horse; player->rideActor = horse;
player->mountSide = mountSide; player->mountSide = mountSide;
@ -2177,11 +2177,11 @@ s32 Actor_NotMounted(PlayState* play, Actor* horse) {
void func_8002F698(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6) { void func_8002F698(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
player->unk_8A0 = arg6; player->knockbackDamage = arg6;
player->unk_8A1 = arg5; player->knockbackType = arg5;
player->unk_8A2 = arg3; player->knockbackRot = arg3;
player->unk_8A4 = arg2; player->knockbackSpeed = arg2;
player->unk_8A8 = arg4; player->knockbackYVelocity = arg4;
} }
void func_8002F6D4(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5) { void func_8002F6D4(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5) {
@ -2502,18 +2502,18 @@ void func_800304DC(PlayState* play, ActorContext* actorCtx, ActorEntry* actorEnt
} }
u32 D_80116068[ACTORCAT_MAX] = { u32 D_80116068[ACTORCAT_MAX] = {
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS, PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS,
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS, PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS,
0, 0,
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS, PLAYER_STATE1_TALKING | PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS,
PLAYER_STATE1_DEAD, PLAYER_STATE1_DEAD,
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE, PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE,
PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS, PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS,
0, 0,
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE, PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE,
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS, PLAYER_STATE1_TALKING | PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS,
0, 0,
PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS, PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS,
}; };
void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) { void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
@ -2558,8 +2558,8 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
unkFlag = ACTOR_FLAG_NO_FREEZE_OCARINA; unkFlag = ACTOR_FLAG_NO_FREEZE_OCARINA;
} }
if ((player->stateFlags1 & PLAYER_STATE1_TEXT_ON_SCREEN) && ((player->actor.textId & 0xFF00) != 0x600)) { if ((player->stateFlags1 & PLAYER_STATE1_TALKING) && ((player->actor.textId & 0xFF00) != 0x600)) {
sp74 = player->targetActor; sp74 = player->talkActor;
} }
for (i = 0; i < ARRAY_COUNT(actorCtx->actorLists); i++, sp80++) { for (i = 0; i < ARRAY_COUNT(actorCtx->actorLists); i++, sp80++) {
@ -2613,13 +2613,13 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
actor->flags &= ~ACTOR_FLAG_PLAY_HIT_SFX; actor->flags &= ~ACTOR_FLAG_PLAY_HIT_SFX;
if ((DECR(actor->freezeTimer) == 0) && (actor->flags & (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_ACTIVE))) { if ((DECR(actor->freezeTimer) == 0) && (actor->flags & (ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_ACTIVE))) {
if (actor == player->unk_664) { if (actor == player->focusActor) {
actor->isTargeted = true; actor->isTargeted = true;
} else { } else {
actor->isTargeted = false; actor->isTargeted = false;
} }
if ((actor->targetPriority != 0) && (player->unk_664 == NULL)) { if ((actor->targetPriority != 0) && (player->focusActor == NULL)) {
actor->targetPriority = 0; actor->targetPriority = 0;
} }
@ -2643,14 +2643,14 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
} }
} }
actor = player->unk_664; actor = player->focusActor;
if ((actor != NULL) && (actor->update == NULL)) { if ((actor != NULL) && (actor->update == NULL)) {
actor = NULL; actor = NULL;
func_8008EDF0(player); Player_ReleaseLockOn(player);
} }
if ((actor == NULL) || (player->unk_66C < 5)) { if ((actor == NULL) || (player->zTargetActiveTimer < 5)) {
actor = NULL; actor = NULL;
if (actorCtx->targetCtx.unk_4B != 0) { if (actorCtx->targetCtx.unk_4B != 0) {
actorCtx->targetCtx.unk_4B = 0; actorCtx->targetCtx.unk_4B = 0;
@ -3429,8 +3429,8 @@ Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, PlayState* play) {
osSyncPrintf("アクタークラス削除 [%s]\n", dbEntry->name); // "Actor class deleted [%s]" osSyncPrintf("アクタークラス削除 [%s]\n", dbEntry->name); // "Actor class deleted [%s]"
} }
if ((player != NULL) && (actor == player->unk_664)) { if ((player != NULL) && (actor == player->focusActor)) {
func_8008EDF0(player); Player_ReleaseLockOn(player);
Camera_ChangeMode(Play_GetCamera(play, Play_GetActiveCamId(play)), 0); Camera_ChangeMode(Play_GetCamera(play, Play_GetActiveCamId(play)), 0);
} }
@ -3484,7 +3484,7 @@ void func_800328D4(PlayState* play, ActorContext* actorCtx, Player* player, u32
Vec3f sp70; Vec3f sp70;
actor = actorCtx->actorLists[actorCategory].head; actor = actorCtx->actorLists[actorCategory].head;
sp84 = player->unk_664; sp84 = player->focusActor;
while (actor != NULL) { while (actor != NULL) {
if ((actor->update != NULL) && ((Player*)actor != player) && CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_TARGETABLE)) { if ((actor->update != NULL) && ((Player*)actor != player) && CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_TARGETABLE)) {
@ -3985,7 +3985,7 @@ s16 Actor_TestFloorInDirection(Actor* actor, PlayState* play, f32 distance, s16
s32 Actor_IsTargeted(PlayState* play, Actor* actor) { s32 Actor_IsTargeted(PlayState* play, Actor* actor) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
if ((player->stateFlags1 & PLAYER_STATE1_ENEMY_TARGET) && actor->isTargeted) { if ((player->stateFlags1 & PLAYER_STATE1_HOSTILE_LOCK_ON) && actor->isTargeted) {
return true; return true;
} else { } else {
return false; return false;
@ -3998,7 +3998,7 @@ s32 Actor_IsTargeted(PlayState* play, Actor* actor) {
s32 Actor_OtherIsTargeted(PlayState* play, Actor* actor) { s32 Actor_OtherIsTargeted(PlayState* play, Actor* actor) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
if ((player->stateFlags1 & PLAYER_STATE1_ENEMY_TARGET) && !actor->isTargeted) { if ((player->stateFlags1 & PLAYER_STATE1_HOSTILE_LOCK_ON) && !actor->isTargeted) {
return true; return true;
} else { } else {
return false; return false;

View File

@ -6182,7 +6182,7 @@ s32 Camera_Demo5(Camera* camera) {
sp4A = playerhead.rot.y - playerTargetGeo.yaw; sp4A = playerhead.rot.y - playerTargetGeo.yaw;
if (camera->target->category == ACTORCAT_PLAYER) { if (camera->target->category == ACTORCAT_PLAYER) {
pad = camera->play->state.frames - sDemo5PrevAction12Frame; pad = camera->play->state.frames - sDemo5PrevAction12Frame;
if (player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) { if (player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
// holding object over head. // holding object over head.
Player_SetCsActionWithHaltedActors(camera->play, camera->target, 8); Player_SetCsActionWithHaltedActors(camera->play, camera->target, 8);
} else if (ABS(pad) > 3000) { } else if (ABS(pad) > 3000) {

View File

@ -4051,7 +4051,7 @@ void Interface_DrawEnemyHealthBar(TargetContext* targetCtx, PlayState* play) {
Interface_CreateQuadVertexGroup(&sEnemyHealthVtx[12], -floorf(halfBarWidth) + endTexWidth, (-texHeight / 2) + 3, Interface_CreateQuadVertexGroup(&sEnemyHealthVtx[12], -floorf(halfBarWidth) + endTexWidth, (-texHeight / 2) + 3,
healthBarFill, 7, 0); healthBarFill, 7, 0);
if (((!(player->stateFlags1 & PLAYER_STATE1_TEXT_ON_SCREEN)) || (actor != player->unk_664)) && targetCtx->unk_44 < 500.0f) { if (((!(player->stateFlags1 & PLAYER_STATE1_TALKING)) || (actor != player->focusActor)) && targetCtx->unk_44 < 500.0f) {
f32 slideInOffsetY = 0; f32 slideInOffsetY = 0;
// Slide in the health bar from edge of the screen (mimic the Z-Target triangles fly in) // Slide in the health bar from edge of the screen (mimic the Z-Target triangles fly in)

View File

@ -34,73 +34,73 @@ s16 sBootData[PLAYER_BOOTS_MAX][17] = {
// Used to map action params to model groups // Used to map action params to model groups
u8 sActionModelGroups[] = { u8 sActionModelGroups[] = {
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_NONE PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_NONE
PLAYER_MODELGROUP_15, // PLAYER_IA_LAST_USED PLAYER_MODELGROUP_SWORD, // PLAYER_IA_SWORD_CS
PLAYER_MODELGROUP_10, // PLAYER_IA_FISHING_POLE PLAYER_MODELGROUP_10, // PLAYER_IA_FISHING_POLE
PLAYER_MODELGROUP_SWORD, // PLAYER_IA_SWORD_MASTER PLAYER_MODELGROUP_SWORD_AND_SHIELD, // PLAYER_IA_SWORD_MASTER
PLAYER_MODELGROUP_SWORD, // PLAYER_IA_SWORD_KOKIRI PLAYER_MODELGROUP_SWORD_AND_SHIELD, // PLAYER_IA_SWORD_KOKIRI
PLAYER_MODELGROUP_BGS, // PLAYER_IA_SWORD_BIGGORON PLAYER_MODELGROUP_BGS, // PLAYER_IA_SWORD_BIGGORON
PLAYER_MODELGROUP_10, // PLAYER_IA_DEKU_STICK PLAYER_MODELGROUP_10, // PLAYER_IA_DEKU_STICK
PLAYER_MODELGROUP_HAMMER, // PLAYER_IA_HAMMER PLAYER_MODELGROUP_HAMMER, // PLAYER_IA_HAMMER
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_FIRE PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_FIRE
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_ICE PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_ICE
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_LIGHT PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_LIGHT
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_0C PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_0C
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_0D PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_0D
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_0E PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_0E
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_SLINGSHOT PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_SLINGSHOT
PLAYER_MODELGROUP_HOOKSHOT, // PLAYER_IA_HOOKSHOT PLAYER_MODELGROUP_HOOKSHOT, // PLAYER_IA_HOOKSHOT
PLAYER_MODELGROUP_HOOKSHOT, // PLAYER_IA_LONGSHOT PLAYER_MODELGROUP_HOOKSHOT, // PLAYER_IA_LONGSHOT
PLAYER_MODELGROUP_EXPLOSIVES, // PLAYER_IA_BOMB PLAYER_MODELGROUP_EXPLOSIVES, // PLAYER_IA_BOMB
PLAYER_MODELGROUP_EXPLOSIVES, // PLAYER_IA_BOMBCHU PLAYER_MODELGROUP_EXPLOSIVES, // PLAYER_IA_BOMBCHU
PLAYER_MODELGROUP_BOOMERANG, // PLAYER_IA_BOOMERANG PLAYER_MODELGROUP_BOOMERANG, // PLAYER_IA_BOOMERANG
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MAGIC_SPELL_15 PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MAGIC_SPELL_15
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MAGIC_SPELL_16 PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MAGIC_SPELL_16
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_MAGIC_SPELL_17 PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_MAGIC_SPELL_17
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_FARORES_WIND PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_FARORES_WIND
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_NAYRUS_LOVE PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_NAYRUS_LOVE
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_DINS_FIRE PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_DINS_FIRE
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_DEKU_NUT PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_DEKU_NUT
PLAYER_MODELGROUP_OCARINA, // PLAYER_IA_OCARINA_FAIRY PLAYER_MODELGROUP_OCARINA, // PLAYER_IA_OCARINA_FAIRY
PLAYER_MODELGROUP_OOT, // PLAYER_IA_OCARINA_OF_TIME PLAYER_MODELGROUP_OOT, // PLAYER_IA_OCARINA_OF_TIME
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_FISH PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_FISH
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_FIRE PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_FIRE
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_BUG PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_BUG
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POE PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POE
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_BIG_POE PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_BIG_POE
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_RUTOS_LETTER PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_RUTOS_LETTER
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POTION_RED PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POTION_RED
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POTION_BLUE PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POTION_BLUE
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POTION_GREEN PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POTION_GREEN
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_MILK_FULL PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_MILK_FULL
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_MILK_HALF PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_MILK_HALF
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_FAIRY PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_FAIRY
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_ZELDAS_LETTER PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_ZELDAS_LETTER
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_WEIRD_EGG PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_WEIRD_EGG
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_CHICKEN PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_CHICKEN
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MAGIC_BEAN PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MAGIC_BEAN
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_POCKET_EGG PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_POCKET_EGG
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_POCKET_CUCCO PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_POCKET_CUCCO
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_COJIRO PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_COJIRO
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_ODD_MUSHROOM PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_ODD_MUSHROOM
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_ODD_POTION PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_ODD_POTION
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_POACHERS_SAW PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_POACHERS_SAW
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_BROKEN_GORONS_SWORD PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_BROKEN_GORONS_SWORD
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_PRESCRIPTION PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_PRESCRIPTION
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_FROG PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_FROG
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_EYEDROPS PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_EYEDROPS
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_CLAIM_CHECK PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_CLAIM_CHECK
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_KEATON PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_KEATON
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_SKULL PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_SKULL
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_SPOOKY PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_SPOOKY
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_BUNNY_HOOD PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_BUNNY_HOOD
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_GORON PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_GORON
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_ZORA PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_ZORA
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_GERUDO PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_GERUDO
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_TRUTH PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_TRUTH
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_LENS_OF_TRUTH PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_LENS_OF_TRUTH
}; };
TextTriggerEntry sTextTriggers[] = { TextTriggerEntry sTextTriggers[] = {
@ -128,7 +128,7 @@ u8 gPlayerModelTypes[PLAYER_MODELGROUP_MAX][PLAYER_MODELGROUPENTRY_MAX] = {
PLAYER_MODELTYPE_SHEATH_19, PLAYER_MODELTYPE_SHEATH_19,
PLAYER_MODELTYPE_WAIST PLAYER_MODELTYPE_WAIST
}, },
/* PLAYER_MODELGROUP_SWORD */ /* PLAYER_MODELGROUP_SWORD_AND_SHIELD */
{ {
PLAYER_ANIMTYPE_1, PLAYER_ANIMTYPE_1,
PLAYER_MODELTYPE_LH_SWORD, PLAYER_MODELTYPE_LH_SWORD,
@ -232,7 +232,7 @@ u8 gPlayerModelTypes[PLAYER_MODELGROUP_MAX][PLAYER_MODELGROUPENTRY_MAX] = {
PLAYER_MODELTYPE_SHEATH_18, PLAYER_MODELTYPE_SHEATH_18,
PLAYER_MODELTYPE_WAIST PLAYER_MODELTYPE_WAIST
}, },
/* PLAYER_MODELGROUP_15 */ /* PLAYER_MODELGROUP_SWORD */
{ {
PLAYER_ANIMTYPE_0, PLAYER_ANIMTYPE_0,
PLAYER_MODELTYPE_LH_SWORD, PLAYER_MODELTYPE_LH_SWORD,
@ -565,7 +565,7 @@ uint8_t Player_IsCustomLinkModel() {
s32 Player_InBlockingCsMode(PlayState* play, Player* this) { s32 Player_InBlockingCsMode(PlayState* play, Player* this) {
return (this->stateFlags1 & (PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_CUTSCENE)) || (this->csAction != 0) || (play->transitionTrigger == TRANS_TRIGGER_START) || return (this->stateFlags1 & (PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_CUTSCENE)) || (this->csAction != 0) || (play->transitionTrigger == TRANS_TRIGGER_START) ||
(this->stateFlags1 & PLAYER_STATE1_LOADING) || (this->stateFlags3 & PLAYER_STATE3_HOOKSHOT_TRAVELLING) || (this->stateFlags1 & PLAYER_STATE1_LOADING) || (this->stateFlags3 & PLAYER_STATE3_FLYING_WITH_HOOKSHOT) ||
((gSaveContext.magicState != MAGIC_STATE_IDLE) && (Player_ActionToMagicSpell(this, this->itemAction) >= 0)); ((gSaveContext.magicState != MAGIC_STATE_IDLE) && (Player_ActionToMagicSpell(this, this->itemAction) >= 0));
} }
@ -575,8 +575,15 @@ s32 Player_InCsMode(PlayState* play) {
return Player_InBlockingCsMode(play, this) || (this->unk_6AD == 4); return Player_InBlockingCsMode(play, this) || (this->unk_6AD == 4);
} }
s32 func_8008E9C4(Player* this) { /**
return (this->stateFlags1 & PLAYER_STATE1_ENEMY_TARGET); * Checks if Player is currently locked onto a hostile actor.
* `PLAYER_STATE1_HOSTILE_LOCK_ON` controls Player's "battle" response to hostile actors.
*
* Note that within Player, `Player_UpdateHostileLockOn` exists, which updates the flag and also returns the check.
* Player can use this function instead if the flag should be checked, but not updated.
*/
s32 Player_CheckHostileLockOn(Player* this) {
return (this->stateFlags1 & PLAYER_STATE1_HOSTILE_LOCK_ON);
} }
s32 Player_IsChildWithHylianShield(Player* this) { s32 Player_IsChildWithHylianShield(Player* this) {
@ -586,7 +593,7 @@ s32 Player_IsChildWithHylianShield(Player* this) {
s32 Player_ActionToModelGroup(Player* this, s32 actionParam) { s32 Player_ActionToModelGroup(Player* this, s32 actionParam) {
s32 modelGroup = sActionModelGroups[actionParam]; s32 modelGroup = sActionModelGroups[actionParam];
if ((modelGroup == PLAYER_MODELGROUP_SWORD) && Player_IsChildWithHylianShield(this)) { if ((modelGroup == PLAYER_MODELGROUP_SWORD_AND_SHIELD) && Player_IsChildWithHylianShield(this)) {
// child, using kokiri sword with hylian shield equipped // child, using kokiri sword with hylian shield equipped
return PLAYER_MODELGROUP_CHILD_HYLIAN_SHIELD; return PLAYER_MODELGROUP_CHILD_HYLIAN_SHIELD;
} else { } else {
@ -735,29 +742,48 @@ void Player_UpdateBottleHeld(PlayState* play, Player* this, s32 item, s32 action
this->itemAction = actionParam; this->itemAction = actionParam;
} }
void func_8008EDF0(Player* this) { void Player_ReleaseLockOn(Player* this) {
this->unk_664 = NULL; this->focusActor = NULL;
this->stateFlags2 &= ~PLAYER_STATE2_SWITCH_TARGETING; this->stateFlags2 &= ~PLAYER_STATE2_LOCK_ON_WITH_SWITCH;
} }
void func_8008EE08(Player* this) { /**
* This function aims to clear Z-Target related state when it isn't in use.
* It also handles setting a specific free fall related state that is interntwined with Z-Targeting.
* TODO: Learn more about this and give a name to PLAYER_STATE1_19
*/
void Player_ClearZTargeting(Player* this) {
if ((this->actor.bgCheckFlags & 1) || (this->stateFlags1 & (PLAYER_STATE1_CLIMBING_LADDER | PLAYER_STATE1_ON_HORSE | PLAYER_STATE1_IN_WATER)) || if ((this->actor.bgCheckFlags & 1) || (this->stateFlags1 & (PLAYER_STATE1_CLIMBING_LADDER | PLAYER_STATE1_ON_HORSE | PLAYER_STATE1_IN_WATER)) ||
(!(this->stateFlags1 & (PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL)) && ((this->actor.world.pos.y - this->actor.floorHeight) < 100.0f))) { (!(this->stateFlags1 & (PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL)) && ((this->actor.world.pos.y - this->actor.floorHeight) < 100.0f))) {
this->stateFlags1 &= ~(PLAYER_STATE1_TARGETING | PLAYER_STATE1_TARGET_LOCKED | PLAYER_STATE1_TARGET_NOTHING | PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_30); this->stateFlags1 &= ~(PLAYER_STATE1_Z_TARGETING | PLAYER_STATE1_FRIENDLY_ACTOR_FOCUS | PLAYER_STATE1_PARALLEL | PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_LOCK_ON_FORCED_TO_RELEASE);
} else if (!(this->stateFlags1 & (PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_CLIMBING_LADDER))) { } else if (!(this->stateFlags1 & (PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL | PLAYER_STATE1_CLIMBING_LADDER))) {
this->stateFlags1 |= PLAYER_STATE1_FREEFALL; this->stateFlags1 |= PLAYER_STATE1_FREEFALL;
} }
func_8008EDF0(this); Player_ReleaseLockOn(this);
} }
void func_8008EEAC(PlayState* play, Actor* actor) { /**
* Sets the "auto lock-on actor" to lock onto an actor without Player's input.
* This function will first release any existing lock-on or (try to) release parallel.
*
* When using Switch Targeting, it is not possible to carry an auto lock-on actor into a normal
* lock-on when the auto lock-on is finished.
* This is because the `PLAYER_STATE2_LOCK_ON_WITH_SWITCH` flag is never set with an auto lock-on.
* With Hold Targeting it is possible to keep the auto lock-on going by keeping the Z button held down.
*
* The auto lock-on is considered "friendly" even if the actor is actually hostile. If the auto lock-on is hostile,
* Player's battle response will not occur (if he is actionable) and the camera behaves differently.
* When transitioning from auto lock-on to normal lock-on (with Hold Targeting) there will be a noticeable change
* when it switches from "friendly" mode to "hostile" mode.
*/
void Player_SetAutoLockOnActor(PlayState* play, Actor* actor) {
Player* this = GET_PLAYER(play); Player* this = GET_PLAYER(play);
func_8008EE08(this); Player_ClearZTargeting(this);
this->unk_664 = actor; this->focusActor = actor;
this->unk_684 = actor; this->autoLockOnActor = actor;
this->stateFlags1 |= PLAYER_STATE1_TARGET_LOCKED; this->stateFlags1 |= PLAYER_STATE1_FRIENDLY_ACTOR_FOCUS;
Camera_SetParam(Play_GetCamera(play, 0), 8, actor); Camera_SetParam(Play_GetCamera(play, 0), 8, actor);
Camera_ChangeMode(Play_GetCamera(play, 0), 2); Camera_ChangeMode(Play_GetCamera(play, 0), 2);
} }
@ -919,7 +945,7 @@ s32 Player_GetExplosiveHeld(Player* this) {
s32 func_8008F2BC(Player* this, s32 actionParam) { s32 func_8008F2BC(Player* this, s32 actionParam) {
s32 sword = 0; s32 sword = 0;
if (actionParam != PLAYER_IA_LAST_USED) { if (actionParam != PLAYER_IA_SWORD_CS) {
sword = actionParam - PLAYER_IA_SWORD_MASTER; sword = actionParam - PLAYER_IA_SWORD_MASTER;
if ((sword < 0) || (sword >= 3)) { if ((sword < 0) || (sword >= 3)) {
goto return_neg; goto return_neg;
@ -1319,9 +1345,9 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx**
Matrix_Translate((LINK_IS_ADULT ? 3600.0f : 2900.0f) * ABS(scale - 1.0f), 0.0f, 0.0f, MTXMODE_APPLY); Matrix_Translate((LINK_IS_ADULT ? 3600.0f : 2900.0f) * ABS(scale - 1.0f), 0.0f, 0.0f, MTXMODE_APPLY);
} }
} }
rot->x += this->unk_6BA; rot->x += this->headLimbRot.z;
rot->y -= this->unk_6B8; rot->y -= this->headLimbRot.y;
rot->z += this->unk_6B6; rot->z += this->headLimbRot.x;
} else if (limbIndex == PLAYER_LIMB_L_HAND) { } else if (limbIndex == PLAYER_LIMB_L_HAND) {
if (CVarGetInteger(CVAR_COSMETIC("Link.SwordScale.Changed"), 0)) { if (CVarGetInteger(CVAR_COSMETIC("Link.SwordScale.Changed"), 0)) {
f32 scale = CVarGetFloat(CVAR_COSMETIC("Link.SwordScale.Value"), 1.0f); f32 scale = CVarGetFloat(CVAR_COSMETIC("Link.SwordScale.Value"), 1.0f);
@ -1329,18 +1355,18 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx**
Matrix_Translate(-((LINK_IS_ADULT ? 320.0f : 200.0f) * scale), 0.0f, 0.0f, MTXMODE_APPLY); Matrix_Translate(-((LINK_IS_ADULT ? 320.0f : 200.0f) * scale), 0.0f, 0.0f, MTXMODE_APPLY);
} }
} else if (limbIndex == PLAYER_LIMB_UPPER) { } else if (limbIndex == PLAYER_LIMB_UPPER) {
if (this->unk_6B0 != 0) { if (this->upperLimbYawSecondary != 0) {
Matrix_RotateZ(0x44C * (M_PI / 0x8000), MTXMODE_APPLY); Matrix_RotateZ(0x44C * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_RotateY(this->unk_6B0 * (M_PI / 0x8000), MTXMODE_APPLY); Matrix_RotateY(this->upperLimbYawSecondary * (M_PI / 0x8000), MTXMODE_APPLY);
} }
if (this->unk_6BE != 0) { if (this->upperLimbRot.y != 0) {
Matrix_RotateY(this->unk_6BE * (M_PI / 0x8000), MTXMODE_APPLY); Matrix_RotateY(this->upperLimbRot.y * (M_PI / 0x8000), MTXMODE_APPLY);
} }
if (this->unk_6BC != 0) { if (this->upperLimbRot.x != 0) {
Matrix_RotateX(this->unk_6BC * (M_PI / 0x8000), MTXMODE_APPLY); Matrix_RotateX(this->upperLimbRot.x * (M_PI / 0x8000), MTXMODE_APPLY);
} }
if (this->unk_6C0 != 0) { if (this->upperLimbRot.z != 0) {
Matrix_RotateZ(this->unk_6C0 * (M_PI / 0x8000), MTXMODE_APPLY); Matrix_RotateZ(this->upperLimbRot.z * (M_PI / 0x8000), MTXMODE_APPLY);
} }
} else if (limbIndex == PLAYER_LIMB_L_THIGH) { } else if (limbIndex == PLAYER_LIMB_L_THIGH) {
func_8008F87C(play, this, &this->skelAnime, pos, rot, PLAYER_LIMB_L_THIGH, PLAYER_LIMB_L_SHIN, func_8008F87C(play, this, &this->skelAnime, pos, rot, PLAYER_LIMB_L_THIGH, PLAYER_LIMB_L_SHIN,
@ -1367,7 +1393,7 @@ s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx**
if ((sLeftHandType == PLAYER_MODELTYPE_LH_BGS) && (gSaveContext.swordHealth <= 0.0f)) { if ((sLeftHandType == PLAYER_MODELTYPE_LH_BGS) && (gSaveContext.swordHealth <= 0.0f)) {
dLists += 4; dLists += 4;
} else if ((sLeftHandType == PLAYER_MODELTYPE_LH_BOOMERANG) && (this->stateFlags1 & PLAYER_STATE1_THREW_BOOMERANG)) { } else if ((sLeftHandType == PLAYER_MODELTYPE_LH_BOOMERANG) && (this->stateFlags1 & PLAYER_STATE1_BOOMERANG_THROWN)) {
dLists = &gPlayerLeftHandOpenDLs[gSaveContext.linkAge]; dLists = &gPlayerLeftHandOpenDLs[gSaveContext.linkAge];
sLeftHandType = PLAYER_MODELTYPE_LH_OPEN; sLeftHandType = PLAYER_MODELTYPE_LH_OPEN;
} else if ((this->leftHandType == PLAYER_MODELTYPE_LH_OPEN) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & PLAYER_STATE1_IN_WATER)) { } else if ((this->leftHandType == PLAYER_MODELTYPE_LH_OPEN) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & PLAYER_STATE1_IN_WATER)) {
@ -1828,7 +1854,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
Matrix_Get(&sp14C); Matrix_Get(&sp14C);
Matrix_MtxFToYXZRotS(&sp14C, &hookedActor->world.rot, 0); Matrix_MtxFToYXZRotS(&sp14C, &hookedActor->world.rot, 0);
hookedActor->shape.rot = hookedActor->world.rot; hookedActor->shape.rot = hookedActor->world.rot;
} else if (this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) { } else if (this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
Vec3s spB8; Vec3s spB8;
Matrix_Get(&sp14C); Matrix_Get(&sp14C);
@ -2000,9 +2026,9 @@ u32 func_80091738(PlayState* play, u8* segment, SkelAnime* skelAnime) {
} }
u8 sPauseModelGroupBySword[] = { u8 sPauseModelGroupBySword[] = {
PLAYER_MODELGROUP_SWORD, // PLAYER_SWORD_KOKIRI PLAYER_MODELGROUP_SWORD_AND_SHIELD, // PLAYER_SWORD_KOKIRI
PLAYER_MODELGROUP_SWORD, // PLAYER_SWORD_MASTER PLAYER_MODELGROUP_SWORD_AND_SHIELD, // PLAYER_SWORD_MASTER
PLAYER_MODELGROUP_BGS, // PLAYER_SWORD_BIGGORON PLAYER_MODELGROUP_BGS, // PLAYER_SWORD_BIGGORON
}; };
s32 Player_OverrideLimbDrawPause(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* arg) { s32 Player_OverrideLimbDrawPause(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* arg) {
@ -2015,7 +2041,7 @@ s32 Player_OverrideLimbDrawPause(PlayState* play, s32 limbIndex, Gfx** dList, Ve
Gfx** dLists; Gfx** dLists;
size_t ptrSize = sizeof(uint32_t); size_t ptrSize = sizeof(uint32_t);
if ((modelGroup == PLAYER_MODELGROUP_SWORD) && !LINK_IS_ADULT && (playerSwordAndShield[1] == PLAYER_SHIELD_HYLIAN)) { if ((modelGroup == PLAYER_MODELGROUP_SWORD_AND_SHIELD) && !LINK_IS_ADULT && (playerSwordAndShield[1] == PLAYER_SHIELD_HYLIAN)) {
modelGroup = PLAYER_MODELGROUP_CHILD_HYLIAN_SHIELD; modelGroup = PLAYER_MODELGROUP_CHILD_HYLIAN_SHIELD;
} }

View File

@ -61,7 +61,7 @@ void func_8087B758(BgHaka* this, Player* player) {
func_8002DBD0(&this->dyna.actor, &sp1C, &player->actor.world.pos); func_8002DBD0(&this->dyna.actor, &sp1C, &player->actor.world.pos);
if (fabsf(sp1C.x) < 34.6f && sp1C.z > -112.8f && sp1C.z < -36.0f) { if (fabsf(sp1C.x) < 34.6f && sp1C.z > -112.8f && sp1C.z < -36.0f) {
player->stateFlags2 |= PLAYER_STATE2_SPAWN_DUST; player->stateFlags2 |= PLAYER_STATE2_FORCE_SAND_FLOOR_SOUND;
} }
} }

View File

@ -290,7 +290,7 @@ void BgHakaSgami_Update(Actor* thisx, PlayState* play) {
BgHakaSgami* this = (BgHakaSgami*)thisx; BgHakaSgami* this = (BgHakaSgami*)thisx;
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 & (PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE)) || (this->actionFunc == BgHakaSgami_SetupSpin)) { if (!(player->stateFlags1 & (PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE)) || (this->actionFunc == BgHakaSgami_SetupSpin)) {
this->actionFunc(this, play); this->actionFunc(this, play);
} }
} }

View File

@ -201,7 +201,7 @@ void BgJyaGoroiwa_Update(Actor* thisx, PlayState* play) {
s32 bgId; s32 bgId;
Vec3f pos; Vec3f pos;
if (!(player->stateFlags1 & (PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE))) { if (!(player->stateFlags1 & (PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE))) {
this->actionFunc(this, play); this->actionFunc(this, play);
BgJyaGoroiwa_UpdateRotation(this); BgJyaGoroiwa_UpdateRotation(this);
pos.x = this->actor.world.pos.x; pos.x = this->actor.world.pos.x;

View File

@ -152,9 +152,9 @@ s32 BgSpot01Idohashira_NotInCsMode(PlayState* play) {
return false; return false;
} }
CsCmdActorAction* BgSpot01Idohashira_GetNpcAction(PlayState* play, s32 actionIdx) { CsCmdActorCue* BgSpot01Idohashira_GetNpcAction(PlayState* play, s32 actionIdx) {
s32 pad[2]; s32 pad[2];
CsCmdActorAction* npcAction = NULL; CsCmdActorCue* npcAction = NULL;
if (!BgSpot01Idohashira_NotInCsMode(play)) { if (!BgSpot01Idohashira_NotInCsMode(play)) {
npcAction = play->csCtx.npcActions[actionIdx]; npcAction = play->csCtx.npcActions[actionIdx];
@ -186,7 +186,7 @@ f32 func_808AB1DC(f32 arg0, f32 arg1, u16 arg2, u16 arg3, u16 arg4) {
} }
s32 func_808AB29C(BgSpot01Idohashira* this, PlayState* play) { s32 func_808AB29C(BgSpot01Idohashira* this, PlayState* play) {
CsCmdActorAction* npcAction; CsCmdActorCue* npcAction;
Vec3f* thisPos; Vec3f* thisPos;
f32 endX; f32 endX;
f32 temp_f0; f32 temp_f0;
@ -237,7 +237,7 @@ void func_808AB414(BgSpot01Idohashira* this, PlayState* play) {
} }
void func_808AB444(BgSpot01Idohashira* this, PlayState* play) { void func_808AB444(BgSpot01Idohashira* this, PlayState* play) {
CsCmdActorAction* npcAction = BgSpot01Idohashira_GetNpcAction(play, 2); CsCmdActorCue* npcAction = BgSpot01Idohashira_GetNpcAction(play, 2);
u32 action; u32 action;
u32 currentNpcAction; u32 currentNpcAction;

View File

@ -413,7 +413,7 @@ void func_808B57E0(BgSpot16Bombstone* this, PlayState* play) {
OnePointCutscene_Init(play, 4180, sTimer, NULL, MAIN_CAM); OnePointCutscene_Init(play, 4180, sTimer, NULL, MAIN_CAM);
} }
} }
} else if (player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) { } else if (player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
playerHeldActor = player->heldActor; playerHeldActor = player->heldActor;
if (playerHeldActor != NULL && playerHeldActor->category == ACTORCAT_EXPLOSIVE && if (playerHeldActor != NULL && playerHeldActor->category == ACTORCAT_EXPLOSIVE &&
playerHeldActor->id == ACTOR_EN_BOMBF) { playerHeldActor->id == ACTOR_EN_BOMBF) {

View File

@ -92,7 +92,7 @@ void BgTreemouth_Destroy(Actor* thisx, PlayState* play) {
} }
void func_808BC65C(BgTreemouth* this, PlayState* play) { void func_808BC65C(BgTreemouth* this, PlayState* play) {
CsCmdActorAction* npcAction; CsCmdActorCue* npcAction;
if ((play->csCtx.state != CS_STATE_IDLE)) { if ((play->csCtx.state != CS_STATE_IDLE)) {
npcAction = play->csCtx.npcActions[0]; npcAction = play->csCtx.npcActions[0];
@ -198,7 +198,7 @@ void func_808BC9EC(BgTreemouth* this, PlayState* play) {
} }
void func_808BCAF0(BgTreemouth* this, PlayState* play) { void func_808BCAF0(BgTreemouth* this, PlayState* play) {
CsCmdActorAction* npcAction; CsCmdActorCue* npcAction;
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
npcAction = play->csCtx.npcActions[0]; npcAction = play->csCtx.npcActions[0];

View File

@ -389,7 +389,7 @@ void BossSst_HeadSetupIntro(BossSst* this, PlayState* play) {
player->actor.world.pos.z = sRoomCenter.z; player->actor.world.pos.z = sRoomCenter.z;
player->linearVelocity = player->actor.velocity.y = 0.0f; player->linearVelocity = player->actor.velocity.y = 0.0f;
player->actor.shape.rot.y = -0x8000; player->actor.shape.rot.y = -0x8000;
player->zTargetYaw = -0x8000; player->parallelYaw = -0x8000;
player->yaw = -0x8000; player->yaw = -0x8000;
player->fallStartHeight = 0; player->fallStartHeight = 0;
player->stateFlags1 |= PLAYER_STATE1_INPUT_DISABLED; player->stateFlags1 |= PLAYER_STATE1_INPUT_DISABLED;
@ -448,7 +448,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) {
player->actor.world.pos.z = sRoomCenter.z; player->actor.world.pos.z = sRoomCenter.z;
player->linearVelocity = 0; player->linearVelocity = 0;
player->actor.shape.rot.y = -0x8000; player->actor.shape.rot.y = -0x8000;
player->zTargetYaw = -0x8000; player->parallelYaw = -0x8000;
player->yaw = -0x8000; player->yaw = -0x8000;
} }

View File

@ -807,7 +807,7 @@ void func_809691BC(Demo6K* this, PlayState* play, s32 params) {
Vec3f startPos; Vec3f startPos;
Vec3f endPos; Vec3f endPos;
f32 temp; f32 temp;
CsCmdActorAction* csAction = play->csCtx.npcActions[params]; CsCmdActorCue* csAction = play->csCtx.npcActions[params];
startPos.x = csAction->startPos.x; startPos.x = csAction->startPos.x;
startPos.y = csAction->startPos.y; startPos.y = csAction->startPos.y;

View File

@ -103,7 +103,7 @@ void DemoDu_UpdateBgCheckInfo(DemoDu* this, PlayState* play) {
Actor_UpdateBgCheckInfo(play, &this->actor, 75.0f, 30.0f, 30.0f, 5); Actor_UpdateBgCheckInfo(play, &this->actor, 75.0f, 30.0f, 30.0f, 5);
} }
CsCmdActorAction* DemoDu_GetNpcAction(PlayState* play, s32 idx) { CsCmdActorCue* DemoDu_GetNpcAction(PlayState* play, s32 idx) {
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
return play->csCtx.npcActions[idx]; return play->csCtx.npcActions[idx];
} }
@ -111,7 +111,7 @@ CsCmdActorAction* DemoDu_GetNpcAction(PlayState* play, s32 idx) {
} }
s32 DemoDu_IsNpcDoingThisAction(DemoDu* this, PlayState* play, u16 action, s32 idx) { s32 DemoDu_IsNpcDoingThisAction(DemoDu* this, PlayState* play, u16 action, s32 idx) {
CsCmdActorAction* npcAction = DemoDu_GetNpcAction(play, idx); CsCmdActorCue* npcAction = DemoDu_GetNpcAction(play, idx);
if ((npcAction != NULL) && (npcAction->action == action)) { if ((npcAction != NULL) && (npcAction->action == action)) {
return true; return true;
@ -120,7 +120,7 @@ s32 DemoDu_IsNpcDoingThisAction(DemoDu* this, PlayState* play, u16 action, s32 i
} }
s32 DemoDu_IsNpcNotDoingThisAction(DemoDu* this, PlayState* play, u16 action, s32 idx) { s32 DemoDu_IsNpcNotDoingThisAction(DemoDu* this, PlayState* play, u16 action, s32 idx) {
CsCmdActorAction* npcAction = DemoDu_GetNpcAction(play, idx); CsCmdActorCue* npcAction = DemoDu_GetNpcAction(play, idx);
if ((npcAction != NULL) && (npcAction->action != action)) { if ((npcAction != NULL) && (npcAction->action != action)) {
return true; return true;
@ -129,7 +129,7 @@ s32 DemoDu_IsNpcNotDoingThisAction(DemoDu* this, PlayState* play, u16 action, s3
} }
void DemoDu_MoveToNpcPos(DemoDu* this, PlayState* play, s32 idx) { void DemoDu_MoveToNpcPos(DemoDu* this, PlayState* play, s32 idx) {
CsCmdActorAction* npcAction = DemoDu_GetNpcAction(play, idx); CsCmdActorCue* npcAction = DemoDu_GetNpcAction(play, idx);
s32 pad; s32 pad;
if (npcAction != NULL) { if (npcAction != NULL) {
@ -214,7 +214,7 @@ void DemoDu_CsFireMedallion_AdvanceTo01(DemoDu* this, PlayState* play) {
void DemoDu_CsFireMedallion_AdvanceTo02(DemoDu* this, PlayState* play) { void DemoDu_CsFireMedallion_AdvanceTo02(DemoDu* this, PlayState* play) {
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = play->csCtx.npcActions[2]; CsCmdActorCue* npcAction = play->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 1)) { if ((npcAction != NULL) && (npcAction->action != 1)) {
this->updateIndex = CS_FIREMEDALLION_SUBSCENE(2); this->updateIndex = CS_FIREMEDALLION_SUBSCENE(2);
@ -233,7 +233,7 @@ void DemoDu_CsFireMedallion_AdvanceTo03(DemoDu* this) {
void DemoDu_CsFireMedallion_AdvanceTo04(DemoDu* this, PlayState* play) { void DemoDu_CsFireMedallion_AdvanceTo04(DemoDu* this, PlayState* play) {
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = play->csCtx.npcActions[2]; CsCmdActorCue* npcAction = play->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 2)) { if ((npcAction != NULL) && (npcAction->action != 2)) {
Animation_Change(&this->skelAnime, &gDaruniaItemGiveAnim, 1.0f, 0.0f, Animation_Change(&this->skelAnime, &gDaruniaItemGiveAnim, 1.0f, 0.0f,
@ -253,7 +253,7 @@ void DemoDu_CsFireMedallion_AdvanceTo05(DemoDu* this, s32 animFinished) {
void DemoDu_CsFireMedallion_AdvanceTo06(DemoDu* this, PlayState* play) { void DemoDu_CsFireMedallion_AdvanceTo06(DemoDu* this, PlayState* play) {
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = play->csCtx.npcActions[6]; CsCmdActorCue* npcAction = play->csCtx.npcActions[6];
if ((npcAction != NULL) && (npcAction->action == 2)) { if ((npcAction != NULL) && (npcAction->action == 2)) {
this->updateIndex = CS_FIREMEDALLION_SUBSCENE(6); this->updateIndex = CS_FIREMEDALLION_SUBSCENE(6);
@ -444,7 +444,7 @@ void DemoDu_CsGoronsRuby_DaruniaFalling(DemoDu* this, PlayState* play) {
CutsceneContext* csCtx = &play->csCtx; CutsceneContext* csCtx = &play->csCtx;
if (csCtx->state != CS_STATE_IDLE) { if (csCtx->state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = csCtx->npcActions[2]; CsCmdActorCue* npcAction = csCtx->npcActions[2];
Vec3f startPos; Vec3f startPos;
Vec3f endPos; Vec3f endPos;
Vec3f* pos = &this->actor.world.pos; Vec3f* pos = &this->actor.world.pos;
@ -473,7 +473,7 @@ void DemoDu_CsGoronsRuby_AdvanceTo01(DemoDu* this, PlayState* play) {
void DemoDu_CsGoronsRuby_AdvanceTo02(DemoDu* this, PlayState* play) { void DemoDu_CsGoronsRuby_AdvanceTo02(DemoDu* this, PlayState* play) {
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = play->csCtx.npcActions[2]; CsCmdActorCue* npcAction = play->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 1)) { if ((npcAction != NULL) && (npcAction->action != 1)) {
Animation_Change(&this->skelAnime, &gDaruniaStandUpAfterFallingAnim, 1.0f, 0.0f, Animation_Change(&this->skelAnime, &gDaruniaStandUpAfterFallingAnim, 1.0f, 0.0f,
@ -489,7 +489,7 @@ void DemoDu_CsGoronsRuby_AdvanceTo03(DemoDu* this, PlayState* play) {
CutsceneContext* csCtx = &play->csCtx; CutsceneContext* csCtx = &play->csCtx;
if (csCtx->state != CS_STATE_IDLE) { if (csCtx->state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = csCtx->npcActions[2]; CsCmdActorCue* npcAction = csCtx->npcActions[2];
if ((npcAction != NULL) && (csCtx->frames >= npcAction->endFrame)) { if ((npcAction != NULL) && (csCtx->frames >= npcAction->endFrame)) {
this->updateIndex = CS_GORONSRUBY_SUBSCENE(3); this->updateIndex = CS_GORONSRUBY_SUBSCENE(3);
@ -500,7 +500,7 @@ void DemoDu_CsGoronsRuby_AdvanceTo03(DemoDu* this, PlayState* play) {
void DemoDu_CsGoronsRuby_AdvanceTo04(DemoDu* this, PlayState* play) { void DemoDu_CsGoronsRuby_AdvanceTo04(DemoDu* this, PlayState* play) {
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = play->csCtx.npcActions[2]; CsCmdActorCue* npcAction = play->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 2)) { if ((npcAction != NULL) && (npcAction->action != 2)) {
this->updateIndex = CS_GORONSRUBY_SUBSCENE(4); this->updateIndex = CS_GORONSRUBY_SUBSCENE(4);
@ -518,7 +518,7 @@ void DemoDu_CsGoronsRuby_AdvanceTo05(DemoDu* this, s32 animFinished) {
void DemoDu_CsGoronsRuby_AdvanceTo06(DemoDu* this, PlayState* play) { void DemoDu_CsGoronsRuby_AdvanceTo06(DemoDu* this, PlayState* play) {
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = play->csCtx.npcActions[2]; CsCmdActorCue* npcAction = play->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 3)) { if ((npcAction != NULL) && (npcAction->action != 3)) {
Animation_Change(&this->skelAnime, &gDaruniaHitBreastAnim, 1.0f, 0.0f, Animation_Change(&this->skelAnime, &gDaruniaHitBreastAnim, 1.0f, 0.0f,
@ -538,7 +538,7 @@ void DemoDu_CsGoronsRuby_AdvanceTo07(DemoDu* this, s32 animFinished) {
void DemoDu_CsGoronsRuby_AdvanceTo08(DemoDu* this, PlayState* play) { void DemoDu_CsGoronsRuby_AdvanceTo08(DemoDu* this, PlayState* play) {
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = play->csCtx.npcActions[2]; CsCmdActorCue* npcAction = play->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 4)) { if ((npcAction != NULL) && (npcAction->action != 4)) {
Animation_Change(&this->skelAnime, &gDaruniaHitLinkAnim, 1.0f, 0.0f, Animation_Change(&this->skelAnime, &gDaruniaHitLinkAnim, 1.0f, 0.0f,
@ -566,7 +566,7 @@ void DemoDu_CsGoronsRuby_AdvanceTo10(DemoDu* this, s32 animFinished) {
void DemoDu_CsGoronsRuby_AdvanceTo11(DemoDu* this, PlayState* play) { void DemoDu_CsGoronsRuby_AdvanceTo11(DemoDu* this, PlayState* play) {
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = play->csCtx.npcActions[2]; CsCmdActorCue* npcAction = play->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 5)) { if ((npcAction != NULL) && (npcAction->action != 5)) {
Animation_Change(&this->skelAnime, &gDaruniaItemGiveAnim, 1.0f, 0.0f, Animation_Change(&this->skelAnime, &gDaruniaItemGiveAnim, 1.0f, 0.0f,
@ -586,7 +586,7 @@ void DemoDu_CsGoronsRuby_AdvanceTo12(DemoDu* this, s32 animFinished) {
void DemoDu_CsGoronsRuby_AdvanceTo13(DemoDu* this, PlayState* play) { void DemoDu_CsGoronsRuby_AdvanceTo13(DemoDu* this, PlayState* play) {
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = play->csCtx.npcActions[2]; CsCmdActorCue* npcAction = play->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 6)) { if ((npcAction != NULL) && (npcAction->action != 6)) {
Animation_Change(&this->skelAnime, &gDaruniaIdleAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gDaruniaIdleAnim), Animation_Change(&this->skelAnime, &gDaruniaIdleAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gDaruniaIdleAnim),
@ -886,7 +886,7 @@ void DemoDu_CsCredits_BackTo02(DemoDu* this, s32 animFinished) {
} }
void DemoDu_CsCredits_HandleSubscenesByNpcAction(DemoDu* this, PlayState* play) { void DemoDu_CsCredits_HandleSubscenesByNpcAction(DemoDu* this, PlayState* play) {
CsCmdActorAction* npcAction = DemoDu_GetNpcAction(play, 2); CsCmdActorCue* npcAction = DemoDu_GetNpcAction(play, 2);
if (npcAction != NULL) { if (npcAction != NULL) {
s32 action = npcAction->action; s32 action = npcAction->action;

View File

@ -331,7 +331,7 @@ void DemoEc_UseAnimationObject(DemoEc* this, PlayState* play) {
gSegments[6] = PHYSICAL_TO_VIRTUAL(play->objectCtx.status[animObjBankIndex].segment); gSegments[6] = PHYSICAL_TO_VIRTUAL(play->objectCtx.status[animObjBankIndex].segment);
} }
CsCmdActorAction* DemoEc_GetNpcAction(PlayState* play, s32 actionIndex) { CsCmdActorCue* DemoEc_GetNpcAction(PlayState* play, s32 actionIndex) {
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
return play->csCtx.npcActions[actionIndex]; return play->csCtx.npcActions[actionIndex];
} else { } else {
@ -340,7 +340,7 @@ CsCmdActorAction* DemoEc_GetNpcAction(PlayState* play, s32 actionIndex) {
} }
void DemoEc_SetNpcActionPosRot(DemoEc* this, PlayState* play, s32 actionIndex) { void DemoEc_SetNpcActionPosRot(DemoEc* this, PlayState* play, s32 actionIndex) {
CsCmdActorAction* npcAction = DemoEc_GetNpcAction(play, actionIndex); CsCmdActorCue* npcAction = DemoEc_GetNpcAction(play, actionIndex);
if (npcAction != NULL) { if (npcAction != NULL) {
this->actor.world.pos.x = npcAction->startPos.x; this->actor.world.pos.x = npcAction->startPos.x;
@ -821,7 +821,7 @@ void func_8096F26C(DemoEc* this, s32 arg1) {
} }
void func_8096F2B0(DemoEc* this, PlayState* play, s32 arg2) { void func_8096F2B0(DemoEc* this, PlayState* play, s32 arg2) {
CsCmdActorAction* npcAction; CsCmdActorCue* npcAction;
s32 sp18; s32 sp18;
npcAction = DemoEc_GetNpcAction(play, arg2); npcAction = DemoEc_GetNpcAction(play, arg2);
@ -895,7 +895,7 @@ void func_8096F544(DemoEc* this, s32 changeAnim) {
} }
void func_8096F578(DemoEc* this, PlayState* play, s32 arg2) { void func_8096F578(DemoEc* this, PlayState* play, s32 arg2) {
CsCmdActorAction* npcAction; CsCmdActorCue* npcAction;
s32 sp18; s32 sp18;
npcAction = DemoEc_GetNpcAction(play, arg2); npcAction = DemoEc_GetNpcAction(play, arg2);

View File

@ -50,7 +50,7 @@ void DemoExt_PlayVortexSFX(DemoExt* this) {
} }
} }
CsCmdActorAction* DemoExt_GetNpcAction(PlayState* play, s32 npcActionIndex) { CsCmdActorCue* DemoExt_GetNpcAction(PlayState* play, s32 npcActionIndex) {
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
return play->csCtx.npcActions[npcActionIndex]; return play->csCtx.npcActions[npcActionIndex];
} }
@ -63,7 +63,7 @@ void DemoExt_SetupWait(DemoExt* this) {
} }
void DemoExt_SetupMaintainVortex(DemoExt* this, PlayState* play) { void DemoExt_SetupMaintainVortex(DemoExt* this, PlayState* play) {
CsCmdActorAction* npcAction = DemoExt_GetNpcAction(play, 5); CsCmdActorCue* npcAction = DemoExt_GetNpcAction(play, 5);
if (npcAction != NULL) { if (npcAction != NULL) {
this->actor.world.pos.x = npcAction->startPos.x; this->actor.world.pos.x = npcAction->startPos.x;
@ -88,7 +88,7 @@ void DemoExt_FinishClosing(DemoExt* this) {
} }
void DemoExt_CheckCsMode(DemoExt* this, PlayState* play) { void DemoExt_CheckCsMode(DemoExt* this, PlayState* play) {
CsCmdActorAction* csCmdNPCAction = DemoExt_GetNpcAction(play, 5); CsCmdActorCue* csCmdNPCAction = DemoExt_GetNpcAction(play, 5);
s32 csAction; s32 csAction;
s32 previousCsAction; s32 previousCsAction;

View File

@ -127,7 +127,7 @@ void func_8097CB0C(DemoGo* this, PlayState* play) {
Actor* thisx = &this->actor; Actor* thisx = &this->actor;
PosRot* world = &thisx->world; PosRot* world = &thisx->world;
CutsceneContext* csCtx = &play->csCtx; CutsceneContext* csCtx = &play->csCtx;
CsCmdActorAction* npcAction; CsCmdActorCue* npcAction;
f32 temp_ret; f32 temp_ret;
s32 pad; s32 pad;
Vec3f startPos; Vec3f startPos;
@ -167,7 +167,7 @@ void func_8097CCC0(DemoGo* this) {
} }
void func_8097CCE0(DemoGo* this, PlayState* play) { void func_8097CCE0(DemoGo* this, PlayState* play) {
CsCmdActorAction* npcAction; CsCmdActorCue* npcAction;
Actor* thisx = &this->actor; Actor* thisx = &this->actor;
s32 rotYDelta; s32 rotYDelta;
s32 newRotY; s32 newRotY;
@ -221,7 +221,7 @@ void func_8097CE20(DemoGo* this, PlayState* play) {
void func_8097CE78(DemoGo* this, PlayState* play) { void func_8097CE78(DemoGo* this, PlayState* play) {
CutsceneContext* csCtx = &play->csCtx; CutsceneContext* csCtx = &play->csCtx;
CsCmdActorAction* npcAction; CsCmdActorCue* npcAction;
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
npcAction = csCtx->npcActions[func_8097C870(this)]; npcAction = csCtx->npcActions[func_8097C870(this)];

View File

@ -297,9 +297,9 @@ u8 func_8097E69C(PlayState* play) {
} }
} }
CsCmdActorAction* DemoGt_GetNpcAction(PlayState* play, u32 actionIdx) { CsCmdActorCue* DemoGt_GetNpcAction(PlayState* play, u32 actionIdx) {
s32 pad[2]; s32 pad[2];
CsCmdActorAction* ret = NULL; CsCmdActorCue* ret = NULL;
if (!func_8097E69C(play)) { if (!func_8097E69C(play)) {
ret = play->csCtx.npcActions[actionIdx]; ret = play->csCtx.npcActions[actionIdx];
@ -309,7 +309,7 @@ CsCmdActorAction* DemoGt_GetNpcAction(PlayState* play, u32 actionIdx) {
} }
u8 func_8097E704(PlayState* play, u16 arg1, s32 arg2) { u8 func_8097E704(PlayState* play, u16 arg1, s32 arg2) {
CsCmdActorAction* action = DemoGt_GetNpcAction(play, arg2); CsCmdActorCue* action = DemoGt_GetNpcAction(play, arg2);
if ((action != NULL) && (action->action == arg1)) { if ((action != NULL) && (action->action == arg1)) {
return true; return true;
@ -319,7 +319,7 @@ u8 func_8097E704(PlayState* play, u16 arg1, s32 arg2) {
} }
void func_8097E744(DemoGt* this, PlayState* play, u32 actionIdx) { void func_8097E744(DemoGt* this, PlayState* play, u32 actionIdx) {
CsCmdActorAction* npcAction = DemoGt_GetNpcAction(play, actionIdx); CsCmdActorCue* npcAction = DemoGt_GetNpcAction(play, actionIdx);
Vec3f* pos = &this->dyna.actor.world.pos; Vec3f* pos = &this->dyna.actor.world.pos;
f32 startX; f32 startX;
f32 startY; f32 startY;

View File

@ -37,7 +37,7 @@ s32 DemoIk_UpdateSkelAnime(DemoIk* this) {
return SkelAnime_Update(&this->skelAnime); return SkelAnime_Update(&this->skelAnime);
} }
CsCmdActorAction* DemoIk_GetCue(PlayState* play, s32 index) { CsCmdActorCue* DemoIk_GetCue(PlayState* play, s32 index) {
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
return play->csCtx.npcActions[index]; return play->csCtx.npcActions[index];
} }
@ -45,7 +45,7 @@ CsCmdActorAction* DemoIk_GetCue(PlayState* play, s32 index) {
} }
s32 DemoIk_CheckCue(PlayState* play, u16 action, s32 index) { s32 DemoIk_CheckCue(PlayState* play, u16 action, s32 index) {
CsCmdActorAction* cue = DemoIk_GetCue(play, index); CsCmdActorCue* cue = DemoIk_GetCue(play, index);
if ((cue != NULL) && (cue->action == action)) { if ((cue != NULL) && (cue->action == action)) {
return 1; return 1;
@ -147,7 +147,7 @@ void DemoIk_SpawnDeadDb(DemoIk* this, PlayState* play) {
} }
void DemoIk_MoveToStartPos(DemoIk* this, PlayState* play, s32 index) { void DemoIk_MoveToStartPos(DemoIk* this, PlayState* play, s32 index) {
CsCmdActorAction* cue = DemoIk_GetCue(play, index); CsCmdActorCue* cue = DemoIk_GetCue(play, index);
if (cue != NULL) { if (cue != NULL) {
this->actor.world.pos.x = cue->startPos.x; this->actor.world.pos.x = cue->startPos.x;
@ -208,7 +208,7 @@ void func_809839AC(DemoIk* this) {
} }
void func_809839D0(DemoIk* this, PlayState* play) { void func_809839D0(DemoIk* this, PlayState* play) {
CsCmdActorAction* cue = DemoIk_GetCue(play, DemoIk_GetIndexFromParams(this->actor.params)); CsCmdActorCue* cue = DemoIk_GetCue(play, DemoIk_GetIndexFromParams(this->actor.params));
if (cue != NULL) { if (cue != NULL) {
s32 nextCsAction = cue->action; s32 nextCsAction = cue->action;
@ -362,7 +362,7 @@ void func_8098402C(DemoIk* this) {
} }
void func_80984048(DemoIk* this, PlayState* play) { void func_80984048(DemoIk* this, PlayState* play) {
CsCmdActorAction* cue = DemoIk_GetCue(play, 4); CsCmdActorCue* cue = DemoIk_GetCue(play, 4);
if (cue != NULL) { if (cue != NULL) {
s32 nextCsAction = cue->action; s32 nextCsAction = cue->action;

View File

@ -223,9 +223,9 @@ s32 DemoIm_IsCsStateIdle(PlayState* play) {
} }
} }
CsCmdActorAction* DemoIm_GetNpcAction(PlayState* play, s32 actionIdx) { CsCmdActorCue* DemoIm_GetNpcAction(PlayState* play, s32 actionIdx) {
s32 pad[2]; s32 pad[2];
CsCmdActorAction* ret = NULL; CsCmdActorCue* ret = NULL;
if (!DemoIm_IsCsStateIdle(play)) { if (!DemoIm_IsCsStateIdle(play)) {
ret = play->csCtx.npcActions[actionIdx]; ret = play->csCtx.npcActions[actionIdx];
@ -234,7 +234,7 @@ CsCmdActorAction* DemoIm_GetNpcAction(PlayState* play, s32 actionIdx) {
} }
s32 func_809850E8(DemoIm* this, PlayState* play, u16 action, s32 actionIdx) { s32 func_809850E8(DemoIm* this, PlayState* play, u16 action, s32 actionIdx) {
CsCmdActorAction* npcAction = DemoIm_GetNpcAction(play, actionIdx); CsCmdActorCue* npcAction = DemoIm_GetNpcAction(play, actionIdx);
if (npcAction != NULL) { if (npcAction != NULL) {
if (npcAction->action == action) { if (npcAction->action == action) {
@ -245,7 +245,7 @@ s32 func_809850E8(DemoIm* this, PlayState* play, u16 action, s32 actionIdx) {
} }
s32 func_80985134(DemoIm* this, PlayState* play, u16 action, s32 actionIdx) { s32 func_80985134(DemoIm* this, PlayState* play, u16 action, s32 actionIdx) {
CsCmdActorAction* npcAction = DemoIm_GetNpcAction(play, actionIdx); CsCmdActorCue* npcAction = DemoIm_GetNpcAction(play, actionIdx);
if (npcAction != NULL) { if (npcAction != NULL) {
if (npcAction->action != action) { if (npcAction->action != action) {
@ -256,7 +256,7 @@ s32 func_80985134(DemoIm* this, PlayState* play, u16 action, s32 actionIdx) {
} }
void func_80985180(DemoIm* this, PlayState* play, s32 actionIdx) { void func_80985180(DemoIm* this, PlayState* play, s32 actionIdx) {
CsCmdActorAction* npcAction = DemoIm_GetNpcAction(play, actionIdx); CsCmdActorCue* npcAction = DemoIm_GetNpcAction(play, actionIdx);
if (npcAction != NULL) { if (npcAction != NULL) {
this->actor.world.pos.x = npcAction->startPos.x; this->actor.world.pos.x = npcAction->startPos.x;
@ -267,7 +267,7 @@ void func_80985180(DemoIm* this, PlayState* play, s32 actionIdx) {
} }
void func_80985200(DemoIm* this, PlayState* play, s32 actionIdx) { void func_80985200(DemoIm* this, PlayState* play, s32 actionIdx) {
CsCmdActorAction* npcAction = DemoIm_GetNpcAction(play, actionIdx); CsCmdActorCue* npcAction = DemoIm_GetNpcAction(play, actionIdx);
if (npcAction != NULL) { if (npcAction != NULL) {
this->actor.world.pos.x = npcAction->startPos.x; this->actor.world.pos.x = npcAction->startPos.x;
@ -614,7 +614,7 @@ void func_80986148(DemoIm* this) {
} }
void func_809861C4(DemoIm* this, PlayState* play) { void func_809861C4(DemoIm* this, PlayState* play) {
CsCmdActorAction* npcAction = DemoIm_GetNpcAction(play, 5); CsCmdActorCue* npcAction = DemoIm_GetNpcAction(play, 5);
if (npcAction != NULL) { if (npcAction != NULL) {
u32 action = npcAction->action; u32 action = npcAction->action;
@ -647,7 +647,7 @@ void func_8098629C(DemoIm* this, PlayState* play) {
} }
void func_809862E0(DemoIm* this, PlayState* play) { void func_809862E0(DemoIm* this, PlayState* play) {
CsCmdActorAction* npcAction = DemoIm_GetNpcAction(play, 5); CsCmdActorCue* npcAction = DemoIm_GetNpcAction(play, 5);
if (npcAction != NULL) { if (npcAction != NULL) {
u32 action = npcAction->action; u32 action = npcAction->action;
@ -777,7 +777,7 @@ void func_80986794(DemoIm* this) {
} }
void func_8098680C(DemoIm* this, PlayState* play) { void func_8098680C(DemoIm* this, PlayState* play) {
CsCmdActorAction* npcAction = DemoIm_GetNpcAction(play, 5); CsCmdActorCue* npcAction = DemoIm_GetNpcAction(play, 5);
if (npcAction != NULL) { if (npcAction != NULL) {
u32 action = npcAction->action; u32 action = npcAction->action;
@ -1055,7 +1055,7 @@ void func_809871B4(DemoIm* this, s32 arg1) {
} }
void func_809871E8(DemoIm* this, PlayState* play) { void func_809871E8(DemoIm* this, PlayState* play) {
CsCmdActorAction* npcAction = DemoIm_GetNpcAction(play, 5); CsCmdActorCue* npcAction = DemoIm_GetNpcAction(play, 5);
if (npcAction != NULL) { if (npcAction != NULL) {
u32 action = npcAction->action; u32 action = npcAction->action;

View File

@ -376,7 +376,7 @@ void DemoKankyo_DoNothing2(DemoKankyo* this, PlayState* play) {
void DemoKankyo_SetRockPos(DemoKankyo* this, PlayState* play, s32 params) { void DemoKankyo_SetRockPos(DemoKankyo* this, PlayState* play, s32 params) {
Vec3f startPos; Vec3f startPos;
Vec3f endPos; Vec3f endPos;
CsCmdActorAction* csAction = play->csCtx.npcActions[params]; CsCmdActorCue* csAction = play->csCtx.npcActions[params];
f32 temp_f0; f32 temp_f0;
startPos.x = csAction->startPos.x; startPos.x = csAction->startPos.x;

View File

@ -160,7 +160,7 @@ s32 DemoSa_UpdateSkelAnime(DemoSa* this) {
return SkelAnime_Update(&this->skelAnime); return SkelAnime_Update(&this->skelAnime);
} }
CsCmdActorAction* DemoSa_GetNpcAction(PlayState* play, s32 idx) { CsCmdActorCue* DemoSa_GetNpcAction(PlayState* play, s32 idx) {
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
return play->csCtx.npcActions[idx]; return play->csCtx.npcActions[idx];
} }
@ -168,7 +168,7 @@ CsCmdActorAction* DemoSa_GetNpcAction(PlayState* play, s32 idx) {
} }
s32 func_8098E654(DemoSa* this, PlayState* play, u16 arg2, s32 arg3) { s32 func_8098E654(DemoSa* this, PlayState* play, u16 arg2, s32 arg3) {
CsCmdActorAction* npcAction = DemoSa_GetNpcAction(play, arg3); CsCmdActorCue* npcAction = DemoSa_GetNpcAction(play, arg3);
if ((npcAction != NULL) && (npcAction->action == arg2)) { if ((npcAction != NULL) && (npcAction->action == arg2)) {
return 1; return 1;
@ -177,7 +177,7 @@ s32 func_8098E654(DemoSa* this, PlayState* play, u16 arg2, s32 arg3) {
} }
s32 func_8098E6A0(DemoSa* this, PlayState* play, u16 arg2, s32 arg3) { s32 func_8098E6A0(DemoSa* this, PlayState* play, u16 arg2, s32 arg3) {
CsCmdActorAction* npcAction = DemoSa_GetNpcAction(play, arg3); CsCmdActorCue* npcAction = DemoSa_GetNpcAction(play, arg3);
if ((npcAction != NULL) && (npcAction->action != arg2)) { if ((npcAction != NULL) && (npcAction->action != arg2)) {
return 1; return 1;
@ -186,7 +186,7 @@ s32 func_8098E6A0(DemoSa* this, PlayState* play, u16 arg2, s32 arg3) {
} }
void func_8098E6EC(DemoSa* this, PlayState* play, s32 actionIdx) { void func_8098E6EC(DemoSa* this, PlayState* play, s32 actionIdx) {
CsCmdActorAction* npcAction = DemoSa_GetNpcAction(play, actionIdx); CsCmdActorCue* npcAction = DemoSa_GetNpcAction(play, actionIdx);
if (npcAction != NULL) { if (npcAction != NULL) {
this->actor.world.pos.x = npcAction->startPos.x; this->actor.world.pos.x = npcAction->startPos.x;
@ -267,7 +267,7 @@ void func_8098E960(DemoSa* this, PlayState* play) {
} }
void func_8098E9EC(DemoSa* this, PlayState* play) { void func_8098E9EC(DemoSa* this, PlayState* play) {
CsCmdActorAction* npcAction; CsCmdActorCue* npcAction;
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
npcAction = play->csCtx.npcActions[4]; npcAction = play->csCtx.npcActions[4];
@ -287,7 +287,7 @@ void func_8098EA3C(DemoSa* this) {
} }
void func_8098EA68(DemoSa* this, PlayState* play) { void func_8098EA68(DemoSa* this, PlayState* play) {
CsCmdActorAction* npcAction; CsCmdActorCue* npcAction;
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
npcAction = play->csCtx.npcActions[4]; npcAction = play->csCtx.npcActions[4];
@ -308,7 +308,7 @@ void func_8098EB00(DemoSa* this, s32 arg1) {
} }
void func_8098EB6C(DemoSa* this, PlayState* play) { void func_8098EB6C(DemoSa* this, PlayState* play) {
CsCmdActorAction* npcAction; CsCmdActorCue* npcAction;
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
npcAction = play->csCtx.npcActions[6]; npcAction = play->csCtx.npcActions[6];
@ -552,7 +552,7 @@ void func_8098F610(DemoSa* this, s32 arg1) {
void func_8098F654(DemoSa* this, PlayState* play) { void func_8098F654(DemoSa* this, PlayState* play) {
s32 unk_1AC; s32 unk_1AC;
s32 action; s32 action;
CsCmdActorAction* npcAction = DemoSa_GetNpcAction(play, 4); CsCmdActorCue* npcAction = DemoSa_GetNpcAction(play, 4);
if (npcAction != NULL) { if (npcAction != NULL) {
action = npcAction->action; action = npcAction->action;
@ -697,7 +697,7 @@ void func_8098FB34(DemoSa* this, s32 arg1) {
void func_8098FB68(DemoSa* this, PlayState* play) { void func_8098FB68(DemoSa* this, PlayState* play) {
s32 unk_1AC; s32 unk_1AC;
s32 action; s32 action;
CsCmdActorAction* npcAction = DemoSa_GetNpcAction(play, 1); CsCmdActorCue* npcAction = DemoSa_GetNpcAction(play, 1);
if (npcAction != NULL) { if (npcAction != NULL) {
action = npcAction->action; action = npcAction->action;

View File

@ -59,7 +59,7 @@ void func_80991298(DemoShd* this, PlayState* play) {
} }
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction0 = play->csCtx.npcActions[0]; CsCmdActorCue* npcAction0 = play->csCtx.npcActions[0];
if (npcAction0 != NULL) { if (npcAction0 != NULL) {
if (npcAction0->action == 2) { if (npcAction0->action == 2) {
@ -74,7 +74,7 @@ void func_80991298(DemoShd* this, PlayState* play) {
} }
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction1 = play->csCtx.npcActions[1]; CsCmdActorCue* npcAction1 = play->csCtx.npcActions[1];
if (npcAction1 != NULL) { if (npcAction1 != NULL) {
if (npcAction1->action == 2) { if (npcAction1->action == 2) {

View File

@ -420,7 +420,7 @@ void func_80996C60(DoorShutter* this, PlayState* play) {
DoorShutter_SetupAction(this, func_80997004); DoorShutter_SetupAction(this, func_80997004);
this->unk_16C = sp38; this->unk_16C = sp38;
this->unk_170 = 0.0f; this->unk_170 = 0.0f;
Camera_ChangeDoorCam(play->cameraPtrs[MAIN_CAM], &this->dyna.actor, player->doorBgCamIndex, 0.0f, 12, sp34, 10); Camera_ChangeDoorCam(play->cameraPtrs[MAIN_CAM], &this->dyna.actor, player->cv.slidingDoorBgCamIndex, 0.0f, 12, sp34, 10);
} }
} }
@ -558,7 +558,7 @@ void func_80997220(DoorShutter* this, PlayState* play) {
} }
this->unk_164 = 0; this->unk_164 = 0;
this->dyna.actor.velocity.y = 0.0f; this->dyna.actor.velocity.y = 0.0f;
if (DoorShutter_SetupDoor(this, play) && !(player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD)) { if (DoorShutter_SetupDoor(this, play) && !(player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR)) {
DoorShutter_SetupAction(this, func_80997568); DoorShutter_SetupAction(this, func_80997568);
Player_SetCsActionWithHaltedActors(play, NULL, 2); Player_SetCsActionWithHaltedActors(play, NULL, 2);
} }
@ -642,7 +642,7 @@ void DoorShutter_Update(Actor* thisx, PlayState* play) {
DoorShutter* this = (DoorShutter*)thisx; DoorShutter* this = (DoorShutter*)thisx;
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 & (PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_IN_ITEM_CS)) || (this->actionFunc == DoorShutter_SetupType)) { if (!(player->stateFlags1 & (PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_IN_ITEM_CS)) || (this->actionFunc == DoorShutter_SetupType)) {
this->actionFunc(this, play); this->actionFunc(this, play);
} }
} }

View File

@ -147,7 +147,7 @@ void EfcErupc_Draw(Actor* thisx, PlayState* play) {
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (play->csCtx.state != 0) { if (play->csCtx.state != 0) {
CsCmdActorAction* csActorAction = play->csCtx.npcActions[2]; CsCmdActorCue* csActorAction = play->csCtx.npcActions[2];
if (csActorAction != 0) { if (csActorAction != 0) {
csAction = csActorAction->action; csAction = csActorAction->action;
if ((csAction == 2) || (csAction == 3)) { if ((csAction == 2) || (csAction == 3)) {

View File

@ -238,11 +238,11 @@ void EnBom_Explode(EnBom* this, PlayState* play) {
if (this->timer == 0) { if (this->timer == 0) {
player = GET_PLAYER(play); player = GET_PLAYER(play);
if ((player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) && (player->heldActor == &this->actor)) { if ((player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) && (player->heldActor == &this->actor)) {
player->actor.child = NULL; player->actor.child = NULL;
player->heldActor = NULL; player->heldActor = NULL;
player->interactRangeActor = NULL; player->interactRangeActor = NULL;
player->stateFlags1 &= ~PLAYER_STATE1_ITEM_OVER_HEAD; player->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
} }
Actor_Kill(&this->actor); Actor_Kill(&this->actor);

View File

@ -164,7 +164,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) {
player->heldActor = NULL; player->heldActor = NULL;
player->interactRangeActor = NULL; player->interactRangeActor = NULL;
this->actor.parent = NULL; this->actor.parent = NULL;
player->stateFlags1 &= ~PLAYER_STATE1_ITEM_OVER_HEAD; player->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
} }
} else if (this->bombCollider.base.acFlags & AC_HIT) { } else if (this->bombCollider.base.acFlags & AC_HIT) {
this->bombCollider.base.acFlags &= ~AC_HIT; this->bombCollider.base.acFlags &= ~AC_HIT;
@ -200,7 +200,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) {
player->heldActor = NULL; player->heldActor = NULL;
player->interactRangeActor = NULL; player->interactRangeActor = NULL;
this->actor.parent = NULL; this->actor.parent = NULL;
player->stateFlags1 &= ~PLAYER_STATE1_ITEM_OVER_HEAD; player->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
this->actor.world.pos = this->actor.home.pos; this->actor.world.pos = this->actor.home.pos;
} }
} }
@ -218,7 +218,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) {
player->heldActor = NULL; player->heldActor = NULL;
player->interactRangeActor = NULL; player->interactRangeActor = NULL;
this->actor.parent = NULL; this->actor.parent = NULL;
player->stateFlags1 &= ~PLAYER_STATE1_ITEM_OVER_HEAD; player->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
this->actor.world.pos = this->actor.home.pos; this->actor.world.pos = this->actor.home.pos;
} }
} }
@ -302,11 +302,11 @@ void EnBombf_Explode(EnBombf* this, PlayState* play) {
if (this->timer == 0) { if (this->timer == 0) {
player = GET_PLAYER(play); player = GET_PLAYER(play);
if ((player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) && (player->heldActor == &this->actor)) { if ((player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) && (player->heldActor == &this->actor)) {
player->actor.child = NULL; player->actor.child = NULL;
player->heldActor = NULL; player->heldActor = NULL;
player->interactRangeActor = NULL; player->interactRangeActor = NULL;
player->stateFlags1 &= ~PLAYER_STATE1_ITEM_OVER_HEAD; player->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
} }
Actor_Kill(&this->actor); Actor_Kill(&this->actor);

View File

@ -188,7 +188,7 @@ void EnBoom_Fly(EnBoom* this, PlayState* play) {
} }
} }
// Set player flags and kill the boomerang beacause Link caught it. // Set player flags and kill the boomerang beacause Link caught it.
player->stateFlags1 &= ~PLAYER_STATE1_THREW_BOOMERANG; player->stateFlags1 &= ~PLAYER_STATE1_BOOMERANG_THROWN;
player->boomerangQuickRecall = false; player->boomerangQuickRecall = false;
Actor_Kill(&this->actor); Actor_Kill(&this->actor);
} }

View File

@ -237,7 +237,7 @@ void EnDh_Wait(EnDh* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0x7D0, 0); Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0x7D0, 0);
SkelAnime_Update(&this->skelAnime); SkelAnime_Update(&this->skelAnime);
if (this->actor.params != ENDH_START_ATTACK_BOMB) { if (this->actor.params != ENDH_START_ATTACK_BOMB) {
func_8008EEAC(play, &this->actor); Player_SetAutoLockOnActor(play, &this->actor);
} }
} }
} }

View File

@ -123,7 +123,7 @@ void EnDntJiji_Wait(EnDntJiji* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime); SkelAnime_Update(&this->skelAnime);
if ((this->timer == 1) && (this->actor.xzDistToPlayer < 150.0f) && !Play_InCsMode(play) && if ((this->timer == 1) && (this->actor.xzDistToPlayer < 150.0f) && !Play_InCsMode(play) &&
!(player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD)) { !(player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR)) {
OnePointCutscene_Init(play, 2230, -99, &this->actor, MAIN_CAM); OnePointCutscene_Init(play, 2230, -99, &this->actor, MAIN_CAM);
this->timer = 0; this->timer = 0;
Player_SetCsActionWithHaltedActors(play, NULL, 8); Player_SetCsActionWithHaltedActors(play, NULL, 8);

View File

@ -254,13 +254,13 @@ void func_809FDE9C(EnDu* this) {
} }
} }
void func_809FDFC0(CsCmdActorAction* csAction, Vec3f* dst) { void func_809FDFC0(CsCmdActorCue* csAction, Vec3f* dst) {
dst->x = csAction->startPos.x; dst->x = csAction->startPos.x;
dst->y = csAction->startPos.y; dst->y = csAction->startPos.y;
dst->z = csAction->startPos.z; dst->z = csAction->startPos.z;
} }
void func_809FE000(CsCmdActorAction* csAction, Vec3f* dst) { void func_809FE000(CsCmdActorCue* csAction, Vec3f* dst) {
dst->x = csAction->endPos.x; dst->x = csAction->endPos.x;
dst->y = csAction->endPos.y; dst->y = csAction->endPos.y;
dst->z = csAction->endPos.z; dst->z = csAction->endPos.z;
@ -473,7 +473,7 @@ void func_809FE890(EnDu* this, PlayState* play) {
Vec3f startPos; Vec3f startPos;
Vec3f endPos; Vec3f endPos;
Vec3f velocity = { 0.0f, 0.0f, 0.0f }; Vec3f velocity = { 0.0f, 0.0f, 0.0f };
CsCmdActorAction* csAction; CsCmdActorCue* csAction;
if (play->csCtx.state == CS_STATE_IDLE) { if (play->csCtx.state == CS_STATE_IDLE) {
Player_SetCsActionWithHaltedActors(play, &this->actor, 1); Player_SetCsActionWithHaltedActors(play, &this->actor, 1);

View File

@ -1047,11 +1047,11 @@ void func_80A04414(EnElf* this, PlayState* play) {
} }
if (this->fairyFlags & 1) { if (this->fairyFlags & 1) {
if ((arrowPointedActor == NULL) || (player->unk_664 == NULL)) { if ((arrowPointedActor == NULL) || (player->focusActor == NULL)) {
this->fairyFlags ^= 1; this->fairyFlags ^= 1;
} }
} else { } else {
if ((arrowPointedActor != NULL) && (player->unk_664 != NULL)) { if ((arrowPointedActor != NULL) && (player->focusActor != NULL)) {
if (arrowPointedActor->category == ACTORCAT_NPC) { if (arrowPointedActor->category == ACTORCAT_NPC) {
targetSound = NA_SE_VO_NAVY_HELLO; targetSound = NA_SE_VO_NAVY_HELLO;
} else { } else {
@ -1103,7 +1103,7 @@ void func_80A0461C(EnElf* this, PlayState* play) {
} else if (arrowPointedActor == NULL || arrowPointedActor->category == ACTORCAT_NPC) { } else if (arrowPointedActor == NULL || arrowPointedActor->category == ACTORCAT_NPC) {
if (arrowPointedActor != NULL) { if (arrowPointedActor != NULL) {
this->unk_2C0 = 100; this->unk_2C0 = 100;
player->stateFlags2 |= PLAYER_STATE2_NAVI_OUT; player->stateFlags2 |= PLAYER_STATE2_NAVI_ACTIVE;
temp = 0; temp = 0;
} else { } else {
switch (this->unk_2A8) { switch (this->unk_2A8) {
@ -1124,7 +1124,7 @@ void func_80A0461C(EnElf* this, PlayState* play) {
this->unk_2AE--; this->unk_2AE--;
temp = 7; temp = 7;
} else { } else {
player->stateFlags2 |= PLAYER_STATE2_NAVI_OUT; player->stateFlags2 |= PLAYER_STATE2_NAVI_ACTIVE;
temp = 0; temp = 0;
} }
} else { } else {
@ -1154,7 +1154,7 @@ void func_80A0461C(EnElf* this, PlayState* play) {
switch (temp) { switch (temp) {
case 0: case 0:
if (!(player->stateFlags2 & PLAYER_STATE2_NAVI_OUT)) { if (!(player->stateFlags2 & PLAYER_STATE2_NAVI_ACTIVE)) {
temp = 7; temp = 7;
if (this->unk_2C7 == 0) { if (this->unk_2C7 == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_NAVY_VANISH); Audio_PlayActorSound2(&this->actor, NA_SE_EV_NAVY_VANISH);
@ -1162,7 +1162,7 @@ void func_80A0461C(EnElf* this, PlayState* play) {
} }
break; break;
case 8: case 8:
if (player->stateFlags2 & PLAYER_STATE2_NAVI_OUT) { if (player->stateFlags2 & PLAYER_STATE2_NAVI_ACTIVE) {
func_80A0299C(this, 0x32); func_80A0299C(this, 0x32);
this->unk_2C0 = 42; this->unk_2C0 = 42;
temp = 11; temp = 11;
@ -1172,10 +1172,10 @@ void func_80A0461C(EnElf* this, PlayState* play) {
} }
break; break;
case 7: case 7:
player->stateFlags2 &= ~PLAYER_STATE2_NAVI_OUT; player->stateFlags2 &= ~PLAYER_STATE2_NAVI_ACTIVE;
break; break;
default: default:
player->stateFlags2 |= PLAYER_STATE2_NAVI_OUT; player->stateFlags2 |= PLAYER_STATE2_NAVI_ACTIVE;
break; break;
} }
} }
@ -1232,7 +1232,7 @@ void func_80A04DE4(EnElf* this, PlayState* play) {
if (this->fairyFlags & 0x10) { if (this->fairyFlags & 0x10) {
naviRefPos = play->actorCtx.targetCtx.naviRefPos; naviRefPos = play->actorCtx.targetCtx.naviRefPos;
if ((player->unk_664 == NULL) || (&player->actor == player->unk_664) || (&this->actor == player->unk_664)) { if ((player->focusActor == NULL) || (&player->actor == player->focusActor) || (&this->actor == player->focusActor)) {
naviRefPos.x = player->bodyPartsPos[7].x + (Math_SinS(player->actor.shape.rot.y) * 20.0f); naviRefPos.x = player->bodyPartsPos[7].x + (Math_SinS(player->actor.shape.rot.y) * 20.0f);
naviRefPos.y = player->bodyPartsPos[7].y + 5.0f; naviRefPos.y = player->bodyPartsPos[7].y + 5.0f;
naviRefPos.z = player->bodyPartsPos[7].z + (Math_CosS(player->actor.shape.rot.y) * 20.0f); naviRefPos.z = player->bodyPartsPos[7].z + (Math_CosS(player->actor.shape.rot.y) * 20.0f);
@ -1384,7 +1384,7 @@ void func_80A053F0(Actor* thisx, PlayState* play) {
EnElf* this = (EnElf*)thisx; EnElf* this = (EnElf*)thisx;
if (player->naviTextId == 0) { if (player->naviTextId == 0) {
if (player->unk_664 == NULL) { if (player->focusActor == NULL) {
if (((gSaveContext.naviTimer >= 600) && (gSaveContext.naviTimer <= 3000)) || (nREG(89) != 0)) { if (((gSaveContext.naviTimer >= 600) && (gSaveContext.naviTimer <= 3000)) || (nREG(89) != 0)) {
player->naviTextId = ElfMessage_GetCUpText(play); player->naviTextId = ElfMessage_GetCUpText(play);
@ -1551,7 +1551,7 @@ void EnElf_Draw(Actor* thisx, PlayState* play) {
void EnElf_GetCutsceneNextPos(Vec3f* vec, PlayState* play, s32 action) { void EnElf_GetCutsceneNextPos(Vec3f* vec, PlayState* play, s32 action) {
Vec3f startPos; Vec3f startPos;
Vec3f endPos; Vec3f endPos;
CsCmdActorAction* npcAction = play->csCtx.npcActions[action]; CsCmdActorCue* npcAction = play->csCtx.npcActions[action];
f32 lerp; f32 lerp;
startPos.x = npcAction->startPos.x; startPos.x = npcAction->startPos.x;

View File

@ -389,7 +389,7 @@ void EnExItem_TargetPrizeApproach(EnExItem* this, PlayState* play) {
this->actor.parent = NULL; this->actor.parent = NULL;
if (!GameInteractor_Should(VB_PLAY_ONEPOINT_ACTOR_CS, true, &this->actor)) { if (!GameInteractor_Should(VB_PLAY_ONEPOINT_ACTOR_CS, true, &this->actor)) {
GET_PLAYER(play)->stateFlags1 &= ~(PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_ITEM_OVER_HEAD); GET_PLAYER(play)->stateFlags1 &= ~(PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_CARRYING_ACTOR);
} }
if (CUR_UPG_VALUE(UPG_BULLET_BAG) == 1) { if (CUR_UPG_VALUE(UPG_BULLET_BAG) == 1) {

View File

@ -622,7 +622,7 @@ void EnFish_Cutscene_WiggleFlyingThroughAir(EnFish* this, PlayState* play) {
void EnFish_UpdateCutscene(EnFish* this, PlayState* play) { void EnFish_UpdateCutscene(EnFish* this, PlayState* play) {
s32 pad; s32 pad;
s32 pad2; s32 pad2;
CsCmdActorAction* csAction = play->csCtx.npcActions[1]; CsCmdActorCue* csAction = play->csCtx.npcActions[1];
Vec3f startPos; Vec3f startPos;
Vec3f endPos; Vec3f endPos;
f32 progress; f32 progress;

View File

@ -725,7 +725,7 @@ void EnGoroiwa_Update(Actor* thisx, PlayState* play) {
s32 pad; s32 pad;
s32 sp30; s32 sp30;
if (!(player->stateFlags1 & (PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE))) { if (!(player->stateFlags1 & (PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE))) {
if (this->collisionDisabledTimer > 0) { if (this->collisionDisabledTimer > 0) {
this->collisionDisabledTimer--; this->collisionDisabledTimer--;
} }

View File

@ -13,7 +13,7 @@
#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED #define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED
typedef void (*EnHorseCsFunc)(EnHorse*, PlayState*, CsCmdActorAction*); typedef void (*EnHorseCsFunc)(EnHorse*, PlayState*, CsCmdActorCue*);
typedef void (*EnHorseActionFunc)(EnHorse*, PlayState*); typedef void (*EnHorseActionFunc)(EnHorse*, PlayState*);
void EnHorse_Init(Actor* thisx, PlayState* play); void EnHorse_Init(Actor* thisx, PlayState* play);
@ -388,11 +388,11 @@ static s32 sIdleAnimIds[] = { 1, 3, 0, 3, 1, 0 };
static s16 sIngoAnimations[] = { 7, 6, 2, 2, 1, 1, 0, 0, 0, 0 }; static s16 sIngoAnimations[] = { 7, 6, 2, 2, 1, 1, 0, 0, 0, 0 };
void EnHorse_CsMoveInit(EnHorse* this, PlayState* play, CsCmdActorAction* action); void EnHorse_CsMoveInit(EnHorse* this, PlayState* play, CsCmdActorCue* action);
void EnHorse_CsJumpInit(EnHorse* this, PlayState* play, CsCmdActorAction* action); void EnHorse_CsJumpInit(EnHorse* this, PlayState* play, CsCmdActorCue* action);
void EnHorse_CsRearingInit(EnHorse* this, PlayState* play, CsCmdActorAction* action); void EnHorse_CsRearingInit(EnHorse* this, PlayState* play, CsCmdActorCue* action);
void EnHorse_WarpMoveInit(EnHorse* this, PlayState* play, CsCmdActorAction* action); void EnHorse_WarpMoveInit(EnHorse* this, PlayState* play, CsCmdActorCue* action);
void EnHorse_CsWarpRearingInit(EnHorse* this, PlayState* play, CsCmdActorAction* action); void EnHorse_CsWarpRearingInit(EnHorse* this, PlayState* play, CsCmdActorCue* action);
static EnHorseCsFunc sCutsceneInitFuncs[] = { static EnHorseCsFunc sCutsceneInitFuncs[] = {
NULL, NULL,
@ -403,11 +403,11 @@ static EnHorseCsFunc sCutsceneInitFuncs[] = {
EnHorse_CsWarpRearingInit, EnHorse_CsWarpRearingInit,
}; };
void EnHorse_CsMoveToPoint(EnHorse* this, PlayState* play, CsCmdActorAction* action); void EnHorse_CsMoveToPoint(EnHorse* this, PlayState* play, CsCmdActorCue* action);
void EnHorse_CsJump(EnHorse* this, PlayState* play, CsCmdActorAction* action); void EnHorse_CsJump(EnHorse* this, PlayState* play, CsCmdActorCue* action);
void EnHorse_CsRearing(EnHorse* this, PlayState* play, CsCmdActorAction* action); void EnHorse_CsRearing(EnHorse* this, PlayState* play, CsCmdActorCue* action);
void EnHorse_CsWarpMoveToPoint(EnHorse* this, PlayState* play, CsCmdActorAction* action); void EnHorse_CsWarpMoveToPoint(EnHorse* this, PlayState* play, CsCmdActorCue* action);
void EnHorse_CsWarpRearing(EnHorse* this, PlayState* play, CsCmdActorAction* action); void EnHorse_CsWarpRearing(EnHorse* this, PlayState* play, CsCmdActorCue* action);
static EnHorseCsFunc sCutsceneActionFuncs[] = { static EnHorseCsFunc sCutsceneActionFuncs[] = {
NULL, EnHorse_CsMoveToPoint, EnHorse_CsJump, EnHorse_CsRearing, EnHorse_CsWarpMoveToPoint, EnHorse_CsWarpRearing, NULL, EnHorse_CsMoveToPoint, EnHorse_CsJump, EnHorse_CsRearing, EnHorse_CsWarpMoveToPoint, EnHorse_CsWarpRearing,
@ -2104,7 +2104,7 @@ void EnHorse_UpdateIngoRace(EnHorse* this, PlayState* play) {
&((EnIn*)this->rider)->animationIdx, &((EnIn*)this->rider)->unk_1E0); &((EnIn*)this->rider)->animationIdx, &((EnIn*)this->rider)->unk_1E0);
} }
void EnHorse_CsMoveInit(EnHorse* this, PlayState* play, CsCmdActorAction* action) { void EnHorse_CsMoveInit(EnHorse* this, PlayState* play, CsCmdActorCue* action) {
this->animationIdx = ENHORSE_ANIM_GALLOP; this->animationIdx = ENHORSE_ANIM_GALLOP;
this->cutsceneAction = 1; this->cutsceneAction = 1;
Animation_PlayOnceSetSpeed(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], Animation_PlayOnceSetSpeed(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx],
@ -2113,7 +2113,7 @@ void EnHorse_CsMoveInit(EnHorse* this, PlayState* play, CsCmdActorAction* action
void EnHorse_CsPlayHighJumpAnim(EnHorse* this, PlayState* play); void EnHorse_CsPlayHighJumpAnim(EnHorse* this, PlayState* play);
void EnHorse_CsMoveToPoint(EnHorse* this, PlayState* play, CsCmdActorAction* action) { void EnHorse_CsMoveToPoint(EnHorse* this, PlayState* play, CsCmdActorCue* action) {
Vec3f endPos; Vec3f endPos;
f32 speed = 8.0f; f32 speed = 8.0f;
@ -2165,13 +2165,13 @@ void EnHorse_CsPlayHighJumpAnim(EnHorse* this, PlayState* play) {
func_800AA000(0.0f, 170, 10, 10); func_800AA000(0.0f, 170, 10, 10);
} }
void EnHorse_CsJumpInit(EnHorse* this, PlayState* play, CsCmdActorAction* action) { void EnHorse_CsJumpInit(EnHorse* this, PlayState* play, CsCmdActorCue* action) {
EnHorse_CsSetAnimHighJump(this, play); EnHorse_CsSetAnimHighJump(this, play);
this->cutsceneAction = 2; this->cutsceneAction = 2;
this->cutsceneFlags &= ~1; this->cutsceneFlags &= ~1;
} }
void EnHorse_CsJump(EnHorse* this, PlayState* play, CsCmdActorAction* action) { void EnHorse_CsJump(EnHorse* this, PlayState* play, CsCmdActorCue* action) {
f32 temp_f2; f32 temp_f2;
if (this->cutsceneFlags & 1) { if (this->cutsceneFlags & 1) {
@ -2223,7 +2223,7 @@ void EnHorse_CsJump(EnHorse* this, PlayState* play, CsCmdActorAction* action) {
} }
} }
void EnHorse_CsRearingInit(EnHorse* this, PlayState* play, CsCmdActorAction* action) { void EnHorse_CsRearingInit(EnHorse* this, PlayState* play, CsCmdActorCue* action) {
this->animationIdx = ENHORSE_ANIM_REARING; this->animationIdx = ENHORSE_ANIM_REARING;
this->cutsceneAction = 3; this->cutsceneAction = 3;
this->cutsceneFlags &= ~4; this->cutsceneFlags &= ~4;
@ -2236,7 +2236,7 @@ void EnHorse_CsRearingInit(EnHorse* this, PlayState* play, CsCmdActorAction* act
Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f); Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f);
} }
void EnHorse_CsRearing(EnHorse* this, PlayState* play, CsCmdActorAction* action) { void EnHorse_CsRearing(EnHorse* this, PlayState* play, CsCmdActorCue* action) {
this->actor.speedXZ = 0.0f; this->actor.speedXZ = 0.0f;
if (this->curFrame > 25.0f) { if (this->curFrame > 25.0f) {
if (!(this->stateFlags & ENHORSE_LAND2_SOUND)) { if (!(this->stateFlags & ENHORSE_LAND2_SOUND)) {
@ -2259,7 +2259,7 @@ void EnHorse_CsRearing(EnHorse* this, PlayState* play, CsCmdActorAction* action)
} }
} }
void EnHorse_WarpMoveInit(EnHorse* this, PlayState* play, CsCmdActorAction* action) { void EnHorse_WarpMoveInit(EnHorse* this, PlayState* play, CsCmdActorCue* action) {
this->actor.world.pos.x = action->startPos.x; this->actor.world.pos.x = action->startPos.x;
this->actor.world.pos.y = action->startPos.y; this->actor.world.pos.y = action->startPos.y;
this->actor.world.pos.z = action->startPos.z; this->actor.world.pos.z = action->startPos.z;
@ -2272,7 +2272,7 @@ void EnHorse_WarpMoveInit(EnHorse* this, PlayState* play, CsCmdActorAction* acti
this->actor.speedXZ * 0.3f); this->actor.speedXZ * 0.3f);
} }
void EnHorse_CsWarpMoveToPoint(EnHorse* this, PlayState* play, CsCmdActorAction* action) { void EnHorse_CsWarpMoveToPoint(EnHorse* this, PlayState* play, CsCmdActorCue* action) {
Vec3f endPos; Vec3f endPos;
f32 speed = 8.0f; f32 speed = 8.0f;
@ -2296,7 +2296,7 @@ void EnHorse_CsWarpMoveToPoint(EnHorse* this, PlayState* play, CsCmdActorAction*
} }
} }
void EnHorse_CsWarpRearingInit(EnHorse* this, PlayState* play, CsCmdActorAction* action) { void EnHorse_CsWarpRearingInit(EnHorse* this, PlayState* play, CsCmdActorCue* action) {
this->actor.world.pos.x = action->startPos.x; this->actor.world.pos.x = action->startPos.x;
this->actor.world.pos.y = action->startPos.y; this->actor.world.pos.y = action->startPos.y;
this->actor.world.pos.z = action->startPos.z; this->actor.world.pos.z = action->startPos.z;
@ -2315,7 +2315,7 @@ void EnHorse_CsWarpRearingInit(EnHorse* this, PlayState* play, CsCmdActorAction*
Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f); Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f);
} }
void EnHorse_CsWarpRearing(EnHorse* this, PlayState* play, CsCmdActorAction* action) { void EnHorse_CsWarpRearing(EnHorse* this, PlayState* play, CsCmdActorCue* action) {
this->actor.speedXZ = 0.0f; this->actor.speedXZ = 0.0f;
if (this->curFrame > 25.0f) { if (this->curFrame > 25.0f) {
if (!(this->stateFlags & ENHORSE_LAND2_SOUND)) { if (!(this->stateFlags & ENHORSE_LAND2_SOUND)) {
@ -2362,7 +2362,7 @@ s32 EnHorse_GetCutsceneFunctionIndex(s32 csAction) {
void EnHorse_CutsceneUpdate(EnHorse* this, PlayState* play) { void EnHorse_CutsceneUpdate(EnHorse* this, PlayState* play) {
s32 csFunctionIdx; s32 csFunctionIdx;
CsCmdActorAction* linkCsAction = play->csCtx.linkAction; CsCmdActorCue* linkCsAction = play->csCtx.linkAction;
if (play->csCtx.state == 3) { if (play->csCtx.state == 3) {
this->playerControlled = 1; this->playerControlled = 1;

View File

@ -1056,7 +1056,7 @@ s32 func_80A7707C(EnIk* this) {
return SkelAnime_Update(&this->skelAnime); return SkelAnime_Update(&this->skelAnime);
} }
CsCmdActorAction* EnIk_GetNpcAction(PlayState* play, s32 actionIdx) { CsCmdActorCue* EnIk_GetNpcAction(PlayState* play, s32 actionIdx) {
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
return play->csCtx.npcActions[actionIdx]; return play->csCtx.npcActions[actionIdx];
} else { } else {
@ -1065,7 +1065,7 @@ CsCmdActorAction* EnIk_GetNpcAction(PlayState* play, s32 actionIdx) {
} }
void func_80A770C0(EnIk* this, PlayState* play, s32 actionIdx) { void func_80A770C0(EnIk* this, PlayState* play, s32 actionIdx) {
CsCmdActorAction* npcAction = EnIk_GetNpcAction(play, actionIdx); CsCmdActorCue* npcAction = EnIk_GetNpcAction(play, actionIdx);
if (npcAction != NULL) { if (npcAction != NULL) {
this->actor.world.pos.x = npcAction->startPos.x; this->actor.world.pos.x = npcAction->startPos.x;
@ -1247,7 +1247,7 @@ void func_80A77844(EnIk* this, PlayState* play) {
} }
void func_80A779DC(EnIk* this, PlayState* play) { void func_80A779DC(EnIk* this, PlayState* play) {
CsCmdActorAction* npcAction = EnIk_GetNpcAction(play, 4); CsCmdActorCue* npcAction = EnIk_GetNpcAction(play, 4);
u32 action; u32 action;
u32 currentNpcAction; u32 currentNpcAction;

View File

@ -232,7 +232,7 @@ s32 EnNb_UpdateSkelAnime(EnNb* this) {
return SkelAnime_Update(&this->skelAnime); return SkelAnime_Update(&this->skelAnime);
} }
CsCmdActorAction* EnNb_GetNpcCsAction(PlayState* play, s32 npcActionIdx) { CsCmdActorCue* EnNb_GetNpcCsAction(PlayState* play, s32 npcActionIdx) {
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
return play->csCtx.npcActions[npcActionIdx]; return play->csCtx.npcActions[npcActionIdx];
} }
@ -240,7 +240,7 @@ CsCmdActorAction* EnNb_GetNpcCsAction(PlayState* play, s32 npcActionIdx) {
} }
void EnNb_SetupCsPosRot(EnNb* this, PlayState* play, s32 npcActionIdx) { void EnNb_SetupCsPosRot(EnNb* this, PlayState* play, s32 npcActionIdx) {
CsCmdActorAction* csCmdNPCAction = EnNb_GetNpcCsAction(play, npcActionIdx); CsCmdActorCue* csCmdNPCAction = EnNb_GetNpcCsAction(play, npcActionIdx);
s16 newRotY; s16 newRotY;
Actor* thisx = &this->actor; Actor* thisx = &this->actor;
@ -253,7 +253,7 @@ void EnNb_SetupCsPosRot(EnNb* this, PlayState* play, s32 npcActionIdx) {
} }
s32 func_80AB1390(EnNb* this, PlayState* play, u16 arg2, s32 npcActionIdx) { s32 func_80AB1390(EnNb* this, PlayState* play, u16 arg2, s32 npcActionIdx) {
CsCmdActorAction* csCmdNPCAction; CsCmdActorCue* csCmdNPCAction;
if ((play->csCtx.state != CS_STATE_IDLE) && if ((play->csCtx.state != CS_STATE_IDLE) &&
(csCmdNPCAction = play->csCtx.npcActions[npcActionIdx], csCmdNPCAction != NULL) && (csCmdNPCAction = play->csCtx.npcActions[npcActionIdx], csCmdNPCAction != NULL) &&
@ -264,7 +264,7 @@ s32 func_80AB1390(EnNb* this, PlayState* play, u16 arg2, s32 npcActionIdx) {
} }
s32 func_80AB13D8(EnNb* this, PlayState* play, u16 arg2, s32 npcActionIdx) { s32 func_80AB13D8(EnNb* this, PlayState* play, u16 arg2, s32 npcActionIdx) {
CsCmdActorAction* csCmdNPCAction; CsCmdActorCue* csCmdNPCAction;
if ((play->csCtx.state != CS_STATE_IDLE) && if ((play->csCtx.state != CS_STATE_IDLE) &&
(csCmdNPCAction = play->csCtx.npcActions[npcActionIdx], csCmdNPCAction != NULL) && (csCmdNPCAction = play->csCtx.npcActions[npcActionIdx], csCmdNPCAction != NULL) &&
@ -275,7 +275,7 @@ s32 func_80AB13D8(EnNb* this, PlayState* play, u16 arg2, s32 npcActionIdx) {
} }
void EnNb_SetInitialCsPosRot(EnNb* this, PlayState* play, s32 npcActionIdx) { void EnNb_SetInitialCsPosRot(EnNb* this, PlayState* play, s32 npcActionIdx) {
CsCmdActorAction* csCmdNPCAction = EnNb_GetNpcCsAction(play, npcActionIdx); CsCmdActorCue* csCmdNPCAction = EnNb_GetNpcCsAction(play, npcActionIdx);
Actor* thisx = &this->actor; Actor* thisx = &this->actor;
if (csCmdNPCAction != NULL) { if (csCmdNPCAction != NULL) {
@ -354,7 +354,7 @@ void EnNb_SetupChamberCsImpl(EnNb* this, PlayState* play) {
void EnNb_SetupChamberWarpImpl(EnNb* this, PlayState* play) { void EnNb_SetupChamberWarpImpl(EnNb* this, PlayState* play) {
CutsceneContext* csCtx = &play->csCtx; CutsceneContext* csCtx = &play->csCtx;
CsCmdActorAction* csCmdNPCAction; CsCmdActorCue* csCmdNPCAction;
if (csCtx->state != CS_STATE_IDLE) { if (csCtx->state != CS_STATE_IDLE) {
csCmdNPCAction = csCtx->npcActions[1]; csCmdNPCAction = csCtx->npcActions[1];
@ -375,7 +375,7 @@ void EnNb_SetupDefaultChamberIdle(EnNb* this) {
void EnNb_SetupArmRaise(EnNb* this, PlayState* play) { void EnNb_SetupArmRaise(EnNb* this, PlayState* play) {
AnimationHeader* animation = &gNabooruRaisingArmsGivingMedallionAnim; AnimationHeader* animation = &gNabooruRaisingArmsGivingMedallionAnim;
CsCmdActorAction* csCmdNPCAction; CsCmdActorCue* csCmdNPCAction;
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
csCmdNPCAction = play->csCtx.npcActions[1]; csCmdNPCAction = play->csCtx.npcActions[1];
@ -398,7 +398,7 @@ void EnNb_SetupRaisedArmTransition(EnNb* this, s32 animFinished) {
} }
void EnNb_SetupMedallion(EnNb* this, PlayState* play) { void EnNb_SetupMedallion(EnNb* this, PlayState* play) {
CsCmdActorAction* csCmdNPCAction; CsCmdActorCue* csCmdNPCAction;
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
csCmdNPCAction = play->csCtx.npcActions[6]; csCmdNPCAction = play->csCtx.npcActions[6];
@ -587,7 +587,7 @@ void EnNb_PlayAgonySFX(EnNb* this, PlayState* play) {
} }
void EnNb_SetPosInPortal(EnNb* this, PlayState* play) { void EnNb_SetPosInPortal(EnNb* this, PlayState* play) {
CsCmdActorAction* csCmdNPCAction = EnNb_GetNpcCsAction(play, 1); CsCmdActorCue* csCmdNPCAction = EnNb_GetNpcCsAction(play, 1);
Vec3f* pos = &this->actor.world.pos; Vec3f* pos = &this->actor.world.pos;
f32 f0; f32 f0;
s32 pad; s32 pad;
@ -642,7 +642,7 @@ void EnNb_SetupKidnap(EnNb* this) {
} }
void EnNb_CheckKidnapCsMode(EnNb* this, PlayState* play) { void EnNb_CheckKidnapCsMode(EnNb* this, PlayState* play) {
CsCmdActorAction* csCmdNPCAction = EnNb_GetNpcCsAction(play, 1); CsCmdActorCue* csCmdNPCAction = EnNb_GetNpcCsAction(play, 1);
s32 action; s32 action;
s32 previousCsAction; s32 previousCsAction;
@ -849,7 +849,7 @@ void EnNb_SetupConfrontationDestroy(EnNb* this) {
} }
void EnNb_CheckConfrontationCsMode(EnNb* this, PlayState* play) { void EnNb_CheckConfrontationCsMode(EnNb* this, PlayState* play) {
CsCmdActorAction* csCmdNPCAction; CsCmdActorCue* csCmdNPCAction;
s32 csAction; s32 csAction;
s32 previousCsAction; s32 previousCsAction;
@ -1051,7 +1051,7 @@ void EnNb_CheckIfLookingUp(EnNb* this, s32 animFinished) {
} }
void EnNb_CheckCreditsCsModeImpl(EnNb* this, PlayState* play) { void EnNb_CheckCreditsCsModeImpl(EnNb* this, PlayState* play) {
CsCmdActorAction* csCmdNPCAction = EnNb_GetNpcCsAction(play, 1); CsCmdActorCue* csCmdNPCAction = EnNb_GetNpcCsAction(play, 1);
s32 action; s32 action;
s32 previousCsAction; s32 previousCsAction;

View File

@ -156,7 +156,7 @@ void EnNutsball_Update(Actor* thisx, PlayState* play) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
s32 pad; s32 pad;
if (!(player->stateFlags1 & (PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE)) || (this->actionFunc == func_80ABBB34)) { if (!(player->stateFlags1 & (PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE)) || (this->actionFunc == func_80ABBB34)) {
this->actionFunc(this, play); this->actionFunc(this, play);
Actor_MoveForward(&this->actor); Actor_MoveForward(&this->actor);

View File

@ -629,7 +629,7 @@ void EnOkuta_Update(Actor* thisx, PlayState* play2) {
Vec3f sp38; Vec3f sp38;
s32 sp34; s32 sp34;
if (!(player->stateFlags1 & (PLAYER_STATE1_TEXT_ON_SCREEN | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE))) { if (!(player->stateFlags1 & (PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_IN_ITEM_CS | PLAYER_STATE1_IN_CUTSCENE))) {
if (this->actor.params == 0) { if (this->actor.params == 0) {
EnOkuta_ColliderCheck(this, play); EnOkuta_ColliderCheck(this, play);
if (!WaterBox_GetSurfaceImpl(play, &play->colCtx, this->actor.world.pos.x, if (!WaterBox_GetSurfaceImpl(play, &play->colCtx, this->actor.world.pos.x,

View File

@ -340,8 +340,8 @@ void func_80AE2C1C(EnRd* this, PlayState* play) {
if (this->unk_306 == 0) { if (this->unk_306 == 0) {
if (!(this->unk_312 & PLAYER_STATE2_GRABBED_BY_ENEMY) && !CVarGetInteger(CVAR_CHEAT("NoRedeadFreeze"), 0)) { if (!(this->unk_312 & PLAYER_STATE2_GRABBED_BY_ENEMY) && !CVarGetInteger(CVAR_CHEAT("NoRedeadFreeze"), 0)) {
player->actor.freezeTimer = 40; player->actor.freezeTimer = 40;
func_8008EEAC(play, &this->actor); Player_SetAutoLockOnActor(play, &this->actor);
GET_PLAYER(play)->unk_684 = &this->actor; GET_PLAYER(play)->autoLockOnActor = &this->actor;
func_800AA000(this->actor.xzDistToPlayer, 0xFF, 0x14, 0x96); func_800AA000(this->actor.xzDistToPlayer, 0xFF, 0x14, 0x96);
} }
this->unk_306 = 0x3C; this->unk_306 = 0x3C;
@ -573,7 +573,7 @@ void func_80AE3834(EnRd* this, PlayState* play) {
if (!(this->unk_312 & 0x80) && !CVarGetInteger(CVAR_CHEAT("NoRedeadFreeze"), 0)) { if (!(this->unk_312 & 0x80) && !CVarGetInteger(CVAR_CHEAT("NoRedeadFreeze"), 0)) {
player->actor.freezeTimer = 60; player->actor.freezeTimer = 60;
func_800AA000(this->actor.xzDistToPlayer, 0xFF, 0x14, 0x96); func_800AA000(this->actor.xzDistToPlayer, 0xFF, 0x14, 0x96);
func_8008EEAC(play, &this->actor); Player_SetAutoLockOnActor(play, &this->actor);
} }
Audio_PlayActorSound2(&this->actor, NA_SE_EN_REDEAD_AIM); Audio_PlayActorSound2(&this->actor, NA_SE_EN_REDEAD_AIM);
func_80AE2B90(this, play); func_80AE2B90(this, play);

View File

@ -86,7 +86,7 @@ s32 func_80AE7494(EnRl* this) {
} }
s32 func_80AE74B4(EnRl* this, PlayState* play, u16 arg2, s32 arg3) { s32 func_80AE74B4(EnRl* this, PlayState* play, u16 arg2, s32 arg3) {
CsCmdActorAction* csCmdActorAction; CsCmdActorCue* csCmdActorAction;
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
csCmdActorAction = play->csCtx.npcActions[arg3]; csCmdActorAction = play->csCtx.npcActions[arg3];
@ -98,7 +98,7 @@ s32 func_80AE74B4(EnRl* this, PlayState* play, u16 arg2, s32 arg3) {
} }
s32 func_80AE74FC(EnRl* this, PlayState* play, u16 arg2, s32 arg3) { s32 func_80AE74FC(EnRl* this, PlayState* play, u16 arg2, s32 arg3) {
CsCmdActorAction* csCmdActorAction; CsCmdActorCue* csCmdActorAction;
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
csCmdActorAction = play->csCtx.npcActions[arg3]; csCmdActorAction = play->csCtx.npcActions[arg3];
@ -143,7 +143,7 @@ void func_80AE7668(EnRl* this, PlayState* play) {
} }
void func_80AE7698(EnRl* this, PlayState* play) { void func_80AE7698(EnRl* this, PlayState* play) {
CsCmdActorAction* csCmdActorAction; CsCmdActorCue* csCmdActorAction;
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
csCmdActorAction = play->csCtx.npcActions[0]; csCmdActorAction = play->csCtx.npcActions[0];

View File

@ -248,9 +248,9 @@ s32 EnRu1_IsCsStateIdle(PlayState* play) {
return false; return false;
} }
CsCmdActorAction* func_80AEAF58(PlayState* play, s32 npcActionIdx) { CsCmdActorCue* func_80AEAF58(PlayState* play, s32 npcActionIdx) {
s32 pad[2]; s32 pad[2];
CsCmdActorAction* ret = NULL; CsCmdActorCue* ret = NULL;
if (!EnRu1_IsCsStateIdle(play)) { if (!EnRu1_IsCsStateIdle(play)) {
ret = play->csCtx.npcActions[npcActionIdx]; ret = play->csCtx.npcActions[npcActionIdx];
@ -259,7 +259,7 @@ CsCmdActorAction* func_80AEAF58(PlayState* play, s32 npcActionIdx) {
} }
s32 func_80AEAFA0(PlayState* play, u16 action, s32 npcActionIdx) { s32 func_80AEAFA0(PlayState* play, u16 action, s32 npcActionIdx) {
CsCmdActorAction* csCmdNPCAction = func_80AEAF58(play, npcActionIdx); CsCmdActorCue* csCmdNPCAction = func_80AEAF58(play, npcActionIdx);
if ((csCmdNPCAction != NULL) && (csCmdNPCAction->action == action)) { if ((csCmdNPCAction != NULL) && (csCmdNPCAction->action == action)) {
return true; return true;
@ -268,7 +268,7 @@ s32 func_80AEAFA0(PlayState* play, u16 action, s32 npcActionIdx) {
} }
s32 func_80AEAFE0(PlayState* play, u16 action, s32 npcActionIdx) { s32 func_80AEAFE0(PlayState* play, u16 action, s32 npcActionIdx) {
CsCmdActorAction* csCmdNPCAction = func_80AEAF58(play, npcActionIdx); CsCmdActorCue* csCmdNPCAction = func_80AEAF58(play, npcActionIdx);
if ((csCmdNPCAction != NULL) && (csCmdNPCAction->action != action)) { if ((csCmdNPCAction != NULL) && (csCmdNPCAction->action != action)) {
return true; return true;
@ -412,7 +412,7 @@ void func_80AEB3DC(EnRu1* this, PlayState* play) {
EnRu1_SetMouthIndex(this, 0); EnRu1_SetMouthIndex(this, 0);
} }
CsCmdActorAction* func_80AEB438(PlayState* play) { CsCmdActorCue* func_80AEB438(PlayState* play) {
return func_80AEAF58(play, 3); return func_80AEAF58(play, 3);
} }
@ -482,7 +482,7 @@ void func_80AEB7D0(EnRu1* this) {
this->skelAnime.moveFlags &= ~0x3; this->skelAnime.moveFlags &= ~0x3;
} }
f32 func_80AEB7E0(CsCmdActorAction* csCmdNPCAction, PlayState* play) { f32 func_80AEB7E0(CsCmdActorCue* csCmdNPCAction, PlayState* play) {
s32 csCtxFrames = play->csCtx.frames; s32 csCtxFrames = play->csCtx.frames;
if ((csCtxFrames < csCmdNPCAction->endFrame) && (csCmdNPCAction->endFrame - csCmdNPCAction->startFrame > 0)) { if ((csCtxFrames < csCmdNPCAction->endFrame) && (csCmdNPCAction->endFrame - csCmdNPCAction->startFrame > 0)) {
@ -500,7 +500,7 @@ f32 func_80AEB87C(f32 arg0, s32 arg1, s32 arg2) {
} }
void func_80AEB89C(EnRu1* this, PlayState* play) { void func_80AEB89C(EnRu1* this, PlayState* play) {
CsCmdActorAction* npcAction = func_80AEB438(play); CsCmdActorCue* npcAction = func_80AEB438(play);
s16 npcActionRotY; s16 npcActionRotY;
if (npcAction != NULL) { if (npcAction != NULL) {
@ -528,7 +528,7 @@ void func_80AEB954(EnRu1* this, PlayState* play) {
void func_80AEB974(EnRu1* this, PlayState* play) { void func_80AEB974(EnRu1* this, PlayState* play) {
Vec3f* thisPos; Vec3f* thisPos;
f32 sp30; f32 sp30;
CsCmdActorAction* csCmdNPCAction = func_80AEB438(play); CsCmdActorCue* csCmdNPCAction = func_80AEB438(play);
s32 pad; s32 pad;
if (csCmdNPCAction != NULL) { if (csCmdNPCAction != NULL) {
@ -549,7 +549,7 @@ void func_80AEBA2C(EnRu1* this, PlayState* play) {
Vec3f* unk_364 = &this->unk_364; Vec3f* unk_364 = &this->unk_364;
Vec3f* thisPos; Vec3f* thisPos;
f32 temp_ret_2; f32 temp_ret_2;
CsCmdActorAction* csCmdNPCAction = func_80AEB438(play); CsCmdActorCue* csCmdNPCAction = func_80AEB438(play);
s32 pad2; s32 pad2;
if (csCmdNPCAction != NULL) { if (csCmdNPCAction != NULL) {
@ -675,7 +675,7 @@ void func_80AEBF60(EnRu1* this, PlayState* play) {
} }
void func_80AEBFD8(EnRu1* this, PlayState* play) { void func_80AEBFD8(EnRu1* this, PlayState* play) {
CsCmdActorAction* csCmdNPCAction = func_80AEB438(play); CsCmdActorCue* csCmdNPCAction = func_80AEB438(play);
f32 frameCount; f32 frameCount;
u16 csCtxFrames; u16 csCtxFrames;
u16 endFrame; u16 endFrame;
@ -878,7 +878,7 @@ void func_80AEC780(EnRu1* this, PlayState* play) {
} }
void func_80AEC81C(EnRu1* this, PlayState* play) { void func_80AEC81C(EnRu1* this, PlayState* play) {
CsCmdActorAction* csCmdNPCAction; CsCmdActorCue* csCmdNPCAction;
s16 newRotY; s16 newRotY;
if (func_80AEAFE0(play, 1, 3)) { if (func_80AEAFE0(play, 1, 3)) {
@ -1653,7 +1653,7 @@ void func_80AEE7C4(EnRu1* this, PlayState* play) {
} }
player = GET_PLAYER(play); player = GET_PLAYER(play);
if (player->stateFlags2 & PLAYER_STATE2_IDLING) { if (player->stateFlags2 & PLAYER_STATE2_IDLE_FIDGET) {
this->unk_370 += 1.0f; this->unk_370 += 1.0f;
if (this->action != 32) { if (this->action != 32) {
if (*unk_370 > 30.0f) { if (*unk_370 > 30.0f) {
@ -1953,8 +1953,8 @@ void func_80AEF5B8(EnRu1* this) {
void func_80AEF624(EnRu1* this, PlayState* play) { void func_80AEF624(EnRu1* this, PlayState* play) {
f32 frameCount; f32 frameCount;
CsCmdActorAction* csCmdNPCAction; CsCmdActorCue* csCmdNPCAction;
CsCmdActorAction* csCmdNPCAction2; CsCmdActorCue* csCmdNPCAction2;
s16 newRotTmp; s16 newRotTmp;
if (func_80AEAFE0(play, 1, 3)) { if (func_80AEAFE0(play, 1, 3)) {

View File

@ -176,7 +176,7 @@ s32 EnRu2_UpdateSkelAnime(EnRu2* this) {
return SkelAnime_Update(&this->skelAnime); return SkelAnime_Update(&this->skelAnime);
} }
CsCmdActorAction* func_80AF27AC(PlayState* play, s32 npcActionIdx) { CsCmdActorCue* func_80AF27AC(PlayState* play, s32 npcActionIdx) {
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
return play->csCtx.npcActions[npcActionIdx]; return play->csCtx.npcActions[npcActionIdx];
} }
@ -184,7 +184,7 @@ CsCmdActorAction* func_80AF27AC(PlayState* play, s32 npcActionIdx) {
} }
s32 func_80AF27D0(EnRu2* this, PlayState* play, u16 arg2, s32 npcActionIdx) { s32 func_80AF27D0(EnRu2* this, PlayState* play, u16 arg2, s32 npcActionIdx) {
CsCmdActorAction* csCmdActorAction = func_80AF27AC(play, npcActionIdx); CsCmdActorCue* csCmdActorAction = func_80AF27AC(play, npcActionIdx);
if ((csCmdActorAction != NULL) && (csCmdActorAction->action == arg2)) { if ((csCmdActorAction != NULL) && (csCmdActorAction->action == arg2)) {
return true; return true;
@ -193,7 +193,7 @@ s32 func_80AF27D0(EnRu2* this, PlayState* play, u16 arg2, s32 npcActionIdx) {
} }
s32 func_80AF281C(EnRu2* this, PlayState* play, u16 arg2, s32 npcActionIdx) { s32 func_80AF281C(EnRu2* this, PlayState* play, u16 arg2, s32 npcActionIdx) {
CsCmdActorAction* csCmdNPCAction = func_80AF27AC(play, npcActionIdx); CsCmdActorCue* csCmdNPCAction = func_80AF27AC(play, npcActionIdx);
if ((csCmdNPCAction != NULL) && (csCmdNPCAction->action != arg2)) { if ((csCmdNPCAction != NULL) && (csCmdNPCAction->action != arg2)) {
return true; return true;
@ -202,7 +202,7 @@ s32 func_80AF281C(EnRu2* this, PlayState* play, u16 arg2, s32 npcActionIdx) {
} }
void func_80AF2868(EnRu2* this, PlayState* play, u32 npcActionIdx) { void func_80AF2868(EnRu2* this, PlayState* play, u32 npcActionIdx) {
CsCmdActorAction* csCmdNPCAction = func_80AF27AC(play, npcActionIdx); CsCmdActorCue* csCmdNPCAction = func_80AF27AC(play, npcActionIdx);
s16 newRotY; s16 newRotY;
Actor* thisx = &this->actor; Actor* thisx = &this->actor;
@ -287,7 +287,7 @@ void func_80AF2AB4(EnRu2* this, PlayState* play) {
void func_80AF2B44(EnRu2* this, PlayState* play) { void func_80AF2B44(EnRu2* this, PlayState* play) {
CutsceneContext* csCtx = &play->csCtx; CutsceneContext* csCtx = &play->csCtx;
CsCmdActorAction* csCmdNPCAction; CsCmdActorCue* csCmdNPCAction;
if (csCtx->state != CS_STATE_IDLE) { if (csCtx->state != CS_STATE_IDLE) {
csCmdNPCAction = csCtx->npcActions[3]; csCmdNPCAction = csCtx->npcActions[3];
@ -308,7 +308,7 @@ void func_80AF2B94(EnRu2* this) {
void func_80AF2BC0(EnRu2* this, PlayState* play) { void func_80AF2BC0(EnRu2* this, PlayState* play) {
AnimationHeader* animation = &gAdultRutoRaisingArmsUpAnim; AnimationHeader* animation = &gAdultRutoRaisingArmsUpAnim;
CsCmdActorAction* csCmdNPCAction; CsCmdActorCue* csCmdNPCAction;
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
csCmdNPCAction = play->csCtx.npcActions[3]; csCmdNPCAction = play->csCtx.npcActions[3];
@ -327,7 +327,7 @@ void func_80AF2C54(EnRu2* this, s32 arg1) {
} }
void func_80AF2C68(EnRu2* this, PlayState* play) { void func_80AF2C68(EnRu2* this, PlayState* play) {
CsCmdActorAction* csCmdNPCAction; CsCmdActorCue* csCmdNPCAction;
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
csCmdNPCAction = play->csCtx.npcActions[6]; csCmdNPCAction = play->csCtx.npcActions[6];
@ -544,7 +544,7 @@ void func_80AF3530(EnRu2* this, s32 arg1) {
} }
void func_80AF3564(EnRu2* this, PlayState* play) { void func_80AF3564(EnRu2* this, PlayState* play) {
CsCmdActorAction* csCmdNPCAction = func_80AF27AC(play, 3); CsCmdActorCue* csCmdNPCAction = func_80AF27AC(play, 3);
s32 action; s32 action;
s32 unk_2BC; s32 unk_2BC;

View File

@ -463,13 +463,13 @@ void func_80AF609C(EnSa* this) {
} }
} }
void func_80AF6130(CsCmdActorAction* csAction, Vec3f* dst) { void func_80AF6130(CsCmdActorCue* csAction, Vec3f* dst) {
dst->x = csAction->startPos.x; dst->x = csAction->startPos.x;
dst->y = csAction->startPos.y; dst->y = csAction->startPos.y;
dst->z = csAction->startPos.z; dst->z = csAction->startPos.z;
} }
void func_80AF6170(CsCmdActorAction* csAction, Vec3f* dst) { void func_80AF6170(CsCmdActorCue* csAction, Vec3f* dst) {
dst->x = csAction->endPos.x; dst->x = csAction->endPos.x;
dst->y = csAction->endPos.y; dst->y = csAction->endPos.y;
dst->z = csAction->endPos.z; dst->z = csAction->endPos.z;
@ -639,7 +639,7 @@ void func_80AF68E4(EnSa* this, PlayState* play) {
Vec3f startPos; Vec3f startPos;
Vec3f endPos; Vec3f endPos;
Vec3f D_80AF7448 = { 0.0f, 0.0f, 0.0f }; Vec3f D_80AF7448 = { 0.0f, 0.0f, 0.0f };
CsCmdActorAction* csAction; CsCmdActorCue* csAction;
f32 temp_f0; f32 temp_f0;
f32 gravity; f32 gravity;

View File

@ -580,7 +580,7 @@ s32 func_80B150AC(EnTa* this, PlayState* play, s32 idx) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
Actor* interactRangeActor; Actor* interactRangeActor;
if (player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) { if (player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
interactRangeActor = player->interactRangeActor; interactRangeActor = player->interactRangeActor;
if (interactRangeActor != NULL && interactRangeActor->id == ACTOR_EN_NIW && if (interactRangeActor != NULL && interactRangeActor->id == ACTOR_EN_NIW &&
interactRangeActor == &this->superCuccos[idx]->actor) { interactRangeActor == &this->superCuccos[idx]->actor) {
@ -614,7 +614,7 @@ void func_80B15100(EnTa* this, PlayState* play) {
if (player->heldActor == &this->superCuccos[unk_2CA]->actor) { if (player->heldActor == &this->superCuccos[unk_2CA]->actor) {
player->heldActor = NULL; player->heldActor = NULL;
} }
player->stateFlags1 &= ~PLAYER_STATE1_ITEM_OVER_HEAD; player->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
this->superCuccos[unk_2CA] = NULL; this->superCuccos[unk_2CA] = NULL;
} }
this->unk_2E0 |= 1; this->unk_2E0 |= 1;

View File

@ -407,7 +407,7 @@ void EnTest_ChooseAction(EnTest* this, PlayState* play) {
} else { } else {
if (this->actor.xzDistToPlayer < 110.0f) { if (this->actor.xzDistToPlayer < 110.0f) {
if (Rand_ZeroOne() > 0.2f) { if (Rand_ZeroOne() > 0.2f) {
if (player->stateFlags1 & PLAYER_STATE1_ENEMY_TARGET) { if (player->stateFlags1 & PLAYER_STATE1_HOSTILE_LOCK_ON) {
if (this->actor.isTargeted) { if (this->actor.isTargeted) {
EnTest_SetupSlashDown(this); EnTest_SetupSlashDown(this);
} else { } else {
@ -693,7 +693,7 @@ void EnTest_WalkAndBlock(EnTest* this, PlayState* play) {
if (this->actor.xzDistToPlayer < 110.0f) { if (this->actor.xzDistToPlayer < 110.0f) {
if (Rand_ZeroOne() > 0.2f) { if (Rand_ZeroOne() > 0.2f) {
if (player->stateFlags1 & PLAYER_STATE1_ENEMY_TARGET) { if (player->stateFlags1 & PLAYER_STATE1_HOSTILE_LOCK_ON) {
if (this->actor.isTargeted) { if (this->actor.isTargeted) {
EnTest_SetupSlashDown(this); EnTest_SetupSlashDown(this);
} else { } else {
@ -978,7 +978,7 @@ void EnTest_SlashDownEnd(EnTest* this, PlayState* play) {
if ((ABS(yawDiff) > 0x3E80) && (this->actor.params != STALFOS_TYPE_CEILING)) { if ((ABS(yawDiff) > 0x3E80) && (this->actor.params != STALFOS_TYPE_CEILING)) {
this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->actor.world.rot.y = this->actor.yawTowardsPlayer;
EnTest_SetupJumpBack(this); EnTest_SetupJumpBack(this);
} else if (player->stateFlags1 & PLAYER_STATE1_ENEMY_TARGET) { } else if (player->stateFlags1 & PLAYER_STATE1_HOSTILE_LOCK_ON) {
if (this->actor.isTargeted) { if (this->actor.isTargeted) {
EnTest_SetupSlashDown(this); EnTest_SetupSlashDown(this);
} else if ((play->gameplayFrames % 2) != 0) { } else if ((play->gameplayFrames % 2) != 0) {

View File

@ -136,7 +136,7 @@ void EnTorch2_Init(Actor* thisx, PlayState* play2) {
sInput.cur.stick_x = sInput.cur.stick_y = 0; sInput.cur.stick_x = sInput.cur.stick_y = 0;
this->currentShield = PLAYER_SHIELD_HYLIAN; this->currentShield = PLAYER_SHIELD_HYLIAN;
this->heldItemAction = this->heldItemId = PLAYER_IA_SWORD_MASTER; this->heldItemAction = this->heldItemId = PLAYER_IA_SWORD_MASTER;
Player_SetModelGroup(this, PLAYER_MODELGROUP_SWORD); Player_SetModelGroup(this, PLAYER_MODELGROUP_SWORD_AND_SHIELD);
play->playerInit(this, play, &gDarkLinkSkel); play->playerInit(this, play, &gDarkLinkSkel);
this->actor.naviEnemyId = 0x26; this->actor.naviEnemyId = 0x26;
this->cylinder.base.acFlags = AC_ON | AC_TYPE_PLAYER; this->cylinder.base.acFlags = AC_ON | AC_TYPE_PLAYER;
@ -604,7 +604,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
if ((this->actor.colChkInfo.health == 0) && sDeathFlag) { if ((this->actor.colChkInfo.health == 0) && sDeathFlag) {
this->csAction = 0x18; this->csAction = 0x18;
this->csActor = &player->actor; this->csActor = &player->actor;
this->doorBgCamIndex = 1; this->cv.haltActorsDuringCsAction = true;
sDeathFlag = false; sDeathFlag = false;
} }
if ((this->invincibilityTimer == 0) && (this->actor.colChkInfo.health != 0) && if ((this->invincibilityTimer == 0) && (this->actor.colChkInfo.health != 0) &&
@ -614,11 +614,11 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
if (!Actor_ApplyDamage(&this->actor)) { if (!Actor_ApplyDamage(&this->actor)) {
func_800F5B58(); func_800F5B58();
this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE); this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE);
this->unk_8A1 = 2; this->knockbackType = 2;
this->unk_8A4 = 6.0f; this->knockbackSpeed = 6.0f;
this->unk_8A8 = 6.0f; this->knockbackYVelocity = 6.0f;
this->unk_8A0 = this->actor.colChkInfo.damage; this->knockbackDamage = this->actor.colChkInfo.damage;
this->unk_8A2 = this->actor.yawTowardsPlayer + 0x8000; this->knockbackRot = this->actor.yawTowardsPlayer + 0x8000;
sDeathFlag++; sDeathFlag++;
sActionState = ENTORCH2_DEATH; sActionState = ENTORCH2_DEATH;
Enemy_StartFinishingBlow(play, &this->actor); Enemy_StartFinishingBlow(play, &this->actor);
@ -634,11 +634,11 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
} }
} else { } else {
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
this->unk_8A0 = this->actor.colChkInfo.damage; this->knockbackDamage = this->actor.colChkInfo.damage;
this->unk_8A1 = 1; this->knockbackType = 1;
this->unk_8A8 = 6.0f; this->knockbackYVelocity = 6.0f;
this->unk_8A4 = 8.0f; this->knockbackSpeed = 8.0f;
this->unk_8A2 = this->actor.yawTowardsPlayer + 0x8000; this->knockbackRot = this->actor.yawTowardsPlayer + 0x8000;
Actor_SetDropFlag(&this->actor, &this->cylinder.info, 1); Actor_SetDropFlag(&this->actor, &this->cylinder.info, 1);
this->stateFlags3 &= ~PLAYER_STATE3_PAUSE_ACTION_FUNC; this->stateFlags3 &= ~PLAYER_STATE3_PAUSE_ACTION_FUNC;
this->stateFlags3 |= PLAYER_STATE3_IGNORE_CEILING_FLOOR_WATER; this->stateFlags3 |= PLAYER_STATE3_IGNORE_CEILING_FLOOR_WATER;
@ -651,7 +651,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
} }
} }
this->actor.colChkInfo.damage = 0; this->actor.colChkInfo.damage = 0;
this->unk_8A0 = 0; this->knockbackDamage = 0;
} }
// Handles being frozen by a deku nut // Handles being frozen by a deku nut

View File

@ -122,8 +122,8 @@ s32 EnXc_AnimIsFinished(EnXc* this) {
return SkelAnime_Update(&this->skelAnime); return SkelAnime_Update(&this->skelAnime);
} }
CsCmdActorAction* EnXc_GetCsCmd(PlayState* play, s32 npcActionIdx) { CsCmdActorCue* EnXc_GetCsCmd(PlayState* play, s32 npcActionIdx) {
CsCmdActorAction* action = NULL; CsCmdActorCue* action = NULL;
if (play->csCtx.state != 0) { if (play->csCtx.state != 0) {
action = play->csCtx.npcActions[npcActionIdx]; action = play->csCtx.npcActions[npcActionIdx];
@ -132,7 +132,7 @@ CsCmdActorAction* EnXc_GetCsCmd(PlayState* play, s32 npcActionIdx) {
} }
s32 EnXc_CompareCsAction(EnXc* this, PlayState* play, u16 action, s32 npcActionIdx) { s32 EnXc_CompareCsAction(EnXc* this, PlayState* play, u16 action, s32 npcActionIdx) {
CsCmdActorAction* csCmdActorAction = EnXc_GetCsCmd(play, npcActionIdx); CsCmdActorCue* csCmdActorAction = EnXc_GetCsCmd(play, npcActionIdx);
if (csCmdActorAction != NULL && csCmdActorAction->action == action) { if (csCmdActorAction != NULL && csCmdActorAction->action == action) {
return true; return true;
@ -141,7 +141,7 @@ s32 EnXc_CompareCsAction(EnXc* this, PlayState* play, u16 action, s32 npcActionI
} }
s32 EnXc_CsActionsAreNotEqual(EnXc* this, PlayState* play, u16 action, s32 npcActionIdx) { s32 EnXc_CsActionsAreNotEqual(EnXc* this, PlayState* play, u16 action, s32 npcActionIdx) {
CsCmdActorAction* csCmdNPCAction = EnXc_GetCsCmd(play, npcActionIdx); CsCmdActorCue* csCmdNPCAction = EnXc_GetCsCmd(play, npcActionIdx);
if (csCmdNPCAction && csCmdNPCAction->action != action) { if (csCmdNPCAction && csCmdNPCAction->action != action) {
return true; return true;
@ -150,7 +150,7 @@ s32 EnXc_CsActionsAreNotEqual(EnXc* this, PlayState* play, u16 action, s32 npcAc
} }
void func_80B3C588(EnXc* this, PlayState* play, u32 npcActionIdx) { void func_80B3C588(EnXc* this, PlayState* play, u32 npcActionIdx) {
CsCmdActorAction* csCmdNPCAction = EnXc_GetCsCmd(play, npcActionIdx); CsCmdActorCue* csCmdNPCAction = EnXc_GetCsCmd(play, npcActionIdx);
Actor* thisx = &this->actor; Actor* thisx = &this->actor;
if (csCmdNPCAction != NULL) { if (csCmdNPCAction != NULL) {
@ -164,7 +164,7 @@ void func_80B3C588(EnXc* this, PlayState* play, u32 npcActionIdx) {
} }
void func_80B3C620(EnXc* this, PlayState* play, s32 npcActionIdx) { void func_80B3C620(EnXc* this, PlayState* play, s32 npcActionIdx) {
CsCmdActorAction* npcAction = EnXc_GetCsCmd(play, npcActionIdx); CsCmdActorCue* npcAction = EnXc_GetCsCmd(play, npcActionIdx);
Vec3f* xcPos = &this->actor.world.pos; Vec3f* xcPos = &this->actor.world.pos;
f32 startX; f32 startX;
f32 startY; f32 startY;
@ -528,7 +528,7 @@ s32 sEnXcFlameSpawned = false;
void EnXc_SpawnFlame(EnXc* this, PlayState* play) { void EnXc_SpawnFlame(EnXc* this, PlayState* play) {
if (!sEnXcFlameSpawned) { if (!sEnXcFlameSpawned) {
CsCmdActorAction* npcAction = EnXc_GetCsCmd(play, 0); CsCmdActorCue* npcAction = EnXc_GetCsCmd(play, 0);
f32 xPos = npcAction->startPos.x; f32 xPos = npcAction->startPos.x;
f32 yPos = npcAction->startPos.y; f32 yPos = npcAction->startPos.y;
f32 zPos = npcAction->startPos.z; f32 zPos = npcAction->startPos.z;
@ -540,7 +540,7 @@ void EnXc_SpawnFlame(EnXc* this, PlayState* play) {
void EnXc_SetupFlamePos(EnXc* this, PlayState* play) { void EnXc_SetupFlamePos(EnXc* this, PlayState* play) {
Vec3f* attachedPos; Vec3f* attachedPos;
CsCmdActorAction* npcAction = EnXc_GetCsCmd(play, 0); CsCmdActorCue* npcAction = EnXc_GetCsCmd(play, 0);
if (this->flameActor != NULL) { if (this->flameActor != NULL) {
attachedPos = &this->flameActor->world.pos; attachedPos = &this->flameActor->world.pos;
@ -565,7 +565,7 @@ void EnXc_InitFlame(EnXc* this, PlayState* play) {
s16 sceneNum = play->sceneNum; s16 sceneNum = play->sceneNum;
if (sceneNum == SCENE_DEATH_MOUNTAIN_CRATER) { if (sceneNum == SCENE_DEATH_MOUNTAIN_CRATER) {
CsCmdActorAction* npcAction = EnXc_GetCsCmd(play, 0); CsCmdActorCue* npcAction = EnXc_GetCsCmd(play, 0);
if (npcAction != NULL) { if (npcAction != NULL) {
s32 action = npcAction->action; s32 action = npcAction->action;
@ -588,7 +588,7 @@ void EnXc_InitFlame(EnXc* this, PlayState* play) {
void func_80B3D48C(EnXc* this, PlayState* play) { void func_80B3D48C(EnXc* this, PlayState* play) {
CutsceneContext* csCtx = &play->csCtx; CutsceneContext* csCtx = &play->csCtx;
CsCmdActorAction* linkAction = csCtx->linkAction; CsCmdActorCue* linkAction = csCtx->linkAction;
s16 yaw; s16 yaw;
if (linkAction != NULL) { if (linkAction != NULL) {
@ -603,7 +603,7 @@ void func_80B3D48C(EnXc* this, PlayState* play) {
AnimationHeader* EnXc_GetCurrentHarpAnim(PlayState* play, s32 index) { AnimationHeader* EnXc_GetCurrentHarpAnim(PlayState* play, s32 index) {
AnimationHeader* animation = &gSheikPlayingHarp5Anim; AnimationHeader* animation = &gSheikPlayingHarp5Anim;
CsCmdActorAction* npcAction = EnXc_GetCsCmd(play, index); CsCmdActorCue* npcAction = EnXc_GetCsCmd(play, index);
if (npcAction != NULL) { if (npcAction != NULL) {
u16 action = npcAction->action; u16 action = npcAction->action;
@ -677,7 +677,7 @@ void EnXc_SetupFallFromSkyAction(EnXc* this, PlayState* play) {
CutsceneContext* csCtx = &play->csCtx; CutsceneContext* csCtx = &play->csCtx;
if (csCtx->state != 0) { if (csCtx->state != 0) {
CsCmdActorAction* npcAction = csCtx->npcActions[4]; CsCmdActorCue* npcAction = csCtx->npcActions[4];
if (npcAction && npcAction->action == 2) { if (npcAction && npcAction->action == 2) {
s32 pad; s32 pad;
@ -752,7 +752,7 @@ void EnXc_SetupStoppedAction(EnXc* this) {
} }
void func_80B3DAF0(EnXc* this, PlayState* play) { void func_80B3DAF0(EnXc* this, PlayState* play) {
CsCmdActorAction* npcAction = EnXc_GetCsCmd(play, 4); CsCmdActorCue* npcAction = EnXc_GetCsCmd(play, 4);
u16 action; u16 action;
if (npcAction && if (npcAction &&
@ -799,7 +799,7 @@ void func_80B3DCA8(EnXc* this, PlayState* play) {
f32 frameCount; f32 frameCount;
if (play->csCtx.state != 0) { if (play->csCtx.state != 0) {
CsCmdActorAction* npcAction = play->csCtx.npcActions[4]; CsCmdActorCue* npcAction = play->csCtx.npcActions[4];
if (npcAction != NULL && npcAction->action == 8) { if (npcAction != NULL && npcAction->action == 8) {
frameCount = Animation_GetLastFrame(&gSheikInitialHarpAnim); frameCount = Animation_GetLastFrame(&gSheikInitialHarpAnim);
@ -848,7 +848,7 @@ void func_80B3DE78(EnXc* this, s32 animFinished) {
void EnXc_SetupReverseAccel(EnXc* this, PlayState* play) { void EnXc_SetupReverseAccel(EnXc* this, PlayState* play) {
if (play->csCtx.state != 0) { if (play->csCtx.state != 0) {
CsCmdActorAction* npcAction = play->csCtx.npcActions[4]; CsCmdActorCue* npcAction = play->csCtx.npcActions[4];
if (npcAction != NULL && npcAction->action == 4) { if (npcAction != NULL && npcAction->action == 4) {
Animation_Change(&this->skelAnime, &gSheikWalkingAnim, -1.0f, Animation_GetLastFrame(&gSheikWalkingAnim), Animation_Change(&this->skelAnime, &gSheikWalkingAnim, -1.0f, Animation_GetLastFrame(&gSheikWalkingAnim),
@ -900,7 +900,7 @@ void func_80B3E164(EnXc* this, PlayState* play) {
void EnXc_SetupDisappear(EnXc* this, PlayState* play) { void EnXc_SetupDisappear(EnXc* this, PlayState* play) {
if (play->csCtx.state != 0) { if (play->csCtx.state != 0) {
CsCmdActorAction* npcAction = play->csCtx.npcActions[4]; CsCmdActorCue* npcAction = play->csCtx.npcActions[4];
if (npcAction != NULL && npcAction->action == 9) { if (npcAction != NULL && npcAction->action == 9) {
s16 sceneNum = play->sceneNum; s16 sceneNum = play->sceneNum;
@ -1164,7 +1164,7 @@ void func_80B3EC0C(EnXc* this, PlayState* play) {
CutsceneContext* csCtx = &play->csCtx; CutsceneContext* csCtx = &play->csCtx;
if (csCtx->state != 0) { if (csCtx->state != 0) {
CsCmdActorAction* npcAction = csCtx->npcActions[4]; CsCmdActorCue* npcAction = csCtx->npcActions[4];
if ((npcAction != NULL) && (npcAction->action != 1)) { if ((npcAction != NULL) && (npcAction->action != 1)) {
PosRot* posRot = &this->actor.world; PosRot* posRot = &this->actor.world;
@ -1187,7 +1187,7 @@ void func_80B3EC90(EnXc* this, PlayState* play) {
CutsceneContext* csCtx = &play->csCtx; CutsceneContext* csCtx = &play->csCtx;
if (csCtx->state != 0) { if (csCtx->state != 0) {
CsCmdActorAction* npcAction = csCtx->npcActions[4]; CsCmdActorCue* npcAction = csCtx->npcActions[4];
if (npcAction != NULL && npcAction->action != 6) { if (npcAction != NULL && npcAction->action != 6) {
func_80B3C9EC(this); func_80B3C9EC(this);
@ -1413,7 +1413,7 @@ void EnXc_PlayDiveSFX(Vec3f* src, PlayState* play) {
} }
void EnXc_LakeHyliaDive(PlayState* play) { void EnXc_LakeHyliaDive(PlayState* play) {
CsCmdActorAction* npcAction = npcAction = EnXc_GetCsCmd(play, 0); CsCmdActorCue* npcAction = npcAction = EnXc_GetCsCmd(play, 0);
if (npcAction != NULL) { if (npcAction != NULL) {
Vec3f startPos; Vec3f startPos;
@ -1442,7 +1442,7 @@ void func_80B3F534(PlayState* play) {
s32 D_80B41DAC = 1; s32 D_80B41DAC = 1;
void func_80B3F59C(EnXc* this, PlayState* play) { void func_80B3F59C(EnXc* this, PlayState* play) {
CsCmdActorAction* npcAction = EnXc_GetCsCmd(play, 0); CsCmdActorCue* npcAction = EnXc_GetCsCmd(play, 0);
if (npcAction != NULL) { if (npcAction != NULL) {
s32 action = npcAction->action; s32 action = npcAction->action;
@ -1649,7 +1649,7 @@ void func_80B3FF0C(EnXc* this, PlayState* play) {
CutsceneContext* csCtx = &play->csCtx; CutsceneContext* csCtx = &play->csCtx;
if (csCtx->state != 0) { if (csCtx->state != 0) {
CsCmdActorAction* npcAction = play->csCtx.npcActions[4]; CsCmdActorCue* npcAction = play->csCtx.npcActions[4];
if (npcAction != NULL) { if (npcAction != NULL) {
PosRot* posRot = &this->actor.world; PosRot* posRot = &this->actor.world;
@ -1984,7 +1984,7 @@ void func_80B40E88(EnXc* this) {
} }
s32 EnXc_SetupNocturneState(Actor* thisx, PlayState* play) { s32 EnXc_SetupNocturneState(Actor* thisx, PlayState* play) {
CsCmdActorAction* npcAction = EnXc_GetCsCmd(play, 4); CsCmdActorCue* npcAction = EnXc_GetCsCmd(play, 4);
if (npcAction != NULL) { if (npcAction != NULL) {
s32 action = npcAction->action; s32 action = npcAction->action;

View File

@ -542,7 +542,7 @@ s32 EnZf_CanAttack(PlayState* play, EnZf* this) {
return true; return true;
} }
if (this->actor.params == ENZF_TYPE_DINOLFOS) { if (this->actor.params == ENZF_TYPE_DINOLFOS) {
targetedActor = player->unk_664; targetedActor = player->focusActor;
if (targetedActor == NULL) { if (targetedActor == NULL) {
return false; return false;
} else { } else {
@ -1208,7 +1208,7 @@ void EnZf_Slash(EnZf* this, PlayState* play) {
if (yawDiff > 16000) { if (yawDiff > 16000) {
this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->actor.world.rot.y = this->actor.yawTowardsPlayer;
func_80B483E4(this, play); func_80B483E4(this, play);
} else if (player->stateFlags1 & (PLAYER_STATE1_ENEMY_TARGET | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE)) { } else if (player->stateFlags1 & (PLAYER_STATE1_HOSTILE_LOCK_ON | PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE)) {
if (this->actor.isTargeted) { if (this->actor.isTargeted) {
EnZf_SetupSlash(this); EnZf_SetupSlash(this);
} else { } else {

View File

@ -331,13 +331,13 @@ void func_80B4B240(EnZl1* this, PlayState* play) {
func_80038290(play, &this->actor, &this->unk_200, &this->unk_206, this->actor.focus.pos); func_80038290(play, &this->actor, &this->unk_200, &this->unk_206, this->actor.focus.pos);
} }
void func_80B4B7F4(CsCmdActorAction* npcAction, Vec3f* pos) { void func_80B4B7F4(CsCmdActorCue* npcAction, Vec3f* pos) {
pos->x = npcAction->startPos.x; pos->x = npcAction->startPos.x;
pos->y = npcAction->startPos.y; pos->y = npcAction->startPos.y;
pos->z = npcAction->startPos.z; pos->z = npcAction->startPos.z;
} }
void func_80B4B834(CsCmdActorAction* npcAction, Vec3f* pos) { void func_80B4B834(CsCmdActorCue* npcAction, Vec3f* pos) {
pos->x = npcAction->endPos.x; pos->x = npcAction->endPos.x;
pos->y = npcAction->endPos.y; pos->y = npcAction->endPos.y;
pos->z = npcAction->endPos.z; pos->z = npcAction->endPos.z;
@ -368,7 +368,7 @@ void func_80B4B8B4(EnZl1* this, PlayState* play) {
Vec3f sp8C = { -512.0f, 105.0f, -4.0f }; Vec3f sp8C = { -512.0f, 105.0f, -4.0f };
s32 pad2; s32 pad2;
f32 actionLength; f32 actionLength;
CsCmdActorAction* npcAction; CsCmdActorCue* npcAction;
Vec3f sp74; Vec3f sp74;
Vec3f sp68; Vec3f sp68;
Vec3f velocity = { 0.0f, 0.0f, 0.0f }; Vec3f velocity = { 0.0f, 0.0f, 0.0f };
@ -450,7 +450,7 @@ void func_80B4BC78(EnZl1* this, PlayState* play) {
Vec3f sp70; Vec3f sp70;
Vec3f sp64; Vec3f sp64;
Vec3f velocity = { 0.0f, 0.0f, 0.0f }; Vec3f velocity = { 0.0f, 0.0f, 0.0f };
CsCmdActorAction* npcAction; CsCmdActorCue* npcAction;
s32 pad; s32 pad;
f32 frameCount; f32 frameCount;

View File

@ -212,7 +212,7 @@ s32 EnZl2_UpdateSkelAnime(EnZl2* this) {
return SkelAnime_Update(&this->skelAnime); return SkelAnime_Update(&this->skelAnime);
} }
CsCmdActorAction* EnZl2_GetNpcAction(PlayState* play, s32 idx) { CsCmdActorCue* EnZl2_GetNpcAction(PlayState* play, s32 idx) {
if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.state != CS_STATE_IDLE) {
return play->csCtx.npcActions[idx]; return play->csCtx.npcActions[idx];
} }
@ -220,7 +220,7 @@ CsCmdActorAction* EnZl2_GetNpcAction(PlayState* play, s32 idx) {
} }
void func_80B4EDB8(EnZl2* this, PlayState* play, s32 arg2) { void func_80B4EDB8(EnZl2* this, PlayState* play, s32 arg2) {
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(play, arg2); CsCmdActorCue* npcAction = EnZl2_GetNpcAction(play, arg2);
if (npcAction != NULL) { if (npcAction != NULL) {
this->actor.world.pos.x = npcAction->startPos.x; this->actor.world.pos.x = npcAction->startPos.x;
@ -683,7 +683,7 @@ void func_80B5008C(EnZl2* this) {
} }
void func_80B500E0(EnZl2* this, PlayState* play) { void func_80B500E0(EnZl2* this, PlayState* play) {
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(play, 0); CsCmdActorCue* npcAction = EnZl2_GetNpcAction(play, 0);
Vec3f* thisPos = &this->actor.world.pos; Vec3f* thisPos = &this->actor.world.pos;
f32 startX; f32 startX;
f32 startY; f32 startY;
@ -715,7 +715,7 @@ void func_80B501C4(EnZl2* this, s32 alpha) {
} }
void func_80B501E8(EnZl2* this, PlayState* play) { void func_80B501E8(EnZl2* this, PlayState* play) {
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(play, 0); CsCmdActorCue* npcAction = EnZl2_GetNpcAction(play, 0);
if (npcAction != NULL) { if (npcAction != NULL) {
this->actor.shape.shadowAlpha = this->alpha = this->actor.shape.shadowAlpha = this->alpha =
@ -732,7 +732,7 @@ void func_80B50260(EnZl2* this, PlayState* play) {
} }
void func_80B50278(EnZl2* this, PlayState* play) { void func_80B50278(EnZl2* this, PlayState* play) {
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(play, 0); CsCmdActorCue* npcAction = EnZl2_GetNpcAction(play, 0);
this->actor.world.pos.x = npcAction->startPos.x; this->actor.world.pos.x = npcAction->startPos.x;
this->actor.world.pos.y = npcAction->startPos.y; this->actor.world.pos.y = npcAction->startPos.y;
@ -746,7 +746,7 @@ void func_80B50278(EnZl2* this, PlayState* play) {
void func_80B50304(EnZl2* this, PlayState* play) { void func_80B50304(EnZl2* this, PlayState* play) {
s32 pad[2]; s32 pad[2];
ActorShape* shape = &this->actor.shape; ActorShape* shape = &this->actor.shape;
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(play, 0); CsCmdActorCue* npcAction = EnZl2_GetNpcAction(play, 0);
f32 actionXDelta; f32 actionXDelta;
f32 actionZDelta; f32 actionZDelta;
@ -761,7 +761,7 @@ void func_80B50304(EnZl2* this, PlayState* play) {
} }
void func_80B503DC(EnZl2* this, PlayState* play) { void func_80B503DC(EnZl2* this, PlayState* play) {
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(play, 0); CsCmdActorCue* npcAction = EnZl2_GetNpcAction(play, 0);
if ((npcAction != NULL) && (play->csCtx.frames >= npcAction->endFrame)) { if ((npcAction != NULL) && (play->csCtx.frames >= npcAction->endFrame)) {
this->action = 4; this->action = 4;
@ -906,7 +906,7 @@ void func_80B50980(EnZl2* this, PlayState* play) {
} }
void func_80B509A0(EnZl2* this, PlayState* play) { void func_80B509A0(EnZl2* this, PlayState* play) {
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(play, 0); CsCmdActorCue* npcAction = EnZl2_GetNpcAction(play, 0);
if (npcAction != NULL) { if (npcAction != NULL) {
if (play->csCtx.frames >= npcAction->endFrame) { if (play->csCtx.frames >= npcAction->endFrame) {
@ -918,7 +918,7 @@ void func_80B509A0(EnZl2* this, PlayState* play) {
} }
void func_80B50A04(EnZl2* this, PlayState* play) { void func_80B50A04(EnZl2* this, PlayState* play) {
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(play, 0); CsCmdActorCue* npcAction = EnZl2_GetNpcAction(play, 0);
s32 newAction; s32 newAction;
s32 unk_240; s32 unk_240;
@ -1329,7 +1329,7 @@ void func_80B518C0(EnZl2* this) {
} }
void func_80B51948(EnZl2* this, PlayState* play) { void func_80B51948(EnZl2* this, PlayState* play) {
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(play, 0); CsCmdActorCue* npcAction = EnZl2_GetNpcAction(play, 0);
s32 newAction; s32 newAction;
s32 unk_240; s32 unk_240;
@ -1450,7 +1450,7 @@ void func_80B51D24(EnZl2* this, PlayState* play) {
} }
void func_80B51DA4(EnZl2* this, PlayState* play) { void func_80B51DA4(EnZl2* this, PlayState* play) {
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(play, 0); CsCmdActorCue* npcAction = EnZl2_GetNpcAction(play, 0);
Vec3f* thisPos = &this->actor.world.pos; Vec3f* thisPos = &this->actor.world.pos;
f32 startX; f32 startX;
f32 startY; f32 startY;
@ -1486,7 +1486,7 @@ void func_80B51EA8(EnZl2* this) {
void func_80B51EBC(EnZl2* this, PlayState* play) { void func_80B51EBC(EnZl2* this, PlayState* play) {
ActorShape* shape = &this->actor.shape; ActorShape* shape = &this->actor.shape;
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(play, 0); CsCmdActorCue* npcAction = EnZl2_GetNpcAction(play, 0);
s32 pad[2]; s32 pad[2];
this->actor.world.rot.y = shape->rot.y = npcAction->rot.y; this->actor.world.rot.y = shape->rot.y = npcAction->rot.y;
@ -1497,7 +1497,7 @@ void func_80B51EBC(EnZl2* this, PlayState* play) {
} }
void func_80B51F38(EnZl2* this, PlayState* play) { void func_80B51F38(EnZl2* this, PlayState* play) {
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(play, 0); CsCmdActorCue* npcAction = EnZl2_GetNpcAction(play, 0);
if (npcAction != NULL) { if (npcAction != NULL) {
if (play->csCtx.frames - 8 >= npcAction->endFrame) { if (play->csCtx.frames - 8 >= npcAction->endFrame) {
@ -1508,7 +1508,7 @@ void func_80B51F38(EnZl2* this, PlayState* play) {
} }
void func_80B51FA8(EnZl2* this, PlayState* play) { void func_80B51FA8(EnZl2* this, PlayState* play) {
CsCmdActorAction* npcAction = EnZl2_GetNpcAction(play, 0); CsCmdActorCue* npcAction = EnZl2_GetNpcAction(play, 0);
s32 action; s32 action;
s32 unk_240; s32 unk_240;

View File

@ -314,7 +314,7 @@ void func_80B5BB78(EnZl4* this, PlayState* play) {
Npc_TrackPoint(&this->actor, &this->interactInfo, 2, NPC_TRACKING_HEAD_AND_TORSO); Npc_TrackPoint(&this->actor, &this->interactInfo, 2, NPC_TRACKING_HEAD_AND_TORSO);
} }
void EnZl4_GetActionStartPos(CsCmdActorAction* action, Vec3f* vec) { void EnZl4_GetActionStartPos(CsCmdActorCue* action, Vec3f* vec) {
vec->x = action->startPos.x; vec->x = action->startPos.x;
vec->y = action->startPos.y; vec->y = action->startPos.y;
vec->z = action->startPos.z; vec->z = action->startPos.z;
@ -1213,7 +1213,7 @@ void EnZl4_Idle(EnZl4* this, PlayState* play) {
void EnZl4_TheEnd(EnZl4* this, PlayState* play) { void EnZl4_TheEnd(EnZl4* this, PlayState* play) {
s32 animIndex[] = { ZL4_ANIM_0, ZL4_ANIM_0, ZL4_ANIM_0, ZL4_ANIM_0, ZL4_ANIM_0, s32 animIndex[] = { ZL4_ANIM_0, ZL4_ANIM_0, ZL4_ANIM_0, ZL4_ANIM_0, ZL4_ANIM_0,
ZL4_ANIM_0, ZL4_ANIM_0, ZL4_ANIM_26, ZL4_ANIM_21, ZL4_ANIM_3 }; ZL4_ANIM_0, ZL4_ANIM_0, ZL4_ANIM_26, ZL4_ANIM_21, ZL4_ANIM_3 };
CsCmdActorAction* npcAction; CsCmdActorCue* npcAction;
Vec3f pos; Vec3f pos;
if (SkelAnime_Update(&this->skelAnime) && (this->skelAnime.animation == &gChildZeldaAnim_010DF8)) { if (SkelAnime_Update(&this->skelAnime) && (this->skelAnime.animation == &gChildZeldaAnim_010DF8)) {

View File

@ -73,20 +73,20 @@ void ObjDekujr_Init(Actor* thisx, PlayState* play) {
void ObjDekujr_Destroy(Actor* thisx, PlayState* play) { void ObjDekujr_Destroy(Actor* thisx, PlayState* play) {
} }
void ObjDekujr_SetInitialPos(CsCmdActorAction* npcAction, Vec3f* initPos) { void ObjDekujr_SetInitialPos(CsCmdActorCue* npcAction, Vec3f* initPos) {
initPos->x = npcAction->startPos.x; initPos->x = npcAction->startPos.x;
initPos->y = npcAction->startPos.y; initPos->y = npcAction->startPos.y;
initPos->z = npcAction->startPos.z; initPos->z = npcAction->startPos.z;
} }
void ObjDekujr_SetFinalPos(CsCmdActorAction* npcAction, Vec3f* finalPos) { void ObjDekujr_SetFinalPos(CsCmdActorCue* npcAction, Vec3f* finalPos) {
finalPos->x = npcAction->endPos.x; finalPos->x = npcAction->endPos.x;
finalPos->y = npcAction->endPos.y; finalPos->y = npcAction->endPos.y;
finalPos->z = npcAction->endPos.z; finalPos->z = npcAction->endPos.z;
} }
void ObjDekujr_ComeUp(ObjDekujr* this, PlayState* play) { void ObjDekujr_ComeUp(ObjDekujr* this, PlayState* play) {
CsCmdActorAction* csCmdNPCAction; CsCmdActorCue* csCmdNPCAction;
Vec3f initPos; Vec3f initPos;
Vec3f finalPos; Vec3f finalPos;
Vec3f velocity = { 0.0f, 0.0f, 0.0f }; Vec3f velocity = { 0.0f, 0.0f, 0.0f };

File diff suppressed because it is too large Load Diff

View File

@ -4598,7 +4598,7 @@ void KaleidoScope_Update(PlayState* play)
osSyncPrintf("i=%d LAST_TIME_TYPE=%d\n", i, gSaveContext.unk_13EE); osSyncPrintf("i=%d LAST_TIME_TYPE=%d\n", i, gSaveContext.unk_13EE);
gSaveContext.unk_13EA = 0; gSaveContext.unk_13EA = 0;
Interface_ChangeAlpha(gSaveContext.unk_13EE); Interface_ChangeAlpha(gSaveContext.unk_13EE);
player->targetActor = NULL; player->talkActor = NULL;
Player_SetEquipmentData(play, player); Player_SetEquipmentData(play, player);
osSyncPrintf(VT_RST); osSyncPrintf(VT_RST);
break; break;