1play_memory_fli(3) Allegro manual play_memory_fli(3)
2
3
4
6 play_memory_fli - Plays a FLI or FLC animation from memory. Allegro
7 game programming library.
8
10 #include <allegro.h>
11
12
13 int play_memory_fli(const void *fli_data, BITMAP *bmp, int loop, int
14 (*callback)());
15
17 Plays an Autodesk Animator FLI or FLC animation on the specified BIT‐
18 MAP, reading the data from a copy of the file which is held in memory.
19 You can obtain the `fli_data' pointer by allocating a block of memory
20 and reading an FLI file into it, or by importing an FLI into a grabber
21 datafile. If `loop' is not zero, the player will cycle when it reaches
22 the end of the file, otherwise it will play through the animation once
23 and then return. Read the beginning of chapter "FLIC routines" for a
24 description of the callback parameter.
25
26 Playing animations from memory is obviously faster than cuing them
27 directly from disk, and is particularly useful with short, looped
28 FLI's. Animations can easily get very large, though, so in most cases
29 you will probably be better just using play_fli(). You can think of
30 this function as a wrapper on top of open_memory_fli(),
31 next_fli_frame() and close_fli(). Example:
32
33 int ret = play_memory_fli(anim_data, screen, 0, NULL);
34 if (ret == FLI_ERROR)
35 abort_on_error("Corrupted animation data?");
36
38 The FLI player returns FLI_OK if it reached the end of the file,
39 FLI_ERROR if something went wrong, and the value returned by the call‐
40 back function if that was what stopped it.
41
42
44 play_fli(3), install_timer(3), fli_frame(3)
45
46
47
48Allegro version 4.4.3 play_memory_fli(3)