mirror of
https://github.com/ioquake/ioq3.git
synced 2025-05-30 00:20:59 +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
|
@ -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++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue