From fd6e36af5a88f5dba6edda4a4ebe36923e726bc3 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sat, 5 May 2012 22:22:59 +0000 Subject: [PATCH] Add bit 16 to the two main setbrightness() users, add bit 2 to one of them. (I.e. also restore r2232 again.) The first one is the palette restore logic in G_DisplayRest, the second is CON setgamepalette, to which the "don't gltexinvalidateall()" bit is added to mimic the first. Hightile invalidations aren't really useful for anything other than reloading them after a video mode change, IMO. These changes mean that 1) active full screen tints should (almost) always be kept with a basepal change. The only exceptions to this are when tints really have to be cleared, e.g. when changing the player view in co-op play. 2) there should be no performance issues with simultaneously changing basepals while a tint is applied git-svn-id: https://svn.eduke32.com/eduke32@2637 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 2 +- polymer/eduke32/source/gameexec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 447ff6887..d4e8aac2d 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -2722,7 +2722,7 @@ void G_DisplayRest(int32_t smoothratio) if (g_restorePalette < 2 || omovethingscnt+1 == g_moveThingsCount) { // g_restorePalette < 0: reset tinting, too (e.g. when loading new game) - P_SetGamePalette(pp,pp->palette, 2 /*+ (g_restorePalette>0)*16*/); + P_SetGamePalette(pp,pp->palette, 2 + (g_restorePalette>0)*16); g_restorePalette = 0; } else diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 304026bc0..4d874959a 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -4456,7 +4456,7 @@ nullquote: case CON_SETGAMEPALETTE: insptr++; - P_SetGamePalette(g_player[vm.g_p].ps, Gv_GetVarX(*(insptr++)),0/*16*/); // XXX: see engine.c:setbrightness + P_SetGamePalette(g_player[vm.g_p].ps, Gv_GetVarX(*(insptr++)), 2+16); continue; case CON_GETTEXTURECEILING: