home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / fgl / fglight / expas.arj / TEMP / 15-07.PAS < prev    next >
Pascal/Delphi Source File  |  1995-01-20  |  629b  |  37 lines

  1. program main;
  2. uses fgmain, fgmisc;
  3.  
  4. const
  5.   ESC = 27;
  6.  
  7. var
  8.   color    : integer;
  9.   old_mode : integer;
  10.   key, aux : byte;
  11.  
  12. begin
  13.   fg_initpm;
  14.   old_mode := fg_getmode;
  15.   fg_setmode(fg_automode);
  16.   color := 0;
  17.  
  18.   fg_musicb('O4 L16 CC#DD#EFF#GG#AA#B O+ CC#DD#EFF#GG#AA#B$',-1);
  19.  
  20.   while (fg_playing = 1) do
  21.   begin
  22.     color := (color + 1) and 15;
  23.     fg_setcolor(color);
  24.     fg_rect(0,fg_getmaxx,0,fg_getmaxy);
  25.  
  26.     fg_waitfor(4);
  27.     fg_intkey(key,aux);
  28.     if (key = ESC) then
  29.       fg_hush
  30.     else if (key+aux <> 0) then
  31.       fg_hushnext;
  32.   end;
  33.  
  34.   fg_setmode(old_mode);
  35.   fg_reset;
  36. end.
  37.