- partially fixed colorization for hires replacements.

This commit is contained in:
Christoph Oelckers 2020-11-10 23:59:04 +01:00
parent 3558289d70
commit e2b6ebec91
2 changed files with 4 additions and 2 deletions

View file

@ -408,6 +408,7 @@ void LookupTableInfo::setPaletteTint(int palnum, int r, int g, int b, int sr, in
auto &lookup = tables[palnum];
lookup.tintColor = PalEntry(r, g, b);
lookup.tintShade = PalEntry(sr, sg, sb);
if (flags == 0) flags = TINTF_COLORIZE;
lookup.tintFlags = flags | TINTF_ENABLE;
}

View file

@ -314,7 +314,7 @@ int tileSetSkybox(int picnum, int palnum, const char **facenames, int flags )
static bool PickTexture(FGameTexture* tex, int paletteid, TexturePick& pick)
{
if (!tex->isValid() || tex->GetTexelWidth() <= 0 || tex->GetTexelHeight() <= 0) return false;
int usepalette = GetTranslationType(paletteid) - Translation_Remap;
int usepalette = paletteid == 0? 0 : GetTranslationType(paletteid) - Translation_Remap;
int usepalswap = GetTranslationIndex(paletteid);
int TextureType = hw_int_useindexedcolortextures? TT_INDEXED : TT_TRUECOLOR;
@ -339,7 +339,8 @@ static bool PickTexture(FGameTexture* tex, int paletteid, TexturePick& pick)
{
tex = rep->faces[0];
}
if (!rep || rep->palnum != usepalswap || (h.tintFlags & TINTF_APPLYOVERALTPAL)) applytint = true;
if (!rep || rep->palnum != usepalswap || (h.tintFlags & TINTF_APPLYOVERALTPAL))
applytint = true;
pick.translation = 0;
}
else