]> git.mxchange.org Git - simgear.git/blobdiff - Astro/orbits.cxx
Root path info moved to fgOPTIONS.
[simgear.git] / Astro / orbits.cxx
index 40ff471fa717a02155aec9ad6d880b02386344ff..bf30e94a7ebf9b0c09d3c11a895320d6fbf1b727 100644 (file)
  **************************************************************************/
 
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
 
 #include <math.h>
 #include <string.h>
 
 #include <Debug/fg_debug.h>
 #include <Include/fg_constants.h>
-#include <Include/general.h>
-#include <Time/fg_time.h>
+#include <Main/options.hxx>
+#include <Time/fg_time.hxx>
 
 #include "orbits.hxx"
 
@@ -39,7 +41,7 @@
 struct OrbElements pltOrbElements[9];
 
 
-double fgCalcActTime(struct fgTIME t)
+double fgCalcActTime(fgTIME t)
 {
   return (t.mjd - 36523.5);
 }
@@ -109,9 +111,9 @@ int fgReadOrbElements(struct OrbElements *dest, FILE *src)
 }
 
 
-int fgSolarSystemInit(struct fgTIME t)
+int fgSolarSystemInit(fgTIME t)
 {
-    fgGENERAL *g;
+    fgOPTIONS *o;
     char path[80];
     int i;
     FILE *data;
@@ -119,10 +121,10 @@ int fgSolarSystemInit(struct fgTIME t)
 
     fgPrintf( FG_ASTRO, FG_INFO, "Initializing solar system\n");
 
-   /* build the full path name to the orbital elements database file */
-    g = &general;
+    /* build the full path name to the orbital elements database file */
+    o = &current_options;
     path[0] = '\0';
-    strcat(path, g->root_dir);
+    strcat(path, o->fg_root);
     strcat(path, "/Scenery/");
     strcat(path, "Planets.dat");
 
@@ -150,7 +152,7 @@ int fgSolarSystemInit(struct fgTIME t)
 }
 
 
-void fgSolarSystemUpdate(struct OrbElements *planet, struct fgTIME t)
+void fgSolarSystemUpdate(struct OrbElements *planet, fgTIME t)
 {
    double
          actTime;
@@ -168,9 +170,22 @@ void fgSolarSystemUpdate(struct OrbElements *planet, struct fgTIME t)
 
 
 /* $Log$
-/* Revision 1.1  1998/04/22 13:21:29  curt
-/* C++ - ifing the code a bit.
+/* Revision 1.5  1998/05/13 18:25:34  curt
+/* Root path info moved to fgOPTIONS.
 /*
+ * Revision 1.4  1998/04/28 01:19:00  curt
+ * Type-ified fgTIME and fgVIEW
+ *
+ * Revision 1.3  1998/04/25 22:06:25  curt
+ * Edited cvs log messages in source files ... bad bad bad!
+ *
+ * Revision 1.2  1998/04/24 00:45:01  curt
+ * Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
+ * Fixed a bug when generating sky colors.
+ *
+ * Revision 1.1  1998/04/22 13:21:29  curt
+ * C++ - ifing the code a bit.
+ *
  * Revision 1.10  1998/04/18 04:13:57  curt
  * Moved fg_debug.c to it's own library.
  *
@@ -196,7 +211,7 @@ void fgSolarSystemUpdate(struct OrbElements *planet, struct fgTIME t)
  * To version 0.29
  *
  * Revision 1.4  1998/01/27 00:47:47  curt
- * Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
+ * Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
  * system and commandline/config file processing code.
  *
  * Revision 1.3  1998/01/22 02:59:27  curt