X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_em%2Fsound.c;h=5aedabb35abb1cbf42faaa23b67b32e6502e6883;hb=c0c5862d9ee59c70412b1c35e558101b109a8ec9;hp=afaabcd4e933dae77ab49fde25b36f58d83299c2;hpb=c5321d9d36d0a74062651d0352fbbaccbe125eca;p=rocksndiamonds.git diff --git a/src/game_em/sound.c b/src/game_em/sound.c index afaabcd4..5aedabb3 100644 --- a/src/game_em/sound.c +++ b/src/game_em/sound.c @@ -3,7 +3,7 @@ * handle sounds in emerald mine */ -#include "game_em.h" +#include "main_em.h" #if defined(AUDIO_UNIX_NATIVE) @@ -20,19 +20,44 @@ #include #endif -#include "global.h" -#include "sample.h" - static char audioname[] = "/dev/audio"; static const int sound_priority[SAMPLE_MAX] = { - SAMPLE_exit, SAMPLE_die, SAMPLE_time, SAMPLE_boom, SAMPLE_tick, - SAMPLE_collect, SAMPLE_roll, SAMPLE_push, SAMPLE_dynamite, SAMPLE_press, - SAMPLE_door, SAMPLE_dirt, SAMPLE_blank, SAMPLE_android, SAMPLE_ball, - SAMPLE_grow, SAMPLE_squash, SAMPLE_crack, SAMPLE_slurp, SAMPLE_drip, - SAMPLE_wonder, SAMPLE_wheel, SAMPLE_stone, SAMPLE_spring, SAMPLE_diamond, - SAMPLE_nut, SAMPLE_bug, SAMPLE_tank, SAMPLE_eater, SAMPLE_alien, + SAMPLE_exit_open, + SAMPLE_exit_leave, + SAMPLE_die, + SAMPLE_time, + SAMPLE_boom, + SAMPLE_tick, + SAMPLE_collect, + SAMPLE_roll, + SAMPLE_push, + SAMPLE_dynamite, + SAMPLE_press, + SAMPLE_door, + SAMPLE_dirt, + SAMPLE_blank, + SAMPLE_android_clone, + SAMPLE_android_move, + SAMPLE_ball, + SAMPLE_grow, + SAMPLE_squash, + SAMPLE_wonderfall, + SAMPLE_crack, + SAMPLE_slurp, + SAMPLE_drip, + SAMPLE_wonder, + SAMPLE_wheel, + SAMPLE_stone, + SAMPLE_spring, + SAMPLE_diamond, + SAMPLE_nut, + SAMPLE_bug, + SAMPLE_tank, + SAMPLE_eater, + SAMPLE_eater_eat, + SAMPLE_alien, SAMPLE_acid }; @@ -69,7 +94,9 @@ int sound_thread(void) { /* pick sounds to play, if any */ - if (sound_play[SAMPLE_exit] || sound_play[SAMPLE_die]) + if (sound_play[SAMPLE_exit_open] || + sound_play[SAMPLE_exit_leave] || + sound_play[SAMPLE_die]) sound_play[SAMPLE_boom] = 0; /* no explosions if player goes home */ mix_count = 0; @@ -339,6 +366,7 @@ int sound_thread(void) free(audio_buffer); if (mix_buffer) free(mix_buffer); + goto loop; /* back to top */ fail: