diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-22 19:05:12 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-22 19:05:12 +0100 |
commit | 7fbd59391bee9d23543ce933e91312e75276db8a (patch) | |
tree | 268db5130a3a62ce706cd8e222b6e47a61f2edb8 /src/ft_init_sfx.c | |
parent | new colors for font (diff) | |
download | 42-cub3d-7fbd59391bee9d23543ce933e91312e75276db8a.tar.gz 42-cub3d-7fbd59391bee9d23543ce933e91312e75276db8a.tar.bz2 42-cub3d-7fbd59391bee9d23543ce933e91312e75276db8a.tar.xz 42-cub3d-7fbd59391bee9d23543ce933e91312e75276db8a.tar.zst 42-cub3d-7fbd59391bee9d23543ce933e91312e75276db8a.zip |
Now regimp and sound
Diffstat (limited to 'src/ft_init_sfx.c')
-rw-r--r-- | src/ft_init_sfx.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/ft_init_sfx.c b/src/ft_init_sfx.c index 6fc8504..202e647 100644 --- a/src/ft_init_sfx.c +++ b/src/ft_init_sfx.c @@ -32,6 +32,8 @@ ** 7: weapon one fire ** 8: weapon two load ** 9: weapon two fire +** 10: weapon three load +** 11: weapon three fire */ static int8_t @@ -56,10 +58,18 @@ static void pthread_create(&cl->sfx[3].tid, NULL, ft_sfx_pain_thread, &cl->sfx); pthread_create(&cl->sfx[4].tid, NULL, ft_sfx_trap_thread, &cl->sfx); pthread_create(&cl->sfx[5].tid, NULL, ft_sfx_heal_thread, &cl->sfx); - pthread_create(&cl->sfx[6].tid, NULL, ft_sfx_weapon_one_load_thread, &cl->sfx); - pthread_create(&cl->sfx[7].tid, NULL, ft_sfx_weapon_one_fire_thread, &cl->sfx); - pthread_create(&cl->sfx[8].tid, NULL, ft_sfx_weapon_two_load_thread, &cl->sfx); - pthread_create(&cl->sfx[9].tid, NULL, ft_sfx_weapon_two_fire_thread, &cl->sfx); + pthread_create(&cl->sfx[6].tid, NULL, + ft_sfx_weapon_one_load_thread, &cl->sfx); + pthread_create(&cl->sfx[7].tid, NULL, + ft_sfx_weapon_one_fire_thread, &cl->sfx); + pthread_create(&cl->sfx[8].tid, NULL, + ft_sfx_weapon_two_load_thread, &cl->sfx); + pthread_create(&cl->sfx[9].tid, NULL, + ft_sfx_weapon_two_fire_thread, &cl->sfx); + pthread_create(&cl->sfx[10].tid, NULL, + ft_sfx_weapon_three_load_thread, &cl->sfx); + pthread_create(&cl->sfx[11].tid, NULL, + ft_sfx_weapon_three_fire_thread, &cl->sfx); } static void @@ -75,6 +85,8 @@ static void cl->sfx[7].sfx_play = ft_sfx_weapon_one_fire; cl->sfx[8].sfx_play = ft_sfx_weapon_two_load; 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; } int8_t @@ -92,10 +104,12 @@ int8_t ft_init_sfx_cmd(&cl->sfx[6].cmd, FT_SFX_W_ONE_LOAD_PATH) < 0 || ft_init_sfx_cmd(&cl->sfx[7].cmd, FT_SFX_W_ONE_FIRE_PATH) < 0 || 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[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) return (-1); i = -1; - while (++i < 10) + while (++i < 12) pthread_mutex_init(&cl->sfx[i].mutex, NULL); ft_init_sfx_pthreads(cl); ft_init_sfx_funptr(cl); |