From bbaea32386927c856d22b97c877ddbba41fb142f Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 9 Nov 2014 13:54:48 -0500 Subject: ACCESS: Fixes for flying plane cutscene --- engines/access/amazon/amazon_scripts.cpp | 12 ++++++------ engines/access/events.cpp | 7 +++++++ engines/access/events.h | 2 ++ engines/access/room.cpp | 3 +++ 4 files changed, 18 insertions(+), 6 deletions(-) (limited to 'engines') 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 &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 &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(); -- cgit v1.2.3