Fixed inconsistent color remapping via translation ranges

https://forum.zdoom.org/viewtopic.php?t=58537
This commit is contained in:
alexey.lysiuk 2017-12-17 13:01:03 +02:00
parent ceffe1ba5f
commit 6db8e71b14
1 changed files with 1 additions and 1 deletions

View File

@ -368,7 +368,7 @@ void FRemapTable::AddIndexRange(int start, int end, int pal1, int pal2)
palstep = (pal2 - palcol) / (end - start);
for (int i = start; i <= end; palcol += palstep, ++i)
{
int j = GPalette.Remap[i], k = GPalette.Remap[int(palcol)];
int j = GPalette.Remap[i], k = GPalette.Remap[int(round(palcol))];
Remap[j] = k;
Palette[j] = GPalette.BaseColors[k];
Palette[j].a = j == 0 ? 0 : 255;