[Scummvm-git-logs] scummvm master -> b1f927f10577c4547b0667776d5df124d3a8dd15
bgK
bastien.bouclet at gmail.com
Sun Apr 15 07:51:18 CEST 2018
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
b1f927f105 MOHAWK: MYST: Make changeBackgroundSound wait for the effect to complete
Commit: b1f927f10577c4547b0667776d5df124d3a8dd15
https://github.com/scummvm/scummvm/commit/b1f927f10577c4547b0667776d5df124d3a8dd15
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2018-04-15T06:17:45+02:00
Commit Message:
MOHAWK: MYST: Make changeBackgroundSound wait for the effect to complete
Fixes #10489.
Changed paths:
engines/mohawk/myst_scripts.cpp
engines/mohawk/myst_scripts.h
diff --git a/engines/mohawk/myst_scripts.cpp b/engines/mohawk/myst_scripts.cpp
index 70923e9..4b22a94 100644
--- a/engines/mohawk/myst_scripts.cpp
+++ b/engines/mohawk/myst_scripts.cpp
@@ -625,6 +625,8 @@ void MystScriptParser::o_copyImageToBackBuffer(uint16 var, const ArgumentsArray
}
void MystScriptParser::o_changeBackgroundSound(uint16 var, const ArgumentsArray &args) {
+ soundWaitStop();
+
// Used on Stoneship Card 2080
// Used on Channelwood Card 3225 with argc = 8 i.e. Conditional Sound List
Common::MemoryWriteStreamDynamic writeStream = Common::MemoryWriteStreamDynamic(DisposeAfterUse::YES);
@@ -787,12 +789,16 @@ void MystScriptParser::o_soundWaitStop(uint16 var, const ArgumentsArray &args) {
// Used on Selenitic Card 1191 (Maze Runner)
// Used on Mechanical Card 6267 (Code Lock)
// Used when Button is pushed...
- while (_vm->_sound->isEffectPlaying())
+ soundWaitStop();
+}
+
+void MystScriptParser::soundWaitStop() const {
+ while (_vm->_sound->isEffectPlaying() && !Engine::shouldQuit())
_vm->doFrame();
}
void MystScriptParser::o_quit(uint16 var, const ArgumentsArray &args) {
- _vm->quitGame();
+ Engine::quitGame();
}
void MystScriptParser::showMap() {
diff --git a/engines/mohawk/myst_scripts.h b/engines/mohawk/myst_scripts.h
index 3ef8663..a7a840b 100644
--- a/engines/mohawk/myst_scripts.h
+++ b/engines/mohawk/myst_scripts.h
@@ -87,6 +87,7 @@ public:
void showMap();
void animatedUpdate(const ArgumentsArray &args, uint16 delay);
+ void soundWaitStop() const;
// Common opcodes
DECLARE_OPCODE(o_toggleVar);
More information about the Scummvm-git-logs
mailing list