now analyzes sprite on load for occupied cells and serializs eetc hehe

This commit is contained in:
0x81c 2015-03-25 04:42:43 -04:00 committed by Your Name
parent d690863b6f
commit 7c7f76b188

View file

@ -1,10 +1,7 @@
require "libs/TSerial"
local targetFolder = "art"
function get(folder)
end
local reanalyzeCells = true
function getAllAssets()
local objectnames = {}
@ -34,7 +31,14 @@ function getAllAssets()
globalAssetProperties[name].class = "unmoveable"
globalAssetProperties[name].preload = false
end
globalAssetProperties[name].sprites[color] = topFolder .. "/" .. folder .. "/" .. fileToAnalyze
local sprite = topFolder .. "/" .. folder .. "/" .. fileToAnalyze
globalAssetProperties[name].sprites[color] = sprite
if not globalAssetProperties[name].cells or reanalyzeCells then
globalAssetProperties[name].cells = {}
globalAssetProperties[name].cells[color] = getCellsFromSprite(love.graphics.newImage(sprite))
end
end
end
end