Valid map file
This commit is contained in:
40
src/execution/frees.c
Normal file
40
src/execution/frees.c
Normal 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
14
src/execution/movement.c
Normal 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"
|
||||
|
||||
Reference in New Issue
Block a user