#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"
int fgSolarSystemInit(fgTIME t)
{
- fgGENERAL *g;
+ fgOPTIONS *o;
char path[80];
int i;
FILE *data;
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 = ¤t_options;
path[0] = '\0';
- strcat(path, g->root_dir);
+ strcat(path, o->fg_root);
strcat(path, "/Scenery/");
strcat(path, "Planets.dat");
/* $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!
*
#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>
/* 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];
fgPrintf( FG_ASTRO, FG_INFO, "Initializing stars\n");
- g = &general;
+ o = ¤t_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");
/* $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.
*
#include <string.h>
#include <Debug/fg_debug.h>
-#include <Include/general.h>
#include <Include/fg_zlib.h>
+#include <Main/options.hxx>
#include "airports.hxx"
// 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 = ¤t_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);
// $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.
#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>
/* 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 = ¤t_options;
fgPrintf(FG_TERRAIN, FG_INFO, "Initializing scenery subsystem\n");
/* 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");
/* 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 = ¤t_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");
/* $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.
*
#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"
/* 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 = ¤t_options;
/* Mark this cache entry as used */
tile_cache[index].used = 1;
/* 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,
/* $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.
*
#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>
// 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 = ¤t_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
// 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
// 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
// $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.
//