mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-10 07:20:36 +00:00
Fix the interpretation of old-format PALETTE.DAT
Backported from PCExhumed. git-svn-id: https://svn.eduke32.com/eduke32@8436 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/build/src/palette.cpp
This commit is contained in:
parent
6eec629cfd
commit
efc7365df9
1 changed files with 5 additions and 3 deletions
|
@ -265,13 +265,15 @@ void paletteLoadFromDisk(void)
|
||||||
|
|
||||||
// Read the entries above and on the diagonal, if the table is
|
// Read the entries above and on the diagonal, if the table is
|
||||||
// thought as being row-major.
|
// thought as being row-major.
|
||||||
if (read_and_test(fil, &transluc[256*i + i], 256-i-1))
|
if (read_and_test(fil, &transluc[256*i + i + 1], 255-i))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Duplicate the entries below the diagonal.
|
// Duplicate the entries below the diagonal.
|
||||||
for (bssize_t j=0; j<i; j++)
|
for (bssize_t j=i+1; j<256; j++)
|
||||||
transluc[256*i + j] = transluc[256*j + i];
|
transluc[256*j + i] = transluc[256*i + j];
|
||||||
}
|
}
|
||||||
|
for (bssize_t i=0; i<256; i++)
|
||||||
|
transluc[256*i + i] = i;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue