mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-16 23:41:28 +00:00
Fix patch generation
This commit is contained in:
parent
ce7f81c78d
commit
ae748d6d5c
2 changed files with 11 additions and 1 deletions
|
@ -708,7 +708,8 @@ void HWR_MakePatch (const patch_t *patch, GLPatch_t *grPatch, GLMipmap_t *grMipm
|
|||
{
|
||||
// Dummy variables.
|
||||
INT32 pngwidth, pngheight;
|
||||
patch = (patch_t *)Picture_PNGConvert((const UINT8 *)patch, PICFMT_PATCH, &pngwidth, &pngheight, NULL, NULL, len, NULL, 0);
|
||||
INT16 topoffset, leftoffset;
|
||||
patch = (patch_t *)Picture_PNGConvert((const UINT8 *)patch, PICFMT_PATCH, &pngwidth, &pngheight, &topoffset, &leftoffset, len, NULL, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1478,6 +1478,15 @@ void R_CacheRotSprite(spritenum_t sprnum, UINT8 frame, spriteinfo_t *sprinfo, sp
|
|||
patch = (patch_t *)W_CacheLumpNum(lump, PU_STATIC);
|
||||
lumplength = W_LumpLength(lump);
|
||||
|
||||
#ifndef NO_PNG_LUMPS
|
||||
if (Picture_IsLumpPNG((const UINT8 *)patch, lumplength))
|
||||
{
|
||||
INT32 pngwidth, pngheight;
|
||||
INT16 topoffset, leftoffset;
|
||||
patch = (patch_t *)Picture_PNGConvert((const UINT8 *)patch, PICFMT_PATCH, &pngwidth, &pngheight, &topoffset, &leftoffset, lumplength, NULL, 0);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
// Because there's something wrong with SPR_DFLM, I guess
|
||||
if (!Picture_CheckIfPatch(patch, lumplength))
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue