/** * Copyright (c) 2026 Dominic Masters * * This software is released under the MIT License. * https://opensource.org/licenses/MIT */ #pragma once #include "script/scriptcontext.h" /** * Registers the tileset module in the scripting context. * * @param ctx The scripting context to register the module in. */ void moduleTileset(scriptcontext_t *ctx); /** * __index metamethod for tileset userdata. * * @param l The Lua state. * @return The number of return values on the Lua stack. */ int moduleTilesetIndex(lua_State *l); /** * __tostring metamethod for tileset userdata. * * @param l The Lua state. * @return The number of return values on the Lua stack. */ int moduleTilesetToString(lua_State *l); /** * Lua function to get a tileset by name. * * @param l The Lua state. * @return The number of return values on the Lua stack. */ int moduleTilesetGetByName(lua_State *l); /** * Lua function to get the UV coordinates for a tile index in a tileset. * * @param l The Lua state. * @return The number of return values on the Lua stack. */ int moduleTilesetTileGetUV(lua_State *l); /** * Lua function to get the UV coordinates for a tile position in a tileset. * * @param l The Lua state. * @return The number of return values on the Lua stack. */ int moduleTilesetPositionGetUV(lua_State *l);