#endif /* not WIN32 */
#include "hud.h"
-#include "../constants.h"
+#include <Include/fg_constants.h>
-#include "../Aircraft/aircraft.h"
-#include "../Scenery/mesh.h"
-#include "../Scenery/scenery.h"
-#include "../Math/mat3.h"
-#include "../Math/polar.h"
-#include "../Time/fg_timer.h"
-#include "../Math/fg_random.h"
-#include "../Weather/weather.h"
+#include <Aircraft/aircraft.h>
+#include <Scenery/mesh.h>
+#include <Scenery/scenery.h>
+#include <Math/mat3.h>
+#include <Math/polar.h>
+#include <Time/fg_timer.h>
+#include <Math/fg_random.h>
+#include <Weather/weather.h>
// #define DEBUG
{
int x_inc1, y_inc1;
int x_inc2, y_inc2;
- struct FLIGHT *f;
+ struct fgFLIGHT *f;
double sin_bank, cos_bank;
double bank_angle;
sprintf( string, buffer, (*label.load_value)() );
#ifdef DEBUG
- printf( buffer );
- printf( "\n" );
- printf( string );
- printf( "\n" );
+ fgPrintf( FG_COCKPIT, FG_DEBUG, buffer );
+ fgPrintf( FG_COCKPIT, FG_DEBUG, "\n" );
+ fgPrintf( FG_COCKPIT, FG_DEBUG, string );
+ fgPrintf( FG_COCKPIT, FG_DEBUG, "\n" );
#endif
lenstr = strlen( string );
}
-double get_speed()
+double get_speed( void )
{
- struct FLIGHT *f;
+ struct fgFLIGHT *f;
f = ¤t_aircraft.flight;
- return( FG_V_true_kts );
+ return( FG_V_equiv_kts );
}
-double get_aoa()
+double get_aoa( void )
{
- struct FLIGHT *f;
+ struct fgFLIGHT *f;
f = ¤t_aircraft.flight;
return( FG_Gamma_vert_rad*RAD_TO_DEG );
}
-double get_roll()
+double get_roll( void )
{
- struct FLIGHT *f;
+ struct fgFLIGHT *f;
f = ¤t_aircraft.flight;
return( FG_Phi );
}
-double get_pitch()
+double get_pitch( void )
{
- struct FLIGHT *f;
+ struct fgFLIGHT *f;
f = ¤t_aircraft.flight;
return( FG_Theta );
}
-double get_heading()
+double get_heading( void )
{
- struct FLIGHT *f;
+ struct fgFLIGHT *f;
f = ¤t_aircraft.flight;
- return( FG_Gamma_horiz_rad*RAD_TO_DEG );
+ return( FG_Psi*RAD_TO_DEG );
}
-double get_altitude()
+double get_altitude( void )
{
- struct FLIGHT *f;
- double rough_elev;
+ struct fgFLIGHT *f;
+ /* double rough_elev; */
f = ¤t_aircraft.flight;
- rough_elev = mesh_altitude(FG_Longitude * RAD_TO_ARCSEC,
- FG_Latitude * RAD_TO_ARCSEC);
+ /* rough_elev = mesh_altitude(FG_Longitude * RAD_TO_ARCSEC,
+ FG_Latitude * RAD_TO_ARCSEC); */
- return( FG_Altitude*FEET_TO_METER-rough_elev );
+ return( FG_Altitude * FEET_TO_METER /* - rough_elev */ );
}
void add_instrument( Hptr hud, HIptr instrument )
// while( ++instruments
}
-Hptr fgHUDInit( struct AIRCRAFT current_aircraft, int color )
+Hptr fgHUDInit( struct fgAIRCRAFT current_aircraft, int color )
{
Hptr hud;
return( NULL );
instrument->type = ARTIFICIAL_HORIZON;
- instrument->instr = *horizon;
+ instrument->instr.horizon = *horizon;
instrument->instr.horizon.x_pos = x_pos;
instrument->instr.horizon.y_pos = y_pos;
instrument->instr.horizon.scr_width = length;
return( NULL );
instrument->type = SCALE;
- instrument->instr = *scale;
+ instrument->instr.scale = *scale;
instrument->instr.scale.type = type;
instrument->instr.scale.scr_pos = scr_pos;
instrument->instr.scale.scr_min = scr_min;
return( NULL );
instrument->type = LABEL;
- instrument->instr = *label;
+ instrument->instr.label = *label;
instrument->instr.label.x_pos = x_pos;
instrument->instr.label.y_pos = y_pos;
instrument->instr.label.size = size;
return( NULL );
instrument->type = LADDER;
- instrument->instr = *ladder;
+ instrument->instr.ladder = *ladder;
instrument->instr.ladder.type = 0; // Not used.
instrument->instr.ladder.x_pos = x_pos;
instrument->instr.ladder.y_pos = y_pos;
glColor3f (0.1, 0.9, 0.1);
#ifdef DEBUG
- printf( "HUD Code %d Status %d\n", hud->code, hud->status );
+ fgPrintf( FG_COCKPIT, FG_DEBUG, "HUD Code %d Status %d\n",
+ hud->code, hud->status );
#endif
hud_instr = hud->instruments;
while( hud_instr != NULL )
{
instr_data = hud_instr->instr;
#ifdef DEBUG
- printf("Instr Type %d SubType %d Orient %d\n", hud_instr->type, hud_instr->sub_type, hud_instr->orientation );
+ fgPrintf( FG_COCKPIT, FG_DEBUG,
+ "Instr Type %d SubType %d Orient %d\n",
+ hud_instr->type, hud_instr->sub_type, hud_instr->orientation );
#endif
if( hud_instr->type == ARTIFICIAL_HORIZON )
{
/* $Log$
-/* Revision 1.2 1997/09/04 02:17:30 curt
-/* Shufflin' stuff.
+/* Revision 1.8 1998/01/27 00:47:51 curt
+/* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
+/* system and commandline/config file processing code.
/*
+ * Revision 1.7 1998/01/19 18:40:20 curt
+ * Tons of little changes to clean up the code and to remove fatal errors
+ * when building with the c++ compiler.
+ *
+ * Revision 1.6 1997/12/15 23:54:34 curt
+ * Add xgl wrappers for debugging.
+ * Generate terrain normals on the fly.
+ *
+ * Revision 1.5 1997/12/10 22:37:39 curt
+ * Prepended "fg" on the name of all global structures that didn't have it yet.
+ * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+ *
+ * Revision 1.4 1997/09/23 00:29:32 curt
+ * Tweaks to get things to compile with gcc-win32.
+ *
+ * Revision 1.3 1997/09/05 14:17:26 curt
+ * More tweaking with stars.
+ *
+ * Revision 1.2 1997/09/04 02:17:30 curt
+ * Shufflin' stuff.
+ *
* Revision 1.1 1997/08/29 18:03:22 curt
* Initial revision.
*