mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'intro-fix' into 'master'
Intro skip fix Closes #1184 See merge request KartKrew/Kart!2141
This commit is contained in:
commit
ac140f1dce
2 changed files with 47 additions and 22 deletions
|
|
@ -362,7 +362,7 @@ void F_StartIntro(void)
|
|||
//
|
||||
static void F_IntroDrawScene(void)
|
||||
{
|
||||
INT32 cx = 68*FRACUNIT, cy = 20*FRACUNIT;
|
||||
INT32 cx = 62*FRACUNIT, cy = 20*FRACUNIT;
|
||||
INT32 jitterx = 0, jittery = 0;
|
||||
INT32 bgxoffs = 0;
|
||||
patch_t *logoparts[5];
|
||||
|
|
@ -453,7 +453,7 @@ static disclaimerstate dc_state = 0;
|
|||
static UINT8 dc_tics = 0;
|
||||
static UINT8 dc_segaframe = 1;
|
||||
static UINT8 dc_bgcol = 0;
|
||||
static UINT8 dc_lasttime = 0;
|
||||
static INT32 dc_lasttime = 0;
|
||||
static boolean dc_ticking = false;
|
||||
static UINT8 dc_bluesegafade = 0;
|
||||
static UINT8 dc_textfade = 9;
|
||||
|
|
@ -593,8 +593,10 @@ static void F_DisclaimerDrawScene(void)
|
|||
// Fade out screen
|
||||
if (dc_state == DISCLAIMER_OUT)
|
||||
{
|
||||
if (dc_screenfade > 0 && !(dc_tics%10))
|
||||
if (dc_screenfade > 0)
|
||||
{
|
||||
dc_screenfade--;
|
||||
}
|
||||
}
|
||||
|
||||
// ================================= STATE TRANSITIONS
|
||||
|
|
@ -669,13 +671,42 @@ void F_IntroTicker(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (timetonext <= 0)
|
||||
// check for skipping
|
||||
const boolean disclaimerskippable =
|
||||
(
|
||||
intro_scenenum == INTROSCENE_DISCLAIMER
|
||||
&& dc_state == DISCLAIMER_FINAL
|
||||
&& dc_tics >= (TICRATE/2) + (5*6) // bottom text needs to fade all the way in
|
||||
);
|
||||
const boolean doskip =
|
||||
(
|
||||
skippableallowed
|
||||
&& keypressed
|
||||
&& (timetonext > 10)
|
||||
&& (
|
||||
intro_scenenum >= INTROSCENE_KREW
|
||||
|| disclaimerskippable
|
||||
)
|
||||
);
|
||||
|
||||
if (keypressed)
|
||||
keypressed = false;
|
||||
|
||||
if (doskip && disclaimerskippable)
|
||||
{
|
||||
dc_state = DISCLAIMER_OUT;
|
||||
dc_tics = 0;
|
||||
timetonext = 10;
|
||||
}
|
||||
else if (doskip || timetonext <= 0)
|
||||
{
|
||||
intro_scenenum++;
|
||||
if (intro_scenenum == (M_GameTrulyStarted()
|
||||
? NUMINTROSCENES
|
||||
: INTROSCENE_KREW)
|
||||
)
|
||||
INT32 destscenenum = NUMINTROSCENES-1;
|
||||
if (M_GameTrulyStarted() == false)
|
||||
destscenenum = INTROSCENE_DISCLAIMER;
|
||||
else if (doskip)
|
||||
destscenenum = INTROSCENE_KREW;
|
||||
if (intro_scenenum > destscenenum)
|
||||
{
|
||||
D_StartTitle();
|
||||
// Custom built fade to skip the to-black
|
||||
|
|
@ -685,10 +716,14 @@ void F_IntroTicker(void)
|
|||
//F_NewCutscene(introtext[intro_scenenum]);
|
||||
timetonext = introscenetime[intro_scenenum];
|
||||
animtimer = stoptimer = 0;
|
||||
if (intro_scenenum == INTROSCENE_DISCLAIMER)
|
||||
wipegamestate = -1;
|
||||
if (intro_scenenum == INTROSCENE_KREW)
|
||||
if (
|
||||
doskip
|
||||
|| intro_scenenum == INTROSCENE_DISCLAIMER
|
||||
|| intro_scenenum == INTROSCENE_KREW
|
||||
)
|
||||
{
|
||||
wipegamestate = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (intro_scenenum == INTROSCENE_KREW)
|
||||
|
|
@ -709,10 +744,6 @@ void F_IntroTicker(void)
|
|||
|
||||
F_WriteText();
|
||||
|
||||
// check for skipping
|
||||
if (keypressed)
|
||||
keypressed = false;
|
||||
|
||||
if (animtimer > 0)
|
||||
animtimer--;
|
||||
}
|
||||
|
|
@ -774,12 +805,6 @@ boolean F_IntroResponder(event_t *event)
|
|||
if (keypressed)
|
||||
return false;
|
||||
|
||||
if (intro_scenenum <= INTROSCENE_DISCLAIMER)
|
||||
{
|
||||
// do not allow skipping the disclaimer
|
||||
return false;
|
||||
}
|
||||
|
||||
keypressed = true;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1399,7 +1399,7 @@ boolean G_Responder(event_t *ev)
|
|||
{
|
||||
if (F_IntroResponder(ev))
|
||||
{
|
||||
D_SetDeferredStartTitle(true);
|
||||
//D_SetDeferredStartTitle(true); -- intro state tracked in f_finale directly
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue