From b5b4a5d66deefa3858bedf7bc58e6c96340e829b Mon Sep 17 00:00:00 2001 From: Jacob Janzen Date: Wed, 14 Feb 2024 12:01:03 -0600 Subject: major refactor --- include/display.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 include/display.h (limited to 'include/display.h') diff --git a/include/display.h b/include/display.h new file mode 100644 index 0000000..c4f5249 --- /dev/null +++ b/include/display.h @@ -0,0 +1,40 @@ +#ifndef DISPLAY_H_ +#define DISPLAY_H_ + +#include + +#include "cavegen.h" +#include "entity.h" +#include "ht.h" + +#define MAIN_PANEL_WIDTH 100 +#define MAIN_PANEL_HEIGHT 41 +#define INSTRUCTION_PANEL_WIDTH 32 +#define INSTRUCTION_PANEL_HEIGHT 39 +#define MESSAGE_PANEL_WIDTH 100 +#define MESSAGE_PANEL_HEIGHT 3 +#define STATUS_PANEL_WIDTH 32 +#define STATUS_PANEL_HEIGHT 5 + +typedef struct windows display_t; + +enum action { + ACTION_NONE, + ACTION_EXIT, + ACTION_DOWN, + ACTION_UP, + ACTION_LEFT, + ACTION_RIGHT, + ACTION_STAIR_DOWN, + ACTION_STAIR_UP, + NUM_ACTIONS, +}; + +display_t *display_init(void); +void display_map(display_t *disp, struct map *map, ht_t *entities); +void display_instructions(display_t *disp); +void display_message(display_t *disp, char *msg); +void display_status(display_t *disp, struct entity *entity); +enum action display_process_input(void); + +#endif // DISPLAY_H_ -- cgit v1.2.3