diff options
Diffstat (limited to 'src/ft_tex_init.c')
-rw-r--r-- | src/ft_tex_init.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/ft_tex_init.c b/src/ft_tex_init.c index 1fce584..adc7fd0 100644 --- a/src/ft_tex_init.c +++ b/src/ft_tex_init.c @@ -51,6 +51,18 @@ static void &cl->tlist[7].bpp, &cl->tlist[7].sizeline, &cl->tlist[7].endian); } +static void + ft_wall_tex_init_norme(t_cub *cl) +{ + if (cl->mlist.isnlvl) + ft_get_nlvl_img(cl); + if (cl->mlist.isftex) + ft_get_floor_tex(cl); + if (cl->mlist.isctex) + ft_get_ceil_tex(cl); + cl->walltexgood = 1; +} + void ft_wall_tex_init(t_cub *cl) { @@ -74,11 +86,5 @@ void cl->mlist.sprite_path, &cl->tlist[4].img_w, &cl->tlist[4].img_h); cl->tlist[4].ptr = mlx_get_data_addr(cl->tlist[4].img, &cl->tlist[4].bpp, &cl->tlist[4].sizeline, &cl->tlist[4].endian); - if (cl->mlist.isnlvl) - ft_get_nlvl_img(cl); - if (cl->mlist.isftex) - ft_get_floor_tex(cl); - if (cl->mlist.isctex) - ft_get_ceil_tex(cl); - cl->walltexgood = 1; + ft_wall_tex_init_norme(cl); } |