1fli_timer(3) Allegro manual fli_timer(3)
2
3
4
6 fli_timer - Global variable for timing FLI playback. Allegro game pro‐
7 gramming library.
8
10 #include <allegro.h>
11
12
13 extern volatile int fli_timer;
14
16 Global variable for timing FLI playback. When you open an FLI file, a
17 timer interrupt is installed which increments this variable every time
18 a new frame should be displayed. Calling next_fli_frame() decrements
19 it, so you can test it and know that it is time to display a new frame
20 if it is greater than zero. Example:
21
22 while (next_fli_frame(0) == FLI_OK) {
23 /* Do stuff, like play audio stream
24 or check keys to skip animation. */
25 /* Rest some time until next frame... */
26 while (fli_timer <= 0)
27 rest(0);
28 }
29
30
31
32
34 install_timer(3), next_fli_frame(3)
35
36
37
38Allegro version 4.2.2 fli_timer(3)