home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / PROGRAMM / FGL112C.ZIP / 09-19.C < prev    next >
Text File  |  1992-10-05  |  831b  |  44 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 bitmap1[32], bitmap2[32];
  10.    int old_mode, new_mode;
  11.  
  12.    new_mode = fg_bestmode(320,200,1);
  13.    if (new_mode < 0 || new_mode == 12) {
  14.       printf("This program requires a 320 ");
  15.       printf("x 200 color graphics mode.\n");
  16.       exit(1);
  17.       }
  18.  
  19.    old_mode = fg_getmode();
  20.    fg_setmode(new_mode);
  21.  
  22.    fg_setcolor(7);
  23.    fg_rect(0,31,0,7);
  24.    fg_setcolor(9);
  25.    fg_text("text",4);
  26.    fg_waitkey();
  27.  
  28.    fg_move(0,7);
  29.    fg_setcolor(7);
  30.    fg_getmap(bitmap1,4,8);
  31.    fg_setcolor(9);
  32.    fg_getmap(bitmap2,4,8);
  33.  
  34.    fg_move(4,15);
  35.    fg_setcolor(7);
  36.    fg_drawmap(bitmap1,4,8);
  37.    fg_setcolor(9);
  38.    fg_drawmap(bitmap2,4,8);
  39.    fg_waitkey();
  40.  
  41.    fg_setmode(old_mode);
  42.    fg_reset();
  43. }
  44.