- changed way badguy removal is handled (ie. with a flag now)
[supertux.git] / src / sound.h
index 1a867b2..095e3c4 100644 (file)
@@ -1,17 +1,22 @@
-/*
-  sound.h
-  
-  Super Tux - Audio Functions
-  
-  by Bill Kendrick
-  bill@newbreedsoftware.com
-  http://www.newbreedsoftware.com/supertux/
-  April 22, 2000 - March 15, 2004
-
-  Current maintainer:
-        Duong-Khang NGUYEN <neoneurone@users.sf.net>
-*/
+//  $Id$
+//
+//  SuperTux -  A Jump'n Run
+//  Copyright (C) 2000 Bill Kendrick <bill@newbreedsoftware.com>
+//  Copyright (C) 2004 Duong-Khang NGUYEN <neoneurone@users.sf.net>
+//
+//  This program is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU General Public License
+//  as published by the Free Software Foundation; either version 2
+//  of the License, or (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #ifndef SUPERTUX_SOUND_H
 #define SUPERTUX_SOUND_H
@@ -22,9 +27,9 @@
 #define SOUND_RESERVED_CHANNELS 2
 
 /*global variable*/
-extern int use_sound;           /* handle sound on/off menu and command-line option */
-extern int use_music;           /* handle music on/off menu and command-line option */
-extern int audio_device;        /* != 0: available and initialized */
+extern bool use_sound;           /* handle sound on/off menu and command-line option */
+extern bool use_music;           /* handle music on/off menu and command-line option */
+extern bool audio_device;        /* != 0: available and initialized */
 
 /* enum of different internal music types */
 enum Music_Type {
@@ -71,25 +76,21 @@ extern char* soundfilenames[NUM_SOUNDS];
 #include <SDL_mixer.h>
 
 /* variables for stocking the sound and music */
-extern Mix_Chunk * sounds[NUM_SOUNDS];
-extern Mix_Music * level_song, * level_song_fast, * herring_song;
+extern Mix_Chunk* sounds[NUM_SOUNDS];
+extern Mix_Music* herring_song;
 
 /* functions handling the sound and music */
 int open_audio(int frequency, Uint16 format, int channels, int chunksize);
 void close_audio( void );
 
 Mix_Chunk * load_sound(const std::string& file);
-void play_sound(Mix_Chunk * snd, enum Sound_Speaker whichSpeaker);
-Mix_Music * load_song(const std::string& file);
-
-int playing_music(void);
-int halt_music(void);
-int play_music(Mix_Music*music, int loops);
-void free_music(Mix_Music*music);
 void free_chunk(Mix_Chunk*chunk);
+void play_sound(Mix_Chunk * snd, enum Sound_Speaker whichSpeaker);
 
-int get_current_music();
-void set_current_music(int music);
-void play_current_music();
+Mix_Music* load_song(const std::string& file);
+void free_music(Mix_Music* music);
+void halt_music(void);
+void enable_music(bool enable);
+void play_music(Mix_Music* music);
 
 #endif /*SUPERTUX_SOUND_H*/