summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/maps.h
Commit message (Collapse)AuthorAgeFilesLines
* Clean up the mapstat function names and variablesgammafunk2014-06-241-1/+1
| | | | | | The command-line option is -mapstat, so the non-static functions use the prefix mapstat_ instead of mapgen_ now for consistency. The static functions and variables have had their mg_ prefixes removed.
* Use encompass vault portal places for otherwise-floating branch entries.Steve Melenchuk2014-03-121-0/+2
| | | | | This is intended to get ziggurat portals to place in nice locations if the level they're on happens to be an encompass vault.
* 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.
* Rework the "extra" tag for non-minivaults.Steve Melenchuk2013-11-291-4/+9
| | | | | | | | | | | | | Instead of mixing extra vaults in with primary vaults, a primary vault without the extra tag is placed first, and vaults with ORIENT: tags and the extra tag are placed last in a manner similar to how abyssal vaults are handled Handling of minivaults is unaffected. This is intended to prevent Depths from placing two huge scary primary vaults on one level, but it also has handling relevant for upcoming tweaks to areas of the dungeon currently dependent on tagged vaults.
* Fallback functionality for chance_ tag groups.Steve Melenchuk2013-10-281-0/+2
| | | | | | | | | | | | If the original vault picked to fulfill a chance_ tag fails to place, a vault tagged fallback_ with the same root (so fallback_hell_entry for chance_hell_entry) will be tried instead. This is intended to guarantee that important vaults (hell/pan/abyss portals) will get placed. Right now this isn't actually a guarantee per se, but the chances that a 1x1 vault fails to place somewhere seem to be negligible - if this needs to be expanded upon, perhaps we can add the suggested "guarantee" tag.
* Remove a header entry for a long-gone function.Steve Melenchuk2013-06-231-2/+0
| | | | This has been gone since 9e6e691 (two and a half years ago!).
* Make a few functions gone or static.Adam Borowski2012-10-311-1/+0
|
* 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.
* Use std namespace.Raphael Langella2012-08-261-16/+15
| | | | | | | | | | | | | I had to rename distance() (in coord.h) to distance2() because it conflicts with the STL function to compare 2 iterators. Not a bad change given how it returns the square of the distance anyway. I also had to rename the message global variable (in message.cc) to buffer. I tried to fix and improve the coding style has much as I could, but I probably missed a few given how huge and tedious it is. I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool and util/levcomp.*, because I have no clue about those.
* Make another bunch of functions static or gone.Adam Borowski2012-04-051-11/+0
|
* Use the common versioning scheme for map cache files.Adam Borowski2011-11-051-2/+0
| | | | | | They used their own, which was never incremented as no one remembers about it, and didn't follow changes to marshalling structures which might affect map files.
* Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-5/+4
| | | | | | | "File:" is shown in your editor's status bar. "Written by:" was used only for the first person who changed a file. We got git for that now, and pre-DCSS history is so woefully inaccurate it doesn't really matter.
* Fix Ziggurat save/load failure.Darshan Shaligram2011-01-101-1/+2
| | | | | | | | | | | | We used to call run_map_preludes after loading the game, in case maps wanted to change their depths, etc. based on character type. With the new Lua function marshalling, however, we rely on .des file global preludes being loaded before loading the save file (since any Lua functions referenced in a save file must be locatable by name when loading the save). The fix is to split run_map_preludes in two: run_map_global_preludes which runs .des file global preludes and is called before loading saves, and run_map_local_preludes which is called after game start.
* Fix doubles being passed to %d format strings in level compiler (Zaba).Darshan Shaligram2010-12-241-1/+1
|
* Allow maps to specify different CHANCE and WEIGHT for different depth ranges ↵Darshan Shaligram2010-12-241-1/+2
| | | | (Zaba).
* Add support for Lua hooks triggered during vault generation (dpeg)Darshan Shaligram2010-12-051-2/+2
| | | | | | | Fire hooks at various points during vault generation and allow Lua code in vaults to add functions to these hooks. Lua hooks are handy when creating vaults that want to place other vaults (for instance a vault that places ten copies of another small minivault).
* Remove rune_subst; bump save major version, map cache version; clean up ↵Vsevolod Kozlov2010-11-251-1/+1
| | | | | | | | | | | | after version bump. This is rather large, but rune_subst was in the saves, and I decided it was cleaner to bump the major version than the minor one. This updates enum.h. I apologize for the inconvenience. This might have broken something, but the previous changes to .des files should have taken care of that.
* Allow selecting Sprint maps by map desc where available (dpeg).Darshan Shaligram2010-07-041-4/+4
| | | | Needs work; the menu column size is probably too small for Sprint map names.
* Fix abyss dummy vaults not being applied correctly (st_).Darshan Shaligram2010-06-271-1/+2
|
* Redo CHANCE handling for vaults.Darshan Shaligram2010-06-241-0/+5
| | | | | CHANCE is now an (almost) absolute chance of a vault being placed on a given level in its DEPTH range. CHANCE applies only to vaults picked by depth.
* Make Crawl react better to seeing des files and database text files modified ↵Darshan Shaligram2010-06-141-0/+1
| | | | | | | | | | | | | | | | | | and recompiled by new Crawl processes while older processes are running. When mapdef.cc detects that a .dsc file is out of sync, it throws an exception that dungeon.cc catches. dungeon.cc then discards all loaded maps and reloads then from the map index (.idx) files. The old behaviour was to create a panic save and exit for out-of-sync .dsc files, which is not ideal since the panic save code is rarely used and tends to bitrot. When regenerating text database files in DGL installs, the game no longer unlinks the old .db file, and will instead update the old file with the new db keys. None of this code should be relevant to single-user installs.
* Free memory used for Lua chunks after compiling .des files. This ↵Darshan Shaligram2010-06-131-0/+1
| | | | considerably reduces heap use in the first Crawl process to run in a fresh install.
* Increment map cache version number (greensnark).Jude Brown2010-02-211-1/+1
| | | | | | Addition of epilogues to map and a change to the way map files are saved and loaded means that Stuff Was Not Right, as I forgot to increment the version number.
* Crawl now checks for the availability of branch ending vaults before ↵Darshan Shaligram2010-01-071-0/+1
| | | | starting up.
* Fix Shoals:$ sometimes producing huts with entrances facing each other, so ↵Darshan Shaligram2010-01-051-0/+4
| | | | that both huts are isolated from the rest of the level.
* Guarantee a small guard around the shoal rune.Darshan Shaligram2010-01-011-0/+12
|
* Unique placement-related function find_maps_for_tag.Jude Brown2009-12-061-0/+6
| | | | | | | | | | | Generates a vector of map_defs that have the relevant tag. Can check depth (defaults to false) as well as whether or not a vault has previously been placed (defaults to true). Convenience function weight_map_vector returns an integer corresponding to the total weight of all of the maps contained within the vector. These functions will be used to re-do unique placement as per dpeg's design (see c-r-d email).
* Temporary hack to make set_border_fill_type work.Jude Brown2009-12-061-1/+1
| | | | | | See the comment in l_dgn.cc:dgn_set_border_fill_type. Should be replaced with something that works on map_lines instead, but this will do for the meantime.
* Revert "Convert dgn.set_border_fill_type to BORDER."Jude Brown2009-11-301-1/+1
| | | | | | | This reverts commit 941444076c26e5e5149c6368a4261d60842fe3ec. After consultation with Enne, this doesn't really fix the issue, and is therefore superfluous.
* Convert dgn.set_border_fill_type to BORDER.Jude Brown2009-11-301-1/+1
| | | | | | | | | | The Lua prelude of maps isn't executed early enough now. Using 'BORDER' sets map->border_fill_type as soon as the map is read, rather than after it is placed. This commit increases the value of MAP_CACHE_VERSION. Can be reverted if it causes issues or is unwanted.
* Subvaults.Enne Walker2009-11-281-0/+2
| | | | | | | | Vaults can now include other vaults as a part of their definition. These subvaults are currently included by tag only and replace glyphs in their parent vault. See documentation for more details. Vault:8 has been modified to use subvaults.
* Remove further header-header includes.Robert Vollmert2009-11-271-3/+5
|
* Flatten header dependencies a bit.Robert Vollmert2009-11-171-1/+0
| | | | | | This removes a couple of unnecessary includes from header files. I may have missed adding some tiles includes.
* Rename fixary.h and fixvec.h.Robert Vollmert2009-11-151-1/+1
|
* Split dgn_lib out of luadgn.cc; rename luadgn to dlua.Robert Vollmert2009-10-191-0/+1
|
* Lua map improvements.Enne Walker2009-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | The previous dungeon layout.des functions all apply directly to the grid and so are unsuitable for use in vaults. This aims to correct that by providing lua functions that can manipulate maps (of glyphs). grd[x][y] in a .des file can now be used to get and set glyphs in the current map. This should allow for less cumbersome map variations than what you can do with just SUBST and SHUFFLE. To support that, map_def no longer batches up transforms--it applies them all immediately. This resulted in a good bit of refactoring. FTILE/RTILE map commands now support setting the tile for multiple features at once. There are also a small number of new lua functions that apply to maps (map_octa_room, map_smear, and map_extend). Ideally, these will eventually replace the existing builder funcs that work on grd.
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* Move 'FixAry.h' -> 'fixary.h', 'FixVec.h' -> 'fixvec.h' for file naming ↵Steven Noonan2009-09-291-1/+1
| | | | | | consistency Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Fix Shoal:5 not being generated.dshaligram2009-08-221-1/+1
| | | | | | | | | | | | Reinstate the distinction between minivaults and regular vaults when placing maps based on PLACE:, because minivaults cannot be placed before the rest of the level is built. Change Shoal huts to be picked by tag instead of PLACE. Allow DEPTH: to use branch:$. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10591 c06c8d41-db1a-0410-9941-cceddc491573
* Fix bug that prevented the random placement of minivaults (syllogism)dshaligram2009-07-141-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10211 c06c8d41-db1a-0410-9941-cceddc491573
* [2468791] Reduce distinction between minivaults and floating vaults. All ↵dshaligram2009-01-031-7/+5
| | | | | | vaults are now handled by _build_vaults. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8169 c06c8d41-db1a-0410-9941-cceddc491573
* Fix broken sewer messaging (dpeg).dshaligram2008-12-021-1/+2
| | | | | | Fixed bad bounds checks for minivaults placed by dgn_place_map. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7716 c06c8d41-db1a-0410-9941-cceddc491573
* When entering a portal vault, don't prompt wizards for which map to usezelgadis2008-11-271-0/+2
| | | | | | | if there's only one possibility to choose from. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7649 c06c8d41-db1a-0410-9941-cceddc491573
* Place external loot chamber for ziggurat levels with jellies.dshaligram2008-11-251-0/+8
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7625 c06c8d41-db1a-0410-9941-cceddc491573
* Enable vault generation for non-LEVEL_DUNGEON levels, make ziggurat eligible ↵dshaligram2008-11-251-1/+1
| | | | | | for random gen in main dungeon and Pan; still needs entry portal timing/charging fixes, and ziggurat builder is still incomplete. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7601 c06c8d41-db1a-0410-9941-cceddc491573
* Use map_def* instead of map indices.dshaligram2008-11-231-6/+8
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7562 c06c8d41-db1a-0410-9941-cceddc491573
* Removed redundant buffer used to go from map_def to env.grid and all the ↵dshaligram2008-11-231-25/+2
| | | | | | tedious code used to mess with this pointless buffer. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7560 c06c8d41-db1a-0410-9941-cceddc491573
* Discard more junk parameters from vault building routines.dshaligram2008-11-231-2/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7558 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up legacy cruft involved in placing vaults.dshaligram2008-11-231-1/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7557 c06c8d41-db1a-0410-9941-cceddc491573
* Separate CHANCE and WEIGHT. CHANCE is a probability, WEIGHT is a raw number ↵dshaligram2008-11-191-1/+1
| | | | | | used as a generation weight (i.e. WEIGHT is what the old CHANCE used to be). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7501 c06c8d41-db1a-0410-9941-cceddc491573