]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - 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
1 Index: tools/quake3/q3map2/brush.c
2 ===================================================================
3 --- tools/quake3/q3map2/brush.c (revision 371)
4 +++ tools/quake3/q3map2/brush.c (working copy)
5 @@ -356,17 +356,29 @@
6         winding_t       *w;
7         side_t          *side;
8         plane_t         *plane;
9 +
10 +       static  int     brushord = -1;
11 +       brushord++;
12 +
13 +       Sys_Printf("In CreateBrushWindings() for brush %i\n", brushord);        
14         
15 -       
16         /* walk the list of brush sides */
17         for( i = 0; i < brush->numsides; i++ )
18         {
19 +               Sys_Printf("    Handling side %i on the brush\n", i);
20 +
21                 /* get side and plane */
22                 side = &brush->sides[ i ];
23                 plane = &mapplanes[ side->planenum ];
24                 
25                 /* make huge winding */
26                 w = BaseWindingForPlane( plane->normal, plane->dist );
27 +
28 +               Sys_Printf("        Before clipping we have:\n");
29 +               int z;
30 +               for (z = 0; z < w->numpoints; z++) {
31 +                       Sys_Printf("            (%.8f %.8f %.8f)\n", w->p[z][0], w->p[z][1], w->p[z][2]);
32 +               }
33                 
34                 /* walk the list of brush sides */
35                 for( j = 0; j < brush->numsides && w != NULL; j++ )
36 @@ -379,6 +391,11 @@
37                                 continue;
38                         plane = &mapplanes[ brush->sides[ j ].planenum ^ 1 ];
39                         ChopWindingInPlace( &w, plane->normal, plane->dist, 0 ); // CLIP_EPSILON );
40 +
41 +                       Sys_Printf("        After clipping w/ side %i we have:\n", j);
42 +                       for (z = 0; z < w->numpoints; z++) {
43 +                               Sys_Printf("            (%.8f %.8f %.8f)\n", w->p[z][0], w->p[z][1], w->p[z][2]);
44 +                       }
45                         
46                         /* ydnar: fix broken windings that would generate trifans */
47                         FixWinding( w );
48 Index: tools/quake3/q3map2/map.c
49 ===================================================================
50 --- tools/quake3/q3map2/map.c   (revision 371)
51 +++ tools/quake3/q3map2/map.c   (working copy)
52 @@ -803,7 +803,11 @@
53         char                    shader[ MAX_QPATH ];
54         int                             flags;
55         
56 +       static  int     brushord = -1;
57 +       brushord++;
58         
59 +       Sys_Printf("In ParseRawBrush() for brush %i\n", brushord);
60 +
61         /* initial setup */
62         buildBrush->numsides = 0;
63         buildBrush->detail = qfalse;
64 @@ -812,9 +816,12 @@
65         if( g_bBrushPrimit == BPRIMIT_NEWBRUSHES )
66                 MatchToken( "{" );
67         
68 +       int sideord = -1;
69 +
70         /* parse sides */
71         while( 1 )
72         {
73 +               sideord++;
74                 if( !GetToken( qtrue ) )
75                         break;
76                 if( !strcmp( token, "}" ) )
77 @@ -917,6 +924,10 @@
78                 }
79                 
80                 /* find the plane number */
81 +               Sys_Printf("    Side %i:\n", sideord);
82 +               Sys_Printf("        (%f %f %f)\n", planePoints[0][0], planePoints[0][1], planePoints[0][2]);
83 +               Sys_Printf("        (%f %f %f)\n", planePoints[1][0], planePoints[1][1], planePoints[1][2]);
84 +               Sys_Printf("        (%f %f %f)\n", planePoints[2][0], planePoints[2][1], planePoints[2][2]);
85                 planenum = MapPlaneFromPoints( planePoints );
86                 side->planenum = planenum;
87