LEVELWIPES
This commit is contained in:
parent
76488d835f
commit
c15ee65015
|
@ -417,9 +417,11 @@ static void D_Display(void)
|
||||||
if (gamestate != GS_TIMEATTACK)
|
if (gamestate != GS_TIMEATTACK)
|
||||||
CON_Drawer();
|
CON_Drawer();
|
||||||
|
|
||||||
// Running a wipe, but it doesn't freeze the game
|
#ifdef LEVELWIPES
|
||||||
if (WipeInAction && (!WipeFreezeGame))
|
// Running a level wipe
|
||||||
|
if (WipeInAction && WipeInLevel)
|
||||||
F_WipeTicker();
|
F_WipeTicker();
|
||||||
|
#endif
|
||||||
|
|
||||||
M_Drawer(); // menu is drawn even on top of everything
|
M_Drawer(); // menu is drawn even on top of everything
|
||||||
// focus lost moved to M_Drawer
|
// focus lost moved to M_Drawer
|
||||||
|
|
|
@ -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 ROTANGLES 24 // Needs to be a divisor of 360 (45, 60, 90, 120...)
|
||||||
#define ROTANGDIFF (360 / ROTANGLES)
|
#define ROTANGDIFF (360 / ROTANGLES)
|
||||||
|
|
||||||
|
/// Level wipes
|
||||||
|
//#define LEVELWIPES
|
||||||
|
|
||||||
#ifndef HAVE_PNG
|
#ifndef HAVE_PNG
|
||||||
#define NO_PNG_LUMPS
|
#define NO_PNG_LUMPS
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -141,7 +141,7 @@ void F_MenuPresTicker(boolean run);
|
||||||
#define FORCEWIPEOFF -2
|
#define FORCEWIPEOFF -2
|
||||||
|
|
||||||
extern boolean WipeInAction;
|
extern boolean WipeInAction;
|
||||||
extern boolean WipeFreezeGame;
|
extern boolean WipeInLevel;
|
||||||
extern INT32 lastwipetic;
|
extern INT32 lastwipetic;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
|
20
src/f_wipe.c
20
src/f_wipe.c
|
@ -89,7 +89,7 @@ UINT8 wipedefs[NUMWIPEDEFS] = {
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
|
|
||||||
boolean WipeInAction = false;
|
boolean WipeInAction = false;
|
||||||
boolean WipeFreezeGame = true;
|
boolean WipeInLevel = false;
|
||||||
INT32 lastwipetic = 0;
|
INT32 lastwipetic = 0;
|
||||||
|
|
||||||
wipestyle_t wipestyle = WIPESTYLE_NORMAL;
|
wipestyle_t wipestyle = WIPESTYLE_NORMAL;
|
||||||
|
@ -273,7 +273,7 @@ static void F_DoWipe(fademask_t *fademask)
|
||||||
relativepos = (draw_linestart * vid.width) + draw_rowstart;
|
relativepos = (draw_linestart * vid.width) + draw_rowstart;
|
||||||
draw_linestogo = draw_lineend - draw_linestart;
|
draw_linestogo = draw_lineend - draw_linestart;
|
||||||
|
|
||||||
if ((*mask == 0) && (wipestyle == WIPESTYLE_NORMAL))
|
if (*mask == 0)
|
||||||
{
|
{
|
||||||
// shortcut - memcpy source to work
|
// shortcut - memcpy source to work
|
||||||
while (draw_linestogo--)
|
while (draw_linestogo--)
|
||||||
|
@ -282,7 +282,7 @@ static void F_DoWipe(fademask_t *fademask)
|
||||||
relativepos += vid.width;
|
relativepos += vid.width;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((*mask >= 10) && (wipestyle == WIPESTYLE_NORMAL))
|
else if (*mask >= ((wipestyle == WIPESTYLE_LEVEL) ? FADECOLORMAPROWS : 10))
|
||||||
{
|
{
|
||||||
// shortcut - memcpy target to work
|
// shortcut - memcpy target to work
|
||||||
while (draw_linestogo--)
|
while (draw_linestogo--)
|
||||||
|
@ -412,8 +412,10 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu)
|
||||||
|
|
||||||
curwipetype = wipetype;
|
curwipetype = wipetype;
|
||||||
curwipeframe = 0;
|
curwipeframe = 0;
|
||||||
if (!WipeFreezeGame)
|
#ifdef LEVELWIPES
|
||||||
|
if (WipeInLevel)
|
||||||
return;
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
// lastwipetic should either be 0 or the tic we last wiped
|
// lastwipetic should either be 0 or the tic we last wiped
|
||||||
// on for fade-to-black
|
// on for fade-to-black
|
||||||
|
@ -454,13 +456,17 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu)
|
||||||
M_SaveFrame();
|
M_SaveFrame();
|
||||||
}
|
}
|
||||||
WipeInAction = false;
|
WipeInAction = false;
|
||||||
WipeFreezeGame = true;
|
WipeInLevel = false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Works On My Machine seal of approval
|
// Works On My Machine seal of approval
|
||||||
void F_WipeTicker(void)
|
void F_WipeTicker(void)
|
||||||
{
|
{
|
||||||
|
#ifndef NOWIPE
|
||||||
|
#ifndef LEVELWIPES
|
||||||
|
WipeInAction = false;
|
||||||
|
#else
|
||||||
fademask_t *fmask;
|
fademask_t *fmask;
|
||||||
|
|
||||||
// Wait, what?
|
// Wait, what?
|
||||||
|
@ -476,7 +482,7 @@ void F_WipeTicker(void)
|
||||||
{
|
{
|
||||||
// stop
|
// stop
|
||||||
WipeInAction = false;
|
WipeInAction = false;
|
||||||
WipeFreezeGame = true;
|
WipeInLevel = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -487,6 +493,8 @@ void F_WipeTicker(void)
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
F_DoWipe(fmask);
|
F_DoWipe(fmask);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns tic length of wipe
|
/** Returns tic length of wipe
|
||||||
|
|
|
@ -7079,6 +7079,7 @@ void HWR_DoTintedWipe(UINT8 wipenum, UINT8 scrnnum)
|
||||||
|
|
||||||
void HWR_DoLevelWipe(UINT8 wipenum, UINT8 scrnnum, UINT8 wipecolorfill)
|
void HWR_DoLevelWipe(UINT8 wipenum, UINT8 scrnnum, UINT8 wipecolorfill)
|
||||||
{
|
{
|
||||||
|
#ifdef LEVELWIPES
|
||||||
if (!HWR_WipeCheck(wipenum, scrnnum))
|
if (!HWR_WipeCheck(wipenum, scrnnum))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -7089,6 +7090,7 @@ void HWR_DoLevelWipe(UINT8 wipenum, UINT8 scrnnum, UINT8 wipecolorfill)
|
||||||
|
|
||||||
HWD.pfnDoScreenWipeLevel();
|
HWD.pfnDoScreenWipeLevel();
|
||||||
F_WipeTitleCard();
|
F_WipeTitleCard();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void HWR_MakeScreenFinalTexture(void)
|
void HWR_MakeScreenFinalTexture(void)
|
||||||
|
|
|
@ -3364,7 +3364,7 @@ boolean M_Responder(event_t *ev)
|
||||||
void M_Drawer(void)
|
void M_Drawer(void)
|
||||||
{
|
{
|
||||||
boolean wipe = WipeInAction;
|
boolean wipe = WipeInAction;
|
||||||
if (!WipeFreezeGame)
|
if (WipeInLevel)
|
||||||
wipe = false;
|
wipe = false;
|
||||||
|
|
||||||
if (currentMenu == &MessageDef)
|
if (currentMenu == &MessageDef)
|
||||||
|
|
|
@ -3247,7 +3247,7 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
// Stage title!
|
// Stage title!
|
||||||
wipestyleflags |= WSF_FADEIN;
|
wipestyleflags |= WSF_FADEIN;
|
||||||
wipestyleflags &= ~WSF_FADEOUT;
|
wipestyleflags &= ~WSF_FADEOUT;
|
||||||
WipeFreezeGame = false;
|
WipeInLevel = true;
|
||||||
if (rendermode != render_none
|
if (rendermode != render_none
|
||||||
&& (!titlemapinaction)
|
&& (!titlemapinaction)
|
||||||
&& ranspecialwipe != 2
|
&& ranspecialwipe != 2
|
||||||
|
|
Loading…
Reference in New Issue