]> icculus.org git repositories - taylor/freespace2.git/blob - include/neblightning.h
re-add PXO sources to project files
[taylor/freespace2.git] / include / neblightning.h
1 /*
2  * Copyright (C) Volition, Inc. 1999.  All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell 
5  * or otherwise commercially exploit the source or things you created based on
6  * the source.
7  */
8
9 /*
10  * $Logfile: /Freespace2/code/Nebula/NebLightning.h $
11  * $Revision$
12  * $Date$
13  * $Author$
14  *
15  * Nebula effect
16  *
17  * $Log$
18  * Revision 1.2  2002/06/09 04:41:14  relnev
19  * added copyright header
20  *
21  * Revision 1.1.1.1  2002/05/03 03:28:12  root
22  * Initial import.
23  * 
24  * 
25  * 4     7/02/99 4:31p Dave
26  * Much more sophisticated lightning support.
27  * 
28  * 3     5/26/99 11:46a Dave
29  * Added ship-blasting lighting and made the randomization of lighting
30  * much more customizable.
31  * 
32  * 2     5/24/99 5:45p Dave
33  * Added detail levels to the nebula, with a decent speedup. Split nebula
34  * lightning into its own section.
35  * 
36  * $NoKeywords: $
37  */
38
39 #ifndef __FS2_NEBULA_LIGHTNING_HEADER_FILE
40 #define __FS2_NEBULA_LIGHTNING_HEADER_FILE
41
42 // ------------------------------------------------------------------------------------------------------
43 // NEBULA LIGHTNING DEFINES/VARS
44 //
45
46 // lightning bolt types
47 #define MAX_BOLT_TYPES                                  10
48 #define DEBUG_BOLT                                              MAX_BOLT_TYPES
49
50 // storm types - needs to be here for Fred. blech
51 #define MAX_STORM_TYPES                                                 10
52 typedef struct storm_type {
53         char            name[NAME_LENGTH];
54
55         ubyte           num_bolt_types;                                 // how many different bolt types you'll see in the nebula
56
57         char            bolt_types[MAX_BOLT_TYPES];     // indices into the lightning types     
58
59         vector  flavor;                                                         // flavor of the storm
60
61         int             min, max;                                                       // min and max delay between bolt firing.       
62         int             min_count, max_count;                   // # of bolts spewed
63 } storm_type;
64
65 extern int Num_storm_types;
66 extern storm_type Storm_types[MAX_STORM_TYPES];
67
68 // nebula lightning intensity (0.0 to 1.0)
69 extern float Nebl_intensity;
70
71 // min and max times for random lightning
72 extern int Nebl_random_min;                     // min random time
73 extern int Nebl_random_max;                     // max random time
74
75 // min and max times for cruiser lightning
76 extern int Nebl_cruiser_min;                    // min cruiser time
77 extern int Nebl_cruiser_max;                    // max cruiser time
78
79 // min and max times for cap ships
80 extern int Nebl_cap_min;                                // min cap time
81 extern int Nebl_cap_max;                                // max cap time
82
83 // min and max time for super caps
84 extern int Nebl_supercap_min;                   // min supercap time
85 extern int Nebl_supercap_max;                   // max supercap time
86
87 #define BOLT_TYPE_ANY                                   -2
88
89 // ------------------------------------------------------------------------------------------------------
90 // NEBULA LIGHTNING FUNCTIONS
91 //
92
93 // initialize nebula lightning at game startup
94 void nebl_init();
95
96 // initialize lightning before entering a level
97 void nebl_level_init();
98
99 // render all lightning bolts
100 void nebl_render_all();
101
102 // create a lightning bolt - pass BOLT_TYPE_ANY to get a random bolt
103 void nebl_bolt(int bolt_type, vector *start, vector *strike);
104
105 // process lightning (randomly generate bolts, etc, etc);
106 void nebl_process();
107
108 // get the current # of active lightning bolts
109 int nebl_get_active_bolts();
110
111 // get the current # of active nodes
112 int nebl_get_active_nodes();
113
114 // set the storm (call from mission parse)
115 void nebl_set_storm(char *name);
116
117 #endif
118