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