diff options
author | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-03-11 15:30:51 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-03-11 15:30:51 +0100 |
commit | 114df1314a69161e5802ce6192aa8f1599867f3e (patch) | |
tree | cbb1c2f3c9e942a17b544d613f011aa7569e13cb /src/ft_treat_args.c | |
parent | is not working (diff) | |
download | 42-cub3d-114df1314a69161e5802ce6192aa8f1599867f3e.tar.gz 42-cub3d-114df1314a69161e5802ce6192aa8f1599867f3e.tar.bz2 42-cub3d-114df1314a69161e5802ce6192aa8f1599867f3e.tar.xz 42-cub3d-114df1314a69161e5802ce6192aa8f1599867f3e.tar.zst 42-cub3d-114df1314a69161e5802ce6192aa8f1599867f3e.zip |
qweqwe
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)) |