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

  1. program main;
  2. uses fgmain, fgmisc;
  3.  
  4. const
  5.   WIDTH  : integer = 40;
  6.   COLORS : integer = 16;
  7.  
  8. var
  9.   base       : integer;
  10.   color      : integer;
  11.   minx, maxx : integer;
  12.   mode       : integer;
  13.  
  14. begin
  15.   fg_initpm;
  16.   mode := fg_getmode;
  17.   fg_setmode(16);
  18.  
  19.   base := 0;
  20.   minx := 0;
  21.   maxx := WIDTH - 1;
  22.  
  23.   for color := 0 to COLORS-1 do
  24.   begin
  25.      fg_palette(color,0);
  26.      fg_setcolor(color);
  27.      fg_rect(minx,maxx,0,349);
  28.      minx := maxx + 1;
  29.      maxx := maxx + WIDTH;
  30.   end;
  31.  
  32.   while (base < COLORS*4) do
  33.   begin
  34.      color := 0;
  35.      for color := 0 to COLORS-1 do
  36.         fg_palette(color,base+color);
  37.      base := base + COLORS;
  38.      fg_waitkey;
  39.   end;
  40.  
  41.   fg_setmode(mode);
  42.   fg_reset;
  43. end.
  44.