* Make the white flash a little easier on the eyes by putting the full-screen fade behind the title wing/ring, then drawing multiple overlaid colormapped versions of them on top of each other.
* Darken the pre-flash screen.
This commit is contained in:
toaster 2019-11-13 21:52:35 +00:00
parent 1f7e5aa150
commit 39d80e1cba
1 changed files with 33 additions and 7 deletions

View File

@ -2573,6 +2573,8 @@ void F_TitleScreenDrawer(void)
{
boolean hidepics;
fixed_t sc = FRACUNIT / max(1, curttscale);
INT32 whitefade = 0;
UINT8 *whitecol[2] = {NULL, NULL};
if (modeattacking)
return; // We likely came here from retrying. Don't do a damn thing.
@ -2658,10 +2660,31 @@ void F_TitleScreenDrawer(void)
//
if (finalecount <= 29)
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
// Flash at tic 30, timed to O__TITLE percussion. Hold the flash until tic 34.
// After tic 34, fade the flash until tic 44.
else
{
if (finalecount > 29 && finalecount < 35)
V_DrawFadeScreen(0, (whitefade = 9));
else if (finalecount > 34 && 44-finalecount > 0 && 44-finalecount < 10)
V_DrawFadeScreen(0, 44-finalecount);
if (39-finalecount > 0)
{
whitefade = (9 - (39-finalecount))<<V_ALPHASHIFT;
whitecol[0] = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_SUPERGOLD5, GTC_CACHE);
whitecol[1] = R_GetTranslationColormap(TC_ALLWHITE, 0, GTC_CACHE);
}
}
// Draw emblem
V_DrawSciencePatch(40<<FRACBITS, 20<<FRACBITS, 0, TTEMBL[0], sc);
if (whitecol[0])
{
V_DrawFixedPatch(40<<FRACBITS, 20<<FRACBITS, sc, whitefade, TTEMBL[0], whitecol[0]);
V_DrawFixedPatch(40<<FRACBITS, 20<<FRACBITS, sc, V_TRANSLUCENT + ((whitefade/2) & ~V_ALPHAMASK), TTEMBL[0], whitecol[1]);
}
// Animate SONIC ROBO BLAST 2 before the white flash at tic 30.
if (finalecount <= 29)
{
@ -2692,6 +2715,7 @@ void F_TitleScreenDrawer(void)
case 8: case 7: fadeval = V_30TRANS; break;
case 6: case 5: fadeval = V_20TRANS; break;
case 4: case 3: fadeval = V_10TRANS; break;
default: break;
}
}
V_DrawSciencePatch(79<<FRACBITS, 132<<FRACBITS, fadeval, TTROBO[0], sc);
@ -3112,9 +3136,15 @@ void F_TitleScreenDrawer(void)
// After tic 34, starting when the flash fades,
// draw the combined ribbon and SONIC ROBO BLAST 2 logo. Note the different Y value, because this
// graphic is cropped differently from the unfurling ribbon.
if (finalecount > 34)
if (finalecount > 29)
V_DrawSciencePatch(39<<FRACBITS, 93<<FRACBITS, 0, TTRBTX[0], sc);
if (whitecol[0])
{
V_DrawFixedPatch(39<<FRACBITS, 93<<FRACBITS, sc, whitefade, TTRBTX[0], whitecol[0]);
V_DrawFixedPatch(39<<FRACBITS, 93<<FRACBITS, sc, V_TRANSLUCENT + ((whitefade/2) & ~V_ALPHAMASK), TTRBTX[0], whitecol[1]);
}
//
// FRONT LAYER CHARACTERS
//
@ -3253,12 +3283,8 @@ void F_TitleScreenDrawer(void)
}
}
// Flash at tic 30, timed to O__TITLE percussion. Hold the flash until tic 34.
// After tic 34, fade the flash until tic 44.
if (finalecount > 29 && finalecount < 35)
V_DrawFadeScreen(0, 9);
else if (finalecount > 34 && 44-finalecount > 0 && 44-finalecount < 10)
V_DrawFadeScreen(0, 44-finalecount);
if (finalecount <= 29)
V_DrawFadeScreen(0xFF00, 12);
#undef CHARSTART
#undef SONICSTART