aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorSven Hesse2011-09-14 20:43:06 +0200
committerSven Hesse2011-09-14 20:43:06 +0200
commitc6bb05594122e58ab92fc04544e1fbebfe48580f (patch)
tree8cb7587fde9a7deef98d939850ee7a1488414fb2 /engines
parent6c259c5d66415e1c36640ae00ff38fa93a3e432f (diff)
downloadscummvm-rg350-c6bb05594122e58ab92fc04544e1fbebfe48580f.tar.gz
scummvm-rg350-c6bb05594122e58ab92fc04544e1fbebfe48580f.tar.bz2
scummvm-rg350-c6bb05594122e58ab92fc04544e1fbebfe48580f.zip
GOB: Play the shooting sound in the Diving minigame
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/minigames/geisha/diving.cpp14
-rw-r--r--engines/gob/minigames/geisha/diving.h8
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();