From 4e81f341f7865d16e67d9e96fa28b20b8f7fa55d Mon Sep 17 00:00:00 2001 From: toaster Date: Sat, 24 Jun 2023 14:58:54 +0100 Subject: [PATCH] Perfect evaluation --- src/f_finale.c | 93 +++++++++++++++++++------------------------------- 1 file changed, 35 insertions(+), 58 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index b4845cad6..91a5d8958 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -885,15 +885,6 @@ boolean F_CreditResponder(event_t *event) // EVALUATION // ============ -#if 0 - -static INT32 sparkloffs[3][2]; // eggrock explosions/blackrock sparkles -static INT32 sparklloop; - -#define SPARKLLOOPTIME 7 // must be odd - -#endif - typedef enum { EVAL_NOTHING, @@ -948,7 +939,6 @@ void F_StartGameEvaluation(void) CON_ToggleOff(); finalecount = -1; - //sparklloop = 0; } void F_GameEvaluationDrawer(void) @@ -960,12 +950,13 @@ void F_GameEvaluationDrawer(void) if (marathonmode) { - endingtext = "THANKS FOR THE RUN!"; + endingtext = "COOL RUN!"; } else switch (evaluationtype) { case EVAL_PERFECT: - endingtext = "CONGRATULATIONS!"; + endingtext = "CONGRATULATIONS"; + rankharder = "You're too cool!"; break; case EVAL_SUPER: rankharder = "Further challenge awaits!"; @@ -995,7 +986,38 @@ void F_GameEvaluationDrawer(void) x = BASEVIDWIDTH<<(FRACBITS-1); y = (BASEVIDHEIGHT + 16)<<(FRACBITS-1); - if (useSeal && evaluationtype != EVAL_PERFECT) + if (!useSeal) + ; + else if (evaluationtype == EVAL_PERFECT) + { + // Symmetrical slow fade in and out. + if (finalecount > 5*TICRATE) + crossfade = (10*TICRATE) - finalecount; + else + crossfade = finalecount; + + crossfade = 10 - (crossfade * 10)/TICRATE; + if (crossfade < 0) + crossfade = 0; + + // Imagery of a shattered pink palanquin resting in the flowers + // (abandoned cage for a gemstone far above Earth's station) + // ~toast 240623 + if (crossfade != 10) + { + V_DrawFixedPatch( + x, y, + FRACUNIT, + crossfade< (finalecount/SPARKLLOOPTIME)) - j = (finalecount/SPARKLLOOPTIME); - while (j) - { - if (j > 1 || sparklloop >= 2) - { - // if j == 0 - alternate between 0 and 1 - // 1 - 1 and 2 - // 2 - 2 and not rendered - V_DrawFixedPatch(x+sparkloffs[j-1][0], y+sparkloffs[j-1][1], FRACUNIT, 0, - W_CachePatchName(va("ENDSPKL%.1d", (j - ((sparklloop & 1) ? 0 : 1))), PU_PATCH), - R_GetTranslationColormap(TC_DEFAULT, SKINCOLOR_AQUAMARINE, GTC_CACHE)); - } - j--; - } - } -#endif } if ((evaluationtype == EVAL_CHAOS || evaluationtype == EVAL_SUPER) @@ -1229,29 +1229,6 @@ void F_GameEvaluationTicker(void) return; } -#if 0 - if (!useSeal) - ; - else if (evaluationtype != EVAL_PERFECT) - { - ; - } - else if (++sparklloop == SPARKLLOOPTIME) // time to roll the randomisation again - { - angle_t workingangle = FixedAngle((M_RandomKey(360))<>ANGLETOFINESHIFT; - fixed_t workingradius = M_RandomKey(26); - - sparkloffs[2][0] = sparkloffs[1][0]; - sparkloffs[2][1] = sparkloffs[1][1]; - sparkloffs[1][0] = sparkloffs[0][0]; - sparkloffs[1][1] = sparkloffs[0][1]; - - sparkloffs[0][0] = (30<