From d9940fdef21bd93555d5c48e9673d428cd9f1f6d Mon Sep 17 00:00:00 2001 From: toaster Date: Tue, 30 May 2023 21:23:07 +0100 Subject: [PATCH] M_DrawCupSelect: Flickering Chaos/Super Emerald icon ala S3 Data Select --- src/k_menudraw.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/k_menudraw.c b/src/k_menudraw.c index 19126e02e..e5379275d 100644 --- a/src/k_menudraw.c +++ b/src/k_menudraw.c @@ -2447,21 +2447,22 @@ void M_DrawCupSelect(void) V_DrawCharacter(rankx+2, ranky+2, '+', false); else { - UINT16 col = SKINCOLOR_CHAOSEMERALD1 + (templevelsearch.cup->emeraldnum-1) % 7; - patch_t *em; + colormap = NULL; - colormap = R_GetTranslationColormap(TC_DEFAULT, col, GTC_MENUCACHE); + if (!(cupgrid.previewanim & 1)) + { + UINT16 col = SKINCOLOR_CHAOSEMERALD1 + (templevelsearch.cup->emeraldnum-1) % 7; - if (templevelsearch.cup->emeraldnum > 7) - { - em = W_CachePatchName("SUPMAP", PU_CACHE); - } - else - { - em = W_CachePatchName("EMEMAP", PU_CACHE); + colormap = R_GetTranslationColormap(TC_DEFAULT, col, GTC_MENUCACHE); } - V_DrawFixedPatch((rankx)*FRACUNIT, (ranky)*FRACUNIT, FRACUNIT, 0, em, colormap); + const char *emname = va( + "%sMAP%c", + (templevelsearch.cup->emeraldnum > 7) ? "SUP" : "EME", + colormap ? '\0' : 'B' + ); + + V_DrawFixedPatch((rankx)*FRACUNIT, (ranky)*FRACUNIT, FRACUNIT, 0, W_CachePatchName(emname, PU_CACHE), colormap); } } }