Merge branch 'hwrflipcolchromakey' into 'master'

Fix HWR_DrawFlippedColumnInCache ignoring chroma key TF

See merge request STJr/SRB2!826
This commit is contained in:
SteelT 2020-03-14 22:13:19 -04:00
commit 88fff119ea
1 changed files with 4 additions and 4 deletions

View File

@ -234,11 +234,11 @@ static void HWR_DrawFlippedColumnInCache(const column_t *patchcol, UINT8 *block,
if (mipmap->colormap)
texel = mipmap->colormap[texel];
// transparent pixel
if (texel == HWR_PATCHES_CHROMAKEY_COLORINDEX)
// If the mipmap is chromakeyed, check if the texel's color
// is equivalent to the chroma key's color index.
alpha = 0xff;
if ((mipmap->flags & TF_CHROMAKEYED) && (texel == HWR_PATCHES_CHROMAKEY_COLORINDEX))
alpha = 0x00;
else
alpha = 0xff;
// hope compiler will get this switch out of the loops (dreams...)
// gcc do it ! but vcc not ! (why don't use cygwin gcc for win32 ?)