diff options
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; } |