#ifndef __SOUND_H__ #define __SOUND_H__ #include "fmod.h" #include "wincompat.h" #define theSound Sound::getInstance() class Sound { public: Sound() {} virtual ~Sound() {} static Sound& getInstance() { if (!s_pSound) s_pSound = new Sound(); return *s_pSound; } bool Sound::Init(bool on, char *music); int PlaySound(int sound); void Disable() { _on = false; } void Enable() { _on = true; } enum {FIRE=0, EXPLODE, HIT, MUSIC, NUM_SOUNDS}; private: static Sound *s_pSound; FSOUND_SAMPLE *sounds[NUM_SOUNDS]; bool _on; }; #endif