From 71a95b30969aa9e59cbf6396228f8ac8a542ca79 Mon Sep 17 00:00:00 2001 From: toaster Date: Wed, 11 Oct 2023 17:24:50 +0100 Subject: [PATCH] M_BuildConditionTitle: Support menuttl Example for menuttl "Controls": - For Tutorial levels, show "The Controls Tutorial" - Otherwise, show "CONTROLS" (allcaps) --- src/m_cond.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/m_cond.c b/src/m_cond.c index 330b65c5a..c203f923a 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -1397,7 +1397,19 @@ static char *M_BuildConditionTitle(UINT16 map) || M_MapLocked(map+1)) return Z_StrDup("???"); - title = ref = G_BuildMapTitle(map+1); + if (mapheaderinfo[map]->menuttl[0]) + { + if (mapheaderinfo[map]->typeoflevel & TOL_TUTORIAL) + { + // Intentionally not forced uppercase + return Z_StrDup(va("the %s Tutorial", mapheaderinfo[map]->menuttl)); + } + title = ref = Z_StrDup(mapheaderinfo[map]->menuttl); + } + else + { + title = ref = G_BuildMapTitle(map+1); + } if (!title) I_Error("M_BuildConditionTitle: out of memory");