First shot on structures, First shot on option
option:
Added options for help, debug, save, file using bgoulard lib
structures:
Moved cub3d.h structures to cub3d_struct.h
Added color, dpoint, ipoint, tile, cli, error
Modified t_map, t_player to use previously mentioned struct :
ipoint, dpoint, tyle
This commit is contained in:
parent
be6038dcc8
commit
8ee1c5f85a
14 changed files with 580 additions and 79 deletions
38
sources/cleanups.c
Normal file
38
sources/cleanups.c
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* cleanups.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: bgoulard <bgoulard@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/11/09 01:11:01 by bgoulard #+# #+# */
|
||||
/* Updated: 2024/11/09 01:11:45 by bgoulard ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "cub3d_struct.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
static void cleanup_cli(t_cli *cli_ctx)
|
||||
{
|
||||
if (cli_ctx->file)
|
||||
free(cli_ctx->file);
|
||||
}
|
||||
|
||||
static void cleanup_map(t_map *map)
|
||||
{
|
||||
(void)map;
|
||||
}
|
||||
|
||||
static void cleanup_mlx(t_info *info)
|
||||
{
|
||||
(void)info;
|
||||
}
|
||||
|
||||
void cleanup_info(t_info *info)
|
||||
{
|
||||
cleanup_cli(&info->cli_ctx);
|
||||
cleanup_map(&info->map);
|
||||
cleanup_mlx(info);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue