]> git.mxchange.org Git - flightgear.git/commitdiff
A couple final pre-release tweaks.
authorcurt <curt>
Mon, 19 Jan 1998 19:51:06 +0000 (19:51 +0000)
committercurt <curt>
Mon, 19 Jan 1998 19:51:06 +0000 (19:51 +0000)
FixObj/obj.c
Tools/process-dem.pl
Tri2obj/depend

index 19b87d4b12dad3381ff45a3c2648c2aa5911ee9b..01d885fdb823ad1e6e9b70a5c62f4b97d15c0fef 100644 (file)
@@ -208,6 +208,11 @@ void obj_fix(char *infile, char *outfile) {
            printf("new tri strip = %s", line);
            sscanf(line, "t %d %d %d %d\n", &n1, &n2, &n3, &n4);
 
+           /* special case to handle a bug in our beloved tri striper */
+           if ( (n1 == 4) && (n2 == 2) && (n3 == 2) && (n4 == 1) ) {
+               n2 = 3;
+           }
+
            dot_prod = check_cur_face(n1, n2, n3);
            if ( dot_prod < -0.5 ) {
                /* this stripe is backwards (CW) */
@@ -283,9 +288,12 @@ void obj_fix(char *infile, char *outfile) {
 
 
 /* $Log$
-/* Revision 1.2  1998/01/09 23:03:12  curt
-/* Restructured to split 1deg x 1deg dem's into 64 subsections.
+/* Revision 1.3  1998/01/19 19:51:07  curt
+/* A couple final pre-release tweaks.
 /*
+ * Revision 1.2  1998/01/09 23:03:12  curt
+ * Restructured to split 1deg x 1deg dem's into 64 subsections.
+ *
  * Revision 1.1  1997/12/08 19:28:54  curt
  * Initial revision.
  *
index 7d59eaf7327050c5b752187e3d019f0641c5ed38..513530d7a767e3d336edf281a38d1047aeda255e 100755 (executable)
 
 $| = 1;                         # flush buffers after every write
 
-$do_demfit =     0;
-$do_triangle_1 = 0;
-$do_fixnode =    0;
-$do_splittris =  0;
-$do_assemtris =  0;
-$do_triangle_2 = 0;
+$do_demfit =     1;
+$do_triangle_1 = 1;
+$do_fixnode =    1;
+$do_splittris =  1;
+$do_assemtris =  1;
+$do_triangle_2 = 1;
 
 $do_tri2obj =    1;
-$do_strips =     0;
-$do_fixobj =     0;
+$do_strips =     1;
+$do_fixobj =     1;
 
 
 # return the file name root (ending at last ".")
@@ -96,7 +96,7 @@ if ( $do_demfit ) {
     }
     close(OUT);
 } else {
-    $subdir = "../Scenery/w120n030/w111n033";
+    $subdir = "../Scenery/w100n040/w093n045";
     print "WARNING:  Hardcoding subdir = $subdir\n";
 }
 
@@ -262,7 +262,8 @@ if ( $do_tri2obj ) {
 
 # 6.  strip file.1.obj
 # 
-#     Strip the file.1.obj's
+#     Strip the file.1.obj's.  Note, strips doesn't handle the minimal
+#     case of striping a square correctly.
 #
 # 7.  cp bands.d file.2.obj
 #
@@ -293,7 +294,7 @@ if ( $do_strips ) {
            close(IN);
            close(OUT);
            
-           unlink("$subdir/$file");
+           unlink("$subdir/$file");
        }
     }
 }
@@ -327,6 +328,9 @@ if ( $do_fixobj ) {
 
 #---------------------------------------------------------------------------
 # $Log$
+# Revision 1.7  1998/01/19 19:51:06  curt
+# A couple final pre-release tweaks.
+#
 # Revision 1.6  1998/01/15 21:33:33  curt
 # Assembling triangles and building a new .node file with the proper shared
 # vertices now works.  Now we just have to use the shared normals and we'll
index 73c1337131066549c95c50d8319f3b05a8b2e6fb..06689736e440cf37a78b98ce817b079c837f9322 100644 (file)
@@ -1,4 +1,4 @@
 tri2obj.o: tri2obj.c tri2obj.h ../../Src/Include/constants.h \
  ../../Src/Include/types.h ../../Src/Math/fg_geodesy.h \
  ../../Src/Math/mat3.h ../../Src/Math/polar.h \
- ../../Src/Math/../Include/types.h
+ ../../Src/Math/../Include/types.h ../../Src/Scenery/tileutils.h