summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--not/Camera.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/not/Camera.lua b/not/Camera.lua
index 65395cb..f49b5be 100644
--- a/not/Camera.lua
+++ b/not/Camera.lua
@@ -29,9 +29,9 @@ end
function Camera:transform (scale, ratio, vw, vh)
local px, py = self:getPosition()
local sx, sy = self:getShake()
- local dx, dy = (px + sx) * ratio, (py + sy) * ratio
+ local dx, dy = math.floor((px + sx) * ratio), math.floor((py + sy) * ratio)
- vw, vh = vw / scale / 2, vh / scale / 2
+ vw, vh = math.floor(vw / scale / 2), math.floor(vh / scale / 2)
love.graphics.scale(scale, scale)
love.graphics.translate(vw - dx, vh - dy)