blob: 83dfeed2b6724cc846603d404829aab99a266da3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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,
};
};
|