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