diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-14 19:34:06 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-14 19:34:06 +0100 |
commit | ee13e877d77ba62b28b7af510c7cc729987044ce (patch) | |
tree | 0c857982c626c87a9142cdf6d74e731676318433 /src/ft_tex_init.c | |
parent | In progress (diff) | |
download | 42-cub3d-ee13e877d77ba62b28b7af510c7cc729987044ce.tar.gz 42-cub3d-ee13e877d77ba62b28b7af510c7cc729987044ce.tar.bz2 42-cub3d-ee13e877d77ba62b28b7af510c7cc729987044ce.tar.xz 42-cub3d-ee13e877d77ba62b28b7af510c7cc729987044ce.tar.zst 42-cub3d-ee13e877d77ba62b28b7af510c7cc729987044ce.zip |
Elementary school math into leaks fix
Diffstat (limited to '')
-rw-r--r-- | src/ft_tex_init.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/ft_tex_init.c b/src/ft_tex_init.c index 9a6da10..298fbfc 100644 --- a/src/ft_tex_init.c +++ b/src/ft_tex_init.c @@ -17,21 +17,23 @@ #include <mlx.h> /* +** tlist[] index summary +** --------------------- ** 0 : no ** 1 : so ** 2 : ea ** 3 : we -** 4 : sprite 1 +** 4 : sprite 2 ** 5 : new level door ** 6 : floor ** 7 : ceil / skybox -** 8 : sprite 2 -** 9 : sprite 3 -** 10 : sprite 4 -** 11 : sprite 5 -** 12 : sprite 6 -** 13 : sprite 7 -** 14 : sprite 8 +** 8 : sprite 3 +** 9 : sprite 4 +** 10 : sprite 5 +** 11 : sprite 6 +** 12 : sprite 7 +** 13 : sprite 8 +** 14 : sprite 9 ** 15 : trap */ @@ -56,17 +58,17 @@ static void static void ft_wall_tex_init_norme_bis(t_cub *cl) { - if (cl->mlist.isctex) + if (cl->mlist.isskybox) { cl->tlist[7].img = mlx_xpm_file_to_image(cl->wlist.wlx, - cl->mlist.ce_tex_path, &cl->tlist[7].img_w, &cl->tlist[7].img_h); + cl->mlist.skybox_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); } - if (cl->mlist.isskybox) + else if (cl->mlist.isctex) { cl->tlist[7].img = mlx_xpm_file_to_image(cl->wlist.wlx, - cl->mlist.skybox_path, &cl->tlist[7].img_w, &cl->tlist[7].img_h); + cl->mlist.ce_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); } |