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 **************************************************************************/
27 #include "../Aircraft/aircraft.h"
28 #include "../Flight/flight.h"
29 #include "../Controls/controls.h"
32 /* Instrument types */
33 #define ARTIFICIAL_HORIZON 1
57 /* Ladder constants */
60 #define UPPER_CENTER 3
62 #define CENTER_RIGHT 5
64 #define LOWER_CENTER 7
67 #define SOLID_LINES 10
68 #define DASHED_LINES 11
69 #define DASHED_NEG_LINES 12
71 /* Ladder orientaion */
72 // #define HUD_VERTICAL 1
73 // #define HUD_HORIZONTAL 2
74 // #define HUD_FREEFLOAT 3
76 /* Ladder orientation modes */
78 // #define HUD_RIGHT 2
80 // #define HUD_BOTTOM 2
81 // #define HUD_V_LEFT 1
82 // #define HUD_V_RIGHT 2
83 // #define HUD_H_TOP 1
84 // #define HUD_H_BOTTOM 2
87 /* Ladder sub-types */
89 // #define HUD_NOLIM 2
92 // #define HUD_INSTR_LADDER 1
93 // #define HUD_INSTR_CLADDER 2
94 // #define HUD_INSTR_HORIZON 3
95 // #define HUD_INSTR_LABEL 4
108 double (*load_value)();
111 struct HUD_circular_scale {
121 double (*load_value)();
134 double (*load_roll)();
135 double (*load_pitch)();
138 struct HUD_circular_ladder {
146 double (*load_value)();
149 #define HORIZON_FIXED 1
150 #define HORIZON_MOVING 2
158 double (*load_value)();
161 #define LABEL_COUNTER 1
162 #define LABEL_WARNING 2
174 double (*load_value)();
177 union HUD_instr_data {
178 struct HUD_scale scale;
179 struct HUD_circular_scale circ_scale;
180 struct HUD_ladder ladder;
181 struct HUD_circular_ladder circ_ladder;
182 struct HUD_horizon horizon;
183 struct HUD_label label;
186 typedef struct HUD_instr *HIptr;
192 union HUD_instr_data instr;
199 // struct HUD_instr *instruments;
204 typedef struct HUD *Hptr;
206 Hptr fgHUDInit( struct AIRCRAFT cur_aircraft, int color );
207 Hptr fgHUDAddHorizon( Hptr hud, int x_pos, int y_pos, int length, int hole_len, double (*load_value)() );
208 Hptr fgHUDAddScale( Hptr hud, int type, int scr_pos, int scr_min, int scr_max, int div_min, int div_max, \
209 int orientation, int with_min, int min_value, int width_units, double (*load_value)() );
210 Hptr fgHUDAddLabel( Hptr hud, int x_pos, int y_pos, int size, int blink, int justify, \
211 char *pre_str, char *post_str, char *format, double (*load_value)() );
212 Hptr fgHUDAddLadder( Hptr hud, int x_pos, int y_pos, int scr_width, int scr_height, \
213 int hole_len, int div_units, int label_pos, int max_value, \
214 double (*load_roll)(), double (*load_pitch)() );
218 /* struct HUD *fgHUDAddLadder( Hptr hud, int scr_min, int scr_max, int div_min, int div_max, \
219 int orientation, int max_value, double *(load_value);
220 struct HUD *fgHUDAddCircularLadder( Hptr hud, int scr_min, int scr_max, int div_min, int div_max, \
221 int max_value, double *(load_value) );
222 struct HUD *fgHUDAddNumDisp( Hptr hud, int x_pos, int y_pos, int size, int blink, \
223 char *pre_str, char *post_str, double *(load_value) ); */
225 void fgUpdateHUD2( struct HUD *hud );
229 /* Revision 1.1 1997/08/29 18:03:22 curt