aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_del_extra_sprites.c
blob: 21df608e6d9ffcaf82fbe305edd00c8b539b7420 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   ft_key_loop.c                                      :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: rbousset <marvin@42.fr>                    +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2020/02/17 20:06:26 by rbousset          #+#    #+#             */
/*   Updated: 2020/02/17 20:06:29 by rbousset         ###   ########lyon.fr   */
/*                                                                            */
/* ************************************************************************** */

#include <libft.h>
#include <cub3d.h>
#include <mlx.h>
#include <stdint.h>
#include <stddef.h>

void
	ft_del_extra_sprites(t_cub *cl)
{
	uint8_t	i;

	i = 1;
	while ((i + 2) <= cl->mlist.topsp)
	{
		if (cl->tlist[i + 7].img)
			mlx_destroy_image(cl->wlist.wlx, cl->tlist[i + 7].img);
		i++;
	}
}