- fixed bad bit operations when calculating the base palette remap.

The code assumed that the alpha channel is empty, but at this point it already contains the base palette's transparency info and needs to be masked out when using it differently.
This commit is contained in:
Christoph Oelckers 2020-06-08 23:13:01 +02:00
parent a330b46d1a
commit bb3e100c54
1 changed files with 1 additions and 1 deletions

View File

@ -444,7 +444,7 @@ void MakeGoodRemap(uint32_t* BaseColors, uint8_t* Remap)
for (i = 0; i < 256; ++i)
{
sortcopy[i] = BaseColors[i] | (i << 24);
sortcopy[i] = (BaseColors[i] & 0xffffff) | (i << 24);
}
qsort(sortcopy, 256, 4, sortforremap);
for (i = 255; i > 0; --i)