]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - regression_tests/q3map2/disappearing_sliver/winding_logging.patch
more regression test updates by Rambetter
[xonotic/netradiant.git] / regression_tests / q3map2 / disappearing_sliver / winding_logging.patch
diff --git a/regression_tests/q3map2/disappearing_sliver/winding_logging.patch b/regression_tests/q3map2/disappearing_sliver/winding_logging.patch
new file mode 100644 (file)
index 0000000..c697eb9
--- /dev/null
@@ -0,0 +1,87 @@
+Index: tools/quake3/q3map2/brush.c
+===================================================================
+--- tools/quake3/q3map2/brush.c        (revision 371)
++++ tools/quake3/q3map2/brush.c        (working copy)
+@@ -356,17 +356,29 @@
+       winding_t       *w;
+       side_t          *side;
+       plane_t         *plane;
++
++      static  int     brushord = -1;
++      brushord++;
++
++      Sys_Printf("In CreateBrushWindings() for brush %i\n", brushord);        
+       
+-      
+       /* walk the list of brush sides */
+       for( i = 0; i < brush->numsides; i++ )
+       {
++              Sys_Printf("    Handling side %i on the brush\n", i);
++
+               /* get side and plane */
+               side = &brush->sides[ i ];
+               plane = &mapplanes[ side->planenum ];
+               
+               /* make huge winding */
+               w = BaseWindingForPlane( plane->normal, plane->dist );
++
++              Sys_Printf("        Before clipping we have:\n");
++              int z;
++              for (z = 0; z < w->numpoints; z++) {
++                      Sys_Printf("            (%.8f %.8f %.8f)\n", w->p[z][0], w->p[z][1], w->p[z][2]);
++              }
+               
+               /* walk the list of brush sides */
+               for( j = 0; j < brush->numsides && w != NULL; j++ )
+@@ -379,6 +391,11 @@
+                               continue;
+                       plane = &mapplanes[ brush->sides[ j ].planenum ^ 1 ];
+                       ChopWindingInPlace( &w, plane->normal, plane->dist, 0 ); // CLIP_EPSILON );
++
++                      Sys_Printf("        After clipping w/ side %i we have:\n", j);
++                      for (z = 0; z < w->numpoints; z++) {
++                              Sys_Printf("            (%.8f %.8f %.8f)\n", w->p[z][0], w->p[z][1], w->p[z][2]);
++                      }
+                       
+                       /* ydnar: fix broken windings that would generate trifans */
+                       FixWinding( w );
+Index: tools/quake3/q3map2/map.c
+===================================================================
+--- tools/quake3/q3map2/map.c  (revision 371)
++++ tools/quake3/q3map2/map.c  (working copy)
+@@ -803,7 +803,11 @@
+       char                    shader[ MAX_QPATH ];
+       int                             flags;
+       
++      static  int     brushord = -1;
++      brushord++;
+       
++      Sys_Printf("In ParseRawBrush() for brush %i\n", brushord);
++
+       /* initial setup */
+       buildBrush->numsides = 0;
+       buildBrush->detail = qfalse;
+@@ -812,9 +816,12 @@
+       if( g_bBrushPrimit == BPRIMIT_NEWBRUSHES )
+               MatchToken( "{" );
+       
++      int sideord = -1;
++
+       /* parse sides */
+       while( 1 )
+       {
++              sideord++;
+               if( !GetToken( qtrue ) )
+                       break;
+               if( !strcmp( token, "}" ) )
+@@ -917,6 +924,10 @@
+               }
+               
+               /* find the plane number */
++              Sys_Printf("    Side %i:\n", sideord);
++              Sys_Printf("        (%f %f %f)\n", planePoints[0][0], planePoints[0][1], planePoints[0][2]);
++              Sys_Printf("        (%f %f %f)\n", planePoints[1][0], planePoints[1][1], planePoints[1][2]);
++              Sys_Printf("        (%f %f %f)\n", planePoints[2][0], planePoints[2][1], planePoints[2][2]);
+               planenum = MapPlaneFromPoints( planePoints );
+               side->planenum = planenum;
+