From c8e12617e07762d65bc7c74ecc55e279c3267b84 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Mon, 30 Mar 2020 16:50:13 +0200 Subject: Commit --- src/ft_get_sprite_spawns.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/ft_get_sprite_spawns.c') diff --git a/src/ft_get_sprite_spawns.c b/src/ft_get_sprite_spawns.c index 21c4cb8..a573593 100644 --- a/src/ft_get_sprite_spawns.c +++ b/src/ft_get_sprite_spawns.c @@ -30,6 +30,10 @@ ** 10: weapon one - tlist[18] - 4 ** 11: weapon two - tlist[19] - 4 ** 12: weapon three - tlist[20] - 4 +** 13: enemy - tlist[23] | +** '- - - - - - - tlist[24] | +** '- - - - - - - tlist[25] | +** '- - - - - - - tlist[26] - 32 */ static void @@ -47,6 +51,8 @@ static void ft_map_error(FT_ERR_TOO_MUCH_W_TWO, cl); else if (s_n == 12 && cl->mlist.sprite_nbr[s_n] > 4) ft_map_error(FT_ERR_TOO_MUCH_W_THREE, cl); + else if (s_n == 13 && cl->mlist.sprite_nbr[s_n] > 32) + ft_map_error(FT_ERR_TOO_MUCH_ENMY, cl); } static int8_t @@ -62,6 +68,10 @@ static int8_t return (ft_get_next_sprite(cl, 11, '@', 0)); if (s_n + 1 == 12) return (ft_get_next_sprite(cl, 12, '#', 0)); + if (s_n + 1 == 13) + return (ft_get_next_sprite(cl, 13, 'e', 0)); + if (cl->mlist.sprite_nbr[13] > 0) + return (ft_init_bad_boys(cl)); return (0); } -- cgit v1.2.3