summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-01-16 07:59:59 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-01-16 07:59:59 +0100
commit07716595e0c26ba6d19ee6c498280508ca5aa6c2 (patch)
treeda22b4d88e63419a366c48037cbef14f8f43a2b4 /src
parentae53b814c310d1996db0b818151ef7b205d03b7b (diff)
a
Diffstat (limited to 'src')
-rw-r--r--src/anim-atlas.cpp2
-rw-r--r--src/anim.hpp6
-rw-r--r--src/path-search.hpp3
3 files changed, 6 insertions, 5 deletions
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 <vector> // todo use <Corrade/Containers/GrowableArray.h>
+#include <Corrade/Containers/Array.h>
#include <Corrade/Containers/String.h>
#include <Magnum/Magnum.h>
#include <Magnum/Math/Vector2.h>
@@ -23,7 +23,7 @@ enum class anim_direction : unsigned char
struct anim_group final
{
String name{}, mirror_from{};
- std::vector<anim_frame> frames{};
+ Array<anim_frame> 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<anim_group> groups{};
+ Array<anim_group> 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<float>& bb, object_id own_id, const pred& p = never_continue());
};
-struct astar
+class astar
{
+public:
struct visited
{
uint32_t dist = (uint32_t)-1;