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

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