From ed58795eaf03bdee0b1fae8d05ce5b86d17549f7 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 30 Jun 2018 16:15:05 -0600 Subject: Warning-less build All compile warning for -Wall have been fixed --- src/shared/lua_api/common.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/shared/lua_api/common.cpp') diff --git a/src/shared/lua_api/common.cpp b/src/shared/lua_api/common.cpp index 68bf203..b190bdb 100644 --- a/src/shared/lua_api/common.cpp +++ b/src/shared/lua_api/common.cpp @@ -190,6 +190,17 @@ int poprecti(lua_State* L, long *sx, long *sy, long *ex, long *ey){ return 0; } +int pushrecti(lua_State* L, long sx, long sy, long ex, long ey){ + lua_newtable(L);//{} + lua_pushnumber(L,1);//{},1,{sx,sy} + pushvector2i(L,sx,sy);//{},1,{sx,sy} + lua_settable(L,-3);//{{sx,sy}} + lua_pushnumber(L,2);//{{sx,sy}},2 + pushvector2i(L,ex,ey);//{{sx,sy}},2,{ex,ey} + lua_settable(L,-3);//{{sx,sy},{ex,ey}} + return 1; +} + int popvector2i(lua_State* L, long* a, long* b){ lua_pushinteger(L,1); lua_gettable(L,-2); -- cgit v1.2.3-70-g09d2