aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_treat_args.c
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2020-03-11 18:59:58 +0100
committersalaaad2 <arthurdurant263@gmail.com>2020-03-11 18:59:58 +0100
commitb6388b5101d8187f746f91c89842e932a1d01cb6 (patch)
tree70bd9ba7012f5906db01b485ec8f58f5a4697240 /src/ft_treat_args.c
parentclose but no cigar (diff)
parentca tue (diff)
download42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.tar.gz
42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.tar.bz2
42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.tar.xz
42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.tar.zst
42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.zip
get merged
Diffstat (limited to 'src/ft_treat_args.c')
-rw-r--r--src/ft_treat_args.c9
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))