home *** CD-ROM | disk | FTP | other *** search
- Program PlayFLS;
-
- {$B- }
- { This program requires the units from GameTP2.0 }
- { Copyright 1992 Scott D. Ramsay e-mail: ramsays@access.digex.com }
-
- Uses Crt,VgaKern,Flics,Dsound,MiscFunc;
-
- const
- playtimes : array[boolean] of shortint =
- (1,-1);
- var
- d : byte;
- s,l : string;
- cont,
- wait : boolean;
-
- procedure for_every_frame(totframe,frame,loop:longint;var fquit:boolean); far;
- begin
- if keypressed and (readkey=#27)
- then fquit := true
- else fquit := false;
- end;
-
-
- begin
- writeln('FLS/FLI player. Copyright 1992 Scott Ramsay');
- writeln;
- if paramcount<1
- then
- begin
- writeln('Syntax:');
- writeln(' PLAYFLS animatonfile [/W]');
- writeln;
- writeln(' animationfile A FLI or FLS file');
- writeln(' /W For FLS files wait for sound to finish');
- writeln(' /C Play continuous. (Press ESC to quit)');
- halt(1);
- end;
- s := paramstr(1); l := '';
- for d := 2 to paramcount do
- l := l+ups(paramstr(d));
- wait := (pos('/W',l)<>0);
- cont := (pos('/C',l)<>0);
- if not exist(s)
- then
- if exist(s+'.FLS')
- then s := s+'.FLS'
- else
- if exist(s+'.FLI')
- then s := s+'.FLI'
- else
- begin
- writeln('The file: ',s,' could not be found');
- halt(1);
- end;
- openmode(1);
- ScardSetup(0,0);
- every_frame := for_every_frame;
- fli_play(s,-1,playtimes[cont],wait);
- closemode;
- end.