]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/globals.cxx
Move the texture loader to SimGear
[flightgear.git] / src / Main / globals.cxx
index b8341e4c755e960e1fc90bfc7123585c6161fe63..34432d99b64c31489015d38e72d766e5c7bc979f 100644 (file)
@@ -42,18 +42,40 @@ FGGlobals *globals;
 
 // Constructor
 FGGlobals::FGGlobals() :
-    subsystem_mgr(new FGSubsystemMgr),
-    sim_time_sec(0.0),
+    subsystem_mgr( new FGSubsystemMgr ),
+    sim_time_sec( 0.0 ),
+    fg_root( "" ),
+    fg_scenery( "" ),
 #if defined(FX) && defined(XMESA)
     fullscreen( true ),
 #endif
     warp( 0 ),
     warp_delta( 0 ),
-    props(new SGPropertyNode),
-    initial_state(0),
-    locale(NULL),
-    commands(new SGCommandMgr),
-    io(new FGIO)
+    time_params( NULL ),
+    ephem( NULL ),
+    mag( NULL ),
+    autopilot( NULL ),
+    route( NULL ),
+    soundmgr( NULL ),
+    current_panel( NULL ),
+    environment_mgr( NULL ),
+    ATC_mgr( NULL ),
+    ATC_display( NULL ),
+    AI_mgr( NULL ),
+    controls( NULL ),
+    viewmgr( NULL ),
+    props( new SGPropertyNode ),
+    initial_state( NULL ),
+    locale( NULL ),
+    commands( new SGCommandMgr ),
+    model_loader( NULL ),
+    texture_loader( NULL ),
+    acmodel( NULL ),
+    model_mgr( NULL ),
+    channel_options_list( NULL ),
+    scenery( NULL ),
+    tile_mgr( NULL ),
+    io( new FGIO )
 {
 }
 
@@ -69,6 +91,28 @@ FGGlobals::~FGGlobals()
 }
 
 
+FGSubsystemMgr *
+FGGlobals::get_subsystem_mgr () const
+{
+    return subsystem_mgr;
+}
+
+FGSubsystem *
+FGGlobals::get_subsystem (const char * name)
+{
+    return subsystem_mgr->get_subsystem(name);
+}
+
+void
+FGGlobals::add_subsystem (const char * name,
+                          FGSubsystem * subsystem,
+                          FGSubsystemMgr::GroupType type,
+                          double min_time_sec)
+{
+    subsystem_mgr->add(name, subsystem, type, min_time_sec);
+}
+
+
 // Save the current state as the initial state.
 void
 FGGlobals::saveInitialState ()