Merge branch 'master' into gonesolong

Conflicts:
	src/CMakeLists.txt
	src/actor.h
	src/g_heretic/a_hereticmisc.cpp
	src/g_heretic/a_hereticweaps.cpp
	src/g_heretic/a_ironlich.cpp
	src/info.h
	src/namedef.h
	src/p_buildmap.cpp
	src/p_enemy.cpp
	src/p_map.cpp
	src/p_mobj.cpp
	src/thingdef/thingdef_codeptr.cpp
	zdoom.vcproj
This commit is contained in:
Randy Heit 2014-12-20 19:11:39 -06:00
commit 2d87eb0ba2
457 changed files with 13703 additions and 9290 deletions

View file

@ -71,9 +71,10 @@ extern TMap<int, FString> HexenMusic;
static int FindWadLevelInfo (const char *name)
{
for (unsigned int i = 0; i < wadlevelinfos.Size(); i++)
if (!strnicmp (name, wadlevelinfos[i].mapname, 8))
{
if (!wadlevelinfos[i].MapName.CompareNoCase(name))
return i;
}
return -1;
}
@ -94,8 +95,7 @@ level_info_t *FindLevelInfo (const char *mapname, bool allowdefault)
{
if (TheDefaultLevelInfo.LevelName.IsEmpty())
{
uppercopy(TheDefaultLevelInfo.skypic1, "SKY1");
uppercopy(TheDefaultLevelInfo.skypic2, "SKY1");
TheDefaultLevelInfo.SkyPic2 = TheDefaultLevelInfo.SkyPic1 = "SKY1";
TheDefaultLevelInfo.LevelName = "Unnamed";
}
return &TheDefaultLevelInfo;
@ -145,7 +145,7 @@ bool CheckWarpTransMap (FString &mapname, bool substitute)
level_info_t *lev = FindLevelByWarpTrans (atoi (&mapname[4]));
if (lev != NULL)
{
mapname = lev->mapname;
mapname = lev->MapName;
return true;
}
else if (substitute)
@ -225,14 +225,13 @@ void P_RemoveDefereds (void)
void level_info_t::Reset()
{
mapname[0] = 0;
mapbg[0] = 0;
MapName = "";
MapBackground = "";
levelnum = 0;
pname[0] = 0;
nextmap[0] = 0;
secretmap[0] = 0;
strcpy (skypic1, "-NOFLAT-");
strcpy (skypic2, "-NOFLAT-");
PName = "";
NextMap = "";
NextSecretMap = "";
SkyPic1 = SkyPic2 = "-NOFLAT-";
cluster = 0;
partime = 0;
sucktime = 0;
@ -243,10 +242,10 @@ void level_info_t::Reset()
flags2 = LEVEL2_LAXMONSTERACTIVATION;
Music = "";
LevelName = "";
strcpy (fadetable, "COLORMAP");
FadeTable = "COLORMAP";
WallHorizLight = -8;
WallVertLight = +8;
f1[0] = 0;
F1Pic = "";
musicorder = 0;
snapshot = NULL;
snapshotVer = 0;
@ -264,14 +263,14 @@ void level_info_t::Reset()
compatmask = compatmask2 = 0;
Translator = "";
RedirectType = 0;
RedirectMap[0] = 0;
RedirectMapName = "";
EnterPic = "";
ExitPic = "";
InterMusic = "";
intermusicorder = 0;
SoundInfo = "";
SndSeq = "";
bordertexture[0] = 0;
BorderTexture = "";
teamdamage = 0.f;
specialactions.Clear();
DefaultEnvironment = 0;
@ -301,17 +300,17 @@ FString level_info_t::LookupLevelName()
char checkstring[32];
// Strip out the header from the localized string
if (mapname[0] == 'E' && mapname[2] == 'M')
if (MapName.Len() > 3 && MapName[0] == 'E' && MapName[2] == 'M')
{
mysnprintf (checkstring, countof(checkstring), "%s: ", mapname);
mysnprintf (checkstring, countof(checkstring), "%s: ", MapName.GetChars());
}
else if (mapname[0] == 'M' && mapname[1] == 'A' && mapname[2] == 'P')
else if (MapName.Len() > 3 && MapName[0] == 'M' && MapName[1] == 'A' && MapName[2] == 'P')
{
mysnprintf (checkstring, countof(checkstring), "%d: ", atoi(mapname + 3));
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')
else if (MapName.Len() > 5 && MapName[0] == 'L' && MapName[1] == 'E' && MapName[2] == 'V' && MapName[3] == 'E' && MapName[4] == 'L')
{
mysnprintf (checkstring, countof(checkstring), "%d: ", atoi(mapname + 5));
mysnprintf (checkstring, countof(checkstring), "%d: ", atoi(&MapName[5]));
}
thename = strstr (lookedup, checkstring);
if (thename == NULL)
@ -374,9 +373,9 @@ level_info_t *level_info_t::CheckLevelRedirect ()
if (playeringame[i] && players[i].mo->FindInventory(type))
{
// check for actual presence of the map.
if (P_CheckMapData(RedirectMap))
if (P_CheckMapData(RedirectMapName))
{
return FindLevelInfo(RedirectMap);
return FindLevelInfo(RedirectMapName);
}
break;
}
@ -393,7 +392,7 @@ level_info_t *level_info_t::CheckLevelRedirect ()
bool level_info_t::isValid()
{
return mapname[0] != 0 || this == &TheDefaultLevelInfo;
return MapName.Len() != 0 || this == &TheDefaultLevelInfo;
}
//==========================================================================
@ -623,12 +622,14 @@ bool FMapInfoParser::ParseLookupName(FString &dest)
//
//==========================================================================
/*
void FMapInfoParser::ParseLumpOrTextureName(char *name)
{
sc.MustGetString();
uppercopy(name, sc.String);
name[8]=0;
}
*/
void FMapInfoParser::ParseLumpOrTextureName(FString &name)
{
@ -766,29 +767,27 @@ void FMapInfoParser::ParseCluster()
//
//==========================================================================
void FMapInfoParser::ParseNextMap(char *mapname)
void FMapInfoParser::ParseNextMap(FString &mapname)
{
if (sc.CheckNumber())
{
if (HexenHack)
{
mysnprintf (mapname, 9, "&wt@%02d", sc.Number);
mapname.Format("&wt@%02d", sc.Number);
}
else
{
mysnprintf (mapname, 9, "MAP%02d", sc.Number);
mapname.Format("MAP%02d", sc.Number);
}
}
else
{
*mapname = 0;
sc.MustGetString();
strncpy (mapname, sc.String, 8);
mapname[8] = 0;
mapname = sc.String;
FName seq = CheckEndSequence();
if (seq != NAME_None)
{
mysnprintf(mapname, 11, "enDSeQ%04x", int(seq));
mapname.Format("enDSeQ%04x", int(seq));
}
}
}
@ -809,19 +808,19 @@ DEFINE_MAP_OPTION(levelnum, true)
DEFINE_MAP_OPTION(next, true)
{
parse.ParseAssign();
parse.ParseNextMap(info->nextmap);
parse.ParseNextMap(info->NextMap);
}
DEFINE_MAP_OPTION(secretnext, true)
{
parse.ParseAssign();
parse.ParseNextMap(info->secretmap);
parse.ParseNextMap(info->NextSecretMap);
}
DEFINE_MAP_OPTION(secret, true) // Just an alias for secretnext, for Vavoom compatibility
{
parse.ParseAssign();
parse.ParseNextMap(info->secretmap);
parse.ParseNextMap(info->NextSecretMap);
}
DEFINE_MAP_OPTION(cluster, true)
@ -850,7 +849,7 @@ DEFINE_MAP_OPTION(cluster, true)
DEFINE_MAP_OPTION(sky1, true)
{
parse.ParseAssign();
parse.ParseLumpOrTextureName(info->skypic1);
parse.ParseLumpOrTextureName(info->SkyPic1);
if (parse.CheckFloat())
{
if (parse.HexenHack)
@ -864,7 +863,7 @@ DEFINE_MAP_OPTION(sky1, true)
DEFINE_MAP_OPTION(sky2, true)
{
parse.ParseAssign();
parse.ParseLumpOrTextureName(info->skypic2);
parse.ParseLumpOrTextureName(info->SkyPic2);
if (parse.CheckFloat())
{
if (parse.HexenHack)
@ -879,7 +878,7 @@ DEFINE_MAP_OPTION(sky2, true)
DEFINE_MAP_OPTION(skybox, true)
{
parse.ParseAssign();
parse.ParseLumpOrTextureName(info->skypic1);
parse.ParseLumpOrTextureName(info->SkyPic1);
info->skyspeed1 = 0;
}
@ -900,7 +899,7 @@ DEFINE_MAP_OPTION(outsidefog, true)
DEFINE_MAP_OPTION(titlepatch, true)
{
parse.ParseAssign();
parse.ParseLumpOrTextureName(info->pname);
parse.ParseLumpOrTextureName(info->PName);
}
DEFINE_MAP_OPTION(partime, true)
@ -939,7 +938,7 @@ DEFINE_MAP_OPTION(intermusic, true)
DEFINE_MAP_OPTION(fadetable, true)
{
parse.ParseAssign();
parse.ParseLumpOrTextureName(info->fadetable);
parse.ParseLumpOrTextureName(info->FadeTable);
}
DEFINE_MAP_OPTION(evenlighting, true)
@ -1074,7 +1073,7 @@ DEFINE_MAP_OPTION(redirect, true)
parse.sc.MustGetString();
info->RedirectType = parse.sc.String;
parse.ParseComma();
parse.ParseLumpOrTextureName(info->RedirectMap);
parse.ParseNextMap(info->RedirectMapName);
}
DEFINE_MAP_OPTION(sndseq, true)
@ -1122,13 +1121,13 @@ DEFINE_MAP_OPTION(slideshow, false)
DEFINE_MAP_OPTION(bordertexture, true)
{
parse.ParseAssign();
parse.ParseLumpOrTextureName(info->bordertexture);
parse.ParseLumpOrTextureName(info->BorderTexture);
}
DEFINE_MAP_OPTION(f1, true)
{
parse.ParseAssign();
parse.ParseLumpOrTextureName(info->f1);
parse.ParseLumpOrTextureName(info->F1Pic);
}
DEFINE_MAP_OPTION(teamdamage, true)
@ -1141,7 +1140,7 @@ DEFINE_MAP_OPTION(teamdamage, true)
DEFINE_MAP_OPTION(mapbackground, true)
{
parse.ParseAssign();
parse.ParseLumpOrTextureName(info->mapbg);
parse.ParseLumpOrTextureName(info->MapBackground);
}
DEFINE_MAP_OPTION(defaultenvironment, false)
@ -1524,8 +1523,8 @@ level_info_t *FMapInfoParser::ParseMapHeader(level_info_t &defaultinfo)
}
uppercopy (levelinfo->mapname, mapname);
levelinfo->mapname[8] = 0;
levelinfo->MapName = mapname;
levelinfo->MapName.ToUpper();
sc.MustGetString ();
if (sc.String[0] == '$')
{
@ -1545,7 +1544,7 @@ level_info_t *FMapInfoParser::ParseMapHeader(level_info_t &defaultinfo)
// Set up levelnum now so that you can use Teleport_NewMap specials
// to teleport to maps with standard names without needing a levelnum.
levelinfo->levelnum = GetDefaultLevelNum(levelinfo->mapname);
levelinfo->levelnum = GetDefaultLevelNum(levelinfo->MapName);
// Does this map have a song defined via SNDINFO's $map command?
// Set that as this map's default music if it does.
@ -1575,7 +1574,7 @@ level_info_t *FMapInfoParser::ParseMapHeader(level_info_t &defaultinfo)
void FMapInfoParser::ParseEpisodeInfo ()
{
unsigned int i;
char map[9];
FString map;
FString pic;
FString name;
bool remove = false;
@ -1586,15 +1585,14 @@ void FMapInfoParser::ParseEpisodeInfo ()
// Get map name
sc.MustGetString ();
uppercopy (map, sc.String);
map[8] = 0;
map = sc.String;
if (sc.CheckString ("teaser"))
{
sc.MustGetString ();
if (gameinfo.flags & GI_SHAREWARE)
{
uppercopy (map, sc.String);
map = sc.String;
}
}
@ -1789,9 +1787,9 @@ void FMapInfoParser::ParseMapInfo (int lump, level_info_t &gamedefaults, level_i
ParseMapDefinition(*levelinfo);
// When the second sky is -NOFLAT-, make it a copy of the first sky
if (strcmp (levelinfo->skypic2, "-NOFLAT-") == 0)
if (!levelinfo->SkyPic2.CompareNoCase("-NOFLAT-"))
{
strcpy (levelinfo->skypic2, levelinfo->skypic1);
levelinfo->SkyPic2 = levelinfo->SkyPic1;
}
SetLevelNum (levelinfo, levelinfo->levelnum); // Wipe out matching levelnums from other maps.
}