summaryrefslogtreecommitdiffhomepage
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/main-impl.cpp3
-rw-r--r--main/main-impl.hpp8
2 files changed, 7 insertions, 4 deletions
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 <Corrade/Utility/Move.h>
#include <Magnum/Platform/Sdl2Application.h>
@@ -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<path_search> _search;
+ class astar _astar;
struct {
float value = 0;