diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-05 20:47:15 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-05 20:47:15 +0100 |
commit | 794787093d1d29aa67a06223ed2e0c56ec90b9ce (patch) | |
tree | 900d3e5591b1187e864a4116bf957e0d0839cb77 /serialize | |
parent | b97413c5561a59acac86e053a1aa8bd7905456f2 (diff) |
a
Diffstat (limited to 'serialize')
-rw-r--r-- | serialize/anim.hpp | 4 | ||||
-rw-r--r-- | serialize/magnum-vector2i.hpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/serialize/anim.hpp b/serialize/anim.hpp index 286bc56f..fb4b2f80 100644 --- a/serialize/anim.hpp +++ b/serialize/anim.hpp @@ -1,6 +1,7 @@ #pragma once #include <vector> +#include <Corrade/Containers/String.h> #include <Magnum/Magnum.h> #include <Magnum/Math/Vector2.h> #include <nlohmann/json_fwd.hpp> @@ -9,7 +10,8 @@ namespace floormat::Serialize { struct anim_frame final { - Vector2ui ground, offset, size; + Vector2i ground; + Vector2ui offset, size; }; enum class anim_direction : unsigned char diff --git a/serialize/magnum-vector2i.hpp b/serialize/magnum-vector2i.hpp index 0b440c78..c53f26b8 100644 --- a/serialize/magnum-vector2i.hpp +++ b/serialize/magnum-vector2i.hpp @@ -27,7 +27,7 @@ struct adl_serializer<Magnum::Math::Vector2<t>> final int n = 0; int ret = std::sscanf(str.data(), format_string, &x, &y, &n); if (ret != 2 || (std::size_t)n != str.size() || x != (t)x || y != (t)y) - fm_abort("failed to parse Vector2"); + fm_abort("failed to parse Vector2 '%s'", str.data()); val = { (t)x, (t)y }; } }; |