]> icculus.org git repositories - taylor/freespace2.git/blob - include/hudtargetbox.h
The Great Newline Fix
[taylor/freespace2.git] / include / hudtargetbox.h
1 /*
2  * $Logfile: /Freespace2/code/Hud/HUDtargetbox.h $
3  * $Revision$
4  * $Date$
5  * $Author$
6  *
7  * Header file for drawing the target monitor box on the HUD
8  *
9  * $Log$
10  * Revision 1.2  2002/05/07 03:16:43  theoddone33
11  * The Great Newline Fix
12  *
13  * Revision 1.1.1.1  2002/05/03 03:28:12  root
14  * Initial import.
15  *
16  * 
17  * 4     5/21/99 1:44p Andsager
18  * Add engine wash gauge
19  * 
20  * 3     12/21/98 5:03p Dave
21  * Modified all hud elements to be multi-resolution friendly.
22  * 
23  * 2     10/07/98 10:53a Dave
24  * Initial checkin.
25  * 
26  * 1     10/07/98 10:49a Dave
27  * 
28  * 26    8/28/98 3:28p Dave
29  * EMP effect done. AI effects may need some tweaking as required.
30  * 
31  * 25    5/08/98 5:32p Lawrance
32  * Allow cargo scanning even if target gauge is disabled
33  * 
34  * 24    3/30/98 1:08a Lawrance
35  * Implement "blast" icon.  Blink HUD icon when player ship is hit by a
36  * blast.
37  * 
38  * 23    2/16/98 8:47p Lawrance
39  * Allow flashing to occur at twice normal rate
40  * 
41  * 22    2/12/98 11:54p Lawrance
42  * abbreviate communication to comm
43  * 
44  * 21    2/12/98 4:58p Lawrance
45  * Add support for 'All Clear' radio message
46  * 
47  * 20    2/09/98 8:05p Lawrance
48  * Add new gauges: cmeasure success, warp-out, and missiontime
49  * 
50  * 19    1/15/98 5:23p Lawrance
51  * Add HUD gauge to indicate completed objectives.
52  * 
53  * 18    1/12/98 10:57p Allender
54  * minor changes to the message box.  made some indicators flash to bring
55  * attention to them.
56  * 
57  * 17    1/12/98 9:44p Lawrance
58  * ug, fix return type error
59  * 
60  * 16    1/12/98 9:40p Lawrance
61  * extern hud_targetbox_maybe_flash()
62  * 
63  * 15    1/12/98 9:39p Lawrance
64  * flash DOCKED_WITH text
65  * 
66  * 14    1/10/98 12:42a Lawrance
67  * make cargo inspection more realistic
68  * 
69  * 13    12/16/97 9:13p Lawrance
70  * Integrate new gauges into HUD config.
71  * 
72  * 12    12/09/97 6:15p Lawrance
73  * add flashing of destroyed subsystems on target box
74  * 
75  * 11    12/01/97 12:27a Lawrance
76  * redo default alpha color for HUD, make it easy to modify in the future
77  * 
78  * 10    11/19/97 10:19p Lawrance
79  * add target status to targetbox
80  * 
81  * 9     11/17/97 6:37p Lawrance
82  * new gauges: extended target view, new lock triangles, support ship view
83  * 
84  * 8     11/11/97 10:27p Lawrance
85  * show docking information on the target monitor
86  * 
87  * 7     11/11/97 5:06p Lawrance
88  * flash different areas of the target box
89  * 
90  * 6     11/11/97 12:58a Lawrance
91  * implement new target monitor view
92  * 
93  * 5     11/06/97 5:01p Dave
94  * Finished reworking standalone multiplayer sequencing. Put in
95  * configurable observer-mode HUD.
96  * 
97  * 4     10/11/97 6:38p Lawrance
98  * having damage affect targeting
99  * 
100  * 3     8/19/97 11:46p Lawrance
101  * adding new hud gauges for shileds, escort view, and weapons
102  * 
103  * 2     8/15/97 9:26a Lawrance
104  * split off target box code into HUDtargetbox.cpp
105  * 
106  * 1     8/15/97 8:54a Lawrance
107  *
108  * $NoKeywords: $
109  */
110
111 #ifndef __FREESPACE_HUDTARGETBOX_H__
112 #define __FREESPACE_HUDTARGETBOX_H__
113
114 #define TBOX_FLASH_DURATION     1400
115 #define TBOX_FLASH_INTERVAL     200
116
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
132
133 extern int Target_static_looping;
134
135 extern int Target_window_coords[GR_NUM_RESOLUTIONS][4];
136
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
139 // during the game.
140 extern int Targetbox_show_extra_info;
141
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);
147
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);
154
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);
158
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);
162
163 void hud_update_cargo_scan_sound();
164 void hud_cargo_scan_update(object *targetp, float frametime);
165
166 char *hud_targetbox_truncate_subsys_name(char *outstr);
167
168 #endif /* __FREESPACE_HUDTARGETBOX_H__ */
169