summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/state.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2010-12-02 14:40:57 +0100
committerAdam Borowski <kilobyte@angband.pl>2010-12-02 14:40:57 +0100
commitbf51478a1c49fbd4bb8806f02b5c162b6e1cebac (patch)
tree7a56addd67d0aab57442292ea539e498000edf12 /crawl-ref/source/state.cc
parentebfb02749fc10bd0ed8c358fcf06cd4dde1707c3 (diff)
parent9d8151a73bb9e8cce48d81e76480dc95b3226c2d (diff)
downloadcrawl-ref-bf51478a1c49fbd4bb8806f02b5c162b6e1cebac.tar.gz
crawl-ref-bf51478a1c49fbd4bb8806f02b5c162b6e1cebac.zip
Merge branch 'master' into unicode
Diffstat (limited to 'crawl-ref/source/state.cc')
-rw-r--r--crawl-ref/source/state.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/crawl-ref/source/state.cc b/crawl-ref/source/state.cc
index fd96846346..287c34adcc 100644
--- a/crawl-ref/source/state.cc
+++ b/crawl-ref/source/state.cc
@@ -553,6 +553,12 @@ bool game_state::game_is_sprint() const
return type == GAME_TYPE_SPRINT;
}
+bool game_state::game_is_zotdef() const
+{
+ ASSERT(type < NUM_GAME_TYPE);
+ return type == GAME_TYPE_ZOTDEF;
+}
+
bool game_state::game_is_hints() const
{
ASSERT(type < NUM_GAME_TYPE);
@@ -580,18 +586,23 @@ std::string game_state::game_type_name_for(game_type _type)
return "Arena";
case GAME_TYPE_SPRINT:
return "Sprint";
+ case GAME_TYPE_ZOTDEF:
+ return "Zot Defense";
}
}
std::string game_state::game_savedir_path() const
{
- return game_is_sprint()? "sprint/" : "";
+ return game_is_sprint()? "sprint/" :
+ game_is_zotdef()? "zotdef/" : "";
}
std::string game_state::game_type_qualifier() const
{
if (crawl_state.game_is_sprint())
return "-sprint";
+ if (crawl_state.game_is_zotdef())
+ return "-zotdef";
if (crawl_state.game_is_tutorial())
return "-tutorial";
if (crawl_state.game_is_hints())