mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 12:41:21 +00:00
Reformat pcx.c
This commit is contained in:
parent
57b06a8bcf
commit
643cb93e5f
1 changed files with 45 additions and 47 deletions
|
@ -77,12 +77,7 @@ LoadPCX ( char *origname, byte **pic, byte **palette, int *width, int *height )
|
|||
|
||||
raw = &pcx->data;
|
||||
|
||||
if ( ( pcx->manufacturer != 0x0a ) ||
|
||||
( pcx->version != 5 ) ||
|
||||
( pcx->encoding != 1 ) ||
|
||||
( pcx->bits_per_pixel != 8 ) ||
|
||||
( pcx->xmax >= 640 ) ||
|
||||
( pcx->ymax >= 480 ) )
|
||||
if ((pcx->manufacturer != 0x0a) || (pcx->version != 5) || (pcx->encoding != 1) || (pcx->bits_per_pixel != 8) || (pcx->xmax >= 640) || (pcx->ymax >= 480))
|
||||
{
|
||||
ri.Con_Printf(PRINT_ALL, "Bad pcx file %s\n", filename);
|
||||
return;
|
||||
|
@ -150,8 +145,11 @@ GetPCXInfo (char *filename, int *width, int *height)
|
|||
byte *raw;
|
||||
|
||||
ri.FS_LoadFile(filename, (void **)&raw);
|
||||
|
||||
if (!raw)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
pcx = (pcx_t *)raw;
|
||||
|
||||
|
|
Loading…
Reference in a new issue