POWERUP.H 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. /*
  2. THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
  3. SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
  4. END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
  5. ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
  6. IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
  7. SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
  8. FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
  9. CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
  10. AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
  11. COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
  12. */
  13. /*
  14. * $Source: f:/miner/source/main/rcs/powerup.h $
  15. * $Revision: 2.0 $
  16. * $Author: john $
  17. * $Date: 1995/02/27 11:27:35 $
  18. *
  19. * Powerup header file.
  20. *
  21. * $Log: powerup.h $
  22. * Revision 2.0 1995/02/27 11:27:35 john
  23. * New version 2.0, which has no anonymous unions, builds with
  24. * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
  25. *
  26. * Revision 1.34 1995/02/06 15:52:37 mike
  27. * add mini megawow powerup for giving reasonable weapons.
  28. *
  29. * Revision 1.33 1995/01/30 17:14:11 mike
  30. * halve rate of vulcan ammo consumption.
  31. *
  32. * Revision 1.32 1995/01/15 20:47:56 mike
  33. * add lighting field to powerups.
  34. *
  35. * Revision 1.31 1994/12/12 21:39:58 matt
  36. * Changed vulcan ammo: 10K max, 5K w/weapon, 1250 per powerup
  37. *
  38. * Revision 1.30 1994/12/07 12:55:26 mike
  39. * tweak vulcan amounts.
  40. *
  41. * Revision 1.29 1994/12/02 20:06:46 matt
  42. * Made vulcan ammo print at approx 25 times actual
  43. *
  44. * Revision 1.28 1994/10/26 15:56:27 yuan
  45. * Made vulcan cannon give 100 ammo if it has less than that.
  46. *
  47. * Revision 1.27 1994/10/15 19:07:10 mike
  48. * Define constants for amount of vulcan ammo per powerup.
  49. *
  50. * Revision 1.26 1994/09/26 13:29:38 matt
  51. * Added extra life each 100,000 points, and show icons on HUD for num lives
  52. *
  53. * Revision 1.25 1994/09/22 19:00:25 mike
  54. * Kill constants ENERGY_BOOST and SHIELD_BOOST: it's now difficulty level dependent.
  55. *
  56. * Revision 1.24 1994/09/20 19:46:11 mike
  57. * Fix powerup number assignments.
  58. *
  59. * Revision 1.23 1994/09/02 11:53:34 mike
  60. * Add the megawow powerup. If you don't know about it, that's because it's a secret.
  61. *
  62. * Revision 1.22 1994/09/01 10:41:35 matt
  63. * Sizes for powerups now specified in bitmaps.tbl; blob bitmaps now plot
  64. * correctly if width & height of bitmap are different.
  65. *
  66. * Revision 1.21 1994/08/31 19:26:14 mike
  67. * Start adding new pile of powerups.
  68. *
  69. * Revision 1.20 1994/08/25 17:56:08 matt
  70. * Added quad laser powerup
  71. *
  72. * Revision 1.19 1994/08/18 15:11:50 mike
  73. * missile powerups.
  74. *
  75. * Revision 1.18 1994/08/09 17:54:33 adam
  76. * upped no. of powerup types
  77. *
  78. * Revision 1.17 1994/08/09 17:53:39 adam
  79. * *** empty log message ***
  80. *
  81. * Revision 1.16 1994/07/27 19:44:16 mike
  82. * Objects containing objects.
  83. *
  84. * Revision 1.15 1994/07/26 18:31:32 mike
  85. * Move some constants here from eobject.c.
  86. *
  87. * Revision 1.14 1994/07/20 17:35:03 yuan
  88. * Some minor bug fixes and new key gauges...
  89. *
  90. * Revision 1.13 1994/07/12 15:53:23 john
  91. * *** empty log message ***
  92. *
  93. * Revision 1.12 1994/07/12 15:30:47 mike
  94. * Prototype diminish_towards_max.
  95. *
  96. * Revision 1.11 1994/07/07 14:59:04 john
  97. * Made radar powerups.
  98. *
  99. *
  100. * Revision 1.10 1994/07/01 16:35:40 yuan
  101. * Added key system
  102. *
  103. * Revision 1.9 1994/06/29 19:43:33 matt
  104. * Made powerup animation not happen in render routine
  105. *
  106. * Revision 1.8 1994/06/21 18:54:03 matt
  107. * Added support for powerups that don't get picked up if not needed, but this
  108. * feature is commented out at the end of do_powerup(), since the physics gave
  109. * me all sorts of problems, with the player getting stuck on a powerup.
  110. *
  111. * Revision 1.7 1994/06/08 18:16:32 john
  112. * Bunch of new stuff that basically takes constants out of the code
  113. * and puts them into bitmaps.tbl.
  114. *
  115. * Revision 1.6 1994/05/18 13:26:30 yuan
  116. * *** empty log message ***
  117. *
  118. * Revision 1.5 1994/05/17 17:01:48 yuan
  119. * Added constant for boosts.
  120. *
  121. * Revision 1.4 1994/04/06 14:42:50 yuan
  122. * Adding new powerups.
  123. *
  124. * Revision 1.3 1994/04/01 14:36:59 yuan
  125. * John's head is an extra life...
  126. *
  127. * Revision 1.2 1994/04/01 11:15:22 yuan
  128. * Added multiple bitmap functionality to all objects...
  129. * (hostages, powerups, lasers, etc.)
  130. * Hostages and powerups are implemented in the object system,
  131. * just need to finish function call to "affect" player.
  132. *
  133. * Revision 1.1 1994/03/31 17:01:43 yuan
  134. * Initial revision
  135. *
  136. *
  137. */
  138. #ifndef _POWERUP_H
  139. #define _POWERUP_H
  140. #include "vclip.h"
  141. #define POW_EXTRA_LIFE 0
  142. #define POW_ENERGY 1
  143. #define POW_SHIELD_BOOST 2
  144. #define POW_LASER 3
  145. #define POW_KEY_BLUE 4
  146. #define POW_KEY_RED 5
  147. #define POW_KEY_GOLD 6
  148. #define POW_RADAR_ROBOTS 7
  149. #define POW_RADAR_POWERUPS 8
  150. #define POW_FULL_MAP 9
  151. #define POW_MISSILE_1 10
  152. #define POW_MISSILE_4 11
  153. #define POW_QUAD_FIRE 12
  154. //--#define POW_VULCAN_WEAPON 13
  155. //--#define POW_SPREADFIRE_WEAPON 14
  156. //--#define POW_PLASMA_WEAPON 15
  157. //--#define POW_FUSION_WEAPON 16
  158. //--#define POW_PROXIMITY_WEAPON 17
  159. //--#define POW_SMARTBOMB_WEAPON 18
  160. //--#define POW_MEGA_WEAPON 19
  161. //--#define POW_VULCAN_AMMO 20
  162. //--#define POW_HOMING_AMMO_1 21
  163. //--#define POW_HOMING_AMMO_4 22
  164. //--#define POW_CLOAK 23
  165. //--#define POW_TURBO 24
  166. //--#define POW_INVULNERABILITY 25
  167. //--#define POW_HEADLIGHT 26
  168. //--#define POW_MEGAWOW 27
  169. #define POW_VULCAN_WEAPON 13
  170. #define POW_SPREADFIRE_WEAPON 14
  171. #define POW_PLASMA_WEAPON 15
  172. #define POW_FUSION_WEAPON 16
  173. #define POW_PROXIMITY_WEAPON 17
  174. #define POW_SMARTBOMB_WEAPON 20 //18
  175. #define POW_MEGA_WEAPON 21 //19
  176. #define POW_VULCAN_AMMO 22 //20
  177. #define POW_HOMING_AMMO_1 18 //21
  178. #define POW_HOMING_AMMO_4 19 //22
  179. #define POW_CLOAK 23
  180. #define POW_TURBO 24
  181. #define POW_INVULNERABILITY 25
  182. #define POW_HEADLIGHT 26
  183. #define POW_MEGAWOW 27
  184. #define VULCAN_AMMO_MAX (392*2)
  185. #define VULCAN_WEAPON_AMMO_AMOUNT 196
  186. #define VULCAN_AMMO_AMOUNT (49*2)
  187. // What I picked up What it said I picked up
  188. // ---------------- ------------------------
  189. // vulcan ammo 4 homing missiles
  190. // mega missile 1 homing missile
  191. // smart missile vulcan ammo
  192. // 4 homing missiles mega missile
  193. // 1 homing missile smart missile
  194. //
  195. // The rest were correct. I can help you with this whenever you're free.
  196. #define MAX_POWERUP_TYPES 29
  197. #define POWERUP_NAME_LENGTH 16 // Length of a robot or powerup name.
  198. extern char Powerup_names[MAX_POWERUP_TYPES][POWERUP_NAME_LENGTH];
  199. typedef struct powerup_type_info {
  200. int vclip_num;
  201. int hit_sound;
  202. fix size; //3d size of longest dimension
  203. fix light; // amount of light cast by this powerup, set in bitmaps.tbl
  204. } powerup_type_info;
  205. extern int N_powerup_types;
  206. extern powerup_type_info Powerup_info[MAX_POWERUP_TYPES];
  207. void draw_powerup(object *obj);
  208. //returns true if powerup consumed
  209. int do_powerup(object *obj);
  210. //process (animate) a powerup for one frame
  211. void do_powerup_frame(object *obj);
  212. // Diminish shields and energy towards max in case they exceeded it.
  213. extern void diminish_towards_max(void);
  214. extern void do_megawow_powerup(int quantity);
  215. extern powerup_basic(int redadd, int greenadd, int blueadd, int score, char *format, ...);
  216. #endif
  217.