diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-04 10:04:17 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-04 16:50:18 +0100 |
commit | 6f10cd2574eeb8a1417eff84718edd309287ac0d (patch) | |
tree | 69a45fe0e35cb559a3285b08697c96c230fc0c0f /crawl-ref/source/tutorial.cc | |
parent | 9ad85435681ad82c7ef07d2083e40e525e2b0f55 (diff) | |
download | crawl-ref-6f10cd2574eeb8a1417eff84718edd309287ac0d.tar.gz crawl-ref-6f10cd2574eeb8a1417eff84718edd309287ac0d.zip |
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.
Diffstat (limited to 'crawl-ref/source/tutorial.cc')
-rw-r--r-- | crawl-ref/source/tutorial.cc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc index 1e037c9832..2965d15190 100644 --- a/crawl-ref/source/tutorial.cc +++ b/crawl-ref/source/tutorial.cc @@ -1669,7 +1669,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc) const coord_def e = gc - you.pos() + coord_def(9,9); unsigned ch; unsigned short colour; - int object; + show_type object; #endif Options.tut_just_triggered = true; @@ -1716,7 +1716,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc) #ifndef USE_TILE text << "('<w>"; - get_item_symbol(DNGN_ITEM_BOOK, &ch, &colour); + get_show_symbol(show_type(SHOW_ITEM_BOOK), &ch, &colour); text << static_cast<char>(ch) << "'</w>) " << "that you can read by typing <w>r</w>. " @@ -1971,7 +1971,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc) #ifndef USE_TILE ", both of which are represented by '<w>"; - get_item_symbol(DNGN_ITEM_STAVE, &ch, &colour); + get_show_symbol(show_type(SHOW_ITEM_STAVE), &ch, &colour); text << static_cast<char>(ch) << "</w>'" #endif @@ -2021,8 +2021,8 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc) DELAY_EVENT; object = env.show(e); - colour = env.show_col(e); - { unsigned short dummy; get_item_symbol( object, &ch, &dummy ); } + colour = object.colour; + { unsigned short dummy; get_show_symbol( object, &ch, &dummy ); } text << _colourize_glyph(colour, ch) << " "; #else @@ -2052,8 +2052,8 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc) text << "These "; #ifndef USE_TILE object = env.show(e); - colour = env.show_col(e); - get_item_symbol( object, &ch, &colour ); + colour = object.colour; + get_show_symbol( object, &ch, &colour ); text << _colourize_glyph(colour, ch); text << " "; @@ -2081,8 +2081,8 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc) // FIXME: Branch entrance character is not being colored yellow. object = env.show(e); - colour = env.show_col(e); - { unsigned short dummy; get_item_symbol( object, &ch, &dummy ); } + colour = object.colour; + { unsigned short dummy; get_show_symbol( object, &ch, &dummy ); } text << _colourize_glyph(colour, ch) << " "; #else @@ -2119,8 +2119,8 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc) DELAY_EVENT; object = env.show(e); - colour = env.show_col(e); - { unsigned short dummy; get_item_symbol( object, &ch, &dummy ); } + colour = object.colour; + { unsigned short dummy; get_show_symbol( object, &ch, &dummy ); } text << _colourize_glyph(colour, ch) << " "; #else @@ -2192,8 +2192,8 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc) "of these nasty constructions"; #ifndef USE_TILE object = env.show(e); - colour = env.show_col(e); - get_item_symbol( object, &ch, &colour ); + colour = object.colour; + get_show_symbol( object, &ch, &colour ); if (ch == ' ' || colour == BLACK) colour = LIGHTCYAN; @@ -2209,8 +2209,8 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc) text << "That "; #ifndef USE_TILE object = env.show(e); - colour = env.show_col(e); - get_item_symbol( object, &ch, &colour ); + colour = object.colour; + get_show_symbol( object, &ch, &colour ); text << _colourize_glyph(colour, ch) << " "; #else { |