aboutsummaryrefslogtreecommitdiff
path: root/src/client/lua_api/load_scene.cpp
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2017-10-18 21:34:55 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2017-10-18 21:34:55 -0400
commit33e6b9627e6a46d388d46f2c5b4d15ba7e9f9904 (patch)
tree18d24b74e48d8b7e9cb656272df7a48b28d3b6c8 /src/client/lua_api/load_scene.cpp
parent76b4fddee6106b60dbc6da6d7bcef61b42a3c310 (diff)
downloadbrokengine-33e6b9627e6a46d388d46f2c5b4d15ba7e9f9904.tar.gz
brokengine-33e6b9627e6a46d388d46f2c5b4d15ba7e9f9904.tar.bz2
brokengine-33e6b9627e6a46d388d46f2c5b4d15ba7e9f9904.zip
Started refactoring
* Finished a basic server * Changed from ZMQ to nanomsg (basically the same though) * Moved some repeated code from the client/server directories into "shared" * Edited makefile to reflect new dependencies
Diffstat (limited to 'src/client/lua_api/load_scene.cpp')
-rw-r--r--src/client/lua_api/load_scene.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/client/lua_api/load_scene.cpp b/src/client/lua_api/load_scene.cpp
new file mode 100644
index 0000000..285cba0
--- /dev/null
+++ b/src/client/lua_api/load_scene.cpp
@@ -0,0 +1,31 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <vector>
+#include <map>
+extern "C" {
+ #include <lua.h>
+ #include <lauxlib.h>
+ #include <lualib.h>
+}
+#include <irrlicht.h>
+#include "scene/icamera.hpp"
+#include "scene/imesh.hpp"
+#include "scene/ilight.hpp"
+#include "phys/bphysbox.hpp"
+#include "phys/bphysmodel.hpp"
+
+using namespace irr;
+
+extern IrrlichtDevice* device;
+
+void load_scenefuncs(lua_State* L){
+ icamera_register(L,device);
+ imesh_register(L,device);
+ ilight_register(L,device);
+ bphysbox_register(L,device);
+ bphysmodel_register(L,device);
+ lua_pop(L, 1);
+
+ lua_newtable(L);
+ lua_setglobal(L,"scene");
+}