Functions
Sequence

Sequence resources management for layer, sprite and palette animations. More...

Description

Functions

TLNAPI TLN_Sequence TLN_CreateSequence (const char *name, int target, int num_frames, TLN_SequenceFrame *frames)
 Creates a new sequence for the animation engine. More...
 
TLNAPI TLN_Sequence TLN_CreateCycle (const char *name, int num_strips, TLN_ColorStrip *strips)
 Creates a color cycle sequence for palette animation. More...
 
TLNAPI TLN_Sequence TLN_CloneSequence (TLN_Sequence src)
 Creates a duplicate of the specified sequence. More...
 
TLNAPI bool TLN_GetSequenceInfo (TLN_Sequence sequence, TLN_SequenceInfo *info)
 Returns runtime info about a given sequence. More...
 
TLNAPI bool TLN_DeleteSequence (TLN_Sequence sequence)
 Deletes the sequence and frees resources. More...
 

Function Documentation

TLNAPI TLN_Sequence TLN_CreateSequence ( const char *  name,
int  target,
int  count,
TLN_SequenceFrame frames 
)
Parameters
nameString with an unique name to query later
targetFor tileset animations, the tile index to animate
countNumber of frames
framesArray of TLN_Frame items with indexes and delays
Returns
Reference to the new sequence or NULL if error
Remarks
Use this function to create tileset or sprite animations
See also
TLN_SetTilemapAnimation(), TLN_SetSpriteAnimation()
TLNAPI TLN_Sequence TLN_CreateCycle ( const char *  name,
int  count,
TLN_ColorStrip strips 
)
Parameters
nameString with an unique name to query later
countNumber of color strips
stripsArray of color strips to assign
Returns
Reference to the created cycle or NULL if error
Remarks
Use this function to create advanced palette animation effects
See also
TLN_ColorStrip(), TLN_SetPaletteAnimation()
TLNAPI TLN_Sequence TLN_CloneSequence ( TLN_Sequence  src)
Parameters
srcSequence to clone
Returns
A reference to the newly cloned sequence, or NULL if error
See also
TLN_FindSequence()
TLNAPI bool TLN_GetSequenceInfo ( TLN_Sequence  sequence,
TLN_SequenceInfo info 
)
Parameters
sequenceSequence to query
infoPointer to a user-provided TLN_SequenceInfo structure to hold the returned data
See also
TLN_FindSequence()
TLNAPI bool TLN_DeleteSequence ( TLN_Sequence  sequence)
Parameters
sequenceReference to the sequence to be deleted
Remarks
Don't delete an active sequence!