summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dgn-layouts.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove stuffNicholas Feinberg2014-07-291-0/+1
| | | | | | | .cc, moving its contents into the new stepdown.cc and strings.cc. (The latter also got many donations from libutil.h.) Down with stuff! Up the new flesh!
* Simplify by using coord_def::origin.Neil Moore2014-07-051-1/+1
|
* Reformat.Neil Moore2014-07-051-4/+1
| | | | | Mostly by joining short lines in places where that would let us remove braces.
* Revert "Make random_choose_weighted() end on -1 weight"reaverb2014-06-101-4/+4
| | | | | | | This reverts commit 7e81480cda18144ff185f5248639a072b654deff. Turns out I missed some calls to random_choose_weighted(), this change might not even be worth doing.
* Make random_choose_weighted() end on -1 weightreaverb2014-06-101-4/+4
| | | | For consistency with random_choose().
* Chance function(void) to function()reaverb2014-05-241-2/+2
|
* Remove some bizzare shaft generation code (minmay)reaverb2014-05-151-55/+0
|
* Formatting fixes (add braces).Neil Moore2014-05-121-0/+2
| | | | This fixes all the instances caught by unbrace.
* Drop double newlines where they seem to serve no purpose.Adam Borowski2013-12-211-1/+0
| | | | | Sometimes, they're there to emphasize a break between two sections of code, which is good. In a majority of cases, though, they're just inconsistent.
* Schedule DNGN_ENTER_PORTAL_VAULT for removal; other related fixes.Adam Borowski2013-12-191-1/+2
|
* Don't try to _make_trail from a boxed-in start location.Steve Melenchuk2013-11-211-2/+21
|
* Let _make_trail() fail if it painted itself into a corner.Adam Borowski2013-11-221-0/+4
|
* Drop a lot of superfluous parentheses.Adam Borowski2013-10-241-1/+1
| | | | | These can be really confusing, especially if there are operators of different priorities, or multiple levels of parentheses, nearby.
* More padding fixes for ternary operatorChris Oelmueller2013-08-031-1/+1
|
* Correct missing #include "foo.h" from foo.ccSamuel Bronson2013-04-061-0/+2
| | | | (Also had to fix a prototype in ctest.h)
* Make some functions static or gone.Adam Borowski2013-01-311-55/+0
|
* Don't let layout_chaotic_city mangle vaults.Steve Melenchuk2013-01-191-9/+14
| | | | | | | dgn_replace_area, called at the start of the process, wasn't getting passed an MMT_VAULT flag, so it would clear out rock walls from vaults if the vault was placed before the map generation process started (a key point in letting layouts be used with vaults).
* Force connectedness of layout_basic by connecting upstairs together.Steve Melenchuk2013-01-151-0/+16
| | | | | | | | | This doesn't appear to impact cases where layout_basic generates connected layouts, but it does ensure that it can never generate a disconnected layout. If a shaft area is being generated, it is also connected to the rest of the layout; thus, this change should fix #6534.
* Remove unnecessary includes from header files.Jay3.14152012-10-231-0/+1
| | | | | | | | | | For most header files, this only saves on having to recompile a small number of source files, but there are also a few headers where small changes would now take significantly less time. This is most obvious for the Tiles build for which the dependencies have been greatly reduced, so that the only additional includes when compared to console are strictly library or tile related.
* Don't let layout_bigger_room overwrite vaults.Steve Melenchuk2012-08-181-1/+4
| | | | Fixes #6086.
* Fix occasional crash when using layout_basic with primary vaults.Steve Melenchuk2012-08-151-8/+25
| | | | | It was assigning a trap to slot 0 without checking if it had been used already, causing a later find_trap() to fail.
* Allow levels with primary vaults to use all applicable layouts.Steve Melenchuk2012-08-151-39/+108
| | | | | This includes tweaks to layout_basic and layout_roguey to make them compatible with being placed after primary vaults.
* Drop parentheses around scalar values in "return".Adam Borowski2012-07-051-7/+7
|
* Merge branch 'master' into portal_branchesAdam Borowski2012-04-121-8/+12
|\
| * Use name not (int)enum for other layout extras as well.Adam Borowski2012-04-091-5/+6
| |
| * Don't let octa_room produce lava "floor" in Cocytus.Adam Borowski2012-04-091-1/+2
| |
| * Use name rather than (int)enum for rivers/lakes on &^EAdam Borowski2012-04-091-2/+4
| |
* | Cache absdepth0, now that it has to be calculated.Adam Borowski2012-01-031-2/+1
| | | | | | | | | | The cached value intentionally is stored in env.absdepth0 rather than you.absdepth0 to catch attempts to modify it.
* | Use branch depth rather than absolute depth as the authoritative one.Adam Borowski2012-01-031-3/+6
|/
* Remove no longer necessary casts after random_choose().Adam Borowski2011-10-311-6/+4
|
* Add minor cosmetic fixes.David Lawrence Ramsey2011-08-011-3/+3
|
* cppcheck: reduce scope of some variables.Adam Borowski2011-07-051-7/+5
| | | | This can improve readability somewhat, and can speed up debug builds.
* Remove some irrelevant comments.Vsevolod Kozlov2011-06-261-10/+0
|
* Let _octa_room overwrite any wall, not just rock.Vsevolod Kozlov2011-06-261-1/+1
| | | | | This should make the 'market square' of chaotic_city somewhat better-looking when the place it's created at has non-rock rooms.
* Make chaotic_city a little more chaotic.Vsevolod Kozlov2011-06-251-4/+7
| | | | | It used to have a bias in the room placement that made it always leave the same parts of the map almost empty. Doesn't fit its name.
* Fix up some coordinate offsets to account for how count_features_in_box works.Vsevolod Kozlov2011-06-251-3/+3
| | | | | This might be wrong, but it's hard to tell since the effect is not always obvious.
* Rename plan_4 to chaotic_city, other layout functions to dgn_build_*_level.Vsevolod Kozlov2011-06-251-5/+5
|
* Split builder_basic, plan_4, _build_rooms and bigger_room into dgn-layouts.cc.Vsevolod Kozlov2011-06-251-0/+1170
This involves exposure of join_the_dots and count_feature_in_box as pubilic functions in dungeon.h. The rationale is that dungeon.cc is long and that it needs to be split up, and also that these layout builders share common helper functions.