[Scummvm-git-logs] scummvm master -> 1b592b6ffee0195e9a6a48bcf688cbad6e895acc

dreammaster dreammaster at scummvm.org
Sun Nov 26 18:45:16 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
1b592b6ffe XEEN: Fixes to selection of mirror destinations


Commit: 1b592b6ffee0195e9a6a48bcf688cbad6e895acc
    https://github.com/scummvm/scummvm/commit/1b592b6ffee0195e9a6a48bcf688cbad6e895acc
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-11-26T12:45:07-05:00

Commit Message:
XEEN: Fixes to selection of mirror destinations

Changed paths:
    engines/xeen/dialogs_input.cpp
    engines/xeen/scripts.cpp


diff --git a/engines/xeen/dialogs_input.cpp b/engines/xeen/dialogs_input.cpp
index 6ffec50..b31a72b 100644
--- a/engines/xeen/dialogs_input.cpp
+++ b/engines/xeen/dialogs_input.cpp
@@ -179,7 +179,7 @@ int StringInput::execute(bool type, const Common::String &expected,
 
 			for (uint idx = 0; idx < scripts._mirror.size(); ++idx) {
 				if (line == scripts._mirror[idx]._name) {
-					result = idx;
+					result = idx + 1;
 					sound.playFX(_vm->_files->_isDarkCc ? 35 : 61);
 					break;
 				}
diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp
index ef46f45..413e877 100644
--- a/engines/xeen/scripts.cpp
+++ b/engines/xeen/scripts.cpp
@@ -475,9 +475,11 @@ bool Scripts::cmdTeleport(ParamsIterator &params) {
 	Common::Point pt;
 
 	if (mapId) {
+		// Specific map, x & y specified
 		pt.x = params.readShort();
 		pt.y = params.readShort();
 	} else {
+		// Mirror teleportation
 		assert(_mirrorId > 0);
 		MirrorEntry &me = _mirror[_mirrorId - 1];
 		mapId = me._mapId;
@@ -933,23 +935,23 @@ bool Scripts::cmdConfirmWord(ParamsIterator &params) {
 		msg2 = Res.WHATS_THE_PASSWORD;
 	}
 
-	int result = StringInput::show(_vm, inputType, msg1, msg2, _event->_opcode);
-	if (result) {
-		if (result == 33 && _vm->_files->_isDarkCc) {
+	_mirrorId = StringInput::show(_vm, inputType, msg1, msg2, _event->_opcode);
+	if (_mirrorId) {
+		if (_mirrorId == 33 && _vm->_files->_isDarkCc) {
 			doEndGame2();
-		} else if (result == 34 && _vm->_files->_isDarkCc) {
+		} else if (_mirrorId == 34 && _vm->_files->_isDarkCc) {
 			doWorldEnd();
-		} else if (result == 35 && _vm->_files->_isDarkCc &&
+		} else if (_mirrorId == 35 && _vm->_files->_isDarkCc &&
 				_vm->getGameID() == GType_WorldOfXeen) {
 			doEndGame();
-		} else if (result == 40 && !_vm->_files->_isDarkCc) {
+		} else if (_mirrorId == 40 && !_vm->_files->_isDarkCc) {
 			doEndGame();
-		} else if (result == 60 && !_vm->_files->_isDarkCc) {
+		} else if (_mirrorId == 60 && !_vm->_files->_isDarkCc) {
 			doEndGame2();
-		} else if (result == 61 && !_vm->_files->_isDarkCc) {
+		} else if (_mirrorId == 61 && !_vm->_files->_isDarkCc) {
 			doWorldEnd();
 		} else {
-			if (result == 59 && !_vm->_files->_isDarkCc) {
+			if (_mirrorId == 59 && !_vm->_files->_isDarkCc) {
 				for (int idx = 0; idx < MAX_TREASURE_ITEMS; ++idx) {
 					XeenItem &item = party._treasure._weapons[idx];
 					if (!item._id) {
@@ -963,7 +965,8 @@ bool Scripts::cmdConfirmWord(ParamsIterator &params) {
 				}
 			}
 
-			_lineNum = result == -1 ? param3 : lineNum;
+			_lineNum = _mirrorId == -1 ? param3 : lineNum;
+			return false;
 		}
 	}
 





More information about the Scummvm-git-logs mailing list