diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-08 02:47:01 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-08 02:47:01 +0100 |
commit | de7d432e18f4363e73b11f23885d7afd002a99f0 (patch) | |
tree | b2321f6c77d19147892541b2de619681372beeb0 /src/ft_tex_init.c | |
parent | Not great (diff) | |
download | 42-cub3d-de7d432e18f4363e73b11f23885d7afd002a99f0.tar.gz 42-cub3d-de7d432e18f4363e73b11f23885d7afd002a99f0.tar.bz2 42-cub3d-de7d432e18f4363e73b11f23885d7afd002a99f0.tar.xz 42-cub3d-de7d432e18f4363e73b11f23885d7afd002a99f0.tar.zst 42-cub3d-de7d432e18f4363e73b11f23885d7afd002a99f0.zip |
I'm close af
Diffstat (limited to 'src/ft_tex_init.c')
-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 c19bd20..116f537 100644 --- a/src/ft_tex_init.c +++ b/src/ft_tex_init.c @@ -33,6 +33,15 @@ static void &cl->tlist[5].bpp, &cl->tlist[5].sizeline, &cl->tlist[5].endian); } +static void + ft_get_floor_tex(t_cub *cl) +{ + cl->tlist[6].img = mlx_xpm_file_to_image(cl->wlist.wlx, + cl->mlist.no_tex_path, &cl->tlist[6].img_w, &cl->tlist[6].img_h); + cl->tlist[6].ptr = mlx_get_data_addr(cl->tlist[6].img, + &cl->tlist[6].bpp, &cl->tlist[6].sizeline, &cl->tlist[6].endian); +} + void ft_wall_tex_init(t_cub *cl) { @@ -58,5 +67,6 @@ void &cl->tlist[4].bpp, &cl->tlist[4].sizeline, &cl->tlist[4].endian); if (cl->mlist.isnlvl) ft_get_nlvl_img(cl); + ft_get_floor_tex(cl); cl->walltexgood = 1; } |