FS2_Open
Open source remastering of the Freespace 2 engine
hudtarget.cpp File Reference
#include "asteroid/asteroid.h"
#include "cmdline/cmdline.h"
#include "debris/debris.h"
#include "freespace2/freespace.h"
#include "gamesnd/gamesnd.h"
#include "globalincs/alphacolors.h"
#include "globalincs/linklist.h"
#include "hud/hudartillery.h"
#include "hud/hudbrackets.h"
#include "hud/hudlock.h"
#include "hud/hudmessage.h"
#include "hud/hudparse.h"
#include "hud/hudreticle.h"
#include "hud/hudshield.h"
#include "hud/hudtarget.h"
#include "hud/hudtargetbox.h"
#include "iff_defs/iff_defs.h"
#include "io/timer.h"
#include "jumpnode/jumpnode.h"
#include "localization/localize.h"
#include "mission/missionhotkey.h"
#include "mission/missionmessage.h"
#include "model/model.h"
#include "network/multi.h"
#include "network/multiutil.h"
#include "object/object.h"
#include "parse/parselo.h"
#include "playerman/player.h"
#include "render/3dinternal.h"
#include "ship/awacs.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.

Classes

struct  _reticle_list
 
struct  weapon_flash
 
struct  homing_beep_info
 
struct  eval_next_turret
 
struct  transmit_target
 

Macros

#define MIN_DISTANCE_TO_CONSIDER_THREAT   1500
 
#define RL_USED   (1<<0)
 
#define RL_USE_DOT   (1<<1)
 
#define RESET_TARGET_IN_RETICLE   750
 
#define MAX_RETICLE_TARGETS   50
 
#define TL_RESET   1500
 
#define TURRET_RESET   1000
 
#define TOGGLE_TEXT_AUTOT   0
 
#define TOGGLE_TEXT_TARGET   1
 
#define TOGGLE_TEXT_AUTOS   2
 
#define TOGGLE_TEXT_SPEED   3
 
#define NUM_WEAPON_GAUGES   5
 
#define MAX_WEAPON_FLASH_LINES   7
 
#define RETICLE_DEFAULT_DIST   100000.0f
 
#define RETICLE_DEFAULT_DOT   1.0f
 
#define TYPE_NONE   0
 
#define TYPE_FACING_BEAM   1
 
#define TYPE_FACING_FLAK   2
 
#define TYPE_FACING_MISSILE   3
 
#define TYPE_FACING_LASER   4
 
#define TYPE_NONFACING_BEAM   5
 
#define TYPE_NONFACING_FLAK   6
 
#define TYPE_NONFACING_MISSILE   7
 
#define TYPE_NONFACING_LASER   8
 
#define TYPE_NONFACING_INC   4
 
#define TARGET_IN_RETICLE_DISTANCE   10000.0f
 
#define MIN_DOT_FOR_TARGET   0.9726
 
#define T_LENGTH   8
 
#define T_OFFSET_FROM_CIRCLE   -13
 
#define T_BASE_LENGTH   4
 
#define MAX_TRANSMIT_TARGETS   10
 

Typedefs

typedef struct _reticle_list reticle_list
 
typedef struct weapon_flash weapon_flash
 
typedef struct homing_beep_info homing_beep_info
 
typedef struct eval_next_turret eval_next_turret
 
typedef struct transmit_target transmit_target
 

Functions

void hud_maybe_flash_weapon (int index)
 
int hud_target_invalid_awacs (object *objp)
 
ship_subsysadvance_subsys (ship_subsys *cur, int next_flag)
 
void hud_maybe_set_sorted_turret_subsys (ship *shipp)
 
void hud_reticle_clear_list (reticle_list *rlist)
 
void hud_reticle_list_init ()
 
void hud_check_reticle_list ()
 
int hud_reticle_list_find_free ()
 
void hud_stuff_reticle_list (reticle_list *rl, object *objp, float measure, int dot_flag)
 
void hud_reticle_list_update (object *objp, float measure, int dot_flag)
 
objecthud_reticle_pick_target ()
 
void hud_target_hotkey_add_remove (int k, object *ctarget, int how_to_add)
 
void hud_target_hotkey_clear (int k)
 
void hud_target_hotkey_select (int k)
 
void hud_make_shader (shader *sh, ubyte r, ubyte g, ubyte b, float dimmer=1000.0f)
 
void hud_init_targeting_colors ()
 
void hud_keyed_targets_clear ()
 
void hud_weapons_init ()
 
void hud_init_homing_beep ()
 
void hud_init_ballistic_index ()
 
void hud_init_targeting ()
 
void hud_target_subobject_common (int next_flag)
 
objectadvance_fb (object *objp, int next_flag)
 
void hud_target_prev_subobject ()
 
void hud_target_next_subobject ()
 
void hud_target_common (int team_mask, int next_flag)
 
void hud_target_next (int team_mask)
 
void hud_target_prev (int team_mask)
 
missile_objadvance_missile_obj (missile_obj *mo, int next_flag)
 
ship_objadvance_ship (ship_obj *so, int next_flag)
 
ship_objget_ship_obj_ptr_from_index (int index)
 
void hud_target_missile (object *source_obj, int next_flag)
 
int hud_target_ship_can_be_scanned (ship *shipp)
 
void hud_target_uninspected_cargo (int next_flag)
 
void hud_target_newest_ship ()
 
int turret_compare_func (const void *e1, const void *e2)
 
bool turret_weapon_has_flags (ship_weapon *swp, int flags)
 
bool turret_weapon_has_subtype (ship_weapon *swp, int subtype)
 
void hud_target_live_turret (int next_flag, int auto_advance, int only_player_target)
 
void hud_target_closest_locked_missile (object *locked_obj)
 
void hud_target_auto_target_next ()
 
float hud_find_target_distance (object *targetee, object *targeter)
 
bool evaluate_ship_as_closest_target (esct *esct_p)
 evaluate a ship (and maybe turrets) as a potential target More...
 
int hud_target_closest (int team_mask, int attacked_objnum, int play_fail_snd, int filter, int get_closest_turret_attacking_player)
 Sets the Players[Player_num].current_target to the closest ship to the player that matches the team passed as a paramater. More...
 
void hud_update_closest_turret ()
 
void hud_target_targets_target ()
 
int object_targetable_in_reticle (object *target_objp)
 
void hud_target_in_reticle_new ()
 
void hud_target_in_reticle_old ()
 
void hud_target_subsystem_in_reticle ()
 
void hud_tri (float x1, float y1, float x2, float y2, float x3, float y3)
 
void hud_tri_empty (float x1, float y1, float x2, float y2, float x3, float y3)
 
void hud_process_homing_missiles ()
 
void hud_process_remote_detonate_missile ()
 
void hud_show_message_sender ()
 
void hud_prune_hotkeys ()
 
void hud_show_selection_set ()
 
void hud_show_targeting_gauges (float frametime)
 
void hud_show_hostile_triangle ()
 
void hud_calculate_lead_pos (vec3d *lead_target_pos, vec3d *target_pos, object *targetp, weapon_info *wip, float dist_to_target, vec3d *rel_pos)
 
int hud_get_best_primary_bank (float *range)
 
void polish_predicted_target_pos (weapon_info *wip, object *targetp, vec3d *enemy_pos, vec3d *predicted_enemy_pos, float dist_to_enemy, vec3d *last_delta_vec, int num_polish_steps)
 
void hud_cease_subsystem_targeting (int print_message)
 
void hud_cease_targeting ()
 
void hud_restore_subsystem_target (ship *shipp)
 
vec3dget_subsystem_world_pos (object *parent_obj, ship_subsys *subsys, vec3d *world_pos)
 
void hud_target_change_check ()
 
void hud_start_flash_weapon (int index)
 
int hud_sensors_ok (ship *sp, int show_msg)
 Check if targeting is possible based on sensors strength. More...
 
int hud_communications_state (ship *sp)
 
void hud_target_next_list (int hostile, int next_flag, int team_mask, int attacked_objnum, int play_fail_snd, int filter, int get_closest_turret_attacking_player)
 
int hud_target_closest_repair_ship (int goal_objnum)
 
void hud_target_toggle_hidden_from_sensors ()
 
void hud_target_closest_uninspected_object ()
 
void hud_target_uninspected_object (int next_flag)
 
void hud_target_last_transmit_level_init ()
 
int hud_target_last_transmit_newest ()
 
void hud_target_last_transmit ()
 
void hud_target_last_transmit_add (int ship_num)
 
void hud_target_random_ship ()
 
void hudtarget_page_in ()
 
void hud_stuff_ship_name (char *ship_name_text, ship *shipp)
 
void hud_stuff_ship_callsign (char *ship_callsign_text, ship *shipp)
 
void hud_stuff_ship_class (char *ship_class_text, ship *shipp)
 
void hud_update_weapon_flash ()
 
void hud_target_add_display_list (object *objp, vertex *target_point, vec3d *target_pos, int correction, color *bracket_clr, char *name, int flags)
 
void hud_target_clear_display_list ()
 

Variables

int TARGET_SHIP_IGNORE_FLAGS = (SF_EXPLODED|SF_DEPART_WARP|SF_DYING|SF_ARRIVING_STAGE_1|SF_HIDDEN_FROM_SENSORS)
 
int Hud_target_w
 
int Hud_target_h
 
float Offscreen_tri_base [GR_NUM_RESOLUTIONS]
 
float Offscreen_tri_height [GR_NUM_RESOLUTIONS]
 
float Max_offscreen_tri_seperation [GR_NUM_RESOLUTIONS]
 
float Max_front_seperation [GR_NUM_RESOLUTIONS]
 
SCP_vector< target_display_infotarget_display_list
 
objecthostile_obj = NULL
 
object obj_used_list
 
char * Cargo_names []
 
shader Training_msg_glass
 
float Target_triangle_base [GR_NUM_RESOLUTIONS]
 
float Target_triangle_height [GR_NUM_RESOLUTIONS]
 
htarget_list htarget_items [MAX_HOTKEY_TARGET_ITEMS]
 
htarget_list htarget_free_list
 
int Reticle_save_timestamp
 
reticle_list Reticle_cur_list
 
reticle_list Reticle_save_list
 
reticle_list Reticle_list [MAX_RETICLE_TARGETS]
 
float Lead_indicator_half [NUM_HUD_RETICLE_STYLES][GR_NUM_RESOLUTIONS][2]
 
hud_frames Lead_indicator_gauge
 
int Lead_indicator_gauge_loaded = 0
 
char Lead_fname [NUM_HUD_RETICLE_STYLES][GR_NUM_RESOLUTIONS][MAX_FILENAME_LEN]
 
hud_frames Cmeasure_gauge
 
int Cmeasure_gauge_loaded = 0
 
int Cm_coords [GR_NUM_RESOLUTIONS][2]
 
int Cm_text_coords [GR_NUM_RESOLUTIONS][2]
 
int Cm_text_val_coords [GR_NUM_RESOLUTIONS][2]
 
char Cm_fname [GR_NUM_RESOLUTIONS][MAX_FILENAME_LEN]
 
int Toggle_text_alpha = 255
 
hud_frames Weapon_gauges [NUM_HUD_SETTINGS][NUM_WEAPON_GAUGES]
 
hud_frames New_weapon
 
int Weapon_gauges_loaded = 0
 
int Weapon_gauge_primary_coords [NUM_HUD_SETTINGS][GR_NUM_RESOLUTIONS][3][2]
 
int Weapon_gauge_secondary_coords [NUM_HUD_SETTINGS][GR_NUM_RESOLUTIONS][5][2]
 
int Weapon_title_coords [NUM_HUD_SETTINGS][GR_NUM_RESOLUTIONS][2]
 
int Weapon_plink_coords [GR_NUM_RESOLUTIONS][2][2]
 
int Weapon_pname_coords [GR_NUM_RESOLUTIONS][2][2]
 
int Weapon_slinked_x [GR_NUM_RESOLUTIONS]
 
int Weapon_sunlinked_x [GR_NUM_RESOLUTIONS]
 
int Weapon_secondary_y [GR_NUM_RESOLUTIONS][3]
 
int Weapon_primary_y [GR_NUM_RESOLUTIONS][2]
 
int Weapon_secondary_name_x [GR_NUM_RESOLUTIONS]
 
int Weapon_secondary_ammo_x [GR_NUM_RESOLUTIONS]
 
int Weapon_primary_ammo_x [GR_NUM_RESOLUTIONS]
 
int Weapon_secondary_reload_x [GR_NUM_RESOLUTIONS]
 
char * Weapon_gauge_fnames [NUM_HUD_SETTINGS][GR_NUM_RESOLUTIONS][NUM_WEAPON_GAUGES]
 
weapon_flash Weapon_flash_info
 
homing_beep_info Homing_beep = { -1, 0, 150, 1000, 30.0f, 1500.0f, 1.729412f }
 
float Min_warning_missile_dist
 
float Max_warning_missile_dist
 
color HUD_color_homing_indicator
 
int HUD_drew_selection_bracket_on_target
 
char Fred_callsigns [MAX_SHIPS][NAME_LENGTH+1]
 
char Fred_alt_names [MAX_SHIPS][NAME_LENGTH+1]
 

Macro Definition Documentation

#define MAX_RETICLE_TARGETS   50

Definition at line 140 of file hudtarget.cpp.

#define MAX_TRANSMIT_TARGETS   10

Definition at line 5095 of file hudtarget.cpp.

#define MAX_WEAPON_FLASH_LINES   7

Definition at line 430 of file hudtarget.cpp.

#define MIN_DISTANCE_TO_CONSIDER_THREAT   1500

Definition at line 121 of file hudtarget.cpp.

#define MIN_DOT_FOR_TARGET   0.9726

Definition at line 2600 of file hudtarget.cpp.

#define NUM_WEAPON_GAUGES   5

Definition at line 230 of file hudtarget.cpp.

#define RESET_TARGET_IN_RETICLE   750

Definition at line 136 of file hudtarget.cpp.

#define RETICLE_DEFAULT_DIST   100000.0f

Definition at line 587 of file hudtarget.cpp.

#define RETICLE_DEFAULT_DOT   1.0f

Definition at line 588 of file hudtarget.cpp.

#define RL_USE_DOT   (1<<1)

Definition at line 127 of file hudtarget.cpp.

#define RL_USED   (1<<0)

Definition at line 126 of file hudtarget.cpp.

#define T_BASE_LENGTH   4

Definition at line 2744 of file hudtarget.cpp.

#define T_LENGTH   8

Definition at line 2742 of file hudtarget.cpp.

#define T_OFFSET_FROM_CIRCLE   -13

Definition at line 2743 of file hudtarget.cpp.

#define TARGET_IN_RETICLE_DISTANCE   10000.0f

Definition at line 2481 of file hudtarget.cpp.

#define TL_RESET   1500

Definition at line 146 of file hudtarget.cpp.

#define TOGGLE_TEXT_AUTOS   2

Definition at line 223 of file hudtarget.cpp.

#define TOGGLE_TEXT_AUTOT   0

Definition at line 221 of file hudtarget.cpp.

#define TOGGLE_TEXT_SPEED   3

Definition at line 224 of file hudtarget.cpp.

#define TOGGLE_TEXT_TARGET   1

Definition at line 222 of file hudtarget.cpp.

#define TURRET_RESET   1000

Definition at line 147 of file hudtarget.cpp.

#define TYPE_FACING_BEAM   1

Definition at line 1682 of file hudtarget.cpp.

#define TYPE_FACING_FLAK   2

Definition at line 1683 of file hudtarget.cpp.

#define TYPE_FACING_LASER   4

Definition at line 1685 of file hudtarget.cpp.

#define TYPE_FACING_MISSILE   3

Definition at line 1684 of file hudtarget.cpp.

#define TYPE_NONE   0

Definition at line 1681 of file hudtarget.cpp.

#define TYPE_NONFACING_BEAM   5

Definition at line 1686 of file hudtarget.cpp.

#define TYPE_NONFACING_FLAK   6

Definition at line 1687 of file hudtarget.cpp.

#define TYPE_NONFACING_INC   4

Definition at line 1690 of file hudtarget.cpp.

#define TYPE_NONFACING_LASER   8

Definition at line 1689 of file hudtarget.cpp.

#define TYPE_NONFACING_MISSILE   7

Definition at line 1688 of file hudtarget.cpp.

Typedef Documentation

typedef struct _reticle_list reticle_list
typedef struct weapon_flash weapon_flash

Function Documentation

object* advance_fb ( object objp,
int  next_flag 
)

Definition at line 1131 of file hudtarget.cpp.

missile_obj* advance_missile_obj ( missile_obj mo,
int  next_flag 
)

Definition at line 1260 of file hudtarget.cpp.

ship_obj* advance_ship ( ship_obj so,
int  next_flag 
)

Definition at line 1269 of file hudtarget.cpp.

ship_subsys* advance_subsys ( ship_subsys cur,
int  next_flag 
)

Definition at line 480 of file hudtarget.cpp.

bool evaluate_ship_as_closest_target ( esct esct_p)

evaluate a ship (and maybe turrets) as a potential target

Check if shipp (or its turrets) is attacking attacked_objnum Provides a special case for player trying to select target (don't check if turrets are aimed at player)

Parameters
[in,out]*esctThe Evaluate Ship as Closest Target (esct) that will be used to determine if a target is a valid, harmful target and, if so, sets the min_distance attribute to the distance of either the attacker or the closest attacker's turret. Otherwise, min_distance is set to FLT_MAX
Returns
true if either the ship or one of it's turrets are attacking the player. Otherwise, returns false.

Definition at line 2069 of file hudtarget.cpp.

ship_obj* get_ship_obj_ptr_from_index ( int  index)

Definition at line 513 of file ship.cpp.

vec3d* get_subsystem_world_pos ( object parent_obj,
ship_subsys subsys,
vec3d world_pos 
)

Definition at line 4395 of file hudtarget.cpp.

void hud_calculate_lead_pos ( vec3d lead_target_pos,
vec3d target_pos,
object targetp,
weapon_info wip,
float  dist_to_target,
vec3d rel_pos 
)

Definition at line 3682 of file hudtarget.cpp.

void hud_cease_subsystem_targeting ( int  print_message)

Definition at line 4346 of file hudtarget.cpp.

void hud_cease_targeting ( )

Definition at line 4367 of file hudtarget.cpp.

void hud_check_reticle_list ( )

Definition at line 539 of file hudtarget.cpp.

int hud_communications_state ( ship sp)

Definition at line 4607 of file hudtarget.cpp.

float hud_find_target_distance ( object targetee,
object targeter 
)

Definition at line 2009 of file hudtarget.cpp.

int hud_get_best_primary_bank ( float range)

Definition at line 3719 of file hudtarget.cpp.

void hud_init_ballistic_index ( )

Definition at line 1019 of file hudtarget.cpp.

void hud_init_homing_beep ( )

Definition at line 1012 of file hudtarget.cpp.

void hud_init_targeting ( )

Definition at line 1038 of file hudtarget.cpp.

void hud_init_targeting_colors ( )

Definition at line 973 of file hudtarget.cpp.

void hud_keyed_targets_clear ( )

Definition at line 982 of file hudtarget.cpp.

void hud_make_shader ( shader sh,
ubyte  r,
ubyte  g,
ubyte  b,
float  dimmer = 1000.0f 
)

Definition at line 959 of file hudtarget.cpp.

void hud_maybe_flash_weapon ( int  index)

Definition at line 4550 of file hudtarget.cpp.

void hud_maybe_set_sorted_turret_subsys ( ship shipp)

Definition at line 490 of file hudtarget.cpp.

void hud_process_homing_missiles ( void  )

Definition at line 3098 of file hudtarget.cpp.

void hud_process_remote_detonate_missile ( )

Definition at line 3224 of file hudtarget.cpp.

void hud_prune_hotkeys ( )

Definition at line 3330 of file hudtarget.cpp.

void hud_restore_subsystem_target ( ship shipp)

Definition at line 4379 of file hudtarget.cpp.

void hud_reticle_clear_list ( reticle_list rlist)

Definition at line 511 of file hudtarget.cpp.

int hud_reticle_list_find_free ( )

Definition at line 564 of file hudtarget.cpp.

void hud_reticle_list_init ( )

Definition at line 522 of file hudtarget.cpp.

void hud_reticle_list_update ( object objp,
float  measure,
int  dot_flag 
)

Definition at line 612 of file hudtarget.cpp.

object* hud_reticle_pick_target ( )

Definition at line 679 of file hudtarget.cpp.

int hud_sensors_ok ( ship sp,
int  show_msg 
)

Check if targeting is possible based on sensors strength.

Definition at line 4578 of file hudtarget.cpp.

void hud_show_hostile_triangle ( )

Definition at line 3556 of file hudtarget.cpp.

void hud_show_message_sender ( )

Definition at line 3265 of file hudtarget.cpp.

void hud_show_selection_set ( )

Definition at line 3387 of file hudtarget.cpp.

void hud_show_targeting_gauges ( float  frametime)

Definition at line 3478 of file hudtarget.cpp.

void hud_start_flash_weapon ( int  index)

Definition at line 4534 of file hudtarget.cpp.

void hud_stuff_reticle_list ( reticle_list rl,
object objp,
float  measure,
int  dot_flag 
)

Definition at line 589 of file hudtarget.cpp.

void hud_stuff_ship_callsign ( char *  ship_callsign_text,
ship shipp 
)

Definition at line 5290 of file hudtarget.cpp.

void hud_stuff_ship_class ( char *  ship_class_text,
ship shipp 
)

Definition at line 5325 of file hudtarget.cpp.

void hud_stuff_ship_name ( char *  ship_name_text,
ship shipp 
)

Definition at line 5269 of file hudtarget.cpp.

void hud_target_add_display_list ( object objp,
vertex target_point,
vec3d target_pos,
int  correction,
color bracket_clr,
char *  name,
int  flags 
)

Definition at line 6195 of file hudtarget.cpp.

void hud_target_auto_target_next ( )

Definition at line 1971 of file hudtarget.cpp.

void hud_target_change_check ( )

Definition at line 4407 of file hudtarget.cpp.

void hud_target_clear_display_list ( )

Definition at line 6221 of file hudtarget.cpp.

int hud_target_closest ( int  team_mask,
int  attacked_objnum,
int  play_fail_snd,
int  filter,
int  get_closest_turret_attacking_player 
)

Sets the Players[Player_num].current_target to the closest ship to the player that matches the team passed as a paramater.

The current algorithm is to simply iterate through the objects and calculate the magnitude of the vector that connects the player to the target. The smallest magnitude is tracked, and then used to locate the closest hostile ship. Note only the square of the magnitude is required, since we are only comparing magnitudes.

Parameters
[in]team_maskteam of closest ship that should be targeted. Default value is -1, if team doesn't matter.
[in]attacked_objnumobject number of ship that is being attacked
[in]play_fail_sndboolean, whether to play SND_TARGET_FAIL (needed, since function called repeatedly when auto-targeting is enabled, and we don't want a string of fail sounds playing). This is a default parameter with a value of TRUE.
[in]filterOPTIONAL parameter (default value 0): when set to TRUE, only fighters and bombers are considered for new targets.
[in]get_closest_turret_attacking_playerFinds the closest turret attacking the player if true. Otherwise, only finds the closest attacking ship, targeting the turret closest to the player.
Returns
: true (non-zero) if a target was acquired. Returns false (zero) if no target was acquired.

Definition at line 2212 of file hudtarget.cpp.

void hud_target_closest_locked_missile ( object locked_obj)

Definition at line 1908 of file hudtarget.cpp.

int hud_target_closest_repair_ship ( int  goal_objnum)

Definition at line 4858 of file hudtarget.cpp.

void hud_target_closest_uninspected_object ( )

Definition at line 4932 of file hudtarget.cpp.

void hud_target_common ( int  team_mask,
int  next_flag 
)

Definition at line 1158 of file hudtarget.cpp.

void hud_target_hotkey_add_remove ( int  k,
object ctarget,
int  how_to_add 
)

Definition at line 771 of file hudtarget.cpp.

void hud_target_hotkey_clear ( int  k)

Definition at line 835 of file hudtarget.cpp.

void hud_target_hotkey_select ( int  k)

Definition at line 855 of file hudtarget.cpp.

void hud_target_in_reticle_new ( )

Definition at line 2483 of file hudtarget.cpp.

void hud_target_in_reticle_old ( )

Definition at line 2602 of file hudtarget.cpp.

int hud_target_invalid_awacs ( object objp)

Definition at line 460 of file hudtarget.cpp.

void hud_target_last_transmit ( )

Definition at line 5127 of file hudtarget.cpp.

void hud_target_last_transmit_add ( int  ship_num)

Definition at line 5197 of file hudtarget.cpp.

void hud_target_last_transmit_level_init ( )

Definition at line 5099 of file hudtarget.cpp.

int hud_target_last_transmit_newest ( )

Definition at line 5114 of file hudtarget.cpp.

void hud_target_live_turret ( int  next_flag,
int  auto_advance,
int  only_player_target 
)

Definition at line 1724 of file hudtarget.cpp.

void hud_target_missile ( object source_obj,
int  next_flag 
)

Definition at line 1425 of file hudtarget.cpp.

void hud_target_newest_ship ( )

Definition at line 1619 of file hudtarget.cpp.

void hud_target_next ( int  team_mask)

Definition at line 1247 of file hudtarget.cpp.

void hud_target_next_list ( int  hostile,
int  next_flag,
int  team_mask,
int  attacked_objnum,
int  play_fail_snd,
int  filter,
int  get_closest_turret_attacking_player 
)

Definition at line 4637 of file hudtarget.cpp.

void hud_target_next_subobject ( )

Definition at line 1147 of file hudtarget.cpp.

void hud_target_prev ( int  team_mask)

Definition at line 1252 of file hudtarget.cpp.

void hud_target_prev_subobject ( )

Definition at line 1142 of file hudtarget.cpp.

void hud_target_random_ship ( )

Definition at line 5221 of file hudtarget.cpp.

int hud_target_ship_can_be_scanned ( ship shipp)

Definition at line 1545 of file hudtarget.cpp.

void hud_target_subobject_common ( int  next_flag)

Definition at line 1076 of file hudtarget.cpp.

void hud_target_subsystem_in_reticle ( )

Definition at line 2673 of file hudtarget.cpp.

void hud_target_targets_target ( )

Definition at line 2388 of file hudtarget.cpp.

void hud_target_toggle_hidden_from_sensors ( )

Definition at line 4920 of file hudtarget.cpp.

void hud_target_uninspected_cargo ( int  next_flag)

Definition at line 1567 of file hudtarget.cpp.

void hud_target_uninspected_object ( int  next_flag)

Definition at line 4977 of file hudtarget.cpp.

void hud_tri ( float  x1,
float  y1,
float  x2,
float  y2,
float  x3,
float  y3 
)

Definition at line 2803 of file hudtarget.cpp.

void hud_tri_empty ( float  x1,
float  y1,
float  x2,
float  y2,
float  x3,
float  y3 
)

Definition at line 2886 of file hudtarget.cpp.

void hud_update_closest_turret ( )

Definition at line 2321 of file hudtarget.cpp.

void hud_update_weapon_flash ( )

Definition at line 6152 of file hudtarget.cpp.

void hud_weapons_init ( )

Definition at line 999 of file hudtarget.cpp.

void hudtarget_page_in ( )

Definition at line 5249 of file hudtarget.cpp.

int object_targetable_in_reticle ( object target_objp)

Definition at line 2440 of file hudtarget.cpp.

void polish_predicted_target_pos ( weapon_info wip,
object targetp,
vec3d enemy_pos,
vec3d predicted_enemy_pos,
float  dist_to_enemy,
vec3d last_delta_vec,
int  num_polish_steps 
)

Definition at line 3777 of file hudtarget.cpp.

int turret_compare_func ( const void e1,
const void e2 
)

Definition at line 1698 of file hudtarget.cpp.

bool turret_weapon_has_flags ( ship_weapon swp,
int  flags 
)

Returns true if any of the weapons in swp have flags

Note
doesn't work for WIF2

Definition at line 306 of file aiturret.cpp.

bool turret_weapon_has_subtype ( ship_weapon swp,
int  subtype 
)

Returns true if any of the weapons in swp have the subtype specified

Note
It might be a little faster to optimize based on WP_LASER should only appear in primaries and WP_MISSILE in secondaries. but in the interest of future coding I leave it like this.

Definition at line 411 of file aiturret.cpp.

Variable Documentation

char* Cargo_names[]

Definition at line 208 of file missionparse.cpp.

int Cm_coords[GR_NUM_RESOLUTIONS][2]
Initial value:
= {
{
497, 343
},
{
880, 602
}
}

Definition at line 192 of file hudtarget.cpp.

Initial value:
= {
"countermeasure1",
"countermeasure1"
}

Definition at line 216 of file hudtarget.cpp.

int Cm_text_coords[GR_NUM_RESOLUTIONS][2]
Initial value:
= {
{
533, 347
},
{
916, 606
}
}

Definition at line 200 of file hudtarget.cpp.

int Cm_text_val_coords[GR_NUM_RESOLUTIONS][2]
Initial value:
= {
{
506, 347
},
{
889, 606
}
}

Definition at line 208 of file hudtarget.cpp.

hud_frames Cmeasure_gauge

Definition at line 190 of file hudtarget.cpp.

int Cmeasure_gauge_loaded = 0

Definition at line 191 of file hudtarget.cpp.

char Fred_alt_names[MAX_SHIPS][NAME_LENGTH+1]

Definition at line 93 of file management.cpp.

char Fred_callsigns[MAX_SHIPS][NAME_LENGTH+1]

Definition at line 94 of file management.cpp.

homing_beep_info Homing_beep = { -1, 0, 150, 1000, 30.0f, 1500.0f, 1.729412f }

Definition at line 451 of file hudtarget.cpp.

object* hostile_obj = NULL

Definition at line 76 of file hudtarget.cpp.

htarget_list htarget_free_list

Definition at line 98 of file hudtarget.cpp.

Definition at line 97 of file hudtarget.cpp.

color HUD_color_homing_indicator

Definition at line 957 of file hudtarget.cpp.

int HUD_drew_selection_bracket_on_target

Definition at line 3383 of file hudtarget.cpp.

int Hud_target_h

Definition at line 52 of file hudtarget.cpp.

int Hud_target_w

Definition at line 52 of file hudtarget.cpp.

Initial value:
=
{
{ "lead1_fs1", "2_lead1_fs1" },
{ "lead1", "2_lead1" }
}

Definition at line 182 of file hudtarget.cpp.

hud_frames Lead_indicator_gauge

Definition at line 180 of file hudtarget.cpp.

int Lead_indicator_gauge_loaded = 0

Definition at line 181 of file hudtarget.cpp.

Initial value:
=
{
{
{
12.5f,
12.5f
},
{
20.0f,
20.0f
}
},
{
{
8.0f,
8.0f
},
{
13.0f,
13.0f
}
}
}

Definition at line 157 of file hudtarget.cpp.

float Max_front_seperation[GR_NUM_RESOLUTIONS]
Initial value:
= {
10.0f,
16.0f
}

Definition at line 67 of file hudtarget.cpp.

float Max_offscreen_tri_seperation[GR_NUM_RESOLUTIONS]
Initial value:
= {
10.0f,
16.0f
}

Definition at line 63 of file hudtarget.cpp.

float Max_warning_missile_dist

Definition at line 455 of file hudtarget.cpp.

float Min_warning_missile_dist

Definition at line 454 of file hudtarget.cpp.

hud_frames New_weapon

Definition at line 232 of file hudtarget.cpp.

object obj_used_list

Definition at line 53 of file object.cpp.

float Offscreen_tri_base[GR_NUM_RESOLUTIONS]
Initial value:
= {
6.0f,
9.5f
}

Definition at line 55 of file hudtarget.cpp.

float Offscreen_tri_height[GR_NUM_RESOLUTIONS]
Initial value:
= {
7.0f,
11.0f
}

Definition at line 59 of file hudtarget.cpp.

reticle_list Reticle_cur_list

Definition at line 138 of file hudtarget.cpp.

Definition at line 141 of file hudtarget.cpp.

reticle_list Reticle_save_list

Definition at line 139 of file hudtarget.cpp.

int Reticle_save_timestamp

Definition at line 137 of file hudtarget.cpp.

SCP_vector<target_display_info> target_display_list

Definition at line 72 of file hudtarget.cpp.

Definition at line 49 of file hudtarget.cpp.

float Target_triangle_base[GR_NUM_RESOLUTIONS]
Initial value:
= {
6.0f,
9.5f
}

Definition at line 87 of file hudtarget.cpp.

float Target_triangle_height[GR_NUM_RESOLUTIONS]
Initial value:
= {
7.0f,
11.0f
}

Definition at line 91 of file hudtarget.cpp.

int Toggle_text_alpha = 255

Definition at line 226 of file hudtarget.cpp.

shader Training_msg_glass

Definition at line 84 of file hudtarget.cpp.

weapon_flash Weapon_flash_info

Definition at line 437 of file hudtarget.cpp.

Definition at line 390 of file hudtarget.cpp.

int Weapon_gauge_primary_coords[NUM_HUD_SETTINGS][GR_NUM_RESOLUTIONS][3][2]

Definition at line 235 of file hudtarget.cpp.

int Weapon_gauge_secondary_coords[NUM_HUD_SETTINGS][GR_NUM_RESOLUTIONS][5][2]

Definition at line 266 of file hudtarget.cpp.

Definition at line 231 of file hudtarget.cpp.

int Weapon_gauges_loaded = 0

Definition at line 233 of file hudtarget.cpp.

int Weapon_plink_coords[GR_NUM_RESOLUTIONS][2][2]
Initial value:
= {
{
{530, 285},
{530, 295}
},
{
{913, 537},
{913, 547}
}
}

Definition at line 324 of file hudtarget.cpp.

int Weapon_pname_coords[GR_NUM_RESOLUTIONS][2][2]
Initial value:
= {
{
{536, 285},
{536, 295}
},
{
{919, 537},
{919, 547}
}
}

Definition at line 334 of file hudtarget.cpp.

int Weapon_primary_ammo_x[GR_NUM_RESOLUTIONS]
Initial value:
= {
525,
908
}

Definition at line 382 of file hudtarget.cpp.

int Weapon_primary_y[GR_NUM_RESOLUTIONS][2]
Initial value:
= {
{
285,
295
},
{
537,
547
}
}

Definition at line 364 of file hudtarget.cpp.

int Weapon_secondary_ammo_x[GR_NUM_RESOLUTIONS]
Initial value:
= {
525,
908
}

Definition at line 378 of file hudtarget.cpp.

int Weapon_secondary_name_x[GR_NUM_RESOLUTIONS]
Initial value:
= {
536,
919
}

Definition at line 374 of file hudtarget.cpp.

int Weapon_secondary_reload_x[GR_NUM_RESOLUTIONS]
Initial value:
= {
615,
998
}

Definition at line 386 of file hudtarget.cpp.

int Weapon_secondary_y[GR_NUM_RESOLUTIONS][3]
Initial value:
= {
{
309,
318,
327
},
{
561,
570,
579
}
}

Definition at line 352 of file hudtarget.cpp.

int Weapon_slinked_x[GR_NUM_RESOLUTIONS]
Initial value:
= {
525,
908
}

Definition at line 344 of file hudtarget.cpp.

int Weapon_sunlinked_x[GR_NUM_RESOLUTIONS]
Initial value:
= {
530,
913
}

Definition at line 348 of file hudtarget.cpp.

int Weapon_title_coords[NUM_HUD_SETTINGS][GR_NUM_RESOLUTIONS][2]
Initial value:
=
{
{
{
518, 274
},
{
901, 527
}
},
{
{
487, 274
},
{
870, 527
}
}
}

Definition at line 305 of file hudtarget.cpp.