From 49f6e347f01f72e8854308d5a54aaae337489555 Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Thu, 11 Apr 2013 13:23:38 -0500 Subject: Lua HUD --- src/scriptapi_types.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/scriptapi_types.cpp') diff --git a/src/scriptapi_types.cpp b/src/scriptapi_types.cpp index 01a9b3bc3..f30451108 100644 --- a/src/scriptapi_types.cpp +++ b/src/scriptapi_types.cpp @@ -42,6 +42,15 @@ void push_v3f(lua_State *L, v3f p) lua_setfield(L, -2, "z"); } +void push_v2f(lua_State *L, v2f p) +{ + lua_newtable(L); + lua_pushnumber(L, p.X); + lua_setfield(L, -2, "x"); + lua_pushnumber(L, p.Y); + lua_setfield(L, -2, "y"); +} + v2s16 read_v2s16(lua_State *L, int index) { v2s16 p; -- cgit v1.2.3