#include <simgear/misc/commands.hxx>
-
-#include <Environment/environment_mgr.hxx>
+#include <simgear/misc/sg_path.hxx>
#include "globals.hxx"
#include "viewmgr.hxx"
mag( NULL ),
autopilot( NULL ),
route( NULL ),
+ current_panel( NULL ),
soundmgr( NULL ),
- environment_mgr( NULL ),
ATC_mgr( NULL ),
ATC_display( NULL ),
AI_mgr( NULL ),
controls( NULL ),
- steam( NULL ),
viewmgr( NULL ),
props( new SGPropertyNode ),
initial_state( NULL ),
locale( NULL ),
commands( new SGCommandMgr ),
- model_loader( NULL ),
- texture_loader( NULL ),
+ model_lib( NULL ),
acmodel( NULL ),
model_mgr( NULL ),
channel_options_list( NULL ),
}
+// set the fg_root path
+void FGGlobals::set_fg_root (const string &root) {
+ fg_root = root;
+
+ // append /data to root if it exists
+ SGPath tmp( fg_root );
+ tmp.append( "data" );
+ tmp.append( "version" );
+ if ( ulFileExists( tmp.c_str() ) ) {
+ fg_root += "/data";
+ }
+}
+
+
+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 ()