mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Fix crossfades
Fixes NoReload using the wrong wipestyle. Also fixes non-titlemap title screen wipes using the wrong wipestyle.
This commit is contained in:
parent
6545284eaf
commit
faa305a2f2
4 changed files with 13 additions and 8 deletions
|
@ -152,9 +152,10 @@ extern wipestyle_t wipestyle;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
WSF_FADEOUT = 1,
|
WSF_FADEOUT = 1,
|
||||||
WSF_FADEIN = 1<<1,
|
WSF_FADEIN = 1<<1,
|
||||||
WSF_TOWHITE = 1<<2,
|
WSF_TOWHITE = 1<<2,
|
||||||
|
WSF_CROSSFADE = 1<<3,
|
||||||
} wipestyleflags_t;
|
} wipestyleflags_t;
|
||||||
extern wipestyleflags_t wipestyleflags;
|
extern wipestyleflags_t wipestyleflags;
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ boolean WipeStageTitle = false;
|
||||||
INT32 lastwipetic = 0;
|
INT32 lastwipetic = 0;
|
||||||
|
|
||||||
wipestyle_t wipestyle = WIPESTYLE_NORMAL;
|
wipestyle_t wipestyle = WIPESTYLE_NORMAL;
|
||||||
wipestyleflags_t wipestyleflags = 0;
|
wipestyleflags_t wipestyleflags = WSF_CROSSFADE;
|
||||||
|
|
||||||
#ifndef NOWIPE
|
#ifndef NOWIPE
|
||||||
static UINT8 *wipe_scr_start; //screen 3
|
static UINT8 *wipe_scr_start; //screen 3
|
||||||
|
@ -404,7 +404,9 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu)
|
||||||
|
|
||||||
// don't know where else to put this.
|
// don't know where else to put this.
|
||||||
// this any good?
|
// this any good?
|
||||||
if (gamestate == GS_LEVEL || gamestate == GS_TITLESCREEN)
|
if ((gamestate == GS_LEVEL || gamestate == GS_TITLESCREEN)
|
||||||
|
&& (wipestyleflags & (WSF_FADEIN|WSF_FADEOUT)) // only if wipestyleflags are actually set
|
||||||
|
&& !(wipestyleflags & WSF_CROSSFADE)) // and if not crossfading
|
||||||
wipestyle = WIPESTYLE_LEVEL;
|
wipestyle = WIPESTYLE_LEVEL;
|
||||||
else
|
else
|
||||||
wipestyle = WIPESTYLE_NORMAL;
|
wipestyle = WIPESTYLE_NORMAL;
|
||||||
|
|
|
@ -1803,6 +1803,9 @@ void G_DoLoadLevel(boolean resetplayer)
|
||||||
//
|
//
|
||||||
void G_StartTitleCard(void)
|
void G_StartTitleCard(void)
|
||||||
{
|
{
|
||||||
|
wipestyleflags |= WSF_FADEIN;
|
||||||
|
wipestyleflags &= ~WSF_FADEOUT;
|
||||||
|
|
||||||
// The title card has been disabled for this map.
|
// The title card has been disabled for this map.
|
||||||
// Oh well.
|
// Oh well.
|
||||||
if (mapheaderinfo[gamemap-1]->levelflags & LF_NOTITLECARD)
|
if (mapheaderinfo[gamemap-1]->levelflags & LF_NOTITLECARD)
|
||||||
|
@ -1819,8 +1822,6 @@ void G_StartTitleCard(void)
|
||||||
|
|
||||||
// start the title card
|
// start the title card
|
||||||
WipeStageTitle = (!titlemapinaction);
|
WipeStageTitle = (!titlemapinaction);
|
||||||
wipestyleflags |= WSF_FADEIN;
|
|
||||||
wipestyleflags &= ~WSF_FADEOUT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -2855,6 +2856,7 @@ void G_DoReborn(INT32 playernum)
|
||||||
|
|
||||||
// Do a wipe
|
// Do a wipe
|
||||||
wipegamestate = -1;
|
wipegamestate = -1;
|
||||||
|
wipestyleflags = WSF_CROSSFADE;
|
||||||
|
|
||||||
if (camera.chase)
|
if (camera.chase)
|
||||||
P_ResetCamera(&players[displayplayer], &camera);
|
P_ResetCamera(&players[displayplayer], &camera);
|
||||||
|
|
|
@ -2725,7 +2725,7 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
S_FadeOutStopMusic(MUSICRATE/4); //FixedMul(FixedDiv(F_GetWipeLength(wipedefs[wipe_speclevel_towhite])*NEWTICRATERATIO, NEWTICRATE), MUSICRATE)
|
S_FadeOutStopMusic(MUSICRATE/4); //FixedMul(FixedDiv(F_GetWipeLength(wipedefs[wipe_speclevel_towhite])*NEWTICRATERATIO, NEWTICRATE), MUSICRATE)
|
||||||
|
|
||||||
F_WipeStartScreen();
|
F_WipeStartScreen();
|
||||||
wipestyleflags |= WSF_FADEOUT|WSF_TOWHITE;
|
wipestyleflags |= (WSF_FADEOUT|WSF_TOWHITE);
|
||||||
|
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
// uh..........
|
// uh..........
|
||||||
|
|
Loading…
Reference in a new issue