aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_tex_init.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-09 02:11:22 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-09 02:11:31 +0100
commit40108b83398240f50c6045bfb2bf114bded43c72 (patch)
tree61e0e483e31e17724b2dd7e1a70088659e5be1bd /src/ft_tex_init.c
parentBoy (diff)
download42-cub3d-40108b83398240f50c6045bfb2bf114bded43c72.tar.gz
42-cub3d-40108b83398240f50c6045bfb2bf114bded43c72.tar.bz2
42-cub3d-40108b83398240f50c6045bfb2bf114bded43c72.tar.xz
42-cub3d-40108b83398240f50c6045bfb2bf114bded43c72.tar.zst
42-cub3d-40108b83398240f50c6045bfb2bf114bded43c72.zip
Reparse, may not compile
Diffstat (limited to 'src/ft_tex_init.c')
-rw-r--r--src/ft_tex_init.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ft_tex_init.c b/src/ft_tex_init.c
index 599e902..1fce584 100644
--- a/src/ft_tex_init.c
+++ b/src/ft_tex_init.c
@@ -37,7 +37,7 @@ 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->mlist.fl_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);
}
@@ -46,7 +46,7 @@ static void
ft_get_ceil_tex(t_cub *cl)
{
cl->tlist[7].img = mlx_xpm_file_to_image(cl->wlist.wlx,
- cl->mlist.no_tex_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);
}
@@ -76,7 +76,9 @@ 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);
- ft_get_ceil_tex(cl);
+ if (cl->mlist.isftex)
+ ft_get_floor_tex(cl);
+ if (cl->mlist.isctex)
+ ft_get_ceil_tex(cl);
cl->walltexgood = 1;
}