From b91a9928c675e6dba04f8a51956442ced85d9254 Mon Sep 17 00:00:00 2001 From: toaster Date: Sat, 13 Feb 2021 12:04:57 +0000 Subject: [PATCH] Fixed the Encore mode invert wipe. Explanation: NearestColor takes UINT8 inputs, but is being provided a number in the range of 1 to 256(!!) - which means very dark channels were looping back around to 0. This error might exist in public branches too, because I don't think Encore's wipes would have been changed internally without us knowing. --- src/v_video.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/v_video.c b/src/v_video.c index 3e2935a46..f0c7e1a13 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -1517,9 +1517,9 @@ void V_EncoreInvertScreen(void) for (; buf < deststop; ++buf) { *buf = NearestColor( - 256 - pLocalPalette[*buf].s.red, - 256 - pLocalPalette[*buf].s.green, - 256 - pLocalPalette[*buf].s.blue + 255 - pLocalPalette[*buf].s.red, + 255 - pLocalPalette[*buf].s.green, + 255 - pLocalPalette[*buf].s.blue ); } }