mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
SubS Animations and LimbRotTables (#624)
* Bring over the matching code, rename struct vars to be consistent, and move animation structs to z64animation.h * Clean up function prototypes * Format and some stack var renames * Update tutorial * Rename animation structs * Rename SubS functions * Rename Actor function * Rename arg names * Bring over code for func_8013D9C8 * Rename and cleanup * Some more cleanup * Small cleanup * Animmode enum * Adjust actorfixer * More uses of animmode enum, as well as fixing typo * Change hex 0xD to 13 * typo * Fix merge * Format * Fix merge * Actorfixer * Format
This commit is contained in:
@@ -397,7 +397,7 @@ An actor with SkelAnime has three structs in the Actor struct that handle it: on
|
||||
There are two different sorts of SkelAnime, although for decompilation purposes there is not much difference between them. Looking at the prototype of `SkelAnime_InitFlex` from `functions.h` (or even the definition in `z_skelanime.c`),
|
||||
```C
|
||||
void SkelAnime_InitFlex(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
|
||||
AnimationHeader* animationSeg, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount);
|
||||
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount);
|
||||
```
|
||||
we can read off the types of the various arguments:
|
||||
- The `SkelAnime` struct is at `this + 0x144`
|
||||
|
||||
+30
-30
@@ -782,7 +782,7 @@ s32 func_800BD2B4(GlobalContext* globalCtx, Actor* actor, s16* arg2, f32 arg3, u
|
||||
void func_800BD888(Actor* actor, struct_800BD888_arg1* arg1, s16 arg2, s16 arg3);
|
||||
void func_800BD9E0(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s16 alpha);
|
||||
void func_800BDAA0(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s16 alpha);
|
||||
void Actor_ChangeAnimation(SkelAnime* skelAnime, ActorAnimationEntry* animation, s32 index);
|
||||
void Actor_ChangeAnimationByInfo(SkelAnime* skelAnime, AnimationInfo* animation, s32 index);
|
||||
void Actor_Noop(Actor* actor, GlobalContext* globalCtx);
|
||||
|
||||
void Gfx_DrawDListOpa(GlobalContext* globalCtx, Gfx* dlist);
|
||||
@@ -2363,7 +2363,7 @@ void SkelAnime_DrawFlexLimbOpa(GlobalContext* globalCtx, s32 limbIndex, void** s
|
||||
void SkelAnime_DrawFlexOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, Actor* actor);
|
||||
void SkelAnime_DrawTransformFlexLimbOpa(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, TransformLimbDrawOpa transformLimbDraw, Actor* actor, Mtx** mtx);
|
||||
void SkelAnime_DrawTransformFlexOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, TransformLimbDrawOpa transformLimbDraw, Actor* actor);
|
||||
void SkelAnime_GetFrameData(AnimationHeader* animationSeg, s32 currentFrame, s32 limbCount, Vec3s* dst);
|
||||
void SkelAnime_GetFrameData(AnimationHeader* animation, s32 currentFrame, s32 limbCount, Vec3s* dst);
|
||||
s16 Animation_GetLength(void* animation);
|
||||
s16 Animation_GetLastFrame(void* animation);
|
||||
Gfx* SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, Gfx* gfx);
|
||||
@@ -2381,7 +2381,7 @@ void AnimationContext_DisableQueue(GlobalContext* globalCtx);
|
||||
AnimationEntry* AnimationContext_AddEntry(AnimationContext* animationCtx, AnimationType type);
|
||||
void AnimationContext_SetLoadFrame(GlobalContext* globalCtx, LinkAnimationHeader* animation, s32 frame, s32 limbCount, Vec3s* frameTable);
|
||||
void AnimationContext_SetCopyAll(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src);
|
||||
void AnimationContext_SetInterp(GlobalContext* globalCtx, s32 limbCount, Vec3s* arg2, Vec3s* arg3, f32 arg4);
|
||||
void AnimationContext_SetInterp(GlobalContext* globalCtx, s32 vecCount, Vec3s* base, Vec3s* mod, f32 weight);
|
||||
void AnimationContext_SetCopyTrue(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src, u8* index);
|
||||
void AnimationContext_SetCopyFalse(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src, u8* index);
|
||||
void AnimationContext_SetMoveActor(GlobalContext* globalCtx, Actor* actor, SkelAnime* skelAnime, f32 arg3);
|
||||
@@ -2399,25 +2399,25 @@ s32 LinkAnimation_Morph(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
void LinkAnimation_AnimateFrame(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
s32 LinkAnimation_Loop(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
s32 LinkAnimation_Once(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
void Animation_SetMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 transitionRate);
|
||||
void LinkAnimation_Change(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* linkAnimetionEntrySeg, f32 playbackSpeed, f32 frame, f32 frameCount, u8 animationMode, f32 transitionRate);
|
||||
void LinkAnimation_PlayOnce(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* linkAnimetionEntrySeg);
|
||||
void LinkAnimation_PlayOnceSetSpeed(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* linkAnimetionEntrySeg, f32 playbackSpeed);
|
||||
void LinkAnimation_PlayLoop(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* linkAnimetionEntrySeg);
|
||||
void LinkAnimation_PlayLoopSetSpeed(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* linkAnimetionEntrySeg, f32 playbackSpeed);
|
||||
void Animation_SetMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 morphFrames);
|
||||
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* animation);
|
||||
void LinkAnimation_PlayOnceSetSpeed(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation, f32 playSpeed);
|
||||
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* linkAnimetionEntrySeg, f32 frame);
|
||||
void LinkAnimation_LoadToJoint(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* linkAnimetionEntrySeg, 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* linkAnimetionEntrySeg, f32 transitionFrame, LinkAnimationHeader* linkAnimetionEntrySeg2, f32 frame, f32 transitionRate, Vec3s* jointTable);
|
||||
void LinkAnimation_BlendToMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* linkAnimetionEntrySeg, f32 transitionFrame, LinkAnimationHeader* linkAnimetionEntrySeg2, f32 frame, f32 transitionRate, Vec3s* jointTable);
|
||||
void LinkAnimation_BlendToJoint(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation1, f32 frame1, LinkAnimationHeader* animation2, f32 frame2, f32 blendWeight, Vec3s* blendTable);
|
||||
void LinkAnimation_BlendToMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation1, f32 frame1, LinkAnimationHeader* animation2, f32 frame2, f32 blendWeight, Vec3s* blendTable);
|
||||
void LinkAnimation_EndLoop(SkelAnime* skelAnime);
|
||||
s32 Animation_OnFrameImpl(SkelAnime* skelAnime, f32 arg1, f32 updateRate);
|
||||
s32 LinkAnimation_OnFrame(SkelAnime* skelAnime, f32 arg1);
|
||||
void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, AnimationHeader* animationSeg, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount);
|
||||
s32 Animation_OnFrameImpl(SkelAnime* skelAnime, f32 frame, f32 updateRate);
|
||||
s32 LinkAnimation_OnFrame(SkelAnime* skelAnime, f32 frame);
|
||||
void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount);
|
||||
void SkelAnime_InitFlex(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg, AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount);
|
||||
void SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, AnimationHeader* animationSeg);
|
||||
void SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, AnimationHeader* animation);
|
||||
void SkelAnime_SetUpdate(SkelAnime* skelAnime);
|
||||
s32 SkelAnime_Update(SkelAnime* skelAnime);
|
||||
s32 SkelAnime_Morph(SkelAnime* skelAnime);
|
||||
@@ -2426,20 +2426,20 @@ void SkelAnime_AnimateFrame(SkelAnime* skelAnime);
|
||||
s32 SkelAnime_LoopFull(SkelAnime* skelAnime);
|
||||
s32 SkelAnime_LoopPartial(SkelAnime* skelAnime);
|
||||
s32 SkelAnime_Once(SkelAnime* skelAnime);
|
||||
void Animation_ChangeImpl(SkelAnime* skelAnime, AnimationHeader* animationSeg, f32 playbackSpeed, f32 frame, f32 frameCount, u8 animationType, f32 transitionRate, s8 unk2);
|
||||
void Animation_Change(SkelAnime* skelAnime, AnimationHeader* animationSeg, f32 playbackSpeed, f32 frame, f32 frameCount, u8 mode, f32 transitionRate);
|
||||
void Animation_PlayOnce(SkelAnime* skelAnime, AnimationHeader* animationSeg);
|
||||
void Animation_MorphToPlayOnce(SkelAnime* skelAnime, AnimationHeader* animationSeg, f32 transitionRate);
|
||||
void Animation_PlayOnceSetSpeed(SkelAnime* skelAnime, AnimationHeader* animationSeg, f32 playbackSpeed);
|
||||
void Animation_PlayLoop(SkelAnime* skelAnime, AnimationHeader* animationSeg);
|
||||
void Animation_MorphToLoop(SkelAnime* skelAnime, AnimationHeader* animationSeg, f32 transitionRate);
|
||||
void Animation_PlayLoopSetSpeed(SkelAnime* skelAnime, AnimationHeader* animationSeg, f32 playbackSpeed);
|
||||
void Animation_ChangeImpl(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed, f32 startFrame, f32 endFrame, u8 mode, f32 morphFrames, s8 taper);
|
||||
void Animation_Change(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed, f32 startFrame, f32 endFrame, u8 mode, f32 morphFrames);
|
||||
void Animation_PlayOnce(SkelAnime* skelAnime, AnimationHeader* animation);
|
||||
void Animation_MorphToPlayOnce(SkelAnime* skelAnime, AnimationHeader* animation, f32 morphFrames);
|
||||
void Animation_PlayOnceSetSpeed(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed);
|
||||
void Animation_PlayLoop(SkelAnime* skelAnime, AnimationHeader* animation);
|
||||
void Animation_MorphToLoop(SkelAnime* skelAnime, AnimationHeader* animation, f32 morphFrames);
|
||||
void Animation_PlayLoopSetSpeed(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed);
|
||||
void Animation_EndLoop(SkelAnime* skelAnime);
|
||||
void Animation_Reverse(SkelAnime* skelAnime);
|
||||
void SkelAnime_CopyFrameTableTrue(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* index);
|
||||
void SkelAnime_CopyFrameTableFalse(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* arg3);
|
||||
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 arg1);
|
||||
s32 Animation_OnFrame(SkelAnime* skelAnime, f32 frame);
|
||||
void SkelAnime_Free(SkelAnime* skelAnime, GlobalContext* globalCtx);
|
||||
void SkelAnime_CopyFrameTable(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src);
|
||||
// void func_80137970(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
|
||||
@@ -2503,7 +2503,7 @@ s32 func_8013B6B0(Path* path, f32* arg1, s32* arg2, s32 arg3, s32 arg4, s32* arg
|
||||
void func_8013B878(GlobalContext* globalCtx, Path* path, s32 arg2, Vec3f* arg3);
|
||||
Path* func_8013BB34(GlobalContext* globalCtx, u8 arg1, s32 arg2);
|
||||
Actor* SubS_FindNearestActor(Actor* actor, GlobalContext* globalCtx, u8 actorCategory, s16 actorId);
|
||||
s32 func_8013BC6C(SkelAnime* skelAnime, ActorAnimationEntryS* arg1, s32 arg2);
|
||||
s32 SubS_ChangeAnimationByInfoS(SkelAnime* skelAnime, AnimationInfoS* animations, s32 index);
|
||||
s32 func_8013BD40(Actor* actor, Path* path, s32 arg2);
|
||||
Path* func_8013BEDC(GlobalContext* globalCtx, u8 arg1, u8 arg2, s32* arg3);
|
||||
s32 func_8013C068(Path* path, s32 arg1, Vec3f* arg2, f32 arg3, s32 arg4);
|
||||
@@ -2524,7 +2524,7 @@ s16 func_8013D83C(Path* path, s32 pointIdx, Vec3f* pos, f32* distSq);
|
||||
s8 func_8013D8DC(s8 arg0, GlobalContext* globalCtx);
|
||||
s8 func_8013D924(s16 arg0, GlobalContext* globalCtx);
|
||||
Actor* SubS_FindActor(GlobalContext* globalCtx, Actor* actorListStart, u8 actorCategory, s16 actorId);
|
||||
s32 func_8013D9C8(GlobalContext* globalCtx, s16* arg1, s16* arg2, s32 arg3);
|
||||
s32 SubS_FillLimbRotTables(GlobalContext* globalCtx, s16* limbRotTableY, s16* limbRotTableZ, s32 limbRotTableLen);
|
||||
s32 func_8013DB90(GlobalContext* globalCtx, Vec3f* arg1, f32 arg2);
|
||||
s32 func_8013DC40(Path* arg0, s32 arg1, s32 arg2, Vec3f* arg3);
|
||||
void func_8013DCE0(GlobalContext* globalCtx, Vec3f* arg1, Actor* arg2, struct_8013DF3C_arg1* arg3, Path* arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, u8 arg9);
|
||||
@@ -2533,7 +2533,7 @@ void func_8013DF3C(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1);
|
||||
s32 func_8013E054(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1);
|
||||
s32 func_8013E07C(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1);
|
||||
s32 func_8013E0A4(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1);
|
||||
void func_8013E1C8(SkelAnime* skelAnime, struct_80B8E1A8 animations[], s32 animationIndex, s32* actorAnimationIndex);
|
||||
void SubS_ChangeAnimationBySpeedInfo(SkelAnime* skelAnime, AnimationSpeedInfo* animations, s32 nextIndex, s32* curIndex);
|
||||
s32 func_8013E2D4(Actor* actor, s16 arg1, s16 arg2, s32 arg3);
|
||||
s32 func_8013E3B8(Actor* actor, s16 cutscenes[], s16 len);
|
||||
void func_8013E4B0(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, Plane* plane);
|
||||
|
||||
@@ -297,24 +297,6 @@ typedef enum {
|
||||
/* 0x0C */ ACTORCAT_MAX
|
||||
} ActorType;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ AnimationHeader* animation;
|
||||
/* 0x04 */ f32 playSpeed;
|
||||
/* 0x08 */ f32 startFrame;
|
||||
/* 0x0C */ f32 frameCount;
|
||||
/* 0x10 */ u8 mode;
|
||||
/* 0x14 */ f32 morphFrames;
|
||||
} ActorAnimationEntry; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ AnimationHeader* animationSeg;
|
||||
/* 0x04 */ f32 playbackSpeed;
|
||||
/* 0x08 */ s16 frame;
|
||||
/* 0x0A */ s16 frameCount;
|
||||
/* 0x0C */ u8 mode;
|
||||
/* 0x0E */ s16 transitionRate;
|
||||
} ActorAnimationEntryS; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f pos;
|
||||
/* 0x0C */ f32 unkC;
|
||||
|
||||
+23
-5
@@ -316,11 +316,29 @@ typedef struct {
|
||||
/* 0x008 */ Gfx* unk_8;
|
||||
} Struct_800A5E28; // size = 0xC
|
||||
|
||||
typedef struct struct_80B8E1A8 {
|
||||
/* 0x00 */ AnimationHeader* animationSeg;
|
||||
/* 0x04 */ f32 playbackSpeed;
|
||||
typedef struct {
|
||||
/* 0x00 */ AnimationHeader* animation;
|
||||
/* 0x04 */ f32 playSpeed;
|
||||
/* 0x08 */ f32 startFrame;
|
||||
/* 0x0C */ f32 frameCount;
|
||||
/* 0x10 */ u8 mode;
|
||||
/* 0x14 */ f32 morphFrames;
|
||||
} AnimationInfo; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ AnimationHeader* animation;
|
||||
/* 0x04 */ f32 playSpeed;
|
||||
/* 0x08 */ s16 startFrame;
|
||||
/* 0x0A */ s16 frameCount;
|
||||
/* 0x0C */ u8 mode;
|
||||
/* 0x0E */ s16 morphFrames;
|
||||
} AnimationInfoS; // size = 0x10
|
||||
|
||||
typedef struct AnimationSpeedInfo {
|
||||
/* 0x00 */ AnimationHeader* animation;
|
||||
/* 0x04 */ f32 playSpeed;
|
||||
/* 0x08 */ u8 mode;
|
||||
/* 0x0C */ f32 transitionRate;
|
||||
} struct_80B8E1A8; // size = 0x10
|
||||
/* 0x0C */ f32 morphFrames;
|
||||
} AnimationSpeedInfo; // size = 0x10
|
||||
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -4252,7 +4252,7 @@ s16 func_800BDB6C(Actor* actor, GlobalContext* globalCtx, s16 arg2, f32 arg3) {
|
||||
return arg2;
|
||||
}
|
||||
|
||||
void Actor_ChangeAnimation(SkelAnime* skelAnime, ActorAnimationEntry* animation, s32 index) {
|
||||
void Actor_ChangeAnimationByInfo(SkelAnime* skelAnime, AnimationInfo* animation, s32 index) {
|
||||
f32 frameCount;
|
||||
|
||||
animation += index;
|
||||
|
||||
+5
-5
@@ -11,7 +11,7 @@
|
||||
#include "objects/object_boj/object_boj.h"
|
||||
#include "objects/object_os_anime/object_os_anime.h"
|
||||
|
||||
ActorAnimationEntryS sAnimations[] = {
|
||||
static AnimationInfoS sAnimations[] = {
|
||||
{ &object_aob_Anim_00007C, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_boj_Anim_001494, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_boj_Anim_001494, 1.0f, 0, -1, ANIMMODE_LOOP, -8 },
|
||||
@@ -49,11 +49,11 @@ s32 EnHy_ChangeAnim(SkelAnime* skelAnime, s16 animIndex) {
|
||||
isChanged = true;
|
||||
frameCount = sAnimations[animIndex].frameCount;
|
||||
if (frameCount < 0) {
|
||||
frameCount = Animation_GetLastFrame(&sAnimations[animIndex].animationSeg->common);
|
||||
frameCount = Animation_GetLastFrame(&sAnimations[animIndex].animation->common);
|
||||
}
|
||||
Animation_Change(skelAnime, sAnimations[animIndex].animationSeg, sAnimations[animIndex].playbackSpeed,
|
||||
sAnimations[animIndex].frame, frameCount, sAnimations[animIndex].mode,
|
||||
sAnimations[animIndex].transitionRate);
|
||||
Animation_Change(skelAnime, sAnimations[animIndex].animation, sAnimations[animIndex].playSpeed,
|
||||
sAnimations[animIndex].startFrame, frameCount, sAnimations[animIndex].mode,
|
||||
sAnimations[animIndex].morphFrames);
|
||||
}
|
||||
return isChanged;
|
||||
}
|
||||
|
||||
+10
-10
@@ -8,10 +8,10 @@ s32 LinkAnimation_Once(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
s32 SkelAnime_LoopFull(SkelAnime* skelAnime);
|
||||
s32 SkelAnime_LoopPartial(SkelAnime* skelAnime);
|
||||
s32 SkelAnime_Once(SkelAnime* skelAnime);
|
||||
void Animation_PlayLoop(SkelAnime* skelAnime, AnimationHeader* animationSeg);
|
||||
void Animation_PlayLoop(SkelAnime* skelAnime, AnimationHeader* animation);
|
||||
void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* pos, s16 angle);
|
||||
void LinkAnimation_Change(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* linkAnimetionEntrySeg,
|
||||
f32 playbackSpeed, f32 frame, f32 frameCount, u8 animationMode, f32 transitionRate);
|
||||
void LinkAnimation_Change(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* animation, f32 playSpeed,
|
||||
f32 frame, f32 frameCount, u8 animationMode, f32 morphFrames);
|
||||
void SkelAnime_CopyFrameTable(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src);
|
||||
|
||||
static AnimationEntryCallback sAnimationLoadDone[] = {
|
||||
@@ -1074,13 +1074,13 @@ void AnimationContext_SetCopyFalse(GlobalContext* globalCtx, s32 vecCount, Vec3s
|
||||
/**
|
||||
* Requests moving an actor according to the translation of its root limb
|
||||
*/
|
||||
void AnimationContext_SetMoveActor(GlobalContext* globalCtx, Actor* actor, SkelAnime* skelAnime, f32 actor3) {
|
||||
void AnimationContext_SetMoveActor(GlobalContext* globalCtx, Actor* actor, SkelAnime* skelAnime, f32 arg3) {
|
||||
AnimationEntry* entry = AnimationContext_AddEntry(&globalCtx->animationCtx, ANIMENTRY_MOVEACTOR);
|
||||
|
||||
if (entry != NULL) {
|
||||
entry->data.move.actor = actor;
|
||||
entry->data.move.skelAnime = skelAnime;
|
||||
entry->data.move.unk08 = actor3;
|
||||
entry->data.move.unk08 = arg3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1829,8 +1829,8 @@ void Animation_PlayOnce(SkelAnime* skelAnime, AnimationHeader* animation) {
|
||||
* animation. Negative morph frames start the new animation immediately, modified by the pose immediately before the
|
||||
* animation change.
|
||||
*/
|
||||
void Animation_MorphToPlayOnce(SkelAnime* skelAnime, AnimationHeader* animationSeg, f32 morphFrames) {
|
||||
Animation_Change(skelAnime, animationSeg, 1.0f, 0, Animation_GetLastFrame(&animationSeg->common), ANIMMODE_ONCE,
|
||||
void Animation_MorphToPlayOnce(SkelAnime* skelAnime, AnimationHeader* animation, f32 morphFrames) {
|
||||
Animation_Change(skelAnime, animation, 1.0f, 0, Animation_GetLastFrame(&animation->common), ANIMMODE_ONCE,
|
||||
morphFrames);
|
||||
}
|
||||
|
||||
@@ -1862,9 +1862,9 @@ void Animation_MorphToLoop(SkelAnime* skelAnime, AnimationHeader* animation, f32
|
||||
/**
|
||||
* Immediately changes to an animation that loops at the specified speed.
|
||||
*/
|
||||
void Animation_PlayLoopSetSpeed(SkelAnime* skelAnime, AnimationHeader* animation, f32 playbackSpeed) {
|
||||
Animation_Change(skelAnime, animation, playbackSpeed, 0.0f, Animation_GetLastFrame(&animation->common),
|
||||
ANIMMODE_LOOP, 0.0f);
|
||||
void Animation_PlayLoopSetSpeed(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed) {
|
||||
Animation_Change(skelAnime, animation, playSpeed, 0.0f, Animation_GetLastFrame(&animation->common), ANIMMODE_LOOP,
|
||||
0.0f);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+59
-3
@@ -205,7 +205,26 @@ Actor* SubS_FindNearestActor(Actor* actor, GlobalContext* globalCtx, u8 actorCat
|
||||
return closestActor;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013BC6C.s")
|
||||
s32 SubS_ChangeAnimationByInfoS(SkelAnime* skelAnime, AnimationInfoS* animations, s32 index) {
|
||||
s32 endFrame;
|
||||
s32 startFrame;
|
||||
|
||||
animations += index;
|
||||
endFrame = animations->frameCount;
|
||||
if (animations->frameCount < 0) {
|
||||
endFrame = Animation_GetLastFrame(&animations->animation->common);
|
||||
}
|
||||
startFrame = animations->startFrame;
|
||||
if (startFrame >= endFrame || startFrame < 0) {
|
||||
return false;
|
||||
}
|
||||
if (animations->playSpeed < 0.0f) {
|
||||
SWAP(s32, endFrame, startFrame);
|
||||
}
|
||||
Animation_Change(skelAnime, animations->animation, animations->playSpeed, startFrame, endFrame, animations->mode,
|
||||
animations->morphFrames);
|
||||
return true;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013BD40.s")
|
||||
|
||||
@@ -262,7 +281,17 @@ Actor* SubS_FindActor(GlobalContext* globalCtx, Actor* actorListStart, u8 actorC
|
||||
return actor;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013D9C8.s")
|
||||
s32 SubS_FillLimbRotTables(GlobalContext* globalCtx, s16* limbRotTableY, s16* limbRotTableZ, s32 limbRotTableLen) {
|
||||
s32 i;
|
||||
u32 frames = globalCtx->gameplayFrames;
|
||||
|
||||
for (i = 0; i < limbRotTableLen; i++) {
|
||||
limbRotTableY[i] = (i * 50 + 0x814) * frames;
|
||||
limbRotTableZ[i] = (i * 50 + 0x940) * frames;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013DB90.s")
|
||||
|
||||
@@ -282,7 +311,34 @@ Actor* SubS_FindActor(GlobalContext* globalCtx, Actor* actorListStart, u8 actorC
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013E0A4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013E1C8.s")
|
||||
void SubS_ChangeAnimationBySpeedInfo(SkelAnime* skelAnime, AnimationSpeedInfo* animations, s32 nextIndex,
|
||||
s32* curIndex) {
|
||||
AnimationSpeedInfo* animation = &animations[nextIndex];
|
||||
f32 startFrame = skelAnime->curFrame;
|
||||
f32 endFrame;
|
||||
f32 morphFrames;
|
||||
|
||||
if ((*curIndex < 0) || (nextIndex == *curIndex)) {
|
||||
morphFrames = 0.0f;
|
||||
if (*curIndex < 0) {
|
||||
startFrame = 0.0f;
|
||||
}
|
||||
} else {
|
||||
morphFrames = animation->morphFrames;
|
||||
if (nextIndex != *curIndex) {
|
||||
startFrame = 0.0f;
|
||||
}
|
||||
}
|
||||
if (animation->playSpeed >= 0.0f) {
|
||||
endFrame = Animation_GetLastFrame(&animation->animation->common);
|
||||
} else {
|
||||
startFrame = Animation_GetLastFrame(&animation->animation->common);
|
||||
endFrame = 0.0f;
|
||||
}
|
||||
Animation_Change(skelAnime, animation->animation, animation->playSpeed, startFrame, endFrame, animation->mode,
|
||||
morphFrames);
|
||||
*curIndex = nextIndex;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013E2D4.s")
|
||||
|
||||
|
||||
@@ -47,16 +47,16 @@ const ActorInit Dm_Char05_InitVars = {
|
||||
(ActorFunc)DmChar05_Draw,
|
||||
};
|
||||
|
||||
static ActorAnimationEntry sAnimations[] = {
|
||||
{ &object_dmask_Anim_001090, 1.0f, 0.0f, -1.0f, 2, 0.0f },
|
||||
{ &object_dmask_Anim_004288, 1.0f, 0.0f, -1.0f, 2, 0.0f },
|
||||
{ &object_dmask_Anim_0001A8, 1.0f, 0.0f, -1.0f, 2, 0.0f },
|
||||
{ &object_dmask_Anim_00017C, 1.0f, 0.0f, -1.0f, 2, 0.0f },
|
||||
{ &object_dmask_Anim_0011A0, 1.0f, 0.0f, -1.0f, 2, 0.0f },
|
||||
{ &object_dmask_Anim_0013A4, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
static AnimationInfo sAnimations[] = {
|
||||
{ &object_dmask_Anim_001090, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_dmask_Anim_004288, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_dmask_Anim_0001A8, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_dmask_Anim_00017C, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_dmask_Anim_0011A0, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_dmask_Anim_0013A4, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
};
|
||||
|
||||
void func_80AAC5A0(SkelAnime* skelAnime, ActorAnimationEntry* animation, u16 arg2) {
|
||||
void func_80AAC5A0(SkelAnime* skelAnime, AnimationInfo* animation, u16 arg2) {
|
||||
f32 phi_f2;
|
||||
|
||||
animation += arg2;
|
||||
|
||||
@@ -28,14 +28,14 @@ const ActorInit Dm_Nb_InitVars = {
|
||||
(ActorFunc)DmNb_Draw,
|
||||
};
|
||||
|
||||
static ActorAnimationEntryS D_80C1E200[] = { &object_nb_Anim_000990, 1.0f, 0, -1, 0, 0 };
|
||||
static AnimationInfoS D_80C1E200[] = { &object_nb_Anim_000990, 1.0f, 0, -1, ANIMMODE_LOOP, 0 };
|
||||
|
||||
s32 func_80C1DED0(DmNb* this, s32 arg1) {
|
||||
s32 ret = 0;
|
||||
s32 ret = false;
|
||||
|
||||
if (arg1 != this->unk1F0) {
|
||||
this->unk1F0 = arg1;
|
||||
ret = func_8013BC6C(&this->skelAnime, D_80C1E200, arg1);
|
||||
ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80C1E200, arg1);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -30,12 +30,12 @@ const ActorInit Dm_Sa_InitVars = {
|
||||
(ActorFunc)DmSa_Draw,
|
||||
};
|
||||
|
||||
static ActorAnimationEntry D_80A2ED00[] = { { &object_stk_Anim_00CC94, 1.0f, 0, -1.0f, 0, 0 } };
|
||||
static AnimationInfo D_80A2ED00[] = { { &object_stk_Anim_00CC94, 1.0f, 0, -1.0f, ANIMMODE_LOOP, 0 } };
|
||||
|
||||
void func_80A2E960(SkelAnime* arg0, ActorAnimationEntry* animations, u16 index) {
|
||||
void func_80A2E960(SkelAnime* arg0, AnimationInfo* animations, u16 index) {
|
||||
f32 frameCount;
|
||||
animations += index;
|
||||
|
||||
animations += index;
|
||||
if (animations->frameCount < 0.0f) {
|
||||
frameCount = Animation_GetLastFrame(animations->animation);
|
||||
} else {
|
||||
|
||||
@@ -102,43 +102,79 @@ static DamageTable sDamageTable = {
|
||||
/* Powder Keg */ DMG_ENTRY(1, 0xF),
|
||||
};
|
||||
|
||||
static ActorAnimationEntry sAnimations[] = {
|
||||
{ &object_stk_Anim_01C21C, 1.0f, 0.0f, -1.0f, 0, 0.0f }, { &object_stk_Anim_01D3D0, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk_Anim_001030, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk_Anim_01D008, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk_Anim_01D008, 1.0f, 0.0f, -1.0f, 0, 0.0f }, { &object_stk_Anim_015C14, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_0070DC, 1.0f, 0.0f, -1.0f, 0, 0.0f }, { &object_stk2_Anim_00D830, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_00055C, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_00130C, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_00C270, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_00CBB8, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_01AA80, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_01D07C, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_016910, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_018ED0, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_01DDE0, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_01EF50, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_02DC64, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_02E9A0, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_02DC64, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_02E9A0, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_0035C8, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_0049C8, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_0259F4, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_0266C8, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_026CF4, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_01C114, 1.0f, 0.0f, -1.0f, 2, 0.0f },
|
||||
{ &object_stk2_Anim_004580, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_020CAC, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_02200C, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_02336C, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk_Anim_002774, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk_Anim_003068, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_0101A4, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_010B60, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_02A2D8, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_01F9E4, 1.0f, 0.0f, -1.0f, 2, 0.0f },
|
||||
{ &object_stk2_Anim_029A04, 1.0f, 0.0f, -1.0f, 0, 0.0f }, { &object_stk2_Anim_02AD54, 1.0f, 0.0f, -1.0f, 2, 0.0f },
|
||||
{ &object_stk_Anim_00BB2C, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk_Anim_00C964, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_0110B4, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_011FB0, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_012A58, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_0141E4, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_00E6EC, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_00EEC0, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_027CF4, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_028F28, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_03323C, 1.0f, 0.0f, -1.0f, 0, 0.0f }, { &object_stk2_Anim_031210, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_0322FC, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_032AE0, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_03021C, 1.0f, 0.0f, -1.0f, 0, 0.0f }, { &object_stk2_Anim_036964, 1.0f, 0.0f, -1.0f, 2, 0.0f },
|
||||
{ &object_stk_Anim_016508, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk_Anim_015028, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk_Anim_014920, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_02FA70, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_037B94, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_03967C, 1.0f, 0.0f, -1.0f, 2, 0.0f },
|
||||
{ &object_stk2_Anim_03967C, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk2_Anim_03A8F8, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk2_Anim_034FD8, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk3_Anim_005F44, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk3_Anim_002CD8, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk3_Anim_0039F0, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk3_Anim_004554, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk3_Anim_0051C0, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_stk3_Anim_001374, 1.0f, 0.0f, -1.0f, 2, 0.0f }, { &object_stk3_Anim_001EDC, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
static AnimationInfo sAnimations[] = {
|
||||
{ &object_stk_Anim_01C21C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk_Anim_01D3D0, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk_Anim_001030, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk_Anim_01D008, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk_Anim_01D008, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk_Anim_015C14, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_0070DC, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_00D830, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_00055C, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_00130C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_00C270, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_00CBB8, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_01AA80, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_01D07C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_016910, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_018ED0, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_01DDE0, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_01EF50, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_02DC64, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_02E9A0, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_02DC64, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_02E9A0, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_0035C8, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_0049C8, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_0259F4, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_0266C8, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_026CF4, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_01C114, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_004580, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_020CAC, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_02200C, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_02336C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk_Anim_002774, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk_Anim_003068, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_0101A4, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_010B60, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_02A2D8, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_01F9E4, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_029A04, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_02AD54, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk_Anim_00BB2C, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk_Anim_00C964, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_0110B4, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_011FB0, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_012A58, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_0141E4, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_00E6EC, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_00EEC0, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_027CF4, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_028F28, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_03323C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_031210, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_0322FC, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_032AE0, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_03021C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_036964, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk_Anim_016508, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk_Anim_015028, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk_Anim_014920, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_02FA70, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_037B94, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_03967C, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_03967C, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk2_Anim_03A8F8, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk2_Anim_034FD8, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk3_Anim_005F44, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk3_Anim_002CD8, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk3_Anim_0039F0, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk3_Anim_004554, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk3_Anim_0051C0, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_stk3_Anim_001374, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_stk3_Anim_001EDC, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
};
|
||||
|
||||
void func_80A9FDB0(DmStk* this, GlobalContext* globalCtx) {
|
||||
@@ -158,8 +194,7 @@ void func_80A9FDB0(DmStk* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A9FE3C(DmStk* this, GlobalContext* globalCtx, SkelAnime* skelAnime, ActorAnimationEntry* animation,
|
||||
u16 index) {
|
||||
void func_80A9FE3C(DmStk* this, GlobalContext* globalCtx, SkelAnime* skelAnime, AnimationInfo* animation, u16 index) {
|
||||
func_80A9FDB0(this, globalCtx);
|
||||
|
||||
animation += index;
|
||||
|
||||
@@ -62,19 +62,30 @@ static ColliderCylinderInitType1 sCylinderInit = {
|
||||
{ 27, 32, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
static ActorAnimationEntryS sAnimations[] = {
|
||||
{ &object_dnt_Anim_005488, 1.0f, 0, -1, 0, 0 }, { &object_dnt_Anim_00B0B4, 1.0f, 0, -1, 0, 0 },
|
||||
{ &object_dnt_Anim_004AA0, 1.0f, 0, -1, 2, 0 }, { &object_dnt_Anim_004E38, 1.0f, 0, -1, 2, 0 },
|
||||
{ &object_dnt_Anim_0029E8, 1.0f, 0, -1, 2, 0 }, { &object_dnt_Anim_005CA8, 1.0f, 0, -1, 2, 0 },
|
||||
{ &object_dnt_Anim_0038CC, 1.0f, 0, -1, 0, 0 }, { &object_dnt_Anim_003CC0, 1.0f, 0, -1, 0, 0 },
|
||||
{ &object_dnt_Anim_0012F4, 1.0f, 0, -1, 2, 0 }, { &object_dnt_Anim_004700, 1.0f, 0, -1, 2, 0 },
|
||||
{ &object_dnt_Anim_001BC8, 1.0f, 0, -1, 0, 0 }, { &object_dnt_Anim_003438, 1.0f, 0, -1, 2, 0 },
|
||||
{ &object_dnt_Anim_001E2C, 1.0f, 0, -1, 0, 0 }, { &object_dnt_Anim_000994, 1.0f, 0, -1, 0, 0 },
|
||||
{ &object_dnt_Anim_002268, 1.0f, 0, -1, 2, 0 }, { &object_dnt_Anim_002F08, 1.0f, 0, -1, 0, 0 },
|
||||
{ &object_dnt_Anim_00577C, 1.0f, 0, -1, 0, -4 }, { &object_dnt_Anim_0029E8, 1.0f, 8, -1, 2, 0 },
|
||||
{ &object_dnt_Anim_0029E8, 1.0f, 4, -1, 2, -4 }, { &object_dnt_Anim_0029E8, 1.0f, 0, -1, 2, 0 },
|
||||
{ &object_dnt_Anim_001BC8, 1.0f, 0, -1, 0, 0 }, { &object_dnt_Anim_0012F4, -1.0f, 0, -1, 2, 0 },
|
||||
{ &object_dnt_Anim_002670, 1.0f, 0, -1, 2, 0 },
|
||||
static AnimationInfoS sAnimations[] = {
|
||||
{ &object_dnt_Anim_005488, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dnt_Anim_00B0B4, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dnt_Anim_004AA0, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnt_Anim_004E38, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnt_Anim_0029E8, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnt_Anim_005CA8, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnt_Anim_0038CC, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dnt_Anim_003CC0, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dnt_Anim_0012F4, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnt_Anim_004700, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnt_Anim_001BC8, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dnt_Anim_003438, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnt_Anim_001E2C, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dnt_Anim_000994, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dnt_Anim_002268, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnt_Anim_002F08, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dnt_Anim_00577C, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnt_Anim_0029E8, 1.0f, 8, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnt_Anim_0029E8, 1.0f, 4, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnt_Anim_0029E8, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnt_Anim_001BC8, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dnt_Anim_0012F4, -1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnt_Anim_002670, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
};
|
||||
|
||||
static u16 D_80BF048C[] = {
|
||||
@@ -1143,7 +1154,7 @@ void func_80BEE938(EnAkindonuts* this, GlobalContext* globalCtx) {
|
||||
|
||||
void func_80BEEB20(EnAkindonuts* this, GlobalContext* globalCtx) {
|
||||
s16 sp26 = this->skelAnime.curFrame;
|
||||
s16 sp24 = Animation_GetLastFrame(&sAnimations[this->unk_338].animationSeg->common);
|
||||
s16 sp24 = Animation_GetLastFrame(&sAnimations[this->unk_338].animation->common);
|
||||
s16 phi_v0;
|
||||
|
||||
Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 2, 0xE38);
|
||||
@@ -1166,7 +1177,7 @@ void func_80BEEB20(EnAkindonuts* this, GlobalContext* globalCtx) {
|
||||
this->actionFunc = func_80BEEDC0;
|
||||
this->unk_338 = 3;
|
||||
this->collider.dim.height = 64;
|
||||
func_8013BC6C(&this->skelAnime, sAnimations, 3);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 3);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1176,19 +1187,19 @@ void func_80BEEB20(EnAkindonuts* this, GlobalContext* globalCtx) {
|
||||
this->unk_338 = 17;
|
||||
this->collider.dim.height = 0;
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DOWN);
|
||||
func_8013BC6C(&this->skelAnime, sAnimations, 17);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 17);
|
||||
} else if (this->unk_338 == 2) {
|
||||
this->unk_338 = 16;
|
||||
this->collider.dim.height = 32;
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_UP);
|
||||
func_8013BC6C(&this->skelAnime, sAnimations, 16);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 16);
|
||||
} else if (this->unk_338 == 17) {
|
||||
phi_v0 = DECR(this->unk_33A);
|
||||
if (phi_v0 == 0) {
|
||||
this->unk_33A = Rand_ZeroOne() * 10.0f;
|
||||
this->unk_338 = 2;
|
||||
this->collider.dim.height = 32;
|
||||
func_8013BC6C(&this->skelAnime, sAnimations, 2);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 2);
|
||||
}
|
||||
} else if (this->unk_338 == 16) {
|
||||
phi_v0 = DECR(this->unk_33A);
|
||||
@@ -1196,7 +1207,7 @@ void func_80BEEB20(EnAkindonuts* this, GlobalContext* globalCtx) {
|
||||
this->unk_33A = Rand_S16Offset(40, 40);
|
||||
this->unk_338 = 18;
|
||||
this->collider.dim.height = 32;
|
||||
func_8013BC6C(&this->skelAnime, sAnimations, 18);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 18);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1205,7 +1216,7 @@ void func_80BEEB20(EnAkindonuts* this, GlobalContext* globalCtx) {
|
||||
void func_80BEEDC0(EnAkindonuts* this, GlobalContext* globalCtx) {
|
||||
if (this->skelAnime.curFrame == this->skelAnime.endFrame) {
|
||||
this->actionFunc = func_80BEEE10;
|
||||
func_8013BC6C(&this->skelAnime, sAnimations, 0);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1223,7 +1234,7 @@ void func_80BEEE10(EnAkindonuts* this, GlobalContext* globalCtx) {
|
||||
} else if (!(((this->actor.playerHeightRel < 50.0f) && (this->actor.playerHeightRel > -50.0f)) ? true : false) ||
|
||||
!((this->actor.xzDistToPlayer < 200.0f) ? true : false)) {
|
||||
this->unk_338 = 4;
|
||||
func_8013BC6C(&this->skelAnime, sAnimations, 4);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 4);
|
||||
this->actionFunc = func_80BEEB20;
|
||||
}
|
||||
}
|
||||
@@ -1247,7 +1258,7 @@ void func_80BEEFA8(EnAkindonuts* this, GlobalContext* globalCtx) {
|
||||
globalCtx->msgCtx.unk12023 = 4;
|
||||
this->unk_338 = 8;
|
||||
this->unk_33C = 0;
|
||||
func_8013BC6C(&this->skelAnime, sAnimations, this->unk_338);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->unk_338);
|
||||
this->actionFunc = func_80BEF518;
|
||||
} else {
|
||||
this->unk_2DC(this, globalCtx);
|
||||
@@ -1285,18 +1296,18 @@ void func_80BEF18C(EnAkindonuts* this, GlobalContext* globalCtx) {
|
||||
void func_80BEF20C(EnAkindonuts* this, GlobalContext* globalCtx) {
|
||||
u8 sp27 = Message_GetState(&globalCtx->msgCtx);
|
||||
s16 sp24 = this->skelAnime.curFrame;
|
||||
s16 sp22 = Animation_GetLastFrame(&sAnimations[this->unk_338].animationSeg->common);
|
||||
s16 sp22 = Animation_GetLastFrame(&sAnimations[this->unk_338].animation->common);
|
||||
|
||||
if (this->unk_356 == 40) {
|
||||
this->unk_338 = 5;
|
||||
func_8013BC6C(&this->skelAnime, sAnimations, 5);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 5);
|
||||
}
|
||||
|
||||
this->unk_356++;
|
||||
|
||||
if ((sp24 == sp22) && (this->unk_338 == 5)) {
|
||||
this->unk_338 = 6;
|
||||
func_8013BC6C(&this->skelAnime, sAnimations, 6);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 6);
|
||||
}
|
||||
|
||||
if ((sp27 == 5) && func_80147624(globalCtx)) {
|
||||
@@ -1347,7 +1358,7 @@ void func_80BEF4B8(EnAkindonuts* this, GlobalContext* globalCtx) {
|
||||
|
||||
void func_80BEF518(EnAkindonuts* this, GlobalContext* globalCtx) {
|
||||
s16 sp26 = this->skelAnime.curFrame;
|
||||
s16 sp24 = Animation_GetLastFrame(&sAnimations[this->unk_338].animationSeg->common);
|
||||
s16 sp24 = Animation_GetLastFrame(&sAnimations[this->unk_338].animation->common);
|
||||
|
||||
switch (sp26) {
|
||||
case 10:
|
||||
@@ -1421,7 +1432,7 @@ void func_80BEF518(EnAkindonuts* this, GlobalContext* globalCtx) {
|
||||
if (sp26 == sp24) {
|
||||
this->unk_33E = 3;
|
||||
this->unk_338 = 19;
|
||||
func_8013BC6C(&this->skelAnime, sAnimations, this->unk_338);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->unk_338);
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DOWN);
|
||||
this->unk_32C &= ~2;
|
||||
this->unk_32C |= 0x80;
|
||||
@@ -1454,7 +1465,7 @@ void func_80BEF770(EnAkindonuts* this, GlobalContext* globalCtx) {
|
||||
void func_80BEF83C(EnAkindonuts* this, GlobalContext* globalCtx) {
|
||||
Vec3f sp34;
|
||||
s16 sp32 = this->skelAnime.curFrame;
|
||||
s16 sp30 = Animation_GetLastFrame(&sAnimations[this->unk_338].animationSeg->common);
|
||||
s16 sp30 = Animation_GetLastFrame(&sAnimations[this->unk_338].animation->common);
|
||||
|
||||
if (sp32 == sp30) {
|
||||
Math_SmoothStepToS(&this->unk_362, 0x1C71, 3, 0x100, 0);
|
||||
@@ -1480,7 +1491,7 @@ void func_80BEF83C(EnAkindonuts* this, GlobalContext* globalCtx) {
|
||||
if ((this->actor.home.pos.y + 22.5f) < this->actor.world.pos.y) {
|
||||
this->unk_34C = 0.3f;
|
||||
this->unk_338 = 9;
|
||||
func_8013BC6C(&this->skelAnime, sAnimations, this->unk_338);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->unk_338);
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_AKINDONUTS_HIDE);
|
||||
this->actionFunc = func_80BEF9F0;
|
||||
}
|
||||
@@ -1499,7 +1510,7 @@ void func_80BEF9F0(EnAkindonuts* this, GlobalContext* globalCtx) {
|
||||
if ((this->actor.home.pos.y + 200.0f) < this->actor.world.pos.y) {
|
||||
Math_ApproachF(&this->actor.velocity.y, 0.0f, 0.2f, 1.0f);
|
||||
this->unk_338 = 10;
|
||||
func_8013BC6C(&this->skelAnime, sAnimations, this->unk_338);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->unk_338);
|
||||
if (ENAKINDONUTS_GET_3(&this->actor) == ENAKINDONUTS_3_2) {
|
||||
this->unk_32C |= 0x2;
|
||||
}
|
||||
@@ -1602,7 +1613,7 @@ void EnAkindonuts_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
func_8013BC6C(&this->skelAnime, sAnimations, 4);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 4);
|
||||
this->unk_32C |= 0x2;
|
||||
this->unk_32C |= 0x4;
|
||||
this->unk_338 = 4;
|
||||
|
||||
@@ -45,10 +45,13 @@ const ActorInit En_Aob_01_InitVars = {
|
||||
(ActorFunc)EnAob01_Draw,
|
||||
};
|
||||
|
||||
static ActorAnimationEntry D_809C3790[6] = {
|
||||
{ &object_aob_Anim_007758, 1.0f, 0.0f, 0.0f, 0, 0.0f }, { &object_aob_Anim_0068B4, 1.0f, 0.0f, 0.0f, 2, 0.0f },
|
||||
{ &object_aob_Anim_00700C, 1.0f, 0.0f, 0.0f, 0, 0.0f }, { &object_aob_Anim_0058EC, 1.0f, 0.0f, 0.0f, 2, 0.0f },
|
||||
{ &object_aob_Anim_006040, 1.0f, 0.0f, 0.0f, 0, 0.0f }, { &object_aob_Anim_007758, 1.0f, 0.0f, 0.0f, 0, -6.0f },
|
||||
static AnimationInfo D_809C3790[6] = {
|
||||
{ &object_aob_Anim_007758, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_aob_Anim_0068B4, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_aob_Anim_00700C, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_aob_Anim_0058EC, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &object_aob_Anim_006040, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &object_aob_Anim_007758, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -6.0f },
|
||||
};
|
||||
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
@@ -150,7 +153,7 @@ s32 func_809C1424(EnAob01* this) {
|
||||
if (this->unk_43C == 1) {
|
||||
if (curFrame == lastFrame) {
|
||||
this->unk_43C = 2;
|
||||
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 2);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 2);
|
||||
return true;
|
||||
}
|
||||
} else if (this->unk_43C == 2) {
|
||||
@@ -166,13 +169,13 @@ s32 func_809C14D0(EnAob01* this) {
|
||||
if ((this->unk_43C == 0) || (this->unk_43C == 5)) {
|
||||
if (curFrame == lastFrame) {
|
||||
this->unk_43C = 3;
|
||||
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 3);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 3);
|
||||
return true;
|
||||
}
|
||||
} else if (this->unk_43C == 3) {
|
||||
if (curFrame == lastFrame) {
|
||||
this->unk_43C = 4;
|
||||
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 4);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 4);
|
||||
return true;
|
||||
}
|
||||
} else if (this->unk_43C == 4) {
|
||||
@@ -188,7 +191,7 @@ s32 func_809C15BC(EnAob01* this) {
|
||||
if ((this->unk_43C != 0) && (this->unk_43C != 5)) {
|
||||
if (curFrame == lastFrame) {
|
||||
this->unk_43C = 5;
|
||||
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 5);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 5);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
@@ -330,7 +333,7 @@ void func_809C16DC(EnAob01* this, GlobalContext* globalCtx) {
|
||||
this->unk_2D2 |= 0x40;
|
||||
this->unk_2D2 |= 0x10;
|
||||
this->unk_43C = 1;
|
||||
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 1);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 1);
|
||||
break;
|
||||
|
||||
case 0x3525:
|
||||
@@ -345,7 +348,7 @@ void func_809C16DC(EnAob01* this, GlobalContext* globalCtx) {
|
||||
this->unk_2D2 |= 0x40;
|
||||
this->unk_2D2 |= 0x10;
|
||||
this->unk_43C = 1;
|
||||
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 1);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -360,7 +363,7 @@ void func_809C16DC(EnAob01* this, GlobalContext* globalCtx) {
|
||||
this->unk_2D2 |= 4;
|
||||
this->unk_2D2 |= 0x10;
|
||||
this->unk_43C = 1;
|
||||
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 1);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 1);
|
||||
break;
|
||||
|
||||
case 0x3527:
|
||||
@@ -372,7 +375,7 @@ void func_809C16DC(EnAob01* this, GlobalContext* globalCtx) {
|
||||
this->unk_210 = 0x3536;
|
||||
this->unk_2D2 |= 0x40;
|
||||
this->unk_43C = 1;
|
||||
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 1);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -380,7 +383,7 @@ void func_809C16DC(EnAob01* this, GlobalContext* globalCtx) {
|
||||
this->unk_210 = 0x3537;
|
||||
this->unk_2D2 |= 0x40;
|
||||
this->unk_43C = 1;
|
||||
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 1);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -483,7 +486,7 @@ void func_809C1EC8(EnAob01* this, GlobalContext* globalCtx) {
|
||||
Math_SmoothStepToS(&this->unk_2E0.y, 0, 4, 1000, 1);
|
||||
}
|
||||
func_809C10B0(this, 3);
|
||||
func_8013D9C8(globalCtx, this->unk_2F8, this->unk_318, 0x10);
|
||||
SubS_FillLimbRotTables(globalCtx, this->unk_2F8, this->unk_318, ARRAY_COUNT(this->unk_2F8));
|
||||
func_809C165C(this, globalCtx);
|
||||
if (player->stateFlags1 & 0x20) {
|
||||
func_809C1124();
|
||||
@@ -552,7 +555,7 @@ void func_809C21E0(EnAob01* this, GlobalContext* globalCtx) {
|
||||
this->unk_2D2 |= 0x10;
|
||||
this->unk_2D2 |= 0x40;
|
||||
this->unk_43C = 1;
|
||||
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 1);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 1);
|
||||
func_801518B0(globalCtx, 0x354B, &this->actor);
|
||||
}
|
||||
this->unk_2D2 &= ~8;
|
||||
@@ -731,7 +734,7 @@ void func_809C28B8(EnAob01* this, GlobalContext* globalCtx) {
|
||||
this->unk_210 = 0x352D;
|
||||
this->unk_2D2 |= 0x40;
|
||||
this->unk_43C = 1;
|
||||
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 1);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -927,7 +930,7 @@ void EnAob01_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
this->unk_43C = 0;
|
||||
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 0);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 0);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
|
||||
switch (gSaveContext.eventInf[0] & 7) {
|
||||
|
||||
@@ -59,7 +59,7 @@ static u16 sTextIds[] = { 0x2ABD, 0x2ABB, 0x2AD5, 0x2AD6, 0x2AD7, 0x2AD8, 0x2AC6
|
||||
|
||||
static AnimationHeader* D_80BE8E4C[] = { &object_bai_Anim_0011C0, &object_bai_Anim_0008B4, &object_bai_Anim_008198 };
|
||||
|
||||
static u8 animModes[] = { 0, 0 };
|
||||
static u8 animModes[] = { ANIMMODE_LOOP, ANIMMODE_LOOP };
|
||||
|
||||
void EnBaisen_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnBaisen* this = THIS;
|
||||
|
||||
@@ -64,11 +64,11 @@ static ColliderCylinderInit sCylinderInit = {
|
||||
};
|
||||
|
||||
/* Animations struct */
|
||||
static struct_80B8E1A8 D_809CDC7C[] = {
|
||||
{ &object_bji_Anim_000FDC, 1.0f, 0, 0.0f }, /* Looking through telescope */
|
||||
{ &object_bji_Anim_005B58, 1.0f, 0, 10.0f }, /* Breathing? Unused? */
|
||||
{ &object_bji_Anim_000AB0, 1.0f, 0, 0.0f }, /* Talking */
|
||||
{ &object_bji_Anim_00066C, 1.0f, 2, -5.0f }, /* Scratching chin? */
|
||||
static AnimationSpeedInfo D_809CDC7C[] = {
|
||||
{ &object_bji_Anim_000FDC, 1.0f, ANIMMODE_LOOP, 0.0f }, /* Looking through telescope */
|
||||
{ &object_bji_Anim_005B58, 1.0f, ANIMMODE_LOOP, 10.0f }, /* Breathing? Unused? */
|
||||
{ &object_bji_Anim_000AB0, 1.0f, ANIMMODE_LOOP, 0.0f }, /* Talking */
|
||||
{ &object_bji_Anim_00066C, 1.0f, ANIMMODE_ONCE, -5.0f }, /* Scratching chin? */
|
||||
};
|
||||
|
||||
void func_809CCDE0(EnBji01* this, GlobalContext* globalCtx) {
|
||||
@@ -84,7 +84,7 @@ void func_809CCDE0(EnBji01* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void func_809CCE98(EnBji01* this, GlobalContext* globalCtx) {
|
||||
func_8013E1C8(&this->skelAnime, D_809CDC7C, 0, &this->animationIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_809CDC7C, 0, &this->animationIndex);
|
||||
this->actor.textId = 0;
|
||||
this->actionFunc = func_809CCEE8;
|
||||
}
|
||||
@@ -193,7 +193,7 @@ void func_809CD028(EnBji01* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
func_8013E1C8(&this->skelAnime, D_809CDC7C, 2, &this->animationIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_809CDC7C, 2, &this->animationIndex);
|
||||
this->actionFunc = EnBji01_DialogueHandler;
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ void EnBji01_DialogueHandler(EnBji01* this, GlobalContext* globalCtx) {
|
||||
this->actor.flags &= ~0x10000;
|
||||
switch (globalCtx->msgCtx.unk11F04) {
|
||||
case 0x5DE:
|
||||
func_8013E1C8(&this->skelAnime, D_809CDC7C, 3, &this->animationIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_809CDC7C, 3, &this->animationIndex);
|
||||
func_80151938(globalCtx, 0x5DF);
|
||||
break;
|
||||
case 0x5E4:
|
||||
@@ -290,7 +290,7 @@ void EnBji01_DialogueHandler(EnBji01* this, GlobalContext* globalCtx) {
|
||||
break;
|
||||
}
|
||||
if ((this->animationIndex == 3) && (this->skelAnime.curFrame == this->skelAnime.endFrame)) {
|
||||
func_8013E1C8(&this->skelAnime, D_809CDC7C, 2, &this->animationIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_809CDC7C, 2, &this->animationIndex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ void EnBji01_DoNothing(EnBji01* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void func_809CD6C0(EnBji01* this, GlobalContext* globalCtx) {
|
||||
func_8013E1C8(&this->skelAnime, D_809CDC7C, 2, &this->animationIndex);
|
||||
SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_809CDC7C, 2, &this->animationIndex);
|
||||
this->actionFunc = func_809CD70C;
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,8 @@ void EnCne01_UpdateModel(EnCne01* this, GlobalContext* globalCtx) {
|
||||
Math_SmoothStepToS(&this->enHy.torsoRot.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->enHy.torsoRot.y, 0, 4, 0x3E8, 1);
|
||||
}
|
||||
func_8013D9C8(globalCtx, this->enHy.limbRotTableY, this->enHy.limbRotTableZ, ARRAY_COUNT(this->enHy.limbRotTableY));
|
||||
SubS_FillLimbRotTables(globalCtx, this->enHy.limbRotTableY, this->enHy.limbRotTableZ,
|
||||
ARRAY_COUNT(this->enHy.limbRotTableY));
|
||||
EnHy_UpdateCollider(&this->enHy, globalCtx);
|
||||
}
|
||||
|
||||
|
||||
@@ -130,16 +130,20 @@ s32 func_80B3E5B4(EnDai* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
s32 func_80B3E5DC(EnDai* this, s32 arg1) {
|
||||
static ActorAnimationEntryS D_80B3FBFC[] = {
|
||||
{ &object_dai_Anim_0079E4, 1.0f, 0, -1, 0, 0 }, { &object_dai_Anim_0079E4, 1.0f, 0, -1, 0, -4 },
|
||||
{ &object_dai_Anim_007354, 1.0f, 0, -1, 2, -4 }, { &object_dai_Anim_000CEC, 1.0f, 0, -1, 2, -4 },
|
||||
{ &object_dai_Anim_0069DC, 1.0f, 0, -1, 2, -4 }, { &object_dai_Anim_00563C, 1.0f, 0, -1, 2, 0 },
|
||||
{ &object_dai_Anim_00563C, 1.0f, 0, -1, 2, -4 }, { &object_dai_Anim_002E58, 1.0f, 0, -1, 0, -4 },
|
||||
{ &object_dai_Anim_006590, 1.0f, 0, -1, 2, -4 },
|
||||
static AnimationInfoS D_80B3FBFC[] = {
|
||||
{ &object_dai_Anim_0079E4, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dai_Anim_0079E4, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dai_Anim_007354, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dai_Anim_000CEC, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dai_Anim_0069DC, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dai_Anim_00563C, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dai_Anim_00563C, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dai_Anim_002E58, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dai_Anim_006590, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
};
|
||||
|
||||
s32 phi_v1 = false;
|
||||
s32 ret = 0;
|
||||
s32 ret = false;
|
||||
|
||||
switch (arg1) {
|
||||
case 0:
|
||||
@@ -165,7 +169,7 @@ s32 func_80B3E5DC(EnDai* this, s32 arg1) {
|
||||
|
||||
if (phi_v1) {
|
||||
this->unk_A70 = arg1;
|
||||
ret = func_8013BC6C(&this->skelAnime, D_80B3FBFC, arg1);
|
||||
ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80B3FBFC, arg1);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -129,33 +129,41 @@ static DamageTable sDamageTable = {
|
||||
/* Powder Keg */ DMG_ENTRY(0, 0x0),
|
||||
};
|
||||
|
||||
static ActorAnimationEntryS sAnimations[] = {
|
||||
{ &object_dog_Anim_0021C8, 1.0f, 0, -1, 0, 0 }, { &object_dog_Anim_0021C8, 1.0f, 0, -1, 0, -6 },
|
||||
{ &object_dog_Anim_001BD8, 1.0f, 0, -1, 0, 0 }, { &object_dog_Anim_000998, 1.0f, 0, -1, 0, -6 },
|
||||
{ &object_dog_Anim_001FB0, 1.0f, 0, -1, 2, -6 }, { &object_dog_Anim_001FB0, 1.0f, 0, -1, 4, -6 },
|
||||
{ &object_dog_Anim_001048, 1.0f, 0, -1, 2, -6 }, { &object_dog_Anim_001348, 1.0f, 0, -1, 0, -6 },
|
||||
{ &object_dog_Anim_001048, 1.0f, 0, 27, 2, -6 }, { &object_dog_Anim_001048, 1.0f, 28, -1, 2, -6 },
|
||||
{ &object_dog_Anim_001048, 1.0f, 54, 54, 2, -6 }, { &object_dog_Anim_0021C8, -1.5f, -1, 0, 0, -6 },
|
||||
{ &object_dog_Anim_001560, 1.0f, 0, -1, 2, 0 }, { &object_dog_Anim_001A84, 1.2f, 0, -1, 2, 0 },
|
||||
{ &object_dog_Anim_0017C0, 1.2f, 0, -1, 2, 0 }, { &object_dog_Anim_0021C8, 0.5f, 0, -1, 0, 0 },
|
||||
static AnimationInfoS sAnimations[] = {
|
||||
{ &object_dog_Anim_0021C8, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dog_Anim_0021C8, 1.0f, 0, -1, ANIMMODE_LOOP, -6 },
|
||||
{ &object_dog_Anim_001BD8, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dog_Anim_000998, 1.0f, 0, -1, ANIMMODE_LOOP, -6 },
|
||||
{ &object_dog_Anim_001FB0, 1.0f, 0, -1, ANIMMODE_ONCE, -6 },
|
||||
{ &object_dog_Anim_001FB0, 1.0f, 0, -1, ANIMMODE_LOOP_PARTIAL, -6 },
|
||||
{ &object_dog_Anim_001048, 1.0f, 0, -1, ANIMMODE_ONCE, -6 },
|
||||
{ &object_dog_Anim_001348, 1.0f, 0, -1, ANIMMODE_LOOP, -6 },
|
||||
{ &object_dog_Anim_001048, 1.0f, 0, 27, ANIMMODE_ONCE, -6 },
|
||||
{ &object_dog_Anim_001048, 1.0f, 28, -1, ANIMMODE_ONCE, -6 },
|
||||
{ &object_dog_Anim_001048, 1.0f, 54, 54, ANIMMODE_ONCE, -6 },
|
||||
{ &object_dog_Anim_0021C8, -1.5f, -1, 0, ANIMMODE_LOOP, -6 },
|
||||
{ &object_dog_Anim_001560, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dog_Anim_001A84, 1.2f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dog_Anim_0017C0, 1.2f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dog_Anim_0021C8, 0.5f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
};
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
void func_80989140(SkelAnime* skelAnime, ActorAnimationEntryS arg1[], s32 arg2) {
|
||||
void func_80989140(SkelAnime* skelAnime, AnimationInfoS arg1[], s32 arg2) {
|
||||
f32 frameCount;
|
||||
|
||||
arg1 += arg2;
|
||||
if (arg1->frameCount < 0) {
|
||||
frameCount = Animation_GetLastFrame(arg1->animationSeg);
|
||||
frameCount = Animation_GetLastFrame(arg1->animation);
|
||||
} else {
|
||||
frameCount = arg1->frameCount;
|
||||
}
|
||||
|
||||
Animation_Change(skelAnime, arg1->animationSeg, arg1->playbackSpeed + (BREG(88) * 0.1f), arg1->frame, frameCount,
|
||||
arg1->mode, arg1->transitionRate);
|
||||
Animation_Change(skelAnime, arg1->animation, arg1->playSpeed + (BREG(88) * 0.1f), arg1->startFrame, frameCount,
|
||||
arg1->mode, arg1->morphFrames);
|
||||
}
|
||||
|
||||
void func_80989204(EnDg* this, GlobalContext* globalCtx) {
|
||||
@@ -690,7 +698,7 @@ void func_8098A938(EnDg* this, GlobalContext* globalCtx) {
|
||||
this->actionFunc = func_8098AC34;
|
||||
} else {
|
||||
func_80989140(&this->skelAnime, sAnimations, 11);
|
||||
sAnimations[11].playbackSpeed = -1.0f;
|
||||
sAnimations[11].playSpeed = -1.0f;
|
||||
this->actionFunc = func_8098B198;
|
||||
}
|
||||
}
|
||||
@@ -765,7 +773,7 @@ void func_8098AC34(EnDg* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (sp26 < 9) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 0.0f)) {
|
||||
sAnimations[14].playbackSpeed = randPlusMinusPoint5Scaled(1.0f) + 3.0f;
|
||||
sAnimations[14].playSpeed = randPlusMinusPoint5Scaled(1.0f) + 3.0f;
|
||||
}
|
||||
func_80989864(this, globalCtx);
|
||||
} else {
|
||||
@@ -773,7 +781,7 @@ void func_8098AC34(EnDg* this, GlobalContext* globalCtx) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 9.0f)) {
|
||||
f32 rand = randPlusMinusPoint5Scaled(1.5f);
|
||||
|
||||
sAnimations[14].playbackSpeed = 1.2f;
|
||||
sAnimations[14].playSpeed = 1.2f;
|
||||
this->actor.velocity.y = 2.0f * rand + 3.0f;
|
||||
this->actor.speedXZ = 8.0f + rand;
|
||||
} else if (sp26 >= 0x15) {
|
||||
|
||||
@@ -93,25 +93,43 @@ static DamageTable sDamageTable = {
|
||||
/* Powder Keg */ DMG_ENTRY(1, 0x0),
|
||||
};
|
||||
|
||||
static ActorAnimationEntryS sAnimations[] = {
|
||||
{ &object_dnk_Anim_000B70, 1.0f, 0, -1, 2, 0 }, { &object_dnk_Anim_000B70, 1.0f, 0, -1, 2, -4 },
|
||||
{ &object_dnk_Anim_002A08, 1.0f, 0, -1, 0, -4 }, { &object_dnk_Anim_00031C, 1.0f, 0, -1, 0, -4 },
|
||||
{ &object_dnk_Anim_000430, 1.0f, -1, -1, 2, 0 }, { &object_dnk_Anim_000430, 1.0f, 0, -1, 2, -4 },
|
||||
{ &object_dnk_Anim_000894, 1.0f, 0, -1, 2, -4 }, { &object_dnk_Anim_002B6C, 1.0f, 0, -1, 0, 0 },
|
||||
{ &object_dnk_Anim_002B6C, 1.0f, 0, -1, 0, -4 }, { &object_dnk_Anim_0006CC, 1.0f, 0, -1, 0, -4 },
|
||||
{ &object_hintnuts_Anim_000168, 1.0f, 0, -1, 2, -4 }, { &object_hintnuts_Anim_0024CC, 1.0f, -1, -1, 2, 0 },
|
||||
{ &object_hintnuts_Anim_0024CC, 1.0f, 0, -1, 2, -4 }, { &object_hintnuts_Anim_0026C4, 1.0f, 0, -1, 2, -4 },
|
||||
{ &object_hintnuts_Anim_002894, 1.0f, 0, -1, 2, -4 }, { &object_hintnuts_Anim_002B90, 1.0f, 0, -1, 2, -4 },
|
||||
{ &object_hintnuts_Anim_002F7C, 1.0f, 0, -1, 0, 0 }, { &object_hintnuts_Anim_002F7C, 1.0f, 0, -1, 0, -4 },
|
||||
{ &object_hintnuts_Anim_003128, 1.0f, 0, -1, 0, 0 }, { &object_hintnuts_Anim_003128, 1.0f, 0, -1, 0, -4 },
|
||||
{ &object_hintnuts_Anim_0029BC, 1.0f, 0, -1, 0, -4 }, { &object_hintnuts_Anim_002E84, 1.0f, 0, -1, 0, -4 },
|
||||
{ &object_dekunuts_Anim_000168, 1.0f, 0, -1, 0, -4 }, { &object_dekunuts_Anim_00259C, 1.0f, 0, -1, 2, -4 },
|
||||
{ &object_dekunuts_Anim_002A5C, 1.0f, 0, -1, 2, 0 }, { &object_dekunuts_Anim_002A5C, 1.0f, 0, -1, 2, -4 },
|
||||
{ &object_dekunuts_Anim_002BD4, 1.0f, 0, -1, 2, -4 }, { &object_dekunuts_Anim_002DD4, 1.0f, 0, -1, 2, -4 },
|
||||
{ &object_dekunuts_Anim_002FA4, 1.0f, 0, -1, 0, -4 }, { &object_dekunuts_Anim_003180, 1.0f, 0, -1, 2, -4 },
|
||||
{ &object_dekunuts_Anim_00326C, 1.0f, 0, -1, 0, 0 }, { &object_dekunuts_Anim_00326C, 1.0f, 0, -1, 0, -4 },
|
||||
{ &object_dekunuts_Anim_0033E4, 1.0f, 0, -1, 0, -4 }, { &object_dekunuts_Anim_003780, 1.0f, 0, -1, 0, 0 },
|
||||
{ &object_dekunuts_Anim_003780, 1.0f, 0, -1, 0, -4 }, { &object_dekunuts_Anim_002950, 1.0f, 0, -1, 0, 0 },
|
||||
static AnimationInfoS sAnimations[] = {
|
||||
{ &object_dnk_Anim_000B70, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnk_Anim_000B70, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnk_Anim_002A08, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnk_Anim_00031C, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnk_Anim_000430, 1.0f, -1, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dnk_Anim_000430, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnk_Anim_000894, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dnk_Anim_002B6C, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dnk_Anim_002B6C, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dnk_Anim_0006CC, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_hintnuts_Anim_000168, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_hintnuts_Anim_0024CC, 1.0f, -1, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_hintnuts_Anim_0024CC, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_hintnuts_Anim_0026C4, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_hintnuts_Anim_002894, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_hintnuts_Anim_002B90, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_hintnuts_Anim_002F7C, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_hintnuts_Anim_002F7C, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_hintnuts_Anim_003128, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_hintnuts_Anim_003128, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_hintnuts_Anim_0029BC, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_hintnuts_Anim_002E84, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dekunuts_Anim_000168, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dekunuts_Anim_00259C, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dekunuts_Anim_002A5C, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_dekunuts_Anim_002A5C, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dekunuts_Anim_002BD4, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dekunuts_Anim_002DD4, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dekunuts_Anim_002FA4, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dekunuts_Anim_003180, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_dekunuts_Anim_00326C, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dekunuts_Anim_00326C, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dekunuts_Anim_0033E4, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dekunuts_Anim_003780, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_dekunuts_Anim_003780, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_dekunuts_Anim_002950, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
};
|
||||
|
||||
s32 func_80A514F0(SkelAnime* skelAnime, s16 animIndex) {
|
||||
@@ -124,14 +142,14 @@ s32 func_80A514F0(SkelAnime* skelAnime, s16 animIndex) {
|
||||
sp30 = true;
|
||||
frameCount = sAnimations[animIndex].frameCount;
|
||||
if (frameCount < 0) {
|
||||
frameCount = Animation_GetLastFrame(sAnimations[animIndex].animationSeg);
|
||||
frameCount = Animation_GetLastFrame(sAnimations[animIndex].animation);
|
||||
}
|
||||
frame = sAnimations[animIndex].frame;
|
||||
frame = sAnimations[animIndex].startFrame;
|
||||
if (frame < 0) {
|
||||
frame = frameCount;
|
||||
}
|
||||
Animation_Change(skelAnime, sAnimations[animIndex].animationSeg, sAnimations[animIndex].playbackSpeed,
|
||||
frame, frameCount, sAnimations[animIndex].mode, sAnimations[animIndex].transitionRate);
|
||||
Animation_Change(skelAnime, sAnimations[animIndex].animation, sAnimations[animIndex].playSpeed, frame,
|
||||
frameCount, sAnimations[animIndex].mode, sAnimations[animIndex].morphFrames);
|
||||
}
|
||||
}
|
||||
return sp30;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user