diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-14 20:26:05 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-14 20:26:05 +0000 |
commit | 26f8d2de7b69e5cc901b293f76dd0ded073ad1b7 (patch) | |
tree | 87209d39e974b90f25cc2da991c7156cf91c8720 /crawl-ref/source/stuff.cc | |
parent | 258300c2d7b30f3ccdcd43b804b4ff9055dae917 (diff) | |
download | crawl-ref-26f8d2de7b69e5cc901b293f76dd0ded073ad1b7.tar.gz crawl-ref-26f8d2de7b69e5cc901b293f76dd0ded073ad1b7.zip |
Tweak Shoals algorithm to place the islands a bit more central and away from
the border (so they're not cut off anymore).
Also add a new feature type DNGN_OPEN_SEA that is an impassible feature only
intended for the Shoals border. Will need special handling for confusion, I
guess.
I've also tweaked the level generation, so Shoals vaults don't need to be
connected anymore (the algorithm just adds superfluous floor corridors), but
I still get loads of corridors on the bottom level - frustratingly enough
only inside the map border, and they (usually) don't even contain any stairs
or other features. It's maddening!
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10213 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/stuff.cc')
-rw-r--r-- | crawl-ref/source/stuff.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc index 6d3d0ec719..bb949801dd 100644 --- a/crawl-ref/source/stuff.cc +++ b/crawl-ref/source/stuff.cc @@ -143,8 +143,8 @@ rectangle_iterator::rectangle_iterator( int x_border_dist, int y_border_dist ) if (y_border_dist < 0) y_border_dist = x_border_dist; - topleft.set( x_border_dist, y_border_dist ); - bottomright.set( GXM - x_border_dist - 1, GYM - y_border_dist - 1 ); + topleft.set(x_border_dist, y_border_dist); + bottomright.set(GXM - x_border_dist - 1, GYM - y_border_dist - 1); current = topleft; } @@ -245,12 +245,12 @@ void radius_iterator::step_back() const int miny = std::max(Y_BOUND_1+1, center.y - radius); location.x--; - if ( location.x < minx ) + if (location.x < minx) { location.x = maxx; location.y--; - if ( location.y < miny ) - iter_done = true; // hmm + if (location.y < miny) + iter_done = true; } } |