aboutsummaryrefslogtreecommitdiff
path: root/path.c
diff options
context:
space:
mode:
authorKirill Petrashin <kirill8201@yandex.ru>2026-04-14 18:25:30 +0300
committerKirill Petrashin <kirill8201@yandex.ru>2026-04-14 18:25:30 +0300
commitf0b6bb6974c823c4b5a7deffce0748f2ff6370de (patch)
tree37ccd97ce0f10959006740ed4949d95b903a2f2f /path.c
parentc8d863b4b37a64f1df3cd4c25e6367949f2e6650 (diff)
downloadastar-f0b6bb6974c823c4b5a7deffce0748f2ff6370de.tar.xz
Change how messages are written, clean up differently
Diffstat (limited to 'path.c')
-rw-r--r--path.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/path.c b/path.c
index e216d8a..fd92908 100644
--- a/path.c
+++ b/path.c
@@ -18,7 +18,7 @@ int anim(Map map, size_t width, size_t height, Position start, Position end, Pos
static char automatic = 0;
while (1) {
draw_map(map, width, height, start, end, cur, NULL, visited, frontier);
- message(height, "cur: %zu %zu", cur->x, cur->y);
+ set_message("cur: %zu %zu", cur->x, cur->y); print_message(height);
if (automatic) { wrefresh(stdscr); usleep(ANIM_DELAY_USEC); return 0; }
switch (getch()) {
case 'h': map_offset_x += 2; break;
@@ -52,7 +52,7 @@ int anim(Map map, size_t width, size_t height, Position start, Position end, Pos
/* TODO: Add a binding to do a bmp */
case 'a': automatic = 1; break;
- case 'q': return -1;
+ case 'q': clear_message(); return -1;
default: return 0;
}
}