]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/globals.cxx
Bernie Bright:
[flightgear.git] / src / Main / globals.cxx
index 15c898998eacbebf1553a975152fc5b481fa1b9e..6d1a7bf340a80f22870f444cdc88fc61798e742c 100644 (file)
 #include <Environment/environment_mgr.hxx>
 
 #include "globals.hxx"
-#include "fg_props.hxx"
+#include "viewmgr.hxx"
 
+#include "fg_props.hxx"
+#include "fg_io.hxx"
 
 \f
 ////////////////////////////////////////////////////////////////////////
@@ -40,7 +42,7 @@ FGGlobals *globals;
 
 // Constructor
 FGGlobals::FGGlobals() :
-    elapsed_time_ms(0L),
+    sim_time_sec(0.0),
 #if defined(FX) && defined(XMESA)
     fullscreen( true ),
 #endif
@@ -49,7 +51,8 @@ FGGlobals::FGGlobals() :
     logger(0),
     props(new SGPropertyNode),
     initial_state(0),
-    commands(new SGCommandMgr)
+    commands(new SGCommandMgr),
+    io(new FGIO)
 {
 }
 
@@ -60,6 +63,7 @@ FGGlobals::~FGGlobals()
   delete initial_state;
   delete props;
   delete commands;
+  delete io;
 }
 
 
@@ -88,17 +92,10 @@ FGGlobals::restoreInitialState ()
   }
 }
 
-const FGEnvironment *
-FGGlobals::get_environment () const
-{
-  return environment_mgr->getEnvironment();
-}
-
-const FGEnvironment *
-FGGlobals::get_environment (double lat, double lon, double alt) const
+FGViewer *
+FGGlobals::get_current_view () const
 {
-  return environment_mgr->getEnvironment(lat, lon, alt);
+  return viewmgr->get_current_view();
 }
 
-
 // end of globals.cxx