summaryrefslogtreecommitdiffhomepage
path: root/anim/serialize.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-06-11 18:17:06 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-06-11 18:17:06 +0200
commit5cbad4be539224068d34504df692974b17f49fa0 (patch)
tree4f3d63807a6b6616210564a8a160c3f815effe73 /anim/serialize.hpp
parent0e0efba4ff04570f7a52255999352c64484e1e9f (diff)
a
Diffstat (limited to 'anim/serialize.hpp')
-rw-r--r--anim/serialize.hpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/anim/serialize.hpp b/anim/serialize.hpp
index 8c049978..a8b13d41 100644
--- a/anim/serialize.hpp
+++ b/anim/serialize.hpp
@@ -19,7 +19,7 @@ struct anim_frame final
enum class anim_direction : unsigned char
{
N, NE, E, SE, S, SW, W, NW,
- COUNT = NW + 1,
+ COUNT,
};
struct anim_group final
@@ -31,11 +31,13 @@ struct anim_group final
struct anim final
{
- static std::tuple<anim, bool> from_json(const std::filesystem::path& pathname);
- [[nodiscard]] bool to_json(const std::filesystem::path& pathname);
+ static std::tuple<anim, bool> from_json(const std::filesystem::path& pathname) noexcept;
+ [[nodiscard]] bool to_json(const std::filesystem::path& pathname) noexcept;
static constexpr int default_fps = 24;
std::string name;
std::array<anim_group, (std::size_t)anim_direction::COUNT> groups;
- int nframes = 0, actionframe = -1, fps = default_fps;
+ int nframes = 0;
+ int width = 0, height = 0;
+ int actionframe = -1, fps = default_fps;
};