From 94ebe8211b389d173ac72948514ceaff0b68f58b Mon Sep 17 00:00:00 2001 From: helixhorned Date: Mon, 24 Sep 2012 21:09:31 +0000 Subject: [PATCH] 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 --- polymer/eduke32/build/src/engine.c | 5 +++-- polymer/eduke32/source/demo.c | 2 +- polymer/eduke32/source/game.c | 20 ++++++++++---------- polymer/eduke32/source/menus.c | 2 +- polymer/eduke32/source/net.c | 4 ++-- polymer/eduke32/source/premap.c | 2 +- 6 files changed, 18 insertions(+), 17 deletions(-) diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 128a16a87..24a5e90f9 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -13858,7 +13858,7 @@ void setbrightness(char dabrightness, uint8_t dapalid, uint8_t flags) int32_t paldidchange, palsumdidchange; // uint32_t lastbright = curbrightness; - Bassert((flags&(1+4))==0); + Bassert((flags&4)==0); if (dapalid >= basepalcount) dapalid = 0; @@ -13904,7 +13904,8 @@ void setbrightness(char dabrightness, uint8_t dapalid, uint8_t flags) if (palsumdidchange || newpalettesum != g_lastpalettesum) { - if ((flags&1) == 0) setpalette(0,256); +// if ((flags&1) == 0) + setpalette(0,256); } g_lastpalettesum = lastpalettesum = newpalettesum; diff --git a/polymer/eduke32/source/demo.c b/polymer/eduke32/source/demo.c index f334c5390..e8e310380 100644 --- a/polymer/eduke32/source/demo.c +++ b/polymer/eduke32/source/demo.c @@ -507,7 +507,7 @@ RECHECK: } 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(); M_DisplayMenus(); //g_player[myconnectindex].ps->palette = palette; diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 6d4378126..52a3dcdd5 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -2027,7 +2027,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, 0 /*1*/); // JBF 20040308 + P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 1); // JBF 20040308 fadepal(0,0,0, 0,63,7); I_ClearAllInput(); 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); flushperms(); //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); I_ClearAllInput(); 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); - 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); flushperms(); 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); //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_fs(0,0,65536L,0,BETASCREEN,0,0,2+8+16); KB_FlushKeyboardQueue(); @@ -10894,7 +10894,7 @@ static void G_DoOrderScreen(void) 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++) { @@ -10978,7 +10978,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 clearallviews(0L); rotatesprite_fs(0,50<<16,65536L,0,VICTORY1,0,0,2+8+16+64+128+(ud.bgstretch?1024:0)); nextpage(); @@ -11043,7 +11043,7 @@ void G_BonusScreen(int32_t bonusonly) I_ClearAllInput(); I_ClearInputWaiting(); //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)); fadepal(0,0,0, 63,0,-1); @@ -11073,7 +11073,7 @@ void G_BonusScreen(int32_t bonusonly) setview(0,0,xdim-1,ydim-1); I_ClearInputWaiting(); //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)); fadepal(0,0,0, 63,0,-1); handle_events_while_no_input(); @@ -11109,7 +11109,7 @@ void G_BonusScreen(int32_t bonusonly) //g_player[myconnectindex].ps->palette = palette; 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); clearallviews(0L); menutext(160,60,0,0,"Thanks to all our"); @@ -11219,7 +11219,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; diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 6a571dae7..9607b78d9 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -683,7 +683,7 @@ void M_DisplayMenus(void) 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(160<<16,(104)<<16,60<<10,0,DUKENUKEM,0,0,2+8); diff --git a/polymer/eduke32/source/net.c b/polymer/eduke32/source/net.c index afb41a98f..b69525882 100644 --- a/polymer/eduke32/source/net.c +++ b/polymer/eduke32/source/net.c @@ -1988,7 +1988,7 @@ void Net_WaitForServer(void) 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 { @@ -2009,7 +2009,7 @@ void Net_WaitForServer(void) 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; } } diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index fe6f3b898..f21563c05 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -345,7 +345,7 @@ static void G_DoLoadScreen(const char *statustext, int32_t percent) j = VM_OnEvent(EVENT_GETLOADTILE, -1, myconnectindex, -1, LOADSCREEN); //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) {