MCPcopy Create free account
hub / github.com/DFHack/dfhack / textures_createTileset

Function textures_createTileset

library/LuaApi.cpp:2109–2121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2107}
2108
2109static 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
2123static const luaL_Reg dfhack_textures_funcs[] = {
2124 { "loadTileset", textures_loadTileset },

Callers

nothing calls this directly

Calls 3

GetVectorFunction · 0.85
lua_tobooleanFunction · 0.85
PushVectorFunction · 0.85

Tested by

no test coverage detected