- fixed incorrect 'twodonly' flag set for the base palettes.

This let the palette creator skip all translations for the water and slime palette. Fixes #28.
This commit is contained in:
Christoph Oelckers 2020-07-26 17:56:33 +02:00
parent 07a7cade70
commit 775eabcd3d

View file

@ -1013,11 +1013,11 @@ bool PickTexture(int picnum, FGameTexture* tex, int paletteid, TexturePick& pick
pick.translation = TRANSLATION(usepalette + Translation_Remap, usepalswap);
pick.basepalTint = 0xffffff;
auto& h = lookups.tables[palette];
auto& h = lookups.tables[usepalswap];
bool applytint = false;
// Canvas textures must be treated like hightile replacements in the following code.
if (picnum < 0) picnum = TileFiles.GetTileIndex(tex); // Allow getting replacements also when the texture is not passed by its tile number.
auto rep = (picnum >= 0 && hw_hightile && !(h.tintFlags & TINTF_ALWAYSUSEART)) ? TileFiles.FindReplacement(picnum, palette) : nullptr;
auto rep = (picnum >= 0 && hw_hightile && !(h.tintFlags & TINTF_ALWAYSUSEART)) ? TileFiles.FindReplacement(picnum, usepalswap) : nullptr;
if (rep || tex->GetTexture()->isHardwareCanvas())
{
if (usepalette != 0)
@ -1032,7 +1032,7 @@ bool PickTexture(int picnum, FGameTexture* tex, int paletteid, TexturePick& pick
{
tex = rep->faces[0];
}
if (!rep || rep->palnum != palette || (h.tintFlags & TINTF_APPLYOVERALTPAL)) applytint = true;
if (!rep || rep->palnum != usepalswap || (h.tintFlags & TINTF_APPLYOVERALTPAL)) applytint = true;
pick.translation = 0;
}
else