diff options
author | Jaromir Wysoglad | 2019-06-03 11:21:04 +0200 |
---|---|---|
committer | Thierry Crozat | 2019-07-28 15:09:14 +0100 |
commit | beadc80462421b3b4de0e56c9e422f1b9ee1fa8b (patch) | |
tree | 0ff81e58d01be601b79c9af1ca86760f2047fe9b | |
parent | 63ca424ac30e8651969983507edd30dc43dc1d35 (diff) | |
download | scummvm-rg350-beadc80462421b3b4de0e56c9e422f1b9ee1fa8b.tar.gz scummvm-rg350-beadc80462421b3b4de0e56c9e422f1b9ee1fa8b.tar.bz2 scummvm-rg350-beadc80462421b3b4de0e56c9e422f1b9ee1fa8b.zip |
SUPERNOVA2: Fix not quiting during intro
While trying to quit the game during intro, the
intro only sped up instead of quiting and quit
only when the intro ended
-rw-r--r-- | engines/supernova2/rooms.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/engines/supernova2/rooms.cpp b/engines/supernova2/rooms.cpp index a95c522428..a5ea68fb2a 100644 --- a/engines/supernova2/rooms.cpp +++ b/engines/supernova2/rooms.cpp @@ -287,14 +287,14 @@ bool Intro::tvSay(int mod1, int mod2, int rest, MessagePosition pos, StringId id if (_gm->waitOnInput(2, key)) { _vm->removeMessage(); - return key != Common::KEYCODE_ESCAPE; + return key != Common::KEYCODE_ESCAPE && !_vm->shouldQuit(); } if (mod2) _vm->renderImage(mod2); if (_gm->waitOnInput(2, key)) { _vm->removeMessage(); - return key != Common::KEYCODE_ESCAPE; + return key != Common::KEYCODE_ESCAPE && !_vm->shouldQuit(); } animation_count--; } @@ -310,12 +310,12 @@ bool Intro::tvRest(int mod1, int mod2, int rest) { _vm->renderImage(mod1); if (_gm->waitOnInput(2, key)) { _vm->removeMessage(); - return key != Common::KEYCODE_ESCAPE; + return key != Common::KEYCODE_ESCAPE && !_vm->shouldQuit(); } _vm->renderImage(mod2); if (_gm->waitOnInput(2, key)) { _vm->removeMessage(); - return key != Common::KEYCODE_ESCAPE; + return key != Common::KEYCODE_ESCAPE && !_vm->shouldQuit(); } rest--; } @@ -328,13 +328,16 @@ bool Intro::displayThoughtMessage(StringId id) { _vm->renderMessage(text, kMessageNormal); if (_gm->waitOnInput((text.size() + 20) * _vm->_textSpeed / 10, key)) { _vm->removeMessage(); - return key != Common::KEYCODE_ESCAPE; + return key != Common::KEYCODE_ESCAPE && !_vm->shouldQuit(); } _vm->removeMessage(); return true; } bool Intro::thoughts1() { + if(_vm->shouldQuit()) + return false; + _vm->setCurrentImage(41); _vm->renderImage(0); _vm->paletteFadeIn(); @@ -353,6 +356,9 @@ bool Intro::thoughts1() { } bool Intro::thoughts2() { + if(_vm->shouldQuit()) + return false; + _vm->setCurrentImage(41); _vm->renderImage(0); _vm->paletteFadeIn(); @@ -399,6 +405,9 @@ bool Intro::thoughts2() { } bool Intro::tvDialogue() { + if(_vm->shouldQuit()) + return false; + _vm->setCurrentImage(39); _vm->renderImage(0); _vm->paletteFadeIn(); @@ -429,6 +438,7 @@ bool Intro::tvDialogue() { if(!tvSay(8, 6, 7, kMessageLeft, kStringIntroTV2)) return false; + debug("%d", _vm->shouldQuit()); _vm->renderImage(10); |