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
This commit is contained in:
helixhorned 2012-05-05 22:22:59 +00:00
parent ebbb3e304d
commit fd6e36af5a
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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: