From b17629cb9c85776c728a25b675be5a7cf420dbdc Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 24 Oct 2022 11:45:06 +0200 Subject: a --- editor/app.cpp | 4 +++- editor/camera.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'editor') diff --git a/editor/app.cpp b/editor/app.cpp index 80f7600c..699d3abc 100644 --- a/editor/app.cpp +++ b/editor/app.cpp @@ -16,7 +16,7 @@ app::app() : { } -app::~app() +app::~app() // NOLINT(modernize-use-equals-default) { } @@ -85,9 +85,11 @@ int app::run_from_argv(const int argc, const char* const* const argv) } int ret; + Pointer ptr; { app application; ret = application.exec(); + ptr = std::move(application.M); } loader_::destroy(); return ret; diff --git a/editor/camera.cpp b/editor/camera.cpp index e37bd84d..ecbeafc1 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]); shader.set_camera_offset(camera_offset); } -- cgit v1.2.3