diff options
Diffstat (limited to '')
-rw-r--r-- | inc/cub3d.h | 6 | ||||
-rw-r--r-- | inc/cub3d_defines.h | 4 | ||||
-rw-r--r-- | inc/cub3d_structs.h | 4 |
3 files changed, 9 insertions, 5 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h index 7b57942..6078801 100644 --- a/inc/cub3d.h +++ b/inc/cub3d.h @@ -112,14 +112,16 @@ size_t ft_get_line_len(char *line); */ uint8_t ft_check_map_arg(int argc, const char *argv[]); -uint8_t ft_use_args(int argc, const char *argv[], t_cub *clist); +uint8_t ft_use_args(int argc, const char *argv[], + char *const envp[], t_cub *clist); /* ** ====== OTHER ====== */ void ft_set_minimap_scale(t_cub *clist); -void *ft_music_thread(void *vargp); +void ft_enable_music(t_cub *cl); +void ft_music_fork(char **mcmd_words, char *const envp[]); void ft_detect(t_cub *cl); void ft_castray(t_cub *cl); int8_t ft_save_to_bmp(t_cub *cl); diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h index fb50474..1153225 100644 --- a/inc/cub3d_defines.h +++ b/inc/cub3d_defines.h @@ -83,9 +83,9 @@ enum */ # if FT_OS == 1 -# define FT_MUS_CMD "afplay --volume 0.2 %s" +# define FT_MUS_CMD "/usr/bin/afplay --volume 0.2 %s" # else -# define FT_MUS_CMD "aplay -f cd -t wav -q %s" +# define FT_MUS_CMD "/usr/bin/aplay -f cd -t wav -q %s" # endif /* diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index c74a9e0..d53cdb9 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -152,6 +152,7 @@ typedef struct s_map char *music_cmd; char *mapl; char **map; + char **mcmd_words; int8_t x_step; int8_t y_step; size_t map_w; @@ -175,9 +176,10 @@ typedef struct s_cub uint8_t isoldmus; uint16_t currlvl; uint16_t i; + char *const *envp; char errmsg[64]; int32_t key_input[5]; - pthread_t tid; + pid_t mpid; int (*key_ptr[6])(struct s_cub*); int8_t (*get_ptr[11])(char**, struct s_cub*); struct s_win wlist; |