aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/minigames
diff options
context:
space:
mode:
authorSven Hesse2012-06-05 16:21:36 +0200
committerSven Hesse2012-06-05 16:21:36 +0200
commit73776406686709bc79ff9c6423937dce0e43c5d6 (patch)
tree2ee068f4c05bd7add11e4e0daf7a7f209f1fb985 /engines/gob/minigames
parent25938316a881679a923bce1986f3a978432b0e76 (diff)
downloadscummvm-rg350-73776406686709bc79ff9c6423937dce0e43c5d6.tar.gz
scummvm-rg350-73776406686709bc79ff9c6423937dce0e43c5d6.tar.bz2
scummvm-rg350-73776406686709bc79ff9c6423937dce0e43c5d6.zip
GOB: Play sounds for mouths and shields in Penetration
Diffstat (limited to 'engines/gob/minigames')
-rw-r--r--engines/gob/minigames/geisha/penetration.cpp20
-rw-r--r--engines/gob/minigames/geisha/penetration.h6
2 files changed, 26 insertions, 0 deletions
diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp
index c8f96f825a..1321842d07 100644
--- a/engines/gob/minigames/geisha/penetration.cpp
+++ b/engines/gob/minigames/geisha/penetration.cpp
@@ -29,6 +29,8 @@
#include "gob/anifile.h"
#include "gob/aniobject.h"
+#include "gob/sound/sound.h"
+
#include "gob/minigames/geisha/penetration.h"
#include "gob/minigames/geisha/meter.h"
#include "gob/minigames/geisha/mouth.h"
@@ -280,6 +282,11 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) {
}
void Penetration::init() {
+ // Load sounds
+ _vm->_sound->sampleLoad(&_soundShield, SOUND_SND, "boucl.snd");
+ _vm->_sound->sampleLoad(&_soundBite , SOUND_SND, "pervet.snd");
+ _vm->_sound->sampleLoad(&_soundKiss , SOUND_SND, "baise.snd");
+
_background->clear();
_vm->_video->drawPackedSprite("hyprmef2.cmp", *_background);
@@ -313,6 +320,10 @@ void Penetration::init() {
}
void Penetration::deinit() {
+ _soundShield.free();
+ _soundBite.free();
+ _soundKiss.free();
+
_mapAnims.clear();
_anims.clear();
@@ -528,6 +539,9 @@ void Penetration::checkShields() {
// Charge shields
_shieldMeter->setMaxValue();
+ // Play the shield sound
+ _vm->_sound->blasterPlay(&_soundShield, 1, 0);
+
// Erase the shield from the map
const int mapX = kPlayAreaBorderWidth + pos->x * kMapTileWidth;
const int mapY = kPlayAreaBorderHeight + pos->y * kMapTileHeight;
@@ -548,6 +562,12 @@ void Penetration::checkMouths() {
(((m->x + 1) == _subTileX) && (m->y == _subTileY))) {
m->mouth->activate();
+
+ // Play the mouth sound
+ if (m->type == kMouthTypeBite)
+ _vm->_sound->blasterPlay(&_soundBite, 1, 0);
+ else if (m->type == kMouthTypeKiss)
+ _vm->_sound->blasterPlay(&_soundKiss, 1, 0);
}
}
}
diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h
index ef0e3b10f0..00ddb4bdba 100644
--- a/engines/gob/minigames/geisha/penetration.h
+++ b/engines/gob/minigames/geisha/penetration.h
@@ -26,6 +26,8 @@
#include "common/system.h"
#include "common/list.h"
+#include "gob/sound/sounddesc.h"
+
namespace Gob {
class GobEngine;
@@ -107,6 +109,10 @@ private:
Common::List<Position> _shields;
Common::List<ManagedMouth> _mouths;
+ SoundDesc _soundShield;
+ SoundDesc _soundBite;
+ SoundDesc _soundKiss;
+
void init();
void deinit();