2025-11-10 09:40:02 +01:00
|
|
|
#ifndef GUI_H
|
|
|
|
|
#define GUI_H
|
|
|
|
|
|
|
|
|
|
#include <ncurses.h>
|
2025-11-10 13:48:17 +01:00
|
|
|
#include <menu.h>
|
|
|
|
|
#include <curses.h>
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <string.h>
|
2025-11-10 11:02:50 +01:00
|
|
|
#include "objects.h"
|
|
|
|
|
#include "utils.h"
|
2025-11-10 09:40:02 +01:00
|
|
|
|
2025-11-10 11:02:50 +01:00
|
|
|
/* color pair ids for gui.c */
|
|
|
|
|
enum {
|
|
|
|
|
ENEMY_PAIR = 1,
|
|
|
|
|
TITLE_PAIR,
|
|
|
|
|
GMOVR_PAIR,
|
|
|
|
|
BONUS_PAIR,
|
|
|
|
|
WINSC_PAIR
|
|
|
|
|
};
|
2025-11-10 09:40:02 +01:00
|
|
|
|
2025-11-10 13:48:17 +01:00
|
|
|
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
|
|
|
|
|
//extern char* choices[];
|
2025-11-10 19:22:43 +01:00
|
|
|
#define START_MODE 0
|
|
|
|
|
#define GMOVR_MODE 1
|
|
|
|
|
#define PAUSE_MODE 2
|
2025-11-10 13:48:17 +01:00
|
|
|
|
2025-11-10 11:02:50 +01:00
|
|
|
/* initialization and screens */
|
|
|
|
|
void init_colors(void);
|
2025-11-10 19:22:43 +01:00
|
|
|
int print_menu(WINDOW* win, int mode);
|
2025-11-10 09:40:02 +01:00
|
|
|
void print_gameover(WINDOW* win);
|
|
|
|
|
void print_win_screen(WINDOW* win);
|
|
|
|
|
|
2025-11-10 11:02:50 +01:00
|
|
|
/* status bar (draws into stdscr or another window) */
|
|
|
|
|
void print_status_bar(WINDOW* main_win, int y, int x, struct status game_status);
|
|
|
|
|
|
|
|
|
|
#endif /* GUI_H */
|
2025-11-10 09:40:02 +01:00
|
|
|
|