blob: 20ff774a5f6ec2eb06ce35b356da2e8712136dad (
plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#include <ncurses.h>
#include <stdlib.h>
#include <locale.h>
#include <time.h>
#include "app.h"
#include "color.h"
#include "menu.h"
void handle(struct app *app)
{
}
int main(int argc, char **argv)
{
srand(time(NULL));
//Setup ncurses
setlocale(LC_ALL, "");
initscr();
raw();
keypad(stdscr, TRUE);
maze_color_init();
//Construct app
struct app app;
app.maze = NULL;
//Load args
struct args args;
args.hide_menu = true;
load_args(argc, argv, &args);
app.args = &args;
//Load config
app.conf = load_default_conf();
//Start main loop
handle(&app);
if (!args.hide_menu)
main_menu_loop(&app);
//Deallocate
if (app.maze != NULL)
{
free(app.maze->map);
free(app.maze);
}
//End
endwin();
}
|