]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/hud.cxx
Port over remaining Point3D usage to the more type and unit safe SG* classes.
[flightgear.git] / src / Cockpit / hud.cxx
index 88597d5dc3376484fe73fe227427190f99b36958..e6903caabbdb287910d472112eaefee5586bfb58 100644 (file)
 #include <simgear/compiler.h>
 #include <simgear/structure/exception.hxx>
 
-#include STL_STRING
-#include STL_FSTREAM
+#include <string>
+#include <fstream>
 
 #ifdef HAVE_CONFIG_H
 #  include <config.h>
 #endif
 
-#ifdef HAVE_WINDOWS_H
-#  include <windows.h>
-#endif
-
-#ifdef __BORLANDC__
-#  define exception c_exception
-#endif
-
 #include <math.h>
-
 #include <stdlib.h>
 #include <stdio.h>              // char related functions
 #include <string.h>             // strcmp()
 
-#include SG_GLU_H
-
 #include <simgear/constants.h>
 #include <simgear/debug/logstream.hxx>
 #include <simgear/misc/sg_path.hxx>
+#include <simgear/props/props_io.hxx>
+
+#include <osg/GLU>
 
 #include <Aircraft/aircraft.hxx>
 //#include <Autopilot/xmlauto.hxx>
 #include <GUI/new_gui.hxx>           // FGFontCache
 #include <Main/globals.hxx>
 #include <Scenery/scenery.hxx>
+#include <Airports/runways.hxx>
 
 #include "hud.hxx"
 
@@ -63,7 +56,7 @@ static HUD_Properties *HUDprop = 0;
 
 static char units[5];
 
-deque<instr_item *> HUD_deque;
+deque<SGSharedPtr<instr_item> > HUD_deque;
 
 fgTextList HUD_TextList;
 fgLineList HUD_LineList;
@@ -191,6 +184,8 @@ int readHud( istream &input )
     SG_LOG(SG_INPUT, SG_INFO, "Read properties for  " <<
            root.getStringValue("name"));
 
+    if (!root.getNode("depreciated"))
+        SG_LOG(SG_INPUT, SG_ALERT, "WARNING: use of depreciated old HUD");
 
     HUD_deque.erase( HUD_deque.begin(), HUD_deque.end());
 
@@ -540,6 +535,7 @@ void fgTextList::draw()
     vector<fgText>::iterator lastString = List.end();
 
     glPushAttrib(GL_COLOR_BUFFER_BIT);
+    glEnable(GL_TEXTURE_2D);
     glEnable(GL_BLEND);
     if (HUDprop->isTransparent())
         glBlendFunc(GL_SRC_ALPHA, GL_ONE);
@@ -553,7 +549,7 @@ void fgTextList::draw()
 
     Font->begin();
     for (; curString != lastString; curString++)
-        curString->Draw(Font,curString->digit);
+        curString->Draw(Font);
     Font->end();
 
     glDisable(GL_TEXTURE_2D);