]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
More: Using Sys_FPrintf with SYS_WRN and SYS_ERR
authorThomas Debesse <dev@illwieckz.net>
Sat, 15 Oct 2016 18:00:27 +0000 (20:00 +0200)
committerThomas Debesse <dev@illwieckz.net>
Sat, 15 Oct 2016 18:16:51 +0000 (20:16 +0200)
This commit do the same as “Using Sys_FPrintf with SYS_WRN and SYS_ERR” commit by @Pan7 (a288b9c) for occurrences that were left untouched (tools/ subtree only).

15 files changed:
tools/quake2/q2map/brushbsp.c
tools/quake2/q2map/faces.c
tools/quake2/q2map/lightmap.c
tools/quake2/q2map/main.c
tools/quake2/q2map/portals.c
tools/quake2/q2map/qvis.c
tools/quake3/common/aselib.c
tools/quake3/q3map2/convert_ase.c
tools/quake3/q3map2/convert_bsp.c
tools/quake3/q3map2/convert_obj.c
tools/quake3/q3map2/image.c
tools/quake3/q3map2/light.c
tools/quake3/q3map2/light_ydnar.c
tools/quake3/q3map2/shaders.c
tools/quake3/q3map2/surface.c

index 022db65329568a419d21041338024d46bd55f9a2..1be89836d000f8b7acd15ae4430e5bfa8893ae5b 100644 (file)
@@ -1293,7 +1293,7 @@ tree_t *BrushBSP( bspbrush_t *brushlist, vec3_t mins, vec3_t maxs ){
 
                volume = BrushVolume( b );
                if ( volume < microvolume ) {
 
                volume = BrushVolume( b );
                if ( volume < microvolume ) {
-                       Sys_Printf( "WARNING: entity %i, brush %i: microbrush\n",
+                       Sys_FPrintf( SYS_WRN, "WARNING: entity %i, brush %i: microbrush\n",
                                                b->original->entitynum, b->original->brushnum );
                }
 
                                                b->original->entitynum, b->original->brushnum );
                }
 
index 7607dbc218ca2d7ba47a0c3914e06a8ddfe8a766..1675a61bede9ff621b49950d6fad3e1ec0545f0a 100644 (file)
@@ -653,7 +653,7 @@ int GetEdge2( int v1, int v2,  face_t *f ){
                        }
        #if 0
                        if ( v1 == edge->v[0] && v2 == edge->v[1] ) {
                        }
        #if 0
                        if ( v1 == edge->v[0] && v2 == edge->v[1] ) {
-                               Sys_Printf( "WARNING: multiple forward edge\n" );
+                               Sys_FPrintf( SYS_WRN, "WARNING: multiple forward edge\n" );
                                return i;
                        }
        #endif
                                return i;
                        }
        #endif
index 70c04585f7574bd4effdbcd411c97cc8df98166c..0e7636032315254a649db6184fd620b9c68a9aff 100644 (file)
@@ -874,7 +874,7 @@ void CreateDirectLights( void ){
                        if ( target[0] ) { // point towards target
                                e2 = FindTargetEntity( target );
                                if ( !e2 ) {
                        if ( target[0] ) { // point towards target
                                e2 = FindTargetEntity( target );
                                if ( !e2 ) {
-                                       Sys_Printf( "WARNING: light at (%i %i %i) has missing target\n",
+                                       Sys_FPrintf( SYS_WRN, "WARNING: light at (%i %i %i) has missing target\n",
                                                                (int)dl->origin[0], (int)dl->origin[1], (int)dl->origin[2] );
                                }
                                else
                                                                (int)dl->origin[0], (int)dl->origin[1], (int)dl->origin[2] );
                                }
                                else
index 4eb3f393a103a85ce073a22922e5f3b5074c0fb7..c335dd34272753c1c6fe17e68c7c2c3035a1f4f9 100644 (file)
@@ -649,7 +649,7 @@ int main( int argc, char **argv ){
        Sys_Printf( "Game: %s\n", game );
 
        if ( !do_info && !do_bsp && !do_vis && !do_rad ) {
        Sys_Printf( "Game: %s\n", game );
 
        if ( !do_info && !do_bsp && !do_vis && !do_rad ) {
-               Sys_Printf( "ERROR: -bsp, -vis, -light, nor -info specified.\nWhat to you want me to do?\n\n" );
+               Sys_FPrintf( SYS_ERR, "ERROR: -bsp, -vis, -light, nor -info specified.\nWhat to you want me to do?\n\n" );
        }
        else
        {
        }
        else
        {
index 1c83d75d48dd34f1528fef31dd49ebc110dbe74f..b26c75f978777ced51eb23807332c425c9f0242d 100644 (file)
@@ -554,13 +554,13 @@ void MakeTreePortals_r( node_t *node ){
 
        CalcNodeBounds( node );
        if ( node->mins[0] >= node->maxs[0] ) {
 
        CalcNodeBounds( node );
        if ( node->mins[0] >= node->maxs[0] ) {
-               Sys_Printf( "WARNING: node without a volume\n" );
+               Sys_FPrintf( SYS_WRN, "WARNING: node without a volume\n" );
        }
 
        for ( i = 0 ; i < 3 ; i++ )
        {
                if ( node->mins[i] < -8000 || node->maxs[i] > 8000 ) {
        }
 
        for ( i = 0 ; i < 3 ; i++ )
        {
                if ( node->mins[i] < -8000 || node->maxs[i] > 8000 ) {
-                       Sys_Printf( "WARNING: node with unbounded volume\n" );
+                       Sys_FPrintf( SYS_WRN, "WARNING: node with unbounded volume\n" );
                        break;
                }
        }
                        break;
                }
        }
@@ -756,7 +756,7 @@ void FloodAreas_r( node_t *node ){
 
                // note the current area as bounding the portal
                if ( e->portalareas[1] ) {
 
                // note the current area as bounding the portal
                if ( e->portalareas[1] ) {
-                       Sys_Printf( "WARNING: areaportal entity %i touches > 2 areas\n", b->original->entitynum );
+                       Sys_FPrintf( SYS_WRN, "WARNING: areaportal entity %i touches > 2 areas\n", b->original->entitynum );
                        return;
                }
                if ( e->portalareas[0] ) {
                        return;
                }
                if ( e->portalareas[0] ) {
@@ -854,7 +854,7 @@ void SetAreaPortalAreas_r( node_t *node ){
                e = &entities[b->original->entitynum];
                node->area = e->portalareas[0];
                if ( !e->portalareas[1] ) {
                e = &entities[b->original->entitynum];
                node->area = e->portalareas[0];
                if ( !e->portalareas[1] ) {
-                       Sys_Printf( "WARNING: areaportal entity %i doesn't touch two areas\n", b->original->entitynum );
+                       Sys_FPrintf( SYS_WRN, "WARNING: areaportal entity %i doesn't touch two areas\n", b->original->entitynum );
                        return;
                }
        }
                        return;
                }
        }
index 72e7a46e2a33838af6e9ba3c7168bcf5fc5336b0..f942d1c4eb91ae8f93b6bface59f50f105854888 100644 (file)
@@ -209,7 +209,7 @@ void ClusterMerge( int leafnum ){
        numvis = LeafVectorFromPortalVector( portalvector, uncompressed );
 
        if ( uncompressed[leafnum >> 3] & ( 1 << ( leafnum & 7 ) ) ) {
        numvis = LeafVectorFromPortalVector( portalvector, uncompressed );
 
        if ( uncompressed[leafnum >> 3] & ( 1 << ( leafnum & 7 ) ) ) {
-               Sys_Printf( "WARNING: Leaf portals saw into leaf\n" );
+               Sys_FPrintf( SYS_WRN, "WARNING: Leaf portals saw into leaf\n" );
        }
 
        uncompressed[leafnum >> 3] |= ( 1 << ( leafnum & 7 ) );
        }
 
        uncompressed[leafnum >> 3] |= ( 1 << ( leafnum & 7 ) );
index 6b92d0351c8d920f57d7231c5977d4835a143da1..7b0085d281a46ccd1e0ba0ce921ee633705e1fe6 100644 (file)
@@ -472,7 +472,7 @@ static void ASE_KeyMAP_DIFFUSE( const char *token ){
                else
                {
                        sprintf( ase.materials[ase.numMaterials].name, "(not converted: '%s')", bitmap );
                else
                {
                        sprintf( ase.materials[ase.numMaterials].name, "(not converted: '%s')", bitmap );
-                       Sys_Printf( "WARNING: illegal material name '%s'\n", bitmap );
+                       Sys_FPrintf( SYS_WRN, "WARNING: illegal material name '%s'\n", bitmap );
                }
        }
        else
                }
        }
        else
index 8712c16ff26df630a290edfb87bd11faa246f3fe..1b0be1eca476c884aef59ee0779aca78e6b1839e 100644 (file)
@@ -169,7 +169,7 @@ static void ConvertSurface( FILE *f, bspModel_t *model, int modelNum, bspDrawSur
                        fprintf( f, "\t*MATERIAL_REF\t%d\r\n", ds->lightmapNum[0] + deluxemap );
                }
                else{
                        fprintf( f, "\t*MATERIAL_REF\t%d\r\n", ds->lightmapNum[0] + deluxemap );
                }
                else{
-                       Sys_Printf( "WARNING: lightmap %d out of range, not exporting\n", ds->lightmapNum[0] + deluxemap );
+                       Sys_FPrintf( SYS_WRN, "WARNING: lightmap %d out of range, not exporting\n", ds->lightmapNum[0] + deluxemap );
                }
        }
        else{
                }
        }
        else{
index ac6270319527735677aed7ed0cb1fa6b1b6a0dc5..b7dfeffd893acc77b90412a77af75800cd6d55eb 100644 (file)
@@ -234,7 +234,7 @@ int ConvertBSPMain( int argc, char **argv ){
 
        if ( force_map || ( !force_bsp && !Q_stricmp( ext, "map" ) && map_allowed ) ) {
                if ( !map_allowed ) {
 
        if ( force_map || ( !force_bsp && !Q_stricmp( ext, "map" ) && map_allowed ) ) {
                if ( !map_allowed ) {
-                       Sys_Printf( "WARNING: the requested conversion should not be done from .map files. Compile a .bsp first.\n" );
+                       Sys_FPrintf( SYS_WRN, "WARNING: the requested conversion should not be done from .map files. Compile a .bsp first.\n" );
                }
                StripExtension( source );
                DefaultExtension( source, ".map" );
                }
                StripExtension( source );
                DefaultExtension( source, ".map" );
index 64b6dcef2e72c4f116c4850430f30bcc7a3e8fbf..7415eebfdf501de4ab026c240ca5d1ab724c805b 100644 (file)
@@ -76,11 +76,11 @@ static void ConvertSurfaceToOBJ( FILE *f, bspModel_t *model, int modelNum, bspDr
                        objLastShaderNum = ds->lightmapNum[0] + deluxemap;
                }
                if ( ds->lightmapNum[0] + (int)deluxemap < firstLightmap ) {
                        objLastShaderNum = ds->lightmapNum[0] + deluxemap;
                }
                if ( ds->lightmapNum[0] + (int)deluxemap < firstLightmap ) {
-                       Sys_Printf( "WARNING: lightmap %d out of range (exporting anyway)\n", ds->lightmapNum[0] + deluxemap );
+                       Sys_FPrintf( SYS_WRN, "WARNING: lightmap %d out of range (exporting anyway)\n", ds->lightmapNum[0] + deluxemap );
                        firstLightmap = ds->lightmapNum[0] + deluxemap;
                }
                if ( ds->lightmapNum[0] > lastLightmap ) {
                        firstLightmap = ds->lightmapNum[0] + deluxemap;
                }
                if ( ds->lightmapNum[0] > lastLightmap ) {
-                       Sys_Printf( "WARNING: lightmap %d out of range (exporting anyway)\n", ds->lightmapNum[0] + deluxemap );
+                       Sys_FPrintf( SYS_WRN, "WARNING: lightmap %d out of range (exporting anyway)\n", ds->lightmapNum[0] + deluxemap );
                        lastLightmap = ds->lightmapNum[0] + deluxemap;
                }
        }
                        lastLightmap = ds->lightmapNum[0] + deluxemap;
                }
        }
@@ -160,7 +160,7 @@ static void ConvertShaderToMTL( FILE *f, bspShader_t *shader, int shaderNum ){
        /* get shader */
        si = ShaderInfoForShader( shader->shader );
        if ( si == NULL ) {
        /* get shader */
        si = ShaderInfoForShader( shader->shader );
        if ( si == NULL ) {
-               Sys_Printf( "WARNING: NULL shader in BSP\n" );
+               Sys_FPrintf( SYS_WRN, "WARNING: NULL shader in BSP\n" );
                return;
        }
 
                return;
        }
 
index 2f1ef5f1b9832c551fc05f6e599158bf9c693817..16c3304a6386a1033e092ac1f8ad041bedb7b82e 100644 (file)
@@ -474,7 +474,7 @@ image_t *ImageLoad( const char *filename ){
                        if ( LoadJPGBuff( buffer, size, &pixels, &width, &height ) == -1 ) {
                                if (pixels) {
                                        // On error, LoadJPGBuff might store a pointer to the error message in pixels
                        if ( LoadJPGBuff( buffer, size, &pixels, &width, &height ) == -1 ) {
                                if (pixels) {
                                        // On error, LoadJPGBuff might store a pointer to the error message in pixels
-                                       Sys_Printf( "WARNING: LoadJPGBuff %s %s\n", name, (unsigned char*) pixels );
+                                       Sys_FPrintf( SYS_WRN, "WARNING: LoadJPGBuff %s %s\n", name, (unsigned char*) pixels );
                                }                               
                        } else {
                                if ( width == image->width && height == image->height ) {
                                }                               
                        } else {
                                if ( width == image->width && height == image->height ) {
index 6e01815996aef081aa05c497084fbf9e411d9f88..14a69ae8978576c17ca1014fa704bb1b904f809d 100644 (file)
@@ -2883,7 +2883,7 @@ int LightMain( int argc, char **argv ){
                /* unhandled args */
                else
                {
                /* unhandled args */
                else
                {
-                       Sys_Printf( "WARNING: Unknown argument \"%s\"\n", argv[ i ] );
+                       Sys_FPrintf( SYS_WRN, "WARNING: Unknown argument \"%s\"\n", argv[ i ] );
                }
 
        }
                }
 
        }
index 653607b5ddd8836a6a5f782c14fe3fe3de0c2ea7..1edff9e38c346566eac5173367af60cf81962cb2 100644 (file)
@@ -3794,7 +3794,7 @@ void SetupEnvelopes( qboolean forGrid, qboolean fastFlag ){
                                        for ( i = 0; i < 3; i++ )
                                        {
                                                if ( mins[ i ] > light->origin[ i ] || maxs[ i ] < light->origin[ i ] ) {
                                        for ( i = 0; i < 3; i++ )
                                        {
                                                if ( mins[ i ] > light->origin[ i ] || maxs[ i ] < light->origin[ i ] ) {
-                                                       //% Sys_Printf( "WARNING: Light PVS bounds (%.0f, %.0f, %.0f) -> (%.0f, %.0f, %.0f)\ndo not encompass light %d (%f, %f, %f)\n",
+                                                       //% Sys_FPrintf( SYS_WRN, "WARNING: Light PVS bounds (%.0f, %.0f, %.0f) -> (%.0f, %.0f, %.0f)\ndo not encompass light %d (%f, %f, %f)\n",
                                                        //%     mins[ 0 ], mins[ 1 ], mins[ 2 ],
                                                        //%     maxs[ 0 ], maxs[ 1 ], maxs[ 2 ],
                                                        //%     numLights, light->origin[ 0 ], light->origin[ 1 ], light->origin[ 2 ] );
                                                        //%     mins[ 0 ], mins[ 1 ], mins[ 2 ],
                                                        //%     maxs[ 0 ], maxs[ 1 ], maxs[ 2 ],
                                                        //%     numLights, light->origin[ 0 ], light->origin[ 1 ], light->origin[ 2 ] );
index 18d3db2ec0cd871879b4dce24fe309baab87efed..923fe8a49d854fb257f55b760c5e5b816158ad7a 100644 (file)
@@ -861,7 +861,7 @@ shaderInfo_t *ShaderInfoForShader( const char *shaderName ){
                                /* increase deprecation depth */
                                deprecationDepth++;
                                if ( deprecationDepth == MAX_SHADER_DEPRECATION_DEPTH ) {
                                /* increase deprecation depth */
                                deprecationDepth++;
                                if ( deprecationDepth == MAX_SHADER_DEPRECATION_DEPTH ) {
-                                       Sys_Printf( "WARNING: Max deprecation depth of %i is reached on shader '%s'\n", MAX_SHADER_DEPRECATION_DEPTH, shader );
+                                       Sys_FPrintf( SYS_WRN, "WARNING: Max deprecation depth of %i is reached on shader '%s'\n", MAX_SHADER_DEPRECATION_DEPTH, shader );
                                }
                                /* search again from beginning */
                                i = -1;
                                }
                                /* search again from beginning */
                                i = -1;
index 04088711b2d0e4d9e661b62e413db3297d4aa057..3dcf5f55493745ad312d621de8a4ccf1302bfb6d 100644 (file)
@@ -2124,7 +2124,7 @@ int FilterWindingIntoTree_r( winding_t *w, mapDrawSurface_t *ds, node_t *node ){
                   si->mins[ 2 ] != 0.0f || si->maxs[ 2 ] != 0.0f ) ) {
                static qboolean warned = qfalse;
                if ( !warned ) {
                   si->mins[ 2 ] != 0.0f || si->maxs[ 2 ] != 0.0f ) ) {
                static qboolean warned = qfalse;
                if ( !warned ) {
-                       Sys_Printf( "WARNING: this map uses the deformVertexes move hack\n" );
+                       Sys_FPrintf( SYS_WRN, "WARNING: this map uses the deformVertexes move hack\n" );
                        warned = qtrue;
                }
 
                        warned = qtrue;
                }