mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Complete new intro
This commit is contained in:
parent
f2de738b09
commit
23ab807d68
1 changed files with 57 additions and 62 deletions
119
src/f_finale.c
119
src/f_finale.c
|
@ -305,7 +305,7 @@ static void F_NewCutscene(const char *basetext)
|
|||
// =============
|
||||
// INTRO SCENE
|
||||
// =============
|
||||
#define NUMINTROSCENES 16
|
||||
#define NUMINTROSCENES 17
|
||||
INT32 intro_scenenum = 0;
|
||||
INT32 intro_curtime = 0;
|
||||
|
||||
|
@ -325,7 +325,8 @@ static tic_t introscenetime[NUMINTROSCENES] =
|
|||
16*TICRATE, // Meanwhile, Sonic was tearing across the zones...
|
||||
16*TICRATE + (TICRATE/2), // Sonic knew he was getting closer to the city...
|
||||
17*TICRATE, // Greenflower City was gone...
|
||||
16*TICRATE + (TICRATE/2), // You're not quite as dead as we thought, huh?...
|
||||
7*TICRATE, // You're not quite as dead as we thought, huh?...
|
||||
8*TICRATE, // We'll see... let's give you a quick warm up...
|
||||
18*TICRATE + (TICRATE/2), // Eggman took this as his cue and blasted off...
|
||||
16*TICRATE, // Easy! We go find Eggman and stop his...
|
||||
25*TICRATE, // I'm just finding what mission obje...
|
||||
|
@ -436,14 +437,22 @@ void F_StartIntro(void)
|
|||
"had been obliterated.\n#");
|
||||
|
||||
introtext[12] = M_GetText(
|
||||
"\xA7\"You're not quite as gone as we thought,\n"
|
||||
"huh?\xBF Are you going to tell us your plan as\n"
|
||||
"usual or will I \xA8\xB4'have to work it out'\xA7 or\n"
|
||||
"something?\"\xD2\xD2\n"
|
||||
"\xA7\"You're not\n"
|
||||
"quite as gone\n"
|
||||
"as we thought,\n"
|
||||
"huh?\xBF Are you\n"
|
||||
"going to tell\n"
|
||||
"us your plan as\n"
|
||||
"usual or will I\n"
|
||||
"\xA8\xB4'have to work\n"
|
||||
"it out'\xA7 or\n"
|
||||
"something?\"\xD2\xD2\n#");
|
||||
|
||||
introtext[13] = M_GetText(
|
||||
"\"We'll see\xAA...\xA7\xBF let's give you a quick warm\n"
|
||||
"up, Sonic!\xA6\xC4 JETTYSYNS!\xA7\xBD Open fire!\"\n#");
|
||||
|
||||
introtext[13] = M_GetText(
|
||||
introtext[14] = M_GetText(
|
||||
"Eggman took this\n"
|
||||
"as his cue and\n"
|
||||
"blasted off,\n"
|
||||
|
@ -457,7 +466,7 @@ void F_StartIntro(void)
|
|||
"\xA7\"Now\xB6 what do we\n"
|
||||
"do?\",\xA9 he asked.\n#");
|
||||
|
||||
introtext[14] = M_GetText(
|
||||
introtext[15] = M_GetText(
|
||||
"\xA7\"Easy!\xBF We go\n"
|
||||
"find Eggman\n"
|
||||
"and stop his\n"
|
||||
|
@ -471,7 +480,7 @@ void F_StartIntro(void)
|
|||
"\xAA*ARE*\xA9 you\n"
|
||||
"doing?\"\n#");
|
||||
|
||||
introtext[15] = M_GetText(
|
||||
introtext[16] = M_GetText(
|
||||
"\xA8\"I'm just finding what mission obje\xAC\xB1...\xBF\n"
|
||||
"\xA6""a-\xB8""ha!\xBF Here it is!\xA8\xBF This will only give us\n"
|
||||
"the robot's primary objective.\xBF It says\xAC\xB1...\"\n"
|
||||
|
@ -499,7 +508,7 @@ void F_StartIntro(void)
|
|||
CON_ToggleOff();
|
||||
F_NewCutscene(introtext[0]);
|
||||
|
||||
intro_scenenum = 9;
|
||||
intro_scenenum = 0;
|
||||
finalecount = animtimer = skullAnimCounter = stoptimer = 0;
|
||||
timetonext = introscenetime[intro_scenenum];
|
||||
}
|
||||
|
@ -570,18 +579,21 @@ static void F_IntroDrawScene(void)
|
|||
background = W_CachePatchName("INTRO5", PU_CACHE);
|
||||
break;
|
||||
case 12:
|
||||
if (intro_curtime >= 7*TICRATE)
|
||||
background = W_CachePatchName("CONFRONT", PU_CACHE);
|
||||
else
|
||||
background = W_CachePatchName("REVENGE", PU_CACHE);
|
||||
background = W_CachePatchName("REVENGE", PU_CACHE);
|
||||
cx = 208;
|
||||
cy = 8;
|
||||
break;
|
||||
case 13:
|
||||
background = W_CachePatchName("CONFRONT", PU_CACHE);
|
||||
cy += 48;
|
||||
break;
|
||||
case 14:
|
||||
background = W_CachePatchName("TAILSSAD", PU_CACHE);
|
||||
bgxoffs = 144;
|
||||
cx = 8;
|
||||
cy = 8;
|
||||
break;
|
||||
case 14:
|
||||
case 15:
|
||||
if (intro_curtime >= 7*TICRATE)
|
||||
background = W_CachePatchName("SONICDO2", PU_CACHE);
|
||||
else
|
||||
|
@ -589,7 +601,7 @@ static void F_IntroDrawScene(void)
|
|||
cx = 224;
|
||||
cy = 8;
|
||||
break;
|
||||
case 15:
|
||||
case 16:
|
||||
background = W_CachePatchName("INTRO7", PU_CACHE);
|
||||
break;
|
||||
default:
|
||||
|
@ -731,15 +743,32 @@ static void F_IntroDrawScene(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
INT32 sonicx = (timetonext >> 2);
|
||||
INT32 tailsx = 32 + 4*max(0, timetonext - (9*TICRATE >> 1));
|
||||
INT32 knucklesx = 96 + 4*max(0, timetonext - (5*TICRATE >> 1));
|
||||
tic_t sonicdelay = max(0, timetonext - 16*TICRATE);
|
||||
tic_t tailsdelay = max(0, timetonext - (9*TICRATE >> 1));
|
||||
tic_t knucklesdelay = max(0, timetonext - (5*TICRATE >> 1));
|
||||
INT32 sonicx = (timetonext >> 2) + min(sonicdelay, TICRATE >> 1) * sonicdelay;
|
||||
INT32 tailsx = 32 + min(tailsdelay, TICRATE >> 1) * tailsdelay;
|
||||
INT32 knucklesx = 96 + min(knucklesdelay, TICRATE >> 1) * knucklesdelay;
|
||||
INT32 tailsy = 12 + P_ReturnThrustX(NULL, finalecount * ANGLE_22h, 2);
|
||||
INT32 knucklesy = 48 - (timetonext >> 3);
|
||||
INT32 skyx = 2 * finalecount % 320;
|
||||
INT32 grassx = 16 * finalecount % 320;
|
||||
menuanimtimer = animtimer; // Reusing this variable for the intro to fix the scrolling sky, better than changing the function around.
|
||||
//F_SkyScroll(80*4, 0, "INTROSKY");
|
||||
INT32 skyx, grassx;
|
||||
|
||||
if (timetonext >= 0 && timetonext < 18)
|
||||
{
|
||||
deplete -= 16;
|
||||
}
|
||||
else
|
||||
{
|
||||
stoptimer = finalecount;
|
||||
deplete = 96;
|
||||
}
|
||||
skyx = 2 * stoptimer % 320;
|
||||
grassx = 16 * stoptimer % 320;
|
||||
sonicx += deplete;
|
||||
tailsx += sonicx;
|
||||
knucklesx += sonicx;
|
||||
sonicx += P_ReturnThrustX(NULL, finalecount * ANG10, 3);
|
||||
|
||||
V_DrawSmallScaledPatch(skyx, 0, 0, (patch = W_CachePatchName("INTROSKY", PU_CACHE)));
|
||||
V_DrawSmallScaledPatch(skyx - 320, 0, 0, patch);
|
||||
W_UnlockCachedPatch(patch);
|
||||
|
@ -747,26 +776,6 @@ static void F_IntroDrawScene(void)
|
|||
V_DrawSmallScaledPatch(grassx - 320, 0, 0, patch);
|
||||
W_UnlockCachedPatch(patch);
|
||||
|
||||
if (timetonext == 6)
|
||||
{
|
||||
stoptimer = finalecount;
|
||||
animtimer = finalecount % 16;
|
||||
}
|
||||
else if (timetonext >= 0 && timetonext < 6)
|
||||
{
|
||||
animtimer = stoptimer;
|
||||
deplete -= 32;
|
||||
}
|
||||
else
|
||||
{
|
||||
animtimer = finalecount % 16;
|
||||
deplete = 96;
|
||||
}
|
||||
sonicx += deplete;
|
||||
tailsx += sonicx;
|
||||
knucklesx += sonicx;
|
||||
sonicx += P_ReturnThrustX(NULL, finalecount * ANG10, 3);
|
||||
|
||||
if (finalecount & 1)
|
||||
{
|
||||
// Sonic
|
||||
|
@ -836,6 +845,7 @@ static void F_IntroDrawScene(void)
|
|||
W_UnlockCachedPatch(patch);
|
||||
}
|
||||
|
||||
// Black bars to hide the sky on widescreen
|
||||
V_DrawFill(-80, 0, 80, 256, 31);
|
||||
V_DrawFill(BASEVIDWIDTH, 0, 80, 256, 31);
|
||||
}
|
||||
|
@ -887,21 +897,6 @@ static void F_IntroDrawScene(void)
|
|||
if (animtimer)
|
||||
animtimer--;
|
||||
|
||||
/*if (intro_scenenum == 7 && intro_curtime > 7*TICRATE)
|
||||
{
|
||||
patch_t *sgrass;
|
||||
|
||||
if (intro_curtime >= 7*TICRATE + ((TICRATE/7)*2))
|
||||
sgrass = W_CachePatchName("SGRASS4", PU_CACHE);
|
||||
else if (intro_curtime >= 7*TICRATE + (TICRATE/7))
|
||||
sgrass = W_CachePatchName("SGRASS3", PU_CACHE);
|
||||
else
|
||||
sgrass = W_CachePatchName("SGRASS2", PU_CACHE);
|
||||
V_DrawScaledPatch(123, 4, 0, sgrass);
|
||||
|
||||
W_UnlockCachedPatch(sgrass);
|
||||
}*/
|
||||
|
||||
V_DrawString(cx, cy, V_ALLOWLOWERCASE, cutscene_disptext);
|
||||
}
|
||||
|
||||
|
@ -936,7 +931,7 @@ void F_IntroDrawer(void)
|
|||
F_RunWipe(99,true);
|
||||
}
|
||||
}
|
||||
else if (intro_scenenum == 15)
|
||||
else if (intro_scenenum == 16)
|
||||
{
|
||||
if (rendermode != render_none)
|
||||
{
|
||||
|
@ -1009,7 +1004,7 @@ void F_IntroDrawer(void)
|
|||
F_WipeEndScreen();
|
||||
F_RunWipe(99,true);
|
||||
}
|
||||
else if (intro_scenenum == 12 && intro_curtime == 7*TICRATE)
|
||||
/*else if (intro_scenenum == 12 && intro_curtime == 7*TICRATE)
|
||||
{
|
||||
patch_t *confront = W_CachePatchName("CONFRONT", PU_CACHE);
|
||||
|
||||
|
@ -1021,8 +1016,8 @@ void F_IntroDrawer(void)
|
|||
|
||||
F_WipeEndScreen();
|
||||
F_RunWipe(99,true);
|
||||
}
|
||||
if (intro_scenenum == 14 && intro_curtime == 7*TICRATE)
|
||||
}*/
|
||||
if (intro_scenenum == 15 && intro_curtime == 7*TICRATE)
|
||||
{
|
||||
patch_t *sdo = W_CachePatchName("SONICDO2", PU_CACHE);
|
||||
|
||||
|
|
Loading…
Reference in a new issue