From e5d43a734adf62a45eb3a744fd2ac88b01805b3d Mon Sep 17 00:00:00 2001 From: Kevin Caccamo Date: Sun, 16 Dec 2018 09:09:58 -0500 Subject: [PATCH] Initial work on Doom64-style fade/glow --- src/hwrenderer/scene/hw_renderstate.h | 2 +- src/namedef.h | 1 + src/p_udmf.cpp | 4 ++++ src/r_defs.h | 5 +++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/hwrenderer/scene/hw_renderstate.h b/src/hwrenderer/scene/hw_renderstate.h index d820c07ec..3ddb80270 100644 --- a/src/hwrenderer/scene/hw_renderstate.h +++ b/src/hwrenderer/scene/hw_renderstate.h @@ -144,7 +144,7 @@ protected: float mInterpolationFactor; FStateVec4 mNormal; - FStateVec4 mColor; + FStateVec4 mColor, mColorAdd; FStateVec4 mGlowTop, mGlowBottom; FStateVec4 mGlowTopPlane, mGlowBottomPlane; FStateVec4 mGradientTopPlane, mGradientBottomPlane; diff --git a/src/namedef.h b/src/namedef.h index e6e409c04..bf8f63b60 100644 --- a/src/namedef.h +++ b/src/namedef.h @@ -584,6 +584,7 @@ xx(Color_Ceiling) xx(Color_Walltop) xx(Color_Wallbottom) xx(Color_Sprites) +xx(Color_Add) xx(Desaturation) xx(SoundSequence) xx(Silent) diff --git a/src/p_udmf.cpp b/src/p_udmf.cpp index b9e3f139e..95d3f06b9 100644 --- a/src/p_udmf.cpp +++ b/src/p_udmf.cpp @@ -1625,6 +1625,10 @@ public: sec->SpecialColors[sector_t::sprites] = CheckInt(key) | 0xff000000; break; + case NAME_Color_Add: + sec->SpecialColors[sector_t::add] = CheckInt(key) | 0xff000000; + break; + case NAME_Desaturation: desaturation = int(255*CheckFloat(key) + FLT_EPSILON); // FLT_EPSILON to avoid rounding errors with numbers slightly below a full integer. continue; diff --git a/src/r_defs.h b/src/r_defs.h index 4c34163b0..c445c1800 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -660,7 +660,8 @@ public: // only used for specialcolors array walltop, wallbottom, - sprites + sprites, + add }; struct splane @@ -973,7 +974,7 @@ public: secplane_t floorplane, ceilingplane; // [RH] give floor and ceiling even more properties - PalEntry SpecialColors[5]; + PalEntry SpecialColors[6]; FColormap Colormap; TObjPtr SoundTarget;