aboutsummaryrefslogtreecommitdiff
path: root/engines/access/amazon
diff options
context:
space:
mode:
authorPaul Gilbert2014-11-27 22:52:13 -0500
committerPaul Gilbert2014-12-12 22:49:35 -0500
commitb1ea7879f3f6726e4b63aac5f985876fcd1ea9b2 (patch)
tree9227cf48dc0aa1fee50d43386222721f0d064e9c /engines/access/amazon
parentc6042e2e2593f92ff0dc936fe34e6b933c284589 (diff)
downloadscummvm-rg350-b1ea7879f3f6726e4b63aac5f985876fcd1ea9b2.tar.gz
scummvm-rg350-b1ea7879f3f6726e4b63aac5f985876fcd1ea9b2.tar.bz2
scummvm-rg350-b1ea7879f3f6726e4b63aac5f985876fcd1ea9b2.zip
ACCESS: Fix saving/loading using ScummVM GMM in the river scene
Diffstat (limited to 'engines/access/amazon')
-rw-r--r--engines/access/amazon/amazon_scripts.cpp67
1 files changed, 38 insertions, 29 deletions
diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp
index aa904716c2..ea7df7bcbd 100644
--- a/engines/access/amazon/amazon_scripts.cpp
+++ b/engines/access/amazon/amazon_scripts.cpp
@@ -1562,7 +1562,12 @@ void AmazonScripts::moveCanoe() {
EventsManager &events = *_vm->_events;
Common::Point pt = events.calcRawMouse();
+ // Do an event polling
+ _vm->_canSaveLoad = true;
events.pollEvents();
+ _vm->_canSaveLoad = false;
+ if (_vm->_room->_function == FN_CLEAR1)
+ return;
if (_game->_canoeDir) {
// Canoe movement in progress
@@ -1584,10 +1589,7 @@ void AmazonScripts::moveCanoe() {
// Show the ScummVM menu
_vm->_room->handleCommand(9);
- if (_vm->_room->_function == FN_CLEAR1) {
- _endFlag = true;
- _returnCode = 0;
- } else {
+ if (_vm->_room->_function != FN_CLEAR1) {
_game->_saveRiver = 0;
_vm->_room->buildScreen();
_vm->copyBF2Vid();
@@ -1768,36 +1770,43 @@ void AmazonScripts::RIVER() {
pan();
moveCanoe();
- if (_vm->_room->_function == FN_CLEAR1) {
- _CHICKENOUTFLG = false;
- return;
- }
-
- updateObstacles();
- riverSetPhysX();
- bool checkCollide = checkRiverCollide();
- if (_game->_hitSafe != 0)
- _game->_hitSafe -= 2;
-
- if (checkCollide) {
- cmdDead(RIVERDEATH[0]);
- return;
- }
+ if (_vm->_room->_function != FN_CLEAR1) {
+ updateObstacles();
+ riverSetPhysX();
+ bool checkCollide = checkRiverCollide();
+ if (_game->_hitSafe != 0)
+ _game->_hitSafe -= 2;
- if (_game->_deathFlag) {
- _game->_deathCount--;
- if (_game->_deathCount == 0) {
- cmdDead(RIVERDEATH[_game->_deathType]);
+ if (checkCollide) {
+ cmdDead(RIVERDEATH[0]);
return;
}
- }
- // Scroll the river
- scrollRiver1();
+ if (_game->_deathFlag) {
+ _game->_deathCount--;
+ if (_game->_deathCount == 0) {
+ cmdDead(RIVERDEATH[_game->_deathType]);
+ return;
+ }
+ }
+
+ // Scroll the river
+ scrollRiver1();
- // Allow time for new scrolled river position to be shown
- while (!_vm->shouldQuit() && _vm->_events->_vbCount > 0) {
- _vm->_events->pollEventsAndWait();
+ // Allow time for new scrolled river position to be shown
+ _vm->_canSaveLoad = true;
+ while (!_vm->shouldQuit() && _vm->_room->_function == FN_NONE &&
+ _vm->_events->_vbCount > 0) {
+ _vm->_events->pollEventsAndWait();
+ }
+ _vm->_canSaveLoad = false;
+ }
+
+ if (_vm->_room->_function == FN_CLEAR1) {
+ _endFlag = true;
+ _returnCode = 0;
+ _CHICKENOUTFLG = false;
+ break;
}
}
}