mirror of
https://github.com/ZDoom/Raze.git
synced 2025-06-02 10:11:04 +00:00
- moved a bit more script parsing functionality into the backend and tried it out on the 'skybox' command.
This commit is contained in:
parent
4d29cd2df2
commit
cecd34efc7
4 changed files with 111 additions and 61 deletions
|
@ -1287,6 +1287,42 @@ void FScanner::AddSymbol(const char* name, double value)
|
|||
symbols.Insert(name, sym);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
int FScanner::StartBraces(FScanner::SavedPos* braceend)
|
||||
{
|
||||
if (CheckString("{"))
|
||||
{
|
||||
auto here = SavePos();
|
||||
SkipToEndOfBlock();
|
||||
*braceend = SavePos();
|
||||
RestorePos(here);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ScriptError("'{' expected");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
bool FScanner::FoundEndBrace(FScanner::SavedPos& braceend)
|
||||
{
|
||||
auto here = SavePos();
|
||||
return here.SavedScriptPtr >= braceend.SavedScriptPtr;
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// a class that remembers a parser position
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue