diff options
Diffstat (limited to 'src/ft_sfx_footstep.c')
-rw-r--r-- | src/ft_sfx_footstep.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/ft_sfx_footstep.c b/src/ft_sfx_footstep.c deleted file mode 100644 index e629a7b..0000000 --- a/src/ft_sfx_footstep.c +++ /dev/null @@ -1,36 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* ft_sfx_trap.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* Created: 2020/02/24 17:17:54 by rbousset #+# #+# */ -/* Updated: 2020/02/24 17:17:56 by rbousset ### ########lyon.fr */ -/* */ -/* ************************************************************************** */ - -#include <cub3d.h> -#include <unistd.h> -#include <stdint.h> -#include <sys/types.h> -#include <sys/wait.h> -#include <unistd.h> - -void - ft_sfx_footstep(t_cub *cl) -{ - static uint8_t ref = 0; - - cl->sfx.footstep_pid = fork(); - if (cl->sfx.footstep_pid == 0) - { - ref = (ref > 201) ? (0) : (ref + 1); - if (ref % 2) - execve(*(cl->sfx.footstep_one + 0), - cl->sfx.footstep_one, cl->envp); - else - execve(*(cl->sfx.footstep_two + 0), - cl->sfx.footstep_two, cl->envp); - } -} |