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 /engines/xeen/scripts.cpp | |
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
Diffstat (limited to 'engines/xeen/scripts.cpp')
-rw-r--r-- | engines/xeen/scripts.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
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(); |