From 08627752b20b7ab4754bc5c4ac45a173bb36e0a0 Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 20 Feb 2020 17:25:15 -0800 Subject: [PATCH] Fix NOPNG compiling --- src/r_patch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/r_patch.c b/src/r_patch.c index 4304f3eab..9e31d4d19 100644 --- a/src/r_patch.c +++ b/src/r_patch.c @@ -1212,15 +1212,17 @@ void R_CacheRotSprite(spritenum_t sprnum, UINT8 frame, spriteinfo_t *sprinfo, sp INT32 width, height, leftoffset; fixed_t ca, sa; lumpnum_t lump = sprframe->lumppat[rot]; +#ifndef NO_PNG_LUMPS size_t lumplength; +#endif if (lump == LUMPERROR) return; patch = (patch_t *)W_CacheLumpNum(lump, PU_STATIC); +#ifndef NO_PNG_LUMPS lumplength = W_LumpLength(lump); -#ifndef NO_PNG_LUMPS if (R_IsLumpPNG((UINT8 *)patch, lumplength)) patch = R_PNGToPatch((UINT8 *)patch, lumplength, NULL); else