aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_check_missing_sfx.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-31 16:19:22 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-31 16:19:22 +0200
commit2ea18fb7e893691389108ae7731e26576715ca13 (patch)
treec6a4ccfb785ff7289279d6b08997939c36b4c9ca /src/ft_check_missing_sfx.c
parentGood (diff)
download42-cub3d-2ea18fb7e893691389108ae7731e26576715ca13.tar.gz
42-cub3d-2ea18fb7e893691389108ae7731e26576715ca13.tar.bz2
42-cub3d-2ea18fb7e893691389108ae7731e26576715ca13.tar.xz
42-cub3d-2ea18fb7e893691389108ae7731e26576715ca13.tar.zst
42-cub3d-2ea18fb7e893691389108ae7731e26576715ca13.zip
Alright sounds
Diffstat (limited to 'src/ft_check_missing_sfx.c')
-rw-r--r--src/ft_check_missing_sfx.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/ft_check_missing_sfx.c b/src/ft_check_missing_sfx.c
index 34d08e2..0d4411a 100644
--- a/src/ft_check_missing_sfx.c
+++ b/src/ft_check_missing_sfx.c
@@ -14,6 +14,21 @@
#include <cub3d.h>
static int
+ ft_check_missing_enemy_sfx(t_cub *clist)
+{
+ if (ft_check_not_found(FT_SFX_ENMY_DEATH_PATH) < 0 ||
+ ft_check_ext(FT_SFX_ENMY_DEATH_PATH, ".wav") < 0 ||
+ ft_check_not_found(FT_SFX_ENMY_SCR_ONE_PATH) < 0 ||
+ ft_check_ext(FT_SFX_ENMY_SCR_ONE_PATH, ".wav") < 0 ||
+ ft_check_not_found(FT_SFX_ENMY_SCR_TWO_PATH) < 0 ||
+ ft_check_ext(FT_SFX_ENMY_SCR_TWO_PATH, ".wav") < 0 ||
+ ft_check_not_found(FT_SFX_ENMY_FIRE_PATH) < 0 ||
+ ft_check_ext(FT_SFX_ENMY_FIRE_PATH, ".wav") < 0)
+ return (ft_missing_error(FT_ERR_MISS_SFX_ENMY, clist));
+ return (0);
+}
+
+static int
ft_check_missing_weapon_sfx(t_cub *clist)
{
if (ft_check_not_found(FT_SFX_W_ONE_LOAD_PATH) < 0 ||
@@ -37,7 +52,7 @@ static int
if (ft_check_not_found(FT_SFX_OOA_PATH) < 0 ||
ft_check_ext(FT_SFX_OOA_PATH, ".wav") < 0)
return (ft_missing_error(FT_ERR_MISS_SFX_OOA, clist));
- return (0);
+ return (ft_check_missing_enemy_sfx(clist));
}
int