summaryrefslogtreecommitdiffhomepage
path: root/serialize/tile.hpp
blob: 1d629fe69d31ce1c6964cdf6762faf5903609155 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include <nlohmann/json_fwd.hpp>

namespace floormat {

struct tile_image;
struct local_coords;
struct chunk_coords;
struct global_coords;

} // namespace floormat

namespace nlohmann {

template<>
struct adl_serializer<floormat::tile_image> {
    static void to_json(json& j, const floormat::tile_image& val);
    static void from_json(const json& j, floormat::tile_image& val);
};

template<>
struct adl_serializer<floormat::local_coords> {
    static void to_json(json& j, const floormat::local_coords& val);
    static void from_json(const json& j, floormat::local_coords& val);
};

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