mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-17 01:21:12 +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;
|
raw = &pcx->data;
|
||||||
|
|
||||||
if ( ( pcx->manufacturer != 0x0a ) ||
|
if ((pcx->manufacturer != 0x0a) || (pcx->version != 5) || (pcx->encoding != 1) || (pcx->bits_per_pixel != 8) || (pcx->xmax >= 640) || (pcx->ymax >= 480))
|
||||||
( 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);
|
ri.Con_Printf(PRINT_ALL, "Bad pcx file %s\n", filename);
|
||||||
return;
|
return;
|
||||||
|
@ -150,8 +145,11 @@ GetPCXInfo (char *filename, int *width, int *height)
|
||||||
byte *raw;
|
byte *raw;
|
||||||
|
|
||||||
ri.FS_LoadFile(filename, (void **)&raw);
|
ri.FS_LoadFile(filename, (void **)&raw);
|
||||||
|
|
||||||
if (!raw)
|
if (!raw)
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
pcx = (pcx_t *)raw;
|
pcx = (pcx_t *)raw;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue