Encore support, gif fix and slight optimization

This commit is contained in:
Latapostrophe 2021-05-02 11:38:33 +02:00
parent 66740e96dc
commit f559f24c07
4 changed files with 22 additions and 31 deletions

View file

@ -415,7 +415,7 @@ void F_WipeStageTitle(void)
if ((WipeStageTitle) && G_IsTitleCardAvailable()) if ((WipeStageTitle) && G_IsTitleCardAvailable())
{ {
ST_runTitleCard(); ST_runTitleCard();
ST_drawWipeTitleCard(); ST_drawTitleCard();
} }
} }

View file

@ -1317,18 +1317,19 @@ void G_PreLevelTitleCard(void)
while (nowtime < endtime) while (nowtime < endtime)
{ {
// draw loop // draw loop
while (!((nowtime = I_GetTime()) - lasttime))
I_Sleep();
lasttime = nowtime;
ST_runTitleCard(); ST_runTitleCard();
ST_drawTitleCard(); ST_preLevelTitleCardDrawer();
I_FinishUpdate(); // page flip or blit buffer I_FinishUpdate(); // page flip or blit buffer
NetKeepAlive(); // Prevent timeouts
if (moviemode) if (moviemode)
M_SaveFrame(); M_SaveFrame();
if (takescreenshot) // Only take screenshots after drawing. if (takescreenshot) // Only take screenshots after drawing.
M_DoScreenShot(); M_DoScreenShot();
while (!((nowtime = I_GetTime()) - lasttime))
I_Sleep();
lasttime = nowtime;
} }
#endif #endif
} }

View file

@ -950,7 +950,7 @@ void ST_drawTitleCard(void)
// Avoid HOMs while drawing the start of the titlecard // Avoid HOMs while drawing the start of the titlecard
if (lt_ticker < TTANIMSTART) if (lt_ticker < TTANIMSTART)
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31); V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, levelfadecol);
// Background zig-zags // Background zig-zags
V_DrawFixedPatch((chev1x)*FRACUNIT, (chev1y)*FRACUNIT, FRACUNIT, chevtflag, tcchev1, NULL); V_DrawFixedPatch((chev1x)*FRACUNIT, (chev1y)*FRACUNIT, FRACUNIT, chevtflag, tcchev1, NULL);
@ -1055,20 +1055,11 @@ void ST_preLevelTitleCardDrawer(void)
{ {
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, levelfadecol); V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, levelfadecol);
ST_drawWipeTitleCard(); ST_drawTitleCard();
I_OsPolling(); I_OsPolling();
I_UpdateNoBlit(); I_UpdateNoBlit();
} }
//
// Draw the title card while on a wipe.
// Also used in G_PreLevelTitleCard.
//
void ST_drawWipeTitleCard(void)
{
ST_drawTitleCard();
}
// //
// Draw the status bar overlay, customisable: the user chooses which // Draw the status bar overlay, customisable: the user chooses which
// kind of information to overlay // kind of information to overlay

View file

@ -64,7 +64,6 @@ void ST_runTitleCard(void);
void ST_drawTitleCard(void); void ST_drawTitleCard(void);
void ST_preDrawTitleCard(void); void ST_preDrawTitleCard(void);
void ST_preLevelTitleCardDrawer(void); void ST_preLevelTitleCardDrawer(void);
void ST_drawWipeTitleCard(void);
extern tic_t lt_ticker, lt_lasttic; extern tic_t lt_ticker, lt_lasttic;
extern tic_t lt_exitticker, lt_endtime; extern tic_t lt_exitticker, lt_endtime;