diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-09 01:52:21 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-09 01:52:21 +0100 |
commit | c51419a68e38ed3a2eb28e740f72eaa436fbd106 (patch) | |
tree | 4cafa4ee075be34b32132c54fdda87c7ec996695 /src/ft_tex_init.c | |
parent | Nigga my gun go off (diff) | |
download | 42-cub3d-c51419a68e38ed3a2eb28e740f72eaa436fbd106.tar.gz 42-cub3d-c51419a68e38ed3a2eb28e740f72eaa436fbd106.tar.bz2 42-cub3d-c51419a68e38ed3a2eb28e740f72eaa436fbd106.tar.xz 42-cub3d-c51419a68e38ed3a2eb28e740f72eaa436fbd106.tar.zst 42-cub3d-c51419a68e38ed3a2eb28e740f72eaa436fbd106.zip |
Boy
Diffstat (limited to '')
-rw-r--r-- | src/ft_tex_init.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ft_tex_init.c b/src/ft_tex_init.c index 116f537..599e902 100644 --- a/src/ft_tex_init.c +++ b/src/ft_tex_init.c @@ -42,6 +42,15 @@ static void &cl->tlist[6].bpp, &cl->tlist[6].sizeline, &cl->tlist[6].endian); } +static void + ft_get_ceil_tex(t_cub *cl) +{ + cl->tlist[7].img = mlx_xpm_file_to_image(cl->wlist.wlx, + cl->mlist.no_tex_path, &cl->tlist[7].img_w, &cl->tlist[7].img_h); + cl->tlist[7].ptr = mlx_get_data_addr(cl->tlist[7].img, + &cl->tlist[7].bpp, &cl->tlist[7].sizeline, &cl->tlist[7].endian); +} + void ft_wall_tex_init(t_cub *cl) { @@ -68,5 +77,6 @@ void if (cl->mlist.isnlvl) ft_get_nlvl_img(cl); ft_get_floor_tex(cl); + ft_get_ceil_tex(cl); cl->walltexgood = 1; } |