mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-01 16:41:22 +00:00
Fixed inconsistent color remapping via translation ranges
https://forum.zdoom.org/viewtopic.php?t=58537
This commit is contained in:
parent
ceffe1ba5f
commit
6db8e71b14
1 changed files with 1 additions and 1 deletions
|
@ -368,7 +368,7 @@ void FRemapTable::AddIndexRange(int start, int end, int pal1, int pal2)
|
||||||
palstep = (pal2 - palcol) / (end - start);
|
palstep = (pal2 - palcol) / (end - start);
|
||||||
for (int i = start; i <= end; palcol += palstep, ++i)
|
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;
|
Remap[j] = k;
|
||||||
Palette[j] = GPalette.BaseColors[k];
|
Palette[j] = GPalette.BaseColors[k];
|
||||||
Palette[j].a = j == 0 ? 0 : 255;
|
Palette[j].a = j == 0 ? 0 : 255;
|
||||||
|
|
Loading…
Reference in a new issue