]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_props.cxx
Added options to set up avionics from the command line:
[flightgear.git] / src / Main / fg_props.cxx
index de3e11d26ff01761969ce54a0294ce625ae53f90..770ca620ea91c281920b2277b6a4418bbdfada57 100644 (file)
@@ -28,6 +28,7 @@
 #include <simgear/magvar/magvar.hxx>
 #include <simgear/timing/sg_time.hxx>
 #include <simgear/misc/sg_path.hxx>
+#include <simgear/scene/material/matlib.hxx>
 #include <simgear/sound/soundmgr.hxx>
 
 #include STL_IOSTREAM
@@ -41,7 +42,6 @@
 #else
 #  include <Environment/environment.hxx>
 #endif // FG_WEATHERCM
-#include <Objects/matlib.hxx>
 
 #include <GUI/gui.h>
 
@@ -352,29 +352,6 @@ getGMTString ()
 }
 
 
-/**
- * Get the texture rendering state.
- */
-static bool
-getTextures ()
-{
-  return (material_lib.get_step() == 0);
-}
-
-
-/**
- * Set the texture rendering state.
- */
-static void
-setTextures (bool textures)
-{
-  if (textures)
-    material_lib.set_step(0);
-  else
-    material_lib.set_step(1);
-}
-
-
 /**
  * Return the magnetic variation
  */
@@ -401,7 +378,10 @@ getMagDip ()
 static double
 getHeadingMag ()
 {
-  return current_aircraft.fdm_state->get_Psi() * SGD_RADIANS_TO_DEGREES - getMagVar();
+  double magheading;
+  magheading = current_aircraft.fdm_state->get_Psi() * SGD_RADIANS_TO_DEGREES - getMagVar();
+  if (magheading < 0) magheading += 360;
+  return magheading;
 }
 
 
@@ -589,7 +569,6 @@ fgInitProps ()
   fgTie("/sim/time/gmt", getDateString, setDateString);
   fgSetArchivable("/sim/time/gmt");
   fgTie("/sim/time/gmt-string", getGMTString);
-  fgTie("/sim/rendering/textures", getTextures, setTextures);
 
                                // Orientation
   fgTie("/orientation/heading-magnetic-deg", getHeadingMag);