summaryrefslogtreecommitdiffhomepage
path: root/serialize/anim.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-12 08:40:08 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-12 09:57:16 +0100
commita6af5d7b0cdb037bf8d0fd99aedfedc9789fd74c (patch)
tree6664758f61d0bee67ba64f231a6ec2e6b4dd72ac /serialize/anim.cpp
parent7434d29f3ce0033194b53b44ed881f749e67da75 (diff)
add offset to anim_group rotations
Diffstat (limited to 'serialize/anim.cpp')
-rw-r--r--serialize/anim.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/serialize/anim.cpp b/serialize/anim.cpp
index b6882f1d..d59c7194 100644
--- a/serialize/anim.cpp
+++ b/serialize/anim.cpp
@@ -2,15 +2,15 @@
#include "serialize/corrade-string.hpp"
#include "serialize/anim.hpp"
-namespace floormat::Serialize {
+namespace floormat {
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(anim_frame, ground, offset, size)
-NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(anim_group, name, frames, ground)
-NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(anim, object_name, anim_name, pixel_size, nframes, actionframe, fps, groups, width, height)
+NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(anim_group, name, frames, ground, offset)
+NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(anim_def, object_name, anim_name, pixel_size, nframes, actionframe, fps, groups, width, height)
} // namespace floormat::Serialize
-using namespace floormat::Serialize;
+using namespace floormat;
namespace nlohmann {
@@ -20,7 +20,7 @@ void adl_serializer<anim_frame>::from_json(const json& j, anim_frame& val) { usi
void adl_serializer<anim_group>::to_json(json& j, const anim_group& val) { using nlohmann::to_json; to_json(j, val); }
void adl_serializer<anim_group>::from_json(const json& j, anim_group& val) { using nlohmann::from_json; from_json(j, val); }
-void adl_serializer<anim>::to_json(json& j, const anim& val) { using nlohmann::to_json; to_json(j, val); }
-void adl_serializer<anim>::from_json(const json& j, anim& val) { using nlohmann::from_json; from_json(j, val); }
+void adl_serializer<anim_def>::to_json(json& j, const anim_def& val) { using nlohmann::to_json; to_json(j, val); }
+void adl_serializer<anim_def>::from_json(const json& j, anim_def& val) { using nlohmann::from_json; from_json(j, val); }
} // namespace nlohmann