aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_init_sfx.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_init_sfx.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/ft_init_sfx.c b/src/ft_init_sfx.c
index 202e647..9b58656 100644
--- a/src/ft_init_sfx.c
+++ b/src/ft_init_sfx.c
@@ -22,18 +22,19 @@
/*
** sfx[] index summary
** -------------------
-** 0: death
-** 1: footstep | double
-** 2: new level
-** 3: pain | double
-** 4: trap
-** 5: heal
-** 6: weapon one load
-** 7: weapon one fire
-** 8: weapon two load
-** 9: weapon two fire
+** 0: death
+** 1: footstep | double
+** 2: new level
+** 3: pain | double
+** 4: trap
+** 5: heal
+** 6: weapon one load
+** 7: weapon one fire
+** 8: weapon two load
+** 9: weapon two fire
** 10: weapon three load
** 11: weapon three fire
+** 12: out of ammunitions
*/
static int8_t
@@ -70,6 +71,8 @@ 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);
}
static void
@@ -87,6 +90,7 @@ static void
cl->sfx[9].sfx_play = ft_sfx_weapon_two_fire;
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;
}
int8_t
@@ -106,10 +110,11 @@ int8_t
ft_init_sfx_cmd(&cl->sfx[8].cmd, FT_SFX_W_TWO_LOAD_PATH) < 0 ||
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[11].cmd, FT_SFX_W_THREE_FIRE_PATH) < 0 ||
+ ft_init_sfx_cmd(&cl->sfx[12].cmd, FT_SFX_OOA_PATH) < 0)
return (-1);
i = -1;
- while (++i < 12)
+ while (++i < 13)
pthread_mutex_init(&cl->sfx[i].mutex, NULL);
ft_init_sfx_pthreads(cl);
ft_init_sfx_funptr(cl);