summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-26 05:03:44 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-26 05:03:44 +0000
commite1ae3e2330c4ce474ae13adff5ffbb5ad073cab5 (patch)
tree0db89ca2fa753bca394697785811858e4c91f01f /crawl-ref
parent07fef52005fab4d726aa04b7ca637deacbc365bd (diff)
downloadcrawl-ref-e1ae3e2330c4ce474ae13adff5ffbb5ad073cab5.tar.gz
crawl-ref-e1ae3e2330c4ce474ae13adff5ffbb5ad073cab5.zip
Since DNGN_WATER_STUCK appears to only be used as a placeholder when
generating the Shoals, rename it DNGN_WATER_RESERVED, and make grid_is_water() take it into account just in case. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8767 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/dungeon.cc10
-rw-r--r--crawl-ref/source/enum.h2
-rw-r--r--crawl-ref/source/terrain.cc4
3 files changed, 9 insertions, 7 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 6eb255ee36..bb2bff14fc 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -2015,9 +2015,9 @@ static void _prepare_shoals(int level_number)
// LAVA is a placeholder for cells which will become shallow water
// at the end of the current iteration.
- // WATER_STUCK is a placeholder for last iteration's generated water.
+ // WATER_RESERVED is a placeholder for last iteration's generated water.
_replace_in_grid(margin, margin, GXM-margin, GYM-margin,
- DNGN_SHALLOW_WATER, DNGN_WATER_STUCK);
+ DNGN_SHALLOW_WATER, DNGN_WATER_RESERVED);
for (int iteration = 0; iteration < 6; ++iteration)
{
@@ -2025,16 +2025,16 @@ static void _prepare_shoals(int level_number)
for (int y = margin; y < GYM - margin; ++y)
if (grd[x][y] == DNGN_DEEP_WATER)
{
- int badness = count_neighbours(x, y, DNGN_WATER_STUCK);
+ int badness = count_neighbours(x, y, DNGN_WATER_RESERVED);
if (random2(badness) >= 2 && coinflip())
grd[x][y] = DNGN_LAVA;
}
_replace_in_grid(margin, margin, GXM-margin, GYM-margin,
- DNGN_LAVA, DNGN_WATER_STUCK);
+ DNGN_LAVA, DNGN_WATER_RESERVED);
}
_replace_in_grid(margin, margin, GXM-margin, GYM-margin,
- DNGN_WATER_STUCK, DNGN_SHALLOW_WATER);
+ DNGN_WATER_RESERVED, DNGN_SHALLOW_WATER);
// Put important things back.
_restore_critical_features(lfl);
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index c1b90f8751..706bf3e247 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -982,7 +982,7 @@ enum dungeon_feature_type
DNGN_DEEP_WATER, // 62
DNGN_SHALLOW_WATER = 65, // 65
- DNGN_WATER_STUCK,
+ DNGN_WATER_RESERVED,
// Lowest grid value that an item can be placed on.
DNGN_MINITEM = DNGN_SHALLOW_WATER,
diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc
index 4e8f3355a8..d5d7486a9c 100644
--- a/crawl-ref/source/terrain.cc
+++ b/crawl-ref/source/terrain.cc
@@ -208,7 +208,9 @@ bool grid_is_trap(dungeon_feature_type grid, bool undiscovered_too)
bool grid_is_water(dungeon_feature_type grid)
{
- return (grid == DNGN_SHALLOW_WATER || grid == DNGN_DEEP_WATER);
+ return (grid == DNGN_SHALLOW_WATER
+ || grid == DNGN_DEEP_WATER
+ || grid == DNGN_WATER_RESERVED);
}
bool grid_is_watery(dungeon_feature_type grid)