mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 20:40:47 +00:00
- partially fixed colorization for hires replacements.
This commit is contained in:
parent
3558289d70
commit
e2b6ebec91
2 changed files with 4 additions and 2 deletions
|
@ -408,6 +408,7 @@ void LookupTableInfo::setPaletteTint(int palnum, int r, int g, int b, int sr, in
|
||||||
auto &lookup = tables[palnum];
|
auto &lookup = tables[palnum];
|
||||||
lookup.tintColor = PalEntry(r, g, b);
|
lookup.tintColor = PalEntry(r, g, b);
|
||||||
lookup.tintShade = PalEntry(sr, sg, sb);
|
lookup.tintShade = PalEntry(sr, sg, sb);
|
||||||
|
if (flags == 0) flags = TINTF_COLORIZE;
|
||||||
lookup.tintFlags = flags | TINTF_ENABLE;
|
lookup.tintFlags = flags | TINTF_ENABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -314,7 +314,7 @@ int tileSetSkybox(int picnum, int palnum, const char **facenames, int flags )
|
||||||
static bool PickTexture(FGameTexture* tex, int paletteid, TexturePick& pick)
|
static bool PickTexture(FGameTexture* tex, int paletteid, TexturePick& pick)
|
||||||
{
|
{
|
||||||
if (!tex->isValid() || tex->GetTexelWidth() <= 0 || tex->GetTexelHeight() <= 0) return false;
|
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 usepalswap = GetTranslationIndex(paletteid);
|
||||||
int TextureType = hw_int_useindexedcolortextures? TT_INDEXED : TT_TRUECOLOR;
|
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];
|
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;
|
pick.translation = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue