Show PAUSED image when the game is stopped by the pause command

In addition, don't show the pause menu PAUSED in modeattacking/netgames
This text is now snapto-affected, since we can't (or at least shouldn't) summon the widescreen border in regular pause instances.
This commit is contained in:
toaster 2023-05-19 22:15:56 +01:00
parent f7107e2f66
commit ca68fe630b
2 changed files with 21 additions and 30 deletions

View file

@ -659,25 +659,6 @@ static void D_Display(void)
if (forcerefresh && G_GamestateUsesLevel() == false)
V_SetPalette(0);
// draw pause pic
if (paused && cv_showhud.value && !demo.playback)
{
#if 0
INT32 py;
patch_t *patch;
if (automapactive)
py = 4;
else
py = viewwindowy + 4;
patch = W_CachePatchName("M_PAUSE", PU_PATCH);
V_DrawScaledPatch(viewwindowx + (BASEVIDWIDTH - patch->width)/2, py, 0, patch);
#else
INT32 y = ((automapactive) ? (32) : (BASEVIDHEIGHT/2));
M_DrawTextBox((BASEVIDWIDTH/2) - (60), y - (16), 13, 2);
V_DrawCenteredString(BASEVIDWIDTH/2, y - (4), V_YELLOWMAP, "Game Paused");
#endif
}
if (demo.rewinding)
V_DrawFadeScreen(TC_RAINBOW, (leveltime & 0x20) ? SKINCOLOR_PASTEL : SKINCOLOR_MOONSET);

View file

@ -578,6 +578,16 @@ void M_DrawMenuMessage(void)
}
}
// PAUSE
static void M_DrawPausedText(INT32 x)
{
patch_t *pausebg = W_CachePatchName("M_STRIPU", PU_CACHE);
patch_t *pausetext = W_CachePatchName("M_PAUSET", PU_CACHE);
V_DrawFixedPatch(x, 0, FRACUNIT, V_SNAPTOLEFT|V_SNAPTOTOP|V_ADD, pausebg, NULL);
V_DrawFixedPatch(x, 0, FRACUNIT, V_SNAPTOLEFT|V_SNAPTOTOP, pausetext, NULL);
}
//
// M_Drawer
// Called after the view has been rendered,
@ -637,14 +647,17 @@ void M_Drawer(void)
menuwipe = false;
}
// draw pause pic
if (paused && !demo.playback && (menuactive || cv_showhud.value))
{
M_DrawPausedText(0);
}
// focus lost notification goes on top of everything, even the former everything
if (window_notinfocus && cv_showfocuslost.value)
{
M_DrawTextBox((BASEVIDWIDTH/2) - (60), (BASEVIDHEIGHT/2) - (16), 13, 2);
if (gamestate == GS_LEVEL && (P_AutoPause() || paused))
V_DrawCenteredString(BASEVIDWIDTH/2, (BASEVIDHEIGHT/2) - (4), highlightflags, "Game Paused");
else
V_DrawCenteredString(BASEVIDWIDTH/2, (BASEVIDHEIGHT/2) - (4), highlightflags, "Focus Lost");
V_DrawCenteredString(BASEVIDWIDTH/2, (BASEVIDHEIGHT/2) - (4), highlightflags, "Focus Lost");
}
}
@ -4024,8 +4037,6 @@ void M_DrawExtras(void)
// INGAME / PAUSE MENUS
//
// PAUSE
// PAUSE MAIN MENU
void M_DrawPause(void)
{
@ -4046,18 +4057,17 @@ void M_DrawPause(void)
INT16 word2len = 0;
boolean sok = false;
patch_t *pausebg = W_CachePatchName("M_STRIPU", PU_CACHE);
patch_t *vertbg = W_CachePatchName("M_STRIPV", PU_CACHE);
patch_t *pausetext = W_CachePatchName("M_PAUSET", PU_CACHE);
patch_t *arrstart = W_CachePatchName("M_PTIP", PU_CACHE);
patch_t *arrfill = W_CachePatchName("M_PFILL", PU_CACHE);
//V_DrawFadeScreen(0xFF00, 16);
// "PAUSED"
V_DrawFixedPatch(-offset*FRACUNIT, 0, FRACUNIT, V_ADD, pausebg, NULL);
V_DrawFixedPatch(-offset*FRACUNIT, 0, FRACUNIT, 0, pausetext, NULL);
if (!paused && !demo.playback && !modeattacking && !netgame) // as close to possible as P_AutoPause, but not dependent on menuactive
{
M_DrawPausedText(-offset*FRACUNIT);
}
// Vertical Strip:
V_DrawFixedPatch((230 + offset)<<FRACBITS, 0, FRACUNIT, V_ADD, vertbg, NULL);