]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
IGNORE: whitespace-only changes divVerent/zeroradiant-split-up-the-q3map2-commit
authorRudolf Polzer <divverent@xonotic.org>
Thu, 24 Feb 2011 08:16:47 +0000 (09:16 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Thu, 24 Feb 2011 08:17:29 +0000 (09:17 +0100)
17 files changed:
tools/quake3/q3map2/brush.c
tools/quake3/q3map2/bsp.c
tools/quake3/q3map2/bspfile_abstract.c
tools/quake3/q3map2/facebsp.c
tools/quake3/q3map2/game_nexuiz.h
tools/quake3/q3map2/light.c
tools/quake3/q3map2/light_trace.c
tools/quake3/q3map2/light_ydnar.c
tools/quake3/q3map2/main.c
tools/quake3/q3map2/map.c
tools/quake3/q3map2/patch.c
tools/quake3/q3map2/prtfile.c
tools/quake3/q3map2/q3map2.h
tools/quake3/q3map2/shaders.c
tools/quake3/q3map2/surface.c
tools/quake3/q3map2/surface_meta.c
tools/quake3/q3map2/vis.c

index 1093be3b4a11d49c58f6a7b52940c0b846191828..b7c50f4c3348a998a674aca65af4b14dfadc5f76 100644 (file)
@@ -321,8 +321,6 @@ void SnapWeldVectorAccu(vec3_accu_t a, vec3_accu_t b, vec3_accu_t out)
        }
 }
 
-
-
 /*
 FixWinding() - ydnar
 removes degenerate edges from a winding
index 3a16b0c22f645d189623cdd0c5172de04c535822..f761fbb1a0ec207b2e0baa089f7c6aa90bc16a0f 100644 (file)
@@ -44,7 +44,6 @@ functions
 
 ------------------------------------------------------------------------------- */
 
-
 /*
 ProcessAdvertisements()
 copies advertisement info into the BSP structures
@@ -268,7 +267,6 @@ void ProcessWorldModel( void )
        char            level[ 2 ], shader[ 1024 ];
        const char      *value;
        
-       
        /* sets integer blockSize from worldspawn "_blocksize" key if it exists */
        value = ValueForKey( &entities[ 0 ], "_blocksize" );
        if( value[ 0 ] == '\0' )
index 31b6f171bd4a425d9fe586ada8b2e122ed62ab5b..0ce23ed1d40f526da1e0be03e9da222f9ec45f81 100644 (file)
@@ -604,6 +604,7 @@ void UnparseEntities( void )
        buf = bspEntData;
        end = buf;
        *end = 0;
+
        
        /* run through entity list */
        for( i = 0; i < numBSPEntities && i < numEntities; i++ )
@@ -821,7 +822,6 @@ void GetEntityShadowFlags( const entity_t *ent, const entity_t *ent2, int *castS
 {
        const char      *value;
        
-       
        /* get cast shadows */
        if( castShadows != NULL )
        {
index 270eefe280014c415b15031a73ed1b331834a0f9..4ebc00b7a16c9b4e670204e38fe778fbe9501cd8 100644 (file)
@@ -225,6 +225,7 @@ void BuildFaceTree_r( node_t *node, face_t *list )
        plane = &mapplanes[ splitPlaneNum ];
        childLists[0] = NULL;
        childLists[1] = NULL;
+
        for( split = list; split; split = next )
        {
                /* set next */
index 0d23766db339921c9aa590724592d5847fda3b4e..9be29e0fe0fa3276e49f2cebbcf0fe431e6850d0 100644 (file)
@@ -130,6 +130,7 @@ game_t struct
                { "nodlight",           0,                                                      0,                                                      Q_SURF_NODLIGHT,                        0,                                                      0,                                                      0 },
                { "dust",                       0,                                                      0,                                                      Q_SURF_DUST,                            0,                                                      0,                                                      0 },
                
+               
                /* null */
                { NULL, 0, 0, 0, 0, 0, 0 }
        }
index 8520edd7f14de21054545009f09705ce4d5f1c6b..1d629694b252726e9b3b8c057a82c979c9b71b5e 100644 (file)
@@ -392,7 +392,7 @@ void CreateEntityLights( void )
                
                intensity = intensity * pointScale;
                light->photons = intensity;
-               
+
                light->type = EMIT_POINT;
                
                /* set falloff threshold */
@@ -766,7 +766,6 @@ int LightContributionToSample( trace_t *trace )
                float           d;
                vec3_t          pushedOrigin;
                
-               
                /* project sample point into light plane */
                d = DotProduct( trace->origin, light->normal ) - light->dist;
                if( d < 3.0f )
@@ -881,8 +880,7 @@ int LightContributionToSample( trace_t *trace )
                {
                        float   distByNormal, radiusAtDist, sampleRadius;
                        vec3_t  pointAtDist, distToSample;
-                       
-                       
+       
                        /* do cone calculation */
                        distByNormal = -DotProduct( trace->displacement, light->normal );
                        if( distByNormal < 0.0f )
@@ -1101,7 +1099,7 @@ int LightContributionToPoint( trace_t *trace )
                /* clamp the distance to prevent super hot spots */
                if( dist < 16.0f )
                        dist = 16.0f;
-               
+
                /* attenuate */
                add = light->photons / (dist * dist);
        }
@@ -1264,7 +1262,6 @@ void TraceGrid( int num )
        contribution_t                  contributions[ MAX_CONTRIBUTIONS ];
        trace_t                                 trace;
        
-       
        /* get grid points */
        gp = &rawGridPoints[ num ];
        bgp = &bspGridPoints[ num ];
@@ -1654,10 +1651,6 @@ void LightWorld( void )
        if( dirty )
        {
                Sys_Printf( "--- DirtyRawLightmap ---\n" );
-
-
-
-
                RunThreadsOnIndividual( numRawLightmaps, qtrue, DirtyRawLightmap );
        }
        
@@ -1889,12 +1882,6 @@ int LightMain( int argc, char **argv )
                        Sys_Printf( "Dark lightmap seams enabled\n" );
                }
                
-
-
-
-
-
-
                else if( !strcmp( argv[ i ], "-shadeangle" ) )
                {
                        shadeAngleDegrees = atof( argv[ i + 1 ] );
index 2a4e7e464b9fe84706f122940058a94f32ba2f41..9627b8254f48b9f4388f53790784596d429723f9 100644 (file)
@@ -1412,7 +1412,7 @@ qboolean TraceTriangle( traceInfo_t *ti, traceTriangle_t *tt, trace_t *trace )
                if( ti->castShadows != 1 )
                        return qfalse;
        }
-       
+
        /* receive shadows from same group and worldspawn group */
        else if( trace->recvShadows > 1 )
        {
index 44d60d8a202da1f2a574ee6014e68b83d3d4b6a3..122d693945976a0df4d4194bd5c4fee0b312943d 100644 (file)
@@ -2109,7 +2109,7 @@ void IlluminateRawLightmap( int rawLightmapNum )
                                lm->superLuxels[ lightmapNum ] = safe_malloc( size );
                                memset( lm->superLuxels[ lightmapNum ], 0, size );
                        }
-                       
+
                        /* set style */
                        if( lightmapNum > 0 )
                        {
@@ -2288,6 +2288,7 @@ void IlluminateRawLightmap( int rawLightmapNum )
                                if( *cluster < 0 ||
                                        (lm->splotchFix && (luxel[ 0 ] <= ambientColor[ 0 ] || luxel[ 1 ] <= ambientColor[ 1 ] || luxel[ 2 ] <= ambientColor[ 2 ])) )
                                        filterColor = qtrue;
+
                                if( deluxemap && lightmapNum == 0 && (*cluster < 0 || filter) )
                                        filterDir = qtrue;
                                
index 86d4d4988d1218c6f15a51c833bc98e15a1a40aa..b914de1fe79bcacb3126f58c334a5aa15e0d4748 100644 (file)
@@ -1,4 +1,4 @@
-/* -------------------------------------------------------------------------------
+/* -------------------------------------------------------------------------------;
 
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
@@ -36,6 +36,8 @@ several games based on the Quake III Arena engine, in the form of "Q3Map2."
 /* dependencies */
 #include "q3map2.h"
 
+
+
 /*
 Random()
 returns a pseudorandom number between 0 and 1
@@ -588,7 +590,7 @@ int main( int argc, char **argv )
        
        /* set exit call */
        atexit( ExitQ3Map );
-       
+
        /* read general options first */
        for( i = 1; i < argc; i++ )
        {
@@ -635,7 +637,7 @@ int main( int argc, char **argv )
                        argv[ i ] = NULL;
                }
        }
-       
+
        /* init model library */
        PicoInit();
        PicoSetMallocFunc( safe_malloc );
index 4ec5a3818cdd09e5d9774e0ebbb9b05a7a4bac15..03470f5a15719da6e7380b93165bb95d881845cf 100644 (file)
@@ -1280,7 +1280,6 @@ void AdjustBrushesForOrigin( entity_t *ent )
        brush_t         *b;
        parseMesh_t     *p;
        
-       
        /* walk brush list */
        for( b = ent->brushes; b != NULL; b = b->next )
        {
index 58b8ea207940edf63e281570eeecced407e05187..9cd707e224284fb3f2770bafb4e07e0847c77f07 100644 (file)
@@ -227,7 +227,6 @@ void ParsePatch( qboolean onlyLights )
        float                   longestCurve;
        int                             maxIterations;
        
-       
        MatchToken( "{" );
        
        /* get texture */
index 6f36f7582cb554000541e5b6b4579199df6d86d9..eb11d0d9122627791125c567dd75dd02aee9a9f6 100644 (file)
@@ -102,6 +102,7 @@ void WritePortalFile_r (node_t *node)
                        // plane the same way vis will, and flip the side orders if needed
                        // FIXME: is this still relevent?
                        WindingPlane (w, normal, &dist);
+
                        if ( DotProduct (p->plane.normal, normal) < 0.99 )
                        {       // backwards...
                                fprintf (pf,"%i %i %i ",w->numpoints, p->nodes[1]->cluster, p->nodes[0]->cluster);
index 78b2f7c1b631886f8ab322f658407905a649cb11..2d4004a43d6fb3921aaefdf465297d9d6ad22764 100644 (file)
@@ -1028,7 +1028,7 @@ typedef struct mapDrawSurface_s
        int                                     maxIterations;
        int                                     patchWidth, patchHeight;
        vec3_t                          bounds[ 2 ];
-       
+
        /* ydnar/sd: for foliage */
        int                                     numFoliageInstances;
        
@@ -1436,8 +1436,6 @@ typedef struct surfaceInfo_s
 }
 surfaceInfo_t;
 
-
-
 /* -------------------------------------------------------------------------------
 
 prototypes
index 321a527bca09af8b016e93a28acc5ed95e6d55bb..06e95d3428b13325bb5447480531e02315d3910d 100644 (file)
@@ -806,8 +806,7 @@ shaderInfo_t *ShaderInfoForShader( const char *shaderName )
        int                             i;
        shaderInfo_t    *si;
        char                    shader[ MAX_QPATH ];
-       
-       
+
        /* dummy check */
        if( shaderName == NULL || shaderName[ 0 ] == '\0' )
        {
@@ -1337,7 +1336,6 @@ static void ParseShaderFile( const char *filename )
                                {
                                        surfaceModel_t  *model;
                                        
-                                       
                                        /* allocate new model and attach it */
                                        model = safe_malloc( sizeof( *model ) );
                                        memset( model, 0, sizeof( *model ) );
index 5415ae105d8f89e65f935b386bb5bc3fd8780626..a86eb3184d4d2cc5d3b65104308b92d0175f8ee2 100644 (file)
@@ -2445,8 +2445,6 @@ void EmitFlareSurface( mapDrawSurface_t *ds )
        numSurfacesByType[ ds->type ]++;
 }
 
-
-
 /*
 EmitPatchSurface()
 emits a bsp patch drawsurface
@@ -2463,7 +2461,6 @@ void EmitPatchSurface( mapDrawSurface_t *ds )
        if( ds->backSide || ds->shaderInfo->invert )
        {
                bspDrawVert_t   *dv1, *dv2, temp;
-               
 
                /* walk the verts, flip the normal */
                for( i = 0; i < ds->numVerts; i++ )
@@ -2485,7 +2482,7 @@ void EmitPatchSurface( mapDrawSurface_t *ds )
                /* invert facing */
                VectorScale( ds->lightmapVecs[ 2 ], -1.0f, ds->lightmapVecs[ 2 ] );
        }
-       
+
        /* allocate a new surface */
        if( numBSPDrawSurfaces == MAX_MAP_DRAW_SURFS )
                Error( "MAX_MAP_DRAW_SURFS" );
@@ -2493,7 +2490,7 @@ void EmitPatchSurface( mapDrawSurface_t *ds )
        ds->outputNum = numBSPDrawSurfaces;
        numBSPDrawSurfaces++;
        memset( out, 0, sizeof( *out ) );
-       
+
        /* set it up */
        out->surfaceType = MST_PATCH;
        if( debugSurfaces )
@@ -2548,8 +2545,6 @@ void EmitPatchSurface( mapDrawSurface_t *ds )
        numSurfacesByType[ ds->type ]++;
 }
 
-
-
 /*
 OptimizeTriangleSurface() - ydnar
 optimizes the vertex/index data in a triangle surface
@@ -2677,8 +2672,7 @@ static void EmitTriangleSurface( mapDrawSurface_t *ds )
 {
        int                                             i, temp;
        bspDrawSurface_t                *out;
-       
-       
+
        /* invert the surface if necessary */
        if( ds->backSide || ds->shaderInfo->invert )
        {
@@ -2689,15 +2683,15 @@ static void EmitTriangleSurface( mapDrawSurface_t *ds )
                        ds->indexes[ i ] = ds->indexes[ i + 1 ];
                        ds->indexes[ i + 1 ] = temp;
                }
-               
+                       
                /* walk the verts, flip the normal */
                for( i = 0; i < ds->numVerts; i++ )
                        VectorScale( ds->verts[ i ].normal, -1.0f, ds->verts[ i ].normal );
-               
+                       
                /* invert facing */
                VectorScale( ds->lightmapVecs[ 2 ], -1.0f, ds->lightmapVecs[ 2 ] );
        }
-       
+               
        /* allocate a new surface */
        if( numBSPDrawSurfaces == MAX_MAP_DRAW_SURFS )
                Error( "MAX_MAP_DRAW_SURFS" );
@@ -2812,7 +2806,6 @@ static void EmitFaceSurface( mapDrawSurface_t *ds )
 }
 
 
-
 /*
 MakeDebugPortalSurfs_r() - ydnar
 generates drawsurfaces for passable portals in the bsp
@@ -3424,7 +3417,7 @@ void FilterDrawsurfsIntoTree( entity_t *e, tree_t *tree )
                
                /* get shader */
                si = ds->shaderInfo;
-               
+
                /* ydnar: skybox surfaces are special */
                if( ds->skybox )
                {
index 9191ac146ed8ca47d76dea44716a4316134754fd..c4f82c55c8dbcec10a4b48ada82ad62114fc139f 100644 (file)
@@ -84,7 +84,7 @@ static int FindMetaVertex( bspDrawVert_t *src )
 {
        int                     i;
        bspDrawVert_t   *v, *temp;
-       
+
        
        /* try to find an existing drawvert */
        for( i = firstSearchMetaVert, v = &metaVerts[ i ]; i < numMetaVerts; i++, v++ )
@@ -657,7 +657,7 @@ void MakeEntityMetaTriangles( entity_t *e )
                        
                        case SURFACE_TRIANGLES:
                                break;
-                       
+               
                        case SURFACE_FORCED_META:
                        case SURFACE_META:
                                SurfaceToMetaTriangles( ds );
@@ -973,7 +973,6 @@ void SmoothMetaTriangles( void )
        int                             indexes[ MAX_SAMPLES ];
        vec3_t                  votes[ MAX_SAMPLES ];
        
-       
        /* note it */
        Sys_FPrintf( SYS_VRB, "--- SmoothMetaTriangles ---\n" );
        
@@ -999,6 +998,7 @@ void SmoothMetaTriangles( void )
                        shadeAngle = DEG2RAD( tri->si->shadeAngleDegrees );
                else
                        shadeAngle = defaultShadeAngle;
+
                if( shadeAngle > maxShadeAngle )
                        maxShadeAngle = shadeAngle;
                
index 4ee843a0b96800a08c89f28b36fb124f7149a430..dc764ba8e0e89188d4aba44670004a208e7bfc6c 100644 (file)
@@ -1074,7 +1074,9 @@ int VisMain (int argc, char **argv)
                }
                
                else
+               {
                        Sys_Printf( "WARNING: Unknown option \"%s\"\n", argv[ i ] );
+               }
        }
 
        if( i != argc - 1 )