[Scummvm-git-logs] scummvm master -> 5b1f05413314f7ed030983b6541072ac1d197b4f

dreammaster dreammaster at scummvm.org
Thu Apr 5 13:01:42 CEST 2018


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:
5b1f054133 XEEN: Fix entering password in Castle Basenji


Commit: 5b1f05413314f7ed030983b6541072ac1d197b4f
    https://github.com/scummvm/scummvm/commit/5b1f05413314f7ed030983b6541072ac1d197b4f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-04-05T07:01:40-04:00

Commit Message:
XEEN: Fix entering password in Castle Basenji

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


diff --git a/engines/xeen/dialogs/dialogs_input.cpp b/engines/xeen/dialogs/dialogs_input.cpp
index 974ee7c..b259908 100644
--- a/engines/xeen/dialogs/dialogs_input.cpp
+++ b/engines/xeen/dialogs/dialogs_input.cpp
@@ -159,7 +159,7 @@ int StringInput::execute(bool type, const Common::String &expected,
 		if (type) {
 			if (!line.compareToIgnoreCase(scripts._message)) {
 				result = true;
-			} else if (line == expected) {
+			} else if (!line.compareToIgnoreCase(expected)) {
 				result = (opcode == 55) ? -1 : 1;
 			}
 		} else {
diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp
index cd95a59..05b03e3 100644
--- a/engines/xeen/scripts.cpp
+++ b/engines/xeen/scripts.cpp
@@ -934,18 +934,24 @@ bool Scripts::cmdConfirmWord(ParamsIterator &params) {
 	int param2 = params.readByte();
 	int param3 = params.readByte();
 
-	Common::String msg1 = param2 ? map._events._text[param2] : _message;
-	Common::String msg2;
+	Common::String expected2;
+	Common::String title;
 
 	if (_event->_opcode == OP_ConfirmWord_2) {
-		msg2 = "";
+		title = "";
 	} else if (param3) {
-		msg2 = map._events._text[param3];
+		title = map._events._text[param3];
 	} else {
-		msg2 = Res.WHATS_THE_PASSWORD;
+		title = Res.WHATS_THE_PASSWORD;
 	}
 
-	_mirrorId = StringInput::show(_vm, inputType, msg1, msg2, _event->_opcode);
+	if (!param2) {
+		expected2 = _message;
+	} else if (param2 < (int)map._events._text.size()) {
+		expected2 = map._events._text[param2];
+	}
+
+	_mirrorId = StringInput::show(_vm, inputType, expected2, title, _event->_opcode);
 	if (_mirrorId) {
 		if (_mirrorId == 33 && files._ccNum) {
 			doDarkSideEnding();





More information about the Scummvm-git-logs mailing list