Sun, 19 Jan 2020 02:54:48 +0200
commit work on GL rendering
3 | 1 | #pragma once |
2 | #include "main.h" | |
3 | ||
4 | struct Color | |
5 | { | |
6 | qint32 index; | |
7 | }; | |
8 | ||
21 | 9 | inline bool operator==(const Color& one, const Color& other) |
10 | { | |
11 | return one.index == other.index; | |
12 | } | |
13 | ||
14 | inline bool operator!=(const Color& one, const Color& other) | |
15 | { | |
16 | return one.index != other.index; | |
17 | } | |
18 | ||
19 | inline bool operator<(const Color& one, const Color& other) | |
20 | { | |
21 | return one.index < other.index; | |
22 | } | |
23 | ||
24 | inline bool operator<=(const Color& one, const Color& other) | |
25 | { | |
26 | return one.index <= other.index; | |
27 | } | |
28 | ||
29 | inline bool operator>(const Color& one, const Color& other) | |
30 | { | |
31 | return one.index > other.index; | |
32 | } | |
33 | ||
34 | inline bool operator>=(const Color& one, const Color& other) | |
35 | { | |
36 | return one.index >= other.index; | |
37 | } | |
38 | ||
3 | 39 | namespace colors |
40 | { | |
41 | static constexpr Color black {0}; | |
42 | static constexpr Color blue {1}; | |
43 | static constexpr Color green {2}; | |
44 | static constexpr Color red {4}; | |
45 | static constexpr Color yellow {14}; | |
46 | static constexpr Color white {15}; | |
47 | static constexpr Color main {16}; | |
48 | static constexpr Color edge {24}; | |
49 | } |