bool Sword25Engine::appMain() { // The main script start. This script loads all the other scripts and starts the actual game. ScriptEngine *scriptPtr = Kernel::getInstance()->getScript(); assert(scriptPtr); scriptPtr->executeFile(DEFAULT_SCRIPT_FILE); return true; }
static int executeFile(lua_State *L) { Kernel *pKernel = Kernel::getInstance(); assert(pKernel); ScriptEngine *pSE = pKernel->getScript(); assert(pSE); lua_pushbooleancpp(L, pSE->executeFile(luaL_checkstring(L, 1))); return 0; }