summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_dgn.cc
Commit message (Collapse)AuthorAgeFilesLines
* Convert fprop instances in mapdef.* to unsigned long. (greensnark)Jude Brown2010-01-171-6/+2
| | | | | | fprop lists, and fprop_spec, now use unsigned long instead of int. This matches env.pgrid, and means that there won't be size issues in future when we end up with more feature properties.
* Code to alter/check feature properties in Lua.Jude Brown2010-01-171-0/+57
| | | | | | | | | | | | | This commit moves str_to_fprop from initfile.cc to fprop.cc. It also introduces two new dungeon Lua wrappers: fprop_changed(x, y, fprop), and fprop_at(x, y, fprop). fprop_at(x, y, fprop) will return testbits(coord_def(x, y), fprop). fprop_changed will either add the fprop to that location, or if it already exists there, it will remove it from that location. It will returrn a boolean value of true if it altered the location, and false if it did nothing.
* A simple noisy wrapper for Zaba.Jude Brown2010-01-081-0/+12
|
* Fix Shoal:$ generation bugs: stairs could be surrounded by deep water, hut ↵Darshan Shaligram2010-01-051-9/+115
| | | | | | entrances could be blocked by rock. shoal-hut.lua test generates 1k Shoal:$ levels and verifies that the levels pass sanity tests.
* Guarantee a small guard around the shoal rune.Darshan Shaligram2010-01-011-0/+7
|
* Customisable clouds!Jude Brown2009-12-281-4/+14
| | | | | | | | | | | | | | | | | | | | | cloud_struct now has members for colour, name, and tile; colour will be used instead of the default colour of the cloud type, and will be used to recolour the tile of the cloud (if it exists). Name will be used to rebrand the cloud's description, and also alter the message generate while standing in a cloud. Finally, tile can be used to completely customise the tile used for the cloud. The value is stored as a string in order to maintain save compatibility across ASCII and tiles. A random tile (found using tile_main_count) from that set will also be used, however, no duration effects will be applied. Recoloured cloud tiles using just the colour code should be possible, though aren't yet fully tested. This commit bumps TAG_MAJOR_VERSION: changing marshalling of the FogMachine Lua code causes nasty crashes on reloading saved games. Otherwise, I don't think I broke anything else. :-)
* Replace long debug message calls with dprf(), except for cases where a dumb ↵Adam Borowski2009-12-201-3/+1
| | | | | | compiler could call unnecessary functions. For paranoia, I left even any uses of std::string.
* tiles: only include tiledef-*.h in files where they're neededSteven Noonan2009-12-121-0/+3
| | | | | | | This eliminates the annoying full rebuild that happens when the tiledefs are modified. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Temporary hack to make set_border_fill_type work.Jude Brown2009-12-061-0/+4
| | | | | | 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.
* Quiet compiler warning.Robert Vollmert2009-12-011-2/+2
|
* Revert "Convert dgn.set_border_fill_type to BORDER."Jude Brown2009-11-301-27/+27
| | | | | | | 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-27/+27
| | | | | | | | | | 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.
* Reduce dependency on travel.hMatthew Cline2009-11-291-0/+1
| | | | | | | | Removed inclusion of travel.h from most .h files to reduce the number of .cc files dependant on it. This involved moving the level_pos declaration to externs.h, moving the flood_find template to it's own header file, and moving two typedefs from travel.h to travel_defs.h because typedefs can't be forward declared (argh).
* Subvaults.Enne Walker2009-11-281-4/+34
| | | | | | | | 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-0/+1
|
* Remove unnecessary header-header includes.Robert Vollmert2009-11-271-0/+1
|
* Don't use is_travelsafe_square for dungeon generation.Robert Vollmert2009-11-251-1/+1
| | | | This hopefully fixes recent disconnected level problems.
* Lua wrapper for place_cloud.Jude Brown2009-11-211-0/+52
| | | | | dgn.apply_area_cloud is useful for applying clouds, but clunky for attempting to place single clouds.
* Remove trailing whitespace.David Lawrence Ramsey2009-11-201-3/+3
|
* Fixing ziggurats missing fill_area function.Enne Walker2009-11-171-0/+27
| | | | | fill_grd_area now fills an area on the dungeon grd. Only Ziggurats use this function.
* Provide sanity checking for set_border_fill_type.Jude Brown2009-11-141-3/+14
| | | | | On second thoughts, while an endless milieu of Trog altars sounds nice, limit it to walls, lava, water and trees.
* Allow portal vaults to specify fill and border glyph.Jude Brown2009-11-141-0/+16
| | | | | | | | | | | | | Also move dungeon_feature_by_name into terrain.cc, as it does not make sense it being in l_dgngrd.cc. The Lua function "set_border_fill_type(feature)" will replace the default DNGN_ROCK_WALL fill of a portal vault with the specified feature. This could be abused, and should probably only be limited to floor, water and sea, different types of walls, trees and lava; there are no sanity checks for endless traps, statues, stairs, etc. Finally, apply this to the island Trove, giving endless water effect.
* Remove a few obsolete includes.Robert Vollmert2009-11-101-2/+0
| | | | Also add a few previously indirect includes.
* Split shouting and stealth code from view.cc.Robert Vollmert2009-11-101-0/+1
|
* Remove option draw_it from viewwindow.Robert Vollmert2009-11-091-2/+2
| | | | | | The only use was just removed. Also move the draw check closer to where it's used.
* l_dgn.cc: dgn.marker_at_pos()Matthew Cline2009-11-081-0/+19
|
* Undid accidental/stale commit (oops)Matthew Cline2009-11-031-10/+0
|
* l_dgn.cc: define 'dgn.in_bounds()' lua funcMatthew Cline2009-11-031-0/+10
|
* lmark.synchronized_markers(): apply one marker's effects to multiple points ↵Darshan Shaligram2009-10-311-4/+36
| | | | | | | | | | | | | | | simultaneously. synchronized_markers() takes a marker, and a list of method names to override, and returns a set of markers that fire simultaneously, to allow, say, fog machines that fire at random intervals, but always fire in unison. lm_mslav.lua has details. volcano.des has an example volcano entry vault that uses this. Allow fetching a list of Lua markers/marker positions by property value. Renamed dgn.find_marker_prop -> dgn.find_marker_position_by_prop. s/helper/listener/ for fog machine listeners.
* Fix more missing includes. Sorry.Robert Vollmert2009-10-311-0/+2
|
* Splitting up stuff.cc.Robert Vollmert2009-10-301-0/+3
| | | | New: colour.cc, coord.cc, coordit.cc, random.cc, rng.cc.
* Wrapper for find_map_by_name (dgn.map_by_name). Test set for generation of ↵Jude Brown2009-10-241-0/+9
| | | | | | specific vaults multiple times, in order to test SUBSTs, SHUFFLEs, etc, quickly and easily. Signed-off-by: Darshan Shaligram <dshaligram@users.sourceforge.net>
* KPROP: assign feature properties in Lua vaults: FPROP_BLOODY, etc.Jude Brown2009-10-211-0/+6
|
* Create l_defs.h and move stuff there.Robert Vollmert2009-10-211-0/+1
| | | | | l_defs.h contains headers for things defined in the Lua functions but used elsewhere. This should probably not exist long-term.
* Move utility functions from clua.cc to cluautil.cc.Robert Vollmert2009-10-211-1/+1
| | | | | | | | cluautil.cc should eventually contain all of the functions for passing objects from and to lua, at least the shared ones. Also cut down on clua.cc include list.
* cosmetic: strip trailing whitespaceSteven Noonan2009-10-201-151/+151
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Move clua crawl_lib from clua to l_crawl.cc.Robert Vollmert2009-10-201-1/+1
| | | | To avoid name clashes, rename dlua libs from *_lib to *_dlib.
* Split debug lua bindings out to new library "debug".Robert Vollmert2009-10-201-66/+0
|
* Split out grid and feature-related bindings.Robert Vollmert2009-10-201-228/+1
|
* Split builder functions out from l_dgn.cc.Robert Vollmert2009-10-201-350/+2
| | | | Now sub-2k lines of code.
* Split level and branch functions out of l_dgn.cc.Robert Vollmert2009-10-201-145/+3
|
* Split out tiles specific functions from l_dgn.cc.Robert Vollmert2009-10-201-156/+3
| | | | Also a little cleanup.
* Split some parts of lua library "dgn" out.Robert Vollmert2009-10-201-332/+0
| | | | | Specifically, item and monster-related functions to l_dgnit.cc and l_dgnmon.cc.
* Move part of dgn_lib out to l_dgnevt.cc.Robert Vollmert2009-10-201-51/+0
|
* Split file_lib out.Robert Vollmert2009-10-191-0/+1
| | | | | Move lua library headers to separate l_libs.h, fixing another compilation error...
* Split dgn_lib out of luadgn.cc; rename luadgn to dlua.Robert Vollmert2009-10-191-0/+2893