-#include "sound.h"
+#include <SDL/SDL.h>
+#include <SDL/SDL_mixer.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#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};
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);
}/*}}}*/
void
play_tune(int i) {/*{{{*/
- if(!music_flag) return;
+ if(!opt_music) return;
if (playing==i)
return;
if (playing) {