diff options
Diffstat (limited to '')
-rw-r--r-- | src/main.c | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -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); } |