aboutsummaryrefslogtreecommitdiff
path: root/src/client/lua_api/video
diff options
context:
space:
mode:
authorAlexander <alex@cogarr.net>2020-06-10 20:39:54 -0400
committerAlexander <alex@cogarr.net>2020-06-10 20:39:54 -0400
commit44a1421c393632978d59c0698a93ae22243b97e9 (patch)
treeea5d48412339b0ee6792c01414660639d19cfec6 /src/client/lua_api/video
parentececf2c8624f4d95d9413686839f7fa6e5bb5044 (diff)
downloadbrokengine-44a1421c393632978d59c0698a93ae22243b97e9.tar.gz
brokengine-44a1421c393632978d59c0698a93ae22243b97e9.tar.bz2
brokengine-44a1421c393632978d59c0698a93ae22243b97e9.zip
Various progress for 1klutz
Added convext shape casts, still a little broken, but it might be just broken bullet side.
Diffstat (limited to 'src/client/lua_api/video')
-rw-r--r--src/client/lua_api/video/draw.cpp58
-rw-r--r--src/client/lua_api/video/draw.hpp16
2 files changed, 37 insertions, 37 deletions
diff --git a/src/client/lua_api/video/draw.cpp b/src/client/lua_api/video/draw.cpp
index 1f38f34..7140162 100644
--- a/src/client/lua_api/video/draw.cpp
+++ b/src/client/lua_api/video/draw.cpp
@@ -1,29 +1,29 @@
-
-#include <irrlicht.h>
-#include <shared/lua_api/common.hpp>
-#include "draw.hpp"
-
-using namespace irr;
-using namespace video;
-using namespace core;
-
-extern IrrlichtDevice* device;
-extern IVideoDriver* driver;
-//drawline2d {startx,starty},{endx,endy},{r,g,b,a}
-int drawline2d(lua_State *L){
- long r,g,b,a;
- popvector4i(L, &r, &g, &b, &a);
- long endx, endy;
- popvector2i(L, &endx, &endy);
- long startx, starty;
- popvector2i(L, &startx, &starty);
- driver->draw2DLine(position2d<s32>(startx, starty), position2d<s32>(endx,endy), SColor(r,g,b,a));
- return 0;
-}
-
-void draw_register(lua_State *L){
- lua_getglobal(L,"video");//{video}
- lua_pushcfunction(L,drawline2d);//{video},drawline2d()
- lua_setfield(L,-2,"drawline2d");//{video}
- lua_pop(L,1);//
-}
+
+#include <irrlicht.h>
+#include <shared/lua_api/common.hpp>
+#include "draw.hpp"
+
+using namespace irr;
+using namespace video;
+using namespace core;
+
+extern IrrlichtDevice* device;
+extern IVideoDriver* driver;
+//drawline2d {startx,starty},{endx,endy},{r,g,b,a}
+int drawline2d(lua_State *L){
+ long r,g,b,a;
+ popvector4i(L, &r, &g, &b, &a);
+ long endx, endy;
+ popvector2i(L, &endx, &endy);
+ long startx, starty;
+ popvector2i(L, &startx, &starty);
+ driver->draw2DLine(position2d<s32>(startx, starty), position2d<s32>(endx,endy), SColor(r,g,b,a));
+ return 0;
+}
+
+void draw_register(lua_State *L){
+ lua_getglobal(L,"video");//{video}
+ lua_pushcfunction(L,drawline2d);//{video},drawline2d()
+ lua_setfield(L,-2,"drawline2d");//{video}
+ lua_pop(L,1);//
+}
diff --git a/src/client/lua_api/video/draw.hpp b/src/client/lua_api/video/draw.hpp
index eb5a9a7..836cd3d 100644
--- a/src/client/lua_api/video/draw.hpp
+++ b/src/client/lua_api/video/draw.hpp
@@ -1,8 +1,8 @@
-
-extern "C" {
- #include <lua.h>
- #include <lauxlib.h>
- #include <lualib.h>
-}
-
-void draw_register(lua_State* L);
+
+extern "C" {
+ #include <lua.h>
+ #include <lauxlib.h>
+ #include <lualib.h>
+}
+
+void draw_register(lua_State* L);