]> icculus.org git repositories - btb/d2x.git/blob - main/fireball.h
fix win32 eof bug
[btb/d2x.git] / main / fireball.h
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-1999 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
12 */
13
14
15
16 #ifndef _FIREBALL_H
17 #define _FIREBALL_H
18
19 //explosion types
20 #define ET_SPARKS                       0               //little sparks, like when laser hits wall
21 #define ET_MULTI_START  1               //first part of multi-part explosion
22 #define ET_MULTI_SECOND 2               //second part of multi-part explosion
23
24 //data for exploding walls (such as hostage door)
25 typedef struct expl_wall {
26         int segnum,sidenum;
27         fix time;
28 } expl_wall;
29
30 #define MAX_EXPLODING_WALLS                     10
31
32 extern expl_wall expl_wall_list[MAX_EXPLODING_WALLS];
33
34 object *object_create_explosion(short segnum, vms_vector * position, fix size, int vclip_type );
35 object *object_create_muzzle_flash(short segnum, vms_vector * position, fix size, int vclip_type );
36
37 object *object_create_badass_explosion(object *objp, short segnum, 
38                 vms_vector * position, fix size, int vclip_type, 
39                 fix maxdamage, fix maxdistance, fix maxforce, int parent );
40
41 //blows up a badass weapon, creating the badass explosion
42 //return the explosion object
43 object *explode_badass_weapon(object *obj,vms_vector *pos);
44
45 //blows up the player with a badass explosion
46 //return the explosion object
47 object *explode_badass_player(object *obj);
48
49 void explode_object(object *obj,fix delay_time);
50 void do_explosion_sequence(object *obj);
51 void do_debris_frame(object *obj);              //deal with debris for this frame
52
53 void draw_fireball(object *obj);
54
55 void explode_wall(int segnum,int sidenum);
56 void do_exploding_wall_frame(void);
57 void init_exploding_walls(void);
58 extern void maybe_drop_net_powerup(int powerup_type);
59 extern void maybe_replace_powerup_with_energy(object *del_obj);
60
61 extern int get_explosion_vclip(object *obj,int stage);
62 extern int drop_powerup(int type, int id, int num, vms_vector *init_vel, vms_vector *pos, int segnum);
63
64 //creates afterburner blobs behind the specified object
65 void drop_afterburner_blobs(object *obj, int count, fix size_scale, fix lifetime);
66
67 #endif