From e3f1afe0e83c296febb219a61cc761ea5ff2ce83 Mon Sep 17 00:00:00 2001 From: Timothee Besset Date: Sun, 24 Apr 2016 15:05:09 -0500 Subject: [PATCH 1/3] phrasing.. --- tools/quake3/q3map2/surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/quake3/q3map2/surface.c b/tools/quake3/q3map2/surface.c index 2aeda857..4a3467f9 100644 --- a/tools/quake3/q3map2/surface.c +++ b/tools/quake3/q3map2/surface.c @@ -1164,7 +1164,7 @@ mapDrawSurface_t *DrawSurfaceForMesh( entity_t *e, parseMesh_t *p, mesh_t *mesh /* spew forth errors */ if ( VectorLength( plane ) < 0.001f ) { - Sys_Printf( "BOGUS " ); + Sys_Printf( "DrawSurfaceForMesh: bogus plane\n" ); } /* test each vert */ From a288b9c4361aac242f3218e635f1ed73d070c146 Mon Sep 17 00:00:00 2001 From: Pan7 Date: Mon, 16 May 2016 21:20:20 +0200 Subject: [PATCH 2/3] Using Sys_FPrintf with SYS_WRN and SYS_ERR --- tools/quake3/common/aselib.c | 2 +- tools/quake3/common/scriplib.c | 2 +- tools/quake3/q3map2/bsp.c | 7 +++---- tools/quake3/q3map2/bspfile_abstract.c | 4 ++-- tools/quake3/q3map2/convert_ase.c | 2 +- tools/quake3/q3map2/decals.c | 6 +++--- tools/quake3/q3map2/exportents.c | 2 +- tools/quake3/q3map2/image.c | 16 ++++++++-------- tools/quake3/q3map2/light.c | 4 ++-- tools/quake3/q3map2/light_ydnar.c | 9 ++++----- tools/quake3/q3map2/lightmaps_ydnar.c | 12 ++++++------ tools/quake3/q3map2/main.c | 2 +- tools/quake3/q3map2/map.c | 16 ++++++++-------- tools/quake3/q3map2/model.c | 8 ++++---- tools/quake3/q3map2/portals.c | 8 ++++---- tools/quake3/q3map2/shaders.c | 26 +++++++++++++------------- tools/quake3/q3map2/surface.c | 8 ++++---- tools/quake3/q3map2/surface_extra.c | 2 +- tools/quake3/q3map2/surface_meta.c | 2 +- tools/quake3/q3map2/vis.c | 7 +++---- tools/quake3/q3map2/writebsp.c | 2 +- 21 files changed, 72 insertions(+), 75 deletions(-) diff --git a/tools/quake3/common/aselib.c b/tools/quake3/common/aselib.c index 76215232..6b92d035 100644 --- a/tools/quake3/common/aselib.c +++ b/tools/quake3/common/aselib.c @@ -217,7 +217,7 @@ polyset_t *ASE_GetSurfaceAnimation( int which, int *pNumFrames, int skipFrameSta { numFramesInAnimation = pObject->anim.numFrames; if ( maxFrames != -1 ) { - Sys_Printf( "WARNING: ASE_GetSurfaceAnimation maxFrames > numFramesInAnimation\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: ASE_GetSurfaceAnimation maxFrames > numFramesInAnimation\n" ); } } diff --git a/tools/quake3/common/scriplib.c b/tools/quake3/common/scriplib.c index a33657c7..359a078d 100644 --- a/tools/quake3/common/scriplib.c +++ b/tools/quake3/common/scriplib.c @@ -153,7 +153,7 @@ qboolean EndOfScript( qboolean crossline ){ } if ( script->buffer == NULL ) { - Sys_Printf( "WARNING: Attempt to free already freed script buffer\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: Attempt to free already freed script buffer\n" ); } else{ free( script->buffer ); diff --git a/tools/quake3/q3map2/bsp.c b/tools/quake3/q3map2/bsp.c index 4ac39f36..4b181c17 100644 --- a/tools/quake3/q3map2/bsp.c +++ b/tools/quake3/q3map2/bsp.c @@ -193,7 +193,7 @@ static void SetCloneModelNumbers( void ){ /* get the model num */ value3 = ValueForKey( &entities[ j ], "model" ); if ( value3[ 0 ] == '\0' ) { - Sys_Printf( "WARNING: Cloned entity %s referenced entity without model\n", value2 ); + Sys_FPrintf( SYS_WRN, "WARNING: Cloned entity %s referenced entity without model\n", value2 ); continue; } models = atoi( &value2[ 1 ] ); @@ -1010,9 +1010,8 @@ int BSPMain( int argc, char **argv ){ else if ( !strcmp( argv[ i ], "-bsp" ) ) { Sys_Printf( "-bsp argument unnecessary\n" ); } - else - { - Sys_Printf( "WARNING: Unknown option \"%s\"\n", argv[ i ] ); + else{ + Sys_FPrintf( SYS_WRN, "WARNING: Unknown option \"%s\"\n", argv[ i ] ); } } diff --git a/tools/quake3/q3map2/bspfile_abstract.c b/tools/quake3/q3map2/bspfile_abstract.c index 1dab66db..a20a5963 100644 --- a/tools/quake3/q3map2/bspfile_abstract.c +++ b/tools/quake3/q3map2/bspfile_abstract.c @@ -268,7 +268,7 @@ int GetLumpElements( bspHeader_t *header, int lump, int size ){ /* check for odd size */ if ( header->lumps[ lump ].length % size ) { if ( force ) { - Sys_Printf( "WARNING: GetLumpElements: odd lump size (%d) in lump %d\n", header->lumps[ lump ].length, lump ); + Sys_FPrintf( SYS_WRN, "WARNING: GetLumpElements: odd lump size (%d) in lump %d\n", header->lumps[ lump ].length, lump ); return 0; } else{ @@ -312,7 +312,7 @@ int CopyLump( bspHeader_t *header, int lump, void *dest, int size ){ } if ( length % size ) { if ( force ) { - Sys_Printf( "WARNING: CopyLump: odd lump size (%d) in lump %d\n", length, lump ); + Sys_FPrintf( SYS_WRN, "WARNING: CopyLump: odd lump size (%d) in lump %d\n", length, lump ); return 0; } else{ diff --git a/tools/quake3/q3map2/convert_ase.c b/tools/quake3/q3map2/convert_ase.c index 4a6c7258..8712c16f 100644 --- a/tools/quake3/q3map2/convert_ase.c +++ b/tools/quake3/q3map2/convert_ase.c @@ -253,7 +253,7 @@ static void ConvertShader( 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; } diff --git a/tools/quake3/q3map2/decals.c b/tools/quake3/q3map2/decals.c index 86421b95..f7471c96 100644 --- a/tools/quake3/q3map2/decals.c +++ b/tools/quake3/q3map2/decals.c @@ -337,7 +337,7 @@ static int MakeDecalProjector( shaderInfo_t *si, vec4_t projection, float distan /* limit check */ if ( numProjectors >= MAX_PROJECTORS ) { - Sys_Printf( "WARNING: MAX_PROJECTORS (%d) exceeded, no more decal projectors available.\n", MAX_PROJECTORS ); + Sys_FPrintf( SYS_WRN, "WARNING: MAX_PROJECTORS (%d) exceeded, no more decal projectors available.\n", MAX_PROJECTORS ); return -2; } @@ -431,7 +431,7 @@ void ProcessDecals( void ){ /* any patches? */ if ( e->patches == NULL ) { - Sys_Printf( "WARNING: Decal entity without any patch meshes, ignoring.\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: Decal entity without any patch meshes, ignoring.\n" ); e->epairs = NULL; /* fixme: leak! */ continue; } @@ -442,7 +442,7 @@ void ProcessDecals( void ){ /* no target? */ if ( e2 == NULL ) { - Sys_Printf( "WARNING: Decal entity without a valid target, ignoring.\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: Decal entity without a valid target, ignoring.\n" ); continue; } diff --git a/tools/quake3/q3map2/exportents.c b/tools/quake3/q3map2/exportents.c index 578f9e42..b1236608 100644 --- a/tools/quake3/q3map2/exportents.c +++ b/tools/quake3/q3map2/exportents.c @@ -64,7 +64,7 @@ void ExportEntities( void ){ /* sanity check */ if ( bspEntData == NULL || bspEntDataSize == 0 ) { - Sys_Printf( "WARNING: No BSP entity data. aborting...\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: No BSP entity data. aborting...\n" ); return; } diff --git a/tools/quake3/q3map2/image.c b/tools/quake3/q3map2/image.c index c1c737f5..2f1ef5f1 100644 --- a/tools/quake3/q3map2/image.c +++ b/tools/quake3/q3map2/image.c @@ -67,13 +67,13 @@ static void LoadDDSBuffer( byte *buffer, int size, byte **pixels, int *width, in /* get dds info */ if ( DDSGetInfo( (ddsBuffer_t*) buffer, &w, &h, &pf ) ) { - Sys_Printf( "WARNING: Invalid DDS texture\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: Invalid DDS texture\n" ); return; } /* only certain types of dds textures are supported */ if ( pf != DDS_PF_ARGB8888 && pf != DDS_PF_DXT1 && pf != DDS_PF_DXT3 && pf != DDS_PF_DXT5 ) { - Sys_Printf( "WARNING: Only DDS texture formats ARGB8888, DXT1, DXT3, and DXT5 are supported (%d)\n", pf ); + Sys_FPrintf( SYS_WRN, "WARNING: Only DDS texture formats ARGB8888, DXT1, DXT3, and DXT5 are supported (%d)\n", pf ); return; } @@ -140,27 +140,27 @@ static void LoadPNGBuffer( byte *buffer, int size, byte **pixels, int *width, in /* determine if this is a png file */ if ( png_sig_cmp( buffer, 0, 8 ) != 0 ) { - Sys_Printf( "WARNING: Invalid PNG file\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: Invalid PNG file\n" ); return; } /* create png structs */ png = png_create_read_struct( PNG_LIBPNG_VER_STRING, NULL, NULL, NULL ); if ( png == NULL ) { - Sys_Printf( "WARNING: Unable to create PNG read struct\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: Unable to create PNG read struct\n" ); return; } info = png_create_info_struct( png ); if ( info == NULL ) { - Sys_Printf( "WARNING: Unable to create PNG info struct\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: Unable to create PNG info struct\n" ); png_destroy_read_struct( &png, NULL, NULL ); return; } end = png_create_info_struct( png ); if ( end == NULL ) { - Sys_Printf( "WARNING: Unable to create PNG end info struct\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: Unable to create PNG end info struct\n" ); png_destroy_read_struct( &png, &info, NULL ); return; } @@ -174,7 +174,7 @@ static void LoadPNGBuffer( byte *buffer, int size, byte **pixels, int *width, in /* set error longjmp */ if ( setjmp( png_jmpbuf(png) ) ) { - Sys_Printf( "WARNING: An error occurred reading PNG image\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: An error occurred reading PNG image\n" ); png_destroy_read_struct( &png, &info, &end ); return; } @@ -403,7 +403,7 @@ image_t *ImageLoad( const char *filename ){ if ( size > 0 ) { if ( LoadJPGBuff( buffer, size, &image->pixels, &image->width, &image->height ) == -1 && image->pixels != NULL ) { // On error, LoadJPGBuff might store a pointer to the error message in image->pixels - Sys_Printf( "WARNING: LoadJPGBuff %s %s\n", name, (unsigned char*) image->pixels ); + Sys_FPrintf( SYS_WRN, "WARNING: LoadJPGBuff: %s\n", (unsigned char*) image->pixels ); } alphaHack = qtrue; } diff --git a/tools/quake3/q3map2/light.c b/tools/quake3/q3map2/light.c index 2571d4d2..6e018159 100644 --- a/tools/quake3/q3map2/light.c +++ b/tools/quake3/q3map2/light.c @@ -442,7 +442,7 @@ void CreateEntityLights( void ){ /* get target */ e2 = FindTargetEntity( target ); if ( e2 == NULL ) { - 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) light->origin[ 0 ], (int) light->origin[ 1 ], (int) light->origin[ 2 ] ); light->photons *= pointScale; } @@ -2513,7 +2513,7 @@ int LightMain( int argc, char **argv ){ /* must be a power of 2 and greater than 2 */ if ( ( ( lmCustomSize - 1 ) & lmCustomSize ) || lmCustomSize < 2 ) { - Sys_Printf( "WARNING: Lightmap size must be a power of 2, greater or equal to 2 pixels.\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: Lightmap size must be a power of 2, greater or equal to 2 pixels.\n" ); lmCustomSize = game->lightmapSize; } i++; diff --git a/tools/quake3/q3map2/light_ydnar.c b/tools/quake3/q3map2/light_ydnar.c index 91f5e047..653607b5 100644 --- a/tools/quake3/q3map2/light_ydnar.c +++ b/tools/quake3/q3map2/light_ydnar.c @@ -1740,9 +1740,8 @@ static qboolean SubmapRawLuxel( rawLightmap_t *lm, int x, int y, float bx, float origin2 = SUPER_ORIGIN( x, y ); //% normal2 = SUPER_NORMAL( x, y ); } - else - { - Error( "Spurious lightmap S vector\n" ); + else{ + Sys_FPrintf( SYS_WRN, "WARNING: Spurious lightmap S vector\n" ); } VectorSubtract( origin2, origin, originVecs[ 0 ] ); @@ -1766,7 +1765,7 @@ static qboolean SubmapRawLuxel( rawLightmap_t *lm, int x, int y, float bx, float //% normal2 = SUPER_NORMAL( x, y ); } else{ - Sys_Printf( "WARNING: Spurious lightmap T vector\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: Spurious lightmap T vector\n" ); } VectorSubtract( origin2, origin, originVecs[ 1 ] ); @@ -2196,7 +2195,7 @@ void IlluminateRawLightmap( int rawLightmapNum ){ /* max of MAX_LIGHTMAPS (4) styles allowed to hit a surface/lightmap */ if ( lightmapNum >= MAX_LIGHTMAPS ) { - Sys_Printf( "WARNING: Hit per-surface style limit (%d)\n", MAX_LIGHTMAPS ); + Sys_FPrintf( SYS_WRN, "WARNING: Hit per-surface style limit (%d)\n", MAX_LIGHTMAPS ); continue; } diff --git a/tools/quake3/q3map2/lightmaps_ydnar.c b/tools/quake3/q3map2/lightmaps_ydnar.c index 462331f1..7366f757 100644 --- a/tools/quake3/q3map2/lightmaps_ydnar.c +++ b/tools/quake3/q3map2/lightmaps_ydnar.c @@ -127,7 +127,7 @@ void ExportLightmaps( void ){ /* sanity check */ if ( bspLightBytes == NULL ) { - Sys_Printf( "WARNING: No BSP lightmap data\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: No BSP lightmap data\n" ); return; } @@ -226,7 +226,7 @@ int ImportLightmapsMain( int argc, char **argv ){ buffer = NULL; len = vfsLoadFile( filename, (void*) &buffer, -1 ); if ( len < 0 ) { - Sys_Printf( "WARNING: Unable to load image %s\n", filename ); + Sys_FPrintf( SYS_WRN, "WARNING: Unable to load image %s\n", filename ); continue; } @@ -237,11 +237,11 @@ int ImportLightmapsMain( int argc, char **argv ){ /* sanity check it */ if ( pixels == NULL ) { - Sys_Printf( "WARNING: Unable to load image %s\n", filename ); + Sys_FPrintf( SYS_WRN, "WARNING: Unable to load image %s\n", filename ); continue; } if ( width != game->lightmapSize || height != game->lightmapSize ) { - Sys_Printf( "WARNING: Image %s is not the right size (%d, %d) != (%d, %d)\n", + Sys_FPrintf( SYS_WRN, "WARNING: Image %s is not the right size (%d, %d) != (%d, %d)\n", filename, width, height, game->lightmapSize, game->lightmapSize ); } @@ -752,7 +752,7 @@ qboolean AddSurfaceToRawLightmap( int num, rawLightmap_t *lm ){ /* check for bogus axis */ if ( faxis[ axisNum ] == 0.0f ) { - Sys_Printf( "WARNING: ProjectSurfaceLightmap: Chose a 0 valued axis\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: ProjectSurfaceLightmap: Chose a 0 valued axis\n" ); lm->w = lm->h = 0; return qfalse; } @@ -971,7 +971,7 @@ void SetupSurfaceLightmaps( void ){ superSample = 1; } else if ( superSample > 8 ) { - Sys_Printf( "WARNING: Insane supersampling amount (%d) detected.\n", superSample ); + Sys_FPrintf( SYS_WRN, "WARNING: Insane supersampling amount (%d) detected.\n", superSample ); superSample = 8; } diff --git a/tools/quake3/q3map2/main.c b/tools/quake3/q3map2/main.c index 146ced8e..2710128b 100644 --- a/tools/quake3/q3map2/main.c +++ b/tools/quake3/q3map2/main.c @@ -232,7 +232,7 @@ int main( int argc, char **argv ){ /* vlight */ else if ( !strcmp( argv[ 1 ], "-vlight" ) ) { - Sys_Printf( "WARNING: VLight is no longer supported, defaulting to -light -fast instead\n\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: VLight is no longer supported, defaulting to -light -fast instead\n\n" ); argv[ 1 ] = "-fast"; /* eek a hack */ r = LightMain( argc, argv ); } diff --git a/tools/quake3/q3map2/map.c b/tools/quake3/q3map2/map.c index d786fc54..22fc166f 100644 --- a/tools/quake3/q3map2/map.c +++ b/tools/quake3/q3map2/map.c @@ -1440,13 +1440,13 @@ void LoadEntityIndexMap( entity_t *e ){ value = ValueForKey( e, "layers" ); } if ( value[ 0 ] == '\0' ) { - Sys_Printf( "WARNING: Entity with index/alpha map \"%s\" has missing \"_layers\" or \"layers\" key\n", indexMapFilename ); + Sys_FPrintf( SYS_WRN, "WARNING: Entity with index/alpha map \"%s\" has missing \"_layers\" or \"layers\" key\n", indexMapFilename ); Sys_Printf( "Entity will not be textured properly. Check your keys/values.\n" ); return; } numLayers = atoi( value ); if ( numLayers < 1 ) { - Sys_Printf( "WARNING: Entity with index/alpha map \"%s\" has < 1 layer (%d)\n", indexMapFilename, numLayers ); + Sys_FPrintf( SYS_WRN, "WARNING: Entity with index/alpha map \"%s\" has < 1 layer (%d)\n", indexMapFilename, numLayers ); Sys_Printf( "Entity will not be textured properly. Check your keys/values.\n" ); return; } @@ -1457,7 +1457,7 @@ void LoadEntityIndexMap( entity_t *e ){ value = ValueForKey( e, "shader" ); } if ( value[ 0 ] == '\0' ) { - Sys_Printf( "WARNING: Entity with index/alpha map \"%s\" has missing \"_shader\" or \"shader\" key\n", indexMapFilename ); + Sys_FPrintf( SYS_WRN, "WARNING: Entity with index/alpha map \"%s\" has missing \"_shader\" or \"shader\" key\n", indexMapFilename ); Sys_Printf( "Entity will not be textured properly. Check your keys/values.\n" ); return; } @@ -1516,7 +1516,7 @@ void LoadEntityIndexMap( entity_t *e ){ /* the index map must be at least 2x2 pixels */ if ( w < 2 || h < 2 ) { - Sys_Printf( "WARNING: Entity with index/alpha map \"%s\" is smaller than 2x2 pixels\n", indexMapFilename ); + Sys_FPrintf( SYS_WRN, "WARNING: Entity with index/alpha map \"%s\" is smaller than 2x2 pixels\n", indexMapFilename ); Sys_Printf( "Entity will not be textured properly. Check your keys/values.\n" ); free( pixels ); return; @@ -1597,7 +1597,7 @@ static qboolean ParseMapEntity( qboolean onlyLights, qboolean noCollapseGroups ) /* conformance check */ if ( strcmp( token, "{" ) ) { - Sys_Printf( "WARNING: ParseEntity: { not found, found %s on line %d - last entity was at: <%4.2f, %4.2f, %4.2f>...\n" + Sys_FPrintf( SYS_WRN, "WARNING: ParseEntity: { not found, found %s on line %d - last entity was at: <%4.2f, %4.2f, %4.2f>...\n" "Continuing to process map, but resulting BSP may be invalid.\n", token, scriptline, entities[ numEntities ].origin[ 0 ], entities[ numEntities ].origin[ 1 ], entities[ numEntities ].origin[ 2 ] ); return qfalse; @@ -1621,7 +1621,7 @@ static qboolean ParseMapEntity( qboolean onlyLights, qboolean noCollapseGroups ) { /* get initial token */ if ( !GetToken( qtrue ) ) { - Sys_Printf( "WARNING: ParseEntity: EOF without closing brace\n" + Sys_FPrintf( SYS_WRN, "WARNING: ParseEntity: EOF without closing brace\n" "Continuing to process map, but resulting BSP may be invalid.\n" ); return qfalse; } @@ -1643,7 +1643,7 @@ static qboolean ParseMapEntity( qboolean onlyLights, qboolean noCollapseGroups ) } else if ( !strcmp( token, "terrainDef" ) ) { //% ParseTerrain(); - Sys_Printf( "WARNING: Terrain entity parsing not supported in this build.\n" ); /* ydnar */ + Sys_FPrintf( SYS_WRN, "WARNING: Terrain entity parsing not supported in this build.\n" ); /* ydnar */ } else if ( !strcmp( token, "brushDef" ) ) { if ( g_bBrushPrimit == BPRIMIT_OLDBRUSHES ) { @@ -1910,7 +1910,7 @@ void LoadMapFile( char *filename, qboolean onlyLights, qboolean noCollapseGroups /* get brush counts */ numMapBrushes = CountBrushList( entities[ 0 ].brushes ); if ( (float) c_detail / (float) numMapBrushes < 0.10f && numMapBrushes > 500 ) { - Sys_Printf( "WARNING: Over 90 percent structural map detected. Compile time may be adversely affected.\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: Over 90 percent structural map detected. Compile time may be adversely affected.\n" ); } /* emit some statistics */ diff --git a/tools/quake3/q3map2/model.c b/tools/quake3/q3map2/model.c index 94a80487..f1b4fdc4 100644 --- a/tools/quake3/q3map2/model.c +++ b/tools/quake3/q3map2/model.c @@ -58,11 +58,11 @@ void PicoPrintFunc( int level, const char *str ){ break; case PICO_WARNING: - Sys_Printf( "WARNING: %s\n", str ); + Sys_FPrintf( SYS_WRN, "WARNING: %s\n", str ); break; case PICO_ERROR: - Sys_Printf( "ERROR: %s\n", str ); + Sys_FPrintf( SYS_ERR, "ERROR: %s\n", str ); break; case PICO_FATAL: @@ -762,7 +762,7 @@ void AddTriangleModels( entity_t *e ){ /* get model name */ model = ValueForKey( e2, "model" ); if ( model[ 0 ] == '\0' ) { - Sys_Printf( "WARNING: misc_model at %i %i %i without a model key\n", + Sys_FPrintf( SYS_WRN, "WARNING: misc_model at %i %i %i without a model key\n", (int) origin[ 0 ], (int) origin[ 1 ], (int) origin[ 2 ] ); continue; } @@ -839,7 +839,7 @@ void AddTriangleModels( entity_t *e ){ /* split the string */ split = strchr( remap->from, ';' ); if ( split == NULL ) { - Sys_Printf( "WARNING: Shader _remap key found in misc_model without a ; character\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: Shader _remap key found in misc_model without a ; character\n" ); free( remap ); remap = remap2; continue; diff --git a/tools/quake3/q3map2/portals.c b/tools/quake3/q3map2/portals.c index aee1446e..de00fe80 100644 --- a/tools/quake3/q3map2/portals.c +++ b/tools/quake3/q3map2/portals.c @@ -519,7 +519,7 @@ 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" ); Sys_Printf( "node has %d tiny portals\n", node->tinyportals ); Sys_Printf( "node reference point %1.2f %1.2f %1.2f\n", node->referencepoint[0], node->referencepoint[1], @@ -811,7 +811,7 @@ void FloodAreas_r( node_t *node ){ // note the current area as bounding the portal if ( b->portalareas[ 1 ] != -1 ) { - Sys_Printf( "WARNING: areaportal brush %i touches > 2 areas\n", b->brushNum ); + Sys_FPrintf( SYS_WRN, "WARNING: areaportal brush %i touches > 2 areas\n", b->brushNum ); return; } if ( b->portalareas[ 0 ] != -1 ) { @@ -898,7 +898,7 @@ void CheckAreas_r( node_t *node ){ if ( node->cluster != -1 ) { if ( node->area == -1 ) { - Sys_Printf( "WARNING: cluster %d has area set to -1\n", node->cluster ); + Sys_FPrintf( SYS_WRN, "WARNING: cluster %d has area set to -1\n", node->cluster ); } } if ( node->areaportal ) { @@ -906,7 +906,7 @@ void CheckAreas_r( node_t *node ){ // check if the areaportal touches two areas if ( b->portalareas[0] == -1 || b->portalareas[1] == -1 ) { - Sys_Printf( "WARNING: areaportal brush %i doesn't touch two areas\n", b->brushNum ); + Sys_FPrintf( SYS_WRN, "WARNING: areaportal brush %i doesn't touch two areas\n", b->brushNum ); } } } diff --git a/tools/quake3/q3map2/shaders.c b/tools/quake3/q3map2/shaders.c index 75cab6b0..18d3db2e 100644 --- a/tools/quake3/q3map2/shaders.c +++ b/tools/quake3/q3map2/shaders.c @@ -383,7 +383,7 @@ void WriteMapShaderFile( void ){ /* open shader file */ file = fopen( mapShaderFile, "w" ); if ( file == NULL ) { - Sys_Printf( "WARNING: Unable to open map shader file %s for writing\n", mapShaderFile ); + Sys_FPrintf( SYS_WRN, "WARNING: Unable to open map shader file %s for writing\n", mapShaderFile ); return; } @@ -773,7 +773,7 @@ static void LoadShaderImages( shaderInfo_t *si ){ if ( si->shaderImage == NULL ) { si->shaderImage = ImageLoad( DEFAULT_IMAGE ); if ( warnImage && strcmp( si->shader, "noshader" ) ) { - Sys_Printf( "WARNING: Couldn't find image for shader %s\n", si->shader ); + Sys_FPrintf( SYS_WRN, "WARNING: Couldn't find image for shader %s\n", si->shader ); } } @@ -839,7 +839,7 @@ shaderInfo_t *ShaderInfoForShader( const char *shaderName ){ /* dummy check */ if ( shaderName == NULL || shaderName[ 0 ] == '\0' ) { - Sys_Printf( "WARNING: Null or empty shader name\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: Null or empty shader name\n" ); shaderName = "missing"; } @@ -1088,7 +1088,7 @@ static void ParseShaderFile( const char *filename ){ else if ( !Q_stricmp( token, "surfaceparm" ) ) { GetTokenAppend( shaderText, qfalse ); if ( ApplySurfaceParm( token, &si->contentFlags, &si->surfaceFlags, &si->compileFlags ) == qfalse ) { - Sys_Printf( "WARNING: Unknown surfaceparm: \"%s\"\n", token ); + Sys_FPrintf( SYS_WRN, "WARNING: Unknown surfaceparm: \"%s\"\n", token ); } } @@ -1569,7 +1569,7 @@ static void ParseShaderFile( const char *filename ){ } else { - Sys_Printf( "WARNING: Unknown value for lightmap axis: %s\n", token ); + Sys_FPrintf( SYS_WRN, "WARNING: Unknown value for lightmap axis: %s\n", token ); VectorClear( si->lightmapAxis ); } } @@ -1584,7 +1584,7 @@ static void ParseShaderFile( const char *filename ){ /* must be a power of 2 */ if ( ( ( si->lmCustomWidth - 1 ) & si->lmCustomWidth ) || ( ( si->lmCustomHeight - 1 ) & si->lmCustomHeight ) ) { - Sys_Printf( "WARNING: Non power-of-two lightmap size specified (%d, %d)\n", + Sys_FPrintf( SYS_WRN, "WARNING: Non power-of-two lightmap size specified (%d, %d)\n", si->lmCustomWidth, si->lmCustomHeight ); si->lmCustomWidth = lmCustomSize; si->lmCustomHeight = lmCustomSize; @@ -1729,7 +1729,7 @@ static void ParseShaderFile( const char *filename ){ } else { - Sys_Printf( "WARNING: Unknown q3map_tcGen method: %s\n", token ); + Sys_FPrintf( SYS_WRN, "WARNING: Unknown q3map_tcGen method: %s\n", token ); VectorClear( si->vecs[ 0 ] ); VectorClear( si->vecs[ 1 ] ); } @@ -1831,7 +1831,7 @@ static void ParseShaderFile( const char *filename ){ /* unknown */ else{ - Sys_Printf( "WARNING: Unknown colorMod method: %s\n", token ); + Sys_FPrintf( SYS_WRN, "WARNING: Unknown colorMod method: %s\n", token ); } } @@ -1869,7 +1869,7 @@ static void ParseShaderFile( const char *filename ){ TCModRotate( si->mod, a ); } else{ - Sys_Printf( "WARNING: Unknown q3map_tcMod method: %s\n", token ); + Sys_FPrintf( SYS_WRN, "WARNING: Unknown q3map_tcMod method: %s\n", token ); } } @@ -1959,7 +1959,7 @@ static void ParseShaderFile( const char *filename ){ GetTokenAppend( shaderText, qfalse ); sprintf( temp, "*mat_%s", token ); if ( ApplySurfaceParm( temp, &si->contentFlags, &si->surfaceFlags, &si->compileFlags ) == qfalse ) { - Sys_Printf( "WARNING: Unknown material \"%s\"\n", token ); + Sys_FPrintf( SYS_WRN, "WARNING: Unknown material \"%s\"\n", token ); } } @@ -1982,7 +1982,7 @@ static void ParseShaderFile( const char *filename ){ { Sys_FPrintf( SYS_VRB, "Attempting to match %s with a known surfaceparm\n", token ); if ( ApplySurfaceParm( &token[ 6 ], &si->contentFlags, &si->surfaceFlags, &si->compileFlags ) == qfalse ) { - Sys_Printf( "WARNING: Unknown q3map_* directive \"%s\"\n", token ); + Sys_FPrintf( SYS_WRN, "WARNING: Unknown q3map_* directive \"%s\"\n", token ); } } #endif @@ -2045,7 +2045,7 @@ static void ParseCustomInfoParms( void ){ /* any content? */ if ( !parsedContent ) { - Sys_Printf( "WARNING: Couldn't find valid custom contentsflag section\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: Couldn't find valid custom contentsflag section\n" ); return; } @@ -2071,7 +2071,7 @@ static void ParseCustomInfoParms( void ){ /* any content? */ if ( !parsedContent ) { - Sys_Printf( "WARNING: Couldn't find valid custom surfaceflag section\n" ); + Sys_FPrintf( SYS_WRN, "WARNING: Couldn't find valid custom surfaceflag section\n" ); } } diff --git a/tools/quake3/q3map2/surface.c b/tools/quake3/q3map2/surface.c index 4a3467f9..04088711 100644 --- a/tools/quake3/q3map2/surface.c +++ b/tools/quake3/q3map2/surface.c @@ -569,7 +569,7 @@ void ClassifySurfaces( int numSurfs, mapDrawSurface_t *ds ){ if ( fabs( dist ) > PLANAR_EPSILON ) { //% if( ds->planeNum >= 0 ) //% { - //% Sys_Printf( "WARNING: Planar surface marked unplanar (%f > %f)\n", fabs( dist ), PLANAR_EPSILON ); + //% Sys_FPrintf( SYS_WRN, "WARNING: Planar surface marked unplanar (%f > %f)\n", fabs( dist ), PLANAR_EPSILON ); //% ds->verts[ i ].color[ 0 ][ 0 ] = ds->verts[ i ].color[ 0 ][ 2 ] = 0; //% } ds->planar = qfalse; @@ -590,7 +590,7 @@ void ClassifySurfaces( int numSurfs, mapDrawSurface_t *ds ){ ds->planeNum = -1; VectorClear( ds->lightmapVecs[ 2 ] ); //% if( ds->type == SURF_META || ds->type == SURF_FACE ) - //% Sys_Printf( "WARNING: Non-planar face (%d): %s\n", ds->planeNum, ds->shaderInfo->shader ); + //% Sys_FPrintf( SYS_WRN, "WARNING: Non-planar face (%d): %s\n", ds->planeNum, ds->shaderInfo->shader ); } /* ----------------------------------------------------------------- @@ -2518,7 +2518,7 @@ void EmitDrawIndexes( mapDrawSurface_t *ds, bspDrawSurface_t *out ){ /* validate the index */ if ( ds->type != SURFACE_PATCH ) { if ( bspDrawIndexes[ numBSPDrawIndexes ] < 0 || bspDrawIndexes[ numBSPDrawIndexes ] >= ds->numVerts ) { - Sys_Printf( "WARNING: %d %s has invalid index %d (%d)\n", + Sys_FPrintf( SYS_WRN, "WARNING: %d %s has invalid index %d (%d)\n", numBSPDrawSurfaces, ds->shaderInfo->shader, bspDrawIndexes[ numBSPDrawIndexes ], @@ -3753,7 +3753,7 @@ void FilterDrawsurfsIntoTree( entity_t *e, tree_t *tree ){ bspDrawSurface_t *out; out = &bspDrawSurfaces[ numBSPDrawSurfaces - 1 ]; if ( out->numVerts == 3 && out->numIndexes > 3 ) { - Sys_Printf( "\nWARNING: Potentially bad %s surface (%d: %d, %d)\n %s\n", + Sys_FPrintf( SYS_WRN, "WARNING: Potentially bad %s surface (%d: %d, %d)\n %s\n", surfaceTypes[ ds->type ], numBSPDrawSurfaces - 1, out->numVerts, out->numIndexes, si->shader ); } diff --git a/tools/quake3/q3map2/surface_extra.c b/tools/quake3/q3map2/surface_extra.c index 676896e4..f184a005 100644 --- a/tools/quake3/q3map2/surface_extra.c +++ b/tools/quake3/q3map2/surface_extra.c @@ -332,7 +332,7 @@ void LoadSurfaceExtraFile( const char *surfaceFilePath ){ Sys_Printf( "Loading %s\n", surfaceFilePath ); size = LoadFile( surfaceFilePath, (void**) &buffer ); if ( size <= 0 ) { - Sys_Printf( "WARNING: Unable to find surface file %s, using defaults.\n", surfaceFilePath ); + Sys_FPrintf( SYS_WRN, "WARNING: Unable to find surface file %s, using defaults.\n", surfaceFilePath ); return; } diff --git a/tools/quake3/q3map2/surface_meta.c b/tools/quake3/q3map2/surface_meta.c index 8d4f3c36..19131c99 100644 --- a/tools/quake3/q3map2/surface_meta.c +++ b/tools/quake3/q3map2/surface_meta.c @@ -1594,7 +1594,7 @@ static int AddMetaTriangleToSurface( mapDrawSurface_t *ds, metaTriangle_t *tri, ( bi == ds->indexes[ i ] && ci == ds->indexes[ i + 2 ] && ai == ds->indexes[ i + 1 ] ) || ( ci == ds->indexes[ i ] && ai == ds->indexes[ i + 2 ] && bi == ds->indexes[ i + 1 ] ) ) { /* warn about it */ - Sys_Printf( "WARNING: Flipped triangle: (%6.0f %6.0f %6.0f) (%6.0f %6.0f %6.0f) (%6.0f %6.0f %6.0f)\n", + Sys_FPrintf( SYS_WRN, "WARNING: Flipped triangle: (%6.0f %6.0f %6.0f) (%6.0f %6.0f %6.0f) (%6.0f %6.0f %6.0f)\n", ds->verts[ ai ].xyz[ 0 ], ds->verts[ ai ].xyz[ 1 ], ds->verts[ ai ].xyz[ 2 ], ds->verts[ bi ].xyz[ 0 ], ds->verts[ bi ].xyz[ 1 ], ds->verts[ bi ].xyz[ 2 ], ds->verts[ ci ].xyz[ 0 ], ds->verts[ ci ].xyz[ 1 ], ds->verts[ ci ].xyz[ 2 ] ); diff --git a/tools/quake3/q3map2/vis.c b/tools/quake3/q3map2/vis.c index 702b7bfe..f5f3c348 100644 --- a/tools/quake3/q3map2/vis.c +++ b/tools/quake3/q3map2/vis.c @@ -210,7 +210,7 @@ void ClusterMerge( int leafnum ){ numvis++; // count the leaf itself - //Sys_FPrintf (SYS_VRB,"cluster %4i : %4i visible\n", leafnum, numvis); + //Sys_FPrintf( SYS_VRB,"cluster %4i : %4i visible\n", leafnum, numvis ); ++clustersizehistogram[numvis]; memcpy( bspVisBytes + VIS_HEADER_SIZE + leafnum * leafbytes, uncompressed, leafbytes ); @@ -1162,9 +1162,8 @@ int VisMain( int argc, char **argv ){ Sys_Printf( "Use %s as portal file\n", portalFilePath ); } - else - { - Sys_Printf( "WARNING: Unknown option \"%s\"\n", argv[ i ] ); + else{ + Sys_FPrintf( SYS_WRN, "WARNING: Unknown option \"%s\"\n", argv[ i ] ); } } diff --git a/tools/quake3/q3map2/writebsp.c b/tools/quake3/q3map2/writebsp.c index 186bbd2f..8ae50098 100644 --- a/tools/quake3/q3map2/writebsp.c +++ b/tools/quake3/q3map2/writebsp.c @@ -164,7 +164,7 @@ void EmitLeaf( node_t *node ){ { /* something is corrupting brushes */ if ( (size_t) b < 256 ) { - Sys_Printf( "WARNING: Node brush list corrupted (0x%08X)\n", b ); + Sys_FPrintf( SYS_WRN, "WARNING: Node brush list corrupted (0x%08X)\n", b ); break; } //% if( b->guard != 0xDEADBEEF ) From d8449157fd4facc0b2da329b630b159677565464 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Sat, 15 Oct 2016 20:00:27 +0200 Subject: [PATCH 3/3] More: Using Sys_FPrintf with SYS_WRN and SYS_ERR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- tools/quake2/q2map/brushbsp.c | 2 +- tools/quake2/q2map/faces.c | 2 +- tools/quake2/q2map/lightmap.c | 2 +- tools/quake2/q2map/main.c | 2 +- tools/quake2/q2map/portals.c | 8 ++++---- tools/quake2/q2map/qvis.c | 2 +- tools/quake3/common/aselib.c | 2 +- tools/quake3/q3map2/convert_ase.c | 2 +- tools/quake3/q3map2/convert_bsp.c | 2 +- tools/quake3/q3map2/convert_obj.c | 6 +++--- tools/quake3/q3map2/image.c | 2 +- tools/quake3/q3map2/light.c | 2 +- tools/quake3/q3map2/light_ydnar.c | 2 +- tools/quake3/q3map2/shaders.c | 2 +- tools/quake3/q3map2/surface.c | 2 +- 15 files changed, 20 insertions(+), 20 deletions(-) diff --git a/tools/quake2/q2map/brushbsp.c b/tools/quake2/q2map/brushbsp.c index 022db653..1be89836 100644 --- a/tools/quake2/q2map/brushbsp.c +++ b/tools/quake2/q2map/brushbsp.c @@ -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 ); } diff --git a/tools/quake2/q2map/faces.c b/tools/quake2/q2map/faces.c index 7607dbc2..1675a61b 100644 --- a/tools/quake2/q2map/faces.c +++ b/tools/quake2/q2map/faces.c @@ -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 diff --git a/tools/quake2/q2map/lightmap.c b/tools/quake2/q2map/lightmap.c index 70c04585..0e763603 100644 --- a/tools/quake2/q2map/lightmap.c +++ b/tools/quake2/q2map/lightmap.c @@ -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 diff --git a/tools/quake2/q2map/main.c b/tools/quake2/q2map/main.c index 4eb3f393..c335dd34 100644 --- a/tools/quake2/q2map/main.c +++ b/tools/quake2/q2map/main.c @@ -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 { diff --git a/tools/quake2/q2map/portals.c b/tools/quake2/q2map/portals.c index 1c83d75d..b26c75f9 100644 --- a/tools/quake2/q2map/portals.c +++ b/tools/quake2/q2map/portals.c @@ -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; } } diff --git a/tools/quake2/q2map/qvis.c b/tools/quake2/q2map/qvis.c index 72e7a46e..f942d1c4 100644 --- a/tools/quake2/q2map/qvis.c +++ b/tools/quake2/q2map/qvis.c @@ -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 ) ); diff --git a/tools/quake3/common/aselib.c b/tools/quake3/common/aselib.c index 6b92d035..7b0085d2 100644 --- a/tools/quake3/common/aselib.c +++ b/tools/quake3/common/aselib.c @@ -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 diff --git a/tools/quake3/q3map2/convert_ase.c b/tools/quake3/q3map2/convert_ase.c index 8712c16f..1b0be1ec 100644 --- a/tools/quake3/q3map2/convert_ase.c +++ b/tools/quake3/q3map2/convert_ase.c @@ -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{ diff --git a/tools/quake3/q3map2/convert_bsp.c b/tools/quake3/q3map2/convert_bsp.c index ac627031..b7dfeffd 100644 --- a/tools/quake3/q3map2/convert_bsp.c +++ b/tools/quake3/q3map2/convert_bsp.c @@ -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" ); diff --git a/tools/quake3/q3map2/convert_obj.c b/tools/quake3/q3map2/convert_obj.c index 64b6dcef..7415eebf 100644 --- a/tools/quake3/q3map2/convert_obj.c +++ b/tools/quake3/q3map2/convert_obj.c @@ -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; } diff --git a/tools/quake3/q3map2/image.c b/tools/quake3/q3map2/image.c index 2f1ef5f1..16c3304a 100644 --- a/tools/quake3/q3map2/image.c +++ b/tools/quake3/q3map2/image.c @@ -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 ) { diff --git a/tools/quake3/q3map2/light.c b/tools/quake3/q3map2/light.c index 6e018159..14a69ae8 100644 --- a/tools/quake3/q3map2/light.c +++ b/tools/quake3/q3map2/light.c @@ -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 ] ); } } diff --git a/tools/quake3/q3map2/light_ydnar.c b/tools/quake3/q3map2/light_ydnar.c index 653607b5..1edff9e3 100644 --- a/tools/quake3/q3map2/light_ydnar.c +++ b/tools/quake3/q3map2/light_ydnar.c @@ -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 ] ); diff --git a/tools/quake3/q3map2/shaders.c b/tools/quake3/q3map2/shaders.c index 18d3db2e..923fe8a4 100644 --- a/tools/quake3/q3map2/shaders.c +++ b/tools/quake3/q3map2/shaders.c @@ -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; diff --git a/tools/quake3/q3map2/surface.c b/tools/quake3/q3map2/surface.c index 04088711..3dcf5f55 100644 --- a/tools/quake3/q3map2/surface.c +++ b/tools/quake3/q3map2/surface.c @@ -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; }