1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-14 21:40:03 +00:00

[ntsc-1.0/1.1] Match z_player.c (#2232)

* [ntsc-1.0/1.1] Match z_player.c

* Move braces around

* Use #if around only part of complicated conditions
This commit is contained in:
cadmic 2024-09-27 01:56:58 -07:00 committed by GitHub
parent ca70ba14a2
commit 2e6637ae43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -234,7 +234,9 @@ void func_808521F4(PlayState* play, Player* this, CsCmdActorCue* cue);
void func_80852234(PlayState* play, Player* this, CsCmdActorCue* cue); void func_80852234(PlayState* play, Player* this, CsCmdActorCue* cue);
void func_8085225C(PlayState* play, Player* this, CsCmdActorCue* cue); void func_8085225C(PlayState* play, Player* this, CsCmdActorCue* cue);
void func_80852280(PlayState* play, Player* this, CsCmdActorCue* cue); void func_80852280(PlayState* play, Player* this, CsCmdActorCue* cue);
#if OOT_VERSION >= PAL_1_0
void func_80852358(PlayState* play, Player* this, CsCmdActorCue* cue); void func_80852358(PlayState* play, Player* this, CsCmdActorCue* cue);
#endif
void func_80852388(PlayState* play, Player* this, CsCmdActorCue* cue); void func_80852388(PlayState* play, Player* this, CsCmdActorCue* cue);
void func_80852298(PlayState* play, Player* this, CsCmdActorCue* cue); void func_80852298(PlayState* play, Player* this, CsCmdActorCue* cue);
void func_80852328(PlayState* play, Player* this, CsCmdActorCue* cue); void func_80852328(PlayState* play, Player* this, CsCmdActorCue* cue);
@ -1725,12 +1727,20 @@ void Player_DetachHeldActor(PlayState* play, Player* this) {
this->interactRangeActor = NULL; this->interactRangeActor = NULL;
heldActor->parent = NULL; heldActor->parent = NULL;
this->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR; this->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
#if OOT_VERSION < NTSC_1_1
if (Player_GetExplosiveHeld(this) >= 0) {
Player_InitItemAction(play, this, PLAYER_IA_NONE);
this->heldItemId = ITEM_NONE_FE;
}
#endif
} }
#if OOT_VERSION >= NTSC_1_1
if (Player_GetExplosiveHeld(this) >= 0) { if (Player_GetExplosiveHeld(this) >= 0) {
Player_InitItemAction(play, this, PLAYER_IA_NONE); Player_InitItemAction(play, this, PLAYER_IA_NONE);
this->heldItemId = ITEM_NONE_FE; this->heldItemId = ITEM_NONE_FE;
} }
#endif
} }
void func_80832440(PlayState* play, Player* this) { void func_80832440(PlayState* play, Player* this) {
@ -1915,10 +1925,13 @@ void Player_ProcessAnimSfxList(Player* this, AnimSfxEntry* entry) {
Player_PlayJumpingSfx(this); Player_PlayJumpingSfx(this);
} else if (type == ANIMSFX_SHIFT_TYPE(ANIMSFX_TYPE_WALKING)) { } else if (type == ANIMSFX_SHIFT_TYPE(ANIMSFX_TYPE_WALKING)) {
Player_PlaySteppingSfx(this, 0.0f); Player_PlaySteppingSfx(this, 0.0f);
} else if (type == ANIMSFX_SHIFT_TYPE(ANIMSFX_TYPE_UNKNOWN)) { }
#if OOT_VERSION >= PAL_1_0
else if (type == ANIMSFX_SHIFT_TYPE(ANIMSFX_TYPE_UNKNOWN)) {
func_800F4010(&this->actor.projectedPos, func_800F4010(&this->actor.projectedPos,
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WOOD + this->ageProperties->unk_94, 0.0f); NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WOOD + this->ageProperties->unk_94, 0.0f);
} }
#endif
} }
cont = (entry->data >= 0); // stop processing if `data` is negative cont = (entry->data >= 0); // stop processing if `data` is negative
@ -2204,6 +2217,14 @@ void Player_SetUpperActionFunc(Player* this, UpperActionFunc upperActionFunc) {
func_808326F0(this); func_808326F0(this);
} }
#if OOT_VERSION < NTSC_1_1
s32 Player_GetMeleeWeaponHeld2(Player* this) {
return Player_GetMeleeWeaponHeld(this);
}
#else
#define Player_GetMeleeWeaponHeld2 Player_GetMeleeWeaponHeld
#endif
void Player_InitItemActionWithAnim(PlayState* play, Player* this, s8 itemAction) { void Player_InitItemActionWithAnim(PlayState* play, Player* this, s8 itemAction) {
LinkAnimationHeader* current = this->skelAnime.animation; LinkAnimationHeader* current = this->skelAnime.animation;
LinkAnimationHeader** iter = D_80853914 + this->modelAnimType; LinkAnimationHeader** iter = D_80853914 + this->modelAnimType;
@ -2242,6 +2263,14 @@ s8 Player_ItemToItemAction(s32 item) {
void Player_InitDefaultIA(PlayState* play, Player* this) { void Player_InitDefaultIA(PlayState* play, Player* this) {
} }
#if OOT_VERSION < NTSC_1_1
s32 Player_HoldsTwoHandedWeapon2(Player* this) {
return Player_HoldsTwoHandedWeapon(this);
}
#else
#define Player_HoldsTwoHandedWeapon2 Player_HoldsTwoHandedWeapon
#endif
void Player_InitDekuStickIA(PlayState* play, Player* this) { void Player_InitDekuStickIA(PlayState* play, Player* this) {
this->unk_85C = 1.0f; this->unk_85C = 1.0f;
} }
@ -2314,7 +2343,9 @@ void Player_InitItemAction(PlayState* play, Player* this, s8 itemAction) {
this->heldItemAction = this->itemAction = itemAction; this->heldItemAction = this->itemAction = itemAction;
this->modelGroup = this->nextModelGroup; this->modelGroup = this->nextModelGroup;
#if OOT_VERSION >= NTSC_1_1
this->stateFlags1 &= ~(PLAYER_STATE1_3 | PLAYER_STATE1_USING_BOOMERANG); this->stateFlags1 &= ~(PLAYER_STATE1_3 | PLAYER_STATE1_USING_BOOMERANG);
#endif
sItemActionInitFuncs[itemAction](play, this); sItemActionInitFuncs[itemAction](play, this);
@ -2583,7 +2614,10 @@ void Player_StartChangingHeldItem(Player* this, PlayState* play) {
} }
void Player_UpdateItems(Player* this, PlayState* play) { void Player_UpdateItems(Player* this, PlayState* play) {
if ((this->actor.category == ACTORCAT_PLAYER) && !(this->stateFlags1 & PLAYER_STATE1_START_CHANGING_HELD_ITEM) && if ((this->actor.category == ACTORCAT_PLAYER) &&
#if OOT_VERSION >= NTSC_1_1
!(this->stateFlags1 & PLAYER_STATE1_START_CHANGING_HELD_ITEM) &&
#endif
((this->heldItemAction == this->itemAction) || (this->stateFlags1 & PLAYER_STATE1_22)) && ((this->heldItemAction == this->itemAction) || (this->stateFlags1 & PLAYER_STATE1_22)) &&
(gSaveContext.save.info.playerData.health != 0) && (play->csCtx.state == CS_STATE_IDLE) && (gSaveContext.save.info.playerData.health != 0) && (play->csCtx.state == CS_STATE_IDLE) &&
(this->csAction == PLAYER_CSACTION_NONE) && (play->shootingGalleryStatus == 0) && (this->csAction == PLAYER_CSACTION_NONE) && (play->shootingGalleryStatus == 0) &&
@ -3102,21 +3136,35 @@ void func_80835688(Player* this, PlayState* play) {
} }
s32 Player_UpperAction_CarryActor(Player* this, PlayState* play) { s32 Player_UpperAction_CarryActor(Player* this, PlayState* play) {
#if OOT_VERSION >= NTSC_1_1
Actor* heldActor = this->heldActor; Actor* heldActor = this->heldActor;
if (heldActor == NULL) { if (heldActor == NULL) {
func_80834644(play, this); func_80834644(play, this);
} }
#endif
if (func_80834758(play, this)) { if (func_80834758(play, this)) {
return true; return true;
} }
if (this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) { if (this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
#if OOT_VERSION < NTSC_1_1
Actor* heldActor;
#endif
if (LinkAnimation_Update(play, &this->upperSkelAnime)) { if (LinkAnimation_Update(play, &this->upperSkelAnime)) {
LinkAnimation_PlayLoop(play, &this->upperSkelAnime, &gPlayerAnim_link_normal_carryB_wait); LinkAnimation_PlayLoop(play, &this->upperSkelAnime, &gPlayerAnim_link_normal_carryB_wait);
} }
#if OOT_VERSION < NTSC_1_1
heldActor = this->heldActor;
if (heldActor == NULL) {
func_80834644(play, this);
return true;
}
#endif
if ((heldActor->id == ACTOR_EN_NIW) && (this->actor.velocity.y <= 0.0f)) { if ((heldActor->id == ACTOR_EN_NIW) && (this->actor.velocity.y <= 0.0f)) {
this->actor.minVelocityY = -2.0f; this->actor.minVelocityY = -2.0f;
this->actor.gravity = -0.5f; this->actor.gravity = -0.5f;
@ -6336,8 +6384,8 @@ void func_8083C50C(Player* this) {
s32 Player_ActionHandler_8(Player* this, PlayState* play) { s32 Player_ActionHandler_8(Player* this, PlayState* play) {
if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_B)) { if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_B)) {
if (!(this->stateFlags1 & PLAYER_STATE1_22) && (Player_GetMeleeWeaponHeld(this) != 0) && (this->unk_844 == 1) && if (!(this->stateFlags1 & PLAYER_STATE1_22) && (Player_GetMeleeWeaponHeld2(this) != 0) &&
(this->heldItemAction != PLAYER_IA_DEKU_STICK)) { (this->unk_844 == 1) && (this->heldItemAction != PLAYER_IA_DEKU_STICK)) {
if ((this->heldItemAction != PLAYER_IA_SWORD_BIGGORON) || if ((this->heldItemAction != PLAYER_IA_SWORD_BIGGORON) ||
(gSaveContext.save.info.playerData.swordHealth > 0.0f)) { (gSaveContext.save.info.playerData.swordHealth > 0.0f)) {
func_808377DC(play, this); func_808377DC(play, this);
@ -6389,15 +6437,26 @@ s32 func_8083C6B8(PlayState* play, Player* this) {
rodCheckPos.y += 50.0f; rodCheckPos.y += 50.0f;
#if OOT_VERSION < NTSC_1_1
if (BgCheck_SphVsFirstPoly(&play->colCtx, &rodCheckPos, 20.0f))
#else
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.world.pos.z > 1300.0f) || if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.world.pos.z > 1300.0f) ||
BgCheck_SphVsFirstPoly(&play->colCtx, &rodCheckPos, 20.0f)) { BgCheck_SphVsFirstPoly(&play->colCtx, &rodCheckPos, 20.0f))
#endif
{
Sfx_PlaySfxCentered(NA_SE_SY_ERROR); Sfx_PlaySfxCentered(NA_SE_SY_ERROR);
return 0; return 0;
} }
#if OOT_VERSION < NTSC_1_1
this->unk_860 = 1;
Player_SetupAction(play, this, Player_Action_80850C68, 0);
#else
Player_SetupAction(play, this, Player_Action_80850C68, 0); Player_SetupAction(play, this, Player_Action_80850C68, 0);
this->unk_860 = 1; this->unk_860 = 1;
Player_ZeroSpeedXZ(this); Player_ZeroSpeedXZ(this);
#endif
Player_AnimPlayOnce(play, this, &gPlayerAnim_link_fishing_throw); Player_AnimPlayOnce(play, this, &gPlayerAnim_link_fishing_throw);
return 1; return 1;
} else { } else {
@ -6571,7 +6630,12 @@ s32 func_8083CFA8(PlayState* play, Player* this, f32 arg2, s32 splashScale) {
splashPos.z = this->bodyPartsPos[PLAYER_BODYPART_WAIST].z; splashPos.z = this->bodyPartsPos[PLAYER_BODYPART_WAIST].z;
sp34 = this->actor.world.pos.y; sp34 = this->actor.world.pos.y;
if (WaterBox_GetSurface1(play, &play->colCtx, splashPos.x, splashPos.z, &sp34, &sp38)) { if (WaterBox_GetSurface1(play, &play->colCtx, splashPos.x, splashPos.z, &sp34, &sp38)) {
if ((sp34 - this->actor.world.pos.y) < 100.0f) { #if OOT_VERSION < PAL_1_0
if ((sp34 - this->actor.world.pos.y) < 80.0f)
#else
if ((sp34 - this->actor.world.pos.y) < 100.0f)
#endif
{
splashType = (sp3C <= 10.0f) ? 0 : 1; splashType = (sp3C <= 10.0f) ? 0 : 1;
splashPos.y = sp34; splashPos.y = sp34;
EffectSsGSplash_Spawn(play, &splashPos, NULL, NULL, splashType, splashScale); EffectSsGSplash_Spawn(play, &splashPos, NULL, NULL, splashType, splashScale);
@ -7957,7 +8021,7 @@ void func_808409CC(PlayState* play, Player* this) {
sp34 = Rand_ZeroOne() * 5.0f; sp34 = Rand_ZeroOne() * 5.0f;
if (sp34 < 4) { if (sp34 < 4) {
if (((sp34 != 0) && (sp34 != 3)) || ((this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD) && if (((sp34 != 0) && (sp34 != 3)) || ((this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD) &&
((sp34 == 3) || (Player_GetMeleeWeaponHeld(this) != 0)))) { ((sp34 == 3) || (Player_GetMeleeWeaponHeld2(this) != 0)))) {
if ((sp34 == 0) && Player_HoldsTwoHandedWeapon(this)) { if ((sp34 == 0) && Player_HoldsTwoHandedWeapon(this)) {
sp34 = 4; sp34 = 4;
} }
@ -8348,7 +8412,7 @@ void Player_Action_80841BA8(Player* this, PlayState* play) {
LinkAnimation_Update(play, &this->skelAnime); LinkAnimation_Update(play, &this->skelAnime);
if (Player_HoldsTwoHandedWeapon(this)) { if (Player_HoldsTwoHandedWeapon2(this)) {
AnimTaskQueue_AddLoadPlayerFrame(play, Player_GetIdleAnimationForCurrentModelAnimType(this), 0, AnimTaskQueue_AddLoadPlayerFrame(play, Player_GetIdleAnimationForCurrentModelAnimType(this), 0,
this->skelAnime.limbCount, this->skelAnime.morphTable); this->skelAnime.limbCount, this->skelAnime.morphTable);
AnimTaskQueue_AddCopyUsingMap(play, this->skelAnime.limbCount, this->skelAnime.jointTable, AnimTaskQueue_AddCopyUsingMap(play, this->skelAnime.limbCount, this->skelAnime.jointTable,
@ -8633,7 +8697,7 @@ s32 func_8084285C(Player* this, f32 arg1, f32 arg2, f32 arg3) {
} }
s32 func_808428D8(Player* this, PlayState* play) { s32 func_808428D8(Player* this, PlayState* play) {
if (!Player_IsChildWithHylianShield(this) && (Player_GetMeleeWeaponHeld(this) != 0) && sUseHeldItem) { if (!Player_IsChildWithHylianShield(this) && (Player_GetMeleeWeaponHeld2(this) != 0) && sUseHeldItem) {
Player_AnimPlayOnce(play, this, &gPlayerAnim_link_normal_defense_kiru); Player_AnimPlayOnce(play, this, &gPlayerAnim_link_normal_defense_kiru);
this->av1.actionVar1 = 1; this->av1.actionVar1 = 1;
this->meleeWeaponAnimation = PLAYER_MWA_STAB_1H; this->meleeWeaponAnimation = PLAYER_MWA_STAB_1H;
@ -9037,10 +9101,12 @@ void Player_Action_80843954(Player* this, PlayState* play) {
} }
} }
#if OOT_VERSION >= PAL_1_0
static AnimSfxEntry D_808545DC[] = { static AnimSfxEntry D_808545DC[] = {
{ 0, ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 20) }, { 0, ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 20) },
{ 0, -ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 30) }, { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 30) },
}; };
#endif
void Player_Action_80843A38(Player* this, PlayState* play) { void Player_Action_80843A38(Player* this, PlayState* play) {
s32 interruptResult; s32 interruptResult;
@ -9059,7 +9125,9 @@ void Player_Action_80843A38(Player* this, PlayState* play) {
} }
} }
#if OOT_VERSION >= PAL_1_0
Player_ProcessAnimSfxList(this, D_808545DC); Player_ProcessAnimSfxList(this, D_808545DC);
#endif
} }
static Vec3f D_808545E4 = { 0.0f, 0.0f, 5.0f }; static Vec3f D_808545E4 = { 0.0f, 0.0f, 5.0f };
@ -9128,11 +9196,14 @@ void Player_Action_80843CEC(Player* this, PlayState* play) {
if (this->skelAnime.animation == &gPlayerAnim_link_derth_rebirth) { if (this->skelAnime.animation == &gPlayerAnim_link_derth_rebirth) {
Player_ProcessAnimSfxList(this, D_808545F0); Player_ProcessAnimSfxList(this, D_808545F0);
} else if (this->skelAnime.animation == &gPlayerAnim_link_normal_electric_shock_end) { }
#if OOT_VERSION >= PAL_1_0
else if (this->skelAnime.animation == &gPlayerAnim_link_normal_electric_shock_end) {
if (LinkAnimation_OnFrame(&this->skelAnime, 88.0f)) { if (LinkAnimation_OnFrame(&this->skelAnime, 88.0f)) {
Player_PlayFloorSfx(this, NA_SE_PL_BOUND); Player_PlayFloorSfx(this, NA_SE_PL_BOUND);
} }
} }
#endif
} }
void func_80843E14(Player* this, u16 sfxId) { void func_80843E14(Player* this, u16 sfxId) {
@ -9761,7 +9832,11 @@ void Player_Action_80845668(Player* this, PlayState* play) {
if (LinkAnimation_OnFrame(&this->skelAnime, 30.0f)) { if (LinkAnimation_OnFrame(&this->skelAnime, 30.0f)) {
func_8083D0A8(play, this, 10.0f); func_8083D0A8(play, this, 10.0f);
} }
#if OOT_VERSION < PAL_1_0
temp3 = 68.0f;
#else
temp3 = 50.0f; temp3 = 50.0f;
#endif
} else if (this->skelAnime.animation == &gPlayerAnim_link_normal_150step_up) { } else if (this->skelAnime.animation == &gPlayerAnim_link_normal_150step_up) {
temp3 = 30.0f; temp3 = 30.0f;
} else if (this->skelAnime.animation == &gPlayerAnim_link_normal_100step_up) { } else if (this->skelAnime.animation == &gPlayerAnim_link_normal_100step_up) {
@ -10404,7 +10479,12 @@ void Player_Init(Actor* thisx, PlayState* play2) {
(gEntranceTable[((void)0, gSaveContext.save.entranceIndex) + ((void)0, gSaveContext.sceneLayer)].field & (gEntranceTable[((void)0, gSaveContext.save.entranceIndex) + ((void)0, gSaveContext.sceneLayer)].field &
ENTRANCE_INFO_DISPLAY_TITLE_CARD_FLAG) && ENTRANCE_INFO_DISPLAY_TITLE_CARD_FLAG) &&
((play->sceneId != SCENE_DODONGOS_CAVERN) || GET_EVENTCHKINF(EVENTCHKINF_B0)) && ((play->sceneId != SCENE_DODONGOS_CAVERN) || GET_EVENTCHKINF(EVENTCHKINF_B0)) &&
((play->sceneId != SCENE_BOMBCHU_SHOP) || GET_EVENTCHKINF(EVENTCHKINF_25))) { #if OOT_VERSION < PAL_1_0
((play->sceneId != SCENE_BOMBCHU_BOWLING_ALLEY) || GET_EVENTCHKINF(EVENTCHKINF_25))
#else
((play->sceneId != SCENE_BOMBCHU_SHOP) || GET_EVENTCHKINF(EVENTCHKINF_25))
#endif
) {
TitleCard_InitPlaceName(play, &play->actorCtx.titleCtx, this->giObjectSegment, 160, 120, 144, 24, 20); TitleCard_InitPlaceName(play, &play->actorCtx.titleCtx, this->giObjectSegment, 160, 120, 144, 24, 20);
} }
} }
@ -13558,10 +13638,12 @@ void func_8084E988(Player* this) {
Player_ProcessAnimSfxList(this, D_808549F0); Player_ProcessAnimSfxList(this, D_808549F0);
} }
#if OOT_VERSION >= PAL_1_0
static AnimSfxEntry D_808549F4[] = { static AnimSfxEntry D_808549F4[] = {
{ NA_SE_VO_LI_AUTO_JUMP, ANIMSFX_DATA(ANIMSFX_TYPE_VOICE, 5) }, { NA_SE_VO_LI_AUTO_JUMP, ANIMSFX_DATA(ANIMSFX_TYPE_VOICE, 5) },
{ 0, -ANIMSFX_DATA(ANIMSFX_TYPE_LANDING, 15) }, { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_LANDING, 15) },
}; };
#endif
void Player_Action_8084E9AC(Player* this, PlayState* play) { void Player_Action_8084E9AC(Player* this, PlayState* play) {
if (LinkAnimation_Update(play, &this->skelAnime)) { if (LinkAnimation_Update(play, &this->skelAnime)) {
@ -13579,11 +13661,19 @@ void Player_Action_8084E9AC(Player* this, PlayState* play) {
return; return;
} }
#if OOT_VERSION < PAL_1_0
if (!LINK_IS_ADULT && LinkAnimation_OnFrame(&this->skelAnime, 5.0f)) {
Player_PlayVoiceSfx(this, NA_SE_VO_LI_AUTO_JUMP);
} else if (LINK_IS_ADULT) {
func_8084E988(this);
}
#else
if (!LINK_IS_ADULT) { if (!LINK_IS_ADULT) {
Player_ProcessAnimSfxList(this, D_808549F4); Player_ProcessAnimSfxList(this, D_808549F4);
} else { } else {
func_8084E988(this); func_8084E988(this);
} }
#endif
} }
} }
@ -14731,51 +14821,55 @@ static struct_80854B18 D_80854E50[PLAYER_CSACTION_MAX] = {
{ 11, NULL }, // PLAYER_CSACTION_55 { 11, NULL }, // PLAYER_CSACTION_55
{ 11, NULL }, // PLAYER_CSACTION_56 { 11, NULL }, // PLAYER_CSACTION_56
{ 12, &gPlayerAnim_clink_demo_mimawasi_wait }, // PLAYER_CSACTION_57 { 12, &gPlayerAnim_clink_demo_mimawasi_wait }, // PLAYER_CSACTION_57
{ -1, func_80852358 }, // PLAYER_CSACTION_58 #if OOT_VERSION < PAL_1_0
{ 11, NULL }, // PLAYER_CSACTION_59 { 12, &gPlayerAnim_link_demo_nozokikomi_wait }, // PLAYER_CSACTION_58
{ 18, D_80854B14 }, // PLAYER_CSACTION_60 #else
{ 11, NULL }, // PLAYER_CSACTION_61 { -1, func_80852358 }, // PLAYER_CSACTION_58
{ 11, NULL }, // PLAYER_CSACTION_62 #endif
{ 11, NULL }, // PLAYER_CSACTION_63 { 11, NULL }, // PLAYER_CSACTION_59
{ 11, NULL }, // PLAYER_CSACTION_64 { 18, D_80854B14 }, // PLAYER_CSACTION_60
{ -1, func_80852388 }, // PLAYER_CSACTION_65 { 11, NULL }, // PLAYER_CSACTION_61
{ 17, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSACTION_66 { 11, NULL }, // PLAYER_CSACTION_62
{ 12, &gPlayerAnim_d_link_orowait }, // PLAYER_CSACTION_67 { 11, NULL }, // PLAYER_CSACTION_63
{ 12, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSACTION_68 { 11, NULL }, // PLAYER_CSACTION_64
{ 11, NULL }, // PLAYER_CSACTION_69 { -1, func_80852388 }, // PLAYER_CSACTION_65
{ -1, func_808526EC }, // PLAYER_CSACTION_70 { 17, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSACTION_66
{ 17, &gPlayerAnim_sude_nwait }, // PLAYER_CSACTION_71 { 12, &gPlayerAnim_d_link_orowait }, // PLAYER_CSACTION_67
{ -1, func_808526EC }, // PLAYER_CSACTION_72 { 12, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSACTION_68
{ 17, &gPlayerAnim_sude_nwait }, // PLAYER_CSACTION_73 { 11, NULL }, // PLAYER_CSACTION_69
{ 12, &gPlayerAnim_link_demo_gurad_wait }, // PLAYER_CSACTION_74 { -1, func_808526EC }, // PLAYER_CSACTION_70
{ 12, &gPlayerAnim_link_demo_look_hand_wait }, // PLAYER_CSACTION_75 { 17, &gPlayerAnim_sude_nwait }, // PLAYER_CSACTION_71
{ 11, NULL }, // PLAYER_CSACTION_76 { -1, func_808526EC }, // PLAYER_CSACTION_72
{ 12, &gPlayerAnim_link_demo_ue_wait }, // PLAYER_CSACTION_77 { 17, &gPlayerAnim_sude_nwait }, // PLAYER_CSACTION_73
{ 12, &gPlayerAnim_Link_m_wait }, // PLAYER_CSACTION_78 { 12, &gPlayerAnim_link_demo_gurad_wait }, // PLAYER_CSACTION_74
{ 13, &gPlayerAnim_Link_ue_wait }, // PLAYER_CSACTION_79 { 12, &gPlayerAnim_link_demo_look_hand_wait }, // PLAYER_CSACTION_75
{ 12, &gPlayerAnim_Link_otituku_w }, // PLAYER_CSACTION_80 { 11, NULL }, // PLAYER_CSACTION_76
{ 12, &gPlayerAnim_L_kw }, // PLAYER_CSACTION_81 { 12, &gPlayerAnim_link_demo_ue_wait }, // PLAYER_CSACTION_77
{ 11, NULL }, // PLAYER_CSACTION_82 { 12, &gPlayerAnim_Link_m_wait }, // PLAYER_CSACTION_78
{ 11, NULL }, // PLAYER_CSACTION_83 { 13, &gPlayerAnim_Link_ue_wait }, // PLAYER_CSACTION_79
{ 11, NULL }, // PLAYER_CSACTION_84 { 12, &gPlayerAnim_Link_otituku_w }, // PLAYER_CSACTION_80
{ 11, NULL }, // PLAYER_CSACTION_85 { 12, &gPlayerAnim_L_kw }, // PLAYER_CSACTION_81
{ -1, func_80852648 }, // PLAYER_CSACTION_86 { 11, NULL }, // PLAYER_CSACTION_82
{ 11, NULL }, // PLAYER_CSACTION_87 { 11, NULL }, // PLAYER_CSACTION_83
{ 12, &gPlayerAnim_L_kennasi_w }, // PLAYER_CSACTION_88 { 11, NULL }, // PLAYER_CSACTION_84
{ -1, func_808524D0 }, // PLAYER_CSACTION_89 { 11, NULL }, // PLAYER_CSACTION_85
{ -1, func_80852514 }, // PLAYER_CSACTION_90 { -1, func_80852648 }, // PLAYER_CSACTION_86
{ -1, func_80852554 }, // PLAYER_CSACTION_91 { 11, NULL }, // PLAYER_CSACTION_87
{ -1, func_808525C0 }, // PLAYER_CSACTION_92 { 12, &gPlayerAnim_L_kennasi_w }, // PLAYER_CSACTION_88
{ 11, NULL }, // PLAYER_CSACTION_93 { -1, func_808524D0 }, // PLAYER_CSACTION_89
{ 11, NULL }, // PLAYER_CSACTION_94 { -1, func_80852514 }, // PLAYER_CSACTION_90
{ 11, NULL }, // PLAYER_CSACTION_95 { -1, func_80852554 }, // PLAYER_CSACTION_91
{ -1, func_8085283C }, // PLAYER_CSACTION_96 { -1, func_808525C0 }, // PLAYER_CSACTION_92
{ -1, func_808528C8 }, // PLAYER_CSACTION_97 { 11, NULL }, // PLAYER_CSACTION_93
{ -1, func_808528C8 }, // PLAYER_CSACTION_98 { 11, NULL }, // PLAYER_CSACTION_94
{ 12, &gPlayerAnim_link_demo_zeldamiru_wait }, // PLAYER_CSACTION_99 { 11, NULL }, // PLAYER_CSACTION_95
{ 12, &gPlayerAnim_link_demo_kenmiru1_wait }, // PLAYER_CSACTION_100 { -1, func_8085283C }, // PLAYER_CSACTION_96
{ 12, &gPlayerAnim_link_demo_kenmiru2_wait }, // PLAYER_CSACTION_101 { -1, func_808528C8 }, // PLAYER_CSACTION_97
{ 12, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSACTION_102 { -1, func_808528C8 }, // PLAYER_CSACTION_98
{ 12, &gPlayerAnim_link_demo_zeldamiru_wait }, // PLAYER_CSACTION_99
{ 12, &gPlayerAnim_link_demo_kenmiru1_wait }, // PLAYER_CSACTION_100
{ 12, &gPlayerAnim_link_demo_kenmiru2_wait }, // PLAYER_CSACTION_101
{ 12, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSACTION_102
}; };
void Player_AnimChangeOnceMorphZeroRootYawSpeed(PlayState* play, Player* this, LinkAnimationHeader* anim) { void Player_AnimChangeOnceMorphZeroRootYawSpeed(PlayState* play, Player* this, LinkAnimationHeader* anim) {
@ -15092,10 +15186,12 @@ static struct_808551A4 D_808551A4[] = {
{ NA_SE_IT_SWORD_STICK_STN, NA_SE_VO_LI_SWORD_N }, { NA_SE_IT_SWORD_STICK_STN, NA_SE_VO_LI_SWORD_N },
}; };
#if OOT_VERSION >= PAL_1_0
static AnimSfxEntry D_808551AC[] = { static AnimSfxEntry D_808551AC[] = {
{ 0, ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 29) }, { 0, ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 29) },
{ 0, -ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 39) }, { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 39) },
}; };
#endif
void func_80851A50(PlayState* play, Player* this, CsCmdActorCue* cue) { void func_80851A50(PlayState* play, Player* this, CsCmdActorCue* cue) {
struct_808551A4* sp2C; struct_808551A4* sp2C;
@ -15124,7 +15220,9 @@ void func_80851A50(PlayState* play, Player* this, CsCmdActorCue* cue) {
Player_PlayVoiceSfx(this, NA_SE_VO_LI_SWORD_L); Player_PlayVoiceSfx(this, NA_SE_VO_LI_SWORD_L);
} }
} else { } else {
#if OOT_VERSION >= PAL_1_0
Player_ProcessAnimSfxList(this, D_808551AC); Player_ProcessAnimSfxList(this, D_808551AC);
#endif
} }
} }
@ -15249,10 +15347,17 @@ void func_80851FB0(PlayState* play, Player* this, CsCmdActorCue* cue) {
} }
static AnimSfxEntry D_808551C8[] = { static AnimSfxEntry D_808551C8[] = {
#if OOT_VERSION < PAL_1_0
{ NA_SE_PL_LAND, ANIMSFX_DATA(ANIMSFX_TYPE_GENERAL, 67) },
{ 0, ANIMSFX_DATA(ANIMSFX_TYPE_RUNNING, 84) },
{ 0, ANIMSFX_DATA(ANIMSFX_TYPE_RUNNING, 90) },
{ 0, -ANIMSFX_DATA(ANIMSFX_TYPE_RUNNING, 96) },
#else
{ NA_SE_PL_LAND + SURFACE_SFX_OFFSET_WOOD, ANIMSFX_DATA(ANIMSFX_TYPE_GENERAL, 67) }, { NA_SE_PL_LAND + SURFACE_SFX_OFFSET_WOOD, ANIMSFX_DATA(ANIMSFX_TYPE_GENERAL, 67) },
{ 0, ANIMSFX_DATA(ANIMSFX_TYPE_UNKNOWN, 84) }, { 0, ANIMSFX_DATA(ANIMSFX_TYPE_UNKNOWN, 84) },
{ 0, ANIMSFX_DATA(ANIMSFX_TYPE_UNKNOWN, 90) }, { 0, ANIMSFX_DATA(ANIMSFX_TYPE_UNKNOWN, 90) },
{ 0, -ANIMSFX_DATA(ANIMSFX_TYPE_UNKNOWN, 96) }, { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_UNKNOWN, 96) },
#endif
}; };
void func_80852048(PlayState* play, Player* this, CsCmdActorCue* cue) { void func_80852048(PlayState* play, Player* this, CsCmdActorCue* cue) {
@ -15340,6 +15445,7 @@ void func_80852328(PlayState* play, Player* this, CsCmdActorCue* cue) {
func_80851F14(play, this, &gPlayerAnim_link_demo_furimuki2_wait, D_808551E0); func_80851F14(play, this, &gPlayerAnim_link_demo_furimuki2_wait, D_808551E0);
} }
#if OOT_VERSION >= PAL_1_0
static AnimSfxEntry D_808551E8[] = { static AnimSfxEntry D_808551E8[] = {
{ 0, ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 15) }, { 0, ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 15) },
{ 0, -ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 35) }, { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 35) },
@ -15348,6 +15454,7 @@ static AnimSfxEntry D_808551E8[] = {
void func_80852358(PlayState* play, Player* this, CsCmdActorCue* cue) { void func_80852358(PlayState* play, Player* this, CsCmdActorCue* cue) {
func_80851F14(play, this, &gPlayerAnim_link_demo_nozokikomi_wait, D_808551E8); func_80851F14(play, this, &gPlayerAnim_link_demo_nozokikomi_wait, D_808551E8);
} }
#endif
void func_80852388(PlayState* play, Player* this, CsCmdActorCue* cue) { void func_80852388(PlayState* play, Player* this, CsCmdActorCue* cue) {
if (LinkAnimation_Update(play, &this->skelAnime)) { if (LinkAnimation_Update(play, &this->skelAnime)) {