60 #define HUD_NEW_ALPHA_DIM                               80       
   61 #define HUD_NEW_ALPHA_NORMAL                    120 
   62 #define HUD_NEW_ALPHA_BRIGHT                    220 
   65 #define HUD_NEW_ALPHA_DIM_HI                    130 
   66 #define HUD_NEW_ALPHA_NORMAL_HI                 190 
   67 #define HUD_NEW_ALPHA_BRIGHT_HI                 255 
   87 static int Player_engine_snd_loop = -1;
 
  101 static int Hud_last_can_target; 
 
  102 static int Hud_can_target_timer;        
 
  153 static int Hud_support_view_active;
 
  154 static int Hud_support_view_abort;              
 
  155 static int Hud_support_view_fade;               
 
  156 static int Hud_support_obj_sig, Hud_support_objnum, Hud_support_target_sig;
 
  159 #define HUD_GAUGE_FLASH_DURATION                5000 
  160 #define HUD_GAUGE_FLASH_INTERVAL                200 
  168 static int Subspace_notify_active;
 
  169 static int Objective_notify_active;
 
  170 static int HUD_abort_subspace_timer = 1;
 
  173 static int                                      Pl_hud_next_flash_timestamp;
 
  174 static int                                      Pl_hud_is_bright;
 
  176 #define SUBSYS_DAMAGE_FLASH_DURATION    1800 
  177 #define SUBSYS_DAMAGE_FLASH_INTERVAL    100 
  238 static float last_percent_throttle;
 
  239 #define THROTTLE_SOUND_CHECK_INTERVAL   50      // in ms 
  240 static int throttle_sound_check_id;
 
  242 #define DAMAGE_FLASH_TIME 150 
  243 static int Damage_flash_bright;
 
  244 static int Damage_flash_timer;
 
  247 base_w(0), base_h(0), gauge_config(-1), font_num(
FONT1), lock_color(
false), sexp_lock_color(
false), reticle_follow(
false), 
 
  249 texture_target(-1), canvas_w(-1), canvas_h(-1), target_w(-1), target_h(-1)
 
  270 HudGauge::HudGauge(
int _gauge_object, 
int _gauge_config, 
bool _slew, 
bool _message, 
int _disabled_views, 
int r, 
int g, 
int b):
 
  271 base_w(0), base_h(0), gauge_config(_gauge_config), gauge_object(_gauge_object), font_num(
FONT1), lock_color(
false), sexp_lock_color(
false),
 
  272 reticle_follow(_slew), active(
false), off_by_default(
false), sexp_override(
false), pop_up(
false), message_gauge(_message),
 
  273 disabled_views(_disabled_views), custom_gauge(
false), textoffset_x(0), textoffset_y(0), texture_target(-1),
 
  274 canvas_w(-1), canvas_h(-1), target_w(-1), target_h(-1)
 
  276         Assert(gauge_config <= NUM_HUD_GAUGES && gauge_config >= 0);
 
  281         if(r >= 0 && r <= 255 && 
 
  282                 g >= 0 && g <= 255 && 
 
  283                 b >= 0 && b <= 255) {
 
  306 HudGauge::HudGauge(
int _gauge_config, 
bool _slew, 
int r, 
int g, 
int b, 
char* _custom_name, 
char* _custom_text, 
char* frame_fname, 
int txtoffset_x, 
int txtoffset_y):
 
  310  textoffset_y(txtoffset_y), texture_target(-1), canvas_w(-1), canvas_h(-1), target_w(-1), target_h(-1)
 
  371         Assert(w >= 640 && h >= 480);
 
  384         if ( input_font_num >= 0 && input_font_num < 
Num_fonts) {
 
  451                 switch(bright_index){
 
  470                         if(bright_index < 0){
 
  480                         alpha = level * bright_index;
 
  707         if ( gauge_id > -2 ) {
 
  730         va_start(args, format);
 
  731         vsnprintf(tmp, 
sizeof(tmp)-1, format, args);
 
  733         tmp[
sizeof(tmp)-1] = 
'\0';
 
  744         va_start(args, format);
 
  745         vsnprintf(tmp, 
sizeof(tmp)-1, format, args);
 
  747         tmp[
sizeof(tmp)-1] = 
'\0';
 
 1101         if ( strlen(display_name) <= 0 ) {
 
 1112         if ( _canvas_w > 0 && _canvas_h > 0 ) {
 
 1128                 if ( render_target < 0 ) {
 
 1138         if ( display == NULL ) {
 
 1146         if ( display->
target < 0 ) {
 
 1185         HUD_abort_subspace_timer = 1;
 
 1186         Hud_last_can_target = 1;
 
 1187         Hud_can_target_timer = 1;
 
 1188         last_percent_throttle = 0.0f;
 
 1202         size_t j, num_gauges;
 
 1206                 if(it->hud_enabled) {
 
 1207                         num_gauges = it->hud_gauges.size();
 
 1209                         for(j = 0; j < num_gauges; j++) {
 
 1210                                 it->hud_gauges[j]->initialize();
 
 1211                                 it->hud_gauges[j]->resetTimers();
 
 1212                                 it->hud_gauges[j]->updateSexpOverride(
false);
 
 1217         num_gauges = default_hud_gauges.size();
 
 1219         for(j = 0; j < num_gauges; j++) {
 
 1220                 default_hud_gauges[j]->initialize();
 
 1221                 default_hud_gauges[j]->resetTimers();
 
 1222                 default_hud_gauges[j]->updateSexpOverride(
false);
 
 1231         size_t j, num_gauges;
 
 1234                 if(it->hud_enabled) {
 
 1235                         num_gauges = it->hud_gauges.size();
 
 1237                         for(j = 0; j < num_gauges; j++) {
 
 1238                                 it->hud_gauges[j]->resetCockpitTarget();
 
 1249         size_t j, num_gauges = 0;
 
 1252                 num_gauges = it->hud_gauges.size();
 
 1254                 for(j = 0; j < num_gauges; j++) {
 
 1256                         it->hud_gauges[j] = NULL;
 
 1258                 it->hud_gauges.clear();
 
 1261         num_gauges = default_hud_gauges.size();
 
 1263         for(j = 0; j < num_gauges; j++) {
 
 1264                 delete default_hud_gauges[j];
 
 1265                 default_hud_gauges[j] = NULL;
 
 1267         default_hud_gauges.clear();
 
 1323                                 if ( ms_till_fire >= 1000 ) {
 
 1369         if ( !can_target && Hud_last_can_target ) {
 
 1372         Hud_last_can_target = can_target;
 
 1382         int retarget_turret = 0;
 
 1403                                                         retarget_turret = 1;
 
 1411         if ( retarget && can_target ) {
 
 1419         if (retarget_turret && can_target) {
 
 1451                 int screen_integrity = 
fl2i(shield_strength+0.5
f);
 
 1453                 if ( screen_integrity < 0 ) {
 
 1454                         screen_integrity = 0;
 
 1457                 if ( screen_integrity == 0 ) {
 
 1458                         if ( shield_strength > 0 ) {
 
 1459                                 screen_integrity = 1;
 
 1466                         if ( screen_integrity <= 0 ){
 
 1471                 target_pos = targetp->
pos;
 
 1476         int stop_targetting_this_thing = 0;
 
 1480                 stop_targetting_this_thing = 1;
 
 1484         ship    *target_shipp = NULL;
 
 1493                         stop_targetting_this_thing = 1;
 
 1499                 stop_targetting_this_thing = 1;
 
 1504         if ( stop_targetting_this_thing )       {
 
 1519                 Assert( target_shipp != NULL );
 
 1524                         float   dist_to_target;
 
 1549         if ( target_shipp ) {
 
 1639         time_text_offsets[0] = 
x;
 
 1640         time_text_offsets[1] = 
y;
 
 1645         time_val_offsets[0] = 
x;
 
 1646         time_val_offsets[1] = 
y;
 
 1665         float mission_time, time_comp;
 
 1671         minutes=(
int)(mission_time/60);
 
 1672         seconds=(
int)mission_time%60;
 
 1686         if ( time_comp < 1 ) {
 
 1701         if(time_left < 0.0
f){
 
 1735         size_t j, num_gauges;
 
 1737         int render_target = -1;
 
 1739         if ( cockpit_display_num >= 0 ) {
 
 1750                 if ( render_target <= 0 ) {
 
 1763                 for(j = 0; j < num_gauges; j++) {
 
 1765                         if ( cockpit_display_num < 0 ) {
 
 1771                         if ( !sip->
hud_gauges[j]->setupRenderCanvas(render_target) ) {
 
 1784                 num_gauges = default_hud_gauges.size();
 
 1786                 for(j = 0; j < num_gauges; j++) {
 
 1787                         default_hud_gauges[j]->preprocess();
 
 1791                         if ( !default_hud_gauges[j]->canRender() ) {
 
 1795                         default_hud_gauges[j]->resetClip();
 
 1796                         default_hud_gauges[j]->setFont();
 
 1801         if ( cockpit_display_num >= 0 ) {
 
 1818         if ( Player_engine_snd_loop > -1 )      {
 
 1820                 Player_engine_snd_loop = -1;
 
 1824 #define ZERO_PERCENT                    0.01f 
 1825 #define ENGINE_MAX_VOL          1.0f 
 1826 #define ENGINE_MAX_PITCH        44100 
 1836         float percent_throttle;
 
 1839                 if(Player_engine_snd_loop != -1){
 
 1841                         Player_engine_snd_loop = -1;
 
 1859                 if ( percent_throttle != last_percent_throttle || Player_engine_snd_loop == -1 ) {
 
 1862                                 if ( Player_engine_snd_loop > -1 )      {
 
 1864                                         Player_engine_snd_loop = -1;
 
 1868                                 if ( Player_engine_snd_loop == -1 ){
 
 1877                                                 Player_engine_snd_loop = -1;
 
 1883                 last_percent_throttle = percent_throttle;
 
 1896         Damage_flash_bright = 0;
 
 1897         Damage_flash_timer =    1;
 
 1900                 Pl_hud_subsys_info[
i].
last_str = 1000.0f;
 
 1902                 Pl_hud_next_flash_timestamp = 1;
 
 1903                 Pl_hud_is_bright = 0;
 
 1994         int                                     sx, sy, bx, 
by, 
w, 
h, screen_integrity, 
num, best_str, best_index;
 
 1995         float                                   strength, shield, integrity;
 
 2012         screen_integrity = 
fl2i(integrity*100);
 
 2015                 if ( screen_integrity >= 100 ) {
 
 2032         if ( screen_integrity < 100 ) {         
 
 2033                 if ( screen_integrity == 0 ) {
 
 2034                         screen_integrity = 1;
 
 2036                 sprintf(buf, 
XSTR( 
"%d%%", 219), screen_integrity);
 
 2039                 if ( screen_integrity < 30 ) {
 
 2048         sy = 
position[1] + subsys_integ_start_offsets[1];
 
 2056                 if ( strength < 1 ) {
 
 2057                         screen_integrity = 
fl2i(strength*100);
 
 2058                         if ( screen_integrity == 0 ) {
 
 2059                                 if ( strength > 0 ) {
 
 2060                                         screen_integrity = 1;
 
 2070                         hud_subsys_list[
num].
str  = screen_integrity;
 
 2074                         if ( strength < Pl_hud_subsys_info[psub->
type].
last_str ) {
 
 2088         for ( 
int i = 0; 
i < 
num; 
i++ ) {
 
 2091                 for ( 
int j = 0; j < num-
i; j++ ) {
 
 2092                         if ( hud_subsys_list[j].str < best_str ) {
 
 2093                                 best_str = hud_subsys_list[j].
str;
 
 2106                 type = hud_subsys_list[best_index].
type;
 
 2107                 if ( !
timestamp_elapsed( Pl_hud_subsys_info[type].flash_duration_timestamp ) ) {
 
 2122                 if ( best_str < 30 ) {
 
 2123                         if ( best_str <= 0 ) {
 
 2138                 n_firstline = strrchr(hud_subsys_list[best_index].
name, 
'|');
 
 2145                         strcpy_s(temp_name, hud_subsys_list[best_index].name);
 
 2157                 if ( best_index < (num-i-1) ) {
 
 2158                         hud_subsys_list[best_index] = hud_subsys_list[num-i-1];
 
 2228 int hud_anim_render(
hud_anim *ha, 
float frametime, 
int draw_alpha, 
int loop, 
int hold_last, 
int reverse, 
int resize_mode, 
bool mirror)
 
 2286         len = strlen(num_str);
 
 2287         for ( i = 0; i < 
len; i++ ) {
 
 2288                 if ( num_str[i] == 
'1' ) {
 
 2289                         num_str[
i] = (char)(sc + 1);
 
 2332         flash_flags = 
false;
 
 2344                         flash_flags = !flash_flags;
 
 2391         text_offsets[0] = 
x;
 
 2392         text_offsets[1] = 
y;
 
 2397         text_value_offsets[0] = 
x;
 
 2398         text_value_offsets[1] = 
y;
 
 2422         char num_kills_string[32];
 
 2463         bool draw_bright = 
false;
 
 2472                         flash_flag = !flash_flag;
 
 2498         switch(lag_status) {
 
 2529         Hud_support_view_fade = 1;
 
 2530         Hud_support_obj_sig = -1;
 
 2531         Hud_support_target_sig = -1;
 
 2532         Hud_support_objnum = -1;
 
 2533         Hud_support_view_active = 0;
 
 2534         Hud_support_view_abort = 0;
 
 2542         Hud_support_view_active = 1;
 
 2543         Hud_support_view_fade = 1;
 
 2554                 Hud_support_view_active = 0;
 
 2555                 Hud_support_view_fade = 1;
 
 2556                 Hud_support_view_abort = 0;
 
 2558                 Hud_support_view_fade = 
timestamp(2000);
 
 2561         Hud_support_obj_sig = -1;
 
 2562         Hud_support_target_sig = -1;
 
 2563         Hud_support_objnum = -1;
 
 2569         Hud_support_view_abort = 1;
 
 2585         object  *dockee_objp;
 
 2586         float           dist, rel_speed, docker_speed;
 
 2595                 mprintf((
"'aip->goal_objnum == -1' in hud_get_dock_time(), line %i\n", __LINE__));
 
 2612         if ( rel_speed <= docker_speed/2.0
f) {  
 
 2613                 return (
int) (dist/docker_speed);
 
 2619                 if (rel_speed < 20.0
f)
 
 2629                         d1 = 
MIN(d, 100.0
f);
 
 2631                         time += (d1 - 60.0f)/rel_speed;
 
 2638                         time += (d1 - 30.0f)/5.0
f;
 
 2667                         int pship_index, sindex;
 
 2684                                                 if ( sindex == pship_index )
 
 2698         if ( !Hud_support_view_active ) {
 
 2707         if (Hud_support_objnum == -1) {
 
 2709                 if ( Hud_support_objnum >= 0 ) {
 
 2721         if ( Hud_support_view_fade > 1 ) {
 
 2724                         Hud_support_view_abort = 0;
 
 2725                         Hud_support_view_active = 0;
 
 2726                         Hud_support_view_fade = 1;
 
 2727                         Hud_support_objnum = -1;
 
 2773         int     show_time, 
w, 
h;
 
 2776         if ( !Hud_support_view_active ) {
 
 2785         if ( Hud_support_objnum >= 0 ) {
 
 2801         if ( Hud_support_view_fade > 1 ) {
 
 2803                         if ( Hud_support_view_abort){
 
 2819                         bool repairing = 
false;
 
 2847                                 sprintf(outstr, 
"%02d:%02d.%02d", min, sec, hund);
 
 2851                                 sprintf(outstr, 
"Waiting...");
 
 2860                 if ( Hud_support_objnum == -1 ) {
 
 2889                 int seconds, minutes;
 
 2891                 Assert( Hud_support_objnum != -1 );
 
 2900                 if ( seconds >= 0 ) {
 
 2901                         minutes = seconds/60;
 
 2902                         seconds = seconds%60;
 
 2903                         if ( minutes > 99 ) {
 
 2993 #define NUM_VM_OTHER_SHIP_GAUGES 5 
 3013                         if ( gauge_index == Vm_other_ship_gauges[
i] ) {
 
 3043         size_t num_gauges, 
i;
 
 3048                 for(i = 0; i < num_gauges; i++) {
 
 3053                 num_gauges = default_hud_gauges.size();
 
 3055                 for(i = 0; i < num_gauges; i++) {
 
 3056                         if(default_hud_gauges[i]->getConfigType() == gauge_index)
 
 3057                                 default_hud_gauges[
i]->startPopUp(time);
 
 3070         size_t num_gauges, 
i; 
 
 3078                 for(i = 0; i < num_gauges; i++) {
 
 3083                 num_gauges = default_hud_gauges.size();
 
 3085                 for(i = 0; i < num_gauges; i++) {
 
 3086                         if(default_hud_gauges[i]->getConfigType() == gauge_index)
 
 3087                                 default_hud_gauges[
i]->startFlashSexp();
 
 3103                 switch(bright_index){
 
 3122                         if(bright_index < 0){
 
 3132                         alpha = level * bright_index;
 
 3143                 switch(flash_status) {
 
 3170         int flash_status=-1;
 
 3183         return flash_status;
 
 3311         bool draw_bright = 
false;
 
 3341         int warp_aborted = 0;
 
 3368         if ( warp_aborted ) {
 
 3491         HUD_abort_subspace_timer = 
timestamp(1500);
 
 3496         Subspace_notify_active=0;
 
 3502         Subspace_notify_active=1;
 
 3507         return Subspace_notify_active;
 
 3512         Objective_notify_active = 0;
 
 3518         Objective_notify_active = 1;
 
 3523         return Objective_notify_active;
 
 3538         if ( (viewer_obj == 
Player_obj) && wiggedy_wack ){              
 
 3599         if (v0.
codes == 0) {
 
 3625         *x = 
fl2i(x_nose - x_center);
 
 3626         *y = 
fl2i(y_nose - y_center);
 
 3658         static vec3d    save_view_position;
 
 3659         static float    save_view_zoom;
 
 3660         static matrix   save_view_matrix;
 
 3661         static matrix   save_eye_matrix;
 
 3662         static vec3d    save_eye_position;
 
 3701         size_t j, num_gauges = 0;
 
 3703                 if(it->hud_enabled) {
 
 3704                         if(it->hud_gauges.size() > 0) {
 
 3705                                 num_gauges = it->hud_gauges.size();
 
 3707                                 for(j = 0; j < num_gauges; j++) {
 
 3708                                         it->hud_gauges[j]->pageIn();
 
 3714         num_gauges = default_hud_gauges.size();
 
 3716         for(j = 0; j < num_gauges; j++) {
 
 3717                 default_hud_gauges[j]->pageIn();
 
 3723         const char* gauge_name;
 
 3731                         if(!strcmp(name, gauge_name)) {
 
 3736                 for(j = 0; j < default_hud_gauges.size(); j++) {
 
 3738                         gauge_name = default_hud_gauges[j]->getCustomGaugeName();
 
 3739                         if(!strcmp(name, gauge_name)) {
 
 3740                                 return default_hud_gauges[j];
 
 3830                 memset(ping_str,0,50);
 
 3859         if(time_left < 0.0
f){
 
 3912         if (v0.
codes == 0) { 
 
void updateCustomGaugeFrame(int frame_offset)
 
void gr_rect(int x, int y, int w, int h, int resize_mode)
 
GLenum GLsizei GLenum format
 
void hud_get_target_strength(object *objp, float *shields, float *integrity)
 
void hud_init_wingman_status_gauge()
 
void hud_escort_update_list()
 
virtual void initialize()
 
bool gr_resize_screen_posf(float *x, float *y, float *w, float *h, int resize_mode)
 
int timestamp(int delta_ms)
 
struct screen3d::@234::@236 xyw
 
#define MULTIPLAYER_CLIENT
 
SCP_vector< HudGauge * > hud_gauges
 
int multi_show_ingame_ping()
 
void hud_clear_msg_buffer()
 
void renderBitmapEx(int frame, int x, int y, int w, int h, int sx, int sy)
 
model_subsystem * system_info
 
weapon Weapons[MAX_WEAPONS]
 
void hud_gauge_popup_start(int gauge_index, int time)
Start a gauge to pop-up. 
 
int hud_config_show_flag_is_set(int i)
 
void message_training_update_frame()
 
void hud_stop_looped_engine_sounds()
Called when the game decides to stop all looping sounds. 
 
virtual void onFrame(float frametime)
 
#define HUD_COLOR_ALPHA_DEFAULT
 
void updateCustomGaugeCoords(int _x, int _y)
 
#define MULTI_VOICE_STATUS_IDLE
 
void render(float frametime)
Render multiplayer text message currently being entered, if any. 
 
hud_frames Objective_display_gauge
 
char * ship_subsys_get_name(ship_subsys *ss)
 
void hud_maybe_popup_weapons_gauge()
Determine if we should popup the weapons gauge on the HUD. 
 
float vm_vec_mag_quick(const vec3d *v)
 
#define PCM_WARPOUT_STAGE1
 
void render(float frametime)
 
int Hud_text_flash_interval
 
GLfloat GLfloat GLfloat GLfloat h
 
void vm_vec_scale_add(vec3d *dest, const vec3d *src1, const vec3d *src2, float k)
 
#define MISSION_FLAG_FULLNEB
 
void hud_render_gauges(int cockpit_display_num)
 
void hud_update_cargo_scan_sound()
 
color * iff_get_color_by_team(int team, int seen_from_team, int is_bright)
 
#define DAMAGE_FLASH_TIME
 
int obj_team(object *objp)
 
#define MULTI_VOICE_STATUS_RECORDING
 
void hud_maybe_display_supernova()
Show supernova warning it there's a supernova coming. 
 
SCP_vector< game_snd > Snds
 
void hud_init_text_flash_gauge()
Flashing text gauge. 
 
void startPopUp(int time=4000)
 
#define HUD_GAUGE_FLASH_DURATION
 
void hud_wingman_status_update()
 
void hud_support_view_init()
Called at mission start to init data, and load support view bitmap if required. 
 
void mission_goal_fetch_num_resolved(int desired_type, int *num_resolved, int *total, int team)
 
void hud_num_make_mono(char *num_str, int font_num)
Convert a number string to use mono-spaced 1 character. 
 
void render(float frametime)
 
int hud_gauge_is_popup(int gauge_index)
Determine if gauge is in pop-up mode or not. 
 
__inline void gr_circle(int xc, int yc, int d, int resize_mode=GR_RESIZE_FULL)
 
int subsys_integ_val_offset_x
 
void hud_stop_looped_locking_sounds()
 
void HUD_init_hud_color_array()
 
void hud_subspace_notify_abort()
 
int hud_anim_render(hud_anim *ha, float frametime, int draw_alpha, int loop, int hold_last, int reverse, int resize_mode, bool mirror)
Render out a frame of the targetbox static animation, based on how much time has elapsed. 
 
void setGaugeColor(int bright_index=-4)
 
color * iff_get_color_by_team_and_object(int team, int seen_from_team, int is_bright, object *objp)
 
#define BATTLE_START_MIN_TARGET_DIST
 
#define HUD_NEW_ALPHA_NORMAL
 
void initBitmaps(const char *fname_top, const char *fname_middle, const char *fname_bottom)
 
void updateActive(bool show)
 
int next_secondary_fire_stamp[MAX_SHIP_SECONDARY_BANKS]
 
void _cdecl void void _cdecl void _cdecl Warning(char *filename, int line, SCP_FORMAT_STRING const char *format,...) SCP_FORMAT_STRING_ARGS(3
 
void initValueOffsets(int x, int y)
 
#define HUD_NUM_COLOR_LEVELS
 
void hud_init_squadmsg(void)
 
#define HUD_OBJECT_DAMAGE
 
void hud_gauge_flash_init()
Reset gauge flashing data. 
 
#define GR_NUM_RESOLUTIONS
 
#define NETINFO_FLAG_OBSERVER
 
void gr_init_alphacolor(color *clr, int r, int g, int b, int alpha, int type)
 
__inline void gr_string(int x, int y, const char *string, int resize_mode=GR_RESIZE_FULL)
 
void hud_init_target_static()
 
void player_stop_cargo_scan_sound()
 
#define HUD_OBJECTIVES_NOTIFY_GAUGE
 
void initSubspaceTextOffsetY(int y)
 
void updateColor(int r, int g, int b, int a=255)
 
void renderBitmapColor(int frame, int x, int y)
 
int bm_get_info(int handle, int *w, int *h, ubyte *flags, int *nframes, int *fps)
Gets info on the bitmap indexed by handle. 
 
void initObjTextOffsetY(int y)
 
void hud_stop_subspace_notify()
 
__inline void gr_gradient(int x1, int y1, int x2, int y2, int resize_mode=GR_RESIZE_FULL)
 
int hud_gauge_active(int gauge_index)
Determine if the specified HUD gauge should be displayed. 
 
struct vec3d::@225::@227 xyz
 
void initRedAlertTextOffsetY(int y)
 
void initBitmaps(const char *fname)
 
bool maybeFlashLag(bool flash_fast=false)
 
int HUD_disable_except_messages
 
int snd_is_playing(int sig)
 
int red_alert_in_progress()
 
bool dock_check_find_direct_docked_object(object *objp, object *other_objp)
 
color clr[NUM_HUD_GAUGES]
 
ai_info Ai_info[MAX_AI_INFO]
 
#define END_OF_LIST(head)
 
void hud_frames_init(hud_frames *hf)
Initialise the members of the hud_frames struct to default values. 
 
void setCockpitTarget(const cockpit_display *display)
 
#define HUD_NEW_ALPHA_NORMAL_HI
 
void initCockpitTarget(const char *display_name, int _target_x, int _target_y, int _target_w, int _target_h, int _canvas_w, int _canvas_h)
 
#define SUBSYS_DAMAGE_FLASH_DURATION
 
void initBitmaps(const char *fname)
 
ship_subsys * targeted_subsys
 
int hud_sensors_ok(ship *sp, int show_msg)
Check if targeting is possible based on sensors strength. 
 
void initTextValueOffsetY(int y)
 
int ship_is_tagged(object *objp)
 
int Sexp_hud_display_warpout
 
void gr_set_screen_scale(int w, int h, int zoom_w, int zoom_h, int max_w, int max_h, int center_w, int center_h, bool force_stretch)
 
void renderLine(int x1, int y1, int x2, int y2)
 
#define PLAYER_FLAGS_AUTO_TARGETING
 
void hud_check_reticle_list()
 
void gr_set_color_fast(color *dst)
 
void initTextValueOffsets(int x, int y)
 
std::basic_string< char, std::char_traits< char >, std::allocator< char > > SCP_string
 
void initBaseResolution(int w, int h)
 
void hud_set_bright_color()
Set the current color to a bright HUD color (ie high alpha) 
 
void gr_set_bitmap(int bitmap_num, int alphablend_mode, int bitblt_mode, float alpha)
 
int Supernova_coords[GR_NUM_RESOLUTIONS][2]
 
#define HUD_DIRECTIVES_VIEW
 
void hud_close()
Delete all HUD gauge objects, for all ships. 
 
void initBitmaps(const char *fname)
 
float current_target_distance
 
void renderGradientLine(int x1, int y1, int x2, int y2)
 
void hud_target_clear_display_list()
 
GLenum GLuint GLenum GLsizei const GLchar * buf
 
ship_subsys_info subsys_info[SUBSYSTEM_MAX]
 
void initMiddleFrameStartOffsetY(int y)
 
void hud_set_default_color()
Set the current color to the default HUD color (with default alpha) 
 
void saturate(int *i, int minv, int maxv)
 
void setClip(int x, int y, int w, int h)
 
bool maybeFlashNotify(bool flash_fast=false)
 
#define HUD_COLOR_ALPHA_MAX
 
void render(float frametime)
 
#define HUD_COLOR_ALPHA_USER_MAX
 
void hud_set_dim_color()
Set the current color to a dim HUD color (ie low alpha) 
 
int bm_load_animation(const char *real_filename, int *nframes, int *fps, int *keyframe, int can_drop_frames, int dir_type)
Loads a bitmap sequance so we can draw with it. 
 
virtual void render(float frametime)
 
int hud_get_dock_time(object *docker_objp)
Get the number of seconds until repair ship will dock with ther player. 
 
int hud_support_find_closest(int objnum)
Locate the closest support ship which is trying to dock with player. 
 
void initTextOffsets(int x, int y)
 
SCP_vector< cockpit_display > Player_displays
 
void hud_start_objective_notify()
 
__inline void gr_set_clip(int x, int y, int w, int h, int resize_mode=GR_RESIZE_FULL)
 
void initRedAlertValueOffsetY(int y)
 
void updatePopUp(bool pop_up_flag)
 
void initTextDockValueOffsetX(int x)
 
player Players[MAX_PLAYERS]
 
void hud_stop_objective_notify()
 
#define HUD_TARGET_MONITOR
 
char alt_dmg_sub_name[NAME_LENGTH]
 
HudGaugeObjectiveNotify()
 
void initFont(int input_font_num)
 
char texture_target_fname[MAX_FILENAME_LEN]
 
typedef int(SCP_EXT_CALLCONV *SCPDLL_PFVERSION)(SCPDLL_Version *)
 
float supernova_time_left()
 
SCP_vector< HudGauge * > default_hud_gauges
 
float ship_get_subsystem_strength(ship *shipp, int type)
 
void hud_support_view_stop(int stop_now)
Stop displaying the support view pop-up. 
 
#define HUD_OBJECT_SUPPORT
 
int hull_integ_val_offset_x
 
void initRenderStatus(bool render)
 
GLdouble GLdouble GLdouble r
 
void hud_level_close()
Do post mission cleanup of HUD. 
 
void hud_update_target_static()
 
struct matrix::@228::@230 vec
 
#define HUD_OBJECT_MISSION_TIME
 
#define HUD_OBJECT_CUSTOM
 
int Subspace_text_offset_y
 
#define HUD_MESSAGE_LINES
 
float ship_max_hull_strength
 
int timestamp_until(int stamp)
 
const char * getCustomGaugeText()
 
void ship_end_render_cockpit_display(int cockpit_display_num)
 
void initSubsysIntegStartOffsets(int x, int y)
 
#define TBOX_FLASH_SUBSYS
 
int Voice_coords[GR_NUM_RESOLUTIONS][2]
 
void hud_add_objective_messsage(int type, int status)
Add objective status on the HUD. 
 
void render(float frametime)
 
GLboolean GLboolean GLboolean GLboolean a
 
int HUD_gauge_flash_next[NUM_HUD_GAUGES]
 
void initBottomBgOffset(int offset)
 
float get_hull_pct(object *objp)
 
bool object_get_gliding(object *objp)
 
void hud_update_objective_message()
 
int ship_get_sound(object *objp, GameSoundsIndex id)
Returns a ship-specific sound index. 
 
ai_goal goals[MAX_AI_GOALS]
 
#define HUD_OBJECT_MULTI_MSG
 
void hud_show_selection_set()
 
color HUD_color_defaults[HUD_NUM_COLOR_LEVELS]
 
int emp_should_blit_gauge()
 
int Subspace_text_val_offset_y
 
void hud_shield_level_init()
 
#define HUD_SUPPORT_GAUGE
 
void _cdecl gr_printf(int x, int y, const char *format,...)
 
#define HUD_NEW_ALPHA_DIM
 
void hud_lock_reset(float lock_time_scale)
 
sprintf(buf,"(%f,%f,%f)", v3->xyz.x, v3->xyz.y, v3->xyz.z)
 
void hud_gauge_start_flash(int gauge_index)
Call HUD function to flash gauge. 
 
void hud_target_auto_target_next()
 
void hud_support_view_abort()
 
#define HUD_NEW_ALPHA_BRIGHT
 
char name[MAX_FILENAME_LEN]
 
#define NUM_VM_OTHER_SHIP_GAUGES
 
void emp_hud_jitter(int *x, int *y)
 
ubyte g3_rotate_vertex(vertex *dest, const vec3d *src)
 
#define HUD_GAUGE_FLASH_INTERVAL
 
void hud_escort_cull_list()
 
int snd_play(game_snd *gs, float pan, float vol_scale, int priority, bool is_voice_msg)
 
void initHeaderOffsets(int x, int y)
 
void initLineHeight(int h)
 
void hud_support_view_start()
Start displaying the support view pop-up. This will remain up until hud_support_view_stop() is called...
 
virtual void preprocess()
 
void hud_page_in()
Page in all HUD bitmaps. 
 
int HUD_gauge_flash_duration[NUM_HUD_GAUGES]
 
HudGauge * hud_get_gauge(const char *name)
 
void initBitmaps(const char *fname)
 
void hud_objective_message_init()
Initialise the objective message display data. 
 
net_player_server_info s_info
 
void hud_set_gauge_color(int gauge_index, int bright_index)
Set the HUD color for the gauge, based on whether it is flashing or not. 
 
void hud_show_asteroid_brackets()
Draw white brackets around asteroids which has the AF_DRAW_BRACKETS flag set. 
 
int hud_config_popup_flag_is_set(int i)
 
#define PCM_WARPOUT_STAGE2
 
int hud_objective_notify_active()
 
int middle_frame_start_offset_y
 
void initObjValueOffsetY(int y)
 
void hud_targetbox_truncate_subsys_name(char *outstr)
 
bool bm_set_render_target(int handle, int face)
(GR function) Calls gr_bm_set_render target for the given bitmap indexed by handle ...
 
int g3_project_vertex(vertex *point)
 
int secondary_bank_ammo[MAX_SHIP_SECONDARY_BANKS]
 
void hud_show_targeting_gauges(float frametime)
 
void hud_render_all()
Undertakes main HUD render. 
 
void hud_update_ship_status(object *targetp)
 
void renderString(int x, int y, const char *str)
 
void render(float frametime)
 
void hud_update_closest_turret()
 
int Objective_text_offset_y
 
int iff_x_attacks_y(int team_x, int team_y)
 
const char * getCustomGaugeName()
 
void hud_draw_navigation()
 
object Objects[MAX_OBJECTS]
 
GLint GLint GLint GLint GLint x
 
void asteroid_show_brackets()
 
int hud_disabled()
Checks if HUD disabled. 
 
void hud_start_subspace_notify()
 
void hud_set_draw(int draw)
 
void update_throttle_sound()
If the throttle has changed, modify the sound. 
 
int Training_message_visible
 
const char * XSTR(const char *str, int index)
 
void hud_update_frame(float frametime)
Updates HUD systems each frame. 
 
int Hud_max_targeting_range
 
void hud_shield_hit_update()
 
void updateSexpOverride(bool sexp)
 
void startFlashLag(int duration=1400)
 
ubyte lcl_get_font_index(int font_num)
 
#define SUBSYS_DAMAGE_FLASH_INTERVAL
 
typedef void(APIENTRY *PFNGLARRAYELEMENTEXTPROC)(GLint i)
 
void renderRect(int x, int y, int w, int h)
 
#define AIF_BEING_REPAIRED
 
void initSubsysIntegValueOffsetX(int x)
 
void hud_anim_init(hud_anim *ha, int sx, int sy, const char *filename)
Initialise the members of the hud_anim struct to default values. 
 
GLuint const GLchar * name
 
__inline void gr_line(int x1, int y1, int x2, int y2, int resize_mode=GR_RESIZE_FULL)
 
int flash_duration_timestamp
 
int hud_gauge_maybe_flash(int gauge_index)
Set the color for a gauge that may be flashing. 
 
void vm_vec_sub(vec3d *dest, const vec3d *src0, const vec3d *src1)
 
void render(float frametime)
Display the kills gauge on the HUD. 
 
void renderStringAlignCenter(int x, int y, int area_width, const char *s)
 
#define MISSION_TYPE_TRAINING
 
color * iff_get_color(int color_index, int is_bright)
 
void HUD_get_nose_coordinates(int *x, int *y)
Returns the offset between the player's view vector and the forward vector of the ship in pixels (Swi...
 
GLboolean GLboolean GLboolean b
 
bool gr_resize_screen_pos(int *x, int *y, int *w, int *h, int resize_mode)
 
void hud_support_view_update()
 
int Event_Music_battle_started
 
void hud_target_change_check()
 
int multi_query_lag_status()
 
float vm_vec_dist_quick(const vec3d *v0, const vec3d *v1)
 
int hud_squadmsg_do_frame()
 
GLubyte GLubyte GLubyte GLubyte w
 
#define MULTI_MSG_MAX_TEXT_LEN
 
void unsize(int *x, int *y)
 
int set_target_objnum(ai_info *aip, int objnum)
 
virtual void render(float frametime)
 
void initHeaderOffsets(int x, int y)
 
void hud_damage_popup_init()
Called at the beginning of each level. Loads frame data in once, and initializes any damage gauge spe...
 
void render(float frametime)
 
void bm_page_in_aabitmap(int bitmapnum, int nframes)
Marks a texture as being used for this level, and is anti-aliased. 
 
void HUD_init()
Called each level to initialize HUD systems. 
 
void initTextOffsets(int x, int y)
 
int Ping_coords[GR_NUM_RESOLUTIONS][2]
 
void hud_disable_except_messages(int disable)
 
void hud_start_text_flash(char *txt, int t, int interval)
 
#define HUD_OBJECT_SUPERNOVA
 
void hud_targetbox_start_flash(int index, int duration)
 
void HUD_set_clip(int x, int y, int w, int h)
Like gr_set_clip() only it accounts for HUD jittering. 
 
#define HUD_OBJECT_FLIGHT_PATH
 
GLfloat GLfloat GLfloat GLfloat nx
 
#define HUD_WEAPONS_GAUGE
 
void gr_get_string_size(int *w, int *h, const char *text, int len=9999)
 
void getPosition(int *x, int *y)
 
int snd_play_looping(game_snd *gs, float pan, int start_loop, int stop_loop, float vol_scale, int scriptingUpdateVolume)
 
#define HUD_OBJECT_VOICE_STATUS
 
#define THROTTLE_SOUND_CHECK_INTERVAL
 
int Red_text_val_offset_y
 
void sexpLockConfigColor(bool lock)
 
long Game_time_compression
 
int hud_maybe_render_emp_icon()
 
HUD_CONFIG_TYPE HUD_config
 
void HUD_reset_clip()
Like gr_reset_clip() only it accounts for HUD jittering. 
 
void snd_set_volume(int sig, float volume)
 
SCP_vector< ship_info > Ship_info
 
#define MULTI_VOICE_STATUS_DENIED
 
__inline void gr_aabitmap(int x, int y, int resize_mode=GR_RESIZE_FULL, bool mirror=false)
 
void gr_reset_screen_scale()
 
void hud_init_msg_window()
 
__inline void gr_aabitmap_ex(int x, int y, int w, int h, int sx, int sy, int resize_mode=GR_RESIZE_FULL, bool mirror=false)
 
int hud_anim_load(hud_anim *ha)
Load a hud_anim. 
 
#define timestamp_elapsed(stamp)
 
void resize(int *x, int *y)
 
#define OF_SHOULD_BE_DEAD
 
int Target_static_looping
 
vec3d * get_subsystem_world_pos(object *parent_obj, ship_subsys *subsys, vec3d *world_pos)
 
void initSubspaceValueOffsetY(int y)
 
#define AIF_REPAIR_OBSTRUCTED
 
bool gr_unsize_screen_pos(int *x, int *y, int *w, int *h, int resize_mode)
 
GLsizei GLsizei GLuint * obj
 
#define TBOX_FLASH_INTERVAL
 
void renderPrintf(int x, int y, const char *format,...)
 
float Pl_target_integrity
 
void initHullIntegValueOffsetX(int x)
 
void hud_set_contrast(int high)
 
void hud_update_weapon_flash()
 
#define HUD_TARGET_MONITOR_EXTRA_DATA
 
void gr_bitmap(int _x, int _y, int resize_mode)
 
void emp_hud_string(int x, int y, int gauge_id, const char *str, int resize_mode)
 
void render(float frametime)
 
char filename[MAX_FILENAME_LEN]
 
#define AI_GOAL_REARM_REPAIR
 
void hud_maybe_display_subspace_notify()
 
void hud_target_last_transmit_level_init()
 
int hull_integ_offsets[2]
 
void initBitmaps(const char *fname)
 
#define PCM_WARPOUT_STAGE3
 
void lockConfigColor(bool lock)
 
bool gr_unsize_screen_posf(float *x, float *y, float *w, float *h, int resize_mode)
 
bool setupRenderCanvas(int render_target=-1)
 
float hud_find_target_distance(object *targetee, object *targeter)
 
int ship_name_lookup(const char *name, int inc_players)
 
#define HUD_CENTER_RETICLE
 
char custom_name[NAME_LENGTH]
 
void hud_update_reticle(player *pp)
 
void render(float frametime)
 
#define ARRIVE_FROM_DOCK_BAY
 
void hud_targetbox_init_flash()
 
void hud_init_targeting()
 
void initHullIntegOffsets(int x, int y)
 
void gr_set_font(int fontnum)
 
GLclampf GLclampf GLclampf alpha
 
#define MULTI_VOICE_STATUS_PLAYING
 
void hud_render_preprocess(float frametime)
Render gauges that need to be between a g3_start_frame() and a g3_end_frame() 
 
void hud_init_targeting_colors()
 
int Multi_msg_coords[GR_NUM_RESOLUTIONS][2]
 
support_ship_info support_ships
 
int multi_msg_message_text(char *txt)
 
void initPosition(int x, int y)
 
int ship_start_render_cockpit_display(int cockpit_display_num)
 
#define HUD_OBJECT_OBJ_NOTIFY
 
int hud_disabled_except_messages()
Like hud_disabled(), except messages are still drawn. 
 
void initTextDockOffsetX(int x)
 
int text_dock_val_offset_x
 
void updateCustomGaugeText(const char *txt)
 
#define HUD_NEW_ALPHA_BRIGHT_HI
 
bool ship_subsys_takes_damage(ship_subsys *ss)
 
void hud_set_iff_color(object *objp, int is_bright)
Will set the color to the IFF color based on the team. 
 
#define PLAYER_FLAGS_MSG_MODE
 
void render(float frametime)
Render multiplayer ping time to the server, if appropriate. 
 
void initBitmap(const char *fname)
 
int Objective_text_val_offset_y
 
#define IFF_COLOR_SELECTION
 
void initHalfSize(int w, int h)
 
void hud_process_remote_detonate_missile()
 
void hud_save_restore_camera_data(int save)
Called to save and restore the 3D camera settings. 
 
void hud_process_homing_missiles()
 
int hud_subspace_notify_active()
 
engine sound (as heard in cockpit) 
 
int subsys_integ_start_offsets[2]
 
void hud_show_message_sender()
 
int current_target_is_locked
 
void resetCockpitTarget()
 
void renderCircle(int x, int y, int diameter)
 
#define g3_start_frame(zbuffer_flag)
 
void startFlashNotify(int duration=1400)
 
int event_music_battle_start()
 
int hud_target_invalid_awacs(object *objp)
 
#define HUD_NEW_ALPHA_DIM_HI
 
float vm_vec_normalize(vec3d *v)
 
void renderBitmap(int x, int y)
 
#define HUD_OBJECT_TEXT_WARNINGS
 
void HUD_set_offsets(object *viewer_obj, int wiggedy_wack, matrix *eye_orient)
Set the offset values for this render frame. 
 
void hud_toggle_contrast()