diff options
| author | Alexander Pickering <alex@cogarr.net> | 2018-06-30 16:15:05 -0600 |
|---|---|---|
| committer | Alexander Pickering <alex@cogarr.net> | 2018-06-30 16:15:05 -0600 |
| commit | ed58795eaf03bdee0b1fae8d05ce5b86d17549f7 (patch) | |
| tree | 065092f3e95bf74fdba541f6c5f7504757487d3d /src/shared/lua_api/common.cpp | |
| parent | 45e61c74802af739736d33c82f27596b45987eee (diff) | |
| download | brokengine-ed58795eaf03bdee0b1fae8d05ce5b86d17549f7.tar.gz brokengine-ed58795eaf03bdee0b1fae8d05ce5b86d17549f7.tar.bz2 brokengine-ed58795eaf03bdee0b1fae8d05ce5b86d17549f7.zip | |
Warning-less build
All compile warning for -Wall have been fixed
Diffstat (limited to 'src/shared/lua_api/common.cpp')
| -rw-r--r-- | src/shared/lua_api/common.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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); |
