From 3bb33734a92e86024488adf88dc2a368c8c952b2 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Fri, 20 May 2011 14:11:40 +0200 Subject: Basic lua implementation. --- scripting/test.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 scripting/test.cpp (limited to 'scripting/test.cpp') diff --git a/scripting/test.cpp b/scripting/test.cpp new file mode 100644 index 0000000..1a378b7 --- /dev/null +++ b/scripting/test.cpp @@ -0,0 +1,11 @@ +#include "scripting/test.h" +#include "scripting.h" + +#include + +void print(lua_State *L, const char *s) { + lua_getglobal(L, "lua_instance"); + Lua *lua = static_cast(lua_touserdata(L, -1)); + lua_pop(L, 1); + lua->print(s); +} -- cgit v1.2.3