1play_fli(3) Allegro manual play_fli(3)
2
3
4
6 play_fli - Plays a FLI or FLC animation from disk. Allegro game pro‐
7 gramming library.
8
10 #include <allegro.h>
11
12
13 int play_fli(const char *filename, BITMAP *bmp, int loop, int (*call‐
14 back)());
15
17 Plays an Autodesk Animator FLI or FLC animation file on the specified
18 BITMAP, reading the data from disk as it is required. If `loop' is not
19 zero, the player will cycle when it reaches the end of the file, other‐
20 wise it will play through the animation once and then return. Read the
21 beginning of chapter "FLIC routines" for a description of the callback
22 parameter. Example:
23
24 /* Let users skip looped animations. */
25 int check_escape_key(void)
26 {
27 if (key[KEY_ESC])
28 return 1;
29 else
30 return 0;
31 }
32 ...
33 int ret = play_fli("animlogo.fli", screen, 1,
34 check_escape_key);
35 if (ret == FLI_ERROR)
36 abort_on_error("Error playing intro!");
37
39 The FLI player returns FLI_OK if it reached the end of the file,
40 FLI_ERROR if something went wrong, and the value returned by the call‐
41 back function if that was what stopped it.
42
43
45 play_memory_fli(3), install_timer(3), fli_frame(3)
46
47
48
49Allegro version 4.2.3 play_fli(3)