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