Skip to Content
The Alchemy Project

struct SPR_ANIMATION

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

Declared in sprite.h.

Fields

NameDescription
Sint16animationIdThe sprite id whose metadata and pictures it uses.
Uint16timerTime left on the current picture in sixteenths of a tick, read signed: each timed command adds its argument times 16, each tick takes off step.
Uint8kindThe facing table its pictures follow (from the metadata, or animation command 240).
Uint8colorModeSPR_COL_MODE its pixels are drawn with.
Uint8priorityDrawing order 0 to 3 among the layers; above 3 not drawn.
Uint8modePicture codec: 1 type-01, 3 LZ, anything else raw.
void **picturesPicture pointers, from the metadata or a picture cache.
Uint8 **scriptsThe metadata's command scripts, one per animation number.
Uint8 *scriptThe running script; null once command 239 ends it.
Uint8scriptOffsetByte offset of the next command in script.
Uint8stepTaken off timer each tick; ANIM_STEP_NORMAL.
Uint8picturePicture shown, pictureBase plus the facing offset; 255 none.
Uint8pictureBasePicture the script chose, before facing; 255 blank.

Description

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

struct SPR_ANIMATION

Referenced by btAnimationObjectAllocateEmpty(), btEffectTintBattler(), btMotionPlayFall(), btMotionPlayHitFlash(), btMotionShowDowned(), btObjectSetColorMode(), btObjectSpawnObjectsForList(), btObjectUpdateSpritePriorities(), btPlaybackRun(), btSpriteSetColorMode(), btStatusIconCycle(), fdActorResetForLeader(), fdActorSetSpriteColor(), fdActorSystemConfigure(), fdActorUpdateBlink(), fdEntranceEndArrivalAnimation(), fdExitAddHiddenLeaderLayer(), fdExitPrepareActorAnimation(), fdExitPrepareAnimation(), fdPsynergyAvoid(), fdPsynergyEndCloak(), fdPsynergyHaltActor(), fdPsynergyStartCloak(), fdScriptSpawnActorTable(), fdSpriteAddAnimation(), fdSpriteAnimationAllocate(), fdSpriteAnimationClear(), fdSpriteAnimationReset(), fdSpriteAnimationStart(), fdSpriteComposePicture(), fdSpriteDestroy(), fdSpriteRemoveAnimation(), fdSpriteRemoveAnimationAt(), fdSpriteResetAnimations(), fdSpriteSetAnimationSpeed(), fdSpriteSetAnimationTimers(), fdSpriteSkipToStop(), fdSpriteStartAnimation(), fdSpriteViewerSetLayerSprite(), fdSpriteViewerStartStaggeredAnimations(), fdSpriteWaitForTrackEnd(), fdSummonTabletCyclePictures(), scActorCyclePictures(), scAquaRockAddMoaiWater(), scAquaRockInsideAddMoaiWater(), scGabombaStatuePauseCogsInMenus(), scGaiaRockInsideSaveSusa(), scGaiaRockInsideTurnFaceToAltar(), scJupiterLighthousePulseBeacon(), scLemuriaSpringSetActorAppearance() and 3 more.

Definition at line 59 of file sprite.h.

Fields in detail

animationId

Sint16 animationId

The sprite id whose metadata and pictures it uses.

timer

Uint16 timer

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

kind

Uint8 kind

The facing table its pictures follow (from the metadata, or animation command 240).

colorMode

Uint8 colorMode

SPR_COL_MODE its pixels are drawn with.

priority

Uint8 priority

Drawing order 0 to 3 among the layers; above 3 not drawn.

mode

Uint8 mode

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

pictures

void **pictures

Picture pointers, from the metadata or a picture cache.

scripts

Uint8 **scripts

The metadata's command scripts, one per animation number.

script

Uint8 *script

The running script; null once command 239 ends it.

scriptOffset

Uint8 scriptOffset

Byte offset of the next command in script.

step

Uint8 step

Taken off timer each tick; ANIM_STEP_NORMAL.

picture

Uint8 picture

Picture shown, pictureBase plus the facing offset; 255 none.

pictureBase

Uint8 pictureBase

Picture the script chose, before facing; 255 blank.