mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-29 07:41:47 +00:00
pcx: make palette marker optional
This commit is contained in:
parent
a7cb9431b3
commit
a2536cc735
2 changed files with 14 additions and 2 deletions
|
@ -265,9 +265,15 @@ PCX_Decode(const char *name, const byte *raw, int len, byte **pic, byte **palett
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((len > 768) && (((byte *)pcx)[len - 769] == 0x0C))
|
if (len > 768)
|
||||||
{
|
{
|
||||||
memcpy(*palette, (byte *)pcx + len - 768, 768);
|
memcpy(*palette, (byte *)pcx + len - 768, 768);
|
||||||
|
|
||||||
|
if ((((byte *)pcx)[len - 769] != 0x0C))
|
||||||
|
{
|
||||||
|
Com_DPrintf("%s: %s has no palette marker\n",
|
||||||
|
__func__, name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -340,9 +340,15 @@ PCX_Decode(const char *name, const byte *raw, int len, byte **pic, byte **palett
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((len > 768) && (((byte *)pcx)[len - 769] == 0x0C))
|
if (len > 768)
|
||||||
{
|
{
|
||||||
memcpy(*palette, (byte *)pcx + len - 768, 768);
|
memcpy(*palette, (byte *)pcx + len - 768, 768);
|
||||||
|
|
||||||
|
if ((((byte *)pcx)[len - 769] != 0x0C))
|
||||||
|
{
|
||||||
|
R_Printf(PRINT_DEVELOPER, "%s: %s has no palette marker\n",
|
||||||
|
__func__, name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue