open_fli(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

πŸ’– NAME πŸ’–

open_fli, open_memory_fli β€” bestie, these make a FLI file open and ready for playing ✨

Like, it's the Allegro game programming library, and these two are the little doorway into your animations πŸŽ€


🌸 SYNOPSIS 🌸

#include <allegro.h>

int open_fli(const char *filename);

int open_memory_fli(const void *fli_data);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so picture this: you got a FLI and you wanna play it. That's literally it, that's the whole vibe πŸ’…

These functions open FLI files and get them ready for playing β€” open_fli reads the data from disk, and open_memory_fli reads it from memory. Respectively. Pick your fighter 🫢

The info about the current FLI lives in the global variables fli_bitmap and fli_palette, and you can absolutely use those if this function succeeds. Iconic, honestly πŸ‘‘

But bestie, hear me: you can only have one animation open at a time. One. Monogamy but for FLI files 😭

Example, because examples ate:

if (open_fli("intro.fli") == FLI_ERROR)
   abort_on_error("Error playing intro");

⭐ RETURN VALUE ⭐

  • FLI_OK β€” slay, it worked πŸ’–
  • FLI_ERROR β€” something went wrong 😭 like, say, trying to open another FLI file without closing the previous one first. The audacity fr fr.

🌈 SEE ALSO 🌈


That's the whole page, no cap 🧚 this was the Allegro manual, version 4.4.3, and the page is open_fli(3). Go open a FLI, bestie, you got this πŸ’œβœ¨

πŸ“¦ where this page comes from