]> git.localhorst.tv Git - blank.git/blobdiff - src/app/TextureIndex.hpp
collect and load textures required by block types
[blank.git] / src / app / TextureIndex.hpp
diff --git a/src/app/TextureIndex.hpp b/src/app/TextureIndex.hpp
new file mode 100644 (file)
index 0000000..8c6e22f
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef BLANK_APP_TEXTUREINDEX_HPP_
+#define BLANK_APP_TEXTUREINDEX_HPP_
+
+#include <map>
+#include <string>
+
+
+namespace blank {
+
+class TextureIndex {
+
+       using MapType = std::map<std::string, int>;
+
+public:
+       TextureIndex();
+
+       int GetID(const std::string &);
+
+       std::size_t Size() const noexcept { return id_map.size(); }
+       const MapType &Entries() const noexcept { return id_map; }
+
+private:
+       MapType id_map;
+
+};
+
+};
+
+#endif