summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/terrain.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-04 12:52:55 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-04 12:52:55 +0000
commitce144b644df6884660606906b2e0bd2d002a9c6c (patch)
tree0c38eac8f5a02835a7a71ce827b99e33656d7e19 /crawl-ref/source/terrain.cc
parent1f97cbc369b32cf86dda02a148b29d8696e2906c (diff)
downloadcrawl-ref-ce144b644df6884660606906b2e0bd2d002a9c6c.tar.gz
crawl-ref-ce144b644df6884660606906b2e0bd2d002a9c6c.zip
Another cleanup of dungeon features. Adding general markers
for first branch/last branch and first altar/last altar that should hopefully make adding new ones easier. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2324 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/terrain.cc')
-rw-r--r--crawl-ref/source/terrain.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc
index 9423c44f8f..272768ba54 100644
--- a/crawl-ref/source/terrain.cc
+++ b/crawl-ref/source/terrain.cc
@@ -198,8 +198,8 @@ bool grid_destroys_items( dungeon_feature_type grid )
// returns 0 if grid is not an altar, else it returns the GOD_* type
god_type grid_altar_god( dungeon_feature_type grid )
{
- if (grid >= DNGN_ALTAR_ZIN && grid <= DNGN_ALTAR_BEOGH)
- return (static_cast<god_type>( grid - DNGN_ALTAR_ZIN + 1 ));
+ if (grid >= DNGN_ALTAR_FIRST_GOD && grid <= DNGN_ALTAR_LAST_GOD)
+ return (static_cast<god_type>( grid - DNGN_ALTAR_FIRST_GOD + 1 ));
return (GOD_NO_GOD);
}
@@ -211,12 +211,12 @@ dungeon_feature_type altar_for_god( god_type god )
if (god == GOD_NO_GOD || god >= NUM_GODS)
return (DNGN_FLOOR); // Yeah, lame. Tell me about it.
- return static_cast<dungeon_feature_type>(DNGN_ALTAR_ZIN + god - 1);
+ return static_cast<dungeon_feature_type>(DNGN_ALTAR_FIRST_GOD + god - 1);
}
bool grid_is_branch_stairs( dungeon_feature_type grid )
{
- return ((grid >= DNGN_ENTER_ORCISH_MINES && grid <= DNGN_ENTER_RESERVED_4)
+ return ((grid >= DNGN_ENTER_FIRST_BRANCH && grid <= DNGN_ENTER_LAST_BRANCH)
|| (grid >= DNGN_ENTER_DIS && grid <= DNGN_ENTER_TARTARUS));
}