home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / maj / 4401 / exc.arj / FGDOC / EXAMPLES / C / 11-08.C < prev    next >
Text File  |  1994-01-24  |  614b  |  34 lines

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void main(void);
  6.  
  7. char far buffer[256];
  8.  
  9. void main()
  10. {
  11.    int old_mode, new_mode;
  12.  
  13.    new_mode = fg_bestmode(320,200,1);
  14.    if (new_mode < 0 || new_mode == 12) {
  15.       printf("This program requires a 320 ");
  16.       printf("x 200 color graphics mode.\n");
  17.       exit(1);
  18.       }
  19.  
  20.    old_mode = fg_getmode();
  21.    fg_setmode(new_mode);
  22.  
  23.    fg_setcolor(9);
  24.    fg_text("text",4);
  25.    fg_getblock(buffer,0,31,0,7);
  26.    fg_waitkey();
  27.  
  28.    fg_putblock(buffer,8,39,8,15);
  29.    fg_waitkey();
  30.  
  31.    fg_setmode(old_mode);
  32.    fg_reset();
  33. }
  34.