- [FIX] Hi ha que proveïr de una surface amb tiles al tilemap

This commit is contained in:
2025-02-19 11:19:34 +01:00
parent 45d31579d2
commit ba1daf810d
2 changed files with 5 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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