]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_init.cxx
Interim windows build fix
[flightgear.git] / src / Main / fg_init.cxx
index 6e803d94f05b069bca32b6879d290a88aa670479..572ca446a42382cdfca74ba6b032b3c9d1828979 100644 (file)
@@ -80,6 +80,7 @@
 #include <Airports/runways.hxx>
 #include <Airports/airport.hxx>
 #include <Airports/dynamics.hxx>
+#include <Airports/airportdynamicsmanager.hxx>
 
 #include <AIModel/AIManager.hxx>
 
@@ -690,7 +691,7 @@ void fgCreateSubsystems(bool duringReset) {
     // to be updated in every loop.
     // Sound manager is updated last so it can use the CPU while the GPU
     // is processing the scenery (doubled the frame-rate for me) -EMH-
-    globals->add_subsystem("sound", new FGSoundManager, SGSubsystemMgr::SOUND);
+    globals->add_new_subsystem<FGSoundManager>(SGSubsystemMgr::SOUND);
 
     ////////////////////////////////////////////////////////////////////
     // Initialize the event manager subsystem.
@@ -712,6 +713,11 @@ void fgCreateSubsystems(bool duringReset) {
     globals->add_subsystem("properties", new FGProperties);
 
 
+    ////////////////////////////////////////////////////////////////////
+    // Add the FlightGear property utilities.
+    ////////////////////////////////////////////////////////////////////
+    globals->add_new_subsystem<flightgear::AirportDynamicsManager>();
+
     ////////////////////////////////////////////////////////////////////
     // Add the performance monitoring system.
     ////////////////////////////////////////////////////////////////////
@@ -773,7 +779,7 @@ void fgCreateSubsystems(bool duringReset) {
 
     globals->add_subsystem( "xml-autopilot", FGXMLAutopilotGroup::createInstance("autopilot"), SGSubsystemMgr::FDM );
     globals->add_subsystem( "xml-proprules", FGXMLAutopilotGroup::createInstance("property-rule"), SGSubsystemMgr::GENERAL );
-    globals->add_subsystem( "route-manager", new FGRouteMgr );
+    globals->add_new_subsystem<FGRouteMgr>();
 
     ////////////////////////////////////////////////////////////////////
     // Initialize the Input-Output subsystem
@@ -843,7 +849,7 @@ void fgCreateSubsystems(bool duringReset) {
     // Initialize the controls subsystem.
     ////////////////////////////////////////////////////////////////////
     
-    globals->add_subsystem("controls", new FGControls, SGSubsystemMgr::GENERAL);
+    globals->add_new_subsystem<FGControls>(SGSubsystemMgr::GENERAL);
 
     ////////////////////////////////////////////////////////////////////
     // Initialize the input subsystem.
@@ -891,10 +897,7 @@ void fgCreateSubsystems(bool duringReset) {
     globals->add_subsystem("aircraft-model", new FGAircraftModel, SGSubsystemMgr::DISPLAY);
     globals->add_subsystem("model-manager", new FGModelMgr, SGSubsystemMgr::DISPLAY);
 
-    globals->add_subsystem("view-manager", new FGViewMgr, SGSubsystemMgr::DISPLAY);
-
-    globals->add_subsystem("tile-manager", globals->get_tile_mgr(), 
-      SGSubsystemMgr::DISPLAY);
+    globals->add_new_subsystem<FGViewMgr>(SGSubsystemMgr::DISPLAY);
 }
 
 void fgPostInitSubsystems()
@@ -1021,7 +1024,7 @@ void fgStartNewReset()
         string_list::const_iterator it;
         for (it = names.begin(); it != names.end(); ++it) {
             if ((*it == "time") || (*it == "terrasync") || (*it == "events")
-                || (*it == "lighting"))
+                || (*it == "lighting") || (*it == FGTileMgr::subsystemName()) || (*it == FGScenery::subsystemName()))
             {
                 continue;
             }
@@ -1044,8 +1047,9 @@ void fgStartNewReset()
     
     // order is important here since tile-manager shutdown needs to
     // access the scenery object
-    globals->set_tile_mgr(NULL);
-    globals->set_scenery(NULL);
+    subsystemManger->remove(FGTileMgr::subsystemName());
+    subsystemManger->remove(FGScenery::subsystemName());
+
     FGScenery::getPagerSingleton()->clearRequests();
     flightgear::CameraGroup::setDefault(NULL);