aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_tex_init.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_tex_init.c26
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);
}