summaryrefslogtreecommitdiffhomepage
path: root/editor
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-24 13:37:03 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-24 13:37:03 +0200
commita4c24b236e7438adb34798fcd20178e3b69b5215 (patch)
tree478ee9647db83457ae8cd5ec9cdfba6e6b6ebd35 /editor
parentfeb9830aa3624ecd227768695c70184ea1b086ec (diff)
a
Diffstat (limited to 'editor')
-rw-r--r--editor/camera.cpp4
-rw-r--r--editor/draw.cpp1
-rw-r--r--editor/precomp.hpp1
3 files changed, 4 insertions, 2 deletions
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 <Magnum/GL/DebugOutput.h>
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 <Corrade/Utility/Arguments.h>
#include <Magnum/Math/Color.h>
+#include <Magnum/GL/DebugOutput.h>
#include <Magnum/GL/DefaultFramebuffer.h>
#include <Magnum/GL/Renderer.h>
#include <Magnum/Platform/Sdl2Application.h>