Skip to Content
The Alchemy Project

struct SPR

An animated sprite: its image, scale, rotation, size, its shadow and up to four sprite animations.

Declared in sprite.h.

Fields

NameDescription
ANIMATION_SPR_PARTimage
FIXEDscale16.16 fixed point, toFIXED(1) full size.
Uint8slotVRAM cache entry holding its tiles.
Uint8retainCacheEntry : 1Keeps the VRAM cache entry when it is released or off screen.
Uint8useOwnScale : 1Drawn at its own scale, not scaled by distance (fixed camera).
Uint8sunkRows : 6Rows SPRITE_FLAG_SUNK sinks or SPRITE_FLAG_SHADED * shades.
Uint16rotation1/65536 turns.
Uint8widthPixels; zero marks a free sprite.
Uint8heightPixels.
Sint8offsetXPixels.
Sint8offsetYPixels.
Uint8lastNoThe animation number last selected, which selecting again skips.
Uint8dirtyNonzero redraws its pixels into VRAM when next drawn.
Uint8flagsSPR_FLAG.
Uint8countLayers in use, up to the last one present.
ANIMATION_SPR_PARTshadowIts shadow, shown while SPRITE_FLAG_SHADOW is set.
SPR_ANIMATION *entries [4]Its layers; empty ones null.

Description

An animated sprite: its image, scale, rotation, size, its shadow and up to four sprite animations.

struct SPR

Referenced by btAutoBattleRunAttackOrItem(), btEffectRunAtalanta(), btEffectRunAzul(), btEffectRunBoreas(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCoatlicue(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunEclipse(), btEffectRunFlora(), btEffectRunGaia(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunKirin(), btEffectRunMegaera(), btEffectRunMegiddo(), btEffectRunNeptune(), btEffectRunProcne(), btEffectRunRamses(), btEffectRunStarfieldFall(), btEffectSpriteAcquire(), btEffectTintBattler(), btHighlightSetSpriteMode(), btMotionPlayFall(), btMotionProjectCursorPoint(), btMotionProjectPos(), btMotionProjectScaledPos(), btMotionReleaseBuffer(), btMotionShowDowned(), btObjectSetColorMode(), btObjectSpawnObjectsForList(), btObjectUpdateSpritePriorities(), btPlaybackRun(), btSpriteDetachScripts(), btSpriteSetColorMode(), btStagingRunAttack(), btStagingRunFullScreen(), btStagingRunItem(), btStagingRunPsynergyCast(), btStatusIconCycle(), btUnitProjectToScreen(), fdActorAddSpriteAnimation(), fdActorCopyGraphics(), fdActorCrossRope(), fdActorCrossTightrope(), fdActorCycleSpriteColors(), fdActorFallOverById(), fdActorFallOverWithAnimationById(), fdActorFindBySprite() and 166 more.

Definition at line 182 of file sprite.h.

Fields in detail

image

ANIMATION_SPR_PART image

scale

FIXED scale

16.16 fixed point, toFIXED(1) full size.

slot

Uint8 slot

VRAM cache entry holding its tiles.

retainCacheEntry

Uint8 retainCacheEntry : 1

Keeps the VRAM cache entry when it is released or off screen.

useOwnScale

Uint8 useOwnScale : 1

Drawn at its own scale, not scaled by distance (fixed camera).

sunkRows

Uint8 sunkRows : 6

Rows SPRITE_FLAG_SUNK sinks or SPRITE_FLAG_SHADED * shades.

rotation

Uint16 rotation

1/65536 turns.

width

Uint8 width

Pixels; zero marks a free sprite.

height

Uint8 height

Pixels.

offsetX

Sint8 offsetX

Pixels.

offsetY

Sint8 offsetY

Pixels.

lastNo

Uint8 lastNo

The animation number last selected, which selecting again skips.

dirty

Uint8 dirty

Nonzero redraws its pixels into VRAM when next drawn.

flags

Uint8 flags

SPR_FLAG.

count

Uint8 count

Layers in use, up to the last one present.

shadow

ANIMATION_SPR_PART shadow

Its shadow, shown while SPRITE_FLAG_SHADOW is set.

entries

SPR_ANIMATION *entries[4]

Its layers; empty ones null.