More: Using Sys_FPrintf with SYS_WRN and SYS_ERR 35/head
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 022db65..1be8983 100644 (file)
@@ -1293,7 +1293,7 @@ tree_t *BrushBSP( bspbrush_t *brushlist, vec3_t mins, vec3_t maxs ){
 
                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 );
                }
 
index 7607dbc..1675a61 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] ) {
-                               Sys_Printf( "WARNING: multiple forward edge\n" );
+                               Sys_FPrintf( SYS_WRN, "WARNING: multiple forward edge\n" );
                                return i;
                        }
        #endif
index 70c0458..0e76360 100644 (file)
@@ -874,7 +874,7 @@ void CreateDirectLights( void ){
                        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
index 4eb3f39..c335dd3 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( "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
        {
index 1c83d75..b26c75f 100644 (file)
@@ -554,13 +554,13 @@ void MakeTreePortals_r( node_t *node ){
 
        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 ) {
-                       Sys_Printf( "WARNING: node with unbounded volume\n" );
+                       Sys_FPrintf( SYS_WRN, "WARNING: node with unbounded volume\n" );
                        break;
                }
        }
@@ -756,7 +756,7 @@ void FloodAreas_r( node_t *node ){
 
                // 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] ) {
@@ -854,7 +854,7 @@ void SetAreaPortalAreas_r( node_t *node ){
                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;
                }
        }
index 72e7a46..f942d1c 100644 (file)
@@ -209,7 +209,7 @@ void ClusterMerge( int leafnum ){
        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 ) );
index 6b92d03..7b0085d 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 );
-                       Sys_Printf( "WARNING: illegal material name '%s'\n", bitmap );
+                       Sys_FPrintf( SYS_WRN, "WARNING: illegal material name '%s'\n", bitmap );
                }
        }
        else
index 8712c16..1b0be1e 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{
-                       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{
index ac62703..b7dfeff 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 ) {
-                       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" );
index 64b6dce..7415eeb 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 ) {
-                       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 ) {
-                       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;
                }
        }
@@ -160,7 +160,7 @@ static void ConvertShaderToMTL( FILE *f, bspShader_t *shader, int shaderNum ){
        /* 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;
        }
 
index 2f1ef5f..16c3304 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
-                                       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 ) {
index 6e01815..14a69ae 100644 (file)
@@ -2883,7 +2883,7 @@ int LightMain( int argc, char **argv ){
                /* unhandled args */
                else
                {
-                       Sys_Printf( "WARNING: Unknown argument \"%s\"\n", argv[ i ] );
+                       Sys_FPrintf( SYS_WRN, "WARNING: Unknown argument \"%s\"\n", argv[ i ] );
                }
 
        }
index 653607b..1edff9e 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 ] ) {
-                                                       //% 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 ] );
index 18d3db2..923fe8a 100644 (file)
@@ -861,7 +861,7 @@ shaderInfo_t *ShaderInfoForShader( const char *shaderName ){
                                /* 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;
index 0408871..3dcf5f5 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 ) {
-                       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;
                }