- scriptified the scripted marines.

- fixed symbol name generation for native functions.
- moved PrintableName to VMFunction so that native functions also have this information.
This commit is contained in:
Christoph Oelckers 2016-11-21 19:09:58 +01:00
commit 360436c201
20 changed files with 658 additions and 756 deletions

View file

@ -230,6 +230,7 @@ static PSymbol *FindBuiltinFunction(FName funcname, VMNativeFunction::NativeCall
{
PSymbolVMFunction *symfunc = new PSymbolVMFunction(funcname);
VMNativeFunction *calldec = new VMNativeFunction(func, funcname);
calldec->PrintableName = funcname.GetChars();
symfunc->Function = calldec;
sym = symfunc;
GlobalSymbols.AddSymbol(sym);
@ -1428,6 +1429,14 @@ FxExpression *FxTypeCast::Resolve(FCompileContext &ctx)
delete this;
return x;
}
else if (ValueType == TypeSpriteID && basex->IsInteger())
{
basex->ValueType = TypeSpriteID;
auto x = basex;
basex = nullptr;
delete this;
return x;
}
else if (ValueType == TypeStateLabel)
{
if (basex->ValueType == TypeNullPtr)