diff options
Diffstat (limited to 'engines/sci/video/robot_decoder.cpp')
-rw-r--r-- | engines/sci/video/robot_decoder.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp index 77f45e0788..ebcfac6054 100644 --- a/engines/sci/video/robot_decoder.cpp +++ b/engines/sci/video/robot_decoder.cpp @@ -87,6 +87,17 @@ RobotDecoder::~RobotDecoder() { } bool RobotDecoder::load(GuiResourceId id) { + // TODO: RAMA's robot 1003 cannot be played (shown at the menu screen) - + // its drawn at odd coordinates. SV can't play it either (along with some + // others), so it must be some new functionality added in RAMA's robot + // videos. Skip it for now. + if (g_sci->getGameId() == GID_RAMA && id == 1003) + return false; + + // TODO: The robot video in the Lighthouse demo gets stuck + if (g_sci->getGameId() == GID_LIGHTHOUSE && id == 16) + return false; + Common::String fileName = Common::String::format("%d.rbt", id); Common::SeekableReadStream *stream = SearchMan.createReadStreamForMember(fileName); @@ -116,7 +127,7 @@ bool RobotDecoder::loadStream(Common::SeekableReadStream *stream) { if (_header.hasSound) { _audioStream = Audio::makeQueuingAudioStream(11025, false); - _mixer->playStream(Audio::Mixer::kMusicSoundType, &_audioHandle, _audioStream); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_audioHandle, _audioStream, -1, getVolume(), getBalance()); } readPaletteChunk(_header.paletteDataSize); @@ -361,6 +372,16 @@ void RobotDecoder::close() { reset(); } +void RobotDecoder::updateVolume() { + if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) + g_system->getMixer()->setChannelVolume(_audioHandle, getVolume()); +} + +void RobotDecoder::updateBalance() { + if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) + g_system->getMixer()->setChannelBalance(_audioHandle, getBalance()); +} + #endif } // End of namespace Sci |