[Scummvm-cvs-logs] SF.net SVN: scummvm: [27010] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Wed May 30 12:20:21 CEST 2007


Revision: 27010
          http://scummvm.svn.sourceforge.net/scummvm/?rev=27010&view=rev
Author:   drmccoy
Date:     2007-05-30 03:20:21 -0700 (Wed, 30 May 2007)

Log Message:
-----------
- 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)

Modified Paths:
--------------
    scummvm/trunk/engines/gob/game.cpp
    scummvm/trunk/engines/gob/game.h
    scummvm/trunk/engines/gob/inter_v2.cpp
    scummvm/trunk/engines/gob/mult_v2.cpp

Modified: scummvm/trunk/engines/gob/game.cpp
===================================================================
--- scummvm/trunk/engines/gob/game.cpp	2007-05-29 21:50:32 UTC (rev 27009)
+++ scummvm/trunk/engines/gob/game.cpp	2007-05-30 10:20:21 UTC (rev 27010)
@@ -78,6 +78,7 @@
 	_forceHandleMouse = 0;
 	_menuLevel = 0;
 	_noScroll = true;
+	_preventScroll = false;
 	_scrollHandleMouse = false;
 
 	_tempStr[0] = 0;
@@ -291,7 +292,7 @@
 }
 
 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 @@
 	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) {

Modified: scummvm/trunk/engines/gob/game.h
===================================================================
--- scummvm/trunk/engines/gob/game.h	2007-05-29 21:50:32 UTC (rev 27009)
+++ scummvm/trunk/engines/gob/game.h	2007-05-30 10:20:21 UTC (rev 27010)
@@ -129,6 +129,7 @@
 	int16 _mouseButtons;
 
 	bool _noScroll;
+	bool _preventScroll;
 	bool _scrollHandleMouse;
 
 	Game(GobEngine *vm);

Modified: scummvm/trunk/engines/gob/inter_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v2.cpp	2007-05-29 21:50:32 UTC (rev 27009)
+++ scummvm/trunk/engines/gob/inter_v2.cpp	2007-05-30 10:20:21 UTC (rev 27010)
@@ -1492,6 +1492,7 @@
 		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 @@
 			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();

Modified: scummvm/trunk/engines/gob/mult_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/mult_v2.cpp	2007-05-29 21:50:32 UTC (rev 27009)
+++ scummvm/trunk/engines/gob/mult_v2.cpp	2007-05-30 10:20:21 UTC (rev 27010)
@@ -1016,6 +1016,8 @@
 	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 @@
 
 	if (key.imdFile == -1) {
 		_vm->_imdPlayer->closeImd();
+		_vm->_game->_preventScroll = false;
 		return;
 	}
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list