mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +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;
|
int intval;
|
||||||
bool translationset = false;
|
bool translationset = false;
|
||||||
bool virtBottom;
|
bool virtBottom;
|
||||||
|
bool fillcolorset = false;
|
||||||
|
|
||||||
if (img == NULL || img->UseType == FTexture::TEX_Null)
|
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:
|
case DTA_FillColor:
|
||||||
parms->fillcolor = va_arg(tags, uint32);
|
parms->fillcolor = va_arg(tags, uint32);
|
||||||
|
fillcolorset = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DTA_Translation:
|
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->style.BlendOp == 255)
|
||||||
{
|
{
|
||||||
if (parms->fillcolor != ~0u)
|
if (fillcolorset)
|
||||||
{
|
{
|
||||||
if (parms->alphaChannel)
|
if (parms->alphaChannel)
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,7 +74,7 @@ enum
|
||||||
DTA_DestWidth, // width of area to draw to
|
DTA_DestWidth, // width of area to draw to
|
||||||
DTA_DestHeight, // height of area to draw to
|
DTA_DestHeight, // height of area to draw to
|
||||||
DTA_Alpha, // alpha value for translucency
|
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_Translation, // translation table to recolor the source
|
||||||
DTA_AlphaChannel, // bool: the source is an alpha channel; used with DTA_FillColor
|
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
|
DTA_Clean, // bool: scale texture size and position by CleanXfac and CleanYfac
|
||||||
|
|
Loading…
Reference in a new issue