From c70c98362032a0e0a8c2928dbf7b8cf8032dc56b 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 909733cd8..0020ab358 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 5a77e49ad..8e7ce2cc0 100644 --- a/Source/engine/palette.cpp +++ b/Source/engine/palette.cpp @@ -103,11 +103,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); } }