When in GL modes, clear the screen first in some non-in-game places.

This is so that when hud_bgstretch is disabled (i.e. background pictures are
not stretched to the whole screen), the frame buffer has no leftover contents
from previous frames on the sides of the screen. This was particularly noticable
when using the console.
The "places" are the following:
 - before drawing an anim frame
 - before drawing a "full-screen" background
 - while displaying logo, titlescreen, loadscreen
(this leaves a couple others which I didn't test, and didn't tweak)

git-svn-id: https://svn.eduke32.com/eduke32@2584 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-04-04 18:57:06 +00:00
parent cd2ae337a2
commit f8796d1a1b
3 changed files with 23 additions and 0 deletions

View file

@ -409,6 +409,9 @@ void G_PlayAnim(const char *fn,char t)
g_restorePalette = 0;
}
if (getrendermode() >= 3)
clearview(0);
rotatesprite_fs(0<<16,0<<16,65536L,512,TILE_ANIM,0,0,2+4+8+16+64+(ud.bgstretch?1024:0));
nextpage();
}

View file

@ -3125,6 +3125,9 @@ void G_DrawBackground(void)
}
else
{
if (getrendermode() >= 3)
clearview(0);
// when not rendering a game, fullscreen wipe
#define MENUTILE (!getrendermode()?MENUSCREEN:LOADSCREEN)
// Gv_SetVar(g_iReturnVarID,tilesizx[MENUTILE]==320&&tilesizy[MENUTILE]==200?MENUTILE:BIGHOLE, -1, -1);
@ -9189,6 +9192,9 @@ static void G_DisplayLogo(void)
//G_FadePalette(0,0,0,63);
if (logoflags & LOGO_3DRSCREEN)
{
if (getrendermode() >= 3)
clearview(0);
P_SetGamePalette(g_player[myconnectindex].ps, DREALMSPAL, 8+2/*+1*/); // JBF 20040308
fadepal(0,0,0, 0,63,7);
flushperms();
@ -9198,6 +9204,9 @@ static void G_DisplayLogo(void)
totalclock = 0;
while (totalclock < (120*7) && !check_input_waiting())
{
if (getrendermode() >= 3)
clearview(0);
rotatesprite_fs(0,0,65536L,0,DREALMS,0,0,2+8+16+64+(ud.bgstretch?1024:0));
G_HandleAsync();
@ -9220,6 +9229,9 @@ static void G_DisplayLogo(void)
if (logoflags & LOGO_TITLESCREEN)
{
if (getrendermode() >= 3)
clearview(0);
//g_player[myconnectindex].ps->palette = titlepal;
P_SetGamePalette(g_player[myconnectindex].ps, TITLEPAL, 8+2/*+1*/); // JBF 20040308
flushperms();
@ -9230,6 +9242,9 @@ static void G_DisplayLogo(void)
while (totalclock < (860+120) && !KB_KeyWaiting() && !(MOUSE_GetButtons()&LEFT_MOUSE) && !BUTTON(gamefunc_Fire) && !BUTTON(gamefunc_Open))
{
if (getrendermode() >= 3)
clearview(0);
rotatesprite_fs(0,0,65536L,0,BETASCREEN,0,0,2+8+16+64+(ud.bgstretch?1024:0));
if (logoflags & LOGO_DUKENUKEM)
{
@ -11378,6 +11393,9 @@ FRAGBONUS:
if (g_player[myconnectindex].ps->gm&MODE_EOL)
{
if (getrendermode() >= 3)
clearview(0);
rotatesprite_fs(0,0,65536L,0,BONUSSCREEN+gfx_offset,0,0,2+8+16+64+128+(ud.bgstretch?1024:0));
if (totalclock > (1000000000L) && totalclock < (1000000320L))

View file

@ -362,6 +362,8 @@ static void G_DoLoadScreen(char *statustext, int32_t percent)
if ((uint32_t)j < 2*MAXTILES)
{
if (getrendermode() >= 3)
clearview(0);
rotatesprite_fs(320<<15,200<<15,65536L,0, j > MAXTILES-1?j-MAXTILES:j,0,0,
2+8+64+(ud.bgstretch?1024:0));
}