diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c index 061d3fcb7..8f272a297 100644 --- a/src/hardware/hw_cache.c +++ b/src/hardware/hw_cache.c @@ -702,10 +702,12 @@ static void HWR_LoadMappedPatch(GLMipmap_t *grmip, GLPatch_t *gpatch) { patch_t *patch = gpatch->rawpatch; if (!patch) - patch = W_CacheLumpNumPwad(gpatch->wadnum, gpatch->lumpnum, PU_STATIC); + patch = W_CacheLumpNumPwad(gpatch->wadnum, gpatch->lumpnum, PU_STATIC); HWR_MakePatch(patch, gpatch, grmip, true); // You can't free rawpatch for some reason? + // (Obviously I can't, sprite rotation needs that...) + if (!gpatch->rawpatch) Z_Free(patch); } @@ -724,17 +726,7 @@ void HWR_GetPatch(GLPatch_t *gpatch) { /*if (needpatchflush) W_FlushCachedPatches();*/ - - if (!gpatch){ - CONS_Printf("braaaaaaaaaaap gpatch broke"); - return; - } - - if (!gpatch->mipmap){ - CONS_Printf("braaaaaaaaaaap gpatch mipmap broke"); - return; - } - + // is it in hardware cache if (!gpatch->mipmap->downloaded && !gpatch->mipmap->grInfo.data) { @@ -747,7 +739,6 @@ void HWR_GetPatch(GLPatch_t *gpatch) // this is inefficient.. but the hardware patch in heap is purgeable so it should // not fragment memory, and besides the REAL cache here is the hardware memory - // You can't free rawpatch for some reason? if (!gpatch->rawpatch) Z_Free(ptr); } diff --git a/src/hardware/hw_draw.c b/src/hardware/hw_draw.c index fde90758f..cfb9fae2c 100644 --- a/src/hardware/hw_draw.c +++ b/src/hardware/hw_draw.c @@ -141,11 +141,6 @@ void HWR_DrawStretchyFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t if (alphalevel >= 10 && alphalevel < 13) return; - - if (!gpatch){ - CONS_Printf("braaaaaaaaaaap gpatch in stretchypatch broke"); - return; - } // make patch ready in hardware cache if (!colormap)