Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
Tweaked the scenery file extentions to be "file.obj" (uncompressed) or "file.obz" (compressed.)
This commit is contained in:
parent
f4c7a35129
commit
10fb3d1a0c
6 changed files with 65 additions and 22 deletions
|
@ -25,7 +25,9 @@
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#include <config.h>
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
|
@ -102,11 +104,12 @@ GLint fgObjLoad(char *path, struct fgCartesianPoint *ref, double *radius) {
|
||||||
int winding;
|
int winding;
|
||||||
int last1, last2, odd;
|
int last1, last2, odd;
|
||||||
|
|
||||||
// First try "path.gz"
|
// First try "path.obz" (compressed format)
|
||||||
strcpy(gzpath, path);
|
strcpy(gzpath, path);
|
||||||
strcat(gzpath, ".gz");
|
strcat(gzpath, ".obz");
|
||||||
if ( (f = gzopen(gzpath, "r")) == NULL ) {
|
if ( (f = gzopen(gzpath, "r")) == NULL ) {
|
||||||
// Next try "path"
|
// Next try "path.obj" (uncompressed format)
|
||||||
|
strcat(path, ".obj");
|
||||||
if ( (f = gzopen(path, "r")) == NULL ) {
|
if ( (f = gzopen(path, "r")) == NULL ) {
|
||||||
fgPrintf(FG_TERRAIN, FG_ALERT, "Cannot open file: %s\n", path);
|
fgPrintf(FG_TERRAIN, FG_ALERT, "Cannot open file: %s\n", path);
|
||||||
return(-1);
|
return(-1);
|
||||||
|
@ -398,9 +401,14 @@ GLint fgObjLoad(char *path, struct fgCartesianPoint *ref, double *radius) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.28 1998/04/22 13:22:44 curt
|
/* Revision 1.29 1998/04/24 00:51:07 curt
|
||||||
/* C++ - ifing the code a bit.
|
/* Wrapped "#include <config.h>" 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
|
* Revision 1.27 1998/04/18 04:13:17 curt
|
||||||
* Added zlib on the fly decompression support for loading scenery objects.
|
* Added zlib on the fly decompression support for loading scenery objects.
|
||||||
*
|
*
|
||||||
|
|
|
@ -28,7 +28,9 @@
|
||||||
#define _OBJ_H
|
#define _OBJ_H
|
||||||
|
|
||||||
|
|
||||||
#include <config.h>
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
|
@ -57,9 +59,14 @@ GLint fgObjLoad(char *path, struct fgCartesianPoint *ref, double *radius);
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.9 1998/04/22 13:22:45 curt
|
/* Revision 1.10 1998/04/24 00:51:07 curt
|
||||||
/* C++ - ifing the code a bit.
|
/* Wrapped "#include <config.h>" 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
|
* Revision 1.8 1998/04/21 17:02:43 curt
|
||||||
* Prepairing for C++ integration.
|
* Prepairing for C++ integration.
|
||||||
*
|
*
|
||||||
|
|
|
@ -25,7 +25,9 @@
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#include <config.h>
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
|
@ -114,9 +116,14 @@ void fgSceneryRender( void ) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.40 1998/04/18 04:14:06 curt
|
/* Revision 1.41 1998/04/24 00:51:08 curt
|
||||||
/* Moved fg_debug.c to it's own library.
|
/* Wrapped "#include <config.h>" 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
|
* Revision 1.39 1998/04/08 23:30:07 curt
|
||||||
* Adopted Gnu automake/autoconf system.
|
* Adopted Gnu automake/autoconf system.
|
||||||
*
|
*
|
||||||
|
|
|
@ -24,7 +24,9 @@
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#include <config.h>
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
|
@ -100,7 +102,7 @@ void fgTileCacheEntryFillIn( int index, struct fgBUCKET *p ) {
|
||||||
|
|
||||||
/* Load the appropriate area and get the display list pointer */
|
/* Load the appropriate area and get the display list pointer */
|
||||||
fgBucketGenBasePath(p, base_path);
|
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));
|
base_path, fgBucketGenIndex(p));
|
||||||
tile_cache[index].display_list =
|
tile_cache[index].display_list =
|
||||||
fgObjLoad(file_name, &tile_cache[index].local_ref,
|
fgObjLoad(file_name, &tile_cache[index].local_ref,
|
||||||
|
@ -198,9 +200,14 @@ int fgTileCacheNextAvail( void ) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.1 1998/04/22 13:22:46 curt
|
/* Revision 1.2 1998/04/24 00:51:08 curt
|
||||||
/* C++ - ifing the code a bit.
|
/* Wrapped "#include <config.h>" 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
|
* Revision 1.11 1998/04/18 04:14:07 curt
|
||||||
* Moved fg_debug.c to it's own library.
|
* Moved fg_debug.c to it's own library.
|
||||||
*
|
*
|
||||||
|
|
|
@ -33,7 +33,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include <config.h>
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
|
@ -86,9 +88,14 @@ void fgTileCacheEntryInfo( int index, GLint *display_list,
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.1 1998/04/22 13:22:47 curt
|
/* Revision 1.2 1998/04/24 00:51:08 curt
|
||||||
/* C++ - ifing the code a bit.
|
/* Wrapped "#include <config.h>" 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
|
* Revision 1.10 1998/04/21 17:02:45 curt
|
||||||
* Prepairing for C++ integration.
|
* Prepairing for C++ integration.
|
||||||
*
|
*
|
||||||
|
|
|
@ -25,7 +25,9 @@
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#include <config.h>
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
|
@ -219,9 +221,14 @@ void fgTileMgrRender( void ) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.1 1998/04/22 13:22:48 curt
|
/* Revision 1.2 1998/04/24 00:51:09 curt
|
||||||
/* C++ - ifing the code a bit.
|
/* Wrapped "#include <config.h>" 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
|
* Revision 1.25 1998/04/18 04:14:07 curt
|
||||||
* Moved fg_debug.c to it's own library.
|
* Moved fg_debug.c to it's own library.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue