diff options
Diffstat (limited to 'loader/ground-traits.hpp')
-rw-r--r-- | loader/ground-traits.hpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/loader/ground-traits.hpp b/loader/ground-traits.hpp new file mode 100644 index 00000000..56923cd0 --- /dev/null +++ b/loader/ground-traits.hpp @@ -0,0 +1,25 @@ +#pragma once +#include "atlas-loader-fwd.hpp" +#include <memory> + +namespace floormat { struct ground_cell; class ground_atlas; } + +namespace floormat::loader_detail { + +template<> struct atlas_loader_traits<ground_atlas> +{ + using Atlas = ground_atlas; + using Cell = ground_cell; // convertible to atlas and holding the atlas + using Self = atlas_loader_traits<ground_atlas>; + using Storage = atlas_storage<ground_atlas, Self>; + + static StringView loader_name(); + static const std::shared_ptr<Atlas>& atlas_of(const Cell& x); + static StringView name_of(const Cell& x); + static StringView name_of(const Atlas& x); + static void ensure_atlases_loaded(Storage& st); + static const Cell& make_invalid_atlas(Storage& st); + static std::shared_ptr<Atlas> make_atlas(StringView name, const Cell& c); +}; + +} // namespace floormat::loader_detail |