home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Game Programming Gurus / Tricks_of_the_Game_Programming_Gurus_SAMS_Publishing_1994.iso / source / chap_02 / setmodec.c < prev    next >
Text File  |  1994-04-29  |  326b  |  29 lines

  1.  
  2. #include <stdio.h>
  3.  
  4. #define VGA256 0x13
  5. #define TEXT_MODE 0x03
  6.  
  7. extern void Set_Mode(int mode);
  8.  
  9.  
  10. void main(void)
  11. {
  12.  
  13. // set video mode to 320x200 256 color mode
  14.  
  15. Set_Mode(VGA256);
  16.  
  17. // wait for keyboard to be hit
  18.  
  19. while(!kbhit()){}
  20.  
  21. // go back to text mode
  22.  
  23. Set_Mode(TEXT_MODE);
  24.  
  25. } // end main
  26.  
  27.  
  28.  
  29.