diff options
-rw-r--r-- | engines/gob/game.cpp | 10 | ||||
-rw-r--r-- | engines/gob/game.h | 1 | ||||
-rw-r--r-- | engines/gob/inter_v2.cpp | 3 | ||||
-rw-r--r-- | engines/gob/mult_v2.cpp | 3 |
4 files changed, 16 insertions, 1 deletions
diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp index 43eac76928..9bc2396104 100644 --- a/engines/gob/game.cpp +++ b/engines/gob/game.cpp @@ -78,6 +78,7 @@ Game::Game(GobEngine *vm) : _vm(vm) { _forceHandleMouse = 0; _menuLevel = 0; _noScroll = true; + _preventScroll = false; _scrollHandleMouse = false; _tempStr[0] = 0; @@ -291,7 +292,7 @@ void Game::freeSoundSlot(int16 slot) { } void Game::evaluateScroll(int16 x, int16 y) { - if (!_scrollHandleMouse || (_menuLevel > 0)) + if (_preventScroll || !_scrollHandleMouse || (_menuLevel > 0)) return; if (_noScroll || (_vm->_global->_videoMode != 0x14)) @@ -538,6 +539,13 @@ void Game::switchTotSub(int16 index, int16 skipPlay) { if ((_backupedCount - index) < 1) return; + int16 newPos = _curBackupPos - index - ((index >= 0) ? 1 : 0); + // WORKAROUND: Some versions don't make the MOVEMENT menu item unselectable + // in the dreamland screen, resulting in a crash when it's clicked. + if ((_vm->_features & GF_GOB2) && (index == -1) && (skipPlay == 7) && + !scumm_stricmp(_curTotFileArray[newPos], "gob06.tot")) + return; + curBackupPos = _curBackupPos; backupedCount = _backupedCount; if (_curBackupPos == _backupedCount) { diff --git a/engines/gob/game.h b/engines/gob/game.h index 66fa0179fd..f017529292 100644 --- a/engines/gob/game.h +++ b/engines/gob/game.h @@ -129,6 +129,7 @@ public: int16 _mouseButtons; bool _noScroll; + bool _preventScroll; bool _scrollHandleMouse; Game(GobEngine *vm); diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 78ea9cab7a..331be9fdda 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -1492,6 +1492,7 @@ void Inter_v2::o2_playImd() { close = false; } + _vm->_game->_preventScroll = true; for (int i = startFrame; i <= lastFrame; i++) { _vm->_imdPlayer->play(i, palCmd, palStart, palEnd, 0, lastFrame); WRITE_VAR(11, i); @@ -1507,10 +1508,12 @@ void Inter_v2::o2_playImd() { if (VAR(0) == (unsigned) breakKey) { if (_vm->_imdPlayer->_soundStage == 2) _vm->_snd->stopSound(0); + _vm->_game->_preventScroll = false; return; } } } + _vm->_game->_preventScroll = false; if (close) _vm->_imdPlayer->closeImd(); diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp index 8b158ab314..0e914920bc 100644 --- a/engines/gob/mult_v2.cpp +++ b/engines/gob/mult_v2.cpp @@ -1016,6 +1016,8 @@ void Mult_v2::playImd(const char *imdFile, Mult::Mult_ImdKey &key, int16 dir, int16 baseFrame, palFrame, lastFrame; uint16 flags; + _vm->_game->_preventScroll = true; + if (_vm->_draw->_renderFlags & 0x100) { x = VAR(55); y = VAR(56); @@ -1024,6 +1026,7 @@ void Mult_v2::playImd(const char *imdFile, Mult::Mult_ImdKey &key, int16 dir, if (key.imdFile == -1) { _vm->_imdPlayer->closeImd(); + _vm->_game->_preventScroll = false; return; } |