]> git.mxchange.org Git - flightgear.git/commitdiff
Make it possible to either select the 2d or the 3d HUD
authorehofman <ehofman>
Mon, 14 Jul 2003 13:57:11 +0000 (13:57 +0000)
committerehofman <ehofman>
Mon, 14 Jul 2003 13:57:11 +0000 (13:57 +0000)
src/Cockpit/hud.cxx
src/Main/options.cxx

index 4f7ddfdedc7a6b29d2f8775f944e4f93b9451446..687cc36580f39caf243812c73e1b824fcefe755d 100644 (file)
@@ -242,11 +242,13 @@ readLadder(const SGPropertyNode * node)
     // The factor assumes a base of 55 degrees per 640 pixels.
     // Invert to convert the "compression" factor to a
     // pixels-per-degree number.
-    if( HUD_style == 1)
+    if(fgGetBool("/sim/hud/enable3d", true))
     {
-//        if(factor == 0)
+        if (HUD_style == 1)
+        {
             factor = 1;
-        factor = (640./55.) / factor;
+            factor = (640./55.) / factor;
+        }
     }
 
     SG_LOG(SG_INPUT, SG_INFO, "Done reading instrument " << name);
@@ -993,7 +995,8 @@ static void set_hud_color(float r, float g, float b) {
 //
 void fgUpdateHUD( void ) {
        
-    if( HUD_style == 1)
+    static const SGPropertyNode *enable3d_node = fgGetNode("/sim/hud/enable3d");
+    if( HUD_style == 1 && enable3d_node->getBoolValue() )
     {
         fgUpdateHUDVirtual();
         return;
index 9a28333d0fe105c197b0ec3aa78ee8c16465335b..d0389d12c1bec82f54c8016454543d64922c2bc2 100644 (file)
@@ -184,10 +184,11 @@ fgSetDefaults ()
     fgSetInt("/sim/log-level", SG_WARN);
 
                                // Features
+    fgSetBool("/sim/hud/antialiased", false);
+    fgSetBool("/sim/hud/enable3d", true);
     fgSetBool("/sim/hud/visibility", false);
     fgSetBool("/sim/panel/visibility", true);
     fgSetBool("/sim/sound/audible", true);
-    fgSetBool("/sim/hud/antialiased", false);
 
                                // Flight Model options
     fgSetString("/sim/flight-model", "jsb");
@@ -1085,6 +1086,8 @@ struct OptionDesc {
     {"enable-fuel-freeze",           false, OPTION_BOOL,   "/sim/freeze/fuel", true, "", 0 },
     {"disable-clock-freeze",         false, OPTION_BOOL,   "/sim/freeze/clock", false, "", 0 },
     {"enable-clock-freeze",          false, OPTION_BOOL,   "/sim/freeze/clock", true, "", 0 },
+    {"disable-hud-3d",               false, OPTION_BOOL,   "/sim/hud/enable3d", false, "", 0 },
+    {"enable-hud-3d",                false, OPTION_BOOL,   "/sim/hud/enable3d", true, "", 0 },
     {"disable-anti-alias-hud",       false, OPTION_BOOL,   "/sim/hud/antialiased", false, "", 0 },
     {"enable-anti-alias-hud",        false, OPTION_BOOL,   "/sim/hud/antialiased", true, "", 0 },
     {"control",                      true,  OPTION_STRING, "/sim/control-mode", false, "", 0 },