summaryrefslogtreecommitdiffhomepage
path: root/serialize
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-02-07 23:38:31 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-02-08 08:43:49 +0100
commita6514d1a95d0f84f0935866215463ef6aed23e19 (patch)
tree639075646b1ea42a3cd4a76ae59af7dda0c4b14a /serialize
parent4575194adb4615deeca174044a872093c3664ad4 (diff)
loader: work toward removing duplicate atlas code
Diffstat (limited to 'serialize')
-rw-r--r--serialize/ground-atlas.cpp6
-rw-r--r--serialize/ground-atlas.hpp2
2 files changed, 3 insertions, 5 deletions
diff --git a/serialize/ground-atlas.cpp b/serialize/ground-atlas.cpp
index 71c53510..d5c04332 100644
--- a/serialize/ground-atlas.cpp
+++ b/serialize/ground-atlas.cpp
@@ -38,10 +38,8 @@ void adl_serializer<std::shared_ptr<ground_atlas>>::to_json(json& j, const std::
void adl_serializer<std::shared_ptr<ground_atlas>>::from_json(const json& j, std::shared_ptr<ground_atlas>& val)
{
- char buf[FILENAME_MAX];
- ground_def info = j;
- auto path = loader.make_atlas_path(buf, loader.GROUND_TILESET_PATH, info.name);
- val = std::make_shared<ground_atlas>(std::move(info), path, loader.texture(""_s, path));
+ ground_def def = j;
+ val = std::make_shared<ground_atlas>(std::move(def), loader.texture(loader.GROUND_TILESET_PATH, def.name));
}
} // namespace nlohmann
diff --git a/serialize/ground-atlas.hpp b/serialize/ground-atlas.hpp
index fc8acec5..a423ebbe 100644
--- a/serialize/ground-atlas.hpp
+++ b/serialize/ground-atlas.hpp
@@ -4,7 +4,7 @@
namespace floormat {
-struct ground_info;
+struct ground_cell;
} // namespace floormat