summaryrefslogtreecommitdiffhomepage
path: root/serialize
diff options
context:
space:
mode:
Diffstat (limited to 'serialize')
-rw-r--r--serialize/anim.hpp4
-rw-r--r--serialize/magnum-vector2i.hpp2
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 };
}
};