Valid map file

This commit is contained in:
2025-12-05 17:11:31 +01:00
parent 7acb059c20
commit f693cda860
4 changed files with 174 additions and 8 deletions

40
src/execution/frees.c Normal file
View File

@@ -0,0 +1,40 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* frees.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/12/05 17:07:58 by aortigos #+# #+# */
/* Updated: 2025/12/05 17:10:05 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
#include "../../includes/cub3d.h"
void ft_delete_texture(t_texture *texture)
{
if (texture->no)
mlx_delete_texture(texture->no);
if (texture->so)
mlx_delete_texture(texture->so);
if (texture->we)
mlx_delete_texture(texture->we);
if (texture->ea)
mlx_delete_texture(texture->ea);
}
void ft_exit(t_mlx *mlx)
{
mlx_delete_image(mlx->mlx_ptr, mlx->img);
mlx_close_window(mlx->mlx_ptr);
freelist(&mlx->dt->t_list);
free_map(mlx->dt);
ft_delete_texture(mlx->tex);
ft_memfree(mlx->tex);
ft_memfree(mlx->ply);
ft_memfree(mlx->ray);
mlx_terminate(mlx->mlx_ptr);
ft_putstr_fd("END GAME\n", 1);
exit(0);
}

14
src/execution/movement.c Normal file
View File

@@ -0,0 +1,14 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* movement.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/12/05 17:11:09 by aortigos #+# #+# */
/* Updated: 2025/12/05 17:11:19 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
#include "../../includes/cub3d.h"