From 74ea6dc86646cee9915292d73d8c7afef01ef3e0 Mon Sep 17 00:00:00 2001 From: Sopár Adrián Date: Thu, 20 Jun 2024 09:28:14 +0200 Subject: First commit. This is mostly the state of the project as I left it around the end of 2019. --- src/main.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/main.c (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..20ff774 --- /dev/null +++ b/src/main.c @@ -0,0 +1,44 @@ +#include +#include +#include +#include +#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(); +} \ No newline at end of file -- cgit v1.2.3