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.
131 double (*load_value)( void );
132 }HUD_scale, *pHUDscale;
144 double (*load_value)( void );
145 }HUD_circular_scale, *pHUD_circscale;
157 double (*load_roll)( void );
158 double (*load_pitch)( void );
159 }HUD_ladder, *pHUDladder;
169 double (*load_value)( void );
170 } HUD_circular_ladder, *pHUDcircladder;
172 #define HORIZON_FIXED 1
173 #define HORIZON_MOVING 2
181 double (*load_value)( void );
182 } HUD_horizon, *pHUDhorizon;
187 double(*load_value)(void);
188 } HUD_control_surfaces, *pHUDControlSurfaces;
199 double (*load_value)(void);
200 } HUD_control, *pHUDControl;
201 #define LABEL_COUNTER 1
202 #define LABEL_WARNING 2
214 double (*load_value)( void ); // pointer to routine to get the data
215 } HUD_label, *pHUDlabel;
217 // Removed union HUD_instr_data to evolve this to oop code.
219 typedef enum{ HUDno_instr,
230 typedef struct HUD_INSTR_STRUCT{
234 void *instr; // For now we will cast this pointer accoring to the value
235 // of the type member.
236 struct HUD_INSTR_STRUCT *next;
245 Hptr fgHUDInit ( fgAIRCRAFT *cur_aircraft );
247 Hptr fgHUDAddHorizon( Hptr hud,
252 double (*load_value)( void ) );
254 Hptr fgHUDAddScale ( Hptr hud, \
266 double (*load_value)( void ) );
268 Hptr fgHUDAddLabel ( Hptr hud, \
277 double (*load_value)( void ) );
279 Hptr fgHUDAddLadder ( Hptr hud, \
288 double (*load_roll)( void ), \
289 double (*load_pitch)( void ) );
291 Hptr fgHUDAddControlSurfaces( Hptr hud, \
294 double (*load_value)( void) );
296 Hptr fgHUDAddControl( Hptr hud, \
305 double (*load_value)( void) );
308 Hptr fgHUDAddLadder ( Hptr hud,
315 double *(load_value);
317 Hptr fgHUDAddCircularLadder( Hptr hud,
323 double *(load_value) );
325 Hptr fgHUDAddNumDisp( Hptr hud,
332 double *(load_value) );
335 void fgUpdateHUD ( Hptr hud );
336 void fgUpdateHUD2( Hptr hud ); // Future use?
342 /* Revision 1.11 1998/02/16 13:38:42 curt
343 /* Integrated changes from Charlie Hotchkiss.
345 * Revision 1.10 1998/02/12 21:59:42 curt
346 * Incorporated code changes contributed by Charlie Hotchkiss
347 * <chotchkiss@namg.us.anritsu.com>
349 * Revision 1.8 1998/02/07 15:29:35 curt
350 * Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
351 * <chotchkiss@namg.us.anritsu.com>
353 * Revision 1.7 1998/02/03 23:20:15 curt
354 * Lots of little tweaks to fix various consistency problems discovered by
355 * Solaris' CC. Fixed a bug in fg_debug.c with how the fgPrintf() wrapper
356 * passed arguments along to the real printf(). Also incorporated HUD changes
357 * by Michele America.
359 * Revision 1.6 1998/01/22 02:59:30 curt
360 * Changed #ifdef FILE_H to #ifdef _FILE_H
362 * Revision 1.5 1998/01/19 19:27:01 curt
363 * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
364 * This should simplify things tremendously.
366 * Revision 1.4 1998/01/19 18:40:21 curt
367 * Tons of little changes to clean up the code and to remove fatal errors
368 * when building with the c++ compiler.
370 * Revision 1.3 1997/12/30 16:36:41 curt
371 * Merged in Durk's changes ...
373 * Revision 1.2 1997/12/10 22:37:40 curt
374 * Prepended "fg" on the name of all global structures that didn't have it yet.
375 * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
377 * Revision 1.1 1997/08/29 18:03:22 curt