]> git.mxchange.org Git - flightgear.git/blobdiff - FixObj/obj.c
Now use libMath rather than having local copies of math routines.
[flightgear.git] / FixObj / obj.c
index 8f704957ffaf7e0cb477a34392a9d041799179a2..018569439723faae10ad06ff9b15b33057bd8772 100644 (file)
 
 #include "obj.h"
 
-#include "../../Src/Math/mat3.h"
+#include <Math/mat3.h>
 
 
 /* what do ya' know, here's some global variables */
-double nodes[MAXNODES][3];
-double normals[MAXNODES][3];
+static double nodes[MAXNODES][3];
+static double normals[MAXNODES][3];
 
-int ccw_list[MAXNODES];
+static int ccw_list[MAXNODES];
 int ccw_list_ptr;
 
-int cw_list[MAXNODES];
+static int cw_list[MAXNODES];
 int cw_list_ptr;
 
 FILE *in, *out;
@@ -208,10 +208,13 @@ 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 */
+           /* special cases to handle bugs in our beloved tri striper */
            if ( (n1 == 4) && (n2 == 2) && (n3 == 2) && (n4 == 1) ) {
                n2 = 3;
            }
+           if ( (n1 == 3) && (n2 == 1) && (n3 == 1) && (n4 == 0) ) {
+               n3 = 4;
+           }
 
            dot_prod = check_cur_face(n1, n2, n3);
            if ( dot_prod < 0.0 ) {
@@ -288,9 +291,21 @@ void obj_fix(char *infile, char *outfile) {
 
 
 /* $Log$
-/* Revision 1.5  1998/03/03 03:37:03  curt
-/* Cumulative tweaks.
+/* Revision 1.9  1998/04/18 04:01:03  curt
+/* Now use libMath rather than having local copies of math routines.
 /*
+ * Revision 1.8  1998/04/08 23:19:37  curt
+ * Adopted Gnu automake/autoconf system.
+ *
+ * Revision 1.7  1998/03/19 02:51:41  curt
+ * Added special case handling to compensate for bugs in our beloved tri striper
+ *
+ * Revision 1.6  1998/03/03 15:36:12  curt
+ * Tweaks for compiling with g++
+ *
+ * Revision 1.5  1998/03/03 03:37:03  curt
+ * Cumulative tweaks.
+ *
  * Revision 1.4  1998/01/31 00:41:25  curt
  * Made a few changes converting floats to doubles.
  *