2.10.0
Functions
Animation

Color cycle animation. More...

Description

Color cycle animation.

Functions

bool TLN_SetPaletteAnimation (int index, TLN_Palette palette, TLN_Sequence sequence, bool blend)
 Starts a palette animation. More...
 
bool TLN_SetPaletteAnimationSource (int index, TLN_Palette)
 Sets the source palette of a color cycle animation. More...
 
bool TLN_GetAnimationState (int index)
 Checks the state of the animation for given sprite. More...
 
bool TLN_SetAnimationDelay (int index, int frame, int delay)
 Sets animation delay for single frame of given sprite animation. More...
 
int TLN_GetAvailableAnimation (void)
 Finds an available (unused) animation. More...
 
bool TLN_DisablePaletteAnimation (int index)
 Disables the color cycle animation so it stops playing. More...
 

Function Documentation

◆ TLN_SetPaletteAnimation()

bool TLN_SetPaletteAnimation ( int  index,
TLN_Palette  palette,
TLN_Sequence  sequence,
bool  blend 
)

Starts a palette animation.

Parameters
indexId of the animation to set (0 <= id < num_animations)
paletteReference of the palette to be animated
sequenceReference of the sequence to assign
blendtrue for smooth frame interpolation, false for classic, discrete mode

◆ TLN_SetPaletteAnimationSource()

bool TLN_SetPaletteAnimationSource ( int  index,
TLN_Palette  palette 
)

Sets the source palette of a color cycle animation.

Parameters
indexId of the animation to set (0 <= id < num_animations)
paletteReference of the palette to assign
Remarks
Use this function to change the palette assigned to a color cycle animation running. This is useful to combine color cycling and palette interpolation at the same time

◆ TLN_GetAnimationState()

bool TLN_GetAnimationState ( int  index)

Checks the state of the animation for given sprite.

Parameters
indexId of the sprite to check (0 <= id < num_sprites)
Returns
true if animation is running, false if it's finished or inactive

◆ TLN_SetAnimationDelay()

bool TLN_SetAnimationDelay ( int  index,
int  frame,
int  delay 
)

Sets animation delay for single frame of given sprite animation.

Parameters
indexId of the sprite with animation (0 <= id < num_sprites)
frameId of animation frame to change delay in (0 <= id < sequence->count)
delayNew animation frame delay to set
See also
Animations

◆ TLN_GetAvailableAnimation()

int TLN_GetAvailableAnimation ( void  )

Finds an available (unused) animation.

Returns
Index of the first unused animation (starting from 0) or -1 if none found

◆ TLN_DisablePaletteAnimation()

bool TLN_DisablePaletteAnimation ( int  index)

Disables the color cycle animation so it stops playing.

Parameters
indexId of the animation to set (0 <= id < num_animations)
See also
Animations