aboutsummaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-15 02:15:01 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-15 02:15:01 +0100
commitb992ca41965edf663f99bae19a95d59f2fd1ed97 (patch)
tree5a2014c5f8a5db44012bd81f5e6792170d7a55b1 /inc
parentI need a macOS (diff)
download42-cub3d-b992ca41965edf663f99bae19a95d59f2fd1ed97.tar.gz
42-cub3d-b992ca41965edf663f99bae19a95d59f2fd1ed97.tar.bz2
42-cub3d-b992ca41965edf663f99bae19a95d59f2fd1ed97.tar.xz
42-cub3d-b992ca41965edf663f99bae19a95d59f2fd1ed97.tar.zst
42-cub3d-b992ca41965edf663f99bae19a95d59f2fd1ed97.zip
okok
Diffstat (limited to 'inc')
-rw-r--r--inc/cub3d.h4
-rw-r--r--inc/cub3d_structs.h7
2 files changed, 7 insertions, 4 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h
index 6c9a010..a2c2aba 100644
--- a/inc/cub3d.h
+++ b/inc/cub3d.h
@@ -150,8 +150,10 @@ void ft_floor_cast_inits(uint16_t y, t_ray *rl, t_cub *cl);
*/
void ft_sfx_death(t_cub *cl);
-void ft_sfx_trap(t_cub *cl);
void ft_sfx_new_level(t_cub *cl);
+void ft_sfx_pain(t_cub *cl);
+void ft_sfx_trap(t_cub *cl);
+void *ft_sfx_pain_thread(void *vargp);
/*
** ====== OTHER ======
diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h
index aaf8498..01c9b07 100644
--- a/inc/cub3d_structs.h
+++ b/inc/cub3d_structs.h
@@ -59,13 +59,14 @@ typedef struct s_sfx
{
char **death;
char **new_lvl;
- char **pain_one;
- char **pain_two;
+ char *pain_one;
+ char *pain_two;
char **trap;
pid_t death_pid;
pid_t new_lvl_pid;
- pid_t pain_pid;
+ pthread_t pain_tid;
pid_t trap_pid;
+ pthread_mutex_t pain_mutex;
} t_sfx;
typedef struct s_bmp_rgb