mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 09:58:09 +01:00
feat: Made zombies killable
Code is almost normed I will make a function to handle sprites interractions
This commit is contained in:
parent
46b40540dc
commit
37bb56733e
6 changed files with 37 additions and 10 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/08/18 13:05:31 by kcolin #+# #+# */
|
||||
/* Updated: 2025/09/15 13:05:37 by tchampio ### ########.fr */
|
||||
/* Updated: 2025/09/15 15:39:44 by tchampio ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -53,8 +53,11 @@ void destroy_sprites(t_cub3d_data *data)
|
|||
return ;
|
||||
while (data->sprite_list[sprite] && sprite < MAX_SPRITES)
|
||||
{
|
||||
mlx_destroy_image(data->mlx, data->sprite_list[sprite]->image->img);
|
||||
free(data->sprite_list[sprite]->image);
|
||||
if (data->sprite_list[sprite]->sprite_type != DEAD_ZOMBIE)
|
||||
{
|
||||
mlx_destroy_image(data->mlx, data->sprite_list[sprite]->image->img);
|
||||
free(data->sprite_list[sprite]->image);
|
||||
}
|
||||
free(data->sprite_list[sprite]);
|
||||
sprite++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue