git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7388 c06c8d41-db1a-0410-9941-cceddc491573
VHX7TPWGVWIT4UVQZ3XSFBRALNMHLEDMEBJC6HZ4HUH2JKI4VL6AC
// Example: If a wall is built at X (A), two deadends are created, a short and
// a long one. The latter is perfectly fine, but the former looks
// a bit odd. If Y is chosen, this looks much better (B).
// Example: If a wall is built at X (A), two dead-ends are created, a short
// and a long one. The latter is perfectly fine, but the former
// looks a bit odd. If Y is chosen, this looks much better (B).
std::vector<coord_def> dirs;
dirs.push_back(coord_def(-1,-1));
dirs.push_back(coord_def( 0,-1));
dirs.push_back(coord_def( 1,-1));
dirs.push_back(coord_def(-1, 0));
// dirs.push_back(coord_def( 0, 0));
dirs.push_back(coord_def( 1, 0));
dirs.push_back(coord_def(-1, 1));
dirs.push_back(coord_def( 0, 1));
dirs.push_back(coord_def( 1, 1));
// For each of the chosen wall grids, calculate the path connecting the
// two floor grids to either side, and block off one floor grid on this
// path to close the circle opened by turning the wall into floor.
std::vector<coord_def> points;
// Replace the wall with floor, but preserve the old grid for later
// change of the floor grid, or in case this fails.
// It's better if the change is done now, so the grid can be
// treated as floor rather than a wall, and we don't need any
// special cases.
// The directions are used to randomly decide where to place items that
// have ended up in walls during the switching.
std::vector<coord_def> dirs;
dirs.push_back(coord_def(-1,-1));
dirs.push_back(coord_def( 0,-1));
dirs.push_back(coord_def( 1,-1));
dirs.push_back(coord_def(-1, 0));
// dirs.push_back(coord_def( 0, 0));
dirs.push_back(coord_def( 1, 0));
dirs.push_back(coord_def(-1, 1));
dirs.push_back(coord_def( 0, 1));
dirs.push_back(coord_def( 1, 1));