1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-25 09:45:02 +00:00

Some cleanup and docs for z_skelanime (#601)

* docs and enums

* bgcheck merge

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
This commit is contained in:
petrie911 2021-01-09 16:07:17 -06:00 committed by GitHub
parent 7a171488d2
commit 115c152b03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 701 additions and 423 deletions

View file

@ -135,7 +135,7 @@ glabel L80863848
/* 04204 80863854 24E74510 */ addiu $a3, $a3, %lo(D_80864510) ## $a3 = 80864510
/* 04208 80863858 26040188 */ addiu $a0, $s0, 0x0188 ## $a0 = 00000188
/* 0420C 8086385C 8E0501A8 */ lw $a1, 0x01A8($s0) ## 000001A8
/* 04210 80863860 0C02950A */ jal SkelAnime_CopyVec3sTrue
/* 04210 80863860 0C02950A */ jal SkelAnime_CopyFrameTableTrue
/* 04214 80863864 8E0604C8 */ lw $a2, 0x04C8($s0) ## 000004C8
/* 04218 80863868 10000023 */ beq $zero, $zero, .L808638F8
/* 0421C 8086386C 92180114 */ lbu $t8, 0x0114($s0) ## 00000114
@ -167,13 +167,13 @@ glabel L80863884
/* 04278 808638C8 8E0701A8 */ lw $a3, 0x01A8($s0) ## 000001A8
/* 0427C 808638CC 00A03025 */ or $a2, $a1, $zero ## $a2 = 00000000
/* 04280 808638D0 46086281 */ sub.s $f10, $f12, $f8
/* 04284 808638D4 0C028B9C */ jal SkelAnime_InterpVec3s
/* 04284 808638D4 0C028B9C */ jal SkelAnime_InterpFrameTable
/* 04288 808638D8 E7AA0010 */ swc1 $f10, 0x0010($sp)
/* 0428C 808638DC 3C078086 */ lui $a3, %hi(D_80864510) ## $a3 = 80860000
/* 04290 808638E0 24E74510 */ addiu $a3, $a3, %lo(D_80864510) ## $a3 = 80864510
/* 04294 808638E4 26040188 */ addiu $a0, $s0, 0x0188 ## $a0 = 00000188
/* 04298 808638E8 8E0501A8 */ lw $a1, 0x01A8($s0) ## 000001A8
/* 0429C 808638EC 0C02950A */ jal SkelAnime_CopyVec3sTrue
/* 0429C 808638EC 0C02950A */ jal SkelAnime_CopyFrameTableTrue
/* 042A0 808638F0 8E0604C8 */ lw $a2, 0x04C8($s0) ## 000004C8
glabel L808638F4
.L808638F4:

View file

@ -23,7 +23,7 @@ glabel func_80B8EF80
/* 00554 80B8EFD4 018D2821 */ addu $a1, $t4, $t5
/* 00558 80B8EFD8 00A12821 */ addu $a1, $a1, $at
/* 0055C 80B8EFDC 0C01DF97 */ jal Math_Vec3s_ToVec3f
## Vec3f_CopyVec3s
## Vec3f_CopyFrameTable
/* 00560 80B8EFE0 248401D8 */ addiu $a0, $a0, 0x01D8 ## $a0 = 000001D8
/* 00564 80B8EFE4 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00568 80B8EFE8 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000

View file

@ -44,7 +44,7 @@ glabel func_80B8EFF4
/* 00618 80B8F098 AFA50054 */ sw $a1, 0x0054($sp)
/* 0061C 80B8F09C AFA60074 */ sw $a2, 0x0074($sp)
/* 00620 80B8F0A0 0C01DF97 */ jal Math_Vec3s_ToVec3f
## Vec3f_CopyVec3s
## Vec3f_CopyFrameTable
/* 00624 80B8F0A4 27A4005C */ addiu $a0, $sp, 0x005C ## $a0 = FFFFFFE4
/* 00628 80B8F0A8 260501D8 */ addiu $a1, $s0, 0x01D8 ## $a1 = 000001D8
/* 0062C 80B8F0AC AFA50028 */ sw $a1, 0x0028($sp)

View file

@ -738,8 +738,8 @@ s32 Camera_ChangeDoorCam(Camera* camera, Actor* doorActor, s16 camDataIdx, f32 a
s16 timer3);
s32 Camera_Copy(Camera* dstCamera, Camera* srcCamera);
Vec3f* Camera_GetSkyboxOffset(Vec3f* dst, Camera* camera);
void Camera_SetCameraData(Camera* camera, s16 setDataFlags, void* data0,
void* data1, s16 data2, s16 data3, UNK_TYPE arg6);
void Camera_SetCameraData(Camera* camera, s16 setDataFlags, void* data0, void* data1, s16 data2, s16 data3,
UNK_TYPE arg6);
s16 func_8005B1A4(Camera* camera);
DamageTable* DamageTable_Get(s32 index);
void func_8005B280(GraphicsContext* gfxCtx, Vec3f* vA, Vec3f* vB, Vec3f* vC);
@ -1292,7 +1292,7 @@ Gfx* SkelAnime_Draw(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable
PostLimbDraw postLimbDraw, void* arg, Gfx* gfx);
Gfx* SkelAnime_DrawFlex(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount,
OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, void* arg, Gfx* gfx);
void SkelAnime_InterpVec3s(s32 limbCount, Vec3s* dst, Vec3s* start, Vec3s* target, f32 weight);
void SkelAnime_InterpFrameTable(s32 limbCount, Vec3s* dst, Vec3s* start, Vec3s* target, f32 weight);
void AnimationContext_Reset(AnimationContext* animationCtx);
void AnimationContext_SetNextQueue(GlobalContext* globalCtx);
void AnimationContext_DisableQueue(GlobalContext* globalCtx);
@ -1305,29 +1305,31 @@ void AnimationContext_SetCopyFalse(GlobalContext* globalCtx, s32 vecCount, Vec3s
void AnimationContext_SetMoveActor(GlobalContext* globalCtx, Actor* actor, SkelAnime* skelAnime, f32 arg3);
void AnimationContext_Update(GlobalContext* globalCtx, AnimationContext* animationCtx);
void SkelAnime_InitLink(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
LinkAnimationHeader* segment, s32 initFlags, Vec3s* jointTable, Vec3s* morphTable,
LinkAnimationHeader* animation, s32 initFlags, Vec3s* jointTable, Vec3s* morphTable,
s32 limbCount);
void LinkAnimation_SetUpdateFunction(SkelAnime* skelAnime);
s32 LinkAnimation_Update(GlobalContext* globalCtx, SkelAnime* skelAnime);
void LinkAnimation_AnimateFrame(GlobalContext* globalCtx, SkelAnime* skelAnime);
void Animation_SetMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 morphFrames);
void LinkAnimation_Change(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment, f32 playSpeed,
void LinkAnimation_Change(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation, f32 playSpeed,
f32 startFrame, f32 endFrame, u8 mode, f32 morphFrames);
void LinkAnimation_PlayOnce(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment);
void LinkAnimation_PlayOnceSetSpeed(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment,
void LinkAnimation_PlayOnce(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation);
void LinkAnimation_PlayOnceSetSpeed(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation,
f32 playSpeed);
void LinkAnimation_PlayLoop(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment);
void LinkAnimation_PlayLoopSetSpeed(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment,
void LinkAnimation_PlayLoop(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation);
void LinkAnimation_PlayLoopSetSpeed(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation,
f32 playSpeed);
void LinkAnimation_CopyJointToMorph(GlobalContext* globalCtx, SkelAnime* skelAnime);
void LinkAnimation_CopyMorphToJoint(GlobalContext* globalCtx, SkelAnime* skelAnime);
void LinkAnimation_LoadToMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment, f32 frame);
void LinkAnimation_LoadToJoint(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment, f32 frame);
void LinkAnimation_LoadToMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation,
f32 frame);
void LinkAnimation_LoadToJoint(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation,
f32 frame);
void LinkAnimation_InterpJointMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 frame);
void LinkAnimation_BlendToJoint(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment1,
f32 frame1, LinkAnimationHeader* segment2, f32 frame2, f32 weight, Vec3s* blendTable);
void LinkAnimation_BlendToMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment1,
f32 frame1, LinkAnimationHeader* segment2, f32 frame2, f32 weight, Vec3s* blendTable);
void LinkAnimation_BlendToJoint(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation1,
f32 frame1, LinkAnimationHeader* animation2, f32 frame2, f32 weight, Vec3s* blendTable);
void LinkAnimation_BlendToMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation1,
f32 frame1, LinkAnimationHeader* animation2, f32 frame2, f32 weight, Vec3s* blendTable);
void LinkAnimation_EndLoop(SkelAnime* skelAnime);
s32 LinkAnimation_OnFrame(SkelAnime* skelAnime, f32 frame);
s32 SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
@ -1349,22 +1351,25 @@ void Animation_MorphToLoop(SkelAnime* skelAnime, AnimationHeader* animation, f32
void Animation_PlayLoopSetSpeed(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed);
void Animation_EndLoop(SkelAnime* skelAnime);
void Animation_Reverse(SkelAnime* skelAnime);
void SkelAnime_CopyVec3sTrue(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* copyFlags);
void SkelAnime_CopyVec3sFalse(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* copyFlag);
void SkelAnime_CopyFrameTableTrue(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* copyFlag);
void SkelAnime_CopyFrameTableFalse(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* copyFlag);
void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* pos, s16 angle);
s32 Animation_OnFrame(SkelAnime* skelAnime, f32 frame);
void SkelAnime_Free(SkelAnime* skelAnime, GlobalContext* globalCtx);
void SkelAnime_CopyVec3s(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src);
void SkelAnime_CopyFrameTable(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src);
void func_800A57C0(MtxF* mtx, Struct_800A57C0* arg1, Struct_800A598C* arg2, Vtx* arg3, Vec3f* arg4);
void func_800A598C(GraphicsContext* gfxCtx, PSkinAwb* skin, s32 limbIndex, s32 arg3);
void func_800A5E28(GraphicsContext* gfxCtx, PSkinAwb* skin, s32 limbIndex, s32 arg3, s32 arg4);
void func_800A5F60(GraphicsContext* gfxCtx, PSkinAwb* skin, s32 limbIndex, Gfx* arg3, s32 arg4);
void func_800A60D8(Actor* actor, GlobalContext* globalCtx, PSkinAwb* skin, SkinCallback callback, SkinCallback2 arg4, s32 arg5, s32 arg6, s32 arg7);
void func_800A60D8(Actor* actor, GlobalContext* globalCtx, PSkinAwb* skin, SkinCallback callback, SkinCallback2 arg4,
s32 arg5, s32 arg6, s32 arg7);
void func_800A6330(Actor* actor, GlobalContext* globalCtx, PSkinAwb* skin, SkinCallback callback, s32 arg4);
void func_800A63CC(Actor* actor, GlobalContext* globalCtx, PSkinAwb* skin, SkinCallback callback, SkinCallback2 arg4, s32 arg5, s32 arg6, s32 arg7);
void func_800A63CC(Actor* actor, GlobalContext* globalCtx, PSkinAwb* skin, SkinCallback callback, SkinCallback2 arg4,
s32 arg5, s32 arg6, s32 arg7);
void func_800A6408(PSkinAwb* skin, s32 joint, Vec3f* arg2, Vec3f* arg3);
void func_800A6460(GlobalContext* globalCtx, PSkinAwb* skin, s32 arg2);
void func_800A663C(GlobalContext* globalCtx, PSkinAwb* skin, SkeletonHeader* skeletonHeader, AnimationHeader* animationHeader);
void func_800A663C(GlobalContext* globalCtx, PSkinAwb* skin, SkeletonHeader* skeletonHeader,
AnimationHeader* animationHeader);
void func_800A6888(GlobalContext* globalCtx, PSkinAwb* skin);
s32 func_800A698C(PSkinAwb* skin, SkinLimb** limbs, Mtx* arg2, u8 arg3, u8 arg4);
s32 func_800A6AC4(PSkinAwb* skin, MtxF* arg1, Actor* actor, s32 arg3);

View file

@ -3390,8 +3390,9 @@ s32 BgCheck_SphVsDynaWall(CollisionContext* colCtx, u16 xpFlags, f32* outX, f32*
continue;
}
bgActor->boundingSphere.radius -= (s16)radius;
if (BgCheck_SphVsDynaWallInBgActor(colCtx, xpFlags, &colCtx->dyna, &(colCtx->dyna.bgActors + i)->dynaLookup.wall,
outX, outZ, outPoly, outBgId, &resultPos, radius, i)) {
if (BgCheck_SphVsDynaWallInBgActor(colCtx, xpFlags, &colCtx->dyna,
&(colCtx->dyna.bgActors + i)->dynaLookup.wall, outX, outZ, outPoly, outBgId,
&resultPos, radius, i)) {
resultPos.x = *outX;
resultPos.z = *outZ;
result = true;

View file

@ -9,7 +9,7 @@ s32 SkelAnime_LoopFull(SkelAnime* skelAnime);
s32 SkelAnime_Once(SkelAnime* skelAnime);
s32 SkelAnime_LoopPartial(SkelAnime* skelAnime);
void SkelAnime_CopyVec3s(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src);
void SkelAnime_CopyFrameTable(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src);
static u32 sDisableAnimQueueFlags = 0;
static u32 sAnimQueueFlags;
@ -79,7 +79,8 @@ void SkelAnime_DrawLod(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTa
if (skeleton == NULL) {
osSyncPrintf(VT_FGCOL(RED));
osSyncPrintf("Si2_Lod_draw():skelがNULLです。\n"); // Si2_Lod_draw (): skel is NULL.
// skel is NULL.
osSyncPrintf("Si2_Lod_draw():skelがNULLです。\n");
osSyncPrintf(VT_RST);
return;
}
@ -194,7 +195,8 @@ void SkelAnime_DrawFlexLod(GlobalContext* globalCtx, void** skeleton, Vec3s* joi
if (skeleton == NULL) {
osSyncPrintf(VT_FGCOL(RED));
osSyncPrintf("Si2_Lod_draw_SV():skelがNULLです。\n"); // Si2_Lod_draw_SV (): skel is NULL.
// skel is NULL.
osSyncPrintf("Si2_Lod_draw_SV():skelがNULLです。\n");
osSyncPrintf(VT_RST);
return;
}
@ -299,7 +301,8 @@ void SkelAnime_DrawOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTa
if (skeleton == NULL) {
osSyncPrintf(VT_FGCOL(RED));
osSyncPrintf("Si2_draw():skelがNULLです。\n"); // Si2_draw (): skel is NULL.
// skel is NULL.
osSyncPrintf("Si2_draw():skelがNULLです。\n");
osSyncPrintf(VT_RST);
return;
}
@ -413,7 +416,8 @@ void SkelAnime_DrawFlexOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* joi
if (skeleton == NULL) {
osSyncPrintf(VT_FGCOL(RED));
osSyncPrintf("Si2_draw_SV():skelがNULLです。\n"); // Si2_draw_SV (): skel is NULL.
// skel is NULL.
osSyncPrintf("Si2_draw_SV():skelがNULLです。\n");
osSyncPrintf(VT_RST);
return;
}
@ -566,7 +570,8 @@ Gfx* SkelAnime_Draw(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable
if (skeleton == NULL) {
osSyncPrintf(VT_FGCOL(RED));
osSyncPrintf("Si2_draw2():skelがNULLです。NULLを返します。\n"); // Si2_draw2 (): skel is NULL. Returns NULL.
// skel is NULL. Returns NULL.
osSyncPrintf("Si2_draw2():skelがNULLです。NULLを返します。\n");
osSyncPrintf(VT_RST);
return NULL;
}
@ -676,8 +681,8 @@ Gfx* SkelAnime_DrawFlex(GlobalContext* globalCtx, void** skeleton, Vec3s* jointT
mtx = Graph_Alloc(globalCtx->state.gfxCtx, dListCount * sizeof(*mtx));
if (skeleton == NULL) {
osSyncPrintf(VT_FGCOL(RED));
osSyncPrintf(
"Si2_draw2_SV():skelがNULLです。NULLを返します。\n"); // Si2_draw2_SV (): skel is NULL. Returns NULL.
// skel is NULL. Returns NULL.
osSyncPrintf("Si2_draw2_SV():skelがNULLです。NULLを返します。\n");
osSyncPrintf(VT_RST);
return NULL;
}
@ -719,7 +724,10 @@ Gfx* SkelAnime_DrawFlex(GlobalContext* globalCtx, void** skeleton, Vec3s* jointT
return gfx;
}
// unused
/**
* Unpacks frame data for the animation at the given frame into frameTable
* Used by the legacy animation format
*/
s32 SkelAnime_GetFrameData2(AnimationHeader2* animation, s32 frame, Vec3s* frameTable) {
AnimationHeader2* animHeader = SEGMENTED_TO_VIRTUAL(animation);
s32 limbCount = animHeader->limbCount;
@ -733,10 +741,10 @@ s32 SkelAnime_GetFrameData2(AnimationHeader2* animation, s32 frame, Vec3s* frame
*Equivalent to the following, but the compiler optimizes the loop in a way I can't replicate
*/
// for(i = 0, dst++, key++; i < limbCount + 1; i++, key++, dst++) {
// dst->x = frame < key->xMax ? dynamicData[key->x] : staticData[key->x];
// dst->y = frame < key->yMax ? dynamicData[key->y] : staticData[key->y];
// dst->z = frame < key->zMax ? dynamicData[key->z] : staticData[key->z];
// for(i = 0, frameTable++, key++; i < limbCount + 1; i++, key++, frameTable++) {
// frameTable->x = frame < key->xMax ? dynamicData[key->x] : staticData[key->x];
// frameTable->y = frame < key->yMax ? dynamicData[key->y] : staticData[key->y];
// frameTable->z = frame < key->zMax ? dynamicData[key->z] : staticData[key->z];
// }
frameTable->x = frame < key->xMax ? dynamicData[key->x] : staticData[key->x];
@ -807,9 +815,9 @@ s16 Animation_GetLastFrame2(AnimationHeader2* animation) {
}
/**
* Linearly interpolates between vector arrays start and target at the given weight.
* Linearly interpolates the start and target frame tables with the given weight, putting the result in dst
*/
void SkelAnime_InterpVec3s(s32 limbCount, Vec3s* dst, Vec3s* start, Vec3s* target, f32 weight) {
void SkelAnime_InterpFrameTable(s32 limbCount, Vec3s* dst, Vec3s* start, Vec3s* target, f32 weight) {
s32 i;
s16 diff;
s16 base;
@ -835,14 +843,23 @@ void SkelAnime_InterpVec3s(s32 limbCount, Vec3s* dst, Vec3s* start, Vec3s* targe
}
}
/**
* zeroes out the current request count
*/
void AnimationContext_Reset(AnimationContext* animationCtx) {
animationCtx->animationCount = 0;
}
/**
* Shifts the queue flag to the next queue
*/
void AnimationContext_SetNextQueue(GlobalContext* globalCtx) {
sAnimQueueFlags <<= 1;
}
/**
* Disables the current animation queue. Only load and move actor requests will be processed for that queue.
*/
void AnimationContext_DisableQueue(GlobalContext* globalCtx) {
sDisableAnimQueueFlags |= sAnimQueueFlags;
}
@ -861,14 +878,14 @@ AnimationEntry* AnimationContext_AddEntry(AnimationContext* animationCtx, Animat
}
/**
* Requests loading frame data from the Link animation at segment into frameTable
* Requests loading frame data from the Link animation into frameTable
*/
void AnimationContext_SetLoadFrame(GlobalContext* globalCtx, LinkAnimationHeader* segment, s32 frame, s32 limbCount,
void AnimationContext_SetLoadFrame(GlobalContext* globalCtx, LinkAnimationHeader* animation, s32 frame, s32 limbCount,
Vec3s* frameTable) {
AnimationEntry* entry = AnimationContext_AddEntry(&globalCtx->animationCtx, ANIMENTRY_LOADFRAME);
if (entry != NULL) {
LinkAnimationHeader* linkAnimHeader = SEGMENTED_TO_VIRTUAL(segment);
LinkAnimationHeader* linkAnimHeader = SEGMENTED_TO_VIRTUAL(animation);
u32 ram = frameTable;
osCreateMesgQueue(&entry->data.load.msgQueue, &entry->data.load.msg, 1);
@ -880,7 +897,7 @@ void AnimationContext_SetLoadFrame(GlobalContext* globalCtx, LinkAnimationHeader
}
/**
* Requests copying all vectors from src into dst
* Requests copying all vectors from src frame table into dst frame table
*/
void AnimationContext_SetCopyAll(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src) {
AnimationEntry* entry = AnimationContext_AddEntry(&globalCtx->animationCtx, ANIMENTRY_COPYALL);
@ -894,7 +911,7 @@ void AnimationContext_SetCopyAll(GlobalContext* globalCtx, s32 vecCount, Vec3s*
}
/**
* Requests interpolating between base and mod with the given weight, placing the result in base
* Requests interpolating between base and mod frame tables with the given weight, placing the result in base
*/
void AnimationContext_SetInterp(GlobalContext* globalCtx, s32 vecCount, Vec3s* base, Vec3s* mod, f32 weight) {
AnimationEntry* entry = AnimationContext_AddEntry(&globalCtx->animationCtx, ANIMENTRY_INTERP);
@ -909,7 +926,7 @@ void AnimationContext_SetInterp(GlobalContext* globalCtx, s32 vecCount, Vec3s* b
}
/**
* Requests copying vectors from src to dst whose copy flag is true
* Requests copying vectors from src frame table to dst frame table whose copy flag is true
*/
void AnimationContext_SetCopyTrue(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src, u8* copyFlag) {
AnimationEntry* entry = AnimationContext_AddEntry(&globalCtx->animationCtx, ANIMENTRY_COPYTRUE);
@ -924,7 +941,7 @@ void AnimationContext_SetCopyTrue(GlobalContext* globalCtx, s32 vecCount, Vec3s*
}
/**
* Requests copying vectors from src to dst whose copy flag is false
* Requests copying vectors from src frame table to dst frame table whose copy flag is false
*/
void AnimationContext_SetCopyFalse(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src, u8* copyFlag) {
AnimationEntry* entry = AnimationContext_AddEntry(&globalCtx->animationCtx, ANIMENTRY_COPYFALSE);
@ -961,7 +978,7 @@ void AnimationContext_LoadFrame(GlobalContext* globalCtx, AnimationEntryData* da
}
/**
* If the entry's queue is enabled, copies all vectors from src to dst
* If the entry's queue is enabled, copies all vectors from src frame table to dst frame table
*/
void AnimationContext_CopyAll(GlobalContext* globalCtx, AnimationEntryData* data) {
AnimEntryCopyAll* entry = &data->copy;
@ -978,18 +995,18 @@ void AnimationContext_CopyAll(GlobalContext* globalCtx, AnimationEntryData* data
}
/**
* If the entry's queue is enabled, interpolates between base and mod, placing the result in base
* If the entry's queue is enabled, interpolates between the base and mod frame tables, placing the result in base
*/
void AnimationContext_Interp(GlobalContext* globalCtx, AnimationEntryData* data) {
AnimEntryInterp* entry = &data->interp;
if (!(entry->queueFlag & sDisableAnimQueueFlags)) {
SkelAnime_InterpVec3s(entry->vecCount, entry->base, entry->base, entry->mod, entry->weight);
SkelAnime_InterpFrameTable(entry->vecCount, entry->base, entry->base, entry->mod, entry->weight);
}
}
/**
* If the entry's queue is enabled, copies all vectors from src to dst whose copy flag is true
* If the entry's queue is enabled, copies all vectors from src frame table to dst frame table whose copy flag is true
*/
void AnimationContext_CopyTrue(GlobalContext* globalCtx, AnimationEntryData* data) {
AnimEntryCopyTrue* entry = &data->copy1;
@ -1009,7 +1026,7 @@ void AnimationContext_CopyTrue(GlobalContext* globalCtx, AnimationEntryData* dat
}
/**
* If the entry's queue is enabled, copies all vectors from src to dst whose copy flag is false
* If the entry's queue is enabled, copies all vectors from src frame table to dst frame table whose copy flag is false
*/
void AnimationContext_CopyFalse(GlobalContext* globalCtx, AnimationEntryData* data) {
AnimEntryCopyFalse* entry = &data->copy0;
@ -1060,8 +1077,12 @@ void AnimationContext_Update(GlobalContext* globalCtx, AnimationContext* animati
sDisableAnimQueueFlags = 0;
}
/**
* Initializes a skeleton to be used with Link animations to a looping animation, dynamically allocating the frame
* tables if not given.
*/
void SkelAnime_InitLink(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
LinkAnimationHeader* segment, s32 flags, Vec3s* jointTable, Vec3s* morphTable,
LinkAnimationHeader* animation, s32 flags, Vec3s* jointTable, Vec3s* morphTable,
s32 limbBufCount) {
FlexSkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
s32 headerJointCount = skeletonHeader->sh.limbCount;
@ -1102,14 +1123,17 @@ void SkelAnime_InitLink(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkel
if ((skelAnime->jointTable == NULL) || (skelAnime->morphTable == NULL)) {
osSyncPrintf(VT_FGCOL(RED));
osSyncPrintf(
"Skeleton_Info_Rom_SV_ct メモリアロケーションエラー\n"); // Skeleton_Info_Rom_SV_ct Memory allocation error
// Memory allocation error
osSyncPrintf("Skeleton_Info_Rom_SV_ct メモリアロケーションエラー\n");
osSyncPrintf(VT_RST);
}
LinkAnimation_Change(globalCtx, skelAnime, segment, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f);
LinkAnimation_Change(globalCtx, skelAnime, animation, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f);
}
/**
* Sets the update function of a SkelAnime that uses Link animations based on its mode
*/
void LinkAnimation_SetUpdateFunction(SkelAnime* skelAnime) {
if (skelAnime->mode <= ANIMMODE_LOOP_INTERP) {
skelAnime->update = LinkAnimation_Loop;
@ -1119,10 +1143,18 @@ void LinkAnimation_SetUpdateFunction(SkelAnime* skelAnime) {
skelAnime->morphWeight = 0.0f;
}
/**
* Advances the current Link animation and updates all frame tables. If the animation plays once, returns true when it
* finishes.
*/
s32 LinkAnimation_Update(GlobalContext* globalCtx, SkelAnime* skelAnime) {
return skelAnime->update(globalCtx, skelAnime);
}
/**
* Requests an interpolation between the pose in jointTable to the one in morphTable, advancing the morph but not the
* animation frame
*/
s32 LinkAnimation_Morph(GlobalContext* globalCtx, SkelAnime* skelAnime) {
f32 prevMorphWeight = skelAnime->morphWeight;
f32 updateRate = R_UPDATE_RATE * 0.5f;
@ -1138,6 +1170,10 @@ s32 LinkAnimation_Morph(GlobalContext* globalCtx, SkelAnime* skelAnime) {
return 0;
}
/**
* Requests a load of the next frame of a Link animation, advances the morph, and requests an interpolation between
* jointTable and morphTable
*/
void LinkAnimation_AnimateFrame(GlobalContext* globalCtx, SkelAnime* skelAnime) {
AnimationContext_SetLoadFrame(globalCtx, skelAnime->animation, skelAnime->curFrame, skelAnime->limbCount,
skelAnime->jointTable);
@ -1154,6 +1190,9 @@ void LinkAnimation_AnimateFrame(GlobalContext* globalCtx, SkelAnime* skelAnime)
}
}
/**
* Advances a Link animation that loops over its full length
*/
s32 LinkAnimation_Loop(GlobalContext* globalCtx, SkelAnime* skelAnime) {
f32 updateRate = R_UPDATE_RATE * 0.5f;
@ -1167,6 +1206,9 @@ s32 LinkAnimation_Loop(GlobalContext* globalCtx, SkelAnime* skelAnime) {
return 0;
}
/**
* Advances a Link animation that stops at endFrame and returns true when it is reached.
*/
s32 LinkAnimation_Once(GlobalContext* globalCtx, SkelAnime* skelAnime) {
f32 updateRate = R_UPDATE_RATE * 0.5f;
@ -1186,61 +1228,83 @@ s32 LinkAnimation_Once(GlobalContext* globalCtx, SkelAnime* skelAnime) {
return 0;
}
/**
* Sets a new morph and resets the morph weight for the current animation.
*/
void Animation_SetMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 morphFrames) {
skelAnime->morphWeight = 1.0f;
skelAnime->morphRate = 1.0f / morphFrames;
}
void LinkAnimation_Change(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment, f32 playSpeed,
/**
* General way to set a new Link animation, allowing choice of playback speed, start frame, end frame, play mode, and
* number of transition frames. Positive morph frames morph from the current pose to the start pose of the new
* animation, then start the new animation. Negative morph frames start the new animation immediately, modified by the
* pose immediately before the animation change.
*/
void LinkAnimation_Change(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation, f32 playSpeed,
f32 startFrame, f32 endFrame, u8 mode, f32 morphFrames) {
skelAnime->mode = mode;
if ((morphFrames != 0.0f) && ((segment != skelAnime->animation) || (startFrame != skelAnime->curFrame))) {
if ((morphFrames != 0.0f) && ((animation != skelAnime->animation) || (startFrame != skelAnime->curFrame))) {
if (morphFrames < 0) {
LinkAnimation_SetUpdateFunction(skelAnime);
SkelAnime_CopyVec3s(skelAnime, skelAnime->morphTable, skelAnime->jointTable);
SkelAnime_CopyFrameTable(skelAnime, skelAnime->morphTable, skelAnime->jointTable);
morphFrames = -morphFrames;
} else {
skelAnime->update = LinkAnimation_Morph;
AnimationContext_SetLoadFrame(globalCtx, segment, (s32)startFrame, skelAnime->limbCount,
AnimationContext_SetLoadFrame(globalCtx, animation, (s32)startFrame, skelAnime->limbCount,
skelAnime->morphTable);
}
skelAnime->morphWeight = 1.0f;
skelAnime->morphRate = 1.0f / morphFrames;
} else {
LinkAnimation_SetUpdateFunction(skelAnime);
AnimationContext_SetLoadFrame(globalCtx, segment, (s32)startFrame, skelAnime->limbCount, skelAnime->jointTable);
AnimationContext_SetLoadFrame(globalCtx, animation, (s32)startFrame, skelAnime->limbCount,
skelAnime->jointTable);
skelAnime->morphWeight = 0.0f;
}
skelAnime->animation = segment;
skelAnime->animation = animation;
skelAnime->curFrame = 0.0f;
skelAnime->startFrame = startFrame;
skelAnime->curFrame = startFrame;
skelAnime->endFrame = endFrame;
skelAnime->animLength = Animation_GetLength(segment);
skelAnime->animLength = Animation_GetLength(animation);
skelAnime->playSpeed = playSpeed;
}
void LinkAnimation_PlayOnce(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment) {
LinkAnimation_Change(globalCtx, skelAnime, segment, 1.0f, 0.0f, Animation_GetLastFrame(segment), ANIMMODE_ONCE,
/**
* Immediately changes to a Link animation that plays once at the default speed.
*/
void LinkAnimation_PlayOnce(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation) {
LinkAnimation_Change(globalCtx, skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE,
0.0f);
}
void LinkAnimation_PlayOnceSetSpeed(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment,
/**
* Immediately changes to a Link animation that plays once at the specified speed.
*/
void LinkAnimation_PlayOnceSetSpeed(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation,
f32 playSpeed) {
LinkAnimation_Change(globalCtx, skelAnime, segment, playSpeed, 0.0f, Animation_GetLastFrame(segment), ANIMMODE_ONCE,
LinkAnimation_Change(globalCtx, skelAnime, animation, playSpeed, 0.0f, Animation_GetLastFrame(animation),
ANIMMODE_ONCE, 0.0f);
}
/**
* Immediately changes to a Link animation that loops at the default speed.
*/
void LinkAnimation_PlayLoop(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation) {
LinkAnimation_Change(globalCtx, skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_LOOP,
0.0f);
}
void LinkAnimation_PlayLoop(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment) {
LinkAnimation_Change(globalCtx, skelAnime, segment, 1.0f, 0.0f, Animation_GetLastFrame(segment), ANIMMODE_LOOP,
0.0f);
}
void LinkAnimation_PlayLoopSetSpeed(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment,
/**
* Immediately changes to a Link animation that loops at the specified speed.
*/
void LinkAnimation_PlayLoopSetSpeed(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation,
f32 playSpeed) {
LinkAnimation_Change(globalCtx, skelAnime, segment, playSpeed, 0.0f, Animation_GetLastFrame(segment), ANIMMODE_LOOP,
0.0f);
LinkAnimation_Change(globalCtx, skelAnime, animation, playSpeed, 0.0f, Animation_GetLastFrame(animation),
ANIMMODE_LOOP, 0.0f);
}
/**
@ -1259,19 +1323,19 @@ void LinkAnimation_CopyMorphToJoint(GlobalContext* globalCtx, SkelAnime* skelAni
}
/**
* Requests loading frame data from the Link animation at segment into morphTable
* Requests loading frame data from the Link animation into morphTable
*/
void LinkAnimation_LoadToMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment,
void LinkAnimation_LoadToMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation,
f32 frame) {
AnimationContext_SetLoadFrame(globalCtx, segment, (s32)frame, skelAnime->limbCount, skelAnime->morphTable);
AnimationContext_SetLoadFrame(globalCtx, animation, (s32)frame, skelAnime->limbCount, skelAnime->morphTable);
}
/**
* Requests loading frame data from the Link animation at segment into jointTable
* Requests loading frame data from the Link animation into jointTable
*/
void LinkAnimation_LoadToJoint(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment,
void LinkAnimation_LoadToJoint(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation,
f32 frame) {
AnimationContext_SetLoadFrame(globalCtx, segment, (s32)frame, skelAnime->limbCount, skelAnime->jointTable);
AnimationContext_SetLoadFrame(globalCtx, animation, (s32)frame, skelAnime->limbCount, skelAnime->jointTable);
}
/**
@ -1282,7 +1346,7 @@ void LinkAnimation_InterpJointMorph(GlobalContext* globalCtx, SkelAnime* skelAni
}
/**
* Requests loading frame data from the Link animation segments and blending them, placing the result in jointTable
* Requests loading frame data from the Link animations and blending them, placing the result in jointTable
*/
void LinkAnimation_BlendToJoint(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation1,
f32 frame1, LinkAnimationHeader* animation2, f32 frame2, f32 blendWeight,
@ -1298,7 +1362,7 @@ void LinkAnimation_BlendToJoint(GlobalContext* globalCtx, SkelAnime* skelAnime,
}
/**
* Requests loading frame data from the Link animation segments and blending them, placing the result in morphTable
* Requests loading frame data from the Link animations and blending them, placing the result in morphTable
*/
void LinkAnimation_BlendToMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation1,
f32 frame1, LinkAnimationHeader* animation2, f32 frame2, f32 blendWeight,
@ -1313,12 +1377,17 @@ void LinkAnimation_BlendToMorph(GlobalContext* globalCtx, SkelAnime* skelAnime,
AnimationContext_SetInterp(globalCtx, skelAnime->limbCount, skelAnime->morphTable, alignedBlendTable, blendWeight);
}
// unused
/**
* Changes a looping animation to one that stops at the end. Unused
*/
void LinkAnimation_EndLoop(SkelAnime* skelAnime) {
skelAnime->mode = ANIMMODE_ONCE;
LinkAnimation_SetUpdateFunction(skelAnime);
}
/**
* Checks if the current frame is after frame and the previous frame was before it.
*/
s32 Animation_OnFrameImpl(SkelAnime* skelAnime, f32 frame, f32 updateRate) {
f32 updateSpeed = skelAnime->playSpeed * updateRate;
f32 prevFrame = skelAnime->curFrame - updateSpeed;
@ -1343,12 +1412,18 @@ s32 Animation_OnFrameImpl(SkelAnime* skelAnime, f32 frame, f32 updateRate) {
return false;
}
/**
* Checks if the current Link animation has reached the specified frame
*/
s32 LinkAnimation_OnFrame(SkelAnime* skelAnime, f32 frame) {
f32 updateRate = R_UPDATE_RATE * 0.5f;
return Animation_OnFrameImpl(skelAnime, frame, updateRate);
}
/**
* Initializes a normal skeleton to a looping animation, dynamically allocating the frame tables if not provided.
*/
s32 SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount) {
SkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
@ -1369,7 +1444,8 @@ s32 SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeade
}
if ((skelAnime->jointTable == NULL) || (skelAnime->morphTable == NULL)) {
osSyncPrintf(VT_FGCOL(RED));
osSyncPrintf("Skeleton_Info2_ct メモリアロケーションエラー\n"); // Skeleton_Info2_ct memory allocation error
// Memory allocation error
osSyncPrintf("Skeleton_Info2_ct メモリアロケーションエラー\n");
osSyncPrintf(VT_RST);
}
@ -1378,6 +1454,9 @@ s32 SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeade
}
}
/**
* Initializes a flex skeleton to a looping animation, dynamically allocating the frame tables if not given.
*/
s32 SkelAnime_InitFlex(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount) {
FlexSkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
@ -1401,8 +1480,8 @@ s32 SkelAnime_InitFlex(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkele
}
if ((skelAnime->jointTable == NULL) || (skelAnime->morphTable == NULL)) {
osSyncPrintf(VT_FGCOL(RED));
osSyncPrintf(
"Skeleton_Info_Rom_SV_ct メモリアロケーションエラー\n"); // Skeleton_Info_Rom_SV_ct Memory allocation error
// Memory allocation error
osSyncPrintf("Skeleton_Info_Rom_SV_ct メモリアロケーションエラー\n");
osSyncPrintf(VT_RST);
}
@ -1411,6 +1490,9 @@ s32 SkelAnime_InitFlex(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkele
}
}
/**
* Initializes a skeleton with SkinLimbs to a looping animation, dynamically allocating the frame tables.
*/
s32 SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation) {
SkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
@ -1423,8 +1505,8 @@ s32 SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonH
ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->morphTable), "../z_skelanime.c", 3121);
if ((skelAnime->jointTable == NULL) || (skelAnime->morphTable == NULL)) {
osSyncPrintf(VT_FGCOL(RED));
osSyncPrintf(
"Skeleton_Info2_skin2_ct メモリアロケーションエラー\n"); // Skeleton_Info2_skin2_ct Memory allocation error
// Memory allocation error
osSyncPrintf("Skeleton_Info2_skin2_ct メモリアロケーションエラー\n");
osSyncPrintf(VT_RST);
}
@ -1433,6 +1515,9 @@ s32 SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonH
}
}
/**
* Sets the SkelAnime's update function based on its current mode.
*/
void SkelAnime_SetUpdate(SkelAnime* skelAnime) {
if (skelAnime->mode <= ANIMMODE_LOOP_INTERP) {
skelAnime->update = SkelAnime_LoopFull;
@ -1443,10 +1528,17 @@ void SkelAnime_SetUpdate(SkelAnime* skelAnime) {
}
}
/**
* Advances the current animation and updates all frame tables. If the animation plays once, returns true when it
* finishes.
*/
s32 SkelAnime_Update(SkelAnime* skelAnime) {
return skelAnime->update(skelAnime);
}
/**
* Morphs from the pose in jointTable to the one in morphTable, advancing the morph but not the animation frame
*/
s32 SkelAnime_Morph(SkelAnime* skelAnime) {
f32 prevMorphWeight = skelAnime->morphWeight;
f32 updateRate = R_UPDATE_RATE * (1.0f / 3.0f);
@ -1456,11 +1548,15 @@ s32 SkelAnime_Morph(SkelAnime* skelAnime) {
SkelAnime_SetUpdate(skelAnime);
skelAnime->morphWeight = 0.0f;
}
SkelAnime_InterpVec3s(skelAnime->limbCount, skelAnime->jointTable, skelAnime->jointTable, skelAnime->morphTable,
1.0f - (skelAnime->morphWeight / prevMorphWeight));
SkelAnime_InterpFrameTable(skelAnime->limbCount, skelAnime->jointTable, skelAnime->jointTable,
skelAnime->morphTable, 1.0f - (skelAnime->morphWeight / prevMorphWeight));
return 0;
}
/**
* Performs a tapered morph from the pose in jointTable to the one in morphTable, advancing the morph but not the
* animation frame
*/
s32 SkelAnime_MorphTaper(SkelAnime* skelAnime) {
s16 prevPhase = skelAnime->morphWeight * 0x4000;
s16 curPhase;
@ -1486,11 +1582,14 @@ s32 SkelAnime_MorphTaper(SkelAnime* skelAnime) {
} else {
curWeight = 0.0f;
}
SkelAnime_InterpVec3s(skelAnime->limbCount, skelAnime->jointTable, skelAnime->jointTable, skelAnime->morphTable,
1.0f - curWeight);
SkelAnime_InterpFrameTable(skelAnime->limbCount, skelAnime->jointTable, skelAnime->jointTable,
skelAnime->morphTable, 1.0f - curWeight);
return 0;
}
/**
* Gets frame data for the current frame as modified by morphTable and advances the morph
*/
void SkelAnime_AnimateFrame(SkelAnime* skelAnime) {
Vec3s nextjointTable[100];
@ -1503,8 +1602,8 @@ void SkelAnime_AnimateFrame(SkelAnime* skelAnime) {
frame = 0;
}
SkelAnime_GetFrameData(skelAnime->animation, frame, skelAnime->limbCount, nextjointTable);
SkelAnime_InterpVec3s(skelAnime->limbCount, skelAnime->jointTable, skelAnime->jointTable, nextjointTable,
partialFrame);
SkelAnime_InterpFrameTable(skelAnime->limbCount, skelAnime->jointTable, skelAnime->jointTable, nextjointTable,
partialFrame);
}
if (skelAnime->morphWeight != 0) {
f32 updateRate = R_UPDATE_RATE * (1.0f / 3.0f);
@ -1513,12 +1612,15 @@ void SkelAnime_AnimateFrame(SkelAnime* skelAnime) {
if (skelAnime->morphWeight <= 0.0f) {
skelAnime->morphWeight = 0.0f;
} else {
SkelAnime_InterpVec3s(skelAnime->limbCount, skelAnime->jointTable, skelAnime->jointTable,
skelAnime->morphTable, skelAnime->morphWeight);
SkelAnime_InterpFrameTable(skelAnime->limbCount, skelAnime->jointTable, skelAnime->jointTable,
skelAnime->morphTable, skelAnime->morphWeight);
}
}
}
/**
* Advances an animation that loops over its full length and updates the frame tables
*/
s32 SkelAnime_LoopFull(SkelAnime* skelAnime) {
f32 updateRate = R_UPDATE_RATE * (1.0f / 3.0f);
@ -1532,6 +1634,9 @@ s32 SkelAnime_LoopFull(SkelAnime* skelAnime) {
return 0;
}
/**
* Advances an animation that loops over part of its length and updates the frame tables
*/
s32 SkelAnime_LoopPartial(SkelAnime* skelAnime) {
f32 updateRate = R_UPDATE_RATE * (1.0f / 3.0f);
@ -1546,6 +1651,9 @@ s32 SkelAnime_LoopPartial(SkelAnime* skelAnime) {
return 0;
}
/**
* Advances an animation that stops at endFrame and returns true when it is reached.
*/
s32 SkelAnime_Once(SkelAnime* skelAnime) {
f32 updateRate = R_UPDATE_RATE * (1.0f / 3.0f);
@ -1569,13 +1677,19 @@ s32 SkelAnime_Once(SkelAnime* skelAnime) {
return 0;
}
/**
* Fully general way to set a new animation, allowing choice of playback speed, start frame, end frame, play mode,
* number of transition frames, and tapering of the transition. Positive morph frames morph from the current pose to the
* start pose of the new animation, then start the new animation. Negative morph frames start the new animation
* immediately, modified by the pose immediately before the animation change.
*/
void Animation_ChangeImpl(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed, f32 startFrame, f32 endFrame,
u8 mode, f32 morphFrames, s8 taper) {
skelAnime->mode = mode;
if ((morphFrames != 0.0f) && ((animation != skelAnime->animation) || (startFrame != skelAnime->curFrame))) {
if (morphFrames < 0) {
SkelAnime_SetUpdate(skelAnime);
SkelAnime_CopyVec3s(skelAnime, skelAnime->morphTable, skelAnime->jointTable);
SkelAnime_CopyFrameTable(skelAnime, skelAnime->morphTable, skelAnime->jointTable);
morphFrames = -morphFrames;
} else {
if (taper != ANIMTAPER_NONE) {
@ -1609,42 +1723,77 @@ void Animation_ChangeImpl(SkelAnime* skelAnime, AnimationHeader* animation, f32
skelAnime->playSpeed = playSpeed;
}
/**
* General way to set a new animation, allowing choice of playback speed, start frame, end frame, play mode, and number
* of transition frames. Positive morph frames morph from the current pose to the start pose of the new animation, then
* start the new animation. Negative morph frames start the new animation immediately, modified by the pose immediately
* before the animation change.
*/
void Animation_Change(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed, f32 startFrame, f32 endFrame,
u8 mode, f32 morphFrames) {
Animation_ChangeImpl(skelAnime, animation, playSpeed, startFrame, endFrame, mode, morphFrames, ANIMTAPER_NONE);
}
/**
* Immediately changes to an animation that plays once at the default speed.
*/
void Animation_PlayOnce(SkelAnime* skelAnime, AnimationHeader* animation) {
Animation_Change(skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE, 0.0f);
}
/**
* Smoothly transitions to an animation that plays once at the default speed.
* Positive morph frames morph from the current pose to the start pose of the new animation, then start the new
* animation. Negative morph frames start the new animation immediately, modified by the pose immediately before the
* animation change.
*/
void Animation_MorphToPlayOnce(SkelAnime* skelAnime, AnimationHeader* animation, f32 morphFrames) {
Animation_Change(skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE, morphFrames);
}
/**
* Immediately changes to an animation that plays once at the specified speed.
*/
void Animation_PlayOnceSetSpeed(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed) {
Animation_Change(skelAnime, animation, playSpeed, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE, 0.0f);
}
/**
* Immediately changes to an animation that loops at the default.
*/
void Animation_PlayLoop(SkelAnime* skelAnime, AnimationHeader* animation) {
Animation_Change(skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_LOOP, 0.0f);
}
/**
* Smoothly transitions to a looping animation, specifying the number of frames for the transition.
* Positive morph frames morph from the current pose to the start pose of the new animation, then start the new
* animation. Negative morph frames start the new animation immediately, modified by the pose immediately before the
* animation change.
*/
void Animation_MorphToLoop(SkelAnime* skelAnime, AnimationHeader* animation, f32 morphFrames) {
Animation_Change(skelAnime, animation, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, morphFrames);
}
/**
* Immediately changes to an animation that loops at the specified speed.
*/
void Animation_PlayLoopSetSpeed(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed) {
Animation_Change(skelAnime, animation, playSpeed, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_LOOP, 0.0f);
}
// unused
/**
* Changes a looping animation to one that stops at the end. Unused
*/
void Animation_EndLoop(SkelAnime* skelAnime) {
skelAnime->mode = ANIMMODE_ONCE;
skelAnime->endFrame = skelAnime->animLength;
SkelAnime_SetUpdate(skelAnime);
}
/**
* Reverses the current animation.
*/
void Animation_Reverse(SkelAnime* skelAnime) {
f32 startFrame = skelAnime->startFrame;
@ -1653,7 +1802,11 @@ void Animation_Reverse(SkelAnime* skelAnime) {
skelAnime->endFrame = startFrame;
}
void SkelAnime_CopyVec3sTrue(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* copyFlag) {
/**
* Copies the src frame table to the dst frame table if copyFlag for that limb is true.
* Used only by En_Test
*/
void SkelAnime_CopyFrameTableTrue(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* copyFlag) {
s32 i;
for (i = 0; i < skelAnime->limbCount; i++, dst++, src++) {
@ -1663,8 +1816,11 @@ void SkelAnime_CopyVec3sTrue(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* c
}
}
// unused
void SkelAnime_CopyVec3sFalse(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* copyFlag) {
/**
* Copies the src frame table to the dst frame table if copyFlag for that limb is false.
* Unused.
*/
void SkelAnime_CopyFrameTableFalse(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* copyFlag) {
s32 i;
for (i = 0; i < skelAnime->limbCount; i++, dst++, src++) {
@ -1688,7 +1844,6 @@ void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* diff, s16 angle) {
if (skelAnime->moveFlags & ANIM_FLAG_NOMOVE) {
diff->x = diff->z = 0.0f;
} else {
// `angle` rotation around y axis.
x = skelAnime->jointTable[0].x;
z = skelAnime->jointTable[0].z;
sin = Math_SinS(angle);
@ -1697,7 +1852,6 @@ void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* diff, s16 angle) {
diff->z = z * cos - x * sin;
x = skelAnime->prevTransl.x;
z = skelAnime->prevTransl.z;
// `prevRot` rotation around y axis.
sin = Math_SinS(skelAnime->prevRot);
cos = Math_CosS(skelAnime->prevRot);
diff->x -= x * cos + z * sin;
@ -1724,25 +1878,36 @@ void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* diff, s16 angle) {
skelAnime->moveFlags &= ~ANIM_FLAG_NOMOVE;
}
/**
* Checks if the current animation is at the specified frame
*/
s32 Animation_OnFrame(SkelAnime* skelAnime, f32 frame) {
return Animation_OnFrameImpl(skelAnime, frame, 1.0f);
}
/**
* Frees the frame tables for a skelAnime with dynamically allocated tables.
*/
void SkelAnime_Free(SkelAnime* skelAnime, GlobalContext* globalCtx) {
if (skelAnime->jointTable != NULL) {
ZeldaArena_FreeDebug(skelAnime->jointTable, "../z_skelanime.c", 3729);
} else {
osSyncPrintf("now_joint あきまへん!!\n"); // now_joint is freed! !
// now_joint is freed! !
osSyncPrintf("now_joint あきまへん!!\n");
}
if (skelAnime->morphTable != NULL) {
ZeldaArena_FreeDebug(skelAnime->morphTable, "../z_skelanime.c", 3731);
} else {
osSyncPrintf("morf_joint あきまへん!!\n"); // "morf_joint is freed !!"
// "morf_joint is freed !!"
osSyncPrintf("morf_joint あきまへん!!\n");
}
}
void SkelAnime_CopyVec3s(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src) {
/**
* Copies the src frame table to the dst frame table.
*/
void SkelAnime_CopyFrameTable(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src) {
s32 i;
for (i = 0; i < skelAnime->limbCount; i++) {

View file

@ -245,7 +245,8 @@ void func_8097CEEC(DemoGo* this, GlobalContext* globalCtx) {
void func_8097CF20(DemoGo* this, GlobalContext* globalCtx, UNK_TYPE arg2) {
AnimationHeader* animation = &D_060029A8;
if (arg2 != 0) {
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), 0, -8.0f);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_LOOP,
-8.0f);
this->action = 5;
this->unk_19C = 0.0f;
}
@ -319,7 +320,7 @@ void DemoGo_Init(Actor* thisx, GlobalContext* globalCtx) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600FEF0, NULL, NULL, NULL, 0);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), 2, 0.0f);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE, 0.0f);
this->action = 0;
}

View file

@ -345,7 +345,8 @@ void func_8098544C(DemoIm* this, GlobalContext* globalCtx) {
void func_809854DC(DemoIm* this, GlobalContext* globalCtx) {
if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[5] != NULL) &&
(globalCtx->csCtx.npcActions[5]->action == 2)) {
Animation_Change(&this->skelAnime, &D_06001868, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001868), 0, 0.0f);
Animation_Change(&this->skelAnime, &D_06001868, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001868), ANIMMODE_LOOP,
0.0f);
this->action = 2;
this->drawConfig = 1;
func_80985358(this, globalCtx);
@ -362,14 +363,16 @@ void func_8098557C(DemoIm* this) {
void func_809855A8(DemoIm* this, GlobalContext* globalCtx) {
if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[5] != NULL) &&
(globalCtx->csCtx.npcActions[5]->action == 3)) {
Animation_Change(&this->skelAnime, &D_06000710, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000710), 2, 4.0f);
Animation_Change(&this->skelAnime, &D_06000710, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000710), ANIMMODE_ONCE,
4.0f);
this->action = 4;
}
}
void func_80985640(DemoIm* this, s32 arg1) {
if (arg1 != 0) {
Animation_Change(&this->skelAnime, &D_06000AFC, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000AFC), 0, 0.0f);
Animation_Change(&this->skelAnime, &D_06000AFC, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000AFC), ANIMMODE_LOOP,
0.0f);
this->action = 5;
}
}
@ -443,7 +446,8 @@ void func_809858C8(DemoIm* this, GlobalContext* globalCtx) {
void func_80985948(DemoIm* this, GlobalContext* globalCtx) {
if (func_809850E8(this, globalCtx, 4, 5)) {
Animation_Change(&this->skelAnime, &D_06011C08, 1.0f, 0.0f, Animation_GetLastFrame(&D_06011C08), 2, 0.0f);
Animation_Change(&this->skelAnime, &D_06011C08, 1.0f, 0.0f, Animation_GetLastFrame(&D_06011C08), ANIMMODE_ONCE,
0.0f);
this->action = 8;
this->drawConfig = 2;
this->unk_26C = 0;
@ -482,7 +486,8 @@ void func_809859E0(DemoIm* this, GlobalContext* globalCtx) {
void func_80985B34(DemoIm* this, GlobalContext* globalCtx) {
if (func_80985134(this, globalCtx, 4, 5)) {
Animation_Change(&this->skelAnime, &D_06012218, 1.0f, 0.0f, Animation_GetLastFrame(&D_06012218), 2, -8.0f);
Animation_Change(&this->skelAnime, &D_06012218, 1.0f, 0.0f, Animation_GetLastFrame(&D_06012218), ANIMMODE_ONCE,
-8.0f);
this->action = 8;
this->drawConfig = 2;
this->unk_268 = kREG(5) + 10.0f;
@ -563,7 +568,8 @@ void func_80985F54(DemoIm* this) {
}
void func_80985F64(DemoIm* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_06001868, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001868), 0, 0.0f);
Animation_Change(&this->skelAnime, &D_06001868, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001868), ANIMMODE_LOOP,
0.0f);
func_80985180(this, globalCtx, 5);
this->action = 11;
this->drawConfig = 1;
@ -571,14 +577,15 @@ void func_80985F64(DemoIm* this, GlobalContext* globalCtx) {
void func_80985FE8(DemoIm* this, s32 arg1) {
if (arg1 != 0) {
Animation_Change(&this->skelAnime, &D_0601182C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0601182C), 0, -8.0f);
Animation_Change(&this->skelAnime, &D_0601182C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0601182C), ANIMMODE_LOOP,
-8.0f);
}
}
void func_8098604C(DemoIm* this) {
f32 frameCount = Animation_GetLastFrame(&D_06010EE0);
Animation_Change(&this->skelAnime, &D_06010EE0, 1.0f, 0.0f, frameCount, 2, -8.0f);
Animation_Change(&this->skelAnime, &D_06010EE0, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, -8.0f);
this->action = 12;
this->drawConfig = 1;
this->unk_2D0 = 1;
@ -591,13 +598,15 @@ void func_809860C8(DemoIm* this) {
void func_809860DC(DemoIm* this, s32 arg1) {
if (arg1 != 0) {
Animation_Change(&this->skelAnime, &D_06001868, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001868), 0, -8.0f);
Animation_Change(&this->skelAnime, &D_06001868, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001868), ANIMMODE_LOOP,
-8.0f);
this->unk_2D0 = 0;
}
}
void func_80986148(DemoIm* this) {
Animation_Change(&this->skelAnime, &D_06010EE0, -1.0f, Animation_GetLastFrame(&D_06010EE0), 0.0f, 2, -8.0f);
Animation_Change(&this->skelAnime, &D_06010EE0, -1.0f, Animation_GetLastFrame(&D_06010EE0), 0.0f, ANIMMODE_ONCE,
-8.0f);
this->action = 14;
this->drawConfig = 1;
}
@ -615,8 +624,8 @@ void func_809861C4(DemoIm* this, GlobalContext* globalCtx) {
func_80986148(this);
break;
case 7:
Animation_Change(&this->skelAnime, &D_0601182C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0601182C), 0,
-8.0f);
Animation_Change(&this->skelAnime, &D_0601182C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0601182C),
ANIMMODE_LOOP, -8.0f);
this->action = 12;
break;
default:
@ -750,14 +759,16 @@ void func_80986700(DemoIm* this) {
}
void func_80986710(DemoIm* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_06001868, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001868), 0, 0.0f);
Animation_Change(&this->skelAnime, &D_06001868, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001868), ANIMMODE_LOOP,
0.0f);
func_80985180(this, globalCtx, 5);
this->action = 16;
this->drawConfig = 1;
}
void func_80986794(DemoIm* this) {
Animation_Change(&this->skelAnime, &D_060014E4, 1.0f, 0.0f, Animation_GetLastFrame(&D_060014E4), 2, -8.0f);
Animation_Change(&this->skelAnime, &D_060014E4, 1.0f, 0.0f, Animation_GetLastFrame(&D_060014E4), ANIMMODE_ONCE,
-8.0f);
this->action = 17;
this->drawConfig = 1;
}

View file

@ -282,7 +282,8 @@ void func_8098EA68(DemoSa* this, GlobalContext* globalCtx) {
if (globalCtx->csCtx.state != 0) {
npcAction = globalCtx->csCtx.npcActions[4];
if ((npcAction != NULL) && (npcAction->action == 3)) {
Animation_Change(&this->skelAnime, &D_0600DF80, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600DF80), 2, -4.0f);
Animation_Change(&this->skelAnime, &D_0600DF80, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600DF80),
ANIMMODE_ONCE, -4.0f);
this->action = 4;
}
}
@ -290,7 +291,8 @@ void func_8098EA68(DemoSa* this, GlobalContext* globalCtx) {
void func_8098EB00(DemoSa* this, s32 arg1) {
if (arg1 != 0) {
Animation_Change(&this->skelAnime, &D_0600E500, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600E500), 0, 0.0f);
Animation_Change(&this->skelAnime, &D_0600E500, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600E500), ANIMMODE_LOOP,
0.0f);
this->action = 5;
}
}
@ -349,7 +351,7 @@ void func_8098ECF4(DemoSa* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06001334);
SkelAnime_InitFlex(globalCtx, skelAnime, &D_0600B1A0, NULL, NULL, NULL, 0);
Animation_Change(skelAnime, &D_06001334, 1.0f, 0.0f, frameCount, 2, 0.0f);
Animation_Change(skelAnime, &D_06001334, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, 0.0f);
this->action = 7;
this->actor.shape.unk_14 = 0;
func_8098E508(this, 2);

View file

@ -208,7 +208,8 @@ void func_809B0988(EnAni* this, GlobalContext* globalCtx) {
void func_809B0994(EnAni* this, GlobalContext* globalCtx) {
if (globalCtx->csCtx.npcActions[0]->action == 4) {
Animation_Change(&this->skelAnime, &D_060070F0, 1.0f, 0.0f, Animation_GetLastFrame(&D_060070F0), 2, -4.0f);
Animation_Change(&this->skelAnime, &D_060070F0, 1.0f, 0.0f, Animation_GetLastFrame(&D_060070F0), ANIMMODE_ONCE,
-4.0f);
this->unk_2AA++;
this->actor.shape.shadowDrawFunc = ActorShadow_DrawFunc_Circle;
}
@ -225,7 +226,8 @@ void func_809B0A6C(EnAni* this, GlobalContext* globalCtx) {
this->skelAnime.curFrame = 0.0f;
}
if (globalCtx->csCtx.npcActions[0]->action == 2) {
Animation_Change(&this->skelAnime, &D_060067B8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060067B8), 2, 0.0f);
Animation_Change(&this->skelAnime, &D_060067B8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060067B8), ANIMMODE_ONCE,
0.0f);
this->actor.shape.shadowDrawFunc = NULL;
this->unk_2AA++;
}

View file

@ -73,7 +73,7 @@ void func_809C1CAC(EnBird* this, s16 params) {
AnimationHeader* anim = &D_0600006C;
this->unk_198 = Rand_S16Offset(5, 0x23);
Animation_Change(&this->skelAnime, anim, playbackSpeed, 0.0f, frameCount, 0, 0.0f);
Animation_Change(&this->skelAnime, anim, playbackSpeed, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
EnBird_SetupAction(this, func_809C1D60);
}

View file

@ -92,7 +92,7 @@ void EnBomBowlMan_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void EnBomBowMan_SetupWaitAsleep(EnBomBowlMan* this, GlobalContext* globalCtx) {
this->frameCount = (f32)Animation_GetLastFrame(&D_06000710);
Animation_Change(&this->skelAnime, &D_06000710, 1.0f, 0.0f, this->frameCount, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06000710, 1.0f, 0.0f, this->frameCount, ANIMMODE_LOOP, -10.0f);
this->actor.textId = 0xC0;
this->dialogState = 5;
this->actionFunc = EnBomBowMan_WaitAsleep;
@ -125,7 +125,7 @@ void EnBomBowMan_TalkAsleep(EnBomBowlMan* this, GlobalContext* globalCtx) {
void EnBomBowMan_WakeUp(EnBomBowlMan* this, GlobalContext* globalCtx) {
this->frameCount = (f32)Animation_GetLastFrame(&D_06000080);
Animation_Change(&this->skelAnime, &D_06000080, 1.0f, 0.0f, this->frameCount, 2, -10.0f);
Animation_Change(&this->skelAnime, &D_06000080, 1.0f, 0.0f, this->frameCount, ANIMMODE_ONCE, -10.0f);
this->eyeMode = CHU_GIRL_EYES_OPEN_SLOWLY;
this->actionFunc = EnBomBowMan_BlinkAwake;
}
@ -161,7 +161,7 @@ void EnBomBowMan_CheckBeatenDC(EnBomBowlMan* this, GlobalContext* globalCtx) {
if ((func_8010BDBC(&globalCtx->msgCtx) == this->dialogState) && (func_80106BC8(globalCtx) != 0)) {
func_80106CCC(globalCtx);
this->frameCount = (f32)Animation_GetLastFrame(&D_060072AC);
Animation_Change(&this->skelAnime, &D_060072AC, 1.0f, 0.0f, this->frameCount, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_060072AC, 1.0f, 0.0f, this->frameCount, ANIMMODE_LOOP, -10.0f);
this->eyeMode = CHU_GIRL_EYES_AWAKE;
this->blinkTimer = (s16)Rand_ZeroFloat(60.0f) + 20;
// Check for beaten Dodongo's Cavern

View file

@ -180,7 +180,7 @@ void EnBox_Init(Actor* thisx, GlobalContext* globalCtx) {
this->dyna.actor.initPosRot.rot.z = this->dyna.actor.posRot.rot.z = this->dyna.actor.shape.rot.z = 0;
SkelAnime_Init(globalCtx2, &this->skelanime, &D_060047D8, anim, this->jointTable, this->morphTable, 5);
Animation_Change(&this->skelanime, anim, 1.5f, animFrameStart, endFrame, 2, 0.0f);
Animation_Change(&this->skelanime, anim, 1.5f, animFrameStart, endFrame, ANIMMODE_ONCE, 0.0f);
switch (this->type) {
case ENBOX_TYPE_SMALL:
@ -409,7 +409,7 @@ void EnBox_WaitOpen(EnBox* this, GlobalContext* globalCtx) {
linkAge = gSaveContext.linkAge;
anim = D_809CA800[(this->unk_1F4 < 0 ? 2 : 0) + linkAge];
frameCount = Animation_GetLastFrame(anim);
Animation_Change(&this->skelanime, anim, 1.5f, 0, frameCount, 2, 0.0f);
Animation_Change(&this->skelanime, anim, 1.5f, 0, frameCount, ANIMMODE_ONCE, 0.0f);
EnBox_SetupAction(this, EnBox_Open);
if (this->unk_1F4 > 0) {
switch (this->type) {

View file

@ -155,7 +155,7 @@ void EnButte_Init(Actor* thisx, GlobalContext* globalCtx) {
this->unk_25C = Rand_ZeroOne() * 0xFFFF;
this->unk_25E = Rand_ZeroOne() * 0xFFFF;
this->unk_260 = Rand_ZeroOne() * 0xFFFF;
Animation_Change(&this->skelAnime, &D_05002470, 1.0f, 0.0f, 0.0f, 1, 0.0f);
Animation_Change(&this->skelAnime, &D_05002470, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, 0.0f);
EnButte_SetupFlyAround(this);
this->actor.shape.rot.x -= 0x2320;
this->drawSkelAnime = true;

View file

@ -158,7 +158,7 @@ void func_809DF494(EnCow* this, GlobalContext* globalCtx) {
} else {
this->unk_278 = Rand_ZeroFloat(500.0f) + 40.0f;
Animation_Change(&this->skelAnime, &D_060001CC, 1.0f, this->skelAnime.curFrame,
Animation_GetLastFrame(&D_060001CC), 2, 1.0f);
Animation_GetLastFrame(&D_060001CC), ANIMMODE_ONCE, 1.0f);
}
if ((this->actor.xzDistToLink < 150.0f) && (!(this->unk_276 & 2))) {
@ -274,7 +274,7 @@ void func_809DFA84(EnCow* this, GlobalContext* globalCtx) {
} else {
this->unk_278 = Rand_ZeroFloat(200.0f) + 40.0f;
Animation_Change(&this->skelAnime, &D_06004348, 1.0f, this->skelAnime.curFrame,
Animation_GetLastFrame(&D_06004348), 2, 1.0f);
Animation_GetLastFrame(&D_06004348), ANIMMODE_ONCE, 1.0f);
}
if ((this->actor.xzDistToLink < 150.0f) &&
@ -301,9 +301,11 @@ void EnCow_Update(Actor* thisx, GlobalContext* globalCtx) {
if (SkelAnime_Update(&this->skelAnime) != 0) {
if (this->skelAnime.animation == &D_060001CC) {
Audio_PlayActorSound2(thisx, NA_SE_EV_COW_CRY);
Animation_Change(&this->skelAnime, &D_06004264, 1.0f, 0.0f, Animation_GetLastFrame(&D_06004264), 2, 1.0f);
Animation_Change(&this->skelAnime, &D_06004264, 1.0f, 0.0f, Animation_GetLastFrame(&D_06004264),
ANIMMODE_ONCE, 1.0f);
} else {
Animation_Change(&this->skelAnime, &D_060001CC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060001CC), 0, 1.0f);
Animation_Change(&this->skelAnime, &D_060001CC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060001CC),
ANIMMODE_LOOP, 1.0f);
}
}
this->actionFunc(this, globalCtx);
@ -338,9 +340,11 @@ void func_809DFE98(Actor* thisx, GlobalContext* globalCtx) {
if (SkelAnime_Update(&this->skelAnime) != 0) {
if (this->skelAnime.animation == &D_06004348) {
Animation_Change(&this->skelAnime, &D_06004E98, 1.0f, 0.0f, Animation_GetLastFrame(&D_06004E98), 2, 1.0f);
Animation_Change(&this->skelAnime, &D_06004E98, 1.0f, 0.0f, Animation_GetLastFrame(&D_06004E98),
ANIMMODE_ONCE, 1.0f);
} else {
Animation_Change(&this->skelAnime, &D_06004348, 1.0f, 0.0f, Animation_GetLastFrame(&D_06004348), 0, 1.0f);
Animation_Change(&this->skelAnime, &D_06004348, 1.0f, 0.0f, Animation_GetLastFrame(&D_06004348),
ANIMMODE_LOOP, 1.0f);
}
}
this->actionFunc(this, globalCtx);

View file

@ -104,7 +104,7 @@ void func_809E03B4(EnCrow* this, GlobalContext* globalCtx) {
this->actor.speedXZ *= Math_CosS(this->actor.posRot.rot.x);
this->actor.velocity.y = 0.0f;
Animation_Change(&this->skelAnime, &D_060000F0, 0.4f, 0.0f, 0.0f, 1, -3.0f);
Animation_Change(&this->skelAnime, &D_060000F0, 0.4f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -3.0f);
scale = this->actor.scale.x * 100.0f;
this->actor.posRot.pos.y += 20.0f * scale;
this->actor.bgCheckFlags &= ~1;

View file

@ -192,7 +192,8 @@ void EnDh_Wait(EnDh* this, GlobalContext* globalCtx) {
}
void EnDh_SetupWalk(EnDh* this) {
Animation_Change(&this->skelAnime, &D_06003A8C, 1.0f, 0.0f, Animation_GetLastFrame(&D_06003A8C) - 3.0f, 0, -6.0f);
Animation_Change(&this->skelAnime, &D_06003A8C, 1.0f, 0.0f, Animation_GetLastFrame(&D_06003A8C) - 3.0f,
ANIMMODE_LOOP, -6.0f);
this->curAction = DH_WALK;
this->timer = 300;
this->actor.speedXZ = 1.0f;
@ -253,7 +254,7 @@ void EnDh_Attack(EnDh* this, GlobalContext* globalCtx) {
if (SkelAnime_Update(&this->skelAnime)) {
this->actionState++;
} else if ((this->actor.xzDistToLink > 100.0f) || !func_8002E084(&this->actor, 60 * 0x10000 / 360)) {
Animation_Change(&this->skelAnime, &D_06004658, -1.0f, this->skelAnime.curFrame, 0.0f, 2, -4.0f);
Animation_Change(&this->skelAnime, &D_06004658, -1.0f, this->skelAnime.curFrame, 0.0f, ANIMMODE_ONCE, -4.0f);
this->actionState = 4;
this->collider2.base.atFlags = this->collider2.list[0].body.toucherFlags = 0;
this->collider2.list[0].body.toucher.flags = this->collider2.list[0].body.toucher.damage = 0;
@ -284,12 +285,12 @@ void EnDh_Attack(EnDh* this, GlobalContext* globalCtx) {
break;
case 3:
if ((this->actor.xzDistToLink <= 100.0f) && (func_8002E084(&this->actor, 60 * 0x10000 / 360) != 0)) {
Animation_Change(&this->skelAnime, &D_06004658, 1.0f, 20.0f, Animation_GetLastFrame(&D_06004658), 2,
-6.0f);
Animation_Change(&this->skelAnime, &D_06004658, 1.0f, 20.0f, Animation_GetLastFrame(&D_06004658),
ANIMMODE_ONCE, -6.0f);
this->actionState = 0;
} else {
Animation_Change(&this->skelAnime, &D_06004658, -1.0f, Animation_GetLastFrame(&D_06004658), 0.0f, 2,
-4.0f);
Animation_Change(&this->skelAnime, &D_06004658, -1.0f, Animation_GetLastFrame(&D_06004658), 0.0f,
ANIMMODE_ONCE, -4.0f);
this->actionState++;
this->collider2.base.atFlags = this->collider2.list[0].body.toucherFlags = 0;
this->collider2.list[0].body.toucher.flags = this->collider2.list[0].body.toucher.damage = 0;
@ -368,7 +369,7 @@ void EnDh_Damage(EnDh* this, GlobalContext* globalCtx) {
f32 frames = Animation_GetLastFrame(&D_06004658);
EnDh_SetupAttack(this);
Animation_Change(&this->skelAnime, &D_06004658, 1.0f, 20.0f, frames, 2, -6.0f);
Animation_Change(&this->skelAnime, &D_06004658, 1.0f, 20.0f, frames, ANIMMODE_ONCE, -6.0f);
} else {
EnDh_SetupWalk(this);
}

View file

@ -254,7 +254,7 @@ void EnDodongo_SetupIdle(EnDodongo* this) {
void EnDodongo_SetupWalk(EnDodongo* this) {
f32 frames = Animation_GetLastFrame(&D_06008B1C);
Animation_Change(&this->skelAnime, &D_06008B1C, 0.0f, 0.0f, frames, 0, -4.0f);
Animation_Change(&this->skelAnime, &D_06008B1C, 0.0f, 0.0f, frames, ANIMMODE_LOOP, -4.0f);
this->actor.speedXZ = 1.5f;
this->timer = Rand_S16Offset(50, 70);
this->rightFootStep = true;
@ -277,7 +277,7 @@ void EnDodongo_SetupEndBreatheFire(EnDodongo* this) {
}
void EnDodongo_SetupSwallowBomb(EnDodongo* this) {
Animation_Change(&this->skelAnime, &D_060028F0, -1.0f, 35.0f, 0.0f, 2, -4.0f);
Animation_Change(&this->skelAnime, &D_060028F0, -1.0f, 35.0f, 0.0f, ANIMMODE_ONCE, -4.0f);
this->actionState = DODONGO_SWALLOW_BOMB;
this->timer = 25;
this->actor.speedXZ = 0.0f;
@ -285,7 +285,7 @@ void EnDodongo_SetupSwallowBomb(EnDodongo* this) {
}
void EnDodongo_SetupStunned(EnDodongo* this) {
Animation_Change(&this->skelAnime, &D_060028F0, 0.0f, 25.0f, 0.0f, 2, -4.0f);
Animation_Change(&this->skelAnime, &D_060028F0, 0.0f, 25.0f, 0.0f, ANIMMODE_ONCE, -4.0f);
this->actionState = DODONGO_STUNNED;
this->actor.speedXZ = 0.0f;
if (this->damageEffect == 0xF) {

View file

@ -164,7 +164,7 @@ void EnFirefly_SetupWait(EnFirefly* this) {
void EnFirefly_SetupFall(EnFirefly* this) {
this->timer = 40;
this->actor.velocity.y = 0.0f;
Animation_Change(&this->skelAnime, &D_0600017C, 0.5f, 0.0f, 0.0f, 1, -3.0f);
Animation_Change(&this->skelAnime, &D_0600017C, 0.5f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -3.0f);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FFLY_DEAD);
this->actor.flags |= 0x10;
func_8003426C(&this->actor, 0x4000, 0xFF, 0, 40);

View file

@ -205,7 +205,8 @@ void EnFloormas_SetupTurn(EnFloormas* this) {
if (rotDelta > 0) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_06002158, -3.0f);
} else {
Animation_Change(&this->skelAnime, &D_06002158, -1.0f, Animation_GetLastFrame(&D_06002158), 0.0f, 2, -3.0f);
Animation_Change(&this->skelAnime, &D_06002158, -1.0f, Animation_GetLastFrame(&D_06002158), 0.0f, ANIMMODE_ONCE,
-3.0f);
}
if (this->actor.scale.x > 0.004f) {
@ -218,7 +219,7 @@ void EnFloormas_SetupTurn(EnFloormas* this) {
}
void EnFloormas_SetupHover(EnFloormas* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_06009520, 3.0f, 0, Animation_GetLastFrame(&D_06009520), 2, -3.0f);
Animation_Change(&this->skelAnime, &D_06009520, 3.0f, 0, Animation_GetLastFrame(&D_06009520), ANIMMODE_ONCE, -3.0f);
this->actor.speedXZ = 0.0f;
this->actor.gravity = 0.0f;
EnFloormas_MakeInvulnerable(this);
@ -235,7 +236,7 @@ void EnFloormas_SetupCharge(EnFloormas* this) {
}
void EnFloormas_SetupLand(EnFloormas* this) {
Animation_Change(&this->skelAnime, &D_060019CC, 1.0f, 41.0f, 42.0f, 2, 5.0f);
Animation_Change(&this->skelAnime, &D_060019CC, 1.0f, 41.0f, 42.0f, ANIMMODE_ONCE, 5.0f);
if ((this->actor.speedXZ < 0.0f) || (this->actionFunc != EnFloormas_Charge)) {
this->actionTimer = 30;
} else {
@ -257,7 +258,8 @@ void EnFloormas_SetupSplit(EnFloormas* this) {
this->actor.shape.rot.y = this->actor.parent->shape.rot.y + 0x5555;
this->actor.posRot.pos = this->actor.parent->posRot.pos;
this->actor.params = 0x10;
Animation_Change(&this->skelAnime, &D_060019CC, 1.0f, 41.0f, Animation_GetLastFrame(&D_060019CC), 2, 0.0f);
Animation_Change(&this->skelAnime, &D_060019CC, 1.0f, 41.0f, Animation_GetLastFrame(&D_060019CC), ANIMMODE_ONCE,
0.0f);
this->collider.dim.radius = sCylinderInit.dim.radius * 0.6f;
this->collider.dim.height = sCylinderInit.dim.height * 0.6f;
this->collider.body.bumperFlags &= ~4;
@ -297,13 +299,13 @@ void EnFloormas_SetupSmShrink(EnFloormas* this, GlobalContext* globalCtx) {
}
void EnFloormas_SetupSlaveJumpAtMaster(EnFloormas* this) {
Animation_Change(&this->skelAnime, &D_060019CC, 2.0f, 0.0f, 41.0f, 2, 0.0f);
Animation_Change(&this->skelAnime, &D_060019CC, 2.0f, 0.0f, 41.0f, ANIMMODE_ONCE, 0.0f);
this->actionFunc = EnFloormas_SmSlaveJumpAtMaster;
this->actor.speedXZ = 0.0f;
}
void EnFloormas_SetupJumpAtLink(EnFloormas* this) {
Animation_Change(&this->skelAnime, &D_060019CC, 2.0f, 0.0f, 41.0f, 2, 0.0f);
Animation_Change(&this->skelAnime, &D_060019CC, 2.0f, 0.0f, 41.0f, ANIMMODE_ONCE, 0.0f);
this->actionFunc = EnFloormas_JumpAtLink;
this->actor.speedXZ = 0.0f;
}
@ -312,7 +314,7 @@ void EnFloormas_SetupGrabLink(EnFloormas* this, Player* player) {
f32 yDelta;
f32 xzDelta;
Animation_Change(&this->skelAnime, &D_060019CC, 1.0f, 36.0f, 45.0f, 2, -3.0f);
Animation_Change(&this->skelAnime, &D_060019CC, 1.0f, 36.0f, 45.0f, ANIMMODE_ONCE, -3.0f);
this->actor.flags &= ~1;
this->actor.speedXZ = 0.0f;
this->actor.velocity.y = 0.0f;
@ -376,7 +378,7 @@ void EnFloormas_SetupRecover(EnFloormas* this) {
}
void EnFloormas_SetupFreeze(EnFloormas* this) {
Animation_Change(&this->skelAnime, &D_060019CC, 1.5f, 0, 20.0f, 2, -3.0f);
Animation_Change(&this->skelAnime, &D_060019CC, 1.5f, 0, 20.0f, ANIMMODE_ONCE, -3.0f);
this->actor.speedXZ = 0.0f;
if (this->actor.colChkInfo.damageEffect == 4) {
func_8003426C(&this->actor, -0x8000, 0xFF, 0, 0x50);

View file

@ -125,7 +125,8 @@ void func_80A1DA04(EnFu* this, GlobalContext* globalCtx) {
this->actionFunc = EnFu_WaitChild;
if (this->skelanime.animation == &D_0600057C) {
Animation_Change(&this->skelanime, &D_06000B04, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000B04), 2, -4.0f);
Animation_Change(&this->skelanime, &D_06000B04, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000B04),
ANIMMODE_ONCE, -4.0f);
}
}
}
@ -144,7 +145,8 @@ void EnFu_WaitChild(EnFu* this, GlobalContext* globalCtx) {
// if func_80A1D94C returns 1, actionFunc is set to func_80A1DA04
if (func_80A1D94C(this, globalCtx, textID, func_80A1DA04)) {
if (textID == 0x5033) {
Animation_Change(&this->skelanime, &D_0600057C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600057C), 2, -4.0f);
Animation_Change(&this->skelanime, &D_0600057C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600057C),
ANIMMODE_ONCE, -4.0f);
}
}
}
@ -243,7 +245,7 @@ void EnFu_Update(Actor* thisx, GlobalContext* globalCtx) {
func_8002E4B4(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
if ((!(this->behaviorFlags & FU_WAIT)) && (SkelAnime_Update(&this->skelanime) != 0)) {
Animation_Change(&this->skelanime, this->skelanime.animation, 1.0f, 0.0f,
Animation_GetLastFrame(this->skelanime.animation), 2, 0.0f);
Animation_GetLastFrame(this->skelanime.animation), ANIMMODE_ONCE, 0.0f);
}
this->actionFunc(this, globalCtx);
if ((this->behaviorFlags & FU_RESET_LOOK_ANGLE)) {

View file

@ -307,7 +307,8 @@ void EnGeldB_Wait(EnGeldB* this, GlobalContext* globalCtx) {
}
void EnGeldB_SetupFlee(EnGeldB* this) {
Animation_Change(&this->skelAnime, &D_0600ADF8, -2.0f, Animation_GetLastFrame(&D_0600ADF8), 0.0f, 3, -4.0f);
Animation_Change(&this->skelAnime, &D_0600ADF8, -2.0f, Animation_GetLastFrame(&D_0600ADF8), 0.0f,
ANIMMODE_ONCE_INTERP, -4.0f);
this->timer = 20;
this->invisible = false;
this->actionState = GELDB_WAIT;
@ -398,7 +399,8 @@ void EnGeldB_Ready(EnGeldB* this, GlobalContext* globalCtx) {
}
void EnGeldB_SetupAdvance(EnGeldB* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_060024E8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060024E8), 1, -4.0f);
Animation_Change(&this->skelAnime, &D_060024E8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060024E8),
ANIMMODE_LOOP_INTERP, -4.0f);
this->actionState = GELDB_ADVANCE;
EnGeldB_SetupAction(this, EnGeldB_Advance);
}
@ -481,7 +483,8 @@ void EnGeldB_Advance(EnGeldB* this, GlobalContext* globalCtx) {
}
void EnGeldB_SetupRollForward(EnGeldB* this) {
Animation_Change(&this->skelAnime, &D_06001390, -1.0f, Animation_GetLastFrame(&D_06001390), 0.0f, 2, -3.0f);
Animation_Change(&this->skelAnime, &D_06001390, -1.0f, Animation_GetLastFrame(&D_06001390), 0.0f, ANIMMODE_ONCE,
-3.0f);
this->timer = 0;
this->invisible = true;
this->actionState = GELDB_ROLL_FORWARD;
@ -554,7 +557,8 @@ void EnGeldB_Pivot(EnGeldB* this, GlobalContext* globalCtx) {
}
void EnGeldB_SetupCircle(EnGeldB* this) {
Animation_Change(&this->skelAnime, &D_0600A814, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600A814), 1, 0.0f);
Animation_Change(&this->skelAnime, &D_0600A814, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600A814),
ANIMMODE_LOOP_INTERP, 0.0f);
this->actor.speedXZ = Rand_CenteredFloat(12.0f);
this->actor.posRot.rot.y = this->actor.shape.rot.y;
this->skelAnime.playSpeed = -this->actor.speedXZ * 0.5f;
@ -657,7 +661,8 @@ void EnGeldB_SetupSpinDodge(EnGeldB* this, GlobalContext* globalCtx) {
s16 sp3E;
Player* player = PLAYER;
Animation_Change(&this->skelAnime, &D_0600A814, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600A814), 1, 0.0f);
Animation_Change(&this->skelAnime, &D_0600A814, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600A814),
ANIMMODE_LOOP_INTERP, 0.0f);
sp3E = player->actor.shape.rot.y;
if (Math_SinS(sp3E - this->actor.shape.rot.y) > 0.0f) {
this->actor.speedXZ = -10.0f;
@ -809,7 +814,8 @@ void EnGeldB_Slash(EnGeldB* this, GlobalContext* globalCtx) {
}
void EnGeldB_SetupSpinAttack(EnGeldB* this) {
Animation_Change(&this->skelAnime, &D_06000F5C, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000F5C), 3, 0.0f);
Animation_Change(&this->skelAnime, &D_06000F5C, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000F5C),
ANIMMODE_ONCE_INTERP, 0.0f);
this->swordCollider.base.atFlags &= ~6;
this->actionState = GELDB_SPIN_ATTACK;
this->spinAttackState = 0;
@ -994,7 +1000,8 @@ void EnGeldB_Damaged(EnGeldB* this, GlobalContext* globalCtx) {
}
void EnGeldB_SetupJump(EnGeldB* this) {
Animation_Change(&this->skelAnime, &D_06001390, -1.0f, Animation_GetLastFrame(&D_06001390), 0.0f, 2, -3.0f);
Animation_Change(&this->skelAnime, &D_06001390, -1.0f, Animation_GetLastFrame(&D_06001390), 0.0f, ANIMMODE_ONCE,
-3.0f);
this->timer = 0;
this->invisible = false;
this->actionState = GELDB_JUMP;
@ -1035,7 +1042,7 @@ void EnGeldB_SetupBlock(EnGeldB* this) {
this->actor.speedXZ = 0.0f;
this->actionState = GELDB_BLOCK;
this->timer = (s32)Rand_CenteredFloat(10.0f) + 10;
Animation_Change(&this->skelAnime, &D_06001578, 0.0f, 0.0f, lastFrame, 2, 0.0f);
Animation_Change(&this->skelAnime, &D_06001578, 0.0f, 0.0f, lastFrame, ANIMMODE_ONCE, 0.0f);
EnGeldB_SetupAction(this, EnGeldB_Block);
}
@ -1096,7 +1103,8 @@ void EnGeldB_SetupSidestep(EnGeldB* this, GlobalContext* globalCtx) {
s16 linkAngle;
Player* player;
Animation_Change(&this->skelAnime, &D_0600A814, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600A814), 1, 0.0f);
Animation_Change(&this->skelAnime, &D_0600A814, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600A814),
ANIMMODE_LOOP_INTERP, 0.0f);
player = PLAYER;
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsLink, 1, 0xFA0, 1);
linkAngle = player->actor.shape.rot.y;
@ -1470,7 +1478,7 @@ void EnGeldB_Draw(Actor* thisx, GlobalContext* globalCtx) {
if ((this->spinAttackState >= 2) && SkelAnime_Update(&this->skelAnime)) {
if (this->spinAttackState == 2) {
Animation_Change(&this->skelAnime, &D_06000F5C, 0.5f, 0.0f, 12.0f, 3, 4.0f);
Animation_Change(&this->skelAnime, &D_06000F5C, 0.5f, 0.0f, 12.0f, ANIMMODE_ONCE_INTERP, 4.0f);
this->spinAttackState++;
thisx->posRot.rot.y = thisx->shape.rot.y = thisx->yawTowardsLink;
} else {

View file

@ -97,7 +97,8 @@ void func_80A3D838(EnGm* this, GlobalContext* globalCtx) {
this->actor.flags &= ~0x10;
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600FEF0, NULL, this->jointTable, this->morphTable, 18);
gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->objGmBankIndex].segment);
Animation_Change(&this->skelAnime, &D_060002B8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060002B8), 0, 0.0f);
Animation_Change(&this->skelAnime, &D_060002B8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060002B8), ANIMMODE_LOOP,
0.0f);
this->actor.draw = EnGm_Draw;
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder_Set3(globalCtx, &this->collider, &this->actor, &sCylinderInit);

View file

@ -86,7 +86,8 @@ void EnGuest_Update(Actor* thisx, GlobalContext* globalCtx) {
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_060000F0, NULL, this->jointTable, this->morphTable, 16);
gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->osAnimeBankIndex].segment);
Animation_Change(&this->skelAnime, &D_060042AC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060042AC), 0, 0.0f);
Animation_Change(&this->skelAnime, &D_060042AC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060042AC), ANIMMODE_LOOP,
0.0f);
this->actor.draw = EnGuest_Draw;
this->actor.update = func_80A505CC;

View file

@ -48,7 +48,7 @@ void EnHata_Init(Actor* thisx, GlobalContext* globalCtx) {
frameCount = Animation_GetLastFrame(&D_06000444);
Actor_SetScale(&this->dyna.actor, 1.0f / 75.0f);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_06002FD0, &D_06000444, NULL, NULL, 0);
Animation_Change(&this->skelAnime, &D_06000444, 1.0f, 0.0f, frameCount, 0, 0.0f);
Animation_Change(&this->skelAnime, &D_06000444, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
DynaPolyActor_Init(&this->dyna, DPM_UNK);
CollisionHeader_GetVirtual(&D_060000C0, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);

View file

@ -141,7 +141,8 @@ void EnHeishi1_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void EnHeishi1_SetupWalk(EnHeishi1* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005880);
Animation_Change(&this->skelAnime, &D_06005880, this->animSpeed, 0.0f, (s16)frameCount, 0, this->transitionRate);
Animation_Change(&this->skelAnime, &D_06005880, this->animSpeed, 0.0f, (s16)frameCount, ANIMMODE_LOOP,
this->transitionRate);
this->bodyTurnSpeed = 0.0f;
this->moveSpeed = 0.0f;
this->headDirection = Rand_ZeroFloat(1.99f);
@ -224,7 +225,7 @@ void EnHeishi1_Walk(EnHeishi1* this, GlobalContext* globalCtx) {
void EnHeishi1_SetupMoveToLink(EnHeishi1* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005880);
Animation_Change(&this->skelAnime, &D_06005880, 3.0f, 0.0f, (s16)frameCount, 0, -3.0f);
Animation_Change(&this->skelAnime, &D_06005880, 3.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -3.0f);
this->bodyTurnSpeed = 0.0f;
this->moveSpeed = 0.0f;
func_8010B680(globalCtx, 0x702D, &this->actor);
@ -252,7 +253,8 @@ void EnHeishi1_SetupWait(EnHeishi1* this, GlobalContext* globalCtx) {
s16 rand;
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
Animation_Change(&this->skelAnime, &D_06005C30, this->animSpeed, 0.0f, (s16)frameCount, 0, this->transitionRate);
Animation_Change(&this->skelAnime, &D_06005C30, this->animSpeed, 0.0f, (s16)frameCount, ANIMMODE_LOOP,
this->transitionRate);
this->headBehaviorDecided = false;
this->headDirection = Rand_ZeroFloat(1.99f);
rand = Rand_ZeroFloat(50.0f);
@ -321,7 +323,7 @@ void EnHeishi1_Wait(EnHeishi1* this, GlobalContext* globalCtx) {
void EnHeishi1_SetupTurnTowardLink(EnHeishi1* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->kickTimer = 30;
this->actionFunc = EnHeishi1_TurnTowardLink;
}
@ -343,7 +345,7 @@ void EnHeishi1_TurnTowardLink(EnHeishi1* this, GlobalContext* globalCtx) {
void EnHeishi1_SetupKick(EnHeishi1* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->actionFunc = EnHeishi1_Kick;
}
@ -369,7 +371,7 @@ void EnHeishi1_Kick(EnHeishi1* this, GlobalContext* globalCtx) {
void EnHeishi1_SetupWaitNight(EnHeishi1* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->actionFunc = EnHeishi1_WaitNight;
}

View file

@ -167,7 +167,7 @@ void func_80A531D8(EnHeishi2* this, GlobalContext* globalCtx) {
void func_80A531E4(EnHeishi2* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->actionFunc = func_80A53278;
}
@ -266,7 +266,7 @@ void func_80A535BC(EnHeishi2* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005500);
this->unk_2EC = frameCount;
Animation_Change(&this->skelAnime, &D_06005500, 1.0f, 0.0f, frameCount, 2, -10.0f);
Animation_Change(&this->skelAnime, &D_06005500, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, -10.0f);
this->actionFunc = func_80A53638;
}
@ -302,7 +302,7 @@ void func_80A53638(EnHeishi2* this, GlobalContext* globalCtx) {
void func_80A5372C(EnHeishi2* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->unk_2F2[0] = 200;
this->cameraId = Gameplay_CreateSubCamera(globalCtx);
Gameplay_ChangeCameraStatus(globalCtx, 0, 1);
@ -338,7 +338,7 @@ void func_80A53850(EnHeishi2* this, GlobalContext* globalCtx) {
void func_80A53908(EnHeishi2* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->actionFunc = func_80A5399C;
}
@ -432,7 +432,7 @@ void func_80A53C90(EnHeishi2* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005500);
this->unk_2EC = frameCount;
Animation_Change(&this->skelAnime, &D_06005500, 1.0f, 0.0f, frameCount, 2, -10.0f);
Animation_Change(&this->skelAnime, &D_06005500, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, -10.0f);
this->actionFunc = func_80A53D0C;
}
@ -469,7 +469,7 @@ void func_80A53D0C(EnHeishi2* this, GlobalContext* globalCtx) {
void func_80A53DF8(EnHeishi2* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->unk_2F2[0] = 200;
this->cameraId = Gameplay_CreateSubCamera(globalCtx);
Gameplay_ChangeCameraStatus(globalCtx, 0, 1);
@ -595,7 +595,7 @@ void func_80A54320(EnHeishi2* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005500);
this->unk_2EC = frameCount;
Animation_Change(&this->skelAnime, &D_06005500, 1.0f, 0.0f, frameCount, 2, -10.0f);
Animation_Change(&this->skelAnime, &D_06005500, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, -10.0f);
this->audioFlag = 0;
this->actionFunc = func_80A543A0;
}
@ -746,7 +746,7 @@ void func_80A5475C(EnHeishi2* this, GlobalContext* globalCtx) {
void func_80A54954(EnHeishi2* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->actionFunc = func_80A549E8;
}

View file

@ -84,7 +84,7 @@ void EnHeishi3_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void EnHeishi3_SetupGuardType(EnHeishi3* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
if (this->unk_278 == 0) {
this->actionFunc = EnHeishi3_StandSentinelInGrounds;
} else {
@ -160,7 +160,7 @@ void EnHeishi3_StandSentinelInCastle(EnHeishi3* this, GlobalContext* globalCtx)
void EnHeishi3_CatchStart(EnHeishi3* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005880);
Animation_Change(&this->skelAnime, &D_06005880, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06005880, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->caughtTimer = 20;
this->actionFunc = func_80A55BD4;
this->actor.speedXZ = 2.5f;
@ -183,7 +183,7 @@ void func_80A55BD4(EnHeishi3* this, GlobalContext* globalCtx) {
void EnHeishi3_ResetAnimationToIdle(EnHeishi3* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->actionFunc = func_80A55D00;
}

View file

@ -101,7 +101,7 @@ void EnHeishi4_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void func_80A56328(EnHeishi4* this, GlobalContext* globalCtx) {
f32 frames = Animation_GetLastFrame(&D_06005C30);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frames, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP, -10.0f);
this->actionFunc = func_80A563BC;
}
@ -156,7 +156,7 @@ void func_80A563BC(EnHeishi4* this, GlobalContext* globalCtx) {
void func_80A56544(EnHeishi4* this, GlobalContext* globalCtx) {
f32 frames = Animation_GetLastFrame(&D_06005C30);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frames, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP, -10.0f);
if (LINK_AGE_IN_YEARS != YEARS_CHILD) {
osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ ぎゃぁ!オトナだー ☆☆☆☆☆ \n" VT_RST);
Actor_Kill(&this->actor);
@ -211,7 +211,7 @@ void func_80A5673C(EnHeishi4* this, GlobalContext* globalCtx) {
if (gSaveContext.eventChkInf[8] & 1) {
if (!(gSaveContext.infTable[6] & 0x1000)) {
f32 frames = Animation_GetLastFrame(&D_0600C444);
Animation_Change(&this->skelAnime, &D_0600C444, 1.0f, 0.0f, (s16)frames, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_0600C444, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP, -10.0f);
this->actor.textId = 0x7007;
this->unk_282 = 5;
this->unk_284 = 1;
@ -246,7 +246,7 @@ void func_80A56874(EnHeishi4* this, GlobalContext* globalCtx) {
void func_80A56900(EnHeishi4* this, GlobalContext* globalCtx) {
f32 frames = Animation_GetLastFrame(&D_0600C6C8);
Animation_Change(&this->skelAnime, &D_0600C6C8, 1.0f, 0.0f, (s16)frames, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_0600C6C8, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP, -10.0f);
this->actionFunc = func_80A56994;
}
@ -266,7 +266,7 @@ void func_80A56994(EnHeishi4* this, GlobalContext* globalCtx) {
void func_80A56A50(EnHeishi4* this, GlobalContext* globalCtx) {
f32 frames = Animation_GetLastFrame(&D_0600C374);
this->unk_288 = frames;
Animation_Change(&this->skelAnime, &D_0600C374, 1.0f, 0.0f, frames, 2, -10.0f);
Animation_Change(&this->skelAnime, &D_0600C374, 1.0f, 0.0f, frames, ANIMMODE_ONCE, -10.0f);
this->actionFunc = func_80A56ACC;
}

View file

@ -224,11 +224,11 @@ void func_80A68B20(EnHorseGanon* this) {
if (animationChanged == 1) {
Animation_Change(&this->skin.skelAnime, D_80A691B0[this->currentAnimation],
splaySpeeds[this->currentAnimation] * sp30 * 1.5f, 0.0f,
Animation_GetLastFrame(D_80A691B0[this->currentAnimation]), 2, -3.0f);
Animation_GetLastFrame(D_80A691B0[this->currentAnimation]), ANIMMODE_ONCE, -3.0f);
} else {
Animation_Change(&this->skin.skelAnime, D_80A691B0[this->currentAnimation],
splaySpeeds[this->currentAnimation] * sp30 * 1.5f, 0.0f,
Animation_GetLastFrame(D_80A691B0[this->currentAnimation]), 2, 0.0f);
Animation_GetLastFrame(D_80A691B0[this->currentAnimation]), ANIMMODE_ONCE, 0.0f);
}
}

View file

@ -181,7 +181,7 @@ void func_80A6993C(EnHorseLinkChild* this, s32 newAnimationIdx) {
if (this->animationIdx != newAnimationIdx) {
this->animationIdx = newAnimationIdx;
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A695A4(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, -5.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, -5.0f);
}
}
@ -199,10 +199,10 @@ void func_80A699FC(EnHorseLinkChild* this, GlobalContext* globalCtx) {
if (this->animationIdx != newAnimationIdx) {
this->animationIdx = newAnimationIdx;
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A695A4(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, -5.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, -5.0f);
} else {
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A695A4(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, 0.0);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, 0.0);
}
}
}
@ -213,7 +213,7 @@ void func_80A69B7C(EnHorseLinkChild* this) {
this->animationIdx = 0;
this->actor.speedXZ = 0.0f;
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A695A4(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, -5.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, -5.0f);
}
void func_80A69C18(EnHorseLinkChild* this, GlobalContext* globalCtx) {
@ -259,10 +259,10 @@ void func_80A69C18(EnHorseLinkChild* this, GlobalContext* globalCtx) {
if (this->animationIdx != newAnimationIdx) {
this->animationIdx = newAnimationIdx;
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A695A4(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, -5.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, -5.0f);
} else {
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A695A4(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, 0.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, 0.0f);
}
}
}
@ -272,7 +272,7 @@ void func_80A69EC0(EnHorseLinkChild* this) {
this->animationIdx = 0;
this->actor.speedXZ = 0.0f;
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A695A4(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, -5.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, -5.0f);
}
void func_80A69F5C(EnHorseLinkChild* this, GlobalContext* globalCtx) {
@ -389,7 +389,7 @@ void func_80A6A068(EnHorseLinkChild* this, GlobalContext* globalCtx) {
if ((this->animationIdx != newAnimationIdx) || (animationEnded == true)) {
this->animationIdx = newAnimationIdx;
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A695A4(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, -5.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, -5.0f);
} else {
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A695A4(this),
this->skin.skelAnime.curFrame, Animation_GetLastFrame(sAnimations[this->animationIdx]), 2,
@ -402,7 +402,7 @@ void func_80A6A4DC(EnHorseLinkChild* this) {
this->animationIdx = Rand_ZeroOne() > 0.5f ? 0 : 1;
DREG(53) = 0;
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A695A4(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, 0.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, 0.0f);
}
void func_80A6A5A4(EnHorseLinkChild* this, GlobalContext* globalCtx) {
@ -425,7 +425,7 @@ void func_80A6A5A4(EnHorseLinkChild* this, GlobalContext* globalCtx) {
if (Math_CosS(yawDiff) < 0.0f) {
this->animationIdx = 2;
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], D_80A6AF64[this->animationIdx],
0.0f, Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, -5.0f);
0.0f, Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, -5.0f);
} else {
func_80A6A4DC(this);
}
@ -440,7 +440,7 @@ void func_80A6A724(EnHorseLinkChild* this) {
this->unk_1E8 = false;
this->actor.speedXZ = 2.0f;
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A695A4(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, -5.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, -5.0f);
}
void func_80A6A7D0(EnHorseLinkChild* this, GlobalContext* globalCtx) {
@ -500,10 +500,10 @@ void func_80A6A7D0(EnHorseLinkChild* this, GlobalContext* globalCtx) {
if (this->animationIdx != newAnimationIdx) {
this->animationIdx = newAnimationIdx;
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A695A4(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, -5.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, -5.0f);
} else {
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A695A4(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, 0.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, 0.0f);
}
}
}

View file

@ -250,7 +250,7 @@ void func_80A6B91C(EnHorseNormal* this, GlobalContext* globalCtx) {
this->waypoint = 0;
this->actor.speedXZ = 7.0f;
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A6B30C(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, 0.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, 0.0f);
}
void EnHorseNormal_FollowPath(EnHorseNormal* this, GlobalContext* globalCtx) {
@ -274,7 +274,7 @@ void EnHorseNormal_FollowPath(EnHorseNormal* this, GlobalContext* globalCtx) {
this->skin.skelAnime.playSpeed = func_80A6B30C(this);
if (SkelAnime_Update(&this->skin.skelAnime)) {
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A6B30C(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, 0.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, 0.0f);
func_80A6BCEC(this);
}
}
@ -306,7 +306,7 @@ void func_80A6BC48(EnHorseNormal* this) {
this->actor.speedXZ = 0.0f;
this->unk_218 = 0.0f;
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A6B30C(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, 0.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, 0.0f);
}
void func_80A6BCEC(EnHorseNormal* this) {
@ -403,7 +403,7 @@ void EnHorseNormal_Wander(EnHorseNormal* this, GlobalContext* globalCtx) {
func_80A6BCEC(this);
}
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A6B30C(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, -3.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, -3.0f);
} else {
switch (D_80A6D510[this->animationIdx]) {
case 0:
@ -434,10 +434,10 @@ void EnHorseNormal_Wander(EnHorseNormal* this, GlobalContext* globalCtx) {
if (phi_t0 != this->animationIdx) {
this->animationIdx = phi_t0;
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A6B30C(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, -3.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, -3.0f);
} else {
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A6B30C(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, 0.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, 0.0f);
}
}
}
@ -451,7 +451,7 @@ void func_80A6C4CC(EnHorseNormal* this) {
this->actor.speedXZ = 0.0f;
this->unk_218 = 0.0f;
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A6B30C(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, 0.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, 0.0f);
}
void EnHorseNormal_Wait(EnHorseNormal* this, GlobalContext* globalCtx) {
@ -469,7 +469,7 @@ void EnHorseNormal_Wait(EnHorseNormal* this, GlobalContext* globalCtx) {
}
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A6B30C(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, 0.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, 0.0f);
}
}
@ -482,7 +482,7 @@ void func_80A6C6B0(EnHorseNormal* this) {
this->actor.speedXZ = 0.0f;
this->unk_218 = 0.0f;
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A6B30C(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, 0.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, 0.0f);
}
void EnHorseNormal_WaitClone(EnHorseNormal* this, GlobalContext* globalCtx) {
@ -504,7 +504,7 @@ void EnHorseNormal_WaitClone(EnHorseNormal* this, GlobalContext* globalCtx) {
}
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A6B30C(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), 2, 0.0f);
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, 0.0f);
this->unk_1E4 &= ~1;
this->unk_1E4 &= ~2;

View file

@ -179,7 +179,7 @@ void func_80A6DD14(EnHorseZelda* this) {
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->animationIndex],
splaySpeeds[this->animationIndex] * sp34 * 1.5f, 0.0f,
Animation_GetLastFrame(sAnimationHeaders[this->animationIndex]), 2, 0.0f);
Animation_GetLastFrame(sAnimationHeaders[this->animationIndex]), ANIMMODE_ONCE, 0.0f);
}
void func_80A6DDFC(EnHorseZelda* this, GlobalContext* globalCtx) {

View file

@ -165,7 +165,8 @@ void func_80A6E7BC(EnHs* this, GlobalContext* globalCtx) {
break;
}
Animation_Change(&this->skelAnime, &D_060005C0, 1.0f, 0.0f, Animation_GetLastFrame(&D_060005C0), 0, 8.0f);
Animation_Change(&this->skelAnime, &D_060005C0, 1.0f, 0.0f, Animation_GetLastFrame(&D_060005C0), ANIMMODE_LOOP,
8.0f);
}
this->unk_2A8 |= 1;
@ -177,7 +178,8 @@ void func_80A6E8CC(EnHs* this, GlobalContext* globalCtx) {
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && func_80106BC8(globalCtx)) {
func_8010B720(globalCtx, 0x10B3);
func_80A6E3A0(this, func_80A6E7BC);
Animation_Change(&this->skelAnime, &D_06000528, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000528), 0, 8.0f);
Animation_Change(&this->skelAnime, &D_06000528, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000528), ANIMMODE_LOOP,
8.0f);
}
if (this->unk_2AA > 0) {
@ -198,7 +200,8 @@ void func_80A6E9AC(EnHs* this, GlobalContext* globalCtx) {
if (func_8002F368(globalCtx) == 7) {
player->actor.textId = 0x10B2;
func_80A6E3A0(this, func_80A6E8CC);
Animation_Change(&this->skelAnime, &D_06000304, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000304), 0, 8.0f);
Animation_Change(&this->skelAnime, &D_06000304, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000304),
ANIMMODE_LOOP, 8.0f);
this->unk_2AA = 40;
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
} else {

View file

@ -226,7 +226,7 @@ void func_80A74714(EnIk* this) {
frame = 0.0f;
}
Animation_Change(&this->skelAnime, &D_0600CD70, 0.0f, frame, frames, 2, 0.0f);
Animation_Change(&this->skelAnime, &D_0600CD70, 0.0f, frame, frames, ANIMMODE_ONCE, 0.0f);
this->unk_2F8 = 3;
this->actor.speedXZ = 0.0f;
EnIk_SetupAction(this, func_80A747C0);
@ -258,7 +258,7 @@ void func_80A7489C(EnIk* this) {
this->actor.flags |= 5;
this->unk_2F8 = 4;
this->actor.speedXZ = 0.0f;
Animation_Change(&this->skelAnime, &D_0600DD50, 0.0f, 0.0f, frames, 0, 4.0f);
Animation_Change(&this->skelAnime, &D_0600DD50, 0.0f, 0.0f, frames, ANIMMODE_LOOP, 4.0f);
EnIk_SetupAction(this, func_80A7492C);
}
@ -284,10 +284,12 @@ void func_80A7492C(EnIk* this, GlobalContext* globalCtx) {
void func_80A74AAC(EnIk* this) {
this->unk_2F8 = 5;
if (this->unk_2FB == 0) {
Animation_Change(&this->skelAnime, &D_0600ED24, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600ED24), 0, -4.0f);
Animation_Change(&this->skelAnime, &D_0600ED24, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600ED24), ANIMMODE_LOOP,
-4.0f);
this->actor.speedXZ = 0.9f;
} else {
Animation_Change(&this->skelAnime, &D_06006734, 1.0f, 0.0f, Animation_GetLastFrame(&D_06006734), 0, -4.0f);
Animation_Change(&this->skelAnime, &D_06006734, 1.0f, 0.0f, Animation_GetLastFrame(&D_06006734), ANIMMODE_LOOP,
-4.0f);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_IRONNACK_DASH);
this->actor.speedXZ = 2.5f;
}
@ -360,7 +362,7 @@ void func_80A74E2C(EnIk* this) {
this->unk_2FF = 1;
this->unk_2F8 = 6;
this->actor.speedXZ = 0.0f;
Animation_Change(&this->skelAnime, &D_06001C28, 1.5f, 0.0f, frames, 2, -4.0f);
Animation_Change(&this->skelAnime, &D_06001C28, 1.5f, 0.0f, frames, ANIMMODE_ONCE, -4.0f);
EnIk_SetupAction(this, func_80A74EBC);
}
@ -401,7 +403,7 @@ void func_80A7506C(EnIk* this) {
this->unk_2F9 = (s8)frames;
this->unk_2F8 = 7;
this->unk_2FF = this->unk_2FE;
Animation_Change(&this->skelAnime, &D_060029FC, 1.0f, 0.0f, frames, 0, -4.0f);
Animation_Change(&this->skelAnime, &D_060029FC, 1.0f, 0.0f, frames, ANIMMODE_LOOP, -4.0f);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_IRONNACK_PULLOUT);
EnIk_SetupAction(this, func_80A7510C);
}
@ -415,7 +417,7 @@ void func_80A7510C(EnIk* this, GlobalContext* globalCtx) {
} else {
frames = Animation_GetLastFrame(&D_06002538);
this->unk_2F8 = 8;
Animation_Change(&this->skelAnime, &D_06002538, 1.5f, 0.0f, frames, 3, -4.0f);
Animation_Change(&this->skelAnime, &D_06002538, 1.5f, 0.0f, frames, ANIMMODE_ONCE_INTERP, -4.0f);
}
}
}
@ -427,7 +429,7 @@ void func_80A751C8(EnIk* this) {
this->unk_300 = 0;
this->unk_2F8 = 6;
this->actor.speedXZ = 0.0f;
Animation_Change(&this->skelAnime, &D_060033C4, 0.0f, 0.0f, frames, 3, -6.0f);
Animation_Change(&this->skelAnime, &D_060033C4, 0.0f, 0.0f, frames, ANIMMODE_ONCE_INTERP, -6.0f);
this->unk_2FC = 0;
EnIk_SetupAction(this, func_80A75260);
}
@ -465,7 +467,7 @@ void func_80A753D0(EnIk* this) {
this->unk_2FF = this->unk_2FE = 0;
this->unk_2F8 = 8;
Animation_Change(&this->skelAnime, &D_06003DBC, 1.5f, 0.0f, frames, 3, -4.0f);
Animation_Change(&this->skelAnime, &D_06003DBC, 1.5f, 0.0f, frames, ANIMMODE_ONCE_INTERP, -4.0f);
EnIk_SetupAction(this, func_80A7545C);
}
@ -482,7 +484,7 @@ void func_80A754A0(EnIk* this) {
this->unk_2F8 = 1;
this->unk_2FF = 3;
this->actor.speedXZ = 0.0f;
Animation_Change(&this->skelAnime, &D_060033C4, 0.5f, 13.0f, frames, 3, -4.0f);
Animation_Change(&this->skelAnime, &D_060033C4, 0.5f, 13.0f, frames, ANIMMODE_ONCE_INTERP, -4.0f);
EnIk_SetupAction(this, func_80A75530);
}
@ -509,7 +511,7 @@ void func_80A755F0(EnIk* this) {
this->unk_2FE = 0;
this->unk_2F8 = 9;
this->actor.speedXZ = 0.0f;
Animation_Change(&this->skelAnime, &D_0600485C, 1.0f, 0.0f, frames, 3, -4.0f);
Animation_Change(&this->skelAnime, &D_0600485C, 1.0f, 0.0f, frames, ANIMMODE_ONCE_INTERP, -4.0f);
EnIk_SetupAction(this, func_80A7567C);
}
@ -537,10 +539,12 @@ void func_80A75790(EnIk* this) {
this->unk_2F8 = 0;
yawDiff = yaw - this->actor.shape.rot.y;
if (ABS(yawDiff) <= 0x4000) {
Animation_Change(&this->skelAnime, &D_06006194, 1.0f, 0.0f, Animation_GetLastFrame(&D_06006194), 2, -4.0f);
Animation_Change(&this->skelAnime, &D_06006194, 1.0f, 0.0f, Animation_GetLastFrame(&D_06006194), ANIMMODE_ONCE,
-4.0f);
this->actor.speedXZ = -6.0f;
} else {
Animation_Change(&this->skelAnime, &D_060045BC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060045BC), 2, -4.0f);
Animation_Change(&this->skelAnime, &D_060045BC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060045BC), ANIMMODE_ONCE,
-4.0f);
this->actor.speedXZ = 6.0f;
}
this->unk_2FE = 0;
@ -568,7 +572,7 @@ void func_80A7598C(EnIk* this) {
this->unk_2FE = 0;
this->unk_2F8 = 2;
this->actor.speedXZ = 0.0f;
Animation_Change(&this->skelAnime, &D_06005944, 1.0f, 0.0f, frames, 2, -4.0f);
Animation_Change(&this->skelAnime, &D_06005944, 1.0f, 0.0f, frames, ANIMMODE_ONCE, -4.0f);
this->unk_2F9 = 0x18;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_IRONNACK_DEAD);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_CUTBODY);
@ -1013,7 +1017,8 @@ void func_80A77148(EnIk* this) {
}
void func_80A77158(EnIk* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_0600C114, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600C114), 2, 0.0f);
Animation_Change(&this->skelAnime, &D_0600C114, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600C114), ANIMMODE_ONCE,
0.0f);
func_80A770C0(this, globalCtx, 4);
this->action = 1;
this->drawMode = 1;
@ -1021,7 +1026,8 @@ void func_80A77158(EnIk* this, GlobalContext* globalCtx) {
}
void func_80A771E4(EnIk* this) {
Animation_Change(&this->skelAnime, &D_0600C114, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600C114), 2, 0.0f);
Animation_Change(&this->skelAnime, &D_0600C114, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600C114), ANIMMODE_ONCE,
0.0f);
this->action = 2;
this->drawMode = 1;
this->unk_4D4 = 0;
@ -1053,7 +1059,7 @@ void func_80A7735C(EnIk* this, GlobalContext* globalCtx) {
f32 frames = Animation_GetLastFrame(&D_060203D8);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_060205C0, NULL, this->jointTable, this->morphTable, 30);
Animation_Change(&this->skelAnime, &D_060203D8, 1.0f, 0.0f, frames, 2, 0.0f);
Animation_Change(&this->skelAnime, &D_060203D8, 1.0f, 0.0f, frames, ANIMMODE_ONCE, 0.0f);
this->action = 3;
this->drawMode = 2;
func_80A770C0(this, globalCtx, 4);

View file

@ -311,8 +311,8 @@ void func_80A79690(SkelAnime* skelAnime, EnIn* this, GlobalContext* globalCtx) {
void func_80A796EC(EnIn* this, s32 arg1) {
Animation_Change(&this->skelAnime, sAnimationInfo[arg1].animation, 1.0f, 0.0f,
Animation_GetLastFrame(sAnimationInfo[arg1].animation), sAnimationInfo[arg1].unk_08,
sAnimationInfo[arg1].transitionRate);
Animation_GetLastFrame(sAnimationInfo[arg1].animation), sAnimationInfo[arg1].unk_08,
sAnimationInfo[arg1].transitionRate);
}
s32 func_80A7975C(EnIn* this, GlobalContext* globalCtx) {
@ -322,7 +322,7 @@ s32 func_80A7975C(EnIn* this, GlobalContext* globalCtx) {
this->unk_1E6 = 1;
this->collider.base.maskA &= ~1;
Animation_Change(&this->skelAnime, D_80A7B918[this->unk_1E6], 1.0f, 0.0f,
Animation_GetLastFrame(D_80A7B918[this->unk_1E6]), 2, 0.0f);
Animation_GetLastFrame(D_80A7B918[this->unk_1E6]), 2, 0.0f);
this->actionFunc = func_80A7A304;
return 1;
}
@ -481,8 +481,7 @@ void func_80A79FB0(EnIn* this, GlobalContext* globalCtx) {
if (Object_IsLoaded(&globalCtx->objectCtx, this->ingoObjBankIndex) || this->actor.params <= 0) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 36.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06013B88, NULL, this->jointTable,
this->morphTable, 20);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06013B88, NULL, this->jointTable, this->morphTable, 20);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
func_80061EFC(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
@ -600,7 +599,7 @@ void func_80A7A304(EnIn* this, GlobalContext* globalCtx) {
}
}
Animation_Change(&this->skelAnime, D_80A7B918[this->unk_1E6], 1.0f, 0.0f,
Animation_GetLastFrame(D_80A7B918[this->unk_1E6]), 2, -10.0f);
Animation_GetLastFrame(D_80A7B918[this->unk_1E6]), 2, -10.0f);
}
}

View file

@ -94,7 +94,7 @@ s32 func_80A7BE6C(EnInsect* this, GlobalContext* globalCtx) {
}
void func_80A7BF58(EnInsect* this) {
Animation_Change(&this->skelAnime, &D_040341FC, 1.0f, 0.0f, 0.0f, 1, 0.0f);
Animation_Change(&this->skelAnime, &D_040341FC, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, 0.0f);
}
/**

View file

@ -86,7 +86,8 @@ u8 func_80A88F64(EnJs* this, GlobalContext* globalCtx, u16 textId) {
void func_80A89008(EnJs* this) {
En_Js_SetupAction(this, func_80A89304);
Animation_Change(&this->skelAnime, &D_0600045C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600045C), 2, -4.0f);
Animation_Change(&this->skelAnime, &D_0600045C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600045C), ANIMMODE_ONCE,
-4.0f);
}
void func_80A89078(EnJs* this, GlobalContext* globalCtx) {
@ -142,7 +143,8 @@ void func_80A891C4(EnJs* this, GlobalContext* globalCtx) {
void func_80A89294(EnJs* this) {
En_Js_SetupAction(this, func_80A891C4);
Animation_Change(&this->skelAnime, &D_0600018C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600018C), 2, -4.0f);
Animation_Change(&this->skelAnime, &D_0600018C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600018C), ANIMMODE_ONCE,
-4.0f);
}
void func_80A89304(EnJs* this, GlobalContext* globalCtx) {

View file

@ -163,7 +163,7 @@ void func_80A8F320(EnKakasi* this, GlobalContext* globalCtx, s16 arg) {
void func_80A8F660(EnKakasi* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06000214);
Animation_Change(&this->skelanime, &D_06000214, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
Animation_Change(&this->skelanime, &D_06000214, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->actor.textId = 0x4076;
this->unk_196 = 6;

View file

@ -150,7 +150,7 @@ void func_80A90264(EnKakasi2* this, GlobalContext* globalCtx) {
void func_80A904D8(EnKakasi2* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06000214);
Animation_Change(&this->skelAnime, &D_06000214, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06000214, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
Audio_PlayActorSound2(&this->actor, NA_SE_EV_COME_UP_DEKU_JR);
this->actionFunc = func_80A90578;
}
@ -177,7 +177,7 @@ void func_80A90578(EnKakasi2* this, GlobalContext* globalCtx) {
void func_80A9062C(EnKakasi2* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06000214);
Animation_Change(&this->skelAnime, &D_06000214, 0.0f, 0.0f, (s16)frameCount, 2, -10.0f);
Animation_Change(&this->skelAnime, &D_06000214, 0.0f, 0.0f, (s16)frameCount, ANIMMODE_ONCE, -10.0f);
this->actionFunc = func_80A906C4;
}

View file

@ -166,7 +166,7 @@ void func_80A90EBC(EnKakasi3* this, GlobalContext* globalCtx, s32 arg) {
void func_80A911F0(EnKakasi3* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06000214);
Animation_Change(&this->skelAnime, &D_06000214, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06000214, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->actionFunc = func_80A91284;
}

View file

@ -123,7 +123,8 @@ void EnKarebaba_SetupIdle(EnKarebaba* this) {
}
void EnKarebaba_SetupAwaken(EnKarebaba* this) {
Animation_Change(&this->skelAnime, &D_060002B8, 4.0f, 0.0f, Animation_GetLastFrame(&D_060002B8), 0, -3.0f);
Animation_Change(&this->skelAnime, &D_060002B8, 4.0f, 0.0f, Animation_GetLastFrame(&D_060002B8), ANIMMODE_LOOP,
-3.0f);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DUMMY482);
this->actionFunc = EnKarebaba_Awaken;
}
@ -173,13 +174,14 @@ void EnKarebaba_SetupDeadItemDrop(EnKarebaba* this, GlobalContext* globalCtx) {
}
void EnKarebaba_SetupRetract(EnKarebaba* this) {
Animation_Change(&this->skelAnime, &D_060002B8, -3.0f, Animation_GetLastFrame(&D_060002B8), 0.0f, 2, -3.0f);
Animation_Change(&this->skelAnime, &D_060002B8, -3.0f, Animation_GetLastFrame(&D_060002B8), 0.0f, ANIMMODE_ONCE,
-3.0f);
EnKarebaba_ResetCollider(this);
this->actionFunc = EnKarebaba_Retract;
}
void EnKarebaba_SetupDead(EnKarebaba* this) {
Animation_Change(&this->skelAnime, &D_060002B8, 0.0f, 0.0f, 0.0f, 2, 0.0f);
Animation_Change(&this->skelAnime, &D_060002B8, 0.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f);
EnKarebaba_ResetCollider(this);
this->actor.shape.rot.x = -0x4000;
this->actor.params = 200;

View file

@ -316,7 +316,8 @@ void func_80AA68FC(EnMb* this, GlobalContext* globalCtx) {
}
void func_80AA6974(EnMb* this) {
Animation_Change(&this->skelAnime, &D_06009FC0, 0.0f, 0.0f, Animation_GetLastFrame(&D_06009FC0), 0, -4.0f);
Animation_Change(&this->skelAnime, &D_06009FC0, 0.0f, 0.0f, Animation_GetLastFrame(&D_06009FC0), ANIMMODE_LOOP,
-4.0f);
this->actor.speedXZ = 0.59999996f;
this->unk_32A = Rand_S16Offset(50, 70);
this->unk_332 = 1;
@ -332,7 +333,7 @@ void func_80AA6A18(EnMb* this) {
this->unk_32A = Rand_S16Offset(50, 70);
this->unk_332 = 1;
this->unk_320 = 9;
Animation_Change(&this->skelAnime, &D_06009FC0, 0.0f, 0.0f, frameCount, 1, -4.0f);
Animation_Change(&this->skelAnime, &D_06009FC0, 0.0f, 0.0f, frameCount, ANIMMODE_LOOP_INTERP, -4.0f);
EnMb_SetupAction(this, func_80AA8AEC);
}
@ -369,7 +370,7 @@ void func_80AA6BF0(EnMb* this) {
frames = Animation_GetLastFrame(&D_0600B4BC);
this->unk_320 = 10;
Animation_Change(&this->skelAnime, &D_0600B4BC, 3.0f, 0.0f, frames, 3, 0.0f);
Animation_Change(&this->skelAnime, &D_0600B4BC, 3.0f, 0.0f, frames, ANIMMODE_ONCE_INTERP, 0.0f);
this->unk_32E = 1;
yawDiff = (this->actor.posRot.rot.y - this->actor.yawTowardsLink);
@ -416,7 +417,7 @@ void func_80AA6DA4(EnMb* this) {
frameCount = Animation_GetLastFrame(&D_0600EBE4);
this->unk_320 = 11;
Animation_Change(&this->skelAnime, &D_0600EBE4, 5.0f, 0.0f, frameCount, 3, 0.0f);
Animation_Change(&this->skelAnime, &D_0600EBE4, 5.0f, 0.0f, frameCount, ANIMMODE_ONCE_INTERP, 0.0f);
EnMb_SetupAction(this, func_80AA7478);
}
@ -436,7 +437,7 @@ void func_80AA6E7C(EnMb* this) {
this->unk_320 = 2;
this->unk_32A = 0;
this->unk_32E = 6;
Animation_Change(&this->skelAnime, &D_0600D5D4, 1.0f, 4.0f, frames, 3, 0.0f);
Animation_Change(&this->skelAnime, &D_0600D5D4, 1.0f, 4.0f, frames, ANIMMODE_ONCE_INTERP, 0.0f);
EnMb_SetupAction(this, func_80AA840C);
}
@ -552,8 +553,8 @@ void func_80AA7310(EnMb* this, GlobalContext* globalCtx) {
if (this->unk_32A == 0) {
this->unk_32E--;
if (this->unk_32E == 0) {
Animation_Change(&this->skelAnime, &D_06002C10, -1.0f, Animation_GetLastFrame(&D_06002C10), 0.0f, 2,
0.0f);
Animation_Change(&this->skelAnime, &D_06002C10, -1.0f, Animation_GetLastFrame(&D_06002C10), 0.0f,
ANIMMODE_ONCE, 0.0f);
this->unk_32A = 1;
this->actor.speedXZ = 0.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_SPEAR_NORM);
@ -602,7 +603,7 @@ void func_80AA74BC(EnMb* this, GlobalContext* globalCtx) {
func_80AA6AC8(this);
} else {
endFrame = Animation_GetLastFrame(&D_06002C10);
Animation_Change(&this->skelAnime, &D_06002C10, -1.0f, endFrame, 0.0f, 2, 0.0f);
Animation_Change(&this->skelAnime, &D_06002C10, -1.0f, endFrame, 0.0f, ANIMMODE_ONCE, 0.0f);
this->actor.speedXZ = 0.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_SPEAR_NORM);
}
@ -616,7 +617,7 @@ void func_80AA74BC(EnMb* this, GlobalContext* globalCtx) {
if (SkelAnime_Update(&this->skelAnime) != 0) {
if (this->unk_32A == 0) {
endFrame = Animation_GetLastFrame(&D_06002F10);
Animation_Change(&this->skelAnime, &D_06002F10, 0.5f, 0.0f, endFrame, 1, 0.0f);
Animation_Change(&this->skelAnime, &D_06002F10, 0.5f, 0.0f, endFrame, ANIMMODE_LOOP_INTERP, 0.0f);
this->unk_32A = 1;
} else {
yawDiff = Math_Vec3f_Yaw(&this->actor.posRot.pos, &this->waypointPos) - this->actor.yawTowardsLink;
@ -703,7 +704,7 @@ void func_80AA7938(EnMb* this, GlobalContext* globalCtx) {
this->unk_32E--;
if (this->unk_32E == 0) {
f32 pad1 = Animation_GetLastFrame(&D_0600ABE0);
Animation_Change(&this->skelAnime, &D_0600ABE0, 1.5f, 0.0f, pad1, 3, 0.0f);
Animation_Change(&this->skelAnime, &D_0600ABE0, 1.5f, 0.0f, pad1, ANIMMODE_ONCE_INTERP, 0.0f);
}
} else {
sp74 = this->effSpawnPos;
@ -900,13 +901,13 @@ void func_80AA840C(EnMb* this, GlobalContext* globalCtx) {
this->unk_32E--;
if (this->unk_32E == 0) {
if (this->unk_32A == 0) {
Animation_Change(&this->skelAnime, &D_0600E18C, 3.0f, 0.0f, Animation_GetLastFrame(&D_0600E18C), 3,
0.0f);
Animation_Change(&this->skelAnime, &D_0600E18C, 3.0f, 0.0f, Animation_GetLastFrame(&D_0600E18C),
ANIMMODE_ONCE_INTERP, 0.0f);
this->unk_32A = 1;
this->unk_32E = 6;
} else {
Animation_Change(&this->skelAnime, &D_0600E18C, 3.0f, 0.0f, Animation_GetLastFrame(&D_0600E18C), 3,
0.0f);
Animation_Change(&this->skelAnime, &D_0600E18C, 3.0f, 0.0f, Animation_GetLastFrame(&D_0600E18C),
ANIMMODE_ONCE_INTERP, 0.0f);
}
}
} else {

View file

@ -378,7 +378,8 @@ void EnNb_SetupArmRaise(EnNb* this, GlobalContext* globalCtx) {
if (globalCtx->csCtx.state != 0) {
csCmdNPCAction = globalCtx->csCtx.npcActions[1];
if (csCmdNPCAction != NULL && csCmdNPCAction->action == 3) {
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), 2, 0.0f);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE,
0.0f);
this->action = NB_CHAMBER_RAISE_ARM;
}
}
@ -388,7 +389,8 @@ void EnNb_SetupRaisedArmTransition(EnNb* this, s32 animFinished) {
AnimationHeader* animation = &D_06002B4C;
if (animFinished) {
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), 0, 0.0f);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_LOOP,
0.0f);
this->action = NB_CHAMBER_RAISE_ARM_TRANSITION;
}
}
@ -615,14 +617,15 @@ void EnNb_SetRaisedArmCaptureAnim(EnNb* this, s32 animFinished) {
AnimationHeader* animation = &D_06001350;
if (animFinished) {
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), 0, 0.0f);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_LOOP,
0.0f);
}
}
void EnNb_SetupLookAroundInKidnap(EnNb* this) {
AnimationHeader* animation = &D_06001E7C;
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), 0, -8.0f);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_LOOP, -8.0f);
this->action = NB_KIDNAPPED_LOOK_AROUND;
this->drawMode = NB_DRAW_DEFAULT;
}
@ -630,7 +633,7 @@ void EnNb_SetupLookAroundInKidnap(EnNb* this) {
void EnNb_SetupKidnap(EnNb* this) {
AnimationHeader* animation = &D_06001104;
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), 2, -8.0f);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE, -8.0f);
this->action = NB_PORTAL_FALLTHROUGH;
this->drawMode = NB_DRAW_DEFAULT;
}
@ -754,7 +757,7 @@ void func_80AB26DC(EnNb* this, GlobalContext* globalCtx) {
f32 frames = Animation_GetLastFrame(animation);
EnNb_SetupCsPosRot(this, globalCtx, 1);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, frames, 2, 0.0f);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, frames, ANIMMODE_ONCE, 0.0f);
this->action = NB_ACTION_14;
this->drawMode = NB_DRAW_KNEEL;
this->actor.shape.unk_14 = 0xFF;
@ -764,7 +767,7 @@ void EnNb_SetupKneel(EnNb* this) {
AnimationHeader* animation = &D_06008BD0;
f32 frames = Animation_GetLastFrame(animation);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, frames, 2, 0.0f);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, frames, ANIMMODE_ONCE, 0.0f);
this->action = NB_KNEEL;
this->drawMode = NB_DRAW_KNEEL;
this->actor.shape.unk_14 = 0xFF;
@ -774,7 +777,8 @@ void EnNb_CheckIfKneeling(EnNb* this, s32 animFinished) {
AnimationHeader* animation = &D_060046A8;
if (animFinished) {
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), 0, 0.0f);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_LOOP,
0.0f);
this->drawMode = NB_DRAW_KNEEL;
}
}
@ -783,7 +787,7 @@ void EnNb_SetupLookRight(EnNb* this) {
AnimationHeader* animation = &D_06003954;
f32 frames = Animation_GetLastFrame(animation);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, frames, 2, -8.0f);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, frames, ANIMMODE_ONCE, -8.0f);
this->action = NB_LOOK_RIGHT;
this->drawMode = NB_DRAW_DEFAULT;
this->actor.shape.unk_14 = 0xFF;
@ -793,7 +797,8 @@ void EnNb_CheckIfLookingRight(EnNb* this, s32 animFinished) {
AnimationHeader* animation = &D_06004030;
if (animFinished) {
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), 0, 0.0f);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_LOOP,
0.0f);
this->drawMode = NB_DRAW_LOOK_DIRECTION;
}
}
@ -802,7 +807,7 @@ void EnNb_SetupLookLeft(EnNb* this) {
AnimationHeader* animation = &D_06002DBC;
f32 frames = Animation_GetLastFrame(animation);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, frames, 2, -8.0f);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, frames, ANIMMODE_ONCE, -8.0f);
this->action = NB_LOOK_LEFT;
this->drawMode = NB_DRAW_LOOK_DIRECTION;
this->actor.shape.unk_14 = 0xFF;
@ -812,7 +817,8 @@ void EnNb_CheckIfLookLeft(EnNb* this, s32 animFinished) {
AnimationHeader* animation = &D_060035A8;
if (animFinished) {
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), 0, 0.0f);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_LOOP,
0.0f);
}
}
@ -827,7 +833,7 @@ void EnNb_SetupRun(EnNb* this) {
AnimationHeader* animation = &D_06006320;
f32 frames = Animation_GetLastFrame(animation);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, frames, 2, -8.0f);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, frames, ANIMMODE_ONCE, -8.0f);
this->action = NB_RUN;
this->drawMode = NB_DRAW_LOOK_DIRECTION;
this->actor.shape.unk_14 = 0xFF;

View file

@ -383,7 +383,8 @@ void func_80AB6100(EnNiw* this, GlobalContext* globalCtx, s32 arg2) {
}
void EnNiw_ResetAction(EnNiw* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_060000E8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060000E8), 0, -10.0f);
Animation_Change(&this->skelAnime, &D_060000E8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060000E8), ANIMMODE_LOOP,
-10.0f);
switch (this->actor.params) {
case 4:
@ -795,7 +796,8 @@ void func_80AB7204(EnNiw* this, GlobalContext* globalCtx) {
}
void func_80AB7290(EnNiw* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_060000E8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060000E8), 0, -10.0f);
Animation_Change(&this->skelAnime, &D_060000E8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060000E8), ANIMMODE_LOOP,
-10.0f);
this->unk_2A0 = Rand_ZeroFloat(1.99f);
this->actor.speedXZ = 4.0f;
this->actionFunc = func_80AB7328;

View file

@ -90,7 +90,7 @@ void EnNiwGirl_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void EnNiwGirl_Jump(EnNiwGirl* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06000378);
Animation_Change(&this->skelAnime, &D_06000378, 1.0f, 0.0f, frameCount, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06000378, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, -10.0f);
this->actor.flags &= ~1;
this->actionFunc = func_80AB9210;
}
@ -130,7 +130,8 @@ void func_80AB9210(EnNiwGirl* this, GlobalContext* globalCtx) {
}
void EnNiwGirl_Talk(EnNiwGirl* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_06009C78, 1.0f, 0.0f, Animation_GetLastFrame(&D_06009C78), 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06009C78, 1.0f, 0.0f, Animation_GetLastFrame(&D_06009C78), ANIMMODE_LOOP,
-10.0f);
this->actor.flags |= 1;
this->actor.textId = 0x7000;
if ((gSaveContext.eventChkInf[8] & 1) && (this->unk_27A == 0)) {

View file

@ -102,7 +102,7 @@ void EnNiwLady_ChoseAnimation(EnNiwLady* this, GlobalContext* globalCtx, s32 arg
this->unk_275 = 1;
case 9:
frames = Animation_GetLastFrame(&D_060007D0);
Animation_Change(&this->skelAnime, &D_060007D0, 1.0f, 0.0f, frames, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_060007D0, 1.0f, 0.0f, frames, ANIMMODE_LOOP, -10.0f);
break;
case 0:
case 1:
@ -117,7 +117,7 @@ void EnNiwLady_ChoseAnimation(EnNiwLady* this, GlobalContext* globalCtx, s32 arg
case 24:
case 29:
frames = Animation_GetLastFrame(&D_06009F94);
Animation_Change(&this->skelAnime, &D_06009F94, 1.0f, 0.0f, frames, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06009F94, 1.0f, 0.0f, frames, ANIMMODE_LOOP, -10.0f);
break;
case 7:
case 20:
@ -127,11 +127,11 @@ void EnNiwLady_ChoseAnimation(EnNiwLady* this, GlobalContext* globalCtx, s32 arg
case 27:
case 28:
frames = Animation_GetLastFrame(&D_06000718);
Animation_Change(&this->skelAnime, &D_06000718, 1.0f, 0.0f, frames, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06000718, 1.0f, 0.0f, frames, ANIMMODE_LOOP, -10.0f);
break;
case 100:
frames = Animation_GetLastFrame(&D_0600A630);
Animation_Change(&this->skelAnime, &D_0600A630, 1.0f, 0.0f, frames, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_0600A630, 1.0f, 0.0f, frames, ANIMMODE_LOOP, -10.0f);
this->unk_276 = 0;
break;
}
@ -161,10 +161,10 @@ void func_80AB9F24(EnNiwLady* this, GlobalContext* globalCtx) {
case 0:
if (!(gSaveContext.itemGetInf[0] & 0x1000) && LINK_IS_CHILD) {
frames = Animation_GetLastFrame(&D_0600A630);
Animation_Change(&this->skelAnime, &D_0600A630, 1.0f, 0.0f, (s16)frames, 0, 0.0f);
Animation_Change(&this->skelAnime, &D_0600A630, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP, 0.0f);
} else {
frames = Animation_GetLastFrame(&D_060007D0);
Animation_Change(&this->skelAnime, &D_060007D0, 1.0f, 0.0f, (s16)frames, 0, 0.0f);
Animation_Change(&this->skelAnime, &D_060007D0, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP, 0.0f);
}
if (LINK_IS_ADULT) {
this->actionFunc = func_80ABA778;
@ -174,7 +174,7 @@ void func_80AB9F24(EnNiwLady* this, GlobalContext* globalCtx) {
return;
case 1:
frames = Animation_GetLastFrame(&D_060007D0);
Animation_Change(&this->skelAnime, &D_060007D0, 1.0f, 0.0f, (s16)frames, 0, 0.0f);
Animation_Change(&this->skelAnime, &D_060007D0, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP, 0.0f);
this->actionFunc = func_80ABAD38;
return;
}

View file

@ -282,7 +282,8 @@ void func_80AD96A4(EnPoSisters* this) {
}
void func_80AD9718(EnPoSisters* this) {
Animation_Change(&this->skelAnime, &D_0600119C, 1.5f, 0.0f, Animation_GetLastFrame(&D_0600119C), 2, -3.0f);
Animation_Change(&this->skelAnime, &D_0600119C, 1.5f, 0.0f, Animation_GetLastFrame(&D_0600119C), ANIMMODE_ONCE,
-3.0f);
this->actor.speedXZ = 0.0f;
this->unk_19C = 100;
this->actor.posRot.rot.y = this->actor.shape.rot.y;
@ -312,7 +313,8 @@ void func_80AD97C8(EnPoSisters* this, GlobalContext* globalCtx) {
}
void func_80AD98F4(EnPoSisters* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_0600119C, 1.5f, 0.0f, Animation_GetLastFrame(&D_0600119C), 2, -3.0f);
Animation_Change(&this->skelAnime, &D_0600119C, 1.5f, 0.0f, Animation_GetLastFrame(&D_0600119C), ANIMMODE_ONCE,
-3.0f);
if (this->unk_194 == 0) {
this->unk_294 = 110.0f;
func_80AD97C8(this, globalCtx);
@ -404,7 +406,8 @@ void func_80AD9D44(EnPoSisters* this) {
Animation_PlayOnce(&this->skelAnime, &D_0600119C);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_APPEAR);
} else {
Animation_Change(&this->skelAnime, &D_0600119C, 0.5f, 0.0f, Animation_GetLastFrame(&D_0600119C), 3, 0.0f);
Animation_Change(&this->skelAnime, &D_0600119C, 0.5f, 0.0f, Animation_GetLastFrame(&D_0600119C),
ANIMMODE_ONCE_INTERP, 0.0f);
}
this->unk_22E.a = 0;
this->unk_199 = 32;
@ -489,7 +492,8 @@ void func_80ADA10C(EnPoSisters* this) {
}
void func_80ADA1B8(EnPoSisters* this) {
Animation_Change(&this->skelAnime, &D_0600119C, 0.833f, 0.0f, Animation_GetLastFrame(&D_0600119C), 3, 0.0f);
Animation_Change(&this->skelAnime, &D_0600119C, 0.833f, 0.0f, Animation_GetLastFrame(&D_0600119C),
ANIMMODE_ONCE_INTERP, 0.0f);
if (this->unk_194 == 0 || this->unk_194 == 1) {
this->unk_19A = 40;
} else {

View file

@ -231,7 +231,7 @@ void func_80AE2744(EnRd* this, GlobalContext* globalCtx) {
}
void func_80AE2970(EnRd* this) {
Animation_Change(&this->skelAnime, &D_060087D0, 0, 0, Animation_GetLastFrame(&D_060087D0), 0, -6.0f);
Animation_Change(&this->skelAnime, &D_060087D0, 0, 0, Animation_GetLastFrame(&D_060087D0), ANIMMODE_LOOP, -6.0f);
this->unk_31B = 0xB;
this->unk_30C = 6;
this->actor.shape.rot.x = -0x4000;
@ -266,7 +266,8 @@ void func_80AE2A10(EnRd* this, GlobalContext* globalCtx) {
}
void func_80AE2B90(EnRd* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_0600EFDC, 1.0f, 4.0f, Animation_GetLastFrame(&D_0600EFDC), 1, -4.0f);
Animation_Change(&this->skelAnime, &D_0600EFDC, 1.0f, 4.0f, Animation_GetLastFrame(&D_0600EFDC),
ANIMMODE_LOOP_INTERP, -4.0f);
this->actor.speedXZ = 0.4f;
this->unk_31B = 4;
EnRd_SetupAction(this, func_80AE2C1C);
@ -333,7 +334,8 @@ void func_80AE2C1C(EnRd* this, GlobalContext* globalCtx) {
}
void func_80AE2F50(EnRd* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_0600EFDC, 0.5f, 0, Animation_GetLastFrame(&D_0600EFDC), 1, -4.0f);
Animation_Change(&this->skelAnime, &D_0600EFDC, 0.5f, 0, Animation_GetLastFrame(&D_0600EFDC), ANIMMODE_LOOP_INTERP,
-4.0f);
this->unk_31B = 2;
EnRd_SetupAction(this, func_80AE2FD0);
}
@ -381,7 +383,8 @@ void func_80AE2FD0(EnRd* this, GlobalContext* globalCtx) {
}
void func_80AE31DC(EnRd* this) {
Animation_Change(&this->skelAnime, &D_0600EFDC, 0.5f, 0, Animation_GetLastFrame(&D_0600EFDC), 1, -4.0f);
Animation_Change(&this->skelAnime, &D_0600EFDC, 0.5f, 0, Animation_GetLastFrame(&D_0600EFDC), ANIMMODE_LOOP_INTERP,
-4.0f);
this->unk_31B = 3;
this->unk_305 = 1;
EnRd_SetupAction(this, func_80AE3260);
@ -454,8 +457,8 @@ void func_80AE3454(EnRd* this, GlobalContext* globalCtx) {
Math_SmoothStepToS(&this->unk_310, 0, 1, 0x5DC, 0);
case 2:
if (!(player->stateFlags2 & 0x80)) {
Animation_Change(&this->skelAnime, &D_060046F8, 0.5f, 0.0f, Animation_GetLastFrame(&D_060046F8), 3,
0.0f);
Animation_Change(&this->skelAnime, &D_060046F8, 0.5f, 0.0f, Animation_GetLastFrame(&D_060046F8),
ANIMMODE_ONCE_INTERP, 0.0f);
this->unk_304++;
this->unk_31B = 4;
return;
@ -505,7 +508,8 @@ void func_80AE3454(EnRd* this, GlobalContext* globalCtx) {
}
void func_80AE37BC(EnRd* this) {
Animation_Change(&this->skelAnime, &D_06004F94, 0.0f, 0.0f, Animation_GetLastFrame(&D_06004F94), 2, 0.0f);
Animation_Change(&this->skelAnime, &D_06004F94, 0.0f, 0.0f, Animation_GetLastFrame(&D_06004F94), ANIMMODE_ONCE,
0.0f);
this->unk_31B = 7;
EnRd_SetupAction(this, func_80AE3834);
}
@ -545,7 +549,8 @@ void func_80AE3978(EnRd* this, GlobalContext* globalCtx) {
}
void func_80AE39D4(EnRd* this) {
Animation_Change(&this->skelAnime, &D_06008040, -1.0f, Animation_GetLastFrame(&D_06008040), 0.0f, 2, -4.0f);
Animation_Change(&this->skelAnime, &D_06008040, -1.0f, Animation_GetLastFrame(&D_06008040), 0.0f, ANIMMODE_ONCE,
-4.0f);
this->unk_31B = 6;
EnRd_SetupAction(this, func_80AE3A54);
}

View file

@ -126,7 +126,7 @@ void func_80AE4F40(EnReeba* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
s16 playerSpeed;
Animation_Change(&this->skelanime, &D_060001E4, 2.0f, 0.0f, frames, 0, -10.0f);
Animation_Change(&this->skelanime, &D_060001E4, 2.0f, 0.0f, frames, ANIMMODE_LOOP, -10.0f);
playerSpeed = fabsf(player->linearVelocity);
this->unk_278 = 20 - playerSpeed * 2;

View file

@ -57,7 +57,8 @@ void func_80AE72D0(EnRl* this) {
}
void func_80AE7358(EnRl* this) {
Animation_Change(&this->skelAnime, &D_06000A3C, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000A3C), 0, 0.0f);
Animation_Change(&this->skelAnime, &D_06000A3C, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000A3C), ANIMMODE_LOOP,
0.0f);
this->action = 4;
this->drawConfig = 0;
this->alpha = 0;
@ -150,7 +151,8 @@ void func_80AE7698(EnRl* this, GlobalContext* globalCtx) {
if (globalCtx->csCtx.state != 0) {
csCmdActorAction = globalCtx->csCtx.npcActions[0];
if (csCmdActorAction != NULL && csCmdActorAction->action == 3) {
Animation_Change(&this->skelAnime, &D_0600040C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600040C), 2, 0.0f);
Animation_Change(&this->skelAnime, &D_0600040C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600040C),
ANIMMODE_ONCE, 0.0f);
this->action = 2;
}
}
@ -158,7 +160,8 @@ void func_80AE7698(EnRl* this, GlobalContext* globalCtx) {
void func_80AE772C(EnRl* this, s32 arg1) {
if (arg1) {
Animation_Change(&this->skelAnime, &D_06000830, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000830), 0, 0.0f);
Animation_Change(&this->skelAnime, &D_06000830, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000830), ANIMMODE_LOOP,
0.0f);
this->action = 3;
}
}
@ -243,7 +246,8 @@ void func_80AE79A4(EnRl* this, GlobalContext* globalCtx) {
void func_80AE7AF8(EnRl* this, GlobalContext* globalCtx) {
if (func_80AE74B4(this, globalCtx, 3, 0)) {
Animation_Change(&this->skelAnime, &D_0600040C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600040C), 2, -8.0f);
Animation_Change(&this->skelAnime, &D_0600040C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600040C), ANIMMODE_ONCE,
-8.0f);
this->action = 6;
} else if (func_80AE74FC(this, globalCtx, 4, 0)) {
this->action = 5;
@ -260,7 +264,8 @@ void func_80AE7AF8(EnRl* this, GlobalContext* globalCtx) {
void func_80AE7BF8(EnRl* this, s32 arg1) {
if (arg1 != 0) {
Animation_Change(&this->skelAnime, &D_06000830, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000830), 0, 0.0f);
Animation_Change(&this->skelAnime, &D_06000830, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000830), ANIMMODE_LOOP,
0.0f);
this->action = 7;
}
}

View file

@ -623,7 +623,8 @@ void func_80AEBC84(EnRu1* this, GlobalContext* globalCtx) {
void func_80AEBCB8(EnRu1* this, UNK_TYPE arg1) {
if (arg1 != 0) {
Animation_Change(&this->skelAnime, &D_06012E94, 1.0f, 0, Animation_GetLastFrame(&D_06012E94), 0, -8.0f);
Animation_Change(&this->skelAnime, &D_06012E94, 1.0f, 0, Animation_GetLastFrame(&D_06012E94), ANIMMODE_LOOP,
-8.0f);
}
}
@ -646,7 +647,7 @@ void func_80AEBD94(EnRu1* this, GlobalContext* globalCtx) {
frameCount = Animation_GetLastFrame(&D_06009060);
func_80AEB934(this, globalCtx);
func_80AEB738(this, globalCtx);
Animation_Change(&this->skelAnime, &D_06009060, 1.0f, 0.0f, frameCount, 2, 0.0f);
Animation_Change(&this->skelAnime, &D_06009060, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, 0.0f);
this->action = 2;
this->drawConfig = 1;
}
@ -659,7 +660,7 @@ void func_80AEBE3C(EnRu1* this, GlobalContext* globalCtx, s32 arg2) {
if (arg2 != 0) {
frameCount = Animation_GetLastFrame(&D_06013A64);
func_80AEB7D0(this);
Animation_Change(&this->skelAnime, &D_06013A64, 1.0f, 0, frameCount, 0, -8.0f);
Animation_Change(&this->skelAnime, &D_06013A64, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
this->action = 3;
} else {
func_80AEB954(this, globalCtx);
@ -673,7 +674,7 @@ void func_80AEBEC8(EnRu1* this, GlobalContext* globalCtx) {
if (func_80AEB458(globalCtx, 6)) {
frameCount = Animation_GetLastFrame(&D_06008AA8);
func_80AEB738(this, globalCtx);
Animation_Change(&this->skelAnime, &D_06008AA8, 1.0f, 0, frameCount, 2, -8.0f);
Animation_Change(&this->skelAnime, &D_06008AA8, 1.0f, 0, frameCount, ANIMMODE_ONCE, -8.0f);
this->action = 4;
}
}
@ -700,7 +701,7 @@ void func_80AEBFD8(EnRu1* this, GlobalContext* globalCtx) {
endFrame = csCmdNPCAction->endFrame;
if (csCtxFrames >= endFrame - 2) {
frameCount = Animation_GetLastFrame(&D_06008100);
Animation_Change(&this->skelAnime, &D_06008100, 1.0, 0, frameCount, 2, -8.0f);
Animation_Change(&this->skelAnime, &D_06008100, 1.0, 0, frameCount, ANIMMODE_ONCE, -8.0f);
this->action = 6;
}
}
@ -868,7 +869,8 @@ void func_80AEC6B0(EnRu1* this) {
void func_80AEC6E4(EnRu1* this, GlobalContext* globalCtx) {
if ((func_80AEAFA0(globalCtx, 4, 3)) && (this->unk_280 == 0)) {
Animation_Change(&this->skelAnime, &D_06003784, 1.0f, 0, Animation_GetLastFrame(&D_06003784), 2, -8.0f);
Animation_Change(&this->skelAnime, &D_06003784, 1.0f, 0, Animation_GetLastFrame(&D_06003784), ANIMMODE_ONCE,
-8.0f);
this->unk_280 = 1;
func_80AEC6B0(this);
}
@ -908,14 +910,16 @@ void func_80AEC81C(EnRu1* this, GlobalContext* globalCtx) {
void func_80AEC8B8(EnRu1* this, GlobalContext* globalCtx) {
if (func_80AEAFA0(globalCtx, 3, 3)) {
Animation_Change(&this->skelAnime, &D_06004074, 1.0f, 0, Animation_GetLastFrame(&D_06004074), 2, -8.0f);
Animation_Change(&this->skelAnime, &D_06004074, 1.0f, 0, Animation_GetLastFrame(&D_06004074), ANIMMODE_ONCE,
-8.0f);
this->action = 10;
}
}
void func_80AEC93C(EnRu1* this, UNK_TYPE arg1) {
if (arg1 != 0) {
Animation_Change(&this->skelAnime, &D_060078E4, 1.0f, 0, Animation_GetLastFrame(&D_060078E4), 0, -8.0f);
Animation_Change(&this->skelAnime, &D_060078E4, 1.0f, 0, Animation_GetLastFrame(&D_060078E4), ANIMMODE_LOOP,
-8.0f);
this->actor.posRot.rot.y += 0x8000;
this->action = 0xB;
this->unk_26C = 0.0f;
@ -1134,7 +1138,8 @@ void func_80AED154(EnRu1* this, GlobalContext* globalCtx) {
void func_80AED19C(EnRu1* this, s32 cond) {
if (cond) {
Animation_Change(&this->skelAnime, &D_06001488, 1.0f, 0, Animation_GetLastFrame(&D_06001488), 2, -8.0f);
Animation_Change(&this->skelAnime, &D_06001488, 1.0f, 0, Animation_GetLastFrame(&D_06001488), ANIMMODE_ONCE,
-8.0f);
this->action = 20;
func_80AED0B0(this, 3);
}
@ -1143,10 +1148,12 @@ void func_80AED19C(EnRu1* this, s32 cond) {
void func_80AED218(EnRu1* this, UNK_TYPE arg1) {
if (func_80AED084(this, 4)) {
if (arg1 != 0) {
Animation_Change(&this->skelAnime, &D_06002058, 1.0f, 0, Animation_GetLastFrame(&D_06002058), 0, -8.0f);
Animation_Change(&this->skelAnime, &D_06002058, 1.0f, 0, Animation_GetLastFrame(&D_06002058), ANIMMODE_LOOP,
-8.0f);
}
} else if (func_80AED084(this, 5)) {
Animation_Change(&this->skelAnime, &D_06002990, 1.0f, 0, Animation_GetLastFrame(&D_06002990), 2, -8.0f);
Animation_Change(&this->skelAnime, &D_06002990, 1.0f, 0, Animation_GetLastFrame(&D_06002990), ANIMMODE_ONCE,
-8.0f);
this->action = 21;
this->unk_27C = this->actor.xzDistToLink;
}
@ -1616,7 +1623,8 @@ void func_80AEE628(EnRu1* this, GlobalContext* globalCtx) {
s8 curRoomNum = globalCtx->roomCtx.curRoom.num;
if (func_80AEAF38(globalCtx)) {
Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0, Animation_GetLastFrame(&D_06006B9C), 0, -8.0f);
Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0, Animation_GetLastFrame(&D_06006B9C), ANIMMODE_LOOP,
-8.0f);
gSaveContext.infTable[20] |= 0x10;
this->action = 31;
}
@ -1629,7 +1637,8 @@ s32 func_80AEE6D0(EnRu1* this, GlobalContext* globalCtx) {
if ((!(gSaveContext.infTable[20] & 0x10)) && (func_80AEB124(globalCtx) != 0)) {
if (!Player_InCsMode(globalCtx)) {
Animation_Change(&this->skelAnime, &D_06004648, 1.0f, 0, Animation_GetLastFrame(&D_06004350), 0, -8.0f);
Animation_Change(&this->skelAnime, &D_06004648, 1.0f, 0, Animation_GetLastFrame(&D_06004350), ANIMMODE_LOOP,
-8.0f);
func_80AED600(this);
this->action = 34;
this->unk_26C = 0.0f;
@ -1651,7 +1660,7 @@ void func_80AEE7C4(EnRu1* this, GlobalContext* globalCtx) {
if (Actor_HasNoParent(this, globalCtx)) {
frameCount = Animation_GetLastFrame(&D_06006B9C);
Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0, frameCount, 0, -8.0f);
Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
func_80AED6DC(this, globalCtx);
this->actor.speedXZ *= (kREG(25) * 0.01f) + 1.0f;
this->actor.velocity.y *= (kREG(26) * 0.01f) + 1.0f;
@ -1675,7 +1684,7 @@ void func_80AEE7C4(EnRu1* this, GlobalContext* globalCtx) {
if (*unk_370 > 30.0f) {
if (Rand_S16Offset(0, 3) == 0) {
frameCount = Animation_GetLastFrame(&D_06004350);
Animation_Change(&this->skelAnime, &D_06004350, 1.0f, 0, frameCount, 0, -8.0f);
Animation_Change(&this->skelAnime, &D_06004350, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
func_80AED5DC(this);
this->action = 32;
}
@ -1684,14 +1693,14 @@ void func_80AEE7C4(EnRu1* this, GlobalContext* globalCtx) {
} else {
if (*unk_370 > 50.0f) {
frameCount = Animation_GetLastFrame(&D_06006B9C);
Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0, frameCount, 0, -8.0f);
Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
this->action = 31;
*unk_370 = 0.0f;
}
}
} else {
frameCount = Animation_GetLastFrame(&D_06006B9C);
Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0, frameCount, 0, -8.0f);
Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
*unk_370 = 0.0f;
}
}
@ -1841,7 +1850,7 @@ s32 func_80AEF0BC(EnRu1* this, GlobalContext* globalCtx) {
if (gSaveContext.infTable[20] & 4) {
frameCount = Animation_GetLastFrame(&D_06007534);
Animation_Change(&this->skelAnime, &D_06007534, 1.0f, 0, frameCount, 2, -8.0f);
Animation_Change(&this->skelAnime, &D_06007534, 1.0f, 0, frameCount, ANIMMODE_ONCE, -8.0f);
globalCtx->msgCtx.msgMode = 0x37;
this->action = 26;
this->actor.flags &= ~0x9;
@ -1866,7 +1875,8 @@ void func_80AEF188(EnRu1* this, GlobalContext* globalCtx) {
void func_80AEF1F0(EnRu1* this, GlobalContext* globalCtx, UNK_TYPE arg2) {
if (arg2 != 0) {
Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0.0f, Animation_GetLastFrame(&D_06006B9C), 0, 0.0f);
Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0.0f, Animation_GetLastFrame(&D_06006B9C), ANIMMODE_LOOP,
0.0f);
func_80106CCC(globalCtx);
gSaveContext.infTable[20] |= 8;
func_80AED6DC(this, globalCtx);
@ -1991,7 +2001,7 @@ void func_80AEF624(EnRu1* this, GlobalContext* globalCtx) {
newRotTmp = csCmdNPCAction->rot.z;
thisx->shape.rot.z = newRotTmp;
thisx->posRot.rot.z = newRotTmp;
Animation_Change(&this->skelAnime, &D_060063F4, 1.0f, 0.0f, frameCount, 2, 0.0f);
Animation_Change(&this->skelAnime, &D_060063F4, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, 0.0f);
func_80AEB3A4(this, globalCtx);
this->action = 37;
this->drawConfig = 1;
@ -2001,7 +2011,8 @@ void func_80AEF624(EnRu1* this, GlobalContext* globalCtx) {
void func_80AEF728(EnRu1* this, UNK_TYPE arg1) {
if (arg1 != 0) {
Animation_Change(&this->skelAnime, &D_06003608, 1.0f, 0.0f, Animation_GetLastFrame(&D_06003608), 0, 0.0f);
Animation_Change(&this->skelAnime, &D_06003608, 1.0f, 0.0f, Animation_GetLastFrame(&D_06003608), ANIMMODE_LOOP,
0.0f);
func_80AEB3CC(this);
this->action = 38;
}
@ -2009,14 +2020,16 @@ void func_80AEF728(EnRu1* this, UNK_TYPE arg1) {
void func_80AEF79C(EnRu1* this, GlobalContext* globalCtx) {
if (func_80AEAFE0(globalCtx, 2, 3)) {
Animation_Change(&this->skelAnime, &D_06002EC0, 1.0f, 0, Animation_GetLastFrame(&D_06002EC0), 2, -8.0f);
Animation_Change(&this->skelAnime, &D_06002EC0, 1.0f, 0, Animation_GetLastFrame(&D_06002EC0), ANIMMODE_ONCE,
-8.0f);
this->action = 39;
}
}
void func_80AEF820(EnRu1* this, UNK_TYPE arg1) {
if (arg1 != 0) {
Animation_Change(&this->skelAnime, &D_060097B8, 1.0f, 0, Animation_GetLastFrame(&D_060097B8), 0, -8.0f);
Animation_Change(&this->skelAnime, &D_060097B8, 1.0f, 0, Animation_GetLastFrame(&D_060097B8), ANIMMODE_LOOP,
-8.0f);
this->action = 40;
}
}

View file

@ -310,7 +310,8 @@ void func_80AF2BC0(EnRu2* this, GlobalContext* globalCtx) {
if (globalCtx->csCtx.state != 0) {
csCmdNPCAction = globalCtx->csCtx.npcActions[3];
if (csCmdNPCAction != NULL && csCmdNPCAction->action == 3) {
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), 2, 0.0f);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE,
0.0f);
this->action = 4;
}
}

View file

@ -115,20 +115,20 @@ void EnSb_SpawnBubbles(GlobalContext* globalCtx, EnSb* this) {
}
void EnSb_SetupWaitClosed(EnSb* this) {
Animation_Change(&this->skelAnime, &D_0600004C, 1.0f, 0, Animation_GetLastFrame(&D_0600004C), 2, 0.0f);
Animation_Change(&this->skelAnime, &D_0600004C, 1.0f, 0, Animation_GetLastFrame(&D_0600004C), ANIMMODE_ONCE, 0.0f);
this->behavior = SHELLBLADE_WAIT_CLOSED;
this->actionFunc = EnSb_WaitClosed;
}
void EnSb_SetupOpen(EnSb* this) {
Animation_Change(&this->skelAnime, &D_06000194, 1.0f, 0, Animation_GetLastFrame(&D_06000194), 2, 0.0f);
Animation_Change(&this->skelAnime, &D_06000194, 1.0f, 0, Animation_GetLastFrame(&D_06000194), ANIMMODE_ONCE, 0.0f);
this->behavior = SHELLBLADE_OPEN;
this->actionFunc = EnSb_Open;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_SHELL_MOUTH);
}
void EnSb_SetupWaitOpen(EnSb* this) {
Animation_Change(&this->skelAnime, &D_06002C8C, 1.0f, 0, Animation_GetLastFrame(&D_06002C8C), 0, 0.0f);
Animation_Change(&this->skelAnime, &D_06002C8C, 1.0f, 0, Animation_GetLastFrame(&D_06002C8C), ANIMMODE_LOOP, 0.0f);
this->behavior = SHELLBLADE_WAIT_OPEN;
this->actionFunc = EnSb_WaitOpen;
}
@ -137,14 +137,14 @@ void EnSb_SetupLunge(EnSb* this) {
f32 frameCount = Animation_GetLastFrame(&D_06000124);
f32 playbackSpeed = this->actor.yDistToWater > 0.0f ? 1.0f : 0.0f;
Animation_Change(&this->skelAnime, &D_06000124, playbackSpeed, 0.0f, frameCount, 2, 0);
Animation_Change(&this->skelAnime, &D_06000124, playbackSpeed, 0.0f, frameCount, ANIMMODE_ONCE, 0);
this->behavior = SHELLBLADE_LUNGE;
this->actionFunc = EnSb_Lunge;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_SHELL_MOUTH);
}
void EnSb_SetupBounce(EnSb* this) {
Animation_Change(&this->skelAnime, &D_060000B4, 1.0f, 0, Animation_GetLastFrame(&D_060000B4), 2, 0.0f);
Animation_Change(&this->skelAnime, &D_060000B4, 1.0f, 0, Animation_GetLastFrame(&D_060000B4), ANIMMODE_ONCE, 0.0f);
this->behavior = SHELLBLADE_BOUNCE;
this->actionFunc = EnSb_Bounce;
}
@ -153,7 +153,7 @@ void EnSb_SetupCooldown(EnSb* this, s32 changeSpeed) {
f32 frameCount = Animation_GetLastFrame(&D_0600004C);
if (this->behavior != SHELLBLADE_WAIT_CLOSED) {
Animation_Change(&this->skelAnime, &D_0600004C, 1.0f, 0, frameCount, 2, 0.0f);
Animation_Change(&this->skelAnime, &D_0600004C, 1.0f, 0, frameCount, ANIMMODE_ONCE, 0.0f);
}
this->behavior = SHELLBLADE_WAIT_CLOSED;
if (changeSpeed) {

View file

@ -598,7 +598,7 @@ void EnSsh_Init(Actor* thisx, GlobalContext* globalCtx) {
}
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_060052E0, NULL, this->jointTable, this->morphTable, 30);
Animation_Change(&this->skelAnime, &D_06000304, 1.0f, 0.0f, frameCount, 1, 0.0f);
Animation_Change(&this->skelAnime, &D_06000304, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP_INTERP, 0.0f);
this->blureIdx = EnSsh_CreateBlureEffect(globalCtx);
EnSsh_InitColliders(this, globalCtx);
this->stateFlags = 0;

View file

@ -96,7 +96,7 @@ void EnSyatekiMan_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void EnSyatekiMan_Start(EnSyatekiMan* this, GlobalContext* globalCtx) {
f32 lastFrame = Animation_GetLastFrame(&D_06000338);
Animation_Change(&this->skelAnime, &D_06000338, 1.0f, 0.0f, (s16)lastFrame, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06000338, 1.0f, 0.0f, (s16)lastFrame, ANIMMODE_LOOP, -10.0f);
this->actionFunc = EnSyatekiMan_SetupIdle;
}

View file

@ -199,7 +199,8 @@ void func_80B11A94(EnSyatekiNiw* this, GlobalContext* globalCtx, s16 arg2) {
}
void func_80B11DEC(EnSyatekiNiw* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_060000E8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060000E8), 0, -10.0f);
Animation_Change(&this->skelAnime, &D_060000E8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060000E8), ANIMMODE_LOOP,
-10.0f);
if (this->unk_29E != 0) {
Actor_SetScale(&this->actor, this->unk_2F4);
}
@ -337,7 +338,8 @@ void func_80B11E78(EnSyatekiNiw* this, GlobalContext* globalCtx) {
}
void func_80B123A8(EnSyatekiNiw* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_060000E8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060000E8), 0, -10.0f);
Animation_Change(&this->skelAnime, &D_060000E8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060000E8), ANIMMODE_LOOP,
-10.0f);
this->unk_27C = 6000.0f;
this->unk_288 = -10000.0f;
this->unk_2B0.z = 6000.0f;

View file

@ -206,7 +206,7 @@ void EnTa_Init(Actor* thisx, GlobalContext* globalCtx) {
func_80B13AA0(this, func_80B16608, func_80B16938);
Animation_Change(&this->skelAnime, &D_0600C48C, 1.0f,
Animation_GetLastFrame(&D_0600C48C) - 1.0f,
Animation_GetLastFrame(&D_0600C48C), 2, 0.0f);
Animation_GetLastFrame(&D_0600C48C), ANIMMODE_ONCE, 0.0f);
gSaveContext.eventInf[0] &= ~0x400;
} else {
func_80B13AA0(this, func_80B16504, func_80B16854);
@ -554,7 +554,8 @@ void func_80B14EDC(EnTa* this, GlobalContext* globalCtx) {
void func_80B14F20(EnTa* this, EnTaActionFunc arg1) {
func_80B13AA0(this, arg1, func_80B16854);
this->unk_2B4 = 2;
Animation_Change(&this->skelAnime, &D_060017E8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060017E8), 2, -5.0f);
Animation_Change(&this->skelAnime, &D_060017E8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060017E8), ANIMMODE_ONCE,
-5.0f);
this->unk_2E2 = 0;
this->unk_2E4 = &D_060017E8;
}
@ -563,7 +564,8 @@ void func_80B14FAC(EnTa* this, EnTaActionFunc arg1) {
this->unk_2B4 = 1;
func_80B13AA0(this, arg1, func_80B16938);
this->unk_2E0 &= ~0x10;
Animation_Change(&this->skelAnime, &D_0600C48C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600C48C), 2, -5.0f);
Animation_Change(&this->skelAnime, &D_0600C48C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600C48C), ANIMMODE_ONCE,
-5.0f);
}
void func_80B15034(EnTa* this, GlobalContext* globalCtx) {
@ -596,7 +598,7 @@ void func_80B15100(EnTa* this, GlobalContext* globalCtx) {
s32 unk_2CA;
Animation_Change(&this->skelAnime, &D_0600C48C, 1.0f, Animation_GetLastFrame(&D_0600C48C) - 1.0f,
Animation_GetLastFrame(&D_0600C48C), 2, 10.0f);
Animation_GetLastFrame(&D_0600C48C), ANIMMODE_ONCE, 10.0f);
this->unk_2E0 &= ~0x10;
func_80106CCC(globalCtx);
unk_2CA = this->unk_2CA;
@ -643,10 +645,10 @@ s32 func_80B152D0(EnTa* this, GlobalContext* globalCtx) {
void func_80B15308(EnTa* this) {
if (this->unk_2E0 & 0x10) {
if (this->unk_2E0 & 0x100) {
Animation_Change(&this->skelAnime, &D_0600BF38, 1.0f, 17.0f, 22.0f, 2, 0.0f);
Animation_Change(&this->skelAnime, &D_0600BF38, 1.0f, 17.0f, 22.0f, ANIMMODE_ONCE, 0.0f);
this->unk_2E0 &= ~0x100;
} else {
Animation_Change(&this->skelAnime, &D_0600BF38, -1.0f, 21.0f, 16.0f, 2, 3.0f);
Animation_Change(&this->skelAnime, &D_0600BF38, -1.0f, 21.0f, 16.0f, ANIMMODE_ONCE, 3.0f);
this->unk_2E0 |= 0x100;
}
this->unk_2E0 &= ~0x10;
@ -699,7 +701,7 @@ void func_80B154FC(EnTa* this, GlobalContext* globalCtx) {
this->unk_2C4[i]--;
} else {
this->unk_2CA = i;
Animation_Change(&this->skelAnime, &D_0600BF38, 1.0f, 8.0f, 29.0f, 2, -10.0f);
Animation_Change(&this->skelAnime, &D_0600BF38, 1.0f, 8.0f, 29.0f, ANIMMODE_ONCE, -10.0f);
this->unk_2E0 &= ~0x10;
switch (func_80B152D0(this, globalCtx)) {
@ -708,7 +710,7 @@ void func_80B154FC(EnTa* this, GlobalContext* globalCtx) {
func_8002DF54(globalCtx, &this->actor, 1);
func_8010B680(globalCtx, 0x2084, &this->actor);
this->unk_25C = func_80B15424;
Animation_Change(&this->skelAnime, &D_0600BF38, 1.0f, 8.0f, 29.0f, 2, -10.0f);
Animation_Change(&this->skelAnime, &D_0600BF38, 1.0f, 8.0f, 29.0f, ANIMMODE_ONCE, -10.0f);
this->unk_2E0 &= ~0x10;
this->unk_2E0 &= ~0x100;
gSaveContext.eventInf[0] |= 0x100;
@ -751,7 +753,7 @@ void func_80B154FC(EnTa* this, GlobalContext* globalCtx) {
func_80B14E28(this, globalCtx);
gSaveContext.eventInf[0] &= ~0x100;
this->unk_2E0 |= 0x80;
Animation_Change(&this->skelAnime, &D_0600BF38, 1.0f, 8.0f, 29.0f, 2, -10.0f);
Animation_Change(&this->skelAnime, &D_0600BF38, 1.0f, 8.0f, 29.0f, ANIMMODE_ONCE, -10.0f);
this->unk_2E0 &= ~0x10;
this->unk_2E0 &= ~0x100;
}
@ -795,7 +797,7 @@ void func_80B1585C(EnTa* this, GlobalContext* globalCtx) {
func_80B13AA0(this, func_80B154FC, func_80B16938);
this->unk_2E0 &= ~0x10;
Animation_Change(&this->skelAnime, &D_0600C48C, 1.0f, Animation_GetLastFrame(&D_0600C48C) - 1.0f,
Animation_GetLastFrame(&D_0600C48C), 2, 10.0f);
Animation_GetLastFrame(&D_0600C48C), ANIMMODE_ONCE, 10.0f);
func_8002DF54(globalCtx, &this->actor, 7);
}
}
@ -804,7 +806,8 @@ void func_80B15AD4(EnTa* this, GlobalContext* globalCtx) {
if (this->unk_2CC == 0 && this->unk_2E0 & 0x20) {
func_80B13AA0(this, func_80B1585C, func_80B16938);
this->unk_2E0 &= ~0x10;
Animation_Change(&this->skelAnime, &D_0600BF38, 1.0f, 1.0f, Animation_GetLastFrame(&D_0600BF38), 2, 0.0f);
Animation_Change(&this->skelAnime, &D_0600BF38, 1.0f, 1.0f, Animation_GetLastFrame(&D_0600BF38), ANIMMODE_ONCE,
0.0f);
this->unk_2CC = 50;
func_80088B34(0x1E);
func_800F5ACC(0x6C);
@ -824,7 +827,7 @@ void func_80B15BF8(EnTa* this, GlobalContext* globalCtx) {
if (this->unk_2E0 & 0x10) {
func_80B13AA0(this, func_80B15AD4, func_80B16938);
this->unk_2E0 &= ~0x10;
Animation_Change(&this->skelAnime, &D_0600BF38, 1.0f, 0.0f, 1.0f, 2, 0.0f);
Animation_Change(&this->skelAnime, &D_0600BF38, 1.0f, 0.0f, 1.0f, ANIMMODE_ONCE, 0.0f);
this->unk_2CC = 5;
}
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
@ -837,7 +840,7 @@ void func_80B15CC8(EnTa* this, GlobalContext* globalCtx) {
if (this->unk_2E0 & 0x10) {
func_80B13AA0(this, func_80B15BF8, func_80B16938);
this->unk_2E0 &= ~0x10;
Animation_Change(&this->skelAnime, &D_0600BF38, -1.0f, 29.0f, 0.0f, 2, 10.0f);
Animation_Change(&this->skelAnime, &D_0600BF38, -1.0f, 29.0f, 0.0f, ANIMMODE_ONCE, 10.0f);
}
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && (func_80106BC8(globalCtx) != 0)) {
this->unk_2E0 |= 0x20;
@ -848,7 +851,7 @@ void func_80B15CC8(EnTa* this, GlobalContext* globalCtx) {
void func_80B15D90(EnTa* this, GlobalContext* globalCtx) {
func_80B13AA0(this, func_80B15CC8, func_80B16938);
this->unk_2E0 &= ~0x10;
Animation_Change(&this->skelAnime, &D_0600BF38, 1.0f, 8.0f, 29.0f, 2, -10.0f);
Animation_Change(&this->skelAnime, &D_0600BF38, 1.0f, 8.0f, 29.0f, ANIMMODE_ONCE, -10.0f);
func_8010B720(globalCtx, 0x2080);
this->unk_2E0 &= ~0x20;
}

View file

@ -76,7 +76,7 @@ void EnTakaraMan_Init(Actor* thisx, GlobalContext* globalCtx) {
void func_80B176E0(EnTakaraMan* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06000498);
Animation_Change(&this->skelAnime, &D_06000498, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06000498, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
if (!this->unk_214) {
this->actor.textId = 0x6D; // "Open the chest and..Surprise! ... 10 Rupees to play .. Yes/No"
this->dialogState = 4;

View file

@ -639,7 +639,8 @@ void EnTite_Recoil(EnTite* this, GlobalContext* globalCtx) {
}
void EnTite_SetupStunned(EnTite* this) {
Animation_Change(&this->skelAnime, &D_060012E4, 0.0f, 0.0f, (f32)Animation_GetLastFrame(&D_060012E4), 0, 4.0f);
Animation_Change(&this->skelAnime, &D_060012E4, 0.0f, 0.0f, (f32)Animation_GetLastFrame(&D_060012E4), ANIMMODE_LOOP,
4.0f);
this->action = TEKTITE_STUNNED;
this->actor.speedXZ = -6.0f;
this->actor.posRot.rot.y = this->actor.yawTowardsLink;

View file

@ -170,7 +170,7 @@ static CollisionCheckInfoInit2 sColChkInfoInit = {
void EnTk_RestAnim(EnTk* this, GlobalContext* globalCtx) {
AnimationHeader* anim = &D_06002F84;
Animation_Change(&this->skelAnime, anim, 1.0f, 0.0f, Animation_GetLastFrame(&D_06002F84), 0, -10.0f);
Animation_Change(&this->skelAnime, anim, 1.0f, 0.0f, Animation_GetLastFrame(&D_06002F84), ANIMMODE_LOOP, -10.0f);
this->actionCountdown = Rand_S16Offset(60, 60);
this->actor.speedXZ = 0.0f;
@ -179,7 +179,7 @@ void EnTk_RestAnim(EnTk* this, GlobalContext* globalCtx) {
void EnTk_WalkAnim(EnTk* this, GlobalContext* globalCtx) {
AnimationHeader* anim = &D_06001FA8;
Animation_Change(&this->skelAnime, anim, 1.0f, 0.0f, Animation_GetLastFrame(&D_06002F84), 0, -10.0f);
Animation_Change(&this->skelAnime, anim, 1.0f, 0.0f, Animation_GetLastFrame(&D_06002F84), ANIMMODE_LOOP, -10.0f);
this->actionCountdown = Rand_S16Offset(240, 240);
}
@ -187,7 +187,7 @@ void EnTk_WalkAnim(EnTk* this, GlobalContext* globalCtx) {
void EnTk_DigAnim(EnTk* this, GlobalContext* globalCtx) {
AnimationHeader* anim = &D_06001144;
Animation_Change(&this->skelAnime, anim, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001144), 0, -10.0f);
Animation_Change(&this->skelAnime, anim, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001144), ANIMMODE_LOOP, -10.0f);
if (EnTk_CheckNextSpot(this, globalCtx) >= 0) {
this->validDigHere = 1;
@ -488,7 +488,8 @@ void EnTk_Init(Actor* thisx, GlobalContext* globalCtx) {
ActorShape_Init(&this->actor.shape, 0, ActorShadow_DrawFunc_Circle, 24.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600BE40, NULL, this->jointTable, this->morphTable, 18);
Animation_Change(&this->skelAnime, &D_06002F84, 1.0f, 0.0f, Animation_GetLastFrame(&D_06002F84), 0, 0.0f);
Animation_Change(&this->skelAnime, &D_06002F84, 1.0f, 0.0f, Animation_GetLastFrame(&D_06002F84), ANIMMODE_LOOP,
0.0f);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);

View file

@ -126,7 +126,7 @@ void EnVm_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void EnVm_SetupWait(EnVm* this) {
f32 frameCount = Animation_GetLastFrame(&D_06000068);
Animation_Change(&this->skelAnime, &D_06000068, 1.0f, frameCount, frameCount, 2, 0.0f);
Animation_Change(&this->skelAnime, &D_06000068, 1.0f, frameCount, frameCount, ANIMMODE_ONCE, 0.0f);
this->unk_25E = this->unk_260 = 0;
this->unk_21C = 0;
this->timer = 10;
@ -208,7 +208,7 @@ void EnVm_Wait(EnVm* this, GlobalContext* globalCtx) {
}
void EnVm_SetupAttack(EnVm* this) {
Animation_Change(&this->skelAnime, &D_06000068, 3.0f, 3.0f, 7.0f, 2, 0.0f);
Animation_Change(&this->skelAnime, &D_06000068, 3.0f, 3.0f, 7.0f, ANIMMODE_ONCE, 0.0f);
this->timer = 305;
this->beamScale.x = 0.6f;
this->beamSpeed = 40.0f;
@ -277,7 +277,8 @@ void EnVm_Attack(EnVm* this, GlobalContext* globalCtx) {
}
void EnVm_SetupStun(EnVm* this) {
Animation_Change(&this->skelAnime, &D_06000068, -1.0f, Animation_GetLastFrame(&D_06000068), 0.0f, 2, 0.0f);
Animation_Change(&this->skelAnime, &D_06000068, -1.0f, Animation_GetLastFrame(&D_06000068), 0.0f, ANIMMODE_ONCE,
0.0f);
this->unk_260 = 0;
this->timer = 180;
this->unk_25E = this->unk_260;
@ -295,8 +296,8 @@ void EnVm_Stun(EnVm* this, GlobalContext* globalCtx) {
if (this->unk_25E == 3) {
EnVm_SetupWait(this);
} else if (this->unk_25E == 1) {
Animation_Change(&this->skelAnime, &D_06000068, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000068), 2,
0.0f);
Animation_Change(&this->skelAnime, &D_06000068, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000068),
ANIMMODE_ONCE, 0.0f);
} else {
this->timer = 10;
this->skelAnime.curFrame = 0.0f;
@ -311,7 +312,8 @@ void EnVm_Stun(EnVm* this, GlobalContext* globalCtx) {
}
void EnVm_SetupDie(EnVm* this) {
Animation_Change(&this->skelAnime, &D_06000068, -1.0f, Animation_GetLastFrame(&D_06000068), 0.0f, 2, 0.0f);
Animation_Change(&this->skelAnime, &D_06000068, -1.0f, Animation_GetLastFrame(&D_06000068), 0.0f, ANIMMODE_ONCE,
0.0f);
this->timer = 33;
this->unk_25E = this->unk_260 = 0;
this->unk_21C = 3;

View file

@ -138,7 +138,8 @@ void EnWallmas_SetupDrop(EnWallmas* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
AnimationHeader* objSegChangee = &D_0600299C;
Animation_Change(&this->skelAnime, objSegChangee, 0.0f, 20.0f, Animation_GetLastFrame(&D_0600299C), 2, 0.0f);
Animation_Change(&this->skelAnime, objSegChangee, 0.0f, 20.0f, Animation_GetLastFrame(&D_0600299C), ANIMMODE_ONCE,
0.0f);
this->yTarget = player->actor.posRot.pos.y;
this->actor.posRot.pos.y = player->actor.posRot.pos.y + 300.0f;
@ -153,7 +154,8 @@ void EnWallmas_SetupLand(EnWallmas* this, GlobalContext* globalCtx) {
AnimationHeader* objSegFrameCount = &D_060019CC;
AnimationHeader* objSegChangee = &D_060019CC;
Animation_Change(&this->skelAnime, objSegChangee, 1.0f, 41.0f, Animation_GetLastFrame(objSegFrameCount), 2, -3.0f);
Animation_Change(&this->skelAnime, objSegChangee, 1.0f, 41.0f, Animation_GetLastFrame(objSegFrameCount),
ANIMMODE_ONCE, -3.0f);
func_80033260(globalCtx, &this->actor, &this->actor.posRot.pos, 15.0f, 6, 20.0f, 0x12C, 0x64, 1);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FALL_LAND);
@ -183,7 +185,8 @@ void EnWallmas_SetupReturnToCeiling(EnWallmas* this) {
this->timer = 0;
this->actor.speedXZ = 0.0f;
Animation_Change(&this->skelAnime, objSegChangee, 3.0f, 0.0f, Animation_GetLastFrame(objSegFrameCount), 2, -3.0f);
Animation_Change(&this->skelAnime, objSegChangee, 3.0f, 0.0f, Animation_GetLastFrame(objSegFrameCount),
ANIMMODE_ONCE, -3.0f);
this->actionFunc = EnWallmas_ReturnToCeiling;
}
@ -246,7 +249,7 @@ void EnWallmas_ProximityOrSwitchInit(EnWallmas* this) {
}
void EnWallmas_SetupStun(EnWallmas* this) {
Animation_Change(&this->skelAnime, &D_060019CC, 1.5f, 0, 20.0f, 2, -3.0f);
Animation_Change(&this->skelAnime, &D_060019CC, 1.5f, 0, 20.0f, ANIMMODE_ONCE, -3.0f);
this->actor.speedXZ = 0.0f;
if (this->actor.colChkInfo.damageEffect == 4) {

View file

@ -73,7 +73,7 @@ void EnZl1_Init(Actor* thisx, GlobalContext* globalCtx) {
frameCount = Animation_GetLastFrame(&D_06012118);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600F5D8, NULL, NULL, NULL, 0);
Animation_Change(&this->skelAnime, &D_06012118, 1.0f, 0.0f, frameCount, 0, 0.0f);
Animation_Change(&this->skelAnime, &D_06012118, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
@ -83,7 +83,7 @@ void EnZl1_Init(Actor* thisx, GlobalContext* globalCtx) {
if (gSaveContext.sceneSetupIndex >= 4) {
frameCount = Animation_GetLastFrame(&D_06000438);
Animation_Change(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, 0, 0.0f);
Animation_Change(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
this->unk_1E6 = 0;
this->actionFunc = func_80B4BC78;
} else if ((Flags_GetEventChkInf(9)) && (Flags_GetEventChkInf(0x25)) && (Flags_GetEventChkInf(0x37))) {
@ -91,12 +91,12 @@ void EnZl1_Init(Actor* thisx, GlobalContext* globalCtx) {
} else if (((Flags_GetEventChkInf(9)) && (Flags_GetEventChkInf(0x25))) ||
((Flags_GetEventChkInf(9)) && (Flags_GetEventChkInf(0x37)))) {
frameCount = Animation_GetLastFrame(&D_06000438);
Animation_Change(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, 0, 0.0f);
Animation_Change(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
this->actor.textId = 0x703D;
this->actionFunc = func_80B4AF18;
} else if (Flags_GetEventChkInf(0x40)) {
frameCount = Animation_GetLastFrame(&D_06000438);
Animation_Change(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, 0, 0.0f);
Animation_Change(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
this->actor.textId = 0x703C;
this->actionFunc = func_80B4AF18;
} else {
@ -160,7 +160,8 @@ void func_80B4B010(EnZl1* this, GlobalContext* globalCtx) {
s16 rotDiff;
if (func_8002F194(&this->actor, globalCtx)) {
Animation_Change(&this->skelAnime, &D_06010B38, 1.0f, 0.0f, Animation_GetLastFrame(&D_06010B38), 3, -10.0f);
Animation_Change(&this->skelAnime, &D_06010B38, 1.0f, 0.0f, Animation_GetLastFrame(&D_06010B38),
ANIMMODE_ONCE_INTERP, -10.0f);
this->unk_1E8 = Gameplay_CreateSubCamera(globalCtx);
Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_WAIT);
Gameplay_ChangeCameraStatus(globalCtx, this->unk_1E8, CAM_STAT_ACTIVE);
@ -405,7 +406,7 @@ void func_80B4BBC4(EnZl1* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06000438);
Player* player = PLAYER;
Animation_Change(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, 0, 0.0f);
Animation_Change(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
func_8002DF54(globalCtx, &this->actor, 1);
func_8002F7DC(&player->actor, NA_SE_VO_LI_SURPRISE_KID);
this->actor.textId = 0x7039;
@ -433,7 +434,7 @@ void func_80B4BC78(EnZl1* this, GlobalContext* globalCtx) {
if (SkelAnime_Update(&this->skelAnime) && (this->skelAnime.animation == &D_06010B38)) {
frameCount = Animation_GetLastFrame(&D_06011348);
Animation_Change(&this->skelAnime, &D_06011348, 1.0f, 0.0f, frameCount, 0, -10.0f);
Animation_Change(&this->skelAnime, &D_06011348, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, -10.0f);
}
func_80B4B874(this, globalCtx);
npcAction = globalCtx->csCtx.npcActions[0];

View file

@ -1448,23 +1448,25 @@ void func_80832924(Player* this, struct_80832924* entry) {
}
void func_80832B0C(GlobalContext* globalCtx, Player* this, LinkAnimationHeader* anim) {
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, 1.0f, 0.0f, Animation_GetLastFrame(anim), 2, -6.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, 1.0f, 0.0f, Animation_GetLastFrame(anim), ANIMMODE_ONCE,
-6.0f);
}
void func_80832B78(GlobalContext* globalCtx, Player* this, LinkAnimationHeader* anim) {
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, 2.0f / 3.0f, 0.0f, Animation_GetLastFrame(anim), 2, -6.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, 2.0f / 3.0f, 0.0f, Animation_GetLastFrame(anim),
ANIMMODE_ONCE, -6.0f);
}
void func_80832BE8(GlobalContext* globalCtx, Player* this, LinkAnimationHeader* anim) {
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, 1.0f, 0.0f, 0.0f, 0, -6.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -6.0f);
}
void func_80832C2C(GlobalContext* globalCtx, Player* this, LinkAnimationHeader* anim) {
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, 1.0f, 0.0f, 0.0f, 2, 0.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f);
}
void func_80832C6C(GlobalContext* globalCtx, Player* this, LinkAnimationHeader* anim) {
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, 1.0f, 0.0f, 0.0f, 0, -16.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -16.0f);
}
s32 func_80832CB0(GlobalContext* globalCtx, Player* this, LinkAnimationHeader* anim) {
@ -2022,7 +2024,7 @@ void func_808340DC(Player* this, GlobalContext* globalCtx) {
phi_f0 *= 2.0f;
}
LinkAnimation_Change(globalCtx, &this->skelAnime2, anim, phi_f0, phi_f12, phi_f14, 2, 0.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime2, anim, phi_f0, phi_f12, phi_f14, ANIMMODE_ONCE, 0.0f);
this->stateFlags1 &= ~0x100;
}
@ -2154,7 +2156,7 @@ s32 func_80834758(GlobalContext* globalCtx, Player* this) {
anim = func_808346C4(globalCtx, this);
frame = Animation_GetLastFrame(anim);
LinkAnimation_Change(globalCtx, &this->skelAnime2, anim, 1.0f, frame, frame, 2, 0.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime2, anim, 1.0f, frame, frame, ANIMMODE_ONCE, 0.0f);
func_8002F7DC(&this->actor, NA_SE_IT_SHIELD_POSTURE);
return 1;
@ -2256,7 +2258,7 @@ s32 func_80834BD4(Player* this, GlobalContext* globalCtx) {
if (LinkAnimation_Update(globalCtx, &this->skelAnime2)) {
anim = func_808346C4(globalCtx, this);
frame = Animation_GetLastFrame(anim);
LinkAnimation_Change(globalCtx, &this->skelAnime2, anim, 1.0f, frame, frame, 2, 0.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime2, anim, 1.0f, frame, frame, ANIMMODE_ONCE, 0.0f);
}
this->stateFlags1 |= 0x400000;
@ -3314,7 +3316,8 @@ void func_80837704(GlobalContext* globalCtx, Player* this) {
}
func_80832318(this);
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, 1.0f, 8.0f, Animation_GetLastFrame(anim), 2, -9.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, 1.0f, 8.0f, Animation_GetLastFrame(anim), ANIMMODE_ONCE,
-9.0f);
func_80837530(globalCtx, this, 0x200);
}
@ -5111,7 +5114,8 @@ void func_8083BF50(Player* this, GlobalContext* globalCtx) {
sp30 /= 12.0f;
}
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, 1.0f, 0.0f, Animation_GetLastFrame(anim), 2, 4.0f * sp30);
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, 1.0f, 0.0f, Animation_GetLastFrame(anim), ANIMMODE_ONCE,
4.0f * sp30);
this->currentYaw = this->actor.shape.rot.y;
}
@ -5190,7 +5194,7 @@ s32 func_8083C2B0(Player* this, GlobalContext* globalCtx) {
}
frame = Animation_GetLastFrame(anim);
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, 1.0f, frame, frame, 2, 0.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, 1.0f, frame, frame, ANIMMODE_ONCE, 0.0f);
if (Player_IsChildWithHylianShield(this)) {
func_80832F54(globalCtx, this, 4);
@ -5387,8 +5391,8 @@ void func_8083CB94(Player* this, GlobalContext* globalCtx) {
void func_8083CBF0(Player* this, s16 yaw, GlobalContext* globalCtx) {
func_80835C58(globalCtx, this, func_808423EC, 1);
LinkAnimation_Change(globalCtx, &this->skelAnime, &D_040024F8, 2.2f, 0.0f, Animation_GetLastFrame(&D_040024F8), 2,
-6.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime, &D_040024F8, 2.2f, 0.0f, Animation_GetLastFrame(&D_040024F8),
ANIMMODE_ONCE, -6.0f);
this->linearVelocity = 8.0f;
this->currentYaw = yaw;
}
@ -5409,7 +5413,8 @@ void func_8083CD54(GlobalContext* globalCtx, Player* this, s16 yaw) {
func_80835C58(globalCtx, this, func_80841BA8, 1);
this->unk_87E = 1200;
this->unk_87E *= D_808535E8;
LinkAnimation_Change(globalCtx, &this->skelAnime, D_80853B84[this->modelAnimType], 1.0f, 0.0f, 0.0f, 0, -6.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime, D_80853B84[this->modelAnimType], 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP,
-6.0f);
}
void func_8083CE0C(Player* this, GlobalContext* globalCtx) {
@ -6305,7 +6310,7 @@ s32 func_8083F570(Player* this, GlobalContext* globalCtx) {
} else {
this->actor.shape.rot.y = this->actor.wallPolyRot;
LinkAnimation_Change(globalCtx, &this->skelAnime, &D_04002708, -1.0f,
Animation_GetLastFrame(&D_04002708), 0.0f, 2, 0.0f);
Animation_GetLastFrame(&D_04002708), 0.0f, ANIMMODE_ONCE, 0.0f);
func_80832F54(globalCtx, this, 0x9D);
func_800800F8(globalCtx, 0x2582, 999, NULL, 0);
}
@ -6780,7 +6785,7 @@ void func_808409CC(GlobalContext* globalCtx, Player* this) {
}
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, (2.0f / 3.0f) * D_808535E8, 0.0f,
Animation_GetLastFrame(anim), 2, -6.0f);
Animation_GetLastFrame(anim), ANIMMODE_ONCE, -6.0f);
}
void func_80840BC8(Player* this, GlobalContext* globalCtx) {
@ -7700,7 +7705,7 @@ void func_80843188(Player* this, GlobalContext* globalCtx) {
if (Player_IsChildWithHylianShield(this)) {
func_8083A060(this, globalCtx);
LinkAnimation_Change(globalCtx, &this->skelAnime, &D_04002400, 1.0f,
Animation_GetLastFrame(&D_04002400), 0.0f, 2, 0.0f);
Animation_GetLastFrame(&D_04002400), 0.0f, ANIMMODE_ONCE, 0.0f);
func_80832F54(globalCtx, this, 4);
} else {
if (this->itemActionParam < 0) {
@ -7743,7 +7748,7 @@ void func_808435C4(Player* this, GlobalContext* globalCtx) {
Player_SetModelsForHoldingShield(this);
anim = D_80853AF4[this->modelAnimType];
frames = Animation_GetLastFrame(anim);
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, 1.0f, frames, frames, 2, 0.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, 1.0f, frames, frames, ANIMMODE_ONCE, 0.0f);
}
}
}
@ -7855,10 +7860,10 @@ void func_80843AE8(GlobalContext* globalCtx, Player* this) {
if (this->unk_850 == 0) {
if (this->stateFlags1 & 0x8000000) {
LinkAnimation_Change(globalCtx, &this->skelAnime, &D_04003328, 1.0f, 0.0f,
Animation_GetLastFrame(&D_04003328), 2, -16.0f);
Animation_GetLastFrame(&D_04003328), ANIMMODE_ONCE, -16.0f);
} else {
LinkAnimation_Change(globalCtx, &this->skelAnime, &D_04002878, 1.0f, 99.0f,
Animation_GetLastFrame(&D_04002878), 2, 0.0f);
Animation_GetLastFrame(&D_04002878), ANIMMODE_ONCE, 0.0f);
}
gSaveContext.healthAccumulator = 0x140;
this->unk_850 = -1;
@ -8040,7 +8045,8 @@ void func_8084411C(Player* this, GlobalContext* globalCtx) {
this->stateFlags1 &= ~4;
}
LinkAnimation_Change(globalCtx, &this->skelAnime, &D_04003020, 1.0f, 0.0f, 0.0f, 2, 8.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime, &D_04003020, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE,
8.0f);
this->unk_850 = -1;
}
} else {
@ -8911,7 +8917,7 @@ void func_80846660(GlobalContext* globalCtx, Player* this) {
this->unk_84F = 1;
}
this->stateFlags1 |= 0x20000000;
LinkAnimation_Change(globalCtx, &this->skelAnime, &D_04003298, 2.0f / 3.0f, 0.0f, 24.0f, 2, 0.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime, &D_04003298, 2.0f / 3.0f, 0.0f, 24.0f, ANIMMODE_ONCE, 0.0f);
this->actor.posRot.pos.y += 800.0f;
}
@ -8942,7 +8948,8 @@ void func_808467D4(GlobalContext* globalCtx, Player* this) {
this->stateFlags1 |= 0x20000000;
Math_Vec3f_Copy(&this->actor.posRot.pos, &D_808546F4);
this->currentYaw = this->actor.shape.rot.y = -0x8000;
LinkAnimation_Change(globalCtx, &this->skelAnime, this->ageProperties->unk_A0, 2.0f / 3.0f, 0.0f, 0.0f, 2, 0.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime, this->ageProperties->unk_A0, 2.0f / 3.0f, 0.0f, 0.0f,
ANIMMODE_ONCE, 0.0f);
func_80832F54(globalCtx, this, 0x28F);
if (LINK_IS_ADULT) {
func_80846720(globalCtx, this, 0);
@ -11051,7 +11058,7 @@ void func_8084BF1C(Player* this, GlobalContext* globalCtx) {
this->skelAnime.prevTransl = this->ageProperties->unk_62[sp68];
anim1 = this->ageProperties->unk_AC[sp68];
LinkAnimation_Change(globalCtx, &this->skelAnime, anim1, -1.0f, Animation_GetLastFrame(anim1),
0.0f, 2, 0.0f);
0.0f, ANIMMODE_ONCE, 0.0f);
}
}
this->unk_850 ^= 1;
@ -11065,7 +11072,7 @@ void func_8084BF1C(Player* this, GlobalContext* globalCtx) {
} else {
this->skelAnime.prevTransl = this->ageProperties->unk_86[this->unk_850];
LinkAnimation_Change(globalCtx, &this->skelAnime, anim2, -1.0f, Animation_GetLastFrame(anim2),
0.0f, 2, 0.0f);
0.0f, ANIMMODE_ONCE, 0.0f);
}
} else {
this->stateFlags2 |= 0x1000;
@ -13028,14 +13035,14 @@ void func_80850ED8(GlobalContext* globalCtx, Player* this, LinkAnimationHeader*
void func_80850F1C(GlobalContext* globalCtx, Player* this, LinkAnimationHeader* anim) {
func_80832DB0(this);
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, (2.0f / 3.0f), 0.0f, Animation_GetLastFrame(anim), 2,
-8.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, (2.0f / 3.0f), 0.0f, Animation_GetLastFrame(anim),
ANIMMODE_ONCE, -8.0f);
func_80832210(this);
}
void func_80850F9C(GlobalContext* globalCtx, Player* this, LinkAnimationHeader* anim) {
func_80832DB0(this);
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, (2.0f / 3.0f), 0.0f, 0.0f, 0, -8.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, (2.0f / 3.0f), 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f);
func_80832210(this);
}
@ -13207,8 +13214,8 @@ void func_808515A4(GlobalContext* globalCtx, Player* this, CsCmdActorAction* arg
func_80832264(globalCtx, this, anim);
} else {
func_80832DB0(this);
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, (2.0f / 3.0f), 0.0f, Animation_GetLastFrame(anim), 0,
-4.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime, anim, (2.0f / 3.0f), 0.0f, Animation_GetLastFrame(anim),
ANIMMODE_LOOP, -4.0f);
}
func_80832210(this);
@ -13364,7 +13371,7 @@ void func_80851A50(GlobalContext* globalCtx, Player* this, CsCmdActorAction* arg
}
void func_80851B90(GlobalContext* globalCtx, Player* this, CsCmdActorAction* arg2) {
LinkAnimation_Change(globalCtx, &this->skelAnime, &D_04002860, -(2.0f / 3.0f), 12.0f, 12.0f, 2, 0.0f);
LinkAnimation_Change(globalCtx, &this->skelAnime, &D_04002860, -(2.0f / 3.0f), 12.0f, 12.0f, ANIMMODE_ONCE, 0.0f);
}
struct_80832924 D_808551B4[] = {
@ -13379,7 +13386,7 @@ void func_80851BE8(GlobalContext* globalCtx, Player* this, CsCmdActorAction* arg
if (this->unk_850 >= 180) {
if (this->unk_850 == 180) {
LinkAnimation_Change(globalCtx, &this->skelAnime, &D_04003298, (2.0f / 3.0f), 10.0f,
Animation_GetLastFrame(&D_04003298), 2, -8.0f);
Animation_GetLastFrame(&D_04003298), ANIMMODE_ONCE, -8.0f);
}
func_80832924(this, D_808551B4);
}