space-shooter/include/gui.h

38 lines
758 B
C
Raw Permalink Normal View History

#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>
#include "objects.h"
#include "utils.h"
/* color pair ids for gui.c */
enum {
ENEMY_PAIR = 1,
TITLE_PAIR,
GMOVR_PAIR,
BONUS_PAIR,
WINSC_PAIR
};
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
/* initialization and screens */
void init_colors(void);
2025-11-10 19:22:43 +01:00
int print_menu(WINDOW* win, int mode);
void print_gameover(WINDOW* win);
void print_win_screen(WINDOW* win);
/* 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 */