diff options
Diffstat (limited to 'serialize/tile-atlas.cpp')
-rw-r--r-- | serialize/tile-atlas.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/serialize/tile-atlas.cpp b/serialize/tile-atlas.cpp index 0f03e6b2..4a10d2c2 100644 --- a/serialize/tile-atlas.cpp +++ b/serialize/tile-atlas.cpp @@ -9,10 +9,10 @@ namespace Magnum::Examples::Serialize { struct proxy_atlas final { std::string name; - Vector2i size; + Vector2ui num_tiles; }; -NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(proxy_atlas, name, size) +NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(proxy_atlas, name, num_tiles) } // namespace Magnum::Examples::Serialize @@ -29,14 +29,14 @@ void adl_serializer<shared_atlas>::to_json(json& j, const shared_atlas& x) j = nullptr; else { using nlohmann::to_json; - to_json(j, proxy_atlas{x->name(), x->dimensions()}); + to_json(j, proxy_atlas{x->name(), x->num_tiles()}); } } void adl_serializer<shared_atlas>::from_json(const json& j, shared_atlas& x) { proxy_atlas proxy = j; - x = loader.tile_atlas(proxy.name, proxy.size); + x = loader.tile_atlas(proxy.name, proxy.num_tiles); } } // namespace nlohmann |