home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / pascal / spx10.zip / SPX_DOC.ZIP / SPX_FLI.DOC < prev    next >
Text File  |  1993-05-05  |  3KB  |  90 lines

  1. { SPX Library Version 1.0  Copyright 1993 Scott D. Ramsay }
  2.  
  3.   SPX_FLI is the FLIC animation unit.  It allows the playing of Autodesk's
  4. .FLI Animator files.
  5.  
  6. ───────────────────────────────────────────────────────────────────────────
  7. FLI_HDR is the flic header type
  8.  
  9.   fli_hdr   = record
  10.                  size          : longint;
  11.                  magic,frames,
  12.                  width,height,
  13.                  depth,next    : word;
  14.                  speed,frit    : longint;
  15.                  reserved      : array[1..104] of byte;
  16.                end;
  17. ───────────────────────────────────────────────────────────────────────────
  18. FRAME_HDR is a flic frame type
  19.  
  20.   frame_hdr = record
  21.                 size         : longint;
  22.                 magic,chunks : word;
  23.                 reserved     : array[1..8] of byte;
  24.               end;
  25. ───────────────────────────────────────────────────────────────────────────
  26. procedure IncPtr(var marker:pointer;incby:longint);
  27.  
  28.    IncPtr allows the moving the pointer across 64k boundries.
  29.  
  30.    MARKER:  Pointer to change;
  31.    INCBY:   New offset of pointer
  32.  
  33. ───────────────────────────────────────────────────────────────────────────
  34. function fli_header(fl:string):boolean;
  35.  
  36.    Reads a FLI header file. Returns TRUE is successful.
  37.  
  38.    If successful, the header is stored in the variable CRNTHDR.
  39.  
  40. ───────────────────────────────────────────────────────────────────────────
  41. function read_header(fl:string;var fil:file):boolean;
  42.  
  43.    Same as function FLI_HEADER.  Except that it keeps the file open.
  44.  
  45.    For example:
  46.  
  47.    var
  48.      fil   : file;
  49.      frame : frame_hdr;
  50.    begin
  51.      if read_header('ANI.FLI',fil)
  52.        then
  53.          begin
  54.            blockread(fil,frame,sizeof(frame));
  55.          end;
  56.  
  57. ───────────────────────────────────────────────────────────────────────────
  58. function memReadHeader(var p:pointer):boolean;
  59.  
  60.   Grabs a FLI header file from a memory location.
  61.  
  62.   P:  A memory location where a FLI file is stored
  63.  
  64. ───────────────────────────────────────────────────────────────────────────
  65. function fli_play(fl:string;sp,tms:integer):boolean;
  66.  
  67.   Plays a FLI file onto the active page.
  68.  
  69.   FL:  DOS file name of the .FLI file;
  70.   SP:  Speed to play the fli file.  Set to -1 to use speed in file;
  71.   TMS: Number of times to play fli file.  Set to -1 for continuous
  72.  
  73. ───────────────────────────────────────────────────────────────────────────
  74. function memFliPlay(var at;sp,tms:integer):boolean;
  75.  
  76.   Plays a FLI file in memory onto the active page.
  77.  
  78.   at:  buffer location of the .FLI file;
  79.   SP:  Speed to play the fli file.  Set to -1 to use speed in file;
  80.   TMS: Number of times to play fli file.  Set to -1 for continuous
  81.  
  82. ───────────────────────────────────────────────────────────────────────────
  83. procedure memNextframe(var p:pointer);
  84.  
  85.   Decodes a FLI frame from memory to the active page.
  86.  
  87.   P:  Pointer to the FLI frame
  88.  
  89. ───────────────────────────────────────────────────────────────────────────
  90.