diff options
author | Strangerke | 2012-04-27 17:45:46 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-03-28 17:36:57 +0200 |
commit | 32ed5e62af5e8689babb0cb4dced12996e757655 (patch) | |
tree | 3e2826f78c6152304649d862606d96dbefd3777b /engines/lilliput/script.cpp | |
parent | 1f7cf60ddb49f3b581d196e1631b72f45ab9a643 (diff) | |
download | scummvm-rg350-32ed5e62af5e8689babb0cb4dced12996e757655.tar.gz scummvm-rg350-32ed5e62af5e8689babb0cb4dced12996e757655.tar.bz2 scummvm-rg350-32ed5e62af5e8689babb0cb4dced12996e757655.zip |
LILLIPUT: Implement another opcode and associated function
Diffstat (limited to 'engines/lilliput/script.cpp')
-rw-r--r-- | engines/lilliput/script.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp index 5bef67bb54..1ca521c52a 100644 --- a/engines/lilliput/script.cpp +++ b/engines/lilliput/script.cpp @@ -1200,9 +1200,31 @@ byte LilliputScript::OC_sub17782() { warning("OC_sub17782"); return 0; } + +byte *LilliputScript::getMapPtr(int var1) { + debugC(1, kDebugScript, "getMapPtr(%d)", var1); + + int index = (((var1 & 0xFF) << 6) + (var1 >> 8)) << 2; + return &_vm->_bufferIsoMap[index]; +} + byte LilliputScript::OC_sub1779E() { - warning("OC_sub1779E"); - return 0; + debugC(1, kDebugScript, "OC_sub1779E()"); + + int tmpVal = getValue2(); + + if (tmpVal == 0xFFFF) { + _currScript->seek(_currScript->pos() + 6); + return 0; + } + + int var2 = _currScript->readUint16LE(); + byte *buf = getMapPtr(tmpVal); + byte var1 = buf[var2]; + var2 = _currScript->readUint16LE(); + int oper = _currScript->readUint16LE(); + + return compareValues(var1, oper, var2); } byte LilliputScript::OC_sub177C6() { |