From: curt Date: Wed, 13 May 1998 18:27:53 +0000 (+0000) Subject: Added an fov to hud display. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=17cfc04cef5284b3f5c5e0fc83b58b5f0fb77ece;p=flightgear.git Added an fov to hud display. --- diff --git a/Cockpit/cockpit.cxx b/Cockpit/cockpit.cxx index daa2116e6..95a9df96d 100644 --- a/Cockpit/cockpit.cxx +++ b/Cockpit/cockpit.cxx @@ -40,6 +40,7 @@ #include #include #include +#include
#include #include #include @@ -170,6 +171,15 @@ double get_frame_rate( void ) return g->frame_rate; } +double get_fov( void ) +{ + fgOPTIONS *o; + + o = ¤t_options; + + return o->fov; +} + bool fgCockpitInit( fgAIRCRAFT *cur_aircraft ) { fgPrintf( FG_COCKPIT, FG_INFO, "Initializing cockpit subsystem\n"); @@ -207,9 +217,12 @@ void fgCockpitUpdate( void ) } /* $Log$ -/* Revision 1.5 1998/05/11 18:13:10 curt -/* Complete C++ rewrite of all cockpit code by Charlie Hotchkiss. +/* Revision 1.6 1998/05/13 18:27:53 curt +/* Added an fov to hud display. /* + * Revision 1.5 1998/05/11 18:13:10 curt + * Complete C++ rewrite of all cockpit code by Charlie Hotchkiss. + * * Revision 1.4 1998/05/03 00:46:45 curt * polar.h -> polar3d.h * diff --git a/Cockpit/hud.cxx b/Cockpit/hud.cxx index f07b2f2f9..e3c7ed0c2 100644 --- a/Cockpit/hud.cxx +++ b/Cockpit/hud.cxx @@ -1473,7 +1473,7 @@ void HudLadder :: draw( void ) // mustange and the engine readouts of a B36! // -#define INSTRDEFS 15 +#define INSTRDEFS 16 int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ ) { @@ -1762,6 +1762,22 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ ) TRUE ); break; + case 16: + loc.left = 10; + loc.top = 100; // Ignore + loc.right = 500; // Ignore + loc.bottom = 25; + HIptr = (instr_item *) new instr_label( loc, get_fov, + "%.1f", + "FOV = ", + NULL, + ReadTOP, + RIGHT_JUST, + SMALL, + 0, + TRUE ); + break; + // fgHUDAddControlSurfaces( hud, 10, 10, NULL ); // loc.left = 250; // loc.top = 190; @@ -1883,9 +1899,12 @@ void fgUpdateHUD( void ) { } /* $Log$ -/* Revision 1.7 1998/05/11 18:13:11 curt -/* Complete C++ rewrite of all cockpit code by Charlie Hotchkiss. +/* Revision 1.8 1998/05/13 18:27:54 curt +/* Added an fov to hud display. /* + * Revision 1.7 1998/05/11 18:13:11 curt + * Complete C++ rewrite of all cockpit code by Charlie Hotchkiss. + * * Revision 1.22 1998/04/18 04:14:02 curt * Moved fg_debug.c to it's own library. * diff --git a/Cockpit/hud.hxx b/Cockpit/hud.hxx index 2ccec4fd5..f6ebf1dc2 100644 --- a/Cockpit/hud.hxx +++ b/Cockpit/hud.hxx @@ -144,6 +144,7 @@ extern double get_heading ( void ); extern double get_altitude ( void ); extern double get_sideslip ( void ); extern double get_frame_rate ( void ); +extern double get_fov ( void ); enum hudinstype{ HUDno_instr, HUDscale, @@ -439,9 +440,12 @@ void fgHUDSetTimeMode( Hptr hud, int time_of_day ); #endif // _HUD_H /* $Log$ -/* Revision 1.2 1998/05/11 18:13:12 curt -/* Complete C++ rewrite of all cockpit code by Charlie Hotchkiss. +/* Revision 1.3 1998/05/13 18:27:55 curt +/* Added an fov to hud display. /* + * Revision 1.2 1998/05/11 18:13:12 curt + * Complete C++ rewrite of all cockpit code by Charlie Hotchkiss. + * * Revision 1.15 1998/02/23 19:07:57 curt * Incorporated Durk's Astro/ tweaks. Includes unifying the sun position * calculation code between sun display, and other FG sections that use this