]> git.mxchange.org Git - flightgear.git/commitdiff
Added an fov to hud display.
authorcurt <curt>
Wed, 13 May 1998 18:27:53 +0000 (18:27 +0000)
committercurt <curt>
Wed, 13 May 1998 18:27:53 +0000 (18:27 +0000)
Cockpit/cockpit.cxx
Cockpit/hud.cxx
Cockpit/hud.hxx

index daa2116e6ff9b277cee9ac5ba3ae35b2a7555e07..95a9df96dad8307976f4b06382448881e8af4960 100644 (file)
@@ -40,6 +40,7 @@
 #include <Debug/fg_debug.h>
 #include <Include/fg_constants.h>
 #include <Include/general.h>
+#include <Main/options.hxx>
 #include <Math/fg_random.h>
 #include <Math/mat3.h>
 #include <Math/polar3d.h>
@@ -170,6 +171,15 @@ double get_frame_rate( void )
     return g->frame_rate;                                                      
 }
 
+double get_fov( void )
+{
+    fgOPTIONS *o;                                                               
+    o = &current_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
  *
index f07b2f2f93c44aba0c840dcd167f86ba244d2a29..e3c7ed0c28fd1dca45974a2c71f03b8843e142ed 100644 (file)
@@ -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.
  *
index 2ccec4fd53cafc87b4008edec96f41acd543a926..f6ebf1dc2147fef1bc172a57df27f7543a246730 100644 (file)
@@ -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