aboutsummaryrefslogtreecommitdiff
path: root/TileColorFactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'TileColorFactory.h')
-rw-r--r--TileColorFactory.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/TileColorFactory.h b/TileColorFactory.h
new file mode 100644
index 0000000..83dfeed
--- /dev/null
+++ b/TileColorFactory.h
@@ -0,0 +1,27 @@
+#pragma once
+
+#include <map>
+#include <string>
+
+#include "Color.h"
+
+class TileColorFactory {
+ typedef std::map<std::string, Color> TileAppearanceCollection;
+
+public:
+ static Color get_color(std::string);
+ static void register_color(std::string, Color);
+
+private:
+ static TileAppearanceCollection & get_collection() {
+ static TileAppearanceCollection c = {};
+ return c;
+ }
+
+ static constexpr Color default_color = {
+ .red = 0xff,
+ .green = 0xff,
+ .blue = 0xff,
+ };
+};
+