summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dgn-proclayouts.cc
diff options
context:
space:
mode:
authorBrendan Hickey <brendan@bhickey.net>2013-03-06 21:47:48 -0800
committerBrendan Hickey <brendan@bhickey.net>2013-03-06 21:54:04 -0800
commitfcb5f5b6f9d0e29ae225dfe47891a0398a4b6841 (patch)
tree4eddbb4cbc24ac1f94a093e09cae0c917c548c2f /crawl-ref/source/dgn-proclayouts.cc
parent93ae126363006002ee2514d725812f88cb59f789 (diff)
downloadcrawl-ref-fcb5f5b6f9d0e29ae225dfe47891a0398a4b6841.tar.gz
crawl-ref-fcb5f5b6f9d0e29ae225dfe47891a0398a4b6841.zip
Clamp Layout Tweak
Modify clamp layout so that the turn on which a square might change is not predictable.
Diffstat (limited to 'crawl-ref/source/dgn-proclayouts.cc')
-rw-r--r--crawl-ref/source/dgn-proclayouts.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/dgn-proclayouts.cc b/crawl-ref/source/dgn-proclayouts.cc
index 02d877ca46..39b52b9a36 100644
--- a/crawl-ref/source/dgn-proclayouts.cc
+++ b/crawl-ref/source/dgn-proclayouts.cc
@@ -277,10 +277,11 @@ LevelLayout::operator()(const coord_def &p, const uint32_t offset) const
ProceduralSample
ClampLayout::operator()(const coord_def &p, const uint32_t offset) const
{
- uint32_t order = hash3(p.x, p.y, 0xDEADBEEF);
+ uint32_t cycle = offset / clamp;
+ uint32_t order = hash3(p.x, p.y, 0xDEADBEEF + cycle);
if (bursty)
{
- order &= hash3(p.x + 31, p.y - 37, 0x0DEFACED);
+ order &= hash3(p.x + 31, p.y - 37, 0x0DEFACED + cycle);
}
order %= clamp;
uint32_t clamp_offset = (offset + order) / clamp * clamp;