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