diff options
author | Torbjörn Andersson | 2015-05-31 16:05:31 +0200 |
---|---|---|
committer | Torbjörn Andersson | 2015-05-31 16:05:31 +0200 |
commit | 2826a06bc56386f845fd6551ba422f1baf5e3ecd (patch) | |
tree | 95002649c0ee9e5869ab2537fd17c562dcc6b7fd /engines/sherlock/talk.cpp | |
parent | 35fe594133e3b68f5f77db9416d4a73f5924ba3e (diff) | |
download | scummvm-rg350-2826a06bc56386f845fd6551ba422f1baf5e3ecd.tar.gz scummvm-rg350-2826a06bc56386f845fd6551ba422f1baf5e3ecd.tar.bz2 scummvm-rg350-2826a06bc56386f845fd6551ba422f1baf5e3ecd.zip |
SHERLOCK: Fix regression in conversations
This causes replies to once again be shown in their entirety,
instead of one line at a time.
There were two errors: First of all, _wait was always set to 1,
because one of the conditions was "|| _opcodes[OP_IF_STATEMENT]"
instead of "|| v == _opcodes[OP_IF_STATEMENT]".
Secondly, judging by the older version, this part of the code
should only be allowed to set _wait to 1, never to 0, because we
may have already set it to 1 for other reasons.
Diffstat (limited to 'engines/sherlock/talk.cpp')
-rw-r--r-- | engines/sherlock/talk.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp index 96e4d0d41c..59897e2c2a 100644 --- a/engines/sherlock/talk.cpp +++ b/engines/sherlock/talk.cpp @@ -1270,9 +1270,12 @@ void Talk::doScript(const Common::String &script) { } byte v = (str >= _scriptEnd ? 0 : str[0]); - _wait = v == _opcodes[OP_SWITCH_SPEAKER] || v == _opcodes[OP_ASSIGN_PORTRAIT_LOCATION] || - v == _opcodes[OP_BANISH_WINDOW] || _opcodes[OP_IF_STATEMENT] || v == _opcodes[OP_ELSE_STATEMENT] || - v == _opcodes[OP_END_IF_STATEMENT] || v == _opcodes[OP_GOTO_SCENE] || v == _opcodes[OP_CALL_TALK_FILE]; + if (v == _opcodes[OP_SWITCH_SPEAKER] || v == _opcodes[OP_ASSIGN_PORTRAIT_LOCATION] || + v == _opcodes[OP_BANISH_WINDOW] || v == _opcodes[OP_IF_STATEMENT] || + v == _opcodes[OP_ELSE_STATEMENT] || v == _opcodes[OP_END_IF_STATEMENT] || + v == _opcodes[OP_GOTO_SCENE] || v == _opcodes[OP_CALL_TALK_FILE]) { + _wait = 1; + } } // Open window if it wasn't already open, and text has already been printed |