summaryrefslogtreecommitdiff
path: root/src/doom/d_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/doom/d_main.c')
-rw-r--r--src/doom/d_main.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/doom/d_main.c b/src/doom/d_main.c
index d91649a8..0746a579 100644
--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -123,9 +123,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
@@ -566,6 +567,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";
+ }
}
@@ -1539,13 +1547,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;
+ }
+
if (M_CheckParmWithArgs("-statdump", 1))
{
I_AtExit(StatDump, true);