diff options
Diffstat (limited to 'ViewController.cpp')
-rw-r--r-- | ViewController.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ViewController.cpp b/ViewController.cpp index d336b9c..3b298db 100644 --- a/ViewController.cpp +++ b/ViewController.cpp @@ -70,13 +70,14 @@ void ViewController::update_pathfinding() { void ViewController::update_quadtree_recursive(QuadTree * tree) { if (tree == nullptr) return; + const Rectangle & tree_boundary = tree->get_boundary(); Rectangle rect = { - .x = tree->boundary.x * scale, - .y = tree->boundary.y * scale, - .width = tree->boundary.width * scale, - .height = tree->boundary.height * scale, + .x = tree_boundary.x * scale, + .y = tree_boundary.y * scale, + .width = tree_boundary.width * scale, + .height = tree_boundary.height * scale, }; - this->view.draw_rect(rect, { .red = 0xff, .green = 0x00, .blue = 0xff, }, 2); + this->view.draw_rect(rect, { .red = 0xff, .green = 0x00, .blue = 0xff, }, 1); this->update_quadtree_recursive(tree->subtree[0].get()); this->update_quadtree_recursive(tree->subtree[1].get()); |