diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-04 17:39:46 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-04 17:39:46 +0200 |
commit | 6161b36ffd9cb5873c245951d97ea51c977fe9e6 (patch) | |
tree | 811da882466c25a1fd311c3aaf619f5dca46839b /src/ft_tex_init.c | |
parent | Selectable enemy (diff) | |
download | 42-cub3d-6161b36ffd9cb5873c245951d97ea51c977fe9e6.tar.gz 42-cub3d-6161b36ffd9cb5873c245951d97ea51c977fe9e6.tar.bz2 42-cub3d-6161b36ffd9cb5873c245951d97ea51c977fe9e6.tar.xz 42-cub3d-6161b36ffd9cb5873c245951d97ea51c977fe9e6.tar.zst 42-cub3d-6161b36ffd9cb5873c245951d97ea51c977fe9e6.zip |
Consitent heals
Diffstat (limited to '')
-rw-r--r-- | src/ft_tex_init.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/ft_tex_init.c b/src/ft_tex_init.c index d629f76..c034ce3 100644 --- a/src/ft_tex_init.c +++ b/src/ft_tex_init.c @@ -98,10 +98,20 @@ static void } 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); + if (cl->mlist.enemy == 1) + { + 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); + } + else + { + cl->tlist[17].img = mlx_xpm_file_to_image(cl->wlist.wlx, + FT_WHISK_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_more_bonus(cl); } |