- Added Gez's BFG edition patch.

SVN r3926 (trunk)
This commit is contained in:
Randy Heit 2012-11-01 02:42:14 +00:00
parent d393434d56
commit bfae51ed2e
8 changed files with 322 additions and 1 deletions

View file

@ -437,6 +437,7 @@ int FIWadManager::IdentifyVersion (TArray<FString> &wadfiles, const char *iwad,
static const char *const steam_dirs[] =
{
"doom 2/base",
"DOOM 3 BFG Edition/base/wads",
"final doom/base",
"heretic shadow of the serpent riders/base",
"hexen/base",

View file

@ -305,6 +305,10 @@ FString level_info_t::LookupLevelName()
{
mysnprintf (checkstring, countof(checkstring), "%d: ", atoi(mapname + 3));
}
else if (mapname[0] == 'L' && mapname[1] == 'E' && mapname[2] == 'V' && mapname[3] == 'E' && mapname[4] == 'L')
{
mysnprintf (checkstring, countof(checkstring), "%d: ", atoi(mapname + 5));
}
thename = strstr (lookedup, checkstring);
if (thename == NULL)
{

View file

@ -55,6 +55,7 @@
#include "gi.h"
#include "doomerrors.h"
#include "resourcefiles/resourcefile.h"
#include "md5.h"
// MACROS ------------------------------------------------------------------
@ -180,6 +181,7 @@ void FWadCollection::InitMultipleFiles (TArray<FString> &filenames)
{
I_FatalError ("W_InitMultipleFiles: no files found");
}
RenameNerve();
RenameSprites();
// [RH] Set up hash table
@ -810,6 +812,69 @@ void FWadCollection::RenameSprites ()
}
}
//==========================================================================
//
// RenameNerve
//
// Renames map headers and map name pictures in nerve.wad so as to load it
// alongside Doom II and offer both episodes without causing conflicts.
// MD5 checksum for NERVE.WAD: 967d5ae23daf45196212ae1b605da3b0
//
//==========================================================================
void FWadCollection::RenameNerve ()
{
if (gameinfo.gametype != GAME_Doom)
return;
bool found = false;
BYTE cksum[16];
BYTE nerve[16] = { 0x96, 0x7d, 0x5a, 0xe2, 0x3d, 0xaf, 0x45, 0x19,
0x62, 0x12, 0xae, 0x1b, 0x60, 0x5d, 0xa3, 0xb0 };
size_t nervesize = 3819855; // NERVE.WAD's file size
int w = IWAD_FILENUM;
while (++w < GetNumWads())
{
FileReader *fr = GetFileReader(w);
if (fr->GetLength() != nervesize)
{
// Skip MD5 computation when there is a
// cheaper way to know this is not the file
continue;
}
fr->Seek(0, SEEK_SET);
MD5Context md5;
md5.Update(fr, fr->GetLength());
md5.Final(cksum);
if (memcmp(nerve, cksum, 16) == 0)
{
found = true;
break;
}
}
if (!found)
return;
for (DWORD i = 0; i < LumpInfo.Size(); i++)
{
// Only rename the maps from NERVE.WAD
if (LumpInfo[i].wadnum == w)
{
if (LumpInfo[i].lump->dwName == MAKE_ID('C', 'W', 'I', 'L'))
{
LumpInfo[i].lump->Name[0] = 'N';
}
else if (LumpInfo[i].lump->dwName == MAKE_ID('M', 'A', 'P', '0'))
{
LumpInfo[i].lump->Name[6] = LumpInfo[i].lump->Name[4];
LumpInfo[i].lump->Name[5] = '0';
LumpInfo[i].lump->Name[4] = 'L';
LumpInfo[i].lump->dwName = MAKE_ID('L', 'E', 'V', 'E');
}
}
}
}
//==========================================================================
//
// W_FindLump

View file

@ -227,7 +227,8 @@ protected:
void InitHashChains (); // [RH] Set up the lumpinfo hashing
private:
void RenameSprites ();
void RenameSprites();
void RenameNerve();
void DeleteAll();
};

View file

@ -220,6 +220,21 @@ IWad
BannerColors = "32 54 43", "c6 dc d1"
}
IWad
{
Name = "DOOM 1: BFG Edition"
Autoname = "Doom1"
Game = "Doom"
Config = "Doom"
Mapinfo = "mapinfo/ultdoom.txt"
Compatibility = "Shorttex"
MustContain = "E1M1","E2M1","E2M2","E2M3","E2M4","E2M5","E2M6","E2M7","E2M8","E2M9",
"E3M1","E3M2","E3M3","E3M4","E3M5","E3M6","E3M7","E3M8","E3M9",
"DPHOOF","BFGGA0","HEADA1","CYBRA1","SPIDA1D1", "E4M2",
"DMENUPIC", "M_ACPT", "M_CAN", "M_EXITO", "M_CHG"
BannerColors = "54 54 54", "a8 a8 a8"
}
IWad
{
Name = "The Ultimate DOOM"
@ -283,6 +298,19 @@ IWad
BannerColors = "a8 00 00", "a8 a8 a8"
}
IWad
{
Name = "DOOM 2: BFG Edition"
Autoname = "Doom2BFG"
Game = "Doom"
Config = "Doom"
Mapinfo = "mapinfo/doom2bfg.txt"
Compatibility = "Shorttex"
MustContain = "MAP01", "DMENUPIC", "M_ACPT", "M_CAN", "M_EXITO", "M_CHG"
BannerColors = "a8 00 00", "a8 a8 a8"
Load = "nerve.wad"
}
// Doom 2 must be last to be checked becaude MAP01 is its only requirement
IWad
{
@ -300,10 +328,14 @@ IWad
Names
{
"bfgdoom2.wad"
"doom2bfg.wad"
"doom2f.wad"
"doom2.wad"
"plutonia.wad"
"tnt.wad"
"bfgdoom.wad"
"doombfg.wad"
"doomu.wad"
"doom.wad"
"doom1.wad"
@ -315,6 +347,7 @@ Names
"hexdemo.wad"
"strife1.wad"
"strife0.wad"
"strife.wad"
"freedoom.wad"
"freedoom1.wad"
"freedoomu.wad"

View file

@ -190,6 +190,19 @@ HUSTR_29 = "level 29: the living end";
HUSTR_30 = "level 30: icon of sin";
HUSTR_31 = "level 31: wolfenstein";
HUSTR_32 = "level 32: grosse";
HUSTR_31B = "level 31: idkfa";
HUSTR_32B = "level 32: keen";
HUSTR_33 = "level 33: betray";
NHUSTR_1 = "level 1: the earth base";
NHUSTR_2 = "level 2: the pain labs";
NHUSTR_3 = "level 3: canyon of the dead";
NHUSTR_4 = "level 4: hell mountain";
NHUSTR_5 = "level 5: vivisection";
NHUSTR_6 = "level 6: inferno of blood";
NHUSTR_7 = "level 7: baron's banquet";
NHUSTR_8 = "level 8: tomb of malevolence";
NHUSTR_9 = "level 9: march of the demons";
PHUSTR_1 = "level 1: congo";
PHUSTR_2 = "level 2: well of souls";
@ -540,6 +553,26 @@ T6TEXT =
"As you step off the transport, you hear\n"
"the stomp of a cyberdemon's iron shoe.";
NERVETEXT =
"TROUBLE WAS BREWING AGAIN IN YOUR FAVORITE\n"
"VACATION SPOT... HELL. SOME CYBERDEMON\n"
"PUNK THOUGHT HE COULD TURN HELL INTO A\n"
"PERSONAL AMUSEMENT PARK, AND MAKE EARTH\n"
"THE TICKET BOOTH.\n"
"\n"
"WELL THAT HALF-ROBOT FREAK SHOW DIDN'T\n"
"KNOW WHO WAS COMING TO THE FAIR. THERE'S\n"
"NOTHING LIKE A SHOOTING GALLERY FULL OF\n"
"HELLSPAWN TO GET THE BLOOD PUMPING...\n"
"\n"
"NOW THE WALLS OF THE DEMON'S LABYRINTH\n"
"ECHO WITH THE SOUND OF HIS METALLIC LIMBS\n"
"HITTING THE FLOOR. HIS DEATH MOAN GURGLES\n"
"OUT THROUGH THE MESS YOU LEFT OF HIS FACE.\n"
"\n"
"THIS RIDE IS CLOSED.\n";
// Cast list (must appear in this order)
CC_ZOMBIE = "ZOMBIEMAN";
CC_SHOTGUN = "SHOTGUN GUY";

View file

@ -8,6 +8,13 @@ episode map01
key = "h"
}
episode level01
{
name = "No Rest for the Living"
key = "n"
optional
}
defaultmap
{
sucktime = 1
@ -424,3 +431,113 @@ cluster 10
entertext = lookup, "C6TEXT"
}
// No Rest for the Living
map LEVEL01 lookup "NHUSTR_1"
{
titlepatch = "NWILV00"
next = "LEVEL02"
secretnext = "LEVEL09"
sky1 = "SKY1"
cluster = 11
par = 75
music = "$MUSIC_MESSAG"
}
map LEVEL02 lookup "NHUSTR_2"
{
titlepatch = "NWILV01"
next = "LEVEL03"
secretnext = "LEVEL09"
sky1 = "SKY1"
cluster = 11
par = 105
music = "$MUSIC_DDTBLU"
}
map LEVEL03 lookup "NHUSTR_3"
{
titlepatch = "NWILV02"
next = "LEVEL04"
secretnext = "LEVEL09"
sky1 = "SKY1"
cluster = 11
par = 120
music = "$MUSIC_DOOM"
}
map LEVEL04 lookup "NHUSTR_4"
{
titlepatch = "NWILV03"
next = "LEVEL05"
secretnext = "LEVEL09"
sky1 = "SKY1"
cluster = 11
par = 105
music = "$MUSIC_SHAWN"
}
map LEVEL05 lookup "NHUSTR_5"
{
titlepatch = "NWILV04"
next = "LEVEL06"
secretnext = "LEVEL09"
sky1 = "SKY1"
cluster = 11
par = 210
music = "$MUSIC_IN_CIT"
}
map LEVEL06 lookup "NHUSTR_6"
{
titlepatch = "NWILV05"
next = "LEVEL07"
secretnext = "LEVEL09"
sky1 = "SKY1"
cluster = 11
par = 105
sucktime = 1
music = "$MUSIC_THE_DA"
}
map LEVEL07 lookup "NHUSTR_7"
{
titlepatch = "NWILV06"
next = "LEVEL08"
secretnext = "LEVEL09"
sky1 = "SKY1"
cluster = 11
par = 165
map07special
music = "$MUSIC_IN_CIT"
}
map LEVEL08 lookup "NHUSTR_8"
{
titlepatch = "NWILV07"
next = "EndGameC"
secretnext = "EndGameC"
sky1 = "SKY1"
cluster = 11
par = 105
music = "$MUSIC_SHAWN"
}
map LEVEL09 lookup "NHUSTR_9"
{
titlepatch = "NWILV08"
next = "LEVEL05"
secretnext = "LEVEL05"
sky1 = "SKY1"
cluster = 11
par = 135
music = "$MUSIC_DDTBLU"
}
cluster 11
{
flat = "RROCK19"
music = "$MUSIC_READ_M"
exittext = lookup, "NERVETEXT"
}

View file

@ -0,0 +1,67 @@
// MAPINFO for Doom 2: BFG Edition
include "mapinfo/doom2.txt"
gameinfo
{
titlepage = "INTERPIC"
}
clearepisodes
episode map01
{
name = "Hell On Earth"
picname = "M_EPI1"
key = "h"
}
episode level01
{
name = "No Rest for the Living"
picname = "M_EPI2"
key = "n"
optional
}
map MAP02 lookup "HUSTR_2"
{
titlepatch = "CWILV01"
next = "MAP03"
secretnext = "MAP33"
sky1 = "SKY1"
cluster = 5
par = 90
music = "$MUSIC_STALKS"
}
map MAP33 lookup "HUSTR_33"
{
titlepatch = "CWILV32"
next = "MAP03"
secretnext = "MAP03"
sky1 = "SKY3"
cluster = 5
music = "$MUSIC_READ_M"
}
// Wolfenstein 3D censorship
map MAP31 lookup "HUSTR_31B"
{
titlepatch = "CWILV30"
next = "MAP16"
secretnext = "MAP32"
sky1 = "SKY3"
cluster = 9
par = 120
music = "$MUSIC_EVIL"
}
map MAP32 lookup "HUSTR_32B"
{
titlepatch = "CWILV31"
next = "MAP16"
secretnext = "MAP16"
sky1 = "SKY3"
cluster = 10
par = 30
music = "$MUSIC_ULTIMA"
}