diff options
| author | Kirill Petrashin <kirill8201@yandex.ru> | 2026-04-14 21:50:55 +0300 |
|---|---|---|
| committer | Kirill Petrashin <kirill8201@yandex.ru> | 2026-04-14 21:50:55 +0300 |
| commit | 768509d6bb91269abf1ee1d93c32d236b146e98a (patch) | |
| tree | 99729eafbdbe8b496eb23033b541597384357416 /map.c | |
| parent | db5320aa188d773c8edc32eee844127457ef280c (diff) | |
| download | astar-768509d6bb91269abf1ee1d93c32d236b146e98a.tar.xz | |
Fix message printing leaving text behind
Diffstat (limited to 'map.c')
| -rw-r--r-- | map.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -413,7 +413,7 @@ void draw_map(Map map, size_t width, size_t height, Position start, Position goa } void print_message(size_t height) { - mvaddnstr(height + map_offset_y + 1, map_offset_x - 2, message, MESSAGE_MAX_SIZE); + mvaddnstr(height + map_offset_y + 1, map_offset_x - 2, message, MESSAGE_MAX_SIZE); clrtoeol(); } void map_free(Map map, size_t height) { @@ -437,7 +437,6 @@ 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); set_message("You've entered the map editor. 'q' to quit"); print_message(*height); @@ -638,6 +637,7 @@ void map_editor(Map *map, size_t *width, size_t *height, Position *start, Positi } } } else { /* Only update the map if not a mouse event */ + draw_map(*map, *width, *height, *start, *goal, NULL, NULL, NULL, NULL); } } |
