diff options
| author | Kirill Petrashin <kirill8201@yandex.ru> | 2026-04-14 18:39:27 +0300 |
|---|---|---|
| committer | Kirill Petrashin <kirill8201@yandex.ru> | 2026-04-14 18:39:27 +0300 |
| commit | 5033a3054d26212a57c0cf62007708ff5fb4ecc3 (patch) | |
| tree | 5eacb67f55596ee9718cd09373628333cbaecf14 /map.c | |
| parent | f0b6bb6974c823c4b5a7deffce0748f2ff6370de (diff) | |
| download | astar-5033a3054d26212a57c0cf62007708ff5fb4ecc3.tar.xz | |
Print info in walls
Diffstat (limited to 'map.c')
| -rw-r--r-- | map.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -373,7 +373,12 @@ void draw_map(Map map, size_t width, size_t height, Position start, Position goa cur = path[cur.y][cur.x].parent; } attroff(COLOR_PAIR(PATH_COLOR)); - /* FIXME: print this as part of bottom wall? set_message("Path cost: %zu", length); */ + attron(COLOR_PAIR(WALL_TEXT_COLOR)); + mvprintw(map_offset_y - 1, map_offset_x, "Path cost: %zu", length); + if (visited != NULL) { + mvprintw(height + map_offset_y, map_offset_x, "Visited %zu cells", visited_count(visited, width, height)); + } + attroff(COLOR_PAIR(WALL_TEXT_COLOR)); } /* Draw the start */ |
