diff options
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 44 |
1 files changed, 44 insertions, 0 deletions
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 <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(); +}
\ No newline at end of file |
