Skip to content
Permalink
Browse files

- 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.
  • Loading branch information...
madame-rachelle committed Oct 21, 2019
1 parent a601350 commit d20601d65e7af221afedc8f2563fabfc1ede1cbf
Showing with 1 addition and 1 deletion.
  1. +1 −1 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];

0 comments on commit d20601d

Please sign in to comment.
You can’t perform that action at this time.