summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tutorial.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-15 21:19:26 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-15 23:11:41 +0100
commitddf80f7077a00bd04168c904b153fb1e657b9d38 (patch)
tree4b5d1b094e46b731f03b3665f4526bb6ed9c37dc /crawl-ref/source/tutorial.cc
parentc6c0a0f71e0d459b8438ff2e998fbedcb9c1c99a (diff)
downloadcrawl-ref-ddf80f7077a00bd04168c904b153fb1e657b9d38.tar.gz
crawl-ref-ddf80f7077a00bd04168c904b153fb1e657b9d38.zip
Convert get_item_glyph to return a glyph struct.
Also don't use get_symbol.
Diffstat (limited to 'crawl-ref/source/tutorial.cc')
-rw-r--r--crawl-ref/source/tutorial.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index f54ff9337b..6bf0ed1231 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -1206,6 +1206,11 @@ static std::string _colourize_glyph(int col, unsigned glyph)
text << "</" << colour_str << ">";
return text.str();
}
+
+static std::string _colourize_glyph(glyph g)
+{
+ return (_colourize_glyph(g.col, g.ch));
+}
#endif
static bool _mons_is_highlighted(const monsters *mons)
@@ -1444,11 +1449,7 @@ void tutorial_first_item(const item_def &item)
std::string text = "That ";
#ifndef USE_TILE
- unsigned ch;
- unsigned short col;
- get_item_glyph(&item, &ch, &col);
-
- text += _colourize_glyph(col, ch);
+ text += _colourize_glyph(get_item_glyph(&item));
text += " ";
#else
const coord_def gc = item.pos;
@@ -1906,10 +1907,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
{
text << "That ";
#ifndef USE_TILE
- unsigned short col;
- get_item_glyph(&mitm[i], &ch, &col);
-
- text << _colourize_glyph(col, ch);
+ text << _colourize_glyph(get_item_glyph(&mitm[i]));
text << " ";
#else
tiles.place_cursor(CURSOR_TUTORIAL, gc);