diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-18 17:28:48 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-18 17:28:48 +0100 |
commit | b1e33121f7dc4e0c5fff3bc9e384018590371407 (patch) | |
tree | 55a466dc65cb69341301eb3410ad3a81763094d8 /src/ft_check_missing.c | |
parent | Player position fix (diff) | |
download | 42-cub3d-b1e33121f7dc4e0c5fff3bc9e384018590371407.tar.gz 42-cub3d-b1e33121f7dc4e0c5fff3bc9e384018590371407.tar.bz2 42-cub3d-b1e33121f7dc4e0c5fff3bc9e384018590371407.tar.xz 42-cub3d-b1e33121f7dc4e0c5fff3bc9e384018590371407.tar.zst 42-cub3d-b1e33121f7dc4e0c5fff3bc9e384018590371407.zip |
Minimap back
Diffstat (limited to '')
-rw-r--r-- | src/ft_check_missing.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/ft_check_missing.c b/src/ft_check_missing.c index a17bdea..4d06276 100644 --- a/src/ft_check_missing.c +++ b/src/ft_check_missing.c @@ -14,15 +14,6 @@ #include <cub3d.h> #include <unistd.h> -int - ft_missing_error(const char *err, t_cub *clist) -{ - ft_dprintf(STDERR_FILENO, "Error\n"); - ft_dprintf(STDERR_FILENO, - "\033[1;31m%s %s\033[0m\n", FT_ERR_MISS_ELEMENT, err); - return (ft_exit(FT_ERR_MISSING, clist)); -} - static int ft_check_missing_sfx(t_cub *clist) { @@ -60,6 +51,18 @@ static int } static int + ft_check_missing_tex_defines(t_cub *clist) +{ + if (ft_check_not_found(FT_DEATH_SCREEN_PATH) < 0 || + ft_check_ext(FT_DEATH_SCREEN_PATH, ".xpm") < 0) + return (ft_missing_error(FT_ERR_MISS_DEATH_SCREEN, clist)); + if (ft_check_not_found(FT_HUD_BACK_PATH) < 0 || + ft_check_ext(FT_HUD_BACK_PATH, ".xpm") < 0) + return (ft_missing_error(FT_ERR_MISS_HUD_BACK, clist)); + return (ft_check_missing_sprites(clist)); +} + +static int ft_check_missing_norme(t_cub *clist) { if (!clist->mlist.isftex) @@ -82,10 +85,7 @@ static int return (ft_missing_error(FT_ERR_MISS_NLVL_PATH, clist)); if (clist->mlist.istraps && !clist->mlist.traps_path[0]) return (ft_missing_error(FT_ERR_MISS_TRAP, clist)); - if (ft_check_not_found(FT_DEATH_SCREEN_PATH) < 0 || - ft_check_ext(FT_DEATH_SCREEN_PATH, ".xpm") < 0) - return (ft_missing_error(FT_ERR_MISS_DEATH_SCREEN, clist)); - return (ft_check_missing_sprites(clist)); + return (ft_check_missing_tex_defines(clist)); } int |