From a4c24b236e7438adb34798fcd20178e3b69b5215 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 24 Oct 2022 13:37:03 +0200 Subject: a --- editor/camera.cpp | 4 ++-- editor/draw.cpp | 1 + editor/precomp.hpp | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'editor') diff --git a/editor/camera.cpp b/editor/camera.cpp index b19acdd5..07dba901 100644 --- a/editor/camera.cpp +++ b/editor/camera.cpp @@ -34,8 +34,8 @@ void app::do_camera(float dt) const auto max_camera_offset = Vector2d(sz * 10); camera_offset -= dir.normalized() * (double)dt * pixels_per_second; - //camera_offset[0] = std::clamp(camera_offset[0], -max_camera_offset[0], max_camera_offset[0]); - //camera_offset[1] = std::clamp(camera_offset[1], -max_camera_offset[1], max_camera_offset[1]); + camera_offset[0] = std::clamp(camera_offset[0], -max_camera_offset[0], max_camera_offset[0]); + camera_offset[1] = std::clamp(camera_offset[1], -max_camera_offset[1], max_camera_offset[1]); Debug{} << "camera" << camera_offset; shader.set_camera_offset(camera_offset); diff --git a/editor/draw.cpp b/editor/draw.cpp index 7f71fcf9..4150bc27 100644 --- a/editor/draw.cpp +++ b/editor/draw.cpp @@ -1,6 +1,7 @@ #include "app.hpp" #include "main/floormat-main.hpp" #include "shaders/tile-shader.hpp" +#include namespace floormat { diff --git a/editor/precomp.hpp b/editor/precomp.hpp index 8c833594..e023f45d 100644 --- a/editor/precomp.hpp +++ b/editor/precomp.hpp @@ -12,6 +12,7 @@ #include #include +#include #include #include #include -- cgit v1.2.3