diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-15 14:26:29 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-15 14:26:29 +0100 |
commit | bcbe3db5345f86fcacb039039382f3130c933eea (patch) | |
tree | 36cb74b5e6d4c1b6ade5816ee821c58acbd4fd17 /inc | |
parent | Character is now FAT (diff) | |
download | 42-cub3d-bcbe3db5345f86fcacb039039382f3130c933eea.tar.gz 42-cub3d-bcbe3db5345f86fcacb039039382f3130c933eea.tar.bz2 42-cub3d-bcbe3db5345f86fcacb039039382f3130c933eea.tar.xz 42-cub3d-bcbe3db5345f86fcacb039039382f3130c933eea.tar.zst 42-cub3d-bcbe3db5345f86fcacb039039382f3130c933eea.zip |
Sounds have been threaded
Diffstat (limited to 'inc')
-rw-r--r-- | inc/cub3d.h | 3 | ||||
-rw-r--r-- | inc/cub3d_structs.h | 15 |
2 files changed, 12 insertions, 6 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h index a2c2aba..6905688 100644 --- a/inc/cub3d.h +++ b/inc/cub3d.h @@ -153,7 +153,10 @@ void ft_sfx_death(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_new_lvl_thread(void *vargp); +void *ft_sfx_death_thread(void *vargp); void *ft_sfx_pain_thread(void *vargp); +void *ft_sfx_trap_thread(void *vargp); /* ** ====== OTHER ====== diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 01c9b07..473fe9f 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -57,16 +57,19 @@ typedef struct s_bmp_info typedef struct s_sfx { - char **death; - char **new_lvl; + char *death; + char *new_lvl; char *pain_one; char *pain_two; - char **trap; - pid_t death_pid; - pid_t new_lvl_pid; + char *trap; + pthread_t death_tid; + pthread_t new_lvl_tid; pthread_t pain_tid; - pid_t trap_pid; + pthread_t trap_tid; + pthread_mutex_t death_mutex; + pthread_mutex_t new_lvl_mutex; pthread_mutex_t pain_mutex; + pthread_mutex_t trap_mutex; } t_sfx; typedef struct s_bmp_rgb |