2 * $Logfile: /Freespace2/code/Nebula/NebLightning.h $
10 * Revision 1.1 2002/05/03 03:28:12 root
14 * 4 7/02/99 4:31p Dave
15 * Much more sophisticated lightning support.
17 * 3 5/26/99 11:46a Dave
18 * Added ship-blasting lighting and made the randomization of lighting
19 * much more customizable.
21 * 2 5/24/99 5:45p Dave
22 * Added detail levels to the nebula, with a decent speedup. Split nebula
23 * lightning into its own section.
28 #ifndef __FS2_NEBULA_LIGHTNING_HEADER_FILE
29 #define __FS2_NEBULA_LIGHTNING_HEADER_FILE
31 // ------------------------------------------------------------------------------------------------------
32 // NEBULA LIGHTNING DEFINES/VARS
35 // lightning bolt types
36 #define MAX_BOLT_TYPES 10
37 #define DEBUG_BOLT MAX_BOLT_TYPES
39 // storm types - needs to be here for Fred. blech
40 #define MAX_STORM_TYPES 10
41 typedef struct storm_type {
42 char name[NAME_LENGTH];
44 ubyte num_bolt_types; // how many different bolt types you'll see in the nebula
46 char bolt_types[MAX_BOLT_TYPES]; // indices into the lightning types
48 vector flavor; // flavor of the storm
50 int min, max; // min and max delay between bolt firing.
51 int min_count, max_count; // # of bolts spewed
54 extern int Num_storm_types;
55 extern storm_type Storm_types[MAX_STORM_TYPES];
57 // nebula lightning intensity (0.0 to 1.0)
58 extern float Nebl_intensity;
60 // min and max times for random lightning
61 extern int Nebl_random_min; // min random time
62 extern int Nebl_random_max; // max random time
64 // min and max times for cruiser lightning
65 extern int Nebl_cruiser_min; // min cruiser time
66 extern int Nebl_cruiser_max; // max cruiser time
68 // min and max times for cap ships
69 extern int Nebl_cap_min; // min cap time
70 extern int Nebl_cap_max; // max cap time
72 // min and max time for super caps
73 extern int Nebl_supercap_min; // min supercap time
74 extern int Nebl_supercap_max; // max supercap time
76 #define BOLT_TYPE_ANY -2
78 // ------------------------------------------------------------------------------------------------------
79 // NEBULA LIGHTNING FUNCTIONS
82 // initialize nebula lightning at game startup
85 // initialize lightning before entering a level
86 void nebl_level_init();
88 // render all lightning bolts
89 void nebl_render_all();
91 // create a lightning bolt - pass BOLT_TYPE_ANY to get a random bolt
92 void nebl_bolt(int bolt_type, vector *start, vector *strike);
94 // process lightning (randomly generate bolts, etc, etc);
97 // get the current # of active lightning bolts
98 int nebl_get_active_bolts();
100 // get the current # of active nodes
101 int nebl_get_active_nodes();
103 // set the storm (call from mission parse)
104 void nebl_set_storm(char *name);