- named class functions are working. Yay!!

- converted A_BspiAttack and A_BabyMetal to script functions to test the implementation.
This commit is contained in:
Christoph Oelckers 2016-10-23 14:26:33 +02:00
commit 5b952b116a
6 changed files with 33 additions and 33 deletions

View file

@ -2042,6 +2042,15 @@ void ZCCCompiler::InitFunctions()
sym->AddVariant(NewPrototype(rets, args), argflags, argnames, afd == nullptr? nullptr : *(afd->VMPointer), varflags);
c->Type()->Symbols.ReplaceSymbol(sym);
if (!(f->Flags & ZCC_Native))
{
auto code = ConvertAST(f->Body);
if (code != nullptr)
{
sym->Variants[0].Implementation = FunctionBuildList.AddFunction(sym, code, FStringf("%s.%s", c->Type()->TypeName.GetChars(), FName(f->Name).GetChars()), false);
}
}
// todo: Check inheritance.
// todo: Process function bodies.
}