2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
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
10 * $Logfile: /Freespace2/code/Nebula/NebLightning.h $
18 * Revision 1.2 2002/06/09 04:41:14 relnev
19 * added copyright header
21 * Revision 1.1.1.1 2002/05/03 03:28:12 root
25 * 4 7/02/99 4:31p Dave
26 * Much more sophisticated lightning support.
28 * 3 5/26/99 11:46a Dave
29 * Added ship-blasting lighting and made the randomization of lighting
30 * much more customizable.
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.
39 #ifndef __FS2_NEBULA_LIGHTNING_HEADER_FILE
40 #define __FS2_NEBULA_LIGHTNING_HEADER_FILE
42 // ------------------------------------------------------------------------------------------------------
43 // NEBULA LIGHTNING DEFINES/VARS
46 // lightning bolt types
47 #define MAX_BOLT_TYPES 10
48 #define DEBUG_BOLT MAX_BOLT_TYPES
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];
55 ubyte num_bolt_types; // how many different bolt types you'll see in the nebula
57 char bolt_types[MAX_BOLT_TYPES]; // indices into the lightning types
59 vector flavor; // flavor of the storm
61 int min, max; // min and max delay between bolt firing.
62 int min_count, max_count; // # of bolts spewed
65 extern int Num_storm_types;
66 extern storm_type Storm_types[MAX_STORM_TYPES];
68 // nebula lightning intensity (0.0 to 1.0)
69 extern float Nebl_intensity;
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
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
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
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
87 #define BOLT_TYPE_ANY -2
89 // ------------------------------------------------------------------------------------------------------
90 // NEBULA LIGHTNING FUNCTIONS
93 // initialize nebula lightning at game startup
96 // initialize lightning before entering a level
97 void nebl_level_init();
99 // render all lightning bolts
100 void nebl_render_all();
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);
105 // process lightning (randomly generate bolts, etc, etc);
108 // get the current # of active lightning bolts
109 int nebl_get_active_bolts();
111 // get the current # of active nodes
112 int nebl_get_active_nodes();
114 // set the storm (call from mission parse)
115 void nebl_set_storm(char *name);