Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- if pY-zoom < 1 then pY = zoom+1 end
- if pY+zoom > #map then pY = #map-zoom end
- if pX+zoom > #map[1] then pX = #map[1]-zoom end
- if pX-zoom < 1 then pX = zoom+1 end
- for y=pY - zoom, pY + zoom, 1 do
- for x=pX - zoom, pX + zoom, 1 do
- if x > 0 and x < #map[1]+1 and y > 0 and y <#map+1 then
- if map[y][x] ~= 0 then
- local cell = map[y][x]
- local cTile = tiles[cell]
- local originX = (x-(pX)+zoom)*(width/(2*zoom+1))
- local originY = (y-pY+zoom)*(height/(2*zoom+1))
- local tileSizeX = (width/((2*zoom)+1))/ cTile:getWidth()
- local tileSizeY = height/((2*zoom)+1)/ cTile:getHeight()
- love.graphics.draw(cTile, originX,originY,0,tileSizeX , tileSizeY)
- end
- end
- end
- end
- --]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement