aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/camera.lua4
-rw-r--r--src/objs/tilemap.lua2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/camera.lua b/src/camera.lua
index 3283c0c..31bfe9e 100644
--- a/src/camera.lua
+++ b/src/camera.lua
@@ -36,6 +36,6 @@ function use_camera_transform()
local w, h = SCR_WIDTH / 2, SCR_HEIGHT / 2
lg.scale(active_cam.zoom)
lg.translate(
- -active_cam.realx + w / active_cam.zoom,
- -active_cam.realy + h / active_cam.zoom)
+ round(-active_cam.realx + w / active_cam.zoom),
+ round(-active_cam.realy + h / active_cam.zoom))
end
diff --git a/src/objs/tilemap.lua b/src/objs/tilemap.lua
index 90b8c8a..0d7e17d 100644
--- a/src/objs/tilemap.lua
+++ b/src/objs/tilemap.lua
@@ -122,7 +122,7 @@ function tilemap_draw_sys(tilemap)
for i = 1, tilemap.cachesize do
local tile = tilemap.cache[i]
TILE_QUAD:setViewport(tile.tex_x, tile.tex_y, TILESIZE, TILESIZE)
- lg.draw(TILE_TEX, TILE_QUAD, tile.x, tile.y)
+ lg.draw(TILE_TEX, TILE_QUAD, round(tile.x), round(tile.y))
end
end