diff options
Diffstat (limited to 'src/ft_treat_args.c')
-rw-r--r-- | src/ft_treat_args.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ft_treat_args.c b/src/ft_treat_args.c index a47f9f7..fe794d8 100644 --- a/src/ft_treat_args.c +++ b/src/ft_treat_args.c @@ -12,6 +12,7 @@ #include <libft.h> #include <cub3d.h> +#include <mlx.h> #include <stddef.h> #include <stdint.h> #include <unistd.h> @@ -35,14 +36,14 @@ uint8_t if (argc < 3) { if (ft_init_winptr(clist) < 0) - { return (ft_exit(FT_RET_FAILED_MLX, clist)); - } + clist->img.img = mlx_new_image(clist->wlist.wlx, + clist->wlist.x_size, clist->wlist.y_size); + clist->img.ptr = mlx_get_data_addr(clist->img.img, &clist->img.bpp, + &clist->img.sizeline, &clist->img.endian); ft_draw_scene(clist); if (clist->mlist.ismusic) - { ft_enable_music(clist); - } ft_hooks_and_loops(&clist->wlist, clist); } else if (argc == 3 && !ft_strncmp("--save", argv[2], 7)) |