aboutsummaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--inc/cub3d.h3
-rw-r--r--inc/cub3d_structs.h15
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