]> icculus.org git repositories - btb/d2x.git/blob - main/gauges.h
fixes for linux-native joystick
[btb/d2x.git] / main / gauges.h
1 /* $Id: gauges.h,v 1.2 2003-10-10 09:36:35 btb Exp $ */
2 /*
3 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
4 SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
5 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
6 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
7 IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
8 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
9 FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
10 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
11 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
12 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
13 */
14
15 /*
16  *
17  * Prototypes and defines for gauges
18  *
19  * Old Log:
20  * Revision 1.3  1995/08/23  21:37:13  allender
21  * fix mcc compiler warmings
22  *
23  * Revision 1.2  1995/08/18  15:45:24  allender
24  * upped max gauges
25  *
26  * Revision 1.1  1995/05/16  15:57:34  allender
27  * Initial revision
28  *
29  * Revision 2.0  1995/02/27  11:28:45  john
30  * New version 2.0, which has no anonymous unions, builds with
31  * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
32  *
33  * Revision 1.27  1994/12/14  18:06:39  matt
34  * Added prototype
35  *
36  * Revision 1.26  1994/12/09  16:19:52  yuan
37  * kill matrix stuff.
38  *
39  * Revision 1.25  1994/10/25  11:07:34  mike
40  * Prototype play_homing_warning.
41  *
42  * Revision 1.24  1994/10/24  16:34:39  mike
43  * Increase MAX_GAUGE_BMS from 56 to 80...
44  *
45  * Revision 1.23  1994/10/21  20:43:47  mike
46  * Prototype add_bonus_points_to_score.
47  *
48  * Revision 1.22  1994/10/14  15:56:33  mike
49  * Prototype update_laser_weapon_info.
50  *
51  * Revision 1.21  1994/10/13  15:17:26  mike
52  * Remove afterburner references.
53  *
54  * Revision 1.20  1994/10/05  17:09:46  matt
55  * Added functional reticle
56  *
57  * Revision 1.19  1994/10/04  21:41:29  matt
58  * Added cloaked player gauge effect, and different ship bitmap for each player
59  *
60  * Revision 1.18  1994/09/26  13:29:40  matt
61  * Added extra life each 100,000 points, and show icons on HUD for num lives
62  *
63  * Revision 1.17  1994/09/20  11:56:08  matt
64  * Added prototype
65  *
66  * Revision 1.16  1994/09/20  00:11:03  matt
67  * Finished gauges for Status Bar, including hostage video display.
68  *
69  * Revision 1.15  1994/09/17  23:57:18  matt
70  * Got some, but not all, off the status bar gauges working
71  *
72  * Revision 1.14  1994/09/16  13:08:46  mike
73  * Prototype say_afterburner_status.
74  *
75  * Revision 1.13  1994/09/14  16:27:03  mike
76  * Prototype player_dead_message();
77  *
78  *
79  * Revision 1.12  1994/07/20  17:34:43  yuan
80  * Some minor bug fixes and new key gauges...
81  *
82  * Revision 1.11  1994/07/14  14:46:02  yuan
83  * Added score effect.
84  *
85  * Revision 1.10  1994/07/12  16:22:00  yuan
86  * Increased number of maximum gauges.
87  *
88  * Revision 1.9  1994/07/11  20:10:36  yuan
89  * Numerical gauges.
90  *
91  * Revision 1.8  1994/07/10  18:01:28  yuan
92  * Added new gauges.
93  *
94  * Revision 1.7  1994/06/21  15:08:22  john
95  * Made demo record HUD message and cleaned up the HUD code.
96  *
97  * Revision 1.6  1994/06/21  12:40:46  yuan
98  * Fixing HUD message.
99  *
100  * Revision 1.5  1994/06/21  12:11:56  yuan
101  * Fixed up menus and added HUDisplay messages.
102  *
103  * Revision 1.4  1994/04/28  21:34:24  mike
104  * prototype check_erase_gauge
105  *
106  * Revision 1.3  1994/04/06  14:42:46  yuan
107  * Adding new powerups.
108  *
109  * Revision 1.2  1993/12/05  22:48:58  matt
110  * Reworked include files in an attempt to cut down on build times
111  *
112  * Revision 1.1  1993/12/05  21:07:55  matt
113  * Initial revision
114  *
115  *
116  */
117
118
119 #ifndef _GAUGES_H
120 #define _GAUGES_H
121
122 #include "fix.h"
123 #include "gr.h"
124 #include "piggy.h"
125 #include "object.h"
126
127 //from gauges.c
128
129 #define MAX_GAUGE_BMS 100   // increased from 56 to 80 by a very unhappy MK on 10/24/94.
130
131 extern bitmap_index Gauges[MAX_GAUGE_BMS];      // Array of all gauge bitmaps.
132 extern bitmap_index Gauges_hires[MAX_GAUGE_BMS];    // hires gauges
133
134 // Flags for gauges/hud stuff
135 extern ubyte Reticle_on;
136
137 extern void init_gauge_canvases();
138 extern void close_gauge_canvases();
139
140 extern void show_score();
141 extern void show_score_added();
142 extern void add_points_to_score();
143 extern void add_bonus_points_to_score();
144
145 void render_gauges(void);
146 void init_gauges(void);
147 extern void check_erase_message(void);
148
149 extern void HUD_render_message_frame();
150 extern void HUD_clear_messages();
151
152 // Call to flash a message on the HUD.  Returns true if message drawn.
153 // (message might not be drawn if previous message was same)
154 extern int HUD_init_message(char *format, ... );
155
156 #define gauge_message HUD_init_message
157
158 extern void draw_hud();     // draw all the HUD stuff
159
160 extern void player_dead_message(void);
161 //extern void say_afterburner_status(void);
162
163 // fills in the coords of the hostage video window
164 void get_hostage_window_coords(int *x, int *y, int *w, int *h);
165
166 // from testgaug.c
167
168 void gauge_frame(void);
169 extern void update_laser_weapon_info(void);
170 extern void play_homing_warning(void);
171
172 typedef struct {
173         ubyte r,g,b;
174 } rgb;
175
176 extern rgb player_rgb[];
177
178 #define WBU_WEAPON      0       // the weapons display
179 #define WBU_MISSILE     1       // the missile view
180 #define WBU_ESCORT      2       // the "buddy bot"
181 #define WBU_REAR        3       // the rear view
182 #define WBU_COOP        4       // coop or team member view
183 #define WBU_GUIDED      5       // the guided missile
184 #define WBU_MARKER      6       // a dropped marker
185 #define WBU_STATIC      7       // playing static after missile hits
186
187 // draws a 3d view into one of the cockpit windows.  win is 0 for
188 // left, 1 for right.  viewer is object.  NULL object means give up
189 // window user is one of the WBU_ constants.  If rear_view_flag is
190 // set, show a rear view.  If label is non-NULL, print the label at
191 // the top of the window.
192 void do_cockpit_window_view(int win, object *viewer, int rear_view_flag, int user, char *label);
193
194 #ifdef MACINTOSH
195 # include "QuickDraw.h"
196 # include "RAVE.h"
197 void calculate_sub_view_window_bounds(int inSubWindowNum, TQARect* outBoundsRect);
198 #endif
199
200 #endif /* _GAUGES_H */