Open source remastering of the Freespace 2 engine
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
12 #ifndef _HUDTARGET_H
13 #define _HUDTARGET_H
15 #include "hud/hud.h"
17 class ship;
18 class ship_subsys;
19 class object;
20 struct weapon_info;
22 #define INCREASING 0
23 #define DECREASING 1
24 #define NO_CHANGE 2
26 #define MATCH_SPEED_THRESHOLD 0.1f // minimum speed target must be moving for match speed to apply
27 #define CARGO_RADIUS_DELTA 100 // distance added to radius required for cargo scanning
28 #define CAPITAL_CARGO_RADIUS_DELTA 250 // distance added to radius required for cargo scanning
29 #define CARGO_REVEAL_MIN_DIST 150 // minimum distance for reveal cargo (used if radius+CARGO_RADIUS_DELTA < CARGO_REVEAL_MIN_DIST)
30 #define CAP_CARGO_REVEAL_MIN_DIST 300 // minimum distance for reveal cargo (used if radius+CARGO_RADIUS_DELTA < CARGO_REVEAL_MIN_DIST)
31 #define CARGO_MIN_DOT_TO_REVEAL 0.95 // min dot to proceed to have cargo scanning take place
33 // structure and defines used for hotkey targeting
34 //WMC - bumped from 50 to 150; 10/24/2005
35 #define MAX_HOTKEY_TARGET_ITEMS 150 // maximum number of ships that can be targeted on *all* keys
36 #define SELECTION_SET 0x5000 // variable used for drawing brackets. The bracketing code uses
37  // TEAM_* values. I picked this value to be totally out of that
38  // range. Only used for drawing selection sets
39 #define MESSAGE_SENDER 0x5001 // variable used for drawing brackets around a message sender.
40  // See above comments for SELECTION_SET
42 // defines used to tell how a particular hotkey was added
43 #define HOTKEY_USER_ADDED 1
46 // regular and ballistic weapon gauges
47 #define NUM_HUD_SETTINGS 2
49 typedef struct htarget_list {
50  struct htarget_list *next, *prev; // for linked lists
51  int how_added; // determines how this hotkey was added (mission default or player)
52  object *objp; // the actual object
53 } htarget_list;
55 //for nebula toggle SEXP
58 extern int Toggle_text_alpha;
61 extern int Hud_target_w, Hud_target_h;
65 extern char **Ai_class_names;
66 extern char *Submode_text[];
67 extern char *Strafe_submode_text[];
69 extern void hud_init_targeting_colors();
74 typedef struct esct
75 {
76  int team_mask;
77  int filter;
79  float min_distance;
83  int turret_attacking_target; // check that turret is actually attacking the attacked_objnum
84 } esct;
87 void hud_init_targeting();
88 void hud_target_next(int team_mask = -1);
89 void hud_target_prev(int team_mask = -1);
90 int hud_target_closest(int team_mask = -1, int attacked_objnum = -1, int play_fail_sound = TRUE, int filter = 0, int turret_attacking_target = 0);
94 void hud_show_targeting_gauges(float frametime);
98 void hud_target_missile(object *source_obj, int next_flag);
99 void hud_target_next_list(int hostile=1, int next_flag=1, int team_mask = -1, int attacked_objnum = -1, int play_fail_sound = TRUE, int filter = 0, int turret_attacking_target = 0);
100 int hud_target_closest_repair_ship(int goal_objnum=-1);
104 void hud_target_uninspected_object(int next_flag);
106 void hud_target_live_turret(int next_flag, int auto_advance=0, int turret_attacking_target=0);
110 void hud_target_last_transmit_add(int ship_num);
116 void hud_cease_subsystem_targeting(int print_message=1);
117 void hud_cease_targeting();
119 int subsystem_in_sight(object* objp, ship_subsys* subsys, vec3d *eye, vec3d* subsystem);
120 vec3d* get_subsystem_world_pos(object* parent_obj, ship_subsys* subsys, vec3d* world_pos);
124 void hud_start_flash_weapon(int index);
126 void hud_process_homing_missiles(void);
128 int hud_sensors_ok(ship *sp, int show_msg = 1);
131 int hud_get_best_primary_bank(float *range);
133 int hud_target_invalid_awacs(object *objp);
135 // functions for hotkey selection sets
137 extern void hud_target_hotkey_select( int k );
138 extern void hud_target_hotkey_clear( int k );
140 extern void hud_target_hotkey_add_remove( int k, object *objp, int how_to_add);
141 extern void hud_show_selection_set();
142 extern void hud_show_message_sender();
143 void hud_prune_hotkeys();
146 // Code to draw filled triangles
147 void hud_tri(float x1,float y1,float x2,float y2,float x3,float y3);
148 // Code to draw empty triangles.
149 void hud_tri_empty(float x1,float y1,float x2,float y2,float x3,float y3);
151 float hud_find_target_distance( object *targetee, object *targeter );
153 extern 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);
154 void hud_calculate_lead_pos(vec3d *lead_target_pos, vec3d *target_pos, object *targetp, weapon_info *wip, float dist_to_target, vec3d *rel_pos = NULL);
156 void hud_stuff_ship_name(char *ship_name_text, ship *shipp);
157 void hud_stuff_ship_callsign(char *ship_callsign_text, ship *shipp);
158 void hud_stuff_ship_class(char *ship_class_text, ship *shipp);
160 #define TARGET_DISPLAY_DIST (1<<0)
161 #define TARGET_DISPLAY_DOTS (1<<1)
162 #define TARGET_DISPLAY_LEAD (1<<2)
163 #define TARGET_DISPLAY_SUBSYS (1<<3)
164 #define TARGET_DISPLAY_NAME (1<<4)
165 #define TARGET_DISPLAY_CLASS (1<<5)
167 typedef struct target_display_info {
168  object* objp;
173  int flags;
174  char name[32];
179 void hud_target_add_display_list(object *objp, vertex *target_point, vec3d *target_pos, int correction, color *bracket_clr, char *name, int flags);
183 {
184 protected:
194 public:
196  void initAutoTextOffsets(int x, int y);
197  void initTargetTextOffsets(int x, int y);
198  void initBitmaps(char *fname);
199  void initOnColor(int r, int g, int b, int a);
200  void initOffColor(int r, int g, int b, int a);
201  void render(float frametime);
202  void pageIn();
203 };
206 {
207 protected:
217 public:
219  void initAutoTextOffsets(int x, int y);
220  void initSpeedTextOffsets(int x, int y);
221  void initBitmaps(char *fname);
222  void initOnColor(int r, int g, int b, int a);
223  void initOffColor(int r, int g, int b, int a);
224  void render(float frametime);
225  void pageIn();
226 };
229 {
230 protected:
235 public:
237  void initBitmaps(char *fname);
238  void initCountTextOffsets(int x, int y);
239  void initCountValueOffsets(int x, int y);
240  void render(float frametime);
241  void pageIn();
242 };
245 {
246 protected:
249  int Energy_h;
250 public:
252  void initEnergyHeight(int h);
253  void initBitmaps(char *fname);
254  void render(float frametime);
255  void pageIn();
256 };
259 {
260 protected:
275 public:
277  void initBitmaps(char *fname);
278  void initTextOffsets(int x, int y);
279  void initEnergyHeight(int h);
280  void initAlwaysShowText(bool show_text);
281  void initMoveText(bool move_text);
282  void initShowBallistics(bool show_ballistics);
283  void initAlignments(int text_align, int armed_align);
284  void initArmedOffsets(int x, int y, int h, bool show);
285  void render(float frametime);
286  void pageIn();
287 };
290 {
291 protected:
292  hud_frames primary_top[NUM_HUD_SETTINGS]; // Weapon_gauges[ballistic_hud_index][0]
293  int top_offset_x[NUM_HUD_SETTINGS]; // Weapon_gauge_primary_coords[ballistic_hud_index][gr_screen.res][0]
297  hud_frames primary_middle[NUM_HUD_SETTINGS]; // Weapon_gauges[ballistic_hud_index][1]
300  // for the rest of the gauge
301  int frame_offset_x[NUM_HUD_SETTINGS]; // Weapon_gauge_primary_coords[ballistic_hud_index][gr_screen.res][1][0]
307  int Weapon_plink_offset_x; // Weapon_plink_coords[gr_screen.res][0][0]
308  int Weapon_pname_offset_x; // Weapon_pname_coords[gr_screen.res][0][0]
327 public:
328  HudGaugeWeapons();
329  void initBitmapsPrimaryTop(char *fname, char *fname_ballistic);
330  void initBitmapsPrimaryMiddle(char *fname, char *fname_ballistic);
331  void initBitmapsPrimaryLast(char *fname, char *fname_ballistic);
332  void initBitmapsSecondaryTop(char *fname, char *fname_ballistic);
333  void initBitmapsSecondaryMiddle(char *fname, char *fname_ballistic);
334  void initBitmapsSecondaryBottom(char *fname, char *fname_ballistic);
335  void initTopOffsetX(int x, int x_b);
336  void initHeaderOffsets(int x, int y, int x_b, int y_b);
337  void initFrameOffsetX(int x, int x_b);
338  void initPrimaryWeaponOffsets(int link_x, int name_x, int ammo_x);
339  void initSecondaryWeaponOffsets(int ammo_x, int name_x, int reload_x, int linked_x, int unlinked_x);
340  void initStartNameOffsetsY(int p_y, int s_y);
341  void initPrimaryHeights(int top_h, int text_h);
342  void initSecondaryHeights(int top_h, int text_h);
343  void initLinkIcon();
345  void render(float frametime);
346  void pageIn();
347  void maybeFlashWeapon(int index);
348 };
351 {
352 protected:
368  int _entry_h;
371 public:
373  void initBitmaps(char *fname_first, char *fname_entry, char *fname_last);
374  void initBgFirstOffsetX(int x);
375  void initBgEntryOffsetX(int x);
376  void initBgLastOffsetX(int x);
377  void initBgLastOffsetY(int x);
378  void initBgFirstHeight(int h);
379  void initBgEntryHeight(int h);
380  void initHeaderText(char *text);
381  void initHeaderOffsets(int x, int y);
382  void initEntryStartY(int y);
383  void initEntryHeight(int h);
384  void initLinkIcon();
386  virtual void render(float frametime);
387  void pageIn();
388  void maybeFlashWeapon(int index);
389 };
392 {
393 protected:
397 public:
399  void initPrimaryLinkOffsetX(int x);
400  void initPrimaryNameOffsetX(int x);
401  void initPrimaryAmmoOffsetX(int x);
403  void render(float frametime);
404 };
407 {
408 protected:
414 public:
416  void initSecondaryAmmoOffsetX(int x);
417  void initSecondaryNameOffsetX(int x);
418  void initSecondaryReloadOffsetX(int x);
419  void initSecondaryLinkedOffsetX(int x);
422  void render(float frametime);
423 };
426 {
427  int _size[2];
428  float _line_width;
429  int _view_direction;
431  bool draw_secondary_models;
432  bool draw_primary_models;
433 public:
434  enum {TOP, FRONT};
436  void initSizes(int w, int h);
437  void initLineWidth(float w);
438  void initViewDir(int dir);
439  void initDrawOptions(bool primary_models, bool secondary_models);
442  void render(float frametime);
443 };
446 {
447  hud_frames Warhead;
449  int Warhead_name_offsets[2];
450  int Warhead_count_offsets[2];
451  int Warhead_count_size[2];
453  int Max_symbols;
454  int Text_align;
455  int Max_columns;
456 public:
458  void initBitmap(char *fname);
459  void initNameOffsets(int x, int y);
460  void initCountOffsets(int x, int y);
461  void initCountSizes(int w, int h);
462  void initMaxSymbols(int count);
463  void initMaxColumns(int count);
464  void initTextAlign(int align);
465  void render(float frametime);
466  void pageIn();
467 };
470 {
471 protected:
472  int Radius;
473 public:
475  void initRadius(int length);
476  void render(float frametime);
477  void renderOrientation(object *from_objp, object *to_objp, matrix *from_orientp);
478  void pageIn();
479 };
482 {
483 protected:
484  int Radius;
487 public:
489  HudGaugeReticleTriangle(int _gauge_object, int _gauge_config);
490  void initRadius(int length);
491  void initTriBase(float length);
492  void initTriHeight(float h);
493  virtual void render(float frametime);
494  void renderTriangle(vec3d *hostile_pos, int aspect_flag, int show_interior, int split_tri);
495  void renderTriangleMissileTail(float ang, float xpos, float ypos, float cur_dist, int draw_solid, int draw_inside);
496 };
499 {
500 protected:
501 public:
503  void render(float frametime);
504 };
507 {
508 protected:
509 public:
511  void render(float frametime);
512 };
515 {
516 protected:
517 public:
519  void render(float frametime);
520 };
523 {
524 protected:
529 public:
531  void initMaxTriSeperation(float length);
532  void initMaxFrontSeperation(float length);
533  void initTriBase(float length);
534  void initTriHeight(float length);
535  void render(float frametime);
536  void calculatePosition(vertex* target_point, vec3d *tpos, vec2d *outcoords, int *dir, float *half_triangle_sep);
537  void renderOffscreenIndicator(vec2d *coords, int dir, float distance, float half_triangle_sep, bool draw_solid = true);
538  void pageIn();
539 };
542 {
543 protected:
546 public:
548  void initHalfSize(float w, float h);
549  void initBitmaps(char *fname);
550  void render(float frametime);
551  void renderIndicator(int frame_offset, object *targetp, vec3d *lead_target_pos);
553  void renderLeadQuick(vec3d *target_pos, object *targetp);
554  int pickFrame(float prange, float srange, float dist_to_target);
555  void pageIn();
556 };
559 {
560 protected:
563 public:
565  void initBitmaps(char *fname);
566  void render(float frametime);
567  void renderSight(int indicator_frame, vec3d *target_pos, vec3d *lead_target_pos);
568  void pageIn();
569 };
571 #endif
void hud_show_targeting_gauges(float frametime)
Definition: hudtarget.cpp:3478
void initPrimaryNameOffsetX(int x)
Definition: hudtarget.cpp:6846
void initMaxTriSeperation(float length)
Definition: hudtarget.cpp:6231
void initSecondaryHeights(int top_h, int text_h)
Definition: hudtarget.cpp:5834
int check_all_turrets
Definition: hudtarget.h:82
int Auto_text_offsets[2]
Definition: hudtarget.h:187
void initCountTextOffsets(int x, int y)
Definition: hudtarget.cpp:5358
void initBgFirstOffsetX(int x)
Definition: hudtarget.cpp:6744
int Weapon_sunlinked_offset_x
Definition: hudtarget.h:315
void hud_tri_empty(float x1, float y1, float x2, float y2, float x3, float y3)
Definition: hudtarget.cpp:2886
hud_frames _background_last
Definition: hudtarget.h:355
hud_frames Lead_sight
Definition: hudtarget.h:561
GLfloat GLfloat GLfloat GLfloat h
Definition: Glext.h:7280
void initAlwaysShowText(bool show_text)
Definition: hudtarget.cpp:5501
int team_mask
Definition: hudtarget.h:76
void initBitmaps(char *fname)
Definition: hudtarget.cpp:4142
void hud_target_last_transmit()
Definition: hudtarget.cpp:5127
void hud_init_targeting()
Definition: hudtarget.cpp:1038
void hud_target_targets_target()
Definition: hudtarget.cpp:2388
hud_frames Energy_bar
Definition: hudtarget.h:261
hud_frames Energy_bar
Definition: hudtarget.h:247
void initOnColor(int r, int g, int b, int a)
Definition: hudtarget.cpp:4794
int subsystem_in_sight(object *objp, ship_subsys *subsys, vec3d *eye, vec3d *subsystem)
object * objp
Definition: hudtarget.h:52
void initPrimaryWeaponOffsets(int link_x, int name_x, int ammo_x)
Definition: hudtarget.cpp:5806
GLuint index
Definition: Glext.h:5608
void hud_tri(float x1, float y1, float x2, float y2, float x3, float y3)
Definition: hudtarget.cpp:2803
void render(float frametime)
Definition: hudtarget.cpp:5975
void initPrimaryAmmoOffsetX(int x)
Definition: hudtarget.cpp:6851
void hud_show_selection_set()
Definition: hudtarget.cpp:3387
int hud_communications_state(ship *sp)
Definition: hudtarget.cpp:4607
void initStartNameOffsetsY(int p_y, int s_y)
Definition: hudtarget.cpp:5822
struct esct esct
An abbreviation for "Evaluate Ship as Closest Target", defines a data structure used to hold the requ...
void hud_target_hotkey_select(int k)
Definition: hudtarget.cpp:855
void initSecondaryWeaponOffsets(int ammo_x, int name_x, int reload_x, int linked_x, int unlinked_x)
Definition: hudtarget.cpp:5813
void initRadius(int length)
Definition: hudtarget.cpp:2905
int check_nearest_turret
Definition: hudtarget.h:80
void hud_target_closest_locked_missile(object *A)
Definition: hudtarget.cpp:1908
void hud_init_targeting_colors()
Definition: hudtarget.cpp:973
void render(float frametime)
Definition: hudtarget.cpp:5529
void hud_target_clear_display_list()
Definition: hudtarget.cpp:6221
int hud_get_best_primary_bank(float *range)
Definition: hudtarget.cpp:3719
int Speed_text_offsets[2]
Definition: hudtarget.h:211
void hud_target_in_reticle_new()
Definition: hudtarget.cpp:2483
Definition: pstypes.h:88
void initEntryStartY(int y)
Definition: hudtarget.cpp:6785
void initBitmap(char *fname)
Definition: hudtarget.cpp:6580
void initSecondaryAmmoOffsetX(int x)
Definition: hudtarget.cpp:6948
void maybeFlashWeapon(int index)
Definition: hudtarget.cpp:6175
Definition: 2d.h:95
void initSecondaryReloadOffsetX(int x)
Definition: hudtarget.cpp:6958
int Cm_text_offsets[2]
Definition: hudtarget.h:233
void hud_target_newest_ship()
Definition: hudtarget.cpp:1619
int hud_target_closest_repair_ship(int goal_objnum=-1)
Definition: hudtarget.cpp:4858
void hud_target_prev(int team_mask=-1)
Definition: hudtarget.cpp:1252
#define TRUE
Definition: pstypes.h:399
void calculatePosition(vertex *target_point, vec3d *tpos, vec2d *outcoords, int *dir, float *half_triangle_sep)
Definition: hudtarget.cpp:6295
int Weapon_header_offsets[NUM_HUD_SETTINGS][2]
Definition: hudtarget.h:295
int Weapon_sreload_offset_x
Definition: hudtarget.h:313
Definition: 2d.h:82
void hud_calculate_lead_pos(vec3d *lead_target_pos, vec3d *target_pos, object *targetp, weapon_info *wip, float dist_to_target, vec3d *rel_pos=NULL)
Definition: hudtarget.cpp:3682
void hud_target_auto_target_next()
Definition: hudtarget.cpp:1971
hud_frames secondary_top[NUM_HUD_SETTINGS]
Definition: hudtarget.h:303
float min_distance
Definition: hudtarget.h:79
void initCountSizes(int w, int h)
Definition: hudtarget.cpp:6601
int sname_start_offset_y
Definition: hudtarget.h:322
void initOffColor(int r, int g, int b, int a)
Definition: hudtarget.cpp:4720
void initTextOffsets(int x, int y)
Definition: hudtarget.cpp:5476
object * objp
Definition: lua.cpp:3105
void hud_process_remote_detonate_missile()
Definition: hudtarget.cpp:3224
void initTriBase(float length)
Definition: hudtarget.cpp:6241
void initDrawOptions(bool primary_models, bool secondary_models)
Definition: hudtarget.cpp:7085
int Hud_target_h
Definition: hudtarget.cpp:52
Definition: model.h:594
ship * shipp
Definition: lua.cpp:9162
hud_frames secondary_middle[NUM_HUD_SETTINGS]
Definition: hudtarget.h:304
float Offscreen_tri_height
Definition: hudtarget.h:528
void initAutoTextOffsets(int x, int y)
Definition: hudtarget.cpp:4774
void render(float frametime)
Definition: hudtarget.cpp:5430
void initBitmapsPrimaryTop(char *fname, char *fname_ballistic)
Definition: hudtarget.cpp:5840
float hud_find_target_distance(object *targetee, object *targeter)
Definition: hudtarget.cpp:2009
int Wenergy_text_offsets[2]
Definition: hudtarget.h:263
void initTriHeight(float length)
Definition: hudtarget.cpp:6246
char ** Ai_class_names
Definition: aicode.cpp:268
Definition: hud.h:201
int Weapon_pammo_offset_x
Definition: hudtarget.h:309
void hud_show_hostile_triangle()
Definition: hudtarget.cpp:3556
hud_frames primary_middle[NUM_HUD_SETTINGS]
Definition: hudtarget.h:297
void initEnergyHeight(int h)
Definition: hudtarget.cpp:5415
void initBgLastOffsetX(int x)
Definition: hudtarget.cpp:6754
void render(float frametime)
Definition: hudtarget.cpp:4818
void initEnergyHeight(int h)
Definition: hudtarget.cpp:5482
GLenum GLint * range
Definition: Glext.h:7096
ship * shipp
Definition: hudtarget.h:78
void hud_prune_hotkeys()
Definition: hudtarget.cpp:3330
GLdouble GLdouble GLdouble r
Definition: Glext.h:5337
htarget_list htarget_free_list
Definition: hudtarget.cpp:98
void hud_target_last_transmit_level_init()
Definition: hudtarget.cpp:5099
An abbreviation for "Evaluate Ship as Closest Target", defines a data structure used to hold the requ...
Definition: hudtarget.h:74
void initOnColor(int r, int g, int b, int a)
Definition: hudtarget.cpp:4708
void initBitmaps(char *fname)
Definition: hudtarget.cpp:5420
GLboolean GLboolean g
Definition: Glext.h:5781
GLuint coords
Definition: Glext.h:6925
int hud_target_closest(int team_mask=-1, int attacked_objnum=-1, int play_fail_sound=TRUE, int filter=0, int turret_attacking_target=0)
Sets the Players[Player_num].current_target to the closest ship to the player that matches the team p...
Definition: hudtarget.cpp:2212
shader Training_msg_glass
Definition: hudtarget.cpp:84
GLboolean GLboolean GLboolean GLboolean a
Definition: Glext.h:5781
void render(float frametime)
Definition: hudtarget.cpp:4511
int Weapon_slinked_offset_x
Definition: hudtarget.h:314
int Weapon_plink_offset_x
Definition: hudtarget.h:307
int Target_text_offsets[2]
Definition: hudtarget.h:188
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: hudtarget.cpp:3777
void initBitmapsPrimaryLast(char *fname, char *fname_ballistic)
Definition: hudtarget.cpp:5870
void initBitmaps(char *fname)
Definition: hudtarget.cpp:4786
int hud_target_invalid_awacs(object *objp)
Definition: hudtarget.cpp:460
void initAutoTextOffsets(int x, int y)
Definition: hudtarget.cpp:4688
void hud_target_subsystem_in_reticle()
Definition: hudtarget.cpp:2673
void hud_target_hotkey_clear(int k)
Definition: hudtarget.cpp:835
void hud_target_last_transmit_add(int ship_num)
Definition: hudtarget.cpp:5197
int pname_start_offset_y
Definition: hudtarget.h:319
void initHalfSize(float w, float h)
Definition: hudtarget.cpp:3810
void initBitmaps(char *fname)
Definition: hudtarget.cpp:5516
void initMoveText(bool move_text)
Definition: hudtarget.cpp:5506
int secondary_text_h
Definition: hudtarget.h:326
Definition: hud.h:32
void initBitmaps(char *fname)
Definition: hudtarget.cpp:5370
void initTopOffsetX(int x, int x_b)
Definition: hudtarget.cpp:5786
void initSecondaryNameOffsetX(int x)
Definition: hudtarget.cpp:6953
virtual void render(float frametime)
Definition: hudtarget.cpp:6830
void maybeFlashWeapon(int index)
Definition: hudtarget.cpp:6810
void hud_check_reticle_list()
Definition: hudtarget.cpp:539
Definition: ship.h:534
void initPrimaryLinkOffsetX(int x)
Definition: hudtarget.cpp:6841
void render(float frametime)
Definition: hudtarget.cpp:6627
void hud_target_next_list(int hostile=1, int next_flag=1, int team_mask=-1, int attacked_objnum=-1, int play_fail_sound=TRUE, int filter=0, int turret_attacking_target=0)
Definition: hudtarget.cpp:4637
void hud_start_flash_weapon(int index)
Definition: hudtarget.cpp:4534
void hud_stuff_ship_name(char *ship_name_text, ship *shipp)
Definition: hudtarget.cpp:5269
void initBgEntryOffsetX(int x)
Definition: hudtarget.cpp:6749
int how_added
Definition: hudtarget.h:51
void render(float frametime)
Definition: hudtarget.cpp:7091
void renderLeadQuick(vec3d *target_pos, object *targetp)
Definition: hudtarget.cpp:4062
void initMaxSymbols(int count)
Definition: hudtarget.cpp:6607
int Cm_text_val_offsets[2]
Definition: hudtarget.h:234
int filter
Definition: hudtarget.h:77
GLint GLint GLint GLint GLint x
Definition: Glext.h:5182
int top_offset_x[NUM_HUD_SETTINGS]
Definition: hudtarget.h:293
unsigned char ubyte
Definition: pstypes.h:62
Definition: object.h:141
void initPrimaryHeights(int top_h, int text_h)
Definition: hudtarget.cpp:5828
int Lead_sight_half[2]
Definition: hudtarget.h:562
void initHeaderText(char *text)
Definition: hudtarget.cpp:6774
HudGaugeWeaponList(int gauge_object)
Definition: hudtarget.cpp:6709
hud_frames primary_top[NUM_HUD_SETTINGS]
Definition: hudtarget.h:292
void renderTriangle(vec3d *hostile_pos, int aspect_flag, int show_interior, int split_tri)
Definition: hudtarget.cpp:2996
void render(float frametime)
Definition: hudtarget.cpp:4732
hud_frames Lead_indicator_gauge
Definition: hudtarget.h:544
void renderTriangleMissileTail(float ang, float xpos, float ypos, float cur_dist, int draw_solid, int draw_inside)
Definition: hudtarget.cpp:2925
void initBitmapsSecondaryBottom(char *fname, char *fname_ballistic)
Definition: hudtarget.cpp:5913
float Offscreen_tri_base
Definition: hudtarget.h:527
void initShowBallistics(bool show_ballistics)
Definition: hudtarget.cpp:5511
GLbitfield flags
Definition: Glext.h:6722
GLuint const GLchar * name
Definition: Glext.h:5608
void renderSight(int indicator_frame, vec3d *target_pos, vec3d *lead_target_pos)
Definition: hudtarget.cpp:4157
int Weapon_pname_offset_x
Definition: hudtarget.h:308
int _header_offsets[2]
Definition: hudtarget.h:366
int Toggle_text_alpha
Definition: hudtarget.cpp:226
GLboolean GLboolean GLboolean b
Definition: Glext.h:5781
void initRadius(int length)
Definition: hudtarget.cpp:3193
struct target_display_info target_display_info
void initSpeedTextOffsets(int x, int y)
Definition: hudtarget.cpp:4780
hud_frames secondary_bottom[NUM_HUD_SETTINGS]
Definition: hudtarget.h:305
void initBgFirstHeight(int h)
Definition: hudtarget.cpp:6764
void hud_stuff_ship_callsign(char *ship_callsign_text, ship *shipp)
Definition: hudtarget.cpp:5290
Definition: globals.h:15
hud_frames _background_entry
Definition: hudtarget.h:354
GLubyte GLubyte GLubyte GLubyte w
Definition: Glext.h:5679
void initTextAlign(int align)
Definition: hudtarget.cpp:6617
struct htarget_list * next
Definition: hudtarget.h:50
struct htarget_list * prev
Definition: hudtarget.h:50
char header_text[NAME_LENGTH]
Definition: hudtarget.h:370
Definition: pstypes.h:106
void renderOrientation(object *from_objp, object *to_objp, matrix *from_orientp)
Definition: hudtarget.cpp:2748
void initBitmapsSecondaryMiddle(char *fname, char *fname_ballistic)
Definition: hudtarget.cpp:5898
hud_frames Toggle_frame
Definition: hudtarget.h:185
void initAlignments(int text_align, int armed_align)
Definition: hudtarget.cpp:5487
void initBitmaps(char *fname)
Definition: hudtarget.cpp:4700
hud_frames Toggle_frame
Definition: hudtarget.h:208
void initCountValueOffsets(int x, int y)
Definition: hudtarget.cpp:5364
void hud_target_in_reticle_old()
Definition: hudtarget.cpp:2602
void initArmedOffsets(int x, int y, int h, bool show)
Definition: hudtarget.cpp:5493
int Hud_target_w
Definition: hudtarget.cpp:52
void hud_show_message_sender()
Definition: hudtarget.cpp:3265
ubyte Weapon_link_icon
Definition: hudtarget.h:316
void initBgEntryHeight(int h)
Definition: hudtarget.cpp:6769
void initSizes(int w, int h)
Definition: hudtarget.cpp:7069
void initSecondaryLinkedOffsetX(int x)
Definition: hudtarget.cpp:6963
void initFrameOffsetX(int x, int x_b)
Definition: hudtarget.cpp:5800
void render(float frametime)
Definition: hudtarget.cpp:6255
void hud_target_prev_subobject()
Definition: hudtarget.cpp:1142
void initBgLastOffsetY(int x)
Definition: hudtarget.cpp:6759
Definition: hudtarget.h:47
void hud_target_uninspected_object(int next_flag)
Definition: hudtarget.cpp:4977
void initViewDir(int dir)
Definition: hudtarget.cpp:7080
void initBitmapsSecondaryTop(char *fname, char *fname_ballistic)
Definition: hudtarget.cpp:5883
void render(float frametime)
Definition: hudtarget.cpp:4217
void initTriBase(float length)
Definition: hudtarget.cpp:2910
void renderIndicator(int frame_offset, object *targetp, vec3d *lead_target_pos)
Definition: hudtarget.cpp:3900
virtual void render(float frametime)
Definition: hudtarget.cpp:2920
void initTargetTextOffsets(int x, int y)
Definition: hudtarget.cpp:4694
int Auto_text_offsets[2]
Definition: hudtarget.h:210
void render(float frametime)
Definition: hudtarget.cpp:5383
void render(float frametime)
Definition: hudtarget.cpp:3866
void hud_update_weapon_flash()
Definition: hudtarget.cpp:6152
hud_frames Cmeasure_gauge
Definition: hudtarget.h:231
void initEntryHeight(int h)
Definition: hudtarget.cpp:6790
GLenum GLuint GLenum GLsizei length
Definition: Glext.h:5156
void render(float frametime)
Definition: hudtarget.cpp:6973
int turret_attacking_target
Definition: hudtarget.h:83
GLint GLsizei count
Definition: Gl.h:1491
void hud_stuff_ship_class(char *ship_class_text, ship *shipp)
Definition: hudtarget.cpp:5325
void hud_target_missile(object *source_obj, int next_flag)
Definition: hudtarget.cpp:1425
int attacked_objnum
Definition: hudtarget.h:81
SCP_vector< target_display_info > target_display_list
Definition: hudtarget.cpp:72
matrix * A
Definition: lua.cpp:444
bool evaluate_ship_as_closest_target(esct *esct)
evaluate a ship (and maybe turrets) as a potential target
Definition: hudtarget.cpp:2069
char * Submode_text[]
Definition: aicode.cpp:133
int frame_offset_x[NUM_HUD_SETTINGS]
Definition: hudtarget.h:301
void hud_target_next(int team_mask=-1)
Definition: hudtarget.cpp:1247
char * Strafe_submode_text[]
Definition: aicode.cpp:154
void hud_target_hotkey_add_remove(int k, object *objp, int how_to_add)
Definition: hudtarget.cpp:771
void initBitmapsPrimaryMiddle(char *fname, char *fname_ballistic)
Definition: hudtarget.cpp:5855
int Weapon_sammo_offset_x
Definition: hudtarget.h:311
void hud_process_homing_missiles(void)
Definition: hudtarget.cpp:3098
int gauge_object
Definition: hud.h:208
void hud_target_toggle_hidden_from_sensors()
Definition: hudtarget.cpp:4920
ubyte Weapon_link_icon
Definition: hudtarget.h:356
void initBitmaps(char *fname_first, char *fname_entry, char *fname_last)
Definition: hudtarget.cpp:6726
void hud_target_change_check()
Definition: hudtarget.cpp:4407
void render(float frametime)
Definition: hudtarget.cpp:3159
int Weapon_sname_offset_x
Definition: hudtarget.h:312
void hud_target_live_turret(int next_flag, int auto_advance=0, int turret_attacking_target=0)
Definition: hudtarget.cpp:1724
void initMaxFrontSeperation(float length)
Definition: hudtarget.cpp:6236
void initBitmaps(char *fname)
Definition: hudtarget.cpp:3816
void initCountOffsets(int x, int y)
Definition: hudtarget.cpp:6595
float Max_front_seperation
Definition: hudtarget.h:526
void hud_restore_subsystem_target(ship *shipp)
Definition: hudtarget.cpp:4379
void initTriHeight(float h)
Definition: hudtarget.cpp:2915
void hud_target_random_ship()
Definition: hudtarget.cpp:5221
void initHeaderOffsets(int x, int y, int x_b, int y_b)
Definition: hudtarget.cpp:5792
int pickFrame(float prange, float srange, float dist_to_target)
Definition: hudtarget.cpp:3840
void renderOffscreenIndicator(vec2d *coords, int dir, float distance, float half_triangle_sep, bool draw_solid=true)
Definition: hudtarget.cpp:6458
struct htarget_list htarget_list
void render(float frametime)
Definition: hudtarget.cpp:3206
void hud_cease_targeting()
Definition: hudtarget.cpp:4367
void hud_target_add_display_list(object *objp, vertex *target_point, vec3d *target_pos, int correction, color *bracket_clr, char *name, int flags)
Definition: hudtarget.cpp:6195
void hud_target_next_subobject()
Definition: hudtarget.cpp:1147
void hud_keyed_targets_clear()
Definition: hudtarget.cpp:982
hud_frames primary_last[NUM_HUD_SETTINGS]
Definition: hudtarget.h:298
int hud_sensors_ok(ship *sp, int show_msg=1)
Check if targeting is possible based on sensors strength.
Definition: hudtarget.cpp:4578
void render(float frametime)
Definition: hudtarget.cpp:3666
void initSecondaryUnlinkedOffsetX(int x)
Definition: hudtarget.cpp:6968
void initLineWidth(float w)
Definition: hudtarget.cpp:7075
void render(float frametime)
Definition: hudtarget.cpp:6856
void hud_cease_subsystem_targeting(int print_message=1)
Definition: hudtarget.cpp:4346
void initNameOffsets(int x, int y)
Definition: hudtarget.cpp:6589
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: Glext.h:6566
vec3d * get_subsystem_world_pos(object *parent_obj, ship_subsys *subsys, vec3d *world_pos)
Definition: hudtarget.cpp:4395
hud_frames _background_first
Definition: hudtarget.h:353
GLint y
Definition: Gl.h:1505
void initMaxColumns(int count)
Definition: hudtarget.cpp:6612
void initHeaderOffsets(int x, int y)
Definition: hudtarget.cpp:6779
int Armed_name_offsets[2]
Definition: hudtarget.h:267
float Lead_indicator_half[2]
Definition: hudtarget.h:545
float Max_offscreen_tri_seperation
Definition: hudtarget.h:525
void initOffColor(int r, int g, int b, int a)
Definition: hudtarget.cpp:4806