Initial fix for large center rooms not having entry exit.

This commit is contained in:
Zed A. Shaw 2026-03-07 00:10:42 -05:00
parent da7f24c126
commit 47c0d4a5f0
8 changed files with 130 additions and 85 deletions

View file

@ -120,22 +120,6 @@ void Map::init_tiles() {
$tiles = $walls;
}
void Map::enclose() {
// wraps the outside edge with solid walls
std::array<Point, 4> starts{{
{0,0}, {$width-1, 0}, {$width-1, $height-1}, {0, $height-1}
}};
std::array<Point, 4> ends{{
{$width-1, 0}, {$width-1, $height-1}, {0, $height-1}, {0,0},
}};
for(size_t i = 0; i < starts.size(); i++) {
for(matrix::line it{starts[i], ends[i]}; it.next();) {
$walls[it.y][it.x] = 1;
}
}
}
void Map::add_room(Room &room) {
$rooms.push_back(room);