summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tutorial.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-15 22:10:59 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-15 23:11:42 +0100
commitf5b0269efde99613163d99346035b53a82661ceb (patch)
treedbad60ddd46b386acaf163f188e69c6809c20ae1 /crawl-ref/source/tutorial.cc
parentfe2ab0f017464ff07a3d62e994861ea17260b260 (diff)
downloadcrawl-ref-f5b0269efde99613163d99346035b53a82661ceb.tar.gz
crawl-ref-f5b0269efde99613163d99346035b53a82661ceb.zip
Replace get_show_symbol by get_show_glyph.
Diffstat (limited to 'crawl-ref/source/tutorial.cc')
-rw-r--r--crawl-ref/source/tutorial.cc42
1 files changed, 9 insertions, 33 deletions
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index e48dda9337..4386c0a663 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -1688,9 +1688,6 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
#ifndef USE_TILE
const coord_def e = gc - you.pos() + coord_def(9,9);
- unsigned ch;
- unsigned short colour;
- show_type object;
#endif
Options.tut_just_triggered = true;
@@ -2037,11 +2034,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
if (monster_at(gc))
DELAY_EVENT;
- object = env.show(e);
- colour = object.colour;
- { unsigned short dummy; get_show_symbol( object, &ch, &dummy ); }
-
- text << _colourize_glyph(colour, ch) << " ";
+ text << _colourize_glyph(get_show_glyph(env.show(e))) << " ";
#else
tiles.place_cursor(CURSOR_TUTORIAL, gc);
tiles.add_text_tag(TAG_TUTORIAL, "Stairs", gc);
@@ -2068,11 +2061,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
text << "These ";
#ifndef USE_TILE
- object = env.show(e);
- colour = object.colour;
- get_show_symbol( object, &ch, &colour );
-
- text << _colourize_glyph(colour, ch);
+ text << _colourize_glyph(get_show_glyph(env.show(e)));
text << " ";
#else
tiles.place_cursor(CURSOR_TUTORIAL, gc);
@@ -2097,11 +2086,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
DELAY_EVENT;
// FIXME: Branch entrance character is not being colored yellow.
- object = env.show(e);
- colour = object.colour;
- { unsigned short dummy; get_show_symbol( object, &ch, &dummy ); }
-
- text << _colourize_glyph(colour, ch) << " ";
+ text << _colourize_glyph(get_show_glyph(env.show(e))) << " ";
#else
tiles.place_cursor(CURSOR_TUTORIAL, gc);
tiles.add_text_tag(TAG_TUTORIAL, "Branch stairs", gc);
@@ -2135,11 +2120,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
if (monster_at(gc))
DELAY_EVENT;
- object = env.show(e);
- colour = object.colour;
- { unsigned short dummy; get_show_symbol( object, &ch, &dummy ); }
-
- text << _colourize_glyph(colour, ch) << " ";
+ text << _colourize_glyph(get_show_glyph(env.show(e))) << " ";
#else
tiles.place_cursor(CURSOR_TUTORIAL, gc);
tiles.add_text_tag(TAG_TUTORIAL, "Portal", gc);
@@ -2208,14 +2189,12 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
text << "An unwary adventurer will occasionally stumble into one "
"of these nasty constructions";
#ifndef USE_TILE
- object = env.show(e);
- colour = object.colour;
- get_show_symbol( object, &ch, &colour );
+ glyph g = get_show_glyph(env.show(e));
- if (ch == ' ' || colour == BLACK)
- colour = LIGHTCYAN;
+ if (g.ch == ' ' || g.col == BLACK)
+ g.col = LIGHTCYAN;
- text << " depicted by " << _colourize_glyph(colour, '^');
+ text << " depicted by " << _colourize_glyph(g.col, '^');
#endif
text << ". They can do physical damage (with darts or needles, for "
"example) or have other, more magical effects, like "
@@ -2225,10 +2204,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
case TUT_SEEN_ALTAR:
text << "That ";
#ifndef USE_TILE
- object = env.show(e);
- colour = object.colour;
- get_show_symbol( object, &ch, &colour );
- text << _colourize_glyph(colour, ch) << " ";
+ text << _colourize_glyph(get_show_glyph(env.show(e))) << " ";
#else
{
tiles.place_cursor(CURSOR_TUTORIAL, gc);