Merge branch 'remove-unused-levelwipes' into 'master'
(Cleanup) Remove unused levelwipes See merge request STJr/SRB2Internal!507
This commit is contained in:
commit
a3a7dc6bed
|
@ -417,12 +417,6 @@ static void D_Display(void)
|
||||||
if (gamestate != GS_TIMEATTACK)
|
if (gamestate != GS_TIMEATTACK)
|
||||||
CON_Drawer();
|
CON_Drawer();
|
||||||
|
|
||||||
#ifdef LEVELWIPES
|
|
||||||
// Running a level wipe
|
|
||||||
if (WipeInAction && WipeInLevel)
|
|
||||||
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
|
||||||
|
|
||||||
|
@ -442,7 +436,6 @@ static void D_Display(void)
|
||||||
{
|
{
|
||||||
F_WipeEndScreen();
|
F_WipeEndScreen();
|
||||||
// Funny.
|
// Funny.
|
||||||
#ifndef LEVELWIPES
|
|
||||||
if (WipeStageTitle && st_overlay)
|
if (WipeStageTitle && st_overlay)
|
||||||
{
|
{
|
||||||
lt_ticker--;
|
lt_ticker--;
|
||||||
|
@ -451,7 +444,6 @@ static void D_Display(void)
|
||||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, levelfadecol);
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, levelfadecol);
|
||||||
F_WipeStartScreen();
|
F_WipeStartScreen();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
F_RunWipe(wipetypepost, gamestate != GS_TIMEATTACK && gamestate != GS_TITLESCREEN);
|
F_RunWipe(wipetypepost, gamestate != GS_TIMEATTACK && gamestate != GS_TITLESCREEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 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,6 @@ void F_MenuPresTicker(boolean run);
|
||||||
#define FORCEWIPEOFF -2
|
#define FORCEWIPEOFF -2
|
||||||
|
|
||||||
extern boolean WipeInAction;
|
extern boolean WipeInAction;
|
||||||
extern boolean WipeInLevel;
|
|
||||||
extern boolean WipeStageTitle;
|
extern boolean WipeStageTitle;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -166,7 +165,6 @@ extern wipestyleflags_t wipestyleflags;
|
||||||
#define FADEGREENFACTOR 15
|
#define FADEGREENFACTOR 15
|
||||||
#define FADEBLUEFACTOR 10
|
#define FADEBLUEFACTOR 10
|
||||||
|
|
||||||
extern UINT8 wipecolorfill;
|
|
||||||
extern INT32 lastwipetic;
|
extern INT32 lastwipetic;
|
||||||
|
|
||||||
// Don't know where else to place this constant
|
// Don't know where else to place this constant
|
||||||
|
@ -176,9 +174,8 @@ extern INT32 lastwipetic;
|
||||||
void F_WipeStartScreen(void);
|
void F_WipeStartScreen(void);
|
||||||
void F_WipeEndScreen(void);
|
void F_WipeEndScreen(void);
|
||||||
void F_RunWipe(UINT8 wipetype, boolean drawMenu);
|
void F_RunWipe(UINT8 wipetype, boolean drawMenu);
|
||||||
void F_WipeTicker(void);
|
|
||||||
void F_WipeStageTitle(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);
|
tic_t F_GetWipeLength(UINT8 wipetype);
|
||||||
boolean F_WipeExists(UINT8 wipetype);
|
boolean F_WipeExists(UINT8 wipetype);
|
||||||
|
|
||||||
|
|
58
src/f_wipe.c
58
src/f_wipe.c
|
@ -91,7 +91,6 @@ UINT8 wipedefs[NUMWIPEDEFS] = {
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
|
|
||||||
boolean WipeInAction = false;
|
boolean WipeInAction = false;
|
||||||
boolean WipeInLevel = false;
|
|
||||||
boolean WipeStageTitle = false;
|
boolean WipeStageTitle = false;
|
||||||
INT32 lastwipetic = 0;
|
INT32 lastwipetic = 0;
|
||||||
|
|
||||||
|
@ -104,10 +103,6 @@ static UINT8 *wipe_scr_end; //screen 4
|
||||||
static UINT8 *wipe_scr; //screen 0 (main drawing)
|
static UINT8 *wipe_scr; //screen 0 (main drawing)
|
||||||
static fixed_t paldiv = 0;
|
static fixed_t paldiv = 0;
|
||||||
|
|
||||||
static UINT8 curwipetype;
|
|
||||||
static UINT8 curwipeframe;
|
|
||||||
UINT8 wipecolorfill = 31;
|
|
||||||
|
|
||||||
/** Create fademask_t from lump
|
/** Create fademask_t from lump
|
||||||
*
|
*
|
||||||
* \param lump Lump name to get data from
|
* \param lump Lump name to get data from
|
||||||
|
@ -349,8 +344,6 @@ static void F_DoWipe(fademask_t *fademask)
|
||||||
free(scrxpos);
|
free(scrxpos);
|
||||||
free(scrypos);
|
free(scrypos);
|
||||||
}
|
}
|
||||||
if (wipestyle == WIPESTYLE_LEVEL)
|
|
||||||
F_WipeStageTitle();
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -416,13 +409,6 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu)
|
||||||
else
|
else
|
||||||
wipestyle = WIPESTYLE_NORMAL;
|
wipestyle = WIPESTYLE_NORMAL;
|
||||||
|
|
||||||
curwipetype = wipetype;
|
|
||||||
curwipeframe = 0;
|
|
||||||
#ifdef LEVELWIPES
|
|
||||||
if (WipeInLevel)
|
|
||||||
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
|
||||||
for (;;)
|
for (;;)
|
||||||
|
@ -450,6 +436,9 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu)
|
||||||
#endif
|
#endif
|
||||||
F_DoWipe(fmask);
|
F_DoWipe(fmask);
|
||||||
|
|
||||||
|
if (wipestyle == WIPESTYLE_LEVEL)
|
||||||
|
F_WipeStageTitle();
|
||||||
|
|
||||||
I_OsPolling();
|
I_OsPolling();
|
||||||
I_UpdateNoBlit();
|
I_UpdateNoBlit();
|
||||||
|
|
||||||
|
@ -463,47 +452,6 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu)
|
||||||
}
|
}
|
||||||
|
|
||||||
WipeInAction = false;
|
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;
|
WipeStageTitle = false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -1728,7 +1728,6 @@ void G_StartTitleCard(void)
|
||||||
|
|
||||||
// start the title card
|
// start the title card
|
||||||
WipeStageTitle = (!titlemapinaction);
|
WipeStageTitle = (!titlemapinaction);
|
||||||
WipeInLevel = true;
|
|
||||||
wipestyleflags |= WSF_FADEIN;
|
wipestyleflags |= WSF_FADEIN;
|
||||||
wipestyleflags &= ~WSF_FADEOUT;
|
wipestyleflags &= ~WSF_FADEOUT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,6 @@ EXPORT void HWRAPI(FlushScreenTextures) (void);
|
||||||
EXPORT void HWRAPI(StartScreenWipe) (void);
|
EXPORT void HWRAPI(StartScreenWipe) (void);
|
||||||
EXPORT void HWRAPI(EndScreenWipe) (void);
|
EXPORT void HWRAPI(EndScreenWipe) (void);
|
||||||
EXPORT void HWRAPI(DoScreenWipe) (void);
|
EXPORT void HWRAPI(DoScreenWipe) (void);
|
||||||
EXPORT void HWRAPI(DoScreenWipeLevel) (void);
|
|
||||||
EXPORT void HWRAPI(DrawIntermissionBG) (void);
|
EXPORT void HWRAPI(DrawIntermissionBG) (void);
|
||||||
EXPORT void HWRAPI(MakeScreenTexture) (void);
|
EXPORT void HWRAPI(MakeScreenTexture) (void);
|
||||||
EXPORT void HWRAPI(MakeScreenFinalTexture) (void);
|
EXPORT void HWRAPI(MakeScreenFinalTexture) (void);
|
||||||
|
@ -113,7 +112,6 @@ struct hwdriver_s
|
||||||
StartScreenWipe pfnStartScreenWipe;
|
StartScreenWipe pfnStartScreenWipe;
|
||||||
EndScreenWipe pfnEndScreenWipe;
|
EndScreenWipe pfnEndScreenWipe;
|
||||||
DoScreenWipe pfnDoScreenWipe;
|
DoScreenWipe pfnDoScreenWipe;
|
||||||
DoScreenWipeLevel pfnDoScreenWipeLevel;
|
|
||||||
DrawIntermissionBG pfnDrawIntermissionBG;
|
DrawIntermissionBG pfnDrawIntermissionBG;
|
||||||
MakeScreenTexture pfnMakeScreenTexture;
|
MakeScreenTexture pfnMakeScreenTexture;
|
||||||
MakeScreenFinalTexture pfnMakeScreenFinalTexture;
|
MakeScreenFinalTexture pfnMakeScreenFinalTexture;
|
||||||
|
|
|
@ -7085,26 +7085,6 @@ void HWR_DoTintedWipe(UINT8 wipenum, UINT8 scrnnum)
|
||||||
HWR_DoWipe(wipenum, 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)
|
void HWR_MakeScreenFinalTexture(void)
|
||||||
{
|
{
|
||||||
HWD.pfnMakeScreenFinalTexture();
|
HWD.pfnMakeScreenFinalTexture();
|
||||||
|
|
|
@ -67,7 +67,6 @@ void HWR_EndScreenWipe(void);
|
||||||
void HWR_DrawIntermissionBG(void);
|
void HWR_DrawIntermissionBG(void);
|
||||||
void HWR_DoWipe(UINT8 wipenum, UINT8 scrnnum);
|
void HWR_DoWipe(UINT8 wipenum, UINT8 scrnnum);
|
||||||
void HWR_DoTintedWipe(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_MakeScreenFinalTexture(void);
|
||||||
void HWR_DrawScreenFinalTexture(int width, int height);
|
void HWR_DrawScreenFinalTexture(int width, int height);
|
||||||
|
|
||||||
|
|
|
@ -2587,11 +2587,6 @@ EXPORT void HWRAPI(DoScreenWipe)(void)
|
||||||
tex_downloaded = endScreenWipe;
|
tex_downloaded = endScreenWipe;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT void HWRAPI(DoScreenWipeLevel)(void)
|
|
||||||
{
|
|
||||||
DoScreenWipe();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a texture from the screen.
|
// Create a texture from the screen.
|
||||||
EXPORT void HWRAPI(MakeScreenTexture) (void)
|
EXPORT void HWRAPI(MakeScreenTexture) (void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3365,8 +3365,6 @@ boolean M_Responder(event_t *ev)
|
||||||
void M_Drawer(void)
|
void M_Drawer(void)
|
||||||
{
|
{
|
||||||
boolean wipe = WipeInAction;
|
boolean wipe = WipeInAction;
|
||||||
if (WipeInLevel)
|
|
||||||
wipe = false;
|
|
||||||
|
|
||||||
if (currentMenu == &MessageDef)
|
if (currentMenu == &MessageDef)
|
||||||
menuactive = true;
|
menuactive = true;
|
||||||
|
|
|
@ -97,7 +97,6 @@ void *hwSym(const char *funcName,void *handle)
|
||||||
GETFUNC(StartScreenWipe);
|
GETFUNC(StartScreenWipe);
|
||||||
GETFUNC(EndScreenWipe);
|
GETFUNC(EndScreenWipe);
|
||||||
GETFUNC(DoScreenWipe);
|
GETFUNC(DoScreenWipe);
|
||||||
GETFUNC(DoScreenWipeLevel);
|
|
||||||
GETFUNC(DrawIntermissionBG);
|
GETFUNC(DrawIntermissionBG);
|
||||||
GETFUNC(MakeScreenTexture);
|
GETFUNC(MakeScreenTexture);
|
||||||
GETFUNC(MakeScreenFinalTexture);
|
GETFUNC(MakeScreenFinalTexture);
|
||||||
|
|
|
@ -1666,7 +1666,6 @@ void I_StartupGraphics(void)
|
||||||
HWD.pfnStartScreenWipe = hwSym("StartScreenWipe",NULL);
|
HWD.pfnStartScreenWipe = hwSym("StartScreenWipe",NULL);
|
||||||
HWD.pfnEndScreenWipe = hwSym("EndScreenWipe",NULL);
|
HWD.pfnEndScreenWipe = hwSym("EndScreenWipe",NULL);
|
||||||
HWD.pfnDoScreenWipe = hwSym("DoScreenWipe",NULL);
|
HWD.pfnDoScreenWipe = hwSym("DoScreenWipe",NULL);
|
||||||
HWD.pfnDoScreenWipeLevel= hwSym("DoScreenWipeLevel",NULL);
|
|
||||||
HWD.pfnDrawIntermissionBG=hwSym("DrawIntermissionBG",NULL);
|
HWD.pfnDrawIntermissionBG=hwSym("DrawIntermissionBG",NULL);
|
||||||
HWD.pfnMakeScreenTexture= hwSym("MakeScreenTexture",NULL);
|
HWD.pfnMakeScreenTexture= hwSym("MakeScreenTexture",NULL);
|
||||||
HWD.pfnMakeScreenFinalTexture=hwSym("MakeScreenFinalTexture",NULL);
|
HWD.pfnMakeScreenFinalTexture=hwSym("MakeScreenFinalTexture",NULL);
|
||||||
|
|
|
@ -1294,10 +1294,8 @@ void ST_drawTitleCard(void)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef LEVELWIPES
|
|
||||||
if ((lt_ticker-lt_lasttic) > 1)
|
if ((lt_ticker-lt_lasttic) > 1)
|
||||||
lt_ticker = lt_lasttic+1;
|
lt_ticker = lt_lasttic+1;
|
||||||
#endif
|
|
||||||
|
|
||||||
ST_cacheLevelTitle();
|
ST_cacheLevelTitle();
|
||||||
actpat = lt_patches[0];
|
actpat = lt_patches[0];
|
||||||
|
@ -1351,9 +1349,7 @@ luahook:
|
||||||
void ST_preLevelTitleCardDrawer(tic_t ticker, boolean update)
|
void ST_preLevelTitleCardDrawer(tic_t ticker, boolean update)
|
||||||
{
|
{
|
||||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, levelfadecol);
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, levelfadecol);
|
||||||
#ifndef LEVELWIPES
|
|
||||||
if (ticker < PRELEVELTIME-1)
|
if (ticker < PRELEVELTIME-1)
|
||||||
#endif
|
|
||||||
ST_drawWipeTitleCard();
|
ST_drawWipeTitleCard();
|
||||||
|
|
||||||
I_OsPolling();
|
I_OsPolling();
|
||||||
|
|
|
@ -121,7 +121,6 @@ static loadfunc_t hwdFuncTable[] = {
|
||||||
{"StartScreenWipe@0", &hwdriver.pfnStartScreenWipe},
|
{"StartScreenWipe@0", &hwdriver.pfnStartScreenWipe},
|
||||||
{"EndScreenWipe@0", &hwdriver.pfnEndScreenWipe},
|
{"EndScreenWipe@0", &hwdriver.pfnEndScreenWipe},
|
||||||
{"DoScreenWipe@4", &hwdriver.pfnDoScreenWipe},
|
{"DoScreenWipe@4", &hwdriver.pfnDoScreenWipe},
|
||||||
{"DoScreenWipeLevel@0", &hwdriver.pfnDoScreenWipeLevel},
|
|
||||||
{"DrawIntermissionBG@0",&hwdriver.pfnDrawIntermissionBG},
|
{"DrawIntermissionBG@0",&hwdriver.pfnDrawIntermissionBG},
|
||||||
{"MakeScreenTexture@0", &hwdriver.pfnMakeScreenTexture},
|
{"MakeScreenTexture@0", &hwdriver.pfnMakeScreenTexture},
|
||||||
{"MakeScreenFinalTexture@0", &hwdriver.pfnMakeScreenFinalTexture},
|
{"MakeScreenFinalTexture@0", &hwdriver.pfnMakeScreenFinalTexture},
|
||||||
|
@ -153,7 +152,6 @@ static loadfunc_t hwdFuncTable[] = {
|
||||||
{"StartScreenWipe", &hwdriver.pfnStartScreenWipe},
|
{"StartScreenWipe", &hwdriver.pfnStartScreenWipe},
|
||||||
{"EndScreenWipe", &hwdriver.pfnEndScreenWipe},
|
{"EndScreenWipe", &hwdriver.pfnEndScreenWipe},
|
||||||
{"DoScreenWipe", &hwdriver.pfnDoScreenWipe},
|
{"DoScreenWipe", &hwdriver.pfnDoScreenWipe},
|
||||||
{"DoScreenWipeLevel", &hwdriver.pfnDoScreenWipeLevel},
|
|
||||||
{"DrawIntermissionBG", &hwdriver.pfnDrawIntermissionBG},
|
{"DrawIntermissionBG", &hwdriver.pfnDrawIntermissionBG},
|
||||||
{"MakeScreenTexture", &hwdriver.pfnMakeScreenTexture},
|
{"MakeScreenTexture", &hwdriver.pfnMakeScreenTexture},
|
||||||
{"MakeScreenFinalTexture", &hwdriver.pfnMakeScreenFinalTexture},
|
{"MakeScreenFinalTexture", &hwdriver.pfnMakeScreenFinalTexture},
|
||||||
|
|
Loading…
Reference in a new issue