summaryrefslogtreecommitdiffhomepage
path: root/not
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-09-22 22:28:47 +0200
committerAki <nthirtyone@gmail.com>2017-09-22 22:28:47 +0200
commitd651584d7a550a507670d9e028ed1c9be5fae427 (patch)
tree8b90ad4e253ed6e738cf7be0e6a503b187a08b89 /not
parentf0d20bb0667f9bafd0075fd506e2a0b40e84e869 (diff)
downloadroflnauts-d651584d7a550a507670d9e028ed1c9be5fae427.zip
roflnauts-d651584d7a550a507670d9e028ed1c9be5fae427.tar.gz
roflnauts-d651584d7a550a507670d9e028ed1c9be5fae427.tar.bz2
Respect pixels!
Diffstat (limited to 'not')
-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)