aboutsummaryrefslogtreecommitdiff
path: root/src/shared/lua_api/common.c
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2018-03-09 23:55:49 -0500
committerAlexander Pickering <alexandermpickering@gmail.com>2018-03-09 23:55:49 -0500
commit2831e232b886c5e3b0791ea5192f9e5194e6abf3 (patch)
tree4fb9309d18f388673b7a21b8f0e927727006f585 /src/shared/lua_api/common.c
parent35b7c646fd7f80b64c1ef49b6d81f9df9bc1b940 (diff)
downloadbrokengine-2831e232b886c5e3b0791ea5192f9e5194e6abf3.tar.gz
brokengine-2831e232b886c5e3b0791ea5192f9e5194e6abf3.tar.bz2
brokengine-2831e232b886c5e3b0791ea5192f9e5194e6abf3.zip
Added IGUIImages
Added the ability to display itextures on the gui
Diffstat (limited to 'src/shared/lua_api/common.c')
-rw-r--r--src/shared/lua_api/common.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/shared/lua_api/common.c b/src/shared/lua_api/common.c
index 50eb850..9a8baca 100644
--- a/src/shared/lua_api/common.c
+++ b/src/shared/lua_api/common.c
@@ -86,6 +86,31 @@ int pushvector2i(lua_State* L, long a, long b){
return 1;
}
+int popvector4i(lua_State* L,long* a,long* b,long* c, long* d){
+ lua_pushinteger(L,1);//{v4},1
+ lua_gettable(L,-2);//{v4},v4[1]
+ *a = lua_tointeger(L,-1);//{v4},v4[1]
+ lua_pop(L,1);//{v4}
+
+ lua_pushinteger(L,2);//{v4},2
+ lua_gettable(L,-2);//{v4},v4[2]
+ *b = lua_tointeger(L,-1);//{v4},v4[2]
+ lua_pop(L,1);//{v4}
+
+ lua_pushinteger(L,3);//{v4},3
+ lua_gettable(L,-2);//{v4},v4[3]
+ *c = lua_tointeger(L,-1);//{v4},v4[3]
+ lua_pop(L,1);//{v4}
+
+ lua_pushinteger(L,4);//{v4},3
+ lua_gettable(L,-2);//{v4},v4[3]
+ *d = lua_tointeger(L,-1);//{v4},v4[3]
+ lua_pop(L,1);//{v4}
+
+ lua_pop(L,1);//
+ return 0;
+}
+
int popvector3i(lua_State* L,long* a,long* b,long* c){//{v3}
lua_pushinteger(L,1);//{v3},1
lua_gettable(L,-2);//{v3},v3[1]