mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-30 16:01:46 +00:00
Remove newlines from Com_Error calls, patch by DevHC
This commit is contained in:
parent
4cfb7d376b
commit
4b9ab42c2c
12 changed files with 38 additions and 38 deletions
|
@ -189,7 +189,7 @@ void GL_TexEnv( int env )
|
|||
qglTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD );
|
||||
break;
|
||||
default:
|
||||
ri.Error( ERR_DROP, "GL_TexEnv: invalid env '%d' passed\n", env );
|
||||
ri.Error( ERR_DROP, "GL_TexEnv: invalid env '%d' passed", env );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ void GL_State( unsigned long stateBits )
|
|||
break;
|
||||
default:
|
||||
srcFactor = GL_ONE; // to get warning to shut up
|
||||
ri.Error( ERR_DROP, "GL_State: invalid src blend state bits\n" );
|
||||
ri.Error( ERR_DROP, "GL_State: invalid src blend state bits" );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -296,7 +296,7 @@ void GL_State( unsigned long stateBits )
|
|||
break;
|
||||
default:
|
||||
dstFactor = GL_ONE; // to get warning to shut up
|
||||
ri.Error( ERR_DROP, "GL_State: invalid dst blend state bits\n" );
|
||||
ri.Error( ERR_DROP, "GL_State: invalid dst blend state bits" );
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1800,7 +1800,7 @@ void RE_LoadWorldMap( const char *name ) {
|
|||
byte *startMarker;
|
||||
|
||||
if ( tr.worldMapLoaded ) {
|
||||
ri.Error( ERR_DROP, "ERROR: attempted to redundantly load world map\n" );
|
||||
ri.Error( ERR_DROP, "ERROR: attempted to redundantly load world map" );
|
||||
}
|
||||
|
||||
// set default sun direction to be used if it isn't
|
||||
|
|
|
@ -411,7 +411,7 @@ void RE_BeginFrame( stereoFrame_t stereoFrame ) {
|
|||
|
||||
R_SyncRenderThread();
|
||||
if ((err = qglGetError()) != GL_NO_ERROR)
|
||||
ri.Error(ERR_FATAL, "RE_BeginFrame() - glGetError() failed (0x%x)!\n", err);
|
||||
ri.Error(ERR_FATAL, "RE_BeginFrame() - glGetError() failed (0x%x)!", err);
|
||||
}
|
||||
|
||||
if (glConfig.stereoEnabled) {
|
||||
|
|
|
@ -780,14 +780,14 @@ image_t *R_CreateImage( const char *name, const byte *pic, int width, int height
|
|||
long hash;
|
||||
|
||||
if (strlen(name) >= MAX_QPATH ) {
|
||||
ri.Error (ERR_DROP, "R_CreateImage: \"%s\" is too long\n", name);
|
||||
ri.Error (ERR_DROP, "R_CreateImage: \"%s\" is too long", name);
|
||||
}
|
||||
if ( !strncmp( name, "*lightmap", 9 ) ) {
|
||||
isLightmap = qtrue;
|
||||
}
|
||||
|
||||
if ( tr.numImages == MAX_DRAWIMAGES ) {
|
||||
ri.Error( ERR_DROP, "R_CreateImage: MAX_DRAWIMAGES hit\n");
|
||||
ri.Error( ERR_DROP, "R_CreateImage: MAX_DRAWIMAGES hit");
|
||||
}
|
||||
|
||||
image = tr.images[tr.numImages] = ri.Hunk_Alloc( sizeof( image_t ), h_low );
|
||||
|
|
|
@ -76,7 +76,7 @@ void R_LoadBMP( const char *name, byte **pic, int *width, int *height )
|
|||
|
||||
if (length < 54)
|
||||
{
|
||||
ri.Error( ERR_DROP, "LoadBMP: header too short (%s)\n", name );
|
||||
ri.Error( ERR_DROP, "LoadBMP: header too short (%s)", name );
|
||||
}
|
||||
|
||||
buf_p = buffer.b;
|
||||
|
@ -116,7 +116,7 @@ void R_LoadBMP( const char *name, byte **pic, int *width, int *height )
|
|||
if ( bmpHeader.bitsPerPixel == 8 )
|
||||
{
|
||||
if (buf_p + sizeof(bmpHeader.palette) > end)
|
||||
ri.Error( ERR_DROP, "LoadBMP: header too short (%s)\n", name );
|
||||
ri.Error( ERR_DROP, "LoadBMP: header too short (%s)", name );
|
||||
|
||||
Com_Memcpy( bmpHeader.palette, buf_p, sizeof( bmpHeader.palette ) );
|
||||
buf_p += sizeof(bmpHeader.palette);
|
||||
|
@ -124,26 +124,26 @@ void R_LoadBMP( const char *name, byte **pic, int *width, int *height )
|
|||
|
||||
if (buffer.b + bmpHeader.bitmapDataOffset > end)
|
||||
{
|
||||
ri.Error( ERR_DROP, "LoadBMP: invalid offset value in header (%s)\n", name );
|
||||
ri.Error( ERR_DROP, "LoadBMP: invalid offset value in header (%s)", name );
|
||||
}
|
||||
|
||||
buf_p = buffer.b + bmpHeader.bitmapDataOffset;
|
||||
|
||||
if ( bmpHeader.id[0] != 'B' && bmpHeader.id[1] != 'M' )
|
||||
{
|
||||
ri.Error( ERR_DROP, "LoadBMP: only Windows-style BMP files supported (%s)\n", name );
|
||||
ri.Error( ERR_DROP, "LoadBMP: only Windows-style BMP files supported (%s)", name );
|
||||
}
|
||||
if ( bmpHeader.fileSize != length )
|
||||
{
|
||||
ri.Error( ERR_DROP, "LoadBMP: header size does not match file size (%u vs. %u) (%s)\n", bmpHeader.fileSize, length, name );
|
||||
ri.Error( ERR_DROP, "LoadBMP: header size does not match file size (%u vs. %u) (%s)", bmpHeader.fileSize, length, name );
|
||||
}
|
||||
if ( bmpHeader.compression != 0 )
|
||||
{
|
||||
ri.Error( ERR_DROP, "LoadBMP: only uncompressed BMP files supported (%s)\n", name );
|
||||
ri.Error( ERR_DROP, "LoadBMP: only uncompressed BMP files supported (%s)", name );
|
||||
}
|
||||
if ( bmpHeader.bitsPerPixel < 8 )
|
||||
{
|
||||
ri.Error( ERR_DROP, "LoadBMP: monochrome and 4-bit BMP files not supported (%s)\n", name );
|
||||
ri.Error( ERR_DROP, "LoadBMP: monochrome and 4-bit BMP files not supported (%s)", name );
|
||||
}
|
||||
|
||||
switch ( bmpHeader.bitsPerPixel )
|
||||
|
@ -154,7 +154,7 @@ void R_LoadBMP( const char *name, byte **pic, int *width, int *height )
|
|||
case 32:
|
||||
break;
|
||||
default:
|
||||
ri.Error( ERR_DROP, "LoadBMP: illegal pixel_size '%hu' in file '%s'\n", bmpHeader.bitsPerPixel, name );
|
||||
ri.Error( ERR_DROP, "LoadBMP: illegal pixel_size '%hu' in file '%s'", bmpHeader.bitsPerPixel, name );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -167,11 +167,11 @@ void R_LoadBMP( const char *name, byte **pic, int *width, int *height )
|
|||
if(columns <= 0 || !rows || numPixels > 0x1FFFFFFF // 4*1FFFFFFF == 0x7FFFFFFC < 0x7FFFFFFF
|
||||
|| ((numPixels * 4) / columns) / 4 != rows)
|
||||
{
|
||||
ri.Error (ERR_DROP, "LoadBMP: %s has an invalid image size\n", name);
|
||||
ri.Error (ERR_DROP, "LoadBMP: %s has an invalid image size", name);
|
||||
}
|
||||
if(buf_p + numPixels*bmpHeader.bitsPerPixel/8 > end)
|
||||
{
|
||||
ri.Error (ERR_DROP, "LoadBMP: file truncated (%s)\n", name);
|
||||
ri.Error (ERR_DROP, "LoadBMP: file truncated (%s)", name);
|
||||
}
|
||||
|
||||
if ( width )
|
||||
|
|
|
@ -51,7 +51,7 @@ static void R_JPGErrorExit(j_common_ptr cinfo)
|
|||
/* Let the memory manager delete any temp files before we die */
|
||||
jpeg_destroy(cinfo);
|
||||
|
||||
ri.Error(ERR_FATAL, "%s\n", buffer);
|
||||
ri.Error(ERR_FATAL, "%s", buffer);
|
||||
}
|
||||
|
||||
static void R_JPGOutputMessage(j_common_ptr cinfo)
|
||||
|
@ -169,7 +169,7 @@ void R_LoadJPG(const char *filename, unsigned char **pic, int *width, int *heigh
|
|||
ri.FS_FreeFile (fbuffer.v);
|
||||
jpeg_destroy_decompress(&cinfo);
|
||||
|
||||
ri.Error(ERR_DROP, "LoadJPG: %s has an invalid image format: %dx%d*4=%d, components: %d\n", filename,
|
||||
ri.Error(ERR_DROP, "LoadJPG: %s has an invalid image format: %dx%d*4=%d, components: %d", filename,
|
||||
cinfo.output_width, cinfo.output_height, pixelcount * 4, cinfo.output_components);
|
||||
}
|
||||
|
||||
|
@ -298,7 +298,7 @@ empty_output_buffer (j_compress_ptr cinfo)
|
|||
jpeg_destroy_compress(cinfo);
|
||||
|
||||
// Make crash fatal or we would probably leak memory.
|
||||
ri.Error(ERR_FATAL, "Output buffer for encoded JPEG image has insufficient size of %d bytes\n",
|
||||
ri.Error(ERR_FATAL, "Output buffer for encoded JPEG image has insufficient size of %d bytes",
|
||||
dest->size);
|
||||
|
||||
return FALSE;
|
||||
|
|
|
@ -70,7 +70,7 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
|
|||
|
||||
if(length < 18)
|
||||
{
|
||||
ri.Error( ERR_DROP, "LoadTGA: header too short (%s)\n", name );
|
||||
ri.Error( ERR_DROP, "LoadTGA: header too short (%s)", name );
|
||||
}
|
||||
|
||||
buf_p = buffer.b;
|
||||
|
@ -103,17 +103,17 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
|
|||
&& targa_header.image_type!=10
|
||||
&& targa_header.image_type != 3 )
|
||||
{
|
||||
ri.Error (ERR_DROP, "LoadTGA: Only type 2 (RGB), 3 (gray), and 10 (RGB) TGA images supported\n");
|
||||
ri.Error (ERR_DROP, "LoadTGA: Only type 2 (RGB), 3 (gray), and 10 (RGB) TGA images supported");
|
||||
}
|
||||
|
||||
if ( targa_header.colormap_type != 0 )
|
||||
{
|
||||
ri.Error( ERR_DROP, "LoadTGA: colormaps not supported\n" );
|
||||
ri.Error( ERR_DROP, "LoadTGA: colormaps not supported" );
|
||||
}
|
||||
|
||||
if ( ( targa_header.pixel_size != 32 && targa_header.pixel_size != 24 ) && targa_header.image_type != 3 )
|
||||
{
|
||||
ri.Error (ERR_DROP, "LoadTGA: Only 32 or 24 bit images supported (no colormaps)\n");
|
||||
ri.Error (ERR_DROP, "LoadTGA: Only 32 or 24 bit images supported (no colormaps)");
|
||||
}
|
||||
|
||||
columns = targa_header.width;
|
||||
|
@ -122,7 +122,7 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
|
|||
|
||||
if(!columns || !rows || numPixels > 0x7FFFFFFF || numPixels / columns / 4 != rows)
|
||||
{
|
||||
ri.Error (ERR_DROP, "LoadTGA: %s has an invalid image size\n", name);
|
||||
ri.Error (ERR_DROP, "LoadTGA: %s has an invalid image size", name);
|
||||
}
|
||||
|
||||
|
||||
|
@ -131,7 +131,7 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
|
|||
if (targa_header.id_length != 0)
|
||||
{
|
||||
if (buf_p + targa_header.id_length > end)
|
||||
ri.Error( ERR_DROP, "LoadTGA: header too short (%s)\n", name );
|
||||
ri.Error( ERR_DROP, "LoadTGA: header too short (%s)", name );
|
||||
|
||||
buf_p += targa_header.id_length; // skip TARGA image comment
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
|
|||
{
|
||||
if(buf_p + columns*rows*targa_header.pixel_size/8 > end)
|
||||
{
|
||||
ri.Error (ERR_DROP, "LoadTGA: file truncated (%s)\n", name);
|
||||
ri.Error (ERR_DROP, "LoadTGA: file truncated (%s)", name);
|
||||
}
|
||||
|
||||
// Uncompressed RGB or gray scale image
|
||||
|
@ -183,7 +183,7 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
|
|||
*pixbuf++ = alphabyte;
|
||||
break;
|
||||
default:
|
||||
ri.Error( ERR_DROP, "LoadTGA: illegal pixel_size '%d' in file '%s'\n", targa_header.pixel_size, name );
|
||||
ri.Error( ERR_DROP, "LoadTGA: illegal pixel_size '%d' in file '%s'", targa_header.pixel_size, name );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -201,12 +201,12 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
|
|||
pixbuf = targa_rgba + row*columns*4;
|
||||
for(column=0; column<columns; ) {
|
||||
if(buf_p + 1 > end)
|
||||
ri.Error (ERR_DROP, "LoadTGA: file truncated (%s)\n", name);
|
||||
ri.Error (ERR_DROP, "LoadTGA: file truncated (%s)", name);
|
||||
packetHeader= *buf_p++;
|
||||
packetSize = 1 + (packetHeader & 0x7f);
|
||||
if (packetHeader & 0x80) { // run-length packet
|
||||
if(buf_p + targa_header.pixel_size/8 > end)
|
||||
ri.Error (ERR_DROP, "LoadTGA: file truncated (%s)\n", name);
|
||||
ri.Error (ERR_DROP, "LoadTGA: file truncated (%s)", name);
|
||||
switch (targa_header.pixel_size) {
|
||||
case 24:
|
||||
blue = *buf_p++;
|
||||
|
@ -221,7 +221,7 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
|
|||
alphabyte = *buf_p++;
|
||||
break;
|
||||
default:
|
||||
ri.Error( ERR_DROP, "LoadTGA: illegal pixel_size '%d' in file '%s'\n", targa_header.pixel_size, name );
|
||||
ri.Error( ERR_DROP, "LoadTGA: illegal pixel_size '%d' in file '%s'", targa_header.pixel_size, name );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,7 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
|
|||
else { // non run-length packet
|
||||
|
||||
if(buf_p + targa_header.pixel_size/8*packetSize > end)
|
||||
ri.Error (ERR_DROP, "LoadTGA: file truncated (%s)\n", name);
|
||||
ri.Error (ERR_DROP, "LoadTGA: file truncated (%s)", name);
|
||||
for(j=0;j<packetSize;j++) {
|
||||
switch (targa_header.pixel_size) {
|
||||
case 24:
|
||||
|
@ -267,7 +267,7 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height)
|
|||
*pixbuf++ = alphabyte;
|
||||
break;
|
||||
default:
|
||||
ri.Error( ERR_DROP, "LoadTGA: illegal pixel_size '%d' in file '%s'\n", targa_header.pixel_size, name );
|
||||
ri.Error( ERR_DROP, "LoadTGA: illegal pixel_size '%d' in file '%s'", targa_header.pixel_size, name );
|
||||
break;
|
||||
}
|
||||
column++;
|
||||
|
|
|
@ -1096,7 +1096,7 @@ static void ComputeTexCoords( shaderStage_t *pStage ) {
|
|||
break;
|
||||
|
||||
default:
|
||||
ri.Error( ERR_DROP, "ERROR: unknown texmod '%d' in shader '%s'\n", pStage->bundle[b].texMods[tm].type, tess.shader->name );
|
||||
ri.Error( ERR_DROP, "ERROR: unknown texmod '%d' in shader '%s'", pStage->bundle[b].texMods[tm].type, tess.shader->name );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ static float *TableForFunc( genFunc_t func )
|
|||
break;
|
||||
}
|
||||
|
||||
ri.Error( ERR_DROP, "TableForFunc called with invalid function '%d' in shader '%s'\n", func, tess.shader->name );
|
||||
ri.Error( ERR_DROP, "TableForFunc called with invalid function '%d' in shader '%s'", func, tess.shader->name );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -363,7 +363,7 @@ static void ParseTexMod( char *_text, shaderStage_t *stage )
|
|||
texModInfo_t *tmi;
|
||||
|
||||
if ( stage->bundle[0].numTexMods == TR_MAX_TEXMODS ) {
|
||||
ri.Error( ERR_DROP, "ERROR: too many tcMod stages in shader '%s'\n", shader.name );
|
||||
ri.Error( ERR_DROP, "ERROR: too many tcMod stages in shader '%s'", shader.name );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -475,7 +475,7 @@ static void FillCloudySkySide( const int mins[2], const int maxs[2], qboolean ad
|
|||
|
||||
if ( tess.numVertexes >= SHADER_MAX_VERTEXES )
|
||||
{
|
||||
ri.Error( ERR_DROP, "SHADER_MAX_VERTEXES hit in FillCloudySkySide()\n" );
|
||||
ri.Error( ERR_DROP, "SHADER_MAX_VERTEXES hit in FillCloudySkySide()" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -719,7 +719,7 @@ void GLimp_Init( void )
|
|||
}
|
||||
|
||||
// Nothing worked, give up
|
||||
ri.Error( ERR_FATAL, "GLimp_Init() - could not load OpenGL subsystem\n" );
|
||||
ri.Error( ERR_FATAL, "GLimp_Init() - could not load OpenGL subsystem" );
|
||||
|
||||
success:
|
||||
// This values force the UI to disable driver selection
|
||||
|
|
Loading…
Reference in a new issue