1 /* $Id: powerup.h,v 1.4 2003-10-10 09:36:35 btb Exp $ */
3 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
4 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
5 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
6 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
7 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
8 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
9 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
10 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
11 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
12 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
17 * Powerup header file.
20 * Revision 1.1 1995/05/16 16:01:35 allender
23 * Revision 2.0 1995/02/27 11:27:35 john
24 * New version 2.0, which has no anonymous unions, builds with
25 * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
27 * Revision 1.34 1995/02/06 15:52:37 mike
28 * add mini megawow powerup for giving reasonable weapons.
30 * Revision 1.33 1995/01/30 17:14:11 mike
31 * halve rate of vulcan ammo consumption.
33 * Revision 1.32 1995/01/15 20:47:56 mike
34 * add lighting field to powerups.
36 * Revision 1.31 1994/12/12 21:39:58 matt
37 * Changed vulcan ammo: 10K max, 5K w/weapon, 1250 per powerup
39 * Revision 1.30 1994/12/07 12:55:26 mike
40 * tweak vulcan amounts.
42 * Revision 1.29 1994/12/02 20:06:46 matt
43 * Made vulcan ammo print at approx 25 times actual
45 * Revision 1.28 1994/10/26 15:56:27 yuan
46 * Made vulcan cannon give 100 ammo if it has less than that.
48 * Revision 1.27 1994/10/15 19:07:10 mike
49 * Define constants for amount of vulcan ammo per powerup.
51 * Revision 1.26 1994/09/26 13:29:38 matt
52 * Added extra life each 100,000 points, and show icons on HUD for num lives
54 * Revision 1.25 1994/09/22 19:00:25 mike
55 * Kill constants ENERGY_BOOST and SHIELD_BOOST: it's now difficulty level dependent.
57 * Revision 1.24 1994/09/20 19:46:11 mike
58 * Fix powerup number assignments.
60 * Revision 1.23 1994/09/02 11:53:34 mike
61 * Add the megawow powerup. If you don't know about it, that's because it's a secret.
63 * Revision 1.22 1994/09/01 10:41:35 matt
64 * Sizes for powerups now specified in bitmaps.tbl; blob bitmaps now plot
65 * correctly if width & height of bitmap are different.
67 * Revision 1.21 1994/08/31 19:26:14 mike
68 * Start adding new pile of powerups.
70 * Revision 1.20 1994/08/25 17:56:08 matt
71 * Added quad laser powerup
73 * Revision 1.19 1994/08/18 15:11:50 mike
76 * Revision 1.18 1994/08/09 17:54:33 adam
77 * upped no. of powerup types
79 * Revision 1.17 1994/08/09 17:53:39 adam
80 * *** empty log message ***
82 * Revision 1.16 1994/07/27 19:44:16 mike
83 * Objects containing objects.
85 * Revision 1.15 1994/07/26 18:31:32 mike
86 * Move some constants here from eobject.c.
88 * Revision 1.14 1994/07/20 17:35:03 yuan
89 * Some minor bug fixes and new key gauges...
91 * Revision 1.13 1994/07/12 15:53:23 john
92 * *** empty log message ***
94 * Revision 1.12 1994/07/12 15:30:47 mike
95 * Prototype diminish_towards_max.
97 * Revision 1.11 1994/07/07 14:59:04 john
98 * Made radar powerups.
101 * Revision 1.10 1994/07/01 16:35:40 yuan
104 * Revision 1.9 1994/06/29 19:43:33 matt
105 * Made powerup animation not happen in render routine
107 * Revision 1.8 1994/06/21 18:54:03 matt
108 * Added support for powerups that don't get picked up if not needed, but this
109 * feature is commented out at the end of do_powerup(), since the physics gave
110 * me all sorts of problems, with the player getting stuck on a powerup.
112 * Revision 1.7 1994/06/08 18:16:32 john
113 * Bunch of new stuff that basically takes constants out of the code
114 * and puts them into bitmaps.tbl.
116 * Revision 1.6 1994/05/18 13:26:30 yuan
117 * *** empty log message ***
119 * Revision 1.5 1994/05/17 17:01:48 yuan
120 * Added constant for boosts.
122 * Revision 1.4 1994/04/06 14:42:50 yuan
123 * Adding new powerups.
125 * Revision 1.3 1994/04/01 14:36:59 yuan
126 * John's head is an extra life...
128 * Revision 1.2 1994/04/01 11:15:22 yuan
129 * Added multiple bitmap functionality to all objects...
130 * (hostages, powerups, lasers, etc.)
131 * Hostages and powerups are implemented in the object system,
132 * just need to finish function call to "affect" player.
134 * Revision 1.1 1994/03/31 17:01:43 yuan
146 #define POW_EXTRA_LIFE 0
148 #define POW_SHIELD_BOOST 2
151 #define POW_KEY_BLUE 4
152 #define POW_KEY_RED 5
153 #define POW_KEY_GOLD 6
155 //#define POW_RADAR_ROBOTS 7
156 //#define POW_RADAR_POWERUPS 8
158 #define POW_MISSILE_1 10
159 #define POW_MISSILE_4 11 // 4-pack MUST follow single missile
161 #define POW_QUAD_FIRE 12
163 #define POW_VULCAN_WEAPON 13
164 #define POW_SPREADFIRE_WEAPON 14
165 #define POW_PLASMA_WEAPON 15
166 #define POW_FUSION_WEAPON 16
167 #define POW_PROXIMITY_WEAPON 17
168 #define POW_SMARTBOMB_WEAPON 20
169 #define POW_MEGA_WEAPON 21
170 #define POW_VULCAN_AMMO 22
171 #define POW_HOMING_AMMO_1 18
172 #define POW_HOMING_AMMO_4 19 // 4-pack MUST follow single missile
175 #define POW_INVULNERABILITY 25
176 #define POW_MEGAWOW 27
178 #define POW_GAUSS_WEAPON 28
179 #define POW_HELIX_WEAPON 29
180 #define POW_PHOENIX_WEAPON 30
181 #define POW_OMEGA_WEAPON 31
183 #define POW_SUPER_LASER 32
184 #define POW_FULL_MAP 33
185 #define POW_CONVERTER 34
186 #define POW_AMMO_RACK 35
187 #define POW_AFTERBURNER 36
188 #define POW_HEADLIGHT 37
190 #define POW_SMISSILE1_1 38
191 #define POW_SMISSILE1_4 39 // 4-pack MUST follow single missile
192 #define POW_GUIDED_MISSILE_1 40
193 #define POW_GUIDED_MISSILE_4 41 // 4-pack MUST follow single missile
194 #define POW_SMART_MINE 42
195 #define POW_MERCURY_MISSILE_1 43
196 #define POW_MERCURY_MISSILE_4 44 // 4-pack MUST follow single missile
197 #define POW_EARTHSHAKER_MISSILE 45
199 #define POW_FLAG_BLUE 46
200 #define POW_FLAG_RED 47
202 #define POW_HOARD_ORB 7 // use unused slot
205 #define VULCAN_AMMO_MAX (392*4)
206 #define VULCAN_WEAPON_AMMO_AMOUNT 196
207 #define VULCAN_AMMO_AMOUNT (49*2)
209 #define GAUSS_WEAPON_AMMO_AMOUNT 392
211 #define MAX_POWERUP_TYPES 50
213 #define POWERUP_NAME_LENGTH 16 // Length of a robot or powerup name.
214 extern char Powerup_names[MAX_POWERUP_TYPES][POWERUP_NAME_LENGTH];
216 extern int Headlight_active_default; // is headlight on when picked up?
218 typedef struct powerup_type_info {
221 fix size; // 3d size of longest dimension
222 fix light; // amount of light cast by this powerup, set in bitmaps.tbl
223 } __pack__ powerup_type_info;
225 extern int N_powerup_types;
226 extern powerup_type_info Powerup_info[MAX_POWERUP_TYPES];
228 void draw_powerup(object *obj);
230 //returns true if powerup consumed
231 int do_powerup(object *obj);
233 //process (animate) a powerup for one frame
234 void do_powerup_frame(object *obj);
236 // Diminish shields and energy towards max in case they exceeded it.
237 extern void diminish_towards_max(void);
239 extern void do_megawow_powerup(int quantity);
241 extern void powerup_basic(int redadd, int greenadd, int blueadd, int score, char *format, ...);
244 #define powerup_type_info_read_n(pti, n, fp) cfread(pti, sizeof(powerup_type_info), n, fp)
247 * reads n powerup_type_info structs from a CFILE
249 extern int powerup_type_info_read_n(powerup_type_info *pti, int n, CFILE *fp);
252 #endif /* _POWERUP_H */