aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/camera.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/camera.lua b/src/camera.lua
index add6ae4..81f1657 100644
--- a/src/camera.lua
+++ b/src/camera.lua
@@ -59,8 +59,8 @@ end
function use_camera_transform()
local w, h = SCR_WIDTH / 2, SCR_HEIGHT / 2
lg.scale(active_cam.zoom)
- local ox, oy = round(-active_cam.realx + w / active_cam.zoom),
- round(-active_cam.realy + h / active_cam.zoom)
+ local ox, oy = -active_cam.realx + w / active_cam.zoom,
+ -active_cam.realy + h / active_cam.zoom
local shakex, shakey = 0, 0
if active_cam.shake_timer > 0 then
@@ -77,5 +77,7 @@ function use_camera_transform()
shakey = shakey * strength
end
- lg.translate(ox + shakex, oy + shakey)
+ lg.translate(
+ round(ox + shakex),
+ round(oy + shakey))
end