- added DTA_LegacyRenderStyle so that STYLE_* constants can be passed directly to the Draw functions.

- fixed the optional parameter in Shape2D.Clear.
This commit is contained in:
Christoph Oelckers 2018-07-14 22:58:24 +02:00
parent ed856085f4
commit 7a692b1557
4 changed files with 9 additions and 3 deletions

View File

@ -40,7 +40,7 @@ IMPLEMENT_CLASS(DShape2D, false, false)
DEFINE_ACTION_FUNCTION(DShape2D, Clear)
{
PARAM_SELF_PROLOGUE(DShape2D);
PARAM_INT(which);
PARAM_INT_DEF(which);
if ( which&C_Verts ) self->mVertices.Clear();
if ( which&C_Coords ) self->mCoords.Clear();
if ( which&C_Indices ) self->mIndices.Clear();

View File

@ -839,6 +839,10 @@ bool DFrameBuffer::ParseDrawTextureTags(FTexture *img, double x, double y, uint3
parms->style.AsDWORD = ListGetInt(tags);
break;
case DTA_LegacyRenderStyle: // mainly for ZScript which does not handle FRenderStyle that well.
parms->style = (ERenderStyle)ListGetInt(tags);
break;
case DTA_SpecialColormap:
parms->specialcolormap = ListGetSpecialColormap(tags);
break;

View File

@ -195,7 +195,8 @@ enum
DTA_SrcX, // specify a source rectangle (this supersedes the poorly implemented DTA_WindowLeft/Right
DTA_SrcY,
DTA_SrcWidth,
DTA_SrcHeight
DTA_SrcHeight,
DTA_LegacyRenderStyle, // takes an old-style STYLE_* constant instead of an FRenderStyle
};

View File

@ -161,7 +161,8 @@ enum DrawTextureTags
DTA_SrcX, // specify a source rectangle (this supersedes the poorly implemented DTA_WindowLeft/Right
DTA_SrcY,
DTA_SrcWidth,
DTA_SrcHeight
DTA_SrcHeight,
DTA_LegacyRenderStyle, // takes an old-style STYLE_* constant instead of an FRenderStyle
};