diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c index 78fc31afc..beda40391 100644 --- a/src/hardware/hw_cache.c +++ b/src/hardware/hw_cache.c @@ -581,8 +581,8 @@ void HWR_FreeTextureCache(void) // free all hardware-converted graphics cached in the heap // our gool is only the textures since user of the texture is the texture cache - Z_FreeTags(PU_HWRCACHE, PU_HWRCACHE); - Z_FreeTags(PU_HWRCACHE_UNLOCKED, PU_HWRCACHE_UNLOCKED); + Z_FreeTag(PU_HWRCACHE); + Z_FreeTag(PU_HWRCACHE_UNLOCKED); // Alam: free the Z_Blocks before freeing it's users @@ -629,8 +629,8 @@ void HWR_SetPalette(RGBA_t *palette) // now flush data texture cache so 32 bit texture are recomputed if (patchformat == GR_RGBA || textureformat == GR_RGBA) { - Z_FreeTags(PU_HWRCACHE, PU_HWRCACHE); - Z_FreeTags(PU_HWRCACHE_UNLOCKED, PU_HWRCACHE_UNLOCKED); + Z_FreeTag(PU_HWRCACHE); + Z_FreeTag(PU_HWRCACHE_UNLOCKED); } } diff --git a/src/z_zone.c b/src/z_zone.c index 4e9efef4b..37ab3d546 100644 --- a/src/z_zone.c +++ b/src/z_zone.c @@ -407,6 +407,11 @@ void Z_FreeTags(INT32 lowtag, INT32 hightag) } } +void Z_FreeTag(INT32 tagnum) +{ + Z_FreeTags(tagnum, tagnum); +} + // // Z_CheckMemCleanup // diff --git a/src/z_zone.h b/src/z_zone.h index baadb44a6..57ad158cf 100644 --- a/src/z_zone.h +++ b/src/z_zone.h @@ -59,6 +59,7 @@ #define PU_HWRPATCHINFO_UNLOCKED 103 void Z_Init(void); +void Z_FreeTag(INT32 tagnum); void Z_FreeTags(INT32 lowtag, INT32 hightag); void Z_CheckMemCleanup(void); void Z_CheckHeap(INT32 i);