aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_check_missing_defines.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-04 17:31:04 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-04 17:31:04 +0200
commit07ce2cc784a0d420fbc807244847b55389427f6c (patch)
tree9ccd0f73be06633204d80f92c35f191cb9bbd1ff /src/ft_check_missing_defines.c
parentMerge branch 'adventures' into bad_boy_select (diff)
download42-cub3d-07ce2cc784a0d420fbc807244847b55389427f6c.tar.gz
42-cub3d-07ce2cc784a0d420fbc807244847b55389427f6c.tar.bz2
42-cub3d-07ce2cc784a0d420fbc807244847b55389427f6c.tar.xz
42-cub3d-07ce2cc784a0d420fbc807244847b55389427f6c.tar.zst
42-cub3d-07ce2cc784a0d420fbc807244847b55389427f6c.zip
Selectable enemy
Diffstat (limited to '')
-rw-r--r--src/ft_check_missing_defines.c25
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));
}