diff --git a/map.cpp b/map.cpp index 713966c..8a450c9 100644 --- a/map.cpp +++ b/map.cpp @@ -38,7 +38,7 @@ inline void add_neighbors(PairList &neighbors, Matrix &closed, size_t j, size_t } Map::Map(size_t width, size_t height) : m_limit(1000) { - m_walls = Matrix(height, MatrixRow(width, 1)); + m_walls = Matrix(height, MatrixRow(width, 0)); m_input_map = Matrix(height, MatrixRow(width, 1)); } @@ -100,7 +100,10 @@ void Map::make_room(size_t origin_x, size_t origin_y, size_t w, size_t h) { dbc::check(y < m_walls.size(), "y is out of bounds"); for(size_t x = origin_x; x < origin_x + w; ++x) { dbc::check(x < m_walls[y].size(), "x is out of bounds"); - m_walls[y][x] = 0; + if(x == origin_x && y == origin_y) { + m_input_map[y-1][x] = 0; + } + m_walls[y][x] = 1; } } }