]> git.mxchange.org Git - flightgear.git/commitdiff
Root path info moved to fgOPTIONS.
authorcurt <curt>
Wed, 13 May 1998 18:25:34 +0000 (18:25 +0000)
committercurt <curt>
Wed, 13 May 1998 18:25:34 +0000 (18:25 +0000)
Astro/orbits.cxx
Astro/stars.cxx
Main/airports.cxx
Scenery/scenery.cxx
Scenery/tilecache.cxx
Time/light.cxx

index df8f94d06458820bfdda03db907de4f21f6e2191..bf30e94a7ebf9b0c09d3c11a895320d6fbf1b727 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <Debug/fg_debug.h>
 #include <Include/fg_constants.h>
-#include <Include/general.h>
+#include <Main/options.hxx>
 #include <Time/fg_time.hxx>
 
 #include "orbits.hxx"
@@ -113,7 +113,7 @@ int fgReadOrbElements(struct OrbElements *dest, FILE *src)
 
 int fgSolarSystemInit(fgTIME t)
 {
-    fgGENERAL *g;
+    fgOPTIONS *o;
     char path[80];
     int i;
     FILE *data;
@@ -121,10 +121,10 @@ int fgSolarSystemInit(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");
 
@@ -170,9 +170,12 @@ void fgSolarSystemUpdate(struct OrbElements *planet, fgTIME t)
 
 
 /* $Log$
-/* Revision 1.4  1998/04/28 01:19:00  curt
-/* Type-ified fgTIME and fgVIEW
+/* 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!
  *
index a7ba50f3e7a084dd2e5d280507666345be7a4fef..e587e5bd8e34e75c6a5543724fddcf8e9667995b 100644 (file)
@@ -43,7 +43,7 @@
 #include <Aircraft/aircraft.h>
 #include <Debug/fg_debug.h>
 #include <Include/fg_constants.h>
-#include <Include/general.h>
+#include <Main/options.hxx>
 #include <Main/views.hxx>
 #include <Time/fg_time.hxx>
 
@@ -63,7 +63,7 @@
 /* Initialize the Star Management Subsystem */
 int fgStarsInit( void ) {
     FILE *fd;
-    fgGENERAL *g;
+    fgOPTIONS *o;
     /* struct CelestialCoord pltPos; */
     char path[1024];
     char line[256], name[256];
@@ -75,11 +75,11 @@ int fgStarsInit( void ) {
 
     fgPrintf( FG_ASTRO, FG_INFO, "Initializing stars\n");
 
-    g = &general;
+    o = &current_options;
 
     /* build the full path name to the stars data base file */
     path[0] = '\0';
-    strcat(path, g->root_dir);
+    strcat(path, o->fg_root);
     strcat(path, "/Scenery/");
     strcat(path, "Stars.dat");
 
@@ -260,9 +260,12 @@ void fgStarsRender( void ) {
 
 
 /* $Log$
-/* Revision 1.5  1998/04/28 01:19:03  curt
-/* Type-ified fgTIME and fgVIEW
+/* Revision 1.6  1998/05/13 18:25:35  curt
+/* Root path info moved to fgOPTIONS.
 /*
+ * Revision 1.5  1998/04/28 01:19:03  curt
+ * Type-ified fgTIME and fgVIEW
+ *
  * Revision 1.4  1998/04/26 05:10:02  curt
  * "struct fgLIGHT" -> "fgLIGHT" because fgLIGHT is typedef'd.
  *
index d64da23ccc016790ed5f71230d04db40a371b185..f6e4aa3436514fb1211a7f39fde9e4405dabff9d 100644 (file)
@@ -28,8 +28,8 @@
 #include <string.h>
 
 #include <Debug/fg_debug.h>
-#include <Include/general.h>
 #include <Include/fg_zlib.h>
+#include <Main/options.hxx>
 
 #include "airports.hxx"
 
@@ -41,17 +41,17 @@ fgAIRPORTS::fgAIRPORTS( void ) {
 
 // load the data
 int fgAIRPORTS::load( char *file ) {
-    fgGENERAL *g;
+    fgOPTIONS *o;
     char path[256], fgpath[256], line[256];
     char id[5];
     double lon, lat, elev;
     fgFile f;
 
-    g = &general;
+    o = &current_options;
 
     // build the path name to the ambient lookup table
     path[0] = '\0';
-    strcat(path, g->root_dir);
+    strcat(path, o->fg_root);
     strcat(path, "/Scenery/");
     strcat(path, "Airports");
     strcpy(fgpath, path);
@@ -111,6 +111,9 @@ fgAIRPORTS::~fgAIRPORTS( void ) {
 
 
 // $Log$
+// Revision 1.4  1998/05/13 18:26:25  curt
+// Root path info moved to fgOPTIONS.
+//
 // Revision 1.3  1998/05/06 03:16:24  curt
 // Added an averaged global frame rate counter.
 // Added an option to control tile radius.
index 45529f509668a6729e26b9530dc8995270dbad65..a668c1f9293d8b9491018343a5cada40bfed947f 100644 (file)
@@ -40,7 +40,7 @@
 #include <string.h>
 
 #include <Debug/fg_debug.h>
-#include <Include/general.h>
+#include <Main/options.hxx>
 #include <Scenery/obj.hxx>
 #include <Scenery/scenery.hxx>
 #include <Scenery/texload.h>
@@ -56,12 +56,12 @@ struct fgSCENERY scenery;
 
 /* Initialize the Scenery Management system */
 int fgSceneryInit( void ) {
-    fgGENERAL *g;
+    fgOPTIONS *o;
     char path[1024], fgpath[1024];
     GLubyte *texbuf;
     int width, height;
 
-    g = &general;
+    o = &current_options;
 
     fgPrintf(FG_TERRAIN, FG_INFO, "Initializing scenery subsystem\n");
 
@@ -70,7 +70,7 @@ int fgSceneryInit( void ) {
 
     /* temp: load in a demo texture */
     path[0] = '\0';
-    strcat(path, g->root_dir);
+    strcat(path, o->fg_root);
     strcat(path, "/Textures/");
     strcat(path, "desert.rgb");
 
@@ -96,18 +96,18 @@ int fgSceneryInit( void ) {
 /* Tell the scenery manager where we are so it can load the proper data, and
  * build the proper structures. */
 void fgSceneryUpdate(double lon, double lat, double elev) {
-    fgGENERAL *g;
+    fgOPTIONS *o;
     double max_radius;
     char path[1024];
 
-    g = &general;
+    o = &current_options;
 
     /* a hardcoded hack follows */
 
     /* this routine should parse the file, and make calls back to the
      * scenery management system to build the appropriate structures */
     path[0] = '\0';
-    strcat(path, g->root_dir);
+    strcat(path, o->fg_root);
     strcat(path, "/Scenery/");
     strcat(path, "mesa-e.obj");
 
@@ -123,10 +123,13 @@ void fgSceneryRender( void ) {
 
 
 /* $Log$
-/* Revision 1.3  1998/05/07 23:15:20  curt
-/* Fixed a glTexImage2D() usage bug where width and height were mis-swapped.
-/* Added support for --tile-radius=n option.
+/* Revision 1.4  1998/05/13 18:26:40  curt
+/* Root path info moved to fgOPTIONS.
 /*
+ * Revision 1.3  1998/05/07 23:15:20  curt
+ * Fixed a glTexImage2D() usage bug where width and height were mis-swapped.
+ * Added support for --tile-radius=n option.
+ *
  * Revision 1.2  1998/05/02 01:52:16  curt
  * Playing around with texture coordinates.
  *
index 98f6e0d46720f819e9ad7569a0a7421259fb64a1..dc1bb32001cc1608380dcc7b8e8c1831dd5d6e4c 100644 (file)
 #include <GL/glut.h>
 #include <XGL/xgl.h>
 
-#include <Include/general.h>
-
 #include <Bucket/bucketutils.h>
 #include <Debug/fg_debug.h>
+#include <Main/options.hxx>
 #include <Main/views.hxx>
 
 #include "obj.hxx"
@@ -85,11 +84,11 @@ int fgTileCacheExists( struct fgBUCKET *p ) {
 
 /* Fill in a tile cache entry with real data for the specified bucket */
 void fgTileCacheEntryFillIn( int index, struct fgBUCKET *p ) {
-    fgGENERAL *g;
+    fgOPTIONS *o;
     char base_path[256];
     char file_name[256];
 
-    g = &general;
+    o = &current_options;
 
     /* Mark this cache entry as used */
     tile_cache[index].used = 1;
@@ -102,7 +101,7 @@ void fgTileCacheEntryFillIn( int index, struct fgBUCKET *p ) {
 
     /* Load the appropriate area and get the display list pointer */
     fgBucketGenBasePath(p, base_path);
-    sprintf(file_name, "%s/Scenery/%s/%ld", g->root_dir
+    sprintf(file_name, "%s/Scenery/%s/%ld", o->fg_root
            base_path, fgBucketGenIndex(p));
     tile_cache[index].display_list = 
        fgObjLoad(file_name, &tile_cache[index].local_ref,
@@ -200,9 +199,12 @@ int fgTileCacheNextAvail( void ) {
 
 
 /* $Log$
-/* Revision 1.6  1998/05/02 01:52:17  curt
-/* Playing around with texture coordinates.
+/* Revision 1.7  1998/05/13 18:26:41  curt
+/* Root path info moved to fgOPTIONS.
 /*
+ * Revision 1.6  1998/05/02 01:52:17  curt
+ * Playing around with texture coordinates.
+ *
  * Revision 1.5  1998/04/30 12:35:31  curt
  * Added a command line rendering option specify smooth/flat shading.
  *
index 585ebff21680de6e80ea2fa2b0e7378c308682d9..c829e9e6596f3b5dcd9a03c2688a190f2d7db29a 100644 (file)
@@ -37,7 +37,7 @@
 
 #include <Debug/fg_debug.h>
 #include <Include/fg_constants.h>
-#include <Include/general.h>
+#include <Main/options.hxx>
 #include <Main/views.hxx>
 #include <Math/fg_geodesy.h>
 #include <Math/interpolater.hxx>
@@ -58,17 +58,17 @@ static fgINTERPTABLE *sky_tbl;
 
 // initialize lighting tables
 void fgLightInit( void ) {
-    fgGENERAL *g;
+    fgOPTIONS *o;
     char path[256];
 
     fgPrintf( FG_EVENT, FG_INFO, 
             "Initializing Lighting interpolation tables.\n" );
 
-    g = &general;
+    o = &current_options;
 
     // build the path name to the ambient lookup table
     path[0] = '\0';
-    strcat(path, g->root_dir);
+    strcat(path, o->fg_root);
     strcat(path, "/Scenery/");
     strcat(path, "Ambient.table");
     // initialize ambient table
@@ -76,7 +76,7 @@ void fgLightInit( void ) {
 
     // build the path name to the diffuse lookup table
     path[0] = '\0';
-    strcat(path, g->root_dir);
+    strcat(path, o->fg_root);
     strcat(path, "/Scenery/");
     strcat(path, "Diffuse.table");
     // initialize diffuse table
@@ -84,7 +84,7 @@ void fgLightInit( void ) {
     
     // build the path name to the sky lookup table
     path[0] = '\0';
-    strcat(path, g->root_dir);
+    strcat(path, o->fg_root);
     strcat(path, "/Scenery/");
     strcat(path, "Sky.table");
     // initialize sky table
@@ -158,6 +158,9 @@ void fgLightUpdate( void ) {
 
 
 // $Log$
+// Revision 1.7  1998/05/13 18:26:50  curt
+// Root path info moved to fgOPTIONS.
+//
 // Revision 1.6  1998/05/11 18:18:51  curt
 // Made fog color slightly bluish.
 //