Revert r2223's removing of bit 1 making it to setbrightness(), now a noop.

Hendricks found a bug caused by that commit, so this one enables exprimentation
with setbrightness() bit 1 behavior.

git-svn-id: https://svn.eduke32.com/eduke32@3025 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-09-24 21:09:31 +00:00
parent 2e36784575
commit 94ebe8211b
6 changed files with 18 additions and 17 deletions

View file

@ -13858,7 +13858,7 @@ void setbrightness(char dabrightness, uint8_t dapalid, uint8_t flags)
int32_t paldidchange, palsumdidchange; int32_t paldidchange, palsumdidchange;
// uint32_t lastbright = curbrightness; // uint32_t lastbright = curbrightness;
Bassert((flags&(1+4))==0); Bassert((flags&4)==0);
if (dapalid >= basepalcount) if (dapalid >= basepalcount)
dapalid = 0; dapalid = 0;
@ -13904,7 +13904,8 @@ void setbrightness(char dabrightness, uint8_t dapalid, uint8_t flags)
if (palsumdidchange || newpalettesum != g_lastpalettesum) if (palsumdidchange || newpalettesum != g_lastpalettesum)
{ {
if ((flags&1) == 0) setpalette(0,256); // if ((flags&1) == 0)
setpalette(0,256);
} }
g_lastpalettesum = lastpalettesum = newpalettesum; g_lastpalettesum = lastpalettesum = newpalettesum;

View file

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

View file

@ -2027,7 +2027,7 @@ static void G_DisplayExtraScreens(void)
setview(0,0,xdim-1,ydim-1); setview(0,0,xdim-1,ydim-1);
flushperms(); flushperms();
//g_player[myconnectindex].ps->palette = palette; //g_player[myconnectindex].ps->palette = palette;
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0 /*1*/); // JBF 20040308 P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 1); // JBF 20040308
fadepal(0,0,0, 0,63,7); fadepal(0,0,0, 0,63,7);
I_ClearAllInput(); I_ClearAllInput();
rotatesprite_fs(0,0,65536L,0,3291,0,0,2+8+16+64+(ud.bgstretch?1024:0)); rotatesprite_fs(0,0,65536L,0,3291,0,0,2+8+16+64+(ud.bgstretch?1024:0));
@ -2048,7 +2048,7 @@ static void G_DisplayExtraScreens(void)
setview(0,0,xdim-1,ydim-1); setview(0,0,xdim-1,ydim-1);
flushperms(); flushperms();
//g_player[myconnectindex].ps->palette = palette; //g_player[myconnectindex].ps->palette = palette;
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0 /*1*/); // JBF 20040308 P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 1); // JBF 20040308
fadepal(0,0,0, 0,63,7); fadepal(0,0,0, 0,63,7);
I_ClearAllInput(); I_ClearAllInput();
rotatesprite_fs(0,0,65536L,0,TENSCREEN,0,0,2+8+16+64+(ud.bgstretch?1024:0)); rotatesprite_fs(0,0,65536L,0,TENSCREEN,0,0,2+8+16+64+(ud.bgstretch?1024:0));
@ -9258,7 +9258,7 @@ static void G_DisplayLogo(void)
{ {
clearallviews(0); clearallviews(0);
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,63,7); fadepal(0,0,0, 0,63,7);
flushperms(); flushperms();
rotatesprite_fs(0,0,65536L,0,DREALMS,0,0,2+8+16+(ud.bgstretch?1024:0)); rotatesprite_fs(0,0,65536L,0,DREALMS,0,0,2+8+16+(ud.bgstretch?1024:0));
@ -9293,7 +9293,7 @@ static void G_DisplayLogo(void)
clearallviews(0); clearallviews(0);
//g_player[myconnectindex].ps->palette = titlepal; //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(); flushperms();
rotatesprite_fs(0,0,65536L,0,BETASCREEN,0,0,2+8+16); rotatesprite_fs(0,0,65536L,0,BETASCREEN,0,0,2+8+16);
KB_FlushKeyboardQueue(); KB_FlushKeyboardQueue();
@ -10894,7 +10894,7 @@ static void G_DoOrderScreen(void)
setview(0,0,xdim-1,ydim-1); setview(0,0,xdim-1,ydim-1);
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0 /*1*/); // JBF 20040308 P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 1); // JBF 20040308
for (i=0; i<4; i++) for (i=0; i<4; i++)
{ {
@ -10978,7 +10978,7 @@ void G_BonusScreen(int32_t bonusonly)
case 0: case 0:
if (ud.lockout == 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
clearallviews(0L); clearallviews(0L);
rotatesprite_fs(0,50<<16,65536L,0,VICTORY1,0,0,2+8+16+64+128+(ud.bgstretch?1024:0)); rotatesprite_fs(0,50<<16,65536L,0,VICTORY1,0,0,2+8+16+64+128+(ud.bgstretch?1024:0));
nextpage(); nextpage();
@ -11043,7 +11043,7 @@ void G_BonusScreen(int32_t bonusonly)
I_ClearAllInput(); I_ClearAllInput();
I_ClearInputWaiting(); I_ClearInputWaiting();
//g_player[myconnectindex].ps->palette = palette; //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_fs(0,0,65536L,0,3292,0,0,2+8+16+64+(ud.bgstretch?1024:0)); rotatesprite_fs(0,0,65536L,0,3292,0,0,2+8+16+64+(ud.bgstretch?1024:0));
fadepal(0,0,0, 63,0,-1); fadepal(0,0,0, 63,0,-1);
@ -11073,7 +11073,7 @@ void G_BonusScreen(int32_t bonusonly)
setview(0,0,xdim-1,ydim-1); setview(0,0,xdim-1,ydim-1);
I_ClearInputWaiting(); I_ClearInputWaiting();
//g_player[myconnectindex].ps->palette = palette; //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_fs(0,0,65536L,0,3293,0,0,2+8+16+64+(ud.bgstretch?1024:0)); rotatesprite_fs(0,0,65536L,0,3293,0,0,2+8+16+64+(ud.bgstretch?1024:0));
fadepal(0,0,0, 63,0,-1); fadepal(0,0,0, 63,0,-1);
handle_events_while_no_input(); handle_events_while_no_input();
@ -11109,7 +11109,7 @@ void G_BonusScreen(int32_t bonusonly)
//g_player[myconnectindex].ps->palette = palette; //g_player[myconnectindex].ps->palette = palette;
G_FadePalette(0,0,0,0); G_FadePalette(0,0,0,0);
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); // G_FadePalette(0,0,0,63);
clearallviews(0L); clearallviews(0L);
menutext(160,60,0,0,"Thanks to all our"); menutext(160,60,0,0,"Thanks to all our");
@ -11219,7 +11219,7 @@ ENDANM:
FRAGBONUS: FRAGBONUS:
//g_player[myconnectindex].ps->palette = palette; //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 G_FadePalette(0,0,0,63); // JBF 20031228
KB_FlushKeyboardQueue(); KB_FlushKeyboardQueue();
totalclock = 0; totalclock = 0;

View file

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

View file

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

View file

@ -345,7 +345,7 @@ static void G_DoLoadScreen(const char *statustext, int32_t percent)
j = VM_OnEvent(EVENT_GETLOADTILE, -1, myconnectindex, -1, LOADSCREEN); j = VM_OnEvent(EVENT_GETLOADTILE, -1, myconnectindex, -1, LOADSCREEN);
//g_player[myconnectindex].ps->palette = palette; //g_player[myconnectindex].ps->palette = palette;
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0 /*1*/); // JBF 20040308 P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 1); // JBF 20040308
if (!statustext) if (!statustext)
{ {