diff --git a/src/d_main.c b/src/d_main.c index 47ecb5fbf..011e38e2a 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -417,9 +417,11 @@ static void D_Display(void) if (gamestate != GS_TIMEATTACK) CON_Drawer(); - // Running a wipe, but it doesn't freeze the game - if (WipeInAction && (!WipeFreezeGame)) +#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 diff --git a/src/doomdef.h b/src/doomdef.h index 511dad858..8cf9e5d09 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -628,6 +628,9 @@ 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 6fd94d9c0..ba4afec42 100644 --- a/src/f_finale.h +++ b/src/f_finale.h @@ -141,7 +141,7 @@ void F_MenuPresTicker(boolean run); #define FORCEWIPEOFF -2 extern boolean WipeInAction; -extern boolean WipeFreezeGame; +extern boolean WipeInLevel; extern INT32 lastwipetic; typedef enum diff --git a/src/f_wipe.c b/src/f_wipe.c index b5b60403e..203d7c08d 100644 --- a/src/f_wipe.c +++ b/src/f_wipe.c @@ -89,7 +89,7 @@ UINT8 wipedefs[NUMWIPEDEFS] = { //-------------------------------------------------------------------------- boolean WipeInAction = false; -boolean WipeFreezeGame = true; +boolean WipeInLevel = false; INT32 lastwipetic = 0; wipestyle_t wipestyle = WIPESTYLE_NORMAL; @@ -273,7 +273,7 @@ static void F_DoWipe(fademask_t *fademask) relativepos = (draw_linestart * vid.width) + draw_rowstart; draw_linestogo = draw_lineend - draw_linestart; - if ((*mask == 0) && (wipestyle == WIPESTYLE_NORMAL)) + if (*mask == 0) { // shortcut - memcpy source to work while (draw_linestogo--) @@ -282,7 +282,7 @@ static void F_DoWipe(fademask_t *fademask) relativepos += vid.width; } } - else if ((*mask >= 10) && (wipestyle == WIPESTYLE_NORMAL)) + else if (*mask >= ((wipestyle == WIPESTYLE_LEVEL) ? FADECOLORMAPROWS : 10)) { // shortcut - memcpy target to work while (draw_linestogo--) @@ -412,8 +412,10 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu) curwipetype = wipetype; curwipeframe = 0; - if (!WipeFreezeGame) +#ifdef LEVELWIPES + if (WipeInLevel) return; +#endif // lastwipetic should either be 0 or the tic we last wiped // on for fade-to-black @@ -454,13 +456,17 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu) M_SaveFrame(); } WipeInAction = false; - WipeFreezeGame = true; + WipeInLevel = false; #endif } // Works On My Machine seal of approval void F_WipeTicker(void) { +#ifndef NOWIPE +#ifndef LEVELWIPES + WipeInAction = false; +#else fademask_t *fmask; // Wait, what? @@ -476,7 +482,7 @@ void F_WipeTicker(void) { // stop WipeInAction = false; - WipeFreezeGame = true; + WipeInLevel = false; return; } @@ -487,6 +493,8 @@ void F_WipeTicker(void) else #endif F_DoWipe(fmask); +#endif +#endif } /** Returns tic length of wipe diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index fb45ca4f7..4cb407621 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -7079,6 +7079,7 @@ void HWR_DoTintedWipe(UINT8 wipenum, UINT8 scrnnum) void HWR_DoLevelWipe(UINT8 wipenum, UINT8 scrnnum, UINT8 wipecolorfill) { +#ifdef LEVELWIPES if (!HWR_WipeCheck(wipenum, scrnnum)) return; @@ -7089,6 +7090,7 @@ void HWR_DoLevelWipe(UINT8 wipenum, UINT8 scrnnum, UINT8 wipecolorfill) HWD.pfnDoScreenWipeLevel(); F_WipeTitleCard(); +#endif } void HWR_MakeScreenFinalTexture(void) diff --git a/src/m_menu.c b/src/m_menu.c index 098f34b97..28799a9c3 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -3364,7 +3364,7 @@ boolean M_Responder(event_t *ev) void M_Drawer(void) { boolean wipe = WipeInAction; - if (!WipeFreezeGame) + if (WipeInLevel) wipe = false; if (currentMenu == &MessageDef) diff --git a/src/p_setup.c b/src/p_setup.c index 77fb3b511..60e507e86 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -3247,7 +3247,7 @@ boolean P_SetupLevel(boolean skipprecip) // Stage title! wipestyleflags |= WSF_FADEIN; wipestyleflags &= ~WSF_FADEOUT; - WipeFreezeGame = false; + WipeInLevel = true; if (rendermode != render_none && (!titlemapinaction) && ranspecialwipe != 2