diff options
author | Adam Borowski <kilobyte@angband.pl> | 2011-08-29 11:35:56 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2011-08-29 11:35:56 +0200 |
commit | de2d8d3d7e7350952d0b027605bd3a59f74456ed (patch) | |
tree | 6298638d21cb9a6619eea3932159068b4e6f272d /crawl-ref/source/l_dgnbld.cc | |
parent | c5220e3641fa05e23f2820ac5d91a16a4ebc9f29 (diff) | |
download | crawl-ref-de2d8d3d7e7350952d0b027605bd3a59f74456ed.tar.gz crawl-ref-de2d8d3d7e7350952d0b027605bd3a59f74456ed.zip |
Allow delve() to operate on both grd or map_lines.
Diffstat (limited to 'crawl-ref/source/l_dgnbld.cc')
-rw-r--r-- | crawl-ref/source/l_dgnbld.cc | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/crawl-ref/source/l_dgnbld.cc b/crawl-ref/source/l_dgnbld.cc index 49e57f79cf..0858d013e2 100644 --- a/crawl-ref/source/l_dgnbld.cc +++ b/crawl-ref/source/l_dgnbld.cc @@ -8,6 +8,7 @@ #include <cmath> #include "dungeon.h" +#include "dgn-delve.h" #include "dgn-shoals.h" #include "dgn-swamp.h" #include "dgn-layouts.h" @@ -18,9 +19,6 @@ #include "mapdef.h" #include "random.h" -static const char *traversable_glyphs = - ".+=w@{}()[]<>BC^~TUVY$%*|Odefghijk0123456789"; - static const char *exit_glyphs = "{}()[]<>@"; // Return the integer stored in the table (on the stack) with the key name. @@ -899,6 +897,20 @@ LUAFN(dgn_layout_type) return 0; } +LUAFN(dgn_delve) +{ + LINES(ls, 1, lines); + + TABLE_INT(ls, ngb_min, 2); + TABLE_INT(ls, ngb_max, 3); + TABLE_INT(ls, connchance, 0); + TABLE_INT(ls, cellnum, -1); + TABLE_INT(ls, top, 125); + + delve(&lines, ngb_min, ngb_max, connchance, cellnum, top); + return (0); +} + /* Wrappers for C++ layouts, to facilitate choosing of layouts by weight and * depth */ @@ -959,6 +971,7 @@ const struct luaL_reg dgn_build_dlib[] = { "replace_random", &dgn_replace_random }, { "smear_map", &dgn_smear_map }, { "spotty_map", &dgn_spotty_map }, + { "delve", &dgn_delve }, { "width", dgn_width }, { "layout_type", &dgn_layout_type }, |