]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_init.cxx
Logging cleanups from Martin Dressler.
[flightgear.git] / src / Main / fg_init.cxx
index f12755289841ef145dc185eaa9099abaf3b577fe..a78638f0b0fbe18cdf650e3d532e50973dca9b1c 100644 (file)
@@ -70,6 +70,8 @@
 #include <Airports/runways.hxx>
 #include <Airports/simple.hxx>
 #include <ATC/ATCdisplay.hxx>
+#include <ATC/ATCmgr.hxx>
+#include <ATC/atislist.hxx>
 #include <Autopilot/auto_gui.hxx>
 #include <Autopilot/newauto.hxx>
 #include <Cockpit/cockpit.hxx>
@@ -79,7 +81,7 @@
 #include <FDM/ADA.hxx>
 #include <FDM/Balloon.h>
 #include <FDM/External.hxx>
-#include <FDM/JSBSim.hxx>
+#include <FDM/JSBSim/JSBSim.hxx>
 #include <FDM/LaRCsim.hxx>
 #include <FDM/MagicCarpet.hxx>
 #include <FDM/NullFDM.hxx>
 #ifndef FG_NEW_ENVIRONMENT
 #  include <WeatherCM/FGLocalWeatherDatabase.h>
 #else
-#  include <Environment/environment.hxx>
+#  include <Environment/environment_mgr.hxx>
 #endif
 
 #include "fg_init.hxx"
@@ -241,7 +243,7 @@ bool fgInitConfig ( int argc, char **argv ) {
       aircraft_path.append(aircraft);
       aircraft_path.concat("-set.xml");
       SG_LOG(SG_INPUT, SG_INFO, "Reading default aircraft: " << aircraft
-            << " from " << props_path.str());
+            << " from " << aircraft_path.str());
       try {
        readProperties(aircraft_path.str(), globals->get_props());
       } catch (const sg_exception &e) {
@@ -832,8 +834,8 @@ bool fgInitSubsystems( void ) {
     global_events.Register( "weather update", fgUpdateWeatherDatabase,
                             fgEVENT::FG_EVENT_READY, 30000);
 #else
-    current_environment.init();
-    current_environment.bind();
+    globals->get_environment_mgr()->init();
+    globals->get_environment_mgr()->bind();
 #endif
 
     ////////////////////////////////////////////////////////////////////
@@ -877,10 +879,17 @@ bool fgInitSubsystems( void ) {
     // Initialise ATC display system
     ////////////////////////////////////////////////////////////////////
 
-    //DCL
     SG_LOG(SG_GENERAL, SG_INFO, "  ATC Display");
-    current_atcdisplay = new FGATCDisplay;
-    current_atcdisplay->init();   
+    globals->set_ATC_display(new FGATCDisplay);
+    globals->get_ATC_display()->init(); 
+
+    ////////////////////////////////////////////////////////////////////
+    // Initialise the ATC Manager 
+    ////////////////////////////////////////////////////////////////////
+
+    SG_LOG(SG_GENERAL, SG_INFO, "  ATC Manager");
+    globals->set_ATC_mgr(new FGATCMgr);
+    globals->get_ATC_mgr()->init();     
 
     ////////////////////////////////////////////////////////////////////
     // Initialize the built-in commands.