diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-16 19:41:26 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-16 19:41:26 +0100 |
commit | a8c9c04ec24a71f076891bdc1c26860db7c5c9c3 (patch) | |
tree | a5dc6905f6987c4d5fcd27276f7fc338f2af8f0b /inc/cub3d_structs.h | |
parent | Cleaner memdels (diff) | |
parent | Merge branch 'master' into back-to-pthread (diff) | |
download | 42-cub3d-a8c9c04ec24a71f076891bdc1c26860db7c5c9c3.tar.gz 42-cub3d-a8c9c04ec24a71f076891bdc1c26860db7c5c9c3.tar.bz2 42-cub3d-a8c9c04ec24a71f076891bdc1c26860db7c5c9c3.tar.xz 42-cub3d-a8c9c04ec24a71f076891bdc1c26860db7c5c9c3.tar.zst 42-cub3d-a8c9c04ec24a71f076891bdc1c26860db7c5c9c3.zip |
Merge branch 'back-to-pthread'
Diffstat (limited to 'inc/cub3d_structs.h')
-rw-r--r-- | inc/cub3d_structs.h | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index 9ea3d08..92d928d 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -14,9 +14,9 @@ # define CUB3D_STRUCTS_H #include <stddef.h> -#include <stdlib.h> #include <stdint.h> #include <sys/types.h> +#include <pthread.h> typedef struct s_win { @@ -57,15 +57,23 @@ typedef struct s_bmp_info typedef struct s_sfx { - char **death; - char **new_lvl; - char **pain_one; - char **pain_two; - char **trap; - pid_t death_pid; - pid_t new_lvl_pid; - pid_t pain_pid; - pid_t trap_pid; + 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; } t_sfx; typedef struct s_bmp_rgb @@ -189,7 +197,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 +237,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]; |