mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 15:32:33 +00:00
Merge branch 'rscache' into 'master'
Fix R_CacheRotSprite not working with PNG lumps See merge request STJr/SRB2!800
This commit is contained in:
commit
a447a3d8a9
1 changed files with 10 additions and 1 deletions
|
@ -1212,14 +1212,23 @@ void R_CacheRotSprite(spritenum_t sprnum, UINT8 frame, spriteinfo_t *sprinfo, sp
|
||||||
INT32 width, height, leftoffset;
|
INT32 width, height, leftoffset;
|
||||||
fixed_t ca, sa;
|
fixed_t ca, sa;
|
||||||
lumpnum_t lump = sprframe->lumppat[rot];
|
lumpnum_t lump = sprframe->lumppat[rot];
|
||||||
|
size_t lumplength;
|
||||||
|
|
||||||
if (lump == LUMPERROR)
|
if (lump == LUMPERROR)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
patch = (patch_t *)W_CacheLumpNum(lump, PU_STATIC);
|
||||||
|
lumplength = W_LumpLength(lump);
|
||||||
|
|
||||||
|
#ifndef NO_PNG_LUMPS
|
||||||
|
if (R_IsLumpPNG((UINT8 *)patch, lumplength))
|
||||||
|
patch = R_PNGToPatch((UINT8 *)patch, lumplength, NULL);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
// Because there's something wrong with SPR_DFLM, I guess
|
// Because there's something wrong with SPR_DFLM, I guess
|
||||||
if (!R_CheckIfPatch(lump))
|
if (!R_CheckIfPatch(lump))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
patch = (patch_t *)W_CacheLumpNum(lump, PU_STATIC);
|
|
||||||
width = patch->width;
|
width = patch->width;
|
||||||
height = patch->height;
|
height = patch->height;
|
||||||
leftoffset = patch->leftoffset;
|
leftoffset = patch->leftoffset;
|
||||||
|
|
Loading…
Reference in a new issue