home *** CD-ROM | disk | FTP | other *** search
/ PC Underground / UNDERGROUND.ISO / graphic / split2.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-07-28  |  892 b   |  21 lines

  1. Uses Crt,Gif,ModeXLib;
  2. Var y,                      {Current value of Linear Starting Address}
  3.     y_dir:word;             {Gives scroll direction}
  4. Begin
  5.   Init_ModeX;               {Enable Mode X}
  6.   LoadGif('upfold');        {Load first image into Pages 0 and 2}
  7.   p13_2_ModeX(0,16000);
  8.   p13_2_ModeX(32000,16000);
  9.   LoadGif('corner');        {Load second image into Pages 1 and 3}
  10.   p13_2_ModeX(16000,16000);
  11.   p13_2_ModeX(48000,16000);
  12.   y:=80;                    {Begin with Line 1}
  13.   y_dir:=80;                {Direction of motion +80 bytes per pass}
  14.   Repeat
  15.     Inc(y,y_dir);           {Motion}
  16.     WaitRetrace;            {Wait for retrace}
  17.     SetStart(y);            {and write new start to register}
  18.     if (y >= 600*80)        {Border reached -> reverse direction}
  19.     or (y <= 80) Then y_dir:=-y_dir;
  20.   Until KeyPressed;         {Run until key is pressed}
  21. End.