mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Make names related to animations more consistent (#998)
* Make names related to animations more consistent * Standardize on sAnimationInfo * Respond to hensldm's review * Standardize on ChangeAnim * Respond to hensldm's review * Small formatting thing * Consistency after merging master * A few more things I missed * Respond to Elliptic's review * Some more stuff that was requested
This commit is contained in:
@@ -110,7 +110,7 @@ After naming the animations, the end result will look something like this:
|
||||
Once again, we can run `./extract_assets.py -s objects/object_dns` to extract the object, and we can update the animation names in `z_en_dns.c` to use our new names like so:
|
||||
|
||||
```c
|
||||
static AnimationInfoS sAnimations[] = {
|
||||
static AnimationInfoS sAnimationInfo[] = {
|
||||
{ &gKingsChamberDekuGuardIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gKingsChamberDekuGuardIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gKingsChamberDekuGuardWalkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
|
||||
+2
-2
@@ -757,7 +757,7 @@ s32 func_800BD2B4(PlayState* play, Actor* actor, s16* arg2, f32 arg3, u16 (*text
|
||||
void func_800BD888(Actor* actor, struct_800BD888_arg1* arg1, s16 arg2, s16 arg3);
|
||||
void func_800BD9E0(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s16 alpha);
|
||||
void func_800BDAA0(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s16 alpha);
|
||||
void Actor_ChangeAnimationByInfo(SkelAnime* skelAnime, AnimationInfo* animation, s32 index);
|
||||
void Actor_ChangeAnimationByInfo(SkelAnime* skelAnime, AnimationInfo* animationInfo, s32 animIndex);
|
||||
void Actor_Noop(Actor* actor, PlayState* play);
|
||||
|
||||
void Gfx_DrawDListOpa(PlayState* play, Gfx* dlist);
|
||||
@@ -2219,7 +2219,7 @@ s16 SkelAnime_GetFrameDataLegacy(LegacyAnimationHeader* animation, s32 frame, Ve
|
||||
s16 Animation_GetLimbCount2(LegacyAnimationHeader* animation);
|
||||
s16 Animation_GetLength2(LegacyAnimationHeader* animation);
|
||||
s16 Animation_GetLastFrame2(LegacyAnimationHeader* animation);
|
||||
void SkelAnime_InterpFrameTable(s32 limbCount, Vec3s* dst, Vec3s* vec2, Vec3s* vec3, f32 unkf);
|
||||
void SkelAnime_InterpFrameTable(s32 limbCount, Vec3s* dst, Vec3s* start, Vec3s* target, f32 weight);
|
||||
void AnimationContext_Reset(AnimationContext* animationCtx);
|
||||
void AnimationContext_SetNextQueue(PlayState* play);
|
||||
void AnimationContext_DisableQueue(PlayState* play);
|
||||
|
||||
+2
-2
@@ -104,7 +104,7 @@ Path* SubS_GetAdditionalPath(struct PlayState* play, u8 pathIndex, s32 max);
|
||||
|
||||
Actor* SubS_FindNearestActor(Actor* actor, struct PlayState* play, u8 actorCategory, s16 actorId);
|
||||
|
||||
s32 SubS_ChangeAnimationByInfoS(SkelAnime* skelAnime, AnimationInfoS* animations, s32 index);
|
||||
s32 SubS_ChangeAnimationByInfoS(SkelAnime* skelAnime, AnimationInfoS* animationInfo, s32 animIndex);
|
||||
|
||||
s32 SubS_HasReachedPoint(Actor* actor, Path* path, s32 pointIndex);
|
||||
|
||||
@@ -151,7 +151,7 @@ s32 SubS_ActorPathing_MoveWithGravity(struct PlayState* play, ActorPathing* acto
|
||||
s32 SubS_ActorPathing_MoveWithoutGravityReverse(struct PlayState* play, ActorPathing* actorPath);
|
||||
s32 SubS_ActorPathing_SetNextPoint(struct PlayState* play, ActorPathing* actorPath);
|
||||
|
||||
void SubS_ChangeAnimationBySpeedInfo(SkelAnime* skelAnime, AnimationSpeedInfo* animations, s32 nextIndex, s32* curIndex);
|
||||
void SubS_ChangeAnimationBySpeedInfo(SkelAnime* skelAnime, AnimationSpeedInfo* animationInfo, s32 nextAnimIndex, s32* curAnimIndex);
|
||||
|
||||
s32 SubS_StartActorCutscene(Actor* actor, s16 nextCutscene, s16 curCutscene, s32 type);
|
||||
s32 SubS_FillCutscenesList(Actor* actor, s16 cutscenes[], s16 numCutscenes);
|
||||
|
||||
+22
-22
@@ -10,28 +10,28 @@ struct EnHy;
|
||||
|
||||
//! TODO: Better animaion enum names when animations are documented
|
||||
typedef enum {
|
||||
/* 0 */ ENHY_ANIMATION_AOB_0,
|
||||
/* 1 */ ENHY_ANIMATION_BOJ_1,
|
||||
/* 2 */ ENHY_ANIMATION_BOJ_2,
|
||||
/* 3 */ ENHY_ANIMATION_BOJ_3,
|
||||
/* 4 */ ENHY_ANIMATION_BOJ_4,
|
||||
/* 5 */ ENHY_ANIMATION_BOJ_5,
|
||||
/* 6 */ ENHY_ANIMATION_BBA_6,
|
||||
/* 7 */ ENHY_ANIMATION_BJI_7,
|
||||
/* 8 */ ENHY_ANIMATION_BJI_8,
|
||||
/* 9 */ ENHY_ANIMATION_BJI_9,
|
||||
/* 10 */ ENHY_ANIMATION_BOJ_10,
|
||||
/* 11 */ ENHY_ANIMATION_OS_ANIME_11,
|
||||
/* 12 */ ENHY_ANIMATION_BOJ_12,
|
||||
/* 13 */ ENHY_ANIMATION_BOJ_13,
|
||||
/* 14 */ ENHY_ANIMATION_BOJ_14,
|
||||
/* 15 */ ENHY_ANIMATION_BOJ_15,
|
||||
/* 16 */ ENHY_ANIMATION_BOJ_16,
|
||||
/* 17 */ ENHY_ANIMATION_BOJ_17,
|
||||
/* 18 */ ENHY_ANIMATION_BOJ_18,
|
||||
/* 19 */ ENHY_ANIMATION_BOJ_19,
|
||||
/* 20 */ ENHY_ANIMATION_BOJ_20,
|
||||
/* 21 */ ENHY_ANIMATION_MAX
|
||||
/* 0 */ ENHY_ANIM_AOB_0,
|
||||
/* 1 */ ENHY_ANIM_BOJ_1,
|
||||
/* 2 */ ENHY_ANIM_BOJ_2,
|
||||
/* 3 */ ENHY_ANIM_BOJ_3,
|
||||
/* 4 */ ENHY_ANIM_BOJ_4,
|
||||
/* 5 */ ENHY_ANIM_BOJ_5,
|
||||
/* 6 */ ENHY_ANIM_BBA_6,
|
||||
/* 7 */ ENHY_ANIM_BJI_7,
|
||||
/* 8 */ ENHY_ANIM_BJI_8,
|
||||
/* 9 */ ENHY_ANIM_BJI_9,
|
||||
/* 10 */ ENHY_ANIM_BOJ_10,
|
||||
/* 11 */ ENHY_ANIM_OS_ANIME_11,
|
||||
/* 12 */ ENHY_ANIM_BOJ_12,
|
||||
/* 13 */ ENHY_ANIM_BOJ_13,
|
||||
/* 14 */ ENHY_ANIM_BOJ_14,
|
||||
/* 15 */ ENHY_ANIM_BOJ_15,
|
||||
/* 16 */ ENHY_ANIM_BOJ_16,
|
||||
/* 17 */ ENHY_ANIM_BOJ_17,
|
||||
/* 18 */ ENHY_ANIM_BOJ_18,
|
||||
/* 19 */ ENHY_ANIM_BOJ_19,
|
||||
/* 20 */ ENHY_ANIM_BOJ_20,
|
||||
/* 21 */ ENHY_ANIM_MAX
|
||||
} EnHyAnimation;
|
||||
|
||||
typedef void (*EnHyActionFunc)(struct EnHy*, PlayState*);
|
||||
|
||||
+7
-7
@@ -4293,18 +4293,18 @@ s16 func_800BDB6C(Actor* actor, PlayState* play, s16 arg2, f32 arg3) {
|
||||
return arg2;
|
||||
}
|
||||
|
||||
void Actor_ChangeAnimationByInfo(SkelAnime* skelAnime, AnimationInfo* animation, s32 index) {
|
||||
void Actor_ChangeAnimationByInfo(SkelAnime* skelAnime, AnimationInfo* animationInfo, s32 animIndex) {
|
||||
f32 frameCount;
|
||||
|
||||
animation += index;
|
||||
if (animation->frameCount > 0.0f) {
|
||||
frameCount = animation->frameCount;
|
||||
animationInfo += animIndex;
|
||||
if (animationInfo->frameCount > 0.0f) {
|
||||
frameCount = animationInfo->frameCount;
|
||||
} else {
|
||||
frameCount = Animation_GetLastFrame(&animation->animation->common);
|
||||
frameCount = Animation_GetLastFrame(&animationInfo->animation->common);
|
||||
}
|
||||
|
||||
Animation_Change(skelAnime, animation->animation, animation->playSpeed, animation->startFrame, frameCount,
|
||||
animation->mode, animation->morphFrames);
|
||||
Animation_Change(skelAnime, animationInfo->animation, animationInfo->playSpeed, animationInfo->startFrame,
|
||||
frameCount, animationInfo->mode, animationInfo->morphFrames);
|
||||
}
|
||||
|
||||
// Unused
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "objects/object_boj/object_boj.h"
|
||||
#include "objects/object_os_anime/object_os_anime.h"
|
||||
|
||||
static AnimationInfoS sAnimations[] = {
|
||||
static AnimationInfoS sAnimationInfo[] = {
|
||||
{ &gMamamuYanUnusedIdleAnim, 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 },
|
||||
@@ -45,15 +45,15 @@ s32 EnHy_ChangeAnim(SkelAnime* skelAnime, s16 animIndex) {
|
||||
s16 frameCount;
|
||||
s32 isChanged = false;
|
||||
|
||||
if (animIndex >= ENHY_ANIMATION_AOB_0 && animIndex < ENHY_ANIMATION_MAX) {
|
||||
if (animIndex >= ENHY_ANIM_AOB_0 && animIndex < ENHY_ANIM_MAX) {
|
||||
isChanged = true;
|
||||
frameCount = sAnimations[animIndex].frameCount;
|
||||
frameCount = sAnimationInfo[animIndex].frameCount;
|
||||
if (frameCount < 0) {
|
||||
frameCount = Animation_GetLastFrame(&sAnimations[animIndex].animation->common);
|
||||
frameCount = Animation_GetLastFrame(&sAnimationInfo[animIndex].animation->common);
|
||||
}
|
||||
Animation_Change(skelAnime, sAnimations[animIndex].animation, sAnimations[animIndex].playSpeed,
|
||||
sAnimations[animIndex].startFrame, frameCount, sAnimations[animIndex].mode,
|
||||
sAnimations[animIndex].morphFrames);
|
||||
Animation_Change(skelAnime, sAnimationInfo[animIndex].animation, sAnimationInfo[animIndex].playSpeed,
|
||||
sAnimationInfo[animIndex].startFrame, frameCount, sAnimationInfo[animIndex].mode,
|
||||
sAnimationInfo[animIndex].morphFrames);
|
||||
}
|
||||
return isChanged;
|
||||
}
|
||||
|
||||
+10
-10
@@ -924,30 +924,30 @@ s16 Animation_GetLastFrame2(LegacyAnimationHeader* animation) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Linearly interpolates the start and tactoret frame tables with the given weight, putting the result in dst
|
||||
* Linearly interpolates the start and target frame tables with the given weight, putting the result in dst
|
||||
*/
|
||||
void SkelAnime_InterpFrameTable(s32 limbCount, Vec3s* dst, Vec3s* start, Vec3s* tactoret, f32 weight) {
|
||||
void SkelAnime_InterpFrameTable(s32 limbCount, Vec3s* dst, Vec3s* start, Vec3s* target, f32 weight) {
|
||||
s32 i;
|
||||
s16 diff;
|
||||
s16 base;
|
||||
|
||||
if (weight < 1.0f) {
|
||||
for (i = 0; i < limbCount; i++, dst++, start++, tactoret++) {
|
||||
for (i = 0; i < limbCount; i++, dst++, start++, target++) {
|
||||
base = start->x;
|
||||
diff = tactoret->x - base;
|
||||
diff = target->x - base;
|
||||
dst->x = (s16)(diff * weight) + base;
|
||||
base = start->y;
|
||||
diff = tactoret->y - base;
|
||||
diff = target->y - base;
|
||||
dst->y = (s16)(diff * weight) + base;
|
||||
base = start->z;
|
||||
diff = tactoret->z - base;
|
||||
diff = target->z - base;
|
||||
dst->z = (s16)(diff * weight) + base;
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < limbCount; i++, dst++, tactoret++) {
|
||||
dst->x = tactoret->x;
|
||||
dst->y = tactoret->y;
|
||||
dst->z = tactoret->z;
|
||||
for (i = 0; i < limbCount; i++, dst++, target++) {
|
||||
dst->x = target->x;
|
||||
dst->y = target->y;
|
||||
dst->z = target->z;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+16
-16
@@ -531,24 +531,24 @@ Actor* SubS_FindNearestActor(Actor* actor, PlayState* play, u8 actorCategory, s1
|
||||
return closestActor;
|
||||
}
|
||||
|
||||
s32 SubS_ChangeAnimationByInfoS(SkelAnime* skelAnime, AnimationInfoS* animations, s32 index) {
|
||||
s32 SubS_ChangeAnimationByInfoS(SkelAnime* skelAnime, AnimationInfoS* animationInfo, s32 animIndex) {
|
||||
s32 endFrame;
|
||||
s32 startFrame;
|
||||
|
||||
animations += index;
|
||||
endFrame = animations->frameCount;
|
||||
if (animations->frameCount < 0) {
|
||||
endFrame = Animation_GetLastFrame(&animations->animation->common);
|
||||
animationInfo += animIndex;
|
||||
endFrame = animationInfo->frameCount;
|
||||
if (animationInfo->frameCount < 0) {
|
||||
endFrame = Animation_GetLastFrame(&animationInfo->animation->common);
|
||||
}
|
||||
startFrame = animations->startFrame;
|
||||
startFrame = animationInfo->startFrame;
|
||||
if (startFrame >= endFrame || startFrame < 0) {
|
||||
return false;
|
||||
}
|
||||
if (animations->playSpeed < 0.0f) {
|
||||
if (animationInfo->playSpeed < 0.0f) {
|
||||
SWAP(s32, endFrame, startFrame);
|
||||
}
|
||||
Animation_Change(skelAnime, animations->animation, animations->playSpeed, startFrame, endFrame, animations->mode,
|
||||
animations->morphFrames);
|
||||
Animation_Change(skelAnime, animationInfo->animation, animationInfo->playSpeed, startFrame, endFrame,
|
||||
animationInfo->mode, animationInfo->morphFrames);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1357,21 +1357,21 @@ s32 SubS_ActorPathing_SetNextPoint(PlayState* play, ActorPathing* actorPath) {
|
||||
return reupdate;
|
||||
}
|
||||
|
||||
void SubS_ChangeAnimationBySpeedInfo(SkelAnime* skelAnime, AnimationSpeedInfo* animations, s32 nextIndex,
|
||||
s32* curIndex) {
|
||||
AnimationSpeedInfo* animation = &animations[nextIndex];
|
||||
void SubS_ChangeAnimationBySpeedInfo(SkelAnime* skelAnime, AnimationSpeedInfo* animationInfo, s32 nextAnimIndex,
|
||||
s32* curAnimIndex) {
|
||||
AnimationSpeedInfo* animation = &animationInfo[nextAnimIndex];
|
||||
f32 startFrame = skelAnime->curFrame;
|
||||
f32 endFrame;
|
||||
f32 morphFrames;
|
||||
|
||||
if ((*curIndex < 0) || (nextIndex == *curIndex)) {
|
||||
if ((*curAnimIndex < 0) || (nextAnimIndex == *curAnimIndex)) {
|
||||
morphFrames = 0.0f;
|
||||
if (*curIndex < 0) {
|
||||
if (*curAnimIndex < 0) {
|
||||
startFrame = 0.0f;
|
||||
}
|
||||
} else {
|
||||
morphFrames = animation->morphFrames;
|
||||
if (nextIndex != *curIndex) {
|
||||
if (nextAnimIndex != *curAnimIndex) {
|
||||
startFrame = 0.0f;
|
||||
}
|
||||
}
|
||||
@@ -1383,7 +1383,7 @@ void SubS_ChangeAnimationBySpeedInfo(SkelAnime* skelAnime, AnimationSpeedInfo* a
|
||||
}
|
||||
Animation_Change(skelAnime, animation->animation, animation->playSpeed, startFrame, endFrame, animation->mode,
|
||||
morphFrames);
|
||||
*curIndex = nextIndex;
|
||||
*curAnimIndex = nextAnimIndex;
|
||||
}
|
||||
|
||||
s32 SubS_StartActorCutscene(Actor* actor, s16 nextCutscene, s16 curCutscene, s32 type) {
|
||||
|
||||
@@ -27,16 +27,21 @@ const ActorInit Dm_Al_InitVars = {
|
||||
(ActorFunc)DmAl_Draw,
|
||||
};
|
||||
|
||||
static AnimationInfoS sAnimationInfos[] = {
|
||||
typedef enum {
|
||||
/* 0 */ MADAME_AROMA_ANIM_0,
|
||||
/* 1 */ MADAME_AROMA_ANIM_1
|
||||
} DmAlAnimation;
|
||||
|
||||
static AnimationInfoS sAnimationInfo[] = {
|
||||
{ &object_al_Anim_00DBE0, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
};
|
||||
|
||||
s32 DmAl_ChangeAnimation(DmAl* this, s32 animationIndex) {
|
||||
s32 DmAl_ChangeAnim(DmAl* this, s32 animIndex) {
|
||||
s32 didAnimationChange = false;
|
||||
|
||||
if (animationIndex != this->animationIndex) {
|
||||
this->animationIndex = animationIndex;
|
||||
didAnimationChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfos, animationIndex);
|
||||
if (animIndex != this->animIndex) {
|
||||
this->animIndex = animIndex;
|
||||
didAnimationChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
}
|
||||
return didAnimationChange;
|
||||
}
|
||||
@@ -50,20 +55,20 @@ void func_80C1BDD8(DmAl* this, PlayState* play) {
|
||||
if (!this->unk_45C) {
|
||||
this->action = 0xFF;
|
||||
this->unk_45C = true;
|
||||
this->animationIndex2 = this->animationIndex;
|
||||
this->animIndex2 = this->animIndex;
|
||||
}
|
||||
if (Cutscene_CheckActorAction(play, 0x232)) {
|
||||
actionIndex = Cutscene_GetActorActionIndex(play, 0x232);
|
||||
csAction = play->csCtx.actorActions[actionIndex]->action;
|
||||
if (this->action != (u8)csAction) {
|
||||
this->action = csAction;
|
||||
DmAl_ChangeAnimation(this, D_80C1C280[csAction]);
|
||||
DmAl_ChangeAnim(this, D_80C1C280[csAction]);
|
||||
}
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, actionIndex);
|
||||
}
|
||||
} else if (this->unk_45C) {
|
||||
this->unk_45C = false;
|
||||
DmAl_ChangeAnimation(this, this->animationIndex2);
|
||||
DmAl_ChangeAnim(this, this->animIndex2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,8 +78,8 @@ void DmAl_Init(Actor* thisx, PlayState* play) {
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gMadameAromaSkel, NULL, this->jointTable, this->morphTable,
|
||||
MADAME_AROMA_LIMB_MAX);
|
||||
this->animationIndex = -1;
|
||||
DmAl_ChangeAnimation(this, MADAME_AROMA_ANIMATION_0);
|
||||
this->animIndex = -1;
|
||||
DmAl_ChangeAnim(this, MADAME_AROMA_ANIM_0);
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->actionFunc = func_80C1BDD8;
|
||||
|
||||
@@ -16,16 +16,11 @@ typedef struct DmAl {
|
||||
/* 0x30C */ Vec3s jointTable[MADAME_AROMA_LIMB_MAX];
|
||||
/* 0x3AE */ Vec3s morphTable[MADAME_AROMA_LIMB_MAX];
|
||||
/* 0x450 */ u8 action;
|
||||
/* 0x454 */ s32 animationIndex;
|
||||
/* 0x458 */ s32 animationIndex2;
|
||||
/* 0x454 */ s32 animIndex;
|
||||
/* 0x458 */ s32 animIndex2;
|
||||
/* 0x45C */ s32 unk_45C;
|
||||
} DmAl; // size = 0x460
|
||||
|
||||
typedef enum {
|
||||
/* 0x0 */ MADAME_AROMA_ANIMATION_0,
|
||||
/* 0x1 */ MADAME_AROMA_ANIMATION_1
|
||||
} DmAlAnimations;
|
||||
|
||||
extern const ActorInit Dm_Al_InitVars;
|
||||
|
||||
#endif // Z_DM_AL_H
|
||||
|
||||
@@ -33,7 +33,7 @@ const ActorInit Dm_An_InitVars = {
|
||||
(ActorFunc)NULL,
|
||||
};
|
||||
|
||||
static AnimationInfoS sAnimations[] = {
|
||||
static AnimationInfoS sAnimationInfo[] = {
|
||||
{ &object_an1_Anim_007E08, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_an1_Anim_0071E8, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_an4_Anim_006CC0, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
@@ -83,7 +83,7 @@ s32 func_80C1C4D8(DmAn* this, PlayState* play, s32 arg2) {
|
||||
if ((objectIndex2 >= 0) && (arg2 != this->unk_2C8)) {
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[objectIndex2].segment);
|
||||
this->unk_2C8 = arg2;
|
||||
ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, arg2);
|
||||
ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg2);
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[objectIndex].segment);
|
||||
}
|
||||
return ret;
|
||||
|
||||
@@ -30,7 +30,7 @@ const ActorInit Dm_Bal_InitVars = {
|
||||
(ActorFunc)DmBal_Draw,
|
||||
};
|
||||
|
||||
static AnimationInfo D_80C1F170[] = {
|
||||
static AnimationInfo sAnimationInfo[] = {
|
||||
{ &object_bal_Anim_0005FC, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f },
|
||||
{ &object_bal_Anim_000840, 1.5f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f },
|
||||
{ &object_bal_Anim_000840, 1.5f, 0.0f, 0.0f, ANIMMODE_ONCE, -4.0f },
|
||||
@@ -86,14 +86,14 @@ void func_80C1EAE8(DmBal* this, PlayState* play) {
|
||||
case 1:
|
||||
this->unk_336 = 0;
|
||||
this->eyeIndex = 0;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_80C1F170, 0);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0);
|
||||
break;
|
||||
case 2:
|
||||
this->unk_336 = 1;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_80C1F170, 12);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 12);
|
||||
break;
|
||||
case 3:
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, D_80C1F170, 13);
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 13);
|
||||
break;
|
||||
}
|
||||
} else if (D_80C1F2C0 == 3) {
|
||||
|
||||
@@ -32,7 +32,7 @@ const ActorInit Dm_Char00_InitVars = {
|
||||
(ActorFunc)DmChar00_Draw,
|
||||
};
|
||||
|
||||
static AnimationInfo sAnimations[] = {
|
||||
static AnimationInfo sAnimationInfo[] = {
|
||||
{ &gameplay_keep_Anim_02B2E8, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &gameplay_keep_Anim_029140, 1.0f, 0.0f, -1.0f, 0, 0.0f },
|
||||
{ &object_delf_Anim_004FF4, 1.0f, 0.0f, -1.0f, 2, 0.0f },
|
||||
@@ -542,7 +542,7 @@ void DmChar00_Init(Actor* thisx, PlayState* play) {
|
||||
SkelAnime_Init(play, &this->skelAnime, &gameplay_keep_Skel_02AF58.sh, &gameplay_keep_Anim_029140, this->jointTable,
|
||||
this->morphTable, 7);
|
||||
ActorShape_Init(&thisx->shape, 0.0f, NULL, 15.0f);
|
||||
func_80AA5580(&this->skelAnime, sAnimations, 0);
|
||||
func_80AA5580(&this->skelAnime, sAnimationInfo, 0);
|
||||
Actor_SetScale(thisx, 0.01f);
|
||||
this->actionFunc = func_80AA67F8;
|
||||
}
|
||||
@@ -783,7 +783,7 @@ void func_80AA62FC(DmChar00* this, PlayState* play) {
|
||||
this->unk_261 = 0;
|
||||
break;
|
||||
}
|
||||
func_80AA5580(&this->skelAnime, &sAnimations[this->unk_261], 0);
|
||||
func_80AA5580(&this->skelAnime, &sAnimationInfo[this->unk_261], 0);
|
||||
}
|
||||
}
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, temp_v0);
|
||||
@@ -796,7 +796,7 @@ void func_80AA62FC(DmChar00* this, PlayState* play) {
|
||||
case 0x4:
|
||||
case 0x5:
|
||||
this->unk_261 += 4;
|
||||
func_80AA5580(&this->skelAnime, &sAnimations[this->unk_261], 0);
|
||||
func_80AA5580(&this->skelAnime, &sAnimationInfo[this->unk_261], 0);
|
||||
this->skelAnime.curFrame = 37.0f;
|
||||
break;
|
||||
|
||||
@@ -805,7 +805,7 @@ void func_80AA62FC(DmChar00* this, PlayState* play) {
|
||||
case 0x14:
|
||||
case 0x15:
|
||||
this->unk_261 += 2;
|
||||
func_80AA5580(&this->skelAnime, &sAnimations[this->unk_261], 0);
|
||||
func_80AA5580(&this->skelAnime, &sAnimationInfo[this->unk_261], 0);
|
||||
break;
|
||||
|
||||
case 0xA:
|
||||
@@ -833,18 +833,18 @@ void func_80AA62FC(DmChar00* this, PlayState* play) {
|
||||
case 0x50:
|
||||
case 0x53:
|
||||
this->unk_261 += 1;
|
||||
func_80AA5580(&this->skelAnime, &sAnimations[this->unk_261], 0);
|
||||
func_80AA5580(&this->skelAnime, &sAnimationInfo[this->unk_261], 0);
|
||||
break;
|
||||
|
||||
case 0x2D:
|
||||
this->unk_261 = 19;
|
||||
func_80AA5580(&this->skelAnime, &sAnimations[this->unk_261], 0);
|
||||
func_80AA5580(&this->skelAnime, &sAnimationInfo[this->unk_261], 0);
|
||||
break;
|
||||
|
||||
case 0x46:
|
||||
case 0x4D:
|
||||
this->unk_261 = 0;
|
||||
func_80AA5580(&this->skelAnime, &sAnimations[this->unk_261], 0);
|
||||
func_80AA5580(&this->skelAnime, &sAnimationInfo[this->unk_261], 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -856,7 +856,7 @@ void func_80AA67F8(DmChar00* this, PlayState* play) {
|
||||
if ((play->csCtx.state == 0) && (gSaveContext.sceneSetupIndex == 0) && (play->csCtx.currentCsIndex == 1)) {
|
||||
if (this->unk_261 != 42) {
|
||||
this->unk_261 = 42;
|
||||
func_80AA5580(&this->skelAnime, &sAnimations[this->unk_261], 0);
|
||||
func_80AA5580(&this->skelAnime, &sAnimationInfo[this->unk_261], 0);
|
||||
}
|
||||
|
||||
Math_SmoothStepToF(&this->actor.world.pos.x, 0.0f, 0.5f, 0.5f, 0.001f);
|
||||
@@ -865,7 +865,7 @@ void func_80AA67F8(DmChar00* this, PlayState* play) {
|
||||
|
||||
if (player->actor.world.pos.z < -625.0f) {
|
||||
this->unk_261 = 43;
|
||||
func_80AA5580(&this->skelAnime, &sAnimations[this->unk_261], 0);
|
||||
func_80AA5580(&this->skelAnime, &sAnimationInfo[this->unk_261], 0);
|
||||
this->actionFunc = func_80AA695C;
|
||||
this->skelAnime.playSpeed = 1.5f;
|
||||
}
|
||||
|
||||
@@ -32,32 +32,32 @@ const ActorInit Dm_Char02_InitVars = {
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ DMCHAR02_ANIMATION_HIT_GROUND,
|
||||
/* 1 */ DMCHAR02_ANIMATION_TURN_AROUND,
|
||||
/* 2 */ DMCHAR02_ANIMATION_JUGGLE,
|
||||
/* 3 */ DMCHAR02_ANIMATION_FALL,
|
||||
} DmChar02AnimationIndex;
|
||||
/* 0 */ DMCHAR02_ANIM_HIT_GROUND,
|
||||
/* 1 */ DMCHAR02_ANIM_TURN_AROUND,
|
||||
/* 2 */ DMCHAR02_ANIM_JUGGLE,
|
||||
/* 3 */ DMCHAR02_ANIM_FALL,
|
||||
} DmChar02Animation;
|
||||
|
||||
static AnimationInfo sAnimations[] = {
|
||||
static AnimationInfo sAnimationInfo[] = {
|
||||
{ &gClockTowerOcarinaOfTimeHitGroundAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &gClockTowerOcarinaOfTimeTurnAroundAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &gClockTowerOcarinaOfTimeJuggleAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gClockTowerOcarinaOfTimeFallAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
};
|
||||
|
||||
void DmChar02_ChangeAnimation(SkelAnime* skelAnime, AnimationInfo* animation, u16 index) {
|
||||
void DmChar02_ChangeAnim(SkelAnime* skelAnime, AnimationInfo* animationInfo, u16 animIndex) {
|
||||
f32 frameCount;
|
||||
|
||||
animation += index;
|
||||
animationInfo += animIndex;
|
||||
|
||||
if (animation->frameCount < 0.0f) {
|
||||
frameCount = Animation_GetLastFrame(animation->animation);
|
||||
if (animationInfo->frameCount < 0.0f) {
|
||||
frameCount = Animation_GetLastFrame(animationInfo->animation);
|
||||
} else {
|
||||
frameCount = animation->frameCount;
|
||||
frameCount = animationInfo->frameCount;
|
||||
}
|
||||
|
||||
Animation_Change(skelAnime, animation->animation, animation->playSpeed, animation->startFrame, frameCount,
|
||||
animation->mode, animation->morphFrames);
|
||||
Animation_Change(skelAnime, animationInfo->animation, animationInfo->playSpeed, animationInfo->startFrame,
|
||||
frameCount, animationInfo->mode, animationInfo->morphFrames);
|
||||
}
|
||||
|
||||
void DmChar02_PlaySfxForDroppingOcarinaCutscene(DmChar02* this, PlayState* play) {
|
||||
@@ -84,11 +84,11 @@ void DmChar02_Init(Actor* thisx, PlayState* play) {
|
||||
DmChar02* this = THIS;
|
||||
|
||||
if (gSaveContext.save.inventory.items[SLOT_OCARINA] == ITEM_NONE) {
|
||||
this->animIndex = DMCHAR02_ANIMATION_HIT_GROUND;
|
||||
this->animIndex = DMCHAR02_ANIM_HIT_GROUND;
|
||||
this->actor.targetArrowOffset = 3000.0f;
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gClockTowerOcarinaOfTimeSkel, NULL, NULL, NULL, 0);
|
||||
DmChar02_ChangeAnimation(&this->skelAnime, sAnimations, 0);
|
||||
DmChar02_ChangeAnim(&this->skelAnime, sAnimationInfo, 0);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->actionFunc = DmChar02_PerformCutsceneActions;
|
||||
} else {
|
||||
@@ -108,25 +108,25 @@ void DmChar02_PerformCutsceneActions(DmChar02* this, PlayState* play) {
|
||||
if (play->csCtx.frames == play->csCtx.actorActions[actionIndex]->startFrame) {
|
||||
switch (play->csCtx.actorActions[actionIndex]->action) {
|
||||
default:
|
||||
this->animIndex = DMCHAR02_ANIMATION_HIT_GROUND;
|
||||
this->animIndex = DMCHAR02_ANIM_HIT_GROUND;
|
||||
shouldChangeAnimation = false;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
this->animIndex = DMCHAR02_ANIMATION_HIT_GROUND;
|
||||
this->animIndex = DMCHAR02_ANIM_HIT_GROUND;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
this->animIndex = DMCHAR02_ANIMATION_TURN_AROUND;
|
||||
this->animIndex = DMCHAR02_ANIM_TURN_AROUND;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
this->animIndex = DMCHAR02_ANIMATION_FALL;
|
||||
this->animIndex = DMCHAR02_ANIM_FALL;
|
||||
break;
|
||||
}
|
||||
|
||||
if (shouldChangeAnimation) {
|
||||
DmChar02_ChangeAnimation(&this->skelAnime, &sAnimations[this->animIndex], 0);
|
||||
DmChar02_ChangeAnim(&this->skelAnime, &sAnimationInfo[this->animIndex], 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,9 +134,9 @@ void DmChar02_PerformCutsceneActions(DmChar02* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
if (this->animIndex == DMCHAR02_ANIMATION_TURN_AROUND) {
|
||||
if (this->animIndex == DMCHAR02_ANIM_TURN_AROUND) {
|
||||
this->animIndex++;
|
||||
DmChar02_ChangeAnimation(&this->skelAnime, &sAnimations[this->animIndex], 0);
|
||||
DmChar02_ChangeAnim(&this->skelAnime, &sAnimationInfo[this->animIndex], 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,20 +32,20 @@ const ActorInit Dm_Char03_InitVars = {
|
||||
(ActorFunc)DmChar03_Draw,
|
||||
};
|
||||
|
||||
AnimationInfo sAnimations[] = { { &object_osn_Anim_020530, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f } };
|
||||
AnimationInfo sAnimationInfo[] = { { &object_osn_Anim_020530, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f } };
|
||||
|
||||
void DmChar03_ChangeAnimation(SkelAnime* skelAnime, AnimationInfo* animInfo, u16 index) {
|
||||
void DmChar03_ChangeAnim(SkelAnime* skelAnime, AnimationInfo* animationInfo, u16 animIndex) {
|
||||
f32 frame;
|
||||
|
||||
animInfo += index;
|
||||
animationInfo += animIndex;
|
||||
|
||||
if (animInfo->frameCount < 0.0f) {
|
||||
frame = Animation_GetLastFrame(animInfo->animation);
|
||||
if (animationInfo->frameCount < 0.0f) {
|
||||
frame = Animation_GetLastFrame(animationInfo->animation);
|
||||
} else {
|
||||
frame = animInfo->frameCount;
|
||||
frame = animationInfo->frameCount;
|
||||
}
|
||||
Animation_Change(skelAnime, animInfo->animation, animInfo->playSpeed, animInfo->startFrame, frame, animInfo->mode,
|
||||
animInfo->morphFrames);
|
||||
Animation_Change(skelAnime, animationInfo->animation, animationInfo->playSpeed, animationInfo->startFrame, frame,
|
||||
animationInfo->mode, animationInfo->morphFrames);
|
||||
}
|
||||
|
||||
void DmChar03_Init(Actor* thisx, PlayState* play) {
|
||||
@@ -56,7 +56,7 @@ void DmChar03_Init(Actor* thisx, PlayState* play) {
|
||||
this->unk_18E = false;
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gDekuMaskSkel, NULL, NULL, NULL, 0);
|
||||
DmChar03_ChangeAnimation(&this->skelAnime, sAnimations, 0);
|
||||
DmChar03_ChangeAnim(&this->skelAnime, sAnimationInfo, 0);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->actionFunc = DmChar03_DoNothing;
|
||||
}
|
||||
@@ -119,7 +119,7 @@ void func_80AAB710(DmChar03* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (shouldChangeAnim) {
|
||||
DmChar03_ChangeAnimation(&this->skelAnime, &sAnimations[this->animIndex], 0);
|
||||
DmChar03_ChangeAnim(&this->skelAnime, &sAnimationInfo[this->animIndex], 0);
|
||||
}
|
||||
}
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, index);
|
||||
|
||||
@@ -30,10 +30,10 @@ const ActorInit Dm_Char04_InitVars = {
|
||||
(ActorFunc)DmChar04_Draw,
|
||||
};
|
||||
|
||||
void DmChar04_ChangeAnim(SkelAnime* skelAnime, AnimationInfo* animation, u16 index) {
|
||||
void DmChar04_ChangeAnim(SkelAnime* skelAnime, AnimationInfo* animation, u16 animIndex) {
|
||||
f32 endFrame;
|
||||
|
||||
animation += index;
|
||||
animation += animIndex;
|
||||
|
||||
if (animation->frameCount < 0.0f) {
|
||||
endFrame = Animation_GetLastFrame(animation->animation);
|
||||
@@ -44,7 +44,7 @@ void DmChar04_ChangeAnim(SkelAnime* skelAnime, AnimationInfo* animation, u16 ind
|
||||
animation->mode, animation->morphFrames);
|
||||
}
|
||||
|
||||
static AnimationInfo sAnimations[] = {
|
||||
static AnimationInfo sAnimationInfo[] = {
|
||||
{ &gameplay_keep_Anim_02B2E8, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gameplay_keep_Anim_029140, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
};
|
||||
@@ -72,7 +72,7 @@ void DmChar04_Init(Actor* thisx, PlayState* play) {
|
||||
SkelAnime_Init(play, &this->skelAnime, &gameplay_keep_Skel_02AF58.sh, &gameplay_keep_Anim_029140, this->jointTable,
|
||||
this->morphTable, 7);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, NULL, 15.0f);
|
||||
DmChar04_ChangeAnim(&this->skelAnime, sAnimations, 0);
|
||||
DmChar04_ChangeAnim(&this->skelAnime, sAnimationInfo, 0);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->actionFunc = func_80AABE34;
|
||||
}
|
||||
@@ -90,11 +90,11 @@ void func_80AABE34(DmChar04* this, PlayState* play) {
|
||||
if (this->csAction != play->csCtx.actorActions[actionIndex]->action) {
|
||||
this->csAction = play->csCtx.actorActions[actionIndex]->action;
|
||||
if (play->csCtx.actorActions[actionIndex]->action == 1) {
|
||||
this->animationIndex = 0;
|
||||
this->animIndex = 0;
|
||||
} else {
|
||||
this->animationIndex = 0;
|
||||
this->animIndex = 0;
|
||||
}
|
||||
DmChar04_ChangeAnim(&this->skelAnime, &sAnimations[this->animationIndex], 0);
|
||||
DmChar04_ChangeAnim(&this->skelAnime, &sAnimationInfo[this->animIndex], 0);
|
||||
}
|
||||
}
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, actionIndex);
|
||||
|
||||
@@ -16,7 +16,7 @@ typedef struct DmChar04 {
|
||||
/* 0x240 */ Color_RGBAf primColors;
|
||||
/* 0x250 */ Color_RGBAf envColors;
|
||||
/* 0x260 */ u8 csAction;
|
||||
/* 0x261 */ u8 animationIndex;
|
||||
/* 0x261 */ u8 animIndex;
|
||||
/* 0x262 */ u16 timer;
|
||||
} DmChar04; // size = 0x264
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ const ActorInit Dm_Char05_InitVars = {
|
||||
(ActorFunc)DmChar05_Draw,
|
||||
};
|
||||
|
||||
static AnimationInfo sAnimations[] = {
|
||||
static AnimationInfo sAnimationInfo[] = {
|
||||
{ &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 },
|
||||
@@ -76,9 +76,9 @@ void func_80AAC63C(Actor* thisx, PlayState* play) {
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f);
|
||||
SkelAnime_Init(play, &this->skelAnime, &object_dmask_Skel_010B0, NULL, NULL, NULL, 0);
|
||||
if (DMCHAR05_GET(&this->actor) == DMCHAR05_0) {
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimations[0], 0);
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimationInfo[0], 0);
|
||||
} else {
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimations[1], 0);
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimationInfo[1], 0);
|
||||
}
|
||||
this->actionFunc = func_80AACC48;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ void func_80AAC6E4(Actor* thisx, PlayState* play) {
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f);
|
||||
SkelAnime_Init(play, &this->skelAnime, &object_dmask_Skel_042B0, NULL, NULL, NULL, 0);
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimations[1], 0);
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimationInfo[1], 0);
|
||||
this->actionFunc = func_80AACC48;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ void func_80AAC770(Actor* thisx, PlayState* play) {
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_dmask_Skel_001D0, NULL, NULL, NULL, 0);
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimations[3], 0);
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimationInfo[3], 0);
|
||||
this->actionFunc = func_80AACC48;
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ void func_80AAC7FC(Actor* thisx, PlayState* play) {
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f);
|
||||
SkelAnime_Init(play, &this->skelAnime, &object_dmask_Skel_013D0, NULL, NULL, NULL, 0);
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimations[4], 0);
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimationInfo[4], 0);
|
||||
this->actionFunc = func_80AACC48;
|
||||
}
|
||||
|
||||
@@ -347,7 +347,7 @@ void func_80AACF04(DmChar05* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (sp2F) {
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimations[this->unk_18C], 0);
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimationInfo[this->unk_18C], 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -391,7 +391,7 @@ void func_80AACF04(DmChar05* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (sp2F) {
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimations[this->unk_18C], 0);
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimationInfo[this->unk_18C], 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -434,7 +434,7 @@ void func_80AACF04(DmChar05* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (sp2F) {
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimations[this->unk_18C], 0);
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimationInfo[this->unk_18C], 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -470,7 +470,7 @@ void func_80AACF04(DmChar05* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (sp2F) {
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimations[this->unk_18C], 0);
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimationInfo[this->unk_18C], 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -484,7 +484,7 @@ void func_80AACF04(DmChar05* this, PlayState* play) {
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
if (this->unk_18C == 4) {
|
||||
this->unk_18C++;
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimations[this->unk_18C], 0);
|
||||
func_80AAC5A0(&this->skelAnime, &sAnimationInfo[this->unk_18C], 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -33,7 +33,7 @@ const ActorInit Dm_Gm_InitVars = {
|
||||
(ActorFunc)NULL,
|
||||
};
|
||||
|
||||
static AnimationInfoS sAnimations[] = {
|
||||
static AnimationInfoS sAnimationInfo[] = {
|
||||
{ &object_an1_Anim_007E08, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_an1_Anim_0071E8, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_an4_Anim_006CC0, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
@@ -83,7 +83,7 @@ s32 func_80C24428(DmGm* this, PlayState* play, s32 arg2) {
|
||||
if ((objectIndex2 >= 0) && (arg2 != this->unk_2C8)) {
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[objectIndex2].segment);
|
||||
this->unk_2C8 = arg2;
|
||||
ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, arg2);
|
||||
ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg2);
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[objectIndex].segment);
|
||||
}
|
||||
return ret;
|
||||
|
||||
@@ -28,14 +28,14 @@ const ActorInit Dm_Nb_InitVars = {
|
||||
(ActorFunc)DmNb_Draw,
|
||||
};
|
||||
|
||||
static AnimationInfoS D_80C1E200[] = { { &object_nb_Anim_000990, 1.0f, 0, -1, ANIMMODE_LOOP, 0 } };
|
||||
static AnimationInfoS sAnimationInfo[] = { { &object_nb_Anim_000990, 1.0f, 0, -1, ANIMMODE_LOOP, 0 } };
|
||||
|
||||
s32 func_80C1DED0(DmNb* this, s32 arg1) {
|
||||
s32 ret = false;
|
||||
|
||||
if (arg1 != this->unk1F0) {
|
||||
this->unk1F0 = arg1;
|
||||
ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80C1E200, arg1);
|
||||
ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg1);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user