home *** CD-ROM | disk | FTP | other *** search
- {$IFDEF Ver70}
- { Compiler directives for Turbo Pascal 7.0 }
- {$A+,B-,D+,E-,F-,I+,L+,N-,O-,P+,Q-,R-,S-,T-,V-,X+}
- {$IFDEF DPMI} {$G+} {$ELSE} {$G-} {$ENDIF}
- {$M 16384,0,655360}
- {$ENDIF}
-
- {$IFDEF Ver60}
- { Compiler directives for Turbo Pascal 6.0 }
- {$A+,B-,D+,E-,F-,G-,I+,L+,N-,O-,R-,S-,V-,X+}
- {$M 16384,0,655360}
- {$ENDIF}
-
- program FastFLI; { Play an FLI animation from the DOS command line }
-
- { FastVGA v1.0, (C)1993 by Tal Cohen }
-
- uses FastVGA,FLIUnit,Crt;
-
- procedure ShowSyntax;
- begin
- WriteLn ('FastFLI version 1.0');
- WriteLn;
- WriteLn ('Created using FastVGA 1.0, (C)1993 by Tal Cohen');
- WriteLn;
- WriteLn ('Syntax: FASTFLI <filename> [delay-rate]');
- WriteLn;
- WriteLn ('No file extension is assumed. If delay-rate is not specified,');
- WriteLn ('the FLI file''s normal timing is used. To play the FLI file');
- WriteLn ('at maximal speed, set delay-rate to zero.');
- WriteLn;
- Halt;
- end;
-
- var DelayRate:Word;
- ErByte:Byte;
- ErInt:Integer;
-
- begin
- if (ParamCount>2) or (ParamCount<1) then ShowSyntax;
- if ParamCount=2 then
- begin
- Val (ParamStr(2),DelayRate,ErInt);
- if ErInt<>0 then ShowSyntax;
- end
- else
- DelayRate:=NormalDelay;
-
- { THIS IS THE ACTUAL PLAYING LOOP: }
- GoVGA256;
- repeat
- PlayFLI (ParamStr(1),DelayRate,True,ErByte);
- until ErByte<>0;
- TextMode (Co80);
-
- case ErByte of
- 1:WriteLn ('File not found.');
- 2:WriteLn ('File close error.');
- 3:WriteLn ('I/O read error or file corrupted.');
- 4:WriteLn ('Not an FLI file.');
- 5:WriteLn ('FLI file not in 320x200x256 mode.');
- 6:WriteLn ('Out of memory.');
- 99: { Esc pressed, no error } ;
- else
- begin
- WriteLn ('Unknown error. Error code: ',ErByte);
- WriteLn ('Please report to Tal Cohen at once.');
- end;
- end;
- end.
-