FLI and FLC High-Level FunctionsFastgraph includes both high-level and low-level functions for working with flic files. The most important high-level function, fg_showflic(), plays the entire contents of a flic file any number of times. It can position the image such that its upper left corner is at the screen space origin or at the graphics cursor position in the active virtual buffer. As fg_showflic() processes each frame of the flic file, it automatically scales the frame from the virtual buffer to the client area, which causes the flic file animation to appear in the client area as it plays. The fg_showflic() function expects three parameters. The first is the flic file name, which may include a path name, but must be null-terminated. The second specifies the number of times to play the flic file. If the play count is zero, fg_showflic() will play it continuously. The fg_showflic() function will stop playing the flic file when the Escape key is pressed. Note that this is the only way to stop playing the flic file if the play count is zero (continuous play). The third fg_showflic() parameter is a bit mask that controls how the flic file is played. The following table summarizes these flags.
The fg_showflic() function returns 0 if successful, 1 if the specified file wasn't found, and 2 if the file is not a flic file. For example, the code shown here will play the file GLASS.FLI with its upper left corner at the screen space position (16,16) in the active virtual buffer, no delay between frames, and automatic color reduction enabled:
C/C++:
Delphi:
Visual Basic:
|
 
copyright 2001 Ted Gruber Software, Inc.