X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=sound.c;h=7f369ae79a11c619cefcdf0c3b32dad43972c730;hp=d522955b0cc7dcf4c25c53f41dac2c8f4ce52f9f;hb=9ffdd66ad5f2c29a2125bbd458a700625f178065;hpb=46dacbe75dac20a1c6e1b61a2eb99ca25fc971ec diff --git a/sound.c b/sound.c index d522955..7f369ae 100644 --- a/sound.c +++ b/sound.c @@ -1,15 +1,14 @@ -#include "sound.h" +#include +#include +#include +#include +#include + +#include "args.h" +#include "common.h" #include "config.h" +#include "sound.h" -extern int sound_flag, music_flag; - -#define TUNE_TITLE_PAGE 0 -#define TUNE_GAMEPLAY 1 -#define TUNE_HIGH_SCORE_ENTRY 2 -#define NUM_TUNES 3 - -#define SOUND_BANG 0 -#define NUM_SOUNDS 4 static Mix_Music *music[NUM_TUNES]; static int music_volume[NUM_TUNES] = {128,128,128}; @@ -72,7 +71,7 @@ init_sound() { void play_sound(int i) { - if(!sound_flag) return; + if(!opt_sound) return; debug(printf ("play sound %d on first free channel\n",i)); Mix_PlayChannel(-1, wav[i], 0); }/*}}}*/ @@ -82,7 +81,7 @@ int playing=-1; void play_tune(int i) {/*{{{*/ - if(!music_flag) return; + if(!opt_music) return; if (playing==i) return; if (playing) {