aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_tex_init.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-18 21:35:54 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-18 21:35:54 +0100
commitd114d2571a3808eba1f0a5038ad862b790a96074 (patch)
tree8d2d4c19a2a8de61a253dc0a4fc2434a770470a6 /src/ft_tex_init.c
parentMerge branch 'better_sprites' (diff)
download42-cub3d-d114d2571a3808eba1f0a5038ad862b790a96074.tar.gz
42-cub3d-d114d2571a3808eba1f0a5038ad862b790a96074.tar.bz2
42-cub3d-d114d2571a3808eba1f0a5038ad862b790a96074.tar.xz
42-cub3d-d114d2571a3808eba1f0a5038ad862b790a96074.tar.zst
42-cub3d-d114d2571a3808eba1f0a5038ad862b790a96074.zip
In progress
Diffstat (limited to '')
-rw-r--r--src/ft_tex_init.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ft_tex_init.c b/src/ft_tex_init.c
index fe8aadd..6486e87 100644
--- a/src/ft_tex_init.c
+++ b/src/ft_tex_init.c
@@ -36,6 +36,7 @@
** 14 : sprite 9
** 15 : trap
** 16 : HUD back
+** 17 : heal pack
*/
static void
@@ -79,9 +80,7 @@ static void
&cl->tlist[16].bpp, &cl->tlist[16].sizeline, &cl->tlist[16].endian);
cl->walltexgood = 1;
if (cl->mlist.sprite_var > 1)
- {
ft_next_sprite_init(cl);
- }
}
static void
@@ -108,6 +107,13 @@ static void
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,
+ FT_HEAL_PACK_PATH, &cl->tlist[17].img_w, &cl->tlist[17].img_h);
+ cl->tlist[17].ptr = mlx_get_data_addr(cl->tlist[17].img,
+ &cl->tlist[17].bpp, &cl->tlist[17].sizeline, &cl->tlist[17].endian);
+ }
ft_wall_tex_init_norme_bis(cl);
}