fix obituaries erasing (#1478)

* Always erase Doom widgets

* Call HU_Erase from D_Display (restore vanilla code)
This commit is contained in:
Roman Fomin 2024-02-16 14:09:48 +07:00 committed by GitHub
parent f76409d68f
commit 721f28cfc4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 6 deletions

View File

@ -312,6 +312,9 @@ void D_Display (void)
borderdrawcount = 3;
}
if (gamestate == GS_LEVEL && gametic)
HU_Erase();
switch (gamestate) // do buffered drawing
{
case GS_LEVEL:

View File

@ -513,8 +513,16 @@ void HUlib_erase_widget (const hu_widget_t *const w)
const int height = m->numlines * f->line_height;
const int y = vert_align_widget(w, m, f, w->h_align, w->v_align);
if (y > scaledviewy && y < scaledviewy + scaledviewheight - height)
{
R_VideoErase(0, y, scaledviewx, height);
R_VideoErase(scaledviewx + scaledviewwidth, y, scaledviewx, height);
}
else
{
R_VideoErase(0, y, video.unscaledw, height);
}
}
//----------------------------------------------------------------------------
//

View File

@ -1527,11 +1527,8 @@ void HU_Erase(void)
w = doom_widget;
while (w->multiline)
{
if (*w->multiline->on)
{
HUlib_erase_widget(w);
}
w++;
}
@ -1565,7 +1562,6 @@ void HU_Ticker(void)
boom_widget = boom_widgets[hud_active];
plr = &players[displayplayer]; // killough 3/7/98
HU_Erase();
HU_disable_all_widgets();
draw_crispy_hud = false;