mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Lua templating reading (part 4): s16, v2s16, v2f (#7512)
This commit is contained in:
parent
94cd2bfeac
commit
a61e1a4dbc
5 changed files with 61 additions and 24 deletions
|
@ -113,21 +113,6 @@ v2s16 read_v2s16(lua_State *L, int index)
|
|||
return p;
|
||||
}
|
||||
|
||||
v2s16 check_v2s16(lua_State *L, int index)
|
||||
{
|
||||
v2s16 p;
|
||||
CHECK_POS_TAB(index);
|
||||
lua_getfield(L, index, "x");
|
||||
CHECK_POS_COORD("x");
|
||||
p.X = lua_tonumber(L, -1);
|
||||
lua_pop(L, 1);
|
||||
lua_getfield(L, index, "y");
|
||||
CHECK_POS_COORD("y");
|
||||
p.Y = lua_tonumber(L, -1);
|
||||
lua_pop(L, 1);
|
||||
return p;
|
||||
}
|
||||
|
||||
void push_v2s16(lua_State *L, v2s16 p)
|
||||
{
|
||||
lua_newtable(L);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue