Open source remastering of the Freespace 2 engine
hudets.cpp File Reference
#include "freespace2/freespace.h"
#include "gamesnd/gamesnd.h"
#include "globalincs/systemvars.h"
#include "hud/hudets.h"
#include "io/timer.h"
#include "localization/localize.h"
#include "object/object.h"
#include "object/objectshield.h"
#include "ship/ship.h"
#include "ship/subsysdamage.h"
#include "weapon/emp.h"
#include "weapon/weapon.h"

Go to the source code of this file.




void ets_init_ship (object *obj)
void update_ets (object *objp, float fl_frametime)
float ets_get_max_speed (object *objp, float engine_energy)
void ai_manage_ets (object *obj)
void set_default_recharge_rates (object *obj)
void increase_recharge_rate (object *obj, SYSTEM_TYPE ship_system)
void decrease_recharge_rate (object *obj, SYSTEM_TYPE ship_system)
void transfer_energy_weapon_common (object *objp, float from_field, float to_field, float *from_delta, float *to_delta, float max, float scale)
void transfer_energy_to_shields (object *obj)
void transfer_energy_to_weapons (object *obj)
void zero_one_ets (int *reduce, int *add1, int *add2)
void sanity_check_ets_inputs (int(&ets_indexes)[num_retail_ets_gauges])
bool validate_ship_ets_indxes (const int &ship_idx, int(&ets_indexes)[num_retail_ets_gauges])


float Energy_levels [NUM_ENERGY_LEVELS] = {0.0f, 0.0833f, 0.167f, 0.25f, 0.333f, 0.417f, 0.5f, 0.583f, 0.667f, 0.75f, 0.833f, 0.9167f, 1.0f}
int Weapon_energy_cheat = 0

Macro Definition Documentation


Definition at line 197 of file hudets.cpp.


Definition at line 195 of file hudets.cpp.


Definition at line 198 of file hudets.cpp.


Definition at line 191 of file hudets.cpp.


Definition at line 187 of file hudets.cpp.


Definition at line 183 of file hudets.cpp.


Definition at line 192 of file hudets.cpp.


Definition at line 188 of file hudets.cpp.


Definition at line 184 of file hudets.cpp.

Function Documentation

void ai_manage_ets ( object obj)

Definition at line 200 of file hudets.cpp.

void decrease_recharge_rate ( object obj,
SYSTEM_TYPE  ship_system 

Definition at line 473 of file hudets.cpp.

float ets_get_max_speed ( object objp,
float  engine_energy 

Definition at line 147 of file hudets.cpp.

void ets_init_ship ( object obj)

Definition at line 34 of file hudets.cpp.

void increase_recharge_rate ( object obj,
SYSTEM_TYPE  ship_system 

Definition at line 349 of file hudets.cpp.

void sanity_check_ets_inputs ( int(&)  ets_indexes[num_retail_ets_gauges])

ensure input ETS indexs are valid. If not, "fix" them by moving outliers towards the middle index

Definition at line 681 of file hudets.cpp.

void set_default_recharge_rates ( object obj)

Definition at line 275 of file hudets.cpp.

void transfer_energy_to_shields ( object obj)

Definition at line 614 of file hudets.cpp.

void transfer_energy_to_weapons ( object obj)

Definition at line 632 of file hudets.cpp.

void transfer_energy_weapon_common ( object objp,
float  from_field,
float  to_field,
float from_delta,
float to_delta,
float  max,
float  scale 

Definition at line 588 of file hudets.cpp.

void update_ets ( object objp,
float  fl_frametime 

Definition at line 63 of file hudets.cpp.

bool validate_ship_ets_indxes ( const int ship_idx,
int(&)  ets_indexes[num_retail_ets_gauges] 

adjust input ETS indexes to handle missing systems on the target ship return true if indexes are valid to be set

Definition at line 722 of file hudets.cpp.

void zero_one_ets ( int reduce,
int add1,
int add2 

decrease one ets index to zero & adjust others up

Definition at line 651 of file hudets.cpp.

Variable Documentation

float Energy_levels[NUM_ENERGY_LEVELS] = {0.0f, 0.0833f, 0.167f, 0.25f, 0.333f, 0.417f, 0.5f, 0.583f, 0.667f, 0.75f, 0.833f, 0.9167f, 1.0f}

Definition at line 26 of file hudets.cpp.

int Weapon_energy_cheat = 0

Definition at line 27 of file hudets.cpp.