aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_sfx_new_level.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_sfx_new_level.c (renamed from src/ft_sfx_footstep.c)22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/ft_sfx_footstep.c b/src/ft_sfx_new_level.c
index e629a7b..05e9059 100644
--- a/src/ft_sfx_footstep.c
+++ b/src/ft_sfx_new_level.c
@@ -1,7 +1,7 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
-/* ft_sfx_trap.c :+: :+: :+: */
+/* ft_sfx_new_level.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
@@ -12,25 +12,13 @@
#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)
+ ft_sfx_new_level(t_cub *cl)
{
- static uint8_t ref = 0;
-
- cl->sfx.footstep_pid = fork();
- if (cl->sfx.footstep_pid == 0)
+ cl->sfx.new_lvl_pid = fork();
+ if (cl->sfx.new_lvl_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);
+ execve(*(cl->sfx.new_lvl + 0), cl->sfx.new_lvl, cl->envp);
}
}