fg_showflic()

Win32 DirectX Fastgraph/Light

Prototype

int fg_showflic (char *filename, int count, int flags);

Function fg_showflic (ByVal filename As String, ByVal count As Long, ByVal flags As Long) As Long

function fg_showflic (filename : string; count, flags : integer) : integer;

Description

The fg_showflic() function plays an animation sequence from an FLI or FLC file (collectively called flic files). Each frame in the flic file is played in the active virtual buffer and then scaled to fit the client area. For 256-color virtual buffers, flic files are reduced to the 236 non-system colors if color reduction is enabled.

Parameters

filename is the name of the flic file. A device and path name may be included as part of the file name. The file name must be terminated by a zero byte.

count is the number of times to play the flic image. If count is zero, the flic plays continuously. You can stop the flic play at any time by pressing the Escape key.

flags is a series of flags that controls how the image is played:

Flag

Meaning

FG_AT_XY

If specified, play the flic file relative to the current graphics position. If not, play it relative to (0,0).

FG_IGNOREFLICPALETTE

If specified, play the flic file using the current palette. If not, use the palette values stored in the flic file.

FG_FROMBUFFER

If specified, get the image data from the fg_imagebuf() buffer. If not, get the image data from the flic file.

FG_KEEPCOLORS

If specified, disable color reduction and remapping. If not, enable color reduction and remapping to avoid using the Windows system colors.

FG_NODELAY

If specified, play the flic file with no delay between frames. If not, delay between frames as specified in the flic header.

Return value

0 = Success

1 = The specified file does not exist

2 = The specified file is not a flic file

Restrictions

A logical palette must be defined and realized in order to use the palette values stored in the flic file.

When using DirectX, the active virtual buffer must not be locked.

See also

fg_flichead(), fg_flicplay(), fg_flicsize(), fg_imagebuf(), fg_realize()

Examples

Image

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.