| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
In most settings, three passable glyphs are those on the inside of the
room; we want some passable glyphs on the *outside* of the room as well.
This does mean that immediate corners of doors will now be excluded from
possible door spots, but this can be hacked around. The other solution
is to look "outside" of the room, which could probably be calculated
from the specified side.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adjusted _valid_coord to allow the checking of a coordinate without
generating an error message; moved fill_area's filling code to its own
function so that it can be called by multiple functions; implemented
count_passable_neighbors in C++ instead of Lua, to make it more
accessible in multiple layouts.
Implemented "make_box" and "make_box_doors"; both work on a series of
two coordinates (top left and bottom right corners), the first making a
box of specified width and using specified glyphs for walls and floor,
while the second function will randomly add doors to the box, ignoring
corners.
make_box_doors will not work on instances where the wall thickness is
more than 1 square; this could be adjusted at a later date.
|
|
|
|
|
|
|
|
|
|
|
| |
Introduces util.range(start, stop), returning an array consisting of the
numeric values between start and stop inclusive.
Also introduces "is_valid_coord" Lua wrapper, which does the same work
as _valid_coord but does not generate an error message for invalid
coordinates, "find_in_area" (a straight translation of the function in
dungeon.cc), and "is_passable_coord" which checks the glyph at that
location against traversable_glyphs.
|
|
|
|
|
|
|
|
|
| |
All the other dgn and map functions in Crawl are 0-indexed, so this makes
everything more consistent.
I've changed all the uses in the master branch, but if you're using these
functions in another branch (dpeg and due), then you'll need to adjust
all your coordinates to match.
|
|
|
|
| |
This mostly puts && and || on the proper lines, per the style guide.
|
|
|
|
|
|
| |
This removes a couple of unnecessary includes from header files.
I may have missed adding some tiles includes.
|
| |
|
|
|
|
|
|
|
| |
This lets regular vaults use the same Lua functions that layout vaults
do. Convert functions in l_dgnbld that acted on grd. Update layout
vaults to use these new functions. Also, remove l_dgn_bf, as all of
its functionality is now in l_dgnbld.
|
|
|
|
| |
New: colour.cc, coord.cc, coordit.cc, random.cc, rng.cc.
|
| |
|
|
|
|
|
|
| |
Previously, I had renamed only the C++-side of things.
Also update documentation.
|
|
|
|
| |
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rest of commit comment only as accurate as my
understanding...
Renaming from grd to mapgrd to avoid confusion with
grd == env.grid: This grd is the maplines-section of
a vault definition.
Also move mapgrd_lib from clua to dlua since it's only
used for dungeon building.
clua and dlua need more descriptive names.
|
|
|
|
| |
To avoid name clashes, rename dlua libs from *_lib to *_dlib.
|
|
Now sub-2k lines of code.
|