diff options
Diffstat (limited to 'plugins/MirLua/src/mlua.cpp')
-rw-r--r-- | plugins/MirLua/src/mlua.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/plugins/MirLua/src/mlua.cpp b/plugins/MirLua/src/mlua.cpp new file mode 100644 index 0000000000..ee6d91e117 --- /dev/null +++ b/plugins/MirLua/src/mlua.cpp @@ -0,0 +1,20 @@ +#include "stdafx.h" + +CMLua::CMLua()
+{
+ lua = luaL_newstate();
+
+ luaL_openlibs(lua);
+ luaL_newlib(lua, CMLua::CoreFunctions);
+ lua_setglobal(lua, "M");
+}
+
+CMLua::~CMLua() +{ + lua_close(lua); +} + +void CMLua::Load(const char *name) +{ + luaL_dofile(lua, name); +}
\ No newline at end of file |