FLIC routines
There are two high level functions for playing FLI/FLC animations:
play_fli(), which reads the data directly from disk, and play_memory_fli(),
which uses data that has already been loaded into RAM. Apart from the
different sources of the data, these two functions behave identically. They
draw the animation onto the specified bitmap, which should normally be the
screen. Frames will be aligned with the top left corner of the bitmap: if
you want to position them somewhere else you will need to create a
sub-bitmap for the FLI player to draw onto.
If the callback function is not NULL it will be called once for each frame,
allowing you to perform background tasks of your own. This callback should
normally return zero: if it returns non-zero the player will terminate (this
is the only way to stop an animation that is playing in looped mode).
The FLI player returns FLI_OK if it reached the end of the file, FLI_ERROR
if something went wrong, and the value returned by the callback function if
that was what stopped it. If you need to distinguish between different return
values, your callback should return positive integers, since FLI_OK is zero
and FLI_ERROR is negative.
Note that the FLI player will only work when the timer module is installed,
and that it will alter the palette according to whatever palette data is
present in the animation file.
Occasionally you may need more detailed control over how an FLI is played,
for example if you want to superimpose a text scroller on top of the
animation, or to play it back at a different speed. You could do both of
these with the lower level functions described below.