diff options
author | Strangerke | 2012-04-25 08:10:26 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-03-28 17:36:57 +0200 |
commit | 5b6014fb77823481f2d965fbe94e940bdbb193aa (patch) | |
tree | f547bc059007678154dd7784118d8500a939d755 /engines | |
parent | b525867d4a0e44a3afae84b46e8801e8adac4432 (diff) | |
download | scummvm-rg350-5b6014fb77823481f2d965fbe94e940bdbb193aa.tar.gz scummvm-rg350-5b6014fb77823481f2d965fbe94e940bdbb193aa.tar.bz2 scummvm-rg350-5b6014fb77823481f2d965fbe94e940bdbb193aa.zip |
LILLIPUT: Implement 4 more opcodes
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lilliput/lilliput.cpp | 3 | ||||
-rw-r--r-- | engines/lilliput/lilliput.h | 1 | ||||
-rw-r--r-- | engines/lilliput/script.cpp | 50 |
3 files changed, 47 insertions, 7 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp index 0ccfdf7277..6701c4545a 100644 --- a/engines/lilliput/lilliput.cpp +++ b/engines/lilliput/lilliput.cpp @@ -163,6 +163,9 @@ LilliputEngine::LilliputEngine(OSystem *syst, const LilliputGameDescription *gd) _saveFlag = false; _byte16F07_menuId = 0; + for (int i = 0; i < 3; i++) + _array147D1[i] = 0; + for (int i = 0; i < 40; i++) { _array10999[i] = 0; _array109C1[i] = 0; diff --git a/engines/lilliput/lilliput.h b/engines/lilliput/lilliput.h index f912e2228b..ac185b058d 100644 --- a/engines/lilliput/lilliput.h +++ b/engines/lilliput/lilliput.h @@ -104,6 +104,7 @@ public: byte _byte12FE4; byte _byte12FE3; + byte _array147D1[3]; byte _buffer1[45056]; byte _buffer2[45056]; byte _buffer3[45056]; diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp index 364211ebdb..f34ec121cc 100644 --- a/engines/lilliput/script.cpp +++ b/engines/lilliput/script.cpp @@ -1201,8 +1201,14 @@ byte LilliputScript::OC_sub17825() { } byte LilliputScript::OC_sub17844() { - warning("OC_sub17844"); - return 0; + debugC(1, kDebugScript, "OC_sub17844()"); + + int tmpVal = _currScript->readUint16LE(); + + if ((_vm->_byte16F07_menuId == 2) || ((tmpVal & 0xFF) != _byte12FE4)) + return 0; + + return 1; } byte LilliputScript::OC_sub1785C() { @@ -1303,14 +1309,25 @@ byte LilliputScript::OC_sub17984() { return 0; } + byte LilliputScript::OC_checkSavedMousePos() { - warning("OC_checkSavedMousePos"); - return 0; + debugC(1, kDebugScript, "OC_checkSavedMousePos()"); + + if ((_byte129A0 != 0xFF) || (_vm->_savedMousePosDivided == 0xFFFF)) + return 0; + + return 1; } + byte LilliputScript::OC_sub179AE() { - warning("OC_sub179AE"); - return 0; + debugC(1, kDebugScript, "OC_sub179AE()"); + + if ((_vm->_byte12FCE == 1) || (_byte129A0 == 0xFF)) + return 0; + + return 1; } + byte LilliputScript::OC_sub179C2() { warning("OC_sub179C2"); return 0; @@ -1319,10 +1336,29 @@ byte LilliputScript::OC_sub179E5() { warning("OC_sub179E5"); return 0; } + byte LilliputScript::OC_sub17A07() { - warning("OC_sub17A07"); + debugC(1, kDebugScript, "OC_sub17A07()"); + + static const byte _array179FD[10] = {11, 2, 3, 4, 5, 6, 7, 8, 9, 10}; + + if (_vm->_byte16F07_menuId == 6) { + int index = _currScript->readUint16LE(); + if (_array179FD[index] == _vm->_array147D1[0]) { + index = _currScript->readUint16LE(); + if (_array179FD[index] == _vm->_array147D1[1]) { + index = _currScript->readUint16LE(); + if (_array179FD[index] == _vm->_array147D1[2]) { + return 1; + } + } + } + } + + _currScript->seek(_currScript->pos() + 6); return 0; } + byte LilliputScript::OC_sub17757() { warning("OC_sub17757"); return 0; |