diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-29 00:54:15 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-29 00:54:15 +0000 |
commit | 86bae0c1a3a28bc81c0fb66576e63c0a965c292c (patch) | |
tree | 360f93338d3a9978c03842451c494765f221d471 /crawl-ref/source/terrain.cc | |
parent | 4df1ff7d51ee4c57b53af69e9f5e7db3ee72ab1a (diff) | |
download | crawl-ref-86bae0c1a3a28bc81c0fb66576e63c0a965c292c.tar.gz crawl-ref-86bae0c1a3a28bc81c0fb66576e63c0a965c292c.zip |
Prevent shafts from being created in corridors, at least until
around dungeon level 7.
Rename ROCK_STAIRS to ESCAPE_HATCH, as well as the corresponding
function, since I think that the escape hatches are such a cool
concept that we won't be going back, and the current coding name
is a bit confusing.
Clean up dungeon.cc. I'll probably have to add stuff into our
new conventions file as I've been making up a lot of new rules
in trying to make the code more readable. (Rules concerning
nested brackets, and function indentation, etc.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3927 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/terrain.cc')
-rw-r--r-- | crawl-ref/source/terrain.cc | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc index fbd031907a..cb008c08fd 100644 --- a/crawl-ref/source/terrain.cc +++ b/crawl-ref/source/terrain.cc @@ -54,16 +54,9 @@ bool grid_is_stone_stair(dungeon_feature_type grid) } } -bool grid_is_rock_stair(dungeon_feature_type grid) +bool grid_is_escape_hatch(dungeon_feature_type grid) { - switch (grid) - { - case DNGN_ROCK_STAIRS_UP: - case DNGN_ROCK_STAIRS_DOWN: - return (true); - default: - return (false); - } + return (grid == DNGN_ESCAPE_HATCH_UP || grid == DNGN_ESCAPE_HATCH_DOWN); } bool grid_sealable_portal(dungeon_feature_type grid) @@ -93,7 +86,7 @@ command_type grid_stair_direction(dungeon_feature_type grid) case DNGN_STONE_STAIRS_UP_I: case DNGN_STONE_STAIRS_UP_II: case DNGN_STONE_STAIRS_UP_III: - case DNGN_ROCK_STAIRS_UP: + case DNGN_ESCAPE_HATCH_UP: case DNGN_RETURN_FROM_ORCISH_MINES: case DNGN_RETURN_FROM_HIVE: case DNGN_RETURN_FROM_LAIR: @@ -122,7 +115,7 @@ command_type grid_stair_direction(dungeon_feature_type grid) case DNGN_STONE_STAIRS_DOWN_I: case DNGN_STONE_STAIRS_DOWN_II: case DNGN_STONE_STAIRS_DOWN_III: - case DNGN_ROCK_STAIRS_DOWN: + case DNGN_ESCAPE_HATCH_DOWN: case DNGN_ENTER_DIS: case DNGN_ENTER_GEHENNA: case DNGN_ENTER_COCYTUS: @@ -193,7 +186,7 @@ bool grid_is_permarock(dungeon_feature_type grid) bool grid_is_trap(dungeon_feature_type grid) { return (grid == DNGN_TRAP_MECHANICAL || grid == DNGN_TRAP_MAGICAL - || grid == DNGN_TRAP_NATURAL); + || grid == DNGN_TRAP_NATURAL); } bool grid_is_water( dungeon_feature_type grid ) |