aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_sfx_footstep.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-19 21:59:13 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-19 21:59:13 +0100
commitb135ba89ccceffa88356cc25f256b0cb2adbd88c (patch)
tree1e87c98d28857abfea2c5199dfdf77516ab28898 /src/ft_sfx_footstep.c
parentRework in progress (diff)
download42-cub3d-b135ba89ccceffa88356cc25f256b0cb2adbd88c.tar.gz
42-cub3d-b135ba89ccceffa88356cc25f256b0cb2adbd88c.tar.bz2
42-cub3d-b135ba89ccceffa88356cc25f256b0cb2adbd88c.tar.xz
42-cub3d-b135ba89ccceffa88356cc25f256b0cb2adbd88c.tar.zst
42-cub3d-b135ba89ccceffa88356cc25f256b0cb2adbd88c.zip
The og OOP
Diffstat (limited to '')
-rw-r--r--src/ft_sfx_footstep.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ft_sfx_footstep.c b/src/ft_sfx_footstep.c
index a6b2105..a940852 100644
--- a/src/ft_sfx_footstep.c
+++ b/src/ft_sfx_footstep.c
@@ -25,17 +25,17 @@ void
else
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
sfx = (t_sfx *)vargp;
- pthread_mutex_lock(&sfx->footstep_mutex);
+ pthread_mutex_lock(&sfx[1].mutex);
while (1)
{
ref = (ref > 201) ? (0) : (ref + 1);
- pthread_mutex_lock(&sfx->footstep_mutex);
+ pthread_mutex_lock(&sfx[1].mutex);
if (ref % 2)
{
- if (system(sfx->footstep_one))
+ if (system(sfx[1].cmd))
pthread_exit(NULL);
}
- else if (system(sfx->footstep_two))
+ else if (system(sfx[1].cmd_alt))
pthread_exit(NULL);
}
return (NULL);
@@ -44,5 +44,5 @@ void
void
ft_sfx_footstep(t_sfx *sfx)
{
- pthread_mutex_unlock(&cl->sfx.footstep_mutex);
+ pthread_mutex_unlock(&sfx[1].mutex);
}