From 6f10cd2574eeb8a1417eff84718edd309287ac0d Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Wed, 4 Nov 2009 10:04:17 +0100 Subject: Get rid of multiple-meaning "int object" in env.show. env.show is now a class show_def that stores tagged unions of type show_type. For the moment, there's also env.show_los for use in LOS determination, but that should become an array of boolean at some point. This breaks save compatibility. Tiles and console version build and appear to work fine, but this kind of change is likely to have some side-effects. --- crawl-ref/source/directn.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/directn.cc') diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index b80eeb3199..9a981ded71 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -46,6 +46,7 @@ #include "mon-util.h" #include "player.h" #include "shopping.h" +#include "show.h" #include "state.h" #include "stuff.h" #include "stash.h" @@ -689,10 +690,10 @@ void full_describe_view() std::string desc = ""; #ifndef USE_TILE const coord_def e = c - you.pos() + coord_def(9,9); - unsigned short col = env.show_col(e);; - int object = env.show(e); + show_type object = env.show(e); + unsigned short col = object.colour; unsigned ch; - get_item_symbol( object, &ch, &col ); + get_show_symbol(object, &ch, &col); const std::string colour_str = colour_to_str(col); desc = "(<" + colour_str + ">"; -- cgit v1.2.3-54-g00ecf