Use a different var to track unset DTA_FillColor instead of a default value

- If palette index 255 happens to be white (e.g. as in Hexen), trying to
  use white with DTA_FillColor would treat it as if you had never passed
  it to DrawTexture().
This commit is contained in:
Randy Heit 2015-04-22 22:13:49 -05:00
commit 03c3621bb4
2 changed files with 4 additions and 2 deletions

View file

@ -333,6 +333,7 @@ bool DCanvas::ParseDrawTextureTags (FTexture *img, double x, double y, DWORD tag
int intval;
bool translationset = false;
bool virtBottom;
bool fillcolorset = false;
if (img == NULL || img->UseType == FTexture::TEX_Null)
{
@ -539,6 +540,7 @@ bool DCanvas::ParseDrawTextureTags (FTexture *img, double x, double y, DWORD tag
case DTA_FillColor:
parms->fillcolor = va_arg(tags, uint32);
fillcolorset = true;
break;
case DTA_Translation:
@ -711,7 +713,7 @@ bool DCanvas::ParseDrawTextureTags (FTexture *img, double x, double y, DWORD tag
if (parms->style.BlendOp == 255)
{
if (parms->fillcolor != ~0u)
if (fillcolorset)
{
if (parms->alphaChannel)
{