#ifndef TUI_H #define TUI_H #include #include #include bool setup(); //setups screens, doesn't redaw contents void printlog(); void logstr(const char *format, ...); //echoes printf string to the logwindow TODO: fix multiline log void charclear(); void charprint(const char *format, ...); //echoes printf string to the charwindow void log_scroll(enum direction d); //scrolls the log up or down void draw_map(const struct game *g, struct point p); //draws the map around the player bool messagebox(const char *str, int y, int x); //shows a centered messagebox of at least the given size typedef bool(itemselectfn)(struct monster *m, size_t i); //returns true if cursor should be reset void itemselect(struct monster *m, itemselectfn f); //provides an inventory screen, calls f when the space is pressed on an item //TODO: create general select screen extern size_t logindex; extern size_t loglength; extern char **logs; #endif //TUI_H