From 3de298f8947e684d0c4d54f96a50db7726b14b63 Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Thu, 14 Sep 2023 19:40:51 +0200 Subject: [PATCH] take clean screenshots with the base palette --- src/g_game.c | 3 +++ src/st_stuff.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/src/g_game.c b/src/g_game.c index bbfad614..e818ab1c 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2231,6 +2231,9 @@ void G_CleanScreenshot(void) { int old_screenblocks; boolean old_hide_weapon; + extern void ST_ResetPalette(void); + + ST_ResetPalette(); old_screenblocks = screenblocks; old_hide_weapon = hide_weapon; diff --git a/src/st_stuff.c b/src/st_stuff.c index aeeb908d..4faba4ea 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1304,6 +1304,12 @@ void ST_Init(void) screens[4] = Z_Malloc(MAX_SCREENWIDTH*ST_HEIGHT*4, PU_STATIC, 0); } +void ST_ResetPalette(void) +{ + st_palette = -1; + I_SetPalette(W_CacheLumpNum(lu_palette, PU_CACHE)); +} + //---------------------------------------------------------------------------- // // $Log: st_stuff.c,v $