aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_check_missing.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-19 13:28:52 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-19 13:28:52 +0100
commitf57f187a59840d07cd47058022c44d464ad76522 (patch)
tree22d7e5be602a8dbd21999e43760a1fc0d0b0fdb7 /src/ft_check_missing.c
parentINTENSE mapping (diff)
download42-cub3d-f57f187a59840d07cd47058022c44d464ad76522.tar.gz
42-cub3d-f57f187a59840d07cd47058022c44d464ad76522.tar.bz2
42-cub3d-f57f187a59840d07cd47058022c44d464ad76522.tar.xz
42-cub3d-f57f187a59840d07cd47058022c44d464ad76522.tar.zst
42-cub3d-f57f187a59840d07cd47058022c44d464ad76522.zip
Loaded weapon images needs to memory
Diffstat (limited to 'src/ft_check_missing.c')
-rw-r--r--src/ft_check_missing.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/ft_check_missing.c b/src/ft_check_missing.c
index fcebf3f..4b4a3ef 100644
--- a/src/ft_check_missing.c
+++ b/src/ft_check_missing.c
@@ -40,6 +40,15 @@ static int
{
int8_t i;
+ if (ft_check_not_found(FT_WEAPON_ONE_SPR_PATH) < 0 ||
+ ft_check_ext(FT_WEAPON_ONE_SPR_PATH, ".xpm") < 0)
+ return (ft_missing_error(FT_ERR_MISS_W_ONE_SPR, clist));
+ if (ft_check_not_found(FT_WEAPON_TWO_SPR_PATH) < 0 ||
+ ft_check_ext(FT_WEAPON_TWO_SPR_PATH, ".xpm") < 0)
+ return (ft_missing_error(FT_ERR_MISS_W_TWO_SPR, clist));
+ if (ft_check_not_found(FT_HEAL_PACK_PATH) < 0 ||
+ ft_check_ext(FT_HEAL_PACK_PATH, ".xpm") < 0)
+ return (ft_missing_error(FT_ERR_MISS_HEAL_PACK, clist));
i = 0;
while ((i + 2) <= clist->mlist.topsp)
{
@@ -71,9 +80,6 @@ static int
if (ft_check_not_found(FT_WEAPON_TWO_FIRE_PATH) < 0 ||
ft_check_ext(FT_WEAPON_TWO_FIRE_PATH, ".xpm") < 0)
return (ft_missing_error(FT_ERR_MISS_W_TWO_FIRE, clist));
- if (ft_check_not_found(FT_HEAL_PACK_PATH) < 0 ||
- ft_check_ext(FT_HEAL_PACK_PATH, ".xpm") < 0)
- return (ft_missing_error(FT_ERR_MISS_HEAL_PACK, clist));
return (ft_check_missing_sprites(clist));
}