Example #1
0
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;
}
Example #2
0
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;
}