diff options
author | Paul Gilbert | 2018-04-02 21:06:01 -0400 |
---|---|---|
committer | Paul Gilbert | 2018-04-02 21:06:01 -0400 |
commit | c8b9b7c8a246452339d678f9bbf6f67e23d0aca5 (patch) | |
tree | b540bcd941e933e2164d517649a9f590da267c3d | |
parent | 9f77bb3d842e2b327af963bb45b7d69b3702c09c (diff) | |
download | scummvm-rg350-c8b9b7c8a246452339d678f9bbf6f67e23d0aca5.tar.gz scummvm-rg350-c8b9b7c8a246452339d678f9bbf6f67e23d0aca5.tar.bz2 scummvm-rg350-c8b9b7c8a246452339d678f9bbf6f67e23d0aca5.zip |
XEEN: Fix script for Miles the Cartographer
-rw-r--r-- | engines/xeen/dialogs/dialogs_input.cpp | 3 | ||||
-rw-r--r-- | engines/xeen/interface.h | 1 | ||||
-rw-r--r-- | engines/xeen/locations.cpp | 21 | ||||
-rw-r--r-- | engines/xeen/scripts.h | 2 |
4 files changed, 11 insertions, 16 deletions
diff --git a/engines/xeen/dialogs/dialogs_input.cpp b/engines/xeen/dialogs/dialogs_input.cpp index 0ac8f3612b..974ee7ce54 100644 --- a/engines/xeen/dialogs/dialogs_input.cpp +++ b/engines/xeen/dialogs/dialogs_input.cpp @@ -144,7 +144,6 @@ int StringInput::show(XeenEngine *vm, bool type, const Common::String &msg1, int StringInput::execute(bool type, const Common::String &expected, const Common::String &title, int opcode) { FileManager &files = *_vm->_files; - Interface &intf = *_vm->_interface; Scripts &scripts = *_vm->_scripts; Windows &windows = *_vm->_windows; Window &w = windows[6]; @@ -158,7 +157,7 @@ int StringInput::execute(bool type, const Common::String &expected, Common::String line; if (getString(line, 30, 200, false)) { if (type) { - if (line == intf._interfaceText) { + if (!line.compareToIgnoreCase(scripts._message)) { result = true; } else if (line == expected) { result = (opcode == 55) ? -1 : 1; diff --git a/engines/xeen/interface.h b/engines/xeen/interface.h index 6de04495b2..5639171c40 100644 --- a/engines/xeen/interface.h +++ b/engines/xeen/interface.h @@ -164,7 +164,6 @@ private: void nextChar(); public: Obscurity _obscurity; - Common::String _interfaceText; FallState _falling; int _face1State, _face2State; int _face1UIFrame, _face2UIFrame; diff --git a/engines/xeen/locations.cpp b/engines/xeen/locations.cpp index 0e6dddd231..552b1c899d 100644 --- a/engines/xeen/locations.cpp +++ b/engines/xeen/locations.cpp @@ -2354,21 +2354,18 @@ bool LocationMessage::execute(int portrait, const Common::String &name, const Co do { events.clearEvents(); - events.updateGameCounter(); - if (msgEnd) - clearButtons(); + clearEvents(); do { - events.pollEventsAndWait(); - checkEvents(_vm); - - if (_vm->shouldExit()) - return false; - - while (events.timeElapsed() >= 3) { - drawAnim(false); - events.updateGameCounter(); + events.updateGameCounter(); + while (!_buttonValue && events.timeElapsed() < 3) { + events.pollEventsAndWait(); + checkEvents(_vm); + if (g_vm->shouldExit()) + return false; } + + drawAnim(false); } while (!_buttonValue); if (msgEnd) diff --git a/engines/xeen/scripts.h b/engines/xeen/scripts.h index f35aecedff..1bdf836287 100644 --- a/engines/xeen/scripts.h +++ b/engines/xeen/scripts.h @@ -220,7 +220,6 @@ private: MazeEvent *_event; Common::Point _currentPos; Common::Stack<StackEntry> _stack; - Common::String _message; Common::String _displayMessage; typedef EventParameters::Iterator ParamsIterator; @@ -552,6 +551,7 @@ public: DamageType _nEdamageType; int _itemType; Common::Array<MirrorEntry> _mirror; + Common::String _message; public: Scripts(XeenEngine *vm); |