summaryrefslogtreecommitdiff
path: root/noncore/games/sfcave-sdl/sound.h
authorsudonix <sudonix>2004-02-26 02:25:15 (UTC)
committer sudonix <sudonix>2004-02-26 02:25:15 (UTC)
commitb339031e14a607ff18e404e0395b1c2782b92fdc (patch) (unidiff)
treeecd65299976322166ee5dfb2c30f045dd542c1e1 /noncore/games/sfcave-sdl/sound.h
parentcb72ff620022306e493421006b024b971449f864 (diff)
downloadopie-b339031e14a607ff18e404e0395b1c2782b92fdc.zip
opie-b339031e14a607ff18e404e0395b1c2782b92fdc.tar.gz
opie-b339031e14a607ff18e404e0395b1c2782b92fdc.tar.bz2
SDL includes corrected, CRs in some files removed, just for consistency :)
Diffstat (limited to 'noncore/games/sfcave-sdl/sound.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/sfcave-sdl/sound.h70
1 files changed, 35 insertions, 35 deletions
diff --git a/noncore/games/sfcave-sdl/sound.h b/noncore/games/sfcave-sdl/sound.h
index d46b5bc..180429a 100644
--- a/noncore/games/sfcave-sdl/sound.h
+++ b/noncore/games/sfcave-sdl/sound.h
@@ -1,35 +1,35 @@
1#ifndef __SOUND_H 1#ifndef __SOUND_H
2#define __SOUND_H 2#define __SOUND_H
3 3
4#include <SDL.h> 4#include <SDL/SDL.h>
5#include "SDL_mixer.h" 5#include <SDL/SDL_mixer.h>
6 6
7#define NR_SOUNDS 3 7#define NR_SOUNDS 3
8 8
9class SoundHandler 9class SoundHandler
10{ 10{
11public: 11public:
12 static bool init(); 12 static bool init();
13 static void cleanUp(); 13 static void cleanUp();
14 14
15 static int playSound( int soundNr, int channel = -1, int nrLoops = 0, int playBeforeFinished = false ); 15 static int playSound( int soundNr, int channel = -1, int nrLoops = 0, int playBeforeFinished = false );
16 static void stopSound( int channel, bool fadeOut, int nrMilliSecs = 1000 ); 16 static void stopSound( int channel, bool fadeOut, int nrMilliSecs = 1000 );
17 static void setSoundsOn( bool val ); 17 static void setSoundsOn( bool val );
18 static void setMusicOn( bool val ); 18 static void setMusicOn( bool val );
19 static void playMusic( string musicFile ); 19 static void playMusic( string musicFile );
20 static void playMusic( bool fadeIn = false ); 20 static void playMusic( bool fadeIn = false );
21 static void stopMusic( bool fadeOut = false ); 21 static void stopMusic( bool fadeOut = false );
22 static void setMusicVolume( int vol ); 22 static void setMusicVolume( int vol );
23 23
24 24
25private: 25private:
26 static Mix_Music *music; 26 static Mix_Music *music;
27 static Mix_Chunk *sounds[NR_SOUNDS]; 27 static Mix_Chunk *sounds[NR_SOUNDS];
28 static int soundChannels[NR_SOUNDS]; 28 static int soundChannels[NR_SOUNDS];
29 static bool soundOn; 29 static bool soundOn;
30 static bool musicOn; 30 static bool musicOn;
31 31
32 SoundHandler() {} 32 SoundHandler() {}
33}; 33};
34 34
35#endif 35#endif