diff --git a/lua.cpp b/lua.cpp index 6297d3d..c5ea64c 100644 --- a/lua.cpp +++ b/lua.cpp @@ -178,6 +178,8 @@ extern "C" { uint8_t celw = luaL_checknumber(L, 5); uint8_t celh = luaL_checknumber(L, 6); uint8_t layer = luaL_optinteger(L, 7, 0);*/ + uint8_t surface = luaL_checkinteger(L, 1); + setsource(surface); map(); //celx, cely, sx, sy, celw, celh, layer); return 0; } diff --git a/vscode/library.lua b/vscode/library.lua index c6aa405..c296cd5 100644 --- a/vscode/library.lua +++ b/vscode/library.lua @@ -87,8 +87,9 @@ function tilemap.save(filename) end ---Set surface as the current tilemap function tilemap.set(surface) end ----Draw the tilemap -function tilemap.draw() end +---@param surface number +---Draw the tilemap, using the provided surface as tile graphics source +function tilemap.draw(surface) end ---@param x number ---@param y number