diff options
-rw-r--r-- | engines/gob/minigames/geisha/diving.cpp | 14 | ||||
-rw-r--r-- | engines/gob/minigames/geisha/diving.h | 8 |
2 files changed, 22 insertions, 0 deletions
diff --git a/engines/gob/minigames/geisha/diving.cpp b/engines/gob/minigames/geisha/diving.cpp index ae041b77f9..38a62ccc88 100644 --- a/engines/gob/minigames/geisha/diving.cpp +++ b/engines/gob/minigames/geisha/diving.cpp @@ -29,6 +29,8 @@ #include "gob/decfile.h" #include "gob/anifile.h" +#include "gob/sound/sound.h" + #include "gob/minigames/geisha/evilfish.h" #include "gob/minigames/geisha/diving.h" @@ -149,12 +151,22 @@ void Diving::init() { _anims.push_back(_evilFish[i]); _anims.push_back(_lungs); _anims.push_back(_heart); + + _vm->_sound->sampleLoad(&_soundShoot , SOUND_SND, "tirgim.snd"); + _vm->_sound->sampleLoad(&_soundBreathe , SOUND_SND, "respir.snd"); + _vm->_sound->sampleLoad(&_soundWhitePearl, SOUND_SND, "virtou.snd"); + _vm->_sound->sampleLoad(&_soundBlackPearl, SOUND_SND, "trouve.snd"); } void Diving::deinit() { _vm->_draw->_cursorHotspotX = -1; _vm->_draw->_cursorHotspotY = -1; + _soundShoot.free(); + _soundBreathe.free(); + _soundWhitePearl.free(); + _soundBlackPearl.free(); + _anims.clear(); _activeShots.clear(); @@ -308,6 +320,8 @@ void Diving::shoot(int16 mouseX, int16 mouseY) { _activeShots.push_back(_currentShot); _currentShot = (_currentShot + 1) % kMaxShotCount; + + _vm->_sound->blasterPlay(&_soundShoot, 1, 0); } void Diving::checkShots() { diff --git a/engines/gob/minigames/geisha/diving.h b/engines/gob/minigames/geisha/diving.h index dd0773a9c4..e2f5dd428f 100644 --- a/engines/gob/minigames/geisha/diving.h +++ b/engines/gob/minigames/geisha/diving.h @@ -25,6 +25,8 @@ #include "common/system.h" +#include "gob/sound/sounddesc.h" + namespace Gob { class GobEngine; @@ -77,6 +79,12 @@ private: uint8 _currentShot; + SoundDesc _soundShoot; + SoundDesc _soundBreathe; + SoundDesc _soundWhitePearl; + SoundDesc _soundBlackPearl; + + void init(); void deinit(); |