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 | |
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
-rw-r--r-- | engines/lilliput/script.cpp | 26 | ||||
-rw-r--r-- | engines/lilliput/script.h | 1 |
2 files changed, 25 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() { diff --git a/engines/lilliput/script.h b/engines/lilliput/script.h index daf14667cc..ce92e81bdf 100644 --- a/engines/lilliput/script.h +++ b/engines/lilliput/script.h @@ -103,6 +103,7 @@ private: void sub18A56(byte *buf); void sub18B3C(int var); void sub18BE6(byte var1, int var2, int var4); + byte *getMapPtr(int var1); int getValue1(); int getValue2(); |