LEVELWIPES

This commit is contained in:
Jaime Passos 2019-11-15 18:21:12 -03:00
parent 76488d835f
commit c15ee65015
7 changed files with 26 additions and 11 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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