aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_tex_init.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-28 15:43:11 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-28 15:43:11 +0100
commita3bbca59528b7c74369988b480e83b66224638ef (patch)
tree44eac6d8b8307976d53fda4733e10b4b3f1be531 /src/ft_tex_init.c
parentok (diff)
download42-cub3d-a3bbca59528b7c74369988b480e83b66224638ef.tar.gz
42-cub3d-a3bbca59528b7c74369988b480e83b66224638ef.tar.bz2
42-cub3d-a3bbca59528b7c74369988b480e83b66224638ef.tar.xz
42-cub3d-a3bbca59528b7c74369988b480e83b66224638ef.tar.zst
42-cub3d-a3bbca59528b7c74369988b480e83b66224638ef.zip
Removed skybox shit
Diffstat (limited to 'src/ft_tex_init.c')
-rw-r--r--src/ft_tex_init.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/ft_tex_init.c b/src/ft_tex_init.c
index e2fef5e..1a58421 100644
--- a/src/ft_tex_init.c
+++ b/src/ft_tex_init.c
@@ -84,6 +84,13 @@ static void
static void
ft_wall_tex_init_next_bonus(t_cub *cl)
{
+ if (cl->mlist.istraps)
+ {
+ cl->tlist[15].img = mlx_xpm_file_to_image(cl->wlist.wlx,
+ cl->mlist.traps_path, &cl->tlist[15].img_w, &cl->tlist[15].img_h);
+ cl->tlist[15].ptr = mlx_get_data_addr(cl->tlist[15].img,
+ &cl->tlist[15].bpp, &cl->tlist[15].sizeline, &cl->tlist[15].endian);
+ }
if (cl->mlist.isheals)
{
cl->tlist[17].img = mlx_xpm_file_to_image(cl->wlist.wlx,
@@ -91,13 +98,6 @@ static void
cl->tlist[17].ptr = mlx_get_data_addr(cl->tlist[17].img,
&cl->tlist[17].bpp, &cl->tlist[17].sizeline, &cl->tlist[17].endian);
}
- else if (cl->mlist.isctex)
- {
- 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->tlist[7].ptr = mlx_get_data_addr(cl->tlist[7].img,
- &cl->tlist[7].bpp, &cl->tlist[7].sizeline, &cl->tlist[7].endian);
- }
ft_wall_tex_init_more_bonus(cl);
}
@@ -118,12 +118,12 @@ static void
cl->tlist[6].ptr = mlx_get_data_addr(cl->tlist[6].img,
&cl->tlist[6].bpp, &cl->tlist[6].sizeline, &cl->tlist[6].endian);
}
- if (cl->mlist.istraps)
+ if (cl->mlist.isctex)
{
- cl->tlist[15].img = mlx_xpm_file_to_image(cl->wlist.wlx,
- cl->mlist.traps_path, &cl->tlist[15].img_w, &cl->tlist[15].img_h);
- cl->tlist[15].ptr = mlx_get_data_addr(cl->tlist[15].img,
- &cl->tlist[15].bpp, &cl->tlist[15].sizeline, &cl->tlist[15].endian);
+ 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->tlist[7].ptr = mlx_get_data_addr(cl->tlist[7].img,
+ &cl->tlist[7].bpp, &cl->tlist[7].sizeline, &cl->tlist[7].endian);
}
ft_wall_tex_init_next_bonus(cl);
}