summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/viewmap.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-12-19 00:19:24 +0100
committerAdam Borowski <kilobyte@angband.pl>2013-12-19 00:19:24 +0100
commitf933c8c3d6a141c76ca5e05eda5f11b6d14722c3 (patch)
tree80d1922fbb3977ddfdc79678544a5a29f879f894 /crawl-ref/source/viewmap.cc
parent56402a27013be84ab7678cbfc1725d380fdaf04e (diff)
downloadcrawl-ref-f933c8c3d6a141c76ca5e05eda5f11b6d14722c3.tar.gz
crawl-ref-f933c8c3d6a141c76ca5e05eda5f11b6d14722c3.zip
Schedule DNGN_ENTER_PORTAL_VAULT for removal; other related fixes.
Diffstat (limited to 'crawl-ref/source/viewmap.cc')
-rw-r--r--crawl-ref/source/viewmap.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/crawl-ref/source/viewmap.cc b/crawl-ref/source/viewmap.cc
index bb8e0e760b..0cce8f082f 100644
--- a/crawl-ref/source/viewmap.cc
+++ b/crawl-ref/source/viewmap.cc
@@ -188,8 +188,10 @@ bool is_feature(ucs_t feature, const coord_def& where)
case DNGN_ENTER_HELL:
case DNGN_EXIT_HELL:
case DNGN_ENTER_LABYRINTH:
+#if TAG_MAJOR_VERSION == 34
case DNGN_ENTER_PORTAL_VAULT:
case DNGN_EXIT_PORTAL_VAULT:
+#endif
case DNGN_ENTER_SHOP:
case DNGN_ENTER_DIS:
case DNGN_ENTER_GEHENNA:
@@ -235,7 +237,9 @@ bool is_feature(ucs_t feature, const coord_def& where)
case DNGN_RETURN_FROM_SHOALS:
case DNGN_RETURN_FROM_SPIDER:
case DNGN_RETURN_FROM_FOREST:
+#if TAG_MAJOR_VERSION == 34
case DNGN_EXIT_PORTAL_VAULT:
+#endif
return true;
default:
return false;
@@ -288,20 +292,24 @@ bool is_feature(ucs_t feature, const coord_def& where)
}
}
-static bool _is_feature_fudged(ucs_t feature, const coord_def& where)
+static bool _is_feature_fudged(ucs_t feat, const coord_def& where)
{
if (!env.map_knowledge(where).known())
return false;
- if (is_feature(feature, where))
+ if (is_feature(feat, where))
return true;
- if (feature == '<')
+ if (feat == '<')
{
+ if (feat >= DNGN_EXIT_FIRST_PORTAL && feat <= DNGN_EXIT_LAST_PORTAL)
+ return true;
switch (grd(where))
{
case DNGN_EXIT_HELL:
+#if TAG_MAJOR_VERSION == 34
case DNGN_EXIT_PORTAL_VAULT:
+#endif
case DNGN_EXIT_ABYSS:
case DNGN_EXIT_PANDEMONIUM:
case DNGN_RETURN_FROM_DEPTHS:
@@ -311,8 +319,10 @@ static bool _is_feature_fudged(ucs_t feature, const coord_def& where)
return false;
}
}
- else if (feature == '>')
+ else if (feat == '>')
{
+ if (feat >= DNGN_ENTER_FIRST_PORTAL && feat <= DNGN_ENTER_LAST_PORTAL)
+ return true;
switch (grd(where))
{
case DNGN_ENTER_DIS: