]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_init.cxx
set /sim/fg-home in analogy to /sim/fg-root. This is useful for various
[flightgear.git] / src / Main / fg_init.cxx
index 834c2dc6cf7536591a80375ad5f86104c0f1a88a..73217c25835c3797218223e3a5ec0f35bb9acd07 100644 (file)
 #include <Scenery/scenery.hxx>
 #include <Scenery/tilemgr.hxx>
 #include <Scripting/NasalSys.hxx>
+#include <Scripting/NasalDisplay.hxx>
 #include <Sound/fg_fx.hxx>
 #include <Sound/beacon.hxx>
 #include <Sound/morse.hxx>
+#include <Sound/voice.hxx>
 #include <Systems/system_mgr.hxx>
 #include <Time/light.hxx>
 #include <Time/sunsolver.hxx>
@@ -522,7 +524,7 @@ static string fgFindAircraftPath( const SGPath &path, const string &aircraft ) {
     while ((dire = ulReadDir(dirp)) != NULL) {
         if (dire->d_isdir) {
             if ( strcmp("CVS", dire->d_name) && strcmp(".", dire->d_name)
-                 && strcmp("..", dire->d_name) )
+                 && strcmp("..", dire->d_name) && strcmp("AI", dire->d_name))
             {
                 SGPath next = path;
                 next.append(dire->d_name);
@@ -605,15 +607,16 @@ bool fgInitConfig ( int argc, char **argv ) {
         SGPath config( homedir );
         config.append( ".fgfs" );
 #endif
-        config.append( "preferences.xml" );
-        SG_LOG(SG_INPUT, SG_INFO, "Reading user preferences");
+        fgSetString("/sim/fg-home", config.c_str());
+        config.append( "autosave.xml" );
+        SG_LOG(SG_INPUT, SG_INFO, "Reading user settings from autosave.xml");
         try {
             fgLoadProps(config.str().c_str(), globals->get_props(), false,
                         SGPropertyNode::USERARCHIVE);
         } catch (...) {
-            SG_LOG(SG_INPUT, SG_BULK, "First time reading user preferences.");
+            SG_LOG(SG_INPUT, SG_BULK, "First time reading user settings");
         }
-        SG_LOG(SG_INPUT, SG_BULK, "Finished Reading user preferences");
+        SG_LOG(SG_INPUT, SG_BULK, "Finished Reading user settings");
     }
 
     // parse options after loading aircraft to ensure any user
@@ -1676,7 +1679,7 @@ bool fgInitSubsystems() {
     ////////////////////////////////////////////////////////////////////
 
     globals->add_subsystem("fx", new FGFX);
-    
+    globals->add_subsystem("voice", new FGVoiceMgr);
 #endif
 
     ////////////////////////////////////////////////////////////////////
@@ -1758,6 +1761,14 @@ bool fgInitSubsystems() {
     globals->get_io()->bind();
 
 
+    ////////////////////////////////////////////////////////////////////
+    // Initialise Nasal display system
+    ////////////////////////////////////////////////////////////////////
+
+    SG_LOG(SG_GENERAL, SG_INFO, "  Nasal Display");
+    globals->set_Nasal_display(new FGNasalDisplay);
+    globals->get_Nasal_display()->init(); 
+
     ////////////////////////////////////////////////////////////////////
     // Add a new 2D panel.
     ////////////////////////////////////////////////////////////////////