From d4dba5ed3f349a99559381de0dba5f1c065a37ac Mon Sep 17 00:00:00 2001 From: drfrag Date: Tue, 9 Jun 2020 19:41:28 +0200 Subject: [PATCH] - Add fake missing DTA_Desaturate DrawTexture tag. --- src/v_draw.cpp | 5 +++++ src/v_video.h | 2 ++ wadsrc/static/zscript/base.zs | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/v_draw.cpp b/src/v_draw.cpp index 25675b51e..74e4e09e9 100644 --- a/src/v_draw.cpp +++ b/src/v_draw.cpp @@ -634,6 +634,7 @@ bool DCanvas::ParseDrawTextureTags(FTexture *img, double x, double y, uint32_t t parms->bilinear = false; parms->specialcolormap = NULL; parms->colormapstyle = NULL; + parms->desaturate = 0; parms->cleanmode = DTA_Base; parms->scalex = parms->scaley = 1; parms->cellx = parms->celly = 0; @@ -1010,6 +1011,10 @@ bool DCanvas::ParseDrawTextureTags(FTexture *img, double x, double y, uint32_t t parms->colormapstyle = ListGetColormapStyle(tags); break; + case DTA_Desaturate: + parms->desaturate = ListGetInt(tags); + break; + case DTA_TextLen: parms->maxstrlen = ListGetInt(tags); break; diff --git a/src/v_video.h b/src/v_video.h index fb7bc75ce..5eef1f82f 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -130,6 +130,7 @@ enum DTA_BilinearFilter, // bool: apply bilinear filtering to the image DTA_SpecialColormap,// pointer to FSpecialColormapParameters (likely to be forever hardware-only) DTA_ColormapStyle, // pointer to FColormapStyle (hardware-only) + DTA_Desaturate, // explicit desaturation factor (hack, does not do anything) DTA_Fullscreen, // Draw image fullscreen (same as DTA_VirtualWidth/Height with graphics size.) // floating point duplicates of some of the above: @@ -216,6 +217,7 @@ struct DrawParms FRenderStyle style; struct FSpecialColormap *specialcolormap; struct FColormapStyle *colormapstyle; + int desaturate; int scalex, scaley; int cellx, celly; int monospace; diff --git a/wadsrc/static/zscript/base.zs b/wadsrc/static/zscript/base.zs index 7812fef4c..f829cfe4c 100644 --- a/wadsrc/static/zscript/base.zs +++ b/wadsrc/static/zscript/base.zs @@ -156,7 +156,7 @@ enum DrawTextureTags DTA_ColorOverlay, // DWORD: ARGB to overlay on top of image; limited to black for software DTA_Internal1, DTA_Internal2, - DTA_Internal3, + DTA_Desaturate, // explicit desaturation factor (hack, does not do anything) DTA_Fullscreen, // Draw image fullscreen (same as DTA_VirtualWidth/Height with graphics size.) // floating point duplicates of some of the above: