aboutsummaryrefslogtreecommitdiff
path: root/main.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 /main.c
parentc8d863b4b37a64f1df3cd4c25e6367949f2e6650 (diff)
downloadastar-f0b6bb6974c823c4b5a7deffce0748f2ff6370de.tar.xz
Change how messages are written, clean up differently
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/main.c b/main.c
index 3ebc655..cac6a85 100644
--- a/main.c
+++ b/main.c
@@ -192,10 +192,10 @@ int main(int argc, char **argv) {
case 'i':
if(is_maze) {
switch (c) {
- case 'y': if (mwidth > 1) mwidth -= 1; break;
+ case 'y': if (mwidth > 2) mwidth -= 1; break;
case 'o': mwidth += 1; break;
case 'u': mheight += 1; break;
- case 'i': if (mheight > 1) mheight -= 1; break;
+ case 'i': if (mheight > 2) mheight -= 1; break;
}
map_free(map, height);
visited_free(visited, height);
@@ -216,7 +216,8 @@ int main(int argc, char **argv) {
curs_set(2); /* Show the cursor */
echo(); /* Echo characters */
- message(height, FILENAME_PROMPT);
+ set_message(FILENAME_PROMPT);
+ print_message(height);
char filename[FILENAME_BUF_SIZE] = "out.bmp";
mvgetnstr(height + map_offset_y + 1, map_offset_x - 2 + sizeof(FILENAME_PROMPT), filename, FILENAME_BUF_SIZE - 1);