From 5976acf16b15a1c1f9ef860e910c4a61065a47a6 Mon Sep 17 00:00:00 2001 From: Arsinikk Date: Fri, 6 Dec 2024 01:18:45 -0600 Subject: [PATCH] Fix OpenGL Overlay Invert when under Invuln Colormap --- prboom2/src/gl_main.c | 4 ++-- prboom2/src/gl_struct.h | 2 +- prboom2/src/v_video.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/prboom2/src/gl_main.c b/prboom2/src/gl_main.c index 1624704c7..c1f3f3071 100644 --- a/prboom2/src/gl_main.c +++ b/prboom2/src/gl_main.c @@ -848,9 +848,9 @@ void gld_FillBlock(int x, int y, int width, int height, int col) glsl_PopNullShader(); } -void gld_DrawShaded(int x, int y, int width, int height, int col, int screenshade) +void gld_DrawShaded(int x, int y, int width, int height, int screenshade) { - color_rgb_t color = gld_LookupIndexedColor(col, V_IsUILightmodeIndexed() || V_IsAutomapLightmodeIndexed()); + color_rgb_t color = gld_LookupIndexedColor(playpal_black, V_IsAutomapLightmodeIndexed()); glsl_PushNullShader(); diff --git a/prboom2/src/gl_struct.h b/prboom2/src/gl_struct.h index 8d7d04f44..f07c76fab 100644 --- a/prboom2/src/gl_struct.h +++ b/prboom2/src/gl_struct.h @@ -92,7 +92,7 @@ void gld_DrawLine(int x0, int y0, int x1, int y1, int BaseColor); void gld_DrawLine_f(float x0, float y0, float x1, float y1, int BaseColor); void gld_DrawWeapon(int weaponlump, vissprite_t *vis, int lightlevel); void gld_FillBlock(int x, int y, int width, int height, int col); -void gld_DrawShaded(int x, int y, int width, int height, int col, int screenshade); +void gld_DrawShaded(int x, int y, int width, int height, int screenshade); void gld_SetPalette(int palette); unsigned char *gld_ReadScreen(void); diff --git a/prboom2/src/v_video.c b/prboom2/src/v_video.c index 1a17df5b3..dec35d6ab 100644 --- a/prboom2/src/v_video.c +++ b/prboom2/src/v_video.c @@ -772,7 +772,7 @@ static void WRAP_gld_DrawLine(fline_t* fl, int color) } static void WRAP_gld_DrawShaded(int scrn, int x, int y, int width, int height, int screenshade) { - gld_DrawShaded(x, y, width, height, playpal_black, screenshade); + gld_DrawShaded(x, y, width, height, screenshade); } static void NULL_BeginUIDraw(void) {}