1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-30 18:55:54 +00:00

tweak animations' names

This commit is contained in:
feacur 2024-12-08 21:35:44 +01:00
commit 220007ec7c
4 changed files with 47 additions and 47 deletions

View file

@ -2,17 +2,17 @@
<!-- Goron -->
<File Name="object_oF1d_map" Segment="6">
<!-- animations -->
<Animation Name="gGoronSobbingLoopAnim" Offset="0x750"/>
<Animation Name="gGoronShakingLoopAnim" Offset="0xD5C"/>
<Animation Name="gGoronSobbingAnim" Offset="0x750"/>
<Animation Name="gGoronShakingAnim" Offset="0xD5C"/>
<Animation Name="gGoronUncurlToProneAnim" Offset="0x161C"/>
<Animation Name="gGoronProneLoopAnim" Offset="0x1A00"/>
<Animation Name="gGoronScratchingLoopAnim" Offset="0x21D0"/>
<Animation Name="gGoronWalkingLoopAnim" Offset="0x29A8"/>
<Animation Name="gGoronProneAnim" Offset="0x1A00"/>
<Animation Name="gGoronScratchingAnim" Offset="0x21D0"/>
<Animation Name="gGoronWalkingAnim" Offset="0x29A8"/>
<Animation Name="gGoronEyedropsTakenAnim" Offset="0x2D80"/>
<Animation Name="gGoronCryingLoopAnim" Offset="0x3768"/>
<Animation Name="gGoronEyeropsLoopAnim" Offset="0x38E4"/>
<Animation Name="gGoronCryingAnim" Offset="0x3768"/>
<Animation Name="gGoronEyeropsAnim" Offset="0x38E4"/>
<Animation Name="gGoronUncurlSitStandAnim" Offset="0x4930"/>
<Animation Name="gGoronSidestepLoopAnim" Offset="0x10590"/>
<Animation Name="gGoronSidestepAnim" Offset="0x10590"/>
<!-- skeleton, limb none -->
<Skeleton Name="gGoronSkel" Type="Flex" LimbType="Standard" Offset="0xFEF0"/>

View file

@ -254,7 +254,7 @@ void func_8097CEEC(DemoGo* this, PlayState* play) {
}
void func_8097CF20(DemoGo* this, PlayState* play, s32 arg2) {
AnimationHeader* animation = &gGoronWalkingLoopAnim;
AnimationHeader* animation = &gGoronWalkingAnim;
if (arg2 != 0) {
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_LOOP,
-8.0f);

View file

@ -73,17 +73,17 @@ static ColliderCylinderInit sCylinderInit = {
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
typedef enum EnGoAnimation {
/* 0 */ ENGO_ANIM_UNCURL_SIT_STAND_IDLE, // default idle
/* 0 */ ENGO_ANIM_UNCURL_SIT_STAND_DEFAULT,
/* 1 */ ENGO_ANIM_UNCURL_SIT_STAND_NORMAL,
/* 2 */ ENGO_ANIM_WALKING_LOOP,
/* 3 */ ENGO_ANIM_SIDESTEP_LOOP
/* 2 */ ENGO_ANIM_WALKING,
/* 3 */ ENGO_ANIM_SIDESTEP
} EnGoAnimation;
static AnimationSpeedInfo sAnimationInfo[] = {
{ &gGoronUncurlSitStandAnim, 0.0f, ANIMMODE_LOOP_INTERP, 0.0f },
{ &gGoronUncurlSitStandAnim, 0.0f, ANIMMODE_LOOP_INTERP, -10.0f },
{ &gGoronWalkingLoopAnim, 1.0f, ANIMMODE_LOOP_INTERP, -10.0f },
{ &gGoronSidestepLoopAnim, 1.0f, ANIMMODE_LOOP_INTERP, -10.0f },
{ &gGoronWalkingAnim, 1.0f, ANIMMODE_LOOP_INTERP, -10.0f },
{ &gGoronSidestepAnim, 1.0f, ANIMMODE_LOOP_INTERP, -10.0f },
};
/*
@ -683,7 +683,7 @@ void EnGo_Init(Actor* thisx, PlayState* play) {
this->actor.flags &= ~ACTOR_FLAG_5;
}
EnGo_ChangeAnim(this, ENGO_ANIM_UNCURL_SIT_STAND_IDLE);
EnGo_ChangeAnim(this, ENGO_ANIM_UNCURL_SIT_STAND_DEFAULT);
this->actor.attentionRangeType = ATTENTION_RANGE_6;
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
this->actor.gravity = -1.0f;
@ -899,8 +899,8 @@ void EnGo_Standing(EnGo* this, PlayState* play) {
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
} else {
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_EYE_DROPS) {
//! @bug: `gGoronEyedropsLoopAnim` is not applied; see `z_en_go2.c` for the correct behaviour
EnGo_ChangeAnim(this, ENGO_ANIM_WALKING_LOOP);
//! @bug: `gGoronEyedropsAnim` is not applied; see `z_en_go2.c` for the correct behaviour
EnGo_ChangeAnim(this, ENGO_ANIM_WALKING);
this->eyedropsTimer = 100;
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
EnGo_SetupAction(this, EnGo_TakingEyedrops);
@ -960,7 +960,7 @@ void EnGo_AttentionLost(EnGo* this, PlayState* play) {
}
void EnGo_Sidestep(EnGo* this, PlayState* play) {
f32 float1 = ((f32)0x8000 / Animation_GetLastFrame(&gGoronSidestepLoopAnim));
f32 float1 = ((f32)0x8000 / Animation_GetLastFrame(&gGoronSidestepAnim));
f32 float2 = this->skelAnime.curFrame * float1;
this->actor.speed = Math_SinS((s16)float2);
@ -974,7 +974,7 @@ void EnGo_Sidestep(EnGo* this, PlayState* play) {
void EnGo_GoronDmtBombFlower(EnGo* this, PlayState* play) {
if (GET_INFTABLE(INFTABLE_EB)) {
EnGo_ChangeAnim(this, ENGO_ANIM_SIDESTEP_LOOP);
EnGo_ChangeAnim(this, ENGO_ANIM_SIDESTEP);
EnGo_SetupAction(this, EnGo_Sidestep);
} else {
EnGo_Standing(this, play);

View file

@ -119,35 +119,35 @@ static f32 sPlayerTrackingYOffsets[14][2] = {
};
typedef enum EnGo2Animation {
/* 0 */ ENGO2_ANIM_UNCURL_SIT_STAND_IDLE, // default idle
/* 0 */ ENGO2_ANIM_UNCURL_SIT_STAND_DEFAULT,
/* 1 */ ENGO2_ANIM_UNCURL_SIT_STAND_NORMAL,
/* 2 */ ENGO2_ANIM_WALKING_LOOP,
/* 3 */ ENGO2_ANIM_SIDESTEP_LOOP,
/* 4 */ ENGO2_ANIM_CRYING_LOOP,
/* 5 */ ENGO2_ANIM_EYEDROPS_LOOP,
/* 2 */ ENGO2_ANIM_WALKING,
/* 3 */ ENGO2_ANIM_SIDESTEP,
/* 4 */ ENGO2_ANIM_CRYING,
/* 5 */ ENGO2_ANIM_EYEDROPS,
/* 6 */ ENGO2_ANIM_EYEDROPS_TAKEN,
/* 7 */ ENGO2_ANIM_UNCURL_PRONE_UNUSED,
/* 8 */ ENGO2_ANIM_PRONE_LOOP_UNUSED,
/* 9 */ ENGO2_ANIM_SCRATCHING_LOOP,
/* 8 */ ENGO2_ANIM_PRONE_UNUSED,
/* 9 */ ENGO2_ANIM_SCRATCHING,
/* 10 */ ENGO2_ANIM_UNCURL_SIT_STAND_BIG,
/* 11 */ ENGO2_ANIM_SOBBING_LOOP,
/* 12 */ ENGO2_ANIM_SHAKING_LOOP
/* 11 */ ENGO2_ANIM_SOBBING,
/* 12 */ ENGO2_ANIM_SHAKING
} EnGo2Animation;
static AnimationInfo sAnimationInfo[] = {
{ &gGoronUncurlSitStandAnim, 0.0f, 0.0f, -1.0f, 0x00, 0.0f },
{ &gGoronUncurlSitStandAnim, 0.0f, 0.0f, -1.0f, 0x00, -8.0f },
{ &gGoronWalkingLoopAnim, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
{ &gGoronSidestepLoopAnim, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
{ &gGoronCryingLoopAnim, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
{ &gGoronEyeropsLoopAnim, 1.0f, 0.0f, -1.0f, 0x02, -8.0f },
{ &gGoronWalkingAnim, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
{ &gGoronSidestepAnim, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
{ &gGoronCryingAnim, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
{ &gGoronEyeropsAnim, 1.0f, 0.0f, -1.0f, 0x02, -8.0f },
{ &gGoronEyedropsTakenAnim, 1.0f, 0.0f, -1.0f, 0x02, -8.0f },
{ &gGoronUncurlToProneAnim, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
{ &gGoronProneLoopAnim, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
{ &gGoronScratchingLoopAnim, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
{ &gGoronProneAnim, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
{ &gGoronScratchingAnim, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
{ &gGoronUncurlSitStandAnim, 0.0f, 0.0f, -1.0f, 0x01, -8.0f },
{ &gGoronSobbingLoopAnim, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
{ &gGoronShakingLoopAnim, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
{ &gGoronSobbingAnim, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
{ &gGoronShakingAnim, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
};
/*
@ -1176,12 +1176,12 @@ void EnGo2_ChooseIdleAnimation(EnGo2* this) {
case GORON_CITY_ENTRANCE:
case GORON_CITY_STAIRWELL:
case GORON_DMT_FAIRY_HINT:
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_SCRATCHING_LOOP);
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_SCRATCHING);
break;
case GORON_DMT_BIGGORON:
if (INV_CONTENT(ITEM_TRADE_ADULT) >= ITEM_BROKEN_GORONS_SWORD &&
INV_CONTENT(ITEM_TRADE_ADULT) <= ITEM_EYE_DROPS) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_CRYING_LOOP);
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_CRYING);
break;
}
FALLTHROUGH;
@ -1446,7 +1446,7 @@ s32 EnGo2_IsGoronDmtBombFlower(EnGo2* this) {
return false;
}
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_SIDESTEP_LOOP);
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_SIDESTEP);
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
this->isTalkative = false;
this->trackingMode = NPC_TRACKING_NONE;
@ -1499,21 +1499,21 @@ void EnGo2_AnimateGoronLinkAndDoSfx(EnGo2* this, PlayState* play) {
if (ENGO2_GET_TYPE(this) == GORON_CITY_LINK) {
if ((this->actor.textId == 0x3035 && this->messageEntry == 0) ||
(this->actor.textId == 0x3036 && this->messageEntry == 0)) {
if (this->skelAnime.animation != &gGoronShakingLoopAnim) {
animation = ENGO2_ANIM_SHAKING_LOOP;
if (this->skelAnime.animation != &gGoronShakingAnim) {
animation = ENGO2_ANIM_SHAKING;
this->eyeMouthTexState = 0;
}
}
if ((this->actor.textId == 0x3032 && this->messageEntry == 12) || (this->actor.textId == 0x3033) ||
(this->actor.textId == 0x3035 && this->messageEntry == 6)) {
if (this->skelAnime.animation != &gGoronSobbingLoopAnim) {
animation = ENGO2_ANIM_SOBBING_LOOP;
if (this->skelAnime.animation != &gGoronSobbingAnim) {
animation = ENGO2_ANIM_SOBBING;
this->eyeMouthTexState = 1;
}
}
if (this->skelAnime.animation == &gGoronSobbingLoopAnim) {
if (this->skelAnime.animation == &gGoronSobbingAnim) {
if (this->skelAnime.curFrame == 20.0f) {
Actor_PlaySfx(&this->actor, NA_SE_EN_GOLON_CRY);
}
@ -1586,7 +1586,7 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
EnGo2_SetColliderDim(this);
EnGo2_SetShape(this);
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_UNCURL_SIT_STAND_IDLE);
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_UNCURL_SIT_STAND_DEFAULT);
this->actor.gravity = -1.0f;
this->shadownAlpha = this->actor.shape.shadowAlpha = 0;
this->reverse = 0;
@ -1880,7 +1880,7 @@ void EnGo2_HandleOfferParented(EnGo2* this, PlayState* play) {
void EnGo2_BiggoronEyedrops(EnGo2* this, PlayState* play) {
switch (this->goronState) {
case 0: // give eyedrops
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_EYEDROPS_LOOP);
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_EYEDROPS);
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
this->actor.shape.rot.y += DEG_TO_BINANG(8);
this->trackingMode = NPC_TRACKING_NONE;
@ -1962,7 +1962,7 @@ void EnGo2_GoronFireGeneric(EnGo2* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
EnGo2_GoronFireGeneric_CreateSubcamera(this, play);
play->msgCtx.msgMode = MSGMODE_PAUSED;
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_WALKING_LOOP);
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_WALKING);
this->waypoint = 1;
this->skelAnime.playSpeed = 2.0f;
EnGo2_OrientInstant(this);