More minor vault tweaks.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1793 c06c8d41-db1a-0410-9941-cceddc491573
JR4ZZK4HOXQIG3WXBGTPZAPPNF7HHBCUZ3TE7RBCS64NHCOX7B2QC
C22455VGUQOSUX2OORA32LROFQ7NNYDMD2ZDTTUZSAQLXK4AD6QAC
GE6TEMGI66WM7W3T4QFAWFOHPLTEN3PEAQHQ5VLVWOWYEHZERVAAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
CREW3VTGN2BV622ZXHCPHUEZWBAGEQMNUELDLTHLEKG4VBXGMRPQC
KCHX2F3JFEWOZT3WMJVZAAQUU2QSZ5Q7RDCD7WUJ7VE65J52JFUQC
56C44YMFHZ62GXAAOLYSLLGBVGRWXB53W2VI37Q26ZECEK2XG5SQC
CUNNC574MESEMTTONZ6YB6CJ2S5P6VA3V7Z3OODESWAK37GYOBPAC
H3552BCIAVBLKAYKE4DHFLBLFW5RGRMYBMRRYHYEB5IPIJRUVU5QC
static bool is_grid_clobbered(const map_def &map,
int sx, int sy, int width, int height)
// Determines if the region specified by (x, y, x + width - 1, y + height - 1)
// is a bad place to build a vault.
static bool bad_map_place(const map_def &map,
int sx, int sy, int width, int height,
std::vector<vault_placement> *avoid)
}
// Determines if the region specified by (x, y, x + width - 1, y + height - 1)
// is a bad place to build a vault.
static bool bad_map_place(const map_def &map,
int x, int y, int width, int height,
std::vector<vault_placement> *avoid)
{
if (!avoid)
return (false);
const dgn_region thisvault(x, y, width, height);
for (int i = 0, size = avoid->size(); i < size; ++i)
{
const vault_placement &vp = (*avoid)[i];
const dgn_region vault(vp.x, vp.y, vp.width, vp.height);
if (thisvault.overlaps(vault) && thisvault.overlaps(dgn_map_mask))
return (true);
}
return (is_grid_clobbered(map, x, y, width, height));