mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-03 07:59:38 +00:00
STARK: Delay playing FMVs until all the location change scripts are done
This ensures no sound is started by the scripts after the game has already been paused. In-game sounds no longer play during FMVs.
This commit is contained in:
parent
0607e8c7a7
commit
2b9242c8ea
@ -965,8 +965,6 @@ Command *Command::opFullMotionVideoPlay(Script *script, const ResourceReference
|
||||
Location *location = current->getLocation();
|
||||
location->resetAnimationBlending();
|
||||
|
||||
// TODO: Pause the engine while the video is playing
|
||||
|
||||
FMV *movie = movieRef.resolve<FMV>();
|
||||
movie->requestPlayback();
|
||||
|
||||
|
@ -192,9 +192,7 @@ void UserInterface::selectInventoryItem(int16 itemIndex) {
|
||||
}
|
||||
|
||||
void UserInterface::requestFMVPlayback(const Common::String &name) {
|
||||
changeScreen(Screen::kScreenFMV);
|
||||
|
||||
_fmvScreen->play(name);
|
||||
_shouldPlayFmv = name;
|
||||
}
|
||||
|
||||
void UserInterface::onFMVStopped() {
|
||||
@ -436,6 +434,12 @@ void UserInterface::doQueuedScreenChange() {
|
||||
backPrevScreen();
|
||||
_shouldGoBackToPreviousScreen = false;
|
||||
}
|
||||
|
||||
if (!_shouldPlayFmv.empty()) {
|
||||
changeScreen(Screen::kScreenFMV);
|
||||
_fmvScreen->play(_shouldPlayFmv);
|
||||
_shouldPlayFmv.clear();
|
||||
}
|
||||
}
|
||||
|
||||
void UserInterface::handleKeyPress(const Common::KeyState &keyState) {
|
||||
|
@ -212,6 +212,7 @@ private:
|
||||
|
||||
// TODO: Generalize to all screen changes
|
||||
bool _shouldGoBackToPreviousScreen;
|
||||
Common::String _shouldPlayFmv;
|
||||
|
||||
Graphics::Surface *_gameWindowThumbnail;
|
||||
};
|
||||
|
@ -159,13 +159,13 @@ void StarkEngine::mainLoop() {
|
||||
break;
|
||||
}
|
||||
|
||||
StarkUserInterface->doQueuedScreenChange();
|
||||
|
||||
if (StarkResourceProvider->hasLocationChangeRequest()) {
|
||||
StarkGlobal->setNormalSpeed();
|
||||
StarkResourceProvider->performLocationChange();
|
||||
}
|
||||
|
||||
StarkUserInterface->doQueuedScreenChange();
|
||||
|
||||
updateDisplayScene();
|
||||
|
||||
// Swap buffers
|
||||
|
Loading…
Reference in New Issue
Block a user