diff --git a/src/console.c b/src/console.c index fdba8601e..f3f40ccb9 100644 --- a/src/console.c +++ b/src/console.c @@ -710,9 +710,10 @@ void CON_ToggleOff(void) con_destlines = 0; con_curlines = 0; - CON_ClearHUD(); con_forcepic = 0; + CON_ClearHUD(); + I_UpdateMouseGrab(); Unlock_state(); diff --git a/src/g_game.c b/src/g_game.c index 9435a5e93..126e658d8 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1878,6 +1878,10 @@ void G_StartLevel(boolean resetplayer) G_SetMouseDeltas(0, 0, 1); G_SetMouseDeltas(0, 0, 2); + // If starting a game, hide the console messages + if (gamestate != GS_LEVEL) + CON_ClearHUD(); + if (titlemapinaction) return; @@ -2031,9 +2035,6 @@ void G_DoLoadLevel(void) G_SetMouseDeltas(0, 0, 1); G_SetMouseDeltas(0, 0, 2); - // clear hud messages remains (usually from game startup) - CON_ClearHUD(); - if (demoplayback && !timingdemo) precache = true; if (timingdemo) @@ -2112,7 +2113,6 @@ void TitleCard_Start(void) return; } - CON_ClearHUD(); TitleCard_LoadGraphics(); titlecard.running = true; @@ -2697,24 +2697,18 @@ void G_Ticker(boolean run) switch (gamestate) { case GS_LEVEL: - if (titlecard.running) - { - if (run) - TitleCard_Run(); - if (titlecard.prelevel) - { - G_CheckPlayerReborn(); - break; - } - } + if (titlecard.running && run) + TitleCard_Run(); if (titledemo) F_TitleDemoTicker(); - P_Ticker(run); // tic the game - ST_Ticker(run); - F_TextPromptTicker(); + if (!titlecard.prelevel) + { + P_Ticker(run); // tic the game + F_TextPromptTicker(); + } + AM_Ticker(); HU_Ticker(); - break; case GS_INTERMISSION: @@ -2748,6 +2742,7 @@ void G_Ticker(boolean run) case GS_GAMEEND: if (run) F_GameEndTicker(); + HU_Ticker(); break; case GS_EVALUATION: @@ -3598,9 +3593,6 @@ void G_DoReborn(INT32 playernum) G_SetMouseDeltas(0, 0, 1); G_SetMouseDeltas(0, 0, 2); - // clear hud messages remains (usually from game startup) - CON_ClearHUD(); - // Starpost support for (i = 0; i < MAXPLAYERS; i++) { diff --git a/src/hu_stuff.c b/src/hu_stuff.c index d4fa0149b..58d245256 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -2138,10 +2138,7 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I HU_DrawEmeralds(x-12,y+2,tab[i].emeralds); } - if (greycheck) - V_DrawSmallTranslucentPatch (x, y-4, V_80TRANS, livesback); - else - V_DrawSmallScaledPatch (x, y-4, 0, livesback); + V_DrawSmallScaledPatch (x, y-4, greycheck ? V_80TRANS : 0, livesback); if (tab[i].color == 0) { @@ -2150,10 +2147,7 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I V_DrawSmallScaledPatch(x, y-4, 0, superprefix[players[tab[i].num].skin]); else { - if (greycheck) - V_DrawSmallTranslucentPatch(x, y-4, V_80TRANS, faceprefix[players[tab[i].num].skin]); - else - V_DrawSmallScaledPatch(x, y-4, 0, faceprefix[players[tab[i].num].skin]); + V_DrawSmallScaledPatch(x, y-4, greycheck ? V_80TRANS : 0, faceprefix[players[tab[i].num].skin]); } } else @@ -2167,7 +2161,7 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I { colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE); if (greycheck) - V_DrawSmallTranslucentMappedPatch (x, y-4, V_80TRANS, faceprefix[players[tab[i].num].skin], colormap); + V_DrawSmallMappedPatch (x, y-4, V_80TRANS, faceprefix[players[tab[i].num].skin], colormap); else V_DrawSmallMappedPatch (x, y-4, 0, faceprefix[players[tab[i].num].skin], colormap); } @@ -2177,10 +2171,7 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I V_DrawRightAlignedString(x, y+4, V_ALLOWLOWERCASE|(greycheck ? V_60TRANS : 0), va("%dx", players[tab[i].num].lives)); else if (G_TagGametype() && players[tab[i].num].pflags & PF_TAGIT) { - if (greycheck) - V_DrawSmallTranslucentPatch(x-32, y-4, V_60TRANS, tagico); - else - V_DrawSmallScaledPatch(x-32, y-4, 0, tagico); + V_DrawSmallScaledPatch(x-32, y-4, greycheck ? V_60TRANS : 0, tagico); } if (players[tab[i].num].exiting || (players[tab[i].num].pflags & PF_FINISHED)) @@ -2436,7 +2427,7 @@ void HU_DrawTeamTabRankings(playersort_t *tab, INT32 whiteplayer) { colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE); if (greycheck) - V_DrawSmallTranslucentMappedPatch (x, y-4, V_80TRANS, faceprefix[players[tab[i].num].skin], colormap); + V_DrawSmallMappedPatch (x, y-4, V_80TRANS, faceprefix[players[tab[i].num].skin], colormap); else V_DrawSmallMappedPatch (x, y-4, 0, faceprefix[players[tab[i].num].skin], colormap); } @@ -2510,10 +2501,7 @@ void HU_DrawDualTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scoreline V_DrawSmallScaledPatch (x, y-4, 0, superprefix[players[tab[i].num].skin]); else { - if (greycheck) - V_DrawSmallTranslucentPatch (x, y-4, V_80TRANS, faceprefix[players[tab[i].num].skin]); - else - V_DrawSmallScaledPatch (x, y-4, 0, faceprefix[players[tab[i].num].skin]); + V_DrawSmallScaledPatch (x, y-4, greycheck ? V_80TRANS : 0, faceprefix[players[tab[i].num].skin]); } } else @@ -2527,7 +2515,7 @@ void HU_DrawDualTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scoreline { colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE); if (greycheck) - V_DrawSmallTranslucentMappedPatch (x, y-4, V_80TRANS, faceprefix[players[tab[i].num].skin], colormap); + V_DrawSmallMappedPatch (x, y-4, V_80TRANS, faceprefix[players[tab[i].num].skin], colormap); else V_DrawSmallMappedPatch (x, y-4, 0, faceprefix[players[tab[i].num].skin], colormap); } diff --git a/src/st_stuff.c b/src/st_stuff.c index 4c5f55147..4d7706f00 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -206,13 +206,6 @@ boolean ST_SameTeam(player_t *a, player_t *b) static boolean st_stopped = true; -void ST_Ticker(boolean run) -{ - (void)run; - if (st_stopped) - return; -} - // 0 is default, any others are special palettes. INT32 st_palette = 0; INT32 st_translucency = 10; @@ -1292,7 +1285,7 @@ void TitleCard_Draw(void) colormap = R_GetTranslationColormap(TC_DEFAULT, colornum, GTC_CACHE); if (titlecard.prelevel) - V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, levelfadecol); + V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, levelfadecol|V_PERPLAYER); if (!LUA_HudEnabled(hud_stagetitle) || titlecard.ticker >= (titlecard.endtime + TICRATE)) { @@ -1315,24 +1308,18 @@ void TitleCard_Draw(void) if (lvlttlxpos < 0) lvlttlxpos = 0; - if (!splitscreen || (splitscreen && stplyr == &players[displayplayer])) - { - INT32 zzticker = titlecard.ticker; - V_DrawMappedPatch(FixedInt(titlecard.zigzag), (-zzticker) % zigzag->height, V_SNAPTOTOP|V_SNAPTOLEFT, zigzag, colormap); - V_DrawMappedPatch(FixedInt(titlecard.zigzag), (zigzag->height-zzticker) % zigzag->height, V_SNAPTOTOP|V_SNAPTOLEFT, zigzag, colormap); - V_DrawMappedPatch(FixedInt(titlecard.zigzag), (-zztext->height+zzticker) % zztext->height, V_SNAPTOTOP|V_SNAPTOLEFT, zztext, colormap); - V_DrawMappedPatch(FixedInt(titlecard.zigzag), (zzticker) % zztext->height, V_SNAPTOTOP|V_SNAPTOLEFT, zztext, colormap); - } + INT32 zzticker = titlecard.ticker; + V_DrawSplitscreenPatch(FixedInt(titlecard.zigzag), (-zzticker) % zigzag->height, V_SNAPTOTOP|V_SNAPTOLEFT, zigzag, colormap); + V_DrawSplitscreenPatch(FixedInt(titlecard.zigzag), (zigzag->height-zzticker) % zigzag->height, V_SNAPTOTOP|V_SNAPTOLEFT, zigzag, colormap); + V_DrawSplitscreenPatch(FixedInt(titlecard.zigzag), (-zztext->height+zzticker) % zztext->height, V_SNAPTOTOP|V_SNAPTOLEFT, zztext, colormap); + V_DrawSplitscreenPatch(FixedInt(titlecard.zigzag), (zzticker) % zztext->height, V_SNAPTOTOP|V_SNAPTOLEFT, zztext, colormap); if (actnum) { - if (!splitscreen) - { - if (actnum > 9) // slightly offset the act diamond for two-digit act numbers - V_DrawMappedPatch(ttlnumxpos + (V_LevelActNumWidth(actnum)/4) + ttlscroll, 104 - ttlscroll, 0, actpat, colormap); - else - V_DrawMappedPatch(ttlnumxpos + ttlscroll, 104 - ttlscroll, 0, actpat, colormap); - } + if (actnum > 9) // slightly offset the act diamond for two-digit act numbers + V_DrawSplitscreenPatch(ttlnumxpos + (V_LevelActNumWidth(actnum)/4) + ttlscroll, 104 - ttlscroll, 0, actpat, colormap); + else + V_DrawSplitscreenPatch(ttlnumxpos + ttlscroll, 104 - ttlscroll, 0, actpat, colormap); V_DrawLevelActNum(ttlnumxpos + ttlscroll, 104, V_PERPLAYER, actnum); } @@ -1358,7 +1345,7 @@ void TitleCard_DrawOverWipe(void) if (!(titlecard.running && titlecard.wipe && st_overlay)) return; - stplyr = &players[consoleplayer]; + stplyr = &players[displayplayer]; TitleCard_PreDraw(); TitleCard_Draw(); diff --git a/src/st_stuff.h b/src/st_stuff.h index 28c67d37c..01b219128 100644 --- a/src/st_stuff.h +++ b/src/st_stuff.h @@ -23,9 +23,6 @@ // STATUS BAR // -// Called by main loop. -void ST_Ticker(boolean run); - // Called by main loop. void ST_Drawer(void); diff --git a/src/v_video.h b/src/v_video.h index 80936f3ee..aeb863ca3 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -155,10 +155,6 @@ void V_CubeApply(UINT8 *red, UINT8 *green, UINT8 *blue); #define V_PERPLAYER 0x80000000 // automatically adjust coordinates/scaling for splitscreen mode // defines for old functions -#define V_DrawPatch(x,y,s,p) V_DrawFixedPatch((x)<width)<height)<