From 07716595e0c26ba6d19ee6c498280508ca5aa6c2 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 16 Jan 2024 07:59:59 +0100 Subject: a --- src/anim-atlas.cpp | 2 +- src/anim.hpp | 6 +++--- src/path-search.hpp | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/anim-atlas.cpp b/src/anim-atlas.cpp index c6a7c2f2..353ebb34 100644 --- a/src/anim-atlas.cpp +++ b/src/anim-atlas.cpp @@ -40,7 +40,7 @@ anim_atlas::anim_atlas(String name, const ImageView2D& image, anim_def info) : _name{std::move(name)}, _bitmask{make_bitmask(image)}, _info{std::move(info)}, _group_indices{make_group_indices(_info)} { - fm_soft_assert(!_info.groups.empty()); + fm_soft_assert(!_info.groups.isEmpty()); const Size<3> size = image.pixels().size(); fm_soft_assert(size[0]*size[1] == _info.pixel_size.product()); diff --git a/src/anim.hpp b/src/anim.hpp index 3b4d70a9..3c25f51c 100644 --- a/src/anim.hpp +++ b/src/anim.hpp @@ -1,6 +1,6 @@ #pragma once -#include // todo use +#include #include #include #include @@ -23,7 +23,7 @@ enum class anim_direction : unsigned char struct anim_group final { String name{}, mirror_from{}; - std::vector frames{}; + Array frames{}; Vector2ui ground{}; // for use in anim-crop-tool only Vector2s z_offset{}, depth_offset{}; Vector3b offset{}; @@ -54,7 +54,7 @@ struct anim_scale final struct anim_def final { String object_name{}, anim_name{}; - std::vector groups{}; + Array groups{}; Vector2ui pixel_size{}; anim_scale scale = anim_scale::ratio{1}; size_t nframes = 0, fps = 0, action_frame = 0, action_frame2 = 0; diff --git a/src/path-search.hpp b/src/path-search.hpp index 8e56f4fd..512a507f 100644 --- a/src/path-search.hpp +++ b/src/path-search.hpp @@ -65,8 +65,9 @@ public: static bool is_passable(world& w, chunk_coords_ ch0, const bbox& bb, object_id own_id, const pred& p = never_continue()); }; -struct astar +class astar { +public: struct visited { uint32_t dist = (uint32_t)-1; -- cgit v1.2.3