fli_timer(3)
π NAME π
hey bestie, welcome to fli_timer(3) from the Allegro manual β¨ this is the global variable that handles timing for FLI playback, straight out of the Allegro game programming library π
β¨ SYNOPSIS β¨
#include <allegro.h>
extern volatile int fli_timer;
π¦ DESCRIPTION π¦
okay so fli_timer is a global variable for timing FLI playback, and it's literally the main character of this page π
when you open an FLI file, a timer interrupt gets installed, and that interrupt increments this variable every single time a new frame should be displayed β°β¨
then when you call next_fli_frame(), it decrements fli_timer. so the vibe check is: if fli_timer is greater than zero, you know it's time to display a new frame π«Ά
like, here's the example, no cap:
while (next_fli_frame(0) == FLI_OK) {
/* Do stuff, like play audio stream
or check keys to skip animation. */
/* Rest some time until next frame... */
while (fli_timer <= 0)
rest(0);
}
π SEE ALSO π
and that's the whole page, bestie π
this was <strong>Allegro version 4.4.3</strong>, fli_timer(3) β go slay your FLI playback ππ
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms