aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_sfx_pain.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_pain.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 'src/ft_sfx_pain.c')
-rw-r--r--src/ft_sfx_pain.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ft_sfx_pain.c b/src/ft_sfx_pain.c
index fe9ecaa..890f38c 100644
--- a/src/ft_sfx_pain.c
+++ b/src/ft_sfx_pain.c
@@ -25,17 +25,17 @@ void
else
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
sfx = (t_sfx *)vargp;
- pthread_mutex_lock(&sfx->pain_mutex);
+ pthread_mutex_lock(&sfx[3].mutex);
while (1)
{
- pthread_mutex_lock(&sfx->pain_mutex);
+ pthread_mutex_lock(&sfx[3].mutex);
ref = (ref > 201) ? (0) : (ref + 1);
if (ref % 3)
{
- if (system(sfx->pain_one))
+ if (system(sfx[3].cmd))
pthread_exit(NULL);
}
- else if (system(sfx->pain_two))
+ else if (system(sfx[3].cmd_alt))
pthread_exit(NULL);
}
return (NULL);
@@ -48,5 +48,5 @@ void
ref = (ref > 201) ? (0) : (ref + 1);
if (ref % 2)
- pthread_mutex_unlock(&cl->sfx.pain_mutex);
+ pthread_mutex_unlock(&sfx[3].mutex);
}