From 4f8dc6c4d001d09af5bda4c8ab8c967cf8ce526b Mon Sep 17 00:00:00 2001 From: staphen Date: Tue, 19 Dec 2023 15:17:34 -0500 Subject: [PATCH] Remove byte order logic from half-transparency lookups --- Source/engine.cpp | 4 ---- Source/engine/palette.cpp | 4 ---- 2 files changed, 8 deletions(-) diff --git a/Source/engine.cpp b/Source/engine.cpp index 80fb017d3..c1705f7cc 100644 --- a/Source/engine.cpp +++ b/Source/engine.cpp @@ -52,11 +52,7 @@ void DrawHalfTransparentAligned32BlendedRectTo(const Surface &out, unsigned sx, while (height-- > 0) { for (unsigned i = 0; i < width; ++i, ++pix) { const uint32_t v = *pix; -#if SDL_BYTEORDER == SDL_LIL_ENDIAN *pix = lookupTable[v & 0xFFFF] | (lookupTable[(v >> 16) & 0xFFFF] << 16); -#else - *pix = lookupTable[(v >> 16) & 0xFFFF] | (lookupTable[v & 0xFFFF] << 16); -#endif } pix += skipX; } diff --git a/Source/engine/palette.cpp b/Source/engine/palette.cpp index b3575dcb1..850ced74a 100644 --- a/Source/engine/palette.cpp +++ b/Source/engine/palette.cpp @@ -107,11 +107,7 @@ void GenerateBlendedLookupTable(std::array &palette, int skipFro #if DEVILUTIONX_PALETTE_TRANSPARENCY_BLACK_16_LUT for (unsigned i = 0; i < 256; ++i) { for (unsigned j = 0; j < 256; ++j) { -#if SDL_BYTEORDER == SDL_LIL_ENDIAN const std::uint16_t index = i | (j << 8); -#else - const std::uint16_t index = j | (i << 8); -#endif paletteTransparencyLookupBlack16[index] = paletteTransparencyLookup[0][i] | (paletteTransparencyLookup[0][j] << 8); } }