home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / fgl / fglight / exc.arj / TEMP / 11-06.C < prev    next >
Text File  |  1995-01-20  |  687b  |  36 lines

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void main(void);
  6.  
  7. void main()
  8. {
  9.    int new_mode, old_mode;
  10.  
  11.    fg_initpm();
  12.    new_mode = fg_bestmode(320,200,1);
  13.    if (new_mode < 0 || new_mode == 12)
  14.    {
  15.       printf("This program requires a 320 ");
  16.       printf("x 200 color graphics mode.\n");
  17.       exit(1);
  18.    }
  19.    old_mode = fg_getmode();
  20.    fg_setmode(new_mode);
  21.  
  22.    fg_setcolor(7);
  23.    fg_rect(0,159,0,99);
  24.    fg_setcolor(9);
  25.    fg_locate(6,6);
  26.    fg_text("quadrant",8);
  27.    fg_waitkey();
  28.  
  29.    fg_transfer(0,159,0,99,160, 99,0,0);
  30.    fg_transfer(0,319,0,99,  0,199,0,0);
  31.    fg_waitkey();
  32.  
  33.    fg_setmode(old_mode);
  34.    fg_reset();
  35. }
  36.