This is what I have
http://d.pr/YZYR
Basically I have a tile grid of all 0's, and any tile that is a 1 has this tree drawn on it.
Code: Select all
function drawTrees()
for i = 1, #map do
for l = 1, #map do
if map[i][l] == 1 then
love.graphics.draw(images.treetest, mapToWorld(l-1, i-2))
end
end
end
end
Code: Select all
quads = {
love.graphics.newQuad(0, 0, 16, 16, 64, 64), -- big white
love.graphics.newQuad(32, 0, 16, 16, 64, 64), -- big green
love.graphics.newQuad(32, 32, 16, 16, 64, 64), -- big blue
love.graphics.newQuad(0, 32, 16, 16, 64, 64), -- big orange
love.graphics.newQuad(0, 16, 16, 16, 64, 64), -- med white
love.graphics.newQuad(0, 48, 16, 16, 64, 64), -- med orange
love.graphics.newQuad(32, 48, 16, 16, 64, 64), -- med blue
love.graphics.newQuad(32, 16, 16, 16, 64, 64), -- med green
love.graphics.newQuad(16, 0, 16, 16, 64, 64), -- 2 white
love.graphics.newQuad(16, 32, 16, 16, 64, 64), -- 2 orange
love.graphics.newQuad(48, 0, 16, 16, 64, 64), -- 2 green
love.graphics.newQuad(48, 32, 16, 16, 64, 64), -- 2 blue
love.graphics.newQuad(16, 16, 16, 16, 64, 64), -- single white
love.graphics.newQuad(16, 48, 16, 16, 64, 64), -- single orange
love.graphics.newQuad(48, 16, 16, 16, 64, 64), -- single green
love.graphics.newQuad(48, 48, 16, 16, 64, 64) -- single blue
}
As always, any help is appreciated. Thanks guys!