From 6ea977db5faa9342c90a4feb81a19182b55ab574 Mon Sep 17 00:00:00 2001 From: Kirill Petrashin Date: Sat, 11 Apr 2026 22:21:47 +0300 Subject: Add macro to print a message --- map.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'map.h') diff --git a/map.h b/map.h index fef684c..e9c5bc3 100644 --- a/map.h +++ b/map.h @@ -6,6 +6,11 @@ #include "path.h" #include "priority_queue.h" +/* Prints a message at the line right below the map. Multiline messages are undefined behaviour */ +#define message(height, ...) { \ + if (move((height) + map_offset_y + 1, map_offset_x - 2) != ERR) { clrtoeol(); /* Clear the line */\ + mvprintw((height) + map_offset_y + 1, map_offset_x - 2, __VA_ARGS__); }} + extern int map_offset_x; extern int map_offset_y; -- cgit v1.2.3