diff options
Diffstat (limited to 'src/ft_check_missing_defines.c')
-rw-r--r-- | src/ft_check_missing_defines.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/ft_check_missing_defines.c b/src/ft_check_missing_defines.c index 932bb93..6c616b0 100644 --- a/src/ft_check_missing_defines.c +++ b/src/ft_check_missing_defines.c @@ -60,15 +60,30 @@ static int static int ft_check_missing_more_tex_defines(t_cub *clist) { - if (ft_check_not_found(FT_ENMY_WAIT_PATH) < 0 || + if (clist->mlist.enemy == 1) + { + if (ft_check_not_found(FT_ENMY_WAIT_PATH) < 0 || ft_check_ext(FT_ENMY_WAIT_PATH, ".xpm") < 0 || - ft_check_not_found(FT_ENMY_WALK_PATH) < 0 || + ft_check_not_found(FT_ENMY_WALK_PATH) < 0 || ft_check_ext(FT_ENMY_WALK_PATH, ".xpm") < 0 || - ft_check_not_found(FT_ENMY_FIRE_PATH) < 0 || + ft_check_not_found(FT_ENMY_FIRE_PATH) < 0 || ft_check_ext(FT_ENMY_FIRE_PATH, ".xpm") < 0 || - ft_check_not_found(FT_ENMY_DEAD_PATH) < 0 || + ft_check_not_found(FT_ENMY_DEAD_PATH) < 0 || ft_check_ext(FT_ENMY_DEAD_PATH, ".xpm") < 0) - return (ft_missing_error(FT_ERR_MISS_ENMY, clist)); + return (ft_missing_error(FT_ERR_MISS_ENMY, clist)); + } + else + { + if (ft_check_not_found(FT_CB_WAIT_PATH) < 0 || + ft_check_ext(FT_CB_WAIT_PATH, ".xpm") < 0 || + ft_check_not_found(FT_ENMY_WALK_PATH) < 0 || + ft_check_ext(FT_CB_WALK_PATH, ".xpm") < 0 || + ft_check_not_found(FT_CB_FIRE_PATH) < 0 || + ft_check_ext(FT_CB_FIRE_PATH, ".xpm") < 0 || + ft_check_not_found(FT_CB_DEAD_PATH) < 0 || + ft_check_ext(FT_CB_DEAD_PATH, ".xpm") < 0) + return (ft_missing_error(FT_ERR_MISS_ENMY, clist)); + } return (ft_check_missing_number_defines(clist)); } |