The earlier changes introduced bugs when palettes were not set correctly in

certain situations (mostly cutscenes etc). This commit removes bit 1 from all
flags that make it to setbrightness, the meaning of which is "don't actually
update the palette". I have no idea what it was for and since the corresponding
P_SetGamePalette() calls were from places like the mentioned cutscenes, I don't
think it matters performance-wise.

git-svn-id: https://svn.eduke32.com/eduke32@2223 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-12-28 20:35:23 +00:00
parent 92e5d8214d
commit 65deeda53a
6 changed files with 18 additions and 17 deletions

View File

@ -349,7 +349,7 @@ RECHECK:
goto RECHECK;
}
fadepal(0,0,0, 0,63,7);
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 1); // JBF 20040308
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0 /*1*/); // JBF 20040308
G_DrawBackground();
M_DisplayMenus();
//g_player[myconnectindex].ps->palette = palette;

View File

@ -1985,7 +1985,7 @@ static void G_DisplayExtraScreens(void)
setview(0,0,xdim-1,ydim-1);
flushperms();
//g_player[myconnectindex].ps->palette = palette;
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 1); // JBF 20040308
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0 /*1*/); // JBF 20040308
fadepal(0,0,0, 0,64,7);
KB_FlushKeyboardQueue();
rotatesprite(0,0,65536L,0,3291,0,0,2+8+16+64+(ud.bgstretch?1024:0), 0,0,xdim-1,ydim-1);
@ -2012,7 +2012,7 @@ static void G_DisplayExtraScreens(void)
setview(0,0,xdim-1,ydim-1);
flushperms();
//g_player[myconnectindex].ps->palette = palette;
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 1); // JBF 20040308
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0 /*1*/); // JBF 20040308
fadepal(0,0,0, 0,64,7);
KB_FlushKeyboardQueue();
rotatesprite(0,0,65536L,0,TENSCREEN,0,0,2+8+16+64+(ud.bgstretch?1024:0), 0,0,xdim-1,ydim-1);
@ -9046,7 +9046,7 @@ static void G_DisplayLogo(void)
//G_FadePalette(0,0,0,63);
if (logoflags & LOGO_3DRSCREEN)
{
P_SetGamePalette(g_player[myconnectindex].ps, DREALMSPAL, 8+2+1); // JBF 20040308
P_SetGamePalette(g_player[myconnectindex].ps, DREALMSPAL, 8+2/*+1*/); // JBF 20040308
fadepal(0,0,0, 0,64,7);
flushperms();
rotatesprite(0,0,65536L,0,DREALMS,0,0,2+8+16+(ud.bgstretch?1024:0), 0,0,xdim-1,ydim-1);
@ -9077,7 +9077,7 @@ static void G_DisplayLogo(void)
if (logoflags & LOGO_TITLESCREEN)
{
//g_player[myconnectindex].ps->palette = titlepal;
P_SetGamePalette(g_player[myconnectindex].ps, TITLEPAL, 8+2+1); // JBF 20040308
P_SetGamePalette(g_player[myconnectindex].ps, TITLEPAL, 8+2/*+1*/); // JBF 20040308
flushperms();
rotatesprite(0,0,65536L,0,BETASCREEN,0,0,2+8+16,0,0,xdim-1,ydim-1);
KB_FlushKeyboardQueue();
@ -10743,7 +10743,7 @@ static void G_DoOrderScreen(void)
fadepal(0,0,0, 0,63,7);
//g_player[myconnectindex].ps->palette = palette;
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 1); // JBF 20040308
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0 /*1*/); // JBF 20040308
KB_FlushKeyboardQueue();
rotatesprite(0,0,65536L,0,ORDERING,0,0,2+8+16+64+(ud.bgstretch?1024:0), 0,0,xdim-1,ydim-1);
fadepal(0,0,0, 63,0,-7);
@ -10852,7 +10852,7 @@ void G_BonusScreen(int32_t bonusonly)
case 0:
if (ud.lockout == 0)
{
P_SetGamePalette(g_player[myconnectindex].ps, ENDINGPAL, 8+2+1); // JBF 20040308
P_SetGamePalette(g_player[myconnectindex].ps, ENDINGPAL, 8+2/*+1*/); // JBF 20040308
clearview(0L);
rotatesprite(0,50<<16,65536L,0,VICTORY1,0,0,2+8+16+64+128+(ud.bgstretch?1024:0),0,0,xdim-1,ydim-1);
nextpage();
@ -10915,7 +10915,7 @@ void G_BonusScreen(int32_t bonusonly)
KB_FlushKeyboardQueue();
//g_player[myconnectindex].ps->palette = palette;
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2+1); // JBF 20040308
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2/*+1*/); // JBF 20040308
rotatesprite(0,0,65536L,0,3292,0,0,2+8+16+64+(ud.bgstretch?1024:0), 0,0,xdim-1,ydim-1);
fadepal(0,0,0, 63,0,-1);
@ -10948,7 +10948,7 @@ void G_BonusScreen(int32_t bonusonly)
setview(0,0,xdim-1,ydim-1);
KB_FlushKeyboardQueue();
//g_player[myconnectindex].ps->palette = palette;
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2+1); // JBF 20040308
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2/*+1*/); // JBF 20040308
rotatesprite(0,0,65536L,0,3293,0,0,2+8+16+64+(ud.bgstretch?1024:0), 0,0,xdim-1,ydim-1);
fadepal(0,0,0, 63,0,-1);
while (!KB_KeyWaiting() && !MOUSE_GetButtons()&LEFT_MOUSE && !BUTTON(gamefunc_Fire) && !BUTTON(gamefunc_Open))
@ -10988,7 +10988,7 @@ void G_BonusScreen(int32_t bonusonly)
KB_FlushKeyBoardQueue();
//g_player[myconnectindex].ps->palette = palette;
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2+1); // JBF 20040308
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2/*+1*/); // JBF 20040308
G_FadePalette(0,0,0,63);
clearview(0L);
menutext(160,60,0,0,"THANKS TO ALL OUR");
@ -11118,7 +11118,7 @@ ENDANM:
FRAGBONUS:
//g_player[myconnectindex].ps->palette = palette;
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2+1); // JBF 20040308
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2/*+1*/); // JBF 20040308
G_FadePalette(0,0,0,63); // JBF 20031228
KB_FlushKeyboardQueue();
totalclock = 0;

View File

@ -67,7 +67,7 @@ typedef enum basepal_ {
SLIMEPAL,
DREALMSPAL,
TITLEPAL,
ENDINGPAL,
ENDINGPAL, // 5
ANIMPAL,
BASEPALCOUNT
} basepal_t;

View File

@ -586,7 +586,7 @@ void M_DisplayMenus(void)
if (g_netSync)
{
P_SetGamePalette(g_player[myconnectindex].ps, TITLEPAL, 11);
P_SetGamePalette(g_player[myconnectindex].ps, TITLEPAL, 8+2/*+1*/);
rotatesprite(0,0,65536L,0,BETASCREEN,0,0,2+8+16+64,0,0,xdim-1,ydim-1);
rotatesprite(160<<16,(104)<<16,60<<10,0,DUKENUKEM,0,0,2+8,0,0,xdim-1,ydim-1);

View File

@ -3207,7 +3207,7 @@ void Net_WaitForServer(void)
if (numplayers < 2 || g_netServer) return;
P_SetGamePalette(g_player[myconnectindex].ps, TITLEPAL, 11);
P_SetGamePalette(g_player[myconnectindex].ps, TITLEPAL, 8+2/*+1*/);
do
{
@ -3234,7 +3234,7 @@ void Net_WaitForServer(void)
if (g_player[0].pingcnt > server_ready)
{
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 11);
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2/*+1*/);
return;
}
}

View File

@ -351,10 +351,11 @@ static void G_DoLoadScreen(char *statustext, int32_t percent)
VM_OnEvent(EVENT_GETLOADTILE, -1, myconnectindex, -1);
j = aGameVars[g_iReturnVarID].val.lValue;
//g_player[myconnectindex].ps->palette = palette;
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0 /*1*/); // JBF 20040308
if (!statustext)
{
//g_player[myconnectindex].ps->palette = palette;
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 1); // JBF 20040308
i = ud.screen_size;
ud.screen_size = 0;
G_UpdateScreenArea();