home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / GRAPHICS / MISC / FGL110C.ZIP / 05-10.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-31  |  383 b   |  29 lines

  1. #include <fastgraf.h>
  2.  
  3. void main(void);
  4.  
  5. #define COLORS 256
  6.  
  7. void main()
  8. {
  9.    int base;
  10.    int color;
  11.    int mode;
  12.    int x;
  13.  
  14.    mode = fg_getmode();
  15.    fg_setmode(19);
  16.  
  17.    x = 0;
  18.  
  19.    for (color = 0; color < COLORS; color++) {
  20.       fg_setcolor(color);
  21.       fg_rect(x,x,0,199);
  22.       x++;
  23.       }
  24.    fg_waitkey();
  25.  
  26.    fg_setmode(mode);
  27.    fg_reset();
  28. }
  29.