From 226f04ddaeeabe6c5a3426c4e508f8bf44750937 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 29 Apr 2012 20:55:10 +0000 Subject: [PATCH] Revert r2232, "don't reset full-screen tint on basepal change" in CON setgamepalette. Because gltexinvalidate*() could be called too often when setgamepalette is used while having a tint overlaid else. Pending thorough analysis/reworking of the 32-bit mode base palette handling / texture invalidation. git-svn-id: https://svn.eduke32.com/eduke32@2620 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/engine.c | 4 ++++ polymer/eduke32/source/gameexec.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index f60573e84..313bfabc4 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -13589,6 +13589,10 @@ void setbrightness(char dabrightness, uint8_t dapalid, uint8_t flags) #ifdef USE_OPENGL if (rendmode >= 3) { + // XXX: paldidchange should really be "oldpalnum!=newpalnum". + // Currently changing the palette while having a tint effect invalidates + // everything, which is bad! + // only reset the textures if the corresponding preserve flags are clear and // either (a) the new palette is different to the last, or (b) the brightness // changed and we couldn't set it using hardware gamma diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index ddd8c71f7..304026bc0 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++)),16); + P_SetGamePalette(g_player[vm.g_p].ps, Gv_GetVarX(*(insptr++)),0/*16*/); // XXX: see engine.c:setbrightness continue; case CON_GETTEXTURECEILING: