diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2022-09-30 18:48:50 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-09-30 18:50:32 +0200 |
| commit | 5c9863cf0998b5f1b6107ce09b54cd3e8b484221 (patch) | |
| tree | 7ca268c80a0ec7ac0c1b815d984cf11309b96840 /tile/serialize.hpp | |
| parent | d3a29055d8b1dce89c77af0988ea840e949d2450 (diff) | |
.
Diffstat (limited to 'tile/serialize.hpp')
| -rw-r--r-- | tile/serialize.hpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tile/serialize.hpp b/tile/serialize.hpp new file mode 100644 index 00000000..c28aa934 --- /dev/null +++ b/tile/serialize.hpp @@ -0,0 +1,23 @@ +#include <string> +#include <vector> +#include <tuple> +#include <unordered_map> +#include <Magnum/Magnum.h> +#include <Magnum/Math/Vector2.h> + +namespace std::filesystem { class path; } + +struct big_atlas_tile final { + Magnum::Vector2i position; +}; + +struct big_atlas_entry final { + std::vector<big_atlas_tile> tiles; +}; + +struct big_atlas final { + static std::tuple<big_atlas, bool> from_json(const std::filesystem::path& pathname) noexcept; + [[nodiscard]] bool to_json(const std::filesystem::path& pathname) noexcept; + + std::unordered_map<std::string, big_atlas_entry> entries; +}; |
