From f0b6bb6974c823c4b5a7deffce0748f2ff6370de Mon Sep 17 00:00:00 2001 From: Kirill Petrashin Date: Tue, 14 Apr 2026 18:25:30 +0300 Subject: Change how messages are written, clean up differently --- bmp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bmp.c') diff --git a/bmp.c b/bmp.c index 33dd7dc..739c2ad 100644 --- a/bmp.c +++ b/bmp.c @@ -94,7 +94,8 @@ void map_to_bmp(Map map, size_t map_width, size_t map_height, Position start, Po FILE *fout = fopen(filename, "wb"); if (fout == NULL) { - message(height, "Couldn't open %s for writing", filename); + set_message("Couldn't open %s for writing", filename); + print_message(height); return; } fwrite(header, 1, 54, fout); @@ -102,6 +103,7 @@ void map_to_bmp(Map map, size_t map_width, size_t map_height, Position start, Po fclose(fout); free(buf); - message(height, "Saved to %s", filename); + set_message("Saved to %s", filename); + print_message(height); return; } -- cgit v1.2.3