home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / maj / 4401 / exc.arj / FGDOC / EXAMPLES / C / 11-05.C < prev    next >
Text File  |  1994-01-24  |  533b  |  31 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 old_mode, new_mode;
  10.  
  11.    new_mode = fg_bestmode(320,200,1);
  12.    if (new_mode < 19) {
  13.       printf("This program requires a ");
  14.       printf("256-color graphics mode.\n");
  15.       exit(1);
  16.       }
  17.  
  18.    old_mode = fg_getmode();
  19.    fg_setmode(new_mode);
  20.  
  21.    fg_setcolor(9);
  22.    fg_text("text",4);
  23.    fg_waitkey();
  24.  
  25.    fg_transfer(0,31,0,7,4,15,0,0);
  26.    fg_waitkey();
  27.  
  28.    fg_setmode(old_mode);
  29.    fg_reset();
  30. }
  31.