summaryrefslogtreecommitdiff
path: root/src/cat/LuaScriptInterface.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-09-14 21:03:14 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-09-14 21:03:14 (GMT)
commit486b34ebe581cf41b67145911a64ce2ea7b8932a (patch)
tree6752bc0bb7245bbd5009061b504f03b02790b58b /src/cat/LuaScriptInterface.h
parent685be24ffa1eba28aa378b8a9b4fd52dbe238756 (diff)
downloadpowder-486b34ebe581cf41b67145911a64ce2ea7b8932a.zip
powder-486b34ebe581cf41b67145911a64ce2ea7b8932a.tar.gz
Fixes invalid text pasting, Adds API to VM, allow program loading in Lua and assigning to update function
Diffstat (limited to 'src/cat/LuaScriptInterface.h')
-rw-r--r--src/cat/LuaScriptInterface.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cat/LuaScriptInterface.h b/src/cat/LuaScriptInterface.h
index 5bee8e1..c40728c 100644
--- a/src/cat/LuaScriptInterface.h
+++ b/src/cat/LuaScriptInterface.h
@@ -23,6 +23,12 @@ namespace ui
class Window;
}
+namespace vm
+{
+ class VirtualMachine;
+}
+
+
//Because lua only has bindings for C, we're going to have to go outside "outside" the LuaScriptInterface, this means we can only have one instance :(
#define LOCAL_LUA_DIR "Lua"
@@ -59,6 +65,9 @@ class LuaScriptInterface: public CommandInterface {
static int renderer_colourMode(lua_State * l);
//Elements
+ static vm::VirtualMachine * updateVirtualMachines[PT_NUM];
+ static int updateVM(UPDATE_FUNC_ARGS);
+ //
void initElementsAPI();
static int elements_allocate(lua_State * l);
static int elements_element(lua_State * l);
@@ -71,6 +80,10 @@ class LuaScriptInterface: public CommandInterface {
static int interface_showWindow(lua_State * l);
static int interface_closeWindow(lua_State * l);
static int interface_addComponent(lua_State * l);
+
+ //VM
+ void initVirtualMachineAPI();
+ static int virtualMachine_loadProgram(lua_State * l);
public:
ui::Window * Window;
lua_State *l;