| 2107 | } |
| 2108 | |
| 2109 | static int textures_createTileset(lua_State *state) |
| 2110 | { |
| 2111 | vector<uint32_t> pixels; |
| 2112 | Lua::GetVector(state, pixels); |
| 2113 | auto texture_w = luaL_checkint(state, 2); |
| 2114 | auto texture_h = luaL_checkint(state, 3); |
| 2115 | auto tile_w = luaL_checkint(state, 4); |
| 2116 | auto tile_h = luaL_checkint(state, 5); |
| 2117 | bool reserved = lua_isboolean(state, 6) ? lua_toboolean(state, 6) : false; |
| 2118 | auto handles = Textures::createTileset(pixels, texture_w, texture_h, tile_w, tile_h, reserved); |
| 2119 | Lua::PushVector(state, handles); |
| 2120 | return 1; |
| 2121 | } |
| 2122 | |
| 2123 | static const luaL_Reg dfhack_textures_funcs[] = { |
| 2124 | { "loadTileset", textures_loadTileset }, |
nothing calls this directly
no test coverage detected