summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tiles.h
diff options
context:
space:
mode:
authorPekka Lampila <pekka.lampila@iki.fi>2013-12-13 19:58:35 +0200
committerPekka Lampila <pekka.lampila@iki.fi>2014-02-17 04:44:29 +0200
commit6d263bff17afaba6edb675d117ab4fcbfbec40af (patch)
tree2ca4cf5cd625310b02865321f3ed8ab443757f6e /crawl-ref/source/tiles.h
parentdfe176c6f7673884184b20c91bdd23e45a609688 (diff)
downloadcrawl-ref-6d263bff17afaba6edb675d117ab4fcbfbec40af.tar.gz
crawl-ref-6d263bff17afaba6edb675d117ab4fcbfbec40af.zip
Allow minimap colour options to be set with hex codes and used in WebTiles.
This changes the default WebTiles minimap colours to match local tiles. To get the previous default values use: tile_floor_col = #a9a9a9 tile_door_col = #a52a2a tile_item_col = #008000 tile_friendly_col = #ee9090 tile_peaceful_col = #ee9090 tile_plant_col = #006400 tile_upstairs_col = #0000ff tile_downstairs_col = #ff00ff tile_excl_centre_col = #00008b tile_excluded_col = #008b8b
Diffstat (limited to 'crawl-ref/source/tiles.h')
-rw-r--r--crawl-ref/source/tiles.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/crawl-ref/source/tiles.h b/crawl-ref/source/tiles.h
index f0b4a3cc37..41eed9c885 100644
--- a/crawl-ref/source/tiles.h
+++ b/crawl-ref/source/tiles.h
@@ -19,6 +19,34 @@ enum TextureID
TEX_MAX
};
+struct VColour
+{
+ VColour() {}
+ VColour(unsigned char _r, unsigned char _g, unsigned char _b,
+ unsigned char _a = 255) : r(_r), g(_g), b(_b), a(_a) {}
+ VColour(const VColour &vc) : r(vc.r), g(vc.g), b(vc.b), a(vc.a) {}
+
+ inline void set(const VColour &in)
+ {
+ r = in.r;
+ g = in.g;
+ b = in.b;
+ a = in.a;
+ }
+
+ bool operator==(const VColour &vc) const;
+ bool operator!=(const VColour &vc) const;
+
+ unsigned char r;
+ unsigned char g;
+ unsigned char b;
+ unsigned char a;
+
+ static VColour white;
+ static VColour black;
+ static VColour transparent;
+};
+
struct tile_def
{
tile_def(tileidx_t _tile, TextureID _tex, int _ymax = TILE_Y)