Merge branch 'remove-unused-levelwipes' into 'master'

(Cleanup) Remove unused levelwipes

See merge request STJr/SRB2Internal!507
This commit is contained in:
MascaraSnake 2019-11-22 09:21:17 -05:00
commit a3a7dc6bed
14 changed files with 4 additions and 109 deletions

View file

@ -417,12 +417,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
@ -442,7 +436,6 @@ static void D_Display(void)
{
F_WipeEndScreen();
// Funny.
#ifndef LEVELWIPES
if (WipeStageTitle && st_overlay)
{
lt_ticker--;
@ -451,7 +444,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);
}

View file

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

View file

@ -141,7 +141,6 @@ void F_MenuPresTicker(boolean run);
#define FORCEWIPEOFF -2
extern boolean WipeInAction;
extern boolean WipeInLevel;
extern boolean WipeStageTitle;
typedef enum
@ -166,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,9 +174,8 @@ 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))
#define F_WipeColorFill(c) V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, c)
tic_t F_GetWipeLength(UINT8 wipetype);
boolean F_WipeExists(UINT8 wipetype);

View file

@ -91,7 +91,6 @@ UINT8 wipedefs[NUMWIPEDEFS] = {
//--------------------------------------------------------------------------
boolean WipeInAction = false;
boolean WipeInLevel = false;
boolean WipeStageTitle = false;
INT32 lastwipetic = 0;
@ -104,10 +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
*
* \param lump Lump name to get data from
@ -349,8 +344,6 @@ static void F_DoWipe(fademask_t *fademask)
free(scrxpos);
free(scrypos);
}
if (wipestyle == WIPESTYLE_LEVEL)
F_WipeStageTitle();
}
#endif
@ -416,13 +409,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 +436,9 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu)
#endif
F_DoWipe(fmask);
if (wipestyle == WIPESTYLE_LEVEL)
F_WipeStageTitle();
I_OsPolling();
I_UpdateNoBlit();
@ -463,47 +452,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
}

View file

@ -1728,7 +1728,6 @@ void G_StartTitleCard(void)
// start the title card
WipeStageTitle = (!titlemapinaction);
WipeInLevel = true;
wipestyleflags |= WSF_FADEIN;
wipestyleflags &= ~WSF_FADEOUT;
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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