diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-27 14:51:20 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-27 14:51:20 +0000 |
commit | d6c49351eb754e742cc8e5b0e41c69bfffbab5c7 (patch) | |
tree | 45e7e680e716db14db9743f3ec2b8cfeea47aa0d /crawl-ref/source | |
parent | 51f94bd1a87b0ccbe347e8fbecbf52bc679e42c0 (diff) | |
download | crawl-ref-d6c49351eb754e742cc8e5b0e41c69bfffbab5c7.tar.gz crawl-ref-d6c49351eb754e742cc8e5b0e41c69bfffbab5c7.zip |
Made labyrinths bigger, removed padding around minivaults.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3114 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/defines.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/dungeon.cc | 62 |
2 files changed, 1 insertions, 63 deletions
diff --git a/crawl-ref/source/defines.h b/crawl-ref/source/defines.h index b5455f2df0..fccbcf37ba 100644 --- a/crawl-ref/source/defines.h +++ b/crawl-ref/source/defines.h @@ -89,7 +89,7 @@ // necessary, beyond hysterical raisins. const int MAPGEN_BORDER = 2; -const int LABYRINTH_BORDER = 12; +const int LABYRINTH_BORDER = 4; // Now some defines about the actual play area: // Note: these boundaries are exclusive for the zone the player can move/dig, diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 4bc1197a40..5bd7d2852d 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -6072,59 +6072,6 @@ static void init_minivault_placement(int vault, vault_placement &place) vault_main(vgrid, place, vault); } -static void labyrinth_dimension_adjust(int delta, int &ds, int &dw) -{ - if (delta > LABYRINTH_BORDER / 2) - delta = LABYRINTH_BORDER / 2; - - if (delta) - { - if (delta & 1) - ++delta; - - ds -= delta; - dw += delta * 2; - } -} - -static void safe_set_feature(const coord_def &c, dungeon_feature_type feat) -{ - if (in_bounds(c)) - grd(c) = feat; -} - -static void pad_region(const dgn_region ®, int pad_depth, - dungeon_feature_type feat) -{ - const coord_def pstart = reg.pos - pad_depth; - const coord_def pend = reg.pos + reg.size + pad_depth; - const coord_def end = reg.pos + reg.size - 1; - - for (int y = pstart.y; y < pend.y; ++y) - { - for (int x = 1; x <= pad_depth; ++x) - { - const coord_def c1(x + end.x, y); - safe_set_feature(c1, feat); - - const coord_def c2(reg.pos.x - x, y); - safe_set_feature(c2, feat); - } - } - - for (int x = end.x; x >= reg.pos.x; --x) - { - for (int y = 1; y <= pad_depth; ++y) - { - const coord_def c1(x, y + end.y); - safe_set_feature(c1, feat); - - const coord_def c2(x, reg.pos.y - y); - safe_set_feature(c2, feat); - } - } -} - static void change_walls_from_centre(const dgn_region ®ion, const coord_def ¢re, bool rectangular, @@ -6274,14 +6221,7 @@ static void labyrinth_level(int level_number) int vault = random_map_for_tag("minotaur", true, false); vault_placement place; if (vault != -1) - { init_minivault_placement(vault, place); - - int ex = place.size.x / 4, ey = place.size.y / 4; - - labyrinth_dimension_adjust(ex, lab.pos.x, lab.size.x); - labyrinth_dimension_adjust(ey, lab.pos.y, lab.size.y); - } coord_def end; labyrinth_build_maze(end, lab); @@ -6312,8 +6252,6 @@ static void labyrinth_level(int level_number) } place.pos = rplace.pos; place.size = rplace.size; - - pad_region(dgn_region(place.pos, place.size), 1, DNGN_FLOOR); } if (vault != -1) |