diff options
author | Strangerke | 2012-04-28 10:13:03 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-03-28 17:36:57 +0200 |
commit | b9a2c968db63eb43f08a468d383f17f59aa14786 (patch) | |
tree | 606a2bbe90bfd3199c94ca58890bec5ff718b1a0 /engines/lilliput | |
parent | ba0fcb521f10c4b3cc6aeef9b2371abfd05bc32f (diff) | |
download | scummvm-rg350-b9a2c968db63eb43f08a468d383f17f59aa14786.tar.gz scummvm-rg350-b9a2c968db63eb43f08a468d383f17f59aa14786.tar.bz2 scummvm-rg350-b9a2c968db63eb43f08a468d383f17f59aa14786.zip |
LILLIPUT: Implement 4 opcodes
Diffstat (limited to 'engines/lilliput')
-rw-r--r-- | engines/lilliput/script.cpp | 54 | ||||
-rw-r--r-- | engines/lilliput/script.h | 1 |
2 files changed, 51 insertions, 4 deletions
diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp index b345ed382f..c63a12523c 100644 --- a/engines/lilliput/script.cpp +++ b/engines/lilliput/script.cpp @@ -1810,17 +1810,63 @@ void LilliputScript::OC_sub17C76() { void LilliputScript::OC_sub17AFC() { warning("OC_sub17AFC"); } + +void LilliputScript::sub171AF(int var1, int var2, int var4) { + debugC(2, kDebugScript, "sub171AF()"); + + int index = 0; + for (int i = 0; i < 10; i++) { + if (_vm->_array12861[index + 1] == 0xFFFF) { + _vm->_array12861[index + 1] = var1; + _vm->_array12861[index + 2] = var2; + _vm->_array12861[index + 0] = _vm->_word1289D + var4; + } + index += 3; + } +} + void LilliputScript::OC_sub17C8B() { - warning("OC_sub17C8B"); + debugC(1, kDebugScript, "OC_sub17C8B()"); + + int var1 = 2 << 8; + int var4 = _currScript->readUint16LE(); + int var2 = _currScript->readUint16LE(); + var2 = ((var2 & 0xFF) << 8 ) + _vm->_rulesBuffer2PrevIndx; + + sub171AF(var1, var2, var4); } + void LilliputScript::OC_sub17CA2() { - warning("OC_sub17CA2"); + debugC(1, kDebugScript, "OC_sub17CA2()"); + + int var1 = 1 << 8; + int var4 = _currScript->readUint16LE(); + int var2 = _currScript->readUint16LE(); + var2 = ((var2 & 0xFF) << 8 ) + _vm->_rulesBuffer2PrevIndx; + + sub171AF(var1, var2, var4); } + void LilliputScript::OC_sub17CB9() { - warning("OC_sub17CB9"); + debugC(1, kDebugScript, "OC_sub17CB9()"); + + int var4 = _currScript->readUint16LE(); + int var1 = getValue1(); + int var2 = _currScript->readUint16LE(); + var2 = ((var2 & 0xFF) << 8 ) + _vm->_rulesBuffer2PrevIndx; + + sub171AF(var1, var2, var4); } + void LilliputScript::OC_sub17CD1() { - warning("OC_sub17CD1"); + debugC(1, kDebugScript, "OC_sub17CD1()"); + + int var1 = 3 << 8; + int var4 = _currScript->readUint16LE(); + int var2 = _currScript->readUint16LE(); + var2 = ((var2 & 0xFF) << 8 ) + _vm->_rulesBuffer2PrevIndx; + + sub171AF(var1, var2, var4); } void LilliputScript::OC_resetWord16EFE() { diff --git a/engines/lilliput/script.h b/engines/lilliput/script.h index a31a4b65e8..fe8347f1cb 100644 --- a/engines/lilliput/script.h +++ b/engines/lilliput/script.h @@ -108,6 +108,7 @@ private: void sub18BE6(byte var1, int var2, int var4); byte *getMapPtr(int val); byte *sub173D2(); + void sub171AF(int var1, int var2, int var4); int getValue1(); int getValue2(); |