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.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/ft_tex_init.c b/src/ft_tex_init.c
index effe6a1..a6eec43 100644
--- a/src/ft_tex_init.c
+++ b/src/ft_tex_init.c
@@ -38,25 +38,22 @@
** 17: heal pack
** 18: weapon one sprite
** 19: weapon two sprite
-** 20: weapon two sprite
+** 20: weapon three sprite
+** 21: health caption
+** 22: ammo caption
*/
static void
- ft_next_sprite_init(t_cub *cl)
+ ft_wall_tex_init_even_more_bonus(t_cub *cl)
{
- uint8_t i;
-
- i = 1;
- while (cl->mlist.sprite_path[i][0])
- {
- cl->tlist[i + 7].img = mlx_xpm_file_to_image(cl->wlist.wlx,
- cl->mlist.sprite_path[i], &cl->tlist[i + 7].img_w,
- &cl->tlist[i + 7].img_h);
- cl->tlist[i + 7].ptr = mlx_get_data_addr(cl->tlist[i + 7].img,
- &cl->tlist[i + 7].bpp, &cl->tlist[i + 7].sizeline,
- &cl->tlist[i + 7].endian);
- i++;
- }
+ cl->tlist[21].img = mlx_xpm_file_to_image(cl->wlist.wlx,
+ FT_CAP_HEALTH_PATH, &cl->tlist[21].img_w, &cl->tlist[21].img_h);
+ cl->tlist[21].ptr = mlx_get_data_addr(cl->tlist[21].img,
+ &cl->tlist[21].bpp, &cl->tlist[21].sizeline, &cl->tlist[21].endian);
+ cl->tlist[22].img = mlx_xpm_file_to_image(cl->wlist.wlx,
+ FT_CAP_AMMO_PATH, &cl->tlist[22].img_w, &cl->tlist[22].img_h);
+ cl->tlist[22].ptr = mlx_get_data_addr(cl->tlist[22].img,
+ &cl->tlist[22].bpp, &cl->tlist[22].sizeline, &cl->tlist[22].endian);
}
static void
@@ -78,6 +75,7 @@ static void
FT_WEAPON_THREE_SPR_PATH, &cl->tlist[20].img_w, &cl->tlist[20].img_h);
cl->tlist[20].ptr = mlx_get_data_addr(cl->tlist[20].img,
&cl->tlist[20].bpp, &cl->tlist[20].sizeline, &cl->tlist[20].endian);
+ ft_wall_tex_init_even_more_bonus(cl);
cl->walltexgood = 1;
if (cl->mlist.sprite_var > 1)
ft_next_sprite_init(cl);