From a3039a781af3349e9606053c6b0aef6b79e70b9e Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Fri, 28 Aug 2020 17:10:54 -0400 Subject: [PATCH] New STJR Intro, replaces the old PURE FAT intro --- src/f_finale.c | 129 ++++++++++++++----------------------------------- 1 file changed, 35 insertions(+), 94 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index d83eeb5cf..d56869897 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -225,6 +225,9 @@ static INT32 cutscene_textspeed = 0; static UINT8 cutscene_boostspeed = 0; static tic_t cutscene_lasttextwrite = 0; +// STJR Intro +char stjrintro[9] = "STJRI000"; + // // This alters the text string cutscene_disptext. // Use the typical string drawing functions to display it. @@ -312,7 +315,7 @@ const char *introtext[NUMINTROSCENES]; static tic_t introscenetime[NUMINTROSCENES] = { - 7*TICRATE + (TICRATE/2), // STJr Presents + 7*TICRATE, // STJr Presents 11*TICRATE + (TICRATE/2), // Two months had passed since... 15*TICRATE + (TICRATE/2), // As it was about to drain the rings... 14*TICRATE, // What Sonic, Tails, and Knuckles... @@ -527,7 +530,8 @@ static void F_IntroDrawScene(void) switch (intro_scenenum) { case 0: - break; + bgxoffs = 28; + break; case 1: background = W_CachePatchName("INTRO1", PU_PATCH); break; @@ -616,98 +620,35 @@ static void F_IntroDrawScene(void) V_DrawScaledPatch(bgxoffs, 0, 0, background); } else if (intro_scenenum == 0) // STJr presents - { - // "Waaaaaaah" intro - if (finalecount-TICRATE/2 < 4*TICRATE+23) { - // aspect is FRACUNIT/2 for 4:3 (source) resolutions, smaller for 16:10 (SRB2) resolutions - fixed_t aspect = (FRACUNIT + (FRACUNIT*4/3 - FRACUNIT*vid.width/vid.height)/2)>>1; - fixed_t x,y; - V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 2); - if (finalecount < 30) { // Cry! - if (finalecount < 4) - S_StopMusic(); - if (finalecount == 4) - S_ChangeMusicInternal("_stjr", false); - x = (BASEVIDWIDTH< 6) { - V_DrawSciencePatch(x, y, 0, (patch = W_CachePatchName("WAHH2", PU_PATCH)), aspect); - W_UnlockCachedPatch(patch); - } - if (finalecount > 10) { - V_DrawSciencePatch(x, y, 0, (patch = W_CachePatchName("WAHH3", PU_PATCH)), aspect); - W_UnlockCachedPatch(patch); - } - if (finalecount > 14) { - V_DrawSciencePatch(x, y, 0, (patch = W_CachePatchName("WAHH4", PU_PATCH)), aspect); - W_UnlockCachedPatch(patch); - } - } - else if (finalecount-30 < 20) { // Big eggy - background = W_CachePatchName("FEEDIN", PU_PATCH); - x = (BASEVIDWIDTH< 1 && intro_curtime < 278) + { + V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31); + if (intro_curtime < 30) // Make the text shine! + sprintf(stjrintro, "STJRI%03u", intro_curtime-1); + else if (intro_curtime >= 29 && intro_curtime < 50) // Pause on black screen for just a second + return; + else if (intro_curtime == 51) { - { - // Draw tiny eggy - fixed_t scale = FixedMul(FRACUNIT/3, aspect); - background = W_CachePatchName("FEEDIN", PU_PATCH); - x = (BASEVIDWIDTH< 4*TICRATE) { // Door is being raised! - int ftime = (finalecount-TICRATE/2-4*TICRATE); - y -= FixedDiv((ftime*ftime)<