From 6e3a49b065b00fb69695cec45601c35e7c0fdccd Mon Sep 17 00:00:00 2001 From: raa-eruanna Date: Thu, 29 Sep 2016 21:29:40 -0400 Subject: [PATCH] Multilayer skies (Hexen) now properly show in truecolor mode. This is only supported for paletted skies, but it still offers a true-color output. --- src/r_plane.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/r_plane.cpp b/src/r_plane.cpp index 7c4e443587..0cfd51ca56 100644 --- a/src/r_plane.cpp +++ b/src/r_plane.cpp @@ -920,7 +920,7 @@ static const BYTE *R_GetTwoSkyColumns (FTexture *fronttex, int x) } else { - return R_GetOneSkyColumn(fronttex, x); + //return R_GetOneSkyColumn(fronttex, x); for (i = 0; i < 4; ++i) { if (lastskycol_bgra[i] == skycol) @@ -939,11 +939,14 @@ static const BYTE *R_GetTwoSkyColumns (FTexture *fronttex, int x) const uint32_t *front = (const uint32_t *)fronttex->GetColumnBgra(angle1, NULL); const uint32_t *back = (const uint32_t *)backskytex->GetColumnBgra(angle2, NULL); + //[SP] Paletted version is used for comparison only + const BYTE *frontcompare = fronttex->GetColumn(angle1, NULL); + int count = MIN(512, MIN(backskytex->GetHeight(), fronttex->GetHeight())); i = 0; do { - if (front[i]) + if (frontcompare[i]) { composite[i] = front[i]; }