diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-30 16:50:13 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-30 16:50:13 +0200 |
commit | c8e12617e07762d65bc7c74ecc55e279c3267b84 (patch) | |
tree | 2114b7906acdef1d5d5f2c580c62d612bf4819ca /src/ft_get_sprite_spawns.c | |
parent | Fixed conditionnal jump btw (diff) | |
download | 42-cub3d-c8e12617e07762d65bc7c74ecc55e279c3267b84.tar.gz 42-cub3d-c8e12617e07762d65bc7c74ecc55e279c3267b84.tar.bz2 42-cub3d-c8e12617e07762d65bc7c74ecc55e279c3267b84.tar.xz 42-cub3d-c8e12617e07762d65bc7c74ecc55e279c3267b84.tar.zst 42-cub3d-c8e12617e07762d65bc7c74ecc55e279c3267b84.zip |
Commit
Diffstat (limited to 'src/ft_get_sprite_spawns.c')
-rw-r--r-- | src/ft_get_sprite_spawns.c | 10 |
1 files changed, 10 insertions, 0 deletions
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); } |