next_fli_frame(3alleg4)
π next_fli_frame β bestie, it's the next frame π
okay so this page lives in the Allegro manual (the 3alleg4 girlies know), and it's all about the function next_fli_frame. she reads the next frame of your current animation file. that's her whole job. she's an icon, she's a legend, and she's the moment. β¨
πΈ SYNOPSIS πΈ
#include <allegro.h>
int next_fli_frame(int loop);
π¦ DESCRIPTION π¦
so like. next_fli_frame reads the next frame of the current animation file. that's it. that's the vibe. π
but here's the tea about loop, bestie β listen closely:
- if
loopis not zero, the player will cycle when it reaches the end of the file. she just keeps going. infinite main character energy. π - if
loopis zero, then instead of cycling it returnsFLI_EOFwhen it hits the end. no encore. the show ends. π¬
and where does the frame go, you ask? straight into the global variables fli_bitmap and fli_palette. iconic behaviour honestly. π
here's an example, literally copy-paste her:
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... */
}
β RETURN VALUE β
FLI_OKβ slay, it worked, success πFLI_ERRORorFLI_NOT_OPENβ uh oh, error time πFLI_EOFβ you hit the end of the file, babes π
π SEE ALSO π
go read these next, they're all part of the same friend group fr fr:
okay that's the whole page bestie, no cap, every flag and every constant accounted for π«Ά this was Allegro version 4.4.3 doing the absolute most as always, so mwah, go forth and animate your little heart out β¨ππΈ
π¦ 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