This commit is contained in:
kinou-p 2022-06-15 23:57:16 +02:00
parent 8fd76831b5
commit 2c03a2db66
2 changed files with 19 additions and 20 deletions

View File

@ -1,13 +1,13 @@
/* ************************************************************************** */ /* ************************************************************************** */
/* */ /* */
/* ::: :::::::: */ /* ::: :::::::: */
/* cast_ray.c :+: :+: :+: */ /* cast_ray.c :+: :+: :+: */
/* +:+ +:+ +:+ */ /* +:+ +:+ +:+ */
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */ /* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2022/05/04 18:08:14 by apommier #+# #+# */ /* Created: 2022/06/15 23:56:03 by apommier #+# #+# */
/* Updated: 2022/05/20 15:48:23 by apommier ### ########.fr */ /* Updated: 2022/06/15 23:56:06 by apommier ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "../../includes/Cub3D.h" #include "../../includes/Cub3D.h"

View File

@ -6,7 +6,7 @@
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */ /* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2022/06/15 18:48:45 by apommier #+# #+# */ /* Created: 2022/06/15 18:48:45 by apommier #+# #+# */
/* Updated: 2022/06/15 23:22:14 by apommier ### ########.fr */ /* Updated: 2022/06/15 23:41:56 by apommier ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -32,21 +32,20 @@ void ft_error(char *error_msg)
exit(1); exit(1);
} }
void ft_exit(char *str, t_data *img) void ft_exit(char *str, t_data *img)
{ {
ft_putstr_fd(str, 2); ft_putstr_fd(str, 2);
quit_game(img); quit_game(img);
} }
void check_dir(char *path, t_data *img) void check_dir(char *path, t_data *img)
{ {
int fd; int fd;
fd = open(path, O_DIRECTORY); fd = open(path, O_DIRECTORY);
if (fd >= 0) if (fd >= 0)
{ {
close(fd); close(fd);
ft_exit("Error\nPath is a directory and not a file\n", img); ft_exit("Error\nPath is a directory and not a file\n", img);
} }
} }