From d8289105193707daede1a5b59137f18e20f20aeb Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Fri, 18 Oct 2024 15:48:14 +0200 Subject: (2/2) rename --- TileColorFactory.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 TileColorFactory.h (limited to 'TileColorFactory.h') 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 +#include + +#include "Color.h" + +class TileColorFactory { + typedef std::map 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, + }; +}; + -- cgit v1.2.3