From d20601d65e7af221afedc8f2563fabfc1ede1cbf Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Mon, 21 Oct 2019 05:31:34 -0400 Subject: [PATCH] - fixed: made `Col2RGB8_2[]` in `BuildTransTable()` static, the array was originally designed to be used in the global in scope but when it was moved to be local it did not init properly, causing transparency issues in the software renderer. --- src/r_data/v_palette.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r_data/v_palette.cpp b/src/r_data/v_palette.cpp index b85c95ee7..d24163fb9 100644 --- a/src/r_data/v_palette.cpp +++ b/src/r_data/v_palette.cpp @@ -321,6 +321,7 @@ void ReadPalette(int lumpnum, uint8_t *buffer) static void BuildTransTable (const PalEntry *palette) { int r, g, b; + static uint32_t Col2RGB8_2[63][256]; // create the RGB555 lookup table for (r = 0; r < 32; r++) @@ -344,7 +345,6 @@ static void BuildTransTable (const PalEntry *palette) // create the swizzled palette with the lsb of red and blue forced to 0 // (for green, a 1 is okay since it never gets added into) - uint32_t Col2RGB8_2[63][256]; for (x = 1; x < 64; x++) { Col2RGB8_LessPrecision[x] = Col2RGB8_2[x-1];