From: curt Date: Fri, 24 Apr 1998 00:51:07 +0000 (+0000) Subject: Wrapped "#include " in "#ifdef HAVE_CONFIG_H" X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=10fb3d1a0c0c231e926ca29f7fd6aec1b796046f;p=flightgear.git Wrapped "#include " in "#ifdef HAVE_CONFIG_H" Tweaked the scenery file extentions to be "file.obj" (uncompressed) or "file.obz" (compressed.) --- diff --git a/Scenery/obj.c b/Scenery/obj.c index 0c1374b2d..822167c17 100644 --- a/Scenery/obj.c +++ b/Scenery/obj.c @@ -25,7 +25,9 @@ **************************************************************************/ -#include +#ifdef HAVE_CONFIG_H +# include +#endif #ifdef HAVE_WINDOWS_H # include @@ -102,11 +104,12 @@ GLint fgObjLoad(char *path, struct fgCartesianPoint *ref, double *radius) { int winding; int last1, last2, odd; - // First try "path.gz" + // First try "path.obz" (compressed format) strcpy(gzpath, path); - strcat(gzpath, ".gz"); + strcat(gzpath, ".obz"); if ( (f = gzopen(gzpath, "r")) == NULL ) { - // Next try "path" + // Next try "path.obj" (uncompressed format) + strcat(path, ".obj"); if ( (f = gzopen(path, "r")) == NULL ) { fgPrintf(FG_TERRAIN, FG_ALERT, "Cannot open file: %s\n", path); return(-1); @@ -398,9 +401,14 @@ GLint fgObjLoad(char *path, struct fgCartesianPoint *ref, double *radius) { /* $Log$ -/* Revision 1.28 1998/04/22 13:22:44 curt -/* C++ - ifing the code a bit. +/* Revision 1.29 1998/04/24 00:51:07 curt +/* Wrapped "#include " in "#ifdef HAVE_CONFIG_H" +/* Tweaked the scenery file extentions to be "file.obj" (uncompressed) +/* or "file.obz" (compressed.) /* + * Revision 1.28 1998/04/22 13:22:44 curt + * C++ - ifing the code a bit. + * * Revision 1.27 1998/04/18 04:13:17 curt * Added zlib on the fly decompression support for loading scenery objects. * diff --git a/Scenery/obj.h b/Scenery/obj.h index aa601c3d8..c3c1f5b01 100644 --- a/Scenery/obj.h +++ b/Scenery/obj.h @@ -28,7 +28,9 @@ #define _OBJ_H -#include +#ifdef HAVE_CONFIG_H +# include +#endif #ifdef HAVE_WINDOWS_H # include @@ -57,9 +59,14 @@ GLint fgObjLoad(char *path, struct fgCartesianPoint *ref, double *radius); /* $Log$ -/* Revision 1.9 1998/04/22 13:22:45 curt -/* C++ - ifing the code a bit. +/* Revision 1.10 1998/04/24 00:51:07 curt +/* Wrapped "#include " in "#ifdef HAVE_CONFIG_H" +/* Tweaked the scenery file extentions to be "file.obj" (uncompressed) +/* or "file.obz" (compressed.) /* + * Revision 1.9 1998/04/22 13:22:45 curt + * C++ - ifing the code a bit. + * * Revision 1.8 1998/04/21 17:02:43 curt * Prepairing for C++ integration. * diff --git a/Scenery/scenery.c b/Scenery/scenery.c index c42df0657..ffce65184 100644 --- a/Scenery/scenery.c +++ b/Scenery/scenery.c @@ -25,7 +25,9 @@ **************************************************************************/ -#include +#ifdef HAVE_CONFIG_H +# include +#endif #ifdef HAVE_WINDOWS_H # include @@ -114,9 +116,14 @@ void fgSceneryRender( void ) { /* $Log$ -/* Revision 1.40 1998/04/18 04:14:06 curt -/* Moved fg_debug.c to it's own library. +/* Revision 1.41 1998/04/24 00:51:08 curt +/* Wrapped "#include " in "#ifdef HAVE_CONFIG_H" +/* Tweaked the scenery file extentions to be "file.obj" (uncompressed) +/* or "file.obz" (compressed.) /* + * Revision 1.40 1998/04/18 04:14:06 curt + * Moved fg_debug.c to it's own library. + * * Revision 1.39 1998/04/08 23:30:07 curt * Adopted Gnu automake/autoconf system. * diff --git a/Scenery/tilecache.cxx b/Scenery/tilecache.cxx index 61fb0923a..4735417e1 100644 --- a/Scenery/tilecache.cxx +++ b/Scenery/tilecache.cxx @@ -24,7 +24,9 @@ **************************************************************************/ -#include +#ifdef HAVE_CONFIG_H +# include +#endif #ifdef HAVE_WINDOWS_H # include @@ -100,7 +102,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.obj", g->root_dir, + sprintf(file_name, "%s/Scenery/%s/%ld", g->root_dir, base_path, fgBucketGenIndex(p)); tile_cache[index].display_list = fgObjLoad(file_name, &tile_cache[index].local_ref, @@ -198,9 +200,14 @@ int fgTileCacheNextAvail( void ) { /* $Log$ -/* Revision 1.1 1998/04/22 13:22:46 curt -/* C++ - ifing the code a bit. +/* Revision 1.2 1998/04/24 00:51:08 curt +/* Wrapped "#include " in "#ifdef HAVE_CONFIG_H" +/* Tweaked the scenery file extentions to be "file.obj" (uncompressed) +/* or "file.obz" (compressed.) /* + * Revision 1.1 1998/04/22 13:22:46 curt + * C++ - ifing the code a bit. + * * Revision 1.11 1998/04/18 04:14:07 curt * Moved fg_debug.c to it's own library. * diff --git a/Scenery/tilecache.hxx b/Scenery/tilecache.hxx index 5f8c41da3..d59efa0ae 100644 --- a/Scenery/tilecache.hxx +++ b/Scenery/tilecache.hxx @@ -33,7 +33,9 @@ #endif -#include +#ifdef HAVE_CONFIG_H +# include +#endif #ifdef HAVE_WINDOWS_H # include @@ -86,9 +88,14 @@ void fgTileCacheEntryInfo( int index, GLint *display_list, /* $Log$ -/* Revision 1.1 1998/04/22 13:22:47 curt -/* C++ - ifing the code a bit. +/* Revision 1.2 1998/04/24 00:51:08 curt +/* Wrapped "#include " in "#ifdef HAVE_CONFIG_H" +/* Tweaked the scenery file extentions to be "file.obj" (uncompressed) +/* or "file.obz" (compressed.) /* + * Revision 1.1 1998/04/22 13:22:47 curt + * C++ - ifing the code a bit. + * * Revision 1.10 1998/04/21 17:02:45 curt * Prepairing for C++ integration. * diff --git a/Scenery/tilemgr.cxx b/Scenery/tilemgr.cxx index eca8feed2..8d581b8cc 100644 --- a/Scenery/tilemgr.cxx +++ b/Scenery/tilemgr.cxx @@ -25,7 +25,9 @@ **************************************************************************/ -#include +#ifdef HAVE_CONFIG_H +# include +#endif #ifdef HAVE_WINDOWS_H # include @@ -219,9 +221,14 @@ void fgTileMgrRender( void ) { /* $Log$ -/* Revision 1.1 1998/04/22 13:22:48 curt -/* C++ - ifing the code a bit. +/* Revision 1.2 1998/04/24 00:51:09 curt +/* Wrapped "#include " in "#ifdef HAVE_CONFIG_H" +/* Tweaked the scenery file extentions to be "file.obj" (uncompressed) +/* or "file.obz" (compressed.) /* + * Revision 1.1 1998/04/22 13:22:48 curt + * C++ - ifing the code a bit. + * * Revision 1.25 1998/04/18 04:14:07 curt * Moved fg_debug.c to it's own library. *