From ce144b644df6884660606906b2e0bd2d002a9c6c Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 4 Oct 2007 12:52:55 +0000 Subject: 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 --- crawl-ref/source/terrain.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/terrain.cc') 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( grid - DNGN_ALTAR_ZIN + 1 )); + if (grid >= DNGN_ALTAR_FIRST_GOD && grid <= DNGN_ALTAR_LAST_GOD) + return (static_cast( 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(DNGN_ALTAR_ZIN + god - 1); + return static_cast(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)); } -- cgit v1.2.3-54-g00ecf