From 535f7d92ba6fa4879acd8dc776c0d153707ccf9e Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 6 Sep 2008 04:03:53 +0000 Subject: [PATCH] - Added the "extended" keyword for episode definitions to define episodes that are only available in the extended version of Heretic. SVN r1199 (trunk) --- docs/rh-log.txt | 2 ++ src/g_level.cpp | 14 +++++++++++++- wadsrc/static/mapinfo/heretic.txt | 4 ++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 01eee2bd3..398180f05 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,6 @@ September 5, 2008 +- Added the "extended" keyword for episode definitions to define episodes + that are only available in the extended version of Heretic. - Added hexendemo.wad and hexdemo.wad as aliases for the demo Hexen IWAD. - Added IWAD checks for freedoom1.wad and freedm.wad. - The garbage collector now has an opportunity to step each time individual diff --git a/src/g_level.cpp b/src/g_level.cpp index a8b3abf83..591bc3b07 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -1285,6 +1285,7 @@ static void ParseEpisodeInfo (FScanner &sc) char key = 0; bool noskill = false; bool optional = false; + bool extended = false; // Get map name sc.MustGetString (); @@ -1305,9 +1306,14 @@ static void ParseEpisodeInfo (FScanner &sc) { if (sc.Compare ("optional")) { - // For M4 in Doom and M4 and M5 in Heretic + // For M4 in Doom optional = true; } + else if (sc.Compare ("extended")) + { + // For M4 and M5 in Heretic + extended = true; + } else if (sc.Compare ("name")) { sc.MustGetString (); @@ -1341,6 +1347,12 @@ static void ParseEpisodeInfo (FScanner &sc) } while (sc.GetString ()); + if (extended && !(gameinfo.flags & GI_MENUHACK_EXTENDED)) + { // If the episode is for the extended Heretic, but this is + // not the extended Heretic, ignore it. + return; + } + if (optional && !remove) { if (!P_CheckMapData(map)) diff --git a/wadsrc/static/mapinfo/heretic.txt b/wadsrc/static/mapinfo/heretic.txt index 7050c9f87..a26d7a7a0 100644 --- a/wadsrc/static/mapinfo/heretic.txt +++ b/wadsrc/static/mapinfo/heretic.txt @@ -47,12 +47,12 @@ episode e3m1 episode e4m1 name "$MNU_OSSUARY" key o - optional + extended episode e5m1 name "$MNU_DEMESNE" key s - optional + extended