- did a bit of header cleanup to reduce the dependency on dobject.h.

This commit is contained in:
Christoph Oelckers 2017-03-09 23:30:42 +01:00
commit a4710bcdb0
48 changed files with 226 additions and 274 deletions

View file

@ -125,6 +125,21 @@ const char* GameInfoBorders[] =
} \
while (sc.CheckToken(',')); \
}
#define GAMEINFOKEY_SOUNDARRAY(key, variable, length, clear) \
else if(nextKey.CompareNoCase(variable) == 0) \
{ \
if (clear) gameinfo.key.Clear(); \
do \
{ \
sc.MustGetToken(TK_StringConst); \
if(length > 0 && strlen(sc.String) > length) \
{ \
sc.ScriptError("Value for '%s' can not be longer than %d characters.", #key, length); \
} \
gameinfo.key[gameinfo.key.Reserve(1)] = FSoundID(sc.String); \
} \
while (sc.CheckToken(',')); \
}
#define GAMEINFOKEY_STRING(key, variable) \
else if(nextKey.CompareNoCase(variable) == 0) \
@ -323,7 +338,7 @@ void FMapInfoParser::ParseGameInfo()
GAMEINFOKEY_STRINGARRAY(infoPages, "infoPage", 8, true)
GAMEINFOKEY_STRINGARRAY(PrecachedClasses, "precacheclasses", 0, false)
GAMEINFOKEY_STRINGARRAY(PrecachedTextures, "precachetextures", 0, false)
GAMEINFOKEY_STRINGARRAY(PrecachedSounds, "precachesounds", 0, false)
GAMEINFOKEY_SOUNDARRAY(PrecachedSounds, "precachesounds", 0, false)
GAMEINFOKEY_STRINGARRAY(EventHandlers, "addeventhandlers", 0, true)
GAMEINFOKEY_STRINGARRAY(EventHandlers, "eventhandlers", 0, false)
GAMEINFOKEY_STRING(PauseSign, "pausesign")