]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/HUD/HUD.cxx
Add support for a back-course mode. Nothing changes visualy, but this
[flightgear.git] / src / Instrumentation / HUD / HUD.cxx
index 22b4e6bdb7b598afc868e0aae21450ee78177805..8e9143d97e1f69ef9a38f399e09ce11425031765 100644 (file)
 #  include <config.h>
 #endif
 
+#ifdef HAVE_WINDOWS_H
+#   include <windows.h>
+#endif
+
 #include SG_GLU_H
 
 #include <simgear/constants.h>
@@ -49,7 +53,7 @@ static float clamp(float f)
 HUD::HUD() :
     _current(fgGetNode("/sim/hud/current-color", true)),
     _visibility(fgGetNode("/sim/hud/visibility[1]", true)),
-    _3DenabledN(fgGetNode("/sim/hud/enable3d", true)),
+    _3DenabledN(fgGetNode("/sim/hud/enable3d[1]", true)),
     _antialiasing(fgGetNode("/sim/hud/color/antialiased", true)),
     _transparency(fgGetNode("/sim/hud/color/transparent", true)),
     _red(fgGetNode("/sim/hud/color/red", true)),
@@ -130,7 +134,7 @@ void HUD::init()
     _font_renderer->setPointSize(_font_size);
     _text_list.setFont(_font_renderer);
 
-    load(fgGetString("/hud", "Huds/default.xml"));
+    load(fgGetString("/sim/hud/path[1]", "Huds/default.xml"));
 }
 
 
@@ -221,8 +225,7 @@ void HUD::draw3D()
 }
 
 
-void HUD::draw2D( GLfloat x_start, GLfloat y_start,
-                  GLfloat x_end, GLfloat y_end )
+void HUD::draw2D(GLfloat x_start, GLfloat y_start, GLfloat x_end, GLfloat y_end)
 {
     glMatrixMode(GL_PROJECTION);
     glPushMatrix();
@@ -344,7 +347,7 @@ int HUD::load(const char *file, float x, float y, int level, const string& inden
 
         } else if (!strcmp(name, "enable3d")) {
             // set in the tree so that valueChanged() picks it up
-            fgSetBool("/sim/hud/enable3d", n->getBoolValue());
+            _3DenabledN->setBoolValue(n->getBoolValue());
             continue;
 
         } else if (!strcmp(name, "import")) {