From 9f35e7fab50809cd74e3bfffff67a81023abc837 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 15 Mar 2020 01:02:32 +0100 Subject: I need a macOS --- inc/cub3d_structs.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'inc/cub3d_structs.h') diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 7545f3b..aaf8498 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -14,9 +14,9 @@ # define CUB3D_STRUCTS_H #include -#include #include #include +#include typedef struct s_win { @@ -189,7 +189,6 @@ typedef struct s_map char *mapl; char **sprite_path; char **map; - char **mcmd_words; int8_t x_step; int8_t y_step; size_t map_w; @@ -230,7 +229,7 @@ typedef struct s_cub char *const *envp; char errmsg[64]; int32_t key_input[5]; - pid_t mpid; + pthread_t mtid; int (*key_ptr[6])(struct s_cub*); int8_t (*get_ptr[14])(char**, struct s_cub*); char ref[22][3]; -- cgit v1.2.3 From b992ca41965edf663f99bae19a95d59f2fd1ed97 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 15 Mar 2020 02:15:01 +0100 Subject: okok --- inc/cub3d_structs.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'inc/cub3d_structs.h') 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 -- cgit v1.2.3 From bcbe3db5345f86fcacb039039382f3130c933eea Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 15 Mar 2020 14:26:29 +0100 Subject: Sounds have been threaded --- inc/cub3d_structs.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'inc/cub3d_structs.h') 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 -- cgit v1.2.3 From 163bed0c8988ff020b746bf96dc01dd2058dc4f9 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 15 Mar 2020 15:09:59 +0100 Subject: Footsteps are bav --- inc/cub3d_structs.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'inc/cub3d_structs.h') diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 473fe9f..2d1d00d 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -58,15 +58,19 @@ typedef struct s_bmp_info typedef struct s_sfx { char *death; + char *footstep_one; + char *footstep_two; char *new_lvl; char *pain_one; char *pain_two; char *trap; pthread_t death_tid; + pthread_t footstep_tid; pthread_t new_lvl_tid; pthread_t pain_tid; pthread_t trap_tid; pthread_mutex_t death_mutex; + pthread_mutex_t footstep_mutex; pthread_mutex_t new_lvl_mutex; pthread_mutex_t pain_mutex; pthread_mutex_t trap_mutex; -- cgit v1.2.3