Skip to content

Commit

Permalink
ACCESS: Fixes for flying plane cutscene
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Dec 13, 2014
1 parent 985ad55 commit bbaea32
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
12 changes: 6 additions & 6 deletions engines/access/amazon/amazon_scripts.cpp
Expand Up @@ -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)
Expand Down Expand Up @@ -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;

Expand Down
7 changes: 7 additions & 0 deletions engines/access/events.cpp
Expand Up @@ -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
2 changes: 2 additions & 0 deletions engines/access/events.h
Expand Up @@ -124,6 +124,8 @@ class EventsManager {
Common::Point calcRawMouse();

int checkMouseBox1(Common::Array<Common::Rect> &rects);

bool isKeyMousePressed();
};

} // End of namespace Access
Expand Down
3 changes: 3 additions & 0 deletions engines/access/room.cpp
Expand Up @@ -126,7 +126,10 @@ void Room::doRoom() {
_vm->copyBF1BF2();
_vm->_newRects.clear();
_function = 0;

roomLoop();
if (_vm->shouldQuit())
return;

if (_function == FN_CLEAR1) {
clearRoom();
Expand Down

0 comments on commit bbaea32

Please sign in to comment.