FS2_Open
Open source remastering of the Freespace 2 engine
neblightning.cpp File Reference
#include "debugconsole/console.h"
#include "freespace2/freespace.h"
#include "gamesnd/gamesnd.h"
#include "globalincs/linklist.h"
#include "io/timer.h"
#include "nebula/neb.h"
#include "nebula/neblightning.h"
#include "network/multi.h"
#include "network/multimsgs.h"
#include "parse/parselo.h"
#include "render/3d.h"
#include "weapon/emp.h"

Go to the source code of this file.

Macros

#define LINK_LEFT   0
 
#define LINK_RIGHT   1
 
#define LINK_CHILD   2
 

Functions

 DCF (b_scale,"Sets the scale factor for debug nebula bolts")
 
 DCF (b_rand,"Sets the randomness factor for debug nebula bolts")
 
 DCF (b_shrink,"Sets the shrink factor for debug nebula bolts")
 
 DCF (b_poly_pct,"Sets b_poly_pct")
 
 DCF (b_add,"Sets b_add")
 
 DCF (b_strikes,"Sets num_strikes")
 
 DCF (b_noise,"Sets noise factor")
 
 DCF (b_bright,"Sets brightness factor")
 
 DCF (b_lifetime,"Sets lifetime duration")
 
 DCF (b_list,"Displays status of debug lightning commands")
 
 CLAMP (val, 0.0f, 1.0f)
 
void nebl_init ()
 
void nebl_level_init ()
 
void nebl_set_storm (char *name)
 
void nebl_render_all ()
 
void nebl_process ()
 
void nebl_bolt (size_t type, vec3d *start, vec3d *strike)
 
int nebl_get_active_bolts ()
 
int nebl_get_active_nodes ()
 
l_nodenebl_new ()
 
void nebl_delete (l_node *lp)
 
void nebl_release (l_node *whee)
 
int nebl_gen (vec3d *left, vec3d *right, float depth, float max_depth, int child, l_node **l_left, l_node **l_right)
 
void nebl_calc_facing_pts_smart (vec3d *top, vec3d *bot, vec3d *fvec, vec3d *pos, float w, float z_add)
 
void nebl_render_section (bolt_type *bi, l_section *a, l_section *b)
 
void nebl_generate_section (bolt_type *bi, float width, l_node *a, l_node *b, l_section *c, l_section *cap, int pinch_a, int pinch_b)
 
void nebl_render (bolt_type *bi, l_node *whee, float width, l_section *prev)
 
void nebl_jitter (l_bolt *b)
 
size_t nebl_get_bolt_index (char *name)
 
size_t nebl_get_storm_index (char *name)
 

Variables

int Cmdline_nohtl
 
int Num_lnodes = 0
 
l_node Nebl_nodes [MAX_LIGHTNING_NODES]
 
l_node Nebl_free_list
 
l_node Nebl_used_list
 
int Num_lbolts = 0
 
l_bolt Nebl_bolts [MAX_LIGHTNING_BOLTS]
 
SCP_vector< bolt_typeBolt_types
 
SCP_vector< storm_typeStorm_types
 
vec3d Nebl_ring [3]
 
vec3d Nebl_ring_pinched [3]
 
int Nebl_flash_count = 0
 
float Nebl_flash_x = 0.0f
 
float Nebl_flash_y = 0.0f
 
float Nebl_bang = 0.0
 
float Nebl_alpha = 0.0f
 
float Nebl_glow_alpha = 0.0f
 
int Nebl_stamp = -1
 
float Nebl_bolt_len
 
bolt_typeNebl_type
 
matrix Nebl_bolt_dir
 
vec3d Nebl_bolt_start
 
vec3d Nebl_bolt_strike
 
storm_typeStorm = NULL
 
float Nebl_intensity = 0.6667f
 
dc_stuff_floatval
 

Macro Definition Documentation

#define LINK_CHILD   2

Definition at line 42 of file neblightning.cpp.

#define LINK_LEFT   0

Definition at line 40 of file neblightning.cpp.

#define LINK_RIGHT   1

Definition at line 41 of file neblightning.cpp.

Function Documentation

CLAMP ( val  ,
0.  0f,
1.  0f 
)
DCF ( b_scale  ,
"Sets the scale factor for debug nebula bolts"   
)

Definition at line 86 of file neblightning.cpp.

DCF ( b_rand  ,
"Sets the randomness factor for debug nebula bolts"   
)

Definition at line 90 of file neblightning.cpp.

DCF ( b_shrink  ,
"Sets the shrink factor for debug nebula bolts"   
)

Definition at line 94 of file neblightning.cpp.

DCF ( b_poly_pct  ,
"Sets b_poly_pct"   
)

Definition at line 98 of file neblightning.cpp.

DCF ( b_add  ,
"Sets b_add"   
)

Definition at line 102 of file neblightning.cpp.

DCF ( b_strikes  ,
"Sets num_strikes"   
)

Definition at line 106 of file neblightning.cpp.

DCF ( b_noise  ,
"Sets noise factor  
)

Definition at line 110 of file neblightning.cpp.

DCF ( b_bright  ,
"Sets brightness factor  
)

Definition at line 114 of file neblightning.cpp.

DCF ( b_lifetime  ,
"Sets lifetime duration"   
)

Definition at line 118 of file neblightning.cpp.

DCF ( b_list  ,
"Displays status of debug lightning commands"   
)

Definition at line 122 of file neblightning.cpp.

void nebl_bolt ( size_t  type,
vec3d start,
vec3d strike 
)

Definition at line 565 of file neblightning.cpp.

void nebl_calc_facing_pts_smart ( vec3d top,
vec3d bot,
vec3d fvec,
vec3d pos,
float  w,
float  z_add 
)

Definition at line 847 of file neblightning.cpp.

void nebl_delete ( l_node lp)

Definition at line 698 of file neblightning.cpp.

int nebl_gen ( vec3d left,
vec3d right,
float  depth,
float  max_depth,
int  child,
l_node **  l_left,
l_node **  l_right 
)

Definition at line 730 of file neblightning.cpp.

void nebl_generate_section ( bolt_type bi,
float  width,
l_node a,
l_node b,
l_section c,
l_section cap,
int  pinch_a,
int  pinch_b 
)

Definition at line 929 of file neblightning.cpp.

int nebl_get_active_bolts ( )

Definition at line 654 of file neblightning.cpp.

int nebl_get_active_nodes ( )

Definition at line 660 of file neblightning.cpp.

size_t nebl_get_bolt_index ( char *  name)

Definition at line 1121 of file neblightning.cpp.

size_t nebl_get_storm_index ( char *  name)

Definition at line 1133 of file neblightning.cpp.

void nebl_init ( )

Definition at line 156 of file neblightning.cpp.

void nebl_jitter ( l_bolt b)

Definition at line 1087 of file neblightning.cpp.

void nebl_level_init ( )

Definition at line 281 of file neblightning.cpp.

l_node* nebl_new ( )

Definition at line 666 of file neblightning.cpp.

void nebl_process ( )

Definition at line 459 of file neblightning.cpp.

void nebl_release ( l_node whee)

Definition at line 711 of file neblightning.cpp.

void nebl_render ( bolt_type bi,
l_node whee,
float  width,
l_section prev 
)

Definition at line 1030 of file neblightning.cpp.

void nebl_render_all ( )

Definition at line 324 of file neblightning.cpp.

void nebl_render_section ( bolt_type bi,
l_section a,
l_section b 
)

Definition at line 868 of file neblightning.cpp.

void nebl_set_storm ( char *  name)

Definition at line 310 of file neblightning.cpp.

Variable Documentation

SCP_vector<bolt_type> Bolt_types

Definition at line 49 of file neblightning.cpp.

int Cmdline_nohtl

Definition at line 438 of file cmdline.cpp.

float Nebl_alpha = 0.0f

Definition at line 73 of file neblightning.cpp.

float Nebl_bang = 0.0

Definition at line 72 of file neblightning.cpp.

matrix Nebl_bolt_dir

Definition at line 78 of file neblightning.cpp.

float Nebl_bolt_len

Definition at line 76 of file neblightning.cpp.

vec3d Nebl_bolt_start

Definition at line 79 of file neblightning.cpp.

vec3d Nebl_bolt_strike

Definition at line 80 of file neblightning.cpp.

Definition at line 46 of file neblightning.cpp.

int Nebl_flash_count = 0

Definition at line 69 of file neblightning.cpp.

float Nebl_flash_x = 0.0f

Definition at line 70 of file neblightning.cpp.

float Nebl_flash_y = 0.0f

Definition at line 71 of file neblightning.cpp.

l_node Nebl_free_list

Definition at line 36 of file neblightning.cpp.

float Nebl_glow_alpha = 0.0f

Definition at line 74 of file neblightning.cpp.

Nebl_intensity = 0.6667f

Definition at line 138 of file neblightning.cpp.

Definition at line 34 of file neblightning.cpp.

vec3d Nebl_ring[3]
Initial value:
= {
{ { { -1.0f, 0.0f, 0.0f } } },
{ { { 1.0f, 0.70f, 0.0f } } },
{ { { 1.0f, -0.70f, 0.0f } } }
}

Definition at line 55 of file neblightning.cpp.

vec3d Nebl_ring_pinched[3]
Initial value:
= {
{ { { -0.05f, 0.0f, 0.0f } } },
{ { { 0.05f, 0.035f, 0.0f } } },
{ { { 0.05f, -0.035f, 0.0f } } }
}

Definition at line 62 of file neblightning.cpp.

int Nebl_stamp = -1

Definition at line 75 of file neblightning.cpp.

bolt_type* Nebl_type

Definition at line 77 of file neblightning.cpp.

l_node Nebl_used_list

Definition at line 37 of file neblightning.cpp.

int Num_lbolts = 0

Definition at line 45 of file neblightning.cpp.

int Num_lnodes = 0

Definition at line 33 of file neblightning.cpp.

storm_type* Storm = NULL

Definition at line 83 of file neblightning.cpp.

SCP_vector<storm_type> Storm_types

Definition at line 52 of file neblightning.cpp.

Initial value:
{
float val
GLuint GLfloat * val
Definition: Glext.h:6741

Definition at line 143 of file neblightning.cpp.