diff options
author | Sven Hesse | 2012-01-27 14:45:41 +0100 |
---|---|---|
committer | Sven Hesse | 2012-01-27 14:45:41 +0100 |
commit | 841462721686488a41588410418f4e5ff46dac76 (patch) | |
tree | 9e185c5ba2bc53705a77a1ced38b2b2c3f31e7e7 /engines/gob/minigames/geisha/oko.cpp | |
parent | 9d348f46ad1a7729661867564d4e8ed254244710 (diff) | |
download | scummvm-rg350-841462721686488a41588410418f4e5ff46dac76.tar.gz scummvm-rg350-841462721686488a41588410418f4e5ff46dac76.tar.bz2 scummvm-rg350-841462721686488a41588410418f4e5ff46dac76.zip |
GOB: Play Oko's breathing sound
Diffstat (limited to 'engines/gob/minigames/geisha/oko.cpp')
-rw-r--r-- | engines/gob/minigames/geisha/oko.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/gob/minigames/geisha/oko.cpp b/engines/gob/minigames/geisha/oko.cpp index 24a6c8053e..f8536eab3f 100644 --- a/engines/gob/minigames/geisha/oko.cpp +++ b/engines/gob/minigames/geisha/oko.cpp @@ -20,6 +20,8 @@ * */ +#include "gob/sound/sound.h" + #include "gob/minigames/geisha/oko.h" namespace Gob { @@ -40,7 +42,9 @@ static const uint kLevelCount = 3; static const int16 kLevelPositionX[kLevelCount] = { 44, 84, 124 }; -Oko::Oko(const ANIFile &ani) : ANIObject(ani), _state(kStateEnter), _level(0) { +Oko::Oko(const ANIFile &ani, Sound &sound, SoundDesc &breathe) : + ANIObject(ani), _sound(&sound), _breathe(&breathe), _state(kStateEnter), _level(0) { + setAnimation(kOkoAnimationEnter); setVisible(true); } @@ -62,9 +66,11 @@ void Oko::advance() { } break; + case kStateBreathe: + if ((getFrame() == 6) || (getFrame() == 23)) + _sound->blasterPlay(_breathe, 1, 0); case kStateSink: case kStateRaise: - case kStateBreathe: if (wasLastFrame) { setAnimation(kOkoAnimationSwim); setPosition(kOkoPositionX, kLevelPositionX[_level]); |