diff options
Diffstat (limited to 'engines/sherlock/talk.cpp')
-rw-r--r-- | engines/sherlock/talk.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp index 416f04f631..e399c268ed 100644 --- a/engines/sherlock/talk.cpp +++ b/engines/sherlock/talk.cpp @@ -750,15 +750,17 @@ void Talk::doScript(const Common::String &script) { // Start of comment, so skip over it while (*str++ != '}') ; - } else if (isOpcode(c)) { - // Handle control code - switch ((this->*_opcodeTable[c - _opcodes[0]])(str)) { - case RET_EXIT: - return; - case RET_CONTINUE: - continue; - default: - break; + } else if (isPossibleOpcode(c)) { + if (isOpcode(c)) { + // Handle control code + switch ((this->*_opcodeTable[c - _opcodes[0]])(str)) { + case RET_EXIT: + return; + case RET_CONTINUE: + continue; + default: + break; + } } ++str; @@ -912,6 +914,13 @@ bool Talk::isOpcode(byte checkCharacter) { return false; } +bool Talk::isPossibleOpcode(byte checkCharacter) { + if (IS_SERRATED_SCALPEL && _vm->getLanguage() == Common::ES_ESP) + return checkCharacter >= 128; + + return isOpcode(checkCharacter); +} + void Talk::popStack() { if (!_scriptStack.empty()) { ScriptStackEntry scriptEntry = _scriptStack.pop(); |