-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
30 lines (30 loc) · 790 Bytes
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <stdlib.h>
#include <Headers/curses.h>
#include <unistd.h>
#include "Headers/project_header.h"
extern struct dimension default_term_size;
int main(int argc, char *argv[]) {
int c;
initialization();
init_pair(3, COLOR_RED, COLOR_BLACK);
while(1) {
if(show_main_menu())
break;
if ((c = load_config(What_in_it()))) {
clear();
attron(COLOR_PAIR(3));
printw("Error: corrupted game files error code: %d", c);
printw("\nPress any key to return...");
attroff(COLOR_PAIR(3));
getch();
chdir("..");
chdir("..");
cleanup();
continue;
}
ingame_init();
run_game();
cleanup();
}
return 0;
}