mirror of
https://github.com/zeldaret/mm.git
synced 2025-03-01 18:06:44 +00:00
Animation Cleanup Part 2: En_A* Actors (#1322)
* en_A * more cleanup * more cleanup * another one * more cleanup * Suggestion * Oops
This commit is contained in:
parent
913cd981c0
commit
e7f3921414
@ -81,12 +81,22 @@ static ColliderCylinderInit sCylinderInit = {
|
||||
|
||||
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
|
||||
|
||||
static AnimationInfoS sAnimationInfo[] = {
|
||||
{ &object_ah_Anim_001860, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_ah_Anim_001860, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_ah_Anim_002280, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_ah_Anim_000968, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_ah_Anim_000DDC, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
typedef enum {
|
||||
/* -1 */ ENAH_ANIM_NONE = -1,
|
||||
/* 0 */ ENAH_ANIM_0,
|
||||
/* 1 */ ENAH_ANIM_1,
|
||||
/* 2 */ ENAH_ANIM_2,
|
||||
/* 3 */ ENAH_ANIM_3,
|
||||
/* 4 */ ENAH_ANIM_4,
|
||||
/* 5 */ ENAH_ANIM_MAX
|
||||
} EnAhAnimation;
|
||||
|
||||
static AnimationInfoS sAnimationInfo[ENAH_ANIM_MAX] = {
|
||||
{ &object_ah_Anim_001860, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENAH_ANIM_0
|
||||
{ &object_ah_Anim_001860, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // ENAH_ANIM_1
|
||||
{ &object_ah_Anim_002280, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENAH_ANIM_2
|
||||
{ &object_ah_Anim_000968, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // ENAH_ANIM_3
|
||||
{ &object_ah_Anim_000DDC, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENAH_ANIM_4
|
||||
};
|
||||
|
||||
s16 D_80BD3EBC[] = { 0, 0, 1, 0 };
|
||||
@ -127,29 +137,30 @@ Actor* func_80BD2A30(EnAh* this, PlayState* play, u8 actorCat, s16 actorId) {
|
||||
return foundActor;
|
||||
}
|
||||
|
||||
void func_80BD2AE0(EnAh* this) {
|
||||
this->skelAnime.playSpeed = this->unk_2DC;
|
||||
void EnAh_UpdateSkelAnime(EnAh* this) {
|
||||
this->skelAnime.playSpeed = this->animPlaySpeed;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
|
||||
s32 func_80BD2B0C(EnAh* this, s32 arg1) {
|
||||
s32 phi_v1 = false;
|
||||
s32 ret = false;
|
||||
s32 EnAh_ChangeAnim(EnAh* this, s32 animIndex) {
|
||||
s32 changeAnim = false;
|
||||
s32 didAnimChange = false;
|
||||
|
||||
if ((arg1 == 0) || (arg1 == 1)) {
|
||||
if ((this->unk_300 != 0) && (this->unk_300 != 1)) {
|
||||
phi_v1 = true;
|
||||
if ((animIndex == ENAH_ANIM_0) || (animIndex == ENAH_ANIM_1)) {
|
||||
if ((this->animIndex != ENAH_ANIM_0) && (this->animIndex != ENAH_ANIM_1)) {
|
||||
changeAnim = true;
|
||||
}
|
||||
} else if (arg1 != this->unk_300) {
|
||||
phi_v1 = true;
|
||||
} else if (this->animIndex != animIndex) {
|
||||
changeAnim = true;
|
||||
}
|
||||
|
||||
if (phi_v1) {
|
||||
this->unk_300 = arg1;
|
||||
ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg1);
|
||||
this->unk_2DC = this->skelAnime.playSpeed;
|
||||
if (changeAnim) {
|
||||
this->animIndex = animIndex;
|
||||
didAnimChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
this->animPlaySpeed = this->skelAnime.playSpeed;
|
||||
}
|
||||
return ret;
|
||||
|
||||
return didAnimChange;
|
||||
}
|
||||
|
||||
void func_80BD2BA4(EnAh* this, PlayState* play) {
|
||||
@ -185,6 +196,9 @@ void func_80BD2C6C(EnAh* this) {
|
||||
this->unk_2FA = 4;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!phi_a3 && (this->unk_2FA == 4)) {
|
||||
@ -283,11 +297,14 @@ void func_80BD2FD0(EnAh* this, PlayState* play) {
|
||||
s32 func_80BD30C0(EnAh* this, PlayState* play) {
|
||||
switch (this->unk_1DC) {
|
||||
case 1:
|
||||
func_80BD2B0C(this, 0);
|
||||
EnAh_ChangeAnim(this, ENAH_ANIM_0);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
func_80BD2B0C(this, 4);
|
||||
EnAh_ChangeAnim(this, ENAH_ANIM_4);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
@ -295,10 +312,10 @@ s32 func_80BD30C0(EnAh* this, PlayState* play) {
|
||||
|
||||
void func_80BD3118(EnAh* this, PlayState* play) {
|
||||
if (this->unk_2FE == 0) {
|
||||
func_80BD2B0C(this, 2);
|
||||
EnAh_ChangeAnim(this, ENAH_ANIM_2);
|
||||
this->unk_2FE++;
|
||||
} else if ((this->unk_2FE == 1) && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
func_80BD2B0C(this, 3);
|
||||
EnAh_ChangeAnim(this, ENAH_ANIM_3);
|
||||
this->unk_2FE++;
|
||||
}
|
||||
}
|
||||
@ -324,6 +341,9 @@ s32 func_80BD3198(EnAh* this, PlayState* play) {
|
||||
this->unk_2F6 = 2;
|
||||
this->unk_2F8 = 8;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
this->unk_2DA = temp;
|
||||
@ -360,6 +380,9 @@ s32* func_80BD3294(EnAh* this, PlayState* play) {
|
||||
|
||||
case 2:
|
||||
return D_80BD3DF8;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@ -382,9 +405,10 @@ s32 func_80BD3374(EnAh* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &D_80BD3EC4.pos);
|
||||
Math_Vec3s_Copy(&this->actor.world.rot, &D_80BD3EC4.rot);
|
||||
Math_Vec3s_Copy(&this->actor.shape.rot, &this->actor.world.rot);
|
||||
func_80BD2B0C(this, 0);
|
||||
EnAh_ChangeAnim(this, ENAH_ANIM_0);
|
||||
SubS_UpdateFlags(&this->unk_2D8, 3, 7);
|
||||
this->unk_2D8 |= 0x40;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -394,9 +418,10 @@ s32 func_80BD33FC(EnAh* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &D_80BD3ED8.pos);
|
||||
Math_Vec3s_Copy(&this->actor.world.rot, &D_80BD3ED8.rot);
|
||||
Math_Vec3s_Copy(&this->actor.shape.rot, &this->actor.world.rot);
|
||||
func_80BD2B0C(this, 4);
|
||||
EnAh_ChangeAnim(this, ENAH_ANIM_4);
|
||||
SubS_UpdateFlags(&this->unk_2D8, 3, 7);
|
||||
this->unk_2D8 |= (0x40 | 0x10);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -409,7 +434,7 @@ s32 func_80BD3484(EnAh* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
Math_Vec3s_Copy(&this->actor.world.rot, &D_80BD3EEC.rot);
|
||||
Math_Vec3s_Copy(&this->actor.shape.rot, &this->actor.world.rot);
|
||||
}
|
||||
func_80BD2B0C(this, 4);
|
||||
EnAh_ChangeAnim(this, ENAH_ANIM_4);
|
||||
this->unk_2D8 |= (0x40 | 0x8);
|
||||
this->unk_2D8 |= 0x10;
|
||||
this->unk_2D8 |= 0x80;
|
||||
@ -425,10 +450,6 @@ s32 func_80BD3548(EnAh* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
this->unk_2D8 = 0;
|
||||
|
||||
switch (scheduleOutput->result) {
|
||||
default:
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
ret = func_80BD3374(this, play, scheduleOutput);
|
||||
break;
|
||||
@ -440,6 +461,10 @@ s32 func_80BD3548(EnAh* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
case 3:
|
||||
ret = func_80BD3484(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = false;
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -517,9 +542,10 @@ void EnAh_Init(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_ah_Skel_009E70, NULL, this->jointTable, this->morphTable, 17);
|
||||
this->unk_300 = -1;
|
||||
func_80BD2B0C(this, 0);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_ah_Skel_009E70, NULL, this->jointTable, this->morphTable,
|
||||
OBJECT_AH_LIMB_MAX);
|
||||
this->animIndex = ENAH_ANIM_NONE;
|
||||
EnAh_ChangeAnim(this, ENAH_ANIM_0);
|
||||
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0x16), &sColChkInfoInit);
|
||||
this->actor.targetMode = 6;
|
||||
@ -548,7 +574,7 @@ void EnAh_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
if (this->unk_1DC != 0) {
|
||||
func_80BD3198(this, play);
|
||||
func_80BD2AE0(this);
|
||||
EnAh_UpdateSkelAnime(this);
|
||||
func_80BD2C6C(this);
|
||||
func_80BD2FD0(this, play);
|
||||
radius = this->collider.dim.radius + 60;
|
||||
@ -566,7 +592,7 @@ void EnAh_Update(Actor* thisx, PlayState* play) {
|
||||
void EnAh_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
|
||||
EnAh* this = THIS;
|
||||
|
||||
if (limbIndex == 7) {
|
||||
if (limbIndex == OBJECT_AH_LIMB_07) {
|
||||
Matrix_MultVec3f(&D_80BD3F00, &this->actor.focus.pos);
|
||||
Math_Vec3s_Copy(&this->actor.focus.rot, &this->actor.world.rot);
|
||||
}
|
||||
@ -589,7 +615,7 @@ void EnAh_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) {
|
||||
overrideRot = false;
|
||||
}
|
||||
|
||||
if (limbIndex == 7) {
|
||||
if (limbIndex == OBJECT_AH_LIMB_07) {
|
||||
SubS_UpdateLimb(BINANG_ADD(this->unk_2EC + this->unk_2F0, 0x4000),
|
||||
BINANG_ADD(this->unk_2EE + this->unk_2F2 + this->actor.shape.rot.y, 0x4000), this->unk_1E8,
|
||||
this->unk_200, stepRot, overrideRot);
|
||||
@ -600,7 +626,7 @@ void EnAh_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) {
|
||||
Matrix_RotateXS(this->unk_200[0].x, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->unk_200[0].z, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
} else if (limbIndex == 2) {
|
||||
} else if (limbIndex == OBJECT_AH_LIMB_02) {
|
||||
SubS_UpdateLimb(BINANG_ADD(this->unk_2F0, 0x4000), BINANG_ADD(this->unk_2F2 + this->actor.shape.rot.y, 0x4000),
|
||||
&this->unk_1E8[1], &this->unk_200[1], stepRot, overrideRot);
|
||||
Matrix_Pop();
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define Z_EN_AH_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_ah/object_ah.h"
|
||||
|
||||
struct EnAh;
|
||||
|
||||
@ -19,11 +20,11 @@ typedef struct EnAh {
|
||||
/* 0x1E4 */ Actor* unk_1E4;
|
||||
/* 0x1E8 */ Vec3f unk_1E8[2];
|
||||
/* 0x200 */ Vec3s unk_200[2];
|
||||
/* 0x20C */ Vec3s jointTable[17];
|
||||
/* 0x272 */ Vec3s morphTable[17];
|
||||
/* 0x20C */ Vec3s jointTable[OBJECT_AH_LIMB_MAX];
|
||||
/* 0x272 */ Vec3s morphTable[OBJECT_AH_LIMB_MAX];
|
||||
/* 0x2D8 */ u16 unk_2D8;
|
||||
/* 0x2DA */ u16 unk_2DA;
|
||||
/* 0x2DC */ f32 unk_2DC;
|
||||
/* 0x2DC */ f32 animPlaySpeed;
|
||||
/* 0x2E0 */ UNK_TYPE1 unk2E0[0xC];
|
||||
/* 0x2EC */ s16 unk_2EC;
|
||||
/* 0x2EE */ s16 unk_2EE;
|
||||
@ -35,7 +36,7 @@ typedef struct EnAh {
|
||||
/* 0x2FA */ s16 unk_2FA;
|
||||
/* 0x2FC */ s16 unk_2FC;
|
||||
/* 0x2FE */ s16 unk_2FE;
|
||||
/* 0x300 */ s32 unk_300;
|
||||
/* 0x300 */ s32 animIndex;
|
||||
} EnAh; // size = 0x304
|
||||
|
||||
#endif // Z_EN_AH_H
|
||||
|
@ -62,30 +62,58 @@ static ColliderCylinderInitType1 sCylinderInit = {
|
||||
{ 27, 32, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
static AnimationInfoS sAnimationInfo[] = {
|
||||
{ &gBusinessScrubStandingAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gBusinessScrubWalkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gBusinessScrubRiseUpAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gBusinessScrubJumpAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gBusinessScrubBurrowAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gBusinessScrubExcitedStartAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gBusinessScrubExcitedLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gBusinessScrubExcitedEndAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gBusinessScrubTakeOffHatAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gBusinessScrubFlyStartAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gBusinessScrubFlyLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gBusinessScrubShockedStartAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gBusinessScrubShockedShakeHeadAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gBusinessScrubShockedPoundAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gBusinessScrubShockedEndAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gBusinessScrubThinkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gBusinessScrubBobAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gBusinessScrubBurrowAnim, 1.0f, 8, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gBusinessScrubBurrowAnim, 1.0f, 4, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &gBusinessScrubBurrowAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gBusinessScrubFlyLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gBusinessScrubTakeOffHatAnim, -1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gBusinessScrubFlyEndAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
typedef enum {
|
||||
/* -1 */ ENAKINDONUTS_ANIM_NONE = -1,
|
||||
/* 0x00 */ ENAKINDONUTS_ANIM_0,
|
||||
/* 0x01 */ ENAKINDONUTS_ANIM_1,
|
||||
/* 0x02 */ ENAKINDONUTS_ANIM_2,
|
||||
/* 0x03 */ ENAKINDONUTS_ANIM_3,
|
||||
/* 0x04 */ ENAKINDONUTS_ANIM_4,
|
||||
/* 0x05 */ ENAKINDONUTS_ANIM_5,
|
||||
/* 0x06 */ ENAKINDONUTS_ANIM_6,
|
||||
/* 0x07 */ ENAKINDONUTS_ANIM_7,
|
||||
/* 0x08 */ ENAKINDONUTS_ANIM_8,
|
||||
/* 0x09 */ ENAKINDONUTS_ANIM_9,
|
||||
/* 0x0A */ ENAKINDONUTS_ANIM_10,
|
||||
/* 0x0B */ ENAKINDONUTS_ANIM_11,
|
||||
/* 0x0C */ ENAKINDONUTS_ANIM_12,
|
||||
/* 0x0D */ ENAKINDONUTS_ANIM_13,
|
||||
/* 0x0E */ ENAKINDONUTS_ANIM_14,
|
||||
/* 0x0F */ ENAKINDONUTS_ANIM_15,
|
||||
/* 0x10 */ ENAKINDONUTS_ANIM_16,
|
||||
/* 0x11 */ ENAKINDONUTS_ANIM_17,
|
||||
/* 0x12 */ ENAKINDONUTS_ANIM_18,
|
||||
/* 0x13 */ ENAKINDONUTS_ANIM_19,
|
||||
/* 0x14 */ ENAKINDONUTS_ANIM_20,
|
||||
/* 0x15 */ ENAKINDONUTS_ANIM_21,
|
||||
/* 0x16 */ ENAKINDONUTS_ANIM_22,
|
||||
/* 0x17 */ ENAKINDONUTS_ANIM_MAX
|
||||
} EnAkindonutsAnimation;
|
||||
|
||||
static AnimationInfoS sAnimationInfo[ENAKINDONUTS_ANIM_MAX] = {
|
||||
{ &gBusinessScrubStandingAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENAKINDONUTS_ANIM_0
|
||||
{ &gBusinessScrubWalkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENAKINDONUTS_ANIM_1
|
||||
{ &gBusinessScrubRiseUpAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENAKINDONUTS_ANIM_2
|
||||
{ &gBusinessScrubJumpAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENAKINDONUTS_ANIM_3
|
||||
{ &gBusinessScrubBurrowAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENAKINDONUTS_ANIM_4
|
||||
{ &gBusinessScrubExcitedStartAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENAKINDONUTS_ANIM_5
|
||||
{ &gBusinessScrubExcitedLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENAKINDONUTS_ANIM_6
|
||||
{ &gBusinessScrubExcitedEndAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENAKINDONUTS_ANIM_7
|
||||
{ &gBusinessScrubTakeOffHatAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENAKINDONUTS_ANIM_8
|
||||
{ &gBusinessScrubFlyStartAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENAKINDONUTS_ANIM_9
|
||||
{ &gBusinessScrubFlyLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENAKINDONUTS_ANIM_10
|
||||
{ &gBusinessScrubShockedStartAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENAKINDONUTS_ANIM_11
|
||||
{ &gBusinessScrubShockedShakeHeadAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENAKINDONUTS_ANIM_12
|
||||
{ &gBusinessScrubShockedPoundAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENAKINDONUTS_ANIM_13
|
||||
{ &gBusinessScrubShockedEndAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENAKINDONUTS_ANIM_14
|
||||
{ &gBusinessScrubThinkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENAKINDONUTS_ANIM_15
|
||||
{ &gBusinessScrubBobAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // ENAKINDONUTS_ANIM_16
|
||||
{ &gBusinessScrubBurrowAnim, 1.0f, 8, -1, ANIMMODE_ONCE, 0 }, // ENAKINDONUTS_ANIM_17
|
||||
{ &gBusinessScrubBurrowAnim, 1.0f, 4, -1, ANIMMODE_ONCE, -4 }, // ENAKINDONUTS_ANIM_18
|
||||
{ &gBusinessScrubBurrowAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENAKINDONUTS_ANIM_19
|
||||
{ &gBusinessScrubFlyLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENAKINDONUTS_ANIM_20
|
||||
{ &gBusinessScrubTakeOffHatAnim, -1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENAKINDONUTS_ANIM_21
|
||||
{ &gBusinessScrubFlyEndAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENAKINDONUTS_ANIM_22
|
||||
};
|
||||
|
||||
static u16 D_80BF048C[] = {
|
||||
@ -434,6 +462,9 @@ void func_80BED3BC(EnAkindonuts* this, PlayState* play) {
|
||||
this->unk_33C = 0x15EF;
|
||||
this->actionFunc = func_80BEF360;
|
||||
return;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (this->unk_32C & 0x10) {
|
||||
this->unk_32C &= ~0x10;
|
||||
@ -457,6 +488,9 @@ void func_80BED3BC(EnAkindonuts* this, PlayState* play) {
|
||||
case 0x15EF:
|
||||
this->unk_32C |= 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Message_StartTextbox(play, this->unk_33C, &this->actor);
|
||||
@ -517,6 +551,9 @@ void func_80BED680(EnAkindonuts* this, PlayState* play) {
|
||||
this->unk_33C = 0x15EF;
|
||||
this->actionFunc = func_80BEF360;
|
||||
return;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (this->unk_32C & 0x10) {
|
||||
this->unk_32C &= ~0x10;
|
||||
@ -528,6 +565,9 @@ void func_80BED680(EnAkindonuts* this, PlayState* play) {
|
||||
case 0x15EF:
|
||||
this->unk_32C |= 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Message_StartTextbox(play, this->unk_33C, &this->actor);
|
||||
@ -541,10 +581,13 @@ void func_80BED8A4(EnAkindonuts* this, PlayState* play) {
|
||||
if (player->transformation == PLAYER_FORM_DEKU) {
|
||||
this->unk_33C = 0x15F4;
|
||||
break;
|
||||
} else if (player->transformation == PLAYER_FORM_GORON) {
|
||||
}
|
||||
|
||||
if (player->transformation == PLAYER_FORM_GORON) {
|
||||
this->unk_33C = 0x15FE;
|
||||
break;
|
||||
}
|
||||
|
||||
this->unk_33C = 0x15FC;
|
||||
break;
|
||||
|
||||
@ -612,6 +655,9 @@ void func_80BED8A4(EnAkindonuts* this, PlayState* play) {
|
||||
this->unk_33C = 0x15EF;
|
||||
this->actionFunc = func_80BEF360;
|
||||
return;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (this->unk_32C & 0x10) {
|
||||
this->unk_32C &= ~0x10;
|
||||
@ -634,6 +680,9 @@ void func_80BED8A4(EnAkindonuts* this, PlayState* play) {
|
||||
case 0x15EF:
|
||||
this->unk_32C |= 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Message_StartTextbox(play, this->unk_33C, &this->actor);
|
||||
@ -695,6 +744,9 @@ void func_80BEDB88(EnAkindonuts* this, PlayState* play) {
|
||||
this->unk_33C = 0x15EF;
|
||||
this->actionFunc = func_80BEF360;
|
||||
return;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (this->unk_32C & 0x10) {
|
||||
this->unk_32C &= ~0x10;
|
||||
@ -706,6 +758,9 @@ void func_80BEDB88(EnAkindonuts* this, PlayState* play) {
|
||||
case 0x15EF:
|
||||
this->unk_32C |= 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Message_StartTextbox(play, this->unk_33C, &this->actor);
|
||||
@ -719,10 +774,13 @@ void func_80BEDDAC(EnAkindonuts* this, PlayState* play) {
|
||||
if (player->transformation == PLAYER_FORM_GORON) {
|
||||
this->unk_33C = 0x1607;
|
||||
break;
|
||||
} else if (player->transformation == PLAYER_FORM_ZORA) {
|
||||
}
|
||||
|
||||
if (player->transformation == PLAYER_FORM_ZORA) {
|
||||
this->unk_33C = 0x1610;
|
||||
break;
|
||||
}
|
||||
|
||||
this->unk_33C = 0x160E;
|
||||
break;
|
||||
|
||||
@ -785,6 +843,9 @@ void func_80BEDDAC(EnAkindonuts* this, PlayState* play) {
|
||||
this->unk_33C = 0x15EF;
|
||||
this->actionFunc = func_80BEF360;
|
||||
return;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (this->unk_32C & 0x10) {
|
||||
this->unk_32C &= ~0x10;
|
||||
@ -807,6 +868,9 @@ void func_80BEDDAC(EnAkindonuts* this, PlayState* play) {
|
||||
case 0x15EF:
|
||||
this->unk_32C |= 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Message_StartTextbox(play, this->unk_33C, &this->actor);
|
||||
@ -863,6 +927,9 @@ void func_80BEE070(EnAkindonuts* this, PlayState* play) {
|
||||
this->unk_33C = 0x161A;
|
||||
this->actionFunc = func_80BEF360;
|
||||
return;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (this->unk_32C & 0x10) {
|
||||
this->unk_32C &= ~0x10;
|
||||
@ -874,6 +941,9 @@ void func_80BEE070(EnAkindonuts* this, PlayState* play) {
|
||||
case 0x161A:
|
||||
this->unk_32C |= 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Message_StartTextbox(play, this->unk_33C, &this->actor);
|
||||
@ -946,6 +1016,9 @@ void func_80BEE274(EnAkindonuts* this, PlayState* play) {
|
||||
this->unk_33C = 0x1629;
|
||||
this->actionFunc = func_80BEF360;
|
||||
return;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (this->unk_32C & 0x10) {
|
||||
this->unk_32C &= ~0x10;
|
||||
@ -968,6 +1041,9 @@ void func_80BEE274(EnAkindonuts* this, PlayState* play) {
|
||||
case 0x1629:
|
||||
this->unk_32C |= 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Message_StartTextbox(play, this->unk_33C, &this->actor);
|
||||
@ -1024,6 +1100,9 @@ void func_80BEE530(EnAkindonuts* this, PlayState* play) {
|
||||
this->unk_33C = 0x15EF;
|
||||
this->actionFunc = func_80BEF360;
|
||||
return;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (this->unk_32C & 0x10) {
|
||||
this->unk_32C &= ~0x10;
|
||||
@ -1035,6 +1114,9 @@ void func_80BEE530(EnAkindonuts* this, PlayState* play) {
|
||||
case 0x15EF:
|
||||
this->unk_32C |= 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Message_StartTextbox(play, this->unk_33C, &this->actor);
|
||||
@ -1153,12 +1235,15 @@ void func_80BEE938(EnAkindonuts* this, PlayState* play) {
|
||||
this->unk_2DC = func_80BEE274;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80BEEB20(EnAkindonuts* this, PlayState* play) {
|
||||
s16 sp26 = this->skelAnime.curFrame;
|
||||
s16 sp24 = Animation_GetLastFrame(&sAnimationInfo[this->unk_338].animation->common);
|
||||
s16 curFrame = this->skelAnime.curFrame;
|
||||
s16 endFrame = Animation_GetLastFrame(&sAnimationInfo[this->animIndex].animation->common);
|
||||
s16 phi_v0;
|
||||
|
||||
Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 2, 0xE38);
|
||||
@ -1179,39 +1264,39 @@ void func_80BEEB20(EnAkindonuts* this, PlayState* play) {
|
||||
if (phi_v0) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_AKINDONUTS_HIDE);
|
||||
this->actionFunc = func_80BEEDC0;
|
||||
this->unk_338 = 3;
|
||||
this->animIndex = ENAKINDONUTS_ANIM_3;
|
||||
this->collider.dim.height = 64;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 3);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, ENAKINDONUTS_ANIM_3);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (sp26 == sp24) {
|
||||
if ((this->unk_338 == 4) || (this->unk_338 == 18)) {
|
||||
this->unk_338 = 17;
|
||||
if (curFrame == endFrame) {
|
||||
if ((this->animIndex == ENAKINDONUTS_ANIM_4) || (this->animIndex == ENAKINDONUTS_ANIM_18)) {
|
||||
this->animIndex = ENAKINDONUTS_ANIM_17;
|
||||
this->collider.dim.height = 0;
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_NUTS_DOWN);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 17);
|
||||
} else if (this->unk_338 == 2) {
|
||||
this->unk_338 = 16;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, ENAKINDONUTS_ANIM_17);
|
||||
} else if (this->animIndex == ENAKINDONUTS_ANIM_2) {
|
||||
this->animIndex = ENAKINDONUTS_ANIM_16;
|
||||
this->collider.dim.height = 32;
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_NUTS_UP);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 16);
|
||||
} else if (this->unk_338 == 17) {
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, ENAKINDONUTS_ANIM_16);
|
||||
} else if (this->animIndex == ENAKINDONUTS_ANIM_17) {
|
||||
phi_v0 = DECR(this->unk_33A);
|
||||
if (phi_v0 == 0) {
|
||||
this->unk_33A = Rand_ZeroOne() * 10.0f;
|
||||
this->unk_338 = 2;
|
||||
this->animIndex = ENAKINDONUTS_ANIM_2;
|
||||
this->collider.dim.height = 32;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 2);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, ENAKINDONUTS_ANIM_2);
|
||||
}
|
||||
} else if (this->unk_338 == 16) {
|
||||
} else if (this->animIndex == ENAKINDONUTS_ANIM_16) {
|
||||
phi_v0 = DECR(this->unk_33A);
|
||||
if (phi_v0 == 0) {
|
||||
this->unk_33A = Rand_S16Offset(40, 40);
|
||||
this->unk_338 = 18;
|
||||
this->animIndex = ENAKINDONUTS_ANIM_18;
|
||||
this->collider.dim.height = 32;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 18);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, ENAKINDONUTS_ANIM_18);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1220,7 +1305,7 @@ void func_80BEEB20(EnAkindonuts* this, PlayState* play) {
|
||||
void func_80BEEDC0(EnAkindonuts* this, PlayState* play) {
|
||||
if (this->skelAnime.curFrame == this->skelAnime.endFrame) {
|
||||
this->actionFunc = func_80BEEE10;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 0);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, ENAKINDONUTS_ANIM_0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1237,8 +1322,8 @@ void func_80BEEE10(EnAkindonuts* this, PlayState* play) {
|
||||
func_800B8614(&this->actor, play, 100.0f);
|
||||
} else if (!(((this->actor.playerHeightRel < 50.0f) && (this->actor.playerHeightRel > -50.0f)) ? true : false) ||
|
||||
!((this->actor.xzDistToPlayer < 200.0f) ? true : false)) {
|
||||
this->unk_338 = 4;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 4);
|
||||
this->animIndex = ENAKINDONUTS_ANIM_4;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, ENAKINDONUTS_ANIM_4);
|
||||
this->actionFunc = func_80BEEB20;
|
||||
}
|
||||
}
|
||||
@ -1260,9 +1345,9 @@ void func_80BEEFA8(EnAkindonuts* this, PlayState* play) {
|
||||
this->unk_32C &= ~0x4;
|
||||
play->msgCtx.msgMode = 0x43;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
this->unk_338 = 8;
|
||||
this->animIndex = ENAKINDONUTS_ANIM_8;
|
||||
this->unk_33C = 0;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->unk_338);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
this->actionFunc = func_80BEF518;
|
||||
} else {
|
||||
this->unk_2DC(this, play);
|
||||
@ -1281,6 +1366,9 @@ void func_80BEEFA8(EnAkindonuts* this, PlayState* play) {
|
||||
this->unk_32C |= 0x10;
|
||||
this->unk_2DC(this, play);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (talkState == TEXT_STATE_16) {
|
||||
@ -1299,19 +1387,19 @@ void func_80BEF18C(EnAkindonuts* this, PlayState* play) {
|
||||
|
||||
void func_80BEF20C(EnAkindonuts* this, PlayState* play) {
|
||||
u8 talkState = Message_GetState(&play->msgCtx);
|
||||
s16 sp24 = this->skelAnime.curFrame;
|
||||
s16 sp22 = Animation_GetLastFrame(&sAnimationInfo[this->unk_338].animation->common);
|
||||
s16 curFrame = this->skelAnime.curFrame;
|
||||
s16 endFrame = Animation_GetLastFrame(&sAnimationInfo[this->animIndex].animation->common);
|
||||
|
||||
if (this->unk_356 == 40) {
|
||||
this->unk_338 = 5;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 5);
|
||||
this->animIndex = ENAKINDONUTS_ANIM_5;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, ENAKINDONUTS_ANIM_5);
|
||||
}
|
||||
|
||||
this->unk_356++;
|
||||
|
||||
if ((sp24 == sp22) && (this->unk_338 == 5)) {
|
||||
this->unk_338 = 6;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 6);
|
||||
if ((curFrame == endFrame) && (this->animIndex == ENAKINDONUTS_ANIM_5)) {
|
||||
this->animIndex = ENAKINDONUTS_ANIM_6;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, ENAKINDONUTS_ANIM_6);
|
||||
}
|
||||
|
||||
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
|
||||
@ -1361,10 +1449,10 @@ void func_80BEF4B8(EnAkindonuts* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80BEF518(EnAkindonuts* this, PlayState* play) {
|
||||
s16 sp26 = this->skelAnime.curFrame;
|
||||
s16 sp24 = Animation_GetLastFrame(&sAnimationInfo[this->unk_338].animation->common);
|
||||
s16 curFrame = this->skelAnime.curFrame;
|
||||
s16 endFrame = Animation_GetLastFrame(&sAnimationInfo[this->animIndex].animation->common);
|
||||
|
||||
switch (sp26) {
|
||||
switch (curFrame) {
|
||||
case 10:
|
||||
this->unk_33E = 1;
|
||||
this->unk_340 = 0.1f;
|
||||
@ -1418,6 +1506,9 @@ void func_80BEF518(EnAkindonuts* this, PlayState* play) {
|
||||
case 24:
|
||||
this->unk_344 = 1.0f;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (this->unk_35E == 0) {
|
||||
@ -1433,10 +1524,10 @@ void func_80BEF518(EnAkindonuts* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (sp26 == sp24) {
|
||||
if (curFrame == endFrame) {
|
||||
this->unk_33E = 3;
|
||||
this->unk_338 = 19;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->unk_338);
|
||||
this->animIndex = ENAKINDONUTS_ANIM_19;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_NUTS_DOWN);
|
||||
this->unk_32C &= ~2;
|
||||
this->unk_32C |= 0x80;
|
||||
@ -1468,10 +1559,10 @@ void func_80BEF770(EnAkindonuts* this, PlayState* play) {
|
||||
|
||||
void func_80BEF83C(EnAkindonuts* this, PlayState* play) {
|
||||
Vec3f sp34;
|
||||
s16 sp32 = this->skelAnime.curFrame;
|
||||
s16 sp30 = Animation_GetLastFrame(&sAnimationInfo[this->unk_338].animation->common);
|
||||
s16 curFrame = this->skelAnime.curFrame;
|
||||
s16 endFrame = Animation_GetLastFrame(&sAnimationInfo[this->animIndex].animation->common);
|
||||
|
||||
if (sp32 == sp30) {
|
||||
if (curFrame == endFrame) {
|
||||
Math_SmoothStepToS(&this->unk_362, 0x1C71, 3, 0x100, 0);
|
||||
this->unk_352 += this->unk_362;
|
||||
this->actor.shape.yOffset = 1500.0f;
|
||||
@ -1494,8 +1585,8 @@ void func_80BEF83C(EnAkindonuts* this, PlayState* play) {
|
||||
}
|
||||
if ((this->actor.home.pos.y + 22.5f) < this->actor.world.pos.y) {
|
||||
this->unk_34C = 0.3f;
|
||||
this->unk_338 = 9;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->unk_338);
|
||||
this->animIndex = ENAKINDONUTS_ANIM_9;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_AKINDONUTS_HIDE);
|
||||
this->actionFunc = func_80BEF9F0;
|
||||
}
|
||||
@ -1513,8 +1604,8 @@ void func_80BEF9F0(EnAkindonuts* this, PlayState* play) {
|
||||
|
||||
if ((this->actor.home.pos.y + 200.0f) < this->actor.world.pos.y) {
|
||||
Math_ApproachF(&this->actor.velocity.y, 0.0f, 0.2f, 1.0f);
|
||||
this->unk_338 = 10;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->unk_338);
|
||||
this->animIndex = ENAKINDONUTS_ANIM_10;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
if (ENAKINDONUTS_GET_3(&this->actor) == ENAKINDONUTS_3_2) {
|
||||
this->unk_32C |= 0x2;
|
||||
}
|
||||
@ -1599,7 +1690,7 @@ void EnAkindonuts_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gBusinessScrubSkel, &gBusinessScrubStandingAnim, this->jointTable,
|
||||
this->morphTable, 28);
|
||||
this->morphTable, BUSINESS_SCRUB_LIMB_MAX);
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
Collider_SetCylinderType1(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 35.0f);
|
||||
@ -1617,10 +1708,10 @@ void EnAkindonuts_Init(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 4);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, ENAKINDONUTS_ANIM_4);
|
||||
this->unk_32C |= 0x2;
|
||||
this->unk_32C |= 0x4;
|
||||
this->unk_338 = 4;
|
||||
this->animIndex = ENAKINDONUTS_ANIM_4;
|
||||
this->csId = this->actor.csId;
|
||||
func_80BEE938(this, play);
|
||||
this->actionFunc = func_80BEEB20;
|
||||
@ -1650,35 +1741,48 @@ void EnAkindonuts_Update(Actor* thisx, PlayState* play) {
|
||||
s32 EnAkindonuts_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
EnAkindonuts* this = THIS;
|
||||
|
||||
if (((this->unk_338 == 4) && (this->unk_33E == 0)) || ((this->unk_338 == 8) && (this->unk_33E == 0)) ||
|
||||
(this->unk_338 == 18) || (this->unk_338 == 2) || (this->unk_338 == 3) || (this->unk_338 == 17) ||
|
||||
(this->unk_338 == 5) || (this->unk_338 == 6) || (this->unk_338 == 7) || (this->unk_338 == 16)) {
|
||||
if ((limbIndex == 16) || (limbIndex == 21) || (limbIndex == 27) || (limbIndex == 23) || (limbIndex == 24) ||
|
||||
(limbIndex == 15)) {
|
||||
if (((this->animIndex == ENAKINDONUTS_ANIM_4) && (this->unk_33E == 0)) ||
|
||||
((this->animIndex == ENAKINDONUTS_ANIM_8) && (this->unk_33E == 0)) ||
|
||||
(this->animIndex == ENAKINDONUTS_ANIM_18) || (this->animIndex == ENAKINDONUTS_ANIM_2) ||
|
||||
(this->animIndex == ENAKINDONUTS_ANIM_3) || (this->animIndex == ENAKINDONUTS_ANIM_17) ||
|
||||
(this->animIndex == ENAKINDONUTS_ANIM_5) || (this->animIndex == ENAKINDONUTS_ANIM_6) ||
|
||||
(this->animIndex == ENAKINDONUTS_ANIM_7) || (this->animIndex == ENAKINDONUTS_ANIM_16)) {
|
||||
if ((limbIndex == BUSINESS_SCRUB_LIMB_RIGHT_HAND_BAG) || (limbIndex == BUSINESS_SCRUB_LIMB_LEFT_HAND_BAG) ||
|
||||
(limbIndex == BUSINESS_SCRUB_LIMB_LEFT_ARM_BAG) || (limbIndex == BUSINESS_SCRUB_LIMB_SCALP) ||
|
||||
(limbIndex == BUSINESS_SCRUB_LIMB_HAIR) || (limbIndex == BUSINESS_SCRUB_LIMB_RIGHT_HAND_HAT)) {
|
||||
*dList = NULL;
|
||||
}
|
||||
} else if ((this->unk_338 == 8) || (this->unk_338 == 19)) {
|
||||
} else if ((this->animIndex == ENAKINDONUTS_ANIM_8) || (this->animIndex == ENAKINDONUTS_ANIM_19)) {
|
||||
switch (this->unk_33E) {
|
||||
case 1:
|
||||
if ((limbIndex == 16) || (limbIndex == 21) || (limbIndex == 27) || (limbIndex == 25)) {
|
||||
if ((limbIndex == BUSINESS_SCRUB_LIMB_RIGHT_HAND_BAG) ||
|
||||
(limbIndex == BUSINESS_SCRUB_LIMB_LEFT_HAND_BAG) ||
|
||||
(limbIndex == BUSINESS_SCRUB_LIMB_LEFT_ARM_BAG) || (limbIndex == BUSINESS_SCRUB_LIMB_HAT)) {
|
||||
*dList = NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case 3:
|
||||
if ((limbIndex == 16) || (limbIndex == 21) || (limbIndex == 27) || (limbIndex == 15) ||
|
||||
(limbIndex == 25)) {
|
||||
if ((limbIndex == BUSINESS_SCRUB_LIMB_RIGHT_HAND_BAG) ||
|
||||
(limbIndex == BUSINESS_SCRUB_LIMB_LEFT_HAND_BAG) ||
|
||||
(limbIndex == BUSINESS_SCRUB_LIMB_LEFT_ARM_BAG) ||
|
||||
(limbIndex == BUSINESS_SCRUB_LIMB_RIGHT_HAND_HAT) || (limbIndex == BUSINESS_SCRUB_LIMB_HAT)) {
|
||||
*dList = NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (((this->unk_338 == 9) || (this->unk_338 == 10)) && ((limbIndex == 15) || (limbIndex == 25))) {
|
||||
} else if (((this->animIndex == ENAKINDONUTS_ANIM_9) || (this->animIndex == ENAKINDONUTS_ANIM_10)) &&
|
||||
((limbIndex == BUSINESS_SCRUB_LIMB_RIGHT_HAND_HAT) || (limbIndex == BUSINESS_SCRUB_LIMB_HAT))) {
|
||||
*dList = NULL;
|
||||
}
|
||||
|
||||
if (limbIndex == 26) {
|
||||
if ((this->unk_338 == 6) || (this->unk_338 == 5) || (this->unk_338 == 7)) {
|
||||
if (limbIndex == BUSINESS_SCRUB_LIMB_EYES) {
|
||||
if ((this->animIndex == ENAKINDONUTS_ANIM_6) || (this->animIndex == ENAKINDONUTS_ANIM_5) ||
|
||||
(this->animIndex == ENAKINDONUTS_ANIM_7)) {
|
||||
*dList = gBusinessScrubEyesWideDL;
|
||||
} else {
|
||||
*dList = gBusinessScrubEyesDL;
|
||||
@ -1693,15 +1797,18 @@ void EnAkindonuts_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3
|
||||
void EnAkindonuts_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) {
|
||||
EnAkindonuts* this = THIS;
|
||||
|
||||
if (((this->unk_33E == 1) || (this->unk_33E == 2)) && ((limbIndex == 23) || (limbIndex == 24))) {
|
||||
if (((this->unk_33E == 1) || (this->unk_33E == 2)) &&
|
||||
((limbIndex == BUSINESS_SCRUB_LIMB_SCALP) || (limbIndex == BUSINESS_SCRUB_LIMB_HAIR))) {
|
||||
Matrix_Scale(this->unk_340, this->unk_344, this->unk_348, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if ((this->unk_338 == 9) && ((limbIndex == 16) || (limbIndex == 21) || (limbIndex == 27))) {
|
||||
if ((this->animIndex == ENAKINDONUTS_ANIM_9) &&
|
||||
((limbIndex == BUSINESS_SCRUB_LIMB_RIGHT_HAND_BAG) || (limbIndex == BUSINESS_SCRUB_LIMB_LEFT_HAND_BAG) ||
|
||||
(limbIndex == BUSINESS_SCRUB_LIMB_LEFT_ARM_BAG))) {
|
||||
Matrix_Scale(this->unk_34C, this->unk_34C, this->unk_34C, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (limbIndex == 24) {
|
||||
if (limbIndex == BUSINESS_SCRUB_LIMB_HAIR) {
|
||||
Matrix_RotateYS(this->unk_352, MTXMODE_APPLY);
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define Z_EN_AKINDONUTS_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_dnt/object_dnt.h"
|
||||
|
||||
struct EnAkindonuts;
|
||||
|
||||
@ -22,15 +23,15 @@ typedef enum {
|
||||
typedef struct EnAkindonuts {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
/* 0x188 */ Vec3s jointTable[28];
|
||||
/* 0x230 */ Vec3s morphTable[28];
|
||||
/* 0x188 */ Vec3s jointTable[BUSINESS_SCRUB_LIMB_MAX];
|
||||
/* 0x230 */ Vec3s morphTable[BUSINESS_SCRUB_LIMB_MAX];
|
||||
/* 0x2D8 */ EnAkindonutsActionFunc actionFunc;
|
||||
/* 0x2DC */ EnAkindonutsUnkFunc unk_2DC;
|
||||
/* 0x2E0 */ ColliderCylinder collider;
|
||||
/* 0x32C */ u16 unk_32C;
|
||||
/* 0x330 */ Path* path;
|
||||
/* 0x334 */ s32 unk_334;
|
||||
/* 0x338 */ s16 unk_338;
|
||||
/* 0x338 */ s16 animIndex;
|
||||
/* 0x33A */ s16 unk_33A;
|
||||
/* 0x33C */ u16 unk_33C;
|
||||
/* 0x33E */ s16 unk_33E;
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
#include "z_en_al.h"
|
||||
#include "objects/object_al/object_al.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_10 | ACTOR_FLAG_20)
|
||||
|
||||
@ -119,11 +118,28 @@ static ColliderCylinderInit sCylinderInit = {
|
||||
|
||||
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
|
||||
|
||||
static AnimationInfoS sAnimationInfo[] = {
|
||||
{ &object_al_Anim_000C54, 1.0f, 0, -1, 0, -4 }, { &object_al_Anim_00DBE0, 1.0f, 0, -1, 0, 0 },
|
||||
{ &object_al_Anim_00DBE0, 1.0f, 0, -1, 0, -4 }, { &object_al_Anim_00ACA0, 1.0f, 0, -1, 2, 0 },
|
||||
{ &object_al_Anim_00ACA0, -1.0f, 0, -1, 2, 0 }, { &object_al_Anim_00CA28, 1.0f, 0, -1, 0, -4 },
|
||||
{ &object_al_Anim_00BCA4, 1.0f, 0, -1, 2, 0 }, { &object_al_Anim_00A764, 1.0f, 0, -1, 0, -4 },
|
||||
typedef enum {
|
||||
/* -1 */ ENAL_ANIM_NONE = -1,
|
||||
/* 0 */ ENAL_ANIM_0,
|
||||
/* 1 */ ENAL_ANIM_1,
|
||||
/* 2 */ ENAL_ANIM_2,
|
||||
/* 3 */ ENAL_ANIM_3,
|
||||
/* 4 */ ENAL_ANIM_4,
|
||||
/* 5 */ ENAL_ANIM_5,
|
||||
/* 6 */ ENAL_ANIM_6,
|
||||
/* 7 */ ENAL_ANIM_7,
|
||||
/* 8 */ ENAL_ANIM_MAX
|
||||
} EnAlAnimation;
|
||||
|
||||
static AnimationInfoS sAnimationInfo[ENAL_ANIM_MAX] = {
|
||||
{ &object_al_Anim_000C54, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // ENAL_ANIM_0
|
||||
{ &object_al_Anim_00DBE0, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENAL_ANIM_1
|
||||
{ &object_al_Anim_00DBE0, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // ENAL_ANIM_2
|
||||
{ &object_al_Anim_00ACA0, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENAL_ANIM_3
|
||||
{ &object_al_Anim_00ACA0, -1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENAL_ANIM_4
|
||||
{ &object_al_Anim_00CA28, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // ENAL_ANIM_5
|
||||
{ &object_al_Anim_00BCA4, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENAL_ANIM_6
|
||||
{ &object_al_Anim_00A764, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // ENAL_ANIM_7
|
||||
};
|
||||
|
||||
Vec3f D_80BE0070 = { 1000.0f, 0.0f, 0.0f };
|
||||
@ -159,30 +175,30 @@ Actor* func_80BDE1A0(EnAl* this, PlayState* play, u8 arg0, s16 arg1) {
|
||||
return foundActor;
|
||||
}
|
||||
|
||||
void func_80BDE250(EnAl* this) {
|
||||
this->skelAnime.playSpeed = this->unk_4C8;
|
||||
void EnAl_UpdateSkelAnime(EnAl* this) {
|
||||
this->skelAnime.playSpeed = this->animPlaySpeed;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
|
||||
s32 func_80BDE27C(EnAl* this, s32 arg1) {
|
||||
s32 phi_v1 = false;
|
||||
s32 ret = false;
|
||||
s32 EnAl_ChangeAnim(EnAl* this, s32 animIndex) {
|
||||
s32 changeAnim = false;
|
||||
s32 didAnimChange = false;
|
||||
|
||||
if ((arg1 == 1) || (arg1 == 2)) {
|
||||
if ((this->unk_4F8 != 1) && (this->unk_4F8 != 2)) {
|
||||
phi_v1 = true;
|
||||
if ((animIndex == ENAL_ANIM_1) || (animIndex == ENAL_ANIM_2)) {
|
||||
if ((this->animIndex != ENAL_ANIM_1) && (this->animIndex != ENAL_ANIM_2)) {
|
||||
changeAnim = true;
|
||||
}
|
||||
} else if (arg1 != this->unk_4F8) {
|
||||
phi_v1 = true;
|
||||
} else if (this->animIndex != animIndex) {
|
||||
changeAnim = true;
|
||||
}
|
||||
|
||||
if (phi_v1) {
|
||||
this->unk_4F8 = arg1;
|
||||
ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg1);
|
||||
this->unk_4C8 = this->skelAnime.playSpeed;
|
||||
if (changeAnim) {
|
||||
this->animIndex = animIndex;
|
||||
didAnimChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
this->animPlaySpeed = this->skelAnime.playSpeed;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return didAnimChange;
|
||||
}
|
||||
|
||||
void func_80BDE318(EnAl* this, PlayState* play) {
|
||||
@ -258,7 +274,7 @@ s32 func_80BDE4E0(EnAl* this, s16* arg1, s16 arg2) {
|
||||
|
||||
if (arg2 == *arg1) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_CHAIR_ROLL);
|
||||
func_80BDE27C(this, 3);
|
||||
EnAl_ChangeAnim(this, ENAL_ANIM_3);
|
||||
this->unk_4E8 = 0;
|
||||
(*arg1)++;
|
||||
}
|
||||
@ -272,7 +288,7 @@ s32 func_80BDE4E0(EnAl* this, s16* arg1, s16 arg2) {
|
||||
if ((temp != (this->actor.world.rot.y / 364)) && (this->unk_4E8 < 20)) {
|
||||
Math_ApproachS(&this->actor.world.rot.y, sp42, 3, 0x2AA8);
|
||||
} else {
|
||||
func_80BDE27C(this, 5);
|
||||
EnAl_ChangeAnim(this, ENAL_ANIM_5);
|
||||
this->actor.world.rot.y = sp42;
|
||||
this->unk_4E8 = 0;
|
||||
(*arg1)++;
|
||||
@ -293,7 +309,7 @@ s32 func_80BDE678(EnAl* this, s16* arg1, s16 arg2) {
|
||||
|
||||
if (arg2 == *arg1) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_CHAIR_ROLL);
|
||||
func_80BDE27C(this, 4);
|
||||
EnAl_ChangeAnim(this, ENAL_ANIM_4);
|
||||
this->unk_4E8 = 0;
|
||||
(*arg1)++;
|
||||
}
|
||||
@ -305,7 +321,7 @@ s32 func_80BDE678(EnAl* this, s16* arg1, s16 arg2) {
|
||||
if ((temp != (this->actor.world.rot.y / 364)) && (this->unk_4E8 < 20)) {
|
||||
Math_ApproachS(&this->actor.world.rot.y, sp22, 3, 0x2AA8);
|
||||
} else {
|
||||
func_80BDE27C(this, 2);
|
||||
EnAl_ChangeAnim(this, ENAL_ANIM_2);
|
||||
this->actor.world.rot.y = sp22;
|
||||
this->unk_4E8 = 0;
|
||||
(*arg1)++;
|
||||
@ -353,6 +369,9 @@ s32 func_80BDE7FC(EnAl* this, PlayState* play) {
|
||||
this->unk_4E6++;
|
||||
sp20 = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return sp20;
|
||||
}
|
||||
@ -424,6 +443,9 @@ s32 func_80BDEA14(EnAl* this, PlayState* play) {
|
||||
sp18 = true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return sp18;
|
||||
}
|
||||
@ -470,8 +492,10 @@ s32* func_80BDEABC(EnAl* this, PlayState* play) {
|
||||
return D_80BDFF24;
|
||||
}
|
||||
return D_80BDFDF8;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
s32 func_80BDEC2C(EnAl* this, PlayState* play) {
|
||||
@ -548,12 +572,12 @@ void func_80BDEE5C(EnAl* this) {
|
||||
|
||||
void func_80BDEF3C(EnAl* this, PlayState* play) {
|
||||
if (this->unk_4E4 == 0) {
|
||||
func_80BDE27C(this, 7);
|
||||
EnAl_ChangeAnim(this, ENAL_ANIM_7);
|
||||
this->unk_4C2 &= ~0x20;
|
||||
this->unk_4C2 |= 0x200;
|
||||
this->unk_4E4++;
|
||||
} else if ((this->unk_4E4 == 1) && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
func_80BDE27C(this, 0);
|
||||
EnAl_ChangeAnim(this, ENAL_ANIM_0);
|
||||
this->unk_4C2 &= ~0x200;
|
||||
this->unk_4C2 |= 0x20;
|
||||
this->unk_4E4++;
|
||||
@ -562,10 +586,10 @@ void func_80BDEF3C(EnAl* this, PlayState* play) {
|
||||
|
||||
void func_80BDEFE4(EnAl* this, PlayState* play) {
|
||||
if (this->unk_4E4 == 0) {
|
||||
func_80BDE27C(this, 6);
|
||||
EnAl_ChangeAnim(this, ENAL_ANIM_6);
|
||||
this->unk_4E4 += 1;
|
||||
} else if ((this->unk_4E4 == 1) && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
func_80BDE27C(this, 5);
|
||||
EnAl_ChangeAnim(this, ENAL_ANIM_5);
|
||||
this->unk_4E4 += 1;
|
||||
}
|
||||
}
|
||||
@ -619,7 +643,10 @@ s32 func_80BDF064(EnAl* this, PlayState* play) {
|
||||
case 0x2B19:
|
||||
case 0x2B20:
|
||||
case 0x2B3C:
|
||||
func_80BDE27C(this, 5);
|
||||
EnAl_ChangeAnim(this, ENAL_ANIM_5);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -642,7 +669,7 @@ s32 func_80BDF244(EnAl* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
Actor* temp_v0 = func_80BDE1A0(this, play, ACTORCAT_NPC, ACTOR_EN_TOTO);
|
||||
|
||||
if ((sp20 != NULL) && (sp20->update != NULL) && (temp_v0 != NULL) && (temp_v0->update != NULL)) {
|
||||
func_80BDE27C(this, 0);
|
||||
EnAl_ChangeAnim(this, ENAL_ANIM_0);
|
||||
SubS_UpdateFlags(&this->unk_4C2, 3, 7);
|
||||
this->unk_368 = sp20;
|
||||
this->unk_4C2 |= 0x20;
|
||||
@ -656,13 +683,16 @@ s32 func_80BDF308(EnAl* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
|
||||
switch (scheduleOutput->result) {
|
||||
case 1:
|
||||
func_80BDE27C(this, 0);
|
||||
EnAl_ChangeAnim(this, ENAL_ANIM_0);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
this->unk_4F0 = PLAYER_IA_NONE;
|
||||
this->unk_4EA = 0;
|
||||
func_80BDE27C(this, 2);
|
||||
EnAl_ChangeAnim(this, ENAL_ANIM_2);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
@ -741,6 +771,9 @@ void func_80BDF578(EnAl* this, PlayState* play) {
|
||||
case 2:
|
||||
func_80BDF414(this, play);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Math_ApproachS(&this->actor.shape.rot.y, this->actor.world.rot.y, 3, 0x2AA8);
|
||||
@ -784,8 +817,8 @@ void EnAl_Init(Actor* thisx, PlayState* play) {
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gMadameAromaSkel, NULL, this->jointTable, this->morphTable,
|
||||
MADAME_AROMA_LIMB_MAX);
|
||||
this->unk_4F8 = -1;
|
||||
func_80BDE27C(this, 1);
|
||||
this->animIndex = ENAL_ANIM_NONE;
|
||||
EnAl_ChangeAnim(this, ENAL_ANIM_1);
|
||||
Collider_InitAndSetCylinder(play, &this->unk_310, &this->actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0x16), &sColChkInfoInit);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
@ -811,7 +844,7 @@ void EnAl_Update(Actor* thisx, PlayState* play) {
|
||||
func_80BDF064(this, play);
|
||||
|
||||
if (this->unk_35C != 0) {
|
||||
func_80BDE250(this);
|
||||
EnAl_UpdateSkelAnime(this);
|
||||
func_80BDEE5C(this);
|
||||
func_8013C964(&this->actor, play, this->unk_4D4, 30.0f, this->unk_4F0, this->unk_4C2 & 7);
|
||||
func_80BDE318(this, play);
|
||||
@ -831,6 +864,9 @@ s32 EnAl_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
||||
|
||||
case MADAME_AROMA_LIMB_HEAD:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -867,6 +903,9 @@ void EnAl_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
||||
Matrix_MultVec3f(&D_80BE0070, &this->actor.focus.pos);
|
||||
Math_Vec3s_Copy(&this->actor.focus.rot, &this->actor.world.rot);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -887,7 +926,7 @@ void EnAl_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) {
|
||||
stepRot = false;
|
||||
}
|
||||
|
||||
if (limbIndex == 16) {
|
||||
if (limbIndex == MADAME_AROMA_LIMB_HEAD) {
|
||||
SubS_UpdateLimb(this->unk_4DC + 0x4000, this->unk_4DE + this->actor.shape.rot.y + 0x4000, &this->unk_36C,
|
||||
&this->unk_378, stepRot, overrideRot);
|
||||
Matrix_Pop();
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define Z_EN_AL_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_al/object_al.h"
|
||||
|
||||
struct EnAl;
|
||||
|
||||
@ -22,14 +23,14 @@ typedef struct EnAl {
|
||||
/* 0x368 */ Actor* unk_368;
|
||||
/* 0x36C */ Vec3f unk_36C;
|
||||
/* 0x378 */ Vec3s unk_378;
|
||||
/* 0x37E */ Vec3s jointTable[27];
|
||||
/* 0x420 */ Vec3s morphTable[27];
|
||||
/* 0x37E */ Vec3s jointTable[MADAME_AROMA_LIMB_MAX];
|
||||
/* 0x420 */ Vec3s morphTable[MADAME_AROMA_LIMB_MAX];
|
||||
/* 0x4C2 */ u16 unk_4C2;
|
||||
/* 0x4C4 */ u16 unk_4C4;
|
||||
/* 0x4C8 */ f32 unk_4C8;
|
||||
/* 0x4CC */ UNK_TYPE1 unk4CC[8];
|
||||
/* 0x4C8 */ f32 animPlaySpeed;
|
||||
/* 0x4CC */ UNK_TYPE1 unk4CC[0x8];
|
||||
/* 0x4D4 */ f32 unk_4D4;
|
||||
/* 0x4D8 */ UNK_TYPE1 unk4D8[4];
|
||||
/* 0x4D8 */ UNK_TYPE1 unk4D8[0x4];
|
||||
/* 0x4DC */ s16 unk_4DC;
|
||||
/* 0x4DE */ s16 unk_4DE;
|
||||
/* 0x4E0 */ s16 unk_4E0;
|
||||
@ -41,8 +42,8 @@ typedef struct EnAl {
|
||||
/* 0x4EC */ EnAlUnkFunc unk_4EC;
|
||||
/* 0x4F0 */ s32 unk_4F0;
|
||||
/* 0x4F4 */ s32 unk_4F4;
|
||||
/* 0x4F8 */ s32 unk_4F8;
|
||||
/* 0x4FC */ UNK_TYPE1 unk4FC[4];
|
||||
/* 0x4F8 */ s32 animIndex;
|
||||
/* 0x4FC */ UNK_TYPE1 unk4FC[0x4];
|
||||
} EnAl; // size = 0x500
|
||||
|
||||
#endif // Z_EN_AL_H
|
||||
|
@ -203,9 +203,9 @@ void EnAm_SpawnEffects(EnAm* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_808AFF9C(EnAm* this) {
|
||||
f32 lastFrame = Animation_GetLastFrame(&gArmosPushedBackAnim);
|
||||
f32 endFrame = Animation_GetLastFrame(&gArmosPushedBackAnim);
|
||||
|
||||
Animation_Change(&this->skelAnime, &gArmosPushedBackAnim, 0.0f, lastFrame, lastFrame, ANIMMODE_LOOP, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &gArmosPushedBackAnim, 0.0f, endFrame, endFrame, ANIMMODE_LOOP, 0.0f);
|
||||
this->enemyCollider.info.bumper.dmgFlags = 0x80000088;
|
||||
this->interactCollider.info.bumper.dmgFlags = 0x77CFFF77;
|
||||
if (this->actor.colChkInfo.health != 0) {
|
||||
@ -379,8 +379,9 @@ void func_808B066C(EnAm* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnAm_TakeDamage(EnAm* this, PlayState* play) {
|
||||
Animation_Change(&this->skelAnime, &gArmosTakeDamageAnim, 1.0f, 4.0f,
|
||||
Animation_GetLastFrame(&gArmosTakeDamageAnim) - 6, ANIMMODE_ONCE, 0.0f);
|
||||
f32 endFrame = Animation_GetLastFrame(&gArmosTakeDamageAnim) - 6;
|
||||
|
||||
Animation_Change(&this->skelAnime, &gArmosTakeDamageAnim, 1.0f, 4.0f, endFrame, ANIMMODE_ONCE, 0.0f);
|
||||
func_800BE504(&this->actor, &this->enemyCollider);
|
||||
this->actor.speed = 6.0f;
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA,
|
||||
@ -539,16 +540,16 @@ void EnAm_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
||||
|
||||
phi_s2 = 0;
|
||||
phi_s1 = 0;
|
||||
if (limbIndex == 4) {
|
||||
if (limbIndex == OBJECT_AM_LIMB_04) {
|
||||
phi_s2 = &this->limbPos[0];
|
||||
phi_s1 = D_808B1128;
|
||||
phi_s3 = 5;
|
||||
} else if (limbIndex == 13) {
|
||||
} else if (limbIndex == OBJECT_AM_LIMB_0D) {
|
||||
phi_s2 = &this->limbPos[9];
|
||||
phi_s1 = D_808B117C;
|
||||
phi_s3 = 4;
|
||||
} else if ((limbIndex == 7) || (limbIndex == 10)) {
|
||||
phi_s2 = (limbIndex == 7) ? &this->limbPos[5] : &this->limbPos[7];
|
||||
} else if ((limbIndex == OBJECT_AM_LIMB_07) || (limbIndex == OBJECT_AM_LIMB_0A)) {
|
||||
phi_s2 = (limbIndex == OBJECT_AM_LIMB_07) ? &this->limbPos[5] : &this->limbPos[7];
|
||||
phi_s1 = D_808B1164;
|
||||
phi_s3 = 2;
|
||||
} else {
|
||||
|
@ -29,25 +29,38 @@ ActorInit En_And_InitVars = {
|
||||
(ActorFunc)EnAnd_Draw,
|
||||
};
|
||||
|
||||
static AnimationInfoS sAnimationInfo[] = {
|
||||
{ &gAndStaticAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gAndIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gAndWalkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gAndRaiseHeadAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gAndRaisedHeadLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gAndRaiseHandAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gAndRaisedHandLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gAndRaisedHandWalkAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
typedef enum {
|
||||
/* -1 */ ENAND_ANIM_NONE = -1,
|
||||
/* 0 */ ENAND_ANIM_0,
|
||||
/* 1 */ ENAND_ANIM_1,
|
||||
/* 2 */ ENAND_ANIM_2,
|
||||
/* 3 */ ENAND_ANIM_3,
|
||||
/* 4 */ ENAND_ANIM_4,
|
||||
/* 5 */ ENAND_ANIM_5,
|
||||
/* 6 */ ENAND_ANIM_6,
|
||||
/* 7 */ ENAND_ANIM_7,
|
||||
/* 8 */ ENAND_ANIM_MAX
|
||||
} EnAndAnimation;
|
||||
|
||||
static AnimationInfoS sAnimationInfo[ENAND_ANIM_MAX] = {
|
||||
{ &gAndStaticAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENAND_ANIM_0
|
||||
{ &gAndIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENAND_ANIM_1
|
||||
{ &gAndWalkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENAND_ANIM_2
|
||||
{ &gAndRaiseHeadAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENAND_ANIM_3
|
||||
{ &gAndRaisedHeadLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENAND_ANIM_4
|
||||
{ &gAndRaiseHandAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENAND_ANIM_5
|
||||
{ &gAndRaisedHandLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENAND_ANIM_6
|
||||
{ &gAndRaisedHandWalkAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENAND_ANIM_7
|
||||
};
|
||||
|
||||
s32 EnAnd_ChangeAnim(EnAnd* this, s32 animIndex) {
|
||||
s32 ret = false;
|
||||
s32 didAnimChange = false;
|
||||
|
||||
if (this->animIndex != animIndex) {
|
||||
this->animIndex = animIndex;
|
||||
ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
didAnimChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
}
|
||||
return ret;
|
||||
return didAnimChange;
|
||||
}
|
||||
|
||||
void EnAnd_Blink(EnAnd* this) {
|
||||
@ -61,8 +74,10 @@ void EnAnd_Blink(EnAnd* this) {
|
||||
}
|
||||
|
||||
void EnAnd_HandleCutscene(EnAnd* this, PlayState* play) {
|
||||
s32 csAnimations[] = { 0, 1, 2, 3, 5, 7 };
|
||||
u16 cueType;
|
||||
s32 csAnimIndex[] = {
|
||||
ENAND_ANIM_0, ENAND_ANIM_1, ENAND_ANIM_2, ENAND_ANIM_3, ENAND_ANIM_5, ENAND_ANIM_7,
|
||||
};
|
||||
u16 cueId;
|
||||
s32 cueChannel;
|
||||
|
||||
if (play->csCtx.state != CS_STATE_IDLE) {
|
||||
@ -74,15 +89,15 @@ void EnAnd_HandleCutscene(EnAnd* this, PlayState* play) {
|
||||
}
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_565)) {
|
||||
cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_565);
|
||||
cueType = play->csCtx.actorCues[cueChannel]->id;
|
||||
if (this->cueId != (u8)cueType) {
|
||||
this->cueId = cueType;
|
||||
EnAnd_ChangeAnim(this, csAnimations[cueType]);
|
||||
cueId = play->csCtx.actorCues[cueChannel]->id;
|
||||
if (this->cueId != (u8)cueId) {
|
||||
this->cueId = cueId;
|
||||
EnAnd_ChangeAnim(this, csAnimIndex[cueId]);
|
||||
}
|
||||
switch (this->cueId) {
|
||||
case 3:
|
||||
case 4:
|
||||
if ((this->animIndex == 3) || (this->animIndex == 5)) {
|
||||
if ((this->animIndex == ENAND_ANIM_3) || (this->animIndex == ENAND_ANIM_5)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
EnAnd_ChangeAnim(this, this->animIndex + 1);
|
||||
}
|
||||
@ -106,8 +121,8 @@ void EnAnd_Init(Actor* thisx, PlayState* play) {
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 14.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gAndSkel, NULL, this->jointTable, this->morphTable,
|
||||
OBJECT_AND_LIMB_MAX);
|
||||
this->animIndex = -1;
|
||||
EnAnd_ChangeAnim(this, 0);
|
||||
this->animIndex = ENAND_ANIM_NONE;
|
||||
EnAnd_ChangeAnim(this, ENAND_ANIM_0);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->flags |= 8;
|
||||
|
@ -45,12 +45,13 @@ ActorInit En_Aob_01_InitVars = {
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ EN_AOB01_ANIM_IDLE_1,
|
||||
/* 0 */ EN_AOB01_ANIM_IDLE,
|
||||
/* 1 */ EN_AOB01_ANIM_LAUGH_START,
|
||||
/* 2 */ EN_AOB01_ANIM_LAUGH_LOOP,
|
||||
/* 3 */ EN_AOB01_ANIM_SURPRISE_START,
|
||||
/* 4 */ EN_AOB01_ANIM_SURPRISE_LOOP,
|
||||
/* 5 */ EN_AOB01_ANIM_IDLE_2
|
||||
/* 5 */ EN_AOB01_ANIM_IDLE_MORPH,
|
||||
/* 6 */ EN_AOB01_ANIM_MAX
|
||||
} EnAob01Animation;
|
||||
|
||||
typedef enum {
|
||||
@ -60,13 +61,13 @@ typedef enum {
|
||||
/* 3 */ EN_AOB01_EYE_MAX
|
||||
} EnAob01EyeTexture;
|
||||
|
||||
static AnimationInfo sAnimationInfo[] = {
|
||||
{ &gMamamuYanIdleAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gMamamuYanLaughStartAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &gMamamuYanLaughLoopAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gMamamuYanSurpriseStartAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &gMamamuYanSurpriseLoopAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gMamamuYanIdleAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -6.0f },
|
||||
static AnimationInfo sAnimationInfo[EN_AOB01_ANIM_MAX] = {
|
||||
{ &gMamamuYanIdleAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, // EN_AOB01_ANIM_IDLE
|
||||
{ &gMamamuYanLaughStartAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f }, // EN_AOB01_ANIM_LAUGH_START
|
||||
{ &gMamamuYanLaughLoopAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, // EN_AOB01_ANIM_LAUGH_LOOP
|
||||
{ &gMamamuYanSurpriseStartAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f }, // EN_AOB01_ANIM_SURPRISE_START
|
||||
{ &gMamamuYanSurpriseLoopAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, // EN_AOB01_ANIM_SURPRISE_LOOP
|
||||
{ &gMamamuYanIdleAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -6.0f }, // EN_AOB01_ANIM_IDLE_MORPH
|
||||
};
|
||||
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
@ -182,10 +183,10 @@ void EnAob01_SpawnRacedogs(EnAob01* this, PlayState* play) {
|
||||
*/
|
||||
s32 EnAob01_ProcessLaughAnim(EnAob01* this) {
|
||||
s16 curFrame = this->skelAnime.curFrame;
|
||||
s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation);
|
||||
s16 endFrame = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation);
|
||||
|
||||
if (this->animIndex == EN_AOB01_ANIM_LAUGH_START) {
|
||||
if (curFrame == lastFrame) {
|
||||
if (curFrame == endFrame) {
|
||||
this->animIndex = EN_AOB01_ANIM_LAUGH_LOOP;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_AOB01_ANIM_LAUGH_LOOP);
|
||||
return true;
|
||||
@ -206,16 +207,16 @@ s32 EnAob01_ProcessLaughAnim(EnAob01* this) {
|
||||
*/
|
||||
s32 EnAob01_ProcessSurpriseAnim(EnAob01* this) {
|
||||
s16 curFrame = this->skelAnime.curFrame;
|
||||
s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation);
|
||||
s16 endFrame = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation);
|
||||
|
||||
if ((this->animIndex == EN_AOB01_ANIM_IDLE_1) || (this->animIndex == EN_AOB01_ANIM_IDLE_2)) {
|
||||
if (curFrame == lastFrame) {
|
||||
if ((this->animIndex == EN_AOB01_ANIM_IDLE) || (this->animIndex == EN_AOB01_ANIM_IDLE_MORPH)) {
|
||||
if (curFrame == endFrame) {
|
||||
this->animIndex = EN_AOB01_ANIM_SURPRISE_START;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_AOB01_ANIM_SURPRISE_START);
|
||||
return true;
|
||||
}
|
||||
} else if (this->animIndex == EN_AOB01_ANIM_SURPRISE_START) {
|
||||
if (curFrame == lastFrame) {
|
||||
if (curFrame == endFrame) {
|
||||
this->animIndex = EN_AOB01_ANIM_SURPRISE_LOOP;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_AOB01_ANIM_SURPRISE_LOOP);
|
||||
return true;
|
||||
@ -234,12 +235,12 @@ s32 EnAob01_ProcessSurpriseAnim(EnAob01* this) {
|
||||
*/
|
||||
s32 EnAob01_ProcessIdleAnim(EnAob01* this) {
|
||||
s16 curFrame = this->skelAnime.curFrame;
|
||||
s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation);
|
||||
s16 endFrame = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation);
|
||||
|
||||
if ((this->animIndex != EN_AOB01_ANIM_IDLE_1) && (this->animIndex != EN_AOB01_ANIM_IDLE_2)) {
|
||||
if (curFrame == lastFrame) {
|
||||
this->animIndex = EN_AOB01_ANIM_IDLE_2;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_AOB01_ANIM_IDLE_2);
|
||||
if ((this->animIndex != EN_AOB01_ANIM_IDLE) && (this->animIndex != EN_AOB01_ANIM_IDLE_MORPH)) {
|
||||
if (curFrame == endFrame) {
|
||||
this->animIndex = EN_AOB01_ANIM_IDLE_MORPH;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_AOB01_ANIM_IDLE_MORPH);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
@ -1105,8 +1106,8 @@ void EnAob01_Init(Actor* thisx, PlayState* play) {
|
||||
MAMAMU_YAN_LIMB_MAX);
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
this->animIndex = EN_AOB01_ANIM_IDLE_1;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_AOB01_ANIM_IDLE_1);
|
||||
this->animIndex = EN_AOB01_ANIM_IDLE;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_AOB01_ANIM_IDLE);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
|
||||
switch (GET_EVENTINF_DOG_RACE_STATE) {
|
||||
|
@ -85,7 +85,7 @@ void EnArrow_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
if (ARROW_IS_ARROW(this->actor.params)) {
|
||||
SkelAnime_Init(play, &this->arrow.skelAnime, &gameplay_keep_Skel_014560, &gameplay_keep_Anim_0128BC,
|
||||
this->arrow.jointTable, this->arrow.jointTable, 5);
|
||||
this->arrow.jointTable, this->arrow.jointTable, ARROW_LIMB_MAX);
|
||||
if (this->actor.params < ARROW_TYPE_FIRE) {
|
||||
if (this->actor.params == ARROW_TYPE_NORMAL_HORSE) {
|
||||
D_8088C234.elemDuration = 4;
|
||||
@ -193,6 +193,9 @@ void func_8088A594(EnArrow* this, PlayState* play) {
|
||||
case ARROW_TYPE_DEKU_BUBBLE:
|
||||
Player_PlaySfx(player, NA_SE_PL_DEKUNUTS_FIRE);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
this->actionFunc = func_8088ACE0;
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define Z_EN_ARROW_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
struct EnArrow;
|
||||
|
||||
@ -34,7 +35,7 @@ typedef enum ArrowMagic {
|
||||
|
||||
typedef struct {
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
/* 0x188 */ Vec3s jointTable[5];
|
||||
/* 0x188 */ Vec3s jointTable[ARROW_LIMB_MAX];
|
||||
} EnArrowArrow; // size = 0x1A8
|
||||
|
||||
typedef struct {
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
#include "z_en_az.h"
|
||||
#include "objects/object_az/object_az.h"
|
||||
#include "overlays/actors/ovl_En_Twig/z_en_twig.h"
|
||||
#include "overlays/actors/ovl_En_Fish/z_en_fish.h"
|
||||
|
||||
@ -59,6 +58,7 @@ void func_80A97EAC(EnAz* this, PlayState* play);
|
||||
void func_80A97F9C(EnAz* this, PlayState* play);
|
||||
|
||||
typedef enum {
|
||||
/* -1 */ BEAVER_ANIM_NONE = -1,
|
||||
/* 0 */ BEAVER_ANIM_IDLE,
|
||||
/* 1 */ BEAVER_ANIM_WALK,
|
||||
/* 2 */ BEAVER_ANIM_SWIM_WITH_SPINNING_TAIL,
|
||||
@ -72,24 +72,25 @@ typedef enum {
|
||||
/* 10 */ BEAVER_ANIM_TALK_TO_RIGHT,
|
||||
/* 11 */ BEAVER_ANIM_BOW,
|
||||
/* 12 */ BEAVER_ANIM_IDLE_FACE_LEFT,
|
||||
/* 13 */ BEAVER_ANIM_IDLE_FACE_RIGHT
|
||||
/* 13 */ BEAVER_ANIM_IDLE_FACE_RIGHT,
|
||||
/* 14 */ BEAVER_ANIM_IDLE_FACE_MAX
|
||||
} BeaverAnimation;
|
||||
|
||||
static AnimationSpeedInfo sAnimationInfo[] = {
|
||||
{ &gBeaverIdleAnim, 1.0f, ANIMMODE_LOOP, -10.0f },
|
||||
{ &gBeaverWalkAnim, 1.0f, ANIMMODE_LOOP, -5.0f },
|
||||
{ &gBeaverSwimWithSpinningTail, 1.0f, ANIMMODE_LOOP, -5.0f },
|
||||
{ &gBeaverSwimWithRaisedTail, 1.0f, ANIMMODE_LOOP, -5.0f },
|
||||
{ &gBeaverTalkAnim, 1.0f, ANIMMODE_LOOP, -5.0f },
|
||||
{ &gBeaverTalkWaveArmsAnim, 1.0f, ANIMMODE_LOOP, -5.0f },
|
||||
{ &gBeaverLaughRightAnim, 1.0f, ANIMMODE_LOOP, -5.0f },
|
||||
{ &gBeaverLaughLeftAnim, 1.0f, ANIMMODE_LOOP, -5.0f },
|
||||
{ &gBeaverSwimAnim, 2.0f, ANIMMODE_LOOP, -5.0f },
|
||||
{ &gBeaverTalkToLeftAnim, 1.0f, ANIMMODE_LOOP, -5.0f },
|
||||
{ &gBeaverTalkToRightAnim, 1.0f, ANIMMODE_LOOP, -5.0f },
|
||||
{ &gBeaverBowAnim, 1.0f, ANIMMODE_ONCE, -5.0f },
|
||||
{ &gBeaverIdleFaceLeftAnim, 1.0f, ANIMMODE_LOOP, -5.0f },
|
||||
{ &gBeaverIdleFaceRightAnim, 1.0f, ANIMMODE_LOOP, -5.0f },
|
||||
static AnimationSpeedInfo sAnimationSpeedInfo[BEAVER_ANIM_IDLE_FACE_MAX] = {
|
||||
{ &gBeaverIdleAnim, 1.0f, ANIMMODE_LOOP, -10.0f }, // BEAVER_ANIM_IDLE
|
||||
{ &gBeaverWalkAnim, 1.0f, ANIMMODE_LOOP, -5.0f }, // BEAVER_ANIM_WALK
|
||||
{ &gBeaverSwimWithSpinningTail, 1.0f, ANIMMODE_LOOP, -5.0f }, // BEAVER_ANIM_SWIM_WITH_SPINNING_TAIL
|
||||
{ &gBeaverSwimWithRaisedTail, 1.0f, ANIMMODE_LOOP, -5.0f }, // BEAVER_ANIM_SWIM_WITH_RAISED_TAIL
|
||||
{ &gBeaverTalkAnim, 1.0f, ANIMMODE_LOOP, -5.0f }, // BEAVER_ANIM_TALK
|
||||
{ &gBeaverTalkWaveArmsAnim, 1.0f, ANIMMODE_LOOP, -5.0f }, // BEAVER_ANIM_TALK_WAVE_ARMS
|
||||
{ &gBeaverLaughRightAnim, 1.0f, ANIMMODE_LOOP, -5.0f }, // BEAVER_ANIM_LAUGH_RIGHT
|
||||
{ &gBeaverLaughLeftAnim, 1.0f, ANIMMODE_LOOP, -5.0f }, // BEAVER_ANIM_LAUGH_LEFT
|
||||
{ &gBeaverSwimAnim, 2.0f, ANIMMODE_LOOP, -5.0f }, // BEAVER_ANIM_SWIM
|
||||
{ &gBeaverTalkToLeftAnim, 1.0f, ANIMMODE_LOOP, -5.0f }, // BEAVER_ANIM_TALK_TO_LEFT
|
||||
{ &gBeaverTalkToRightAnim, 1.0f, ANIMMODE_LOOP, -5.0f }, // BEAVER_ANIM_TALK_TO_RIGHT
|
||||
{ &gBeaverBowAnim, 1.0f, ANIMMODE_ONCE, -5.0f }, // BEAVER_ANIM_BOW
|
||||
{ &gBeaverIdleFaceLeftAnim, 1.0f, ANIMMODE_LOOP, -5.0f }, // BEAVER_ANIM_IDLE_FACE_LEFT
|
||||
{ &gBeaverIdleFaceRightAnim, 1.0f, ANIMMODE_LOOP, -5.0f }, // BEAVER_ANIM_IDLE_FACE_RIGHT
|
||||
};
|
||||
|
||||
ActorInit En_Az_InitVars = {
|
||||
@ -211,30 +212,37 @@ void EnAz_Init(Actor* thisx, PlayState* play2) {
|
||||
(gSaveContext.save.entrance == ENTRANCE(WATERFALL_RAPIDS, 0)) && CHECK_WEEKEVENTREG(WEEKEVENTREG_93_01);
|
||||
phi_v1 = !phi_v1;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
phi_v1 = (gSaveContext.save.entrance != ENTRANCE(WATERFALL_RAPIDS, 1)) ||
|
||||
!CHECK_WEEKEVENTREG(WEEKEVENTREG_24_04);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
phi_v1 = gSaveContext.save.entrance != ENTRANCE(WATERFALL_RAPIDS, 2);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
phi_v1 =
|
||||
(gSaveContext.save.entrance == ENTRANCE(WATERFALL_RAPIDS, 0)) && CHECK_WEEKEVENTREG(WEEKEVENTREG_93_01);
|
||||
phi_v1 = !phi_v1;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
phi_v1 =
|
||||
(gSaveContext.save.entrance != ENTRANCE(WATERFALL_RAPIDS, 1)) || CHECK_WEEKEVENTREG(WEEKEVENTREG_24_04);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
phi_v1 = gSaveContext.save.entrance != ENTRANCE(WATERFALL_RAPIDS, 2);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
phi_v1 = (gSaveContext.save.entrance == ENTRANCE(WATERFALL_RAPIDS, 0)) &&
|
||||
!CHECK_WEEKEVENTREG(WEEKEVENTREG_93_01);
|
||||
phi_v1 = !phi_v1;
|
||||
break;
|
||||
|
||||
default:
|
||||
phi_v1 = true;
|
||||
break;
|
||||
@ -278,16 +286,16 @@ void EnAz_Init(Actor* thisx, PlayState* play2) {
|
||||
this->unk_374 |= 0x100;
|
||||
this->unk_376 |= 0x100;
|
||||
}
|
||||
Animation_Change(&this->skelAnime, sAnimationInfo[BEAVER_ANIM_IDLE].animation, 1.0f,
|
||||
Animation_GetLastFrame(sAnimationInfo[BEAVER_ANIM_IDLE].animation) * Rand_ZeroOne(),
|
||||
Animation_GetLastFrame(sAnimationInfo[BEAVER_ANIM_IDLE].animation),
|
||||
sAnimationInfo[BEAVER_ANIM_IDLE].mode, sAnimationInfo[BEAVER_ANIM_IDLE].morphFrames);
|
||||
Animation_Change(&this->skelAnime, sAnimationSpeedInfo[BEAVER_ANIM_IDLE].animation, 1.0f,
|
||||
Animation_GetLastFrame(sAnimationSpeedInfo[BEAVER_ANIM_IDLE].animation) * Rand_ZeroOne(),
|
||||
Animation_GetLastFrame(sAnimationSpeedInfo[BEAVER_ANIM_IDLE].animation),
|
||||
sAnimationSpeedInfo[BEAVER_ANIM_IDLE].mode, sAnimationSpeedInfo[BEAVER_ANIM_IDLE].morphFrames);
|
||||
this->unk_37E = 0;
|
||||
this->unk_380 = 0;
|
||||
this->unk_384 = 0;
|
||||
this->actor.gravity = -1.0f;
|
||||
this->unk_376 = this->unk_374;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE, &this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE, &this->animIndex);
|
||||
this->skelAnime.curFrame = Rand_ZeroOne() * this->skelAnime.endFrame;
|
||||
|
||||
switch (gSaveContext.save.entrance) {
|
||||
@ -310,6 +318,7 @@ void EnAz_Init(Actor* thisx, PlayState* play2) {
|
||||
func_80A95DA0(this, play);
|
||||
}
|
||||
break;
|
||||
|
||||
case ENTRANCE(WATERFALL_RAPIDS, 3):
|
||||
this->unk_2FA = 0;
|
||||
if (!(this->unk_374 & 2)) {
|
||||
@ -320,6 +329,7 @@ void EnAz_Init(Actor* thisx, PlayState* play2) {
|
||||
}
|
||||
func_80A97C0C(this, play);
|
||||
break;
|
||||
|
||||
case ENTRANCE(WATERFALL_RAPIDS, 1):
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_93_01)) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_24_04)) {
|
||||
@ -350,6 +360,7 @@ void EnAz_Init(Actor* thisx, PlayState* play2) {
|
||||
func_80A97D5C(this, play);
|
||||
}
|
||||
break;
|
||||
|
||||
case ENTRANCE(WATERFALL_RAPIDS, 2):
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_93_01)) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_24_04)) {
|
||||
@ -383,6 +394,9 @@ void EnAz_Init(Actor* thisx, PlayState* play2) {
|
||||
this->actionFunc = func_80A97C24;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (sp4E >= 0) {
|
||||
this->brother = NULL;
|
||||
@ -548,10 +562,11 @@ s32 func_80A95B34(PlayState* play, ActorPathing* actorPathing) {
|
||||
if (this->unk_374 & 0x100) {
|
||||
if (!(this->unk_374 & 8)) {
|
||||
if (this->unk_374 & 2) {
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_SWIM, &this->animIndex);
|
||||
} else {
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_SWIM_WITH_SPINNING_TAIL,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_SWIM,
|
||||
&this->animIndex);
|
||||
} else {
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo,
|
||||
BEAVER_ANIM_SWIM_WITH_SPINNING_TAIL, &this->animIndex);
|
||||
}
|
||||
this->unk_374 |= 8;
|
||||
}
|
||||
@ -562,7 +577,7 @@ s32 func_80A95B34(PlayState* play, ActorPathing* actorPathing) {
|
||||
}
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
if (this->unk_374 & 8) {
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_WALK, &this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_WALK, &this->animIndex);
|
||||
this->unk_374 &= ~8;
|
||||
}
|
||||
ret = func_80A95534(play, actorPathing);
|
||||
@ -576,7 +591,7 @@ void func_80A95C5C(EnAz* this, PlayState* play) {
|
||||
this->actor.draw = NULL;
|
||||
this->actor.world.pos.y = this->actor.home.pos.y + 120.0f;
|
||||
this->actor.gravity = -1.0f;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE, &this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE, &this->animIndex);
|
||||
this->actor.flags &= ~(ACTOR_FLAG_1 | ACTOR_FLAG_8);
|
||||
this->actor.bgCheckFlags &= ~(BGCHECKFLAG_GROUND | BGCHECKFLAG_WATER);
|
||||
this->unk_3C0 = 0;
|
||||
@ -610,7 +625,7 @@ void func_80A95DA0(EnAz* this, PlayState* play) {
|
||||
this->unk_36C = 4.0f;
|
||||
this->actor.speed = 4.0f;
|
||||
this->actor.gravity = 0.0f;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_SWIM_WITH_SPINNING_TAIL,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_SWIM_WITH_SPINNING_TAIL,
|
||||
&this->animIndex);
|
||||
this->actor.flags |= (ACTOR_FLAG_1 | ACTOR_FLAG_8);
|
||||
this->actor.bgCheckFlags &= ~(BGCHECKFLAG_GROUND | BGCHECKFLAG_WATER);
|
||||
@ -662,7 +677,7 @@ void func_80A95FE8(EnAz* this, PlayState* play) {
|
||||
this->actor.shape.rot.z = 0;
|
||||
Actor_MoveWithoutGravityReverse(&this->actor);
|
||||
} else {
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE, &this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE, &this->animIndex);
|
||||
this->unk_374 &= ~0x1000;
|
||||
this->actor.gravity = -1.0f;
|
||||
this->actor.speed = 0.0f;
|
||||
@ -701,63 +716,73 @@ s32 func_80A9617C(EnAz* this, PlayState* play) {
|
||||
case 0xCD:
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_24_01);
|
||||
this->actor.textId = 0x10F2;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_BOW,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_BOW,
|
||||
&this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo, BEAVER_ANIM_BOW,
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_BOW,
|
||||
&brother->animIndex);
|
||||
break;
|
||||
|
||||
case 0x10CE:
|
||||
this->actor.textId = 0x10CF;
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_16_40);
|
||||
break;
|
||||
|
||||
case 0x10CF:
|
||||
this->actor.textId = 0x10D0;
|
||||
break;
|
||||
|
||||
case 0x10D0:
|
||||
this->actor.textId = 0x10D1;
|
||||
ret = 3;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_TALK_WAVE_ARMS,
|
||||
&this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo,
|
||||
BEAVER_ANIM_TALK_WAVE_ARMS, &this->animIndex);
|
||||
break;
|
||||
|
||||
case 0x10D1:
|
||||
this->actor.textId = 0x10D2;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_TALK,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_TALK,
|
||||
&this->animIndex);
|
||||
break;
|
||||
|
||||
case 0x10D2:
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
this->actor.textId = 0x10D6;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo,
|
||||
BEAVER_ANIM_TALK_WAVE_ARMS, &this->animIndex);
|
||||
} else {
|
||||
Audio_PlaySfx_MessageCancel();
|
||||
this->actor.textId = 0x10D3;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_BOW,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_BOW,
|
||||
&this->animIndex);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x10D3:
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&this->animIndex);
|
||||
this->unk_374 |= 0x20;
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10D4:
|
||||
this->actor.textId = 0x10D2;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_TALK,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_TALK,
|
||||
&this->animIndex);
|
||||
break;
|
||||
|
||||
case 0x10D6:
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&this->animIndex);
|
||||
func_80A979DC(this, play);
|
||||
this->unk_2FA = 1;
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10D7:
|
||||
this->actor.textId = 0x10D8;
|
||||
break;
|
||||
|
||||
case 0x10D8:
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
@ -765,15 +790,21 @@ s32 func_80A9617C(EnAz* this, PlayState* play) {
|
||||
case 2:
|
||||
this->unk_2FA = 1;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
this->unk_2FA = 3;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
this->unk_2FA = 6;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
this->unk_2FA = 8;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ret = 0;
|
||||
} else {
|
||||
@ -781,6 +812,7 @@ s32 func_80A9617C(EnAz* this, PlayState* play) {
|
||||
this->actor.textId = 0x10D9;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x10D9:
|
||||
if ((this->unk_2FA == 3) || (this->unk_2FA == 8)) {
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_24_04);
|
||||
@ -789,11 +821,13 @@ s32 func_80A9617C(EnAz* this, PlayState* play) {
|
||||
func_80A979DC(this, play);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10DA:
|
||||
this->actor.textId = 0x10DB;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_TALK,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_TALK,
|
||||
&this->animIndex);
|
||||
break;
|
||||
|
||||
case 0x10DB:
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
@ -803,51 +837,61 @@ s32 func_80A9617C(EnAz* this, PlayState* play) {
|
||||
} else {
|
||||
Audio_PlaySfx_MessageCancel();
|
||||
this->actor.textId = 0x10DC;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_BOW,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_BOW,
|
||||
&this->animIndex);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x10DC:
|
||||
func_80A94AB8(this, play, 0);
|
||||
func_80A979DC(this, play);
|
||||
this->unk_374 |= 0x20;
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10DD:
|
||||
func_80A98EFC(this, play, 0x10DE, BEAVER_ANIM_IDLE_FACE_RIGHT, BEAVER_ANIM_TALK_TO_LEFT);
|
||||
this->unk_374 |= 0x8000;
|
||||
ret = 2;
|
||||
break;
|
||||
|
||||
case 0x10DE:
|
||||
func_80A98EFC(this, play, 0x10DF, BEAVER_ANIM_IDLE_FACE_LEFT, BEAVER_ANIM_TALK_TO_RIGHT);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10DF:
|
||||
func_80A98EFC(this, play, 0x10E0, BEAVER_ANIM_IDLE_FACE_RIGHT, BEAVER_ANIM_TALK_TO_LEFT);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10E0:
|
||||
func_80A98EFC(this, play, 0x10E1, BEAVER_ANIM_IDLE_FACE_LEFT, BEAVER_ANIM_TALK_TO_RIGHT);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10E1:
|
||||
func_80A98EFC(this, play, 0x10E2, BEAVER_ANIM_IDLE_FACE_RIGHT, BEAVER_ANIM_TALK_TO_LEFT);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10E2:
|
||||
this->actor.textId = 0x10E3;
|
||||
ret = 3;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_TALK,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_TALK,
|
||||
&this->animIndex);
|
||||
break;
|
||||
|
||||
case 0x10E3:
|
||||
func_80A98EFC(this, play, 0x10E4, BEAVER_ANIM_IDLE, BEAVER_ANIM_TALK);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10E4:
|
||||
func_80A98EFC(this, play, 0x10E5, BEAVER_ANIM_IDLE, BEAVER_ANIM_TALK);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10E5:
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
@ -855,43 +899,49 @@ s32 func_80A9617C(EnAz* this, PlayState* play) {
|
||||
} else {
|
||||
Audio_PlaySfx_MessageCancel();
|
||||
this->actor.textId = 0x10E6;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_TALK_TO_LEFT,
|
||||
&this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo,
|
||||
BEAVER_ANIM_TALK_TO_LEFT, &this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo,
|
||||
BEAVER_ANIM_IDLE_FACE_RIGHT, &brother->animIndex);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x10E6:
|
||||
this->actor.textId = 0x10E7;
|
||||
func_80A98EFC(this, play, 0x10E7, BEAVER_ANIM_IDLE, BEAVER_ANIM_TALK_TO_RIGHT);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10E7:
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_24_04);
|
||||
func_80A94AB8(this, play, 0);
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&brother->animIndex);
|
||||
func_80A979DC(this, play);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10E8:
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&brother->animIndex);
|
||||
this->unk_2FA = 3;
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10E9:
|
||||
func_80A98EFC(this, play, 0x10EA, BEAVER_ANIM_IDLE_FACE_LEFT, BEAVER_ANIM_TALK);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10EA:
|
||||
func_80A98EFC(this, play, 0x10EB, BEAVER_ANIM_IDLE, BEAVER_ANIM_TALK);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10EB:
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
play->msgCtx.msgMode = 0x44;
|
||||
@ -900,9 +950,11 @@ s32 func_80A9617C(EnAz* this, PlayState* play) {
|
||||
case 4:
|
||||
this->unk_2FA = 3;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
this->unk_2FA = 6;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
default:
|
||||
this->unk_2FA = 8;
|
||||
@ -913,16 +965,18 @@ s32 func_80A9617C(EnAz* this, PlayState* play) {
|
||||
} else {
|
||||
Audio_PlaySfx_MessageCancel();
|
||||
this->actor.textId = 0x10EC;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_LAUGH_LEFT,
|
||||
&this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo,
|
||||
BEAVER_ANIM_LAUGH_LEFT, &this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo,
|
||||
BEAVER_ANIM_IDLE_FACE_RIGHT, &brother->animIndex);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x10EC:
|
||||
func_80A98EFC(this, play, 0x10ED, -1, BEAVER_ANIM_LAUGH_RIGHT);
|
||||
func_80A98EFC(this, play, 0x10ED, BEAVER_ANIM_NONE, BEAVER_ANIM_LAUGH_RIGHT);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10ED:
|
||||
if ((this->unk_2FA == 4) || (this->unk_2FA == 9)) {
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_24_04);
|
||||
@ -931,18 +985,22 @@ s32 func_80A9617C(EnAz* this, PlayState* play) {
|
||||
func_80A979DC(this, play);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10EE:
|
||||
func_80A98EFC(this, play, 0x10EF, BEAVER_ANIM_IDLE_FACE_LEFT, BEAVER_ANIM_TALK_TO_RIGHT);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10EF:
|
||||
func_80A98EFC(this, play, 0x10F0, BEAVER_ANIM_IDLE_FACE_RIGHT, BEAVER_ANIM_TALK_TO_LEFT);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10F0:
|
||||
func_80A98EFC(this, play, 0x10F1, BEAVER_ANIM_IDLE_FACE_LEFT, BEAVER_ANIM_TALK_TO_RIGHT);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10F1:
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_93_01);
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_23_80)) {
|
||||
@ -951,45 +1009,52 @@ s32 func_80A9617C(EnAz* this, PlayState* play) {
|
||||
this->getItemId = GI_BOTTLE;
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_23_80);
|
||||
}
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&brother->animIndex);
|
||||
ret = 7;
|
||||
break;
|
||||
|
||||
case 0x10F2:
|
||||
case 0x1109:
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_24_04);
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&brother->animIndex);
|
||||
func_80A94AB8(this, play, 0);
|
||||
func_80A979DC(this, play);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10F3:
|
||||
func_80A98EFC(this, play, 0x10F4, BEAVER_ANIM_IDLE_FACE_LEFT, BEAVER_ANIM_TALK_TO_RIGHT);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10F4:
|
||||
func_80A98EFC(this, play, 0x10F5, BEAVER_ANIM_IDLE_FACE_RIGHT, BEAVER_ANIM_TALK_TO_LEFT);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10F5:
|
||||
func_80A98EFC(this, play, 0x10F6, BEAVER_ANIM_IDLE_FACE_LEFT, BEAVER_ANIM_TALK_TO_RIGHT);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10F6:
|
||||
func_80A98EFC(this, play, 0x10F7, BEAVER_ANIM_IDLE_FACE_RIGHT, BEAVER_ANIM_TALK_WAVE_ARMS);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10F7:
|
||||
this->actor.textId = 0x10F8;
|
||||
ret = 3;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_TALK,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_TALK,
|
||||
&this->animIndex);
|
||||
break;
|
||||
|
||||
case 0x10F8:
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
@ -998,50 +1063,56 @@ s32 func_80A9617C(EnAz* this, PlayState* play) {
|
||||
} else {
|
||||
this->actor.textId = 0x10FA;
|
||||
}
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo,
|
||||
BEAVER_ANIM_TALK_WAVE_ARMS, &this->animIndex);
|
||||
} else {
|
||||
Audio_PlaySfx_MessageCancel();
|
||||
this->actor.textId = 0x10F9;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_BOW,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_BOW,
|
||||
&this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo, BEAVER_ANIM_BOW,
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_BOW,
|
||||
&brother->animIndex);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x10F9:
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&brother->animIndex);
|
||||
this->unk_374 |= 0x20;
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10FA:
|
||||
case 0x1107:
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&brother->animIndex);
|
||||
this->unk_2FA = 6;
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10FB:
|
||||
func_80A98EFC(this, play, 0x10FC, BEAVER_ANIM_IDLE_FACE_LEFT, BEAVER_ANIM_TALK_TO_RIGHT);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10FC:
|
||||
func_80A98EFC(this, play, 0x10FD, BEAVER_ANIM_IDLE_FACE_RIGHT, BEAVER_ANIM_TALK);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10FD:
|
||||
this->actor.textId = 0x10FE;
|
||||
ret = 3;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_TALK,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_TALK,
|
||||
&this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&brother->animIndex);
|
||||
break;
|
||||
|
||||
case 0x10FE:
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
@ -1050,52 +1121,59 @@ s32 func_80A9617C(EnAz* this, PlayState* play) {
|
||||
} else {
|
||||
this->actor.textId = 0x1101;
|
||||
}
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_TALK,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_TALK,
|
||||
&this->animIndex);
|
||||
} else {
|
||||
Audio_PlaySfx_MessageCancel();
|
||||
this->actor.textId = 0x10FF;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_TALK_TO_LEFT,
|
||||
&this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo,
|
||||
BEAVER_ANIM_TALK_TO_LEFT, &this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo,
|
||||
BEAVER_ANIM_IDLE_FACE_RIGHT, &brother->animIndex);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x10FF:
|
||||
func_80A98EFC(this, play, 0x1100, BEAVER_ANIM_IDLE_FACE_LEFT, BEAVER_ANIM_TALK_TO_RIGHT);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x1100:
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_24_04);
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&brother->animIndex);
|
||||
func_80A94AB8(this, play, 0);
|
||||
func_80A979DC(this, play);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x1101:
|
||||
case 0x1108:
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&brother->animIndex);
|
||||
this->unk_2FA = 8;
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x1102:
|
||||
func_80A98EFC(this, play, 0x1103, BEAVER_ANIM_IDLE_FACE_LEFT, BEAVER_ANIM_TALK_TO_RIGHT);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x1103:
|
||||
func_80A98EFC(this, play, 0x1104, BEAVER_ANIM_IDLE_FACE_RIGHT, BEAVER_ANIM_TALK_TO_LEFT);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x1104:
|
||||
func_80A98EFC(this, play, 0x1105, BEAVER_ANIM_IDLE_FACE_LEFT, BEAVER_ANIM_TALK_TO_RIGHT);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x1105:
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_25_01)) {
|
||||
this->getItemId = GI_RUPEE_PURPLE;
|
||||
@ -1103,25 +1181,27 @@ s32 func_80A9617C(EnAz* this, PlayState* play) {
|
||||
this->getItemId = GI_HEART_PIECE;
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_25_01);
|
||||
}
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&brother->animIndex);
|
||||
ret = 7;
|
||||
break;
|
||||
|
||||
case 0x1106:
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_24_04);
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&brother->animIndex);
|
||||
func_80A94AB8(this, play, 0);
|
||||
func_80A979DC(this, play);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x10D5:
|
||||
default:
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE,
|
||||
&this->animIndex);
|
||||
this->unk_374 |= 0x20;
|
||||
ret = 0;
|
||||
@ -1129,10 +1209,12 @@ s32 func_80A9617C(EnAz* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case TEXT_STATE_NONE:
|
||||
case TEXT_STATE_1:
|
||||
case TEXT_STATE_CLOSING:
|
||||
case TEXT_STATE_3:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
@ -1147,32 +1229,37 @@ void func_80A97114(EnAz* this, PlayState* play) {
|
||||
case 0x10DA:
|
||||
case 0x10DD:
|
||||
case 0x10E9:
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_TALK, &this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_TALK, &this->animIndex);
|
||||
break;
|
||||
|
||||
case 0x10EE:
|
||||
case 0x10F3:
|
||||
case 0x10FB:
|
||||
case 0x1102:
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_TALK_TO_LEFT,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_TALK_TO_LEFT,
|
||||
&this->animIndex);
|
||||
sp20 = true;
|
||||
break;
|
||||
|
||||
case 0x10F2:
|
||||
case 0x1106:
|
||||
case 0x1109:
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_BOW, &this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_BOW, &this->animIndex);
|
||||
if (brother != NULL) {
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo, BEAVER_ANIM_BOW,
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_BOW,
|
||||
&brother->animIndex);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if ((brother != NULL) && sp20) {
|
||||
if (this->unk_374 & 2) {
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE_FACE_RIGHT,
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE_FACE_RIGHT,
|
||||
&brother->animIndex);
|
||||
} else {
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE_FACE_LEFT,
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE_FACE_LEFT,
|
||||
&brother->animIndex);
|
||||
}
|
||||
}
|
||||
@ -1196,6 +1283,7 @@ s32 func_80A97274(EnAz* this, PlayState* play) {
|
||||
textId = 0x10D4;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_24_01)) {
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_24_04);
|
||||
@ -1205,6 +1293,7 @@ s32 func_80A97274(EnAz* this, PlayState* play) {
|
||||
textId = 0x10DA;
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_24_01)) {
|
||||
textId = 0x10EE;
|
||||
@ -1212,10 +1301,12 @@ s32 func_80A97274(EnAz* this, PlayState* play) {
|
||||
textId = 0x10E9;
|
||||
}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_24_04);
|
||||
textId = 0x10F3;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_24_01)) {
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_24_04);
|
||||
@ -1224,6 +1315,7 @@ s32 func_80A97274(EnAz* this, PlayState* play) {
|
||||
textId = 0x10E9;
|
||||
}
|
||||
break;
|
||||
|
||||
case 9:
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_24_01)) {
|
||||
textId = 0x1102;
|
||||
@ -1320,12 +1412,16 @@ void func_80A97410(EnAz* this, PlayState* play) {
|
||||
if (temp_a0 == 0) {
|
||||
switch (this->unk_3D2) {
|
||||
case 0x10CE:
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_TALK,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_TALK,
|
||||
&this->animIndex);
|
||||
break;
|
||||
|
||||
case 0x10D4:
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_TALK_WAVE_ARMS,
|
||||
&this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo,
|
||||
BEAVER_ANIM_TALK_WAVE_ARMS, &this->animIndex);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Message_StartTextbox(play, this->unk_3D2, &this->actor);
|
||||
@ -1415,6 +1511,7 @@ void func_80A97AB4(EnAz* this, PlayState* play) {
|
||||
case TEXT_STATE_NONE:
|
||||
Message_StartTextbox(play, 0x10D7, NULL);
|
||||
break;
|
||||
|
||||
case TEXT_STATE_CHOICE:
|
||||
case TEXT_STATE_5:
|
||||
case TEXT_STATE_DONE:
|
||||
@ -1423,6 +1520,7 @@ void func_80A97AB4(EnAz* this, PlayState* play) {
|
||||
case 0x10D7:
|
||||
Message_ContinueTextbox(play, 0x10D8);
|
||||
break;
|
||||
|
||||
case 0x10D8:
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
@ -1438,14 +1536,19 @@ void func_80A97AB4(EnAz* this, PlayState* play) {
|
||||
Message_ContinueTextbox(play, 0x10D9);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x10D9:
|
||||
func_80A94AB8(this, play, 0);
|
||||
func_80A979DC(this, play);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
case TEXT_STATE_1:
|
||||
case TEXT_STATE_CLOSING:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1462,7 +1565,7 @@ void func_80A97C24(EnAz* this, PlayState* play) {
|
||||
|
||||
void func_80A97C4C(EnAz* this, PlayState* play) {
|
||||
if (SkelAnime_Update(&this->skelAnime) && (this->animIndex == BEAVER_ANIM_BOW)) {
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE, &this->animIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_IDLE, &this->animIndex);
|
||||
}
|
||||
func_80A97410(this, play);
|
||||
if ((this->unk_2FA == 1) || (this->unk_2FA == 3) || (this->unk_2FA == 6) || (this->unk_2FA == 8)) {
|
||||
@ -1514,7 +1617,7 @@ void func_80A97EAC(EnAz* this, PlayState* play) {
|
||||
this->actor.speed = 8.0f;
|
||||
this->actor.gravity = 0.0f;
|
||||
this->actor.velocity.y = 6.0f;
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_SWIM_WITH_SPINNING_TAIL,
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, BEAVER_ANIM_SWIM_WITH_SPINNING_TAIL,
|
||||
&this->animIndex);
|
||||
this->actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
|
||||
this->actor.flags &= ~(ACTOR_FLAG_1 | ACTOR_FLAG_8);
|
||||
@ -1906,14 +2009,15 @@ void func_80A98EFC(EnAz* this, PlayState* play, u16 textId, s32 animIndex, s32 b
|
||||
EnAz* brother = this->brother;
|
||||
|
||||
Actor_ChangeFocus(&this->actor, play, &brother->actor);
|
||||
if (animIndex >= 0) {
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, animIndex, &this->animIndex);
|
||||
if (animIndex > BEAVER_ANIM_NONE) {
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationSpeedInfo, animIndex, &this->animIndex);
|
||||
}
|
||||
this->actor.textId = 0;
|
||||
brother->actor.textId = textId;
|
||||
brother->unk_378 = 5;
|
||||
if ((brotherAnimIndex >= 0) && (brotherAnimIndex != brother->animIndex)) {
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationInfo, brotherAnimIndex, &brother->animIndex);
|
||||
if ((brotherAnimIndex > BEAVER_ANIM_NONE) && (brotherAnimIndex != brother->animIndex)) {
|
||||
SubS_ChangeAnimationBySpeedInfo(&brother->skelAnime, sAnimationSpeedInfo, brotherAnimIndex,
|
||||
&brother->animIndex);
|
||||
}
|
||||
this->unk_378 = 0;
|
||||
}
|
||||
@ -1927,6 +2031,7 @@ void func_80A98F94(struct_80A98F94* yData, f32 frame, f32* yInterp) {
|
||||
yData++;
|
||||
nextFrame = yData[0].unk_0;
|
||||
} while (nextFrame < frame);
|
||||
|
||||
prevFrame = yData[-1].unk_0;
|
||||
weight = LERPWEIGHT(frame, prevFrame, nextFrame);
|
||||
*yInterp = LERPIMP(yData[-1].unk_4, yData[0].unk_4, weight) * 0.01f;
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define Z_EN_AZ_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_az/object_az.h"
|
||||
|
||||
struct EnAz;
|
||||
|
||||
@ -15,8 +16,8 @@ typedef struct EnAz {
|
||||
/* 0x144 */ EnAzActionFunc actionFunc;
|
||||
/* 0x148 */ SkelAnime skelAnime;
|
||||
/* 0x18C */ ColliderCylinder collider;
|
||||
/* 0x1D8 */ Vec3s jointTable[24];
|
||||
/* 0x268 */ Vec3s morphTable[24];
|
||||
/* 0x1D8 */ Vec3s jointTable[BEAVER_OLDER_BROTHER_LIMB_MAX]; // Also BEAVER_YOUNGER_BROTHER_LIMB_MAX
|
||||
/* 0x268 */ Vec3s morphTable[BEAVER_OLDER_BROTHER_LIMB_MAX]; // Also BEAVER_YOUNGER_BROTHER_LIMB_MAX
|
||||
/* 0x2F8 */ s16 unk_2F8;
|
||||
/* 0x2FA */ s16 unk_2FA; // cutscene state?
|
||||
/* 0x2FC */ s32 animIndex;
|
||||
|
@ -15734,8 +15734,8 @@
|
||||
0x80BD2404:("EnZov_PostLimbDraw",),
|
||||
0x80BD24B4:("EnZov_Draw",),
|
||||
0x80BD2A30:("func_80BD2A30",),
|
||||
0x80BD2AE0:("func_80BD2AE0",),
|
||||
0x80BD2B0C:("func_80BD2B0C",),
|
||||
0x80BD2AE0:("EnAh_UpdateSkelAnime",),
|
||||
0x80BD2B0C:("EnAh_ChangeAnim",),
|
||||
0x80BD2BA4:("func_80BD2BA4",),
|
||||
0x80BD2BE8:("func_80BD2BE8",),
|
||||
0x80BD2C6C:("func_80BD2C6C",),
|
||||
@ -16000,8 +16000,8 @@
|
||||
0x80BDE090:("func_80BDE090",),
|
||||
0x80BDE11C:("EnTalk_Update",),
|
||||
0x80BDE1A0:("func_80BDE1A0",),
|
||||
0x80BDE250:("func_80BDE250",),
|
||||
0x80BDE27C:("func_80BDE27C",),
|
||||
0x80BDE250:("EnAl_UpdateSkelAnime",),
|
||||
0x80BDE27C:("EnAl_ChangeAnim",),
|
||||
0x80BDE318:("func_80BDE318",),
|
||||
0x80BDE384:("func_80BDE384",),
|
||||
0x80BDE408:("func_80BDE408",),
|
||||
|
Loading…
x
Reference in New Issue
Block a user