home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / TANK11.ZIP / SOURCE.ZIP / EXTERN.H < prev    next >
C/C++ Source or Header  |  1993-01-17  |  3KB  |  73 lines

  1. /* EXTERN.H
  2.  * This file contains all external declarations for the tank program.
  3.  * It is to be included in all modules. The variables are defined in
  4.  * TANK.C
  5.  */
  6.  
  7. /* variables that reflect the current configuration */
  8. extern int NumTanks;                /* number tanks in current game */
  9. extern int TankSpeed;            /* number of main loops between tank movements */
  10. extern int ShotSpeed;            /* number of main loops between shot movements */
  11. extern int ShotRange;
  12. extern int TreesOn;                /* non-zero if Trees option is on */
  13. extern int GuidedShots;            /* non-zero if tank shots are guided */
  14.  
  15. extern char far *vbuf;           /* pointer to video buffer */
  16. extern int  tankColor[];         /* color of each tank */
  17. extern int  TankInitialX[];   /* X coordinate of tank at start of each round */
  18. extern int    TankInitialY[];   /* Y corrdinate of tank at start of each round */
  19. extern tankRec tank[];           /* data for each tank */
  20. extern shotrec shotdata[];       /* data for each shot */
  21. extern treeRec tree[];           /* coordinates of each tree */
  22. extern int    newscreen;            /* non-zero means start a new game    */
  23.  
  24.  
  25.  
  26.  
  27. extern unsigned char field[FIELDX][FIELDY];
  28. /* Field contains the id number of the object at that x,y position.
  29.  *    It is used to determine whic of multiple objects of the same
  30.  *    color (like trees) occupy that position. Any objects that use this
  31.  *    must set pixels corresponding to each non-zero element in its bitmap.
  32.  *    Due to memory considerations, it is valid only for X<FIELDX, Y<FIELDY.
  33.  *    This is not a problem, as there should always be one row free of objects
  34.  *    around the screen border.
  35.  */
  36.  
  37. extern int HitX; /* X coordinate that caused a collision, set by HIT() */
  38. extern int HitY; /* Y coordinate that caused a collision, set by HIT() */
  39.  
  40. /* picture definitions (bitmaps) */
  41. extern char TankUpBM[];
  42. extern char TankDownBM[];
  43. extern char TankLeftBM[];
  44. extern char TankRightBM[];
  45. extern char TankEraseBM[];
  46. extern char ShotBM[];
  47. extern char ShotEraseBM[];
  48. extern char    Explosion1BM[];
  49. extern char Explosion1EraseBM[];
  50. extern char TreeBM[];
  51. extern char TreeEraseBM[];
  52.  
  53.  
  54. /* functions */
  55. extern int  hit();               /* detects collisions, sets HitX,HitY */
  56. extern void drawit();            /* places bit-maps on screen */
  57. extern void restart();            /* sets graphic mode, resets game */
  58. extern void shots();                /* handles creation/movement of tank shots */
  59. extern void TankHit();            /* called when tank gets hit */
  60. extern void mode();                /* sets video mode, optionally clears screen */
  61. extern void DisplayChar13();    /* put character on screen in graphics mode */
  62. extern void PutString13();        /* put string on screen in graphics mode */
  63. extern int config();
  64. extern void SetCursor();
  65.  
  66. /* Keyboard routine */
  67. extern char gr_keys[128];
  68. void gr_start_kbd_grab(void);
  69. void gr_end_kbd_grab(void);
  70. /* MUST BE COMPILED WITHOUT STACK CHECKS AND REGISTER VARIABLES */
  71. /** Vector to the old keyboard interrupt handler **/
  72. extern void interrupt (*gr_old_int9)(void);
  73. void interrupt gr_int9(void);