Add "mapinfo" token to the def parser, pending implementation.

Sub-tokens: "mapfile", "maptitle", "mapmd4", "mhkfile"

http://forums.duke4.net/topic/6070-user-map-maphacks-eduke32-feature-request/

git-svn-id: https://svn.eduke32.com/eduke32@3309 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2012-12-23 03:12:50 +00:00
parent 518ac7b4df
commit 0805060c74

View file

@ -87,6 +87,7 @@ enum scripttoken_t
T_NOFLOORPALRANGE,
T_TEXHITSCANRANGE,
T_NOFULLBRIGHTRANGE,
T_MAPINFO, T_MAPFILE, T_MAPTITLE, T_MAPMD4, T_MHKFILE,
T_ECHO,
};
@ -244,6 +245,7 @@ static int32_t defsparser(scriptfile *script)
{ "cachesize", T_CACHESIZE },
{ "dummytilefrompic",T_IMPORTTILE },
{ "tilefromtexture", T_TILEFROMTEXTURE },
{ "mapinfo", T_MAPINFO }, // dummy
{ "echo", T_ECHO },
};
@ -2001,6 +2003,39 @@ static int32_t defsparser(scriptfile *script)
}
break;
case T_MAPINFO:
{
char *dummy, *dummy2;
static const tokenlist mapinfotokens[] =
{
{ "mapfile", T_MAPFILE },
{ "maptitle", T_MAPTITLE },
{ "mapmd4", T_MAPMD4 },
{ "mhkfile", T_MHKFILE },
};
if (scriptfile_getbraces(script,&dummy)) break;
while (script->textptr < dummy)
{
switch (getatoken(script,mapinfotokens,sizeof(mapinfotokens)/sizeof(tokenlist)))
{
case T_MAPFILE:
scriptfile_getstring(script,&dummy2);
break;
case T_MAPTITLE:
scriptfile_getstring(script,&dummy2);
break;
case T_MAPMD4:
scriptfile_getstring(script,&dummy2);
break;
case T_MHKFILE:
scriptfile_getstring(script,&dummy2);
break;
}
}
}
break;
case T_ECHO:
{
char *string = NULL;