diff options
author | Paul Gilbert | 2017-11-26 12:45:07 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-11-26 12:45:07 -0500 |
commit | 1b592b6ffee0195e9a6a48bcf688cbad6e895acc (patch) | |
tree | 2f5e3886dac89d4fa627af03d4b359a3fa0b4784 /engines | |
parent | b0fb60495e9ba94b0b248d96c186774d1d132d1e (diff) | |
download | scummvm-rg350-1b592b6ffee0195e9a6a48bcf688cbad6e895acc.tar.gz scummvm-rg350-1b592b6ffee0195e9a6a48bcf688cbad6e895acc.tar.bz2 scummvm-rg350-1b592b6ffee0195e9a6a48bcf688cbad6e895acc.zip |
XEEN: Fixes to selection of mirror destinations
Diffstat (limited to 'engines')
-rw-r--r-- | engines/xeen/dialogs_input.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/scripts.cpp | 23 |
2 files changed, 14 insertions, 11 deletions
diff --git a/engines/xeen/dialogs_input.cpp b/engines/xeen/dialogs_input.cpp index 6ffec501a1..b31a72b9b0 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 ef46f45c24..413e877e2d 100644 --- a/engines/xeen/scripts.cpp +++ b/engines/xeen/scripts.cpp @@ -475,9 +475,11 @@ bool Scripts::cmdTeleport(ParamsIterator ¶ms) { 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 ¶ms) { 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 ¶ms) { } } - _lineNum = result == -1 ? param3 : lineNum; + _lineNum = _mirrorId == -1 ? param3 : lineNum; + return false; } } |