diff options
author | Paul Gilbert | 2015-06-13 19:46:33 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-06-13 19:46:33 -0400 |
commit | c5490b8ecc41eede03e5a27bc613bf262a83288d (patch) | |
tree | 4c1e01ce8696523ece5726355ec3d12a6a6990ea | |
parent | 41b74a89d2800bd956ae830a77207681e6e9da8b (diff) | |
download | scummvm-rg350-c5490b8ecc41eede03e5a27bc613bf262a83288d.tar.gz scummvm-rg350-c5490b8ecc41eede03e5a27bc613bf262a83288d.tar.bz2 scummvm-rg350-c5490b8ecc41eede03e5a27bc613bf262a83288d.zip |
SHERLOCK: SS: German and Spanish use an alternate opcode range
-rw-r--r-- | engines/sherlock/scalpel/scalpel_talk.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/engines/sherlock/scalpel/scalpel_talk.cpp b/engines/sherlock/scalpel/scalpel_talk.cpp index 4b7a5c6409..e53692c2b7 100644 --- a/engines/sherlock/scalpel/scalpel_talk.cpp +++ b/engines/sherlock/scalpel/scalpel_talk.cpp @@ -156,8 +156,18 @@ ScalpelTalk::ScalpelTalk(SherlockEngine *vm) : Talk(vm) { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }; - _opcodes = SCALPEL_OPCODES; _opcodeTable = OPCODE_METHODS; + _opcodes = SCALPEL_OPCODES; + + if (vm->getLanguage() == Common::DE_DEU || vm->getLanguage() == Common::ES_ESP) { + // The German and Spanish versions use a different opcode range + static byte opcodes[sizeof(SCALPEL_OPCODES)]; + for (int idx = 0; idx < sizeof(SCALPEL_OPCODES); ++idx) + opcodes[idx] = SCALPEL_OPCODES[idx] ? SCALPEL_OPCODES[idx] + 47 : 0; + + _opcodes = opcodes; + } + } void ScalpelTalk::talkInterface(const byte *&str) { |