FS2_Open
Open source remastering of the Freespace 2 engine
hudshield.cpp File Reference
#include "gamesnd/gamesnd.h"
#include "hud/hudescort.h"
#include "hud/hudparse.h"
#include "hud/hudshield.h"
#include "hud/hudtargetbox.h"
#include "io/timer.h"
#include "network/multi.h"
#include "object/object.h"
#include "object/objectshield.h"
#include "parse/parselo.h"
#include "playerman/player.h"
#include "render/3d.h"
#include "ship/ship.h"
#include "weapon/emp.h"

Go to the source code of this file.

Macros

#define NUM_SHIELD_LEVELS   8
 
#define SHIELD_TRANSFER_PERCENT   0.083f
 
#define SHIELD_HIT_DURATION_SHORT   300
 
#define SHIELD_FLASH_INTERVAL_FAST   200
 
#define SHIELD_HIT_PLAYER   0
 
#define SHIELD_HIT_TARGET   1
 

Functions

void hud_shield_level_init ()
 
int hud_shield_maybe_flash (int gauge, int target_index, int shield_offset)
 
void hud_ship_icon_page_in (ship_info *sip)
 
void hud_shield_equalize (object *objp, player *pl)
 
void hud_augment_shield_quadrant (object *objp, int direction)
 
void hud_shield_assign_info (ship_info *sip, char *filename)
 
void hud_show_mini_ship_integrity (object *objp, int x_force, int y_force)
 
void hud_shield_show_mini (object *objp, int x_force, int y_force, int x_hull_offset, int y_hull_offset)
 
void shield_info_reset (object *objp, shield_hit_info *shi)
 
void hud_shield_hit_reset (object *objp, int player)
 
void hud_shield_hit_update ()
 
void hud_shield_quadrant_hit (object *objp, int quadrant)
 

Variables

SCP_vector< SCP_stringHud_shield_filenames
 
SCP_vector< hud_framesShield_gauges
 
int Shield_mini_coords [GR_NUM_RESOLUTIONS][2]
 
int Hud_mini_3digit [GR_NUM_RESOLUTIONS][3]
 
int Hud_mini_2digit [GR_NUM_RESOLUTIONS][3]
 
int Hud_mini_1digit [GR_NUM_RESOLUTIONS][3]
 
int Hud_mini_base [GR_NUM_RESOLUTIONS][2]
 
int Shield_mini_loaded = 0
 
hud_frames Shield_mini_gauge
 
ubyte Quadrant_xlate [DEFAULT_SHIELD_SECTIONS] = {1,0,2,3}
 
int Cmdline_nohtl
 
bool shield_ani_warning_displayed_already = false
 

Macro Definition Documentation

#define NUM_SHIELD_LEVELS   8

Definition at line 31 of file hudshield.cpp.

#define SHIELD_FLASH_INTERVAL_FAST   200

Definition at line 36 of file hudshield.cpp.

#define SHIELD_HIT_DURATION_SHORT   300

Definition at line 35 of file hudshield.cpp.

#define SHIELD_HIT_PLAYER   0

Definition at line 113 of file hudshield.cpp.

#define SHIELD_HIT_TARGET   1

Definition at line 114 of file hudshield.cpp.

#define SHIELD_TRANSFER_PERCENT   0.083f

Definition at line 33 of file hudshield.cpp.

Function Documentation

void hud_augment_shield_quadrant ( object objp,
int  direction 
)

Definition at line 278 of file hudshield.cpp.

void hud_shield_assign_info ( ship_info sip,
char *  filename 
)

Definition at line 339 of file hudshield.cpp.

void hud_shield_equalize ( object objp,
player pl 
)

Definition at line 209 of file hudshield.cpp.

void hud_shield_hit_reset ( object objp,
int  player 
)

Definition at line 497 of file hudshield.cpp.

void hud_shield_hit_update ( )

Definition at line 511 of file hudshield.cpp.

void hud_shield_level_init ( )

Definition at line 121 of file hudshield.cpp.

int hud_shield_maybe_flash ( int  gauge,
int  target_index,
int  shield_offset 
)

Definition at line 146 of file hudshield.cpp.

void hud_shield_quadrant_hit ( object objp,
int  quadrant 
)

Definition at line 541 of file hudshield.cpp.

void hud_shield_show_mini ( object objp,
int  x_force,
int  y_force,
int  x_hull_offset,
int  y_hull_offset 
)

Definition at line 402 of file hudshield.cpp.

void hud_ship_icon_page_in ( ship_info sip)

Definition at line 177 of file hudshield.cpp.

void hud_show_mini_ship_integrity ( object objp,
int  x_force,
int  y_force 
)

Definition at line 355 of file hudshield.cpp.

void shield_info_reset ( object objp,
shield_hit_info shi 
)

Definition at line 472 of file hudshield.cpp.

Variable Documentation

int Cmdline_nohtl

Definition at line 438 of file cmdline.cpp.

int Hud_mini_1digit[GR_NUM_RESOLUTIONS][3]
Initial value:
= {
{
316, 298, 6
},
{
511, 477, 6
}
}

Definition at line 93 of file hudshield.cpp.

int Hud_mini_2digit[GR_NUM_RESOLUTIONS][3]
Initial value:
= {
{
313, 298, 2
},
{
506, 477, 2
}
}

Definition at line 85 of file hudshield.cpp.

int Hud_mini_3digit[GR_NUM_RESOLUTIONS][3]
Initial value:
= {
{
310, 298, 0
},
{
502, 477, 0
}
}

Definition at line 77 of file hudshield.cpp.

int Hud_mini_base[GR_NUM_RESOLUTIONS][2]
Initial value:
= {
{
310, 298
},
{
502, 477
}
}

Definition at line 101 of file hudshield.cpp.

SCP_vector<SCP_string> Hud_shield_filenames

Definition at line 41 of file hudshield.cpp.

ubyte Quadrant_xlate[DEFAULT_SHIELD_SECTIONS] = {1,0,2,3}

Definition at line 118 of file hudshield.cpp.

bool shield_ani_warning_displayed_already = false

Definition at line 173 of file hudshield.cpp.

SCP_vector<hud_frames> Shield_gauges

Definition at line 43 of file hudshield.cpp.

int Shield_mini_coords[GR_NUM_RESOLUTIONS][2]
Initial value:
= {
{
305, 291
},
{
497, 470
}
}

Definition at line 67 of file hudshield.cpp.

hud_frames Shield_mini_gauge

Definition at line 111 of file hudshield.cpp.

int Shield_mini_loaded = 0

Definition at line 110 of file hudshield.cpp.