aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Hesse2007-05-30 10:20:21 +0000
committerSven Hesse2007-05-30 10:20:21 +0000
commit0504f18e9f2a4d03f4b5ce7cfb60cd7a2a383a42 (patch)
tree55d319fc76810e56433ba53043852d2ec73ed8f3
parent39fafdc3033e4d1e5b8a8505cfcfbfe3affc7b8f (diff)
downloadscummvm-rg350-0504f18e9f2a4d03f4b5ce7cfb60cd7a2a383a42.tar.gz
scummvm-rg350-0504f18e9f2a4d03f4b5ce7cfb60cd7a2a383a42.tar.bz2
scummvm-rg350-0504f18e9f2a4d03f4b5ce7cfb60cd7a2a383a42.zip
- Added a workaround for bug #1705338 (Seg fault when trying to switch screen in music land) which is actually a script bug.
- Fixed the scrolling bug (#1709574) (the mouse cursor is still shown, that's an instance of the global cursor visibility issue) svn-id: r27010
-rw-r--r--engines/gob/game.cpp10
-rw-r--r--engines/gob/game.h1
-rw-r--r--engines/gob/inter_v2.cpp3
-rw-r--r--engines/gob/mult_v2.cpp3
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;
}