From bfb939161aa7beb31eb047f42e5c49de4daf189b Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 13 Mar 2023 17:22:25 +0000 Subject: [PATCH] M_DrawChallengePreview: Improve SECRET_MAP - Change scale and offsets of map icon to match other unlock types that show a single map - Show a gametype string - Fudges GT_VERSUS into GT_SPECIAL just like the menu does - Shows "Match Race/Online" for a level with no preferred gametype like TEST RUN --- src/k_menudraw.c | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/src/k_menudraw.c b/src/k_menudraw.c index 94a390e62..72b26c3b6 100644 --- a/src/k_menudraw.c +++ b/src/k_menudraw.c @@ -5214,13 +5214,46 @@ static void M_DrawChallengePreview(INT32 x, INT32 y) } case SECRET_MAP: { + const char *gtname = "INVALID HEADER"; UINT16 mapnum = M_UnlockableMapNum(ref); + K_DrawMapThumbnail( - (x-30)<typeoflevel); + + if (guessgt == -1) + { + // No Time Attack support, so specify... + gtname = "Match Race/Online"; + } + else + { + if (guessgt == GT_VERSUS) + { + // Fudge since there's no Versus-specific menu right now... + guessgt = GT_SPECIAL; + } + + if (guessgt == GT_SPECIAL && !M_SecretUnlocked(SECRET_SPECIALATTACK, true)) + { + gtname = "???"; + } + else + { + gtname = gametypes[guessgt]->name; + } + } + } + + V_DrawThinString(1, BASEVIDHEIGHT-(9+3), V_ALLOWLOWERCASE|V_6WIDTHSPACE, gtname); + break; } case SECRET_ENCORE: