From 2831e232b886c5e3b0791ea5192f9e5194e6abf3 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Fri, 9 Mar 2018 23:55:49 -0500 Subject: Added IGUIImages Added the ability to display itextures on the gui --- src/shared/lua_api/common.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/shared/lua_api/common.c') 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] -- cgit v1.2.3-70-g09d2