diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-13 01:44:22 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-13 01:44:22 +0100 |
commit | b744a677218df528502b5eb769a52ef294ebbac6 (patch) | |
tree | 9e3f733698197d975c26e838e73e4283b02a87c8 /src | |
parent | Reduced musics volume (diff) | |
download | 42-cub3d-b744a677218df528502b5eb769a52ef294ebbac6.tar.gz 42-cub3d-b744a677218df528502b5eb769a52ef294ebbac6.tar.bz2 42-cub3d-b744a677218df528502b5eb769a52ef294ebbac6.tar.xz 42-cub3d-b744a677218df528502b5eb769a52ef294ebbac6.tar.zst 42-cub3d-b744a677218df528502b5eb769a52ef294ebbac6.zip |
Added sound effects files
Diffstat (limited to 'src')
-rw-r--r-- | src/ft_check_missing.c | 22 | ||||
-rw-r--r-- | src/ft_get_music.c | 4 |
2 files changed, 23 insertions, 3 deletions
diff --git a/src/ft_check_missing.c b/src/ft_check_missing.c index d01a77f..e349d05 100644 --- a/src/ft_check_missing.c +++ b/src/ft_check_missing.c @@ -24,6 +24,26 @@ int } static int + ft_check_missing_sfx(t_cub *clist) +{ + if (ft_check_not_found(FT_SFX_DEATH_PATH) < 0) + return (ft_missing_error(FT_MISS_SFX_DEATH, clist)); + if (ft_check_not_found(FT_SFX_FS_ONE_PATH) < 0) + return (ft_missing_error(FT_ERR_MISS_SFX_FS_ONE, clist)); + if (ft_check_not_found(FT_SFX_FS_TWO_PATH) < 0) + return (ft_missing_error(FT_ERR_MISS_SFX_FS_TWO, clist)); + if (ft_check_not_found(FT_SFX_N_LVL_PATH) < 0) + return (ft_missing_error(FT_ERR_MISS_SFX_N_LVL, clist)); + if (ft_check_not_found(FT_SFX_SCR_ONE_PATH) < 0) + return (ft_missing_error(FT_ERR_MISS_SFX_SCR_ONE, clist)); + if (ft_check_not_found(FT_SFX_SCR_TWO_PATH) < 0) + return (ft_missing_error(FT_ERR_MISS_SFX_SCR_TWO, clist)); + if (ft_check_not_found(FT_SFX_TRAP_PATH) < 0) + return (ft_missing_error(FT_ERR_MISS_SFX_TRAP, clist)); + return (0); +} + +static int ft_check_missing_sprites(t_cub *clist) { int8_t i; @@ -35,7 +55,7 @@ static int return (ft_missing_error(FT_ERR_MISS_SPRITE, clist)); i++; } - return (0); + return (ft_check_missing_sfx(clist)); } static int diff --git a/src/ft_get_music.c b/src/ft_get_music.c index 7a8d36f..2383e0a 100644 --- a/src/ft_get_music.c +++ b/src/ft_get_music.c @@ -21,11 +21,11 @@ static int8_t uint8_t len; len = ft_strlen(mlist->music_path); - len += ft_strlen(FT_SND_CMD) - 2; + len += ft_strlen(FT_MUS_CMD) - 2; ft_memdel((void**)&mlist->music_cmd); if (!(mlist->music_cmd = (char *)malloc((len + 1) * sizeof(char)))) return (-1); - ft_sprintf(mlist->music_cmd, FT_SND_CMD, + ft_sprintf(mlist->music_cmd, FT_MUS_CMD, mlist->music_path); ft_free_words(mlist->mcmd_words); if (!(mlist->mcmd_words = ft_split(mlist->music_cmd, ' '))) |