diff options
author | Paul Gilbert | 2014-11-09 13:54:48 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-12-12 22:26:35 -0500 |
commit | bbaea32386927c856d22b97c877ddbba41fb142f (patch) | |
tree | c703b8e5dda993263f154a523a3aa5d339bfd1fb /engines | |
parent | 985ad555591ebb48ebe3f2bfd711d245bab40f71 (diff) | |
download | scummvm-rg350-bbaea32386927c856d22b97c877ddbba41fb142f.tar.gz scummvm-rg350-bbaea32386927c856d22b97c877ddbba41fb142f.tar.bz2 scummvm-rg350-bbaea32386927c856d22b97c877ddbba41fb142f.zip |
ACCESS: Fixes for flying plane cutscene
Diffstat (limited to 'engines')
-rw-r--r-- | engines/access/amazon/amazon_scripts.cpp | 12 | ||||
-rw-r--r-- | engines/access/events.cpp | 7 | ||||
-rw-r--r-- | engines/access/events.h | 2 | ||||
-rw-r--r-- | engines/access/room.cpp | 3 |
4 files changed, 18 insertions, 6 deletions
diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp index 857e4447e6..b79b1c5c64 100644 --- a/engines/access/amazon/amazon_scripts.cpp +++ b/engines/access/amazon/amazon_scripts.cpp @@ -247,15 +247,15 @@ void AmazonScripts::doFlyCell() { _vm->_buffer2.plotImage(sprites, 1, Common::Point(111, 77)); } - if (plane._pCount == 11 || plane._pCount == 12) + if (plane._planeCount == 11 || plane._planeCount == 12) ++plane._position.y; - else if (plane._pCount >= 28) + else if (plane._planeCount >= 28) --plane._position.y; _vm->_buffer2.plotImage(sprites, 7, plane._position); - _vm->_buffer2.plotImage(sprites, plane._propCount, Common::Point( + _vm->_buffer2.plotImage(sprites, 8 + plane._propCount, Common::Point( plane._position.x + 99, plane._position.y + 10)); - _vm->_buffer2.plotImage(sprites, plane._propCount, Common::Point( + _vm->_buffer2.plotImage(sprites, 11 + plane._propCount, Common::Point( plane._position.x + 104, plane._position.y + 18)); if (++plane._planeCount >= 30) @@ -374,8 +374,8 @@ void AmazonScripts::mWhileFly() { plane._xCount = 0; plane._position = Common::Point(20, 29); - while (!_vm->shouldQuit() && ((screen._scrollCol + screen._vWindowWidth) - != _vm->_room->_playFieldWidth)) { + while (!_vm->shouldQuit() && !events.isKeyMousePressed() && + ((screen._scrollCol + screen._vWindowWidth) != _vm->_room->_playFieldWidth)) { events._vbCount = 4; screen._scrollX += player._scrollAmount; diff --git a/engines/access/events.cpp b/engines/access/events.cpp index 7741a87677..0287e8cb03 100644 --- a/engines/access/events.cpp +++ b/engines/access/events.cpp @@ -264,6 +264,13 @@ int EventsManager::checkMouseBox1(Common::Array<Common::Rect> &rects) { } } +bool EventsManager::isKeyMousePressed() { + bool result = _leftButton || _rightButton || _keypresses.size() > 0; + debounceLeft(); + zeroKeys(); + + return result; +} } // End of namespace Access diff --git a/engines/access/events.h b/engines/access/events.h index def04effb8..4888a27593 100644 --- a/engines/access/events.h +++ b/engines/access/events.h @@ -124,6 +124,8 @@ public: Common::Point calcRawMouse(); int checkMouseBox1(Common::Array<Common::Rect> &rects); + + bool isKeyMousePressed(); }; } // End of namespace Access diff --git a/engines/access/room.cpp b/engines/access/room.cpp index e3ac84c231..f1e499d1c9 100644 --- a/engines/access/room.cpp +++ b/engines/access/room.cpp @@ -126,7 +126,10 @@ void Room::doRoom() { _vm->copyBF1BF2(); _vm->_newRects.clear(); _function = 0; + roomLoop(); + if (_vm->shouldQuit()) + return; if (_function == FN_CLEAR1) { clearRoom(); |