diff options
author | sylvaintv | 2012-04-28 01:03:11 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-03-28 17:36:57 +0200 |
commit | c4186ba41bfcaa20876fed950d45cb502b7efb9a (patch) | |
tree | 76343d7f76757db17c6c0baeb45bdf763be7fd84 /engines | |
parent | 794869656b2d0433b69ae6627844288c1e7288d4 (diff) | |
download | scummvm-rg350-c4186ba41bfcaa20876fed950d45cb502b7efb9a.tar.gz scummvm-rg350-c4186ba41bfcaa20876fed950d45cb502b7efb9a.tar.bz2 scummvm-rg350-c4186ba41bfcaa20876fed950d45cb502b7efb9a.zip |
LILLIPUT: Implements one more opcode
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lilliput/script.cpp | 34 | ||||
-rw-r--r-- | engines/lilliput/script.h | 1 |
2 files changed, 31 insertions, 4 deletions
diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp index df21358f86..1b75bd4a18 100644 --- a/engines/lilliput/script.cpp +++ b/engines/lilliput/script.cpp @@ -926,9 +926,32 @@ byte LilliputScript::OC_sub173F0() { return 0; } +byte* LilliputScript::sub17399(int val) { + int x = (val >> 8); + int y = (val & 0xFF); + return &_vm->_bufferIsoMap[(y * 320 + x) << 2]; +} + byte LilliputScript::OC_sub1740A() { - warning("OC_sub1740A"); - return 0; + debugC(1, kDebugScript, "OC_sub1740A()"); + + int var = _vm->_word16EFA; + if (var == 0xFFFF) { + _currScript->readUint16LE(); + return 0; + } + + byte *isoMapBuf = sub17399(var); + int var2 = isoMapBuf[3]; + + int var3 = _currScript->readUint16LE(); + int var4 = 8 >> var3; + + if( var2 & var4 ) { + return 1; + } else { + return 0; + } } byte LilliputScript::OC_sub17434() { @@ -943,8 +966,11 @@ byte LilliputScript::OC_sub17434() { } byte LilliputScript::OC_sub17468() { - warning("OC_sub17468"); - return 0; + debugC(1, kDebugScript, "OC_sub17468()"); + + int operation = _currScript->readUint16LE(); + int val2 = _currScript->readUint16LE(); + return compareValues(_byte16F02, operation, val2); } byte LilliputScript::OC_getRandom() { diff --git a/engines/lilliput/script.h b/engines/lilliput/script.h index 24a74d7c24..4d7f5e9843 100644 --- a/engines/lilliput/script.h +++ b/engines/lilliput/script.h @@ -106,6 +106,7 @@ private: void sub18A56(byte *buf); void sub18B3C(int var); void sub18BE6(byte var1, int var2, int var4); + byte* sub17399(int val); byte *getMapPtr(int var1); int getValue1(); |