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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
#ifndef UTILS_HPP
#define UTILS_HPP
#include <cstdint>
#include <array>
#include <QPixmap>
#include <QImage>
struct rgb_t
{
uint8_t r,g,b;
};
typedef std::array<uint8_t, 128 * 128> map_data_t;
const rgb_t MAP_COLORS[62] = {
{0, 0, 0},
{127, 178, 56},
{247, 233, 163},
{199, 199, 199},
{255, 0, 0},
{160, 160, 255},
{167, 167, 167},
{0, 124, 0},
{255, 255, 255},
{164, 168, 184},
{151, 109, 77},
{112, 112, 112},
{64, 64, 255},
{143, 119, 72},
{255, 252, 245},
{216, 127, 51},
{178, 76, 216},
{102, 153, 216},
{229, 229, 51},
{127, 204, 25},
{242, 127, 165},
{76, 76, 76},
{153, 153, 153},
{76, 127, 153},
{127, 63, 178},
{51, 76, 178},
{102, 76, 51},
{102, 127, 51},
{153, 51, 51},
{25, 25, 25},
{250, 238, 77},
{92, 219, 213},
{74, 128, 255},
{0, 217, 58},
{129, 86, 49},
{112, 2, 0},
{209, 177, 161},
{159, 82, 36},
{149, 87, 108},
{112, 108, 138},
{186, 133, 36},
{103, 117, 53},
{160, 77, 78},
{57, 41, 35},
{135, 107, 98},
{87, 92, 92},
{122, 73, 88},
{76, 62, 92},
{76, 50, 35},
{76, 82, 42},
{142, 60, 46},
{37, 22, 16},
{189, 48, 49},
{148, 63, 97},
{92, 25, 29},
{22, 126, 134},
{58, 142, 140},
{86, 44, 62},
{20, 180, 133},
{100, 100, 100},
{216, 175, 147},
{127, 167, 150}
};
class map_library;
struct map_group_t;
QPixmap pixmap_of_map_data(const map_data_t &map_data, double scaling = 1.);
QImage image_of_map_group(const map_library *library, const map_group_t &group, double scaling = 1.);
#endif
|