Example: Flic Files

Example FGIW2 shows how to play flic files stored in FGI libraries, using both the high-level and low-level flic functions. After opening the FGI file, the program's WM_CREATE handler calls fgi_flicopen() to open the GLASS.FLI flic file and fg_flicplay() to display its first frame, as shown here.

C/C++:

fgi_flicopen("GLASS.FLI",Context,hFGI);

fg_flicplay(Context,1,0);

Delphi:

fgi_flicopen('GLASS.FLI'+chr(0),Context,hFGI);

fg_flicplay(Context,1,0);

Visual Basic:

Call fgi_flicopen("GLASS.FLI", Context(0), hFGI)

Call fg_flicplay(Context(0), 1, 0)

The actual playing of the flic file takes place through a keyboard event handler. When the F1 key is pressed, example FGIW2 uses fgi_showflic() to play GLASS.FLI two times. When F2 is pressed, it uses the low-level flic functions to do the same thing.

C/C++ version

C++Builder version

Delphi version

Visual Basic version

<< Prev

Next >>

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.