New STJR Intro, replaces the old PURE FAT intro
This commit is contained in:
parent
e340d74e4d
commit
a3039a781a
129
src/f_finale.c
129
src/f_finale.c
|
@ -225,6 +225,9 @@ static INT32 cutscene_textspeed = 0;
|
||||||
static UINT8 cutscene_boostspeed = 0;
|
static UINT8 cutscene_boostspeed = 0;
|
||||||
static tic_t cutscene_lasttextwrite = 0;
|
static tic_t cutscene_lasttextwrite = 0;
|
||||||
|
|
||||||
|
// STJR Intro
|
||||||
|
char stjrintro[9] = "STJRI000";
|
||||||
|
|
||||||
//
|
//
|
||||||
// This alters the text string cutscene_disptext.
|
// This alters the text string cutscene_disptext.
|
||||||
// Use the typical string drawing functions to display it.
|
// Use the typical string drawing functions to display it.
|
||||||
|
@ -312,7 +315,7 @@ const char *introtext[NUMINTROSCENES];
|
||||||
|
|
||||||
static tic_t introscenetime[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...
|
11*TICRATE + (TICRATE/2), // Two months had passed since...
|
||||||
15*TICRATE + (TICRATE/2), // As it was about to drain the rings...
|
15*TICRATE + (TICRATE/2), // As it was about to drain the rings...
|
||||||
14*TICRATE, // What Sonic, Tails, and Knuckles...
|
14*TICRATE, // What Sonic, Tails, and Knuckles...
|
||||||
|
@ -527,7 +530,8 @@ static void F_IntroDrawScene(void)
|
||||||
switch (intro_scenenum)
|
switch (intro_scenenum)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
break;
|
bgxoffs = 28;
|
||||||
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
background = W_CachePatchName("INTRO1", PU_PATCH);
|
background = W_CachePatchName("INTRO1", PU_PATCH);
|
||||||
break;
|
break;
|
||||||
|
@ -616,98 +620,35 @@ static void F_IntroDrawScene(void)
|
||||||
V_DrawScaledPatch(bgxoffs, 0, 0, background);
|
V_DrawScaledPatch(bgxoffs, 0, 0, background);
|
||||||
}
|
}
|
||||||
else if (intro_scenenum == 0) // STJr presents
|
else if (intro_scenenum == 0) // STJr presents
|
||||||
{
|
{
|
||||||
// "Waaaaaaah" intro
|
if (intro_curtime > 1 && intro_curtime < 278)
|
||||||
if (finalecount-TICRATE/2 < 4*TICRATE+23) {
|
{
|
||||||
// aspect is FRACUNIT/2 for 4:3 (source) resolutions, smaller for 16:10 (SRB2) resolutions
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||||
fixed_t aspect = (FRACUNIT + (FRACUNIT*4/3 - FRACUNIT*vid.width/vid.height)/2)>>1;
|
if (intro_curtime < 30) // Make the text shine!
|
||||||
fixed_t x,y;
|
sprintf(stjrintro, "STJRI%03u", intro_curtime-1);
|
||||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 2);
|
else if (intro_curtime >= 29 && intro_curtime < 50) // Pause on black screen for just a second
|
||||||
if (finalecount < 30) { // Cry!
|
return;
|
||||||
if (finalecount < 4)
|
else if (intro_curtime == 51)
|
||||||
S_StopMusic();
|
|
||||||
if (finalecount == 4)
|
|
||||||
S_ChangeMusicInternal("_stjr", false);
|
|
||||||
x = (BASEVIDWIDTH<<FRACBITS)/2 - FixedMul(334<<FRACBITS, aspect)/2;
|
|
||||||
y = (BASEVIDHEIGHT<<FRACBITS)/2 - FixedMul(358<<FRACBITS, aspect)/2;
|
|
||||||
V_DrawSciencePatch(x, y, 0, (patch = W_CachePatchName("WAHH1", PU_PATCH)), aspect);
|
|
||||||
W_UnlockCachedPatch(patch);
|
|
||||||
if (finalecount > 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<<FRACBITS)/2 - FixedMul(560<<FRACBITS, aspect)/2;
|
|
||||||
y = (BASEVIDHEIGHT<<FRACBITS) - FixedMul(477<<FRACBITS, aspect);
|
|
||||||
V_DrawSciencePatch(x, y, V_SNAPTOBOTTOM, background, aspect);
|
|
||||||
}
|
|
||||||
else if (finalecount-50 < 30) { // Zoom out
|
|
||||||
fixed_t scale = FixedDiv(aspect, FixedDiv((finalecount-50)<<FRACBITS, (15<<FRACBITS))+FRACUNIT);
|
|
||||||
background = W_CachePatchName("FEEDIN", PU_PATCH);
|
|
||||||
x = (BASEVIDWIDTH<<FRACBITS)/2 - FixedMul(560<<FRACBITS, aspect)/2 + (FixedMul(560<<FRACBITS, aspect) - FixedMul(560<<FRACBITS, scale));
|
|
||||||
y = (BASEVIDHEIGHT<<FRACBITS) - FixedMul(477<<FRACBITS, scale);
|
|
||||||
V_DrawSciencePatch(x, y, V_SNAPTOBOTTOM, background, scale);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
{
|
// Fade in the text
|
||||||
// Draw tiny eggy
|
// The text fade out is automatically handled when switching to a new intro scene
|
||||||
fixed_t scale = FixedMul(FRACUNIT/3, aspect);
|
strncpy(stjrintro, "STJRI029", 9);
|
||||||
background = W_CachePatchName("FEEDIN", PU_PATCH);
|
S_ChangeMusicInternal("_stjr", false);
|
||||||
x = (BASEVIDWIDTH<<FRACBITS)/2 - FixedMul(560<<FRACBITS, aspect)/2 + (FixedMul(560<<FRACBITS, aspect) - FixedMul(560<<FRACBITS, scale));
|
|
||||||
y = (BASEVIDHEIGHT<<FRACBITS) - FixedMul(477<<FRACBITS, scale);
|
background = W_CachePatchName(stjrintro, PU_PATCH);
|
||||||
V_DrawSciencePatch(x, y, V_SNAPTOBOTTOM, background, scale);
|
wipestyleflags = WSF_FADEIN;
|
||||||
}
|
F_WipeStartScreen();
|
||||||
|
F_TryColormapFade(31);
|
||||||
if (finalecount-84 < 58) { // Pure Fat is driving up!
|
V_DrawSmallScaledPatch(bgxoffs, 84, 0, background);
|
||||||
int ftime = (finalecount-84);
|
F_WipeEndScreen();
|
||||||
x = (-189*FRACUNIT) + (FixedMul((6<<FRACBITS)+FRACUNIT/3, ftime<<FRACBITS) - FixedMul((6<<FRACBITS)+FRACUNIT/3, FixedDiv(FixedMul(ftime<<FRACBITS, ftime<<FRACBITS), 120<<FRACBITS)));
|
F_RunWipe(99,true);
|
||||||
y = (BASEVIDHEIGHT<<FRACBITS) - FixedMul(417<<FRACBITS, aspect);
|
}
|
||||||
// Draw the body
|
|
||||||
V_DrawSciencePatch(x, y, V_SNAPTOLEFT|V_SNAPTOBOTTOM, (patch = W_CachePatchName("PUREFAT1", PU_PATCH)), aspect);
|
if (!WipeInAction) // Draw the patch if not in a wipe
|
||||||
W_UnlockCachedPatch(patch);
|
{
|
||||||
// Draw the door
|
background = W_CachePatchName(stjrintro, PU_PATCH);
|
||||||
V_DrawSciencePatch(x+FixedMul(344<<FRACBITS, aspect), y+FixedMul(292<<FRACBITS, aspect), V_SNAPTOLEFT|V_SNAPTOBOTTOM, (patch = W_CachePatchName("PUREFAT2", PU_PATCH)), aspect);
|
V_DrawSmallScaledPatch(bgxoffs, 84, 0, background);
|
||||||
W_UnlockCachedPatch(patch);
|
|
||||||
// Draw the wheel
|
|
||||||
V_DrawSciencePatch(x+FixedMul(178<<FRACBITS, aspect), y+FixedMul(344<<FRACBITS, aspect), V_SNAPTOLEFT|V_SNAPTOBOTTOM, (patch = W_CachePatchName(va("TYRE%02u",(abs(finalecount-144)/3)%16), PU_PATCH)), aspect);
|
|
||||||
W_UnlockCachedPatch(patch);
|
|
||||||
// Draw the wheel cover
|
|
||||||
V_DrawSciencePatch(x+FixedMul(88<<FRACBITS, aspect), y+FixedMul(238<<FRACBITS, aspect), V_SNAPTOLEFT|V_SNAPTOBOTTOM, (patch = W_CachePatchName("PUREFAT3", PU_PATCH)), aspect);
|
|
||||||
W_UnlockCachedPatch(patch);
|
|
||||||
} else { // Pure Fat has stopped!
|
|
||||||
y = (BASEVIDHEIGHT<<FRACBITS) - FixedMul(417<<FRACBITS, aspect);
|
|
||||||
// Draw the body
|
|
||||||
V_DrawSciencePatch(0, y, V_SNAPTOLEFT|V_SNAPTOBOTTOM, (patch = W_CachePatchName("PUREFAT1", PU_PATCH)), aspect);
|
|
||||||
W_UnlockCachedPatch(patch);
|
|
||||||
// Draw the wheel
|
|
||||||
V_DrawSciencePatch(FixedMul(178<<FRACBITS, aspect), y+FixedMul(344<<FRACBITS, aspect), V_SNAPTOLEFT|V_SNAPTOBOTTOM, (patch = W_CachePatchName("TYRE00", PU_PATCH)), aspect);
|
|
||||||
W_UnlockCachedPatch(patch);
|
|
||||||
// Draw the wheel cover
|
|
||||||
V_DrawSciencePatch(FixedMul(88<<FRACBITS, aspect), y+FixedMul(238<<FRACBITS, aspect), V_SNAPTOLEFT|V_SNAPTOBOTTOM, (patch = W_CachePatchName("PUREFAT3", PU_PATCH)), aspect);
|
|
||||||
W_UnlockCachedPatch(patch);
|
|
||||||
// Draw the door
|
|
||||||
if (finalecount-TICRATE/2 > 4*TICRATE) { // Door is being raised!
|
|
||||||
int ftime = (finalecount-TICRATE/2-4*TICRATE);
|
|
||||||
y -= FixedDiv((ftime*ftime)<<FRACBITS, 23<<FRACBITS);
|
|
||||||
}
|
|
||||||
V_DrawSciencePatch(FixedMul(344<<FRACBITS, aspect), y+FixedMul(292<<FRACBITS, aspect), V_SNAPTOLEFT|V_SNAPTOBOTTOM, (patch = W_CachePatchName("PUREFAT2", PU_PATCH)), aspect);
|
|
||||||
W_UnlockCachedPatch(patch);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
V_DrawCreditString((160 - V_CreditStringWidth("SONIC TEAM JR")/2)<<FRACBITS, 80<<FRACBITS, 0, "SONIC TEAM JR");
|
|
||||||
V_DrawCreditString((160 - V_CreditStringWidth("PRESENTS")/2)<<FRACBITS, 96<<FRACBITS, 0, "PRESENTS");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (intro_scenenum == 10) // Sky Runner
|
else if (intro_scenenum == 10) // Sky Runner
|
||||||
|
@ -922,7 +863,7 @@ void F_IntroDrawer(void)
|
||||||
F_WipeEndScreen();
|
F_WipeEndScreen();
|
||||||
F_RunWipe(99,true);
|
F_RunWipe(99,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
S_ChangeMusicInternal("_intro", false);
|
S_ChangeMusicInternal("_intro", false);
|
||||||
}
|
}
|
||||||
else if (intro_scenenum == 10)
|
else if (intro_scenenum == 10)
|
||||||
|
@ -1017,7 +958,7 @@ void F_IntroDrawer(void)
|
||||||
F_WipeEndScreen();
|
F_WipeEndScreen();
|
||||||
F_RunWipe(99,true);
|
F_RunWipe(99,true);
|
||||||
}
|
}
|
||||||
/*else if (intro_scenenum == 12 && intro_curtime == 7*TICRATE)
|
/*else if (intro_scenenum == 11 && intro_curtime == 7*TICRATE)
|
||||||
{
|
{
|
||||||
patch_t *confront = W_CachePatchName("CONFRONT", PU_PATCH);
|
patch_t *confront = W_CachePatchName("CONFRONT", PU_PATCH);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue