mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- fixed palette setup for duplicate base palettes.
Due to some old code it could happen that these weren't fully set up and missed their translations. Fixes #301 - Blood's invulnerability palette is identical to the base.
This commit is contained in:
parent
addfe4e904
commit
184d9be6b1
1 changed files with 5 additions and 8 deletions
|
@ -268,16 +268,13 @@ void LookupTableInfo::postLoadLookups()
|
|||
{
|
||||
const uint8_t* lookup = (uint8_t*)tables[l].Shades.GetChars();
|
||||
FRemapTable remap;
|
||||
if (i == 0 || (palette != basepalette && !palette->TwodOnly))
|
||||
memcpy(remap.Remap, lookup, 256);
|
||||
for (int j = 0; j < 256; j++)
|
||||
{
|
||||
memcpy(remap.Remap, lookup, 256);
|
||||
for (int j = 0; j < 256; j++)
|
||||
{
|
||||
remap.Palette[j] = palette->Palette[remap.Remap[j]];
|
||||
}
|
||||
remap.NumEntries = 256;
|
||||
GPalette.UpdateTranslation(TRANSLATION(i + Translation_Remap, l), &remap);
|
||||
remap.Palette[j] = palette->Palette[remap.Remap[j]];
|
||||
}
|
||||
remap.NumEntries = 256;
|
||||
GPalette.UpdateTranslation(TRANSLATION(i + Translation_Remap, l), &remap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue