diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-03-13 04:34:08 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-03-13 10:43:28 +0100 |
commit | 1495978437e71a2461e7d35e00e16c8edc131d13 (patch) | |
tree | 2d6c1e283f1ea5337dfa8a8c279f55ef850bc888 /crawl-ref/source/map_knowledge.h | |
parent | b10dbcdf6daad946e426cdb08687ad89c004af5c (diff) | |
download | crawl-ref-1495978437e71a2461e7d35e00e16c8edc131d13.tar.gz crawl-ref-1495978437e71a2461e7d35e00e16c8edc131d13.zip |
Declare an explicit type for colours.
An imperial buttload of places assumes these to be 8 bits, which makes it
impossible to add support for 256 (or more!) colours. This commit tries
to allow expanding it in the future; sadly, it is badly incomplete. At
least, new code can use the new type.
Also, beware of "branded" colours which use bits above 8 for inverse,
underline, etc.
Diffstat (limited to 'crawl-ref/source/map_knowledge.h')
-rw-r--r-- | crawl-ref/source/map_knowledge.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/map_knowledge.h b/crawl-ref/source/map_knowledge.h index 79932d48a7..40091a527c 100644 --- a/crawl-ref/source/map_knowledge.h +++ b/crawl-ref/source/map_knowledge.h @@ -9,13 +9,13 @@ struct cloud_info cloud_info() : type(CLOUD_NONE), colour(0), duration(3), tile(0), pos(0, 0) { } - cloud_info(cloud_type t, uint8_t c, + cloud_info(cloud_type t, colour_t c, uint8_t dur, unsigned short til, coord_def gc) : type(t), colour(c), duration(dur), tile(til), pos(gc) { } cloud_type type:8; - uint8_t colour; + colour_t colour; uint8_t duration; // decay/20, clamped to 0-3 unsigned short tile; coord_def pos; @@ -280,7 +280,7 @@ private: #else dungeon_feature_type _feat:8; #endif - uint8_t _feat_colour; + colour_t _feat_colour; cloud_info* _cloud; item_info* _item; monster_info* _mons; |