diff options
Diffstat (limited to 'map.c')
| -rw-r--r-- | map.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -10,8 +10,6 @@ #include "path.h" #include "priority_queue.h" -/* TODO: function to print a message maybe */ - int map_offset_x = 2; int map_offset_y = 1; @@ -348,7 +346,7 @@ 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)); - mvprintw(height + map_offset_y + 1, map_offset_x - 2, "Path cost: %zu", length); + message(height, "Path cost: %zu", length); } /* Draw the start */ @@ -400,7 +398,7 @@ void print_map_out(Map map, size_t width, size_t height) { void map_editor(Map *map, size_t *width, size_t *height, Position *start, Position *goal) { clear(); draw_map(*map, *width, *height, *start, *goal, NULL, NULL, NULL, NULL); - mvprintw(*height + map_offset_y + 1, map_offset_x - 2, "You've entered the map editor. 'q' to quit"); + message(*height, "You've entered the map editor. 'q' to quit"); MEVENT event; mousemask(ALL_MOUSE_EVENTS | REPORT_MOUSE_POSITION, NULL); |
