From 6e71c6dd043fa94f1ca79a4305fe8ad83c0894b1 Mon Sep 17 00:00:00 2001 From: NepDisk Date: Sun, 14 Dec 2025 23:36:44 -0500 Subject: [PATCH] Revert "Fix 2.1 palette conversion system issues with GL pal render" This reverts commit 7bf997554757b01ff2eaf46195d5b2d70c02afd2. --- src/hardware/hw_cache.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c index 21e8aa648..776761490 100644 --- a/src/hardware/hw_cache.c +++ b/src/hardware/hw_cache.c @@ -1709,7 +1709,7 @@ void HWR_SetMapPalette(void) { RGBA_t RGBA_converted[256]; RGBA_t *palette; - size_t i; + int i; if (!(gamestate == GS_LEVEL || (gamestate == GS_TITLESCREEN && titlemapinaction))) { @@ -1734,26 +1734,6 @@ void HWR_SetMapPalette(void) RGBA_converted[i].s.blue = *(RGB_data++); RGBA_converted[i].s.alpha = 255; } - - // remap the palette from 2.1 to 2.2 indices in compatmode - RGBA_t *palcopy = NULL; - size_t realpalsize = 256; - - if (wadfiles[WADFILENUM(lumpnum)]->compatmode) - { - palcopy = malloc(sizeof(*palcopy)*realpalsize); - memcpy(palcopy, RGBA_converted, sizeof(*palcopy)*realpalsize); - } - - for (i = 0; i < realpalsize; i++) - { - if (palcopy) - RGBA_converted[i].rgba = palcopy[R_InvPaletteRemap(i)].rgba; - } - - if (palcopy) - free(palcopy); - palette = RGBA_converted; }