From 94cb36ae53a15b871f2097948dcdc5ce3a2cbe77 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 25 May 2020 00:33:25 +0200 Subject: [PATCH] - removed helper #ifdefs. --- source/build/src/palette.cpp | 2 -- source/core/textures/buildtiles.cpp | 6 ------ 2 files changed, 8 deletions(-) diff --git a/source/build/src/palette.cpp b/source/build/src/palette.cpp index 7e00f7528..73b3b263a 100644 --- a/source/build/src/palette.cpp +++ b/source/build/src/palette.cpp @@ -265,7 +265,6 @@ void palettePostLoadLookups(void) } } } -#if 1 //def SWAP_255 // Swap colors 0 and 255 in all tables so that all paletted images have their transparent color at index 0. // This means: // - Swap palette and remap entries in all stored remap tables @@ -288,7 +287,6 @@ void palettePostLoadLookups(void) } colorswap(&GPalette.GlobalBrightmap); std::swap(GPalette.BaseColors[0], GPalette.BaseColors[255]); -#endif } //========================================================================== diff --git a/source/core/textures/buildtiles.cpp b/source/core/textures/buildtiles.cpp index abe642586..f6af79c25 100644 --- a/source/core/textures/buildtiles.cpp +++ b/source/core/textures/buildtiles.cpp @@ -113,14 +113,12 @@ static FTexture* GetTileTexture(const char* name, const TArray& backing auto tex = new FArtTile(backingstore, offset, width, height); auto p = &backingstore[offset]; auto siz = width * height; -#if 1 //def SWAP_255 for (int i = 0; i < siz; i++, p++) { // move transparent color to index 0 to get in line with the rest of the texture management. if (*p == 0) *p = 255; else if (*p == 255) *p = 0; } -#endif if (tex) { @@ -509,7 +507,6 @@ int32_t tileGetCRC32(int tileNum) auto size = tile->GetWidth() * tile->GetHeight(); if (size == 0) return 0; -#if 1 //def SWAP_255 // Temporarily revert the data to its original form with 255 being transparent. Otherwise the CRC won't match. auto p = pixels; for (int i = 0; i < size; i++, p++) @@ -518,11 +515,9 @@ int32_t tileGetCRC32(int tileNum) if (*p == 0) *p = 255; else if (*p == 255) *p = 0; } -#endif auto crc = crc32(0, (const Bytef*)pixels, size); -#if 1 //def SWAP_255 // ... and back again. p = pixels; for (int i = 0; i < size; i++, p++) @@ -531,7 +526,6 @@ int32_t tileGetCRC32(int tileNum) if (*p == 0) *p = 255; else if (*p == 255) *p = 0; } -#endif return crc; }