]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/globals.cxx
Remove conditional compilation of ATCDCL
[flightgear.git] / src / Main / globals.cxx
index aa34a9660959819bc7b4309266ac4b346cb02828..c560f2765fc8e8889840b30e7982df55e7848d3c 100644 (file)
@@ -35,6 +35,7 @@
 #include <simgear/structure/event_mgr.hxx>
 #include <simgear/sound/soundmgr_openal.hxx>
 #include <simgear/misc/ResourceManager.hxx>
+#include <simgear/props/propertyObject.hxx>
 
 #include <Aircraft/controls.hxx>
 #include <Airports/runways.hxx>
@@ -122,8 +123,6 @@ FGGlobals::FGGlobals() :
     soundmgr( new SGSoundMgr ),
     sim_time_sec( 0.0 ),
     fg_root( "" ),
-    warp( 0 ),
-    warp_delta( 0 ),
     time_params( NULL ),
     ephem( NULL ),
     mag( NULL ),
@@ -150,6 +149,7 @@ FGGlobals::FGGlobals() :
     channellist( NULL )    
 {
   simgear::ResourceManager::instance()->addProvider(new AircraftResourceProvider());
+  simgear::PropertyObjectBase::setDefaultRoot(props);
 }
 
 
@@ -401,4 +401,24 @@ FGGlobals::get_current_view () const
   return viewmgr->get_current_view();
 }
 
+long int FGGlobals::get_warp() const
+{
+  return fgGetInt("/sim/time/warp");
+}
+
+void FGGlobals::set_warp( long int w )
+{
+  fgSetInt("/sim/time/warp", w);
+}
+
+long int FGGlobals::get_warp_delta() const
+{
+  return fgGetInt("/sim/time/warp-delta");
+}
+
+void FGGlobals::set_warp_delta( long int d )
+{
+  fgSetInt("/sim/time/warp-delta", d);
+}
+    
 // end of globals.cxx