diff options
Diffstat (limited to 'src/ft_init_sfx.c')
-rw-r--r-- | src/ft_init_sfx.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/ft_init_sfx.c b/src/ft_init_sfx.c index 9b58656..697f3f9 100644 --- a/src/ft_init_sfx.c +++ b/src/ft_init_sfx.c @@ -35,6 +35,9 @@ ** 10: weapon three load ** 11: weapon three fire ** 12: out of ammunitions +** 13: enemy death +** 14: enemy scream | double +** 15: enemy fire */ static int8_t @@ -71,8 +74,10 @@ static void ft_sfx_weapon_three_load_thread, &cl->sfx); pthread_create(&cl->sfx[11].tid, NULL, ft_sfx_weapon_three_fire_thread, &cl->sfx); - pthread_create(&cl->sfx[12].tid, NULL, - ft_sfx_ooa_thread, &cl->sfx); + pthread_create(&cl->sfx[12].tid, NULL, ft_sfx_ooa_thread, &cl->sfx); + pthread_create(&cl->sfx[13].tid, NULL, ft_sfx_bb_death_thread, &cl->sfx); + pthread_create(&cl->sfx[14].tid, NULL, ft_sfx_bb_scream_thread, &cl->sfx); + pthread_create(&cl->sfx[15].tid, NULL, ft_sfx_bb_fire_thread, &cl->sfx); } static void @@ -91,12 +96,16 @@ static void cl->sfx[10].sfx_play = ft_sfx_weapon_three_load; cl->sfx[11].sfx_play = ft_sfx_weapon_three_fire; cl->sfx[12].sfx_play = ft_sfx_ooa; + cl->sfx[13].sfx_play = ft_sfx_bb_death; + cl->sfx[14].sfx_play = ft_sfx_bb_scream; + cl->sfx[15].sfx_play = ft_sfx_bb_fire; } int8_t ft_init_sfx(t_cub *cl) { uint8_t i; + if (ft_init_sfx_cmd(&cl->sfx[0].cmd, FT_SFX_DEATH_PATH) < 0 || ft_init_sfx_cmd(&cl->sfx[1].cmd, FT_SFX_FS_ONE_PATH) < 0 || ft_init_sfx_cmd(&cl->sfx[1].cmd_alt, FT_SFX_FS_TWO_PATH) < 0 || @@ -111,10 +120,14 @@ int8_t ft_init_sfx_cmd(&cl->sfx[9].cmd, FT_SFX_W_TWO_FIRE_PATH) < 0 || ft_init_sfx_cmd(&cl->sfx[10].cmd, FT_SFX_W_THREE_LOAD_PATH) < 0 || ft_init_sfx_cmd(&cl->sfx[11].cmd, FT_SFX_W_THREE_FIRE_PATH) < 0 || - ft_init_sfx_cmd(&cl->sfx[12].cmd, FT_SFX_OOA_PATH) < 0) + ft_init_sfx_cmd(&cl->sfx[12].cmd, FT_SFX_OOA_PATH) < 0 || + ft_init_sfx_cmd(&cl->sfx[13].cmd, FT_SFX_ENMY_DEATH_PATH) < 0 || + ft_init_sfx_cmd(&cl->sfx[14].cmd, FT_SFX_ENMY_SCR_ONE_PATH) < 0 || + ft_init_sfx_cmd(&cl->sfx[14].cmd_alt, FT_SFX_ENMY_SCR_TWO_PATH) < 0 || + ft_init_sfx_cmd(&cl->sfx[15].cmd, FT_SFX_ENMY_FIRE_PATH) < 0) return (-1); i = -1; - while (++i < 13) + while (++i < 16) pthread_mutex_init(&cl->sfx[i].mutex, NULL); ft_init_sfx_pthreads(cl); ft_init_sfx_funptr(cl); |