Root path info moved to fgOPTIONS.
This commit is contained in:
parent
143a8d7c6b
commit
37df3de51d
6 changed files with 57 additions and 40 deletions
|
@ -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 = ¤t_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!
|
||||
*
|
||||
|
|
|
@ -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 = ¤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");
|
||||
|
||||
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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 = ¤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);
|
||||
|
@ -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.
|
||||
|
|
|
@ -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 = ¤t_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 = ¤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");
|
||||
|
||||
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -35,10 +35,9 @@
|
|||
#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 = ¤t_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.
|
||||
*
|
||||
|
|
|
@ -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 = ¤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
|
||||
|
@ -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.
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue