void MoviePlayer::play(MovieText *movieTexts, uint32 numMovieTexts, uint32 leadIn, uint32 leadOut) { // This happens when quitting during the "eye" cutscene. if (_vm->shouldQuit()) return; _leadOutFrame = _decoder->getFrameCount(); if (_leadOutFrame > 60) _leadOutFrame -= 60; _movieTexts = movieTexts; _numMovieTexts = numMovieTexts; _currentMovieText = 0; _leadOut = leadOut; if (leadIn) _vm->_sound->playMovieSound(leadIn, kLeadInSound); if (_bgSoundStream) _snd->playStream(Audio::Mixer::kSFXSoundType, _bgSoundHandle, _bgSoundStream); bool terminated = false; terminated = !playVideo(); closeTextObject(_currentMovieText, NULL); if (terminated) { _snd->stopHandle(*_bgSoundHandle); _vm->_sound->stopMovieSounds(); _vm->_sound->stopSpeech(); } while (_snd->isSoundHandleActive(*_bgSoundHandle)) _system->delayMillis(100); }
void MoviePlayer::performPostProcessing(byte *screen) { MovieText *text; int frame = _decoder->getCurFrame(); if (_currentMovieText < _numMovieTexts) { text = &_movieTexts[_currentMovieText]; } else { text = NULL; } if (text && frame == text->_startFrame) { if ((_vm->getSubtitles() || !text->_speechId) && _currentMovieText < _numMovieTexts) { openTextObject(_currentMovieText); } } if (text && frame >= text->_startFrame) { if (text->_speechId && !text->_played && _vm->_sound->amISpeaking() == RDSE_QUIET) { text->_played = true; _vm->_sound->playCompSpeech(text->_speechId, 16, 0); } if (frame < text->_endFrame) { drawTextObject(_currentMovieText, screen); } else { closeTextObject(_currentMovieText, screen); _currentMovieText++; } } if (_leadOut && _decoder->getCurFrame() == _leadOutFrame) { _vm->_sound->playMovieSound(_leadOut, kLeadOutSound); } }
void MoviePlayer::play(MovieText *movieTexts, uint32 numMovieTexts, uint32 leadIn, uint32 leadOut) { _leadOutFrame = _decoder->getFrameCount(); if (_leadOutFrame > 60) _leadOutFrame -= 60; _movieTexts = movieTexts; _numMovieTexts = numMovieTexts; _currentMovieText = 0; _leadOut = leadOut; if (leadIn) _vm->_sound->playMovieSound(leadIn, kLeadInSound); bool terminated = !playVideo(); closeTextObject(_currentMovieText, NULL, 0); if (terminated) { _vm->_sound->stopMovieSounds(); _vm->_sound->stopSpeech(); } // Need to jump back to paletted color if (_decoderType == kVideoDecoderPSX || _decoderType == kVideoDecoderMP2) initGraphics(640, 480, true); }
void MoviePlayer::play(MovieText *movieTexts, uint32 numMovieTexts, uint32 leadIn, uint32 leadOut) { // This happens when quitting during the "eye" cutscene. if (_vm->shouldQuit()) return; _leadOutFrame = _decoder->getFrameCount(); if (_leadOutFrame > 60) _leadOutFrame -= 60; _movieTexts = movieTexts; _numMovieTexts = numMovieTexts; _currentMovieText = 0; _leadOut = leadOut; if (leadIn) { _vm->_sound->playMovieSound(leadIn, kLeadInSound); } if (_bgSoundStream) { _snd->playInputStream(Audio::Mixer::kSFXSoundType, _bgSoundHandle, _bgSoundStream); } bool terminated = false; Common::List<Common::Event> stopEvents; Common::Event stopEvent; stopEvents.clear(); stopEvent.type = Common::EVENT_KEYDOWN; stopEvent.kbd = Common::KEYCODE_ESCAPE; stopEvents.push_back(stopEvent); terminated = !playVideo(stopEvents); closeTextObject(_currentMovieText, NULL); if (terminated) { _snd->stopHandle(*_bgSoundHandle); _vm->_sound->stopMovieSounds(); _vm->_sound->stopSpeech(); } while (_snd->isSoundHandleActive(*_bgSoundHandle)) _system->delayMillis(100); }
void MoviePlayer::play(MovieText *movieTexts, uint32 numMovieTexts, uint32 leadIn, uint32 leadOut) { _leadOutFrame = _decoder->getFrameCount(); if (_leadOutFrame > 60) _leadOutFrame -= 60; _movieTexts = movieTexts; _numMovieTexts = numMovieTexts; _currentMovieText = 0; _leadOut = leadOut; if (leadIn) _vm->_sound->playMovieSound(leadIn, kLeadInSound); if (_bgSoundStream) _snd->playStream(Audio::Mixer::kSFXSoundType, _bgSoundHandle, _bgSoundStream); bool terminated = false; terminated = !playVideo(); closeTextObject(_currentMovieText, NULL, 0); if (terminated) { _snd->stopHandle(*_bgSoundHandle); _vm->_sound->stopMovieSounds(); _vm->_sound->stopSpeech(); } while (_snd->isSoundHandleActive(*_bgSoundHandle)) _system->delayMillis(100); if (_decoderType == kVideoDecoderPSX) { // Need to jump back to paletted color initGraphics(640, 480, true); } }