Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

199 lines
5.1 KiB

  1. /*==========================================================================
  2. *
  3. * Copyright (c) 1995 - 1997 Microsoft Corporation. All Rights Reserved.
  4. * Copyright (C) 1994-1995 ATI Technologies Inc. All Rights Reserved.
  5. *
  6. * File: gameproc.h
  7. * Content: include file for game processing info
  8. *
  9. ***************************************************************************/
  10. #ifndef __GAMEPROC_INCLUDED__
  11. #define __GAMEPROC_INCLUDED__
  12. typedef enum enum_POSITION {
  13. P_ABSOLUTE,
  14. P_RELATIVE,
  15. P_AUTOMATIC
  16. } POSITION;
  17. typedef enum enum_SWITCHING {
  18. HOR,
  19. VER,
  20. TIMESWITCH
  21. } SWITCHING;
  22. typedef enum enum_DIRECTION {
  23. SAME,
  24. RIGHT,
  25. LEFT
  26. } DIRECTION;
  27. typedef enum enum_ACTION {
  28. NONE,
  29. STILL,
  30. WALK,
  31. RUN,
  32. JUMP,
  33. THROW,
  34. CROUCH,
  35. STOP,
  36. STUNNED,
  37. JUMPTHROW,
  38. CROUCHWALK,
  39. BLURR,
  40. STRIKE,
  41. MISS,
  42. CHEW,
  43. } ACTION;
  44. typedef SHORT HPOSLIST;
  45. typedef BOOL HSURFACELIST;
  46. typedef struct struct_HPLANE {
  47. GFX_HBM *hBM;
  48. BOOL *surface;
  49. LONG x;
  50. LONG y;
  51. USHORT width;
  52. USHORT height;
  53. LONG xv;
  54. LONG xslide;
  55. LONG xincrem;
  56. USHORT denom;
  57. } HPLANE, FAR *LPHPLANE;
  58. typedef struct struct_HSPRITE_BM {
  59. GFX_HBM hBM;
  60. ACTION action;
  61. DIRECTION direction;
  62. SHORT x;
  63. SHORT y;
  64. USHORT width;
  65. USHORT height;
  66. } HSPRITE_BM;
  67. typedef struct struct_HSPRITE {
  68. HSPRITE_BM *hSBM;
  69. USHORT bitmapCount;
  70. ACTION currentAction;
  71. DIRECTION currentDirection;
  72. USHORT currentBitmap;
  73. BOOL active;
  74. LONG x;
  75. LONG y;
  76. USHORT width;
  77. USHORT height;
  78. LONG xv;
  79. LONG yv;
  80. LONG xa;
  81. LONG ya;
  82. SHORT xmax;
  83. SHORT ymax;
  84. LONG absSwitch;
  85. LONG relSwitch;
  86. SWITCHING switchType;
  87. BOOL switchForward;
  88. BOOL switchDone;
  89. } HSPRITE, FAR *LPHSPRITE, FAR * FAR *LPLPHSPRITE;
  90. typedef struct struct_HBITMAPLIST
  91. {
  92. GFX_HBM *hBM;
  93. } HBITMAPLIST, FAR *LPHBITMAPLIST;
  94. #include "tile.h"
  95. #include "plane.h"
  96. #include "sprite.h"
  97. #define C_UNIT (LONG) 65536
  98. #define C_TILE_W 32
  99. #define C_TILE_H 32
  100. #define C_SCREEN_W 640
  101. #define C_SCREEN_H 480
  102. #define C_FORE_W 80
  103. #define C_FORE_H 15
  104. #define C_MID_W 40
  105. #define C_MID_H 15
  106. #define C_BACK_W 25
  107. #define C_BACK_H 15
  108. #define C_WORLD_W 20
  109. #define C_WORLD_H 15
  110. #define C_BACK_DENOM 12
  111. #define C_MID_DENOM 3
  112. #define C_FORE_DENOM 1
  113. #define C_TILETOTAL 123 // TILE BITMAP TOTAL
  114. #define C_FBT 112 // FOX BITMAP TOTAL
  115. #define C_BBT 26 // BEAR BITMAP TOTAL
  116. #define C_FOXSTILL 1 // NUMBER OF BITMAPS
  117. #define C_FOXWALK 12
  118. #define C_FOXRUN 16
  119. #define C_FOXJUMP 4
  120. #define C_FOXTHROW 2
  121. #define C_FOXCROUCH 1
  122. #define C_FOXSTOP 1
  123. #define C_FOXSTUNNED 1
  124. #define C_FOXJUMPTHROW 2
  125. #define C_FOXCROUCHWALK 12
  126. #define C_FOXBLURR 4
  127. #define C_BEARMISS 2
  128. #define C_BEARWALK 12
  129. #define C_BEARSTRIKE 12
  130. #define C_FOX_XMOVE (LONG) C_UNIT / 4
  131. #define C_BOUNDINCREM (LONG) 5 * C_UNIT
  132. #define C_BOUNDDIF (LONG) 240 * C_UNIT
  133. #define C_FOX_STARTX (LONG) 150 * C_UNIT
  134. #define C_FOX_STARTY (LONG) 318 * C_UNIT
  135. #define C_FOX_WALKMOVE (LONG) 6 * C_UNIT
  136. #define C_FOX_RUNMOVE (LONG) 18 * C_UNIT
  137. #define C_FOX_JUMPMOVE (LONG) 9 * C_UNIT
  138. #define C_FOX_WALKSWITCH (LONG) 6 * C_UNIT
  139. #define C_FOX_JUMPSWITCH (LONG) 9 * C_UNIT
  140. #define C_FOX_THROWSWITCH (LONG) 15 * C_UNIT
  141. #define C_FOX_RUNSWITCH (LONG) 18 * C_UNIT
  142. #define C_FOX_BLURRSWITCH (LONG) 18 * C_UNIT
  143. #define C_FOX_WALKTORUN (LONG) 4 * C_UNIT
  144. #define C_FOX_RUNTOBLURR (LONG) 14 * C_UNIT
  145. #define C_BEAR_STARTX (LONG) 600 * C_UNIT
  146. #define C_BEAR_STARTY (LONG) 329 * C_UNIT
  147. #define C_BEAR_WALKMOVE (LONG) 1 * C_UNIT
  148. #define C_BEAR_WALKSWITCH (LONG) 6 * C_UNIT
  149. #define C_BEAR_STRIKESWITCH (LONG) 8 * C_UNIT
  150. #define C_BEAR_MISSSWITCH (LONG) 10 * C_UNIT
  151. extern void ErrorMessage( LPSTR );
  152. extern BOOL InitBuffer( GFX_HBM* );
  153. extern void DestroyBuffer( GFX_HBM );
  154. extern HBITMAPLIST *LoadBitmaps( void );
  155. extern void InitTiles( HBITMAPLIST**, HBITMAPLIST*, USHORT );
  156. extern void InitPlane( HPLANE**, HPOSLIST**, CHAR*, USHORT, USHORT, USHORT );
  157. extern void InitSurface( HSURFACELIST**, CHAR*, USHORT, USHORT );
  158. extern void InitFox( HSPRITE**, HBITMAPLIST* );
  159. extern void InitBear( HSPRITE**, HBITMAPLIST* );
  160. extern void InitApple( HSPRITE**, HBITMAPLIST* );
  161. extern BOOL PreInitializeGame( void );
  162. extern BOOL InitializeGame( void );
  163. extern BOOL GetInput( void );
  164. extern BOOL ProcessInput ( SHORT input );
  165. extern int NewGameFrame( void );
  166. extern void DestroyGame( void );
  167. #endif