Alchemy
Loading...
Searching...
No Matches

AnimationEntry Struct Reference

One animation layer of a sprite: its animation id, frames, running script and timer. More...

#include <field/animspr.h>

Data Fields

s16 animId
 the sprite id whose metadata and frames it uses
u16 timer
 Time left on the current frame in sixteenths of a frame, read signed: each timed command adds its argument times 16, each frame takes off step.
u8 kind
 The facing table its frames follow (from the metadata, or ANIM_CMD_SET_KIND); zero marks a free layer record.
u8 param
 SpriteColorMode its pixels are drawn with; 0 when taken.
u8 priority
 drawing order 0 to 3 among the layers; above 3 not drawn
u8 mode
 frame codec: 1 type-01, 3 LZ, anything else raw
void ** frames
 frame pointers, from the metadata or a resource slot
u8 ** scripts
 the metadata's command scripts, one per animation number
u8 * script
 the running script; null when stopped (ANIM_CMD_END)
u8 pos
 byte offset of the next command in script
u8 step
 taken off timer each frame; 16 is normal speed
u8 frame
 frame shown, frameBase plus the facing offset; 255 none
u8 frameBase
 frame the script chose, before facing; 255 blank

Detailed Description

One animation layer of a sprite: its animation id, frames, running script and timer.

Definition at line 37 of file animspr.h.

Field Documentation

◆ animId

◆ timer

u16 AnimationEntry::timer

Time left on the current frame in sixteenths of a frame, read signed: each timed command adds its argument times 16, each frame takes off step.

Definition at line 41 of file animspr.h.

Referenced by Animation_SetWorkEntry(), AnimationObjects_SelectAnimation(), AnimationObjects_SetActiveFrameTimers(), Sprite_ComposeAnimationFrame(), and Ui_FillGridColumnFromMetadata().

◆ kind

◆ param

◆ priority

u8 AnimationEntry::priority

drawing order 0 to 3 among the layers; above 3 not drawn

Definition at line 46 of file animspr.h.

Referenced by BattleActor_SpawnObjectsForList(), BattleMotion_SpawnSlotEffectAndWait(), BattleStatusIcon_Cycle(), Object_MoveOnWorldMap(), and ObjectTable_ResetForObject().

◆ mode

u8 AnimationEntry::mode

frame codec: 1 type-01, 3 LZ, anything else raw

Definition at line 47 of file animspr.h.

Referenced by Animation_InitializeObjects(), Animation_InitWorkFromMetadata(), AnimationObject_Allocate(), ObjectSystem_Configure(), and Sprite_ComposeAnimationFrame().

◆ frames

void** AnimationEntry::frames

frame pointers, from the metadata or a resource slot

Definition at line 48 of file animspr.h.

Referenced by Animation_InitializeObjects(), Animation_InitWorkFromMetadata(), AnimationObject_Allocate(), AnimationObjects_SetActiveFrameTimers(), and Sprite_ComposeAnimationFrame().

◆ scripts

◆ script

◆ pos

◆ step

u8 AnimationEntry::step

◆ frame

◆ frameBase

u8 AnimationEntry::frameBase

frame the script chose, before facing; 255 blank

Definition at line 54 of file animspr.h.

Referenced by Sprite_ComposeAnimationFrame(), and Ui_FillGridColumnFromMetadata().