home *** CD-ROM | disk | FTP | other *** search
/ PC Underground / UNDERGROUND.ISO / graphic / wobbler.pas < prev   
Pascal/Delphi Source File  |  1995-08-01  |  851b  |  25 lines

  1. Uses Crt,Gif,ModeXLib,Tools;
  2. const y=246;                    {height and position are defined here}
  3.       height=90;                {can also be variables}
  4.  
  5. Var Sine:Array[0..63] of Word;  {Sine table, will be filled later}
  6.     i:Word;                     {temporary counter}
  7.  
  8. Procedure Make_Wob(wob_pos,wob_height,wob_offset:word);external;
  9. {$l wobbler}
  10.  
  11. begin
  12.   TextMode(3);                  {Wobbler functions in ANY video mode! }
  13.  
  14.   Draw_Ansi('db6.ans');         {load Ansi file}
  15.   Sin_Gen(Sine,64,4,83);        {precalculate sine}
  16.   CRTC_Unprotect;               {enable horizontal timing}
  17.   ReadKey;                      {wait}
  18.   i:=0;
  19.   Repeat
  20.     inc(i);                     {generate movement}
  21.     Make_Wob(y,height,i);       {draw wobble}
  22.   Until KeyPressed;
  23.   CRTC_Protect;                 {protect CRTC again}
  24. End.
  25.