[Scummvm-cvs-logs] CVS: scummvm/scumm input.cpp,2.47,2.48 script_v2.cpp,2.285,2.286

kirben kirben at users.sourceforge.net
Sun Nov 20 01:11:02 CET 2005


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7677/scumm

Modified Files:
	input.cpp script_v2.cpp 
Log Message:

Fix skipping cutscene in Commodore 64 version of zak.


Index: input.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/input.cpp,v
retrieving revision 2.47
retrieving revision 2.48
diff -u -d -r2.47 -r2.48
--- input.cpp	15 Nov 2005 22:50:14 -0000	2.47
+++ input.cpp	20 Nov 2005 09:10:18 -0000	2.48
@@ -258,20 +258,20 @@
 		}
 	}
 
-	if (_leftBtnPressed & msClicked && _rightBtnPressed & msClicked && _version > 3) {
+	if (_leftBtnPressed & msClicked && _rightBtnPressed & msClicked && _version >= 4) {
 		// Pressing both mouse buttons is treated as if you pressed
 		// the cutscene exit key (i.e. ESC in most games). That mimicks
 		// the behaviour of the original engine where pressing both
 		// mouse buttons also skips the current cutscene.
 		_mouseAndKeyboardStat = 0;
 		_lastKeyHit = (uint)VAR(VAR_CUTSCENEEXIT_KEY);
-	} else if (_rightBtnPressed & msClicked && (_version < 4 && _gameId != GID_LOOM)) {
+	} else if (_rightBtnPressed & msClicked && (_version <- 3 && _gameId != GID_LOOM)) {
 		// Pressing right mouse button is treated as if you pressed
 		// the cutscene exit key (i.e. ESC in most games). That mimicks
 		// the behaviour of the original engine where pressing right
 		// mouse button also skips the current cutscene.
 		_mouseAndKeyboardStat = 0;
-		_lastKeyHit = (uint)VAR(VAR_CUTSCENEEXIT_KEY);
+		_lastKeyHit = (VAR_CUTSCENEEXIT_KEY != 0xFF) ? (uint)VAR(VAR_CUTSCENEEXIT_KEY) : 27;
 	} else if (_leftBtnPressed & msClicked) {
 		_mouseAndKeyboardStat = MBS_LEFT_CLICK;
 	} else if (_rightBtnPressed & msClicked) {
@@ -305,11 +305,11 @@
 	if (_lastKeyHit == KEY_ALL_SKIP) {
 		// Skip cutscene
 		if (smushMode) {
-			_lastKeyHit = (uint)VAR(VAR_CUTSCENEEXIT_KEY);
+			_lastKeyHit = (VAR_CUTSCENEEXIT_KEY != 0xFF) ? (uint)VAR(VAR_CUTSCENEEXIT_KEY) : 27;
 		}
 		else
 		if (vm.cutScenePtr[vm.cutSceneStackPointer])
-			_lastKeyHit = (uint)VAR(VAR_CUTSCENEEXIT_KEY);
+			_lastKeyHit = (VAR_CUTSCENEEXIT_KEY != 0xFF) ? (uint)VAR(VAR_CUTSCENEEXIT_KEY) : 27;
 		else
 		// Skip talk
 		if (VAR_TALKSTOP_KEY != 0xFF && _talkDelay > 0)
@@ -380,8 +380,7 @@
 		saveloadkey = VAR(VAR_MAINMENU_KEY);
 
 	if ((_platform == Common::kPlatformC64 && _gameId == GID_MANIAC && _lastKeyHit == 27) || 
-		((VAR(VAR_CUTSCENEEXIT_KEY) == 4 || VAR(VAR_CUTSCENEEXIT_KEY) == 64) && _lastKeyHit == 27) ||
-		_lastKeyHit == VAR(VAR_CUTSCENEEXIT_KEY)) {
+		(VAR_CUTSCENEEXIT_KEY != 0xFF && _lastKeyHit == VAR(VAR_CUTSCENEEXIT_KEY))) {
 #ifndef DISABLE_SCUMM_7_8
 		// Skip cutscene (or active SMUSH video). For the V2 games, which
 		// normally use F4 for this, we add in a hack that makes escape work,

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.285
retrieving revision 2.286
diff -u -d -r2.285 -r2.286
--- script_v2.cpp	1 Nov 2005 11:27:41 -0000	2.285
+++ script_v2.cpp	20 Nov 2005 09:10:18 -0000	2.286
@@ -445,6 +445,12 @@
 	checkRange(_numVariables - 1, 0, var, "Variable %d out of range(r)");
 	debugC(DEBUG_VARS, "writeVar(%d) = %d", var, value);
 
+	if (VAR_CUTSCENEEXIT_KEY != 0xFF && var == VAR_CUTSCENEEXIT_KEY) {
+		// Remap the cutscene exit key in earlier games
+		if (value == 4 || value == 13 || value == 64)
+			value = 27;
+	}
+
 	_scummVars[var] = value;
 
 	// HACK: Ender's hack around a bug in Maniac. If you take the last dime from





More information about the Scummvm-git-logs mailing list