diff --git a/cartographer.lua b/cartographer.lua index cd5c530..dfc673e 100644 --- a/cartographer.lua +++ b/cartographer.lua @@ -182,8 +182,8 @@ function Layer.tilelayer:_updateAnimatedTiles() for tileset, spriteBatch in pairs(self._spriteBatches) do for gid, animation in pairs(tileset._animations) do if self._animatedTiles[tileset][gid] and animation.changed then + local q = tileset:_getQuad(gid) for _, tile in pairs(self._animatedTiles[tileset][gid]) do - local q = tileset:_getQuad(gid) spriteBatch:set(tile.sprite, q, tile.x, tile.y) end end diff --git a/main.lua b/main.lua index 71e9373..1d5fc80 100644 --- a/main.lua +++ b/main.lua @@ -8,5 +8,6 @@ end function love.draw() testMap:draw() - love.graphics.print(love.timer.getFPS()) -end \ No newline at end of file + love.graphics.print('FPS: ' .. love.timer.getFPS()) + love.graphics.print('Memory: ' .. math.floor(collectgarbage 'count') .. ' kb', 0, 16) +end