home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / pascal / rehack / demosrc / animtst5.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1991-04-12  |  1.7 KB  |  50 lines

  1. {*****************************************************************************
  2.    This source code copyrighted 1991 by the Gamers Programming Workshop.
  3.    Liscense is granted for copying, modification, and distribution, as well as
  4.    re-use, provided that this header remains unchanged, and no fee is charged 
  5.    for this code beyond disk costs.
  6.  
  7.    by: Mark Betz 76605,2346
  8. *****************************************************************************}
  9.  
  10. Program AnimTst5;
  11. uses
  12.     CRT, DOS, PCXTOOL;
  13.  
  14. var
  15.     FrameBuff  : array[0..44070] of byte; {buffers for frame bitmaps}
  16.     FRMBuff    : pointer;
  17.     FrameSize  : word;
  18.     f_file   : file;
  19.     FrameWid : word;
  20.     FrameDep : word;
  21.     TopFrame : byte;
  22.     PCXBuff : pointer;
  23.  
  24. {$L ANIM5.OBJ}                   {NOTE: Path hardcoded!!!!!}
  25.  
  26. Procedure _Animate(x,y : word); external;
  27.  
  28. begin
  29.     clrscr;                                {clear the screen}
  30.     PcxBuff := LoadPcx('rehack.pcx');   {function returns pointer to buf}
  31.     InitGraphics;                          {set up mode 19 graphics}
  32.     FadeInPcx(PcxBuff);                  {fade the picture in}
  33.     assign(f_file,'frames.grf');
  34.     reset(f_file,1);
  35.     blockread(f_file,FrameBuff,44064);
  36.     close(f_file);
  37.     FRMBuff := ptr(seg(FrameBuff),ofs(FrameBuff));
  38.     FrameWid := 48;
  39.     FrameDep := 52;
  40.     FrameSize := 2592;
  41.     TopFrame  := 16;
  42.     _Animate(127,20);                      {call the assembler module
  43.     FadeOutPcx;
  44.     FreePcxMem(PCXBuff);                 {free the buffer}
  45.     RestoreText;                           {reset to mode co80}
  46.     clrscr;                                {clear screen}
  47. end.                                       {goodbye}
  48.  
  49.  
  50.