summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tutorial.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-27 16:31:47 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-27 16:31:47 +0000
commit865149aa81d5ca891c4bba5c3c347194e1b6cd80 (patch)
tree56fa0da01dab0fe7e876be0165c9f56d5a2cd8d9 /crawl-ref/source/tutorial.cc
parentf3ea3473859e35a5d232c1a075af8af2646867a1 (diff)
downloadcrawl-ref-865149aa81d5ca891c4bba5c3c347194e1b6cd80.tar.gz
crawl-ref-865149aa81d5ca891c4bba5c3c347194e1b6cd80.zip
Oops, rings were getting doubled names, fixed.
The march towards ostringstream goes on. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1385 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tutorial.cc')
-rw-r--r--crawl-ref/source/tutorial.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index a9e4b2eb91..a616a53de1 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -799,7 +799,7 @@ static std::string colour_to_tag(int col, bool closed = false)
return tag;
}
-void tutorial_first_monster(monsters mon)
+void tutorial_first_monster(const monsters& mon)
{
if (!Options.tutorial_events[TUT_SEEN_MONSTER])
return;
@@ -849,7 +849,7 @@ void tutorial_first_monster(monsters mon)
Options.tut_just_triggered = 1;
}
-void tutorial_first_item(item_def item)
+void tutorial_first_item(const item_def& item)
{
if (!Options.tutorial_events[TUT_SEEN_FIRST_OBJECT] || Options.tut_just_triggered)
return;
@@ -873,7 +873,7 @@ void tutorial_first_item(item_def item)
}
// Here most of the tutorial messages for various triggers are handled.
-void learned_something_new(unsigned int seen_what, int x, int y)
+void learned_something_new(tutorial_event_type seen_what, int x, int y)
{
// already learned about that
if (!Options.tutorial_events[seen_what])
@@ -1279,10 +1279,11 @@ void learned_something_new(unsigned int seen_what, int x, int y)
case TUT_SEEN_MONSTER:
case TUT_SEEN_FIRST_OBJECT:
break;
- default:
- text += "You've found something new (but I don't know what)!";
+ case TUT_EVENTS_NUM:
+ text += "You've found something new (but I don't know what)!";
}
- if (seen_what != TUT_SEEN_MONSTER && seen_what != TUT_SEEN_FIRST_OBJECT)
+
+ if ( !text.empty() )
print_formatted_paragraph(text, get_tutorial_cols(), MSGCH_TUTORIAL);
Options.tut_just_triggered = true;