From 04b16c75ad199cb01f39ec541a06964633245475 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Sat, 28 Sep 2024 16:10:31 -0400 Subject: [PATCH] Undo the dijk test. --- map.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/map.cpp b/map.cpp index 8a450c9..1872dfe 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, 0)); + m_walls = Matrix(height, MatrixRow(width, 1)); m_input_map = Matrix(height, MatrixRow(width, 1)); } @@ -100,10 +100,7 @@ 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"); - if(x == origin_x && y == origin_y) { - m_input_map[y-1][x] = 0; - } - m_walls[y][x] = 1; + m_walls[y][x] = 0; } } } @@ -187,7 +184,6 @@ void partition_map(std::mt19937 &gen, Partition &cur, int depth) { println("!!!!LEAF LEFT ROOM h={}, w={}", left.height, left.width); } - if(depth > 0 && right.width >= 4 && right.height >= 4) { println("DOWN RIGHT h={}, w={}", right.height, right.width); partition_map(gen, right, depth-1); @@ -201,7 +197,6 @@ void draw_map(Map *map, Partition &cur) { if(cur.x + cur.width <= map->width() && cur.y + cur.height <= map->height()) { - println("CUR NEXT SIZE: {}", cur.next.size()); if(cur.next.size() == 1) { draw_map(map, cur.next[0]); // left