| 1010 | } |
| 1011 | |
| 1012 | static int dfhack_penarray_get_tile(lua_State *L) |
| 1013 | { |
| 1014 | PenArray *parr = check_penarray_native(L, 1); |
| 1015 | unsigned int x = luaL_checkint(L, 2); |
| 1016 | unsigned int y = luaL_checkint(L, 3); |
| 1017 | if (x < parr->get_dimx() && y < parr->get_dimy()) |
| 1018 | { |
| 1019 | Pen pen = parr->get_tile(x, y); |
| 1020 | Lua::Push(L, pen); |
| 1021 | } |
| 1022 | else |
| 1023 | { |
| 1024 | lua_pushnil(L); |
| 1025 | } |
| 1026 | return 1; |
| 1027 | } |
| 1028 | |
| 1029 | static int dfhack_penarray_set_tile(lua_State *L) |
| 1030 | { |
nothing calls this directly
no test coverage detected