summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tutorial.cc
diff options
context:
space:
mode:
authorJohanna Ploog <j-p-e-g@users.sourceforge.net>2011-01-10 17:03:07 +0100
committerJohanna Ploog <j-p-e-g@users.sourceforge.net>2011-01-10 17:07:02 +0100
commitf91f7809da97e5021319b544f9cd79803d4f9278 (patch)
tree5a3b7fb6b4bba4637a1ba5edac502136ecb7704d /crawl-ref/source/tutorial.cc
parent15d977d7adc860f06a143863c47c0089c207561a (diff)
downloadcrawl-ref-f91f7809da97e5021319b544f9cd79803d4f9278.tar.gz
crawl-ref-f91f7809da97e5021319b544f9cd79803d4f9278.zip
Add code basis for adding different tutorial maps.
Currently unused as we only have a single map, but I've tested it with a set of dummy maps, and it works. This changes some of the sprint specific methods to more generic game mode methods that'll also be usable for ZotDef.
Diffstat (limited to 'crawl-ref/source/tutorial.cc')
-rw-r--r--crawl-ref/source/tutorial.cc37
1 files changed, 37 insertions, 0 deletions
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
new file mode 100644
index 0000000000..989dd1b22a
--- /dev/null
+++ b/crawl-ref/source/tutorial.cc
@@ -0,0 +1,37 @@
+/*
+ * File: tutorial.cc
+ * Summary: Collection of tutorial related functions.
+ */
+
+#include "AppHdr.h"
+
+#include "externs.h"
+#include "maps.h"
+#include "mon-util.h"
+#include "mpr.h"
+#include "ng-setup.h"
+#include "player.h"
+#include "random.h"
+#include "tutorial.h"
+
+mapref_vector get_tutorial_maps()
+{
+ return find_maps_for_tag("tutorial_start");
+}
+
+// We could save this in crawl_state instead.
+// Or choose_game() could save *ng to crawl_state
+// entirely, though that'd be redundant with
+// you.your_name, you.species, crawl_state.type, ...
+
+static std::string _tutorial_map;
+
+std::string get_tutorial_map()
+{
+ return _tutorial_map;
+}
+
+void set_tutorial_map(const std::string& map)
+{
+ _tutorial_map = map;
+}