fli_frame(3alleg4)
β¨ fli_frame β¨
okay bestie, welcome to the fli_frame page of the Allegro manual π this is a 3alleg4 situation, iykyk.
π NAME π
fli_frame β it stores the current frame number of the animation, no cap. Part of the Allegro game programming library. π¦
πΈ SYNOPSIS πΈ
#include <allegro.h>
extern int fli_frame;
π DESCRIPTION π
so this is a global variable, and it holds the current frame number inside your FLI file. that's it, that's the whole vibe. π«Ά
why do you care tho? because it's lowkey perfect for syncing other stuff up with the animation β like, say you wanna trigger a sound effect at one specific moment. you can just peek at fli_frame inside a play_fli() callback function and fire off a sample right when the frame hits. iconic behaviour, honestly. β¨
here's the example, copied exactly because facts don't change even when the vibe does:
while (next_fli_frame(0) == FLI_OK) {
if (fli_frame == 345)
play_sample(trumpet_sound, 255, 128, 1000, 0);
/* Rest some time until next frame... */
}
like, fli_frame == 345?? that's your cue, go play that trumpet πΊ periodt.
π SEE ALSO π
Allegro π version 4.4.3 π fli_frame(3alleg4)
okay that's the whole page bestie, tysm for reading, go sync those frames πβ¨ππ¦ mwah π
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms