summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2012-10-26 21:52:40 +0000
committerSimon Howard2012-10-26 21:52:40 +0000
commit80571d7c6bc1bdd2f72325dc393f60d62b6a4250 (patch)
treee722eb35789b15f807dea9b76064f77c5209a60c
parente6d59fa34c6ae40e1f4d69767b7ff96dcf5aba76 (diff)
downloadchocolate-doom-80571d7c6bc1bdd2f72325dc393f60d62b6a4250.tar.gz
chocolate-doom-80571d7c6bc1bdd2f72325dc393f60d62b6a4250.tar.bz2
chocolate-doom-80571d7c6bc1bdd2f72325dc393f60d62b6a4250.zip
Add small workaround to deal with the fact that the BFG Edition's
version of doom2.wad has no TITLEPIC lump (thanks Gez). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2532
-rw-r--r--src/d_main.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/d_main.c b/src/d_main.c
index 1c757088..025c31eb 100644
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -127,9 +127,10 @@ int startloadgame;
boolean advancedemo;
// Store demo, do not accept any inputs
-
boolean storedemo;
+// "BFG Edition" version of doom2.wad does not include TITLEPIC.
+boolean bfgedition;
char wadfile[1024]; // primary wad file
char mapdir[1024]; // directory of development maps
@@ -559,6 +560,13 @@ void D_DoAdvanceDemo (void)
G_DeferedPlayDemo(DEH_String("demo4"));
break;
}
+
+ // The Doom 3: BFG Edition version of doom2.wad does not have a
+ // TITLETPIC lump. Use INTERPIC instead as a workaround.
+ if (bfgedition && !strcasecmp(pagename, "TITLEPIC"))
+ {
+ pagename = "INTERPIC";
+ }
}
@@ -1494,13 +1502,27 @@ void D_DoomMain (void)
DEH_printf("ST_Init: Init status bar.\n");
ST_Init ();
- // If Doom II without a MAP01 lump, this is a store demo.
+ // If Doom II without a MAP01 lump, this is a store demo.
// Moved this here so that MAP01 isn't constantly looked up
// in the main loop.
if (gamemode == commercial && W_CheckNumForName("map01") < 0)
storedemo = true;
+ // Doom 3: BFG Edition includes modified versions of the classic
+ // IWADs. The modified version of doom2.wad does not have a
+ // TITLEPIC lump, so detect this so we can apply a workaround.
+ // We specifically check for TITLEPIC here, after PWADs have been
+ // loaded - this means that we can play with the BFG Edition with
+ // PWADs that change the title screen and still see the modified
+ // titles.
+
+ if (gamemode == commercial && W_CheckNumForName("titlepic") < 0)
+ {
+ printf("BFG Edition: Using INTERPIC instead of TITLEPIC.\n");
+ bfgedition = true;
+ }
+
//!
// @arg <x>
// @category demo