This commit is contained in:
lenheart
2024-08-05 00:25:05 +08:00
parent f51ecfd582
commit bd1ff22b74
4 changed files with 17 additions and 19 deletions

View File

@@ -202,9 +202,6 @@ void InitSquirrel()
setupLogger();
sq_setprintfunc(v, printfunc, errorfunc); // sets the print function
// 输出版本信息
// scfprintf(stdout, _SC("%s %s (%d bits)\n"), SQUIRREL_VERSION, SQUIRREL_COPYRIGHT, (int)sizeof(SQInteger) * 8);
// 注册全局NutApi
GlobaRegisterSquirrel(v);
@@ -221,14 +218,15 @@ void InitSquirrel()
if ((access("/dp_s/lib/db.ini", F_OK) != -1))
{
ReloadingScript(v, "/dp_s/Dps_A/");
ReloadingScript(v, "/dp_s/Dps_B/");
ReloadingScript(v, "/dp_s/Dps_C/");
// ReloadingScript(v, "/dp_s/Dps_B/");
// ReloadingScript(v, "/dp_s/Dps_C/");
}
else
{
ReqSquirrelScript(v);
}
/*
// 执行虚拟机Main函数
SQInteger top = sq_gettop(v); // saves the stack size before the call
sq_pushroottable(v); // pushes the global table
@@ -240,9 +238,12 @@ void InitSquirrel()
}
sq_settop(v, top); // restores the original stack size
sq_pushroottable(v);
sq_pushstring(v, "sq_ReloadScript", -1);
sq_newclosure(v, SqReloadScript, 0); // create a new function
sq_newslot(v, -3, SQFalse);
sq_pop(v, 1); // pops the root table
*/
/*
sq_pushroottable(v);
sq_pushstring(v, "sq_ReloadScript", -1);
sq_newclosure(v, SqReloadScript, 0); // create a new function
sq_newslot(v, -3, SQFalse);
sq_pop(v, 1); // pops the root table
*/
}