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/ghost.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/ghost.h')
-rw-r--r-- | crawl-ref/source/ghost.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/ghost.h b/crawl-ref/source/ghost.h index 4559531f2d..e447d1be86 100644 --- a/crawl-ref/source/ghost.h +++ b/crawl-ref/source/ghost.h @@ -12,10 +12,10 @@ #include "mon_resist_def.h" #ifdef USE_TILE -int tile_offset_for_labrat_colour(uint8_t l_colour); +int tile_offset_for_labrat_colour(colour_t l_colour); #endif -std::string adjective_for_labrat_colour(uint8_t l_colour); -uint8_t colour_for_labrat_adjective(std::string adjective); +std::string adjective_for_labrat_colour(colour_t l_colour); +colour_t colour_for_labrat_adjective(std::string adjective); class ghost_demon { @@ -37,7 +37,7 @@ public: mon_resist_def resists; bool spellcaster, cycle_colours; - uint8_t colour; + colour_t colour; flight_type fly; monster_spells spells; @@ -49,9 +49,9 @@ public: void init_random_demon(); void init_player_ghost(); void init_ugly_thing(bool very_ugly, bool only_mutate = false, - uint8_t force_colour = BLACK); + colour_t force_colour = BLACK); void init_dancing_weapon(const item_def& weapon, int power); - void init_labrat (uint8_t force_colour = BLACK); + void init_labrat (colour_t force_colour = BLACK); void ugly_thing_to_very_ugly_thing(); public: |