aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/main.c b/src/main.c
index 6927b6d..16c96ef 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,18 +1,20 @@
#include <libft.h>
#include <mlx.h>
+#include <cub3d.h>
#include <stdlib.h>
int
main(void)
{
- void *win;
- void *winptr;
+ t_winlist *wlist;
+ t_cublist *clist;
- win = mlx_init();
- winptr = (void*)malloc(800 * 600);
- winptr = mlx_new_window(win, 800, 600, "Cub3d");
- mlx_loop(win);
- free(winptr);
- free(win);
+ wlist = ft_init_winlist();
+ clist = ft_init_cublist();
+ mlx_loop(wlist->wlx);
+ ft_memdel(wlist->wlx);
+ ft_memdel(wlist->winptr);
+ ft_memdel(wlist);
+ ft_memdel(clist);
return (0);
}