From 1462e5efa4d336238bb1e11f50f24882baec2c78 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 24 Jun 2008 02:56:27 +0000 Subject: [PATCH] - Fixed compilation issues with GCC. - Removed special case for nobotnodes in MAPINFO. SVN r1045 (trunk) --- docs/rh-log.txt | 4 ++++ src/g_level.cpp | 13 +++++-------- src/g_level.h | 1 + src/textures/texturemanager.cpp | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index fa4544ecd..623628914 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,7 @@ +June 23, 2008 +- Fixed compilation issues with GCC. +- Removed special case for nobotnodes in MAPINFO. + June 22, 2008 (Changes by Graf Zahl) - Added support for ST's QUARTERGRAVITY flag. - Added a generalized version of Skulltag's A_CheckRailReload function. diff --git a/src/g_level.cpp b/src/g_level.cpp index cb4ecf3c6..6dd41b389 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -114,9 +114,9 @@ struct FOptionalMapinfoParser MIParseFunc parsefunc; }; - static TArray optmapinf(TArray::NoInit); + void AddOptionalMapinfoParser(const char *keyword, MIParseFunc parsefunc) { FOptionalMapinfoParser mi; @@ -362,6 +362,7 @@ static const char *MapInfoMapLevel[] = "nocheckswitchrange", "translator", "unfreezesingleplayerconversations", + "nobotnodes", NULL }; @@ -511,6 +512,7 @@ MapHandlers[] = { MITYPE_CLRFLAG, LEVEL_CHECKSWITCHRANGE, 0 }, { MITYPE_STRING, lioffset(translator), 0 }, { MITYPE_SETFLAG, LEVEL_CONV_SINGLE_UNFREEZE, 0 }, + { MITYPE_IGNORE, 0, 0 }, // Skulltag option: nobotnodes }; static const char *MapInfoClusterLevel[] = @@ -924,7 +926,7 @@ static void ParseMapInfoLower (FScanner &sc, break; } entry = sc.MatchString (strings); - + if (entry == -1) { FString keyword = sc.String; @@ -936,15 +938,10 @@ static void ParseMapInfoLower (FScanner &sc, ParseOptionalBlock(keyword, sc, levelinfo); continue; } - else if (!stricmp(keyword, "nobotnodes")) // Ignore this Skulltag option if it appears - { - continue; - } } sc.ScriptError("Unknown keyword '%s'", keyword.GetChars()); } - - + handler = handlers + entry; switch (handler->type) { diff --git a/src/g_level.h b/src/g_level.h index 2f003c4d9..5fa1e8c86 100644 --- a/src/g_level.h +++ b/src/g_level.h @@ -147,6 +147,7 @@ struct FOptionalMapinfoData FOptionalMapinfoData *Next; FName identifier; FOptionalMapinfoData() { Next = NULL; identifier = NAME_None; } + virtual ~FOptionalMapinfoData() = 0; virtual FOptionalMapinfoData *Clone() const = 0; }; diff --git a/src/textures/texturemanager.cpp b/src/textures/texturemanager.cpp index 2288d1c9c..1bec330d9 100644 --- a/src/textures/texturemanager.cpp +++ b/src/textures/texturemanager.cpp @@ -953,7 +953,7 @@ FArchive &operator<< (FArchive &arc, FTextureID &tex) // //========================================================================== -FTextureID FTextureID::operator +(int offset) +FTextureID FTextureID::operator +(int offset) throw() { if (!isValid()) return *this; if (texnum + offset >= TexMan.NumTextures()) return FTextureID(-1);