From 07716595e0c26ba6d19ee6c498280508ca5aa6c2 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 16 Jan 2024 07:59:59 +0100 Subject: a --- main/main-impl.cpp | 3 ++- main/main-impl.hpp | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'main') diff --git a/main/main-impl.cpp b/main/main-impl.cpp index cb74de85..6875f751 100644 --- a/main/main-impl.cpp +++ b/main/main-impl.cpp @@ -1,4 +1,5 @@ #include "main-impl.hpp" +#include "src/path-search.hpp" #include #include @@ -63,7 +64,7 @@ uint32_t main_impl::cursor() const noexcept } struct texture_unit_cache& main_impl::texture_unit_cache() { return _tuc; } -path_search& main_impl::search() { return _search; } +path_search& main_impl::search() { return *_search; } astar& main_impl::astar() { return _astar; } } // namespace floormat diff --git a/main/main-impl.hpp b/main/main-impl.hpp index b6d1b1f4..522183e6 100644 --- a/main/main-impl.hpp +++ b/main/main-impl.hpp @@ -31,6 +31,8 @@ struct floormat_app; struct scenery; class anim_atlas; struct clickable; +class path_search; +class astar; struct main_impl final : Platform::Sdl2Application, floormat_main { @@ -98,7 +100,7 @@ struct main_impl final : Platform::Sdl2Application, floormat_main struct texture_unit_cache& texture_unit_cache() override; path_search& search() override; - struct astar& astar() override; + class astar& astar() override; private: struct texture_unit_cache _tuc; @@ -117,8 +119,8 @@ private: #ifdef FM_USE_DEPTH32 Framebuffer framebuffer; #endif - path_search _search; - struct astar _astar; + safe_ptr _search; + class astar _astar; struct { float value = 0; -- cgit v1.2.3