aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_get_spawns.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_get_spawns.c (renamed from src/ft_get_topsp.c)24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/ft_get_topsp.c b/src/ft_get_spawns.c
index ee16714..6422785 100644
--- a/src/ft_get_topsp.c
+++ b/src/ft_get_spawns.c
@@ -1,30 +1,26 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
-/* ft_check_map_line.c :+: :+: :+: */
+/* ft_get_sprite_spawns.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
-/* Created: 2020/02/14 17:28:34 by rbousset #+# #+# */
-/* Updated: 2020/02/14 17:28:37 by rbousset ### ########lyon.fr */
+/* Created: 2020/02/14 17:28:51 by rbousset #+# #+# */
+/* Updated: 2020/02/14 17:28:51 by rbousset ### ########lyon.fr */
/* */
/* ************************************************************************** */
#include <libft.h>
#include <cub3d.h>
-#include <stddef.h>
#include <stdint.h>
void
- ft_get_topsp(char c, t_cub *clist)
+ ft_get_spawns(t_cub *cl)
{
- int8_t x;
-
- if ((x = ft_strlchr(FT_CHRST_SPRITES, c)) > 0)
- {
- if ((x + 2) > clist->mlist.topsp)
- {
- clist->mlist.topsp = x + 2;
- }
- }
+ ft_get_player_spawn(&cl->plist, cl);
+ ft_get_sprite_spawn(cl);
+ ft_get_trap_spawn(cl);
+ ft_get_heal_spawn(cl);
+ if (cl->isdead == 0)
+ ft_get_weapon_spawn(cl);
}