]> git.mxchange.org Git - flightgear.git/commitdiff
Added "file.obj.gz" support.
authorcurt <curt>
Fri, 24 Apr 1998 14:21:08 +0000 (14:21 +0000)
committercurt <curt>
Fri, 24 Apr 1998 14:21:08 +0000 (14:21 +0000)
Scenery/obj.c

index 822167c17c87aaceb86196c7fe1e36d2e695d52c..00a54123a8bb2611a6bca7ac6745c11236f6f1f8 100644 (file)
@@ -111,8 +111,12 @@ GLint fgObjLoad(char *path, struct fgCartesianPoint *ref, double *radius) {
        // 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);
+           // Next try "path.obj.gz" (compressed format)
+           strcat(path, ".gz");
+           if ( (f = gzopen(path, "r")) == NULL ) {
+               fgPrintf(FG_TERRAIN, FG_ALERT, "Cannot open file: %s\n", path);
+               return(-1);
+           }
        }
     }
 
@@ -401,11 +405,14 @@ GLint fgObjLoad(char *path, struct fgCartesianPoint *ref, double *radius) {
 
 
 /* $Log$
-/* Revision 1.29  1998/04/24 00:51:07  curt
-/* 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.30  1998/04/24 14:21:08  curt
+/* Added "file.obj.gz" support.
 /*
+ * Revision 1.29  1998/04/24 00:51:07  curt
+ * 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.
  *