mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-22 06:52:03 +00:00
Cleanup around some generic animation info structs (#1059)
* Name generic anim info structs and cleanup usage * Make `EnDaiku` use generic struct * Add `/* decimalid */` comments to all added enums * small fixes * Two more generic animinfo structs * Cleanup usage of newly generic structs * Cleanup x2 usage of newly generic structs * `transitionRate` -> `morphFrames` * Properly name generic anim structs (attempt to at least) * `anim` -> `animation` * fixes * run formatter * Use consistent prototypes for each actor's ChangeAnim helper * run formatter * minor cleanup * Run formatter * `Animation_ChangeInfo` -> `Animation_ChangeByInfo`
This commit is contained in:
parent
d3a8ade6ba
commit
11917bf640
31 changed files with 675 additions and 467 deletions
|
@ -233,13 +233,7 @@ static s32 sOcarinaGameRewards[] = {
|
|||
GI_RUPEE_RED,
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
AnimationHeader* animation;
|
||||
u8 mode;
|
||||
f32 morphFrames;
|
||||
} SkullkidAnimationEntry;
|
||||
|
||||
static SkullkidAnimationEntry sSkullKidAnimations[] = {
|
||||
static AnimationMinimalInfo sAnimationInfo[] = {
|
||||
{ &gSkullKidBackflipAnim, ANIMMODE_ONCE, 0.0f },
|
||||
{ &gSkullKidShootNeedleAnim, ANIMMODE_ONCE, 0.0f },
|
||||
{ &gSkullKidPlayFluteAnim, ANIMMODE_LOOP, 0.0f },
|
||||
|
@ -291,12 +285,12 @@ static InitChainEntry sInitChain[] = {
|
|||
|
||||
static s32 D_80B01EA0; // gets set if ACTOR_FLAG_8 is set
|
||||
|
||||
void EnSkj_ChangeAnim(EnSkj* this, u8 animIndex) {
|
||||
f32 endFrame = Animation_GetLastFrame(sSkullKidAnimations[animIndex].animation);
|
||||
void EnSkj_ChangeAnim(EnSkj* this, u8 index) {
|
||||
f32 endFrame = Animation_GetLastFrame(sAnimationInfo[index].animation);
|
||||
|
||||
this->animIndex = animIndex;
|
||||
Animation_Change(&this->skelAnime, sSkullKidAnimations[animIndex].animation, 1.0f, 0.0f, endFrame,
|
||||
sSkullKidAnimations[animIndex].mode, sSkullKidAnimations[animIndex].morphFrames);
|
||||
this->animIndex = index;
|
||||
Animation_Change(&this->skelAnime, sAnimationInfo[index].animation, 1.0f, 0.0f, endFrame,
|
||||
sAnimationInfo[index].mode, sAnimationInfo[index].morphFrames);
|
||||
}
|
||||
|
||||
void EnSkj_SetupAction(EnSkj* this, u8 action) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue