git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3114 c06c8d41-db1a-0410-9941-cceddc491573
B6WXZQURRMFI2HBT3ZW32MIG424NS2QGSFULBRI3TFXLFY2G7SEAC AO3KHGKGSX2ZR24KJVIOTUY7EHYHMMI5W4HN3CAG4YGQHBOHLGDQC GRDCK5F6ZPTDLFOPBYBUELWHGSVA2RIHSSIGGSBQOAFV6TJLL5VQC 56C44YMFHZ62GXAAOLYSLLGBVGRWXB53W2VI37Q26ZECEK2XG5SQC OY7KHQPESOUHPBXRZ2JSNUKPAC7DCDY73TAUHCSJG5V6TPAHBVYQC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC ITUTGFJ56GR7FWMC5Y7XKUJJ4Z35I6BMOHCPCW3W5MKDQGVOGM4AC R5JKQLY5QE6UBG3RH3Y5ZRSX6H35CHYI2HYNDZF6ZHVRULUORXBQC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC }static void labyrinth_dimension_adjust(int delta, int &ds, int &dw){if (delta > LABYRINTH_BORDER / 2)delta = LABYRINTH_BORDER / 2;if (delta){if (delta & 1)++delta;ds -= delta;dw += delta * 2;}}static void safe_set_feature(const coord_def &c, dungeon_feature_type feat){if (in_bounds(c))grd(c) = feat;}static void pad_region(const dgn_region ®, int pad_depth,dungeon_feature_type feat){const coord_def pstart = reg.pos - pad_depth;const coord_def pend = reg.pos + reg.size + pad_depth;const coord_def end = reg.pos + reg.size - 1;for (int y = pstart.y; y < pend.y; ++y){for (int x = 1; x <= pad_depth; ++x){const coord_def c1(x + end.x, y);safe_set_feature(c1, feat);const coord_def c2(reg.pos.x - x, y);safe_set_feature(c2, feat);}}for (int x = end.x; x >= reg.pos.x; --x){for (int y = 1; y <= pad_depth; ++y){const coord_def c1(x, y + end.y);safe_set_feature(c1, feat);const coord_def c2(x, reg.pos.y - y);safe_set_feature(c2, feat);}}