From 3bec2b7169636a5a99cc89a3d5c8282104394387 Mon Sep 17 00:00:00 2001 From: skyjake Date: Mon, 3 Mar 2003 15:23:46 +0000 Subject: [PATCH] Statbar flicker fixed --- doomsday/Include/jHeretic/Doomdef.h | 1 - doomsday/Include/jHeretic/P_local.h | 1 - doomsday/Src/Common/g_game.c | 5 ++- doomsday/Src/jHeretic/H_Main.c | 5 +-- doomsday/Src/jHeretic/In_lude.c | 1 - doomsday/Src/jHeretic/Mn_menu.c | 1 - doomsday/Src/jHeretic/Sb_bar.c | 52 ++++++++++------------------- 7 files changed, 21 insertions(+), 45 deletions(-) diff --git a/doomsday/Include/jHeretic/Doomdef.h b/doomsday/Include/jHeretic/Doomdef.h index d80fe740cb..1479f1709c 100644 --- a/doomsday/Include/jHeretic/Doomdef.h +++ b/doomsday/Include/jHeretic/Doomdef.h @@ -921,7 +921,6 @@ void F_StartFinale(void); // STATUS BAR (SB_bar.c) //---------------------- -extern int SB_state; void SB_Init(void); boolean SB_Responder(event_t *event); void SB_Ticker(void); diff --git a/doomsday/Include/jHeretic/P_local.h b/doomsday/Include/jHeretic/P_local.h index 2486d088bf..3e153e6b7c 100644 --- a/doomsday/Include/jHeretic/P_local.h +++ b/doomsday/Include/jHeretic/P_local.h @@ -279,7 +279,6 @@ void AM_Drawer(void); // ***** SB_BAR ***** -extern int SB_state; extern int ArtifactFlash; void SB_PaletteFlash(void); diff --git a/doomsday/Src/Common/g_game.c b/doomsday/Src/Common/g_game.c index b942c425f6..ef29b89952 100644 --- a/doomsday/Src/Common/g_game.c +++ b/doomsday/Src/Common/g_game.c @@ -1778,10 +1778,10 @@ void G_PlayerFinishLevel (int player) p->messageTics = 0; p->rain1 = NULL; p->rain2 = NULL; - if(p == &players[consoleplayer]) +/* if(p == &players[consoleplayer]) { SB_state = -1; // refresh the status bar - } + }*/ #endif p->plr->mo->flags &= ~MF_SHADOW; // cancel invisibility @@ -1922,7 +1922,6 @@ void G_PlayerReborn (int player) #elif __JHERETIC__ if(p == &players[consoleplayer]) { - SB_state = -1; // refresh the status bar inv_ptr = 0; // reset the inventory pointer curpos = 0; } diff --git a/doomsday/Src/jHeretic/H_Main.c b/doomsday/Src/jHeretic/H_Main.c index c33b0788f3..8b412e90a1 100644 --- a/doomsday/Src/jHeretic/H_Main.c +++ b/doomsday/Src/jHeretic/H_Main.c @@ -173,14 +173,11 @@ void D_Display(void) CT_Drawer(); if(!iscam) SB_Drawer(); // $democam // Also update view borders? - if(Get(DD_VIEWWINDOW_WIDTH) != 320) GL_Update(DDUF_BORDER); + if(Get(DD_VIEWWINDOW_HEIGHT) != 200) GL_Update(DDUF_BORDER); break; case GS_INTERMISSION: IN_Drawer (); break; - /*case GS_FINALE: - F_Drawer (); - break;*/ case GS_INFINE: FI_Drawer(); break; diff --git a/doomsday/Src/jHeretic/In_lude.c b/doomsday/Src/jHeretic/In_lude.c index 93e766907f..31fbc0ac9e 100644 --- a/doomsday/Src/jHeretic/In_lude.c +++ b/doomsday/Src/jHeretic/In_lude.c @@ -195,7 +195,6 @@ void IN_Stop(void) intermission = false; IN_UnloadPics(); - SB_state = -1; GL_Update(DDUF_BORDER); } diff --git a/doomsday/Src/jHeretic/Mn_menu.c b/doomsday/Src/jHeretic/Mn_menu.c index 1f9de91914..118ee96833 100644 --- a/doomsday/Src/jHeretic/Mn_menu.c +++ b/doomsday/Src/jHeretic/Mn_menu.c @@ -2822,7 +2822,6 @@ boolean MN_Responder(event_t *event) { paused = false; MN_DeactivateMenu(); - SB_state = -1; //refresh the statbar GL_Update(DDUF_BORDER); menuDark = 0; // Darkness immediately gone. } diff --git a/doomsday/Src/jHeretic/Sb_bar.c b/doomsday/Src/jHeretic/Sb_bar.c index f57b14794e..7243ce465f 100644 --- a/doomsday/Src/jHeretic/Sb_bar.c +++ b/doomsday/Src/jHeretic/Sb_bar.c @@ -707,7 +707,6 @@ char ammopic[][10] = {"INAMLOB"} }; -int SB_state = -1; static int oldarti = 0; static int oldartiCount = 0; static int oldfrags = -9999; @@ -727,16 +726,10 @@ void SB_Drawer(void) int frame; static boolean hitCenterFrame; - // Sound info debug stuff -/* if(DebugSound == true) - { - DrawSoundInfo(); - }*/ CPlayer = &players[consoleplayer]; if(Get(DD_VIEWWINDOW_HEIGHT) == SCREENHEIGHT && !automapactive) { DrawFullScreenStuff(); - SB_state = -1; } else { @@ -750,42 +743,34 @@ void SB_Drawer(void) gl.Scalef(fscale, fscale, 1); } - //if(SB_state == -1) + GL_DrawPatch(0, 158, PatchBARBACK); + if(players[consoleplayer].cheats&CF_GODMODE) { - GL_DrawPatch(0, 158, PatchBARBACK); - if(players[consoleplayer].cheats&CF_GODMODE) - { - GL_DrawPatch(16, 167, W_GetNumForName("GOD1")); - GL_DrawPatch(287, 167, W_GetNumForName("GOD2")); - } - oldhealth = -1; + GL_DrawPatch(16, 167, W_GetNumForName("GOD1")); + GL_DrawPatch(287, 167, W_GetNumForName("GOD2")); } + oldhealth = -1; + DrawCommonBar(); if(!inventory) { - //if(SB_state != 0) - { - // Main interface - GL_DrawPatch(34, 160, PatchSTATBAR); - oldarti = 0; - oldammo = -1; - oldarmor = -1; - oldweapon = -1; - oldfrags = -9999; //can't use -1, 'cuz of negative frags - oldlife = -1; - oldkeys = -1; - } + // Main interface + GL_DrawPatch(34, 160, PatchSTATBAR); + oldarti = 0; + oldammo = -1; + oldarmor = -1; + oldweapon = -1; + oldfrags = -9999; //can't use -1, 'cuz of negative frags + oldlife = -1; + oldkeys = -1; + DrawMainBar(); - SB_state = 0; } else { - //if(SB_state != 1) - { - GL_DrawPatch(34, 160, PatchINVBAR); - } + GL_DrawPatch(34, 160, PatchINVBAR); + DrawInventoryBar(); - SB_state = 1; } // Restore the old modelview matrix. @@ -1310,7 +1295,6 @@ static void CheatGodFunc(player_t *player, Cheat_t *cheat) { P_SetMessage(player, TXT_CHEATGODOFF, false); } - SB_state = -1; } static void CheatNoClipFunc(player_t *player, Cheat_t *cheat)