FS2_Open
Open source remastering of the Freespace 2 engine
shockwave.cpp File Reference
#include "asteroid/asteroid.h"
#include "gamesnd/gamesnd.h"
#include "globalincs/linklist.h"
#include "io/timer.h"
#include "model/modelrender.h"
#include "object/object.h"
#include "render/3d.h"
#include "ship/ship.h"
#include "ship/shiphit.h"
#include "weapon/shockwave.h"
#include "weapon/weapon.h"

Go to the source code of this file.

Macros

#define SW_INDEX(sw)   (sw-Shockwaves)
 

Functions

int shockwave_create (int parent_objnum, vec3d *pos, shockwave_create_info *sci, int flag, int delay)
 
void shockwave_delete (object *objp)
 
void shockwave_delete_all ()
 
void shockwave_set_framenum (int index)
 
int shockwave_get_framenum (int index, int num_frames)
 
void shockwave_move (object *shockwave_objp, float frametime)
 
void shockwave_render_DEPRECATED (object *objp)
 
void shockwave_render (object *objp, draw_list *scene)
 
int shockwave_load (char *s_name, bool shock_3D)
 
void shockwave_level_init ()
 
void shockwave_level_close ()
 
void shockwave_move_all (float frametime)
 
void shockwave_render_all ()
 
int shockwave_get_weapon_index (int index)
 
float shockwave_get_max_radius (int index)
 
float shockwave_get_min_radius (int index)
 
float shockwave_get_damage (int index)
 
int shockwave_get_damage_type_idx (int index)
 
int shockwave_get_flags (int index)
 
void shockwave_page_in ()
 
void shockwave_create_info_init (shockwave_create_info *sci)
 
void shockwave_create_info_load (shockwave_create_info *sci)
 

Variables

SCP_vector< shockwave_infoShockwave_info
 
shockwave Shockwaves [MAX_SHOCKWAVES]
 
shockwave Shockwave_list
 
int Shockwave_inited = 0
 
int Show_area_effect
 
int Cmdline_nohtl
 
int Cmdline_enable_3d_shockwave
 
bool Cmdline_fb_explosions
 

Macro Definition Documentation

#define SW_INDEX (   sw)    (sw-Shockwaves)

Definition at line 41 of file shockwave.cpp.

Function Documentation

int shockwave_create ( int  parent_objnum,
vec3d pos,
shockwave_create_info sci,
int  flag,
int  delay 
)

Call to create a shockwave

Parameters
parent_objnumobject number of object spawning the shockwave
posvector specifing global position of shockwave center
sciShockwave info
flagFlag settings
delaydelay in ms before the shockwave actually starts
Returns
success object number of shockwave
failure -1

Definition at line 64 of file shockwave.cpp.

void shockwave_create_info_init ( shockwave_create_info sci)

Definition at line 811 of file shockwave.cpp.

void shockwave_create_info_load ( shockwave_create_info sci)

Loads a shockwave in preparation for a mission

Definition at line 825 of file shockwave.cpp.

void shockwave_delete ( object objp)

Delete a shockwave

Parameters
objppointer to shockwave object

Definition at line 159 of file shockwave.cpp.

void shockwave_delete_all ( )

Delete whole linked list

Definition at line 172 of file shockwave.cpp.

float shockwave_get_damage ( int  index)

Return the damage for specified shockwave

Definition at line 768 of file shockwave.cpp.

int shockwave_get_damage_type_idx ( int  index)

Return the damage type for specified shockwave

Definition at line 777 of file shockwave.cpp.

int shockwave_get_flags ( int  index)

Return the flags for specified shockwave

Definition at line 786 of file shockwave.cpp.

int shockwave_get_framenum ( int  index,
int  num_frames 
)

Given a shockwave index and the number of frames in an animation return what the current frame # should be (for use with 3d shockwaves)

Definition at line 222 of file shockwave.cpp.

float shockwave_get_max_radius ( int  index)

Return the maximum radius for specified shockwave

Definition at line 750 of file shockwave.cpp.

float shockwave_get_min_radius ( int  index)

Return the minimum radius for specified shockwave

Definition at line 759 of file shockwave.cpp.

int shockwave_get_weapon_index ( int  index)

Return the weapon_info_index field for a shockwave

Definition at line 741 of file shockwave.cpp.

void shockwave_level_close ( )

Call at the close of each level (mission)

Definition at line 672 of file shockwave.cpp.

void shockwave_level_init ( )

Call once at the start of each level (mission)

Definition at line 595 of file shockwave.cpp.

int shockwave_load ( char *  s_name,
bool  shock_3D 
)

Call to load a shockwave, or add it and then load it

Definition at line 538 of file shockwave.cpp.

void shockwave_move ( object shockwave_objp,
float  frametime 
)

Simulate a single shockwave. If the shockwave radius exceeds outer_radius, then delete the shockwave.

Parameters
shockwave_objpobject pointer that points to shockwave object
frametimetime to simulate shockwave

Definition at line 256 of file shockwave.cpp.

void shockwave_move_all ( float  frametime)

Simulate all shockwaves in Shockwave_list

Parameters
frametimetime for last frame in ms

Definition at line 709 of file shockwave.cpp.

void shockwave_page_in ( )

Definition at line 792 of file shockwave.cpp.

void shockwave_render ( object objp,
draw_list scene 
)

Definition at line 462 of file shockwave.cpp.

void shockwave_render_all ( )

Render all shockwaves

Definition at line 725 of file shockwave.cpp.

void shockwave_render_DEPRECATED ( object objp)

Draw the shockwave identified by handle

Parameters
objppointer to shockwave object

Definition at line 388 of file shockwave.cpp.

void shockwave_set_framenum ( int  index)

Set the correct frame of animation for the shockwave

Definition at line 188 of file shockwave.cpp.

Variable Documentation

int Cmdline_enable_3d_shockwave

Definition at line 333 of file cmdline.cpp.

bool Cmdline_fb_explosions

Definition at line 340 of file cmdline.cpp.

int Cmdline_nohtl

Definition at line 438 of file cmdline.cpp.

SCP_vector<shockwave_info> Shockwave_info

Definition at line 32 of file shockwave.cpp.

int Shockwave_inited = 0

Definition at line 36 of file shockwave.cpp.

shockwave Shockwave_list

Definition at line 35 of file shockwave.cpp.

Definition at line 34 of file shockwave.cpp.

int Show_area_effect

Definition at line 111 of file fredstubs.cpp.