home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / PROGRAMM / FGL112C.ZIP / 06-07.C < prev    next >
Text File  |  1992-10-05  |  637b  |  35 lines

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void main(void);
  6.  
  7. #define VERTICES 10
  8.  
  9. int x[] = {200,300,400,400,300,240,160,160,200,200};
  10. int y[] = {100, 80,100,220,320,320,240,200,160,160};
  11.  
  12. void main()
  13. {
  14.    int old_mode;
  15.  
  16.    old_mode = fg_getmode();
  17.  
  18.    if (fg_testmode(16,1))
  19.       fg_setmode(16);
  20.    else if (fg_testmode(15,1))
  21.       fg_setmode(15);
  22.    else {
  23.       printf("This program requires a 640 x 350 ");
  24.       printf("EGA graphics mode.\n");
  25.       exit(1);
  26.       }
  27.  
  28.    fg_setcolor(1);
  29.    fg_polygon(x,y,VERTICES);
  30.    fg_waitkey();
  31.  
  32.    fg_setmode(old_mode);
  33.    fg_reset();
  34. }
  35.