diff options
author | Paul Gilbert | 2018-04-05 07:01:40 -0400 |
---|---|---|
committer | Paul Gilbert | 2018-04-05 07:01:40 -0400 |
commit | 5b1f05413314f7ed030983b6541072ac1d197b4f (patch) | |
tree | 33d09557d83938e150433f7e28fe678d562e4a09 | |
parent | 98b20059ba5147514305d65083b848924e86e515 (diff) | |
download | scummvm-rg350-5b1f05413314f7ed030983b6541072ac1d197b4f.tar.gz scummvm-rg350-5b1f05413314f7ed030983b6541072ac1d197b4f.tar.bz2 scummvm-rg350-5b1f05413314f7ed030983b6541072ac1d197b4f.zip |
XEEN: Fix entering password in Castle Basenji
-rw-r--r-- | engines/xeen/dialogs/dialogs_input.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/scripts.cpp | 18 |
2 files changed, 13 insertions, 7 deletions
diff --git a/engines/xeen/dialogs/dialogs_input.cpp b/engines/xeen/dialogs/dialogs_input.cpp index 974ee7ce54..b259908fe0 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 cd95a5938f..05b03e3a46 100644 --- a/engines/xeen/scripts.cpp +++ b/engines/xeen/scripts.cpp @@ -934,18 +934,24 @@ bool Scripts::cmdConfirmWord(ParamsIterator ¶ms) { 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(); |