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

Go to the source code of this file.

Classes

class  WarpEffect
 
class  WE_Default
 
class  WE_BSG
 
class  WE_Homeworld
 
class  WE_Hyperspace
 

Macros

#define WD_NONE   0
 
#define WD_WARP_IN   1
 
#define WD_WARP_OUT   2
 
#define WE_DEFAULT_NUM_STAGES   2
 
#define WE_BSG_NUM_STAGES   2
 
#define WE_HOMEWORLD_NUM_STAGES   6
 

Functions

void shipfx_emit_spark (int n, int sn)
 
void shipfx_blow_off_subsystem (object *ship_obj, ship *ship_p, ship_subsys *subsys, vec3d *exp_center, bool no_explosion=false)
 
void shipfx_blow_up_model (object *obj, int model, int submodel, int ndebris, vec3d *exp_center)
 
void shipfx_blow_up_hull (object *obj, int model, vec3d *exp_center)
 
void shipfx_warpin_start (object *objp)
 
void shipfx_warpin_frame (object *objp, float frametime)
 
void shipfx_warpout_start (object *objp)
 
void shipfx_warpout_frame (object *objp, float frametime)
 
bool shipfx_point_in_shadow (vec3d *p0, matrix *src_orient, vec3d *src_pos, float radius)
 
bool shipfx_in_shadow (object *src_obj)
 
bool shipfx_eye_in_shadow (vec3d *eye_pos, object *src_obj, int sun_n)
 
void shipfx_flash_init ()
 
void shipfx_flash_create (object *objp, int model_num, vec3d *gun_pos, vec3d *gun_dir, int is_primary, int weapon_info_index)
 
void shipfx_flash_light_model (object *objp, int model_num)
 
void shipfx_flash_do_frame (float frametime)
 
void shipfx_large_blowup_level_init ()
 
void shipfx_large_blowup_init (ship *shipp)
 
int shipfx_large_blowup_do_frame (ship *shipp, float frametime)
 
void shipfx_large_blowup_render (ship *shipp)
 
void shipfx_large_blowup_queue_render (draw_list *scene, ship *shipp)
 
void shipfx_debris_limit_speed (struct debris *db, ship *shipp)
 
void do_sub_expl_sound (float radius, vec3d *sound_pos, int *sound_handle)
 
void shipfx_do_shockwave_stuff (ship *shipp, shockwave_create_info *sci)
 
void shipfx_do_damaged_arcs_frame (ship *shipp)
 
void shipfx_do_lightning_frame (ship *shipp)
 
void shipfx_engine_wash_level_init ()
 
void shipfx_stop_engine_wash_sound ()
 
void shipfx_cloak_frame (ship *shipp, float frametime)
 
void shipfx_start_cloak (ship *shipp, int warmup=5000, int recalc_transform=0, int device=0)
 
void shipfx_stop_cloak (ship *shipp, int warpdown=5000)
 
float shipfx_calc_visibility (object *obj, vec3d *view_pt)
 
float shipfx_calculate_warp_time (object *objp, int warp_dir)
 
float shipfx_calculate_warp_dist (object *objp)
 

Macro Definition Documentation

#define WD_NONE   0

Definition at line 154 of file shipfx.h.

#define WD_WARP_IN   1

Definition at line 155 of file shipfx.h.

#define WD_WARP_OUT   2

Definition at line 156 of file shipfx.h.

#define WE_BSG_NUM_STAGES   2

Definition at line 232 of file shipfx.h.

#define WE_DEFAULT_NUM_STAGES   2

Definition at line 196 of file shipfx.h.

#define WE_HOMEWORLD_NUM_STAGES   6

Definition at line 291 of file shipfx.h.

Function Documentation

void do_sub_expl_sound ( float  radius,
vec3d sound_pos,
int sound_handle 
)

Sound manager for big ship sub explosions sounds.

Forces playing of sub-explosion sounds. Keeps track of active sounds, plays them for >= 750 ms when sound has played >= 750, sound is stopped and new instance is started

Definition at line 2190 of file shipfx.cpp.

void shipfx_blow_off_subsystem ( object ship_obj,
ship ship_p,
ship_subsys subsys,
vec3d exp_center,
bool  no_explosion = false 
)

Definition at line 295 of file shipfx.cpp.

void shipfx_blow_up_hull ( object obj,
int  model,
vec3d exp_center 
)

Definition at line 325 of file shipfx.cpp.

void shipfx_blow_up_model ( object obj,
int  model,
int  submodel,
int  ndebris,
vec3d exp_center 
)

Creates "ndebris" pieces of debris on random verts of the the "submodel" in the ship's model.

Definition at line 374 of file shipfx.cpp.

float shipfx_calc_visibility ( object obj,
vec3d view_pt 
)
float shipfx_calculate_warp_dist ( object objp)

Definition at line 510 of file shipfx.cpp.

float shipfx_calculate_warp_time ( object objp,
int  warp_dir 
)

Definition at line 474 of file shipfx.cpp.

void shipfx_cloak_frame ( ship shipp,
float  frametime 
)
void shipfx_debris_limit_speed ( struct debris db,
ship shipp 
)

Definition at line 2031 of file shipfx.cpp.

void shipfx_do_damaged_arcs_frame ( ship shipp)

Definition at line 2417 of file shipfx.cpp.

void shipfx_do_lightning_frame ( ship shipp)

Definition at line 2648 of file shipfx.cpp.

void shipfx_do_shockwave_stuff ( ship shipp,
shockwave_create_info sci 
)

Do all shockwaves for a ship blowing up

Definition at line 2776 of file shipfx.cpp.

void shipfx_emit_spark ( int  n,
int  sn 
)

Definition at line 1417 of file shipfx.cpp.

void shipfx_engine_wash_level_init ( )

Engine wash level init

Definition at line 3106 of file shipfx.cpp.

bool shipfx_eye_in_shadow ( vec3d eye_pos,
object src_obj,
int  sun_n 
)

Given world point see if it is in a shadow.

Definition at line 977 of file shipfx.cpp.

void shipfx_flash_create ( object objp,
int  model_num,
vec3d gun_pos,
vec3d gun_dir,
int  is_primary,
int  weapon_info_index 
)

Given that a ship fired a weapon, light up the model accordingly.

Definition at line 1231 of file shipfx.cpp.

void shipfx_flash_do_frame ( float  frametime)

Does whatever processing needs to be done each frame.

Definition at line 1331 of file shipfx.cpp.

void shipfx_flash_init ( )

Resets the ship flash stuff. Call before each level.

Definition at line 1216 of file shipfx.cpp.

void shipfx_flash_light_model ( object objp,
int  model_num 
)

Sets the flash lights in the model used by this ship to the appropriate values.

There might not be any flashes linked to this ship in which case this function does nothing.

Definition at line 1314 of file shipfx.cpp.

bool shipfx_in_shadow ( object src_obj)

Given an ship see if it is in a shadow.

Definition at line 926 of file shipfx.cpp.

int shipfx_large_blowup_do_frame ( ship shipp,
float  frametime 
)

Returns 1 when explosion is done

Definition at line 2325 of file shipfx.cpp.

void shipfx_large_blowup_init ( ship shipp)

Definition at line 2019 of file shipfx.cpp.

void shipfx_large_blowup_level_init ( )

Definition at line 2009 of file shipfx.cpp.

void shipfx_large_blowup_queue_render ( draw_list scene,
ship shipp 
)

Definition at line 2393 of file shipfx.cpp.

void shipfx_large_blowup_render ( ship shipp)

Definition at line 2374 of file shipfx.cpp.

bool shipfx_point_in_shadow ( vec3d p0,
matrix src_orient,
vec3d src_pos,
float  radius 
)

Given point p0, in object's frame of reference, find if it can see the sun.

Definition at line 874 of file shipfx.cpp.

void shipfx_start_cloak ( ship shipp,
int  warmup = 5000,
int  recalc_transform = 0,
int  device = 0 
)
void shipfx_stop_cloak ( ship shipp,
int  warpdown = 5000 
)
void shipfx_stop_engine_wash_sound ( )

Pause engine wash sounds

Definition at line 3114 of file shipfx.cpp.

void shipfx_warpin_frame ( object objp,
float  frametime 
)

Definition at line 605 of file shipfx.cpp.

void shipfx_warpin_start ( object objp)

Definition at line 565 of file shipfx.cpp.

void shipfx_warpout_frame ( object objp,
float  frametime 
)

Definition at line 848 of file shipfx.cpp.

void shipfx_warpout_start ( object objp)

Definition at line 794 of file shipfx.cpp.