mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-20 01:04:08 +10:00
Implemented native C functions called from Toy scripts
There's only example functions for now, but I'll add type-specific functions later.
This commit is contained in:
@@ -419,7 +419,12 @@ static void processInvoke(Toy_VM* vm) {
|
||||
}
|
||||
break;
|
||||
|
||||
case TOY_FUNCTION_NATIVE:
|
||||
case TOY_FUNCTION_NATIVE: {
|
||||
//NOTE: arguments are on the stack, leave results on the stack
|
||||
fn->native.callback(vm);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
Toy_error("Can't call an unknown function type");
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user