diff options
-rw-r--r-- | crawl-ref/source/command.cc | 1 | ||||
-rw-r--r-- | crawl-ref/source/show.cc | 14 | ||||
-rw-r--r-- | crawl-ref/source/show.h | 3 | ||||
-rw-r--r-- | crawl-ref/source/showsymb.cc | 14 | ||||
-rw-r--r-- | crawl-ref/source/showsymb.h | 1 |
5 files changed, 16 insertions, 17 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index 7de4e0cd7e..3a34671f22 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -41,6 +41,7 @@ #include "player.h" #include "quiver.h" #include "religion.h" +#include "showsymb.h" #include "skills2.h" #include "species.h" #include "spl-book.h" diff --git a/crawl-ref/source/show.cc b/crawl-ref/source/show.cc index 0545cf1b6f..6a7ab95dbc 100644 --- a/crawl-ref/source/show.cc +++ b/crawl-ref/source/show.cc @@ -16,20 +16,6 @@ #include "terrain.h" #include "viewgeom.h" -void get_show_symbol(show_type object, unsigned *ch, - unsigned short *colour) -{ - if (object.cls < SH_MONSTER) - { - *ch = get_feature_def(object).symbol; - - // Don't clobber with BLACK, because the colour should be already set. - if (get_feature_def(object).colour != BLACK) - *colour = get_feature_def(object).colour; - } - *colour = real_colour(*colour); -} - show_type::show_type() : cls(SH_NOTHING), colour(0) { diff --git a/crawl-ref/source/show.h b/crawl-ref/source/show.h index 7ee086b520..f35c44c790 100644 --- a/crawl-ref/source/show.h +++ b/crawl-ref/source/show.h @@ -64,9 +64,6 @@ struct show_info monster_type mons; }; -// Replaces get_item_symbol. -void get_show_symbol(show_type object, unsigned *ch, unsigned short *colour); - class monsters; class show_def { diff --git a/crawl-ref/source/showsymb.cc b/crawl-ref/source/showsymb.cc index 08a534f759..c399bdbb48 100644 --- a/crawl-ref/source/showsymb.cc +++ b/crawl-ref/source/showsymb.cc @@ -163,6 +163,20 @@ unsigned get_symbol(show_type object, unsigned short *colour, return (ch); } +void get_show_symbol(show_type object, unsigned *ch, + unsigned short *colour) +{ + if (object.cls < SH_MONSTER) + { + *ch = get_feature_def(object).symbol; + + // Don't clobber with BLACK, because the colour should be already set. + if (get_feature_def(object).colour != BLACK) + *colour = get_feature_def(object).colour; + } + *colour = real_colour(*colour); +} + unsigned grid_character_at(const coord_def &c) { unsigned glych; diff --git a/crawl-ref/source/showsymb.h b/crawl-ref/source/showsymb.h index c5f47be763..2976ceccfe 100644 --- a/crawl-ref/source/showsymb.h +++ b/crawl-ref/source/showsymb.h @@ -19,6 +19,7 @@ void get_symbol(const coord_def& where, show_type object, unsigned *ch, unsigned short *colour, bool magic_mapped = false); +void get_show_symbol(show_type object, unsigned *ch, unsigned short *colour); #endif |