diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-14 01:06:59 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-14 01:06:59 +0100 |
commit | a383bde7d29293919eb635aeb14760a7a55e12b3 (patch) | |
tree | 76000460117d1ab1348d98a03e2c92215755fde8 /src/ft_sfx_footstep.c | |
parent | Fuck threads and forks (diff) | |
download | 42-cub3d-a383bde7d29293919eb635aeb14760a7a55e12b3.tar.gz 42-cub3d-a383bde7d29293919eb635aeb14760a7a55e12b3.tar.bz2 42-cub3d-a383bde7d29293919eb635aeb14760a7a55e12b3.tar.xz 42-cub3d-a383bde7d29293919eb635aeb14760a7a55e12b3.tar.zst 42-cub3d-a383bde7d29293919eb635aeb14760a7a55e12b3.zip |
Removed footsteps, in progress
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); - } -} |