mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
In places where fullscreen tiles are drawn (logo etc.), use clearallviews().
This really fixes clearing the borders to the left and right with widescreen and hud_bgstretch=0. Also, it seems to fix glitches when the "screen size" is small (ud.screen_size is large). git-svn-id: https://svn.eduke32.com/eduke32@2924 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e9095c8470
commit
9caf442177
3 changed files with 36 additions and 34 deletions
|
@ -416,7 +416,7 @@ void G_PlayAnim(const char *fn,char t)
|
||||||
g_restorePalette = 0;
|
g_restorePalette = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
clearview(0);
|
clearallviews(0);
|
||||||
|
|
||||||
rotatesprite_fs(0<<16,0<<16,65536L,512,TILE_ANIM,0,0,2+4+8+16+64+(ud.bgstretch?1024:0));
|
rotatesprite_fs(0<<16,0<<16,65536L,512,TILE_ANIM,0,0,2+4+8+16+64+(ud.bgstretch?1024:0));
|
||||||
nextpage();
|
nextpage();
|
||||||
|
|
|
@ -1923,10 +1923,12 @@ void fadepal(int32_t r, int32_t g, int32_t b, int32_t start, int32_t end, int32_
|
||||||
}
|
}
|
||||||
|
|
||||||
// START and END limits are always inclusive!
|
// START and END limits are always inclusive!
|
||||||
// STEP must evenly divide END-START, i.e. abs(end-start)%step == 0
|
|
||||||
static void fadepaltile(int32_t r, int32_t g, int32_t b, int32_t start, int32_t end, int32_t step, int32_t tile)
|
static void fadepaltile(int32_t r, int32_t g, int32_t b, int32_t start, int32_t end, int32_t step, int32_t tile)
|
||||||
{
|
{
|
||||||
clearview(0);
|
// STEP must evenly divide END-START
|
||||||
|
Bassert(klabs(end-start)%step == 0);
|
||||||
|
|
||||||
|
clearallviews(0);
|
||||||
|
|
||||||
// (end-start)/step + 1 iterations
|
// (end-start)/step + 1 iterations
|
||||||
do
|
do
|
||||||
|
@ -3012,7 +3014,7 @@ void G_DrawBackground(void)
|
||||||
{
|
{
|
||||||
int32_t bgtile;
|
int32_t bgtile;
|
||||||
|
|
||||||
clearview(0);
|
clearallviews(0);
|
||||||
|
|
||||||
// when not rendering a game, fullscreen wipe
|
// when not rendering a game, fullscreen wipe
|
||||||
#define MENUTILE (!getrendermode()?MENUSCREEN:LOADSCREEN)
|
#define MENUTILE (!getrendermode()?MENUSCREEN:LOADSCREEN)
|
||||||
|
@ -9091,7 +9093,7 @@ static void G_DisplayLogo(void)
|
||||||
I_ClearAllInput();
|
I_ClearAllInput();
|
||||||
|
|
||||||
setview(0,0,xdim-1,ydim-1);
|
setview(0,0,xdim-1,ydim-1);
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
G_FadePalette(0,0,0,63);
|
G_FadePalette(0,0,0,63);
|
||||||
|
|
||||||
flushperms();
|
flushperms();
|
||||||
|
@ -9116,7 +9118,7 @@ static void G_DisplayLogo(void)
|
||||||
I_ClearAllInput();
|
I_ClearAllInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
nextpage();
|
nextpage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9132,7 +9134,7 @@ static void G_DisplayLogo(void)
|
||||||
//G_FadePalette(0,0,0,63);
|
//G_FadePalette(0,0,0,63);
|
||||||
if (logoflags & LOGO_3DRSCREEN)
|
if (logoflags & LOGO_3DRSCREEN)
|
||||||
{
|
{
|
||||||
clearview(0);
|
clearallviews(0);
|
||||||
|
|
||||||
P_SetGamePalette(g_player[myconnectindex].ps, DREALMSPAL, 8+2/*+1*/); // JBF 20040308
|
P_SetGamePalette(g_player[myconnectindex].ps, DREALMSPAL, 8+2/*+1*/); // JBF 20040308
|
||||||
fadepal(0,0,0, 0,63,7);
|
fadepal(0,0,0, 0,63,7);
|
||||||
|
@ -9143,7 +9145,7 @@ static void G_DisplayLogo(void)
|
||||||
totalclock = 0;
|
totalclock = 0;
|
||||||
while (totalclock < (120*7) && !I_CheckInputWaiting())
|
while (totalclock < (120*7) && !I_CheckInputWaiting())
|
||||||
{
|
{
|
||||||
clearview(0);
|
clearallviews(0);
|
||||||
|
|
||||||
rotatesprite_fs(0,0,65536L,0,DREALMS,0,0,2+8+16+64+(ud.bgstretch?1024:0));
|
rotatesprite_fs(0,0,65536L,0,DREALMS,0,0,2+8+16+64+(ud.bgstretch?1024:0));
|
||||||
|
|
||||||
|
@ -9161,12 +9163,12 @@ static void G_DisplayLogo(void)
|
||||||
I_ClearInputWaiting();
|
I_ClearInputWaiting();
|
||||||
}
|
}
|
||||||
|
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
nextpage();
|
nextpage();
|
||||||
|
|
||||||
if (logoflags & LOGO_TITLESCREEN)
|
if (logoflags & LOGO_TITLESCREEN)
|
||||||
{
|
{
|
||||||
clearview(0);
|
clearallviews(0);
|
||||||
|
|
||||||
//g_player[myconnectindex].ps->palette = titlepal;
|
//g_player[myconnectindex].ps->palette = titlepal;
|
||||||
P_SetGamePalette(g_player[myconnectindex].ps, TITLEPAL, 8+2/*+1*/); // JBF 20040308
|
P_SetGamePalette(g_player[myconnectindex].ps, TITLEPAL, 8+2/*+1*/); // JBF 20040308
|
||||||
|
@ -9178,7 +9180,7 @@ static void G_DisplayLogo(void)
|
||||||
|
|
||||||
while (totalclock < (860+120) && !I_CheckInputWaiting())
|
while (totalclock < (860+120) && !I_CheckInputWaiting())
|
||||||
{
|
{
|
||||||
clearview(0);
|
clearallviews(0);
|
||||||
|
|
||||||
rotatesprite_fs(0,0,65536L,0,BETASCREEN,0,0,2+8+16+64+(ud.bgstretch?1024:0));
|
rotatesprite_fs(0,0,65536L,0,BETASCREEN,0,0,2+8+16+64+(ud.bgstretch?1024:0));
|
||||||
if (logoflags & LOGO_DUKENUKEM)
|
if (logoflags & LOGO_DUKENUKEM)
|
||||||
|
@ -9254,7 +9256,7 @@ static void G_DisplayLogo(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
flushperms();
|
flushperms();
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
nextpage();
|
nextpage();
|
||||||
|
|
||||||
//g_player[myconnectindex].ps->palette = palette;
|
//g_player[myconnectindex].ps->palette = palette;
|
||||||
|
@ -9262,7 +9264,7 @@ static void G_DisplayLogo(void)
|
||||||
S_PlaySound(NITEVISION_ONOFF);
|
S_PlaySound(NITEVISION_ONOFF);
|
||||||
|
|
||||||
//G_FadePalette(0,0,0,0);
|
//G_FadePalette(0,0,0,0);
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void G_Cleanup(void)
|
static void G_Cleanup(void)
|
||||||
|
@ -10846,7 +10848,7 @@ void G_BonusScreen(int32_t bonusonly)
|
||||||
|
|
||||||
fadepal(0,0,0, 0,63,7);
|
fadepal(0,0,0, 0,63,7);
|
||||||
setview(0,0,xdim-1,ydim-1);
|
setview(0,0,xdim-1,ydim-1);
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
nextpage();
|
nextpage();
|
||||||
flushperms();
|
flushperms();
|
||||||
|
|
||||||
|
@ -10864,7 +10866,7 @@ void G_BonusScreen(int32_t bonusonly)
|
||||||
if (ud.lockout == 0)
|
if (ud.lockout == 0)
|
||||||
{
|
{
|
||||||
P_SetGamePalette(g_player[myconnectindex].ps, ENDINGPAL, 8+2/*+1*/); // JBF 20040308
|
P_SetGamePalette(g_player[myconnectindex].ps, ENDINGPAL, 8+2/*+1*/); // JBF 20040308
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
rotatesprite_fs(0,50<<16,65536L,0,VICTORY1,0,0,2+8+16+64+128+(ud.bgstretch?1024:0));
|
rotatesprite_fs(0,50<<16,65536L,0,VICTORY1,0,0,2+8+16+64+128+(ud.bgstretch?1024:0));
|
||||||
nextpage();
|
nextpage();
|
||||||
//g_player[myconnectindex].ps->palette = endingpal;
|
//g_player[myconnectindex].ps->palette = endingpal;
|
||||||
|
@ -10875,7 +10877,7 @@ void G_BonusScreen(int32_t bonusonly)
|
||||||
// tinc = 0;
|
// tinc = 0;
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
rotatesprite_fs(0,50<<16,65536L,0,VICTORY1,0,0,2+8+16+64+128+(ud.bgstretch?1024:0));
|
rotatesprite_fs(0,50<<16,65536L,0,VICTORY1,0,0,2+8+16+64+128+(ud.bgstretch?1024:0));
|
||||||
|
|
||||||
// boss
|
// boss
|
||||||
|
@ -10941,14 +10943,14 @@ void G_BonusScreen(int32_t bonusonly)
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
S_StopMusic();
|
S_StopMusic();
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
nextpage();
|
nextpage();
|
||||||
|
|
||||||
if (ud.lockout == 0)
|
if (ud.lockout == 0)
|
||||||
{
|
{
|
||||||
G_PlayAnim("cineov2.anm",1);
|
G_PlayAnim("cineov2.anm",1);
|
||||||
I_ClearInputWaiting();
|
I_ClearInputWaiting();
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
nextpage();
|
nextpage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10970,20 +10972,20 @@ void G_BonusScreen(int32_t bonusonly)
|
||||||
setview(0,0,xdim-1,ydim-1);
|
setview(0,0,xdim-1,ydim-1);
|
||||||
|
|
||||||
S_StopMusic();
|
S_StopMusic();
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
nextpage();
|
nextpage();
|
||||||
|
|
||||||
if (ud.lockout == 0)
|
if (ud.lockout == 0)
|
||||||
{
|
{
|
||||||
I_ClearInputWaiting();
|
I_ClearInputWaiting();
|
||||||
G_PlayAnim("vol4e1.anm",8);
|
G_PlayAnim("vol4e1.anm",8);
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
nextpage();
|
nextpage();
|
||||||
G_PlayAnim("vol4e2.anm",10);
|
G_PlayAnim("vol4e2.anm",10);
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
nextpage();
|
nextpage();
|
||||||
G_PlayAnim("vol4e3.anm",11);
|
G_PlayAnim("vol4e3.anm",11);
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
nextpage();
|
nextpage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10996,7 +10998,7 @@ void G_BonusScreen(int32_t bonusonly)
|
||||||
G_FadePalette(0,0,0,0);
|
G_FadePalette(0,0,0,0);
|
||||||
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2/*+1*/); // JBF 20040308
|
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2/*+1*/); // JBF 20040308
|
||||||
// G_FadePalette(0,0,0,63);
|
// G_FadePalette(0,0,0,63);
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
menutext(160,60,0,0,"Thanks to all our");
|
menutext(160,60,0,0,"Thanks to all our");
|
||||||
menutext(160,60+16,0,0,"fans for giving");
|
menutext(160,60+16,0,0,"fans for giving");
|
||||||
menutext(160,60+16+16,0,0,"us big heads.");
|
menutext(160,60+16+16,0,0,"us big heads.");
|
||||||
|
@ -11010,7 +11012,7 @@ void G_BonusScreen(int32_t bonusonly)
|
||||||
handle_events_while_no_input();
|
handle_events_while_no_input();
|
||||||
fadepal(0,0,0, 0,63,3);
|
fadepal(0,0,0, 0,63,3);
|
||||||
|
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
nextpage();
|
nextpage();
|
||||||
|
|
||||||
G_PlayAnim("DUKETEAM.ANM",4);
|
G_PlayAnim("DUKETEAM.ANM",4);
|
||||||
|
@ -11018,7 +11020,7 @@ void G_BonusScreen(int32_t bonusonly)
|
||||||
I_ClearInputWaiting();
|
I_ClearInputWaiting();
|
||||||
handle_events_while_no_input();
|
handle_events_while_no_input();
|
||||||
|
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
nextpage();
|
nextpage();
|
||||||
G_FadePalette(0,0,0,63);
|
G_FadePalette(0,0,0,63);
|
||||||
|
|
||||||
|
@ -11030,7 +11032,7 @@ void G_BonusScreen(int32_t bonusonly)
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
S_StopMusic();
|
S_StopMusic();
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
nextpage();
|
nextpage();
|
||||||
if (ud.lockout == 0)
|
if (ud.lockout == 0)
|
||||||
{
|
{
|
||||||
|
@ -11040,7 +11042,7 @@ void G_BonusScreen(int32_t bonusonly)
|
||||||
ototalclock = totalclock+200;
|
ototalclock = totalclock+200;
|
||||||
while (totalclock < ototalclock)
|
while (totalclock < ototalclock)
|
||||||
G_HandleAsync();
|
G_HandleAsync();
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
nextpage();
|
nextpage();
|
||||||
|
|
||||||
FX_StopAllSounds();
|
FX_StopAllSounds();
|
||||||
|
@ -11080,7 +11082,7 @@ ENDANM:
|
||||||
S_ClearSoundLocks();
|
S_ClearSoundLocks();
|
||||||
S_PlaySound(ENDSEQVOL3SND4);
|
S_PlaySound(ENDSEQVOL3SND4);
|
||||||
|
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
nextpage();
|
nextpage();
|
||||||
|
|
||||||
G_PlayAnim("DUKETEAM.ANM",4);
|
G_PlayAnim("DUKETEAM.ANM",4);
|
||||||
|
@ -11088,7 +11090,7 @@ ENDANM:
|
||||||
I_ClearInputWaiting();
|
I_ClearInputWaiting();
|
||||||
handle_events_while_no_input();
|
handle_events_while_no_input();
|
||||||
|
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
nextpage();
|
nextpage();
|
||||||
G_FadePalette(0,0,0,63);
|
G_FadePalette(0,0,0,63);
|
||||||
}
|
}
|
||||||
|
@ -11097,7 +11099,7 @@ ENDANM:
|
||||||
FX_StopAllSounds();
|
FX_StopAllSounds();
|
||||||
S_ClearSoundLocks();
|
S_ClearSoundLocks();
|
||||||
|
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -11266,7 +11268,7 @@ FRAGBONUS:
|
||||||
|
|
||||||
if (g_player[myconnectindex].ps->gm&MODE_EOL)
|
if (g_player[myconnectindex].ps->gm&MODE_EOL)
|
||||||
{
|
{
|
||||||
clearview(0);
|
clearallviews(0);
|
||||||
|
|
||||||
rotatesprite_fs(0,0,65536L,0,BONUSSCREEN+gfx_offset,0,0,2+8+16+64+128+(ud.bgstretch?1024:0));
|
rotatesprite_fs(0,0,65536L,0,BONUSSCREEN+gfx_offset,0,0,2+8+16+64+128+(ud.bgstretch?1024:0));
|
||||||
|
|
||||||
|
|
|
@ -354,12 +354,12 @@ static void G_DoLoadScreen(const char *statustext, int32_t percent)
|
||||||
i = ud.screen_size;
|
i = ud.screen_size;
|
||||||
ud.screen_size = 0;
|
ud.screen_size = 0;
|
||||||
G_UpdateScreenArea();
|
G_UpdateScreenArea();
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((uint32_t)j < 2*MAXTILES)
|
if ((uint32_t)j < 2*MAXTILES)
|
||||||
{
|
{
|
||||||
clearview(0);
|
clearallviews(0);
|
||||||
|
|
||||||
rotatesprite_fs(320<<15,200<<15,65536L,0, j > MAXTILES-1?j-MAXTILES:j,0,0,
|
rotatesprite_fs(320<<15,200<<15,65536L,0, j > MAXTILES-1?j-MAXTILES:j,0,0,
|
||||||
2+8+64+(ud.bgstretch?1024:0));
|
2+8+64+(ud.bgstretch?1024:0));
|
||||||
|
@ -406,7 +406,7 @@ static void G_DoLoadScreen(const char *statustext, int32_t percent)
|
||||||
{
|
{
|
||||||
if (!statustext)
|
if (!statustext)
|
||||||
{
|
{
|
||||||
clearview(0L);
|
clearallviews(0L);
|
||||||
//g_player[myconnectindex].ps->palette = palette;
|
//g_player[myconnectindex].ps->palette = palette;
|
||||||
//G_FadePalette(0,0,0,0);
|
//G_FadePalette(0,0,0,0);
|
||||||
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0); // JBF 20040308
|
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 0); // JBF 20040308
|
||||||
|
|
Loading…
Reference in a new issue