1 /**************************************************************************
2 * hud.h -- hud defines and prototypes (initial draft)
4 * Written by Michele America, started September 1997.
6 * Copyright (C) 1997 Michele F. America - nomimarketing@mail.telepac.pt
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 * (Log is kept at end of this file)
24 **************************************************************************/
31 #include <Aircraft/aircraft.h>
32 #include <Flight/flight.h>
33 #include <Controls/controls.h>
35 // View mode definitions
37 enum VIEW_MODES { HUD_VIEW, PANEL_VIEW, CHASE_VIEW, TOWER_VIEW };
40 #define ARTIFICIAL_HORIZON 1
68 #define UPPER_CENTER 3
70 #define CENTER_RIGHT 5
72 #define LOWER_CENTER 7
75 #define SOLID_LINES 10
76 #define DASHED_LINES 11
77 #define DASHED_NEG_LINES 12
80 // #define HUD_VERTICAL 1
81 // #define HUD_HORIZONTAL 2
82 // #define HUD_FREEFLOAT 3
84 // Ladder orientation modes
86 // #define HUD_RIGHT 2
88 // #define HUD_BOTTOM 2
89 // #define HUD_V_LEFT 1
90 // #define HUD_V_RIGHT 2
91 // #define HUD_H_TOP 1
92 // #define HUD_H_BOTTOM 2
97 // #define HUD_NOLIM 2
100 // #define HUD_INSTR_LADDER 1
101 // #define HUD_INSTR_CLADDER 2
102 // #define HUD_INSTR_HORIZON 3
103 // #define HUD_INSTR_LABEL 4
105 // The following structs will become classes with a derivation from
106 // an ABC instrument_pack. Eventually the instruments may well become
107 // dll's. This would open the instrumentation issue to all commers.
111 // Initialization(); // For dynamic scenario settups?
112 // Update(); // Follow the data changes.
113 // Repaint(); // Respond to uncover/panel repaints.
114 // Break(); // Show a frown.
115 // Fix(); // Return to normal appearance and function.
116 // Night_Day(); // Illumination changes appearance/bitmaps.
132 double (*load_value)( void );
133 }HUD_scale, *pHUDscale;
145 double (*load_value)( void );
146 }HUD_circular_scale, *pHUD_circscale;
158 double (*load_roll)( void );
159 double (*load_pitch)( void );
160 }HUD_ladder, *pHUDladder;
170 double (*load_value)( void );
171 } HUD_circular_ladder, *pHUDcircladder;
173 #define HORIZON_FIXED 1
174 #define HORIZON_MOVING 2
182 double (*load_value)( void );
183 } HUD_horizon, *pHUDhorizon;
189 double (*load_value)();
190 } HUD_control_surfaces, *pHUDControlSurface;
191 #define LABEL_COUNTER 1
192 #define LABEL_WARNING 2
204 double (*load_value)( void ); // pointer to routine to get the data
205 } HUD_label, *pHUDlabel;
207 // Removed union HUD_instr_data to evolve this to oop code.
209 typedef enum{ HUDno_instr,
219 typedef struct HUD_INSTR_STRUCT{
223 void *instr; // For now we will cast this pointer accoring to the value
224 // of the type member.
225 struct HUD_INSTR_STRUCT *next;
234 Hptr fgHUDInit ( fgAIRCRAFT *cur_aircraft );
236 Hptr fgHUDAddHorizon( Hptr hud,
241 double (*load_value)( void ) );
243 Hptr fgHUDAddScale ( Hptr hud, \
256 double (*load_value)( void ) );
258 Hptr fgHUDAddLabel ( Hptr hud, \
267 double (*load_value)( void ) );
269 Hptr fgHUDAddLadder ( Hptr hud, \
278 double (*load_roll)( void ), \
279 double (*load_pitch)( void ) );
281 Hptr fgHUDAddControlSurfaces( Hptr hud,
284 double (*load_value)(void) );
287 Hptr fgHUDAddLadder ( Hptr hud,
294 double *(load_value);
296 Hptr fgHUDAddCircularLadder( Hptr hud,
302 double *(load_value) );
304 Hptr fgHUDAddNumDisp( Hptr hud,
311 double *(load_value) );
314 void fgUpdateHUD ( Hptr hud );
315 void fgUpdateHUD2( Hptr hud ); // Future use?
321 /* Revision 1.10 1998/02/12 21:59:42 curt
322 /* Incorporated code changes contributed by Charlie Hotchkiss
323 /* <chotchkiss@namg.us.anritsu.com>
325 * Revision 1.8 1998/02/07 15:29:35 curt
326 * Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
327 * <chotchkiss@namg.us.anritsu.com>
329 * Revision 1.7 1998/02/03 23:20:15 curt
330 * Lots of little tweaks to fix various consistency problems discovered by
331 * Solaris' CC. Fixed a bug in fg_debug.c with how the fgPrintf() wrapper
332 * passed arguments along to the real printf(). Also incorporated HUD changes
333 * by Michele America.
335 * Revision 1.6 1998/01/22 02:59:30 curt
336 * Changed #ifdef FILE_H to #ifdef _FILE_H
338 * Revision 1.5 1998/01/19 19:27:01 curt
339 * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
340 * This should simplify things tremendously.
342 * Revision 1.4 1998/01/19 18:40:21 curt
343 * Tons of little changes to clean up the code and to remove fatal errors
344 * when building with the c++ compiler.
346 * Revision 1.3 1997/12/30 16:36:41 curt
347 * Merged in Durk's changes ...
349 * Revision 1.2 1997/12/10 22:37:40 curt
350 * Prepended "fg" on the name of all global structures that didn't have it yet.
351 * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
353 * Revision 1.1 1997/08/29 18:03:22 curt