]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_props.cxx
Stuart Buchanan:
[flightgear.git] / src / Main / fg_props.cxx
index 66a9086fb7b13e5c64472209e305280f597a4842..9c32d1d11276e50819644d97c634a47bd349ed4b 100644 (file)
 #include <simgear/timing/sg_time.hxx>
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/scene/material/matlib.hxx>
-#include <simgear/sound/soundmgr.hxx>
+#include <simgear/sound/soundmgr_openal.hxx>
 
 #include STL_IOSTREAM
 
 #include <ATC/ATCdisplay.hxx>
 #include <Aircraft/aircraft.hxx>
 #include <Time/tmp.hxx>
-#include <FDM/UIUCModel/uiuc_aircraftdir.h>
 #include <Environment/environment.hxx>
 
 #include <GUI/gui.h>
@@ -82,6 +81,8 @@ LogClassMapping log_class_mappings [] = {
   LogClassMapping(SG_IO, "io"),
   LogClassMapping(SG_CLIPPER, "clipper"),
   LogClassMapping(SG_NETWORK, "network"),
+  LogClassMapping(SG_INSTR, "instrumentation"),
+  LogClassMapping(SG_SYSTEMS, "systems"),
   LogClassMapping(SG_UNDEFD, "")
 };
 
@@ -236,26 +237,6 @@ setFreeze (bool f)
 }
 
 
-/**
- * Return the current aircraft directory (UIUC) as a string.
- */
-static const char *
-getAircraftDir ()
-{
-  return aircraft_dir.c_str();
-}
-
-
-/**
- * Set the current aircraft directory (UIUC).
- */
-static void
-setAircraftDir (const char * dir)
-{
-  aircraft_dir = dir;
-}
-
-
 /**
  * Return the number of milliseconds elapsed since simulation started.
  */
@@ -475,7 +456,6 @@ FGProperties::bind ()
   fgTie("/sim/logging/priority", getLoggingPriority, setLoggingPriority);
   fgTie("/sim/logging/classes", getLoggingClasses, setLoggingClasses);
   fgTie("/sim/freeze/master", getFreeze, setFreeze);
-  fgTie("/sim/aircraft-dir", getAircraftDir, setAircraftDir);
 
   fgTie("/sim/time/elapsed-sec", getElapsedTime_sec);
   fgTie("/sim/time/gmt", getDateString, setDateString);
@@ -504,7 +484,6 @@ FGProperties::unbind ()
   fgUntie("/sim/logging/priority");
   fgUntie("/sim/logging/classes");
   fgUntie("/sim/freeze/master");
-  fgUntie("/sim/aircraft-dir");
 
   fgUntie("/sim/time/elapsed-sec");
   fgUntie("/sim/time/gmt");
@@ -530,7 +509,7 @@ void
 FGProperties::update (double dt)
 {
                                 // Date and time
-    struct tm * t = globals->get_time_params()->getGmt();
+    struct tm *t = globals->get_time_params()->getGmt();
 
     fgSetInt("/sim/time/utc/year", t->tm_year + 1900);
     fgSetInt("/sim/time/utc/month", t->tm_mon + 1);
@@ -543,6 +522,9 @@ FGProperties::update (double dt)
                 t->tm_hour * 3600 +
                 t->tm_min * 60 +
                 t->tm_sec);
+
+    fgSetInt("/sim/time/local-offset",
+             globals->get_time_params()->get_local_offset());
 }
 
 
@@ -603,7 +585,7 @@ fgLoadFlight (istream &input)
 
 
 bool
-fgLoadProps (const char * path, SGPropertyNode * props, bool in_fg_root)
+fgLoadProps (const char * path, SGPropertyNode * props, bool in_fg_root, int default_mode)
 {
     string fullpath;
     if (in_fg_root) {
@@ -615,7 +597,7 @@ fgLoadProps (const char * path, SGPropertyNode * props, bool in_fg_root)
     }
 
     try {
-        readProperties(fullpath, props);
+        readProperties(fullpath, props, default_mode);
     } catch (const sg_exception &e) {
         guiErrorMessage("Error reading properties: ", e);
         return false;