From c19590a49aa13ab1434a20065e075ce21e20c1c7 Mon Sep 17 00:00:00 2001 From: kitchen-ace <47063032+kitchen-ace@users.noreply.github.com> Date: Tue, 6 Feb 2024 11:30:39 -0500 Subject: [PATCH] Heretic: custom brightmap for serpent torch The stem of the torch uses a colour included in the 'flame' brightmap on a few pixels, and it looks funny in the dark. The head of the torch uses this colour too but it still doesn't look too bad when it's excluded from the brightmap. --- src/heretic/r_bmaps.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/src/heretic/r_bmaps.c b/src/heretic/r_bmaps.c index 8eb216ccbc..0dd6f5818c 100644 --- a/src/heretic/r_bmaps.c +++ b/src/heretic/r_bmaps.c @@ -149,6 +149,26 @@ static const byte flame[256] = 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, }; +static const byte serptorch[256] = +{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, +}; + static const byte ethereal[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -326,10 +346,6 @@ const byte *R_BrightmapForSprite (const int state) case S_FIREBRAZIER6: case S_FIREBRAZIER7: case S_FIREBRAZIER8: - // Serpent Torch - case S_SERPTORCH1: - case S_SERPTORCH2: - case S_SERPTORCH3: // Torch (artifact) case S_ARTI_TRCH1: case S_ARTI_TRCH2: @@ -355,6 +371,14 @@ const byte *R_BrightmapForSprite (const int state) return flame; break; } + // Serpent Torch, has stray pixels with 'flame' map + case S_SERPTORCH1: + case S_SERPTORCH2: + case S_SERPTORCH3: + { + return serptorch; + break; + } // Iron Lich (idle and attack states) case S_HEAD_LOOK: case S_HEAD_FLOAT: