]> icculus.org git repositories - taylor/freespace2.git/blob - include/neblightning.h
Initial revision
[taylor/freespace2.git] / include / neblightning.h
1 /*
2  * $Logfile: /Freespace2/code/Nebula/NebLightning.h $
3  * $Revision$
4  * $Date$
5  * $Author$
6  *
7  * Nebula effect
8  *
9  * $Log$
10  * Revision 1.1  2002/05/03 03:28:12  root
11  * Initial revision
12  * 
13  * 
14  * 4     7/02/99 4:31p Dave
15  * Much more sophisticated lightning support.
16  * 
17  * 3     5/26/99 11:46a Dave
18  * Added ship-blasting lighting and made the randomization of lighting
19  * much more customizable.
20  * 
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.
24  * 
25  * $NoKeywords: $
26  */
27
28 #ifndef __FS2_NEBULA_LIGHTNING_HEADER_FILE
29 #define __FS2_NEBULA_LIGHTNING_HEADER_FILE
30
31 // ------------------------------------------------------------------------------------------------------
32 // NEBULA LIGHTNING DEFINES/VARS
33 //
34
35 // lightning bolt types
36 #define MAX_BOLT_TYPES                                  10
37 #define DEBUG_BOLT                                              MAX_BOLT_TYPES
38
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];
43
44         ubyte           num_bolt_types;                                 // how many different bolt types you'll see in the nebula
45
46         char            bolt_types[MAX_BOLT_TYPES];     // indices into the lightning types     
47
48         vector  flavor;                                                         // flavor of the storm
49
50         int             min, max;                                                       // min and max delay between bolt firing.       
51         int             min_count, max_count;                   // # of bolts spewed
52 } storm_type;
53
54 extern int Num_storm_types;
55 extern storm_type Storm_types[MAX_STORM_TYPES];
56
57 // nebula lightning intensity (0.0 to 1.0)
58 extern float Nebl_intensity;
59
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
63
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
67
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
71
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
75
76 #define BOLT_TYPE_ANY                                   -2
77
78 // ------------------------------------------------------------------------------------------------------
79 // NEBULA LIGHTNING FUNCTIONS
80 //
81
82 // initialize nebula lightning at game startup
83 void nebl_init();
84
85 // initialize lightning before entering a level
86 void nebl_level_init();
87
88 // render all lightning bolts
89 void nebl_render_all();
90
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);
93
94 // process lightning (randomly generate bolts, etc, etc);
95 void nebl_process();
96
97 // get the current # of active lightning bolts
98 int nebl_get_active_bolts();
99
100 // get the current # of active nodes
101 int nebl_get_active_nodes();
102
103 // set the storm (call from mission parse)
104 void nebl_set_storm(char *name);
105
106 #endif
107