Open source remastering of the Freespace 2 engine
emp.cpp File Reference
#include <stdarg.h>
#include "debugconsole/console.h"
#include "freespace2/freespace.h"
#include "globalincs/linklist.h"
#include "hud/hud.h"
#include "hud/hudlock.h"
#include "hud/hudtarget.h"
#include "iff_defs/iff_defs.h"
#include "io/timer.h"
#include "network/multi.h"
#include "network/multimsgs.h"
#include "object/object.h"
#include "parse/parselo.h"
#include "ship/ship.h"
#include "weapon/emp.h"
#include "weapon/weapon.h"

Go to the source code of this file.


struct  wacky_text


#define EMP_ACTIVE_LOCAL()   (Emp_intensity > 0.0f)
#define EMP_WACKY_TEXT_LEN   256
#define NUM_RANDOM_CHARS   51


typedef struct wacky_text wacky_text


void emp_maybe_reformat_text (char *text, int max_len, int gauge_id)
void emp_randomize_chars (char *str)
void emp_level_init ()
void emp_apply (vec3d *pos, float inner_radius, float outer_radius, float emp_intensity, float emp_time, bool use_emp_time_for_capship_turrets)
void emp_start_ship (object *ship_objp, float intensity, float time)
void emp_process_ship (ship *shipp)
void emp_start_local (float intensity, float time)
void emp_stop_local ()
int emp_active_local ()
void emp_process_local ()
int emp_should_blit_gauge ()
void emp_hud_string (int x, int y, int gauge_id, const char *str, int resize_mode)
void emp_hud_printf (int x, int y, int gauge_id, const char *format,...)
void emp_hud_jitter (int *x, int *y)
float emp_current_intensity ()
 DCF (zap,"zap a ship with an EMP effect")


float Emp_intensity = -1.0f
float Emp_decr = 0.0f
int Emp_wacky_target_timestamp = -1
wacky_text Emp_wacky_text [NUM_TEXT_STAMPS]
char Emp_random_char [NUM_RANDOM_CHARS]
int mod_val = 7

Macro Definition Documentation

#define EMP_ACTIVE_LOCAL ( )    (Emp_intensity > 0.0f)

Definition at line 49 of file emp.cpp.

#define EMP_WACKY_TEXT_LEN   256

Definition at line 52 of file emp.cpp.


Definition at line 46 of file emp.cpp.

#define NUM_RANDOM_CHARS   51

Definition at line 60 of file emp.cpp.

Typedef Documentation

typedef struct wacky_text wacky_text

Function Documentation

DCF ( zap  ,
"zap a ship with an EMP effect"   

Definition at line 639 of file emp.cpp.

int emp_active_local ( )

Definition at line 428 of file emp.cpp.

void emp_apply ( vec3d pos,
float  inner_radius,
float  outer_radius,
float  emp_intensity,
float  emp_time,
bool  use_emp_time_for_capship_turrets 

Definition at line 103 of file emp.cpp.

float emp_current_intensity ( )

Definition at line 634 of file emp.cpp.

void emp_hud_jitter ( int x,
int y 

Definition at line 621 of file emp.cpp.

void emp_hud_printf ( int  x,
int  y,
int  gauge_id,
const char *  format,

Definition at line 492 of file emp.cpp.

void emp_hud_string ( int  x,
int  y,
int  gauge_id,
const char *  str,
int  resize_mode 

Definition at line 468 of file emp.cpp.

void emp_level_init ( )

Definition at line 88 of file emp.cpp.

void emp_maybe_reformat_text ( char *  text,
int  max_len,
int  gauge_id 

Definition at line 516 of file emp.cpp.

void emp_process_local ( )

Definition at line 434 of file emp.cpp.

void emp_process_ship ( ship shipp)

Definition at line 308 of file emp.cpp.

void emp_randomize_chars ( char *  str)

Definition at line 606 of file emp.cpp.

int emp_should_blit_gauge ( )

Definition at line 456 of file emp.cpp.

void emp_start_local ( float  intensity,
float  time 

Definition at line 375 of file emp.cpp.

void emp_start_ship ( object ship_objp,
float  intensity,
float  time 

Definition at line 264 of file emp.cpp.

void emp_stop_local ( )

Definition at line 420 of file emp.cpp.

Variable Documentation

float Emp_decr = 0.0f

Definition at line 40 of file emp.cpp.

float Emp_intensity = -1.0f

Definition at line 39 of file emp.cpp.

char Emp_random_char[NUM_RANDOM_CHARS]
Initial value:
{ 'a', 'b', 'c', 'd', 'e', 'f', 'g', '4', 'h', '8', '_', '$', ')', '-', '~', 'u', 'q',
'.', 'x', 'h', '&', '%', '*', '1', '3', 't', 'h', 'o', 'p', '@', 'h', 'i','v', '+', '=',
'|', '{', '}', ':', ';', '^', 'l', 'z', 'u', 'v', '<', '>', '?', '5', '8' }

Definition at line 61 of file emp.cpp.

int Emp_wacky_target_timestamp = -1

Definition at line 43 of file emp.cpp.

wacky_text Emp_wacky_text[NUM_TEXT_STAMPS]

Definition at line 57 of file emp.cpp.

int mod_val = 7

Definition at line 307 of file emp.cpp.