]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/globals.cxx
Merge branch 'next' of gitorious.org:fg/flightgear into next
[flightgear.git] / src / Main / globals.cxx
index bbe5dc9fdcfb7e253a947438c3c2ba37626cc9a0..8c8ca52bf75b68d116154d16e079e2998807be1e 100644 (file)
@@ -44,9 +44,8 @@
 
 #include <Aircraft/controls.hxx>
 #include <Airports/runways.hxx>
-#include <ATCDCL/ATCmgr.hxx>
+#include <ATCDCL/ATISmgr.hxx>
 #include <Autopilot/route_mgr.hxx>
-#include <Cockpit/panel.hxx>
 #include <GUI/FGFontCache.hxx>
 #include <GUI/gui.h>
 #include <Model/acmodel.hxx>
 #include <Scenery/scenery.hxx>
 #include <Scenery/tilemgr.hxx>
 #include <Navaids/navlist.hxx>
+#include <Viewer/renderer.hxx>
+#include <Viewer/viewmgr.hxx>
 
 #include "globals.hxx"
-#include "renderer.hxx"
-#include "viewmgr.hxx"
+#include "locale.hxx"
 
 #include "fg_props.hxx"
 #include "fg_io.hxx"
@@ -122,7 +122,7 @@ FGGlobals *globals;
 FGGlobals::FGGlobals() :
     props( new SGPropertyNode ),
     initial_state( NULL ),
-    locale( NULL ),
+    locale( new FGLocale(props) ),
     renderer( new FGRenderer ),
     subsystem_mgr( new SGSubsystemMgr ),
     event_mgr( new SGEventMgr ),
@@ -133,8 +133,7 @@ FGGlobals::FGGlobals() :
     mag( NULL ),
     matlib( NULL ),
     route_mgr( NULL ),
-    current_panel( NULL ),
-    ATC_mgr( NULL ),
+    ATIS_mgr( NULL ),
     controls( NULL ),
     viewmgr( NULL ),
     commands( SGCommandMgr::instance() ),
@@ -188,9 +187,8 @@ FGGlobals::~FGGlobals()
     delete mag;
     delete matlib;
     delete route_mgr;
-    delete current_panel;
 
-    delete ATC_mgr;
+    delete ATIS_mgr;
 
     if (controls)
     {
@@ -211,6 +209,9 @@ FGGlobals::~FGGlobals()
     delete carrierlist;
     delete channellist;
     delete sound;
+
+    delete locale;
+    locale = NULL;
 }
 
 
@@ -334,6 +335,12 @@ SGPath FGGlobals::resolve_maybe_aircraft_path(const std::string& branch) const
   return simgear::ResourceManager::instance()->findPath(branch);
 }
 
+SGPath FGGlobals::resolve_ressource_path(const std::string& branch) const
+{
+  return simgear::ResourceManager::instance()
+    ->findPath(branch, SGPath(fgGetString("/sim/aircraft-dir")));
+}
+
 FGRenderer *
 FGGlobals::get_renderer () const
 {
@@ -514,5 +521,5 @@ void FGGlobals::set_warp_delta( long int d )
 {
   fgSetInt("/sim/time/warp-delta", d);
 }
-    
+
 // end of globals.cxx