open_fli(3alleg4)
β¨ open_fli β the Allegro manual, bestie edition β¨
okay so this is open_fli(3alleg4) from the Allegro manual, and it's literally about getting a FLI file open and ready to play. sit with me, this one's short and sweet π
π NAME π
open_fli, open_memory_fli β Makes a FLI file open and ready for playing. Allegro game programming library.
πΈ SYNOPSIS πΈ
#include <allegro.h>
int open_fli(const char *filename);
int open_memory_fli(const void *fli_data);
π¦ DESCRIPTION π¦
So these two functions open FLI files and get them ready for playing β and the only difference is where the data comes from: open_fli reads it from disk, open_memory_fli reads it from memory. Respectively, bestie, that's the whole vibe. π
The tea about the current FLI lives in the global variables fli_bitmap and fli_palette, and you can absolutely use those if this function succeeds. π«Ά
β οΈ but listen β you can only have ONE animation open at a time. one. that's it. don't be greedy. π
Example, because we love a demo:
if (open_fli("intro.fli") == FLI_ERROR)
abort_on_error("Error playing intro");
π₯ RETURN VALUE π₯
- Returns
FLI_OKwhen it ate and left no crumbs (success, bestie β¨). - Returns
FLI_ERRORif something went wrong β like trying to open another FLI file without closing the previous one first. not the forbidden double-open π
π SEE ALSO π
and that's the whole page, bestie π this was open_fli(3alleg4) from Allegro, version 4.4.3. go open exactly one FLI file and slay πβ¨
π¦ 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