summaryrefslogtreecommitdiffhomepage
path: root/loader/wall-traits.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'loader/wall-traits.hpp')
-rw-r--r--loader/wall-traits.hpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/loader/wall-traits.hpp b/loader/wall-traits.hpp
new file mode 100644
index 00000000..fb5cc2a0
--- /dev/null
+++ b/loader/wall-traits.hpp
@@ -0,0 +1,26 @@
+#pragma once
+#include "atlas-loader-fwd.hpp"
+#include <memory>
+
+namespace floormat { struct wall_cell; class wall_atlas; }
+
+namespace floormat::loader_detail {
+
+template<> struct atlas_loader_traits<wall_atlas>
+{
+ using Atlas = wall_atlas;
+ using Cell = wall_cell; // convertible to atlas and holding the atlas
+ using Self = atlas_loader_traits<wall_atlas>;
+ using Storage = atlas_storage<wall_atlas, Self>;
+
+ static StringView loader_name();
+ static const std::shared_ptr<Atlas>& atlas_of(const Cell& x);
+ static std::shared_ptr<Atlas>& atlas_of(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