home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-386-Vol-2of3.iso
/
g
/
gametp20.zip
/
FLICS.INT
< prev
next >
Wrap
Text File
|
1992-11-05
|
4KB
|
101 lines
Unit Flics;
{ FLICS version 1.0 Copyright (C) 1992 Scott D. Ramsay }
{ ramsays@access.digex.com }
{ This unit allows one to play Autodesk Animatior FLI files. And }
{ my own version FLS files which has embedded VOC files in frames. }
{ See VOCINFLS.EXE, SEEFLS.EXE, PLAYFLS.EXE, FLS2VOC.EXE }
{ to modify your FLI files to FLS files. }
{ FLICS.TPU can be used freely in commerical and non-commerical }
{ programs. As long as you don't give yourself credit for writing }
{ this portion of the code. When distributing it please include all }
{ files and samples so others may enjoy using the code. Thanks. }
Interface
Uses VgaKern,DSound;
const
fli_vocplay : boolean = true; { Set to FALSE to keep FLS files quiet }
leavelast : boolean = false; { Set to TRUE to skip last frame }
VOC_MAGIC = $FF03; { Voice header word }
type
frameproc = procedure(totframe,frame,loop:longint;var fquit:boolean);
fli_hdr = record
size : longint; { size of FLI file }
magic, { should be $AF11 }
frames, { number of frames }
width,height, { should be 320,200 }
depth,next : word;
speed,frit : longint; { fli speed in jiffies }
reserved : array[1..104] of byte;
end;
frame_hdr = record
size : longint; { header size }
magic, { = $FF03 for voice }
chunks : word; { chunk type }
reserved : array[1..8] of byte;
end;
var
every_frame : frameproc; { Set your far procedure to this }
{ for user call at every frame }
(******************************)
{ e.g.
procedure MyCall_EveryFrame(totframe,frame,loop:longint;var fquit:boolean);far;
{ notice parameter list is the same as frameproc type
totframe Number of frames passed.
frame Current frame number
loop Loop number
fquit Set to TRUE to halt fli animation.
}
begin
{ this will be done for every frame }
end;
begin
every_frame := MyCall_EveryFrame;
fli_play('MyAni.FLS',-1,1,false);
end; }
(******************************)
crnthdr : fli_hdr; { Current frame header }
{ set to last FLI/FLS loaded }
framesdid, { Global of frames did }
crntfrm : longint; { File positon of last FLI/FLS }
{ file where frame data starts }
function fli_header(fl:string):boolean;
function fli_play(fl:string;sp,tms:integer;swait:boolean):boolean;
{ See Implementation section for description of functions }
implementation
(*************************************************************************)
function fli_header(fl:string):boolean;
Reads a FLI/FLS file and sets CRNTHDR, CRNTFRM
fl FLI or FLS file name.
returns TRUE if fl is a FLI or FLS file.
(*************************************************************************)
function fli_play(fl:string;sp,tms:integer;swait:boolean):boolean;
Plays a FLI/FLS file.
fl FLI or FLS file name
sp Override speed of flic. Set to -1 to use speed in file.
tms Number of times to loop flic. Set to -1 to loop forever.
(note: for -1 be sure to override EVERY_FRAME so you can
exit from the flic.)
swait Set to TRUE if you want the flic to keep playing until
sounds playing are completed.