diff options
Diffstat (limited to 'serialize/world.hpp')
-rw-r--r-- | serialize/world.hpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/serialize/world.hpp b/serialize/world.hpp new file mode 100644 index 00000000..05c88b40 --- /dev/null +++ b/serialize/world.hpp @@ -0,0 +1,25 @@ +#pragma once +#include <nlohmann/json_fwd.hpp> + +namespace floormat { + +struct chunk_coords; +struct global_coords; + +} // namespace floormat + +namespace nlohmann { + +template<> +struct adl_serializer<floormat::chunk_coords> { + static void to_json(json& j, const floormat::chunk_coords& val); + static void from_json(const json& j, floormat::chunk_coords& val); +}; + +template<> +struct adl_serializer<floormat::global_coords> { + static void to_json(json& j, const floormat::global_coords& val); + static void from_json(const json& j, floormat::global_coords& val); +}; + +} // namespace nlohmann |