Open source remastering of the Freespace 2 engine
shockwave.h File Reference

Go to the source code of this file.


struct  shockwave_info
struct  shockwave
struct  shockwave_create_info


#define SW_USED   (1<<0)
#define SW_WEAPON   (1<<1)
#define SW_SHIP_DEATH   (1<<2)
#define SW_WEAPON_KILL   (1<<3)
#define MAX_SHOCKWAVES   16
#define SW_MAX_OBJS_HIT   64


typedef struct shockwave_info shockwave_info
typedef struct shockwave shockwave
typedef struct shockwave_create_info shockwave_create_info


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

Macro Definition Documentation

#define MAX_SHOCKWAVES   16

Definition at line 26 of file shockwave.h.

#define SW_MAX_OBJS_HIT   64

Definition at line 27 of file shockwave.h.

#define SW_SHIP_DEATH   (1<<2)

Definition at line 23 of file shockwave.h.

#define SW_USED   (1<<0)

Definition at line 21 of file shockwave.h.

#define SW_WEAPON   (1<<1)

Definition at line 22 of file shockwave.h.

#define SW_WEAPON_KILL   (1<<3)

Definition at line 24 of file shockwave.h.

Typedef Documentation

typedef struct shockwave shockwave

Function Documentation

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

Call to create a shockwave

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
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

objppointer to shockwave object

Definition at line 159 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_all ( float  frametime)

Simulate all shockwaves in Shockwave_list

frametimetime for last frame in ms

Definition at line 709 of file shockwave.cpp.

void shockwave_render ( object objp,
draw_list scene 

Definition at line 462 of file shockwave.cpp.

void shockwave_render_DEPRECATED ( object objp)

Draw the shockwave identified by handle

objppointer to shockwave object

Definition at line 388 of file shockwave.cpp.