mirror of
https://github.com/ZDoom/Raze.git
synced 2025-06-02 18:21:06 +00:00
- exported the tile flag setters to .def.
This commit is contained in:
parent
5a2819239c
commit
67e807de26
19 changed files with 247 additions and 206 deletions
|
@ -2263,6 +2263,34 @@ static void parseSpawnClasses(FScanner& sc, FScriptPosition& pos)
|
|||
sc.SetCMode(false);
|
||||
}
|
||||
|
||||
static void parseTileFlags(FScanner& sc, FScriptPosition& pos)
|
||||
{
|
||||
int num = -1;
|
||||
|
||||
sc.SetCMode(true);
|
||||
sc.GetNumber(num, true);
|
||||
if (!sc.CheckString("{"))
|
||||
{
|
||||
pos.Message(MSG_ERROR, "tileflags:'{' expected, unable to continue");
|
||||
sc.SetCMode(false);
|
||||
return;
|
||||
}
|
||||
while (!sc.CheckString("}"))
|
||||
{
|
||||
sc.MustGetString();
|
||||
int tile = TileFiles.tileForName(sc.String);
|
||||
if (tile == -1)
|
||||
{
|
||||
pos.Message(MSG_ERROR, "tileflags:Unknown tile name '%s'", sc.String);
|
||||
}
|
||||
else
|
||||
{
|
||||
TileFiles.tiledata[tile].tileflags |= num;
|
||||
}
|
||||
}
|
||||
sc.SetCMode(false);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
|
@ -2356,6 +2384,7 @@ static const dispatch basetokens[] =
|
|||
{ "defineqav", parseDefineQAV },
|
||||
|
||||
{ "spawnclasses", parseSpawnClasses },
|
||||
{ "tileflag", parseTileFlags },
|
||||
{ nullptr, nullptr },
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue