From 9ad205f5ba8793949d9476d712875c88f650e838 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sun, 17 Jul 2016 22:33:37 +0100 Subject: [PATCH] R_DrawTiltedSplat_8 fix: apply colormapping AFTER checking the source pixel is cyan first --- src/r_draw8.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/r_draw8.c b/src/r_draw8.c index c22cd2362..ec80774a7 100644 --- a/src/r_draw8.c +++ b/src/r_draw8.c @@ -913,9 +913,9 @@ void R_DrawTiltedSplat_8(void) for (i = SPANSIZE-1; i >= 0; i--) { colormap = planezlight[tiltlighting[ds_x1++]] + (ds_colormap - colormaps); - val = colormap[source[((v >> nflatyshift) & nflatmask) | (u >> nflatxshift)]]; + val = source[((v >> nflatyshift) & nflatmask) | (u >> nflatxshift)]; if (val != TRANSPARENTPIXEL) - *dest = val; + *dest = colormap[val]; dest++; u += stepu; v += stepv; @@ -931,9 +931,9 @@ void R_DrawTiltedSplat_8(void) u = (INT64)(startu); v = (INT64)(startv); colormap = planezlight[tiltlighting[ds_x1++]] + (ds_colormap - colormaps); - val = colormap[source[((v >> nflatyshift) & nflatmask) | (u >> nflatxshift)]]; + val = source[((v >> nflatyshift) & nflatmask) | (u >> nflatxshift)]; if (val != TRANSPARENTPIXEL) - *dest = val; + *dest = colormap[val]; } else { @@ -954,9 +954,9 @@ void R_DrawTiltedSplat_8(void) for (; width != 0; width--) { colormap = planezlight[tiltlighting[ds_x1++]] + (ds_colormap - colormaps); - val = colormap[source[((v >> nflatyshift) & nflatmask) | (u >> nflatxshift)]]; + val = source[((v >> nflatyshift) & nflatmask) | (u >> nflatxshift)]; if (val != TRANSPARENTPIXEL) - *dest = val; + *dest = colormap[val]; dest++; u += stepu; v += stepv;