Use wipe code for SEGA screen

This sucked to figure out LOL
This commit is contained in:
Sally Coolatta 2024-03-25 02:12:02 -04:00
parent 6b9029bede
commit 9aa6831a13

View file

@ -530,7 +530,6 @@ static boolean dc_ticking = false;
static UINT8 dc_bluesegafade = 0; static UINT8 dc_bluesegafade = 0;
static UINT8 dc_textfade = 9; static UINT8 dc_textfade = 9;
static UINT8 dc_subtextfade = 9; static UINT8 dc_subtextfade = 9;
static UINT8 dc_screenfade = 9;
static void F_DisclaimerAdvanceState(void) static void F_DisclaimerAdvanceState(void)
{ {
@ -562,7 +561,6 @@ static void F_DisclaimerDrawScene(void)
dc_segaframe = 1; dc_segaframe = 1;
dc_textfade = 9; dc_textfade = 9;
dc_subtextfade = 9; dc_subtextfade = 9;
dc_screenfade = 9;
dc_lasttime = intro_curtime; dc_lasttime = intro_curtime;
} }
@ -679,17 +677,6 @@ static void F_DisclaimerDrawScene(void)
Z_Free(newText); Z_Free(newText);
} }
// Fade out (would love to use a wipe here, but lmao how the fuck do wipes work)
if (dc_state >= DISCLAIMER_OUT)
{
UINT32 screenalpha = 0;
if (dc_screenfade > 0)
screenalpha = dc_screenfade << V_ALPHASHIFT;
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31|screenalpha);
}
// ================================= STATE LOGIC // ================================= STATE LOGIC
if (!dc_ticking) if (!dc_ticking)
@ -725,15 +712,6 @@ static void F_DisclaimerDrawScene(void)
dc_subtextfade--; dc_subtextfade--;
} }
// Fade out screen
if (dc_state == DISCLAIMER_OUT)
{
if (dc_screenfade > 0)
{
dc_screenfade--;
}
}
// ================================= STATE TRANSITIONS // ================================= STATE TRANSITIONS
dc_tics++; dc_tics++;
@ -758,6 +736,24 @@ static void F_DisclaimerDrawScene(void)
if (dc_state == DISCLAIMER_FINAL && timetonext < TICRATE/2) if (dc_state == DISCLAIMER_FINAL && timetonext < TICRATE/2)
F_DisclaimerAdvanceState(); F_DisclaimerAdvanceState();
if (dc_state == DISCLAIMER_OUT)
{
F_WipeStartScreen();
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
F_WipeEndScreen();
F_RunWipe(wipe_level_toblack, wipedefs[wipe_level_toblack], false, "FADEMAP0", false, false);
intro_scenenum++;
timetonext = introscenetime[intro_scenenum];
animtimer = stoptimer = 0;
intro_curtime = 0;
F_WipeStartScreen();
F_IntroDrawScene();
F_WipeEndScreen();
F_RunWipe(wipe_level_toblack, wipedefs[wipe_level_toblack], false, "FADEMAP0", true, false);
}
} }
// //
@ -831,16 +827,21 @@ void F_IntroTicker(void)
{ {
dc_state = DISCLAIMER_OUT; dc_state = DISCLAIMER_OUT;
dc_tics = 0; dc_tics = 0;
timetonext = 10;
} }
else if (doskip || timetonext <= 0) else if (doskip || timetonext <= 0)
{ {
intro_scenenum++; intro_scenenum++;
INT32 destscenenum = NUMINTROSCENES-1; INT32 destscenenum = NUMINTROSCENES-1;
if (M_GameTrulyStarted() == false) if (M_GameTrulyStarted() == false)
{
destscenenum = INTROSCENE_DISCLAIMER; destscenenum = INTROSCENE_DISCLAIMER;
}
else if (doskip) else if (doskip)
{
destscenenum = INTROSCENE_KREW; destscenenum = INTROSCENE_KREW;
}
if (intro_scenenum > destscenenum) if (intro_scenenum > destscenenum)
{ {
D_StartTitle(); D_StartTitle();
@ -848,9 +849,11 @@ void F_IntroTicker(void)
//wipetypepre = INT16_MAX; -- however, this breaks the title screen cacheing and I don't know why and I'm tired of fighting it. //wipetypepre = INT16_MAX; -- however, this breaks the title screen cacheing and I don't know why and I'm tired of fighting it.
return; return;
} }
//F_NewCutscene(introtext[intro_scenenum]); //F_NewCutscene(introtext[intro_scenenum]);
timetonext = introscenetime[intro_scenenum]; timetonext = introscenetime[intro_scenenum];
animtimer = stoptimer = 0; animtimer = stoptimer = 0;
if ( if (
doskip doskip
|| intro_scenenum == INTROSCENE_DISCLAIMER || intro_scenenum == INTROSCENE_DISCLAIMER