diff options
author | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2020-03-09 17:41:08 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2020-03-09 17:41:08 +0100 |
commit | fffd37b3423720af58c416221ffbdbc5960b1439 (patch) | |
tree | d5f8c2946fff86e5bcc533484cf886bfd92c048e /src/ft_tex_init.c | |
parent | Perf (diff) | |
download | 42-cub3d-fffd37b3423720af58c416221ffbdbc5960b1439.tar.gz 42-cub3d-fffd37b3423720af58c416221ffbdbc5960b1439.tar.bz2 42-cub3d-fffd37b3423720af58c416221ffbdbc5960b1439.tar.xz 42-cub3d-fffd37b3423720af58c416221ffbdbc5960b1439.tar.zst 42-cub3d-fffd37b3423720af58c416221ffbdbc5960b1439.zip |
Norme
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); } |