2 * $Logfile: /Freespace2/code/Hud/HUDtargetbox.h $
7 * Header file for drawing the target monitor box on the HUD
10 * Revision 1.1 2002/05/03 03:28:12 root
14 * 4 5/21/99 1:44p Andsager
15 * Add engine wash gauge
17 * 3 12/21/98 5:03p Dave
18 * Modified all hud elements to be multi-resolution friendly.
20 * 2 10/07/98 10:53a Dave
23 * 1 10/07/98 10:49a Dave
25 * 26 8/28/98 3:28p Dave
26 * EMP effect done. AI effects may need some tweaking as required.
28 * 25 5/08/98 5:32p Lawrance
29 * Allow cargo scanning even if target gauge is disabled
31 * 24 3/30/98 1:08a Lawrance
32 * Implement "blast" icon. Blink HUD icon when player ship is hit by a
35 * 23 2/16/98 8:47p Lawrance
36 * Allow flashing to occur at twice normal rate
38 * 22 2/12/98 11:54p Lawrance
39 * abbreviate communication to comm
41 * 21 2/12/98 4:58p Lawrance
42 * Add support for 'All Clear' radio message
44 * 20 2/09/98 8:05p Lawrance
45 * Add new gauges: cmeasure success, warp-out, and missiontime
47 * 19 1/15/98 5:23p Lawrance
48 * Add HUD gauge to indicate completed objectives.
50 * 18 1/12/98 10:57p Allender
51 * minor changes to the message box. made some indicators flash to bring
54 * 17 1/12/98 9:44p Lawrance
55 * ug, fix return type error
57 * 16 1/12/98 9:40p Lawrance
58 * extern hud_targetbox_maybe_flash()
60 * 15 1/12/98 9:39p Lawrance
61 * flash DOCKED_WITH text
63 * 14 1/10/98 12:42a Lawrance
64 * make cargo inspection more realistic
66 * 13 12/16/97 9:13p Lawrance
67 * Integrate new gauges into HUD config.
69 * 12 12/09/97 6:15p Lawrance
70 * add flashing of destroyed subsystems on target box
72 * 11 12/01/97 12:27a Lawrance
73 * redo default alpha color for HUD, make it easy to modify in the future
75 * 10 11/19/97 10:19p Lawrance
76 * add target status to targetbox
78 * 9 11/17/97 6:37p Lawrance
79 * new gauges: extended target view, new lock triangles, support ship view
81 * 8 11/11/97 10:27p Lawrance
82 * show docking information on the target monitor
84 * 7 11/11/97 5:06p Lawrance
85 * flash different areas of the target box
87 * 6 11/11/97 12:58a Lawrance
88 * implement new target monitor view
90 * 5 11/06/97 5:01p Dave
91 * Finished reworking standalone multiplayer sequencing. Put in
92 * configurable observer-mode HUD.
94 * 4 10/11/97 6:38p Lawrance
95 * having damage affect targeting
97 * 3 8/19/97 11:46p Lawrance
98 * adding new hud gauges for shileds, escort view, and weapons
100 * 2 8/15/97 9:26a Lawrance
101 * split off target box code into HUDtargetbox.cpp
103 * 1 8/15/97 8:54a Lawrance
108 #ifndef __FREESPACE_HUDTARGETBOX_H__
109 #define __FREESPACE_HUDTARGETBOX_H__
111 #define TBOX_FLASH_DURATION 1400
112 #define TBOX_FLASH_INTERVAL 200
114 #define NUM_TBOX_FLASH_TIMERS 14
115 #define TBOX_FLASH_NAME 0
116 #define TBOX_FLASH_CARGO 1
117 #define TBOX_FLASH_HULL 2
118 #define TBOX_FLASH_STATUS 3
119 #define TBOX_FLASH_SUBSYS 4
120 #define TBOX_FLASH_DOCKED 5
121 #define TBOX_FLASH_SQUADMSG 6
122 #define TBOX_FLASH_OBJECTIVE 7
123 #define TBOX_FLASH_COLLISION 8
124 #define TBOX_FLASH_CMEASURE 9
125 #define TBOX_FLASH_NETLAG 10
126 #define TBOX_FLASH_BLAST 11
127 #define TBOX_FLASH_EMP 12
128 #define TBOX_FLASH_ENGINE_WASH 13
130 extern int Target_static_looping;
132 extern int Target_window_coords[GR_NUM_RESOLUTIONS][4];
134 // flag to indicate whether to show the extra information about a target
135 // The HUD_config controls whether this can be shown... but the player can still toggle it on/off
137 extern int Targetbox_show_extra_info;
139 void hud_targetbox_init();
140 void hud_targetbox_init_flash();
141 void hud_render_target_model();
142 void hud_show_target_data(float frametime);
143 void hud_get_target_strength(object *objp, float *shields, float *integrity);
145 // used to flash text, uses the TBOX_FLASH_ #defines above
146 void hud_targetbox_start_flash(int index, int duration=TBOX_FLASH_DURATION);
147 int hud_targetbox_maybe_flash(int index, int flash_fast=0);
148 void hud_targetbox_end_flash(int index);
149 int hud_targetbox_is_bright(int index);
150 int hud_targetbox_flash_expired(int index);
152 // functions to manage the targetbox static that appears when sensors are severely damaged
153 void hud_targetbox_static_init();
154 int hud_targetbox_static_maybe_blit(float frametime);
156 void hud_render_target_ship(object *target_objp);
157 void hud_render_target_debris(object *target_objp);
158 void hud_render_target_weapon(object *target_objp);
160 void hud_update_cargo_scan_sound();
161 void hud_cargo_scan_update(object *targetp, float frametime);
163 char *hud_targetbox_truncate_subsys_name(char *outstr);
165 #endif /* __FREESPACE_HUDTARGETBOX_H__ */