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 /map.h | |
| parent | d676ac91b1906f5de8695facb6b96bf0509e6e1f (diff) | |
| download | astar-6ea977db5faa9342c90a4feb81a19182b55ab574.tar.xz | |
Add macro to print a message
Diffstat (limited to 'map.h')
| -rw-r--r-- | map.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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; |
