Example #1
0
void	init(t_env *e)
{
	void	*libre;

	cursor(e);
	e->map = ft_lecture(e->stage->str, e);
	libre = e->stage;
	if (e->check_x != 500)
	{
		e->posx = e->check_x;
		e->posy = e->check_y;
		delete_check(e);
	}
	else
	{
		e->posx = e->enter_x;
		e->posy = e->enter_y;
	}
	vars_init(e);
	fill_texture(e);
	fill_obj(e);
	level_image(e);
	e->stage = e->stage->next;
	free(libre);
}
Example #2
0
void		parsing(int fd, t_overview *over)
{
	char *str;
	char *trim;

	while (get_next_line(fd, &str))
	{
		trim = ft_strtrim(str);
		if (!ft_strncmp("}", trim, 1))
			return ;
		if (!ft_strncmp("cam:", trim, 4))
			fill_cam(over, trim);
		else if (!ft_strncmp("obj:", trim, 4))
			fill_obj(fd, over);
	}
}
Example #3
0
void		ft_puissance4(char *s1, char *s2)
{
	t_tab		*obj;
	int			i;
	int			j;

	obj = NULL;
	if ((obj = fill_obj(s1, s2, obj)) == NULL)
		return ;
	i = ft_atoi(s1);
	j = ft_atoi(s2);
	obj->count_max = i * j;
	welcome(obj);
	obj->end = 0;
	ft_match(obj, 0);
	free_tab(obj->tab);
	free(obj);
	return ;
}