home *** CD-ROM | disk | FTP | other *** search
/ Teach Yourself Game Programming in 21 Days / TYGAMES_R.ISO / source / day_11 / graph6.h < prev    next >
Text File  |  1994-05-30  |  2KB  |  70 lines

  1.  
  2. // GRAPH6.H
  3.  
  4. // D E F I N E S /////////////////////////////////////////////////////////////
  5.  
  6. #define NUM_WORMS 320
  7.  
  8. #define VGA_INPUT_STATUS_1   0x3DA // vga status reg 1, bit 3 is the vsync
  9.                                    // when 1 - retrace in progress
  10.                                    // when 0 - no retrace
  11.  
  12. #define VGA_VSYNC_MASK 0x08        // masks off unwanted bit of status reg
  13.  
  14. // S T R U C T U R E S //////////////////////////////////////////////////////
  15.  
  16. typedef struct worm_typ
  17.         {
  18.         int y;       // current y position of worm
  19.         int color;   // color of worm
  20.         int speed;   // speed of worm
  21.         int counter; // counter
  22.  
  23.         } worm, *worm_ptr;
  24.  
  25. // E X T E R N A L S /////////////////////////////////////////////////////////
  26.  
  27. extern unsigned char far *double_buffer;
  28.  
  29. extern unsigned int buffer_height;
  30.  
  31. extern unsigned int buffer_size;
  32.  
  33. // P R O T O T Y P E S ///////////////////////////////////////////////////////
  34.  
  35. void Show_Double_Buffer(char far *buffer);
  36.  
  37. int Create_Double_Buffer(int num_lines);
  38.  
  39. void Fill_Double_Buffer(int color);
  40.  
  41. void Delete_Double_Buffer(void);
  42.  
  43. void Plot_Pixel_Fast_DB(int x,int y,unsigned char color);
  44.  
  45. void Scale_Sprite(sprite_ptr sprite,float scale);
  46.  
  47. void Fade_Lights(void);
  48.  
  49. void Disolve(void);
  50.  
  51. void Melt(void);
  52.  
  53. void Sheer(void);
  54.  
  55. void Wait_For_Vsync(void);
  56.  
  57. void Behind_Sprite_DB(sprite_ptr sprite);
  58.  
  59. void Erase_Sprite_DB(sprite_ptr sprite);
  60.  
  61. void Draw_Sprite_DB(sprite_ptr sprite);
  62.  
  63. // slipped these in to see if you are paying attention!
  64.  
  65. void Blit_Char_DB(int xc,int yc,char c,int color,int trans_flag);
  66.  
  67. void Blit_String_DB(int x,int y,int color, char *string,int trans_flag);
  68.  
  69.  
  70.