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 / fillc.c < prev    next >
Text File  |  1994-04-29  |  492b  |  37 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. extern void Fill_Screen(int color);
  9.  
  10.  
  11. void main(void)
  12. {
  13. int t;
  14.  
  15. // set video mode to 320x200 256 color mode
  16.  
  17. Set_Mode(VGA256);
  18.  
  19. // fill the screen with 1's which in the defualt pallete will be blue
  20.  
  21.  
  22. for (t=0; t<1000; t++)
  23. Fill_Screen(t);
  24.  
  25. // wait for keyboard to be hit
  26.  
  27. // while(!kbhit()){}
  28.  
  29. // go back to text mode
  30.  
  31. Set_Mode(TEXT_MODE);
  32.  
  33. } // end main
  34.  
  35.  
  36.  
  37.