mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
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:
parent
a7ff9478a7
commit
03c3621bb4
2 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -74,7 +74,7 @@ enum
|
|||
DTA_DestWidth, // width of area to draw to
|
||||
DTA_DestHeight, // height of area to draw to
|
||||
DTA_Alpha, // alpha value for translucency
|
||||
DTA_FillColor, // color to stencil onto the destination
|
||||
DTA_FillColor, // color to stencil onto the destination (RGB is the color for truecolor drawers, A is the palette index for paletted drawers)
|
||||
DTA_Translation, // translation table to recolor the source
|
||||
DTA_AlphaChannel, // bool: the source is an alpha channel; used with DTA_FillColor
|
||||
DTA_Clean, // bool: scale texture size and position by CleanXfac and CleanYfac
|
||||
|
|
Loading…
Reference in a new issue