From 85f1b847e96bf4955ef1f15c5c072ec1db04ed1d Mon Sep 17 00:00:00 2001 From: Jaime Passos Date: Mon, 18 Nov 2019 15:04:40 -0300 Subject: [PATCH] LF_WARNINGTITLE --- src/dehacked.c | 8 ++++++++ src/doomstat.h | 3 ++- src/st_stuff.c | 3 +-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index 250bfb4b7..a58595c5c 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -1573,6 +1573,13 @@ static void readlevelheader(MYFILE *f, INT32 num) else mapheaderinfo[num-1]->levelflags &= ~LF_MIXNIGHTSCOUNTDOWN; } + else if (fastcmp(word, "WARNINGTITLE")) + { + if (i || word2[0] == 'T' || word2[0] == 'Y') + mapheaderinfo[num-1]->levelflags |= LF_WARNINGTITLE; + else + mapheaderinfo[num-1]->levelflags &= ~LF_WARNINGTITLE; + } else if (fastcmp(word, "NOTITLECARD")) { if (i || word2[0] == 'T' || word2[0] == 'Y') @@ -9020,6 +9027,7 @@ struct { {"LF_SAVEGAME",LF_SAVEGAME}, {"LF_MIXNIGHTSCOUNTDOWN",LF_MIXNIGHTSCOUNTDOWN}, {"LF_NOTITLECARD",LF_NOTITLECARD}, + {"LF_WARNINGTITLE",LF_WARNINGTITLE}, // And map flags {"LF2_HIDEINMENU",LF2_HIDEINMENU}, {"LF2_HIDEINSTATS",LF2_HIDEINSTATS}, diff --git a/src/doomstat.h b/src/doomstat.h index d9c9b92ac..84939a8db 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -349,7 +349,8 @@ typedef struct #define LF_NOZONE 16 ///< Don't include "ZONE" on level title #define LF_SAVEGAME 32 ///< Save the game upon loading this level #define LF_MIXNIGHTSCOUNTDOWN 64 ///< Play sfx_timeup instead of music change for NiGHTS countdown -#define LF_NOTITLECARD 128 ///< Don't start the title card +#define LF_WARNINGTITLE 128 ///< WARNING! WARNING! WARNING! WARNING! +#define LF_NOTITLECARD 256 ///< Don't start the title card #define LF2_HIDEINMENU 1 ///< Hide in the multiplayer menu #define LF2_HIDEINSTATS 2 ///< Hide in the statistics screen diff --git a/src/st_stuff.c b/src/st_stuff.c index 8abf52af4..e314a4cb3 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1178,8 +1178,7 @@ tic_t lt_exitticker = 0, lt_endtime = 0; // static void ST_cacheLevelTitle(void) { - SINT8 bonustype = mapheaderinfo[gamemap-1]->bonustype; - if ((bonustype != 1) && (bonustype != 2)) + if (mapheaderinfo[gamemap-1]->levelflags & LF_WARNINGTITLE) { lt_patches[0] = (patch_t *)W_CachePatchName("LTACTBLU", PU_HUDGFX); lt_patches[1] = (patch_t *)W_CachePatchName("LTZIGZAG", PU_HUDGFX);