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

  1. Uses Crt,Tools,ModeXLib,Gif,Font;
  2.  
  3. Var Sine:Array[0..127] of Word;{sine table for vertical wave}
  4.     t:Word;                     {"time", position within the sine}
  5.  
  6. Begin
  7.   Init_ModeX;                   {Mode X on}
  8.   LoadGif('pfont4');            {load character set}
  9.   p13_2_ModeX(48000,16000);     {and copy to page 3}
  10.   Sin_Gen(Sine,128,Scrl_y div 2,Scrl_y div 2);
  11.                                 {prepare sine table for vertical movement}
  12.   t:=0;                         {time starts at 0}
  13.   Repeat
  14.     WaitRetrace;                {synchronization}
  15.     Scrl_Move;                  {move visible part to the right}
  16.     Scrl_Append;                {add new column on the right }
  17.     SetStart(Sine[t and 127]*80);  {cause vertical movement}
  18.     Inc(t);                     {continue in sine table}
  19.   Until KeyPressed;
  20.   TextMode(3);
  21. End.
  22.