mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 09:58:09 +01:00
normed + finished movements
This commit is contained in:
parent
cc12b7554a
commit
aa9f9bf6de
11 changed files with 200 additions and 121 deletions
|
|
@ -6,12 +6,13 @@
|
|||
/* By: tchampio <tchampio@student.42lehavre. +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/06/25 17:46:01 by tchampio #+# #+# */
|
||||
/* Updated: 2025/06/25 18:01:29 by tchampio ### ########.fr */
|
||||
/* Updated: 2025/07/15 10:26:48 by tchampio ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../../includes/cub3d_consts.h"
|
||||
#include "../../includes/structs.h"
|
||||
#include "../../mlx/mlx.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
void free_tab(char **tab)
|
||||
|
|
@ -40,3 +41,18 @@ void free_map(t_mapdata *map)
|
|||
free(map->filename);
|
||||
free(map);
|
||||
}
|
||||
|
||||
int destroy(t_cub3d_data *data)
|
||||
{
|
||||
free_map(data->map);
|
||||
if (data->mlx_win)
|
||||
mlx_destroy_window(data->mlx, data->mlx_win);
|
||||
if (data->mlx_data)
|
||||
mlx_destroy_image(data->mlx, data->mlx_data->img);
|
||||
free(data->mlx_data);
|
||||
if (data->mlx)
|
||||
mlx_destroy_display(data->mlx);
|
||||
free(data->mlx);
|
||||
exit(0);
|
||||
return (0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue