2 * $Logfile: /Freespace2/code/Fireball/FireBalls.h $
7 * Prototypes for fireball functions
10 * Revision 1.1 2002/05/03 03:28:11 root
14 * 8 9/13/99 10:09a Andsager
15 * Add debug console commands to lower model render detail and fireball
16 * LOD for big ship explosiosns.
18 * 7 9/06/99 6:57p Jamesa
19 * Cranked down num large fireball explosions.
21 * 6 9/06/99 6:14p Jamesa
22 * Reduced max fireball types.
24 * 5 8/31/99 10:13p Andsager
25 * Add Knossos warp effect fireball
27 * 4 4/28/99 11:13p Dave
28 * Temporary checkin of artillery code.
30 * 3 11/05/98 5:55p Dave
31 * Big pass at reducing #includes
33 * 2 10/07/98 10:52a Dave
36 * 1 10/07/98 10:48a Dave
38 * 34 5/15/98 3:54p John
39 * Added code so that only "perishable" fireballs get removed.
41 * 33 4/15/98 9:42a Adam
42 * added 2 more explosion types (1, actually, but placeholder for 2)
44 * 32 4/12/98 9:56a John
45 * Made lighting detail flags work. Made explosions cast light on
48 * 31 3/30/98 4:02p John
49 * Made machines with < 32 MB of RAM use every other frame of certain
50 * bitmaps. Put in code to keep track of how much RAM we've malloc'd.
52 * 30 3/18/98 12:36p John
53 * Made hardware have nicer looking warp effect
55 * 29 2/26/98 10:07p Hoffoss
56 * Rewrote state saving and restoring to fix bugs and simplify the code.
58 * 28 2/19/98 4:32p Lawrance
59 * Add asteroid explosion
61 * 27 1/23/98 5:06p John
62 * Took L out of vertex structure used B (blue) instead. Took all small
63 * fireballs out of fireball types and used particles instead. Fixed some
64 * debris explosion things. Restructured fireball code. Restructured
65 * some lighting code. Made dynamic lighting on by default. Made groups
66 * of lasers only cast one light. Made fireballs not cast light.
68 * 26 1/15/98 4:58p John
69 * Made warp effect use a looping ani. Made the scaling up & down be in
72 * 25 1/15/98 2:32p John
73 * Added code to optionally take a velocity for a fireball.
75 * 24 1/02/98 5:04p John
76 * Several explosion related changes. Made fireballs not be used as
77 * ani's. Made ship spark system expell particles. Took away impact
78 * explosion for weapon hitting ship... this needs to get added to weapon
79 * info and makes shield hit more obvious. Only make sparks when hit
82 * 23 12/08/97 11:15a John
83 * added parameter to warpout for life.
85 * 22 11/01/97 1:49p John
86 * added code to page fireballs in during level load. Made player warpout
87 * use Adam's new camera movement pattern. Make ships docked to warping
88 * out ships render correctly.
90 * 21 10/24/97 6:24p John
91 * added code to return the life left of a fireball
93 * 20 9/14/97 4:49p Lawrance
94 * extern Num_fireballs
96 * 19 9/12/97 4:02p John
97 * put in ship warp out effect.
98 * put in dynamic lighting for warp in/out
100 * 18 9/09/97 4:49p John
101 * Almost done ship warp in code
103 * 17 9/03/97 4:32p John
104 * changed bmpman to only accept ani and pcx's. made passing .pcx or .ani
105 * to bm_load functions not needed. Made bmpman keep track of palettes
106 * for bitmaps not mapped into game palettes.
108 * 16 8/29/97 2:26p John
109 * first rev of ship warp in effect. Nothing more than a fireball inside
110 * of freespace, but textest.cpp contains the correct effect code that
111 * needs to be transferred into the game next.
113 * 15 8/13/97 9:50p Allender
114 * split *_move into *_process_pre and *_process_post functions.
115 * process_pre functions called before object is moved. _process_post
116 * functions called after object is moved. Reordered code in ship_post
117 * and weapon_post for multiplayer
119 * 14 8/13/97 12:06p Lawrance
120 * supporting multiple types of fireball explosions
122 * 13 7/21/97 11:41a Lawrance
123 * clean up fireballs at the end of each level
125 * 12 7/11/97 11:19a Lawrance
126 * fix mem leaks, move save code from State.cpp here
128 * 11 7/10/97 1:51p Lawrance
129 * sorting anim fireballs
131 * 10 5/14/97 4:08p Lawrance
132 * removing my_index from game arrays
134 * 9 3/11/97 10:47p Mike
135 * Add a slew of secondary weapons.
136 * Support exhaust blobs.
137 * Add weapons that spawn weapons.
138 * Add remotely detonatable weapons.
139 * Add heat-seeking missiles.
141 * 8 2/17/97 5:18p John
142 * Added a bunch of RCS headers to a bunch of old files that don't have
154 // these values correspond to the fireball.tbl entries
155 #define FIREBALL_EXPLOSION_MEDIUM 0 // Used for the 4 little explosions before a ship explodes
156 #define FIREBALL_WARP_EFFECT 1 // Used for the warp in / warp out effect
157 #define FIREBALL_KNOSSOS_EFFECT 2 // Used for the KNOSSOS warp in / warp out effect
158 #define FIREBALL_ASTEROID 3
159 #define FIREBALL_EXPLOSION_LARGE1 4 // Used for the big explosion when a ship breaks into pieces
160 #define FIREBALL_EXPLOSION_LARGE2 5 // Used for the big explosion when a ship breaks into pieces
161 // #define FIREBALL_EXPLOSION_LARGE3 6 // Used for the big explosion when a ship breaks into pieces
162 #define MAX_FIREBALL_TYPES 6 // How many types there are
164 #define FIREBALL_NUM_LARGE_EXPLOSIONS 2
166 void fireball_init();
167 void fireball_render(object * obj);
168 void fireball_delete( object * obj );
169 void fireball_process_pre(object * obj, float frame_time);
170 void fireball_process_post(object * obj, float frame_time);
172 // reversed is for warp_in/out effects
173 // Velocity: If not NULL, the fireball will move at a constant velocity.
174 // warp_lifetime: If warp_lifetime > 0.0f then makes the explosion loop so it lasts this long. Only works for warp effect
175 int fireball_create(vector *pos, int fireball_type, int parent_obj, float size, int reversed=0, vector *velocity=NULL, float warp_lifetime=0.0f, int ship_class=-1, matrix *orient=NULL, int low_res=0);
176 void fireball_render_plane(int plane);
177 void fireball_close();
178 void fireball_level_close();
179 void fireball_preload(); // page in warpout effect data
181 // Returns 1 if you can remove this fireball
182 int fireball_is_perishable(object * obj);
184 // Returns 1 if this fireball is a warp
185 int fireball_is_warp(object * obj);
187 // Returns life left of a fireball in seconds
188 float fireball_lifeleft( object *obj );
190 // Returns life left of a fireball in percent
191 float fireball_lifeleft_percent( object *obj );
193 // internal function to draw warp grid.
194 extern void warpin_render(matrix *orient, vector *pos, int texture_bitmap_num, float radius, float life_percent, float max_radius );
195 extern int Warp_glow_bitmap; // Internal
197 #endif /* _FIREBALLS_H */