aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_tex_init.c
diff options
context:
space:
mode:
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;
}