From 1e4060af8cc61f36dd34327f69f8556b74e6c366 Mon Sep 17 00:00:00 2001 From: Jaime Passos Date: Mon, 18 Nov 2019 19:22:46 -0300 Subject: [PATCH 1/4] remove unused levelwipes --- src/d_main.c | 8 ----- src/doomdef.h | 3 -- src/f_finale.h | 2 -- src/f_wipe.c | 56 ++------------------------------ src/g_game.c | 1 - src/hardware/hw_drv.h | 2 -- src/hardware/hw_main.c | 20 ------------ src/hardware/hw_main.h | 1 - src/hardware/r_opengl/r_opengl.c | 5 --- src/m_menu.c | 2 -- src/sdl/hwsym_sdl.c | 1 - src/sdl/i_video.c | 1 - src/st_stuff.c | 4 --- src/win32/win_dll.c | 2 -- 14 files changed, 3 insertions(+), 105 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index e48b26ba8..728d227b3 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -420,12 +420,6 @@ static void D_Display(void) if (gamestate != GS_TIMEATTACK) CON_Drawer(); -#ifdef LEVELWIPES - // Running a level wipe - if (WipeInAction && WipeInLevel) - F_WipeTicker(); -#endif - M_Drawer(); // menu is drawn even on top of everything // focus lost moved to M_Drawer @@ -445,7 +439,6 @@ static void D_Display(void) { F_WipeEndScreen(); // Funny. -#ifndef LEVELWIPES if (WipeStageTitle && st_overlay) { lt_ticker--; @@ -454,7 +447,6 @@ static void D_Display(void) V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, levelfadecol); F_WipeStartScreen(); } -#endif F_RunWipe(wipetypepost, gamestate != GS_TIMEATTACK && gamestate != GS_TITLESCREEN); } diff --git a/src/doomdef.h b/src/doomdef.h index 8cf9e5d09..511dad858 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -628,9 +628,6 @@ extern const char *compdate, *comptime, *comprevision, *compbranch; #define ROTANGLES 24 // Needs to be a divisor of 360 (45, 60, 90, 120...) #define ROTANGDIFF (360 / ROTANGLES) -/// Level wipes -//#define LEVELWIPES - #ifndef HAVE_PNG #define NO_PNG_LUMPS #endif diff --git a/src/f_finale.h b/src/f_finale.h index 82a7e1408..b5334c29a 100644 --- a/src/f_finale.h +++ b/src/f_finale.h @@ -141,7 +141,6 @@ void F_MenuPresTicker(boolean run); #define FORCEWIPEOFF -2 extern boolean WipeInAction; -extern boolean WipeInLevel; extern boolean WipeStageTitle; typedef enum @@ -176,7 +175,6 @@ extern INT32 lastwipetic; void F_WipeStartScreen(void); void F_WipeEndScreen(void); void F_RunWipe(UINT8 wipetype, boolean drawMenu); -void F_WipeTicker(void); void F_WipeStageTitle(void); #define F_WipeColorFill(c) V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, (wipecolorfill = c)) tic_t F_GetWipeLength(UINT8 wipetype); diff --git a/src/f_wipe.c b/src/f_wipe.c index 17ffbe0c4..b2283c574 100644 --- a/src/f_wipe.c +++ b/src/f_wipe.c @@ -91,7 +91,6 @@ UINT8 wipedefs[NUMWIPEDEFS] = { //-------------------------------------------------------------------------- boolean WipeInAction = false; -boolean WipeInLevel = false; boolean WipeStageTitle = false; INT32 lastwipetic = 0; @@ -104,8 +103,6 @@ static UINT8 *wipe_scr_end; //screen 4 static UINT8 *wipe_scr; //screen 0 (main drawing) static fixed_t paldiv = 0; -static UINT8 curwipetype; -static UINT8 curwipeframe; UINT8 wipecolorfill = 31; /** Create fademask_t from lump @@ -349,8 +346,6 @@ static void F_DoWipe(fademask_t *fademask) free(scrxpos); free(scrypos); } - if (wipestyle == WIPESTYLE_LEVEL) - F_WipeStageTitle(); } #endif @@ -416,13 +411,6 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu) else wipestyle = WIPESTYLE_NORMAL; - curwipetype = wipetype; - curwipeframe = 0; -#ifdef LEVELWIPES - if (WipeInLevel) - return; -#endif - // lastwipetic should either be 0 or the tic we last wiped // on for fade-to-black for (;;) @@ -450,6 +438,9 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu) #endif F_DoWipe(fmask); + if (wipestyle == WIPESTYLE_LEVEL) + F_WipeStageTitle(); + I_OsPolling(); I_UpdateNoBlit(); @@ -463,47 +454,6 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu) } WipeInAction = false; - WipeInLevel = false; - WipeStageTitle = false; -#endif -} - -/** Run and display the fade with the level. - */ -void F_WipeTicker(void) -{ -#ifndef NOWIPE -#ifndef LEVELWIPES - WipeInAction = false; -#else - fademask_t *fmask; - - // Wait, what? - if (!WipeInAction) - return; - - if (rendermode == render_soft) - wipe_scr_start = wipe_scr_end = screens[0]; - - // get fademask first so we can tell if it exists or not - fmask = F_GetFadeMask(curwipetype, curwipeframe++); - if (!fmask) - { - // stop - WipeInAction = false; - WipeInLevel = false; - WipeStageTitle = false; - return; - } - -#ifdef HWRENDER - // send in the wipe type and wipe frame because we need to cache the graphic - if (rendermode == render_opengl) - HWR_DoLevelWipe(curwipetype, curwipeframe-1, wipecolorfill); // also send the wipe color - else -#endif - F_DoWipe(fmask); -#endif WipeStageTitle = false; #endif } diff --git a/src/g_game.c b/src/g_game.c index 5e1645901..3242db300 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1728,7 +1728,6 @@ void G_StartTitleCard(void) // start the title card WipeStageTitle = (!titlemapinaction); - WipeInLevel = true; wipestyleflags |= WSF_FADEIN; wipestyleflags &= ~WSF_FADEOUT; } diff --git a/src/hardware/hw_drv.h b/src/hardware/hw_drv.h index 1e40a403d..aed1611f1 100644 --- a/src/hardware/hw_drv.h +++ b/src/hardware/hw_drv.h @@ -71,7 +71,6 @@ EXPORT void HWRAPI(FlushScreenTextures) (void); EXPORT void HWRAPI(StartScreenWipe) (void); EXPORT void HWRAPI(EndScreenWipe) (void); EXPORT void HWRAPI(DoScreenWipe) (void); -EXPORT void HWRAPI(DoScreenWipeLevel) (void); EXPORT void HWRAPI(DrawIntermissionBG) (void); EXPORT void HWRAPI(MakeScreenTexture) (void); EXPORT void HWRAPI(MakeScreenFinalTexture) (void); @@ -113,7 +112,6 @@ struct hwdriver_s StartScreenWipe pfnStartScreenWipe; EndScreenWipe pfnEndScreenWipe; DoScreenWipe pfnDoScreenWipe; - DoScreenWipeLevel pfnDoScreenWipeLevel; DrawIntermissionBG pfnDrawIntermissionBG; MakeScreenTexture pfnMakeScreenTexture; MakeScreenFinalTexture pfnMakeScreenFinalTexture; diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 263344ebe..5f0c25a59 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -7085,26 +7085,6 @@ void HWR_DoTintedWipe(UINT8 wipenum, UINT8 scrnnum) HWR_DoWipe(wipenum, scrnnum); } -void HWR_DoLevelWipe(UINT8 wipenum, UINT8 scrnnum, UINT8 colfill) -{ -#ifndef LEVELWIPES - (void)wipenum; - (void)scrnnum; - (void)colfill; -#else - if (!HWR_WipeCheck(wipenum, scrnnum)) - return; - - HWR_EndScreenWipe(); - V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, colfill); - HWR_StartScreenWipe(); - HWR_GetFadeMask(wipelumpnum); - - HWD.pfnDoScreenWipeLevel(); - F_WipeStageTitle(); -#endif -} - void HWR_MakeScreenFinalTexture(void) { HWD.pfnMakeScreenFinalTexture(); diff --git a/src/hardware/hw_main.h b/src/hardware/hw_main.h index fb726f2f9..e19c557d0 100644 --- a/src/hardware/hw_main.h +++ b/src/hardware/hw_main.h @@ -67,7 +67,6 @@ void HWR_EndScreenWipe(void); void HWR_DrawIntermissionBG(void); void HWR_DoWipe(UINT8 wipenum, UINT8 scrnnum); void HWR_DoTintedWipe(UINT8 wipenum, UINT8 scrnnum); -void HWR_DoLevelWipe(UINT8 wipenum, UINT8 scrnnum, UINT8 wipecolorfill); void HWR_MakeScreenFinalTexture(void); void HWR_DrawScreenFinalTexture(int width, int height); diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 323772cb0..8c0ca7155 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -2587,11 +2587,6 @@ EXPORT void HWRAPI(DoScreenWipe)(void) tex_downloaded = endScreenWipe; } -EXPORT void HWRAPI(DoScreenWipeLevel)(void) -{ - DoScreenWipe(); -} - // Create a texture from the screen. EXPORT void HWRAPI(MakeScreenTexture) (void) { diff --git a/src/m_menu.c b/src/m_menu.c index 7a5aa8ae6..9ffc1150c 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -3365,8 +3365,6 @@ boolean M_Responder(event_t *ev) void M_Drawer(void) { boolean wipe = WipeInAction; - if (WipeInLevel) - wipe = false; if (currentMenu == &MessageDef) menuactive = true; diff --git a/src/sdl/hwsym_sdl.c b/src/sdl/hwsym_sdl.c index 82a430ee6..5f040023a 100644 --- a/src/sdl/hwsym_sdl.c +++ b/src/sdl/hwsym_sdl.c @@ -97,7 +97,6 @@ void *hwSym(const char *funcName,void *handle) GETFUNC(StartScreenWipe); GETFUNC(EndScreenWipe); GETFUNC(DoScreenWipe); - GETFUNC(DoScreenWipeLevel); GETFUNC(DrawIntermissionBG); GETFUNC(MakeScreenTexture); GETFUNC(MakeScreenFinalTexture); diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 5f162b00d..f22c79eca 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -1666,7 +1666,6 @@ void I_StartupGraphics(void) HWD.pfnStartScreenWipe = hwSym("StartScreenWipe",NULL); HWD.pfnEndScreenWipe = hwSym("EndScreenWipe",NULL); HWD.pfnDoScreenWipe = hwSym("DoScreenWipe",NULL); - HWD.pfnDoScreenWipeLevel= hwSym("DoScreenWipeLevel",NULL); HWD.pfnDrawIntermissionBG=hwSym("DrawIntermissionBG",NULL); HWD.pfnMakeScreenTexture= hwSym("MakeScreenTexture",NULL); HWD.pfnMakeScreenFinalTexture=hwSym("MakeScreenFinalTexture",NULL); diff --git a/src/st_stuff.c b/src/st_stuff.c index 4e8afa16a..621f67820 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1294,10 +1294,8 @@ void ST_drawTitleCard(void) return; #endif -#ifndef LEVELWIPES if ((lt_ticker-lt_lasttic) > 1) lt_ticker = lt_lasttic+1; -#endif ST_cacheLevelTitle(); actpat = lt_patches[0]; @@ -1351,9 +1349,7 @@ luahook: void ST_preLevelTitleCardDrawer(tic_t ticker, boolean update) { V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, levelfadecol); -#ifndef LEVELWIPES if (ticker < PRELEVELTIME-1) -#endif ST_drawWipeTitleCard(); I_OsPolling(); diff --git a/src/win32/win_dll.c b/src/win32/win_dll.c index 1311b6870..5378bb52f 100644 --- a/src/win32/win_dll.c +++ b/src/win32/win_dll.c @@ -121,7 +121,6 @@ static loadfunc_t hwdFuncTable[] = { {"StartScreenWipe@0", &hwdriver.pfnStartScreenWipe}, {"EndScreenWipe@0", &hwdriver.pfnEndScreenWipe}, {"DoScreenWipe@4", &hwdriver.pfnDoScreenWipe}, - {"DoScreenWipeLevel@0", &hwdriver.pfnDoScreenWipeLevel}, {"DrawIntermissionBG@0",&hwdriver.pfnDrawIntermissionBG}, {"MakeScreenTexture@0", &hwdriver.pfnMakeScreenTexture}, {"MakeScreenFinalTexture@0", &hwdriver.pfnMakeScreenFinalTexture}, @@ -153,7 +152,6 @@ static loadfunc_t hwdFuncTable[] = { {"StartScreenWipe", &hwdriver.pfnStartScreenWipe}, {"EndScreenWipe", &hwdriver.pfnEndScreenWipe}, {"DoScreenWipe", &hwdriver.pfnDoScreenWipe}, - {"DoScreenWipeLevel", &hwdriver.pfnDoScreenWipeLevel}, {"DrawIntermissionBG", &hwdriver.pfnDrawIntermissionBG}, {"MakeScreenTexture", &hwdriver.pfnMakeScreenTexture}, {"MakeScreenFinalTexture", &hwdriver.pfnMakeScreenFinalTexture}, From 8de06a93f9c2e62c57392d7bbc44fdba1855fcb4 Mon Sep 17 00:00:00 2001 From: Jaime Passos Date: Mon, 18 Nov 2019 20:07:37 -0300 Subject: [PATCH 2/4] remove UINT8 wipecolorfill --- src/f_finale.h | 3 +-- src/f_wipe.c | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/f_finale.h b/src/f_finale.h index b5334c29a..024b183b2 100644 --- a/src/f_finale.h +++ b/src/f_finale.h @@ -165,7 +165,6 @@ extern wipestyleflags_t wipestyleflags; #define FADEGREENFACTOR 15 #define FADEBLUEFACTOR 10 -extern UINT8 wipecolorfill; extern INT32 lastwipetic; // Don't know where else to place this constant @@ -176,7 +175,7 @@ void F_WipeStartScreen(void); void F_WipeEndScreen(void); void F_RunWipe(UINT8 wipetype, boolean drawMenu); void F_WipeStageTitle(void); -#define F_WipeColorFill(c) V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, (wipecolorfill = c)) +#define F_WipeColorFill(c) V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, c) tic_t F_GetWipeLength(UINT8 wipetype); boolean F_WipeExists(UINT8 wipetype); diff --git a/src/f_wipe.c b/src/f_wipe.c index b2283c574..20651cb1d 100644 --- a/src/f_wipe.c +++ b/src/f_wipe.c @@ -103,8 +103,6 @@ static UINT8 *wipe_scr_end; //screen 4 static UINT8 *wipe_scr; //screen 0 (main drawing) static fixed_t paldiv = 0; -UINT8 wipecolorfill = 31; - /** Create fademask_t from lump * * \param lump Lump name to get data from From 8de7ff0c861ecda31e4e738feefb477bc28a29bb Mon Sep 17 00:00:00 2001 From: Jaime Passos Date: Mon, 18 Nov 2019 21:44:02 -0300 Subject: [PATCH 3/4] fix subttl --- src/st_stuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index 621f67820..60aadccfe 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1333,7 +1333,7 @@ void ST_drawTitleCard(void) V_DrawLevelTitle(lvlttlxpos - ttlscroll, 80, V_PERPLAYER, lvlttl); if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE)) V_DrawLevelTitle(zonexpos + ttlscroll, 104, V_PERPLAYER, M_GetText("Zone")); - V_DrawCenteredString(subttlxpos - ttlnumxpos, 128, V_PERPLAYER|V_ALLOWLOWERCASE, subttl); + V_DrawCenteredString(subttlxpos - ttlscroll, 128, V_PERPLAYER|V_ALLOWLOWERCASE, subttl); lt_lasttic = lt_ticker; From 99d4db956c58dbeff87cad16cbfece1c75251653 Mon Sep 17 00:00:00 2001 From: Jaime Passos Date: Mon, 18 Nov 2019 21:45:30 -0300 Subject: [PATCH 4/4] change vertical alignment --- src/st_stuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index 60aadccfe..90e64798a 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1333,7 +1333,7 @@ void ST_drawTitleCard(void) V_DrawLevelTitle(lvlttlxpos - ttlscroll, 80, V_PERPLAYER, lvlttl); if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE)) V_DrawLevelTitle(zonexpos + ttlscroll, 104, V_PERPLAYER, M_GetText("Zone")); - V_DrawCenteredString(subttlxpos - ttlscroll, 128, V_PERPLAYER|V_ALLOWLOWERCASE, subttl); + V_DrawCenteredString(subttlxpos - ttlscroll, 152, V_PERPLAYER|V_ALLOWLOWERCASE, subttl); lt_lasttic = lt_ticker;