From ba1daf810d83bb49ec66150b24879610057a8156 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Wed, 19 Feb 2025 11:19:34 +0100 Subject: [PATCH] =?UTF-8?q?-=20[FIX]=20Hi=20ha=20que=20prove=C3=AFr=20de?= =?UTF-8?q?=20una=20surface=20amb=20tiles=20al=20tilemap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua.cpp | 2 ++ vscode/library.lua | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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