diff options
| author | Kirill Petrashin <kirill8201@yandex.ru> | 2026-04-11 22:21:47 +0300 |
|---|---|---|
| committer | Kirill Petrashin <kirill8201@yandex.ru> | 2026-04-11 22:21:47 +0300 |
| commit | 6ea977db5faa9342c90a4feb81a19182b55ab574 (patch) | |
| tree | ed675fddf40669cc36b682a6bee4f4c7dc745b46 /main.c | |
| parent | d676ac91b1906f5de8695facb6b96bf0509e6e1f (diff) | |
| download | astar-6ea977db5faa9342c90a4feb81a19182b55ab574.tar.xz | |
Add macro to print a message
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -179,8 +179,7 @@ int main(int argc, char **argv) { } break; case 's': - move(height + map_offset_y + 1, map_offset_x - 2); clrtoeol(); /* Clears the line */ - mvprintw(height + map_offset_y + 1, map_offset_x - 2, "Filename: "); + message(height, "Filename: "); /* TODO: figure out how to show the cursor and echo the characters */ curs_set(2); /* Hide the cursor */ echo(); /* Don't echo characters */ @@ -189,8 +188,7 @@ int main(int argc, char **argv) { noecho(); /* Don't echo characters */ mvgetnstr(height + map_offset_y + 1, map_offset_x - 2, filename, FILENAME_BUF_SIZE - 1); map_to_bmp(map, width, height, start_pos, end_pos, path, visited, filename); - move(height + map_offset_y + 1, map_offset_x - 2); clrtoeol(); /* Clears the line */ - mvprintw(height + map_offset_y + 1, map_offset_x - 2, "Saved to %s", filename); + message(height, "Saved to %s", filename); getch(); break; case 'n': |
