Prog
This commit is contained in:
@@ -34,25 +34,18 @@ errorret_t engineInit(const int32_t argc, const char_t **argv) {
|
||||
inputInit();
|
||||
errorChain(assetInit());
|
||||
errorChain(localeManagerInit());
|
||||
errorChain(scriptManagerInit());
|
||||
errorChain(displayInit());
|
||||
errorChain(uiInit());
|
||||
errorChain(rpgInit());
|
||||
errorChain(sceneManagerInit());
|
||||
errorChain(scriptManagerInit());
|
||||
|
||||
// Run the initial script.
|
||||
|
||||
|
||||
scriptcontext_t testCtx;
|
||||
errorChain(scriptContextInit(&testCtx));
|
||||
errorChain(scriptContextExecFile(&testCtx, "script/test.dsf"));
|
||||
errorChain(scriptContextCallFunc(&testCtx, "testFunction", NULL, 0, NULL));
|
||||
|
||||
scriptvalue_t args[2] = {
|
||||
{ .type = SCRIPT_VALUE_TYPE_INT, .value.intValue = 5 },
|
||||
{ .type = SCRIPT_VALUE_TYPE_INT, .value.intValue = 7 }
|
||||
};
|
||||
scriptvalue_t ret = { .type = SCRIPT_VALUE_TYPE_INT };
|
||||
errorChain(scriptContextCallFunc(&testCtx, "doAdd", args, 2, &ret));
|
||||
printf("doAdd returned: %d\n", ret.value.intValue);
|
||||
|
||||
scriptContextDispose(&testCtx);
|
||||
|
||||
errorOk();
|
||||
|
||||
Reference in New Issue
Block a user